UNPKG

pdfjs-dist

Version:

Generic build of Mozilla's PDF.js library.

22 lines 158 kB
/** * @licstart The following is the entire license notice for the * Javascript code in this page * * Copyright 2021 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()}(this,(function(){return(()=>{var t=[,(t,r,i)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!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),u=0;u<r;u++){var l=t[u];l instanceof Uint8Array||(l="string"==typeof l?stringToBytes(l):new Uint8Array(l));var h=l.byteLength;c.set(l,a);a+=h}return c};r.assert=assert;r.bytesToString=function bytesToString(t){assert(null!==t&&"object"===_typeof(t)&&void 0!==t.length,"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),u=t.subarray(a,c);o.push(String.fromCharCode.apply(null,u))}return o.join("")};r.createObjectURL=function createObjectURL(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&!i)return URL.createObjectURL(new Blob([t],{type:r}));for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a="data:".concat(r,";base64,"),c=0,u=t.length;c<u;c+=3){var l=255&t[c],h=255&t[c+1],p=255&t[c+2],d=l>>2,m=(3&l)<<4|h>>4,g=c+1<u?(15&h)<<2|p>>6:64,y=c+2<u?63&p:64;a+=o[d]+o[m]+o[g]+o[y]}return a};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,r){if(!t)return null;try{var i=r?new URL(t,r):new URL(t);if(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}}(i))return i}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.isBool=function isBool(t){return"boolean"==typeof t};r.isNum=function isNum(t){return"number"==typeof t};r.isSameOrigin=function isSameOrigin(t,r){var i;try{if(!(i=new URL(t)).origin||"null"===i.origin)return!1}catch(t){return!1}var o=new URL(r,i);return i.origin===o.origin};r.isString=function isString(t){return"string"==typeof t};r.objectFromMap=function objectFromMap(t){var r,i=Object.create(null),o=function _createForOfIteratorHelper(t,r){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){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,u=!0,l=!1;return{s:function s(){i=t[Symbol.iterator]()},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){l=!0;c=t},f:function f(){try{u||null==i.return||i.return()}finally{if(l)throw c}}}}(t);try{for(o.s();!(r=o.n()).done;){var a=(l=r.value,h=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(l)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],o=!0,a=!1,c=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){i.push(u.value);if(r&&i.length===r)break}}catch(t){a=!0;c=t}finally{try{o||null==l.return||l.return()}finally{if(a)throw c}}return i}(l,h)||_unsupportedIterableToArray(l,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],u=a[1];i[c]=u}}catch(t){o.e(t)}finally{o.f()}var l,h;return i};r.objectSize=function objectSize(t){return Object.keys(t).length};r.removeNullCharacters=function removeNullCharacters(t){if("string"!=typeof t){warn("The argument for removeNullCharacters must be a string.");return t}return t.replace(y,"")};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){var r=t.length,i=[];if("þ"===t[0]&&"ÿ"===t[1])for(var o=2;o<r;o+=2)i.push(String.fromCharCode(t.charCodeAt(o)<<8|t.charCodeAt(o+1)));else if("ÿ"===t[0]&&"þ"===t[1])for(var a=2;a<r;a+=2)i.push(String.fromCharCode(t.charCodeAt(a+1)<<8|t.charCodeAt(a)));else for(var c=0;c<r;++c){var u=_[t.charCodeAt(c)];i.push(u?String.fromCharCode(u):t.charAt(c))}return i.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));r.push(String.fromCharCode(255&a))}return r.join("")};r.stringToUTF8String=function stringToUTF8String(t){return decodeURIComponent(escape(t))};r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;r.VerbosityLevel=r.Util=r.UNSUPPORTED_FEATURES=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.IsLittleEndianCached=r.IsEvalSupportedCached=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FontType=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;i(2);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 _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 _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(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}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];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",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",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",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};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 assert(t,r){t||unreachable(r)}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){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=c;var u=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,i){var o;_classCallCheck(this,PasswordException);(o=r.call(this,t)).code=i;return o}return PasswordException}(c);r.PasswordException=u;var l=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,i){var o;_classCallCheck(this,UnknownErrorException);(o=r.call(this,t)).details=i;return o}return UnknownErrorException}(c);r.UnknownErrorException=l;var h=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return r.apply(this,arguments)}return InvalidPDFException}(c);r.InvalidPDFException=h;var p=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return r.apply(this,arguments)}return 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)).status=i;return o}return UnexpectedResponseException}(c);r.UnexpectedResponseException=d;var m=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return r.apply(this,arguments)}return FormatError}(c);r.FormatError=m;var g=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return r.apply(this,arguments)}return AbortException}(c);r.AbortException=g;var y=/\x00/g;function stringToBytes(t){assert("string"==typeof t,"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;assert(void 0!==t.byteLength,"arrayByteLength - invalid argument.");return t.byteLength}var v={get value(){return shadow(this,"value",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}};r.IsLittleEndianCached=v;var b={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=b;var x=function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))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.")}()}(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),w=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);return t}(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,i){return"#".concat(x[t]).concat(x[r]).concat(x[i])}},{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],u=(i+c)/2,l=Math.sqrt(Math.pow(i+c,2)-4*(i*c-a*o))/2,h=u+l||1,p=u-l||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){function compare(t,r){return t-r}var i=[t[0],t[2],r[0],r[2]].sort(compare),o=[t[1],t[3],r[1],r[3]].sort(compare),a=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0]))return null;a[0]=i[1];a[2]=i[2];if(!(o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]))return null;a[1]=o[1];a[3]=o[2];return a}}]);return Util}();r.Util=w;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]},(t,r,i)=>{"use strict";var o=i(3);if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=i(4));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 checkObjectFromEntries(){Object.fromEntries||i(49)}();!function checkStringPadStart(){String.prototype.padStart||i(82)}();!function checkStringPadEnd(){String.prototype.padEnd||i(88)}();!function checkObjectValues(){Object.values||(Object.values=i(90))}();!function checkObjectEntries(){Object.entries||(Object.entries=i(93))}()}},(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 _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(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);t.exports=i(7)},(t,r,i)=>{i(6)({global:!0},{globalThis:i(7)})},(t,r,i)=>{var o=i(7),a=i(8).f,c=i(22),u=i(25),l=i(26),h=i(36),p=i(48);t.exports=function(t,r){var i,d,m,g,y,v=t.target,b=t.global,x=t.stat;if(i=b?o:x?o[v]||l(v,{}):(o[v]||{}).prototype)for(d in r){g=r[d];m=t.noTargetGet?(y=a(i,d))&&y.value:i[d];if(!p(b?d:v+(x?".":"#")+d,t.forced)&&void 0!==m){if(typeof g==typeof m)continue;h(g,m)}(t.sham||m&&m.sham)&&c(g,"sham",!0);u(i,d,g,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(12),u=i(13),l=i(17),h=i(19),p=i(20),d=Object.getOwnPropertyDescriptor;r.f=o?d:function getOwnPropertyDescriptor(t,r){t=u(t);r=l(r,!0);if(p)try{return d(t,r)}catch(t){}if(h(t,r))return c(!a.f.call(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)=>{"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(14),a=i(16);t.exports=function(t){return o(a(t))}},(t,r,i)=>{var o=i(10),a=i(15),c="".split;t.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c.call(t,""):Object(t)}:Object},t=>{var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},(t,r,i)=>{var o=i(18);t.exports=function(t,r){if(!o(t))return t;var i,a;if(r&&"function"==typeof(i=t.toString)&&!o(a=i.call(t)))return a;if("function"==typeof(i=t.valueOf)&&!o(a=i.call(t)))return a;if(!r&&"function"==typeof(i=t.toString)&&!o(a=i.call(t)))return a;throw TypeError("Can't convert object to primitive value")}},t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},t=>{var r={}.hasOwnProperty;t.exports=function(t,i){return r.call(t,i)}},(t,r,i)=>{var o=i(9),a=i(10),c=i(21);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(18),c=o.document,u=a(c)&&a(c.createElement);t.exports=function(t){return u?c.createElement(t):{}}},(t,r,i)=>{var o=i(9),a=i(23),c=i(12);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(20),c=i(24),u=i(17),l=Object.defineProperty;r.f=o?l:function defineProperty(t,r,i){c(t);r=u(r,!0);c(i);if(a)try{return l(t,r,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");"value"in i&&(t[r]=i.value);return t}},(t,r,i)=>{var o=i(18);t.exports=function(t){if(!o(t))throw TypeError(String(t)+" is not an object");return t}},(t,r,i)=>{var o=i(7),a=i(22),c=i(19),u=i(26),l=i(27),h=i(29),p=h.get,d=h.enforce,m=String(String).split("String");(t.exports=function(t,r,i,l){var h,p=!!l&&!!l.unsafe,g=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;if("function"==typeof i){"string"!=typeof r||c(i,"name")||a(i,"name",r);(h=d(i)).source||(h.source=m.join("string"==typeof r?r:""))}if(t!==o){p?!y&&t[r]&&(g=!0):delete t[r];g?t[r]=i:a(t,r,i)}else g?t[r]=i:u(r,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&p(this).source||l(this)}))},(t,r,i)=>{var o=i(7),a=i(22);t.exports=function(t,r){try{a(o,t,r)}catch(i){o[t]=r}return r}},(t,r,i)=>{var o=i(28),a=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(t){return a.call(t)});t.exports=o.inspectSource},(t,r,i)=>{var o=i(7),a=i(26),c="__core-js_shared__",u=o[c]||a(c,{});t.exports=u},(t,r,i)=>{var o,a,c,u=i(30),l=i(7),h=i(18),p=i(22),d=i(19),m=i(28),g=i(31),y=i(35),v=l.WeakMap;if(u){var b=m.state||(m.state=new v),x=b.get,w=b.has,_=b.set;o=function(t,r){r.facade=t;_.call(b,t,r);return r};a=function(t){return x.call(b,t)||{}};c=function(t){return w.call(b,t)}}else{var S=g("state");y[S]=!0;o=function(t,r){r.facade=t;p(t,S,r);return r};a=function(t){return d(t,S)?t[S]:{}};c=function(t){return d(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(!h(r)||(i=a(r)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}}},(t,r,i)=>{var o=i(7),a=i(27),c=o.WeakMap;t.exports="function"==typeof c&&/native code/.test(a(c))},(t,r,i)=>{var o=i(32),a=i(34),c=o("keys");t.exports=function(t){return c[t]||(c[t]=a(t))}},(t,r,i)=>{var o=i(33),a=i(28);(t.exports=function(t,r){return a[t]||(a[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.10.0",mode:o?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},t=>{t.exports=!1},t=>{var r=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++r+i).toString(36)}},t=>{t.exports={}},(t,r,i)=>{var o=i(19),a=i(37),c=i(8),u=i(23);t.exports=function(t,r){for(var i=a(r),l=u.f,h=c.f,p=0;p<i.length;p++){var d=i[p];o(t,d)||l(t,d,h(r,d))}}},(t,r,i)=>{var o=i(38),a=i(40),c=i(47),u=i(24);t.exports=o("Reflect","ownKeys")||function ownKeys(t){var r=a.f(u(t)),i=c.f;return i?r.concat(i(t)):r}},(t,r,i)=>{var o=i(39),a=i(7),aFunction=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,r){return arguments.length<2?aFunction(o[t])||aFunction(a[t]):o[t]&&o[t][r]||a[t]&&a[t][r]}},(t,r,i)=>{var o=i(7);t.exports=o},(t,r,i)=>{var o=i(41),a=i(46).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return o(t,a)}},(t,r,i)=>{var o=i(19),a=i(13),c=i(42).indexOf,u=i(35);t.exports=function(t,r){var i,l=a(t),h=0,p=[];for(i in l)!o(u,i)&&o(l,i)&&p.push(i);for(;r.length>h;)o(l,i=r[h++])&&(~c(p,i)||p.push(i));return p}},(t,r,i)=>{var o=i(13),a=i(43),c=i(45),createMethod=function(t){return function(r,i,u){var l,h=o(r),p=a(h.length),d=c(u,p);if(t&&i!=i){for(;p>d;)if((l=h[d++])!=l)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(44),a=Math.min;t.exports=function(t){return t>0?a(o(t),9007199254740991):0}},t=>{var r=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},(t,r,i)=>{var o=i(44),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=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,i)=>{var o=i(10),a=/#|\.prototype\./,isForced=function(t,r){var i=u[c(t)];return i==h||i!=l&&("function"==typeof r?o(r):!!r)},c=isForced.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=isForced.data={},l=isForced.NATIVE="N",h=isForced.POLYFILL="P";t.exports=isForced},(t,r,i)=>{i(50);i(72);var o=i(39);t.exports=o.Object.fromEntries},(t,r,i)=>{"use strict";var o=i(13),a=i(51),c=i(62),u=i(29),l=i(63),h="Array Iterator",p=u.set,d=u.getterFor(h);t.exports=l(Array,"Array",(function(t,r){p(this,{type:h,target:o(t),index:0,kind:r})}),(function(){var t=d(this),r=t.target,i=t.kind,o=t.index++;if(!r||o>=r.length){t.target=void 0;return{value:void 0,done:!0}}return"keys"==i?{value:o,done:!1}:"values"==i?{value:r[o],done:!1}:{value:[o,r[o]],done:!1}}),"values");c.Arguments=c.Array;a("keys");a("values");a("entries")},(t,r,i)=>{var o=i(52),a=i(58),c=i(23),u=o("unscopables"),l=Array.prototype;null==l[u]&&c.f(l,u,{configurable:!0,value:a(null)});t.exports=function(t){l[u][t]=!0}},(t,r,i)=>{var o=i(7),a=i(32),c=i(19),u=i(34),l=i(53),h=i(57),p=a("wks"),d=o.Symbol,m=h?d:d&&d.withoutSetter||u;t.exports=function(t){c(p,t)&&(l||"string"==typeof p[t])||(l&&c(d,t)?p[t]=d[t]:p[t]=m("Symbol."+t));return p[t]}},(t,r,i)=>{var o=i(54),a=i(55),c=i(10);t.exports=!!Object.getOwnPropertySymbols&&!c((function(){return!Symbol.sham&&(o?38===a:a>37&&a<41)}))},(t,r,i)=>{var o=i(15),a=i(7);t.exports="process"==o(a.process)},(t,r,i)=>{var o,a,c=i(7),u=i(56),l=c.process,h=l&&l.versions,p=h&&h.v8;p?a=(o=p.split("."))[0]+o[1]:u&&(!(o=u.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=u.match(/Chrome\/(\d+)/))&&(a=o[1]);t.exports=a&&+a},(t,r,i)=>{var o=i(38);t.exports=o("navigator","userAgent")||""},(t,r,i)=>{var o=i(53);t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,i)=>{var o,a=i(24),c=i(59),u=i(46),l=i(35),h=i(61),p=i(21),d=i(31),m=d("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(t){}NullProtoObject=o?function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r}(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}();for(var t=u.length;t--;)delete NullProtoObject.prototype[u[t]];return NullProtoObject()};l[m]=!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[m]=t}else i=NullProtoObject();return void 0===r?i:c(i,r)}},(t,r,i)=>{var o=i(9),a=i(23),c=i(24),u=i(60);t.exports=o?Object.defineProperties:function defineProperties(t,r){c(t);for(var i,o=u(r),l=o.length,h=0;l>h;)a.f(t,i=o[h++],r[i]);return t}},(t,r,i)=>{var o=i(41),a=i(46);t.exports=Object.keys||function keys(t){return o(t,a)}},(t,r,i)=>{var o=i(38);t.exports=o("document","documentElement")},t=>{t.exports={}},(t,r,i)=>{"use strict";var o=i(6),a=i(64),c=i(66),u=i(70),l=i(69),h=i(22),p=i(25),d=i(52),m=i(33),g=i(62),y=i(65),v=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,x=d("iterator"),w="keys",_="values",S="entries",returnThis=function(){return this};t.exports=function(t,r,i,d,y,C,T){a(i,r,d);var P,I,k,getIterationMethod=function(t){if(t===y&&B)return B;if(!b&&t in A)return A[t];switch(t){case w:return function keys(){return new i(this,t)};case _:return function values(){return new i(this,t)};case S:return function entries(){return new i(this,t)}}return function(){return new i(this)}},O=r+" Iterator",E=!1,A=t.prototype,R=A[x]||A["@@iterator"]||y&&A[y],B=!b&&R||getIterationMethod(y),D="Array"==r&&A.entries||R;if(D){P=c(D.call(new t));if(v!==Object.prototype&&P.next){m||c(P)===v||(u?u(P,v):"function"!=typeof P[x]&&h(P,x,returnThis));l(P,O,!0,!0);m&&(g[O]=returnThis)}}if(y==_&&R&&R.name!==_){E=!0;B=function values(){return R.call(this)}}m&&!T||A[x]===B||h(A,x,B);g[r]=B;if(y){I={values:getIterationMethod(_),keys:C?B:getIterationMethod(w),entries:getIterationMethod(S)};if(T)for(k in I)(b||E||!(k in A))&&p(A,k,I[k]);else o({target:r,proto:!0,forced:b||E},I)}return I}},(t,r,i)=>{"use strict";var o=i(65).IteratorPrototype,a=i(58),c=i(12),u=i(69),l=i(62),returnThis=function(){return this};t.exports=function(t,r,i){var h=r+" Iterator";t.prototype=a(o,{next:c(1,i)});u(t,h,!1,!0);l[h]=returnThis;return t}},(t,r,i)=>{"use strict";var o,a,c,u=i(10),l=i(66),h=i(22),p=i(19),d=i(52),m=i(33),g=d("iterator"),y=!1;[].keys&&("next"in(c=[].keys())?(a=l(l(c)))!==Object.prototype&&(o=a):y=!0);var v=null==o||u((function(){var t={};return o[g].call(t)!==t}));v&&(o={});m&&!v||p(o,g)||h(o,g,(function(){return this}));t.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:y}},(t,r,i)=>{var o=i(19),a=i(67),c=i(31),u=i(68),l=c("IE_PROTO"),h=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){t=a(t);return o(t,l)?t[l]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?h:null}},(t,r,i)=>{var o=i(16);t.exports=function(t){return Object(o(t))}},(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(23).f,a=i(19),c=i(52)("toStringTag");t.exports=function(t,r,i){t&&!a(t=i?t:t.prototype,c)&&o(t,c,{configurable:!0,value:r})}},(t,r,i)=>{var o=i(24),a=i(71);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]);r=i instanceof Array}catch(t){}return function setPrototypeOf(i,c){o(i);a(c);r?t.call(i,c):i.__proto__=c;return i}}():void 0)},(t,r,i)=>{var o=i(18);t.exports=function(t){if(!o(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},(t,r,i)=>{var o=i(6),a=i(73),c=i(81);o({target:"Object",stat:!0},{fromEntries:function fromEntries(t){var r={};a(t,(function(t,i){c(r,t,i)}),{AS_ENTRIES:!0});return r}})},(t,r,i)=>{var o=i(24),a=i(74),c=i(43),u=i(75),l=i(77),h=i(80),Result=function(t,r){this.stopped=t;this.result=r};t.exports=function(t,r,i){var p,d,m,g,y,v,b,x=i&&i.that,w=!(!i||!i.AS_ENTRIES),_=!(!i||!i.IS_ITERATOR),S=!(!i||!i.INTERRUPTED),C=u(r,x,1+w+S),stop=function(t){p&&h(p);return new Result(!0,t)},callFn=function(t){if(w){o(t);return S?C(t[0],t[1],stop):C(t[0],t[1])}return S?C(t,stop):C(t)};if(_)p=t;else{if("function"!=typeof(d=l(t)))throw TypeError("Target is not iterable");if(a(d)){for(m=0,g=c(t.length);g>m;m++)if((y=callFn(t[m]))&&y instanceof Result)return y;return new Result(!1)}p=d.call(t)}v=p.next;for(;!(b=v.call(p)).done;){try{y=callFn(b.value)}catch(t){h(p);throw t}if("object"==typeof y&&y&&y instanceof Result)return y}return new Result(!1)}},(t,r,i)=>{var o=i(52),a=i(62),c=o("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(a.Array===t||u[c]===t)}},(t,r,i)=>{var o=i(76);t.exports=function(t,r,i){o(t);if(void 0===r)return t;switch(i){case 0:return function(){return t.call(r)};case 1:return function(i){return t.call(r,i)};case 2:return function(i,o){return t.call(r,i,o)};case 3:return function(i,o,a){return t.call(r,i,o,a)}}return function(){return t.apply(r,arguments)}}},t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},(t,r,i)=>{var o=i(78),a=i(62),c=i(52)("iterator");t.exports=function(t){if(null!=t)return t[c]||t["@@iterator"]||a[o(t)]}},(t,r,i)=>{var o=i(79),a=i(15),c=i(52)("toStringTag"),u="Arguments"==a(function(){return arguments}());t.exports=o?a: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=Object(t),c))?i:u?a(r):"Object"==(o=a(r))&&"function"==typeof r.callee?"Arguments":o}},(t,r,i)=>{var o={};o[i(52)("toStringTag")]="z";t.exports="[object z]"===String(o)},(t,r,i)=>{var o=i(24);t.exports=function(t){var r=t.return;if(void 0!==r)return o(r.call(t)).value}},(t,r,i)=>{"use strict";var o=i(17),a=i(23),c=i(12);t.exports=function(t,r,i){var u=o(r);u in t?a.f(t,u,c(0,i)):t[u]=i}},(t,r,i)=>{i(83);var o=i(87);t.exports=o("String","padStart")},(t,r,i)=>{"use strict";var o=i(6),a=i(84).start;o({target:"String",proto:!0,forced:i(86)},{padStart:function padStart(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var o=i(43),a=i(85),c=i(16),u=Math.ceil,createMethod=function(t){return function(r,i,l){var h,p,d=String(c(r)),m=d.length,g=void 0===l?" ":String(l),y=o(i);if(y<=m||""==g)return d;h=y-m;(p=a.call(g,u(h/g.length))).length>h&&(p=p.slice(0,h));return t?d+p:p+d}};t.exports={start:createMethod(!1),end:createMethod(!0)}},(t,r,i)=>{"use strict";var o=i(44),a=i(16);t.exports=function repeat(t){var r=String(a(this)),i="",c=o(t);if(c<0||c==1/0)throw RangeError("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(r+=r))1&c&&(i+=r);return i}},(t,r,i)=>{var o=i(56);t.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},(t,r,i)=>{var o=i(7),a=i(75),c=Function.call;t.exports=function(t,r,i){return a(c,o[t].prototype[r],i)}},(t,r,i)=>{i(89);var o=i(87);t.exports=o("String","padEnd")},(t,r,i)=>{"use strict";var o=i(6),a=i(84).end;o({target:"String",proto:!0,forced:i(86)},{padEnd:function padEnd(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{i(91);var o=i(39);t.exports=o.Object.values},(t,r,i)=>{var o=i(6),a=i(92).values;o({target:"Object",stat:!0},{values:function values(t){return a(t)}})},(t,r,i)=>{var o=i(9),a=i(60),c=i(13),u=i(11).f,createMethod=function(t){return function(r){for(var i,l=c(r),h=a(l),p=h.length,d=0,m=[];p>d;){i=h[d++];o&&!u.call(l,i)||m.push(t?[i,l[i]]:l[i])}return m}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},(t,r,i)=>{i(94);var o=i(39);t.exports=o.Object.entries},(t,r,i)=>{var o=i(6),a=i(92).entries;o({target:"Object",stat:!0},{entries:function entries(t){return a(t)}})},(t,r,i)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Jbig2Image=void 0;var o=i(1),a=i(96),c=i(100),u=i(101);function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(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){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=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}});r&&_setPrototypeOf(t,r)}(Jbig2Error,t);var r=_createSuper(Jbig2Error);function Jbig2Error(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Jbig2Error);return r.call(this,"JBIG2 error: ".concat(t))}return Jbig2Error}(o.BaseException),h=function Jbig2ImageClosure(){function ContextCache(){}ContextCache.prototype={getContexts:function getContexts(t){return t in this?this[t]:this[t]=new Int8Array(65536)}};function DecodingContext(t,r,i){this.data=t;this.start=r;this.end=i}DecodingContext.prototype={get decoder(){var t=new c.ArithmeticDecoder(this.data,this.start,this.end);return(0,o.shadow)(this,"decoder",t)},get contextCache(){var t=new ContextCache;return(0,o.shadow)(this,"contextCache",t)}};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 u=i.readBit(o,a);a=a<256?a<<1|u:511&(a<<1|u)|256;r=r<<1|u}return r>>>0}var c=readBits(1),u=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?u:u>0?-u: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 t=["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"],r=[[{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}]],i=[{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}]}],h=[39717,1941,229,405],p=[32,8];function decodeBitmap(t,i,o,a,c,u,l,p){if(t){return decodeMMRBitmap(new Reader(p.data,p.start,p.end),i,o,!1)}if(0===a&&!u&&!c&&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,u,l,h,p,d=i.decoder,m=i.contextCache.getContexts("GB"),g=[];for(a=0;a<r;a++){l=g[a]=new Uint8Array(t);h=a<1?l:g[a-1];o=(p=a<2?l:g[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++){l[c]=u=d.readBit(m,o);o=(31735&o)<<1|(c+3<t?p[c+3]<<11:0)|(c+4<t?h[c+4]<<4:0)|u}}return g}(i,o,p);var d=!!u,m=r[a].concat(l);m.sort((function(t,r){return t.y-r.y||t.x-r.x}));var g,y,v=m.length,b=new Int8Array(v),x=new Int8Array(v),w=[],_=0,S=0,C=0,T=0;for(y=0;y<v;y++){b[y]=m[y].x;x[y]=m[y].y;S=Math.min(S,m[y].x);C=Math.max(C,m[y].x);T=Math.min(T,m[y].y);y<v-1&&m[y].y===m[y+1].y&&m[y].x===m[y+1].x-1?_|=1<<v-1-y:w.push(y)}var P=w.length,I=new Int8Array(P),k=new Int8Array(P),O=new Uint16Array(P);for(g=0;g<P;g++){y=w[g];I[g]=m[y].x;k[g]=m[y].y;O[g]=1<<v-1-y}for(var E,A,R,B,D,L=-S,M=-T,U=i-C,j=h[a],N=new Uint8Array(i),H=[],z=p.decoder,X=p.contextCache.getContexts("GB"),G=0,Y=0,q=0;q<o;q++){if(c){if(G^=z.readBit(X,j)){H.push(N);continue}}N=new Uint8Array(N);H.push(N);for(E=0;E<i;E++)if(d&&u[q][E])N[E]=0;else{if(E>=L&&E<U&&q>=M){Y=Y<<1&_;for(y=0;y<P;y++){A=q+k[y];R=E+I[y];(B=H[A][R])&&(Y|=B=O[y])}}else{Y=0;D=v-1;for(y=0;y<v;y++,D--)(R=E+b[y])>=0&&R<i&&(A=q+x[y])>=0&&(B=H[A][R])&&(Y|=B<<D)}var J=z.readBit(X,Y);N[E]=J}}return H}function decodeRefinement(t,r,o,a,c,u,h,d,m){var g=i[o].coding;0===o&&(g=g.concat([d[0]]));var y,v=g.length,b=new Int32Array(v),x=new Int32Array(v);for(y=0;y<v;y++){b[y]=g[y].x;x[y]=g[y].y}var w=i[o].reference;0===o&&(w=w.concat([d[1]]));var _=w.length,S=new Int32Array(_),C=new Int32Array(_);for(y=0;y<_;y++){S[y]=w[y].x;C[y]=w[y].y}for(var T=a[0].length,P=a.length,I=p[o],k=[],O=m.decoder,E=m.contextCache.getContexts("GR"),A=0,R=0;R<r;R++){if(h){if(A^=O.readBit(E,I))throw new l("prediction is not supported")}var B=new Uint8Array(t);k.push(B);for(var D=0;D<t;D++){var L,M,U=0;for(y=0;y<v;y++){L=R+x[y];M=D+b[y];L<0||M<0||M>=t?U<<=1:U=U<<1|k[L][M]}for(y=0;y<_;y++){L=R+C[y]-u;M=D+S[y]-c;L<0||L>=P||M<0||M>=T?U<<=1:U=U<<1|a[L][M]}var j=O.readBit(E,U);B[D]=j}}return k}function decodeTextRegion(t,r,i,o,a,c,u,h,p,d,m,g,y,v,b,x,w,_,S){if(t&&r)throw new l("refinement with Huffman is not supported");var C,T,P=[];for(C=0;C<o;C++){T=new Uint8Array(i);if(a)for(var I=0;I<i;I++)T[I]=a;P.push(T)}var k=w.decoder,O=w.contextCache,E=t?-v.tableDeltaT.decode(S):-decodeInteger(O,"IADT",k),A=0;C=0;for(;C<c;){E+=t?v.tableDeltaT.decode(S):decodeInteger(O,"IADT",k);for(var R=A+=t?v.tableFirstS.decode(S):decodeInteger(O,"IAFS",k);;){var B=0;u>1&&(B=t?S.readBits(_):decodeInteger(O,"IAIT",k));var D=u*E+B,L=t?v.symbolIDTable.decode(S):decodeIAID(O,k,p),M=r&&(t?S.readBit():decodeInteger(O,"IARI",k)),U=h[L],j=U[0].length,N=U.length;if(M){var H=decodeInteger(O,"IARDW",k),z=decodeInteger(O,"IARDH",k);U=decodeRefinement(j+=H,N+=z,b,U,(H>>1)+decodeInteger(O,"IARDX",k),(z>>1)+decodeInteger(O,"IARDY",k),!1,x,w)}var X,G,Y,q=D-(1&g?0:N-1),J=R-(2&g?j-1:0);if(d){for(X=0;X<N;X++)if(T=P[J+X]){Y=U[X];var W=Math.min(i-q,j);switch(y){case 0:for(G=0;G<W;G++)T[q+G]|=Y[G];break;case 2:for(G=0;G<W;G++)T[q+G]^=Y[G];break;default:throw new l("operator ".concat(y," is not supported"))}}R+=N-1}else{for(G=0;G<N;G++)if(T=P[q+G]){Y=U[G];switch(y){case 0:for(X=0;X<j;X++)T[J+X]|=Y[X];break;case 2:for(X=0;X<j;X++)T[J+X]^=Y[X];break;default:throw new l("operator ".concat(y," is not supported"))}}R+=j-1}C++;var V=t?v.tableDeltaS.decode(S):decodeInteger(O,"IADS",k);if(null===V)break;R+=V+m}}return P}function readSegmentHeader(r,i){var o={};o.number=(0,a.readUint32)(r,i);var c=r[i+4],u=63&c;if(!t[u])throw new l("invalid segment type: "+u);o.type=u;o.typeName=t[u];o.deferredNonRetain=!!(128&c);var h=!!(64&c),p=r[i+5],m=p>>5&7,g=[31&p],y=i+6;if(7===p){m=536870911&(0,a.readUint32)(r,y-1);y+=3;var v=m+7>>3;g[0]=r[y++];for(;--v>0;)g.push(r[y++])}else if(5===p||6===p)throw new l("invalid referred-to flags");o.retainBits=g;var b=4;o.number<=256?b=1:o.number<=65536&&(b=2);var x,w,_=[];for(x=0;x<m;x++){var S=void 0;S=1===b?r[y]:2===b?(0,a.readUint16)(r,y):(0,a.readUint32)(r,y);_.push(S);y+=b}o.referredTo=_;if(h){o.pageAssociation=(0,a.readUint32)(r,y);y+=4}else o.pageAssociation=r[y++];o.length=(0,a.readUint32)(r,y);y+=4;if(4294967295===o.length){if(38!==u)throw new l("invalid unknown segment length");var C=readRegionSegmentInformation(r,y),T=!!(1&r[y+d]),P=new Uint8Array(6);if(!T){P[0]=255;P[1]=172}P[2]=C.height>>>24&255;P[3]=C.height>>16&255;P[4]=C.height>>8&255;P[5]=255&C.height;for(x=y,w=r.length;x<w;x++){for(var I=0;I<6&&P[I]===r[x+I];)I++;if(6===I){o.length=x+6;break}}if(4294967295===o.length)throw new l("segment end was not found")}o.headerEnd=y;return o}function readSegments(t,r,i,o){for(var a=[],c=i;c<o;){var u=readSegmentHeader(r,c);c=u.headerEnd;var l={header:u,data:r};if(!t.randomAccess){l.start=c;c+=u.length;l.end=c}a.push(l);if(51===u.type)break}if(t.randomAccess)for(var h=0,p=a.length;h<p;h++){a[h].start=c;c+=a[h].header.length;a[h].end=c}return a}function readRegionSegmentInformation(t,r){return{width:(0,a.readUint32)(t,r),height:(0,a.readUint32)(t,r+4),x:(0,a.readUint32)(t,r+8),y:(0,a.readUint32)(t,r+12),combinationOperator:7&t[r+16]}}var d=17;function processSegment(t,r){var i,o,c,u,h=t.header,p=t.data,m=t.start,g=t.end;switch(h.type){case 0:var y={},v=(0,a.readUint16)(p,m);y.huffman=!!(1&v);y.refinement=!!(2&v);y.huffmanDHSelector=v>>2&3;y.huffmanDWSelector=v>>4&3;y.bitmapSizeSelector=v>>6&1;y.aggregationInstancesSelector=v>>7&1;y.bitmapCodingContextUsed=!!(256&v);y.bitmapCodingContextRetained=!!(512&v);y.template=v>>10&3;y.refinementTemplate=v>>12&1;m+=2;if(!y.huffman){u=0===y.template?4:1;o=[];for(c=0;c<u;c++){o.push({x:(0,a.readInt8)(p,m),y:(0,a.readInt8)(p,m+1)});m+=2}y.at=o}if(y.refinement&&!y.refinementTemplate){o=[];for