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AE,GACAC,GACAC,IAGJ,MAAM0B,EAAe,CACnBr3E,YAAam2E,EAAen2E,YAC5BE,UAAWi2E,EAAej2E,UAC1BC,WAAYs3E,GAGdrB,EAAkBiB,EAAa,EAgF/BlC,UAAWqB,GAGb,OACE31E,EAAAA,EAAAA,KAACyuE,EAAiBvyE,SAAQ,CAACnuC,MAAO0oH,EAAiBv9G,SAChDgpB,EAAMhpB,UACmB,ECp1BhC,IAAiB,ECiDjB,SA1CA,WAGE,MACM29G,EADkB,IAAIC,gBAAgBx3H,OAAO6tB,SAASiD,QACrBnZ,IAAI,mBAEpC8/G,EAAYC,IAAiB1tF,EAAAA,EAAAA,WAAS,GAU7C,OACEoX,EAAAA,EAAAA,MAACu2E,GAAiB,CAACZ,QAASQ,EAAe39G,SAAA,CACxC69G,IAAc/2E,EAAAA,EAAAA,KAACk3E,GAAW,CAAC92E,QAND+2E,KAC7BH,GAAc,EAAM,KAMlBh3E,EAAAA,EAAAA,KAACo3E,GAAU,KACXp3E,EAAAA,EAAAA,KAACq3E,GAAS,KACVr3E,EAAAA,EAAAA,KAACs3E,GAAM,CAAC/D,eAbmBgE,KAC7BP,GAAc,EAAK,KAajBh3E,EAAAA,EAAAA,KAAA,OAAA9mC,UACEwnC,EAAAA,EAAAA,MAAA,KAAGT,UAAWu3E,GAAOC,SAASv+G,SAAA,EAC5B8mC,EAAAA,EAAAA,KAAA,KACEptB,KAAK,kGACL9T,OAAO,SAAQ5F,SAChB,oBAGD8mC,EAAAA,EAAAA,KAAA,KACEptB,KAAK,kGACL9T,OAAO,SAAQ5F,SAChB,wBAOX,EC3CaynC,EAAAA,WAAoB7uC,SAAS2uC,eAAe,SACpDtqC,QAAO6pC,EAAAA,EAAAA,KAAC03E,GAAG","sources":["../node_modules/pako/index.js","../node_modules/pako/lib/deflate.js","../node_modules/pako/lib/inflate.js","../node_modules/pako/lib/utils/common.js","../node_modules/pako/lib/utils/strings.js","../node_modules/pako/lib/zlib/adler32.js","../node_modules/pako/lib/zlib/constants.js","../node_modules/pako/lib/zlib/crc32.js","../node_modules/pako/lib/zlib/deflate.js","../node_modules/pako/lib/zlib/gzheader.js","../node_modules/pako/lib/zlib/inffast.js","../node_modules/pako/lib/zlib/inflate.js","../node_modules/pako/lib/zlib/inftrees.js","../node_modules/pako/lib/zlib/messages.js","../node_modules/pako/lib/zlib/trees.js","../node_modules/pako/lib/zlib/zstream.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/client.js","../node_modules/react-dom/index.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-runtime.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/define property getters","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/publicPath","store/badgeData-context.js","webpack://achievement-badges/./src/components/pdfGenerators/CertGenerator.module.css?969a","webpack://achievement-badges/./src/components/UI/Modal.module.css?7053","components/UI/Modal.js","../node_modules/tslib/tslib.es6.js","../node_modules/pdf-lib/src/utils/base64.ts","../node_modules/pdf-lib/src/utils/unicode.ts","../node_modules/pdf-lib/src/utils/strings.ts","../node_modules/pdf-lib/src/utils/arrays.ts","../node_modules/pdf-lib/src/utils/async.ts","../node_modules/@pdf-lib/standard-fonts/es/utils.js","../node_modules/pdf-lib/src/utils/numbers.ts","../node_modules/pdf-lib/src/utils/errors.ts","../node_modules/@pdf-lib/standard-fonts/es/Font.js","../node_modules/pdf-lib/src/utils/pdfDocEncoding.ts","../node_modules/@pdf-lib/standard-fonts/es/Encoding.js","../node_modules/pdf-lib/src/utils/objects.ts","../node_modules/pdf-lib/src/utils/validators.ts","../node_modules/pdf-lib/src/utils/Cache.ts","../node_modules/pdf-lib/src/core/errors.ts","../node_modules/pdf-lib/src/core/syntax/CharCodes.ts","../node_modules/pdf-lib/src/core/document/PDFHeader.ts","../node_modules/pdf-lib/src/core/objects/PDFObject.ts","../node_modules/pdf-lib/src/core/objects/PDFNumber.ts","../node_modules/pdf-lib/src/core/objects/PDFArray.ts","../node_modules/pdf-lib/src/core/objects/PDFBool.ts","../node_modules/pdf-lib/src/core/syntax/Delimiters.ts","../node_modules/pdf-lib/src/core/syntax/Whitespace.ts","../node_modules/pdf-lib/src/core/syntax/Irregular.ts","../node_modules/pdf-lib/src/core/objects/PDFName.ts","../node_modules/pdf-lib/src/core/objects/PDFNull.ts","../node_modules/pdf-lib/src/core/objects/PDFDict.ts","../node_modules/pdf-lib/src/core/objects/PDFStream.ts","../node_modules/pdf-lib/src/core/objects/PDFRawStream.ts","../node_modules/pdf-lib/src/core/objects/PDFRef.ts","../node_modules/pdf-lib/src/core/operators/PDFOperator.ts","../node_modules/pdf-lib/src/core/operators/PDFOperatorNames.ts","../node_modules/pdf-lib/src/core/structures/PDFFlateStream.ts","../node_modules/pdf-lib/src/core/structures/PDFContentStream.ts","../node_modules/pdf-lib/src/utils/rng.ts","../node_modules/pdf-lib/src/core/PDFContext.ts","../node_modules/pdf-lib/src/core/structures/PDFPageLeaf.ts","../node_modules/pdf-lib/src/core/PDFObjectCopier.ts","../node_modules/pdf-lib/src/core/document/PDFCrossRefSection.ts","../node_modules/pdf-lib/src/core/document/PDFTrailer.ts","../node_modules/pdf-lib/src/core/document/PDFTrailerDict.ts","../node_modules/pdf-lib/src/core/structures/PDFObjectStream.ts","../node_modules/pdf-lib/src/core/writers/PDFWriter.ts","../node_modules/pdf-lib/src/core/objects/PDFInvalidObject.ts","../node_modules/pdf-lib/src/core/structures/PDFCrossRefStream.ts","../node_modules/pdf-lib/src/core/writers/PDFStreamWriter.ts","../node_modules/pdf-lib/src/core/objects/PDFHexString.ts","../node_modules/pdf-lib/src/core/embedders/StandardFontEmbedder.ts","../node_modules/pdf-lib/src/core/embedders/CMap.ts","../node_modules/pdf-lib/src/core/embedders/FontFlags.ts","../node_modules/pdf-lib/src/core/objects/PDFString.ts","../node_modules/pdf-lib/src/core/embedders/CustomFontEmbedder.ts","../node_modules/pdf-lib/src/core/embedders/CustomFontSubsetEmbedder.ts","../node_modules/pdf-lib/src/core/embedders/FileEmbedder.ts","../node_modules/pdf-lib/src/core/embedders/JpegEmbedder.ts","../node_modules/@pdf-lib/upng/UPNG.js","../node_modules/pdf-lib/src/utils/png.ts","../node_modules/pdf-lib/src/core/embedders/PngEmbedder.ts","../node_modules/pdf-lib/src/core/streams/Stream.ts","../node_modules/pdf-lib/src/core/streams/DecodeStream.ts","../node_modules/pdf-lib/src/core/streams/Ascii85Stream.ts","../node_modules/pdf-lib/src/core/streams/AsciiHexStream.ts","../node_modules/pdf-lib/src/core/streams/FlateStream.ts","../node_modules/pdf-lib/src/core/streams/LZWStream.ts","../node_modules/pdf-lib/src/core/streams/RunLengthStream.ts","../node_modules/pdf-lib/src/core/streams/decode.ts","../node_modules/pdf-lib/src/core/embedders/PDFPageEmbedder.ts","../node_modules/pdf-lib/src/core/interactive/ViewerPreferences.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroField.ts","../node_modules/pdf-lib/src/core/annotation/BorderStyle.ts","../node_modules/pdf-lib/src/core/annotation/PDFAnnotation.ts","../node_modules/pdf-lib/src/core/annotation/AppearanceCharacteristics.ts","../node_modules/pdf-lib/src/core/annotation/PDFWidgetAnnotation.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroTerminal.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroButton.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroCheckBox.ts","../node_modules/pdf-lib/src/core/acroform/flags.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroChoice.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroComboBox.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroNonTerminal.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroSignature.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroText.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroPushButton.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroRadioButton.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroListBox.ts","../node_modules/pdf-lib/src/core/acroform/utils.ts","../node_modules/pdf-lib/src/core/acroform/PDFAcroForm.ts","../node_modules/pdf-lib/src/core/structures/PDFCatalog.ts","../node_modules/pdf-lib/src/core/structures/PDFPageTree.ts","../node_modules/pdf-lib/src/core/syntax/Numeric.ts","../node_modules/pdf-lib/src/core/parser/BaseParser.ts","../node_modules/pdf-lib/src/core/parser/ByteStream.ts","../node_modules/pdf-lib/src/core/syntax/Keywords.ts","../node_modules/pdf-lib/src/core/parser/PDFObjectParser.ts","../node_modules/pdf-lib/src/core/parser/PDFObjectStreamParser.ts","../node_modules/pdf-lib/src/core/parser/PDFXRefStreamParser.ts","../node_modules/pdf-lib/src/core/parser/PDFParser.ts","../node_modules/pdf-lib/src/core/annotation/flags.ts","../node_modules/pdf-lib/src/api/objects.ts","../node_modules/pdf-lib/src/api/rotations.ts","../node_modules/pdf-lib/src/api/operators.ts","../node_modules/pdf-lib/src/api/colors.ts","../node_modules/pdf-lib/src/api/text/alignment.ts","../node_modules/pdf-lib/src/api/svgPath.ts","../node_modules/pdf-lib/src/api/operations.ts","../node_modules/pdf-lib/src/api/errors.ts","../node_modules/pdf-lib/src/api/text/layout.ts","../node_modules/pdf-lib/src/api/form/appearances.ts","../node_modules/pdf-lib/src/api/PDFEmbeddedPage.ts","../node_modules/pdf-lib/src/api/PDFFont.ts","../node_modules/pdf-lib/src/api/PDFImage.ts","../node_modules/pdf-lib/src/api/image/alignment.ts","../node_modules/pdf-lib/src/api/form/PDFField.ts","../node_modules/pdf-lib/src/api/form/PDFCheckBox.ts","../node_modules/pdf-lib/src/api/form/PDFDropdown.ts","../node_modules/pdf-lib/src/api/form/PDFOptionList.ts","../node_modules/pdf-lib/src/api/form/PDFRadioGroup.ts","../node_modules/pdf-lib/src/api/form/PDFSignature.ts","../node_modules/pdf-lib/src/api/form/PDFTextField.ts","../node_modules/pdf-lib/src/api/StandardFonts.ts","../node_modules/pdf-lib/src/api/form/PDFForm.ts","../node_modules/pdf-lib/src/api/PDFDocumentOptions.ts","../node_modules/pdf-lib/src/api/sizes.ts","../node_modules/pdf-lib/src/api/PDFEmbeddedFile.ts","../node_modules/pdf-lib/src/api/PDFJavaScript.ts","../node_modules/pdf-lib/src/core/embedders/JavaScriptEmbedder.ts","../node_modules/pdf-lib/src/api/PDFDocument.ts","../node_modules/pdf-lib/src/api/PDFPageOptions.ts","../node_modules/pdf-lib/src/api/PDFPage.ts","../node_modules/pdf-lib/src/api/form/PDFButton.ts","components/pdfGenerators/PdfTextWriter.js","components/pdfGenerators/CertGenerator.js","components/pdfGenerators/TranscriptGenerator.js","webpack://achievement-badges/./src/components/badges/BadgeDetail.module.css?32fd","components/badges/BadgeDetail.js","webpack://achievement-badges/./src/components/badges/Badge.module.css?f687","components/badges/Badge.js","components/badges/Badges.js","webpack://achievement-badges/./src/components/UI/CodeInput.module.css?00d5","components/UI/CodeInput.js","webpack://achievement-badges/./src/components/Layout/Navigation.module.css?b711","components/Layout/Navigation.js","webpack://achievement-badges/./src/components/Layout/MainHeader.module.css?c1dd","components/Layout/MainHeader.js","webpack://achievement-badges/./src/components/UI/TabButton.module.css?4a2d","components/UI/TabButton.js","webpack://achievement-badges/./src/components/Layout/TabBanner.module.css?5bc1","components/Layout/TabBanner.js","store/BadgeDataProvider.js","webpack://achievement-badges/./src/App.css?c4bf","App.js","index.js"],"sourcesContent":["// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","__webpack_require__.p = \"/\";","import React from \"react\";\n\nconst BadgeDataContext = React.createContext({\n currStudent: { id: \"\", earnedBadges: [] },\n currBadge: \"\",\n badgesData: [],\n viewingMyBadges: false,\n currBadgeHasCert: false,\n isTranscript: false,\n getBadgeList: (grdLvl) => {},\n loadCurrStudent: (code) => {},\n loadCurrBadge: (id) => {},\n loadBadgesData: (grdLvl) => {},\n});\n\nexport default BadgeDataContext;\n","// extracted by mini-css-extract-plugin\nexport default {\"img\":\"CertGenerator_img__blqHW\",\"frame\":\"CertGenerator_frame__qBjhy\"};","// extracted by mini-css-extract-plugin\nexport default {\"backdrop\":\"Modal_backdrop__HzBxV\",\"modal\":\"Modal_modal__RajTW\",\"slide-down\":\"Modal_slide-down__tDgXQ\"};","import { Fragment } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport classes from \"./Modal.module.css\";\n\nconst Backdrop = (props) => {\n return
;\n};\n\nconst ModalOverlay = (props) => {\n return (\n
\n
{props.children}
\n
\n );\n};\n\nconst portalElement = document.getElementById(\"overlays\");\n\nconst Modal = (props) => {\n return (\n \n {ReactDOM.createPortal(\n ,\n portalElement\n )}\n {ReactDOM.createPortal(\n {props.children},\n portalElement\n )}\n \n );\n};\n\nexport default Modal;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*\n * The `chars`, `lookup`, `encode`, and `decode` members of this file are\n * licensed under the following:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n *\n */\n\nconst chars =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n// Use a lookup table to find the index.\nconst lookup = new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\n\nexport const encodeToBase64 = (bytes: Uint8Array): string => {\n let base64 = '';\n const len = bytes.length;\n for (let i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n\n return base64;\n};\n\nexport const decodeFromBase64 = (base64: string): Uint8Array => {\n let bufferLength = base64.length * 0.75;\n const len = base64.length;\n let i;\n let p = 0;\n let encoded1;\n let encoded2;\n let encoded3;\n let encoded4;\n\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n\n const bytes = new Uint8Array(bufferLength);\n\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n\n return bytes;\n};\n\n// This regex is designed to be as flexible as possible. It will parse certain\n// invalid data URIs.\nconst DATA_URI_PREFIX_REGEX = /^(data)?:?([\\w\\/\\+]+)?;?(charset=[\\w-]+|base64)?.*,/i;\n\n/**\n * If the `dataUri` input is a data URI, then the data URI prefix must not be\n * longer than 100 characters, or this function will fail to decode it.\n *\n * @param dataUri a base64 data URI or plain base64 string\n * @returns a Uint8Array containing the decoded input\n */\nexport const decodeFromBase64DataUri = (dataUri: string): Uint8Array => {\n const trimmedUri = dataUri.trim();\n\n const prefix = trimmedUri.substring(0, 100);\n const res = prefix.match(DATA_URI_PREFIX_REGEX);\n\n // Assume it's not a data URI - just a plain base64 string\n if (!res) return decodeFromBase64(trimmedUri);\n\n // Remove the data URI prefix and parse the remainder as a base64 string\n const [fullMatch] = res;\n const data = trimmedUri.substring(fullMatch.length);\n\n return decodeFromBase64(data);\n};\n","import { toHexString } from 'src/utils/strings';\n\n/**\n * Encodes a string to UTF-8.\n *\n * @param input The string to be encoded.\n * @param byteOrderMark Whether or not a byte order marker (BOM) should be added\n * to the start of the encoding. (default `true`)\n * @returns A Uint8Array containing the UTF-8 encoding of the input string.\n *\n * -----------------------------------------------------------------------------\n *\n * JavaScript strings are composed of Unicode code points. Code points are\n * integers in the range 0 to 1,114,111 (0x10FFFF). When serializing a string,\n * it must be encoded as a sequence of words. A word is typically 8, 16, or 32\n * bytes in size. As such, Unicode defines three encoding forms: UTF-8, UTF-16,\n * and UTF-32. These encoding forms are described in the Unicode standard [1].\n * This function implements the UTF-8 encoding form.\n *\n * -----------------------------------------------------------------------------\n *\n * In UTF-8, each code point is mapped to a sequence of 1, 2, 3, or 4 bytes.\n * Note that the logic which defines this mapping is slightly convoluted, and\n * not as straightforward as the mapping logic for UTF-16 or UTF-32. The UTF-8\n * mapping logic is as follows [2]:\n *\n * • If a code point is in the range U+0000..U+007F, then view it as a 7-bit\n * integer: 0bxxxxxxx. Map the code point to 1 byte with the first high order\n * bit set to 0:\n *\n * b1=0b0xxxxxxx\n *\n * • If a code point is in the range U+0080..U+07FF, then view it as an 11-bit\n * integer: 0byyyyyxxxxxx. Map the code point to 2 bytes with the first 5 bits\n * of the code point stored in the first byte, and the last 6 bits stored in\n * the second byte:\n *\n * b1=0b110yyyyy b2=0b10xxxxxx\n *\n * • If a code point is in the range U+0800..U+FFFF, then view it as a 16-bit\n * integer, 0bzzzzyyyyyyxxxxxx. Map the code point to 3 bytes with the first\n * 4 bits stored in the first byte, the next 6 bits stored in the second byte,\n * and the last 6 bits in the third byte:\n *\n * b1=0b1110zzzz b2=0b10yyyyyy b3=0b10xxxxxx\n *\n * • If a code point is in the range U+10000...U+10FFFF, then view it as a\n * 21-bit integer, 0bvvvzzzzzzyyyyyyxxxxxx. Map the code point to 4 bytes with\n * the first 3 bits stored in the first byte, the next 6 bits stored in the\n * second byte, the next 6 bits stored in the third byte, and the last 6 bits\n * stored in the fourth byte:\n *\n * b1=0b11110xxx b2=0b10zzzzzz b3=0b10yyyyyy b4=0b10xxxxxx\n *\n * -----------------------------------------------------------------------------\n *\n * It is important to note, when iterating through the code points of a string\n * in JavaScript, that if a character is encoded as a surrogate pair it will\n * increase the string's length by 2 instead of 1 [4]. For example:\n *\n * ```\n * > 'a'.length\n * 1\n * > '💩'.length\n * 2\n * > '語'.length\n * 1\n * > 'a💩語'.length\n * 4\n * ```\n *\n * The results of the above example are explained by the fact that the\n * characters 'a' and '語' are not represented by surrogate pairs, but '💩' is.\n *\n * Because of this idiosyncrasy in JavaScript's string implementation and APIs,\n * we must \"jump\" an extra index after encoding a character as a surrogate\n * pair. In practice, this means we must increment the index of our for loop by\n * 2 if we encode a surrogate pair, and 1 in all other cases.\n *\n * -----------------------------------------------------------------------------\n *\n * References:\n * - [1] https://www.unicode.org/versions/Unicode12.0.0/UnicodeStandard-12.0.pdf\n * 3.9 Unicode Encoding Forms - UTF-8\n * - [2] http://www.herongyang.com/Unicode/UTF-8-UTF-8-Encoding.html\n * - [3] http://www.herongyang.com/Unicode/UTF-8-UTF-8-Encoding-Algorithm.html\n * - [4] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length#Description\n *\n */\nexport const utf8Encode = (input: string, byteOrderMark = true): Uint8Array => {\n const encoded = [];\n\n if (byteOrderMark) encoded.push(0xef, 0xbb, 0xbf);\n\n for (let idx = 0, len = input.length; idx < len; ) {\n const codePoint = input.codePointAt(idx)!;\n\n // One byte encoding\n if (codePoint < 0x80) {\n const byte1 = codePoint & 0x7f;\n encoded.push(byte1);\n idx += 1;\n }\n\n // Two byte encoding\n else if (codePoint < 0x0800) {\n const byte1 = ((codePoint >> 6) & 0x1f) | 0xc0;\n const byte2 = (codePoint & 0x3f) | 0x80;\n encoded.push(byte1, byte2);\n idx += 1;\n }\n\n // Three byte encoding\n else if (codePoint < 0x010000) {\n const byte1 = ((codePoint >> 12) & 0x0f) | 0xe0;\n const byte2 = ((codePoint >> 6) & 0x3f) | 0x80;\n const byte3 = (codePoint & 0x3f) | 0x80;\n encoded.push(byte1, byte2, byte3);\n idx += 1;\n }\n\n // Four byte encoding (surrogate pair)\n else if (codePoint < 0x110000) {\n const byte1 = ((codePoint >> 18) & 0x07) | 0xf0;\n const byte2 = ((codePoint >> 12) & 0x3f) | 0x80;\n const byte3 = ((codePoint >> 6) & 0x3f) | 0x80;\n const byte4 = ((codePoint >> 0) & 0x3f) | 0x80;\n encoded.push(byte1, byte2, byte3, byte4);\n idx += 2;\n }\n\n // Should never reach this case\n else throw new Error(`Invalid code point: 0x${toHexString(codePoint)}`);\n }\n\n return new Uint8Array(encoded);\n};\n\n/**\n * Encodes a string to UTF-16.\n *\n * @param input The string to be encoded.\n * @param byteOrderMark Whether or not a byte order marker (BOM) should be added\n * to the start of the encoding. (default `true`)\n * @returns A Uint16Array containing the UTF-16 encoding of the input string.\n *\n * -----------------------------------------------------------------------------\n *\n * JavaScript strings are composed of Unicode code points. Code points are\n * integers in the range 0 to 1,114,111 (0x10FFFF). When serializing a string,\n * it must be encoded as a sequence of words. A word is typically 8, 16, or 32\n * bytes in size. As such, Unicode defines three encoding forms: UTF-8, UTF-16,\n * and UTF-32. These encoding forms are described in the Unicode standard [1].\n * This function implements the UTF-16 encoding form.\n *\n * -----------------------------------------------------------------------------\n *\n * In UTF-16, each code point is mapped to one or two 16-bit integers. The\n * UTF-16 mapping logic is as follows [2]:\n *\n * • If a code point is in the range U+0000..U+FFFF, then map the code point to\n * a 16-bit integer with the most significant byte first.\n *\n * • If a code point is in the range U+10000..U+10000, then map the code point\n * to two 16-bit integers. The first integer should contain the high surrogate\n * and the second integer should contain the low surrogate. Both surrogates\n * should be written with the most significant byte first.\n *\n * -----------------------------------------------------------------------------\n *\n * It is important to note, when iterating through the code points of a string\n * in JavaScript, that if a character is encoded as a surrogate pair it will\n * increase the string's length by 2 instead of 1 [4]. For example:\n *\n * ```\n * > 'a'.length\n * 1\n * > '💩'.length\n * 2\n * > '語'.length\n * 1\n * > 'a💩語'.length\n * 4\n * ```\n *\n * The results of the above example are explained by the fact that the\n * characters 'a' and '語' are not represented by surrogate pairs, but '💩' is.\n *\n * Because of this idiosyncrasy in JavaScript's string implementation and APIs,\n * we must \"jump\" an extra index after encoding a character as a surrogate\n * pair. In practice, this means we must increment the index of our for loop by\n * 2 if we encode a surrogate pair, and 1 in all other cases.\n *\n * -----------------------------------------------------------------------------\n *\n * References:\n * - [1] https://www.unicode.org/versions/Unicode12.0.0/UnicodeStandard-12.0.pdf\n * 3.9 Unicode Encoding Forms - UTF-8\n * - [2] http://www.herongyang.com/Unicode/UTF-16-UTF-16-Encoding.html\n * - [3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length#Description\n *\n */\nexport const utf16Encode = (\n input: string,\n byteOrderMark = true,\n): Uint16Array => {\n const encoded = [];\n\n if (byteOrderMark) encoded.push(0xfeff);\n\n for (let idx = 0, len = input.length; idx < len; ) {\n const codePoint = input.codePointAt(idx)!;\n\n // Two byte encoding\n if (codePoint < 0x010000) {\n encoded.push(codePoint);\n idx += 1;\n }\n\n // Four byte encoding (surrogate pair)\n else if (codePoint < 0x110000) {\n encoded.push(highSurrogate(codePoint), lowSurrogate(codePoint));\n idx += 2;\n }\n\n // Should never reach this case\n else throw new Error(`Invalid code point: 0x${toHexString(codePoint)}`);\n }\n\n return new Uint16Array(encoded);\n};\n\n/**\n * Returns `true` if the `codePoint` is within the\n * Basic Multilingual Plane (BMP). Code points inside the BMP are not encoded\n * with surrogate pairs.\n * @param codePoint The code point to be evaluated.\n *\n * Reference: https://en.wikipedia.org/wiki/UTF-16#Description\n */\nexport const isWithinBMP = (codePoint: number) =>\n codePoint >= 0 && codePoint <= 0xffff;\n\n/**\n * Returns `true` if the given `codePoint` is valid and must be represented\n * with a surrogate pair when encoded.\n * @param codePoint The code point to be evaluated.\n *\n * Reference: https://en.wikipedia.org/wiki/UTF-16#Description\n */\nexport const hasSurrogates = (codePoint: number) =>\n codePoint >= 0x010000 && codePoint <= 0x10ffff;\n\n// From Unicode 3.0 spec, section 3.7:\n// http://unicode.org/versions/Unicode3.0.0/ch03.pdf\nexport const highSurrogate = (codePoint: number) =>\n Math.floor((codePoint - 0x10000) / 0x400) + 0xd800;\n\n// From Unicode 3.0 spec, section 3.7:\n// http://unicode.org/versions/Unicode3.0.0/ch03.pdf\nexport const lowSurrogate = (codePoint: number) =>\n ((codePoint - 0x10000) % 0x400) + 0xdc00;\n\nenum ByteOrder {\n BigEndian = 'BigEndian',\n LittleEndian = 'LittleEndian',\n}\n\nconst REPLACEMENT = '�'.codePointAt(0)!;\n\n/**\n * Decodes a Uint8Array of data to a string using UTF-16.\n *\n * Note that this function attempts to recover from erronous input by\n * inserting the replacement character (�) to mark invalid code points\n * and surrogate pairs.\n *\n * @param input A Uint8Array containing UTF-16 encoded data\n * @param byteOrderMark Whether or not a byte order marker (BOM) should be read\n * at the start of the encoding. (default `true`)\n * @returns The decoded string.\n */\nexport const utf16Decode = (\n input: Uint8Array,\n byteOrderMark = true,\n): string => {\n // Need at least 2 bytes of data in UTF-16 encodings\n if (input.length <= 1) return String.fromCodePoint(REPLACEMENT);\n\n const byteOrder = byteOrderMark ? readBOM(input) : ByteOrder.BigEndian;\n\n // Skip byte order mark if needed\n let idx = byteOrderMark ? 2 : 0;\n\n const codePoints: number[] = [];\n\n while (input.length - idx >= 2) {\n const first = decodeValues(input[idx++], input[idx++], byteOrder);\n\n if (isHighSurrogate(first)) {\n if (input.length - idx < 2) {\n // Need at least 2 bytes left for the low surrogate that is required\n codePoints.push(REPLACEMENT);\n } else {\n const second = decodeValues(input[idx++], input[idx++], byteOrder);\n if (isLowSurrogate(second)) {\n codePoints.push(first, second);\n } else {\n // Low surrogates should always follow high surrogates\n codePoints.push(REPLACEMENT);\n }\n }\n } else if (isLowSurrogate(first)) {\n // High surrogates should always come first since `decodeValues()`\n // accounts for the byte ordering\n idx += 2;\n codePoints.push(REPLACEMENT);\n } else {\n codePoints.push(first);\n }\n }\n\n // There shouldn't be extra byte(s) left over\n if (idx < input.length) codePoints.push(REPLACEMENT);\n\n return String.fromCodePoint(...codePoints);\n};\n\n/**\n * Returns `true` if the given `codePoint` is a high surrogate.\n * @param codePoint The code point to be evaluated.\n *\n * Reference: https://en.wikipedia.org/wiki/UTF-16#Description\n */\nconst isHighSurrogate = (codePoint: number) =>\n codePoint >= 0xd800 && codePoint <= 0xdbff;\n\n/**\n * Returns `true` if the given `codePoint` is a low surrogate.\n * @param codePoint The code point to be evaluated.\n *\n * Reference: https://en.wikipedia.org/wiki/UTF-16#Description\n */\nconst isLowSurrogate = (codePoint: number) =>\n codePoint >= 0xdc00 && codePoint <= 0xdfff;\n\n/**\n * Decodes the given utf-16 values first and second using the specified\n * byte order.\n * @param first The first byte of the encoding.\n * @param second The second byte of the encoding.\n * @param byteOrder The byte order of the encoding.\n * Reference: https://en.wikipedia.org/wiki/UTF-16#Examples\n */\nconst decodeValues = (first: number, second: number, byteOrder: ByteOrder) => {\n // Append the binary representation of the preceding byte by shifting the\n // first one 8 to the left and than applying a bitwise or-operator to append\n // the second one.\n if (byteOrder === ByteOrder.LittleEndian) return (second << 8) | first;\n if (byteOrder === ByteOrder.BigEndian) return (first << 8) | second;\n throw new Error(`Invalid byteOrder: ${byteOrder}`);\n};\n\n/**\n * Returns whether the given array contains a byte order mark for the\n * UTF-16BE or UTF-16LE encoding. If it has neither, BigEndian is assumed.\n *\n * Reference: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-16\n *\n * @param bytes The byte array to be evaluated.\n */\n// prettier-ignore\nconst readBOM = (bytes: Uint8Array): ByteOrder => (\n hasUtf16BigEndianBOM(bytes) ? ByteOrder.BigEndian\n : hasUtf16LittleEndianBOM(bytes) ? ByteOrder.LittleEndian\n : ByteOrder.BigEndian\n);\n\nconst hasUtf16BigEndianBOM = (bytes: Uint8Array) =>\n bytes[0] === 0xfe && bytes[1] === 0xff;\n\nconst hasUtf16LittleEndianBOM = (bytes: Uint8Array) =>\n bytes[0] === 0xff && bytes[1] === 0xfe;\n\nexport const hasUtf16BOM = (bytes: Uint8Array) =>\n hasUtf16BigEndianBOM(bytes) || hasUtf16LittleEndianBOM(bytes);\n","export const toCharCode = (character: string) => character.charCodeAt(0);\n\nexport const toCodePoint = (character: string) => character.codePointAt(0);\n\nexport const toHexStringOfMinLength = (num: number, minLength: number) =>\n padStart(num.toString(16), minLength, '0').toUpperCase();\n\nexport const toHexString = (num: number) => toHexStringOfMinLength(num, 2);\n\nexport const charFromCode = (code: number) => String.fromCharCode(code);\n\nexport const charFromHexCode = (hex: string) => charFromCode(parseInt(hex, 16));\n\nexport const padStart = (value: string, length: number, padChar: string) => {\n let padding = '';\n for (let idx = 0, len = length - value.length; idx < len; idx++) {\n padding += padChar;\n }\n return padding + value;\n};\n\nexport const copyStringIntoBuffer = (\n str: string,\n buffer: Uint8Array,\n offset: number,\n): number => {\n const length = str.length;\n for (let idx = 0; idx < length; idx++) {\n buffer[offset++] = str.charCodeAt(idx);\n }\n return length;\n};\n\nexport const addRandomSuffix = (prefix: string, suffixLength = 4) =>\n `${prefix}-${Math.floor(Math.random() * 10 ** suffixLength)}`;\n\nexport const escapeRegExp = (str: string) =>\n str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\nexport const cleanText = (text: string) =>\n text.replace(/\\t|\\u0085|\\u2028|\\u2029/g, ' ').replace(/[\\b\\v]/g, '');\n\nexport const escapedNewlineChars = ['\\\\n', '\\\\f', '\\\\r', '\\\\u000B'];\n\nexport const newlineChars = ['\\n', '\\f', '\\r', '\\u000B'];\n\nexport const isNewlineChar = (text: string) => /^[\\n\\f\\r\\u000B]$/.test(text);\n\nexport const lineSplit = (text: string) => text.split(/[\\n\\f\\r\\u000B]/);\n\nexport const mergeLines = (text: string) =>\n text.replace(/[\\n\\f\\r\\u000B]/g, ' ');\n\n// JavaScript's String.charAt() method doesn work on strings containing UTF-16\n// characters (with high and low surrogate pairs), such as 💩 (poo emoji). This\n// `charAtIndex()` function does.\n//\n// Credit: https://github.com/mathiasbynens/String.prototype.at/blob/master/at.js#L14-L48\nexport const charAtIndex = (text: string, index: number): [string, number] => {\n // Get the first code unit and code unit value\n const cuFirst = text.charCodeAt(index);\n let cuSecond: number;\n const nextIndex = index + 1;\n let length = 1;\n if (\n // Check if it's the start of a surrogate pair.\n cuFirst >= 0xd800 &&\n cuFirst <= 0xdbff && // high surrogate\n text.length > nextIndex // there is a next code unit\n ) {\n cuSecond = text.charCodeAt(nextIndex);\n if (cuSecond >= 0xdc00 && cuSecond <= 0xdfff) length = 2; // low surrogate\n }\n return [text.slice(index, index + length), length];\n};\n\nexport const charSplit = (text: string) => {\n const chars: string[] = [];\n\n for (let idx = 0, len = text.length; idx < len; ) {\n const [c, cLen] = charAtIndex(text, idx);\n chars.push(c);\n idx += cLen;\n }\n\n return chars;\n};\n\nconst buildWordBreakRegex = (wordBreaks: string[]) => {\n const newlineCharUnion = escapedNewlineChars.join('|');\n\n const escapedRules: string[] = ['$'];\n for (let idx = 0, len = wordBreaks.length; idx < len; idx++) {\n const wordBreak = wordBreaks[idx];\n if (isNewlineChar(wordBreak)) {\n throw new TypeError(`\\`wordBreak\\` must not include ${newlineCharUnion}`);\n }\n escapedRules.push(wordBreak === '' ? '.' : escapeRegExp(wordBreak));\n }\n\n const breakRules = escapedRules.join('|');\n return new RegExp(`(${newlineCharUnion})|((.*?)(${breakRules}))`, 'gm');\n};\n\nexport const breakTextIntoLines = (\n text: string,\n wordBreaks: string[],\n maxWidth: number,\n computeWidthOfText: (t: string) => number,\n): string[] => {\n const regex = buildWordBreakRegex(wordBreaks);\n\n const words = cleanText(text).match(regex)!;\n\n let currLine = '';\n let currWidth = 0;\n const lines: string[] = [];\n\n const pushCurrLine = () => {\n if (currLine !== '') lines.push(currLine);\n currLine = '';\n currWidth = 0;\n };\n\n for (let idx = 0, len = words.length; idx < len; idx++) {\n const word = words[idx];\n if (isNewlineChar(word)) {\n pushCurrLine();\n } else {\n const width = computeWidthOfText(word);\n if (currWidth + width > maxWidth) pushCurrLine();\n currLine += word;\n currWidth += width;\n }\n }\n pushCurrLine();\n\n return lines;\n};\n\n// See section \"7.9.4 Dates\" of the PDF specification\nconst dateRegex = /^D:(\\d\\d\\d\\d)(\\d\\d)?(\\d\\d)?(\\d\\d)?(\\d\\d)?(\\d\\d)?([+\\-Z])?(\\d\\d)?'?(\\d\\d)?'?$/;\n\nexport const parseDate = (dateStr: string): Date | undefined => {\n const match = dateStr.match(dateRegex);\n\n if (!match) return undefined;\n\n const [\n ,\n year,\n month = '01',\n day = '01',\n hours = '00',\n mins = '00',\n secs = '00',\n offsetSign = 'Z',\n offsetHours = '00',\n offsetMins = '00',\n ] = match;\n\n // http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15\n const tzOffset =\n offsetSign === 'Z' ? 'Z' : `${offsetSign}${offsetHours}:${offsetMins}`;\n const date = new Date(\n `${year}-${month}-${day}T${hours}:${mins}:${secs}${tzOffset}`,\n );\n\n return date;\n};\n\nexport const findLastMatch = (value: string, regex: RegExp) => {\n let position = 0;\n let lastMatch: RegExpMatchArray | undefined;\n while (position < value.length) {\n const match = value.substring(position).match(regex);\n if (!match) return { match: lastMatch, pos: position };\n lastMatch = match;\n position += (match.index ?? 0) + match[0].length;\n }\n return { match: lastMatch, pos: position };\n};\n","import { decodeFromBase64DataUri } from 'src/utils/base64';\nimport { charFromCode } from 'src/utils/strings';\n\nexport const last = (array: T[]): T => array[array.length - 1];\n\n// export const dropLast = (array: T[]): T[] =>\n// array.slice(0, array.length - 1);\n\nexport const typedArrayFor = (value: string | Uint8Array): Uint8Array => {\n if (value instanceof Uint8Array) return value;\n const length = value.length;\n const typedArray = new Uint8Array(length);\n for (let idx = 0; idx < length; idx++) {\n typedArray[idx] = value.charCodeAt(idx);\n }\n return typedArray;\n};\n\nexport const mergeIntoTypedArray = (...arrays: (string | Uint8Array)[]) => {\n const arrayCount = arrays.length;\n\n const typedArrays: Uint8Array[] = [];\n for (let idx = 0; idx < arrayCount; idx++) {\n const element = arrays[idx];\n typedArrays[idx] =\n element instanceof Uint8Array ? element : typedArrayFor(element);\n }\n\n let totalSize = 0;\n for (let idx = 0; idx < arrayCount; idx++) {\n totalSize += arrays[idx].length;\n }\n\n const merged = new Uint8Array(totalSize);\n let offset = 0;\n for (let arrIdx = 0; arrIdx < arrayCount; arrIdx++) {\n const arr = typedArrays[arrIdx];\n for (let byteIdx = 0, arrLen = arr.length; byteIdx < arrLen; byteIdx++) {\n merged[offset++] = arr[byteIdx];\n }\n }\n\n return merged;\n};\n\nexport const mergeUint8Arrays = (arrays: Uint8Array[]): Uint8Array => {\n let totalSize = 0;\n for (let idx = 0, len = arrays.length; idx < len; idx++) {\n totalSize += arrays[idx].length;\n }\n\n const mergedBuffer = new Uint8Array(totalSize);\n let offset = 0;\n for (let idx = 0, len = arrays.length; idx < len; idx++) {\n const array = arrays[idx];\n mergedBuffer.set(array, offset);\n offset += array.length;\n }\n\n return mergedBuffer;\n};\n\nexport const arrayAsString = (array: Uint8Array | number[]): string => {\n let str = '';\n for (let idx = 0, len = array.length; idx < len; idx++) {\n str += charFromCode(array[idx]);\n }\n return str;\n};\n\nexport const byAscendingId = (a: T, b: T) => a.id - b.id;\n\nexport const sortedUniq = (array: T[], indexer: (elem: T) => any): T[] => {\n const uniq: T[] = [];\n\n for (let idx = 0, len = array.length; idx < len; idx++) {\n const curr = array[idx];\n const prev = array[idx - 1];\n if (idx === 0 || indexer(curr) !== indexer(prev)) {\n uniq.push(curr);\n }\n }\n\n return uniq;\n};\n\n// Arrays and TypedArrays in JS both have .reverse() methods, which would seem\n// to negate the need for this function. However, not all runtimes support this\n// method (e.g. React Native). This function compensates for that fact.\nexport const reverseArray = (array: Uint8Array) => {\n const arrayLen = array.length;\n for (let idx = 0, len = Math.floor(arrayLen / 2); idx < len; idx++) {\n const leftIdx = idx;\n const rightIdx = arrayLen - idx - 1;\n const temp = array[idx];\n\n array[leftIdx] = array[rightIdx];\n array[rightIdx] = temp;\n }\n return array;\n};\n\nexport const sum = (array: number[] | Uint8Array): number => {\n let total = 0;\n for (let idx = 0, len = array.length; idx < len; idx++) {\n total += array[idx];\n }\n return total;\n};\n\nexport const range = (start: number, end: number): number[] => {\n const arr = new Array(end - start);\n for (let idx = 0, len = arr.length; idx < len; idx++) {\n arr[idx] = start + idx;\n }\n return arr;\n};\n\nexport const pluckIndices = (arr: T[], indices: number[]) => {\n const plucked = new Array(indices.length);\n for (let idx = 0, len = indices.length; idx < len; idx++) {\n plucked[idx] = arr[indices[idx]];\n }\n return plucked;\n};\n\nexport const canBeConvertedToUint8Array = (\n input: any,\n): input is string | ArrayBuffer | Uint8Array =>\n input instanceof Uint8Array ||\n input instanceof ArrayBuffer ||\n typeof input === 'string';\n\nexport const toUint8Array = (input: string | ArrayBuffer | Uint8Array) => {\n if (typeof input === 'string') {\n return decodeFromBase64DataUri(input);\n } else if (input instanceof ArrayBuffer) {\n return new Uint8Array(input);\n } else if (input instanceof Uint8Array) {\n return input;\n } else {\n throw new TypeError(\n '`input` must be one of `string | ArrayBuffer | Uint8Array`',\n );\n }\n};\n","/**\n * Returns a Promise that resolves after at least one tick of the\n * Macro Task Queue occurs.\n */\nexport const waitForTick = (): Promise =>\n new Promise((resolve) => {\n setTimeout(() => resolve(), 0);\n });\n","/*\n * The `chars`, `lookup`, and `decodeFromBase64` members of this file are\n * licensed under the following:\n *\n * base64-arraybuffer\n * https://github.com/niklasvh/base64-arraybuffer\n *\n * Copyright (c) 2012 Niklas von Hertzen\n * Licensed under the MIT license.\n *\n */\nimport pako from 'pako';\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nexport var decodeFromBase64 = function (base64) {\n var bufferLength = base64.length * 0.75;\n var len = base64.length;\n var i;\n var p = 0;\n var encoded1;\n var encoded2;\n var encoded3;\n var encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n var bytes = new Uint8Array(bufferLength);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return bytes;\n};\nvar arrayToString = function (array) {\n var str = '';\n for (var i = 0; i < array.length; i++) {\n str += String.fromCharCode(array[i]);\n }\n return str;\n};\nexport var decompressJson = function (compressedJson) {\n return arrayToString(pako.inflate(decodeFromBase64(compressedJson)));\n};\nexport var padStart = function (value, length, padChar) {\n var padding = '';\n for (var idx = 0, len = length - value.length; idx < len; idx++) {\n padding += padChar;\n }\n return padding + value;\n};\n","// tslint:disable radix\n\n/**\n * Converts a number to its string representation in decimal. This function\n * differs from simply converting a number to a string with `.toString()`\n * because this function's output string will **not** contain exponential\n * notation.\n *\n * Credit: https://stackoverflow.com/a/46545519\n */\nexport const numberToString = (num: number) => {\n let numStr = String(num);\n\n if (Math.abs(num) < 1.0) {\n const e = parseInt(num.toString().split('e-')[1]);\n if (e) {\n const negative = num < 0;\n if (negative) num *= -1;\n num *= Math.pow(10, e - 1);\n numStr = '0.' + new Array(e).join('0') + num.toString().substring(2);\n if (negative) numStr = '-' + numStr;\n }\n } else {\n let e = parseInt(num.toString().split('+')[1]);\n if (e > 20) {\n e -= 20;\n num /= Math.pow(10, e);\n numStr = num.toString() + new Array(e + 1).join('0');\n }\n }\n\n return numStr;\n};\n\nexport const sizeInBytes = (n: number) => Math.ceil(n.toString(2).length / 8);\n\n/**\n * Converts a number into its constituent bytes and returns them as\n * a number[].\n *\n * Returns most significant byte as first element in array. It may be necessary\n * to call .reverse() to get the bits in the desired order.\n *\n * Example:\n * bytesFor(0x02A41E) => [ 0b10, 0b10100100, 0b11110 ]\n *\n * Credit for algorithm: https://stackoverflow.com/a/1936865\n */\nexport const bytesFor = (n: number) => {\n const bytes = new Uint8Array(sizeInBytes(n));\n for (let i = 1; i <= bytes.length; i++) {\n bytes[i - 1] = n >> ((bytes.length - i) * 8);\n }\n return bytes;\n};\n","export const error = (msg: string) => {\n throw new Error(msg);\n};\n","import { decompressJson } from './utils';\nimport CourierBoldCompressed from './Courier-Bold.compressed.json';\nimport CourierBoldObliqueCompressed from './Courier-BoldOblique.compressed.json';\nimport CourierObliqueCompressed from './Courier-Oblique.compressed.json';\nimport CourierCompressed from './Courier.compressed.json';\nimport HelveticaBoldCompressed from './Helvetica-Bold.compressed.json';\nimport HelveticaBoldObliqueCompressed from './Helvetica-BoldOblique.compressed.json';\nimport HelveticaObliqueCompressed from './Helvetica-Oblique.compressed.json';\nimport HelveticaCompressed from './Helvetica.compressed.json';\nimport TimesBoldCompressed from './Times-Bold.compressed.json';\nimport TimesBoldItalicCompressed from './Times-BoldItalic.compressed.json';\nimport TimesItalicCompressed from './Times-Italic.compressed.json';\nimport TimesRomanCompressed from './Times-Roman.compressed.json';\nimport SymbolCompressed from './Symbol.compressed.json';\nimport ZapfDingbatsCompressed from './ZapfDingbats.compressed.json';\n// prettier-ignore\nvar compressedJsonForFontName = {\n 'Courier': CourierCompressed,\n 'Courier-Bold': CourierBoldCompressed,\n 'Courier-Oblique': CourierObliqueCompressed,\n 'Courier-BoldOblique': CourierBoldObliqueCompressed,\n 'Helvetica': HelveticaCompressed,\n 'Helvetica-Bold': HelveticaBoldCompressed,\n 'Helvetica-Oblique': HelveticaObliqueCompressed,\n 'Helvetica-BoldOblique': HelveticaBoldObliqueCompressed,\n 'Times-Roman': TimesRomanCompressed,\n 'Times-Bold': TimesBoldCompressed,\n 'Times-Italic': TimesItalicCompressed,\n 'Times-BoldItalic': TimesBoldItalicCompressed,\n 'Symbol': SymbolCompressed,\n 'ZapfDingbats': ZapfDingbatsCompressed,\n};\nexport var FontNames;\n(function (FontNames) {\n FontNames[\"Courier\"] = \"Courier\";\n FontNames[\"CourierBold\"] = \"Courier-Bold\";\n FontNames[\"CourierOblique\"] = \"Courier-Oblique\";\n FontNames[\"CourierBoldOblique\"] = \"Courier-BoldOblique\";\n FontNames[\"Helvetica\"] = \"Helvetica\";\n FontNames[\"HelveticaBold\"] = \"Helvetica-Bold\";\n FontNames[\"HelveticaOblique\"] = \"Helvetica-Oblique\";\n FontNames[\"HelveticaBoldOblique\"] = \"Helvetica-BoldOblique\";\n FontNames[\"TimesRoman\"] = \"Times-Roman\";\n FontNames[\"TimesRomanBold\"] = \"Times-Bold\";\n FontNames[\"TimesRomanItalic\"] = \"Times-Italic\";\n FontNames[\"TimesRomanBoldItalic\"] = \"Times-BoldItalic\";\n FontNames[\"Symbol\"] = \"Symbol\";\n FontNames[\"ZapfDingbats\"] = \"ZapfDingbats\";\n})(FontNames || (FontNames = {}));\nvar fontCache = {};\nvar Font = /** @class */ (function () {\n function Font() {\n var _this = this;\n this.getWidthOfGlyph = function (glyphName) {\n return _this.CharWidths[glyphName];\n };\n this.getXAxisKerningForPair = function (leftGlyphName, rightGlyphName) {\n return (_this.KernPairXAmounts[leftGlyphName] || {})[rightGlyphName];\n };\n }\n Font.load = function (fontName) {\n var cachedFont = fontCache[fontName];\n if (cachedFont)\n return cachedFont;\n var json = decompressJson(compressedJsonForFontName[fontName]);\n var font = Object.assign(new Font(), JSON.parse(json));\n font.CharWidths = font.CharMetrics.reduce(function (acc, metric) {\n acc[metric.N] = metric.WX;\n return acc;\n }, {});\n font.KernPairXAmounts = font.KernPairs.reduce(function (acc, _a) {\n var name1 = _a[0], name2 = _a[1], width = _a[2];\n if (!acc[name1])\n acc[name1] = {};\n acc[name1][name2] = width;\n return acc;\n }, {});\n fontCache[fontName] = font;\n return font;\n };\n return Font;\n}());\nexport { Font };\n","import { toCharCode } from 'src/utils/strings';\n\n// Mapping from PDFDocEncoding to Unicode code point\nconst pdfDocEncodingToUnicode = new Uint16Array(256);\n\n// Initialize the code points which are the same\nfor (let idx = 0; idx < 256; idx++) {\n pdfDocEncodingToUnicode[idx] = idx;\n}\n\n// Set differences (see \"Table D.2 – PDFDocEncoding Character Set\" of the PDF spec)\npdfDocEncodingToUnicode[0x16] = toCharCode('\\u0017'); // SYNCRONOUS IDLE\npdfDocEncodingToUnicode[0x18] = toCharCode('\\u02D8'); // BREVE\npdfDocEncodingToUnicode[0x19] = toCharCode('\\u02C7'); // CARON\npdfDocEncodingToUnicode[0x1a] = toCharCode('\\u02C6'); // MODIFIER LETTER CIRCUMFLEX ACCENT\npdfDocEncodingToUnicode[0x1b] = toCharCode('\\u02D9'); // DOT ABOVE\npdfDocEncodingToUnicode[0x1c] = toCharCode('\\u02DD'); // DOUBLE ACUTE ACCENT\npdfDocEncodingToUnicode[0x1d] = toCharCode('\\u02DB'); // OGONEK\npdfDocEncodingToUnicode[0x1e] = toCharCode('\\u02DA'); // RING ABOVE\npdfDocEncodingToUnicode[0x1f] = toCharCode('\\u02DC'); // SMALL TILDE\npdfDocEncodingToUnicode[0x7f] = toCharCode('\\uFFFD'); // REPLACEMENT CHARACTER (box with questionmark)\npdfDocEncodingToUnicode[0x80] = toCharCode('\\u2022'); // BULLET\npdfDocEncodingToUnicode[0x81] = toCharCode('\\u2020'); // DAGGER\npdfDocEncodingToUnicode[0x82] = toCharCode('\\u2021'); // DOUBLE DAGGER\npdfDocEncodingToUnicode[0x83] = toCharCode('\\u2026'); // HORIZONTAL ELLIPSIS\npdfDocEncodingToUnicode[0x84] = toCharCode('\\u2014'); // EM DASH\npdfDocEncodingToUnicode[0x85] = toCharCode('\\u2013'); // EN DASH\npdfDocEncodingToUnicode[0x86] = toCharCode('\\u0192'); // LATIN SMALL LETTER SCRIPT F\npdfDocEncodingToUnicode[0x87] = toCharCode('\\u2044'); // FRACTION SLASH (solidus)\npdfDocEncodingToUnicode[0x88] = toCharCode('\\u2039'); // SINGLE LEFT-POINTING ANGLE QUOTATION MARK\npdfDocEncodingToUnicode[0x89] = toCharCode('\\u203A'); // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK\npdfDocEncodingToUnicode[0x8a] = toCharCode('\\u2212'); // MINUS SIGN\npdfDocEncodingToUnicode[0x8b] = toCharCode('\\u2030'); // PER MILLE SIGN\npdfDocEncodingToUnicode[0x8c] = toCharCode('\\u201E'); // DOUBLE LOW-9 QUOTATION MARK (quotedblbase)\npdfDocEncodingToUnicode[0x8d] = toCharCode('\\u201C'); // LEFT DOUBLE QUOTATION MARK (quotedblleft)\npdfDocEncodingToUnicode[0x8e] = toCharCode('\\u201D'); // RIGHT DOUBLE QUOTATION MARK (quotedblright)\npdfDocEncodingToUnicode[0x8f] = toCharCode('\\u2018'); // LEFT SINGLE QUOTATION MARK (quoteleft)\npdfDocEncodingToUnicode[0x90] = toCharCode('\\u2019'); // RIGHT SINGLE QUOTATION MARK (quoteright)\npdfDocEncodingToUnicode[0x91] = toCharCode('\\u201A'); // SINGLE LOW-9 QUOTATION MARK (quotesinglbase)\npdfDocEncodingToUnicode[0x92] = toCharCode('\\u2122'); // TRADE MARK SIGN\npdfDocEncodingToUnicode[0x93] = toCharCode('\\uFB01'); // LATIN SMALL LIGATURE FI\npdfDocEncodingToUnicode[0x94] = toCharCode('\\uFB02'); // LATIN SMALL LIGATURE FL\npdfDocEncodingToUnicode[0x95] = toCharCode('\\u0141'); // LATIN CAPITAL LETTER L WITH STROKE\npdfDocEncodingToUnicode[0x96] = toCharCode('\\u0152'); // LATIN CAPITAL LIGATURE OE\npdfDocEncodingToUnicode[0x97] = toCharCode('\\u0160'); // LATIN CAPITAL LETTER S WITH CARON\npdfDocEncodingToUnicode[0x98] = toCharCode('\\u0178'); // LATIN CAPITAL LETTER Y WITH DIAERESIS\npdfDocEncodingToUnicode[0x99] = toCharCode('\\u017D'); // LATIN CAPITAL LETTER Z WITH CARON\npdfDocEncodingToUnicode[0x9a] = toCharCode('\\u0131'); // LATIN SMALL LETTER DOTLESS I\npdfDocEncodingToUnicode[0x9b] = toCharCode('\\u0142'); // LATIN SMALL LETTER L WITH STROKE\npdfDocEncodingToUnicode[0x9c] = toCharCode('\\u0153'); // LATIN SMALL LIGATURE OE\npdfDocEncodingToUnicode[0x9d] = toCharCode('\\u0161'); // LATIN SMALL LETTER S WITH CARON\npdfDocEncodingToUnicode[0x9e] = toCharCode('\\u017E'); // LATIN SMALL LETTER Z WITH CARON\npdfDocEncodingToUnicode[0x9f] = toCharCode('\\uFFFD'); // REPLACEMENT CHARACTER (box with questionmark)\npdfDocEncodingToUnicode[0xa0] = toCharCode('\\u20AC'); // EURO SIGN\npdfDocEncodingToUnicode[0xad] = toCharCode('\\uFFFD'); // REPLACEMENT CHARACTER (box with questionmark)\n\n/**\n * Decode a byte array into a string using PDFDocEncoding.\n *\n * @param bytes a byte array (decimal representation) containing a string\n * encoded with PDFDocEncoding.\n */\nexport const pdfDocEncodingDecode = (bytes: Uint8Array): string => {\n const codePoints = new Array(bytes.length);\n for (let idx = 0, len = bytes.length; idx < len; idx++) {\n codePoints[idx] = pdfDocEncodingToUnicode[bytes[idx]];\n }\n return String.fromCodePoint(...codePoints);\n};\n","/* tslint:disable max-classes-per-file */\nimport { decompressJson, padStart } from './utils';\nimport AllEncodingsCompressed from './all-encodings.compressed.json';\nvar decompressedEncodings = decompressJson(AllEncodingsCompressed);\nvar allUnicodeMappings = JSON.parse(decompressedEncodings);\nvar Encoding = /** @class */ (function () {\n function Encoding(name, unicodeMappings) {\n var _this = this;\n this.canEncodeUnicodeCodePoint = function (codePoint) {\n return codePoint in _this.unicodeMappings;\n };\n this.encodeUnicodeCodePoint = function (codePoint) {\n var mapped = _this.unicodeMappings[codePoint];\n if (!mapped) {\n var str = String.fromCharCode(codePoint);\n var hexCode = \"0x\" + padStart(codePoint.toString(16), 4, '0');\n var msg = _this.name + \" cannot encode \\\"\" + str + \"\\\" (\" + hexCode + \")\";\n throw new Error(msg);\n }\n return { code: mapped[0], name: mapped[1] };\n };\n this.name = name;\n this.supportedCodePoints = Object.keys(unicodeMappings)\n .map(Number)\n .sort(function (a, b) { return a - b; });\n this.unicodeMappings = unicodeMappings;\n }\n return Encoding;\n}());\nexport var Encodings = {\n Symbol: new Encoding('Symbol', allUnicodeMappings.symbol),\n ZapfDingbats: new Encoding('ZapfDingbats', allUnicodeMappings.zapfdingbats),\n WinAnsi: new Encoding('WinAnsi', allUnicodeMappings.win1252),\n};\n","import { FontNames } from '@pdf-lib/standard-fonts';\n\nexport const values = (obj: any) => Object.keys(obj).map((k) => obj[k]);\n\nexport const StandardFontValues = values(FontNames);\n\nexport const isStandardFont = (input: any): input is FontNames =>\n StandardFontValues.includes(input);\n\nexport const rectanglesAreEqual = (\n a: { x: number; y: number; width: number; height: number },\n b: { x: number; y: number; width: number; height: number },\n) => a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n","/* tslint:disable:ban-types */\n\nimport { values as objectValues } from 'src/utils/objects';\n\nexport const backtick = (val: any) => `\\`${val}\\``;\nexport const singleQuote = (val: any) => `'${val}'`;\n\ntype Primitive = string | number | boolean | undefined | null;\n\n// prettier-ignore\nconst formatValue = (value: any) => {\n const type = typeof value;\n if (type ==='string') return singleQuote(value);\n else if (type ==='undefined') return backtick(value);\n else return value;\n};\n\nexport const createValueErrorMsg = (\n value: any,\n valueName: string,\n values: Primitive[],\n) => {\n const allowedValues = new Array(values.length);\n\n for (let idx = 0, len = values.length; idx < len; idx++) {\n const v = values[idx];\n allowedValues[idx] = formatValue(v);\n }\n\n const joinedValues = allowedValues.join(' or ');\n\n // prettier-ignore\n return `${backtick(valueName)} must be one of ${joinedValues}, but was actually ${formatValue(value)}`;\n};\n\nexport const assertIsOneOf = (\n value: any,\n valueName: string,\n allowedValues: Primitive[] | { [key: string]: Primitive },\n) => {\n if (!Array.isArray(allowedValues)) {\n allowedValues = objectValues(allowedValues);\n }\n for (let idx = 0, len = allowedValues.length; idx < len; idx++) {\n if (value === allowedValues[idx]) return;\n }\n throw new TypeError(createValueErrorMsg(value, valueName, allowedValues));\n};\n\nexport const assertIsOneOfOrUndefined = (\n value: any,\n valueName: string,\n allowedValues: Primitive[] | { [key: string]: Primitive },\n) => {\n if (!Array.isArray(allowedValues)) {\n allowedValues = objectValues(allowedValues);\n }\n assertIsOneOf(value, valueName, allowedValues.concat(undefined));\n};\n\nexport const assertIsSubset = (\n values: any[],\n valueName: string,\n allowedValues: Primitive[] | { [key: string]: Primitive },\n) => {\n if (!Array.isArray(allowedValues)) {\n allowedValues = objectValues(allowedValues);\n }\n for (let idx = 0, len = values.length; idx < len; idx++) {\n assertIsOneOf(values[idx], valueName, allowedValues);\n }\n};\n\nexport const getType = (val: any) => {\n if (val === null) return 'null';\n if (val === undefined) return 'undefined';\n if (typeof val === 'string') return 'string';\n if (isNaN(val)) return 'NaN';\n if (typeof val === 'number') return 'number';\n if (typeof val === 'boolean') return 'boolean';\n if (typeof val === 'symbol') return 'symbol';\n if (typeof val === 'bigint') return 'bigint';\n if (val.constructor && val.constructor.name) return val.constructor.name;\n if (val.name) return val.name;\n if (val.constructor) return String(val.constructor);\n return String(val);\n};\n\nexport type TypeDescriptor =\n | 'null'\n | 'undefined'\n | 'string'\n | 'number'\n | 'boolean'\n | 'symbol'\n | 'bigint'\n | DateConstructor\n | ArrayConstructor\n | Uint8ArrayConstructor\n | ArrayBufferConstructor\n | FunctionConstructor\n | [Function, string];\n\nexport const isType = (value: any, type: TypeDescriptor) => {\n if (type === 'null') return value === null;\n if (type === 'undefined') return value === undefined;\n if (type === 'string') return typeof value === 'string';\n if (type === 'number') return typeof value === 'number' && !isNaN(value);\n if (type === 'boolean') return typeof value === 'boolean';\n if (type === 'symbol') return typeof value === 'symbol';\n if (type === 'bigint') return typeof value === 'bigint';\n if (type === Date) return value instanceof Date;\n if (type === Array) return value instanceof Array;\n if (type === Uint8Array) return value instanceof Uint8Array;\n if (type === ArrayBuffer) return value instanceof ArrayBuffer;\n if (type === Function) return value instanceof Function;\n return value instanceof (type as [Function, string])[0];\n};\n\nexport const createTypeErrorMsg = (\n value: any,\n valueName: string,\n types: TypeDescriptor[],\n) => {\n const allowedTypes = new Array(types.length);\n\n for (let idx = 0, len = types.length; idx < len; idx++) {\n const type = types[idx];\n if (type === 'null') allowedTypes[idx] = backtick('null');\n if (type === 'undefined') allowedTypes[idx] = backtick('undefined');\n if (type === 'string') allowedTypes[idx] = backtick('string');\n else if (type === 'number') allowedTypes[idx] = backtick('number');\n else if (type === 'boolean') allowedTypes[idx] = backtick('boolean');\n else if (type === 'symbol') allowedTypes[idx] = backtick('symbol');\n else if (type === 'bigint') allowedTypes[idx] = backtick('bigint');\n else if (type === Array) allowedTypes[idx] = backtick('Array');\n else if (type === Uint8Array) allowedTypes[idx] = backtick('Uint8Array');\n else if (type === ArrayBuffer) allowedTypes[idx] = backtick('ArrayBuffer');\n else allowedTypes[idx] = backtick((type as [Function, string])[1]);\n }\n\n const joinedTypes = allowedTypes.join(' or ');\n\n // prettier-ignore\n return `${backtick(valueName)} must be of type ${joinedTypes}, but was actually of type ${backtick(getType(value))}`;\n};\n\nexport const assertIs = (\n value: any,\n valueName: string,\n types: TypeDescriptor[],\n) => {\n for (let idx = 0, len = types.length; idx < len; idx++) {\n if (isType(value, types[idx])) return;\n }\n throw new TypeError(createTypeErrorMsg(value, valueName, types));\n};\n\nexport const assertOrUndefined = (\n value: any,\n valueName: string,\n types: TypeDescriptor[],\n) => {\n assertIs(value, valueName, types.concat('undefined'));\n};\n\nexport const assertEachIs = (\n values: any[],\n valueName: string,\n types: TypeDescriptor[],\n) => {\n for (let idx = 0, len = values.length; idx < len; idx++) {\n assertIs(values[idx], valueName, types);\n }\n};\n\nexport const assertRange = (\n value: any,\n valueName: string,\n min: number,\n max: number,\n) => {\n assertIs(value, valueName, ['number']);\n assertIs(min, 'min', ['number']);\n assertIs(max, 'max', ['number']);\n max = Math.max(min, max);\n if (value < min || value > max) {\n // prettier-ignore\n throw new Error(`${backtick(valueName)} must be at least ${min} and at most ${max}, but was actually ${value}`);\n }\n};\n\nexport const assertRangeOrUndefined = (\n value: any,\n valueName: string,\n min: number,\n max: number,\n) => {\n assertIs(value, valueName, ['number', 'undefined']);\n if (typeof value === 'number') assertRange(value, valueName, min, max);\n};\n\nexport const assertMultiple = (\n value: any,\n valueName: string,\n multiplier: number,\n) => {\n assertIs(value, valueName, ['number']);\n if (value % multiplier !== 0) {\n // prettier-ignore\n throw new Error(`${backtick(valueName)} must be a multiple of ${multiplier}, but was actually ${value}`);\n }\n};\n\nexport const assertInteger = (value: any, valueName: string) => {\n if (!Number.isInteger(value)) {\n throw new Error(\n `${backtick(valueName)} must be an integer, but was actually ${value}`,\n );\n }\n};\n\nexport const assertPositive = (value: number, valueName: string) => {\n if (![1, 0].includes(Math.sign(value))) {\n // prettier-ignore\n throw new Error(`${backtick(valueName)} must be a positive number or 0, but was actually ${value}`);\n }\n};\n","class Cache {\n static readonly populatedBy = (populate: () => T) => new Cache(populate);\n\n private readonly populate: () => T;\n private value: T | undefined;\n\n private constructor(populate: () => T) {\n this.populate = populate;\n this.value = undefined;\n }\n\n getValue(): T | undefined {\n return this.value;\n }\n\n access(): T {\n if (!this.value) this.value = this.populate();\n return this.value;\n }\n\n invalidate(): void {\n this.value = undefined;\n }\n}\n\nexport default Cache;\n","// tslint:disable: max-classes-per-file\nimport PDFObject from 'src/core/objects/PDFObject';\nimport { arrayAsString } from 'src/utils';\n\nexport class MethodNotImplementedError extends Error {\n constructor(className: string, methodName: string) {\n const msg = `Method ${className}.${methodName}() not implemented`;\n super(msg);\n }\n}\n\nexport class PrivateConstructorError extends Error {\n constructor(className: string) {\n const msg = `Cannot construct ${className} - it has a private constructor`;\n super(msg);\n }\n}\n\nexport class UnexpectedObjectTypeError extends Error {\n constructor(expected: any | any[], actual: any) {\n const name = (t: any) => t?.name ?? t?.constructor?.name;\n\n const expectedTypes = Array.isArray(expected)\n ? expected.map(name)\n : [name(expected)];\n\n const msg =\n `Expected instance of ${expectedTypes.join(' or ')}, ` +\n `but got instance of ${actual ? name(actual) : actual}`;\n\n super(msg);\n }\n}\n\nexport class UnsupportedEncodingError extends Error {\n constructor(encoding: string) {\n const msg = `${encoding} stream encoding not supported`;\n super(msg);\n }\n}\n\nexport class ReparseError extends Error {\n constructor(className: string, methodName: string) {\n const msg = `Cannot call ${className}.${methodName}() more than once`;\n super(msg);\n }\n}\n\nexport class MissingCatalogError extends Error {\n constructor(ref?: PDFObject) {\n const msg = `Missing catalog (ref=${ref})`;\n super(msg);\n }\n}\n\nexport class MissingPageContentsEmbeddingError extends Error {\n constructor() {\n const msg = `Can't embed page with missing Contents`;\n super(msg);\n }\n}\n\nexport class UnrecognizedStreamTypeError extends Error {\n constructor(stream: any) {\n const streamType = stream?.contructor?.name ?? stream?.name ?? stream;\n const msg = `Unrecognized stream type: ${streamType}`;\n super(msg);\n }\n}\n\nexport class PageEmbeddingMismatchedContextError extends Error {\n constructor() {\n const msg = `Found mismatched contexts while embedding pages. All pages in the array passed to \\`PDFDocument.embedPages()\\` must be from the same document.`;\n super(msg);\n }\n}\n\nexport class PDFArrayIsNotRectangleError extends Error {\n constructor(size: number) {\n const msg = `Attempted to convert PDFArray with ${size} elements to rectangle, but must have exactly 4 elements.`;\n super(msg);\n }\n}\n\nexport class InvalidPDFDateStringError extends Error {\n constructor(value: string) {\n const msg = `Attempted to convert \"${value}\" to a date, but it does not match the PDF date string format.`;\n super(msg);\n }\n}\n\nexport class InvalidTargetIndexError extends Error {\n constructor(targetIndex: number, Count: number) {\n const msg = `Invalid targetIndex specified: targetIndex=${targetIndex} must be less than Count=${Count}`;\n super(msg);\n }\n}\n\nexport class CorruptPageTreeError extends Error {\n constructor(targetIndex: number, operation: string) {\n const msg = `Failed to ${operation} at targetIndex=${targetIndex} due to corrupt page tree: It is likely that one or more 'Count' entries are invalid`;\n super(msg);\n }\n}\n\nexport class IndexOutOfBoundsError extends Error {\n constructor(index: number, min: number, max: number) {\n const msg = `index should be at least ${min} and at most ${max}, but was actually ${index}`;\n super(msg);\n }\n}\n\nexport class InvalidAcroFieldValueError extends Error {\n constructor() {\n const msg = `Attempted to set invalid field value`;\n super(msg);\n }\n}\n\nexport class MultiSelectValueError extends Error {\n constructor() {\n const msg = `Attempted to select multiple values for single-select field`;\n super(msg);\n }\n}\n\nexport class MissingDAEntryError extends Error {\n constructor(fieldName: string) {\n const msg = `No /DA (default appearance) entry found for field: ${fieldName}`;\n super(msg);\n }\n}\n\nexport class MissingTfOperatorError extends Error {\n constructor(fieldName: string) {\n const msg = `No Tf operator found for DA of field: ${fieldName}`;\n super(msg);\n }\n}\n\n/***** Parser Errors ******/\n\nexport interface Position {\n line: number;\n column: number;\n offset: number;\n}\n\nexport class NumberParsingError extends Error {\n constructor(pos: Position, value: string) {\n const msg =\n `Failed to parse number ` +\n `(line:${pos.line} col:${pos.column} offset=${pos.offset}): \"${value}\"`;\n super(msg);\n }\n}\n\nexport class PDFParsingError extends Error {\n constructor(pos: Position, details: string) {\n const msg =\n `Failed to parse PDF document ` +\n `(line:${pos.line} col:${pos.column} offset=${pos.offset}): ${details}`;\n super(msg);\n }\n}\n\nexport class NextByteAssertionError extends PDFParsingError {\n constructor(pos: Position, expectedByte: number, actualByte: number) {\n const msg = `Expected next byte to be ${expectedByte} but it was actually ${actualByte}`;\n super(pos, msg);\n }\n}\n\nexport class PDFObjectParsingError extends PDFParsingError {\n constructor(pos: Position, byte: number) {\n const msg = `Failed to parse PDF object starting with the following byte: ${byte}`;\n super(pos, msg);\n }\n}\n\nexport class PDFInvalidObjectParsingError extends PDFParsingError {\n constructor(pos: Position) {\n const msg = `Failed to parse invalid PDF object`;\n super(pos, msg);\n }\n}\n\nexport class PDFStreamParsingError extends PDFParsingError {\n constructor(pos: Position) {\n const msg = `Failed to parse PDF stream`;\n super(pos, msg);\n }\n}\n\nexport class UnbalancedParenthesisError extends PDFParsingError {\n constructor(pos: Position) {\n const msg = `Failed to parse PDF literal string due to unbalanced parenthesis`;\n super(pos, msg);\n }\n}\n\nexport class StalledParserError extends PDFParsingError {\n constructor(pos: Position) {\n const msg = `Parser stalled`;\n super(pos, msg);\n }\n}\n\nexport class MissingPDFHeaderError extends PDFParsingError {\n constructor(pos: Position) {\n const msg = `No PDF header found`;\n super(pos, msg);\n }\n}\n\nexport class MissingKeywordError extends PDFParsingError {\n constructor(pos: Position, keyword: number[]) {\n const msg = `Did not find expected keyword '${arrayAsString(keyword)}'`;\n super(pos, msg);\n }\n}\n","enum CharCodes {\n Null = 0,\n Backspace = 8,\n Tab = 9,\n Newline = 10,\n FormFeed = 12,\n CarriageReturn = 13,\n Space = 32,\n ExclamationPoint = 33,\n Hash = 35,\n Percent = 37,\n LeftParen = 40,\n RightParen = 41,\n Plus = 43,\n Minus = 45,\n Dash = 45,\n Period = 46,\n ForwardSlash = 47,\n Zero = 48,\n One = 49,\n Two = 50,\n Three = 51,\n Four = 52,\n Five = 53,\n Six = 54,\n Seven = 55,\n Eight = 56,\n Nine = 57,\n LessThan = 60,\n GreaterThan = 62,\n A = 65,\n D = 68,\n E = 69,\n F = 70,\n O = 79,\n P = 80,\n R = 82,\n LeftSquareBracket = 91,\n BackSlash = 92,\n RightSquareBracket = 93,\n a = 97,\n b = 98,\n d = 100,\n e = 101,\n f = 102,\n i = 105,\n j = 106,\n l = 108,\n m = 109,\n n = 110,\n o = 111,\n r = 114,\n s = 115,\n t = 116,\n u = 117,\n x = 120,\n LeftCurly = 123,\n RightCurly = 125,\n Tilde = 126,\n}\n\nexport default CharCodes;\n","import CharCodes from 'src/core/syntax/CharCodes';\nimport { charFromCode, copyStringIntoBuffer } from 'src/utils';\n\nclass PDFHeader {\n static forVersion = (major: number, minor: number) =>\n new PDFHeader(major, minor);\n\n private readonly major: string;\n private readonly minor: string;\n\n private constructor(major: number, minor: number) {\n this.major = String(major);\n this.minor = String(minor);\n }\n\n toString(): string {\n const bc = charFromCode(129);\n return `%PDF-${this.major}.${this.minor}\\n%${bc}${bc}${bc}${bc}`;\n }\n\n sizeInBytes(): number {\n return 12 + this.major.length + this.minor.length;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n buffer[offset++] = CharCodes.Percent;\n buffer[offset++] = CharCodes.P;\n buffer[offset++] = CharCodes.D;\n buffer[offset++] = CharCodes.F;\n buffer[offset++] = CharCodes.Dash;\n\n offset += copyStringIntoBuffer(this.major, buffer, offset);\n buffer[offset++] = CharCodes.Period;\n offset += copyStringIntoBuffer(this.minor, buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n\n buffer[offset++] = CharCodes.Percent;\n buffer[offset++] = 129;\n buffer[offset++] = 129;\n buffer[offset++] = 129;\n buffer[offset++] = 129;\n\n return offset - initialOffset;\n }\n}\n\nexport default PDFHeader;\n","import { MethodNotImplementedError } from 'src/core/errors';\nimport PDFContext from 'src/core/PDFContext';\n\nclass PDFObject {\n clone(_context?: PDFContext): PDFObject {\n throw new MethodNotImplementedError(this.constructor.name, 'clone');\n }\n\n toString(): string {\n throw new MethodNotImplementedError(this.constructor.name, 'toString');\n }\n\n sizeInBytes(): number {\n throw new MethodNotImplementedError(this.constructor.name, 'sizeInBytes');\n }\n\n copyBytesInto(_buffer: Uint8Array, _offset: number): number {\n throw new MethodNotImplementedError(this.constructor.name, 'copyBytesInto');\n }\n}\n\nexport default PDFObject;\n","import { copyStringIntoBuffer, numberToString } from 'src/utils/index';\n\nimport PDFObject from 'src/core/objects/PDFObject';\n\nclass PDFNumber extends PDFObject {\n static of = (value: number) => new PDFNumber(value);\n\n private readonly numberValue: number;\n private readonly stringValue: string;\n\n private constructor(value: number) {\n super();\n this.numberValue = value;\n this.stringValue = numberToString(value);\n }\n\n asNumber(): number {\n return this.numberValue;\n }\n\n /** @deprecated in favor of [[PDFNumber.asNumber]] */\n value(): number {\n return this.numberValue;\n }\n\n clone(): PDFNumber {\n return PDFNumber.of(this.numberValue);\n }\n\n toString(): string {\n return this.stringValue;\n }\n\n sizeInBytes(): number {\n return this.stringValue.length;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n offset += copyStringIntoBuffer(this.stringValue, buffer, offset);\n return this.stringValue.length;\n }\n}\n\nexport default PDFNumber;\n","import PDFBool from 'src/core/objects/PDFBool';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNull from 'src/core/objects/PDFNull';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFContext from 'src/core/PDFContext';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { PDFArrayIsNotRectangleError } from 'src/core/errors';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\n\nclass PDFArray extends PDFObject {\n static withContext = (context: PDFContext) => new PDFArray(context);\n\n private readonly array: PDFObject[];\n private readonly context: PDFContext;\n\n private constructor(context: PDFContext) {\n super();\n this.array = [];\n this.context = context;\n }\n\n size(): number {\n return this.array.length;\n }\n\n push(object: PDFObject): void {\n this.array.push(object);\n }\n\n insert(index: number, object: PDFObject): void {\n this.array.splice(index, 0, object);\n }\n\n indexOf(object: PDFObject): number | undefined {\n const index = this.array.indexOf(object);\n return index === -1 ? undefined : index;\n }\n\n remove(index: number): void {\n this.array.splice(index, 1);\n }\n\n set(idx: number, object: PDFObject): void {\n this.array[idx] = object;\n }\n\n get(index: number): PDFObject {\n return this.array[index];\n }\n\n lookupMaybe(index: number, type: typeof PDFArray): PDFArray | undefined;\n lookupMaybe(index: number, type: typeof PDFBool): PDFBool | undefined;\n lookupMaybe(index: number, type: typeof PDFDict): PDFDict | undefined;\n lookupMaybe(\n index: number,\n type: typeof PDFHexString,\n ): PDFHexString | undefined;\n lookupMaybe(index: number, type: typeof PDFName): PDFName | undefined;\n lookupMaybe(index: number, type: typeof PDFNull): typeof PDFNull | undefined;\n lookupMaybe(index: number, type: typeof PDFNumber): PDFNumber | undefined;\n lookupMaybe(index: number, type: typeof PDFStream): PDFStream | undefined;\n lookupMaybe(\n index: number,\n type: typeof PDFRawStream,\n ): PDFRawStream | undefined;\n lookupMaybe(index: number, type: typeof PDFRef): PDFRef | undefined;\n lookupMaybe(index: number, type: typeof PDFString): PDFString | undefined;\n lookupMaybe(\n index: number,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n ): PDFString | PDFHexString | undefined;\n\n lookupMaybe(index: number, ...types: any[]) {\n return this.context.lookupMaybe(\n this.get(index),\n // @ts-ignore\n ...types,\n ) as any;\n }\n\n lookup(index: number): PDFObject | undefined;\n lookup(index: number, type: typeof PDFArray): PDFArray;\n lookup(index: number, type: typeof PDFBool): PDFBool;\n lookup(index: number, type: typeof PDFDict): PDFDict;\n lookup(index: number, type: typeof PDFHexString): PDFHexString;\n lookup(index: number, type: typeof PDFName): PDFName;\n lookup(index: number, type: typeof PDFNull): typeof PDFNull;\n lookup(index: number, type: typeof PDFNumber): PDFNumber;\n lookup(index: number, type: typeof PDFStream): PDFStream;\n lookup(index: number, type: typeof PDFRawStream): PDFRawStream;\n lookup(index: number, type: typeof PDFRef): PDFRef;\n lookup(index: number, type: typeof PDFString): PDFString;\n lookup(\n index: number,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n ): PDFString | PDFHexString;\n\n lookup(index: number, ...types: any[]) {\n return this.context.lookup(\n this.get(index),\n // @ts-ignore\n ...types,\n ) as any;\n }\n\n asRectangle(): { x: number; y: number; width: number; height: number } {\n if (this.size() !== 4) throw new PDFArrayIsNotRectangleError(this.size());\n\n const lowerLeftX = this.lookup(0, PDFNumber).asNumber();\n const lowerLeftY = this.lookup(1, PDFNumber).asNumber();\n const upperRightX = this.lookup(2, PDFNumber).asNumber();\n const upperRightY = this.lookup(3, PDFNumber).asNumber();\n\n const x = lowerLeftX;\n const y = lowerLeftY;\n const width = upperRightX - lowerLeftX;\n const height = upperRightY - lowerLeftY;\n\n return { x, y, width, height };\n }\n\n asArray(): PDFObject[] {\n return this.array.slice();\n }\n\n clone(context?: PDFContext): PDFArray {\n const clone = PDFArray.withContext(context || this.context);\n for (let idx = 0, len = this.size(); idx < len; idx++) {\n clone.push(this.array[idx]);\n }\n return clone;\n }\n\n toString(): string {\n let arrayString = '[ ';\n for (let idx = 0, len = this.size(); idx < len; idx++) {\n arrayString += this.get(idx).toString();\n arrayString += ' ';\n }\n arrayString += ']';\n return arrayString;\n }\n\n sizeInBytes(): number {\n let size = 3;\n for (let idx = 0, len = this.size(); idx < len; idx++) {\n size += this.get(idx).sizeInBytes() + 1;\n }\n return size;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n buffer[offset++] = CharCodes.LeftSquareBracket;\n buffer[offset++] = CharCodes.Space;\n for (let idx = 0, len = this.size(); idx < len; idx++) {\n offset += this.get(idx).copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Space;\n }\n buffer[offset++] = CharCodes.RightSquareBracket;\n\n return offset - initialOffset;\n }\n\n scalePDFNumbers(x: number, y: number): void {\n for (let idx = 0, len = this.size(); idx < len; idx++) {\n const el = this.lookup(idx);\n if (el instanceof PDFNumber) {\n const factor = idx % 2 === 0 ? x : y;\n this.set(idx, PDFNumber.of(el.asNumber() * factor));\n }\n }\n }\n}\n\nexport default PDFArray;\n","import { PrivateConstructorError } from 'src/core/errors';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\nconst ENFORCER = {};\n\nclass PDFBool extends PDFObject {\n static readonly True = new PDFBool(ENFORCER, true);\n static readonly False = new PDFBool(ENFORCER, false);\n\n private readonly value: boolean;\n\n private constructor(enforcer: any, value: boolean) {\n if (enforcer !== ENFORCER) throw new PrivateConstructorError('PDFBool');\n super();\n this.value = value;\n }\n\n asBoolean(): boolean {\n return this.value;\n }\n\n clone(): PDFBool {\n return this;\n }\n\n toString(): string {\n return String(this.value);\n }\n\n sizeInBytes(): number {\n return this.value ? 4 : 5;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n if (this.value) {\n buffer[offset++] = CharCodes.t;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.u;\n buffer[offset++] = CharCodes.e;\n return 4;\n } else {\n buffer[offset++] = CharCodes.f;\n buffer[offset++] = CharCodes.a;\n buffer[offset++] = CharCodes.l;\n buffer[offset++] = CharCodes.s;\n buffer[offset++] = CharCodes.e;\n return 5;\n }\n }\n}\n\nexport default PDFBool;\n","import CharCodes from 'src/core/syntax/CharCodes';\n\nexport const IsDelimiter = new Uint8Array(256);\n\nIsDelimiter[CharCodes.LeftParen] = 1;\nIsDelimiter[CharCodes.RightParen] = 1;\nIsDelimiter[CharCodes.LessThan] = 1;\nIsDelimiter[CharCodes.GreaterThan] = 1;\nIsDelimiter[CharCodes.LeftSquareBracket] = 1;\nIsDelimiter[CharCodes.RightSquareBracket] = 1;\nIsDelimiter[CharCodes.LeftCurly] = 1;\nIsDelimiter[CharCodes.RightCurly] = 1;\nIsDelimiter[CharCodes.ForwardSlash] = 1;\nIsDelimiter[CharCodes.Percent] = 1;\n","import CharCodes from 'src/core/syntax/CharCodes';\n\nexport const IsWhitespace = new Uint8Array(256);\n\nIsWhitespace[CharCodes.Null] = 1;\nIsWhitespace[CharCodes.Tab] = 1;\nIsWhitespace[CharCodes.Newline] = 1;\nIsWhitespace[CharCodes.FormFeed] = 1;\nIsWhitespace[CharCodes.CarriageReturn] = 1;\nIsWhitespace[CharCodes.Space] = 1;\n","import CharCodes from 'src/core/syntax/CharCodes';\nimport { IsDelimiter } from 'src/core/syntax/Delimiters';\nimport { IsWhitespace } from 'src/core/syntax/Whitespace';\n\nexport const IsIrregular = new Uint8Array(256);\n\nfor (let idx = 0, len = 256; idx < len; idx++) {\n IsIrregular[idx] = IsWhitespace[idx] || IsDelimiter[idx] ? 1 : 0;\n}\nIsIrregular[CharCodes.Hash] = 1;\n","import { PrivateConstructorError } from 'src/core/errors';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { IsIrregular } from 'src/core/syntax/Irregular';\nimport {\n charFromHexCode,\n copyStringIntoBuffer,\n toCharCode,\n toHexString,\n} from 'src/utils';\n\nconst decodeName = (name: string) =>\n name.replace(/#([\\dABCDEF]{2})/g, (_, hex) => charFromHexCode(hex));\n\nconst isRegularChar = (charCode: number) =>\n charCode >= CharCodes.ExclamationPoint &&\n charCode <= CharCodes.Tilde &&\n !IsIrregular[charCode];\n\nconst ENFORCER = {};\nconst pool = new Map();\n\nclass PDFName extends PDFObject {\n static of = (name: string): PDFName => {\n const decodedValue = decodeName(name);\n\n let instance = pool.get(decodedValue);\n if (!instance) {\n instance = new PDFName(ENFORCER, decodedValue);\n pool.set(decodedValue, instance);\n }\n\n return instance;\n };\n\n /* tslint:disable member-ordering */\n static readonly Length = PDFName.of('Length');\n static readonly FlateDecode = PDFName.of('FlateDecode');\n static readonly Resources = PDFName.of('Resources');\n static readonly Font = PDFName.of('Font');\n static readonly XObject = PDFName.of('XObject');\n static readonly ExtGState = PDFName.of('ExtGState');\n static readonly Contents = PDFName.of('Contents');\n static readonly Type = PDFName.of('Type');\n static readonly Parent = PDFName.of('Parent');\n static readonly MediaBox = PDFName.of('MediaBox');\n static readonly Page = PDFName.of('Page');\n static readonly Annots = PDFName.of('Annots');\n static readonly TrimBox = PDFName.of('TrimBox');\n static readonly ArtBox = PDFName.of('ArtBox');\n static readonly BleedBox = PDFName.of('BleedBox');\n static readonly CropBox = PDFName.of('CropBox');\n static readonly Rotate = PDFName.of('Rotate');\n static readonly Title = PDFName.of('Title');\n static readonly Author = PDFName.of('Author');\n static readonly Subject = PDFName.of('Subject');\n static readonly Creator = PDFName.of('Creator');\n static readonly Keywords = PDFName.of('Keywords');\n static readonly Producer = PDFName.of('Producer');\n static readonly CreationDate = PDFName.of('CreationDate');\n static readonly ModDate = PDFName.of('ModDate');\n /* tslint:enable member-ordering */\n\n private readonly encodedName: string;\n\n private constructor(enforcer: any, name: string) {\n if (enforcer !== ENFORCER) throw new PrivateConstructorError('PDFName');\n super();\n\n let encodedName = '/';\n for (let idx = 0, len = name.length; idx < len; idx++) {\n const character = name[idx];\n const code = toCharCode(character);\n encodedName += isRegularChar(code) ? character : `#${toHexString(code)}`;\n }\n\n this.encodedName = encodedName;\n }\n\n asBytes(): Uint8Array {\n const bytes: number[] = [];\n\n let hex = '';\n let escaped = false;\n\n const pushByte = (byte?: number) => {\n if (byte !== undefined) bytes.push(byte);\n escaped = false;\n };\n\n for (let idx = 1, len = this.encodedName.length; idx < len; idx++) {\n const char = this.encodedName[idx];\n const byte = toCharCode(char);\n const nextChar = this.encodedName[idx + 1];\n if (!escaped) {\n if (byte === CharCodes.Hash) escaped = true;\n else pushByte(byte);\n } else {\n if (\n (byte >= CharCodes.Zero && byte <= CharCodes.Nine) ||\n (byte >= CharCodes.a && byte <= CharCodes.f) ||\n (byte >= CharCodes.A && byte <= CharCodes.F)\n ) {\n hex += char;\n if (\n hex.length === 2 ||\n !(\n (nextChar >= '0' && nextChar <= '9') ||\n (nextChar >= 'a' && nextChar <= 'f') ||\n (nextChar >= 'A' && nextChar <= 'F')\n )\n ) {\n pushByte(parseInt(hex, 16));\n hex = '';\n }\n } else {\n pushByte(byte);\n }\n }\n }\n\n return new Uint8Array(bytes);\n }\n\n // TODO: This should probably use `utf8Decode()`\n // TODO: Polyfill Array.from?\n decodeText(): string {\n const bytes = this.asBytes();\n return String.fromCharCode(...Array.from(bytes));\n }\n\n asString(): string {\n return this.encodedName;\n }\n\n /** @deprecated in favor of [[PDFName.asString]] */\n value(): string {\n return this.encodedName;\n }\n\n clone(): PDFName {\n return this;\n }\n\n toString(): string {\n return this.encodedName;\n }\n\n sizeInBytes(): number {\n return this.encodedName.length;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n offset += copyStringIntoBuffer(this.encodedName, buffer, offset);\n return this.encodedName.length;\n }\n}\n\nexport default PDFName;\n","import PDFObject from 'src/core/objects/PDFObject';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\nclass PDFNull extends PDFObject {\n asNull(): null {\n return null;\n }\n\n clone(): PDFNull {\n return this;\n }\n\n toString(): string {\n return 'null';\n }\n\n sizeInBytes(): number {\n return 4;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n buffer[offset++] = CharCodes.n;\n buffer[offset++] = CharCodes.u;\n buffer[offset++] = CharCodes.l;\n buffer[offset++] = CharCodes.l;\n return 4;\n }\n}\n\nexport default new PDFNull();\n","import PDFArray from 'src/core/objects/PDFArray';\nimport PDFBool from 'src/core/objects/PDFBool';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNull from 'src/core/objects/PDFNull';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFContext from 'src/core/PDFContext';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\nexport type DictMap = Map;\n\nclass PDFDict extends PDFObject {\n static withContext = (context: PDFContext) => new PDFDict(new Map(), context);\n\n static fromMapWithContext = (map: DictMap, context: PDFContext) =>\n new PDFDict(map, context);\n\n readonly context: PDFContext;\n\n private readonly dict: DictMap;\n\n protected constructor(map: DictMap, context: PDFContext) {\n super();\n this.dict = map;\n this.context = context;\n }\n\n keys(): PDFName[] {\n return Array.from(this.dict.keys());\n }\n\n values(): PDFObject[] {\n return Array.from(this.dict.values());\n }\n\n entries(): [PDFName, PDFObject][] {\n return Array.from(this.dict.entries());\n }\n\n set(key: PDFName, value: PDFObject): void {\n this.dict.set(key, value);\n }\n\n get(\n key: PDFName,\n // TODO: `preservePDFNull` is for backwards compatibility. Should be\n // removed in next breaking API change.\n preservePDFNull = false,\n ): PDFObject | undefined {\n const value = this.dict.get(key);\n if (value === PDFNull && !preservePDFNull) return undefined;\n return value;\n }\n\n has(key: PDFName): boolean {\n const value = this.dict.get(key);\n return value !== undefined && value !== PDFNull;\n }\n\n lookupMaybe(key: PDFName, type: typeof PDFArray): PDFArray | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFBool): PDFBool | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFDict): PDFDict | undefined;\n lookupMaybe(\n key: PDFName,\n type: typeof PDFHexString,\n ): PDFHexString | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFName): PDFName | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFNull): typeof PDFNull | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFNumber): PDFNumber | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFStream): PDFStream | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFRef): PDFRef | undefined;\n lookupMaybe(key: PDFName, type: typeof PDFString): PDFString | undefined;\n lookupMaybe(\n ref: PDFName,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n ): PDFString | PDFHexString | undefined;\n lookupMaybe(\n ref: PDFName,\n type1: typeof PDFDict,\n type2: typeof PDFStream,\n ): PDFDict | PDFStream | undefined;\n lookupMaybe(\n ref: PDFName,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n type3: typeof PDFArray,\n ): PDFString | PDFHexString | PDFArray | undefined;\n\n lookupMaybe(key: PDFName, ...types: any[]) {\n // TODO: `preservePDFNull` is for backwards compatibility. Should be\n // removed in next breaking API change.\n const preservePDFNull = types.includes(PDFNull);\n\n const value = this.context.lookupMaybe(\n this.get(key, preservePDFNull),\n // @ts-ignore\n ...types,\n ) as any;\n\n if (value === PDFNull && !preservePDFNull) return undefined;\n\n return value;\n }\n\n lookup(key: PDFName): PDFObject | undefined;\n lookup(key: PDFName, type: typeof PDFArray): PDFArray;\n lookup(key: PDFName, type: typeof PDFBool): PDFBool;\n lookup(key: PDFName, type: typeof PDFDict): PDFDict;\n lookup(key: PDFName, type: typeof PDFHexString): PDFHexString;\n lookup(key: PDFName, type: typeof PDFName): PDFName;\n lookup(key: PDFName, type: typeof PDFNull): typeof PDFNull;\n lookup(key: PDFName, type: typeof PDFNumber): PDFNumber;\n lookup(key: PDFName, type: typeof PDFStream): PDFStream;\n lookup(key: PDFName, type: typeof PDFRef): PDFRef;\n lookup(key: PDFName, type: typeof PDFString): PDFString;\n lookup(\n ref: PDFName,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n ): PDFString | PDFHexString;\n lookup(\n ref: PDFName,\n type1: typeof PDFDict,\n type2: typeof PDFStream,\n ): PDFDict | PDFStream;\n lookup(\n ref: PDFName,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n type3: typeof PDFArray,\n ): PDFString | PDFHexString | PDFArray;\n\n lookup(key: PDFName, ...types: any[]) {\n // TODO: `preservePDFNull` is for backwards compatibility. Should be\n // removed in next breaking API change.\n const preservePDFNull = types.includes(PDFNull);\n\n const value = this.context.lookup(\n this.get(key, preservePDFNull),\n // @ts-ignore\n ...types,\n ) as any;\n\n if (value === PDFNull && !preservePDFNull) return undefined;\n\n return value;\n }\n\n delete(key: PDFName): boolean {\n return this.dict.delete(key);\n }\n\n asMap(): Map {\n return new Map(this.dict);\n }\n\n /** Generate a random key that doesn't exist in current key set */\n uniqueKey(tag = ''): PDFName {\n const existingKeys = this.keys();\n let key = PDFName.of(this.context.addRandomSuffix(tag, 10));\n while (existingKeys.includes(key)) {\n key = PDFName.of(this.context.addRandomSuffix(tag, 10));\n }\n return key;\n }\n\n clone(context?: PDFContext): PDFDict {\n const clone = PDFDict.withContext(context || this.context);\n const entries = this.entries();\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n clone.set(key, value);\n }\n return clone;\n }\n\n toString(): string {\n let dictString = '<<\\n';\n const entries = this.entries();\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n dictString += key.toString() + ' ' + value.toString() + '\\n';\n }\n dictString += '>>';\n return dictString;\n }\n\n sizeInBytes(): number {\n let size = 5;\n const entries = this.entries();\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n size += key.sizeInBytes() + value.sizeInBytes() + 2;\n }\n return size;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n buffer[offset++] = CharCodes.LessThan;\n buffer[offset++] = CharCodes.LessThan;\n buffer[offset++] = CharCodes.Newline;\n\n const entries = this.entries();\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n offset += key.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Space;\n offset += value.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n }\n\n buffer[offset++] = CharCodes.GreaterThan;\n buffer[offset++] = CharCodes.GreaterThan;\n\n return offset - initialOffset;\n }\n}\n\nexport default PDFDict;\n","import { MethodNotImplementedError } from 'src/core/errors';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFContext from 'src/core/PDFContext';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\nclass PDFStream extends PDFObject {\n readonly dict: PDFDict;\n\n constructor(dict: PDFDict) {\n super();\n this.dict = dict;\n }\n\n clone(_context?: PDFContext): PDFStream {\n throw new MethodNotImplementedError(this.constructor.name, 'clone');\n }\n\n getContentsString(): string {\n throw new MethodNotImplementedError(\n this.constructor.name,\n 'getContentsString',\n );\n }\n\n getContents(): Uint8Array {\n throw new MethodNotImplementedError(this.constructor.name, 'getContents');\n }\n\n getContentsSize(): number {\n throw new MethodNotImplementedError(\n this.constructor.name,\n 'getContentsSize',\n );\n }\n\n updateDict(): void {\n const contentsSize = this.getContentsSize();\n this.dict.set(PDFName.Length, PDFNumber.of(contentsSize));\n }\n\n sizeInBytes(): number {\n this.updateDict();\n return this.dict.sizeInBytes() + this.getContentsSize() + 18;\n }\n\n toString(): string {\n this.updateDict();\n let streamString = this.dict.toString();\n streamString += '\\nstream\\n';\n streamString += this.getContentsString();\n streamString += '\\nendstream';\n return streamString;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n this.updateDict();\n const initialOffset = offset;\n\n offset += this.dict.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n\n buffer[offset++] = CharCodes.s;\n buffer[offset++] = CharCodes.t;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.a;\n buffer[offset++] = CharCodes.m;\n buffer[offset++] = CharCodes.Newline;\n\n const contents = this.getContents();\n for (let idx = 0, len = contents.length; idx < len; idx++) {\n buffer[offset++] = contents[idx];\n }\n\n buffer[offset++] = CharCodes.Newline;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.n;\n buffer[offset++] = CharCodes.d;\n buffer[offset++] = CharCodes.s;\n buffer[offset++] = CharCodes.t;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.a;\n buffer[offset++] = CharCodes.m;\n\n return offset - initialOffset;\n }\n}\n\nexport default PDFStream;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFContext from 'src/core/PDFContext';\nimport { arrayAsString } from 'src/utils';\n\nclass PDFRawStream extends PDFStream {\n static of = (dict: PDFDict, contents: Uint8Array) =>\n new PDFRawStream(dict, contents);\n\n readonly contents: Uint8Array;\n\n private constructor(dict: PDFDict, contents: Uint8Array) {\n super(dict);\n this.contents = contents;\n }\n\n asUint8Array(): Uint8Array {\n return this.contents.slice();\n }\n\n clone(context?: PDFContext): PDFRawStream {\n return PDFRawStream.of(this.dict.clone(context), this.contents.slice());\n }\n\n getContentsString(): string {\n return arrayAsString(this.contents);\n }\n\n getContents(): Uint8Array {\n return this.contents;\n }\n\n getContentsSize(): number {\n return this.contents.length;\n }\n}\n\nexport default PDFRawStream;\n","import { PrivateConstructorError } from 'src/core/errors';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport { copyStringIntoBuffer } from 'src/utils';\n\nconst ENFORCER = {};\nconst pool = new Map();\n\nclass PDFRef extends PDFObject {\n static of = (objectNumber: number, generationNumber = 0) => {\n const tag = `${objectNumber} ${generationNumber} R`;\n\n let instance = pool.get(tag);\n if (!instance) {\n instance = new PDFRef(ENFORCER, objectNumber, generationNumber);\n pool.set(tag, instance);\n }\n\n return instance;\n };\n\n readonly objectNumber: number;\n readonly generationNumber: number;\n readonly tag: string;\n\n private constructor(\n enforcer: any,\n objectNumber: number,\n generationNumber: number,\n ) {\n if (enforcer !== ENFORCER) throw new PrivateConstructorError('PDFRef');\n super();\n this.objectNumber = objectNumber;\n this.generationNumber = generationNumber;\n this.tag = `${objectNumber} ${generationNumber} R`;\n }\n\n clone(): PDFRef {\n return this;\n }\n\n toString(): string {\n return this.tag;\n }\n\n sizeInBytes(): number {\n return this.tag.length;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n offset += copyStringIntoBuffer(this.tag, buffer, offset);\n return this.tag.length;\n }\n}\n\nexport default PDFRef;\n","import PDFArray from 'src/core/objects/PDFArray';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFOperatorNames from 'src/core/operators/PDFOperatorNames';\nimport PDFContext from 'src/core/PDFContext';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { copyStringIntoBuffer } from 'src/utils';\n\nexport type PDFOperatorArg =\n | string\n | PDFName\n | PDFArray\n | PDFNumber\n | PDFString\n | PDFHexString;\n\nclass PDFOperator {\n static of = (name: PDFOperatorNames, args?: PDFOperatorArg[]) =>\n new PDFOperator(name, args);\n\n private readonly name: PDFOperatorNames;\n private readonly args: PDFOperatorArg[];\n\n private constructor(name: PDFOperatorNames, args?: PDFOperatorArg[]) {\n this.name = name;\n this.args = args || [];\n }\n\n clone(context?: PDFContext): PDFOperator {\n const args = new Array(this.args.length);\n for (let idx = 0, len = args.length; idx < len; idx++) {\n const arg = this.args[idx];\n args[idx] = arg instanceof PDFObject ? arg.clone(context) : arg;\n }\n return PDFOperator.of(this.name, args);\n }\n\n toString(): string {\n let value = '';\n for (let idx = 0, len = this.args.length; idx < len; idx++) {\n value += String(this.args[idx]) + ' ';\n }\n value += this.name;\n return value;\n }\n\n sizeInBytes(): number {\n let size = 0;\n for (let idx = 0, len = this.args.length; idx < len; idx++) {\n const arg = this.args[idx];\n size += (arg instanceof PDFObject ? arg.sizeInBytes() : arg.length) + 1;\n }\n size += this.name.length;\n return size;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n for (let idx = 0, len = this.args.length; idx < len; idx++) {\n const arg = this.args[idx];\n if (arg instanceof PDFObject) {\n offset += arg.copyBytesInto(buffer, offset);\n } else {\n offset += copyStringIntoBuffer(arg, buffer, offset);\n }\n buffer[offset++] = CharCodes.Space;\n }\n\n offset += copyStringIntoBuffer(this.name, buffer, offset);\n\n return offset - initialOffset;\n }\n}\n\nexport default PDFOperator;\n","enum PDFOperatorNames {\n // Non Stroking Color Operators\n NonStrokingColor = 'sc',\n NonStrokingColorN = 'scn',\n NonStrokingColorRgb = 'rg',\n NonStrokingColorGray = 'g',\n NonStrokingColorCmyk = 'k',\n NonStrokingColorspace = 'cs',\n\n // Stroking Color Operators\n StrokingColor = 'SC',\n StrokingColorN = 'SCN',\n StrokingColorRgb = 'RG',\n StrokingColorGray = 'G',\n StrokingColorCmyk = 'K',\n StrokingColorspace = 'CS',\n\n // Marked Content Operators\n BeginMarkedContentSequence = 'BDC',\n BeginMarkedContent = 'BMC',\n EndMarkedContent = 'EMC',\n MarkedContentPointWithProps = 'DP',\n MarkedContentPoint = 'MP',\n DrawObject = 'Do',\n\n // Graphics State Operators\n ConcatTransformationMatrix = 'cm',\n PopGraphicsState = 'Q',\n PushGraphicsState = 'q',\n SetFlatness = 'i',\n SetGraphicsStateParams = 'gs',\n SetLineCapStyle = 'J',\n SetLineDashPattern = 'd',\n SetLineJoinStyle = 'j',\n SetLineMiterLimit = 'M',\n SetLineWidth = 'w',\n SetTextMatrix = 'Tm',\n SetRenderingIntent = 'ri',\n\n // Graphics Operators\n AppendRectangle = 're',\n BeginInlineImage = 'BI',\n BeginInlineImageData = 'ID',\n EndInlineImage = 'EI',\n ClipEvenOdd = 'W*',\n ClipNonZero = 'W',\n CloseAndStroke = 's',\n CloseFillEvenOddAndStroke = 'b*',\n CloseFillNonZeroAndStroke = 'b',\n ClosePath = 'h',\n AppendBezierCurve = 'c',\n CurveToReplicateFinalPoint = 'y',\n CurveToReplicateInitialPoint = 'v',\n EndPath = 'n',\n FillEvenOddAndStroke = 'B*',\n FillEvenOdd = 'f*',\n FillNonZeroAndStroke = 'B',\n FillNonZero = 'f',\n LegacyFillNonZero = 'F',\n LineTo = 'l',\n MoveTo = 'm',\n ShadingFill = 'sh',\n StrokePath = 'S',\n\n // Text Operators\n BeginText = 'BT',\n EndText = 'ET',\n MoveText = 'Td',\n MoveTextSetLeading = 'TD',\n NextLine = 'T*',\n SetCharacterSpacing = 'Tc',\n SetFontAndSize = 'Tf',\n SetTextHorizontalScaling = 'Tz',\n SetTextLineHeight = 'TL',\n SetTextRenderingMode = 'Tr',\n SetTextRise = 'Ts',\n SetWordSpacing = 'Tw',\n ShowText = 'Tj',\n ShowTextAdjusted = 'TJ',\n ShowTextLine = \"'\", // tslint:disable-line quotemark\n ShowTextLineAndSpace = '\"',\n\n // Type3 Font Operators\n Type3D0 = 'd0',\n Type3D1 = 'd1',\n\n // Compatibility Section Operators\n BeginCompatibilitySection = 'BX',\n EndCompatibilitySection = 'EX',\n}\n\nexport default PDFOperatorNames;\n","import pako from 'pako';\n\nimport { MethodNotImplementedError } from 'src/core/errors';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport { Cache } from 'src/utils';\n\nclass PDFFlateStream extends PDFStream {\n protected readonly contentsCache: Cache;\n protected readonly encode: boolean;\n\n constructor(dict: PDFDict, encode: boolean) {\n super(dict);\n\n this.encode = encode;\n\n if (encode) dict.set(PDFName.of('Filter'), PDFName.of('FlateDecode'));\n this.contentsCache = Cache.populatedBy(this.computeContents);\n }\n\n computeContents = (): Uint8Array => {\n const unencodedContents = this.getUnencodedContents();\n return this.encode ? pako.deflate(unencodedContents) : unencodedContents;\n };\n\n getContents(): Uint8Array {\n return this.contentsCache.access();\n }\n\n getContentsSize(): number {\n return this.contentsCache.access().length;\n }\n\n getUnencodedContents(): Uint8Array {\n throw new MethodNotImplementedError(\n this.constructor.name,\n 'getUnencodedContents',\n );\n }\n}\n\nexport default PDFFlateStream;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFOperator from 'src/core/operators/PDFOperator';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFFlateStream from 'src/core/structures/PDFFlateStream';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\nclass PDFContentStream extends PDFFlateStream {\n static of = (dict: PDFDict, operators: PDFOperator[], encode = true) =>\n new PDFContentStream(dict, operators, encode);\n\n private readonly operators: PDFOperator[];\n\n private constructor(dict: PDFDict, operators: PDFOperator[], encode = true) {\n super(dict, encode);\n this.operators = operators;\n }\n\n push(...operators: PDFOperator[]): void {\n this.operators.push(...operators);\n }\n\n clone(context?: PDFContext): PDFContentStream {\n const operators = new Array(this.operators.length);\n for (let idx = 0, len = this.operators.length; idx < len; idx++) {\n operators[idx] = this.operators[idx].clone(context);\n }\n const { dict, encode } = this;\n return PDFContentStream.of(dict.clone(context), operators, encode);\n }\n\n getContentsString(): string {\n let value = '';\n for (let idx = 0, len = this.operators.length; idx < len; idx++) {\n value += `${this.operators[idx]}\\n`;\n }\n return value;\n }\n\n getUnencodedContents(): Uint8Array {\n const buffer = new Uint8Array(this.getUnencodedContentsSize());\n let offset = 0;\n for (let idx = 0, len = this.operators.length; idx < len; idx++) {\n offset += this.operators[idx].copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n }\n return buffer;\n }\n\n getUnencodedContentsSize(): number {\n let size = 0;\n for (let idx = 0, len = this.operators.length; idx < len; idx++) {\n size += this.operators[idx].sizeInBytes() + 1;\n }\n return size;\n }\n}\n\nexport default PDFContentStream;\n","/**\n * Generates a pseudo random number. Although it is not cryptographically secure\n * and uniformly distributed, it is not a concern for the intended use-case,\n * which is to generate distinct numbers.\n *\n * Credit: https://stackoverflow.com/a/19303725/10254049\n */\nexport class SimpleRNG {\n static withSeed = (seed: number) => new SimpleRNG(seed);\n\n private seed: number;\n\n private constructor(seed: number) {\n this.seed = seed;\n }\n\n nextInt(): number {\n const x = Math.sin(this.seed++) * 10000;\n return x - Math.floor(x);\n }\n}\n","import pako from 'pako';\n\nimport PDFHeader from 'src/core/document/PDFHeader';\nimport { UnexpectedObjectTypeError } from 'src/core/errors';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFBool from 'src/core/objects/PDFBool';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNull from 'src/core/objects/PDFNull';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFOperator from 'src/core/operators/PDFOperator';\nimport Ops from 'src/core/operators/PDFOperatorNames';\nimport PDFContentStream from 'src/core/structures/PDFContentStream';\nimport { typedArrayFor } from 'src/utils';\nimport { SimpleRNG } from 'src/utils/rng';\n\ntype LookupKey = PDFRef | PDFObject | undefined;\n\ninterface LiteralObject {\n [name: string]: Literal | PDFObject;\n}\n\ninterface LiteralArray {\n [index: number]: Literal | PDFObject;\n}\n\ntype Literal =\n | LiteralObject\n | LiteralArray\n | string\n | number\n | boolean\n | null\n | undefined;\n\nconst byAscendingObjectNumber = (\n [a]: [PDFRef, PDFObject],\n [b]: [PDFRef, PDFObject],\n) => a.objectNumber - b.objectNumber;\n\nclass PDFContext {\n static create = () => new PDFContext();\n\n largestObjectNumber: number;\n header: PDFHeader;\n trailerInfo: {\n Root?: PDFObject;\n Encrypt?: PDFObject;\n Info?: PDFObject;\n ID?: PDFObject;\n };\n rng: SimpleRNG;\n\n private readonly indirectObjects: Map;\n\n private pushGraphicsStateContentStreamRef?: PDFRef;\n private popGraphicsStateContentStreamRef?: PDFRef;\n\n private constructor() {\n this.largestObjectNumber = 0;\n this.header = PDFHeader.forVersion(1, 7);\n this.trailerInfo = {};\n\n this.indirectObjects = new Map();\n this.rng = SimpleRNG.withSeed(1);\n }\n\n assign(ref: PDFRef, object: PDFObject): void {\n this.indirectObjects.set(ref, object);\n if (ref.objectNumber > this.largestObjectNumber) {\n this.largestObjectNumber = ref.objectNumber;\n }\n }\n\n nextRef(): PDFRef {\n this.largestObjectNumber += 1;\n return PDFRef.of(this.largestObjectNumber);\n }\n\n register(object: PDFObject): PDFRef {\n const ref = this.nextRef();\n this.assign(ref, object);\n return ref;\n }\n\n delete(ref: PDFRef): boolean {\n return this.indirectObjects.delete(ref);\n }\n\n lookupMaybe(ref: LookupKey, type: typeof PDFArray): PDFArray | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFBool): PDFBool | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFDict): PDFDict | undefined;\n lookupMaybe(\n ref: LookupKey,\n type: typeof PDFHexString,\n ): PDFHexString | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFName): PDFName | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFNull): typeof PDFNull | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFNumber): PDFNumber | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFStream): PDFStream | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFRef): PDFRef | undefined;\n lookupMaybe(ref: LookupKey, type: typeof PDFString): PDFString | undefined;\n lookupMaybe(\n ref: LookupKey,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n ): PDFString | PDFHexString | undefined;\n\n lookupMaybe(ref: LookupKey, ...types: any[]) {\n // TODO: `preservePDFNull` is for backwards compatibility. Should be\n // removed in next breaking API change.\n const preservePDFNull = types.includes(PDFNull);\n\n const result = ref instanceof PDFRef ? this.indirectObjects.get(ref) : ref;\n\n if (!result || (result === PDFNull && !preservePDFNull)) return undefined;\n\n for (let idx = 0, len = types.length; idx < len; idx++) {\n const type = types[idx];\n if (type === PDFNull) {\n if (result === PDFNull) return result;\n } else {\n if (result instanceof type) return result;\n }\n }\n throw new UnexpectedObjectTypeError(types, result);\n }\n\n lookup(ref: LookupKey): PDFObject | undefined;\n lookup(ref: LookupKey, type: typeof PDFArray): PDFArray;\n lookup(ref: LookupKey, type: typeof PDFBool): PDFBool;\n lookup(ref: LookupKey, type: typeof PDFDict): PDFDict;\n lookup(ref: LookupKey, type: typeof PDFHexString): PDFHexString;\n lookup(ref: LookupKey, type: typeof PDFName): PDFName;\n lookup(ref: LookupKey, type: typeof PDFNull): typeof PDFNull;\n lookup(ref: LookupKey, type: typeof PDFNumber): PDFNumber;\n lookup(ref: LookupKey, type: typeof PDFStream): PDFStream;\n lookup(ref: LookupKey, type: typeof PDFRef): PDFRef;\n lookup(ref: LookupKey, type: typeof PDFString): PDFString;\n lookup(\n ref: LookupKey,\n type1: typeof PDFString,\n type2: typeof PDFHexString,\n ): PDFString | PDFHexString;\n\n lookup(ref: LookupKey, ...types: any[]) {\n const result = ref instanceof PDFRef ? this.indirectObjects.get(ref) : ref;\n\n if (types.length === 0) return result;\n\n for (let idx = 0, len = types.length; idx < len; idx++) {\n const type = types[idx];\n if (type === PDFNull) {\n if (result === PDFNull) return result;\n } else {\n if (result instanceof type) return result;\n }\n }\n\n throw new UnexpectedObjectTypeError(types, result);\n }\n\n getObjectRef(pdfObject: PDFObject): PDFRef | undefined {\n const entries = Array.from(this.indirectObjects.entries());\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [ref, object] = entries[idx];\n if (object === pdfObject) {\n return ref;\n }\n }\n\n return undefined;\n }\n\n enumerateIndirectObjects(): [PDFRef, PDFObject][] {\n return Array.from(this.indirectObjects.entries()).sort(\n byAscendingObjectNumber,\n );\n }\n\n obj(literal: null | undefined): typeof PDFNull;\n obj(literal: string): PDFName;\n obj(literal: number): PDFNumber;\n obj(literal: boolean): PDFBool;\n obj(literal: LiteralObject): PDFDict;\n obj(literal: LiteralArray): PDFArray;\n\n obj(literal: Literal) {\n if (literal instanceof PDFObject) {\n return literal;\n } else if (literal === null || literal === undefined) {\n return PDFNull;\n } else if (typeof literal === 'string') {\n return PDFName.of(literal);\n } else if (typeof literal === 'number') {\n return PDFNumber.of(literal);\n } else if (typeof literal === 'boolean') {\n return literal ? PDFBool.True : PDFBool.False;\n } else if (Array.isArray(literal)) {\n const array = PDFArray.withContext(this);\n for (let idx = 0, len = literal.length; idx < len; idx++) {\n array.push(this.obj(literal[idx]));\n }\n return array;\n } else {\n const dict = PDFDict.withContext(this);\n const keys = Object.keys(literal);\n for (let idx = 0, len = keys.length; idx < len; idx++) {\n const key = keys[idx];\n const value = (literal as LiteralObject)[key] as any;\n if (value !== undefined) dict.set(PDFName.of(key), this.obj(value));\n }\n return dict;\n }\n }\n\n stream(\n contents: string | Uint8Array,\n dict: LiteralObject = {},\n ): PDFRawStream {\n return PDFRawStream.of(this.obj(dict), typedArrayFor(contents));\n }\n\n flateStream(\n contents: string | Uint8Array,\n dict: LiteralObject = {},\n ): PDFRawStream {\n return this.stream(pako.deflate(typedArrayFor(contents)), {\n ...dict,\n Filter: 'FlateDecode',\n });\n }\n\n contentStream(\n operators: PDFOperator[],\n dict: LiteralObject = {},\n ): PDFContentStream {\n return PDFContentStream.of(this.obj(dict), operators);\n }\n\n formXObject(\n operators: PDFOperator[],\n dict: LiteralObject = {},\n ): PDFContentStream {\n return this.contentStream(operators, {\n BBox: this.obj([0, 0, 0, 0]),\n Matrix: this.obj([1, 0, 0, 1, 0, 0]),\n ...dict,\n Type: 'XObject',\n Subtype: 'Form',\n });\n }\n\n /*\n * Reference to PDFContentStream that contains a single PDFOperator: `q`.\n * Used by [[PDFPageLeaf]] instances to ensure that when content streams are\n * added to a modified PDF, they start in the default, unchanged graphics\n * state.\n */\n getPushGraphicsStateContentStream(): PDFRef {\n if (this.pushGraphicsStateContentStreamRef) {\n return this.pushGraphicsStateContentStreamRef;\n }\n const dict = this.obj({});\n const op = PDFOperator.of(Ops.PushGraphicsState);\n const stream = PDFContentStream.of(dict, [op]);\n this.pushGraphicsStateContentStreamRef = this.register(stream);\n return this.pushGraphicsStateContentStreamRef;\n }\n\n /*\n * Reference to PDFContentStream that contains a single PDFOperator: `Q`.\n * Used by [[PDFPageLeaf]] instances to ensure that when content streams are\n * added to a modified PDF, they start in the default, unchanged graphics\n * state.\n */\n getPopGraphicsStateContentStream(): PDFRef {\n if (this.popGraphicsStateContentStreamRef) {\n return this.popGraphicsStateContentStreamRef;\n }\n const dict = this.obj({});\n const op = PDFOperator.of(Ops.PopGraphicsState);\n const stream = PDFContentStream.of(dict, [op]);\n this.popGraphicsStateContentStreamRef = this.register(stream);\n return this.popGraphicsStateContentStreamRef;\n }\n\n addRandomSuffix(prefix: string, suffixLength = 4): string {\n return `${prefix}-${Math.floor(this.rng.nextInt() * 10 ** suffixLength)}`;\n }\n}\n\nexport default PDFContext;\n","import PDFArray from 'src/core/objects/PDFArray';\nimport PDFDict, { DictMap } from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFPageTree from 'src/core/structures/PDFPageTree';\n\nclass PDFPageLeaf extends PDFDict {\n static readonly InheritableEntries = [\n 'Resources',\n 'MediaBox',\n 'CropBox',\n 'Rotate',\n ];\n\n static withContextAndParent = (context: PDFContext, parent: PDFRef) => {\n const dict = new Map();\n dict.set(PDFName.Type, PDFName.Page);\n dict.set(PDFName.Parent, parent);\n dict.set(PDFName.Resources, context.obj({}));\n dict.set(PDFName.MediaBox, context.obj([0, 0, 612, 792]));\n return new PDFPageLeaf(dict, context, false);\n };\n\n static fromMapWithContext = (\n map: DictMap,\n context: PDFContext,\n autoNormalizeCTM = true,\n ) => new PDFPageLeaf(map, context, autoNormalizeCTM);\n\n private normalized = false;\n private readonly autoNormalizeCTM: boolean;\n\n private constructor(\n map: DictMap,\n context: PDFContext,\n autoNormalizeCTM = true,\n ) {\n super(map, context);\n this.autoNormalizeCTM = autoNormalizeCTM;\n }\n\n clone(context?: PDFContext): PDFPageLeaf {\n const clone = PDFPageLeaf.fromMapWithContext(\n new Map(),\n context || this.context,\n this.autoNormalizeCTM,\n );\n const entries = this.entries();\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n clone.set(key, value);\n }\n return clone;\n }\n\n Parent(): PDFPageTree | undefined {\n return this.lookupMaybe(PDFName.Parent, PDFDict) as PDFPageTree | undefined;\n }\n\n Contents(): PDFStream | PDFArray | undefined {\n return this.lookup(PDFName.of('Contents')) as\n | PDFStream\n | PDFArray\n | undefined;\n }\n\n Annots(): PDFArray | undefined {\n return this.lookupMaybe(PDFName.Annots, PDFArray);\n }\n\n BleedBox(): PDFArray | undefined {\n return this.lookupMaybe(PDFName.BleedBox, PDFArray);\n }\n\n TrimBox(): PDFArray | undefined {\n return this.lookupMaybe(PDFName.TrimBox, PDFArray);\n }\n\n ArtBox(): PDFArray | undefined {\n return this.lookupMaybe(PDFName.ArtBox, PDFArray);\n }\n\n Resources(): PDFDict | undefined {\n const dictOrRef = this.getInheritableAttribute(PDFName.Resources);\n return this.context.lookupMaybe(dictOrRef, PDFDict);\n }\n\n MediaBox(): PDFArray {\n const arrayOrRef = this.getInheritableAttribute(PDFName.MediaBox);\n return this.context.lookup(arrayOrRef, PDFArray);\n }\n\n CropBox(): PDFArray | undefined {\n const arrayOrRef = this.getInheritableAttribute(PDFName.CropBox);\n return this.context.lookupMaybe(arrayOrRef, PDFArray);\n }\n\n Rotate(): PDFNumber | undefined {\n const numberOrRef = this.getInheritableAttribute(PDFName.Rotate);\n return this.context.lookupMaybe(numberOrRef, PDFNumber);\n }\n\n getInheritableAttribute(name: PDFName): PDFObject | undefined {\n let attribute: PDFObject | undefined;\n this.ascend((node) => {\n if (!attribute) attribute = node.get(name);\n });\n return attribute;\n }\n\n setParent(parentRef: PDFRef): void {\n this.set(PDFName.Parent, parentRef);\n }\n\n addContentStream(contentStreamRef: PDFRef): void {\n const Contents = this.normalizedEntries().Contents || this.context.obj([]);\n this.set(PDFName.Contents, Contents);\n Contents.push(contentStreamRef);\n }\n\n wrapContentStreams(startStream: PDFRef, endStream: PDFRef): boolean {\n const Contents = this.Contents();\n if (Contents instanceof PDFArray) {\n Contents.insert(0, startStream);\n Contents.push(endStream);\n return true;\n }\n return false;\n }\n\n addAnnot(annotRef: PDFRef): void {\n const { Annots } = this.normalizedEntries();\n Annots.push(annotRef);\n }\n\n removeAnnot(annotRef: PDFRef) {\n const { Annots } = this.normalizedEntries();\n const index = Annots.indexOf(annotRef);\n if (index !== undefined) {\n Annots.remove(index);\n }\n }\n\n setFontDictionary(name: PDFName, fontDictRef: PDFRef): void {\n const { Font } = this.normalizedEntries();\n Font.set(name, fontDictRef);\n }\n\n newFontDictionaryKey(tag: string): PDFName {\n const { Font } = this.normalizedEntries();\n return Font.uniqueKey(tag);\n }\n\n newFontDictionary(tag: string, fontDictRef: PDFRef): PDFName {\n const key = this.newFontDictionaryKey(tag);\n this.setFontDictionary(key, fontDictRef);\n return key;\n }\n\n setXObject(name: PDFName, xObjectRef: PDFRef): void {\n const { XObject } = this.normalizedEntries();\n XObject.set(name, xObjectRef);\n }\n\n newXObjectKey(tag: string): PDFName {\n const { XObject } = this.normalizedEntries();\n return XObject.uniqueKey(tag);\n }\n\n newXObject(tag: string, xObjectRef: PDFRef): PDFName {\n const key = this.newXObjectKey(tag);\n this.setXObject(key, xObjectRef);\n return key;\n }\n\n setExtGState(name: PDFName, extGStateRef: PDFRef | PDFDict): void {\n const { ExtGState } = this.normalizedEntries();\n ExtGState.set(name, extGStateRef);\n }\n\n newExtGStateKey(tag: string): PDFName {\n const { ExtGState } = this.normalizedEntries();\n return ExtGState.uniqueKey(tag);\n }\n\n newExtGState(tag: string, extGStateRef: PDFRef | PDFDict): PDFName {\n const key = this.newExtGStateKey(tag);\n this.setExtGState(key, extGStateRef);\n return key;\n }\n\n ascend(visitor: (node: PDFPageTree | PDFPageLeaf) => any): void {\n visitor(this);\n const Parent = this.Parent();\n if (Parent) Parent.ascend(visitor);\n }\n\n normalize() {\n if (this.normalized) return;\n\n const { context } = this;\n\n const contentsRef = this.get(PDFName.Contents);\n const contents = this.context.lookup(contentsRef);\n if (contents instanceof PDFStream) {\n this.set(PDFName.Contents, context.obj([contentsRef]));\n }\n\n if (this.autoNormalizeCTM) {\n this.wrapContentStreams(\n this.context.getPushGraphicsStateContentStream(),\n this.context.getPopGraphicsStateContentStream(),\n );\n }\n\n // TODO: Clone `Resources` if it is inherited\n const dictOrRef = this.getInheritableAttribute(PDFName.Resources);\n const Resources =\n context.lookupMaybe(dictOrRef, PDFDict) || context.obj({});\n this.set(PDFName.Resources, Resources);\n\n // TODO: Clone `Font` if it is inherited\n const Font =\n Resources.lookupMaybe(PDFName.Font, PDFDict) || context.obj({});\n Resources.set(PDFName.Font, Font);\n\n // TODO: Clone `XObject` if it is inherited\n const XObject =\n Resources.lookupMaybe(PDFName.XObject, PDFDict) || context.obj({});\n Resources.set(PDFName.XObject, XObject);\n\n // TODO: Clone `ExtGState` if it is inherited\n const ExtGState =\n Resources.lookupMaybe(PDFName.ExtGState, PDFDict) || context.obj({});\n Resources.set(PDFName.ExtGState, ExtGState);\n\n const Annots = this.Annots() || context.obj([]);\n this.set(PDFName.Annots, Annots);\n\n this.normalized = true;\n }\n\n normalizedEntries() {\n this.normalize();\n const Annots = this.Annots()!;\n const Resources = this.Resources()!;\n const Contents = this.Contents() as PDFArray | undefined;\n return {\n Annots,\n Resources,\n Contents,\n Font: Resources.lookup(PDFName.Font, PDFDict),\n XObject: Resources.lookup(PDFName.XObject, PDFDict),\n ExtGState: Resources.lookup(PDFName.ExtGState, PDFDict),\n };\n }\n}\n\nexport default PDFPageLeaf;\n","import PDFArray from 'src/core/objects/PDFArray';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFPageLeaf from 'src/core/structures/PDFPageLeaf';\n\n/**\n * PDFObjectCopier copies PDFObjects from a src context to a dest context.\n * The primary use case for this is to copy pages between PDFs.\n *\n * _Copying_ an object with a PDFObjectCopier is different from _cloning_ an\n * object with its [[PDFObject.clone]] method:\n *\n * ```\n * const src: PDFContext = ...\n * const dest: PDFContext = ...\n * const originalObject: PDFObject = ...\n * const copiedObject = PDFObjectCopier.for(src, dest).copy(originalObject);\n * const clonedObject = originalObject.clone();\n * ```\n *\n * Copying an object is equivalent to cloning it and then copying over any other\n * objects that it references. Note that only dictionaries, arrays, and streams\n * (or structures build from them) can contain indirect references to other\n * objects. Copying a PDFObject that is not a dictionary, array, or stream is\n * supported, but is equivalent to cloning it.\n */\nclass PDFObjectCopier {\n static for = (src: PDFContext, dest: PDFContext) =>\n new PDFObjectCopier(src, dest);\n\n private readonly src: PDFContext;\n private readonly dest: PDFContext;\n private readonly traversedObjects = new Map();\n\n private constructor(src: PDFContext, dest: PDFContext) {\n this.src = src;\n this.dest = dest;\n }\n\n // prettier-ignore\n copy = (object: T): T => (\n object instanceof PDFPageLeaf ? this.copyPDFPage(object)\n : object instanceof PDFDict ? this.copyPDFDict(object)\n : object instanceof PDFArray ? this.copyPDFArray(object)\n : object instanceof PDFStream ? this.copyPDFStream(object)\n : object instanceof PDFRef ? this.copyPDFIndirectObject(object)\n : object.clone()\n ) as T;\n\n private copyPDFPage = (originalPage: PDFPageLeaf): PDFPageLeaf => {\n const clonedPage = originalPage.clone();\n\n // Move any entries that the originalPage is inheriting from its parent\n // tree nodes directly into originalPage so they are preserved during\n // the copy.\n const { InheritableEntries } = PDFPageLeaf;\n for (let idx = 0, len = InheritableEntries.length; idx < len; idx++) {\n const key = PDFName.of(InheritableEntries[idx]);\n const value = clonedPage.getInheritableAttribute(key)!;\n if (!clonedPage.get(key) && value) clonedPage.set(key, value);\n }\n\n // Remove the parent reference to prevent the whole donor document's page\n // tree from being copied when we only need a single page.\n clonedPage.delete(PDFName.of('Parent'));\n\n return this.copyPDFDict(clonedPage) as PDFPageLeaf;\n };\n\n private copyPDFDict = (originalDict: PDFDict): PDFDict => {\n if (this.traversedObjects.has(originalDict)) {\n return this.traversedObjects.get(originalDict) as PDFDict;\n }\n\n const clonedDict = originalDict.clone(this.dest);\n this.traversedObjects.set(originalDict, clonedDict);\n\n const entries = originalDict.entries();\n\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n clonedDict.set(key, this.copy(value));\n }\n\n return clonedDict;\n };\n\n private copyPDFArray = (originalArray: PDFArray): PDFArray => {\n if (this.traversedObjects.has(originalArray)) {\n return this.traversedObjects.get(originalArray) as PDFArray;\n }\n\n const clonedArray = originalArray.clone(this.dest);\n this.traversedObjects.set(originalArray, clonedArray);\n\n for (let idx = 0, len = originalArray.size(); idx < len; idx++) {\n const value = originalArray.get(idx);\n clonedArray.set(idx, this.copy(value));\n }\n\n return clonedArray;\n };\n\n private copyPDFStream = (originalStream: PDFStream): PDFStream => {\n if (this.traversedObjects.has(originalStream)) {\n return this.traversedObjects.get(originalStream) as PDFStream;\n }\n\n const clonedStream = originalStream.clone(this.dest);\n this.traversedObjects.set(originalStream, clonedStream);\n\n const entries = originalStream.dict.entries();\n for (let idx = 0, len = entries.length; idx < len; idx++) {\n const [key, value] = entries[idx];\n clonedStream.dict.set(key, this.copy(value));\n }\n\n return clonedStream;\n };\n\n private copyPDFIndirectObject = (ref: PDFRef): PDFRef => {\n const alreadyMapped = this.traversedObjects.has(ref);\n\n if (!alreadyMapped) {\n const newRef = this.dest.nextRef();\n this.traversedObjects.set(ref, newRef);\n\n const dereferencedValue = this.src.lookup(ref);\n if (dereferencedValue) {\n const cloned = this.copy(dereferencedValue);\n this.dest.assign(newRef, cloned);\n }\n }\n\n return this.traversedObjects.get(ref) as PDFRef;\n };\n}\n\nexport default PDFObjectCopier;\n","import PDFRef from 'src/core/objects/PDFRef';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { copyStringIntoBuffer, padStart } from 'src/utils';\n\nexport interface Entry {\n ref: PDFRef;\n offset: number;\n deleted: boolean;\n}\n\n/**\n * Entries should be added using the [[addEntry]] and [[addDeletedEntry]]\n * methods **in order of ascending object number**.\n */\nclass PDFCrossRefSection {\n static create = () =>\n new PDFCrossRefSection({\n ref: PDFRef.of(0, 65535),\n offset: 0,\n deleted: true,\n });\n\n static createEmpty = () => new PDFCrossRefSection();\n\n private subsections: Entry[][];\n private chunkIdx: number;\n private chunkLength: number;\n\n private constructor(firstEntry: Entry | void) {\n this.subsections = firstEntry ? [[firstEntry]] : [];\n this.chunkIdx = 0;\n this.chunkLength = firstEntry ? 1 : 0;\n }\n\n addEntry(ref: PDFRef, offset: number): void {\n this.append({ ref, offset, deleted: false });\n }\n\n addDeletedEntry(ref: PDFRef, nextFreeObjectNumber: number): void {\n this.append({ ref, offset: nextFreeObjectNumber, deleted: true });\n }\n\n toString(): string {\n let section = `xref\\n`;\n\n for (\n let rangeIdx = 0, rangeLen = this.subsections.length;\n rangeIdx < rangeLen;\n rangeIdx++\n ) {\n const range = this.subsections[rangeIdx];\n section += `${range[0].ref.objectNumber} ${range.length}\\n`;\n for (\n let entryIdx = 0, entryLen = range.length;\n entryIdx < entryLen;\n entryIdx++\n ) {\n const entry = range[entryIdx];\n section += padStart(String(entry.offset), 10, '0');\n section += ' ';\n section += padStart(String(entry.ref.generationNumber), 5, '0');\n section += ' ';\n section += entry.deleted ? 'f' : 'n';\n section += ' \\n';\n }\n }\n\n return section;\n }\n\n sizeInBytes(): number {\n let size = 5;\n for (let idx = 0, len = this.subsections.length; idx < len; idx++) {\n const subsection = this.subsections[idx];\n const subsectionLength = subsection.length;\n const [firstEntry] = subsection;\n size += 2;\n size += String(firstEntry.ref.objectNumber).length;\n size += String(subsectionLength).length;\n size += 20 * subsectionLength;\n }\n return size;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n buffer[offset++] = CharCodes.x;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.f;\n buffer[offset++] = CharCodes.Newline;\n\n offset += this.copySubsectionsIntoBuffer(this.subsections, buffer, offset);\n\n return offset - initialOffset;\n }\n\n private copySubsectionsIntoBuffer(\n subsections: Entry[][],\n buffer: Uint8Array,\n offset: number,\n ): number {\n const initialOffset = offset;\n const length = subsections.length;\n\n for (let idx = 0; idx < length; idx++) {\n const subsection = this.subsections[idx];\n\n const firstObjectNumber = String(subsection[0].ref.objectNumber);\n offset += copyStringIntoBuffer(firstObjectNumber, buffer, offset);\n buffer[offset++] = CharCodes.Space;\n\n const rangeLength = String(subsection.length);\n offset += copyStringIntoBuffer(rangeLength, buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n\n offset += this.copyEntriesIntoBuffer(subsection, buffer, offset);\n }\n\n return offset - initialOffset;\n }\n\n private copyEntriesIntoBuffer(\n entries: Entry[],\n buffer: Uint8Array,\n offset: number,\n ): number {\n const length = entries.length;\n\n for (let idx = 0; idx < length; idx++) {\n const entry = entries[idx];\n\n const entryOffset = padStart(String(entry.offset), 10, '0');\n offset += copyStringIntoBuffer(entryOffset, buffer, offset);\n buffer[offset++] = CharCodes.Space;\n\n const entryGen = padStart(String(entry.ref.generationNumber), 5, '0');\n offset += copyStringIntoBuffer(entryGen, buffer, offset);\n buffer[offset++] = CharCodes.Space;\n\n buffer[offset++] = entry.deleted ? CharCodes.f : CharCodes.n;\n\n buffer[offset++] = CharCodes.Space;\n buffer[offset++] = CharCodes.Newline;\n }\n\n return 20 * length;\n }\n\n private append(currEntry: Entry): void {\n if (this.chunkLength === 0) {\n this.subsections.push([currEntry]);\n this.chunkIdx = 0;\n this.chunkLength = 1;\n return;\n }\n\n const chunk = this.subsections[this.chunkIdx];\n const prevEntry = chunk[this.chunkLength - 1];\n\n if (currEntry.ref.objectNumber - prevEntry.ref.objectNumber > 1) {\n this.subsections.push([currEntry]);\n this.chunkIdx += 1;\n this.chunkLength = 1;\n } else {\n chunk.push(currEntry);\n this.chunkLength += 1;\n }\n }\n}\n\nexport default PDFCrossRefSection;\n","import CharCodes from 'src/core/syntax/CharCodes';\nimport { copyStringIntoBuffer } from 'src/utils';\n\nclass PDFTrailer {\n static forLastCrossRefSectionOffset = (offset: number) =>\n new PDFTrailer(offset);\n\n private readonly lastXRefOffset: string;\n\n private constructor(lastXRefOffset: number) {\n this.lastXRefOffset = String(lastXRefOffset);\n }\n\n toString(): string {\n return `startxref\\n${this.lastXRefOffset}\\n%%EOF`;\n }\n\n sizeInBytes(): number {\n return 16 + this.lastXRefOffset.length;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n buffer[offset++] = CharCodes.s;\n buffer[offset++] = CharCodes.t;\n buffer[offset++] = CharCodes.a;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.t;\n buffer[offset++] = CharCodes.x;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.f;\n buffer[offset++] = CharCodes.Newline;\n\n offset += copyStringIntoBuffer(this.lastXRefOffset, buffer, offset);\n\n buffer[offset++] = CharCodes.Newline;\n buffer[offset++] = CharCodes.Percent;\n buffer[offset++] = CharCodes.Percent;\n buffer[offset++] = CharCodes.E;\n buffer[offset++] = CharCodes.O;\n buffer[offset++] = CharCodes.F;\n\n return offset - initialOffset;\n }\n}\n\nexport default PDFTrailer;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\nclass PDFTrailerDict {\n static of = (dict: PDFDict) => new PDFTrailerDict(dict);\n\n readonly dict: PDFDict;\n\n private constructor(dict: PDFDict) {\n this.dict = dict;\n }\n\n toString(): string {\n return `trailer\\n${this.dict.toString()}`;\n }\n\n sizeInBytes(): number {\n return 8 + this.dict.sizeInBytes();\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const initialOffset = offset;\n\n buffer[offset++] = CharCodes.t;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.a;\n buffer[offset++] = CharCodes.i;\n buffer[offset++] = CharCodes.l;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.r;\n buffer[offset++] = CharCodes.Newline;\n\n offset += this.dict.copyBytesInto(buffer, offset);\n\n return offset - initialOffset;\n }\n}\n\nexport default PDFTrailerDict;\n","import PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFFlateStream from 'src/core/structures/PDFFlateStream';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { copyStringIntoBuffer, last } from 'src/utils';\n\nexport type IndirectObject = [PDFRef, PDFObject];\n\nclass PDFObjectStream extends PDFFlateStream {\n static withContextAndObjects = (\n context: PDFContext,\n objects: IndirectObject[],\n encode = true,\n ) => new PDFObjectStream(context, objects, encode);\n\n private readonly objects: IndirectObject[];\n private readonly offsets: [number, number][];\n private readonly offsetsString: string;\n\n private constructor(\n context: PDFContext,\n objects: IndirectObject[],\n encode = true,\n ) {\n super(context.obj({}), encode);\n\n this.objects = objects;\n this.offsets = this.computeObjectOffsets();\n this.offsetsString = this.computeOffsetsString();\n\n this.dict.set(PDFName.of('Type'), PDFName.of('ObjStm'));\n this.dict.set(PDFName.of('N'), PDFNumber.of(this.objects.length));\n this.dict.set(PDFName.of('First'), PDFNumber.of(this.offsetsString.length));\n }\n\n getObjectsCount(): number {\n return this.objects.length;\n }\n\n clone(context?: PDFContext): PDFObjectStream {\n return PDFObjectStream.withContextAndObjects(\n context || this.dict.context,\n this.objects.slice(),\n this.encode,\n );\n }\n\n getContentsString(): string {\n let value = this.offsetsString;\n for (let idx = 0, len = this.objects.length; idx < len; idx++) {\n const [, object] = this.objects[idx];\n value += `${object}\\n`;\n }\n return value;\n }\n\n getUnencodedContents(): Uint8Array {\n const buffer = new Uint8Array(this.getUnencodedContentsSize());\n let offset = copyStringIntoBuffer(this.offsetsString, buffer, 0);\n for (let idx = 0, len = this.objects.length; idx < len; idx++) {\n const [, object] = this.objects[idx];\n offset += object.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n }\n return buffer;\n }\n\n getUnencodedContentsSize(): number {\n return (\n this.offsetsString.length +\n last(this.offsets)[1] +\n last(this.objects)[1].sizeInBytes() +\n 1\n );\n }\n\n private computeOffsetsString(): string {\n let offsetsString = '';\n for (let idx = 0, len = this.offsets.length; idx < len; idx++) {\n const [objectNumber, offset] = this.offsets[idx];\n offsetsString += `${objectNumber} ${offset} `;\n }\n return offsetsString;\n }\n\n private computeObjectOffsets(): [number, number][] {\n let offset = 0;\n const offsets = new Array(this.objects.length);\n for (let idx = 0, len = this.objects.length; idx < len; idx++) {\n const [ref, object] = this.objects[idx];\n offsets[idx] = [ref.objectNumber, offset];\n offset += object.sizeInBytes() + 1; // '\\n'\n }\n return offsets;\n }\n}\n\nexport default PDFObjectStream;\n","import PDFCrossRefSection from 'src/core/document/PDFCrossRefSection';\nimport PDFHeader from 'src/core/document/PDFHeader';\nimport PDFTrailer from 'src/core/document/PDFTrailer';\nimport PDFTrailerDict from 'src/core/document/PDFTrailerDict';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFObjectStream from 'src/core/structures/PDFObjectStream';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { copyStringIntoBuffer, waitForTick } from 'src/utils';\n\nexport interface SerializationInfo {\n size: number;\n header: PDFHeader;\n indirectObjects: [PDFRef, PDFObject][];\n xref?: PDFCrossRefSection;\n trailerDict?: PDFTrailerDict;\n trailer: PDFTrailer;\n}\n\nclass PDFWriter {\n static forContext = (context: PDFContext, objectsPerTick: number) =>\n new PDFWriter(context, objectsPerTick);\n\n protected readonly context: PDFContext;\n\n protected readonly objectsPerTick: number;\n private parsedObjects = 0;\n\n protected constructor(context: PDFContext, objectsPerTick: number) {\n this.context = context;\n this.objectsPerTick = objectsPerTick;\n }\n\n async serializeToBuffer(): Promise {\n const {\n size,\n header,\n indirectObjects,\n xref,\n trailerDict,\n trailer,\n } = await this.computeBufferSize();\n\n let offset = 0;\n const buffer = new Uint8Array(size);\n\n offset += header.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n buffer[offset++] = CharCodes.Newline;\n\n for (let idx = 0, len = indirectObjects.length; idx < len; idx++) {\n const [ref, object] = indirectObjects[idx];\n\n const objectNumber = String(ref.objectNumber);\n offset += copyStringIntoBuffer(objectNumber, buffer, offset);\n buffer[offset++] = CharCodes.Space;\n\n const generationNumber = String(ref.generationNumber);\n offset += copyStringIntoBuffer(generationNumber, buffer, offset);\n buffer[offset++] = CharCodes.Space;\n\n buffer[offset++] = CharCodes.o;\n buffer[offset++] = CharCodes.b;\n buffer[offset++] = CharCodes.j;\n buffer[offset++] = CharCodes.Newline;\n\n offset += object.copyBytesInto(buffer, offset);\n\n buffer[offset++] = CharCodes.Newline;\n buffer[offset++] = CharCodes.e;\n buffer[offset++] = CharCodes.n;\n buffer[offset++] = CharCodes.d;\n buffer[offset++] = CharCodes.o;\n buffer[offset++] = CharCodes.b;\n buffer[offset++] = CharCodes.j;\n buffer[offset++] = CharCodes.Newline;\n buffer[offset++] = CharCodes.Newline;\n\n const n =\n object instanceof PDFObjectStream ? object.getObjectsCount() : 1;\n if (this.shouldWaitForTick(n)) await waitForTick();\n }\n\n if (xref) {\n offset += xref.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n }\n\n if (trailerDict) {\n offset += trailerDict.copyBytesInto(buffer, offset);\n buffer[offset++] = CharCodes.Newline;\n buffer[offset++] = CharCodes.Newline;\n }\n\n offset += trailer.copyBytesInto(buffer, offset);\n\n return buffer;\n }\n\n protected computeIndirectObjectSize([ref, object]: [\n PDFRef,\n PDFObject,\n ]): number {\n const refSize = ref.sizeInBytes() + 3; // 'R' -> 'obj\\n'\n const objectSize = object.sizeInBytes() + 9; // '\\nendobj\\n\\n'\n return refSize + objectSize;\n }\n\n protected createTrailerDict(): PDFDict {\n return this.context.obj({\n Size: this.context.largestObjectNumber + 1,\n Root: this.context.trailerInfo.Root,\n Encrypt: this.context.trailerInfo.Encrypt,\n Info: this.context.trailerInfo.Info,\n ID: this.context.trailerInfo.ID,\n });\n }\n\n protected async computeBufferSize(): Promise {\n const header = PDFHeader.forVersion(1, 7);\n\n let size = header.sizeInBytes() + 2;\n\n const xref = PDFCrossRefSection.create();\n\n const indirectObjects = this.context.enumerateIndirectObjects();\n\n for (let idx = 0, len = indirectObjects.length; idx < len; idx++) {\n const indirectObject = indirectObjects[idx];\n const [ref] = indirectObject;\n xref.addEntry(ref, size);\n size += this.computeIndirectObjectSize(indirectObject);\n if (this.shouldWaitForTick(1)) await waitForTick();\n }\n\n const xrefOffset = size;\n size += xref.sizeInBytes() + 1; // '\\n'\n\n const trailerDict = PDFTrailerDict.of(this.createTrailerDict());\n size += trailerDict.sizeInBytes() + 2; // '\\n\\n'\n\n const trailer = PDFTrailer.forLastCrossRefSectionOffset(xrefOffset);\n size += trailer.sizeInBytes();\n\n return { size, header, indirectObjects, xref, trailerDict, trailer };\n }\n\n protected shouldWaitForTick = (n: number) => {\n this.parsedObjects += n;\n return this.parsedObjects % this.objectsPerTick === 0;\n };\n}\n\nexport default PDFWriter;\n","import PDFObject from 'src/core/objects/PDFObject';\n\nclass PDFInvalidObject extends PDFObject {\n static of = (data: Uint8Array) => new PDFInvalidObject(data);\n\n private readonly data: Uint8Array;\n\n private constructor(data: Uint8Array) {\n super();\n this.data = data;\n }\n\n clone(): PDFInvalidObject {\n return PDFInvalidObject.of(this.data.slice());\n }\n\n toString(): string {\n return `PDFInvalidObject(${this.data.length} bytes)`;\n }\n\n sizeInBytes(): number {\n return this.data.length;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n const length = this.data.length;\n for (let idx = 0; idx < length; idx++) {\n buffer[offset++] = this.data[idx];\n }\n return length;\n }\n}\n\nexport default PDFInvalidObject;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFFlateStream from 'src/core/structures/PDFFlateStream';\nimport { bytesFor, Cache, reverseArray, sizeInBytes, sum } from 'src/utils';\n\nexport enum EntryType {\n Deleted = 0,\n Uncompressed = 1,\n Compressed = 2,\n}\n\nexport interface DeletedEntry {\n type: EntryType.Deleted;\n ref: PDFRef;\n nextFreeObjectNumber: number;\n}\n\nexport interface UncompressedEntry {\n type: EntryType.Uncompressed;\n ref: PDFRef;\n offset: number;\n}\n\nexport interface CompressedEntry {\n type: EntryType.Compressed;\n ref: PDFRef;\n objectStreamRef: PDFRef;\n index: number;\n}\n\nexport type Entry = DeletedEntry | UncompressedEntry | CompressedEntry;\n\nexport type EntryTuple = [number, number, number];\n\n/**\n * Entries should be added using the [[addDeletedEntry]],\n * [[addUncompressedEntry]], and [[addCompressedEntry]] methods\n * **in order of ascending object number**.\n */\nclass PDFCrossRefStream extends PDFFlateStream {\n static create = (dict: PDFDict, encode = true) => {\n const stream = new PDFCrossRefStream(dict, [], encode);\n stream.addDeletedEntry(PDFRef.of(0, 65535), 0);\n return stream;\n };\n\n static of = (dict: PDFDict, entries: Entry[], encode = true) =>\n new PDFCrossRefStream(dict, entries, encode);\n\n private readonly entries: Entry[];\n private readonly entryTuplesCache: Cache;\n private readonly maxByteWidthsCache: Cache<[number, number, number]>;\n private readonly indexCache: Cache;\n\n private constructor(dict: PDFDict, entries?: Entry[], encode = true) {\n super(dict, encode);\n\n this.entries = entries || [];\n this.entryTuplesCache = Cache.populatedBy(this.computeEntryTuples);\n this.maxByteWidthsCache = Cache.populatedBy(this.computeMaxEntryByteWidths);\n this.indexCache = Cache.populatedBy(this.computeIndex);\n\n dict.set(PDFName.of('Type'), PDFName.of('XRef'));\n }\n\n addDeletedEntry(ref: PDFRef, nextFreeObjectNumber: number) {\n const type = EntryType.Deleted;\n this.entries.push({ type, ref, nextFreeObjectNumber });\n this.entryTuplesCache.invalidate();\n this.maxByteWidthsCache.invalidate();\n this.indexCache.invalidate();\n this.contentsCache.invalidate();\n }\n\n addUncompressedEntry(ref: PDFRef, offset: number) {\n const type = EntryType.Uncompressed;\n this.entries.push({ type, ref, offset });\n this.entryTuplesCache.invalidate();\n this.maxByteWidthsCache.invalidate();\n this.indexCache.invalidate();\n this.contentsCache.invalidate();\n }\n\n addCompressedEntry(ref: PDFRef, objectStreamRef: PDFRef, index: number) {\n const type = EntryType.Compressed;\n this.entries.push({ type, ref, objectStreamRef, index });\n this.entryTuplesCache.invalidate();\n this.maxByteWidthsCache.invalidate();\n this.indexCache.invalidate();\n this.contentsCache.invalidate();\n }\n\n clone(context?: PDFContext): PDFCrossRefStream {\n const { dict, entries, encode } = this;\n return PDFCrossRefStream.of(dict.clone(context), entries.slice(), encode);\n }\n\n getContentsString(): string {\n const entryTuples = this.entryTuplesCache.access();\n const byteWidths = this.maxByteWidthsCache.access();\n let value = '';\n\n for (\n let entryIdx = 0, entriesLen = entryTuples.length;\n entryIdx < entriesLen;\n entryIdx++\n ) {\n const [first, second, third] = entryTuples[entryIdx];\n\n const firstBytes = reverseArray(bytesFor(first));\n const secondBytes = reverseArray(bytesFor(second));\n const thirdBytes = reverseArray(bytesFor(third));\n\n for (let idx = byteWidths[0] - 1; idx >= 0; idx--) {\n value += (firstBytes[idx] || 0).toString(2);\n }\n for (let idx = byteWidths[1] - 1; idx >= 0; idx--) {\n value += (secondBytes[idx] || 0).toString(2);\n }\n for (let idx = byteWidths[2] - 1; idx >= 0; idx--) {\n value += (thirdBytes[idx] || 0).toString(2);\n }\n }\n\n return value;\n }\n\n getUnencodedContents(): Uint8Array {\n const entryTuples = this.entryTuplesCache.access();\n const byteWidths = this.maxByteWidthsCache.access();\n const buffer = new Uint8Array(this.getUnencodedContentsSize());\n\n let offset = 0;\n for (\n let entryIdx = 0, entriesLen = entryTuples.length;\n entryIdx < entriesLen;\n entryIdx++\n ) {\n const [first, second, third] = entryTuples[entryIdx];\n\n const firstBytes = reverseArray(bytesFor(first));\n const secondBytes = reverseArray(bytesFor(second));\n const thirdBytes = reverseArray(bytesFor(third));\n\n for (let idx = byteWidths[0] - 1; idx >= 0; idx--) {\n buffer[offset++] = firstBytes[idx] || 0;\n }\n for (let idx = byteWidths[1] - 1; idx >= 0; idx--) {\n buffer[offset++] = secondBytes[idx] || 0;\n }\n for (let idx = byteWidths[2] - 1; idx >= 0; idx--) {\n buffer[offset++] = thirdBytes[idx] || 0;\n }\n }\n\n return buffer;\n }\n\n getUnencodedContentsSize(): number {\n const byteWidths = this.maxByteWidthsCache.access();\n const entryWidth = sum(byteWidths);\n return entryWidth * this.entries.length;\n }\n\n updateDict(): void {\n super.updateDict();\n\n const byteWidths = this.maxByteWidthsCache.access();\n const index = this.indexCache.access();\n\n const { context } = this.dict;\n this.dict.set(PDFName.of('W'), context.obj(byteWidths));\n this.dict.set(PDFName.of('Index'), context.obj(index));\n }\n\n // Returns an array of integer pairs for each subsection of the cross ref\n // section, where each integer pair represents:\n // firstObjectNumber(OfSection), length(OfSection)\n private computeIndex = (): number[] => {\n const subsections: number[] = [];\n\n let subsectionLength = 0;\n for (let idx = 0, len = this.entries.length; idx < len; idx++) {\n const currEntry = this.entries[idx];\n const prevEntry = this.entries[idx - 1];\n\n if (idx === 0) {\n subsections.push(currEntry.ref.objectNumber);\n } else if (currEntry.ref.objectNumber - prevEntry.ref.objectNumber > 1) {\n subsections.push(subsectionLength);\n subsections.push(currEntry.ref.objectNumber);\n subsectionLength = 0;\n }\n\n subsectionLength += 1;\n }\n subsections.push(subsectionLength);\n\n return subsections;\n };\n\n private computeEntryTuples = (): EntryTuple[] => {\n const entryTuples: EntryTuple[] = new Array(this.entries.length);\n\n for (let idx = 0, len = this.entries.length; idx < len; idx++) {\n const entry = this.entries[idx];\n if (entry.type === EntryType.Deleted) {\n const { type, nextFreeObjectNumber, ref } = entry;\n entryTuples[idx] = [type, nextFreeObjectNumber, ref.generationNumber];\n }\n if (entry.type === EntryType.Uncompressed) {\n const { type, offset, ref } = entry;\n entryTuples[idx] = [type, offset, ref.generationNumber];\n }\n if (entry.type === EntryType.Compressed) {\n const { type, objectStreamRef, index } = entry;\n entryTuples[idx] = [type, objectStreamRef.objectNumber, index];\n }\n }\n\n return entryTuples;\n };\n\n private computeMaxEntryByteWidths = (): [number, number, number] => {\n const entryTuples = this.entryTuplesCache.access();\n const widths: [number, number, number] = [0, 0, 0];\n\n for (let idx = 0, len = entryTuples.length; idx < len; idx++) {\n const [first, second, third] = entryTuples[idx];\n\n const firstSize = sizeInBytes(first);\n const secondSize = sizeInBytes(second);\n const thirdSize = sizeInBytes(third);\n\n if (firstSize > widths[0]) widths[0] = firstSize;\n if (secondSize > widths[1]) widths[1] = secondSize;\n if (thirdSize > widths[2]) widths[2] = thirdSize;\n }\n\n return widths;\n };\n}\n\nexport default PDFCrossRefStream;\n","import PDFHeader from 'src/core/document/PDFHeader';\nimport PDFTrailer from 'src/core/document/PDFTrailer';\nimport PDFInvalidObject from 'src/core/objects/PDFInvalidObject';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFCrossRefStream from 'src/core/structures/PDFCrossRefStream';\nimport PDFObjectStream from 'src/core/structures/PDFObjectStream';\nimport PDFWriter from 'src/core/writers/PDFWriter';\nimport { last, waitForTick } from 'src/utils';\n\nclass PDFStreamWriter extends PDFWriter {\n static forContext = (\n context: PDFContext,\n objectsPerTick: number,\n encodeStreams = true,\n objectsPerStream = 50,\n ) =>\n new PDFStreamWriter(\n context,\n objectsPerTick,\n encodeStreams,\n objectsPerStream,\n );\n\n private readonly encodeStreams: boolean;\n private readonly objectsPerStream: number;\n\n private constructor(\n context: PDFContext,\n objectsPerTick: number,\n encodeStreams: boolean,\n objectsPerStream: number,\n ) {\n super(context, objectsPerTick);\n\n this.encodeStreams = encodeStreams;\n this.objectsPerStream = objectsPerStream;\n }\n\n protected async computeBufferSize() {\n let objectNumber = this.context.largestObjectNumber + 1;\n\n const header = PDFHeader.forVersion(1, 7);\n\n let size = header.sizeInBytes() + 2;\n\n const xrefStream = PDFCrossRefStream.create(\n this.createTrailerDict(),\n this.encodeStreams,\n );\n\n const uncompressedObjects: [PDFRef, PDFObject][] = [];\n const compressedObjects: [PDFRef, PDFObject][][] = [];\n const objectStreamRefs: PDFRef[] = [];\n\n const indirectObjects = this.context.enumerateIndirectObjects();\n for (let idx = 0, len = indirectObjects.length; idx < len; idx++) {\n const indirectObject = indirectObjects[idx];\n const [ref, object] = indirectObject;\n\n const shouldNotCompress =\n ref === this.context.trailerInfo.Encrypt ||\n object instanceof PDFStream ||\n object instanceof PDFInvalidObject ||\n ref.generationNumber !== 0;\n\n if (shouldNotCompress) {\n uncompressedObjects.push(indirectObject);\n xrefStream.addUncompressedEntry(ref, size);\n size += this.computeIndirectObjectSize(indirectObject);\n if (this.shouldWaitForTick(1)) await waitForTick();\n } else {\n let chunk = last(compressedObjects);\n let objectStreamRef = last(objectStreamRefs);\n if (!chunk || chunk.length % this.objectsPerStream === 0) {\n chunk = [];\n compressedObjects.push(chunk);\n objectStreamRef = PDFRef.of(objectNumber++);\n objectStreamRefs.push(objectStreamRef);\n }\n xrefStream.addCompressedEntry(ref, objectStreamRef, chunk.length);\n chunk.push(indirectObject);\n }\n }\n\n for (let idx = 0, len = compressedObjects.length; idx < len; idx++) {\n const chunk = compressedObjects[idx];\n const ref = objectStreamRefs[idx];\n\n const objectStream = PDFObjectStream.withContextAndObjects(\n this.context,\n chunk,\n this.encodeStreams,\n );\n\n xrefStream.addUncompressedEntry(ref, size);\n size += this.computeIndirectObjectSize([ref, objectStream]);\n\n uncompressedObjects.push([ref, objectStream]);\n\n if (this.shouldWaitForTick(chunk.length)) await waitForTick();\n }\n\n const xrefStreamRef = PDFRef.of(objectNumber++);\n xrefStream.dict.set(PDFName.of('Size'), PDFNumber.of(objectNumber));\n xrefStream.addUncompressedEntry(xrefStreamRef, size);\n const xrefOffset = size;\n size += this.computeIndirectObjectSize([xrefStreamRef, xrefStream]);\n\n uncompressedObjects.push([xrefStreamRef, xrefStream]);\n\n const trailer = PDFTrailer.forLastCrossRefSectionOffset(xrefOffset);\n size += trailer.sizeInBytes();\n\n return { size, header, indirectObjects: uncompressedObjects, trailer };\n }\n}\n\nexport default PDFStreamWriter;\n","import PDFObject from 'src/core/objects/PDFObject';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport {\n copyStringIntoBuffer,\n toHexStringOfMinLength,\n utf16Decode,\n utf16Encode,\n pdfDocEncodingDecode,\n parseDate,\n hasUtf16BOM,\n} from 'src/utils';\nimport { InvalidPDFDateStringError } from 'src/core/errors';\n\nclass PDFHexString extends PDFObject {\n static of = (value: string) => new PDFHexString(value);\n\n static fromText = (value: string) => {\n const encoded = utf16Encode(value);\n\n let hex = '';\n for (let idx = 0, len = encoded.length; idx < len; idx++) {\n hex += toHexStringOfMinLength(encoded[idx], 4);\n }\n\n return new PDFHexString(hex);\n };\n\n private readonly value: string;\n\n constructor(value: string) {\n super();\n this.value = value;\n }\n\n asBytes(): Uint8Array {\n // Append a zero if the number of digits is odd. See PDF spec 7.3.4.3\n const hex = this.value + (this.value.length % 2 === 1 ? '0' : '');\n const hexLength = hex.length;\n\n const bytes = new Uint8Array(hex.length / 2);\n\n let hexOffset = 0;\n let bytesOffset = 0;\n\n // Interpret each pair of hex digits as a single byte\n while (hexOffset < hexLength) {\n const byte = parseInt(hex.substring(hexOffset, hexOffset + 2), 16);\n bytes[bytesOffset] = byte;\n\n hexOffset += 2;\n bytesOffset += 1;\n }\n\n return bytes;\n }\n\n decodeText(): string {\n const bytes = this.asBytes();\n if (hasUtf16BOM(bytes)) return utf16Decode(bytes);\n return pdfDocEncodingDecode(bytes);\n }\n\n decodeDate(): Date {\n const text = this.decodeText();\n const date = parseDate(text);\n if (!date) throw new InvalidPDFDateStringError(text);\n return date;\n }\n\n asString(): string {\n return this.value;\n }\n\n clone(): PDFHexString {\n return PDFHexString.of(this.value);\n }\n\n toString(): string {\n return `<${this.value}>`;\n }\n\n sizeInBytes(): number {\n return this.value.length + 2;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n buffer[offset++] = CharCodes.LessThan;\n offset += copyStringIntoBuffer(this.value, buffer, offset);\n buffer[offset++] = CharCodes.GreaterThan;\n return this.value.length + 2;\n }\n}\n\nexport default PDFHexString;\n","import {\n Encodings,\n Font,\n FontNames,\n EncodingType,\n} from '@pdf-lib/standard-fonts';\n\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport { toCodePoint, toHexString } from 'src/utils';\n\nexport interface Glyph {\n code: number;\n name: string;\n}\n\n/**\n * A note of thanks to the developers of https://github.com/foliojs/pdfkit, as\n * this class borrows from:\n * https://github.com/foliojs/pdfkit/blob/f91bdd61c164a72ea06be1a43dc0a412afc3925f/lib/font/afm.coffee\n */\nclass StandardFontEmbedder {\n static for = (fontName: FontNames, customName?: string) =>\n new StandardFontEmbedder(fontName, customName);\n\n readonly font: Font;\n readonly encoding: EncodingType;\n readonly fontName: string;\n readonly customName: string | undefined;\n\n private constructor(fontName: FontNames, customName?: string) {\n // prettier-ignore\n this.encoding = (\n fontName === FontNames.ZapfDingbats ? Encodings.ZapfDingbats\n : fontName === FontNames.Symbol ? Encodings.Symbol\n : Encodings.WinAnsi\n );\n this.font = Font.load(fontName);\n this.fontName = this.font.FontName;\n this.customName = customName;\n }\n\n /**\n * Encode the JavaScript string into this font. (JavaScript encodes strings in\n * Unicode, but standard fonts use either WinAnsi, ZapfDingbats, or Symbol\n * encodings)\n */\n encodeText(text: string): PDFHexString {\n const glyphs = this.encodeTextAsGlyphs(text);\n const hexCodes = new Array(glyphs.length);\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n hexCodes[idx] = toHexString(glyphs[idx].code);\n }\n return PDFHexString.of(hexCodes.join(''));\n }\n\n widthOfTextAtSize(text: string, size: number): number {\n const glyphs = this.encodeTextAsGlyphs(text);\n let totalWidth = 0;\n\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n const left = glyphs[idx].name;\n const right = (glyphs[idx + 1] || {}).name;\n const kernAmount = this.font.getXAxisKerningForPair(left, right) || 0;\n totalWidth += this.widthOfGlyph(left) + kernAmount;\n }\n\n const scale = size / 1000;\n return totalWidth * scale;\n }\n\n heightOfFontAtSize(\n size: number,\n options: { descender?: boolean } = {},\n ): number {\n const { descender = true } = options;\n\n const { Ascender, Descender, FontBBox } = this.font;\n const yTop = Ascender || FontBBox[3];\n const yBottom = Descender || FontBBox[1];\n\n let height = yTop - yBottom;\n if (!descender) height += Descender || 0;\n\n return (height / 1000) * size;\n }\n\n sizeOfFontAtHeight(height: number): number {\n const { Ascender, Descender, FontBBox } = this.font;\n const yTop = Ascender || FontBBox[3];\n const yBottom = Descender || FontBBox[1];\n return (1000 * height) / (yTop - yBottom);\n }\n\n embedIntoContext(context: PDFContext, ref?: PDFRef): PDFRef {\n const fontDict = context.obj({\n Type: 'Font',\n Subtype: 'Type1',\n BaseFont: this.customName || this.fontName,\n\n Encoding:\n this.encoding === Encodings.WinAnsi ? 'WinAnsiEncoding' : undefined,\n });\n\n if (ref) {\n context.assign(ref, fontDict);\n return ref;\n } else {\n return context.register(fontDict);\n }\n }\n\n private widthOfGlyph(glyphName: string): number {\n // Default to 250 if font doesn't specify a width\n return this.font.getWidthOfGlyph(glyphName) || 250;\n }\n\n private encodeTextAsGlyphs(text: string): Glyph[] {\n const codePoints = Array.from(text);\n const glyphs: Glyph[] = new Array(codePoints.length);\n for (let idx = 0, len = codePoints.length; idx < len; idx++) {\n const codePoint = toCodePoint(codePoints[idx])!;\n glyphs[idx] = this.encoding.encodeUnicodeCodePoint(codePoint);\n }\n return glyphs;\n }\n}\n\nexport default StandardFontEmbedder;\n","import { Glyph } from 'src/types/fontkit';\n\nimport { toHexString, toHexStringOfMinLength } from 'src/utils';\nimport {\n hasSurrogates,\n highSurrogate,\n isWithinBMP,\n lowSurrogate,\n} from 'src/utils/unicode';\n\n/** [fontId, codePoint] */\ntype BfChar = [string, string];\n\n/** `glyphs` should be an array of unique glyphs */\nexport const createCmap = (glyphs: Glyph[], glyphId: (g?: Glyph) => number) => {\n const bfChars: BfChar[] = new Array(glyphs.length);\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n const glyph = glyphs[idx];\n const id = cmapHexFormat(cmapHexString(glyphId(glyph)));\n const unicode = cmapHexFormat(...glyph.codePoints.map(cmapCodePointFormat));\n bfChars[idx] = [id, unicode];\n }\n\n return fillCmapTemplate(bfChars);\n};\n\n/* =============================== Templates ================================ */\n\nconst fillCmapTemplate = (bfChars: BfChar[]) => `\\\n/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n${bfChars.length} beginbfchar\n${bfChars.map(([glyphId, codePoint]) => `${glyphId} ${codePoint}`).join('\\n')}\nendbfchar\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend\\\n`;\n\n/* =============================== Utilities ================================ */\n\nconst cmapHexFormat = (...values: string[]) => `<${values.join('')}>`;\n\nconst cmapHexString = (value: number) => toHexStringOfMinLength(value, 4);\n\nconst cmapCodePointFormat = (codePoint: number) => {\n if (isWithinBMP(codePoint)) return cmapHexString(codePoint);\n\n if (hasSurrogates(codePoint)) {\n const hs = highSurrogate(codePoint);\n const ls = lowSurrogate(codePoint);\n return `${cmapHexString(hs)}${cmapHexString(ls)}`;\n }\n\n const hex = toHexString(codePoint);\n const msg = `0x${hex} is not a valid UTF-8 or UTF-16 codepoint.`;\n throw new Error(msg);\n};\n","import { Font } from 'src/types/fontkit';\n\nexport interface FontFlagOptions {\n fixedPitch?: boolean;\n serif?: boolean;\n symbolic?: boolean;\n script?: boolean;\n nonsymbolic?: boolean;\n italic?: boolean;\n allCap?: boolean;\n smallCap?: boolean;\n forceBold?: boolean;\n}\n\n// prettier-ignore\nconst makeFontFlags = (options: FontFlagOptions) => {\n let flags = 0;\n\n const flipBit = (bit: number) => { flags |= (1 << (bit - 1)); };\n\n if (options.fixedPitch) flipBit(1);\n if (options.serif) flipBit(2);\n if (options.symbolic) flipBit(3);\n if (options.script) flipBit(4);\n if (options.nonsymbolic) flipBit(6);\n if (options.italic) flipBit(7);\n if (options.allCap) flipBit(17);\n if (options.smallCap) flipBit(18);\n if (options.forceBold) flipBit(19);\n\n return flags;\n};\n\n// From: https://github.com/foliojs/pdfkit/blob/83f5f7243172a017adcf6a7faa5547c55982c57b/lib/font/embedded.js#L123-L129\nexport const deriveFontFlags = (font: Font): number => {\n const familyClass = font['OS/2'] ? font['OS/2'].sFamilyClass : 0;\n const flags = makeFontFlags({\n fixedPitch: font.post.isFixedPitch,\n serif: 1 <= familyClass && familyClass <= 7,\n symbolic: true, // Assume the font uses non-latin characters\n script: familyClass === 10,\n italic: font.head.macStyle.italic,\n });\n return flags;\n};\n","import PDFObject from 'src/core/objects/PDFObject';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport {\n copyStringIntoBuffer,\n padStart,\n utf16Decode,\n pdfDocEncodingDecode,\n toCharCode,\n parseDate,\n hasUtf16BOM,\n} from 'src/utils';\nimport { InvalidPDFDateStringError } from 'src/core/errors';\n\nclass PDFString extends PDFObject {\n // The PDF spec allows newlines and parens to appear directly within a literal\n // string. These character _may_ be escaped. But they do not _have_ to be. So\n // for simplicity, we will not bother escaping them.\n static of = (value: string) => new PDFString(value);\n\n static fromDate = (date: Date) => {\n const year = padStart(String(date.getUTCFullYear()), 4, '0');\n const month = padStart(String(date.getUTCMonth() + 1), 2, '0');\n const day = padStart(String(date.getUTCDate()), 2, '0');\n const hours = padStart(String(date.getUTCHours()), 2, '0');\n const mins = padStart(String(date.getUTCMinutes()), 2, '0');\n const secs = padStart(String(date.getUTCSeconds()), 2, '0');\n return new PDFString(`D:${year}${month}${day}${hours}${mins}${secs}Z`);\n };\n\n private readonly value: string;\n\n private constructor(value: string) {\n super();\n this.value = value;\n }\n\n asBytes(): Uint8Array {\n const bytes: number[] = [];\n\n let octal = '';\n let escaped = false;\n\n const pushByte = (byte?: number) => {\n if (byte !== undefined) bytes.push(byte);\n escaped = false;\n };\n\n for (let idx = 0, len = this.value.length; idx < len; idx++) {\n const char = this.value[idx];\n const byte = toCharCode(char);\n const nextChar = this.value[idx + 1];\n if (!escaped) {\n if (byte === CharCodes.BackSlash) escaped = true;\n else pushByte(byte);\n } else {\n if (byte === CharCodes.Newline) pushByte();\n else if (byte === CharCodes.CarriageReturn) pushByte();\n else if (byte === CharCodes.n) pushByte(CharCodes.Newline);\n else if (byte === CharCodes.r) pushByte(CharCodes.CarriageReturn);\n else if (byte === CharCodes.t) pushByte(CharCodes.Tab);\n else if (byte === CharCodes.b) pushByte(CharCodes.Backspace);\n else if (byte === CharCodes.f) pushByte(CharCodes.FormFeed);\n else if (byte === CharCodes.LeftParen) pushByte(CharCodes.LeftParen);\n else if (byte === CharCodes.RightParen) pushByte(CharCodes.RightParen);\n else if (byte === CharCodes.Backspace) pushByte(CharCodes.BackSlash);\n else if (byte >= CharCodes.Zero && byte <= CharCodes.Seven) {\n octal += char;\n if (octal.length === 3 || !(nextChar >= '0' && nextChar <= '7')) {\n pushByte(parseInt(octal, 8));\n octal = '';\n }\n } else {\n pushByte(byte);\n }\n }\n }\n\n return new Uint8Array(bytes);\n }\n\n decodeText(): string {\n const bytes = this.asBytes();\n if (hasUtf16BOM(bytes)) return utf16Decode(bytes);\n return pdfDocEncodingDecode(bytes);\n }\n\n decodeDate(): Date {\n const text = this.decodeText();\n const date = parseDate(text);\n if (!date) throw new InvalidPDFDateStringError(text);\n return date;\n }\n\n asString(): string {\n return this.value;\n }\n\n clone(): PDFString {\n return PDFString.of(this.value);\n }\n\n toString(): string {\n return `(${this.value})`;\n }\n\n sizeInBytes(): number {\n return this.value.length + 2;\n }\n\n copyBytesInto(buffer: Uint8Array, offset: number): number {\n buffer[offset++] = CharCodes.LeftParen;\n offset += copyStringIntoBuffer(this.value, buffer, offset);\n buffer[offset++] = CharCodes.RightParen;\n return this.value.length + 2;\n }\n}\n\nexport default PDFString;\n","import { Font, Fontkit, Glyph, TypeFeatures } from 'src/types/fontkit';\n\nimport { createCmap } from 'src/core/embedders/CMap';\nimport { deriveFontFlags } from 'src/core/embedders/FontFlags';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFContext from 'src/core/PDFContext';\nimport {\n byAscendingId,\n Cache,\n sortedUniq,\n toHexStringOfMinLength,\n} from 'src/utils';\n\n/**\n * A note of thanks to the developers of https://github.com/foliojs/pdfkit, as\n * this class borrows from:\n * https://github.com/devongovett/pdfkit/blob/e71edab0dd4657b5a767804ba86c94c58d01fbca/lib/image/jpeg.coffee\n */\nclass CustomFontEmbedder {\n static async for(\n fontkit: Fontkit,\n fontData: Uint8Array,\n customName?: string,\n fontFeatures?: TypeFeatures,\n ) {\n const font = await fontkit.create(fontData);\n return new CustomFontEmbedder(font, fontData, customName, fontFeatures);\n }\n\n readonly font: Font;\n readonly scale: number;\n readonly fontData: Uint8Array;\n readonly fontName: string;\n readonly customName: string | undefined;\n readonly fontFeatures: TypeFeatures | undefined;\n\n protected baseFontName: string;\n protected glyphCache: Cache;\n\n protected constructor(\n font: Font,\n fontData: Uint8Array,\n customName?: string,\n fontFeatures?: TypeFeatures,\n ) {\n this.font = font;\n this.scale = 1000 / this.font.unitsPerEm;\n this.fontData = fontData;\n this.fontName = this.font.postscriptName || 'Font';\n this.customName = customName;\n this.fontFeatures = fontFeatures;\n\n this.baseFontName = '';\n this.glyphCache = Cache.populatedBy(this.allGlyphsInFontSortedById);\n }\n\n /**\n * Encode the JavaScript string into this font. (JavaScript encodes strings in\n * Unicode, but embedded fonts use their own custom encodings)\n */\n encodeText(text: string): PDFHexString {\n const { glyphs } = this.font.layout(text, this.fontFeatures);\n const hexCodes = new Array(glyphs.length);\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n hexCodes[idx] = toHexStringOfMinLength(glyphs[idx].id, 4);\n }\n return PDFHexString.of(hexCodes.join(''));\n }\n\n // The advanceWidth takes into account kerning automatically, so we don't\n // have to do that manually like we do for the standard fonts.\n widthOfTextAtSize(text: string, size: number): number {\n const { glyphs } = this.font.layout(text, this.fontFeatures);\n let totalWidth = 0;\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n totalWidth += glyphs[idx].advanceWidth * this.scale;\n }\n const scale = size / 1000;\n return totalWidth * scale;\n }\n\n heightOfFontAtSize(\n size: number,\n options: { descender?: boolean } = {},\n ): number {\n const { descender = true } = options;\n\n const { ascent, descent, bbox } = this.font;\n const yTop = (ascent || bbox.maxY) * this.scale;\n const yBottom = (descent || bbox.minY) * this.scale;\n\n let height = yTop - yBottom;\n if (!descender) height -= Math.abs(descent) || 0;\n\n return (height / 1000) * size;\n }\n\n sizeOfFontAtHeight(height: number): number {\n const { ascent, descent, bbox } = this.font;\n const yTop = (ascent || bbox.maxY) * this.scale;\n const yBottom = (descent || bbox.minY) * this.scale;\n return (1000 * height) / (yTop - yBottom);\n }\n\n embedIntoContext(context: PDFContext, ref?: PDFRef): Promise {\n this.baseFontName =\n this.customName || context.addRandomSuffix(this.fontName);\n return this.embedFontDict(context, ref);\n }\n\n protected async embedFontDict(\n context: PDFContext,\n ref?: PDFRef,\n ): Promise {\n const cidFontDictRef = await this.embedCIDFontDict(context);\n const unicodeCMapRef = this.embedUnicodeCmap(context);\n\n const fontDict = context.obj({\n Type: 'Font',\n Subtype: 'Type0',\n BaseFont: this.baseFontName,\n Encoding: 'Identity-H',\n DescendantFonts: [cidFontDictRef],\n ToUnicode: unicodeCMapRef,\n });\n\n if (ref) {\n context.assign(ref, fontDict);\n return ref;\n } else {\n return context.register(fontDict);\n }\n }\n\n protected isCFF(): boolean {\n return this.font.cff;\n }\n\n protected async embedCIDFontDict(context: PDFContext): Promise {\n const fontDescriptorRef = await this.embedFontDescriptor(context);\n\n const cidFontDict = context.obj({\n Type: 'Font',\n Subtype: this.isCFF() ? 'CIDFontType0' : 'CIDFontType2',\n CIDToGIDMap: 'Identity',\n BaseFont: this.baseFontName,\n CIDSystemInfo: {\n Registry: PDFString.of('Adobe'),\n Ordering: PDFString.of('Identity'),\n Supplement: 0,\n },\n FontDescriptor: fontDescriptorRef,\n W: this.computeWidths(),\n });\n\n return context.register(cidFontDict);\n }\n\n protected async embedFontDescriptor(context: PDFContext): Promise {\n const fontStreamRef = await this.embedFontStream(context);\n\n const { scale } = this;\n const { italicAngle, ascent, descent, capHeight, xHeight } = this.font;\n const { minX, minY, maxX, maxY } = this.font.bbox;\n\n const fontDescriptor = context.obj({\n Type: 'FontDescriptor',\n FontName: this.baseFontName,\n Flags: deriveFontFlags(this.font),\n FontBBox: [minX * scale, minY * scale, maxX * scale, maxY * scale],\n ItalicAngle: italicAngle,\n Ascent: ascent * scale,\n Descent: descent * scale,\n CapHeight: (capHeight || ascent) * scale,\n XHeight: (xHeight || 0) * scale,\n\n // Not sure how to compute/find this, nor is anybody else really:\n // https://stackoverflow.com/questions/35485179/stemv-value-of-the-truetype-font\n StemV: 0,\n\n [this.isCFF() ? 'FontFile3' : 'FontFile2']: fontStreamRef,\n });\n\n return context.register(fontDescriptor);\n }\n\n protected async serializeFont(): Promise {\n return this.fontData;\n }\n\n protected async embedFontStream(context: PDFContext): Promise {\n const fontStream = context.flateStream(await this.serializeFont(), {\n Subtype: this.isCFF() ? 'CIDFontType0C' : undefined,\n });\n return context.register(fontStream);\n }\n\n protected embedUnicodeCmap(context: PDFContext): PDFRef {\n const cmap = createCmap(this.glyphCache.access(), this.glyphId.bind(this));\n const cmapStream = context.flateStream(cmap);\n return context.register(cmapStream);\n }\n\n protected glyphId(glyph?: Glyph): number {\n return glyph ? glyph.id : -1;\n }\n\n protected computeWidths(): (number | number[])[] {\n const glyphs = this.glyphCache.access();\n\n const widths: (number | number[])[] = [];\n let currSection: number[] = [];\n\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n const currGlyph = glyphs[idx];\n const prevGlyph = glyphs[idx - 1];\n\n const currGlyphId = this.glyphId(currGlyph);\n const prevGlyphId = this.glyphId(prevGlyph);\n\n if (idx === 0) {\n widths.push(currGlyphId);\n } else if (currGlyphId - prevGlyphId !== 1) {\n widths.push(currSection);\n widths.push(currGlyphId);\n currSection = [];\n }\n\n currSection.push(currGlyph.advanceWidth * this.scale);\n }\n\n widths.push(currSection);\n\n return widths;\n }\n\n private allGlyphsInFontSortedById = (): Glyph[] => {\n const glyphs: Glyph[] = new Array(this.font.characterSet.length);\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n const codePoint = this.font.characterSet[idx];\n glyphs[idx] = this.font.glyphForCodePoint(codePoint);\n }\n return sortedUniq(glyphs.sort(byAscendingId), (g) => g.id);\n };\n}\n\nexport default CustomFontEmbedder;\n","import { Font, Fontkit, Glyph, Subset, TypeFeatures } from 'src/types/fontkit';\n\nimport CustomFontEmbedder from 'src/core/embedders/CustomFontEmbedder';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport { Cache, mergeUint8Arrays, toHexStringOfMinLength } from 'src/utils';\n\n/**\n * A note of thanks to the developers of https://github.com/foliojs/pdfkit, as\n * this class borrows from:\n * https://github.com/devongovett/pdfkit/blob/e71edab0dd4657b5a767804ba86c94c58d01fbca/lib/image/jpeg.coffee\n */\nclass CustomFontSubsetEmbedder extends CustomFontEmbedder {\n static async for(\n fontkit: Fontkit,\n fontData: Uint8Array,\n customFontName?: string,\n fontFeatures?: TypeFeatures,\n ) {\n const font = await fontkit.create(fontData);\n return new CustomFontSubsetEmbedder(\n font,\n fontData,\n customFontName,\n fontFeatures,\n );\n }\n\n private readonly subset: Subset;\n private readonly glyphs: Glyph[];\n private readonly glyphIdMap: Map;\n\n private constructor(\n font: Font,\n fontData: Uint8Array,\n customFontName?: string,\n fontFeatures?: TypeFeatures,\n ) {\n super(font, fontData, customFontName, fontFeatures);\n\n this.subset = this.font.createSubset();\n this.glyphs = [];\n this.glyphCache = Cache.populatedBy(() => this.glyphs);\n this.glyphIdMap = new Map();\n }\n\n encodeText(text: string): PDFHexString {\n const { glyphs } = this.font.layout(text, this.fontFeatures);\n const hexCodes = new Array(glyphs.length);\n\n for (let idx = 0, len = glyphs.length; idx < len; idx++) {\n const glyph = glyphs[idx];\n const subsetGlyphId = this.subset.includeGlyph(glyph);\n\n this.glyphs[subsetGlyphId - 1] = glyph;\n this.glyphIdMap.set(glyph.id, subsetGlyphId);\n\n hexCodes[idx] = toHexStringOfMinLength(subsetGlyphId, 4);\n }\n\n this.glyphCache.invalidate();\n return PDFHexString.of(hexCodes.join(''));\n }\n\n protected isCFF(): boolean {\n return (this.subset as any).cff;\n }\n\n protected glyphId(glyph?: Glyph): number {\n return glyph ? this.glyphIdMap.get(glyph.id)! : -1;\n }\n\n protected serializeFont(): Promise {\n return new Promise((resolve, reject) => {\n const parts: Uint8Array[] = [];\n this.subset\n .encodeStream()\n .on('data', (bytes) => parts.push(bytes))\n .on('end', () => resolve(mergeUint8Arrays(parts)))\n .on('error' as any, (err) => reject(err));\n });\n }\n}\n\nexport default CustomFontSubsetEmbedder;\n","import PDFString from 'src/core/objects/PDFString';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFRef from 'src/core/objects/PDFRef';\n\n/**\n * From the PDF-A3 specification, section **3.1. Requirements - General**.\n * See:\n * * https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf\n */\nexport enum AFRelationship {\n Source = 'Source',\n Data = 'Data',\n Alternative = 'Alternative',\n Supplement = 'Supplement',\n EncryptedPayload = 'EncryptedPayload',\n FormData = 'EncryptedPayload',\n Schema = 'Schema',\n Unspecified = 'Unspecified',\n}\n\nexport interface EmbeddedFileOptions {\n mimeType?: string;\n description?: string;\n creationDate?: Date;\n modificationDate?: Date;\n afRelationship?: AFRelationship;\n}\n\nclass FileEmbedder {\n static for(\n bytes: Uint8Array,\n fileName: string,\n options: EmbeddedFileOptions = {},\n ) {\n return new FileEmbedder(bytes, fileName, options);\n }\n\n private readonly fileData: Uint8Array;\n readonly fileName: string;\n readonly options: EmbeddedFileOptions;\n\n private constructor(\n fileData: Uint8Array,\n fileName: string,\n options: EmbeddedFileOptions = {},\n ) {\n this.fileData = fileData;\n this.fileName = fileName;\n this.options = options;\n }\n\n async embedIntoContext(context: PDFContext, ref?: PDFRef): Promise {\n const {\n mimeType,\n description,\n creationDate,\n modificationDate,\n afRelationship,\n } = this.options;\n\n const embeddedFileStream = context.flateStream(this.fileData, {\n Type: 'EmbeddedFile',\n Subtype: mimeType ?? undefined,\n Params: {\n Size: this.fileData.length,\n CreationDate: creationDate\n ? PDFString.fromDate(creationDate)\n : undefined,\n ModDate: modificationDate\n ? PDFString.fromDate(modificationDate)\n : undefined,\n },\n });\n const embeddedFileStreamRef = context.register(embeddedFileStream);\n\n const fileSpecDict = context.obj({\n Type: 'Filespec',\n F: PDFString.of(this.fileName), // TODO: Assert that this is plain ASCII\n UF: PDFHexString.fromText(this.fileName),\n EF: { F: embeddedFileStreamRef },\n Desc: description ? PDFHexString.fromText(description) : undefined,\n AFRelationship: afRelationship ?? undefined,\n });\n\n if (ref) {\n context.assign(ref, fileSpecDict);\n return ref;\n } else {\n return context.register(fileSpecDict);\n }\n }\n}\n\nexport default FileEmbedder;\n","import PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\n\n// prettier-ignore\nconst MARKERS = [\n 0xffc0, 0xffc1, 0xffc2,\n 0xffc3, 0xffc5, 0xffc6,\n 0xffc7, 0xffc8, 0xffc9,\n 0xffca, 0xffcb, 0xffcc,\n 0xffcd, 0xffce, 0xffcf,\n];\n\nenum ColorSpace {\n DeviceGray = 'DeviceGray',\n DeviceRGB = 'DeviceRGB',\n DeviceCMYK = 'DeviceCMYK',\n}\n\nconst ChannelToColorSpace: { [idx: number]: ColorSpace | undefined } = {\n 1: ColorSpace.DeviceGray,\n 3: ColorSpace.DeviceRGB,\n 4: ColorSpace.DeviceCMYK,\n};\n\n/**\n * A note of thanks to the developers of https://github.com/foliojs/pdfkit, as\n * this class borrows from:\n * https://github.com/foliojs/pdfkit/blob/a6af76467ce06bd6a2af4aa7271ccac9ff152a7d/lib/image/jpeg.js\n */\nclass JpegEmbedder {\n static async for(imageData: Uint8Array) {\n const dataView = new DataView(imageData.buffer);\n\n const soi = dataView.getUint16(0);\n if (soi !== 0xffd8) throw new Error('SOI not found in JPEG');\n\n let pos = 2;\n let marker: number;\n\n while (pos < dataView.byteLength) {\n marker = dataView.getUint16(pos);\n pos += 2;\n if (MARKERS.includes(marker)) break;\n pos += dataView.getUint16(pos);\n }\n\n if (!MARKERS.includes(marker!)) throw new Error('Invalid JPEG');\n pos += 2;\n\n const bitsPerComponent = dataView.getUint8(pos++);\n const height = dataView.getUint16(pos);\n pos += 2;\n\n const width = dataView.getUint16(pos);\n pos += 2;\n\n const channelByte = dataView.getUint8(pos++);\n const channelName = ChannelToColorSpace[channelByte];\n\n if (!channelName) throw new Error('Unknown JPEG channel.');\n\n const colorSpace = channelName;\n\n return new JpegEmbedder(\n imageData,\n bitsPerComponent,\n width,\n height,\n colorSpace,\n );\n }\n\n readonly bitsPerComponent: number;\n readonly height: number;\n readonly width: number;\n readonly colorSpace: ColorSpace;\n\n private readonly imageData: Uint8Array;\n\n private constructor(\n imageData: Uint8Array,\n bitsPerComponent: number,\n width: number,\n height: number,\n colorSpace: ColorSpace,\n ) {\n this.imageData = imageData;\n this.bitsPerComponent = bitsPerComponent;\n this.width = width;\n this.height = height;\n this.colorSpace = colorSpace;\n }\n\n async embedIntoContext(context: PDFContext, ref?: PDFRef): Promise {\n const xObject = context.stream(this.imageData, {\n Type: 'XObject',\n Subtype: 'Image',\n BitsPerComponent: this.bitsPerComponent,\n Width: this.width,\n Height: this.height,\n ColorSpace: this.colorSpace,\n Filter: 'DCTDecode',\n\n // CMYK JPEG streams in PDF are typically stored complemented,\n // with 1 as 'off' and 0 as 'on' (PDF 32000-1:2008, 8.6.4.4).\n //\n // Standalone CMYK JPEG (usually exported by Photoshop) are\n // stored inverse, with 0 as 'off' and 1 as 'on', like RGB.\n //\n // Applying a swap here as a hedge that most bytes passing\n // through this method will benefit from it.\n Decode:\n this.colorSpace === ColorSpace.DeviceCMYK\n ? [1, 0, 1, 0, 1, 0, 1, 0]\n : undefined,\n });\n\n if (ref) {\n context.assign(ref, xObject);\n return ref;\n } else {\n return context.register(xObject);\n }\n }\n}\n\nexport default JpegEmbedder;\n","import pako from 'pako';\n\nvar UPNG = {};\n\n\t\n\nUPNG.toRGBA8 = function(out)\n{\n\tvar w = out.width, h = out.height;\n\tif(out.tabs.acTL==null) return [UPNG.toRGBA8.decodeImage(out.data, w, h, out).buffer];\n\t\n\tvar frms = [];\n\tif(out.frames[0].data==null) out.frames[0].data = out.data;\n\t\n\tvar len = w*h*4, img = new Uint8Array(len), empty = new Uint8Array(len), prev=new Uint8Array(len);\n\tfor(var i=0; i>3)]>>(7-((i&7)<<0)))& 1), cj=3*j; bf[qi]=p[cj]; bf[qi+1]=p[cj+1]; bf[qi+2]=p[cj+2]; bf[qi+3]=(j>2)]>>(6-((i&3)<<1)))& 3), cj=3*j; bf[qi]=p[cj]; bf[qi+1]=p[cj+1]; bf[qi+2]=p[cj+2]; bf[qi+3]=(j>1)]>>(4-((i&1)<<2)))&15), cj=3*j; bf[qi]=p[cj]; bf[qi+1]=p[cj+1]; bf[qi+2]=p[cj+2]; bf[qi+3]=(j>>3)]>>>(7 -((x&7) )))& 1), al=(gr==tr*255)?0:255; bf32[to+x]=(al<<24)|(gr<<16)|(gr<<8)|gr; }\n\t\t\telse if(depth== 2) for(var x=0; x>>2)]>>>(6 -((x&3)<<1)))& 3), al=(gr==tr* 85)?0:255; bf32[to+x]=(al<<24)|(gr<<16)|(gr<<8)|gr; }\n\t\t\telse if(depth== 4) for(var x=0; x>>1)]>>>(4 -((x&1)<<2)))&15), al=(gr==tr* 17)?0:255; bf32[to+x]=(al<<24)|(gr<<16)|(gr<<8)|gr; }\n\t\t\telse if(depth== 8) for(var x=0; x>>2<<3);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\nvar D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\nw+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\nh=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\ncj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\nd=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\nif(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\nd+=Y&15;while(w>>4;\nif(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\nn+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1;\nwhile(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\nH.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\nH.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\nreturn{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n(function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1;\nV=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\nN.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\nN.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\nH.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\nn(N.D,30,0);n(N.v,320,0)}());return H.H.N}()\n\n\nUPNG.decode._readInterlace = function(data, out)\n{\n\tvar w = out.width, h = out.height;\n\tvar bpp = UPNG.decode._getBPP(out), cbpp = bpp>>3, bpl = Math.ceil(w*bpp/8);\n\tvar img = new Uint8Array( h * bpl );\n\tvar di = 0;\n\n\tvar starting_row = [ 0, 0, 4, 0, 2, 0, 1 ];\n\tvar starting_col = [ 0, 4, 0, 2, 0, 1, 0 ];\n\tvar row_increment = [ 8, 8, 8, 4, 4, 2, 2 ];\n\tvar col_increment = [ 8, 8, 4, 4, 2, 2, 1 ];\n\n\tvar pass=0;\n\twhile(pass<7)\n\t{\n\t\tvar ri = row_increment[pass], ci = col_increment[pass];\n\t\tvar sw = 0, sh = 0;\n\t\tvar cr = starting_row[pass]; while(cr>3]; val = (val>>(7-(cdi&7)))&1;\n\t\t\t\t\timg[row*bpl + (col>>3)] |= (val << (7-((col&7)<<0)));\n\t\t\t\t}\n\t\t\t\tif(bpp==2) {\n\t\t\t\t\tvar val = data[cdi>>3]; val = (val>>(6-(cdi&7)))&3;\n\t\t\t\t\timg[row*bpl + (col>>2)] |= (val << (6-((col&3)<<1)));\n\t\t\t\t}\n\t\t\t\tif(bpp==4) {\n\t\t\t\t\tvar val = data[cdi>>3]; val = (val>>(4-(cdi&7)))&15;\n\t\t\t\t\timg[row*bpl + (col>>1)] |= (val << (4-((col&1)<<2)));\n\t\t\t\t}\n\t\t\t\tif(bpp>=8) {\n\t\t\t\t\tvar ii = row*bpl+col*cbpp;\n\t\t\t\t\tfor(var j=0; j>3)+j];\n\t\t\t\t}\n\t\t\t\tcdi+=bpp; col+=ci;\n\t\t\t}\n\t\t\ty++; row += ri;\n\t\t}\n\t\tif(sw*sh!=0) di += sh * (1 + bpll);\n\t\tpass = pass + 1;\n\t}\n\treturn img;\n}\n\nUPNG.decode._getBPP = function(out) {\n\tvar noc = [1,null,3,1,2,null,4][out.ctype];\n\treturn noc * out.depth;\n}\n\nUPNG.decode._filterZero = function(data, out, off, w, h)\n{\n\tvar bpp = UPNG.decode._getBPP(out), bpl = Math.ceil(w*bpp/8), paeth = UPNG.decode._paeth;\n\tbpp = Math.ceil(bpp/8);\n\t\n\tvar i=0, di=1, type=data[off], x=0;\n\t\n\tif(type>1) data[off]=[0,0,1][type-2]; \n\tif(type==3) for(x=bpp; x>>1) )&255;\n\n\tfor(var y=0; y>>1));\n\t\t\t for(; x>>1) ); }\n\t\telse { for(; x>8)&255; buff[p+1] = n&255; },\n\treadUint : function(buff,p) { return (buff[p]*(256*256*256)) + ((buff[p+1]<<16) | (buff[p+2]<< 8) | buff[p+3]); },\n\twriteUint : function(buff,p,n){ buff[p]=(n>>24)&255; buff[p+1]=(n>>16)&255; buff[p+2]=(n>>8)&255; buff[p+3]=n&255; },\n\treadASCII : function(buff,p,l){ var s = \"\"; for(var i=0; i=0 && yoff>=0) { si = (y*sw+x)<<2; ti = (( yoff+y)*tw+xoff+x)<<2; }\n\t\t\telse { si = ((-yoff+y)*sw-xoff+x)<<2; ti = (y*tw+x)<<2; }\n\t\t\t\n\t\t\tif (mode==0) { tb[ti] = sb[si]; tb[ti+1] = sb[si+1]; tb[ti+2] = sb[si+2]; tb[ti+3] = sb[si+3]; }\n\t\t\telse if(mode==1) {\n\t\t\t\tvar fa = sb[si+3]*(1/255), fr=sb[si]*fa, fg=sb[si+1]*fa, fb=sb[si+2]*fa; \n\t\t\t\tvar ba = tb[ti+3]*(1/255), br=tb[ti]*ba, bg=tb[ti+1]*ba, bb=tb[ti+2]*ba; \n\t\t\t\t\n\t\t\t\tvar ifa=1-fa, oa = fa+ba*ifa, ioa = (oa==0?0:1/oa);\n\t\t\t\ttb[ti+3] = 255*oa; \n\t\t\t\ttb[ti+0] = (fr+br*ifa)*ioa; \n\t\t\t\ttb[ti+1] = (fg+bg*ifa)*ioa; \n\t\t\t\ttb[ti+2] = (fb+bb*ifa)*ioa; \n\t\t\t}\n\t\t\telse if(mode==2){\t// copy only differences, otherwise zero\n\t\t\t\tvar fa = sb[si+3], fr=sb[si], fg=sb[si+1], fb=sb[si+2]; \n\t\t\t\tvar ba = tb[ti+3], br=tb[ti], bg=tb[ti+1], bb=tb[ti+2]; \n\t\t\t\tif(fa==ba && fr==br && fg==bg && fb==bb) { tb[ti]=0; tb[ti+1]=0; tb[ti+2]=0; tb[ti+3]=0; }\n\t\t\t\telse { tb[ti]=fr; tb[ti+1]=fg; tb[ti+2]=fb; tb[ti+3]=fa; }\n\t\t\t}\n\t\t\telse if(mode==3){\t// check if can be blended\n\t\t\t\tvar fa = sb[si+3], fr=sb[si], fg=sb[si+1], fb=sb[si+2]; \n\t\t\t\tvar ba = tb[ti+3], br=tb[ti], bg=tb[ti+1], bb=tb[ti+2]; \n\t\t\t\tif(fa==ba && fr==br && fg==bg && fb==bb) continue;\n\t\t\t\t//if(fa!=255 && ba!=0) return false;\n\t\t\t\tif(fa<220 && ba>20) return false;\n\t\t\t}\n\t\t}\n\treturn true;\n}\n\n\n\n\nUPNG.encode = function(bufs, w, h, ps, dels, tabs, forbidPlte)\n{\n\tif(ps==null) ps=0;\n\tif(forbidPlte==null) forbidPlte = false;\n\n\tvar nimg = UPNG.encode.compress(bufs, w, h, ps, [false, false, false, 0, forbidPlte]);\n\tUPNG.encode.compressPNG(nimg, -1);\n\t\n\treturn UPNG.encode._main(nimg, w, h, dels, tabs);\n}\n\nUPNG.encodeLL = function(bufs, w, h, cc, ac, depth, dels, tabs) {\n\tvar nimg = { ctype: 0 + (cc==1 ? 0 : 2) + (ac==0 ? 0 : 4), depth: depth, frames: [] };\n\t\n\tvar time = Date.now();\n\tvar bipp = (cc+ac)*depth, bipl = bipp * w;\n\tfor(var i=0; i1, pltAlpha = false;\n\t\n\tvar leng = 8 + (16+5+4) /*+ (9+4)*/ + (anim ? 20 : 0);\n\tif(tabs[\"sRGB\"]!=null) leng += 8+1+4;\n\tif(tabs[\"pHYs\"]!=null) leng += 8+9+4;\n\tif(nimg.ctype==3) {\n\t\tvar dl = nimg.plte.length;\n\t\tfor(var i=0; i>>24)!=255) pltAlpha = true;\n\t\tleng += (8 + dl*3 + 4) + (pltAlpha ? (8 + dl*1 + 4) : 0);\n\t}\n\tfor(var j=0; j>>8)&255, b=(c>>>16)&255;\n\t\t\tdata[offset+ti+0]=r; data[offset+ti+1]=g; data[offset+ti+2]=b;\n\t\t}\n\t\toffset+=dl*3;\n\t\twUi(data,offset,crc(data,offset-dl*3-4,dl*3+4)); offset+=4; // crc\n\n\t\tif(pltAlpha) {\n\t\t\twUi(data,offset, dl); offset+=4;\n\t\t\twAs(data,offset,\"tRNS\"); offset+=4;\n\t\t\tfor(var i=0; i>>24)&255;\n\t\t\toffset+=dl;\n\t\t\twUi(data,offset,crc(data,offset-dl-4,dl+4)); offset+=4; // crc\n\t\t}\n\t}\n\t\n\tvar fi = 0;\n\tfor(var j=0; j>2, bln>>2));\n\t\t\tfor(var j=0; jnw && c==img32[i-nw]) ind[i]=ind[i-nw];\n\t\t\t\telse {\n\t\t\t\t\tvar cmc = cmap[c];\n\t\t\t\t\tif(cmc==null) { cmap[c]=cmc=plte.length; plte.push(c); if(plte.length>=300) break; }\n\t\t\t\t\tind[i]=cmc;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//console.log(\"make palette\", Date.now()-time); time = Date.now();\n\t}\n\t\n\tvar cc=plte.length; //console.log(\"colors:\",cc);\n\tif(cc<=256 && forbidPlte==false) {\n\t\tif(cc<= 2) depth=1; else if(cc<= 4) depth=2; else if(cc<=16) depth=4; else depth=8;\n\t\tdepth = Math.max(depth, minBits);\n\t}\n\t\n\tfor(var j=0; j>1)] |= (inj[ii+x]<<(4-(x&1)*4));\n\t\t\t\telse if(depth==2) for(var x=0; x>2)] |= (inj[ii+x]<<(6-(x&3)*2));\n\t\t\t\telse if(depth==1) for(var x=0; x>3)] |= (inj[ii+x]<<(7-(x&7)*1));\n\t\t\t}\n\t\t\tcimg=nimg; ctype=3; bpp=1;\n\t\t}\n\t\telse if(gotAlpha==false && frms.length==1) {\t// some next \"reduced\" frames may contain alpha for blending\n\t\t\tvar nimg = new Uint8Array(nw*nh*3), area=nw*nh;\n\t\t\tfor(var i=0; i palette indices\", Date.now()-time); time = Date.now();\n\t\n\treturn {ctype:ctype, depth:depth, plte:plte, frames:frms };\n}\nUPNG.encode.framize = function(bufs,w,h,alwaysBlend,evenCrd,forbidPrev) {\n\t/* DISPOSE\n\t - 0 : no change\n\t\t- 1 : clear to transparent\n\t\t- 2 : retstore to content before rendering (previous frame disposed)\n\t\tBLEND\n\t\t- 0 : replace\n\t\t- 1 : blend\n\t*/\n\tvar frms = [];\n\tfor(var j=0; jmax) max=x;\n\t\t\t\t\t\tif(ymay) may=y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(max==-1) mix=miy=max=may=0;\n\t\t\t\tif(evenCrd) { if((mix&1)==1)mix--; if((miy&1)==1)miy--; }\n\t\t\t\tvar sarea = (max-mix+1)*(may-miy+1);\n\t\t\t\tif(sareamax) max=cx;\n\t\t\tif(cymay) may=cy;\n\t\t}\n\t}\n\tif(max==-1) mix=miy=max=may=0;\n\tif(evenCrd) { if((mix&1)==1)mix--; if((miy&1)==1)miy--; }\n\tr = {x:mix, y:miy, width:max-mix+1, height:may-miy+1};\n\t\n\tvar fr = frms[i]; fr.rect = r; fr.blend = 1; fr.img = new Uint8Array(r.width*r.height*4);\n\tif(frms[i-1].dispose==0) {\n\t\tUPNG._copyTile(pimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 0);\n\t\tUPNG.encode._prepareDiff(cimg,w,h,fr.img,r);\n\t\t//UPNG._copyTile(cimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 2);\n\t}\n\telse\n\t\tUPNG._copyTile(cimg,w,h, fr.img,r.width,r.height, -r.x,-r.y, 0);\n}\nUPNG.encode._prepareDiff = function(cimg, w,h, nimg, rec) {\n\tUPNG._copyTile(cimg,w,h, nimg,rec.width,rec.height, -rec.x,-rec.y, 2);\n\t/*\n\tvar n32 = new Uint32Array(nimg.buffer);\n\tvar og = new Uint8Array(rec.width*rec.height*4), o32 = new Uint32Array(og.buffer);\n\tUPNG._copyTile(cimg,w,h, og,rec.width,rec.height, -rec.x,-rec.y, 0);\n\tfor(var i=4; i>>2]==o32[(i>>>2)-1]) {\n\t\t\tn32[i>>>2]=o32[i>>>2];\n\t\t\t//var j = i, c=p32[(i>>>2)-1];\n\t\t\t//while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n\t\t}\n\t}\n\tfor(var i=nimg.length-8; i>0; i-=4) {\n\t\tif(nimg[i+7]!=0 && nimg[i+3]==0 && o32[i>>>2]==o32[(i>>>2)+1]) {\n\t\t\tn32[i>>>2]=o32[i>>>2];\n\t\t\t//var j = i, c=p32[(i>>>2)-1];\n\t\t\t//while(p32[j>>>2]==c) { n32[j>>>2]=c; j+=4; }\n\t\t}\n\t}*/\n}\n\nUPNG.encode._filterZero = function(img,h,bpp,bpl,data, filter, levelZero)\n{\n\tvar fls = [], ftry=[0,1,2,3,4];\n\tif (filter!=-1) ftry=[filter];\n\telse if(h*bpl>500000 || bpp==1) ftry=[0];\n\tvar opts; if(levelZero) opts={level:0};\n\t\n\tvar CMPR = (levelZero && UZIP!=null) ? UZIP : pako;\n\t\n\tfor(var i=0; i>1) +256)&255;\n\t\tif(type==4) for(var x=bpp; x>1))&255;\n\t\t\t\t\t for(var x=bpp; x>1))&255; }\n\t\tif(type==4) { for(var x= 0; x>> 1);\n\t\t\t\telse c = c >>> 1;\n\t\t\t}\n\t\t\ttab[n] = c; }\n\t\treturn tab; })(),\n\tupdate : function(c, buf, off, len) {\n\t\tfor (var i=0; i>> 8);\n\t\treturn c;\n\t},\n\tcrc : function(b,o,l) { return UPNG.crc.update(0xffffffff,b,o,l) ^ 0xffffffff; }\n}\n\n\nUPNG.quantize = function(abuf, ps)\n{\t\n\tvar oimg = new Uint8Array(abuf), nimg = oimg.slice(0), nimg32 = new Uint32Array(nimg.buffer);\n\t\n\tvar KD = UPNG.quantize.getKDtree(nimg, ps);\n\tvar root = KD[0], leafs = KD[1];\n\t\n\tvar planeDst = UPNG.quantize.planeDst;\n\tvar sb = oimg, tb = nimg32, len=sb.length;\n\t\t\n\tvar inds = new Uint8Array(oimg.length>>2);\n\tfor(var i=0; i>2] = nd.ind;\n\t\ttb[i>>2] = nd.est.rgba;\n\t}\n\treturn { abuf:nimg.buffer, inds:inds, plte:leafs };\n}\n\nUPNG.quantize.getKDtree = function(nimg, ps, err) {\n\tif(err==null) err = 0.0001;\n\tvar nimg32 = new Uint32Array(nimg.buffer);\n\t\n\tvar root = {i0:0, i1:nimg.length, bst:null, est:null, tdst:0, left:null, right:null }; // basic statistic, extra statistic\n\troot.bst = UPNG.quantize.stats( nimg,root.i0, root.i1 ); root.est = UPNG.quantize.estats( root.bst );\n\tvar leafs = [root];\n\t\n\twhile(leafs.length maxL) { maxL=leafs[i].est.L; mi=i; }\n\t\tif(maxL=s0 || node.i1<=s0);\n\t\t//console.log(maxL, leafs.length, mi);\n\t\tif(s0wrong) { node.est.L=0; continue; }\n\t\t\n\t\t\n\t\tvar ln = {i0:node.i0, i1:s0, bst:null, est:null, tdst:0, left:null, right:null }; ln.bst = UPNG.quantize.stats( nimg, ln.i0, ln.i1 ); \n\t\tln.est = UPNG.quantize.estats( ln.bst );\n\t\tvar rn = {i0:s0, i1:node.i1, bst:null, est:null, tdst:0, left:null, right:null }; rn.bst = {R:[], m:[], N:node.bst.N-ln.bst.N};\n\t\tfor(var i=0; i<16; i++) rn.bst.R[i] = node.bst.R[i]-ln.bst.R[i];\n\t\tfor(var i=0; i< 4; i++) rn.bst.m[i] = node.bst.m[i]-ln.bst.m[i];\n\t\trn.est = UPNG.quantize.estats( rn.bst );\n\t\t\n\t\tnode.left = ln; node.right = rn;\n\t\tleafs[mi]=ln; leafs.push(rn);\n\t}\n\tleafs.sort(function(a,b) { return b.bst.N-a.bst.N; });\n\tfor(var i=0; i0) { node0=nd.right; node1=nd.left; }\n\t\n\tvar ln = UPNG.quantize.getNearest(node0, r,g,b,a);\n\tif(ln.tdst<=planeDst*planeDst) return ln;\n\tvar rn = UPNG.quantize.getNearest(node1, r,g,b,a);\n\treturn rn.tdst eMq) i1-=4;\n\t\tif(i0>=i1) break;\n\t\t\n\t\tvar t = nimg32[i0>>2]; nimg32[i0>>2] = nimg32[i1>>2]; nimg32[i1>>2]=t;\n\t\t\n\t\ti0+=4; i1-=4;\n\t}\n\twhile(vecDot(nimg, i0, e)>eMq) i0-=4;\n\treturn i0+4;\n}\nUPNG.quantize.vecDot = function(nimg, i, e)\n{\n\treturn nimg[i]*e[0] + nimg[i+1]*e[1] + nimg[i+2]*e[2] + nimg[i+3]*e[3];\n}\nUPNG.quantize.stats = function(nimg, i0, i1){\n\tvar R = [0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0];\n\tvar m = [0,0,0,0];\n\tvar N = (i1-i0)>>2;\n\tfor(var i=i0; i>>0) };\n}\nUPNG.M4 = {\n\tmultVec : function(m,v) {\n\t\t\treturn [\n\t\t\t\tm[ 0]*v[0] + m[ 1]*v[1] + m[ 2]*v[2] + m[ 3]*v[3],\n\t\t\t\tm[ 4]*v[0] + m[ 5]*v[1] + m[ 6]*v[2] + m[ 7]*v[3],\n\t\t\t\tm[ 8]*v[0] + m[ 9]*v[1] + m[10]*v[2] + m[11]*v[3],\n\t\t\t\tm[12]*v[0] + m[13]*v[1] + m[14]*v[2] + m[15]*v[3]\n\t\t\t];\n\t},\n\tdot : function(x,y) { return x[0]*y[0]+x[1]*y[1]+x[2]*y[2]+x[3]*y[3]; },\n\tsml : function(a,y) { return [a*y[0],a*y[1],a*y[2],a*y[3]]; }\n}\n\nUPNG.encode.concatRGBA = function(bufs) {\n\tvar tlen = 0;\n\tfor(var i=0; i {\n if (ctype === 0) return PngType.Greyscale;\n if (ctype === 2) return PngType.Truecolour;\n if (ctype === 3) return PngType.IndexedColour;\n if (ctype === 4) return PngType.GreyscaleWithAlpha;\n if (ctype === 6) return PngType.TruecolourWithAlpha;\n throw new Error(`Unknown color type: ${ctype}`);\n};\n\nconst splitAlphaChannel = (rgbaChannel: Uint8Array) => {\n const pixelCount = Math.floor(rgbaChannel.length / 4);\n\n const rgbChannel = new Uint8Array(pixelCount * 3);\n const alphaChannel = new Uint8Array(pixelCount * 1);\n\n let rgbaOffset = 0;\n let rgbOffset = 0;\n let alphaOffset = 0;\n\n while (rgbaOffset < rgbaChannel.length) {\n rgbChannel[rgbOffset++] = rgbaChannel[rgbaOffset++];\n rgbChannel[rgbOffset++] = rgbaChannel[rgbaOffset++];\n rgbChannel[rgbOffset++] = rgbaChannel[rgbaOffset++];\n alphaChannel[alphaOffset++] = rgbaChannel[rgbaOffset++];\n }\n\n return { rgbChannel, alphaChannel };\n};\n\nexport enum PngType {\n Greyscale = 'Greyscale',\n Truecolour = 'Truecolour',\n IndexedColour = 'IndexedColour',\n GreyscaleWithAlpha = 'GreyscaleWithAlpha',\n TruecolourWithAlpha = 'TruecolourWithAlpha',\n}\n\nexport class PNG {\n static load = (pngData: Uint8Array) => new PNG(pngData);\n\n readonly rgbChannel: Uint8Array;\n readonly alphaChannel?: Uint8Array;\n readonly type: PngType;\n readonly width: number;\n readonly height: number;\n readonly bitsPerComponent: number;\n\n private constructor(pngData: Uint8Array) {\n const upng = UPNG.decode(pngData);\n const frames = UPNG.toRGBA8(upng);\n\n if (frames.length > 1) throw new Error(`Animated PNGs are not supported`);\n\n const frame = new Uint8Array(frames[0]);\n const { rgbChannel, alphaChannel } = splitAlphaChannel(frame);\n\n this.rgbChannel = rgbChannel;\n\n const hasAlphaValues = alphaChannel.some((a) => a < 255);\n if (hasAlphaValues) this.alphaChannel = alphaChannel;\n\n this.type = getImageType(upng.ctype);\n\n this.width = upng.width;\n this.height = upng.height;\n this.bitsPerComponent = 8;\n }\n}\n","import PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport { PNG } from 'src/utils/png';\n\n/**\n * A note of thanks to the developers of https://github.com/foliojs/pdfkit, as\n * this class borrows from:\n * https://github.com/devongovett/pdfkit/blob/e71edab0dd4657b5a767804ba86c94c58d01fbca/lib/image/png.coffee\n */\nclass PngEmbedder {\n static async for(imageData: Uint8Array) {\n const png = PNG.load(imageData);\n return new PngEmbedder(png);\n }\n\n readonly bitsPerComponent: number;\n readonly height: number;\n readonly width: number;\n readonly colorSpace: 'DeviceRGB';\n\n private readonly image: PNG;\n\n private constructor(png: PNG) {\n this.image = png;\n this.bitsPerComponent = png.bitsPerComponent;\n this.width = png.width;\n this.height = png.height;\n this.colorSpace = 'DeviceRGB';\n }\n\n async embedIntoContext(context: PDFContext, ref?: PDFRef): Promise {\n const SMask = this.embedAlphaChannel(context);\n\n const xObject = context.flateStream(this.image.rgbChannel, {\n Type: 'XObject',\n Subtype: 'Image',\n BitsPerComponent: this.image.bitsPerComponent,\n Width: this.image.width,\n Height: this.image.height,\n ColorSpace: this.colorSpace,\n SMask,\n });\n\n if (ref) {\n context.assign(ref, xObject);\n return ref;\n } else {\n return context.register(xObject);\n }\n }\n\n private embedAlphaChannel(context: PDFContext): PDFRef | undefined {\n if (!this.image.alphaChannel) return undefined;\n\n const xObject = context.flateStream(this.image.alphaChannel, {\n Type: 'XObject',\n Subtype: 'Image',\n Height: this.image.height,\n Width: this.image.width,\n BitsPerComponent: this.image.bitsPerComponent,\n ColorSpace: 'DeviceGray',\n Decode: [0, 1],\n });\n\n return context.register(xObject);\n }\n}\n\nexport default PngEmbedder;\n","/*\n * Copyright 2012 Mozilla Foundation\n *\n * The Stream class contained in this file is a TypeScript port of the\n * JavaScript Stream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\nexport interface StreamType {\n isEmpty: boolean;\n getByte(): number;\n getUint16(): number;\n getInt32(): number;\n getBytes(\n length: number,\n forceClamped?: boolean,\n ): Uint8Array | Uint8ClampedArray;\n peekByte(): number;\n peekBytes(\n length: number,\n forceClamped?: boolean,\n ): Uint8Array | Uint8ClampedArray;\n skip(n: number): void;\n reset(): void;\n makeSubStream(start: number, length: number): StreamType;\n decode(): Uint8Array;\n}\n\nclass Stream implements StreamType {\n private bytes: Uint8Array;\n private start: number;\n private pos: number;\n private end: number;\n\n constructor(buffer: Uint8Array, start?: number, length?: number) {\n this.bytes = buffer;\n this.start = start || 0;\n this.pos = this.start;\n this.end = !!start && !!length ? start + length : this.bytes.length;\n }\n\n get length() {\n return this.end - this.start;\n }\n\n get isEmpty() {\n return this.length === 0;\n }\n\n getByte() {\n if (this.pos >= this.end) {\n return -1;\n }\n return this.bytes[this.pos++];\n }\n\n getUint16() {\n const b0 = this.getByte();\n const b1 = this.getByte();\n if (b0 === -1 || b1 === -1) {\n return -1;\n }\n return (b0 << 8) + b1;\n }\n\n getInt32() {\n const b0 = this.getByte();\n const b1 = this.getByte();\n const b2 = this.getByte();\n const b3 = this.getByte();\n return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;\n }\n\n // Returns subarray of original buffer, should only be read.\n getBytes(length: number, forceClamped = false) {\n const bytes = this.bytes;\n const pos = this.pos;\n const strEnd = this.end;\n\n if (!length) {\n const subarray = bytes.subarray(pos, strEnd);\n // `this.bytes` is always a `Uint8Array` here.\n return forceClamped ? new Uint8ClampedArray(subarray) : subarray;\n } else {\n let end = pos + length;\n if (end > strEnd) {\n end = strEnd;\n }\n this.pos = end;\n const subarray = bytes.subarray(pos, end);\n // `this.bytes` is always a `Uint8Array` here.\n return forceClamped ? new Uint8ClampedArray(subarray) : subarray;\n }\n }\n\n peekByte() {\n const peekedByte = this.getByte();\n this.pos--;\n return peekedByte;\n }\n\n peekBytes(length: number, forceClamped = false) {\n const bytes = this.getBytes(length, forceClamped);\n this.pos -= bytes.length;\n return bytes;\n }\n\n skip(n: number) {\n if (!n) {\n n = 1;\n }\n this.pos += n;\n }\n\n reset() {\n this.pos = this.start;\n }\n\n moveStart() {\n this.start = this.pos;\n }\n\n makeSubStream(start: number, length: number) {\n return new Stream(this.bytes, start, length);\n }\n\n decode(): Uint8Array {\n return this.bytes;\n }\n}\n\nexport default Stream;\n","import { MethodNotImplementedError } from 'src/core/errors';\nimport Stream, { StreamType } from 'src/core/streams/Stream';\n\n/*\n * Copyright 2012 Mozilla Foundation\n *\n * The DecodeStream class contained in this file is a TypeScript port of the\n * JavaScript DecodeStream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\n// Lots of DecodeStreams are created whose buffers are never used. For these\n// we share a single empty buffer. This is (a) space-efficient and (b) avoids\n// having special cases that would be required if we used |null| for an empty\n// buffer.\nconst emptyBuffer = new Uint8Array(0);\n\n/**\n * Super class for the decoding streams\n */\nclass DecodeStream implements StreamType {\n protected bufferLength: number;\n protected buffer: Uint8Array;\n protected eof: boolean;\n\n private pos: number;\n private minBufferLength: number;\n\n constructor(maybeMinBufferLength?: number) {\n this.pos = 0;\n this.bufferLength = 0;\n this.eof = false;\n this.buffer = emptyBuffer;\n this.minBufferLength = 512;\n if (maybeMinBufferLength) {\n // Compute the first power of two that is as big as maybeMinBufferLength.\n while (this.minBufferLength < maybeMinBufferLength) {\n this.minBufferLength *= 2;\n }\n }\n }\n\n get isEmpty() {\n while (!this.eof && this.bufferLength === 0) {\n this.readBlock();\n }\n return this.bufferLength === 0;\n }\n\n getByte() {\n const pos = this.pos;\n while (this.bufferLength <= pos) {\n if (this.eof) {\n return -1;\n }\n this.readBlock();\n }\n return this.buffer[this.pos++];\n }\n\n getUint16() {\n const b0 = this.getByte();\n const b1 = this.getByte();\n if (b0 === -1 || b1 === -1) {\n return -1;\n }\n return (b0 << 8) + b1;\n }\n\n getInt32() {\n const b0 = this.getByte();\n const b1 = this.getByte();\n const b2 = this.getByte();\n const b3 = this.getByte();\n return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3;\n }\n\n getBytes(length: number, forceClamped = false) {\n let end;\n const pos = this.pos;\n\n if (length) {\n this.ensureBuffer(pos + length);\n end = pos + length;\n\n while (!this.eof && this.bufferLength < end) {\n this.readBlock();\n }\n const bufEnd = this.bufferLength;\n if (end > bufEnd) {\n end = bufEnd;\n }\n } else {\n while (!this.eof) {\n this.readBlock();\n }\n end = this.bufferLength;\n }\n\n this.pos = end;\n const subarray = this.buffer.subarray(pos, end);\n // `this.buffer` is either a `Uint8Array` or `Uint8ClampedArray` here.\n return forceClamped && !(subarray instanceof Uint8ClampedArray)\n ? new Uint8ClampedArray(subarray)\n : subarray;\n }\n\n peekByte() {\n const peekedByte = this.getByte();\n this.pos--;\n return peekedByte;\n }\n\n peekBytes(length: number, forceClamped = false) {\n const bytes = this.getBytes(length, forceClamped);\n this.pos -= bytes.length;\n return bytes;\n }\n\n skip(n: number) {\n if (!n) {\n n = 1;\n }\n this.pos += n;\n }\n\n reset() {\n this.pos = 0;\n }\n\n makeSubStream(start: number, length: number /* dict */) {\n const end = start + length;\n while (this.bufferLength <= end && !this.eof) {\n this.readBlock();\n }\n return new Stream(this.buffer, start, length /* dict */);\n }\n\n decode(): Uint8Array {\n while (!this.eof) this.readBlock();\n return this.buffer.subarray(0, this.bufferLength);\n }\n\n protected readBlock(): void {\n throw new MethodNotImplementedError(this.constructor.name, 'readBlock');\n }\n\n protected ensureBuffer(requested: number) {\n const buffer = this.buffer;\n if (requested <= buffer.byteLength) {\n return buffer;\n }\n let size = this.minBufferLength;\n while (size < requested) {\n size *= 2;\n }\n const buffer2 = new Uint8Array(size);\n buffer2.set(buffer);\n return (this.buffer = buffer2);\n }\n\n // getBaseStreams() {\n // if (this.str && this.str.getBaseStreams) {\n // return this.str.getBaseStreams();\n // }\n // return [];\n // }\n}\n\nexport default DecodeStream;\n","/*\n * Copyright 2012 Mozilla Foundation\n *\n * The Ascii85Stream class contained in this file is a TypeScript port of the\n * JavaScript Ascii85Stream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\nimport DecodeStream from 'src/core/streams/DecodeStream';\nimport { StreamType } from 'src/core/streams/Stream';\n\nconst isSpace = (ch: number) =>\n ch === 0x20 || ch === 0x09 || ch === 0x0d || ch === 0x0a;\n\nclass Ascii85Stream extends DecodeStream {\n private stream: StreamType;\n private input: Uint8Array;\n\n constructor(stream: StreamType, maybeLength?: number) {\n super(maybeLength);\n\n this.stream = stream;\n this.input = new Uint8Array(5);\n\n // Most streams increase in size when decoded, but Ascii85 streams\n // typically shrink by ~20%.\n if (maybeLength) {\n maybeLength = 0.8 * maybeLength;\n }\n }\n\n protected readBlock() {\n const TILDA_CHAR = 0x7e; // '~'\n const Z_LOWER_CHAR = 0x7a; // 'z'\n const EOF = -1;\n\n const stream = this.stream;\n\n let c = stream.getByte();\n while (isSpace(c)) {\n c = stream.getByte();\n }\n\n if (c === EOF || c === TILDA_CHAR) {\n this.eof = true;\n return;\n }\n\n const bufferLength = this.bufferLength;\n let buffer;\n let i;\n\n // special code for z\n if (c === Z_LOWER_CHAR) {\n buffer = this.ensureBuffer(bufferLength + 4);\n for (i = 0; i < 4; ++i) {\n buffer[bufferLength + i] = 0;\n }\n this.bufferLength += 4;\n } else {\n const input = this.input;\n input[0] = c;\n for (i = 1; i < 5; ++i) {\n c = stream.getByte();\n while (isSpace(c)) {\n c = stream.getByte();\n }\n\n input[i] = c;\n\n if (c === EOF || c === TILDA_CHAR) {\n break;\n }\n }\n buffer = this.ensureBuffer(bufferLength + i - 1);\n this.bufferLength += i - 1;\n\n // partial ending;\n if (i < 5) {\n for (; i < 5; ++i) {\n input[i] = 0x21 + 84;\n }\n this.eof = true;\n }\n let t = 0;\n for (i = 0; i < 5; ++i) {\n t = t * 85 + (input[i] - 0x21);\n }\n\n for (i = 3; i >= 0; --i) {\n buffer[bufferLength + i] = t & 0xff;\n t >>= 8;\n }\n }\n }\n}\n\nexport default Ascii85Stream;\n","/*\n * Copyright 2012 Mozilla Foundation\n *\n * The AsciiHexStream class contained in this file is a TypeScript port of the\n * JavaScript AsciiHexStream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\nimport DecodeStream from 'src/core/streams/DecodeStream';\nimport { StreamType } from 'src/core/streams/Stream';\n\nclass AsciiHexStream extends DecodeStream {\n private stream: StreamType;\n private firstDigit: number;\n\n constructor(stream: StreamType, maybeLength?: number) {\n super(maybeLength);\n\n this.stream = stream;\n\n this.firstDigit = -1;\n\n // Most streams increase in size when decoded, but AsciiHex streams shrink\n // by 50%.\n if (maybeLength) {\n maybeLength = 0.5 * maybeLength;\n }\n }\n\n protected readBlock() {\n const UPSTREAM_BLOCK_SIZE = 8000;\n const bytes = this.stream.getBytes(UPSTREAM_BLOCK_SIZE);\n if (!bytes.length) {\n this.eof = true;\n return;\n }\n\n const maxDecodeLength = (bytes.length + 1) >> 1;\n const buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength);\n let bufferLength = this.bufferLength;\n\n let firstDigit = this.firstDigit;\n for (let i = 0, ii = bytes.length; i < ii; i++) {\n const ch = bytes[i];\n let digit;\n if (ch >= 0x30 && ch <= 0x39) {\n // '0'-'9'\n digit = ch & 0x0f;\n } else if ((ch >= 0x41 && ch <= 0x46) || (ch >= 0x61 && ch <= 0x66)) {\n // 'A'-'Z', 'a'-'z'\n digit = (ch & 0x0f) + 9;\n } else if (ch === 0x3e) {\n // '>'\n this.eof = true;\n break;\n } else {\n // probably whitespace\n continue; // ignoring\n }\n if (firstDigit < 0) {\n firstDigit = digit;\n } else {\n buffer[bufferLength++] = (firstDigit << 4) | digit;\n firstDigit = -1;\n }\n }\n if (firstDigit >= 0 && this.eof) {\n // incomplete byte\n buffer[bufferLength++] = firstDigit << 4;\n firstDigit = -1;\n }\n this.firstDigit = firstDigit;\n this.bufferLength = bufferLength;\n }\n}\n\nexport default AsciiHexStream;\n","/*\n * Copyright 1996-2003 Glyph & Cog, LLC\n *\n * The flate stream implementation contained in this file is a JavaScript port\n * of XPDF's implementation, made available under the Apache 2.0 open source\n * license.\n */\n\n/*\n * Copyright 2012 Mozilla Foundation\n *\n * The FlateStream class contained in this file is a TypeScript port of the\n * JavaScript FlateStream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\n/* tslint:disable no-conditional-assignment */\nimport DecodeStream from 'src/core/streams/DecodeStream';\nimport { StreamType } from 'src/core/streams/Stream';\n\n// prettier-ignore\nconst codeLenCodeMap = new Int32Array([\n 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15\n]);\n\n// prettier-ignore\nconst lengthDecode = new Int32Array([\n 0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a,\n 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f,\n 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073,\n 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102\n]);\n\n// prettier-ignore\nconst distDecode = new Int32Array([\n 0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d,\n 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1,\n 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01,\n 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001\n]);\n\n// prettier-ignore\nconst fixedLitCodeTab = [new Int32Array([\n 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0,\n 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0,\n 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0,\n 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0,\n 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8,\n 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8,\n 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8,\n 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8,\n 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4,\n 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4,\n 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4,\n 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4,\n 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc,\n 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec,\n 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc,\n 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc,\n 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2,\n 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2,\n 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2,\n 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2,\n 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca,\n 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea,\n 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da,\n 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa,\n 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6,\n 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6,\n 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6,\n 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b, 0x900f6,\n 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce,\n 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee,\n 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de,\n 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe,\n 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1,\n 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1,\n 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1,\n 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1,\n 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9,\n 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9,\n 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9,\n 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9,\n 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5,\n 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5,\n 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5,\n 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5,\n 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd,\n 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed,\n 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd,\n 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd,\n 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3,\n 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3,\n 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3,\n 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3,\n 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb,\n 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb,\n 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db,\n 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb,\n 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7,\n 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7,\n 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7,\n 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7,\n 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf,\n 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef,\n 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df,\n 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff\n]), 9] as [Int32Array, number];\n\n// prettier-ignore\nconst fixedDistCodeTab = [new Int32Array([\n 0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c,\n 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000,\n 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d,\n 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000\n]), 5] as [Int32Array, number];\n\nclass FlateStream extends DecodeStream {\n private stream: StreamType;\n private codeSize: number;\n private codeBuf: number;\n\n constructor(stream: StreamType, maybeLength?: number) {\n super(maybeLength);\n\n this.stream = stream;\n\n const cmf = stream.getByte();\n const flg = stream.getByte();\n if (cmf === -1 || flg === -1) {\n throw new Error(`Invalid header in flate stream: ${cmf}, ${flg}`);\n }\n if ((cmf & 0x0f) !== 0x08) {\n throw new Error(\n `Unknown compression method in flate stream: ${cmf}, ${flg}`,\n );\n }\n if (((cmf << 8) + flg) % 31 !== 0) {\n throw new Error(`Bad FCHECK in flate stream: ${cmf}, ${flg}`);\n }\n if (flg & 0x20) {\n throw new Error(`FDICT bit set in flate stream: ${cmf}, ${flg}`);\n }\n\n this.codeSize = 0;\n this.codeBuf = 0;\n }\n\n protected readBlock() {\n let buffer;\n let len;\n const str = this.stream;\n // read block header\n let hdr = this.getBits(3);\n if (hdr & 1) {\n this.eof = true;\n }\n hdr >>= 1;\n\n if (hdr === 0) {\n // uncompressed block\n let b;\n\n if ((b = str.getByte()) === -1) {\n throw new Error('Bad block header in flate stream');\n }\n let blockLen = b;\n if ((b = str.getByte()) === -1) {\n throw new Error('Bad block header in flate stream');\n }\n blockLen |= b << 8;\n if ((b = str.getByte()) === -1) {\n throw new Error('Bad block header in flate stream');\n }\n let check = b;\n if ((b = str.getByte()) === -1) {\n throw new Error('Bad block header in flate stream');\n }\n check |= b << 8;\n if (check !== (~blockLen & 0xffff) && (blockLen !== 0 || check !== 0)) {\n // Ignoring error for bad \"empty\" block (see issue 1277)\n throw new Error('Bad uncompressed block length in flate stream');\n }\n\n this.codeBuf = 0;\n this.codeSize = 0;\n\n const bufferLength = this.bufferLength;\n buffer = this.ensureBuffer(bufferLength + blockLen);\n const end = bufferLength + blockLen;\n this.bufferLength = end;\n if (blockLen === 0) {\n if (str.peekByte() === -1) {\n this.eof = true;\n }\n } else {\n for (let n = bufferLength; n < end; ++n) {\n if ((b = str.getByte()) === -1) {\n this.eof = true;\n break;\n }\n buffer[n] = b;\n }\n }\n return;\n }\n\n let litCodeTable;\n let distCodeTable;\n if (hdr === 1) {\n // compressed block, fixed codes\n litCodeTable = fixedLitCodeTab;\n distCodeTable = fixedDistCodeTab;\n } else if (hdr === 2) {\n // compressed block, dynamic codes\n const numLitCodes = this.getBits(5) + 257;\n const numDistCodes = this.getBits(5) + 1;\n const numCodeLenCodes = this.getBits(4) + 4;\n\n // build the code lengths code table\n const codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length);\n\n let i;\n for (i = 0; i < numCodeLenCodes; ++i) {\n codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3);\n }\n const codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths);\n\n // build the literal and distance code tables\n len = 0;\n i = 0;\n const codes = numLitCodes + numDistCodes;\n const codeLengths = new Uint8Array(codes);\n let bitsLength;\n let bitsOffset;\n let what;\n while (i < codes) {\n const code = this.getCode(codeLenCodeTab);\n if (code === 16) {\n bitsLength = 2;\n bitsOffset = 3;\n what = len;\n } else if (code === 17) {\n bitsLength = 3;\n bitsOffset = 3;\n what = len = 0;\n } else if (code === 18) {\n bitsLength = 7;\n bitsOffset = 11;\n what = len = 0;\n } else {\n codeLengths[i++] = len = code;\n continue;\n }\n\n let repeatLength = this.getBits(bitsLength) + bitsOffset;\n while (repeatLength-- > 0) {\n codeLengths[i++] = what;\n }\n }\n\n litCodeTable = this.generateHuffmanTable(\n codeLengths.subarray(0, numLitCodes),\n );\n distCodeTable = this.generateHuffmanTable(\n codeLengths.subarray(numLitCodes, codes),\n );\n } else {\n throw new Error('Unknown block type in flate stream');\n }\n\n buffer = this.buffer;\n let limit = buffer ? buffer.length : 0;\n let pos = this.bufferLength;\n while (true) {\n let code1 = this.getCode(litCodeTable);\n if (code1 < 256) {\n if (pos + 1 >= limit) {\n buffer = this.ensureBuffer(pos + 1);\n limit = buffer.length;\n }\n buffer[pos++] = code1;\n continue;\n }\n if (code1 === 256) {\n this.bufferLength = pos;\n return;\n }\n code1 -= 257;\n code1 = lengthDecode[code1];\n let code2 = code1 >> 16;\n if (code2 > 0) {\n code2 = this.getBits(code2);\n }\n len = (code1 & 0xffff) + code2;\n code1 = this.getCode(distCodeTable);\n code1 = distDecode[code1];\n code2 = code1 >> 16;\n if (code2 > 0) {\n code2 = this.getBits(code2);\n }\n const dist = (code1 & 0xffff) + code2;\n if (pos + len >= limit) {\n buffer = this.ensureBuffer(pos + len);\n limit = buffer.length;\n }\n for (let k = 0; k < len; ++k, ++pos) {\n buffer[pos] = buffer[pos - dist];\n }\n }\n }\n\n private getBits(bits: number) {\n const str = this.stream;\n let codeSize = this.codeSize;\n let codeBuf = this.codeBuf;\n\n let b;\n while (codeSize < bits) {\n if ((b = str.getByte()) === -1) {\n throw new Error('Bad encoding in flate stream');\n }\n codeBuf |= b << codeSize;\n codeSize += 8;\n }\n b = codeBuf & ((1 << bits) - 1);\n this.codeBuf = codeBuf >> bits;\n this.codeSize = codeSize -= bits;\n\n return b;\n }\n\n private getCode(table: [Int32Array, number]) {\n const str = this.stream;\n const codes = table[0];\n const maxLen = table[1];\n let codeSize = this.codeSize;\n let codeBuf = this.codeBuf;\n\n let b;\n while (codeSize < maxLen) {\n if ((b = str.getByte()) === -1) {\n // premature end of stream. code might however still be valid.\n // codeSize < codeLen check below guards against incomplete codeVal.\n break;\n }\n codeBuf |= b << codeSize;\n codeSize += 8;\n }\n const code = codes[codeBuf & ((1 << maxLen) - 1)];\n if (typeof codes === 'number') {\n console.log('FLATE:', code);\n }\n const codeLen = code >> 16;\n const codeVal = code & 0xffff;\n if (codeLen < 1 || codeSize < codeLen) {\n throw new Error('Bad encoding in flate stream');\n }\n this.codeBuf = codeBuf >> codeLen;\n this.codeSize = codeSize - codeLen;\n return codeVal;\n }\n\n private generateHuffmanTable(lengths: Uint8Array): [Int32Array, number] {\n const n = lengths.length;\n\n // find max code length\n let maxLen = 0;\n let i;\n for (i = 0; i < n; ++i) {\n if (lengths[i] > maxLen) {\n maxLen = lengths[i];\n }\n }\n\n // build the table\n const size = 1 << maxLen;\n const codes = new Int32Array(size);\n for (\n let len = 1, code = 0, skip = 2;\n len <= maxLen;\n ++len, code <<= 1, skip <<= 1\n ) {\n for (let val = 0; val < n; ++val) {\n if (lengths[val] === len) {\n // bit-reverse the code\n let code2 = 0;\n let t = code;\n for (i = 0; i < len; ++i) {\n code2 = (code2 << 1) | (t & 1);\n t >>= 1;\n }\n\n // fill the table entries\n for (i = code2; i < size; i += skip) {\n codes[i] = (len << 16) | val;\n }\n ++code;\n }\n }\n }\n\n return [codes, maxLen];\n }\n}\n\nexport default FlateStream;\n","/*\n * Copyright 2012 Mozilla Foundation\n *\n * The LZWStream class contained in this file is a TypeScript port of the\n * JavaScript LZWStream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\nimport DecodeStream from 'src/core/streams/DecodeStream';\nimport { StreamType } from 'src/core/streams/Stream';\n\nclass LZWStream extends DecodeStream {\n private stream: StreamType;\n private cachedData: number;\n private bitsCached: number;\n private lzwState: {\n earlyChange: 0 | 1;\n codeLength: number;\n nextCode: number;\n dictionaryValues: Uint8Array;\n dictionaryLengths: Uint16Array;\n dictionaryPrevCodes: Uint16Array;\n currentSequence: Uint8Array;\n currentSequenceLength: number;\n prevCode?: number | null;\n };\n\n constructor(\n stream: StreamType,\n maybeLength: number | undefined,\n earlyChange: 0 | 1,\n ) {\n super(maybeLength);\n\n this.stream = stream;\n this.cachedData = 0;\n this.bitsCached = 0;\n\n const maxLzwDictionarySize = 4096;\n const lzwState = {\n earlyChange,\n codeLength: 9,\n nextCode: 258,\n dictionaryValues: new Uint8Array(maxLzwDictionarySize),\n dictionaryLengths: new Uint16Array(maxLzwDictionarySize),\n dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize),\n currentSequence: new Uint8Array(maxLzwDictionarySize),\n currentSequenceLength: 0,\n };\n for (let i = 0; i < 256; ++i) {\n lzwState.dictionaryValues[i] = i;\n lzwState.dictionaryLengths[i] = 1;\n }\n this.lzwState = lzwState;\n }\n\n protected readBlock() {\n const blockSize = 512;\n\n let estimatedDecodedSize = blockSize * 2;\n const decodedSizeDelta = blockSize;\n let i;\n let j;\n let q;\n\n const lzwState = this.lzwState;\n if (!lzwState) {\n return; // eof was found\n }\n\n const earlyChange = lzwState.earlyChange;\n let nextCode = lzwState.nextCode;\n const dictionaryValues = lzwState.dictionaryValues;\n const dictionaryLengths = lzwState.dictionaryLengths;\n const dictionaryPrevCodes = lzwState.dictionaryPrevCodes;\n let codeLength = lzwState.codeLength;\n let prevCode = lzwState.prevCode;\n const currentSequence = lzwState.currentSequence;\n let currentSequenceLength = lzwState.currentSequenceLength;\n\n let decodedLength = 0;\n let currentBufferLength = this.bufferLength;\n let buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);\n\n for (i = 0; i < blockSize; i++) {\n const code = this.readBits(codeLength);\n const hasPrev = currentSequenceLength > 0;\n if (!code || code < 256) {\n currentSequence[0] = code as number;\n currentSequenceLength = 1;\n } else if (code >= 258) {\n if (code < nextCode) {\n currentSequenceLength = dictionaryLengths[code];\n for (j = currentSequenceLength - 1, q = code; j >= 0; j--) {\n currentSequence[j] = dictionaryValues[q];\n q = dictionaryPrevCodes[q];\n }\n } else {\n currentSequence[currentSequenceLength++] = currentSequence[0];\n }\n } else if (code === 256) {\n codeLength = 9;\n nextCode = 258;\n currentSequenceLength = 0;\n continue;\n } else {\n this.eof = true;\n delete this.lzwState;\n break;\n }\n\n if (hasPrev) {\n dictionaryPrevCodes[nextCode] = prevCode as number;\n dictionaryLengths[nextCode] = dictionaryLengths[prevCode as number] + 1;\n dictionaryValues[nextCode] = currentSequence[0];\n nextCode++;\n codeLength =\n (nextCode + earlyChange) & (nextCode + earlyChange - 1)\n ? codeLength\n : Math.min(\n Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1,\n 12,\n ) | 0;\n }\n prevCode = code;\n\n decodedLength += currentSequenceLength;\n if (estimatedDecodedSize < decodedLength) {\n do {\n estimatedDecodedSize += decodedSizeDelta;\n } while (estimatedDecodedSize < decodedLength);\n buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize);\n }\n for (j = 0; j < currentSequenceLength; j++) {\n buffer[currentBufferLength++] = currentSequence[j];\n }\n }\n lzwState.nextCode = nextCode;\n lzwState.codeLength = codeLength;\n lzwState.prevCode = prevCode;\n lzwState.currentSequenceLength = currentSequenceLength;\n\n this.bufferLength = currentBufferLength;\n }\n\n private readBits(n: number) {\n let bitsCached = this.bitsCached;\n let cachedData = this.cachedData;\n while (bitsCached < n) {\n const c = this.stream.getByte();\n if (c === -1) {\n this.eof = true;\n return null;\n }\n cachedData = (cachedData << 8) | c;\n bitsCached += 8;\n }\n this.bitsCached = bitsCached -= n;\n this.cachedData = cachedData;\n return (cachedData >>> bitsCached) & ((1 << n) - 1);\n }\n}\n\nexport default LZWStream;\n","/*\n * Copyright 2012 Mozilla Foundation\n *\n * The RunLengthStream class contained in this file is a TypeScript port of the\n * JavaScript RunLengthStream class in Mozilla's pdf.js project, made available\n * under the Apache 2.0 open source license.\n */\n\nimport DecodeStream from 'src/core/streams/DecodeStream';\nimport { StreamType } from 'src/core/streams/Stream';\n\nclass RunLengthStream extends DecodeStream {\n private stream: StreamType;\n\n constructor(stream: StreamType, maybeLength?: number) {\n super(maybeLength);\n this.stream = stream;\n }\n\n protected readBlock() {\n // The repeatHeader has following format. The first byte defines type of run\n // and amount of bytes to repeat/copy: n = 0 through 127 - copy next n bytes\n // (in addition to the second byte from the header), n = 129 through 255 -\n // duplicate the second byte from the header (257 - n) times, n = 128 - end.\n const repeatHeader = this.stream.getBytes(2);\n if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) {\n this.eof = true;\n return;\n }\n\n let buffer;\n let bufferLength = this.bufferLength;\n let n = repeatHeader[0];\n if (n < 128) {\n // copy n bytes\n buffer = this.ensureBuffer(bufferLength + n + 1);\n buffer[bufferLength++] = repeatHeader[1];\n if (n > 0) {\n const source = this.stream.getBytes(n);\n buffer.set(source, bufferLength);\n bufferLength += n;\n }\n } else {\n n = 257 - n;\n const b = repeatHeader[1];\n buffer = this.ensureBuffer(bufferLength + n + 1);\n for (let i = 0; i < n; i++) {\n buffer[bufferLength++] = b;\n }\n }\n this.bufferLength = bufferLength;\n }\n}\n\nexport default RunLengthStream;\n","import {\n UnexpectedObjectTypeError,\n UnsupportedEncodingError,\n} from 'src/core/errors';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNull from 'src/core/objects/PDFNull';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport Ascii85Stream from 'src/core/streams/Ascii85Stream';\nimport AsciiHexStream from 'src/core/streams/AsciiHexStream';\nimport FlateStream from 'src/core/streams/FlateStream';\nimport LZWStream from 'src/core/streams/LZWStream';\nimport RunLengthStream from 'src/core/streams/RunLengthStream';\nimport Stream, { StreamType } from 'src/core/streams/Stream';\n\nconst decodeStream = (\n stream: StreamType,\n encoding: PDFName,\n params: undefined | typeof PDFNull | PDFDict,\n) => {\n if (encoding === PDFName.of('FlateDecode')) {\n return new FlateStream(stream);\n }\n if (encoding === PDFName.of('LZWDecode')) {\n let earlyChange = 1;\n if (params instanceof PDFDict) {\n const EarlyChange = params.lookup(PDFName.of('EarlyChange'));\n if (EarlyChange instanceof PDFNumber) {\n earlyChange = EarlyChange.asNumber();\n }\n }\n return new LZWStream(stream, undefined, earlyChange as 0 | 1);\n }\n if (encoding === PDFName.of('ASCII85Decode')) {\n return new Ascii85Stream(stream);\n }\n if (encoding === PDFName.of('ASCIIHexDecode')) {\n return new AsciiHexStream(stream);\n }\n if (encoding === PDFName.of('RunLengthDecode')) {\n return new RunLengthStream(stream);\n }\n throw new UnsupportedEncodingError(encoding.asString());\n};\n\nexport const decodePDFRawStream = ({ dict, contents }: PDFRawStream) => {\n let stream: StreamType = new Stream(contents);\n\n const Filter = dict.lookup(PDFName.of('Filter'));\n const DecodeParms = dict.lookup(PDFName.of('DecodeParms'));\n\n if (Filter instanceof PDFName) {\n stream = decodeStream(\n stream,\n Filter,\n DecodeParms as PDFDict | typeof PDFNull | undefined,\n );\n } else if (Filter instanceof PDFArray) {\n for (let idx = 0, len = Filter.size(); idx < len; idx++) {\n stream = decodeStream(\n stream,\n Filter.lookup(idx, PDFName),\n DecodeParms && (DecodeParms as PDFArray).lookupMaybe(idx, PDFDict),\n );\n }\n } else if (!!Filter) {\n throw new UnexpectedObjectTypeError([PDFName, PDFArray], Filter);\n }\n\n return stream;\n};\n","import {\n MissingPageContentsEmbeddingError,\n UnrecognizedStreamTypeError,\n} from 'src/core/errors';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFContext from 'src/core/PDFContext';\nimport { decodePDFRawStream } from 'src/core/streams/decode';\nimport PDFContentStream from 'src/core/structures/PDFContentStream';\nimport PDFPageLeaf from 'src/core/structures/PDFPageLeaf';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { TransformationMatrix } from 'src/types/matrix';\nimport { mergeIntoTypedArray } from 'src/utils';\n\n/**\n * Represents a page bounding box.\n * Usually `left` and `bottom` are 0 and right, top are equal\n * to width, height if you want to clip to the whole page.\n *\n * y\n * ^\n * | +--------+ (width,height)\n * | | |\n * | | Page |\n * | | |\n * | | |\n * (0,0) | +--------+\n * +----------> x\n */\nexport interface PageBoundingBox {\n left: number /** The left of the bounding box */;\n bottom: number /** The bottom of the bounding box */;\n right: number /** The right of the bounding box */;\n top: number /** The top of the bounding box */;\n}\n\nconst fullPageBoundingBox = (page: PDFPageLeaf) => {\n const mediaBox = page.MediaBox();\n\n const width =\n mediaBox.lookup(2, PDFNumber).asNumber() -\n mediaBox.lookup(0, PDFNumber).asNumber();\n\n const height =\n mediaBox.lookup(3, PDFNumber).asNumber() -\n mediaBox.lookup(1, PDFNumber).asNumber();\n\n return { left: 0, bottom: 0, right: width, top: height };\n};\n\n// Returns the identity matrix, modified to position the content of the given\n// bounding box at (0, 0).\nconst boundingBoxAdjustedMatrix = (\n bb: PageBoundingBox,\n): TransformationMatrix => [1, 0, 0, 1, -bb.left, -bb.bottom];\n\nclass PDFPageEmbedder {\n static async for(\n page: PDFPageLeaf,\n boundingBox?: PageBoundingBox,\n transformationMatrix?: TransformationMatrix,\n ) {\n return new PDFPageEmbedder(page, boundingBox, transformationMatrix);\n }\n\n readonly width: number;\n readonly height: number;\n readonly boundingBox: PageBoundingBox;\n readonly transformationMatrix: TransformationMatrix;\n\n private readonly page: PDFPageLeaf;\n\n private constructor(\n page: PDFPageLeaf,\n boundingBox?: PageBoundingBox,\n transformationMatrix?: TransformationMatrix,\n ) {\n this.page = page;\n\n const bb = boundingBox ?? fullPageBoundingBox(page);\n\n this.width = bb.right - bb.left;\n this.height = bb.top - bb.bottom;\n this.boundingBox = bb;\n this.transformationMatrix =\n transformationMatrix ?? boundingBoxAdjustedMatrix(bb);\n }\n\n async embedIntoContext(context: PDFContext, ref?: PDFRef): Promise {\n const { Contents, Resources } = this.page.normalizedEntries();\n\n if (!Contents) throw new MissingPageContentsEmbeddingError();\n const decodedContents = this.decodeContents(Contents);\n\n const { left, bottom, right, top } = this.boundingBox;\n const xObject = context.flateStream(decodedContents, {\n Type: 'XObject',\n Subtype: 'Form',\n FormType: 1,\n BBox: [left, bottom, right, top],\n Matrix: this.transformationMatrix,\n Resources,\n });\n\n if (ref) {\n context.assign(ref, xObject);\n return ref;\n } else {\n return context.register(xObject);\n }\n }\n\n // `contents` is an array of streams which are merged to include them in the XObject.\n // This methods extracts each stream and joins them with a newline character.\n private decodeContents(contents: PDFArray) {\n const newline = Uint8Array.of(CharCodes.Newline);\n const decodedContents: Uint8Array[] = [];\n\n for (let idx = 0, len = contents.size(); idx < len; idx++) {\n const stream = contents.lookup(idx, PDFStream);\n\n let content: Uint8Array;\n if (stream instanceof PDFRawStream) {\n content = decodePDFRawStream(stream).decode();\n } else if (stream instanceof PDFContentStream) {\n content = stream.getUnencodedContents();\n } else {\n throw new UnrecognizedStreamTypeError(stream);\n }\n\n decodedContents.push(content, newline);\n }\n\n return mergeIntoTypedArray(...decodedContents);\n }\n}\n\nexport default PDFPageEmbedder;\n","import PDFArray from 'src/core/objects/PDFArray';\nimport PDFBool from 'src/core/objects/PDFBool';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFContext from 'src/core/PDFContext';\nimport {\n assertEachIs,\n assertInteger,\n assertIsOneOf,\n assertRange,\n} from 'src/utils';\n\nconst asEnum = (\n rawValue: T | undefined,\n enumType: U,\n): U[keyof U] | undefined => {\n if (rawValue === undefined) return undefined;\n return enumType[rawValue];\n};\n\nexport enum NonFullScreenPageMode {\n /**\n * After exiting FullScreen mode, neither the document outline nor thumbnail\n * images should be visible.\n */\n UseNone = 'UseNone',\n\n /** After exiting FullScreen mode, the document outline should be visible. */\n UseOutlines = 'UseOutlines',\n\n /** After exiting FullScreen mode, thumbnail images should be visible. */\n UseThumbs = 'UseThumbs',\n\n /**\n * After exiting FullScreen mode, the optional content group panel should be\n * visible.\n */\n UseOC = 'UseOC',\n}\n\nexport enum ReadingDirection {\n /** The predominant reading order is Left to Right. */\n L2R = 'L2R',\n\n /**\n * The predominant reading order is Right to left (including vertical writing\n * systems, such as Chinese, Japanese and Korean).\n */\n R2L = 'R2L',\n}\n\nexport enum PrintScaling {\n /** No page scaling. */\n None = 'None',\n\n /* Use the PDF reader's default print scaling. */\n AppDefault = 'AppDefault',\n}\n\nexport enum Duplex {\n /** The PDF reader should print single-sided. */\n Simplex = 'Simplex',\n\n /**\n * The PDF reader should print double sided and flip on the short edge of the\n * sheet.\n */\n DuplexFlipShortEdge = 'DuplexFlipShortEdge',\n\n /**\n * The PDF reader should print double sided and flip on the long edge of the\n * sheet.\n */\n DuplexFlipLongEdge = 'DuplexFlipLongEdge',\n}\n\ntype BoolViewerPrefKey =\n | 'HideToolbar'\n | 'HideMenubar'\n | 'HideWindowUI'\n | 'FitWindow'\n | 'CenterWindow'\n | 'DisplayDocTitle'\n | 'PickTrayByPDFSize';\ntype NameViewerPrefKey =\n | 'NonFullScreenPageMode'\n | 'Direction'\n | 'PrintScaling'\n | 'Duplex';\n\ninterface PageRange {\n start: number;\n end: number;\n}\n\nclass ViewerPreferences {\n /** @ignore */\n readonly dict: PDFDict;\n\n /** @ignore */\n static fromDict = (dict: PDFDict): ViewerPreferences =>\n new ViewerPreferences(dict);\n\n /** @ignore */\n static create = (context: PDFContext) => {\n const dict = context.obj({});\n return new ViewerPreferences(dict);\n };\n\n /** @ignore */\n protected constructor(dict: PDFDict) {\n this.dict = dict;\n }\n\n protected lookupBool(key: BoolViewerPrefKey): PDFBool | undefined {\n const returnObj = this.dict.lookup(PDFName.of(key));\n if (returnObj instanceof PDFBool) return returnObj;\n return undefined;\n }\n\n protected lookupName(key: NameViewerPrefKey): PDFName | undefined {\n const returnObj = this.dict.lookup(PDFName.of(key));\n if (returnObj instanceof PDFName) return returnObj;\n return undefined;\n }\n\n /** @ignore */\n HideToolbar(): PDFBool | undefined {\n return this.lookupBool('HideToolbar');\n }\n\n /** @ignore */\n HideMenubar(): PDFBool | undefined {\n return this.lookupBool('HideMenubar');\n }\n\n /** @ignore */\n HideWindowUI(): PDFBool | undefined {\n return this.lookupBool('HideWindowUI');\n }\n\n /** @ignore */\n FitWindow(): PDFBool | undefined {\n return this.lookupBool('FitWindow');\n }\n\n /** @ignore */\n CenterWindow(): PDFBool | undefined {\n return this.lookupBool('CenterWindow');\n }\n\n /** @ignore */\n DisplayDocTitle(): PDFBool | undefined {\n return this.lookupBool('DisplayDocTitle');\n }\n\n /** @ignore */\n NonFullScreenPageMode(): PDFName | undefined {\n return this.lookupName('NonFullScreenPageMode');\n }\n\n /** @ignore */\n Direction(): PDFName | undefined {\n return this.lookupName('Direction');\n }\n\n /** @ignore */\n PrintScaling(): PDFName | undefined {\n return this.lookupName('PrintScaling');\n }\n\n /** @ignore */\n Duplex(): PDFName | undefined {\n return this.lookupName('Duplex');\n }\n\n /** @ignore */\n PickTrayByPDFSize(): PDFBool | undefined {\n return this.lookupBool('PickTrayByPDFSize');\n }\n\n /** @ignore */\n PrintPageRange(): PDFArray | undefined {\n const PrintPageRange = this.dict.lookup(PDFName.of('PrintPageRange'));\n if (PrintPageRange instanceof PDFArray) return PrintPageRange;\n return undefined;\n }\n\n /** @ignore */\n NumCopies(): PDFNumber | undefined {\n const NumCopies = this.dict.lookup(PDFName.of('NumCopies'));\n if (NumCopies instanceof PDFNumber) return NumCopies;\n return undefined;\n }\n\n /**\n * Returns `true` if PDF readers should hide the toolbar menus when displaying\n * this document.\n * @returns Whether or not toolbars should be hidden.\n */\n getHideToolbar(): boolean {\n return this.HideToolbar()?.asBoolean() ?? false;\n }\n\n /**\n * Returns `true` if PDF readers should hide the menu bar when displaying this\n * document.\n * @returns Whether or not the menu bar should be hidden.\n */\n getHideMenubar(): boolean {\n return this.HideMenubar()?.asBoolean() ?? false;\n }\n\n /**\n * Returns `true` if PDF readers should hide the user interface elements in\n * the document's window (such as scroll bars and navigation controls),\n * leaving only the document's contents displayed.\n * @returns Whether or not user interface elements should be hidden.\n */\n getHideWindowUI(): boolean {\n return this.HideWindowUI()?.asBoolean() ?? false;\n }\n\n /**\n * Returns `true` if PDF readers should resize the document's window to fit\n * the size of the first displayed page.\n * @returns Whether or not the window should be resized to fit.\n */\n getFitWindow(): boolean {\n return this.FitWindow()?.asBoolean() ?? false;\n }\n\n /**\n * Returns `true` if PDF readers should position the document's window in the\n * center of the screen.\n * @returns Whether or not to center the document window.\n */\n getCenterWindow(): boolean {\n return this.CenterWindow()?.asBoolean() ?? false;\n }\n\n /**\n * Returns `true` if the window's title bar should display the document\n * `Title`, taken from the document metadata (see [[PDFDocument.getTitle]]).\n * Returns `false` if the title bar should instead display the filename of the\n * PDF file.\n * @returns Whether to display the document title.\n */\n getDisplayDocTitle(): boolean {\n return this.DisplayDocTitle()?.asBoolean() ?? false;\n }\n\n /**\n * Returns the page mode, which tells the PDF reader how to display the\n * document after exiting full-screen mode.\n * @returns The page mode after exiting full-screen mode.\n */\n getNonFullScreenPageMode(): NonFullScreenPageMode {\n const mode = this.NonFullScreenPageMode()?.decodeText();\n return asEnum(mode, NonFullScreenPageMode) ?? NonFullScreenPageMode.UseNone;\n }\n\n /**\n * Returns the predominant reading order for text.\n * @returns The text reading order.\n */\n getReadingDirection(): ReadingDirection {\n const direction = this.Direction()?.decodeText();\n return asEnum(direction, ReadingDirection) ?? ReadingDirection.L2R;\n }\n\n /**\n * Returns the page scaling option that the PDF reader should select when the\n * print dialog is displayed.\n * @returns The page scaling option.\n */\n getPrintScaling(): PrintScaling {\n const scaling = this.PrintScaling()?.decodeText();\n return asEnum(scaling, PrintScaling) ?? PrintScaling.AppDefault;\n }\n\n /**\n * Returns the paper handling option that should be used when printing the\n * file from the print dialog.\n * @returns The paper handling option.\n */\n getDuplex(): Duplex | undefined {\n const duplex = this.Duplex()?.decodeText();\n return asEnum(duplex, Duplex);\n }\n\n /**\n * Returns `true` if the PDF page size should be used to select the input\n * paper tray.\n * @returns Whether or not the PDF page size should be used to select the\n * input paper tray.\n */\n getPickTrayByPDFSize(): boolean | undefined {\n return this.PickTrayByPDFSize()?.asBoolean();\n }\n\n /**\n * Returns an array of page number ranges, which are the values used to\n * initialize the print dialog box when the file is printed. Each range\n * specifies the first (`start`) and last (`end`) pages in a sub-range of\n * pages to be printed. The first page of the PDF file is denoted by 0.\n * For example:\n * ```js\n * const viewerPrefs = pdfDoc.catalog.getOrCreateViewerPreferences()\n * const includesPage3 = viewerPrefs\n * .getPrintRanges()\n * .some(pr => pr.start =< 2 && pr.end >= 2)\n * if (includesPage3) console.log('printRange includes page 3')\n * ```\n * @returns An array of objects, each with the properties `start` and `end`,\n * denoting page indices. If not, specified an empty array is\n * returned.\n */\n getPrintPageRange(): PageRange[] {\n const rng = this.PrintPageRange();\n if (!rng) return [];\n\n const pageRanges: PageRange[] = [];\n for (let i = 0; i < rng.size(); i += 2) {\n // Despite the spec clearly stating that \"The first page of the PDF file\n // shall be donoted by 1\", several test PDFs (spec 1.7) created in\n // Acrobat XI 11.0 and also read with Reader DC 2020.013 indicate this is\n // actually a 0 based index.\n const start = rng.lookup(i, PDFNumber).asNumber();\n const end = rng.lookup(i + 1, PDFNumber).asNumber();\n pageRanges.push({ start, end });\n }\n\n return pageRanges;\n }\n\n /**\n * Returns the number of copies to be printed when the print dialog is opened\n * for this document.\n * @returns The default number of copies to be printed.\n */\n getNumCopies(): number {\n return this.NumCopies()?.asNumber() ?? 1;\n }\n\n /**\n * Choose whether the PDF reader's toolbars should be hidden while the\n * document is active.\n * @param hideToolbar `true` if the toolbar should be hidden.\n */\n setHideToolbar(hideToolbar: boolean) {\n const HideToolbar = this.dict.context.obj(hideToolbar);\n this.dict.set(PDFName.of('HideToolbar'), HideToolbar);\n }\n\n /**\n * Choose whether the PDF reader's menu bar should be hidden while the\n * document is active.\n * @param hideMenubar `true` if the menu bar should be hidden.\n */\n setHideMenubar(hideMenubar: boolean) {\n const HideMenubar = this.dict.context.obj(hideMenubar);\n this.dict.set(PDFName.of('HideMenubar'), HideMenubar);\n }\n\n /**\n * Choose whether the PDF reader should hide user interface elements in the\n * document's window (such as scroll bars and navigation controls), leaving\n * only the document's contents displayed.\n * @param hideWindowUI `true` if the user interface elements should be hidden.\n */\n setHideWindowUI(hideWindowUI: boolean) {\n const HideWindowUI = this.dict.context.obj(hideWindowUI);\n this.dict.set(PDFName.of('HideWindowUI'), HideWindowUI);\n }\n\n /**\n * Choose whether the PDF reader should resize the document's window to fit\n * the size of the first displayed page.\n * @param fitWindow `true` if the window should be resized.\n */\n setFitWindow(fitWindow: boolean) {\n const FitWindow = this.dict.context.obj(fitWindow);\n this.dict.set(PDFName.of('FitWindow'), FitWindow);\n }\n\n /**\n * Choose whether the PDF reader should position the document's window in the\n * center of the screen.\n * @param centerWindow `true` if the window should be centered.\n */\n setCenterWindow(centerWindow: boolean) {\n const CenterWindow = this.dict.context.obj(centerWindow);\n this.dict.set(PDFName.of('CenterWindow'), CenterWindow);\n }\n\n /**\n * Choose whether the window's title bar should display the document `Title`\n * taken from the document metadata (see [[PDFDocument.setTitle]]). If\n * `false`, the title bar should instead display the PDF filename.\n * @param displayTitle `true` if the document title should be displayed.\n */\n setDisplayDocTitle(displayTitle: boolean) {\n const DisplayDocTitle = this.dict.context.obj(displayTitle);\n this.dict.set(PDFName.of('DisplayDocTitle'), DisplayDocTitle);\n }\n\n /**\n * Choose how the PDF reader should display the document upon exiting\n * full-screen mode. This entry is meaningful only if the value of the\n * `PageMode` entry in the document's [[PDFCatalog]] is `FullScreen`.\n *\n * For example:\n * ```js\n * import { PDFDocument, NonFullScreenPageMode, PDFName } from 'pdf-lib'\n *\n * const pdfDoc = await PDFDocument.create()\n *\n * // Set the PageMode\n * pdfDoc.catalog.set(PDFName.of('PageMode'),PDFName.of('FullScreen'))\n *\n * // Set what happens when full-screen is closed\n * const viewerPrefs = pdfDoc.catalog.getOrCreateViewerPreferences()\n * viewerPrefs.setNonFullScreenPageMode(NonFullScreenPageMode.UseOutlines)\n * ```\n *\n * @param nonFullScreenPageMode How the document should be displayed upon\n * exiting full screen mode.\n */\n setNonFullScreenPageMode(nonFullScreenPageMode: NonFullScreenPageMode) {\n assertIsOneOf(\n nonFullScreenPageMode,\n 'nonFullScreenPageMode',\n NonFullScreenPageMode,\n );\n const mode = PDFName.of(nonFullScreenPageMode);\n this.dict.set(PDFName.of('NonFullScreenPageMode'), mode);\n }\n\n /**\n * Choose the predominant reading order for text.\n *\n * This entry has no direct effect on the document's contents or page\n * numbering, but may be used to determine the relative positioning of pages\n * when displayed side by side or printed n-up.\n *\n * For example:\n * ```js\n * import { PDFDocument, ReadingDirection } from 'pdf-lib'\n *\n * const pdfDoc = await PDFDocument.create()\n * const viewerPrefs = pdfDoc.catalog.getOrCreateViewerPreferences()\n * viewerPrefs.setReadingDirection(ReadingDirection.R2L)\n * ```\n *\n * @param readingDirection The reading order for text.\n */\n setReadingDirection(readingDirection: ReadingDirection) {\n assertIsOneOf(readingDirection, 'readingDirection', ReadingDirection);\n const direction = PDFName.of(readingDirection);\n this.dict.set(PDFName.of('Direction'), direction);\n }\n\n /**\n * Choose the page scaling option that should be selected when a print dialog\n * is displayed for this document.\n *\n * For example:\n * ```js\n * import { PDFDocument, PrintScaling } from 'pdf-lib'\n *\n * const pdfDoc = await PDFDocument.create()\n * const viewerPrefs = pdfDoc.catalog.getOrCreateViewerPreferences()\n * viewerPrefs.setPrintScaling(PrintScaling.None)\n * ```\n *\n * @param printScaling The print scaling option.\n */\n setPrintScaling(printScaling: PrintScaling) {\n assertIsOneOf(printScaling, 'printScaling', PrintScaling);\n const scaling = PDFName.of(printScaling);\n this.dict.set(PDFName.of('PrintScaling'), scaling);\n }\n\n /**\n * Choose the paper handling option that should be selected by default in the\n * print dialog.\n *\n * For example:\n * ```js\n * import { PDFDocument, Duplex } from 'pdf-lib'\n *\n * const pdfDoc = await PDFDocument.create()\n * const viewerPrefs = pdfDoc.catalog.getOrCreateViewerPreferences()\n * viewerPrefs.setDuplex(Duplex.DuplexFlipShortEdge)\n * ```\n *\n * @param duplex The double or single sided printing option.\n */\n setDuplex(duplex: Duplex) {\n assertIsOneOf(duplex, 'duplex', Duplex);\n const dup = PDFName.of(duplex);\n this.dict.set(PDFName.of('Duplex'), dup);\n }\n\n /**\n * Choose whether the PDF document's page size should be used to select the\n * input paper tray when printing. This setting influences only the preset\n * values used to populate the print dialog presented by a PDF reader.\n *\n * If PickTrayByPDFSize is true, the check box in the print dialog associated\n * with input paper tray should be checked. This setting has no effect on\n * operating systems that do not provide the ability to pick the input tray\n * by size.\n *\n * @param pickTrayByPDFSize `true` if the document's page size should be used\n * to select the input paper tray.\n */\n setPickTrayByPDFSize(pickTrayByPDFSize: boolean) {\n const PickTrayByPDFSize = this.dict.context.obj(pickTrayByPDFSize);\n this.dict.set(PDFName.of('PickTrayByPDFSize'), PickTrayByPDFSize);\n }\n\n /**\n * Choose the page numbers used to initialize the print dialog box when the\n * file is printed. The first page of the PDF file is denoted by 0.\n *\n * For example:\n * ```js\n * import { PDFDocument } from 'pdf-lib'\n *\n * const pdfDoc = await PDFDocument.create()\n * const viewerPrefs = pdfDoc.catalog.getOrCreateViewerPreferences()\n *\n * // We can set the default print range to only the first page\n * viewerPrefs.setPrintPageRange({ start: 0, end: 0 })\n *\n * // Or we can supply noncontiguous ranges (e.g. pages 1, 3, and 5-7)\n * viewerPrefs.setPrintPageRange([\n * { start: 0, end: 0 },\n * { start: 2, end: 2 },\n * { start: 4, end: 6 },\n * ])\n * ```\n *\n * @param printPageRange An object or array of objects, each with the\n * properties `start` and `end`, denoting a range of\n * page indices.\n */\n setPrintPageRange(printPageRange: PageRange[] | PageRange) {\n if (!Array.isArray(printPageRange)) printPageRange = [printPageRange];\n\n const flatRange: number[] = [];\n for (let idx = 0, len = printPageRange.length; idx < len; idx++) {\n flatRange.push(printPageRange[idx].start);\n flatRange.push(printPageRange[idx].end);\n }\n\n assertEachIs(flatRange, 'printPageRange', ['number']);\n\n const pageRanges = this.dict.context.obj(flatRange);\n this.dict.set(PDFName.of('PrintPageRange'), pageRanges);\n }\n\n /**\n * Choose the default number of copies to be printed when the print dialog is\n * opened for this file.\n * @param numCopies The default number of copies.\n */\n setNumCopies(numCopies: number) {\n assertRange(numCopies, 'numCopies', 1, Number.MAX_VALUE);\n assertInteger(numCopies, 'numCopies');\n const NumCopies = this.dict.context.obj(numCopies);\n this.dict.set(PDFName.of('NumCopies'), NumCopies);\n }\n}\n\nexport default ViewerPreferences;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport { findLastMatch } from 'src/utils';\nimport { MissingDAEntryError, MissingTfOperatorError } from 'src/core/errors';\n\n// Examples:\n// `/Helv 12 Tf` -> ['Helv', '12']\n// `/HeBo 8.00 Tf` -> ['HeBo', '8.00']\n// `/HeBo Tf` -> ['HeBo', undefined]\nconst tfRegex = /\\/([^\\0\\t\\n\\f\\r\\ ]+)[\\0\\t\\n\\f\\r\\ ]*(\\d*\\.\\d+|\\d+)?[\\0\\t\\n\\f\\r\\ ]+Tf/;\n\nclass PDFAcroField {\n readonly dict: PDFDict;\n readonly ref: PDFRef;\n\n protected constructor(dict: PDFDict, ref: PDFRef) {\n this.dict = dict;\n this.ref = ref;\n }\n\n T(): PDFString | PDFHexString | undefined {\n return this.dict.lookupMaybe(PDFName.of('T'), PDFString, PDFHexString);\n }\n\n Ff(): PDFNumber | undefined {\n const numberOrRef = this.getInheritableAttribute(PDFName.of('Ff'));\n return this.dict.context.lookupMaybe(numberOrRef, PDFNumber);\n }\n\n V(): PDFObject | undefined {\n const valueOrRef = this.getInheritableAttribute(PDFName.of('V'));\n return this.dict.context.lookup(valueOrRef);\n }\n\n Kids(): PDFArray | undefined {\n return this.dict.lookupMaybe(PDFName.of('Kids'), PDFArray);\n }\n\n // Parent(): PDFDict | undefined {\n // return this.dict.lookupMaybe(PDFName.of('Parent'), PDFDict);\n // }\n\n DA(): PDFString | PDFHexString | undefined {\n const da = this.dict.lookup(PDFName.of('DA'));\n if (da instanceof PDFString || da instanceof PDFHexString) return da;\n return undefined;\n }\n\n setKids(kids: PDFObject[]) {\n this.dict.set(PDFName.of('Kids'), this.dict.context.obj(kids));\n }\n\n getParent(): PDFAcroField | undefined {\n // const parent = this.Parent();\n // if (!parent) return undefined;\n // return new PDFAcroField(parent);\n\n const parentRef = this.dict.get(PDFName.of('Parent'));\n if (parentRef instanceof PDFRef) {\n const parent = this.dict.lookup(PDFName.of('Parent'), PDFDict);\n return new PDFAcroField(parent, parentRef);\n }\n\n return undefined;\n }\n\n setParent(parent: PDFRef | undefined) {\n if (!parent) this.dict.delete(PDFName.of('Parent'));\n else this.dict.set(PDFName.of('Parent'), parent);\n }\n\n getFullyQualifiedName(): string | undefined {\n const parent = this.getParent();\n if (!parent) return this.getPartialName();\n return `${parent.getFullyQualifiedName()}.${this.getPartialName()}`;\n }\n\n getPartialName(): string | undefined {\n return this.T()?.decodeText();\n }\n\n setPartialName(partialName: string | undefined) {\n if (!partialName) this.dict.delete(PDFName.of('T'));\n else this.dict.set(PDFName.of('T'), PDFHexString.fromText(partialName));\n }\n\n setDefaultAppearance(appearance: string) {\n this.dict.set(PDFName.of('DA'), PDFString.of(appearance));\n }\n\n getDefaultAppearance(): string | undefined {\n const DA = this.DA();\n\n if (DA instanceof PDFHexString) {\n return DA.decodeText();\n }\n\n return DA?.asString();\n }\n\n setFontSize(fontSize: number) {\n const name = this.getFullyQualifiedName() ?? '';\n\n const da = this.getDefaultAppearance();\n if (!da) throw new MissingDAEntryError(name);\n\n const daMatch = findLastMatch(da, tfRegex);\n if (!daMatch.match) throw new MissingTfOperatorError(name);\n\n const daStart = da.slice(0, daMatch.pos - daMatch.match[0].length);\n const daEnd = daMatch.pos <= da.length ? da.slice(daMatch.pos) : '';\n const fontName = daMatch.match[1];\n const modifiedDa = `${daStart} /${fontName} ${fontSize} Tf ${daEnd}`;\n\n this.setDefaultAppearance(modifiedDa);\n }\n\n getFlags(): number {\n return this.Ff()?.asNumber() ?? 0;\n }\n\n setFlags(flags: number) {\n this.dict.set(PDFName.of('Ff'), PDFNumber.of(flags));\n }\n\n hasFlag(flag: number): boolean {\n const flags = this.getFlags();\n return (flags & flag) !== 0;\n }\n\n setFlag(flag: number) {\n const flags = this.getFlags();\n this.setFlags(flags | flag);\n }\n\n clearFlag(flag: number) {\n const flags = this.getFlags();\n this.setFlags(flags & ~flag);\n }\n\n setFlagTo(flag: number, enable: boolean) {\n if (enable) this.setFlag(flag);\n else this.clearFlag(flag);\n }\n\n getInheritableAttribute(name: PDFName): PDFObject | undefined {\n let attribute: PDFObject | undefined;\n this.ascend((node) => {\n if (!attribute) attribute = node.dict.get(name);\n });\n return attribute;\n }\n\n ascend(visitor: (node: PDFAcroField) => any): void {\n visitor(this);\n const parent = this.getParent();\n if (parent) parent.ascend(visitor);\n }\n}\n\nexport default PDFAcroField;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\n\n// TODO: Also handle the `/S` and `/D` entries\nclass BorderStyle {\n readonly dict: PDFDict;\n\n static fromDict = (dict: PDFDict): BorderStyle => new BorderStyle(dict);\n\n protected constructor(dict: PDFDict) {\n this.dict = dict;\n }\n\n W(): PDFNumber | undefined {\n const W = this.dict.lookup(PDFName.of('W'));\n if (W instanceof PDFNumber) return W;\n return undefined;\n }\n\n getWidth(): number | undefined {\n return this.W()?.asNumber() ?? 1;\n }\n\n setWidth(width: number) {\n const W = this.dict.context.obj(width);\n this.dict.set(PDFName.of('W'), W);\n }\n}\n\nexport default BorderStyle;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFNumber from 'src/core/objects/PDFNumber';\n\nclass PDFAnnotation {\n readonly dict: PDFDict;\n\n static fromDict = (dict: PDFDict): PDFAnnotation => new PDFAnnotation(dict);\n\n protected constructor(dict: PDFDict) {\n this.dict = dict;\n }\n\n // This is technically required by the PDF spec\n Rect(): PDFArray | undefined {\n return this.dict.lookup(PDFName.of('Rect'), PDFArray);\n }\n\n AP(): PDFDict | undefined {\n return this.dict.lookupMaybe(PDFName.of('AP'), PDFDict);\n }\n\n F(): PDFNumber | undefined {\n const numberOrRef = this.dict.lookup(PDFName.of('F'));\n return this.dict.context.lookupMaybe(numberOrRef, PDFNumber);\n }\n\n getRectangle(): { x: number; y: number; width: number; height: number } {\n const Rect = this.Rect();\n return Rect?.asRectangle() ?? { x: 0, y: 0, width: 0, height: 0 };\n }\n\n setRectangle(rect: { x: number; y: number; width: number; height: number }) {\n const { x, y, width, height } = rect;\n const Rect = this.dict.context.obj([x, y, x + width, y + height]);\n this.dict.set(PDFName.of('Rect'), Rect);\n }\n\n getAppearanceState(): PDFName | undefined {\n const AS = this.dict.lookup(PDFName.of('AS'));\n if (AS instanceof PDFName) return AS;\n return undefined;\n }\n\n setAppearanceState(state: PDFName) {\n this.dict.set(PDFName.of('AS'), state);\n }\n\n setAppearances(appearances: PDFDict) {\n this.dict.set(PDFName.of('AP'), appearances);\n }\n\n ensureAP(): PDFDict {\n let AP = this.AP();\n if (!AP) {\n AP = this.dict.context.obj({});\n this.dict.set(PDFName.of('AP'), AP);\n }\n return AP;\n }\n\n getNormalAppearance(): PDFRef | PDFDict {\n const AP = this.ensureAP();\n const N = AP.get(PDFName.of('N'));\n if (N instanceof PDFRef || N instanceof PDFDict) return N;\n\n throw new Error(`Unexpected N type: ${N?.constructor.name}`);\n }\n\n /** @param appearance A PDFDict or PDFStream (direct or ref) */\n setNormalAppearance(appearance: PDFRef | PDFDict) {\n const AP = this.ensureAP();\n AP.set(PDFName.of('N'), appearance);\n }\n\n /** @param appearance A PDFDict or PDFStream (direct or ref) */\n setRolloverAppearance(appearance: PDFRef | PDFDict) {\n const AP = this.ensureAP();\n AP.set(PDFName.of('R'), appearance);\n }\n\n /** @param appearance A PDFDict or PDFStream (direct or ref) */\n setDownAppearance(appearance: PDFRef | PDFDict) {\n const AP = this.ensureAP();\n AP.set(PDFName.of('D'), appearance);\n }\n\n removeRolloverAppearance() {\n const AP = this.AP();\n AP?.delete(PDFName.of('R'));\n }\n\n removeDownAppearance() {\n const AP = this.AP();\n AP?.delete(PDFName.of('D'));\n }\n\n getAppearances():\n | {\n normal: PDFStream | PDFDict;\n rollover?: PDFStream | PDFDict;\n down?: PDFStream | PDFDict;\n }\n | undefined {\n const AP = this.AP();\n\n if (!AP) return undefined;\n\n const N = AP.lookup(PDFName.of('N'), PDFDict, PDFStream);\n const R = AP.lookupMaybe(PDFName.of('R'), PDFDict, PDFStream);\n const D = AP.lookupMaybe(PDFName.of('D'), PDFDict, PDFStream);\n\n return { normal: N, rollover: R, down: D };\n }\n\n getFlags(): number {\n return this.F()?.asNumber() ?? 0;\n }\n\n setFlags(flags: number) {\n this.dict.set(PDFName.of('F'), PDFNumber.of(flags));\n }\n\n hasFlag(flag: number): boolean {\n const flags = this.getFlags();\n return (flags & flag) !== 0;\n }\n\n setFlag(flag: number) {\n const flags = this.getFlags();\n this.setFlags(flags | flag);\n }\n\n clearFlag(flag: number) {\n const flags = this.getFlags();\n this.setFlags(flags & ~flag);\n }\n\n setFlagTo(flag: number, enable: boolean) {\n if (enable) this.setFlag(flag);\n else this.clearFlag(flag);\n }\n}\n\nexport default PDFAnnotation;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFString from 'src/core/objects/PDFString';\n\nclass AppearanceCharacteristics {\n readonly dict: PDFDict;\n\n static fromDict = (dict: PDFDict): AppearanceCharacteristics =>\n new AppearanceCharacteristics(dict);\n\n protected constructor(dict: PDFDict) {\n this.dict = dict;\n }\n\n R(): PDFNumber | undefined {\n const R = this.dict.lookup(PDFName.of('R'));\n if (R instanceof PDFNumber) return R;\n return undefined;\n }\n\n BC(): PDFArray | undefined {\n const BC = this.dict.lookup(PDFName.of('BC'));\n if (BC instanceof PDFArray) return BC;\n return undefined;\n }\n\n BG(): PDFArray | undefined {\n const BG = this.dict.lookup(PDFName.of('BG'));\n if (BG instanceof PDFArray) return BG;\n return undefined;\n }\n\n CA(): PDFHexString | PDFString | undefined {\n const CA = this.dict.lookup(PDFName.of('CA'));\n if (CA instanceof PDFHexString || CA instanceof PDFString) return CA;\n return undefined;\n }\n\n RC(): PDFHexString | PDFString | undefined {\n const RC = this.dict.lookup(PDFName.of('RC'));\n if (RC instanceof PDFHexString || RC instanceof PDFString) return RC;\n return undefined;\n }\n\n AC(): PDFHexString | PDFString | undefined {\n const AC = this.dict.lookup(PDFName.of('AC'));\n if (AC instanceof PDFHexString || AC instanceof PDFString) return AC;\n return undefined;\n }\n\n getRotation(): number | undefined {\n return this.R()?.asNumber();\n }\n\n getBorderColor(): number[] | undefined {\n const BC = this.BC();\n\n if (!BC) return undefined;\n\n const components: number[] = [];\n for (let idx = 0, len = BC?.size(); idx < len; idx++) {\n const component = BC.get(idx);\n if (component instanceof PDFNumber) components.push(component.asNumber());\n }\n\n return components;\n }\n\n getBackgroundColor(): number[] | undefined {\n const BG = this.BG();\n\n if (!BG) return undefined;\n\n const components: number[] = [];\n for (let idx = 0, len = BG?.size(); idx < len; idx++) {\n const component = BG.get(idx);\n if (component instanceof PDFNumber) components.push(component.asNumber());\n }\n\n return components;\n }\n\n getCaptions(): { normal?: string; rollover?: string; down?: string } {\n const CA = this.CA();\n const RC = this.RC();\n const AC = this.AC();\n\n return {\n normal: CA?.decodeText(),\n rollover: RC?.decodeText(),\n down: AC?.decodeText(),\n };\n }\n\n setRotation(rotation: number) {\n const R = this.dict.context.obj(rotation);\n this.dict.set(PDFName.of('R'), R);\n }\n\n setBorderColor(color: number[]) {\n const BC = this.dict.context.obj(color);\n this.dict.set(PDFName.of('BC'), BC);\n }\n\n setBackgroundColor(color: number[]) {\n const BG = this.dict.context.obj(color);\n this.dict.set(PDFName.of('BG'), BG);\n }\n\n setCaptions(captions: { normal: string; rollover?: string; down?: string }) {\n const CA = PDFHexString.fromText(captions.normal);\n this.dict.set(PDFName.of('CA'), CA);\n\n if (captions.rollover) {\n const RC = PDFHexString.fromText(captions.rollover);\n this.dict.set(PDFName.of('RC'), RC);\n } else {\n this.dict.delete(PDFName.of('RC'));\n }\n\n if (captions.down) {\n const AC = PDFHexString.fromText(captions.down);\n this.dict.set(PDFName.of('AC'), AC);\n } else {\n this.dict.delete(PDFName.of('AC'));\n }\n }\n}\n\nexport default AppearanceCharacteristics;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFContext from 'src/core/PDFContext';\nimport BorderStyle from 'src/core/annotation/BorderStyle';\nimport PDFAnnotation from 'src/core/annotation/PDFAnnotation';\nimport AppearanceCharacteristics from 'src/core/annotation/AppearanceCharacteristics';\n\nclass PDFWidgetAnnotation extends PDFAnnotation {\n static fromDict = (dict: PDFDict): PDFWidgetAnnotation =>\n new PDFWidgetAnnotation(dict);\n\n static create = (context: PDFContext, parent: PDFRef) => {\n const dict = context.obj({\n Type: 'Annot',\n Subtype: 'Widget',\n Rect: [0, 0, 0, 0],\n Parent: parent,\n });\n return new PDFWidgetAnnotation(dict);\n };\n\n MK(): PDFDict | undefined {\n const MK = this.dict.lookup(PDFName.of('MK'));\n if (MK instanceof PDFDict) return MK;\n return undefined;\n }\n\n BS(): PDFDict | undefined {\n const BS = this.dict.lookup(PDFName.of('BS'));\n if (BS instanceof PDFDict) return BS;\n return undefined;\n }\n\n DA(): PDFString | PDFHexString | undefined {\n const da = this.dict.lookup(PDFName.of('DA'));\n if (da instanceof PDFString || da instanceof PDFHexString) return da;\n return undefined;\n }\n\n P(): PDFRef | undefined {\n const P = this.dict.get(PDFName.of('P'));\n if (P instanceof PDFRef) return P;\n return undefined;\n }\n\n setP(page: PDFRef) {\n this.dict.set(PDFName.of('P'), page);\n }\n\n setDefaultAppearance(appearance: string) {\n this.dict.set(PDFName.of('DA'), PDFString.of(appearance));\n }\n\n getDefaultAppearance(): string | undefined {\n const DA = this.DA();\n\n if (DA instanceof PDFHexString) {\n return DA.decodeText();\n }\n\n return DA?.asString();\n }\n\n getAppearanceCharacteristics(): AppearanceCharacteristics | undefined {\n const MK = this.MK();\n if (MK) return AppearanceCharacteristics.fromDict(MK);\n return undefined;\n }\n\n getOrCreateAppearanceCharacteristics(): AppearanceCharacteristics {\n const MK = this.MK();\n if (MK) return AppearanceCharacteristics.fromDict(MK);\n\n const ac = AppearanceCharacteristics.fromDict(this.dict.context.obj({}));\n this.dict.set(PDFName.of('MK'), ac.dict);\n return ac;\n }\n\n getBorderStyle(): BorderStyle | undefined {\n const BS = this.BS();\n if (BS) return BorderStyle.fromDict(BS);\n return undefined;\n }\n\n getOrCreateBorderStyle(): BorderStyle {\n const BS = this.BS();\n if (BS) return BorderStyle.fromDict(BS);\n\n const bs = BorderStyle.fromDict(this.dict.context.obj({}));\n this.dict.set(PDFName.of('BS'), bs.dict);\n return bs;\n }\n\n getOnValue(): PDFName | undefined {\n const normal = this.getAppearances()?.normal;\n\n if (normal instanceof PDFDict) {\n const keys = normal.keys();\n for (let idx = 0, len = keys.length; idx < len; idx++) {\n const key = keys[idx];\n if (key !== PDFName.of('Off')) return key;\n }\n }\n\n return undefined;\n }\n}\n\nexport default PDFWidgetAnnotation;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFAcroField from 'src/core/acroform/PDFAcroField';\nimport PDFWidgetAnnotation from 'src/core/annotation/PDFWidgetAnnotation';\nimport { IndexOutOfBoundsError } from 'src/core/errors';\n\nclass PDFAcroTerminal extends PDFAcroField {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroTerminal(dict, ref);\n\n FT(): PDFName {\n const nameOrRef = this.getInheritableAttribute(PDFName.of('FT'));\n return this.dict.context.lookup(nameOrRef, PDFName);\n }\n\n getWidgets(): PDFWidgetAnnotation[] {\n const kidDicts = this.Kids();\n\n // This field is itself a widget\n if (!kidDicts) return [PDFWidgetAnnotation.fromDict(this.dict)];\n\n // This field's kids are its widgets\n const widgets = new Array(kidDicts.size());\n for (let idx = 0, len = kidDicts.size(); idx < len; idx++) {\n const dict = kidDicts.lookup(idx, PDFDict);\n widgets[idx] = PDFWidgetAnnotation.fromDict(dict);\n }\n\n return widgets;\n }\n\n addWidget(ref: PDFRef) {\n const { Kids } = this.normalizedEntries();\n Kids.push(ref);\n }\n\n removeWidget(idx: number) {\n const kidDicts = this.Kids();\n\n if (!kidDicts) {\n // This field is itself a widget\n if (idx !== 0) throw new IndexOutOfBoundsError(idx, 0, 0);\n this.setKids([]);\n } else {\n // This field's kids are its widgets\n if (idx < 0 || idx > kidDicts.size()) {\n throw new IndexOutOfBoundsError(idx, 0, kidDicts.size());\n }\n kidDicts.remove(idx);\n }\n }\n\n normalizedEntries() {\n let Kids = this.Kids();\n\n // If this field is itself a widget (because it was only rendered once in\n // the document, so the field and widget properties were merged) then we\n // add itself to the `Kids` array. The alternative would be to try\n // splitting apart the widget properties and creating a separate object\n // for them.\n if (!Kids) {\n Kids = this.dict.context.obj([this.ref]);\n this.dict.set(PDFName.of('Kids'), Kids);\n }\n\n return { Kids };\n }\n}\n\nexport default PDFAcroTerminal;\n","import PDFObject from 'src/core/objects/PDFObject';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFAcroTerminal from 'src/core/acroform/PDFAcroTerminal';\nimport { IndexOutOfBoundsError } from 'src/core/errors';\n\nclass PDFAcroButton extends PDFAcroTerminal {\n Opt(): PDFString | PDFHexString | PDFArray | undefined {\n return this.dict.lookupMaybe(\n PDFName.of('Opt'),\n PDFString,\n PDFHexString,\n PDFArray,\n );\n }\n\n setOpt(opt: PDFObject[]) {\n this.dict.set(PDFName.of('Opt'), this.dict.context.obj(opt));\n }\n\n getExportValues(): (PDFString | PDFHexString)[] | undefined {\n const opt = this.Opt();\n\n if (!opt) return undefined;\n\n if (opt instanceof PDFString || opt instanceof PDFHexString) {\n return [opt];\n }\n\n const values: (PDFString | PDFHexString)[] = [];\n for (let idx = 0, len = opt.size(); idx < len; idx++) {\n const value = opt.lookup(idx);\n if (value instanceof PDFString || value instanceof PDFHexString) {\n values.push(value);\n }\n }\n\n return values;\n }\n\n removeExportValue(idx: number) {\n const opt = this.Opt();\n\n if (!opt) return;\n\n if (opt instanceof PDFString || opt instanceof PDFHexString) {\n if (idx !== 0) throw new IndexOutOfBoundsError(idx, 0, 0);\n this.setOpt([]);\n } else {\n if (idx < 0 || idx > opt.size()) {\n throw new IndexOutOfBoundsError(idx, 0, opt.size());\n }\n opt.remove(idx);\n }\n }\n\n // Enforce use use of /Opt even if it isn't strictly necessary\n normalizeExportValues() {\n const exportValues = this.getExportValues() ?? [];\n\n const Opt: (PDFString | PDFHexString)[] = [];\n\n const widgets = this.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const exportVal =\n exportValues[idx] ??\n PDFHexString.fromText(widget.getOnValue()?.decodeText() ?? '');\n Opt.push(exportVal);\n }\n\n this.setOpt(Opt);\n }\n\n /**\n * Reuses existing opt if one exists with the same value (assuming\n * `useExistingIdx` is `true`). Returns index of existing (or new) opt.\n */\n addOpt(opt: PDFHexString | PDFString, useExistingOptIdx: boolean): number {\n this.normalizeExportValues();\n\n const optText = opt.decodeText();\n\n let existingIdx: number | undefined;\n if (useExistingOptIdx) {\n const exportValues = this.getExportValues() ?? [];\n for (let idx = 0, len = exportValues.length; idx < len; idx++) {\n const exportVal = exportValues[idx];\n if (exportVal.decodeText() === optText) existingIdx = idx;\n }\n }\n\n const Opt = this.Opt() as PDFArray;\n Opt.push(opt);\n\n return existingIdx ?? Opt.size() - 1;\n }\n\n addWidgetWithOpt(\n widget: PDFRef,\n opt: PDFHexString | PDFString,\n useExistingOptIdx: boolean,\n ) {\n const optIdx = this.addOpt(opt, useExistingOptIdx);\n const apStateValue = PDFName.of(String(optIdx));\n this.addWidget(widget);\n return apStateValue;\n }\n}\n\nexport default PDFAcroButton;\n","import PDFContext from 'src/core/PDFContext';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFAcroButton from 'src/core/acroform/PDFAcroButton';\nimport { InvalidAcroFieldValueError } from 'src/core/errors';\n\nclass PDFAcroCheckBox extends PDFAcroButton {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroCheckBox(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({\n FT: 'Btn',\n Kids: [],\n });\n const ref = context.register(dict);\n return new PDFAcroCheckBox(dict, ref);\n };\n\n setValue(value: PDFName) {\n const onValue = this.getOnValue() ?? PDFName.of('Yes');\n if (value !== onValue && value !== PDFName.of('Off')) {\n throw new InvalidAcroFieldValueError();\n }\n\n this.dict.set(PDFName.of('V'), value);\n\n const widgets = this.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const state = widget.getOnValue() === value ? value : PDFName.of('Off');\n widget.setAppearanceState(state);\n }\n }\n\n getValue(): PDFName {\n const v = this.V();\n if (v instanceof PDFName) return v;\n return PDFName.of('Off');\n }\n\n getOnValue(): PDFName | undefined {\n const [widget] = this.getWidgets();\n return widget?.getOnValue();\n }\n}\n\nexport default PDFAcroCheckBox;\n","const flag = (bitIndex: number) => 1 << bitIndex;\n\n/** From PDF spec table 221 */\nexport enum AcroFieldFlags {\n /**\n * If set, the user may not change the value of the field. Any associated\n * widget annotations will not interact with the user; that is, they will not\n * respond to mouse clicks or change their appearance in response to mouse\n * motions. This flag is useful for fields whose values are computed or\n * imported from a database.\n */\n ReadOnly = flag(1 - 1),\n\n /**\n * If set, the field shall have a value at the time it is exported by a\n * submit-form action (see 12.7.5.2, \"Submit-Form Action\").\n */\n Required = flag(2 - 1),\n\n /**\n * If set, the field shall not be exported by a submit-form action\n * (see 12.7.5.2, \"Submit-Form Action\").\n */\n NoExport = flag(3 - 1),\n}\n\n/** From PDF spec table 226 */\nexport enum AcroButtonFlags {\n /**\n * (Radio buttons only) If set, exactly one radio button shall be selected at\n * all times; selecting the currently selected button has no effect. If clear,\n * clicking the selected button deselects it, leaving no button selected.\n */\n NoToggleToOff = flag(15 - 1),\n\n /**\n * If set, the field is a set of radio buttons; if clear, the field is a check\n * box. This flag may be set only if the Pushbutton flag is clear.\n */\n Radio = flag(16 - 1),\n\n /**\n * If set, the field is a pushbutton that does not retain a permanent value.\n */\n PushButton = flag(17 - 1),\n\n /**\n * If set, a group of radio buttons within a radio button field that use the\n * same value for the on state will turn on and off in unison; that is if one\n * is checked, they are all checked. If clear, the buttons are mutually\n * exclusive (the same behavior as HTML radio buttons).\n */\n RadiosInUnison = flag(26 - 1),\n}\n\n/** From PDF spec table 228 */\nexport enum AcroTextFlags {\n /**\n * If set, the field may contain multiple lines of text; if clear, the field's\n * text shall be restricted to a single line.\n */\n Multiline = flag(13 - 1),\n\n /**\n * If set, the field is intended for entering a secure password that should\n * not be echoed visibly to the screen. Characters typed from the keyboard\n * shall instead be echoed in some unreadable form, such as asterisks or\n * bullet characters.\n * > NOTE To protect password confidentiality, readers should never store\n * > the value of the text field in the PDF file if this flag is set.\n */\n Password = flag(14 - 1),\n\n /**\n * If set, the text entered in the field represents the pathname of a file\n * whose contents shall be submitted as the value of the field.\n */\n FileSelect = flag(21 - 1),\n\n /**\n * If set, text entered in the field shall not be spell-checked.\n */\n DoNotSpellCheck = flag(23 - 1),\n\n /**\n * If set, the field shall not scroll (horizontally for single-line fields,\n * vertically for multiple-line fields) to accommodate more text than fits\n * within its annotation rectangle. Once the field is full, no further text\n * shall be accepted for interactive form filling; for non-interactive form\n * filling, the filler should take care not to add more character than will\n * visibly fit in the defined area.\n */\n DoNotScroll = flag(24 - 1),\n\n /**\n * May be set only if the MaxLen entry is present in the text field dictionary\n * (see Table 229) and if the Multiline, Password, and FileSelect flags are\n * clear. If set, the field shall be automatically divided into as many\n * equally spaced positions, or combs, as the value of MaxLen, and the text\n * is laid out into those combs.\n */\n Comb = flag(25 - 1),\n\n /**\n * If set, the value of this field shall be a rich text string\n * (see 12.7.3.4, \"Rich Text Strings\"). If the field has a value, the RV\n * entry of the field dictionary (Table 222) shall specify the rich text\n * string.\n */\n RichText = flag(26 - 1),\n}\n\n/** From PDF spec table 230 */\nexport enum AcroChoiceFlags {\n /**\n * If set, the field is a combo box; if clear, the field is a list box.\n */\n Combo = flag(18 - 1),\n\n /**\n * If set, the combo box shall include an editable text box as well as a\n * drop-down list; if clear, it shall include only a drop-down list. This\n * flag shall be used only if the Combo flag is set.\n */\n Edit = flag(19 - 1),\n\n /**\n * If set, the field's option items shall be sorted alphabetically. This flag\n * is intended for use by writers, not by readers. Conforming readers shall\n * display the options in the order in which they occur in the Opt array\n * (see Table 231).\n */\n Sort = flag(20 - 1),\n\n /**\n * If set, more than one of the field's option items may be selected\n * simultaneously; if clear, at most one item shall be selected.\n */\n MultiSelect = flag(22 - 1),\n\n /**\n * If set, text entered in the field shall not be spell-checked. This flag\n * shall not be used unless the Combo and Edit flags are both set.\n */\n DoNotSpellCheck = flag(23 - 1),\n\n /**\n * If set, the new value shall be committed as soon as a selection is made\n * (commonly with the pointing device). In this case, supplying a value for\n * a field involves three actions: selecting the field for fill-in,\n * selecting a choice for the fill-in value, and leaving that field, which\n * finalizes or \"commits\" the data choice and triggers any actions associated\n * with the entry or changing of this data. If this flag is on, then\n * processing does not wait for leaving the field action to occur, but\n * immediately proceeds to the third step.\n *\n * This option enables applications to perform an action once a selection is\n * made, without requiring the user to exit the field. If clear, the new\n * value is not committed until the user exits the field.\n */\n CommitOnSelChange = flag(27 - 1),\n}\n","import PDFAcroTerminal from 'src/core/acroform/PDFAcroTerminal';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFName from 'src/core/objects/PDFName';\nimport { AcroChoiceFlags } from 'src/core/acroform/flags';\nimport {\n InvalidAcroFieldValueError,\n MultiSelectValueError,\n} from 'src/core/errors';\n\nclass PDFAcroChoice extends PDFAcroTerminal {\n setValues(values: (PDFString | PDFHexString)[]) {\n if (\n this.hasFlag(AcroChoiceFlags.Combo) &&\n !this.hasFlag(AcroChoiceFlags.Edit) &&\n !this.valuesAreValid(values)\n ) {\n throw new InvalidAcroFieldValueError();\n }\n\n if (values.length === 0) {\n this.dict.delete(PDFName.of('V'));\n }\n if (values.length === 1) {\n this.dict.set(PDFName.of('V'), values[0]);\n }\n if (values.length > 1) {\n if (!this.hasFlag(AcroChoiceFlags.MultiSelect)) {\n throw new MultiSelectValueError();\n }\n this.dict.set(PDFName.of('V'), this.dict.context.obj(values));\n }\n\n this.updateSelectedIndices(values);\n }\n\n valuesAreValid(values: (PDFString | PDFHexString)[]): boolean {\n const options = this.getOptions();\n for (let idx = 0, len = values.length; idx < len; idx++) {\n const val = values[idx].decodeText();\n if (!options.find((o) => val === (o.display || o.value).decodeText())) {\n return false;\n }\n }\n return true;\n }\n\n updateSelectedIndices(values: (PDFString | PDFHexString)[]) {\n if (values.length > 1) {\n const indices = new Array(values.length);\n const options = this.getOptions();\n for (let idx = 0, len = values.length; idx < len; idx++) {\n const val = values[idx].decodeText();\n indices[idx] = options.findIndex(\n (o) => val === (o.display || o.value).decodeText(),\n );\n }\n this.dict.set(PDFName.of('I'), this.dict.context.obj(indices.sort()));\n } else {\n this.dict.delete(PDFName.of('I'));\n }\n }\n\n getValues(): (PDFString | PDFHexString)[] {\n const v = this.V();\n\n if (v instanceof PDFString || v instanceof PDFHexString) return [v];\n\n if (v instanceof PDFArray) {\n const values: (PDFString | PDFHexString)[] = [];\n\n for (let idx = 0, len = v.size(); idx < len; idx++) {\n const value = v.lookup(idx);\n if (value instanceof PDFString || value instanceof PDFHexString) {\n values.push(value);\n }\n }\n\n return values;\n }\n\n return [];\n }\n\n Opt(): PDFArray | PDFString | PDFHexString | undefined {\n return this.dict.lookupMaybe(\n PDFName.of('Opt'),\n PDFString,\n PDFHexString,\n PDFArray,\n );\n }\n\n setOptions(\n options: {\n value: PDFString | PDFHexString;\n display?: PDFString | PDFHexString;\n }[],\n ) {\n const newOpt = new Array(options.length);\n for (let idx = 0, len = options.length; idx < len; idx++) {\n const { value, display } = options[idx];\n newOpt[idx] = this.dict.context.obj([value, display || value]);\n }\n this.dict.set(PDFName.of('Opt'), this.dict.context.obj(newOpt));\n }\n\n getOptions(): {\n value: PDFString | PDFHexString;\n display: PDFString | PDFHexString;\n }[] {\n const Opt = this.Opt();\n\n // Not supposed to happen - Opt _should_ always be `PDFArray | undefined`\n if (Opt instanceof PDFString || Opt instanceof PDFHexString) {\n return [{ value: Opt, display: Opt }];\n }\n\n if (Opt instanceof PDFArray) {\n const res: {\n value: PDFString | PDFHexString;\n display: PDFString | PDFHexString;\n }[] = [];\n\n for (let idx = 0, len = Opt.size(); idx < len; idx++) {\n const item = Opt.lookup(idx);\n\n // If `item` is a string, use that as both the export and text value\n if (item instanceof PDFString || item instanceof PDFHexString) {\n res.push({ value: item, display: item });\n }\n\n // If `item` is an array of one, treat it the same as just a string,\n // if it's an array of two then `item[0]` is the export value and\n // `item[1]` is the text value\n if (item instanceof PDFArray) {\n if (item.size() > 0) {\n const first = item.lookup(0, PDFString, PDFHexString);\n const second = item.lookupMaybe(1, PDFString, PDFHexString);\n res.push({ value: first, display: second || first });\n }\n }\n }\n\n return res;\n }\n\n return [];\n }\n}\n\nexport default PDFAcroChoice;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFAcroChoice from 'src/core/acroform/PDFAcroChoice';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport { AcroChoiceFlags } from 'src/core/acroform/flags';\n\nclass PDFAcroComboBox extends PDFAcroChoice {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroComboBox(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({\n FT: 'Ch',\n Ff: AcroChoiceFlags.Combo,\n Kids: [],\n });\n const ref = context.register(dict);\n return new PDFAcroComboBox(dict, ref);\n };\n}\n\nexport default PDFAcroComboBox;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFAcroField from 'src/core/acroform/PDFAcroField';\n\nclass PDFAcroNonTerminal extends PDFAcroField {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroNonTerminal(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({});\n const ref = context.register(dict);\n return new PDFAcroNonTerminal(dict, ref);\n };\n\n addField(field: PDFRef) {\n const { Kids } = this.normalizedEntries();\n Kids?.push(field);\n }\n\n normalizedEntries() {\n let Kids = this.Kids();\n\n if (!Kids) {\n Kids = this.dict.context.obj([]);\n this.dict.set(PDFName.of('Kids'), Kids);\n }\n\n return { Kids };\n }\n}\n\nexport default PDFAcroNonTerminal;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFAcroTerminal from 'src/core/acroform/PDFAcroTerminal';\n\nclass PDFAcroSignature extends PDFAcroTerminal {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroSignature(dict, ref);\n}\n\nexport default PDFAcroSignature;\n","import PDFContext from 'src/core/PDFContext';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFString from 'src/core/objects/PDFString';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFAcroTerminal from 'src/core/acroform/PDFAcroTerminal';\n\nclass PDFAcroText extends PDFAcroTerminal {\n static fromDict = (dict: PDFDict, ref: PDFRef) => new PDFAcroText(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({\n FT: 'Tx',\n Kids: [],\n });\n const ref = context.register(dict);\n return new PDFAcroText(dict, ref);\n };\n\n MaxLen(): PDFNumber | undefined {\n const maxLen = this.dict.lookup(PDFName.of('MaxLen'));\n if (maxLen instanceof PDFNumber) return maxLen;\n return undefined;\n }\n\n Q(): PDFNumber | undefined {\n const q = this.dict.lookup(PDFName.of('Q'));\n if (q instanceof PDFNumber) return q;\n return undefined;\n }\n\n setMaxLength(maxLength: number) {\n this.dict.set(PDFName.of('MaxLen'), PDFNumber.of(maxLength));\n }\n\n removeMaxLength() {\n this.dict.delete(PDFName.of('MaxLen'));\n }\n\n getMaxLength(): number | undefined {\n return this.MaxLen()?.asNumber();\n }\n\n setQuadding(quadding: 0 | 1 | 2) {\n this.dict.set(PDFName.of('Q'), PDFNumber.of(quadding));\n }\n\n getQuadding(): number | undefined {\n return this.Q()?.asNumber();\n }\n\n setValue(value: PDFHexString | PDFString) {\n this.dict.set(PDFName.of('V'), value);\n\n // const widgets = this.getWidgets();\n // for (let idx = 0, len = widgets.length; idx < len; idx++) {\n // const widget = widgets[idx];\n // const state = widget.getOnValue() === value ? value : PDFName.of('Off');\n // widget.setAppearanceState(state);\n // }\n }\n\n removeValue() {\n this.dict.delete(PDFName.of('V'));\n }\n\n getValue(): PDFString | PDFHexString | undefined {\n const v = this.V();\n if (v instanceof PDFString || v instanceof PDFHexString) return v;\n return undefined;\n }\n}\n\nexport default PDFAcroText;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFAcroButton from 'src/core/acroform/PDFAcroButton';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport { AcroButtonFlags } from 'src/core/acroform/flags';\n\nclass PDFAcroPushButton extends PDFAcroButton {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroPushButton(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({\n FT: 'Btn',\n Ff: AcroButtonFlags.PushButton,\n Kids: [],\n });\n const ref = context.register(dict);\n return new PDFAcroPushButton(dict, ref);\n };\n}\n\nexport default PDFAcroPushButton;\n","import PDFRef from 'src/core/objects/PDFRef';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFAcroButton from 'src/core/acroform/PDFAcroButton';\nimport PDFContext from 'src/core/PDFContext';\nimport { AcroButtonFlags } from 'src/core/acroform/flags';\nimport { InvalidAcroFieldValueError } from 'src/core/errors';\n\nclass PDFAcroRadioButton extends PDFAcroButton {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroRadioButton(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({\n FT: 'Btn',\n Ff: AcroButtonFlags.Radio,\n Kids: [],\n });\n const ref = context.register(dict);\n return new PDFAcroRadioButton(dict, ref);\n };\n\n setValue(value: PDFName) {\n const onValues = this.getOnValues();\n if (!onValues.includes(value) && value !== PDFName.of('Off')) {\n throw new InvalidAcroFieldValueError();\n }\n\n this.dict.set(PDFName.of('V'), value);\n\n const widgets = this.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const state = widget.getOnValue() === value ? value : PDFName.of('Off');\n widget.setAppearanceState(state);\n }\n }\n\n getValue(): PDFName {\n const v = this.V();\n if (v instanceof PDFName) return v;\n return PDFName.of('Off');\n }\n\n getOnValues(): PDFName[] {\n const widgets = this.getWidgets();\n\n const onValues: PDFName[] = [];\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const onValue = widgets[idx].getOnValue();\n if (onValue) onValues.push(onValue);\n }\n\n return onValues;\n }\n}\n\nexport default PDFAcroRadioButton;\n","import PDFDict from 'src/core/objects/PDFDict';\nimport PDFAcroChoice from 'src/core/acroform/PDFAcroChoice';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFRef from 'src/core/objects/PDFRef';\n\nclass PDFAcroListBox extends PDFAcroChoice {\n static fromDict = (dict: PDFDict, ref: PDFRef) =>\n new PDFAcroListBox(dict, ref);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({\n FT: 'Ch',\n Kids: [],\n });\n const ref = context.register(dict);\n return new PDFAcroListBox(dict, ref);\n };\n}\n\nexport default PDFAcroListBox;\n","import PDFObject from 'src/core/objects/PDFObject';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFRef from 'src/core/objects/PDFRef';\n\nimport PDFAcroField from 'src/core/acroform/PDFAcroField';\nimport PDFAcroTerminal from 'src/core/acroform/PDFAcroTerminal';\nimport PDFAcroNonTerminal from 'src/core/acroform/PDFAcroNonTerminal';\nimport PDFAcroButton from 'src/core/acroform/PDFAcroButton';\nimport PDFAcroSignature from 'src/core/acroform/PDFAcroSignature';\nimport PDFAcroChoice from 'src/core/acroform/PDFAcroChoice';\nimport PDFAcroText from 'src/core/acroform/PDFAcroText';\nimport PDFAcroPushButton from 'src/core/acroform/PDFAcroPushButton';\nimport PDFAcroRadioButton from 'src/core/acroform/PDFAcroRadioButton';\nimport PDFAcroCheckBox from 'src/core/acroform/PDFAcroCheckBox';\nimport PDFAcroComboBox from 'src/core/acroform/PDFAcroComboBox';\nimport PDFAcroListBox from 'src/core/acroform/PDFAcroListBox';\nimport { AcroButtonFlags, AcroChoiceFlags } from 'src/core/acroform/flags';\n\nexport const createPDFAcroFields = (\n kidDicts?: PDFArray,\n): [PDFAcroField, PDFRef][] => {\n if (!kidDicts) return [];\n\n const kids: [PDFAcroField, PDFRef][] = [];\n for (let idx = 0, len = kidDicts.size(); idx < len; idx++) {\n const ref = kidDicts.get(idx);\n const dict = kidDicts.lookup(idx);\n // if (dict instanceof PDFDict) kids.push(PDFAcroField.fromDict(dict));\n if (ref instanceof PDFRef && dict instanceof PDFDict) {\n kids.push([createPDFAcroField(dict, ref), ref]);\n }\n }\n\n return kids;\n};\n\nexport const createPDFAcroField = (\n dict: PDFDict,\n ref: PDFRef,\n): PDFAcroField => {\n const isNonTerminal = isNonTerminalAcroField(dict);\n if (isNonTerminal) return PDFAcroNonTerminal.fromDict(dict, ref);\n return createPDFAcroTerminal(dict, ref);\n};\n\n// TODO: Maybe just check if the dict is *not* a widget? That might be better.\n\n// According to the PDF spec:\n//\n// > A field's children in the hierarchy may also include widget annotations\n// > that define its appearance on the page. A field that has children that\n// > are fields is called a non-terminal field. A field that does not have\n// > children that are fields is called a terminal field.\n//\n// The spec is not entirely clear about how to determine whether a given\n// dictionary represents an acrofield or a widget annotation. So we will assume\n// that a dictionary is an acrofield if it is a member of the `/Kids` array\n// and it contains a `/T` entry (widgets do not have `/T` entries). This isn't\n// a bullet proof solution, because the `/T` entry is technically defined as\n// optional for acrofields by the PDF spec. But in practice all acrofields seem\n// to have a `/T` entry defined.\nconst isNonTerminalAcroField = (dict: PDFDict): boolean => {\n const kids = dict.lookup(PDFName.of('Kids'));\n\n if (kids instanceof PDFArray) {\n for (let idx = 0, len = kids.size(); idx < len; idx++) {\n const kid = kids.lookup(idx);\n const kidIsField = kid instanceof PDFDict && kid.has(PDFName.of('T'));\n if (kidIsField) return true;\n }\n }\n\n return false;\n};\n\nconst createPDFAcroTerminal = (dict: PDFDict, ref: PDFRef): PDFAcroTerminal => {\n const ftNameOrRef = getInheritableAttribute(dict, PDFName.of('FT'));\n const type = dict.context.lookup(ftNameOrRef, PDFName);\n\n if (type === PDFName.of('Btn')) return createPDFAcroButton(dict, ref);\n if (type === PDFName.of('Ch')) return createPDFAcroChoice(dict, ref);\n if (type === PDFName.of('Tx')) return PDFAcroText.fromDict(dict, ref);\n if (type === PDFName.of('Sig')) return PDFAcroSignature.fromDict(dict, ref);\n\n // We should never reach this line. But there are a lot of weird PDFs out\n // there. So, just to be safe, we'll try to handle things gracefully instead\n // of throwing an error.\n return PDFAcroTerminal.fromDict(dict, ref);\n};\n\nconst createPDFAcroButton = (dict: PDFDict, ref: PDFRef): PDFAcroButton => {\n const ffNumberOrRef = getInheritableAttribute(dict, PDFName.of('Ff'));\n const ffNumber = dict.context.lookupMaybe(ffNumberOrRef, PDFNumber);\n const flags = ffNumber?.asNumber() ?? 0;\n\n if (flagIsSet(flags, AcroButtonFlags.PushButton)) {\n return PDFAcroPushButton.fromDict(dict, ref);\n } else if (flagIsSet(flags, AcroButtonFlags.Radio)) {\n return PDFAcroRadioButton.fromDict(dict, ref);\n } else {\n return PDFAcroCheckBox.fromDict(dict, ref);\n }\n};\n\nconst createPDFAcroChoice = (dict: PDFDict, ref: PDFRef): PDFAcroChoice => {\n const ffNumberOrRef = getInheritableAttribute(dict, PDFName.of('Ff'));\n const ffNumber = dict.context.lookupMaybe(ffNumberOrRef, PDFNumber);\n const flags = ffNumber?.asNumber() ?? 0;\n\n if (flagIsSet(flags, AcroChoiceFlags.Combo)) {\n return PDFAcroComboBox.fromDict(dict, ref);\n } else {\n return PDFAcroListBox.fromDict(dict, ref);\n }\n};\n\nconst flagIsSet = (flags: number, flag: number): boolean =>\n (flags & flag) !== 0;\n\nconst getInheritableAttribute = (startNode: PDFDict, name: PDFName) => {\n let attribute: PDFObject | undefined;\n ascend(startNode, (node) => {\n if (!attribute) attribute = node.get(name);\n });\n return attribute;\n};\n\nconst ascend = (startNode: PDFDict, visitor: (node: PDFDict) => any) => {\n visitor(startNode);\n const Parent = startNode.lookupMaybe(PDFName.of('Parent'), PDFDict);\n if (Parent) ascend(Parent, visitor);\n};\n","import PDFContext from 'src/core/PDFContext';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFAcroField from 'src/core/acroform/PDFAcroField';\nimport PDFAcroNonTerminal from 'src/core/acroform/PDFAcroNonTerminal';\nimport {\n createPDFAcroField,\n createPDFAcroFields,\n} from 'src/core/acroform/utils';\n\nclass PDFAcroForm {\n readonly dict: PDFDict;\n\n static fromDict = (dict: PDFDict) => new PDFAcroForm(dict);\n\n static create = (context: PDFContext) => {\n const dict = context.obj({ Fields: [] });\n return new PDFAcroForm(dict);\n };\n\n private constructor(dict: PDFDict) {\n this.dict = dict;\n }\n\n Fields(): PDFArray | undefined {\n const fields = this.dict.lookup(PDFName.of('Fields'));\n if (fields instanceof PDFArray) return fields;\n return undefined;\n }\n\n getFields(): [PDFAcroField, PDFRef][] {\n const { Fields } = this.normalizedEntries();\n\n const fields = new Array(Fields.size());\n for (let idx = 0, len = Fields.size(); idx < len; idx++) {\n const ref = Fields.get(idx) as PDFRef;\n const dict = Fields.lookup(idx, PDFDict);\n fields[idx] = [createPDFAcroField(dict, ref), ref];\n }\n\n return fields;\n }\n\n getAllFields(): [PDFAcroField, PDFRef][] {\n const allFields: [PDFAcroField, PDFRef][] = [];\n\n const pushFields = (fields?: [PDFAcroField, PDFRef][]) => {\n if (!fields) return;\n for (let idx = 0, len = fields.length; idx < len; idx++) {\n const field = fields[idx];\n allFields.push(field);\n const [fieldModel] = field;\n if (fieldModel instanceof PDFAcroNonTerminal) {\n pushFields(createPDFAcroFields(fieldModel.Kids()));\n }\n }\n };\n\n pushFields(this.getFields());\n\n return allFields;\n }\n\n addField(field: PDFRef) {\n const { Fields } = this.normalizedEntries();\n Fields?.push(field);\n }\n\n removeField(field: PDFAcroField): void {\n const parent = field.getParent();\n const fields =\n parent === undefined ? this.normalizedEntries().Fields : parent.Kids();\n\n const index = fields?.indexOf(field.ref);\n if (fields === undefined || index === undefined) {\n throw new Error(\n `Tried to remove inexistent field ${field.getFullyQualifiedName()}`,\n );\n }\n\n fields.remove(index);\n\n if (parent !== undefined && fields.size() === 0) {\n this.removeField(parent);\n }\n }\n\n normalizedEntries() {\n let Fields = this.Fields();\n\n if (!Fields) {\n Fields = this.dict.context.obj([]);\n this.dict.set(PDFName.of('Fields'), Fields);\n }\n\n return { Fields };\n }\n}\n\nexport default PDFAcroForm;\n","import PDFDict, { DictMap } from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFPageTree from 'src/core/structures/PDFPageTree';\nimport { PDFAcroForm } from 'src/core/acroform';\nimport ViewerPreferences from '../interactive/ViewerPreferences';\n\nclass PDFCatalog extends PDFDict {\n static withContextAndPages = (\n context: PDFContext,\n pages: PDFPageTree | PDFRef,\n ) => {\n const dict = new Map();\n dict.set(PDFName.of('Type'), PDFName.of('Catalog'));\n dict.set(PDFName.of('Pages'), pages);\n return new PDFCatalog(dict, context);\n };\n\n static fromMapWithContext = (map: DictMap, context: PDFContext) =>\n new PDFCatalog(map, context);\n\n Pages(): PDFPageTree {\n return this.lookup(PDFName.of('Pages'), PDFDict) as PDFPageTree;\n }\n\n AcroForm(): PDFDict | undefined {\n return this.lookupMaybe(PDFName.of('AcroForm'), PDFDict);\n }\n\n getAcroForm(): PDFAcroForm | undefined {\n const dict = this.AcroForm();\n if (!dict) return undefined;\n return PDFAcroForm.fromDict(dict);\n }\n\n getOrCreateAcroForm(): PDFAcroForm {\n let acroForm = this.getAcroForm();\n if (!acroForm) {\n acroForm = PDFAcroForm.create(this.context);\n const acroFormRef = this.context.register(acroForm.dict);\n this.set(PDFName.of('AcroForm'), acroFormRef);\n }\n return acroForm;\n }\n\n ViewerPreferences(): PDFDict | undefined {\n return this.lookupMaybe(PDFName.of('ViewerPreferences'), PDFDict);\n }\n\n getViewerPreferences(): ViewerPreferences | undefined {\n const dict = this.ViewerPreferences();\n if (!dict) return undefined;\n return ViewerPreferences.fromDict(dict);\n }\n\n getOrCreateViewerPreferences(): ViewerPreferences {\n let viewerPrefs = this.getViewerPreferences();\n if (!viewerPrefs) {\n viewerPrefs = ViewerPreferences.create(this.context);\n const viewerPrefsRef = this.context.register(viewerPrefs.dict);\n this.set(PDFName.of('ViewerPreferences'), viewerPrefsRef);\n }\n return viewerPrefs;\n }\n\n /**\n * Inserts the given ref as a leaf node of this catalog's page tree at the\n * specified index (zero-based). Also increments the `Count` of each node in\n * the page tree hierarchy to accomodate the new page.\n *\n * Returns the ref of the PDFPageTree node into which `leafRef` was inserted.\n */\n insertLeafNode(leafRef: PDFRef, index: number): PDFRef {\n const pagesRef = this.get(PDFName.of('Pages')) as PDFRef;\n const maybeParentRef = this.Pages().insertLeafNode(leafRef, index);\n return maybeParentRef || pagesRef;\n }\n\n removeLeafNode(index: number): void {\n this.Pages().removeLeafNode(index);\n }\n}\n\nexport default PDFCatalog;\n","import PDFArray from 'src/core/objects/PDFArray';\nimport PDFDict, { DictMap } from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFPageLeaf from 'src/core/structures/PDFPageLeaf';\nimport { InvalidTargetIndexError, CorruptPageTreeError } from 'src/core/errors';\n\nexport type TreeNode = PDFPageTree | PDFPageLeaf;\n\nclass PDFPageTree extends PDFDict {\n static withContext = (context: PDFContext, parent?: PDFRef) => {\n const dict = new Map();\n dict.set(PDFName.of('Type'), PDFName.of('Pages'));\n dict.set(PDFName.of('Kids'), context.obj([]));\n dict.set(PDFName.of('Count'), context.obj(0));\n if (parent) dict.set(PDFName.of('Parent'), parent);\n return new PDFPageTree(dict, context);\n };\n\n static fromMapWithContext = (map: DictMap, context: PDFContext) =>\n new PDFPageTree(map, context);\n\n Parent(): PDFPageTree | undefined {\n return this.lookup(PDFName.of('Parent')) as PDFPageTree | undefined;\n }\n\n Kids(): PDFArray {\n return this.lookup(PDFName.of('Kids'), PDFArray);\n }\n\n Count(): PDFNumber {\n return this.lookup(PDFName.of('Count'), PDFNumber);\n }\n\n pushTreeNode(treeRef: PDFRef): void {\n const Kids = this.Kids();\n Kids.push(treeRef);\n }\n\n pushLeafNode(leafRef: PDFRef): void {\n const Kids = this.Kids();\n this.insertLeafKid(Kids.size(), leafRef);\n }\n\n /**\n * Inserts the given ref as a leaf node of this page tree at the specified\n * index (zero-based). Also increments the `Count` of each page tree in the\n * hierarchy to accomodate the new page.\n *\n * Returns the ref of the PDFPageTree node into which `leafRef` was inserted,\n * or `undefined` if it was inserted into the root node (the PDFPageTree upon\n * which the method was first called).\n */\n insertLeafNode(leafRef: PDFRef, targetIndex: number): PDFRef | undefined {\n const Kids = this.Kids();\n const Count = this.Count().asNumber();\n\n if (targetIndex > Count) {\n throw new InvalidTargetIndexError(targetIndex, Count);\n }\n\n let leafsRemainingUntilTarget = targetIndex;\n for (let idx = 0, len = Kids.size(); idx < len; idx++) {\n if (leafsRemainingUntilTarget === 0) {\n // Insert page and return\n this.insertLeafKid(idx, leafRef);\n return undefined;\n }\n\n const kidRef = Kids.get(idx) as PDFRef;\n const kid = this.context.lookup(kidRef);\n\n if (kid instanceof PDFPageTree) {\n if (kid.Count().asNumber() > leafsRemainingUntilTarget) {\n // Dig in\n return (\n kid.insertLeafNode(leafRef, leafsRemainingUntilTarget) || kidRef\n );\n } else {\n // Move on\n leafsRemainingUntilTarget -= kid.Count().asNumber();\n }\n }\n\n if (kid instanceof PDFPageLeaf) {\n // Move on\n leafsRemainingUntilTarget -= 1;\n }\n }\n\n if (leafsRemainingUntilTarget === 0) {\n // Insert page at the end and return\n this.insertLeafKid(Kids.size(), leafRef);\n return undefined;\n }\n\n // Should never get here if `targetIndex` is valid\n throw new CorruptPageTreeError(targetIndex, 'insertLeafNode');\n }\n\n /**\n * Removes the leaf node at the specified index (zero-based) from this page\n * tree. Also decrements the `Count` of each page tree in the hierarchy to\n * account for the removed page.\n *\n * If `prune` is true, then intermediate tree nodes will be removed from the\n * tree if they contain 0 children after the leaf node is removed.\n */\n removeLeafNode(targetIndex: number, prune = true): void {\n const Kids = this.Kids();\n const Count = this.Count().asNumber();\n\n if (targetIndex >= Count) {\n throw new InvalidTargetIndexError(targetIndex, Count);\n }\n\n let leafsRemainingUntilTarget = targetIndex;\n for (let idx = 0, len = Kids.size(); idx < len; idx++) {\n const kidRef = Kids.get(idx) as PDFRef;\n const kid = this.context.lookup(kidRef);\n\n if (kid instanceof PDFPageTree) {\n if (kid.Count().asNumber() > leafsRemainingUntilTarget) {\n // Dig in\n kid.removeLeafNode(leafsRemainingUntilTarget, prune);\n if (prune && kid.Kids().size() === 0) Kids.remove(idx);\n return;\n } else {\n // Move on\n leafsRemainingUntilTarget -= kid.Count().asNumber();\n }\n }\n\n if (kid instanceof PDFPageLeaf) {\n if (leafsRemainingUntilTarget === 0) {\n // Remove page and return\n this.removeKid(idx);\n return;\n } else {\n // Move on\n leafsRemainingUntilTarget -= 1;\n }\n }\n }\n\n // Should never get here if `targetIndex` is valid\n throw new CorruptPageTreeError(targetIndex, 'removeLeafNode');\n }\n\n ascend(visitor: (node: PDFPageTree) => any): void {\n visitor(this);\n const Parent = this.Parent();\n if (Parent) Parent.ascend(visitor);\n }\n\n /** Performs a Post-Order traversal of this page tree */\n traverse(visitor: (node: TreeNode, ref: PDFRef) => any): void {\n const Kids = this.Kids();\n for (let idx = 0, len = Kids.size(); idx < len; idx++) {\n const kidRef = Kids.get(idx) as PDFRef;\n const kid = this.context.lookup(kidRef) as TreeNode;\n if (kid instanceof PDFPageTree) kid.traverse(visitor);\n visitor(kid, kidRef);\n }\n }\n\n private insertLeafKid(kidIdx: number, leafRef: PDFRef): void {\n const Kids = this.Kids();\n\n this.ascend((node) => {\n const newCount = node.Count().asNumber() + 1;\n node.set(PDFName.of('Count'), PDFNumber.of(newCount));\n });\n\n Kids.insert(kidIdx, leafRef);\n }\n\n private removeKid(kidIdx: number): void {\n const Kids = this.Kids();\n\n const kid = Kids.lookup(kidIdx);\n if (kid instanceof PDFPageLeaf) {\n this.ascend((node) => {\n const newCount = node.Count().asNumber() - 1;\n node.set(PDFName.of('Count'), PDFNumber.of(newCount));\n });\n }\n\n Kids.remove(kidIdx);\n }\n}\n\nexport default PDFPageTree;\n","import CharCodes from 'src/core/syntax/CharCodes';\n\nexport const IsDigit = new Uint8Array(256);\n\nIsDigit[CharCodes.Zero] = 1;\nIsDigit[CharCodes.One] = 1;\nIsDigit[CharCodes.Two] = 1;\nIsDigit[CharCodes.Three] = 1;\nIsDigit[CharCodes.Four] = 1;\nIsDigit[CharCodes.Five] = 1;\nIsDigit[CharCodes.Six] = 1;\nIsDigit[CharCodes.Seven] = 1;\nIsDigit[CharCodes.Eight] = 1;\nIsDigit[CharCodes.Nine] = 1;\n\nexport const IsNumericPrefix = new Uint8Array(256);\n\nIsNumericPrefix[CharCodes.Period] = 1;\nIsNumericPrefix[CharCodes.Plus] = 1;\nIsNumericPrefix[CharCodes.Minus] = 1;\n\nexport const IsNumeric = new Uint8Array(256);\n\nfor (let idx = 0, len = 256; idx < len; idx++) {\n IsNumeric[idx] = IsDigit[idx] || IsNumericPrefix[idx] ? 1 : 0;\n}\n","import { NumberParsingError } from 'src/core/errors';\nimport ByteStream from 'src/core/parser/ByteStream';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { IsDigit, IsNumeric } from 'src/core/syntax/Numeric';\nimport { IsWhitespace } from 'src/core/syntax/Whitespace';\nimport { charFromCode } from 'src/utils';\n\nconst { Newline, CarriageReturn } = CharCodes;\n\n// TODO: Throw error if eof is reached before finishing object parse...\nclass BaseParser {\n protected readonly bytes: ByteStream;\n protected readonly capNumbers: boolean;\n\n constructor(bytes: ByteStream, capNumbers = false) {\n this.bytes = bytes;\n this.capNumbers = capNumbers;\n }\n\n protected parseRawInt(): number {\n let value = '';\n\n while (!this.bytes.done()) {\n const byte = this.bytes.peek();\n if (!IsDigit[byte]) break;\n value += charFromCode(this.bytes.next());\n }\n\n const numberValue = Number(value);\n\n if (!value || !isFinite(numberValue)) {\n throw new NumberParsingError(this.bytes.position(), value);\n }\n\n return numberValue;\n }\n\n // TODO: Maybe handle exponential format?\n // TODO: Compare performance of string concatenation to charFromCode(...bytes)\n protected parseRawNumber(): number {\n let value = '';\n\n // Parse integer-part, the leading (+ | - | . | 0-9)\n while (!this.bytes.done()) {\n const byte = this.bytes.peek();\n if (!IsNumeric[byte]) break;\n value += charFromCode(this.bytes.next());\n if (byte === CharCodes.Period) break;\n }\n\n // Parse decimal-part, the trailing (0-9)\n while (!this.bytes.done()) {\n const byte = this.bytes.peek();\n if (!IsDigit[byte]) break;\n value += charFromCode(this.bytes.next());\n }\n\n const numberValue = Number(value);\n\n if (!value || !isFinite(numberValue)) {\n throw new NumberParsingError(this.bytes.position(), value);\n }\n\n if (numberValue > Number.MAX_SAFE_INTEGER) {\n if (this.capNumbers) {\n const msg = `Parsed number that is too large for some PDF readers: ${value}, using Number.MAX_SAFE_INTEGER instead.`;\n console.warn(msg);\n return Number.MAX_SAFE_INTEGER;\n } else {\n const msg = `Parsed number that is too large for some PDF readers: ${value}, not capping.`;\n console.warn(msg);\n }\n }\n\n return numberValue;\n }\n\n protected skipWhitespace(): void {\n while (!this.bytes.done() && IsWhitespace[this.bytes.peek()]) {\n this.bytes.next();\n }\n }\n\n protected skipLine(): void {\n while (!this.bytes.done()) {\n const byte = this.bytes.peek();\n if (byte === Newline || byte === CarriageReturn) return;\n this.bytes.next();\n }\n }\n\n protected skipComment(): boolean {\n if (this.bytes.peek() !== CharCodes.Percent) return false;\n while (!this.bytes.done()) {\n const byte = this.bytes.peek();\n if (byte === Newline || byte === CarriageReturn) return true;\n this.bytes.next();\n }\n return true;\n }\n\n protected skipWhitespaceAndComments(): void {\n this.skipWhitespace();\n while (this.skipComment()) this.skipWhitespace();\n }\n\n protected matchKeyword(keyword: number[]): boolean {\n const initialOffset = this.bytes.offset();\n for (let idx = 0, len = keyword.length; idx < len; idx++) {\n if (this.bytes.done() || this.bytes.next() !== keyword[idx]) {\n this.bytes.moveTo(initialOffset);\n return false;\n }\n }\n return true;\n }\n}\n\nexport default BaseParser;\n","import { NextByteAssertionError } from 'src/core/errors';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport { decodePDFRawStream } from 'src/core/streams/decode';\nimport CharCodes from 'src/core/syntax/CharCodes';\n\n// TODO: See how line/col tracking affects performance\nclass ByteStream {\n static of = (bytes: Uint8Array) => new ByteStream(bytes);\n\n static fromPDFRawStream = (rawStream: PDFRawStream) =>\n ByteStream.of(decodePDFRawStream(rawStream).decode());\n\n private readonly bytes: Uint8Array;\n private readonly length: number;\n\n private idx = 0;\n private line = 0;\n private column = 0;\n\n constructor(bytes: Uint8Array) {\n this.bytes = bytes;\n this.length = this.bytes.length;\n }\n\n moveTo(offset: number): void {\n this.idx = offset;\n }\n\n next(): number {\n const byte = this.bytes[this.idx++];\n if (byte === CharCodes.Newline) {\n this.line += 1;\n this.column = 0;\n } else {\n this.column += 1;\n }\n return byte;\n }\n\n assertNext(expected: number): number {\n if (this.peek() !== expected) {\n throw new NextByteAssertionError(this.position(), expected, this.peek());\n }\n return this.next();\n }\n\n peek(): number {\n return this.bytes[this.idx];\n }\n\n peekAhead(steps: number) {\n return this.bytes[this.idx + steps];\n }\n\n peekAt(offset: number) {\n return this.bytes[offset];\n }\n\n done(): boolean {\n return this.idx >= this.length;\n }\n\n offset(): number {\n return this.idx;\n }\n\n slice(start: number, end: number): Uint8Array {\n return this.bytes.slice(start, end);\n }\n\n position(): { line: number; column: number; offset: number } {\n return { line: this.line, column: this.column, offset: this.idx };\n }\n}\n\nexport default ByteStream;\n","import CharCodes from 'src/core/syntax/CharCodes';\n\nconst { Space, CarriageReturn, Newline } = CharCodes;\n\nconst stream = [\n CharCodes.s,\n CharCodes.t,\n CharCodes.r,\n CharCodes.e,\n CharCodes.a,\n CharCodes.m,\n];\n\nconst endstream = [\n CharCodes.e,\n CharCodes.n,\n CharCodes.d,\n CharCodes.s,\n CharCodes.t,\n CharCodes.r,\n CharCodes.e,\n CharCodes.a,\n CharCodes.m,\n];\n\nexport const Keywords = {\n header: [\n CharCodes.Percent,\n CharCodes.P,\n CharCodes.D,\n CharCodes.F,\n CharCodes.Dash,\n ],\n eof: [\n CharCodes.Percent,\n CharCodes.Percent,\n CharCodes.E,\n CharCodes.O,\n CharCodes.F,\n ],\n obj: [CharCodes.o, CharCodes.b, CharCodes.j],\n endobj: [\n CharCodes.e,\n CharCodes.n,\n CharCodes.d,\n CharCodes.o,\n CharCodes.b,\n CharCodes.j,\n ],\n xref: [CharCodes.x, CharCodes.r, CharCodes.e, CharCodes.f],\n trailer: [\n CharCodes.t,\n CharCodes.r,\n CharCodes.a,\n CharCodes.i,\n CharCodes.l,\n CharCodes.e,\n CharCodes.r,\n ],\n startxref: [\n CharCodes.s,\n CharCodes.t,\n CharCodes.a,\n CharCodes.r,\n CharCodes.t,\n CharCodes.x,\n CharCodes.r,\n CharCodes.e,\n CharCodes.f,\n ],\n true: [CharCodes.t, CharCodes.r, CharCodes.u, CharCodes.e],\n false: [CharCodes.f, CharCodes.a, CharCodes.l, CharCodes.s, CharCodes.e],\n null: [CharCodes.n, CharCodes.u, CharCodes.l, CharCodes.l],\n stream,\n streamEOF1: [...stream, Space, CarriageReturn, Newline],\n streamEOF2: [...stream, CarriageReturn, Newline],\n streamEOF3: [...stream, CarriageReturn],\n streamEOF4: [...stream, Newline],\n endstream,\n EOF1endstream: [CarriageReturn, Newline, ...endstream],\n EOF2endstream: [CarriageReturn, ...endstream],\n EOF3endstream: [Newline, ...endstream],\n};\n","import {\n PDFObjectParsingError,\n PDFStreamParsingError,\n Position,\n UnbalancedParenthesisError,\n} from 'src/core/errors';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFBool from 'src/core/objects/PDFBool';\nimport PDFDict, { DictMap } from 'src/core/objects/PDFDict';\nimport PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNull from 'src/core/objects/PDFNull';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport PDFStream from 'src/core/objects/PDFStream';\nimport PDFString from 'src/core/objects/PDFString';\nimport BaseParser from 'src/core/parser/BaseParser';\nimport ByteStream from 'src/core/parser/ByteStream';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFCatalog from 'src/core/structures/PDFCatalog';\nimport PDFPageLeaf from 'src/core/structures/PDFPageLeaf';\nimport PDFPageTree from 'src/core/structures/PDFPageTree';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { IsDelimiter } from 'src/core/syntax/Delimiters';\nimport { Keywords } from 'src/core/syntax/Keywords';\nimport { IsDigit, IsNumeric } from 'src/core/syntax/Numeric';\nimport { IsWhitespace } from 'src/core/syntax/Whitespace';\nimport { charFromCode } from 'src/utils';\n\n// TODO: Throw error if eof is reached before finishing object parse...\nclass PDFObjectParser extends BaseParser {\n static forBytes = (\n bytes: Uint8Array,\n context: PDFContext,\n capNumbers?: boolean,\n ) => new PDFObjectParser(ByteStream.of(bytes), context, capNumbers);\n\n static forByteStream = (\n byteStream: ByteStream,\n context: PDFContext,\n capNumbers = false,\n ) => new PDFObjectParser(byteStream, context, capNumbers);\n\n protected readonly context: PDFContext;\n\n constructor(byteStream: ByteStream, context: PDFContext, capNumbers = false) {\n super(byteStream, capNumbers);\n this.context = context;\n }\n\n // TODO: Is it possible to reduce duplicate parsing for ref lookaheads?\n parseObject(): PDFObject {\n this.skipWhitespaceAndComments();\n\n if (this.matchKeyword(Keywords.true)) return PDFBool.True;\n if (this.matchKeyword(Keywords.false)) return PDFBool.False;\n if (this.matchKeyword(Keywords.null)) return PDFNull;\n\n const byte = this.bytes.peek();\n\n if (\n byte === CharCodes.LessThan &&\n this.bytes.peekAhead(1) === CharCodes.LessThan\n ) {\n return this.parseDictOrStream();\n }\n if (byte === CharCodes.LessThan) return this.parseHexString();\n if (byte === CharCodes.LeftParen) return this.parseString();\n if (byte === CharCodes.ForwardSlash) return this.parseName();\n if (byte === CharCodes.LeftSquareBracket) return this.parseArray();\n if (IsNumeric[byte]) return this.parseNumberOrRef();\n\n throw new PDFObjectParsingError(this.bytes.position(), byte);\n }\n\n protected parseNumberOrRef(): PDFNumber | PDFRef {\n const firstNum = this.parseRawNumber();\n this.skipWhitespaceAndComments();\n\n const lookaheadStart = this.bytes.offset();\n if (IsDigit[this.bytes.peek()]) {\n const secondNum = this.parseRawNumber();\n this.skipWhitespaceAndComments();\n if (this.bytes.peek() === CharCodes.R) {\n this.bytes.assertNext(CharCodes.R);\n return PDFRef.of(firstNum, secondNum);\n }\n }\n\n this.bytes.moveTo(lookaheadStart);\n return PDFNumber.of(firstNum);\n }\n\n // TODO: Maybe update PDFHexString.of() logic to remove whitespace and validate input?\n protected parseHexString(): PDFHexString {\n let value = '';\n\n this.bytes.assertNext(CharCodes.LessThan);\n while (!this.bytes.done() && this.bytes.peek() !== CharCodes.GreaterThan) {\n value += charFromCode(this.bytes.next());\n }\n this.bytes.assertNext(CharCodes.GreaterThan);\n\n return PDFHexString.of(value);\n }\n\n protected parseString(): PDFString {\n let nestingLvl = 0;\n let isEscaped = false;\n let value = '';\n\n while (!this.bytes.done()) {\n const byte = this.bytes.next();\n value += charFromCode(byte);\n\n // Check for unescaped parenthesis\n if (!isEscaped) {\n if (byte === CharCodes.LeftParen) nestingLvl += 1;\n if (byte === CharCodes.RightParen) nestingLvl -= 1;\n }\n\n // Track whether current character is being escaped or not\n if (byte === CharCodes.BackSlash) {\n isEscaped = !isEscaped;\n } else if (isEscaped) {\n isEscaped = false;\n }\n\n // Once (if) the unescaped parenthesis balance out, return their contents\n if (nestingLvl === 0) {\n // Remove the outer parens so they aren't part of the contents\n return PDFString.of(value.substring(1, value.length - 1));\n }\n }\n\n throw new UnbalancedParenthesisError(this.bytes.position());\n }\n\n // TODO: Compare performance of string concatenation to charFromCode(...bytes)\n // TODO: Maybe preallocate small Uint8Array if can use charFromCode?\n protected parseName(): PDFName {\n this.bytes.assertNext(CharCodes.ForwardSlash);\n\n let name = '';\n while (!this.bytes.done()) {\n const byte = this.bytes.peek();\n if (IsWhitespace[byte] || IsDelimiter[byte]) break;\n name += charFromCode(byte);\n this.bytes.next();\n }\n\n return PDFName.of(name);\n }\n\n protected parseArray(): PDFArray {\n this.bytes.assertNext(CharCodes.LeftSquareBracket);\n this.skipWhitespaceAndComments();\n\n const pdfArray = PDFArray.withContext(this.context);\n while (this.bytes.peek() !== CharCodes.RightSquareBracket) {\n const element = this.parseObject();\n pdfArray.push(element);\n this.skipWhitespaceAndComments();\n }\n this.bytes.assertNext(CharCodes.RightSquareBracket);\n return pdfArray;\n }\n\n protected parseDict(): PDFDict {\n this.bytes.assertNext(CharCodes.LessThan);\n this.bytes.assertNext(CharCodes.LessThan);\n this.skipWhitespaceAndComments();\n\n const dict: DictMap = new Map();\n\n while (\n !this.bytes.done() &&\n this.bytes.peek() !== CharCodes.GreaterThan &&\n this.bytes.peekAhead(1) !== CharCodes.GreaterThan\n ) {\n const key = this.parseName();\n const value = this.parseObject();\n dict.set(key, value);\n this.skipWhitespaceAndComments();\n }\n\n this.skipWhitespaceAndComments();\n this.bytes.assertNext(CharCodes.GreaterThan);\n this.bytes.assertNext(CharCodes.GreaterThan);\n\n const Type = dict.get(PDFName.of('Type'));\n\n if (Type === PDFName.of('Catalog')) {\n return PDFCatalog.fromMapWithContext(dict, this.context);\n } else if (Type === PDFName.of('Pages')) {\n return PDFPageTree.fromMapWithContext(dict, this.context);\n } else if (Type === PDFName.of('Page')) {\n return PDFPageLeaf.fromMapWithContext(dict, this.context);\n } else {\n return PDFDict.fromMapWithContext(dict, this.context);\n }\n }\n\n protected parseDictOrStream(): PDFDict | PDFStream {\n const startPos = this.bytes.position();\n\n const dict = this.parseDict();\n\n this.skipWhitespaceAndComments();\n\n if (\n !this.matchKeyword(Keywords.streamEOF1) &&\n !this.matchKeyword(Keywords.streamEOF2) &&\n !this.matchKeyword(Keywords.streamEOF3) &&\n !this.matchKeyword(Keywords.streamEOF4) &&\n !this.matchKeyword(Keywords.stream)\n ) {\n return dict;\n }\n\n const start = this.bytes.offset();\n let end: number;\n\n const Length = dict.get(PDFName.of('Length'));\n if (Length instanceof PDFNumber) {\n end = start + Length.asNumber();\n this.bytes.moveTo(end);\n this.skipWhitespaceAndComments();\n if (!this.matchKeyword(Keywords.endstream)) {\n this.bytes.moveTo(start);\n end = this.findEndOfStreamFallback(startPos);\n }\n } else {\n end = this.findEndOfStreamFallback(startPos);\n }\n\n const contents = this.bytes.slice(start, end);\n\n return PDFRawStream.of(dict, contents);\n }\n\n protected findEndOfStreamFallback(startPos: Position) {\n // Move to end of stream, while handling nested streams\n let nestingLvl = 1;\n let end = this.bytes.offset();\n\n while (!this.bytes.done()) {\n end = this.bytes.offset();\n\n if (this.matchKeyword(Keywords.stream)) {\n nestingLvl += 1;\n } else if (\n this.matchKeyword(Keywords.EOF1endstream) ||\n this.matchKeyword(Keywords.EOF2endstream) ||\n this.matchKeyword(Keywords.EOF3endstream) ||\n this.matchKeyword(Keywords.endstream)\n ) {\n nestingLvl -= 1;\n } else {\n this.bytes.next();\n }\n\n if (nestingLvl === 0) break;\n }\n\n if (nestingLvl !== 0) throw new PDFStreamParsingError(startPos);\n\n return end;\n }\n}\n\nexport default PDFObjectParser;\n","import { ReparseError } from 'src/core/errors';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport ByteStream from 'src/core/parser/ByteStream';\nimport PDFObjectParser from 'src/core/parser/PDFObjectParser';\nimport { waitForTick } from 'src/utils';\n\nclass PDFObjectStreamParser extends PDFObjectParser {\n static forStream = (\n rawStream: PDFRawStream,\n shouldWaitForTick?: () => boolean,\n ) => new PDFObjectStreamParser(rawStream, shouldWaitForTick);\n\n private alreadyParsed: boolean;\n private readonly shouldWaitForTick: () => boolean;\n private readonly firstOffset: number;\n private readonly objectCount: number;\n\n constructor(rawStream: PDFRawStream, shouldWaitForTick?: () => boolean) {\n super(ByteStream.fromPDFRawStream(rawStream), rawStream.dict.context);\n\n const { dict } = rawStream;\n\n this.alreadyParsed = false;\n this.shouldWaitForTick = shouldWaitForTick || (() => false);\n this.firstOffset = dict.lookup(PDFName.of('First'), PDFNumber).asNumber();\n this.objectCount = dict.lookup(PDFName.of('N'), PDFNumber).asNumber();\n }\n\n async parseIntoContext(): Promise {\n if (this.alreadyParsed) {\n throw new ReparseError('PDFObjectStreamParser', 'parseIntoContext');\n }\n this.alreadyParsed = true;\n\n const offsetsAndObjectNumbers = this.parseOffsetsAndObjectNumbers();\n for (let idx = 0, len = offsetsAndObjectNumbers.length; idx < len; idx++) {\n const { objectNumber, offset } = offsetsAndObjectNumbers[idx];\n this.bytes.moveTo(this.firstOffset + offset);\n const object = this.parseObject();\n const ref = PDFRef.of(objectNumber, 0);\n this.context.assign(ref, object);\n if (this.shouldWaitForTick()) await waitForTick();\n }\n }\n\n private parseOffsetsAndObjectNumbers(): {\n objectNumber: number;\n offset: number;\n }[] {\n const offsetsAndObjectNumbers = [];\n for (let idx = 0, len = this.objectCount; idx < len; idx++) {\n this.skipWhitespaceAndComments();\n const objectNumber = this.parseRawInt();\n\n this.skipWhitespaceAndComments();\n const offset = this.parseRawInt();\n\n offsetsAndObjectNumbers.push({ objectNumber, offset });\n }\n return offsetsAndObjectNumbers;\n }\n}\n\nexport default PDFObjectStreamParser;\n","import { ReparseError } from 'src/core/errors';\nimport PDFArray from 'src/core/objects/PDFArray';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFNumber from 'src/core/objects/PDFNumber';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport ByteStream from 'src/core/parser/ByteStream';\nimport PDFContext from 'src/core/PDFContext';\n\nexport interface Entry {\n ref: PDFRef;\n offset: number;\n deleted: boolean;\n inObjectStream: boolean;\n}\n\nclass PDFXRefStreamParser {\n static forStream = (rawStream: PDFRawStream) =>\n new PDFXRefStreamParser(rawStream);\n\n private alreadyParsed: boolean;\n\n private readonly dict: PDFDict;\n private readonly context: PDFContext;\n private readonly bytes: ByteStream;\n private readonly subsections: {\n firstObjectNumber: number;\n length: number;\n }[];\n private readonly byteWidths: [number, number, number];\n\n constructor(rawStream: PDFRawStream) {\n this.alreadyParsed = false;\n\n this.dict = rawStream.dict;\n this.bytes = ByteStream.fromPDFRawStream(rawStream);\n this.context = this.dict.context;\n\n const Size = this.dict.lookup(PDFName.of('Size'), PDFNumber);\n\n const Index = this.dict.lookup(PDFName.of('Index'));\n if (Index instanceof PDFArray) {\n this.subsections = [];\n for (let idx = 0, len = Index.size(); idx < len; idx += 2) {\n const firstObjectNumber = Index.lookup(idx + 0, PDFNumber).asNumber();\n const length = Index.lookup(idx + 1, PDFNumber).asNumber();\n this.subsections.push({ firstObjectNumber, length });\n }\n } else {\n this.subsections = [{ firstObjectNumber: 0, length: Size.asNumber() }];\n }\n\n const W = this.dict.lookup(PDFName.of('W'), PDFArray);\n this.byteWidths = [-1, -1, -1];\n for (let idx = 0, len = W.size(); idx < len; idx++) {\n this.byteWidths[idx] = W.lookup(idx, PDFNumber).asNumber();\n }\n }\n\n parseIntoContext(): Entry[] {\n if (this.alreadyParsed) {\n throw new ReparseError('PDFXRefStreamParser', 'parseIntoContext');\n }\n this.alreadyParsed = true;\n\n this.context.trailerInfo = {\n Root: this.dict.get(PDFName.of('Root')),\n Encrypt: this.dict.get(PDFName.of('Encrypt')),\n Info: this.dict.get(PDFName.of('Info')),\n ID: this.dict.get(PDFName.of('ID')),\n };\n\n const entries = this.parseEntries();\n\n // for (let idx = 0, len = entries.length; idx < len; idx++) {\n // const entry = entries[idx];\n // if (entry.deleted) this.context.delete(entry.ref);\n // }\n\n return entries;\n }\n\n private parseEntries(): Entry[] {\n const entries = [];\n const [typeFieldWidth, offsetFieldWidth, genFieldWidth] = this.byteWidths;\n\n for (\n let subsectionIdx = 0, subsectionLen = this.subsections.length;\n subsectionIdx < subsectionLen;\n subsectionIdx++\n ) {\n const { firstObjectNumber, length } = this.subsections[subsectionIdx];\n\n for (let objIdx = 0; objIdx < length; objIdx++) {\n let type = 0;\n for (let idx = 0, len = typeFieldWidth; idx < len; idx++) {\n type = (type << 8) | this.bytes.next();\n }\n\n let offset = 0;\n for (let idx = 0, len = offsetFieldWidth; idx < len; idx++) {\n offset = (offset << 8) | this.bytes.next();\n }\n\n let generationNumber = 0;\n for (let idx = 0, len = genFieldWidth; idx < len; idx++) {\n generationNumber = (generationNumber << 8) | this.bytes.next();\n }\n\n // When the `type` field is absent, it defaults to 1\n if (typeFieldWidth === 0) type = 1;\n\n const objectNumber = firstObjectNumber + objIdx;\n const entry = {\n ref: PDFRef.of(objectNumber, generationNumber),\n offset,\n deleted: type === 0,\n inObjectStream: type === 2,\n };\n\n entries.push(entry);\n }\n }\n\n return entries;\n }\n}\n\nexport default PDFXRefStreamParser;\n","import PDFCrossRefSection from 'src/core/document/PDFCrossRefSection';\nimport PDFHeader from 'src/core/document/PDFHeader';\nimport PDFTrailer from 'src/core/document/PDFTrailer';\nimport {\n MissingKeywordError,\n MissingPDFHeaderError,\n PDFInvalidObjectParsingError,\n ReparseError,\n StalledParserError,\n} from 'src/core/errors';\nimport PDFDict from 'src/core/objects/PDFDict';\nimport PDFInvalidObject from 'src/core/objects/PDFInvalidObject';\nimport PDFName from 'src/core/objects/PDFName';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRawStream from 'src/core/objects/PDFRawStream';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport ByteStream from 'src/core/parser/ByteStream';\nimport PDFObjectParser from 'src/core/parser/PDFObjectParser';\nimport PDFObjectStreamParser from 'src/core/parser/PDFObjectStreamParser';\nimport PDFXRefStreamParser from 'src/core/parser/PDFXRefStreamParser';\nimport PDFContext from 'src/core/PDFContext';\nimport CharCodes from 'src/core/syntax/CharCodes';\nimport { Keywords } from 'src/core/syntax/Keywords';\nimport { IsDigit } from 'src/core/syntax/Numeric';\nimport { waitForTick } from 'src/utils';\n\nclass PDFParser extends PDFObjectParser {\n static forBytesWithOptions = (\n pdfBytes: Uint8Array,\n objectsPerTick?: number,\n throwOnInvalidObject?: boolean,\n capNumbers?: boolean,\n ) =>\n new PDFParser(pdfBytes, objectsPerTick, throwOnInvalidObject, capNumbers);\n\n private readonly objectsPerTick: number;\n private readonly throwOnInvalidObject: boolean;\n private alreadyParsed = false;\n private parsedObjects = 0;\n\n constructor(\n pdfBytes: Uint8Array,\n objectsPerTick = Infinity,\n throwOnInvalidObject = false,\n capNumbers = false,\n ) {\n super(ByteStream.of(pdfBytes), PDFContext.create(), capNumbers);\n this.objectsPerTick = objectsPerTick;\n this.throwOnInvalidObject = throwOnInvalidObject;\n }\n\n async parseDocument(): Promise {\n if (this.alreadyParsed) {\n throw new ReparseError('PDFParser', 'parseDocument');\n }\n this.alreadyParsed = true;\n\n this.context.header = this.parseHeader();\n\n let prevOffset;\n while (!this.bytes.done()) {\n await this.parseDocumentSection();\n const offset = this.bytes.offset();\n if (offset === prevOffset) {\n throw new StalledParserError(this.bytes.position());\n }\n prevOffset = offset;\n }\n\n this.maybeRecoverRoot();\n\n if (this.context.lookup(PDFRef.of(0))) {\n console.warn('Removing parsed object: 0 0 R');\n this.context.delete(PDFRef.of(0));\n }\n\n return this.context;\n }\n\n private maybeRecoverRoot(): void {\n const isValidCatalog = (obj?: PDFObject) =>\n obj instanceof PDFDict &&\n obj.lookup(PDFName.of('Type')) === PDFName.of('Catalog');\n\n const catalog = this.context.lookup(this.context.trailerInfo.Root);\n\n if (!isValidCatalog(catalog)) {\n const indirectObjects = this.context.enumerateIndirectObjects();\n for (let idx = 0, len = indirectObjects.length; idx < len; idx++) {\n const [ref, object] = indirectObjects[idx];\n if (isValidCatalog(object)) {\n this.context.trailerInfo.Root = ref;\n }\n }\n }\n }\n\n private parseHeader(): PDFHeader {\n while (!this.bytes.done()) {\n if (this.matchKeyword(Keywords.header)) {\n const major = this.parseRawInt();\n this.bytes.assertNext(CharCodes.Period);\n const minor = this.parseRawInt();\n const header = PDFHeader.forVersion(major, minor);\n this.skipBinaryHeaderComment();\n return header;\n }\n this.bytes.next();\n }\n\n throw new MissingPDFHeaderError(this.bytes.position());\n }\n\n private parseIndirectObjectHeader(): PDFRef {\n this.skipWhitespaceAndComments();\n const objectNumber = this.parseRawInt();\n\n this.skipWhitespaceAndComments();\n const generationNumber = this.parseRawInt();\n\n this.skipWhitespaceAndComments();\n if (!this.matchKeyword(Keywords.obj)) {\n throw new MissingKeywordError(this.bytes.position(), Keywords.obj);\n }\n\n return PDFRef.of(objectNumber, generationNumber);\n }\n\n private matchIndirectObjectHeader(): boolean {\n const initialOffset = this.bytes.offset();\n try {\n this.parseIndirectObjectHeader();\n return true;\n } catch (e) {\n this.bytes.moveTo(initialOffset);\n return false;\n }\n }\n\n private shouldWaitForTick = () => {\n this.parsedObjects += 1;\n return this.parsedObjects % this.objectsPerTick === 0;\n };\n\n private async parseIndirectObject(): Promise {\n const ref = this.parseIndirectObjectHeader();\n\n this.skipWhitespaceAndComments();\n const object = this.parseObject();\n\n this.skipWhitespaceAndComments();\n // if (!this.matchKeyword(Keywords.endobj)) {\n // throw new MissingKeywordError(this.bytes.position(), Keywords.endobj);\n // }\n\n // TODO: Log a warning if this fails...\n this.matchKeyword(Keywords.endobj);\n\n if (\n object instanceof PDFRawStream &&\n object.dict.lookup(PDFName.of('Type')) === PDFName.of('ObjStm')\n ) {\n await PDFObjectStreamParser.forStream(\n object,\n this.shouldWaitForTick,\n ).parseIntoContext();\n } else if (\n object instanceof PDFRawStream &&\n object.dict.lookup(PDFName.of('Type')) === PDFName.of('XRef')\n ) {\n PDFXRefStreamParser.forStream(object).parseIntoContext();\n } else {\n this.context.assign(ref, object);\n }\n\n return ref;\n }\n\n // TODO: Improve and clean this up\n private tryToParseInvalidIndirectObject() {\n const startPos = this.bytes.position();\n\n const msg = `Trying to parse invalid object: ${JSON.stringify(startPos)})`;\n if (this.throwOnInvalidObject) throw new Error(msg);\n console.warn(msg);\n\n const ref = this.parseIndirectObjectHeader();\n\n console.warn(`Invalid object ref: ${ref}`);\n\n this.skipWhitespaceAndComments();\n const start = this.bytes.offset();\n\n let failed = true;\n while (!this.bytes.done()) {\n if (this.matchKeyword(Keywords.endobj)) {\n failed = false;\n }\n if (!failed) break;\n this.bytes.next();\n }\n\n if (failed) throw new PDFInvalidObjectParsingError(startPos);\n\n const end = this.bytes.offset() - Keywords.endobj.length;\n\n const object = PDFInvalidObject.of(this.bytes.slice(start, end));\n this.context.assign(ref, object);\n\n return ref;\n }\n\n private async parseIndirectObjects(): Promise {\n this.skipWhitespaceAndComments();\n\n while (!this.bytes.done() && IsDigit[this.bytes.peek()]) {\n const initialOffset = this.bytes.offset();\n\n try {\n await this.parseIndirectObject();\n } catch (e) {\n // TODO: Add tracing/logging mechanism to track when this happens!\n this.bytes.moveTo(initialOffset);\n this.tryToParseInvalidIndirectObject();\n }\n this.skipWhitespaceAndComments();\n\n // TODO: Can this be done only when needed, to avoid harming performance?\n this.skipJibberish();\n\n if (this.shouldWaitForTick()) await waitForTick();\n }\n }\n\n private maybeParseCrossRefSection(): PDFCrossRefSection | void {\n this.skipWhitespaceAndComments();\n if (!this.matchKeyword(Keywords.xref)) return;\n this.skipWhitespaceAndComments();\n\n let objectNumber = -1;\n const xref = PDFCrossRefSection.createEmpty();\n\n while (!this.bytes.done() && IsDigit[this.bytes.peek()]) {\n const firstInt = this.parseRawInt();\n this.skipWhitespaceAndComments();\n\n const secondInt = this.parseRawInt();\n this.skipWhitespaceAndComments();\n\n const byte = this.bytes.peek();\n if (byte === CharCodes.n || byte === CharCodes.f) {\n const ref = PDFRef.of(objectNumber, secondInt);\n if (this.bytes.next() === CharCodes.n) {\n xref.addEntry(ref, firstInt);\n } else {\n // this.context.delete(ref);\n xref.addDeletedEntry(ref, firstInt);\n }\n objectNumber += 1;\n } else {\n objectNumber = firstInt;\n }\n this.skipWhitespaceAndComments();\n }\n\n return xref;\n }\n\n private maybeParseTrailerDict(): void {\n this.skipWhitespaceAndComments();\n if (!this.matchKeyword(Keywords.trailer)) return;\n this.skipWhitespaceAndComments();\n\n const dict = this.parseDict();\n\n const { context } = this;\n context.trailerInfo = {\n Root: dict.get(PDFName.of('Root')) || context.trailerInfo.Root,\n Encrypt: dict.get(PDFName.of('Encrypt')) || context.trailerInfo.Encrypt,\n Info: dict.get(PDFName.of('Info')) || context.trailerInfo.Info,\n ID: dict.get(PDFName.of('ID')) || context.trailerInfo.ID,\n };\n }\n\n private maybeParseTrailer(): PDFTrailer | void {\n this.skipWhitespaceAndComments();\n if (!this.matchKeyword(Keywords.startxref)) return;\n this.skipWhitespaceAndComments();\n\n const offset = this.parseRawInt();\n\n this.skipWhitespace();\n this.matchKeyword(Keywords.eof);\n this.skipWhitespaceAndComments();\n this.matchKeyword(Keywords.eof);\n this.skipWhitespaceAndComments();\n\n return PDFTrailer.forLastCrossRefSectionOffset(offset);\n }\n\n private async parseDocumentSection(): Promise {\n await this.parseIndirectObjects();\n this.maybeParseCrossRefSection();\n this.maybeParseTrailerDict();\n this.maybeParseTrailer();\n\n // TODO: Can this be done only when needed, to avoid harming performance?\n this.skipJibberish();\n }\n\n /**\n * This operation is not necessary for valid PDF files. But some invalid PDFs\n * contain jibberish in between indirect objects. This method is designed to\n * skip past that jibberish, should it exist, until it reaches the next\n * indirect object header, an xref table section, or the file trailer.\n */\n private skipJibberish(): void {\n this.skipWhitespaceAndComments();\n while (!this.bytes.done()) {\n const initialOffset = this.bytes.offset();\n const byte = this.bytes.peek();\n const isAlphaNumeric = byte >= CharCodes.Space && byte <= CharCodes.Tilde;\n if (isAlphaNumeric) {\n if (\n this.matchKeyword(Keywords.xref) ||\n this.matchKeyword(Keywords.trailer) ||\n this.matchKeyword(Keywords.startxref) ||\n this.matchIndirectObjectHeader()\n ) {\n this.bytes.moveTo(initialOffset);\n break;\n }\n }\n this.bytes.next();\n }\n }\n\n /**\n * Skips the binary comment following a PDF header. The specification\n * defines this binary comment (section 7.5.2 File Header) as a sequence of 4\n * or more bytes that are 128 or greater, and which are preceded by a \"%\".\n *\n * This would imply that to strip out this binary comment, we could check for\n * a sequence of bytes starting with \"%\", and remove all subsequent bytes that\n * are 128 or greater. This works for many documents that properly comply with\n * the spec. But in the wild, there are PDFs that omit the leading \"%\", and\n * include bytes that are less than 128 (e.g. 0 or 1). So in order to parse\n * these headers correctly, we just throw out all bytes leading up to the\n * first indirect object header.\n */\n private skipBinaryHeaderComment(): void {\n this.skipWhitespaceAndComments();\n try {\n const initialOffset = this.bytes.offset();\n this.parseIndirectObjectHeader();\n this.bytes.moveTo(initialOffset);\n } catch (e) {\n this.bytes.next();\n this.skipWhitespaceAndComments();\n }\n }\n}\n\nexport default PDFParser;\n","const flag = (bitIndex: number) => 1 << bitIndex;\n\n/** From PDF spec table 165 */\nexport enum AnnotationFlags {\n /**\n * If set, do not display the annotation if it does not belong to one of the\n * standard annotation types and no annotation handler is available. If clear,\n * display such an unknown annotation using an appearance stream specified by\n * its appearance dictionary, if any.\n */\n Invisible = flag(1 - 1),\n\n /**\n * If set, do not display or print the annotation or allow it to interact with\n * the user, regardless of its annotation type or whether an annotation\n * handler is available.\n *\n * In cases where screen space is limited, the ability to hide and show\n * annotations selectively can be used in combination with appearance streams\n * to display auxiliary pop-up information similar in function to online help\n * systems.\n */\n Hidden = flag(2 - 1),\n\n /**\n * If set, print the annotation when the page is printed. If clear, never\n * print the annotation, regardless of whether it is displayed on the screen.\n *\n * This can be useful for annotations representing interactive pushbuttons,\n * which would serve no meaningful purpose on the printed page.\n */\n Print = flag(3 - 1),\n\n /**\n * If set, do not scale the annotation’s appearance to match the magnification\n * of the page. The location of the annotation on the page (defined by the\n * upper-left corner of its annotation rectangle) shall remain fixed,\n * regardless of the page magnification.\n */\n NoZoom = flag(4 - 1),\n\n /**\n * If set, do not rotate the annotation’s appearance to match the rotation of\n * the page. The upper-left corner of the annotation rectangle shall remain in\n * a fixed location on the page, regardless of the page rotation.\n */\n NoRotate = flag(5 - 1),\n\n /**\n * If set, do not display the annotation on the screen or allow it to interact\n * with the user. The annotation may be printed (depending on the setting of\n * the Print flag) but should be considered hidden for purposes of on-screen\n * display and user interaction.\n */\n NoView = flag(6 - 1),\n\n /**\n * If set, do not allow the annotation to interact with the user. The\n * annotation may be displayed or printed (depending on the settings of the\n * NoView and Print flags) but should not respond to mouse clicks or change\n * its appearance in response to mouse motions.\n *\n * This flag shall be ignored for widget annotations; its function is\n * subsumed by the ReadOnly flag of the associated form field.\n */\n ReadOnly = flag(7 - 1),\n\n /**\n * If set, do not allow the annotation to be deleted or its properties\n * (including position and size) to be modified by the user. However, this\n * flag does not restrict changes to the annotation’s contents, such as the\n * value of a form field.\n */\n Locked = flag(8 - 1),\n\n /**\n * If set, invert the interpretation of the NoView flag for certain events.\n *\n * A typical use is to have an annotation that appears only when a mouse\n * cursor is held over it.\n */\n ToggleNoView = flag(9 - 1),\n\n /**\n * If set, do not allow the contents of the annotation to be modified by the\n * user. This flag does not restrict deletion of the annotation or changes to\n * other annotation properties, such as position and size.\n */\n LockedContents = flag(10 - 1),\n}\n","import { PDFName, PDFNumber } from 'src/core';\n\nexport const asPDFName = (name: string | PDFName) =>\n name instanceof PDFName ? name : PDFName.of(name);\n\nexport const asPDFNumber = (num: number | PDFNumber) =>\n num instanceof PDFNumber ? num : PDFNumber.of(num);\n\nexport const asNumber = (num: number | PDFNumber) =>\n num instanceof PDFNumber ? num.asNumber() : num;\n","import { assertIs, error } from 'src/utils';\n\nexport enum RotationTypes {\n Degrees = 'degrees',\n Radians = 'radians',\n}\n\nexport interface Radians {\n type: RotationTypes.Radians;\n angle: number;\n}\n\nexport interface Degrees {\n type: RotationTypes.Degrees;\n angle: number;\n}\n\nexport type Rotation = Radians | Degrees;\n\nexport const radians = (radianAngle: number): Radians => {\n assertIs(radianAngle, 'radianAngle', ['number']);\n return { type: RotationTypes.Radians, angle: radianAngle };\n};\n\nexport const degrees = (degreeAngle: number): Degrees => {\n assertIs(degreeAngle, 'degreeAngle', ['number']);\n return { type: RotationTypes.Degrees, angle: degreeAngle };\n};\n\nconst { Radians, Degrees } = RotationTypes;\n\nexport const degreesToRadians = (degree: number) => (degree * Math.PI) / 180;\nexport const radiansToDegrees = (radian: number) => (radian * 180) / Math.PI;\n\n// prettier-ignore\nexport const toRadians = (rotation: Rotation) => \n rotation.type === Radians ? rotation.angle\n : rotation.type === Degrees ? degreesToRadians(rotation.angle)\n : error(`Invalid rotation: ${JSON.stringify(rotation)}`);\n\n// prettier-ignore\nexport const toDegrees = (rotation: Rotation) => \n rotation.type === Radians ? radiansToDegrees(rotation.angle)\n : rotation.type === Degrees ? rotation.angle\n : error(`Invalid rotation: ${JSON.stringify(rotation)}`);\n\nexport const reduceRotation = (degreeAngle = 0) => {\n const quadrants = (degreeAngle / 90) % 4;\n if (quadrants === 0) return 0;\n if (quadrants === 1) return 90;\n if (quadrants === 2) return 180;\n if (quadrants === 3) return 270;\n return 0; // `degreeAngle` is not a multiple of 90\n};\n\nexport const adjustDimsForRotation = (\n dims: { width: number; height: number },\n degreeAngle = 0,\n) => {\n const rotation = reduceRotation(degreeAngle);\n return rotation === 90 || rotation === 270\n ? { width: dims.height, height: dims.width }\n : { width: dims.width, height: dims.height };\n};\n\nexport const rotateRectangle = (\n rectangle: {\n x: number;\n y: number;\n width: number;\n height: number;\n },\n borderWidth = 0,\n degreeAngle = 0,\n) => {\n const { x, y, width: w, height: h } = rectangle;\n\n const r = reduceRotation(degreeAngle);\n const b = borderWidth / 2;\n\n // prettier-ignore\n if (r === 0) return { x: x - b, y: y - b, width: w, height: h };\n else if (r === 90) return { x: x - h + b, y: y - b, width: h, height: w };\n else if (r === 180) return { x: x - w + b, y: y - h + b, width: w, height: h };\n else if (r === 270) return { x: x - b, y: y - w + b, width: h, height: w };\n else return { x: x - b, y: y - b, width: w, height: h };\n};\n","import { asNumber, asPDFName, asPDFNumber } from 'src/api/objects';\nimport { degreesToRadians } from 'src/api/rotations';\nimport {\n PDFHexString,\n PDFName,\n PDFNumber,\n PDFOperator,\n PDFOperatorNames as Ops,\n} from 'src/core';\n\n/* ==================== Clipping Path Operators ==================== */\n\nexport const clip = () => PDFOperator.of(Ops.ClipNonZero);\nexport const clipEvenOdd = () => PDFOperator.of(Ops.ClipEvenOdd);\n\n/* ==================== Graphics State Operators ==================== */\n\nconst { cos, sin, tan } = Math;\n\nexport const concatTransformationMatrix = (\n a: number | PDFNumber,\n b: number | PDFNumber,\n c: number | PDFNumber,\n d: number | PDFNumber,\n e: number | PDFNumber,\n f: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.ConcatTransformationMatrix, [\n asPDFNumber(a),\n asPDFNumber(b),\n asPDFNumber(c),\n asPDFNumber(d),\n asPDFNumber(e),\n asPDFNumber(f),\n ]);\n\nexport const translate = (xPos: number | PDFNumber, yPos: number | PDFNumber) =>\n concatTransformationMatrix(1, 0, 0, 1, xPos, yPos);\n\nexport const scale = (xPos: number | PDFNumber, yPos: number | PDFNumber) =>\n concatTransformationMatrix(xPos, 0, 0, yPos, 0, 0);\n\nexport const rotateRadians = (angle: number | PDFNumber) =>\n concatTransformationMatrix(\n cos(asNumber(angle)),\n sin(asNumber(angle)),\n -sin(asNumber(angle)),\n cos(asNumber(angle)),\n 0,\n 0,\n );\n\nexport const rotateDegrees = (angle: number | PDFNumber) =>\n rotateRadians(degreesToRadians(asNumber(angle)));\n\nexport const skewRadians = (\n xSkewAngle: number | PDFNumber,\n ySkewAngle: number | PDFNumber,\n) =>\n concatTransformationMatrix(\n 1,\n tan(asNumber(xSkewAngle)),\n tan(asNumber(ySkewAngle)),\n 1,\n 0,\n 0,\n );\n\nexport const skewDegrees = (\n xSkewAngle: number | PDFNumber,\n ySkewAngle: number | PDFNumber,\n) =>\n skewRadians(\n degreesToRadians(asNumber(xSkewAngle)),\n degreesToRadians(asNumber(ySkewAngle)),\n );\n\nexport const setDashPattern = (\n dashArray: (number | PDFNumber)[],\n dashPhase: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.SetLineDashPattern, [\n `[${dashArray.map(asPDFNumber).join(' ')}]`,\n asPDFNumber(dashPhase),\n ]);\n\nexport const restoreDashPattern = () => setDashPattern([], 0);\n\nexport enum LineCapStyle {\n Butt = 0,\n Round = 1,\n Projecting = 2,\n}\n\nexport const setLineCap = (style: LineCapStyle) =>\n PDFOperator.of(Ops.SetLineCapStyle, [asPDFNumber(style)]);\n\nexport enum LineJoinStyle {\n Miter = 0,\n Round = 1,\n Bevel = 2,\n}\n\nexport const setLineJoin = (style: LineJoinStyle) =>\n PDFOperator.of(Ops.SetLineJoinStyle, [asPDFNumber(style)]);\n\nexport const setGraphicsState = (state: string | PDFName) =>\n PDFOperator.of(Ops.SetGraphicsStateParams, [asPDFName(state)]);\n\nexport const pushGraphicsState = () => PDFOperator.of(Ops.PushGraphicsState);\n\nexport const popGraphicsState = () => PDFOperator.of(Ops.PopGraphicsState);\n\nexport const setLineWidth = (width: number | PDFNumber) =>\n PDFOperator.of(Ops.SetLineWidth, [asPDFNumber(width)]);\n\n/* ==================== Path Construction Operators ==================== */\n\nexport const appendBezierCurve = (\n x1: number | PDFNumber,\n y1: number | PDFNumber,\n x2: number | PDFNumber,\n y2: number | PDFNumber,\n x3: number | PDFNumber,\n y3: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.AppendBezierCurve, [\n asPDFNumber(x1),\n asPDFNumber(y1),\n asPDFNumber(x2),\n asPDFNumber(y2),\n asPDFNumber(x3),\n asPDFNumber(y3),\n ]);\n\nexport const appendQuadraticCurve = (\n x1: number | PDFNumber,\n y1: number | PDFNumber,\n x2: number | PDFNumber,\n y2: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.CurveToReplicateInitialPoint, [\n asPDFNumber(x1),\n asPDFNumber(y1),\n asPDFNumber(x2),\n asPDFNumber(y2),\n ]);\n\nexport const closePath = () => PDFOperator.of(Ops.ClosePath);\n\nexport const moveTo = (xPos: number | PDFNumber, yPos: number | PDFNumber) =>\n PDFOperator.of(Ops.MoveTo, [asPDFNumber(xPos), asPDFNumber(yPos)]);\n\nexport const lineTo = (xPos: number | PDFNumber, yPos: number | PDFNumber) =>\n PDFOperator.of(Ops.LineTo, [asPDFNumber(xPos), asPDFNumber(yPos)]);\n\n/**\n * @param xPos x coordinate for the lower left corner of the rectangle\n * @param yPos y coordinate for the lower left corner of the rectangle\n * @param width width of the rectangle\n * @param height height of the rectangle\n */\nexport const rectangle = (\n xPos: number | PDFNumber,\n yPos: number | PDFNumber,\n width: number | PDFNumber,\n height: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.AppendRectangle, [\n asPDFNumber(xPos),\n asPDFNumber(yPos),\n asPDFNumber(width),\n asPDFNumber(height),\n ]);\n\n/**\n * @param xPos x coordinate for the lower left corner of the square\n * @param yPos y coordinate for the lower left corner of the square\n * @param size width and height of the square\n */\nexport const square = (xPos: number, yPos: number, size: number) =>\n rectangle(xPos, yPos, size, size);\n\n/* ==================== Path Painting Operators ==================== */\n\nexport const stroke = () => PDFOperator.of(Ops.StrokePath);\n\nexport const fill = () => PDFOperator.of(Ops.FillNonZero);\n\nexport const fillAndStroke = () => PDFOperator.of(Ops.FillNonZeroAndStroke);\n\nexport const endPath = () => PDFOperator.of(Ops.EndPath);\n\n/* ==================== Text Positioning Operators ==================== */\n\nexport const nextLine = () => PDFOperator.of(Ops.NextLine);\n\nexport const moveText = (x: number | PDFNumber, y: number | PDFNumber) =>\n PDFOperator.of(Ops.MoveText, [asPDFNumber(x), asPDFNumber(y)]);\n\n/* ==================== Text Showing Operators ==================== */\n\nexport const showText = (text: PDFHexString) =>\n PDFOperator.of(Ops.ShowText, [text]);\n\n/* ==================== Text State Operators ==================== */\n\nexport const beginText = () => PDFOperator.of(Ops.BeginText);\nexport const endText = () => PDFOperator.of(Ops.EndText);\n\nexport const setFontAndSize = (\n name: string | PDFName,\n size: number | PDFNumber,\n) => PDFOperator.of(Ops.SetFontAndSize, [asPDFName(name), asPDFNumber(size)]);\n\nexport const setCharacterSpacing = (spacing: number | PDFNumber) =>\n PDFOperator.of(Ops.SetCharacterSpacing, [asPDFNumber(spacing)]);\n\nexport const setWordSpacing = (spacing: number | PDFNumber) =>\n PDFOperator.of(Ops.SetWordSpacing, [asPDFNumber(spacing)]);\n\n/** @param squeeze horizontal character spacing */\nexport const setCharacterSqueeze = (squeeze: number | PDFNumber) =>\n PDFOperator.of(Ops.SetTextHorizontalScaling, [asPDFNumber(squeeze)]);\n\nexport const setLineHeight = (lineHeight: number | PDFNumber) =>\n PDFOperator.of(Ops.SetTextLineHeight, [asPDFNumber(lineHeight)]);\n\nexport const setTextRise = (rise: number | PDFNumber) =>\n PDFOperator.of(Ops.SetTextRise, [asPDFNumber(rise)]);\n\nexport enum TextRenderingMode {\n Fill = 0,\n Outline = 1,\n FillAndOutline = 2,\n Invisible = 3,\n FillAndClip = 4,\n OutlineAndClip = 5,\n FillAndOutlineAndClip = 6,\n Clip = 7,\n}\n\nexport const setTextRenderingMode = (mode: TextRenderingMode) =>\n PDFOperator.of(Ops.SetTextRenderingMode, [asPDFNumber(mode)]);\n\nexport const setTextMatrix = (\n a: number | PDFNumber,\n b: number | PDFNumber,\n c: number | PDFNumber,\n d: number | PDFNumber,\n e: number | PDFNumber,\n f: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.SetTextMatrix, [\n asPDFNumber(a),\n asPDFNumber(b),\n asPDFNumber(c),\n asPDFNumber(d),\n asPDFNumber(e),\n asPDFNumber(f),\n ]);\n\nexport const rotateAndSkewTextRadiansAndTranslate = (\n rotationAngle: number | PDFNumber,\n xSkewAngle: number | PDFNumber,\n ySkewAngle: number | PDFNumber,\n x: number | PDFNumber,\n y: number | PDFNumber,\n) =>\n setTextMatrix(\n cos(asNumber(rotationAngle)),\n sin(asNumber(rotationAngle)) + tan(asNumber(xSkewAngle)),\n -sin(asNumber(rotationAngle)) + tan(asNumber(ySkewAngle)),\n cos(asNumber(rotationAngle)),\n x,\n y,\n );\n\nexport const rotateAndSkewTextDegreesAndTranslate = (\n rotationAngle: number | PDFNumber,\n xSkewAngle: number | PDFNumber,\n ySkewAngle: number | PDFNumber,\n x: number | PDFNumber,\n y: number | PDFNumber,\n) =>\n rotateAndSkewTextRadiansAndTranslate(\n degreesToRadians(asNumber(rotationAngle)),\n degreesToRadians(asNumber(xSkewAngle)),\n degreesToRadians(asNumber(ySkewAngle)),\n x,\n y,\n );\n\n/* ==================== XObject Operator ==================== */\n\nexport const drawObject = (name: string | PDFName) =>\n PDFOperator.of(Ops.DrawObject, [asPDFName(name)]);\n\n/* ==================== Color Operators ==================== */\n\nexport const setFillingGrayscaleColor = (gray: number | PDFNumber) =>\n PDFOperator.of(Ops.NonStrokingColorGray, [asPDFNumber(gray)]);\n\nexport const setStrokingGrayscaleColor = (gray: number | PDFNumber) =>\n PDFOperator.of(Ops.StrokingColorGray, [asPDFNumber(gray)]);\n\nexport const setFillingRgbColor = (\n red: number | PDFNumber,\n green: number | PDFNumber,\n blue: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.NonStrokingColorRgb, [\n asPDFNumber(red),\n asPDFNumber(green),\n asPDFNumber(blue),\n ]);\n\nexport const setStrokingRgbColor = (\n red: number | PDFNumber,\n green: number | PDFNumber,\n blue: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.StrokingColorRgb, [\n asPDFNumber(red),\n asPDFNumber(green),\n asPDFNumber(blue),\n ]);\n\nexport const setFillingCmykColor = (\n cyan: number | PDFNumber,\n magenta: number | PDFNumber,\n yellow: number | PDFNumber,\n key: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.NonStrokingColorCmyk, [\n asPDFNumber(cyan),\n asPDFNumber(magenta),\n asPDFNumber(yellow),\n asPDFNumber(key),\n ]);\n\nexport const setStrokingCmykColor = (\n cyan: number | PDFNumber,\n magenta: number | PDFNumber,\n yellow: number | PDFNumber,\n key: number | PDFNumber,\n) =>\n PDFOperator.of(Ops.StrokingColorCmyk, [\n asPDFNumber(cyan),\n asPDFNumber(magenta),\n asPDFNumber(yellow),\n asPDFNumber(key),\n ]);\n\n/* ==================== Marked Content Operators ==================== */\n\nexport const beginMarkedContent = (tag: string | PDFName) =>\n PDFOperator.of(Ops.BeginMarkedContent, [asPDFName(tag)]);\n\nexport const endMarkedContent = () => PDFOperator.of(Ops.EndMarkedContent);\n","import {\n setFillingCmykColor,\n setFillingGrayscaleColor,\n setFillingRgbColor,\n setStrokingCmykColor,\n setStrokingGrayscaleColor,\n setStrokingRgbColor,\n} from 'src/api/operators';\nimport { assertRange, error } from 'src/utils';\n\nexport enum ColorTypes {\n Grayscale = 'Grayscale',\n RGB = 'RGB',\n CMYK = 'CMYK',\n}\n\nexport interface Grayscale {\n type: ColorTypes.Grayscale;\n gray: number;\n}\n\nexport interface RGB {\n type: ColorTypes.RGB;\n red: number;\n green: number;\n blue: number;\n}\n\nexport interface CMYK {\n type: ColorTypes.CMYK;\n cyan: number;\n magenta: number;\n yellow: number;\n key: number;\n}\n\nexport type Color = Grayscale | RGB | CMYK;\n\nexport const grayscale = (gray: number): Grayscale => {\n assertRange(gray, 'gray', 0.0, 1.0);\n return { type: ColorTypes.Grayscale, gray };\n};\n\nexport const rgb = (red: number, green: number, blue: number): RGB => {\n assertRange(red, 'red', 0, 1);\n assertRange(green, 'green', 0, 1);\n assertRange(blue, 'blue', 0, 1);\n return { type: ColorTypes.RGB, red, green, blue };\n};\n\nexport const cmyk = (\n cyan: number,\n magenta: number,\n yellow: number,\n key: number,\n): CMYK => {\n assertRange(cyan, 'cyan', 0, 1);\n assertRange(magenta, 'magenta', 0, 1);\n assertRange(yellow, 'yellow', 0, 1);\n assertRange(key, 'key', 0, 1);\n return { type: ColorTypes.CMYK, cyan, magenta, yellow, key };\n};\n\nconst { Grayscale, RGB, CMYK } = ColorTypes;\n\n// prettier-ignore\nexport const setFillingColor = (color: Color) => \n color.type === Grayscale ? setFillingGrayscaleColor(color.gray)\n : color.type === RGB ? setFillingRgbColor(color.red, color.green, color.blue)\n : color.type === CMYK ? setFillingCmykColor(color.cyan, color.magenta, color.yellow, color.key)\n : error(`Invalid color: ${JSON.stringify(color)}`);\n\n// prettier-ignore\nexport const setStrokingColor = (color: Color) => \n color.type === Grayscale ? setStrokingGrayscaleColor(color.gray)\n : color.type === RGB ? setStrokingRgbColor(color.red, color.green, color.blue)\n : color.type === CMYK ? setStrokingCmykColor(color.cyan, color.magenta, color.yellow, color.key)\n : error(`Invalid color: ${JSON.stringify(color)}`);\n\n// prettier-ignore\nexport const componentsToColor = (comps?: number[], scale = 1) => (\n comps?.length === 1 ? grayscale(\n comps[0] * scale,\n )\n : comps?.length === 3 ? rgb(\n comps[0] * scale, \n comps[1] * scale, \n comps[2] * scale,\n )\n : comps?.length === 4 ? cmyk(\n comps[0] * scale, \n comps[1] * scale, \n comps[2] * scale, \n comps[3] * scale,\n )\n : undefined\n);\n\n// prettier-ignore\nexport const colorToComponents = (color: Color) =>\n color.type === Grayscale ? [color.gray]\n : color.type === RGB ? [color.red, color.green, color.blue]\n : color.type === CMYK ? [color.cyan, color.magenta, color.yellow, color.key]\n : error(`Invalid color: ${JSON.stringify(color)}`);\n","export enum TextAlignment {\n Left = 0,\n Center = 1,\n Right = 2,\n}\n","// Originated from pdfkit Copyright (c) 2014 Devon Govett\n// https://github.com/foliojs/pdfkit/blob/1e62e6ffe24b378eb890df507a47610f4c4a7b24/lib/path.js\n// MIT LICENSE\n// Updated for pdf-lib & TypeScript by Jeremy Messenger\n\nimport {\n appendBezierCurve,\n appendQuadraticCurve,\n closePath,\n lineTo,\n moveTo,\n} from 'src/api/operators';\nimport { PDFOperator } from 'src/core';\n\nlet cx: number = 0;\nlet cy: number = 0;\nlet px: number | null = 0;\nlet py: number | null = 0;\nlet sx: number = 0;\nlet sy: number = 0;\n\nconst parameters = new Map([\n ['A', 7],\n ['a', 7],\n ['C', 6],\n ['c', 6],\n ['H', 1],\n ['h', 1],\n ['L', 2],\n ['l', 2],\n ['M', 2],\n ['m', 2],\n ['Q', 4],\n ['q', 4],\n ['S', 4],\n ['s', 4],\n ['T', 2],\n ['t', 2],\n ['V', 1],\n ['v', 1],\n ['Z', 0],\n ['z', 0],\n]);\n\ninterface Cmd {\n cmd?: string;\n args: number[];\n}\n\nconst parse = (path: string) => {\n let cmd;\n const ret: Cmd[] = [];\n let args: number[] = [];\n let curArg = '';\n let foundDecimal = false;\n let params = 0;\n\n for (const c of path) {\n if (parameters.has(c)) {\n params = parameters.get(c)!;\n if (cmd) {\n // save existing command\n if (curArg.length > 0) {\n args[args.length] = +curArg;\n }\n ret[ret.length] = { cmd, args };\n\n args = [];\n curArg = '';\n foundDecimal = false;\n }\n\n cmd = c;\n } else if (\n [' ', ','].includes(c) ||\n (c === '-' && curArg.length > 0 && curArg[curArg.length - 1] !== 'e') ||\n (c === '.' && foundDecimal)\n ) {\n if (curArg.length === 0) {\n continue;\n }\n\n if (args.length === params) {\n // handle reused commands\n ret[ret.length] = { cmd, args };\n args = [+curArg];\n\n // handle assumed commands\n if (cmd === 'M') {\n cmd = 'L';\n }\n if (cmd === 'm') {\n cmd = 'l';\n }\n } else {\n args[args.length] = +curArg;\n }\n\n foundDecimal = c === '.';\n\n // fix for negative numbers or repeated decimals with no delimeter between commands\n curArg = ['-', '.'].includes(c) ? c : '';\n } else {\n curArg += c;\n if (c === '.') {\n foundDecimal = true;\n }\n }\n }\n\n // add the last command\n if (curArg.length > 0) {\n if (args.length === params) {\n // handle reused commands\n ret[ret.length] = { cmd, args };\n args = [+curArg];\n\n // handle assumed commands\n if (cmd === 'M') {\n cmd = 'L';\n }\n if (cmd === 'm') {\n cmd = 'l';\n }\n } else {\n args[args.length] = +curArg;\n }\n }\n\n ret[ret.length] = { cmd, args };\n\n return ret;\n};\n\nconst apply = (commands: Cmd[]) => {\n // current point, control point, and subpath starting point\n cx = cy = px = py = sx = sy = 0;\n\n // run the commands\n let cmds: PDFOperator[] = [];\n for (let i = 0; i < commands.length; i++) {\n const c = commands[i];\n if (c.cmd && typeof runners[c.cmd] === 'function') {\n const cmd = runners[c.cmd](c.args);\n if (Array.isArray(cmd)) {\n cmds = cmds.concat(cmd);\n } else {\n cmds.push(cmd);\n }\n }\n }\n return cmds;\n};\n\ninterface CmdToOperatorsMap {\n [cmd: string]: (a: number[]) => PDFOperator | PDFOperator[];\n}\n\nconst runners: CmdToOperatorsMap = {\n M(a) {\n cx = a[0];\n cy = a[1];\n px = py = null;\n sx = cx;\n sy = cy;\n return moveTo(cx, cy);\n },\n\n m(a) {\n cx += a[0];\n cy += a[1];\n px = py = null;\n sx = cx;\n sy = cy;\n return moveTo(cx, cy);\n },\n\n C(a) {\n cx = a[4];\n cy = a[5];\n px = a[2];\n py = a[3];\n return appendBezierCurve(a[0], a[1], a[2], a[3], a[4], a[5]);\n },\n\n c(a) {\n const cmd = appendBezierCurve(\n a[0] + cx,\n a[1] + cy,\n a[2] + cx,\n a[3] + cy,\n a[4] + cx,\n a[5] + cy,\n );\n px = cx + a[2];\n py = cy + a[3];\n cx += a[4];\n cy += a[5];\n return cmd;\n },\n\n S(a) {\n if (px === null || py === null) {\n px = cx;\n py = cy;\n }\n\n const cmd = appendBezierCurve(\n cx - (px - cx),\n cy - (py - cy),\n a[0],\n a[1],\n a[2],\n a[3],\n );\n px = a[0];\n py = a[1];\n cx = a[2];\n cy = a[3];\n return cmd;\n },\n\n s(a) {\n if (px === null || py === null) {\n px = cx;\n py = cy;\n }\n\n const cmd = appendBezierCurve(\n cx - (px - cx),\n cy - (py - cy),\n cx + a[0],\n cy + a[1],\n cx + a[2],\n cy + a[3],\n );\n px = cx + a[0];\n py = cy + a[1];\n cx += a[2];\n cy += a[3];\n return cmd;\n },\n\n Q(a) {\n px = a[0];\n py = a[1];\n cx = a[2];\n cy = a[3];\n return appendQuadraticCurve(a[0], a[1], cx, cy);\n },\n\n q(a) {\n const cmd = appendQuadraticCurve(\n a[0] + cx,\n a[1] + cy,\n a[2] + cx,\n a[3] + cy,\n );\n px = cx + a[0];\n py = cy + a[1];\n cx += a[2];\n cy += a[3];\n return cmd;\n },\n\n T(a) {\n if (px === null || py === null) {\n px = cx;\n py = cy;\n } else {\n px = cx - (px - cx);\n py = cy - (py - cy);\n }\n\n const cmd = appendQuadraticCurve(px, py, a[0], a[1]);\n px = cx - (px - cx);\n py = cy - (py - cy);\n cx = a[0];\n cy = a[1];\n return cmd;\n },\n\n t(a) {\n if (px === null || py === null) {\n px = cx;\n py = cy;\n } else {\n px = cx - (px - cx);\n py = cy - (py - cy);\n }\n\n const cmd = appendQuadraticCurve(px, py, cx + a[0], cy + a[1]);\n cx += a[0];\n cy += a[1];\n return cmd;\n },\n\n A(a) {\n const cmds = solveArc(cx, cy, a);\n cx = a[5];\n cy = a[6];\n return cmds;\n },\n\n a(a) {\n a[5] += cx;\n a[6] += cy;\n const cmds = solveArc(cx, cy, a);\n cx = a[5];\n cy = a[6];\n return cmds;\n },\n\n L(a) {\n cx = a[0];\n cy = a[1];\n px = py = null;\n return lineTo(cx, cy);\n },\n\n l(a) {\n cx += a[0];\n cy += a[1];\n px = py = null;\n return lineTo(cx, cy);\n },\n\n H(a) {\n cx = a[0];\n px = py = null;\n return lineTo(cx, cy);\n },\n\n h(a) {\n cx += a[0];\n px = py = null;\n return lineTo(cx, cy);\n },\n\n V(a) {\n cy = a[0];\n px = py = null;\n return lineTo(cx, cy);\n },\n\n v(a) {\n cy += a[0];\n px = py = null;\n return lineTo(cx, cy);\n },\n\n Z() {\n const cmd = closePath();\n cx = sx;\n cy = sy;\n return cmd;\n },\n\n z() {\n const cmd = closePath();\n cx = sx;\n cy = sy;\n return cmd;\n },\n};\n\nconst solveArc = (x: number, y: number, coords: number[]) => {\n const [rx, ry, rot, large, sweep, ex, ey] = coords;\n const segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);\n\n const cmds: PDFOperator[] = [];\n for (const seg of segs) {\n const bez = segmentToBezier(...seg);\n cmds.push(appendBezierCurve(...bez));\n }\n return cmds;\n};\n\ntype Segment = [number, number, number, number, number, number, number, number];\ntype Bezier = [number, number, number, number, number, number];\n\n// from Inkscape svgtopdf, thanks!\nconst arcToSegments = (\n x: number,\n y: number,\n rx: number,\n ry: number,\n large: number,\n sweep: number,\n rotateX: number,\n ox: number,\n oy: number,\n) => {\n const th = rotateX * (Math.PI / 180);\n const sinTh = Math.sin(th);\n const cosTh = Math.cos(th);\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n px = cosTh * (ox - x) * 0.5 + sinTh * (oy - y) * 0.5;\n py = cosTh * (oy - y) * 0.5 - sinTh * (ox - x) * 0.5;\n let pl = (px * px) / (rx * rx) + (py * py) / (ry * ry);\n if (pl > 1) {\n pl = Math.sqrt(pl);\n rx *= pl;\n ry *= pl;\n }\n\n const a00 = cosTh / rx;\n const a01 = sinTh / rx;\n const a10 = -sinTh / ry;\n const a11 = cosTh / ry;\n const x0 = a00 * ox + a01 * oy;\n const y0 = a10 * ox + a11 * oy;\n const x1 = a00 * x + a01 * y;\n const y1 = a10 * x + a11 * y;\n\n const d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);\n let sfactorSq = 1 / d - 0.25;\n if (sfactorSq < 0) {\n sfactorSq = 0;\n }\n let sfactor = Math.sqrt(sfactorSq);\n if (sweep === large) {\n sfactor = -sfactor;\n }\n\n const xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);\n const yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);\n\n const th0 = Math.atan2(y0 - yc, x0 - xc);\n const th1 = Math.atan2(y1 - yc, x1 - xc);\n\n let thArc = th1 - th0;\n if (thArc < 0 && sweep === 1) {\n thArc += 2 * Math.PI;\n } else if (thArc > 0 && sweep === 0) {\n thArc -= 2 * Math.PI;\n }\n\n const segments = Math.ceil(Math.abs(thArc / (Math.PI * 0.5 + 0.001)));\n const result: Segment[] = [];\n\n for (let i = 0; i < segments; i++) {\n const th2 = th0 + (i * thArc) / segments;\n const th3 = th0 + ((i + 1) * thArc) / segments;\n result[i] = [xc, yc, th2, th3, rx, ry, sinTh, cosTh];\n }\n\n return result;\n};\n\nconst segmentToBezier = (\n cx1: number,\n cy1: number,\n th0: number,\n th1: number,\n rx: number,\n ry: number,\n sinTh: number,\n cosTh: number,\n) => {\n const a00 = cosTh * rx;\n const a01 = -sinTh * ry;\n const a10 = sinTh * rx;\n const a11 = cosTh * ry;\n\n const thHalf = 0.5 * (th1 - th0);\n const t =\n ((8 / 3) * Math.sin(thHalf * 0.5) * Math.sin(thHalf * 0.5)) /\n Math.sin(thHalf);\n const x1 = cx1 + Math.cos(th0) - t * Math.sin(th0);\n const y1 = cy1 + Math.sin(th0) + t * Math.cos(th0);\n const x3 = cx1 + Math.cos(th1);\n const y3 = cy1 + Math.sin(th1);\n const x2 = x3 + t * Math.sin(th1);\n const y2 = y3 - t * Math.cos(th1);\n\n const result: Bezier = [\n a00 * x1 + a01 * y1,\n a10 * x1 + a11 * y1,\n a00 * x2 + a01 * y2,\n a10 * x2 + a11 * y2,\n a00 * x3 + a01 * y3,\n a10 * x3 + a11 * y3,\n ];\n return result;\n};\n\nexport const svgPathToOperators = (path: string) => apply(parse(path));\n","import { Color, setFillingColor, setStrokingColor } from 'src/api/colors';\nimport {\n beginText,\n closePath,\n drawObject,\n endText,\n fill,\n fillAndStroke,\n lineTo,\n moveTo,\n nextLine,\n popGraphicsState,\n pushGraphicsState,\n rotateAndSkewTextRadiansAndTranslate,\n rotateRadians,\n scale,\n setFontAndSize,\n setLineHeight,\n setLineWidth,\n showText,\n skewRadians,\n stroke,\n translate,\n LineCapStyle,\n setLineCap,\n rotateDegrees,\n setGraphicsState,\n setDashPattern,\n beginMarkedContent,\n endMarkedContent,\n clip,\n endPath,\n appendBezierCurve,\n} from 'src/api/operators';\nimport { Rotation, degrees, toRadians } from 'src/api/rotations';\nimport { svgPathToOperators } from 'src/api/svgPath';\nimport { PDFHexString, PDFName, PDFNumber, PDFOperator } from 'src/core';\nimport { asNumber } from 'src/api/objects';\n\nexport interface DrawTextOptions {\n color: Color;\n font: string | PDFName;\n size: number | PDFNumber;\n rotate: Rotation;\n xSkew: Rotation;\n ySkew: Rotation;\n x: number | PDFNumber;\n y: number | PDFNumber;\n graphicsState?: string | PDFName;\n}\n\nexport const drawText = (\n line: PDFHexString,\n options: DrawTextOptions,\n): PDFOperator[] =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n beginText(),\n setFillingColor(options.color),\n setFontAndSize(options.font, options.size),\n rotateAndSkewTextRadiansAndTranslate(\n toRadians(options.rotate),\n toRadians(options.xSkew),\n toRadians(options.ySkew),\n options.x,\n options.y,\n ),\n showText(line),\n endText(),\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nexport interface DrawLinesOfTextOptions extends DrawTextOptions {\n lineHeight: number | PDFNumber;\n}\n\nexport const drawLinesOfText = (\n lines: PDFHexString[],\n options: DrawLinesOfTextOptions,\n): PDFOperator[] => {\n const operators = [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n beginText(),\n setFillingColor(options.color),\n setFontAndSize(options.font, options.size),\n setLineHeight(options.lineHeight),\n rotateAndSkewTextRadiansAndTranslate(\n toRadians(options.rotate),\n toRadians(options.xSkew),\n toRadians(options.ySkew),\n options.x,\n options.y,\n ),\n ].filter(Boolean) as PDFOperator[];\n\n for (let idx = 0, len = lines.length; idx < len; idx++) {\n operators.push(showText(lines[idx]), nextLine());\n }\n\n operators.push(endText(), popGraphicsState());\n return operators;\n};\n\nexport const drawImage = (\n name: string | PDFName,\n options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n rotate: Rotation;\n xSkew: Rotation;\n ySkew: Rotation;\n graphicsState?: string | PDFName;\n },\n): PDFOperator[] =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n translate(options.x, options.y),\n rotateRadians(toRadians(options.rotate)),\n scale(options.width, options.height),\n skewRadians(toRadians(options.xSkew), toRadians(options.ySkew)),\n drawObject(name),\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nexport const drawPage = (\n name: string | PDFName,\n options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n xScale: number | PDFNumber;\n yScale: number | PDFNumber;\n rotate: Rotation;\n xSkew: Rotation;\n ySkew: Rotation;\n graphicsState?: string | PDFName;\n },\n): PDFOperator[] =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n translate(options.x, options.y),\n rotateRadians(toRadians(options.rotate)),\n scale(options.xScale, options.yScale),\n skewRadians(toRadians(options.xSkew), toRadians(options.ySkew)),\n drawObject(name),\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nexport const drawLine = (options: {\n start: { x: number | PDFNumber; y: number | PDFNumber };\n end: { x: number | PDFNumber; y: number | PDFNumber };\n thickness: number | PDFNumber;\n color: Color | undefined;\n dashArray?: (number | PDFNumber)[];\n dashPhase?: number | PDFNumber;\n lineCap?: LineCapStyle;\n graphicsState?: string | PDFName;\n}) =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n options.color && setStrokingColor(options.color),\n setLineWidth(options.thickness),\n setDashPattern(options.dashArray ?? [], options.dashPhase ?? 0),\n moveTo(options.start.x, options.start.y),\n options.lineCap && setLineCap(options.lineCap),\n moveTo(options.start.x, options.start.y),\n lineTo(options.end.x, options.end.y),\n stroke(),\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nexport const drawRectangle = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n borderWidth: number | PDFNumber;\n color: Color | undefined;\n borderColor: Color | undefined;\n rotate: Rotation;\n xSkew: Rotation;\n ySkew: Rotation;\n borderLineCap?: LineCapStyle;\n borderDashArray?: (number | PDFNumber)[];\n borderDashPhase?: number | PDFNumber;\n graphicsState?: string | PDFName;\n}) =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n options.color && setFillingColor(options.color),\n options.borderColor && setStrokingColor(options.borderColor),\n setLineWidth(options.borderWidth),\n options.borderLineCap && setLineCap(options.borderLineCap),\n setDashPattern(options.borderDashArray ?? [], options.borderDashPhase ?? 0),\n translate(options.x, options.y),\n rotateRadians(toRadians(options.rotate)),\n skewRadians(toRadians(options.xSkew), toRadians(options.ySkew)),\n moveTo(0, 0),\n lineTo(0, options.height),\n lineTo(options.width, options.height),\n lineTo(options.width, 0),\n closePath(),\n\n // prettier-ignore\n options.color && options.borderWidth ? fillAndStroke()\n : options.color ? fill()\n : options.borderColor ? stroke()\n : closePath(),\n\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nconst KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);\n\n/** @deprecated */\nexport const drawEllipsePath = (config: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n xScale: number | PDFNumber;\n yScale: number | PDFNumber;\n}): PDFOperator[] => {\n let x = asNumber(config.x);\n let y = asNumber(config.y);\n const xScale = asNumber(config.xScale);\n const yScale = asNumber(config.yScale);\n\n x -= xScale;\n y -= yScale;\n\n const ox = xScale * KAPPA;\n const oy = yScale * KAPPA;\n const xe = x + xScale * 2;\n const ye = y + yScale * 2;\n const xm = x + xScale;\n const ym = y + yScale;\n\n return [\n pushGraphicsState(),\n moveTo(x, ym),\n appendBezierCurve(x, ym - oy, xm - ox, y, xm, y),\n appendBezierCurve(xm + ox, y, xe, ym - oy, xe, ym),\n appendBezierCurve(xe, ym + oy, xm + ox, ye, xm, ye),\n appendBezierCurve(xm - ox, ye, x, ym + oy, x, ym),\n popGraphicsState(),\n ];\n};\n\nconst drawEllipseCurves = (config: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n xScale: number | PDFNumber;\n yScale: number | PDFNumber;\n rotate: Rotation;\n}): PDFOperator[] => {\n const centerX = asNumber(config.x);\n const centerY = asNumber(config.y);\n const xScale = asNumber(config.xScale);\n const yScale = asNumber(config.yScale);\n\n const x = -xScale;\n const y = -yScale;\n\n const ox = xScale * KAPPA;\n const oy = yScale * KAPPA;\n const xe = x + xScale * 2;\n const ye = y + yScale * 2;\n const xm = x + xScale;\n const ym = y + yScale;\n\n return [\n translate(centerX, centerY),\n rotateRadians(toRadians(config.rotate)),\n moveTo(x, ym),\n appendBezierCurve(x, ym - oy, xm - ox, y, xm, y),\n appendBezierCurve(xm + ox, y, xe, ym - oy, xe, ym),\n appendBezierCurve(xe, ym + oy, xm + ox, ye, xm, ye),\n appendBezierCurve(xm - ox, ye, x, ym + oy, x, ym),\n ];\n};\n\nexport const drawEllipse = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n xScale: number | PDFNumber;\n yScale: number | PDFNumber;\n rotate?: Rotation;\n color: Color | undefined;\n borderColor: Color | undefined;\n borderWidth: number | PDFNumber;\n borderDashArray?: (number | PDFNumber)[];\n borderDashPhase?: number | PDFNumber;\n graphicsState?: string | PDFName;\n borderLineCap?: LineCapStyle;\n}) =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n options.color && setFillingColor(options.color),\n options.borderColor && setStrokingColor(options.borderColor),\n setLineWidth(options.borderWidth),\n options.borderLineCap && setLineCap(options.borderLineCap),\n setDashPattern(options.borderDashArray ?? [], options.borderDashPhase ?? 0),\n\n // The `drawEllipsePath` branch is only here for backwards compatibility.\n // See https://github.com/Hopding/pdf-lib/pull/511#issuecomment-667685655.\n ...(options.rotate === undefined\n ? drawEllipsePath({\n x: options.x,\n y: options.y,\n xScale: options.xScale,\n yScale: options.yScale,\n })\n : drawEllipseCurves({\n x: options.x,\n y: options.y,\n xScale: options.xScale,\n yScale: options.yScale,\n rotate: options.rotate ?? degrees(0),\n })),\n\n // prettier-ignore\n options.color && options.borderWidth ? fillAndStroke()\n : options.color ? fill()\n : options.borderColor ? stroke()\n : closePath(),\n\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nexport const drawSvgPath = (\n path: string,\n options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n rotate?: Rotation;\n scale: number | PDFNumber | undefined;\n color: Color | undefined;\n borderColor: Color | undefined;\n borderWidth: number | PDFNumber;\n borderDashArray?: (number | PDFNumber)[];\n borderDashPhase?: number | PDFNumber;\n borderLineCap?: LineCapStyle;\n graphicsState?: string | PDFName;\n },\n) =>\n [\n pushGraphicsState(),\n options.graphicsState && setGraphicsState(options.graphicsState),\n\n translate(options.x, options.y),\n rotateRadians(toRadians(options.rotate ?? degrees(0))),\n\n // SVG path Y axis is opposite pdf-lib's\n options.scale ? scale(options.scale, -options.scale) : scale(1, -1),\n\n options.color && setFillingColor(options.color),\n options.borderColor && setStrokingColor(options.borderColor),\n options.borderWidth && setLineWidth(options.borderWidth),\n options.borderLineCap && setLineCap(options.borderLineCap),\n\n setDashPattern(options.borderDashArray ?? [], options.borderDashPhase ?? 0),\n\n ...svgPathToOperators(path),\n\n // prettier-ignore\n options.color && options.borderWidth ? fillAndStroke()\n : options.color ? fill()\n : options.borderColor ? stroke()\n : closePath(),\n\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\nexport const drawCheckMark = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n size: number | PDFNumber;\n thickness: number | PDFNumber;\n color: Color | undefined;\n}) => {\n const size = asNumber(options.size);\n\n /*********************** Define Check Mark Points ***************************/\n // A check mark is defined by three points in some coordinate space. Here, we\n // define these points in a unit coordinate system, where the range of the x\n // and y axis are both [-1, 1].\n //\n // Note that we do not hard code `p1y` in case we wish to change the\n // size/shape of the check mark in the future. We want the check mark to\n // always form a right angle. This means that the dot product between (p1-p2)\n // and (p3-p2) should be zero:\n //\n // (p1x-p2x) * (p3x-p2x) + (p1y-p2y) * (p3y-p2y) = 0\n //\n // We can now rejigger this equation to solve for `p1y`:\n //\n // (p1y-p2y) * (p3y-p2y) = -((p1x-p2x) * (p3x-p2x))\n // (p1y-p2y) = -((p1x-p2x) * (p3x-p2x)) / (p3y-p2y)\n // p1y = -((p1x-p2x) * (p3x-p2x)) / (p3y-p2y) + p2y\n //\n // Thanks to my friend Joel Walker (https://github.com/JWalker1995) for\n // devising the above equation and unit coordinate system approach!\n\n // (x, y) coords of the check mark's bottommost point\n const p2x = -1 + 0.75;\n const p2y = -1 + 0.51;\n\n // (x, y) coords of the check mark's topmost point\n const p3y = 1 - 0.525;\n const p3x = 1 - 0.31;\n\n // (x, y) coords of the check mark's center (vertically) point\n const p1x = -1 + 0.325;\n const p1y = -((p1x - p2x) * (p3x - p2x)) / (p3y - p2y) + p2y;\n /****************************************************************************/\n\n return [\n pushGraphicsState(),\n options.color && setStrokingColor(options.color),\n setLineWidth(options.thickness),\n\n translate(options.x, options.y),\n moveTo(p1x * size, p1y * size),\n lineTo(p2x * size, p2y * size),\n lineTo(p3x * size, p3y * size),\n\n stroke(),\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n};\n\n// prettier-ignore\nexport const rotateInPlace = (options: {\n width: number | PDFNumber;\n height: number | PDFNumber;\n rotation: 0 | 90 | 180 | 270;\n}) =>\n options.rotation === 0 ? [\n translate(0, 0),\n rotateDegrees(0)\n ]\n : options.rotation === 90 ? [\n translate(options.width, 0),\n rotateDegrees(90)\n ]\n : options.rotation === 180 ? [\n translate(options.width, options.height),\n rotateDegrees(180)\n ]\n : options.rotation === 270 ? [\n translate(0, options.height),\n rotateDegrees(270)\n ]\n : []; // Invalid rotation - noop\n\nexport const drawCheckBox = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n thickness: number | PDFNumber;\n borderWidth: number | PDFNumber;\n markColor: Color | undefined;\n color: Color | undefined;\n borderColor: Color | undefined;\n filled: boolean;\n}) => {\n const outline = drawRectangle({\n x: options.x,\n y: options.y,\n width: options.width,\n height: options.height,\n borderWidth: options.borderWidth,\n color: options.color,\n borderColor: options.borderColor,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n if (!options.filled) return outline;\n\n const width = asNumber(options.width);\n const height = asNumber(options.height);\n\n const checkMarkSize = Math.min(width, height) / 2;\n\n const checkMark = drawCheckMark({\n x: width / 2,\n y: height / 2,\n size: checkMarkSize,\n thickness: options.thickness,\n color: options.markColor,\n });\n\n return [pushGraphicsState(), ...outline, ...checkMark, popGraphicsState()];\n};\n\nexport const drawRadioButton = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n borderWidth: number | PDFNumber;\n dotColor: Color | undefined;\n color: Color | undefined;\n borderColor: Color | undefined;\n filled: boolean;\n}) => {\n const width = asNumber(options.width);\n const height = asNumber(options.height);\n\n const outlineScale = Math.min(width, height) / 2;\n\n const outline = drawEllipse({\n x: options.x,\n y: options.y,\n xScale: outlineScale,\n yScale: outlineScale,\n color: options.color,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth,\n });\n\n if (!options.filled) return outline;\n\n const dot = drawEllipse({\n x: options.x,\n y: options.y,\n xScale: outlineScale * 0.45,\n yScale: outlineScale * 0.45,\n color: options.dotColor,\n borderColor: undefined,\n borderWidth: 0,\n });\n\n return [pushGraphicsState(), ...outline, ...dot, popGraphicsState()];\n};\n\nexport const drawButton = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n borderWidth: number | PDFNumber;\n color: Color | undefined;\n borderColor: Color | undefined;\n textLines: { encoded: PDFHexString; x: number; y: number }[];\n textColor: Color;\n font: string | PDFName;\n fontSize: number | PDFNumber;\n}) => {\n const x = asNumber(options.x);\n const y = asNumber(options.y);\n const width = asNumber(options.width);\n const height = asNumber(options.height);\n\n const background = drawRectangle({\n x,\n y,\n width,\n height,\n borderWidth: options.borderWidth,\n color: options.color,\n borderColor: options.borderColor,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n const lines = drawTextLines(options.textLines, {\n color: options.textColor,\n font: options.font,\n size: options.fontSize,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n return [pushGraphicsState(), ...background, ...lines, popGraphicsState()];\n};\n\nexport interface DrawTextLinesOptions {\n color: Color;\n font: string | PDFName;\n size: number | PDFNumber;\n rotate: Rotation;\n xSkew: Rotation;\n ySkew: Rotation;\n}\n\nexport const drawTextLines = (\n lines: { encoded: PDFHexString; x: number; y: number }[],\n options: DrawTextLinesOptions,\n): PDFOperator[] => {\n const operators = [\n beginText(),\n setFillingColor(options.color),\n setFontAndSize(options.font, options.size),\n ];\n\n for (let idx = 0, len = lines.length; idx < len; idx++) {\n const { encoded, x, y } = lines[idx];\n operators.push(\n rotateAndSkewTextRadiansAndTranslate(\n toRadians(options.rotate),\n toRadians(options.xSkew),\n toRadians(options.ySkew),\n x,\n y,\n ),\n showText(encoded),\n );\n }\n\n operators.push(endText());\n\n return operators;\n};\n\nexport const drawTextField = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n borderWidth: number | PDFNumber;\n color: Color | undefined;\n borderColor: Color | undefined;\n textLines: { encoded: PDFHexString; x: number; y: number }[];\n textColor: Color;\n font: string | PDFName;\n fontSize: number | PDFNumber;\n padding: number | PDFNumber;\n}) => {\n const x = asNumber(options.x);\n const y = asNumber(options.y);\n const width = asNumber(options.width);\n const height = asNumber(options.height);\n const borderWidth = asNumber(options.borderWidth);\n const padding = asNumber(options.padding);\n\n const clipX = x + borderWidth / 2 + padding;\n const clipY = y + borderWidth / 2 + padding;\n const clipWidth = width - (borderWidth / 2 + padding) * 2;\n const clipHeight = height - (borderWidth / 2 + padding) * 2;\n\n const clippingArea = [\n moveTo(clipX, clipY),\n lineTo(clipX, clipY + clipHeight),\n lineTo(clipX + clipWidth, clipY + clipHeight),\n lineTo(clipX + clipWidth, clipY),\n closePath(),\n clip(),\n endPath(),\n ];\n\n const background = drawRectangle({\n x,\n y,\n width,\n height,\n borderWidth: options.borderWidth,\n color: options.color,\n borderColor: options.borderColor,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n const lines = drawTextLines(options.textLines, {\n color: options.textColor,\n font: options.font,\n size: options.fontSize,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n const markedContent = [\n beginMarkedContent('Tx'),\n pushGraphicsState(),\n ...lines,\n popGraphicsState(),\n endMarkedContent(),\n ];\n\n return [\n pushGraphicsState(),\n ...background,\n ...clippingArea,\n ...markedContent,\n popGraphicsState(),\n ];\n};\n\nexport const drawOptionList = (options: {\n x: number | PDFNumber;\n y: number | PDFNumber;\n width: number | PDFNumber;\n height: number | PDFNumber;\n borderWidth: number | PDFNumber;\n color: Color | undefined;\n borderColor: Color | undefined;\n textLines: { encoded: PDFHexString; x: number; y: number; height: number }[];\n textColor: Color;\n font: string | PDFName;\n fontSize: number | PDFNumber;\n lineHeight: number | PDFNumber;\n selectedLines: number[];\n selectedColor: Color;\n padding: number | PDFNumber;\n}) => {\n const x = asNumber(options.x);\n const y = asNumber(options.y);\n const width = asNumber(options.width);\n const height = asNumber(options.height);\n const lineHeight = asNumber(options.lineHeight);\n const borderWidth = asNumber(options.borderWidth);\n const padding = asNumber(options.padding);\n\n const clipX = x + borderWidth / 2 + padding;\n const clipY = y + borderWidth / 2 + padding;\n const clipWidth = width - (borderWidth / 2 + padding) * 2;\n const clipHeight = height - (borderWidth / 2 + padding) * 2;\n\n const clippingArea = [\n moveTo(clipX, clipY),\n lineTo(clipX, clipY + clipHeight),\n lineTo(clipX + clipWidth, clipY + clipHeight),\n lineTo(clipX + clipWidth, clipY),\n closePath(),\n clip(),\n endPath(),\n ];\n\n const background = drawRectangle({\n x,\n y,\n width,\n height,\n borderWidth: options.borderWidth,\n color: options.color,\n borderColor: options.borderColor,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n const highlights: PDFOperator[] = [];\n for (let idx = 0, len = options.selectedLines.length; idx < len; idx++) {\n const line = options.textLines[options.selectedLines[idx]];\n highlights.push(\n ...drawRectangle({\n x: line.x - padding,\n y: line.y - (lineHeight - line.height) / 2,\n width: width - borderWidth,\n height: line.height + (lineHeight - line.height) / 2,\n borderWidth: 0,\n color: options.selectedColor,\n borderColor: undefined,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n }),\n );\n }\n\n const lines = drawTextLines(options.textLines, {\n color: options.textColor,\n font: options.font,\n size: options.fontSize,\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n });\n\n const markedContent = [\n beginMarkedContent('Tx'),\n pushGraphicsState(),\n ...lines,\n popGraphicsState(),\n endMarkedContent(),\n ];\n\n return [\n pushGraphicsState(),\n ...background,\n ...highlights,\n ...clippingArea,\n ...markedContent,\n popGraphicsState(),\n ];\n};\n","// tslint:disable: max-classes-per-file\n\n// TODO: Include link to documentation with example\nexport class EncryptedPDFError extends Error {\n constructor() {\n const msg =\n 'Input document to `PDFDocument.load` is encrypted. You can use `PDFDocument.load(..., { ignoreEncryption: true })` if you wish to load the document anyways.';\n super(msg);\n }\n}\n\n// TODO: Include link to documentation with example\nexport class FontkitNotRegisteredError extends Error {\n constructor() {\n const msg =\n 'Input to `PDFDocument.embedFont` was a custom font, but no `fontkit` instance was found. You must register a `fontkit` instance with `PDFDocument.registerFontkit(...)` before embedding custom fonts.';\n super(msg);\n }\n}\n\n// TODO: Include link to documentation with example\nexport class ForeignPageError extends Error {\n constructor() {\n const msg =\n 'A `page` passed to `PDFDocument.addPage` or `PDFDocument.insertPage` was from a different (foreign) PDF document. If you want to copy pages from one PDFDocument to another, you must use `PDFDocument.copyPages(...)` to copy the pages before adding or inserting them.';\n super(msg);\n }\n}\n\n// TODO: Include link to documentation with example\nexport class RemovePageFromEmptyDocumentError extends Error {\n constructor() {\n const msg =\n 'PDFDocument has no pages so `PDFDocument.removePage` cannot be called';\n super(msg);\n }\n}\n\nexport class NoSuchFieldError extends Error {\n constructor(name: string) {\n const msg = `PDFDocument has no form field with the name \"${name}\"`;\n super(msg);\n }\n}\n\nexport class UnexpectedFieldTypeError extends Error {\n constructor(name: string, expected: any, actual: any) {\n const expectedType = expected?.name;\n const actualType = actual?.constructor?.name ?? actual;\n const msg =\n `Expected field \"${name}\" to be of type ${expectedType}, ` +\n `but it is actually of type ${actualType}`;\n super(msg);\n }\n}\n\nexport class MissingOnValueCheckError extends Error {\n constructor(onValue: any) {\n const msg = `Failed to select check box due to missing onValue: \"${onValue}\"`;\n super(msg);\n }\n}\n\nexport class FieldAlreadyExistsError extends Error {\n constructor(name: string) {\n const msg = `A field already exists with the specified name: \"${name}\"`;\n super(msg);\n }\n}\n\nexport class InvalidFieldNamePartError extends Error {\n constructor(namePart: string) {\n const msg = `Field name contains invalid component: \"${namePart}\"`;\n super(msg);\n }\n}\n\nexport class FieldExistsAsNonTerminalError extends Error {\n constructor(name: string) {\n const msg = `A non-terminal field already exists with the specified name: \"${name}\"`;\n super(msg);\n }\n}\n\nexport class RichTextFieldReadError extends Error {\n constructor(fieldName: string) {\n const msg = `Reading rich text fields is not supported: Attempted to read rich text field: ${fieldName}`;\n super(msg);\n }\n}\n\nexport class CombedTextLayoutError extends Error {\n constructor(lineLength: number, cellCount: number) {\n const msg = `Failed to layout combed text as lineLength=${lineLength} is greater than cellCount=${cellCount}`;\n super(msg);\n }\n}\n\nexport class ExceededMaxLengthError extends Error {\n constructor(textLength: number, maxLength: number, name: string) {\n const msg = `Attempted to set text with length=${textLength} for TextField with maxLength=${maxLength} and name=${name}`;\n super(msg);\n }\n}\n\nexport class InvalidMaxLengthError extends Error {\n constructor(textLength: number, maxLength: number, name: string) {\n const msg = `Attempted to set maxLength=${maxLength}, which is less than ${textLength}, the length of this field's current value (name=${name})`;\n super(msg);\n }\n}\n","import PDFFont from 'src/api/PDFFont';\nimport { CombedTextLayoutError } from 'src/api/errors';\nimport { TextAlignment } from 'src/api/text/alignment';\n\nimport { PDFHexString } from 'src/core';\nimport {\n cleanText,\n lineSplit,\n mergeLines,\n charAtIndex,\n charSplit,\n} from 'src/utils';\n\nexport interface TextPosition {\n text: string;\n encoded: PDFHexString;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface LayoutBounds {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nconst MIN_FONT_SIZE = 4;\nconst MAX_FONT_SIZE = 500;\n\nconst computeFontSize = (\n lines: string[],\n font: PDFFont,\n bounds: LayoutBounds,\n multiline: boolean = false,\n) => {\n let fontSize = MIN_FONT_SIZE;\n\n while (fontSize < MAX_FONT_SIZE) {\n let linesUsed = 0;\n\n for (\n let lineIdx = 0, lineLen = lines.length;\n lineIdx < lineLen;\n lineIdx++\n ) {\n linesUsed += 1;\n\n const line = lines[lineIdx];\n const words = line.split(' ');\n\n // Layout the words using the current `fontSize`, line wrapping\n // whenever we reach the end of the current line.\n let spaceInLineRemaining = bounds.width;\n for (let idx = 0, len = words.length; idx < len; idx++) {\n const isLastWord = idx === len - 1;\n const word = isLastWord ? words[idx] : words[idx] + ' ';\n const widthOfWord = font.widthOfTextAtSize(word, fontSize);\n spaceInLineRemaining -= widthOfWord;\n if (spaceInLineRemaining <= 0) {\n linesUsed += 1;\n spaceInLineRemaining = bounds.width - widthOfWord;\n }\n }\n }\n\n // Return if we exceeded the allowed width\n if (!multiline && linesUsed > lines.length) return fontSize - 1;\n\n const height = font.heightAtSize(fontSize);\n const lineHeight = height + height * 0.2;\n const totalHeight = lineHeight * linesUsed;\n\n // Return if we exceeded the allowed height\n if (totalHeight > Math.abs(bounds.height)) return fontSize - 1;\n\n fontSize += 1;\n }\n\n return fontSize;\n};\n\nconst computeCombedFontSize = (\n line: string,\n font: PDFFont,\n bounds: LayoutBounds,\n cellCount: number,\n) => {\n const cellWidth = bounds.width / cellCount;\n const cellHeight = bounds.height;\n\n let fontSize = MIN_FONT_SIZE;\n\n const chars = charSplit(line);\n while (fontSize < MAX_FONT_SIZE) {\n for (let idx = 0, len = chars.length; idx < len; idx++) {\n const c = chars[idx];\n const tooLong = font.widthOfTextAtSize(c, fontSize) > cellWidth * 0.75;\n if (tooLong) return fontSize - 1;\n }\n\n const height = font.heightAtSize(fontSize, { descender: false });\n if (height > cellHeight) return fontSize - 1;\n\n fontSize += 1;\n }\n\n return fontSize;\n};\n\nexport interface LayoutTextOptions {\n alignment: TextAlignment;\n fontSize?: number;\n font: PDFFont;\n bounds: LayoutBounds;\n}\n\nexport interface MultilineTextLayout {\n bounds: LayoutBounds;\n lines: TextPosition[];\n fontSize: number;\n lineHeight: number;\n}\n\nconst lastIndexOfWhitespace = (line: string) => {\n for (let idx = line.length; idx > 0; idx--) {\n if (/\\s/.test(line[idx])) return idx;\n }\n return undefined;\n};\n\nconst splitOutLines = (\n input: string,\n maxWidth: number,\n font: PDFFont,\n fontSize: number,\n) => {\n let lastWhitespaceIdx = input.length;\n while (lastWhitespaceIdx > 0) {\n const line = input.substring(0, lastWhitespaceIdx);\n const encoded = font.encodeText(line);\n const width = font.widthOfTextAtSize(line, fontSize);\n if (width < maxWidth) {\n const remainder = input.substring(lastWhitespaceIdx) || undefined;\n return { line, encoded, width, remainder };\n }\n lastWhitespaceIdx = lastIndexOfWhitespace(line) ?? 0;\n }\n\n // We were unable to split the input enough to get a chunk that would fit\n // within the specified `maxWidth` so we'll just return everything\n return {\n line: input,\n encoded: font.encodeText(input),\n width: font.widthOfTextAtSize(input, fontSize),\n remainder: undefined,\n };\n};\n\nexport const layoutMultilineText = (\n text: string,\n { alignment, fontSize, font, bounds }: LayoutTextOptions,\n): MultilineTextLayout => {\n const lines = lineSplit(cleanText(text));\n\n if (fontSize === undefined || fontSize === 0) {\n fontSize = computeFontSize(lines, font, bounds, true);\n }\n const height = font.heightAtSize(fontSize);\n const lineHeight = height + height * 0.2;\n\n const textLines: TextPosition[] = [];\n\n let minX = bounds.x;\n let minY = bounds.y;\n let maxX = bounds.x + bounds.width;\n let maxY = bounds.y + bounds.height;\n\n let y = bounds.y + bounds.height;\n for (let idx = 0, len = lines.length; idx < len; idx++) {\n let prevRemainder: string | undefined = lines[idx];\n while (prevRemainder !== undefined) {\n const { line, encoded, width, remainder } = splitOutLines(\n prevRemainder,\n bounds.width,\n font,\n fontSize,\n );\n\n // prettier-ignore\n const x = (\n alignment === TextAlignment.Left ? bounds.x\n : alignment === TextAlignment.Center ? bounds.x + (bounds.width / 2) - (width / 2)\n : alignment === TextAlignment.Right ? bounds.x + bounds.width - width\n : bounds.x\n );\n\n y -= lineHeight;\n\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x + width > maxX) maxX = x + width;\n if (y + height > maxY) maxY = y + height;\n\n textLines.push({ text: line, encoded, width, height, x, y });\n\n // Only trim lines that we had to split ourselves. So we won't trim lines\n // that the user provided themselves with whitespace.\n prevRemainder = remainder?.trim();\n }\n }\n\n return {\n fontSize,\n lineHeight,\n lines: textLines,\n bounds: {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n },\n };\n};\n\nexport interface LayoutCombedTextOptions {\n fontSize?: number;\n font: PDFFont;\n bounds: LayoutBounds;\n cellCount: number;\n}\n\nexport interface CombedTextLayout {\n bounds: LayoutBounds;\n cells: TextPosition[];\n fontSize: number;\n}\n\nexport const layoutCombedText = (\n text: string,\n { fontSize, font, bounds, cellCount }: LayoutCombedTextOptions,\n): CombedTextLayout => {\n const line = mergeLines(cleanText(text));\n\n if (line.length > cellCount) {\n throw new CombedTextLayoutError(line.length, cellCount);\n }\n\n if (fontSize === undefined || fontSize === 0) {\n fontSize = computeCombedFontSize(line, font, bounds, cellCount);\n }\n\n const cellWidth = bounds.width / cellCount;\n\n const height = font.heightAtSize(fontSize, { descender: false });\n const y = bounds.y + (bounds.height / 2 - height / 2);\n\n const cells: TextPosition[] = [];\n\n let minX = bounds.x;\n let minY = bounds.y;\n let maxX = bounds.x + bounds.width;\n let maxY = bounds.y + bounds.height;\n\n let cellOffset = 0;\n let charOffset = 0;\n while (cellOffset < cellCount) {\n const [char, charLength] = charAtIndex(line, charOffset);\n\n const encoded = font.encodeText(char);\n const width = font.widthOfTextAtSize(char, fontSize);\n\n const cellCenter = bounds.x + (cellWidth * cellOffset + cellWidth / 2);\n const x = cellCenter - width / 2;\n\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x + width > maxX) maxX = x + width;\n if (y + height > maxY) maxY = y + height;\n\n cells.push({ text: line, encoded, width, height, x, y });\n\n cellOffset += 1;\n charOffset += charLength;\n }\n\n return {\n fontSize,\n cells,\n bounds: {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n },\n };\n};\n\nexport interface LayoutSinglelineTextOptions {\n alignment: TextAlignment;\n fontSize?: number;\n font: PDFFont;\n bounds: LayoutBounds;\n}\n\nexport interface SinglelineTextLayout {\n bounds: LayoutBounds;\n line: TextPosition;\n fontSize: number;\n}\n\nexport const layoutSinglelineText = (\n text: string,\n { alignment, fontSize, font, bounds }: LayoutSinglelineTextOptions,\n): SinglelineTextLayout => {\n const line = mergeLines(cleanText(text));\n\n if (fontSize === undefined || fontSize === 0) {\n fontSize = computeFontSize([line], font, bounds);\n }\n\n const encoded = font.encodeText(line);\n const width = font.widthOfTextAtSize(line, fontSize);\n const height = font.heightAtSize(fontSize, { descender: false });\n\n // prettier-ignore\n const x = (\n alignment === TextAlignment.Left ? bounds.x\n : alignment === TextAlignment.Center ? bounds.x + (bounds.width / 2) - (width / 2)\n : alignment === TextAlignment.Right ? bounds.x + bounds.width - width\n : bounds.x\n );\n\n const y = bounds.y + (bounds.height / 2 - height / 2);\n\n return {\n fontSize,\n line: { text: line, encoded, width, height, x, y },\n bounds: { x, y, width, height },\n };\n};\n","import { PDFOperator, PDFWidgetAnnotation } from 'src/core';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFButton from 'src/api/form/PDFButton';\nimport PDFCheckBox from 'src/api/form/PDFCheckBox';\nimport PDFDropdown from 'src/api/form/PDFDropdown';\nimport PDFField from 'src/api/form/PDFField';\nimport PDFOptionList from 'src/api/form/PDFOptionList';\nimport PDFRadioGroup from 'src/api/form/PDFRadioGroup';\nimport PDFSignature from 'src/api/form/PDFSignature';\nimport PDFTextField from 'src/api/form/PDFTextField';\nimport {\n drawCheckBox,\n rotateInPlace,\n drawRadioButton,\n drawButton,\n drawTextField,\n drawOptionList,\n} from 'src/api/operations';\nimport {\n rgb,\n componentsToColor,\n setFillingColor,\n grayscale,\n cmyk,\n Color,\n} from 'src/api/colors';\nimport { reduceRotation, adjustDimsForRotation } from 'src/api/rotations';\nimport {\n layoutMultilineText,\n layoutCombedText,\n TextPosition,\n layoutSinglelineText,\n} from 'src/api/text/layout';\nimport { TextAlignment } from 'src/api/text/alignment';\nimport { setFontAndSize } from 'src/api/operators';\nimport { findLastMatch } from 'src/utils';\n\n/*********************** Appearance Provider Types ****************************/\n\ntype CheckBoxAppearanceProvider = (\n checkBox: PDFCheckBox,\n widget: PDFWidgetAnnotation,\n) => AppearanceOrMapping<{\n on: PDFOperator[];\n off: PDFOperator[];\n}>;\n\ntype RadioGroupAppearanceProvider = (\n radioGroup: PDFRadioGroup,\n widget: PDFWidgetAnnotation,\n) => AppearanceOrMapping<{\n on: PDFOperator[];\n off: PDFOperator[];\n}>;\n\ntype ButtonAppearanceProvider = (\n button: PDFButton,\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n) => AppearanceOrMapping;\n\ntype DropdownAppearanceProvider = (\n dropdown: PDFDropdown,\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n) => AppearanceOrMapping;\n\ntype OptionListAppearanceProvider = (\n optionList: PDFOptionList,\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n) => AppearanceOrMapping;\n\ntype TextFieldAppearanceProvider = (\n textField: PDFTextField,\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n) => AppearanceOrMapping;\n\ntype SignatureAppearanceProvider = (\n signature: PDFSignature,\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n) => AppearanceOrMapping;\n\n/******************* Appearance Provider Utility Types ************************/\n\nexport type AppearanceMapping = { normal: T; rollover?: T; down?: T };\n\ntype AppearanceOrMapping = T | AppearanceMapping;\n\n// prettier-ignore\nexport type AppearanceProviderFor = \n T extends PDFCheckBox ? CheckBoxAppearanceProvider\n: T extends PDFRadioGroup ? RadioGroupAppearanceProvider\n: T extends PDFButton ? ButtonAppearanceProvider\n: T extends PDFDropdown ? DropdownAppearanceProvider\n: T extends PDFOptionList ? OptionListAppearanceProvider\n: T extends PDFTextField ? TextFieldAppearanceProvider\n: T extends PDFSignature ? SignatureAppearanceProvider\n: never;\n\n/********************* Appearance Provider Functions **************************/\n\nexport const normalizeAppearance = (\n appearance: T | AppearanceMapping,\n): AppearanceMapping => {\n if ('normal' in appearance) return appearance;\n return { normal: appearance };\n};\n\n// Examples:\n// `/Helv 12 Tf` -> ['/Helv 12 Tf', 'Helv', '12']\n// `/HeBo 8.00 Tf` -> ['/HeBo 8 Tf', 'HeBo', '8.00']\nconst tfRegex = /\\/([^\\0\\t\\n\\f\\r\\ ]+)[\\0\\t\\n\\f\\r\\ ]+(\\d*\\.\\d+|\\d+)[\\0\\t\\n\\f\\r\\ ]+Tf/;\n\nconst getDefaultFontSize = (field: {\n getDefaultAppearance(): string | undefined;\n}) => {\n const da = field.getDefaultAppearance() ?? '';\n const daMatch = findLastMatch(da, tfRegex).match ?? [];\n const defaultFontSize = Number(daMatch[2]);\n return isFinite(defaultFontSize) ? defaultFontSize : undefined;\n};\n\n// Examples:\n// `0.3 g` -> ['0.3', 'g']\n// `0.3 1 .3 rg` -> ['0.3', '1', '.3', 'rg']\n// `0.3 1 .3 0 k` -> ['0.3', '1', '.3', '0', 'k']\nconst colorRegex = /(\\d*\\.\\d+|\\d+)[\\0\\t\\n\\f\\r\\ ]*(\\d*\\.\\d+|\\d+)?[\\0\\t\\n\\f\\r\\ ]*(\\d*\\.\\d+|\\d+)?[\\0\\t\\n\\f\\r\\ ]*(\\d*\\.\\d+|\\d+)?[\\0\\t\\n\\f\\r\\ ]+(g|rg|k)/;\n\nconst getDefaultColor = (field: {\n getDefaultAppearance(): string | undefined;\n}) => {\n const da = field.getDefaultAppearance() ?? '';\n const daMatch = findLastMatch(da, colorRegex).match;\n\n const [, c1, c2, c3, c4, colorSpace] = daMatch ?? [];\n\n if (colorSpace === 'g' && c1) {\n return grayscale(Number(c1));\n }\n if (colorSpace === 'rg' && c1 && c2 && c3) {\n return rgb(Number(c1), Number(c2), Number(c3));\n }\n if (colorSpace === 'k' && c1 && c2 && c3 && c4) {\n return cmyk(Number(c1), Number(c2), Number(c3), Number(c4));\n }\n\n return undefined;\n};\n\nconst updateDefaultAppearance = (\n field: { setDefaultAppearance(appearance: string): void },\n color: Color,\n font?: PDFFont,\n fontSize: number = 0,\n) => {\n const da = [\n setFillingColor(color).toString(),\n setFontAndSize(font?.name ?? 'dummy__noop', fontSize).toString(),\n ].join('\\n');\n field.setDefaultAppearance(da);\n};\n\nexport const defaultCheckBoxAppearanceProvider: AppearanceProviderFor = (\n checkBox,\n widget,\n) => {\n // The `/DA` entry can be at the widget or field level - so we handle both\n const widgetColor = getDefaultColor(widget);\n const fieldColor = getDefaultColor(checkBox.acroField);\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n const { width, height } = adjustDimsForRotation(rectangle, rotation);\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const black = rgb(0, 0, 0);\n const borderColor = componentsToColor(ap?.getBorderColor()) ?? black;\n const normalBackgroundColor = componentsToColor(ap?.getBackgroundColor());\n const downBackgroundColor = componentsToColor(ap?.getBackgroundColor(), 0.8);\n\n // Update color\n const textColor = widgetColor ?? fieldColor ?? black;\n if (widgetColor) {\n updateDefaultAppearance(widget, textColor);\n } else {\n updateDefaultAppearance(checkBox.acroField, textColor);\n }\n\n const options = {\n x: 0 + borderWidth / 2,\n y: 0 + borderWidth / 2,\n width: width - borderWidth,\n height: height - borderWidth,\n thickness: 1.5,\n borderWidth,\n borderColor,\n markColor: textColor,\n };\n\n return {\n normal: {\n on: [\n ...rotate,\n ...drawCheckBox({\n ...options,\n color: normalBackgroundColor,\n filled: true,\n }),\n ],\n off: [\n ...rotate,\n ...drawCheckBox({\n ...options,\n color: normalBackgroundColor,\n filled: false,\n }),\n ],\n },\n down: {\n on: [\n ...rotate,\n ...drawCheckBox({\n ...options,\n color: downBackgroundColor,\n filled: true,\n }),\n ],\n off: [\n ...rotate,\n ...drawCheckBox({\n ...options,\n color: downBackgroundColor,\n filled: false,\n }),\n ],\n },\n };\n};\n\nexport const defaultRadioGroupAppearanceProvider: AppearanceProviderFor = (\n radioGroup,\n widget,\n) => {\n // The `/DA` entry can be at the widget or field level - so we handle both\n const widgetColor = getDefaultColor(widget);\n const fieldColor = getDefaultColor(radioGroup.acroField);\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n const { width, height } = adjustDimsForRotation(rectangle, rotation);\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const black = rgb(0, 0, 0);\n const borderColor = componentsToColor(ap?.getBorderColor()) ?? black;\n const normalBackgroundColor = componentsToColor(ap?.getBackgroundColor());\n const downBackgroundColor = componentsToColor(ap?.getBackgroundColor(), 0.8);\n\n // Update color\n const textColor = widgetColor ?? fieldColor ?? black;\n if (widgetColor) {\n updateDefaultAppearance(widget, textColor);\n } else {\n updateDefaultAppearance(radioGroup.acroField, textColor);\n }\n\n const options = {\n x: width / 2,\n y: height / 2,\n width: width - borderWidth,\n height: height - borderWidth,\n borderWidth,\n borderColor,\n dotColor: textColor,\n };\n\n return {\n normal: {\n on: [\n ...rotate,\n ...drawRadioButton({\n ...options,\n color: normalBackgroundColor,\n filled: true,\n }),\n ],\n off: [\n ...rotate,\n ...drawRadioButton({\n ...options,\n color: normalBackgroundColor,\n filled: false,\n }),\n ],\n },\n down: {\n on: [\n ...rotate,\n ...drawRadioButton({\n ...options,\n color: downBackgroundColor,\n filled: true,\n }),\n ],\n off: [\n ...rotate,\n ...drawRadioButton({\n ...options,\n color: downBackgroundColor,\n filled: false,\n }),\n ],\n },\n };\n};\n\nexport const defaultButtonAppearanceProvider: AppearanceProviderFor = (\n button,\n widget,\n font,\n) => {\n // The `/DA` entry can be at the widget or field level - so we handle both\n const widgetColor = getDefaultColor(widget);\n const fieldColor = getDefaultColor(button.acroField);\n const widgetFontSize = getDefaultFontSize(widget);\n const fieldFontSize = getDefaultFontSize(button.acroField);\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n const captions = ap?.getCaptions();\n const normalText = captions?.normal ?? '';\n const downText = captions?.down ?? normalText ?? '';\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n const { width, height } = adjustDimsForRotation(rectangle, rotation);\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const black = rgb(0, 0, 0);\n\n const borderColor = componentsToColor(ap?.getBorderColor());\n const normalBackgroundColor = componentsToColor(ap?.getBackgroundColor());\n const downBackgroundColor = componentsToColor(ap?.getBackgroundColor(), 0.8);\n\n const bounds = {\n x: borderWidth,\n y: borderWidth,\n width: width - borderWidth * 2,\n height: height - borderWidth * 2,\n };\n const normalLayout = layoutSinglelineText(normalText, {\n alignment: TextAlignment.Center,\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n });\n const downLayout = layoutSinglelineText(downText, {\n alignment: TextAlignment.Center,\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n });\n\n // Update font size and color\n const fontSize = Math.min(normalLayout.fontSize, downLayout.fontSize);\n const textColor = widgetColor ?? fieldColor ?? black;\n if (widgetColor || widgetFontSize !== undefined) {\n updateDefaultAppearance(widget, textColor, font, fontSize);\n } else {\n updateDefaultAppearance(button.acroField, textColor, font, fontSize);\n }\n\n const options = {\n x: 0 + borderWidth / 2,\n y: 0 + borderWidth / 2,\n width: width - borderWidth,\n height: height - borderWidth,\n borderWidth,\n borderColor,\n textColor,\n font: font.name,\n fontSize,\n };\n\n return {\n normal: [\n ...rotate,\n ...drawButton({\n ...options,\n color: normalBackgroundColor,\n textLines: [normalLayout.line],\n }),\n ],\n down: [\n ...rotate,\n ...drawButton({\n ...options,\n color: downBackgroundColor,\n textLines: [downLayout.line],\n }),\n ],\n };\n};\n\nexport const defaultTextFieldAppearanceProvider: AppearanceProviderFor = (\n textField,\n widget,\n font,\n) => {\n // The `/DA` entry can be at the widget or field level - so we handle both\n const widgetColor = getDefaultColor(widget);\n const fieldColor = getDefaultColor(textField.acroField);\n const widgetFontSize = getDefaultFontSize(widget);\n const fieldFontSize = getDefaultFontSize(textField.acroField);\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n const text = textField.getText() ?? '';\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n const { width, height } = adjustDimsForRotation(rectangle, rotation);\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const black = rgb(0, 0, 0);\n\n const borderColor = componentsToColor(ap?.getBorderColor());\n const normalBackgroundColor = componentsToColor(ap?.getBackgroundColor());\n\n let textLines: TextPosition[];\n let fontSize: number;\n\n const padding = textField.isCombed() ? 0 : 1;\n const bounds = {\n x: borderWidth + padding,\n y: borderWidth + padding,\n width: width - (borderWidth + padding) * 2,\n height: height - (borderWidth + padding) * 2,\n };\n if (textField.isMultiline()) {\n const layout = layoutMultilineText(text, {\n alignment: textField.getAlignment(),\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n });\n textLines = layout.lines;\n fontSize = layout.fontSize;\n } else if (textField.isCombed()) {\n const layout = layoutCombedText(text, {\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n cellCount: textField.getMaxLength() ?? 0,\n });\n textLines = layout.cells;\n fontSize = layout.fontSize;\n } else {\n const layout = layoutSinglelineText(text, {\n alignment: textField.getAlignment(),\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n });\n textLines = [layout.line];\n fontSize = layout.fontSize;\n }\n\n // Update font size and color\n const textColor = widgetColor ?? fieldColor ?? black;\n if (widgetColor || widgetFontSize !== undefined) {\n updateDefaultAppearance(widget, textColor, font, fontSize);\n } else {\n updateDefaultAppearance(textField.acroField, textColor, font, fontSize);\n }\n\n const options = {\n x: 0 + borderWidth / 2,\n y: 0 + borderWidth / 2,\n width: width - borderWidth,\n height: height - borderWidth,\n borderWidth: borderWidth ?? 0,\n borderColor,\n textColor,\n font: font.name,\n fontSize,\n color: normalBackgroundColor,\n textLines,\n padding,\n };\n\n return [...rotate, ...drawTextField(options)];\n};\n\nexport const defaultDropdownAppearanceProvider: AppearanceProviderFor = (\n dropdown,\n widget,\n font,\n) => {\n // The `/DA` entry can be at the widget or field level - so we handle both\n const widgetColor = getDefaultColor(widget);\n const fieldColor = getDefaultColor(dropdown.acroField);\n const widgetFontSize = getDefaultFontSize(widget);\n const fieldFontSize = getDefaultFontSize(dropdown.acroField);\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n const text = dropdown.getSelected()[0] ?? '';\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n const { width, height } = adjustDimsForRotation(rectangle, rotation);\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const black = rgb(0, 0, 0);\n\n const borderColor = componentsToColor(ap?.getBorderColor());\n const normalBackgroundColor = componentsToColor(ap?.getBackgroundColor());\n\n const padding = 1;\n const bounds = {\n x: borderWidth + padding,\n y: borderWidth + padding,\n width: width - (borderWidth + padding) * 2,\n height: height - (borderWidth + padding) * 2,\n };\n const { line, fontSize } = layoutSinglelineText(text, {\n alignment: TextAlignment.Left,\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n });\n\n // Update font size and color\n const textColor = widgetColor ?? fieldColor ?? black;\n if (widgetColor || widgetFontSize !== undefined) {\n updateDefaultAppearance(widget, textColor, font, fontSize);\n } else {\n updateDefaultAppearance(dropdown.acroField, textColor, font, fontSize);\n }\n\n const options = {\n x: 0 + borderWidth / 2,\n y: 0 + borderWidth / 2,\n width: width - borderWidth,\n height: height - borderWidth,\n borderWidth: borderWidth ?? 0,\n borderColor,\n textColor,\n font: font.name,\n fontSize,\n color: normalBackgroundColor,\n textLines: [line],\n padding,\n };\n\n return [...rotate, ...drawTextField(options)];\n};\n\nexport const defaultOptionListAppearanceProvider: AppearanceProviderFor = (\n optionList,\n widget,\n font,\n) => {\n // The `/DA` entry can be at the widget or field level - so we handle both\n const widgetColor = getDefaultColor(widget);\n const fieldColor = getDefaultColor(optionList.acroField);\n const widgetFontSize = getDefaultFontSize(widget);\n const fieldFontSize = getDefaultFontSize(optionList.acroField);\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n const { width, height } = adjustDimsForRotation(rectangle, rotation);\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const black = rgb(0, 0, 0);\n\n const borderColor = componentsToColor(ap?.getBorderColor());\n const normalBackgroundColor = componentsToColor(ap?.getBackgroundColor());\n\n const options = optionList.getOptions();\n const selected = optionList.getSelected();\n\n if (optionList.isSorted()) options.sort();\n\n let text = '';\n for (let idx = 0, len = options.length; idx < len; idx++) {\n text += options[idx];\n if (idx < len - 1) text += '\\n';\n }\n\n const padding = 1;\n const bounds = {\n x: borderWidth + padding,\n y: borderWidth + padding,\n width: width - (borderWidth + padding) * 2,\n height: height - (borderWidth + padding) * 2,\n };\n const { lines, fontSize, lineHeight } = layoutMultilineText(text, {\n alignment: TextAlignment.Left,\n fontSize: widgetFontSize ?? fieldFontSize,\n font,\n bounds,\n });\n\n const selectedLines: number[] = [];\n for (let idx = 0, len = lines.length; idx < len; idx++) {\n const line = lines[idx];\n if (selected.includes(line.text)) selectedLines.push(idx);\n }\n\n const blue = rgb(153 / 255, 193 / 255, 218 / 255);\n\n // Update font size and color\n const textColor = widgetColor ?? fieldColor ?? black;\n if (widgetColor || widgetFontSize !== undefined) {\n updateDefaultAppearance(widget, textColor, font, fontSize);\n } else {\n updateDefaultAppearance(optionList.acroField, textColor, font, fontSize);\n }\n\n return [\n ...rotate,\n ...drawOptionList({\n x: 0 + borderWidth / 2,\n y: 0 + borderWidth / 2,\n width: width - borderWidth,\n height: height - borderWidth,\n borderWidth: borderWidth ?? 0,\n borderColor,\n textColor,\n font: font.name,\n fontSize,\n color: normalBackgroundColor,\n textLines: lines,\n lineHeight,\n selectedColor: blue,\n selectedLines,\n padding,\n }),\n ];\n};\n","import Embeddable from 'src/api/Embeddable';\nimport PDFDocument from 'src/api/PDFDocument';\nimport { PDFPageEmbedder, PDFRef } from 'src/core';\nimport { assertIs } from 'src/utils';\n\n/**\n * Represents a PDF page that has been embedded in a [[PDFDocument]].\n */\nexport default class PDFEmbeddedPage implements Embeddable {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.embedPdf]] and\n * > [[PDFDocument.embedPage]] methods, which will create instances of\n * > [[PDFEmbeddedPage]] for you.\n *\n * Create an instance of [[PDFEmbeddedPage]] from an existing ref and embedder\n *\n * @param ref The unique reference for this embedded page.\n * @param doc The document to which the embedded page will belong.\n * @param embedder The embedder that will be used to embed the page.\n */\n static of = (ref: PDFRef, doc: PDFDocument, embedder: PDFPageEmbedder) =>\n new PDFEmbeddedPage(ref, doc, embedder);\n\n /** The unique reference assigned to this embedded page within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this embedded page belongs. */\n readonly doc: PDFDocument;\n\n /** The width of this page in pixels. */\n readonly width: number;\n\n /** The height of this page in pixels. */\n readonly height: number;\n\n private alreadyEmbedded = false;\n private readonly embedder: PDFPageEmbedder;\n\n private constructor(\n ref: PDFRef,\n doc: PDFDocument,\n embedder: PDFPageEmbedder,\n ) {\n assertIs(ref, 'ref', [[PDFRef, 'PDFRef']]);\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n assertIs(embedder, 'embedder', [[PDFPageEmbedder, 'PDFPageEmbedder']]);\n\n this.ref = ref;\n this.doc = doc;\n this.width = embedder.width;\n this.height = embedder.height;\n\n this.embedder = embedder;\n }\n\n /**\n * Compute the width and height of this page after being scaled by the\n * given `factor`. For example:\n * ```js\n * embeddedPage.width // => 500\n * embeddedPage.height // => 250\n *\n * const scaled = embeddedPage.scale(0.5)\n * scaled.width // => 250\n * scaled.height // => 125\n * ```\n * This operation is often useful before drawing a page with\n * [[PDFPage.drawPage]] to compute the `width` and `height` options.\n * @param factor The factor by which this page should be scaled.\n * @returns The width and height of the page after being scaled.\n */\n scale(factor: number) {\n assertIs(factor, 'factor', ['number']);\n return { width: this.width * factor, height: this.height * factor };\n }\n\n /**\n * Get the width and height of this page. For example:\n * ```js\n * const { width, height } = embeddedPage.size()\n * ```\n * @returns The width and height of the page.\n */\n size() {\n return this.scale(1);\n }\n\n /**\n * > **NOTE:** You probably don't need to call this method directly. The\n * > [[PDFDocument.save]] and [[PDFDocument.saveAsBase64]] methods will\n * > automatically ensure all embeddable pages get embedded.\n *\n * Embed this embeddable page in its document.\n *\n * @returns Resolves when the embedding is complete.\n */\n async embed(): Promise {\n if (!this.alreadyEmbedded) {\n await this.embedder.embedIntoContext(this.doc.context, this.ref);\n this.alreadyEmbedded = true;\n }\n }\n}\n","import Embeddable from 'src/api//Embeddable';\nimport PDFDocument from 'src/api/PDFDocument';\nimport {\n CustomFontEmbedder,\n PDFHexString,\n PDFRef,\n StandardFontEmbedder,\n} from 'src/core';\nimport { assertIs, assertOrUndefined } from 'src/utils';\n\nexport type FontEmbedder = CustomFontEmbedder | StandardFontEmbedder;\n\n/**\n * Represents a font that has been embedded in a [[PDFDocument]].\n */\nexport default class PDFFont implements Embeddable {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.embedFont]] and\n * > [[PDFDocument.embedStandardFont]] methods, which will create instances\n * > of [[PDFFont]] for you.\n *\n * Create an instance of [[PDFFont]] from an existing ref and embedder\n *\n * @param ref The unique reference for this font.\n * @param doc The document to which the font will belong.\n * @param embedder The embedder that will be used to embed the font.\n */\n static of = (ref: PDFRef, doc: PDFDocument, embedder: FontEmbedder) =>\n new PDFFont(ref, doc, embedder);\n\n /** The unique reference assigned to this font within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this font belongs. */\n readonly doc: PDFDocument;\n\n /** The name of this font. */\n readonly name: string;\n\n private modified = true;\n private readonly embedder: FontEmbedder;\n\n private constructor(ref: PDFRef, doc: PDFDocument, embedder: FontEmbedder) {\n assertIs(ref, 'ref', [[PDFRef, 'PDFRef']]);\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n assertIs(embedder, 'embedder', [\n [CustomFontEmbedder, 'CustomFontEmbedder'],\n [StandardFontEmbedder, 'StandardFontEmbedder'],\n ]);\n\n this.ref = ref;\n this.doc = doc;\n this.name = embedder.fontName;\n\n this.embedder = embedder;\n }\n\n /**\n * > **NOTE:** You probably don't need to call this method directly. The\n * > [[PDFPage.drawText]] method will automatically encode the text it is\n * > given.\n *\n * Encodes a string of text in this font.\n *\n * @param text The text to be encoded.\n * @returns The encoded text as a hex string.\n */\n encodeText(text: string): PDFHexString {\n assertIs(text, 'text', ['string']);\n this.modified = true;\n return this.embedder.encodeText(text);\n }\n\n /**\n * Measure the width of a string of text drawn in this font at a given size.\n * For example:\n * ```js\n * const width = font.widthOfTextAtSize('Foo Bar Qux Baz', 36)\n * ```\n * @param text The string of text to be measured.\n * @param size The font size to be used for this measurement.\n * @returns The width of the string of text when drawn in this font at the\n * given size.\n */\n widthOfTextAtSize(text: string, size: number): number {\n assertIs(text, 'text', ['string']);\n assertIs(size, 'size', ['number']);\n return this.embedder.widthOfTextAtSize(text, size);\n }\n\n /**\n * Measure the height of this font at a given size. For example:\n * ```js\n * const height = font.heightAtSize(24)\n * ```\n *\n * The `options.descender` value controls whether or not the font's\n * descender is included in the height calculation.\n *\n * @param size The font size to be used for this measurement.\n * @param options The options to be used when computing this measurement.\n * @returns The height of this font at the given size.\n */\n heightAtSize(size: number, options?: { descender?: boolean }): number {\n assertIs(size, 'size', ['number']);\n assertOrUndefined(options?.descender, 'options.descender', ['boolean']);\n return this.embedder.heightOfFontAtSize(size, {\n descender: options?.descender ?? true,\n });\n }\n\n /**\n * Compute the font size at which this font is a given height. For example:\n * ```js\n * const fontSize = font.sizeAtHeight(12)\n * ```\n * @param height The height to be used for this calculation.\n * @returns The font size at which this font is the given height.\n */\n sizeAtHeight(height: number): number {\n assertIs(height, 'height', ['number']);\n return this.embedder.sizeOfFontAtHeight(height);\n }\n\n /**\n * Get the set of unicode code points that can be represented by this font.\n * @returns The set of unicode code points supported by this font.\n */\n getCharacterSet(): number[] {\n if (this.embedder instanceof StandardFontEmbedder) {\n return this.embedder.encoding.supportedCodePoints;\n } else {\n return this.embedder.font.characterSet;\n }\n }\n\n /**\n * > **NOTE:** You probably don't need to call this method directly. The\n * > [[PDFDocument.save]] and [[PDFDocument.saveAsBase64]] methods will\n * > automatically ensure all fonts get embedded.\n *\n * Embed this font in its document.\n *\n * @returns Resolves when the embedding is complete.\n */\n async embed(): Promise {\n // TODO: Cleanup orphan embedded objects if a font is embedded multiple times...\n if (this.modified) {\n await this.embedder.embedIntoContext(this.doc.context, this.ref);\n this.modified = false;\n }\n }\n}\n","import Embeddable from 'src/api/Embeddable';\nimport PDFDocument from 'src/api/PDFDocument';\nimport { JpegEmbedder, PDFRef, PngEmbedder } from 'src/core';\nimport { assertIs } from 'src/utils';\n\nexport type ImageEmbedder = JpegEmbedder | PngEmbedder;\n\n/**\n * Represents an image that has been embedded in a [[PDFDocument]].\n */\nexport default class PDFImage implements Embeddable {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.embedPng]] and [[PDFDocument.embedJpg]]\n * > methods, which will create instances of [[PDFImage]] for you.\n *\n * Create an instance of [[PDFImage]] from an existing ref and embedder\n *\n * @param ref The unique reference for this image.\n * @param doc The document to which the image will belong.\n * @param embedder The embedder that will be used to embed the image.\n */\n static of = (ref: PDFRef, doc: PDFDocument, embedder: ImageEmbedder) =>\n new PDFImage(ref, doc, embedder);\n\n /** The unique reference assigned to this image within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this image belongs. */\n readonly doc: PDFDocument;\n\n /** The width of this image in pixels. */\n readonly width: number;\n\n /** The height of this image in pixels. */\n readonly height: number;\n\n private embedder: ImageEmbedder | undefined;\n private embedTask: Promise | undefined;\n\n private constructor(ref: PDFRef, doc: PDFDocument, embedder: ImageEmbedder) {\n assertIs(ref, 'ref', [[PDFRef, 'PDFRef']]);\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n assertIs(embedder, 'embedder', [\n [JpegEmbedder, 'JpegEmbedder'],\n [PngEmbedder, 'PngEmbedder'],\n ]);\n\n this.ref = ref;\n this.doc = doc;\n this.width = embedder.width;\n this.height = embedder.height;\n\n this.embedder = embedder;\n }\n\n /**\n * Compute the width and height of this image after being scaled by the\n * given `factor`. For example:\n * ```js\n * image.width // => 500\n * image.height // => 250\n *\n * const scaled = image.scale(0.5)\n * scaled.width // => 250\n * scaled.height // => 125\n * ```\n * This operation is often useful before drawing an image with\n * [[PDFPage.drawImage]] to compute the `width` and `height` options.\n * @param factor The factor by which this image should be scaled.\n * @returns The width and height of the image after being scaled.\n */\n scale(factor: number) {\n assertIs(factor, 'factor', ['number']);\n return { width: this.width * factor, height: this.height * factor };\n }\n\n /**\n * Get the width and height of this image after scaling it as large as\n * possible while maintaining its aspect ratio and not exceeding the\n * specified `width` and `height`. For example:\n * ```\n * image.width // => 500\n * image.height // => 250\n *\n * const scaled = image.scaleToFit(750, 1000)\n * scaled.width // => 750\n * scaled.height // => 375\n * ```\n * The `width` and `height` parameters can also be thought of as the width\n * and height of a box that the scaled image must fit within.\n * @param width The bounding box's width.\n * @param height The bounding box's height.\n * @returns The width and height of the image after being scaled.\n */\n scaleToFit(width: number, height: number) {\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n\n const imgWidthScale = width / this.width;\n const imgHeightScale = height / this.height;\n const scale = Math.min(imgWidthScale, imgHeightScale);\n\n return this.scale(scale);\n }\n\n /**\n * Get the width and height of this image. For example:\n * ```js\n * const { width, height } = image.size()\n * ```\n * @returns The width and height of the image.\n */\n size() {\n return this.scale(1);\n }\n\n /**\n * > **NOTE:** You probably don't need to call this method directly. The\n * > [[PDFDocument.save]] and [[PDFDocument.saveAsBase64]] methods will\n * > automatically ensure all images get embedded.\n *\n * Embed this image in its document.\n *\n * @returns Resolves when the embedding is complete.\n */\n async embed(): Promise {\n if (!this.embedder) return;\n\n // The image should only be embedded once. If there's a pending embed\n // operation then wait on it. Otherwise we need to start the embed.\n if (!this.embedTask) {\n const { doc, ref } = this;\n this.embedTask = this.embedder.embedIntoContext(doc.context, ref);\n }\n await this.embedTask;\n\n // We clear `this.embedder` so that the indirectly referenced image data\n // can be garbage collected, thus avoiding a memory leak.\n // See https://github.com/Hopding/pdf-lib/pull/1032/files.\n this.embedder = undefined;\n }\n}\n","export enum ImageAlignment {\n Left = 0,\n Center = 1,\n Right = 2,\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFFont from 'src/api/PDFFont';\nimport { AppearanceMapping } from 'src/api/form/appearances';\nimport { Color, colorToComponents, setFillingColor } from 'src/api/colors';\nimport {\n Rotation,\n toDegrees,\n rotateRectangle,\n reduceRotation,\n adjustDimsForRotation,\n degrees,\n} from 'src/api/rotations';\n\nimport {\n PDFRef,\n PDFWidgetAnnotation,\n PDFOperator,\n PDFName,\n PDFDict,\n MethodNotImplementedError,\n AcroFieldFlags,\n PDFAcroTerminal,\n AnnotationFlags,\n} from 'src/core';\nimport { assertIs, assertMultiple, assertOrUndefined } from 'src/utils';\nimport { ImageAlignment } from '../image';\nimport PDFImage from '../PDFImage';\nimport { drawImage, rotateInPlace } from '../operations';\n\nexport interface FieldAppearanceOptions {\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n textColor?: Color;\n backgroundColor?: Color;\n borderColor?: Color;\n borderWidth?: number;\n rotate?: Rotation;\n font?: PDFFont;\n hidden?: boolean;\n}\n\nexport const assertFieldAppearanceOptions = (\n options?: FieldAppearanceOptions,\n) => {\n assertOrUndefined(options?.x, 'options.x', ['number']);\n assertOrUndefined(options?.y, 'options.y', ['number']);\n assertOrUndefined(options?.width, 'options.width', ['number']);\n assertOrUndefined(options?.height, 'options.height', ['number']);\n assertOrUndefined(options?.textColor, 'options.textColor', [\n [Object, 'Color'],\n ]);\n assertOrUndefined(options?.backgroundColor, 'options.backgroundColor', [\n [Object, 'Color'],\n ]);\n assertOrUndefined(options?.borderColor, 'options.borderColor', [\n [Object, 'Color'],\n ]);\n assertOrUndefined(options?.borderWidth, 'options.borderWidth', ['number']);\n assertOrUndefined(options?.rotate, 'options.rotate', [[Object, 'Rotation']]);\n};\n\n/**\n * Represents a field of a [[PDFForm]].\n *\n * This class is effectively abstract. All fields in a [[PDFForm]] will\n * actually be an instance of a subclass of this class.\n *\n * Note that each field in a PDF is represented by a single field object.\n * However, a given field object may be rendered at multiple locations within\n * the document (across one or more pages). The rendering of a field is\n * controlled by its widgets. Each widget causes its field to be displayed at a\n * particular location in the document.\n *\n * Most of the time each field in a PDF has only a single widget, and thus is\n * only rendered once. However, if a field is rendered multiple times, it will\n * have multiple widgets - one for each location it is rendered.\n *\n * This abstraction of field objects and widgets is defined in the PDF\n * specification and dictates how PDF files store fields and where they are\n * to be rendered.\n */\nexport default class PDFField {\n /** The low-level PDFAcroTerminal wrapped by this field. */\n readonly acroField: PDFAcroTerminal;\n\n /** The unique reference assigned to this field within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this field belongs. */\n readonly doc: PDFDocument;\n\n protected constructor(\n acroField: PDFAcroTerminal,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n assertIs(acroField, 'acroField', [[PDFAcroTerminal, 'PDFAcroTerminal']]);\n assertIs(ref, 'ref', [[PDFRef, 'PDFRef']]);\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n\n this.acroField = acroField;\n this.ref = ref;\n this.doc = doc;\n }\n\n /**\n * Get the fully qualified name of this field. For example:\n * ```js\n * const fields = form.getFields()\n * fields.forEach(field => {\n * const name = field.getName()\n * console.log('Field name:', name)\n * })\n * ```\n * Note that PDF fields are structured as a tree. Each field is the\n * descendent of a series of ancestor nodes all the way up to the form node,\n * which is always the root of the tree. Each node in the tree (except for\n * the form node) has a partial name. Partial names can be composed of any\n * unicode characters except a period (`.`). The fully qualified name of a\n * field is composed of the partial names of all its ancestors joined\n * with periods. This means that splitting the fully qualified name on\n * periods and taking the last element of the resulting array will give you\n * the partial name of a specific field.\n * @returns The fully qualified name of this field.\n */\n getName(): string {\n return this.acroField.getFullyQualifiedName() ?? '';\n }\n\n /**\n * Returns `true` if this field is read only. This means that PDF readers\n * will not allow users to interact with the field or change its value. See\n * [[PDFField.enableReadOnly]] and [[PDFField.disableReadOnly]].\n * For example:\n * ```js\n * const field = form.getField('some.field')\n * if (field.isReadOnly()) console.log('Read only is enabled')\n * ```\n * @returns Whether or not this is a read only field.\n */\n isReadOnly(): boolean {\n return this.acroField.hasFlag(AcroFieldFlags.ReadOnly);\n }\n\n /**\n * Prevent PDF readers from allowing users to interact with this field or\n * change its value. The field will not respond to mouse or keyboard input.\n * For example:\n * ```js\n * const field = form.getField('some.field')\n * field.enableReadOnly()\n * ```\n * Useful for fields whose values are computed, imported from a database, or\n * prefilled by software before being displayed to the user.\n */\n enableReadOnly() {\n this.acroField.setFlagTo(AcroFieldFlags.ReadOnly, true);\n }\n\n /**\n * Allow users to interact with this field and change its value in PDF\n * readers via mouse and keyboard input. For example:\n * ```js\n * const field = form.getField('some.field')\n * field.disableReadOnly()\n * ```\n */\n disableReadOnly() {\n this.acroField.setFlagTo(AcroFieldFlags.ReadOnly, false);\n }\n\n /**\n * Returns `true` if this field must have a value when the form is submitted.\n * See [[PDFField.enableRequired]] and [[PDFField.disableRequired]].\n * For example:\n * ```js\n * const field = form.getField('some.field')\n * if (field.isRequired()) console.log('Field is required')\n * ```\n * @returns Whether or not this field is required.\n */\n isRequired(): boolean {\n return this.acroField.hasFlag(AcroFieldFlags.Required);\n }\n\n /**\n * Require this field to have a value when the form is submitted.\n * For example:\n * ```js\n * const field = form.getField('some.field')\n * field.enableRequired()\n * ```\n */\n enableRequired() {\n this.acroField.setFlagTo(AcroFieldFlags.Required, true);\n }\n\n /**\n * Do not require this field to have a value when the form is submitted.\n * For example:\n * ```js\n * const field = form.getField('some.field')\n * field.disableRequired()\n * ```\n */\n disableRequired() {\n this.acroField.setFlagTo(AcroFieldFlags.Required, false);\n }\n\n /**\n * Returns `true` if this field's value should be exported when the form is\n * submitted. See [[PDFField.enableExporting]] and\n * [[PDFField.disableExporting]].\n * For example:\n * ```js\n * const field = form.getField('some.field')\n * if (field.isExported()) console.log('Exporting is enabled')\n * ```\n * @returns Whether or not this field's value should be exported.\n */\n isExported(): boolean {\n return !this.acroField.hasFlag(AcroFieldFlags.NoExport);\n }\n\n /**\n * Indicate that this field's value should be exported when the form is\n * submitted in a PDF reader. For example:\n * ```js\n * const field = form.getField('some.field')\n * field.enableExporting()\n * ```\n */\n enableExporting() {\n this.acroField.setFlagTo(AcroFieldFlags.NoExport, false);\n }\n\n /**\n * Indicate that this field's value should **not** be exported when the form\n * is submitted in a PDF reader. For example:\n * ```js\n * const field = form.getField('some.field')\n * field.disableExporting()\n * ```\n */\n disableExporting() {\n this.acroField.setFlagTo(AcroFieldFlags.NoExport, true);\n }\n\n /** @ignore */\n needsAppearancesUpdate(): boolean {\n throw new MethodNotImplementedError(\n this.constructor.name,\n 'needsAppearancesUpdate',\n );\n }\n\n /** @ignore */\n defaultUpdateAppearances(_font: PDFFont) {\n throw new MethodNotImplementedError(\n this.constructor.name,\n 'defaultUpdateAppearances',\n );\n }\n\n protected markAsDirty() {\n this.doc.getForm().markFieldAsDirty(this.ref);\n }\n\n protected markAsClean() {\n this.doc.getForm().markFieldAsClean(this.ref);\n }\n\n protected isDirty(): boolean {\n return this.doc.getForm().fieldIsDirty(this.ref);\n }\n\n protected createWidget(options: {\n x: number;\n y: number;\n width: number;\n height: number;\n textColor?: Color;\n backgroundColor?: Color;\n borderColor?: Color;\n borderWidth: number;\n rotate: Rotation;\n caption?: string;\n hidden?: boolean;\n page?: PDFRef;\n }): PDFWidgetAnnotation {\n const textColor = options.textColor;\n const backgroundColor = options.backgroundColor;\n const borderColor = options.borderColor;\n const borderWidth = options.borderWidth;\n const degreesAngle = toDegrees(options.rotate);\n const caption = options.caption;\n const x = options.x;\n const y = options.y;\n const width = options.width + borderWidth;\n const height = options.height + borderWidth;\n const hidden = Boolean(options.hidden);\n const pageRef = options.page;\n\n assertMultiple(degreesAngle, 'degreesAngle', 90);\n\n // Create a widget for this field\n const widget = PDFWidgetAnnotation.create(this.doc.context, this.ref);\n\n // Set widget properties\n const rect = rotateRectangle(\n { x, y, width, height },\n borderWidth,\n degreesAngle,\n );\n widget.setRectangle(rect);\n\n if (pageRef) widget.setP(pageRef);\n\n const ac = widget.getOrCreateAppearanceCharacteristics();\n if (backgroundColor) {\n ac.setBackgroundColor(colorToComponents(backgroundColor));\n }\n ac.setRotation(degreesAngle);\n if (caption) ac.setCaptions({ normal: caption });\n if (borderColor) ac.setBorderColor(colorToComponents(borderColor));\n\n const bs = widget.getOrCreateBorderStyle();\n if (borderWidth !== undefined) bs.setWidth(borderWidth);\n\n widget.setFlagTo(AnnotationFlags.Print, true);\n widget.setFlagTo(AnnotationFlags.Hidden, hidden);\n widget.setFlagTo(AnnotationFlags.Invisible, false);\n\n // Set acrofield properties\n if (textColor) {\n const da = this.acroField.getDefaultAppearance() ?? '';\n const newDa = da + '\\n' + setFillingColor(textColor).toString();\n this.acroField.setDefaultAppearance(newDa);\n }\n\n return widget;\n }\n\n protected updateWidgetAppearanceWithFont(\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n { normal, rollover, down }: AppearanceMapping,\n ) {\n this.updateWidgetAppearances(widget, {\n normal: this.createAppearanceStream(widget, normal, font),\n rollover: rollover && this.createAppearanceStream(widget, rollover, font),\n down: down && this.createAppearanceStream(widget, down, font),\n });\n }\n\n protected updateOnOffWidgetAppearance(\n widget: PDFWidgetAnnotation,\n onValue: PDFName,\n {\n normal,\n rollover,\n down,\n }: AppearanceMapping<{ on: PDFOperator[]; off: PDFOperator[] }>,\n ) {\n this.updateWidgetAppearances(widget, {\n normal: this.createAppearanceDict(widget, normal, onValue),\n rollover:\n rollover && this.createAppearanceDict(widget, rollover, onValue),\n down: down && this.createAppearanceDict(widget, down, onValue),\n });\n }\n\n protected updateWidgetAppearances(\n widget: PDFWidgetAnnotation,\n { normal, rollover, down }: AppearanceMapping,\n ) {\n widget.setNormalAppearance(normal);\n\n if (rollover) {\n widget.setRolloverAppearance(rollover);\n } else {\n widget.removeRolloverAppearance();\n }\n\n if (down) {\n widget.setDownAppearance(down);\n } else {\n widget.removeDownAppearance();\n }\n }\n\n // // TODO: Do we need to do this...?\n // private foo(font: PDFFont, dict: PDFDict) {\n // if (!dict.lookup(PDFName.of('DR'))) {\n // dict.set(PDFName.of('DR'), dict.context.obj({}));\n // }\n // const DR = dict.lookup(PDFName.of('DR'), PDFDict);\n\n // if (!DR.lookup(PDFName.of('Font'))) {\n // DR.set(PDFName.of('Font'), dict.context.obj({}));\n // }\n // const Font = DR.lookup(PDFName.of('Font'), PDFDict);\n\n // Font.set(PDFName.of(font.name), font.ref);\n // }\n\n private createAppearanceStream(\n widget: PDFWidgetAnnotation,\n appearance: PDFOperator[],\n font?: PDFFont,\n ): PDFRef {\n const { context } = this.acroField.dict;\n const { width, height } = widget.getRectangle();\n\n // TODO: Do we need to do this...?\n // if (font) {\n // this.foo(font, widget.dict);\n // this.foo(font, this.doc.getForm().acroForm.dict);\n // }\n // END TODO\n\n const Resources = font && { Font: { [font.name]: font.ref } };\n const stream = context.formXObject(appearance, {\n Resources,\n BBox: context.obj([0, 0, width, height]),\n Matrix: context.obj([1, 0, 0, 1, 0, 0]),\n });\n const streamRef = context.register(stream);\n\n return streamRef;\n }\n\n /**\n * Create a FormXObject of the supplied image and add it to context.\n * The FormXObject size is calculated based on the widget (including\n * the alignment).\n * @param widget The widget that should display the image.\n * @param alignment The alignment of the image.\n * @param image The image that should be displayed.\n * @returns The ref for the FormXObject that was added to the context.\n */\n protected createImageAppearanceStream(\n widget: PDFWidgetAnnotation,\n image: PDFImage,\n alignment: ImageAlignment,\n ): PDFRef {\n // NOTE: This implementation doesn't handle image borders.\n // NOTE: Acrobat seems to resize the image (maybe even skewing its aspect\n // ratio) to fit perfectly within the widget's rectangle. This method\n // does not currently do that. Should there be an option for that?\n\n const { context } = this.acroField.dict;\n\n const rectangle = widget.getRectangle();\n const ap = widget.getAppearanceCharacteristics();\n const bs = widget.getBorderStyle();\n\n const borderWidth = bs?.getWidth() ?? 0;\n const rotation = reduceRotation(ap?.getRotation());\n\n const rotate = rotateInPlace({ ...rectangle, rotation });\n\n const adj = adjustDimsForRotation(rectangle, rotation);\n const imageDims = image.scaleToFit(\n adj.width - borderWidth * 2,\n adj.height - borderWidth * 2,\n );\n\n // Support borders on images and maybe other properties\n const options = {\n x: borderWidth,\n y: borderWidth,\n width: imageDims.width,\n height: imageDims.height,\n //\n rotate: degrees(0),\n xSkew: degrees(0),\n ySkew: degrees(0),\n };\n\n if (alignment === ImageAlignment.Center) {\n options.x += (adj.width - borderWidth * 2) / 2 - imageDims.width / 2;\n options.y += (adj.height - borderWidth * 2) / 2 - imageDims.height / 2;\n } else if (alignment === ImageAlignment.Right) {\n options.x = adj.width - borderWidth - imageDims.width;\n options.y = adj.height - borderWidth - imageDims.height;\n }\n\n const imageName = this.doc.context.addRandomSuffix('Image', 10);\n const appearance = [...rotate, ...drawImage(imageName, options)];\n ////////////\n\n const Resources = { XObject: { [imageName]: image.ref } };\n const stream = context.formXObject(appearance, {\n Resources,\n BBox: context.obj([0, 0, rectangle.width, rectangle.height]),\n Matrix: context.obj([1, 0, 0, 1, 0, 0]),\n });\n\n return context.register(stream);\n }\n\n private createAppearanceDict(\n widget: PDFWidgetAnnotation,\n appearance: { on: PDFOperator[]; off: PDFOperator[] },\n onValue: PDFName,\n ): PDFDict {\n const { context } = this.acroField.dict;\n\n const onStreamRef = this.createAppearanceStream(widget, appearance.on);\n const offStreamRef = this.createAppearanceStream(widget, appearance.off);\n\n const appearanceDict = context.obj({});\n appearanceDict.set(onValue, onStreamRef);\n appearanceDict.set(PDFName.of('Off'), offStreamRef);\n\n return appearanceDict;\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport {\n AppearanceProviderFor,\n normalizeAppearance,\n defaultCheckBoxAppearanceProvider,\n} from 'src/api/form/appearances';\nimport { rgb } from 'src/api/colors';\nimport { degrees } from 'src/api/rotations';\nimport PDFField, {\n FieldAppearanceOptions,\n assertFieldAppearanceOptions,\n} from 'src/api/form/PDFField';\n\nimport {\n PDFName,\n PDFRef,\n PDFDict,\n PDFAcroCheckBox,\n PDFWidgetAnnotation,\n} from 'src/core';\nimport { assertIs, assertOrUndefined } from 'src/utils';\n\n/**\n * Represents a check box field of a [[PDFForm]].\n *\n * [[PDFCheckBox]] fields are interactive boxes that users can click with their\n * mouse. This type of [[PDFField]] has two states: `on` and `off`. The purpose\n * of a check box is to enable users to select from one or more options, where\n * each option is represented by a single check box. Check boxes are typically\n * square in shape and display a check mark when they are in the `on` state.\n */\nexport default class PDFCheckBox extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getCheckBox]] method, which will create an\n * > instance of [[PDFCheckBox]] for you.\n *\n * Create an instance of [[PDFCheckBox]] from an existing acroCheckBox and ref\n *\n * @param acroCheckBox The underlying `PDFAcroCheckBox` for this check box.\n * @param ref The unique reference for this check box.\n * @param doc The document to which this check box will belong.\n */\n static of = (acroCheckBox: PDFAcroCheckBox, ref: PDFRef, doc: PDFDocument) =>\n new PDFCheckBox(acroCheckBox, ref, doc);\n\n /** The low-level PDFAcroCheckBox wrapped by this check box. */\n readonly acroField: PDFAcroCheckBox;\n\n private constructor(\n acroCheckBox: PDFAcroCheckBox,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n super(acroCheckBox, ref, doc);\n\n assertIs(acroCheckBox, 'acroCheckBox', [\n [PDFAcroCheckBox, 'PDFAcroCheckBox'],\n ]);\n\n this.acroField = acroCheckBox;\n }\n\n /**\n * Mark this check box. This operation is analogous to a human user clicking\n * a check box to fill it in a PDF reader. This method will update the\n * underlying state of the check box field to indicate it has been selected.\n * PDF libraries and readers will be able to extract this value from the\n * saved document and determine that it was selected.\n *\n * For example:\n * ```js\n * const checkBox = form.getCheckBox('some.checkBox.field')\n * checkBox.check()\n * ```\n *\n * This method will mark this check box as dirty, causing its appearance\n * streams to be updated when either [[PDFDocument.save]] or\n * [[PDFForm.updateFieldAppearances]] is called. The updated appearance\n * streams will display a check mark inside the widgets of this check box\n * field.\n */\n check() {\n const onValue = this.acroField.getOnValue() ?? PDFName.of('Yes');\n this.markAsDirty();\n this.acroField.setValue(onValue);\n }\n\n /**\n * Clears this check box. This operation is analogous to a human user clicking\n * a check box to unmark it in a PDF reader. This method will update the\n * underlying state of the check box field to indicate it has been deselected.\n * PDF libraries and readers will be able to extract this value from the\n * saved document and determine that it was not selected.\n *\n * For example:\n * ```js\n * const checkBox = form.getCheckBox('some.checkBox.field')\n * checkBox.uncheck()\n * ```\n *\n * This method will mark this check box as dirty. See [[PDFCheckBox.check]]\n * for more details about what this means.\n */\n uncheck() {\n this.markAsDirty();\n this.acroField.setValue(PDFName.of('Off'));\n }\n\n /**\n * Returns `true` if this check box is selected (either by a human user via\n * a PDF reader, or else programmatically via software). For example:\n * ```js\n * const checkBox = form.getCheckBox('some.checkBox.field')\n * if (checkBox.isChecked()) console.log('check box is selected')\n * ```\n * @returns Whether or not this check box is selected.\n */\n isChecked(): boolean {\n const onValue = this.acroField.getOnValue();\n return !!onValue && onValue === this.acroField.getValue();\n }\n\n /**\n * Show this check box on the specified page. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const checkBox = form.createCheckBox('some.checkBox.field')\n *\n * checkBox.addToPage(page, {\n * x: 50,\n * y: 75,\n * width: 25,\n * height: 25,\n * textColor: rgb(1, 0, 0),\n * backgroundColor: rgb(0, 1, 0),\n * borderColor: rgb(0, 0, 1),\n * borderWidth: 2,\n * rotate: degrees(90),\n * })\n * ```\n * This will create a new widget for this check box field.\n * @param page The page to which this check box widget should be added.\n * @param options The options to be used when adding this check box widget.\n */\n addToPage(page: PDFPage, options?: FieldAppearanceOptions) {\n assertIs(page, 'page', [[PDFPage, 'PDFPage']]);\n assertFieldAppearanceOptions(options);\n\n if (!options) options = {};\n\n if (!('textColor' in options)) options.textColor = rgb(0, 0, 0);\n if (!('backgroundColor' in options)) options.backgroundColor = rgb(1, 1, 1);\n if (!('borderColor' in options)) options.borderColor = rgb(0, 0, 0);\n if (!('borderWidth' in options)) options.borderWidth = 1;\n\n // Create a widget for this check box\n const widget = this.createWidget({\n x: options.x ?? 0,\n y: options.y ?? 0,\n width: options.width ?? 50,\n height: options.height ?? 50,\n textColor: options.textColor,\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth ?? 0,\n rotate: options.rotate ?? degrees(0),\n hidden: options.hidden,\n page: page.ref,\n });\n const widgetRef = this.doc.context.register(widget.dict);\n\n // Add widget to this field\n this.acroField.addWidget(widgetRef);\n\n // Set appearance streams for widget\n widget.setAppearanceState(PDFName.of('Off'));\n this.updateWidgetAppearance(widget, PDFName.of('Yes'));\n\n // Add widget to the given page\n page.node.addAnnot(widgetRef);\n }\n\n /**\n * Returns `true` if any of this check box's widgets do not have an\n * appearance stream for its current state. For example:\n * ```js\n * const checkBox = form.getCheckBox('some.checkBox.field')\n * if (checkBox.needsAppearancesUpdate()) console.log('Needs update')\n * ```\n * @returns Whether or not this check box needs an appearance update.\n */\n needsAppearancesUpdate(): boolean {\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const state = widget.getAppearanceState();\n const normal = widget.getAppearances()?.normal;\n\n if (!(normal instanceof PDFDict)) return true;\n if (state && !normal.has(state)) return true;\n }\n\n return false;\n }\n\n /**\n * Update the appearance streams for each of this check box's widgets using\n * the default appearance provider for check boxes. For example:\n * ```js\n * const checkBox = form.getCheckBox('some.checkBox.field')\n * checkBox.defaultUpdateAppearances()\n * ```\n */\n defaultUpdateAppearances() {\n this.updateAppearances();\n }\n\n /**\n * Update the appearance streams for each of this check box's widgets using\n * the given appearance provider. If no `provider` is passed, the default\n * appearance provider for check boxs will be used. For example:\n * ```js\n * const checkBox = form.getCheckBox('some.checkBox.field')\n * checkBox.updateAppearances((field, widget) => {\n * ...\n * return {\n * normal: { on: drawCheckBox(...), off: drawCheckBox(...) },\n * down: { on: drawCheckBox(...), off: drawCheckBox(...) },\n * }\n * })\n * ```\n * @param provider Optionally, the appearance provider to be used for\n * generating the contents of the appearance streams.\n */\n updateAppearances(provider?: AppearanceProviderFor) {\n assertOrUndefined(provider, 'provider', [Function]);\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const onValue = widget.getOnValue() ?? PDFName.of('Yes');\n if (!onValue) continue;\n this.updateWidgetAppearance(widget, onValue, provider);\n }\n this.markAsClean();\n }\n\n private updateWidgetAppearance(\n widget: PDFWidgetAnnotation,\n onValue: PDFName,\n provider?: AppearanceProviderFor,\n ) {\n const apProvider = provider ?? defaultCheckBoxAppearanceProvider;\n const appearances = normalizeAppearance(apProvider(this, widget));\n this.updateOnOffWidgetAppearance(widget, onValue, appearances);\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFField, {\n FieldAppearanceOptions,\n assertFieldAppearanceOptions,\n} from 'src/api/form/PDFField';\nimport {\n AppearanceProviderFor,\n normalizeAppearance,\n defaultDropdownAppearanceProvider,\n} from 'src/api/form/appearances';\nimport { rgb } from 'src/api/colors';\nimport { degrees } from 'src/api/rotations';\n\nimport {\n PDFHexString,\n PDFRef,\n PDFString,\n PDFStream,\n PDFWidgetAnnotation,\n PDFAcroComboBox,\n AcroChoiceFlags,\n} from 'src/core';\nimport { assertIs, assertOrUndefined, assertPositive } from 'src/utils';\n\n/**\n * Represents a dropdown field of a [[PDFForm]].\n *\n * [[PDFDropdown]] fields are interactive text boxes that display a single\n * element (the currently selected value). The purpose of a dropdown is to\n * enable users to select a single option from a set of possible options. Users\n * can click on a dropdown to view the full list of options it provides.\n * Clicking on an option in the list will cause it to be selected and displayed\n * in the dropdown's text box. Some dropdowns allow users to enter text\n * directly into the box from their keyboard, rather than only being allowed to\n * choose an option from the list (see [[PDFDropdown.isEditable]]).\n */\nexport default class PDFDropdown extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getDropdown]] method, which will create an\n * > instance of [[PDFDropdown]] for you.\n *\n * Create an instance of [[PDFDropdown]] from an existing acroComboBox and ref\n *\n * @param acroComboBox The underlying `PDFAcroComboBox` for this dropdown.\n * @param ref The unique reference for this dropdown.\n * @param doc The document to which this dropdown will belong.\n */\n static of = (acroComboBox: PDFAcroComboBox, ref: PDFRef, doc: PDFDocument) =>\n new PDFDropdown(acroComboBox, ref, doc);\n\n /** The low-level PDFAcroComboBox wrapped by this dropdown. */\n readonly acroField: PDFAcroComboBox;\n\n private constructor(\n acroComboBox: PDFAcroComboBox,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n super(acroComboBox, ref, doc);\n\n assertIs(acroComboBox, 'acroComboBox', [\n [PDFAcroComboBox, 'PDFAcroComboBox'],\n ]);\n\n this.acroField = acroComboBox;\n }\n\n /**\n * Get the list of available options for this dropdown. These options will be\n * displayed to users who click on this dropdown in a PDF reader.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * const options = dropdown.getOptions()\n * console.log('Dropdown options:', options)\n * ```\n * @returns The options for this dropdown.\n */\n getOptions(): string[] {\n const rawOptions = this.acroField.getOptions();\n\n const options = new Array(rawOptions.length);\n for (let idx = 0, len = options.length; idx < len; idx++) {\n const { display, value } = rawOptions[idx];\n options[idx] = (display ?? value).decodeText();\n }\n\n return options;\n }\n\n /**\n * Get the selected options for this dropdown. These are the values that were\n * selected by a human user via a PDF reader, or programatically via\n * software.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * const selections = dropdown.getSelected()\n * console.log('Dropdown selections:', selections)\n * ```\n * > **NOTE:** Note that PDF readers only display one selected option when\n * > rendering dropdowns. However, the PDF specification does allow for\n * > multiple values to be selected in a dropdown. As such, the `pdf-lib`\n * > API supports this. However, in most cases the array returned by this\n * > method will contain only a single element (or no elements).\n * @returns The selected options in this dropdown.\n */\n getSelected(): string[] {\n const values = this.acroField.getValues();\n\n const selected = new Array(values.length);\n for (let idx = 0, len = values.length; idx < len; idx++) {\n selected[idx] = values[idx].decodeText();\n }\n\n return selected;\n }\n\n /**\n * Set the list of options that are available for this dropdown. These are\n * the values that will be available for users to select when they view this\n * dropdown in a PDF reader. Note that preexisting options for this dropdown\n * will be removed. Only the values passed as `options` will be available to\n * select.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('planets.dropdown')\n * dropdown.setOptions(['Earth', 'Mars', 'Pluto', 'Venus'])\n * ```\n * @param options The options that should be available in this dropdown.\n */\n setOptions(options: string[]) {\n assertIs(options, 'options', [Array]);\n\n const optionObjects = new Array<{ value: PDFHexString }>(options.length);\n for (let idx = 0, len = options.length; idx < len; idx++) {\n optionObjects[idx] = { value: PDFHexString.fromText(options[idx]) };\n }\n this.acroField.setOptions(optionObjects);\n }\n\n /**\n * Add to the list of options that are available for this dropdown. Users\n * will be able to select these values in a PDF reader. In addition to the\n * values passed as `options`, any preexisting options for this dropdown will\n * still be available for users to select.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('rockets.dropdown')\n * dropdown.addOptions(['Saturn IV', 'Falcon Heavy'])\n * ```\n * @param options New options that should be available in this dropdown.\n */\n addOptions(options: string | string[]) {\n assertIs(options, 'options', ['string', Array]);\n\n const optionsArr = Array.isArray(options) ? options : [options];\n\n const existingOptions: {\n value: PDFString | PDFHexString;\n display?: PDFString | PDFHexString;\n }[] = this.acroField.getOptions();\n\n const newOptions = new Array<{ value: PDFHexString }>(optionsArr.length);\n for (let idx = 0, len = optionsArr.length; idx < len; idx++) {\n newOptions[idx] = { value: PDFHexString.fromText(optionsArr[idx]) };\n }\n\n this.acroField.setOptions(existingOptions.concat(newOptions));\n }\n\n /**\n * Select one or more values for this dropdown. This operation is analogous\n * to a human user opening the dropdown in a PDF reader and clicking on a\n * value to select it. This method will update the underlying state of the\n * dropdown to indicate which values have been selected. PDF libraries and\n * readers will be able to extract these values from the saved document and\n * determine which values were selected.\n *\n * For example:\n * ```js\n * const dropdown = form.getDropdown('best.superhero.dropdown')\n * dropdown.select('One Punch Man')\n * ```\n *\n * This method will mark this dropdown as dirty, causing its appearance\n * streams to be updated when either [[PDFDocument.save]] or\n * [[PDFForm.updateFieldAppearances]] is called. The updated streams will\n * display the selected option inside the widgets of this dropdown.\n *\n * **IMPORTANT:** The default font used to update appearance streams is\n * [[StandardFonts.Helvetica]]. Note that this is a WinAnsi font. This means\n * that encoding errors will be thrown if the selected option for this field\n * contains characters outside the WinAnsi character set (the latin alphabet).\n *\n * Embedding a custom font and passing it to\n * [[PDFForm.updateFieldAppearances]] or [[PDFDropdown.updateAppearances]]\n * allows you to generate appearance streams with characters outside the\n * latin alphabet (assuming the custom font supports them).\n *\n * Selecting an option that does not exist in this dropdown's option list\n * (see [[PDFDropdown.getOptions]]) will enable editing on this dropdown\n * (see [[PDFDropdown.enableEditing]]).\n *\n * > **NOTE:** PDF readers only display one selected option when rendering\n * > dropdowns. However, the PDF specification does allow for multiple values\n * > to be selected in a dropdown. As such, the `pdf-lib` API supports this.\n * > However, it is not recommended to select more than one value with this\n * > method, as only one will be visible. [[PDFOptionList]] fields are better\n * > suited for displaying multiple selected values.\n *\n * @param options The options to be selected.\n * @param merge Whether or not existing selections should be preserved.\n */\n select(options: string | string[], merge = false) {\n assertIs(options, 'options', ['string', Array]);\n assertIs(merge, 'merge', ['boolean']);\n\n const optionsArr = Array.isArray(options) ? options : [options];\n\n const validOptions = this.getOptions();\n const hasCustomOption = optionsArr.find(\n (option) => !validOptions.includes(option),\n );\n if (hasCustomOption) this.enableEditing();\n\n this.markAsDirty();\n\n if (optionsArr.length > 1 || (optionsArr.length === 1 && merge)) {\n this.enableMultiselect();\n }\n\n const values = new Array(optionsArr.length);\n for (let idx = 0, len = optionsArr.length; idx < len; idx++) {\n values[idx] = PDFHexString.fromText(optionsArr[idx]);\n }\n\n if (merge) {\n const existingValues = this.acroField.getValues();\n this.acroField.setValues(existingValues.concat(values));\n } else {\n this.acroField.setValues(values);\n }\n }\n\n /**\n * Clear all selected values for this dropdown. This operation is equivalent\n * to selecting an empty list. This method will update the underlying state\n * of the dropdown to indicate that no values have been selected.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.clear()\n * ```\n * This method will mark this text field as dirty. See [[PDFDropdown.select]]\n * for more details about what this means.\n */\n clear() {\n this.markAsDirty();\n this.acroField.setValues([]);\n }\n\n /**\n * Set the font size for this field. Larger font sizes will result in larger\n * text being displayed when PDF readers render this dropdown. Font sizes may\n * be integer or floating point numbers. Supplying a negative font size will\n * cause this method to throw an error.\n *\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.setFontSize(4)\n * dropdown.setFontSize(15.7)\n * ```\n *\n * > This method depends upon the existence of a default appearance\n * > (`/DA`) string. If this field does not have a default appearance string,\n * > or that string does not contain a font size (via the `Tf` operator),\n * > then this method will throw an error.\n *\n * @param fontSize The font size to be used when rendering text in this field.\n */\n setFontSize(fontSize: number) {\n assertPositive(fontSize, 'fontSize');\n this.acroField.setFontSize(fontSize);\n this.markAsDirty();\n }\n\n /**\n * Returns `true` if users are allowed to edit the selected value of this\n * dropdown directly and are not constrained by the list of available\n * options. See [[PDFDropdown.enableEditing]] and\n * [[PDFDropdown.disableEditing]]. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * if (dropdown.isEditable()) console.log('Editing is enabled')\n * ```\n * @returns Whether or not this dropdown is editable.\n */\n isEditable(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.Edit);\n }\n\n /**\n * Allow users to edit the selected value of this dropdown in PDF readers\n * with their keyboard. This means that the selected value of this dropdown\n * will not be constrained by the list of available options. However, if this\n * dropdown has any available options, users will still be allowed to select\n * from that list.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.enableEditing()\n * ```\n */\n enableEditing() {\n this.acroField.setFlagTo(AcroChoiceFlags.Edit, true);\n }\n\n /**\n * Do not allow users to edit the selected value of this dropdown in PDF\n * readers with their keyboard. This will constrain the selected value of\n * this dropdown to the list of available options. Users will only be able\n * to select an option from that list.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.disableEditing()\n * ```\n */\n disableEditing() {\n this.acroField.setFlagTo(AcroChoiceFlags.Edit, false);\n }\n\n /**\n * Returns `true` if the option list of this dropdown is always displayed\n * in alphabetical order, irrespective of the order in which the options\n * were added to the dropdown. See [[PDFDropdown.enableSorting]] and\n * [[PDFDropdown.disableSorting]]. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * if (dropdown.isSorted()) console.log('Sorting is enabled')\n * ```\n * @returns Whether or not this dropdown's options are sorted.\n */\n isSorted(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.Sort);\n }\n\n /**\n * Always display the option list of this dropdown in alphabetical order,\n * irrespective of the order in which the options were added to this dropdown.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.enableSorting()\n * ```\n */\n enableSorting() {\n this.acroField.setFlagTo(AcroChoiceFlags.Sort, true);\n }\n\n /**\n * Do not always display the option list of this dropdown in alphabetical\n * order. Instead, display the options in whichever order they were added\n * to the list. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.disableSorting()\n * ```\n */\n disableSorting() {\n this.acroField.setFlagTo(AcroChoiceFlags.Sort, false);\n }\n\n /**\n * Returns `true` if multiple options can be selected from this dropdown's\n * option list. See [[PDFDropdown.enableMultiselect]] and\n * [[PDFDropdown.disableMultiselect]]. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * if (dropdown.isMultiselect()) console.log('Multiselect is enabled')\n * ```\n * @returns Whether or not multiple options can be selected.\n */\n isMultiselect(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.MultiSelect);\n }\n\n /**\n * Allow users to select more than one option from this dropdown's option\n * list. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.enableMultiselect()\n * ```\n */\n enableMultiselect() {\n this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, true);\n }\n\n /**\n * Do not allow users to select more than one option from this dropdown's\n * option list. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.disableMultiselect()\n * ```\n */\n disableMultiselect() {\n this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, false);\n }\n\n /**\n * Returns `true` if the selected option should be spell checked by PDF\n * readers. Spell checking will only be performed if this dropdown allows\n * editing (see [[PDFDropdown.isEditable]]). See\n * [[PDFDropdown.enableSpellChecking]] and\n * [[PDFDropdown.disableSpellChecking]]. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * if (dropdown.isSpellChecked()) console.log('Spell checking is enabled')\n * ```\n * @returns Whether or not this dropdown can be spell checked.\n */\n isSpellChecked(): boolean {\n return !this.acroField.hasFlag(AcroChoiceFlags.DoNotSpellCheck);\n }\n\n /**\n * Allow PDF readers to spell check the selected option of this dropdown.\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.enableSpellChecking()\n * ```\n */\n enableSpellChecking() {\n this.acroField.setFlagTo(AcroChoiceFlags.DoNotSpellCheck, false);\n }\n\n /**\n * Do not allow PDF readers to spell check the selected option of this\n * dropdown. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.disableSpellChecking()\n * ```\n */\n disableSpellChecking() {\n this.acroField.setFlagTo(AcroChoiceFlags.DoNotSpellCheck, true);\n }\n\n /**\n * Returns `true` if the option selected by a user is stored, or \"committed\",\n * when the user clicks the option. The alternative is that the user's\n * selection is stored when the user leaves this dropdown field (by clicking\n * outside of it - on another field, for example). See\n * [[PDFDropdown.enableSelectOnClick]] and\n * [[PDFDropdown.disableSelectOnClick]]. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * if (dropdown.isSelectOnClick()) console.log('Select on click is enabled')\n * ```\n * @returns Whether or not options are selected immediately after they are\n * clicked.\n */\n isSelectOnClick(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.CommitOnSelChange);\n }\n\n /**\n * Store the option selected by a user immediately after the user clicks the\n * option. Do not wait for the user to leave this dropdown field (by clicking\n * outside of it - on another field, for example). For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.enableSelectOnClick()\n * ```\n */\n enableSelectOnClick() {\n this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, true);\n }\n\n /**\n * Wait to store the option selected by a user until they leave this dropdown\n * field (by clicking outside of it - on another field, for example).\n * For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.disableSelectOnClick()\n * ```\n */\n disableSelectOnClick() {\n this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, false);\n }\n\n /**\n * Show this dropdown on the specified page. For example:\n * ```js\n * const ubuntuFont = await pdfDoc.embedFont(ubuntuFontBytes)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const dropdown = form.createDropdown('best.gundam')\n * dropdown.setOptions(['Exia', 'Dynames'])\n * dropdown.select('Exia')\n *\n * dropdown.addToPage(page, {\n * x: 50,\n * y: 75,\n * width: 200,\n * height: 100,\n * textColor: rgb(1, 0, 0),\n * backgroundColor: rgb(0, 1, 0),\n * borderColor: rgb(0, 0, 1),\n * borderWidth: 2,\n * rotate: degrees(90),\n * font: ubuntuFont,\n * })\n * ```\n * This will create a new widget for this dropdown field.\n * @param page The page to which this dropdown widget should be added.\n * @param options The options to be used when adding this dropdown widget.\n */\n addToPage(page: PDFPage, options?: FieldAppearanceOptions) {\n assertIs(page, 'page', [[PDFPage, 'PDFPage']]);\n assertFieldAppearanceOptions(options);\n\n if (!options) options = {};\n\n if (!('textColor' in options)) options.textColor = rgb(0, 0, 0);\n if (!('backgroundColor' in options)) options.backgroundColor = rgb(1, 1, 1);\n if (!('borderColor' in options)) options.borderColor = rgb(0, 0, 0);\n if (!('borderWidth' in options)) options.borderWidth = 1;\n\n // Create a widget for this dropdown\n const widget = this.createWidget({\n x: options.x ?? 0,\n y: options.y ?? 0,\n width: options.width ?? 200,\n height: options.height ?? 50,\n textColor: options.textColor,\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth ?? 0,\n rotate: options.rotate ?? degrees(0),\n hidden: options.hidden,\n page: page.ref,\n });\n const widgetRef = this.doc.context.register(widget.dict);\n\n // Add widget to this field\n this.acroField.addWidget(widgetRef);\n\n // Set appearance streams for widget\n const font = options.font ?? this.doc.getForm().getDefaultFont();\n this.updateWidgetAppearance(widget, font);\n\n // Add widget to the given page\n page.node.addAnnot(widgetRef);\n }\n\n /**\n * Returns `true` if this dropdown has been marked as dirty, or if any of\n * this dropdown's widgets do not have an appearance stream. For example:\n * ```js\n * const dropdown = form.getDropdown('some.dropdown.field')\n * if (dropdown.needsAppearancesUpdate()) console.log('Needs update')\n * ```\n * @returns Whether or not this dropdown needs an appearance update.\n */\n needsAppearancesUpdate(): boolean {\n if (this.isDirty()) return true;\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const hasAppearances =\n widget.getAppearances()?.normal instanceof PDFStream;\n if (!hasAppearances) return true;\n }\n\n return false;\n }\n\n /**\n * Update the appearance streams for each of this dropdown's widgets using\n * the default appearance provider for dropdowns. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.defaultUpdateAppearances(helvetica)\n * ```\n * @param font The font to be used for creating the appearance streams.\n */\n defaultUpdateAppearances(font: PDFFont) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n this.updateAppearances(font);\n }\n\n /**\n * Update the appearance streams for each of this dropdown's widgets using\n * the given appearance provider. If no `provider` is passed, the default\n * appearance provider for dropdowns will be used. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const dropdown = form.getDropdown('some.dropdown.field')\n * dropdown.updateAppearances(helvetica, (field, widget, font) => {\n * ...\n * return drawTextField(...)\n * })\n * ```\n * @param font The font to be used for creating the appearance streams.\n * @param provider Optionally, the appearance provider to be used for\n * generating the contents of the appearance streams.\n */\n updateAppearances(\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n assertOrUndefined(provider, 'provider', [Function]);\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n this.updateWidgetAppearance(widget, font, provider);\n }\n this.markAsClean();\n }\n\n // getOption(index: number): string {}\n // getSelectedIndices(): number[] {}\n // removeOptions(option: string | string[]) {}\n // removeIndices(option: number[]) {}\n // deselect(options: string | string[]) {}\n // deselectIndices(optionIndices: number[]) {}\n\n private updateWidgetAppearance(\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n const apProvider = provider ?? defaultDropdownAppearanceProvider;\n const appearances = normalizeAppearance(apProvider(this, widget, font));\n this.updateWidgetAppearanceWithFont(widget, font, appearances);\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFField, {\n FieldAppearanceOptions,\n assertFieldAppearanceOptions,\n} from 'src/api/form/PDFField';\nimport {\n AppearanceProviderFor,\n normalizeAppearance,\n defaultOptionListAppearanceProvider,\n} from 'src/api/form/appearances';\nimport { rgb } from 'src/api/colors';\nimport { degrees } from 'src/api/rotations';\n\nimport {\n PDFRef,\n PDFHexString,\n PDFString,\n PDFStream,\n PDFAcroListBox,\n AcroChoiceFlags,\n PDFWidgetAnnotation,\n} from 'src/core';\nimport {\n assertIs,\n assertIsSubset,\n assertOrUndefined,\n assertPositive,\n} from 'src/utils';\n\n/**\n * Represents an option list field of a [[PDFForm]].\n *\n * [[PDFOptionList]] fields are interactive lists of options. The purpose of an\n * option list is to enable users to select one or more options from a set of\n * possible options. Users are able to see the full set of options without\n * first having to click on the field (though scrolling may be necessary).\n * Clicking an option in the list will cause it to be selected and displayed\n * with a highlighted background. Some option lists allow users to select\n * more than one option (see [[PDFOptionList.isMultiselect]]).\n */\nexport default class PDFOptionList extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getOptionList]] method, which will create\n * > an instance of [[PDFOptionList]] for you.\n *\n * Create an instance of [[PDFOptionList]] from an existing acroListBox and\n * ref\n *\n * @param acroComboBox The underlying `PDFAcroListBox` for this option list.\n * @param ref The unique reference for this option list.\n * @param doc The document to which this option list will belong.\n */\n static of = (acroListBox: PDFAcroListBox, ref: PDFRef, doc: PDFDocument) =>\n new PDFOptionList(acroListBox, ref, doc);\n\n /** The low-level PDFAcroListBox wrapped by this option list. */\n readonly acroField: PDFAcroListBox;\n\n private constructor(\n acroListBox: PDFAcroListBox,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n super(acroListBox, ref, doc);\n\n assertIs(acroListBox, 'acroListBox', [[PDFAcroListBox, 'PDFAcroListBox']]);\n\n this.acroField = acroListBox;\n }\n\n /**\n * Get the list of available options for this option list. These options will\n * be displayed to users who view this option list in a PDF reader.\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * const options = optionList.getOptions()\n * console.log('Option List options:', options)\n * ```\n * @returns The options for this option list.\n */\n getOptions(): string[] {\n const rawOptions = this.acroField.getOptions();\n\n const options = new Array(rawOptions.length);\n for (let idx = 0, len = options.length; idx < len; idx++) {\n const { display, value } = rawOptions[idx];\n options[idx] = (display ?? value).decodeText();\n }\n\n return options;\n }\n\n /**\n * Get the selected options for this option list. These are the values that\n * were selected by a human user via a PDF reader, or programatically via\n * software.\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * const selections = optionList.getSelected()\n * console.log('Option List selections:', selections)\n * ```\n * @returns The selected options for this option list.\n */\n getSelected(): string[] {\n const values = this.acroField.getValues();\n\n const selected = new Array(values.length);\n for (let idx = 0, len = values.length; idx < len; idx++) {\n selected[idx] = values[idx].decodeText();\n }\n\n return selected;\n }\n\n /**\n * Set the list of options that are available for this option list. These are\n * the values that will be available for users to select when they view this\n * option list in a PDF reader. Note that preexisting options for this\n * option list will be removed. Only the values passed as `options` will be\n * available to select.\n *\n * For example:\n * ```js\n * const optionList = form.getOptionList('planets.optionList')\n * optionList.setOptions(['Earth', 'Mars', 'Pluto', 'Venus'])\n * ```\n *\n * This method will mark this option list as dirty, causing its appearance\n * streams to be updated when either [[PDFDocument.save]] or\n * [[PDFForm.updateFieldAppearances]] is called. The updated streams will\n * display the options this field contains inside the widgets of this text\n * field (with selected options highlighted).\n *\n * **IMPORTANT:** The default font used to update appearance streams is\n * [[StandardFonts.Helvetica]]. Note that this is a WinAnsi font. This means\n * that encoding errors will be thrown if this field contains any options\n * with characters outside the WinAnsi character set (the latin alphabet).\n *\n * Embedding a custom font and passing it to\n * [[PDFForm.updateFieldAppearances]] or [[PDFOptionList.updateAppearances]]\n * allows you to generate appearance streams with characters outside the\n * latin alphabet (assuming the custom font supports them).\n *\n * @param options The options that should be available in this option list.\n */\n setOptions(options: string[]) {\n assertIs(options, 'options', [Array]);\n\n this.markAsDirty();\n const optionObjects = new Array<{ value: PDFHexString }>(options.length);\n for (let idx = 0, len = options.length; idx < len; idx++) {\n optionObjects[idx] = { value: PDFHexString.fromText(options[idx]) };\n }\n this.acroField.setOptions(optionObjects);\n }\n\n /**\n * Add to the list of options that are available for this option list. Users\n * will be able to select these values in a PDF reader. In addition to the\n * values passed as `options`, any preexisting options for this option list\n * will still be available for users to select.\n * For example:\n * ```js\n * const optionList = form.getOptionList('rockets.optionList')\n * optionList.addOptions(['Saturn IV', 'Falcon Heavy'])\n * ```\n * This method will mark this option list as dirty. See\n * [[PDFOptionList.setOptions]] for more details about what this means.\n * @param options New options that should be available in this option list.\n */\n addOptions(options: string | string[]) {\n assertIs(options, 'options', ['string', Array]);\n\n this.markAsDirty();\n\n const optionsArr = Array.isArray(options) ? options : [options];\n\n const existingOptions: {\n value: PDFString | PDFHexString;\n display?: PDFString | PDFHexString;\n }[] = this.acroField.getOptions();\n\n const newOptions = new Array<{ value: PDFHexString }>(optionsArr.length);\n for (let idx = 0, len = optionsArr.length; idx < len; idx++) {\n newOptions[idx] = { value: PDFHexString.fromText(optionsArr[idx]) };\n }\n\n this.acroField.setOptions(existingOptions.concat(newOptions));\n }\n\n /**\n * Select one or more values for this option list. This operation is analogous\n * to a human user opening the option list in a PDF reader and clicking on one\n * or more values to select them. This method will update the underlying state\n * of the option list to indicate which values have been selected. PDF\n * libraries and readers will be able to extract these values from the saved\n * document and determine which values were selected.\n * For example:\n * ```js\n * const optionList = form.getOptionList('best.superheroes.optionList')\n * optionList.select(['One Punch Man', 'Iron Man'])\n * ```\n * This method will mark this option list as dirty. See\n * [[PDFOptionList.setOptions]] for more details about what this means.\n * @param options The options to be selected.\n * @param merge Whether or not existing selections should be preserved.\n */\n select(options: string | string[], merge = false) {\n assertIs(options, 'options', ['string', Array]);\n assertIs(merge, 'merge', ['boolean']);\n\n const optionsArr = Array.isArray(options) ? options : [options];\n\n const validOptions = this.getOptions();\n assertIsSubset(optionsArr, 'option', validOptions);\n\n this.markAsDirty();\n\n if (optionsArr.length > 1 || (optionsArr.length === 1 && merge)) {\n this.enableMultiselect();\n }\n\n const values = new Array(optionsArr.length);\n for (let idx = 0, len = optionsArr.length; idx < len; idx++) {\n values[idx] = PDFHexString.fromText(optionsArr[idx]);\n }\n\n if (merge) {\n const existingValues = this.acroField.getValues();\n this.acroField.setValues(existingValues.concat(values));\n } else {\n this.acroField.setValues(values);\n }\n }\n\n /**\n * Clear all selected values for this option list. This operation is\n * equivalent to selecting an empty list. This method will update the\n * underlying state of the option list to indicate that no values have been\n * selected.\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.clear()\n * ```\n * This method will mark this option list as dirty. See\n * [[PDFOptionList.setOptions]] for more details about what this means.\n */\n clear() {\n this.markAsDirty();\n this.acroField.setValues([]);\n }\n\n /**\n * Set the font size for the text in this field. There needs to be a\n * default appearance string (DA) set with a font value specified\n * for this to work. For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.setFontSize(4);\n * ```\n * @param fontSize The font size to set the font to.\n */\n\n /**\n * Set the font size for this field. Larger font sizes will result in larger\n * text being displayed when PDF readers render this option list. Font sizes\n * may be integer or floating point numbers. Supplying a negative font size\n * will cause this method to throw an error.\n *\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.setFontSize(4)\n * optionList.setFontSize(15.7)\n * ```\n *\n * > This method depends upon the existence of a default appearance\n * > (`/DA`) string. If this field does not have a default appearance string,\n * > or that string does not contain a font size (via the `Tf` operator),\n * > then this method will throw an error.\n *\n * @param fontSize The font size to be used when rendering text in this field.\n */\n setFontSize(fontSize: number) {\n assertPositive(fontSize, 'fontSize');\n this.acroField.setFontSize(fontSize);\n this.markAsDirty();\n }\n\n /**\n * Returns `true` if the options of this option list are always displayed\n * in alphabetical order, irrespective of the order in which the options\n * were added to the option list. See [[PDFOptionList.enableSorting]] and\n * [[PDFOptionList.disableSorting]]. For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * if (optionList.isSorted()) console.log('Sorting is enabled')\n * ```\n * @returns Whether or not this option list is sorted.\n */\n isSorted(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.Sort);\n }\n\n /**\n * Always display the options of this option list in alphabetical order,\n * irrespective of the order in which the options were added to this option\n * list.\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.enableSorting()\n * ```\n */\n enableSorting() {\n this.acroField.setFlagTo(AcroChoiceFlags.Sort, true);\n }\n\n /**\n * Do not always display the options of this option list in alphabetical\n * order. Instead, display the options in whichever order they were added\n * to this option list. For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.disableSorting()\n * ```\n */\n disableSorting() {\n this.acroField.setFlagTo(AcroChoiceFlags.Sort, false);\n }\n\n /**\n * Returns `true` if multiple options can be selected from this option list.\n * See [[PDFOptionList.enableMultiselect]] and\n * [[PDFOptionList.disableMultiselect]]. For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * if (optionList.isMultiselect()) console.log('Multiselect is enabled')\n * ```\n * @returns Whether or not multiple options can be selected.\n */\n isMultiselect(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.MultiSelect);\n }\n\n /**\n * Allow users to select more than one option from this option list.\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.enableMultiselect()\n * ```\n */\n enableMultiselect() {\n this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, true);\n }\n\n /**\n * Do not allow users to select more than one option from this option list.\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.disableMultiselect()\n * ```\n */\n disableMultiselect() {\n this.acroField.setFlagTo(AcroChoiceFlags.MultiSelect, false);\n }\n\n /**\n * Returns `true` if the option selected by a user is stored, or \"committed\",\n * when the user clicks the option. The alternative is that the user's\n * selection is stored when the user leaves this option list field (by\n * clicking outside of it - on another field, for example). See\n * [[PDFOptionList.enableSelectOnClick]] and\n * [[PDFOptionList.disableSelectOnClick]]. For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * if (optionList.isSelectOnClick()) console.log('Select on click is enabled')\n * ```\n * @returns Whether or not options are selected immediately after they are\n * clicked.\n */\n isSelectOnClick(): boolean {\n return this.acroField.hasFlag(AcroChoiceFlags.CommitOnSelChange);\n }\n\n /**\n * Store the option selected by a user immediately after the user clicks the\n * option. Do not wait for the user to leave this option list field (by\n * clicking outside of it - on another field, for example). For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.enableSelectOnClick()\n * ```\n */\n enableSelectOnClick() {\n this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, true);\n }\n\n /**\n * Wait to store the option selected by a user until they leave this option\n * list field (by clicking outside of it - on another field, for example).\n * For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.disableSelectOnClick()\n * ```\n */\n disableSelectOnClick() {\n this.acroField.setFlagTo(AcroChoiceFlags.CommitOnSelChange, false);\n }\n\n /**\n * Show this option list on the specified page. For example:\n * ```js\n * const ubuntuFont = await pdfDoc.embedFont(ubuntuFontBytes)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const optionList = form.createOptionList('best.gundams')\n * optionList.setOptions(['Exia', 'Dynames', 'Kyrios', 'Virtue'])\n * optionList.select(['Exia', 'Virtue'])\n *\n * optionList.addToPage(page, {\n * x: 50,\n * y: 75,\n * width: 200,\n * height: 100,\n * textColor: rgb(1, 0, 0),\n * backgroundColor: rgb(0, 1, 0),\n * borderColor: rgb(0, 0, 1),\n * borderWidth: 2,\n * rotate: degrees(90),\n * font: ubuntuFont,\n * })\n * ```\n * This will create a new widget for this option list field.\n * @param page The page to which this option list widget should be added.\n * @param options The options to be used when adding this option list widget.\n */\n addToPage(page: PDFPage, options?: FieldAppearanceOptions) {\n assertIs(page, 'page', [[PDFPage, 'PDFPage']]);\n assertFieldAppearanceOptions(options);\n\n if (!options) options = {};\n\n if (!('textColor' in options)) options.textColor = rgb(0, 0, 0);\n if (!('backgroundColor' in options)) options.backgroundColor = rgb(1, 1, 1);\n if (!('borderColor' in options)) options.borderColor = rgb(0, 0, 0);\n if (!('borderWidth' in options)) options.borderWidth = 1;\n\n // Create a widget for this option list\n const widget = this.createWidget({\n x: options.x ?? 0,\n y: options.y ?? 0,\n width: options.width ?? 200,\n height: options.height ?? 100,\n textColor: options.textColor,\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth ?? 0,\n rotate: options.rotate ?? degrees(0),\n hidden: options.hidden,\n page: page.ref,\n });\n const widgetRef = this.doc.context.register(widget.dict);\n\n // Add widget to this field\n this.acroField.addWidget(widgetRef);\n\n // Set appearance streams for widget\n const font = options.font ?? this.doc.getForm().getDefaultFont();\n this.updateWidgetAppearance(widget, font);\n\n // Add widget to the given page\n page.node.addAnnot(widgetRef);\n }\n\n /**\n * Returns `true` if this option list has been marked as dirty, or if any of\n * this option list's widgets do not have an appearance stream. For example:\n * ```js\n * const optionList = form.getOptionList('some.optionList.field')\n * if (optionList.needsAppearancesUpdate()) console.log('Needs update')\n * ```\n * @returns Whether or not this option list needs an appearance update.\n */\n needsAppearancesUpdate(): boolean {\n if (this.isDirty()) return true;\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const hasAppearances =\n widget.getAppearances()?.normal instanceof PDFStream;\n if (!hasAppearances) return true;\n }\n\n return false;\n }\n\n /**\n * Update the appearance streams for each of this option list's widgets using\n * the default appearance provider for option lists. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.defaultUpdateAppearances(helvetica)\n * ```\n * @param font The font to be used for creating the appearance streams.\n */\n defaultUpdateAppearances(font: PDFFont) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n this.updateAppearances(font);\n }\n\n /**\n * Update the appearance streams for each of this option list's widgets using\n * the given appearance provider. If no `provider` is passed, the default\n * appearance provider for option lists will be used. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const optionList = form.getOptionList('some.optionList.field')\n * optionList.updateAppearances(helvetica, (field, widget, font) => {\n * ...\n * return drawOptionList(...)\n * })\n * ```\n * @param font The font to be used for creating the appearance streams.\n * @param provider Optionally, the appearance provider to be used for\n * generating the contents of the appearance streams.\n */\n updateAppearances(\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n assertOrUndefined(provider, 'provider', [Function]);\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n this.updateWidgetAppearance(widget, font, provider);\n }\n this.markAsClean();\n }\n\n // getOption(index: number): string {}\n // getSelectedIndices(): number[] {}\n // removeOptions(option: string | string[]) {}\n // removeIndices(option: number[]) {}\n // deselect(options: string | string[]) {}\n // deselectIndices(optionIndices: number[]) {}\n\n private updateWidgetAppearance(\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n const apProvider = provider ?? defaultOptionListAppearanceProvider;\n const appearances = normalizeAppearance(apProvider(this, widget, font));\n this.updateWidgetAppearanceWithFont(widget, font, appearances);\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFField, {\n FieldAppearanceOptions,\n assertFieldAppearanceOptions,\n} from 'src/api/form/PDFField';\nimport {\n AppearanceProviderFor,\n normalizeAppearance,\n defaultRadioGroupAppearanceProvider,\n} from 'src/api/form/appearances';\nimport { rgb } from 'src/api/colors';\nimport { degrees } from 'src/api/rotations';\n\nimport {\n PDFName,\n PDFRef,\n PDFHexString,\n PDFDict,\n PDFWidgetAnnotation,\n PDFAcroRadioButton,\n AcroButtonFlags,\n} from 'src/core';\nimport { assertIs, assertOrUndefined, assertIsOneOf } from 'src/utils';\n\n/**\n * Represents a radio group field of a [[PDFForm]].\n *\n * [[PDFRadioGroup]] fields are collections of radio buttons. The purpose of a\n * radio group is to enable users to select one option from a set of mutually\n * exclusive choices. Each choice in a radio group is represented by a radio\n * button. Radio buttons each have two states: `on` and `off`. At most one\n * radio button in a group may be in the `on` state at any time. Users can\n * click on a radio button to select it (and thereby automatically deselect any\n * other radio button that might have already been selected). Some radio\n * groups allow users to toggle a selected radio button `off` by clicking on\n * it (see [[PDFRadioGroup.isOffToggleable]]).\n *\n * Note that some radio groups allow multiple radio buttons to be in the `on`\n * state at the same type **if** they represent the same underlying value (see\n * [[PDFRadioGroup.isMutuallyExclusive]]).\n */\nexport default class PDFRadioGroup extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getOptionList]] method, which will create an\n * > instance of [[PDFOptionList]] for you.\n *\n * Create an instance of [[PDFOptionList]] from an existing acroRadioButton\n * and ref\n *\n * @param acroRadioButton The underlying `PDFAcroRadioButton` for this\n * radio group.\n * @param ref The unique reference for this radio group.\n * @param doc The document to which this radio group will belong.\n */\n static of = (\n acroRadioButton: PDFAcroRadioButton,\n ref: PDFRef,\n doc: PDFDocument,\n ) => new PDFRadioGroup(acroRadioButton, ref, doc);\n\n /** The low-level PDFAcroRadioButton wrapped by this radio group. */\n readonly acroField: PDFAcroRadioButton;\n\n private constructor(\n acroRadioButton: PDFAcroRadioButton,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n super(acroRadioButton, ref, doc);\n\n assertIs(acroRadioButton, 'acroRadioButton', [\n [PDFAcroRadioButton, 'PDFAcroRadioButton'],\n ]);\n\n this.acroField = acroRadioButton;\n }\n\n /**\n * Get the list of available options for this radio group. Each option is\n * represented by a radio button. These radio buttons are displayed at\n * various locations in the document, potentially on different pages (though\n * typically they are stacked horizontally or vertically on the same page).\n * For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * const options = radioGroup.getOptions()\n * console.log('Radio Group options:', options)\n * ```\n * @returns The options for this radio group.\n */\n getOptions(): string[] {\n const exportValues = this.acroField.getExportValues();\n if (exportValues) {\n const exportOptions = new Array(exportValues.length);\n for (let idx = 0, len = exportValues.length; idx < len; idx++) {\n exportOptions[idx] = exportValues[idx].decodeText();\n }\n return exportOptions;\n }\n\n const onValues = this.acroField.getOnValues();\n const onOptions = new Array(onValues.length);\n for (let idx = 0, len = onOptions.length; idx < len; idx++) {\n onOptions[idx] = onValues[idx].decodeText();\n }\n return onOptions;\n }\n\n /**\n * Get the selected option for this radio group. The selected option is\n * represented by the radio button in this group that is turned on. At most\n * one radio button in a group can be selected. If no buttons in this group\n * are selected, `undefined` is returned.\n * For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * const selected = radioGroup.getSelected()\n * console.log('Selected radio button:', selected)\n * ```\n * @returns The selected option for this radio group.\n */\n getSelected(): string | undefined {\n const value = this.acroField.getValue();\n if (value === PDFName.of('Off')) return undefined;\n const exportValues = this.acroField.getExportValues();\n if (exportValues) {\n const onValues = this.acroField.getOnValues();\n for (let idx = 0, len = onValues.length; idx < len; idx++) {\n if (onValues[idx] === value) return exportValues[idx].decodeText();\n }\n }\n return value.decodeText();\n }\n\n // // TODO: Figure out why this seems to crash Acrobat. Maybe it's because we\n // // aren't removing the widget reference from the page's Annots?\n // removeOption(option: string) {\n // assertIs(option, 'option', ['string']);\n // // TODO: Assert is valid `option`!\n\n // const onValues = this.acroField.getOnValues();\n // const exportValues = this.acroField.getExportValues();\n // if (exportValues) {\n // for (let idx = 0, len = exportValues.length; idx < len; idx++) {\n // if (exportValues[idx].decodeText() === option) {\n // this.acroField.removeWidget(idx);\n // this.acroField.removeExportValue(idx);\n // }\n // }\n // } else {\n // for (let idx = 0, len = onValues.length; idx < len; idx++) {\n // const value = onValues[idx];\n // if (value.decodeText() === option) {\n // this.acroField.removeWidget(idx);\n // this.acroField.removeExportValue(idx);\n // }\n // }\n // }\n // }\n\n /**\n * Select an option for this radio group. This operation is analogous to a\n * human user clicking one of the radio buttons in this group via a PDF\n * reader to toggle it on. This method will update the underlying state of\n * the radio group to indicate which option has been selected. PDF libraries\n * and readers will be able to extract this value from the saved document and\n * determine which option was selected.\n *\n * For example:\n * ```js\n * const radioGroup = form.getRadioGroup('best.superhero.radioGroup')\n * radioGroup.select('One Punch Man')\n * ```\n *\n * This method will mark this radio group as dirty, causing its appearance\n * streams to be updated when either [[PDFDocument.save]] or\n * [[PDFForm.updateFieldAppearances]] is called. The updated appearance\n * streams will display a dot inside the widget of this check box field\n * that represents the selected option.\n *\n * @param option The option to be selected.\n */\n select(option: string) {\n assertIs(option, 'option', ['string']);\n\n const validOptions = this.getOptions();\n assertIsOneOf(option, 'option', validOptions);\n\n this.markAsDirty();\n\n const onValues = this.acroField.getOnValues();\n const exportValues = this.acroField.getExportValues();\n if (exportValues) {\n for (let idx = 0, len = exportValues.length; idx < len; idx++) {\n if (exportValues[idx].decodeText() === option) {\n this.acroField.setValue(onValues[idx]);\n }\n }\n } else {\n for (let idx = 0, len = onValues.length; idx < len; idx++) {\n const value = onValues[idx];\n if (value.decodeText() === option) this.acroField.setValue(value);\n }\n }\n }\n\n /**\n * Clear any selected option for this dropdown. This will result in all\n * radio buttons in this group being toggled off. This method will update\n * the underlying state of the dropdown to indicate that no radio buttons\n * have been selected.\n * For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.clear()\n * ```\n * This method will mark this radio group as dirty. See\n * [[PDFRadioGroup.select]] for more details about what this means.\n */\n clear() {\n this.markAsDirty();\n this.acroField.setValue(PDFName.of('Off'));\n }\n\n /**\n * Returns `true` if users can click on radio buttons in this group to toggle\n * them off. The alternative is that once a user clicks on a radio button\n * to select it, the only way to deselect it is by selecting on another radio\n * button in the group. See [[PDFRadioGroup.enableOffToggling]] and\n * [[PDFRadioGroup.disableOffToggling]]. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * if (radioGroup.isOffToggleable()) console.log('Off toggling is enabled')\n * ```\n */\n isOffToggleable() {\n return !this.acroField.hasFlag(AcroButtonFlags.NoToggleToOff);\n }\n\n /**\n * Allow users to click on selected radio buttons in this group to toggle\n * them off. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.enableOffToggling()\n * ```\n * > **NOTE:** This feature is documented in the PDF specification\n * > (Table 226). However, most PDF readers do not respect this option and\n * > prevent users from toggling radio buttons off even when it is enabled.\n * > At the time of this writing (9/6/2020) Mac's Preview software did\n * > respect the option. Adobe Acrobat, Foxit Reader, and Google Chrome did\n * > not.\n */\n enableOffToggling() {\n this.acroField.setFlagTo(AcroButtonFlags.NoToggleToOff, false);\n }\n\n /**\n * Prevent users from clicking on selected radio buttons in this group to\n * toggle them off. Clicking on a selected radio button will have no effect.\n * The only way to deselect a selected radio button is to click on a\n * different radio button in the group. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.disableOffToggling()\n * ```\n */\n disableOffToggling() {\n this.acroField.setFlagTo(AcroButtonFlags.NoToggleToOff, true);\n }\n\n /**\n * Returns `true` if the radio buttons in this group are mutually exclusive.\n * This means that when the user selects a radio button, only that specific\n * button will be turned on. Even if other radio buttons in the group\n * represent the same value, they will not be enabled. The alternative to\n * this is that clicking a radio button will select that button along with\n * any other radio buttons in the group that share the same value. See\n * [[PDFRadioGroup.enableMutualExclusion]] and\n * [[PDFRadioGroup.disableMutualExclusion]].\n * For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * if (radioGroup.isMutuallyExclusive()) console.log('Mutual exclusion is enabled')\n * ```\n */\n isMutuallyExclusive() {\n return !this.acroField.hasFlag(AcroButtonFlags.RadiosInUnison);\n }\n\n /**\n * When the user clicks a radio button in this group it will be selected. In\n * addition, any other radio buttons in this group that share the same\n * underlying value will also be selected. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.enableMutualExclusion()\n * ```\n * Note that this option must be enabled prior to adding options to the\n * radio group. It does not currently apply retroactively to existing\n * radio buttons in the group.\n */\n enableMutualExclusion() {\n this.acroField.setFlagTo(AcroButtonFlags.RadiosInUnison, false);\n }\n\n /**\n * When the user clicks a radio button in this group only it will be selected.\n * No other radio buttons in the group will be selected, even if they share\n * the same underlying value. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.disableMutualExclusion()\n * ```\n * Note that this option must be disabled prior to adding options to the\n * radio group. It does not currently apply retroactively to existing\n * radio buttons in the group.\n */\n disableMutualExclusion() {\n this.acroField.setFlagTo(AcroButtonFlags.RadiosInUnison, true);\n }\n\n /**\n * Add a new radio button to this group on the specified page. For example:\n * ```js\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const radioGroup = form.createRadioGroup('best.gundam')\n *\n * const options = {\n * x: 50,\n * width: 25,\n * height: 25,\n * textColor: rgb(1, 0, 0),\n * backgroundColor: rgb(0, 1, 0),\n * borderColor: rgb(0, 0, 1),\n * borderWidth: 2,\n * rotate: degrees(90),\n * }\n *\n * radioGroup.addOptionToPage('Exia', page, { ...options, y: 50 })\n * radioGroup.addOptionToPage('Dynames', page, { ...options, y: 110 })\n * ```\n * This will create a new radio button widget for this radio group field.\n * @param option The option that the radio button widget represents.\n * @param page The page to which the radio button widget should be added.\n * @param options The options to be used when adding the radio button widget.\n */\n addOptionToPage(\n option: string,\n page: PDFPage,\n options?: FieldAppearanceOptions,\n ) {\n assertIs(option, 'option', ['string']);\n assertIs(page, 'page', [[PDFPage, 'PDFPage']]);\n assertFieldAppearanceOptions(options);\n\n // Create a widget for this radio button\n const widget = this.createWidget({\n x: options?.x ?? 0,\n y: options?.y ?? 0,\n width: options?.width ?? 50,\n height: options?.height ?? 50,\n textColor: options?.textColor ?? rgb(0, 0, 0),\n backgroundColor: options?.backgroundColor ?? rgb(1, 1, 1),\n borderColor: options?.borderColor ?? rgb(0, 0, 0),\n borderWidth: options?.borderWidth ?? 1,\n rotate: options?.rotate ?? degrees(0),\n hidden: options?.hidden,\n page: page.ref,\n });\n const widgetRef = this.doc.context.register(widget.dict);\n\n // Add widget to this field\n const apStateValue = this.acroField.addWidgetWithOpt(\n widgetRef,\n PDFHexString.fromText(option),\n !this.isMutuallyExclusive(),\n );\n\n // Set appearance streams for widget\n widget.setAppearanceState(PDFName.of('Off'));\n this.updateWidgetAppearance(widget, apStateValue);\n\n // Add widget to the given page\n page.node.addAnnot(widgetRef);\n }\n\n /**\n * Returns `true` if any of this group's radio button widgets do not have an\n * appearance stream for their current state. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * if (radioGroup.needsAppearancesUpdate()) console.log('Needs update')\n * ```\n * @returns Whether or not this radio group needs an appearance update.\n */\n needsAppearancesUpdate(): boolean {\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const state = widget.getAppearanceState();\n const normal = widget.getAppearances()?.normal;\n\n if (!(normal instanceof PDFDict)) return true;\n if (state && !normal.has(state)) return true;\n }\n\n return false;\n }\n\n /**\n * Update the appearance streams for each of this group's radio button widgets\n * using the default appearance provider for radio groups. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.defaultUpdateAppearances()\n * ```\n */\n defaultUpdateAppearances() {\n this.updateAppearances();\n }\n\n // rg.updateAppearances((field: any, widget: any) => {\n // assert(field === rg);\n // assert(widget instanceof PDFWidgetAnnotation);\n // return { on: [...rectangle, ...circle], off: [...rectangle, ...circle] };\n // });\n\n /**\n * Update the appearance streams for each of this group's radio button widgets\n * using the given appearance provider. If no `provider` is passed, the\n * default appearance provider for radio groups will be used. For example:\n * ```js\n * const radioGroup = form.getRadioGroup('some.radioGroup.field')\n * radioGroup.updateAppearances((field, widget) => {\n * ...\n * return {\n * normal: { on: drawRadioButton(...), off: drawRadioButton(...) },\n * down: { on: drawRadioButton(...), off: drawRadioButton(...) },\n * }\n * })\n * ```\n * @param provider Optionally, the appearance provider to be used for\n * generating the contents of the appearance streams.\n */\n updateAppearances(provider?: AppearanceProviderFor) {\n assertOrUndefined(provider, 'provider', [Function]);\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const onValue = widget.getOnValue();\n if (!onValue) continue;\n this.updateWidgetAppearance(widget, onValue, provider);\n }\n }\n\n private updateWidgetAppearance(\n widget: PDFWidgetAnnotation,\n onValue: PDFName,\n provider?: AppearanceProviderFor,\n ) {\n const apProvider = provider ?? defaultRadioGroupAppearanceProvider;\n const appearances = normalizeAppearance(apProvider(this, widget));\n this.updateOnOffWidgetAppearance(widget, onValue, appearances);\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFField from 'src/api/form/PDFField';\n\nimport { PDFRef, PDFAcroSignature } from 'src/core';\nimport { assertIs } from 'src/utils';\n\n/**\n * Represents a signature field of a [[PDFForm]].\n *\n * [[PDFSignature]] fields are digital signatures. `pdf-lib` does not\n * currently provide any specialized APIs for creating digital signatures or\n * reading the contents of existing digital signatures.\n */\nexport default class PDFSignature extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getSignature]] method, which will create an\n * > instance of [[PDFSignature]] for you.\n *\n * Create an instance of [[PDFSignature]] from an existing acroSignature and\n * ref\n *\n * @param acroSignature The underlying `PDFAcroSignature` for this signature.\n * @param ref The unique reference for this signature.\n * @param doc The document to which this signature will belong.\n */\n static of = (\n acroSignature: PDFAcroSignature,\n ref: PDFRef,\n doc: PDFDocument,\n ) => new PDFSignature(acroSignature, ref, doc);\n\n /** The low-level PDFAcroSignature wrapped by this signature. */\n readonly acroField: PDFAcroSignature;\n\n private constructor(\n acroSignature: PDFAcroSignature,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n super(acroSignature, ref, doc);\n\n assertIs(acroSignature, 'acroSignature', [\n [PDFAcroSignature, 'PDFAcroSignature'],\n ]);\n\n this.acroField = acroSignature;\n }\n\n needsAppearancesUpdate() {\n return false;\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFImage from 'src/api/PDFImage';\nimport PDFField, {\n FieldAppearanceOptions,\n assertFieldAppearanceOptions,\n} from 'src/api/form/PDFField';\nimport {\n AppearanceProviderFor,\n normalizeAppearance,\n defaultTextFieldAppearanceProvider,\n} from 'src/api/form/appearances';\nimport { rgb } from 'src/api/colors';\nimport { degrees } from 'src/api/rotations';\nimport {\n RichTextFieldReadError,\n ExceededMaxLengthError,\n InvalidMaxLengthError,\n} from 'src/api/errors';\nimport { ImageAlignment } from 'src/api/image/alignment';\nimport { TextAlignment } from 'src/api/text/alignment';\n\nimport {\n PDFHexString,\n PDFRef,\n PDFStream,\n PDFAcroText,\n AcroTextFlags,\n PDFWidgetAnnotation,\n} from 'src/core';\nimport {\n assertIs,\n assertIsOneOf,\n assertOrUndefined,\n assertPositive,\n assertRangeOrUndefined,\n} from 'src/utils';\n\n/**\n * Represents a text field of a [[PDFForm]].\n *\n * [[PDFTextField]] fields are boxes that display text entered by the user. The\n * purpose of a text field is to enable users to enter text or view text values\n * in the document prefilled by software. Users can click on a text field and\n * input text via their keyboard. Some text fields allow multiple lines of text\n * to be entered (see [[PDFTextField.isMultiline]]).\n */\nexport default class PDFTextField extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getTextField]] method, which will create an\n * > instance of [[PDFTextField]] for you.\n *\n * Create an instance of [[PDFTextField]] from an existing acroText and ref\n *\n * @param acroText The underlying `PDFAcroText` for this text field.\n * @param ref The unique reference for this text field.\n * @param doc The document to which this text field will belong.\n */\n static of = (acroText: PDFAcroText, ref: PDFRef, doc: PDFDocument) =>\n new PDFTextField(acroText, ref, doc);\n\n /** The low-level PDFAcroText wrapped by this text field. */\n readonly acroField: PDFAcroText;\n\n private constructor(acroText: PDFAcroText, ref: PDFRef, doc: PDFDocument) {\n super(acroText, ref, doc);\n\n assertIs(acroText, 'acroText', [[PDFAcroText, 'PDFAcroText']]);\n\n this.acroField = acroText;\n }\n\n /**\n * Get the text that this field contains. This text is visible to users who\n * view this field in a PDF reader.\n *\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * const text = textField.getText()\n * console.log('Text field contents:', text)\n * ```\n *\n * Note that if this text field contains no underlying value, `undefined`\n * will be returned. Text fields may also contain an underlying value that\n * is simply an empty string (`''`). This detail is largely irrelevant for\n * most applications. In general, you'll want to treat both cases the same\n * way and simply consider the text field to be empty. In either case, the\n * text field will appear empty to users when viewed in a PDF reader.\n *\n * An error will be thrown if this is a rich text field. `pdf-lib` does not\n * support reading rich text fields. Nor do most PDF readers and writers.\n * Rich text fields are based on XFA (XML Forms Architecture). Relatively few\n * PDFs use rich text fields or XFA. Unlike PDF itself, XFA is not an ISO\n * standard. XFA has been deprecated in PDF 2.0:\n * * https://en.wikipedia.org/wiki/XFA\n * * http://blog.pdfshareforms.com/pdf-2-0-release-bid-farewell-xfa-forms/\n *\n * @returns The text contained in this text field.\n */\n getText(): string | undefined {\n const value = this.acroField.getValue();\n if (!value && this.isRichFormatted()) {\n throw new RichTextFieldReadError(this.getName());\n }\n return value?.decodeText();\n }\n\n /**\n * Set the text for this field. This operation is analogous to a human user\n * clicking on the text field in a PDF reader and typing in text via their\n * keyboard. This method will update the underlying state of the text field\n * to indicate what text has been set. PDF libraries and readers will be able\n * to extract these values from the saved document and determine what text\n * was set.\n *\n * For example:\n * ```js\n * const textField = form.getTextField('best.superhero.text.field')\n * textField.setText('One Punch Man')\n * ```\n *\n * This method will mark this text field as dirty, causing its appearance\n * streams to be updated when either [[PDFDocument.save]] or\n * [[PDFForm.updateFieldAppearances]] is called. The updated streams will\n * display the text this field contains inside the widgets of this text\n * field.\n *\n * **IMPORTANT:** The default font used to update appearance streams is\n * [[StandardFonts.Helvetica]]. Note that this is a WinAnsi font. This means\n * that encoding errors will be thrown if this field contains text outside\n * the WinAnsi character set (the latin alphabet).\n *\n * Embedding a custom font and passing it to\n * [[PDFForm.updateFieldAppearances]] or [[PDFTextField.updateAppearances]]\n * allows you to generate appearance streams with characters outside the\n * latin alphabet (assuming the custom font supports them).\n *\n * If this is a rich text field, it will be converted to a standard text\n * field in order to set the text. `pdf-lib` does not support writing rich\n * text strings. Nor do most PDF readers and writers. See\n * [[PDFTextField.getText]] for more information about rich text fields and\n * their deprecation in PDF 2.0.\n *\n * @param text The text this field should contain.\n */\n setText(text: string | undefined) {\n assertOrUndefined(text, 'text', ['string']);\n\n const maxLength = this.getMaxLength();\n if (maxLength !== undefined && text && text.length > maxLength) {\n throw new ExceededMaxLengthError(text.length, maxLength, this.getName());\n }\n\n this.markAsDirty();\n this.disableRichFormatting();\n\n if (text) {\n this.acroField.setValue(PDFHexString.fromText(text));\n } else {\n this.acroField.removeValue();\n }\n }\n\n /**\n * Get the alignment for this text field. This value represents the\n * justification of the text when it is displayed to the user in PDF readers.\n * There are three possible alignments: left, center, and right. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * const alignment = textField.getAlignment()\n * if (alignment === TextAlignment.Left) console.log('Text is left justified')\n * if (alignment === TextAlignment.Center) console.log('Text is centered')\n * if (alignment === TextAlignment.Right) console.log('Text is right justified')\n * ```\n * @returns The alignment of this text field.\n */\n getAlignment(): TextAlignment {\n const quadding = this.acroField.getQuadding();\n\n // prettier-ignore\n return (\n quadding === 0 ? TextAlignment.Left\n : quadding === 1 ? TextAlignment.Center\n : quadding === 2 ? TextAlignment.Right\n : TextAlignment.Left\n );\n }\n\n /**\n * Set the alignment for this text field. This will determine the\n * justification of the text when it is displayed to the user in PDF readers.\n * There are three possible alignments: left, center, and right. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n *\n * // Text will be left justified when displayed\n * textField.setAlignment(TextAlignment.Left)\n *\n * // Text will be centered when displayed\n * textField.setAlignment(TextAlignment.Center)\n *\n * // Text will be right justified when displayed\n * textField.setAlignment(TextAlignment.Right)\n * ```\n * This method will mark this text field as dirty. See\n * [[PDFTextField.setText]] for more details about what this means.\n * @param alignment The alignment for this text field.\n */\n setAlignment(alignment: TextAlignment) {\n assertIsOneOf(alignment, 'alignment', TextAlignment);\n this.markAsDirty();\n this.acroField.setQuadding(alignment);\n }\n\n /**\n * Get the maximum length of this field. This value represents the maximum\n * number of characters that can be typed into this field by the user. If\n * this field does not have a maximum length, `undefined` is returned.\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * const maxLength = textField.getMaxLength()\n * if (maxLength === undefined) console.log('No max length')\n * else console.log(`Max length is ${maxLength}`)\n * ```\n * @returns The maximum number of characters allowed in this field, or\n * `undefined` if no limit exists.\n */\n getMaxLength(): number | undefined {\n return this.acroField.getMaxLength();\n }\n\n /**\n * Set the maximum length of this field. This limits the number of characters\n * that can be typed into this field by the user. This also limits the length\n * of the string that can be passed to [[PDFTextField.setText]]. This limit\n * can be removed by passing `undefined` as `maxLength`. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n *\n * // Allow between 0 and 5 characters to be entered\n * textField.setMaxLength(5)\n *\n * // Allow any number of characters to be entered\n * textField.setMaxLength(undefined)\n * ```\n * This method will mark this text field as dirty. See\n * [[PDFTextField.setText]] for more details about what this means.\n * @param maxLength The maximum number of characters allowed in this field, or\n * `undefined` to remove the limit.\n */\n setMaxLength(maxLength?: number) {\n assertRangeOrUndefined(maxLength, 'maxLength', 0, Number.MAX_SAFE_INTEGER);\n\n this.markAsDirty();\n\n if (maxLength === undefined) {\n this.acroField.removeMaxLength();\n } else {\n const text = this.getText();\n if (text && text.length > maxLength) {\n throw new InvalidMaxLengthError(text.length, maxLength, this.getName());\n }\n this.acroField.setMaxLength(maxLength);\n }\n }\n\n /**\n * Remove the maximum length for this text field. This allows any number of\n * characters to be typed into this field by the user. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.removeMaxLength()\n * ```\n * Calling this method is equivalent to passing `undefined` to\n * [[PDFTextField.setMaxLength]].\n */\n removeMaxLength() {\n this.markAsDirty();\n this.acroField.removeMaxLength();\n }\n\n /**\n * Display an image inside the bounds of this text field's widgets. For example:\n * ```js\n * const pngImage = await pdfDoc.embedPng(...)\n * const textField = form.getTextField('some.text.field')\n * textField.setImage(pngImage)\n * ```\n * This will update the appearances streams for each of this text field's widgets.\n * @param image The image that should be displayed.\n */\n setImage(image: PDFImage) {\n const fieldAlignment = this.getAlignment();\n\n // prettier-ignore\n const alignment = \n fieldAlignment === TextAlignment.Center ? ImageAlignment.Center\n : fieldAlignment === TextAlignment.Right ? ImageAlignment.Right\n : ImageAlignment.Left;\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const streamRef = this.createImageAppearanceStream(\n widget,\n image,\n alignment,\n );\n this.updateWidgetAppearances(widget, { normal: streamRef });\n }\n\n this.markAsClean();\n }\n\n /**\n * Set the font size for this field. Larger font sizes will result in larger\n * text being displayed when PDF readers render this text field. Font sizes\n * may be integer or floating point numbers. Supplying a negative font size\n * will cause this method to throw an error.\n *\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.setFontSize(4)\n * textField.setFontSize(15.7)\n * ```\n *\n * > This method depends upon the existence of a default appearance\n * > (`/DA`) string. If this field does not have a default appearance string,\n * > or that string does not contain a font size (via the `Tf` operator),\n * > then this method will throw an error.\n *\n * @param fontSize The font size to be used when rendering text in this field.\n */\n setFontSize(fontSize: number) {\n assertPositive(fontSize, 'fontSize');\n this.acroField.setFontSize(fontSize);\n this.markAsDirty();\n }\n\n /**\n * Returns `true` if each line of text is shown on a new line when this\n * field is displayed in a PDF reader. The alternative is that all lines of\n * text are merged onto a single line when displayed. See\n * [[PDFTextField.enableMultiline]] and [[PDFTextField.disableMultiline]].\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isMultiline()) console.log('Multiline is enabled')\n * ```\n * @returns Whether or not this is a multiline text field.\n */\n isMultiline(): boolean {\n return this.acroField.hasFlag(AcroTextFlags.Multiline);\n }\n\n /**\n * Display each line of text on a new line when this field is displayed in a\n * PDF reader. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enableMultiline()\n * ```\n * This method will mark this text field as dirty. See\n * [[PDFTextField.setText]] for more details about what this means.\n */\n enableMultiline() {\n this.markAsDirty();\n this.acroField.setFlagTo(AcroTextFlags.Multiline, true);\n }\n\n /**\n * Display each line of text on the same line when this field is displayed\n * in a PDF reader. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disableMultiline()\n * ```\n * This method will mark this text field as dirty. See\n * [[PDFTextField.setText]] for more details about what this means.\n */\n disableMultiline() {\n this.markAsDirty();\n this.acroField.setFlagTo(AcroTextFlags.Multiline, false);\n }\n\n /**\n * Returns `true` if this is a password text field. This means that the field\n * is intended for storing a secure password. See\n * [[PDFTextField.enablePassword]] and [[PDFTextField.disablePassword]].\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isPassword()) console.log('Password is enabled')\n * ```\n * @returns Whether or not this is a password text field.\n */\n isPassword(): boolean {\n return this.acroField.hasFlag(AcroTextFlags.Password);\n }\n\n /**\n * Indicate that this text field is intended for storing a secure password.\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enablePassword()\n * ```\n * Values entered into password text fields should not be displayed on the\n * screen by PDF readers. Most PDF readers will display the value as\n * asterisks or bullets. PDF readers should never store values entered by the\n * user into password text fields. Similarly, applications should not\n * write data to a password text field.\n *\n * **Please note that this method does not cause entered values to be\n * encrypted or secured in any way! It simply sets a flag that PDF software\n * and readers can access to determine the _purpose_ of this field.**\n */\n enablePassword() {\n this.acroField.setFlagTo(AcroTextFlags.Password, true);\n }\n\n /**\n * Indicate that this text field is **not** intended for storing a secure\n * password. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disablePassword()\n * ```\n */\n disablePassword() {\n this.acroField.setFlagTo(AcroTextFlags.Password, false);\n }\n\n /**\n * Returns `true` if the contents of this text field represent a file path.\n * See [[PDFTextField.enableFileSelection]] and\n * [[PDFTextField.disableFileSelection]]. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isFileSelector()) console.log('Is a file selector')\n * ```\n * @returns Whether or not this field should contain file paths.\n */\n isFileSelector(): boolean {\n return this.acroField.hasFlag(AcroTextFlags.FileSelect);\n }\n\n /**\n * Indicate that this text field is intended to store a file path. The\n * contents of the file stored at that path should be submitted as the value\n * of the field. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enableFileSelection()\n * ```\n */\n enableFileSelection() {\n this.acroField.setFlagTo(AcroTextFlags.FileSelect, true);\n }\n\n /**\n * Indicate that this text field is **not** intended to store a file path.\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disableFileSelection()\n * ```\n */\n disableFileSelection() {\n this.acroField.setFlagTo(AcroTextFlags.FileSelect, false);\n }\n\n /**\n * Returns `true` if the text entered in this field should be spell checked\n * by PDF readers. See [[PDFTextField.enableSpellChecking]] and\n * [[PDFTextField.disableSpellChecking]]. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isSpellChecked()) console.log('Spell checking is enabled')\n * ```\n * @returns Whether or not this field should be spell checked.\n */\n isSpellChecked(): boolean {\n return !this.acroField.hasFlag(AcroTextFlags.DoNotSpellCheck);\n }\n\n /**\n * Allow PDF readers to spell check the text entered in this field.\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enableSpellChecking()\n * ```\n */\n enableSpellChecking() {\n this.acroField.setFlagTo(AcroTextFlags.DoNotSpellCheck, false);\n }\n\n /**\n * Do not allow PDF readers to spell check the text entered in this field.\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disableSpellChecking()\n * ```\n */\n disableSpellChecking() {\n this.acroField.setFlagTo(AcroTextFlags.DoNotSpellCheck, true);\n }\n\n /**\n * Returns `true` if PDF readers should allow the user to scroll the text\n * field when its contents do not fit within the field's view bounds. See\n * [[PDFTextField.enableScrolling]] and [[PDFTextField.disableScrolling]].\n * For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isScrollable()) console.log('Scrolling is enabled')\n * ```\n * @returns Whether or not the field is scrollable in PDF readers.\n */\n isScrollable(): boolean {\n return !this.acroField.hasFlag(AcroTextFlags.DoNotScroll);\n }\n\n /**\n * Allow PDF readers to present a scroll bar to the user when the contents\n * of this text field do not fit within its view bounds. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enableScrolling()\n * ```\n * A horizontal scroll bar should be shown for singleline fields. A vertical\n * scroll bar should be shown for multiline fields.\n */\n enableScrolling() {\n this.acroField.setFlagTo(AcroTextFlags.DoNotScroll, false);\n }\n\n /**\n * Do not allow PDF readers to present a scroll bar to the user when the\n * contents of this text field do not fit within its view bounds. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disableScrolling()\n * ```\n */\n disableScrolling() {\n this.acroField.setFlagTo(AcroTextFlags.DoNotScroll, true);\n }\n\n /**\n * Returns `true` if this is a combed text field. This means that the field\n * is split into `n` equal size cells with one character in each (where `n`\n * is equal to the max length of the text field). The result is that all\n * characters in this field are displayed an equal distance apart from one\n * another. See [[PDFTextField.enableCombing]] and\n * [[PDFTextField.disableCombing]]. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isCombed()) console.log('Combing is enabled')\n * ```\n * Note that in order for a text field to be combed, the following must be\n * true (in addition to enabling combing):\n * * It must not be a multiline field (see [[PDFTextField.isMultiline]])\n * * It must not be a password field (see [[PDFTextField.isPassword]])\n * * It must not be a file selector field (see [[PDFTextField.isFileSelector]])\n * * It must have a max length defined (see [[PDFTextField.setMaxLength]])\n * @returns Whether or not this field is combed.\n */\n isCombed(): boolean {\n return (\n this.acroField.hasFlag(AcroTextFlags.Comb) &&\n !this.isMultiline() &&\n !this.isPassword() &&\n !this.isFileSelector() &&\n this.getMaxLength() !== undefined\n );\n }\n\n /**\n * Split this field into `n` equal size cells with one character in each\n * (where `n` is equal to the max length of the text field). This will cause\n * all characters in the field to be displayed an equal distance apart from\n * one another. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enableCombing()\n * ```\n *\n * In addition to calling this method, text fields must have a max length\n * defined in order to be combed (see [[PDFTextField.setMaxLength]]).\n *\n * This method will also call the following three methods internally:\n * * [[PDFTextField.disableMultiline]]\n * * [[PDFTextField.disablePassword]]\n * * [[PDFTextField.disableFileSelection]]\n *\n * This method will mark this text field as dirty. See\n * [[PDFTextField.setText]] for more details about what this means.\n */\n enableCombing() {\n if (this.getMaxLength() === undefined) {\n const msg = `PDFTextFields must have a max length in order to be combed`;\n console.warn(msg);\n }\n\n this.markAsDirty();\n\n this.disableMultiline();\n this.disablePassword();\n this.disableFileSelection();\n\n this.acroField.setFlagTo(AcroTextFlags.Comb, true);\n }\n\n /**\n * Turn off combing for this text field. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disableCombing()\n * ```\n * See [[PDFTextField.isCombed]] and [[PDFTextField.enableCombing]] for more\n * information about what combing is.\n *\n * This method will mark this text field as dirty. See\n * [[PDFTextField.setText]] for more details about what this means.\n */\n disableCombing() {\n this.markAsDirty();\n this.acroField.setFlagTo(AcroTextFlags.Comb, false);\n }\n\n /**\n * Returns `true` if this text field contains rich text. See\n * [[PDFTextField.enableRichFormatting]] and\n * [[PDFTextField.disableRichFormatting]]. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.isRichFormatted()) console.log('Rich formatting enabled')\n * ```\n * @returns Whether or not this field contains rich text.\n */\n isRichFormatted(): boolean {\n return this.acroField.hasFlag(AcroTextFlags.RichText);\n }\n\n /**\n * Indicate that this field contains XFA data - or rich text. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.enableRichFormatting()\n * ```\n * Note that `pdf-lib` does not support reading or writing rich text fields.\n * Nor do most PDF readers and writers. Rich text fields are based on XFA\n * (XML Forms Architecture). Relatively few PDFs use rich text fields or XFA.\n * Unlike PDF itself, XFA is not an ISO standard. XFA has been deprecated in\n * PDF 2.0:\n * * https://en.wikipedia.org/wiki/XFA\n * * http://blog.pdfshareforms.com/pdf-2-0-release-bid-farewell-xfa-forms/\n */\n enableRichFormatting() {\n this.acroField.setFlagTo(AcroTextFlags.RichText, true);\n }\n\n /**\n * Indicate that this is a standard text field that does not XFA data (rich\n * text). For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * textField.disableRichFormatting()\n * ```\n */\n disableRichFormatting() {\n this.acroField.setFlagTo(AcroTextFlags.RichText, false);\n }\n\n /**\n * Show this text field on the specified page. For example:\n * ```js\n * const ubuntuFont = await pdfDoc.embedFont(ubuntuFontBytes)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const textField = form.createTextField('best.gundam')\n * textField.setText('Exia')\n *\n * textField.addToPage(page, {\n * x: 50,\n * y: 75,\n * width: 200,\n * height: 100,\n * textColor: rgb(1, 0, 0),\n * backgroundColor: rgb(0, 1, 0),\n * borderColor: rgb(0, 0, 1),\n * borderWidth: 2,\n * rotate: degrees(90),\n * font: ubuntuFont,\n * })\n * ```\n * This will create a new widget for this text field.\n * @param page The page to which this text field widget should be added.\n * @param options The options to be used when adding this text field widget.\n */\n addToPage(page: PDFPage, options?: FieldAppearanceOptions) {\n assertIs(page, 'page', [[PDFPage, 'PDFPage']]);\n assertFieldAppearanceOptions(options);\n\n if (!options) options = {};\n\n if (!('textColor' in options)) options.textColor = rgb(0, 0, 0);\n if (!('backgroundColor' in options)) options.backgroundColor = rgb(1, 1, 1);\n if (!('borderColor' in options)) options.borderColor = rgb(0, 0, 0);\n if (!('borderWidth' in options)) options.borderWidth = 1;\n\n // Create a widget for this text field\n const widget = this.createWidget({\n x: options.x ?? 0,\n y: options.y ?? 0,\n width: options.width ?? 200,\n height: options.height ?? 50,\n textColor: options.textColor,\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth ?? 0,\n rotate: options.rotate ?? degrees(0),\n hidden: options.hidden,\n page: page.ref,\n });\n const widgetRef = this.doc.context.register(widget.dict);\n\n // Add widget to this field\n this.acroField.addWidget(widgetRef);\n\n // Set appearance streams for widget\n const font = options.font ?? this.doc.getForm().getDefaultFont();\n this.updateWidgetAppearance(widget, font);\n\n // Add widget to the given page\n page.node.addAnnot(widgetRef);\n }\n\n /**\n * Returns `true` if this text field has been marked as dirty, or if any of\n * this text field's widgets do not have an appearance stream. For example:\n * ```js\n * const textField = form.getTextField('some.text.field')\n * if (textField.needsAppearancesUpdate()) console.log('Needs update')\n * ```\n * @returns Whether or not this text field needs an appearance update.\n */\n needsAppearancesUpdate(): boolean {\n if (this.isDirty()) return true;\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const hasAppearances =\n widget.getAppearances()?.normal instanceof PDFStream;\n if (!hasAppearances) return true;\n }\n\n return false;\n }\n\n /**\n * Update the appearance streams for each of this text field's widgets using\n * the default appearance provider for text fields. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const textField = form.getTextField('some.text.field')\n * textField.defaultUpdateAppearances(helvetica)\n * ```\n * @param font The font to be used for creating the appearance streams.\n */\n defaultUpdateAppearances(font: PDFFont) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n this.updateAppearances(font);\n }\n\n /**\n * Update the appearance streams for each of this text field's widgets using\n * the given appearance provider. If no `provider` is passed, the default\n * appearance provider for text fields will be used. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const textField = form.getTextField('some.text.field')\n * textField.updateAppearances(helvetica, (field, widget, font) => {\n * ...\n * return drawTextField(...)\n * })\n * ```\n * @param font The font to be used for creating the appearance streams.\n * @param provider Optionally, the appearance provider to be used for\n * generating the contents of the appearance streams.\n */\n updateAppearances(\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n assertOrUndefined(provider, 'provider', [Function]);\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n this.updateWidgetAppearance(widget, font, provider);\n }\n this.markAsClean();\n }\n\n private updateWidgetAppearance(\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n const apProvider = provider ?? defaultTextFieldAppearanceProvider;\n const appearances = normalizeAppearance(apProvider(this, widget, font));\n this.updateWidgetAppearanceWithFont(widget, font, appearances);\n }\n}\n","export enum StandardFonts {\n Courier = 'Courier',\n CourierBold = 'Courier-Bold',\n CourierOblique = 'Courier-Oblique',\n CourierBoldOblique = 'Courier-BoldOblique',\n Helvetica = 'Helvetica',\n HelveticaBold = 'Helvetica-Bold',\n HelveticaOblique = 'Helvetica-Oblique',\n HelveticaBoldOblique = 'Helvetica-BoldOblique',\n TimesRoman = 'Times-Roman',\n TimesRomanBold = 'Times-Bold',\n TimesRomanItalic = 'Times-Italic',\n TimesRomanBoldItalic = 'Times-BoldItalic',\n Symbol = 'Symbol',\n ZapfDingbats = 'ZapfDingbats',\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFField from 'src/api/form/PDFField';\nimport PDFButton from 'src/api/form/PDFButton';\nimport PDFCheckBox from 'src/api/form/PDFCheckBox';\nimport PDFDropdown from 'src/api/form/PDFDropdown';\nimport PDFOptionList from 'src/api/form/PDFOptionList';\nimport PDFRadioGroup from 'src/api/form/PDFRadioGroup';\nimport PDFSignature from 'src/api/form/PDFSignature';\nimport PDFTextField from 'src/api/form/PDFTextField';\nimport {\n NoSuchFieldError,\n UnexpectedFieldTypeError,\n FieldAlreadyExistsError,\n InvalidFieldNamePartError,\n} from 'src/api/errors';\nimport PDFFont from 'src/api/PDFFont';\nimport { StandardFonts } from 'src/api/StandardFonts';\nimport { rotateInPlace } from 'src/api/operations';\nimport {\n drawObject,\n popGraphicsState,\n pushGraphicsState,\n translate,\n} from 'src/api/operators';\nimport {\n PDFAcroForm,\n PDFAcroField,\n PDFAcroCheckBox,\n PDFAcroComboBox,\n PDFAcroListBox,\n PDFAcroRadioButton,\n PDFAcroSignature,\n PDFAcroText,\n PDFAcroPushButton,\n PDFAcroNonTerminal,\n PDFDict,\n PDFOperator,\n PDFRef,\n createPDFAcroFields,\n PDFName,\n PDFWidgetAnnotation,\n} from 'src/core';\nimport { assertIs, Cache, assertOrUndefined } from 'src/utils';\n\nexport interface FlattenOptions {\n updateFieldAppearances: boolean;\n}\n\n/**\n * Represents the interactive form of a [[PDFDocument]].\n *\n * Interactive forms (sometimes called _AcroForms_) are collections of fields\n * designed to gather information from a user. A PDF document may contains any\n * number of fields that appear on various pages, all of which make up a single,\n * global interactive form spanning the entire document. This means that\n * instances of [[PDFDocument]] shall contain at most one [[PDFForm]].\n *\n * The fields of an interactive form are represented by [[PDFField]] instances.\n */\nexport default class PDFForm {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.getForm]] method, which will create an\n * > instance of [[PDFForm]] for you.\n *\n * Create an instance of [[PDFForm]] from an existing acroForm and embedder\n *\n * @param acroForm The underlying `PDFAcroForm` for this form.\n * @param doc The document to which the form will belong.\n */\n static of = (acroForm: PDFAcroForm, doc: PDFDocument) =>\n new PDFForm(acroForm, doc);\n\n /** The low-level PDFAcroForm wrapped by this form. */\n readonly acroForm: PDFAcroForm;\n\n /** The document to which this form belongs. */\n readonly doc: PDFDocument;\n\n private readonly dirtyFields: Set;\n private readonly defaultFontCache: Cache;\n\n private constructor(acroForm: PDFAcroForm, doc: PDFDocument) {\n assertIs(acroForm, 'acroForm', [[PDFAcroForm, 'PDFAcroForm']]);\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n\n this.acroForm = acroForm;\n this.doc = doc;\n\n this.dirtyFields = new Set();\n this.defaultFontCache = Cache.populatedBy(this.embedDefaultFont);\n }\n\n /**\n * Returns `true` if this [[PDFForm]] has XFA data. Most PDFs with form\n * fields do not use XFA as it is not widely supported by PDF readers.\n *\n * > `pdf-lib` does not support creation, modification, or reading of XFA\n * > fields.\n *\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * if (form.hasXFA()) console.log('PDF has XFA data')\n * ```\n * @returns Whether or not this form has XFA data.\n */\n hasXFA(): boolean {\n return this.acroForm.dict.has(PDFName.of('XFA'));\n }\n\n /**\n * Disconnect the XFA data from this [[PDFForm]] (if any exists). This will\n * force readers to fallback to standard fields if the [[PDFDocument]]\n * contains any. For example:\n *\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * form.deleteXFA()\n * ```\n */\n deleteXFA(): void {\n this.acroForm.dict.delete(PDFName.of('XFA'));\n }\n\n /**\n * Get all fields contained in this [[PDFForm]]. For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const fields = form.getFields()\n * fields.forEach(field => {\n * const type = field.constructor.name\n * const name = field.getName()\n * console.log(`${type}: ${name}`)\n * })\n * ```\n * @returns An array of all fields in this form.\n */\n getFields(): PDFField[] {\n const allFields = this.acroForm.getAllFields();\n\n const fields: PDFField[] = [];\n for (let idx = 0, len = allFields.length; idx < len; idx++) {\n const [acroField, ref] = allFields[idx];\n const field = convertToPDFField(acroField, ref, this.doc);\n if (field) fields.push(field);\n }\n\n return fields;\n }\n\n /**\n * Get the field in this [[PDFForm]] with the given name. For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const field = form.getFieldMaybe('Page1.Foo.Bar[0]')\n * if (field) console.log('Field exists!')\n * ```\n * @param name A fully qualified field name.\n * @returns The field with the specified name, if one exists.\n */\n getFieldMaybe(name: string): PDFField | undefined {\n assertIs(name, 'name', ['string']);\n const fields = this.getFields();\n for (let idx = 0, len = fields.length; idx < len; idx++) {\n const field = fields[idx];\n if (field.getName() === name) return field;\n }\n return undefined;\n }\n\n /**\n * Get the field in this [[PDFForm]] with the given name. For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const field = form.getField('Page1.Foo.Bar[0]')\n * ```\n * If no field exists with the provided name, an error will be thrown.\n * @param name A fully qualified field name.\n * @returns The field with the specified name.\n */\n getField(name: string): PDFField {\n assertIs(name, 'name', ['string']);\n const field = this.getFieldMaybe(name);\n if (field) return field;\n throw new NoSuchFieldError(name);\n }\n\n /**\n * Get the button field in this [[PDFForm]] with the given name. For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const button = form.getButton('Page1.Foo.Button[0]')\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not a button.\n * @param name A fully qualified button name.\n * @returns The button with the specified name.\n */\n getButton(name: string): PDFButton {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFButton) return field;\n throw new UnexpectedFieldTypeError(name, PDFButton, field);\n }\n\n /**\n * Get the check box field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const checkBox = form.getCheckBox('Page1.Foo.CheckBox[0]')\n * checkBox.check()\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not a check box.\n * @param name A fully qualified check box name.\n * @returns The check box with the specified name.\n */\n getCheckBox(name: string): PDFCheckBox {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFCheckBox) return field;\n throw new UnexpectedFieldTypeError(name, PDFCheckBox, field);\n }\n\n /**\n * Get the dropdown field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const dropdown = form.getDropdown('Page1.Foo.Dropdown[0]')\n * const options = dropdown.getOptions()\n * dropdown.select(options[0])\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not a dropdown.\n * @param name A fully qualified dropdown name.\n * @returns The dropdown with the specified name.\n */\n getDropdown(name: string): PDFDropdown {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFDropdown) return field;\n throw new UnexpectedFieldTypeError(name, PDFDropdown, field);\n }\n\n /**\n * Get the option list field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const optionList = form.getOptionList('Page1.Foo.OptionList[0]')\n * const options = optionList.getOptions()\n * optionList.select(options[0])\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not an option list.\n * @param name A fully qualified option list name.\n * @returns The option list with the specified name.\n */\n getOptionList(name: string): PDFOptionList {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFOptionList) return field;\n throw new UnexpectedFieldTypeError(name, PDFOptionList, field);\n }\n\n /**\n * Get the radio group field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const radioGroup = form.getRadioGroup('Page1.Foo.RadioGroup[0]')\n * const options = radioGroup.getOptions()\n * radioGroup.select(options[0])\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not a radio group.\n * @param name A fully qualified radio group name.\n * @returns The radio group with the specified name.\n */\n getRadioGroup(name: string): PDFRadioGroup {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFRadioGroup) return field;\n throw new UnexpectedFieldTypeError(name, PDFRadioGroup, field);\n }\n\n /**\n * Get the signature field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const signature = form.getSignature('Page1.Foo.Signature[0]')\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not a signature.\n * @param name A fully qualified signature name.\n * @returns The signature with the specified name.\n */\n getSignature(name: string): PDFSignature {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFSignature) return field;\n throw new UnexpectedFieldTypeError(name, PDFSignature, field);\n }\n\n /**\n * Get the text field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const textField = form.getTextField('Page1.Foo.TextField[0]')\n * textField.setText('Are you designed to act or to be acted upon?')\n * ```\n * An error will be thrown if no field exists with the provided name, or if\n * the field exists but is not a text field.\n * @param name A fully qualified text field name.\n * @returns The text field with the specified name.\n */\n getTextField(name: string): PDFTextField {\n assertIs(name, 'name', ['string']);\n const field = this.getField(name);\n if (field instanceof PDFTextField) return field;\n throw new UnexpectedFieldTypeError(name, PDFTextField, field);\n }\n\n /**\n * Create a new button field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const font = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const button = form.createButton('cool.new.button')\n *\n * button.addToPage('Do Stuff', font, page)\n * ```\n * An error will be thrown if a field already exists with the provided name.\n * @param name The fully qualified name for the new button.\n * @returns The new button field.\n */\n createButton(name: string): PDFButton {\n assertIs(name, 'name', ['string']);\n\n const nameParts = splitFieldName(name);\n const parent = this.findOrCreateNonTerminals(nameParts.nonTerminal);\n\n const button = PDFAcroPushButton.create(this.doc.context);\n button.setPartialName(nameParts.terminal);\n\n addFieldToParent(parent, [button, button.ref], nameParts.terminal);\n\n return PDFButton.of(button, button.ref, this.doc);\n }\n\n /**\n * Create a new check box field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const font = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const checkBox = form.createCheckBox('cool.new.checkBox')\n *\n * checkBox.addToPage(page)\n * ```\n * An error will be thrown if a field already exists with the provided name.\n * @param name The fully qualified name for the new check box.\n * @returns The new check box field.\n */\n createCheckBox(name: string): PDFCheckBox {\n assertIs(name, 'name', ['string']);\n\n const nameParts = splitFieldName(name);\n const parent = this.findOrCreateNonTerminals(nameParts.nonTerminal);\n\n const checkBox = PDFAcroCheckBox.create(this.doc.context);\n checkBox.setPartialName(nameParts.terminal);\n\n addFieldToParent(parent, [checkBox, checkBox.ref], nameParts.terminal);\n\n return PDFCheckBox.of(checkBox, checkBox.ref, this.doc);\n }\n\n /**\n * Create a new dropdown field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const font = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const dropdown = form.createDropdown('cool.new.dropdown')\n *\n * dropdown.addToPage(font, page)\n * ```\n * An error will be thrown if a field already exists with the provided name.\n * @param name The fully qualified name for the new dropdown.\n * @returns The new dropdown field.\n */\n createDropdown(name: string): PDFDropdown {\n assertIs(name, 'name', ['string']);\n\n const nameParts = splitFieldName(name);\n const parent = this.findOrCreateNonTerminals(nameParts.nonTerminal);\n\n const comboBox = PDFAcroComboBox.create(this.doc.context);\n comboBox.setPartialName(nameParts.terminal);\n\n addFieldToParent(parent, [comboBox, comboBox.ref], nameParts.terminal);\n\n return PDFDropdown.of(comboBox, comboBox.ref, this.doc);\n }\n\n /**\n * Create a new option list field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const font = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const optionList = form.createOptionList('cool.new.optionList')\n *\n * optionList.addToPage(font, page)\n * ```\n * An error will be thrown if a field already exists with the provided name.\n * @param name The fully qualified name for the new option list.\n * @returns The new option list field.\n */\n createOptionList(name: string): PDFOptionList {\n assertIs(name, 'name', ['string']);\n\n const nameParts = splitFieldName(name);\n const parent = this.findOrCreateNonTerminals(nameParts.nonTerminal);\n\n const listBox = PDFAcroListBox.create(this.doc.context);\n listBox.setPartialName(nameParts.terminal);\n\n addFieldToParent(parent, [listBox, listBox.ref], nameParts.terminal);\n\n return PDFOptionList.of(listBox, listBox.ref, this.doc);\n }\n\n /**\n * Create a new radio group field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const font = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const radioGroup = form.createRadioGroup('cool.new.radioGroup')\n *\n * radioGroup.addOptionToPage('is-dog', page, { y: 0 })\n * radioGroup.addOptionToPage('is-cat', page, { y: 75 })\n * ```\n * An error will be thrown if a field already exists with the provided name.\n * @param name The fully qualified name for the new radio group.\n * @returns The new radio group field.\n */\n createRadioGroup(name: string): PDFRadioGroup {\n assertIs(name, 'name', ['string']);\n const nameParts = splitFieldName(name);\n\n const parent = this.findOrCreateNonTerminals(nameParts.nonTerminal);\n\n const radioButton = PDFAcroRadioButton.create(this.doc.context);\n radioButton.setPartialName(nameParts.terminal);\n\n addFieldToParent(\n parent,\n [radioButton, radioButton.ref],\n nameParts.terminal,\n );\n\n return PDFRadioGroup.of(radioButton, radioButton.ref, this.doc);\n }\n\n /**\n * Create a new text field in this [[PDFForm]] with the given name.\n * For example:\n * ```js\n * const font = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const textField = form.createTextField('cool.new.textField')\n *\n * textField.addToPage(font, page)\n * ```\n * An error will be thrown if a field already exists with the provided name.\n * @param name The fully qualified name for the new radio group.\n * @returns The new radio group field.\n */\n createTextField(name: string): PDFTextField {\n assertIs(name, 'name', ['string']);\n const nameParts = splitFieldName(name);\n\n const parent = this.findOrCreateNonTerminals(nameParts.nonTerminal);\n\n const text = PDFAcroText.create(this.doc.context);\n text.setPartialName(nameParts.terminal);\n\n addFieldToParent(parent, [text, text.ref], nameParts.terminal);\n\n return PDFTextField.of(text, text.ref, this.doc);\n }\n\n /**\n * Flatten all fields in this [[PDFForm]].\n *\n * Flattening a form field will take the current appearance for each of that\n * field's widgets and make them part of their page's content stream. All form\n * fields and annotations associated are then removed. Note that once a form\n * has been flattened its fields can no longer be accessed or edited.\n *\n * This operation is often used after filling form fields to ensure a\n * consistent appearance across different PDF readers and/or printers.\n * Another common use case is to copy a template document with form fields\n * into another document. In this scenario you would load the template\n * document, fill its fields, flatten it, and then copy its pages into the\n * recipient document - the filled fields will be copied over.\n *\n * For example:\n * ```js\n * const form = pdfDoc.getForm();\n * form.flatten();\n * ```\n */\n flatten(options: FlattenOptions = { updateFieldAppearances: true }) {\n if (options.updateFieldAppearances) {\n this.updateFieldAppearances();\n }\n\n const fields = this.getFields();\n\n for (let i = 0, lenFields = fields.length; i < lenFields; i++) {\n const field = fields[i];\n const widgets = field.acroField.getWidgets();\n\n for (let j = 0, lenWidgets = widgets.length; j < lenWidgets; j++) {\n const widget = widgets[j];\n const page = this.findWidgetPage(widget);\n const widgetRef = this.findWidgetAppearanceRef(field, widget);\n\n const xObjectKey = page.node.newXObject('FlatWidget', widgetRef);\n\n const rectangle = widget.getRectangle();\n const operators = [\n pushGraphicsState(),\n translate(rectangle.x, rectangle.y),\n ...rotateInPlace({ ...rectangle, rotation: 0 }),\n drawObject(xObjectKey),\n popGraphicsState(),\n ].filter(Boolean) as PDFOperator[];\n\n page.pushOperators(...operators);\n }\n\n this.removeField(field);\n }\n }\n\n /**\n * Remove a field from this [[PDFForm]].\n *\n * For example:\n * ```js\n * const form = pdfDoc.getForm();\n * const ageField = form.getFields().find(x => x.getName() === 'Age');\n * form.removeField(ageField);\n * ```\n */\n removeField(field: PDFField) {\n const widgets = field.acroField.getWidgets();\n const pages: Set = new Set();\n\n for (let i = 0, len = widgets.length; i < len; i++) {\n const widget = widgets[i];\n const widgetRef = this.findWidgetAppearanceRef(field, widget);\n\n const page = this.findWidgetPage(widget);\n pages.add(page);\n\n page.node.removeAnnot(widgetRef);\n }\n\n pages.forEach((page) => page.node.removeAnnot(field.ref));\n this.acroForm.removeField(field.acroField);\n const fieldKids = field.acroField.normalizedEntries().Kids;\n const kidsCount = fieldKids.size();\n for (let childIndex = 0; childIndex < kidsCount; childIndex++) {\n const child = fieldKids.get(childIndex);\n if (child instanceof PDFRef) {\n this.doc.context.delete(child);\n }\n }\n this.doc.context.delete(field.ref);\n }\n\n /**\n * Update the appearance streams for all widgets of all fields in this\n * [[PDFForm]]. Appearance streams will only be created for a widget if it\n * does not have any existing appearance streams, or the field's value has\n * changed (e.g. by calling [[PDFTextField.setText]] or\n * [[PDFDropdown.select]]).\n *\n * For example:\n * ```js\n * const courier = await pdfDoc.embedFont(StandardFonts.Courier)\n * const form = pdfDoc.getForm()\n * form.updateFieldAppearances(courier)\n * ```\n *\n * **IMPORTANT:** The default value for the `font` parameter is\n * [[StandardFonts.Helvetica]]. Note that this is a WinAnsi font. This means\n * that encoding errors will be thrown if any fields contain text with\n * characters outside the WinAnsi character set (the latin alphabet).\n *\n * Embedding a custom font and passing that as the `font`\n * parameter allows you to generate appearance streams with non WinAnsi\n * characters (assuming your custom font supports them).\n *\n * > **NOTE:** The [[PDFDocument.save]] method will call this method to\n * > update appearances automatically if a form was accessed via the\n * > [[PDFDocument.getForm]] method prior to saving.\n *\n * @param font Optionally, the font to use when creating new appearances.\n */\n updateFieldAppearances(font?: PDFFont) {\n assertOrUndefined(font, 'font', [[PDFFont, 'PDFFont']]);\n\n font = font ?? this.getDefaultFont();\n\n const fields = this.getFields();\n\n for (let idx = 0, len = fields.length; idx < len; idx++) {\n const field = fields[idx];\n if (field.needsAppearancesUpdate()) {\n field.defaultUpdateAppearances(font);\n }\n }\n }\n\n /**\n * Mark a field as dirty. This will cause its appearance streams to be\n * updated by [[PDFForm.updateFieldAppearances]].\n * ```js\n * const form = pdfDoc.getForm()\n * const field = form.getField('foo.bar')\n * form.markFieldAsDirty(field.ref)\n * ```\n * @param fieldRef The reference to the field that should be marked.\n */\n markFieldAsDirty(fieldRef: PDFRef) {\n assertOrUndefined(fieldRef, 'fieldRef', [[PDFRef, 'PDFRef']]);\n this.dirtyFields.add(fieldRef);\n }\n\n /**\n * Mark a field as dirty. This will cause its appearance streams to not be\n * updated by [[PDFForm.updateFieldAppearances]].\n * ```js\n * const form = pdfDoc.getForm()\n * const field = form.getField('foo.bar')\n * form.markFieldAsClean(field.ref)\n * ```\n * @param fieldRef The reference to the field that should be marked.\n */\n markFieldAsClean(fieldRef: PDFRef) {\n assertOrUndefined(fieldRef, 'fieldRef', [[PDFRef, 'PDFRef']]);\n this.dirtyFields.delete(fieldRef);\n }\n\n /**\n * Returns `true` is the specified field has been marked as dirty.\n * ```js\n * const form = pdfDoc.getForm()\n * const field = form.getField('foo.bar')\n * if (form.fieldIsDirty(field.ref)) console.log('Field is dirty')\n * ```\n * @param fieldRef The reference to the field that should be checked.\n * @returns Whether or not the specified field is dirty.\n */\n fieldIsDirty(fieldRef: PDFRef): boolean {\n assertOrUndefined(fieldRef, 'fieldRef', [[PDFRef, 'PDFRef']]);\n return this.dirtyFields.has(fieldRef);\n }\n\n getDefaultFont() {\n return this.defaultFontCache.access();\n }\n\n private findWidgetPage(widget: PDFWidgetAnnotation): PDFPage {\n const pageRef = widget.P();\n let page = this.doc.getPages().find((x) => x.ref === pageRef);\n if (page === undefined) {\n const widgetRef = this.doc.context.getObjectRef(widget.dict);\n if (widgetRef === undefined) {\n throw new Error('Could not find PDFRef for PDFObject');\n }\n\n page = this.doc.findPageForAnnotationRef(widgetRef);\n\n if (page === undefined) {\n throw new Error(`Could not find page for PDFRef ${widgetRef}`);\n }\n }\n\n return page;\n }\n\n private findWidgetAppearanceRef(\n field: PDFField,\n widget: PDFWidgetAnnotation,\n ): PDFRef {\n let refOrDict = widget.getNormalAppearance();\n\n if (\n refOrDict instanceof PDFDict &&\n (field instanceof PDFCheckBox || field instanceof PDFRadioGroup)\n ) {\n const value = field.acroField.getValue();\n const ref = refOrDict.get(value) ?? refOrDict.get(PDFName.of('Off'));\n\n if (ref instanceof PDFRef) {\n refOrDict = ref;\n }\n }\n\n if (!(refOrDict instanceof PDFRef)) {\n const name = field.getName();\n throw new Error(`Failed to extract appearance ref for: ${name}`);\n }\n\n return refOrDict;\n }\n\n private findOrCreateNonTerminals(partialNames: string[]) {\n let nonTerminal: [PDFAcroForm] | [PDFAcroNonTerminal, PDFRef] = [\n this.acroForm,\n ];\n for (let idx = 0, len = partialNames.length; idx < len; idx++) {\n const namePart = partialNames[idx];\n if (!namePart) throw new InvalidFieldNamePartError(namePart);\n const [parent, parentRef] = nonTerminal;\n const res = this.findNonTerminal(namePart, parent);\n\n if (res) {\n nonTerminal = res;\n } else {\n const node = PDFAcroNonTerminal.create(this.doc.context);\n node.setPartialName(namePart);\n node.setParent(parentRef);\n const nodeRef = this.doc.context.register(node.dict);\n parent.addField(nodeRef);\n nonTerminal = [node, nodeRef];\n }\n }\n return nonTerminal;\n }\n\n private findNonTerminal(\n partialName: string,\n parent: PDFAcroForm | PDFAcroNonTerminal,\n ): [PDFAcroNonTerminal, PDFRef] | undefined {\n const fields =\n parent instanceof PDFAcroForm\n ? this.acroForm.getFields()\n : createPDFAcroFields(parent.Kids());\n\n for (let idx = 0, len = fields.length; idx < len; idx++) {\n const [field, ref] = fields[idx];\n if (field.getPartialName() === partialName) {\n if (field instanceof PDFAcroNonTerminal) return [field, ref];\n throw new FieldAlreadyExistsError(partialName);\n }\n }\n\n return undefined;\n }\n\n private embedDefaultFont = (): PDFFont =>\n this.doc.embedStandardFont(StandardFonts.Helvetica);\n}\n\nconst convertToPDFField = (\n field: PDFAcroField,\n ref: PDFRef,\n doc: PDFDocument,\n): PDFField | undefined => {\n if (field instanceof PDFAcroPushButton) return PDFButton.of(field, ref, doc);\n if (field instanceof PDFAcroCheckBox) return PDFCheckBox.of(field, ref, doc);\n if (field instanceof PDFAcroComboBox) return PDFDropdown.of(field, ref, doc);\n if (field instanceof PDFAcroListBox) return PDFOptionList.of(field, ref, doc);\n if (field instanceof PDFAcroText) return PDFTextField.of(field, ref, doc);\n if (field instanceof PDFAcroRadioButton) {\n return PDFRadioGroup.of(field, ref, doc);\n }\n if (field instanceof PDFAcroSignature) {\n return PDFSignature.of(field, ref, doc);\n }\n return undefined;\n};\n\nconst splitFieldName = (fullyQualifiedName: string) => {\n if (fullyQualifiedName.length === 0) {\n throw new Error('PDF field names must not be empty strings');\n }\n\n const parts = fullyQualifiedName.split('.');\n\n for (let idx = 0, len = parts.length; idx < len; idx++) {\n if (parts[idx] === '') {\n throw new Error(\n `Periods in PDF field names must be separated by at least one character: \"${fullyQualifiedName}\"`,\n );\n }\n }\n\n if (parts.length === 1) return { nonTerminal: [], terminal: parts[0] };\n\n return {\n nonTerminal: parts.slice(0, parts.length - 1),\n terminal: parts[parts.length - 1],\n };\n};\n\nconst addFieldToParent = (\n [parent, parentRef]: [PDFAcroForm] | [PDFAcroNonTerminal, PDFRef],\n [field, fieldRef]: [PDFAcroField, PDFRef],\n partialName: string,\n) => {\n const entries = parent.normalizedEntries();\n const fields = createPDFAcroFields(\n 'Kids' in entries ? entries.Kids : entries.Fields,\n );\n for (let idx = 0, len = fields.length; idx < len; idx++) {\n if (fields[idx][0].getPartialName() === partialName) {\n throw new FieldAlreadyExistsError(partialName);\n }\n }\n parent.addField(fieldRef);\n field.setParent(parentRef);\n};\n","import { EmbeddedFileOptions } from 'src/core/embedders/FileEmbedder';\nimport { TypeFeatures } from 'src/types/fontkit';\n\nexport enum ParseSpeeds {\n Fastest = Infinity,\n Fast = 1500,\n Medium = 500,\n Slow = 100,\n}\n\nexport interface AttachmentOptions extends EmbeddedFileOptions {}\n\nexport interface SaveOptions {\n useObjectStreams?: boolean;\n addDefaultPage?: boolean;\n objectsPerTick?: number;\n updateFieldAppearances?: boolean;\n}\n\nexport interface Base64SaveOptions extends SaveOptions {\n dataUri?: boolean;\n}\n\nexport interface LoadOptions {\n ignoreEncryption?: boolean;\n parseSpeed?: ParseSpeeds | number;\n throwOnInvalidObject?: boolean;\n updateMetadata?: boolean;\n capNumbers?: boolean;\n}\n\nexport interface CreateOptions {\n updateMetadata?: boolean;\n}\n\nexport interface EmbedFontOptions {\n subset?: boolean;\n customName?: string;\n features?: TypeFeatures;\n}\n\nexport interface SetTitleOptions {\n showInWindowTitleBar: boolean;\n}\n","export const PageSizes = {\n '4A0': [4767.87, 6740.79] as [number, number],\n '2A0': [3370.39, 4767.87] as [number, number],\n A0: [2383.94, 3370.39] as [number, number],\n A1: [1683.78, 2383.94] as [number, number],\n A2: [1190.55, 1683.78] as [number, number],\n A3: [841.89, 1190.55] as [number, number],\n A4: [595.28, 841.89] as [number, number],\n A5: [419.53, 595.28] as [number, number],\n A6: [297.64, 419.53] as [number, number],\n A7: [209.76, 297.64] as [number, number],\n A8: [147.4, 209.76] as [number, number],\n A9: [104.88, 147.4] as [number, number],\n A10: [73.7, 104.88] as [number, number],\n B0: [2834.65, 4008.19] as [number, number],\n B1: [2004.09, 2834.65] as [number, number],\n B2: [1417.32, 2004.09] as [number, number],\n B3: [1000.63, 1417.32] as [number, number],\n B4: [708.66, 1000.63] as [number, number],\n B5: [498.9, 708.66] as [number, number],\n B6: [354.33, 498.9] as [number, number],\n B7: [249.45, 354.33] as [number, number],\n B8: [175.75, 249.45] as [number, number],\n B9: [124.72, 175.75] as [number, number],\n B10: [87.87, 124.72] as [number, number],\n C0: [2599.37, 3676.54] as [number, number],\n C1: [1836.85, 2599.37] as [number, number],\n C2: [1298.27, 1836.85] as [number, number],\n C3: [918.43, 1298.27] as [number, number],\n C4: [649.13, 918.43] as [number, number],\n C5: [459.21, 649.13] as [number, number],\n C6: [323.15, 459.21] as [number, number],\n C7: [229.61, 323.15] as [number, number],\n C8: [161.57, 229.61] as [number, number],\n C9: [113.39, 161.57] as [number, number],\n C10: [79.37, 113.39] as [number, number],\n RA0: [2437.8, 3458.27] as [number, number],\n RA1: [1729.13, 2437.8] as [number, number],\n RA2: [1218.9, 1729.13] as [number, number],\n RA3: [864.57, 1218.9] as [number, number],\n RA4: [609.45, 864.57] as [number, number],\n SRA0: [2551.18, 3628.35] as [number, number],\n SRA1: [1814.17, 2551.18] as [number, number],\n SRA2: [1275.59, 1814.17] as [number, number],\n SRA3: [907.09, 1275.59] as [number, number],\n SRA4: [637.8, 907.09] as [number, number],\n Executive: [521.86, 756.0] as [number, number],\n Folio: [612.0, 936.0] as [number, number],\n Legal: [612.0, 1008.0] as [number, number],\n Letter: [612.0, 792.0] as [number, number],\n Tabloid: [792.0, 1224.0] as [number, number],\n};\n","import Embeddable from 'src/api/Embeddable';\nimport PDFDocument from 'src/api/PDFDocument';\nimport FileEmbedder from 'src/core/embedders/FileEmbedder';\nimport { PDFName, PDFArray, PDFDict, PDFHexString, PDFRef } from 'src/core';\n\n/**\n * Represents a file that has been embedded in a [[PDFDocument]].\n */\nexport default class PDFEmbeddedFile implements Embeddable {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.attach]] method, which will create\n * instances of [[PDFEmbeddedFile]] for you.\n *\n * Create an instance of [[PDFEmbeddedFile]] from an existing ref and embedder\n *\n * @param ref The unique reference for this file.\n * @param doc The document to which the file will belong.\n * @param embedder The embedder that will be used to embed the file.\n */\n static of = (ref: PDFRef, doc: PDFDocument, embedder: FileEmbedder) =>\n new PDFEmbeddedFile(ref, doc, embedder);\n\n /** The unique reference assigned to this embedded file within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this embedded file belongs. */\n readonly doc: PDFDocument;\n\n private alreadyEmbedded = false;\n private readonly embedder: FileEmbedder;\n\n private constructor(ref: PDFRef, doc: PDFDocument, embedder: FileEmbedder) {\n this.ref = ref;\n this.doc = doc;\n this.embedder = embedder;\n }\n\n /**\n * > **NOTE:** You probably don't need to call this method directly. The\n * > [[PDFDocument.save]] and [[PDFDocument.saveAsBase64]] methods will\n * > automatically ensure all embeddable files get embedded.\n *\n * Embed this embeddable file in its document.\n *\n * @returns Resolves when the embedding is complete.\n */\n async embed(): Promise {\n if (!this.alreadyEmbedded) {\n const ref = await this.embedder.embedIntoContext(\n this.doc.context,\n this.ref,\n );\n\n if (!this.doc.catalog.has(PDFName.of('Names'))) {\n this.doc.catalog.set(PDFName.of('Names'), this.doc.context.obj({}));\n }\n const Names = this.doc.catalog.lookup(PDFName.of('Names'), PDFDict);\n\n if (!Names.has(PDFName.of('EmbeddedFiles'))) {\n Names.set(PDFName.of('EmbeddedFiles'), this.doc.context.obj({}));\n }\n const EmbeddedFiles = Names.lookup(PDFName.of('EmbeddedFiles'), PDFDict);\n\n if (!EmbeddedFiles.has(PDFName.of('Names'))) {\n EmbeddedFiles.set(PDFName.of('Names'), this.doc.context.obj([]));\n }\n const EFNames = EmbeddedFiles.lookup(PDFName.of('Names'), PDFArray);\n\n EFNames.push(PDFHexString.fromText(this.embedder.fileName));\n EFNames.push(ref);\n\n /**\n * The AF-Tag is needed to achieve PDF-A3 compliance for embedded files\n *\n * The following document outlines the uses cases of the associated files (AF) tag.\n * See:\n * https://www.pdfa.org/wp-content/uploads/2018/10/PDF20_AN002-AF.pdf\n */\n\n if (!this.doc.catalog.has(PDFName.of('AF'))) {\n this.doc.catalog.set(PDFName.of('AF'), this.doc.context.obj([]));\n }\n const AF = this.doc.catalog.lookup(PDFName.of('AF'), PDFArray);\n AF.push(ref);\n\n this.alreadyEmbedded = true;\n }\n }\n}\n","import Embeddable from 'src/api/Embeddable';\nimport PDFDocument from 'src/api/PDFDocument';\nimport JavaScriptEmbedder from 'src/core/embedders/JavaScriptEmbedder';\nimport { PDFName, PDFArray, PDFDict, PDFHexString, PDFRef } from 'src/core';\n\n/**\n * Represents JavaScript that has been embedded in a [[PDFDocument]].\n */\nexport default class PDFJavaScript implements Embeddable {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.addJavaScript]] method, which will\n * create instances of [[PDFJavaScript]] for you.\n *\n * Create an instance of [[PDFJavaScript]] from an existing ref and script\n *\n * @param ref The unique reference for this script.\n * @param doc The document to which the script will belong.\n * @param embedder The embedder that will be used to embed the script.\n */\n static of = (ref: PDFRef, doc: PDFDocument, embedder: JavaScriptEmbedder) =>\n new PDFJavaScript(ref, doc, embedder);\n\n /** The unique reference assigned to this embedded script within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this embedded script belongs. */\n readonly doc: PDFDocument;\n\n private alreadyEmbedded = false;\n private readonly embedder: JavaScriptEmbedder;\n\n private constructor(\n ref: PDFRef,\n doc: PDFDocument,\n embedder: JavaScriptEmbedder,\n ) {\n this.ref = ref;\n this.doc = doc;\n this.embedder = embedder;\n }\n\n /**\n * > **NOTE:** You probably don't need to call this method directly. The\n * > [[PDFDocument.save]] and [[PDFDocument.saveAsBase64]] methods will\n * > automatically ensure all JavaScripts get embedded.\n *\n * Embed this JavaScript in its document.\n *\n * @returns Resolves when the embedding is complete.\n */\n async embed(): Promise {\n if (!this.alreadyEmbedded) {\n const { catalog, context } = this.doc;\n\n const ref = await this.embedder.embedIntoContext(\n this.doc.context,\n this.ref,\n );\n\n if (!catalog.has(PDFName.of('Names'))) {\n catalog.set(PDFName.of('Names'), context.obj({}));\n }\n const Names = catalog.lookup(PDFName.of('Names'), PDFDict);\n\n if (!Names.has(PDFName.of('JavaScript'))) {\n Names.set(PDFName.of('JavaScript'), context.obj({}));\n }\n const Javascript = Names.lookup(PDFName.of('JavaScript'), PDFDict);\n\n if (!Javascript.has(PDFName.of('Names'))) {\n Javascript.set(PDFName.of('Names'), context.obj([]));\n }\n const JSNames = Javascript.lookup(PDFName.of('Names'), PDFArray);\n\n JSNames.push(PDFHexString.fromText(this.embedder.scriptName));\n JSNames.push(ref);\n\n this.alreadyEmbedded = true;\n }\n }\n}\n","import PDFHexString from 'src/core/objects/PDFHexString';\nimport PDFContext from 'src/core/PDFContext';\nimport PDFRef from 'src/core/objects/PDFRef';\n\nclass JavaScriptEmbedder {\n static for(script: string, scriptName: string) {\n return new JavaScriptEmbedder(script, scriptName);\n }\n\n private readonly script: string;\n readonly scriptName: string;\n\n private constructor(script: string, scriptName: string) {\n this.script = script;\n this.scriptName = scriptName;\n }\n\n async embedIntoContext(context: PDFContext, ref?: PDFRef): Promise {\n const jsActionDict = context.obj({\n Type: 'Action',\n S: 'JavaScript',\n JS: PDFHexString.fromText(this.script),\n });\n\n if (ref) {\n context.assign(ref, jsActionDict);\n return ref;\n } else {\n return context.register(jsActionDict);\n }\n }\n}\n\nexport default JavaScriptEmbedder;\n","import Embeddable from 'src/api/Embeddable';\nimport {\n EncryptedPDFError,\n FontkitNotRegisteredError,\n ForeignPageError,\n RemovePageFromEmptyDocumentError,\n} from 'src/api/errors';\nimport PDFEmbeddedPage from 'src/api/PDFEmbeddedPage';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFImage from 'src/api/PDFImage';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFForm from 'src/api/form/PDFForm';\nimport { PageSizes } from 'src/api/sizes';\nimport { StandardFonts } from 'src/api/StandardFonts';\nimport {\n CustomFontEmbedder,\n CustomFontSubsetEmbedder,\n JpegEmbedder,\n PageBoundingBox,\n PageEmbeddingMismatchedContextError,\n PDFCatalog,\n PDFContext,\n PDFDict,\n PDFHexString,\n PDFName,\n PDFObjectCopier,\n PDFPageEmbedder,\n PDFPageLeaf,\n PDFPageTree,\n PDFParser,\n PDFStreamWriter,\n PDFString,\n PDFWriter,\n PngEmbedder,\n StandardFontEmbedder,\n UnexpectedObjectTypeError,\n} from 'src/core';\nimport {\n ParseSpeeds,\n AttachmentOptions,\n SaveOptions,\n Base64SaveOptions,\n LoadOptions,\n CreateOptions,\n EmbedFontOptions,\n SetTitleOptions,\n} from 'src/api/PDFDocumentOptions';\nimport PDFObject from 'src/core/objects/PDFObject';\nimport PDFRef from 'src/core/objects/PDFRef';\nimport { Fontkit } from 'src/types/fontkit';\nimport { TransformationMatrix } from 'src/types/matrix';\nimport {\n assertIs,\n assertIsOneOfOrUndefined,\n assertOrUndefined,\n assertRange,\n Cache,\n canBeConvertedToUint8Array,\n encodeToBase64,\n isStandardFont,\n pluckIndices,\n range,\n toUint8Array,\n} from 'src/utils';\nimport FileEmbedder, { AFRelationship } from 'src/core/embedders/FileEmbedder';\nimport PDFEmbeddedFile from 'src/api/PDFEmbeddedFile';\nimport PDFJavaScript from 'src/api/PDFJavaScript';\nimport JavaScriptEmbedder from 'src/core/embedders/JavaScriptEmbedder';\n\n/**\n * Represents a PDF document.\n */\nexport default class PDFDocument {\n /**\n * Load an existing [[PDFDocument]]. The input data can be provided in\n * multiple formats:\n *\n * | Type | Contents |\n * | ------------- | ------------------------------------------------------ |\n * | `string` | A base64 encoded string (or data URI) containing a PDF |\n * | `Uint8Array` | The raw bytes of a PDF |\n * | `ArrayBuffer` | The raw bytes of a PDF |\n *\n * For example:\n * ```js\n * import { PDFDocument } from 'pdf-lib'\n *\n * // pdf=string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data:application/pdf;base64,' + base64\n *\n * const pdfDoc1 = await PDFDocument.load(base64)\n * const pdfDoc2 = await PDFDocument.load(dataUri)\n *\n * // pdf=Uint8Array\n * import fs from 'fs'\n * const uint8Array = fs.readFileSync('with_update_sections.pdf')\n * const pdfDoc3 = await PDFDocument.load(uint8Array)\n *\n * // pdf=ArrayBuffer\n * const url = 'https://pdf-lib.js.org/assets/with_update_sections.pdf'\n * const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())\n * const pdfDoc4 = await PDFDocument.load(arrayBuffer)\n *\n * ```\n *\n * @param pdf The input data containing a PDF document.\n * @param options The options to be used when loading the document.\n * @returns Resolves with a document loaded from the input.\n */\n static async load(\n pdf: string | Uint8Array | ArrayBuffer,\n options: LoadOptions = {},\n ) {\n const {\n ignoreEncryption = false,\n parseSpeed = ParseSpeeds.Slow,\n throwOnInvalidObject = false,\n updateMetadata = true,\n capNumbers = false,\n } = options;\n\n assertIs(pdf, 'pdf', ['string', Uint8Array, ArrayBuffer]);\n assertIs(ignoreEncryption, 'ignoreEncryption', ['boolean']);\n assertIs(parseSpeed, 'parseSpeed', ['number']);\n assertIs(throwOnInvalidObject, 'throwOnInvalidObject', ['boolean']);\n\n const bytes = toUint8Array(pdf);\n const context = await PDFParser.forBytesWithOptions(\n bytes,\n parseSpeed,\n throwOnInvalidObject,\n capNumbers,\n ).parseDocument();\n return new PDFDocument(context, ignoreEncryption, updateMetadata);\n }\n\n /**\n * Create a new [[PDFDocument]].\n * @returns Resolves with the newly created document.\n */\n static async create(options: CreateOptions = {}) {\n const { updateMetadata = true } = options;\n\n const context = PDFContext.create();\n const pageTree = PDFPageTree.withContext(context);\n const pageTreeRef = context.register(pageTree);\n const catalog = PDFCatalog.withContextAndPages(context, pageTreeRef);\n context.trailerInfo.Root = context.register(catalog);\n\n return new PDFDocument(context, false, updateMetadata);\n }\n\n /** The low-level context of this document. */\n readonly context: PDFContext;\n\n /** The catalog of this document. */\n readonly catalog: PDFCatalog;\n\n /** Whether or not this document is encrypted. */\n readonly isEncrypted: boolean;\n\n /** The default word breaks used in PDFPage.drawText */\n defaultWordBreaks: string[] = [' '];\n\n private fontkit?: Fontkit;\n private pageCount: number | undefined;\n private readonly pageCache: Cache;\n private readonly pageMap: Map;\n private readonly formCache: Cache;\n private readonly fonts: PDFFont[];\n private readonly images: PDFImage[];\n private readonly embeddedPages: PDFEmbeddedPage[];\n private readonly embeddedFiles: PDFEmbeddedFile[];\n private readonly javaScripts: PDFJavaScript[];\n\n private constructor(\n context: PDFContext,\n ignoreEncryption: boolean,\n updateMetadata: boolean,\n ) {\n assertIs(context, 'context', [[PDFContext, 'PDFContext']]);\n assertIs(ignoreEncryption, 'ignoreEncryption', ['boolean']);\n\n this.context = context;\n this.catalog = context.lookup(context.trailerInfo.Root) as PDFCatalog;\n this.isEncrypted = !!context.lookup(context.trailerInfo.Encrypt);\n\n this.pageCache = Cache.populatedBy(this.computePages);\n this.pageMap = new Map();\n this.formCache = Cache.populatedBy(this.getOrCreateForm);\n this.fonts = [];\n this.images = [];\n this.embeddedPages = [];\n this.embeddedFiles = [];\n this.javaScripts = [];\n\n if (!ignoreEncryption && this.isEncrypted) throw new EncryptedPDFError();\n\n if (updateMetadata) this.updateInfoDict();\n }\n\n /**\n * Register a fontkit instance. This must be done before custom fonts can\n * be embedded. See [here](https://github.com/Hopding/pdf-lib/tree/master#fontkit-installation)\n * for instructions on how to install and register a fontkit instance.\n *\n * > You do **not** need to call this method to embed standard fonts.\n *\n * For example:\n * ```js\n * import { PDFDocument } from 'pdf-lib'\n * import fontkit from '@pdf-lib/fontkit'\n *\n * const pdfDoc = await PDFDocument.create()\n * pdfDoc.registerFontkit(fontkit)\n * ```\n *\n * @param fontkit The fontkit instance to be registered.\n */\n registerFontkit(fontkit: Fontkit): void {\n this.fontkit = fontkit;\n }\n\n /**\n * Get the [[PDFForm]] containing all interactive fields for this document.\n * For example:\n * ```js\n * const form = pdfDoc.getForm()\n * const fields = form.getFields()\n * fields.forEach(field => {\n * const type = field.constructor.name\n * const name = field.getName()\n * console.log(`${type}: ${name}`)\n * })\n * ```\n * @returns The form for this document.\n */\n getForm(): PDFForm {\n const form = this.formCache.access();\n if (form.hasXFA()) {\n console.warn(\n 'Removing XFA form data as pdf-lib does not support reading or writing XFA',\n );\n form.deleteXFA();\n }\n return form;\n }\n\n /**\n * Get this document's title metadata. The title appears in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const title = pdfDoc.getTitle()\n * ```\n * @returns A string containing the title of this document, if it has one.\n */\n getTitle(): string | undefined {\n const title = this.getInfoDict().lookup(PDFName.Title);\n if (!title) return undefined;\n assertIsLiteralOrHexString(title);\n return title.decodeText();\n }\n\n /**\n * Get this document's author metadata. The author appears in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const author = pdfDoc.getAuthor()\n * ```\n * @returns A string containing the author of this document, if it has one.\n */\n getAuthor(): string | undefined {\n const author = this.getInfoDict().lookup(PDFName.Author);\n if (!author) return undefined;\n assertIsLiteralOrHexString(author);\n return author.decodeText();\n }\n\n /**\n * Get this document's subject metadata. The subject appears in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const subject = pdfDoc.getSubject()\n * ```\n * @returns A string containing the subject of this document, if it has one.\n */\n getSubject(): string | undefined {\n const subject = this.getInfoDict().lookup(PDFName.Subject);\n if (!subject) return undefined;\n assertIsLiteralOrHexString(subject);\n return subject.decodeText();\n }\n\n /**\n * Get this document's keywords metadata. The keywords appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const keywords = pdfDoc.getKeywords()\n * ```\n * @returns A string containing the keywords of this document, if it has any.\n */\n getKeywords(): string | undefined {\n const keywords = this.getInfoDict().lookup(PDFName.Keywords);\n if (!keywords) return undefined;\n assertIsLiteralOrHexString(keywords);\n return keywords.decodeText();\n }\n\n /**\n * Get this document's creator metadata. The creator appears in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const creator = pdfDoc.getCreator()\n * ```\n * @returns A string containing the creator of this document, if it has one.\n */\n getCreator(): string | undefined {\n const creator = this.getInfoDict().lookup(PDFName.Creator);\n if (!creator) return undefined;\n assertIsLiteralOrHexString(creator);\n return creator.decodeText();\n }\n\n /**\n * Get this document's producer metadata. The producer appears in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const producer = pdfDoc.getProducer()\n * ```\n * @returns A string containing the producer of this document, if it has one.\n */\n getProducer(): string | undefined {\n const producer = this.getInfoDict().lookup(PDFName.Producer);\n if (!producer) return undefined;\n assertIsLiteralOrHexString(producer);\n return producer.decodeText();\n }\n\n /**\n * Get this document's creation date metadata. The creation date appears in\n * the \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * const creationDate = pdfDoc.getCreationDate()\n * ```\n * @returns A Date containing the creation date of this document,\n * if it has one.\n */\n getCreationDate(): Date | undefined {\n const creationDate = this.getInfoDict().lookup(PDFName.CreationDate);\n if (!creationDate) return undefined;\n assertIsLiteralOrHexString(creationDate);\n return creationDate.decodeDate();\n }\n\n /**\n * Get this document's modification date metadata. The modification date\n * appears in the \"Document Properties\" section of most PDF readers.\n * For example:\n * ```js\n * const modification = pdfDoc.getModificationDate()\n * ```\n * @returns A Date containing the modification date of this document,\n * if it has one.\n */\n getModificationDate(): Date | undefined {\n const modificationDate = this.getInfoDict().lookup(PDFName.ModDate);\n if (!modificationDate) return undefined;\n assertIsLiteralOrHexString(modificationDate);\n return modificationDate.decodeDate();\n }\n\n /**\n * Set this document's title metadata. The title will appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setTitle('🥚 The Life of an Egg 🍳')\n * ```\n *\n * To display the title in the window's title bar, set the\n * `showInWindowTitleBar` option to `true` (works for _most_ PDF readers).\n * For example:\n * ```js\n * pdfDoc.setTitle('🥚 The Life of an Egg 🍳', { showInWindowTitleBar: true })\n * ```\n *\n * @param title The title of this document.\n * @param options The options to be used when setting the title.\n */\n setTitle(title: string, options?: SetTitleOptions): void {\n assertIs(title, 'title', ['string']);\n const key = PDFName.of('Title');\n this.getInfoDict().set(key, PDFHexString.fromText(title));\n\n // Indicate that readers should display the title rather than the filename\n if (options?.showInWindowTitleBar) {\n const prefs = this.catalog.getOrCreateViewerPreferences();\n prefs.setDisplayDocTitle(true);\n }\n }\n\n /**\n * Set this document's author metadata. The author will appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setAuthor('Humpty Dumpty')\n * ```\n * @param author The author of this document.\n */\n setAuthor(author: string): void {\n assertIs(author, 'author', ['string']);\n const key = PDFName.of('Author');\n this.getInfoDict().set(key, PDFHexString.fromText(author));\n }\n\n /**\n * Set this document's subject metadata. The subject will appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setSubject('📘 An Epic Tale of Woe 📖')\n * ```\n * @param subject The subject of this document.\n */\n setSubject(subject: string): void {\n assertIs(subject, 'author', ['string']);\n const key = PDFName.of('Subject');\n this.getInfoDict().set(key, PDFHexString.fromText(subject));\n }\n\n /**\n * Set this document's keyword metadata. These keywords will appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setKeywords(['eggs', 'wall', 'fall', 'king', 'horses', 'men'])\n * ```\n * @param keywords An array of keywords associated with this document.\n */\n setKeywords(keywords: string[]): void {\n assertIs(keywords, 'keywords', [Array]);\n const key = PDFName.of('Keywords');\n this.getInfoDict().set(key, PDFHexString.fromText(keywords.join(' ')));\n }\n\n /**\n * Set this document's creator metadata. The creator will appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setCreator('PDF App 9000 🤖')\n * ```\n * @param creator The creator of this document.\n */\n setCreator(creator: string): void {\n assertIs(creator, 'creator', ['string']);\n const key = PDFName.of('Creator');\n this.getInfoDict().set(key, PDFHexString.fromText(creator));\n }\n\n /**\n * Set this document's producer metadata. The producer will appear in the\n * \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setProducer('PDF App 9000 🤖')\n * ```\n * @param producer The producer of this document.\n */\n setProducer(producer: string): void {\n assertIs(producer, 'creator', ['string']);\n const key = PDFName.of('Producer');\n this.getInfoDict().set(key, PDFHexString.fromText(producer));\n }\n\n /**\n * Set this document's language metadata. The language will appear in the\n * \"Document Properties\" section of some PDF readers. For example:\n * ```js\n * pdfDoc.setLanguage('en-us')\n * ```\n *\n * @param language An RFC 3066 _Language-Tag_ denoting the language of this\n * document, or an empty string if the language is unknown.\n */\n setLanguage(language: string): void {\n assertIs(language, 'language', ['string']);\n const key = PDFName.of('Lang');\n this.catalog.set(key, PDFString.of(language));\n }\n\n /**\n * Set this document's creation date metadata. The creation date will appear\n * in the \"Document Properties\" section of most PDF readers. For example:\n * ```js\n * pdfDoc.setCreationDate(new Date())\n * ```\n * @param creationDate The date this document was created.\n */\n setCreationDate(creationDate: Date): void {\n assertIs(creationDate, 'creationDate', [[Date, 'Date']]);\n const key = PDFName.of('CreationDate');\n this.getInfoDict().set(key, PDFString.fromDate(creationDate));\n }\n\n /**\n * Set this document's modification date metadata. The modification date will\n * appear in the \"Document Properties\" section of most PDF readers. For\n * example:\n * ```js\n * pdfDoc.setModificationDate(new Date())\n * ```\n * @param modificationDate The date this document was last modified.\n */\n setModificationDate(modificationDate: Date): void {\n assertIs(modificationDate, 'modificationDate', [[Date, 'Date']]);\n const key = PDFName.of('ModDate');\n this.getInfoDict().set(key, PDFString.fromDate(modificationDate));\n }\n\n /**\n * Get the number of pages contained in this document. For example:\n * ```js\n * const totalPages = pdfDoc.getPageCount()\n * ```\n * @returns The number of pages in this document.\n */\n getPageCount(): number {\n if (this.pageCount === undefined) this.pageCount = this.getPages().length;\n return this.pageCount;\n }\n\n /**\n * Get an array of all the pages contained in this document. The pages are\n * stored in the array in the same order that they are rendered in the\n * document. For example:\n * ```js\n * const pages = pdfDoc.getPages()\n * pages[0] // The first page of the document\n * pages[2] // The third page of the document\n * pages[197] // The 198th page of the document\n * ```\n * @returns An array of all the pages contained in this document.\n */\n getPages(): PDFPage[] {\n return this.pageCache.access();\n }\n\n /**\n * Get the page rendered at a particular `index` of the document. For example:\n * ```js\n * pdfDoc.getPage(0) // The first page of the document\n * pdfDoc.getPage(2) // The third page of the document\n * pdfDoc.getPage(197) // The 198th page of the document\n * ```\n * @returns The [[PDFPage]] rendered at the given `index` of the document.\n */\n getPage(index: number): PDFPage {\n const pages = this.getPages();\n assertRange(index, 'index', 0, pages.length - 1);\n return pages[index];\n }\n\n /**\n * Get an array of indices for all the pages contained in this document. The\n * array will contain a range of integers from\n * `0..pdfDoc.getPageCount() - 1`. For example:\n * ```js\n * const pdfDoc = await PDFDocument.create()\n * pdfDoc.addPage()\n * pdfDoc.addPage()\n * pdfDoc.addPage()\n *\n * const indices = pdfDoc.getPageIndices()\n * indices // => [0, 1, 2]\n * ```\n * @returns An array of indices for all pages contained in this document.\n */\n getPageIndices(): number[] {\n return range(0, this.getPageCount());\n }\n\n /**\n * Remove the page at a given index from this document. For example:\n * ```js\n * pdfDoc.removePage(0) // Remove the first page of the document\n * pdfDoc.removePage(2) // Remove the third page of the document\n * pdfDoc.removePage(197) // Remove the 198th page of the document\n * ```\n * Once a page has been removed, it will no longer be rendered at that index\n * in the document.\n * @param index The index of the page to be removed.\n */\n removePage(index: number): void {\n const pageCount = this.getPageCount();\n if (this.pageCount === 0) throw new RemovePageFromEmptyDocumentError();\n assertRange(index, 'index', 0, pageCount - 1);\n this.catalog.removeLeafNode(index);\n this.pageCount = pageCount - 1;\n }\n\n /**\n * Add a page to the end of this document. This method accepts three\n * different value types for the `page` parameter:\n *\n * | Type | Behavior |\n * | ------------------ | ----------------------------------------------------------------------------------- |\n * | `undefined` | Create a new page and add it to the end of this document |\n * | `[number, number]` | Create a new page with the given dimensions and add it to the end of this document |\n * | `PDFPage` | Add the existing page to the end of this document |\n *\n * For example:\n * ```js\n * // page=undefined\n * const newPage = pdfDoc.addPage()\n *\n * // page=[number, number]\n * import { PageSizes } from 'pdf-lib'\n * const newPage1 = pdfDoc.addPage(PageSizes.A7)\n * const newPage2 = pdfDoc.addPage(PageSizes.Letter)\n * const newPage3 = pdfDoc.addPage([500, 750])\n *\n * // page=PDFPage\n * const pdfDoc1 = await PDFDocument.create()\n * const pdfDoc2 = await PDFDocument.load(...)\n * const [existingPage] = await pdfDoc1.copyPages(pdfDoc2, [0])\n * pdfDoc1.addPage(existingPage)\n * ```\n *\n * @param page Optionally, the desired dimensions or existing page.\n * @returns The newly created (or existing) page.\n */\n addPage(page?: PDFPage | [number, number]): PDFPage {\n assertIs(page, 'page', ['undefined', [PDFPage, 'PDFPage'], Array]);\n return this.insertPage(this.getPageCount(), page);\n }\n\n /**\n * Insert a page at a given index within this document. This method accepts\n * three different value types for the `page` parameter:\n *\n * | Type | Behavior |\n * | ------------------ | ------------------------------------------------------------------------------ |\n * | `undefined` | Create a new page and insert it into this document |\n * | `[number, number]` | Create a new page with the given dimensions and insert it into this document |\n * | `PDFPage` | Insert the existing page into this document |\n *\n * For example:\n * ```js\n * // page=undefined\n * const newPage = pdfDoc.insertPage(2)\n *\n * // page=[number, number]\n * import { PageSizes } from 'pdf-lib'\n * const newPage1 = pdfDoc.insertPage(2, PageSizes.A7)\n * const newPage2 = pdfDoc.insertPage(0, PageSizes.Letter)\n * const newPage3 = pdfDoc.insertPage(198, [500, 750])\n *\n * // page=PDFPage\n * const pdfDoc1 = await PDFDocument.create()\n * const pdfDoc2 = await PDFDocument.load(...)\n * const [existingPage] = await pdfDoc1.copyPages(pdfDoc2, [0])\n * pdfDoc1.insertPage(0, existingPage)\n * ```\n *\n * @param index The index at which the page should be inserted (zero-based).\n * @param page Optionally, the desired dimensions or existing page.\n * @returns The newly created (or existing) page.\n */\n insertPage(index: number, page?: PDFPage | [number, number]): PDFPage {\n const pageCount = this.getPageCount();\n assertRange(index, 'index', 0, pageCount);\n assertIs(page, 'page', ['undefined', [PDFPage, 'PDFPage'], Array]);\n if (!page || Array.isArray(page)) {\n const dims = Array.isArray(page) ? page : PageSizes.A4;\n page = PDFPage.create(this);\n page.setSize(...dims);\n } else if (page.doc !== this) {\n throw new ForeignPageError();\n }\n\n const parentRef = this.catalog.insertLeafNode(page.ref, index);\n page.node.setParent(parentRef);\n\n this.pageMap.set(page.node, page);\n this.pageCache.invalidate();\n\n this.pageCount = pageCount + 1;\n\n return page;\n }\n\n /**\n * Copy pages from a source document into this document. Allows pages to be\n * copied between different [[PDFDocument]] instances. For example:\n * ```js\n * const pdfDoc = await PDFDocument.create()\n * const srcDoc = await PDFDocument.load(...)\n *\n * const copiedPages = await pdfDoc.copyPages(srcDoc, [0, 3, 89])\n * const [firstPage, fourthPage, ninetiethPage] = copiedPages;\n *\n * pdfDoc.addPage(fourthPage)\n * pdfDoc.insertPage(0, ninetiethPage)\n * pdfDoc.addPage(firstPage)\n * ```\n * @param srcDoc The document from which pages should be copied.\n * @param indices The indices of the pages that should be copied.\n * @returns Resolves with an array of pages copied into this document.\n */\n async copyPages(srcDoc: PDFDocument, indices: number[]): Promise {\n assertIs(srcDoc, 'srcDoc', [[PDFDocument, 'PDFDocument']]);\n assertIs(indices, 'indices', [Array]);\n await srcDoc.flush();\n const copier = PDFObjectCopier.for(srcDoc.context, this.context);\n const srcPages = srcDoc.getPages();\n const copiedPages: PDFPage[] = new Array(indices.length);\n for (let idx = 0, len = indices.length; idx < len; idx++) {\n const srcPage = srcPages[indices[idx]];\n const copiedPage = copier.copy(srcPage.node);\n const ref = this.context.register(copiedPage);\n copiedPages[idx] = PDFPage.of(copiedPage, ref, this);\n }\n return copiedPages;\n }\n\n /**\n * Get a copy of this document.\n *\n * For example:\n * ```js\n * const srcDoc = await PDFDocument.load(...)\n * const pdfDoc = await srcDoc.copy()\n * ```\n *\n * > **NOTE:** This method won't copy all information over to the new\n * > document (acroforms, outlines, etc...).\n *\n * @returns Resolves with a copy this document.\n */\n async copy(): Promise {\n const pdfCopy = await PDFDocument.create();\n const contentPages = await pdfCopy.copyPages(this, this.getPageIndices());\n\n for (let idx = 0, len = contentPages.length; idx < len; idx++) {\n pdfCopy.addPage(contentPages[idx]);\n }\n\n if (this.getAuthor() !== undefined) {\n pdfCopy.setAuthor(this.getAuthor()!);\n }\n if (this.getCreationDate() !== undefined) {\n pdfCopy.setCreationDate(this.getCreationDate()!);\n }\n if (this.getCreator() !== undefined) {\n pdfCopy.setCreator(this.getCreator()!);\n }\n if (this.getModificationDate() !== undefined) {\n pdfCopy.setModificationDate(this.getModificationDate()!);\n }\n if (this.getProducer() !== undefined) {\n pdfCopy.setProducer(this.getProducer()!);\n }\n if (this.getSubject() !== undefined) {\n pdfCopy.setSubject(this.getSubject()!);\n }\n if (this.getTitle() !== undefined) {\n pdfCopy.setTitle(this.getTitle()!);\n }\n pdfCopy.defaultWordBreaks = this.defaultWordBreaks;\n\n return pdfCopy;\n }\n\n /**\n * Add JavaScript to this document. The supplied `script` is executed when the\n * document is opened. The `script` can be used to perform some operation\n * when the document is opened (e.g. logging to the console), or it can be\n * used to define a function that can be referenced later in a JavaScript\n * action. For example:\n * ```js\n * // Show \"Hello World!\" in the console when the PDF is opened\n * pdfDoc.addJavaScript(\n * 'main',\n * 'console.show(); console.println(\"Hello World!\");'\n * );\n *\n * // Define a function named \"foo\" that can be called in JavaScript Actions\n * pdfDoc.addJavaScript(\n * 'foo',\n * 'function foo() { return \"foo\"; }'\n * );\n * ```\n * See the [JavaScript for Acrobat API Reference](https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf)\n * for details.\n * @param name The name of the script. Must be unique per document.\n * @param script The JavaScript to execute.\n */\n addJavaScript(name: string, script: string) {\n assertIs(name, 'name', ['string']);\n assertIs(script, 'script', ['string']);\n\n const embedder = JavaScriptEmbedder.for(script, name);\n\n const ref = this.context.nextRef();\n const javaScript = PDFJavaScript.of(ref, this, embedder);\n this.javaScripts.push(javaScript);\n }\n\n /**\n * Add an attachment to this document. Attachments are visible in the\n * \"Attachments\" panel of Adobe Acrobat and some other PDF readers. Any\n * type of file can be added as an attachment. This includes, but is not\n * limited to, `.png`, `.jpg`, `.pdf`, `.csv`, `.docx`, and `.xlsx` files.\n *\n * The input data can be provided in multiple formats:\n *\n * | Type | Contents |\n * | ------------- | -------------------------------------------------------------- |\n * | `string` | A base64 encoded string (or data URI) containing an attachment |\n * | `Uint8Array` | The raw bytes of an attachment |\n * | `ArrayBuffer` | The raw bytes of an attachment |\n *\n * For example:\n * ```js\n * // attachment=string\n * await pdfDoc.attach('/9j/4AAQSkZJRgABAQAAAQABAAD/2wBD...', 'cat_riding_unicorn.jpg', {\n * mimeType: 'image/jpeg',\n * description: 'Cool cat riding a unicorn! 🦄🐈🕶️',\n * creationDate: new Date('2019/12/01'),\n * modificationDate: new Date('2020/04/19'),\n * })\n * await pdfDoc.attach('data:image/jpeg;base64,/9j/4AAQ...', 'cat_riding_unicorn.jpg', {\n * mimeType: 'image/jpeg',\n * description: 'Cool cat riding a unicorn! 🦄🐈🕶️',\n * creationDate: new Date('2019/12/01'),\n * modificationDate: new Date('2020/04/19'),\n * })\n *\n * // attachment=Uint8Array\n * import fs from 'fs'\n * const uint8Array = fs.readFileSync('cat_riding_unicorn.jpg')\n * await pdfDoc.attach(uint8Array, 'cat_riding_unicorn.jpg', {\n * mimeType: 'image/jpeg',\n * description: 'Cool cat riding a unicorn! 🦄🐈🕶️',\n * creationDate: new Date('2019/12/01'),\n * modificationDate: new Date('2020/04/19'),\n * })\n *\n * // attachment=ArrayBuffer\n * const url = 'https://pdf-lib.js.org/assets/cat_riding_unicorn.jpg'\n * const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())\n * await pdfDoc.attach(arrayBuffer, 'cat_riding_unicorn.jpg', {\n * mimeType: 'image/jpeg',\n * description: 'Cool cat riding a unicorn! 🦄🐈🕶️',\n * creationDate: new Date('2019/12/01'),\n * modificationDate: new Date('2020/04/19'),\n * })\n * ```\n *\n * @param attachment The input data containing the file to be attached.\n * @param name The name of the file to be attached.\n * @returns Resolves when the attachment is complete.\n */\n async attach(\n attachment: string | Uint8Array | ArrayBuffer,\n name: string,\n options: AttachmentOptions = {},\n ): Promise {\n assertIs(attachment, 'attachment', ['string', Uint8Array, ArrayBuffer]);\n assertIs(name, 'name', ['string']);\n assertOrUndefined(options.mimeType, 'mimeType', ['string']);\n assertOrUndefined(options.description, 'description', ['string']);\n assertOrUndefined(options.creationDate, 'options.creationDate', [Date]);\n assertOrUndefined(options.modificationDate, 'options.modificationDate', [\n Date,\n ]);\n assertIsOneOfOrUndefined(\n options.afRelationship,\n 'options.afRelationship',\n AFRelationship,\n );\n\n const bytes = toUint8Array(attachment);\n const embedder = FileEmbedder.for(bytes, name, options);\n\n const ref = this.context.nextRef();\n const embeddedFile = PDFEmbeddedFile.of(ref, this, embedder);\n this.embeddedFiles.push(embeddedFile);\n }\n\n /**\n * Embed a font into this document. The input data can be provided in multiple\n * formats:\n *\n * | Type | Contents |\n * | --------------- | ------------------------------------------------------- |\n * | `StandardFonts` | One of the standard 14 fonts |\n * | `string` | A base64 encoded string (or data URI) containing a font |\n * | `Uint8Array` | The raw bytes of a font |\n * | `ArrayBuffer` | The raw bytes of a font |\n *\n * For example:\n * ```js\n * // font=StandardFonts\n * import { StandardFonts } from 'pdf-lib'\n * const font1 = await pdfDoc.embedFont(StandardFonts.Helvetica)\n *\n * // font=string\n * const font2 = await pdfDoc.embedFont('AAEAAAAVAQAABABQRFNJRx/upe...')\n * const font3 = await pdfDoc.embedFont('data:font/opentype;base64,AAEAAA...')\n *\n * // font=Uint8Array\n * import fs from 'fs'\n * const font4 = await pdfDoc.embedFont(fs.readFileSync('Ubuntu-R.ttf'))\n *\n * // font=ArrayBuffer\n * const url = 'https://pdf-lib.js.org/assets/ubuntu/Ubuntu-R.ttf'\n * const ubuntuBytes = await fetch(url).then(res => res.arrayBuffer())\n * const font5 = await pdfDoc.embedFont(ubuntuBytes)\n * ```\n * See also: [[registerFontkit]]\n * @param font The input data for a font.\n * @param options The options to be used when embedding the font.\n * @returns Resolves with the embedded font.\n */\n async embedFont(\n font: StandardFonts | string | Uint8Array | ArrayBuffer,\n options: EmbedFontOptions = {},\n ): Promise {\n const { subset = false, customName, features } = options;\n\n assertIs(font, 'font', ['string', Uint8Array, ArrayBuffer]);\n assertIs(subset, 'subset', ['boolean']);\n\n let embedder: CustomFontEmbedder | StandardFontEmbedder;\n if (isStandardFont(font)) {\n embedder = StandardFontEmbedder.for(font, customName);\n } else if (canBeConvertedToUint8Array(font)) {\n const bytes = toUint8Array(font);\n const fontkit = this.assertFontkit();\n embedder = subset\n ? await CustomFontSubsetEmbedder.for(\n fontkit,\n bytes,\n customName,\n features,\n )\n : await CustomFontEmbedder.for(fontkit, bytes, customName, features);\n } else {\n throw new TypeError(\n '`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`',\n );\n }\n\n const ref = this.context.nextRef();\n const pdfFont = PDFFont.of(ref, this, embedder);\n this.fonts.push(pdfFont);\n\n return pdfFont;\n }\n\n /**\n * Embed a standard font into this document.\n * For example:\n * ```js\n * import { StandardFonts } from 'pdf-lib'\n * const helveticaFont = pdfDoc.embedFont(StandardFonts.Helvetica)\n * ```\n * @param font The standard font to be embedded.\n * @param customName The name to be used when embedding the font.\n * @returns The embedded font.\n */\n embedStandardFont(font: StandardFonts, customName?: string): PDFFont {\n assertIs(font, 'font', ['string']);\n if (!isStandardFont(font)) {\n throw new TypeError('`font` must be one of type `StandardFonts`');\n }\n\n const embedder = StandardFontEmbedder.for(font, customName);\n\n const ref = this.context.nextRef();\n const pdfFont = PDFFont.of(ref, this, embedder);\n this.fonts.push(pdfFont);\n\n return pdfFont;\n }\n\n /**\n * Embed a JPEG image into this document. The input data can be provided in\n * multiple formats:\n *\n * | Type | Contents |\n * | ------------- | ------------------------------------------------------------- |\n * | `string` | A base64 encoded string (or data URI) containing a JPEG image |\n * | `Uint8Array` | The raw bytes of a JPEG image |\n * | `ArrayBuffer` | The raw bytes of a JPEG image |\n *\n * For example:\n * ```js\n * // jpg=string\n * const image1 = await pdfDoc.embedJpg('/9j/4AAQSkZJRgABAQAAAQABAAD/2wBD...')\n * const image2 = await pdfDoc.embedJpg('data:image/jpeg;base64,/9j/4AAQ...')\n *\n * // jpg=Uint8Array\n * import fs from 'fs'\n * const uint8Array = fs.readFileSync('cat_riding_unicorn.jpg')\n * const image3 = await pdfDoc.embedJpg(uint8Array)\n *\n * // jpg=ArrayBuffer\n * const url = 'https://pdf-lib.js.org/assets/cat_riding_unicorn.jpg'\n * const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())\n * const image4 = await pdfDoc.embedJpg(arrayBuffer)\n * ```\n *\n * @param jpg The input data for a JPEG image.\n * @returns Resolves with the embedded image.\n */\n async embedJpg(jpg: string | Uint8Array | ArrayBuffer): Promise {\n assertIs(jpg, 'jpg', ['string', Uint8Array, ArrayBuffer]);\n const bytes = toUint8Array(jpg);\n const embedder = await JpegEmbedder.for(bytes);\n const ref = this.context.nextRef();\n const pdfImage = PDFImage.of(ref, this, embedder);\n this.images.push(pdfImage);\n return pdfImage;\n }\n\n /**\n * Embed a PNG image into this document. The input data can be provided in\n * multiple formats:\n *\n * | Type | Contents |\n * | ------------- | ------------------------------------------------------------ |\n * | `string` | A base64 encoded string (or data URI) containing a PNG image |\n * | `Uint8Array` | The raw bytes of a PNG image |\n * | `ArrayBuffer` | The raw bytes of a PNG image |\n *\n * For example:\n * ```js\n * // png=string\n * const image1 = await pdfDoc.embedPng('iVBORw0KGgoAAAANSUhEUgAAAlgAAAF3...')\n * const image2 = await pdfDoc.embedPng('data:image/png;base64,iVBORw0KGg...')\n *\n * // png=Uint8Array\n * import fs from 'fs'\n * const uint8Array = fs.readFileSync('small_mario.png')\n * const image3 = await pdfDoc.embedPng(uint8Array)\n *\n * // png=ArrayBuffer\n * const url = 'https://pdf-lib.js.org/assets/small_mario.png'\n * const arrayBuffer = await fetch(url).then(res => res.arrayBuffer())\n * const image4 = await pdfDoc.embedPng(arrayBuffer)\n * ```\n *\n * @param png The input data for a PNG image.\n * @returns Resolves with the embedded image.\n */\n async embedPng(png: string | Uint8Array | ArrayBuffer): Promise {\n assertIs(png, 'png', ['string', Uint8Array, ArrayBuffer]);\n const bytes = toUint8Array(png);\n const embedder = await PngEmbedder.for(bytes);\n const ref = this.context.nextRef();\n const pdfImage = PDFImage.of(ref, this, embedder);\n this.images.push(pdfImage);\n return pdfImage;\n }\n\n /**\n * Embed one or more PDF pages into this document.\n *\n * For example:\n * ```js\n * const pdfDoc = await PDFDocument.create()\n *\n * const sourcePdfUrl = 'https://pdf-lib.js.org/assets/with_large_page_count.pdf'\n * const sourcePdf = await fetch(sourcePdfUrl).then((res) => res.arrayBuffer())\n *\n * // Embed page 74 of `sourcePdf` into `pdfDoc`\n * const [embeddedPage] = await pdfDoc.embedPdf(sourcePdf, [73])\n * ```\n *\n * See [[PDFDocument.load]] for examples of the allowed input data formats.\n *\n * @param pdf The input data containing a PDF document.\n * @param indices The indices of the pages that should be embedded.\n * @returns Resolves with an array of the embedded pages.\n */\n async embedPdf(\n pdf: string | Uint8Array | ArrayBuffer | PDFDocument,\n indices: number[] = [0],\n ): Promise {\n assertIs(pdf, 'pdf', [\n 'string',\n Uint8Array,\n ArrayBuffer,\n [PDFDocument, 'PDFDocument'],\n ]);\n assertIs(indices, 'indices', [Array]);\n\n const srcDoc =\n pdf instanceof PDFDocument ? pdf : await PDFDocument.load(pdf);\n\n const srcPages = pluckIndices(srcDoc.getPages(), indices);\n\n return this.embedPages(srcPages);\n }\n\n /**\n * Embed a single PDF page into this document.\n *\n * For example:\n * ```js\n * const pdfDoc = await PDFDocument.create()\n *\n * const sourcePdfUrl = 'https://pdf-lib.js.org/assets/with_large_page_count.pdf'\n * const sourceBuffer = await fetch(sourcePdfUrl).then((res) => res.arrayBuffer())\n * const sourcePdfDoc = await PDFDocument.load(sourceBuffer)\n * const sourcePdfPage = sourcePdfDoc.getPages()[73]\n *\n * const embeddedPage = await pdfDoc.embedPage(\n * sourcePdfPage,\n *\n * // Clip a section of the source page so that we only embed part of it\n * { left: 100, right: 450, bottom: 330, top: 570 },\n *\n * // Translate all drawings of the embedded page by (10, 200) units\n * [1, 0, 0, 1, 10, 200],\n * )\n * ```\n *\n * @param page The page to be embedded.\n * @param boundingBox\n * Optionally, an area of the source page that should be embedded\n * (defaults to entire page).\n * @param transformationMatrix\n * Optionally, a transformation matrix that is always applied to the embedded\n * page anywhere it is drawn.\n * @returns Resolves with the embedded pdf page.\n */\n async embedPage(\n page: PDFPage,\n boundingBox?: PageBoundingBox,\n transformationMatrix?: TransformationMatrix,\n ): Promise {\n assertIs(page, 'page', [[PDFPage, 'PDFPage']]);\n const [embeddedPage] = await this.embedPages(\n [page],\n [boundingBox],\n [transformationMatrix],\n );\n return embeddedPage;\n }\n\n /**\n * Embed one or more PDF pages into this document.\n *\n * For example:\n * ```js\n * const pdfDoc = await PDFDocument.create()\n *\n * const sourcePdfUrl = 'https://pdf-lib.js.org/assets/with_large_page_count.pdf'\n * const sourceBuffer = await fetch(sourcePdfUrl).then((res) => res.arrayBuffer())\n * const sourcePdfDoc = await PDFDocument.load(sourceBuffer)\n *\n * const page1 = sourcePdfDoc.getPages()[0]\n * const page2 = sourcePdfDoc.getPages()[52]\n * const page3 = sourcePdfDoc.getPages()[73]\n *\n * const embeddedPages = await pdfDoc.embedPages([page1, page2, page3])\n * ```\n *\n * @param page\n * The pages to be embedded (they must all share the same context).\n * @param boundingBoxes\n * Optionally, an array of clipping boundaries - one for each page\n * (defaults to entirety of each page).\n * @param transformationMatrices\n * Optionally, an array of transformation matrices - one for each page\n * (each page's transformation will apply anywhere it is drawn).\n * @returns Resolves with an array of the embedded pdf pages.\n */\n async embedPages(\n pages: PDFPage[],\n boundingBoxes: (PageBoundingBox | undefined)[] = [],\n transformationMatrices: (TransformationMatrix | undefined)[] = [],\n ) {\n if (pages.length === 0) return [];\n\n // Assert all pages have the same context\n for (let idx = 0, len = pages.length - 1; idx < len; idx++) {\n const currPage = pages[idx];\n const nextPage = pages[idx + 1];\n if (currPage.node.context !== nextPage.node.context) {\n throw new PageEmbeddingMismatchedContextError();\n }\n }\n\n const context = pages[0].node.context;\n const maybeCopyPage =\n context === this.context\n ? (p: PDFPageLeaf) => p\n : PDFObjectCopier.for(context, this.context).copy;\n\n const embeddedPages = new Array(pages.length);\n for (let idx = 0, len = pages.length; idx < len; idx++) {\n const page = maybeCopyPage(pages[idx].node);\n const box = boundingBoxes[idx];\n const matrix = transformationMatrices[idx];\n\n const embedder = await PDFPageEmbedder.for(page, box, matrix);\n\n const ref = this.context.nextRef();\n embeddedPages[idx] = PDFEmbeddedPage.of(ref, this, embedder);\n }\n\n this.embeddedPages.push(...embeddedPages);\n\n return embeddedPages;\n }\n\n /**\n * > **NOTE:** You shouldn't need to call this method directly. The [[save]]\n * > and [[saveAsBase64]] methods will automatically ensure that all embedded\n * > assets are flushed before serializing the document.\n *\n * Flush all embedded fonts, PDF pages, and images to this document's\n * [[context]].\n *\n * @returns Resolves when the flush is complete.\n */\n async flush(): Promise {\n await this.embedAll(this.fonts);\n await this.embedAll(this.images);\n await this.embedAll(this.embeddedPages);\n await this.embedAll(this.embeddedFiles);\n await this.embedAll(this.javaScripts);\n }\n\n /**\n * Serialize this document to an array of bytes making up a PDF file.\n * For example:\n * ```js\n * const pdfBytes = await pdfDoc.save()\n * ```\n *\n * There are a number of things you can do with the serialized document,\n * depending on the JavaScript environment you're running in:\n * * Write it to a file in Node or React Native\n * * Download it as a Blob in the browser\n * * Render it in an `iframe`\n *\n * @param options The options to be used when saving the document.\n * @returns Resolves with the bytes of the serialized document.\n */\n async save(options: SaveOptions = {}): Promise {\n const {\n useObjectStreams = true,\n addDefaultPage = true,\n objectsPerTick = 50,\n updateFieldAppearances = true,\n } = options;\n\n assertIs(useObjectStreams, 'useObjectStreams', ['boolean']);\n assertIs(addDefaultPage, 'addDefaultPage', ['boolean']);\n assertIs(objectsPerTick, 'objectsPerTick', ['number']);\n assertIs(updateFieldAppearances, 'updateFieldAppearances', ['boolean']);\n\n if (addDefaultPage && this.getPageCount() === 0) this.addPage();\n\n if (updateFieldAppearances) {\n const form = this.formCache.getValue();\n if (form) form.updateFieldAppearances();\n }\n\n await this.flush();\n\n const Writer = useObjectStreams ? PDFStreamWriter : PDFWriter;\n return Writer.forContext(this.context, objectsPerTick).serializeToBuffer();\n }\n\n /**\n * Serialize this document to a base64 encoded string or data URI making up a\n * PDF file. For example:\n * ```js\n * const base64String = await pdfDoc.saveAsBase64()\n * base64String // => 'JVBERi0xLjcKJYGBgYEKC...'\n *\n * const base64DataUri = await pdfDoc.saveAsBase64({ dataUri: true })\n * base64DataUri // => 'data:application/pdf;base64,JVBERi0xLjcKJYGBgYEKC...'\n * ```\n *\n * @param options The options to be used when saving the document.\n * @returns Resolves with a base64 encoded string or data URI of the\n * serialized document.\n */\n async saveAsBase64(options: Base64SaveOptions = {}): Promise {\n const { dataUri = false, ...otherOptions } = options;\n assertIs(dataUri, 'dataUri', ['boolean']);\n const bytes = await this.save(otherOptions);\n const base64 = encodeToBase64(bytes);\n return dataUri ? `data:application/pdf;base64,${base64}` : base64;\n }\n\n findPageForAnnotationRef(ref: PDFRef): PDFPage | undefined {\n const pages = this.getPages();\n for (let idx = 0, len = pages.length; idx < len; idx++) {\n const page = pages[idx];\n const annotations = page.node.Annots();\n\n if (annotations?.indexOf(ref) !== undefined) {\n return page;\n }\n }\n\n return undefined;\n }\n\n private async embedAll(embeddables: Embeddable[]): Promise {\n for (let idx = 0, len = embeddables.length; idx < len; idx++) {\n await embeddables[idx].embed();\n }\n }\n\n private updateInfoDict(): void {\n const pdfLib = `pdf-lib (https://github.com/Hopding/pdf-lib)`;\n const now = new Date();\n\n const info = this.getInfoDict();\n\n this.setProducer(pdfLib);\n this.setModificationDate(now);\n\n if (!info.get(PDFName.of('Creator'))) this.setCreator(pdfLib);\n if (!info.get(PDFName.of('CreationDate'))) this.setCreationDate(now);\n }\n\n private getInfoDict(): PDFDict {\n const existingInfo = this.context.lookup(this.context.trailerInfo.Info);\n if (existingInfo instanceof PDFDict) return existingInfo;\n\n const newInfo = this.context.obj({});\n this.context.trailerInfo.Info = this.context.register(newInfo);\n\n return newInfo;\n }\n\n private assertFontkit(): Fontkit {\n if (!this.fontkit) throw new FontkitNotRegisteredError();\n return this.fontkit;\n }\n\n private computePages = (): PDFPage[] => {\n const pages: PDFPage[] = [];\n this.catalog.Pages().traverse((node, ref) => {\n if (node instanceof PDFPageLeaf) {\n let page = this.pageMap.get(node);\n if (!page) {\n page = PDFPage.of(node, ref, this);\n this.pageMap.set(node, page);\n }\n pages.push(page);\n }\n });\n return pages;\n };\n\n private getOrCreateForm = (): PDFForm => {\n const acroForm = this.catalog.getOrCreateAcroForm();\n return PDFForm.of(acroForm, this);\n };\n}\n\n/* tslint:disable-next-line only-arrow-functions */\nfunction assertIsLiteralOrHexString(\n pdfObject: PDFObject,\n): asserts pdfObject is PDFHexString | PDFString {\n if (\n !(pdfObject instanceof PDFHexString) &&\n !(pdfObject instanceof PDFString)\n ) {\n throw new UnexpectedObjectTypeError([PDFHexString, PDFString], pdfObject);\n }\n}\n","import { Color } from 'src/api/colors';\nimport PDFFont from 'src/api/PDFFont';\nimport { Rotation } from 'src/api/rotations';\nimport { LineCapStyle } from 'src/api/operators';\n\nexport enum BlendMode {\n Normal = 'Normal',\n Multiply = 'Multiply',\n Screen = 'Screen',\n Overlay = 'Overlay',\n Darken = 'Darken',\n Lighten = 'Lighten',\n ColorDodge = 'ColorDodge',\n ColorBurn = 'ColorBurn',\n HardLight = 'HardLight',\n SoftLight = 'SoftLight',\n Difference = 'Difference',\n Exclusion = 'Exclusion',\n}\n\nexport interface PDFPageDrawTextOptions {\n color?: Color;\n opacity?: number;\n blendMode?: BlendMode;\n font?: PDFFont;\n size?: number;\n rotate?: Rotation;\n xSkew?: Rotation;\n ySkew?: Rotation;\n x?: number;\n y?: number;\n lineHeight?: number;\n maxWidth?: number;\n wordBreaks?: string[];\n}\n\nexport interface PDFPageDrawImageOptions {\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rotate?: Rotation;\n xSkew?: Rotation;\n ySkew?: Rotation;\n opacity?: number;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawPageOptions {\n x?: number;\n y?: number;\n xScale?: number;\n yScale?: number;\n width?: number;\n height?: number;\n rotate?: Rotation;\n xSkew?: Rotation;\n ySkew?: Rotation;\n opacity?: number;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawSVGOptions {\n x?: number;\n y?: number;\n scale?: number;\n rotate?: Rotation;\n borderWidth?: number;\n color?: Color;\n opacity?: number;\n borderColor?: Color;\n borderOpacity?: number;\n borderDashArray?: number[];\n borderDashPhase?: number;\n borderLineCap?: LineCapStyle;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawLineOptions {\n start: { x: number; y: number };\n end: { x: number; y: number };\n thickness?: number;\n color?: Color;\n opacity?: number;\n lineCap?: LineCapStyle;\n dashArray?: number[];\n dashPhase?: number;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawRectangleOptions {\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rotate?: Rotation;\n xSkew?: Rotation;\n ySkew?: Rotation;\n borderWidth?: number;\n color?: Color;\n opacity?: number;\n borderColor?: Color;\n borderOpacity?: number;\n borderDashArray?: number[];\n borderDashPhase?: number;\n borderLineCap?: LineCapStyle;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawSquareOptions {\n x?: number;\n y?: number;\n size?: number;\n rotate?: Rotation;\n xSkew?: Rotation;\n ySkew?: Rotation;\n borderWidth?: number;\n color?: Color;\n opacity?: number;\n borderColor?: Color;\n borderOpacity?: number;\n borderDashArray?: number[];\n borderDashPhase?: number;\n borderLineCap?: LineCapStyle;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawEllipseOptions {\n x?: number;\n y?: number;\n xScale?: number;\n yScale?: number;\n rotate?: Rotation;\n color?: Color;\n opacity?: number;\n borderColor?: Color;\n borderOpacity?: number;\n borderWidth?: number;\n borderDashArray?: number[];\n borderDashPhase?: number;\n borderLineCap?: LineCapStyle;\n blendMode?: BlendMode;\n}\n\nexport interface PDFPageDrawCircleOptions {\n x?: number;\n y?: number;\n size?: number;\n color?: Color;\n opacity?: number;\n borderColor?: Color;\n borderOpacity?: number;\n borderWidth?: number;\n borderDashArray?: number[];\n borderDashPhase?: number;\n borderLineCap?: LineCapStyle;\n blendMode?: BlendMode;\n}\n","import { Color, rgb } from 'src/api/colors';\nimport {\n drawImage,\n drawLine,\n drawLinesOfText,\n drawPage,\n drawRectangle,\n drawSvgPath,\n drawEllipse,\n} from 'src/api/operations';\nimport {\n popGraphicsState,\n pushGraphicsState,\n translate,\n LineCapStyle,\n scale,\n} from 'src/api/operators';\nimport PDFDocument from 'src/api/PDFDocument';\nimport PDFEmbeddedPage from 'src/api/PDFEmbeddedPage';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFImage from 'src/api/PDFImage';\nimport {\n PDFPageDrawCircleOptions,\n PDFPageDrawEllipseOptions,\n PDFPageDrawImageOptions,\n PDFPageDrawLineOptions,\n PDFPageDrawPageOptions,\n PDFPageDrawRectangleOptions,\n PDFPageDrawSquareOptions,\n PDFPageDrawSVGOptions,\n PDFPageDrawTextOptions,\n BlendMode,\n} from 'src/api/PDFPageOptions';\nimport { degrees, Rotation, toDegrees } from 'src/api/rotations';\nimport { StandardFonts } from 'src/api/StandardFonts';\nimport {\n PDFContentStream,\n PDFHexString,\n PDFName,\n PDFOperator,\n PDFPageLeaf,\n PDFRef,\n PDFDict,\n PDFArray,\n} from 'src/core';\nimport {\n assertEachIs,\n assertIs,\n assertMultiple,\n assertOrUndefined,\n breakTextIntoLines,\n cleanText,\n rectanglesAreEqual,\n lineSplit,\n assertRangeOrUndefined,\n assertIsOneOfOrUndefined,\n} from 'src/utils';\n\n/**\n * Represents a single page of a [[PDFDocument]].\n */\nexport default class PDFPage {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.addPage]] and [[PDFDocument.insertPage]]\n * > methods, which can create instances of [[PDFPage]] for you.\n *\n * Create an instance of [[PDFPage]] from an existing leaf node.\n *\n * @param leafNode The leaf node to be wrapped.\n * @param ref The unique reference for the page.\n * @param doc The document to which the page will belong.\n */\n static of = (leafNode: PDFPageLeaf, ref: PDFRef, doc: PDFDocument) =>\n new PDFPage(leafNode, ref, doc);\n\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFDocument.addPage]] and [[PDFDocument.insertPage]]\n * > methods, which can create instances of [[PDFPage]] for you.\n *\n * Create an instance of [[PDFPage]].\n *\n * @param doc The document to which the page will belong.\n */\n static create = (doc: PDFDocument) => {\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n const dummyRef = PDFRef.of(-1);\n const pageLeaf = PDFPageLeaf.withContextAndParent(doc.context, dummyRef);\n const pageRef = doc.context.register(pageLeaf);\n return new PDFPage(pageLeaf, pageRef, doc);\n };\n\n /** The low-level PDFDictionary wrapped by this page. */\n readonly node: PDFPageLeaf;\n\n /** The unique reference assigned to this page within the document. */\n readonly ref: PDFRef;\n\n /** The document to which this page belongs. */\n readonly doc: PDFDocument;\n\n private fontKey?: PDFName;\n private font?: PDFFont;\n private fontSize = 24;\n private fontColor = rgb(0, 0, 0) as Color;\n private lineHeight = 24;\n private x = 0;\n private y = 0;\n private contentStream?: PDFContentStream;\n private contentStreamRef?: PDFRef;\n\n private constructor(leafNode: PDFPageLeaf, ref: PDFRef, doc: PDFDocument) {\n assertIs(leafNode, 'leafNode', [[PDFPageLeaf, 'PDFPageLeaf']]);\n assertIs(ref, 'ref', [[PDFRef, 'PDFRef']]);\n assertIs(doc, 'doc', [[PDFDocument, 'PDFDocument']]);\n\n this.node = leafNode;\n this.ref = ref;\n this.doc = doc;\n }\n\n /**\n * Rotate this page by a multiple of 90 degrees. For example:\n * ```js\n * import { degrees } from 'pdf-lib'\n *\n * page.setRotation(degrees(-90))\n * page.setRotation(degrees(0))\n * page.setRotation(degrees(90))\n * page.setRotation(degrees(180))\n * page.setRotation(degrees(270))\n * ```\n * @param angle The angle to rotate this page.\n */\n setRotation(angle: Rotation): void {\n const degreesAngle = toDegrees(angle);\n assertMultiple(degreesAngle, 'degreesAngle', 90);\n this.node.set(PDFName.of('Rotate'), this.doc.context.obj(degreesAngle));\n }\n\n /**\n * Get this page's rotation angle in degrees. For example:\n * ```js\n * const rotationAngle = page.getRotation().angle;\n * ```\n * @returns The rotation angle of the page in degrees (always a multiple of\n * 90 degrees).\n */\n getRotation(): Rotation {\n const Rotate = this.node.Rotate();\n return degrees(Rotate ? Rotate.asNumber() : 0);\n }\n\n /**\n * Resize this page by increasing or decreasing its width and height. For\n * example:\n * ```js\n * page.setSize(250, 500)\n * page.setSize(page.getWidth() + 50, page.getHeight() + 100)\n * page.setSize(page.getWidth() - 50, page.getHeight() - 100)\n * ```\n *\n * Note that the PDF specification does not allow for pages to have explicit\n * widths and heights. Instead it defines the \"size\" of a page in terms of\n * five rectangles: the MediaBox, CropBox, BleedBox, TrimBox, and ArtBox. As a\n * result, this method cannot directly change the width and height of a page.\n * Instead, it works by adjusting these five boxes.\n *\n * This method performs the following steps:\n * 1. Set width & height of MediaBox.\n * 2. Set width & height of CropBox, if it has same dimensions as MediaBox.\n * 3. Set width & height of BleedBox, if it has same dimensions as MediaBox.\n * 4. Set width & height of TrimBox, if it has same dimensions as MediaBox.\n * 5. Set width & height of ArtBox, if it has same dimensions as MediaBox.\n *\n * This approach works well for most PDF documents as all PDF pages must\n * have a MediaBox, but relatively few have a CropBox, BleedBox, TrimBox, or\n * ArtBox. And when they do have these additional boxes, they often have the\n * same dimensions as the MediaBox. However, if you find this method does not\n * work for your document, consider setting the boxes directly:\n * * [[PDFPage.setMediaBox]]\n * * [[PDFPage.setCropBox]]\n * * [[PDFPage.setBleedBox]]\n * * [[PDFPage.setTrimBox]]\n * * [[PDFPage.setArtBox]]\n *\n * @param width The new width of the page.\n * @param height The new height of the page.\n */\n setSize(width: number, height: number): void {\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n\n const mediaBox = this.getMediaBox();\n this.setMediaBox(mediaBox.x, mediaBox.y, width, height);\n\n const cropBox = this.getCropBox();\n const bleedBox = this.getBleedBox();\n const trimBox = this.getTrimBox();\n const artBox = this.getArtBox();\n\n const hasCropBox = this.node.CropBox()!!;\n const hasBleedBox = this.node.BleedBox()!!;\n const hasTrimBox = this.node.TrimBox()!!;\n const hasArtBox = this.node.ArtBox()!!;\n\n if (hasCropBox && rectanglesAreEqual(cropBox, mediaBox)) {\n this.setCropBox(mediaBox.x, mediaBox.y, width, height);\n }\n if (hasBleedBox && rectanglesAreEqual(bleedBox, mediaBox)) {\n this.setBleedBox(mediaBox.x, mediaBox.y, width, height);\n }\n if (hasTrimBox && rectanglesAreEqual(trimBox, mediaBox)) {\n this.setTrimBox(mediaBox.x, mediaBox.y, width, height);\n }\n if (hasArtBox && rectanglesAreEqual(artBox, mediaBox)) {\n this.setArtBox(mediaBox.x, mediaBox.y, width, height);\n }\n }\n\n /**\n * Resize this page by increasing or decreasing its width. For example:\n * ```js\n * page.setWidth(250)\n * page.setWidth(page.getWidth() + 50)\n * page.setWidth(page.getWidth() - 50)\n * ```\n *\n * This method uses [[PDFPage.setSize]] to set the page's width.\n *\n * @param width The new width of the page.\n */\n setWidth(width: number): void {\n assertIs(width, 'width', ['number']);\n this.setSize(width, this.getSize().height);\n }\n\n /**\n * Resize this page by increasing or decreasing its height. For example:\n * ```js\n * page.setHeight(500)\n * page.setHeight(page.getWidth() + 100)\n * page.setHeight(page.getWidth() - 100)\n * ```\n *\n * This method uses [[PDFPage.setSize]] to set the page's height.\n *\n * @param height The new height of the page.\n */\n setHeight(height: number): void {\n assertIs(height, 'height', ['number']);\n this.setSize(this.getSize().width, height);\n }\n\n /**\n * Set the MediaBox of this page. For example:\n * ```js\n * const mediaBox = page.getMediaBox()\n *\n * page.setMediaBox(0, 0, 250, 500)\n * page.setMediaBox(mediaBox.x, mediaBox.y, 50, 100)\n * page.setMediaBox(15, 5, mediaBox.width - 50, mediaBox.height - 100)\n * ```\n *\n * See [[PDFPage.getMediaBox]] for details about what the MediaBox represents.\n *\n * @param x The x coordinate of the lower left corner of the new MediaBox.\n * @param y The y coordinate of the lower left corner of the new MediaBox.\n * @param width The width of the new MediaBox.\n * @param height The height of the new MediaBox.\n */\n setMediaBox(x: number, y: number, width: number, height: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n const mediaBox = this.doc.context.obj([x, y, x + width, y + height]);\n this.node.set(PDFName.MediaBox, mediaBox);\n }\n\n /**\n * Set the CropBox of this page. For example:\n * ```js\n * const cropBox = page.getCropBox()\n *\n * page.setCropBox(0, 0, 250, 500)\n * page.setCropBox(cropBox.x, cropBox.y, 50, 100)\n * page.setCropBox(15, 5, cropBox.width - 50, cropBox.height - 100)\n * ```\n *\n * See [[PDFPage.getCropBox]] for details about what the CropBox represents.\n *\n * @param x The x coordinate of the lower left corner of the new CropBox.\n * @param y The y coordinate of the lower left corner of the new CropBox.\n * @param width The width of the new CropBox.\n * @param height The height of the new CropBox.\n */\n setCropBox(x: number, y: number, width: number, height: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n const cropBox = this.doc.context.obj([x, y, x + width, y + height]);\n this.node.set(PDFName.CropBox, cropBox);\n }\n\n /**\n * Set the BleedBox of this page. For example:\n * ```js\n * const bleedBox = page.getBleedBox()\n *\n * page.setBleedBox(0, 0, 250, 500)\n * page.setBleedBox(bleedBox.x, bleedBox.y, 50, 100)\n * page.setBleedBox(15, 5, bleedBox.width - 50, bleedBox.height - 100)\n * ```\n *\n * See [[PDFPage.getBleedBox]] for details about what the BleedBox represents.\n *\n * @param x The x coordinate of the lower left corner of the new BleedBox.\n * @param y The y coordinate of the lower left corner of the new BleedBox.\n * @param width The width of the new BleedBox.\n * @param height The height of the new BleedBox.\n */\n setBleedBox(x: number, y: number, width: number, height: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n const bleedBox = this.doc.context.obj([x, y, x + width, y + height]);\n this.node.set(PDFName.BleedBox, bleedBox);\n }\n\n /**\n * Set the TrimBox of this page. For example:\n * ```js\n * const trimBox = page.getTrimBox()\n *\n * page.setTrimBox(0, 0, 250, 500)\n * page.setTrimBox(trimBox.x, trimBox.y, 50, 100)\n * page.setTrimBox(15, 5, trimBox.width - 50, trimBox.height - 100)\n * ```\n *\n * See [[PDFPage.getTrimBox]] for details about what the TrimBox represents.\n *\n * @param x The x coordinate of the lower left corner of the new TrimBox.\n * @param y The y coordinate of the lower left corner of the new TrimBox.\n * @param width The width of the new TrimBox.\n * @param height The height of the new TrimBox.\n */\n setTrimBox(x: number, y: number, width: number, height: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n const trimBox = this.doc.context.obj([x, y, x + width, y + height]);\n this.node.set(PDFName.TrimBox, trimBox);\n }\n\n /**\n * Set the ArtBox of this page. For example:\n * ```js\n * const artBox = page.getArtBox()\n *\n * page.setArtBox(0, 0, 250, 500)\n * page.setArtBox(artBox.x, artBox.y, 50, 100)\n * page.setArtBox(15, 5, artBox.width - 50, artBox.height - 100)\n * ```\n *\n * See [[PDFPage.getArtBox]] for details about what the ArtBox represents.\n *\n * @param x The x coordinate of the lower left corner of the new ArtBox.\n * @param y The y coordinate of the lower left corner of the new ArtBox.\n * @param width The width of the new ArtBox.\n * @param height The height of the new ArtBox.\n */\n setArtBox(x: number, y: number, width: number, height: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n assertIs(width, 'width', ['number']);\n assertIs(height, 'height', ['number']);\n const artBox = this.doc.context.obj([x, y, x + width, y + height]);\n this.node.set(PDFName.ArtBox, artBox);\n }\n\n /**\n * Get this page's width and height. For example:\n * ```js\n * const { width, height } = page.getSize()\n * ```\n *\n * This method uses [[PDFPage.getMediaBox]] to obtain the page's\n * width and height.\n *\n * @returns The width and height of the page.\n */\n getSize(): { width: number; height: number } {\n const { width, height } = this.getMediaBox();\n return { width, height };\n }\n\n /**\n * Get this page's width. For example:\n * ```js\n * const width = page.getWidth()\n * ```\n *\n * This method uses [[PDFPage.getSize]] to obtain the page's size.\n *\n * @returns The width of the page.\n */\n getWidth(): number {\n return this.getSize().width;\n }\n\n /**\n * Get this page's height. For example:\n * ```js\n * const height = page.getHeight()\n * ```\n *\n * This method uses [[PDFPage.getSize]] to obtain the page's size.\n *\n * @returns The height of the page.\n */\n getHeight(): number {\n return this.getSize().height;\n }\n\n /**\n * Get the rectangle defining this page's MediaBox. For example:\n * ```js\n * const { x, y, width, height } = page.getMediaBox()\n * ```\n *\n * The MediaBox of a page defines the boundaries of the physical medium on\n * which the page is to be displayed/printed. It may include extended area\n * surrounding the page content for bleed marks, printing marks, etc...\n * It may also include areas close to the edges of the medium that cannot be\n * marked because of physical limitations of the output device. Content\n * falling outside this boundary may safely be discarded without affecting\n * the meaning of the PDF file.\n *\n * @returns An object defining the lower left corner of the MediaBox and its\n * width & height.\n */\n getMediaBox(): { x: number; y: number; width: number; height: number } {\n const mediaBox = this.node.MediaBox();\n return mediaBox.asRectangle();\n }\n\n /**\n * Get the rectangle defining this page's CropBox. For example:\n * ```js\n * const { x, y, width, height } = page.getCropBox()\n * ```\n *\n * The CropBox of a page defines the region to which the contents of the page\n * shall be clipped when displayed or printed. Unlike the other boxes, the\n * CropBox does not necessarily represent the physical page geometry. It\n * merely imposes clipping on the page contents.\n *\n * The CropBox's default value is the page's MediaBox.\n *\n * @returns An object defining the lower left corner of the CropBox and its\n * width & height.\n */\n getCropBox(): { x: number; y: number; width: number; height: number } {\n const cropBox = this.node.CropBox();\n return cropBox?.asRectangle() ?? this.getMediaBox();\n }\n\n /**\n * Get the rectangle defining this page's BleedBox. For example:\n * ```js\n * const { x, y, width, height } = page.getBleedBox()\n * ```\n *\n * The BleedBox of a page defines the region to which the contents of the\n * page shall be clipped when output in a production environment. This may\n * include any extra bleed area needed to accommodate the physical\n * limitations of cutting, folding, and trimming equipment. The actual\n * printed page may include printing marks that fall outside the BleedBox.\n *\n * The BleedBox's default value is the page's CropBox.\n *\n * @returns An object defining the lower left corner of the BleedBox and its\n * width & height.\n */\n getBleedBox(): { x: number; y: number; width: number; height: number } {\n const bleedBox = this.node.BleedBox();\n return bleedBox?.asRectangle() ?? this.getCropBox();\n }\n\n /**\n * Get the rectangle defining this page's TrimBox. For example:\n * ```js\n * const { x, y, width, height } = page.getTrimBox()\n * ```\n *\n * The TrimBox of a page defines the intended dimensions of the finished\n * page after trimming. It may be smaller than the MediaBox to allow for\n * production-related content, such as printing instructions, cut marks, or\n * color bars.\n *\n * The TrimBox's default value is the page's CropBox.\n *\n * @returns An object defining the lower left corner of the TrimBox and its\n * width & height.\n */\n getTrimBox(): { x: number; y: number; width: number; height: number } {\n const trimBox = this.node.TrimBox();\n return trimBox?.asRectangle() ?? this.getCropBox();\n }\n\n /**\n * Get the rectangle defining this page's ArtBox. For example:\n * ```js\n * const { x, y, width, height } = page.getArtBox()\n * ```\n *\n * The ArtBox of a page defines the extent of the page's meaningful content\n * (including potential white space).\n *\n * The ArtBox's default value is the page's CropBox.\n *\n * @returns An object defining the lower left corner of the ArtBox and its\n * width & height.\n */\n getArtBox(): { x: number; y: number; width: number; height: number } {\n const artBox = this.node.ArtBox();\n return artBox?.asRectangle() ?? this.getCropBox();\n }\n\n /**\n * Translate this page's content to a new location on the page. This operation\n * is often useful after resizing the page with [[setSize]]. For example:\n * ```js\n * // Add 50 units of whitespace to the top and right of the page\n * page.setSize(page.getWidth() + 50, page.getHeight() + 50)\n *\n * // Move the page's content from the lower-left corner of the page\n * // to the top-right corner.\n * page.translateContent(50, 50)\n *\n * // Now there are 50 units of whitespace to the left and bottom of the page\n * ```\n * See also: [[resetPosition]]\n * @param x The new position on the x-axis for this page's content.\n * @param y The new position on the y-axis for this page's content.\n */\n translateContent(x: number, y: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n\n this.node.normalize();\n this.getContentStream();\n\n const start = this.createContentStream(\n pushGraphicsState(),\n translate(x, y),\n );\n const startRef = this.doc.context.register(start);\n\n const end = this.createContentStream(popGraphicsState());\n const endRef = this.doc.context.register(end);\n\n this.node.wrapContentStreams(startRef, endRef);\n }\n\n /**\n * Scale the size, content, and annotations of a page.\n *\n * For example:\n * ```js\n * page.scale(0.5, 0.5);\n * ```\n *\n * @param x The factor by which the width for the page should be scaled\n * (e.g. `0.5` is 50%).\n * @param y The factor by which the height for the page should be scaled\n * (e.g. `2.0` is 200%).\n */\n scale(x: number, y: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n this.setSize(this.getWidth() * x, this.getHeight() * y);\n this.scaleContent(x, y);\n this.scaleAnnotations(x, y);\n }\n\n /**\n * Scale the content of a page. This is useful after resizing an existing\n * page. This scales only the content, not the annotations.\n *\n * For example:\n * ```js\n * // Bisect the size of the page\n * page.setSize(page.getWidth() / 2, page.getHeight() / 2);\n *\n * // Scale the content of the page down by 50% in x and y\n * page.scaleContent(0.5, 0.5);\n * ```\n * See also: [[scaleAnnotations]]\n * @param x The factor by which the x-axis for the content should be scaled\n * (e.g. `0.5` is 50%).\n * @param y The factor by which the y-axis for the content should be scaled\n * (e.g. `2.0` is 200%).\n */\n scaleContent(x: number, y: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n\n this.node.normalize();\n this.getContentStream();\n\n const start = this.createContentStream(pushGraphicsState(), scale(x, y));\n const startRef = this.doc.context.register(start);\n\n const end = this.createContentStream(popGraphicsState());\n const endRef = this.doc.context.register(end);\n\n this.node.wrapContentStreams(startRef, endRef);\n }\n\n /**\n * Scale the annotations of a page. This is useful if you want to scale a\n * page with comments or other annotations.\n * ```js\n * // Scale the content of the page down by 50% in x and y\n * page.scaleContent(0.5, 0.5);\n *\n * // Scale the content of the page down by 50% in x and y\n * page.scaleAnnotations(0.5, 0.5);\n * ```\n * See also: [[scaleContent]]\n * @param x The factor by which the x-axis for the annotations should be\n * scaled (e.g. `0.5` is 50%).\n * @param y The factor by which the y-axis for the annotations should be\n * scaled (e.g. `2.0` is 200%).\n */\n scaleAnnotations(x: number, y: number) {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n\n const annots = this.node.Annots();\n if (!annots) return;\n\n for (let idx = 0; idx < annots.size(); idx++) {\n const annot = annots.lookup(idx);\n if (annot instanceof PDFDict) this.scaleAnnot(annot, x, y);\n }\n }\n\n /**\n * Reset the x and y coordinates of this page to `(0, 0)`. This operation is\n * often useful after calling [[translateContent]]. For example:\n * ```js\n * // Shift the page's contents up and to the right by 50 units\n * page.translateContent(50, 50)\n *\n * // This text will shifted - it will be drawn at (50, 50)\n * page.drawText('I am shifted')\n *\n * // Move back to (0, 0)\n * page.resetPosition()\n *\n * // This text will not be shifted - it will be drawn at (0, 0)\n * page.drawText('I am not shifted')\n * ```\n */\n resetPosition(): void {\n this.getContentStream(false);\n this.x = 0;\n this.y = 0;\n }\n\n /**\n * Choose a default font for this page. The default font will be used whenever\n * text is drawn on this page and no font is specified. For example:\n * ```js\n * import { StandardFonts } from 'pdf-lib'\n *\n * const timesRomanFont = await pdfDoc.embedFont(StandardFonts.TimesRoman)\n * const helveticaFont = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const courierFont = await pdfDoc.embedFont(StandardFonts.Courier)\n *\n * const page = pdfDoc.addPage()\n *\n * page.setFont(helveticaFont)\n * page.drawText('I will be drawn in Helvetica')\n *\n * page.setFont(timesRomanFont)\n * page.drawText('I will be drawn in Courier', { font: courierFont })\n * ```\n * @param font The default font to be used when drawing text on this page.\n */\n setFont(font: PDFFont): void {\n // TODO: Reuse image Font name if we've already added this image to Resources.Fonts\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n this.font = font;\n this.fontKey = this.node.newFontDictionary(this.font.name, this.font.ref);\n }\n\n /**\n * Choose a default font size for this page. The default font size will be\n * used whenever text is drawn on this page and no font size is specified.\n * For example:\n * ```js\n * page.setFontSize(12)\n * page.drawText('I will be drawn in size 12')\n *\n * page.setFontSize(36)\n * page.drawText('I will be drawn in size 24', { fontSize: 24 })\n * ```\n * @param fontSize The default font size to be used when drawing text on this\n * page.\n */\n setFontSize(fontSize: number): void {\n assertIs(fontSize, 'fontSize', ['number']);\n this.fontSize = fontSize;\n }\n\n /**\n * Choose a default font color for this page. The default font color will be\n * used whenever text is drawn on this page and no font color is specified.\n * For example:\n * ```js\n * import { rgb, cmyk, grayscale } from 'pdf-lib'\n *\n * page.setFontColor(rgb(0.97, 0.02, 0.97))\n * page.drawText('I will be drawn in pink')\n *\n * page.setFontColor(cmyk(0.4, 0.7, 0.39, 0.15))\n * page.drawText('I will be drawn in gray', { color: grayscale(0.5) })\n * ```\n * @param fontColor The default font color to be used when drawing text on\n * this page.\n */\n setFontColor(fontColor: Color): void {\n assertIs(fontColor, 'fontColor', [[Object, 'Color']]);\n this.fontColor = fontColor;\n }\n\n /**\n * Choose a default line height for this page. The default line height will be\n * used whenever text is drawn on this page and no line height is specified.\n * For example:\n * ```js\n * page.setLineHeight(12);\n * page.drawText('These lines will be vertically \\n separated by 12 units')\n *\n * page.setLineHeight(36);\n * page.drawText('These lines will be vertically \\n separated by 24 units', {\n * lineHeight: 24\n * })\n * ```\n * @param lineHeight The default line height to be used when drawing text on\n * this page.\n */\n setLineHeight(lineHeight: number): void {\n assertIs(lineHeight, 'lineHeight', ['number']);\n this.lineHeight = lineHeight;\n }\n\n /**\n * Get the default position of this page. For example:\n * ```js\n * const { x, y } = page.getPosition()\n * ```\n * @returns The default position of the page.\n */\n getPosition(): { x: number; y: number } {\n return { x: this.x, y: this.y };\n }\n\n /**\n * Get the default x coordinate of this page. For example:\n * ```js\n * const x = page.getX()\n * ```\n * @returns The default x coordinate of the page.\n */\n getX(): number {\n return this.x;\n }\n\n /**\n * Get the default y coordinate of this page. For example:\n * ```js\n * const y = page.getY()\n * ```\n * @returns The default y coordinate of the page.\n */\n getY(): number {\n return this.y;\n }\n\n /**\n * Change the default position of this page. For example:\n * ```js\n * page.moveTo(0, 0)\n * page.drawText('I will be drawn at the origin')\n *\n * page.moveTo(0, 25)\n * page.drawText('I will be drawn 25 units up')\n *\n * page.moveTo(25, 25)\n * page.drawText('I will be drawn 25 units up and 25 units to the right')\n * ```\n * @param x The new default position on the x-axis for this page.\n * @param y The new default position on the y-axis for this page.\n */\n moveTo(x: number, y: number): void {\n assertIs(x, 'x', ['number']);\n assertIs(y, 'y', ['number']);\n this.x = x;\n this.y = y;\n }\n\n /**\n * Change the default position of this page to be further down the y-axis.\n * For example:\n * ```js\n * page.moveTo(50, 50)\n * page.drawText('I will be drawn at (50, 50)')\n *\n * page.moveDown(10)\n * page.drawText('I will be drawn at (50, 40)')\n * ```\n * @param yDecrease The amount by which the page's default position along the\n * y-axis should be decreased.\n */\n moveDown(yDecrease: number): void {\n assertIs(yDecrease, 'yDecrease', ['number']);\n this.y -= yDecrease;\n }\n\n /**\n * Change the default position of this page to be further up the y-axis.\n * For example:\n * ```js\n * page.moveTo(50, 50)\n * page.drawText('I will be drawn at (50, 50)')\n *\n * page.moveUp(10)\n * page.drawText('I will be drawn at (50, 60)')\n * ```\n * @param yIncrease The amount by which the page's default position along the\n * y-axis should be increased.\n */\n moveUp(yIncrease: number): void {\n assertIs(yIncrease, 'yIncrease', ['number']);\n this.y += yIncrease;\n }\n\n /**\n * Change the default position of this page to be further left on the x-axis.\n * For example:\n * ```js\n * page.moveTo(50, 50)\n * page.drawText('I will be drawn at (50, 50)')\n *\n * page.moveLeft(10)\n * page.drawText('I will be drawn at (40, 50)')\n * ```\n * @param xDecrease The amount by which the page's default position along the\n * x-axis should be decreased.\n */\n moveLeft(xDecrease: number): void {\n assertIs(xDecrease, 'xDecrease', ['number']);\n this.x -= xDecrease;\n }\n\n /**\n * Change the default position of this page to be further right on the y-axis.\n * For example:\n * ```js\n * page.moveTo(50, 50)\n * page.drawText('I will be drawn at (50, 50)')\n *\n * page.moveRight(10)\n * page.drawText('I will be drawn at (60, 50)')\n * ```\n * @param xIncrease The amount by which the page's default position along the\n * x-axis should be increased.\n */\n moveRight(xIncrease: number): void {\n assertIs(xIncrease, 'xIncrease', ['number']);\n this.x += xIncrease;\n }\n\n /**\n * Push one or more operators to the end of this page's current content\n * stream. For example:\n * ```js\n * import {\n * pushGraphicsState,\n * moveTo,\n * lineTo,\n * closePath,\n * setFillingColor,\n * rgb,\n * fill,\n * popGraphicsState,\n * } from 'pdf-lib'\n *\n * // Draw a green triangle in the lower-left corner of the page\n * page.pushOperators(\n * pushGraphicsState(),\n * moveTo(0, 0),\n * lineTo(100, 0),\n * lineTo(50, 100),\n * closePath(),\n * setFillingColor(rgb(0.0, 1.0, 0.0)),\n * fill(),\n * popGraphicsState(),\n * )\n * ```\n * @param operator The operators to be pushed.\n */\n pushOperators(...operator: PDFOperator[]): void {\n assertEachIs(operator, 'operator', [[PDFOperator, 'PDFOperator']]);\n const contentStream = this.getContentStream();\n contentStream.push(...operator);\n }\n\n /**\n * Draw one or more lines of text on this page. For example:\n * ```js\n * import { StandardFonts, rgb } from 'pdf-lib'\n *\n * const helveticaFont = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const timesRomanFont = await pdfDoc.embedFont(StandardFonts.TimesRoman)\n *\n * const page = pdfDoc.addPage()\n *\n * page.setFont(helveticaFont)\n *\n * page.moveTo(5, 200)\n * page.drawText('The Life of an Egg', { size: 36 })\n *\n * page.moveDown(36)\n * page.drawText('An Epic Tale of Woe', { size: 30 })\n *\n * page.drawText(\n * `Humpty Dumpty sat on a wall \\n` +\n * `Humpty Dumpty had a great fall; \\n` +\n * `All the king's horses and all the king's men \\n` +\n * `Couldn't put Humpty together again. \\n`,\n * {\n * x: 25,\n * y: 100,\n * font: timesRomanFont,\n * size: 24,\n * color: rgb(1, 0, 0),\n * lineHeight: 24,\n * opacity: 0.75,\n * },\n * )\n * ```\n * @param text The text to be drawn.\n * @param options The options to be used when drawing the text.\n */\n drawText(text: string, options: PDFPageDrawTextOptions = {}): void {\n assertIs(text, 'text', ['string']);\n assertOrUndefined(options.color, 'options.color', [[Object, 'Color']]);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertOrUndefined(options.font, 'options.font', [[PDFFont, 'PDFFont']]);\n assertOrUndefined(options.size, 'options.size', ['number']);\n assertOrUndefined(options.rotate, 'options.rotate', [[Object, 'Rotation']]);\n assertOrUndefined(options.xSkew, 'options.xSkew', [[Object, 'Rotation']]);\n assertOrUndefined(options.ySkew, 'options.ySkew', [[Object, 'Rotation']]);\n assertOrUndefined(options.x, 'options.x', ['number']);\n assertOrUndefined(options.y, 'options.y', ['number']);\n assertOrUndefined(options.lineHeight, 'options.lineHeight', ['number']);\n assertOrUndefined(options.maxWidth, 'options.maxWidth', ['number']);\n assertOrUndefined(options.wordBreaks, 'options.wordBreaks', [Array]);\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n\n const { oldFont, newFont, newFontKey } = this.setOrEmbedFont(options.font);\n const fontSize = options.size || this.fontSize;\n\n const wordBreaks = options.wordBreaks || this.doc.defaultWordBreaks;\n const textWidth = (t: string) => newFont.widthOfTextAtSize(t, fontSize);\n const lines =\n options.maxWidth === undefined\n ? lineSplit(cleanText(text))\n : breakTextIntoLines(text, wordBreaks, options.maxWidth, textWidth);\n\n const encodedLines = new Array(lines.length) as PDFHexString[];\n for (let idx = 0, len = lines.length; idx < len; idx++) {\n encodedLines[idx] = newFont.encodeText(lines[idx]);\n }\n\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n opacity: options.opacity,\n blendMode: options.blendMode,\n });\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawLinesOfText(encodedLines, {\n color: options.color ?? this.fontColor,\n font: newFontKey,\n size: fontSize,\n rotate: options.rotate ?? degrees(0),\n xSkew: options.xSkew ?? degrees(0),\n ySkew: options.ySkew ?? degrees(0),\n x: options.x ?? this.x,\n y: options.y ?? this.y,\n lineHeight: options.lineHeight ?? this.lineHeight,\n graphicsState: graphicsStateKey,\n }),\n );\n\n if (options.font) {\n if (oldFont) this.setFont(oldFont);\n else this.resetFont();\n }\n }\n\n /**\n * Draw an image on this page. For example:\n * ```js\n * import { degrees } from 'pdf-lib'\n *\n * const jpgUrl = 'https://pdf-lib.js.org/assets/cat_riding_unicorn.jpg'\n * const jpgImageBytes = await fetch(jpgUrl).then((res) => res.arrayBuffer())\n *\n * const jpgImage = await pdfDoc.embedJpg(jpgImageBytes)\n * const jpgDims = jpgImage.scale(0.5)\n *\n * const page = pdfDoc.addPage()\n *\n * page.drawImage(jpgImage, {\n * x: 25,\n * y: 25,\n * width: jpgDims.width,\n * height: jpgDims.height,\n * rotate: degrees(30),\n * opacity: 0.75,\n * })\n * ```\n * @param image The image to be drawn.\n * @param options The options to be used when drawing the image.\n */\n drawImage(image: PDFImage, options: PDFPageDrawImageOptions = {}): void {\n // TODO: Reuse image XObject name if we've already added this image to Resources.XObjects\n assertIs(image, 'image', [[PDFImage, 'PDFImage']]);\n assertOrUndefined(options.x, 'options.x', ['number']);\n assertOrUndefined(options.y, 'options.y', ['number']);\n assertOrUndefined(options.width, 'options.width', ['number']);\n assertOrUndefined(options.height, 'options.height', ['number']);\n assertOrUndefined(options.rotate, 'options.rotate', [[Object, 'Rotation']]);\n assertOrUndefined(options.xSkew, 'options.xSkew', [[Object, 'Rotation']]);\n assertOrUndefined(options.ySkew, 'options.ySkew', [[Object, 'Rotation']]);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n\n const xObjectKey = this.node.newXObject('Image', image.ref);\n\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n opacity: options.opacity,\n blendMode: options.blendMode,\n });\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawImage(xObjectKey, {\n x: options.x ?? this.x,\n y: options.y ?? this.y,\n width: options.width ?? image.size().width,\n height: options.height ?? image.size().height,\n rotate: options.rotate ?? degrees(0),\n xSkew: options.xSkew ?? degrees(0),\n ySkew: options.ySkew ?? degrees(0),\n graphicsState: graphicsStateKey,\n }),\n );\n }\n\n /**\n * Draw an embedded PDF page on this page. For example:\n * ```js\n * import { degrees } from 'pdf-lib'\n *\n * const pdfDoc = await PDFDocument.create()\n * const page = pdfDoc.addPage()\n *\n * const sourcePdfUrl = 'https://pdf-lib.js.org/assets/with_large_page_count.pdf'\n * const sourcePdf = await fetch(sourcePdfUrl).then((res) => res.arrayBuffer())\n *\n * // Embed page 74 from the PDF\n * const [embeddedPage] = await pdfDoc.embedPdf(sourcePdf, 73)\n *\n * page.drawPage(embeddedPage, {\n * x: 250,\n * y: 200,\n * xScale: 0.5,\n * yScale: 0.5,\n * rotate: degrees(30),\n * opacity: 0.75,\n * })\n * ```\n *\n * The `options` argument accepts both `width`/`height` and `xScale`/`yScale`\n * as options. Since each of these options defines the size of the drawn page,\n * if both options are given, `width` and `height` take precedence and the\n * corresponding scale variants are ignored.\n *\n * @param embeddedPage The embedded page to be drawn.\n * @param options The options to be used when drawing the embedded page.\n */\n drawPage(\n embeddedPage: PDFEmbeddedPage,\n options: PDFPageDrawPageOptions = {},\n ): void {\n // TODO: Reuse embeddedPage XObject name if we've already added this embeddedPage to Resources.XObjects\n assertIs(embeddedPage, 'embeddedPage', [\n [PDFEmbeddedPage, 'PDFEmbeddedPage'],\n ]);\n assertOrUndefined(options.x, 'options.x', ['number']);\n assertOrUndefined(options.y, 'options.y', ['number']);\n assertOrUndefined(options.xScale, 'options.xScale', ['number']);\n assertOrUndefined(options.yScale, 'options.yScale', ['number']);\n assertOrUndefined(options.width, 'options.width', ['number']);\n assertOrUndefined(options.height, 'options.height', ['number']);\n assertOrUndefined(options.rotate, 'options.rotate', [[Object, 'Rotation']]);\n assertOrUndefined(options.xSkew, 'options.xSkew', [[Object, 'Rotation']]);\n assertOrUndefined(options.ySkew, 'options.ySkew', [[Object, 'Rotation']]);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n\n const xObjectKey = this.node.newXObject(\n 'EmbeddedPdfPage',\n embeddedPage.ref,\n );\n\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n opacity: options.opacity,\n blendMode: options.blendMode,\n });\n\n // prettier-ignore\n const xScale = (\n options.width !== undefined ? options.width / embeddedPage.width\n : options.xScale !== undefined ? options.xScale\n : 1\n );\n\n // prettier-ignore\n const yScale = (\n options.height !== undefined ? options.height / embeddedPage.height\n : options.yScale !== undefined ? options.yScale\n : 1\n );\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawPage(xObjectKey, {\n x: options.x ?? this.x,\n y: options.y ?? this.y,\n xScale,\n yScale,\n rotate: options.rotate ?? degrees(0),\n xSkew: options.xSkew ?? degrees(0),\n ySkew: options.ySkew ?? degrees(0),\n graphicsState: graphicsStateKey,\n }),\n );\n }\n\n /**\n * Draw an SVG path on this page. For example:\n * ```js\n * import { rgb } from 'pdf-lib'\n *\n * const svgPath = 'M 0,20 L 100,160 Q 130,200 150,120 C 190,-40 200,200 300,150 L 400,90'\n *\n * // Draw path as black line\n * page.drawSvgPath(svgPath, { x: 25, y: 75 })\n *\n * // Change border style and opacity\n * page.drawSvgPath(svgPath, {\n * x: 25,\n * y: 275,\n * borderColor: rgb(0.5, 0.5, 0.5),\n * borderWidth: 2,\n * borderOpacity: 0.75,\n * })\n *\n * // Set fill color and opacity\n * page.drawSvgPath(svgPath, {\n * x: 25,\n * y: 475,\n * color: rgb(1.0, 0, 0),\n * opacity: 0.75,\n * })\n *\n * // Draw 50% of original size\n * page.drawSvgPath(svgPath, {\n * x: 25,\n * y: 675,\n * scale: 0.5,\n * })\n * ```\n * @param path The SVG path to be drawn.\n * @param options The options to be used when drawing the SVG path.\n */\n drawSvgPath(path: string, options: PDFPageDrawSVGOptions = {}): void {\n assertIs(path, 'path', ['string']);\n assertOrUndefined(options.x, 'options.x', ['number']);\n assertOrUndefined(options.y, 'options.y', ['number']);\n assertOrUndefined(options.scale, 'options.scale', ['number']);\n assertOrUndefined(options.rotate, 'options.rotate', [[Object, 'Rotation']]);\n assertOrUndefined(options.borderWidth, 'options.borderWidth', ['number']);\n assertOrUndefined(options.color, 'options.color', [[Object, 'Color']]);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertOrUndefined(options.borderColor, 'options.borderColor', [\n [Object, 'Color'],\n ]);\n assertOrUndefined(options.borderDashArray, 'options.borderDashArray', [\n Array,\n ]);\n assertOrUndefined(options.borderDashPhase, 'options.borderDashPhase', [\n 'number',\n ]);\n assertIsOneOfOrUndefined(\n options.borderLineCap,\n 'options.borderLineCap',\n LineCapStyle,\n );\n assertRangeOrUndefined(\n options.borderOpacity,\n 'options.borderOpacity',\n 0,\n 1,\n );\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n opacity: options.opacity,\n borderOpacity: options.borderOpacity,\n blendMode: options.blendMode,\n });\n\n if (!('color' in options) && !('borderColor' in options)) {\n options.borderColor = rgb(0, 0, 0);\n }\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawSvgPath(path, {\n x: options.x ?? this.x,\n y: options.y ?? this.y,\n scale: options.scale,\n rotate: options.rotate ?? degrees(0),\n color: options.color ?? undefined,\n borderColor: options.borderColor ?? undefined,\n borderWidth: options.borderWidth ?? 0,\n borderDashArray: options.borderDashArray ?? undefined,\n borderDashPhase: options.borderDashPhase ?? undefined,\n borderLineCap: options.borderLineCap ?? undefined,\n graphicsState: graphicsStateKey,\n }),\n );\n }\n\n /**\n * Draw a line on this page. For example:\n * ```js\n * import { rgb } from 'pdf-lib'\n *\n * page.drawLine({\n * start: { x: 25, y: 75 },\n * end: { x: 125, y: 175 },\n * thickness: 2,\n * color: rgb(0.75, 0.2, 0.2),\n * opacity: 0.75,\n * })\n * ```\n * @param options The options to be used when drawing the line.\n */\n drawLine(options: PDFPageDrawLineOptions): void {\n assertIs(options.start, 'options.start', [\n [Object, '{ x: number, y: number }'],\n ]);\n assertIs(options.end, 'options.end', [\n [Object, '{ x: number, y: number }'],\n ]);\n assertIs(options.start.x, 'options.start.x', ['number']);\n assertIs(options.start.y, 'options.start.y', ['number']);\n assertIs(options.end.x, 'options.end.x', ['number']);\n assertIs(options.end.y, 'options.end.y', ['number']);\n assertOrUndefined(options.thickness, 'options.thickness', ['number']);\n assertOrUndefined(options.color, 'options.color', [[Object, 'Color']]);\n assertOrUndefined(options.dashArray, 'options.dashArray', [Array]);\n assertOrUndefined(options.dashPhase, 'options.dashPhase', ['number']);\n assertIsOneOfOrUndefined(options.lineCap, 'options.lineCap', LineCapStyle);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n borderOpacity: options.opacity,\n blendMode: options.blendMode,\n });\n\n if (!('color' in options)) {\n options.color = rgb(0, 0, 0);\n }\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawLine({\n start: options.start,\n end: options.end,\n thickness: options.thickness ?? 1,\n color: options.color ?? undefined,\n dashArray: options.dashArray ?? undefined,\n dashPhase: options.dashPhase ?? undefined,\n lineCap: options.lineCap ?? undefined,\n graphicsState: graphicsStateKey,\n }),\n );\n }\n\n /**\n * Draw a rectangle on this page. For example:\n * ```js\n * import { degrees, grayscale, rgb } from 'pdf-lib'\n *\n * page.drawRectangle({\n * x: 25,\n * y: 75,\n * width: 250,\n * height: 75,\n * rotate: degrees(-15),\n * borderWidth: 5,\n * borderColor: grayscale(0.5),\n * color: rgb(0.75, 0.2, 0.2),\n * opacity: 0.5,\n * borderOpacity: 0.75,\n * })\n * ```\n * @param options The options to be used when drawing the rectangle.\n */\n drawRectangle(options: PDFPageDrawRectangleOptions = {}): void {\n assertOrUndefined(options.x, 'options.x', ['number']);\n assertOrUndefined(options.y, 'options.y', ['number']);\n assertOrUndefined(options.width, 'options.width', ['number']);\n assertOrUndefined(options.height, 'options.height', ['number']);\n assertOrUndefined(options.rotate, 'options.rotate', [[Object, 'Rotation']]);\n assertOrUndefined(options.xSkew, 'options.xSkew', [[Object, 'Rotation']]);\n assertOrUndefined(options.ySkew, 'options.ySkew', [[Object, 'Rotation']]);\n assertOrUndefined(options.borderWidth, 'options.borderWidth', ['number']);\n assertOrUndefined(options.color, 'options.color', [[Object, 'Color']]);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertOrUndefined(options.borderColor, 'options.borderColor', [\n [Object, 'Color'],\n ]);\n assertOrUndefined(options.borderDashArray, 'options.borderDashArray', [\n Array,\n ]);\n assertOrUndefined(options.borderDashPhase, 'options.borderDashPhase', [\n 'number',\n ]);\n assertIsOneOfOrUndefined(\n options.borderLineCap,\n 'options.borderLineCap',\n LineCapStyle,\n );\n assertRangeOrUndefined(\n options.borderOpacity,\n 'options.borderOpacity',\n 0,\n 1,\n );\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n opacity: options.opacity,\n borderOpacity: options.borderOpacity,\n blendMode: options.blendMode,\n });\n\n if (!('color' in options) && !('borderColor' in options)) {\n options.color = rgb(0, 0, 0);\n }\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawRectangle({\n x: options.x ?? this.x,\n y: options.y ?? this.y,\n width: options.width ?? 150,\n height: options.height ?? 100,\n rotate: options.rotate ?? degrees(0),\n xSkew: options.xSkew ?? degrees(0),\n ySkew: options.ySkew ?? degrees(0),\n borderWidth: options.borderWidth ?? 0,\n color: options.color ?? undefined,\n borderColor: options.borderColor ?? undefined,\n borderDashArray: options.borderDashArray ?? undefined,\n borderDashPhase: options.borderDashPhase ?? undefined,\n graphicsState: graphicsStateKey,\n borderLineCap: options.borderLineCap ?? undefined,\n }),\n );\n }\n\n /**\n * Draw a square on this page. For example:\n * ```js\n * import { degrees, grayscale, rgb } from 'pdf-lib'\n *\n * page.drawSquare({\n * x: 25,\n * y: 75,\n * size: 100,\n * rotate: degrees(-15),\n * borderWidth: 5,\n * borderColor: grayscale(0.5),\n * color: rgb(0.75, 0.2, 0.2),\n * opacity: 0.5,\n * borderOpacity: 0.75,\n * })\n * ```\n * @param options The options to be used when drawing the square.\n */\n drawSquare(options: PDFPageDrawSquareOptions = {}): void {\n const { size } = options;\n assertOrUndefined(size, 'size', ['number']);\n this.drawRectangle({ ...options, width: size, height: size });\n }\n\n /**\n * Draw an ellipse on this page. For example:\n * ```js\n * import { grayscale, rgb } from 'pdf-lib'\n *\n * page.drawEllipse({\n * x: 200,\n * y: 75,\n * xScale: 100,\n * yScale: 50,\n * borderWidth: 5,\n * borderColor: grayscale(0.5),\n * color: rgb(0.75, 0.2, 0.2),\n * opacity: 0.5,\n * borderOpacity: 0.75,\n * })\n * ```\n * @param options The options to be used when drawing the ellipse.\n */\n drawEllipse(options: PDFPageDrawEllipseOptions = {}): void {\n assertOrUndefined(options.x, 'options.x', ['number']);\n assertOrUndefined(options.y, 'options.y', ['number']);\n assertOrUndefined(options.xScale, 'options.xScale', ['number']);\n assertOrUndefined(options.yScale, 'options.yScale', ['number']);\n assertOrUndefined(options.rotate, 'options.rotate', [[Object, 'Rotation']]);\n assertOrUndefined(options.color, 'options.color', [[Object, 'Color']]);\n assertRangeOrUndefined(options.opacity, 'opacity.opacity', 0, 1);\n assertOrUndefined(options.borderColor, 'options.borderColor', [\n [Object, 'Color'],\n ]);\n assertRangeOrUndefined(\n options.borderOpacity,\n 'options.borderOpacity',\n 0,\n 1,\n );\n assertOrUndefined(options.borderWidth, 'options.borderWidth', ['number']);\n assertOrUndefined(options.borderDashArray, 'options.borderDashArray', [\n Array,\n ]);\n assertOrUndefined(options.borderDashPhase, 'options.borderDashPhase', [\n 'number',\n ]);\n assertIsOneOfOrUndefined(\n options.borderLineCap,\n 'options.borderLineCap',\n LineCapStyle,\n );\n assertIsOneOfOrUndefined(options.blendMode, 'options.blendMode', BlendMode);\n const graphicsStateKey = this.maybeEmbedGraphicsState({\n opacity: options.opacity,\n borderOpacity: options.borderOpacity,\n blendMode: options.blendMode,\n });\n\n if (!('color' in options) && !('borderColor' in options)) {\n options.color = rgb(0, 0, 0);\n }\n\n const contentStream = this.getContentStream();\n contentStream.push(\n ...drawEllipse({\n x: options.x ?? this.x,\n y: options.y ?? this.y,\n xScale: options.xScale ?? 100,\n yScale: options.yScale ?? 100,\n rotate: options.rotate ?? undefined,\n color: options.color ?? undefined,\n borderColor: options.borderColor ?? undefined,\n borderWidth: options.borderWidth ?? 0,\n borderDashArray: options.borderDashArray ?? undefined,\n borderDashPhase: options.borderDashPhase ?? undefined,\n borderLineCap: options.borderLineCap ?? undefined,\n graphicsState: graphicsStateKey,\n }),\n );\n }\n\n /**\n * Draw a circle on this page. For example:\n * ```js\n * import { grayscale, rgb } from 'pdf-lib'\n *\n * page.drawCircle({\n * x: 200,\n * y: 150,\n * size: 100,\n * borderWidth: 5,\n * borderColor: grayscale(0.5),\n * color: rgb(0.75, 0.2, 0.2),\n * opacity: 0.5,\n * borderOpacity: 0.75,\n * })\n * ```\n * @param options The options to be used when drawing the ellipse.\n */\n drawCircle(options: PDFPageDrawCircleOptions = {}): void {\n const { size = 100 } = options;\n assertOrUndefined(size, 'size', ['number']);\n this.drawEllipse({ ...options, xScale: size, yScale: size });\n }\n\n private setOrEmbedFont(font?: PDFFont) {\n const oldFont = this.font;\n const oldFontKey = this.fontKey;\n\n if (font) this.setFont(font);\n else this.getFont();\n\n const newFont = this.font!;\n const newFontKey = this.fontKey!;\n\n return { oldFont, oldFontKey, newFont, newFontKey };\n }\n\n private getFont(): [PDFFont, PDFName] {\n if (!this.font || !this.fontKey) {\n const font = this.doc.embedStandardFont(StandardFonts.Helvetica);\n this.setFont(font);\n }\n return [this.font!, this.fontKey!];\n }\n\n private resetFont(): void {\n this.font = undefined;\n this.fontKey = undefined;\n }\n\n private getContentStream(useExisting = true): PDFContentStream {\n if (useExisting && this.contentStream) return this.contentStream;\n this.contentStream = this.createContentStream();\n this.contentStreamRef = this.doc.context.register(this.contentStream);\n this.node.addContentStream(this.contentStreamRef);\n return this.contentStream;\n }\n\n private createContentStream(...operators: PDFOperator[]): PDFContentStream {\n const dict = this.doc.context.obj({});\n const contentStream = PDFContentStream.of(dict, operators);\n return contentStream;\n }\n\n private maybeEmbedGraphicsState(options: {\n opacity?: number;\n borderOpacity?: number;\n blendMode?: BlendMode;\n }): PDFName | undefined {\n const { opacity, borderOpacity, blendMode } = options;\n\n if (\n opacity === undefined &&\n borderOpacity === undefined &&\n blendMode === undefined\n ) {\n return undefined;\n }\n\n const graphicsState = this.doc.context.obj({\n Type: 'ExtGState',\n ca: opacity,\n CA: borderOpacity,\n BM: blendMode,\n });\n\n const key = this.node.newExtGState('GS', graphicsState);\n\n return key;\n }\n\n private scaleAnnot(annot: PDFDict, x: number, y: number) {\n const selectors = ['RD', 'CL', 'Vertices', 'QuadPoints', 'L', 'Rect'];\n for (let idx = 0, len = selectors.length; idx < len; idx++) {\n const list = annot.lookup(PDFName.of(selectors[idx]));\n if (list instanceof PDFArray) list.scalePDFNumbers(x, y);\n }\n\n const inkLists = annot.lookup(PDFName.of('InkList'));\n if (inkLists instanceof PDFArray) {\n for (let idx = 0, len = inkLists.size(); idx < len; idx++) {\n const arr = inkLists.lookup(idx);\n if (arr instanceof PDFArray) arr.scalePDFNumbers(x, y);\n }\n }\n }\n}\n","import PDFDocument from 'src/api/PDFDocument';\nimport PDFPage from 'src/api/PDFPage';\nimport PDFFont from 'src/api/PDFFont';\nimport PDFImage from 'src/api/PDFImage';\nimport { ImageAlignment } from 'src/api/image/alignment';\nimport {\n AppearanceProviderFor,\n normalizeAppearance,\n defaultButtonAppearanceProvider,\n} from 'src/api/form/appearances';\nimport PDFField, {\n FieldAppearanceOptions,\n assertFieldAppearanceOptions,\n} from 'src/api/form/PDFField';\nimport { rgb } from 'src/api/colors';\nimport { degrees } from 'src/api/rotations';\n\nimport {\n PDFRef,\n PDFStream,\n PDFAcroPushButton,\n PDFWidgetAnnotation,\n} from 'src/core';\nimport { assertIs, assertOrUndefined, assertPositive } from 'src/utils';\n\n/**\n * Represents a button field of a [[PDFForm]].\n *\n * [[PDFButton]] fields are interactive controls that users can click with their\n * mouse. This type of [[PDFField]] is not stateful. The purpose of a button\n * is to perform an action when the user clicks on it, such as opening a print\n * modal or resetting the form. Buttons are typically rectangular in shape and\n * have a text label describing the action that they perform when clicked.\n */\nexport default class PDFButton extends PDFField {\n /**\n * > **NOTE:** You probably don't want to call this method directly. Instead,\n * > consider using the [[PDFForm.getButton]] method, which will create an\n * > instance of [[PDFButton]] for you.\n *\n * Create an instance of [[PDFButton]] from an existing acroPushButton and ref\n *\n * @param acroPushButton The underlying `PDFAcroPushButton` for this button.\n * @param ref The unique reference for this button.\n * @param doc The document to which this button will belong.\n */\n static of = (\n acroPushButton: PDFAcroPushButton,\n ref: PDFRef,\n doc: PDFDocument,\n ) => new PDFButton(acroPushButton, ref, doc);\n\n /** The low-level PDFAcroPushButton wrapped by this button. */\n readonly acroField: PDFAcroPushButton;\n\n private constructor(\n acroPushButton: PDFAcroPushButton,\n ref: PDFRef,\n doc: PDFDocument,\n ) {\n super(acroPushButton, ref, doc);\n\n assertIs(acroPushButton, 'acroButton', [\n [PDFAcroPushButton, 'PDFAcroPushButton'],\n ]);\n\n this.acroField = acroPushButton;\n }\n\n /**\n * Display an image inside the bounds of this button's widgets. For example:\n * ```js\n * const pngImage = await pdfDoc.embedPng(...)\n * const button = form.getButton('some.button.field')\n * button.setImage(pngImage, ImageAlignment.Center)\n * ```\n * This will update the appearances streams for each of this button's widgets.\n * @param image The image that should be displayed.\n * @param alignment The alignment of the image.\n */\n setImage(image: PDFImage, alignment = ImageAlignment.Center) {\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const streamRef = this.createImageAppearanceStream(\n widget,\n image,\n alignment,\n );\n this.updateWidgetAppearances(widget, { normal: streamRef });\n }\n\n this.markAsClean();\n }\n\n /**\n * Set the font size for this field. Larger font sizes will result in larger\n * text being displayed when PDF readers render this button. Font sizes may\n * be integer or floating point numbers. Supplying a negative font size will\n * cause this method to throw an error.\n *\n * For example:\n * ```js\n * const button = form.getButton('some.button.field')\n * button.setFontSize(4)\n * button.setFontSize(15.7)\n * ```\n *\n * > This method depends upon the existence of a default appearance\n * > (`/DA`) string. If this field does not have a default appearance string,\n * > or that string does not contain a font size (via the `Tf` operator),\n * > then this method will throw an error.\n *\n * @param fontSize The font size to be used when rendering text in this field.\n */\n setFontSize(fontSize: number) {\n assertPositive(fontSize, 'fontSize');\n this.acroField.setFontSize(fontSize);\n this.markAsDirty();\n }\n\n /**\n * Show this button on the specified page with the given text. For example:\n * ```js\n * const ubuntuFont = await pdfDoc.embedFont(ubuntuFontBytes)\n * const page = pdfDoc.addPage()\n *\n * const form = pdfDoc.getForm()\n * const button = form.createButton('some.button.field')\n *\n * button.addToPage('Do Stuff', page, {\n * x: 50,\n * y: 75,\n * width: 200,\n * height: 100,\n * textColor: rgb(1, 0, 0),\n * backgroundColor: rgb(0, 1, 0),\n * borderColor: rgb(0, 0, 1),\n * borderWidth: 2,\n * rotate: degrees(90),\n * font: ubuntuFont,\n * })\n * ```\n * This will create a new widget for this button field.\n * @param text The text to be displayed for this button widget.\n * @param page The page to which this button widget should be added.\n * @param options The options to be used when adding this button widget.\n */\n addToPage(\n // TODO: This needs to be optional, e.g. for image buttons\n text: string,\n page: PDFPage,\n options?: FieldAppearanceOptions,\n ) {\n assertOrUndefined(text, 'text', ['string']);\n assertOrUndefined(page, 'page', [[PDFPage, 'PDFPage']]);\n assertFieldAppearanceOptions(options);\n\n // Create a widget for this button\n const widget = this.createWidget({\n x: (options?.x ?? 0) - (options?.borderWidth ?? 0) / 2,\n y: (options?.y ?? 0) - (options?.borderWidth ?? 0) / 2,\n width: options?.width ?? 100,\n height: options?.height ?? 50,\n textColor: options?.textColor ?? rgb(0, 0, 0),\n backgroundColor: options?.backgroundColor ?? rgb(0.75, 0.75, 0.75),\n borderColor: options?.borderColor,\n borderWidth: options?.borderWidth ?? 0,\n rotate: options?.rotate ?? degrees(0),\n caption: text,\n hidden: options?.hidden,\n page: page.ref,\n });\n const widgetRef = this.doc.context.register(widget.dict);\n\n // Add widget to this field\n this.acroField.addWidget(widgetRef);\n\n // Set appearance streams for widget\n const font = options?.font ?? this.doc.getForm().getDefaultFont();\n this.updateWidgetAppearance(widget, font);\n\n // Add widget to the given page\n page.node.addAnnot(widgetRef);\n }\n\n /**\n * Returns `true` if this button has been marked as dirty, or if any of this\n * button's widgets do not have an appearance stream. For example:\n * ```js\n * const button = form.getButton('some.button.field')\n * if (button.needsAppearancesUpdate()) console.log('Needs update')\n * ```\n * @returns Whether or not this button needs an appearance update.\n */\n needsAppearancesUpdate(): boolean {\n if (this.isDirty()) return true;\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n const hasAppearances =\n widget.getAppearances()?.normal instanceof PDFStream;\n if (!hasAppearances) return true;\n }\n\n return false;\n }\n\n /**\n * Update the appearance streams for each of this button's widgets using\n * the default appearance provider for buttons. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const button = form.getButton('some.button.field')\n * button.defaultUpdateAppearances(helvetica)\n * ```\n * @param font The font to be used for creating the appearance streams.\n */\n defaultUpdateAppearances(font: PDFFont) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n this.updateAppearances(font);\n }\n\n /**\n * Update the appearance streams for each of this button's widgets using\n * the given appearance provider. If no `provider` is passed, the default\n * appearance provider for buttons will be used. For example:\n * ```js\n * const helvetica = await pdfDoc.embedFont(StandardFonts.Helvetica)\n * const button = form.getButton('some.button.field')\n * button.updateAppearances(helvetica, (field, widget, font) => {\n * ...\n * return {\n * normal: drawButton(...),\n * down: drawButton(...),\n * }\n * })\n * ```\n * @param font The font to be used for creating the appearance streams.\n * @param provider Optionally, the appearance provider to be used for\n * generating the contents of the appearance streams.\n */\n updateAppearances(\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n assertIs(font, 'font', [[PDFFont, 'PDFFont']]);\n assertOrUndefined(provider, 'provider', [Function]);\n\n const widgets = this.acroField.getWidgets();\n for (let idx = 0, len = widgets.length; idx < len; idx++) {\n const widget = widgets[idx];\n this.updateWidgetAppearance(widget, font, provider);\n }\n }\n\n private updateWidgetAppearance(\n widget: PDFWidgetAnnotation,\n font: PDFFont,\n provider?: AppearanceProviderFor,\n ) {\n const apProvider = provider ?? defaultButtonAppearanceProvider;\n const appearances = normalizeAppearance(apProvider(this, widget, font));\n this.updateWidgetAppearanceWithFont(widget, font, appearances);\n }\n}\n","import React from \"react\";\nimport {\n degrees,\n grayscale,\n pdfDocEncodingDecode,\n PDFDocument,\n rgb,\n StandardFonts,\n} from \"pdf-lib\";\n\n// const getTextAttr = async (style) => {\n// if (style === \"title\") {\n// return {\n// font: await pdfDoc.embedFont(StandardFonts.HelveticaOblique),\n// size: 20,\n// color: rgb(0, 0, 0),\n// };\n// } else if (style === \"norm\") {\n// return {\n// font: await pdfDoc.embedFont(StandardFonts.TimesRoman),\n// size: 25,\n// color: rgb(0, 0, 0),\n// };\n// } else if (style === \"title\") {\n// return {\n// font: await pdfDoc.embedFont(StandardFonts.HelveticaBoldOblique),\n// size: 40,\n// color: rgb(0, 0, 1),\n// };\n// } else if (style === \"heading1\") {\n// return {\n// font: await pdfDoc.embedFont(StandardFonts.HelveticaBoldOblique),\n// size: 30,\n// color: rgb(0, 0, 1),\n// };\n// }\n// };\n\nexport const draw90DegCenteredText = (text, page, textAttr, space) => {\n const { width, height } = page.getSize();\n const textWidth = textAttr.font.widthOfTextAtSize(text, textAttr.size);\n space += textAttr.size * 0.25;\n page.drawText(text, {\n x: width - space,\n y: height / 2 + textWidth / 2,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n rotate: degrees(-90),\n });\n return space + textAttr.size;\n};\n\nexport const draw90DegMultilineCenteredText = (\n text,\n page,\n textAttr,\n space,\n margin\n) => {\n text = text.replace(\"\\n\", \"\");\n const { width, height } = page.getSize();\n const textWidth = textAttr.font.widthOfTextAtSize(text, textAttr.size);\n\n let line = \"\";\n const words = text.split(\" \");\n const spacing = textAttr.size * 1.2;\n\n for (let i = 0; i < words.length; i++) {\n const lineWidth =\n textAttr.font.widthOfTextAtSize(line, textAttr.size) +\n textAttr.font.widthOfTextAtSize(words[i], textAttr.size);\n if (lineWidth > height - margin * 2) {\n page.drawText(line, {\n x: width - space - textAttr.size * 1.5,\n y:\n height / 2 + textAttr.font.widthOfTextAtSize(line, textAttr.size) / 2,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n rotate: degrees(-90),\n });\n space += spacing;\n line = `${words[i]} `;\n } else {\n line += `${words[i]} `;\n }\n }\n page.drawText(line, {\n x: width - space - textAttr.size * 1.5,\n y: height / 2 + textAttr.font.widthOfTextAtSize(line, textAttr.size) / 2,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n rotate: degrees(-90),\n });\n space += spacing;\n return space + textAttr.size * 2;\n};\n\nexport const drawCenteredText = (text, page, textAttr, space) => {\n const { width, height } = page.getSize();\n const textWidth = textAttr.font.widthOfTextAtSize(text, textAttr.size);\n page.drawText(text, {\n x: width / 2 - textWidth / 2,\n y: height - space - textAttr.size * 1.5,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n });\n return space + textAttr.size * 1.2;\n};\n\nexport const drawMultilineCenteredText = (\n text,\n page,\n textAttr,\n space,\n margin\n) => {\n text = text.replace(\"\\n\", \"\");\n const { width, height } = page.getSize();\n const textWidth = textAttr.font.widthOfTextAtSize(text, textAttr.size);\n\n let line = \"\";\n const words = text.split(\" \");\n const spacing = textAttr.size * 1.2;\n\n for (let i = 0; i < words.length; i++) {\n const lineWidth =\n textAttr.font.widthOfTextAtSize(line, textAttr.size) +\n textAttr.font.widthOfTextAtSize(words[i], textAttr.size);\n if (lineWidth > width - margin * 2) {\n page.drawText(line, {\n x: width / 2 - textAttr.font.widthOfTextAtSize(line, textAttr.size) / 2,\n y: height - space - textAttr.size * 1.5,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n });\n space += spacing;\n line = `${words[i]} `;\n } else {\n line += `${words[i]} `;\n }\n }\n\n return space + textAttr.size * 1.2;\n};\n\nexport const drawMultilineText = (\n text,\n page,\n textAttr,\n space,\n margin,\n indent\n) => {\n text = text.replace(\"\\n\", \"\");\n const { width, height } = page.getSize();\n const textWidth = textAttr.font.widthOfTextAtSize(text, textAttr.size);\n\n let line = \"\";\n const words = text.split(\" \");\n const spacing = textAttr.size * 1.2;\n\n for (let i = 0; i < words.length; i++) {\n const lineWidth =\n textAttr.font.widthOfTextAtSize(line, textAttr.size) +\n textAttr.font.widthOfTextAtSize(words[i], textAttr.size);\n if (lineWidth > width - margin * 2 - indent) {\n page.drawText(line, {\n x: 20 + indent,\n y: height - space - textAttr.size * 1.5,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n });\n space += spacing;\n line = `${words[i]} `;\n } else {\n line += `${words[i]} `;\n }\n }\n page.drawText(line, {\n x: 20 + indent,\n y: height - space - textAttr.size * 1.5,\n size: textAttr.size,\n font: textAttr.font,\n color: textAttr.color,\n });\n\n return space + spacing + 30;\n};\nconst PdfTextWriter = () => {};\n\nexport default PdfTextWriter;\n","import { useContext, useEffect, useRef, useState } from \"react\";\nimport classes from \"./CertGenerator.module.css\";\nimport Modal from \"../UI/Modal\";\nimport {\n draw90DegCenteredText,\n draw90DegMultilineCenteredText,\n} from \"./PdfTextWriter\";\nimport {\n degrees,\n drawRectangle,\n grayscale,\n PDFDocument,\n rgb,\n StandardFonts,\n} from \"pdf-lib\";\nimport BadgeDataContext from \"../../store/badgeData-context\";\nimport bg from \"../../assets/branding/digital_passport-splashscreen-logo.png\";\n\nconst CertGenerator = (props) => {\n const badgeDataCtx = useContext(BadgeDataContext);\n const [pdfInfo, setPdfInfo] = useState([]);\n\n useEffect(() => {\n createPdf();\n }, []);\n\n const awardInfo = badgeDataCtx.currStudent.earnedBadges.find(\n (e) => e.id === badgeDataCtx.currBadge.id\n );\n\n const courseInfo = badgeDataCtx.badgesData.find(\n (e) => e.id === badgeDataCtx.currBadge.id\n );\n\n let nextLine = 50;\n\n const createPdf = async () => {\n const certText = {\n header: \"Mercer County Digital Passport\",\n certTitle: \"CERTIFICATE OF COMPLETION\",\n introText: \"This certifies that\",\n recipient: awardInfo.recip ? awardInfo.recip : \"recip\",\n certDesc: `on this day ${\n awardInfo.compDate ? awardInfo.compDate : \"compDate\"\n } has successfully completed all necessary course work and tasks to earn the following badge that signifies new knowledge and skill in this topic:`,\n courseTitle: courseInfo.courseTitle,\n certifier: awardInfo.awarded_by ? awardInfo.awarded_by : \"awarded_by\",\n certifierDesc: \"Issue By\",\n courseTransTitle: `${courseInfo.courseTitle} Course Transcript`,\n courseTrans: `${courseInfo.courseDesc}`,\n };\n\n const pdfDoc = await PDFDocument.create();\n const badgeImage = await pdfDoc.embedPng(courseInfo.img);\n const bgImage = await pdfDoc.embedPng(bg);\n\n const page = pdfDoc.addPage();\n const { width, height } = page.getSize();\n //const page2 = pdfDoc.addPage();\n\n const smScript = {\n font: await pdfDoc.embedFont(StandardFonts.HelveticaOblique),\n size: 20,\n color: rgb(0, 0, 0),\n };\n const norm = {\n font: await pdfDoc.embedFont(StandardFonts.Helvetica),\n size: 25,\n color: rgb(0, 0, 0),\n };\n const title = {\n font: await pdfDoc.embedFont(StandardFonts.HelveticaBoldOblique),\n size: 35,\n color: rgb(0, 0, 1),\n };\n const heading1 = {\n font: await pdfDoc.embedFont(StandardFonts.HelveticaBoldOblique),\n size: 30,\n color: rgb(0, 0, 1),\n };\n\n page.drawRectangle({\n x: 0,\n y: 0,\n width: width,\n height: height,\n color: grayscale(0.95),\n });\n\n page.drawImage(bgImage, {\n x: 0,\n y: height,\n width: height,\n height: width,\n rotate: degrees(-90),\n });\n\n nextLine = draw90DegCenteredText(certText.header, page, heading1, nextLine);\n nextLine = draw90DegCenteredText(certText.certTitle, page, title, nextLine);\n\n nextLine += 130;\n page.drawImage(badgeImage, {\n x: width - nextLine,\n y: height / 2 + 75,\n width: 150,\n height: 150,\n rotate: degrees(-90),\n });\n nextLine += 20;\n\n nextLine = draw90DegCenteredText(certText.introText, page, norm, nextLine);\n nextLine = draw90DegCenteredText(\n certText.recipient,\n page,\n heading1,\n nextLine\n );\n nextLine = draw90DegMultilineCenteredText(\n certText.certDesc,\n page,\n norm,\n nextLine,\n 80\n );\n nextLine = draw90DegCenteredText(\n certText.courseTitle,\n page,\n heading1,\n nextLine\n );\n page.drawRectangle({\n x: 85,\n y: height / 2 - 150,\n width: 2,\n height: 300,\n });\n nextLine += 10;\n nextLine = draw90DegCenteredText(\n certText.certifierDesc,\n page,\n smScript,\n nextLine\n );\n nextLine = draw90DegCenteredText(\n \"Mercer County Digital Passport\",\n page,\n smScript,\n nextLine\n );\n\n const pdfBytes = await pdfDoc.save();\n const docUrl = URL.createObjectURL(\n new Blob([pdfBytes], { type: \"application/pdf\" })\n );\n\n setPdfInfo(docUrl);\n };\n\n return (\n \n \n \n );\n};\n\nexport default CertGenerator;\n","import { useState, useEffect, useContext } from 'react';\nimport Modal from '../UI/Modal';\nimport { drawCenteredText, drawMultilineText } from './PdfTextWriter';\nimport { PDFDocument, rgb, grayscale, StandardFonts } from 'pdf-lib';\n\nimport BadgeDataContext from '../../store/badgeData-context';\nimport classes from './CertGenerator.module.css';\nimport bg from '../../assets/branding/digital_passport-splashscreen-logo.png';\nimport dpBanner from '../../assets/branding/dp-transcript-banner.png';\nimport t2cBanner from '../../assets/branding/t2c-transcript-banner.png';\nimport loriSign from '../../assets/transcripts/loriSign.png';\n\nconst TranscriptGenerator = (props) => {\n const badgeDataCtx = useContext(BadgeDataContext);\n const [trxInfo, setTrxInfo] = useState([]);\n useEffect(() => {\n createTranscript();\n }, []);\n\n const createCourseTranscriptBox = (\n page,\n badgeObj,\n badgeImg,\n titleFont,\n descFont,\n lineSpace\n ) => {\n const { width, height } = page.getSize();\n\n lineSpace += 10;\n //Course badge image\n page.drawImage(badgeImg, {\n x: 20,\n y: height - lineSpace - 50,\n width: 60,\n height: 60,\n });\n //Course title\n page.drawText(badgeObj.courseTitle, {\n x: 80,\n y: height - lineSpace,\n size: 20,\n font: titleFont.font,\n color: rgb(0, 0, 0),\n });\n //Credit Hours\n page.drawText(`Credit Hours: ${badgeObj.credHrs}`, {\n x: width - 163,\n y: height - lineSpace,\n size: descFont.size,\n font: descFont.font,\n color: descFont.color,\n });\n lineSpace += 15;\n //Comp date\n const complDate = badgeDataCtx.currStudent.earnedBadges.find((obj) => {\n return obj.id === badgeObj.id;\n }).compDate;\n page.drawText(`(CMPL: ${complDate})`, {\n x: 80,\n y: height - lineSpace,\n size: 12,\n font: descFont.font,\n color: descFont.color,\n });\n //course description\n return drawMultilineText(\n badgeObj.courseDesc,\n page,\n descFont,\n lineSpace,\n 30,\n 60\n );\n };\n\n const createTranscript = async () => {\n const grdLvlBadges = badgeDataCtx.getBadgeList(props.grdLvl);\n const banner = props.grdLvl === 'T2C' ? t2cBanner : dpBanner;\n const trxBadges = [];\n let studentName = '';\n let creditHours = 0;\n for (let i in badgeDataCtx.currStudent.earnedBadges) {\n const earnedBadge = badgeDataCtx.currStudent.earnedBadges[i];\n const earnedBadgeDetails = grdLvlBadges.find((badge) => {\n return badge.id === earnedBadge.id;\n });\n if (earnedBadgeDetails) {\n trxBadges.push(earnedBadgeDetails);\n creditHours += +earnedBadgeDetails.credHrs;\n if (earnedBadge.recip && earnedBadge.recip !== 'Not Specified') {\n studentName = earnedBadge.recip;\n }\n }\n }\n\n const pdfDoc = await PDFDocument.create();\n const bgImg = await pdfDoc.embedPng(bg);\n\n const bannerImg = await pdfDoc.embedPng(banner);\n\n const arrayBuffer = await fetch(loriSign).then((res) => res.arrayBuffer());\n\n const loriSignature = await pdfDoc.embedPng(arrayBuffer);\n\n const page = pdfDoc.addPage();\n const { width, height } = page.getSize();\n\n const titleText = {\n font: await pdfDoc.embedFont(StandardFonts.HelveticaOblique),\n size: 30,\n color: rgb(0, 0, 0),\n };\n const headerText = {\n font: await pdfDoc.embedFont(StandardFonts.HelveticaBold),\n size: 30,\n color: rgb(1, 1, 1),\n };\n\n const descText = {\n font: await pdfDoc.embedFont(StandardFonts.Helvetica),\n size: 15,\n color: rgb(0, 0, 0),\n };\n\n //create background watermark\n page.drawRectangle({\n x: 0,\n y: 0,\n width: width,\n height: height,\n color: grayscale(0.95),\n });\n\n page.drawImage(bgImg, {\n x: 0,\n y: 0,\n width: width,\n height: height,\n });\n //end create background watermark\n\n //draw MCDP Header Logo\n page.drawImage(bannerImg, {\n x: 0,\n y: height - 70,\n width: width,\n height: 70,\n });\n //end draw MCDP Header Logo\n\n //transcript title\n let lineSpace = 60;\n lineSpace = drawCenteredText(\n 'Experience Transcript',\n page,\n titleText,\n lineSpace\n );\n //end transcript title\n\n lineSpace += 20;\n\n lineSpace += 40;\n //draw transcript summary\n if (studentName !== '') {\n page.drawText(`Student: ${studentName}`, {\n x: 20,\n y: height - lineSpace,\n size: descText.size,\n font: descText.font,\n color: descText.color,\n });\n }\n\n page.drawText(`Total Credit Hours: ${creditHours}`, {\n x:\n width -\n 100 -\n descText.font.widthOfTextAtSize('Credit Hours: 3', descText.size),\n y: height - lineSpace,\n size: descText.size,\n font: descText.font,\n color: descText.color,\n });\n page.drawRectangle({\n x: 20,\n y: height - lineSpace - 10,\n width: width - 80,\n height: 2,\n color: grayscale(0),\n });\n\n //end draw transcript summary\n lineSpace += 30;\n for (let i in trxBadges) {\n lineSpace += 10;\n const badgeImg = await pdfDoc.embedPng(trxBadges[i].img);\n lineSpace = createCourseTranscriptBox(\n page,\n trxBadges[i],\n badgeImg,\n headerText,\n descText,\n lineSpace\n );\n }\n lineSpace += 50;\n page.drawImage(loriSignature, {\n x: width / 2 - 75,\n y: height - lineSpace,\n width: 150,\n height: 50,\n });\n\n page.drawRectangle({\n x: width / 2 - 100,\n y: height - lineSpace - 5,\n width: 200,\n height: 2,\n color: grayscale(0),\n });\n\n drawCenteredText('Lori Schaller', page, descText, lineSpace);\n lineSpace += 20;\n drawCenteredText('Executive Director', page, descText, lineSpace);\n lineSpace += 20;\n drawCenteredText(\n 'Digital Passport | Teens 2 Careers',\n page,\n descText,\n lineSpace\n );\n lineSpace += 20;\n drawCenteredText(\n 'A program of United Way of Mercer County',\n page,\n descText,\n lineSpace\n );\n\n const pdfBytes = await pdfDoc.save();\n const docUrl = URL.createObjectURL(\n new Blob([pdfBytes], { type: 'application/pdf' })\n );\n\n setTrxInfo(docUrl);\n };\n\n return (\n \n \n \n );\n};\n\nexport default TranscriptGenerator;\n","// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"BadgeDetail_modal__U2p5S\",\"modal_button\":\"BadgeDetail_modal_button__h59Uz\",\"img\":\"BadgeDetail_img__slm1Y\"};","import { useContext, useState } from \"react\";\nimport BadgeDataContext from \"../../store/badgeData-context\";\nimport CertGenerator from \"../pdfGenerators/CertGenerator\";\nimport TranscriptGenerator from \"../pdfGenerators/TranscriptGenerator\";\nimport Modal from \"../UI/Modal\";\nimport classes from \"./BadgeDetail.module.css\";\n\nconst BadgeDetail = (props) => {\n const [showCert, setShowCert] = useState(false);\n const [showTranscript, setShowTranscript] = useState(false);\n const badgeDataCtx = useContext(BadgeDataContext);\n const courseInfo = badgeDataCtx.currStudent.earnedBadges.find(\n (e) => e.id === badgeDataCtx.currBadge.id\n );\n\n const hideCertHandler = () => {\n setShowCert(false);\n };\n\n const hideTranscriptHandler = () => {\n setShowTranscript(false);\n };\n\n const compDate = courseInfo ? courseInfo.compDate : \"TBD\";\n\n return (\n \n {showCert && }\n {showTranscript && (\n \n )}\n \n

{badgeDataCtx.currBadge.courseTitle}

\n

Completion Date: {compDate}

\n

{badgeDataCtx.currBadge.courseDesc}

\n \n {badgeDataCtx.currBadgeHasCert && (\n \n )}\n {badgeDataCtx.isTranscript && (\n \n )}\n
\n );\n};\n\nexport default BadgeDetail;\n","// extracted by mini-css-extract-plugin\nexport default {\"earnedBadge\":\"Badge_earnedBadge__D6gVf\",\"unearnedBadge\":\"Badge_unearnedBadge__x2Dow\"};","import { useContext } from \"react\";\nimport BadgeDataContext from \"../../store/badgeData-context\";\n\nconst Badge = (props) => {\n\n const badgeDataCtx = useContext(BadgeDataContext);\n\n const onClickHandler = () => {\n badgeDataCtx.loadCurrBadge(props.id);\n props.onBadgeClicked();\n }\n\n return (\n \n );\n};\nexport default Badge;\n","import classes from \"./Badge.module.css\";\nimport Badge from \"./Badge\";\nimport { useContext, useEffect } from \"react\";\nimport BadgeDataContext from \"../../store/badgeData-context\";\n\nconst Badges = (props) => {\n const badgeDataCtx = useContext(BadgeDataContext);\n\n const badgeJSXElements = [];\n\n for (const key in badgeDataCtx.badgesData) {\n const currBadge = badgeDataCtx.currStudent.earnedBadges.find(\n (e) => e.id === badgeDataCtx.badgesData[key].id\n );\n\n if (currBadge) {\n badgeJSXElements.push(\n \n );\n } else {\n if (badgeDataCtx.viewingMyBadges) {\n //do nothing\n } else {\n badgeJSXElements.push(\n \n );\n }\n }\n }\n\n return
{badgeJSXElements}
;\n};\n\nexport default Badges;\n","// extracted by mini-css-extract-plugin\nexport default {\"input\":\"CodeInput_input__6Rf8f\",\"invalid\":\"CodeInput_invalid__M3B2M\"};","import React, { useContext, useState } from \"react\";\nimport BadgeDataContext from \"../../store/badgeData-context\";\nimport classes from \"./CodeInput.module.css\";\nconst CodeInput = (props) => {\n const badgeDataCtx = useContext(BadgeDataContext);\n const [enteredCode, setEnteredCode] = useState(\"\");\n const [isTouched, setIsTouched] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const codeIsInvalid = enteredCode.length !== 6 && isTouched;\n\n const isReadyToSubmit = enteredCode.length === 6;\n\n const codeChangeHandler = (event) => {\n setEnteredCode(event.target.value);\n };\n const codeBlurHandler = () => {\n setIsTouched(true);\n };\n\n const onSubmitHandler = async () => {\n setIsLoading(true);\n badgeDataCtx.fetchData(enteredCode);\n // //delete this. this is temporary function to remove special chars\n // //special char replacement '$' --> D, '#' --> 'H', '+' --> 'P', '?' --> 'P'\n // let repStr = enteredCode\n // .replace(\"$\", \"D\")\n // .replace(\"#\", \"H\")\n // .replace(\"+\", \"P\")\n // .replace(\"?\", \"Q\").toUpperCase();\n // console.log(repStr);\n // //end temporary fxn section\n\n // const response = await fetch(\n // `https://react-http-tester-4c675-default-rtdb.firebaseio.com/students/${repStr}.json`\n // );\n\n // if (!response.ok) {\n // throw new Error(\"Something went wrong!\");\n // }\n\n // const responseData = await response.json();\n\n // badgeDataCtx.loadCurrStudent(responseData);\n // setIsLoading(false);\n\n /*\n const encodedCode = encodeURIComponent(enteredCode.toUpperCase());\n\n const response = await fetch(\n `https://3ifzf06olk.execute-api.us-east-1.amazonaws.com/dc-staging/badges?room_id=${encodedCode}`\n );\n\n if (!response.ok) {\n throw new Error(\"Something went wrong!\");\n }\n\n let transformedData = {\"earnedBadges\" : {}, \"id\" : \"\" };\n\n const responseData = await response.json();\n\n transformedData[\"id\"] = responseData[0][\"room_id\"];\n\n for(let objNum in responseData){\n let awarded_at = responseData[objNum][\"awarded_at\"];\n transformedData[\"earnedBadges\"][responseData[objNum][\"badge_id\"]] = awarded_at;\n }\n\n badgeDataCtx.loadCurrStudent(transformedData);\n */\n setIsLoading(false);\n };\n\n const codeInputClasses = codeIsInvalid ? classes.invalid : classes.input;\n\n return (\n \n \n \n \n );\n};\n\nexport default CodeInput;\n","// extracted by mini-css-extract-plugin\nexport default {\"nav\":\"Navigation_nav__b8Qm3\",\"input\":\"Navigation_input__lrlBG\"};","import CodeInput from \"../UI/CodeInput\";\nimport classes from \"./Navigation.module.css\";\n\nconst Navigation = () => {\n return (\n \n )\n}\n\nexport default Navigation;","// extracted by mini-css-extract-plugin\nexport default {\"main-header\":\"MainHeader_main-header__Vp7t9\"};","import React from 'react';\n\nimport Navigation from './Navigation';\nimport classes from './MainHeader.module.css';\n\nconst MainHeader = (props) => {\n return (\n
\n

Mercer County Digital Passport

\n \n
\n );\n};\n\nexport default MainHeader;","// extracted by mini-css-extract-plugin\nexport default {\"button\":\"TabButton_button__fRLEP\"};","import { useContext } from \"react\";\nimport classes from \"./TabButton.module.css\";\nimport BadgeDataContext from \"../../store/badgeData-context\";\n\nconst TabButton = (props) => {\n const badgeDataCtx = useContext(BadgeDataContext);\n\n const onClickHandler = () => {\n badgeDataCtx.loadBadgesData(props.id);\n };\n\n return (\n \n );\n};\n\nexport default TabButton;\n","// extracted by mini-css-extract-plugin\nexport default {\"tab-banner\":\"TabBanner_tab-banner__GNfLj\"};","import TabButton from \"../UI/TabButton\";\nimport classes from \"./TabBanner.module.css\";\n\nconst TabBanner = (props) => {\n return (\n \n {/* \n \n */}\n \n \n \n \n \n \n \n );\n};\n\nexport default TabBanner;\n","import { useState, useEffect } from 'react';\n\nimport b1 from '../assets/badges/G4-5/45c-coding_events.png';\nimport b2 from '../assets/badges/G4-5/45c-cool_coding.png';\nimport b3 from '../assets/badges/G4-5/45c-groovy_loops.png';\nimport b4 from '../assets/badges/G4-5/45c-spec_seq1.png';\nimport b5 from '../assets/badges/G4-5/45dls-creative_media.png';\nimport b6 from '../assets/badges/G4-5/45dls-device_nav.png';\nimport b7 from '../assets/badges/G4-5/45dls-dig_citizen.png';\nimport b8 from '../assets/badges/G4-5/45dls-dig_privacy.png';\nimport b9 from '../assets/badges/G4-5/45dls-res_sources.png';\nimport b10 from '../assets/badges/G4-5/45dls-web_design.png';\nimport b11 from '../assets/badges/G4-5/45dls-web_nav.png';\nimport b12 from '../assets/badges/G4-5/45r-robot_man.png';\nimport b13 from '../assets/badges/G4-5/45r-rock_robot_challenge.png';\nimport b14 from '../assets/badges/G4-5/45t-design_discovery.png';\nimport b14_5 from '../assets/badges/G4-5/45STEM_project.png';\nimport b15 from '../assets/badges/G6-7/67c-coding_events.png';\nimport b16 from '../assets/badges/G6-7/67c-creative_coding_fund2.png';\nimport b17 from '../assets/badges/G6-7/67c-lawless_loops.png';\nimport b18 from '../assets/badges/G6-7/67c-superb_seq2.png';\nimport b19 from '../assets/badges/G6-7/67dls-creative_media.png';\nimport b20 from '../assets/badges/G6-7/67dls-digital_footprint.png';\nimport b21 from '../assets/badges/G6-7/67dls-digital_resp.png';\nimport b22 from '../assets/badges/G6-7/67dls-os_nav.png';\nimport b23 from '../assets/badges/G6-7/67dls-research_app.png';\nimport b24 from '../assets/badges/G6-7/67dls-web_dev.png';\nimport b25 from '../assets/badges/G6-7/67dls-web_manipulation.png';\nimport b26 from '../assets/badges/G6-7/67r-rebel_robot_challenge.png';\nimport b27 from '../assets/badges/G6-7/67r-robot_manufacturing.png';\nimport b28 from '../assets/badges/G6-7/67t-design_invent_solution.png';\nimport b29 from '../assets/badges/G8-9/89c-coding_events.png';\nimport b30 from '../assets/badges/G8-9/89c-complex_coding_fund3.png';\nimport b31 from '../assets/badges/G8-9/89c-levelup_onloops.png';\nimport b32 from '../assets/badges/G8-9/89c-soph_sequencing2.png';\nimport b33 from '../assets/badges/G8-9/89dls-creative_media.png';\nimport b34 from '../assets/badges/G8-9/89dls-cybersecurity.png';\nimport b35 from '../assets/badges/G8-9/89dls-digital_app.png';\nimport b36 from '../assets/badges/G8-9/89dls-digital_copyright.png';\nimport b37 from '../assets/badges/G8-9/89dls-digital_id.png';\nimport b38 from '../assets/badges/G8-9/89dls-digital_media.png';\nimport b39 from '../assets/badges/G8-9/89dls-website_creation.png';\nimport b40 from '../assets/badges/G8-9/89r-robot_manufacturing.png';\nimport b41 from '../assets/badges/G8-9/89r-rogue_robot_challenge.png';\nimport b42 from '../assets/badges/G8-9/89t-digital_entrepreneurship.png';\nimport b43 from '../assets/badges/T2C/t2c-teamwork.png';\nimport b44 from '../assets/badges/T2C/t2c-careers.png';\nimport b45 from '../assets/badges/T2C/t2c-time_mgmt.png';\nimport b46 from '../assets/badges/T2C/t2c-intro_entrepreneur.png';\nimport b47 from '../assets/badges/T2C/t2c-entrepreneur_bus_basics.png';\nimport b48 from '../assets/badges/T2C/t2c-entrepreneurship.png';\n\nimport b49 from '../assets/badges/G6-7/67e-entrepreneur-novice.png';\nimport b50 from '../assets/badges/G6-7/67e-entrepreneur-creativity.png';\nimport b51 from '../assets/badges/G6-7/67e-entrepreneur-explorer.png';\n\nimport b52 from '../assets/badges/G8-9/89e-entrepreneur-novice.png';\nimport b53 from '../assets/badges/G8-9/89e-entrepreneur-creativity.png';\nimport b54 from '../assets/badges/G8-9/89e-entrepreneur-explorer.png';\n\nimport b55 from '../assets/badges/T2C/t2c-disease_detective.png';\nimport b56 from '../assets/badges/T2C/t2c-steam_baughman.png';\nimport b57 from '../assets/badges/T2C/t2c-csi.png';\nimport b58 from '../assets/badges/T2C/t2c-leadership.png';\nimport b59 from '../assets/badges/T2C/t2c-media_comms-thiel.png';\nimport b60 from '../assets/badges/T2C/t2c-events.png';\nimport b61 from '../assets/badges/T2C/t2c-virtual_game.png';\nimport b62 from '../assets/badges/T2C/t2c-culinary.png';\nimport b63 from '../assets/badges/T2C/t2c-food_science.png';\nimport b64 from '../assets/badges/T2C/t2c-performing_arts.png';\nimport b65 from '../assets/badges/T2C/t2c-great_outdoors.png';\n\nimport transcriptsImg2 from '../assets/tabs/dp-mytranscripts.png';\nimport transcriptsImg from '../assets/transcripts/t2c-transcript-icon.png';\n\nimport BadgeDataContext from './badgeData-context';\n\nconst badges45Data = [\n {\n id: 'b1',\n img: b1,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Coding Events',\n courseDesc:\n 'Student developed a code that successfully completes the Ozoblocky Activities.',\n },\n {\n id: 'b2',\n img: b2,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Cool Coding Fundamentals',\n courseDesc: 'This is a description for Cool Coding Fundamentals',\n },\n {\n id: 'b3',\n img: b3,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Groovy Loops',\n courseDesc:\n 'Students successfully achieved the following coding activities using Ozoblockly Activities: Linear Sequence, Hack the Square, and Repeat a Sequence',\n },\n {\n id: 'b4',\n img: b4,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Spectacular Sequencing I',\n courseDesc:\n 'Student successfully completes block coding for the Ozobot robot including changing colors, moving forward, and repeating commands',\n },\n {\n id: 'b5',\n img: b5,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Creative Media',\n courseDesc:\n 'Student successfully created of a GIF that displays an emotion or promotion of a product.',\n },\n {\n id: 'b6',\n img: b6,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Device Navigation',\n courseDesc:\n 'Student created a flyer using word processing and/or presentation tools.',\n },\n {\n id: 'b7',\n img: b7,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Digital Citizenship',\n courseDesc:\n 'Student successfully completed the Ring of Responsibility Activity to encourage appropriate online decisions.',\n },\n {\n id: 'b8',\n img: b8,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Digital Privacy',\n courseDesc:\n 'Student successfully completed Digital Privacy lesson activity and Password Protect activity to increase their understanding of the importance of digital privacy.',\n },\n {\n id: 'b9',\n img: b9,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Research Sources',\n courseDesc:\n 'Student identified credible sources such as advertisements or commercials with 80% accuracy using effective Google search questions building internet research skills.',\n },\n {\n id: 'b10',\n img: b10,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Website Design',\n courseDesc:\n 'Student successfully completed the Internet Scavenger Hunt Activity using search engines to locate information',\n },\n {\n id: 'b11',\n img: b11,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Website Navigation',\n courseDesc:\n 'Students will be Introduced to various search engines Work individually or in pairs to complete the Internet Scavenger Hunt Activity.',\n },\n {\n id: 'b12',\n img: b12,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Robot Manufacturing',\n courseDesc:\n 'Part 1- Successful completion of the littleBits Basic Circuit Activity. Part 2- Successful completion of the littleBits Advanced Circuit Activity.',\n },\n {\n id: 'b13',\n img: b13,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Rocking Robot Challenge',\n courseDesc: 'Student successfully assembles the ClicBot Bic & Bac Robots',\n },\n {\n id: 'b14',\n img: b14,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'Design & Discovery',\n courseDesc: 'Design & Discovery',\n },\n {\n id: 'b14_5',\n img: b14_5,\n gradeLvl: 'G45',\n credHrs: '1',\n courseTitle: 'STEM Project 2023',\n courseDesc:\n 'Students completed a STEM project applying Digital Literacy and Coding.',\n },\n];\nconst badges67Data = [\n {\n id: 'b15',\n img: b15,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Coding Events II',\n courseDesc:\n 'Students will use a Block program for a rover that recognizes an obstacle and reacts to it by moving away and changes color outputs when it does.-Students will complete the \"Going Further, Rover: Driving and Avoiding Obstacles\" exercises to turn the headlights red when the rover is moving away from an obstacle and green when the rover is moving forward.',\n },\n {\n id: 'b16',\n img: b16,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Creative Coding Fundamentals II',\n courseDesc:\n 'Students will use a Block program to control and change an output for the Hummingbird.-Students will complete \"USING THE OUTPUTS\" exercises to control and change an output on the Hummingbird.',\n },\n {\n id: 'b17',\n img: b17,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Lawless Loops',\n courseDesc:\n 'Students will use a Block Program that loops 2 separate outputs in different ways.-Students will complete the Challenge to build a robot that uses 2 slow moving servos.-Students will build a program that uses 2 slow moving servos.',\n },\n {\n id: 'b18',\n img: b18,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Superb Sequencing II',\n courseDesc:\n 'Students will use a Block program to control and change an input for the Hummingbird.-Students will complete “USING THE INPUTS” exercises to control and change an input on the Hummingbird.',\n },\n {\n id: 'b19',\n img: b19,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Creative Media II',\n courseDesc:\n 'Students created an Infographic, visual image, on a chosen topic.',\n },\n {\n id: 'b20',\n img: b20,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Digital Footprint',\n courseDesc:\n 'Student completed project activity reflecting understanding of Digital Footprint and online activity.',\n },\n {\n id: 'b21',\n img: b21,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Digital Responsibility',\n courseDesc:\n 'Student participated and finished activities that demonstrate understanding of digital responsibility, using technology in a constructive manner.',\n },\n {\n id: 'b22',\n img: b22,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Operating Systems Navigation',\n courseDesc:\n 'Student completed a Google Slide Show which reflects ability to employ digital tools to create work.',\n },\n {\n id: 'b23',\n img: b23,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Research Application',\n courseDesc:\n 'Student project utilizes the web to research a topic and cite sources of information.',\n },\n {\n id: 'b24',\n img: b24,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Website Development',\n courseDesc:\n 'Student developed a new website with content using Google Sites.',\n },\n {\n id: 'b25',\n img: b25,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Website Manipulation',\n courseDesc: 'Student project reflects website edit and refinement skills.',\n },\n {\n id: 'b26',\n img: b26,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Rebel Robot Challenge',\n courseDesc:\n 'Students will create a new Hummingbird program and then build the body of the robot to combine the two.-Incorporate their Hummingbird parts to make it move and respond.',\n },\n {\n id: 'b27',\n img: b27,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Robot Manufacturing II',\n courseDesc:\n 'Students will construct a circuit that accepts input and delivers an output appropriate for the input.-Students will use the kit to build an original circuit that accepts stimulus (input) and delivers a response (output) appropriate for the input.',\n },\n {\n id: 'b28',\n img: b28,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Design Invention Solution',\n courseDesc: 'Design Invention Solution',\n },\n {\n id: 'b49',\n img: b49,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Entrepreneur Novice',\n courseDesc:\n 'Students create an Elevator Pitch of developed entrepreneur concept. Curriculum Activity: Completion of Elevator Pitch of Entrepreneur Business and Presentation',\n },\n {\n id: 'b50',\n img: b50,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Entrepreneur Creativity',\n courseDesc:\n 'Students apply entrepreneur traits to idea. Curriculum Activity: -Development of Idea, Hook, Business Name, Logo, Tagline.',\n },\n {\n id: 'b51',\n img: b51,\n gradeLvl: 'G67',\n credHrs: '1',\n courseTitle: 'Entrepreneur Explorer',\n courseDesc:\n 'Students demonstrate understanding of entrepreneurship. Curriculum Activity: -Participation in either Personality Quiz/Entrepreneur Quiz/Teen Entrepreneur Business Pitches -Completion of Mind Map ',\n },\n];\nconst badges89Data = [\n {\n id: 'b29',\n img: b29,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Coding Events III',\n courseDesc:\n 'Students have built a block program in which a flower blooms when an accelerometer is tilted.',\n },\n {\n id: 'b30',\n img: b30,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Complex Coding Fundamentals III',\n courseDesc:\n 'Students have designed a block program that controls and changes an output for the Hummingbird robot.',\n },\n {\n id: 'b31',\n img: b31,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Level-up on Loops',\n courseDesc:\n 'Students have built a program that uses 2 slow moving servos to track and move along a line as a foundation for a Robotics badge to build the robot that will use this program.',\n },\n {\n id: 'b32',\n img: b32,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Sophisticated Sequencing II',\n courseDesc:\n 'Students have demonstrated sequencing through creating a block program that uses an input to control an output for the Hummingbird robot.',\n },\n {\n id: 'b33',\n img: b33,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Creative Media III',\n courseDesc:\n 'Students have developed a Google site page that explains the difference between Addictive Design vs. Humane Design.',\n },\n {\n id: 'b34',\n img: b34,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Cybersecurity',\n courseDesc:\n 'Students complete a project outlining cybersecurity to identify and avoid online scams by analyzing a real-life situation in a group.',\n },\n {\n id: 'b35',\n img: b35,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Digital Applications',\n courseDesc:\n 'Students have created a PSA (Public Service Announcement) video about the importance of Digital Identity.',\n },\n {\n id: 'b36',\n img: b36,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Digital Copyright',\n courseDesc:\n 'Students have created a research project and Google web page, while being sure to cite sources.',\n },\n {\n id: 'b37',\n img: b37,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Digital Identity',\n courseDesc:\n '-Students will define and analyze credible sources by identifying sources as ads, educational, or commercial with 80% accuracy.-Review credible sources, ads, educational and commercial.-Develop effective google search questions.-Identify sources as credible, advertisement, educational or commercial-Students will compile a minimum of three sets of resources.',\n },\n {\n id: 'b38',\n img: b38,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Digital Media',\n courseDesc:\n 'Students developed an idea for a website delivering information about a place or product, and including, text, pictures, and video, demonstrating an understanding of key components of digital media.',\n },\n {\n id: 'b39',\n img: b39,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Website Creation',\n courseDesc:\n 'Students have created a website using an original concept and digital media design.',\n },\n {\n id: 'b40',\n img: b40,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Robot Manufacturing III',\n courseDesc:\n 'Students built a robot that will use code written during the coding badge to follow a line.',\n },\n {\n id: 'b41',\n img: b41,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Rogue Robot Challenge',\n courseDesc:\n 'Students build a robotic flower that they can make bloom by moving when an accelerometer is tilted.',\n },\n {\n id: 'b42',\n img: b42,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Design Entrepreneurship',\n courseDesc: 'This is a description for Design & Discovery',\n },\n {\n id: 'b52',\n img: b52,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Entrepreneur Novice',\n courseDesc:\n 'Students create an Elevator Pitch of developed entrepreneur concept. Curriculum Activity: Completion of Elevator Pitch of Entrepreneur Business and Presentation',\n },\n {\n id: 'b53',\n img: b53,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Entrepreneur Creativity',\n courseDesc:\n 'Students apply entrepreneur traits to idea. Curriculum Activity: -Development of Idea, Hook, Business Name, Logo, Tagline.',\n },\n {\n id: 'b54',\n img: b54,\n gradeLvl: 'G89',\n credHrs: '1',\n courseTitle: 'Entrepreneur Explorer',\n courseDesc:\n 'Students demonstrate understanding of entrepreneurship. Curriculum Activity: -Participation in either Personality Quiz/Entrepreneur Quiz/Teen Entrepreneur Business Pitches -Completion of Mind Map ',\n },\n];\nconst badgesT2CData = [\n {\n id: 'b43',\n img: b43,\n gradeLvl: 'T2C',\n credHrs: '1',\n courseTitle: 'Team Work',\n courseDesc:\n 'Students worked effectively in teams to complete career focused projects.',\n },\n {\n id: 'b44',\n img: b44,\n gradeLvl: 'T2C',\n credHrs: '1',\n courseTitle: 'STEM Careers',\n courseDesc:\n 'Students will have completed hands-on activities aligned with a focus career increasing their understanding of relative skills and career paths.',\n },\n {\n id: 'b45',\n img: b45,\n gradeLvl: 'T2C',\n credHrs: '1',\n courseTitle: 'Time Management',\n courseDesc:\n 'Students were able to effectively manage planning and implementing tasks on scheduled for career based activities.',\n },\n {\n id: 'b46',\n img: b46,\n gradeLvl: 'T2C',\n credHrs: '1',\n courseTitle: 'Intro to Entrepreneur',\n courseDesc:\n 'Students demonstrate understanding of entrepreneurship. Curriculum Activity: -Participation in Introduction to Entrepreneurship Activities. -Completion of Hook.',\n },\n {\n id: 'b47',\n img: b47,\n gradeLvl: 'T2C',\n credHrs: '1',\n courseTitle: 'Entrepreneurial Business Basics',\n courseDesc:\n 'Students reflect understanding of business in developing model. Curriculum Activity: Completion of Business Model Canvas',\n },\n {\n id: 'b48',\n img: b48,\n gradeLvl: 'T2C',\n credHrs: '1',\n courseTitle: 'Entrepreneurship',\n courseDesc:\n 'Students have completed a business plan to pitch. Curriculum Activity: Complete Entrepreneur Business Plan, Present Elevator Pitch of Business Plan ',\n },\n {\n id: 'b55',\n img: b55,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'Disease Detectives',\n courseDesc:\n 'Offering hands-on activities focused on healthcare and health sciences.',\n },\n {\n id: 'b56',\n img: b56,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'STEAM at Baughman Center',\n courseDesc:\n 'Exploration in STEAM projects to build 21st century skills for future careers.',\n },\n {\n id: 'b57',\n img: b57,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'CSI Forensic Investigations',\n courseDesc:\n 'Providing interactive projects to introduce science inquiry and healthcare career fields.',\n },\n {\n id: 'b58',\n img: b58,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'T2C Leadership',\n courseDesc:\n 'Building leadership skills and providing civic service opportunities.',\n },\n {\n id: 'b59',\n img: b59,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'Media and Communications at Thiel College',\n courseDesc:\n 'Providing hands-on experiences in state-of-the-art studio for communication and media careers.',\n },\n {\n id: 'b60',\n img: b60,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'Event Planning & Management',\n courseDesc:\n 'Developing project management skills and career awareness through designing and implementing an event.',\n },\n {\n id: 'b61',\n img: b61,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'Virtual Game Design',\n courseDesc:\n 'Building understanding and proficiency coding through application of the Godot 4 Engine.',\n },\n {\n id: 'b62',\n img: b62,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'Culinary Studio',\n courseDesc:\n 'The Science of the Dough- Introduction to culinary arts through hands-on culinary projects at the Mercer County Career Center.',\n },\n {\n id: 'b63',\n img: b63,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'Food science & Forensics',\n courseDesc:\n 'Investigating culinary and science careers through STEM projects.',\n },\n {\n id: 'b64',\n img: b64,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'T2C Performing Arts Studio ',\n courseDesc:\n 'Exploring performing arts careers through 21st century skills.',\n },\n {\n id: 'b65',\n img: b65,\n gradLvl: 'T2C',\n credHrs: '3',\n courseTitle: 'The Great Outdoor',\n courseDesc:\n 'Provides environmental education and career exploration through hands on projects.',\n },\n];\nconst transcripts = [\n {\n id: 'T2C',\n img: transcriptsImg,\n gradeLvl: 'transcripts',\n courseTitle: 'Teens-2-Careers',\n courseDesc: 'Teens-2-Careers Transcripts',\n },\n];\n\nconst defaultBadgeDataState = {\n currStudent: { id: '', earnedBadges: [] },\n currBadge: '',\n badgesData: badges45Data,\n};\n\nconst BadgeDataProvider = (props) => {\n const [badgeDataState, setBadgeDataState] = useState(defaultBadgeDataState);\n const [viewingMyBadges, setViewingMyBadges] = useState(false);\n const [currBadgeHasCert, setCurrBadgeHasCert] = useState(false);\n const [isTranscript, setIsTranscript] = useState(false);\n\n const fecthDataFromDynamoDB = async (roomCode) => {\n const encodedCode = encodeURIComponent(roomCode.toUpperCase());\n //console.log(\"encodedCode: \" + encodedCode);\n const response = await fetch(\n //`https://3ifzf06olk.execute-api.us-east-1.amazonaws.com/dc-staging/badges?room_id=${encodedCode}`\n `https://b69ffct766.execute-api.us-east-1.amazonaws.com/green/badges?room_id=${encodedCode}`\n );\n\n if (!response.ok) {\n throw new Error('Something went wrong!');\n }\n\n let transformedData = { earnedBadges: {}, id: '' };\n\n const responseJson = await response.json();\n //add ability to grab errors from the server here\n const responseData = responseJson.body;\n\n if (responseData.length === 0) {\n alert('No badges found for: ' + roomCode + '\\nPlease check your code.');\n return;\n }\n\n transformedData['id'] = responseData[0]['room_id'];\n\n for (let objNum in responseData) {\n let awarded_at = responseData[objNum]['awarded_at'];\n let recip = responseData[objNum]['recipient'];\n let awarded_by = responseData[objNum]['awarded_by'];\n transformedData['earnedBadges'][responseData[objNum]['badge_id']] = {\n recipient: recip,\n awarded_by: awarded_by,\n awarded_at: awarded_at,\n };\n }\n\n loadCurrStudentHandler(transformedData);\n };\n\n useEffect(() => {\n if (props.room_id && /^([A-Za-z0-9]{5}[?$#+]{1})$/.test(props.room_id)) {\n fecthDataFromDynamoDB(props.room_id);\n }\n }, []);\n\n const loadCurrBadgesData = (grdLvl) => {\n let updatedBadgesData = [];\n setViewingMyBadges(grdLvl === 'MyBadges');\n if (grdLvl === 'G45') {\n updatedBadgesData = badges45Data;\n } else if (grdLvl === 'G67') {\n updatedBadgesData = badges67Data;\n } else if (grdLvl === 'G89') {\n updatedBadgesData = badges89Data;\n } else if (grdLvl === 'T2C') {\n updatedBadgesData = badgesT2CData;\n } else if (grdLvl === 'MyTranscripts') {\n updatedBadgesData = transcripts;\n } else {\n updatedBadgesData = [].concat(\n badges45Data,\n badges67Data,\n badges89Data,\n badgesT2CData\n );\n }\n const updatedState = {\n currStudent: badgeDataState.currStudent,\n currBadge: badgeDataState.currBadge,\n badgesData: updatedBadgesData,\n };\n\n setBadgeDataState(updatedState);\n };\n\n const loadCurrStudentHandler = (student) => {\n if (student) {\n const newEarnedBadges = [];\n\n Object.keys(student.earnedBadges).map((key) => {\n newEarnedBadges.push({\n id: key,\n recip: student.earnedBadges[key].recipient,\n awarded_by: student.earnedBadges[key].awarded_by,\n compDate: student.earnedBadges[key].awarded_at,\n });\n });\n\n const currStudent = {\n id: student.id,\n earnedBadges: newEarnedBadges,\n };\n\n const updatedState = {\n currStudent: currStudent,\n currBadge: badgeDataState.currBadge,\n badgesData: badgeDataState.badgesData,\n };\n\n setBadgeDataState(updatedState);\n } else {\n console.log('Invalid student code!!!');\n alert('Invalid student code.');\n }\n };\n\n const loadCurrBadgeHandler = (id) => {\n const newCurrBadge = badgeDataState.badgesData.find((e) => e.id === id);\n\n const award = badgeDataState.currStudent.earnedBadges.find(\n (e) => e.id === id\n );\n setCurrBadgeHasCert(!!award && !!award.recip);\n\n //fix this\n if (newCurrBadge.gradeLvl === 'transcripts') {\n setIsTranscript(true);\n } else {\n setIsTranscript(false);\n }\n\n const updatedState = {\n currStudent: badgeDataState.currStudent,\n currBadge: newCurrBadge,\n badgesData: badgeDataState.badgesData,\n };\n setBadgeDataState(updatedState);\n };\n\n const getBadgeList = (grdLvl) => {\n if (grdLvl === 'G45') {\n return badges45Data;\n } else if (grdLvl === 'G67') {\n return badges67Data;\n } else if (grdLvl === 'G89') {\n return badges89Data;\n } else if (grdLvl === 'T2C') {\n return badgesT2CData;\n }\n };\n\n const badgeDataContext = {\n currStudent: badgeDataState.currStudent,\n currBadge: badgeDataState.currBadge,\n badgesData: badgeDataState.badgesData,\n viewingMyBadges: viewingMyBadges,\n currBadgeHasCert: currBadgeHasCert,\n isTranscript: isTranscript,\n getBadgeList: getBadgeList,\n loadCurrStudent: loadCurrStudentHandler,\n loadCurrBadge: loadCurrBadgeHandler,\n loadBadgesData: loadCurrBadgesData,\n fetchData: fecthDataFromDynamoDB,\n };\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default BadgeDataProvider;\n","// extracted by mini-css-extract-plugin\nexport default {};","import React, { useState } from 'react';\nimport BadgeDetail from './components/badges/BadgeDetail';\nimport Badges from './components/badges/Badges';\nimport MainHeader from './components/Layout/MainHeader';\nimport TabBanner from './components/Layout/TabBanner';\nimport BadgeDataProvider from './store/BadgeDataProvider';\nimport styles from './App.css';\n\nfunction App() {\n //get parameter from url if exists\n //test\n const queryParameters = new URLSearchParams(window.location.search);\n const invitationCode = queryParameters.get('invitationCode');\n\n const [showDetail, setShowDetail] = useState(false);\n\n const showBadgeDetailHandler = () => {\n setShowDetail(true);\n };\n\n const hideBadgeDetailHandler = () => {\n setShowDetail(false);\n };\n\n return (\n \n {showDetail && }\n \n \n \n
\n

\n \n Privacy Policy\n \n \n Terms Of Use\n \n

\n
\n
\n );\n}\n\nexport default App;\n","import ReactDOM from 'react-dom/client';\n\nimport './index.css';\nimport App from './App';\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));\nroot.render();\n"],"names":["pako","assign","require","module","exports","zlib_deflate","utils","strings","msg","ZStream","toString","Object","prototype","Z_OK","Z_DEFAULT_COMPRESSION","Z_DEFAULT_STRATEGY","Z_DEFLATED","Deflate","options","this","level","method","chunkSize","windowBits","memLevel","strategy","to","opt","raw","gzip","err","ended","chunks","strm","avail_out","status","deflateInit2","Error","header","deflateSetHeader","dictionary","dict","string2buf","call","Uint8Array","deflateSetDictionary","_dict_set","deflate","input","deflator","push","result","data","mode","_mode","next_in","avail_in","length","output","Buf8","next_out","onEnd","onData","buf2binstring","shrinkBuf","deflateEnd","chunk","join","flattenChunks","deflateRaw","zlib_inflate","c","GZheader","Inflate","inflateInit2","inflateGetHeader","inflateSetDictionary","inflate","inflator","next_out_utf8","tail","utf8str","allowBufError","Z_FINISH","Z_NO_FLUSH","binstring2buf","Z_NEED_DICT","Z_BUF_ERROR","Z_STREAM_END","Z_SYNC_FLUSH","utf8border","buf2string","arraySet","inflateEnd","inflateRaw","ungzip","TYPED_OK","Uint16Array","Int32Array","_has","obj","key","hasOwnProperty","sources","Array","slice","arguments","source","shift","TypeError","p","buf","size","subarray","fnTyped","dest","src","src_offs","len","dest_offs","set","i","l","pos","fnUntyped","concat","apply","setTyped","on","Buf16","Buf32","STR_APPLY_OK","STR_APPLY_UIA_OK","String","fromCharCode","__","_utf8len","q","str","c2","m_pos","str_len","buf_len","charCodeAt","max","out","c_len","utf16buf","adler","s1","s2","n","Z_PARTIAL_FLUSH","Z_FULL_FLUSH","Z_BLOCK","Z_TREES","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_BINARY","Z_TEXT","Z_UNKNOWN","crcTable","table","k","makeTable","crc","t","end","configuration_table","trees","adler32","crc32","MAX_MEM_LEVEL","L_CODES","LITERALS","D_CODES","BL_CODES","HEAP_SIZE","MAX_BITS","MIN_MATCH","MAX_MATCH","MIN_LOOKAHEAD","INIT_STATE","HCRC_STATE","BUSY_STATE","FINISH_STATE","BS_NEED_MORE","BS_BLOCK_DONE","BS_FINISH_STARTED","BS_FINISH_DONE","errorCode","rank","f","zero","flush_pending","s","state","pending","pending_buf","pending_out","total_out","flush_block_only","last","_tr_flush_block","block_start","strstart","put_byte","b","putShortMSB","read_buf","start","wrap","total_in","longest_match","cur_match","match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","limit","w_size","_win","window","wmask","w_mask","prev","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","m","more","_w_size","window_size","hash_size","head","insert","ins_h","hash_shift","hash_mask","deflate_fast","flush","hash_head","bflush","match_length","_tr_tally","max_lazy_match","last_lit","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","func","DeflateState","pending_buf_size","gzhead","gzindex","last_flush","w_bits","hash_bits","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","bl_count","heap","heap_len","heap_max","depth","l_buf","lit_bufsize","d_buf","opt_len","static_len","matches","bi_buf","bi_valid","deflateResetKeep","data_type","_tr_init","deflateReset","ret","max_block_size","max_start","deflateInit","old_flush","beg","val","text","hcrc","extra","name","comment","time","os","bstate","deflate_huff","deflate_rle","_tr_align","_tr_stored_block","avail","next","tmpDict","dictLength","deflateInfo","xflags","extra_len","done","_in","_out","dmax","wsize","whave","wnext","s_window","hold","bits","lcode","dcode","lmask","dmask","here","op","dist","from","from_source","lencode","distcode","lenbits","distbits","top","dolen","dodist","sane","inflate_fast","inflate_table","LENS","DISTS","HEAD","TYPE","BAD","ENOUGH_LENS","ENOUGH_DISTS","zswap32","InflateState","havedict","flags","check","total","wbits","offset","ncode","nlen","ndist","have","lens","work","lendyn","distdyn","back","was","inflateResetKeep","inflateReset","inflateReset2","lenfix","distfix","virgin","fixedtables","sym","updatewindow","copy","inflateInit","put","left","here_bits","here_op","here_val","last_bits","last_op","last_val","opts","hbuf","order","inf_leave","inflateInfo","MAXBITS","lbase","lext","dbase","dext","type","lens_index","codes","table_index","incr","fill","low","mask","min","root","curr","drop","used","huff","base","base_index","count","offs","extra_index","STORED_BLOCK","LENGTH_CODES","Buf_size","MAX_BL_BITS","END_BLOCK","REP_3_6","REPZ_3_10","REPZ_11_138","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","static_dtree","_dist_code","_length_code","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","put_short","w","send_bits","value","send_code","tree","bi_reverse","code","res","gen_codes","next_code","init_block","bi_windup","smaller","_n2","_m2","pqdownheap","v","j","compress_block","ltree","dtree","lc","lx","build_tree","desc","node","stree","h","xbits","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","send_tree","static_init_done","stored_len","copy_block","tr_static_init","opt_lenb","static_lenb","max_blindex","black_mask","detect_data_type","build_bl_tree","lcodes","dcodes","blcodes","send_all_trees","STATIC_TREES","bi_flush","aa","ca","a","encodeURIComponent","da","Set","ea","fa","ha","add","ia","document","createElement","ja","ka","la","ma","d","e","g","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","z","split","forEach","toLowerCase","ra","sa","toUpperCase","ta","pa","isNaN","qa","test","oa","removeAttribute","setAttribute","setAttributeNS","replace","xlinkHref","ua","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","va","Symbol","for","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","iterator","Ka","La","A","Ma","stack","trim","Na","Oa","prepareStackTrace","defineProperty","Reflect","construct","displayName","includes","Pa","tag","render","Qa","$$typeof","_context","_payload","_init","Ra","Sa","Ta","nodeName","Va","_valueTracker","getOwnPropertyDescriptor","constructor","get","configurable","enumerable","getValue","setValue","stopTracking","Ua","Wa","checked","Xa","activeElement","body","Ya","defaultChecked","defaultValue","_wrapperState","initialChecked","Za","initialValue","controlled","ab","bb","cb","db","ownerDocument","eb","isArray","fb","selected","defaultSelected","disabled","gb","dangerouslySetInnerHTML","children","hb","ib","jb","textContent","kb","lb","mb","nb","namespaceURI","innerHTML","valueOf","firstChild","removeChild","appendChild","MSApp","execUnsafeLocalFunction","ob","lastChild","nodeType","nodeValue","pb","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","qb","rb","sb","style","indexOf","setProperty","keys","charAt","substring","tb","menuitem","area","br","col","embed","hr","img","keygen","link","meta","param","track","wbr","ub","vb","is","wb","xb","target","srcElement","correspondingUseElement","parentNode","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","addEventListener","removeEventListener","Nb","onError","Ob","Pb","Qb","Rb","Sb","Tb","Vb","alternate","return","Wb","memoizedState","dehydrated","Xb","Zb","child","sibling","current","Yb","$b","ac","unstable_scheduleCallback","bc","unstable_cancelCallback","cc","unstable_shouldYield","dc","unstable_requestPaint","B","unstable_now","ec","unstable_getCurrentPriorityLevel","fc","unstable_ImmediatePriority","gc","unstable_UserBlockingPriority","hc","unstable_NormalPriority","ic","unstable_LowPriority","jc","unstable_IdlePriority","kc","oc","Math","clz32","pc","qc","log","LN2","rc","sc","tc","uc","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","vc","xc","yc","zc","Ac","eventTimes","Cc","C","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Map","Pc","Qc","Rc","Sc","delete","pointerId","Tc","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","Vc","Wc","priority","isDehydrated","containerInfo","Xc","Yc","dispatchEvent","Zc","$c","ad","bd","cd","ReactCurrentBatchConfig","dd","ed","transition","fd","gd","hd","id","Uc","stopPropagation","jd","kd","ld","md","nd","od","keyCode","charCode","pd","qd","rd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","Date","now","isTrusted","td","ud","view","detail","vd","Ad","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","location","repeat","locale","which","Rd","Td","width","height","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","touches","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","color","date","datetime","email","month","number","password","range","search","tel","url","week","me","ne","oe","event","listeners","pe","qe","re","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","nextSibling","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","href","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","selectionStart","selectionEnd","defaultView","getSelection","extend","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","element","scrollLeft","scrollTop","focus","Pe","Qe","Re","Se","Te","Ue","Ve","We","animationend","animationiteration","animationstart","transitionend","Xe","Ye","Ze","animation","$e","af","bf","cf","df","ef","ff","gf","hf","lf","mf","nf","Ub","instance","listener","D","of","has","pf","qf","rf","random","sf","bind","capture","passive","J","x","u","F","tf","uf","parentWindow","vf","wf","na","xa","$a","ba","je","char","ke","unshift","xf","yf","zf","Af","Bf","Cf","Df","Ef","__html","Ff","setTimeout","Gf","clearTimeout","Hf","Promise","Jf","queueMicrotask","resolve","then","catch","If","Kf","Lf","Mf","previousSibling","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","E","G","Vf","H","Wf","Xf","Yf","contextTypes","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Zf","childContextTypes","$f","ag","bg","getChildContext","cg","__reactInternalMemoizedMergedChildContext","dg","eg","fg","gg","hg","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","I","zg","Ag","Bg","elementType","deletions","Cg","pendingProps","treeContext","retryLane","Dg","Eg","Fg","Gg","memoizedProps","Hg","Ig","Jg","Kg","Lg","defaultProps","Mg","Ng","Og","Pg","Qg","Rg","_currentValue","Sg","childLanes","Tg","dependencies","firstContext","lanes","Ug","Vg","context","memoizedValue","Wg","Xg","Yg","interleaved","Zg","$g","ah","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","effects","bh","ch","eventTime","lane","payload","callback","dh","K","eh","fh","gh","r","y","hh","ih","jh","Component","refs","kh","nh","isMounted","_reactInternals","enqueueSetState","L","lh","mh","enqueueReplaceState","enqueueForceUpdate","oh","shouldComponentUpdate","isPureReactComponent","ph","contextType","updater","qh","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","rh","props","getDerivedStateFromProps","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","componentDidMount","sh","ref","_owner","_stringRef","th","uh","vh","index","wh","xh","yh","implementation","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","tagName","Jh","Kh","Lh","M","Mh","revealOrder","Nh","Oh","_workInProgressVersionPrimary","Ph","ReactCurrentDispatcher","Qh","Rh","N","O","P","Sh","Th","Uh","Vh","Q","Wh","Xh","Yh","Zh","$h","ai","bi","ci","baseQueue","queue","di","ei","fi","lastRenderedReducer","action","hasEagerState","eagerState","lastRenderedState","dispatch","gi","hi","ii","ji","ki","getSnapshot","li","mi","R","ni","lastEffect","stores","oi","pi","qi","ri","create","destroy","deps","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","identifierPrefix","Ki","message","digest","Li","Mi","console","error","Ni","WeakMap","Oi","Pi","Qi","Ri","getDerivedStateFromError","componentDidCatch","Si","componentStack","Ti","pingCache","Ui","Vi","Wi","Xi","ReactCurrentOwner","Yi","Zi","$i","aj","bj","compare","cj","dj","ej","baseLanes","cachePool","transitions","fj","gj","hj","ij","jj","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","kj","lj","pendingContext","mj","Aj","Bj","Cj","Dj","nj","oj","pj","fallback","qj","rj","tj","dataset","dgst","uj","vj","_reactRetry","sj","subtreeFlags","wj","xj","isBackwards","rendering","renderingStartTime","tailMode","yj","Ej","S","Fj","Gj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","createElementNS","autoFocus","createTextNode","T","Hj","Ij","Jj","Kj","U","Lj","WeakSet","V","Mj","W","Nj","Oj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","insertBefore","_reactRootContainer","Xj","X","Yj","Zj","ak","onCommitFiberUnmount","componentWillUnmount","bk","ck","dk","ek","fk","isHidden","gk","hk","display","ik","jk","kk","lk","__reactInternalSnapshotBeforeUpdate","Wk","mk","ceil","nk","ok","pk","Y","Z","qk","rk","sk","tk","uk","Infinity","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","callbackNode","expirationTimes","expiredLanes","wc","callbackPriority","ig","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","finishedWork","finishedLanes","Qk","timeoutHandle","Rk","Sk","Tk","Uk","Vk","mutableReadLanes","Bc","Pj","onCommitFiberRoot","mc","onRecoverableError","Xk","onPostCommitFiberRoot","Yk","Zk","al","isReactComponent","pendingChildren","bl","mutableSourceEagerHydrationData","cl","cache","pendingSuspenseBoundaries","el","fl","gl","hl","il","jl","zj","$k","ll","reportError","ml","_internalRoot","nl","ol","pl","ql","sl","rl","unmount","unstable_scheduleHydration","splice","querySelectorAll","JSON","stringify","form","tl","usingClientEntryPoint","Events","ul","findFiberByHostInstance","bundleType","version","rendererPackageName","vl","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","wl","isDisabled","supportsFiber","inject","createPortal","dl","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","__self","__source","jsx","jsxs","setState","forceUpdate","escape","_status","_result","default","Children","map","toArray","only","Fragment","Profiler","PureComponent","StrictMode","Suspense","cloneElement","createContext","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","createFactory","createRef","forwardRef","isValidElement","lazy","memo","startTransition","unstable_act","pop","sortIndex","performance","setImmediate","startTime","expirationTime","priorityLevel","navigator","scheduling","isInputPending","MessageChannel","port2","port1","onmessage","postMessage","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","floor","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","delay","unstable_wrapCallback","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","definition","o","prop","React","currStudent","earnedBadges","currBadge","badgesData","viewingMyBadges","currBadgeHasCert","isTranscript","getBadgeList","grdLvl","loadCurrStudent","loadCurrBadge","loadBadgesData","Backdrop","_jsx","className","classes","backdrop","onClose","ModalOverlay","modal","content","portalElement","getElementById","_jsxs","ReactDOM","extendStatics","setPrototypeOf","__proto__","__extends","__assign","__awaiter","thisArg","_arguments","generator","reject","fulfilled","step","rejected","__generator","_","label","sent","trys","ops","verb","__spreadArrays","chars","lookup","ByteOrder","decodeFromBase64","base64","encoded1","encoded2","encoded3","encoded4","bufferLength","bytes","DATA_URI_PREFIX_REGEX","toCharCode","character","toHexStringOfMinLength","num","minLength","padStart","toHexString","charFromCode","padChar","padding","idx","copyStringIntoBuffer","buffer","cleanText","escapedNewlineChars","isNewlineChar","lineSplit","mergeLines","charAtIndex","cuSecond","cuFirst","nextIndex","breakTextIntoLines","wordBreaks","maxWidth","computeWidthOfText","regex","newlineCharUnion","escapedRules","wordBreak","breakRules","RegExp","buildWordBreakRegex","words","currLine","currWidth","lines","pushCurrLine","word","dateRegex","parseDate","dateStr","year","_a","_b","day","_c","hours","_d","mins","_e","secs","_f","offsetSign","_g","offsetHours","_h","findLastMatch","lastMatch","position","array","typedArrayFor","typedArray","mergeIntoTypedArray","arrays","_i","arrayCount","typedArrays","totalSize","merged","arrIdx","arr","byteIdx","arrLen","arrayAsString","byAscendingId","reverseArray","arrayLen","leftIdx","rightIdx","temp","toUint8Array","dataUri","trimmedUri","fullMatch","decodeFromBase64DataUri","ArrayBuffer","waitForTick","highSurrogate","codePoint","lowSurrogate","REPLACEMENT","codePointAt","utf16Decode","byteOrderMark","fromCodePoint","byteOrder","readBOM","BigEndian","codePoints","first","decodeValues","isHighSurrogate","second","isLowSurrogate","LittleEndian","hasUtf16BigEndianBOM","hasUtf16LittleEndianBOM","hasUtf16BOM","sizeInBytes","bytesFor","decompressJson","compressedJson","arrayToString","FontNames","compressedJsonForFontName","fontCache","Font","_this","getWidthOfGlyph","glyphName","CharWidths","getXAxisKerningForPair","leftGlyphName","rightGlyphName","KernPairXAmounts","load","fontName","cachedFont","json","font","parse","CharMetrics","reduce","acc","metric","WX","KernPairs","name1","name2","decompressedEncodings","allUnicodeMappings","Encoding","unicodeMappings","canEncodeUnicodeCodePoint","encodeUnicodeCodePoint","mapped","hexCode","supportedCodePoints","Number","sort","Encodings","symbol","ZapfDingbats","zapfdingbats","WinAnsi","win1252","values","StandardFontValues","isStandardFont","rectanglesAreEqual","backtick","formatValue","assertIsOneOf","valueName","allowedValues","objectValues","joinedValues","createValueErrorMsg","assertIsOneOfOrUndefined","isType","Function","createTypeErrorMsg","types","allowedTypes","joinedTypes","assertIs","assertOrUndefined","assertEachIs","assertRange","assertRangeOrUndefined","assertMultiple","multiplier","assertPositive","sign","pdfDocEncodingToUnicode","pdfDocEncodingDecode","Cache","populate","access","invalidate","populatedBy","CharCodes","MethodNotImplementedError","_super","methodName","PrivateConstructorError","UnexpectedObjectTypeError","expected","actual","UnsupportedEncodingError","encoding","ReparseError","MissingPageContentsEmbeddingError","MissingCatalogError","UnrecognizedStreamTypeError","stream","contructor","PageEmbeddingMismatchedContextError","PDFArrayIsNotRectangleError","InvalidPDFDateStringError","InvalidTargetIndexError","targetIndex","Count","CorruptPageTreeError","operation","IndexOutOfBoundsError","InvalidAcroFieldValueError","MultiSelectValueError","MissingDAEntryError","fieldName","MissingTfOperatorError","NumberParsingError","line","column","PDFParsingError","details","NextByteAssertionError","expectedByte","actualByte","PDFObjectParsingError","byte","PDFInvalidObjectParsingError","PDFStreamParsingError","UnbalancedParenthesisError","StalledParserError","MissingPDFHeaderError","MissingKeywordError","keyword","PDFHeader","major","minor","copyBytesInto","initialOffset","Percent","Dash","Period","Newline","forVersion","PDFObject","clone","_buffer","_offset","PDFNumber","numberValue","stringValue","numStr","abs","parseInt","negative","pow","numberToString","asNumber","PDFArray","object","remove","lookupMaybe","asRectangle","lowerLeftX","lowerLeftY","asArray","withContext","arrayString","LeftSquareBracket","Space","RightSquareBracket","scalePDFNumbers","factor","ENFORCER","PDFBool","enforcer","asBoolean","True","False","IsDelimiter","LeftParen","RightParen","LessThan","GreaterThan","LeftCurly","RightCurly","ForwardSlash","IsWhitespace","Null","Tab","FormFeed","CarriageReturn","IsIrregular","Hash","decodeName","hex","charFromHexCode","pool","PDFName","encodedName","ExclamationPoint","Tilde","asBytes","escaped","pushByte","nextChar","Zero","Nine","decodeText","asString","decodedValue","Length","FlateDecode","Resources","XObject","ExtGState","Contents","Type","Parent","MediaBox","Page","Annots","TrimBox","ArtBox","BleedBox","CropBox","Rotate","Title","Author","Subject","Creator","Keywords","Producer","CreationDate","ModDate","PDFNull","asNull","PDFDict","entries","preservePDFNull","asMap","uniqueKey","existingKeys","addRandomSuffix","dictString","fromMapWithContext","PDFStream","getContentsString","getContents","getContentsSize","updateDict","contentsSize","streamString","contents","PDFRawStream","asUint8Array","PDFRef","objectNumber","generationNumber","PDFOperator","args","arg","PDFOperatorNames","PDFFlateStream","encode","computeContents","unencodedContents","getUnencodedContents","contentsCache","PDFContentStream","operators","getUnencodedContentsSize","SimpleRNG","seed","nextInt","sin","withSeed","byAscendingObjectNumber","PDFContext","largestObjectNumber","trailerInfo","indirectObjects","rng","nextRef","register","getObjectRef","pdfObject","enumerateIndirectObjects","literal","flateStream","Filter","contentStream","formXObject","BBox","Matrix","Subtype","getPushGraphicsStateContentStream","pushGraphicsStateContentStreamRef","Ops","PushGraphicsState","getPopGraphicsStateContentStream","popGraphicsStateContentStreamRef","PopGraphicsState","prefix","suffixLength","PDFPageLeaf","autoNormalizeCTM","normalized","dictOrRef","getInheritableAttribute","arrayOrRef","numberOrRef","attribute","ascend","setParent","parentRef","addContentStream","contentStreamRef","normalizedEntries","wrapContentStreams","startStream","endStream","addAnnot","annotRef","removeAnnot","setFontDictionary","fontDictRef","newFontDictionaryKey","newFontDictionary","setXObject","xObjectRef","newXObjectKey","newXObject","setExtGState","extGStateRef","newExtGStateKey","newExtGState","visitor","normalize","contentsRef","InheritableEntries","withContextAndParent","parent","PDFObjectCopier","traversedObjects","copyPDFPage","copyPDFDict","copyPDFArray","copyPDFStream","copyPDFIndirectObject","originalPage","clonedPage","originalDict","clonedDict","originalArray","clonedArray","originalStream","clonedStream","newRef","dereferencedValue","cloned","PDFCrossRefSection","firstEntry","subsections","chunkIdx","chunkLength","addEntry","append","deleted","addDeletedEntry","nextFreeObjectNumber","section","rangeIdx","rangeLen","entryIdx","entryLen","entry","subsection","subsectionLength","copySubsectionsIntoBuffer","firstObjectNumber","rangeLength","copyEntriesIntoBuffer","entryOffset","entryGen","currEntry","prevEntry","createEmpty","PDFTrailer","lastXRefOffset","forLastCrossRefSectionOffset","PDFTrailerDict","PDFObjectStream","objects","offsets","computeObjectOffsets","offsetsString","computeOffsetsString","getObjectsCount","withContextAndObjects","PDFWriter","objectsPerTick","parsedObjects","shouldWaitForTick","serializeToBuffer","computeBufferSize","xref","trailerDict","trailer","computeIndirectObjectSize","createTrailerDict","Size","Root","Encrypt","Info","ID","indirectObject","xrefOffset","forContext","PDFInvalidObject","EntryType","PDFCrossRefStream","computeIndex","computeEntryTuples","entryTuples","Deleted","Uncompressed","Compressed","objectStreamRef","computeMaxEntryByteWidths","entryTuplesCache","widths","third","firstSize","secondSize","thirdSize","maxByteWidthsCache","indexCache","addUncompressedEntry","addCompressedEntry","byteWidths","entriesLen","firstBytes","secondBytes","thirdBytes","entryWidth","sum","PDFStreamWriter","encodeStreams","objectsPerStream","xrefStream","uncompressedObjects","compressedObjects","objectStreamRefs","objectStream","xrefStreamRef","PDFHexString","hexLength","hexOffset","bytesOffset","decodeDate","fromText","encoded","utf16Encode","StandardFontEmbedder","customName","FontName","encodeText","glyphs","encodeTextAsGlyphs","hexCodes","widthOfTextAtSize","totalWidth","right","kernAmount","widthOfGlyph","heightOfFontAtSize","descender","Ascender","Descender","FontBBox","sizeOfFontAtHeight","embedIntoContext","fontDict","BaseFont","fillCmapTemplate","bfChars","cmapHexFormat","cmapHexString","cmapCodePointFormat","isWithinBMP","hasSurrogates","hs","ls","deriveFontFlags","familyClass","sFamilyClass","flipBit","bit","fixedPitch","serif","symbolic","script","nonsymbolic","italic","allCap","smallCap","forceBold","makeFontFlags","post","isFixedPitch","macStyle","PDFString","octal","Backspace","BackSlash","Seven","fromDate","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","CustomFontEmbedder","fontData","fontFeatures","allGlyphsInFontSortedById","characterSet","glyphForCodePoint","indexer","uniq","sortedUniq","scale","unitsPerEm","postscriptName","baseFontName","glyphCache","fontkit","layout","advanceWidth","ascent","descent","bbox","maxY","minY","embedFontDict","embedCIDFontDict","cidFontDictRef","unicodeCMapRef","embedUnicodeCmap","DescendantFonts","ToUnicode","isCFF","cff","embedFontDescriptor","fontDescriptorRef","cidFontDict","CIDToGIDMap","CIDSystemInfo","Registry","Ordering","Supplement","FontDescriptor","computeWidths","embedFontStream","fontStreamRef","italicAngle","capHeight","xHeight","minX","maxX","fontDescriptor","Flags","ItalicAngle","Ascent","Descent","CapHeight","XHeight","StemV","serializeFont","fontStream","cmap","glyphId","glyph","unicode","createCmap","cmapStream","currSection","currGlyph","prevGlyph","currGlyphId","prevGlyphId","CustomFontSubsetEmbedder","customFontName","subset","createSubset","glyphIdMap","subsetGlyphId","includeGlyph","parts","encodeStream","mergedBuffer","mergeUint8Arrays","AFRelationship","FileEmbedder","fileData","fileName","mimeType","description","creationDate","modificationDate","afRelationship","embeddedFileStream","Params","embeddedFileStreamRef","fileSpecDict","UF","EF","Desc","ColorSpace","MARKERS","ChannelToColorSpace","DeviceGray","DeviceRGB","DeviceCMYK","JpegEmbedder","imageData","bitsPerComponent","colorSpace","dataView","DataView","getUint16","byteLength","marker","getUint8","channelByte","channelName","xObject","BitsPerComponent","Width","Height","Decode","UPNG","tabs","acTL","toRGBA8","decodeImage","frms","frames","empty","frm","fx","rect","fy","fw","fdata","blend","_copyTile","dispose","bpp","decode","_getBPP","bpl","bf32","Uint32Array","ctype","rs","_bin","readUshort","qarea","ts","tr","ap","s0","t0","gr","off","buff","bin","rUs","rUi","readUint","doff","foff","mgck","readASCII","_IHDR","num_frames","num_plays","fr","_decompress","rct","del","round","nz","nextZero","keyw","readUTF8","readBytes","compress","interlace","filter","_inflate","_filterZero","_readInterlace","$","byteOffset","cbpp","starting_row","starting_col","row_increment","col_increment","pass","sw","cr","bpll","row","cdi","paeth","_paeth","writeUshort","writeUint","writeASCII","pad","ns","decodeURIComponent","tw","xoff","yoff","ifa","ioa","bufs","ps","dels","forbidPlte","nimg","compressPNG","_main","encodeLL","bipp","bipl","wUi","wUs","wAs","anim","pltAlpha","leng","plte","cimg","wr","imgd","ioff","levelZero","prms","onlyBlend","evenCrd","forbidPrev","minBits","alphaAnd","ilen","gotAlpha","framize","inds","nbufs","abuf","concatRGBA","qres","quantize","cof","bln","est","rgba","img32","nw","ind","cmc","inj","alwaysBlend","cimg32","nx","ny","tlim","tstp","tarea","it","pimg","p32","mix","miy","may","sarea","_prepareDiff","r0","r1","miX","miY","_updateFrame","U8","U32","pimg32","cx","cy","rec","fls","ftry","CMPR","UZIP","_filterLine","tsize","tab","update","oimg","nimg32","KD","getKDtree","leafs","planeDst","getNearest","i0","i1","bst","tdst","stats","estats","maxL","splitPixels","eMq255","ln","rn","node0","node1","eMq","d0","d1","d2","d3","vecDot","m0","m1","m2","m3","iN","M4","tmi","multVec","sqrt","dot","sml","Cov","tlen","noff","PngType","PNG","pngData","upng","rgbaChannel","pixelCount","rgbChannel","alphaChannel","rgbaOffset","rgbOffset","alphaOffset","splitAlphaChannel","some","Greyscale","Truecolour","IndexedColour","GreyscaleWithAlpha","TruecolourWithAlpha","getImageType","PngEmbedder","png","image","SMask","embedAlphaChannel","Stream","getByte","b0","b1","getInt32","getBytes","forceClamped","strEnd","Uint8ClampedArray","peekByte","peekedByte","peekBytes","skip","reset","moveStart","makeSubStream","emptyBuffer","DecodeStream","maybeMinBufferLength","eof","minBufferLength","readBlock","ensureBuffer","bufEnd","requested","buffer2","isSpace","Ascii85Stream","maybeLength","AsciiHexStream","firstDigit","maxDecodeLength","digit","codeLenCodeMap","lengthDecode","distDecode","fixedLitCodeTab","fixedDistCodeTab","FlateStream","cmf","flg","codeSize","codeBuf","hdr","getBits","litCodeTable","distCodeTable","numLitCodes","numDistCodes","numCodeLenCodes","codeLenCodeLengths","codeLenCodeTab","generateHuffmanTable","codeLengths","bitsLength","bitsOffset","what","getCode","repeatLength","code1","code2","blockLen","maxLen","codeLen","codeVal","lengths","LZWStream","earlyChange","cachedData","bitsCached","maxLzwDictionarySize","lzwState","codeLength","nextCode","dictionaryValues","dictionaryLengths","dictionaryPrevCodes","currentSequence","currentSequenceLength","estimatedDecodedSize","blockSize","prevCode","decodedLength","currentBufferLength","readBits","hasPrev","RunLengthStream","repeatHeader","decodeStream","params","EarlyChange","decodePDFRawStream","DecodeParms","PDFPageEmbedder","page","boundingBox","transformationMatrix","mediaBox","bottom","fullPageBoundingBox","boundingBoxAdjustedMatrix","decodedContents","decodeContents","FormType","newline","NonFullScreenPageMode","ReadingDirection","PrintScaling","Duplex","asEnum","rawValue","enumType","ViewerPreferences","lookupBool","returnObj","lookupName","HideToolbar","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","Direction","PickTrayByPDFSize","PrintPageRange","NumCopies","getHideToolbar","getHideMenubar","getHideWindowUI","getFitWindow","getCenterWindow","getDisplayDocTitle","getNonFullScreenPageMode","UseNone","getReadingDirection","direction","L2R","getPrintScaling","scaling","AppDefault","getDuplex","duplex","getPickTrayByPDFSize","getPrintPageRange","pageRanges","getNumCopies","setHideToolbar","hideToolbar","setHideMenubar","hideMenubar","setHideWindowUI","hideWindowUI","setFitWindow","fitWindow","setCenterWindow","centerWindow","setDisplayDocTitle","displayTitle","setNonFullScreenPageMode","nonFullScreenPageMode","setReadingDirection","readingDirection","setPrintScaling","printScaling","setDuplex","dup","setPickTrayByPDFSize","pickTrayByPDFSize","setPrintPageRange","printPageRange","flatRange","setNumCopies","numCopies","MAX_VALUE","isInteger","assertInteger","fromDict","tfRegex","PDFAcroField","valueOrRef","Kids","DA","setKids","kids","getParent","getFullyQualifiedName","getPartialName","setPartialName","partialName","setDefaultAppearance","appearance","getDefaultAppearance","setFontSize","fontSize","daMatch","daStart","daEnd","modifiedDa","getFlags","setFlags","hasFlag","flag","setFlag","clearFlag","setFlagTo","enable","BorderStyle","getWidth","setWidth","PDFAnnotation","Rect","AP","getRectangle","setRectangle","getAppearanceState","AS","setAppearanceState","setAppearances","appearances","ensureAP","getNormalAppearance","setNormalAppearance","setRolloverAppearance","setDownAppearance","removeRolloverAppearance","removeDownAppearance","getAppearances","normal","rollover","down","AppearanceCharacteristics","BC","BG","CA","RC","AC","getRotation","getBorderColor","components","component","getBackgroundColor","getCaptions","setRotation","rotation","setBorderColor","setBackgroundColor","setCaptions","captions","PDFWidgetAnnotation","MK","BS","setP","getAppearanceCharacteristics","getOrCreateAppearanceCharacteristics","getBorderStyle","getOrCreateBorderStyle","bs","getOnValue","PDFAcroTerminal","FT","nameOrRef","getWidgets","kidDicts","widgets","addWidget","removeWidget","PDFAcroButton","Opt","setOpt","getExportValues","removeExportValue","normalizeExportValues","exportValues","widget","exportVal","addOpt","useExistingOptIdx","existingIdx","optText","addWidgetWithOpt","optIdx","apStateValue","PDFAcroCheckBox","AcroFieldFlags","AcroButtonFlags","AcroTextFlags","AcroChoiceFlags","bitIndex","PDFAcroChoice","setValues","Combo","Edit","valuesAreValid","MultiSelect","updateSelectedIndices","getOptions","find","indices","findIndex","getValues","setOptions","newOpt","item","PDFAcroComboBox","PDFAcroNonTerminal","addField","field","PDFAcroSignature","PDFAcroText","MaxLen","setMaxLength","maxLength","removeMaxLength","getMaxLength","setQuadding","quadding","getQuadding","removeValue","PDFAcroPushButton","PushButton","PDFAcroRadioButton","getOnValues","onValues","onValue","Radio","PDFAcroListBox","createPDFAcroFields","createPDFAcroField","isNonTerminalAcroField","createPDFAcroTerminal","kid","ftNameOrRef","createPDFAcroButton","createPDFAcroChoice","ffNumberOrRef","ffNumber","flagIsSet","startNode","PDFAcroForm","Fields","fields","getFields","getAllFields","allFields","pushFields","fieldModel","removeField","PDFCatalog","Pages","AcroForm","getAcroForm","getOrCreateAcroForm","acroForm","acroFormRef","getViewerPreferences","getOrCreateViewerPreferences","viewerPrefs","viewerPrefsRef","insertLeafNode","leafRef","pagesRef","removeLeafNode","withContextAndPages","pages","PDFPageTree","pushTreeNode","treeRef","pushLeafNode","insertLeafKid","leafsRemainingUntilTarget","kidRef","prune","removeKid","traverse","kidIdx","newCount","IsDigit","One","Two","Three","Four","Five","Six","Eight","IsNumericPrefix","Plus","Minus","IsNumeric","BaseParser","capNumbers","parseRawInt","peek","isFinite","parseRawNumber","MAX_SAFE_INTEGER","warn","skipWhitespace","skipLine","skipComment","skipWhitespaceAndComments","matchKeyword","moveTo","ByteStream","assertNext","peekAhead","steps","peekAt","fromPDFRawStream","rawStream","endstream","endobj","startxref","true","false","null","streamEOF1","streamEOF2","streamEOF3","streamEOF4","EOF1endstream","EOF2endstream","EOF3endstream","PDFObjectParser","byteStream","parseObject","parseDictOrStream","parseHexString","parseString","parseName","parseArray","parseNumberOrRef","firstNum","lookaheadStart","secondNum","nestingLvl","isEscaped","pdfArray","parseDict","startPos","findEndOfStreamFallback","forBytes","forByteStream","PDFObjectStreamParser","alreadyParsed","firstOffset","objectCount","parseIntoContext","offsetsAndObjectNumbers","parseOffsetsAndObjectNumbers","forStream","PDFXRefStreamParser","Index","length_1","parseEntries","typeFieldWidth","offsetFieldWidth","genFieldWidth","subsectionIdx","subsectionLen","length_2","objIdx","inObjectStream","PDFParser","pdfBytes","throwOnInvalidObject","parseDocument","parseHeader","parseDocumentSection","prevOffset","maybeRecoverRoot","isValidCatalog","skipBinaryHeaderComment","parseIndirectObjectHeader","matchIndirectObjectHeader","parseIndirectObject","tryToParseInvalidIndirectObject","failed","parseIndirectObjects","skipJibberish","maybeParseCrossRefSection","firstInt","secondInt","maybeParseTrailerDict","maybeParseTrailer","forBytesWithOptions","AnnotationFlags","RotationTypes","asPDFName","asPDFNumber","LineCapStyle","degrees","degreeAngle","Degrees","angle","Radians","degreesToRadians","degree","PI","toRadians","toDegrees","reduceRotation","quadrants","adjustDimsForRotation","dims","clip","ClipNonZero","cos","tan","concatTransformationMatrix","ConcatTransformationMatrix","translate","xPos","yPos","rotateRadians","rotateDegrees","skewRadians","xSkewAngle","ySkewAngle","setDashPattern","dashArray","dashPhase","SetLineDashPattern","LineJoinStyle","setLineCap","SetLineCapStyle","TextRenderingMode","setGraphicsState","SetGraphicsStateParams","pushGraphicsState","popGraphicsState","setLineWidth","SetLineWidth","appendBezierCurve","x1","y1","x2","y2","x3","y3","AppendBezierCurve","appendQuadraticCurve","CurveToReplicateInitialPoint","closePath","ClosePath","MoveTo","lineTo","LineTo","stroke","StrokePath","FillNonZero","fillAndStroke","FillNonZeroAndStroke","endPath","EndPath","showText","ShowText","beginText","BeginText","endText","EndText","setFontAndSize","SetFontAndSize","ColorTypes","rotateAndSkewTextRadiansAndTranslate","rotationAngle","SetTextMatrix","drawObject","DrawObject","beginMarkedContent","BeginMarkedContent","endMarkedContent","EndMarkedContent","TextAlignment","grayscale","gray","Grayscale","rgb","red","green","blue","RGB","cmyk","cyan","magenta","yellow","CMYK","setFillingColor","NonStrokingColorGray","NonStrokingColorRgb","NonStrokingColorCmyk","setStrokingColor","StrokingColorGray","StrokingColorRgb","StrokingColorCmyk","componentsToColor","comps","colorToComponents","px","py","sx","sy","parameters","runners","cmd","cmds","solveArc","coords","rx","ry","rot","large","sweep","ex","ey","segs_1","arcToSegments","seg","bez","segmentToBezier","rotateX","ox","oy","sinTh","cosTh","a00","a01","a10","a11","x0","y0","sfactorSq","sfactor","th0","atan2","thArc","segments","th2","th3","cx1","cy1","th1","thHalf","svgPathToOperators","path","commands","curArg","foundDecimal","path_1","drawImage","graphicsState","rotate","xSkew","ySkew","Boolean","drawRectangle","borderColor","borderWidth","borderLineCap","borderDashArray","borderDashPhase","KAPPA","drawEllipse","config","xScale","yScale","xm","ym","drawEllipsePath","centerX","centerY","drawEllipseCurves","rotateInPlace","drawCheckBox","outline","filled","checkMark","p2x","p2y","p1x","thickness","drawCheckMark","markColor","drawRadioButton","outlineScale","dotColor","drawButton","background","drawTextLines","textLines","textColor","drawTextField","clipX","clipY","clipWidth","clipHeight","clippingArea","markedContent","EncryptedPDFError","FontkitNotRegisteredError","ForeignPageError","RemovePageFromEmptyDocumentError","NoSuchFieldError","UnexpectedFieldTypeError","FieldAlreadyExistsError","MissingOnValueCheckError","InvalidFieldNamePartError","namePart","RichTextFieldReadError","FieldExistsAsNonTerminalError","CombedTextLayoutError","lineLength","cellCount","ExceededMaxLengthError","textLength","InvalidMaxLengthError","computeFontSize","bounds","multiline","linesUsed","lineIdx","lineLen","spaceInLineRemaining","widthOfWord","heightAtSize","computeCombedFontSize","cellWidth","cellHeight","cLen","charSplit","lastIndexOfWhitespace","splitOutLines","lastWhitespaceIdx","remainder","layoutMultilineText","alignment","prevRemainder","Center","layoutSinglelineText","normalizeAppearance","getDefaultFontSize","defaultFontSize","colorRegex","getDefaultColor","c1","c3","c4","updateDefaultAppearance","defaultCheckBoxAppearanceProvider","checkBox","widgetColor","fieldColor","acroField","rectangle","black","normalBackgroundColor","downBackgroundColor","defaultRadioGroupAppearanceProvider","radioGroup","defaultButtonAppearanceProvider","widgetFontSize","fieldFontSize","normalText","downText","normalLayout","downLayout","defaultTextFieldAppearanceProvider","textField","getText","isCombed","isMultiline","getAlignment","cells","cellOffset","charOffset","charLength","layoutCombedText","defaultDropdownAppearanceProvider","dropdown","getSelected","defaultOptionListAppearanceProvider","optionList","isSorted","selectedLines","highlights","selectedColor","drawOptionList","PDFEmbeddedPage","doc","embedder","alreadyEmbedded","PDFDocument","PDFFont","modified","sizeAtHeight","getCharacterSet","PDFImage","scaleToFit","imgWidthScale","imgHeightScale","embedTask","ImageAlignment","assertFieldAppearanceOptions","backgroundColor","PDFField","getName","isReadOnly","ReadOnly","enableReadOnly","disableReadOnly","isRequired","Required","enableRequired","disableRequired","isExported","NoExport","enableExporting","disableExporting","needsAppearancesUpdate","defaultUpdateAppearances","_font","markAsDirty","getForm","markFieldAsDirty","markAsClean","markFieldAsClean","isDirty","fieldIsDirty","createWidget","degreesAngle","caption","hidden","pageRef","rotateRectangle","Print","Hidden","Invisible","newDa","updateWidgetAppearanceWithFont","updateWidgetAppearances","createAppearanceStream","updateOnOffWidgetAppearance","createAppearanceDict","createImageAppearanceStream","adj","imageDims","imageName","onStreamRef","offStreamRef","appearanceDict","PDFCheckBox","acroCheckBox","uncheck","isChecked","addToPage","PDFPage","widgetRef","updateWidgetAppearance","updateAppearances","provider","PDFDropdown","acroComboBox","rawOptions","optionObjects","addOptions","optionsArr","existingOptions","newOptions","select","merge","validOptions","option","enableEditing","enableMultiselect","existingValues","clear","isEditable","disableEditing","Sort","enableSorting","disableSorting","isMultiselect","disableMultiselect","isSpellChecked","DoNotSpellCheck","enableSpellChecking","disableSpellChecking","isSelectOnClick","CommitOnSelChange","enableSelectOnClick","disableSelectOnClick","getDefaultFont","PDFOptionList","acroListBox","assertIsSubset","PDFRadioGroup","acroRadioButton","exportOptions","onOptions","isOffToggleable","NoToggleToOff","enableOffToggling","disableOffToggling","isMutuallyExclusive","RadiosInUnison","enableMutualExclusion","disableMutualExclusion","addOptionToPage","_j","PDFSignature","acroSignature","PDFTextField","acroText","isRichFormatted","setText","disableRichFormatting","setAlignment","setImage","fieldAlignment","streamRef","Multiline","enableMultiline","disableMultiline","isPassword","Password","enablePassword","disablePassword","isFileSelector","FileSelect","enableFileSelection","disableFileSelection","isScrollable","DoNotScroll","enableScrolling","disableScrolling","Comb","enableCombing","disableCombing","RichText","enableRichFormatting","StandardFonts","PDFForm","embedDefaultFont","embedStandardFont","Helvetica","dirtyFields","defaultFontCache","hasXFA","deleteXFA","convertToPDFField","getFieldMaybe","getField","getButton","PDFButton","getCheckBox","getDropdown","getOptionList","getRadioGroup","getSignature","getTextField","createButton","nameParts","splitFieldName","findOrCreateNonTerminals","nonTerminal","terminal","addFieldToParent","createCheckBox","createDropdown","comboBox","createOptionList","listBox","createRadioGroup","radioButton","createTextField","flatten","updateFieldAppearances","lenFields","lenWidgets","findWidgetPage","findWidgetAppearanceRef","xObjectKey","pushOperators","fieldKids","kidsCount","childIndex","fieldRef","getPages","findPageForAnnotationRef","refOrDict","name_1","partialNames","parent_1","findNonTerminal","nodeRef","ParseSpeeds","fullyQualifiedName","PageSizes","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","A10","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","RA0","RA1","RA2","RA3","RA4","SRA0","SRA1","SRA2","SRA3","SRA4","Executive","Folio","Legal","Letter","Tabloid","PDFEmbeddedFile","catalog","Names","EmbeddedFiles","EFNames","PDFJavaScript","Javascript","JSNames","scriptName","JavaScriptEmbedder","jsActionDict","JS","ignoreEncryption","updateMetadata","defaultWordBreaks","computePages","pageMap","getOrCreateForm","isEncrypted","pageCache","formCache","fonts","images","embeddedPages","embeddedFiles","javaScripts","updateInfoDict","pdf","parseSpeed","Slow","pageTree","pageTreeRef","registerFontkit","getTitle","title","getInfoDict","assertIsLiteralOrHexString","getAuthor","author","getSubject","subject","getKeywords","keywords","getCreator","creator","getProducer","producer","getCreationDate","getModificationDate","setTitle","showInWindowTitleBar","setAuthor","setSubject","setKeywords","setCreator","setProducer","setLanguage","language","setCreationDate","setModificationDate","getPageCount","pageCount","getPage","getPageIndices","removePage","addPage","insertPage","setSize","copyPages","srcDoc","copier","srcPages","copiedPages","srcPage","copiedPage","pdfCopy","contentPages","addJavaScript","javaScript","attach","attachment","embeddedFile","embedFont","features","assertFontkit","pdfFont","embedJpg","jpg","pdfImage","embedPng","embedPdf","plucked","pluckIndices","embedPages","embedPage","boundingBoxes","transformationMatrices","currPage","nextPage","maybeCopyPage","box","matrix","embedAll","save","useObjectStreams","addDefaultPage","saveAsBase64","otherOptions","getOwnPropertySymbols","propertyIsEnumerable","__rest","encodeToBase64","annotations","embeddables","pdfLib","info","existingInfo","newInfo","BlendMode","leafNode","fontColor","getMediaBox","setMediaBox","cropBox","getCropBox","bleedBox","getBleedBox","trimBox","getTrimBox","artBox","getArtBox","hasCropBox","hasBleedBox","hasTrimBox","hasArtBox","setCropBox","setBleedBox","setTrimBox","setArtBox","getSize","setHeight","getHeight","translateContent","getContentStream","createContentStream","startRef","endRef","scaleContent","scaleAnnotations","annots","annot","scaleAnnot","resetPosition","setFont","fontKey","setFontColor","setLineHeight","getPosition","getX","getY","moveDown","yDecrease","moveUp","yIncrease","moveLeft","xDecrease","moveRight","xIncrease","operator","drawText","blendMode","setOrEmbedFont","oldFont","newFont","newFontKey","encodedLines","graphicsStateKey","maybeEmbedGraphicsState","SetTextLineHeight","NextLine","drawLinesOfText","resetFont","drawPage","embeddedPage","drawSvgPath","borderOpacity","drawLine","lineCap","_k","_l","_m","_o","drawSquare","drawCircle","oldFontKey","getFont","useExisting","BM","selectors","list","inkLists","dummyRef","pageLeaf","acroPushButton","draw90DegCenteredText","textAttr","space","textWidth","drawCenteredText","badgeDataCtx","BadgeDataContext","pdfInfo","setPdfInfo","createPdf","awardInfo","courseInfo","nextLine","async","certText","certTitle","introText","recipient","recip","certDesc","compDate","courseTitle","certifier","awarded_by","certifierDesc","courseTransTitle","courseTrans","courseDesc","pdfDoc","badgeImage","bgImage","smScript","HelveticaOblique","norm","HelveticaBoldOblique","heading1","draw90DegMultilineCenteredText","margin","spacing","docUrl","URL","createObjectURL","Blob","Modal","trxInfo","setTrxInfo","createTranscript","createCourseTranscriptBox","badgeObj","badgeImg","titleFont","descFont","lineSpace","credHrs","complDate","drawMultilineText","indent","grdLvlBadges","banner","trxBadges","studentName","creditHours","earnedBadge","earnedBadgeDetails","badge","bgImg","bannerImg","arrayBuffer","fetch","loriSign","loriSignature","titleText","headerText","HelveticaBold","descText","showCert","setShowCert","showTranscript","setShowTranscript","CertGenerator","hideCertHandler","TranscriptGenerator","hideTranscriptHandler","onClickHandler","onBadgeClicked","badgeJSXElements","Badge","enteredCode","setEnteredCode","isTouched","setIsTouched","isLoading","setIsLoading","codeIsInvalid","isReadyToSubmit","codeInputClasses","onChange","onBlur","codeBlurHandler","fetchData","Navigation","CodeInput","TabButton","badges45Data","gradeLvl","badges67Data","badges89Data","badgesT2CData","b48","gradLvl","b59","b62","b63","transcripts","defaultBadgeDataState","badgeDataState","setBadgeDataState","setViewingMyBadges","setCurrBadgeHasCert","setIsTranscript","fecthDataFromDynamoDB","encodedCode","roomCode","response","transformedData","responseData","objNum","awarded_at","loadCurrStudentHandler","alert","room_id","student","newEarnedBadges","updatedState","badgeDataContext","newCurrBadge","award","updatedBadgesData","invitationCode","URLSearchParams","showDetail","setShowDetail","BadgeDataProvider","BadgeDetail","hideBadgeDetailHandler","MainHeader","TabBanner","Badges","showBadgeDetailHandler","styles","policies","App"],"sourceRoot":""}