12345678910111213141516171819202122 |
- /**
- * @licstart The following is the entire license notice for the
- * Javascript code in this page
- *
- * Copyright 2020 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(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/image_decoders/pdf.image_decoders",[],t):"object"==typeof exports?exports["pdfjs-dist/image_decoders/pdf.image_decoders"]=t():e["pdfjs-dist/image_decoders/pdf.image_decoders"]=e.pdfjsImageDecoders=t()}(this,(function(){return function(e){var t={};function __w_pdfjs_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};e[r].call(n.exports,n,n.exports,__w_pdfjs_require__);n.l=!0;return n.exports}__w_pdfjs_require__.m=e;__w_pdfjs_require__.c=t;__w_pdfjs_require__.d=function(e,t,r){__w_pdfjs_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})};__w_pdfjs_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};__w_pdfjs_require__.t=function(e,t){1&t&&(e=__w_pdfjs_require__(e));if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);__w_pdfjs_require__.r(r);Object.defineProperty(r,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var n in e)__w_pdfjs_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r};__w_pdfjs_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};__w_pdfjs_require__.d(t,"a",t);return t};__w_pdfjs_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};__w_pdfjs_require__.p="";return __w_pdfjs_require__(__w_pdfjs_require__.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"getVerbosityLevel",{enumerable:!0,get:function get(){return n.getVerbosityLevel}});Object.defineProperty(t,"setVerbosityLevel",{enumerable:!0,get:function get(){return n.setVerbosityLevel}});Object.defineProperty(t,"Jbig2mage",{enumerable:!0,get:function get(){return i.Jbig2mage}});Object.defineProperty(t,"JpegImage",{enumerable:!0,get:function get(){return o.JpegImage}});Object.defineProperty(t,"JpxImage",{enumerable:!0,get:function get(){return a.JpxImage}});var n=r(1),i=r(178),o=r(182),a=r(183)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.arrayByteLength=arrayByteLength;t.arraysToBytes=function arraysToBytes(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=arrayByteLength(e[n]);for(var i=0,o=new Uint8Array(r),a=0;a<t;a++){var s=e[a];s instanceof Uint8Array||(s="string"==typeof s?stringToBytes(s):new Uint8Array(s));var c=s.byteLength;o.set(s,i);i+=c}return o};t.assert=assert;t.bytesToString=function bytesToString(e){assert(null!==e&&"object"===_typeof(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),o=e.subarray(n,i);r.push(String.fromCharCode.apply(null,o))}return r.join("")};t.createPromiseCapability=function createPromiseCapability(){var e=Object.create(null),t=!1;Object.defineProperty(e,"settled",{get:function get(){return t}});e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0;r(e)};e.reject=function(e){t=!0;n(e)}}));return e};t.escapeString=function escapeString(e){return e.replace(/([\(\)\\])/g,"\\$1")};t.getModificationDate=function getModificationDate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date(Date.now()),t=[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),(e.getUTCDate()+1).toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")];return t.join("")};t.getVerbosityLevel=function getVerbosityLevel(){return i};t.info=function info(e){i>=n.INFOS&&console.log("Info: ".concat(e))};t.isArrayBuffer=function isArrayBuffer(e){return"object"===_typeof(e)&&null!==e&&void 0!==e.byteLength};t.isArrayEqual=function isArrayEqual(e,t){if(e.length!==t.length)return!1;return e.every((function(e,r){return e===t[r]}))};t.isBool=function isBool(e){return"boolean"==typeof e};t.isNum=function isNum(e){return"number"==typeof e};t.isString=function isString(e){return"string"==typeof e};t.isSameOrigin=function isSameOrigin(e,t){var r;try{if(!(r=new URL(e)).origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin};t.createValidAbsoluteUrl=function createValidAbsoluteUrl(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(function _isValidProtocol(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null};t.removeNullCharacters=function removeNullCharacters(e){if("string"!=typeof e){warn("The argument for removeNullCharacters must be a string.");return e}return e.replace(d,"")};t.setVerbosityLevel=function setVerbosityLevel(e){Number.isInteger(e)&&(i=e)};t.shadow=shadow;t.string32=function string32(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)};t.stringToBytes=stringToBytes;t.stringToPDFString=function stringToPDFString(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(var i=2;i<t;i+=2)r.push(String.fromCharCode(e.charCodeAt(i+1)<<8|e.charCodeAt(i)));else for(var o=0;o<t;++o){var a=y[e.charCodeAt(o)];r.push(a?String.fromCharCode(a):e.charAt(o))}return r.join("")};t.stringToUTF8String=function stringToUTF8String(e){return decodeURIComponent(escape(e))};t.utf8StringToString=function utf8StringToString(e){return unescape(encodeURIComponent(e))};t.warn=warn;t.unreachable=unreachable;t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0;r(2);function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.IDENTITY_MATRIX=[1,0,0,1,0,0];t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];t.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};t.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};t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.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};t.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};t.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReplyType={GROUP:"Group",REPLY:"R"};t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.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};t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n;t.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};t.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};t.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"};t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var i=n.WARNINGS;function warn(e){i>=n.WARNINGS&&console.log("Warning: ".concat(e))}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function shadow(e,t,r){Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1});return r}var o=function BaseExceptionClosure(){function BaseException(e){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=e;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();t.BaseException=o;var a=function(e){_inherits(PasswordException,e);var t=_createSuper(PasswordException);function PasswordException(e,r){var n;_classCallCheck(this,PasswordException);(n=t.call(this,e)).code=r;return n}return PasswordException}(o);t.PasswordException=a;var s=function(e){_inherits(UnknownErrorException,e);var t=_createSuper(UnknownErrorException);function UnknownErrorException(e,r){var n;_classCallCheck(this,UnknownErrorException);(n=t.call(this,e)).details=r;return n}return UnknownErrorException}(o);t.UnknownErrorException=s;var c=function(e){_inherits(InvalidPDFException,e);var t=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return t.apply(this,arguments)}return InvalidPDFException}(o);t.InvalidPDFException=c;var u=function(e){_inherits(MissingPDFException,e);var t=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return t.apply(this,arguments)}return MissingPDFException}(o);t.MissingPDFException=u;var f=function(e){_inherits(UnexpectedResponseException,e);var t=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(e,r){var n;_classCallCheck(this,UnexpectedResponseException);(n=t.call(this,e)).status=r;return n}return UnexpectedResponseException}(o);t.UnexpectedResponseException=f;var l=function(e){_inherits(FormatError,e);var t=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return t.apply(this,arguments)}return FormatError}(o);t.FormatError=l;var p=function(e){_inherits(AbortException,e);var t=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return t.apply(this,arguments)}return AbortException}(o);t.AbortException=p;var d=/\x00/g;function stringToBytes(e){assert("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function arrayByteLength(e){if(void 0!==e.length)return e.length;assert(void 0!==e.byteLength,"arrayByteLength - invalid argument.");return e.byteLength}var h={get value(){return shadow(this,"value",function isLittleEndian(){var e=new Uint8Array(4);e[0]=1;return 1===new Uint32Array(e.buffer,0,1)[0]}())}};t.IsLittleEndianCached=h;var g={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(e){return!1}}())}};t.IsEvalSupportedCached=g;var v=["rgb(",0,",",0,",",0,")"],m=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(e,t,r){t&&_defineProperties(e.prototype,t);r&&_defineProperties(e,r);return e}(Util,null,[{key:"makeCssRgb",value:function makeCssRgb(e,t,r){v[1]=e;v[3]=t;v[5]=r;return v.join("")}},{key:"transform",value:function transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(e,t){var r=Util.applyTransform(e,t),n=Util.applyTransform(e.slice(2,4),t),i=Util.applyTransform([e[0],e[3]],t),o=Util.applyTransform([e[2],e[1]],t);return[Math.min(r[0],n[0],i[0],o[0]),Math.min(r[1],n[1],i[1],o[1]),Math.max(r[0],n[0],i[0],o[0]),Math.max(r[1],n[1],i[1],o[1])]}},{key:"inverseTransform",value:function inverseTransform(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function apply3dTransform(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],a=(r+o)/2,s=Math.sqrt((r+o)*(r+o)-4*(r*o-i*n))/2,c=a+s||1,u=a-s||1;return[Math.sqrt(c),Math.sqrt(u)]}},{key:"normalizeRect",value:function normalizeRect(e){var t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}},{key:"intersect",value:function intersect(e,t){function compare(e,t){return e-t}var r=[e[0],e[2],t[0],t[2]].sort(compare),n=[e[1],e[3],t[1],t[3]].sort(compare),i=[];e=Util.normalizeRect(e);t=Util.normalizeRect(t);if(!(r[0]===e[0]&&r[1]===t[0]||r[0]===t[0]&&r[1]===e[0]))return null;i[0]=r[1];i[2]=r[2];if(!(n[0]===e[1]&&n[1]===t[1]||n[0]===t[1]&&n[1]===e[1]))return null;i[1]=n[1];i[3]=n[2];return i}}]);return Util}();t.Util=m;var y=[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];var b=function createObjectURLClosure(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function createObjectURL(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!n&&URL.createObjectURL){var i=new Blob([t],{type:r});return URL.createObjectURL(i)}for(var o="data:".concat(r,";base64,"),a=0,s=t.length;a<s;a+=3){var c=255&t[a],u=255&t[a+1],f=255&t[a+2],l=c>>2,p=(3&c)<<4|u>>4,d=a+1<s?(15&u)<<2|f>>6:64,h=a+2<s?63&f:64;o+=e[l]+e[p]+e[d]+e[h]}return o}}();t.createObjectURL=b},function(e,t,r){"use strict";var n=r(3);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=r(4));globalThis._pdfjsCompatibilityChecked=!0;var i="object"===("undefined"==typeof window?"undefined":_typeof(window))&&"object"===("undefined"==typeof document?"undefined":_typeof(document)),o="undefined"!=typeof navigator&&navigator.userAgent||"",a=/Trident/.test(o);!function checkNodeBtoa(){!globalThis.btoa&&n.isNodeJS&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&n.isNodeJS&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")})}();!function checkChildNodeRemove(){i&&void 0===Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)})}();!function checkDOMTokenListAddRemove(){if(i&&!n.isNodeJS){var e=document.createElement("div");e.classList.add("testOne","testTwo");if(!0!==e.classList.contains("testOne")||!0!==e.classList.contains("testTwo")){var t=DOMTokenList.prototype.add,r=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var i=0,o=r;i<o.length;i++){var a=o[i];t.call(this,a)}};DOMTokenList.prototype.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i];r.call(this,a)}}}}}();!function checkDOMTokenListToggle(){if(i&&!n.isNodeJS){!1!==document.createElement("div").classList.toggle("test",0)&&(DOMTokenList.prototype.toggle=function(e){var t=arguments.length>1?!!arguments[1]:!this.contains(e);return this[t?"add":"remove"](e),t})}}();!function checkWindowHistoryPushStateReplaceState(){if(i&&a){var e=window.history.pushState,t=window.history.replaceState;window.history.pushState=function(t,r,n){var i=void 0===n?[t,r]:[t,r,n];e.apply(this,i)};window.history.replaceState=function(e,r,n){var i=void 0===n?[e,r]:[e,r,n];t.apply(this,i)}}}();!function checkStringStartsWith(){String.prototype.startsWith||r(49)}();!function checkStringEndsWith(){String.prototype.endsWith||r(60)}();!function checkStringIncludes(){String.prototype.includes||r(62)}();!function checkArrayIncludes(){Array.prototype.includes||r(64)}();!function checkArrayFrom(){Array.from||r(72)}();!function checkObjectAssign(){Object.assign||r(94)}();!function checkObjectFromEntries(){Object.fromEntries||r(97)}();!function checkMathLog2(){Math.log2||(Math.log2=r(101))}();!function checkNumberIsNaN(){Number.isNaN||(Number.isNaN=r(103))}();!function checkNumberIsInteger(){Number.isInteger||(Number.isInteger=r(105))}();!function checkTypedArraySlice(){Uint8Array.prototype.slice||r(108)}();!function checkMapEntries(){globalThis.Map&&globalThis.Map.prototype.entries||(globalThis.Map=r(113))}();!function checkSetEntries(){globalThis.Set&&globalThis.Set.prototype.entries||(globalThis.Set=r(127))}();!function checkWeakMap(){globalThis.WeakMap||(globalThis.WeakMap=r(129))}();!function checkWeakSet(){globalThis.WeakSet||(globalThis.WeakSet=r(135))}();!function checkStringCodePointAt(){String.prototype.codePointAt||r(137)}();!function checkStringFromCodePoint(){String.fromCodePoint||(String.fromCodePoint=r(139))}();!function checkSymbol(){globalThis.Symbol||r(141)}();!function checkStringPadStart(){String.prototype.padStart||r(166)}();!function checkStringPadEnd(){String.prototype.padEnd||r(171)}();!function checkObjectValues(){Object.values||(Object.values=r(173))}();!function checkObjectEntries(){Object.entries||(Object.entries=r(176))}()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.isNodeJS=void 0;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},function(e,t,r){r(5);e.exports=r(7)},function(e,t,r){r(6)({global:!0},{globalThis:r(7)})},function(e,t,r){var n=r(7),i=r(8).f,o=r(22),a=r(25),s=r(26),c=r(36),u=r(48);e.exports=function(e,t){var r,f,l,p,d,h=e.target,g=e.global,v=e.stat;if(r=g?n:v?n[h]||s(h,{}):(n[h]||{}).prototype)for(f in t){p=t[f];l=e.noTargetGet?(d=i(r,f))&&d.value:r[f];if(!u(g?f:h+(v?".":"#")+f,e.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(e.sham||l&&l.sham)&&o(p,"sham",!0);a(r,f,p,e)}}},function(e,t){var check=function(e){return e&&e.Math==Math&&e};e.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(e,t,r){var n=r(9),i=r(11),o=r(12),a=r(13),s=r(17),c=r(19),u=r(20),f=Object.getOwnPropertyDescriptor;t.f=n?f:function getOwnPropertyDescriptor(e,t){e=a(e);t=s(t,!0);if(u)try{return f(e,t)}catch(e){}if(c(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t,r){var n=r(10);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);t.f=o?function propertyIsEnumerable(e){var t=i(this,e);return!!t&&t.enumerable}:n},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(14),i=r(16);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(10),i=r(15),o="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(18);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(9),i=r(10),o=r(21);e.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(7),i=r(18),o=n.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,r){var n=r(9),i=r(23),o=r(12);e.exports=n?function(e,t,r){return i.f(e,t,o(1,r))}:function(e,t,r){e[t]=r;return e}},function(e,t,r){var n=r(9),i=r(20),o=r(24),a=r(17),s=Object.defineProperty;t.f=n?s:function defineProperty(e,t,r){o(e);t=a(t,!0);o(r);if(i)try{return s(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");"value"in r&&(e[t]=r.value);return e}},function(e,t,r){var n=r(18);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,r){var n=r(7),i=r(22),o=r(19),a=r(26),s=r(27),c=r(29),u=c.get,f=c.enforce,l=String(String).split("String");(e.exports=function(e,t,r,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;if("function"==typeof r){"string"!=typeof t||o(r,"name")||i(r,"name",t);f(r).source=l.join("string"==typeof t?t:"")}if(e!==n){c?!p&&e[t]&&(u=!0):delete e[t];u?e[t]=r:i(e,t,r)}else u?e[t]=r:a(t,r)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&u(this).source||s(this)}))},function(e,t,r){var n=r(7),i=r(22);e.exports=function(e,t){try{i(n,e,t)}catch(r){n[e]=t}return t}},function(e,t,r){var n=r(28),i=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return i.call(e)});e.exports=n.inspectSource},function(e,t,r){var n=r(7),i=r(26),o=n["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,r){var n,i,o,a=r(30),s=r(7),c=r(18),u=r(22),f=r(19),l=r(31),p=r(35),d=s.WeakMap;if(a){var h=new d,g=h.get,v=h.has,m=h.set;n=function(e,t){m.call(h,e,t);return t};i=function(e){return g.call(h,e)||{}};o=function(e){return v.call(h,e)}}else{var y=l("state");p[y]=!0;n=function(e,t){u(e,y,t);return t};i=function(e){return f(e,y)?e[y]:{}};o=function(e){return f(e,y)}}e.exports={set:n,get:i,has:o,enforce:function(e){return o(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(7),i=r(27),o=n.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,r){var n=r(32),i=r(34),o=n("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,r){var n=r(33),i=r(28);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},function(e,t){e.exports={}},function(e,t,r){var n=r(19),i=r(37),o=r(8),a=r(23);e.exports=function(e,t){for(var r=i(t),s=a.f,c=o.f,u=0;u<r.length;u++){var f=r[u];n(e,f)||s(e,f,c(t,f))}}},function(e,t,r){var n=r(38),i=r(40),o=r(47),a=r(24);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=i.f(a(e)),r=o.f;return r?t.concat(r(e)):t}},function(e,t,r){var n=r(39),i=r(7),aFunction=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?aFunction(n[e])||aFunction(i[e]):n[e]&&n[e][t]||i[e]&&i[e][t]}},function(e,t,r){var n=r(7);e.exports=n},function(e,t,r){var n=r(41),i=r(46).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,i)}},function(e,t,r){var n=r(19),i=r(13),o=r(42).indexOf,a=r(35);e.exports=function(e,t){var r,s=i(e),c=0,u=[];for(r in s)!n(a,r)&&n(s,r)&&u.push(r);for(;t.length>c;)n(s,r=t[c++])&&(~o(u,r)||u.push(r));return u}},function(e,t,r){var n=r(13),i=r(43),o=r(45),createMethod=function(e){return function(t,r,a){var s,c=n(t),u=i(c.length),f=o(a,u);if(e&&r!=r){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},function(e,t,r){var n=r(44),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(44),i=Math.max,o=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):o(r,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,r){var n=r(10),i=/#|\.prototype\./,isForced=function(e,t){var r=a[o(e)];return r==c||r!=s&&("function"==typeof t?n(t):!!t)},o=isForced.normalize=function(e){return String(e).replace(i,".").toLowerCase()},a=isForced.data={},s=isForced.NATIVE="N",c=isForced.POLYFILL="P";e.exports=isForced},function(e,t,r){r(50);var n=r(57);e.exports=n("String","startsWith")},function(e,t,r){"use strict";var n,i=r(6),o=r(8).f,a=r(43),s=r(51),c=r(16),u=r(56),f=r(33),l="".startsWith,p=Math.min,d=u("startsWith");i({target:"String",proto:!0,forced:!(!f&&!d&&!!(n=o(String.prototype,"startsWith"),n&&!n.writable))&&!d},{startsWith:function startsWith(e){var t=String(c(this));s(e);var r=a(p(arguments.length>1?arguments[1]:void 0,t.length)),n=String(e);return l?l.call(t,n,r):t.slice(r,r+n.length)===n}})},function(e,t,r){var n=r(52);e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,r){var n=r(18),i=r(15),o=r(53)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,r){var n=r(7),i=r(32),o=r(19),a=r(34),s=r(54),c=r(55),u=i("wks"),f=n.Symbol,l=c?f:f&&f.withoutSetter||a;e.exports=function(e){o(u,e)||(s&&o(f,e)?u[e]=f[e]:u[e]=l("Symbol."+e));return u[e]}},function(e,t,r){var n=r(10);e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},function(e,t,r){var n=r(54);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,r){var n=r(53)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{t[n]=!1;return"/./"[e](t)}catch(e){}}return!1}},function(e,t,r){var n=r(7),i=r(58),o=Function.call;e.exports=function(e,t,r){return i(o,n[e].prototype[t],r)}},function(e,t,r){var n=r(59);e.exports=function(e,t,r){n(e);if(void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,r){r(61);var n=r(57);e.exports=n("String","endsWith")},function(e,t,r){"use strict";var n,i=r(6),o=r(8).f,a=r(43),s=r(51),c=r(16),u=r(56),f=r(33),l="".endsWith,p=Math.min,d=u("endsWith");i({target:"String",proto:!0,forced:!(!f&&!d&&!!(n=o(String.prototype,"endsWith"),n&&!n.writable))&&!d},{endsWith:function endsWith(e){var t=String(c(this));s(e);var r=arguments.length>1?arguments[1]:void 0,n=a(t.length),i=void 0===r?n:p(a(r),n),o=String(e);return l?l.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,r){r(63);var n=r(57);e.exports=n("String","includes")},function(e,t,r){"use strict";var n=r(6),i=r(51),o=r(16);n({target:"String",proto:!0,forced:!r(56)("includes")},{includes:function includes(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(65);var n=r(57);e.exports=n("Array","includes")},function(e,t,r){"use strict";var n=r(6),i=r(42).includes,o=r(66);n({target:"Array",proto:!0,forced:!r(71)("indexOf",{ACCESSORS:!0,1:0})},{includes:function includes(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}});o("includes")},function(e,t,r){var n=r(53),i=r(67),o=r(23),a=n("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)});e.exports=function(e){s[a][e]=!0}},function(e,t,r){var n,i=r(24),o=r(68),a=r(46),s=r(35),c=r(70),u=r(21),f=r(31),l=f("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<script>"+e+"<\/script>"},NullProtoObject=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}NullProtoObject=n?function(e){e.write(scriptTag(""));e.close();var t=e.parentWindow.Object;e=null;return t}(n):function(){var e,t=u("iframe");t.style.display="none";c.appendChild(t);t.src=String("javascript:");(e=t.contentWindow.document).open();e.write(scriptTag("document.F=Object"));e.close();return e.F}();for(var e=a.length;e--;)delete NullProtoObject.prototype[a[e]];return NullProtoObject()};s[l]=!0;e.exports=Object.create||function create(e,t){var r;if(null!==e){EmptyConstructor.prototype=i(e);r=new EmptyConstructor;EmptyConstructor.prototype=null;r[l]=e}else r=NullProtoObject();return void 0===t?r:o(r,t)}},function(e,t,r){var n=r(9),i=r(23),o=r(24),a=r(69);e.exports=n?Object.defineProperties:function defineProperties(e,t){o(e);for(var r,n=a(t),s=n.length,c=0;s>c;)i.f(e,r=n[c++],t[r]);return e}},function(e,t,r){var n=r(41),i=r(46);e.exports=Object.keys||function keys(e){return n(e,i)}},function(e,t,r){var n=r(38);e.exports=n("document","documentElement")},function(e,t,r){var n=r(9),i=r(10),o=r(19),a=Object.defineProperty,s={},thrower=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var r=[][e],c=!!o(t,"ACCESSORS")&&t.ACCESSORS,u=o(t,0)?t[0]:thrower,f=o(t,1)?t[1]:void 0;return s[e]=!!r&&!i((function(){if(c&&!n)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:thrower}):e[1]=1;r.call(e,u,f)}))}},function(e,t,r){r(73);r(85);var n=r(39);e.exports=n.Array.from},function(e,t,r){"use strict";var n=r(74).charAt,i=r(29),o=r(75),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function next(){var e,t=s(this),r=t.string,i=t.index;if(i>=r.length)return{value:void 0,done:!0};e=n(r,i);t.index+=e.length;return{value:e,done:!1}}))},function(e,t,r){var n=r(44),i=r(16),createMethod=function(e){return function(t,r){var o,a,s=String(i(t)),c=n(r),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},function(e,t,r){"use strict";var n=r(6),i=r(76),o=r(78),a=r(83),s=r(81),c=r(22),u=r(25),f=r(53),l=r(33),p=r(82),d=r(77),h=d.IteratorPrototype,g=d.BUGGY_SAFARI_ITERATORS,v=f("iterator"),returnThis=function(){return this};e.exports=function(e,t,r,f,d,m,y){i(r,t,f);var b,x,w,getIterationMethod=function(e){if(e===d&&C)return C;if(!g&&e in T)return T[e];switch(e){case"keys":return function keys(){return new r(this,e)};case"values":return function values(){return new r(this,e)};case"entries":return function entries(){return new r(this,e)}}return function(){return new r(this)}},S=t+" Iterator",_=!1,T=e.prototype,P=T[v]||T["@@iterator"]||d&&T[d],C=!g&&P||getIterationMethod(d),k="Array"==t&&T.entries||P;if(k){b=o(k.call(new e));if(h!==Object.prototype&&b.next){l||o(b)===h||(a?a(b,h):"function"!=typeof b[v]&&c(b,v,returnThis));s(b,S,!0,!0);l&&(p[S]=returnThis)}}if("values"==d&&P&&"values"!==P.name){_=!0;C=function values(){return P.call(this)}}l&&!y||T[v]===C||c(T,v,C);p[t]=C;if(d){x={values:getIterationMethod("values"),keys:m?C:getIterationMethod("keys"),entries:getIterationMethod("entries")};if(y)for(w in x)(g||_||!(w in T))&&u(T,w,x[w]);else n({target:t,proto:!0,forced:g||_},x)}return x}},function(e,t,r){"use strict";var n=r(77).IteratorPrototype,i=r(67),o=r(12),a=r(81),s=r(82),returnThis=function(){return this};e.exports=function(e,t,r){var c=t+" Iterator";e.prototype=i(n,{next:o(1,r)});a(e,c,!1,!0);s[c]=returnThis;return e}},function(e,t,r){"use strict";var n,i,o,a=r(78),s=r(22),c=r(19),u=r(53),f=r(33),l=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(n=i):p=!0);null==n&&(n={});f||c(n,l)||s(n,l,(function(){return this}));e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},function(e,t,r){var n=r(19),i=r(79),o=r(31),a=r(80),s=o("IE_PROTO"),c=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){e=i(e);return n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},function(e,t,r){var n=r(16);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(10);e.exports=!n((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},function(e,t,r){var n=r(23).f,i=r(19),o=r(53)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t){e.exports={}},function(e,t,r){var n=r(24),i=r(84);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]);t=r instanceof Array}catch(e){}return function setPrototypeOf(r,o){n(r);i(o);t?e.call(r,o):r.__proto__=o;return r}}():void 0)},function(e,t,r){var n=r(18);e.exports=function(e){if(!n(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,r){var n=r(6),i=r(86);n({target:"Array",stat:!0,forced:!r(93)((function(e){Array.from(e)}))},{from:i})},function(e,t,r){"use strict";var n=r(58),i=r(79),o=r(87),a=r(88),s=r(43),c=r(89),u=r(90);e.exports=function from(e){var t,r,f,l,p,d,h=i(e),g="function"==typeof this?this:Array,v=arguments.length,m=v>1?arguments[1]:void 0,y=void 0!==m,b=u(h),x=0;y&&(m=n(m,v>2?arguments[2]:void 0,2));if(null==b||g==Array&&a(b)){r=new g(t=s(h.length));for(;t>x;x++){d=y?m(h[x],x):h[x];c(r,x,d)}}else{p=(l=b.call(h)).next;r=new g;for(;!(f=p.call(l)).done;x++){d=y?o(l,m,[f.value,x],!0):f.value;c(r,x,d)}}r.length=x;return r}},function(e,t,r){var n=r(24);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var o=e.return;void 0!==o&&n(o.call(e));throw t}}},function(e,t,r){var n=r(53),i=r(82),o=n("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,r){"use strict";var n=r(17),i=r(23),o=r(12);e.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,o(0,r)):e[a]=r}},function(e,t,r){var n=r(91),i=r(82),o=r(53)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[n(e)]}},function(e,t,r){var n=r(92),i=r(15),o=r(53)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?r:a?i(t):"Object"==(n=i(t))&&"function"==typeof t.callee?"Arguments":n}},function(e,t,r){var n={};n[r(53)("toStringTag")]="z";e.exports="[object z]"===String(n)},function(e,t,r){var n=r(53)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[n]=function(){return this};Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o={};o[n]=function(){return{next:function(){return{done:r=!0}}}};e(o)}catch(e){}return r}},function(e,t,r){r(95);var n=r(39);e.exports=n.Object.assign},function(e,t,r){var n=r(6),i=r(96);n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,r){"use strict";var n=r(9),i=r(10),o=r(69),a=r(47),s=r(11),c=r(79),u=r(14),f=Object.assign,l=Object.defineProperty;e.exports=!f||i((function(){if(n&&1!==f({b:1},f(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();e[r]=7;"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e}));return 7!=f({},e)[r]||"abcdefghijklmnopqrst"!=o(f({},t)).join("")}))?function assign(e,t){for(var r=c(e),i=arguments.length,f=1,l=a.f,p=s.f;i>f;)for(var d,h=u(arguments[f++]),g=l?o(h).concat(l(h)):o(h),v=g.length,m=0;v>m;){d=g[m++];n&&!p.call(h,d)||(r[d]=h[d])}return r}:f},function(e,t,r){r(98);r(99);var n=r(39);e.exports=n.Object.fromEntries},function(e,t,r){"use strict";var n=r(13),i=r(66),o=r(82),a=r(29),s=r(75),c=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){c(this,{type:"Array Iterator",target:n(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,r=e.kind,n=e.index++;if(!t||n>=t.length){e.target=void 0;return{value:void 0,done:!0}}return"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");o.Arguments=o.Array;i("keys");i("values");i("entries")},function(e,t,r){var n=r(6),i=r(100),o=r(89);n({target:"Object",stat:!0},{fromEntries:function fromEntries(e){var t={};i(e,(function(e,r){o(t,e,r)}),void 0,!0);return t}})},function(e,t,r){var n=r(24),i=r(88),o=r(43),a=r(58),s=r(90),c=r(87),Result=function(e,t){this.stopped=e;this.result=t};(e.exports=function(e,t,r,u,f){var l,p,d,h,g,v,m,y=a(t,r,u?2:1);if(f)l=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(i(p)){for(d=0,h=o(e.length);h>d;d++)if((g=u?y(n(m=e[d])[0],m[1]):y(e[d]))&&g instanceof Result)return g;return new Result(!1)}l=p.call(e)}v=l.next;for(;!(m=v.call(l)).done;)if("object"==typeof(g=c(l,y,m.value,u))&&g&&g instanceof Result)return g;return new Result(!1)}).stop=function(e){return new Result(!0,e)}},function(e,t,r){r(102);var n=r(39);e.exports=n.Math.log2},function(e,t,r){var n=r(6),i=Math.log,o=Math.LN2;n({target:"Math",stat:!0},{log2:function log2(e){return i(e)/o}})},function(e,t,r){r(104);var n=r(39);e.exports=n.Number.isNaN},function(e,t,r){r(6)({target:"Number",stat:!0},{isNaN:function isNaN(e){return e!=e}})},function(e,t,r){r(106);var n=r(39);e.exports=n.Number.isInteger},function(e,t,r){r(6)({target:"Number",stat:!0},{isInteger:r(107)})},function(e,t,r){var n=r(18),i=Math.floor;e.exports=function isInteger(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){r(109)},function(e,t,r){"use strict";var n=r(110),i=r(112),o=r(10),a=n.aTypedArray,s=n.aTypedArrayConstructor,c=n.exportTypedArrayMethod,u=[].slice;c("slice",(function slice(e,t){for(var r=u.call(a(this),e,t),n=i(this,this.constructor),o=0,c=r.length,f=new(s(n))(c);c>o;)f[o]=r[o++];return f}),o((function(){new Int8Array(1).slice()})))},function(e,t,r){"use strict";var n,i=r(111),o=r(9),a=r(7),s=r(18),c=r(19),u=r(91),f=r(22),l=r(25),p=r(23).f,d=r(78),h=r(83),g=r(53),v=r(34),m=a.Int8Array,y=m&&m.prototype,b=a.Uint8ClampedArray,x=b&&b.prototype,w=m&&d(m),S=y&&d(y),_=Object.prototype,T=_.isPrototypeOf,P=g("toStringTag"),C=v("TYPED_ARRAY_TAG"),k=i&&!!h&&"Opera"!==u(a.opera),I=!1,O={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},isTypedArray=function(e){return s(e)&&c(O,u(e))};for(n in O)a[n]||(k=!1);if(!k||"function"!=typeof w||w===Function.prototype){w=function TypedArray(){throw TypeError("Incorrect invocation")};if(k)for(n in O)a[n]&&h(a[n],w)}if(!k||!S||S===_){S=w.prototype;if(k)for(n in O)a[n]&&h(a[n].prototype,S)}k&&d(x)!==S&&h(x,S);if(o&&!c(S,P)){I=!0;p(S,P,{get:function(){return s(this)?this[C]:void 0}});for(n in O)a[n]&&f(a[n],C,n)}e.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:I&&C,aTypedArray:function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(e){if(h){if(T.call(w,e))return e}else for(var t in O)if(c(O,n)){var r=a[t];if(r&&(e===r||T.call(r,e)))return e}throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r){if(o){if(r)for(var n in O){var i=a[n];i&&c(i.prototype,e)&&delete i.prototype[e]}S[e]&&!r||l(S,e,r?t:k&&y[e]||t)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(o){if(h){if(r)for(n in O)(i=a[n])&&c(i,e)&&delete i[e];if(w[e]&&!r)return;try{return l(w,e,r?t:k&&m[e]||t)}catch(e){}}for(n in O)!(i=a[n])||i[e]&&!r||l(i,e,t)}},isView:function isView(e){var t=u(e);return"DataView"===t||c(O,t)},isTypedArray:isTypedArray,TypedArray:w,TypedArrayPrototype:S}},function(e,t){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,r){var n=r(24),i=r(59),o=r(53)("species");e.exports=function(e,t){var r,a=n(e).constructor;return void 0===a||null==(r=n(a)[o])?t:i(r)}},function(e,t,r){r(114);r(123);r(73);r(125);var n=r(39);e.exports=n.Map},function(e,t,r){"use strict";var n=r(115),i=r(120);e.exports=n("Map",(function(e){return function Map(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){"use strict";var n=r(6),i=r(7),o=r(48),a=r(25),s=r(116),c=r(100),u=r(118),f=r(18),l=r(10),p=r(93),d=r(81),h=r(119);e.exports=function(e,t,r){var g=-1!==e.indexOf("Map"),v=-1!==e.indexOf("Weak"),m=g?"set":"add",y=i[e],b=y&&y.prototype,x=y,w={},fixMethod=function(e){var t=b[e];a(b,e,"add"==e?function add(e){t.call(this,0===e?0:e);return this}:"delete"==e?function(e){return!(v&&!f(e))&&t.call(this,0===e?0:e)}:"get"==e?function get(e){return v&&!f(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function has(e){return!(v&&!f(e))&&t.call(this,0===e?0:e)}:function set(e,r){t.call(this,0===e?0:e,r);return this})};if(o(e,"function"!=typeof y||!(v||b.forEach&&!l((function(){(new y).entries().next()}))))){x=r.getConstructor(t,e,g,m);s.REQUIRED=!0}else if(o(e,!0)){var S=new x,_=S[m](v?{}:-0,1)!=S,T=l((function(){S.has(1)})),P=p((function(e){new y(e)})),C=!v&&l((function(){for(var e=new y,t=5;t--;)e[m](t,t);return!e.has(-0)}));if(!P){(x=t((function(t,r){u(t,x,e);var n=h(new y,t,x);null!=r&&c(r,n[m],n,g);return n}))).prototype=b;b.constructor=x}if(T||C){fixMethod("delete");fixMethod("has");g&&fixMethod("get")}(C||_)&&fixMethod(m);v&&b.clear&&delete b.clear}w[e]=x;n({global:!0,forced:x!=y},w);d(x,e);v||r.setStrong(x,e,g);return x}},function(e,t,r){var n=r(35),i=r(18),o=r(19),a=r(23).f,s=r(34),c=r(117),u=s("meta"),f=0,l=Object.isExtensible||function(){return!0},setMetadata=function(e){a(e,u,{value:{objectID:"O"+ ++f,weakData:{}}})},p=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!l(e))return"F";if(!t)return"E";setMetadata(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!l(e))return!0;if(!t)return!1;setMetadata(e)}return e[u].weakData},onFreeze:function(e){c&&p.REQUIRED&&l(e)&&!o(e,u)&&setMetadata(e);return e}};n[u]=!0},function(e,t,r){var n=r(10);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}},function(e,t,r){var n=r(18),i=r(83);e.exports=function(e,t,r){var o,a;i&&"function"==typeof(o=t.constructor)&&o!==r&&n(a=o.prototype)&&a!==r.prototype&&i(e,a);return e}},function(e,t,r){"use strict";var n=r(23).f,i=r(67),o=r(121),a=r(58),s=r(118),c=r(100),u=r(75),f=r(122),l=r(9),p=r(116).fastKey,d=r(29),h=d.set,g=d.getterFor;e.exports={getConstructor:function(e,t,r,u){var f=e((function(e,n){s(e,f,t);h(e,{type:t,index:i(null),first:void 0,last:void 0,size:0});l||(e.size=0);null!=n&&c(n,e[u],e,r)})),d=g(t),define=function(e,t,r){var n,i,o=d(e),a=getEntry(e,t);if(a)a.value=r;else{o.last=a={index:i=p(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1};o.first||(o.first=a);n&&(n.next=a);l?o.size++:e.size++;"F"!==i&&(o.index[i]=a)}return e},getEntry=function(e,t){var r,n=d(e),i=p(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};o(f.prototype,{clear:function clear(){for(var e=d(this),t=e.index,r=e.first;r;){r.removed=!0;r.previous&&(r.previous=r.previous.next=void 0);delete t[r.index];r=r.next}e.first=e.last=void 0;l?e.size=0:this.size=0},delete:function(e){var t=d(this),r=getEntry(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index];r.removed=!0;i&&(i.next=n);n&&(n.previous=i);t.first==r&&(t.first=n);t.last==r&&(t.last=i);l?t.size--:this.size--}return!!r},forEach:function forEach(e){for(var t,r=d(this),n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;){n(t.value,t.key,this);for(;t&&t.removed;)t=t.previous}},has:function has(e){return!!getEntry(this,e)}});o(f.prototype,r?{get:function get(e){var t=getEntry(this,e);return t&&t.value},set:function set(e,t){return define(this,0===e?0:e,t)}}:{add:function add(e){return define(this,e=0===e?0:e,e)}});l&&n(f.prototype,"size",{get:function(){return d(this).size}});return f},setStrong:function(e,t,r){var n=t+" Iterator",i=g(t),o=g(n);u(e,t,(function(e,t){h(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;if(!e.target||!(e.last=r=r?r.next:e.state.first)){e.target=void 0;return{value:void 0,done:!0}}return"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}}),r?"entries":"values",!r,!0);f(t)}}},function(e,t,r){var n=r(25);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";var n=r(38),i=r(23),o=r(53),a=r(9),s=o("species");e.exports=function(e){var t=n(e),r=i.f;a&&t&&!t[s]&&r(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(92),i=r(25),o=r(124);n||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,r){"use strict";var n=r(92),i=r(91);e.exports=n?{}.toString:function toString(){return"[object "+i(this)+"]"}},function(e,t,r){var n=r(7),i=r(126),o=r(98),a=r(22),s=r(53),c=s("iterator"),u=s("toStringTag"),f=o.values;for(var l in i){var p=n[l],d=p&&p.prototype;if(d){if(d[c]!==f)try{a(d,c,f)}catch(e){d[c]=f}d[u]||a(d,u,l);if(i[l])for(var h in o)if(d[h]!==o[h])try{a(d,h,o[h])}catch(e){d[h]=o[h]}}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,r){r(128);r(123);r(73);r(125);var n=r(39);e.exports=n.Set},function(e,t,r){"use strict";var n=r(115),i=r(120);e.exports=n("Set",(function(e){return function Set(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},function(e,t,r){r(123);r(130);r(125);var n=r(39);e.exports=n.WeakMap},function(e,t,r){"use strict";var n,i=r(7),o=r(121),a=r(116),s=r(115),c=r(131),u=r(18),f=r(29).enforce,l=r(30),p=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,wrapper=function(e){return function WeakMap(){return e(this,arguments.length?arguments[0]:void 0)}},h=e.exports=s("WeakMap",wrapper,c);if(l&&p){n=c.getConstructor(wrapper,"WeakMap",!0);a.REQUIRED=!0;var g=h.prototype,v=g.delete,m=g.has,y=g.get,b=g.set;o(g,{delete:function(e){if(u(e)&&!d(e)){var t=f(this);t.frozen||(t.frozen=new n);return v.call(this,e)||t.frozen.delete(e)}return v.call(this,e)},has:function has(e){if(u(e)&&!d(e)){var t=f(this);t.frozen||(t.frozen=new n);return m.call(this,e)||t.frozen.has(e)}return m.call(this,e)},get:function get(e){if(u(e)&&!d(e)){var t=f(this);t.frozen||(t.frozen=new n);return m.call(this,e)?y.call(this,e):t.frozen.get(e)}return y.call(this,e)},set:function set(e,t){if(u(e)&&!d(e)){var r=f(this);r.frozen||(r.frozen=new n);m.call(this,e)?b.call(this,e,t):r.frozen.set(e,t)}else b.call(this,e,t);return this}})}},function(e,t,r){"use strict";var n=r(121),i=r(116).getWeakData,o=r(24),a=r(18),s=r(118),c=r(100),u=r(132),f=r(19),l=r(29),p=l.set,d=l.getterFor,h=u.find,g=u.findIndex,v=0,uncaughtFrozenStore=function(e){return e.frozen||(e.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};UncaughtFrozenStore.prototype={get:function(e){var t=findUncaughtFrozen(this,e);if(t)return t[1]},has:function(e){return!!findUncaughtFrozen(this,e)},set:function(e,t){var r=findUncaughtFrozen(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));~t&&this.entries.splice(t,1);return!!~t}};e.exports={getConstructor:function(e,t,r,u){var l=e((function(e,n){s(e,l,t);p(e,{type:t,id:v++,frozen:void 0});null!=n&&c(n,e[u],e,r)})),h=d(t),define=function(e,t,r){var n=h(e),a=i(o(t),!0);!0===a?uncaughtFrozenStore(n).set(t,r):a[n.id]=r;return e};n(l.prototype,{delete:function(e){var t=h(this);if(!a(e))return!1;var r=i(e);return!0===r?uncaughtFrozenStore(t).delete(e):r&&f(r,t.id)&&delete r[t.id]},has:function has(e){var t=h(this);if(!a(e))return!1;var r=i(e);return!0===r?uncaughtFrozenStore(t).has(e):r&&f(r,t.id)}});n(l.prototype,r?{get:function get(e){var t=h(this);if(a(e)){var r=i(e);return!0===r?uncaughtFrozenStore(t).get(e):r?r[t.id]:void 0}},set:function set(e,t){return define(this,e,t)}}:{add:function add(e){return define(this,e,!0)}});return l}}},function(e,t,r){var n=r(58),i=r(14),o=r(79),a=r(43),s=r(133),c=[].push,createMethod=function(e){var t=1==e,r=2==e,u=3==e,f=4==e,l=6==e,p=5==e||l;return function(d,h,g,v){for(var m,y,b=o(d),x=i(b),w=n(h,g,3),S=a(x.length),_=0,T=v||s,P=t?T(d,S):r?T(d,0):void 0;S>_;_++)if(p||_ in x){y=w(m=x[_],_,b);if(e)if(t)P[_]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return _;case 2:c.call(P,m)}else if(f)return!1}return l?-1:u||f?f:P}};e.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6)}},function(e,t,r){var n=r(18),i=r(134),o=r(53)("species");e.exports=function(e,t){var r;i(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!i(r.prototype)?n(r)&&null===(r=r[o])&&(r=void 0):r=void 0);return new(void 0===r?Array:r)(0===t?0:t)}},function(e,t,r){var n=r(15);e.exports=Array.isArray||function isArray(e){return"Array"==n(e)}},function(e,t,r){r(123);r(136);r(125);var n=r(39);e.exports=n.WeakSet},function(e,t,r){"use strict";r(115)("WeakSet",(function(e){return function WeakSet(){return e(this,arguments.length?arguments[0]:void 0)}}),r(131))},function(e,t,r){r(138);var n=r(57);e.exports=n("String","codePointAt")},function(e,t,r){"use strict";var n=r(6),i=r(74).codeAt;n({target:"String",proto:!0},{codePointAt:function codePointAt(e){return i(this,e)}})},function(e,t,r){r(140);var n=r(39);e.exports=n.String.fromCodePoint},function(e,t,r){var n=r(6),i=r(45),o=String.fromCharCode,a=String.fromCodePoint;n({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function fromCodePoint(e){for(var t,r=[],n=arguments.length,a=0;n>a;){t=+arguments[a++];if(i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return r.join("")}})},function(e,t,r){r(142);r(123);r(146);r(150);r(151);r(152);r(153);r(154);r(155);r(156);r(157);r(158);r(159);r(160);r(161);r(162);r(163);r(164);r(165);var n=r(39);e.exports=n.Symbol},function(e,t,r){"use strict";var n=r(6),i=r(10),o=r(134),a=r(18),s=r(79),c=r(43),u=r(89),f=r(133),l=r(143),p=r(53),d=r(144),h=p("isConcatSpreadable"),g=d>=51||!i((function(){var e=[];e[h]=!1;return e.concat()[0]!==e})),v=l("concat"),isConcatSpreadable=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,forced:!g||!v},{concat:function concat(e){var t,r,n,i,o,a=s(this),l=f(a,0),p=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(o=-1===t?a:arguments[t])){if(p+(i=c(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<i;r++,p++)r in o&&u(l,p,o[r])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(l,p++,o)}l.length=p;return l}})},function(e,t,r){var n=r(10),i=r(53),o=r(144),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];(t.constructor={})[a]=function(){return{foo:1}};return 1!==t[e](Boolean).foo}))}},function(e,t,r){var n,i,o=r(7),a=r(145),s=o.process,c=s&&s.versions,u=c&&c.v8;u?i=(n=u.split("."))[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=n[1]);e.exports=i&&+i},function(e,t,r){var n=r(38);e.exports=n("navigator","userAgent")||""},function(e,t,r){"use strict";var n=r(6),i=r(7),o=r(38),a=r(33),s=r(9),c=r(54),u=r(55),f=r(10),l=r(19),p=r(134),d=r(18),h=r(24),g=r(79),v=r(13),m=r(17),y=r(12),b=r(67),x=r(69),w=r(40),S=r(147),_=r(47),T=r(8),P=r(23),C=r(11),k=r(22),I=r(25),O=r(32),E=r(31),A=r(35),R=r(34),M=r(53),D=r(148),L=r(149),B=r(81),U=r(29),N=r(132).forEach,j=E("hidden"),z=M("toPrimitive"),H=U.set,W=U.getterFor("Symbol"),X=Object.prototype,q=i.Symbol,Y=o("JSON","stringify"),V=T.f,J=P.f,G=S.f,K=C.f,Q=O("symbols"),Z=O("op-symbols"),$=O("string-to-symbol-registry"),ee=O("symbol-to-string-registry"),te=O("wks"),re=i.QObject,ne=!re||!re.prototype||!re.prototype.findChild,ie=s&&f((function(){return 7!=b(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=V(X,t);n&&delete X[t];J(e,t,r);n&&e!==X&&J(X,t,n)}:J,wrap=function(e,t){var r=Q[e]=b(q.prototype);H(r,{type:"Symbol",tag:e,description:t});s||(r.description=t);return r},oe=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof q},ae=function defineProperty(e,t,r){e===X&&ae(Z,t,r);h(e);var n=m(t,!0);h(r);if(l(Q,n)){if(r.enumerable){l(e,j)&&e[j][n]&&(e[j][n]=!1);r=b(r,{enumerable:y(0,!1)})}else{l(e,j)||J(e,j,y(1,{}));e[j][n]=!0}return ie(e,n,r)}return J(e,n,r)},se=function defineProperties(e,t){h(e);var r=v(t),n=x(r).concat(le(r));N(n,(function(t){s&&!ce.call(r,t)||ae(e,t,r[t])}));return e},ce=function propertyIsEnumerable(e){var t=m(e,!0),r=K.call(this,t);return!(this===X&&l(Q,t)&&!l(Z,t))&&(!(r||!l(this,t)||!l(Q,t)||l(this,j)&&this[j][t])||r)},ue=function getOwnPropertyDescriptor(e,t){var r=v(e),n=m(t,!0);if(r!==X||!l(Q,n)||l(Z,n)){var i=V(r,n);!i||!l(Q,n)||l(r,j)&&r[j][n]||(i.enumerable=!0);return i}},fe=function getOwnPropertyNames(e){var t=G(v(e)),r=[];N(t,(function(e){l(Q,e)||l(A,e)||r.push(e)}));return r},le=function getOwnPropertySymbols(e){var t=e===X,r=G(t?Z:v(e)),n=[];N(r,(function(e){!l(Q,e)||t&&!l(X,e)||n.push(Q[e])}));return n};if(!c){I((q=function Symbol(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=R(e),setter=function(e){this===X&&setter.call(Z,e);l(this,j)&&l(this[j],t)&&(this[j][t]=!1);ie(this,t,y(1,e))};s&&ne&&ie(X,t,{configurable:!0,set:setter});return wrap(t,e)}).prototype,"toString",(function toString(){return W(this).tag}));I(q,"withoutSetter",(function(e){return wrap(R(e),e)}));C.f=ce;P.f=ae;T.f=ue;w.f=S.f=fe;_.f=le;D.f=function(e){return wrap(M(e),e)};if(s){J(q.prototype,"description",{configurable:!0,get:function description(){return W(this).description}});a||I(X,"propertyIsEnumerable",ce,{unsafe:!0})}}n({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:q});N(x(te),(function(e){L(e)}));n({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=String(e);if(l($,t))return $[t];var r=q(t);$[t]=r;ee[r]=t;return r},keyFor:function keyFor(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(l(ee,e))return ee[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}});n({target:"Object",stat:!0,forced:!c,sham:!s},{create:function create(e,t){return void 0===t?b(e):se(b(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:ue});n({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:fe,getOwnPropertySymbols:le});n({target:"Object",stat:!0,forced:f((function(){_.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(e){return _.f(g(e))}});if(Y){n({target:"JSON",stat:!0,forced:!c||f((function(){var e=q();return"[null]"!=Y([e])||"{}"!=Y({a:e})||"{}"!=Y(Object(e))}))},{stringify:function stringify(e,t,r){for(var n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);n=t;if((d(t)||void 0!==e)&&!oe(e)){p(t)||(t=function(e,t){"function"==typeof n&&(t=n.call(this,e,t));if(!oe(t))return t});i[1]=t;return Y.apply(null,i)}}})}q.prototype[z]||k(q.prototype,z,q.prototype.valueOf);B(q,"Symbol");A[j]=!0},function(e,t,r){var n=r(13),i=r(40).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function getOwnPropertyNames(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(n(e))}},function(e,t,r){var n=r(53);t.f=n},function(e,t,r){var n=r(39),i=r(19),o=r(148),a=r(23).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,r){r(149)("asyncIterator")},function(e,t,r){"use strict";var n=r(6),i=r(9),o=r(7),a=r(19),s=r(18),c=r(23).f,u=r(36),f=o.Symbol;if(i&&"function"==typeof f&&(!("description"in f.prototype)||void 0!==f().description)){var l={},p=function Symbol(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new f(e):void 0===e?f():f(e);""===e&&(l[t]=!0);return t};u(p,f);var d=p.prototype=f.prototype;d.constructor=p;var h=d.toString,g="Symbol(test)"==String(f("test")),v=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function description(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(l,e))return"";var r=g?t.slice(7,-1):t.replace(v,"$1");return""===r?void 0:r}});n({global:!0,forced:!0},{Symbol:p})}},function(e,t,r){r(149)("hasInstance")},function(e,t,r){r(149)("isConcatSpreadable")},function(e,t,r){r(149)("iterator")},function(e,t,r){r(149)("match")},function(e,t,r){r(149)("matchAll")},function(e,t,r){r(149)("replace")},function(e,t,r){r(149)("search")},function(e,t,r){r(149)("species")},function(e,t,r){r(149)("split")},function(e,t,r){r(149)("toPrimitive")},function(e,t,r){r(149)("toStringTag")},function(e,t,r){r(149)("unscopables")},function(e,t,r){r(81)(Math,"Math",!0)},function(e,t,r){var n=r(7);r(81)(n.JSON,"JSON",!0)},function(e,t,r){r(167);var n=r(57);e.exports=n("String","padStart")},function(e,t,r){"use strict";var n=r(6),i=r(168).start;n({target:"String",proto:!0,forced:r(170)},{padStart:function padStart(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(43),i=r(169),o=r(16),a=Math.ceil,createMethod=function(e){return function(t,r,s){var c,u,f=String(o(t)),l=f.length,p=void 0===s?" ":String(s),d=n(r);if(d<=l||""==p)return f;c=d-l;(u=i.call(p,a(c/p.length))).length>c&&(u=u.slice(0,c));return e?f+u:u+f}};e.exports={start:createMethod(!1),end:createMethod(!0)}},function(e,t,r){"use strict";var n=r(44),i=r(16);e.exports="".repeat||function repeat(e){var t=String(i(this)),r="",o=n(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},function(e,t,r){var n=r(145);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(n)},function(e,t,r){r(172);var n=r(57);e.exports=n("String","padEnd")},function(e,t,r){"use strict";var n=r(6),i=r(168).end;n({target:"String",proto:!0,forced:r(170)},{padEnd:function padEnd(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){r(174);var n=r(39);e.exports=n.Object.values},function(e,t,r){var n=r(6),i=r(175).values;n({target:"Object",stat:!0},{values:function values(e){return i(e)}})},function(e,t,r){var n=r(9),i=r(69),o=r(13),a=r(11).f,createMethod=function(e){return function(t){for(var r,s=o(t),c=i(s),u=c.length,f=0,l=[];u>f;){r=c[f++];n&&!a.call(s,r)||l.push(e?[r,s[r]]:s[r])}return l}};e.exports={entries:createMethod(!0),values:createMethod(!1)}},function(e,t,r){r(177);var n=r(39);e.exports=n.Object.entries},function(e,t,r){var n=r(6),i=r(175).entries;n({target:"Object",stat:!0},{entries:function entries(e){return i(e)}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Jbig2Image=void 0;var n=r(1),i=r(179),o=r(180),a=r(181);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=function(e){!function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}(Jbig2Error,e);var t=_createSuper(Jbig2Error);function Jbig2Error(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Jbig2Error);return t.call(this,"JBIG2 error: ".concat(e))}return Jbig2Error}(n.BaseException),c=function Jbig2ImageClosure(){function ContextCache(){}ContextCache.prototype={getContexts:function getContexts(e){return e in this?this[e]:this[e]=new Int8Array(65536)}};function DecodingContext(e,t,r){this.data=e;this.start=t;this.end=r}DecodingContext.prototype={get decoder(){var e=new o.ArithmeticDecoder(this.data,this.start,this.end);return(0,n.shadow)(this,"decoder",e)},get contextCache(){var e=new ContextCache;return(0,n.shadow)(this,"contextCache",e)}};function decodeInteger(e,t,r){var n=e.getContexts(t),i=1;function readBits(e){for(var t=0,o=0;o<e;o++){var a=r.readBit(n,i);i=i<256?i<<1|a:511&(i<<1|a)|256;t=t<<1|a}return t>>>0}var o=readBits(1),a=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===o?a:a>0?-a:null}function decodeIAID(e,t,r){for(var n=e.getContexts("IAID"),i=1,o=0;o<r;o++){i=i<<1|t.readBit(n,i)}return r<31?i&(1<<r)-1:2147483647&i}var e=["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"],t=[[{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}]],r=[{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}]}],c=[39717,1941,229,405],u=[32,8];function decodeBitmap(e,r,n,i,o,a,s,u){if(e){return decodeMMRBitmap(new Reader(u.data,u.start,u.end),r,n,!1)}if(0===i&&!a&&!o&&4===s.length&&3===s[0].x&&-1===s[0].y&&-3===s[1].x&&-1===s[1].y&&2===s[2].x&&-2===s[2].y&&-2===s[3].x&&-2===s[3].y)return function decodeBitmapTemplate0(e,t,r){var n,i,o,a,s,c,u,f=r.decoder,l=r.contextCache.getContexts("GB"),p=[];for(i=0;i<t;i++){s=p[i]=new Uint8Array(e);c=i<1?s:p[i-1];n=(u=i<2?s:p[i-2])[0]<<13|u[1]<<12|u[2]<<11|c[0]<<7|c[1]<<6|c[2]<<5|c[3]<<4;for(o=0;o<e;o++){s[o]=a=f.readBit(l,n);n=(31735&n)<<1|(o+3<e?u[o+3]<<11:0)|(o+4<e?c[o+4]<<4:0)|a}}return p}(r,n,u);var f=!!a,l=t[i].concat(s);l.sort((function(e,t){return e.y-t.y||e.x-t.x}));var p,d,h=l.length,g=new Int8Array(h),v=new Int8Array(h),m=[],y=0,b=0,x=0,w=0;for(d=0;d<h;d++){g[d]=l[d].x;v[d]=l[d].y;b=Math.min(b,l[d].x);x=Math.max(x,l[d].x);w=Math.min(w,l[d].y);d<h-1&&l[d].y===l[d+1].y&&l[d].x===l[d+1].x-1?y|=1<<h-1-d:m.push(d)}var S=m.length,_=new Int8Array(S),T=new Int8Array(S),P=new Uint16Array(S);for(p=0;p<S;p++){d=m[p];_[p]=l[d].x;T[p]=l[d].y;P[p]=1<<h-1-d}for(var C,k,I,O,E,A=-b,R=-w,M=r-x,D=c[i],L=new Uint8Array(r),B=[],U=u.decoder,N=u.contextCache.getContexts("GB"),j=0,z=0,H=0;H<n;H++){if(o){if(j^=U.readBit(N,D)){B.push(L);continue}}L=new Uint8Array(L);B.push(L);for(C=0;C<r;C++)if(f&&a[H][C])L[C]=0;else{if(C>=A&&C<M&&H>=R){z=z<<1&y;for(d=0;d<S;d++){k=H+T[d];I=C+_[d];(O=B[k][I])&&(z|=O=P[d])}}else{z=0;E=h-1;for(d=0;d<h;d++,E--)(I=C+g[d])>=0&&I<r&&(k=H+v[d])>=0&&(O=B[k][I])&&(z|=O<<E)}var W=U.readBit(N,z);L[C]=W}}return B}function decodeRefinement(e,t,n,i,o,a,c,f,l){var p=r[n].coding;0===n&&(p=p.concat([f[0]]));var d,h=p.length,g=new Int32Array(h),v=new Int32Array(h);for(d=0;d<h;d++){g[d]=p[d].x;v[d]=p[d].y}var m=r[n].reference;0===n&&(m=m.concat([f[1]]));var y=m.length,b=new Int32Array(y),x=new Int32Array(y);for(d=0;d<y;d++){b[d]=m[d].x;x[d]=m[d].y}for(var w=i[0].length,S=i.length,_=u[n],T=[],P=l.decoder,C=l.contextCache.getContexts("GR"),k=0,I=0;I<t;I++){if(c){if(k^=P.readBit(C,_))throw new s("prediction is not supported")}var O=new Uint8Array(e);T.push(O);for(var E=0;E<e;E++){var A,R,M=0;for(d=0;d<h;d++){A=I+v[d];R=E+g[d];A<0||R<0||R>=e?M<<=1:M=M<<1|T[A][R]}for(d=0;d<y;d++){A=I+x[d]-a;R=E+b[d]-o;A<0||A>=S||R<0||R>=w?M<<=1:M=M<<1|i[A][R]}var D=P.readBit(C,M);O[E]=D}}return T}function decodeTextRegion(e,t,r,n,i,o,a,c,u,f,l,p,d,h,g,v,m,y,b){if(e&&t)throw new s("refinement with Huffman is not supported");var x,w,S=[];for(x=0;x<n;x++){w=new Uint8Array(r);if(i)for(var _=0;_<r;_++)w[_]=i;S.push(w)}var T=m.decoder,P=m.contextCache,C=e?-h.tableDeltaT.decode(b):-decodeInteger(P,"IADT",T),k=0;x=0;for(;x<o;){C+=e?h.tableDeltaT.decode(b):decodeInteger(P,"IADT",T);for(var I=k+=e?h.tableFirstS.decode(b):decodeInteger(P,"IAFS",T);;){var O=0;a>1&&(O=e?b.readBits(y):decodeInteger(P,"IAIT",T));var E=a*C+O,A=e?h.symbolIDTable.decode(b):decodeIAID(P,T,u),R=t&&(e?b.readBit():decodeInteger(P,"IARI",T)),M=c[A],D=M[0].length,L=M.length;if(R){var B=decodeInteger(P,"IARDW",T),U=decodeInteger(P,"IARDH",T);M=decodeRefinement(D+=B,L+=U,g,M,(B>>1)+decodeInteger(P,"IARDX",T),(U>>1)+decodeInteger(P,"IARDY",T),!1,v,m)}var N,j,z,H=E-(1&p?0:L-1),W=I-(2&p?D-1:0);if(f){for(N=0;N<L;N++)if(w=S[W+N]){z=M[N];var X=Math.min(r-H,D);switch(d){case 0:for(j=0;j<X;j++)w[H+j]|=z[j];break;case 2:for(j=0;j<X;j++)w[H+j]^=z[j];break;default:throw new s("operator ".concat(d," is not supported"))}}I+=L-1}else{for(j=0;j<L;j++)if(w=S[H+j]){z=M[j];switch(d){case 0:for(N=0;N<D;N++)w[W+N]|=z[N];break;case 2:for(N=0;N<D;N++)w[W+N]^=z[N];break;default:throw new s("operator ".concat(d," is not supported"))}}I+=D-1}x++;var q=e?h.tableDeltaS.decode(b):decodeInteger(P,"IADS",T);if(null===q)break;I+=q+l}}return S}function readSegmentHeader(t,r){var n={};n.number=(0,i.readUint32)(t,r);var o=t[r+4],a=63&o;if(!e[a])throw new s("invalid segment type: "+a);n.type=a;n.typeName=e[a];n.deferredNonRetain=!!(128&o);var c=!!(64&o),u=t[r+5],l=u>>5&7,p=[31&u],d=r+6;if(7===u){l=536870911&(0,i.readUint32)(t,d-1);d+=3;var h=l+7>>3;p[0]=t[d++];for(;--h>0;)p.push(t[d++])}else if(5===u||6===u)throw new s("invalid referred-to flags");n.retainBits=p;var g=4;n.number<=256?g=1:n.number<=65536&&(g=2);var v,m,y=[];for(v=0;v<l;v++){var b=void 0;b=1===g?t[d]:2===g?(0,i.readUint16)(t,d):(0,i.readUint32)(t,d);y.push(b);d+=g}n.referredTo=y;if(c){n.pageAssociation=(0,i.readUint32)(t,d);d+=4}else n.pageAssociation=t[d++];n.length=(0,i.readUint32)(t,d);d+=4;if(4294967295===n.length){if(38!==a)throw new s("invalid unknown segment length");var x=readRegionSegmentInformation(t,d),w=!!(1&t[d+f]),S=new Uint8Array(6);if(!w){S[0]=255;S[1]=172}S[2]=x.height>>>24&255;S[3]=x.height>>16&255;S[4]=x.height>>8&255;S[5]=255&x.height;for(v=d,m=t.length;v<m;v++){for(var _=0;_<6&&S[_]===t[v+_];)_++;if(6===_){n.length=v+6;break}}if(4294967295===n.length)throw new s("segment end was not found")}n.headerEnd=d;return n}function readSegments(e,t,r,n){for(var i=[],o=r;o<n;){var a=readSegmentHeader(t,o);o=a.headerEnd;var s={header:a,data:t};if(!e.randomAccess){s.start=o;o+=a.length;s.end=o}i.push(s);if(51===a.type)break}if(e.randomAccess)for(var c=0,u=i.length;c<u;c++){i[c].start=o;o+=i[c].header.length;i[c].end=o}return i}function readRegionSegmentInformation(e,t){return{width:(0,i.readUint32)(e,t),height:(0,i.readUint32)(e,t+4),x:(0,i.readUint32)(e,t+8),y:(0,i.readUint32)(e,t+12),combinationOperator:7&e[t+16]}}var f=17;function processSegment(e,t){var r,n,o,a,c=e.header,u=e.data,l=e.start,p=e.end;switch(c.type){case 0:var d={},h=(0,i.readUint16)(u,l);d.huffman=!!(1&h);d.refinement=!!(2&h);d.huffmanDHSelector=h>>2&3;d.huffmanDWSelector=h>>4&3;d.bitmapSizeSelector=h>>6&1;d.aggregationInstancesSelector=h>>7&1;d.bitmapCodingContextUsed=!!(256&h);d.bitmapCodingContextRetained=!!(512&h);d.template=h>>10&3;d.refinementTemplate=h>>12&1;l+=2;if(!d.huffman){a=0===d.template?4:1;n=[];for(o=0;o<a;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}d.at=n}if(d.refinement&&!d.refinementTemplate){n=[];for(o=0;o<2;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}d.refinementAt=n}d.numberOfExportedSymbols=(0,i.readUint32)(u,l);l+=4;d.numberOfNewSymbols=(0,i.readUint32)(u,l);l+=4;r=[d,c.number,c.referredTo,u,l,p];break;case 6:case 7:var g={};g.info=readRegionSegmentInformation(u,l);l+=f;var v=(0,i.readUint16)(u,l);l+=2;g.huffman=!!(1&v);g.refinement=!!(2&v);g.logStripSize=v>>2&3;g.stripSize=1<<g.logStripSize;g.referenceCorner=v>>4&3;g.transposed=!!(64&v);g.combinationOperator=v>>7&3;g.defaultPixelValue=v>>9&1;g.dsOffset=v<<17>>27;g.refinementTemplate=v>>15&1;if(g.huffman){var m=(0,i.readUint16)(u,l);l+=2;g.huffmanFS=3&m;g.huffmanDS=m>>2&3;g.huffmanDT=m>>4&3;g.huffmanRefinementDW=m>>6&3;g.huffmanRefinementDH=m>>8&3;g.huffmanRefinementDX=m>>10&3;g.huffmanRefinementDY=m>>12&3;g.huffmanRefinementSizeSelector=!!(16384&m)}if(g.refinement&&!g.refinementTemplate){n=[];for(o=0;o<2;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}g.refinementAt=n}g.numberOfSymbolInstances=(0,i.readUint32)(u,l);l+=4;r=[g,c.referredTo,u,l,p];break;case 16:var y={},b=u[l++];y.mmr=!!(1&b);y.template=b>>1&3;y.patternWidth=u[l++];y.patternHeight=u[l++];y.maxPatternIndex=(0,i.readUint32)(u,l);l+=4;r=[y,c.number,u,l,p];break;case 22:case 23:var x={};x.info=readRegionSegmentInformation(u,l);l+=f;var w=u[l++];x.mmr=!!(1&w);x.template=w>>1&3;x.enableSkip=!!(8&w);x.combinationOperator=w>>4&7;x.defaultPixelValue=w>>7&1;x.gridWidth=(0,i.readUint32)(u,l);l+=4;x.gridHeight=(0,i.readUint32)(u,l);l+=4;x.gridOffsetX=4294967295&(0,i.readUint32)(u,l);l+=4;x.gridOffsetY=4294967295&(0,i.readUint32)(u,l);l+=4;x.gridVectorX=(0,i.readUint16)(u,l);l+=2;x.gridVectorY=(0,i.readUint16)(u,l);l+=2;r=[x,c.referredTo,u,l,p];break;case 38:case 39:var S={};S.info=readRegionSegmentInformation(u,l);l+=f;var _=u[l++];S.mmr=!!(1&_);S.template=_>>1&3;S.prediction=!!(8&_);if(!S.mmr){a=0===S.template?4:1;n=[];for(o=0;o<a;o++){n.push({x:(0,i.readInt8)(u,l),y:(0,i.readInt8)(u,l+1)});l+=2}S.at=n}r=[S,u,l,p];break;case 48:var T={width:(0,i.readUint32)(u,l),height:(0,i.readUint32)(u,l+4),resolutionX:(0,i.readUint32)(u,l+8),resolutionY:(0,i.readUint32)(u,l+12)};4294967295===T.height&&delete T.height;var P=u[l+16];(0,i.readUint16)(u,l+17);T.lossless=!!(1&P);T.refinement=!!(2&P);T.defaultPixelValue=P>>2&1;T.combinationOperator=P>>3&3;T.requiresBuffer=!!(32&P);T.combinationOperatorOverride=!!(64&P);r=[T];break;case 49:case 50:case 51:break;case 53:r=[c.number,u,l,p];break;case 62:break;default:throw new s("segment type ".concat(c.typeName,"(").concat(c.type,")")+" is not implemented")}var C="on"+c.typeName;C in t&&t[C].apply(t,r)}function processSegments(e,t){for(var r=0,n=e.length;r<n;r++)processSegment(e[r],t)}function SimpleSegmentVisitor(){}SimpleSegmentVisitor.prototype={onPageInformation:function SimpleSegmentVisitor_onPageInformation(e){this.currentPageInfo=e;var t=e.width+7>>3,r=new Uint8ClampedArray(t*e.height);if(e.defaultPixelValue)for(var n=0,i=r.length;n<i;n++)r[n]=255;this.buffer=r},drawBitmap:function SimpleSegmentVisitor_drawBitmap(e,t){var r,n,i,o,a=this.currentPageInfo,c=e.width,u=e.height,f=a.width+7>>3,l=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,p=this.buffer,d=128>>(7&e.x),h=e.y*f+(e.x>>3);switch(l){case 0:for(r=0;r<u;r++){i=d;o=h;for(n=0;n<c;n++){t[r][n]&&(p[o]|=i);if(!(i>>=1)){i=128;o++}}h+=f}break;case 2:for(r=0;r<u;r++){i=d;o=h;for(n=0;n<c;n++){t[r][n]&&(p[o]^=i);if(!(i>>=1)){i=128;o++}}h+=f}break;default:throw new s("operator ".concat(l," is not supported"))}},onImmediateGenericRegion:function SimpleSegmentVisitor_onImmediateGenericRegion(e,t,r,n){var i=e.info,o=new DecodingContext(t,r,n),a=decodeBitmap(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,o);this.drawBitmap(i,a)},onImmediateLosslessGenericRegion:function SimpleSegmentVisitor_onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function SimpleSegmentVisitor_onSymbolDictionary(e,t,r,n,o,a){var c,u;if(e.huffman){c=function getSymbolDictionaryHuffmanTables(e,t,r){var n,i,o,a,c=0;switch(e.huffmanDHSelector){case 0:case 1:n=getStandardTable(e.huffmanDHSelector+4);break;case 3:n=getCustomHuffmanTable(c,t,r);c++;break;default:throw new s("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:i=getStandardTable(e.huffmanDWSelector+2);break;case 3:i=getCustomHuffmanTable(c,t,r);c++;break;default:throw new s("invalid Huffman DW selector")}if(e.bitmapSizeSelector){o=getCustomHuffmanTable(c,t,r);c++}else o=getStandardTable(1);a=e.aggregationInstancesSelector?getCustomHuffmanTable(c,t,r):getStandardTable(1);return{tableDeltaHeight:n,tableDeltaWidth:i,tableBitmapSize:o,tableAggregateInstances:a}}(e,r,this.customTables);u=new Reader(n,o,a)}var f=this.symbols;f||(this.symbols=f={});for(var l=[],p=0,d=r.length;p<d;p++){var h=f[r[p]];h&&(l=l.concat(h))}var g=new DecodingContext(n,o,a);f[t]=function decodeSymbolDictionary(e,t,r,n,o,a,c,u,f,l,p,d){if(e&&t)throw new s("symbol refinement with Huffman is not supported");var h,g,v=[],m=0,y=(0,i.log2)(r.length+n),b=p.decoder,x=p.contextCache;if(e){h=getStandardTable(1);g=[];y=Math.max(y,1)}for(;v.length<n;){m+=e?a.tableDeltaHeight.decode(d):decodeInteger(x,"IADH",b);for(var w=0,S=0,_=e?g.length:0;;){var T,P=e?a.tableDeltaWidth.decode(d):decodeInteger(x,"IADW",b);if(null===P)break;S+=w+=P;if(t){var C=decodeInteger(x,"IAAI",b);if(C>1)T=decodeTextRegion(e,t,w,m,0,C,1,r.concat(v),y,0,0,1,0,a,f,l,p,0,d);else{var k=decodeIAID(x,b,y),I=decodeInteger(x,"IARDX",b),O=decodeInteger(x,"IARDY",b);T=decodeRefinement(w,m,f,k<r.length?r[k]:v[k-r.length],I,O,!1,l,p)}v.push(T)}else if(e)g.push(w);else{T=decodeBitmap(!1,w,m,c,!1,null,u,p);v.push(T)}}if(e&&!t){var E=a.tableBitmapSize.decode(d);d.byteAlign();var A=void 0;if(0===E)A=readUncompressedBitmap(d,S,m);else{var R=d.end,M=d.position+E;d.end=M;A=decodeMMRBitmap(d,S,m,!1);d.end=R;d.position=M}var D=g.length;if(_===D-1)v.push(A);else{var L=void 0,B=void 0,U=0,N=void 0,j=void 0;for(L=_;L<D;L++){N=U+g[L];j=[];for(B=0;B<m;B++)j.push(A[B].subarray(U,N));v.push(j);U=N}}}}for(var z=[],H=[],W=!1,X=r.length+n;H.length<X;){for(var q=e?h.decode(d):decodeInteger(x,"IAEX",b);q--;)H.push(W);W=!W}for(var Y=0,V=r.length;Y<V;Y++)H[Y]&&z.push(r[Y]);for(var J=0;J<n;Y++,J++)H[Y]&&z.push(v[J]);return z}(e.huffman,e.refinement,l,e.numberOfNewSymbols,e.numberOfExportedSymbols,c,e.template,e.at,e.refinementTemplate,e.refinementAt,g,u)},onImmediateTextRegion:function SimpleSegmentVisitor_onImmediateTextRegion(e,t,r,n,o){for(var a,c,u=e.info,f=this.symbols,l=[],p=0,d=t.length;p<d;p++){var h=f[t[p]];h&&(l=l.concat(h))}var g=(0,i.log2)(l.length);if(e.huffman){c=new Reader(r,n,o);a=function getTextRegionHuffmanTables(e,t,r,n,i){for(var o=[],a=0;a<=34;a++){var c=i.readBits(4);o.push(new HuffmanLine([a,c,0,0]))}var u=new HuffmanTable(o,!1);o.length=0;for(var f=0;f<n;){var l=u.decode(i);if(l>=32){var p=void 0,d=void 0,h=void 0;switch(l){case 32:if(0===f)throw new s("no previous value in symbol ID table");d=i.readBits(2)+3;p=o[f-1].prefixLength;break;case 33:d=i.readBits(3)+3;p=0;break;case 34:d=i.readBits(7)+11;p=0;break;default:throw new s("invalid code length in symbol ID table")}for(h=0;h<d;h++){o.push(new HuffmanLine([f,p,0,0]));f++}}else{o.push(new HuffmanLine([f,l,0,0]));f++}}i.byteAlign();var g,v,m,y=new HuffmanTable(o,!1),b=0;switch(e.huffmanFS){case 0:case 1:g=getStandardTable(e.huffmanFS+6);break;case 3:g=getCustomHuffmanTable(b,t,r);b++;break;default:throw new s("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:v=getStandardTable(e.huffmanDS+8);break;case 3:v=getCustomHuffmanTable(b,t,r);b++;break;default:throw new s("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:m=getStandardTable(e.huffmanDT+11);break;case 3:m=getCustomHuffmanTable(b,t,r);b++;break;default:throw new s("invalid Huffman DT selector")}if(e.refinement)throw new s("refinement with Huffman is not supported");return{symbolIDTable:y,tableFirstS:g,tableDeltaS:v,tableDeltaT:m}}(e,t,this.customTables,l.length,c)}var v=new DecodingContext(r,n,o),m=decodeTextRegion(e.huffman,e.refinement,u.width,u.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,l,g,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,a,e.refinementTemplate,e.refinementAt,v,e.logStripSize,c);this.drawBitmap(u,m)},onImmediateLosslessTextRegion:function SimpleSegmentVisitor_onImmediateLosslessTextRegion(){this.onImmediateTextRegion.apply(this,arguments)},onPatternDictionary:function onPatternDictionary(e,t,r,n,i){var o=this.patterns;o||(this.patterns=o={});var a=new DecodingContext(r,n,i);o[t]=function decodePatternDictionary(e,t,r,n,i,o){var a=[];if(!e){a.push({x:-t,y:0});if(0===i){a.push({x:-3,y:-1});a.push({x:2,y:-2});a.push({x:-2,y:-2})}}for(var s=decodeBitmap(e,(n+1)*t,r,i,!1,null,a,o),c=[],u=0;u<=n;u++){for(var f=[],l=t*u,p=l+t,d=0;d<r;d++)f.push(s[d].subarray(l,p));c.push(f)}return c}(e.mmr,e.patternWidth,e.patternHeight,e.maxPatternIndex,e.template,a)},onImmediateHalftoneRegion:function onImmediateHalftoneRegion(e,t,r,n,o){var a=this.patterns[t[0]],c=e.info,u=new DecodingContext(r,n,o),f=function decodeHalftoneRegion(e,t,r,n,o,a,c,u,f,l,p,d,h,g,v){if(c)throw new s("skip is not supported");if(0!==u)throw new s("operator "+u+" is not supported in halftone region");var m,y,b,x=[];for(m=0;m<o;m++){b=new Uint8Array(n);if(a)for(y=0;y<n;y++)b[y]=a;x.push(b)}var w=t.length,S=t[0],_=S[0].length,T=S.length,P=(0,i.log2)(w),C=[];if(!e){C.push({x:r<=1?3:2,y:-1});if(0===r){C.push({x:-3,y:-1});C.push({x:2,y:-2});C.push({x:-2,y:-2})}}var k,I,O,E,A,R,M,D,L,B,U,N=[];e&&(k=new Reader(v.data,v.start,v.end));for(m=P-1;m>=0;m--){I=e?decodeMMRBitmap(k,f,l,!0):decodeBitmap(!1,f,l,r,!1,null,C,v);N[m]=I}for(O=0;O<l;O++)for(E=0;E<f;E++){A=0;R=0;for(y=P-1;y>=0;y--)R|=(A=N[y][O][E]^A)<<y;M=t[R];L=d+O*h-E*g>>8;if((D=p+O*g+E*h>>8)>=0&&D+_<=n&&L>=0&&L+T<=o)for(m=0;m<T;m++){U=x[L+m];B=M[m];for(y=0;y<_;y++)U[D+y]|=B[y]}else{var j=void 0,z=void 0;for(m=0;m<T;m++)if(!((z=L+m)<0||z>=o)){U=x[z];B=M[m];for(y=0;y<_;y++)(j=D+y)>=0&&j<n&&(U[j]|=B[y])}}}return x}(e.mmr,a,e.template,c.width,c.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,u);this.drawBitmap(c,f)},onImmediateLosslessHalftoneRegion:function onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion.apply(this,arguments)},onTables:function onTables(e,t,r,n){var o=this.customTables;o||(this.customTables=o={});o[e]=function decodeTablesSegment(e,t,r){var n,o,a=e[t],s=4294967295&(0,i.readUint32)(e,t+1),c=4294967295&(0,i.readUint32)(e,t+5),u=new Reader(e,t+9,r),f=1+(a>>1&7),l=1+(a>>4&7),p=[],d=s;do{n=u.readBits(f);o=u.readBits(l);p.push(new HuffmanLine([d,n,o,0]));d+=1<<o}while(d<c);n=u.readBits(f);p.push(new HuffmanLine([s-1,n,32,0,"lower"]));n=u.readBits(f);p.push(new HuffmanLine([c,n,32,0]));if(1&a){n=u.readBits(f);p.push(new HuffmanLine([n,0]))}return new HuffmanTable(p,!1)}(t,r,n)}};function HuffmanLine(e){if(2===e.length){this.isOOB=!0;this.rangeLow=0;this.prefixLength=e[0];this.rangeLength=0;this.prefixCode=e[1];this.isLowerRange=!1}else{this.isOOB=!1;this.rangeLow=e[0];this.prefixLength=e[1];this.rangeLength=e[2];this.prefixCode=e[3];this.isLowerRange="lower"===e[4]}}function HuffmanTreeNode(e){this.children=[];if(e){this.isLeaf=!0;this.rangeLength=e.rangeLength;this.rangeLow=e.rangeLow;this.isLowerRange=e.isLowerRange;this.isOOB=e.isOOB}else this.isLeaf=!1}HuffmanTreeNode.prototype={buildTree:function buildTree(e,t){var r=e.prefixCode>>t&1;if(t<=0)this.children[r]=new HuffmanTreeNode(e);else{var n=this.children[r];n||(this.children[r]=n=new HuffmanTreeNode(null));n.buildTree(e,t-1)}},decodeNode:function decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;var t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}var r=this.children[e.readBit()];if(!r)throw new s("invalid Huffman data");return r.decodeNode(e)}};function HuffmanTable(e,t){t||this.assignPrefixCodes(e);this.rootNode=new HuffmanTreeNode(null);for(var r=0,n=e.length;r<n;r++){var i=e[r];i.prefixLength>0&&this.rootNode.buildTree(i,i.prefixLength-1)}}HuffmanTable.prototype={decode:function decode(e){return this.rootNode.decodeNode(e)},assignPrefixCodes:function assignPrefixCodes(e){for(var t=e.length,r=0,n=0;n<t;n++)r=Math.max(r,e[n].prefixLength);for(var i=new Uint32Array(r+1),o=0;o<t;o++)i[e[o].prefixLength]++;var a,s,c,u=1,f=0;i[0]=0;for(;u<=r;){a=f=f+i[u-1]<<1;s=0;for(;s<t;){if((c=e[s]).prefixLength===u){c.prefixCode=a;a++}s++}u++}}};var l={};function getStandardTable(e){var t,r=l[e];if(r)return r;switch(e){case 1:t=[[0,1,4,0],[16,2,8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28],[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new s("standard table B.".concat(e," does not exist"))}for(var n=0,i=t.length;n<i;n++)t[n]=new HuffmanLine(t[n]);r=new HuffmanTable(t,!0);l[e]=r;return r}function Reader(e,t,r){this.data=e;this.start=t;this.end=r;this.position=t;this.shift=-1;this.currentByte=0}Reader.prototype={readBit:function readBit(){if(this.shift<0){if(this.position>=this.end)throw new s("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}var e=this.currentByte>>this.shift&1;this.shift--;return e},readBits:function readBits(e){var t,r=0;for(t=e-1;t>=0;t--)r|=this.readBit()<<t;return r},byteAlign:function byteAlign(){this.shift=-1},next:function next(){return this.position>=this.end?-1:this.data[this.position++]}};function getCustomHuffmanTable(e,t,r){for(var n=0,i=0,o=t.length;i<o;i++){var a=r[t[i]];if(a){if(e===n)return a;n++}}throw new s("can't find custom Huffman table")}function readUncompressedBitmap(e,t,r){for(var n=[],i=0;i<r;i++){var o=new Uint8Array(t);n.push(o);for(var a=0;a<t;a++)o[a]=e.readBit();e.byteAlign()}return n}function decodeMMRBitmap(e,t,r,n){for(var i,o={K:-1,Columns:t,Rows:r,BlackIs1:!0,EndOfBlock:n},s=new a.CCITTFaxDecoder(e,o),c=[],u=!1,f=0;f<r;f++){var l=new Uint8Array(t);c.push(l);for(var p=-1,d=0;d<t;d++){if(p<0){if(-1===(i=s.readNextChar())){i=0;u=!0}p=7}l[d]=i>>p&1;p--}}if(n&&!u)for(var h=0;h<5&&-1!==s.readNextChar();h++);return c}function Jbig2Image(){}Jbig2Image.prototype={parseChunks:function parseChunks(e){return function parseJbig2Chunks(e){for(var t=new SimpleSegmentVisitor,r=0,n=e.length;r<n;r++){var i=e[r];processSegments(readSegments({},i.data,i.start,i.end),t)}return t.buffer}(e)},parse:function parse(e){var t=function parseJbig2(e){var t=e.length,r=0;if(151!==e[r]||74!==e[r+1]||66!==e[r+2]||50!==e[r+3]||13!==e[r+4]||10!==e[r+5]||26!==e[r+6]||10!==e[r+7])throw new s("parseJbig2 - invalid header.");var n=Object.create(null);r+=8;var o=e[r++];n.randomAccess=!(1&o);if(!(2&o)){n.numberOfPages=(0,i.readUint32)(e,r);r+=4}var a=readSegments(n,e,r,t),c=new SimpleSegmentVisitor;processSegments(a,c);for(var u=c.currentPageInfo,f=u.width,l=u.height,p=c.buffer,d=new Uint8ClampedArray(f*l),h=0,g=0,v=0;v<l;v++)for(var m=0,y=void 0,b=0;b<f;b++){if(!m){m=128;y=p[g++]}d[h++]=y&m?0:255;m>>=1}return{imgData:d,width:f,height:l}}(e),r=t.imgData,n=t.width,o=t.height;this.width=n;this.height=o;return r}};return Jbig2Image}();t.Jbig2Image=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getLookupTableFactory=function getLookupTableFactory(e){var t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}};t.getInheritableProperty=function getInheritableProperty(e){var t,r=e.dict,i=e.key,o=e.getArray,a=void 0!==o&&o,s=e.stopWhenFound,c=void 0===s||s,u=0;for(;r;){var f=a?r.getArray(i):r.get(i);if(void 0!==f){if(c)return f;t||(t=[]);t.push(f)}if(++u>100){(0,n.warn)('getInheritableProperty: maximum loop count exceeded for "'.concat(i,'"'));break}r=r.get("Parent")}return t};t.toRomanNumerals=function toRomanNumerals(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,n.assert)(Number.isInteger(e)&&e>0,"The number should be a positive integer.");var r,i=[];for(;e>=1e3;){e-=1e3;i.push("M")}r=e/100|0;e%=100;i.push(s[r]);r=e/10|0;e%=10;i.push(s[10+r]);i.push(s[20+e]);var o=i.join("");return t?o.toLowerCase():o};t.log2=function log2(e){if(e<=0)return 0;return Math.ceil(Math.log2(e))};t.readInt8=function readInt8(e,t){return e[t]<<24>>24};t.readUint16=function readUint16(e,t){return e[t]<<8|e[t+1]};t.readUint32=function readUint32(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0};t.isWhiteSpace=function isWhiteSpace(e){return 32===e||9===e||13===e||10===e};t.XRefParseException=t.XRefEntryException=t.MissingDataException=void 0;var n=r(1);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var i=function(e){_inherits(MissingDataException,e);var t=_createSuper(MissingDataException);function MissingDataException(e,r){var n;_classCallCheck(this,MissingDataException);(n=t.call(this,"Missing data [".concat(e,", ").concat(r,")"))).begin=e;n.end=r;return n}return MissingDataException}(n.BaseException);t.MissingDataException=i;var o=function(e){_inherits(XRefEntryException,e);var t=_createSuper(XRefEntryException);function XRefEntryException(){_classCallCheck(this,XRefEntryException);return t.apply(this,arguments)}return XRefEntryException}(n.BaseException);t.XRefEntryException=o;var a=function(e){_inherits(XRefParseException,e);var t=_createSuper(XRefParseException);function XRefParseException(){_classCallCheck(this,XRefParseException);return t.apply(this,arguments)}return XRefParseException}(n.BaseException);t.XRefParseException=a;var s=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ArithmeticDecoder=void 0;function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Object.defineProperty(e,n.key,n)}}var n=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}],i=function(){function ArithmeticDecoder(e,t,r){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,ArithmeticDecoder);this.data=e;this.bp=t;this.dataEnd=r;this.chigh=e[t];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}!function _createClass(e,t,r){t&&_defineProperties(e.prototype,t);r&&_defineProperties(e,r);return e}(ArithmeticDecoder,[{key:"byteIn",value:function byteIn(){var e=this.data,t=this.bp;if(255===e[t])if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this.clow+=e[t]<<9;this.ct=7;this.bp=t}else{t++;this.clow+=t<this.dataEnd?e[t]<<8:65280;this.ct=8;this.bp=t}if(this.clow>65535){this.chigh+=this.clow>>16;this.clow&=65535}}},{key:"readBit",value:function readBit(e,t){var r,i=e[t]>>1,o=1&e[t],a=n[i],s=a.qe,c=this.a-s;if(this.chigh<s)if(c<s){c=s;r=o;i=a.nmps}else{c=s;r=1^o;1===a.switchFlag&&(o=r);i=a.nlps}else{this.chigh-=s;if(0!=(32768&c)){this.a=c;return o}if(c<s){r=1^o;1===a.switchFlag&&(o=r);i=a.nlps}else{r=o;i=a.nmps}}do{0===this.ct&&this.byteIn();c<<=1;this.chigh=this.chigh<<1&65535|this.clow>>15&1;this.clow=this.clow<<1&65535;this.ct--}while(0==(32768&c));this.a=c;e[t]=i<<1|o;return r}}]);return ArithmeticDecoder}();t.ArithmeticDecoder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.CCITTFaxDecoder=void 0;var n=r(1),i=function CCITTFaxDecoder(){var e=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],t=[[-1,-1],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],i=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],o=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],a=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];function CCITTFaxDecoder(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"function"!=typeof e.next)throw new Error('CCITTFaxDecoder - invalid "source" parameter.');this.source=e;this.eof=!1;this.encoding=t.K||0;this.eoline=t.EndOfLine||!1;this.byteAlign=t.EncodedByteAlign||!1;this.columns=t.Columns||1728;this.rows=t.Rows||0;var r,n=t.EndOfBlock;null==n&&(n=!0);this.eoblock=n;this.black=t.BlackIs1||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;for(;0===(r=this._lookBits(12));)this._eatBits(1);1===r&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}CCITTFaxDecoder.prototype={readNextChar:function readNextChar(){if(this.eof)return-1;var e,t,r,i,o,a=this.refLine,s=this.codingLine,c=this.columns;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;var u,f,l;if(this.nextLine2D){for(i=0;s[i]<c;++i)a[i]=s[i];a[i++]=c;a[i]=c;s[0]=0;this.codingPos=0;e=0;t=0;for(;s[this.codingPos]<c;)switch(u=this._getTwoDimCode()){case 0:this._addPixels(a[e+1],t);a[e+1]<c&&(e+=2);break;case 1:u=f=0;if(t){do{u+=l=this._getBlackCode()}while(l>=64);do{f+=l=this._getWhiteCode()}while(l>=64)}else{do{u+=l=this._getWhiteCode()}while(l>=64);do{f+=l=this._getBlackCode()}while(l>=64)}this._addPixels(s[this.codingPos]+u,t);s[this.codingPos]<c&&this._addPixels(s[this.codingPos]+f,1^t);for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2;break;case 7:this._addPixels(a[e]+3,t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 5:this._addPixels(a[e]+2,t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 3:this._addPixels(a[e]+1,t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 2:this._addPixels(a[e],t);t^=1;if(s[this.codingPos]<c){++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 8:this._addPixelsNeg(a[e]-3,t);t^=1;if(s[this.codingPos]<c){e>0?--e:++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 6:this._addPixelsNeg(a[e]-2,t);t^=1;if(s[this.codingPos]<c){e>0?--e:++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case 4:this._addPixelsNeg(a[e]-1,t);t^=1;if(s[this.codingPos]<c){e>0?--e:++e;for(;a[e]<=s[this.codingPos]&&a[e]<c;)e+=2}break;case-1:this._addPixels(c,0);this.eof=!0;break;default:(0,n.info)("bad 2d code");this._addPixels(c,0);this.err=!0}}else{s[0]=0;this.codingPos=0;t=0;for(;s[this.codingPos]<c;){u=0;if(t)do{u+=l=this._getBlackCode()}while(l>=64);else do{u+=l=this._getWhiteCode()}while(l>=64);this._addPixels(s[this.codingPos]+u,t);t^=1}}var p=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){u=this._lookBits(12);if(this.eoline)for(;-1!==u&&1!==u;){this._eatBits(1);u=this._lookBits(12)}else for(;0===u;){this._eatBits(1);u=this._lookBits(12)}if(1===u){this._eatBits(12);p=!0}else-1===u&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&p&&this.byteAlign){if(1===(u=this._lookBits(12))){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(i=0;i<4;++i){1!==(u=this._lookBits(12))&&(0,n.info)("bad rtc code: "+u);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(-1===(u=this._lookBits(13))){this.eof=!0;return-1}if(u>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&u)}}s[0]>0?this.outputBits=s[this.codingPos=0]:this.outputBits=s[this.codingPos=1];this.row++}if(this.outputBits>=8){o=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&s[this.codingPos]<c){this.codingPos++;this.outputBits=s[this.codingPos]-s[this.codingPos-1]}}else{r=8;o=0;do{if(this.outputBits>r){o<<=r;1&this.codingPos||(o|=255>>8-r);this.outputBits-=r;r=0}else{o<<=this.outputBits;1&this.codingPos||(o|=255>>8-this.outputBits);r-=this.outputBits;this.outputBits=0;if(s[this.codingPos]<c){this.codingPos++;this.outputBits=s[this.codingPos]-s[this.codingPos-1]}else if(r>0){o<<=r;r=0}}}while(r)}this.black&&(o^=255);return o},_addPixels:function _addPixels(e,t){var r=this.codingLine,i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,n.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}this.codingPos=i},_addPixelsNeg:function _addPixelsNeg(e,t){var r=this.codingLine,i=this.codingPos;if(e>r[i]){if(e>this.columns){(0,n.info)("row is wrong length");this.err=!0;e=this.columns}1&i^t&&++i;r[i]=e}else if(e<r[i]){if(e<0){(0,n.info)("invalid code");this.err=!0;e=0}for(;i>0&&e<r[i-1];)--i;r[i]=e}this.codingPos=i},_findTableCode:function _findTableCode(e,t,r,n){for(var i=n||0,o=e;o<=t;++o){var a=this._lookBits(o);if(-1===a)return[!0,1,!1];o<t&&(a<<=t-o);if(!i||a>=i){var s=r[a-i];if(s[0]===o){this._eatBits(o);return[!0,s[1],!0]}}}return[!1,0,!1]},_getTwoDimCode:function _getTwoDimCode(){var t,r=0;if(this.eoblock){r=this._lookBits(7);if((t=e[r])&&t[0]>0){this._eatBits(t[0]);return t[1]}}else{var i=this._findTableCode(1,7,e);if(i[0]&&i[2])return i[1]}(0,n.info)("Bad two dim code");return-1},_getWhiteCode:function _getWhiteCode(){var e,i=0;if(this.eoblock){if(-1===(i=this._lookBits(12)))return 1;if((e=i>>5==0?t[i]:r[i>>3])[0]>0){this._eatBits(e[0]);return e[1]}}else{var o=this._findTableCode(1,9,r);if(o[0])return o[1];if((o=this._findTableCode(11,12,t))[0])return o[1]}(0,n.info)("bad white code");this._eatBits(1);return 1},_getBlackCode:function _getBlackCode(){var e,t;if(this.eoblock){if(-1===(e=this._lookBits(13)))return 1;if((t=e>>7==0?i[e]:e>>9==0&&e>>7!=0?o[(e>>1)-64]:a[e>>7])[0]>0){this._eatBits(t[0]);return t[1]}}else{var r=this._findTableCode(2,6,a);if(r[0])return r[1];if((r=this._findTableCode(7,12,o,64))[0])return r[1];if((r=this._findTableCode(10,13,i))[0])return r[1]}(0,n.info)("bad black code");this._eatBits(1);return 1},_lookBits:function _lookBits(e){for(var t;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?-1:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e},_eatBits:function _eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}};return CCITTFaxDecoder}();t.CCITTFaxDecoder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.JpegImage=void 0;var n=r(1),i=r(179);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var o=function(e){_inherits(JpegError,e);var t=_createSuper(JpegError);function JpegError(e){_classCallCheck(this,JpegError);return t.call(this,"JPEG error: ".concat(e))}return JpegError}(n.BaseException),a=function(e){_inherits(DNLMarkerError,e);var t=_createSuper(DNLMarkerError);function DNLMarkerError(e,r){var n;_classCallCheck(this,DNLMarkerError);(n=t.call(this,e)).scanLines=r;return n}return DNLMarkerError}(n.BaseException),s=function(e){_inherits(EOIMarkerError,e);var t=_createSuper(EOIMarkerError);function EOIMarkerError(){_classCallCheck(this,EOIMarkerError);return t.apply(this,arguments)}return EOIMarkerError}(n.BaseException),c=function JpegImageClosure(){var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function JpegImage(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.decodeTransform,r=void 0===t?null:t,n=e.colorTransform,i=void 0===n?-1:n;this._decodeTransform=r;this._colorTransform=i}function buildHuffmanTable(e,t){for(var r,n,i=0,o=[],a=16;a>0&&!e[a-1];)a--;o.push({children:[],index:0});var s,c=o[0];for(r=0;r<a;r++){for(n=0;n<e[r];n++){(c=o.pop()).children[c.index]=t[i];for(;c.index>0;)c=o.pop();c.index++;o.push(c);for(;o.length<=r;){o.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}i++}if(r+1<a){o.push(s={children:[],index:0});c.children[c.index]=s.children;c=s}}return o[0].children}function getBlockBufferOffset(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function decodeScan(t,r,c,u,f,l,p,d,h){var g=arguments.length>9&&void 0!==arguments[9]&&arguments[9],v=c.mcusPerLine,m=c.progressive,y=r,b=0,x=0;function readBit(){if(x>0){x--;return b>>x&1}if(255===(b=t[r++])){var e=t[r++];if(e){if(220===e&&g){r+=2;var n=(0,i.readUint16)(t,r);r+=2;if(n>0&&n!==c.scanLines)throw new a("Found DNL marker (0xFFDC) while parsing scan data",n)}else if(217===e){if(g){var u=T*(8===c.precision?8:0);if(u>0&&Math.round(c.scanLines/u)>=10)throw new a("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",u)}throw new s("Found EOI marker (0xFFD9) while parsing scan data")}throw new o("unexpected marker ".concat((b<<8|e).toString(16)))}}x=7;return b>>>7}function decodeHuffman(e){for(var t=e;;){switch(_typeof(t=t[readBit()])){case"number":return t;case"object":continue}throw new o("invalid huffman sequence")}}function receive(e){for(var t=0;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;var t=receive(e);return t>=1<<e-1?t:t+(-1<<e)+1}function decodeBaseline(t,r){var n=decodeHuffman(t.huffmanTableDC),i=0===n?0:receiveAndExtend(n);t.blockData[r]=t.pred+=i;for(var o=1;o<64;){var a=decodeHuffman(t.huffmanTableAC),s=15&a,c=a>>4;if(0!==s){var u=e[o+=c];t.blockData[r+u]=receiveAndExtend(s);o++}else{if(c<15)break;o+=16}}}function decodeDCFirst(e,t){var r=decodeHuffman(e.huffmanTableDC),n=0===r?0:receiveAndExtend(r)<<h;e.blockData[t]=e.pred+=n}function decodeDCSuccessive(e,t){e.blockData[t]|=readBit()<<h}var w=0;function decodeACFirst(t,r){if(w>0)w--;else for(var n=l,i=p;n<=i;){var o=decodeHuffman(t.huffmanTableAC),a=15&o,s=o>>4;if(0!==a){var c=e[n+=s];t.blockData[r+c]=receiveAndExtend(a)*(1<<h);n++}else{if(s<15){w=receive(s)+(1<<s)-1;break}n+=16}}}var S,_=0;function decodeACSuccessive(t,r){for(var n,i,a=l,s=p,c=0;a<=s;){var u=r+e[a],f=t.blockData[u]<0?-1:1;switch(_){case 0:c=(i=decodeHuffman(t.huffmanTableAC))>>4;if(0===(n=15&i))if(c<15){w=receive(c)+(1<<c);_=4}else{c=16;_=1}else{if(1!==n)throw new o("invalid ACn encoding");S=receiveAndExtend(n);_=c?2:3}continue;case 1:case 2:t.blockData[u]?t.blockData[u]+=f*(readBit()<<h):0===--c&&(_=2===_?3:0);break;case 3:if(t.blockData[u])t.blockData[u]+=f*(readBit()<<h);else{t.blockData[u]=S<<h;_=0}break;case 4:t.blockData[u]&&(t.blockData[u]+=f*(readBit()<<h))}a++}4===_&&0===--w&&(_=0)}var T=0;function decodeMcu(e,t,r,n,i){var o=r%v;T=(r/v|0)*e.v+n;var a=o*e.h+i;t(e,getBlockBufferOffset(e,T,a))}function decodeBlock(e,t,r){T=r/e.blocksPerLine|0;var n=r%e.blocksPerLine;t(e,getBlockBufferOffset(e,T,n))}var P,C,k,I,O,E,A=u.length;E=m?0===l?0===d?decodeDCFirst:decodeDCSuccessive:0===d?decodeACFirst:decodeACSuccessive:decodeBaseline;var R,M,D,L,B=0;M=1===A?u[0].blocksPerLine*u[0].blocksPerColumn:v*c.mcusPerColumn;for(;B<=M;){var U=f?Math.min(M-B,f):M;if(U>0){for(C=0;C<A;C++)u[C].pred=0;w=0;if(1===A){P=u[0];for(O=0;O<U;O++){decodeBlock(P,E,B);B++}}else for(O=0;O<U;O++){for(C=0;C<A;C++){D=(P=u[C]).h;L=P.v;for(k=0;k<L;k++)for(I=0;I<D;I++)decodeMcu(P,E,B,k,I)}B++}}x=0;if(!(R=findNextFileMarker(t,r)))break;if(R.invalid){var N=U>0?"unexpected":"excessive";(0,n.warn)("decodeScan - ".concat(N," MCU data, current marker is: ").concat(R.invalid));r=R.offset}if(!(R.marker>=65488&&R.marker<=65495))break;r+=2}return r-y}function quantizeAndInverse(e,t,r){var n,i,a,s,c,u,f,l,p,d,h,g,v,m,y,b,x,w=e.quantizationTable,S=e.blockData;if(!w)throw new o("missing required Quantization Table.");for(var _=0;_<64;_+=8){p=S[t+_];d=S[t+_+1];h=S[t+_+2];g=S[t+_+3];v=S[t+_+4];m=S[t+_+5];y=S[t+_+6];b=S[t+_+7];p*=w[_];if(0!=(d|h|g|v|m|y|b)){d*=w[_+1];h*=w[_+2];g*=w[_+3];v*=w[_+4];m*=w[_+5];i=(n=(n=5793*p+128>>8)+(i=5793*v+128>>8)+1>>1)-i;x=3784*(a=h)+1567*(s=y*=w[_+6])+128>>8;a=1567*a-3784*s+128>>8;f=(c=(c=2896*(d-(b*=w[_+7]))+128>>8)+(f=m<<4)+1>>1)-f;u=(l=(l=2896*(d+b)+128>>8)+(u=g<<4)+1>>1)-u;s=(n=n+(s=x)+1>>1)-s;a=(i=i+a+1>>1)-a;x=2276*c+3406*l+2048>>12;c=3406*c-2276*l+2048>>12;l=x;x=799*u+4017*f+2048>>12;u=4017*u-799*f+2048>>12;f=x;r[_]=n+l;r[_+7]=n-l;r[_+1]=i+f;r[_+6]=i-f;r[_+2]=a+u;r[_+5]=a-u;r[_+3]=s+c;r[_+4]=s-c}else{x=5793*p+512>>10;r[_]=x;r[_+1]=x;r[_+2]=x;r[_+3]=x;r[_+4]=x;r[_+5]=x;r[_+6]=x;r[_+7]=x}}for(var T=0;T<8;++T){p=r[T];if(0!=((d=r[T+8])|(h=r[T+16])|(g=r[T+24])|(v=r[T+32])|(m=r[T+40])|(y=r[T+48])|(b=r[T+56]))){i=(n=4112+((n=5793*p+2048>>12)+(i=5793*v+2048>>12)+1>>1))-i;x=3784*(a=h)+1567*(s=y)+2048>>12;a=1567*a-3784*s+2048>>12;s=x;f=(c=(c=2896*(d-b)+2048>>12)+(f=m)+1>>1)-f;u=(l=(l=2896*(d+b)+2048>>12)+(u=g)+1>>1)-u;x=2276*c+3406*l+2048>>12;c=3406*c-2276*l+2048>>12;l=x;x=799*u+4017*f+2048>>12;u=4017*u-799*f+2048>>12;(p=(n=n+s+1>>1)+l)<16?p=0:p>=4080?p=255:p>>=4;(d=(i=i+a+1>>1)+(f=x))<16?d=0:d>=4080?d=255:d>>=4;(h=(a=i-a)+u)<16?h=0:h>=4080?h=255:h>>=4;(g=(s=n-s)+c)<16?g=0:g>=4080?g=255:g>>=4;(v=s-c)<16?v=0:v>=4080?v=255:v>>=4;(m=a-u)<16?m=0:m>=4080?m=255:m>>=4;(y=i-f)<16?y=0:y>=4080?y=255:y>>=4;(b=n-l)<16?b=0:b>=4080?b=255:b>>=4;S[t+T]=p;S[t+T+8]=d;S[t+T+16]=h;S[t+T+24]=g;S[t+T+32]=v;S[t+T+40]=m;S[t+T+48]=y;S[t+T+56]=b}else{x=(x=5793*p+8192>>14)<-2040?0:x>=2024?255:x+2056>>4;S[t+T]=x;S[t+T+8]=x;S[t+T+16]=x;S[t+T+24]=x;S[t+T+32]=x;S[t+T+40]=x;S[t+T+48]=x;S[t+T+56]=x}}}function buildComponentData(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,i=new Int16Array(64),o=0;o<n;o++)for(var a=0;a<r;a++){quantizeAndInverse(t,getBlockBufferOffset(t,o,a),i)}return t.blockData}function findNextFileMarker(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e.length-1,o=r<t?r:t;if(t>=n)return null;var a=(0,i.readUint16)(e,t);if(a>=65472&&a<=65534)return{invalid:null,marker:a,offset:t};for(var s=(0,i.readUint16)(e,o);!(s>=65472&&s<=65534);){if(++o>=n)return null;s=(0,i.readUint16)(e,o)}return{invalid:a.toString(16),marker:s,offset:o}}JpegImage.prototype={parse:function parse(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=r.dnlScanLines,u=void 0===c?null:c;function readDataBlock(){var e=(0,i.readUint16)(t,p),r=(p+=2)+e-2,o=findNextFileMarker(t,r,p);if(o&&o.invalid){(0,n.warn)("readDataBlock - incorrect length, current marker is: "+o.invalid);r=o.offset}var a=t.subarray(p,r);p+=a.length;return a}function prepareComponents(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){W=e.components[n];var i=Math.ceil(Math.ceil(e.samplesPerLine/8)*W.h/e.maxH),o=Math.ceil(Math.ceil(e.scanLines/8)*W.v/e.maxV),a=t*W.h,s=64*(r*W.v)*(a+1);W.blockData=new Int16Array(s);W.blocksPerLine=i;W.blocksPerColumn=o}e.mcusPerLine=t;e.mcusPerColumn=r}var f,l,p=0,d=null,h=null,g=0,v=[],m=[],y=[],b=(0,i.readUint16)(t,p);p+=2;if(65496!==b)throw new o("SOI not found");b=(0,i.readUint16)(t,p);p+=2;e:for(;65497!==b;){var x,w,S;switch(b){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var _=readDataBlock();65504===b&&74===_[0]&&70===_[1]&&73===_[2]&&70===_[3]&&0===_[4]&&(d={version:{major:_[5],minor:_[6]},densityUnits:_[7],xDensity:_[8]<<8|_[9],yDensity:_[10]<<8|_[11],thumbWidth:_[12],thumbHeight:_[13],thumbData:_.subarray(14,14+3*_[12]*_[13])});65518===b&&65===_[0]&&100===_[1]&&111===_[2]&&98===_[3]&&101===_[4]&&(h={version:_[5]<<8|_[6],flags0:_[7]<<8|_[8],flags1:_[9]<<8|_[10],transformCode:_[11]});break;case 65499:for(var T=(0,i.readUint16)(t,p),P=T+(p+=2)-2;p<P;){var C=t[p++],k=new Uint16Array(64);if(C>>4==0)for(w=0;w<64;w++)k[e[w]]=t[p++];else{if(C>>4!=1)throw new o("DQT - invalid table spec");for(w=0;w<64;w++){k[e[w]]=(0,i.readUint16)(t,p);p+=2}}v[15&C]=k}break;case 65472:case 65473:case 65474:if(f)throw new o("Only single frame JPEGs supported");p+=2;(f={}).extended=65473===b;f.progressive=65474===b;f.precision=t[p++];var I=(0,i.readUint16)(t,p);p+=2;f.scanLines=u||I;f.samplesPerLine=(0,i.readUint16)(t,p);p+=2;f.components=[];f.componentIds={};var O,E=t[p++],A=0,R=0;for(x=0;x<E;x++){O=t[p];var M=t[p+1]>>4,D=15&t[p+1];A<M&&(A=M);R<D&&(R=D);var L=t[p+2];S=f.components.push({h:M,v:D,quantizationId:L,quantizationTable:null});f.componentIds[O]=S-1;p+=3}f.maxH=A;f.maxV=R;prepareComponents(f);break;case 65476:var B=(0,i.readUint16)(t,p);p+=2;for(x=2;x<B;){var U=t[p++],N=new Uint8Array(16),j=0;for(w=0;w<16;w++,p++)j+=N[w]=t[p];var z=new Uint8Array(j);for(w=0;w<j;w++,p++)z[w]=t[p];x+=17+j;(U>>4==0?y:m)[15&U]=buildHuffmanTable(N,z)}break;case 65501:p+=2;l=(0,i.readUint16)(t,p);p+=2;break;case 65498:var H=1==++g&&!u;p+=2;var W,X=t[p++],q=[];for(x=0;x<X;x++){var Y=t[p++],V=f.componentIds[Y];(W=f.components[V]).index=Y;var J=t[p++];W.huffmanTableDC=y[J>>4];W.huffmanTableAC=m[15&J];q.push(W)}var G=t[p++],K=t[p++],Q=t[p++];try{var Z=decodeScan(t,p,f,q,l,G,K,Q>>4,15&Q,H);p+=Z}catch(e){if(e instanceof a){(0,n.warn)("".concat(e.message," -- attempting to re-parse the JPEG image."));return this.parse(t,{dnlScanLines:e.scanLines})}if(e instanceof s){(0,n.warn)("".concat(e.message," -- ignoring the rest of the image data."));break e}throw e}break;case 65500:p+=4;break;case 65535:255!==t[p]&&p--;break;default:var $=findNextFileMarker(t,p-2,p-3);if($&&$.invalid){(0,n.warn)("JpegImage.parse - unexpected data, current marker is: "+$.invalid);p=$.offset;break}if(p>=t.length-1){(0,n.warn)("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new o("JpegImage.parse - unknown marker: "+b.toString(16))}b=(0,i.readUint16)(t,p);p+=2}this.width=f.samplesPerLine;this.height=f.scanLines;this.jfif=d;this.adobe=h;this.components=[];for(x=0;x<f.components.length;x++){var ee=v[(W=f.components[x]).quantizationId];ee&&(W.quantizationTable=ee);this.components.push({index:W.index,output:buildComponentData(0,W),scaleX:W.h/f.maxH,scaleY:W.v/f.maxV,blocksPerLine:W.blocksPerLine,blocksPerColumn:W.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function _getLinearizedBlockData(e,t){var r,n,i,o,a,s,c,u,f,l,p,d,h=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=this.width/e,v=this.height/t,m=0,y=this.components.length,b=e*t*y,x=new Uint8ClampedArray(b),w=new Uint32Array(e),S=4294967288;for(c=0;c<y;c++){n=(r=this.components[c]).scaleX*g;i=r.scaleY*v;m=c;p=r.output;o=r.blocksPerLine+1<<3;if(n!==d){for(a=0;a<e;a++){u=0|a*n;w[a]=(u&S)<<3|7&u}d=n}for(s=0;s<t;s++){l=o*((u=0|s*i)&S)|(7&u)<<3;for(a=0;a<e;a++){x[m]=p[l+w[a]];m+=y}}}var _=this._decodeTransform;h||4!==y||_||(_=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(_)for(c=0;c<b;)for(u=0,f=0;u<y;u++,c++,f+=2)x[c]=(x[c]*_[f]>>8)+_[f+1];return x},get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform},_convertYccToRgb:function convertYccToRgb(e){for(var t,r,n,i=0,o=e.length;i<o;i+=3){t=e[i];r=e[i+1];n=e[i+2];e[i]=t-179.456+1.402*n;e[i+1]=t+135.459-.344*r-.714*n;e[i+2]=t-226.816+1.772*r}return e},_convertYcckToRgb:function convertYcckToRgb(e){for(var t,r,n,i,o=0,a=0,s=e.length;a<s;a+=4){t=e[a];r=e[a+1];n=e[a+2];i=e[a+3];e[o++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776);e[o++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665);e[o++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407)}return e.subarray(0,o)},_convertYcckToCmyk:function convertYcckToCmyk(e){for(var t,r,n,i=0,o=e.length;i<o;i+=4){t=e[i];r=e[i+1];n=e[i+2];e[i]=434.456-t-1.402*n;e[i+1]=119.541-t+.344*r+.714*n;e[i+2]=481.816-t-1.772*r}return e},_convertCmykToRgb:function convertCmykToRgb(e){for(var t,r,n,i,o=0,a=0,s=e.length;a<s;a+=4){t=e[a];r=e[a+1];n=e[a+2];i=e[a+3];e[o++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*i-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*i-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*i+.0686742238595345)-i*(.0003361971776183937*i+.7430659151342254);e[o++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*i-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*i-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*i-.09751927774728933)-i*(.0003189131175883281*i+.7364883807733168);e[o++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*i-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*i-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*i-.7591454649749609)-i*(.0003435319965105553*i+.7063770186160144)}return e.subarray(0,o)},getData:function getData(e){var t=e.width,r=e.height,n=e.forceRGB,i=void 0!==n&&n,a=e.isSourcePDF,s=void 0!==a&&a;if(this.numComponents>4)throw new o("Unsupported color mode");var c=this._getLinearizedBlockData(t,r,s);if(1===this.numComponents&&i){for(var u=c.length,f=new Uint8ClampedArray(3*u),l=0,p=0;p<u;p++){var d=c[p];f[l++]=d;f[l++]=d;f[l++]=d}return f}if(3===this.numComponents&&this._isColorConversionNeeded)return this._convertYccToRgb(c);if(4===this.numComponents){if(this._isColorConversionNeeded)return i?this._convertYcckToRgb(c):this._convertYcckToCmyk(c);if(i)return this._convertCmykToRgb(c)}return c}};return JpegImage}();t.JpegImage=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.JpxImage=void 0;var n=r(1),i=r(179),o=r(180);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Date.prototype.toString.call(Reflect.construct(Date,[],(function(){})));return!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=function(e){!function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}});t&&_setPrototypeOf(e,t)}(JpxError,e);var t=_createSuper(JpxError);function JpxError(e){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,JpxError);return t.call(this,"JPX error: ".concat(e))}return JpxError}(n.BaseException),s=function JpxImageClosure(){var e={LL:0,LH:1,HL:1,HH:2};function JpxImage(){this.failOnCorruptedImage=!1}JpxImage.prototype={parse:function JpxImage_parse(e){if(65359!==(0,i.readUint16)(e,0))for(var t=0,r=e.length;t<r;){var o=8,s=(0,i.readUint32)(e,t),c=(0,i.readUint32)(e,t+4);t+=o;if(1===s){s=4294967296*(0,i.readUint32)(e,t)+(0,i.readUint32)(e,t+4);t+=8;o+=8}0===s&&(s=r-t+o);if(s<o)throw new a("Invalid box field size");var u=s-o,f=!0;switch(c){case 1785737832:f=!1;break;case 1668246642:var l=e[t];if(1===l){var p=(0,i.readUint32)(e,t+3);switch(p){case 16:case 17:case 18:break;default:(0,n.warn)("Unknown colorspace "+p)}}else 2===l&&(0,n.info)("ICC profile not supported");break;case 1785737827:this.parseCodestream(e,t,t+u);break;case 1783636e3:218793738!==(0,i.readUint32)(e,t)&&(0,n.warn)("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var d=String.fromCharCode(c>>24&255,c>>16&255,c>>8&255,255&c);(0,n.warn)("Unsupported header type "+c+" ("+d+")")}f&&(t+=u)}else this.parseCodestream(e,0,e.length)},parseImageProperties:function JpxImage_parseImageProperties(e){for(var t=e.getByte();t>=0;){if(65361===(t<<8|(t=e.getByte()))){e.skip(4);var r=e.getInt32()>>>0,n=e.getInt32()>>>0,i=e.getInt32()>>>0,o=e.getInt32()>>>0;e.skip(16);var s=e.getUint16();this.width=r-i;this.height=n-o;this.componentsCount=s;this.bitsPerComponent=8;return}}throw new a("No size marker found in JPX stream")},parseCodestream:function JpxImage_parseCodestream(e,t,r){var o={},s=!1;try{for(var c=t;c+1<r;){var u=(0,i.readUint16)(e,c);c+=2;var f,l,p,d,h,g,v=0;switch(u){case 65359:o.mainHeader=!0;break;case 65497:break;case 65361:v=(0,i.readUint16)(e,c);var m={};m.Xsiz=(0,i.readUint32)(e,c+4);m.Ysiz=(0,i.readUint32)(e,c+8);m.XOsiz=(0,i.readUint32)(e,c+12);m.YOsiz=(0,i.readUint32)(e,c+16);m.XTsiz=(0,i.readUint32)(e,c+20);m.YTsiz=(0,i.readUint32)(e,c+24);m.XTOsiz=(0,i.readUint32)(e,c+28);m.YTOsiz=(0,i.readUint32)(e,c+32);var y=(0,i.readUint16)(e,c+36);m.Csiz=y;var b=[];f=c+38;for(var x=0;x<y;x++){var w={precision:1+(127&e[f]),isSigned:!!(128&e[f]),XRsiz:e[f+1],YRsiz:e[f+2]};f+=3;calculateComponentDimensions(w,m);b.push(w)}o.SIZ=m;o.components=b;calculateTileGrids(o,b);o.QCC=[];o.COC=[];break;case 65372:v=(0,i.readUint16)(e,c);var S={};f=c+2;switch(31&(l=e[f++])){case 0:d=8;h=!0;break;case 1:d=16;h=!1;break;case 2:d=16;h=!0;break;default:throw new Error("Invalid SQcd value "+l)}S.noQuantization=8===d;S.scalarExpounded=h;S.guardBits=l>>5;p=[];for(;f<v+c;){var _={};if(8===d){_.epsilon=e[f++]>>3;_.mu=0}else{_.epsilon=e[f]>>3;_.mu=(7&e[f])<<8|e[f+1];f+=2}p.push(_)}S.SPqcds=p;if(o.mainHeader)o.QCD=S;else{o.currentTile.QCD=S;o.currentTile.QCC=[]}break;case 65373:v=(0,i.readUint16)(e,c);var T,P={};f=c+2;if(o.SIZ.Csiz<257)T=e[f++];else{T=(0,i.readUint16)(e,f);f+=2}switch(31&(l=e[f++])){case 0:d=8;h=!0;break;case 1:d=16;h=!1;break;case 2:d=16;h=!0;break;default:throw new Error("Invalid SQcd value "+l)}P.noQuantization=8===d;P.scalarExpounded=h;P.guardBits=l>>5;p=[];for(;f<v+c;){_={};if(8===d){_.epsilon=e[f++]>>3;_.mu=0}else{_.epsilon=e[f]>>3;_.mu=(7&e[f])<<8|e[f+1];f+=2}p.push(_)}P.SPqcds=p;o.mainHeader?o.QCC[T]=P:o.currentTile.QCC[T]=P;break;case 65362:v=(0,i.readUint16)(e,c);var C={};f=c+2;var k=e[f++];C.entropyCoderWithCustomPrecincts=!!(1&k);C.sopMarkerUsed=!!(2&k);C.ephMarkerUsed=!!(4&k);C.progressionOrder=e[f++];C.layersCount=(0,i.readUint16)(e,f);f+=2;C.multipleComponentTransform=e[f++];C.decompositionLevelsCount=e[f++];C.xcb=2+(15&e[f++]);C.ycb=2+(15&e[f++]);var I=e[f++];C.selectiveArithmeticCodingBypass=!!(1&I);C.resetContextProbabilities=!!(2&I);C.terminationOnEachCodingPass=!!(4&I);C.verticallyStripe=!!(8&I);C.predictableTermination=!!(16&I);C.segmentationSymbolUsed=!!(32&I);C.reversibleTransformation=e[f++];if(C.entropyCoderWithCustomPrecincts){for(var O=[];f<v+c;){var E=e[f++];O.push({PPx:15&E,PPy:E>>4})}C.precinctsSizes=O}var A=[];C.selectiveArithmeticCodingBypass&&A.push("selectiveArithmeticCodingBypass");C.resetContextProbabilities&&A.push("resetContextProbabilities");C.terminationOnEachCodingPass&&A.push("terminationOnEachCodingPass");C.verticallyStripe&&A.push("verticallyStripe");C.predictableTermination&&A.push("predictableTermination");if(A.length>0){s=!0;throw new Error("Unsupported COD options ("+A.join(", ")+")")}if(o.mainHeader)o.COD=C;else{o.currentTile.COD=C;o.currentTile.COC=[]}break;case 65424:v=(0,i.readUint16)(e,c);(g={}).index=(0,i.readUint16)(e,c+2);g.length=(0,i.readUint32)(e,c+4);g.dataEnd=g.length+c-2;g.partIndex=e[c+8];g.partsCount=e[c+9];o.mainHeader=!1;if(0===g.partIndex){g.COD=o.COD;g.COC=o.COC.slice(0);g.QCD=o.QCD;g.QCC=o.QCC.slice(0)}o.currentTile=g;break;case 65427:if(0===(g=o.currentTile).partIndex){initializeTile(o,g.index);buildPackets(o)}parseTilePackets(o,e,c,v=g.dataEnd-c);break;case 65365:case 65367:case 65368:case 65380:v=(0,i.readUint16)(e,c);break;case 65363:throw new Error("Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("Unknown codestream code: "+u.toString(16))}c+=v}}catch(e){if(s||this.failOnCorruptedImage)throw new a(e.message);(0,n.warn)("JPX: Trying to recover from: "+e.message)}this.tiles=function transformComponents(e){for(var t=e.SIZ,r=e.components,n=t.Csiz,i=[],o=0,a=e.tiles.length;o<a;o++){var s,c=e.tiles[o],u=[];for(s=0;s<n;s++)u[s]=transformTile(e,c,s);var f,l,p,d,h,g,v,m=u[0],y=new Uint8ClampedArray(m.items.length*n),b={left:m.left,top:m.top,width:m.width,height:m.height,items:y},x=0;if(c.codingStyleDefaultParameters.multipleComponentTransform){var w=4===n,S=u[0].items,_=u[1].items,T=u[2].items,P=w?u[3].items:null;f=r[0].precision-8;l=.5+(128<<f);var C=c.components[0],k=n-3;d=S.length;if(C.codingStyleParameters.reversibleTransformation)for(p=0;p<d;p++,x+=k){h=S[p]+l;g=_[p];v=T[p];var I=h-(v+g>>2);y[x++]=I+v>>f;y[x++]=I>>f;y[x++]=I+g>>f}else for(p=0;p<d;p++,x+=k){h=S[p]+l;g=_[p];v=T[p];y[x++]=h+1.402*v>>f;y[x++]=h-.34413*g-.71414*v>>f;y[x++]=h+1.772*g>>f}if(w)for(p=0,x=3;p<d;p++,x+=4)y[x]=P[p]+l>>f}else for(s=0;s<n;s++){var O=u[s].items;f=r[s].precision-8;l=.5+(128<<f);for(x=s,p=0,d=O.length;p<d;p++){y[x]=O[p]+l>>f;x+=n}}i.push(b)}return i}(o);this.width=o.SIZ.Xsiz-o.SIZ.XOsiz;this.height=o.SIZ.Ysiz-o.SIZ.YOsiz;this.componentsCount=o.SIZ.Csiz}};function calculateComponentDimensions(e,t){e.x0=Math.ceil(t.XOsiz/e.XRsiz);e.x1=Math.ceil(t.Xsiz/e.XRsiz);e.y0=Math.ceil(t.YOsiz/e.YRsiz);e.y1=Math.ceil(t.Ysiz/e.YRsiz);e.width=e.x1-e.x0;e.height=e.y1-e.y0}function calculateTileGrids(e,t){for(var r,n=e.SIZ,i=[],o=Math.ceil((n.Xsiz-n.XTOsiz)/n.XTsiz),a=Math.ceil((n.Ysiz-n.YTOsiz)/n.YTsiz),s=0;s<a;s++)for(var c=0;c<o;c++){(r={}).tx0=Math.max(n.XTOsiz+c*n.XTsiz,n.XOsiz);r.ty0=Math.max(n.YTOsiz+s*n.YTsiz,n.YOsiz);r.tx1=Math.min(n.XTOsiz+(c+1)*n.XTsiz,n.Xsiz);r.ty1=Math.min(n.YTOsiz+(s+1)*n.YTsiz,n.Ysiz);r.width=r.tx1-r.tx0;r.height=r.ty1-r.ty0;r.components=[];i.push(r)}e.tiles=i;for(var u=0,f=n.Csiz;u<f;u++)for(var l=t[u],p=0,d=i.length;p<d;p++){var h={};r=i[p];h.tcx0=Math.ceil(r.tx0/l.XRsiz);h.tcy0=Math.ceil(r.ty0/l.YRsiz);h.tcx1=Math.ceil(r.tx1/l.XRsiz);h.tcy1=Math.ceil(r.ty1/l.YRsiz);h.width=h.tcx1-h.tcx0;h.height=h.tcy1-h.tcy0;r.components[u]=h}}function getBlocksDimensions(e,t,r){var n=t.codingStyleParameters,i={};if(n.entropyCoderWithCustomPrecincts){i.PPx=n.precinctsSizes[r].PPx;i.PPy=n.precinctsSizes[r].PPy}else{i.PPx=15;i.PPy=15}i.xcb_=r>0?Math.min(n.xcb,i.PPx-1):Math.min(n.xcb,i.PPx);i.ycb_=r>0?Math.min(n.ycb,i.PPy-1):Math.min(n.ycb,i.PPy);return i}function buildPrecincts(e,t,r){var n=1<<r.PPx,i=1<<r.PPy,o=0===t.resLevel,a=1<<r.PPx+(o?0:-1),s=1<<r.PPy+(o?0:-1),c=t.trx1>t.trx0?Math.ceil(t.trx1/n)-Math.floor(t.trx0/n):0,u=t.try1>t.try0?Math.ceil(t.try1/i)-Math.floor(t.try0/i):0,f=c*u;t.precinctParameters={precinctWidth:n,precinctHeight:i,numprecinctswide:c,numprecinctshigh:u,numprecincts:f,precinctWidthInSubband:a,precinctHeightInSubband:s}}function buildCodeblocks(e,t,r){var n,i,o,a,s=r.xcb_,c=r.ycb_,u=1<<s,f=1<<c,l=t.tbx0>>s,p=t.tby0>>c,d=t.tbx1+u-1>>s,h=t.tby1+f-1>>c,g=t.resolution.precinctParameters,v=[],m=[];for(i=p;i<h;i++)for(n=l;n<d;n++){(o={cbx:n,cby:i,tbx0:u*n,tby0:f*i,tbx1:u*(n+1),tby1:f*(i+1)}).tbx0_=Math.max(t.tbx0,o.tbx0);o.tby0_=Math.max(t.tby0,o.tby0);o.tbx1_=Math.min(t.tbx1,o.tbx1);o.tby1_=Math.min(t.tby1,o.tby1);a=Math.floor((o.tbx0_-t.tbx0)/g.precinctWidthInSubband)+Math.floor((o.tby0_-t.tby0)/g.precinctHeightInSubband)*g.numprecinctswide;o.precinctNumber=a;o.subbandType=t.type;o.Lblock=3;if(!(o.tbx1_<=o.tbx0_||o.tby1_<=o.tby0_)){v.push(o);var y=m[a];if(void 0!==y){n<y.cbxMin?y.cbxMin=n:n>y.cbxMax&&(y.cbxMax=n);i<y.cbyMin?y.cbxMin=i:i>y.cbyMax&&(y.cbyMax=i)}else m[a]=y={cbxMin:n,cbyMin:i,cbxMax:n,cbyMax:i};o.precinct=y}}t.codeblockParameters={codeblockWidth:s,codeblockHeight:c,numcodeblockwide:d-l+1,numcodeblockhigh:h-p+1};t.codeblocks=v;t.precincts=m}function createPacket(e,t,r){for(var n=[],i=e.subbands,o=0,a=i.length;o<a;o++)for(var s=i[o].codeblocks,c=0,u=s.length;c<u;c++){var f=s[c];f.precinctNumber===t&&n.push(f)}return{layerNumber:r,codeblocks:n}}function LayerResolutionComponentPositionIterator(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=0,c=0;c<o;c++)s=Math.max(s,n.components[c].codingStyleParameters.decompositionLevelsCount);var u=0,f=0,l=0,p=0;this.nextPacket=function JpxImage_nextPacket(){for(;u<i;u++){for(;f<=s;f++){for(;l<o;l++){var e=n.components[l];if(!(f>e.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[f],r=t.precinctParameters.numprecincts;p<r;){var c=createPacket(t,p,u);p++;return c}p=0}}l=0}f=0}throw new a("Out of packets")}}function ResolutionLayerComponentPositionIterator(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=0,c=0;c<o;c++)s=Math.max(s,n.components[c].codingStyleParameters.decompositionLevelsCount);var u=0,f=0,l=0,p=0;this.nextPacket=function JpxImage_nextPacket(){for(;u<=s;u++){for(;f<i;f++){for(;l<o;l++){var e=n.components[l];if(!(u>e.codingStyleParameters.decompositionLevelsCount)){for(var t=e.resolutions[u],r=t.precinctParameters.numprecincts;p<r;){var c=createPacket(t,p,f);p++;return c}p=0}}l=0}f=0}throw new a("Out of packets")}}function ResolutionPositionComponentLayerIterator(e){var t,r,n,i,o=e.SIZ,s=e.currentTile.index,c=e.tiles[s],u=c.codingStyleDefaultParameters.layersCount,f=o.Csiz,l=0;for(n=0;n<f;n++){var p=c.components[n];l=Math.max(l,p.codingStyleParameters.decompositionLevelsCount)}var d=new Int32Array(l+1);for(r=0;r<=l;++r){var h=0;for(n=0;n<f;++n){var g=c.components[n].resolutions;r<g.length&&(h=Math.max(h,g[r].precinctParameters.numprecincts))}d[r]=h}t=0;r=0;n=0;i=0;this.nextPacket=function JpxImage_nextPacket(){for(;r<=l;r++){for(;i<d[r];i++){for(;n<f;n++){var e=c.components[n];if(!(r>e.codingStyleParameters.decompositionLevelsCount)){var o=e.resolutions[r],s=o.precinctParameters.numprecincts;if(!(i>=s)){for(;t<u;){var p=createPacket(o,i,t);t++;return p}t=0}}}n=0}i=0}throw new a("Out of packets")}}function PositionComponentResolutionLayerIterator(e){var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=getPrecinctSizesInImageScale(n),c=s,u=0,f=0,l=0,p=0,d=0;this.nextPacket=function JpxImage_nextPacket(){for(;d<c.maxNumHigh;d++){for(;p<c.maxNumWide;p++){for(;l<o;l++){for(var e=n.components[l],t=e.codingStyleParameters.decompositionLevelsCount;f<=t;f++){var r=e.resolutions[f],h=s.components[l].resolutions[f],g=getPrecinctIndexIfExist(p,d,h,c,r);if(null!==g){for(;u<i;){var v=createPacket(r,g,u);u++;return v}u=0}}f=0}l=0}p=0}throw new a("Out of packets")}}function ComponentPositionResolutionLayerIterator(e){var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=n.codingStyleDefaultParameters.layersCount,o=t.Csiz,s=getPrecinctSizesInImageScale(n),c=0,u=0,f=0,l=0,p=0;this.nextPacket=function JpxImage_nextPacket(){for(;f<o;++f){for(var e=n.components[f],t=s.components[f],r=e.codingStyleParameters.decompositionLevelsCount;p<t.maxNumHigh;p++){for(;l<t.maxNumWide;l++){for(;u<=r;u++){var d=e.resolutions[u],h=t.resolutions[u],g=getPrecinctIndexIfExist(l,p,h,t,d);if(null!==g){for(;c<i;){var v=createPacket(d,g,c);c++;return v}c=0}}u=0}l=0}p=0}throw new a("Out of packets")}}function getPrecinctIndexIfExist(e,t,r,n,i){var o=e*n.minWidth,a=t*n.minHeight;if(o%r.width!=0||a%r.height!=0)return null;var s=a/r.width*i.precinctParameters.numprecinctswide;return o/r.height+s}function getPrecinctSizesInImageScale(e){for(var t=e.components.length,r=Number.MAX_VALUE,n=Number.MAX_VALUE,i=0,o=0,a=new Array(t),s=0;s<t;s++){for(var c=e.components[s],u=c.codingStyleParameters.decompositionLevelsCount,f=new Array(u+1),l=Number.MAX_VALUE,p=Number.MAX_VALUE,d=0,h=0,g=1,v=u;v>=0;--v){var m=c.resolutions[v],y=g*m.precinctParameters.precinctWidth,b=g*m.precinctParameters.precinctHeight;l=Math.min(l,y);p=Math.min(p,b);d=Math.max(d,m.precinctParameters.numprecinctswide);h=Math.max(h,m.precinctParameters.numprecinctshigh);f[v]={width:y,height:b};g<<=1}r=Math.min(r,l);n=Math.min(n,p);i=Math.max(i,d);o=Math.max(o,h);a[s]={resolutions:f,minWidth:l,minHeight:p,maxNumWide:d,maxNumHigh:h}}return{components:a,minWidth:r,minHeight:n,maxNumWide:i,maxNumHigh:o}}function buildPackets(e){for(var t=e.SIZ,r=e.currentTile.index,n=e.tiles[r],i=t.Csiz,o=0;o<i;o++){for(var s=n.components[o],c=s.codingStyleParameters.decompositionLevelsCount,u=[],f=[],l=0;l<=c;l++){var p,d=getBlocksDimensions(0,s,l),h={},g=1<<c-l;h.trx0=Math.ceil(s.tcx0/g);h.try0=Math.ceil(s.tcy0/g);h.trx1=Math.ceil(s.tcx1/g);h.try1=Math.ceil(s.tcy1/g);h.resLevel=l;buildPrecincts(0,h,d);u.push(h);if(0===l){(p={}).type="LL";p.tbx0=Math.ceil(s.tcx0/g);p.tby0=Math.ceil(s.tcy0/g);p.tbx1=Math.ceil(s.tcx1/g);p.tby1=Math.ceil(s.tcy1/g);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);h.subbands=[p]}else{var v=1<<c-l+1,m=[];(p={}).type="HL";p.tbx0=Math.ceil(s.tcx0/v-.5);p.tby0=Math.ceil(s.tcy0/v);p.tbx1=Math.ceil(s.tcx1/v-.5);p.tby1=Math.ceil(s.tcy1/v);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);m.push(p);(p={}).type="LH";p.tbx0=Math.ceil(s.tcx0/v);p.tby0=Math.ceil(s.tcy0/v-.5);p.tbx1=Math.ceil(s.tcx1/v);p.tby1=Math.ceil(s.tcy1/v-.5);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);m.push(p);(p={}).type="HH";p.tbx0=Math.ceil(s.tcx0/v-.5);p.tby0=Math.ceil(s.tcy0/v-.5);p.tbx1=Math.ceil(s.tcx1/v-.5);p.tby1=Math.ceil(s.tcy1/v-.5);p.resolution=h;buildCodeblocks(0,p,d);f.push(p);m.push(p);h.subbands=m}}s.resolutions=u;s.subbands=f}var y=n.codingStyleDefaultParameters.progressionOrder;switch(y){case 0:n.packetsIterator=new LayerResolutionComponentPositionIterator(e);break;case 1:n.packetsIterator=new ResolutionLayerComponentPositionIterator(e);break;case 2:n.packetsIterator=new ResolutionPositionComponentLayerIterator(e);break;case 3:n.packetsIterator=new PositionComponentResolutionLayerIterator(e);break;case 4:n.packetsIterator=new ComponentPositionResolutionLayerIterator(e);break;default:throw new a("Unsupported progression order ".concat(y))}}function parseTilePackets(e,n,o,a){var s,c=0,u=0,f=!1;function readBits(e){for(;u<e;){var t=n[o+c];c++;if(f){s=s<<7|t;u+=7;f=!1}else{s=s<<8|t;u+=8}255===t&&(f=!0)}return s>>>(u-=e)&(1<<e)-1}function skipMarkerIfEqual(e){if(255===n[o+c-1]&&n[o+c]===e){skipBytes(1);return!0}if(255===n[o+c]&&n[o+c+1]===e){skipBytes(2);return!0}return!1}function skipBytes(e){c+=e}function alignToByte(){u=0;if(f){c++;f=!1}}function readCodingpasses(){if(0===readBits(1))return 1;if(0===readBits(1))return 2;var e=readBits(2);return e<3?e+3:(e=readBits(5))<31?e+6:(e=readBits(7))+37}for(var l=e.currentTile.index,p=e.tiles[l],d=e.COD.sopMarkerUsed,h=e.COD.ephMarkerUsed,g=p.packetsIterator;c<a;){alignToByte();d&&skipMarkerIfEqual(145)&&skipBytes(4);var v=g.nextPacket();if(readBits(1)){for(var m,y=v.layerNumber,b=[],x=0,w=v.codeblocks.length;x<w;x++){var S=(m=v.codeblocks[x]).precinct,_=m.cbx-S.cbxMin,T=m.cby-S.cbyMin,P=!1,C=!1;if(void 0!==m.included)P=!!readBits(1);else{var k,I;if(void 0!==(S=m.precinct).inclusionTree)k=S.inclusionTree;else{var O=S.cbxMax-S.cbxMin+1,E=S.cbyMax-S.cbyMin+1;k=new r(O,E,y);I=new t(O,E);S.inclusionTree=k;S.zeroBitPlanesTree=I}if(k.reset(_,T,y))for(;;){if(!readBits(1)){k.incrementValue(y);break}if(!k.nextLevel()){m.included=!0;P=C=!0;break}}}if(P){if(C){(I=S.zeroBitPlanesTree).reset(_,T);for(;;)if(readBits(1)){if(!I.nextLevel())break}else I.incrementValue();m.zeroBitPlanes=I.value}for(var A=readCodingpasses();readBits(1);)m.Lblock++;var R=(0,i.log2)(A),M=readBits((A<1<<R?R-1:R)+m.Lblock);b.push({codeblock:m,codingpasses:A,dataLength:M})}}alignToByte();h&&skipMarkerIfEqual(146);for(;b.length>0;){var D=b.shift();void 0===(m=D.codeblock).data&&(m.data=[]);m.data.push({data:n,start:o+c,end:o+c+D.dataLength,codingpasses:D.codingpasses});c+=D.dataLength}}}return c}function copyCoefficients(e,t,r,n,i,a,c,u){for(var f=n.tbx0,l=n.tby0,p=n.tbx1-n.tbx0,d=n.codeblocks,h="H"===n.type.charAt(0)?1:0,g="H"===n.type.charAt(1)?t:0,v=0,m=d.length;v<m;++v){var y=d[v],b=y.tbx1_-y.tbx0_,x=y.tby1_-y.tby0_;if(0!==b&&0!==x&&void 0!==y.data){var w,S;w=new s(b,x,y.subbandType,y.zeroBitPlanes,a);S=2;var _,T,P,C=y.data,k=0,I=0;for(_=0,T=C.length;_<T;_++){k+=(P=C[_]).end-P.start;I+=P.codingpasses}var O=new Uint8Array(k),E=0;for(_=0,T=C.length;_<T;_++){var A=(P=C[_]).data.subarray(P.start,P.end);O.set(A,E);E+=A.length}var R=new o.ArithmeticDecoder(O,0,k);w.setDecoder(R);for(_=0;_<I;_++){switch(S){case 0:w.runSignificancePropagationPass();break;case 1:w.runMagnitudeRefinementPass();break;case 2:w.runCleanupPass();u&&w.checkSegmentationSymbol()}S=(S+1)%3}var M,D,L,B=y.tbx0_-f+(y.tby0_-l)*p,U=w.coefficentsSign,N=w.coefficentsMagnitude,j=w.bitsDecoded,z=c?0:.5;E=0;var H="LL"!==n.type;for(_=0;_<x;_++){var W=2*(B/p|0)*(t-p)+h+g;for(M=0;M<b;M++){if(0!==(D=N[E])){D=(D+z)*i;0!==U[E]&&(D=-D);L=j[E];var X=H?W+(B<<1):B;e[X]=c&&L>=a?D:D*(1<<a-L)}B++;E++}B+=p-b}}}}function transformTile(t,r,n){for(var i=r.components[n],o=i.codingStyleParameters,a=i.quantizationParameters,s=o.decompositionLevelsCount,c=a.SPqcds,l=a.scalarExpounded,p=a.guardBits,d=o.segmentationSymbolUsed,h=t.components[n].precision,g=o.reversibleTransformation,v=g?new f:new u,m=[],y=0,b=0;b<=s;b++){for(var x=i.resolutions[b],w=x.trx1-x.trx0,S=x.try1-x.try0,_=new Float32Array(w*S),T=0,P=x.subbands.length;T<P;T++){var C,k;if(l){C=c[y].mu;k=c[y].epsilon;y++}else{C=c[0].mu;k=c[0].epsilon+(b>0?1-b:0)}var I=x.subbands[T],O=e[I.type];copyCoefficients(_,w,0,I,g?1:Math.pow(2,h+O-k)*(1+C/2048),p+k-1,g,d)}m.push({width:w,height:S,items:_})}var E=v.calculate(m,i.tcx0,i.tcy0);return{left:i.tcx0,top:i.tcy0,width:E.width,height:E.height,items:E.items}}function initializeTile(e,t){for(var r=e.SIZ.Csiz,n=e.tiles[t],i=0;i<r;i++){var o=n.components[i],a=void 0!==e.currentTile.QCC[i]?e.currentTile.QCC[i]:e.currentTile.QCD;o.quantizationParameters=a;var s=void 0!==e.currentTile.COC[i]?e.currentTile.COC[i]:e.currentTile.COD;o.codingStyleParameters=s}n.codingStyleDefaultParameters=e.currentTile.COD}var t=function TagTreeClosure(){function TagTree(e,t){var r=(0,i.log2)(Math.max(e,t))+1;this.levels=[];for(var n=0;n<r;n++){var o={width:e,height:t,items:[]};this.levels.push(o);e=Math.ceil(e/2);t=Math.ceil(t/2)}}TagTree.prototype={reset:function TagTree_reset(e,t){for(var r,n=0,i=0;n<this.levels.length;){var o=e+t*(r=this.levels[n]).width;if(void 0!==r.items[o]){i=r.items[o];break}r.index=o;e>>=1;t>>=1;n++}n--;(r=this.levels[n]).items[r.index]=i;this.currentLevel=n;delete this.value},incrementValue:function TagTree_incrementValue(){var e=this.levels[this.currentLevel];e.items[e.index]++},nextLevel:function TagTree_nextLevel(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];if(--e<0){this.value=r;return!1}this.currentLevel=e;(t=this.levels[e]).items[t.index]=r;return!0}};return TagTree}(),r=function InclusionTreeClosure(){function InclusionTree(e,t,r){var n=(0,i.log2)(Math.max(e,t))+1;this.levels=[];for(var o=0;o<n;o++){for(var a=new Uint8Array(e*t),s=0,c=a.length;s<c;s++)a[s]=r;var u={width:e,height:t,items:a};this.levels.push(u);e=Math.ceil(e/2);t=Math.ceil(t/2)}}InclusionTree.prototype={reset:function InclusionTree_reset(e,t,r){for(var n=0;n<this.levels.length;){var i=this.levels[n],o=e+t*i.width;i.index=o;var a=i.items[o];if(255===a)break;if(a>r){this.currentLevel=n;this.propagateValues();return!1}e>>=1;t>>=1;n++}this.currentLevel=n-1;return!0},incrementValue:function InclusionTree_incrementValue(e){var t=this.levels[this.currentLevel];t.items[t.index]=e+1;this.propagateValues()},propagateValues:function InclusionTree_propagateValues(){for(var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];--e>=0;)(t=this.levels[e]).items[t.index]=r},nextLevel:function InclusionTree_nextLevel(){var e=this.currentLevel,t=this.levels[e],r=t.items[t.index];t.items[t.index]=255;if(--e<0)return!1;this.currentLevel=e;(t=this.levels[e]).items[t.index]=r;return!0}};return InclusionTree}(),s=function BitModelClosure(){var e=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),t=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),r=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function BitModel(n,i,o,a,s){this.width=n;this.height=i;var c;c="HH"===o?r:"HL"===o?t:e;this.contextLabelTable=c;var u,f=n*i;this.neighborsSignificance=new Uint8Array(f);this.coefficentsSign=new Uint8Array(f);u=s>14?new Uint32Array(f):s>6?new Uint16Array(f):new Uint8Array(f);this.coefficentsMagnitude=u;this.processingFlags=new Uint8Array(f);var l=new Uint8Array(f);if(0!==a)for(var p=0;p<f;p++)l[p]=a;this.bitsDecoded=l;this.reset()}BitModel.prototype={setDecoder:function BitModel_setDecoder(e){this.decoder=e},reset:function BitModel_reset(){this.contexts=new Int8Array(19);this.contexts[0]=8;this.contexts[17]=92;this.contexts[18]=6},setNeighborsSignificance:function BitModel_setNeighborsSignificance(e,t,r){var n,i=this.neighborsSignificance,o=this.width,a=this.height,s=t>0,c=t+1<o;if(e>0){n=r-o;s&&(i[n-1]+=16);c&&(i[n+1]+=16);i[n]+=4}if(e+1<a){n=r+o;s&&(i[n-1]+=16);c&&(i[n+1]+=16);i[n]+=4}s&&(i[r-1]+=1);c&&(i[r+1]+=1);i[r]|=128},runSignificancePropagationPass:function BitModel_runSignificancePropagationPass(){for(var e=this.decoder,t=this.width,r=this.height,n=this.coefficentsMagnitude,i=this.coefficentsSign,o=this.neighborsSignificance,a=this.processingFlags,s=this.contexts,c=this.contextLabelTable,u=this.bitsDecoded,f=0;f<r;f+=4)for(var l=0;l<t;l++)for(var p=f*t+l,d=0;d<4;d++,p+=t){var h=f+d;if(h>=r)break;a[p]&=-2;if(!n[p]&&o[p]){var g=c[o[p]];if(e.readBit(s,g)){var v=this.decodeSignBit(h,l,p);i[p]=v;n[p]=1;this.setNeighborsSignificance(h,l,p);a[p]|=2}u[p]++;a[p]|=1}}},decodeSignBit:function BitModel_decodeSignBit(e,t,r){var n,i,o,a,s,c,u=this.width,f=this.height,l=this.coefficentsMagnitude,p=this.coefficentsSign;a=t>0&&0!==l[r-1];if(t+1<u&&0!==l[r+1]){o=p[r+1];n=a?1-o-(i=p[r-1]):1-o-o}else n=a?1-(i=p[r-1])-i:0;var d=3*n;a=e>0&&0!==l[r-u];if(e+1<f&&0!==l[r+u]){o=p[r+u];n=a?1-o-(i=p[r-u])+d:1-o-o+d}else n=a?1-(i=p[r-u])-i+d:d;if(n>=0){s=9+n;c=this.decoder.readBit(this.contexts,s)}else{s=9-n;c=1^this.decoder.readBit(this.contexts,s)}return c},runMagnitudeRefinementPass:function BitModel_runMagnitudeRefinementPass(){for(var e,t=this.decoder,r=this.width,n=this.height,i=this.coefficentsMagnitude,o=this.neighborsSignificance,a=this.contexts,s=this.bitsDecoded,c=this.processingFlags,u=r*n,f=4*r,l=0;l<u;l=e){e=Math.min(u,l+f);for(var p=0;p<r;p++)for(var d=l+p;d<e;d+=r)if(i[d]&&0==(1&c[d])){var h=16;if(0!=(2&c[d])){c[d]^=2;h=0===(127&o[d])?15:14}var g=t.readBit(a,h);i[d]=i[d]<<1|g;s[d]++;c[d]|=1}}},runCleanupPass:function BitModel_runCleanupPass(){for(var e,t=this.decoder,r=this.width,n=this.height,i=this.neighborsSignificance,o=this.coefficentsMagnitude,a=this.coefficentsSign,s=this.contexts,c=this.contextLabelTable,u=this.bitsDecoded,f=this.processingFlags,l=r,p=2*r,d=3*r,h=0;h<n;h=e){e=Math.min(h+4,n);for(var g=h*r,v=h+3<n,m=0;m<r;m++){var y,b=g+m,x=0,w=b,S=h;if(v&&0===f[b]&&0===f[b+l]&&0===f[b+p]&&0===f[b+d]&&0===i[b]&&0===i[b+l]&&0===i[b+p]&&0===i[b+d]){if(!t.readBit(s,18)){u[b]++;u[b+l]++;u[b+p]++;u[b+d]++;continue}if(0!==(x=t.readBit(s,17)<<1|t.readBit(s,17))){S=h+x;w+=x*r}y=this.decodeSignBit(S,m,w);a[w]=y;o[w]=1;this.setNeighborsSignificance(S,m,w);f[w]|=2;w=b;for(var _=h;_<=S;_++,w+=r)u[w]++;x++}for(S=h+x;S<e;S++,w+=r)if(!o[w]&&0==(1&f[w])){var T=c[i[w]];if(1===t.readBit(s,T)){y=this.decodeSignBit(S,m,w);a[w]=y;o[w]=1;this.setNeighborsSignificance(S,m,w);f[w]|=2}u[w]++}}}},checkSegmentationSymbol:function BitModel_checkSegmentationSymbol(){var e=this.decoder,t=this.contexts;if(10!==(e.readBit(t,17)<<3|e.readBit(t,17)<<2|e.readBit(t,17)<<1|e.readBit(t,17)))throw new a("Invalid segmentation symbol")}};return BitModel}(),c=function TransformClosure(){function Transform(){}Transform.prototype.calculate=function transformCalculate(e,t,r){for(var n=e[0],i=1,o=e.length;i<o;i++)n=this.iterate(n,e[i],t,r);return n};Transform.prototype.extend=function extend(e,t,r){var n=t-1,i=t+1,o=t+r-2,a=t+r;e[n--]=e[i++];e[a++]=e[o--];e[n--]=e[i++];e[a++]=e[o--];e[n--]=e[i++];e[a++]=e[o--];e[n]=e[i];e[a]=e[o]};Transform.prototype.iterate=function Transform_iterate(e,t,r,n){var i,o,a,s,c,u,f=e.width,l=e.height,p=e.items,d=t.width,h=t.height,g=t.items;for(a=0,i=0;i<l;i++){s=2*i*d;for(o=0;o<f;o++,a++,s+=2)g[s]=p[a]}p=e.items=null;var v=new Float32Array(d+8);if(1===d){if(0!=(1&r))for(u=0,a=0;u<h;u++,a+=d)g[a]*=.5}else for(u=0,a=0;u<h;u++,a+=d){v.set(g.subarray(a,a+d),4);this.extend(v,4,d);this.filter(v,4,d);g.set(v.subarray(4,4+d),a)}var m=16,y=[];for(i=0;i<m;i++)y.push(new Float32Array(h+8));var b,x=0;e=4+h;if(1===h){if(0!=(1&n))for(c=0;c<d;c++)g[c]*=.5}else for(c=0;c<d;c++){if(0===x){m=Math.min(d-c,m);for(a=c,s=4;s<e;a+=d,s++)for(b=0;b<m;b++)y[b][s]=g[a+b];x=m}var w=y[--x];this.extend(w,4,h);this.filter(w,4,h);if(0===x){a=c-m+1;for(s=4;s<e;a+=d,s++)for(b=0;b<m;b++)g[a+b]=y[b][s]}}return{width:d,height:h,items:g}};return Transform}(),u=function IrreversibleTransformClosure(){function IrreversibleTransform(){c.call(this)}IrreversibleTransform.prototype=Object.create(c.prototype);IrreversibleTransform.prototype.filter=function irreversibleTransformFilter(e,t,r){var n,i,o,a,s=r>>1,c=-1.586134342059924,u=-.052980118572961,f=.882911075530934,l=.443506852043971,p=1.230174104914001;n=(t|=0)-3;for(i=s+4;i--;n+=2)e[n]*=.8128930661159609;o=l*e[(n=t-2)-1];for(i=s+3;i--;n+=2){a=l*e[n+1];e[n]=p*e[n]-o-a;if(!i--)break;o=l*e[(n+=2)+1];e[n]=p*e[n]-o-a}o=f*e[(n=t-1)-1];for(i=s+2;i--;n+=2){a=f*e[n+1];e[n]-=o+a;if(!i--)break;o=f*e[(n+=2)+1];e[n]-=o+a}o=u*e[(n=t)-1];for(i=s+1;i--;n+=2){a=u*e[n+1];e[n]-=o+a;if(!i--)break;o=u*e[(n+=2)+1];e[n]-=o+a}if(0!==s){o=c*e[(n=t+1)-1];for(i=s;i--;n+=2){a=c*e[n+1];e[n]-=o+a;if(!i--)break;o=c*e[(n+=2)+1];e[n]-=o+a}}};return IrreversibleTransform}(),f=function ReversibleTransformClosure(){function ReversibleTransform(){c.call(this)}ReversibleTransform.prototype=Object.create(c.prototype);ReversibleTransform.prototype.filter=function reversibleTransformFilter(e,t,r){var n,i,o=r>>1;for(n=t|=0,i=o+1;i--;n+=2)e[n]-=e[n-1]+e[n+1]+2>>2;for(n=t+1,i=o;i--;n+=2)e[n]+=e[n-1]+e[n+1]>>1};return ReversibleTransform}();return JpxImage}();t.JpxImage=s}])}));
|