UNPKG

pdfjs-dist

Version:

Generic build of Mozilla's PDF.js library.

22 lines 172 kB
/** * @licstart The following is the entire license notice for the * JavaScript code in this page * * Copyright 2022 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @licend The above is the entire license notice for the * JavaScript code in this page */ !function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/image_decoders/pdf.image_decoders",[],r):"object"==typeof exports?exports["pdfjs-dist/image_decoders/pdf.image_decoders"]=r():t["pdfjs-dist/image_decoders/pdf.image_decoders"]=t.pdfjsImageDecoders=r()}(globalThis,(()=>(()=>{var t=[,(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.UNSUPPORTED_FEATURES=r.TextRenderingMode=r.StreamType=r.RenderingIntentFlag=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.LINE_FACTOR=r.LINE_DESCENT_FACTOR=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FontType=r.FeatureTest=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationEditorType=r.AnnotationEditorPrefix=r.AnnotationEditorParamsType=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;r.arrayByteLength=arrayByteLength;r.arraysToBytes=function arraysToBytes(t){var r=t.length;if(1===r&&t[0]instanceof Uint8Array)return t[0];for(var i=0,o=0;o<r;o++)i+=arrayByteLength(t[o]);for(var a=0,c=new Uint8Array(i),l=0;l<r;l++){var u=t[l];u instanceof Uint8Array||(u="string"==typeof u?stringToBytes(u):new Uint8Array(u));var h=u.byteLength;c.set(u,a);a+=h}return c};r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=function bytesToString(t){"object"===_typeof(t)&&null!==t&&void 0!==t.length||unreachable("Invalid argument for bytesToString");var r=t.length,i=8192;if(r<i)return String.fromCharCode.apply(null,t);for(var o=[],a=0;a<r;a+=i){var c=Math.min(a+i,r),l=t.subarray(a,c);o.push(String.fromCharCode.apply(null,l))}return o.join("")};r.createPromiseCapability=function createPromiseCapability(){var t=Object.create(null),r=!1;Object.defineProperty(t,"settled",{get:function get(){return r}});t.promise=new Promise((function(i,o){t.resolve=function(t){r=!0;i(t)};t.reject=function(t){r=!0;o(t)}}));return t};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(i&&"string"==typeof t){if(i.addDefaultProtocol&&t.startsWith("www.")){var o=t.match(/\./g);o&&o.length>=2&&(t="http://".concat(t))}if(i.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var a=r?new URL(t,r):new URL(t);if(_isValidProtocol(a))return a}catch(t){}return null};r.escapeString=function escapeString(t){return t.replace(/([()\\\n\r])/g,(function(t){return"\n"===t?"\\n":"\r"===t?"\\r":"\\".concat(t)}))};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,r=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return r.join("")};r.getVerbosityLevel=function getVerbosityLevel(){return a};r.info=function info(t){a>=o.INFOS&&console.log("Info: ".concat(t))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.byteLength};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var i=0,o=t.length;i<o;i++)if(t[i]!==r[i])return!1;return!0};r.isAscii=function isAscii(t){return/^[\x00-\x7F]*$/.test(t)};r.objectFromMap=function objectFromMap(t){var r,i=Object.create(null),o=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,u=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){u=!0;c=t},f:function f(){try{l||null==i.return||i.return()}finally{if(u)throw c}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=(u=r.value,h=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(u)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var o,a,c=[],l=!0,u=!1;try{for(i=i.call(t);!(l=(o=i.next()).done);l=!0){c.push(o.value);if(r&&c.length===r)break}}catch(t){u=!0;a=t}finally{try{l||null==i.return||i.return()}finally{if(u)throw a}}return c}(u,h)||_unsupportedIterableToArray(u,h)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=a[0],l=a[1];i[c]=l}}catch(t){o.e(t)}finally{o.f()}var u,h;return i};r.objectSize=function objectSize(t){return Object.keys(t).length};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(a=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){if(t[0]>="ï"){var r;"þ"===t[0]&&"ÿ"===t[1]?r="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?r="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(r="utf-8");if(r)try{var i=new TextDecoder(r,{fatal:!0}),o=stringToBytes(t);return i.decode(o)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var a=[],c=0,l=t.length;c<l;c++){var u=_[t.charCodeAt(c)];a.push(u?String.fromCharCode(u):t.charAt(c))}return a.join("")};r.stringToUTF16BEString=function stringToUTF16BEString(t){for(var r=["þÿ"],i=0,o=t.length;i<o;i++){var a=t.charCodeAt(i);r.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return r.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;i(2);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.LINE_FACTOR=1.35;r.LINE_DESCENT_FACTOR=.35;r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};r.AnnotationEditorPrefix="pdfjs_internal_editor_";r.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,INK:15};r.AnnotationEditorParamsType={FREETEXT_SIZE:1,FREETEXT_COLOR:2,FREETEXT_OPACITY:3,INK_COLOR:11,INK_THICKNESS:12,INK_OPACITY:13};r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};r.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};r.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};r.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};r.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var a=o.WARNINGS;function warn(t){a>=o.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}function _isValidProtocol(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function shadow(t,r,i){Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!1});return i}var c=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=c;var l=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,i){var o;_classCallCheck(this,PasswordException);(o=r.call(this,t,"PasswordException")).code=i;return o}return _createClass(PasswordException)}(c);r.PasswordException=l;var u=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,i){var o;_classCallCheck(this,UnknownErrorException);(o=r.call(this,t,"UnknownErrorException")).details=i;return o}return _createClass(UnknownErrorException)}(c);r.UnknownErrorException=u;var h=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(c);r.InvalidPDFException=h;var p=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(c);r.MissingPDFException=p;var d=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,i){var o;_classCallCheck(this,UnexpectedResponseException);(o=r.call(this,t,"UnexpectedResponseException")).status=i;return o}return _createClass(UnexpectedResponseException)}(c);r.UnexpectedResponseException=d;var y=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(c);r.FormatError=y;var v=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(c);r.AbortException=v;function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,i=new Uint8Array(r),o=0;o<r;++o)i[o]=255&t.charCodeAt(o);return i}function arrayByteLength(t){if(void 0!==t.length)return t.length;if(void 0!==t.byteLength)return t.byteLength;unreachable("Invalid argument for arrayByteLength")}var m=function(){function FeatureTest(){_classCallCheck(this,FeatureTest)}_createClass(FeatureTest,null,[{key:"isLittleEndian",get:function get(){return shadow(this,"isLittleEndian",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}},{key:"isEvalSupported",get:function get(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function get(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}}]);return FeatureTest}();r.FeatureTest=m;var g=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),b=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,i){return"#".concat(g[t]).concat(g[r]).concat(g[i])}},{key:"scaleMinMax",value:function scaleMinMax(t,r){var i;if(t[0]){if(t[0]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[0];r[1]*=t[0];if(t[3]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[3];r[3]*=t[3]}else{i=r[0];r[0]=r[2];r[2]=i;i=r[1];r[1]=r[3];r[3]=i;if(t[1]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[1];r[3]*=t[1];if(t[2]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[2];r[1]*=t[2]}r[0]+=t[4];r[1]+=t[4];r[2]+=t[5];r[3]+=t[5]}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var i=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/i,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/i]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var i=Util.applyTransform(t,r),o=Util.applyTransform(t.slice(2,4),r),a=Util.applyTransform([t[0],t[3]],r),c=Util.applyTransform([t[2],t[1]],r);return[Math.min(i[0],o[0],a[0],c[0]),Math.min(i[1],o[1],a[1],c[1]),Math.max(i[0],o[0],a[0],c[0]),Math.max(i[1],o[1],a[1],c[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"apply3dTransform",value:function apply3dTransform(t,r){return[t[0]*r[0]+t[1]*r[1]+t[2]*r[2],t[3]*r[0]+t[4]*r[1]+t[5]*r[2],t[6]*r[0]+t[7]*r[1]+t[8]*r[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],i=t[0]*r[0]+t[1]*r[2],o=t[0]*r[1]+t[1]*r[3],a=t[2]*r[0]+t[3]*r[2],c=t[2]*r[1]+t[3]*r[3],l=(i+c)/2,u=Math.sqrt(Math.pow(i+c,2)-4*(i*c-a*o))/2,h=l+u||1,p=l-u||1;return[Math.sqrt(h),Math.sqrt(p)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){var i=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),o=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(i>o)return null;var a=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),c=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return a>c?null:[i,a,o,c]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,i,o,a,c,l,u){for(var h,p,d,y,v,m,g,b,_=[],x=[[],[]],w=0;w<2;++w){if(0===w){p=6*t-12*i+6*a;h=-3*t+9*i-9*a+3*l;d=3*i-3*t}else{p=6*r-12*o+6*c;h=-3*r+9*o-9*c+3*u;d=3*o-3*r}if(Math.abs(h)<1e-12){if(Math.abs(p)<1e-12)continue;0<(y=-d/p)&&y<1&&_.push(y)}else{g=p*p-4*d*h;b=Math.sqrt(g);if(!(g<0)){0<(v=(-p+b)/(2*h))&&v<1&&_.push(v);0<(m=(-p-b)/(2*h))&&m<1&&_.push(m)}}}for(var C,T=_.length,P=T;T--;){C=1-(y=_[T]);x[0][T]=C*C*C*t+3*C*C*y*i+3*C*y*y*a+y*y*y*l;x[1][T]=C*C*C*r+3*C*C*y*o+3*C*y*y*c+y*y*y*u}x[0][P]=t;x[1][P]=r;x[0][P+1]=l;x[1][P+1]=u;x[0].length=x[1].length=P+2;return[Math.min.apply(Math,_toConsumableArray(x[0])),Math.min.apply(Math,_toConsumableArray(x[1])),Math.max.apply(Math,_toConsumableArray(x[0])),Math.max.apply(Math,_toConsumableArray(x[1]))]}}]);return Util}();r.Util=b;var _=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToUTF8String(t){return decodeURIComponent(escape(t))}},(t,r,i)=>{"use strict";var o=i(3);if(!globalThis._pdfjsCompatibilityChecked){globalThis._pdfjsCompatibilityChecked=!0;!function checkNodeBtoa(){!globalThis.btoa&&o.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&o.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkDOMMatrix(){!globalThis.DOMMatrix&&o.isNodeJS&&(globalThis.DOMMatrix=require("dommatrix/dist/dommatrix.js"))}();!function checkReadableStream(){!globalThis.ReadableStream&&o.isNodeJS&&(globalThis.ReadableStream=require("web-streams-polyfill/dist/ponyfill.js").ReadableStream)}();!function checkArrayAt(){Array.prototype.at||i(4)}();!function checkTypedArrayAt(){Uint8Array.prototype.at||i(76)}()}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.isNodeJS=void 0;function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var i=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=i},(t,r,i)=>{i(5);var o=i(75);t.exports=o("Array","at")},(t,r,i)=>{"use strict";var o=i(6),a=i(41),c=i(65),l=i(63),u=i(70);o({target:"Array",proto:!0},{at:function at(t){var r=a(this),i=c(r),o=l(t),u=o>=0?o:i+o;return u<0||u>=i?void 0:r[u]}});u("at")},(t,r,i)=>{var o=i(7),a=i(8).f,c=i(45),l=i(49),u=i(39),h=i(57),p=i(69);t.exports=function(t,r){var i,d,y,v,m,g=t.target,b=t.global,_=t.stat;if(i=b?o:_?o[g]||u(g,{}):(o[g]||{}).prototype)for(d in r){v=r[d];y=t.dontCallGetSet?(m=a(i,d))&&m.value:i[d];if(!p(b?d:g+(_?".":"#")+d,t.forced)&&void 0!==y){if(typeof v==typeof y)continue;h(v,y)}(t.sham||y&&y.sham)&&c(v,"sham",!0);l(i,d,v,t)}}},t=>{var check=function(t){return t&&t.Math==Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(t,r,i)=>{var o=i(9),a=i(11),c=i(13),l=i(14),u=i(15),h=i(20),p=i(40),d=i(43),y=Object.getOwnPropertyDescriptor;r.f=o?y:function getOwnPropertyDescriptor(t,r){t=u(t);r=h(r);if(d)try{return y(t,r)}catch(t){}if(p(t,r))return l(!a(c.f,t,r),t[r])}},(t,r,i)=>{var o=i(10);t.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r,i)=>{var o=i(12),a=Function.prototype.call;t.exports=o?a.bind(a):function(){return a.apply(a,arguments)}},(t,r,i)=>{var o=i(10);t.exports=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},(t,r)=>{"use strict";var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!i.call({1:2},1);r.f=a?function propertyIsEnumerable(t){var r=o(this,t);return!!r&&r.enumerable}:i},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,i)=>{var o=i(16),a=i(19);t.exports=function(t){return o(a(t))}},(t,r,i)=>{var o=i(17),a=i(10),c=i(18),l=Object,u=o("".split);t.exports=a((function(){return!l("z").propertyIsEnumerable(0)}))?function(t){return"String"==c(t)?u(t,""):l(t)}:l},(t,r,i)=>{var o=i(12),a=Function.prototype,c=a.bind,l=a.call,u=o&&c.bind(l,l);t.exports=o?function(t){return t&&u(t)}:function(t){return t&&function(){return l.apply(t,arguments)}}},(t,r,i)=>{var o=i(17),a=o({}.toString),c=o("".slice);t.exports=function(t){return c(a(t),8,-1)}},t=>{var r=TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},(t,r,i)=>{var o=i(21),a=i(24);t.exports=function(t){var r=o(t,"string");return a(r)?r:r+""}},(t,r,i)=>{var o=i(11),a=i(22),c=i(24),l=i(31),u=i(34),h=i(35),p=TypeError,d=h("toPrimitive");t.exports=function(t,r){if(!a(t)||c(t))return t;var i,h=l(t,d);if(h){void 0===r&&(r="default");i=o(h,t,r);if(!a(i)||c(i))return i;throw p("Can't convert object to primitive value")}void 0===r&&(r="number");return u(t,r)}},(t,r,i)=>{var o=i(23);t.exports=function(t){return"object"==typeof t?null!==t:o(t)}},t=>{t.exports=function(t){return"function"==typeof t}},(t,r,i)=>{var o=i(25),a=i(23),c=i(26),l=i(27),u=Object;t.exports=l?function(t){return"symbol"==typeof t}:function(t){var r=o("Symbol");return a(r)&&c(r.prototype,u(t))}},(t,r,i)=>{var o=i(7),a=i(23),aFunction=function(t){return a(t)?t:void 0};t.exports=function(t,r){return arguments.length<2?aFunction(o[t]):o[t]&&o[t][r]}},(t,r,i)=>{var o=i(17);t.exports=o({}.isPrototypeOf)},(t,r,i)=>{var o=i(28);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,i)=>{var o=i(29),a=i(10);t.exports=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},(t,r,i)=>{var o,a,c=i(7),l=i(30),u=c.process,h=c.Deno,p=u&&u.versions||h&&h.version,d=p&&p.v8;d&&(a=(o=d.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1]));!a&&l&&(!(o=l.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=l.match(/Chrome\/(\d+)/))&&(a=+o[1]);t.exports=a},(t,r,i)=>{var o=i(25);t.exports=o("navigator","userAgent")||""},(t,r,i)=>{var o=i(32);t.exports=function(t,r){var i=t[r];return null==i?void 0:o(i)}},(t,r,i)=>{var o=i(23),a=i(33),c=TypeError;t.exports=function(t){if(o(t))return t;throw c(a(t)+" is not a function")}},t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},(t,r,i)=>{var o=i(11),a=i(23),c=i(22),l=TypeError;t.exports=function(t,r){var i,u;if("string"===r&&a(i=t.toString)&&!c(u=o(i,t)))return u;if(a(i=t.valueOf)&&!c(u=o(i,t)))return u;if("string"!==r&&a(i=t.toString)&&!c(u=o(i,t)))return u;throw l("Can't convert object to primitive value")}},(t,r,i)=>{var o=i(7),a=i(36),c=i(40),l=i(42),u=i(28),h=i(27),p=a("wks"),d=o.Symbol,y=d&&d.for,v=h?d:d&&d.withoutSetter||l;t.exports=function(t){if(!c(p,t)||!u&&"string"!=typeof p[t]){var r="Symbol."+t;u&&c(d,t)?p[t]=d[t]:p[t]=h&&y?y(r):v(r)}return p[t]}},(t,r,i)=>{var o=i(37),a=i(38);(t.exports=function(t,r){return a[t]||(a[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.23.5",mode:o?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.5/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,i)=>{var o=i(7),a=i(39),c="__core-js_shared__",l=o[c]||a(c,{});t.exports=l},(t,r,i)=>{var o=i(7),a=Object.defineProperty;t.exports=function(t,r){try{a(o,t,{value:r,configurable:!0,writable:!0})}catch(i){o[t]=r}return r}},(t,r,i)=>{var o=i(17),a=i(41),c=o({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return c(a(t),r)}},(t,r,i)=>{var o=i(19),a=Object;t.exports=function(t){return a(o(t))}},(t,r,i)=>{var o=i(17),a=0,c=Math.random(),l=o(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+l(++a+c,36)}},(t,r,i)=>{var o=i(9),a=i(10),c=i(44);t.exports=!o&&!a((function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a}))},(t,r,i)=>{var o=i(7),a=i(22),c=o.document,l=a(c)&&a(c.createElement);t.exports=function(t){return l?c.createElement(t):{}}},(t,r,i)=>{var o=i(9),a=i(46),c=i(14);t.exports=o?function(t,r,i){return a.f(t,r,c(1,i))}:function(t,r,i){t[r]=i;return t}},(t,r,i)=>{var o=i(9),a=i(43),c=i(47),l=i(48),u=i(20),h=TypeError,p=Object.defineProperty,d=Object.getOwnPropertyDescriptor,y="enumerable",v="configurable",m="writable";r.f=o?c?function defineProperty(t,r,i){l(t);r=u(r);l(i);if("function"==typeof t&&"prototype"===r&&"value"in i&&m in i&&!i.writable){var o=d(t,r);if(o&&o.writable){t[r]=i.value;i={configurable:v in i?i.configurable:o.configurable,enumerable:y in i?i.enumerable:o.enumerable,writable:!1}}}return p(t,r,i)}:p:function defineProperty(t,r,i){l(t);r=u(r);l(i);if(a)try{return p(t,r,i)}catch(t){}if("get"in i||"set"in i)throw h("Accessors not supported");"value"in i&&(t[r]=i.value);return t}},(t,r,i)=>{var o=i(9),a=i(10);t.exports=o&&a((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,i)=>{var o=i(22),a=String,c=TypeError;t.exports=function(t){if(o(t))return t;throw c(a(t)+" is not an object")}},(t,r,i)=>{var o=i(23),a=i(46),c=i(50),l=i(39);t.exports=function(t,r,i,u){u||(u={});var h=u.enumerable,p=void 0!==u.name?u.name:r;o(i)&&c(i,p,u);if(u.global)h?t[r]=i:l(r,i);else{try{u.unsafe?t[r]&&(h=!0):delete t[r]}catch(t){}h?t[r]=i:a.f(t,r,{value:i,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return t}},(t,r,i)=>{var o=i(10),a=i(23),c=i(40),l=i(9),u=i(51).CONFIGURABLE,h=i(52),p=i(53),d=p.enforce,y=p.get,v=Object.defineProperty,m=l&&!o((function(){return 8!==v((function(){}),"length",{value:8}).length})),g=String(String).split("String"),b=t.exports=function(t,r,i){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]");i&&i.getter&&(r="get "+r);i&&i.setter&&(r="set "+r);(!c(t,"name")||u&&t.name!==r)&&(l?v(t,"name",{value:r,configurable:!0}):t.name=r);m&&i&&c(i,"arity")&&t.length!==i.arity&&v(t,"length",{value:i.arity});try{i&&c(i,"constructor")&&i.constructor?l&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var o=d(t);c(o,"source")||(o.source=g.join("string"==typeof r?r:""));return t};Function.prototype.toString=b((function toString(){return a(this)&&y(this).source||h(this)}),"toString")},(t,r,i)=>{var o=i(9),a=i(40),c=Function.prototype,l=o&&Object.getOwnPropertyDescriptor,u=a(c,"name"),h=u&&"something"===function something(){}.name,p=u&&(!o||o&&l(c,"name").configurable);t.exports={EXISTS:u,PROPER:h,CONFIGURABLE:p}},(t,r,i)=>{var o=i(17),a=i(23),c=i(38),l=o(Function.toString);a(c.inspectSource)||(c.inspectSource=function(t){return l(t)});t.exports=c.inspectSource},(t,r,i)=>{var o,a,c,l=i(54),u=i(7),h=i(17),p=i(22),d=i(45),y=i(40),v=i(38),m=i(55),g=i(56),b="Object already initialized",_=u.TypeError,x=u.WeakMap;if(l||v.state){var w=v.state||(v.state=new x),C=h(w.get),T=h(w.has),P=h(w.set);o=function(t,r){if(T(w,t))throw new _(b);r.facade=t;P(w,t,r);return r};a=function(t){return C(w,t)||{}};c=function(t){return T(w,t)}}else{var S=m("state");g[S]=!0;o=function(t,r){if(y(t,S))throw new _(b);r.facade=t;d(t,S,r);return r};a=function(t){return y(t,S)?t[S]:{}};c=function(t){return y(t,S)}}t.exports={set:o,get:a,has:c,enforce:function(t){return c(t)?a(t):o(t,{})},getterFor:function(t){return function(r){var i;if(!p(r)||(i=a(r)).type!==t)throw _("Incompatible receiver, "+t+" required");return i}}}},(t,r,i)=>{var o=i(7),a=i(23),c=i(52),l=o.WeakMap;t.exports=a(l)&&/native code/.test(c(l))},(t,r,i)=>{var o=i(36),a=i(42),c=o("keys");t.exports=function(t){return c[t]||(c[t]=a(t))}},t=>{t.exports={}},(t,r,i)=>{var o=i(40),a=i(58),c=i(8),l=i(46);t.exports=function(t,r,i){for(var u=a(r),h=l.f,p=c.f,d=0;d<u.length;d++){var y=u[d];o(t,y)||i&&o(i,y)||h(t,y,p(r,y))}}},(t,r,i)=>{var o=i(25),a=i(17),c=i(59),l=i(68),u=i(48),h=a([].concat);t.exports=o("Reflect","ownKeys")||function ownKeys(t){var r=c.f(u(t)),i=l.f;return i?h(r,i(t)):r}},(t,r,i)=>{var o=i(60),a=i(67).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return o(t,a)}},(t,r,i)=>{var o=i(17),a=i(40),c=i(15),l=i(61).indexOf,u=i(56),h=o([].push);t.exports=function(t,r){var i,o=c(t),p=0,d=[];for(i in o)!a(u,i)&&a(o,i)&&h(d,i);for(;r.length>p;)a(o,i=r[p++])&&(~l(d,i)||h(d,i));return d}},(t,r,i)=>{var o=i(15),a=i(62),c=i(65),createMethod=function(t){return function(r,i,l){var u,h=o(r),p=c(h),d=a(l,p);if(t&&i!=i){for(;p>d;)if((u=h[d++])!=u)return!0}else for(;p>d;d++)if((t||d in h)&&h[d]===i)return t||d||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,i)=>{var o=i(63),a=Math.max,c=Math.min;t.exports=function(t,r){var i=o(t);return i<0?a(i+r,0):c(i,r)}},(t,r,i)=>{var o=i(64);t.exports=function(t){var r=+t;return r!=r||0===r?0:o(r)}},t=>{var r=Math.ceil,i=Math.floor;t.exports=Math.trunc||function trunc(t){var o=+t;return(o>0?i:r)(o)}},(t,r,i)=>{var o=i(66);t.exports=function(t){return o(t.length)}},(t,r,i)=>{var o=i(63),a=Math.min;t.exports=function(t){return t>0?a(o(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,i)=>{var o=i(10),a=i(23),c=/#|\.prototype\./,isForced=function(t,r){var i=u[l(t)];return i==p||i!=h&&(a(r)?o(r):!!r)},l=isForced.normalize=function(t){return String(t).replace(c,".").toLowerCase()},u=isForced.data={},h=isForced.NATIVE="N",p=isForced.POLYFILL="P";t.exports=isForced},(t,r,i)=>{var o=i(35),a=i(71),c=i(46).f,l=o("unscopables"),u=Array.prototype;null==u[l]&&c(u,l,{configurable:!0,value:a(null)});t.exports=function(t){u[l][t]=!0}},(t,r,i)=>{var o,a=i(48),c=i(72),l=i(67),u=i(56),h=i(74),p=i(44),d=i(55),y=d("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{o=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&o?NullProtoObjectViaActiveX(o):function(){var t,r=p("iframe");r.style.display="none";h.appendChild(r);r.src=String("javascript:");(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(o);for(var t=l.length;t--;)delete NullProtoObject.prototype[l[t]];return NullProtoObject()};u[y]=!0;t.exports=Object.create||function create(t,r){var i;if(null!==t){EmptyConstructor.prototype=a(t);i=new EmptyConstructor;EmptyConstructor.prototype=null;i[y]=t}else i=NullProtoObject();return void 0===r?i:c.f(i,r)}},(t,r,i)=>{var o=i(9),a=i(47),c=i(46),l=i(48),u=i(15),h=i(73);r.f=o&&!a?Object.defineProperties:function defineProperties(t,r){l(t);for(var i,o=u(r),a=h(r),p=a.length,d=0;p>d;)c.f(t,i=a[d++],o[i]);return t}},(t,r,i)=>{var o=i(60),a=i(67);t.exports=Object.keys||function keys(t){return o(t,a)}},(t,r,i)=>{var o=i(25);t.exports=o("document","documentElement")},(t,r,i)=>{var o=i(7),a=i(17);t.exports=function(t,r){return a(o[t].prototype[r])}},(t,r,i)=>{i(77)},(t,r,i)=>{"use strict";var o=i(78),a=i(65),c=i(63),l=o.aTypedArray;(0,o.exportTypedArrayMethod)("at",(function at(t){var r=l(this),i=a(r),o=c(t),u=o>=0?o:i+o;return u<0||u>=i?void 0:r[u]}))},(t,r,i)=>{"use strict";var o,a,c,l=i(79),u=i(9),h=i(7),p=i(23),d=i(22),y=i(40),v=i(80),m=i(33),g=i(45),b=i(49),_=i(46).f,x=i(26),w=i(82),C=i(84),T=i(35),P=i(42),S=i(53),k=S.enforce,I=S.get,O=h.Int8Array,E=O&&O.prototype,A=h.Uint8ClampedArray,R=A&&A.prototype,B=O&&w(O),D=E&&w(E),L=Object.prototype,M=h.TypeError,N=T("toStringTag"),U=P("TYPED_ARRAY_TAG"),j="TypedArrayConstructor",H=l&&!!C&&"Opera"!==v(h.opera),z=!1,X={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Y={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=w(t);if(d(r)){var i=I(r);return i&&y(i,j)?i.TypedArrayConstructor:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!d(t))return!1;var r=v(t);return y(X,r)||y(Y,r)};for(o in X)(c=(a=h[o])&&a.prototype)?k(c).TypedArrayConstructor=a:H=!1;for(o in Y)(c=(a=h[o])&&a.prototype)&&(k(c).TypedArrayConstructor=a);if(!H||!p(B)||B===Function.prototype){B=function TypedArray(){throw M("Incorrect invocation")};if(H)for(o in X)h[o]&&C(h[o],B)}if(!H||!D||D===L){D=B.prototype;if(H)for(o in X)h[o]&&C(h[o].prototype,D)}H&&w(R)!==D&&C(R,D);if(u&&!y(D,N)){z=!0;_(D,N,{get:function(){return d(this)?this[U]:void 0}});for(o in X)h[o]&&g(h[o],U,o)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:H,TYPED_ARRAY_TAG:z&&U,aTypedArray:function(t){if(isTypedArray(t))return t;throw M("Target is not a typed array")},aTypedArrayConstructor:function(t){if(p(t)&&(!C||x(B,t)))return t;throw M(m(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,i,o){if(u){if(i)for(var a in X){var c=h[a];if(c&&y(c.prototype,t))try{delete c.prototype[t]}catch(i){try{c.prototype[t]=r}catch(t){}}}D[t]&&!i||b(D,t,i?r:H&&E[t]||r,o)}},exportTypedArrayStaticMethod:function(t,r,i){var o,a;if(u){if(C){if(i)for(o in X)if((a=h[o])&&y(a,t))try{delete a[t]}catch(t){}if(B[t]&&!i)return;try{return b(B,t,i?r:H&&B[t]||r)}catch(t){}}for(o in X)!(a=h[o])||a[t]&&!i||b(a,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!d(t))return!1;var r=v(t);return"DataView"===r||y(X,r)||y(Y,r)},isTypedArray:isTypedArray,TypedArray:B,TypedArrayPrototype:D}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,r,i)=>{var o=i(81),a=i(23),c=i(18),l=i(35)("toStringTag"),u=Object,h="Arguments"==c(function(){return arguments}());t.exports=o?c:function(t){var r,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=u(t),l))?i:h?c(r):"Object"==(o=c(r))&&a(r.callee)?"Arguments":o}},(t,r,i)=>{var o={};o[i(35)("toStringTag")]="z";t.exports="[object z]"===String(o)},(t,r,i)=>{var o=i(40),a=i(23),c=i(41),l=i(55),u=i(83),h=l("IE_PROTO"),p=Object,d=p.prototype;t.exports=u?p.getPrototypeOf:function(t){var r=c(t);if(o(r,h))return r[h];var i=r.constructor;return a(i)&&r instanceof i?i.prototype:r instanceof p?d:null}},(t,r,i)=>{var o=i(10);t.exports=!o((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,i)=>{var o=i(17),a=i(48),c=i(85);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]);r=i instanceof Array}catch(t){}return function setPrototypeOf(i,o){a(i);c(o);r?t(i,o):i.__proto__=o;return i}}():void 0)},(t,r,i)=>{var o=i(23),a=String,c=TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw c("Can't set "+a(t)+" as a prototype")}},(t,r,i)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Jbig2Image=void 0;var o=i(1),a=i(87),c=i(90),l=i(91);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var o=0,a=function F(){};return{s:a,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,u=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){u=!0;c=t},f:function f(){try{l||null==i.return||i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||!1;o.configurable=!0;"value"in o&&(o.writable=!0);Object.defineProperty(t,o.key,o)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,o=_getPrototypeOf(t);if(r){var a=_getPrototypeOf(this).constructor;i=Reflect.construct(o,arguments,a)}else i=o.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}var u=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(Jbig2Error,t);var r=_createSuper(Jbig2Error);function Jbig2Error(t){_classCallCheck(this,Jbig2Error);return r.call(this,"JBIG2 error: ".concat(t),"Jbig2Error")}return _createClass(Jbig2Error)}(o.BaseException),h=function(){function ContextCache(){_classCallCheck(this,ContextCache)}_createClass(ContextCache,[{key:"getContexts",value:function getContexts(t){return t in this?this[t]:this[t]=new Int8Array(65536)}}]);return ContextCache}(),p=function(){function DecodingContext(t,r,i){_classCallCheck(this,DecodingContext);this.data=t;this.start=r;this.end=i}_createClass(DecodingContext,[{key:"decoder",get:function get(){var t=new c.ArithmeticDecoder(this.data,this.start,this.end);return(0,o.shadow)(this,"decoder",t)}},{key:"contextCache",get:function get(){var t=new h;return(0,o.shadow)(this,"contextCache",t)}}]);return DecodingContext}();function decodeInteger(t,r,i){var o=t.getContexts(r),a=1;function readBits(t){for(var r=0,c=0;c<t;c++){var l=i.readBit(o,a);a=a<256?a<<1|l:511&(a<<1|l)|256;r=r<<1|l}return r>>>0}var c=readBits(1),l=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);return 0===c?l:l>0?-l:null}function decodeIAID(t,r,i){for(var o=t.getContexts("IAID"),a=1,c=0;c<i;c++){a=a<<1|r.readBit(o,a)}return i<31?a&(1<<i)-1:2147483647&a}var d=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],y=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],v=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],m=[39717,1941,229,405],g=[32,8];function decodeBitmap(t,r,i,o,a,c,l,u){if(t){return decodeMMRBitmap(new P(u.data,u.start,u.end),r,i,!1)}if(0===o&&!c&&!a&&4===l.length&&3===l[0].x&&-1===l[0].y&&-3===l[1].x&&-1===l[1].y&&2===l[2].x&&-2===l[2].y&&-2===l[3].x&&-2===l[3].y)return function decodeBitmapTemplate0(t,r,i){var o,a,c,l,u,h,p,d=i.decoder,y=i.contextCache.getContexts("GB"),v=[];for(a=0;a<r;a++){u=v[a]=new Uint8Array(t);h=a<1?u:v[a-1];o=(p=a<2?u:v[a-2])[0]<<13|p[1]<<12|p[2]<<11|h[0]<<7|h[1]<<6|h[2]<<5|h[3]<<4;for(c=0;c<t;c++){u[c]=l=d.readBit(y,o);o=(31735&o)<<1|(c+3<t?p[c+3]<<11:0)|(c+4<t?h[c+4]<<4:0)|l}}return v}(r,i,u);var h=!!c,p=y[o].concat(l);p.sort((function(t,r){return t.y-r.y||t.x-r.x}));var d,v,g=p.length,b=new Int8Array(g),_=new Int8Array(g),x=[],w=0,C=0,T=0,S=0;for(v=0;v<g;v++){b[v]=p[v].x;_[v]=p[v].y;C=Math.min(C,p[v].x);T=Math.max(T,p[v].x);S=Math.min(S,p[v].y);v<g-1&&p[v].y===p[v+1].y&&p[v].x===p[v+1].x-1?w|=1<<g-1-v:x.push(v)}var k=x.length,I=new Int8Array(k),O=new Int8Array(k),E=new Uint16Array(k);for(d=0;d<k;d++){v=x[d];I[d]=p[v].x;O[d]=p[v].y;E[d]=1<<g-1-v}for(var A,R,B,D,L,M=-C,N=-S,U=r-T,j=m[o],H=new Uint8Array(r),z=[],X=u.decoder,Y=u.contextCache.getContexts("GB"),G=0,W=0,J=0;J<i;J++){if(a){if(G^=X.readBit(Y,j)){z.push(H);continue}}H=new Uint8Array(H);z.push(H);for(A=0;A<r;A++)if(h&&c[J][A])H[A]=0;else{if(A>=M&&A<U&&J>=N){W=W<<1&w;for(v=0;v<k;v++){R=J+O[v];B=A+I[v];(D=z[R][B])&&(W|=D=E[v])}}else{W=0;L=g-1;for(v=0;v<g;v++,L--)(B=A+b[v])>=0&&B<r&&(R=J+_[v])>=0&&(D=z[R][B])&&(W|=D<<L)}var q=X.readBit(Y,W);H[A]=q}}return z}function decodeRefinement(t,r,i,o,a