UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

46 lines 1.79 MB
window.ngxZone.runOutsideAngular(() => {
/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * @licend The above is the entire license notice for the
 * JavaScript code in this page
 */
!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?globalThis["pdfjs-dist/build/pdf"]=module.exports=t.pdfjsLib=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],(()=>t.pdfjsLib=r())):"object"==typeof exports?globalThis["pdfjs-dist/build/pdf"]=exports["pdfjs-dist/build/pdf"]=t.pdfjsLib=r():t["pdfjs-dist/build/pdf"]=t.pdfjsLib=r()}(globalThis,(()=>(()=>{"use strict";var __webpack_modules__=[,(t,r,i)=>{i(2);i(71);i(73);i(85);i(90);i(92);i(104);Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.RenderingIntentFlag=r.PromiseCapability=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.MAX_IMAGE_SIZE_TO_CACHE=r.LINE_FACTOR=r.LINE_DESCENT_FACTOR=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FeatureTest=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.BASELINE_FACTOR=r.AnnotationType=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationEditorType=r.AnnotationEditorPrefix=r.AnnotationEditorParamsType=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=bytesToString;r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(i&&"string"==typeof t){if(i.addDefaultProtocol&&t.startsWith("www.")){var a=t.match(/\./g);(null==a?void 0:a.length)>=2&&(t="http://".concat(t))}if(i.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var o=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":case"capacitor":return!0;default:return!1}}(o))return o}catch(t){}return null};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")};r.getUuid=function getUuid(){var t,r;if("undefined"!=typeof crypto&&"function"==typeof(null===(t=crypto)||void 0===t?void 0:t.randomUUID))return crypto.randomUUID();var i=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof(null===(r=crypto)||void 0===r?void 0:r.getRandomValues))crypto.getRandomValues(i);else for(var a=0;a<32;a++)i[a]=Math.floor(255*Math.random());return bytesToString(i)};r.getVerbosityLevel=function getVerbosityLevel(){return l};r.info=function info(t){l>=o.INFOS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Info: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Info: ".concat(t)):console.log("Info: ".concat(t)))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&void 0!==(null==t?void 0:t.byteLength)};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var i=0,a=t.length;i<a;i++)if(t[i]!==r[i])return!1;return!0};r.isNodeJS=void 0;r.normalizeUnicode=function normalizeUnicode(t){if(!E){E=/([\xA0\xB5\u037E\u0EB3\u2000-\u200A\u202F\u2126\uFB00-\uFB04\uFB06\uFB20-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBA1\uFBA4-\uFBA9\uFBAE-\uFBB1\uFBD3-\uFBDC\uFBDE-\uFBE7\uFBEA-\uFBF8\uFBFC\uFBFD\uFC00-\uFC5D\uFC64-\uFCF1\uFCF5-\uFD3D\uFD88\uFDF4\uFDFA\uFDFB\uFE71\uFE77\uFE79\uFE7B\uFE7D]+)|(\uFB05+)/g;x=new Map([["ſt","ſt"]])}return t.replaceAll(E,(function(t,r,i){return r?r.normalize("NFKC"):x.get(i)}))};r.objectFromMap=function objectFromMap(t){var r,i=Object.create(null),a=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}(t);try{for(a.s();!(r=a.n()).done;){var o=(c=r.value,h=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(c)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(c,h)||_unsupportedIterableToArray(c,h)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=o[0],u=o[1];i[l]=u}}catch(t){a.e(t)}finally{a.f()}var c,h;return i};r.objectSize=function objectSize(t){return Object.keys(t).length};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(l=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){if(t[0]>="ï"){var r;"þ"===t[0]&&"ÿ"===t[1]?r="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?r="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(r="utf-8");if(r)try{var i=new TextDecoder(r,{fatal:!0}),a=stringToBytes(t);return i.decode(a)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var o=[],l=0,u=t.length;l<u;l++){var c=P[t.charCodeAt(l)];o.push(c?String.fromCharCode(c):t.charAt(l))}return o.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;i(112);i(120);i(122);i(123);i(131);i(105);i(135);i(140);i(146);i(148);i(149);i(152);i(163);i(164);i(165);i(166);i(167);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(245);i(246);i(247);i(248);i(249);i(251);i(255);i(257);i(258);i(259);i(280);i(289);i(291);i(292);i(300);i(301);i(302);function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var a=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=a;r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.MAX_IMAGE_SIZE_TO_CACHE=1e7;r.LINE_FACTOR=1.35;r.LINE_DESCENT_FACTOR=.35;r.BASELINE_FACTOR=.25925925925925924;r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};r.AnnotationEditorPrefix="pdfjs_internal_editor_";r.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};r.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var l=o.WARNINGS;function warn(t){l>=o.WARNINGS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Warning: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Warning: ".concat(t)):console.log("Warning: ".concat(t)))}function unreachable(t){throw new Error(t)}function shadow(t,r,i){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,r,{value:i,enumerable:!a,configurable:!0,writable:!1});return i}var u=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=u;var c=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,i){var a;_classCallCheck(this,PasswordException);(a=r.call(this,t,"PasswordException")).code=i;return a}return _createClass(PasswordException)}(u);r.PasswordException=c;var h=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,i){var a;_classCallCheck(this,UnknownErrorException);(a=r.call(this,t,"UnknownErrorException")).details=i;return a}return _createClass(UnknownErrorException)}(u);r.UnknownErrorException=h;var d=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(u);r.InvalidPDFException=d;var p=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(u);r.MissingPDFException=p;var v=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,i){var a;_classCallCheck(this,UnexpectedResponseException);(a=r.call(this,t,"UnexpectedResponseException")).status=i;return a}return _createClass(UnexpectedResponseException)}(u);r.UnexpectedResponseException=v;var y=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(u);r.FormatError=y;var g=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(u);r.AbortException=g;function bytesToString(t){"object"===_typeof(t)&&void 0!==(null==t?void 0:t.length)||unreachable("Invalid argument for bytesToString");var r=t.length,i=8192;if(r<i)return String.fromCharCode.apply(null,t);for(var a=[],o=0;o<r;o+=i){var l=Math.min(o+i,r),u=t.subarray(o,l);a.push(String.fromCharCode.apply(null,u))}return a.join("")}function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,i=new Uint8Array(r),a=0;a<r;++a)i[a]=255&t.charCodeAt(a);return i}var m=function(){function FeatureTest(){_classCallCheck(this,FeatureTest)}_createClass(FeatureTest,null,[{key:"isLittleEndian",get:function get(){return shadow(this,"isLittleEndian",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}},{key:"isEvalSupported",get:function get(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function get(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function get(){return"undefined"==typeof navigator?shadow(this,"platform",{isWin:!1,isMac:!1}):shadow(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}},{key:"isCSSRoundSupported",get:function get(){var t,r;return shadow(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(r=t.supports)||void 0===r?void 0:r.call(t,"width: round(1.5px, 1px)"))}}]);return FeatureTest}();r.FeatureTest=m;var b=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),w=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,i){return"#".concat(b[t]).concat(b[r]).concat(b[i])}},{key:"scaleMinMax",value:function scaleMinMax(t,r){var i;if(t[0]){if(t[0]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[0];r[1]*=t[0];if(t[3]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[3];r[3]*=t[3]}else{i=r[0];r[0]=r[2];r[2]=i;i=r[1];r[1]=r[3];r[3]=i;if(t[1]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[1];r[3]*=t[1];if(t[2]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[2];r[1]*=t[2]}r[0]+=t[4];r[1]+=t[4];r[2]+=t[5];r[3]+=t[5]}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var i=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/i,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/i]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var i=this.applyTransform(t,r),a=this.applyTransform(t.slice(2,4),r),o=this.applyTransform([t[0],t[3]],r),l=this.applyTransform([t[2],t[1]],r);return[Math.min(i[0],a[0],o[0],l[0]),Math.min(i[1],a[1],o[1],l[1]),Math.max(i[0],a[0],o[0],l[0]),Math.max(i[1],a[1],o[1],l[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],i=t[0]*r[0]+t[1]*r[2],a=t[0]*r[1]+t[1]*r[3],o=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],u=(i+l)/2,c=Math.sqrt(Math.pow(i+l,2)-4*(i*l-o*a))/2,h=u+c||1,d=u-c||1;return[Math.sqrt(h),Math.sqrt(d)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){var i=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),a=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(i>a)return null;var o=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),l=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return o>l?null:[i,o,a,l]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,i,a,o,l,u,c){for(var h,d,p,v,y,g,m,b,w=[],P=[[],[]],A=0;A<2;++A){if(0===A){d=6*t-12*i+6*o;h=-3*t+9*i-9*o+3*u;p=3*i-3*t}else{d=6*r-12*a+6*l;h=-3*r+9*a-9*l+3*c;p=3*a-3*r}if(Math.abs(h)<1e-12){if(Math.abs(d)<1e-12)continue;0<(v=-p/d)&&v<1&&w.push(v)}else{m=d*d-4*p*h;b=Math.sqrt(m);if(!(m<0)){0<(y=(-d+b)/(2*h))&&y<1&&w.push(y);0<(g=(-d-b)/(2*h))&&g<1&&w.push(g)}}}for(var S,E=w.length,x=E;E--;){S=1-(v=w[E]);P[0][E]=S*S*S*t+3*S*S*v*i+3*S*v*v*o+v*v*v*u;P[1][E]=S*S*S*r+3*S*S*v*a+3*S*v*v*l+v*v*v*c}P[0][x]=t;P[1][x]=r;P[0][x+1]=u;P[1][x+1]=c;P[0].length=P[1].length=x+2;return[Math.min.apply(Math,_toConsumableArray(P[0])),Math.min.apply(Math,_toConsumableArray(P[1])),Math.max.apply(Math,_toConsumableArray(P[0])),Math.max.apply(Math,_toConsumableArray(P[1]))]}}]);return Util}();r.Util=w;var P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToUTF8String(t){return decodeURIComponent(escape(t))}var A=new WeakMap,S=function(){function PromiseCapability(){var t=this;_classCallCheck(this,PromiseCapability);_classPrivateFieldInitSpec(this,A,{writable:!0,value:!1});this.promise=new Promise((function(r,i){t.resolve=function(i){_classPrivateFieldSet(t,A,!0);r(i)};t.reject=function(r){_classPrivateFieldSet(t,A,!0);i(r)}}))}_createClass(PromiseCapability,[{key:"settled",get:function get(){return function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,A)}}]);return PromiseCapability}();r.PromiseCapability=S;var E=null,x=null},(t,r,i)=>{var a=i(3),o=i(7),l=i(40),u=i(69),c=i(70);a({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!c},{getPrototypeOf:function getPrototypeOf(t){return u(l(t))}})},(t,r,i)=>{var a=i(4),o=i(5).f,l=i(44),u=i(48),c=i(38),h=i(56),d=i(68);t.exports=function(t,r){var i,p,v,y,g,m=t.target,b=t.global,w=t.stat;if(i=b?a:w?a[m]||c(m,{}):(a[m]||{}).prototype)for(p in r){y=r[p];v=t.dontCallGetSet?(g=o(i,p))&&g.value:i[p];if(!d(b?p:m+(w?".":"#")+p,t.forced)&&void 0!==v){if(typeof y==typeof v)continue;h(y,v)}(t.sham||v&&v.sham)&&l(y,"sham",!0);u(i,p,y,t)}}},function(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(t,r,i)=>{var a=i(6),o=i(8),l=i(10),u=i(11),c=i(12),h=i(18),d=i(39),p=i(42),v=Object.getOwnPropertyDescriptor;r.f=a?v:function getOwnPropertyDescriptor(t,r){t=c(t);r=h(r);if(p)try{return v(t,r)}catch(t){}if(d(t,r))return u(!o(l.f,t,r),t[r])}},(t,r,i)=>{var a=i(7);t.exports=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r,i)=>{var a=i(9),o=Function.prototype.call;t.exports=a?o.bind(o):function(){return o.apply(o,arguments)}},(t,r,i)=>{var a=i(7);t.exports=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},(t,r)=>{var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,o=a&&!i.call({1:2},1);r.f=o?function propertyIsEnumerable(t){var r=a(this,t);return!!r&&r.enumerable}:i},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,i)=>{var a=i(13),o=i(16);t.exports=function(t){return a(o(t))}},(t,r,i)=>{var a=i(14),o=i(7),l=i(15),u=Object,c=a("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===l(t)?c(t,""):u(t)}:u},(t,r,i)=>{var a=i(9),o=Function.prototype,l=o.call,u=a&&o.bind.bind(l,l);t.exports=a?u:function(t){return function(){return l.apply(t,arguments)}}},(t,r,i)=>{var a=i(14),o=a({}.toString),l=a("".slice);t.exports=function(t){return l(o(t),8,-1)}},(t,r,i)=>{var a=i(17),o=TypeError;t.exports=function(t){if(a(t))throw o("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,r,i)=>{var a=i(19),o=i(23);t.exports=function(t){var r=a(t,"string");return o(r)?r:r+""}},(t,r,i)=>{var a=i(8),o=i(20),l=i(23),u=i(30),c=i(33),h=i(34),d=TypeError,p=h("toPrimitive");t.exports=function(t,r){if(!o(t)||l(t))return t;var i,h=u(t,p);if(h){void 0===r&&(r="default");i=a(h,t,r);if(!o(i)||l(i))return i;throw d("Can't convert object to primitive value")}void 0===r&&(r="number");return c(t,r)}},(t,r,i)=>{var a=i(21),o=i(22),l=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:a(t)||t===l}:function(t){return"object"==typeof t?null!==t:a(t)}},(t,r,i)=>{var a=i(22),o=a.all;t.exports=a.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},t=>{var r="object"==typeof document&&document.all,i=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:i}},(t,r,i)=>{var a=i(24),o=i(21),l=i(25),u=i(26),c=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var r=a("Symbol");return o(r)&&l(r.prototype,c(t))}},(t,r,i)=>{var a=i(4),o=i(21);t.exports=function(t,r){return arguments.length<2?(i=a[t],o(i)?i:void 0):a[t]&&a[t][r];var i}},(t,r,i)=>{var a=i(14);t.exports=a({}.isPrototypeOf)},(t,r,i)=>{var a=i(27);t.exports=a&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,i)=>{var a=i(28),o=i(7),l=i(4).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!l(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&a&&a<41}))},(t,r,i)=>{var a,o,l=i(4),u=i(29),c=l.process,h=l.Deno,d=c&&c.versions||h&&h.version,p=d&&d.v8;p&&(o=(a=p.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1]));!o&&u&&(!(a=u.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=u.match(/Chrome\/(\d+)/))&&(o=+a[1]);t.exports=o},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,r,i)=>{var a=i(31),o=i(17);t.exports=function(t,r){var i=t[r];return o(i)?void 0:a(i)}},(t,r,i)=>{var a=i(21),o=i(32),l=TypeError;t.exports=function(t){if(a(t))return t;throw l(o(t)+" is not a function")}},t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},(t,r,i)=>{var a=i(8),o=i(21),l=i(20),u=TypeError;t.exports=function(t,r){var i,c;if("string"===r&&o(i=t.toString)&&!l(c=a(i,t)))return c;if(o(i=t.valueOf)&&!l(c=a(i,t)))return c;if("string"!==r&&o(i=t.toString)&&!l(c=a(i,t)))return c;throw u("Can't convert object to primitive value")}},(t,r,i)=>{var a=i(4),o=i(35),l=i(39),u=i(41),c=i(27),h=i(26),d=a.Symbol,p=o("wks"),v=h?d.for||d:d&&d.withoutSetter||u;t.exports=function(t){l(p,t)||(p[t]=c&&l(d,t)?d[t]:v("Symbol."+t));return p[t]}},(t,r,i)=>{var a=i(36),o=i(37);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.32.1",mode:a?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,i)=>{var a=i(4),o=i(38),l="__core-js_shared__",u=a[l]||o(l,{});t.exports=u},(t,r,i)=>{var a=i(4),o=Object.defineProperty;t.exports=function(t,r){try{o(a,t,{value:r,configurable:!0,writable:!0})}catch(i){a[t]=r}return r}},(t,r,i)=>{var a=i(14),o=i(40),l=a({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return l(o(t),r)}},(t,r,i)=>{var a=i(16),o=Object;t.exports=function(t){return o(a(t))}},(t,r,i)=>{var a=i(14),o=0,l=Math.random(),u=a(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+l,36)}},(t,r,i)=>{var a=i(6),o=i(7),l=i(43);t.exports=!a&&!o((function(){return 7!==Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},(t,r,i)=>{var a=i(4),o=i(20),l=a.document,u=o(l)&&o(l.createElement);t.exports=function(t){return u?l.createElement(t):{}}},(t,r,i)=>{var a=i(6),o=i(45),l=i(11);t.exports=a?function(t,r,i){return o.f(t,r,l(1,i))}:function(t,r,i){t[r]=i;return t}},(t,r,i)=>{var a=i(6),o=i(42),l=i(46),u=i(47),c=i(18),h=TypeError,d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v="enumerable",y="configurable",g="writable";r.f=a?l?function defineProperty(t,r,i){u(t);r=c(r);u(i);if("function"==typeof t&&"prototype"===r&&"value"in i&&g in i&&!i[g]){var a=p(t,r);if(a&&a[g]){t[r]=i.value;i={configurable:y in i?i[y]:a[y],enumerable:v in i?i[v]:a[v],writable:!1}}}return d(t,r,i)}:d:function defineProperty(t,r,i){u(t);r=c(r);u(i);if(o)try{return d(t,r,i)}catch(t){}if("get"in i||"set"in i)throw h("Accessors not supported");"value"in i&&(t[r]=i.value);return t}},(t,r,i)=>{var a=i(6),o=i(7);t.exports=a&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,i)=>{var a=i(20),o=String,l=TypeError;t.exports=function(t){if(a(t))return t;throw l(o(t)+" is not an object")}},(t,r,i)=>{var a=i(21),o=i(45),l=i(49),u=i(38);t.exports=function(t,r,i,c){c||(c={});var h=c.enumerable,d=void 0!==c.name?c.name:r;a(i)&&l(i,d,c);if(c.global)h?t[r]=i:u(r,i);else{try{c.unsafe?t[r]&&(h=!0):delete t[r]}catch(t){}h?t[r]=i:o.f(t,r,{value:i,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return t}},(t,r,i)=>{var a=i(14),o=i(7),l=i(21),u=i(39),c=i(6),h=i(50).CONFIGURABLE,d=i(51),p=i(52),v=p.enforce,y=p.get,g=String,m=Object.defineProperty,b=a("".slice),w=a("".replace),P=a([].join),A=c&&!o((function(){return 8!==m((function(){}),"length",{value:8}).length})),S=String(String).split("String"),E=t.exports=function(t,r,i){"Symbol("===b(g(r),0,7)&&(r="["+w(g(r),/^Symbol\(([^)]*)\)/,"$1")+"]");i&&i.getter&&(r="get "+r);i&&i.setter&&(r="set "+r);(!u(t,"name")||h&&t.name!==r)&&(c?m(t,"name",{value:r,configurable:!0}):t.name=r);A&&i&&u(i,"arity")&&t.length!==i.arity&&m(t,"length",{value:i.arity});try{i&&u(i,"constructor")&&i.constructor?c&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var a=v(t);u(a,"source")||(a.source=P(S,"string"==typeof r?r:""));return t};Function.prototype.toString=E((function toString(){return l(this)&&y(this).source||d(this)}),"toString")},(t,r,i)=>{var a=i(6),o=i(39),l=Function.prototype,u=a&&Object.getOwnPropertyDescriptor,c=o(l,"name"),h=c&&"something"===function something(){}.name,d=c&&(!a||a&&u(l,"name").configurable);t.exports={EXISTS:c,PROPER:h,CONFIGURABLE:d}},(t,r,i)=>{var a=i(14),o=i(21),l=i(37),u=a(Function.toString);o(l.inspectSource)||(l.inspectSource=function(t){return u(t)});t.exports=l.inspectSource},(t,r,i)=>{var a,o,l,u=i(53),c=i(4),h=i(20),d=i(44),p=i(39),v=i(37),y=i(54),g=i(55),m="Object already initialized",b=c.TypeError,w=c.WeakMap;if(u||v.state){var P=v.state||(v.state=new w);P.get=P.get;P.has=P.has;P.set=P.set;a=function(t,r){if(P.has(t))throw b(m);r.facade=t;P.set(t,r);return r};o=function(t){return P.get(t)||{}};l=function(t){return P.has(t)}}else{var A=y("state");g[A]=!0;a=function(t,r){if(p(t,A))throw b(m);r.facade=t;d(t,A,r);return r};o=function(t){return p(t,A)?t[A]:{}};l=function(t){return p(t,A)}}t.exports={set:a,get:o,has:l,enforce:function(t){return l(t)?o(t):a(t,{})},getterFor:function(t){return function(r){var i;if(!h(r)||(i=o(r)).type!==t)throw b("Incompatible receiver, "+t+" required");return i}}}},(t,r,i)=>{var a=i(4),o=i(21),l=a.WeakMap;t.exports=o(l)&&/native code/.test(String(l))},(t,r,i)=>{var a=i(35),o=i(41),l=a("keys");t.exports=function(t){return l[t]||(l[t]=o(t))}},t=>{t.exports={}},(t,r,i)=>{var a=i(39),o=i(57),l=i(5),u=i(45);t.exports=function(t,r,i){for(var c=o(r),h=u.f,d=l.f,p=0;p<c.length;p++){var v=c[p];a(t,v)||i&&a(i,v)||h(t,v,d(r,v))}}},(t,r,i)=>{var a=i(24),o=i(14),l=i(58),u=i(67),c=i(47),h=o([].concat);t.exports=a("Reflect","ownKeys")||function ownKeys(t){var r=l.f(c(t)),i=u.f;return i?h(r,i(t)):r}},(t,r,i)=>{var a=i(59),o=i(66).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return a(t,o)}},(t,r,i)=>{var a=i(14),o=i(39),l=i(12),u=i(60).indexOf,c=i(55),h=a([].push);t.exports=function(t,r){var i,a=l(t),d=0,p=[];for(i in a)!o(c,i)&&o(a,i)&&h(p,i);for(;r.length>d;)o(a,i=r[d++])&&(~u(p,i)||h(p,i));return p}},(t,r,i)=>{var a=i(12),o=i(61),l=i(64),createMethod=function(t){return function(r,i,u){var c,h=a(r),d=l(h),p=o(u,d);if(t&&i!=i){for(;d>p;)if((c=h[p++])!=c)return!0}else for(;d>p;p++)if((t||p in h)&&h[p]===i)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,i)=>{var a=i(62),o=Math.max,l=Math.min;t.exports=function(t,r){var i=a(t);return i<0?o(i+r,0):l(i,r)}},(t,r,i)=>{var a=i(63);t.exports=function(t){var r=+t;return r!=r||0===r?0:a(r)}},t=>{var r=Math.ceil,i=Math.floor;t.exports=Math.trunc||function trunc(t){var a=+t;return(a>0?i:r)(a)}},(t,r,i)=>{var a=i(65);t.exports=function(t){return a(t.length)}},(t,r,i)=>{var a=i(62),o=Math.min;t.exports=function(t){return t>0?o(a(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,i)=>{var a=i(7),o=i(21),l=/#|\.prototype\./,isForced=function(t,r){var i=c[u(t)];return i===d||i!==h&&(o(r)?a(r):!!r)},u=isForced.normalize=function(t){return String(t).replace(l,".").toLowerCase()},c=isForced.data={},h=isForced.NATIVE="N",d=isForced.POLYFILL="P";t.exports=isForced},(t,r,i)=>{var a=i(39),o=i(21),l=i(40),u=i(54),c=i(70),h=u("IE_PROTO"),d=Object,p=d.prototype;t.exports=c?d.getPrototypeOf:function(t){var r=l(t);if(a(r,h))return r[h];var i=r.constructor;return o(i)&&r instanceof i?i.prototype:r instanceof d?p:null}},(t,r,i)=>{var a=i(7);t.exports=!a((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,i)=>{var a=i(3),o=i(4),l=i(72);a({global:!0},{Reflect:{}});l(o.Reflect,"Reflect",!0)},(t,r,i)=>{var a=i(45).f,o=i(39),l=i(34)("toStringTag");t.exports=function(t,r,i){t&&!i&&(t=t.prototype);t&&!o(t,l)&&a(t,l,{configurable:!0,value:r})}},(t,r,i)=>{var a=i(3),o=i(24),l=i(74),u=i(75),c=i(77),h=i(47),d=i(20),p=i(81),v=i(7),y=o("Reflect","construct"),g=Object.prototype,m=[].push,b=v((function(){function F(){}return!(y((function(){}),[],F)instanceof F)})),w=!v((function(){y((function(){}))})),P=b||w;a({target:"Reflect",stat:!0,forced:P,sham:P},{construct:function construct(t,r){c(t);h(r);var i=arguments.length<3?t:c(arguments[2]);if(w&&!b)return y(t,r,i);if(t===i){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var a=[null];l(m,a,r);return new(l(u,t,a))}var o=i.prototype,v=p(d(o)?o:g),P=l(t,v,r);return d(P)?P:v}})},(t,r,i)=>{var a=i(9),o=Function.prototype,l=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(a?u.bind(l):function(){return u.apply(l,arguments)})},(t,r,i)=>{var a=i(14),o=i(31),l=i(20),u=i(39),c=i(76),h=i(9),d=Function,p=a([].concat),v=a([].join),y={};t.exports=h?d.bind:function bind(t){var r=o(this),i=r.prototype,a=c(arguments,1),h=function bound(){var i=p(a,c(arguments));return this instanceof h?function(t,r,i){if(!u(y,r)){for(var a=[],o=0;o<r;o++)a[o]="a["+o+"]";y[r]=d("C,a","return new C("+v(a,",")+")")}return y[r](t,i)}(r,i.length,i):r.apply(t,i)};l(i)&&(h.prototype=i);return h}},(t,r,i)=>{var a=i(14);t.exports=a([].slice)},(t,r,i)=>{var a=i(78),o=i(32),l=TypeError;t.exports=function(t){if(a(t))return t;throw l(o(t)+" is not a constructor")}},(t,r,i)=>{var a=i(14),o=i(7),l=i(21),u=i(79),c=i(24),h=i(51),noop=function(){},d=[],p=c("Reflect","construct"),v=/^\s*(?:class|function)\b/,y=a(v.exec),g=!v.exec(noop),m=function isConstructor(t){if(!l(t))return!1;try{p(noop,d,t);return!0}catch(t){return!1}},b=function isConstructor(t){if(!l(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!y(v,h(t))}catch(t){return!0}};b.sham=!0;t.exports=!p||o((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?b:m},(t,r,i)=>{var a=i(80),o=i(21),l=i(15),u=i(34)("toStringTag"),c=Object,h="Arguments"===l(function(){return arguments}());t.exports=a?l:function(t){var r,i,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=c(t),u))?i:h?l(r):"Object"===(a=l(r))&&o(r.callee)?"Arguments":a}},(t,r,i)=>{var a={};a[i(34)("toStringTag")]="z";t.exports="[object z]"===String(a)},(t,r,i)=>{var a,o=i(47),l=i(82),u=i(66),c=i(55),h=i(84),d=i(43),p=i(54),v="prototype",y="script",g=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+y+">"+t+"</"+y+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{a=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&a?NullProtoObjectViaActiveX(a):function(){var t,r=d("iframe"),i="java"+y+":";r.style.display="none";h.appendChild(r);r.src=String(i);(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(a);for(var t=u.length;t--;)delete NullProtoObject[v][u[t]];return NullProtoObject()};c[g]=!0;t.exports=Object.create||function create(t,r){var i;if(null!==t){EmptyConstructor[v]=o(t);i=new EmptyConstructor;EmptyConstructor[v]=null;i[g]=t}else i=NullProtoObject();return void 0===r?i:l.f(i,r)}},(t,r,i)=>{var a=i(6),o=i(46),l=i(45),u=i(47),c=i(12),h=i(83);r.f=a&&!o?Object.defineProperties:function defineProperties(t,r){u(t);for(var i,a=c(r),o=h(r),d=o.length,p=0;d>p;)l.f(t,i=o[p++],a[i]);return t}},(t,r,i)=>{var a=i(59),o=i(66);t.exports=Object.keys||function keys(t){return a(t,o)}},(t,r,i)=>{var a=i(24);t.exports=a("document","documentElement")},(t,r,i)=>{var a=i(86),o=i(89);a("toPrimitive");o()},(t,r,i)=>{var a=i(87),o=i(39),l=i(88),u=i(45).f;t.exports=function(t){var r=a.Symbol||(a.Symbol={});o(r,t)||u(r,t,{value:l.f(t)})}},(t,r,i)=>{var a=i(4);t.exports=a},(t,r,i)=>{var a=i(34);r.f=a},(t,r,i)=>{var a=i(8),o=i(24),l=i(34),u=i(48);t.exports=function(){var t=o("Symbol"),r=t&&t.prototype,i=r&&r.valueOf,c=l("toPrimitive");r&&!r[c]&&u(r,c,(function(t){return a(i,this)}),{arity:1})}},(t,r,i)=>{var a=i(39),o=i(48),l=i(91),u=i(34)("toPrimitive"),c=Date.prototype;a(c,u)||o(c,u,l)},(t,r,i)=>{var a=i(47),o=i(33),l=TypeError;t.exports=function(t){a(this);if("string"===t||"default"===t)t="string";else if("number"!==t)throw l("Incorrect hint");return o(this,t)}},(t,r,i)=>{var a=i(3),o=i(93);a({target:"Array",stat:!0,forced:!i(103)((function(t){Array.from(t)}))},{from:o})},(t,r,i)=>{var a=i(94),o=i(8),l=i(40),u=i(96),c=i(98),h=i(78),d=i(64),p=i(100),v=i(101),y=i(102),g=Array;t.exports=function from(t){var r=l(t),i=h(this),m=arguments.length,b=m>1?arguments[1]:void 0,w=void 0!==b;w&&(b=a(b,m>2?arguments[2]:void 0));var P,A,S,E,x,D,k=y(r),C=0;if(!k||this===g&&c(k)){P=d(r);A=i?new this(P):g(P);for(;P>C;C++){D=w?b(r[C],C):r[C];p(A,C,D)}}else{x=(E=v(r,k)).next;A=i?new this:[];for(;!(S=o(x,E)).done;C++){D=w?u(E,b,[S.value,C],!0):S.value;p(A,C,D)}}A.length=C;return A}},(t,r,i)=>{var a=i(95),o=i(31),l=i(9),u=a(a.bind);t.exports=function(t,r){o(t);return void 0===r?t:l?u(t,r):function(){return t.apply(r,arguments)}}},(t,r,i)=>{var a=i(15),o=i(14);t.exports=function(t){if("Function"===a(t))return o(t)}},(t,r,i)=>{var a=i(47),o=i(97);t.exports=function(t,r,i,l){try{return l?r(a(i)[0],i[1]):r(i)}catch(r){o(t,"throw",r)}}},(t,r,i)=>{var a=i(8),o=i(47),l=i(30);t.exports=function(t,r,i){var u,c;o(t);try{if(!(u=l(t,"return"))){if("throw"===r)throw i;return i}u=a(u,t)}catch(t){c=!0;u=t}if("throw"===r)throw i;if(c)throw u;o(u);return i}},(t,r,i)=>{var a=i(34),o=i(99),l=a("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[l]===t)}},t=>{t.exports={}},(t,r,i)=>{var a=i(18),o=i(45),l=i(11);t.exports=function(t,r,i){var u=a(r);u in t?o.f(t,u,l(0,i)):t[u]=i}},(t,r,i)=>{var a=i(8),o=i(31),l=i(47),u=i(32),c=i(102),h=TypeError;t.exports=function(t,r){var i=arguments.length<2?c(t):r;if(o(i))return l(a(i,t));throw h(u(t)+" is not iterable")}},(t,r,i)=>{var a=i(79),o=i(30),l=i(17),u=i(99),c=i(34)("iterator");t.exports=function(t){if(!l(t))return o(t,c)||o(t,"@@iterator")||u[a(t)]}},(t,r,i)=>{var a=i(34)("iterator"),o=!1;try{var l=0,u={next:function(){return{done:!!l++}},return:function(){o=!0}};u[a]=function(){return this};Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var i=!1;try{var l={};l[a]=function(){return{next:function(){return{done:i=!0}}}};t(l)}catch(t){}return i}},(t,r,i)=>{i(105);var a=i(3),o=i(8),l=i(21),u=i(47),c=i(107),h=function(){var t=!1,r=/[ac]/;r.exec=function(){t=!0;return/./.exec.apply(this,arguments)};return!0===r.test("abc")&&t}(),d=/./.test;a({target:"RegExp",proto:!0,forced:!h},{test:function(t){var r=u(this),i=c(t),a=r.exec;if(!l(a))return o(d,r,i);var h=o(a,r,i);if(null===h)return!1;u(h);return!0}})},(t,r,i)=>{var a=i(3),o=i(106);a({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},(t,r,i)=>{var a=i(8),o=i(14),l=i(107),u=i(108),c=i(109),h=i(35),d=i(81),p=i(52).get,v=i(110),y=i(111),g=h("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,b=m,w=o("".charAt),P=o("".indexOf),A=o("".replace),S=o("".slice),E=function(){var t=/a/,r=/b*/g;a(m,t,"a");a(m,r,"a");return 0!==t.lastIndex||0!==r.lastIndex}(),x=c.BROKEN_CARET,D=void 0!==/()??/.exec("")[1];(E||D||x||v||y)&&(b=function exec(t){var r,i,o,c,h,v,y,k=this,C=p(k),T=l(t),I=C.raw;if(I){I.lastIndex=k.lastIndex;r=a(b,I,T);k.lastIndex=I.lastIndex;return r}var O=C.groups,M=x&&k.sticky,L=a(u,k),R=k.source,G=0,B=T;if(M){L=A(L,"y","");-1===P(L,"g")&&(L+="g");B=S(T,k.lastIndex);if(k.lastIndex>0&&(!k.multiline||k.multiline&&"\n"!==w(T,k.lastIndex-1))){R="(?: "+R+")";B=" "+B;G++}i=new RegExp("^(?:"+R+")",L)}D&&(i=new RegExp("^"+R+"$(?!\\s)",L));E&&(o=k.lastIndex);c=a(m,M?i:k,B);if(M)if(c){c.input=S(c.input,G);c[0]=S(c[0],G);c.index=k.lastIndex;k.lastIndex+=c[0].length}else k.lastIndex=0;else E&&c&&(k.lastIndex=k.global?c.index+c[0].length:o);D&&c&&c.length>1&&a(g,c[0],i,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(c[h]=void 0)}));if(c&&O){c.groups=v=d(null);for(h=0;h<O.length;h++)v[(y=O[h])[0]]=c[y[1]]}return c});t.exports=b},(t,r,i)=>{var a=i(79),o=String;t.exports=function(t){if("Symbol"===a(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},(t,r,i)=>{var a=i(47);t.exports=function(){var t=a(this),r="";t.hasIndices&&(r+="d");t.global&&(r+="g");t.ignoreCase&&(r+="i");t.multiline&&(r+="m");t.dotAll&&(r+="s");t.unicode&&(r+="u");t.unicodeSets&&(r+="v");t.sticky&&(r+="y");return r}},(t,r,i)=>{var a=i(7),o=i(4).RegExp,l=a((function(){var t=o("a","y");t.lastIndex=2;return null!==t.exec("abcd")})),u=l||a((function(){return!o("a","y").sticky})),c=l||a((function(){var t=o("^r","gy");t.lastIndex=2;return null!==t.exec("str")}));t.exports={BROKEN_CARET:c,MISSED_STICKY:u,UNSUPPORTED_Y:l}},(t,r,i)=>{var a=i(7),o=i(4).RegExp;t.exports=a((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},(t,r,i)=>{var a=i(7),o=i(4).RegExp;t.exports=a((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},(t,r,i)=>{var a=i(3),o=i(36),l=i(6),u=i(4),c=i(87),h=i(14),d=i(68),p=i(39),v=i(113),y=i(25),g=i(23),m=i(19),b=i(7),w=i(58).f,P=i(5).f,A=i(45).f,S=i(117),E=i(118).trim,x="Number",D=u[x],k=c[x],C=D.prototype,T=u.TypeError,I=h("".slice),O=h("".charCodeAt),toNumber=function(t){var r,i,a,o,l,u,c,h,d=m(t,"number");if(g(d))throw T("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2){d=E(d);if(43===(r=O(d,0))||45===r){if(88===(i=O(d,2))||120===i)return NaN}else if(48===r){switch(O(d,1)){case 66:case 98:a=2;o=49;break;case 79:case 111:a=8;o=55;break;default:return+d}u=(l=I(d,2)).length;for(c=0;c<u;c++)if((h=O(l,c))<48||h>o)return NaN;return parseInt(l,a)}}return+d},M=d(x,!D(" 0o1")||!D("0b1")||D("+0x1")),L=function Number(t){var r,i=arguments.length<1?0:D(function(t){var r=m(t,"number");return"bigint"==typeof r?r:toNumber(r)}(t));return y(C,r=this)&&b((function(){S(r)}))?v(Object(i),this,L):i};L.prototype=C;M&&!o&&(C.constructor=L);a({global:!0,constructor:!0,wrap:!0,forced:M},{Number:L});var copyConstructorProperties=function(t,r){for(var i,a=l?w(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;a.length>o;o++)p(r,i=a[o])&&!p(t,i)&&A(t,i,P(r,i))};o&&k&&copyConstructorProperties(c[x],k);(M||o)&&copyConstructorProperties(c[x],D)},(t,r,i)=>{var a=i(21),o=i(20),l=i(114);t.exports=function(t,r,i){var u,c;l&&a(u=r.constructor)&&u!==i&&o(c=u.prototype)&&c!==i.prototype&&l(t,c);return t}},(t,r,i)=>{var a=i(115),o=i(47),l=i(116);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=a(Object.prototype,"__proto__","set"))(i,[]);r=i instanceof Array}catch(t){}return function setPrototypeOf(i,a){o(i);l(a);r?t(i,a):i.__proto__=a;return i}}():void 0)},(t,r,i)=>{var a=i(14),o=i(31);t.exports=function(t,r,i){try{return a(o(Object.getOwnPropertyDescriptor(t,r)[i]))}catch(t){}}},(t,r,i)=>{var a=i(21),o=String,l=TypeError;t.exports=function(t){if("object"==typeof t||a(t))return t;throw l("Can't set "+o(t)+" as a prototype")}},(t,r,i)=>{var a=i(14);t.exports=a(1..valueOf)},(t,r,i)=>{var a=i(14),o=i(16),l=i(107),u=i(119),c=a("".replace),h=RegExp("^["+u+"]+"),d=RegExp("(^|[^"+u+"])["+u+"]+$"),createMethod=function(t){return function(r){var i=l(o(r));1&t&&(i=c(i,h,""));2&t&&(i=c(i,d,"$1"));return i}};t.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},(t,r,i)=>{var a=i(3),o=i(4),l=i(121),u=i(6),c=TypeError,h=Object.defineProperty,d=o.self!==o;try{if(u){var p=Object.getOwnPropertyDescriptor(o,"self");!d&&p&&p.get&&p.enumerable||l(o,"self",{get:function self(){return o},set:function self(t){if(this!==o)throw c("Illegal invocation");h(o,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else a({global:!0,simple:!0,forced:d},{self:o})}catch(t){}},(t,r,i)=>{var a=i(49),o=i(45);t.exports=function(t,r,i){i.get&&a(i.get,r,{getter:!0});i.set&&a(i.set,r,{setter:!0});return o.f(t,r,i)}},(t,r,i)=>{var a=i(3),o=i(4);a({global:!0,forced:o.globalThis!==o},{globalThis:o})},(t,r,i)=>{var a=i(3),o=i(4),l=i(74),u=i(124),c="WebAssembly",h=o[c],d=7!==Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,r){var i={};i[t]=u(t,r,d);a({global:!0,constructor:!0,arity:1,forced:d},i)},exportWebAssemblyErrorCauseWrapper=function(t,r){if(h&&h[t]){var i={};i[t]=u(c+"."+t,r,d);a({target:c,stat:!0,constructor:!0,arity:1,forced:d},i)}};exportGlobalErrorCauseWrapper("Error",(function(t){return function Error(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("EvalError",(function(t){return function EvalError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("RangeError",(function(t){return function RangeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("ReferenceError",(function(t){return function ReferenceError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("SyntaxError",(function(t){return function SyntaxError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("TypeError",(function(t){return function TypeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("URIError",(function(t){return function URIError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("CompileError",(function(t){return function CompileError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("LinkError",(function(t){return function LinkError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(t){return function RuntimeError(r){return l(t,this,arguments)}}))},(t,r,i)=>{var a=i(24),o=i(39),l=i(44),u=i(25),c=i(114),h=i(56),d=i(125),p=i(113),v=i(126),y=i(127),g=i(128),m=i(6),b=i(36);t.exports=function(t,r,i,w){var P="stackTraceLimit",A=w?2:1,S=t.split("."),E=S[S.length-1],x=a.apply(null,S);if(x){var D=x.prototype;!b&&o(D,"cause")&&delete D.cause;if(!i)return x;var k=a("Error"),C=r((function(t,r){var i=v(w?r:t,void 0),a=w?new x(t):new x;void 0!==i&&l(a,"message",i);g(a,C,a.stack,2);this&&u(D,this)&&p(a,this,C);arguments.length>A&&y(a,arguments[A]);return a}));C.prototype=D;if("Error"!==E)c?c(C,k):h(C,k,{name:!0});else if(m&&P in x){d(C,x,P);d(C,x,"prepareStackTrace")}h(C,x);if(!b)try{D.name!==E&&l(D,"name",E);D.constructor=C}catch(t){}return C}}},(t,r,i)=>{var a=i(45).f;t.exports=function(t,r,i){i in t||a(t,i,{configurable:!0,get:function(){return r[i]},set:function(t){r[i]=t}})}},(t,r,i)=>{var a=i(107);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:a(t)}},(t,r,i)=>{var a=i(20),o=i(44);t.exports=function(t,r){a(r)&&"cause"in r&&o(t,"cause",r.cause)}},(t,r,i)=>{var a=i(44),o=i(129),l=i(130),u=Error.captureStackTrace;t.exports=function(t,r,i,c){l&&(u?u(t,r):a(t,"stack",o(i,c)))}},(t,r,i)=>{var a=i(14),o=Error,l=a("".replace),u=String(o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,h=c.test(u);t.exports=function(t,r){if(h&&"string"==typeof t&&!o.prepareStackTrace)for(;r--;)t=l(t,c,"");return t}},(t,r,i)=>{var a=i(7),o=i(11);t.exports=!a((function(){var t=Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",o(1,7));return 7!==t.stack}))},(t,r,i)=>{var a,o=i(3),l=i(95),u=i(5).f,c=i(65),h=i(107),d=i(132),p=i(16),v=i(134),y=i(36),g=l("".startsWith),m=l("".slice),b=Math.min,w=v("startsWith");o({target:"String",proto:!0,forced:!(!y&&!w&&!!(a=u(String.prototype,"startsWith"),a&&!a.writable))&&!w},{startsWith:function startsWith(t){var r=h(p(this));d(t);var i=c(b(arguments.length>1?arguments[1]:void 0,r.length)),a=h(t);return g?g(r,a,i):m(r,i,i+a.length)===a}})},(t,r,i)=>{var a=i(133),o=TypeError;t.exports=function(t){if(a(t))throw o("The method doesn't accept regular expressions");return t}},(t,r,i)=>{var a=i(20),o=i(15),l=i(34)("match");t.exports=function(t){var r;return a(t)&&(void 0!==(r=t[l])?!!r:"RegExp"===o(t))}},(t,r,i)=>{var a=i(34)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{r[a]=!1;return"/./"[t](r)}catch(t){}}return!1}},(t,r,i)=>{var a=i(8),o=i(136),l=i(47),u=i(17),c=i(65),h=i(107),d=i(16),p=i(30),v=i(137),y=i(139);o("match",(function(t,r,i){return[function match(r){var i=d(this),o=u(r)?void 0:p(r,t);return o?a(o,r,i):new RegExp(r)[t](h(i))},function(t){var a=l(this),o=h(t),u=i(r,a,o);if(u.done)return u.value;if(!a.global)return y(a,o);var d=a.unicode;a.lastIndex=0;for(var p,g=[],m=0;null!==(p=y(a,o));){var b=h(p[0]);g[m]=b;""===b&&(a.lastIndex=v(o,c(a.lastIndex),d));m++}return 0===m?null:g}]}))},(t,r,i)=>{i(105);var a=i(95),o=i(48),l=i(106),u=i(7),c=i(34),h=i(44),d=c("species"),p=RegExp.prototype;t.exports=function(t,r,i,v){var y=c(t),g=!u((function(){var r={};r[y]=function(){return 7};return 7!==""[t](r)})),m=g&&!u((function(){var r=!1,i=/a/;if("split"===t){(i={}).constructor={};i.constructor[d]=function(){return i};i.flags="";i[y]=/./[y]}i.exec=function(){r=!0;return null};i[y]("");return!r}));if(!g||!m||i){var b=a(/./[y]),w=r(y,""[t],(function(t,r,i,o,u){var c=a(t),h=r.exec;return h===l||h===p.exec?g&&!u?{done:!0,value:b(r,i,o)}:{done:!0,value:c(i,r,o)}:{done:!1}}));o(String.prototype,t,w[0]);o(p,y,w[1])}v&&h(p[y],"sham",!0)}},(t,r,i)=>{var a=i(138).charAt;t.exports=function(t,r,i){return r+(i?a(t,r).length:1)}},(t,r,i)=>{var a=i(14),o=i(62),l=i(107),u=i(16),c=a("".charAt),h=a("".charCodeAt),d=a("".slice),createMethod=function(t){return function(r,i){var a,p,v=l(u(r)),y=o(i),g=v.length;return y<0||y>=g?t?"":void 0:(a=h(v,y))<55296||a>56319||y+1===g||(p=h(v,y+1))<56320||p>57343?t?c(v,y):a:t?d(v,y,y+2):p-56320+(a-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},(t,r,i)=>{var a=i(8),o=i(47),l=i(21),u=i(15),c=i(106),h=TypeError;t.exports=function(t,r){var i=t.exec;if(l(i)){var d=a(i,t,r);null!==d&&o(d);return d}if("RegExp"===u(t))return a(c,t,r);throw h("RegExp#exec called on incompatible receiver")}},(t,r,i)=>{var a=i(12),o=i(141),l=i(99),u=i(52),c=i(45).f,h=i(142),d=i(145),p=i(36),v=i(6),y="Array Iterator",g=u.set,m=u.getterFor(y);t.exports=h(Array,"Array",(function(t,r){g(this,{type:y,target:a(t),index:0,kind:r})}),(function(){var t=m(this),r=t.target,i=t.kind,a=t.index++;if(!r||a>=r.length){t.target=void 0;return d(void 0,!0)}switch(i){case"keys":return d(a,!1);case"values":return d(r[a],!1)}return d([a,r[a]],!1)}),"values");var b=l.Arguments=l.Array;o("keys");o("values");o("entries");if(!p&&v&&"values"!==b.name)try{c(b,"name",{value:"values"})}catch(t){}},(t,r,i)=>{var a=i(34),o=i(81),l=i(45).f,u=a("unscopables"),c=Array.prototype;void 0===c[u]&&l(c,u,{configurable:!0,value:o(null)});t.exports=function(t){c[u][t]=!0}},(t,r,i)=>{var a=i(3),o=i(8),l=i(36),u=i(50),c=i(21),h=i(143),d=i(69),p=i(114),v=i(72),y=i(44),g=i(48),m=i(34),b=i(99),w=i(144),P=u.PROPER,A=u.CONFIGURABLE,S=w.IteratorPrototype,E=w.BUGGY_SAFARI_ITERATORS,x=m("iterator"),D="keys",k="values",C="entries",returnThis=function(){return this};t.exports=function(t,r,i,u,m,w,T){h(i,r,u);var I,O,M,getIterationMethod=function(t){if(t===m&&j)return j;if(!E&&t in G)return G[t];switch(t){case D:return function keys(){return new i(this,t)};case k:return function values(){return new i(this,t)};case C:return function entries(){return new i(this,t)}}return function(){return new i(this)}},L=r+" Iterator",R=!1,G=t.prototype,B=G[x]||G["@@iterator"]||m&&G[m],j=!E&&B||getIterationMethod(m),N="Array"===r&&G.entries||B;if(N&&(I=d(N.call(new t)))!==Object.prototype&&I.next){l||d(I)===S||(p?p(I,S):c(I[x])||g(I,x,returnThis));v(I,L,!0,!0);l&&(b[L]=returnThis)}if(P&&m===k&&B&&B.name!==k)if(!l&&A)y(G,"name",k);else{R=!0;j=function values(){return o(B,this)}}if(m){O={values:getIterationMethod(k),keys:w?j:getIterationMethod(D),entries:getIterationMethod(C)};if(T)for(M in O)(E||R||!(M in G))&&g(G,M,O[M]);else a({target:r,proto:!0,forced:E||R},O)}l&&!T||G[x]===j||g(G,x,j,{name:m});b[r]=j;return O}},(t,r,i)=>{var a=i(144).IteratorPrototype,o=i(81),l=i(11),u=i(72),c=i(99),returnThis=function(){return this};t.exports=function(t,r,i,h){var d=r+" Iterator";t.prototype=o(a,{next:l(+!h,i)});u(t,d,!1,!0);c[d]=returnThis;return t}},(t,r,i)=>{var a,o,l,u=i(7),c=i(21),h=i(20),d=i(81),p=i(69),v=i(48),y=i(34),g=i(36),m=y("iterator"),b=!1;[].keys&&("next"in(l=[].keys())?(o=p(p(l)))!==Object.prototype&&(a=o):b=!0);!h(a)||u((function(){var t={};return a[m].call(t)!==t}))?a={}:g&&(a=d(a));c(a[m])||v(a,m,(function(){return this}));t.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:b}},t=>{t.exports=function(t,r){return{value:t,done:r}}},(t,r,i)=>{var a=i(80),o=i(48),l=i(147);a||o(Object.prototype,"toString",l,{unsafe:!0})},(t,r,i)=>{var a=i(80),o=i(79);t.exports=a?{}.toString:function toString(){return"[object "+o(this)+"]"}},(t,r,i)=>{var a=i(138).charAt,o=i(107),l=i(52),u=i(142),c=i(145),h="String Iterator",d=l.set,p=l.getterFor(h);u(String,"String",(function(t){d(this,{type:h,string:o(t),index:0})}),(function next(){var t,r=p(this),i=r.string,o=r.index;if(o>=i.length)return c(void 0,!0);t=a(i,o);r.index+=t.length;return c(t,!1)}))},(t,r,i)=>{var a=i(4),o=i(150),l=i(151),u=i(140),c=i(44),h=i(34),d=h("iterator"),p=h("toStringTag"),v=u.values,handlePrototype=function(t,r){if(t){if(t[d]!==v)try{c(t,d,v)}catch(r){t[d]=v}t[p]||c(t,p,r);if(o[r])for(var i in u)if(t[i]!==u[i])try{c(t,i,u[i])}catch(r){t[i]=u[i]}}};for(var y in o)handlePrototype(a[y]&&a[y].prototype,y);handlePrototype(l,"DOMTokenList")},t=>{t.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}},(t,r,i)=>{var a=i(43)("span").classList,o=a&&a.constructor&&a.constructor.prototype;t.exports=o===Object.prototype?void 0:o},(t,r,i)=>{i(153)},(t,r,i)=>{i(148);var a,o=i(3),l=i(6),u=i(154),c=i(4),h=i(94),d=i(14),p=i(48),v=i(121),y=i(155),g=i(39),m=i(156),b=i(93),w=i(157),P=i(138).codeAt,A=i(158),S=i(107),E=i(72),x=i(159),D=i(160),k=i(52),C=k.set,T=k.getterFor("URL"),I=D.URLSearchParams,O=D.getState,M=c.URL,L=c.TypeError,R=c.parseInt,G=Math.floor,B=Math.pow,j=d("".charAt),N=d(/./.exec),W=d([].join),V=d(1..toString),U=d([].pop),H=d([].push),z=d("".replace),q=d([].shift),Y=d("".split),K=d("".slice),X=d("".toLowerCase),$=d([].unshift),Q="Invalid scheme",J="Invalid host",Z="Invalid port",ee=/[a-z]/i,te=/[\d+-.a-z]/i,re=/\d/,ne=/^0x/i,ie=/^[0-7]+$/,ae=/^\d+$/,oe=/^[\da-f]+$/i,se=/[\0\t\n\r #%/:<>?@[\\\]^|]/,le=/[\0\t\n\r #/:<>?@[\\\]^|]/,ue=/^[\u0000-\u0020]+/,ce=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,he=/[\t\n\r]/g,serializeHost=function(t){var r,i,a,o;if("number"==typeof t){r=[];for(i=0;i<4;i++){$(r,t%256);t=G(t/256)}return W(r,".")}if("object"==typeof t){r="";a=function(t){for(var r=null,i=1,a=null,o=0,l=0;l<8;l++)if(0!==t[l]){if(o>i){r=a;i=o}a=null;o=0}else{null===a&&(a=l);++o}if(o>i){r=a;i=o}return r}(t);for(i=0;i<8;i++)if(!o||0!==t[i]){o&&(o=!1);if(a===i){r+=i?":":"::";o=!0}else{r+=V(t[i],16);i<7&&(r+=":")}}return"["+r+"]"}return t},de={},fe=m({},de,{" ":1,'"':1,"<":1,">":1,"`":1}),pe=m({},fe,{"#":1,"?":1,"{":1,"}":1}),ve=m({},pe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var i=P(t,0);return i>32&&i<127&&!g(r,t)?t:encodeURIComponent(t)},ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(t,r){var i;return 2===t.length&&N(ee,j(t,0))&&(":"===(i=j(t,1))||!r&&"|"===i)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter(K(t,0,2))&&(2===t.length||"/"===(r=j(t,2))||"\\"===r||"?"===r||"#"===r)},isSingleDot=function(t){return"."===t||"%2e"===X(t)},ge={},me={},_e={},be={},we={},Pe={},Ae={},Se={},Ee={},Fe={},xe={},De={},ke={},Ce={},Te={},Ie={},Oe={},Me={},Le={},Re={},Ge={},URLState=function(t,r,i){var a,o,l,u=S(t);if(r){if(o=this.parse(u))throw L(o);this.searchParams=null}else{void 0!==i&&(a=new URLState(i,!0));if(o=this.parse(u,null,a))throw L(o);(l=O(new I)).bindURL(this);this.searchParams=l}};URLState.prototype={type:"URL",parse:function(t,r,i){var o,l,u,c,h,d=this,p=r||ge,v=0,y="",m=!1,P=!1,A=!1;t=S(t);if(!r){d.scheme="";d.username="";d.password="";d.host=null;d.port=null;d.path=[];d.query=null;d.fragment=null;d.cannotBeABaseURL=!1;t=z(t,ue,"");t=z(t,ce,"$1")}t=z(t,he,"");o=b(t);for(;v<=o.length;){l=o[v];switch(p){case ge:if(!l||!N(ee,l)){if(r)return Q;p=_e;continue}y+=X(l);p=me;break;case me:if(l&&(N(te,l)||"+"===l||"-"===l||"."===l))y+=X(l);else{if(":"!==l){if(r)return Q;y="";p=_e;v=0;continue}if(r&&(d.isSpecial()!==g(ye,y)||"file"===y&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;d.scheme=y;if(r){d.isSpecial()&&ye[d.scheme]===d.port&&(d.port=null);return}y="";if("file"===d.scheme)p=Ce;else if(d.isSpecial()&&i&&i.scheme===d.scheme)p=be;else if(d.isSpecial())p=Se;else if("/"===o[v+1]){p=we;v++}else{d.cannotBeABaseURL=!0;H(d.path,"");p=Le}}break;case _e:if(!i||i.cannotBeABaseURL&&"#"!==l)return Q;if(i.cannotBeABaseURL&&"#"===l){d.scheme=i.scheme;d.path=w(i.path);d.query=i.query;d.fragment="";d.cannotBeABaseURL=!0;p=Ge;break}p="file"===i.scheme?Ce:Pe;continue;case be:if("/"!==l||"/"!==o[v+1]){p=Pe;continue}p=Ee;v++;break;case we:if("/"===l){p=Fe;break}p=Me;continue;case Pe:d.scheme=i.scheme;if(l===a){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.query=i.query}else if("/"===l||"\\"===l&&d.isSpecial())p=Ae;else if("?"===l){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.query="";p=Re}else{if("#"!==l){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.path.length--;p=Me;continue}d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.query=i.query;d.fragment="";p=Ge}break;case Ae:if(!d.isSpecial()||"/"!==l&&"\\"!==l){if("/"!==l){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;p=Me;continue}p=Fe}else p=Ee;break;case Se:p=Ee;if("/"!==l||"/"!==j(y,v+1))continue;v++;break;case Ee:if("/"!==l&&"\\"!==l){p=Fe;continue}break;case Fe:if("@"===l){m&&(y="%40"+y);m=!0;u=b(y);for(var E=0;E<u.length;E++){var x=u[E];if(":"!==x||A){var D=percentEncode(x,ve);A?d.password+=D:d.username+=D}else A=!0}y=""}else if(l===a||"/"===l||"?"===l||"#"===l||"\\"===l&&d.isSpecial()){if(m&&""===y)return"Invalid authority";v-=b(y).length+1;y="";p=xe}else y+=l;break;case xe:case De:if(r&&"file"===d.scheme){p=Ie;continue}if(":"!==l||P){if(l===a||"/"===l||"?"===l||"#"===l||"\\"===l&&d.isSpecial()){if(d.isSpecial()&&""===y)return J;if(r&&""===y&&(d.includesCredentials()||null!==d.port))return;if(c=d.parseHost(y))return c;y="";p=Oe;if(r)return;continue}"["===l?P=!0:"]"===l&&(P=!1);y+=l}else{if(""===y)return J;if(c=d.parseHost(y))return c;y="";p=ke;if(r===De)return}break;case ke:if(!N(re,l)){if(l===a||"/"===l||"?"===l||"#"===l||"\\"===l&&d.isSpecial()||r){if(""!==y){var k=R(y,10);if(k>65535)return Z;d.port=d.isSpecial()&&k===ye[d.scheme]?null:k;y=""}if(r)return;p=Oe;continue}return Z}y+=l;break;case Ce:d.scheme="file";if("/"===l||"\\"===l)p=Te;else{if(!i||"file"!==i.scheme){p=Me;continue}switch(l){case a:d.host=i.host;d.path=w(i.path);d.query=i.query;break;case"?":d.host=i.host;d.path=w(i.path);d.query="";p=Re;break;case"#":d.host=i.host;d.path=w(i.path);d.query=i.query;d.fragment="";p=Ge;break;default:if(!startsWithWindowsDriveLetter(W(w(o,v),""))){d.host=i.host;d.path=w(i.path);d.shortenPath()}p=Me;continue}}break;case Te:if("/"===l||"\\"===l){p=Ie;break}i&&"file"===i.scheme&&!startsWithWindowsDriveLetter(W(w(o,v),""))&&(isWindowsDriveLetter(i.path[0],!0)?H(d.path,i.path[0]):d.host=i.host);p=Me;continue;case Ie:if(l===a||"/"===l||"\\"===l||"?"===l||"#"===l){if(!r&&isWindowsDriveLetter(y))p=Me;else if(""===y){d.host="";if(r)return;p=Oe}else{if(c=d.parseHost(y))return c;"localhost"===d.host&&(d.host="");if(r)return;y="";p=Oe}continue}y+=l;break;case Oe:if(d.isSpecial()){p=Me;if("/"!==l&&"\\"!==l)continue}else if(r||"?"!==l)if(r||"#"!==l){if(l!==a){p=Me;if("/"!==l)continue}}else{d.fragment="";p=Ge}else{d.query="";p=Re}break;case Me:if(l===a||"/"===l||"\\"===l&&d.isSpecial()||!r&&("?"===l||"#"===l)){if(".."===(h=X(h=y))||"%2e."===h||".%2e"===h||"%2e%2e"===h){d.shortenPath();"/"===l||"\\"===l&&d.isSpecial()||H(d.path,"")}else if(isSingleDot(y))"/"===l||"\\"===l&&d.isSpecial()||H(d.path,"");else{if("file"===d.scheme&&!d.path.length&&isWindowsDriveLetter(y)){d.host&&(d.host="");y=j(y,0)+":"}H(d.path,y)}y="";if("file"===d.scheme&&(l===a||"?"===l||"#"===l))for(;d.path.length>1&&""===d.path[0];)q(d.path);if("?"===l){d.query="";p=Re}else if("#"===l){d.fragment="";p=Ge}}else y+=percentEncode(l,pe);break;case Le:if("?"===l){d.query="";p=Re}else if("#"===l){d.fragment="";p=Ge}else l!==a&&(d.path[0]+=percentEncode(l,de));break;case Re:if(r||"#"!==l)l!==a&&("'"===l&&d.isSpecial()?d.query+="%27":d.query+="#"===l?"%23":percentEncode(l,de));else{d.fragment="";p=Ge}break;case Ge:l!==a&&(d.fragment+=percentEncode(l,fe))}v++}},parseHost:function(t){var r,i,a;if("["===j(t,0)){if("]"!==j(t,t.length-1))return J;r=function(t){var r,i,a,o,l,u,c,h=[0,0,0,0,0,0,0,0],d=0,p=null,v=0,chr=function(){return j(t,v)};if(":"===chr()){if(":"!==j(t,1))return;v+=2;p=++d}for(;chr();){if(8===d)return;if(":"!==chr()){r=i=0;for(;i<4&&N(oe,chr());){r=16*r+R(chr(),16);v++;i++}if("."===chr()){if(0===i)return;v-=i;if(d>6)return;a=0;for(;chr();){o=null;if(a>0){if(!("."===chr()&&a<4))return;v++}if(!N(re,chr()))return;for(;N(re,chr());){l=R(chr(),10);if(null===o)o=l;else{if(0===o)return;o=10*o+l}if(o>255)return;v++}h[d]=256*h[d]+o;2!=++a&&4!==a||d++}if(4!==a)return;break}if(":"===chr()){v++;if(!chr())return}else if(chr())return;h[d++]=r}else{if(null!==p)return;v++;p=++d}}if(null!==p){u=d-p;d=7;for(;0!==d&&u>0;){c=h[d];h[d--]=h[p+u-1];h[p+--u]=c}}else if(8!==d)return;return h}(K(t,1,-1));if(!r)return J;this.host=r}else if(this.isSpecial()){t=A(t);if(N(se,t))return J;r=function(t){var r,i,a,o,l,u,c,h=Y(t,".");h.length&&""===h[h.length-1]&&h.length--;if((r=h.length)>4)return t;i=[];for(a=0;a<r;a++){if(""===(o=h[a]))return t;l=10;if(o.length>1&&"0"===j(o,0)){l=N(ne,o)?16:8;o=K(o,8===l?1:2)}if(""===o)u=0;else{if(!N(10===l?ae:8===l?ie:oe,o))return t;u=R(o,l)}H(i,u)}for(a=0;a<r;a++){u=i[a];if(a===r-1){if(u>=B(256,5-r))return null}else if(u>255)return null}c=U(i);for(a=0;a<i.length;a++)c+=i[a]*B(256,3-a);return c}(t);if(null===r)return J;this.host=r}else{if(N(le,t))return J;r="";i=b(t);for(a=0;a<i.length;a++)r+=percentEncode(i[a],de);this.host=r}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return g(ye,this.scheme)},shortenPath:function(){var t=this.path,r=t.length;!r||"file"===this.scheme&&1===r&&isWindowsDriveLetter(t[0],!0)||t.length--},serialize:function(){var t=this,r=t.scheme,i=t.username,a=t.password,o=t.host,l=t.port,u=t.path,c=t.query,h=t.fragment,d=r+":";if(null!==o){d+="//";t.includesCredentials()&&(d+=i+(a?":"+a:"")+"@");d+=serializeHost(o);null!==l&&(d+=":"+l)}else"file"===r&&(d+="//");d+=t.cannotBeABaseURL?u[0]:u.length?"/"+W(u,"/"):"";null!==c&&(d+="?"+c);null!==h&&(d+="#"+h);return d},setHref:function(t){var r=this.parse(t);if(r)throw L(r);this.searchParams.update()},getOrigin:function(){var t=this.scheme,r=this.port;if("blob"===t)try{return new Be(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+serializeHost(this.host)+(null!==r?":"+r:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(S(t)+":",ge)},getUsername:function(){return this.username},setUsername:function(t){var r=b(S(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<r.length;i++)this.username+=percentEncode(r[i],ve)}},getPassword:function(){return this.password},setPassword:function(t){var r=b(S(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<r.length;i++)this.password+=percentEncode(r[i],ve)}},getHost:function(){var t=this.host,r=this.port;return null===t?"":null===r?serializeHost(t):serializeHost(t)+":"+r},setHost:function(t){this.cannotBeABaseURL||this.parse(t,xe)},getHostname:function(){var t=this.host;return null===t?"":serializeHost(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,De)},getPort:function(){var t=this.port;return null===t?"":S(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=S(t))?this.port=null:this.parse(t,ke))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+W(t,"/"):""},setPathname:function(t){if(!this.cannotBeABaseURL){this.path=[];this.parse(t,Oe)}},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){if(""===(t=S(t)))this.query=null;else{"?"===j(t,0)&&(t=K(t,1));this.query="";this.parse(t,Re)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){if(""!==(t=S(t))){"#"===j(t,0)&&(t=K(t,1));this.fragment="";this.parse(t,Ge)}else this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Be=function URL(t){var r=y(this,je),i=x(arguments.length,1)>1?arguments[1]:void 0,a=C(r,new URLState(t,!1,i));if(!l){r.href=a.serialize();r.origin=a.getOrigin();r.protocol=a.getProtocol();r.username=a.getUsername();r.password=a.getPassword();r.host=a.getHost();r.hostname=a.getHostname();r.port=a.getPort();r.pathname=a.getPathname();r.search=a.getSearch();r.searchParams=a.getSearchParams();r.hash=a.getHash()}},je=Be.prototype,accessorDescriptor=function(t,r){return{get:function(){return T(this)[t]()},set:r&&function(t){return T(this)[r](t)},configurable:!0,enumerable:!0}};if(l){v(je,"href",accessorDescriptor("serialize","setHref"));v(je,"origin",accessorDescriptor("getOrigin"));v(je,"protocol",accessorDescriptor("getProtocol","setProtocol"));v(je,"username",accessorDescriptor("getUsername","setUsername"));v(je,"password",accessorDescriptor("getPassword","setPassword"));v(je,"host",accessorDescriptor("getHost","setHost"));v(je,"hostname",accessorDescriptor("getHostname","setHostname"));v(je,"port",accessorDescriptor("getPort","setPort"));v(je,"pathname",accessorDescriptor("getPathname","setPathname"));v(je,"search",accessorDescriptor("getSearch","setSearch"));v(je,"searchParams",accessorDescriptor("getSearchParams"));v(je,"hash",accessorDescriptor("getHash","setHash"))}p(je,"toJSON",(function toJSON(){return T(this).serialize()}),{enumerable:!0});p(je,"toString",(function toString(){return T(this).serialize()}),{enumerable:!0});if(M){var Ne=M.createObjectURL,We=M.revokeObjectURL;Ne&&p(Be,"createObjectURL",h(Ne,M));We&&p(Be,"revokeObjectURL",h(We,M))}E(Be,"URL");o({global:!0,constructor:!0,forced:!u,sham:!l},{URL:Be})},(t,r,i)=>{var a=i(7),o=i(34),l=i(6),u=i(36),c=o("iterator");t.exports=!a((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),a="";t.pathname="c%20d";r.forEach((function(t,i){r.delete("b");a+=i+t}));i.delete("a",2);i.delete("b",void 0);return u&&(!t.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!r.size&&(u||!l)||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[c]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==a||"x"!==new URL("http://x",void 0).host}))},(t,r,i)=>{var a=i(25),o=TypeError;t.exports=function(t,r){if(a(r,t))return t;throw o("Incorrect invocation")}},(t,r,i)=>{var a=i(6),o=i(14),l=i(8),u=i(7),c=i(83),h=i(67),d=i(10),p=i(40),v=i(13),y=Object.assign,g=Object.defineProperty,m=o([].concat);t.exports=!y||u((function(){if(a&&1!==y({b:1},y(g({},"a",{enumerable:!0,get:function(){g(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},i=Symbol("assign detection"),o="abcdefghijklmnopqrst";t[i]=7;o.split("").forEach((function(t){r[t]=t}));return 7!==y({},t)[i]||c(y({},r)).join("")!==o}))?function assign(t,r){for(var i=p(t),o=arguments.length,u=1,y=h.f,g=d.f;o>u;)for(var b,w=v(arguments[u++]),P=y?m(c(w),y(w)):c(w),A=P.length,S=0;A>S;){b=P[S++];a&&!l(g,w,b)||(i[b]=w[b])}return i}:y},(t,r,i)=>{var a=i(61),o=i(64),l=i(100),u=Array,c=Math.max;t.exports=function(t,r,i){for(var h=o(t),d=a(r,h),p=a(void 0===i?h:i,h),v=u(c(p-d,0)),y=0;d<p;d++,y++)l(v,y,t[d]);v.length=y;return v}},(t,r,i)=>{var a=i(14),o=2147483647,l=/[^\0-\u007E]/,u=/[.\u3002\uFF0E\uFF61]/g,c="Overflow: input needs wider integers to process",h=RangeError,d=a(u.exec),p=Math.floor,v=String.fromCharCode,y=a("".charCodeAt),g=a([].join),m=a([].push),b=a("".replace),w=a("".split),P=a("".toLowerCase),digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,i){var a=0;t=i?p(t/700):t>>1;t+=p(t/r);for(;t>455;){t=p(t/35);a+=36}return p(a+36*t/(t+38))},encode=function(t){var r=[];t=function(t){for(var r=[],i=0,a=t.length;i<a;){var o=y(t,i++);if(o>=55296&&o<=56319&&i<a){var l=y(t,i++);if(56320==(64512&l))m(r,((1023&o)<<10)+(1023&l)+65536);else{m(r,o);i--}}else m(r,o)}return r}(t);var i,a,l=t.length,u=128,d=0,b=72;for(i=0;i<t.length;i++)(a=t[i])<128&&m(r,v(a));var w=r.length,P=w;w&&m(r,"-");for(;P<l;){var A=o;for(i=0;i<t.length;i++)(a=t[i])>=u&&a<A&&(A=a);var S=P+1;if(A-u>p((o-d)/S))throw h(c);d+=(A-u)*S;u=A;for(i=0;i<t.length;i++){if((a=t[i])<u&&++d>o)throw h(c);if(a===u){for(var E=d,x=36;;){var D=x<=b?1:x>=b+26?26:x-b;if(E<D)break;var k=E-D,C=36-D;m(r,v(digitToBasic(D+k%C)));E=p(k/C);x+=36}m(r,v(digitToBasic(E)));b=adapt(d,S,P===w);d=0;P++}}d++;u++}return g(r,"")};t.exports=function(t){var r,i,a=[],o=w(b(P(t),u,"."),".");for(r=0;r<o.length;r++){i=o[r];m(a,d(l,i)?"xn--"+encode(i):i)}return g(a,".")}},t=>{var r=TypeError;t.exports=function(t,i){if(t<i)throw r("Not enough arguments");return t}},(t,r,i)=>{i(140);var a=i(3),o=i(4),l=i(8),u=i(14),c=i(6),h=i(154),d=i(48),p=i(121),v=i(161),y=i(72),g=i(143),m=i(52),b=i(155),w=i(21),P=i(39),A=i(94),S=i(79),E=i(47),x=i(20),D=i(107),k=i(81),C=i(11),T=i(101),I=i(102),O=i(159),M=i(34),L=i(162),R=M("iterator"),G="URLSearchParams",B=G+"Iterator",j=m.set,N=m.getterFor(G),W=m.getterFor(B),V=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(t){if(!c)return o[t];var r=V(o,t);return r&&r.value},U=safeGetBuiltIn("fetch"),H=safeGetBuiltIn("Request"),z=safeGetBuiltIn("Headers"),q=H&&H.prototype,Y=z&&z.prototype,K=o.RegExp,X=o.TypeError,$=o.decodeURIComponent,Q=o.encodeURIComponent,J=u("".charAt),Z=u([].join),ee=u([].push),te=u("".replace),re=u([].shift),ne=u([].splice),ie=u("".split),ae=u("".slice),oe=/\+/g,se=Array(4),percentSequence=function(t){return se[t-1]||(se[t-1]=K("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return $(t)}catch(r){return t}},deserialize=function(t){var r=te(t,oe," "),i=4;try{return $(r)}catch(t){for(;i;)r=te(r,percentSequence(i--),percentDecode);return r}},le=/[!'()~]|%20/g,ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return ue[t]},serialize=function(t){return te(Q(t),le,replacer)},ce=g((function Iterator(t,r){j(this,{type:B,iterator:T(N(t).entries),kind:r})}),"Iterator",(function next(){var t=W(this),r=t.kind,i=t.iterator.next(),a=i.value;i.done||(i.value="keys"===r?a.key:"values"===r?a.value:[a.key,a.value]);return i}),!0),URLSearchParamsState=function(t){this.entries=[];this.url=null;void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===J(t,0)?ae(t,1):t:D(t)))};URLSearchParamsState.prototype={type:G,bindURL:function(t){this.url=t;this.update()},parseObject:function(t){var r,i,a,o,u,c,h,d=I(t);if(d){i=(r=T(t,d)).next;for(;!(a=l(i,r)).done;){u=(o=T(E(a.value))).next;if((c=l(u,o)).done||(h=l(u,o)).done||!l(u,o).done)throw X("Expected sequence with length 2");ee(this.entries,{key:D(c.value),value:D(h.value)})}}else for(var p in t)P(t,p)&&ee(this.entries,{key:p,value:D(t[p])})},parseQuery:function(t){if(t)for(var r,i,a=ie(t,"&"),o=0;o<a.length;)if((r=a[o++]).length){i=ie(r,"=");ee(this.entries,{key:deserialize(re(i)),value:deserialize(Z(i,"="))})}},serialize:function(){for(var t,r=this.entries,i=[],a=0;a<r.length;){t=r[a++];ee(i,serialize(t.key)+"="+serialize(t.value))}return Z(i,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var he=function URLSearchParams(){b(this,de);var t=j(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));c||(this.size=t.entries.length)},de=he.prototype;v(de,{append:function append(t,r){var i=N(this);O(arguments.length,2);ee(i.entries,{key:D(t),value:D(r)});c||this.length++;i.updateURL()},delete:function(t){for(var r=N(this),i=O(arguments.length,1),a=r.entries,o=D(t),l=i<2?void 0:arguments[1],u=void 0===l?l:D(l),h=0;h<a.length;){var d=a[h];if(d.key!==o||void 0!==u&&d.value!==u)h++;else{ne(a,h,1);if(void 0!==u)break}}c||(this.size=a.length);r.updateURL()},get:function get(t){var r=N(this).entries;O(arguments.length,1);for(var i=D(t),a=0;a<r.length;a++)if(r[a].key===i)return r[a].value;return null},getAll:function getAll(t){var r=N(this).entries;O(arguments.length,1);for(var i=D(t),a=[],o=0;o<r.length;o++)r[o].key===i&&ee(a,r[o].value);return a},has:function has(t){for(var r=N(this).entries,i=O(arguments.length,1),a=D(t),o=i<2?void 0:arguments[1],l=void 0===o?o:D(o),u=0;u<r.length;){var c=r[u++];if(c.key===a&&(void 0===l||c.value===l))return!0}return!1},set:function set(t,r){var i=N(this);O(arguments.length,1);for(var a,o=i.entries,l=!1,u=D(t),h=D(r),d=0;d<o.length;d++)if((a=o[d]).key===u)if(l)ne(o,d--,1);else{l=!0;a.value=h}l||ee(o,{key:u,value:h});c||(this.size=o.length);i.updateURL()},sort:function sort(){var t=N(this);L(t.entries,(function(t,r){return t.key>r.key?1:-1}));t.updateURL()},forEach:function forEach(t){for(var r,i=N(this).entries,a=A(t,arguments.length>1?arguments[1]:void 0),o=0;o<i.length;)a((r=i[o++]).value,r.key,this)},keys:function keys(){return new ce(this,"keys")},values:function values(){return new ce(this,"values")},entries:function entries(){return new ce(this,"entries")}},{enumerable:!0});d(de,R,de.entries,{name:"entries"});d(de,"toString",(function toString(){return N(this).serialize()}),{enumerable:!0});c&&p(de,"size",{get:function size(){return N(this).entries.length},configurable:!0,enumerable:!0});y(he,G);a({global:!0,constructor:!0,forced:!h},{URLSearchParams:he});if(!h&&w(z)){var fe=u(Y.has),pe=u(Y.set),wrapRequestOptions=function(t){if(x(t)){var r,i=t.body;if(S(i)===G){r=t.headers?new z(t.headers):new z;fe(r,"content-type")||pe(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8");return k(t,{body:C(0,D(i)),headers:C(0,r)})}}return t};w(U)&&a({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function fetch(t){return U(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})}});if(w(H)){var ve=function Request(t){b(this,q);return new H(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})};q.constructor=ve;ve.prototype=q;a({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ve})}}t.exports={URLSearchParams:he,getState:N}},(t,r,i)=>{var a=i(48);t.exports=function(t,r,i){for(var o in r)a(t,o,r[o],i);return t}},(t,r,i)=>{var a=i(157),o=Math.floor,mergeSort=function(t,r){var i=t.length,l=o(i/2);return i<8?insertionSort(t,r):merge(t,mergeSort(a(t,0,l),r),mergeSort(a(t,l),r),r)},insertionSort=function(t,r){for(var i,a,o=t.length,l=1;l<o;){a=l;i=t[l];for(;a&&r(t[a-1],i)>0;)t[a]=t[--a];a!==l++&&(t[a]=i)}return t},merge=function(t,r,i,a){for(var o=r.length,l=i.length,u=0,c=0;u<o||c<l;)t[u+c]=u<o&&c<l?a(r[u],i[c])<=0?r[u++]:i[c++]:u<o?r[u++]:i[c++];return t};t.exports=mergeSort},(t,r,i)=>{i(160)},(t,r,i)=>{var a=i(48),o=i(14),l=i(107),u=i(159),c=URLSearchParams,h=c.prototype,d=o(h.append),p=o(h.delete),v=o(h.forEach),y=o([].push),g=new c("a=1&a=2&b=3");g.delete("a",1);g.delete("b",void 0);g+""!="a=2"&&a(h,"delete",(function(t){var r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return p(this,t);var a=[];v(this,(function(t,r){y(a,{key:r,value:t})}));u(r,1);for(var o,c=l(t),h=l(i),g=0,m=0,b=!1,w=a.length;g<w;){o=a[g++];if(b||o.key===c){b=!0;p(this,o.key)}else m++}for(;m<w;)(o=a[m++]).key===c&&o.value===h||d(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},(t,r,i)=>{var a=i(48),o=i(14),l=i(107),u=i(159),c=URLSearchParams,h=c.prototype,d=o(h.getAll),p=o(h.has),v=new c("a=1");!v.has("a",2)&&v.has("a",void 0)||a(h,"has",(function has(t){var r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return p(this,t);var a=d(this,t);u(r,1);for(var o=l(i),c=0;c<a.length;)if(a[c++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},(t,r,i)=>{var a=i(6),o=i(14),l=i(121),u=URLSearchParams.prototype,c=o(u.forEach);a&&!("size"in u)&&l(u,"size",{get:function size(){var t=0;c(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},(t,r,i)=>{var a=i(3),o=i(40),l=i(64),u=i(168),c=i(170);a({target:"Array",proto:!0,arity:1,forced:i(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var r=o(this),i=l(r),a=arguments.length;c(i+a);for(var h=0;h<a;h++){r[i]=arguments[h];i++}u(r,i);return i}})},(t,r,i)=>{var a=i(6),o=i(169),l=TypeError,u=Object.getOwnPropertyDescriptor,c=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=c?function(t,r){if(o(t)&&!u(t,"length").writable)throw l("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},(t,r,i)=>{var a=i(15);t.exports=Array.isArray||function isArray(t){return"Array"===a(t)}},t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},(t,r,i)=>{i(172)("Uint8",(function(t){return function Uint8Array(r,i,a){return t(this,r,i,a)}}))},(t,r,i)=>{var a=i(3),o=i(4),l=i(8),u=i(6),c=i(173),h=i(174),d=i(176),p=i(155),v=i(11),y=i(44),g=i(181),m=i(65),b=i(177),w=i(182),P=i(184),A=i(18),S=i(39),E=i(79),x=i(20),D=i(23),k=i(81),C=i(25),T=i(114),I=i(58).f,O=i(185),M=i(188).forEach,L=i(191),R=i(121),G=i(45),B=i(5),j=i(52),N=i(113),W=j.get,V=j.set,U=j.enforce,H=G.f,z=B.f,q=o.RangeError,Y=d.ArrayBuffer,K=Y.prototype,X=d.DataView,$=h.NATIVE_ARRAY_BUFFER_VIEWS,Q=h.TYPED_ARRAY_TAG,J=h.TypedArray,Z=h.TypedArrayPrototype,ee=h.aTypedArrayConstructor,te=h.isTypedArray,re="BYTES_PER_ELEMENT",ne="Wrong length",fromList=function(t,r){ee(t);for(var i=0,a=r.length,o=new t(a);a>i;)o[i]=r[i++];return o},addGetter=function(t,r){R(t,r,{configurable:!0,get:function(){return W(this)[r]}})},isArrayBuffer=function(t){var r;return C(K,t)||"ArrayBuffer"===(r=E(t))||"SharedArrayBuffer"===r},isTypedArrayIndex=function(t,r){return te(t)&&!D(r)&&r in t&&g(+r)&&r>=0},ie=function getOwnPropertyDescriptor(t,r){r=A(r);return isTypedArrayIndex(t,r)?v(2,t[r]):z(t,r)},ae=function defineProperty(t,r,i){r=A(r);if(isTypedArrayIndex(t,r)&&x(i)&&S(i,"value")&&!S(i,"get")&&!S(i,"set")&&!i.configurable&&(!S(i,"writable")||i.writable)&&(!S(i,"enumerable")||i.enumerable)){t[r]=i.value;return t}return H(t,r,i)};if(u){if(!$){B.f=ie;G.f=ae;addGetter(Z,"buffer");addGetter(Z,"byteOffset");addGetter(Z,"byteLength");addGetter(Z,"length")}a({target:"Object",stat:!0,forced:!$},{getOwnPropertyDescriptor:ie,defineProperty:ae});t.exports=function(t,r,i){var u=t.match(/\d+/)[0]/8,h=t+(i?"Clamped":"")+"Array",d="get"+t,v="set"+t,g=o[h],A=g,S=A&&A.prototype,E={},addElement=function(t,r){H(t,r,{get:function(){return function(t,r){var i=W(t);return i.view[d](r*u+i.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,a){var o=W(t);o.view[v](r*u+o.byteOffset,i?P(a):a,!0)}(this,r,t)},enumerable:!0})};if($){if(c){A=r((function(t,r,i,a){p(t,S);return N(x(r)?isArrayBuffer(r)?void 0!==a?new g(r,w(i,u),a):void 0!==i?new g(r,w(i,u)):new g(r):te(r)?fromList(A,r):l(O,A,r):new g(b(r)),t,A)}));T&&T(A,J);M(I(g),(function(t){t in A||y(A,t,g[t])}));A.prototype=S}}else{A=r((function(t,r,i,a){p(t,S);var o,c,h,d=0,v=0;if(x(r)){if(!isArrayBuffer(r))return te(r)?fromList(A,r):l(O,A,r);o=r;v=w(i,u);var y=r.byteLength;if(void 0===a){if(y%u)throw q(ne);if((c=y-v)<0)throw q(ne)}else if((c=m(a)*u)+v>y)throw q(ne);h=c/u}else{h=b(r);o=new Y(c=h*u)}V(t,{buffer:o,byteOffset:v,byteLength:c,length:h,view:new X(o)});for(;d<h;)addElement(t,d++)}));T&&T(A,J);S=A.prototype=k(Z)}S.constructor!==A&&y(S,"constructor",A);U(S).TypedArrayConstructor=A;Q&&y(S,Q,h);var D=A!==g;E[h]=A;a({global:!0,constructor:!0,forced:D,sham:!$},E);re in A||y(A,re,u);re in S||y(S,re,u);L(h)}}else t.exports=function(){}},(t,r,i)=>{var a=i(4),o=i(7),l=i(103),u=i(174).NATIVE_ARRAY_BUFFER_VIEWS,c=a.ArrayBuffer,h=a.Int8Array;t.exports=!u||!o((function(){h(1)}))||!o((function(){new h(-1)}))||!l((function(t){new h;new h(null);new h(1.5);new h(t)}),!0)||o((function(){return 1!==new h(new c(2),1,void 0).length}))},(t,r,i)=>{var a,o,l,u=i(175),c=i(6),h=i(4),d=i(21),p=i(20),v=i(39),y=i(79),g=i(32),m=i(44),b=i(48),w=i(121),P=i(25),A=i(69),S=i(114),E=i(34),x=i(41),D=i(52),k=D.enforce,C=D.get,T=h.Int8Array,I=T&&T.prototype,O=h.Uint8ClampedArray,M=O&&O.prototype,L=T&&A(T),R=I&&A(I),G=Object.prototype,B=h.TypeError,j=E("toStringTag"),N=x("TYPED_ARRAY_TAG"),W="TypedArrayConstructor",V=u&&!!S&&"Opera"!==y(h.opera),U=!1,H={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=A(t);if(p(r)){var i=C(r);return i&&v(i,W)?i[W]:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!p(t))return!1;var r=y(t);return v(H,r)||v(z,r)};for(a in H)(l=(o=h[a])&&o.prototype)?k(l)[W]=o:V=!1;for(a in z)(l=(o=h[a])&&o.prototype)&&(k(l)[W]=o);if(!V||!d(L)||L===Function.prototype){L=function TypedArray(){throw B("Incorrect invocation")};if(V)for(a in H)h[a]&&S(h[a],L)}if(!V||!R||R===G){R=L.prototype;if(V)for(a in H)h[a]&&S(h[a].prototype,R)}V&&A(M)!==R&&S(M,R);if(c&&!v(R,j)){U=!0;w(R,j,{configurable:!0,get:function(){return p(this)?this[N]:void 0}});for(a in H)h[a]&&m(h[a],N,a)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:U&&N,aTypedArray:function(t){if(isTypedArray(t))return t;throw B("Target is not a typed array")},aTypedArrayConstructor:function(t){if(d(t)&&(!S||P(L,t)))return t;throw B(g(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,i,a){if(c){if(i)for(var o in H){var l=h[o];if(l&&v(l.prototype,t))try{delete l.prototype[t]}catch(i){try{l.prototype[t]=r}catch(t){}}}R[t]&&!i||b(R,t,i?r:V&&I[t]||r,a)}},exportTypedArrayStaticMethod:function(t,r,i){var a,o;if(c){if(S){if(i)for(a in H)if((o=h[a])&&v(o,t))try{delete o[t]}catch(t){}if(L[t]&&!i)return;try{return b(L,t,i?r:V&&L[t]||r)}catch(t){}}for(a in H)!(o=h[a])||o[t]&&!i||b(o,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!p(t))return!1;var r=y(t);return"DataView"===r||v(H,r)||v(z,r)},isTypedArray:isTypedArray,TypedArray:L,TypedArrayPrototype:R}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,r,i)=>{var a=i(4),o=i(14),l=i(6),u=i(175),c=i(50),h=i(44),d=i(121),p=i(161),v=i(7),y=i(155),g=i(62),m=i(65),b=i(177),w=i(178),P=i(69),A=i(114),S=i(58).f,E=i(180),x=i(157),D=i(72),k=i(52),C=c.PROPER,T=c.CONFIGURABLE,I="ArrayBuffer",O="DataView",M="prototype",L="Wrong index",R=k.getterFor(I),G=k.getterFor(O),B=k.set,j=a[I],N=j,W=N&&N[M],V=a[O],U=V&&V[M],H=Object.prototype,z=a.Array,q=a.RangeError,Y=o(E),K=o([].reverse),X=w.pack,$=w.unpack,packInt8=function(t){return[255&t]},packInt16=function(t){return[255&t,t>>8&255]},packInt32=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},unpackInt32=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},packFloat32=function(t){return X(t,23,4)},packFloat64=function(t){return X(t,52,8)},addGetter=function(t,r,i){d(t[M],r,{configurable:!0,get:function(){return i(this)[r]}})},get=function(t,r,i,a){var o=G(t),l=b(i),u=!!a;if(l+r>o.byteLength)throw q(L);var c=o.bytes,h=l+o.byteOffset,d=x(c,h,h+r);return u?d:K(d)},set=function(t,r,i,a,o,l){var u=G(t),c=b(i),h=a(+o),d=!!l;if(c+r>u.byteLength)throw q(L);for(var p=u.bytes,v=c+u.byteOffset,y=0;y<r;y++)p[v+y]=h[d?y:r-y-1]};if(u){var Q=C&&j.name!==I;if(v((function(){j(1)}))&&v((function(){new j(-1)}))&&!v((function(){new j;new j(1.5);new j(NaN);return 1!==j.length||Q&&!T})))Q&&T&&h(j,"name",I);else{(N=function ArrayBuffer(t){y(this,W);return new j(b(t))})[M]=W;for(var J,Z=S(j),ee=0;Z.length>ee;)(J=Z[ee++])in N||h(N,J,j[J]);W.constructor=N}A&&P(U)!==H&&A(U,H);var te=new V(new N(2)),re=o(U.setInt8);te.setInt8(0,2147483648);te.setInt8(1,2147483649);!te.getInt8(0)&&te.getInt8(1)||p(U,{setInt8:function setInt8(t,r){re(this,t,r<<24>>24)},setUint8:function setUint8(t,r){re(this,t,r<<24>>24)}},{unsafe:!0})}else{W=(N=function ArrayBuffer(t){y(this,W);var r=b(t);B(this,{type:I,bytes:Y(z(r),0),byteLength:r});if(!l){this.byteLength=r;this.detached=!1}})[M];U=(V=function DataView(t,r,i){y(this,U);y(t,W);var a=R(t),o=a.byteLength,u=g(r);if(u<0||u>o)throw q("Wrong offset");if(u+(i=void 0===i?o-u:m(i))>o)throw q("Wrong length");B(this,{type:O,buffer:t,byteLength:i,byteOffset:u,bytes:a.bytes});if(!l){this.buffer=t;this.byteLength=i;this.byteOffset=u}})[M];if(l){addGetter(N,"byteLength",R);addGetter(V,"buffer",G);addGetter(V,"byteLength",G);addGetter(V,"byteOffset",G)}p(U,{getInt8:function getInt8(t){return get(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return r[1]<<8|r[0]},getInt32:function getInt32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function getUint32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function getFloat32(t){return $(get(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function getFloat64(t){return $(get(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function setInt8(t,r){set(this,1,t,packInt8,r)},setUint8:function setUint8(t,r){set(this,1,t,packInt8,r)},setInt16:function setInt16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setUint16:function setUint16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setInt32:function setInt32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setUint32:function setUint32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setFloat32:function setFloat32(t,r){set(this,4,t,packFloat32,r,arguments.length>2&&arguments[2])},setFloat64:function setFloat64(t,r){set(this,8,t,packFloat64,r,arguments.length>2&&arguments[2])}})}D(N,I);D(V,O);t.exports={ArrayBuffer:N,DataView:V}},(t,r,i)=>{var a=i(62),o=i(65),l=RangeError;t.exports=function(t){if(void 0===t)return 0;var r=a(t),i=o(r);if(r!==i)throw l("Wrong length or index");return i}},(t,r,i)=>{var a=i(179),o=i(63),l=Array,u=Math.abs,c=Math.pow,h=Math.floor,d=Math.log,p=Math.LN2,roundToEven=function(t){var r=o(t),i=u(t-r);return i>.5||.5===i&&r%2!=0?r+a(t):r};t.exports={pack:function(t,r,i){var a,o,v,y=l(i),g=8*i-r-1,m=(1<<g)-1,b=m>>1,w=23===r?c(2,-24)-c(2,-77):0,P=t<0||0===t&&1/t<0?1:0,A=0;if((t=u(t))!=t||t===1/0){o=t!=t?1:0;a=m}else{a=h(d(t)/p);if(t*(v=c(2,-a))<1){a--;v*=2}if((t+=a+b>=1?w/v:w*c(2,1-b))*v>=2){a++;v/=2}if(a+b>=m){o=0;a=m}else if(a+b>=1){o=roundToEven((t*v-1)*c(2,r));a+=b}else{o=roundToEven(t*c(2,b-1)*c(2,r));a=0}}for(;r>=8;){y[A++]=255&o;o/=256;r-=8}a=a<<r|o;g+=r;for(;g>0;){y[A++]=255&a;a/=256;g-=8}y[--A]|=128*P;return y},unpack:function(t,r){var i,a=t.length,o=8*a-r-1,l=(1<<o)-1,u=l>>1,h=o-7,d=a-1,p=t[d--],v=127&p;p>>=7;for(;h>0;){v=256*v+t[d--];h-=8}i=v&(1<<-h)-1;v>>=-h;h+=r;for(;h>0;){i=256*i+t[d--];h-=8}if(0===v)v=1-u;else{if(v===l)return i?NaN:p?-1/0:1/0;i+=c(2,r);v-=u}return(p?-1:1)*i*c(2,v-r)}}},t=>{t.exports=Math.sign||function sign(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1}},(t,r,i)=>{var a=i(40),o=i(61),l=i(64);t.exports=function fill(t){for(var r=a(this),i=l(r),u=arguments.length,c=o(u>1?arguments[1]:void 0,i),h=u>2?arguments[2]:void 0,d=void 0===h?i:o(h,i);d>c;)r[c++]=t;return r}},(t,r,i)=>{var a=i(20),o=Math.floor;t.exports=Number.isInteger||function isInteger(t){return!a(t)&&isFinite(t)&&o(t)===t}},(t,r,i)=>{var a=i(183),o=RangeError;t.exports=function(t,r){var i=a(t);if(i%r)throw o("Wrong offset");return i}},(t,r,i)=>{var a=i(62),o=RangeError;t.exports=function(t){var r=a(t);if(r<0)throw o("The argument can't be less than 0");return r}},t=>{var r=Math.round;t.exports=function(t){var i=r(t);return i<0?0:i>255?255:255&i}},(t,r,i)=>{var a=i(94),o=i(8),l=i(77),u=i(40),c=i(64),h=i(101),d=i(102),p=i(98),v=i(186),y=i(174).aTypedArrayConstructor,g=i(187);t.exports=function from(t){var r,i,m,b,w,P,A,S,E=l(this),x=u(t),D=arguments.length,k=D>1?arguments[1]:void 0,C=void 0!==k,T=d(x);if(T&&!p(T)){S=(A=h(x,T)).next;x=[];for(;!(P=o(S,A)).done;)x.push(P.value)}C&&D>2&&(k=a(k,arguments[2]));i=c(x);m=new(y(E))(i);b=v(m);for(r=0;i>r;r++){w=C?k(x[r],r):x[r];m[r]=b?g(w):+w}return m}},(t,r,i)=>{var a=i(79);t.exports=function(t){var r=a(t);return"BigInt64Array"===r||"BigUint64Array"===r}},(t,r,i)=>{var a=i(19),o=TypeError;t.exports=function(t){var r=a(t,"number");if("number"==typeof r)throw o("Can't convert number to bigint");return BigInt(r)}},(t,r,i)=>{var a=i(94),o=i(14),l=i(13),u=i(40),c=i(64),h=i(189),d=o([].push),createMethod=function(t){var r=1===t,i=2===t,o=3===t,p=4===t,v=6===t,y=7===t,g=5===t||v;return function(m,b,w,P){for(var A,S,E=u(m),x=l(E),D=a(b,w),k=c(x),C=0,T=P||h,I=r?T(m,k):i||y?T(m,0):void 0;k>C;C++)if(g||C in x){S=D(A=x[C],C,E);if(t)if(r)I[C]=S;else if(S)switch(t){case 3:return!0;case 5:return A;case 6:return C;case 2:d(I,A)}else switch(t){case 4:return!1;case 7:d(I,A)}}return v?-1:o||p?p:I}};t.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}},(t,r,i)=>{var a=i(190);t.exports=function(t,r){return new(a(t))(0===r?0:r)}},(t,r,i)=>{var a=i(169),o=i(78),l=i(20),u=i(34)("species"),c=Array;t.exports=function(t){var r;if(a(t)){r=t.constructor;(o(r)&&(r===c||a(r.prototype))||l(r)&&null===(r=r[u]))&&(r=void 0)}return void 0===r?c:r}},(t,r,i)=>{var a=i(24),o=i(121),l=i(34),u=i(6),c=l("species");t.exports=function(t){var r=a(t);u&&r&&!r[c]&&o(r,c,{configurable:!0,get:function(){return this}})}},(t,r,i)=>{var a=i(174),o=i(64),l=i(62),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("at",(function at(t){var r=u(this),i=o(r),a=l(t),c=a>=0?a:i+a;return c<0||c>=i?void 0:r[c]}))},(t,r,i)=>{var a=i(14),o=i(174),l=a(i(194)),u=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function copyWithin(t,r){return l(u(this),t,r,arguments.length>2?arguments[2]:void 0)}))},(t,r,i)=>{var a=i(40),o=i(61),l=i(64),u=i(195),c=Math.min;t.exports=[].copyWithin||function copyWithin(t,r){var i=a(this),h=l(i),d=o(t,h),p=o(r,h),v=arguments.length>2?arguments[2]:void 0,y=c((void 0===v?h:o(v,h))-p,h-d),g=1;if(p<d&&d<p+y){g=-1;p+=y-1;d+=y-1}for(;y-- >0;){p in i?i[d]=i[p]:u(i,d);d+=g;p+=g}return i}},(t,r,i)=>{var a=i(32),o=TypeError;t.exports=function(t,r){if(!delete t[r])throw o("Cannot delete property "+a(r)+" of "+a(t))}},(t,r,i)=>{var a=i(174),o=i(188).every,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("every",(function every(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=i(180),l=i(187),u=i(79),c=i(8),h=i(14),d=i(7),p=a.aTypedArray,v=a.exportTypedArrayMethod,y=h("".slice);v("fill",(function fill(t){var r=arguments.length;p(this);var i="Big"===y(u(this),0,3)?l(t):+t;return c(o,this,i,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),d((function(){var t=0;new Int8Array(2).fill({valueOf:function(){return t++}});return 1!==t})))},(t,r,i)=>{var a=i(174),o=i(188).filter,l=i(199),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("filter",(function filter(t){var r=o(u(this),t,arguments.length>1?arguments[1]:void 0);return l(this,r)}))},(t,r,i)=>{var a=i(200),o=i(201);t.exports=function(t,r){return a(o(t),r)}},(t,r,i)=>{var a=i(64);t.exports=function(t,r){for(var i=0,o=a(r),l=new t(o);o>i;)l[i]=r[i++];return l}},(t,r,i)=>{var a=i(174),o=i(202),l=a.aTypedArrayConstructor,u=a.getTypedArrayConstructor;t.exports=function(t){return l(o(t,u(t)))}},(t,r,i)=>{var a=i(47),o=i(77),l=i(17),u=i(34)("species");t.exports=function(t,r){var i,c=a(t).constructor;return void 0===c||l(i=a(c)[u])?r:o(i)}},(t,r,i)=>{var a=i(174),o=i(188).find,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("find",(function find(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=i(188).findIndex,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("findIndex",(function findIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=i(206).findLast,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("findLast",(function findLast(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(94),o=i(13),l=i(40),u=i(64),createMethod=function(t){var r=1===t;return function(i,c,h){for(var d,p=l(i),v=o(p),y=a(c,h),g=u(v);g-- >0;)if(y(d=v[g],g,p))switch(t){case 0:return d;case 1:return g}return r?-1:void 0}};t.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}},(t,r,i)=>{var a=i(174),o=i(206).findLastIndex,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=i(188).forEach,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("forEach",(function forEach(t){o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=i(60).includes,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("includes",(function includes(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=i(60).indexOf,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("indexOf",(function indexOf(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(4),o=i(7),l=i(14),u=i(174),c=i(140),h=i(34)("iterator"),d=a.Uint8Array,p=l(c.values),v=l(c.keys),y=l(c.entries),g=u.aTypedArray,m=u.exportTypedArrayMethod,b=d&&d.prototype,w=!o((function(){b[h].call([1])})),P=!!b&&b.values&&b[h]===b.values&&"values"===b.values.name,A=function values(){return p(g(this))};m("entries",(function entries(){return y(g(this))}),w);m("keys",(function keys(){return v(g(this))}),w);m("values",A,w||!P,{name:"values"});m(h,A,w||!P,{name:"values"})},(t,r,i)=>{var a=i(174),o=i(14),l=a.aTypedArray,u=a.exportTypedArrayMethod,c=o([].join);u("join",(function join(t){return c(l(this),t)}))},(t,r,i)=>{var a=i(174),o=i(74),l=i(214),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("lastIndexOf",(function lastIndexOf(t){var r=arguments.length;return o(l,u(this),r>1?[t,arguments[1]]:[t])}))},(t,r,i)=>{var a=i(74),o=i(12),l=i(62),u=i(64),c=i(215),h=Math.min,d=[].lastIndexOf,p=!!d&&1/[1].lastIndexOf(1,-0)<0,v=c("lastIndexOf"),y=p||!v;t.exports=y?function lastIndexOf(t){if(p)return a(d,this,arguments)||0;var r=o(this),i=u(r),c=i-1;arguments.length>1&&(c=h(c,l(arguments[1])));c<0&&(c=i+c);for(;c>=0;c--)if(c in r&&r[c]===t)return c||0;return-1}:d},(t,r,i)=>{var a=i(7);t.exports=function(t,r){var i=[][t];return!!i&&a((function(){i.call(null,r||function(){return 1},1)}))}},(t,r,i)=>{var a=i(174),o=i(188).map,l=i(201),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("map",(function map(t){return o(u(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(l(t))(r)}))}))},(t,r,i)=>{var a=i(174),o=i(218).left,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("reduce",(function reduce(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(31),o=i(40),l=i(13),u=i(64),c=TypeError,createMethod=function(t){return function(r,i,h,d){a(i);var p=o(r),v=l(p),y=u(p),g=t?y-1:0,m=t?-1:1;if(h<2)for(;;){if(g in v){d=v[g];g+=m;break}g+=m;if(t?g<0:y<=g)throw c("Reduce of empty array with no initial value")}for(;t?g>=0:y>g;g+=m)g in v&&(d=i(d,v[g],g,p));return d}};t.exports={left:createMethod(!1),right:createMethod(!0)}},(t,r,i)=>{var a=i(174),o=i(218).right,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("reduceRight",(function reduceRight(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(174),o=a.aTypedArray,l=a.exportTypedArrayMethod,u=Math.floor;l("reverse",(function reverse(){for(var t,r=this,i=o(r).length,a=u(i/2),l=0;l<a;){t=r[l];r[l++]=r[--i];r[i]=t}return r}))},(t,r,i)=>{var a=i(4),o=i(8),l=i(174),u=i(64),c=i(182),h=i(40),d=i(7),p=a.RangeError,v=a.Int8Array,y=v&&v.prototype,g=y&&y.set,m=l.aTypedArray,b=l.exportTypedArrayMethod,w=!d((function(){var t=new Uint8ClampedArray(2);o(g,t,{length:1,0:3},1);return 3!==t[1]})),P=w&&l.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var t=new v(2);t.set(1);t.set("2",1);return 0!==t[0]||2!==t[1]}));b("set",(function set(t){m(this);var r=c(arguments.length>1?arguments[1]:void 0,1),i=h(t);if(w)return o(g,this,i,r);var a=this.length,l=u(i),d=0;if(l+r>a)throw p("Wrong length");for(;d<l;)this[r+d]=i[d++]}),!w||P)},(t,r,i)=>{var a=i(174),o=i(201),l=i(7),u=i(76),c=a.aTypedArray;(0,a.exportTypedArrayMethod)("slice",(function slice(t,r){for(var i=u(c(this),t,r),a=o(this),l=0,h=i.length,d=new a(h);h>l;)d[l]=i[l++];return d}),l((function(){new Int8Array(1).slice()})))},(t,r,i)=>{var a=i(174),o=i(188).some,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("some",(function some(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(4),o=i(95),l=i(7),u=i(31),c=i(162),h=i(174),d=i(225),p=i(226),v=i(28),y=i(227),g=h.aTypedArray,m=h.exportTypedArrayMethod,b=a.Uint16Array,w=b&&o(b.prototype.sort),P=!(!w||l((function(){w(new b(2),null)}))&&l((function(){w(new b(2),{})}))),A=!!w&&!l((function(){if(v)return v<74;if(d)return d<67;if(p)return!0;if(y)return y<602;var t,r,i=new b(516),a=Array(516);for(t=0;t<516;t++){r=t%4;i[t]=515-t;a[t]=t-2*r+3}w(i,(function(t,r){return(t/4|0)-(r/4|0)}));for(t=0;t<516;t++)if(i[t]!==a[t])return!0}));m("sort",(function sort(t){void 0!==t&&u(t);return A?w(this,t):c(g(this),function(t){return function(r,i){return void 0!==t?+t(r,i)||0:i!=i?-1:r!=r?1:0===r&&0===i?1/r>0&&1/i<0?1:-1:r>i}}(t))}),!A||P)},(t,r,i)=>{var a=i(29).match(/firefox\/(\d+)/i);t.exports=!!a&&+a[1]},(t,r,i)=>{var a=i(29);t.exports=/MSIE|Trident/.test(a)},(t,r,i)=>{var a=i(29).match(/AppleWebKit\/(\d+)\./);t.exports=!!a&&+a[1]},(t,r,i)=>{var a=i(4),o=i(74),l=i(174),u=i(7),c=i(76),h=a.Int8Array,d=l.aTypedArray,p=l.exportTypedArrayMethod,v=[].toLocaleString,y=!!h&&u((function(){v.call(new h(1))}));p("toLocaleString",(function toLocaleString(){return o(v,y?c(d(this)):d(this),c(arguments))}),u((function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()}))||!u((function(){h.prototype.toLocaleString.call([1,2])})))},(t,r,i)=>{var a=i(230),o=i(174),l=o.aTypedArray,u=o.exportTypedArrayMethod,c=o.getTypedArrayConstructor;u("toReversed",(function toReversed(){return a(l(this),c(this))}))},(t,r,i)=>{var a=i(64);t.exports=function(t,r){for(var i=a(t),o=new r(i),l=0;l<i;l++)o[l]=t[i-l-1];return o}},(t,r,i)=>{var a=i(174),o=i(14),l=i(31),u=i(200),c=a.aTypedArray,h=a.getTypedArrayConstructor,d=a.exportTypedArrayMethod,p=o(a.TypedArrayPrototype.sort);d("toSorted",(function toSorted(t){void 0!==t&&l(t);var r=c(this),i=u(h(r),r);return p(i,t)}))},(t,r,i)=>{var a=i(174).exportTypedArrayMethod,o=i(7),l=i(4),u=i(14),c=l.Uint8Array,h=c&&c.prototype||{},d=[].toString,p=u([].join);o((function(){d.call({})}))&&(d=function toString(){return p(this)});var v=h.toString!==d;a("toString",d,v)},(t,r,i)=>{var a=i(234),o=i(174),l=i(186),u=i(62),c=i(187),h=o.aTypedArray,d=o.getTypedArrayConstructor,p=o.exportTypedArrayMethod,v=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,r){var i=h(this),o=u(t),p=l(i)?c(r):+r;return a(i,d(i),o,p)}}.with,!v)},(t,r,i)=>{var a=i(64),o=i(62),l=RangeError;t.exports=function(t,r,i,u){var c=a(t),h=o(i),d=h<0?c+h:h;if(d>=c||d<0)throw l("Incorrect index");for(var p=new r(c),v=0;v<c;v++)p[v]=v===d?u:t[v];return p}},(t,r,i)=>{var a=i(6),o=i(121),l=i(236),u=ArrayBuffer.prototype;a&&!("detached"in u)&&o(u,"detached",{configurable:!0,get:function detached(){return l(this)}})},(t,r,i)=>{var a=i(14),o=i(237),l=a(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==o(t))return!1;try{l(t,0,0);return!1}catch(t){return!0}}},(t,r,i)=>{var a=i(115),o=i(15),l=TypeError;t.exports=a(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==o(t))throw l("ArrayBuffer expected");return t.byteLength}},(t,r,i)=>{var a=i(3),o=i(239);o&&a({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},(t,r,i)=>{var a=i(4),o=i(14),l=i(115),u=i(177),c=i(236),h=i(237),d=i(240),p=a.TypeError,v=a.structuredClone,y=a.ArrayBuffer,g=a.DataView,m=Math.min,b=y.prototype,w=g.prototype,P=o(b.slice),A=l(b,"resizable","get"),S=l(b,"maxByteLength","get"),E=o(w.getInt8),x=o(w.setInt8);t.exports=d&&function(t,r,i){var a=h(t),o=void 0===r?a:u(r),l=!A||!A(t);if(c(t))throw p("ArrayBuffer is detached");var d=v(t,{transfer:[t]});if(a===o&&(i||l))return d;if(a>=o&&(!i||l))return P(d,0,o);for(var b=i&&!l&&S?{maxByteLength:S(d)}:void 0,w=new y(o,b),D=new g(d),k=new g(w),C=m(o,a),T=0;T<C;T++)x(k,T,E(D,T));return w}},(t,r,i)=>{var a=i(4),o=i(7),l=i(28),u=i(241),c=i(242),h=i(243),d=a.structuredClone;t.exports=!!d&&!o((function(){if(c&&l>92||h&&l>94||u&&l>97)return!1;var t=new ArrayBuffer(8),r=d(t,{transfer:[t]});return 0!==t.byteLength||8!==r.byteLength}))},(t,r,i)=>{var a=i(242),o=i(243);t.exports=!a&&!o&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,r,i)=>{var a=i(4),o=i(15);t.exports="process"===o(a.process)},(t,r,i)=>{var a=i(3),o=i(239);o&&a({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},(t,r,i)=>{var a=i(3),o=i(40),l=i(83);a({target:"Object",stat:!0,forced:i(7)((function(){l(1)}))},{keys:function keys(t){return l(o(t))}})},(t,r,i)=>{i(172)("Uint32",(function(t){return function Uint32Array(r,i,a){return t(this,r,i,a)}}))},(t,r,i)=>{var a=i(3),o=i(60).includes,l=i(7),u=i(141);a({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function includes(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});u("includes")},(t,r,i)=>{var a=i(3),o=i(14),l=i(132),u=i(16),c=i(107),h=i(134),d=o("".indexOf);a({target:"String",proto:!0,forced:!h("includes")},{includes:function includes(t){return!!~d(c(u(this)),c(l(t)),arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(3),o=i(188).map;a({target:"Array",proto:!0,forced:!i(250)("map")},{map:function map(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(7),o=i(34),l=i(28),u=o("species");t.exports=function(t){return l>=51||!a((function(){var r=[];(r.constructor={})[u]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},(t,r,i)=>{var a=i(3),o=i(252).start;a({target:"String",proto:!0,forced:i(254)},{padStart:function padStart(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(14),o=i(65),l=i(107),u=i(253),c=i(16),h=a(u),d=a("".slice),p=Math.ceil,createMethod=function(t){return function(r,i,a){var u,v,y=l(c(r)),g=o(i),m=y.length,b=void 0===a?" ":l(a);if(g<=m||""===b)return y;(v=h(b,p((u=g-m)/b.length))).length>u&&(v=d(v,0,u));return t?y+v:v+y}};t.exports={start:createMethod(!1),end:createMethod(!0)}},(t,r,i)=>{var a=i(62),o=i(107),l=i(16),u=RangeError;t.exports=function repeat(t){var r=o(l(this)),i="",c=a(t);if(c<0||c===1/0)throw u("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(r+=r))1&c&&(i+=r);return i}},(t,r,i)=>{var a=i(29);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(a)},(t,r,i)=>{var a=i(50).PROPER,o=i(48),l=i(47),u=i(107),c=i(7),h=i(256),d="toString",p=RegExp.prototype[d],v=c((function(){return"/a/b"!==p.call({source:"a",flags:"b"})})),y=a&&p.name!==d;(v||y)&&o(RegExp.prototype,d,(function toString(){var t=l(this);return"/"+u(t.source)+"/"+u(h(t))}),{unsafe:!0})},(t,r,i)=>{var a=i(8),o=i(39),l=i(25),u=i(108),c=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in c||o(t,"flags")||!l(c,t)?r:a(u,t)}},(t,r,i)=>{var a=i(3),o=i(7),l=i(169),u=i(20),c=i(40),h=i(64),d=i(170),p=i(100),v=i(189),y=i(250),g=i(34),m=i(28),b=g("isConcatSpreadable"),w=m>=51||!o((function(){var t=[];t[b]=!1;return t.concat()[0]!==t})),isConcatSpreadable=function(t){if(!u(t))return!1;var r=t[b];return void 0!==r?!!r:l(t)};a({target:"Array",proto:!0,arity:1,forced:!w||!y("concat")},{concat:function concat(t){var r,i,a,o,l,u=c(this),y=v(u,0),g=0;for(r=-1,a=arguments.length;r<a;r++)if(isConcatSpreadable(l=-1===r?u:arguments[r])){o=h(l);d(g+o);for(i=0;i<o;i++,g++)i in l&&p(y,g,l[i])}else{d(g+1);p(y,g++,l)}y.length=g;return y}})},(t,r,i)=>{var a=i(3),o=i(169),l=i(78),u=i(20),c=i(61),h=i(64),d=i(12),p=i(100),v=i(34),y=i(250),g=i(76),m=y("slice"),b=v("species"),w=Array,P=Math.max;a({target:"Array",proto:!0,forced:!m},{slice:function slice(t,r){var i,a,v,y=d(this),m=h(y),A=c(t,m),S=c(void 0===r?m:r,m);if(o(y)){i=y.constructor;(l(i)&&(i===w||o(i.prototype))||u(i)&&null===(i=i[b]))&&(i=void 0);if(i===w||void 0===i)return g(y,A,S)}a=new(void 0===i?w:i)(P(S-A,0));for(v=0;A<S;A++,v++)A in y&&p(a,v,y[A]);a.length=v;return a}})},(t,r,i)=>{i(260);i(272);i(275);i(276);i(277);i(278)},(t,r,i)=>{var a,o,l,u=i(3),c=i(36),h=i(243),d=i(4),p=i(8),v=i(48),y=i(114),g=i(72),m=i(191),b=i(31),w=i(21),P=i(20),A=i(155),S=i(202),E=i(261).set,x=i(263),D=i(267),k=i(268),C=i(264),T=i(52),I=i(269),O=i(270),M=i(271),L="Promise",R=O.CONSTRUCTOR,G=O.REJECTION_EVENT,B=O.SUBCLASSING,j=T.getterFor(L),N=T.set,W=I&&I.prototype,V=I,U=W,H=d.TypeError,z=d.document,q=d.process,Y=M.f,K=Y,X=!!(z&&z.createEvent&&d.dispatchEvent),$="unhandledrejection",isThenable=function(t){var r;return!(!P(t)||!w(r=t.then))&&r},callReaction=function(t,r){var i,a,o,l=r.value,u=1===r.state,c=u?t.ok:t.fail,h=t.resolve,d=t.reject,v=t.domain;try{if(c){if(!u){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===c)i=l;else{v&&v.enter();i=c(l);if(v){v.exit();o=!0}}i===t.promise?d(H("Promise-chain cycle")):(a=isThenable(i))?p(a,i,h,d):h(i)}else d(l)}catch(t){v&&!o&&v.exit();d(t)}},notify=function(t,r){if(!t.notified){t.notified=!0;x((function(){for(var i,a=t.reactions;i=a.get();)callReaction(i,t);t.notified=!1;r&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,r,i){var a,o;if(X){(a=z.createEvent("Event")).promise=r;a.reason=i;a.initEvent(t,!1,!0);d.dispatchEvent(a)}else a={promise:r,reason:i};!G&&(o=d["on"+t])?o(a):t===$&&D("Unhandled promise rejection",i)},onUnhandled=function(t){p(E,d,(function(){var r,i=t.facade,a=t.value;if(isUnhandled(t)){r=k((function(){h?q.emit("unhandledRejection",a,i):dispatchEvent($,i,a)}));t.rejection=h||isUnhandled(t)?2:1;if(r.error)throw r.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){p(E,d,(function(){var r=t.facade;h?q.emit("rejectionHandled",r):dispatchEvent("rejectionhandled",r,t.value)}))},bind=function(t,r,i){return function(a){t(r,a,i)}},internalReject=function(t,r,i){if(!t.done){t.done=!0;i&&(t=i);t.value=r;t.state=2;notify(t,!0)}},internalResolve=function(t,r,i){if(!t.done){t.done=!0;i&&(t=i);try{if(t.facade===r)throw H("Promise can't be resolved itself");var a=isThenable(r);if(a)x((function(){var i={done:!1};try{p(a,r,bind(internalResolve,i,t),bind(internalReject,i,t))}catch(r){internalReject(i,r,t)}}));else{t.value=r;t.state=1;notify(t,!1)}}catch(r){internalReject({done:!1},r,t)}}};if(R){U=(V=function Promise(t){A(this,U);b(t);p(a,this);var r=j(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(a=function Promise(t){N(this,{type:L,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:0,value:void 0})}).prototype=v(U,"then",(function then(t,r){var i=j(this),a=Y(S(this,V));i.parent=!0;a.ok=!w(t)||t;a.fail=w(r)&&r;a.domain=h?q.domain:void 0;0===i.state?i.reactions.add(a):x((function(){callReaction(a,i)}));return a.promise}));o=function(){var t=new a,r=j(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};M.f=Y=function(t){return t===V||undefined===t?new o(t):K(t)};if(!c&&w(I)&&W!==Object.prototype){l=W.then;B||v(W,"then",(function then(t,r){var i=this;return new V((function(t,r){p(l,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete W.constructor}catch(t){}y&&y(W,U)}}u({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:V});g(V,L,!1,!0);m(L)},(t,r,i)=>{var a,o,l,u,c=i(4),h=i(74),d=i(94),p=i(21),v=i(39),y=i(7),g=i(84),m=i(76),b=i(43),w=i(159),P=i(262),A=i(243),S=c.setImmediate,E=c.clearImmediate,x=c.process,D=c.Dispatch,k=c.Function,C=c.MessageChannel,T=c.String,I=0,O={},M="onreadystatechange";y((function(){a=c.location}));var run=function(t){if(v(O,t)){var r=O[t];delete O[t];r()}},runner=function(t){return function(){run(t)}},eventListener=function(t){run(t.data)},globalPostMessageDefer=function(t){c.postMessage(T(t),a.protocol+"//"+a.host)};if(!S||!E){S=function setImmediate(t){w(arguments.length,1);var r=p(t)?t:k(t),i=m(arguments,1);O[++I]=function(){h(r,void 0,i)};o(I);return I};E=function clearImmediate(t){delete O[t]};if(A)o=function(t){x.nextTick(runner(t))};else if(D&&D.now)o=function(t){D.now(runner(t))};else if(C&&!P){u=(l=new C).port2;l.port1.onmessage=eventListener;o=d(u.postMessage,u)}else if(c.addEventListener&&p(c.postMessage)&&!c.importScripts&&a&&"file:"!==a.protocol&&!y(globalPostMessageDefer)){o=globalPostMessageDefer;c.addEventListener("message",eventListener,!1)}else o=M in b("script")?function(t){g.appendChild(b("script"))[M]=function(){g.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:S,clear:E}},(t,r,i)=>{var a=i(29);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(a)},(t,r,i)=>{var a,o,l,u,c,h=i(4),d=i(94),p=i(5).f,v=i(261).set,y=i(264),g=i(262),m=i(265),b=i(266),w=i(243),P=h.MutationObserver||h.WebKitMutationObserver,A=h.document,S=h.process,E=h.Promise,x=p(h,"queueMicrotask"),D=x&&x.value;if(!D){var k=new y,flush=function(){var t,r;w&&(t=S.domain)&&t.exit();for(;r=k.get();)try{r()}catch(t){k.head&&a();throw t}t&&t.enter()};if(g||w||b||!P||!A)if(!m&&E&&E.resolve){(u=E.resolve(void 0)).constructor=E;c=d(u.then,u);a=function(){c(flush)}}else if(w)a=function(){S.nextTick(flush)};else{v=d(v,h);a=function(){v(flush)}}else{o=!0;l=A.createTextNode("");new P(flush).observe(l,{characterData:!0});a=function(){l.data=o=!o}}D=function(t){k.head||a();k.add(t)}}t.exports=D},t=>{var Queue=function(){this.head=null;this.tail=null};Queue.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r;this.tail=r},get:function(){var t=this.head;if(t){null===(this.head=t.next)&&(this.tail=null);return t.item}}};t.exports=Queue},(t,r,i)=>{var a=i(29);t.exports=/ipad|iphone|ipod/i.test(a)&&"undefined"!=typeof Pebble},(t,r,i)=>{var a=i(29);t.exports=/web0s(?!.*chrome)/i.test(a)},t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},(t,r,i)=>{var a=i(4);t.exports=a.Promise},(t,r,i)=>{var a=i(4),o=i(269),l=i(21),u=i(68),c=i(51),h=i(34),d=i(241),p=i(242),v=i(36),y=i(28),g=o&&o.prototype,m=h("species"),b=!1,w=l(a.PromiseRejectionEvent),P=u("Promise",(function(){var t=c(o),r=t!==String(o);if(!r&&66===y)return!0;if(v&&(!g.catch||!g.finally))return!0;if(!y||y<51||!/native code/.test(t)){var i=new o((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(i.constructor={})[m]=FakePromise;if(!(b=i.then((function(){}))instanceof FakePromise))return!0}return!r&&(d||p)&&!w}));t.exports={CONSTRUCTOR:P,REJECTION_EVENT:w,SUBCLASSING:b}},(t,r,i)=>{var a=i(31),o=TypeError,PromiseCapability=function(t){var r,i;this.promise=new t((function(t,a){if(void 0!==r||void 0!==i)throw o("Bad Promise constructor");r=t;i=a}));this.resolve=a(r);this.reject=a(i)};t.exports.f=function(t){return new PromiseCapability(t)}},(t,r,i)=>{var a=i(3),o=i(8),l=i(31),u=i(271),c=i(268),h=i(273);a({target:"Promise",stat:!0,forced:i(274)},{all:function all(t){var r=this,i=u.f(r),a=i.resolve,d=i.reject,p=c((function(){var i=l(r.resolve),u=[],c=0,p=1;h(t,(function(t){var l=c++,h=!1;p++;o(i,r,t).then((function(t){if(!h){h=!0;u[l]=t;--p||a(u)}}),d)}));--p||a(u)}));p.error&&d(p.value);return i.promise}})},(t,r,i)=>{var a=i(94),o=i(8),l=i(47),u=i(32),c=i(98),h=i(64),d=i(25),p=i(101),v=i(102),y=i(97),g=TypeError,Result=function(t,r){this.stopped=t;this.result=r},m=Result.prototype;t.exports=function(t,r,i){var b,w,P,A,S,E,x,D=i&&i.that,k=!(!i||!i.AS_ENTRIES),C=!(!i||!i.IS_RECORD),T=!(!i||!i.IS_ITERATOR),I=!(!i||!i.INTERRUPTED),O=a(r,D),stop=function(t){b&&y(b,"normal",t);return new Result(!0,t)},callFn=function(t){if(k){l(t);return I?O(t[0],t[1],stop):O(t[0],t[1])}return I?O(t,stop):O(t)};if(C)b=t.iterator;else if(T)b=t;else{if(!(w=v(t)))throw g(u(t)+" is not iterable");if(c(w)){for(P=0,A=h(t);A>P;P++)if((S=callFn(t[P]))&&d(m,S))return S;return new Result(!1)}b=p(t,w)}E=C?t.next:b.next;for(;!(x=o(E,b)).done;){try{S=callFn(x.value)}catch(t){y(b,"throw",t)}if("object"==typeof S&&S&&d(m,S))return S}return new Result(!1)}},(t,r,i)=>{var a=i(269),o=i(103),l=i(270).CONSTRUCTOR;t.exports=l||!o((function(t){a.all(t).then(void 0,(function(){}))}))},(t,r,i)=>{var a=i(3),o=i(36),l=i(270).CONSTRUCTOR,u=i(269),c=i(24),h=i(21),d=i(48),p=u&&u.prototype;a({target:"Promise",proto:!0,forced:l,real:!0},{catch:function(t){return this.then(void 0,t)}});if(!o&&h(u)){var v=c("Promise").prototype.catch;p.catch!==v&&d(p,"catch",v,{unsafe:!0})}},(t,r,i)=>{var a=i(3),o=i(8),l=i(31),u=i(271),c=i(268),h=i(273);a({target:"Promise",stat:!0,forced:i(274)},{race:function race(t){var r=this,i=u.f(r),a=i.reject,d=c((function(){var u=l(r.resolve);h(t,(function(t){o(u,r,t).then(i.resolve,a)}))}));d.error&&a(d.value);return i.promise}})},(t,r,i)=>{var a=i(3),o=i(8),l=i(271);a({target:"Promise",stat:!0,forced:i(270).CONSTRUCTOR},{reject:function reject(t){var r=l.f(this);o(r.reject,void 0,t);return r.promise}})},(t,r,i)=>{var a=i(3),o=i(24),l=i(36),u=i(269),c=i(270).CONSTRUCTOR,h=i(279),d=o("Promise"),p=l&&!c;a({target:"Promise",stat:!0,forced:l||c},{resolve:function resolve(t){return h(p&&this===d?u:this,t)}})},(t,r,i)=>{var a=i(47),o=i(20),l=i(271);t.exports=function(t,r){a(t);if(o(r)&&r.constructor===t)return r;var i=l.f(t);(0,i.resolve)(r);return i.promise}},(t,r,i)=>{i(281)},(t,r,i)=>{i(282)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),i(288))},(t,r,i)=>{var a=i(3),o=i(4),l=i(14),u=i(68),c=i(48),h=i(283),d=i(273),p=i(155),v=i(21),y=i(17),g=i(20),m=i(7),b=i(103),w=i(72),P=i(113);t.exports=function(t,r,i){var A=-1!==t.indexOf("Map"),S=-1!==t.indexOf("Weak"),E=A?"set":"add",x=o[t],D=x&&x.prototype,k=x,C={},fixMethod=function(t){var r=l(D[t]);c(D,t,"add"===t?function add(t){r(this,0===t?0:t);return this}:"delete"===t?function(t){return!(S&&!g(t))&&r(this,0===t?0:t)}:"get"===t?function get(t){return S&&!g(t)?void 0:r(this,0===t?0:t)}:"has"===t?function has(t){return!(S&&!g(t))&&r(this,0===t?0:t)}:function set(t,i){r(this,0===t?0:t,i);return this})};if(u(t,!v(x)||!(S||D.forEach&&!m((function(){(new x).entries().next()}))))){k=i.getConstructor(r,t,A,E);h.enable()}else if(u(t,!0)){var T=new k,I=T[E](S?{}:-0,1)!==T,O=m((function(){T.has(1)})),M=b((function(t){new x(t)})),L=!S&&m((function(){for(var t=new x,r=5;r--;)t[E](r,r);return!t.has(-0)}));if(!M){(k=r((function(t,r){p(t,D);var i=P(new x,t,k);y(r)||d(r,i[E],{that:i,AS_ENTRIES:A});return i}))).prototype=D;D.constructor=k}if(O||L){fixMethod("delete");fixMethod("has");A&&fixMethod("get")}(L||I)&&fixMethod(E);S&&D.clear&&delete D.clear}C[t]=k;a({global:!0,constructor:!0,forced:k!==x},C);w(k,t);S||i.setStrong(k,t,A);return k}},(t,r,i)=>{var a=i(3),o=i(14),l=i(55),u=i(20),c=i(39),h=i(45).f,d=i(58),p=i(284),v=i(285),y=i(41),g=i(287),m=!1,b=y("meta"),w=0,setMetadata=function(t){h(t,b,{value:{objectID:"O"+w++,weakData:{}}})},P=t.exports={enable:function(){P.enable=function(){};m=!0;var t=d.f,r=o([].splice),i={};i[b]=1;if(t(i).length){d.f=function(i){for(var a=t(i),o=0,l=a.length;o<l;o++)if(a[o]===b){r(a,o,1);break}return a};a({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!c(t,b)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[b].objectID},getWeakData:function(t,r){if(!c(t,b)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[b].weakData},onFreeze:function(t){g&&m&&v(t)&&!c(t,b)&&setMetadata(t);return t}};l[b]=!0},(t,r,i)=>{var a=i(15),o=i(12),l=i(58).f,u=i(157),c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return c&&"Window"===a(t)?function(t){try{return l(t)}catch(t){return u(c)}}(t):l(o(t))}},(t,r,i)=>{var a=i(7),o=i(20),l=i(15),u=i(286),c=Object.isExtensible,h=a((function(){c(1)}));t.exports=h||u?function isExtensible(t){return!!o(t)&&((!u||"ArrayBuffer"!==l(t))&&(!c||c(t)))}:c},(t,r,i)=>{var a=i(7);t.exports=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},(t,r,i)=>{var a=i(7);t.exports=!a((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(t,r,i)=>{var a=i(81),o=i(121),l=i(161),u=i(94),c=i(155),h=i(17),d=i(273),p=i(142),v=i(145),y=i(191),g=i(6),m=i(283).fastKey,b=i(52),w=b.set,P=b.getterFor;t.exports={getConstructor:function(t,r,i,p){var v=t((function(t,o){c(t,y);w(t,{type:r,index:a(null),first:void 0,last:void 0,size:0});g||(t.size=0);h(o)||d(o,t[p],{that:t,AS_ENTRIES:i})})),y=v.prototype,b=P(r),define=function(t,r,i){var a,o,l=b(t),u=getEntry(t,r);if(u)u.value=i;else{l.last=u={index:o=m(r,!0),key:r,value:i,previous:a=l.last,next:void 0,removed:!1};l.first||(l.first=u);a&&(a.next=u);g?l.size++:t.size++;"F"!==o&&(l.index[o]=u)}return t},getEntry=function(t,r){var i,a=b(t),o=m(r);if("F"!==o)return a.index[o];for(i=a.first;i;i=i.next)if(i.key===r)return i};l(y,{clear:function clear(){for(var t=b(this),r=t.index,i=t.first;i;){i.removed=!0;i.previous&&(i.previous=i.previous.next=void 0);delete r[i.index];i=i.next}t.first=t.last=void 0;g?t.size=0:this.size=0},delete:function(t){var r=this,i=b(r),a=getEntry(r,t);if(a){var o=a.next,l=a.previous;delete i.index[a.index];a.removed=!0;l&&(l.next=o);o&&(o.previous=l);i.first===a&&(i.first=o);i.last===a&&(i.last=l);g?i.size--:r.size--}return!!a},forEach:function forEach(t){for(var r,i=b(this),a=u(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:i.first;){a(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});l(y,i?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}});g&&o(y,"size",{configurable:!0,get:function(){return b(this).size}});return v},setStrong:function(t,r,i){var a=r+" Iterator",o=P(r),l=P(a);p(t,r,(function(t,r){w(this,{type:a,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=l(this),r=t.kind,i=t.last;i&&i.removed;)i=i.previous;if(!t.target||!(t.last=i=i?i.next:t.state.first)){t.target=void 0;return v(void 0,!0)}return v("keys"===r?i.key:"values"===r?i.value:[i.key,i.value],!1)}),i?"entries":"values",!i,!0);y(r)}}},(t,r,i)=>{var a=i(74),o=i(8),l=i(14),u=i(136),c=i(7),h=i(47),d=i(21),p=i(17),v=i(62),y=i(65),g=i(107),m=i(16),b=i(137),w=i(30),P=i(290),A=i(139),S=i(34)("replace"),E=Math.max,x=Math.min,D=l([].concat),k=l([].push),C=l("".indexOf),T=l("".slice),I="$0"==="a".replace(/./,"$0"),O=!!/./[S]&&""===/./[S]("a","$0");u("replace",(function(t,r,i){var l=O?"$":"$0";return[function replace(t,i){var a=m(this),l=p(t)?void 0:w(t,S);return l?o(l,t,a,i):o(r,g(a),t,i)},function(t,o){var u=h(this),c=g(t);if("string"==typeof o&&-1===C(o,l)&&-1===C(o,"$<")){var p=i(r,u,c,o);if(p.done)return p.value}var m=d(o);m||(o=g(o));var w,S=u.global;if(S){w=u.unicode;u.lastIndex=0}for(var I,O=[];null!==(I=A(u,c));){k(O,I);if(!S)break;""===g(I[0])&&(u.lastIndex=b(c,y(u.lastIndex),w))}for(var M,L="",R=0,G=0;G<O.length;G++){for(var B,j=g((I=O[G])[0]),N=E(x(v(I.index),c.length),0),W=[],V=1;V<I.length;V++)k(W,void 0===(M=I[V])?M:String(M));var U=I.groups;if(m){var H=D([j],W,N,c);void 0!==U&&k(H,U);B=g(a(o,void 0,H))}else B=P(j,c,N,W,U,o);if(N>=R){L+=T(c,R,N)+B;R=N+j.length}}return L+T(c,R)}]}),!!c((function(){var t=/./;t.exec=function(){var t=[];t.groups={a:"7"};return t};return"7"!=="".replace(t,"$<a>")}))||!I||O)},(t,r,i)=>{var a=i(14),o=i(40),l=Math.floor,u=a("".charAt),c=a("".replace),h=a("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,p=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,i,a,v,y){var g=i+t.length,m=a.length,b=p;if(void 0!==v){v=o(v);b=d}return c(y,b,(function(o,c){var d;switch(u(c,0)){case"$":return"$";case"&":return t;case"`":return h(r,0,i);case"'":return h(r,g);case"<":d=v[h(c,1,-1)];break;default:var p=+c;if(0===p)return o;if(p>m){var y=l(p/10);return 0===y?o:y<=m?void 0===a[y-1]?u(c,1):a[y-1]+u(c,1):o}d=a[p-1]}return void 0===d?"":d}))}},(t,r,i)=>{var a=i(3),o=i(8),l=i(14),u=i(16),c=i(21),h=i(17),d=i(133),p=i(107),v=i(30),y=i(256),g=i(290),m=i(34),b=i(36),w=m("replace"),P=TypeError,A=l("".indexOf),S=l("".replace),E=l("".slice),x=Math.max,stringIndexOf=function(t,r,i){return i>t.length?-1:""===r?i:A(t,r,i)};a({target:"String",proto:!0},{replaceAll:function replaceAll(t,r){var i,a,l,m,D,k,C,T,I,O=u(this),M=0,L=0,R="";if(!h(t)){if(i=d(t)){a=p(u(y(t)));if(!~A(a,"g"))throw P("`.replaceAll` does not allow non-global regexes")}if(l=v(t,w))return o(l,t,O,r);if(b&&i)return S(p(O),t,r)}m=p(O);D=p(t);(k=c(r))||(r=p(r));C=D.length;T=x(1,C);M=stringIndexOf(m,D,0);for(;-1!==M;){I=k?p(r(D,M,m)):g(D,m,M,[],void 0,r);R+=E(m,L,M)+I;L=M+C;M=stringIndexOf(m,D,M+T)}L<m.length&&(R+=E(m,L));return R}})},(t,r,i)=>{i(293);i(294);i(296);i(297);i(299)},(t,r,i)=>{var a=i(3),o=i(4),l=i(8),u=i(14),c=i(36),h=i(6),d=i(27),p=i(7),v=i(39),y=i(25),g=i(47),m=i(12),b=i(18),w=i(107),P=i(11),A=i(81),S=i(83),E=i(58),x=i(284),D=i(67),k=i(5),C=i(45),T=i(82),I=i(10),O=i(48),M=i(121),L=i(35),R=i(54),G=i(55),B=i(41),j=i(34),N=i(88),W=i(86),V=i(89),U=i(72),H=i(52),z=i(188).forEach,q=R("hidden"),Y="Symbol",K="prototype",X=H.set,$=H.getterFor(Y),Q=Object[K],J=o.Symbol,Z=J&&J[K],ee=o.TypeError,te=o.QObject,re=k.f,ne=C.f,ie=x.f,ae=I.f,oe=u([].push),se=L("symbols"),le=L("op-symbols"),ue=L("wks"),ce=!te||!te[K]||!te[K].findChild,he=h&&p((function(){return 7!==A(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?function(t,r,i){var a=re(Q,r);a&&delete Q[r];ne(t,r,i);a&&t!==Q&&ne(Q,r,a)}:ne,wrap=function(t,r){var i=se[t]=A(Z);X(i,{type:Y,tag:t,description:r});h||(i.description=r);return i},de=function defineProperty(t,r,i){t===Q&&de(le,r,i);g(t);var a=b(r);g(i);if(v(se,a)){if(i.enumerable){v(t,q)&&t[q][a]&&(t[q][a]=!1);i=A(i,{enumerable:P(0,!1)})}else{v(t,q)||ne(t,q,P(1,{}));t[q][a]=!0}return he(t,a,i)}return ne(t,a,i)},fe=function defineProperties(t,r){g(t);var i=m(r),a=S(i).concat($getOwnPropertySymbols(i));z(a,(function(r){h&&!l(pe,i,r)||de(t,r,i[r])}));return t},pe=function propertyIsEnumerable(t){var r=b(t),i=l(ae,this,r);return!(this===Q&&v(se,r)&&!v(le,r))&&(!(i||!v(this,r)||!v(se,r)||v(this,q)&&this[q][r])||i)},ve=function getOwnPropertyDescriptor(t,r){var i=m(t),a=b(r);if(i!==Q||!v(se,a)||v(le,a)){var o=re(i,a);!o||!v(se,a)||v(i,q)&&i[q][a]||(o.enumerable=!0);return o}},ye=function getOwnPropertyNames(t){var r=ie(m(t)),i=[];z(r,(function(t){v(se,t)||v(G,t)||oe(i,t)}));return i},$getOwnPropertySymbols=function(t){var r=t===Q,i=ie(r?le:m(t)),a=[];z(i,(function(t){!v(se,t)||r&&!v(Q,t)||oe(a,se[t])}));return a};if(!d){O(Z=(J=function Symbol(){if(y(Z,this))throw ee("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,r=B(t),setter=function(t){this===Q&&l(setter,le,t);v(this,q)&&v(this[q],r)&&(this[q][r]=!1);he(this,r,P(1,t))};h&&ce&&he(Q,r,{configurable:!0,set:setter});return wrap(r,t)})[K],"toString",(function toString(){return $(this).tag}));O(J,"withoutSetter",(function(t){return wrap(B(t),t)}));I.f=pe;C.f=de;T.f=fe;k.f=ve;E.f=x.f=ye;D.f=$getOwnPropertySymbols;N.f=function(t){return wrap(j(t),t)};if(h){M(Z,"description",{configurable:!0,get:function description(){return $(this).description}});c||O(Q,"propertyIsEnumerable",pe,{unsafe:!0})}}a({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:J});z(S(ue),(function(t){W(t)}));a({target:Y,stat:!0,forced:!d},{useSetter:function(){ce=!0},useSimple:function(){ce=!1}});a({target:"Object",stat:!0,forced:!d,sham:!h},{create:function create(t,r){return void 0===r?A(t):fe(A(t),r)},defineProperty:de,defineProperties:fe,getOwnPropertyDescriptor:ve});a({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:ye});V();U(J,Y);G[q]=!0},(t,r,i)=>{var a=i(3),o=i(24),l=i(39),u=i(107),c=i(35),h=i(295),d=c("string-to-symbol-registry"),p=c("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!h},{for:function(t){var r=u(t);if(l(d,r))return d[r];var i=o("Symbol")(r);d[r]=i;p[i]=r;return i}})},(t,r,i)=>{var a=i(27);t.exports=a&&!!Symbol.for&&!!Symbol.keyFor},(t,r,i)=>{var a=i(3),o=i(39),l=i(23),u=i(32),c=i(35),h=i(295),d=c("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!h},{keyFor:function keyFor(t){if(!l(t))throw TypeError(u(t)+" is not a symbol");if(o(d,t))return d[t]}})},(t,r,i)=>{var a=i(3),o=i(24),l=i(74),u=i(8),c=i(14),h=i(7),d=i(21),p=i(23),v=i(76),y=i(298),g=i(27),m=String,b=o("JSON","stringify"),w=c(/./.exec),P=c("".charAt),A=c("".charCodeAt),S=c("".replace),E=c(1..toString),x=/[\uD800-\uDFFF]/g,D=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,C=!g||h((function(){var t=o("Symbol")("stringify detection");return"[null]"!==b([t])||"{}"!==b({a:t})||"{}"!==b(Object(t))})),T=h((function(){return'"\\udf06\\ud834"'!==b("\udf06\ud834")||'"\\udead"'!==b("\udead")})),stringifyWithSymbolsFix=function(t,r){var i=v(arguments),a=y(r);if(d(a)||void 0!==t&&!p(t)){i[1]=function(t,r){d(a)&&(r=u(a,this,m(t),r));if(!p(r))return r};return l(b,null,i)}},fixIllFormed=function(t,r,i){var a=P(i,r-1),o=P(i,r+1);return w(D,t)&&!w(k,o)||w(k,t)&&!w(D,a)?"\\u"+E(A(t,0),16):t};b&&a({target:"JSON",stat:!0,arity:3,forced:C||T},{stringify:function stringify(t,r,i){var a=v(arguments),o=l(C?stringifyWithSymbolsFix:b,null,a);return T&&"string"==typeof o?S(o,x,fixIllFormed):o}})},(t,r,i)=>{var a=i(14),o=i(169),l=i(21),u=i(15),c=i(107),h=a([].push);t.exports=function(t){if(l(t))return t;if(o(t)){for(var r=t.length,i=[],a=0;a<r;a++){var d=t[a];"string"==typeof d?h(i,d):"number"!=typeof d&&"Number"!==u(d)&&"String"!==u(d)||h(i,c(d))}var p=i.length,v=!0;return function(t,r){if(v){v=!1;return r}if(o(this))return r;for(var a=0;a<p;a++)if(i[a]===t)return r}}}},(t,r,i)=>{var a=i(3),o=i(27),l=i(7),u=i(67),c=i(40);a({target:"Object",stat:!0,forced:!o||l((function(){u.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=u.f;return r?r(c(t)):[]}})},(t,r,i)=>{var a=i(3),o=i(6),l=i(4),u=i(14),c=i(39),h=i(21),d=i(25),p=i(107),v=i(121),y=i(56),g=l.Symbol,m=g&&g.prototype;if(o&&h(g)&&(!("description"in m)||void 0!==g().description)){var b={},w=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:p(arguments[0]),r=d(m,this)?new g(t):void 0===t?g():g(t);""===t&&(b[r]=!0);return r};y(w,g);w.prototype=m;m.constructor=w;var P="Symbol(description detection)"===String(g("description detection")),A=u(m.valueOf),S=u(m.toString),E=/^Symbol\((.*)\)[^)]+$/,x=u("".replace),D=u("".slice);v(m,"description",{configurable:!0,get:function description(){var t=A(this);if(c(b,t))return"";var r=S(t),i=P?D(r,7,-1):x(r,E,"$1");return""===i?void 0:i}});a({global:!0,constructor:!0,forced:!0},{Symbol:w})}},(t,r,i)=>{i(86)("iterator")},(t,r,i)=>{i(303)},(t,r,i)=>{var a,o=i(287),l=i(4),u=i(14),c=i(161),h=i(283),d=i(282),p=i(304),v=i(20),y=i(52).enforce,g=i(7),m=i(53),b=Object,w=Array.isArray,P=b.isExtensible,A=b.isFrozen,S=b.isSealed,E=b.freeze,x=b.seal,D={},k={},C=!l.ActiveXObject&&"ActiveXObject"in l,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},T=d("WeakMap",wrapper,p),I=T.prototype,O=u(I.set);if(m)if(C){a=p.getConstructor(wrapper,"WeakMap",!0);h.enable();var M=u(I.delete),L=u(I.has),R=u(I.get);c(I,{delete:function(t){if(v(t)&&!P(t)){var r=y(this);r.frozen||(r.frozen=new a);return M(this,t)||r.frozen.delete(t)}return M(this,t)},has:function has(t){if(v(t)&&!P(t)){var r=y(this);r.frozen||(r.frozen=new a);return L(this,t)||r.frozen.has(t)}return L(this,t)},get:function get(t){if(v(t)&&!P(t)){var r=y(this);r.frozen||(r.frozen=new a);return L(this,t)?R(this,t):r.frozen.get(t)}return R(this,t)},set:function set(t,r){if(v(t)&&!P(t)){var i=y(this);i.frozen||(i.frozen=new a);L(this,t)?O(this,t,r):i.frozen.set(t,r)}else O(this,t,r);return this}})}else o&&g((function(){var t=E([]);O(new T,t,1);return!A(t)}))&&c(I,{set:function set(t,r){var i;w(t)&&(A(t)?i=D:S(t)&&(i=k));O(this,t,r);i===D&&E(t);i===k&&x(t);return this}})},(t,r,i)=>{var a=i(14),o=i(161),l=i(283).getWeakData,u=i(155),c=i(47),h=i(17),d=i(20),p=i(273),v=i(188),y=i(39),g=i(52),m=g.set,b=g.getterFor,w=v.find,P=v.findIndex,A=a([].splice),S=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,r){return w(t.entries,(function(t){return t[0]===r}))};UncaughtFrozenStore.prototype={get:function(t){var r=findUncaughtFrozen(this,t);if(r)return r[1]},has:function(t){return!!findUncaughtFrozen(this,t)},set:function(t,r){var i=findUncaughtFrozen(this,t);i?i[1]=r:this.entries.push([t,r])},delete:function(t){var r=P(this.entries,(function(r){return r[0]===t}));~r&&A(this.entries,r,1);return!!~r}};t.exports={getConstructor:function(t,r,i,a){var v=t((function(t,o){u(t,g);m(t,{type:r,id:S++,frozen:void 0});h(o)||p(o,t[a],{that:t,AS_ENTRIES:i})})),g=v.prototype,w=b(r),define=function(t,r,i){var a=w(t),o=l(c(r),!0);!0===o?uncaughtFrozenStore(a).set(r,i):o[a.id]=i;return t};o(g,{delete:function(t){var r=w(this);if(!d(t))return!1;var i=l(t);return!0===i?uncaughtFrozenStore(r).delete(t):i&&y(i,r.id)&&delete i[r.id]},has:function has(t){var r=w(this);if(!d(t))return!1;var i=l(t);return!0===i?uncaughtFrozenStore(r).has(t):i&&y(i,r.id)}});o(g,i?{get:function get(t){var r=w(this);if(d(t)){var i=l(t);return!0===i?uncaughtFrozenStore(r).get(t):i?i[r.id]:void 0}},set:function set(t,r){return define(this,t,r)}}:{add:function add(t){return define(this,t,!0)}});return v}}},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{__w_pdfjs_require__(292);__w_pdfjs_require__(300);__w_pdfjs_require__(301);__w_pdfjs_require__(258);__w_pdfjs_require__(255);__w_pdfjs_require__(92);__w_pdfjs_require__(104);__w_pdfjs_require__(85);__w_pdfjs_require__(90);__w_pdfjs_require__(306);__w_pdfjs_require__(307);__w_pdfjs_require__(308);__w_pdfjs_require__(309);__w_pdfjs_require__(2);__w_pdfjs_require__(310);Object.defineProperty(exports,"__esModule",{value:!0});exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0;Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function get(){return _displaySvg.SVGGraphics}});exports.build=void 0;exports.getDocument=getDocument;exports.version=void 0;__w_pdfjs_require__(140);__w_pdfjs_require__(146);__w_pdfjs_require__(148);__w_pdfjs_require__(149);__w_pdfjs_require__(152);__w_pdfjs_require__(163);__w_pdfjs_require__(164);__w_pdfjs_require__(165);__w_pdfjs_require__(166);__w_pdfjs_require__(123);__w_pdfjs_require__(112);__w_pdfjs_require__(122);__w_pdfjs_require__(259);__w_pdfjs_require__(171);__w_pdfjs_require__(192);__w_pdfjs_require__(193);__w_pdfjs_require__(196);__w_pdfjs_require__(197);__w_pdfjs_require__(198);__w_pdfjs_require__(203);__w_pdfjs_require__(204);__w_pdfjs_require__(205);__w_pdfjs_require__(207);__w_pdfjs_require__(208);__w_pdfjs_require__(209);__w_pdfjs_require__(210);__w_pdfjs_require__(211);__w_pdfjs_require__(212);__w_pdfjs_require__(213);__w_pdfjs_require__(216);__w_pdfjs_require__(217);__w_pdfjs_require__(219);__w_pdfjs_require__(220);__w_pdfjs_require__(221);__w_pdfjs_require__(222);__w_pdfjs_require__(223);__w_pdfjs_require__(224);__w_pdfjs_require__(228);__w_pdfjs_require__(229);__w_pdfjs_require__(231);__w_pdfjs_require__(232);__w_pdfjs_require__(233);__w_pdfjs_require__(235);__w_pdfjs_require__(238);__w_pdfjs_require__(244);__w_pdfjs_require__(167);__w_pdfjs_require__(280);__w_pdfjs_require__(312);__w_pdfjs_require__(314);__w_pdfjs_require__(325);__w_pdfjs_require__(327);__w_pdfjs_require__(329);__w_pdfjs_require__(331);__w_pdfjs_require__(333);__w_pdfjs_require__(335);__w_pdfjs_require__(337);__w_pdfjs_require__(249);__w_pdfjs_require__(245);__w_pdfjs_require__(338);__w_pdfjs_require__(342);__w_pdfjs_require__(343);__w_pdfjs_require__(344);__w_pdfjs_require__(105);__w_pdfjs_require__(289);__w_pdfjs_require__(302);__w_pdfjs_require__(257);__w_pdfjs_require__(346);__w_pdfjs_require__(347);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(349),_display_utils=__w_pdfjs_require__(362),_font_loader=__w_pdfjs_require__(373),_displayNode_utils=__w_pdfjs_require__(374),_canvas=__w_pdfjs_require__(375),_worker_options=__w_pdfjs_require__(384),_message_handler=__w_pdfjs_require__(385),_metadata=__w_pdfjs_require__(387),_optional_content_config=__w_pdfjs_require__(388),_transport_stream=__w_pdfjs_require__(389),_displayFetch_stream=__w_pdfjs_require__(391),_displayNetwork=__w_pdfjs_require__(394),_displayNode_stream=__w_pdfjs_require__(395),_displaySvg=__w_pdfjs_require__(396),_xfa_text=__w_pdfjs_require__(399);function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){_classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=_toPrimitive(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function _classStaticPrivateFieldSpecSet(t,r,i,a){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"set");_classApplyDescriptorSet(t,i,a);return a}function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}function _classStaticPrivateFieldSpecGet(t,r,i){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"get");return _classApplyDescriptorGet(t,i)}function _classCheckPrivateStaticFieldDescriptor(t,r){if(void 0===t)throw new TypeError("attempted to "+r+" private static field before its declaration")}function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,ServiceWorkerOptions={showUnverifiedSignatures:!1};window.ServiceWorkerOptions=ServiceWorkerOptions;var DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;var DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;var DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;var DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(t){var r,i;"string"==typeof t||t instanceof URL?t={url:t}:(0,_util.isArrayBuffer)(t)&&(t={data:t});if("object"!==_typeof(t))throw new Error("Invalid parameter in getDocument, need parameter object.");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");var a=new PDFDocumentLoadingTask,o=a.docId,l=t.url?getUrlProp(t.url,t.baseHref):null,u=t.data?getDataProp(t.data):null,c=t.httpHeaders||null,h=!0===t.withCredentials,d=null!==(r=t.password)&&void 0!==r?r:null,p=t.range instanceof PDFDataRangeTransport?t.range:null,v=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE,y=t.worker instanceof PDFWorker?t.worker:null,g=t.verbosity,m="string"!=typeof t.docBaseUrl||(0,_display_utils.isDataScheme)(t.docBaseUrl)?null:t.docBaseUrl,b="function"==typeof t.cMapUrl?t.cMapUrl():"string"==typeof t.cMapUrl?t.cMapUrl:null,w=!1!==t.cMapPacked,P=t.CMapReaderFactory||DefaultCMapReaderFactory,A="function"==typeof t.standardFontDataUrl?t.standardFontDataUrl():"string"==typeof t.standardFontDataUrl?t.standardFontDataUrl:null,S=t.StandardFontDataFactory||DefaultStandardFontDataFactory,E=!0!==t.stopAtErrors,x=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,D=!1!==t.isEvalSupported,k="boolean"==typeof t.isOffscreenCanvasSupported?t.isOffscreenCanvasSupported:!_util.isNodeJS,C=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,T="boolean"==typeof t.disableFontFace?t.disableFontFace:_util.isNodeJS,I=!0===t.fontExtraProperties,O=!0===t.enableXfa,M=t.ownerDocument||globalThis.document,L=!0===t.disableRange,R=!0===t.disableStream,G=!0===t.disableAutoFetch,B=!0===t.pdfBug,j=p?p.length:null!==(i=t.length)&&void 0!==i?i:NaN,N="boolean"==typeof t.useSystemFonts?t.useSystemFonts:!_util.isNodeJS&&!T,W="boolean"==typeof t.useWorkerFetch?t.useWorkerFetch:P===_display_utils.DOMCMapReaderFactory&&S===_display_utils.DOMStandardFontDataFactory&&b&&A&&(0,_display_utils.isValidFetchUrl)(b,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(A,document.baseURI),V=t.canvasFactory||new DefaultCanvasFactory({ownerDocument:M}),U=t.filterFactory||new DefaultFilterFactory({docId:o,ownerDocument:M});(0,_util.setVerbosityLevel)(g);var H={canvasFactory:V,filterFactory:U};if(!W){H.cMapReaderFactory=new P({baseUrl:b,isCompressed:w});H.standardFontDataFactory=new S({baseUrl:A})}if(!y){var z={verbosity:g,port:_worker_options.GlobalWorkerOptions.workerPort};y=z.port?PDFWorker.fromPort(z):new PDFWorker(z);a._worker=y}var q={docId:o,apiVersion:"3.11.440",data:u,password:d,disableAutoFetch:G,rangeChunkSize:v,length:j,docBaseUrl:m,enableXfa:O,evaluatorOptions:{maxImageSize:x,disableFontFace:T,ignoreErrors:E,isEvalSupported:D,isOffscreenCanvasSupported:k,canvasMaxAreaInBytes:C,fontExtraProperties:I,useSystemFonts:N,cMapUrl:W?b:null,standardFontDataUrl:W?A:null}},Y={ignoreErrors:E,isEvalSupported:D,disableFontFace:T,fontExtraProperties:I,enableXfa:O,ownerDocument:M,disableAutoFetch:G,pdfBug:B,styleElement:null};y.promise.then((function(){if(a.destroyed)throw new Error("Loading aborted");var t=_fetchDocument(y,q),r=new Promise((function(t){var r;if(p)r=new _transport_stream.PDFDataTransportStream({length:j,initialData:p.initialData,progressiveDone:p.progressiveDone,contentDispositionFilename:p.contentDispositionFilename,disableRange:L,disableStream:R},p);else if(!u){r=function createPDFNetworkStream(t){return _util.isNodeJS?new _displayNode_stream.PDFNodeStream(t):(0,_display_utils.isValidFetchUrl)(t.url)?new _displayFetch_stream.PDFFetchStream(t):new _displayNetwork.PDFNetworkStream(t)}({url:l,length:j,httpHeaders:c,withCredentials:h,rangeChunkSize:v,disableRange:L,disableStream:R})}t(r)}));return Promise.all([t,r]).then((function(t){var r=_slicedToArray(t,2),i=r[0],l=r[1];if(a.destroyed)throw new Error("Loading aborted");var u=new _message_handler.MessageHandler(o,i,y.port),c=new WorkerTransport(u,a,l,Y,H);a._transport=c;u.send("showUnverifiedSignatures",window.ServiceWorkerOptions.showUnverifiedSignatures);u.send("Ready",null)}))})).catch(a._capability.reject);return a}function _fetchDocument(t,r){return _fetchDocument2.apply(this,arguments)}function _fetchDocument2(){return(_fetchDocument2=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(t,r){var i;return _regeneratorRuntime().wrap((function _callee6$(a){for(;;)switch(a.prev=a.next){case 0:if(!t.destroyed){a.next=2;break}throw new Error("Worker was destroyed");case 2:a.next=4;return t.messageHandler.sendWithPromise("GetDocRequest",r,r.data?[r.data.buffer]:null);case 4:i=a.sent;if(!t.destroyed){a.next=7;break}throw new Error("Worker was destroyed");case 7:return a.abrupt("return",i);case 8:case"end":return a.stop()}}),_callee6)})))).apply(this,arguments)}function getUrlProp(t,r){if(t instanceof URL)return t.href;try{return r?new URL(t,window.location.origin+r).href:new URL(t,window.location).href}catch(r){if(_util.isNodeJS&&"string"==typeof t)return t}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(t){if(_util.isNodeJS&&"undefined"!=typeof Buffer&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if("string"==typeof t)return(0,_util.stringToBytes)(t);if("object"===_typeof(t)&&!isNaN(null==t?void 0:t.length)||(0,_util.isArrayBuffer)(t))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}var PDFDocumentLoadingTask=function(){function PDFDocumentLoadingTask(){var t,r;_classCallCheck(this,PDFDocumentLoadingTask);this._capability=new _util.PromiseCapability;this._transport=null;this._worker=null;this.docId="d".concat((_classStaticPrivateFieldSpecSet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId,(t=_classStaticPrivateFieldSpecGet(PDFDocumentLoadingTask,PDFDocumentLoadingTask,_docId),r=t++,t)),r));this.destroyed=!1;this.onPassword=null;this.onProgress=null}_createClass(PDFDocumentLoadingTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"destroy",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:this.destroyed=!0;a.prev=1;null!==(t=this._worker)&&void 0!==t&&t.port&&(this._worker._pendingDestroy=!0);a.next=5;return null===(r=this._transport)||void 0===r?void 0:r.destroy();case 5:a.next=11;break;case 7:a.prev=7;a.t0=a.catch(1);null!==(i=this._worker)&&void 0!==i&&i.port&&delete this._worker._pendingDestroy;throw a.t0;case 11:this._transport=null;if(this._worker){this._worker.destroy();this._worker=null}case 13:case"end":return a.stop()}}),_callee,this,[[1,7]])}))),function destroy(){return t.apply(this,arguments)})}]);var t;return PDFDocumentLoadingTask}();exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;var _docId={writable:!0,value:0},PDFDataRangeTransport=function(){function PDFDataRangeTransport(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,PDFDataRangeTransport);this.length=t;this.initialData=r;this.progressiveDone=i;this.contentDispositionFilename=a;this._rangeListeners=[];this._progressListeners=[];this._progressiveReadListeners=[];this._progressiveDoneListeners=[];this._readyCapability=new _util.PromiseCapability}_createClass(PDFDataRangeTransport,[{key:"addRangeListener",value:function addRangeListener(t){this._rangeListeners.push(t)}},{key:"addProgressListener",value:function addProgressListener(t){this._progressListeners.push(t)}},{key:"addProgressiveReadListener",value:function addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}},{key:"addProgressiveDoneListener",value:function addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}},{key:"onDataRange",value:function onDataRange(t,r){var i,a=_createForOfIteratorHelper(this._rangeListeners);try{for(a.s();!(i=a.n()).done;){(0,i.value)(t,r)}}catch(t){a.e(t)}finally{a.f()}}},{key:"onDataProgress",value:function onDataProgress(t,r){var i=this;this._readyCapability.promise.then((function(){var a,o=_createForOfIteratorHelper(i._progressListeners);try{for(o.s();!(a=o.n()).done;){(0,a.value)(t,r)}}catch(t){o.e(t)}finally{o.f()}}))}},{key:"onDataProgressiveRead",value:function onDataProgressiveRead(t){var r=this;this._readyCapability.promise.then((function(){var i,a=_createForOfIteratorHelper(r._progressiveReadListeners);try{for(a.s();!(i=a.n()).done;){(0,i.value)(t)}}catch(t){a.e(t)}finally{a.f()}}))}},{key:"onDataProgressiveDone",value:function onDataProgressiveDone(){var t=this;this._readyCapability.promise.then((function(){var r,i=_createForOfIteratorHelper(t._progressiveDoneListeners);try{for(i.s();!(r=i.n()).done;){(0,r.value)()}}catch(t){i.e(t)}finally{i.f()}}))}},{key:"transportReady",value:function transportReady(){this._readyCapability.resolve()}},{key:"requestDataRange",value:function requestDataRange(t,r){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}},{key:"abort",value:function abort(){}}]);return PDFDataRangeTransport}();exports.PDFDataRangeTransport=PDFDataRangeTransport;var PDFDocumentProxy=function(){function PDFDocumentProxy(t,r){var i=this;_classCallCheck(this,PDFDocumentProxy);this._pdfInfo=t;this._transport=r;Object.defineProperty(this,"getJavaScript",{value:function value(){(0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead.");return i.getJSActions().then((function(t){if(!t)return t;var r=[];for(var i in t)r.push.apply(r,_toConsumableArray(t[i]));return r}))}})}_createClass(PDFDocumentProxy,[{key:"annotationStorage",get:function get(){return this._transport.annotationStorage}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"numPages",get:function get(){return this._pdfInfo.numPages}},{key:"fingerprints",get:function get(){return this._pdfInfo.fingerprints}},{key:"isPureXfa",get:function get(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"allXfaHtml",get:function get(){return this._transport._htmlForXfa}},{key:"getPage",value:function getPage(t){return this._transport.getPage(t)}},{key:"getPageIndex",value:function getPageIndex(t){return this._transport.getPageIndex(t)}},{key:"getDestinations",value:function getDestinations(){return this._transport.getDestinations()}},{key:"getDestination",value:function getDestination(t){return this._transport.getDestination(t)}},{key:"getPageLabels",value:function getPageLabels(){return this._transport.getPageLabels()}},{key:"getPageLayout",value:function getPageLayout(){return this._transport.getPageLayout()}},{key:"getPageMode",value:function getPageMode(){return this._transport.getPageMode()}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this._transport.getViewerPreferences()}},{key:"getOpenAction",value:function getOpenAction(){return this._transport.getOpenAction()}},{key:"getAttachments",value:function getAttachments(){return this._transport.getAttachments()}},{key:"getJSActions",value:function getJSActions(){return this._transport.getDocJSActions()}},{key:"getOutline",value:function getOutline(){return this._transport.getOutline()}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}},{key:"getPermissions",value:function getPermissions(){return this._transport.getPermissions()}},{key:"getMetadata",value:function getMetadata(){return this._transport.getMetadata()}},{key:"getMarkInfo",value:function getMarkInfo(){return this._transport.getMarkInfo()}},{key:"getData",value:function getData(){return this._transport.getData()}},{key:"saveDocument",value:function saveDocument(){return this._transport.saveDocument()}},{key:"getDownloadInfo",value:function getDownloadInfo(){return this._transport.downloadInfoCapability.promise}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._transport.startCleanup(t||this.isPureXfa)}},{key:"destroy",value:function destroy(){return this.loadingTask.destroy()}},{key:"loadingParams",get:function get(){return this._transport.loadingParams}},{key:"loadingTask",get:function get(){return this._transport.loadingTask}},{key:"getFieldObjects",value:function getFieldObjects(){return this._transport.getFieldObjects()}},{key:"hasJSActions",value:function hasJSActions(){return this._transport.hasJSActions()}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}]);return PDFDocumentProxy}();exports.PDFDocumentProxy=PDFDocumentProxy;var _delayedCleanupTimeout=new WeakMap,_pendingCleanup=new WeakMap,_tryCleanup=new WeakSet,_abortDelayedCleanup=new WeakSet,PDFPageProxy=function(){function PDFPageProxy(t,r,i){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];_classCallCheck(this,PDFPageProxy);_classPrivateMethodInitSpec(this,_abortDelayedCleanup);_classPrivateMethodInitSpec(this,_tryCleanup);_classPrivateFieldInitSpec(this,_delayedCleanupTimeout,{writable:!0,value:null});_classPrivateFieldInitSpec(this,_pendingCleanup,{writable:!0,value:!1});this._pageIndex=t;this._pageInfo=r;this._transport=i;this._stats=a?new _display_utils.StatTimer:null;this._pdfBug=a;this.commonObjs=i.commonObjs;this.objs=new PDFObjects;this._maybeCleanupAfterRender=!1;this._intentStates=new Map;this.destroyed=!1}_createClass(PDFPageProxy,[{key:"pageNumber",get:function get(){return this._pageIndex+1}},{key:"rotate",get:function get(){return this._pageInfo.rotate}},{key:"ref",get:function get(){return this._pageInfo.ref}},{key:"userUnit",get:function get(){return this._pageInfo.userUnit}},{key:"view",get:function get(){return this._pageInfo.view}},{key:"getViewport",value:function getViewport(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,i=t.rotation,a=void 0===i?this.rotate:i,o=t.offsetX,l=void 0===o?0:o,u=t.offsetY,c=void 0===u?0:u,h=t.dontFlip,d=void 0!==h&&h;return new _display_utils.PageViewport({viewBox:this.view,scale:r,rotation:a,offsetX:l,offsetY:c,dontFlip:d})}},{key:"getAnnotations",value:function getAnnotations(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).intent,r=void 0===t?"display":t,i=this._transport.getRenderingIntent(r);return this._transport.getAnnotations(this._pageIndex,i.renderingIntent)}},{key:"getJSActions",value:function getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}},{key:"filterFactory",get:function get(){return this._transport.filterFactory}},{key:"isPureXfa",get:function get(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}},{key:"getXfa",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t;return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(null===(t=this._transport._htmlForXfa)||void 0===t?void 0:t.children[this._pageIndex])||null);case 1:case"end":return r.stop()}}),_callee2,this)}))),function getXfa(){return t.apply(this,arguments)})},{key:"render",value:function render(t){var r,i,a=this,o=t.canvasContext,l=t.viewport,u=t.intent,c=void 0===u?"display":u,h=t.annotationMode,d=void 0===h?_util.AnnotationMode.ENABLE:h,p=t.transform,v=void 0===p?null:p,y=t.background,g=void 0===y?null:y,m=t.optionalContentConfigPromise,b=void 0===m?null:m,w=t.annotationCanvasMap,P=void 0===w?null:w,A=t.pageColors,S=void 0===A?null:A,E=t.printAnnotationStorage,x=void 0===E?null:E;null===(r=this._stats)||void 0===r||r.time("Overall");var D=this._transport.getRenderingIntent(c,d,x);_classPrivateFieldSet(this,_pendingCleanup,!1);_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this);b||(b=this._transport.getOptionalContentConfig());var k=this._intentStates.get(D.cacheKey);if(!k){k=Object.create(null);this._intentStates.set(D.cacheKey,k)}if(k.streamReaderCancelTimeout){clearTimeout(k.streamReaderCancelTimeout);k.streamReaderCancelTimeout=null}var C=!!(D.renderingIntent&_util.RenderingIntentFlag.PRINT);if(!k.displayReadyCapability){var T;k.displayReadyCapability=new _util.PromiseCapability;k.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};null===(T=this._stats)||void 0===T||T.time("Page Request");this._pumpOperatorList(D)}var I=function complete(t){var r,i;k.renderTasks.delete(O);(a._maybeCleanupAfterRender||C)&&_classPrivateFieldSet(a,_pendingCleanup,!0);_classPrivateMethodGet(a,_tryCleanup,_tryCleanup2).call(a,!C);if(t){O.capability.reject(t);a._abortOperatorList({intentState:k,reason:t instanceof Error?t:new Error(t)})}else O.capability.resolve();null===(r=a._stats)||void 0===r||r.timeEnd("Rendering");null===(i=a._stats)||void 0===i||i.timeEnd("Overall")},O=new InternalRenderTask({callback:I,params:{canvasContext:o,viewport:l,transform:v,background:g},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:P,operatorList:k.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!C,pdfBug:this._pdfBug,pageColors:S});((i=k).renderTasks||(i.renderTasks=new Set)).add(O);var M=O.task;Promise.all([k.displayReadyCapability.promise,b]).then((function(t){var r,i=_slicedToArray(t,2),o=i[0],l=i[1];if(a.destroyed)I();else{null===(r=a._stats)||void 0===r||r.time("Rendering");O.initializeGraphics({transparency:o,optionalContentConfig:l});O.operatorListChanged()}})).catch(I);return M}},{key:"getOperatorList",value:function getOperatorList(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.intent,i=void 0===r?"display":r,a=t.annotationMode,o=void 0===a?_util.AnnotationMode.ENABLE:a,l=t.printAnnotationStorage,u=void 0===l?null:l;var c,h=this._transport.getRenderingIntent(i,o,u,!0),d=this._intentStates.get(h.cacheKey);if(!d){d=Object.create(null);this._intentStates.set(h.cacheKey,d)}if(!d.opListReadCapability){var p,v;(c=Object.create(null)).operatorListChanged=function operatorListChanged(){if(d.operatorList.lastChunk){d.opListReadCapability.resolve(d.operatorList);d.renderTasks.delete(c)}};d.opListReadCapability=new _util.PromiseCapability;((p=d).renderTasks||(p.renderTasks=new Set)).add(c);d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null};null===(v=this._stats)||void 0===v||v.time("Page Request");this._pumpOperatorList(h)}return d.opListReadCapability.promise}},{key:"streamTextContent",value:function streamTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.includeMarkedContent,i=void 0!==r&&r,a=t.disableNormalization,o=void 0!==a&&a;return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===i,disableNormalization:!0===o},{highWaterMark:100,size:function size(t){return t.items.length}})}},{key:"getTextContent",value:function getTextContent(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then((function(t){return _xfa_text.XfaText.textContent(t)}));var r=this.streamTextContent(t);return new Promise((function(t,i){var a=r.getReader(),o={items:[],styles:Object.create(null)};!function pump(){a.read().then((function(r){var i,a=r.value;if(r.done)t(o);else{Object.assign(o.styles,a.styles);(i=o.items).push.apply(i,_toConsumableArray(a.items));pump()}}),i)}()}))}},{key:"getStructTree",value:function getStructTree(){return this._transport.getStructTree(this._pageIndex)}},{key:"_destroy",value:function _destroy(){this.destroyed=!0;var t,r=[],i=_createForOfIteratorHelper(this._intentStates.values());try{for(i.s();!(t=i.n()).done;){var a=t.value;this._abortOperatorList({intentState:a,reason:new Error("Page was destroyed."),force:!0});if(!a.opListReadCapability){var o,l=_createForOfIteratorHelper(a.renderTasks);try{for(l.s();!(o=l.n()).done;){var u=o.value;r.push(u.completed);u.cancel()}}catch(t){l.e(t)}finally{l.f()}}}}catch(t){i.e(t)}finally{i.f()}this.objs.clear();_classPrivateFieldSet(this,_pendingCleanup,!1);_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this);return Promise.all(r)}},{key:"cleanup",value:function cleanup(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateFieldSet(this,_pendingCleanup,!0);var r=_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!1);t&&r&&this._stats&&(this._stats=new _display_utils.StatTimer);return r}},{key:"_startRenderPage",value:function _startRenderPage(t,r){var i,a,o=this._intentStates.get(r);if(o){null===(i=this._stats)||void 0===i||i.timeEnd("Page Request");null===(a=o.displayReadyCapability)||void 0===a||a.resolve(t)}}},{key:"_renderPageChunk",value:function _renderPageChunk(t,r){for(var i=0,a=t.length;i<a;i++){r.operatorList.fnArray.push(t.fnArray[i]);r.operatorList.argsArray.push(t.argsArray[i])}r.operatorList.lastChunk=t.lastChunk;r.operatorList.separateAnnots=t.separateAnnots;var o,l=_createForOfIteratorHelper(r.renderTasks);try{for(l.s();!(o=l.n()).done;){o.value.operatorListChanged()}}catch(t){l.e(t)}finally{l.f()}t.lastChunk&&_classPrivateMethodGet(this,_tryCleanup,_tryCleanup2).call(this,!0)}},{key:"_pumpOperatorList",value:function _pumpOperatorList(t){var r=this,i=t.renderingIntent,a=t.cacheKey,o=t.annotationStorageSerializable,l=o.map,u=o.transfers,c=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:i,cacheKey:a,annotationStorage:l},u).getReader(),h=this._intentStates.get(a);h.streamReader=c;!function pump(){c.read().then((function(t){var i=t.value;if(t.done)h.streamReader=null;else if(!r._transport.destroyed){r._renderPageChunk(i,h);pump()}}),(function(t){h.streamReader=null;if(!r._transport.destroyed){if(h.operatorList){h.operatorList.lastChunk=!0;var i,a=_createForOfIteratorHelper(h.renderTasks);try{for(a.s();!(i=a.n()).done;){i.value.operatorListChanged()}}catch(t){a.e(t)}finally{a.f()}_classPrivateMethodGet(r,_tryCleanup,_tryCleanup2).call(r,!0)}if(h.displayReadyCapability)h.displayReadyCapability.reject(t);else{if(!h.opListReadCapability)throw t;h.opListReadCapability.reject(t)}}}))}()}},{key:"_abortOperatorList",value:function _abortOperatorList(t){var r=this,i=t.intentState,a=t.reason,o=t.force,l=void 0!==o&&o;if(i.streamReader){if(i.streamReaderCancelTimeout){clearTimeout(i.streamReaderCancelTimeout);i.streamReaderCancelTimeout=null}if(!l){if(i.renderTasks.size>0)return;if(a instanceof _display_utils.RenderingCancelledException){var u=RENDERING_CANCELLED_TIMEOUT;a.extraDelay>0&&a.extraDelay<1e3&&(u+=a.extraDelay);i.streamReaderCancelTimeout=setTimeout((function(){i.streamReaderCancelTimeout=null;r._abortOperatorList({intentState:i,reason:a,force:!0})}),u);return}}i.streamReader.cancel(new _util.AbortException(a.message)).catch((function(){}));i.streamReader=null;if(!this._transport.destroyed){var c,h=_createForOfIteratorHelper(this._intentStates);try{for(h.s();!(c=h.n()).done;){var d=_slicedToArray(c.value,2),p=d[0];if(d[1]===i){this._intentStates.delete(p);break}}}catch(t){h.e(t)}finally{h.f()}this.cleanup()}}}},{key:"stats",get:function get(){return this._stats}}]);var t;return PDFPageProxy}();exports.PDFPageProxy=PDFPageProxy;function _tryCleanup2(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateMethodGet(this,_abortDelayedCleanup,_abortDelayedCleanup2).call(this);if(!_classPrivateFieldGet(this,_pendingCleanup)||this.destroyed)return!1;if(r){_classPrivateFieldSet(this,_delayedCleanupTimeout,setTimeout((function(){_classPrivateFieldSet(t,_delayedCleanupTimeout,null);_classPrivateMethodGet(t,_tryCleanup,_tryCleanup2).call(t,!1)}),DELAYED_CLEANUP_TIMEOUT));return!1}var i,a=_createForOfIteratorHelper(this._intentStates.values());try{for(a.s();!(i=a.n()).done;){var o=i.value,l=o.renderTasks,u=o.operatorList;if(l.size>0||!u.lastChunk)return!1}}catch(t){a.e(t)}finally{a.f()}this._intentStates.clear();this.objs.clear();_classPrivateFieldSet(this,_pendingCleanup,!1);return!0}function _abortDelayedCleanup2(){if(_classPrivateFieldGet(this,_delayedCleanupTimeout)){clearTimeout(_classPrivateFieldGet(this,_delayedCleanupTimeout));_classPrivateFieldSet(this,_delayedCleanupTimeout,null)}}var _listeners=new WeakMap,_deferred=new WeakMap,LoopbackPort=function(){function LoopbackPort(){_classCallCheck(this,LoopbackPort);_classPrivateFieldInitSpec(this,_listeners,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,_deferred,{writable:!0,value:Promise.resolve()})}_createClass(LoopbackPort,[{key:"postMessage",value:function postMessage(t,r){var i=this,a={data:structuredClone(t,null)};_classPrivateFieldGet(this,_deferred).then((function(){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(i,_listeners));try{for(r.s();!(t=r.n()).done;){t.value.call(i,a)}}catch(t){r.e(t)}finally{r.f()}}))}},{key:"addEventListener",value:function addEventListener(t,r){_classPrivateFieldGet(this,_listeners).add(r)}},{key:"removeEventListener",value:function removeEventListener(t,r){_classPrivateFieldGet(this,_listeners).delete(r)}},{key:"terminate",value:function terminate(){_classPrivateFieldGet(this,_listeners).clear()}}]);return LoopbackPort}();exports.LoopbackPort=LoopbackPort;var PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;if(_util.isNodeJS&&"function"==typeof require){PDFWorkerUtil.isWorkerDisabled=!0;PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js"}else if("object"===("undefined"==typeof document?"undefined":_typeof(document))){var _document,pdfjsFilePath=null===(_document=document)||void 0===_document||null===(_document=_document.currentScript)||void 0===_document?void 0:_document.src;pdfjsFilePath&&(PDFWorkerUtil.fallbackWorkerSrc=pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(t,r){var i;try{if(!(i=new URL(t)).origin||"null"===i.origin)return!1}catch(t){return!1}var a=new URL(r,i);return i.origin===a.origin};PDFWorkerUtil.createCDNWrapper=function(t){var r='importScripts("'.concat(t,'");');return URL.createObjectURL(new Blob([r]))};var _generateTrustedURL=new WeakSet,PDFWorker=function(){function PDFWorker(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.name,i=void 0===r?null:r,a=t.port,o=void 0===a?null:a,l=t.verbosity,u=void 0===l?(0,_util.getVerbosityLevel)():l;_classCallCheck(this,PDFWorker);_classPrivateMethodInitSpec(this,_generateTrustedURL);this.name=i;this.destroyed=!1;this.verbosity=u;this._readyCapability=new _util.PromiseCapability;this._port=null;this._webWorker=null;this._messageHandler=null;if(o){var c;if(null!==(c=_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts))&&void 0!==c&&c.has(o))throw new Error("Cannot use more than one PDFWorker per port.");(_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts)||_classStaticPrivateFieldSpecSet(PDFWorker,PDFWorker,_workerPorts,new WeakMap)).set(o,this);this._initializeFromPort(o)}else this._initialize()}_createClass(PDFWorker,[{key:"promise",get:function get(){return this._readyCapability.promise}},{key:"port",get:function get(){return this._port}},{key:"messageHandler",get:function get(){return this._messageHandler}},{key:"_initializeFromPort",value:function _initializeFromPort(t){this._port=t;this._messageHandler=new _message_handler.MessageHandler("main","worker",t);this._messageHandler.on("ready",(function(){}));this._readyCapability.resolve();this._messageHandler.send("configure",{verbosity:this.verbosity})}},{key:"_initialize",value:function _initialize(){var t=this;if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){var r=PDFWorker.workerSrc;try{PDFWorkerUtil.isSameOrigin(window.location.href,r)||(r=PDFWorkerUtil.createCDNWrapper(new URL(r,window.location).href));var i=new Worker(_classPrivateMethodGet(this,_generateTrustedURL,_generateTrustedURL2).call(this,r)),a=new _message_handler.MessageHandler("main","worker",i),o=function terminateEarly(){i.removeEventListener("error",l);a.destroy();i.terminate();t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},l=function onWorkerError(){t._webWorker||o()};i.addEventListener("error",l);a.on("test",(function(r){i.removeEventListener("error",l);if(t.destroyed)o();else if(r){t._messageHandler=a;t._port=i;t._webWorker=i;t._readyCapability.resolve();a.send("configure",{verbosity:t.verbosity})}else{t._setupFakeWorker();a.destroy();i.terminate()}}));a.on("ready",(function(r){i.removeEventListener("error",l);if(t.destroyed)o();else try{u()}catch(r){t._setupFakeWorker()}}));var u=function sendTest(){var t=new Uint8Array;a.send("test",t,[t.buffer])};u();return}catch(t){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}},{key:"_setupFakeWorker",value:function _setupFakeWorker(){var t=this;if(!PDFWorkerUtil.isWorkerDisabled){(0,_util.warn)("Setting up fake worker.");PDFWorkerUtil.isWorkerDisabled=!0}PDFWorker._setupFakeWorkerGlobal.then((function(r){if(t.destroyed)t._readyCapability.reject(new Error("Worker was destroyed"));else{var i=new LoopbackPort;t._port=i;var a="fake".concat(PDFWorkerUtil.fakeWorkerId++),o=new _message_handler.MessageHandler(a+"_worker",a,i);r.setup(o,i);var l=new _message_handler.MessageHandler(a,a+"_worker",i);t._messageHandler=l;t._readyCapability.resolve();l.send("configure",{verbosity:t.verbosity})}})).catch((function(r){t._readyCapability.reject(new Error('Setting up fake worker failed: "'.concat(r.message,'".')))}))}},{key:"destroy",value:function destroy(){var t;this.destroyed=!0;if(this._webWorker){this._webWorker.terminate();this._webWorker=null}null===(t=_classStaticPrivateFieldSpecGet(PDFWorker,PDFWorker,_workerPorts))||void 0===t||t.delete(this._port);this._port=null;if(this._messageHandler){this._messageHandler.destroy();this._messageHandler=null}}}],[{key:"fromPort",value:function fromPort(t){var r;if(null==t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var i=null===(r=_classStaticPrivateFieldSpecGet(this,PDFWorker,_workerPorts))||void 0===r?void 0:r.get(t.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new PDFWorker(t)}},{key:"workerSrc",get:function get(){if(_worker_options.GlobalWorkerOptions.workerSrc)return"Function"===_worker_options.GlobalWorkerOptions.workerSrc.constructor.name?_worker_options.GlobalWorkerOptions.workerSrc():_worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc){_util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.');return PDFWorkerUtil.fallbackWorkerSrc}throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}},{key:"_mainThreadWorkerMessageHandler",get:function get(){try{var t;return(null===(t=globalThis.pdfjsWorker)||void 0===t?void 0:t.WorkerMessageHandler)||null}catch(t){return null}}},{key:"_setupFakeWorkerGlobal",get:function get(){var _this11=this,loader=function(){var _ref15=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var mainWorkerMessageHandler,worker;return _regeneratorRuntime().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:mainWorkerMessageHandler=_this11._mainThreadWorkerMessageHandler;if(!mainWorkerMessageHandler){_context3.next=3;break}return _context3.abrupt("return",mainWorkerMessageHandler);case 3:if(!_util.isNodeJS||"function"!=typeof require){_context3.next=6;break}worker=eval("require")(_this11.workerSrc);return _context3.abrupt("return",worker.WorkerMessageHandler);case 6:_context3.next=8;return(0,_display_utils.loadScript)(_this11.workerSrc);case 8:return _context3.abrupt("return",window.pdfjsWorker.WorkerMessageHandler);case 9:case"end":return _context3.stop()}}),_callee3)})));return function loader(){return _ref15.apply(this,arguments)}}();return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}]);return PDFWorker}();exports.PDFWorker=PDFWorker;function _generateTrustedURL2(t){if(window.trustedTypes){return window.trustedTypes.createPolicy("foo",{createScriptURL:function createScriptURL(t){return t}}).createScriptURL(t)}return t}var _workerPorts={writable:!0,value:void 0},_methodPromises=new WeakMap,_pageCache=new WeakMap,_pagePromises=new WeakMap,_passwordCapability=new WeakMap,_cacheSimpleMethod=new WeakSet,WorkerTransport=function(){function WorkerTransport(t,r,i,a,o){_classCallCheck(this,WorkerTransport);_classPrivateMethodInitSpec(this,_cacheSimpleMethod);_classPrivateFieldInitSpec(this,_methodPromises,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_pageCache,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_pagePromises,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,_passwordCapability,{writable:!0,value:null});this.messageHandler=t;this.loadingTask=r;this.commonObjs=new PDFObjects;this.fontLoader=new _font_loader.FontLoader({ownerDocument:a.ownerDocument,styleElement:a.styleElement});this._params=a;this.canvasFactory=o.canvasFactory;this.filterFactory=o.filterFactory;this.cMapReaderFactory=o.cMapReaderFactory;this.standardFontDataFactory=o.standardFontDataFactory;this.destroyed=!1;this.destroyCapability=null;this._networkStream=i;this._fullReader=null;this._lastProgress=null;this.downloadInfoCapability=new _util.PromiseCapability;this.setupMessageHandler()}_createClass(WorkerTransport,[{key:"annotationStorage",get:function get(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}},{key:"getRenderingIntent",value:function getRenderingIntent(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=_util.RenderingIntentFlag.DISPLAY,l=_annotation_storage.SerializableEmpty;switch(t){case"any":o=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":o=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: ".concat(t))}switch(r){case _util.AnnotationMode.DISABLE:o+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:o+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:l=((o+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE)&_util.RenderingIntentFlag.PRINT&&i instanceof _annotation_storage.PrintAnnotationStorage?i:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: ".concat(r))}a&&(o+=_util.RenderingIntentFlag.OPLIST);return{renderingIntent:o,cacheKey:"".concat(o,"_").concat(l.hash),annotationStorageSerializable:l}}},{key:"destroy",value:function destroy(){var t,r=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0;this.destroyCapability=new _util.PromiseCapability;null===(t=_classPrivateFieldGet(this,_passwordCapability))||void 0===t||t.reject(new Error("Worker was destroyed during onPassword callback"));var i,a=[],o=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());try{for(o.s();!(i=o.n()).done;){var l=i.value;a.push(l._destroy())}}catch(t){o.e(t)}finally{o.f()}_classPrivateFieldGet(this,_pageCache).clear();_classPrivateFieldGet(this,_pagePromises).clear();this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();var u=this.messageHandler.sendWithPromise("Terminate",null);a.push(u);Promise.all(a).then((function(){var t;r.commonObjs.clear();r.fontLoader.clear();_classPrivateFieldGet(r,_methodPromises).clear();r.filterFactory.destroy();null===(t=r._networkStream)||void 0===t||t.cancelAllRequests(new _util.AbortException("Worker was terminated."));if(r.messageHandler){r.messageHandler.destroy();r.messageHandler=null}r.destroyCapability.resolve()}),this.destroyCapability.reject);return this.destroyCapability.promise}},{key:"setupMessageHandler",value:function setupMessageHandler(){var t=this,r=this.messageHandler,i=this.loadingTask;r.on("GetReader",(function(r,i){(0,_util.assert)(t._networkStream,"GetReader - no `IPDFStream` instance available.");t._fullReader=t._networkStream.getFullReader();t._fullReader.onProgress=function(r){t._lastProgress={loaded:r.loaded,total:r.total}};i.onPull=function(){t._fullReader.read().then((function(t){var r=t.value;if(t.done)i.close();else{(0,_util.assert)(r instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer.");i.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){i.error(t)}))};i.onCancel=function(r){t._fullReader.cancel(r);i.ready.catch((function(r){if(!t.destroyed)throw r}))}}));r.on("ReaderHeadersReady",(function(r){var a=new _util.PromiseCapability,o=t._fullReader;o.headersReady.then((function(){if(!o.isStreamingSupported||!o.isRangeSupported){if(t._lastProgress){var r;null===(r=i.onProgress)||void 0===r||r.call(i,t._lastProgress)}o.onProgress=function(t){var r;null===(r=i.onProgress)||void 0===r||r.call(i,{loaded:t.loaded,total:t.total})}}a.resolve({isStreamingSupported:o.isStreamingSupported,isRangeSupported:o.isRangeSupported,contentLength:o.contentLength})}),a.reject);return a.promise}));r.on("GetRangeReader",(function(r,i){(0,_util.assert)(t._networkStream,"GetRangeReader - no `IPDFStream` instance available.");var a=t._networkStream.getRangeReader(r.begin,r.end);if(a){i.onPull=function(){a.read().then((function(t){var r=t.value;if(t.done)i.close();else{(0,_util.assert)(r instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer.");i.enqueue(new Uint8Array(r),1,[r])}})).catch((function(t){i.error(t)}))};i.onCancel=function(r){a.cancel(r);i.ready.catch((function(r){if(!t.destroyed)throw r}))}}else i.close()}));r.on("GetDoc",(function(r){var a=r.pdfInfo;t._numPages=a.numPages;t._htmlForXfa=a.htmlForXfa;delete a.htmlForXfa;i._capability.resolve(new PDFDocumentProxy(a,t))}));r.on("DocException",(function(t){var r;switch(t.name){case"PasswordException":r=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":r=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":r=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":r=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":r=new _util.UnknownErrorException(t.message,t.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}i._capability.reject(r)}));r.on("PasswordRequest",(function(r){_classPrivateFieldSet(t,_passwordCapability,new _util.PromiseCapability);if(i.onPassword){try{i.onPassword((function updatePassword(r){r instanceof Error?_classPrivateFieldGet(t,_passwordCapability).reject(r):_classPrivateFieldGet(t,_passwordCapability).resolve({password:r})}),r.code)}catch(r){_classPrivateFieldGet(t,_passwordCapability).reject(r)}}else _classPrivateFieldGet(t,_passwordCapability).reject(new _util.PasswordException(r.message,r.code));return _classPrivateFieldGet(t,_passwordCapability).promise}));r.on("DataLoaded",(function(r){var a;null===(a=i.onProgress)||void 0===a||a.call(i,{loaded:r.length,total:r.length});t.downloadInfoCapability.resolve(r)}));r.on("StartRenderPage",(function(r){if(!t.destroyed){_classPrivateFieldGet(t,_pageCache).get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}}));r.on("commonobj",(function(i){var a,o=_slicedToArray(i,3),l=o[0],u=o[1],c=o[2];if(!t.destroyed&&!t.commonObjs.has(l))switch(u){case"Font":var h=t._params;if("error"in c){var d=c.error;(0,_util.warn)("Error during font loading: ".concat(d));t.commonObjs.resolve(l,d);break}var p=h.pdfBug&&null!==(a=globalThis.FontInspector)&&void 0!==a&&a.enabled?function(t,r){return globalThis.FontInspector.fontAdded(t,r)}:null,v=new _font_loader.FontFaceObject(c,{isEvalSupported:h.isEvalSupported,disableFontFace:h.disableFontFace,ignoreErrors:h.ignoreErrors,inspectFont:p});t.fontLoader.bind(v).catch((function(t){return r.sendWithPromise("FontFallback",{id:l})})).finally((function(){!h.fontExtraProperties&&v.data&&(v.data=null);t.commonObjs.resolve(l,v)}));break;case"FontPath":case"Image":case"Pattern":t.commonObjs.resolve(l,c);break;default:throw new Error("Got unknown common object type ".concat(u))}}));r.on("obj",(function(r){var i=_slicedToArray(r,4),a=i[0],o=i[1],l=i[2],u=i[3];if(!t.destroyed){var c=_classPrivateFieldGet(t,_pageCache).get(o);if(!c.objs.has(a))switch(l){case"Image":c.objs.resolve(a,u);if(u){var h;if(u.bitmap){h=u.width*u.height*4}else{var d;h=(null===(d=u.data)||void 0===d?void 0:d.length)||0}h>_util.MAX_IMAGE_SIZE_TO_CACHE&&(c._maybeCleanupAfterRender=!0)}break;case"Pattern":c.objs.resolve(a,u);break;default:throw new Error("Got unknown object type ".concat(l))}}}));r.on("DocProgress",(function(r){var a;t.destroyed||null===(a=i.onProgress)||void 0===a||a.call(i,{loaded:r.loaded,total:r.total})}));r.on("FetchBuiltInCMap",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.cMapReaderFactory?t.cMapReaderFactory.fetch(r):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))}));r.on("FetchStandardFontData",(function(r){return t.destroyed?Promise.reject(new Error("Worker was destroyed.")):t.standardFontDataFactory?t.standardFontDataFactory.fetch(r):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))}))}},{key:"getData",value:function getData(){return this.messageHandler.sendWithPromise("GetData",null)}},{key:"saveDocument",value:function saveDocument(){var t,r,i=this;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");var a=this.annotationStorage.serializable,o=a.map,l=a.transfers;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:o,filename:null!==(t=null===(r=this._fullReader)||void 0===r?void 0:r.filename)&&void 0!==t?t:null},l).finally((function(){i.annotationStorage.resetModified()}))}},{key:"getPage",value:function getPage(t){var r=this;if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));var i=t-1,a=_classPrivateFieldGet(this,_pagePromises).get(i);if(a)return a;var o=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then((function(t){if(r.destroyed)throw new Error("Transport destroyed");var a=new PDFPageProxy(i,t,r,r._params.pdfBug);_classPrivateFieldGet(r,_pageCache).set(i,a);return a}));_classPrivateFieldGet(this,_pagePromises).set(i,o);return o}},{key:"getPageIndex",value:function getPageIndex(t){return"object"!==_typeof(t)||null===t||!Number.isInteger(t.num)||t.num<0||!Number.isInteger(t.gen)||t.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen})}},{key:"getAnnotations",value:function getAnnotations(t,r){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:r})}},{key:"getFieldObjects",value:function getFieldObjects(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetFieldObjects")}},{key:"hasJSActions",value:function hasJSActions(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"HasJSActions")}},{key:"getCalculationOrderIds",value:function getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}},{key:"getDestinations",value:function getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}},{key:"getDestination",value:function getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}},{key:"getPageLabels",value:function getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}},{key:"getPageLayout",value:function getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}},{key:"getPageMode",value:function getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}},{key:"getViewerPreferences",value:function getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}},{key:"getOpenAction",value:function getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}},{key:"getAttachments",value:function getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}},{key:"getDocJSActions",value:function getDocJSActions(){return _classPrivateMethodGet(this,_cacheSimpleMethod,_cacheSimpleMethod2).call(this,"GetDocJSActions")}},{key:"getPageJSActions",value:function getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}},{key:"getStructTree",value:function getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}},{key:"getOutline",value:function getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}},{key:"getOptionalContentConfig",value:function getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((function(t){return new _optional_content_config.OptionalContentConfig(t)}))}},{key:"getPermissions",value:function getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}},{key:"getMetadata",value:function getMetadata(){var t=this,r="GetMetadata",i=_classPrivateFieldGet(this,_methodPromises).get(r);if(i)return i;var a=this.messageHandler.sendWithPromise(r,null).then((function(r){var i,a,o,l;return{info:r[0],metadata:r[1]?new _metadata.Metadata(r[1]):null,contentDispositionFilename:null!==(i=null===(a=t._fullReader)||void 0===a?void 0:a.filename)&&void 0!==i?i:null,contentLength:null!==(o=null===(l=t._fullReader)||void 0===l?void 0:l.contentLength)&&void 0!==o?o:null}}));_classPrivateFieldGet(this,_methodPromises).set(r,a);return a}},{key:"getMarkInfo",value:function getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}},{key:"startCleanup",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t,r,i,a,o=arguments;return _regeneratorRuntime().wrap((function _callee4$(l){for(;;)switch(l.prev=l.next){case 0:t=o.length>0&&void 0!==o[0]&&o[0];if(!this.destroyed){l.next=3;break}return l.abrupt("return");case 3:l.next=5;return this.messageHandler.sendWithPromise("Cleanup",null);case 5:r=_createForOfIteratorHelper(_classPrivateFieldGet(this,_pageCache).values());l.prev=6;r.s();case 8:if((i=r.n()).done){l.next=15;break}if((a=i.value).cleanup()){l.next=13;break}throw new Error("startCleanup: Page ".concat(a.pageNumber," is currently rendering."));case 13:l.next=8;break;case 15:l.next=20;break;case 17:l.prev=17;l.t0=l.catch(6);r.e(l.t0);case 20:l.prev=20;r.f();return l.finish(20);case 23:this.commonObjs.clear();t||this.fontLoader.clear();_classPrivateFieldGet(this,_methodPromises).clear();this.filterFactory.destroy(!0);case 27:case"end":return l.stop()}}),_callee4,this,[[6,17,20,23]])}))),function startCleanup(){return t.apply(this,arguments)})},{key:"loadingParams",get:function get(){var t=this._params,r=t.disableAutoFetch,i=t.enableXfa;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:r,enableXfa:i})}}]);var t;return WorkerTransport}();function _cacheSimpleMethod2(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=_classPrivateFieldGet(this,_methodPromises).get(t);if(i)return i;var a=this.messageHandler.sendWithPromise(t,r);_classPrivateFieldGet(this,_methodPromises).set(t,a);return a}var _objs=new WeakMap,_ensureObj=new WeakSet,PDFObjects=function(){function PDFObjects(){_classCallCheck(this,PDFObjects);_classPrivateMethodInitSpec(this,_ensureObj);_classPrivateFieldInitSpec(this,_objs,{writable:!0,value:Object.create(null)})}_createClass(PDFObjects,[{key:"get",value:function get(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(r){var i=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,t);i.capability.promise.then((function(){return r(i.data)}));return null}var a=_classPrivateFieldGet(this,_objs)[t];if(null==a||!a.capability.settled)throw new Error("Requesting object that isn't resolved yet ".concat(t,"."));return a.data}},{key:"has",value:function has(t){var r=_classPrivateFieldGet(this,_objs)[t];return(null==r?void 0:r.capability.settled)||!1}},{key:"resolve",value:function resolve(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=_classPrivateMethodGet(this,_ensureObj,_ensureObj2).call(this,t);i.data=r;i.capability.resolve()}},{key:"clear",value:function clear(){for(var t in _classPrivateFieldGet(this,_objs)){var r,i=_classPrivateFieldGet(this,_objs)[t].data;null==i||null===(r=i.bitmap)||void 0===r||r.close()}_classPrivateFieldSet(this,_objs,Object.create(null))}}]);return PDFObjects}();function _ensureObj2(t){var r;return(r=_classPrivateFieldGet(this,_objs))[t]||(r[t]={capability:new _util.PromiseCapability,data:null})}var _internalRenderTask=new WeakMap,RenderTask=function(){function RenderTask(t){_classCallCheck(this,RenderTask);_classPrivateFieldInitSpec(this,_internalRenderTask,{writable:!0,value:null});_classPrivateFieldSet(this,_internalRenderTask,t);this.onContinue=null}_createClass(RenderTask,[{key:"promise",get:function get(){return _classPrivateFieldGet(this,_internalRenderTask).capability.promise}},{key:"cancel",value:function cancel(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;_classPrivateFieldGet(this,_internalRenderTask).cancel(null,t)}},{key:"separateAnnots",get:function get(){var t=_classPrivateFieldGet(this,_internalRenderTask).operatorList.separateAnnots;if(!t)return!1;var r=_classPrivateFieldGet(this,_internalRenderTask).annotationCanvasMap;return t.form||t.canvas&&(null==r?void 0:r.size)>0}}]);return RenderTask}();exports.RenderTask=RenderTask;var InternalRenderTask=function(){function InternalRenderTask(t){var r=t.callback,i=t.params,a=t.objs,o=t.commonObjs,l=t.annotationCanvasMap,u=t.operatorList,c=t.pageIndex,h=t.canvasFactory,d=t.filterFactory,p=t.useRequestAnimationFrame,v=void 0!==p&&p,y=t.pdfBug,g=void 0!==y&&y,m=t.pageColors,b=void 0===m?null:m;_classCallCheck(this,InternalRenderTask);this.callback=r;this.params=i;this.objs=a;this.commonObjs=o;this.annotationCanvasMap=l;this.operatorListIdx=null;this.operatorList=u;this._pageIndex=c;this.canvasFactory=h;this.filterFactory=d;this._pdfBug=g;this.pageColors=b;this.running=!1;this.graphicsReadyCallback=null;this.graphicsReady=!1;this._useRequestAnimationFrame=!0===v&&"undefined"!=typeof window;this.cancelled=!1;this.capability=new _util.PromiseCapability;this.task=new RenderTask(this);this._cancelBound=this.cancel.bind(this);this._continueBound=this._continue.bind(this);this._scheduleNextBound=this._scheduleNext.bind(this);this._nextBound=this._next.bind(this);this._canvas=i.canvasContext.canvas}_createClass(InternalRenderTask,[{key:"completed",get:function get(){return this.capability.promise.catch((function(){}))}},{key:"initializeGraphics",value:function initializeGraphics(t){var r,i,a=t.transparency,o=void 0!==a&&a,l=t.optionalContentConfig;if(!this.cancelled){if(this._canvas){if(_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).add(this._canvas)}if(this._pdfBug&&null!==(r=globalThis.StepperManager)&&void 0!==r&&r.enabled){this.stepper=globalThis.StepperManager.create(this._pageIndex);this.stepper.init(this.operatorList);this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint()}var u=this.params,c=u.canvasContext,h=u.viewport,d=u.transform,p=u.background;this.gfx=new _canvas.CanvasGraphics(c,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:l},this.annotationCanvasMap,this.pageColors);this.gfx.beginDrawing({transform:d,viewport:h,transparency:o,background:p});this.operatorListIdx=0;this.graphicsReady=!0;null===(i=this.graphicsReadyCallback)||void 0===i||i.call(this)}}},{key:"cancel",value:function cancel(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.running=!1;this.cancelled=!0;null===(t=this.gfx)||void 0===t||t.endDrawing();this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas);this.callback(r||new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex+1),i))}},{key:"operatorListChanged",value:function operatorListChanged(){var t;if(this.graphicsReady){null===(t=this.stepper)||void 0===t||t.updateOperatorList(this.operatorList);this.running||this._continue()}else this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}},{key:"_continue",value:function _continue(){this.running=!0;this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}},{key:"_scheduleNext",value:function _scheduleNext(){var t=this;window.ngxZone.runOutsideAngular((function(){t._useRequestAnimationFrame?window.requestAnimationFrame((function(){t._nextBound().catch(t._cancelBound)})):Promise.resolve().then(t._nextBound).catch(t._cancelBound)}))}},{key:"_next",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){return _regeneratorRuntime().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cancelled){t.next=2;break}return t.abrupt("return");case 2:this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper);if(this.operatorListIdx===this.operatorList.argsArray.length){this.running=!1;if(this.operatorList.lastChunk){this.gfx.endDrawing(this.pageColors);this._canvas&&_classStaticPrivateFieldSpecGet(InternalRenderTask,InternalRenderTask,_canvasInUse).delete(this._canvas);this.callback()}}case 4:case"end":return t.stop()}}),_callee5,this)}))),function _next(){return t.apply(this,arguments)})}]);var t;return InternalRenderTask}(),_canvasInUse={writable:!0,value:new WeakSet},version="3.11.440";exports.version=version;var build="a6163a289";exports.build=build},(t,r,i)=>{i(86)("asyncIterator")},(t,r,i)=>{var a=i(24),o=i(86),l=i(72);o("toStringTag");l(a("Symbol"),"Symbol")},(t,r,i)=>{var a=i(4);i(72)(a.JSON,"JSON",!0)},(t,r,i)=>{i(72)(Math,"Math",!0)},(t,r,i)=>{var a=i(4),o=i(150),l=i(151),u=i(311),c=i(44),handlePrototype=function(t){if(t&&t.forEach!==u)try{c(t,"forEach",u)}catch(r){t.forEach=u}};for(var h in o)o[h]&&handlePrototype(a[h]&&a[h].prototype);handlePrototype(l)},(t,r,i)=>{var a=i(188).forEach,o=i(215)("forEach");t.exports=o?[].forEach:function forEach(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}},(t,r,i)=>{i(313)},(t,r,i)=>{i(282)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),i(288))},(t,r,i)=>{var a=i(3),o=i(315);a({target:"Set",proto:!0,real:!0,forced:!i(324)("difference")},{difference:o})},(t,r,i)=>{var a=i(316),o=i(317),l=i(318),u=i(321),c=i(322),h=i(319),d=i(320),p=o.has,v=o.remove;t.exports=function difference(t){var r=a(this),i=c(t),o=l(r);u(r)<=i.size?h(r,(function(t){i.includes(t)&&v(o,t)})):d(i.getIterator(),(function(t){p(r,t)&&v(o,t)}));return o}},(t,r,i)=>{var a=i(317).has;t.exports=function(t){a(t);return t}},(t,r,i)=>{var a=i(14),o=Set.prototype;t.exports={Set:Set,add:a(o.add),has:a(o.has),remove:a(o.delete),proto:o}},(t,r,i)=>{var a=i(317),o=i(319),l=a.Set,u=a.add;t.exports=function(t){var r=new l;o(t,(function(t){u(r,t)}));return r}},(t,r,i)=>{var a=i(14),o=i(320),l=i(317),u=l.Set,c=l.proto,h=a(c.forEach),d=a(c.keys),p=d(new u).next;t.exports=function(t,r,i){return i?o({iterator:d(t),next:p},r):h(t,r)}},(t,r,i)=>{var a=i(8);t.exports=function(t,r,i){for(var o,l,u=i?t:t.iterator,c=t.next;!(o=a(c,u)).done;)if(void 0!==(l=r(o.value)))return l}},(t,r,i)=>{var a=i(115),o=i(317);t.exports=a(o.proto,"size","get")||function(t){return t.size}},(t,r,i)=>{var a=i(31),o=i(47),l=i(8),u=i(62),c=i(323),h="Invalid size",d=RangeError,p=TypeError,v=Math.max,SetRecord=function(t,r,i,a){this.set=t;this.size=r;this.has=i;this.keys=a};SetRecord.prototype={getIterator:function(){return c(o(l(this.keys,this.set)))},includes:function(t){return l(this.has,this.set,t)}};t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw p(h);var i=u(r);if(i<0)throw d(h);return new SetRecord(t,v(i,0),a(t.has),a(t.keys))}},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,r,i)=>{var a=i(24),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=a("Set");try{(new r)[t](createSetLike(0));try{(new r)[t](createSetLike(-1));return!1}catch(t){return!0}}catch(t){return!1}}},(t,r,i)=>{var a=i(3),o=i(7),l=i(326);a({target:"Set",proto:!0,real:!0,forced:!i(324)("intersection")||o((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:l})},(t,r,i)=>{var a=i(316),o=i(317),l=i(321),u=i(322),c=i(319),h=i(320),d=o.Set,p=o.add,v=o.has;t.exports=function intersection(t){var r=a(this),i=u(t),o=new d;l(r)>i.size?h(i.getIterator(),(function(t){v(r,t)&&p(o,t)})):c(r,(function(t){i.includes(t)&&p(o,t)}));return o}},(t,r,i)=>{var a=i(3),o=i(328);a({target:"Set",proto:!0,real:!0,forced:!i(324)("isDisjointFrom")},{isDisjointFrom:o})},(t,r,i)=>{var a=i(316),o=i(317).has,l=i(321),u=i(322),c=i(319),h=i(320),d=i(97);t.exports=function isDisjointFrom(t){var r=a(this),i=u(t);if(l(r)<=i.size)return!1!==c(r,(function(t){if(i.includes(t))return!1}),!0);var p=i.getIterator();return!1!==h(p,(function(t){if(o(r,t))return d(p,"normal",!1)}))}},(t,r,i)=>{var a=i(3),o=i(330);a({target:"Set",proto:!0,real:!0,forced:!i(324)("isSubsetOf")},{isSubsetOf:o})},(t,r,i)=>{var a=i(316),o=i(321),l=i(319),u=i(322);t.exports=function isSubsetOf(t){var r=a(this),i=u(t);return!(o(r)>i.size)&&!1!==l(r,(function(t){if(!i.includes(t))return!1}),!0)}},(t,r,i)=>{var a=i(3),o=i(332);a({target:"Set",proto:!0,real:!0,forced:!i(324)("isSupersetOf")},{isSupersetOf:o})},(t,r,i)=>{var a=i(316),o=i(317).has,l=i(321),u=i(322),c=i(320),h=i(97);t.exports=function isSupersetOf(t){var r=a(this),i=u(t);if(l(r)<i.size)return!1;var d=i.getIterator();return!1!==c(d,(function(t){if(!o(r,t))return h(d,"normal",!1)}))}},(t,r,i)=>{var a=i(3),o=i(334);a({target:"Set",proto:!0,real:!0,forced:!i(324)("symmetricDifference")},{symmetricDifference:o})},(t,r,i)=>{var a=i(316),o=i(317),l=i(318),u=i(322),c=i(320),h=o.add,d=o.has,p=o.remove;t.exports=function symmetricDifference(t){var r=a(this),i=u(t).getIterator(),o=l(r);c(i,(function(t){d(r,t)?p(o,t):h(o,t)}));return o}},(t,r,i)=>{var a=i(3),o=i(336);a({target:"Set",proto:!0,real:!0,forced:!i(324)("union")},{union:o})},(t,r,i)=>{var a=i(316),o=i(317).add,l=i(318),u=i(322),c=i(320);t.exports=function union(t){var r=a(this),i=u(t).getIterator(),h=l(r);c(i,(function(t){o(h,t)}));return h}},(t,r,i)=>{var a=i(3),o=i(156);a({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},(t,r,i)=>{var a=i(3),o=i(339),l=i(24),u=i(7),c=i(81),h=i(11),d=i(45).f,p=i(48),v=i(121),y=i(39),g=i(155),m=i(47),b=i(340),w=i(126),P=i(341),A=i(129),S=i(52),E=i(6),x=i(36),D="DOMException",k="DATA_CLONE_ERR",C=l("Error"),T=l(D)||function(){try{(new(l("MessageChannel")||o("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name===k&&25===t.code)return t.constructor}}(),I=T&&T.prototype,O=C.prototype,M=S.set,L=S.getterFor(D),R="stack"in C(D),codeFor=function(t){return y(P,t)&&P[t].m?P[t].c:0},G=function DOMException(){g(this,B);var t=arguments.length,r=w(t<1?void 0:arguments[0]),i=w(t<2?void 0:arguments[1],"Error"),a=codeFor(i);M(this,{type:D,name:i,message:r,code:a});if(!E){this.name=i;this.message=r;this.code=a}if(R){var o=C(r);o.name=D;d(this,"stack",h(1,A(o.stack,1)))}},B=G.prototype=c(O),createGetterDescriptor=function(t){return{enumerable:!0,configurable:!0,get:t}},getterFor=function(t){return createGetterDescriptor((function(){return L(this)[t]}))};if(E){v(B,"code",getterFor("code"));v(B,"message",getterFor("message"));v(B,"name",getterFor("name"))}d(B,"constructor",h(1,G));var j=u((function(){return!(new T instanceof C)})),N=j||u((function(){return O.toString!==b||"2: 1"!==String(new T(1,2))})),W=j||u((function(){return 25!==new T(1,"DataCloneError").code})),V=j||25!==T[k]||25!==I[k],U=x?N||W||V:j;a({global:!0,constructor:!0,forced:U},{DOMException:U?G:T});var H=l(D),z=H.prototype;N&&(x||T===H)&&p(z,"toString",b);W&&E&&T===H&&v(z,"code",createGetterDescriptor((function(){return codeFor(m(this).name)})));for(var q in P)if(y(P,q)){var Y=P[q],K=Y.s,X=h(6,Y.c);y(H,K)||d(H,K,X);y(z,K)||d(z,K,X)}},(t,r,i)=>{var a=i(243);t.exports=function(t){try{if(a)return Function('return require("'+t+'")')()}catch(t){}}},(t,r,i)=>{var a=i(6),o=i(7),l=i(47),u=i(81),c=i(126),h=Error.prototype.toString,d=o((function(){if(a){var t=u(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==h.call(t))return!0}return"2: 1"!==h.call({message:1,name:2})||"Error"!==h.call({})}));t.exports=d?function toString(){var t=l(this),r=c(t.name,"Error"),i=c(t.message);return r?i?r+": "+i:r:i}:h},t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(t,r,i)=>{var a=i(3),o=i(4),l=i(24),u=i(11),c=i(45).f,h=i(39),d=i(155),p=i(113),v=i(126),y=i(341),g=i(129),m=i(6),b=i(36),w="DOMException",P=l("Error"),A=l(w),S=function DOMException(){d(this,E);var t=arguments.length,r=v(t<1?void 0:arguments[0]),i=v(t<2?void 0:arguments[1],"Error"),a=new A(r,i),o=P(r);o.name=w;c(a,"stack",u(1,g(o.stack,1)));p(a,this,S);return a},E=S.prototype=A.prototype,x="stack"in P(w),D="stack"in new A(1,2),k=A&&m&&Object.getOwnPropertyDescriptor(o,w),C=!(!k||k.writable&&k.configurable),T=x&&!C&&!D;a({global:!0,constructor:!0,forced:b||T},{DOMException:T?S:A});var I=l(w),O=I.prototype;if(O.constructor!==I){b||c(O,"constructor",u(1,I));for(var M in y)if(h(y,M)){var L=y[M],R=L.s;h(I,R)||c(I,R,u(6,L.c))}}},(t,r,i)=>{var a=i(24),o="DOMException";i(72)(a(o),o)},(t,r,i)=>{var a,o=i(36),l=i(3),u=i(4),c=i(24),h=i(14),d=i(7),p=i(41),v=i(21),y=i(78),g=i(17),m=i(20),b=i(23),w=i(273),P=i(47),A=i(79),S=i(39),E=i(100),x=i(44),D=i(64),k=i(159),C=i(256),T=i(345),I=i(317),O=i(130),M=i(240),L=u.Object,R=u.Array,G=u.Date,B=u.Error,j=u.EvalError,N=u.RangeError,W=u.ReferenceError,V=u.SyntaxError,U=u.TypeError,H=u.URIError,z=u.PerformanceMark,q=u.WebAssembly,Y=q&&q.CompileError||B,K=q&&q.LinkError||B,X=q&&q.RuntimeError||B,$=c("DOMException"),Q=T.Map,J=T.has,Z=T.get,ee=T.set,te=I.Set,re=I.add,ne=c("Object","keys"),ie=h([].push),ae=h((!0).valueOf),oe=h(1..valueOf),se=h("".valueOf),le=h(G.prototype.getTime),ue=p("structuredClone"),ce="DataCloneError",he="Transferring",checkBasicSemantic=function(t){return!d((function(){var r=new u.Set([7]),i=t(r),a=t(L(7));return i===r||!i.has(7)||"object"!=typeof a||7!==a}))&&t},checkErrorsCloning=function(t,r){return!d((function(){var i=new r,a=t({a:i,b:i});return!(a&&a.a===a.b&&a.a instanceof r&&a.a.stack===i.stack)}))},de=u.structuredClone,fe=o||!checkErrorsCloning(de,B)||!checkErrorsCloning(de,$)||!(a=de,!d((function(){var t=a(new u.AggregateError([1],ue,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==ue||3!==t.cause}))),pe=!de&&checkBasicSemantic((function(t){return new z(ue,{detail:t}).detail})),ve=checkBasicSemantic(de)||pe,throwUncloneable=function(t){throw new $("Uncloneable type: "+t,ce)},throwUnpolyfillable=function(t,r){throw new $((r||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",ce)},tryNativeRestrictedStructuredClone=function(t,r){ve||throwUnpolyfillable(r);return ve(t)},cloneBuffer=function(t,r,i){if(J(r,t))return Z(r,t);var a,o,l,c,h,d;if("SharedArrayBuffer"===(i||A(t)))a=ve?ve(t):t;else{var p=u.DataView;p||"function"==typeof t.slice||throwUnpolyfillable("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){o=t.byteLength;l="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0;a=new ArrayBuffer(o,l);c=new p(t);h=new p(a);for(d=0;d<o;d++)h.setUint8(d,c.getUint8(d))}else a=t.slice(0)}catch(t){throw new $("ArrayBuffer is detached",ce)}}ee(r,t,a);return a},cloneView=function(t,r,i,a,o){var l=u[r];m(l)||throwUnpolyfillable(r);return new l(cloneBuffer(t.buffer,o),i,a)},Placeholder=function(t,r,i){this.object=t;this.type=r;this.metadata=i},structuredCloneInternal=function(t,r,i){b(t)&&throwUncloneable("Symbol");if(!m(t))return t;if(r){if(J(r,t))return Z(r,t)}else r=new Q;var a,o,l,h,d,p,y,g,w=A(t);switch(w){case"Array":l=R(D(t));break;case"Object":l={};break;case"Map":l=new Q;break;case"Set":l=new te;break;case"RegExp":l=new RegExp(t.source,C(t));break;case"Error":switch(o=t.name){case"AggregateError":l=c("AggregateError")([]);break;case"EvalError":l=j();break;case"RangeError":l=N();break;case"ReferenceError":l=W();break;case"SyntaxError":l=V();break;case"TypeError":l=U();break;case"URIError":l=H();break;case"CompileError":l=Y();break;case"LinkError":l=K();break;case"RuntimeError":l=X();break;default:l=B()}break;case"DOMException":l=new $(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":l=i?new Placeholder(t,w):cloneBuffer(t,r,w);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":p="DataView"===w?t.byteLength:t.length;l=i?new Placeholder(t,w,{offset:t.byteOffset,length:p}):cloneView(t,w,t.byteOffset,p,r);break;case"DOMQuad":try{l=new DOMQuad(structuredCloneInternal(t.p1,r,i),structuredCloneInternal(t.p2,r,i),structuredCloneInternal(t.p3,r,i),structuredCloneInternal(t.p4,r,i))}catch(r){l=tryNativeRestrictedStructuredClone(t,w)}break;case"File":if(ve)try{l=ve(t);A(l)!==w&&(l=void 0)}catch(t){}if(!l)try{l=new File([t],t.name,t)}catch(t){}l||throwUnpolyfillable(w);break;case"FileList":if(h=function(){var t;try{t=new u.DataTransfer}catch(r){try{t=new u.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(d=0,p=D(t);d<p;d++)h.items.add(structuredCloneInternal(t[d],r,i));l=h.files}else l=tryNativeRestrictedStructuredClone(t,w);break;case"ImageData":try{l=new ImageData(structuredCloneInternal(t.data,r,i),t.width,t.height,{colorSpace:t.colorSpace})}catch(r){l=tryNativeRestrictedStructuredClone(t,w)}break;default:if(ve)l=ve(t);else switch(w){case"BigInt":l=L(t.valueOf());break;case"Boolean":l=L(ae(t));break;case"Number":l=L(oe(t));break;case"String":l=L(se(t));break;case"Date":l=new G(le(t));break;case"Blob":try{l=t.slice(0,t.size,t.type)}catch(t){throwUnpolyfillable(w)}break;case"DOMPoint":case"DOMPointReadOnly":a=u[w];try{l=a.fromPoint?a.fromPoint(t):new a(t.x,t.y,t.z,t.w)}catch(t){throwUnpolyfillable(w)}break;case"DOMRect":case"DOMRectReadOnly":a=u[w];try{l=a.fromRect?a.fromRect(t):new a(t.x,t.y,t.width,t.height)}catch(t){throwUnpolyfillable(w)}break;case"DOMMatrix":case"DOMMatrixReadOnly":a=u[w];try{l=a.fromMatrix?a.fromMatrix(t):new a(t)}catch(t){throwUnpolyfillable(w)}break;case"AudioData":case"VideoFrame":v(t.clone)||throwUnpolyfillable(w);try{l=t.clone()}catch(t){throwUncloneable(w)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":throwUnpolyfillable(w);default:throwUncloneable(w)}}ee(r,t,l);switch(w){case"Array":case"Object":y=ne(t);for(d=0,p=D(y);d<p;d++){g=y[d];E(l,g,structuredCloneInternal(t[g],r,i))}break;case"Map":t.forEach((function(t,a){ee(l,structuredCloneInternal(a,r,i),structuredCloneInternal(t,r,i))}));break;case"Set":t.forEach((function(t){re(l,structuredCloneInternal(t,r,i))}));break;case"Error":x(l,"message",structuredCloneInternal(t.message,r,i));S(t,"cause")&&x(l,"cause",structuredCloneInternal(t.cause,r,i));"AggregateError"===o&&(l.errors=structuredCloneInternal(t.errors,r,i));case"DOMException":O&&x(l,"stack",structuredCloneInternal(t.stack,r,i))}return l},replacePlaceholders=function(t,r){if(!m(t))return t;if(J(r,t))return Z(r,t);var i,a,o,l,u,c,h,d;if(t instanceof Placeholder){i=t.type;a=t.object;switch(i){case"ArrayBuffer":case"SharedArrayBuffer":d=cloneBuffer(a,r,i);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":o=t.metadata;d=cloneView(a,i,o.offset,o.length,r)}}else switch(A(t)){case"Array":case"Object":c=ne(t);for(l=0,u=D(c);l<u;l++)t[h=c[l]]=replacePlaceholders(t[h],r);break;case"Map":d=new Q;t.forEach((function(t,i){ee(d,replacePlaceholders(i,r),replacePlaceholders(t,r))}));break;case"Set":d=new te;t.forEach((function(t){re(d,replacePlaceholders(t,r))}));break;case"Error":t.message=replacePlaceholders(t.message,r);S(t,"cause")&&(t.cause=replacePlaceholders(t.cause,r));"AggregateError"===t.name&&(t.errors=replacePlaceholders(t.errors,r));case"DOMException":O&&(t.stack=replacePlaceholders(t.stack,r))}ee(r,t,d||t);return d||t};l({global:!0,enumerable:!0,sham:!M,forced:fe},{structuredClone:function structuredClone(t){var r,i,a=k(arguments.length,1)>1&&!g(arguments[1])?P(arguments[1]):void 0,o=a?a.transfer:void 0,l=!1;if(void 0!==o){i=function(t,r){if(!m(t))throw U("Transfer option cannot be converted to a sequence");var i=[];w(t,(function(t){ie(i,P(t))}));for(var a,o,l,c,h,d=0,p=D(i),g=[];d<p;){a=i[d++];if("ArrayBuffer"!==(o=A(a))){if(J(r,a))throw new $("Duplicate transferable",ce);if(M)c=de(a,{transfer:[a]});else switch(o){case"ImageBitmap":l=u.OffscreenCanvas;y(l)||throwUnpolyfillable(o,he);try{(h=new l(a.width,a.height)).getContext("bitmaprenderer").transferFromImageBitmap(a);c=h.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":v(a.clone)&&v(a.close)||throwUnpolyfillable(o,he);try{c=a.clone();a.close()}catch(t){}break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":throwUnpolyfillable(o,he)}if(void 0===c)throw new $("This object cannot be transferred: "+o,ce);ee(r,a,c)}else ie(g,a)}return g}(o,r=new Q);l=!!D(i)}var c=structuredCloneInternal(t,r,l);if(l){!function(t,r){for(var i,a,o=0,l=D(t);o<l;){i=t[o++];if(J(r,i))throw new $("Duplicate transferable",ce);if(M)a=de(i,{transfer:[i]});else{v(i.transfer)||throwUnpolyfillable("ArrayBuffer",he);a=i.transfer()}ee(r,i,a)}}(o,r=new Q);c=replacePlaceholders(c,r)}return c}})},(t,r,i)=>{var a=i(14),o=Map.prototype;t.exports={Map:Map,set:a(o.set),get:a(o.get),has:a(o.has),remove:a(o.delete),proto:o}},(t,r,i)=>{var a=i(3),o=i(36),l=i(269),u=i(7),c=i(24),h=i(21),d=i(202),p=i(279),v=i(48),y=l&&l.prototype;a({target:"Promise",proto:!0,real:!0,forced:!!l&&u((function(){y.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=d(this,c("Promise")),i=h(t);return this.then(i?function(i){return p(r,t()).then((function(){return i}))}:t,i?function(i){return p(r,t()).then((function(){throw i}))}:t)}});if(!o&&h(l)){var g=c("Promise").prototype.finally;y.finally!==g&&v(y,"finally",g,{unsafe:!0})}},(t,r,i)=>{i(348)},(t,r,i)=>{i(282)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),i(304))},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(123);i(85);i(90);i(292);i(300);i(112);i(258);i(255);i(92);i(105);i(104);i(301);i(2);i(71);i(73);Object.defineProperty(r,"__esModule",{value:!0});r.SerializableEmpty=r.PrintAnnotationStorage=r.AnnotationStorage=void 0;i(350);i(140);i(280);i(146);i(148);i(149);i(337);i(351);i(167);i(257);i(297);i(249);i(245);i(312);i(338);i(342);i(343);i(344);i(302);i(347);var a=i(1),o=i(353),l=i(372);function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var u=Object.freeze({map:null,hash:"",transfers:void 0});r.SerializableEmpty=u;var c=new WeakMap,h=new WeakMap,d=new WeakSet,p=function(){function AnnotationStorage(){_classCallCheck(this,AnnotationStorage);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,d);_classPrivateFieldInitSpec(this,c,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,h,{writable:!0,value:new Map});this.onSetModified=null;this.onResetModified=null;this.onAnnotationEditor=null}_createClass(AnnotationStorage,[{key:"getValue",value:function getValue(t,r){var i=_classPrivateFieldGet(this,h).get(t);return void 0===i?r:Object.assign(r,i)}},{key:"getRawValue",value:function getRawValue(t){return _classPrivateFieldGet(this,h).get(t)}},{key:"remove",value:function remove(t){_classPrivateFieldGet(this,h).delete(t);0===_classPrivateFieldGet(this,h).size&&this.resetModified();if("function"==typeof this.onAnnotationEditor){var r,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,h).values());try{for(i.s();!(r=i.n()).done;){if(r.value instanceof o.AnnotationEditor)return}}catch(t){i.e(t)}finally{i.f()}this.onAnnotationEditor(null)}}},{key:"setValue",value:function setValue(t,r){var i=_classPrivateFieldGet(this,h).get(t),a=!1;if(void 0!==i)for(var l=0,u=Object.entries(r);l<u.length;l++){var c=_slicedToArray(u[l],2),p=c[0],v=c[1];if(i[p]!==v){a=!0;i[p]=v}}else{a=!0;_classPrivateFieldGet(this,h).set(t,r)}a&&function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}(this,d,_setModified2).call(this);r instanceof o.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(r.constructor._type)}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,h).has(t)}},{key:"getAll",value:function getAll(){return _classPrivateFieldGet(this,h).size>0?(0,a.objectFromMap)(_classPrivateFieldGet(this,h)):null}},{key:"setAll",value:function setAll(t){for(var r=0,i=Object.entries(t);r<i.length;r++){var a=_slicedToArray(i[r],2),o=a[0],l=a[1];this.setValue(o,l)}}},{key:"size",get:function get(){return _classPrivateFieldGet(this,h).size}},{key:"resetModified",value:function resetModified(){if(_classPrivateFieldGet(this,c)){_classPrivateFieldSet(this,c,!1);"function"==typeof this.onResetModified&&this.onResetModified()}}},{key:"print",get:function get(){return new y(this)}},{key:"serializable",get:function get(){if(0===_classPrivateFieldGet(this,h).size)return u;var t,r=new Map,i=new l.MurmurHash3_64,a=[],c=Object.create(null),d=!1,p=_createForOfIteratorHelper(_classPrivateFieldGet(this,h));try{for(p.s();!(t=p.n()).done;){var v=_slicedToArray(t.value,2),y=v[0],g=v[1],m=g instanceof o.AnnotationEditor?g.serialize(!1,c):g;if(m){r.set(y,m);i.update("".concat(y,":").concat(JSON.stringify(m)));d||(d=!!m.bitmap)}}}catch(t){p.e(t)}finally{p.f()}if(d){var b,w=_createForOfIteratorHelper(r.values());try{for(w.s();!(b=w.n()).done;){var P=b.value;P.bitmap&&a.push(P.bitmap)}}catch(t){w.e(t)}finally{w.f()}}return r.size>0?{map:r,hash:i.hexdigest(),transfers:a}:u}}]);return AnnotationStorage}();r.AnnotationStorage=p;function _setModified2(){if(!_classPrivateFieldGet(this,c)){_classPrivateFieldSet(this,c,!0);"function"==typeof this.onSetModified&&this.onSetModified()}}var v=new WeakMap,y=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PrintAnnotationStorage,t);var r=_createSuper(PrintAnnotationStorage);function PrintAnnotationStorage(t){var i;_classCallCheck(this,PrintAnnotationStorage);_classPrivateFieldInitSpec(_assertThisInitialized(i=r.call(this)),v,{writable:!0,value:void 0});var a=t.serializable,o=a.map,l=a.hash,u=a.transfers,c=structuredClone(o,null);_classPrivateFieldSet(_assertThisInitialized(i),v,{map:c,hash:l,transfers:u});return i}_createClass(PrintAnnotationStorage,[{key:"print",get:function get(){(0,a.unreachable)("Should not call PrintAnnotationStorage.print")}},{key:"serializable",get:function get(){return _classPrivateFieldGet(this,v)}}]);return PrintAnnotationStorage}(p);r.PrintAnnotationStorage=y},(t,r,i)=>{var a=i(3),o=i(287),l=i(7),u=i(20),c=i(283).onFreeze,h=Object.freeze;a({target:"Object",stat:!0,forced:l((function(){h(1)})),sham:!o},{freeze:function freeze(t){return h&&u(t)?h(c(t)):t}})},(t,r,i)=>{var a=i(3),o=i(352).entries;a({target:"Object",stat:!0},{entries:function entries(t){return o(t)}})},(t,r,i)=>{var a=i(6),o=i(7),l=i(14),u=i(69),c=i(83),h=i(12),d=l(i(10).f),p=l([].push),v=a&&o((function(){var t=Object.create(null);t[2]=2;return!d(t,2)})),createMethod=function(t){return function(r){for(var i,o=h(r),l=c(o),y=v&&null===u(o),g=l.length,m=0,b=[];g>m;){i=l[m++];a&&!(y?i in o:d(o,i))||p(b,t?[i,o[i]]:o[i])}return b}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(301);i(258);i(255);i(92);i(105);i(104);i(2);i(71);i(73);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditor=void 0;i(354);i(123);i(140);i(146);i(148);i(302);i(149);i(347);i(167);i(355);var a=i(356),o=i(1);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classStaticPrivateMethodGet(t,r,i){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return i}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakSet,b=new WeakSet,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,E=function(){function AnnotationEditor(t){_classCallCheck(this,AnnotationEditor);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);_classPrivateFieldInitSpec(this,l,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});_classPrivateFieldInitSpec(this,c,{writable:!0,value:this.focusin.bind(this)});_classPrivateFieldInitSpec(this,h,{writable:!0,value:this.focusout.bind(this)});_classPrivateFieldInitSpec(this,d,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,v,{writable:!0,value:!1});_defineProperty(this,"_initialOptions",Object.create(null));_defineProperty(this,"_uiManager",null);_defineProperty(this,"_focusEventsAllowed",!0);_classPrivateFieldInitSpec(this,y,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,g,{writable:!0,value:AnnotationEditor._zIndex++});_defineProperty(this,"doNotMove",!1);this.constructor===AnnotationEditor&&(0,o.unreachable)("Cannot initialize AnnotationEditor.");this.parent=t.parent;this.id=t.id;this.width=this.height=null;this.pageIndex=t.parent.pageIndex;this.name=t.name;this.div=null;this._uiManager=t.uiManager;this.annotationElementId=null;this._willKeepAspectRatio=!1;this._initialOptions.isCentered=t.isCentered;var r=this.parent.viewport,i=r.rotation,a=r.rawDims,E=a.pageWidth,x=a.pageHeight,D=a.pageX,k=a.pageY;this.rotation=i;this.pageRotation=(360+i-this._uiManager.viewParameters.rotation)%360;this.pageDimensions=[E,x];this.pageTranslation=[D,k];var C=_slicedToArray(this.parentDimensions,2),T=C[0],I=C[1];this.x=t.x/T;this.y=t.y/I;this.isAttachedToDOM=!1;this.deleted=!1}_createClass(AnnotationEditor,[{key:"propertiesToUpdate",get:function get(){return[]}},{key:"_isDraggable",get:function get(){return _classPrivateFieldGet(this,y)},set:function set(t){var r;_classPrivateFieldSet(this,y,t);null===(r=this.div)||void 0===r||r.classList.toggle("draggable",t)}},{key:"center",value:function center(){var t=_slicedToArray(this.pageDimensions,2),r=t[0],i=t[1];switch(this.parentRotation){case 90:this.x-=this.height*i/(2*r);this.y+=this.width*r/(2*i);break;case 180:this.x+=this.width/2;this.y+=this.height/2;break;case 270:this.x+=this.height*i/(2*r);this.y-=this.width*r/(2*i);break;default:this.x-=this.width/2;this.y-=this.height/2}this.fixAndSetPosition()}},{key:"addCommands",value:function addCommands(t){this._uiManager.addCommands(t)}},{key:"currentLayer",get:function get(){return this._uiManager.currentLayer}},{key:"setInBackground",value:function setInBackground(){this.div.style.zIndex=0}},{key:"setInForeground",value:function setInForeground(){this.div.style.zIndex=_classPrivateFieldGet(this,g)}},{key:"setParent",value:function setParent(t){if(null!==t){this.pageIndex=t.pageIndex;this.pageDimensions=t.pageDimensions}this.parent=t}},{key:"focusin",value:function focusin(t){this._focusEventsAllowed&&(_classPrivateFieldGet(this,d)?_classPrivateFieldSet(this,d,!1):this.parent.setSelected(this))}},{key:"focusout",value:function focusout(t){var r;if(this._focusEventsAllowed&&this.isAttachedToDOM){var i=t.relatedTarget;if(null==i||!i.closest("#".concat(this.id))){t.preventDefault();null!==(r=this.parent)&&void 0!==r&&r.isMultipleSelection||this.commitOrRemove()}}}},{key:"commitOrRemove",value:function commitOrRemove(){this.isEmpty()?this.remove():this.commit()}},{key:"commit",value:function commit(){this.addToAnnotationStorage()}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}},{key:"setAt",value:function setAt(t,r,i,a){var o=_slicedToArray(this.parentDimensions,2),l=o[0],u=o[1],c=_slicedToArray(this.screenToPageTranslation(i,a),2);i=c[0];a=c[1];if(this.doNotMove){i=0;a=0}this.x=(t+i)/l;this.y=(r+a)/u;this.fixAndSetPosition()}},{key:"translate",value:function translate(t,r){_classPrivateMethodGet(this,m,_translate2).call(this,this.parentDimensions,t,r)}},{key:"translateInPage",value:function translateInPage(t,r){_classPrivateMethodGet(this,m,_translate2).call(this,this.pageDimensions,t,r);this.moveInDOM();this.div.scrollIntoView({block:"nearest"})}},{key:"drag",value:function drag(t,r){var i=_slicedToArray(this.parentDimensions,2),a=i[0],o=i[1];this.x+=t/a;this.y+=r/o;if(this.x<0||this.x>1||this.y<0||this.y>1){var l=this.div.getBoundingClientRect(),u=l.x,c=l.y;if(this.parent.findNewParent(this,u,c)){this.x-=Math.floor(this.x);this.y-=Math.floor(this.y)}}this.div.style.left="".concat((100*this.x).toFixed(2),"%");this.div.style.top="".concat((100*this.y).toFixed(2),"%");this.div.scrollIntoView({block:"nearest"})}},{key:"fixAndSetPosition",value:function fixAndSetPosition(){var t=_slicedToArray(this.pageDimensions,2),r=t[0],i=t[1],a=this.x,o=this.y,l=this.width,u=this.height;l*=r;u*=i;a*=r;o*=i;switch(this.rotation){case 0:a=Math.max(0,Math.min(r-l,a));o=Math.max(0,Math.min(i-u,o));break;case 90:a=Math.max(0,Math.min(r-u,a));o=Math.min(i,Math.max(l,o));break;case 180:a=Math.min(r,Math.max(l,a));o=Math.min(i,Math.max(u,o));break;case 270:a=Math.min(r,Math.max(u,a));o=Math.max(0,Math.min(i-l,o))}this.x=a/r;this.y=o/i;this.div.style.left="".concat((100*this.x).toFixed(2),"%");this.div.style.top="".concat((100*this.y).toFixed(2),"%")}},{key:"screenToPageTranslation",value:function screenToPageTranslation(t,r){return _classStaticPrivateMethodGet(AnnotationEditor,AnnotationEditor,_rotatePoint).call(AnnotationEditor,t,r,this.parentRotation)}},{key:"pageTranslationToScreen",value:function pageTranslationToScreen(t,r){return _classStaticPrivateMethodGet(AnnotationEditor,AnnotationEditor,_rotatePoint).call(AnnotationEditor,t,r,360-this.parentRotation)}},{key:"parentScale",get:function get(){return this._uiManager.viewParameters.realScale}},{key:"parentRotation",get:function get(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}},{key:"parentDimensions",get:function get(){var t=this.parentScale,r=_slicedToArray(this.pageDimensions,2),i=r[0]*t,a=r[1]*t;return o.FeatureTest.isCSSRoundSupported?[Math.round(i),Math.round(a)]:[i,a]}},{key:"setDims",value:function setDims(t,r){var i=_slicedToArray(this.parentDimensions,2),a=i[0],o=i[1];this.div.style.width="".concat((100*t/a).toFixed(2),"%");_classPrivateFieldGet(this,l)||(this.div.style.height="".concat((100*r/o).toFixed(2),"%"))}},{key:"fixDims",value:function fixDims(){var t=this.div.style,r=t.height,i=t.width,a=i.endsWith("%"),o=!_classPrivateFieldGet(this,l)&&r.endsWith("%");if(!a||!o){var u=_slicedToArray(this.parentDimensions,2),c=u[0],h=u[1];a||(t.width="".concat((100*parseFloat(i)/c).toFixed(2),"%"));_classPrivateFieldGet(this,l)||o||(t.height="".concat((100*parseFloat(r)/h).toFixed(2),"%"))}}},{key:"getInitialTranslation",value:function getInitialTranslation(){return[0,0]}},{key:"render",value:function render(){this.div=document.createElement("div");this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360);this.div.className=this.name;this.div.setAttribute("id",this.id);this.div.setAttribute("tabIndex",0);this.setInForeground();this.div.addEventListener("focusin",_classPrivateFieldGet(this,c));this.div.addEventListener("focusout",_classPrivateFieldGet(this,h));var t=_slicedToArray(this.parentDimensions,2),r=t[0],i=t[1];if(this.parentRotation%180!=0){this.div.style.maxWidth="".concat((100*i/r).toFixed(2),"%");this.div.style.maxHeight="".concat((100*r/i).toFixed(2),"%")}var o=_slicedToArray(this.getInitialTranslation(),2),l=o[0],u=o[1];this.translate(l,u);(0,a.bindEvents)(this,this.div,["pointerdown"]);return this.div}},{key:"pointerdown",value:function pointerdown(t){var r=o.FeatureTest.platform.isMac;if(0!==t.button||t.ctrlKey&&r)t.preventDefault();else{_classPrivateFieldSet(this,d,!0);_classPrivateMethodGet(this,S,_setUpDragSession2).call(this,t)}}},{key:"moveInDOM",value:function moveInDOM(){this.parent.moveEditorInDOM(this)}},{key:"_setParentAndPosition",value:function _setParentAndPosition(t,r,i){t.changeParent(this);this.x=r;this.y=i;this.fixAndSetPosition();this.moveInDOM()}},{key:"getRect",value:function getRect(t,r){var i=this.parentScale,a=_slicedToArray(this.pageDimensions,2),o=a[0],l=a[1],u=_slicedToArray(this.pageTranslation,2),c=u[0],h=u[1],d=t/i,p=r/i,v=this.x*o,y=this.y*l,g=this.width*o,m=this.height*l;switch(this.rotation){case 0:return[v+d+c,l-y-p-m+h,v+d+g+c,l-y-p+h];case 90:return[v+p+c,l-y+d+h,v+p+m+c,l-y+d+g+h];case 180:return[v-d-g+c,l-y+p+h,v-d+c,l-y+p+m+h];case 270:return[v-p-m+c,l-y-d-g+h,v-p+c,l-y-d+h];default:throw new Error("Invalid rotation")}}},{key:"getRectInCurrentCoords",value:function getRectInCurrentCoords(t,r){var i=_slicedToArray(t,4),a=i[0],o=i[1],l=i[2],u=i[3],c=l-a,h=u-o;switch(this.rotation){case 0:return[a,r-u,c,h];case 90:return[a,r-o,h,c];case 180:return[l,r-o,c,h];case 270:return[l,r-u,h,c];default:throw new Error("Invalid rotation")}}},{key:"onceAdded",value:function onceAdded(){}},{key:"isEmpty",value:function isEmpty(){return!1}},{key:"enableEditMode",value:function enableEditMode(){_classPrivateFieldSet(this,v,!0)}},{key:"disableEditMode",value:function disableEditMode(){_classPrivateFieldSet(this,v,!1)}},{key:"isInEditMode",value:function isInEditMode(){return _classPrivateFieldGet(this,v)}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return!1}},{key:"needsToBeRebuilt",value:function needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}},{key:"rebuild",value:function rebuild(){var t,r;null===(t=this.div)||void 0===t||t.addEventListener("focusin",_classPrivateFieldGet(this,c));null===(r=this.div)||void 0===r||r.addEventListener("focusout",_classPrivateFieldGet(this,h))}},{key:"serialize",value:function serialize(){(0,o.unreachable)("An editor must be serializable")}},{key:"remove",value:function remove(){this.div.removeEventListener("focusin",_classPrivateFieldGet(this,c));this.div.removeEventListener("focusout",_classPrivateFieldGet(this,h));this.isEmpty()||this.commit();this.parent?this.parent.remove(this):this._uiManager.removeEditor(this)}},{key:"isResizable",get:function get(){return!1}},{key:"makeResizable",value:function makeResizable(){if(this.isResizable){_classPrivateMethodGet(this,w,_createResizers2).call(this);_classPrivateFieldGet(this,u).classList.remove("hidden")}}},{key:"select",value:function select(){var t;this.makeResizable();null===(t=this.div)||void 0===t||t.classList.add("selectedEditor")}},{key:"unselect",value:function unselect(){var t,r,i;null===(t=_classPrivateFieldGet(this,u))||void 0===t||t.classList.add("hidden");null===(r=this.div)||void 0===r||r.classList.remove("selectedEditor");null!==(i=this.div)&&void 0!==i&&i.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}},{key:"updateParams",value:function updateParams(t,r){}},{key:"disableEditing",value:function disableEditing(){}},{key:"enableEditing",value:function enableEditing(){}},{key:"enterInEditMode",value:function enterInEditMode(){}},{key:"contentDiv",get:function get(){return this.div}},{key:"isEditing",get:function get(){return _classPrivateFieldGet(this,p)},set:function set(t){_classPrivateFieldSet(this,p,t);if(this.parent)if(t){this.parent.setSelected(this);this.parent.setActiveEditor(this)}else this.parent.setActiveEditor(null)}},{key:"setAspectRatio",value:function setAspectRatio(t,r){_classPrivateFieldSet(this,l,!0);var i=t/r,a=this.div.style;a.aspectRatio=i;a.height="auto"}}],[{key:"_defaultLineColor",get:function get(){return(0,o.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}},{key:"deleteAnnotationElement",value:function deleteAnnotationElement(t){var r=new x({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});r.annotationElementId=t.annotationElementId;r.deleted=!0;r._uiManager.addToAnnotationStorage(r)}},{key:"initialize",value:function initialize(t){}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){}},{key:"defaultPropertiesToUpdate",get:function get(){return[]}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(t){return!1}},{key:"paste",value:function paste(t,r){(0,o.unreachable)("Not implemented")}},{key:"deserialize",value:function deserialize(t,r,i){var a=new this.prototype.constructor({parent:r,id:r.getNextId(),uiManager:i});a.rotation=t.rotation;var o=_slicedToArray(a.pageDimensions,2),l=o[0],u=o[1],c=_slicedToArray(a.getRectInCurrentCoords(t.rect,u),4),h=c[0],d=c[1],p=c[2],v=c[3];a.x=h/l;a.y=d/u;a.width=p/l;a.height=v/u;return a}},{key:"MIN_SIZE",get:function get(){return 16}}]);return AnnotationEditor}();r.AnnotationEditor=E;function _translate2(t,r,i){var a=_slicedToArray(t,2),o=a[0],l=a[1],u=_slicedToArray(this.screenToPageTranslation(r,i),2);r=u[0];i=u[1];this.x+=r/o;this.y+=i/l;this.fixAndSetPosition()}function _rotatePoint(t,r,i){switch(i){case 90:return[r,-t];case 180:return[-t,-r];case 270:return[-r,t];default:return[t,r]}}function _getRotationMatrix2(t){switch(t){case 90:var r=_slicedToArray(this.pageDimensions,2),i=r[0],a=r[1];return[0,-i/a,a/i,0];case 180:return[-1,0,0,-1];case 270:var o=_slicedToArray(this.pageDimensions,2),l=o[0],u=o[1];return[0,l/u,-u/l,0];default:return[1,0,0,1]}}function _noContextMenu(t){t.preventDefault()}function _createResizers2(){if(!_classPrivateFieldGet(this,u)){_classPrivateFieldSet(this,u,document.createElement("div"));_classPrivateFieldGet(this,u).classList.add("resizers");var t=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||t.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(var r=0,i=t;r<i.length;r++){var a=i[r],o=document.createElement("div");_classPrivateFieldGet(this,u).append(o);o.classList.add("resizer",a);o.addEventListener("pointerdown",_classPrivateMethodGet(this,P,_resizerPointerdown2).bind(this,a));o.addEventListener("contextmenu",_classStaticPrivateMethodGet(E,E,_noContextMenu))}this.div.prepend(_classPrivateFieldGet(this,u))}}function _resizerPointerdown2(t,r){var i=this;r.preventDefault();var a=o.FeatureTest.platform.isMac;if(!(0!==r.button||r.ctrlKey&&a)){var l=_classPrivateMethodGet(this,A,_resizerPointermove2).bind(this,t),u=this._isDraggable;this._isDraggable=!1;var c={passive:!0,capture:!0};window.addEventListener("pointermove",l,c);var h=this.x,d=this.y,p=this.width,v=this.height,y=this.parent.div.style.cursor,g=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(r.target).cursor;var m=function pointerUpCallback(){i._isDraggable=u;window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);window.removeEventListener("pointermove",l,c);i.parent.div.style.cursor=y;i.div.style.cursor=g;var t=i.x,r=i.y,a=i.width,o=i.height;t===h&&r===d&&a===p&&o===v||i.addCommands({cmd:function cmd(){i.width=a;i.height=o;i.x=t;i.y=r;var l=_slicedToArray(i.parentDimensions,2),u=l[0],c=l[1];i.setDims(u*a,c*o);i.fixAndSetPosition();i.moveInDOM()},undo:function undo(){i.width=p;i.height=v;i.x=h;i.y=d;var t=_slicedToArray(i.parentDimensions,2),r=t[0],a=t[1];i.setDims(r*p,a*v);i.fixAndSetPosition();i.moveInDOM()},mustExec:!0})};window.addEventListener("pointerup",m);window.addEventListener("blur",m)}}function _resizerPointermove2(t,r){var i,a,o=_slicedToArray(this.parentDimensions,2),l=o[0],u=o[1],c=this.x,h=this.y,d=this.width,p=this.height,v=E.MIN_SIZE/l,y=E.MIN_SIZE/u,g=function round(t){return Math.round(1e4*t)/1e4},m=_classPrivateMethodGet(this,b,_getRotationMatrix2).call(this,this.rotation),w=function transf(t,r){return[m[0]*t+m[2]*r,m[1]*t+m[3]*r]},P=_classPrivateMethodGet(this,b,_getRotationMatrix2).call(this,360-this.rotation),A=!1,S=!1;switch(t){case"topLeft":A=!0;i=function getPoint(t,r){return[0,0]};a=function getOpposite(t,r){return[t,r]};break;case"topMiddle":i=function getPoint(t,r){return[t/2,0]};a=function getOpposite(t,r){return[t/2,r]};break;case"topRight":A=!0;i=function getPoint(t,r){return[t,0]};a=function getOpposite(t,r){return[0,r]};break;case"middleRight":S=!0;i=function getPoint(t,r){return[t,r/2]};a=function getOpposite(t,r){return[0,r/2]};break;case"bottomRight":A=!0;i=function getPoint(t,r){return[t,r]};a=function getOpposite(t,r){return[0,0]};break;case"bottomMiddle":i=function getPoint(t,r){return[t/2,r]};a=function getOpposite(t,r){return[t/2,0]};break;case"bottomLeft":A=!0;i=function getPoint(t,r){return[0,r]};a=function getOpposite(t,r){return[t,0]};break;case"middleLeft":S=!0;i=function getPoint(t,r){return[0,r/2]};a=function getOpposite(t,r){return[t,r/2]}}var x=i(d,p),D=a(d,p),k=w.apply(void 0,_toConsumableArray(D)),C=g(c+k[0]),T=g(h+k[1]),I=1,O=1,M=_slicedToArray(this.screenToPageTranslation(r.movementX,r.movementY),2),L=M[0],R=M[1],G=_slicedToArray(function invTransf(t,r){return[P[0]*t+P[2]*r,P[1]*t+P[3]*r]}(L/l,R/u),2);L=G[0];R=G[1];if(A){var B=Math.hypot(d,p);I=O=Math.max(Math.min(Math.hypot(D[0]-x[0]-L,D[1]-x[1]-R)/B,1/d,1/p),v/d,y/p)}else S?I=Math.max(v,Math.min(1,Math.abs(D[0]-x[0]-L)))/d:O=Math.max(y,Math.min(1,Math.abs(D[1]-x[1]-R)))/p;var j=g(d*I),N=g(p*O),W=C-(k=w.apply(void 0,_toConsumableArray(a(j,N))))[0],V=T-k[1];this.width=j;this.height=N;this.x=W;this.y=V;this.setDims(l*j,u*N);this.fixAndSetPosition()}function _setUpDragSession2(t){var r=this;if(this._isDraggable){var i,a,l=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();if(l){i={passive:!0,capture:!0};a=function pointerMoveCallback(t){var i=_slicedToArray(r.screenToPageTranslation(t.movementX,t.movementY),2),a=i[0],o=i[1];r._uiManager.dragSelectedEditors(a,o)};window.addEventListener("pointermove",a,i)}var u=function pointerUpCallback(){window.removeEventListener("pointerup",pointerUpCallback);window.removeEventListener("blur",pointerUpCallback);l&&window.removeEventListener("pointermove",a,i);_classPrivateFieldSet(r,d,!1);if(!r._uiManager.endDragSession()){var u=o.FeatureTest.platform.isMac;t.ctrlKey&&!u||t.shiftKey||t.metaKey&&u?r.parent.toggleSelected(r):r.parent.setSelected(r)}};window.addEventListener("pointerup",u);window.addEventListener("blur",u)}}_defineProperty(E,"_colorManager",new a.ColorManager);_defineProperty(E,"_zIndex",1);var x=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(FakeEditor,t);var r=_createSuper(FakeEditor);function FakeEditor(t){var i;_classCallCheck(this,FakeEditor);(i=r.call(this,t)).annotationElementId=t.annotationElementId;i.deleted=!0;return i}_createClass(FakeEditor,[{key:"serialize",value:function serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}]);return FakeEditor}(E)},(t,r,i)=>{var a,o=i(3),l=i(95),u=i(5).f,c=i(65),h=i(107),d=i(132),p=i(16),v=i(134),y=i(36),g=l("".endsWith),m=l("".slice),b=Math.min,w=v("endsWith");o({target:"String",proto:!0,forced:!(!y&&!w&&!!(a=u(String.prototype,"endsWith"),a&&!a.writable))&&!w},{endsWith:function endsWith(t){var r=h(p(this));d(t);var i=arguments.length>1?arguments[1]:void 0,a=r.length,o=void 0===i?a:b(c(i),a),l=h(t);return g?g(r,l,o):m(r,o-l.length,o)===l}})},(t,r,i)=>{var a=i(3),o=Math.hypot,l=Math.abs,u=Math.sqrt;a({target:"Math",stat:!0,arity:2,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function hypot(t,r){for(var i,a,o=0,c=0,h=arguments.length,d=0;c<h;)if(d<(i=l(arguments[c++]))){o=o*(a=d/i)*a+1;d=i}else o+=i>0?(a=i/d)*a:i;return d===1/0?1/0:d*u(o)}})},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(92);i(104);i(292);i(300);i(301);i(85);i(90);i(112);i(306);i(307);i(308);i(309);i(2);Object.defineProperty(r,"__esModule",{value:!0});r.KeyboardManager=r.CommandManager=r.ColorManager=r.AnnotationEditorUIManager=void 0;r.bindEvents=function bindEvents(t,r,i){var a,o=_createForOfIteratorHelper(i);try{for(o.s();!(a=o.n()).done;){var l=a.value;r.addEventListener(l,t[l].bind(t))}}catch(t){o.e(t)}finally{o.f()}};r.opacityToHex=function opacityToHex(t){return Math.round(Math.min(255,Math.max(1,255*t))).toString(16).padStart(2,"0")};i(251);i(146);i(255);i(257);i(140);i(280);i(148);i(149);i(131);i(246);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(167);i(357);i(312);i(314);i(325);i(327);i(329);i(331);i(333);i(335);i(258);i(358);i(359);i(297);i(245);i(360);i(105);i(247);i(310);i(302);i(347);i(351);i(337);i(259);i(123);var a=i(1),o=i(362);function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}var l=new WeakMap,u=function(){function IdManager(){_classCallCheck(this,IdManager);_classPrivateFieldInitSpec(this,l,{writable:!0,value:0})}_createClass(IdManager,[{key:"getId",value:function getId(){var t,r;return"".concat(a.AnnotationEditorPrefix).concat((_classPrivateFieldSet(this,l,(t=_classPrivateFieldGet(this,l),r=t++,t)),r))}}]);return IdManager}(),c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakSet,v=function(){function ImageManager(){_classCallCheck(this,ImageManager);_classPrivateMethodInitSpec(this,p);_classPrivateFieldInitSpec(this,c,{writable:!0,value:(0,a.getUuid)()});_classPrivateFieldInitSpec(this,h,{writable:!0,value:0});_classPrivateFieldInitSpec(this,d,{writable:!0,value:null})}_createClass(ImageManager,[{key:"getFromFile",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i,a,o;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=t.lastModified,i=t.name,a=t.size,o=t.type;return l.abrupt("return",_classPrivateMethodGet(this,p,_get2).call(this,"".concat(r,"_").concat(i,"_").concat(a,"_").concat(o),t));case 2:case"end":return l.stop()}}),_callee,this)}))),function getFromFile(t){return i.apply(this,arguments)})},{key:"getFromUrl",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",_classPrivateMethodGet(this,p,_get2).call(this,t,t));case 1:case"end":return r.stop()}}),_callee2,this)}))),function getFromUrl(t){return r.apply(this,arguments)})},{key:"getFromId",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t){var r;return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:_classPrivateFieldGet(this,d)||_classPrivateFieldSet(this,d,new Map);if(r=_classPrivateFieldGet(this,d).get(t)){i.next=4;break}return i.abrupt("return",null);case 4:if(!r.bitmap){i.next=7;break}r.refCounter+=1;return i.abrupt("return",r);case 7:if(!r.file){i.next=9;break}return i.abrupt("return",this.getFromFile(r.file));case 9:return i.abrupt("return",this.getFromUrl(r.url));case 10:case"end":return i.stop()}}),_callee3,this)}))),function getFromId(r){return t.apply(this,arguments)})},{key:"getSvgUrl",value:function getSvgUrl(t){var r=_classPrivateFieldGet(this,d).get(t);return null!=r&&r.isSvg?r.svgUrl:null}},{key:"deleteId",value:function deleteId(t){_classPrivateFieldGet(this,d)||_classPrivateFieldSet(this,d,new Map);var r=_classPrivateFieldGet(this,d).get(t);if(r){r.refCounter-=1;0===r.refCounter&&(r.bitmap=null)}}},{key:"isValidId",value:function isValidId(t){return t.startsWith("image_".concat(_classPrivateFieldGet(this,c),"_"))}}],[{key:"_isSVGFittingCanvas",get:function get(){var t=new OffscreenCanvas(1,3).getContext("2d"),r=new Image;r.src='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';var i=r.decode().then((function(){t.drawImage(r,0,0,1,1,0,0,1,3);return 0===new Uint32Array(t.getImageData(0,0,1,1).data.buffer)[0]}));return(0,a.shadow)(this,"_isSVGFittingCanvas",i)}}]);var t,r,i;return ImageManager}();function _get2(t,r){return _get3.apply(this,arguments)}function _get3(){return(_get3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t,r){var i,a,o,l,u,p,y,g,m,b;return _regeneratorRuntime().wrap((function _callee5$(w){for(;;)switch(w.prev=w.next){case 0:_classPrivateFieldGet(this,d)||_classPrivateFieldSet(this,d,new Map);if(null!==(a=_classPrivateFieldGet(this,d).get(t))){w.next=4;break}return w.abrupt("return",null);case 4:if(null===(i=a)||void 0===i||!i.bitmap){w.next=7;break}a.refCounter+=1;return w.abrupt("return",a);case 7:w.prev=7;a||(a={bitmap:null,id:"image_".concat(_classPrivateFieldGet(this,c),"_").concat((_classPrivateFieldSet(this,h,(o=_classPrivateFieldGet(this,h),l=o++,o)),l)),refCounter:0,isSvg:!1});if("string"!=typeof r){w.next=21;break}a.url=r;w.next=13;return fetch(r);case 13:if((p=w.sent).ok){w.next=16;break}throw new Error(p.statusText);case 16:w.next=18;return p.blob();case 18:u=w.sent;w.next=22;break;case 21:u=a.file=r;case 22:if("image/svg+xml"!==u.type){w.next=32;break}y=v._isSVGFittingCanvas;g=new FileReader;m=new Image;b=new Promise((function(t,r){m.onload=function(){a.bitmap=m;a.isSvg=!0;t()};g.onload=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t;return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:t=a.svgUrl=g.result;r.next=3;return y;case 3:if(!r.sent){r.next=7;break}r.t0="".concat(t,"#svgView(preserveAspectRatio(none))");r.next=8;break;case 7:r.t0=t;case 8:m.src=r.t0;case 9:case"end":return r.stop()}}),_callee4)})));m.onerror=g.onerror=r}));g.readAsDataURL(u);w.next=30;return b;case 30:w.next=35;break;case 32:w.next=34;return createImageBitmap(u);case 34:a.bitmap=w.sent;case 35:a.refCounter=1;w.next=42;break;case 38:w.prev=38;w.t0=w.catch(7);console.error(w.t0);a=null;case 42:_classPrivateFieldGet(this,d).set(t,a);a&&_classPrivateFieldGet(this,d).set(a.id,a);return w.abrupt("return",a);case 45:case"end":return w.stop()}}),_callee5,this,[[7,38]])})))).apply(this,arguments)}var y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=function(){function CommandManager(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;_classCallCheck(this,CommandManager);_classPrivateFieldInitSpec(this,y,{writable:!0,value:[]});_classPrivateFieldInitSpec(this,g,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,m,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,b,{writable:!0,value:-1});_classPrivateFieldSet(this,m,t)}_createClass(CommandManager,[{key:"add",value:function add(t){var r=t.cmd,i=t.undo,a=t.mustExec,o=t.type,l=void 0===o?NaN:o,u=t.overwriteIfSameType,c=void 0!==u&&u,h=t.keepUndo,d=void 0!==h&&h;a&&r();if(!_classPrivateFieldGet(this,g)){var p={cmd:r,undo:i,type:l};if(-1!==_classPrivateFieldGet(this,b))if(c&&_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,b)].type===l){d&&(p.undo=_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,b)].undo);_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,b)]=p}else{var v=_classPrivateFieldGet(this,b)+1;if(v===_classPrivateFieldGet(this,m))_classPrivateFieldGet(this,y).splice(0,1);else{_classPrivateFieldSet(this,b,v);v<_classPrivateFieldGet(this,y).length&&_classPrivateFieldGet(this,y).splice(v)}_classPrivateFieldGet(this,y).push(p)}else{_classPrivateFieldGet(this,y).length>0&&(_classPrivateFieldGet(this,y).length=0);_classPrivateFieldSet(this,b,0);_classPrivateFieldGet(this,y).push(p)}}}},{key:"undo",value:function undo(){if(-1!==_classPrivateFieldGet(this,b)){_classPrivateFieldSet(this,g,!0);_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,b)].undo();_classPrivateFieldSet(this,g,!1);_classPrivateFieldSet(this,b,_classPrivateFieldGet(this,b)-1)}}},{key:"redo",value:function redo(){if(_classPrivateFieldGet(this,b)<_classPrivateFieldGet(this,y).length-1){_classPrivateFieldSet(this,b,_classPrivateFieldGet(this,b)+1);_classPrivateFieldSet(this,g,!0);_classPrivateFieldGet(this,y)[_classPrivateFieldGet(this,b)].cmd();_classPrivateFieldSet(this,g,!1)}}},{key:"hasSomethingToUndo",value:function hasSomethingToUndo(){return-1!==_classPrivateFieldGet(this,b)}},{key:"hasSomethingToRedo",value:function hasSomethingToRedo(){return _classPrivateFieldGet(this,b)<_classPrivateFieldGet(this,y).length-1}},{key:"destroy",value:function destroy(){_classPrivateFieldSet(this,y,null)}},{key:"reset",value:function reset(){_classPrivateFieldSet(this,y,[]);_classPrivateFieldSet(this,b,-1);_classPrivateFieldSet(this,g,!1)}}]);return CommandManager}();r.CommandManager=w;var P=new WeakSet,A=function(){function KeyboardManager(t){_classCallCheck(this,KeyboardManager);_classPrivateMethodInitSpec(this,P);this.buffer=[];this.callbacks=new Map;this.allKeys=new Set;var r,i=a.FeatureTest.platform.isMac,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var l,u=_slicedToArray(r.value,3),c=u[0],h=u[1],d=u[2],p=void 0===d?{}:d,v=_createForOfIteratorHelper(c);try{for(v.s();!(l=v.n()).done;){var y=l.value,g=y.startsWith("mac+");if(i&&g){this.callbacks.set(y.slice(4),{callback:h,options:p});this.allKeys.add(y.split("+").at(-1))}else if(!i&&!g){this.callbacks.set(y,{callback:h,options:p});this.allKeys.add(y.split("+").at(-1))}}}catch(t){v.e(t)}finally{v.f()}}}catch(t){o.e(t)}finally{o.f()}}_createClass(KeyboardManager,[{key:"exec",value:function exec(t,r){if(this.allKeys.has(r.key)){var i=this.callbacks.get(_classPrivateMethodGet(this,P,_serialize2).call(this,r));if(i){var a=i.callback,o=i.options,l=o.bubbles,u=void 0!==l&&l,c=o.args,h=void 0===c?[]:c,d=o.checker,p=void 0===d?null:d;if(!p||p(t,r)){a.bind.apply(a,[t].concat(_toConsumableArray(h)))();if(!u){r.stopPropagation();r.preventDefault()}}}}}}]);return KeyboardManager}();r.KeyboardManager=A;function _serialize2(t){t.altKey&&this.buffer.push("alt");t.ctrlKey&&this.buffer.push("ctrl");t.metaKey&&this.buffer.push("meta");t.shiftKey&&this.buffer.push("shift");this.buffer.push(t.key);var r=this.buffer.join("+");this.buffer.length=0;return r}var S=function(){function ColorManager(){_classCallCheck(this,ColorManager)}_createClass(ColorManager,[{key:"_colors",get:function get(){var t=new Map([["CanvasText",null],["Canvas",null]]);(0,o.getColorValues)(t);return(0,a.shadow)(this,"_colors",t)}},{key:"convert",value:function convert(t){var r=(0,o.getRGB)(t);if(!window.matchMedia("(forced-colors: active)").matches)return r;var i,a=_createForOfIteratorHelper(this._colors);try{for(a.s();!(i=a.n()).done;){var l=_slicedToArray(i.value,2),u=l[0];if(l[1].every((function(t,i){return t===r[i]})))return ColorManager._colorsMapping.get(u)}}catch(t){a.e(t)}finally{a.f()}return r}},{key:"getHexCode",value:function getHexCode(t){var r=this._colors.get(t);return r?a.Util.makeHexColor.apply(a.Util,_toConsumableArray(r)):t}}]);return ColorManager}();r.ColorManager=S;_defineProperty(S,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));var E=new WeakMap,x=new WeakMap,D=new WeakMap,k=new WeakMap,C=new WeakMap,T=new WeakMap,I=new WeakMap,O=new WeakMap,M=new WeakMap,L=new WeakMap,R=new WeakMap,G=new WeakMap,B=new WeakMap,j=new WeakMap,N=new WeakMap,W=new WeakMap,V=new WeakMap,U=new WeakMap,H=new WeakMap,z=new WeakMap,q=new WeakMap,Y=new WeakMap,K=new WeakMap,X=new WeakMap,$=new WeakMap,Q=new WeakMap,J=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,re=new WeakMap,ne=new WeakMap,ie=new WeakMap,ae=new WeakMap,oe=new WeakSet,se=new WeakSet,le=new WeakSet,ue=new WeakSet,ce=new WeakSet,he=new WeakSet,de=new WeakSet,fe=new WeakSet,pe=new WeakSet,ve=new WeakSet,ye=new WeakSet,ge=new WeakSet,me=new WeakSet,_e=function(){function AnnotationEditorUIManager(t,r,i,l,c){_classCallCheck(this,AnnotationEditorUIManager);_classPrivateMethodInitSpec(this,me);_classPrivateMethodInitSpec(this,ge);_classPrivateMethodInitSpec(this,ye);_classPrivateMethodInitSpec(this,ve);_classPrivateMethodInitSpec(this,pe);_classPrivateMethodInitSpec(this,fe);_classPrivateMethodInitSpec(this,de);_classPrivateMethodInitSpec(this,he);_classPrivateMethodInitSpec(this,ce);_classPrivateMethodInitSpec(this,ue);_classPrivateMethodInitSpec(this,le);_classPrivateMethodInitSpec(this,se);_classPrivateMethodInitSpec(this,oe);_classPrivateFieldInitSpec(this,E,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,D,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,k,{writable:!0,value:null});_classPrivateFieldInitSpec(this,C,{writable:!0,value:new w});_classPrivateFieldInitSpec(this,T,{writable:!0,value:0});_classPrivateFieldInitSpec(this,I,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,O,{writable:!0,value:null});_classPrivateFieldInitSpec(this,M,{writable:!0,value:null});_classPrivateFieldInitSpec(this,L,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,R,{writable:!0,value:null});_classPrivateFieldInitSpec(this,G,{writable:!0,value:null});_classPrivateFieldInitSpec(this,B,{writable:!0,value:new u});_classPrivateFieldInitSpec(this,j,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,N,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,W,{writable:!0,value:null});_classPrivateFieldInitSpec(this,V,{writable:!0,value:a.AnnotationEditorType.NONE});_classPrivateFieldInitSpec(this,U,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,H,{writable:!0,value:null});_classPrivateFieldInitSpec(this,z,{writable:!0,value:this.blur.bind(this)});_classPrivateFieldInitSpec(this,q,{writable:!0,value:this.focus.bind(this)});_classPrivateFieldInitSpec(this,Y,{writable:!0,value:this.copy.bind(this)});_classPrivateFieldInitSpec(this,K,{writable:!0,value:this.cut.bind(this)});_classPrivateFieldInitSpec(this,X,{writable:!0,value:this.paste.bind(this)});_classPrivateFieldInitSpec(this,$,{writable:!0,value:this.keydown.bind(this)});_classPrivateFieldInitSpec(this,Q,{writable:!0,value:this.onEditingAction.bind(this)});_classPrivateFieldInitSpec(this,J,{writable:!0,value:this.onPageChanging.bind(this)});_classPrivateFieldInitSpec(this,Z,{writable:!0,value:this.onScaleChanging.bind(this)});_classPrivateFieldInitSpec(this,ee,{writable:!0,value:this.onRotationChanging.bind(this)});_classPrivateFieldInitSpec(this,te,{writable:!0,value:{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1}});_classPrivateFieldInitSpec(this,re,{writable:!0,value:[0,0]});_classPrivateFieldInitSpec(this,ne,{writable:!0,value:null});_classPrivateFieldInitSpec(this,ie,{writable:!0,value:null});_classPrivateFieldInitSpec(this,ae,{writable:!0,value:null});_classPrivateFieldSet(this,ie,t);_classPrivateFieldSet(this,ae,r);_classPrivateFieldSet(this,R,i);_classPrivateFieldGet(this,R)._on("editingaction",_classPrivateFieldGet(this,Q));_classPrivateFieldGet(this,R)._on("pagechanging",_classPrivateFieldGet(this,J));_classPrivateFieldGet(this,R)._on("scalechanging",_classPrivateFieldGet(this,Z));_classPrivateFieldGet(this,R)._on("rotationchanging",_classPrivateFieldGet(this,ee));_classPrivateFieldSet(this,k,l.annotationStorage);_classPrivateFieldSet(this,G,l.filterFactory);_classPrivateFieldSet(this,H,c);this.viewParameters={realScale:o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}_createClass(AnnotationEditorUIManager,[{key:"destroy",value:function destroy(){_classPrivateMethodGet(this,ue,_removeKeyboardManager2).call(this);_classPrivateMethodGet(this,se,_removeFocusManager2).call(this);_classPrivateFieldGet(this,R)._off("editingaction",_classPrivateFieldGet(this,Q));_classPrivateFieldGet(this,R)._off("pagechanging",_classPrivateFieldGet(this,J));_classPrivateFieldGet(this,R)._off("scalechanging",_classPrivateFieldGet(this,Z));_classPrivateFieldGet(this,R)._off("rotationchanging",_classPrivateFieldGet(this,ee));var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,D).values());try{for(r.s();!(t=r.n()).done;){t.value.destroy()}}catch(t){r.e(t)}finally{r.f()}_classPrivateFieldGet(this,D).clear();_classPrivateFieldGet(this,x).clear();_classPrivateFieldGet(this,L).clear();_classPrivateFieldSet(this,E,null);_classPrivateFieldGet(this,U).clear();_classPrivateFieldGet(this,C).destroy()}},{key:"hcmFilter",get:function get(){return(0,a.shadow)(this,"hcmFilter",_classPrivateFieldGet(this,H)?_classPrivateFieldGet(this,G).addHCMFilter(_classPrivateFieldGet(this,H).foreground,_classPrivateFieldGet(this,H).background):"none")}},{key:"onPageChanging",value:function onPageChanging(t){var r=t.pageNumber;_classPrivateFieldSet(this,T,r-1)}},{key:"focusMainContainer",value:function focusMainContainer(){_classPrivateFieldGet(this,ie).focus()}},{key:"findParent",value:function findParent(t,r){var i,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,D).values());try{for(a.s();!(i=a.n()).done;){var o=i.value,l=o.div.getBoundingClientRect(),u=l.x,c=l.y,h=l.width,d=l.height;if(t>=u&&t<=u+h&&r>=c&&r<=c+d)return o}}catch(t){a.e(t)}finally{a.f()}return null}},{key:"disableUserSelect",value:function disableUserSelect(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_classPrivateFieldGet(this,ae).classList.toggle("noUserSelect",t)}},{key:"addShouldRescale",value:function addShouldRescale(t){_classPrivateFieldGet(this,L).add(t)}},{key:"removeShouldRescale",value:function removeShouldRescale(t){_classPrivateFieldGet(this,L).delete(t)}},{key:"onScaleChanging",value:function onScaleChanging(t){var r=t.scale;this.commitOrRemove();this.viewParameters.realScale=r*o.PixelsPerInch.PDF_TO_CSS_UNITS;var i,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,L));try{for(a.s();!(i=a.n()).done;){i.value.onScaleChanging()}}catch(t){a.e(t)}finally{a.f()}}},{key:"onRotationChanging",value:function onRotationChanging(t){var r=t.pagesRotation;this.commitOrRemove();this.viewParameters.rotation=r}},{key:"addToAnnotationStorage",value:function addToAnnotationStorage(t){t.isEmpty()||!_classPrivateFieldGet(this,k)||_classPrivateFieldGet(this,k).has(t.id)||_classPrivateFieldGet(this,k).setValue(t.id,t)}},{key:"blur",value:function blur(){if(this.hasSelection){var t,r=document.activeElement,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.div.contains(r)){_classPrivateFieldSet(this,W,[a,r]);a._focusEventsAllowed=!1;break}}}catch(t){i.e(t)}finally{i.f()}}}},{key:"focus",value:function focus(){if(_classPrivateFieldGet(this,W)){var t=_slicedToArray(_classPrivateFieldGet(this,W),2),r=t[0],i=t[1];_classPrivateFieldSet(this,W,null);i.addEventListener("focusin",(function(){r._focusEventsAllowed=!0}),{once:!0});i.focus()}}},{key:"copy",value:function copy(t){var r;t.preventDefault();null===(r=_classPrivateFieldGet(this,E))||void 0===r||r.commitOrRemove();if(this.hasSelection){var i,a=[],o=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(o.s();!(i=o.n()).done;){var l=i.value.serialize(!0);l&&a.push(l)}}catch(t){o.e(t)}finally{o.f()}0!==a.length&&t.clipboardData.setData("application/pdfjs",JSON.stringify(a))}}},{key:"cut",value:function cut(t){this.copy(t);this.delete()}},{key:"paste",value:function paste(t){t.preventDefault();var r,i=t.clipboardData,a=_createForOfIteratorHelper(i.items);try{for(a.s();!(r=a.n()).done;){var o,l=r.value,u=_createForOfIteratorHelper(_classPrivateFieldGet(this,M));try{for(u.s();!(o=u.n()).done;){var c=o.value;if(c.isHandlingMimeForPasting(l.type)){c.paste(l,this.currentLayer);return}}}catch(t){u.e(t)}finally{u.f()}}}catch(t){a.e(t)}finally{a.f()}var h=i.getData("application/pdfjs");this.addSerializedEditor(h)}},{key:"addSerializedEditor",value:function addSerializedEditor(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t){try{"string"==typeof t&&(t=JSON.parse(t))}catch(t){(0,a.warn)('paste: "'.concat(t.message,'".'));return}if(Array.isArray(t)){var u=_classPrivateFieldGet(this,V);i&&u===a.AnnotationEditorType.NONE&&this.updateMode(a.AnnotationEditorType.FREETEXT);this.unselectAll();try{var c,h=[],d=_createForOfIteratorHelper(t);try{for(d.s();!(c=d.n()).done;){var p=c.value,v=void 0===p.pageIndex,y=(l||v?this.currentLayer:this.getLayer(p.pageIndex)).deserialize(p);if(!y)return;y.doNotMove=o;h.push(y)}}catch(t){d.e(t)}finally{d.f()}this.addCommands({cmd:function cmd(){for(var t=0,i=h;t<i.length;t++){var a=i[t];_classPrivateMethodGet(r,ye,_addEditorToLayer2).call(r,a)}_classPrivateMethodGet(r,me,_selectEditors2).call(r,h)},undo:function undo(){for(var t=0,r=h;t<r.length;t++){r[t].remove()}},mustExec:!0})}catch(t){(0,a.warn)('paste: "'.concat(t.message,'".'))}i&&u!==_classPrivateFieldGet(this,V)&&this.updateMode(u)}}}},{key:"keydown",value:function keydown(t){var r;null!==(r=this.getActive())&&void 0!==r&&r.shouldGetKeyboardEvents()||AnnotationEditorUIManager._keyboardManager.exec(this,t)}},{key:"onEditingAction",value:function onEditingAction(t){["undo","redo","delete","selectAll"].includes(t.name)&&this[t.name]()}},{key:"setEditingState",value:function setEditingState(t){if(t){_classPrivateMethodGet(this,oe,_addFocusManager2).call(this);_classPrivateMethodGet(this,le,_addKeyboardManager2).call(this);_classPrivateMethodGet(this,ce,_addCopyPasteListeners2).call(this);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{isEditing:_classPrivateFieldGet(this,V)!==a.AnnotationEditorType.NONE,isEmpty:_classPrivateMethodGet(this,ge,_isEmpty2).call(this),hasSomethingToUndo:_classPrivateFieldGet(this,C).hasSomethingToUndo(),hasSomethingToRedo:_classPrivateFieldGet(this,C).hasSomethingToRedo(),hasSelectedEditor:!1})}else{_classPrivateMethodGet(this,se,_removeFocusManager2).call(this);_classPrivateMethodGet(this,ue,_removeKeyboardManager2).call(this);_classPrivateMethodGet(this,he,_removeCopyPasteListeners2).call(this);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{isEditing:!1});this.disableUserSelect(!1)}}},{key:"registerEditorTypes",value:function registerEditorTypes(t){if(!_classPrivateFieldGet(this,M)){_classPrivateFieldSet(this,M,t);var r,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,M));try{for(i.s();!(r=i.n()).done;){var a=r.value;_classPrivateMethodGet(this,fe,_dispatchUpdateUI2).call(this,a.defaultPropertiesToUpdate)}}catch(t){i.e(t)}finally{i.f()}}}},{key:"getId",value:function getId(){return _classPrivateFieldGet(this,B).getId()}},{key:"currentLayer",get:function get(){return _classPrivateFieldGet(this,D).get(_classPrivateFieldGet(this,T))}},{key:"getLayer",value:function getLayer(t){return _classPrivateFieldGet(this,D).get(t)}},{key:"currentPageIndex",get:function get(){return _classPrivateFieldGet(this,T)}},{key:"addLayer",value:function addLayer(t){_classPrivateFieldGet(this,D).set(t.pageIndex,t);_classPrivateFieldGet(this,j)?t.enable():t.disable()}},{key:"removeLayer",value:function removeLayer(t){_classPrivateFieldGet(this,D).delete(t.pageIndex)}},{key:"updateMode",value:function updateMode(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(_classPrivateFieldGet(this,V)!==t){_classPrivateFieldSet(this,V,t);if(t!==a.AnnotationEditorType.NONE){this.setEditingState(!0);_classPrivateMethodGet(this,pe,_enableAll2).call(this);this.unselectAll();var i,o=_createForOfIteratorHelper(_classPrivateFieldGet(this,D).values());try{for(o.s();!(i=o.n()).done;){i.value.updateMode(t)}}catch(t){o.e(t)}finally{o.f()}if(r){var l,u=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(u.s();!(l=u.n()).done;){var c=l.value;if(c.annotationElementId===r){this.setSelected(c);c.enterInEditMode();break}}}catch(t){u.e(t)}finally{u.f()}}}else{this.setEditingState(!1);_classPrivateMethodGet(this,ve,_disableAll2).call(this)}}}},{key:"updateToolbar",value:function updateToolbar(t){t!==_classPrivateFieldGet(this,V)&&_classPrivateFieldGet(this,R).dispatch("switchannotationeditormode",{source:this,mode:t})}},{key:"updateParams",value:function updateParams(t,r){if(_classPrivateFieldGet(this,M))if(t!==a.AnnotationEditorParamsType.CREATE){var i,o=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(o.s();!(i=o.n()).done;){i.value.updateParams(t,r)}}catch(t){o.e(t)}finally{o.f()}var l,u=_createForOfIteratorHelper(_classPrivateFieldGet(this,M));try{for(u.s();!(l=u.n()).done;){l.value.updateDefaultParams(t,r)}}catch(t){u.e(t)}finally{u.f()}}else this.currentLayer.addNewEditor(t)}},{key:"enableWaiting",value:function enableWaiting(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(_classPrivateFieldGet(this,N)!==t){_classPrivateFieldSet(this,N,t);var r,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,D).values());try{for(i.s();!(r=i.n()).done;){var a=r.value;t?a.disableClick():a.enableClick();a.div.classList.toggle("waiting",t)}}catch(t){i.e(t)}finally{i.f()}}}},{key:"getEditors",value:function getEditors(t){var r,i=[],a=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(a.s();!(r=a.n()).done;){var o=r.value;o.pageIndex===t&&i.push(o)}}catch(t){a.e(t)}finally{a.f()}return i}},{key:"getEditor",value:function getEditor(t){return _classPrivateFieldGet(this,x).get(t)}},{key:"addEditor",value:function addEditor(t){_classPrivateFieldGet(this,x).set(t.id,t)}},{key:"removeEditor",value:function removeEditor(t){_classPrivateFieldGet(this,x).delete(t.id);this.unselect(t);if(!t.annotationElementId||!_classPrivateFieldGet(this,I).has(t.annotationElementId)){var r;null===(r=_classPrivateFieldGet(this,k))||void 0===r||r.remove(t.id)}}},{key:"addDeletedAnnotationElement",value:function addDeletedAnnotationElement(t){_classPrivateFieldGet(this,I).add(t.annotationElementId);t.deleted=!0}},{key:"isDeletedAnnotationElement",value:function isDeletedAnnotationElement(t){return _classPrivateFieldGet(this,I).has(t)}},{key:"removeDeletedAnnotationElement",value:function removeDeletedAnnotationElement(t){_classPrivateFieldGet(this,I).delete(t.annotationElementId);t.deleted=!1}},{key:"setActiveEditor",value:function setActiveEditor(t){if(_classPrivateFieldGet(this,E)!==t){_classPrivateFieldSet(this,E,t);t&&_classPrivateMethodGet(this,fe,_dispatchUpdateUI2).call(this,t.propertiesToUpdate)}}},{key:"toggleSelected",value:function toggleSelected(t){if(_classPrivateFieldGet(this,U).has(t)){_classPrivateFieldGet(this,U).delete(t);t.unselect();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:this.hasSelection})}else{_classPrivateFieldGet(this,U).add(t);t.select();_classPrivateMethodGet(this,fe,_dispatchUpdateUI2).call(this,t.propertiesToUpdate);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}}},{key:"setSelected",value:function setSelected(t){var r,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(i.s();!(r=i.n()).done;){var a=r.value;a!==t&&a.unselect()}}catch(t){i.e(t)}finally{i.f()}_classPrivateFieldGet(this,U).clear();_classPrivateFieldGet(this,U).add(t);t.select();_classPrivateMethodGet(this,fe,_dispatchUpdateUI2).call(this,t.propertiesToUpdate);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}},{key:"isSelected",value:function isSelected(t){return _classPrivateFieldGet(this,U).has(t)}},{key:"unselect",value:function unselect(t){t.unselect();_classPrivateFieldGet(this,U).delete(t);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:this.hasSelection})}},{key:"hasSelection",get:function get(){return 0!==_classPrivateFieldGet(this,U).size}},{key:"undo",value:function undo(){_classPrivateFieldGet(this,C).undo();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:_classPrivateFieldGet(this,C).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:_classPrivateMethodGet(this,ge,_isEmpty2).call(this)})}},{key:"redo",value:function redo(){_classPrivateFieldGet(this,C).redo();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:_classPrivateFieldGet(this,C).hasSomethingToRedo(),isEmpty:_classPrivateMethodGet(this,ge,_isEmpty2).call(this)})}},{key:"addCommands",value:function addCommands(t){_classPrivateFieldGet(this,C).add(t);_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:_classPrivateMethodGet(this,ge,_isEmpty2).call(this)})}},{key:"delete",value:function _delete(){var t=this;this.commitOrRemove();if(this.hasSelection){var r=_toConsumableArray(_classPrivateFieldGet(this,U));this.addCommands({cmd:function cmd(){var t,i=_createForOfIteratorHelper(r);try{for(i.s();!(t=i.n()).done;){t.value.remove()}}catch(t){i.e(t)}finally{i.f()}},undo:function undo(){var i,a=_createForOfIteratorHelper(r);try{for(a.s();!(i=a.n()).done;){var o=i.value;_classPrivateMethodGet(t,ye,_addEditorToLayer2).call(t,o)}}catch(t){a.e(t)}finally{a.f()}},mustExec:!0})}}},{key:"commitOrRemove",value:function commitOrRemove(){var t;null===(t=_classPrivateFieldGet(this,E))||void 0===t||t.commitOrRemove()}},{key:"hasSomethingToControl",value:function hasSomethingToControl(){return _classPrivateFieldGet(this,E)||this.hasSelection}},{key:"selectAll",value:function selectAll(){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(r.s();!(t=r.n()).done;){t.value.commit()}}catch(t){r.e(t)}finally{r.f()}_classPrivateMethodGet(this,me,_selectEditors2).call(this,_classPrivateFieldGet(this,x).values())}},{key:"unselectAll",value:function unselectAll(){if(_classPrivateFieldGet(this,E))_classPrivateFieldGet(this,E).commitOrRemove();else if(this.hasSelection){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(r.s();!(t=r.n()).done;){t.value.unselect()}}catch(t){r.e(t)}finally{r.f()}_classPrivateFieldGet(this,U).clear();_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!1})}}},{key:"translateSelectedEditors",value:function translateSelectedEditors(t,r){var i=this;arguments.length>2&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove();if(this.hasSelection){_classPrivateFieldGet(this,re)[0]+=t;_classPrivateFieldGet(this,re)[1]+=r;var a=_slicedToArray(_classPrivateFieldGet(this,re),2),o=a[0],l=a[1],u=_toConsumableArray(_classPrivateFieldGet(this,U));_classPrivateFieldGet(this,ne)&&clearTimeout(_classPrivateFieldGet(this,ne));_classPrivateFieldSet(this,ne,setTimeout((function(){_classPrivateFieldSet(i,ne,null);_classPrivateFieldGet(i,re)[0]=_classPrivateFieldGet(i,re)[1]=0;i.addCommands({cmd:function cmd(){var t,r=_createForOfIteratorHelper(u);try{for(r.s();!(t=r.n()).done;){var a=t.value;_classPrivateFieldGet(i,x).has(a.id)&&a.translateInPage(o,l)}}catch(t){r.e(t)}finally{r.f()}},undo:function undo(){var t,r=_createForOfIteratorHelper(u);try{for(r.s();!(t=r.n()).done;){var a=t.value;_classPrivateFieldGet(i,x).has(a.id)&&a.translateInPage(-o,-l)}}catch(t){r.e(t)}finally{r.f()}},mustExec:!1})}),1e3));var c,h=_createForOfIteratorHelper(u);try{for(h.s();!(c=h.n()).done;){c.value.translateInPage(t,r)}}catch(t){h.e(t)}finally{h.f()}}}},{key:"setUpDragSession",value:function setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0);_classPrivateFieldSet(this,O,new Map);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,U));try{for(r.s();!(t=r.n()).done;){var i=t.value;_classPrivateFieldGet(this,O).set(i,{savedX:i.x,savedY:i.y,savedPageIndex:i.parent.pageIndex,newX:0,newY:0,newPageIndex:-1})}}catch(t){r.e(t)}finally{r.f()}}}},{key:"endDragSession",value:function endDragSession(){var t=this;if(!_classPrivateFieldGet(this,O))return!1;this.disableUserSelect(!1);var r=_classPrivateFieldGet(this,O);_classPrivateFieldSet(this,O,null);var i,a=!1,o=_createForOfIteratorHelper(r);try{for(o.s();!(i=o.n()).done;){var l=_slicedToArray(i.value,2),u=l[0],c=u.x,h=u.y,d=u.parent,p=l[1];p.newX=c;p.newY=h;p.newPageIndex=d.pageIndex;a||(a=c!==p.savedX||h!==p.savedY||d.pageIndex!==p.savedPageIndex)}}catch(t){o.e(t)}finally{o.f()}if(!a)return!1;var v=function move(r,i,a,o){if(_classPrivateFieldGet(t,x).has(r.id)){var l=_classPrivateFieldGet(t,D).get(o);if(l)r._setParentAndPosition(l,i,a);else{r.pageIndex=o;r.x=i;r.y=a}}};this.addCommands({cmd:function cmd(){var t,i=_createForOfIteratorHelper(r);try{for(i.s();!(t=i.n()).done;){var a=_slicedToArray(t.value,2),o=a[0],l=a[1],u=l.newX,c=l.newY,h=l.newPageIndex;v(o,u,c,h)}}catch(t){i.e(t)}finally{i.f()}},undo:function undo(){var t,i=_createForOfIteratorHelper(r);try{for(i.s();!(t=i.n()).done;){var a=_slicedToArray(t.value,2),o=a[0],l=a[1],u=l.savedX,c=l.savedY,h=l.savedPageIndex;v(o,u,c,h)}}catch(t){i.e(t)}finally{i.f()}},mustExec:!0});return!0}},{key:"dragSelectedEditors",value:function dragSelectedEditors(t,r){if(_classPrivateFieldGet(this,O)){var i,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,O).keys());try{for(a.s();!(i=a.n()).done;){i.value.drag(t,r)}}catch(t){a.e(t)}finally{a.f()}}}},{key:"rebuild",value:function rebuild(t){if(null===t.parent){var r=this.getLayer(t.pageIndex);if(r){r.changeParent(t);r.addOrRebuild(t)}else{this.addEditor(t);this.addToAnnotationStorage(t);t.rebuild()}}else t.parent.addOrRebuild(t)}},{key:"isActive",value:function isActive(t){return _classPrivateFieldGet(this,E)===t}},{key:"getActive",value:function getActive(){return _classPrivateFieldGet(this,E)}},{key:"getMode",value:function getMode(){return _classPrivateFieldGet(this,V)}},{key:"imageManager",get:function get(){return(0,a.shadow)(this,"imageManager",new v)}},{key:"removeEditors",value:function removeEditors(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},r=!1;_classPrivateFieldGet(this,D).forEach((function(t){return t.setCleaningUp(!0)}));_classPrivateFieldGet(this,x).forEach((function(i){if(t(i.serialize())){i.remove();r=!0}}));_classPrivateFieldGet(this,D).forEach((function(t){return t.setCleaningUp(!1)}));if(r){_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSomethingToUndo:!1,hasSomethingToRedo:!1,isEmpty:_classPrivateMethodGet(this,ge,_isEmpty2).call(this)});_classPrivateFieldGet(this,C).reset()}}}],[{key:"_keyboardManager",get:function get(){var t=AnnotationEditorUIManager.prototype,r=function arrowChecker(t){var r=document.activeElement;return r&&_classPrivateFieldGet(t,ie).contains(r)&&t.hasSomethingToControl()},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return(0,a.shadow)(this,"_keyboardManager",new A([[["ctrl+a","mac+meta+a"],t.selectAll],[["ctrl+z","mac+meta+z"],t.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-o,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[o,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-o],checker:r}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,o],checker:r}]]))}}]);return AnnotationEditorUIManager}();r.AnnotationEditorUIManager=_e;function _addFocusManager2(){window.addEventListener("focus",_classPrivateFieldGet(this,q));window.addEventListener("blur",_classPrivateFieldGet(this,z))}function _removeFocusManager2(){window.removeEventListener("focus",_classPrivateFieldGet(this,q));window.removeEventListener("blur",_classPrivateFieldGet(this,z))}function _addKeyboardManager2(){window.addEventListener("keydown",_classPrivateFieldGet(this,$),{capture:!0})}function _removeKeyboardManager2(){window.removeEventListener("keydown",_classPrivateFieldGet(this,$),{capture:!0})}function _addCopyPasteListeners2(){document.addEventListener("copy",_classPrivateFieldGet(this,Y));document.addEventListener("cut",_classPrivateFieldGet(this,K));document.addEventListener("paste",_classPrivateFieldGet(this,X))}function _removeCopyPasteListeners2(){document.removeEventListener("copy",_classPrivateFieldGet(this,Y));document.removeEventListener("cut",_classPrivateFieldGet(this,K));document.removeEventListener("paste",_classPrivateFieldGet(this,X))}function _dispatchUpdateStates2(t){var r=this;Object.entries(t).some((function(t){var i=_slicedToArray(t,2),a=i[0],o=i[1];return _classPrivateFieldGet(r,te)[a]!==o}))&&_classPrivateFieldGet(this,R).dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(_classPrivateFieldGet(this,te),t)})}function _dispatchUpdateUI2(t){_classPrivateFieldGet(this,R).dispatch("annotationeditorparamschanged",{source:this,details:t})}function _enableAll2(){if(!_classPrivateFieldGet(this,j)){_classPrivateFieldSet(this,j,!0);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,D).values());try{for(r.s();!(t=r.n()).done;){t.value.enable()}}catch(t){r.e(t)}finally{r.f()}}}function _disableAll2(){this.unselectAll();if(_classPrivateFieldGet(this,j)){_classPrivateFieldSet(this,j,!1);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,D).values());try{for(r.s();!(t=r.n()).done;){t.value.disable()}}catch(t){r.e(t)}finally{r.f()}}}function _addEditorToLayer2(t){var r=_classPrivateFieldGet(this,D).get(t.pageIndex);r?r.addOrRebuild(t):this.addEditor(t)}function _isEmpty2(){if(0===_classPrivateFieldGet(this,x).size)return!0;if(1===_classPrivateFieldGet(this,x).size){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,x).values());try{for(r.s();!(t=r.n()).done;){return t.value.isEmpty()}}catch(t){r.e(t)}finally{r.f()}}return!1}function _selectEditors2(t){_classPrivateFieldGet(this,U).clear();var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!a.isEmpty()){_classPrivateFieldGet(this,U).add(a);a.select()}}}catch(t){i.e(t)}finally{i.f()}_classPrivateMethodGet(this,de,_dispatchUpdateStates2).call(this,{hasSelectedEditor:!0})}_defineProperty(_e,"TRANSLATE_SMALL",1);_defineProperty(_e,"TRANSLATE_BIG",10)},(t,r,i)=>{var a=i(3),o=i(40),l=i(61),u=i(62),c=i(64),h=i(168),d=i(170),p=i(189),v=i(100),y=i(195),g=i(250)("splice"),m=Math.max,b=Math.min;a({target:"Array",proto:!0,forced:!g},{splice:function splice(t,r){var i,a,g,w,P,A,S=o(this),E=c(S),x=l(t,E),D=arguments.length;if(0===D)i=a=0;else if(1===D){i=0;a=E-x}else{i=D-2;a=b(m(u(r),0),E-x)}d(E+i-a);g=p(S,a);for(w=0;w<a;w++)(P=x+w)in S&&v(g,w,S[P]);g.length=a;if(i<a){for(w=x;w<E-a;w++){A=w+i;(P=w+a)in S?S[A]=S[P]:y(S,A)}for(w=E;w>E-a+i;w--)y(S,w-1)}else if(i>a)for(w=E-a;w>x;w--){A=w+i-1;(P=w+a-1)in S?S[A]=S[P]:y(S,A)}for(w=0;w<i;w++)S[w+x]=arguments[w+2];h(S,E-a+i);return g}})},(t,r,i)=>{var a=i(3),o=i(40),l=i(64),u=i(62),c=i(141);a({target:"Array",proto:!0},{at:function at(t){var r=o(this),i=l(r),a=u(t),c=a>=0?a:i+a;return c<0||c>=i?void 0:r[c]}});c("at")},(t,r,i)=>{var a=i(3),o=i(14),l=i(16),u=i(62),c=i(107),h=i(7),d=o("".charAt);a({target:"String",proto:!0,forced:h((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function at(t){var r=c(l(this)),i=r.length,a=u(t),o=a>=0?a:i+a;return o<0||o>=i?void 0:d(r,o)}})},(t,r,i)=>{var a=i(3),o=i(6),l=i(4),u=i(24),c=i(14),h=i(8),d=i(21),p=i(20),v=i(169),y=i(39),g=i(107),m=i(64),b=i(100),w=i(7),P=i(361),A=i(27),S=l.JSON,E=l.Number,x=l.SyntaxError,D=S&&S.parse,k=u("Object","keys"),C=Object.getOwnPropertyDescriptor,T=c("".charAt),I=c("".slice),O=c(/./.exec),M=c([].push),L=/^\d$/,R=/^[1-9]$/,G=/^(-|\d)$/,B=/^[\t\n\r ]$/,internalize=function(t,r,i,a){var o,l,u,c,d,g=t[r],b=a&&g===a.value,w=b&&"string"==typeof a.source?{source:a.source}:{};if(p(g)){var P=v(g),A=b?a.nodes:P?[]:{};if(P){o=A.length;u=m(g);for(c=0;c<u;c++)internalizeProperty(g,c,internalize(g,""+c,i,c<o?A[c]:void 0))}else{l=k(g);u=m(l);for(c=0;c<u;c++){d=l[c];internalizeProperty(g,d,internalize(g,d,i,y(A,d)?A[d]:void 0))}}}return h(i,t,r,g,w)},internalizeProperty=function(t,r,i){if(o){var a=C(t,r);if(a&&!a.configurable)return}void 0===i?delete t[r]:b(t,r,i)},Node=function(t,r,i,a){this.value=t;this.end=r;this.source=i;this.nodes=a},Context=function(t,r){this.source=t;this.index=r};Context.prototype={fork:function(t){return new Context(this.source,t)},parse:function(){var t=this.source,r=this.skip(B,this.index),i=this.fork(r),a=T(t,r);if(O(G,a))return i.number();switch(a){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw x('Unexpected character: "'+a+'" at: '+r)},node:function(t,r,i,a,o){return new Node(r,a,t?null:I(this.source,i,a),o)},object:function(){for(var t=this.source,r=this.index+1,i=!1,a={},o={};r<t.length;){r=this.until(['"',"}"],r);if("}"===T(t,r)&&!i){r++;break}var l=this.fork(r).string(),u=l.value;r=l.end;r=this.until([":"],r)+1;r=this.skip(B,r);l=this.fork(r).parse();b(o,u,l);b(a,u,l.value);r=this.until([",","}"],l.end);var c=T(t,r);if(","===c){i=!0;r++}else if("}"===c){r++;break}}return this.node(1,a,this.index,r,o)},array:function(){for(var t=this.source,r=this.index+1,i=!1,a=[],o=[];r<t.length;){r=this.skip(B,r);if("]"===T(t,r)&&!i){r++;break}var l=this.fork(r).parse();M(o,l);M(a,l.value);r=this.until([",","]"],l.end);if(","===T(t,r)){i=!0;r++}else if("]"===T(t,r)){r++;break}}return this.node(1,a,this.index,r,o)},string:function(){var t=this.index,r=P(this.source,this.index+1);return this.node(0,r.value,t,r.end)},number:function(){var t=this.source,r=this.index,i=r;"-"===T(t,i)&&i++;if("0"===T(t,i))i++;else{if(!O(R,T(t,i)))throw x("Failed to parse number at: "+i);i=this.skip(L,++i)}"."===T(t,i)&&(i=this.skip(L,++i));if("e"===T(t,i)||"E"===T(t,i)){i++;"+"!==T(t,i)&&"-"!==T(t,i)||i++;if(i===(i=this.skip(L,i)))throw x("Failed to parse number's exponent value at: "+i)}return this.node(0,E(I(t,r,i)),r,i)},keyword:function(t){var r=""+t,i=this.index,a=i+r.length;if(I(this.source,i,a)!==r)throw x("Failed to parse value at: "+i);return this.node(0,t,i,a)},skip:function(t,r){for(var i=this.source;r<i.length&&O(t,T(i,r));r++);return r},until:function(t,r){r=this.skip(B,r);for(var i=T(this.source,r),a=0;a<t.length;a++)if(t[a]===i)return r;throw x('Unexpected character: "'+i+'" at: '+r)}};var j=w((function(){var t,r="9007199254740993";D(r,(function(r,i,a){t=a.source}));return t!==r})),N=A&&!w((function(){return 1/D("-0 \t")!=-1/0}));a({target:"JSON",stat:!0,forced:j},{parse:function parse(t,r){return N&&!d(r)?D(t):function(t,r){t=g(t);var i=new Context(t,0,""),a=i.parse(),o=a.value,l=i.skip(B,a.end);if(l<t.length)throw x('Unexpected extra character: "'+T(t,l)+'" after the parsed data at: '+l);return d(r)?internalize({"":o},"",r,a):o}(t,r)}})},(t,r,i)=>{var a=i(14),o=i(39),l=SyntaxError,u=parseInt,c=String.fromCharCode,h=a("".charAt),d=a("".slice),p=a(/./.exec),v={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},y=/^[\da-f]{4}$/i,g=/^[\u0000-\u001F]$/;t.exports=function(t,r){for(var i=!0,a="";r<t.length;){var m=h(t,r);if("\\"===m){var b=d(t,r,r+2);if(o(v,b)){a+=v[b];r+=2}else{if("\\u"!==b)throw l('Unknown escape sequence: "'+b+'"');var w=d(t,r+=2,r+4);if(!p(y,w))throw l("Bad Unicode escape at: "+r);a+=c(u(w,16));r+=4}}else{if('"'===m){i=!1;r++;break}if(p(g,m))throw l("Bad control character in string literal at: "+r);a+=m;r++}}if(i)throw l("Unterminated string at: "+r);return{value:a,end:r}}},(t,r,i)=>{i(2);i(71);i(73);i(301);i(92);i(306);i(307);i(308);i(309);i(310);Object.defineProperty(r,"__esModule",{value:!0});r.StatTimer=r.RenderingCancelledException=r.PixelsPerInch=r.PageViewport=r.PDFDateString=r.DOMStandardFontDataFactory=r.DOMSVGFactory=r.DOMFilterFactory=r.DOMCanvasFactory=r.DOMCMapReaderFactory=r.AnnotationPrefix=void 0;r.deprecated=function deprecated(t){globalThis.ngxConsole.log("Deprecated API usage: "+t)};r.getColorValues=function getColorValues(t){var r=document.createElement("span");r.style.visibility="hidden";document.body.append(r);var i,a=_createForOfIteratorHelper(t.keys());try{for(a.s();!(i=a.n()).done;){var o=i.value;r.style.color=o;var l=window.getComputedStyle(r).color;t.set(o,getRGB(l))}}catch(t){a.e(t)}finally{a.f()}r.remove()};r.getCurrentTransform=function getCurrentTransform(t){var r=t.getTransform(),i=r.a,a=r.b,o=r.c,l=r.d,u=r.e,c=r.f;return[i,a,o,l,u,c]};r.getCurrentTransformInverse=function getCurrentTransformInverse(t){var r=t.getTransform().invertSelf(),i=r.a,a=r.b,o=r.c,l=r.d,u=r.e,c=r.f;return[i,a,o,l,u,c]};r.getFilenameFromUrl=function getFilenameFromUrl(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])){var r=t.split(/[#?]/,1);t=_slicedToArray(r,1)[0]}return t.substring(t.lastIndexOf("/")+1)};r.getPdfFilenameFromUrl=function getPdfFilenameFromUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf";if(window.PDFViewerApplication.appConfig.filenameForDownload)return window.PDFViewerApplication.appConfig.filenameForDownload;if("string"!=typeof t)return r;if(isDataScheme(t)){(0,o.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.');return r}var i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,a=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t),l=i.exec(a[1])||i.exec(a[2])||i.exec(a[3]);if(l&&(l=l[0]).includes("%"))try{l=i.exec(decodeURIComponent(l))[0]}catch(t){}return l||r};r.getRGB=getRGB;r.getXfaPageViewport=function getXfaPageViewport(t,r){var i=r.scale,a=void 0===i?1:i,o=r.rotation,l=void 0===o?0:o,u=t.attributes.style,c=u.width,h=u.height,d=[0,0,parseInt(c),parseInt(h)];return new R({viewBox:d,scale:a,rotation:l})};r.isDataScheme=isDataScheme;r.isPdfFile=function isPdfFile(t){return"string"==typeof t&&/\.pdf$/i.test(t)};r.isValidFetchUrl=isValidFetchUrl;r.loadScript=function loadScript(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(i,a){var o=document.createElement("script"),l=t;"Function"===t.constructor.name&&(l=t());var u=function generateTrustedURL(t){if(window.trustedTypes){return window.trustedTypes.createPolicy("foo",{createScriptURL:function createScriptURL(t){return t}}).createScriptURL(t)}return t}(l);o.src=u;o.onload=function(t){r&&o.remove();i(t)};o.onerror=function(t){globalThis.ngxConsole.log(t);a(new Error("Cannot load script at: ".concat(o.src)))};(document.head||document.documentElement).append(o)}))};r.setLayerDimensions=function setLayerDimensions(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(r instanceof R){var l=r.rawDims,u=l.pageWidth,c=l.pageHeight,h=t.style,d=o.FeatureTest.isCSSRoundSupported,p="var(--scale-factor) * ".concat(u,"px"),v="var(--scale-factor) * ".concat(c,"px"),y=d?"round(".concat(p,", 1px)"):"calc(".concat(p,")"),g=d?"round(".concat(v,", 1px)"):"calc(".concat(v,")");if(i&&r.rotation%180!=0){h.width=g;h.height=y}else{h.width=y;h.height=g}}a&&t.setAttribute("data-main-rotation",r.rotation)};i(122);i(257);i(249);i(123);i(258);i(363);i(105);i(104);i(365);i(366);i(247);i(248);i(167);i(367);i(140);i(146);i(148);i(149);i(152);i(163);i(164);i(165);i(166);i(259);i(368);i(369);i(370);i(255);i(131);i(85);i(90);i(292);i(300);i(112);i(302);i(347);i(280);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);var a=i(371),o=i(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var l="http://www.w3.org/2000/svg";r.AnnotationPrefix="pdfjs_internal_id_";var u=_createClass((function PixelsPerInch(){_classCallCheck(this,PixelsPerInch)}));r.PixelsPerInch=u;_defineProperty(u,"CSS",96);_defineProperty(u,"PDF",72);_defineProperty(u,"PDF_TO_CSS_UNITS",u.CSS/u.PDF);var c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakMap,E=new WeakSet,x=new WeakSet,D=new WeakSet,k=new WeakSet,C=new WeakSet,T=function(t){_inherits(DOMFilterFactory,t);var r=_createSuper(DOMFilterFactory);function DOMFilterFactory(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=i.docId,o=i.ownerDocument,l=void 0===o?globalThis.document:o;_classCallCheck(this,DOMFilterFactory);_classPrivateMethodInitSpec(_assertThisInitialized(t=r.call(this)),C);_classPrivateMethodInitSpec(_assertThisInitialized(t),k);_classPrivateMethodInitSpec(_assertThisInitialized(t),D);_classPrivateMethodInitSpec(_assertThisInitialized(t),x);_classPrivateMethodInitSpec(_assertThisInitialized(t),E);_classPrivateFieldInitSpec(_assertThisInitialized(t),S,{get:_get_defs,set:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),A,{get:_get_cache,set:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),c,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),h,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),d,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),p,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),v,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),y,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),g,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),m,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),b,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),w,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(t),P,{writable:!0,value:0});_classPrivateFieldSet(_assertThisInitialized(t),d,a);_classPrivateFieldSet(_assertThisInitialized(t),p,l);return t}_createClass(DOMFilterFactory,[{key:"addFilter",value:function addFilter(t){var r,i;if(!t)return"none";var a,o,l,u,c=_classPrivateFieldGet(this,A).get(t);if(c)return c;if(1===t.length){for(var h=t[0],p=new Array(256),v=0;v<256;v++)p[v]=h[v]/255;u=a=o=l=p.join(",")}else{for(var y=_slicedToArray(t,3),g=y[0],m=y[1],b=y[2],w=new Array(256),S=new Array(256),E=new Array(256),D=0;D<256;D++){w[D]=g[D]/255;S[D]=m[D]/255;E[D]=b[D]/255}a=w.join(",");o=S.join(",");l=E.join(",");u="".concat(a).concat(o).concat(l)}if(c=_classPrivateFieldGet(this,A).get(u)){_classPrivateFieldGet(this,A).set(t,c);return c}var C="g_".concat(_classPrivateFieldGet(this,d),"_transfer_map_").concat((_classPrivateFieldSet(this,P,(r=_classPrivateFieldGet(this,P),i=r++,r)),i)),T="url(#".concat(C,")");_classPrivateFieldGet(this,A).set(t,T);_classPrivateFieldGet(this,A).set(u,T);var I=_classPrivateMethodGet(this,x,_createFilter2).call(this,C);_classPrivateMethodGet(this,k,_addTransferMapConversion2).call(this,a,o,l,I);return T}},{key:"addHCMFilter",value:function addHCMFilter(t,r){var i,a="".concat(t,"-").concat(r);if(_classPrivateFieldGet(this,y)===a)return _classPrivateFieldGet(this,g);_classPrivateFieldSet(this,y,a);_classPrivateFieldSet(this,g,"none");null===(i=_classPrivateFieldGet(this,v))||void 0===i||i.remove();if(!t||!r)return _classPrivateFieldGet(this,g);var l=_classPrivateMethodGet(this,C,_getRGB2).call(this,t);t=o.Util.makeHexColor.apply(o.Util,_toConsumableArray(l));var u=_classPrivateMethodGet(this,C,_getRGB2).call(this,r);r=o.Util.makeHexColor.apply(o.Util,_toConsumableArray(u));_classPrivateFieldGet(this,S).style.color="";if("#000000"===t&&"#ffffff"===r||t===r)return _classPrivateFieldGet(this,g);for(var c=new Array(256),h=0;h<=255;h++){var p=h/255;c[h]=p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4)}var b=c.join(","),w="g_".concat(_classPrivateFieldGet(this,d),"_hcm_filter"),P=_classPrivateFieldSet(this,m,_classPrivateMethodGet(this,x,_createFilter2).call(this,w));_classPrivateMethodGet(this,k,_addTransferMapConversion2).call(this,b,b,b,P);_classPrivateMethodGet(this,E,_addGrayConversion2).call(this,P);var A=function getSteps(t,r){for(var i=l[t]/255,a=u[t]/255,o=new Array(r+1),c=0;c<=r;c++)o[c]=i+c/r*(a-i);return o.join(",")};_classPrivateMethodGet(this,k,_addTransferMapConversion2).call(this,A(0,5),A(1,5),A(2,5),P);_classPrivateFieldSet(this,g,"url(#".concat(w,")"));return _classPrivateFieldGet(this,g)}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(t,r,i,a){var o,l="".concat(t,"-").concat(r,"-").concat(i,"-").concat(a);if(_classPrivateFieldGet(this,b)===l)return _classPrivateFieldGet(this,w);_classPrivateFieldSet(this,b,l);_classPrivateFieldSet(this,w,"none");null===(o=_classPrivateFieldGet(this,m))||void 0===o||o.remove();if(!t||!r)return _classPrivateFieldGet(this,w);var u=_slicedToArray([t,r].map(_classPrivateMethodGet(this,C,_getRGB2).bind(this)),2),c=u[0],h=u[1],p=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),v=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),y=_slicedToArray([i,a].map(_classPrivateMethodGet(this,C,_getRGB2).bind(this)),2),g=y[0],P=y[1];if(v<p){var A=[v,p,P,g];p=A[0];v=A[1];g=A[2];P=A[3]}_classPrivateFieldGet(this,S).style.color="";var D=function getSteps(t,r,i){for(var a=new Array(256),o=(v-p)/i,l=t/255,u=(r-t)/(255*i),c=0,h=0;h<=i;h++){for(var d=Math.round(p+h*o),y=l+h*u,g=c;g<=d;g++)a[g]=y;c=d+1}for(var m=c;m<256;m++)a[m]=a[c-1];return a.join(",")},T="g_".concat(_classPrivateFieldGet(this,d),"_hcm_highlight_filter"),I=_classPrivateFieldSet(this,m,_classPrivateMethodGet(this,x,_createFilter2).call(this,T));_classPrivateMethodGet(this,E,_addGrayConversion2).call(this,I);_classPrivateMethodGet(this,k,_addTransferMapConversion2).call(this,D(g[0],P[0],5),D(g[1],P[1],5),D(g[2],P[2],5),I);_classPrivateFieldSet(this,w,"url(#".concat(T,")"));return _classPrivateFieldGet(this,w)}},{key:"destroy",value:function destroy(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||!_classPrivateFieldGet(this,g)&&!_classPrivateFieldGet(this,w)){if(_classPrivateFieldGet(this,h)){_classPrivateFieldGet(this,h).parentNode.parentNode.remove();_classPrivateFieldSet(this,h,null)}if(_classPrivateFieldGet(this,c)){_classPrivateFieldGet(this,c).clear();_classPrivateFieldSet(this,c,null)}_classPrivateFieldSet(this,P,0)}}}]);return DOMFilterFactory}(a.BaseFilterFactory);r.DOMFilterFactory=T;function _get_cache(){return _classPrivateFieldGet(this,c)||_classPrivateFieldSet(this,c,new Map)}function _get_defs(){if(!_classPrivateFieldGet(this,h)){var t=_classPrivateFieldGet(this,p).createElement("div"),r=t.style;r.visibility="hidden";r.contain="strict";r.width=r.height=0;r.position="absolute";r.top=r.left=0;r.zIndex=-1;var i=_classPrivateFieldGet(this,p).createElementNS(l,"svg");i.setAttribute("width",0);i.setAttribute("height",0);_classPrivateFieldSet(this,h,_classPrivateFieldGet(this,p).createElementNS(l,"defs"));t.append(i);i.append(_classPrivateFieldGet(this,h));_classPrivateFieldGet(this,p).body.append(t)}return _classPrivateFieldGet(this,h)}function _addGrayConversion2(t){var r=_classPrivateFieldGet(this,p).createElementNS(l,"feColorMatrix");r.setAttribute("type","matrix");r.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0");t.append(r)}function _createFilter2(t){var r=_classPrivateFieldGet(this,p).createElementNS(l,"filter");r.setAttribute("color-interpolation-filters","sRGB");r.setAttribute("id",t);_classPrivateFieldGet(this,S).append(r);return r}function _appendFeFunc2(t,r,i){var a=_classPrivateFieldGet(this,p).createElementNS(l,r);a.setAttribute("type","discrete");a.setAttribute("tableValues",i);t.append(a)}function _addTransferMapConversion2(t,r,i,a){var o=_classPrivateFieldGet(this,p).createElementNS(l,"feComponentTransfer");a.append(o);_classPrivateMethodGet(this,D,_appendFeFunc2).call(this,o,"feFuncR",t);_classPrivateMethodGet(this,D,_appendFeFunc2).call(this,o,"feFuncG",r);_classPrivateMethodGet(this,D,_appendFeFunc2).call(this,o,"feFuncB",i)}function _getRGB2(t){_classPrivateFieldGet(this,S).style.color=t;return getRGB(getComputedStyle(_classPrivateFieldGet(this,S)).getPropertyValue("color"))}var I=function(t){_inherits(DOMCanvasFactory,t);var r=_createSuper(DOMCanvasFactory);function DOMCanvasFactory(){var t,i=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ownerDocument,a=void 0===i?globalThis.document:i;_classCallCheck(this,DOMCanvasFactory);(t=r.call(this))._document=a;return t}_createClass(DOMCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){var i=this._document.createElement("canvas");i.width=t;i.height=r;return i}}]);return DOMCanvasFactory}(a.BaseCanvasFactory);r.DOMCanvasFactory=I;function fetchData(t){return _fetchData.apply(this,arguments)}function _fetchData(){_fetchData=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,a=arguments;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:r=a.length>1&&void 0!==a[1]&&a[1];if(!isValidFetchUrl(t,document.baseURI)){l.next=21;break}l.next=4;return fetch(t);case 4:if((i=l.sent).ok){l.next=7;break}throw new Error(i.statusText);case 7:if(!r){l.next=15;break}l.t1=Uint8Array;l.next=11;return i.arrayBuffer();case 11:l.t2=l.sent;l.t0=new l.t1(l.t2);l.next=20;break;case 15:l.t3=o.stringToBytes;l.next=18;return i.text();case 18:l.t4=l.sent;l.t0=(0,l.t3)(l.t4);case 20:return l.abrupt("return",l.t0);case 21:return l.abrupt("return",new Promise((function(i,a){var l=new XMLHttpRequest;l.open("GET",t,!0);r&&(l.responseType="arraybuffer");l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE){if(200===l.status||0===l.status){var t;r&&l.response?t=new Uint8Array(l.response):!r&&l.responseText&&(t=(0,o.stringToBytes)(l.responseText));if(t){i(t);return}}a(new Error(l.statusText))}};l.send(null)})));case 22:case"end":return l.stop()}}),_callee)})));return _fetchData.apply(this,arguments)}var O=function(t){_inherits(DOMCMapReaderFactory,t);var r=_createSuper(DOMCMapReaderFactory);function DOMCMapReaderFactory(){_classCallCheck(this,DOMCMapReaderFactory);return r.apply(this,arguments)}_createClass(DOMCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return fetchData(t,this.isCompressed).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return DOMCMapReaderFactory}(a.BaseCMapReaderFactory);r.DOMCMapReaderFactory=O;var M=function(t){_inherits(DOMStandardFontDataFactory,t);var r=_createSuper(DOMStandardFontDataFactory);function DOMStandardFontDataFactory(){_classCallCheck(this,DOMStandardFontDataFactory);return r.apply(this,arguments)}_createClass(DOMStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return fetchData(t,!0)}}]);return DOMStandardFontDataFactory}(a.BaseStandardFontDataFactory);r.DOMStandardFontDataFactory=M;var L=function(t){_inherits(DOMSVGFactory,t);var r=_createSuper(DOMSVGFactory);function DOMSVGFactory(){_classCallCheck(this,DOMSVGFactory);return r.apply(this,arguments)}_createClass(DOMSVGFactory,[{key:"_createSVG",value:function _createSVG(t){return document.createElementNS(l,t)}}]);return DOMSVGFactory}(a.BaseSVGFactory);r.DOMSVGFactory=L;var R=function(){function PageViewport(t){var r=t.viewBox,i=t.scale,a=t.rotation,o=t.offsetX,l=void 0===o?0:o,u=t.offsetY,c=void 0===u?0:u,h=t.dontFlip,d=void 0!==h&&h;_classCallCheck(this,PageViewport);this.viewBox=r;this.scale=i;this.rotation=a;this.offsetX=l;this.offsetY=c;var p,v,y,g,m,b,w,P,A=(r[2]+r[0])/2,S=(r[3]+r[1])/2;(a%=360)<0&&(a+=360);switch(a){case 180:p=-1;v=0;y=0;g=1;break;case 90:p=0;v=1;y=1;g=0;break;case 270:p=0;v=-1;y=-1;g=0;break;case 0:p=1;v=0;y=0;g=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}if(d){y=-y;g=-g}if(0===p){m=Math.abs(S-r[1])*i+l;b=Math.abs(A-r[0])*i+c;w=(r[3]-r[1])*i;P=(r[2]-r[0])*i}else{m=Math.abs(A-r[0])*i+l;b=Math.abs(S-r[1])*i+c;w=(r[2]-r[0])*i;P=(r[3]-r[1])*i}this.transform=[p*i,v*i,y*i,g*i,m-p*i*A-y*i*S,b-v*i*A-g*i*S];this.width=w;this.height=P}_createClass(PageViewport,[{key:"rawDims",get:function get(){var t=this.viewBox;return(0,o.shadow)(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}},{key:"clone",value:function clone(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,i=void 0===r?this.scale:r,a=t.rotation,o=void 0===a?this.rotation:a,l=t.offsetX,u=void 0===l?this.offsetX:l,c=t.offsetY,h=void 0===c?this.offsetY:c,d=t.dontFlip,p=void 0!==d&&d;return new PageViewport({viewBox:this.viewBox.slice(),scale:i,rotation:o,offsetX:u,offsetY:h,dontFlip:p})}},{key:"convertToViewportPoint",value:function convertToViewportPoint(t,r){return o.Util.applyTransform([t,r],this.transform)}},{key:"convertToViewportRectangle",value:function convertToViewportRectangle(t){var r=o.Util.applyTransform([t[0],t[1]],this.transform),i=o.Util.applyTransform([t[2],t[3]],this.transform);return[r[0],r[1],i[0],i[1]]}},{key:"convertToPdfPoint",value:function convertToPdfPoint(t,r){return o.Util.applyInverseTransform([t,r],this.transform)}}]);return PageViewport}();r.PageViewport=R;var G=function(t){_inherits(RenderingCancelledException,t);var r=_createSuper(RenderingCancelledException);function RenderingCancelledException(t){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,RenderingCancelledException);(i=r.call(this,t,"RenderingCancelledException")).extraDelay=a;return i}return _createClass(RenderingCancelledException)}(o.BaseException);r.RenderingCancelledException=G;function isDataScheme(t){for(var r=t.length,i=0;i<r&&""===t[i].trim();)i++;return"data:"===t.substring(i,i+5).toLowerCase()}var B,j=function(){function StatTimer(){_classCallCheck(this,StatTimer);_defineProperty(this,"started",Object.create(null));_defineProperty(this,"times",[])}_createClass(StatTimer,[{key:"time",value:function time(t){t in this.started&&(0,o.warn)("Timer is already running for ".concat(t));this.started[t]=Date.now()}},{key:"timeEnd",value:function timeEnd(t){t in this.started||(0,o.warn)("Timer has not been started for ".concat(t));this.times.push({name:t,start:this.started[t],end:Date.now()});delete this.started[t]}},{key:"toString",value:function toString(){var t,r=[],i=0,a=_createForOfIteratorHelper(this.times);try{for(a.s();!(t=a.n()).done;){var o=t.value.name;i=Math.max(o.length,i)}}catch(t){a.e(t)}finally{a.f()}var l,u=_createForOfIteratorHelper(this.times);try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c.name,d=c.start,p=c.end;r.push("".concat(h.padEnd(i)," ").concat(p-d,"ms\n"))}}catch(t){u.e(t)}finally{u.f()}return r.join("")}}]);return StatTimer}();r.StatTimer=j;function isValidFetchUrl(t,r){try{var i=(r?new URL(t,r):new URL(t)).protocol;return"http:"===i||"https:"===i||"capacitor:"===i}catch(t){return!1}}var N=function(){function PDFDateString(){_classCallCheck(this,PDFDateString)}_createClass(PDFDateString,null,[{key:"toDateObject",value:function toDateObject(t){if(!t||"string"!=typeof t)return null;B||(B=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var r=B.exec(t);if(!r)return null;var i=parseInt(r[1],10),a=parseInt(r[2],10);a=a>=1&&a<=12?a-1:0;var o=parseInt(r[3],10);o=o>=1&&o<=31?o:1;var l=parseInt(r[4],10);l=l>=0&&l<=23?l:0;var u=parseInt(r[5],10);u=u>=0&&u<=59?u:0;var c=parseInt(r[6],10);c=c>=0&&c<=59?c:0;var h=r[7]||"Z",d=parseInt(r[8],10);d=d>=0&&d<=23?d:0;var p=parseInt(r[9],10)||0;p=p>=0&&p<=59?p:0;if("-"===h){l+=d;u+=p}else if("+"===h){l-=d;u-=p}return new Date(Date.UTC(i,a,o,l,u,c))}}]);return PDFDateString}();r.PDFDateString=N;function getRGB(t){if(t.startsWith("#")){var r=parseInt(t.slice(1),16);return[(16711680&r)>>16,(65280&r)>>8,255&r]}if(t.startsWith("rgb("))return t.slice(4,-1).split(",").map((function(t){return parseInt(t)}));if(t.startsWith("rgba("))return t.slice(5,-1).split(",").map((function(t){return parseInt(t)})).slice(0,3);(0,o.warn)('Not a valid color format: "'.concat(t,'"'));return[0,0,0]}},(t,r,i)=>{var a=i(3),o=i(118).trim;a({target:"String",proto:!0,forced:i(364)("trim")},{trim:function trim(){return o(this)}})},(t,r,i)=>{var a=i(50).PROPER,o=i(7),l=i(119);t.exports=function(t){return o((function(){return!!l[t]()||"​…᠎"!=="​…᠎"[t]()||a&&l[t].name!==t}))}},(t,r,i)=>{var a=i(74),o=i(8),l=i(14),u=i(136),c=i(47),h=i(17),d=i(133),p=i(16),v=i(202),y=i(137),g=i(65),m=i(107),b=i(30),w=i(157),P=i(139),A=i(106),S=i(109),E=i(7),x=S.UNSUPPORTED_Y,D=4294967295,k=Math.min,C=[].push,T=l(/./.exec),I=l(C),O=l("".slice);u("split",(function(t,r,i){var l;l="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var l=m(p(this)),u=void 0===i?D:i>>>0;if(0===u)return[];if(void 0===t)return[l];if(!d(t))return o(r,l,t,u);for(var c,h,v,y=[],g=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),b=0,P=new RegExp(t.source,g+"g");c=o(A,P,l);){if((h=P.lastIndex)>b){I(y,O(l,b,c.index));c.length>1&&c.index<l.length&&a(C,y,w(c,1));v=c[0].length;b=h;if(y.length>=u)break}P.lastIndex===c.index&&P.lastIndex++}b===l.length?!v&&T(P,"")||I(y,""):I(y,O(l,b));return y.length>u?w(y,0,u):y}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:o(r,this,t,i)}:r;return[function split(r,i){var a=p(this),u=h(r)?void 0:b(r,t);return u?o(u,r,a,i):o(l,m(a),r,i)},function(t,a){var o=c(this),u=m(t),h=i(l,o,u,a,l!==r);if(h.done)return h.value;var d=v(o,RegExp),p=o.unicode,b=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(x?"g":"y"),w=new d(x?"^(?:"+o.source+")":o,b),A=void 0===a?D:a>>>0;if(0===A)return[];if(0===u.length)return null===P(w,u)?[u]:[];for(var S=0,E=0,C=[];E<u.length;){w.lastIndex=x?0:E;var T,M=P(w,x?O(u,E):u);if(null===M||(T=k(g(w.lastIndex+(x?E:0)),u.length))===S)E=y(u,E,p);else{I(C,O(u,S,E));if(C.length===A)return C;for(var L=1;L<=M.length-1;L++){I(C,M[L]);if(C.length===A)return C}E=S=T}}I(C,O(u,S));return C}]}),!!E((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),x)},(t,r,i)=>{var a=i(3),o=i(214);a({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},(t,r,i)=>{var a=i(3),o=i(252).end;a({target:"String",proto:!0,forced:i(254)},{padEnd:function padEnd(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(6),o=i(4),l=i(14),u=i(68),c=i(113),h=i(44),d=i(58).f,p=i(25),v=i(133),y=i(107),g=i(256),m=i(109),b=i(125),w=i(48),P=i(7),A=i(39),S=i(52).enforce,E=i(191),x=i(34),D=i(110),k=i(111),C=x("match"),T=o.RegExp,I=T.prototype,O=o.SyntaxError,M=l(I.exec),L=l("".charAt),R=l("".replace),G=l("".indexOf),B=l("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,W=/a/g,V=new T(N)!==N,U=m.MISSED_STICKY,H=m.UNSUPPORTED_Y,z=a&&(!V||U||D||k||P((function(){W[C]=!1;return T(N)!==N||T(W)===W||"/a/i"!==String(T(N,"i"))})));if(u("RegExp",z)){for(var q=function RegExp(t,r){var i,a,o,l,u,d,m=p(I,this),b=v(t),w=void 0===r,P=[],E=t;if(!m&&b&&w&&t.constructor===q)return t;if(b||p(I,t)){t=t.source;w&&(r=g(E))}t=void 0===t?"":y(t);r=void 0===r?"":y(r);E=t;D&&"dotAll"in N&&(a=!!r&&G(r,"s")>-1)&&(r=R(r,/s/g,""));i=r;U&&"sticky"in N&&(o=!!r&&G(r,"y")>-1)&&H&&(r=R(r,/y/g,""));if(k){l=function(t){for(var r,i=t.length,a=0,o="",l=[],u={},c=!1,h=!1,d=0,p="";a<=i;a++){if("\\"===(r=L(t,a)))r+=L(t,++a);else if("]"===r)c=!1;else if(!c)switch(!0){case"["===r:c=!0;break;case"("===r:if(M(j,B(t,a+1))){a+=2;h=!0}o+=r;d++;continue;case">"===r&&h:if(""===p||A(u,p))throw new O("Invalid capture group name");u[p]=!0;l[l.length]=[p,d];h=!1;p="";continue}h?p+=r:o+=r}return[o,l]}(t);t=l[0];P=l[1]}u=c(T(t,r),m?this:I,q);if(a||o||P.length){d=S(u);if(a){d.dotAll=!0;d.raw=q(function(t){for(var r,i=t.length,a=0,o="",l=!1;a<=i;a++)if("\\"!==(r=L(t,a)))if(l||"."!==r){"["===r?l=!0:"]"===r&&(l=!1);o+=r}else o+="[\\s\\S]";else o+=r+L(t,++a);return o}(t),i)}o&&(d.sticky=!0);P.length&&(d.groups=P)}if(t!==E)try{h(u,"source",""===E?"(?:)":E)}catch(t){}return u},Y=d(T),K=0;Y.length>K;)b(q,T,Y[K++]);I.constructor=q;q.prototype=I;w(o,"RegExp",q,{constructor:!0})}E("RegExp")},(t,r,i)=>{var a=i(6),o=i(110),l=i(15),u=i(121),c=i(52).get,h=RegExp.prototype,d=TypeError;a&&o&&u(h,"dotAll",{configurable:!0,get:function dotAll(){if(this!==h){if("RegExp"===l(this))return!!c(this).dotAll;throw d("Incompatible receiver, RegExp required")}}})},(t,r,i)=>{var a=i(6),o=i(109).MISSED_STICKY,l=i(15),u=i(121),c=i(52).get,h=RegExp.prototype,d=TypeError;a&&o&&u(h,"sticky",{configurable:!0,get:function sticky(){if(this!==h){if("RegExp"===l(this))return!!c(this).sticky;throw d("Incompatible receiver, RegExp required")}}})},(t,r,i)=>{i(301);i(140);i(148);i(149);i(259);i(306);i(307);i(308);i(309);i(2);i(167);i(310);i(258);Object.defineProperty(r,"__esModule",{value:!0});r.BaseStandardFontDataFactory=r.BaseSVGFactory=r.BaseFilterFactory=r.BaseCanvasFactory=r.BaseCMapReaderFactory=void 0;i(85);i(90);i(292);i(300);i(146);i(123);i(112);i(257);var a=i(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var o=function(){function BaseFilterFactory(){_classCallCheck(this,BaseFilterFactory);this.constructor===BaseFilterFactory&&(0,a.unreachable)("Cannot initialize BaseFilterFactory.")}_createClass(BaseFilterFactory,[{key:"addFilter",value:function addFilter(t){return"none"}},{key:"addHCMFilter",value:function addHCMFilter(t,r){return"none"}},{key:"addHighlightHCMFilter",value:function addHighlightHCMFilter(t,r,i,a){return"none"}},{key:"destroy",value:function destroy(){}}]);return BaseFilterFactory}();r.BaseFilterFactory=o;var l=function(){function BaseCanvasFactory(){_classCallCheck(this,BaseCanvasFactory);this.constructor===BaseCanvasFactory&&(0,a.unreachable)("Cannot initialize BaseCanvasFactory.")}_createClass(BaseCanvasFactory,[{key:"create",value:function create(t,r){if(t<=0||r<=0)throw new Error("Invalid canvas size");var i=this._createCanvas(t,r),a=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,o=i.getContext("2d",a);return{canvas:i,context:o}}},{key:"reset",value:function reset(t,r,i){if(!t.canvas)throw new Error("Canvas is not specified");if(r<=0||i<=0)throw new Error("Invalid canvas size");t.canvas.width=r;t.canvas.height=i}},{key:"destroy",value:function destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0;t.canvas.height=0;t.canvas=null;t.context=null}},{key:"_createCanvas",value:function _createCanvas(t,r){(0,a.unreachable)("Abstract method `_createCanvas` called.")}}]);return BaseCanvasFactory}();r.BaseCanvasFactory=l;var u=function(){function BaseCMapReaderFactory(t){var r=t.baseUrl,i=void 0===r?null:r,o=t.isCompressed,l=void 0===o||o;_classCallCheck(this,BaseCMapReaderFactory);this.constructor===BaseCMapReaderFactory&&(0,a.unreachable)("Cannot initialize BaseCMapReaderFactory.");this.baseUrl=i;this.isCompressed=l}_createClass(BaseCMapReaderFactory,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i,o,l=this;return _regeneratorRuntime().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:r=t.name;if(this.baseUrl){u.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){u.next=5;break}throw new Error("CMap name must be specified.");case 5:i=this.baseUrl+r+(this.isCompressed?".bcmap":"");o=this.isCompressed?a.CMapCompressionType.BINARY:a.CMapCompressionType.NONE;return u.abrupt("return",this._fetchData(i,o).catch((function(t){throw new Error("Unable to load ".concat(l.isCompressed?"binary ":"","CMap at: ").concat(i))})));case 8:case"end":return u.stop()}}),_callee,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t,r){(0,a.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseCMapReaderFactory}();r.BaseCMapReaderFactory=u;var c=function(){function BaseStandardFontDataFactory(t){var r=t.baseUrl,i=void 0===r?null:r;_classCallCheck(this,BaseStandardFontDataFactory);this.constructor===BaseStandardFontDataFactory&&(0,a.unreachable)("Cannot initialize BaseStandardFontDataFactory.");this.baseUrl=i}_createClass(BaseStandardFontDataFactory,[{key:"fetch",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i;return _regeneratorRuntime().wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:r=t.filename;if(this.baseUrl){a.next=3;break}throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');case 3:if(r){a.next=5;break}throw new Error("Font filename must be specified.");case 5:i="".concat(this.baseUrl).concat(r);return a.abrupt("return",this._fetchData(i).catch((function(t){throw new Error("Unable to load font data at: ".concat(i))})));case 7:case"end":return a.stop()}}),_callee2,this)}))),function fetch(r){return t.apply(this,arguments)})},{key:"_fetchData",value:function _fetchData(t){(0,a.unreachable)("Abstract method `_fetchData` called.")}}]);var t;return BaseStandardFontDataFactory}();r.BaseStandardFontDataFactory=c;var h=function(){function BaseSVGFactory(){_classCallCheck(this,BaseSVGFactory);this.constructor===BaseSVGFactory&&(0,a.unreachable)("Cannot initialize BaseSVGFactory.")}_createClass(BaseSVGFactory,[{key:"create",value:function create(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t<=0||r<=0)throw new Error("Invalid SVG dimensions");var a=this._createSVG("svg:svg");a.setAttribute("version","1.1");if(!i){a.setAttribute("width","".concat(t,"px"));a.setAttribute("height","".concat(r,"px"))}a.setAttribute("preserveAspectRatio","none");a.setAttribute("viewBox","0 0 ".concat(t," ").concat(r));return a}},{key:"createElement",value:function createElement(t){if("string"!=typeof t)throw new Error("Invalid SVG element type");return this._createSVG(t)}},{key:"_createSVG",value:function _createSVG(t){(0,a.unreachable)("Abstract method `_createSVG` called.")}}]);return BaseSVGFactory}();r.BaseSVGFactory=h},(t,r,i)=>{i(301);i(148);i(149);Object.defineProperty(r,"__esModule",{value:!0});r.MurmurHash3_64=void 0;i(140);i(146);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(258);i(123);i(246);i(251);i(255);i(85);i(90);i(292);i(300);i(112);var a=i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var o=3285377520,l=4294901760,u=65535,c=function(){function MurmurHash3_64(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MurmurHash3_64);this.h1=t?4294967295&t:o;this.h2=t?4294967295&t:o}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(MurmurHash3_64,[{key:"update",value:function update(t){var r,i;if("string"==typeof t){r=new Uint8Array(2*t.length);i=0;for(var o=0,c=t.length;o<c;o++){var h=t.charCodeAt(o);if(h<=255)r[i++]=h;else{r[i++]=h>>>8;r[i++]=255&h}}}else{if(!(0,a.isArrayBuffer)(t))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");i=(r=t.slice()).byteLength}for(var d=i>>2,p=i-4*d,v=new Uint32Array(r.buffer,0,d),y=0,g=0,m=this.h1,b=this.h2,w=3432918353,P=461845907,A=11601,S=13715,E=0;E<d;E++)1&E?m=5*(m=(m^=y=(y=(y=(y=v[E])*w&l|y*A&u)<<15|y>>>17)*P&l|y*S&u)<<13|m>>>19)+3864292196:b=5*(b=(b^=g=(g=(g=(g=v[E])*w&l|g*A&u)<<15|g>>>17)*P&l|g*S&u)<<13|b>>>19)+3864292196;y=0;switch(p){case 3:y^=r[4*d+2]<<16;case 2:y^=r[4*d+1]<<8;case 1:y=(y=(y=(y^=r[4*d])*w&l|y*A&u)<<15|y>>>17)*P&l|y*S&u;1&d?m^=y:b^=y}this.h1=m;this.h2=b}},{key:"hexdigest",value:function hexdigest(){var t=this.h1,r=this.h2;t=3981806797*(t^=r>>>1)&l|36045*t&u;t=444984403*(t^=(r=4283543511*r&l|(2950163797*(r<<16|t>>>16)&l)>>>16)>>>1)&l|60499*t&u;return((t^=(r=3301882366*r&l|(3120437893*(r<<16|t>>>16)&l)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(r>>>0).toString(16).padStart(8,"0")}}]);return MurmurHash3_64}();r.MurmurHash3_64=c},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(123);i(85);i(90);i(292);i(300);i(112);i(258);i(255);i(92);i(301);i(306);i(307);i(308);i(309);i(2);i(310);Object.defineProperty(r,"__esModule",{value:!0});r.FontLoader=r.FontFaceObject=void 0;i(122);i(140);i(146);i(312);i(148);i(314);i(325);i(327);i(329);i(331);i(333);i(335);i(149);i(257);i(259);i(105);i(104);i(167);i(338);i(342);i(343);i(302);var a=i(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}var o=new WeakMap,l=function(){function FontLoader(t){var r=t.ownerDocument,i=void 0===r?globalThis.document:r;t.styleElement;_classCallCheck(this,FontLoader);_classPrivateFieldInitSpec(this,o,{writable:!0,value:new Set});this._document=i;this.nativeFontFaces=new Set;this.styleElement=null;this.loadingRequests=[];this.loadTestFontId=0}_createClass(FontLoader,[{key:"addNativeFontFace",value:function addNativeFontFace(t){this.nativeFontFaces.add(t);this._document.fonts.add(t)}},{key:"removeNativeFontFace",value:function removeNativeFontFace(t){this.nativeFontFaces.delete(t);this._document.fonts.delete(t)}},{key:"insertRule",value:function insertRule(t){if(!this.styleElement){this.styleElement=this._document.createElement("style");this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement)}var r=this.styleElement.sheet;r.insertRule(t,r.cssRules.length)}},{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.nativeFontFaces);try{for(r.s();!(t=r.n()).done;){var i=t.value;this._document.fonts.delete(i)}}catch(t){r.e(t)}finally{r.f()}this.nativeFontFaces.clear();_classPrivateFieldGet(this,o).clear();if(this.styleElement){this.styleElement.remove();this.styleElement=null}}},{key:"loadSystemFont",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i,l,u;return _regeneratorRuntime().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:if(t&&!_classPrivateFieldGet(this,o).has(t.loadedName)){c.next=2;break}return c.abrupt("return");case 2:(0,a.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set.");if(!this.isFontLoadingAPISupported){c.next=18;break}r=t.loadedName,i=t.src,l=t.style;u=new FontFace(r,i,l);this.addNativeFontFace(u);c.prev=7;c.next=10;return u.load();case 10:_classPrivateFieldGet(this,o).add(r);c.next=17;break;case 13:c.prev=13;c.t0=c.catch(7);(0,a.warn)("Cannot load system font: ".concat(t.baseFontName,", installing it could help to improve PDF rendering."));this.removeNativeFontFace(u);case 17:return c.abrupt("return");case 18:(0,a.unreachable)("Not implemented: loadSystemFont without the Font Loading API.");case 19:case"end":return c.stop()}}),_callee,this,[[7,13]])}))),function loadSystemFont(t){return r.apply(this,arguments)})},{key:"bind",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,o=this;return _regeneratorRuntime().wrap((function _callee2$(l){for(;;)switch(l.prev=l.next){case 0:if(!(t.attached||t.missingFile&&!t.systemFontInfo)){l.next=2;break}return l.abrupt("return");case 2:t.attached=!0;if(!t.systemFontInfo){l.next=7;break}l.next=6;return this.loadSystemFont(t.systemFontInfo);case 6:case 21:return l.abrupt("return");case 7:if(!this.isFontLoadingAPISupported){l.next=22;break}if(!(r=t.createNativeFontFace())){l.next=21;break}this.addNativeFontFace(r);l.prev=11;l.next=14;return r.loaded;case 14:l.next=21;break;case 16:l.prev=16;l.t0=l.catch(11);(0,a.warn)("Failed to load font '".concat(r.family,"': '").concat(l.t0,"'."));t.disableFontFace=!0;throw l.t0;case 22:if(!(i=t.createFontFaceRule())){l.next=29;break}this.insertRule(i);if(!this.isSyncFontLoadingSupported){l.next=27;break}return l.abrupt("return");case 27:l.next=29;return new Promise((function(r){var i=o._queueLoadingCallback(r);o._prepareFontLoadEvent(t,i)}));case 29:case"end":return l.stop()}}),_callee2,this,[[11,16]])}))),function bind(r){return t.apply(this,arguments)})},{key:"isFontLoadingAPISupported",get:function get(){var t,r=!(null===(t=this._document)||void 0===t||!t.fonts);return(0,a.shadow)(this,"isFontLoadingAPISupported",r)}},{key:"isSyncFontLoadingSupported",get:function get(){var t=!1;(a.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0);return(0,a.shadow)(this,"isSyncFontLoadingSupported",t)}},{key:"_queueLoadingCallback",value:function _queueLoadingCallback(t){var r=this.loadingRequests,i={done:!1,complete:function completeRequest(){(0,a.assert)(!i.done,"completeRequest() cannot be called twice.");i.done=!0;for(;r.length>0&&r[0].done;){var t=r.shift();setTimeout(t.callback,0)}},callback:t};r.push(i);return i}},{key:"_loadTestFont",get:function get(){var t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,a.shadow)(this,"_loadTestFont",t)}},{key:"_prepareFontLoadEvent",value:function _prepareFontLoadEvent(t,r){function int32(t,r){return t.charCodeAt(r)<<24|t.charCodeAt(r+1)<<16|t.charCodeAt(r+2)<<8|255&t.charCodeAt(r+3)}function spliceString(t,r,i,a){return t.substring(0,r)+a+t.substring(r+i)}var i,o,l=this._document.createElement("canvas");l.width=1;l.height=1;var u=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,c=l.getContext("2d",u),h=0;var d="lt".concat(Date.now()).concat(this.loadTestFontId++),p=this._loadTestFont,v=1482184792,y=int32(p=spliceString(p,976,d.length,d),16);for(i=0,o=d.length-3;i<o;i+=4)y=y-v+int32(d,i)|0;i<d.length&&(y=y-v+int32(d+"XXX",i)|0);p=spliceString(p,16,4,(0,a.string32)(y));var g="url(data:font/opentype;base64,".concat(btoa(p),");"),m='@font-face {font-family:"'.concat(d,'";src:').concat(g,"}");this.insertRule(m);var b=this._document.createElement("div");b.style.visibility="hidden";b.style.width=b.style.height="10px";b.style.position="absolute";b.style.top=b.style.left="0px";for(var w=0,P=[t.loadedName,d];w<P.length;w++){var A=P[w],S=this._document.createElement("span");S.textContent="Hi";S.style.fontFamily=A;b.append(S)}this._document.body.append(b);!function isFontReady(t,r){if(++h>30){(0,a.warn)("Load test font never loaded.");r()}else{c.font="30px "+t;c.fillText(".",0,20);c.getImageData(0,0,1,1).data[3]>0?r():setTimeout(isFontReady.bind(null,t,r))}}(d,(function(){b.remove();r.complete()}))}}]);var t,r;return FontLoader}();r.FontLoader=l;var u=function(){function FontFaceObject(t,r){var i=r.isEvalSupported,a=void 0===i||i,o=r.disableFontFace,l=void 0!==o&&o,u=r.ignoreErrors,c=void 0!==u&&u,h=r.inspectFont,d=void 0===h?null:h;_classCallCheck(this,FontFaceObject);this.compiledGlyphs=Object.create(null);for(var p in t)this[p]=t[p];this.isEvalSupported=!1!==a;this.disableFontFace=!0===l;this.ignoreErrors=!0===c;this._inspectFont=d}_createClass(FontFaceObject,[{key:"createNativeFontFace",value:function createNativeFontFace(){var t,r;if(!this.data||this.disableFontFace)return null;if(this.cssFontInfo){var i={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(i.style="oblique ".concat(this.cssFontInfo.italicAngle,"deg"));r=new FontFace(this.cssFontInfo.fontFamily,this.data,i)}else r=new FontFace(this.loadedName,this.data,{});null===(t=this._inspectFont)||void 0===t||t.call(this,this);return r}},{key:"createFontFaceRule",value:function createFontFaceRule(){var t;if(!this.data||this.disableFontFace)return null;var r,i=(0,a.bytesToString)(this.data),o="url(data:".concat(this.mimetype,";base64,").concat(btoa(i),");");if(this.cssFontInfo){var l="font-weight: ".concat(this.cssFontInfo.fontWeight,";");this.cssFontInfo.italicAngle&&(l+="font-style: oblique ".concat(this.cssFontInfo.italicAngle,"deg;"));r='@font-face {font-family:"'.concat(this.cssFontInfo.fontFamily,'";').concat(l,"src:").concat(o,"}")}else r='@font-face {font-family:"'.concat(this.loadedName,'";src:').concat(o,"}");null===(t=this._inspectFont)||void 0===t||t.call(this,this,o);return r}},{key:"getPathGenerator",value:function getPathGenerator(t,r){if(void 0!==this.compiledGlyphs[r])return this.compiledGlyphs[r];var i;try{i=t.get(this.loadedName+"_path_"+r)}catch(t){if(!this.ignoreErrors)throw t;(0,a.warn)('getPathGenerator - ignoring character: "'.concat(t,'".'));return this.compiledGlyphs[r]=function(t,r){}}if(this.isEvalSupported&&a.FeatureTest.isEvalSupported){var o,l=[],u=_createForOfIteratorHelper(i);try{for(u.s();!(o=u.n()).done;){var c=o.value,h=void 0!==c.args?c.args.join(","):"";l.push("c.",c.cmd,"(",h,");\n")}}catch(t){u.e(t)}finally{u.f()}return this.compiledGlyphs[r]=new Function("c","size",l.join(""))}return this.compiledGlyphs[r]=function(t,r){var a,o=_createForOfIteratorHelper(i);try{for(o.s();!(a=o.n()).done;){var l=a.value;"scale"===l.cmd&&(l.args=[r,-r]);t[l.cmd].apply(t,l.args)}}catch(t){o.e(t)}finally{o.f()}}}}]);return FontFaceObject}();r.FontFaceObject=u},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(2);i(71);i(73);i(85);i(90);i(292);i(300);i(112);i(301);i(148);i(149);Object.defineProperty(r,"__esModule",{value:!0});r.NodeStandardFontDataFactory=r.NodeFilterFactory=r.NodeCanvasFactory=r.NodeCMapReaderFactory=void 0;i(122);i(146);i(259);i(123);i(140);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);var a=i(371),o=i(1);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}!function checkDOMMatrix(){if(!globalThis.DOMMatrix&&o.isNodeJS)try{globalThis.DOMMatrix=require("canvas").DOMMatrix}catch(t){(0,o.warn)('Cannot polyfill `DOMMatrix`, rendering may be broken: "'.concat(t,'".'))}}();!function checkPath2D(){if(!globalThis.Path2D&&o.isNodeJS)try{var t=require("canvas").CanvasRenderingContext2D,r=require("path2d-polyfill").polyfillPath2D;globalThis.CanvasRenderingContext2D=t;r(globalThis)}catch(t){(0,o.warn)('Cannot polyfill `Path2D`, rendering may be broken: "'.concat(t,'".'))}}();var l=function fetchData(t){return new Promise((function(r,i){require("fs").readFile(t,(function(t,a){!t&&a?r(new Uint8Array(a)):i(new Error(t))}))}))},u=function(t){_inherits(NodeFilterFactory,t);var r=_createSuper(NodeFilterFactory);function NodeFilterFactory(){_classCallCheck(this,NodeFilterFactory);return r.apply(this,arguments)}return _createClass(NodeFilterFactory)}(a.BaseFilterFactory);r.NodeFilterFactory=u;var c=function(t){_inherits(NodeCanvasFactory,t);var r=_createSuper(NodeCanvasFactory);function NodeCanvasFactory(){_classCallCheck(this,NodeCanvasFactory);return r.apply(this,arguments)}_createClass(NodeCanvasFactory,[{key:"_createCanvas",value:function _createCanvas(t,r){return require("canvas").createCanvas(t,r)}}]);return NodeCanvasFactory}(a.BaseCanvasFactory);r.NodeCanvasFactory=c;var h=function(t){_inherits(NodeCMapReaderFactory,t);var r=_createSuper(NodeCMapReaderFactory);function NodeCMapReaderFactory(){_classCallCheck(this,NodeCMapReaderFactory);return r.apply(this,arguments)}_createClass(NodeCMapReaderFactory,[{key:"_fetchData",value:function _fetchData(t,r){return l(t).then((function(t){return{cMapData:t,compressionType:r}}))}}]);return NodeCMapReaderFactory}(a.BaseCMapReaderFactory);r.NodeCMapReaderFactory=h;var d=function(t){_inherits(NodeStandardFontDataFactory,t);var r=_createSuper(NodeStandardFontDataFactory);function NodeStandardFontDataFactory(){_classCallCheck(this,NodeStandardFontDataFactory);return r.apply(this,arguments)}_createClass(NodeStandardFontDataFactory,[{key:"_fetchData",value:function _fetchData(t){return l(t)}}]);return NodeStandardFontDataFactory}(a.BaseStandardFontDataFactory);r.NodeStandardFontDataFactory=d},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(301);i(255);i(92);i(105);i(104);Object.defineProperty(r,"__esModule",{value:!0});r.CanvasGraphics=void 0;i(123);i(376);i(355);i(140);i(146);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(377);i(378);i(258);i(246);i(379);i(380);i(122);i(280);i(148);i(149);i(131);i(297);i(167);i(257);i(249);i(347);var a=i(1),o=i(362),l=i(382),u=i(383);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var c=4096,h=16;var d=function(){function CachedCanvases(t){_classCallCheck(this,CachedCanvases);this.canvasFactory=t;this.cache=Object.create(null)}_createClass(CachedCanvases,[{key:"getCanvas",value:function getCanvas(t,r,i){var a;if(void 0!==this.cache[t]){a=this.cache[t];this.canvasFactory.reset(a,r,i)}else{a=this.canvasFactory.create(r,i);this.cache[t]=a}return a}},{key:"delete",value:function _delete(t){delete this.cache[t]}},{key:"clear",value:function clear(){for(var t in this.cache){var r=this.cache[t];this.canvasFactory.destroy(r);delete this.cache[t]}}}]);return CachedCanvases}();function drawImageAtIntegerCoords(t,r,i,a,l,u,c,h,d,p){var v=_slicedToArray((0,o.getCurrentTransform)(t),6),y=v[0],g=v[1],m=v[2],b=v[3],w=v[4],P=v[5];if(0===g&&0===m){var A=c*y+w,S=Math.round(A),E=h*b+P,x=Math.round(E),D=(c+d)*y+w,k=Math.abs(Math.round(D)-S)||1,C=(h+p)*b+P,T=Math.abs(Math.round(C)-x)||1;t.setTransform(Math.sign(y),0,0,Math.sign(b),S,x);t.drawImage(r,i,a,l,u,0,0,k,T);t.setTransform(y,g,m,b,w,P);return[k,T]}if(0===y&&0===b){var I=h*m+w,O=Math.round(I),M=c*g+P,L=Math.round(M),R=(h+p)*m+w,G=Math.abs(Math.round(R)-O)||1,B=(c+d)*g+P,j=Math.abs(Math.round(B)-L)||1;t.setTransform(0,Math.sign(g),Math.sign(m),0,O,L);t.drawImage(r,i,a,l,u,0,0,j,G);t.setTransform(y,g,m,b,w,P);return[j,G]}t.drawImage(r,i,a,l,u,c,h,d,p);return[Math.hypot(y,g)*d,Math.hypot(m,b)*p]}var p=function(){function CanvasExtraState(t,r){_classCallCheck(this,CanvasExtraState);this.alphaIsShape=!1;this.fontSize=0;this.fontSizeScale=1;this.textMatrix=a.IDENTITY_MATRIX;this.textMatrixScale=1;this.fontMatrix=a.FONT_IDENTITY_MATRIX;this.leading=0;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRenderingMode=a.TextRenderingMode.FILL;this.textRise=0;this.fillColor="#000000";this.strokeColor="#000000";this.patternFill=!1;this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.activeSMask=null;this.transferMaps="none";this.startNewPathAndClipBox([0,0,t,r])}_createClass(CanvasExtraState,[{key:"clone",value:function clone(){var clone=Object.create(this);clone.clipBox=this.clipBox.slice();return clone}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}},{key:"updatePathMinMax",value:function updatePathMinMax(t,r,i){var o=_slicedToArray(a.Util.applyTransform([r,i],t),2);r=o[0];i=o[1];this.minX=Math.min(this.minX,r);this.minY=Math.min(this.minY,i);this.maxX=Math.max(this.maxX,r);this.maxY=Math.max(this.maxY,i)}},{key:"updateRectMinMax",value:function updateRectMinMax(t,r){var i=a.Util.applyTransform(r,t),o=a.Util.applyTransform(r.slice(2),t);this.minX=Math.min(this.minX,i[0],o[0]);this.minY=Math.min(this.minY,i[1],o[1]);this.maxX=Math.max(this.maxX,i[0],o[0]);this.maxY=Math.max(this.maxY,i[1],o[1])}},{key:"updateScalingPathMinMax",value:function updateScalingPathMinMax(t,r){a.Util.scaleMinMax(t,r);this.minX=Math.min(this.minX,r[0]);this.maxX=Math.max(this.maxX,r[1]);this.minY=Math.min(this.minY,r[2]);this.maxY=Math.max(this.maxY,r[3])}},{key:"updateCurvePathMinMax",value:function updateCurvePathMinMax(t,r,i,o,l,u,c,h,d,p){var v=a.Util.bezierBoundingBox(r,i,o,l,u,c,h,d);if(p){p[0]=Math.min(p[0],v[0],v[2]);p[1]=Math.max(p[1],v[0],v[2]);p[2]=Math.min(p[2],v[1],v[3]);p[3]=Math.max(p[3],v[1],v[3])}else this.updateRectMinMax(t,v)}},{key:"getPathBoundingBox",value:function getPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.PathType.FILL,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=[this.minX,this.minY,this.maxX,this.maxY];if(t===l.PathType.STROKE){r||(0,a.unreachable)("Stroke bounding box must include transform.");var o=a.Util.singularValueDecompose2dScale(r),u=o[0]*this.lineWidth/2,c=o[1]*this.lineWidth/2;i[0]-=u;i[1]-=c;i[2]+=u;i[3]+=c}return i}},{key:"updateClipFromPath",value:function updateClipFromPath(){var t=a.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}},{key:"isEmptyClip",value:function isEmptyClip(){return this.minX===1/0}},{key:"startNewPathAndClipBox",value:function startNewPathAndClipBox(t){this.clipBox=t;this.minX=1/0;this.minY=1/0;this.maxX=0;this.maxY=0}},{key:"getClippedPathBoundingBox",value:function getClippedPathBoundingBox(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.PathType.FILL,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return a.Util.intersect(this.clipBox,this.getPathBoundingBox(t,r))}}]);return CanvasExtraState}();function putBinaryImageData(t,r){if("undefined"!=typeof ImageData&&r instanceof ImageData)t.putImageData(r,0,0);else{var i,o,l,u,c,d=r.height,p=r.width,v=d%h,y=(d-v)/h,g=0===v?y:y+1,m=t.createImageData(p,h),b=0,w=r.data,P=m.data;if(r.kind===a.ImageKind.GRAYSCALE_1BPP){var A=w.byteLength,S=new Uint32Array(P.buffer,0,P.byteLength>>2),E=S.length,x=p+7>>3,D=4294967295,k=a.FeatureTest.isLittleEndian?4278190080:255;for(o=0;o<g;o++){u=o<y?h:v;i=0;for(l=0;l<u;l++){for(var C=A-b,T=0,I=C>x?p:8*C-7,O=-8&I,M=0,L=0;T<O;T+=8){L=w[b++];S[i++]=128&L?D:k;S[i++]=64&L?D:k;S[i++]=32&L?D:k;S[i++]=16&L?D:k;S[i++]=8&L?D:k;S[i++]=4&L?D:k;S[i++]=2&L?D:k;S[i++]=1&L?D:k}for(;T<I;T++){if(0===M){L=w[b++];M=128}S[i++]=L&M?D:k;M>>=1}}for(;i<E;)S[i++]=0;t.putImageData(m,0,o*h)}}else if(r.kind===a.ImageKind.RGBA_32BPP){l=0;c=p*h*4;for(o=0;o<y;o++){P.set(w.subarray(b,b+c));b+=c;t.putImageData(m,0,l);l+=h}if(o<g){c=p*v*4;P.set(w.subarray(b,b+c));t.putImageData(m,0,l)}}else{if(r.kind!==a.ImageKind.RGB_24BPP)throw new Error("bad image kind: ".concat(r.kind));c=p*(u=h);for(o=0;o<g;o++){o>=y&&(c=p*(u=v));i=0;for(l=c;l--;){P[i++]=w[b++];P[i++]=w[b++];P[i++]=w[b++];P[i++]=255}t.putImageData(m,0,o*h)}}}}function putBinaryImageMask(t,r){if(r.bitmap)t.drawImage(r.bitmap,0,0);else for(var i=r.height,a=r.width,o=i%h,l=(i-o)/h,c=0===o?l:l+1,d=t.createImageData(a,h),p=0,v=r.data,y=d.data,g=0;g<c;g++){var m=g<l?h:o;p=(0,u.convertBlackAndWhiteToRGBA)({src:v,srcPos:p,dest:y,width:a,height:m,nonBlackColor:0}).srcPos;t.putImageData(d,0,g*h)}}function copyCtxState(t,r){for(var i=0,a=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];i<a.length;i++){var o=a[i];void 0!==t[o]&&(r[o]=t[o])}if(void 0!==t.setLineDash){r.setLineDash(t.getLineDash());r.lineDashOffset=t.lineDashOffset}}function resetCtxToDefault(t){t.strokeStyle=t.fillStyle="#000000";t.fillRule="nonzero";t.globalAlpha=1;t.lineWidth=1;t.lineCap="butt";t.lineJoin="miter";t.miterLimit=10;t.globalCompositeOperation="source-over";t.font="10px sans-serif";if(void 0!==t.setLineDash){t.setLineDash([]);t.lineDashOffset=0}if(!a.isNodeJS){var r=t.filter;"none"!==r&&""!==r&&(t.filter="none")}}function composeSMaskBackdrop(t,r,i,a){for(var o=t.length,l=3;l<o;l+=4){var u=t[l];if(0===u){t[l-3]=r;t[l-2]=i;t[l-1]=a}else if(u<255){var c=255-u;t[l-3]=t[l-3]*u+r*c>>8;t[l-2]=t[l-2]*u+i*c>>8;t[l-1]=t[l-1]*u+a*c>>8}}}function composeSMaskAlpha(t,r,i){for(var a=t.length,o=3;o<a;o+=4){var l=i?i[t[o]]:t[o];r[o]=r[o]*l*.00392156862745098|0}}function composeSMaskLuminosity(t,r,i){for(var a=t.length,o=3;o<a;o+=4){var l=77*t[o-3]+152*t[o-2]+28*t[o-1];r[o]=i?r[o]*i[l>>8]>>8:r[o]*l>>16}}function composeSMask(t,r,i,a){var o=a[0],l=a[1],u=a[2]-o,c=a[3]-l;if(0!==u&&0!==c){!function genericComposeSMask(t,r,i,a,o,l,u,c,h,d,p){for(var v=!!l,y=v?l[0]:0,g=v?l[1]:0,m=v?l[2]:0,b="Luminosity"===o?composeSMaskLuminosity:composeSMaskAlpha,w=Math.min(a,Math.ceil(1048576/i)),P=0;P<a;P+=w){var A=Math.min(w,a-P),S=t.getImageData(c-d,P+(h-p),i,A),E=r.getImageData(c,P+h,i,A);v&&composeSMaskBackdrop(S.data,y,g,m);b(S.data,E.data,u);r.putImageData(E,c,P+h)}}(r.context,i,u,c,r.subtype,r.backdrop,r.transferMap,o,l,r.offsetX,r.offsetY);t.save();t.globalAlpha=1;t.globalCompositeOperation="source-over";t.setTransform(1,0,0,1,0,0);t.drawImage(i.canvas,0,0);t.restore()}}function getImageSmoothingEnabled(t,r){var i=a.Util.singularValueDecompose2dScale(t);i[0]=Math.fround(i[0]);i[1]=Math.fround(i[1]);var l=Math.fround((globalThis.devicePixelRatio||1)*o.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==r?r:i[0]<=l||i[1]<=l}var v=["butt","round","square"],y=["miter","round","bevel"],g={},m={},b=new WeakSet,w=new WeakSet,P=function(){function CanvasGraphics(t,r,i,a,o,l,u,c){var h=l.optionalContentConfig,v=l.markedContentStack,y=void 0===v?null:v;_classCallCheck(this,CanvasGraphics);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);this.ctx=t;this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height);this.stateStack=[];this.pendingClip=null;this.pendingEOFill=!1;this.res=null;this.xobjs=null;this.commonObjs=r;this.objs=i;this.canvasFactory=a;this.filterFactory=o;this.groupStack=[];this.processingType3=null;this.baseTransform=null;this.baseTransformStack=[];this.groupLevel=0;this.smaskStack=[];this.smaskCounter=0;this.tempSMask=null;this.suspendedCtx=null;this.contentVisible=!0;this.markedContentStack=y||[];this.optionalContentConfig=h;this.cachedCanvases=new d(this.canvasFactory);this.cachedPatterns=new Map;this.annotationCanvasMap=u;this.viewportScale=1;this.outputScaleX=1;this.outputScaleY=1;this.pageColors=c;this._cachedScaleForStroking=[-1,0];this._cachedGetSinglePixelWidth=null;this._cachedBitmapsMap=new Map}_createClass(CanvasGraphics,[{key:"getObject",value:function getObject(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):r}},{key:"beginDrawing",value:function beginDrawing(t){var r,i=t.transform,a=t.viewport,l=t.transparency,u=void 0!==l&&l,c=t.background,h=void 0===c?null:c,d=this.ctx.canvas.width,p=this.ctx.canvas.height,v=this.ctx.fillStyle;this.ctx.fillStyle=h||"#ffffff";this.ctx.fillRect(0,0,d,p);this.ctx.fillStyle=v;if(u){var y,g=this.cachedCanvases.getCanvas("transparent",d,p);this.compositeCtx=this.ctx;this.transparentCanvas=g.canvas;this.ctx=g.context;this.ctx.save();(y=this.ctx).transform.apply(y,_toConsumableArray((0,o.getCurrentTransform)(this.compositeCtx)))}this.ctx.save();resetCtxToDefault(this.ctx);if(i){var m;(m=this.ctx).transform.apply(m,_toConsumableArray(i));this.outputScaleX=i[0];this.outputScaleY=i[0]}(r=this.ctx).transform.apply(r,_toConsumableArray(a.transform));this.viewportScale=a.scale;this.baseTransform=(0,o.getCurrentTransform)(this.ctx)}},{key:"executeOperatorList",value:function executeOperatorList(t,r,i,o){var l=t.argsArray,u=t.fnArray,c=r||0,h=l.length;if(h===c)return c;for(var d,p=h-c>10&&"function"==typeof i,v=p?Date.now()+15:0,y=0,g=this.commonObjs,m=this.objs;;){if(void 0!==o&&c===o.nextBreakPoint){o.breakIt(c,i);return c}if((d=u[c])!==a.OPS.dependency)this[d].apply(this,l[c]);else{var b,w=_createForOfIteratorHelper(l[c]);try{for(w.s();!(b=w.n()).done;){var P=b.value,A=P.startsWith("g_")?g:m;if(!A.has(P)){A.get(P,i);return c}}}catch(t){w.e(t)}finally{w.f()}}if(++c===h)return c;if(p&&++y>10){if(Date.now()>v){i();return c}y=0}}}},{key:"endDrawing",value:function endDrawing(){_classPrivateMethodGet(this,b,_restoreInitialState2).call(this);this.cachedCanvases.clear();this.cachedPatterns.clear();var t,r=_createForOfIteratorHelper(this._cachedBitmapsMap.values());try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=_createForOfIteratorHelper(a.values());try{for(o.s();!(i=o.n()).done;){var l=i.value;"undefined"!=typeof HTMLCanvasElement&&l instanceof HTMLCanvasElement&&(l.width=l.height=0)}}catch(t){o.e(t)}finally{o.f()}a.clear()}}catch(t){r.e(t)}finally{r.f()}this._cachedBitmapsMap.clear();_classPrivateMethodGet(this,w,_drawFilter2).call(this)}},{key:"_scaleImage",value:function _scaleImage(t,r){for(var i,a,o=t.width,l=t.height,u=Math.max(Math.hypot(r[0],r[1]),1),c=Math.max(Math.hypot(r[2],r[3]),1),h=o,d=l,p="prescale1";u>2&&h>1||c>2&&d>1;){var v=h,y=d;u>2&&h>1&&(u/=h/(v=h>=16384?Math.floor(h/2)-1||1:Math.ceil(h/2)));c>2&&d>1&&(c/=d/(y=d>=16384?Math.floor(d/2)-1||1:Math.ceil(d)/2));(a=(i=this.cachedCanvases.getCanvas(p,v,y)).context).clearRect(0,0,v,y);a.drawImage(t,0,0,h,d,0,0,v,y);t=i.canvas;h=v;d=y;p="prescale1"===p?"prescale2":"prescale1"}return{img:t,paintWidth:h,paintHeight:d}}},{key:"_createMaskCanvas",value:function _createMaskCanvas(t){var r,i,u,c,h=this.ctx,d=t.width,p=t.height,v=this.current.fillColor,y=this.current.patternFill,g=(0,o.getCurrentTransform)(h);if((t.bitmap||t.data)&&t.count>1){var m=t.bitmap||t.data.buffer;i=JSON.stringify(y?g:[g.slice(0,4),v]);if(!(r=this._cachedBitmapsMap.get(m))){r=new Map;this._cachedBitmapsMap.set(m,r)}var b=r.get(i);if(b&&!y){return{canvas:b,offsetX:Math.round(Math.min(g[0],g[2])+g[4]),offsetY:Math.round(Math.min(g[1],g[3])+g[5])}}u=b}u||putBinaryImageMask((c=this.cachedCanvases.getCanvas("maskCanvas",d,p)).context,t);var w=a.Util.transform(g,[1/d,0,0,-1/p,0,0]);w=a.Util.transform(w,[1,0,0,1,0,-p]);var P=a.Util.applyTransform([0,0],w),A=a.Util.applyTransform([d,p],w),S=a.Util.normalizeRect([P[0],P[1],A[0],A[1]]),E=Math.round(S[2]-S[0])||1,x=Math.round(S[3]-S[1])||1,D=this.cachedCanvases.getCanvas("fillCanvas",E,x),k=D.context,C=Math.min(P[0],A[0]),T=Math.min(P[1],A[1]);k.translate(-C,-T);k.transform.apply(k,_toConsumableArray(w));if(!u){u=(u=this._scaleImage(c.canvas,(0,o.getCurrentTransformInverse)(k))).img;r&&y&&r.set(i,u)}k.imageSmoothingEnabled=getImageSmoothingEnabled((0,o.getCurrentTransform)(k),t.interpolate);drawImageAtIntegerCoords(k,u,0,0,u.width,u.height,0,0,d,p);k.globalCompositeOperation="source-in";var I=a.Util.transform((0,o.getCurrentTransformInverse)(k),[1,0,0,1,-C,-T]);k.fillStyle=y?v.getPattern(h,this,I,l.PathType.FILL):v;k.fillRect(0,0,d,p);if(r&&!y){this.cachedCanvases.delete("fillCanvas");r.set(i,D.canvas)}return{canvas:D.canvas,offsetX:Math.round(C),offsetY:Math.round(T)}}},{key:"setLineWidth",value:function setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1);this.current.lineWidth=t;this.ctx.lineWidth=t}},{key:"setLineCap",value:function setLineCap(t){this.ctx.lineCap=v[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.ctx.lineJoin=y[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.ctx.miterLimit=t}},{key:"setDash",value:function setDash(t,r){var i=this.ctx;if(void 0!==i.setLineDash){i.setLineDash(t);i.lineDashOffset=r}}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var a=_slicedToArray(r.value,2),o=a[0],l=a[1];switch(o){case"LW":this.setLineWidth(l);break;case"LC":this.setLineCap(l);break;case"LJ":this.setLineJoin(l);break;case"ML":this.setMiterLimit(l);break;case"D":this.setDash(l[0],l[1]);break;case"RI":this.setRenderingIntent(l);break;case"FL":this.setFlatness(l);break;case"Font":this.setFont(l[0],l[1]);break;case"CA":this.current.strokeAlpha=l;break;case"ca":this.current.fillAlpha=l;this.ctx.globalAlpha=l;break;case"BM":this.ctx.globalCompositeOperation=l;break;case"SMask":this.current.activeSMask=l?this.tempSMask:null;this.tempSMask=null;this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(l)}}}catch(t){i.e(t)}finally{i.f()}}},{key:"inSMaskMode",get:function get(){return!!this.suspendedCtx}},{key:"checkSMaskState",value:function checkSMaskState(){var t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}},{key:"beginSMaskMode",value:function beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var t=this.ctx.canvas.width,r=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(i,t,r);this.suspendedCtx=this.ctx;this.ctx=a.context;var l=this.ctx;l.setTransform.apply(l,_toConsumableArray((0,o.getCurrentTransform)(this.suspendedCtx)));copyCtxState(this.suspendedCtx,l);!function mirrorContextOperations(t,r){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save;t.__originalRestore=t.restore;t.__originalRotate=t.rotate;t.__originalScale=t.scale;t.__originalTranslate=t.translate;t.__originalTransform=t.transform;t.__originalSetTransform=t.setTransform;t.__originalResetTransform=t.resetTransform;t.__originalClip=t.clip;t.__originalMoveTo=t.moveTo;t.__originalLineTo=t.lineTo;t.__originalBezierCurveTo=t.bezierCurveTo;t.__originalRect=t.rect;t.__originalClosePath=t.closePath;t.__originalBeginPath=t.beginPath;t._removeMirroring=function(){t.save=t.__originalSave;t.restore=t.__originalRestore;t.rotate=t.__originalRotate;t.scale=t.__originalScale;t.translate=t.__originalTranslate;t.transform=t.__originalTransform;t.setTransform=t.__originalSetTransform;t.resetTransform=t.__originalResetTransform;t.clip=t.__originalClip;t.moveTo=t.__originalMoveTo;t.lineTo=t.__originalLineTo;t.bezierCurveTo=t.__originalBezierCurveTo;t.rect=t.__originalRect;t.closePath=t.__originalClosePath;t.beginPath=t.__originalBeginPath;delete t._removeMirroring};t.save=function ctxSave(){r.save();this.__originalSave()};t.restore=function ctxRestore(){r.restore();this.__originalRestore()};t.translate=function ctxTranslate(t,i){r.translate(t,i);this.__originalTranslate(t,i)};t.scale=function ctxScale(t,i){r.scale(t,i);this.__originalScale(t,i)};t.transform=function ctxTransform(t,i,a,o,l,u){r.transform(t,i,a,o,l,u);this.__originalTransform(t,i,a,o,l,u)};t.setTransform=function ctxSetTransform(t,i,a,o,l,u){r.setTransform(t,i,a,o,l,u);this.__originalSetTransform(t,i,a,o,l,u)};t.resetTransform=function ctxResetTransform(){r.resetTransform();this.__originalResetTransform()};t.rotate=function ctxRotate(t){r.rotate(t);this.__originalRotate(t)};t.clip=function ctxRotate(t){r.clip(t);this.__originalClip(t)};t.moveTo=function(t,i){r.moveTo(t,i);this.__originalMoveTo(t,i)};t.lineTo=function(t,i){r.lineTo(t,i);this.__originalLineTo(t,i)};t.bezierCurveTo=function(t,i,a,o,l,u){r.bezierCurveTo(t,i,a,o,l,u);this.__originalBezierCurveTo(t,i,a,o,l,u)};t.rect=function(t,i,a,o){r.rect(t,i,a,o);this.__originalRect(t,i,a,o)};t.closePath=function(){r.closePath();this.__originalClosePath()};t.beginPath=function(){r.beginPath();this.__originalBeginPath()}}(l,this.suspendedCtx);this.setGState([["BM","source-over"],["ca",1],["CA",1]])}},{key:"endSMaskMode",value:function endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring();copyCtxState(this.ctx,this.suspendedCtx);this.ctx=this.suspendedCtx;this.suspendedCtx=null}},{key:"compose",value:function compose(t){if(this.current.activeSMask){if(t){t[0]=Math.floor(t[0]);t[1]=Math.floor(t[1]);t[2]=Math.ceil(t[2]);t[3]=Math.ceil(t[3])}else t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var r=this.current.activeSMask;composeSMask(this.suspendedCtx,r,this.ctx,t);this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height);this.ctx.restore()}}},{key:"save",value:function save(){if(this.inSMaskMode){copyCtxState(this.ctx,this.suspendedCtx);this.suspendedCtx.save()}else this.ctx.save();var t=this.current;this.stateStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode();if(0!==this.stateStack.length){this.current=this.stateStack.pop();if(this.inSMaskMode){this.suspendedCtx.restore();copyCtxState(this.suspendedCtx,this.ctx)}else this.ctx.restore();this.checkSMaskState();this.pendingClip=null;this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}}},{key:"transform",value:function transform(t,r,i,a,o,l){this.ctx.transform(t,r,i,a,o,l);this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null}},{key:"constructPath",value:function constructPath(t,r,i){for(var l,u,c=this.ctx,h=this.current,d=h.x,p=h.y,v=(0,o.getCurrentTransform)(c),y=0===v[0]&&0===v[3]||0===v[1]&&0===v[2],g=y?i.slice(0):null,m=0,b=0,w=t.length;m<w;m++)switch(0|t[m]){case a.OPS.rectangle:d=r[b++];p=r[b++];var P=r[b++],A=r[b++],S=d+P,E=p+A;c.moveTo(d,p);if(0===P||0===A)c.lineTo(S,E);else{c.lineTo(S,p);c.lineTo(S,E);c.lineTo(d,E)}y||h.updateRectMinMax(v,[d,p,S,E]);c.closePath();break;case a.OPS.moveTo:d=r[b++];p=r[b++];c.moveTo(d,p);y||h.updatePathMinMax(v,d,p);break;case a.OPS.lineTo:d=r[b++];p=r[b++];c.lineTo(d,p);y||h.updatePathMinMax(v,d,p);break;case a.OPS.curveTo:l=d;u=p;d=r[b+4];p=r[b+5];c.bezierCurveTo(r[b],r[b+1],r[b+2],r[b+3],d,p);h.updateCurvePathMinMax(v,l,u,r[b],r[b+1],r[b+2],r[b+3],d,p,g);b+=6;break;case a.OPS.curveTo2:l=d;u=p;c.bezierCurveTo(d,p,r[b],r[b+1],r[b+2],r[b+3]);h.updateCurvePathMinMax(v,l,u,d,p,r[b],r[b+1],r[b+2],r[b+3],g);d=r[b+2];p=r[b+3];b+=4;break;case a.OPS.curveTo3:l=d;u=p;d=r[b+2];p=r[b+3];c.bezierCurveTo(r[b],r[b+1],d,p,d,p);h.updateCurvePathMinMax(v,l,u,r[b],r[b+1],d,p,d,p,g);b+=4;break;case a.OPS.closePath:c.closePath()}y&&h.updateScalingPathMinMax(v,g);h.setCurrentPoint(d,p)}},{key:"closePath",value:function closePath(){this.ctx.closePath()}},{key:"stroke",value:function stroke(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.ctx,i=this.current.strokeColor;r.globalAlpha=this.current.strokeAlpha;if(this.contentVisible)if("object"===_typeof(i)&&null!=i&&i.getPattern){r.save();r.strokeStyle=i.getPattern(r,this,(0,o.getCurrentTransformInverse)(r),l.PathType.STROKE);this.rescaleAndStroke(!1);r.restore()}else this.rescaleAndStroke(!0);t&&this.consumePath(this.current.getClippedPathBoundingBox());r.globalAlpha=this.current.fillAlpha}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"fill",value:function fill(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.ctx,i=this.current.fillColor,a=!1;if(this.current.patternFill){r.save();r.fillStyle=i.getPattern(r,this,(0,o.getCurrentTransformInverse)(r),l.PathType.FILL);a=!0}var u=this.current.getClippedPathBoundingBox();if(this.contentVisible&&null!==u)if(this.pendingEOFill){r.fill("evenodd");this.pendingEOFill=!1}else r.fill();a&&r.restore();t&&this.consumePath(u)}},{key:"eoFill",value:function eoFill(){this.pendingEOFill=!0;this.fill()}},{key:"fillStroke",value:function fillStroke(){this.fill(!1);this.stroke(!1);this.consumePath()}},{key:"eoFillStroke",value:function eoFillStroke(){this.pendingEOFill=!0;this.fillStroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.pendingEOFill=!0;this.closePath();this.fillStroke()}},{key:"endPath",value:function endPath(){this.consumePath()}},{key:"clip",value:function clip(){this.pendingClip=g}},{key:"eoClip",value:function eoClip(){this.pendingClip=m}},{key:"beginText",value:function beginText(){this.current.textMatrix=a.IDENTITY_MATRIX;this.current.textMatrixScale=1;this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"endText",value:function endText(){var t=this.pendingTextPaths,r=this.ctx;if(void 0!==t){r.save();r.beginPath();var i,a=_createForOfIteratorHelper(t);try{for(a.s();!(i=a.n()).done;){var o=i.value;r.setTransform.apply(r,_toConsumableArray(o.transform));r.translate(o.x,o.y);o.addToPath(r,o.fontSize)}}catch(t){a.e(t)}finally{a.f()}r.restore();r.clip();r.beginPath();delete this.pendingTextPaths}else r.beginPath()}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setFont",value:function setFont(t,r){var i,o=this.commonObjs.get(t),l=this.current;if(!o)throw new Error("Can't find font for ".concat(t));l.fontMatrix=o.fontMatrix||a.FONT_IDENTITY_MATRIX;0!==l.fontMatrix[0]&&0!==l.fontMatrix[3]||(0,a.warn)("Invalid font matrix for font "+t);if(r<0){r=-r;l.fontDirection=-1}else l.fontDirection=1;this.current.font=o;this.current.fontSize=r;if(!o.isType3Font){var u=o.loadedName||"sans-serif",c=(null===(i=o.systemFontInfo)||void 0===i?void 0:i.css)||'"'.concat(u,'", ').concat(o.fallbackName),h="normal";o.black?h="900":o.bold&&(h="bold");var d=o.italic?"italic":"normal",p=r;r<16?p=16:r>100&&(p=100);this.current.fontSizeScale=r/p;this.ctx.font="".concat(d," ").concat(h," ").concat(p,"px ").concat(c)}}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"moveText",value:function moveText(t,r){this.current.x=this.current.lineX+=t;this.current.y=this.current.lineY+=r}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,i,a,o,l){this.current.textMatrix=[t,r,i,a,o,l];this.current.textMatrixScale=Math.hypot(t,r);this.current.x=this.current.lineX=0;this.current.y=this.current.lineY=0}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"paintChar",value:function paintChar(t,r,i,l){var u,c=this.ctx,h=this.current,d=h.font,p=h.textRenderingMode,v=h.fontSize/h.fontSizeScale,y=p&a.TextRenderingMode.FILL_STROKE_MASK,g=!!(p&a.TextRenderingMode.ADD_TO_PATH_FLAG),m=h.patternFill&&!d.missingFile;(d.disableFontFace||g||m)&&(u=d.getPathGenerator(this.commonObjs,t));if(d.disableFontFace||m){c.save();c.translate(r,i);c.beginPath();u(c,v);l&&c.setTransform.apply(c,_toConsumableArray(l));y!==a.TextRenderingMode.FILL&&y!==a.TextRenderingMode.FILL_STROKE||c.fill();y!==a.TextRenderingMode.STROKE&&y!==a.TextRenderingMode.FILL_STROKE||c.stroke();c.restore()}else{y!==a.TextRenderingMode.FILL&&y!==a.TextRenderingMode.FILL_STROKE||c.fillText(t,r,i);y!==a.TextRenderingMode.STROKE&&y!==a.TextRenderingMode.FILL_STROKE||c.strokeText(t,r,i)}if(g){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,o.getCurrentTransform)(c),x:r,y:i,fontSize:v,addToPath:u})}}},{key:"isFontSubpixelAAEnabled",get:function get(){var t=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10).context;t.scale(1.5,1);t.fillText("I",0,10);for(var r=t.getImageData(0,0,10,10).data,i=!1,o=3;o<r.length;o+=4)if(r[o]>0&&r[o]<255){i=!0;break}return(0,a.shadow)(this,"isFontSubpixelAAEnabled",i)}},{key:"showText",value:function showText(t){var r=this.current,i=r.font;if(i.isType3Font)return this.showType3Text(t);var u=r.fontSize;if(0!==u){var c,h=this.ctx,d=r.fontSizeScale,p=r.charSpacing,v=r.wordSpacing,y=r.fontDirection,g=r.textHScale*y,m=t.length,b=i.vertical,w=b?1:-1,P=i.defaultVMetrics,A=u*r.fontMatrix[0],S=r.textRenderingMode===a.TextRenderingMode.FILL&&!i.disableFontFace&&!r.patternFill;h.save();h.transform.apply(h,_toConsumableArray(r.textMatrix));h.translate(r.x,r.y+r.textRise);y>0?h.scale(g,-1):h.scale(g,1);if(r.patternFill){h.save();var E=r.fillColor.getPattern(h,this,(0,o.getCurrentTransformInverse)(h),l.PathType.FILL);c=(0,o.getCurrentTransform)(h);h.restore();h.fillStyle=E}var x=r.lineWidth,D=r.textMatrixScale;if(0===D||0===x){var k=r.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;k!==a.TextRenderingMode.STROKE&&k!==a.TextRenderingMode.FILL_STROKE||(x=this.getSinglePixelWidth())}else x/=D;if(1!==d){h.scale(d,d);x/=d}h.lineWidth=x;if(i.isInvalidPDFjsFont){var C,T=[],I=0,O=_createForOfIteratorHelper(t);try{for(O.s();!(C=O.n()).done;){var M=C.value;T.push(M.unicode);I+=M.width}}catch(t){O.e(t)}finally{O.f()}h.fillText(T.join(""),0,0);r.x+=I*A*g;h.restore();this.compose()}else{var L,R=0;for(L=0;L<m;++L){var G=t[L];if("number"!=typeof G){var B=!1,j=(G.isSpace?v:0)+p,N=G.fontChar,W=G.accent,V=void 0,U=void 0,H=G.width;if(b){var z=G.vmetric||P,q=-(G.vmetric?z[1]:.5*H)*A,Y=z[2]*A;H=z?-z[0]:H;V=q/d;U=(R+Y)/d}else{V=R/d;U=0}if(i.remeasure&&H>0){var K=1e3*h.measureText(N).width/u*d;if(H<K&&this.isFontSubpixelAAEnabled){var X=H/K;B=!0;h.save();h.scale(X,1);V/=X}else H!==K&&(V+=(H-K)/2e3*u/d)}if(this.contentVisible&&(G.isInFont||i.missingFile))if(S&&!W)h.fillText(N,V,U);else{this.paintChar(N,V,U,c);if(W){var $=V+u*W.offset.x/d,Q=U-u*W.offset.y/d;this.paintChar(W.fontChar,$,Q,c)}}R+=b?H*A-j*y:H*A+j*y;B&&h.restore()}else R+=w*G*u/1e3}b?r.y-=R:r.x+=R*g;h.restore();this.compose()}}}},{key:"showType3Text",value:function showType3Text(t){var r,i,o,l,u=this.ctx,c=this.current,h=c.font,d=c.fontSize,p=c.fontDirection,v=h.vertical?1:-1,y=c.charSpacing,g=c.wordSpacing,m=c.textHScale*p,b=c.fontMatrix||a.FONT_IDENTITY_MATRIX,w=t.length;if(!(c.textRenderingMode===a.TextRenderingMode.INVISIBLE)&&0!==d){this._cachedScaleForStroking[0]=-1;this._cachedGetSinglePixelWidth=null;u.save();u.transform.apply(u,_toConsumableArray(c.textMatrix));u.translate(c.x,c.y);u.scale(m,p);for(r=0;r<w;++r)if("number"!=typeof(i=t[r])){var P=(i.isSpace?g:0)+y,A=h.charProcOperatorList[i.operatorListId];if(A){if(this.contentVisible){this.processingType3=i;this.save();u.scale(d,d);u.transform.apply(u,_toConsumableArray(b));this.executeOperatorList(A);this.restore()}o=a.Util.applyTransform([i.width,0],b)[0]*d+P;u.translate(o,0);c.x+=o*m}else(0,a.warn)('Type3 character "'.concat(i.operatorListId,'" is not available.'))}else{l=v*i*d/1e3;this.ctx.translate(l,0);c.x+=l*m}u.restore();this.processingType3=null}}},{key:"setCharWidth",value:function setCharWidth(t,r){}},{key:"setCharWidthAndBounds",value:function setCharWidthAndBounds(t,r,i,a,o,l){this.ctx.rect(i,a,o-i,l-a);this.ctx.clip();this.endPath()}},{key:"getColorN_Pattern",value:function getColorN_Pattern(t){var r,i=this;if("TilingPattern"===t[0]){var a=t[1],u=this.baseTransform||(0,o.getCurrentTransform)(this.ctx),c={createCanvasGraphics:function createCanvasGraphics(t){return new CanvasGraphics(t,i.commonObjs,i.objs,i.canvasFactory,i.filterFactory,{optionalContentConfig:i.optionalContentConfig,markedContentStack:i.markedContentStack})}};r=new l.TilingPattern(t,a,this.ctx,c,u)}else r=this._getPattern(t[1],t[2]);return r}},{key:"setStrokeColorN",value:function setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}},{key:"setFillColorN",value:function setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments);this.current.patternFill=!0}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,i){var o=a.Util.makeHexColor(t,r,i);this.ctx.strokeStyle=o;this.current.strokeColor=o}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,i){var o=a.Util.makeHexColor(t,r,i);this.ctx.fillStyle=o;this.current.fillColor=o;this.current.patternFill=!1}},{key:"_getPattern",value:function _getPattern(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.cachedPatterns.has(t))r=this.cachedPatterns.get(t);else{r=(0,l.getShadingPattern)(this.getObject(t));this.cachedPatterns.set(t,r)}i&&(r.matrix=i);return r}},{key:"shadingFill",value:function shadingFill(t){if(this.contentVisible){var r=this.ctx;this.save();var i=this._getPattern(t);r.fillStyle=i.getPattern(r,this,(0,o.getCurrentTransformInverse)(r),l.PathType.SHADING);var u=(0,o.getCurrentTransformInverse)(r);if(u){var c=r.canvas,h=c.width,d=c.height,p=_slicedToArray(a.Util.getAxialAlignedBoundingBox([0,0,h,d],u),4),v=p[0],y=p[1],g=p[2],m=p[3];this.ctx.fillRect(v,y,g-v,m-y)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox());this.restore()}}},{key:"beginInlineImage",value:function beginInlineImage(){(0,a.unreachable)("Should not call beginInlineImage")}},{key:"beginImageData",value:function beginImageData(){(0,a.unreachable)("Should not call beginImageData")}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){if(this.contentVisible){this.save();this.baseTransformStack.push(this.baseTransform);Array.isArray(t)&&6===t.length&&this.transform.apply(this,_toConsumableArray(t));this.baseTransform=(0,o.getCurrentTransform)(this.ctx);if(r){var i=r[2]-r[0],a=r[3]-r[1];this.ctx.rect(r[0],r[1],i,a);this.current.updateRectMinMax((0,o.getCurrentTransform)(this.ctx),r);this.clip();this.endPath()}}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){if(this.contentVisible){this.restore();this.baseTransform=this.baseTransformStack.pop()}}},{key:"beginGroup",value:function beginGroup(t){if(this.contentVisible){this.save();if(this.inSMaskMode){this.endSMaskMode();this.current.activeSMask=null}var r=this.ctx;t.isolated||(0,a.info)("TODO: Support non-isolated groups.");t.knockout&&(0,a.warn)("Knockout groups not supported.");var i=(0,o.getCurrentTransform)(r);t.matrix&&r.transform.apply(r,_toConsumableArray(t.matrix));if(!t.bbox)throw new Error("Bounding box is required.");var l=a.Util.getAxialAlignedBoundingBox(t.bbox,(0,o.getCurrentTransform)(r)),u=[0,0,r.canvas.width,r.canvas.height];l=a.Util.intersect(l,u)||[0,0,0,0];var h=Math.floor(l[0]),d=Math.floor(l[1]),p=Math.max(Math.ceil(l[2])-h,1),v=Math.max(Math.ceil(l[3])-d,1),y=1,g=1;if(p>c){y=p/c;p=c}if(v>c){g=v/c;v=c}this.current.startNewPathAndClipBox([0,0,p,v]);var m="groupAt"+this.groupLevel;t.smask&&(m+="_smask_"+this.smaskCounter++%2);var b=this.cachedCanvases.getCanvas(m,p,v),w=b.context;w.scale(1/y,1/g);w.translate(-h,-d);w.transform.apply(w,_toConsumableArray(i));if(t.smask)this.smaskStack.push({canvas:b.canvas,context:w,offsetX:h,offsetY:d,scaleX:y,scaleY:g,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null});else{r.setTransform(1,0,0,1,0,0);r.translate(h,d);r.scale(y,g);r.save()}copyCtxState(r,w);this.ctx=w;this.setGState([["BM","source-over"],["ca",1],["CA",1]]);this.groupStack.push(r);this.groupLevel++}}},{key:"endGroup",value:function endGroup(t){if(this.contentVisible){this.groupLevel--;var r=this.ctx,i=this.groupStack.pop();this.ctx=i;this.ctx.imageSmoothingEnabled=!1;if(t.smask){this.tempSMask=this.smaskStack.pop();this.restore()}else{var l;this.ctx.restore();var u=(0,o.getCurrentTransform)(this.ctx);this.restore();this.ctx.save();(l=this.ctx).setTransform.apply(l,_toConsumableArray(u));var c=a.Util.getAxialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],u);this.ctx.drawImage(r.canvas,0,0);this.ctx.restore();this.compose(c)}}}},{key:"beginAnnotation",value:function beginAnnotation(t,r,i,l,u){_classPrivateMethodGet(this,b,_restoreInitialState2).call(this);resetCtxToDefault(this.ctx);this.ctx.save();this.save();if(this.baseTransform){var c;(c=this.ctx).setTransform.apply(c,_toConsumableArray(this.baseTransform))}if(Array.isArray(r)&&4===r.length){var h=r[2]-r[0],d=r[3]-r[1];if(u&&this.annotationCanvasMap){(i=i.slice())[4]-=r[0];i[5]-=r[1];(r=r.slice())[0]=r[1]=0;r[2]=h;r[3]=d;var v=_slicedToArray(a.Util.singularValueDecompose2dScale((0,o.getCurrentTransform)(this.ctx)),2),y=v[0],g=v[1],m=this.viewportScale,w=Math.ceil(h*this.outputScaleX*m),P=Math.ceil(d*this.outputScaleY*m);this.annotationCanvas=this.canvasFactory.create(w,P);var A=this.annotationCanvas,S=A.canvas,E=A.context;this.annotationCanvasMap.set(t,S);this.annotationCanvas.savedCtx=this.ctx;this.ctx=E;this.ctx.save();this.ctx.setTransform(y,0,0,-g,0,d*g);resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx);this.ctx.rect(r[0],r[1],h,d);this.ctx.clip();this.endPath()}}this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height);this.transform.apply(this,_toConsumableArray(i));this.transform.apply(this,_toConsumableArray(l))}},{key:"endAnnotation",value:function endAnnotation(){if(this.annotationCanvas){this.ctx.restore();_classPrivateMethodGet(this,w,_drawFilter2).call(this);this.ctx=this.annotationCanvas.savedCtx;delete this.annotationCanvas.savedCtx;delete this.annotationCanvas}}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){if(this.contentVisible){var r=t.count;(t=this.getObject(t.data,t)).count=r;var i=this.ctx,a=this.processingType3;if(a){void 0===a.compiled&&(a.compiled=function compileType3Glyph(t){var r=t.width,i=t.height;if(r>1e3||i>1e3)return null;var a,o,l,u,c=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),h=r+1,d=new Uint8Array(h*(i+1)),p=r+7&-8,v=new Uint8Array(p*i),y=0,g=_createForOfIteratorHelper(t.data);try{for(g.s();!(u=g.n()).done;)for(var m=u.value,b=128;b>0;){v[y++]=m&b?0:255;b>>=1}}catch(t){g.e(t)}finally{g.f()}var w=0;if(0!==v[y=0]){d[0]=1;++w}for(o=1;o<r;o++){if(v[y]!==v[y+1]){d[o]=v[y]?2:1;++w}y++}if(0!==v[y]){d[o]=2;++w}for(a=1;a<i;a++){l=a*h;if(v[(y=a*p)-p]!==v[y]){d[l]=v[y]?1:8;++w}var P=(v[y]?4:0)+(v[y-p]?8:0);for(o=1;o<r;o++){if(c[P=(P>>2)+(v[y+1]?4:0)+(v[y-p+1]?8:0)]){d[l+o]=c[P];++w}y++}if(v[y-p]!==v[y]){d[l+o]=v[y]?2:4;++w}if(w>1e3)return null}l=a*h;if(0!==v[y=p*(i-1)]){d[l]=8;++w}for(o=1;o<r;o++){if(v[y]!==v[y+1]){d[l+o]=v[y]?4:8;++w}y++}if(0!==v[y]){d[l+o]=4;++w}if(w>1e3)return null;var A=new Int32Array([0,h,-1,0,-h,0,0,0,1]),S=new Path2D;for(a=0;w&&a<=i;a++){for(var E=a*h,x=E+r;E<x&&!d[E];)E++;if(E!==x){S.moveTo(E%h,a);var D=E,k=d[E];do{var C=A[k];do{E+=C}while(!d[E]);var T=d[E];if(5!==T&&10!==T){k=T;d[E]=0}else{k=T&51*k>>4;d[E]&=k>>2|k<<2}S.lineTo(E%h,E/h|0);d[E]||--w}while(D!==E);--a}}v=null;d=null;return function drawOutline(t){t.save();t.scale(1/r,-1/i);t.translate(0,-i);t.fill(S);t.beginPath();t.restore()}}(t));if(a.compiled){a.compiled(i);return}}var o=this._createMaskCanvas(t),l=o.canvas;i.save();i.setTransform(1,0,0,1,0,0);i.drawImage(l,o.offsetX,o.offsetY);i.restore();this.compose()}}},{key:"paintImageMaskXObjectRepeat",value:function paintImageMaskXObjectRepeat(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0;if(this.contentVisible){t=this.getObject(t.data,t);var h=this.ctx;h.save();var d=(0,o.getCurrentTransform)(h);h.transform(r,i,l,u,0,0);var p=this._createMaskCanvas(t);h.setTransform(1,0,0,1,p.offsetX-d[4],p.offsetY-d[5]);for(var v=0,y=c.length;v<y;v+=2){var g=a.Util.transform(d,[r,i,l,u,c[v],c[v+1]]),m=_slicedToArray(a.Util.applyTransform([0,0],g),2),b=m[0],w=m[1];h.drawImage(p.canvas,b,w)}h.restore();this.compose()}}},{key:"paintImageMaskXObjectGroup",value:function paintImageMaskXObjectGroup(t){if(this.contentVisible){var r,i=this.ctx,a=this.current.fillColor,u=this.current.patternFill,c=_createForOfIteratorHelper(t);try{for(c.s();!(r=c.n()).done;){var h=r.value,d=h.data,p=h.width,v=h.height,y=h.transform,g=this.cachedCanvases.getCanvas("maskCanvas",p,v),m=g.context;m.save();putBinaryImageMask(m,this.getObject(d,h));m.globalCompositeOperation="source-in";m.fillStyle=u?a.getPattern(m,this,(0,o.getCurrentTransformInverse)(i),l.PathType.FILL):a;m.fillRect(0,0,p,v);m.restore();i.save();i.transform.apply(i,_toConsumableArray(y));i.scale(1,-1);drawImageAtIntegerCoords(i,g.canvas,0,0,p,v,0,-1,1,1);i.restore()}}catch(t){c.e(t)}finally{c.f()}this.compose()}}},{key:"paintImageXObject",value:function paintImageXObject(t){if(this.contentVisible){var r=this.getObject(t);r?this.paintInlineImageXObject(r):(0,a.warn)("Dependent image isn't ready yet")}}},{key:"paintImageXObjectRepeat",value:function paintImageXObjectRepeat(t,r,i,o){if(this.contentVisible){var l=this.getObject(t);if(l){for(var u=l.width,c=l.height,h=[],d=0,p=o.length;d<p;d+=2)h.push({transform:[r,0,0,i,o[d],o[d+1]],x:0,y:0,w:u,h:c});this.paintInlineImageXObjectGroup(l,h)}else(0,a.warn)("Dependent image isn't ready yet")}}},{key:"applyTransferMapsToCanvas",value:function applyTransferMapsToCanvas(t){if("none"!==this.current.transferMaps){t.filter=this.current.transferMaps;t.drawImage(t.canvas,0,0);t.filter="none"}return t.canvas}},{key:"applyTransferMapsToBitmap",value:function applyTransferMapsToBitmap(t){if("none"===this.current.transferMaps)return t.bitmap;var r=t.bitmap,i=t.width,a=t.height,o=this.cachedCanvases.getCanvas("inlineImage",i,a),l=o.context;l.filter=this.current.transferMaps;l.drawImage(r,0,0);l.filter="none";return o.canvas}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(t){if(this.contentVisible){var r,i=t.width,l=t.height,u=this.ctx;this.save();if(!a.isNodeJS){var c=u.filter;"none"!==c&&""!==c&&(u.filter="none")}u.scale(1/i,-1/l);if(t.bitmap)r=this.applyTransferMapsToBitmap(t);else if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)r=t;else{var h=this.cachedCanvases.getCanvas("inlineImage",i,l).context;putBinaryImageData(h,t);r=this.applyTransferMapsToCanvas(h)}var d=this._scaleImage(r,(0,o.getCurrentTransformInverse)(u));u.imageSmoothingEnabled=getImageSmoothingEnabled((0,o.getCurrentTransform)(u),t.interpolate);drawImageAtIntegerCoords(u,d.img,0,0,d.paintWidth,d.paintHeight,0,-l,i,l);this.compose();this.restore()}}},{key:"paintInlineImageXObjectGroup",value:function paintInlineImageXObjectGroup(t,r){if(this.contentVisible){var i,a=this.ctx;if(t.bitmap)i=t.bitmap;else{var o=t.width,l=t.height,u=this.cachedCanvases.getCanvas("inlineImage",o,l).context;putBinaryImageData(u,t);i=this.applyTransferMapsToCanvas(u)}var c,h=_createForOfIteratorHelper(r);try{for(h.s();!(c=h.n()).done;){var d=c.value;a.save();a.transform.apply(a,_toConsumableArray(d.transform));a.scale(1,-1);drawImageAtIntegerCoords(a,i,d.x,d.y,d.w,d.h,0,-1,1,1);a.restore()}}catch(t){h.e(t)}finally{h.f()}this.compose()}}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){if(this.contentVisible){this.ctx.fillRect(0,0,1,1);this.compose()}}},{key:"markPoint",value:function markPoint(t){}},{key:"markPointProps",value:function markPointProps(t,r){}},{key:"beginMarkedContent",value:function beginMarkedContent(t){this.markedContentStack.push({visible:!0})}},{key:"beginMarkedContentProps",value:function beginMarkedContentProps(t,r){"OC"===t?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0});this.contentVisible=this.isContentVisible()}},{key:"endMarkedContent",value:function endMarkedContent(){this.markedContentStack.pop();this.contentVisible=this.isContentVisible()}},{key:"beginCompat",value:function beginCompat(){}},{key:"endCompat",value:function endCompat(){}},{key:"consumePath",value:function consumePath(t){var r=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath();this.pendingClip||this.compose(t);var i=this.ctx;if(this.pendingClip){r||(this.pendingClip===m?i.clip("evenodd"):i.clip());this.pendingClip=null}this.current.startNewPathAndClipBox(this.current.clipBox);i.beginPath()}},{key:"getSinglePixelWidth",value:function getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){var t=(0,o.getCurrentTransform)(this.ctx);if(0===t[1]&&0===t[2])this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{var r=Math.abs(t[0]*t[3]-t[2]*t[1]),i=Math.hypot(t[0],t[2]),a=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(i,a)/r}}return this._cachedGetSinglePixelWidth}},{key:"getScaleForStroking",value:function getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){var t,r,i=this.current.lineWidth,a=this.ctx.getTransform(),o=a.a,l=a.b,u=a.c,c=a.d;if(0===l&&0===u){var h=Math.abs(o),d=Math.abs(c);if(h===d)if(0===i)t=r=1/h;else{var p=h*i;t=r=p<1?1/p:1}else if(0===i){t=1/h;r=1/d}else{var v=h*i,y=d*i;t=v<1?1/v:1;r=y<1?1/y:1}}else{var g=Math.abs(o*c-l*u),m=Math.hypot(o,l),b=Math.hypot(u,c);if(0===i){t=b/g;r=m/g}else{var w=i*g;t=b>w?b/w:1;r=m>w?m/w:1}}this._cachedScaleForStroking[0]=t;this._cachedScaleForStroking[1]=r}return this._cachedScaleForStroking}},{key:"rescaleAndStroke",value:function rescaleAndStroke(t){var r=this.ctx,i=this.current.lineWidth,a=_slicedToArray(this.getScaleForStroking(),2),o=a[0],l=a[1];r.lineWidth=i||1;if(1!==o||1!==l){var u=r.getLineDash();t&&r.save();r.scale(o,l);if(u.length>0){var c=Math.max(o,l);r.setLineDash(u.map((function(t){return t/c})));r.lineDashOffset/=c}r.stroke();t&&r.restore()}else r.stroke()}},{key:"isContentVisible",value:function isContentVisible(){for(var t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}]);return CanvasGraphics}();r.CanvasGraphics=P;function _restoreInitialState2(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore();if(this.transparentCanvas){this.ctx=this.compositeCtx;this.ctx.save();this.ctx.setTransform(1,0,0,1,0,0);this.ctx.drawImage(this.transparentCanvas,0,0);this.ctx.restore();this.transparentCanvas=null}}function _drawFilter2(){if(this.pageColors){var t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if("none"!==t){var r=this.ctx.filter;this.ctx.filter=t;this.ctx.drawImage(this.ctx.canvas,0,0);this.ctx.filter=r}}}for(var A in a.OPS)void 0!==P.prototype[A]&&(P.prototype[a.OPS[A]]=P.prototype[A])},(t,r,i)=>{i(3)({target:"Math",stat:!0},{sign:i(179)})},(t,r,i)=>{i(172)("Int32",(function(t){return function Int32Array(r,i,a){return t(this,r,i,a)}}))},(t,r,i)=>{var a=i(3),o=i(180),l=i(141);a({target:"Array",proto:!0},{fill:o});l("fill")},(t,r,i)=>{var a=i(3),o=i(188).filter;a({target:"Array",proto:!0,forced:!i(250)("filter")},{filter:function filter(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{i(3)({target:"Math",stat:!0},{fround:i(381)})},(t,r,i)=>{var a=i(179),o=Math.abs,l=Math.pow,u=l(2,-52),c=l(2,-23),h=l(2,127)*(2-c),d=l(2,-126);t.exports=Math.fround||function fround(t){var r,i,l=+t,p=o(l),v=a(l);return p<d?v*function(t){return t+1/u-1/u}(p/d/c)*d*c:(i=(r=(1+c/u)*p)-(r-p))>h||i!=i?v*(1/0):v*i}},(t,r,i)=>{i(301);i(140);i(148);i(149);i(2);i(71);i(73);i(258);i(255);i(92);i(105);i(104);Object.defineProperty(r,"__esModule",{value:!0});r.TilingPattern=r.PathType=void 0;r.getShadingPattern=function getShadingPattern(t){switch(t[0]){case"RadialAxial":return new c(t);case"Mesh":return new h(t);case"Dummy":return new d}throw new Error("Unknown IR type: ".concat(t[0]))};i(85);i(90);i(292);i(300);i(146);i(123);i(112);i(378);var a=i(1),o=i(362);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var l={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};r.PathType=l;function applyBoundingBox(t,r){if(r){var i=r[2]-r[0],a=r[3]-r[1],o=new Path2D;o.rect(r[0],r[1],i,a);t.clip(o)}}var u=function(){function BaseShadingPattern(){_classCallCheck(this,BaseShadingPattern);this.constructor===BaseShadingPattern&&(0,a.unreachable)("Cannot initialize BaseShadingPattern.")}_createClass(BaseShadingPattern,[{key:"getPattern",value:function getPattern(){(0,a.unreachable)("Abstract method `getPattern` called.")}}]);return BaseShadingPattern}(),c=function(t){_inherits(RadialAxialShadingPattern,t);var r=_createSuper(RadialAxialShadingPattern);function RadialAxialShadingPattern(t){var i;_classCallCheck(this,RadialAxialShadingPattern);(i=r.call(this))._type=t[1];i._bbox=t[2];i._colorStops=t[3];i._p0=t[4];i._p1=t[5];i._r0=t[6];i._r1=t[7];i.matrix=null;return i}_createClass(RadialAxialShadingPattern,[{key:"_createGradient",value:function _createGradient(t){var r;"axial"===this._type?r=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(r=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));var i,a=_createForOfIteratorHelper(this._colorStops);try{for(a.s();!(i=a.n()).done;){var o=i.value;r.addColorStop(o[0],o[1])}}catch(t){a.e(t)}finally{a.f()}return r}},{key:"getPattern",value:function getPattern(t,r,i,u){var c;if(u===l.STROKE||u===l.FILL){var h=r.current.getClippedPathBoundingBox(u,(0,o.getCurrentTransform)(t))||[0,0,0,0],d=Math.ceil(h[2]-h[0])||1,p=Math.ceil(h[3]-h[1])||1,v=r.cachedCanvases.getCanvas("pattern",d,p,!0),y=v.context;y.clearRect(0,0,y.canvas.width,y.canvas.height);y.beginPath();y.rect(0,0,y.canvas.width,y.canvas.height);y.translate(-h[0],-h[1]);i=a.Util.transform(i,[1,0,0,1,h[0],h[1]]);y.transform.apply(y,_toConsumableArray(r.baseTransform));this.matrix&&y.transform.apply(y,_toConsumableArray(this.matrix));applyBoundingBox(y,this._bbox);y.fillStyle=this._createGradient(y);y.fill();c=t.createPattern(v.canvas,"no-repeat");var g=new DOMMatrix(i);c.setTransform(g)}else{applyBoundingBox(t,this._bbox);c=this._createGradient(t)}return c}}]);return RadialAxialShadingPattern}(u);function drawTriangle(t,r,i,a,o,l,u,c){var h,d=r.coords,p=r.colors,v=t.data,y=4*t.width;if(d[i+1]>d[a+1]){h=i;i=a;a=h;h=l;l=u;u=h}if(d[a+1]>d[o+1]){h=a;a=o;o=h;h=u;u=c;c=h}if(d[i+1]>d[a+1]){h=i;i=a;a=h;h=l;l=u;u=h}var g=(d[i]+r.offsetX)*r.scaleX,m=(d[i+1]+r.offsetY)*r.scaleY,b=(d[a]+r.offsetX)*r.scaleX,w=(d[a+1]+r.offsetY)*r.scaleY,P=(d[o]+r.offsetX)*r.scaleX,A=(d[o+1]+r.offsetY)*r.scaleY;if(!(m>=A))for(var S,E,x,D,k,C,T,I,O=p[l],M=p[l+1],L=p[l+2],R=p[u],G=p[u+1],B=p[u+2],j=p[c],N=p[c+1],W=p[c+2],V=Math.round(m),U=Math.round(A),H=V;H<=U;H++){if(H<w){var z=H<m?0:(m-H)/(m-w);S=g-(g-b)*z;E=O-(O-R)*z;x=M-(M-G)*z;D=L-(L-B)*z}else{var q=void 0;S=b-(b-P)*(q=H>A?1:w===A?0:(w-H)/(w-A));E=R-(R-j)*q;x=G-(G-N)*q;D=B-(B-W)*q}var Y=void 0;k=g-(g-P)*(Y=H<m?0:H>A?1:(m-H)/(m-A));C=O-(O-j)*Y;T=M-(M-N)*Y;I=L-(L-W)*Y;for(var K=Math.round(Math.min(S,k)),X=Math.round(Math.max(S,k)),$=y*H+4*K,Q=K;Q<=X;Q++){(Y=(S-Q)/(S-k))<0?Y=0:Y>1&&(Y=1);v[$++]=E-(E-C)*Y|0;v[$++]=x-(x-T)*Y|0;v[$++]=D-(D-I)*Y|0;v[$++]=255}}}function drawFigure(t,r,i){var a,o,l=r.coords,u=r.colors;switch(r.type){case"lattice":var c=r.verticesPerRow,h=Math.floor(l.length/c)-1,d=c-1;for(a=0;a<h;a++)for(var p=a*c,v=0;v<d;v++,p++){drawTriangle(t,i,l[p],l[p+1],l[p+c],u[p],u[p+1],u[p+c]);drawTriangle(t,i,l[p+c+1],l[p+1],l[p+c],u[p+c+1],u[p+1],u[p+c])}break;case"triangles":for(a=0,o=l.length;a<o;a+=3)drawTriangle(t,i,l[a],l[a+1],l[a+2],u[a],u[a+1],u[a+2]);break;default:throw new Error("illegal figure")}}var h=function(t){_inherits(MeshShadingPattern,t);var r=_createSuper(MeshShadingPattern);function MeshShadingPattern(t){var i;_classCallCheck(this,MeshShadingPattern);(i=r.call(this))._coords=t[2];i._colors=t[3];i._figures=t[4];i._bounds=t[5];i._bbox=t[7];i._background=t[8];i.matrix=null;return i}_createClass(MeshShadingPattern,[{key:"_createMeshCanvas",value:function _createMeshCanvas(t,r,i){var a=Math.floor(this._bounds[0]),o=Math.floor(this._bounds[1]),l=Math.ceil(this._bounds[2])-a,u=Math.ceil(this._bounds[3])-o,c=Math.min(Math.ceil(Math.abs(l*t[0]*1.1)),3e3),h=Math.min(Math.ceil(Math.abs(u*t[1]*1.1)),3e3),d=l/c,p=u/h,v={coords:this._coords,colors:this._colors,offsetX:-a,offsetY:-o,scaleX:1/d,scaleY:1/p},y=c+4,g=h+4,m=i.getCanvas("mesh",y,g,!1),b=m.context,w=b.createImageData(c,h);if(r)for(var P=w.data,A=0,S=P.length;A<S;A+=4){P[A]=r[0];P[A+1]=r[1];P[A+2]=r[2];P[A+3]=255}var E,x=_createForOfIteratorHelper(this._figures);try{for(x.s();!(E=x.n()).done;){drawFigure(w,E.value,v)}}catch(t){x.e(t)}finally{x.f()}b.putImageData(w,2,2);return{canvas:m.canvas,offsetX:a-2*d,offsetY:o-2*p,scaleX:d,scaleY:p}}},{key:"getPattern",value:function getPattern(t,r,i,u){applyBoundingBox(t,this._bbox);var c;if(u===l.SHADING)c=a.Util.singularValueDecompose2dScale((0,o.getCurrentTransform)(t));else{c=a.Util.singularValueDecompose2dScale(r.baseTransform);if(this.matrix){var h=a.Util.singularValueDecompose2dScale(this.matrix);c=[c[0]*h[0],c[1]*h[1]]}}var d=this._createMeshCanvas(c,u===l.SHADING?null:this._background,r.cachedCanvases);if(u!==l.SHADING){t.setTransform.apply(t,_toConsumableArray(r.baseTransform));this.matrix&&t.transform.apply(t,_toConsumableArray(this.matrix))}t.translate(d.offsetX,d.offsetY);t.scale(d.scaleX,d.scaleY);return t.createPattern(d.canvas,"no-repeat")}}]);return MeshShadingPattern}(u),d=function(t){_inherits(DummyShadingPattern,t);var r=_createSuper(DummyShadingPattern);function DummyShadingPattern(){_classCallCheck(this,DummyShadingPattern);return r.apply(this,arguments)}_createClass(DummyShadingPattern,[{key:"getPattern",value:function getPattern(){return"hotpink"}}]);return DummyShadingPattern}(u);var p=1,v=2,y=function(){function TilingPattern(t,r,i,a,o){_classCallCheck(this,TilingPattern);this.operatorList=t[2];this.matrix=t[3]||[1,0,0,1,0,0];this.bbox=t[4];this.xstep=t[5];this.ystep=t[6];this.paintType=t[7];this.tilingType=t[8];this.color=r;this.ctx=i;this.canvasGraphicsFactory=a;this.baseTransform=o}_createClass(TilingPattern,[{key:"createPatternCanvas",value:function createPatternCanvas(t){var r=this.operatorList,i=this.bbox,l=this.xstep,u=this.ystep,c=this.paintType,h=this.tilingType,d=this.color,p=this.canvasGraphicsFactory;(0,a.info)("TilingType: "+h);var v=i[0],y=i[1],g=i[2],m=i[3],b=a.Util.singularValueDecompose2dScale(this.matrix),w=a.Util.singularValueDecompose2dScale(this.baseTransform),P=[b[0]*w[0],b[1]*w[1]],A=this.getSizeAndScale(l,this.ctx.canvas.width,P[0]),S=this.getSizeAndScale(u,this.ctx.canvas.height,P[1]),E=t.cachedCanvases.getCanvas("pattern",A.size,S.size,!0),x=E.context,D=p.createCanvasGraphics(x);D.groupLevel=t.groupLevel;this.setFillAndStrokeStyleToContext(D,c,d);var k=v,C=y,T=g,I=m;if(v<0){k=0;T+=Math.abs(v)}if(y<0){C=0;I+=Math.abs(y)}x.translate(-A.scale*k,-S.scale*C);D.transform(A.scale,0,0,S.scale,0,0);x.save();this.clipBbox(D,k,C,T,I);D.baseTransform=(0,o.getCurrentTransform)(D.ctx);D.executeOperatorList(r);D.endDrawing();return{canvas:E.canvas,scaleX:A.scale,scaleY:S.scale,offsetX:k,offsetY:C}}},{key:"getSizeAndScale",value:function getSizeAndScale(t,r,i){t=Math.abs(t);var a=Math.max(TilingPattern.MAX_PATTERN_SIZE,r),o=Math.ceil(t*i);o>=a?o=a:i=o/t;return{scale:i,size:o}}},{key:"clipBbox",value:function clipBbox(t,r,i,a,l){var u=a-r,c=l-i;t.ctx.rect(r,i,u,c);t.current.updateRectMinMax((0,o.getCurrentTransform)(t.ctx),[r,i,a,l]);t.clip();t.endPath()}},{key:"setFillAndStrokeStyleToContext",value:function setFillAndStrokeStyleToContext(t,r,i){var o=t.ctx,l=t.current;switch(r){case p:var u=this.ctx;o.fillStyle=u.fillStyle;o.strokeStyle=u.strokeStyle;l.fillColor=u.fillStyle;l.strokeColor=u.strokeStyle;break;case v:var c=a.Util.makeHexColor(i[0],i[1],i[2]);o.fillStyle=c;o.strokeStyle=c;l.fillColor=c;l.strokeColor=c;break;default:throw new a.FormatError("Unsupported paint type: ".concat(r))}}},{key:"getPattern",value:function getPattern(t,r,i,o){var u=i;if(o!==l.SHADING){u=a.Util.transform(u,r.baseTransform);this.matrix&&(u=a.Util.transform(u,this.matrix))}var c=this.createPatternCanvas(r),h=new DOMMatrix(u);h=(h=h.translate(c.offsetX,c.offsetY)).scale(1/c.scaleX,1/c.scaleY);var d=t.createPattern(c.canvas,"repeat");d.setTransform(h);return d}}]);return TilingPattern}();r.TilingPattern=y;!function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}(y,"MAX_PATTERN_SIZE",3e3)},(t,r,i)=>{i(292);i(300);i(301);i(148);i(149);i(167);i(258);i(255);i(92);i(105);i(104);i(123);Object.defineProperty(r,"__esModule",{value:!0});r.convertBlackAndWhiteToRGBA=convertBlackAndWhiteToRGBA;r.convertToRGBA=function convertToRGBA(t){switch(t.kind){case a.ImageKind.GRAYSCALE_1BPP:return convertBlackAndWhiteToRGBA(t);case a.ImageKind.RGB_24BPP:return function convertRGBToRGBA(t){var r=t.src,i=t.srcPos,o=void 0===i?0:i,l=t.dest,u=t.destPos,c=void 0===u?0:u,h=(t.width,t.height,0),d=r.length>>2,p=new Uint32Array(r.buffer,o,d);if(a.FeatureTest.isLittleEndian){for(;h<d-2;h+=3,c+=4){var v=p[h],y=p[h+1],g=p[h+2];l[c]=4278190080|v;l[c+1]=v>>>24|y<<8|4278190080;l[c+2]=y>>>16|g<<16|4278190080;l[c+3]=g>>>8|4278190080}for(var m=4*h,b=r.length;m<b;m+=3)l[c++]=r[m]|r[m+1]<<8|r[m+2]<<16|4278190080}else{for(;h<d-2;h+=3,c+=4){var w=p[h],P=p[h+1],A=p[h+2];l[c]=255|w;l[c+1]=w<<24|P>>>8|255;l[c+2]=P<<16|A>>>16|255;l[c+3]=A<<8|255}for(var S=4*h,E=r.length;S<E;S+=3)l[c++]=r[S]<<24|r[S+1]<<16|r[S+2]<<8|255}return{srcPos:o,destPos:c}}(t)}return null};r.grayToRGBA=function grayToRGBA(t,r){if(a.FeatureTest.isLittleEndian)for(var i=0,o=t.length;i<o;i++)r[i]=65793*t[i]|4278190080;else for(var l=0,u=t.length;l<u;l++)r[l]=16843008*t[l]|255};i(140);i(146);i(246);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);var a=i(1);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function convertBlackAndWhiteToRGBA(t){var r=t.src,i=t.srcPos,o=void 0===i?0:i,l=t.dest,u=t.width,c=t.height,h=t.nonBlackColor,d=void 0===h?4294967295:h,p=t.inverseDecode,v=void 0!==p&&p,y=a.FeatureTest.isLittleEndian?4278190080:255,g=_slicedToArray(v?[d,y]:[y,d],2),m=g[0],b=g[1],w=u>>3,P=7&u,A=r.length;l=new Uint32Array(l.buffer);for(var S=0,E=0;E<c;E++){for(var x=o+w;o<x;o++){var D=o<A?r[o]:255;l[S++]=128&D?b:m;l[S++]=64&D?b:m;l[S++]=32&D?b:m;l[S++]=16&D?b:m;l[S++]=8&D?b:m;l[S++]=4&D?b:m;l[S++]=2&D?b:m;l[S++]=1&D?b:m}if(0!==P)for(var k=o<A?r[o++]:255,C=0;C<P;C++)l[S++]=k&1<<7-C?b:m}return{srcPos:o,destPos:S}}},(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.GlobalWorkerOptions=void 0;var i=Object.create(null);r.GlobalWorkerOptions=i;i.workerPort=null;i.workerSrc=""},(t,r,i)=>{i(292);i(300);i(301);i(85);i(90);i(112);i(306);i(307);i(308);i(309);i(2);i(167);i(310);i(258);Object.defineProperty(r,"__esModule",{value:!0});r.MessageHandler=void 0;i(123);i(146);i(255);i(259);i(140);i(148);i(347);i(149);i(386);var a=i(1);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var o=1,l=2,u=1,c=2,h=3,d=4,p=5,v=6,y=7,g=8;function wrapReason(t){t instanceof Error||"object"===_typeof(t)&&null!==t||(0,a.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.');switch(t.name){case"AbortException":return new a.AbortException(t.message);case"MissingPDFException":return new a.MissingPDFException(t.message);case"PasswordException":return new a.PasswordException(t.message,t.code);case"UnexpectedResponseException":return new a.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new a.UnknownErrorException(t.message,t.details);default:return new a.UnknownErrorException(t.message,t.toString())}}var m=new WeakSet,b=new WeakSet,w=new WeakSet,P=function(){function MessageHandler(t,r,i){var a=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MessageHandler);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);this.sourceName=t;this.targetName=r;this.comObj=i;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.callbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);this._onComObjOnMessage=function(t){var r=t.data;if(r.targetName===a.sourceName)if(r.stream)_classPrivateMethodGet(a,b,_processStreamMessage2).call(a,r);else if(r.callback){var u=r.callbackId,c=a.callbackCapabilities[u];if(!c)throw new Error("Cannot resolve callback ".concat(u));delete a.callbackCapabilities[u];if(r.callback===o)c.resolve(r.data);else{if(r.callback!==l)throw new Error("Unexpected callback case");c.reject(wrapReason(r.reason))}}else{var h=a.actionHandler[r.action];if(!h)throw new Error("Unknown action from worker: ".concat(r.action));if(r.callbackId){var d=a.sourceName,p=r.sourceName;new Promise((function(t){t(h(r.data))})).then((function(t){i.postMessage({sourceName:d,targetName:p,callback:o,callbackId:r.callbackId,data:t})}),(function(t){i.postMessage({sourceName:d,targetName:p,callback:l,callbackId:r.callbackId,reason:wrapReason(t)})}))}else r.streamId?_classPrivateMethodGet(a,m,_createStreamSink2).call(a,r):h(r.data)}};i.addEventListener("message",this._onComObjOnMessage)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(MessageHandler,[{key:"on",value:function on(t,r){var i=this.actionHandler;if(i[t])throw new Error('There is already an actionName called "'.concat(t,'"'));i[t]=r}},{key:"send",value:function send(t,r,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:r},i)}},{key:"sendWithPromise",value:function sendWithPromise(t,r,i){var o=this.callbackId++,l=new a.PromiseCapability;this.callbackCapabilities[o]=l;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:o,data:r},i)}catch(t){l.reject(t)}return l.promise}},{key:"sendWithStream",value:function sendWithStream(t,r,i,o){var l=this,c=this.streamId++,h=this.sourceName,d=this.targetName,p=this.comObj;return new ReadableStream({start:function start(i){var u=new a.PromiseCapability;l.streamControllers[c]={controller:i,startCall:u,pullCall:null,cancelCall:null,isClosed:!1};p.postMessage({sourceName:h,targetName:d,action:t,streamId:c,data:r,desiredSize:i.desiredSize},o);return u.promise},pull:function pull(t){var r=new a.PromiseCapability;l.streamControllers[c].pullCall=r;p.postMessage({sourceName:h,targetName:d,stream:v,streamId:c,desiredSize:t.desiredSize});return r.promise},cancel:function cancel(t){(0,a.assert)(t instanceof Error,"cancel must have a valid reason");var r=new a.PromiseCapability;l.streamControllers[c].cancelCall=r;l.streamControllers[c].isClosed=!0;p.postMessage({sourceName:h,targetName:d,stream:u,streamId:c,reason:wrapReason(t)});return r.promise}},i)}},{key:"destroy",value:function destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}]);return MessageHandler}();r.MessageHandler=P;function _createStreamSink2(t){var r=t.streamId,i=this.sourceName,o=t.sourceName,l=this.comObj,u=this,c=this.actionHandler[t.action],v={enqueue:function enqueue(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,c=arguments.length>2?arguments[2]:void 0;if(!this.isCancelled){var h=this.desiredSize;this.desiredSize-=u;if(h>0&&this.desiredSize<=0){this.sinkCapability=new a.PromiseCapability;this.ready=this.sinkCapability.promise}l.postMessage({sourceName:i,targetName:o,stream:d,streamId:r,chunk:t},c)}},close:function close(){if(!this.isCancelled){this.isCancelled=!0;l.postMessage({sourceName:i,targetName:o,stream:h,streamId:r});delete u.streamSinks[r]}},error:function error(t){(0,a.assert)(t instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;l.postMessage({sourceName:i,targetName:o,stream:p,streamId:r,reason:wrapReason(t)})}},sinkCapability:new a.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};v.sinkCapability.resolve();v.ready=v.sinkCapability.promise;this.streamSinks[r]=v;new Promise((function(r){r(c(t.data,v))})).then((function(){l.postMessage({sourceName:i,targetName:o,stream:g,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:i,targetName:o,stream:g,streamId:r,reason:wrapReason(t)})}))}function _processStreamMessage2(t){var r=t.streamId,i=this.sourceName,o=t.sourceName,l=this.comObj,m=this.streamControllers[r],b=this.streamSinks[r];switch(t.stream){case g:t.success?m.startCall.resolve():m.startCall.reject(wrapReason(t.reason));break;case y:t.success?m.pullCall.resolve():m.pullCall.reject(wrapReason(t.reason));break;case v:if(!b){l.postMessage({sourceName:i,targetName:o,stream:y,streamId:r,success:!0});break}b.desiredSize<=0&&t.desiredSize>0&&b.sinkCapability.resolve();b.desiredSize=t.desiredSize;new Promise((function(t){var r;t(null===(r=b.onPull)||void 0===r?void 0:r.call(b))})).then((function(){l.postMessage({sourceName:i,targetName:o,stream:y,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:i,targetName:o,stream:y,streamId:r,reason:wrapReason(t)})}));break;case d:(0,a.assert)(m,"enqueue should have stream controller");if(m.isClosed)break;m.controller.enqueue(t.chunk);break;case h:(0,a.assert)(m,"close should have stream controller");if(m.isClosed)break;m.isClosed=!0;m.controller.close();_classPrivateMethodGet(this,w,_deleteStreamController2).call(this,m,r);break;case p:(0,a.assert)(m,"error should have stream controller");m.controller.error(wrapReason(t.reason));_classPrivateMethodGet(this,w,_deleteStreamController2).call(this,m,r);break;case c:t.success?m.cancelCall.resolve():m.cancelCall.reject(wrapReason(t.reason));_classPrivateMethodGet(this,w,_deleteStreamController2).call(this,m,r);break;case u:if(!b)break;new Promise((function(r){var i;r(null===(i=b.onCancel)||void 0===i?void 0:i.call(b,wrapReason(t.reason)))})).then((function(){l.postMessage({sourceName:i,targetName:o,stream:c,streamId:r,success:!0})}),(function(t){l.postMessage({sourceName:i,targetName:o,stream:c,streamId:r,reason:wrapReason(t)})}));b.sinkCapability.reject(wrapReason(t.reason));b.isCancelled=!0;delete this.streamSinks[r];break;default:throw new Error("Unexpected stream case")}}function _deleteStreamController2(t,r){return _deleteStreamController3.apply(this,arguments)}function _deleteStreamController3(){_deleteStreamController3=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t,r){var i,a,o;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return Promise.allSettled([null===(i=t.startCall)||void 0===i?void 0:i.promise,null===(a=t.pullCall)||void 0===a?void 0:a.promise,null===(o=t.cancelCall)||void 0===o?void 0:o.promise]);case 2:delete this.streamControllers[r];case 3:case"end":return l.stop()}}),_callee,this)})));return _deleteStreamController3.apply(this,arguments)}},(t,r,i)=>{var a=i(3),o=i(8),l=i(31),u=i(271),c=i(268),h=i(273);a({target:"Promise",stat:!0,forced:i(274)},{allSettled:function allSettled(t){var r=this,i=u.f(r),a=i.resolve,d=i.reject,p=c((function(){var i=l(r.resolve),u=[],c=0,d=1;h(t,(function(t){var l=c++,h=!1;d++;o(i,r,t).then((function(t){if(!h){h=!0;u[l]={status:"fulfilled",value:t};--d||a(u)}}),(function(t){if(!h){h=!0;u[l]={status:"rejected",reason:t};--d||a(u)}}))}));--d||a(u)}));p.error&&d(p.value);return i.promise}})},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(301);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Metadata=void 0;i(123);i(140);i(146);i(148);i(302);i(149);var a=i(1);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var o=new WeakMap,l=new WeakMap,u=function(){function Metadata(t){var r=t.parsedData,i=t.rawData;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Metadata);_classPrivateFieldInitSpec(this,o,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,l,{writable:!0,value:void 0});_classPrivateFieldSet(this,o,r);_classPrivateFieldSet(this,l,i)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(Metadata,[{key:"getRaw",value:function getRaw(){return _classPrivateFieldGet(this,l)}},{key:"get",value:function get(t){var r;return null!==(r=_classPrivateFieldGet(this,o).get(t))&&void 0!==r?r:null}},{key:"getAll",value:function getAll(){return(0,a.objectFromMap)(_classPrivateFieldGet(this,o))}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,o).has(t)}}]);return Metadata}();r.Metadata=u},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(123);i(85);i(90);i(112);i(255);i(92);i(105);i(104);i(301);i(167);Object.defineProperty(r,"__esModule",{value:!0});r.OptionalContentConfig=void 0;i(292);i(300);i(146);i(140);i(280);i(148);i(149);i(258);i(257);i(302);i(347);var a=i(1),o=i(372);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var l=Symbol("INTERNAL"),u=new WeakMap,c=function(){function OptionalContentGroup(t,r){_classCallCheck(this,OptionalContentGroup);_classPrivateFieldInitSpec(this,u,{writable:!0,value:!0});this.name=t;this.intent=r}_createClass(OptionalContentGroup,[{key:"visible",get:function get(){return _classPrivateFieldGet(this,u)}},{key:"_setVisible",value:function _setVisible(t,r){t!==l&&(0,a.unreachable)("Internal method `_setVisible` called.");_classPrivateFieldSet(this,u,r)}}]);return OptionalContentGroup}(),h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakSet,g=function(){function OptionalContentConfig(t){_classCallCheck(this,OptionalContentConfig);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,y);_classPrivateFieldInitSpec(this,h,{writable:!0,value:null});_classPrivateFieldInitSpec(this,d,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});this.name=null;this.creator=null;if(null!==t){this.name=t.name;this.creator=t.creator;_classPrivateFieldSet(this,v,t.order);var r,i=_createForOfIteratorHelper(t.groups);try{for(i.s();!(r=i.n()).done;){var a=r.value;_classPrivateFieldGet(this,d).set(a.id,new c(a.name,a.intent))}}catch(t){i.e(t)}finally{i.f()}if("OFF"===t.baseState){var o,u=_createForOfIteratorHelper(_classPrivateFieldGet(this,d).values());try{for(u.s();!(o=u.n()).done;){o.value._setVisible(l,!1)}}catch(t){u.e(t)}finally{u.f()}}var g,m=_createForOfIteratorHelper(t.on);try{for(m.s();!(g=m.n()).done;){var b=g.value;_classPrivateFieldGet(this,d).get(b)._setVisible(l,!0)}}catch(t){m.e(t)}finally{m.f()}var w,P=_createForOfIteratorHelper(t.off);try{for(P.s();!(w=P.n()).done;){var A=w.value;_classPrivateFieldGet(this,d).get(A)._setVisible(l,!1)}}catch(t){P.e(t)}finally{P.f()}_classPrivateFieldSet(this,p,this.getHash())}}_createClass(OptionalContentConfig,[{key:"isVisible",value:function isVisible(t){if(0===_classPrivateFieldGet(this,d).size)return!0;if(!t){(0,a.warn)("Optional content group not defined.");return!0}if("OCG"===t.type){if(!_classPrivateFieldGet(this,d).has(t.id)){(0,a.warn)("Optional content group not found: ".concat(t.id));return!0}return _classPrivateFieldGet(this,d).get(t.id).visible}if("OCMD"===t.type){if(t.expression)return _classPrivateMethodGet(this,y,_evaluateVisibilityExpression2).call(this,t.expression);if(!t.policy||"AnyOn"===t.policy){var r,i=_createForOfIteratorHelper(t.ids);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(!_classPrivateFieldGet(this,d).has(o)){(0,a.warn)("Optional content group not found: ".concat(o));return!0}if(_classPrivateFieldGet(this,d).get(o).visible)return!0}}catch(t){i.e(t)}finally{i.f()}return!1}if("AllOn"===t.policy){var l,u=_createForOfIteratorHelper(t.ids);try{for(u.s();!(l=u.n()).done;){var c=l.value;if(!_classPrivateFieldGet(this,d).has(c)){(0,a.warn)("Optional content group not found: ".concat(c));return!0}if(!_classPrivateFieldGet(this,d).get(c).visible)return!1}}catch(t){u.e(t)}finally{u.f()}return!0}if("AnyOff"===t.policy){var h,p=_createForOfIteratorHelper(t.ids);try{for(p.s();!(h=p.n()).done;){var v=h.value;if(!_classPrivateFieldGet(this,d).has(v)){(0,a.warn)("Optional content group not found: ".concat(v));return!0}if(!_classPrivateFieldGet(this,d).get(v).visible)return!0}}catch(t){p.e(t)}finally{p.f()}return!1}if("AllOff"===t.policy){var g,m=_createForOfIteratorHelper(t.ids);try{for(m.s();!(g=m.n()).done;){var b=g.value;if(!_classPrivateFieldGet(this,d).has(b)){(0,a.warn)("Optional content group not found: ".concat(b));return!0}if(_classPrivateFieldGet(this,d).get(b).visible)return!1}}catch(t){m.e(t)}finally{m.f()}return!0}(0,a.warn)("Unknown optional content policy ".concat(t.policy,"."));return!0}(0,a.warn)("Unknown group type ".concat(t.type,"."));return!0}},{key:"setVisibility",value:function setVisibility(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(_classPrivateFieldGet(this,d).has(t)){_classPrivateFieldGet(this,d).get(t)._setVisible(l,!!r);_classPrivateFieldSet(this,h,null)}else(0,a.warn)("Optional content group not found: ".concat(t))}},{key:"hasInitialVisibility",get:function get(){return null===_classPrivateFieldGet(this,p)||this.getHash()===_classPrivateFieldGet(this,p)}},{key:"getOrder",value:function getOrder(){return _classPrivateFieldGet(this,d).size?_classPrivateFieldGet(this,v)?_classPrivateFieldGet(this,v).slice():_toConsumableArray(_classPrivateFieldGet(this,d).keys()):null}},{key:"getGroups",value:function getGroups(){return _classPrivateFieldGet(this,d).size>0?(0,a.objectFromMap)(_classPrivateFieldGet(this,d)):null}},{key:"getGroup",value:function getGroup(t){return _classPrivateFieldGet(this,d).get(t)||null}},{key:"getHash",value:function getHash(){if(null!==_classPrivateFieldGet(this,h))return _classPrivateFieldGet(this,h);var t,r=new o.MurmurHash3_64,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,d));try{for(i.s();!(t=i.n()).done;){var a=_slicedToArray(t.value,2),l=a[0],u=a[1];r.update("".concat(l,":").concat(u.visible))}}catch(t){i.e(t)}finally{i.f()}return _classPrivateFieldSet(this,h,r.hexdigest())}}]);return OptionalContentConfig}();r.OptionalContentConfig=g;function _evaluateVisibilityExpression2(t){var r=t.length;if(r<2)return!0;for(var i=t[0],o=1;o<r;o++){var l=t[o],u=void 0;if(Array.isArray(l))u=_classPrivateMethodGet(this,y,_evaluateVisibilityExpression2).call(this,l);else{if(!_classPrivateFieldGet(this,d).has(l)){(0,a.warn)("Optional content group not found: ".concat(l));return!0}u=_classPrivateFieldGet(this,d).get(l).visible}switch(i){case"And":if(!u)return!1;break;case"Or":if(u)return!0;break;case"Not":return!u;default:return!0}}return"And"===i}},(t,r,i)=>{i(255);i(92);i(148);i(105);i(104);i(301);i(149);i(306);i(307);i(308);i(309);i(2);i(310);Object.defineProperty(r,"__esModule",{value:!0});r.PDFDataTransportStream=void 0;i(140);i(146);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(167);i(390);i(357);i(258);i(85);i(90);i(292);i(300);i(123);i(112);i(259);var a=i(1),o=i(362);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=function(){function PDFDataTransportStream(t,r){var i=this,o=t.length,l=t.initialData,u=t.progressiveDone,c=void 0!==u&&u,h=t.contentDispositionFilename,d=void 0===h?null:h,p=t.disableRange,v=void 0!==p&&p,y=t.disableStream,g=void 0!==y&&y;_classCallCheck(this,PDFDataTransportStream);(0,a.assert)(r,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');this._queuedChunks=[];this._progressiveDone=c;this._contentDispositionFilename=d;if((null==l?void 0:l.length)>0){var m=l instanceof Uint8Array&&l.byteLength===l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer;this._queuedChunks.push(m)}this._pdfDataRangeTransport=r;this._isStreamingSupported=!g;this._isRangeSupported=!v;this._contentLength=o;this._fullRequestReader=null;this._rangeReaders=[];this._pdfDataRangeTransport.addRangeListener((function(t,r){i._onReceiveData({begin:t,chunk:r})}));this._pdfDataRangeTransport.addProgressListener((function(t,r){i._onProgress({loaded:t,total:r})}));this._pdfDataRangeTransport.addProgressiveReadListener((function(t){i._onReceiveData({chunk:t})}));this._pdfDataRangeTransport.addProgressiveDoneListener((function(){i._onProgressiveDone()}));this._pdfDataRangeTransport.transportReady()}_createClass(PDFDataTransportStream,[{key:"_onReceiveData",value:function _onReceiveData(t){var r=t.begin,i=t.chunk,o=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(void 0===r)this._fullRequestReader?this._fullRequestReader._enqueue(o):this._queuedChunks.push(o);else{var l=this._rangeReaders.some((function(t){if(t._begin!==r)return!1;t._enqueue(o);return!0}));(0,a.assert)(l,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}},{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"_onProgress",value:function _onProgress(t){if(void 0===t.total){var r,i;null===(r=this._rangeReaders[0])||void 0===r||null===(i=r.onProgress)||void 0===i||i.call(r,{loaded:t.loaded})}else{var a,o;null===(a=this._fullRequestReader)||void 0===a||null===(o=a.onProgress)||void 0===o||o.call(a,{loaded:t.loaded,total:t.total})}}},{key:"_onProgressiveDone",value:function _onProgressiveDone(){var t;null===(t=this._fullRequestReader)||void 0===t||t.progressiveDone();this._progressiveDone=!0}},{key:"_removeRangeReader",value:function _removeRangeReader(t){var r=this._rangeReaders.indexOf(t);r>=0&&this._rangeReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var t=this._queuedChunks;this._queuedChunks=null;return new u(this,t,this._progressiveDone,this._contentDispositionFilename)}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var i=new c(this,t,r);this._pdfDataRangeTransport.requestDataRange(t,r);this._rangeReaders.push(i);return i}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var i,a=_createForOfIteratorHelper(this._rangeReaders.slice(0));try{for(a.s();!(i=a.n()).done;){i.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}this._pdfDataRangeTransport.abort()}}]);return PDFDataTransportStream}();r.PDFDataTransportStream=l;var u=function(){function PDFDataTransportStreamReader(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;_classCallCheck(this,PDFDataTransportStreamReader);this._stream=t;this._done=i||!1;this._filename=(0,o.isPdfFile)(a)?a:null;this._queuedChunks=r||[];this._loaded=0;var l,u=_createForOfIteratorHelper(this._queuedChunks);try{for(u.s();!(l=u.n()).done;){var c=l.value;this._loaded+=c.byteLength}}catch(t){u.e(t)}finally{u.f()}this._requests=[];this._headersReady=Promise.resolve();t._fullRequestReader=this;this.onProgress=null}_createClass(PDFDataTransportStreamReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}else this._queuedChunks.push(t);this._loaded+=t.byteLength}}},{key:"headersReady",get:function get(){return this._headersReady}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._stream._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._stream._isStreamingSupported}},{key:"contentLength",get:function get(){return this._stream._contentLength}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(!(this._queuedChunks.length>0)){i.next=3;break}t=this._queuedChunks.shift();return i.abrupt("return",{value:t,done:!1});case 3:if(!this._done){i.next=5;break}return i.abrupt("return",{value:void 0,done:!0});case 5:r=new a.PromiseCapability;this._requests.push(r);return i.abrupt("return",r.promise);case 8:case"end":return i.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0}},{key:"progressiveDone",value:function progressiveDone(){this._done||(this._done=!0)}}]);var t;return PDFDataTransportStreamReader}(),c=function(){function PDFDataTransportStreamRangeReader(t,r,i){_classCallCheck(this,PDFDataTransportStreamRangeReader);this._stream=t;this._begin=r;this._end=i;this._queuedChunk=null;this._requests=[];this._done=!1;this.onProgress=null}_createClass(PDFDataTransportStreamRangeReader,[{key:"_enqueue",value:function _enqueue(t){if(!this._done){if(0===this._requests.length)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0}this._done=!0;this._stream._removeRangeReader(this)}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r;return _regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:if(!this._queuedChunk){i.next=4;break}t=this._queuedChunk;this._queuedChunk=null;return i.abrupt("return",{value:t,done:!1});case 4:if(!this._done){i.next=6;break}return i.abrupt("return",{value:void 0,done:!0});case 6:r=new a.PromiseCapability;this._requests.push(r);return i.abrupt("return",r.promise);case 9:case"end":return i.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._stream._removeRangeReader(this)}}]);var t;return PDFDataTransportStreamRangeReader}()},(t,r,i)=>{var a=i(3),o=i(95),l=i(60).indexOf,u=i(215),c=o([].indexOf),h=!!c&&1/c([1],1,-0)<0;a({target:"Array",proto:!0,forced:h||!u("indexOf")},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return h?c(this,t,r)||0:l(this,t,r)}})},(t,r,i)=>{i(85);i(90);i(292);i(300);i(123);i(112);i(255);i(92);i(148);i(301);i(149);i(306);i(307);i(308);i(309);i(2);i(310);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFFetchStream=void 0;i(140);i(146);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(105);i(104);i(167);i(258);i(259);i(257);var a=i(1),o=i(392);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function createFetchOptions(t,r,i){return{method:"GET",headers:t,signal:i.signal,mode:"cors",credentials:r?"include":"same-origin",redirect:"follow"}}function createHeaders(t){var r=new Headers;for(var i in t){var a=t[i];void 0!==a&&r.append(i,a)}return r}function getArrayBuffer(t){if(t instanceof Uint8Array)return t.buffer;if(t instanceof ArrayBuffer)return t;(0,a.warn)("getArrayBuffer - unexpected data format: ".concat(t));return new Uint8Array(t).buffer}var l=function(){function PDFFetchStream(t){_classCallCheck(this,PDFFetchStream);this.source=t;this.isHttp=/^https?:/i.test(t.url);this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFFetchStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once.");this._fullRequestReader=new u(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var i=new c(this,t,r);this._rangeRequestReaders.push(i);return i}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var i,a=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(a.s();!(i=a.n()).done;){i.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}}}]);return PDFFetchStream}();r.PDFFetchStream=l;var u=function(){function PDFFetchStreamReader(t){var r=this;_classCallCheck(this,PDFFetchStreamReader);this._stream=t;this._reader=null;this._loaded=0;this._filename=null;var i=t.source;this._withCredentials=i.withCredentials||!1;this._contentLength=i.length;this._headersCapability=new a.PromiseCapability;this._disableRange=i.disableRange||!1;this._rangeChunkSize=i.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._abortController=new AbortController;this._isStreamingSupported=!i.disableStream;this._isRangeSupported=!i.disableRange;this._headers=createHeaders(this._stream.httpHeaders);var l=i.url;fetch(l,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,o.validateResponseStatus)(t.status))throw(0,o.createResponseStatusError)(t.status,l);r._reader=t.body.getReader();r._headersCapability.resolve();var i=function getResponseHeader(r){return t.headers.get(r)},u=(0,o.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),c=u.allowRangeRequests,h=u.suggestedLength;r._isRangeSupported=c;r._contentLength=h||r._contentLength;r._filename=(0,o.extractFilenameFromHeader)(i);!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new a.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,a;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._headersCapability.promise;case 2:o.next=4;return this._reader.read();case 4:r=o.sent;i=r.value;if(!(a=r.done)){o.next=9;break}return o.abrupt("return",{value:i,done:a});case 9:this._loaded+=i.byteLength;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});return o.abrupt("return",{value:getArrayBuffer(i),done:!1});case 12:case"end":return o.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){var r;null===(r=this._reader)||void 0===r||r.cancel(t);this._abortController.abort()}}]);var t;return PDFFetchStreamReader}(),c=function(){function PDFFetchStreamRangeReader(t,r,i){var l=this;_classCallCheck(this,PDFFetchStreamRangeReader);this._stream=t;this._reader=null;this._loaded=0;var u=t.source;this._withCredentials=u.withCredentials||!1;this._readCapability=new a.PromiseCapability;this._isStreamingSupported=!u.disableStream;this._abortController=new AbortController;this._headers=createHeaders(this._stream.httpHeaders);this._headers.append("Range","bytes=".concat(r,"-").concat(i-1));var c=u.url;fetch(c,createFetchOptions(this._headers,this._withCredentials,this._abortController)).then((function(t){if(!(0,o.validateResponseStatus)(t.status))throw(0,o.createResponseStatusError)(t.status,c);l._readCapability.resolve();l._reader=t.body.getReader()})).catch(this._readCapability.reject);this.onProgress=null}_createClass(PDFFetchStreamRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,a;return _regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:o.next=4;return this._reader.read();case 4:r=o.sent;i=r.value;if(!(a=r.done)){o.next=9;break}return o.abrupt("return",{value:i,done:a});case 9:this._loaded+=i.byteLength;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});return o.abrupt("return",{value:getArrayBuffer(i),done:!1});case 12:case"end":return o.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){var r;null===(r=this._reader)||void 0===r||r.cancel(t);this._abortController.abort()}}]);var t;return PDFFetchStreamRangeReader}()},(t,r,i)=>{Object.defineProperty(r,"__esModule",{value:!0});r.createResponseStatusError=function createResponseStatusError(t,r){if(404===t||0===t&&r.startsWith("file:"))return new a.MissingPDFException('Missing PDF "'+r+'".');return new a.UnexpectedResponseException("Unexpected server response (".concat(t,') while retrieving PDF "').concat(r,'".'),t)};r.extractFilenameFromHeader=function extractFilenameFromHeader(t){var r=t("Content-Disposition");if(r){var i=(0,o.getFilenameFromContentDispositionHeader)(r);if(i.includes("%"))try{i=decodeURIComponent(i)}catch(t){}if((0,l.isPdfFile)(i))return i}return null};r.validateRangeRequestCapabilities=function validateRangeRequestCapabilities(t){var r=t.getResponseHeader,i=t.isHttp,a=t.rangeChunkSize,o=t.disableRange,l={allowRangeRequests:!1,suggestedLength:void 0},u=parseInt(r("Content-Length"),10);if(!Number.isInteger(u))return l;l.suggestedLength=u;if(u<=2*a)return l;if(o||!i)return l;if("bytes"!==r("Accept-Ranges"))return l;if("identity"!==(r("Content-Encoding")||"identity"))return l;l.allowRangeRequests=!0;return l};r.validateResponseStatus=function validateResponseStatus(t){return 200===t||206===t};i(112);i(247);i(248);i(131);i(257);var a=i(1),o=i(393),l=i(362)},(t,r,i)=>{i(292);i(300);i(146);i(301);i(140);i(148);i(149);i(92);i(123);Object.defineProperty(r,"__esModule",{value:!0});r.getFilenameFromContentDispositionHeader=function getFilenameFromContentDispositionHeader(t){var r=!0,i=toParamRegExp("filename\\*","i").exec(t);if(i){var o=rfc2616unquote(i=i[1]);return fixupEncoding(o=rfc2047decode(o=rfc5987decode(o=unescape(o))))}if(i=function rfc2231getparam(t){var r,i=[],a=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(r=a.exec(t));){var o=_slicedToArray(r,4),l=o[1],u=o[2],c=o[3];if((l=parseInt(l,10))in i){if(0===l)break}else i[l]=[u,c]}for(var h=[],d=0;d<i.length&&d in i;++d){var p=_slicedToArray(i[d],2),v=p[0],y=p[1];y=rfc2616unquote(y);if(v){y=unescape(y);0===d&&(y=rfc5987decode(y))}h.push(y)}return h.join("")}(t)){return fixupEncoding(rfc2047decode(i))}if(i=toParamRegExp("filename","i").exec(t)){var l=rfc2616unquote(i=i[1]);return fixupEncoding(l=rfc2047decode(l))}function toParamRegExp(t,r){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',r)}function textdecode(t,i){if(t){if(!/^[\x00-\xFF]+$/.test(i))return i;try{var o=new TextDecoder(t,{fatal:!0}),l=(0,a.stringToBytes)(i);i=o.decode(l);r=!1}catch(t){}}return i}function fixupEncoding(t){if(r&&/[\x80-\xff]/.test(t)){t=textdecode("utf-8",t);r&&(t=textdecode("iso-8859-1",t))}return t}function rfc2616unquote(t){if(t.startsWith('"')){for(var r=t.slice(1).split('\\"'),i=0;i<r.length;++i){var a=r[i].indexOf('"');if(-1!==a){r[i]=r[i].slice(0,a);r.length=i+1}r[i]=r[i].replaceAll(/\\(.)/g,"$1")}t=r.join('"')}return t}function rfc5987decode(t){var r=t.indexOf("'");return-1===r?t:textdecode(t.slice(0,r),t.slice(r+1).replace(/^[^']*'/,""))}function rfc2047decode(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,r,i,a){if("q"===i||"Q"===i)return textdecode(r,a=(a=a.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,(function(t,r){return String.fromCharCode(parseInt(r,16))})));try{a=atob(a)}catch(t){}return textdecode(r,a)}))}return""};i(105);i(368);i(369);i(370);i(255);i(104);i(167);i(131);i(258);i(390);i(289);i(291);i(338);i(342);i(343);var a=i(1);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}},(t,r,i)=>{i(301);i(140);i(148);i(149);i(255);i(92);i(259);i(306);i(307);i(308);i(309);i(2);i(310);Object.defineProperty(r,"__esModule",{value:!0});r.PDFNetworkStream=void 0;i(105);i(104);i(257);i(85);i(90);i(292);i(300);i(146);i(123);i(112);i(390);i(357);i(167);i(258);var a=i(1),o=i(392);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=function(){function NetworkManager(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,NetworkManager);this.url=t;this.isHttp=/^https?:/i.test(t);this.httpHeaders=this.isHttp&&r.httpHeaders||Object.create(null);this.withCredentials=r.withCredentials||!1;this.currXhrId=0;this.pendingRequests=Object.create(null)}_createClass(NetworkManager,[{key:"requestRange",value:function requestRange(t,r,i){var a={begin:t,end:r};for(var o in i)a[o]=i[o];return this.request(a)}},{key:"requestFull",value:function requestFull(t){return this.request(t)}},{key:"request",value:function request(t){var r=new XMLHttpRequest,i=this.currXhrId++,a=this.pendingRequests[i]={xhr:r};r.open("GET",this.url);r.withCredentials=this.withCredentials;for(var o in this.httpHeaders){var l=this.httpHeaders[o];void 0!==l&&r.setRequestHeader(o,l)}if(this.isHttp&&"begin"in t&&"end"in t){r.setRequestHeader("Range","bytes=".concat(t.begin,"-").concat(t.end-1));a.expectedStatus=206}else a.expectedStatus=200;r.responseType="arraybuffer";t.onError&&(r.onerror=function(i){t.onError(r.status)});r.onreadystatechange=this.onStateChange.bind(this,i);r.onprogress=this.onProgress.bind(this,i);a.onHeadersReceived=t.onHeadersReceived;a.onDone=t.onDone;a.onError=t.onError;a.onProgress=t.onProgress;r.send(null);return i}},{key:"onProgress",value:function onProgress(t,r){var i,a=this.pendingRequests[t];a&&(null===(i=a.onProgress)||void 0===i||i.call(a,r))}},{key:"onStateChange",value:function onStateChange(t,r){var i=this.pendingRequests[t];if(i){var o=i.xhr;if(o.readyState>=2&&i.onHeadersReceived){i.onHeadersReceived();delete i.onHeadersReceived}if(4===o.readyState&&t in this.pendingRequests){delete this.pendingRequests[t];if(0===o.status&&this.isHttp){var l;null===(l=i.onError)||void 0===l||l.call(i,o.status)}else{var u=o.status||200;if(200===u&&206===i.expectedStatus||u===i.expectedStatus){var c=function getArrayBuffer(t){var r=t.response;return"string"!=typeof r?r:(0,a.stringToBytes)(r).buffer}(o);if(206===u){var h=o.getResponseHeader("Content-Range"),d=/bytes (\d+)-(\d+)\/(\d+)/.exec(h);i.onDone({begin:parseInt(d[1],10),chunk:c})}else if(c)i.onDone({begin:0,chunk:c});else{var p;null===(p=i.onError)||void 0===p||p.call(i,o.status)}}else{var v;null===(v=i.onError)||void 0===v||v.call(i,o.status)}}}}}},{key:"getRequestXhr",value:function getRequestXhr(t){return this.pendingRequests[t].xhr}},{key:"isPendingRequest",value:function isPendingRequest(t){return t in this.pendingRequests}},{key:"abortRequest",value:function abortRequest(t){var r=this.pendingRequests[t].xhr;delete this.pendingRequests[t];r.abort()}}]);return NetworkManager}(),u=function(){function PDFNetworkStream(t){_classCallCheck(this,PDFNetworkStream);this._source=t;this._manager=new l(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials});this._rangeChunkSize=t.rangeChunkSize;this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNetworkStream,[{key:"_onRangeRequestReaderClosed",value:function _onRangeRequestReaderClosed(t){var r=this._rangeRequestReaders.indexOf(t);r>=0&&this._rangeRequestReaders.splice(r,1)}},{key:"getFullReader",value:function getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once.");this._fullRequestReader=new c(this._manager,this._source);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){var i=new h(this._manager,t,r);i.onClosed=this._onRangeRequestReaderClosed.bind(this);this._rangeRequestReaders.push(i);return i}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var i,a=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(a.s();!(i=a.n()).done;){i.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}}}]);return PDFNetworkStream}();r.PDFNetworkStream=u;var c=function(){function PDFNetworkStreamFullRequestReader(t,r){_classCallCheck(this,PDFNetworkStreamFullRequestReader);this._manager=t;var i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url;this._fullRequestId=t.requestFull(i);this._headersReceivedCapability=new a.PromiseCapability;this._disableRange=r.disableRange||!1;this._contentLength=r.length;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!1;this._isRangeSupported=!1;this._cachedChunks=[];this._requests=[];this._done=!1;this._storedError=void 0;this._filename=null;this.onProgress=null}_createClass(PDFNetworkStreamFullRequestReader,[{key:"_onHeadersReceived",value:function _onHeadersReceived(){var t=this._fullRequestId,r=this._manager.getRequestXhr(t),i=function getResponseHeader(t){return r.getResponseHeader(t)},a=(0,o.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),l=a.allowRangeRequests,u=a.suggestedLength;l&&(this._isRangeSupported=!0);this._contentLength=u||this._contentLength;this._filename=(0,o.extractFilenameFromHeader)(i);this._isRangeSupported&&this._manager.abortRequest(t);this._headersReceivedCapability.resolve()}},{key:"_onDone",value:function _onDone(t){if(t)if(this._requests.length>0){this._requests.shift().resolve({value:t.chunk,done:!1})}else this._cachedChunks.push(t.chunk);this._done=!0;if(!(this._cachedChunks.length>0)){var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0}}},{key:"_onError",value:function _onError(t){this._storedError=(0,o.createResponseStatusError)(t,this._url);this._headersReceivedCapability.reject(this._storedError);var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.reject(this._storedError)}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._cachedChunks.length=0}},{key:"_onProgress",value:function _onProgress(t){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}},{key:"filename",get:function get(){return this._filename}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"headersReady",get:function get(){return this._headersReceivedCapability.promise}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(!this._storedError){i.next=2;break}throw this._storedError;case 2:if(!(this._cachedChunks.length>0)){i.next=5;break}t=this._cachedChunks.shift();return i.abrupt("return",{value:t,done:!1});case 5:if(!this._done){i.next=7;break}return i.abrupt("return",{value:void 0,done:!0});case 7:r=new a.PromiseCapability;this._requests.push(r);return i.abrupt("return",r.promise);case 10:case"end":return i.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;this._headersReceivedCapability.reject(t);var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId);this._fullRequestReader=null}}]);var t;return PDFNetworkStreamFullRequestReader}(),h=function(){function PDFNetworkStreamRangeRequestReader(t,r,i){_classCallCheck(this,PDFNetworkStreamRangeRequestReader);this._manager=t;var a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url;this._requestId=t.requestRange(r,i,a);this._requests=[];this._queuedChunk=null;this._done=!1;this._storedError=void 0;this.onProgress=null;this.onClosed=null}_createClass(PDFNetworkStreamRangeRequestReader,[{key:"_close",value:function _close(){var t;null===(t=this.onClosed)||void 0===t||t.call(this,this)}},{key:"_onDone",value:function _onDone(t){var r=t.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:r,done:!1})}else this._queuedChunk=r;this._done=!0;var i,a=_createForOfIteratorHelper(this._requests);try{for(a.s();!(i=a.n()).done;){i.value.resolve({value:void 0,done:!0})}}catch(t){a.e(t)}finally{a.f()}this._requests.length=0;this._close()}},{key:"_onError",value:function _onError(t){this._storedError=(0,o.createResponseStatusError)(t,this._url);var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.reject(this._storedError)}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._queuedChunk=null}},{key:"_onProgress",value:function _onProgress(t){if(!this.isStreamingSupported){var r;null===(r=this.onProgress)||void 0===r||r.call(this,{loaded:t.loaded})}}},{key:"isStreamingSupported",get:function get(){return!1}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r;return _regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:if(!this._storedError){i.next=2;break}throw this._storedError;case 2:if(null===this._queuedChunk){i.next=6;break}t=this._queuedChunk;this._queuedChunk=null;return i.abrupt("return",{value:t,done:!1});case 6:if(!this._done){i.next=8;break}return i.abrupt("return",{value:void 0,done:!0});case 8:r=new a.PromiseCapability;this._requests.push(r);return i.abrupt("return",r.promise);case 11:case"end":return i.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._done=!0;var r,i=_createForOfIteratorHelper(this._requests);try{for(i.s();!(r=i.n()).done;){r.value.resolve({value:void 0,done:!0})}}catch(t){i.e(t)}finally{i.f()}this._requests.length=0;this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId);this._close()}}]);var t;return PDFNetworkStreamRangeRequestReader}()},(t,r,i)=>{i(85);i(90);i(292);i(300);i(123);i(112);i(255);i(92);i(148);i(301);i(149);i(259);i(306);i(307);i(308);i(309);i(2);i(310);i(71);i(73);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFNodeStream=void 0;i(105);i(104);i(167);i(258);i(140);i(146);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(257);i(289);var a=i(1),o=i(392);function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var l=/^file:\/\/\/[a-zA-Z]:\//;var u=function(){function PDFNodeStream(t){_classCallCheck(this,PDFNodeStream);this.source=t;this.url=function parseUrl(t){var r=require("url"),i=r.parse(t);if("file:"===i.protocol||i.host)return i;if(/^[a-z]:[/\\]/i.test(t))return r.parse("file:///".concat(t));i.host||(i.protocol="file:");return i}(t.url);this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol||"capacitor:"===this.url.protocol;this.isFsUrl="file:"===this.url.protocol;this.httpHeaders=this.isHttp&&t.httpHeaders||{};this._fullRequestReader=null;this._rangeRequestReaders=[]}_createClass(PDFNodeStream,[{key:"_progressiveDataLength",get:function get(){var t,r;return null!==(t=null===(r=this._fullRequestReader)||void 0===r?void 0:r._loaded)&&void 0!==t?t:0}},{key:"getFullReader",value:function getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once.");this._fullRequestReader=this.isFsUrl?new v(this):new d(this);return this._fullRequestReader}},{key:"getRangeReader",value:function getRangeReader(t,r){if(r<=this._progressiveDataLength)return null;var i=this.isFsUrl?new y(this,t,r):new p(this,t,r);this._rangeRequestReaders.push(i);return i}},{key:"cancelAllRequests",value:function cancelAllRequests(t){var r;null===(r=this._fullRequestReader)||void 0===r||r.cancel(t);var i,a=_createForOfIteratorHelper(this._rangeRequestReaders.slice(0));try{for(a.s();!(i=a.n()).done;){i.value.cancel(t)}}catch(t){a.e(t)}finally{a.f()}}}]);return PDFNodeStream}();r.PDFNodeStream=u;var c=function(){function BaseFullReader(t){_classCallCheck(this,BaseFullReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;var r=t.source;this._contentLength=r.length;this._loaded=0;this._filename=null;this._disableRange=r.disableRange||!1;this._rangeChunkSize=r.rangeChunkSize;this._rangeChunkSize||this._disableRange||(this._disableRange=!0);this._isStreamingSupported=!r.disableStream;this._isRangeSupported=!r.disableRange;this._readableStream=null;this._readCapability=new a.PromiseCapability;this._headersCapability=new a.PromiseCapability}_createClass(BaseFullReader,[{key:"headersReady",get:function get(){return this._headersCapability.promise}},{key:"filename",get:function get(){return this._filename}},{key:"contentLength",get:function get(){return this._contentLength}},{key:"isRangeSupported",get:function get(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:if(!this._done){o.next=4;break}return o.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){o.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){o.next=10;break}this._readCapability=new a.PromiseCapability;return o.abrupt("return",this.read());case 10:this._loaded+=r.length;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded,total:this._contentLength});i=new Uint8Array(r).buffer;return o.abrupt("return",{value:i,done:!1});case 14:case"end":return o.stop()}}),_callee,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));!this._isStreamingSupported&&this._isRangeSupported&&this._error(new a.AbortException("streaming is disabled"));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseFullReader}(),h=function(){function BaseRangeReader(t){_classCallCheck(this,BaseRangeReader);this._url=t.url;this._done=!1;this._storedError=null;this.onProgress=null;this._loaded=0;this._readableStream=null;this._readCapability=new a.PromiseCapability;var r=t.source;this._isStreamingSupported=!r.disableStream}_createClass(BaseRangeReader,[{key:"isStreamingSupported",get:function get(){return this._isStreamingSupported}},{key:"read",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i;return _regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._readCapability.promise;case 2:if(!this._done){o.next=4;break}return o.abrupt("return",{value:void 0,done:!0});case 4:if(!this._storedError){o.next=6;break}throw this._storedError;case 6:if(null!==(r=this._readableStream.read())){o.next=10;break}this._readCapability=new a.PromiseCapability;return o.abrupt("return",this.read());case 10:this._loaded+=r.length;null===(t=this.onProgress)||void 0===t||t.call(this,{loaded:this._loaded});i=new Uint8Array(r).buffer;return o.abrupt("return",{value:i,done:!1});case 14:case"end":return o.stop()}}),_callee2,this)}))),function read(){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}},{key:"_error",value:function _error(t){this._storedError=t;this._readCapability.resolve()}},{key:"_setReadableStream",value:function _setReadableStream(t){var r=this;this._readableStream=t;t.on("readable",(function(){r._readCapability.resolve()}));t.on("end",(function(){t.destroy();r._done=!0;r._readCapability.resolve()}));t.on("error",(function(t){r._error(t)}));this._storedError&&this._readableStream.destroy(this._storedError)}}]);var t;return BaseRangeReader}();function createRequestOptions(t,r){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:r}}var d=function(t){_inherits(PDFNodeStreamFullReader,t);var r=_createSuper(PDFNodeStreamFullReader);function PDFNodeStreamFullReader(t){var i;_classCallCheck(this,PDFNodeStreamFullReader);var l=function handleResponse(r){if(404!==r.statusCode){i._headersCapability.resolve();i._setReadableStream(r);var l=function getResponseHeader(t){return i._readableStream.headers[t.toLowerCase()]},u=(0,o.validateRangeRequestCapabilities)({getResponseHeader:l,isHttp:t.isHttp,rangeChunkSize:i._rangeChunkSize,disableRange:i._disableRange}),c=u.allowRangeRequests,h=u.suggestedLength;i._isRangeSupported=c;i._contentLength=h||i._contentLength;i._filename=(0,o.extractFilenameFromHeader)(l)}else{var d=new a.MissingPDFException('Missing PDF "'.concat(i._url,'".'));i._storedError=d;i._headersCapability.reject(d)}};(i=r.call(this,t))._request=null;if("http:"===i._url.protocol){var u=require("http");i._request=u.request(createRequestOptions(i._url,t.httpHeaders),l)}else{var c=require("https");i._request=c.request(createRequestOptions(i._url,t.httpHeaders),l)}i._request.on("error",(function(t){i._storedError=t;i._headersCapability.reject(t)}));i._request.end();return i}return _createClass(PDFNodeStreamFullReader)}(c),p=function(t){_inherits(PDFNodeStreamRangeReader,t);var r=_createSuper(PDFNodeStreamRangeReader);function PDFNodeStreamRangeReader(t,i,o){var l;_classCallCheck(this,PDFNodeStreamRangeReader);(l=r.call(this,t))._httpHeaders={};for(var u in t.httpHeaders){var c=t.httpHeaders[u];void 0!==c&&(l._httpHeaders[u]=c)}l._httpHeaders.Range="bytes=".concat(i,"-").concat(o-1);var h=function handleResponse(t){if(404!==t.statusCode)l._setReadableStream(t);else{var r=new a.MissingPDFException('Missing PDF "'.concat(l._url,'".'));l._storedError=r}};l._request=null;if("http:"===l._url.protocol){var d=require("http");l._request=d.request(createRequestOptions(l._url,l._httpHeaders),h)}else{var p=require("https");l._request=p.request(createRequestOptions(l._url,l._httpHeaders),h)}l._request.on("error",(function(t){l._storedError=t}));l._request.end();return l}return _createClass(PDFNodeStreamRangeReader)}(h),v=function(t){_inherits(PDFNodeStreamFsFullReader,t);var r=_createSuper(PDFNodeStreamFsFullReader);function PDFNodeStreamFsFullReader(t){var i;_classCallCheck(this,PDFNodeStreamFsFullReader);i=r.call(this,t);var o=decodeURIComponent(i._url.path);l.test(i._url.href)&&(o=o.replace(/^\//,""));var u=require("fs");u.lstat(o,(function(t,r){if(t){"ENOENT"===t.code&&(t=new a.MissingPDFException('Missing PDF "'.concat(o,'".')));i._storedError=t;i._headersCapability.reject(t)}else{i._contentLength=r.size;i._setReadableStream(u.createReadStream(o));i._headersCapability.resolve()}}));return i}return _createClass(PDFNodeStreamFsFullReader)}(c),y=function(t){_inherits(PDFNodeStreamFsRangeReader,t);var r=_createSuper(PDFNodeStreamFsRangeReader);function PDFNodeStreamFsRangeReader(t,i,a){var o;_classCallCheck(this,PDFNodeStreamFsRangeReader);o=r.call(this,t);var u=decodeURIComponent(o._url.path);l.test(o._url.href)&&(u=u.replace(/^\//,""));var c=require("fs");o._setReadableStream(c.createReadStream(u,{start:i,end:a-1}));return o}return _createClass(PDFNodeStreamFsRangeReader)}(h)},(t,r,i)=>{i(85);i(90);i(292);i(300);i(92);i(105);i(104);i(301);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.SVGGraphics=void 0;i(140);i(146);i(148);i(149);i(152);i(163);i(164);i(165);i(166);i(171);i(192);i(193);i(196);i(197);i(198);i(203);i(204);i(205);i(207);i(208);i(209);i(210);i(211);i(212);i(213);i(216);i(217);i(219);i(220);i(221);i(222);i(223);i(224);i(228);i(229);i(231);i(232);i(233);i(235);i(238);i(244);i(377);i(123);i(167);i(358);i(359);i(112);i(255);i(257);i(131);i(259);i(378);i(397);i(355);i(249);i(258);var a=i(362),o=i(1);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var l="normal",u="normal",c="#000000",h=["butt","round","square"],d=["miter","round","bevel"],p=function createObjectURL(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&"undefined"!=typeof Blob&&!i)return URL.createObjectURL(new Blob([t],{type:r}));for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="data:".concat(r,";base64,"),l=0,u=t.length;l<u;l+=3){var c=255&t[l],h=255&t[l+1],d=255&t[l+2];o+=a[c>>2]+a[(3&c)<<4|h>>4]+a[l+1<u?(15&h)<<2|d>>6:64]+a[l+2<u?63&d:64]}return o},v=function(){for(var t=new Uint8Array([137,80,78,71,13,10,26,10]),r=new Int32Array(256),i=0;i<256;i++){for(var a=i,l=0;l<8;l++)a=1&a?3988292384^a>>1&2147483647:a>>1&2147483647;r[i]=a}function writePngChunk(t,i,a,o){var l=o,u=i.length;a[l]=u>>24&255;a[l+1]=u>>16&255;a[l+2]=u>>8&255;a[l+3]=255&u;a[l+=4]=255&t.charCodeAt(0);a[l+1]=255&t.charCodeAt(1);a[l+2]=255&t.charCodeAt(2);a[l+3]=255&t.charCodeAt(3);l+=4;a.set(i,l);var c=function crc32(t,i,a){for(var o=-1,l=i;l<a;l++){var u=255&(o^t[l]);o=o>>>8^r[u]}return-1^o}(a,o+4,l+=i.length);a[l]=c>>24&255;a[l+1]=c>>16&255;a[l+2]=c>>8&255;a[l+3]=255&c}function deflateSyncUncompressed(t){var r=t.length,i=65535,a=Math.ceil(r/i),o=new Uint8Array(2+r+5*a+4),l=0;o[l++]=120;o[l++]=156;for(var u=0;r>i;){o[l++]=0;o[l++]=255;o[l++]=255;o[l++]=0;o[l++]=0;o.set(t.subarray(u,u+i),l);l+=i;u+=i;r-=i}o[l++]=1;o[l++]=255&r;o[l++]=r>>8&255;o[l++]=255&~r;o[l++]=(65535&~r)>>8&255;o.set(t.subarray(u),l);l+=t.length-u;var c=function adler32(t,r,i){for(var a=1,o=0,l=r;l<i;++l)o=(o+(a=(a+(255&t[l]))%65521))%65521;return o<<16|a}(t,0,t.length);o[l++]=c>>24&255;o[l++]=c>>16&255;o[l++]=c>>8&255;o[l++]=255&c;return o}function encode(r,i,a,l){var u,c,h,d=r.width,v=r.height,y=r.data;switch(i){case o.ImageKind.GRAYSCALE_1BPP:c=0;u=1;h=d+7>>3;break;case o.ImageKind.RGB_24BPP:c=2;u=8;h=3*d;break;case o.ImageKind.RGBA_32BPP:c=6;u=8;h=4*d;break;default:throw new Error("invalid format")}for(var g=new Uint8Array((1+h)*v),m=0,b=0,w=0;w<v;++w){g[m++]=0;g.set(y.subarray(b,b+h),m);b+=h;m+=h}if(i===o.ImageKind.GRAYSCALE_1BPP&&l){m=0;for(var P=0;P<v;P++){m++;for(var A=0;A<h;A++)g[m++]^=255}}var S=new Uint8Array([d>>24&255,d>>16&255,d>>8&255,255&d,v>>24&255,v>>16&255,v>>8&255,255&v,u,c,0,0,0]),E=function deflateSync(t){if(!o.isNodeJS)return deflateSyncUncompressed(t);try{var r=parseInt(process.versions.node)>=8?t:Buffer.from(t),i=require("zlib").deflateSync(r,{level:9});return i instanceof Uint8Array?i:new Uint8Array(i)}catch(t){(0,o.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+t)}return deflateSyncUncompressed(t)}(g),x=t.length+36+S.length+E.length,D=new Uint8Array(x),k=0;D.set(t,k);writePngChunk("IHDR",S,D,k+=t.length);writePngChunk("IDATA",E,D,k+=12+S.length);k+=12+E.length;writePngChunk("IEND",new Uint8Array(0),D,k);return p(D,"image/png",a)}return function convertImgDataToPng(t,r,i){return encode(t,void 0===t.kind?o.ImageKind.GRAYSCALE_1BPP:t.kind,r,i)}}(),y=function(){function SVGExtraState(){_classCallCheck(this,SVGExtraState);this.fontSizeScale=1;this.fontWeight=u;this.fontSize=0;this.textMatrix=o.IDENTITY_MATRIX;this.fontMatrix=o.FONT_IDENTITY_MATRIX;this.leading=0;this.textRenderingMode=o.TextRenderingMode.FILL;this.textMatrixScale=1;this.x=0;this.y=0;this.lineX=0;this.lineY=0;this.charSpacing=0;this.wordSpacing=0;this.textHScale=1;this.textRise=0;this.fillColor=c;this.strokeColor="#000000";this.fillAlpha=1;this.strokeAlpha=1;this.lineWidth=1;this.lineJoin="";this.lineCap="";this.miterLimit=0;this.dashArray=[];this.dashPhase=0;this.dependencies=[];this.activeClipUrl=null;this.clipGroup=null;this.maskId=""}_createClass(SVGExtraState,[{key:"clone",value:function clone(){return Object.create(this)}},{key:"setCurrentPoint",value:function setCurrentPoint(t,r){this.x=t;this.y=r}}]);return SVGExtraState}();function pf(t){if(Number.isInteger(t))return t.toString();var r=t.toFixed(10),i=r.length-1;if("0"!==r[i])return r;do{i--}while("0"===r[i]);return r.substring(0,"."===r[i]?i:i+1)}function pm(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":"scale(".concat(pf(t[0])," ").concat(pf(t[3]),")");if(t[0]===t[3]&&t[1]===-t[2]){var r=180*Math.acos(t[0])/Math.PI;return"rotate(".concat(pf(r),")")}}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return"translate(".concat(pf(t[4])," ").concat(pf(t[5]),")");return"matrix(".concat(pf(t[0])," ").concat(pf(t[1])," ").concat(pf(t[2])," ").concat(pf(t[3])," ").concat(pf(t[4])," ")+"".concat(pf(t[5]),")")}var g=0,m=0,b=0,w=function(){function SVGGraphics(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,SVGGraphics);(0,a.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future.");this.svgFactory=new a.DOMSVGFactory;this.current=new y;this.transformMatrix=o.IDENTITY_MATRIX;this.transformStack=[];this.extraStack=[];this.commonObjs=t;this.objs=r;this.pendingClip=null;this.pendingEOFill=!1;this.embedFonts=!1;this.embeddedFonts=Object.create(null);this.cssStyle=null;this.forceDataSchema=!!i;this._operatorIdMapping=[];for(var l in o.OPS)this._operatorIdMapping[o.OPS[l]]=l}_createClass(SVGGraphics,[{key:"getObject",value:function getObject(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof t?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):r}},{key:"save",value:function save(){this.transformStack.push(this.transformMatrix);var t=this.current;this.extraStack.push(t);this.current=t.clone()}},{key:"restore",value:function restore(){this.transformMatrix=this.transformStack.pop();this.current=this.extraStack.pop();this.pendingClip=null;this.tgrp=null}},{key:"group",value:function group(t){this.save();this.executeOpTree(t);this.restore()}},{key:"loadDependencies",value:function loadDependencies(t){for(var r=this,i=t.fnArray,a=t.argsArray,l=0,u=i.length;l<u;l++)if(i[l]===o.OPS.dependency){var c,h=_createForOfIteratorHelper(a[l]);try{var d=function _loop(){var t=c.value,i=t.startsWith("g_")?r.commonObjs:r.objs,a=new Promise((function(r){i.get(t,r)}));r.current.dependencies.push(a)};for(h.s();!(c=h.n()).done;)d()}catch(t){h.e(t)}finally{h.f()}}return Promise.all(this.current.dependencies)}},{key:"transform",value:function transform(t,r,i,a,l,u){var c=[t,r,i,a,l,u];this.transformMatrix=o.Util.transform(this.transformMatrix,c);this.tgrp=null}},{key:"getSVG",value:function getSVG(t,r){var i=this;this.viewport=r;var a=this._initialize(r);return this.loadDependencies(t).then((function(){i.transformMatrix=o.IDENTITY_MATRIX;i.executeOpTree(i.convertOpList(t));return a}))}},{key:"convertOpList",value:function convertOpList(t){for(var r=this._operatorIdMapping,i=t.argsArray,a=t.fnArray,o=[],l=0,u=a.length;l<u;l++){var c=a[l];o.push({fnId:c,fn:r[c],args:i[l]})}return function opListToTree(t){var r,i=[],a=[],o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){var l=r.value;if("save"!==l.fn)"restore"===l.fn?i=a.pop():i.push(l);else{i.push({fnId:92,fn:"group",items:[]});a.push(i);i=i.at(-1).items}}}catch(t){o.e(t)}finally{o.f()}return i}(o)}},{key:"executeOpTree",value:function executeOpTree(t){var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var a=r.value,l=a.fn,u=a.fnId,c=a.args;switch(0|u){case o.OPS.beginText:this.beginText();break;case o.OPS.dependency:break;case o.OPS.setLeading:this.setLeading(c);break;case o.OPS.setLeadingMoveText:this.setLeadingMoveText(c[0],c[1]);break;case o.OPS.setFont:this.setFont(c);break;case o.OPS.showText:case o.OPS.showSpacedText:this.showText(c[0]);break;case o.OPS.endText:this.endText();break;case o.OPS.moveText:this.moveText(c[0],c[1]);break;case o.OPS.setCharSpacing:this.setCharSpacing(c[0]);break;case o.OPS.setWordSpacing:this.setWordSpacing(c[0]);break;case o.OPS.setHScale:this.setHScale(c[0]);break;case o.OPS.setTextMatrix:this.setTextMatrix(c[0],c[1],c[2],c[3],c[4],c[5]);break;case o.OPS.setTextRise:this.setTextRise(c[0]);break;case o.OPS.setTextRenderingMode:this.setTextRenderingMode(c[0]);break;case o.OPS.setLineWidth:this.setLineWidth(c[0]);break;case o.OPS.setLineJoin:this.setLineJoin(c[0]);break;case o.OPS.setLineCap:this.setLineCap(c[0]);break;case o.OPS.setMiterLimit:this.setMiterLimit(c[0]);break;case o.OPS.setFillRGBColor:this.setFillRGBColor(c[0],c[1],c[2]);break;case o.OPS.setStrokeRGBColor:this.setStrokeRGBColor(c[0],c[1],c[2]);break;case o.OPS.setStrokeColorN:this.setStrokeColorN(c);break;case o.OPS.setFillColorN:this.setFillColorN(c);break;case o.OPS.shadingFill:this.shadingFill(c[0]);break;case o.OPS.setDash:this.setDash(c[0],c[1]);break;case o.OPS.setRenderingIntent:this.setRenderingIntent(c[0]);break;case o.OPS.setFlatness:this.setFlatness(c[0]);break;case o.OPS.setGState:this.setGState(c[0]);break;case o.OPS.fill:this.fill();break;case o.OPS.eoFill:this.eoFill();break;case o.OPS.stroke:this.stroke();break;case o.OPS.fillStroke:this.fillStroke();break;case o.OPS.eoFillStroke:this.eoFillStroke();break;case o.OPS.clip:this.clip("nonzero");break;case o.OPS.eoClip:this.clip("evenodd");break;case o.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case o.OPS.paintImageXObject:this.paintImageXObject(c[0]);break;case o.OPS.paintInlineImageXObject:this.paintInlineImageXObject(c[0]);break;case o.OPS.paintImageMaskXObject:this.paintImageMaskXObject(c[0]);break;case o.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(c[0],c[1]);break;case o.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case o.OPS.closePath:this.closePath();break;case o.OPS.closeStroke:this.closeStroke();break;case o.OPS.closeFillStroke:this.closeFillStroke();break;case o.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case o.OPS.nextLine:this.nextLine();break;case o.OPS.transform:this.transform(c[0],c[1],c[2],c[3],c[4],c[5]);break;case o.OPS.constructPath:this.constructPath(c[0],c[1]);break;case o.OPS.endPath:this.endPath();break;case 92:this.group(a.items);break;default:(0,o.warn)("Unimplemented operator ".concat(l))}}}catch(t){i.e(t)}finally{i.f()}}},{key:"setWordSpacing",value:function setWordSpacing(t){this.current.wordSpacing=t}},{key:"setCharSpacing",value:function setCharSpacing(t){this.current.charSpacing=t}},{key:"nextLine",value:function nextLine(){this.moveText(0,this.current.leading)}},{key:"setTextMatrix",value:function setTextMatrix(t,r,i,a,o,l){var u=this.current;u.textMatrix=u.lineMatrix=[t,r,i,a,o,l];u.textMatrixScale=Math.hypot(t,r);u.x=u.lineX=0;u.y=u.lineY=0;u.xcoords=[];u.ycoords=[];u.tspan=this.svgFactory.createElement("svg:tspan");u.tspan.setAttributeNS(null,"font-family",u.fontFamily);u.tspan.setAttributeNS(null,"font-size","".concat(pf(u.fontSize),"px"));u.tspan.setAttributeNS(null,"y",pf(-u.y));u.txtElement=this.svgFactory.createElement("svg:text");u.txtElement.append(u.tspan)}},{key:"beginText",value:function beginText(){var t=this.current;t.x=t.lineX=0;t.y=t.lineY=0;t.textMatrix=o.IDENTITY_MATRIX;t.lineMatrix=o.IDENTITY_MATRIX;t.textMatrixScale=1;t.tspan=this.svgFactory.createElement("svg:tspan");t.txtElement=this.svgFactory.createElement("svg:text");t.txtgrp=this.svgFactory.createElement("svg:g");t.xcoords=[];t.ycoords=[]}},{key:"moveText",value:function moveText(t,r){var i=this.current;i.x=i.lineX+=t;i.y=i.lineY+=r;i.xcoords=[];i.ycoords=[];i.tspan=this.svgFactory.createElement("svg:tspan");i.tspan.setAttributeNS(null,"font-family",i.fontFamily);i.tspan.setAttributeNS(null,"font-size","".concat(pf(i.fontSize),"px"));i.tspan.setAttributeNS(null,"y",pf(-i.y))}},{key:"showText",value:function showText(t){var r=this.current,i=r.font,a=r.fontSize;if(0!==a){var h,d=r.fontSizeScale,p=r.charSpacing,v=r.wordSpacing,y=r.fontDirection,g=r.textHScale*y,m=i.vertical,b=m?1:-1,w=i.defaultVMetrics,P=a*r.fontMatrix[0],A=0,S=_createForOfIteratorHelper(t);try{for(S.s();!(h=S.n()).done;){var E=h.value;if(null!==E)if("number"!=typeof E){var x=(E.isSpace?v:0)+p,D=E.fontChar,k=void 0,C=void 0,T=E.width;if(m){var I=void 0,O=E.vmetric||w;I=-(I=E.vmetric?O[1]:.5*T)*P;var M=O[2]*P;T=O?-O[0]:T;k=I/d;C=(A+M)/d}else{k=A/d;C=0}if(E.isInFont||i.missingFile){r.xcoords.push(r.x+k);m&&r.ycoords.push(-r.y+C);r.tspan.textContent+=D}A+=m?T*P-x*y:T*P+x*y}else A+=b*E*a/1e3;else A+=y*v}}catch(t){S.e(t)}finally{S.f()}r.tspan.setAttributeNS(null,"x",r.xcoords.map(pf).join(" "));m?r.tspan.setAttributeNS(null,"y",r.ycoords.map(pf).join(" ")):r.tspan.setAttributeNS(null,"y",pf(-r.y));m?r.y-=A:r.x+=A*g;r.tspan.setAttributeNS(null,"font-family",r.fontFamily);r.tspan.setAttributeNS(null,"font-size","".concat(pf(r.fontSize),"px"));r.fontStyle!==l&&r.tspan.setAttributeNS(null,"font-style",r.fontStyle);r.fontWeight!==u&&r.tspan.setAttributeNS(null,"font-weight",r.fontWeight);var L=r.textRenderingMode&o.TextRenderingMode.FILL_STROKE_MASK;if(L===o.TextRenderingMode.FILL||L===o.TextRenderingMode.FILL_STROKE){r.fillColor!==c&&r.tspan.setAttributeNS(null,"fill",r.fillColor);r.fillAlpha<1&&r.tspan.setAttributeNS(null,"fill-opacity",r.fillAlpha)}else r.textRenderingMode===o.TextRenderingMode.ADD_TO_PATH?r.tspan.setAttributeNS(null,"fill","transparent"):r.tspan.setAttributeNS(null,"fill","none");if(L===o.TextRenderingMode.STROKE||L===o.TextRenderingMode.FILL_STROKE){var R=1/(r.textMatrixScale||1);this._setStrokeAttributes(r.tspan,R)}var G=r.textMatrix;0!==r.textRise&&((G=G.slice())[5]+=r.textRise);r.txtElement.setAttributeNS(null,"transform","".concat(pm(G)," scale(").concat(pf(g),", -1)"));r.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve");r.txtElement.append(r.tspan);r.txtgrp.append(r.txtElement);this._ensureTransformGroup().append(r.txtElement)}}},{key:"setLeadingMoveText",value:function setLeadingMoveText(t,r){this.setLeading(-r);this.moveText(t,r)}},{key:"addFontStyle",value:function addFontStyle(t){if(!t.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');if(!this.cssStyle){this.cssStyle=this.svgFactory.createElement("svg:style");this.cssStyle.setAttributeNS(null,"type","text/css");this.defs.append(this.cssStyle)}var r=p(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'.concat(t.loadedName,'";')+" src: url(".concat(r,"); }\n")}},{key:"setFont",value:function setFont(t){var r=this.current,i=this.commonObjs.get(t[0]),a=t[1];r.font=i;if(this.embedFonts&&!i.missingFile&&!this.embeddedFonts[i.loadedName]){this.addFontStyle(i);this.embeddedFonts[i.loadedName]=i}r.fontMatrix=i.fontMatrix||o.FONT_IDENTITY_MATRIX;var l="normal";i.black?l="900":i.bold&&(l="bold");var u=i.italic?"italic":"normal";if(a<0){a=-a;r.fontDirection=-1}else r.fontDirection=1;r.fontSize=a;r.fontFamily=i.loadedName;r.fontWeight=l;r.fontStyle=u;r.tspan=this.svgFactory.createElement("svg:tspan");r.tspan.setAttributeNS(null,"y",pf(-r.y));r.xcoords=[];r.ycoords=[]}},{key:"endText",value:function endText(){var t,r=this.current;if(r.textRenderingMode&o.TextRenderingMode.ADD_TO_PATH_FLAG&&null!==(t=r.txtElement)&&void 0!==t&&t.hasChildNodes()){r.element=r.txtElement;this.clip("nonzero");this.endPath()}}},{key:"setLineWidth",value:function setLineWidth(t){t>0&&(this.current.lineWidth=t)}},{key:"setLineCap",value:function setLineCap(t){this.current.lineCap=h[t]}},{key:"setLineJoin",value:function setLineJoin(t){this.current.lineJoin=d[t]}},{key:"setMiterLimit",value:function setMiterLimit(t){this.current.miterLimit=t}},{key:"setStrokeAlpha",value:function setStrokeAlpha(t){this.current.strokeAlpha=t}},{key:"setStrokeRGBColor",value:function setStrokeRGBColor(t,r,i){this.current.strokeColor=o.Util.makeHexColor(t,r,i)}},{key:"setFillAlpha",value:function setFillAlpha(t){this.current.fillAlpha=t}},{key:"setFillRGBColor",value:function setFillRGBColor(t,r,i){this.current.fillColor=o.Util.makeHexColor(t,r,i);this.current.tspan=this.svgFactory.createElement("svg:tspan");this.current.xcoords=[];this.current.ycoords=[]}},{key:"setStrokeColorN",value:function setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}},{key:"setFillColorN",value:function setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}},{key:"shadingFill",value:function shadingFill(t){var r=this.viewport,i=r.width,a=r.height,l=o.Util.inverseTransform(this.transformMatrix),u=_slicedToArray(o.Util.getAxialAlignedBoundingBox([0,0,i,a],l),4),c=u[0],h=u[1],d=u[2],p=u[3],v=this.svgFactory.createElement("svg:rect");v.setAttributeNS(null,"x",c);v.setAttributeNS(null,"y",h);v.setAttributeNS(null,"width",d-c);v.setAttributeNS(null,"height",p-h);v.setAttributeNS(null,"fill",this._makeShadingPattern(t));this.current.fillAlpha<1&&v.setAttributeNS(null,"fill-opacity",this.current.fillAlpha);this._ensureTransformGroup().append(v)}},{key:"_makeColorN_Pattern",value:function _makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}},{key:"_makeTilingPattern",value:function _makeTilingPattern(t){var r=t[1],i=t[2],a=t[3]||o.IDENTITY_MATRIX,l=_slicedToArray(t[4],4),u=l[0],c=l[1],h=l[2],d=l[3],p=t[5],v=t[6],y=t[7],g="shading".concat(b++),m=_slicedToArray(o.Util.normalizeRect([].concat(_toConsumableArray(o.Util.applyTransform([u,c],a)),_toConsumableArray(o.Util.applyTransform([h,d],a)))),4),w=m[0],P=m[1],A=m[2],S=m[3],E=_slicedToArray(o.Util.singularValueDecompose2dScale(a),2),x=p*E[0],D=v*E[1],k=this.svgFactory.createElement("svg:pattern");k.setAttributeNS(null,"id",g);k.setAttributeNS(null,"patternUnits","userSpaceOnUse");k.setAttributeNS(null,"width",x);k.setAttributeNS(null,"height",D);k.setAttributeNS(null,"x","".concat(w));k.setAttributeNS(null,"y","".concat(P));var C=this.svg,T=this.transformMatrix,I=this.current.fillColor,O=this.current.strokeColor,M=this.svgFactory.create(A-w,S-P);this.svg=M;this.transformMatrix=a;if(2===y){var L=o.Util.makeHexColor.apply(o.Util,_toConsumableArray(r));this.current.fillColor=L;this.current.strokeColor=L}this.executeOpTree(this.convertOpList(i));this.svg=C;this.transformMatrix=T;this.current.fillColor=I;this.current.strokeColor=O;k.append(M.childNodes[0]);this.defs.append(k);return"url(#".concat(g,")")}},{key:"_makeShadingPattern",value:function _makeShadingPattern(t){"string"==typeof t&&(t=this.objs.get(t));switch(t[0]){case"RadialAxial":var r,i="shading".concat(b++),a=t[3];switch(t[1]){case"axial":var l=t[4],u=t[5];(r=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",i);r.setAttributeNS(null,"gradientUnits","userSpaceOnUse");r.setAttributeNS(null,"x1",l[0]);r.setAttributeNS(null,"y1",l[1]);r.setAttributeNS(null,"x2",u[0]);r.setAttributeNS(null,"y2",u[1]);break;case"radial":var c=t[4],h=t[5],d=t[6],p=t[7];(r=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",i);r.setAttributeNS(null,"gradientUnits","userSpaceOnUse");r.setAttributeNS(null,"cx",h[0]);r.setAttributeNS(null,"cy",h[1]);r.setAttributeNS(null,"r",p);r.setAttributeNS(null,"fx",c[0]);r.setAttributeNS(null,"fy",c[1]);r.setAttributeNS(null,"fr",d);break;default:throw new Error("Unknown RadialAxial type: ".concat(t[1]))}var v,y=_createForOfIteratorHelper(a);try{for(y.s();!(v=y.n()).done;){var g=v.value,m=this.svgFactory.createElement("svg:stop");m.setAttributeNS(null,"offset",g[0]);m.setAttributeNS(null,"stop-color",g[1]);r.append(m)}}catch(t){y.e(t)}finally{y.f()}this.defs.append(r);return"url(#".concat(i,")");case"Mesh":(0,o.warn)("Unimplemented pattern Mesh");return null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: ".concat(t[0]))}}},{key:"setDash",value:function setDash(t,r){this.current.dashArray=t;this.current.dashPhase=r}},{key:"constructPath",value:function constructPath(t,r){var i,a=this.current,l=a.x,u=a.y,c=[],h=0,d=_createForOfIteratorHelper(t);try{for(d.s();!(i=d.n()).done;){switch(0|i.value){case o.OPS.rectangle:l=r[h++];u=r[h++];var p=r[h++],v=r[h++],y=l+p,g=u+v;c.push("M",pf(l),pf(u),"L",pf(y),pf(u),"L",pf(y),pf(g),"L",pf(l),pf(g),"Z");break;case o.OPS.moveTo:l=r[h++];u=r[h++];c.push("M",pf(l),pf(u));break;case o.OPS.lineTo:l=r[h++];u=r[h++];c.push("L",pf(l),pf(u));break;case o.OPS.curveTo:l=r[h+4];u=r[h+5];c.push("C",pf(r[h]),pf(r[h+1]),pf(r[h+2]),pf(r[h+3]),pf(l),pf(u));h+=6;break;case o.OPS.curveTo2:c.push("C",pf(l),pf(u),pf(r[h]),pf(r[h+1]),pf(r[h+2]),pf(r[h+3]));l=r[h+2];u=r[h+3];h+=4;break;case o.OPS.curveTo3:l=r[h+2];u=r[h+3];c.push("C",pf(r[h]),pf(r[h+1]),pf(l),pf(u),pf(l),pf(u));h+=4;break;case o.OPS.closePath:c.push("Z")}}}catch(t){d.e(t)}finally{d.f()}c=c.join(" ");if(a.path&&t.length>0&&t[0]!==o.OPS.rectangle&&t[0]!==o.OPS.moveTo)c=a.path.getAttributeNS(null,"d")+c;else{a.path=this.svgFactory.createElement("svg:path");this._ensureTransformGroup().append(a.path)}a.path.setAttributeNS(null,"d",c);a.path.setAttributeNS(null,"fill","none");a.element=a.path;a.setCurrentPoint(l,u)}},{key:"endPath",value:function endPath(){var t=this.current;t.path=null;if(this.pendingClip)if(t.element){var r="clippath".concat(g++),i=this.svgFactory.createElement("svg:clipPath");i.setAttributeNS(null,"id",r);i.setAttributeNS(null,"transform",pm(this.transformMatrix));var a=t.element.cloneNode(!0);"evenodd"===this.pendingClip?a.setAttributeNS(null,"clip-rule","evenodd"):a.setAttributeNS(null,"clip-rule","nonzero");this.pendingClip=null;i.append(a);this.defs.append(i);if(t.activeClipUrl){t.clipGroup=null;var o,l=_createForOfIteratorHelper(this.extraStack);try{for(l.s();!(o=l.n()).done;){o.value.clipGroup=null}}catch(t){l.e(t)}finally{l.f()}i.setAttributeNS(null,"clip-path",t.activeClipUrl)}t.activeClipUrl="url(#".concat(r,")");this.tgrp=null}else this.pendingClip=null}},{key:"clip",value:function clip(t){this.pendingClip=t}},{key:"closePath",value:function closePath(){var t=this.current;if(t.path){var r="".concat(t.path.getAttributeNS(null,"d"),"Z");t.path.setAttributeNS(null,"d",r)}}},{key:"setLeading",value:function setLeading(t){this.current.leading=-t}},{key:"setTextRise",value:function setTextRise(t){this.current.textRise=t}},{key:"setTextRenderingMode",value:function setTextRenderingMode(t){this.current.textRenderingMode=t}},{key:"setHScale",value:function setHScale(t){this.current.textHScale=t/100}},{key:"setRenderingIntent",value:function setRenderingIntent(t){}},{key:"setFlatness",value:function setFlatness(t){}},{key:"setGState",value:function setGState(t){var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var a=_slicedToArray(r.value,2),l=a[0],u=a[1];switch(l){case"LW":this.setLineWidth(u);break;case"LC":this.setLineCap(u);break;case"LJ":this.setLineJoin(u);break;case"ML":this.setMiterLimit(u);break;case"D":this.setDash(u[0],u[1]);break;case"RI":this.setRenderingIntent(u);break;case"FL":this.setFlatness(u);break;case"Font":this.setFont(u);break;case"CA":this.setStrokeAlpha(u);break;case"ca":this.setFillAlpha(u);break;default:(0,o.warn)("Unimplemented graphic state operator ".concat(l))}}}catch(t){i.e(t)}finally{i.f()}}},{key:"fill",value:function fill(){var t=this.current;if(t.element){t.element.setAttributeNS(null,"fill",t.fillColor);t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha);this.endPath()}}},{key:"stroke",value:function stroke(){var t=this.current;if(t.element){this._setStrokeAttributes(t.element);t.element.setAttributeNS(null,"fill","none");this.endPath()}}},{key:"_setStrokeAttributes",value:function _setStrokeAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.current,a=i.dashArray;1!==r&&a.length>0&&(a=a.map((function(t){return r*t})));t.setAttributeNS(null,"stroke",i.strokeColor);t.setAttributeNS(null,"stroke-opacity",i.strokeAlpha);t.setAttributeNS(null,"stroke-miterlimit",pf(i.miterLimit));t.setAttributeNS(null,"stroke-linecap",i.lineCap);t.setAttributeNS(null,"stroke-linejoin",i.lineJoin);t.setAttributeNS(null,"stroke-width",pf(r*i.lineWidth)+"px");t.setAttributeNS(null,"stroke-dasharray",a.map(pf).join(" "));t.setAttributeNS(null,"stroke-dashoffset",pf(r*i.dashPhase)+"px")}},{key:"eoFill",value:function eoFill(){var t;null===(t=this.current.element)||void 0===t||t.setAttributeNS(null,"fill-rule","evenodd");this.fill()}},{key:"fillStroke",value:function fillStroke(){this.stroke();this.fill()}},{key:"eoFillStroke",value:function eoFillStroke(){var t;null===(t=this.current.element)||void 0===t||t.setAttributeNS(null,"fill-rule","evenodd");this.fillStroke()}},{key:"closeStroke",value:function closeStroke(){this.closePath();this.stroke()}},{key:"closeFillStroke",value:function closeFillStroke(){this.closePath();this.fillStroke()}},{key:"closeEOFillStroke",value:function closeEOFillStroke(){this.closePath();this.eoFillStroke()}},{key:"paintSolidColorImageMask",value:function paintSolidColorImageMask(){var t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0");t.setAttributeNS(null,"y","0");t.setAttributeNS(null,"width","1px");t.setAttributeNS(null,"height","1px");t.setAttributeNS(null,"fill",this.current.fillColor);this._ensureTransformGroup().append(t)}},{key:"paintImageXObject",value:function paintImageXObject(t){var r=this.getObject(t);r?this.paintInlineImageXObject(r):(0,o.warn)("Dependent image with object ID ".concat(t," is not ready yet"))}},{key:"paintInlineImageXObject",value:function paintInlineImageXObject(t,r){var i=t.width,a=t.height,o=v(t,this.forceDataSchema,!!r),l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0");l.setAttributeNS(null,"y","0");l.setAttributeNS(null,"width",pf(i));l.setAttributeNS(null,"height",pf(a));this.current.element=l;this.clip("nonzero");var u=this.svgFactory.createElement("svg:image");u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);u.setAttributeNS(null,"x","0");u.setAttributeNS(null,"y",pf(-a));u.setAttributeNS(null,"width",pf(i)+"px");u.setAttributeNS(null,"height",pf(a)+"px");u.setAttributeNS(null,"transform","scale(".concat(pf(1/i)," ").concat(pf(-1/a),")"));r?r.append(u):this._ensureTransformGroup().append(u)}},{key:"paintImageMaskXObject",value:function paintImageMaskXObject(t){var r=this.getObject(t.data,t);if(r.bitmap)(0,o.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");else{var i=this.current,a=r.width,l=r.height,u=i.fillColor;i.maskId="mask".concat(m++);var c=this.svgFactory.createElement("svg:mask");c.setAttributeNS(null,"id",i.maskId);var h=this.svgFactory.createElement("svg:rect");h.setAttributeNS(null,"x","0");h.setAttributeNS(null,"y","0");h.setAttributeNS(null,"width",pf(a));h.setAttributeNS(null,"height",pf(l));h.setAttributeNS(null,"fill",u);h.setAttributeNS(null,"mask","url(#".concat(i.maskId,")"));this.defs.append(c);this._ensureTransformGroup().append(h);this.paintInlineImageXObject(r,c)}}},{key:"paintFormXObjectBegin",value:function paintFormXObjectBegin(t,r){Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]);if(r){var i=r[2]-r[0],a=r[3]-r[1],o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x",r[0]);o.setAttributeNS(null,"y",r[1]);o.setAttributeNS(null,"width",pf(i));o.setAttributeNS(null,"height",pf(a));this.current.element=o;this.clip("nonzero");this.endPath()}}},{key:"paintFormXObjectEnd",value:function paintFormXObjectEnd(){}},{key:"_initialize",value:function _initialize(t){var r=this.svgFactory.create(t.width,t.height),i=this.svgFactory.createElement("svg:defs");r.append(i);this.defs=i;var a=this.svgFactory.createElement("svg:g");a.setAttributeNS(null,"transform",pm(t.transform));r.append(a);this.svg=a;return r}},{key:"_ensureClipGroup",value:function _ensureClipGroup(){if(!this.current.clipGroup){var t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl);this.svg.append(t);this.current.clipGroup=t}return this.current.clipGroup}},{key:"_ensureTransformGroup",value:function _ensureTransformGroup(){if(!this.tgrp){this.tgrp=this.svgFactory.createElement("svg:g");this.tgrp.setAttributeNS(null,"transform",pm(this.transformMatrix));this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)}return this.tgrp}}]);return SVGGraphics}();r.SVGGraphics=w},(t,r,i)=>{var a=i(3),o=i(398),l=i(141);a({target:"Array",proto:!0},{group:function group(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});l("group")},(t,r,i)=>{var a=i(94),o=i(14),l=i(13),u=i(40),c=i(18),h=i(64),d=i(81),p=i(200),v=Array,y=o([].push);t.exports=function(t,r,i,o){for(var g,m,b,w=u(t),P=l(w),A=a(r,i),S=d(null),E=h(P),x=0;E>x;x++){b=P[x];(m=c(A(b,x,w)))in S?y(S[m],b):S[m]=[b]}if(o&&(g=o(w))!==v)for(m in S)S[m]=p(g,S[m]);return S}},(t,r,i)=>{i(258);i(255);i(92);i(148);i(105);i(104);i(301);i(140);i(149);Object.defineProperty(r,"__esModule",{value:!0});r.XfaText=void 0;i(167);i(85);i(90);i(292);i(300);i(146);i(123);i(112);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var a=function(){function XfaText(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaText)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaText,null,[{key:"textContent",value:function textContent(t){var r=[],i={items:r,styles:Object.create(null)};!function walk(t){var i;if(t){var a=null,o=t.name;if("#text"===o)a=t.value;else{if(!XfaText.shouldBuildText(o))return;null!=t&&null!==(i=t.attributes)&&void 0!==i&&i.textContent?a=t.attributes.textContent:t.value&&(a=t.value)}null!==a&&r.push({str:a});if(t.children){var l,u=_createForOfIteratorHelper(t.children);try{for(u.s();!(l=u.n()).done;){walk(l.value)}}catch(t){u.e(t)}finally{u.f()}}}}(t);return i}},{key:"shouldBuildText",value:function shouldBuildText(t){return!("textarea"===t||"input"===t||"option"===t||"select"===t)}}]);return XfaText}();r.XfaText=a},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(258);i(255);i(92);i(105);i(104);i(292);i(300);i(301);i(85);i(90);i(112);Object.defineProperty(r,"__esModule",{value:!0});r.TextLayerRenderTask=void 0;r.renderTextLayer=function renderTextLayer(t){if(!t.textContentSource&&(t.textContent||t.textContentStream)){(0,o.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead.");t.textContentSource=t.textContent||t.textContentStream}var r=t.container,i=t.viewport,a=getComputedStyle(r),l=a.getPropertyValue("visibility"),u=parseFloat(a.getPropertyValue("--scale-factor"));"visible"===l&&(!u||Math.abs(u-i.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");var c=new h(t);c._render();return c};r.updateTextLayer=function updateTextLayer(t){var r=t.container,i=t.viewport,a=t.textDivs,l=t.textDivProperties,u=t.isOffscreenCanvasSupported,c=t.mustRotate,h=void 0===c||c,d=t.mustRescale,p=void 0===d||d;h&&(0,o.setLayerDimensions)(r,{rotation:i.rotation});if(p){var v,y=getCtx(0,u),g={prevFontSize:null,prevFontFamily:null,div:null,scale:i.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:y},m=_createForOfIteratorHelper(a);try{for(m.s();!(v=m.n()).done;){var b=v.value;g.properties=l.get(b);g.div=b;layout(g)}}catch(t){m.e(t)}finally{m.f()}}};i(140);i(280);i(146);i(148);i(149);i(167);i(355);i(257);i(122);i(302);i(259);i(346);i(337);i(123);var a=i(1),o=i(362);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}var l=30,u=.8,c=new Map;function getCtx(t,r){var i,o=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};if(r&&a.FeatureTest.isOffscreenCanvasSupported)i=new OffscreenCanvas(t,t).getContext("2d",o);else{var l=document.createElement("canvas");l.width=l.height=t;i=l.getContext("2d",o)}return i}function appendText(t,r,i){var o=document.createElement("span"),h={angle:0,canvasWidth:0,hasText:""!==r.str,hasEOL:r.hasEOL,fontSize:0};t._textDivs.push(o);var d=a.Util.transform(t._transform,r.transform),p=Math.atan2(d[1],d[0]),v=i[r.fontName];v.vertical&&(p+=Math.PI/2);var y,g,m=Math.hypot(d[2],d[3]),b=m*function getAscent(t,r){var i=c.get(t);if(i)return i;var a=getCtx(l,r);a.font="".concat(l,"px ").concat(t);var o=a.measureText(""),h=null==o?void 0:o.fontBoundingBoxAscent,d=Math.abs(null==o?void 0:o.fontBoundingBoxDescent);if(h){var p=h/(h+d);c.set(t,p);a.canvas.width=a.canvas.height=0;return p}a.strokeStyle="red";a.clearRect(0,0,l,l);a.strokeText("g",0,0);var v=a.getImageData(0,0,l,l).data;d=0;for(var y=v.length-1-3;y>=0;y-=4)if(v[y]>0){d=Math.ceil(y/4/l);break}a.clearRect(0,0,l,l);a.strokeText("A",0,l);h=0;for(var g=0,m=(v=a.getImageData(0,0,l,l).data).length;g<m;g+=4)if(v[g]>0){h=l-Math.floor(g/4/l);break}a.canvas.width=a.canvas.height=0;if(h){var b=h/(h+d);c.set(t,b);return b}c.set(t,u);return u}(v.fontFamily,t._isOffscreenCanvasSupported);if(0===p){y=d[4];g=d[5]-b}else{y=d[4]+b*Math.sin(p);g=d[5]-b*Math.cos(p)}var w="calc(var(--scale-factor)*",P=o.style;if(t._container===t._rootContainer){P.left="".concat((100*y/t._pageWidth).toFixed(2),"%");P.top="".concat((100*g/t._pageHeight).toFixed(2),"%")}else{P.left="".concat(w).concat(y.toFixed(2),"px)");P.top="".concat(w).concat(g.toFixed(2),"px)")}P.fontSize="".concat(w).concat(m.toFixed(2),"px)");P.fontFamily=v.fontFamily;h.fontSize=m;o.setAttribute("role","presentation");o.textContent=r.str;o.dir=r.dir;t._fontInspectorEnabled&&(o.dataset.fontName=r.fontName);0!==p&&(h.angle=p*(180/Math.PI));var A=!1;if(r.str.length>1)A=!0;else if(" "!==r.str&&r.transform[0]!==r.transform[3]){var S=Math.abs(r.transform[0]),E=Math.abs(r.transform[3]);S!==E&&Math.max(S,E)/Math.min(S,E)>1.5&&(A=!0)}A&&(h.canvasWidth=v.vertical?r.height:r.width);t._textDivProperties.set(o,h);t._isReadableStream&&t._layoutText(o)}function layout(t){var r=t.div,i=t.scale,a=t.properties,o=t.ctx,l=t.prevFontSize,u=t.prevFontFamily,c=r.style,h="";if(0!==a.canvasWidth&&a.hasText){var d=c.fontFamily,p=a.canvasWidth,v=a.fontSize;if(l!==v||u!==d){o.font="".concat(v*i,"px ").concat(d);t.prevFontSize=v;t.prevFontFamily=d}try{var y=o.measureText(r.textContent).width;y>0&&(h="scaleX(".concat(p*i/y,")"))}catch(t){}}0!==a.angle&&(h="rotate(".concat(a.angle,"deg) ").concat(h));h.length>0&&(c.transform=h)}var h=function(){function TextLayerRenderTask(t){var r,i=this,l=t.textContentSource,u=t.container,c=t.viewport,h=t.textDivs,d=t.textDivProperties,p=t.textContentItemsStr,v=t.isOffscreenCanvasSupported;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextLayerRenderTask);this._textContentSource=l;this._isReadableStream=l instanceof ReadableStream;this._container=this._rootContainer=u;this._textDivs=h||[];this._textContentItemsStr=p||[];this._isOffscreenCanvasSupported=v;this._fontInspectorEnabled=!(null===(r=globalThis.FontInspector)||void 0===r||!r.enabled);this._reader=null;this._textDivProperties=d||new WeakMap;this._canceled=!1;this._capability=new a.PromiseCapability;this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:c.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:getCtx(0,v)};var y=c.rawDims,g=y.pageWidth,m=y.pageHeight,b=y.pageX,w=y.pageY;this._transform=[1,0,0,-1,-b,w+m];this._pageWidth=g;this._pageHeight=m;(0,o.setLayerDimensions)(u,c);this._capability.promise.finally((function(){i._layoutTextParams=null})).catch((function(){}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextLayerRenderTask,[{key:"promise",get:function get(){return this._capability.promise}},{key:"cancel",value:function cancel(){this._canceled=!0;if(this._reader){this._reader.cancel(new a.AbortException("TextLayer task cancelled.")).catch((function(){}));this._reader=null}this._capability.reject(new a.AbortException("TextLayer task cancelled."))}},{key:"_processItems",value:function _processItems(t,r){var i,a=_createForOfIteratorHelper(t);try{for(a.s();!(i=a.n()).done;){var o=i.value;if(void 0!==o.str){this._textContentItemsStr.push(o.str);appendText(this,o,r)}else if("beginMarkedContentProps"===o.type||"beginMarkedContent"===o.type){var l=this._container;this._container=document.createElement("span");this._container.classList.add("markedContent");null!==o.id&&this._container.setAttribute("id","".concat(o.id));l.append(this._container)}else"endMarkedContent"===o.type&&(this._container=this._container.parentNode)}}catch(t){a.e(t)}finally{a.f()}}},{key:"_layoutText",value:function _layoutText(t){var r=this._layoutTextParams.properties=this._textDivProperties.get(t);this._layoutTextParams.div=t;layout(this._layoutTextParams);r.hasText&&this._container.append(t);if(r.hasEOL){var i=document.createElement("br");i.setAttribute("role","presentation");this._container.append(i)}}},{key:"_render",value:function _render(){var t=this,r=new a.PromiseCapability,i=Object.create(null);if(this._isReadableStream){this._reader=this._textContentSource.getReader();!function pump(){t._reader.read().then((function(a){var o=a.value;if(a.done)r.resolve();else{Object.assign(i,o.styles);t._processItems(o.items,i);pump()}}),r.reject)}()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');var o=this._textContentSource,l=o.items,u=o.styles;this._processItems(l,u);r.resolve()}r.promise.then((function(){i=null;!function render(t){if(!t._canceled){var r=t._textDivs,i=t._capability;if(r.length>1e5)i.resolve();else{if(!t._isReadableStream){var a,o=_createForOfIteratorHelper(r);try{for(o.s();!(a=o.n()).done;){var l=a.value;t._layoutText(l)}}catch(t){o.e(t)}finally{o.f()}}i.resolve()}}}(t)}),this._capability.reject)}}]);return TextLayerRenderTask}();r.TextLayerRenderTask=h},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(258);i(255);i(92);i(105);i(104);i(301);i(245);i(379);i(402);i(167);i(310);i(403);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditorLayer=void 0;i(140);i(280);i(146);i(148);i(149);i(312);i(314);i(325);i(327);i(329);i(331);i(333);i(335);i(123);i(302);i(347);var a=i(1),o=i(353),l=i(404),u=i(419),c=i(362),h=i(420);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakSet,E=new WeakSet,x=new WeakSet,D=new WeakSet,k=function(){function AnnotationEditorLayer(t){var r=t.uiManager,i=t.pageIndex,a=t.div,o=t.accessibilityManager,c=t.annotationLayer,k=t.viewport,C=t.l10n;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorLayer);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,x);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,S);_classPrivateFieldInitSpec(this,d,{writable:!0,value:void 0});_classPrivateFieldInitSpec(this,p,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,y,{writable:!0,value:this.pointerup.bind(this)});_classPrivateFieldInitSpec(this,g,{writable:!0,value:this.pointerdown.bind(this)});_classPrivateFieldInitSpec(this,m,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,b,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,w,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,P,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,A,{writable:!0,value:void 0});var T=[l.FreeTextEditor,u.InkEditor,h.StampEditor];if(!AnnotationEditorLayer._initialized){AnnotationEditorLayer._initialized=!0;var I,O=_createForOfIteratorHelper(T);try{for(O.s();!(I=O.n()).done;){I.value.initialize(C)}}catch(t){O.e(t)}finally{O.f()}}r.registerEditorTypes(T);_classPrivateFieldSet(this,A,r);this.pageIndex=i;this.div=a;_classPrivateFieldSet(this,d,o);_classPrivateFieldSet(this,v,c);this.viewport=k;_classPrivateFieldGet(this,A).addLayer(this)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationEditorLayer,[{key:"isEmpty",get:function get(){return 0===_classPrivateFieldGet(this,m).size}},{key:"updateToolbar",value:function updateToolbar(t){_classPrivateFieldGet(this,A).updateToolbar(t)}},{key:"updateMode",value:function updateMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_classPrivateFieldGet(this,A).getMode();_classPrivateMethodGet(this,D,_cleanup2).call(this);if(t===a.AnnotationEditorType.INK){this.addInkEditorIfNeeded(!1);this.disableClick()}else this.enableClick();if(t!==a.AnnotationEditorType.NONE){this.div.classList.toggle("freeTextEditing",t===a.AnnotationEditorType.FREETEXT);this.div.classList.toggle("inkEditing",t===a.AnnotationEditorType.INK);this.div.classList.toggle("stampEditing",t===a.AnnotationEditorType.STAMP);this.div.hidden=!1}}},{key:"addInkEditorIfNeeded",value:function addInkEditorIfNeeded(t){if(t||_classPrivateFieldGet(this,A).getMode()===a.AnnotationEditorType.INK){if(!t){var r,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,m).values());try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.isEmpty()){o.setInBackground();return}}}catch(t){i.e(t)}finally{i.f()}}_classPrivateMethodGet(this,E,_createAndAddNewEditor2).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}}},{key:"setEditingState",value:function setEditingState(t){_classPrivateFieldGet(this,A).setEditingState(t)}},{key:"addCommands",value:function addCommands(t){_classPrivateFieldGet(this,A).addCommands(t)}},{key:"enable",value:function enable(){this.div.style.pointerEvents="auto";var t,r=new Set,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,m).values());try{for(i.s();!(t=i.n()).done;){var a=t.value;a.enableEditing();a.annotationElementId&&r.add(a.annotationElementId)}}catch(t){i.e(t)}finally{i.f()}if(_classPrivateFieldGet(this,v)){var o,l=_createForOfIteratorHelper(_classPrivateFieldGet(this,v).getEditableAnnotations());try{for(l.s();!(o=l.n()).done;){var u=o.value;u.hide();if(!_classPrivateFieldGet(this,A).isDeletedAnnotationElement(u.data.id)&&!r.has(u.data.id)){var c=this.deserialize(u);if(c){this.addOrRebuild(c);c.enableEditing()}}}}catch(t){l.e(t)}finally{l.f()}}}},{key:"disable",value:function disable(){_classPrivateFieldSet(this,P,!0);this.div.style.pointerEvents="none";var t,r=new Set,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,m).values());try{for(i.s();!(t=i.n()).done;){var a,o=t.value;o.disableEditing();if(o.annotationElementId&&null===o.serialize()){null===(a=this.getEditableAnnotation(o.annotationElementId))||void 0===a||a.show();o.remove()}else r.add(o.annotationElementId)}}catch(t){i.e(t)}finally{i.f()}if(_classPrivateFieldGet(this,v)){var l,u=_createForOfIteratorHelper(_classPrivateFieldGet(this,v).getEditableAnnotations());try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c.data.id;r.has(h)||_classPrivateFieldGet(this,A).isDeletedAnnotationElement(h)||c.show()}}catch(t){u.e(t)}finally{u.f()}}_classPrivateMethodGet(this,D,_cleanup2).call(this);this.isEmpty&&(this.div.hidden=!0);_classPrivateFieldSet(this,P,!1)}},{key:"getEditableAnnotation",value:function getEditableAnnotation(t){var r;return(null===(r=_classPrivateFieldGet(this,v))||void 0===r?void 0:r.getEditableAnnotation(t))||null}},{key:"setActiveEditor",value:function setActiveEditor(t){_classPrivateFieldGet(this,A).getActive()!==t&&_classPrivateFieldGet(this,A).setActiveEditor(t)}},{key:"enableClick",value:function enableClick(){this.div.addEventListener("pointerdown",_classPrivateFieldGet(this,g));this.div.addEventListener("pointerup",_classPrivateFieldGet(this,y))}},{key:"disableClick",value:function disableClick(){this.div.removeEventListener("pointerdown",_classPrivateFieldGet(this,g));this.div.removeEventListener("pointerup",_classPrivateFieldGet(this,y))}},{key:"attach",value:function attach(t){_classPrivateFieldGet(this,m).set(t.id,t);var r=t.annotationElementId;r&&_classPrivateFieldGet(this,A).isDeletedAnnotationElement(r)&&_classPrivateFieldGet(this,A).removeDeletedAnnotationElement(t)}},{key:"detach",value:function detach(t){var r;_classPrivateFieldGet(this,m).delete(t.id);null===(r=_classPrivateFieldGet(this,d))||void 0===r||r.removePointerInTextLayer(t.contentDiv);!_classPrivateFieldGet(this,P)&&t.annotationElementId&&_classPrivateFieldGet(this,A).addDeletedAnnotationElement(t)}},{key:"remove",value:function remove(t){var r=this;this.detach(t);_classPrivateFieldGet(this,A).removeEditor(t);t.div.contains(document.activeElement)&&setTimeout((function(){_classPrivateFieldGet(r,A).focusMainContainer()}),0);t.div.remove();t.isAttachedToDOM=!1;_classPrivateFieldGet(this,w)||this.addInkEditorIfNeeded(!1)}},{key:"changeParent",value:function changeParent(t){var r;if(t.parent!==this){if(t.annotationElementId){_classPrivateFieldGet(this,A).addDeletedAnnotationElement(t.annotationElementId);o.AnnotationEditor.deleteAnnotationElement(t);t.annotationElementId=null}this.attach(t);null===(r=t.parent)||void 0===r||r.detach(t);t.setParent(this);if(t.div&&t.isAttachedToDOM){t.div.remove();this.div.append(t.div)}}}},{key:"add",value:function add(t){this.changeParent(t);_classPrivateFieldGet(this,A).addEditor(t);this.attach(t);if(!t.isAttachedToDOM){var r=t.render();this.div.append(r);t.isAttachedToDOM=!0}this.moveEditorInDOM(t);t.onceAdded();_classPrivateFieldGet(this,A).addToAnnotationStorage(t)}},{key:"moveEditorInDOM",value:function moveEditorInDOM(t){var r;if(t.isAttachedToDOM){var i=document.activeElement;if(t.div.contains(i)){t._focusEventsAllowed=!1;setTimeout((function(){t.div.addEventListener("focusin",(function(){t._focusEventsAllowed=!0}),{once:!0});i.focus()}),0)}null===(r=_classPrivateFieldGet(this,d))||void 0===r||r.moveElementInDOM(this.div,t.div,t.contentDiv,!0)}}},{key:"addOrRebuild",value:function addOrRebuild(t){t.needsToBeRebuilt()?t.rebuild():this.add(t)}},{key:"addUndoableEditor",value:function addUndoableEditor(t){this.addCommands({cmd:function cmd(){return t._uiManager.rebuild(t)},undo:function undo(){t.remove()},mustExec:!1})}},{key:"getNextId",value:function getNextId(){return _classPrivateFieldGet(this,A).getId()}},{key:"pasteEditor",value:function pasteEditor(t,r){_classPrivateFieldGet(this,A).updateToolbar(t);_classPrivateFieldGet(this,A).updateMode(t);var i=_classPrivateMethodGet(this,x,_getCenterPoint2).call(this),a=i.offsetX,o=i.offsetY,l=this.getNextId(),u=_classPrivateMethodGet(this,S,_createNewEditor2).call(this,function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({parent:this,id:l,x:a,y:o,uiManager:_classPrivateFieldGet(this,A),isCentered:!0},r));u&&this.add(u)}},{key:"deserialize",value:function deserialize(t){var r;switch(null!==(r=t.annotationType)&&void 0!==r?r:t.annotationEditorType){case a.AnnotationEditorType.FREETEXT:return l.FreeTextEditor.deserialize(t,this,_classPrivateFieldGet(this,A));case a.AnnotationEditorType.INK:return u.InkEditor.deserialize(t,this,_classPrivateFieldGet(this,A));case a.AnnotationEditorType.STAMP:return h.StampEditor.deserialize(t,this,_classPrivateFieldGet(this,A))}return null}},{key:"addNewEditor",value:function addNewEditor(){_classPrivateMethodGet(this,E,_createAndAddNewEditor2).call(this,_classPrivateMethodGet(this,x,_getCenterPoint2).call(this),!0)}},{key:"setSelected",value:function setSelected(t){_classPrivateFieldGet(this,A).setSelected(t)}},{key:"toggleSelected",value:function toggleSelected(t){_classPrivateFieldGet(this,A).toggleSelected(t)}},{key:"isSelected",value:function isSelected(t){return _classPrivateFieldGet(this,A).isSelected(t)}},{key:"unselect",value:function unselect(t){_classPrivateFieldGet(this,A).unselect(t)}},{key:"pointerup",value:function pointerup(t){var r=a.FeatureTest.platform.isMac;if(!(0!==t.button||t.ctrlKey&&r)&&t.target===this.div&&_classPrivateFieldGet(this,b)){_classPrivateFieldSet(this,b,!1);_classPrivateFieldGet(this,p)?_classPrivateFieldGet(this,A).getMode()!==a.AnnotationEditorType.STAMP?_classPrivateMethodGet(this,E,_createAndAddNewEditor2).call(this,t,!1):_classPrivateFieldGet(this,A).unselectAll():_classPrivateFieldSet(this,p,!0)}}},{key:"pointerdown",value:function pointerdown(t){if(_classPrivateFieldGet(this,b))_classPrivateFieldSet(this,b,!1);else{var r=a.FeatureTest.platform.isMac;if(!(0!==t.button||t.ctrlKey&&r)&&t.target===this.div){_classPrivateFieldSet(this,b,!0);var i=_classPrivateFieldGet(this,A).getActive();_classPrivateFieldSet(this,p,!i||i.isEmpty())}}}},{key:"findNewParent",value:function findNewParent(t,r,i){var a=_classPrivateFieldGet(this,A).findParent(r,i);if(null===a||a===this)return!1;a.changeParent(t);return!0}},{key:"destroy",value:function destroy(){var t;(null===(t=_classPrivateFieldGet(this,A).getActive())||void 0===t?void 0:t.parent)===this&&_classPrivateFieldGet(this,A).setActiveEditor(null);var r,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,m).values());try{for(i.s();!(r=i.n()).done;){var a,o=r.value;null===(a=_classPrivateFieldGet(this,d))||void 0===a||a.removePointerInTextLayer(o.contentDiv);o.setParent(null);o.isAttachedToDOM=!1;o.div.remove()}}catch(t){i.e(t)}finally{i.f()}this.div=null;_classPrivateFieldGet(this,m).clear();_classPrivateFieldGet(this,A).removeLayer(this)}},{key:"render",value:function render(t){var r=t.viewport;this.viewport=r;(0,c.setLayerDimensions)(this.div,r);var i,a=_createForOfIteratorHelper(_classPrivateFieldGet(this,A).getEditors(this.pageIndex));try{for(a.s();!(i=a.n()).done;){var o=i.value;this.add(o)}}catch(t){a.e(t)}finally{a.f()}this.updateMode()}},{key:"update",value:function update(t){var r=t.viewport;_classPrivateFieldGet(this,A).commitOrRemove();this.viewport=r;(0,c.setLayerDimensions)(this.div,{rotation:r.rotation});this.updateMode()}},{key:"pageDimensions",get:function get(){var t=this.viewport.rawDims;return[t.pageWidth,t.pageHeight]}},{key:"setCleaningUp",value:function setCleaningUp(t){_classPrivateFieldSet(this,w,t)}}]);return AnnotationEditorLayer}();r.AnnotationEditorLayer=k;function _createNewEditor2(t){switch(_classPrivateFieldGet(this,A).getMode()){case a.AnnotationEditorType.FREETEXT:return new l.FreeTextEditor(t);case a.AnnotationEditorType.INK:return new u.InkEditor(t);case a.AnnotationEditorType.STAMP:return new h.StampEditor(t)}return null}function _createAndAddNewEditor2(t,r){var i=this.getNextId(),a=_classPrivateMethodGet(this,S,_createNewEditor2).call(this,{parent:this,id:i,x:t.offsetX,y:t.offsetY,uiManager:_classPrivateFieldGet(this,A),isCentered:r});a&&this.add(a);return a}function _getCenterPoint2(){var t=this.div.getBoundingClientRect(),r=t.x,i=t.y,a=t.width,o=t.height,l=Math.max(0,r),u=Math.max(0,i),c=(l+Math.min(window.innerWidth,r+a))/2-r,h=(u+Math.min(window.innerHeight,i+o))/2-i,d=_slicedToArray(this.viewport.rotation%180==0?[c,h]:[h,c],2);return{offsetX:d[0],offsetY:d[1]}}function _cleanup2(){_classPrivateFieldSet(this,w,!0);var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,m).values());try{for(r.s();!(t=r.n()).done;){var i=t.value;i.isEmpty()&&i.remove()}}catch(t){r.e(t)}finally{r.f()}_classPrivateFieldSet(this,w,!1)}_defineProperty(k,"_initialized",!1)},(t,r,i)=>{var a=i(3),o=i(7),l=i(12),u=i(5).f,c=i(6);a({target:"Object",stat:!0,forced:!c||o((function(){u(1)})),sham:!c},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return u(l(t),r)}})},(t,r,i)=>{var a=i(3),o=i(6),l=i(57),u=i(12),c=i(5),h=i(100);a({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,a=u(t),o=c.f,d=l(a),p={},v=0;d.length>v;)void 0!==(i=o(a,r=d[v++]))&&h(p,r,i);return p}})},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(2);i(71);i(73);i(405);i(402);i(245);i(379);i(310);i(403);i(301);i(258);i(255);i(104);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.FreeTextEditor=void 0;i(363);i(407);i(105);i(140);i(280);i(146);i(148);i(149);i(249);i(92);i(123);i(302);i(347);i(167);i(289);var a=i(1),o=i(356),l=i(353),u=i(410);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,E=new WeakSet,x=new WeakSet,D=new WeakSet,k=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(FreeTextEditor,t);var r=_createSuper(FreeTextEditor);function FreeTextEditor(t){var i;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,FreeTextEditor);_classPrivateMethodInitSpec(_assertThisInitialized(i=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"freeTextEditor"}))),D);_classPrivateMethodInitSpec(_assertThisInitialized(i),x);_classPrivateMethodInitSpec(_assertThisInitialized(i),E);_classPrivateMethodInitSpec(_assertThisInitialized(i),S);_classPrivateMethodInitSpec(_assertThisInitialized(i),A);_classPrivateMethodInitSpec(_assertThisInitialized(i),P);_classPrivateMethodInitSpec(_assertThisInitialized(i),w);_classPrivateFieldInitSpec(_assertThisInitialized(i),c,{writable:!0,value:i.editorDivBlur.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),h,{writable:!0,value:i.editorDivFocus.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),d,{writable:!0,value:i.editorDivInput.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),p,{writable:!0,value:i.editorDivKeydown.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),v,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(i),y,{writable:!0,value:""});_classPrivateFieldInitSpec(_assertThisInitialized(i),g,{writable:!0,value:"".concat(i.id,"-editor")});_classPrivateFieldInitSpec(_assertThisInitialized(i),m,{writable:!0,value:void 0});_classPrivateFieldInitSpec(_assertThisInitialized(i),b,{writable:!0,value:null});_classPrivateFieldSet(_assertThisInitialized(i),v,t.color||FreeTextEditor._defaultColor||l.AnnotationEditor._defaultLineColor);_classPrivateFieldSet(_assertThisInitialized(i),m,t.fontSize||FreeTextEditor._defaultFontSize);return i}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(FreeTextEditor,[{key:"updateParams",value:function updateParams(t,r){switch(t){case a.AnnotationEditorParamsType.FREETEXT_SIZE:_classPrivateMethodGet(this,w,_updateFontSize2).call(this,r);break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:_classPrivateMethodGet(this,P,_updateColor2).call(this,r)}}},{key:"propertiesToUpdate",get:function get(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,_classPrivateFieldGet(this,m)],[a.AnnotationEditorParamsType.FREETEXT_COLOR,_classPrivateFieldGet(this,v)]]}},{key:"_translateEmpty",value:function _translateEmpty(t,r){this._uiManager.translateSelectedEditors(t,r,!0)}},{key:"getInitialTranslation",value:function getInitialTranslation(){var t=this.parentScale;return[-FreeTextEditor._internalPadding*t,-(FreeTextEditor._internalPadding+_classPrivateFieldGet(this,m))*t]}},{key:"rebuild",value:function rebuild(){if(this.parent){_get(_getPrototypeOf(FreeTextEditor.prototype),"rebuild",this).call(this);null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}}},{key:"enableEditMode",value:function enableEditMode(){if(!this.isInEditMode()){this.parent.setEditingState(!1);this.parent.updateToolbar(a.AnnotationEditorType.FREETEXT);_get(_getPrototypeOf(FreeTextEditor.prototype),"enableEditMode",this).call(this);this.overlayDiv.classList.remove("enabled");this.editorDiv.contentEditable=!0;this._isDraggable=!1;this.div.removeAttribute("aria-activedescendant");this.editorDiv.addEventListener("keydown",_classPrivateFieldGet(this,p));this.editorDiv.addEventListener("focus",_classPrivateFieldGet(this,h));this.editorDiv.addEventListener("blur",_classPrivateFieldGet(this,c));this.editorDiv.addEventListener("input",_classPrivateFieldGet(this,d))}}},{key:"disableEditMode",value:function disableEditMode(){if(this.isInEditMode()){this.parent.setEditingState(!0);_get(_getPrototypeOf(FreeTextEditor.prototype),"disableEditMode",this).call(this);this.overlayDiv.classList.add("enabled");this.editorDiv.contentEditable=!1;this.div.setAttribute("aria-activedescendant",_classPrivateFieldGet(this,g));this._isDraggable=!0;this.editorDiv.removeEventListener("keydown",_classPrivateFieldGet(this,p));this.editorDiv.removeEventListener("focus",_classPrivateFieldGet(this,h));this.editorDiv.removeEventListener("blur",_classPrivateFieldGet(this,c));this.editorDiv.removeEventListener("input",_classPrivateFieldGet(this,d));this.div.focus({preventScroll:!0});this.isEditing=!1;this.parent.div.classList.add("freeTextEditing")}}},{key:"focusin",value:function focusin(t){if(this._focusEventsAllowed){_get(_getPrototypeOf(FreeTextEditor.prototype),"focusin",this).call(this,t);t.target!==this.editorDiv&&this.editorDiv.focus()}}},{key:"onceAdded",value:function onceAdded(){var t;if(this.width)_classPrivateMethodGet(this,D,_cheatInitialRect2).call(this);else{this.enableEditMode();this.editorDiv.focus();null!==(t=this._initialOptions)&&void 0!==t&&t.isCentered&&this.center();this._initialOptions=null}}},{key:"isEmpty",value:function isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}},{key:"remove",value:function remove(){this.isEditing=!1;if(this.parent){this.parent.setEditingState(!0);this.parent.div.classList.add("freeTextEditing")}_get(_getPrototypeOf(FreeTextEditor.prototype),"remove",this).call(this)}},{key:"commit",value:function commit(){var t=this;if(this.isInEditMode()){_get(_getPrototypeOf(FreeTextEditor.prototype),"commit",this).call(this);this.disableEditMode();var r=_classPrivateFieldGet(this,y),i=_classPrivateFieldSet(this,y,_classPrivateMethodGet(this,A,_extractText2).call(this).trimEnd());if(r!==i){var a=function setText(r){_classPrivateFieldSet(t,y,r);if(r){_classPrivateMethodGet(t,E,_setContent2).call(t);t._uiManager.rebuild(t);_classPrivateMethodGet(t,S,_setEditorDimensions2).call(t)}else t.remove()};this.addCommands({cmd:function cmd(){a(i)},undo:function undo(){a(r)},mustExec:!1});_classPrivateMethodGet(this,S,_setEditorDimensions2).call(this)}}}},{key:"shouldGetKeyboardEvents",value:function shouldGetKeyboardEvents(){return this.isInEditMode()}},{key:"enterInEditMode",value:function enterInEditMode(){this.enableEditMode();this.editorDiv.focus()}},{key:"dblclick",value:function dblclick(t){this.enterInEditMode()}},{key:"keydown",value:function keydown(t){if(t.target===this.div&&"Enter"===t.key){this.enterInEditMode();t.preventDefault()}}},{key:"editorDivKeydown",value:function editorDivKeydown(t){FreeTextEditor._keyboardManager.exec(this,t)}},{key:"editorDivFocus",value:function editorDivFocus(t){this.isEditing=!0}},{key:"editorDivBlur",value:function editorDivBlur(t){this.isEditing=!1}},{key:"editorDivInput",value:function editorDivInput(t){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}},{key:"disableEditing",value:function disableEditing(){this.editorDiv.setAttribute("role","comment");this.editorDiv.removeAttribute("aria-multiline")}},{key:"enableEditing",value:function enableEditing(){this.editorDiv.setAttribute("role","textbox");this.editorDiv.setAttribute("aria-multiline",!0)}},{key:"render",value:function render(){var t,r,i=this;if(this.div)return this.div;if(this.width){t=this.x;r=this.y}_get(_getPrototypeOf(FreeTextEditor.prototype),"render",this).call(this);this.editorDiv=document.createElement("div");this.editorDiv.className="internal";this.editorDiv.setAttribute("id",_classPrivateFieldGet(this,g));this.enableEditing();FreeTextEditor._l10nPromise.get("editor_free_text2_aria_label").then((function(t){var r;return null===(r=i.editorDiv)||void 0===r?void 0:r.setAttribute("aria-label",t)}));FreeTextEditor._l10nPromise.get("free_text2_default_content").then((function(t){var r;return null===(r=i.editorDiv)||void 0===r?void 0:r.setAttribute("default-content",t)}));this.editorDiv.contentEditable=!0;var a=this.editorDiv.style;a.fontSize="calc(".concat(_classPrivateFieldGet(this,m),"px * var(--scale-factor))");a.color=_classPrivateFieldGet(this,v);this.div.append(this.editorDiv);this.overlayDiv=document.createElement("div");this.overlayDiv.classList.add("overlay","enabled");this.div.append(this.overlayDiv);(0,o.bindEvents)(this,this.div,["dblclick","keydown"]);if(this.width){var l=_slicedToArray(this.parentDimensions,2),u=l[0],c=l[1];if(this.annotationElementId){var h=_classPrivateFieldGet(this,b).position,d=_slicedToArray(this.getInitialTranslation(),2),p=d[0],y=d[1],w=_slicedToArray(this.pageTranslationToScreen(p,y),2);p=w[0];y=w[1];var P,A,S=_slicedToArray(this.pageDimensions,2),x=S[0],D=S[1],k=_slicedToArray(this.pageTranslation,2),C=k[0],T=k[1];switch(this.rotation){case 0:P=t+(h[0]-C)/x;A=r+this.height-(h[1]-T)/D;break;case 90:P=t+(h[0]-C)/x;A=r-(h[1]-T)/D;var I=[y,-p];p=I[0];y=I[1];break;case 180:P=t-this.width+(h[0]-C)/x;A=r-(h[1]-T)/D;var O=[-p,-y];p=O[0];y=O[1];break;case 270:P=t+(h[0]-C-this.height*D)/x;A=r+(h[1]-T-this.width*x)/D;var M=[-y,p];p=M[0];y=M[1]}this.setAt(P*u,A*c,p,y)}else this.setAt(t*u,r*c,this.width*u,this.height*c);_classPrivateMethodGet(this,E,_setContent2).call(this);this._isDraggable=!0;this.editorDiv.contentEditable=!1}else{this._isDraggable=!1;this.editorDiv.contentEditable=!0}return this.div}},{key:"contentDiv",get:function get(){return this.editorDiv}},{key:"serialize",value:function serialize(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};var r=FreeTextEditor._internalPadding*this.parentScale,i=this.getRect(r,r),o=l.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:_classPrivateFieldGet(this,v)),u={annotationType:a.AnnotationEditorType.FREETEXT,color:o,fontSize:_classPrivateFieldGet(this,m),value:_classPrivateFieldGet(this,y),pageIndex:this.pageIndex,rect:i,rotation:this.rotation};if(t)return u;if(this.annotationElementId&&!_classPrivateMethodGet(this,x,_hasElementChanged2).call(this,u))return null;u.id=this.annotationElementId;return u}}],[{key:"_keyboardManager",get:function get(){var t=FreeTextEditor.prototype,r=function arrowChecker(t){return t.isEmpty()},i=o.AnnotationEditorUIManager.TRANSLATE_SMALL,l=o.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,a.shadow)(this,"_keyboardManager",new o.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-i,0],checker:r}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-l,0],checker:r}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[i,0],checker:r}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[l,0],checker:r}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-i],checker:r}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-l],checker:r}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,i],checker:r}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,l],checker:r}]]))}},{key:"initialize",value:function initialize(t){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map((function(r){return[r,t.get(r)]})));var r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){switch(t){case a.AnnotationEditorParamsType.FREETEXT_SIZE:FreeTextEditor._defaultFontSize=r;break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:FreeTextEditor._defaultColor=r}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[a.AnnotationEditorParamsType.FREETEXT_SIZE,FreeTextEditor._defaultFontSize],[a.AnnotationEditorParamsType.FREETEXT_COLOR,FreeTextEditor._defaultColor||l.AnnotationEditor._defaultLineColor]]}},{key:"deserialize",value:function deserialize(t,r,i){var o=null;if(t instanceof u.FreeTextAnnotationElement){var l=t,c=l.data,h=c.defaultAppearanceData,d=h.fontSize,p=h.fontColor,g=c.rect,w=c.rotation,P=c.id,A=l.textContent,S=l.textPosition,E=l.parent.page.pageNumber;if(!A||0===A.length)return null;o=t={annotationType:a.AnnotationEditorType.FREETEXT,color:Array.from(p),fontSize:d,value:A.join("\n"),position:S,pageIndex:E-1,rect:g,rotation:w,id:P,deleted:!1}}var x=_get(_getPrototypeOf(FreeTextEditor),"deserialize",this).call(this,t,r,i);_classPrivateFieldSet(x,m,t.fontSize);_classPrivateFieldSet(x,v,a.Util.makeHexColor.apply(a.Util,_toConsumableArray(t.color)));_classPrivateFieldSet(x,y,t.value);x.annotationElementId=t.id||null;_classPrivateFieldSet(x,b,o);return x}}]);return FreeTextEditor}(l.AnnotationEditor);r.FreeTextEditor=k;function _updateFontSize2(t){var r=this,i=function setFontsize(t){r.editorDiv.style.fontSize="calc(".concat(t,"px * var(--scale-factor))");r.translate(0,-(t-_classPrivateFieldGet(r,m))*r.parentScale);_classPrivateFieldSet(r,m,t);_classPrivateMethodGet(r,S,_setEditorDimensions2).call(r)},o=_classPrivateFieldGet(this,m);this.addCommands({cmd:function cmd(){i(t)},undo:function undo(){i(o)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor2(t){var r=this,i=_classPrivateFieldGet(this,v);this.addCommands({cmd:function cmd(){_classPrivateFieldSet(r,v,r.editorDiv.style.color=t)},undo:function undo(){_classPrivateFieldSet(r,v,r.editorDiv.style.color=i)},mustExec:!0,type:a.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _extractText2(){var t=this.editorDiv.getElementsByTagName("div");if(0===t.length)return this.editorDiv.innerText;var r,i=[],a=_createForOfIteratorHelper(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;i.push(o.innerText.replace(/\r\n?|\n/,""))}}catch(t){a.e(t)}finally{a.f()}return i.join("\n")}function _setEditorDimensions2(){var t,r=_slicedToArray(this.parentDimensions,2),i=r[0],a=r[1];if(this.isAttachedToDOM)t=this.div.getBoundingClientRect();else{var o=this.currentLayer,l=this.div,u=l.style.display;l.style.display="hidden";o.div.append(this.div);t=l.getBoundingClientRect();l.remove();l.style.display=u}if(this.rotation%180==this.parentRotation%180){this.width=t.width/i;this.height=t.height/a}else{this.width=t.height/i;this.height=t.width/a}this.fixAndSetPosition()}function _setContent2(){this.editorDiv.replaceChildren();if(_classPrivateFieldGet(this,y)){var t,r=_createForOfIteratorHelper(_classPrivateFieldGet(this,y).split("\n"));try{for(r.s();!(t=r.n()).done;){var i=t.value,a=document.createElement("div");a.append(i?document.createTextNode(i):document.createElement("br"));this.editorDiv.append(a)}}catch(t){r.e(t)}finally{r.f()}}}function _hasElementChanged2(t){var r=_classPrivateFieldGet(this,b),i=r.value,a=r.fontSize,o=r.color,l=r.rect,u=r.pageIndex;return t.value!==i||t.fontSize!==a||t.rect.some((function(t,r){return Math.abs(t-l[r])>=1}))||t.color.some((function(t,r){return t!==o[r]}))||t.pageIndex!==u}function _cheatInitialRect2(){var t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.annotationElementId){_classPrivateMethodGet(this,S,_setEditorDimensions2).call(this);if(r||0!==this.width&&0!==this.height){var i=k._internalPadding*this.parentScale;_classPrivateFieldGet(this,b).rect=this.getRect(i,i)}else setTimeout((function(){return _classPrivateMethodGet(t,D,_cheatInitialRect2).call(t,!0)}),0)}}_defineProperty(k,"_freeTextDefaultContent","");_defineProperty(k,"_l10nPromise",void 0);_defineProperty(k,"_internalPadding",0);_defineProperty(k,"_defaultColor",null);_defineProperty(k,"_defaultFontSize",10);_defineProperty(k,"_type","freetext")},(t,r,i)=>{var a=i(3),o=i(8),l=i(20),u=i(47),c=i(406),h=i(5),d=i(69);a({target:"Reflect",stat:!0},{get:function get(t,r){var i,a,p=arguments.length<3?t:arguments[2];return u(t)===p?t[r]:(i=h.f(t,r))?c(i)?i.value:void 0===i.get?void 0:o(i.get,p):l(a=d(t))?get(a,r,p):void 0}})},(t,r,i)=>{var a=i(39);t.exports=function(t){return void 0!==t&&(a(t,"value")||a(t,"writable"))}},(t,r,i)=>{i(408);var a=i(3),o=i(409);a({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==o},{trimEnd:o})},(t,r,i)=>{var a=i(3),o=i(409);a({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==o},{trimRight:o})},(t,r,i)=>{var a=i(118).end,o=i(364);t.exports=o("trimEnd")?function trimEnd(){return a(this)}:"".trimEnd},(t,r,i)=>{i(85);i(90);i(292);i(300);i(123);i(112);i(301);i(2);i(71);i(73);i(405);i(402);i(259);i(306);i(307);i(308);i(309);i(310);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.StampAnnotationElement=r.InkAnnotationElement=r.FreeTextAnnotationElement=r.AnnotationLayer=void 0;i(140);i(146);i(148);i(347);i(149);i(257);i(258);i(245);i(351);i(167);i(280);i(312);i(314);i(325);i(327);i(329);i(331);i(333);i(335);i(411);i(297);i(247);i(248);i(105);i(289);i(291);i(255);i(135);i(249);i(379);i(412);i(413);i(415);i(365);i(104);i(92);i(302);var a=i(1),o=i(362),l=i(349),u=i(416),c=i(417),h=i(418);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var d=1e3,p=new WeakSet;function getRectDims(t){return{width:t[2]-t[0],height:t[3]-t[1]}}var v=function(){function AnnotationElementFactory(){_classCallCheck(this,AnnotationElementFactory)}_createClass(AnnotationElementFactory,null,[{key:"create",value:function create(t){switch(t.data.annotationType){case a.AnnotationType.LINK:return new w(t);case a.AnnotationType.TEXT:return new P(t);case a.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new S(t);case"Btn":return t.data.radioButton?new D(t):t.data.checkBox?new x(t):new k(t);case"Ch":return new C(t);case"Sig":return new E(t)}return new A(t);case a.AnnotationType.POPUP:return new T(t);case a.AnnotationType.FREETEXT:return new J(t);case a.AnnotationType.LINE:return new ee(t);case a.AnnotationType.SQUARE:return new re(t);case a.AnnotationType.CIRCLE:return new ie(t);case a.AnnotationType.POLYLINE:return new oe(t);case a.AnnotationType.CARET:return new le(t);case a.AnnotationType.INK:return new ce(t);case a.AnnotationType.POLYGON:return new se(t);case a.AnnotationType.HIGHLIGHT:return new he(t);case a.AnnotationType.UNDERLINE:return new de(t);case a.AnnotationType.SQUIGGLY:return new fe(t);case a.AnnotationType.STRIKEOUT:return new pe(t);case a.AnnotationType.STAMP:return new ve(t);case a.AnnotationType.FILEATTACHMENT:return new ge(t);default:return new g(t)}}}]);return AnnotationElementFactory}(),y=new WeakMap,g=function(){function AnnotationElement(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isRenderable,a=void 0!==i&&i,o=r.ignoreBorder,l=void 0!==o&&o,u=r.createQuadrilaterals,c=void 0!==u&&u;_classCallCheck(this,AnnotationElement);_classPrivateFieldInitSpec(this,y,{writable:!0,value:!1});this.isRenderable=a;this.data=t.data;this.layer=t.layer;this.linkService=t.linkService;this.downloadManager=t.downloadManager;this.imageResourcesPath=t.imageResourcesPath;this.renderForms=t.renderForms;this.svgFactory=t.svgFactory;this.annotationStorage=t.annotationStorage;this.enableScripting=t.enableScripting;this.hasJSActions=t.hasJSActions;this._fieldObjects=t.fieldObjects;this.parent=t.parent;a&&(this.container=this._createContainer(l));c&&this._createQuadrilaterals()}_createClass(AnnotationElement,[{key:"_createContainer",value:function _createContainer(t){var r=this.data,i=this.parent,o=i.page,l=i.viewport,u=document.createElement("section");u.setAttribute("data-annotation-id",r.id);u.style.zIndex=this.parent.zIndex++;this.data.popupRef&&u.setAttribute("aria-haspopup","dialog");r.noRotate&&u.classList.add("norotate");var c=l.rawDims,h=c.pageWidth,d=c.pageHeight,p=c.pageX,v=c.pageY;if(!r.rect||this instanceof T){var g=r.rotation;r.hasOwnCanvas||0===g||this.setRotation(g,u);return u}var m=getRectDims(r.rect),b=m.width,w=m.height,P=a.Util.normalizeRect([r.rect[0],o.view[3]-r.rect[1]+o.view[1],r.rect[2],o.view[3]-r.rect[3]+o.view[1]]);if(!t&&r.borderStyle.width>0){u.style.borderWidth="".concat(r.borderStyle.width,"px");var A=r.borderStyle.horizontalCornerRadius,S=r.borderStyle.verticalCornerRadius;if(A>0||S>0){var E="calc(".concat(A,"px * var(--scale-factor)) / calc(").concat(S,"px * var(--scale-factor))");u.style.borderRadius=E}else if(this instanceof D){var x="calc(".concat(b,"px * var(--scale-factor)) / calc(").concat(w,"px * var(--scale-factor))");u.style.borderRadius=x}switch(r.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:u.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:u.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:u.style.borderBottomStyle="solid"}var k=r.borderColor||null;if(k){_classPrivateFieldSet(this,y,!0);u.style.borderColor=a.Util.makeHexColor(0|k[0],0|k[1],0|k[2])}else u.style.borderWidth=0}u.style.left="".concat(100*(P[0]-p)/h,"%");u.style.top="".concat(100*(P[1]-v)/d,"%");var C=r.rotation;if(r.hasOwnCanvas||0===C){u.style.width="".concat(100*b/h,"%");u.style.height="".concat(100*w/d,"%")}else this.setRotation(C,u);return u}},{key:"setRotation",value:function setRotation(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.container;if(this.data.rect){var i,a,o=this.parent.viewport.rawDims,l=o.pageWidth,u=o.pageHeight,c=getRectDims(this.data.rect),h=c.width,d=c.height;if(t%180==0){i=100*h/l;a=100*d/u}else{i=100*d/l;a=100*h/u}r.style.width="".concat(i,"%");r.style.height="".concat(a,"%");r.setAttribute("data-main-rotation",(360-t)%360)}}},{key:"_commonActions",get:function get(){var t=this,r=function setColor(r,i,a){var o=a.detail[r],l=o[0],c=o.slice(1);a.target.style[i]=u.ColorConverters["".concat(l,"_HTML")](c);t.annotationStorage.setValue(t.data.id,_defineProperty({},i,u.ColorConverters["".concat(l,"_rgb")](c)))};return(0,a.shadow)(this,"_commonActions",{display:function display(r){var display=r.detail.display,i=display%2==1;t.container.style.visibility=i?"hidden":"visible";t.annotationStorage.setValue(t.data.id,{noView:i,noPrint:1===display||2===display})},print:function print(r){t.annotationStorage.setValue(t.data.id,{noPrint:!r.detail.print})},hidden:function hidden(r){var hidden=r.detail.hidden;t.container.style.visibility=hidden?"hidden":"visible";t.annotationStorage.setValue(t.data.id,{noPrint:hidden,noView:hidden})},focus:function focus(t){setTimeout((function(){return t.target.focus({preventScroll:!1})}),0)},userName:function userName(t){t.target.title=t.detail.userName},readonly:function readonly(t){t.target.disabled=t.detail.readonly},required:function required(r){t._setRequired(r.target,r.detail.required)},bgColor:function bgColor(t){r("bgColor","backgroundColor",t)},fillColor:function fillColor(t){r("fillColor","backgroundColor",t)},fgColor:function fgColor(t){r("fgColor","color",t)},textColor:function textColor(t){r("textColor","color",t)},borderColor:function borderColor(t){r("borderColor","borderColor",t)},strokeColor:function strokeColor(t){r("strokeColor","borderColor",t)},rotation:function rotation(r){var i=r.detail.rotation;t.setRotation(i);t.annotationStorage.setValue(t.data.id,{rotation:i})}})}},{key:"_dispatchEventFromSandbox",value:function _dispatchEventFromSandbox(t,r){for(var i=this._commonActions,a=0,o=Object.keys(r.detail);a<o.length;a++){var l=o[a],u=t[l]||i[l];null==u||u(r)}}},{key:"_setDefaultPropertiesFromJS",value:function _setDefaultPropertiesFromJS(t){if(this.enableScripting){var r=this.annotationStorage.getRawValue(this.data.id);if(r)for(var i=this._commonActions,a=0,o=Object.entries(r);a<o.length;a++){var l=_slicedToArray(o[a],2),u=l[0],c=l[1],h=i[u];if(h){h({detail:_defineProperty({},u,c),target:t});delete r[u]}}}}},{key:"_createQuadrilaterals",value:function _createQuadrilaterals(){if(this.container){var t=this.data.quadPoints;if(t){var r=_slicedToArray(this.data.rect,4),i=r[0],a=r[1],o=r[2],l=r[3];if(1===t.length){var u=_slicedToArray(t[0],3),c=u[1],h=c.x,d=c.y,p=u[2],v=p.x,g=p.y;if(o===h&&l===d&&i===v&&a===g)return}var m,b=this.container.style;if(_classPrivateFieldGet(this,y)){var w=b.borderColor,P=b.borderWidth;b.borderWidth=0;m=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">','<g fill="transparent" stroke="'.concat(w,'" stroke-width="').concat(P,'">')];this.container.classList.add("hasBorder")}var A=o-i,S=l-a,E=this.svgFactory,x=E.createElement("svg");x.classList.add("quadrilateralsContainer");x.setAttribute("width",0);x.setAttribute("height",0);var D=E.createElement("defs");x.append(D);var k=E.createElement("clipPath"),C="clippath_".concat(this.data.id);k.setAttribute("id",C);k.setAttribute("clipPathUnits","objectBoundingBox");D.append(k);var T,I=_createForOfIteratorHelper(t);try{for(I.s();!(T=I.n()).done;){var O,M=_slicedToArray(T.value,3),L=M[1],R=L.x,G=L.y,B=M[2],j=B.x,N=B.y,W=E.createElement("rect"),V=(j-i)/A,U=(l-G)/S,H=(R-j)/A,z=(G-N)/S;W.setAttribute("x",V);W.setAttribute("y",U);W.setAttribute("width",H);W.setAttribute("height",z);k.append(W);null===(O=m)||void 0===O||O.push('<rect vector-effect="non-scaling-stroke" x="'.concat(V,'" y="').concat(U,'" width="').concat(H,'" height="').concat(z,'"/>'))}}catch(t){I.e(t)}finally{I.f()}if(_classPrivateFieldGet(this,y)){m.push("</g></svg>')");b.backgroundImage=m.join("")}this.container.append(x);this.container.style.clipPath="url(#".concat(C,")")}}}},{key:"_createPopup",value:function _createPopup(){var t=this.container,r=this.data;t.setAttribute("aria-haspopup","dialog");var i=new T({data:{color:r.color,titleObj:r.titleObj,modificationDate:r.modificationDate,contentsObj:r.contentsObj,richText:r.richText,parentRect:r.rect,borderStyle:0,id:"popup_".concat(r.id),rotation:r.rotation},parent:this.parent,elements:[this]});this.parent.div.append(i.render())}},{key:"render",value:function render(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}},{key:"_getElementsByName",value:function _getElementsByName(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=[];if(this._fieldObjects){var o=this._fieldObjects[t];if(o){var l,u=_createForOfIteratorHelper(o);try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c.page,d=c.id,v=c.exportValues;if(-1!==h&&d!==r){var y="string"==typeof v?v:null,g=document.querySelector('[data-element-id="'.concat(d,'"]'));!g||p.has(g)?i.push({id:d,exportValue:y,domElement:g}):(0,a.warn)("_getElementsByName - element not allowed: ".concat(d))}}}catch(t){u.e(t)}finally{u.f()}}return i}var m,b=_createForOfIteratorHelper(document.getElementsByName(t));try{for(b.s();!(m=b.n()).done;){var w=m.value,P=w.exportValue,A=w.getAttribute("data-element-id");A!==r&&(p.has(w)&&i.push({id:A,exportValue:P,domElement:w}))}}catch(t){b.e(t)}finally{b.f()}return i}},{key:"show",value:function show(){var t;this.container&&(this.container.hidden=!1);null===(t=this.popup)||void 0===t||t.maybeShow()}},{key:"hide",value:function hide(){var t;this.container&&(this.container.hidden=!0);null===(t=this.popup)||void 0===t||t.forceHide()}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return this.container}},{key:"addHighlightArea",value:function addHighlightArea(){var t=this.getElementsToTriggerPopup();if(Array.isArray(t)){var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){r.value.classList.add("highlightArea")}}catch(t){i.e(t)}finally{i.f()}}else t.classList.add("highlightArea")}},{key:"_editOnDoubleClick",value:function _editOnDoubleClick(){var t=this,r=this.annotationEditorType,i=this.data.id;this.container.addEventListener("dblclick",(function(){var a;null===(a=t.linkService.eventBus)||void 0===a||a.dispatch("switchannotationeditormode",{source:t,mode:r,editId:i})}))}}]);return AnnotationElement}(),m=new WeakSet,b=new WeakSet,w=function(t){_inherits(LinkAnnotationElement,t);var r=_createSuper(LinkAnnotationElement);function LinkAnnotationElement(t){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classCallCheck(this,LinkAnnotationElement);_classPrivateMethodInitSpec(_assertThisInitialized(i=r.call(this,t,{isRenderable:!0,ignoreBorder:!(null==a||!a.ignoreBorder),createQuadrilaterals:!0})),b);_classPrivateMethodInitSpec(_assertThisInitialized(i),m);i.isTooltipOnly=t.data.isTooltipOnly;return i}_createClass(LinkAnnotationElement,[{key:"render",value:function render(){var t=this.data,r=this.linkService,i=document.createElement("a");i.setAttribute("data-element-id",t.id);var a=!1;if(t.url){r.addLinkAttributes(i,t.url,t.newWindow);a=!0}else if(t.action){this._bindNamedAction(i,t.action);a=!0}else if(t.attachment){this._bindAttachment(i,t.attachment);a=!0}else if(t.setOCGState){_classPrivateMethodGet(this,b,_bindSetOCGState2).call(this,i,t.setOCGState);a=!0}else if(t.dest){this._bindLink(i,t.dest);a=!0}else{if(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions){this._bindJSAction(i,t);a=!0}if(t.resetForm){this._bindResetFormAction(i,t.resetForm);a=!0}else if(this.isTooltipOnly&&!a){this._bindLink(i,"");a=!0}}this.container.classList.add("linkAnnotation");a&&this.container.append(i);return this.container}},{key:"_bindLink",value:function _bindLink(t,r){var i=this;t.href=this.linkService.getDestinationHash(r);t.onclick=function(){r&&i.linkService.goToDestination(r);return!1};(r||""===r)&&_classPrivateMethodGet(this,m,_setInternalLink2).call(this)}},{key:"_bindNamedAction",value:function _bindNamedAction(t,r){var i=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){i.linkService.executeNamedAction(r);return!1};_classPrivateMethodGet(this,m,_setInternalLink2).call(this)}},{key:"_bindAttachment",value:function _bindAttachment(t,r){var i=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){var t;null===(t=i.downloadManager)||void 0===t||t.openOrDownloadData(i.container,r.content,r.filename);return!1};_classPrivateMethodGet(this,m,_setInternalLink2).call(this)}},{key:"_bindJSAction",value:function _bindJSAction(t,r){var i=this;t.href=this.linkService.getAnchorUrl("");for(var a=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]),o=function _loop(){var o=u[l],c=a.get(o);if(!c)return 1;t[c]=function(){var t;null===(t=i.linkService.eventBus)||void 0===t||t.dispatch("dispatcheventinsandbox",{source:i,detail:{id:r.id,name:o}});return!1}},l=0,u=Object.keys(r.actions);l<u.length;l++)o();t.onclick||(t.onclick=function(){return!1});_classPrivateMethodGet(this,m,_setInternalLink2).call(this)}},{key:"_bindResetFormAction",value:function _bindResetFormAction(t,r){var i=this,o=t.onclick;o||(t.href=this.linkService.getAnchorUrl(""));_classPrivateMethodGet(this,m,_setInternalLink2).call(this);if(this._fieldObjects)t.onclick=function(){null==o||o();var t=r.fields,l=r.refs,u=r.include,c=[];if(0!==t.length||0!==l.length){var h,d=new Set(l),v=_createForOfIteratorHelper(t);try{for(v.s();!(h=v.n()).done;){var y,g=h.value,m=_createForOfIteratorHelper(i._fieldObjects[g]||[]);try{for(m.s();!(y=m.n()).done;){var b=y.value.id;d.add(b)}}catch(t){m.e(t)}finally{m.f()}}}catch(t){v.e(t)}finally{v.f()}for(var w=0,P=Object.values(i._fieldObjects);w<P.length;w++){var A,S=_createForOfIteratorHelper(P[w]);try{for(S.s();!(A=S.n()).done;){var E=A.value;d.has(E.id)===u&&c.push(E)}}catch(t){S.e(t)}finally{S.f()}}}else for(var x=0,D=Object.values(i._fieldObjects);x<D.length;x++){var k=D[x];c.push.apply(c,_toConsumableArray(k))}for(var C=i.annotationStorage,T=[],I=0,O=c;I<O.length;I++){var M=O[I],L=M.id;T.push(L);switch(M.type){case"text":var R=M.defaultValue||"";C.setValue(L,{value:R});window.updateAngularFormValue(L,{value:R});break;case"checkbox":case"radiobutton":var G=M.defaultValue===M.exportValues;C.setValue(L,{value:G});window.updateAngularFormValue(L,{value:G});break;case"combobox":case"listbox":var B=M.defaultValue||"";C.setValue(L,{value:B});window.updateAngularFormValue(L,{value:B});break;default:continue}var j=document.querySelector('[data-element-id="'.concat(L,'"]'));j&&(p.has(j)?j.dispatchEvent(new Event("resetform")):(0,a.warn)("_bindResetFormAction - element not allowed: ".concat(L)))}if(i.enableScripting){var N;null===(N=i.linkService.eventBus)||void 0===N||N.dispatch("dispatcheventinsandbox",{source:i,detail:{id:"app",ids:T,name:"ResetForm"}})}return!1};else{(0,a.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.');o||(t.onclick=function(){return!1})}}}]);return LinkAnnotationElement}(g);function _setInternalLink2(){this.container.setAttribute("data-internal-link","")}function _bindSetOCGState2(t,r){var i=this;t.href=this.linkService.getAnchorUrl("");t.onclick=function(){i.linkService.executeSetOCGState(r);return!1};_classPrivateMethodGet(this,m,_setInternalLink2).call(this)}var P=function(t){_inherits(TextAnnotationElement,t);var r=_createSuper(TextAnnotationElement);function TextAnnotationElement(t){var i,a,o;_classCallCheck(this,TextAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l})}_createClass(TextAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("textAnnotation");var t=document.createElement("img");t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg";t.alt="[{{type}} Annotation]";t.dataset.l10nId="text_annotation_type";t.dataset.l10nArgs=JSON.stringify({type:this.data.name});this.data.popupRef||this._createPopup();this.container.append(t);return this.container}}]);return TextAnnotationElement}(g),A=function(t){_inherits(WidgetAnnotationElement,t);var r=_createSuper(WidgetAnnotationElement);function WidgetAnnotationElement(){_classCallCheck(this,WidgetAnnotationElement);return r.apply(this,arguments)}_createClass(WidgetAnnotationElement,[{key:"render",value:function render(){this.data.alternativeText&&(this.container.title=this.data.alternativeText);return this.container}},{key:"showElementAndHideCanvas",value:function showElementAndHideCanvas(t){if(this.data.hasOwnCanvas){var r;"CANVAS"===(null===(r=t.previousSibling)||void 0===r?void 0:r.nodeName)&&(t.previousSibling.hidden=!0);t.hidden=!1}}},{key:"_getKeyModifier",value:function _getKeyModifier(t){var r=a.FeatureTest.platform,i=r.isWin,o=r.isMac;return i&&t.ctrlKey||o&&t.metaKey}},{key:"_setEventListener",value:function _setEventListener(t,r,i,a){var o=this;r.includes("mouse")?t.addEventListener(r,(function(t){var r;null===(r=o.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:o,detail:{id:o.data.id,name:i,value:a(t),shift:t.shiftKey,modifier:o._getKeyModifier(t)}})})):t.addEventListener(r,(function(t){var r;null===(r=o.linkService.eventBus)||void 0===r||r.dispatch("dispatcheventinsandbox",{source:o,detail:{id:o.data.id,name:i,value:a(t)}})}))}},{key:"_setEventListeners",value:function _setEventListeners(t,r,i){var a,o=_createForOfIteratorHelper(r);try{for(o.s();!(a=o.n()).done;){var l,u=_slicedToArray(a.value,2),c=u[0],h=u[1];("Action"===h||null!==(l=this.data.actions)&&void 0!==l&&l[h])&&this._setEventListener(t,c,h,i)}}catch(t){o.e(t)}finally{o.f()}}},{key:"_setBackgroundColor",value:function _setBackgroundColor(t){var r=this.data.backgroundColor||null;t.style.backgroundColor=null===r?"transparent":a.Util.makeHexColor(r[0],r[1],r[2])}},{key:"_setTextStyle",value:function _setTextStyle(t){var r,i=this.data.defaultAppearanceData.fontColor,o=this.data.defaultAppearanceData.fontSize||9,l=t.style,u=function roundToOneDecimal(t){return Math.round(10*t)/10};if(this.data.multiLine){var c=Math.abs(this.data.rect[3]-this.data.rect[1]-2),h=c/(Math.round(c/(a.LINE_FACTOR*o))||1);r=Math.min(o,u(h/a.LINE_FACTOR))}else{var d=Math.abs(this.data.rect[3]-this.data.rect[1]-2);r=Math.min(o,u(d/a.LINE_FACTOR))}l.fontSize="calc(".concat(r,"px * var(--scale-factor))");l.color=a.Util.makeHexColor(i[0],i[1],i[2]);null!==this.data.textAlignment&&(l.textAlign=["left","center","right"][this.data.textAlignment])}},{key:"_setRequired",value:function _setRequired(t,r){r?t.setAttribute("required",!0):t.removeAttribute("required");t.setAttribute("aria-required",r)}}]);return WidgetAnnotationElement}(g),S=function(t){_inherits(TextWidgetAnnotationElement,t);var r=_createSuper(TextWidgetAnnotationElement);function TextWidgetAnnotationElement(t){_classCallCheck(this,TextWidgetAnnotationElement);var i=t.renderForms||!t.data.hasAppearance&&!!t.data.fieldValue;return r.call(this,t,{isRenderable:i})}_createClass(TextWidgetAnnotationElement,[{key:"setPropertyOnSiblings",value:function setPropertyOnSiblings(t,r,i,a){var o,l=this.annotationStorage,u=_createForOfIteratorHelper(this._getElementsByName(t.name,t.id));try{for(u.s();!(o=u.n()).done;){var c=o.value;c.domElement&&(c.domElement[r]=i);l.setValue(c.id,_defineProperty({},a,i))}}catch(t){u.e(t)}finally{u.f()}}},{key:"render",value:function render(){var t=this,r=this.annotationStorage,i=this.data.id;this.container.classList.add("textWidgetAnnotation");var a=null;if(this.renderForms){var o,l=window.getFormValueFromAngular(this.data.fieldName),u=r.getValue(i,{value:this.data.fieldValue}),c=l.value?l:u;l!==u&&r.setValue(i,{value:l.value});var h=c.value||"",v=r.getValue(i,{charLimit:this.data.maxLen}).charLimit;v&&h.length>v&&(h=h.slice(0,v));var y=c.formattedValue||(null===(o=this.data.textContent)||void 0===o?void 0:o.join("\n"))||null;y&&this.data.comb&&(y=y.replaceAll(/\s+/g,""));var g={userValue:h,formattedValue:y,lastCommittedValue:null,commitKey:1};if(this.data.multiLine){var m;(a=document.createElement("textarea")).textContent=null!==(m=y)&&void 0!==m?m:h;this.data.doNotScroll&&(a.style.overflowY="hidden")}else{var b;(a=document.createElement("input")).type="text";a.setAttribute("value",null!==(b=y)&&void 0!==b?b:h);this.data.doNotScroll&&(a.style.overflowX="hidden")}this.data.hasOwnCanvas&&(a.hidden=!0);p.add(a);a.setAttribute("data-element-id",i);a.disabled=this.data.readOnly;a.name=this.data.fieldName;a.tabIndex=d;this._setRequired(a,this.data.required);v&&(a.maxLength=v);a.addEventListener("input",(function(o){r.setValue(i,{value:o.target.value});window.updateAngularFormValue(i,{value:o.target.value});t.setPropertyOnSiblings(a,"value",o.target.value,"value");g.formattedValue=null}));a.addEventListener("resetform",(function(r){var i,o=null!==(i=t.data.defaultFieldValue)&&void 0!==i?i:"";a.value=g.userValue=o;g.formattedValue=null}));var w=function blurListener(t){var r=g.formattedValue;null!=r&&(t.target.value=r);t.target.scrollLeft=0};window.registerAcroformField(i,a,c.value);a.addEventListener("updateFromAngular",(function(t){return r.setValue(i,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){var P;a.addEventListener("focus",(function(t){var r=t.target;g.userValue&&(r.value=g.userValue);g.lastCommittedValue=r.value;g.commitKey=1}));a.addEventListener("updatefromsandbox",(function(a){t.showElementAndHideCanvas(a.target);var o={value:function value(t){var a;g.userValue=null!==(a=t.detail.value)&&void 0!==a?a:"";r.setValue(i,{value:g.userValue.toString()});window.updateAngularFormValue(i,{value:g.userValue.toString()});t.target.value=g.userValue},formattedValue:function formattedValue(t){var formattedValue=t.detail.formattedValue;g.formattedValue=formattedValue;null!=formattedValue&&t.target!==document.activeElement&&(t.target.value=formattedValue);r.setValue(i,{formattedValue:formattedValue});window.updateAngularFormValue(i,{formattedValue:formattedValue})},selRange:function selRange(t){var r;(r=t.target).setSelectionRange.apply(r,_toConsumableArray(t.detail.selRange))},charLimit:function charLimit(a){var o,charLimit=a.detail.charLimit,l=a.target;if(0!==charLimit){l.setAttribute("maxLength",charLimit);var u=g.userValue;if(u&&!(u.length<=charLimit)){u=u.slice(0,charLimit);l.value=g.userValue=u;r.setValue(i,{value:u});window.updateAngularFormValue(i,{value:u});null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:i,name:"Keystroke",value:u,willCommit:!0,commitKey:1,selStart:l.selectionStart,selEnd:l.selectionEnd}})}}else l.removeAttribute("maxLength")}};t._dispatchEventFromSandbox(o,a)}));a.addEventListener("keydown",(function(r){var a;g.commitKey=1;var o=-1;"Escape"===r.key?o=0:"Enter"!==r.key||t.data.multiLine?"Tab"===r.key&&(g.commitKey=3):o=2;if(-1!==o){var l=r.target.value;if(g.lastCommittedValue!==l){g.lastCommittedValue=l;g.userValue=l;null===(a=t.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:t,detail:{id:i,name:"Keystroke",value:l,willCommit:!0,commitKey:o,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}}}));var A=w;w=null;a.addEventListener("blur",(function(r){if(r.relatedTarget){var a=r.target.value;g.userValue=a;if(g.lastCommittedValue!==a){var o;null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:i,name:"Keystroke",value:a,willCommit:!0,commitKey:g.commitKey,selStart:r.target.selectionStart,selEnd:r.target.selectionEnd}})}A(r)}}));null!==(P=this.data.actions)&&void 0!==P&&P.Keystroke&&a.addEventListener("beforeinput",(function(r){var a;g.lastCommittedValue=null;var o=r.data,l=r.target,u=l.value,c=l.selectionStart,h=l.selectionEnd,d=c,p=h;switch(r.inputType){case"deleteWordBackward":var v=u.substring(0,c).match(/\w*[^\w]*$/);v&&(d-=v[0].length);break;case"deleteWordForward":var y=u.substring(c).match(/^[^\w]*\w*/);y&&(p+=y[0].length);break;case"deleteContentBackward":c===h&&(d-=1);break;case"deleteContentForward":c===h&&(p+=1)}r.preventDefault();null===(a=t.linkService.eventBus)||void 0===a||a.dispatch("dispatcheventinsandbox",{source:t,detail:{id:i,name:"Keystroke",value:u,change:o||"",willCommit:!1,selStart:d,selEnd:p}})}));this._setEventListeners(a,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.value}))}w&&a.addEventListener("blur",w);if(this.data.comb){var S=(this.data.rect[2]-this.data.rect[0])/v;a.classList.add("comb");a.style.letterSpacing="calc(".concat(S,"px * var(--scale-factor) - 1ch)")}}else{(a=document.createElement("div")).textContent=this.data.fieldValue;a.style.verticalAlign="middle";a.style.display="table-cell"}this._setTextStyle(a);this._setBackgroundColor(a);this._setDefaultPropertiesFromJS(a);this.container.append(a);return this.container}}]);return TextWidgetAnnotationElement}(A),E=function(t){_inherits(SignatureWidgetAnnotationElement,t);var r=_createSuper(SignatureWidgetAnnotationElement);function SignatureWidgetAnnotationElement(t){_classCallCheck(this,SignatureWidgetAnnotationElement);return r.call(this,t,{isRenderable:!!t.data.hasOwnCanvas})}return _createClass(SignatureWidgetAnnotationElement)}(A),x=function(t){_inherits(CheckboxWidgetAnnotationElement,t);var r=_createSuper(CheckboxWidgetAnnotationElement);function CheckboxWidgetAnnotationElement(t){_classCallCheck(this,CheckboxWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(CheckboxWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=this.annotationStorage,i=this.data,a=i.id,o=window.getFormValueFromAngular(this.data.fieldName),l=r.getValue(a,{value:i.exportValue===i.fieldValue}).value,u=void 0;o.value&&(u=!0===o.value||o.value===i.exportValue);var c=void 0!==u?u:l,h=!1;if("string"==typeof c||o!==l){c="Off"!==c;r.setValue(a,{value:c});h=!0}this.container.classList.add("buttonWidgetAnnotation","checkBox");var v=document.createElement("input");p.add(v);v.setAttribute("data-element-id",a);v.disabled=i.readOnly;this._setRequired(v,this.data.required);v.type="checkbox";v.name=i.fieldName;c&&v.setAttribute("checked",!0);v.setAttribute("exportValue",i.exportValue);v.tabIndex=d;v.addEventListener("change",(function(o){var l,u=o.target,c=u.name,h=u.checked,d=_createForOfIteratorHelper(t._getElementsByName(c,a));try{for(d.s();!(l=d.n()).done;){var p=l.value,v=h&&p.exportValue===i.exportValue;p.domElement&&(p.domElement.checked=v);r.setValue(p.id,{value:v});window.updateAngularFormValue(a,{value:v})}}catch(t){d.e(t)}finally{d.f()}r.setValue(a,{value:h});window.updateAngularFormValue(a,{value:h})}));v.addEventListener("resetform",(function(t){var r=i.defaultFieldValue||"Off";t.target.checked=r===i.exportValue}));window.registerAcroformField(a,v,!!c&&i.exportValue);v.addEventListener("updateFromAngular",(function(t){return r.setValue(a,{value:t.detail})}));h&&window.updateAngularFormValue(a,{value:c});if(this.enableScripting&&this.hasJSActions){v.addEventListener("updatefromsandbox",(function(i){var o={value:function value(t){t.target.checked="Off"!==t.detail.value;r.setValue(a,{value:t.target.checked});window.updateAngularFormValue(a,{value:t.target.value})}};t._dispatchEventFromSandbox(o,i)}));this._setEventListeners(v,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(v);this._setDefaultPropertiesFromJS(v);this.container.append(v);return this.container}}]);return CheckboxWidgetAnnotationElement}(A),D=function(t){_inherits(RadioButtonWidgetAnnotationElement,t);var r=_createSuper(RadioButtonWidgetAnnotationElement);function RadioButtonWidgetAnnotationElement(t){_classCallCheck(this,RadioButtonWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(RadioButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t,r=this;this.container.classList.add("buttonWidgetAnnotation","radioButton");var i=this.annotationStorage,a=this.data,o=a.id,l=window.getFormValueFromAngular(this.data.fieldName),u=i.getValue(o,{value:a.fieldValue===a.buttonValue}).value,c=null!==(t=l.value)&&void 0!==t?t:u;if("string"==typeof c||l!==u){c=c===a.buttonValue;i.setValue(o,{value:c})}else c&&window.updateAngularFormValue(o,{value:a.buttonValue});var h=document.createElement("input");p.add(h);h.setAttribute("data-element-id",o);h.disabled=a.readOnly;this._setRequired(h,this.data.required);h.type="radio";h.name=a.fieldName;c&&h.setAttribute("checked",!0);h.tabIndex=d;h.addEventListener("change",(function(t){var a,l=t.target,u=l.name,c=l.checked,h=_createForOfIteratorHelper(r._getElementsByName(u,o));try{for(h.s();!(a=h.n()).done;){var d=a.value;i.setValue(d.id,{value:!1});window.updateAngularFormValue(d.id,{value:!1})}}catch(t){h.e(t)}finally{h.f()}i.setValue(o,{value:c});window.updateAngularFormValue(o,{value:c})}));h.addEventListener("resetform",(function(t){var r=a.defaultFieldValue;t.target.checked=null!=r&&r===a.buttonValue}));window.registerAcroformField(o,h,c?a.buttonValue:void 0,a.buttonValue);h.addEventListener("updateFromAngular",(function(t){return i.setValue(o,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){var v=a.buttonValue;h.addEventListener("updatefromsandbox",(function(t){var a={value:function value(t){var a,l=v===t.detail.value,u=_createForOfIteratorHelper(r._getElementsByName(t.target.name));try{for(u.s();!(a=u.n()).done;){var c=a.value,h=l&&c.id===o;c.domElement&&(c.domElement.checked=h);i.setValue(c.id,{value:h});window.updateAngularFormValue(o,{value:h})}}catch(t){u.e(t)}finally{u.f()}}};r._dispatchEventFromSandbox(a,t)}));this._setEventListeners(h,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(function(t){return t.target.checked}))}this._setBackgroundColor(h);this._setDefaultPropertiesFromJS(h);this.container.append(h);return this.container}}]);return RadioButtonWidgetAnnotationElement}(A),k=function(t){_inherits(PushButtonWidgetAnnotationElement,t);var r=_createSuper(PushButtonWidgetAnnotationElement);function PushButtonWidgetAnnotationElement(t){_classCallCheck(this,PushButtonWidgetAnnotationElement);return r.call(this,t,{ignoreBorder:t.data.hasAppearance})}_createClass(PushButtonWidgetAnnotationElement,[{key:"render",value:function render(){var t=this,r=_get(_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype),"render",this).call(this);r.classList.add("buttonWidgetAnnotation","pushButton");this.data.alternativeText&&(r.title=this.data.alternativeText);var i=r.lastChild;if(this.enableScripting&&this.hasJSActions&&i){this._setDefaultPropertiesFromJS(i);i.addEventListener("updatefromsandbox",(function(r){t._dispatchEventFromSandbox({},r)}))}return r}}]);return PushButtonWidgetAnnotationElement}(w),C=function(t){_inherits(ChoiceWidgetAnnotationElement,t);var r=_createSuper(ChoiceWidgetAnnotationElement);function ChoiceWidgetAnnotationElement(t){_classCallCheck(this,ChoiceWidgetAnnotationElement);return r.call(this,t,{isRenderable:t.renderForms})}_createClass(ChoiceWidgetAnnotationElement,[{key:"render",value:function render(){var t=this;this.container.classList.add("choiceWidgetAnnotation");var r=this.annotationStorage,i=this.data.id,a=window.getFormValueFromAngular(this.data.fieldName),o=r.getValue(i,{value:this.data.fieldValue}),l=a.value?a:o;a!==o&&r.setValue(i,{value:a.value});var u=document.createElement("select");p.add(u);u.setAttribute("data-element-id",i);u.disabled=this.data.readOnly;this._setRequired(u,this.data.required);u.name=this.data.fieldName;u.tabIndex=d;var c=this.data.combo&&this.data.options.length>0;if(!this.data.combo){u.size=this.data.options.length;this.data.multiSelect&&(u.multiple=!0)}u.addEventListener("resetform",(function(r){var i,a=t.data.defaultFieldValue,o=_createForOfIteratorHelper(u.options);try{for(o.s();!(i=o.n()).done;){var l=i.value;l.selected=l.value===a}}catch(t){o.e(t)}finally{o.f()}}));var h,v=_createForOfIteratorHelper(this.data.options);try{for(v.s();!(h=v.n()).done;){var y=h.value,g=document.createElement("option");g.textContent=y.displayValue;g.value=y.exportValue;if(l.value.includes(y.exportValue)){g.setAttribute("selected",!0);c=!1}u.append(g)}}catch(t){v.e(t)}finally{v.f()}var m=null;if(c){var b=document.createElement("option");b.value=" ";b.setAttribute("hidden",!0);b.setAttribute("selected",!0);u.prepend(b);m=function removeEmptyEntry(){b.remove();u.removeEventListener("input",m);m=null};u.addEventListener("input",m)}var w=function getValue(t){var r=t?"value":"textContent",i=u.options;return u.multiple?Array.prototype.filter.call(i,(function(t){return t.selected})).map((function(t){return t[r]})):-1===i.selectedIndex?null:i[i.selectedIndex][r]},P=w(!1),A=function getItems(t){var r=t.target.options;return Array.prototype.map.call(r,(function(t){return{displayValue:t.textContent,exportValue:t.value}}))};window.registerAcroformField(i,u,P);u.addEventListener("updateFromAngular",(function(t){return r.setValue(i,{value:t.detail})}));if(this.enableScripting&&this.hasJSActions){u.addEventListener("updatefromsandbox",(function(a){var o={value:function value(t){var a;null===(a=m)||void 0===a||a();var o,value=t.detail.value,l=new Set(Array.isArray(value)?value:[value]),c=_createForOfIteratorHelper(u.options);try{for(c.s();!(o=c.n()).done;){var h=o.value;h.selected=l.has(h.value)}}catch(t){c.e(t)}finally{c.f()}r.setValue(i,{value:w(!0)});P=w(!1);window.updateAngularFormValue(i,{value:P})},multipleSelection:function multipleSelection(t){u.multiple=!0},remove:function remove(t){var a=u.options,o=t.detail.remove;a[o].selected=!1;u.remove(o);if(a.length>0){var l=Array.prototype.findIndex.call(a,(function(t){return t.selected}));-1===l&&(a[0].selected=!0)}r.setValue(i,{value:w(!0),items:A(t)});P=w(!1)},clear:function clear(t){for(;0!==u.length;)u.remove(0);r.setValue(i,{value:null,items:[]});P=w(!1);window.updateAngularFormValue(i,{value:P})},insert:function insert(t){var a=t.detail.insert,o=a.index,l=a.displayValue,c=a.exportValue,h=u.children[o],d=document.createElement("option");d.textContent=l;d.value=c;h?h.before(d):u.append(d);r.setValue(i,{value:w(!0),items:A(t)});P=w(!1);window.updateAngularFormValue(i,{value:P})},items:function items(t){for(var items=t.detail.items;0!==u.length;)u.remove(0);var a,o=_createForOfIteratorHelper(items);try{for(o.s();!(a=o.n()).done;){var l=a.value,c=l.displayValue,h=l.exportValue,d=document.createElement("option");d.textContent=c;d.value=h;u.append(d)}}catch(t){o.e(t)}finally{o.f()}u.options.length>0&&(u.options[0].selected=!0);r.setValue(i,{value:w(!0),items:A(t)});P=w(!1);window.updateAngularFormValue(i,{value:P})},indices:function indices(t){var a,indices=new Set(t.detail.indices),o=_createForOfIteratorHelper(t.target.options);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.selected=indices.has(l.index)}}catch(t){o.e(t)}finally{o.f()}r.setValue(i,{value:w(!0)});P=w(!1);window.updateAngularFormValue(i,{value:P})},editable:function editable(t){t.target.disabled=!t.detail.editable}};t._dispatchEventFromSandbox(o,a)}));u.addEventListener("input",(function(a){var o,l=w(!0);r.setValue(i,{value:l});window.updateAngularFormValue(i,{value:l});a.preventDefault();null===(o=t.linkService.eventBus)||void 0===o||o.dispatch("dispatcheventinsandbox",{source:t,detail:{id:i,name:"Keystroke",value:P,changeEx:l,willCommit:!1,commitKey:1,keyDown:!1}})}));this._setEventListeners(u,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(function(t){return t.target.value}))}else u.addEventListener("input",(function(t){r.setValue(i,{value:w(!0)});window.updateAngularFormValue(i,{value:w(!0)})}));this.data.combo&&this._setTextStyle(u);this._setBackgroundColor(u);this._setDefaultPropertiesFromJS(u);this.container.append(u);return this.container}}]);return ChoiceWidgetAnnotationElement}(A),T=function(t){_inherits(PopupAnnotationElement,t);var r=_createSuper(PopupAnnotationElement);function PopupAnnotationElement(t){var i,a,o,l;_classCallCheck(this,PopupAnnotationElement);var u=t.data,c=t.elements,h=!!(null!==(i=u.titleObj)&&void 0!==i&&i.str||null!==(a=u.contentsObj)&&void 0!==a&&a.str||null!==(o=u.richText)&&void 0!==o&&o.str);(l=r.call(this,t,{isRenderable:h})).elements=c;return l}_createClass(PopupAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("popupAnnotation");var t,r=new Q({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),i=[],a=_createForOfIteratorHelper(this.elements);try{for(a.s();!(t=a.n()).done;){var o=t.value;o.popup=r;i.push(o.data.id);o.addHighlightArea()}}catch(t){a.e(t)}finally{a.f()}this.container.setAttribute("aria-controls",i.join(","));return this.container}}]);return PopupAnnotationElement}(g),I=new WeakMap,O=new WeakMap,M=new WeakMap,L=new WeakMap,R=new WeakMap,G=new WeakMap,B=new WeakMap,j=new WeakMap,N=new WeakMap,W=new WeakMap,V=new WeakMap,U=new WeakMap,H=new WeakMap,z=new WeakMap,q=new WeakMap,Y=new WeakMap,K=new WeakSet,X=new WeakSet,$=new WeakSet,Q=function(){function PopupElement(t){var r=t.container,i=t.color,a=t.elements,l=t.titleObj,u=t.modificationDate,c=t.contentsObj,h=t.richText,d=t.parent,p=t.rect,v=t.parentRect,y=t.open;_classCallCheck(this,PopupElement);_classPrivateMethodInitSpec(this,$);_classPrivateMethodInitSpec(this,X);_classPrivateMethodInitSpec(this,K);_classPrivateFieldInitSpec(this,I,{writable:!0,value:null});_classPrivateFieldInitSpec(this,O,{writable:!0,value:_classPrivateMethodGet(this,$,_hide2).bind(this)});_classPrivateFieldInitSpec(this,M,{writable:!0,value:_classPrivateMethodGet(this,X,_show2).bind(this)});_classPrivateFieldInitSpec(this,L,{writable:!0,value:_classPrivateMethodGet(this,K,_toggle2).bind(this)});_classPrivateFieldInitSpec(this,R,{writable:!0,value:null});_classPrivateFieldInitSpec(this,G,{writable:!0,value:null});_classPrivateFieldInitSpec(this,B,{writable:!0,value:null});_classPrivateFieldInitSpec(this,j,{writable:!0,value:null});_classPrivateFieldInitSpec(this,N,{writable:!0,value:null});_classPrivateFieldInitSpec(this,W,{writable:!0,value:null});_classPrivateFieldInitSpec(this,V,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,U,{writable:!0,value:null});_classPrivateFieldInitSpec(this,H,{writable:!0,value:null});_classPrivateFieldInitSpec(this,z,{writable:!0,value:null});_classPrivateFieldInitSpec(this,q,{writable:!0,value:null});_classPrivateFieldInitSpec(this,Y,{writable:!0,value:!1});_classPrivateFieldSet(this,G,r);_classPrivateFieldSet(this,q,l);_classPrivateFieldSet(this,B,c);_classPrivateFieldSet(this,z,h);_classPrivateFieldSet(this,N,d);_classPrivateFieldSet(this,R,i);_classPrivateFieldSet(this,H,p);_classPrivateFieldSet(this,W,v);_classPrivateFieldSet(this,j,a);var g=o.PDFDateString.toDateObject(u);g&&_classPrivateFieldSet(this,I,d.l10n.get("annotation_date_string",{date:g.toLocaleDateString(),time:g.toLocaleTimeString()}));this.trigger=a.flatMap((function(t){return t.getElementsToTriggerPopup()}));var m,b=_createForOfIteratorHelper(this.trigger);try{for(b.s();!(m=b.n()).done;){var w=m.value;w.addEventListener("click",_classPrivateFieldGet(this,L));w.addEventListener("mouseenter",_classPrivateFieldGet(this,M));w.addEventListener("mouseleave",_classPrivateFieldGet(this,O))}}catch(t){b.e(t)}finally{b.f()}_classPrivateFieldGet(this,G).hidden=!0;y&&_classPrivateMethodGet(this,K,_toggle2).call(this)}_createClass(PopupElement,[{key:"render",value:function render(){if(!_classPrivateFieldGet(this,U)){var t=_classPrivateFieldGet(this,N),r=t.page.view,i=t.viewport.rawDims,o=i.pageWidth,l=i.pageHeight,u=i.pageX,c=i.pageY,d=_classPrivateFieldSet(this,U,document.createElement("div"));d.className="popup";if(_classPrivateFieldGet(this,R)){var p=d.style.outlineColor=a.Util.makeHexColor.apply(a.Util,_toConsumableArray(_classPrivateFieldGet(this,R)));if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))d.style.backgroundColor="color-mix(in srgb, ".concat(p," 30%, white)");else{d.style.backgroundColor=a.Util.makeHexColor.apply(a.Util,_toConsumableArray(_classPrivateFieldGet(this,R).map((function(t){return Math.floor(.7*(255-t)+t)}))))}}var v=document.createElement("span");v.className="header";var y=document.createElement("h1");v.append(y);var g=_classPrivateFieldGet(this,q);y.dir=g.dir;y.textContent=g.str;d.append(v);if(_classPrivateFieldGet(this,I)){var m=document.createElement("span");m.classList.add("popupDate");_classPrivateFieldGet(this,I).then((function(t){m.textContent=t}));v.append(m)}var b=_classPrivateFieldGet(this,B),w=_classPrivateFieldGet(this,z);if(null==w||!w.str||null!=b&&b.str&&b.str!==w.str){var P=this._formatContents(b);d.append(P)}else{h.XfaLayer.render({xfaHtml:w.html,intent:"richText",div:d});d.lastChild.classList.add("richText","popupContent")}var A,S=!!_classPrivateFieldGet(this,W),E=_classPrivateFieldGet(this,S?W:H),x=_createForOfIteratorHelper(_classPrivateFieldGet(this,j));try{for(x.s();!(A=x.n()).done;){var D=A.value;if(!E||null!==a.Util.intersect(D.data.rect,E)){E=D.data.rect;S=!0;break}}}catch(t){x.e(t)}finally{x.f()}var k=a.Util.normalizeRect([E[0],r[3]-E[1]+r[1],E[2],r[3]-E[3]+r[1]]),C=S?E[2]-E[0]+5:0,T=k[0]+C,O=k[1],M=_classPrivateFieldGet(this,G).style;M.left="".concat(100*(T-u)/o,"%");M.top="".concat(100*(O-c)/l,"%");_classPrivateFieldGet(this,G).append(d)}}},{key:"_formatContents",value:function _formatContents(t){var r=t.str,i=t.dir,a=document.createElement("p");a.classList.add("popupContent");a.dir=i;for(var o=r.split(/(?:\r\n?|\n)/),l=0,u=o.length;l<u;++l){var c=o[l];a.append(document.createTextNode(c));l<u-1&&a.append(document.createElement("br"))}return a}},{key:"forceHide",value:function forceHide(){_classPrivateFieldSet(this,Y,this.isVisible);_classPrivateFieldGet(this,Y)&&(_classPrivateFieldGet(this,G).hidden=!0)}},{key:"maybeShow",value:function maybeShow(){if(_classPrivateFieldGet(this,Y)){_classPrivateFieldSet(this,Y,!1);_classPrivateFieldGet(this,G).hidden=!1}}},{key:"isVisible",get:function get(){return!1===_classPrivateFieldGet(this,G).hidden}}]);return PopupElement}();function _toggle2(){_classPrivateFieldSet(this,V,!_classPrivateFieldGet(this,V));if(_classPrivateFieldGet(this,V)){_classPrivateMethodGet(this,X,_show2).call(this);_classPrivateFieldGet(this,G).addEventListener("click",_classPrivateFieldGet(this,L))}else{_classPrivateMethodGet(this,$,_hide2).call(this);_classPrivateFieldGet(this,G).removeEventListener("click",_classPrivateFieldGet(this,L))}}function _show2(){_classPrivateFieldGet(this,U)||this.render();if(this.isVisible)_classPrivateFieldGet(this,V)&&_classPrivateFieldGet(this,G).classList.add("focused");else{_classPrivateFieldGet(this,G).hidden=!1;_classPrivateFieldGet(this,G).style.zIndex=parseInt(_classPrivateFieldGet(this,G).style.zIndex)+1e3}}function _hide2(){_classPrivateFieldGet(this,G).classList.remove("focused");if(!_classPrivateFieldGet(this,V)&&this.isVisible){_classPrivateFieldGet(this,G).hidden=!0;_classPrivateFieldGet(this,G).style.zIndex=parseInt(_classPrivateFieldGet(this,G).style.zIndex)-1e3}}var J=function(t){_inherits(FreeTextAnnotationElement,t);var r=_createSuper(FreeTextAnnotationElement);function FreeTextAnnotationElement(t){var i,o,l,u;_classCallCheck(this,FreeTextAnnotationElement);var c=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(o=t.data.contentsObj)&&void 0!==o&&o.str||null!==(l=t.data.richText)&&void 0!==l&&l.str);(u=r.call(this,t,{isRenderable:c,ignoreBorder:!0})).textContent=t.data.textContent;u.textPosition=t.data.textPosition;u.annotationEditorType=a.AnnotationEditorType.FREETEXT;return u}_createClass(FreeTextAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("freeTextAnnotation");if(this.textContent){var t=document.createElement("div");t.classList.add("annotationTextContent");t.setAttribute("role","comment");var r,i=_createForOfIteratorHelper(this.textContent);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=document.createElement("span");o.textContent=a;t.append(o)}}catch(t){i.e(t)}finally{i.f()}this.container.append(t)}this.data.popupRef||this._createPopup();this._editOnDoubleClick();return this.container}}]);return FreeTextAnnotationElement}(g);r.FreeTextAnnotationElement=J;var Z=new WeakMap,ee=function(t){_inherits(LineAnnotationElement,t);var r=_createSuper(LineAnnotationElement);function LineAnnotationElement(t){var i,a,o,l;_classCallCheck(this,LineAnnotationElement);var u=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:u,ignoreBorder:!0})),Z,{writable:!0,value:null});return l}_createClass(LineAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("lineAnnotation");var t=this.data,r=getRectDims(t.rect),i=r.width,a=r.height,o=this.svgFactory.create(i,a,!0),l=_classPrivateFieldSet(this,Z,this.svgFactory.createElement("svg:line"));l.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]);l.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]);l.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]);l.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]);l.setAttribute("stroke-width",t.borderStyle.width||1);l.setAttribute("stroke","transparent");l.setAttribute("fill","transparent");o.append(l);this.container.append(o);t.popupRef||this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,Z)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return LineAnnotationElement}(g),te=new WeakMap,re=function(t){_inherits(SquareAnnotationElement,t);var r=_createSuper(SquareAnnotationElement);function SquareAnnotationElement(t){var i,a,o,l;_classCallCheck(this,SquareAnnotationElement);var u=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:u,ignoreBorder:!0})),te,{writable:!0,value:null});return l}_createClass(SquareAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("squareAnnotation");var t=this.data,r=getRectDims(t.rect),i=r.width,a=r.height,o=this.svgFactory.create(i,a,!0),l=t.borderStyle.width,u=_classPrivateFieldSet(this,te,this.svgFactory.createElement("svg:rect"));u.setAttribute("x",l/2);u.setAttribute("y",l/2);u.setAttribute("width",i-l);u.setAttribute("height",a-l);u.setAttribute("stroke-width",l||1);u.setAttribute("stroke","transparent");u.setAttribute("fill","transparent");o.append(u);this.container.append(o);t.popupRef||this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,te)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return SquareAnnotationElement}(g),ne=new WeakMap,ie=function(t){_inherits(CircleAnnotationElement,t);var r=_createSuper(CircleAnnotationElement);function CircleAnnotationElement(t){var i,a,o,l;_classCallCheck(this,CircleAnnotationElement);var u=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:u,ignoreBorder:!0})),ne,{writable:!0,value:null});return l}_createClass(CircleAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("circleAnnotation");var t=this.data,r=getRectDims(t.rect),i=r.width,a=r.height,o=this.svgFactory.create(i,a,!0),l=t.borderStyle.width,u=_classPrivateFieldSet(this,ne,this.svgFactory.createElement("svg:ellipse"));u.setAttribute("cx",i/2);u.setAttribute("cy",a/2);u.setAttribute("rx",i/2-l/2);u.setAttribute("ry",a/2-l/2);u.setAttribute("stroke-width",l||1);u.setAttribute("stroke","transparent");u.setAttribute("fill","transparent");o.append(u);this.container.append(o);t.popupRef||this._createPopup();return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ne)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return CircleAnnotationElement}(g),ae=new WeakMap,oe=function(t){_inherits(PolylineAnnotationElement,t);var r=_createSuper(PolylineAnnotationElement);function PolylineAnnotationElement(t){var i,a,o,l;_classCallCheck(this,PolylineAnnotationElement);var u=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);_classPrivateFieldInitSpec(_assertThisInitialized(l=r.call(this,t,{isRenderable:u,ignoreBorder:!0})),ae,{writable:!0,value:null});l.containerClassName="polylineAnnotation";l.svgElementName="svg:polyline";return l}_createClass(PolylineAnnotationElement,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var t,r=this.data,i=getRectDims(r.rect),a=i.width,o=i.height,l=this.svgFactory.create(a,o,!0),u=[],c=_createForOfIteratorHelper(r.vertices);try{for(c.s();!(t=c.n()).done;){var h=t.value,d=h.x-r.rect[0],p=r.rect[3]-h.y;u.push(d+","+p)}}catch(t){c.e(t)}finally{c.f()}u=u.join(" ");var v=_classPrivateFieldSet(this,ae,this.svgFactory.createElement(this.svgElementName));v.setAttribute("points",u);v.setAttribute("stroke-width",r.borderStyle.width||1);v.setAttribute("stroke","transparent");v.setAttribute("fill","transparent");l.append(v);this.container.append(l);r.popupRef||this._createPopup(v,r);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ae)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return PolylineAnnotationElement}(g),se=function(t){_inherits(PolygonAnnotationElement,t);var r=_createSuper(PolygonAnnotationElement);function PolygonAnnotationElement(t){var i;_classCallCheck(this,PolygonAnnotationElement);(i=r.call(this,t)).containerClassName="polygonAnnotation";i.svgElementName="svg:polygon";return i}return _createClass(PolygonAnnotationElement)}(oe),le=function(t){_inherits(CaretAnnotationElement,t);var r=_createSuper(CaretAnnotationElement);function CaretAnnotationElement(t){var i,a,o;_classCallCheck(this,CaretAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(CaretAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("caretAnnotation");this.data.popupRef||this._createPopup();return this.container}}]);return CaretAnnotationElement}(g),ue=new WeakMap,ce=function(t){_inherits(InkAnnotationElement,t);var r=_createSuper(InkAnnotationElement);function InkAnnotationElement(t){var i,o,l,u;_classCallCheck(this,InkAnnotationElement);var c=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(o=t.data.contentsObj)&&void 0!==o&&o.str||null!==(l=t.data.richText)&&void 0!==l&&l.str);_classPrivateFieldInitSpec(_assertThisInitialized(u=r.call(this,t,{isRenderable:c,ignoreBorder:!0})),ue,{writable:!0,value:[]});u.containerClassName="inkAnnotation";u.svgElementName="svg:polyline";u.annotationEditorType=a.AnnotationEditorType.INK;return u}_createClass(InkAnnotationElement,[{key:"render",value:function render(){this.container.classList.add(this.containerClassName);var t,r=this.data,i=getRectDims(r.rect),a=i.width,o=i.height,l=this.svgFactory.create(a,o,!0),u=_createForOfIteratorHelper(r.inkLists);try{for(u.s();!(t=u.n()).done;){var c,h=t.value,d=[],p=_createForOfIteratorHelper(h);try{for(p.s();!(c=p.n()).done;){var v=c.value,y=v.x-r.rect[0],g=r.rect[3]-v.y;d.push("".concat(y,",").concat(g))}}catch(t){p.e(t)}finally{p.f()}d=d.join(" ");var m=this.svgFactory.createElement(this.svgElementName);_classPrivateFieldGet(this,ue).push(m);m.setAttribute("points",d);m.setAttribute("stroke-width",r.borderStyle.width||1);m.setAttribute("stroke","transparent");m.setAttribute("fill","transparent");r.popupRef||this._createPopup(m,r);l.append(m)}}catch(t){u.e(t)}finally{u.f()}this.container.append(l);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ue)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}}]);return InkAnnotationElement}(g);r.InkAnnotationElement=ce;var he=function(t){_inherits(HighlightAnnotationElement,t);var r=_createSuper(HighlightAnnotationElement);function HighlightAnnotationElement(t){var i,a,o;_classCallCheck(this,HighlightAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(HighlightAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("highlightAnnotation");return this.container}}]);return HighlightAnnotationElement}(g),de=function(t){_inherits(UnderlineAnnotationElement,t);var r=_createSuper(UnderlineAnnotationElement);function UnderlineAnnotationElement(t){var i,a,o;_classCallCheck(this,UnderlineAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(UnderlineAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("underlineAnnotation");return this.container}}]);return UnderlineAnnotationElement}(g),fe=function(t){_inherits(SquigglyAnnotationElement,t);var r=_createSuper(SquigglyAnnotationElement);function SquigglyAnnotationElement(t){var i,a,o;_classCallCheck(this,SquigglyAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(SquigglyAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("squigglyAnnotation");return this.container}}]);return SquigglyAnnotationElement}(g),pe=function(t){_inherits(StrikeOutAnnotationElement,t);var r=_createSuper(StrikeOutAnnotationElement);function StrikeOutAnnotationElement(t){var i,a,o;_classCallCheck(this,StrikeOutAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0,createQuadrilaterals:!0})}_createClass(StrikeOutAnnotationElement,[{key:"render",value:function render(){this.data.popupRef||this._createPopup();this.container.classList.add("strikeoutAnnotation");return this.container}}]);return StrikeOutAnnotationElement}(g),ve=function(t){_inherits(StampAnnotationElement,t);var r=_createSuper(StampAnnotationElement);function StampAnnotationElement(t){var i,a,o;_classCallCheck(this,StampAnnotationElement);var l=!!(t.data.popupRef||null!==(i=t.data.titleObj)&&void 0!==i&&i.str||null!==(a=t.data.contentsObj)&&void 0!==a&&a.str||null!==(o=t.data.richText)&&void 0!==o&&o.str);return r.call(this,t,{isRenderable:l,ignoreBorder:!0})}_createClass(StampAnnotationElement,[{key:"render",value:function render(){this.container.classList.add("stampAnnotation");this.data.popupRef||this._createPopup();return this.container}}]);return StampAnnotationElement}(g);r.StampAnnotationElement=ve;var ye=new WeakMap,ge=function(t){_inherits(FileAttachmentAnnotationElement,t);var r=_createSuper(FileAttachmentAnnotationElement);function FileAttachmentAnnotationElement(t){var i,a;_classCallCheck(this,FileAttachmentAnnotationElement);_classPrivateFieldInitSpec(_assertThisInitialized(a=r.call(this,t,{isRenderable:!0})),ye,{writable:!0,value:null});var l=a.data.file,u=l.filename,c=l.content;a.filename=(0,o.getFilenameFromUrl)(u,!0);a.content=c;null===(i=a.linkService.eventBus)||void 0===i||i.dispatch("fileattachmentannotation",{source:_assertThisInitialized(a),filename:u,content:c});return a}_createClass(FileAttachmentAnnotationElement,[{key:"render",value:function render(){var t,r;this.container.classList.add("fileAttachmentAnnotation");var i,a=this.data;if(a.hasAppearance||0===a.fillAlpha)i=document.createElement("div");else{(i=document.createElement("img")).src="".concat(this.imageResourcesPath,"annotation-").concat(/paperclip/i.test(a.name)?"paperclip":"pushpin",".svg");a.fillAlpha&&a.fillAlpha<1&&(i.style="filter: opacity(".concat(Math.round(100*a.fillAlpha),"%);"))}i.classList.add("popupTriggerArea");i.addEventListener("dblclick",this._download.bind(this));_classPrivateFieldSet(this,ye,i);!a.popupRef&&(null!==(t=a.titleObj)&&void 0!==t&&t.str||null!==(r=a.contentsObj)&&void 0!==r&&r.str||a.richText)&&this._createPopup();this.container.append(i);return this.container}},{key:"getElementsToTriggerPopup",value:function getElementsToTriggerPopup(){return _classPrivateFieldGet(this,ye)}},{key:"addHighlightArea",value:function addHighlightArea(){this.container.classList.add("highlightArea")}},{key:"_download",value:function _download(){var t;null===(t=this.downloadManager)||void 0===t||t.openOrDownloadData(this.container,this.content,this.filename)}}]);return FileAttachmentAnnotationElement}(g),me=new WeakMap,_e=new WeakMap,be=new WeakMap,we=new WeakSet,Pe=new WeakSet,Ae=function(){function AnnotationLayer(t){var r=t.div,i=t.accessibilityManager,a=t.annotationCanvasMap,o=t.l10n,l=t.page,u=t.viewport;_classCallCheck(this,AnnotationLayer);_classPrivateMethodInitSpec(this,Pe);_classPrivateMethodInitSpec(this,we);_classPrivateFieldInitSpec(this,me,{writable:!0,value:null});_classPrivateFieldInitSpec(this,_e,{writable:!0,value:null});_classPrivateFieldInitSpec(this,be,{writable:!0,value:new Map});this.div=r;_classPrivateFieldSet(this,me,i);_classPrivateFieldSet(this,_e,a);this.l10n=o;this.page=l;this.viewport=u;this.zIndex=0;this.l10n||(this.l10n=c.NullL10n)}_createClass(AnnotationLayer,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,u,c,h,d,p,y,g,m,b,w,P,A,S;return _regeneratorRuntime().wrap((function _callee$(E){for(;;)switch(E.prev=E.next){case 0:r=t.annotations;i=this.div;(0,o.setLayerDimensions)(i,this.viewport);u=new Map;c={data:null,layer:i,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:!1!==t.renderForms,svgFactory:new o.DOMSVGFactory,annotationStorage:t.annotationStorage||new l.AnnotationStorage,enableScripting:!0===t.enableScripting,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};h=_createForOfIteratorHelper(r);E.prev=6;h.s();case 8:if((d=h.n()).done){E.next=34;break}if(!(p=d.value).noHTML){E.next=12;break}return E.abrupt("continue",32);case 12:if(y=p.annotationType===a.AnnotationType.POPUP){E.next=19;break}g=getRectDims(p.rect),m=g.width,b=g.height;if(!(m<=0||b<=0)){E.next=17;break}return E.abrupt("continue",32);case 17:E.next=23;break;case 19:if(w=u.get(p.id)){E.next=22;break}return E.abrupt("continue",32);case 22:c.elements=w;case 23:c.data=p;if((P=v.create(c)).isRenderable){E.next=27;break}return E.abrupt("continue",32);case 27:!y&&p.popupRef&&((A=u.get(p.popupRef))?A.push(P):u.set(p.popupRef,[P]));P.annotationEditorType>0&&_classPrivateFieldGet(this,be).set(P.data.id,P);S=P.render();p.hidden&&(S.style.visibility="hidden");_classPrivateMethodGet(this,we,_appendElement2).call(this,S,p.id);case 32:E.next=8;break;case 34:E.next=39;break;case 36:E.prev=36;E.t0=E.catch(6);h.e(E.t0);case 39:E.prev=39;h.f();return E.finish(39);case 42:_classPrivateMethodGet(this,Pe,_setAnnotationCanvasMap2).call(this);E.next=45;return this.l10n.translate(i);case 45:case"end":return E.stop()}}),_callee,this,[[6,36,39,42]])}))),function render(r){return t.apply(this,arguments)})},{key:"update",value:function update(t){var r=t.viewport,i=this.div;this.viewport=r;(0,o.setLayerDimensions)(i,{rotation:r.rotation});_classPrivateMethodGet(this,Pe,_setAnnotationCanvasMap2).call(this);i.hidden=!1}},{key:"getEditableAnnotations",value:function getEditableAnnotations(){return Array.from(_classPrivateFieldGet(this,be).values())}},{key:"getEditableAnnotation",value:function getEditableAnnotation(t){return _classPrivateFieldGet(this,be).get(t)}}]);var t;return AnnotationLayer}();r.AnnotationLayer=Ae;function _appendElement2(t,r){var i,a=t.firstChild||t;a.id="".concat(o.AnnotationPrefix).concat(r);this.div.append(t);null===(i=_classPrivateFieldGet(this,me))||void 0===i||i.moveElementInDOM(this.div,t,a,!1)}function _setAnnotationCanvasMap2(){if(_classPrivateFieldGet(this,_e)){var t,r=this.div,i=_createForOfIteratorHelper(_classPrivateFieldGet(this,_e));try{for(i.s();!(t=i.n()).done;){var a=_slicedToArray(t.value,2),o=a[0],l=a[1],u=r.querySelector('[data-annotation-id="'.concat(o,'"]'));if(u){var c=u.firstChild;c?"CANVAS"===c.nodeName?c.replaceWith(l):c.before(l):u.append(l)}}}catch(t){i.e(t)}finally{i.f()}_classPrivateFieldGet(this,_e).clear()}}},(t,r,i)=>{var a=i(3),o=i(352).values;a({target:"Object",stat:!0},{values:function values(t){return o(t)}})},(t,r,i)=>{var a=i(3),o=i(188).findIndex,l=i(141),u="findIndex",c=!0;u in[]&&Array(1)[u]((function(){c=!1}));a({target:"Array",proto:!0,forced:c},{findIndex:function findIndex(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});l(u)},(t,r,i)=>{var a=i(3),o=i(414),l=i(31),u=i(40),c=i(64),h=i(189);a({target:"Array",proto:!0},{flatMap:function flatMap(t){var r,i=u(this),a=c(i);l(t);(r=h(i,0)).length=o(r,i,i,a,0,1,t,arguments.length>1?arguments[1]:void 0);return r}})},(t,r,i)=>{var a=i(169),o=i(64),l=i(170),u=i(94),flattenIntoArray=function(t,r,i,c,h,d,p,v){for(var y,g,m=h,b=0,w=!!p&&u(p,v);b<c;){if(b in i){y=w?w(i[b],b,r):i[b];if(d>0&&a(y)){g=o(y);m=flattenIntoArray(t,r,y,g,m,d-1)-1}else{l(m+1);t[m]=y}m++}b++}return m};t.exports=flattenIntoArray},(t,r,i)=>{i(141)("flatMap")},(t,r,i)=>{i(85);i(90);i(292);i(300);i(123);i(112);i(301);i(140);i(148);i(149);i(167);i(92);i(105);i(104);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.ColorConverters=void 0;i(251);i(146);i(255);i(257);i(249);i(258);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function makeColorComp(t){return Math.floor(255*Math.max(0,Math.min(1,t))).toString(16).padStart(2,"0")}function scaleAndClamp(t){return Math.max(0,Math.min(255,255*t))}var a=function(){function ColorConverters(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ColorConverters)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(ColorConverters,null,[{key:"CMYK_G",value:function CMYK_G(t){var r=_slicedToArray(t,4),i=r[0],a=r[1],o=r[2],l=r[3];return["G",1-Math.min(1,.3*i+.59*o+.11*a+l)]}},{key:"G_CMYK",value:function G_CMYK(t){return["CMYK",0,0,0,1-_slicedToArray(t,1)[0]]}},{key:"G_RGB",value:function G_RGB(t){var r=_slicedToArray(t,1)[0];return["RGB",r,r,r]}},{key:"G_rgb",value:function G_rgb(t){var r=_slicedToArray(t,1)[0];return[r=scaleAndClamp(r),r,r]}},{key:"G_HTML",value:function G_HTML(t){var r=makeColorComp(_slicedToArray(t,1)[0]);return"#".concat(r).concat(r).concat(r)}},{key:"RGB_G",value:function RGB_G(t){var r=_slicedToArray(t,3);return["G",.3*r[0]+.59*r[1]+.11*r[2]]}},{key:"RGB_rgb",value:function RGB_rgb(t){return t.map(scaleAndClamp)}},{key:"RGB_HTML",value:function RGB_HTML(t){return"#".concat(t.map(makeColorComp).join(""))}},{key:"T_HTML",value:function T_HTML(){return"#00000000"}},{key:"T_rgb",value:function T_rgb(){return[null]}},{key:"CMYK_RGB",value:function CMYK_RGB(t){var r=_slicedToArray(t,4),i=r[0],a=r[1],o=r[2],l=r[3];return["RGB",1-Math.min(1,i+l),1-Math.min(1,o+l),1-Math.min(1,a+l)]}},{key:"CMYK_rgb",value:function CMYK_rgb(t){var r=_slicedToArray(t,4),i=r[0],a=r[1],o=r[2],l=r[3];return[scaleAndClamp(1-Math.min(1,i+l)),scaleAndClamp(1-Math.min(1,o+l)),scaleAndClamp(1-Math.min(1,a+l))]}},{key:"CMYK_HTML",value:function CMYK_HTML(t){var r=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(r)}},{key:"RGB_CMYK",value:function RGB_CMYK(t){var r=_slicedToArray(t,3),i=1-r[0],a=1-r[1],o=1-r[2];return["CMYK",i,a,o,Math.min(i,a,o)]}}]);return ColorConverters}();r.ColorConverters=a},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(146);i(259);i(292);i(300);i(301);i(140);i(148);i(149);i(306);i(307);i(308);i(309);i(2);i(123);i(167);i(310);i(258);Object.defineProperty(r,"__esModule",{value:!0});r.NullL10n=void 0;r.getL10nFallback=getL10nFallback;i(105);i(289);i(291);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}var a={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",print_progress_percent:"{{progress}}%"};function getL10nFallback(t,r){switch(t){case"find_match_count":t="find_match_count[".concat(1===r.total?"one":"other","]");break;case"find_match_count_limit":t="find_match_count_limit[".concat(1===r.limit?"one":"other","]")}return a[t]||""}function formatL10nValue(t,r){return r?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(function(t,i){return i in r?r[i]:"{{"+i+"}}"})):t}var o={getLanguage:function getLanguage(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","en-us");case 1:case"end":return t.stop()}}),_callee)})))()},getDirection:function getDirection(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","ltr");case 1:case"end":return t.stop()}}),_callee2)})))()},get:function get(t){var r=arguments;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var i,a;return _regeneratorRuntime().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:i=r.length>1&&void 0!==r[1]?r[1]:null;a=r.length>2&&void 0!==r[2]?r[2]:getL10nFallback(t,i);return o.abrupt("return",formatL10nValue(a,i));case 3:case"end":return o.stop()}}),_callee3)})))()},translate:function translate(t){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){return _regeneratorRuntime().wrap((function _callee4$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee4)})))()}};r.NullL10n=o},(t,r,i)=>{i(258);i(255);i(92);i(148);i(105);i(104);i(301);i(140);i(149);Object.defineProperty(r,"__esModule",{value:!0});r.XfaLayer=void 0;i(257);i(351);i(337);i(358);i(359);i(167);i(85);i(90);i(292);i(300);i(146);i(123);i(112);var a=i(399);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var o=function(){function XfaLayer(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaLayer)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaLayer,null,[{key:"setupStorage",value:function setupStorage(t,r,i,a,o){var l=window.getFormValueFromAngular(t);l.value&&a.setValue(r,l);var u=l.value?l:a.getValue(r,{value:null});window.registerXFAField(t,u);t.addEventListener("updateFromAngular",(function(t){return a.setValue(r,{value:t.detail})}));switch(i.name){case"textarea":null!==u.value&&(t.textContent=u.value);if("print"===o)break;t.addEventListener("input",(function(i){window.updateAngularFormValue(t,{value:i.target.value});a.setValue(r,{value:i.target.value})}));break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){u.value===i.attributes.xfaOn?t.setAttribute("checked",!0):t.removeAttribute("checked");if("print"===o)break;t.addEventListener("change",(function(i){window.updateAngularFormValue(t,{value:i.target.checked?i.target.getAttribute("xfaOn"):i.target.getAttribute("xfaOff")});a.setValue(r,{value:i.target.checked?i.target.getAttribute("xfaOn"):i.target.getAttribute("xfaOff")})}))}else{null!==u.value&&t.setAttribute("value",u.value);if("print"===o)break;t.addEventListener("input",(function(i){window.updateAngularFormValue(t,{value:i.target.value});a.setValue(r,{value:i.target.value})}))}break;case"select":if(null!==u.value){t.setAttribute("value",u.value);var c,h=_createForOfIteratorHelper(i.children);try{for(h.s();!(c=h.n()).done;){var d=c.value;d.attributes.value===u.value?d.attributes.selected=!0:d.attributes.hasOwnProperty("selected")&&delete d.attributes.selected}}catch(t){h.e(t)}finally{h.f()}}t.addEventListener("input",(function(i){var o=i.target.options,l=-1===o.selectedIndex?"":o[o.selectedIndex].value;window.updateAngularFormValue(t,{value:l});a.setValue(r,{value:l})}))}}},{key:"setAttributes",value:function setAttributes(t){var r=t.html,i=t.element,a=t.storage,o=void 0===a?null:a,l=t.intent,u=t.linkService,c=i.attributes,h=r instanceof HTMLAnchorElement;"radio"===c.type&&(c.name="".concat(c.name,"-").concat(l));for(var d=0,p=Object.entries(c);d<p.length;d++){var v=_slicedToArray(p[d],2),y=v[0],g=v[1];if(null!=g)switch(y){case"class":g.length&&r.setAttribute(y,g.join(" "));break;case"dataId":break;case"id":r.setAttribute("data-element-id",g);break;case"style":Object.assign(r.style,g);break;case"textContent":r.textContent=g;break;default:(!h||"href"!==y&&"newWindow"!==y)&&r.setAttribute(y,g)}}h&&u.addLinkAttributes(r,c.href,c.newWindow);o&&c.dataId&&this.setupStorage(r,c.dataId,i,o)}},{key:"render",value:function render(t){var r=t.annotationStorage,i=t.linkService,o=t.xfaHtml,l=t.intent||"display",u=document.createElement(o.name);o.attributes&&this.setAttributes({html:u,element:o,intent:l,linkService:i});var c=[[o,-1,u]],h=t.div;h.append(u);if(t.viewport){var d="matrix(".concat(t.viewport.transform.join(","),")");h.style.transform=d}"richText"!==l&&h.setAttribute("class","xfaLayer xfaFont");for(var p=[];c.length>0;){var v,y=_slicedToArray(c.at(-1),3),g=y[0],m=y[1],b=y[2];if(m+1!==g.children.length){var w=g.children[++c.at(-1)[1]];if(null!==w){var P=w.name;if("#text"!==P){var A=null!=w&&null!==(v=w.attributes)&&void 0!==v&&v.xmlns?document.createElementNS(w.attributes.xmlns,P):document.createElement(P);b.append(A);w.attributes&&this.setAttributes({html:A,element:w,storage:r,intent:l,linkService:i});if(w.children&&w.children.length>0)c.push([w,-1,A]);else if(w.value){var S=document.createTextNode(w.value);a.XfaText.shouldBuildText(P)&&p.push(S);A.append(S)}}else{var E=document.createTextNode(w.value);p.push(E);b.append(E)}}}else c.pop()}var x,D=_createForOfIteratorHelper(h.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"));try{for(D.s();!(x=D.n()).done;){x.value.setAttribute("readOnly",!0)}}catch(t){D.e(t)}finally{D.f()}return{textDivs:p}}},{key:"update",value:function update(t){var r="matrix(".concat(t.viewport.transform.join(","),")");t.div.style.transform=r;t.div.hidden=!1}}]);return XfaLayer}();r.XfaLayer=o},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(2);i(71);i(73);i(405);i(402);i(245);i(379);i(310);i(403);i(301);i(255);i(92);i(105);i(104);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.InkEditor=void 0;i(140);i(280);i(146);i(148);i(149);i(249);i(167);i(123);i(302);i(347);i(257);i(358);i(359);i(258);var a=i(1),o=i(353),l=i(410),u=i(356);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classStaticPrivateMethodGet(t,r,i){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakMap,E=new WeakMap,x=new WeakMap,D=new WeakSet,k=new WeakSet,C=new WeakSet,T=new WeakSet,I=new WeakSet,O=new WeakSet,M=new WeakSet,L=new WeakSet,R=new WeakSet,G=new WeakSet,B=new WeakSet,j=new WeakSet,N=new WeakSet,W=new WeakSet,V=new WeakSet,U=new WeakSet,H=new WeakSet,z=new WeakSet,q=new WeakSet,Y=new WeakSet,K=new WeakSet,X=new WeakSet,$=new WeakSet,Q=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(InkEditor,t);var r=_createSuper(InkEditor);function InkEditor(t){var i;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,InkEditor);_classPrivateMethodInitSpec(_assertThisInitialized(i=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"inkEditor"}))),$);_classPrivateMethodInitSpec(_assertThisInitialized(i),X);_classPrivateMethodInitSpec(_assertThisInitialized(i),K);_classPrivateMethodInitSpec(_assertThisInitialized(i),Y);_classPrivateMethodInitSpec(_assertThisInitialized(i),q);_classPrivateMethodInitSpec(_assertThisInitialized(i),z);_classPrivateMethodInitSpec(_assertThisInitialized(i),H);_classPrivateMethodInitSpec(_assertThisInitialized(i),U);_classPrivateMethodInitSpec(_assertThisInitialized(i),V);_classPrivateMethodInitSpec(_assertThisInitialized(i),W);_classPrivateMethodInitSpec(_assertThisInitialized(i),N);_classPrivateMethodInitSpec(_assertThisInitialized(i),j);_classPrivateMethodInitSpec(_assertThisInitialized(i),B);_classPrivateMethodInitSpec(_assertThisInitialized(i),G);_classPrivateMethodInitSpec(_assertThisInitialized(i),R);_classPrivateMethodInitSpec(_assertThisInitialized(i),L);_classPrivateMethodInitSpec(_assertThisInitialized(i),M);_classPrivateMethodInitSpec(_assertThisInitialized(i),O);_classPrivateMethodInitSpec(_assertThisInitialized(i),I);_classPrivateMethodInitSpec(_assertThisInitialized(i),T);_classPrivateMethodInitSpec(_assertThisInitialized(i),C);_classPrivateMethodInitSpec(_assertThisInitialized(i),k);_classPrivateMethodInitSpec(_assertThisInitialized(i),D);_classPrivateFieldInitSpec(_assertThisInitialized(i),c,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(i),h,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(i),d,{writable:!0,value:i.canvasContextMenu.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),p,{writable:!0,value:i.canvasPointermove.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),v,{writable:!0,value:i.canvasPointerleave.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),y,{writable:!0,value:i.canvasPointerup.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),g,{writable:!0,value:i.canvasPointerdown.bind(_assertThisInitialized(i))});_classPrivateFieldInitSpec(_assertThisInitialized(i),m,{writable:!0,value:new Path2D});_classPrivateFieldInitSpec(_assertThisInitialized(i),b,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(i),w,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(i),P,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(i),A,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),S,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(i),E,{writable:!0,value:0});_classPrivateFieldInitSpec(_assertThisInitialized(i),x,{writable:!0,value:null});i.color=t.color||null;i.thickness=t.thickness||null;i.opacity=t.opacity||null;i.paths=[];i.bezierPath2D=[];i.allRawPaths=[];i.currentPath=[];i.scaleFactor=1;i.translationX=i.translationY=0;i.x=0;i.y=0;i._willKeepAspectRatio=!0;return i}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(InkEditor,[{key:"updateParams",value:function updateParams(t,r){switch(t){case a.AnnotationEditorParamsType.INK_THICKNESS:_classPrivateMethodGet(this,D,_updateThickness2).call(this,r);break;case a.AnnotationEditorParamsType.INK_COLOR:_classPrivateMethodGet(this,k,_updateColor2).call(this,r);break;case a.AnnotationEditorParamsType.INK_OPACITY:_classPrivateMethodGet(this,C,_updateOpacity2).call(this,r)}}},{key:"propertiesToUpdate",get:function get(){var t;return[[a.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||InkEditor._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,this.color||InkEditor._defaultColor||o.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(null!==(t=this.opacity)&&void 0!==t?t:InkEditor._defaultOpacity))]]}},{key:"rebuild",value:function rebuild(){if(this.parent){_get(_getPrototypeOf(InkEditor.prototype),"rebuild",this).call(this);if(null!==this.div){if(!this.canvas){_classPrivateMethodGet(this,V,_createCanvas2).call(this);_classPrivateMethodGet(this,U,_createObserver2).call(this)}if(!this.isAttachedToDOM){this.parent.add(this);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this)}_classPrivateMethodGet(this,$,_fitToContent2).call(this)}}}},{key:"remove",value:function remove(){if(null!==this.canvas){this.isEmpty()||this.commit();this.canvas.width=this.canvas.height=0;this.canvas.remove();this.canvas=null;_classPrivateFieldGet(this,A).disconnect();_classPrivateFieldSet(this,A,null);_get(_getPrototypeOf(InkEditor.prototype),"remove",this).call(this)}}},{key:"setParent",value:function setParent(t){!this.parent&&t?this._uiManager.removeShouldRescale(this):this.parent&&null===t&&this._uiManager.addShouldRescale(this);_get(_getPrototypeOf(InkEditor.prototype),"setParent",this).call(this,t)}},{key:"onScaleChanging",value:function onScaleChanging(){var t=_slicedToArray(this.parentDimensions,2),r=t[0],i=t[1],a=this.width*r,o=this.height*i;this.setDimensions(a,o)}},{key:"enableEditMode",value:function enableEditMode(){if(!_classPrivateFieldGet(this,b)&&null!==this.canvas){_get(_getPrototypeOf(InkEditor.prototype),"enableEditMode",this).call(this);this._isDraggable=!1;this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(this,g))}}},{key:"disableEditMode",value:function disableEditMode(){if(this.isInEditMode()&&null!==this.canvas){_get(_getPrototypeOf(InkEditor.prototype),"disableEditMode",this).call(this);this._isDraggable=!this.isEmpty();this.div.classList.remove("editing");this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(this,g))}}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!this.isEmpty()}},{key:"isEmpty",value:function isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}},{key:"commit",value:function commit(){if(!_classPrivateFieldGet(this,b)){_get(_getPrototypeOf(InkEditor.prototype),"commit",this).call(this);this.isEditing=!1;this.disableEditMode();this.setInForeground();_classPrivateFieldSet(this,b,!0);this.div.classList.add("disabled");_classPrivateMethodGet(this,$,_fitToContent2).call(this,!0);this.makeResizable();this.parent.addInkEditorIfNeeded(!0);this.moveInDOM();this.div.focus({preventScroll:!0})}}},{key:"focusin",value:function focusin(t){if(this._focusEventsAllowed){_get(_getPrototypeOf(InkEditor.prototype),"focusin",this).call(this,t);this.enableEditMode()}}},{key:"canvasPointerdown",value:function canvasPointerdown(t){if(0===t.button&&this.isInEditMode()&&!_classPrivateFieldGet(this,b)){this.setInForeground();t.preventDefault();"mouse"!==t.type&&this.div.focus({preventScroll:!0});_classPrivateMethodGet(this,O,_startDrawing2).call(this,t.offsetX,t.offsetY)}}},{key:"canvasContextMenu",value:function canvasContextMenu(t){t.preventDefault()}},{key:"canvasPointermove",value:function canvasPointermove(t){t.preventDefault();_classPrivateMethodGet(this,M,_draw2).call(this,t.offsetX,t.offsetY)}},{key:"canvasPointerup",value:function canvasPointerup(t){t.preventDefault();_classPrivateMethodGet(this,W,_endDrawing2).call(this,t)}},{key:"canvasPointerleave",value:function canvasPointerleave(t){_classPrivateMethodGet(this,W,_endDrawing2).call(this,t)}},{key:"isResizable",get:function get(){return!this.isEmpty()&&_classPrivateFieldGet(this,b)}},{key:"render",value:function render(){var t,r,i=this;if(this.div)return this.div;if(this.width){t=this.x;r=this.y}_get(_getPrototypeOf(InkEditor.prototype),"render",this).call(this);InkEditor._l10nPromise.get("editor_ink2_aria_label").then((function(t){var r;return null===(r=i.div)||void 0===r?void 0:r.setAttribute("aria-label",t)}));var a=_slicedToArray(_classPrivateMethodGet(this,T,_getInitialBBox2).call(this),4),o=a[0],l=a[1],u=a[2],c=a[3];this.setAt(o,l,0,0);this.setDims(u,c);_classPrivateMethodGet(this,V,_createCanvas2).call(this);if(this.width){var h=_slicedToArray(this.parentDimensions,2),d=h[0],p=h[1];this.setAspectRatio(this.width*d,this.height*p);this.setAt(t*d,r*p,this.width*d,this.height*p);_classPrivateFieldSet(this,P,!0);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);this.setDims(this.width*d,this.height*p);_classPrivateMethodGet(this,N,_redraw2).call(this);this.div.classList.add("disabled")}else{this.div.classList.add("editing");this.enableEditMode()}_classPrivateMethodGet(this,U,_createObserver2).call(this);return this.div}},{key:"setDimensions",value:function setDimensions(t,r){var i=Math.round(t),a=Math.round(r);if(_classPrivateFieldGet(this,S)!==i||_classPrivateFieldGet(this,E)!==a){_classPrivateFieldSet(this,S,i);_classPrivateFieldSet(this,E,a);this.canvas.style.visibility="hidden";var o=_slicedToArray(this.parentDimensions,2),l=o[0],u=o[1];this.width=t/l;this.height=r/u;this.fixAndSetPosition();_classPrivateFieldGet(this,b)&&_classPrivateMethodGet(this,z,_setScaleFactor2).call(this,t,r);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);_classPrivateMethodGet(this,N,_redraw2).call(this);this.canvas.style.visibility="visible";this.fixDims()}}},{key:"serialize",value:function serialize(){if(this.isEmpty())return null;var t=this.getRect(0,0),r=o.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);return{annotationType:a.AnnotationEditorType.INK,color:r,thickness:this.thickness,opacity:this.opacity,paths:_classPrivateMethodGet(this,Y,_serializePaths2).call(this,this.scaleFactor/this.parentScale,this.translationX,this.translationY,t),pageIndex:this.pageIndex,rect:t,rotation:this.rotation}}}],[{key:"initialize",value:function initialize(t){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map((function(r){return[r,t.get(r)]})))}},{key:"updateDefaultParams",value:function updateDefaultParams(t,r){switch(t){case a.AnnotationEditorParamsType.INK_THICKNESS:InkEditor._defaultThickness=r;break;case a.AnnotationEditorParamsType.INK_COLOR:InkEditor._defaultColor=r;break;case a.AnnotationEditorParamsType.INK_OPACITY:InkEditor._defaultOpacity=r/100}}},{key:"defaultPropertiesToUpdate",get:function get(){return[[a.AnnotationEditorParamsType.INK_THICKNESS,InkEditor._defaultThickness],[a.AnnotationEditorParamsType.INK_COLOR,InkEditor._defaultColor||o.AnnotationEditor._defaultLineColor],[a.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*InkEditor._defaultOpacity)]]}},{key:"deserialize",value:function deserialize(t,r,i){if(t instanceof l.InkAnnotationElement)return null;var u=_get(_getPrototypeOf(InkEditor),"deserialize",this).call(this,t,r,i);u.thickness=t.thickness;u.color=a.Util.makeHexColor.apply(a.Util,_toConsumableArray(t.color));u.opacity=t.opacity;var d=_slicedToArray(u.pageDimensions,2),p=d[0],v=d[1],y=u.width*p,g=u.height*v,m=u.parentScale,w=t.thickness/2;_classPrivateFieldSet(u,b,!0);_classPrivateFieldSet(u,S,Math.round(y));_classPrivateFieldSet(u,E,Math.round(g));var P,A=t.paths,x=t.rect,D=t.rotation,k=_createForOfIteratorHelper(A);try{for(k.s();!(P=k.n()).done;){var C=P.value.bezier;C=_classStaticPrivateMethodGet(InkEditor,InkEditor,_fromPDFCoordinates).call(InkEditor,C,x,D);var T=[];u.paths.push(T);for(var I=m*(C[0]-w),O=m*(C[1]-w),M=2,L=C.length;M<L;M+=6){var R=m*(C[M]-w),G=m*(C[M+1]-w),B=m*(C[M+2]-w),j=m*(C[M+3]-w),N=m*(C[M+4]-w),W=m*(C[M+5]-w);T.push([[I,O],[R,G],[B,j],[N,W]]);I=N;O=W}var V=_classStaticPrivateMethodGet(this,InkEditor,_buildPath2D).call(this,T);u.bezierPath2D.push(V)}}catch(t){k.e(t)}finally{k.f()}var U=_classPrivateMethodGet(u,K,_getBbox2).call(u);_classPrivateFieldSet(u,h,Math.max(o.AnnotationEditor.MIN_SIZE,U[2]-U[0]));_classPrivateFieldSet(u,c,Math.max(o.AnnotationEditor.MIN_SIZE,U[3]-U[1]));_classPrivateMethodGet(u,z,_setScaleFactor2).call(u,y,g);return u}}]);return InkEditor}(o.AnnotationEditor);r.InkEditor=Q;function _updateThickness2(t){var r=this,i=this.thickness;this.addCommands({cmd:function cmd(){r.thickness=t;_classPrivateMethodGet(r,$,_fitToContent2).call(r)},undo:function undo(){r.thickness=i;_classPrivateMethodGet(r,$,_fitToContent2).call(r)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}function _updateColor2(t){var r=this,i=this.color;this.addCommands({cmd:function cmd(){r.color=t;_classPrivateMethodGet(r,N,_redraw2).call(r)},undo:function undo(){r.color=i;_classPrivateMethodGet(r,N,_redraw2).call(r)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}function _updateOpacity2(t){var r=this;t/=100;var i=this.opacity;this.addCommands({cmd:function cmd(){r.opacity=t;_classPrivateMethodGet(r,N,_redraw2).call(r)},undo:function undo(){r.opacity=i;_classPrivateMethodGet(r,N,_redraw2).call(r)},mustExec:!0,type:a.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}function _getInitialBBox2(){var t=this.parentRotation,r=_slicedToArray(this.parentDimensions,2),i=r[0],a=r[1];switch(t){case 90:return[0,a,a,i];case 180:return[i,a,i,a];case 270:return[i,0,a,i];default:return[0,0,i,a]}}function _setStroke2(){var t=this.ctx,r=this.color,i=this.opacity,a=this.thickness,o=this.parentScale,l=this.scaleFactor;t.lineWidth=a*o/l;t.lineCap="round";t.lineJoin="round";t.miterLimit=10;t.strokeStyle="".concat(r).concat((0,u.opacityToHex)(i))}function _startDrawing2(t,r){var i=this;this.canvas.addEventListener("contextmenu",_classPrivateFieldGet(this,d));this.canvas.addEventListener("pointerleave",_classPrivateFieldGet(this,v));this.canvas.addEventListener("pointermove",_classPrivateFieldGet(this,p));this.canvas.addEventListener("pointerup",_classPrivateFieldGet(this,y));this.canvas.removeEventListener("pointerdown",_classPrivateFieldGet(this,g));this.isEditing=!0;if(!_classPrivateFieldGet(this,P)){var a;_classPrivateFieldSet(this,P,!0);_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);this.thickness||(this.thickness=Q._defaultThickness);this.color||(this.color=Q._defaultColor||o.AnnotationEditor._defaultLineColor);null!==(a=this.opacity)&&void 0!==a||(this.opacity=Q._defaultOpacity)}this.currentPath.push([t,r]);_classPrivateFieldSet(this,w,!1);_classPrivateMethodGet(this,I,_setStroke2).call(this);_classPrivateFieldSet(this,x,(function(){_classPrivateMethodGet(i,G,_drawPoints2).call(i);_classPrivateFieldGet(i,x)&&window.requestAnimationFrame(_classPrivateFieldGet(i,x))}));window.requestAnimationFrame(_classPrivateFieldGet(this,x))}function _draw2(t,r){var i,a=_slicedToArray(this.currentPath.at(-1),2),o=a[0],l=a[1];if(!(this.currentPath.length>1&&t===o&&r===l)){var u=this.currentPath,c=_classPrivateFieldGet(this,m);u.push([t,r]);_classPrivateFieldSet(this,w,!0);if(u.length<=2){var h;(h=c).moveTo.apply(h,_toConsumableArray(u[0]));c.lineTo(t,r)}else{if(3===u.length){var d;_classPrivateFieldSet(this,m,c=new Path2D);(d=c).moveTo.apply(d,_toConsumableArray(u[0]))}(i=_classPrivateMethodGet(this,B,_makeBezierCurve2)).call.apply(i,[this,c].concat(_toConsumableArray(u.at(-3)),_toConsumableArray(u.at(-2)),[t,r]))}}}function _endPath2(){var t;if(0!==this.currentPath.length){var r=this.currentPath.at(-1);(t=_classPrivateFieldGet(this,m)).lineTo.apply(t,_toConsumableArray(r))}}function _stopDrawing2(t,r){var i,a=this;_classPrivateFieldSet(this,x,null);t=Math.min(Math.max(t,0),this.canvas.width);r=Math.min(Math.max(r,0),this.canvas.height);_classPrivateMethodGet(this,M,_draw2).call(this,t,r);_classPrivateMethodGet(this,L,_endPath2).call(this);if(1!==this.currentPath.length)i=_classPrivateMethodGet(this,j,_generateBezierPoints2).call(this);else{var o=[t,r];i=[[o,o.slice(),o.slice(),o]]}var l=_classPrivateFieldGet(this,m),u=this.currentPath;this.currentPath=[];_classPrivateFieldSet(this,m,new Path2D);this.addCommands({cmd:function cmd(){a.allRawPaths.push(u);a.paths.push(i);a.bezierPath2D.push(l);a.rebuild()},undo:function undo(){a.allRawPaths.pop();a.paths.pop();a.bezierPath2D.pop();if(0===a.paths.length)a.remove();else{if(!a.canvas){_classPrivateMethodGet(a,V,_createCanvas2).call(a);_classPrivateMethodGet(a,U,_createObserver2).call(a)}_classPrivateMethodGet(a,$,_fitToContent2).call(a)}},mustExec:!0})}function _drawPoints2(){if(_classPrivateFieldGet(this,w)){_classPrivateFieldSet(this,w,!1);var t=Math.ceil(this.thickness*this.parentScale),r=this.currentPath.slice(-3),i=r.map((function(t){return t[0]})),a=r.map((function(t){return t[1]})),o=(Math.min.apply(Math,_toConsumableArray(i)),Math.max.apply(Math,_toConsumableArray(i)),Math.min.apply(Math,_toConsumableArray(a)),Math.max.apply(Math,_toConsumableArray(a)),this.ctx);o.save();o.clearRect(0,0,this.canvas.width,this.canvas.height);var l,u=_createForOfIteratorHelper(this.bezierPath2D);try{for(u.s();!(l=u.n()).done;){var c=l.value;o.stroke(c)}}catch(t){u.e(t)}finally{u.f()}o.stroke(_classPrivateFieldGet(this,m));o.restore()}}function _makeBezierCurve2(t,r,i,a,o,l,u){var c=(r+a)/2,h=(i+o)/2,d=(a+l)/2,p=(o+u)/2;t.bezierCurveTo(c+2*(a-c)/3,h+2*(o-h)/3,d+2*(a-d)/3,p+2*(o-p)/3,d,p)}function _generateBezierPoints2(){var t=this.currentPath;if(t.length<=2)return[[t[0],t[0],t.at(-1),t.at(-1)]];var r,i=[],a=_slicedToArray(t[0],2),o=a[0],l=a[1];for(r=1;r<t.length-2;r++){var u=_slicedToArray(t[r],2),c=u[0],h=u[1],d=_slicedToArray(t[r+1],2),p=(c+d[0])/2,v=(h+d[1])/2,y=[o+2*(c-o)/3,l+2*(h-l)/3],g=[p+2*(c-p)/3,v+2*(h-v)/3];i.push([[o,l],y,g,[p,v]]);o=p;l=v}var m=_slicedToArray(t[r],2),b=m[0],w=m[1],P=_slicedToArray(t[r+1],2),A=P[0],S=P[1],E=[o+2*(b-o)/3,l+2*(w-l)/3],x=[A+2*(b-A)/3,S+2*(w-S)/3];i.push([[o,l],E,x,[A,S]]);return i}function _redraw2(){if(this.isEmpty())_classPrivateMethodGet(this,q,_updateTransform2).call(this);else{_classPrivateMethodGet(this,I,_setStroke2).call(this);var t=this.canvas,r=this.ctx;r.setTransform(1,0,0,1,0,0);r.clearRect(0,0,t.width,t.height);_classPrivateMethodGet(this,q,_updateTransform2).call(this);var i,a=_createForOfIteratorHelper(this.bezierPath2D);try{for(a.s();!(i=a.n()).done;){var o=i.value;r.stroke(o)}}catch(t){a.e(t)}finally{a.f()}}}function _endDrawing2(t){var r=this;this.canvas.removeEventListener("pointerleave",_classPrivateFieldGet(this,v));this.canvas.removeEventListener("pointermove",_classPrivateFieldGet(this,p));this.canvas.removeEventListener("pointerup",_classPrivateFieldGet(this,y));this.canvas.addEventListener("pointerdown",_classPrivateFieldGet(this,g));setTimeout((function(){r.canvas.removeEventListener("contextmenu",_classPrivateFieldGet(r,d))}),10);_classPrivateMethodGet(this,R,_stopDrawing2).call(this,t.offsetX,t.offsetY);this.addToAnnotationStorage();this.setInBackground()}function _createCanvas2(){var t=this;this.canvas=document.createElement("canvas");this.canvas.width=this.canvas.height=0;this.canvas.className="inkEditorCanvas";Q._l10nPromise.get("editor_ink_canvas_aria_label").then((function(r){var i;return null===(i=t.canvas)||void 0===i?void 0:i.setAttribute("aria-label",r)}));this.div.append(this.canvas);var r=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0;this.ctx=this.canvas.getContext("2d",r)}function _createObserver2(){var t=this;_classPrivateFieldSet(this,A,new ResizeObserver((function(r){var i=r[0].contentRect;i.width&&i.height&&t.setDimensions(i.width,i.height)})));_classPrivateFieldGet(this,A).observe(this.div)}function _setCanvasDims2(){if(_classPrivateFieldGet(this,P)){var t=_slicedToArray(this.parentDimensions,2),r=t[0],i=t[1];this.canvas.width=Math.ceil(this.width*r);this.canvas.height=Math.ceil(this.height*i);_classPrivateMethodGet(this,q,_updateTransform2).call(this)}}function _setScaleFactor2(t,r){var i=_classPrivateMethodGet(this,X,_getPadding2).call(this),a=(t-i)/_classPrivateFieldGet(this,h),o=(r-i)/_classPrivateFieldGet(this,c);this.scaleFactor=Math.min(a,o)}function _updateTransform2(){var t=_classPrivateMethodGet(this,X,_getPadding2).call(this)/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+t,this.translationY*this.scaleFactor+t)}function _buildPath2D(t){for(var r=new Path2D,i=0,a=t.length;i<a;i++){var o=_slicedToArray(t[i],4),l=o[0],u=o[1],c=o[2],h=o[3];0===i&&r.moveTo.apply(r,_toConsumableArray(l));r.bezierCurveTo(u[0],u[1],c[0],c[1],h[0],h[1])}return r}function _toPDFCoordinates(t,r,i){var a=_slicedToArray(r,4),o=a[0],l=a[1],u=a[2],c=a[3];switch(i){case 0:for(var h=0,d=t.length;h<d;h+=2){t[h]+=o;t[h+1]=c-t[h+1]}break;case 90:for(var p=0,v=t.length;p<v;p+=2){var y=t[p];t[p]=t[p+1]+o;t[p+1]=y+l}break;case 180:for(var g=0,m=t.length;g<m;g+=2){t[g]=u-t[g];t[g+1]+=l}break;case 270:for(var b=0,w=t.length;b<w;b+=2){var P=t[b];t[b]=u-t[b+1];t[b+1]=c-P}break;default:throw new Error("Invalid rotation")}return t}function _fromPDFCoordinates(t,r,i){var a=_slicedToArray(r,4),o=a[0],l=a[1],u=a[2],c=a[3];switch(i){case 0:for(var h=0,d=t.length;h<d;h+=2){t[h]-=o;t[h+1]=c-t[h+1]}break;case 90:for(var p=0,v=t.length;p<v;p+=2){var y=t[p];t[p]=t[p+1]-l;t[p+1]=y-o}break;case 180:for(var g=0,m=t.length;g<m;g+=2){t[g]=u-t[g];t[g+1]-=l}break;case 270:for(var b=0,w=t.length;b<w;b+=2){var P=t[b];t[b]=c-t[b+1];t[b+1]=u-P}break;default:throw new Error("Invalid rotation")}return t}function _serializePaths2(t,r,i,a){var o,l=[],u=this.thickness/2,c=t*r+u,h=t*i+u,d=_createForOfIteratorHelper(this.paths);try{for(d.s();!(o=d.n()).done;){for(var p=o.value,v=[],y=[],g=0,m=p.length;g<m;g++){var b=_slicedToArray(p[g],4),w=b[0],P=b[1],A=b[2],S=b[3],E=t*w[0]+c,x=t*w[1]+h,D=t*P[0]+c,k=t*P[1]+h,C=t*A[0]+c,T=t*A[1]+h,I=t*S[0]+c,O=t*S[1]+h;if(0===g){v.push(E,x);y.push(E,x)}v.push(D,k,C,T,I,O);y.push(D,k);g===m-1&&y.push(I,O)}l.push({bezier:_classStaticPrivateMethodGet(Q,Q,_toPDFCoordinates).call(Q,v,a,this.rotation),points:_classStaticPrivateMethodGet(Q,Q,_toPDFCoordinates).call(Q,y,a,this.rotation)})}}catch(t){d.e(t)}finally{d.f()}return l}function _getBbox2(){var t,r=1/0,i=-1/0,o=1/0,l=-1/0,u=_createForOfIteratorHelper(this.paths);try{for(u.s();!(t=u.n()).done;){var c,h=_createForOfIteratorHelper(t.value);try{for(h.s();!(c=h.n()).done;){var d=_slicedToArray(c.value,4),p=d[0],v=d[1],y=d[2],g=d[3],m=a.Util.bezierBoundingBox.apply(a.Util,_toConsumableArray(p).concat(_toConsumableArray(v),_toConsumableArray(y),_toConsumableArray(g)));r=Math.min(r,m[0]);o=Math.min(o,m[1]);i=Math.max(i,m[2]);l=Math.max(l,m[3])}}catch(t){h.e(t)}finally{h.f()}}}catch(t){u.e(t)}finally{u.f()}return[r,o,i,l]}function _getPadding2(){return _classPrivateFieldGet(this,b)?Math.ceil(this.thickness*this.parentScale):0}function _fitToContent2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isEmpty())if(_classPrivateFieldGet(this,b)){var r=_classPrivateMethodGet(this,K,_getBbox2).call(this),i=_classPrivateMethodGet(this,X,_getPadding2).call(this);_classPrivateFieldSet(this,h,Math.max(o.AnnotationEditor.MIN_SIZE,r[2]-r[0]));_classPrivateFieldSet(this,c,Math.max(o.AnnotationEditor.MIN_SIZE,r[3]-r[1]));var a=Math.ceil(i+_classPrivateFieldGet(this,h)*this.scaleFactor),l=Math.ceil(i+_classPrivateFieldGet(this,c)*this.scaleFactor),u=_slicedToArray(this.parentDimensions,2),d=u[0],p=u[1];this.width=a/d;this.height=l/p;this.setAspectRatio(a,l);var v=this.translationX,y=this.translationY;this.translationX=-r[0];this.translationY=-r[1];_classPrivateMethodGet(this,H,_setCanvasDims2).call(this);_classPrivateMethodGet(this,N,_redraw2).call(this);_classPrivateFieldSet(this,S,a);_classPrivateFieldSet(this,E,l);this.setDims(a,l);var g=t?i/this.scaleFactor/2:0;this.translate(v-this.translationX-g,y-this.translationY-g)}else _classPrivateMethodGet(this,N,_redraw2).call(this)}_defineProperty(Q,"_defaultColor",null);_defineProperty(Q,"_defaultOpacity",1);_defineProperty(Q,"_defaultThickness",1);_defineProperty(Q,"_l10nPromise",void 0);_defineProperty(Q,"_type","ink")},(t,r,i)=>{i(85);i(90);i(292);i(300);i(112);i(2);i(71);i(73);i(405);i(402);i(167);i(310);i(403);i(301);i(258);i(255);i(92);i(105);i(104);i(306);i(307);i(308);i(309);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.StampEditor=void 0;i(140);i(280);i(146);i(148);i(149);i(249);i(247);i(248);i(123);i(302);i(347);i(259);i(346);i(379);i(245);i(312);i(338);i(342);i(343);i(344);var a=i(1),o=i(353),l=i(362),u=i(410);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakMap,P=new WeakSet,A=new WeakSet,S=new WeakSet,E=new WeakSet,x=new WeakSet,D=new WeakSet,k=new WeakSet,C=new WeakSet,T=new WeakSet,I=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(StampEditor,t);var r=_createSuper(StampEditor);function StampEditor(t){var i;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,StampEditor);_classPrivateMethodInitSpec(_assertThisInitialized(i=r.call(this,_objectSpread(_objectSpread({},t),{},{name:"stampEditor"}))),T);_classPrivateMethodInitSpec(_assertThisInitialized(i),C);_classPrivateMethodInitSpec(_assertThisInitialized(i),k);_classPrivateMethodInitSpec(_assertThisInitialized(i),D);_classPrivateMethodInitSpec(_assertThisInitialized(i),x);_classPrivateMethodInitSpec(_assertThisInitialized(i),E);_classPrivateMethodInitSpec(_assertThisInitialized(i),S);_classPrivateMethodInitSpec(_assertThisInitialized(i),A);_classPrivateMethodInitSpec(_assertThisInitialized(i),P);_classPrivateFieldInitSpec(_assertThisInitialized(i),c,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),h,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),d,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),p,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),v,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),y,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),g,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),m,{writable:!0,value:null});_classPrivateFieldInitSpec(_assertThisInitialized(i),b,{writable:!0,value:!1});_classPrivateFieldInitSpec(_assertThisInitialized(i),w,{writable:!0,value:!1});_classPrivateFieldSet(_assertThisInitialized(i),p,t.bitmapUrl);_classPrivateFieldSet(_assertThisInitialized(i),v,t.bitmapFile);return i}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(StampEditor,[{key:"remove",value:function remove(){if(_classPrivateFieldGet(this,h)){var t,r;_classPrivateFieldSet(this,c,null);this._uiManager.imageManager.deleteId(_classPrivateFieldGet(this,h));null===(t=_classPrivateFieldGet(this,y))||void 0===t||t.remove();_classPrivateFieldSet(this,y,null);null===(r=_classPrivateFieldGet(this,g))||void 0===r||r.disconnect();_classPrivateFieldSet(this,g,null)}_get(_getPrototypeOf(StampEditor.prototype),"remove",this).call(this)}},{key:"rebuild",value:function rebuild(){if(this.parent){_get(_getPrototypeOf(StampEditor.prototype),"rebuild",this).call(this);if(null!==this.div){_classPrivateFieldGet(this,h)&&_classPrivateMethodGet(this,S,_getBitmap2).call(this);this.isAttachedToDOM||this.parent.add(this)}}else _classPrivateFieldGet(this,h)&&_classPrivateMethodGet(this,S,_getBitmap2).call(this)}},{key:"onceAdded",value:function onceAdded(){this._isDraggable=!0;this.div.focus()}},{key:"isEmpty",value:function isEmpty(){return!(_classPrivateFieldGet(this,d)||_classPrivateFieldGet(this,c)||_classPrivateFieldGet(this,p)||_classPrivateFieldGet(this,v))}},{key:"isResizable",get:function get(){return!0}},{key:"render",value:function render(){if(this.div)return this.div;var t,r;if(this.width){t=this.x;r=this.y}_get(_getPrototypeOf(StampEditor.prototype),"render",this).call(this);this.div.hidden=!0;_classPrivateFieldGet(this,c)?_classPrivateMethodGet(this,E,_createCanvas2).call(this):_classPrivateMethodGet(this,S,_getBitmap2).call(this);if(this.width){var i=_slicedToArray(this.parentDimensions,2),a=i[0],o=i[1];this.setAt(t*a,r*o,this.width*a,this.height*o)}return this.div}},{key:"serialize",value:function serialize(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;var i={annotationType:a.AnnotationEditorType.STAMP,bitmapId:_classPrivateFieldGet(this,h),pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:_classPrivateFieldGet(this,b)};if(t){i.bitmapUrl=_classPrivateMethodGet(this,C,_serializeBitmap2).call(this,!0);return i}if(null===r)return i;r.stamps||(r.stamps=new Map);var o=_classPrivateFieldGet(this,b)?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(r.stamps.has(_classPrivateFieldGet(this,h))){if(_classPrivateFieldGet(this,b)){var l=r.stamps.get(_classPrivateFieldGet(this,h));if(o>l.area){l.area=o;l.serialized.bitmap.close();l.serialized.bitmap=_classPrivateMethodGet(this,C,_serializeBitmap2).call(this,!1)}}}else{r.stamps.set(_classPrivateFieldGet(this,h),{area:o,serialized:i});i.bitmap=_classPrivateMethodGet(this,C,_serializeBitmap2).call(this,!1)}return i}}],[{key:"supportedTypes",get:function get(){return(0,a.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map((function(t){return"image/".concat(t)})))}},{key:"supportedTypesStr",get:function get(){return(0,a.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}},{key:"isHandlingMimeForPasting",value:function isHandlingMimeForPasting(t){return this.supportedTypes.includes(t)}},{key:"paste",value:function paste(t,r){r.pasteEditor(a.AnnotationEditorType.STAMP,{bitmapFile:t.getAsFile()})}},{key:"deserialize",value:function deserialize(t,r,i){if(t instanceof u.StampAnnotationElement)return null;var a=_get(_getPrototypeOf(StampEditor),"deserialize",this).call(this,t,r,i),o=t.rect,l=t.bitmapUrl,c=t.bitmapId,d=t.isSvg;c&&i.imageManager.isValidId(c)?_classPrivateFieldSet(a,h,c):_classPrivateFieldSet(a,p,l);_classPrivateFieldSet(a,b,d);var v=_slicedToArray(a.pageDimensions,2),y=v[0],g=v[1];a.width=(o[2]-o[0])/y;a.height=(o[3]-o[1])/g;return a}}]);return StampEditor}(o.AnnotationEditor);r.StampEditor=I;function _getBitmapFetched2(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){_classPrivateFieldSet(this,c,t.bitmap);if(!r){_classPrivateFieldSet(this,h,t.id);_classPrivateFieldSet(this,b,t.isSvg)}_classPrivateMethodGet(this,E,_createCanvas2).call(this)}else this.remove()}function _getBitmapDone2(){_classPrivateFieldSet(this,d,null);this._uiManager.enableWaiting(!1);_classPrivateFieldGet(this,y)&&this.div.focus()}function _getBitmap2(){var t=this;if(_classPrivateFieldGet(this,h)){this._uiManager.enableWaiting(!0);this._uiManager.imageManager.getFromId(_classPrivateFieldGet(this,h)).then((function(r){return _classPrivateMethodGet(t,P,_getBitmapFetched2).call(t,r,!0)})).finally((function(){return _classPrivateMethodGet(t,A,_getBitmapDone2).call(t)}))}else if(_classPrivateFieldGet(this,p)){var r=_classPrivateFieldGet(this,p);_classPrivateFieldSet(this,p,null);this._uiManager.enableWaiting(!0);_classPrivateFieldSet(this,d,this._uiManager.imageManager.getFromUrl(r).then((function(r){return _classPrivateMethodGet(t,P,_getBitmapFetched2).call(t,r)})).finally((function(){return _classPrivateMethodGet(t,A,_getBitmapDone2).call(t)})))}else if(_classPrivateFieldGet(this,v)){var i=_classPrivateFieldGet(this,v);_classPrivateFieldSet(this,v,null);this._uiManager.enableWaiting(!0);_classPrivateFieldSet(this,d,this._uiManager.imageManager.getFromFile(i).then((function(r){return _classPrivateMethodGet(t,P,_getBitmapFetched2).call(t,r)})).finally((function(){return _classPrivateMethodGet(t,A,_getBitmapDone2).call(t)})))}else{var a=document.createElement("input");a.type="file";a.accept=I.supportedTypesStr;_classPrivateFieldSet(this,d,new Promise((function(r){a.addEventListener("change",_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(a.files&&0!==a.files.length){o.next=4;break}t.remove();o.next=9;break;case 4:t._uiManager.enableWaiting(!0);o.next=7;return t._uiManager.imageManager.getFromFile(a.files[0]);case 7:i=o.sent;_classPrivateMethodGet(t,P,_getBitmapFetched2).call(t,i);case 9:r();case 10:case"end":return o.stop()}}),_callee)}))));a.addEventListener("cancel",(function(){t.remove();r()}))})).finally((function(){return _classPrivateMethodGet(t,A,_getBitmapDone2).call(t)})));a.click()}}function _createCanvas2(){var t=this.div,r=_classPrivateFieldGet(this,c),i=r.width,a=r.height,o=_slicedToArray(this.pageDimensions,2),l=o[0],u=o[1],h=.75;if(this.width){i=this.width*l;a=this.height*u}else if(i>h*l||a>h*u){var d=Math.min(h*l/i,h*u/a);i*=d;a*=d}var p=_slicedToArray(this.parentDimensions,2),v=p[0],g=p[1];this.setDims(i*v/l,a*g/u);this._uiManager.enableWaiting(!1);var m=_classPrivateFieldSet(this,y,document.createElement("canvas"));t.append(m);t.hidden=!1;_classPrivateMethodGet(this,k,_drawBitmap2).call(this,i,a);_classPrivateMethodGet(this,T,_createObserver2).call(this);if(!_classPrivateFieldGet(this,w)){this.parent.addUndoableEditor(this);_classPrivateFieldSet(this,w,!0)}}function _setDimensions2(t,r){var i,a=this,o=_slicedToArray(this.parentDimensions,2),l=o[0],u=o[1];this.width=t/l;this.height=r/u;this.setDims(t,r);null!==(i=this._initialOptions)&&void 0!==i&&i.isCentered?this.center():this.fixAndSetPosition();this._initialOptions=null;null!==_classPrivateFieldGet(this,m)&&clearTimeout(_classPrivateFieldGet(this,m));_classPrivateFieldSet(this,m,setTimeout((function(){_classPrivateFieldSet(a,m,null);_classPrivateMethodGet(a,k,_drawBitmap2).call(a,t,r)}),200))}function _scaleBitmap2(t,r){for(var i=_classPrivateFieldGet(this,c),a=i.width,o=i.height,l=_classPrivateFieldGet(this,c);a>2*t||o>2*r;){var u=a,h=o;a>2*t&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2));o>2*r&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2));var d=new OffscreenCanvas(a,o);d.getContext("2d").drawImage(l,0,0,u,h,0,0,a,o);l=d.transferToImageBitmap()}return l}function _drawBitmap2(t,r){t=Math.ceil(t);r=Math.ceil(r);var i=_classPrivateFieldGet(this,y);if(i&&(i.width!==t||i.height!==r)){i.width=t;i.height=r;var a=_classPrivateFieldGet(this,b)?_classPrivateFieldGet(this,c):_classPrivateMethodGet(this,D,_scaleBitmap2).call(this,t,r),o=i.getContext("2d");o.filter=this._uiManager.hcmFilter;o.drawImage(a,0,0,a.width,a.height,0,0,t,r)}}function _serializeBitmap2(t){if(t){if(_classPrivateFieldGet(this,b)){var r=this._uiManager.imageManager.getSvgUrl(_classPrivateFieldGet(this,h));if(r)return r}var i=document.createElement("canvas"),a=_classPrivateFieldGet(this,c);i.width=a.width;i.height=a.height;i.getContext("2d").drawImage(_classPrivateFieldGet(this,c),0,0);return i.toDataURL()}if(_classPrivateFieldGet(this,b)){var o=_slicedToArray(this.pageDimensions,2),u=o[0],d=o[1],p=Math.round(this.width*u*l.PixelsPerInch.PDF_TO_CSS_UNITS),v=Math.round(this.height*d*l.PixelsPerInch.PDF_TO_CSS_UNITS),y=new OffscreenCanvas(p,v);y.getContext("2d").drawImage(_classPrivateFieldGet(this,c),0,0,_classPrivateFieldGet(this,c).width,_classPrivateFieldGet(this,c).height,0,0,p,v);return y.transferToImageBitmap()}return structuredClone(_classPrivateFieldGet(this,c))}function _createObserver2(){var t=this;_classPrivateFieldSet(this,g,new ResizeObserver((function(r){var i=r[0].contentRect;i.width&&i.height&&_classPrivateMethodGet(t,x,_setDimensions2).call(t,i.width,i.height)})));_classPrivateFieldGet(this,g).observe(this.div)}_defineProperty(I,"_type","stamp")}],__webpack_module_cache__={};function __w_pdfjs_require__(t){var r=__webpack_module_cache__[t];if(void 0!==r)return r.exports;var i=__webpack_module_cache__[t]={exports:{}};__webpack_modules__[t].call(i.exports,i,i.exports,__w_pdfjs_require__);return i.exports}var __webpack_exports__={};(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"AbortException",{enumerable:!0,get:function get(){return r.AbortException}});Object.defineProperty(t,"AnnotationEditorLayer",{enumerable:!0,get:function get(){return l.AnnotationEditorLayer}});Object.defineProperty(t,"AnnotationEditorParamsType",{enumerable:!0,get:function get(){return r.AnnotationEditorParamsType}});Object.defineProperty(t,"AnnotationEditorType",{enumerable:!0,get:function get(){return r.AnnotationEditorType}});Object.defineProperty(t,"AnnotationEditorUIManager",{enumerable:!0,get:function get(){return u.AnnotationEditorUIManager}});Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function get(){return c.AnnotationLayer}});Object.defineProperty(t,"AnnotationMode",{enumerable:!0,get:function get(){return r.AnnotationMode}});Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function get(){return r.CMapCompressionType}});Object.defineProperty(t,"FeatureTest",{enumerable:!0,get:function get(){return r.FeatureTest}});Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function get(){return h.GlobalWorkerOptions}});Object.defineProperty(t,"ImageKind",{enumerable:!0,get:function get(){return r.ImageKind}});Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function get(){return r.InvalidPDFException}});Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function get(){return r.MissingPDFException}});Object.defineProperty(t,"OPS",{enumerable:!0,get:function get(){return r.OPS}});Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function get(){return i.PDFDataRangeTransport}});Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function get(){return a.PDFDateString}});Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function get(){return i.PDFWorker}});Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function get(){return r.PasswordResponses}});Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function get(){return r.PermissionFlag}});Object.defineProperty(t,"PixelsPerInch",{enumerable:!0,get:function get(){return a.PixelsPerInch}});Object.defineProperty(t,"PromiseCapability",{enumerable:!0,get:function get(){return r.PromiseCapability}});Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function get(){return a.RenderingCancelledException}});Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function get(){return i.SVGGraphics}});Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function get(){return r.UnexpectedResponseException}});Object.defineProperty(t,"Util",{enumerable:!0,get:function get(){return r.Util}});Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function get(){return r.VerbosityLevel}});Object.defineProperty(t,"XfaLayer",{enumerable:!0,get:function get(){return d.XfaLayer}});Object.defineProperty(t,"build",{enumerable:!0,get:function get(){return i.build}});Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function get(){return r.createValidAbsoluteUrl}});Object.defineProperty(t,"getDocument",{enumerable:!0,get:function get(){return i.getDocument}});Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function get(){return a.getFilenameFromUrl}});Object.defineProperty(t,"getPdfFilenameFromUrl",{enumerable:!0,get:function get(){return a.getPdfFilenameFromUrl}});Object.defineProperty(t,"getXfaPageViewport",{enumerable:!0,get:function get(){return a.getXfaPageViewport}});Object.defineProperty(t,"isDataScheme",{enumerable:!0,get:function get(){return a.isDataScheme}});Object.defineProperty(t,"isPdfFile",{enumerable:!0,get:function get(){return a.isPdfFile}});Object.defineProperty(t,"loadScript",{enumerable:!0,get:function get(){return a.loadScript}});Object.defineProperty(t,"normalizeUnicode",{enumerable:!0,get:function get(){return r.normalizeUnicode}});Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function get(){return o.renderTextLayer}});Object.defineProperty(t,"setLayerDimensions",{enumerable:!0,get:function get(){return a.setLayerDimensions}});Object.defineProperty(t,"shadow",{enumerable:!0,get:function get(){return r.shadow}});Object.defineProperty(t,"updateTextLayer",{enumerable:!0,get:function get(){return o.updateTextLayer}});Object.defineProperty(t,"version",{enumerable:!0,get:function get(){return i.version}});var r=__w_pdfjs_require__(1),i=__w_pdfjs_require__(305),a=__w_pdfjs_require__(362),o=__w_pdfjs_require__(400),l=__w_pdfjs_require__(401),u=__w_pdfjs_require__(356),c=__w_pdfjs_require__(410),h=__w_pdfjs_require__(384),d=__w_pdfjs_require__(418)})();return __webpack_exports__})()));
/**
 * @licstart The following is the entire license notice for the
 * JavaScript code in this page
 *
 * Copyright 2023 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
 */(()=>{"use strict";var t=[,(t,r,i)=>{i(2)("iterator")},(t,r,i)=>{var a=i(3),o=i(5),l=i(12),u=i(23).f;t.exports=function(t){var r=a.Symbol||(a.Symbol={});o(r,t)||u(r,t,{value:l.f(t)})}},(t,r,i)=>{var a=i(4);t.exports=a},function(t){var check=function(t){return t&&t.Math===Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(t,r,i)=>{var a=i(6),o=i(9),l=a({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return l(o(t),r)}},(t,r,i)=>{var a=i(7),o=Function.prototype,l=o.call,u=a&&o.bind.bind(l,l);t.exports=a?u:function(t){return function(){return l.apply(t,arguments)}}},(t,r,i)=>{var a=i(8);t.exports=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r,i)=>{var a=i(10),o=Object;t.exports=function(t){return o(a(t))}},(t,r,i)=>{var a=i(11),o=TypeError;t.exports=function(t){if(a(t))throw o("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,r,i)=>{var a=i(13);r.f=a},(t,r,i)=>{var a=i(4),o=i(14),l=i(5),u=i(18),c=i(19),h=i(22),d=a.Symbol,p=o("wks"),v=h?d.for||d:d&&d.withoutSetter||u;t.exports=function(t){l(p,t)||(p[t]=c&&l(d,t)?d[t]:v("Symbol."+t));return p[t]}},(t,r,i)=>{var a=i(15),o=i(16);(t.exports=function(t,r){return o[t]||(o[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.32.1",mode:a?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,i)=>{var a=i(4),o=i(17),l="__core-js_shared__",u=a[l]||o(l,{});t.exports=u},(t,r,i)=>{var a=i(4),o=Object.defineProperty;t.exports=function(t,r){try{o(a,t,{value:r,configurable:!0,writable:!0})}catch(i){a[t]=r}return r}},(t,r,i)=>{var a=i(6),o=0,l=Math.random(),u=a(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+l,36)}},(t,r,i)=>{var a=i(20),o=i(8),l=i(4).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!l(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&a&&a<41}))},(t,r,i)=>{var a,o,l=i(4),u=i(21),c=l.process,h=l.Deno,d=c&&c.versions||h&&h.version,p=d&&d.v8;p&&(o=(a=p.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1]));!o&&u&&(!(a=u.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=u.match(/Chrome\/(\d+)/))&&(o=+a[1]);t.exports=o},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,r,i)=>{var a=i(19);t.exports=a&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,i)=>{var a=i(24),o=i(25),l=i(30),u=i(31),c=i(32),h=TypeError,d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v="enumerable",y="configurable",g="writable";r.f=a?l?function defineProperty(t,r,i){u(t);r=c(r);u(i);if("function"==typeof t&&"prototype"===r&&"value"in i&&g in i&&!i[g]){var a=p(t,r);if(a&&a[g]){t[r]=i.value;i={configurable:y in i?i[y]:a[y],enumerable:v in i?i[v]:a[v],writable:!1}}}return d(t,r,i)}:d:function defineProperty(t,r,i){u(t);r=c(r);u(i);if(o)try{return d(t,r,i)}catch(t){}if("get"in i||"set"in i)throw h("Accessors not supported");"value"in i&&(t[r]=i.value);return t}},(t,r,i)=>{var a=i(8);t.exports=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},(t,r,i)=>{var a=i(24),o=i(8),l=i(26);t.exports=!a&&!o((function(){return 7!==Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a}))},(t,r,i)=>{var a=i(4),o=i(27),l=a.document,u=o(l)&&o(l.createElement);t.exports=function(t){return u?l.createElement(t):{}}},(t,r,i)=>{var a=i(28),o=i(29),l=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:a(t)||t===l}:function(t){return"object"==typeof t?null!==t:a(t)}},(t,r,i)=>{var a=i(29),o=a.all;t.exports=a.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},t=>{var r="object"==typeof document&&document.all,i=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:i}},(t,r,i)=>{var a=i(24),o=i(8);t.exports=a&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,i)=>{var a=i(27),o=String,l=TypeError;t.exports=function(t){if(a(t))return t;throw l(o(t)+" is not an object")}},(t,r,i)=>{var a=i(33),o=i(35);t.exports=function(t){var r=a(t,"string");return o(r)?r:r+""}},(t,r,i)=>{var a=i(34),o=i(27),l=i(35),u=i(38),c=i(41),h=i(13),d=TypeError,p=h("toPrimitive");t.exports=function(t,r){if(!o(t)||l(t))return t;var i,h=u(t,p);if(h){void 0===r&&(r="default");i=a(h,t,r);if(!o(i)||l(i))return i;throw d("Can't convert object to primitive value")}void 0===r&&(r="number");return c(t,r)}},(t,r,i)=>{var a=i(7),o=Function.prototype.call;t.exports=a?o.bind(o):function(){return o.apply(o,arguments)}},(t,r,i)=>{var a=i(36),o=i(28),l=i(37),u=i(22),c=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var r=a("Symbol");return o(r)&&l(r.prototype,c(t))}},(t,r,i)=>{var a=i(4),o=i(28);t.exports=function(t,r){return arguments.length<2?(i=a[t],o(i)?i:void 0):a[t]&&a[t][r];var i}},(t,r,i)=>{var a=i(6);t.exports=a({}.isPrototypeOf)},(t,r,i)=>{var a=i(39),o=i(11);t.exports=function(t,r){var i=t[r];return o(i)?void 0:a(i)}},(t,r,i)=>{var a=i(28),o=i(40),l=TypeError;t.exports=function(t){if(a(t))return t;throw l(o(t)+" is not a function")}},t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},(t,r,i)=>{var a=i(34),o=i(28),l=i(27),u=TypeError;t.exports=function(t,r){var i,c;if("string"===r&&o(i=t.toString)&&!l(c=a(i,t)))return c;if(o(i=t.valueOf)&&!l(c=a(i,t)))return c;if("string"!==r&&o(i=t.toString)&&!l(c=a(i,t)))return c;throw u("Can't convert object to primitive value")}},(t,r,i)=>{var a=i(43),o=i(46),l=i(61),u=i(62),c=i(23).f,h=i(66),d=i(87),p=i(15),v=i(24),y="Array Iterator",g=u.set,m=u.getterFor(y);t.exports=h(Array,"Array",(function(t,r){g(this,{type:y,target:a(t),index:0,kind:r})}),(function(){var t=m(this),r=t.target,i=t.kind,a=t.index++;if(!r||a>=r.length){t.target=void 0;return d(void 0,!0)}switch(i){case"keys":return d(a,!1);case"values":return d(r[a],!1)}return d([a,r[a]],!1)}),"values");var b=l.Arguments=l.Array;o("keys");o("values");o("entries");if(!p&&v&&"values"!==b.name)try{c(b,"name",{value:"values"})}catch(t){}},(t,r,i)=>{var a=i(44),o=i(10);t.exports=function(t){return a(o(t))}},(t,r,i)=>{var a=i(6),o=i(8),l=i(45),u=Object,c=a("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"===l(t)?c(t,""):u(t)}:u},(t,r,i)=>{var a=i(6),o=a({}.toString),l=a("".slice);t.exports=function(t){return l(o(t),8,-1)}},(t,r,i)=>{var a=i(13),o=i(47),l=i(23).f,u=a("unscopables"),c=Array.prototype;void 0===c[u]&&l(c,u,{configurable:!0,value:o(null)});t.exports=function(t){c[u][t]=!0}},(t,r,i)=>{var a,o=i(31),l=i(48),u=i(58),c=i(57),h=i(59),d=i(26),p=i(60),v="prototype",y="script",g=p("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+y+">"+t+"</"+y+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{a=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&a?NullProtoObjectViaActiveX(a):function(){var t,r=d("iframe"),i="java"+y+":";r.style.display="none";h.appendChild(r);r.src=String(i);(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(a);for(var t=u.length;t--;)delete NullProtoObject[v][u[t]];return NullProtoObject()};c[g]=!0;t.exports=Object.create||function create(t,r){var i;if(null!==t){EmptyConstructor[v]=o(t);i=new EmptyConstructor;EmptyConstructor[v]=null;i[g]=t}else i=NullProtoObject();return void 0===r?i:l.f(i,r)}},(t,r,i)=>{var a=i(24),o=i(30),l=i(23),u=i(31),c=i(43),h=i(49);r.f=a&&!o?Object.defineProperties:function defineProperties(t,r){u(t);for(var i,a=c(r),o=h(r),d=o.length,p=0;d>p;)l.f(t,i=o[p++],a[i]);return t}},(t,r,i)=>{var a=i(50),o=i(58);t.exports=Object.keys||function keys(t){return a(t,o)}},(t,r,i)=>{var a=i(6),o=i(5),l=i(43),u=i(51).indexOf,c=i(57),h=a([].push);t.exports=function(t,r){var i,a=l(t),d=0,p=[];for(i in a)!o(c,i)&&o(a,i)&&h(p,i);for(;r.length>d;)o(a,i=r[d++])&&(~u(p,i)||h(p,i));return p}},(t,r,i)=>{var a=i(43),o=i(52),l=i(55),createMethod=function(t){return function(r,i,u){var c,h=a(r),d=l(h),p=o(u,d);if(t&&i!=i){for(;d>p;)if((c=h[p++])!=c)return!0}else for(;d>p;p++)if((t||p in h)&&h[p]===i)return t||p||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,i)=>{var a=i(53),o=Math.max,l=Math.min;t.exports=function(t,r){var i=a(t);return i<0?o(i+r,0):l(i,r)}},(t,r,i)=>{var a=i(54);t.exports=function(t){var r=+t;return r!=r||0===r?0:a(r)}},t=>{var r=Math.ceil,i=Math.floor;t.exports=Math.trunc||function trunc(t){var a=+t;return(a>0?i:r)(a)}},(t,r,i)=>{var a=i(56);t.exports=function(t){return a(t.length)}},(t,r,i)=>{var a=i(53),o=Math.min;t.exports=function(t){return t>0?o(a(t),9007199254740991):0}},t=>{t.exports={}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r,i)=>{var a=i(36);t.exports=a("document","documentElement")},(t,r,i)=>{var a=i(14),o=i(18),l=a("keys");t.exports=function(t){return l[t]||(l[t]=o(t))}},t=>{t.exports={}},(t,r,i)=>{var a,o,l,u=i(63),c=i(4),h=i(27),d=i(64),p=i(5),v=i(16),y=i(60),g=i(57),m="Object already initialized",b=c.TypeError,w=c.WeakMap;if(u||v.state){var P=v.state||(v.state=new w);P.get=P.get;P.has=P.has;P.set=P.set;a=function(t,r){if(P.has(t))throw b(m);r.facade=t;P.set(t,r);return r};o=function(t){return P.get(t)||{}};l=function(t){return P.has(t)}}else{var A=y("state");g[A]=!0;a=function(t,r){if(p(t,A))throw b(m);r.facade=t;d(t,A,r);return r};o=function(t){return p(t,A)?t[A]:{}};l=function(t){return p(t,A)}}t.exports={set:a,get:o,has:l,enforce:function(t){return l(t)?o(t):a(t,{})},getterFor:function(t){return function(r){var i;if(!h(r)||(i=o(r)).type!==t)throw b("Incompatible receiver, "+t+" required");return i}}}},(t,r,i)=>{var a=i(4),o=i(28),l=a.WeakMap;t.exports=o(l)&&/native code/.test(String(l))},(t,r,i)=>{var a=i(24),o=i(23),l=i(65);t.exports=a?function(t,r,i){return o.f(t,r,l(1,i))}:function(t,r,i){t[r]=i;return t}},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,i)=>{var a=i(67),o=i(34),l=i(15),u=i(72),c=i(28),h=i(79),d=i(81),p=i(84),v=i(83),y=i(64),g=i(70),m=i(13),b=i(61),w=i(80),P=u.PROPER,A=u.CONFIGURABLE,S=w.IteratorPrototype,E=w.BUGGY_SAFARI_ITERATORS,x=m("iterator"),D="keys",k="values",C="entries",returnThis=function(){return this};t.exports=function(t,r,i,u,m,w,T){h(i,r,u);var I,O,M,getIterationMethod=function(t){if(t===m&&j)return j;if(!E&&t in G)return G[t];switch(t){case D:return function keys(){return new i(this,t)};case k:return function values(){return new i(this,t)};case C:return function entries(){return new i(this,t)}}return function(){return new i(this)}},L=r+" Iterator",R=!1,G=t.prototype,B=G[x]||G["@@iterator"]||m&&G[m],j=!E&&B||getIterationMethod(m),N="Array"===r&&G.entries||B;if(N&&(I=d(N.call(new t)))!==Object.prototype&&I.next){l||d(I)===S||(p?p(I,S):c(I[x])||g(I,x,returnThis));v(I,L,!0,!0);l&&(b[L]=returnThis)}if(P&&m===k&&B&&B.name!==k)if(!l&&A)y(G,"name",k);else{R=!0;j=function values(){return o(B,this)}}if(m){O={values:getIterationMethod(k),keys:w?j:getIterationMethod(D),entries:getIterationMethod(C)};if(T)for(M in O)(E||R||!(M in G))&&g(G,M,O[M]);else a({target:r,proto:!0,forced:E||R},O)}l&&!T||G[x]===j||g(G,x,j,{name:m});b[r]=j;return O}},(t,r,i)=>{var a=i(4),o=i(68).f,l=i(64),u=i(70),c=i(17),h=i(74),d=i(78);t.exports=function(t,r){var i,p,v,y,g,m=t.target,b=t.global,w=t.stat;if(i=b?a:w?a[m]||c(m,{}):(a[m]||{}).prototype)for(p in r){y=r[p];v=t.dontCallGetSet?(g=o(i,p))&&g.value:i[p];if(!d(b?p:m+(w?".":"#")+p,t.forced)&&void 0!==v){if(typeof y==typeof v)continue;h(y,v)}(t.sham||v&&v.sham)&&l(y,"sham",!0);u(i,p,y,t)}}},(t,r,i)=>{var a=i(24),o=i(34),l=i(69),u=i(65),c=i(43),h=i(32),d=i(5),p=i(25),v=Object.getOwnPropertyDescriptor;r.f=a?v:function getOwnPropertyDescriptor(t,r){t=c(t);r=h(r);if(p)try{return v(t,r)}catch(t){}if(d(t,r))return u(!o(l.f,t,r),t[r])}},(t,r)=>{var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,o=a&&!i.call({1:2},1);r.f=o?function propertyIsEnumerable(t){var r=a(this,t);return!!r&&r.enumerable}:i},(t,r,i)=>{var a=i(28),o=i(23),l=i(71),u=i(17);t.exports=function(t,r,i,c){c||(c={});var h=c.enumerable,d=void 0!==c.name?c.name:r;a(i)&&l(i,d,c);if(c.global)h?t[r]=i:u(r,i);else{try{c.unsafe?t[r]&&(h=!0):delete t[r]}catch(t){}h?t[r]=i:o.f(t,r,{value:i,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return t}},(t,r,i)=>{var a=i(6),o=i(8),l=i(28),u=i(5),c=i(24),h=i(72).CONFIGURABLE,d=i(73),p=i(62),v=p.enforce,y=p.get,g=String,m=Object.defineProperty,b=a("".slice),w=a("".replace),P=a([].join),A=c&&!o((function(){return 8!==m((function(){}),"length",{value:8}).length})),S=String(String).split("String"),E=t.exports=function(t,r,i){"Symbol("===b(g(r),0,7)&&(r="["+w(g(r),/^Symbol\(([^)]*)\)/,"$1")+"]");i&&i.getter&&(r="get "+r);i&&i.setter&&(r="set "+r);(!u(t,"name")||h&&t.name!==r)&&(c?m(t,"name",{value:r,configurable:!0}):t.name=r);A&&i&&u(i,"arity")&&t.length!==i.arity&&m(t,"length",{value:i.arity});try{i&&u(i,"constructor")&&i.constructor?c&&m(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var a=v(t);u(a,"source")||(a.source=P(S,"string"==typeof r?r:""));return t};Function.prototype.toString=E((function toString(){return l(this)&&y(this).source||d(this)}),"toString")},(t,r,i)=>{var a=i(24),o=i(5),l=Function.prototype,u=a&&Object.getOwnPropertyDescriptor,c=o(l,"name"),h=c&&"something"===function something(){}.name,d=c&&(!a||a&&u(l,"name").configurable);t.exports={EXISTS:c,PROPER:h,CONFIGURABLE:d}},(t,r,i)=>{var a=i(6),o=i(28),l=i(16),u=a(Function.toString);o(l.inspectSource)||(l.inspectSource=function(t){return u(t)});t.exports=l.inspectSource},(t,r,i)=>{var a=i(5),o=i(75),l=i(68),u=i(23);t.exports=function(t,r,i){for(var c=o(r),h=u.f,d=l.f,p=0;p<c.length;p++){var v=c[p];a(t,v)||i&&a(i,v)||h(t,v,d(r,v))}}},(t,r,i)=>{var a=i(36),o=i(6),l=i(76),u=i(77),c=i(31),h=o([].concat);t.exports=a("Reflect","ownKeys")||function ownKeys(t){var r=l.f(c(t)),i=u.f;return i?h(r,i(t)):r}},(t,r,i)=>{var a=i(50),o=i(58).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return a(t,o)}},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,i)=>{var a=i(8),o=i(28),l=/#|\.prototype\./,isForced=function(t,r){var i=c[u(t)];return i===d||i!==h&&(o(r)?a(r):!!r)},u=isForced.normalize=function(t){return String(t).replace(l,".").toLowerCase()},c=isForced.data={},h=isForced.NATIVE="N",d=isForced.POLYFILL="P";t.exports=isForced},(t,r,i)=>{var a=i(80).IteratorPrototype,o=i(47),l=i(65),u=i(83),c=i(61),returnThis=function(){return this};t.exports=function(t,r,i,h){var d=r+" Iterator";t.prototype=o(a,{next:l(+!h,i)});u(t,d,!1,!0);c[d]=returnThis;return t}},(t,r,i)=>{var a,o,l,u=i(8),c=i(28),h=i(27),d=i(47),p=i(81),v=i(70),y=i(13),g=i(15),m=y("iterator"),b=!1;[].keys&&("next"in(l=[].keys())?(o=p(p(l)))!==Object.prototype&&(a=o):b=!0);!h(a)||u((function(){var t={};return a[m].call(t)!==t}))?a={}:g&&(a=d(a));c(a[m])||v(a,m,(function(){return this}));t.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:b}},(t,r,i)=>{var a=i(5),o=i(28),l=i(9),u=i(60),c=i(82),h=u("IE_PROTO"),d=Object,p=d.prototype;t.exports=c?d.getPrototypeOf:function(t){var r=l(t);if(a(r,h))return r[h];var i=r.constructor;return o(i)&&r instanceof i?i.prototype:r instanceof d?p:null}},(t,r,i)=>{var a=i(8);t.exports=!a((function(){function F(){}F.prototype.constructor=null;return Object.getPrototypeOf(new F)!==F.prototype}))},(t,r,i)=>{var a=i(23).f,o=i(5),l=i(13)("toStringTag");t.exports=function(t,r,i){t&&!i&&(t=t.prototype);t&&!o(t,l)&&a(t,l,{configurable:!0,value:r})}},(t,r,i)=>{var a=i(85),o=i(31),l=i(86);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,i={};try{(t=a(Object.prototype,"__proto__","set"))(i,[]);r=i instanceof Array}catch(t){}return function setPrototypeOf(i,a){o(i);l(a);r?t(i,a):i.__proto__=a;return i}}():void 0)},(t,r,i)=>{var a=i(6),o=i(39);t.exports=function(t,r,i){try{return a(o(Object.getOwnPropertyDescriptor(t,r)[i]))}catch(t){}}},(t,r,i)=>{var a=i(28),o=String,l=TypeError;t.exports=function(t){if("object"==typeof t||a(t))return t;throw l("Can't set "+o(t)+" as a prototype")}},t=>{t.exports=function(t,r){return{value:t,done:r}}},(t,r,i)=>{var a=i(89),o=i(70),l=i(90);a||o(Object.prototype,"toString",l,{unsafe:!0})},(t,r,i)=>{var a={};a[i(13)("toStringTag")]="z";t.exports="[object z]"===String(a)},(t,r,i)=>{var a=i(89),o=i(91);t.exports=a?{}.toString:function toString(){return"[object "+o(this)+"]"}},(t,r,i)=>{var a=i(89),o=i(28),l=i(45),u=i(13)("toStringTag"),c=Object,h="Arguments"===l(function(){return arguments}());t.exports=a?l:function(t){var r,i,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,r){try{return t[r]}catch(t){}}(r=c(t),u))?i:h?l(r):"Object"===(a=l(r))&&o(r.callee)?"Arguments":a}},(t,r,i)=>{var a=i(93).charAt,o=i(94),l=i(62),u=i(66),c=i(87),h="String Iterator",d=l.set,p=l.getterFor(h);u(String,"String",(function(t){d(this,{type:h,string:o(t),index:0})}),(function next(){var t,r=p(this),i=r.string,o=r.index;if(o>=i.length)return c(void 0,!0);t=a(i,o);r.index+=t.length;return c(t,!1)}))},(t,r,i)=>{var a=i(6),o=i(53),l=i(94),u=i(10),c=a("".charAt),h=a("".charCodeAt),d=a("".slice),createMethod=function(t){return function(r,i){var a,p,v=l(u(r)),y=o(i),g=v.length;return y<0||y>=g?t?"":void 0:(a=h(v,y))<55296||a>56319||y+1===g||(p=h(v,y+1))<56320||p>57343?t?c(v,y):a:t?d(v,y,y+2):p-56320+(a-55296<<10)+65536}};t.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},(t,r,i)=>{var a=i(91),o=String;t.exports=function(t){if("Symbol"===a(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},(t,r,i)=>{var a=i(4),o=i(96),l=i(97),u=i(42),c=i(64),h=i(13),d=h("iterator"),p=h("toStringTag"),v=u.values,handlePrototype=function(t,r){if(t){if(t[d]!==v)try{c(t,d,v)}catch(r){t[d]=v}t[p]||c(t,p,r);if(o[r])for(var i in u)if(t[i]!==u[i])try{c(t,i,u[i])}catch(r){t[i]=u[i]}}};for(var y in o)handlePrototype(a[y]&&a[y].prototype,y);handlePrototype(l,"DOMTokenList")},t=>{t.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}},(t,r,i)=>{var a=i(26)("span").classList,o=a&&a.constructor&&a.constructor.prototype;t.exports=o===Object.prototype?void 0:o},(t,r,i)=>{i(99);i(112);i(114);i(115);i(119)},(t,r,i)=>{var a=i(67),o=i(4),l=i(34),u=i(6),c=i(15),h=i(24),d=i(19),p=i(8),v=i(5),y=i(37),g=i(31),m=i(43),b=i(32),w=i(94),P=i(65),A=i(47),S=i(49),E=i(76),x=i(100),D=i(77),k=i(68),C=i(23),T=i(48),I=i(69),O=i(70),M=i(103),L=i(14),R=i(60),G=i(57),B=i(18),j=i(13),N=i(12),W=i(2),V=i(104),U=i(83),H=i(62),z=i(105).forEach,q=R("hidden"),Y="Symbol",K="prototype",X=H.set,$=H.getterFor(Y),Q=Object[K],J=o.Symbol,Z=J&&J[K],ee=o.TypeError,te=o.QObject,re=k.f,ne=C.f,ie=x.f,ae=I.f,oe=u([].push),se=L("symbols"),le=L("op-symbols"),ue=L("wks"),ce=!te||!te[K]||!te[K].findChild,he=h&&p((function(){return 7!==A(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?function(t,r,i){var a=re(Q,r);a&&delete Q[r];ne(t,r,i);a&&t!==Q&&ne(Q,r,a)}:ne,wrap=function(t,r){var i=se[t]=A(Z);X(i,{type:Y,tag:t,description:r});h||(i.description=r);return i},de=function defineProperty(t,r,i){t===Q&&de(le,r,i);g(t);var a=b(r);g(i);if(v(se,a)){if(i.enumerable){v(t,q)&&t[q][a]&&(t[q][a]=!1);i=A(i,{enumerable:P(0,!1)})}else{v(t,q)||ne(t,q,P(1,{}));t[q][a]=!0}return he(t,a,i)}return ne(t,a,i)},fe=function defineProperties(t,r){g(t);var i=m(r),a=S(i).concat($getOwnPropertySymbols(i));z(a,(function(r){h&&!l(pe,i,r)||de(t,r,i[r])}));return t},pe=function propertyIsEnumerable(t){var r=b(t),i=l(ae,this,r);return!(this===Q&&v(se,r)&&!v(le,r))&&(!(i||!v(this,r)||!v(se,r)||v(this,q)&&this[q][r])||i)},ve=function getOwnPropertyDescriptor(t,r){var i=m(t),a=b(r);if(i!==Q||!v(se,a)||v(le,a)){var o=re(i,a);!o||!v(se,a)||v(i,q)&&i[q][a]||(o.enumerable=!0);return o}},ye=function getOwnPropertyNames(t){var r=ie(m(t)),i=[];z(r,(function(t){v(se,t)||v(G,t)||oe(i,t)}));return i},$getOwnPropertySymbols=function(t){var r=t===Q,i=ie(r?le:m(t)),a=[];z(i,(function(t){!v(se,t)||r&&!v(Q,t)||oe(a,se[t])}));return a};if(!d){O(Z=(J=function Symbol(){if(y(Z,this))throw ee("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,r=B(t),setter=function(t){this===Q&&l(setter,le,t);v(this,q)&&v(this[q],r)&&(this[q][r]=!1);he(this,r,P(1,t))};h&&ce&&he(Q,r,{configurable:!0,set:setter});return wrap(r,t)})[K],"toString",(function toString(){return $(this).tag}));O(J,"withoutSetter",(function(t){return wrap(B(t),t)}));I.f=pe;C.f=de;T.f=fe;k.f=ve;E.f=x.f=ye;D.f=$getOwnPropertySymbols;N.f=function(t){return wrap(j(t),t)};if(h){M(Z,"description",{configurable:!0,get:function description(){return $(this).description}});c||O(Q,"propertyIsEnumerable",pe,{unsafe:!0})}}a({global:!0,constructor:!0,wrap:!0,forced:!d,sham:!d},{Symbol:J});z(S(ue),(function(t){W(t)}));a({target:Y,stat:!0,forced:!d},{useSetter:function(){ce=!0},useSimple:function(){ce=!1}});a({target:"Object",stat:!0,forced:!d,sham:!h},{create:function create(t,r){return void 0===r?A(t):fe(A(t),r)},defineProperty:de,defineProperties:fe,getOwnPropertyDescriptor:ve});a({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:ye});V();U(J,Y);G[q]=!0},(t,r,i)=>{var a=i(45),o=i(43),l=i(76).f,u=i(101),c="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return c&&"Window"===a(t)?function(t){try{return l(t)}catch(t){return u(c)}}(t):l(o(t))}},(t,r,i)=>{var a=i(52),o=i(55),l=i(102),u=Array,c=Math.max;t.exports=function(t,r,i){for(var h=o(t),d=a(r,h),p=a(void 0===i?h:i,h),v=u(c(p-d,0)),y=0;d<p;d++,y++)l(v,y,t[d]);v.length=y;return v}},(t,r,i)=>{var a=i(32),o=i(23),l=i(65);t.exports=function(t,r,i){var u=a(r);u in t?o.f(t,u,l(0,i)):t[u]=i}},(t,r,i)=>{var a=i(71),o=i(23);t.exports=function(t,r,i){i.get&&a(i.get,r,{getter:!0});i.set&&a(i.set,r,{setter:!0});return o.f(t,r,i)}},(t,r,i)=>{var a=i(34),o=i(36),l=i(13),u=i(70);t.exports=function(){var t=o("Symbol"),r=t&&t.prototype,i=r&&r.valueOf,c=l("toPrimitive");r&&!r[c]&&u(r,c,(function(t){return a(i,this)}),{arity:1})}},(t,r,i)=>{var a=i(106),o=i(6),l=i(44),u=i(9),c=i(55),h=i(108),d=o([].push),createMethod=function(t){var r=1===t,i=2===t,o=3===t,p=4===t,v=6===t,y=7===t,g=5===t||v;return function(m,b,w,P){for(var A,S,E=u(m),x=l(E),D=a(b,w),k=c(x),C=0,T=P||h,I=r?T(m,k):i||y?T(m,0):void 0;k>C;C++)if(g||C in x){S=D(A=x[C],C,E);if(t)if(r)I[C]=S;else if(S)switch(t){case 3:return!0;case 5:return A;case 6:return C;case 2:d(I,A)}else switch(t){case 4:return!1;case 7:d(I,A)}}return v?-1:o||p?p:I}};t.exports={forEach:createMethod(0),map:createMethod(1),filter:createMethod(2),some:createMethod(3),every:createMethod(4),find:createMethod(5),findIndex:createMethod(6),filterReject:createMethod(7)}},(t,r,i)=>{var a=i(107),o=i(39),l=i(7),u=a(a.bind);t.exports=function(t,r){o(t);return void 0===r?t:l?u(t,r):function(){return t.apply(r,arguments)}}},(t,r,i)=>{var a=i(45),o=i(6);t.exports=function(t){if("Function"===a(t))return o(t)}},(t,r,i)=>{var a=i(109);t.exports=function(t,r){return new(a(t))(0===r?0:r)}},(t,r,i)=>{var a=i(110),o=i(111),l=i(27),u=i(13)("species"),c=Array;t.exports=function(t){var r;if(a(t)){r=t.constructor;(o(r)&&(r===c||a(r.prototype))||l(r)&&null===(r=r[u]))&&(r=void 0)}return void 0===r?c:r}},(t,r,i)=>{var a=i(45);t.exports=Array.isArray||function isArray(t){return"Array"===a(t)}},(t,r,i)=>{var a=i(6),o=i(8),l=i(28),u=i(91),c=i(36),h=i(73),noop=function(){},d=[],p=c("Reflect","construct"),v=/^\s*(?:class|function)\b/,y=a(v.exec),g=!v.exec(noop),m=function isConstructor(t){if(!l(t))return!1;try{p(noop,d,t);return!0}catch(t){return!1}},b=function isConstructor(t){if(!l(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!y(v,h(t))}catch(t){return!0}};b.sham=!0;t.exports=!p||o((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?b:m},(t,r,i)=>{var a=i(67),o=i(36),l=i(5),u=i(94),c=i(14),h=i(113),d=c("string-to-symbol-registry"),p=c("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!h},{for:function(t){var r=u(t);if(l(d,r))return d[r];var i=o("Symbol")(r);d[r]=i;p[i]=r;return i}})},(t,r,i)=>{var a=i(19);t.exports=a&&!!Symbol.for&&!!Symbol.keyFor},(t,r,i)=>{var a=i(67),o=i(5),l=i(35),u=i(40),c=i(14),h=i(113),d=c("symbol-to-string-registry");a({target:"Symbol",stat:!0,forced:!h},{keyFor:function keyFor(t){if(!l(t))throw TypeError(u(t)+" is not a symbol");if(o(d,t))return d[t]}})},(t,r,i)=>{var a=i(67),o=i(36),l=i(116),u=i(34),c=i(6),h=i(8),d=i(28),p=i(35),v=i(117),y=i(118),g=i(19),m=String,b=o("JSON","stringify"),w=c(/./.exec),P=c("".charAt),A=c("".charCodeAt),S=c("".replace),E=c(1..toString),x=/[\uD800-\uDFFF]/g,D=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,C=!g||h((function(){var t=o("Symbol")("stringify detection");return"[null]"!==b([t])||"{}"!==b({a:t})||"{}"!==b(Object(t))})),T=h((function(){return'"\\udf06\\ud834"'!==b("\udf06\ud834")||'"\\udead"'!==b("\udead")})),stringifyWithSymbolsFix=function(t,r){var i=v(arguments),a=y(r);if(d(a)||void 0!==t&&!p(t)){i[1]=function(t,r){d(a)&&(r=u(a,this,m(t),r));if(!p(r))return r};return l(b,null,i)}},fixIllFormed=function(t,r,i){var a=P(i,r-1),o=P(i,r+1);return w(D,t)&&!w(k,o)||w(k,t)&&!w(D,a)?"\\u"+E(A(t,0),16):t};b&&a({target:"JSON",stat:!0,arity:3,forced:C||T},{stringify:function stringify(t,r,i){var a=v(arguments),o=l(C?stringifyWithSymbolsFix:b,null,a);return T&&"string"==typeof o?S(o,x,fixIllFormed):o}})},(t,r,i)=>{var a=i(7),o=Function.prototype,l=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(a?u.bind(l):function(){return u.apply(l,arguments)})},(t,r,i)=>{var a=i(6);t.exports=a([].slice)},(t,r,i)=>{var a=i(6),o=i(110),l=i(28),u=i(45),c=i(94),h=a([].push);t.exports=function(t){if(l(t))return t;if(o(t)){for(var r=t.length,i=[],a=0;a<r;a++){var d=t[a];"string"==typeof d?h(i,d):"number"!=typeof d&&"Number"!==u(d)&&"String"!==u(d)||h(i,c(d))}var p=i.length,v=!0;return function(t,r){if(v){v=!1;return r}if(o(this))return r;for(var a=0;a<p;a++)if(i[a]===t)return r}}}},(t,r,i)=>{var a=i(67),o=i(19),l=i(8),u=i(77),c=i(9);a({target:"Object",stat:!0,forced:!o||l((function(){u.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=u.f;return r?r(c(t)):[]}})},(t,r,i)=>{var a=i(67),o=i(24),l=i(4),u=i(6),c=i(5),h=i(28),d=i(37),p=i(94),v=i(103),y=i(74),g=l.Symbol,m=g&&g.prototype;if(o&&h(g)&&(!("description"in m)||void 0!==g().description)){var b={},w=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:p(arguments[0]),r=d(m,this)?new g(t):void 0===t?g():g(t);""===t&&(b[r]=!0);return r};y(w,g);w.prototype=m;m.constructor=w;var P="Symbol(description detection)"===String(g("description detection")),A=u(m.valueOf),S=u(m.toString),E=/^Symbol\((.*)\)[^)]+$/,x=u("".replace),D=u("".slice);v(m,"description",{configurable:!0,get:function description(){var t=A(this);if(c(b,t))return"";var r=S(t),i=P?D(r,7,-1):x(r,E,"$1");return""===i?void 0:i}});a({global:!0,constructor:!0,forced:!0},{Symbol:w})}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(88);i(122);i(123);i(126);i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.GenericCom=void 0;i(115);i(187);i(188);i(190);var a=i(191),o=i(410),l=i(411),u=i(412),c=i(416);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}r.GenericCom={};var h=function(t){_inherits(GenericPreferences,t);var r,i,a=_createSuper(GenericPreferences);function GenericPreferences(){_classCallCheck(this,GenericPreferences);return a.apply(this,arguments)}_createClass(GenericPreferences,[{key:"_writeToStorage",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:try{localStorage.setItem("pdfjs.preferences",JSON.stringify(t))}catch(t){}case 1:case"end":return r.stop()}}),_callee)}))),function _writeToStorage(t){return i.apply(this,arguments)})},{key:"_readFromStorage",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0;return t.abrupt("return",JSON.parse(localStorage.getItem("pdfjs.preferences")));case 4:t.prev=4;t.t0=t.catch(0);return t.abrupt("return",{});case 7:case"end":return t.stop()}}),_callee2,null,[[0,4]])}))),function _readFromStorage(t){return r.apply(this,arguments)})}]);return GenericPreferences}(o.BasePreferences),d=function(t){_inherits(GenericExternalServices,t);var r=_createSuper(GenericExternalServices);function GenericExternalServices(){_classCallCheck(this,GenericExternalServices);return r.apply(this,arguments)}_createClass(GenericExternalServices,null,[{key:"createDownloadManager",value:function createDownloadManager(){return new l.DownloadManager}},{key:"createPreferences",value:function createPreferences(){return new h}},{key:"createL10n",value:function createL10n(t){var r=t.locale,i=void 0===r?"en-US":r;return new u.GenericL10n(i)}},{key:"createScripting",value:function createScripting(t){var r=t.sandboxBundleSrc;return new c.GenericScripting(r)}}]);return GenericExternalServices}(a.DefaultExternalServices);a.PDFViewerApplication.externalServices=d},(t,r,i)=>{var a=i(67),o=i(4),l=i(83);a({global:!0},{Reflect:{}});l(o.Reflect,"Reflect",!0)},(t,r,i)=>{var a=i(67),o=i(36),l=i(116),u=i(124),c=i(125),h=i(31),d=i(27),p=i(47),v=i(8),y=o("Reflect","construct"),g=Object.prototype,m=[].push,b=v((function(){function F(){}return!(y((function(){}),[],F)instanceof F)})),w=!v((function(){y((function(){}))})),P=b||w;a({target:"Reflect",stat:!0,forced:P,sham:P},{construct:function construct(t,r){c(t);h(r);var i=arguments.length<3?t:c(arguments[2]);if(w&&!b)return y(t,r,i);if(t===i){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var a=[null];l(m,a,r);return new(l(u,t,a))}var o=i.prototype,v=p(d(o)?o:g),P=l(t,v,r);return d(P)?P:v}})},(t,r,i)=>{var a=i(6),o=i(39),l=i(27),u=i(5),c=i(117),h=i(7),d=Function,p=a([].concat),v=a([].join),y={};t.exports=h?d.bind:function bind(t){var r=o(this),i=r.prototype,a=c(arguments,1),h=function bound(){var i=p(a,c(arguments));return this instanceof h?function(t,r,i){if(!u(y,r)){for(var a=[],o=0;o<r;o++)a[o]="a["+o+"]";y[r]=d("C,a","return new C("+v(a,",")+")")}return y[r](t,i)}(r,i.length,i):r.apply(t,i)};l(i)&&(h.prototype=i);return h}},(t,r,i)=>{var a=i(111),o=i(40),l=TypeError;t.exports=function(t){if(a(t))return t;throw l(o(t)+" is not a constructor")}},(t,r,i)=>{var a=i(67),o=i(4),l=i(116),u=i(127),c="WebAssembly",h=o[c],d=7!==Error("e",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(t,r){var i={};i[t]=u(t,r,d);a({global:!0,constructor:!0,arity:1,forced:d},i)},exportWebAssemblyErrorCauseWrapper=function(t,r){if(h&&h[t]){var i={};i[t]=u(c+"."+t,r,d);a({target:c,stat:!0,constructor:!0,arity:1,forced:d},i)}};exportGlobalErrorCauseWrapper("Error",(function(t){return function Error(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("EvalError",(function(t){return function EvalError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("RangeError",(function(t){return function RangeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("ReferenceError",(function(t){return function ReferenceError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("SyntaxError",(function(t){return function SyntaxError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("TypeError",(function(t){return function TypeError(r){return l(t,this,arguments)}}));exportGlobalErrorCauseWrapper("URIError",(function(t){return function URIError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("CompileError",(function(t){return function CompileError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("LinkError",(function(t){return function LinkError(r){return l(t,this,arguments)}}));exportWebAssemblyErrorCauseWrapper("RuntimeError",(function(t){return function RuntimeError(r){return l(t,this,arguments)}}))},(t,r,i)=>{var a=i(36),o=i(5),l=i(64),u=i(37),c=i(84),h=i(74),d=i(128),p=i(129),v=i(130),y=i(131),g=i(132),m=i(24),b=i(15);t.exports=function(t,r,i,w){var P="stackTraceLimit",A=w?2:1,S=t.split("."),E=S[S.length-1],x=a.apply(null,S);if(x){var D=x.prototype;!b&&o(D,"cause")&&delete D.cause;if(!i)return x;var k=a("Error"),C=r((function(t,r){var i=v(w?r:t,void 0),a=w?new x(t):new x;void 0!==i&&l(a,"message",i);g(a,C,a.stack,2);this&&u(D,this)&&p(a,this,C);arguments.length>A&&y(a,arguments[A]);return a}));C.prototype=D;if("Error"!==E)c?c(C,k):h(C,k,{name:!0});else if(m&&P in x){d(C,x,P);d(C,x,"prepareStackTrace")}h(C,x);if(!b)try{D.name!==E&&l(D,"name",E);D.constructor=C}catch(t){}return C}}},(t,r,i)=>{var a=i(23).f;t.exports=function(t,r,i){i in t||a(t,i,{configurable:!0,get:function(){return r[i]},set:function(t){r[i]=t}})}},(t,r,i)=>{var a=i(28),o=i(27),l=i(84);t.exports=function(t,r,i){var u,c;l&&a(u=r.constructor)&&u!==i&&o(c=u.prototype)&&c!==i.prototype&&l(t,c);return t}},(t,r,i)=>{var a=i(94);t.exports=function(t,r){return void 0===t?arguments.length<2?"":r:a(t)}},(t,r,i)=>{var a=i(27),o=i(64);t.exports=function(t,r){a(r)&&"cause"in r&&o(t,"cause",r.cause)}},(t,r,i)=>{var a=i(64),o=i(133),l=i(134),u=Error.captureStackTrace;t.exports=function(t,r,i,c){l&&(u?u(t,r):a(t,"stack",o(i,c)))}},(t,r,i)=>{var a=i(6),o=Error,l=a("".replace),u=String(o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,h=c.test(u);t.exports=function(t,r){if(h&&"string"==typeof t&&!o.prepareStackTrace)for(;r--;)t=l(t,c,"");return t}},(t,r,i)=>{var a=i(8),o=i(65);t.exports=!a((function(){var t=Error("a");if(!("stack"in t))return!0;Object.defineProperty(t,"stack",o(1,7));return 7!==t.stack}))},(t,r,i)=>{var a=i(2),o=i(104);a("toPrimitive");o()},(t,r,i)=>{var a=i(5),o=i(70),l=i(137),u=i(13)("toPrimitive"),c=Date.prototype;a(c,u)||o(c,u,l)},(t,r,i)=>{var a=i(31),o=i(41),l=TypeError;t.exports=function(t){a(this);if("string"===t||"default"===t)t="string";else if("number"!==t)throw l("Incorrect hint");return o(this,t)}},(t,r,i)=>{var a=i(67),o=i(15),l=i(24),u=i(4),c=i(3),h=i(6),d=i(78),p=i(5),v=i(129),y=i(37),g=i(35),m=i(33),b=i(8),w=i(76).f,P=i(68).f,A=i(23).f,S=i(139),E=i(140).trim,x="Number",D=u[x],k=c[x],C=D.prototype,T=u.TypeError,I=h("".slice),O=h("".charCodeAt),toNumber=function(t){var r,i,a,o,l,u,c,h,d=m(t,"number");if(g(d))throw T("Cannot convert a Symbol value to a number");if("string"==typeof d&&d.length>2){d=E(d);if(43===(r=O(d,0))||45===r){if(88===(i=O(d,2))||120===i)return NaN}else if(48===r){switch(O(d,1)){case 66:case 98:a=2;o=49;break;case 79:case 111:a=8;o=55;break;default:return+d}u=(l=I(d,2)).length;for(c=0;c<u;c++)if((h=O(l,c))<48||h>o)return NaN;return parseInt(l,a)}}return+d},M=d(x,!D(" 0o1")||!D("0b1")||D("+0x1")),L=function Number(t){var r,i=arguments.length<1?0:D(function(t){var r=m(t,"number");return"bigint"==typeof r?r:toNumber(r)}(t));return y(C,r=this)&&b((function(){S(r)}))?v(Object(i),this,L):i};L.prototype=C;M&&!o&&(C.constructor=L);a({global:!0,constructor:!0,wrap:!0,forced:M},{Number:L});var copyConstructorProperties=function(t,r){for(var i,a=l?w(r):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;a.length>o;o++)p(r,i=a[o])&&!p(t,i)&&A(t,i,P(r,i))};o&&k&&copyConstructorProperties(c[x],k);(M||o)&&copyConstructorProperties(c[x],D)},(t,r,i)=>{var a=i(6);t.exports=a(1..valueOf)},(t,r,i)=>{var a=i(6),o=i(10),l=i(94),u=i(141),c=a("".replace),h=RegExp("^["+u+"]+"),d=RegExp("(^|[^"+u+"])["+u+"]+$"),createMethod=function(t){return function(r){var i=l(o(r));1&t&&(i=c(i,h,""));2&t&&(i=c(i,d,"$1"));return i}};t.exports={start:createMethod(1),end:createMethod(2),trim:createMethod(3)}},t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},(t,r,i)=>{i(143);i(162);i(170);i(171);i(172);i(173)},(t,r,i)=>{var a,o,l,u=i(67),c=i(15),h=i(144),d=i(4),p=i(34),v=i(70),y=i(84),g=i(83),m=i(145),b=i(39),w=i(28),P=i(27),A=i(146),S=i(147),E=i(148).set,x=i(151),D=i(155),k=i(156),C=i(152),T=i(62),I=i(157),O=i(158),M=i(161),L="Promise",R=O.CONSTRUCTOR,G=O.REJECTION_EVENT,B=O.SUBCLASSING,j=T.getterFor(L),N=T.set,W=I&&I.prototype,V=I,U=W,H=d.TypeError,z=d.document,q=d.process,Y=M.f,K=Y,X=!!(z&&z.createEvent&&d.dispatchEvent),$="unhandledrejection",isThenable=function(t){var r;return!(!P(t)||!w(r=t.then))&&r},callReaction=function(t,r){var i,a,o,l=r.value,u=1===r.state,c=u?t.ok:t.fail,h=t.resolve,d=t.reject,v=t.domain;try{if(c){if(!u){2===r.rejection&&onHandleUnhandled(r);r.rejection=1}if(!0===c)i=l;else{v&&v.enter();i=c(l);if(v){v.exit();o=!0}}i===t.promise?d(H("Promise-chain cycle")):(a=isThenable(i))?p(a,i,h,d):h(i)}else d(l)}catch(t){v&&!o&&v.exit();d(t)}},notify=function(t,r){if(!t.notified){t.notified=!0;x((function(){for(var i,a=t.reactions;i=a.get();)callReaction(i,t);t.notified=!1;r&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,r,i){var a,o;if(X){(a=z.createEvent("Event")).promise=r;a.reason=i;a.initEvent(t,!1,!0);d.dispatchEvent(a)}else a={promise:r,reason:i};!G&&(o=d["on"+t])?o(a):t===$&&D("Unhandled promise rejection",i)},onUnhandled=function(t){p(E,d,(function(){var r,i=t.facade,a=t.value;if(isUnhandled(t)){r=k((function(){h?q.emit("unhandledRejection",a,i):dispatchEvent($,i,a)}));t.rejection=h||isUnhandled(t)?2:1;if(r.error)throw r.value}}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){p(E,d,(function(){var r=t.facade;h?q.emit("rejectionHandled",r):dispatchEvent("rejectionhandled",r,t.value)}))},bind=function(t,r,i){return function(a){t(r,a,i)}},internalReject=function(t,r,i){if(!t.done){t.done=!0;i&&(t=i);t.value=r;t.state=2;notify(t,!0)}},internalResolve=function(t,r,i){if(!t.done){t.done=!0;i&&(t=i);try{if(t.facade===r)throw H("Promise can't be resolved itself");var a=isThenable(r);if(a)x((function(){var i={done:!1};try{p(a,r,bind(internalResolve,i,t),bind(internalReject,i,t))}catch(r){internalReject(i,r,t)}}));else{t.value=r;t.state=1;notify(t,!1)}}catch(r){internalReject({done:!1},r,t)}}};if(R){U=(V=function Promise(t){A(this,U);b(t);p(a,this);var r=j(this);try{t(bind(internalResolve,r),bind(internalReject,r))}catch(t){internalReject(r,t)}}).prototype;(a=function Promise(t){N(this,{type:L,done:!1,notified:!1,parent:!1,reactions:new C,rejection:!1,state:0,value:void 0})}).prototype=v(U,"then",(function then(t,r){var i=j(this),a=Y(S(this,V));i.parent=!0;a.ok=!w(t)||t;a.fail=w(r)&&r;a.domain=h?q.domain:void 0;0===i.state?i.reactions.add(a):x((function(){callReaction(a,i)}));return a.promise}));o=function(){var t=new a,r=j(t);this.promise=t;this.resolve=bind(internalResolve,r);this.reject=bind(internalReject,r)};M.f=Y=function(t){return t===V||undefined===t?new o(t):K(t)};if(!c&&w(I)&&W!==Object.prototype){l=W.then;B||v(W,"then",(function then(t,r){var i=this;return new V((function(t,r){p(l,i,t,r)})).then(t,r)}),{unsafe:!0});try{delete W.constructor}catch(t){}y&&y(W,U)}}u({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:V});g(V,L,!1,!0);m(L)},(t,r,i)=>{var a=i(4),o=i(45);t.exports="process"===o(a.process)},(t,r,i)=>{var a=i(36),o=i(103),l=i(13),u=i(24),c=l("species");t.exports=function(t){var r=a(t);u&&r&&!r[c]&&o(r,c,{configurable:!0,get:function(){return this}})}},(t,r,i)=>{var a=i(37),o=TypeError;t.exports=function(t,r){if(a(r,t))return t;throw o("Incorrect invocation")}},(t,r,i)=>{var a=i(31),o=i(125),l=i(11),u=i(13)("species");t.exports=function(t,r){var i,c=a(t).constructor;return void 0===c||l(i=a(c)[u])?r:o(i)}},(t,r,i)=>{var a,o,l,u,c=i(4),h=i(116),d=i(106),p=i(28),v=i(5),y=i(8),g=i(59),m=i(117),b=i(26),w=i(149),P=i(150),A=i(144),S=c.setImmediate,E=c.clearImmediate,x=c.process,D=c.Dispatch,k=c.Function,C=c.MessageChannel,T=c.String,I=0,O={},M="onreadystatechange";y((function(){a=c.location}));var run=function(t){if(v(O,t)){var r=O[t];delete O[t];r()}},runner=function(t){return function(){run(t)}},eventListener=function(t){run(t.data)},globalPostMessageDefer=function(t){c.postMessage(T(t),a.protocol+"//"+a.host)};if(!S||!E){S=function setImmediate(t){w(arguments.length,1);var r=p(t)?t:k(t),i=m(arguments,1);O[++I]=function(){h(r,void 0,i)};o(I);return I};E=function clearImmediate(t){delete O[t]};if(A)o=function(t){x.nextTick(runner(t))};else if(D&&D.now)o=function(t){D.now(runner(t))};else if(C&&!P){u=(l=new C).port2;l.port1.onmessage=eventListener;o=d(u.postMessage,u)}else if(c.addEventListener&&p(c.postMessage)&&!c.importScripts&&a&&"file:"!==a.protocol&&!y(globalPostMessageDefer)){o=globalPostMessageDefer;c.addEventListener("message",eventListener,!1)}else o=M in b("script")?function(t){g.appendChild(b("script"))[M]=function(){g.removeChild(this);run(t)}}:function(t){setTimeout(runner(t),0)}}t.exports={set:S,clear:E}},t=>{var r=TypeError;t.exports=function(t,i){if(t<i)throw r("Not enough arguments");return t}},(t,r,i)=>{var a=i(21);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(a)},(t,r,i)=>{var a,o,l,u,c,h=i(4),d=i(106),p=i(68).f,v=i(148).set,y=i(152),g=i(150),m=i(153),b=i(154),w=i(144),P=h.MutationObserver||h.WebKitMutationObserver,A=h.document,S=h.process,E=h.Promise,x=p(h,"queueMicrotask"),D=x&&x.value;if(!D){var k=new y,flush=function(){var t,r;w&&(t=S.domain)&&t.exit();for(;r=k.get();)try{r()}catch(t){k.head&&a();throw t}t&&t.enter()};if(g||w||b||!P||!A)if(!m&&E&&E.resolve){(u=E.resolve(void 0)).constructor=E;c=d(u.then,u);a=function(){c(flush)}}else if(w)a=function(){S.nextTick(flush)};else{v=d(v,h);a=function(){v(flush)}}else{o=!0;l=A.createTextNode("");new P(flush).observe(l,{characterData:!0});a=function(){l.data=o=!o}}D=function(t){k.head||a();k.add(t)}}t.exports=D},t=>{var Queue=function(){this.head=null;this.tail=null};Queue.prototype={add:function(t){var r={item:t,next:null},i=this.tail;i?i.next=r:this.head=r;this.tail=r},get:function(){var t=this.head;if(t){null===(this.head=t.next)&&(this.tail=null);return t.item}}};t.exports=Queue},(t,r,i)=>{var a=i(21);t.exports=/ipad|iphone|ipod/i.test(a)&&"undefined"!=typeof Pebble},(t,r,i)=>{var a=i(21);t.exports=/web0s(?!.*chrome)/i.test(a)},t=>{t.exports=function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}},t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},(t,r,i)=>{var a=i(4);t.exports=a.Promise},(t,r,i)=>{var a=i(4),o=i(157),l=i(28),u=i(78),c=i(73),h=i(13),d=i(159),p=i(160),v=i(15),y=i(20),g=o&&o.prototype,m=h("species"),b=!1,w=l(a.PromiseRejectionEvent),P=u("Promise",(function(){var t=c(o),r=t!==String(o);if(!r&&66===y)return!0;if(v&&(!g.catch||!g.finally))return!0;if(!y||y<51||!/native code/.test(t)){var i=new o((function(t){t(1)})),FakePromise=function(t){t((function(){}),(function(){}))};(i.constructor={})[m]=FakePromise;if(!(b=i.then((function(){}))instanceof FakePromise))return!0}return!r&&(d||p)&&!w}));t.exports={CONSTRUCTOR:P,REJECTION_EVENT:w,SUBCLASSING:b}},(t,r,i)=>{var a=i(160),o=i(144);t.exports=!a&&!o&&"object"==typeof window&&"object"==typeof document},t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(t,r,i)=>{var a=i(39),o=TypeError,PromiseCapability=function(t){var r,i;this.promise=new t((function(t,a){if(void 0!==r||void 0!==i)throw o("Bad Promise constructor");r=t;i=a}));this.resolve=a(r);this.reject=a(i)};t.exports.f=function(t){return new PromiseCapability(t)}},(t,r,i)=>{var a=i(67),o=i(34),l=i(39),u=i(161),c=i(156),h=i(163);a({target:"Promise",stat:!0,forced:i(168)},{all:function all(t){var r=this,i=u.f(r),a=i.resolve,d=i.reject,p=c((function(){var i=l(r.resolve),u=[],c=0,p=1;h(t,(function(t){var l=c++,h=!1;p++;o(i,r,t).then((function(t){if(!h){h=!0;u[l]=t;--p||a(u)}}),d)}));--p||a(u)}));p.error&&d(p.value);return i.promise}})},(t,r,i)=>{var a=i(106),o=i(34),l=i(31),u=i(40),c=i(164),h=i(55),d=i(37),p=i(165),v=i(166),y=i(167),g=TypeError,Result=function(t,r){this.stopped=t;this.result=r},m=Result.prototype;t.exports=function(t,r,i){var b,w,P,A,S,E,x,D=i&&i.that,k=!(!i||!i.AS_ENTRIES),C=!(!i||!i.IS_RECORD),T=!(!i||!i.IS_ITERATOR),I=!(!i||!i.INTERRUPTED),O=a(r,D),stop=function(t){b&&y(b,"normal",t);return new Result(!0,t)},callFn=function(t){if(k){l(t);return I?O(t[0],t[1],stop):O(t[0],t[1])}return I?O(t,stop):O(t)};if(C)b=t.iterator;else if(T)b=t;else{if(!(w=v(t)))throw g(u(t)+" is not iterable");if(c(w)){for(P=0,A=h(t);A>P;P++)if((S=callFn(t[P]))&&d(m,S))return S;return new Result(!1)}b=p(t,w)}E=C?t.next:b.next;for(;!(x=o(E,b)).done;){try{S=callFn(x.value)}catch(t){y(b,"throw",t)}if("object"==typeof S&&S&&d(m,S))return S}return new Result(!1)}},(t,r,i)=>{var a=i(13),o=i(61),l=a("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[l]===t)}},(t,r,i)=>{var a=i(34),o=i(39),l=i(31),u=i(40),c=i(166),h=TypeError;t.exports=function(t,r){var i=arguments.length<2?c(t):r;if(o(i))return l(a(i,t));throw h(u(t)+" is not iterable")}},(t,r,i)=>{var a=i(91),o=i(38),l=i(11),u=i(61),c=i(13)("iterator");t.exports=function(t){if(!l(t))return o(t,c)||o(t,"@@iterator")||u[a(t)]}},(t,r,i)=>{var a=i(34),o=i(31),l=i(38);t.exports=function(t,r,i){var u,c;o(t);try{if(!(u=l(t,"return"))){if("throw"===r)throw i;return i}u=a(u,t)}catch(t){c=!0;u=t}if("throw"===r)throw i;if(c)throw u;o(u);return i}},(t,r,i)=>{var a=i(157),o=i(169),l=i(158).CONSTRUCTOR;t.exports=l||!o((function(t){a.all(t).then(void 0,(function(){}))}))},(t,r,i)=>{var a=i(13)("iterator"),o=!1;try{var l=0,u={next:function(){return{done:!!l++}},return:function(){o=!0}};u[a]=function(){return this};Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,r){if(!r&&!o)return!1;var i=!1;try{var l={};l[a]=function(){return{next:function(){return{done:i=!0}}}};t(l)}catch(t){}return i}},(t,r,i)=>{var a=i(67),o=i(15),l=i(158).CONSTRUCTOR,u=i(157),c=i(36),h=i(28),d=i(70),p=u&&u.prototype;a({target:"Promise",proto:!0,forced:l,real:!0},{catch:function(t){return this.then(void 0,t)}});if(!o&&h(u)){var v=c("Promise").prototype.catch;p.catch!==v&&d(p,"catch",v,{unsafe:!0})}},(t,r,i)=>{var a=i(67),o=i(34),l=i(39),u=i(161),c=i(156),h=i(163);a({target:"Promise",stat:!0,forced:i(168)},{race:function race(t){var r=this,i=u.f(r),a=i.reject,d=c((function(){var u=l(r.resolve);h(t,(function(t){o(u,r,t).then(i.resolve,a)}))}));d.error&&a(d.value);return i.promise}})},(t,r,i)=>{var a=i(67),o=i(34),l=i(161);a({target:"Promise",stat:!0,forced:i(158).CONSTRUCTOR},{reject:function reject(t){var r=l.f(this);o(r.reject,void 0,t);return r.promise}})},(t,r,i)=>{var a=i(67),o=i(36),l=i(15),u=i(157),c=i(158).CONSTRUCTOR,h=i(174),d=o("Promise"),p=l&&!c;a({target:"Promise",stat:!0,forced:l||c},{resolve:function resolve(t){return h(p&&this===d?u:this,t)}})},(t,r,i)=>{var a=i(31),o=i(27),l=i(161);t.exports=function(t,r){a(t);if(o(r)&&r.constructor===t)return r;var i=l.f(t);(0,i.resolve)(r);return i.promise}},(t,r,i)=>{i(2)("asyncIterator")},(t,r,i)=>{var a=i(36),o=i(2),l=i(83);o("toStringTag");l(a("Symbol"),"Symbol")},(t,r,i)=>{var a=i(4);i(83)(a.JSON,"JSON",!0)},(t,r,i)=>{i(83)(Math,"Math",!0)},(t,r,i)=>{var a=i(67),o=i(9),l=i(55),u=i(180),c=i(181);a({target:"Array",proto:!0,arity:1,forced:i(8)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function push(t){var r=o(this),i=l(r),a=arguments.length;c(i+a);for(var h=0;h<a;h++){r[i]=arguments[h];i++}u(r,i);return i}})},(t,r,i)=>{var a=i(24),o=i(110),l=TypeError,u=Object.getOwnPropertyDescriptor,c=a&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=c?function(t,r){if(o(t)&&!u(t,"length").writable)throw l("Cannot set read only .length");return t.length=r}:function(t,r){return t.length=r}},t=>{var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},(t,r,i)=>{var a=i(4),o=i(96),l=i(97),u=i(183),c=i(64),handlePrototype=function(t){if(t&&t.forEach!==u)try{c(t,"forEach",u)}catch(r){t.forEach=u}};for(var h in o)o[h]&&handlePrototype(a[h]&&a[h].prototype);handlePrototype(l)},(t,r,i)=>{var a=i(105).forEach,o=i(184)("forEach");t.exports=o?[].forEach:function forEach(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}},(t,r,i)=>{var a=i(8);t.exports=function(t,r){var i=[][t];return!!i&&a((function(){i.call(null,r||function(){return 1},1)}))}},(t,r,i)=>{var a=i(67),o=i(110),l=i(111),u=i(27),c=i(52),h=i(55),d=i(43),p=i(102),v=i(13),y=i(186),g=i(117),m=y("slice"),b=v("species"),w=Array,P=Math.max;a({target:"Array",proto:!0,forced:!m},{slice:function slice(t,r){var i,a,v,y=d(this),m=h(y),A=c(t,m),S=c(void 0===r?m:r,m);if(o(y)){i=y.constructor;(l(i)&&(i===w||o(i.prototype))||u(i)&&null===(i=i[b]))&&(i=void 0);if(i===w||void 0===i)return g(y,A,S)}a=new(void 0===i?w:i)(P(S-A,0));for(v=0;A<S;A++,v++)A in y&&p(a,v,y[A]);a.length=v;return a}})},(t,r,i)=>{var a=i(8),o=i(13),l=i(20),u=o("species");t.exports=function(t){return l>=51||!a((function(){var r=[];(r.constructor={})[u]=function(){return{foo:1}};return 1!==r[t](Boolean).foo}))}},(t,r,i)=>{var a=i(67),o=i(9),l=i(49);a({target:"Object",stat:!0,forced:i(8)((function(){l(1)}))},{keys:function keys(t){return l(o(t))}})},(t,r,i)=>{var a=i(67),o=i(24),l=i(4),u=i(36),c=i(6),h=i(34),d=i(28),p=i(27),v=i(110),y=i(5),g=i(94),m=i(55),b=i(102),w=i(8),P=i(189),A=i(19),S=l.JSON,E=l.Number,x=l.SyntaxError,D=S&&S.parse,k=u("Object","keys"),C=Object.getOwnPropertyDescriptor,T=c("".charAt),I=c("".slice),O=c(/./.exec),M=c([].push),L=/^\d$/,R=/^[1-9]$/,G=/^(-|\d)$/,B=/^[\t\n\r ]$/,internalize=function(t,r,i,a){var o,l,u,c,d,g=t[r],b=a&&g===a.value,w=b&&"string"==typeof a.source?{source:a.source}:{};if(p(g)){var P=v(g),A=b?a.nodes:P?[]:{};if(P){o=A.length;u=m(g);for(c=0;c<u;c++)internalizeProperty(g,c,internalize(g,""+c,i,c<o?A[c]:void 0))}else{l=k(g);u=m(l);for(c=0;c<u;c++){d=l[c];internalizeProperty(g,d,internalize(g,d,i,y(A,d)?A[d]:void 0))}}}return h(i,t,r,g,w)},internalizeProperty=function(t,r,i){if(o){var a=C(t,r);if(a&&!a.configurable)return}void 0===i?delete t[r]:b(t,r,i)},Node=function(t,r,i,a){this.value=t;this.end=r;this.source=i;this.nodes=a},Context=function(t,r){this.source=t;this.index=r};Context.prototype={fork:function(t){return new Context(this.source,t)},parse:function(){var t=this.source,r=this.skip(B,this.index),i=this.fork(r),a=T(t,r);if(O(G,a))return i.number();switch(a){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw x('Unexpected character: "'+a+'" at: '+r)},node:function(t,r,i,a,o){return new Node(r,a,t?null:I(this.source,i,a),o)},object:function(){for(var t=this.source,r=this.index+1,i=!1,a={},o={};r<t.length;){r=this.until(['"',"}"],r);if("}"===T(t,r)&&!i){r++;break}var l=this.fork(r).string(),u=l.value;r=l.end;r=this.until([":"],r)+1;r=this.skip(B,r);l=this.fork(r).parse();b(o,u,l);b(a,u,l.value);r=this.until([",","}"],l.end);var c=T(t,r);if(","===c){i=!0;r++}else if("}"===c){r++;break}}return this.node(1,a,this.index,r,o)},array:function(){for(var t=this.source,r=this.index+1,i=!1,a=[],o=[];r<t.length;){r=this.skip(B,r);if("]"===T(t,r)&&!i){r++;break}var l=this.fork(r).parse();M(o,l);M(a,l.value);r=this.until([",","]"],l.end);if(","===T(t,r)){i=!0;r++}else if("]"===T(t,r)){r++;break}}return this.node(1,a,this.index,r,o)},string:function(){var t=this.index,r=P(this.source,this.index+1);return this.node(0,r.value,t,r.end)},number:function(){var t=this.source,r=this.index,i=r;"-"===T(t,i)&&i++;if("0"===T(t,i))i++;else{if(!O(R,T(t,i)))throw x("Failed to parse number at: "+i);i=this.skip(L,++i)}"."===T(t,i)&&(i=this.skip(L,++i));if("e"===T(t,i)||"E"===T(t,i)){i++;"+"!==T(t,i)&&"-"!==T(t,i)||i++;if(i===(i=this.skip(L,i)))throw x("Failed to parse number's exponent value at: "+i)}return this.node(0,E(I(t,r,i)),r,i)},keyword:function(t){var r=""+t,i=this.index,a=i+r.length;if(I(this.source,i,a)!==r)throw x("Failed to parse value at: "+i);return this.node(0,t,i,a)},skip:function(t,r){for(var i=this.source;r<i.length&&O(t,T(i,r));r++);return r},until:function(t,r){r=this.skip(B,r);for(var i=T(this.source,r),a=0;a<t.length;a++)if(t[a]===i)return r;throw x('Unexpected character: "'+i+'" at: '+r)}};var j=w((function(){var t,r="9007199254740993";D(r,(function(r,i,a){t=a.source}));return t!==r})),N=A&&!w((function(){return 1/D("-0 \t")!=-1/0}));a({target:"JSON",stat:!0,forced:j},{parse:function parse(t,r){return N&&!d(r)?D(t):function(t,r){t=g(t);var i=new Context(t,0,""),a=i.parse(),o=a.value,l=i.skip(B,a.end);if(l<t.length)throw x('Unexpected extra character: "'+T(t,l)+'" after the parsed data at: '+l);return d(r)?internalize({"":o},"",r,a):o}(t,r)}})},(t,r,i)=>{var a=i(6),o=i(5),l=SyntaxError,u=parseInt,c=String.fromCharCode,h=a("".charAt),d=a("".slice),p=a(/./.exec),v={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},y=/^[\da-f]{4}$/i,g=/^[\u0000-\u001F]$/;t.exports=function(t,r){for(var i=!0,a="";r<t.length;){var m=h(t,r);if("\\"===m){var b=d(t,r,r+2);if(o(v,b)){a+=v[b];r+=2}else{if("\\u"!==b)throw l('Unknown escape sequence: "'+b+'"');var w=d(t,r+=2,r+4);if(!p(y,w))throw l("Bad Unicode escape at: "+r);a+=c(u(w,16));r+=4}}else{if('"'===m){i=!1;r++;break}if(p(g,m))throw l("Bad control character in string literal at: "+r);a+=m;r++}}if(i)throw l("Unterminated string at: "+r);return{value:a,end:r}}},(t,r,i)=>{var a=i(67),o=i(8),l=i(9),u=i(81),c=i(82);a({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!c},{getPrototypeOf:function getPrototypeOf(t){return u(l(t))}})},(t,r,i)=>{i(1);i(175);i(176);i(177);i(178);i(190);i(182);i(185);i(192);i(187);i(195);i(196);i(197);Object.defineProperty(r,"__esModule",{value:!0});r.PDFViewerApplication=r.PDFPrintServiceFactory=r.DefaultExternalServices=void 0;i(126);i(88);i(142);i(135);i(136);i(98);i(120);i(138);i(198);i(199);i(200);i(204);i(206);i(212);i(216);i(179);i(42);i(92);i(95);i(217);i(219);i(220);i(222);i(115);i(224);i(225);i(232);i(233);i(234);i(235);i(236);i(238);var a=i(239),o=i(286),l=i(287),u=i(288),c=i(289),h=i(291),d=i(295),p=i(296),v=i(297),y=i(298),g=i(302),m=i(304),b=i(306),w=i(307),P=i(314),A=i(316),S=i(317),E=i(318),x=i(319),D=i(321),k=i(322),C=i(323),T=i(325),I=i(407),O=i(408),M=i(409);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var L=1e3,R=-1,G=1,B={AUTOMATIC:0,LIGHT:1,DARK:2},j=function(){function DefaultExternalServices(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DefaultExternalServices);throw new Error("Cannot initialize DefaultExternalServices.")}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(DefaultExternalServices,null,[{key:"updateFindControlState",value:function updateFindControlState(t){}},{key:"updateFindMatchesCount",value:function updateFindMatchesCount(t){}},{key:"initPassiveLoading",value:function initPassiveLoading(t){}},{key:"reportTelemetry",value:function reportTelemetry(t){}},{key:"createDownloadManager",value:function createDownloadManager(){throw new Error("Not implemented: createDownloadManager")}},{key:"createPreferences",value:function createPreferences(){throw new Error("Not implemented: createPreferences")}},{key:"createL10n",value:function createL10n(t){throw new Error("Not implemented: createL10n")}},{key:"createScripting",value:function createScripting(t){throw new Error("Not implemented: createScripting")}},{key:"supportsPinchToZoom",get:function get(){return(0,o.shadow)(this,"supportsPinchToZoom",!0)}},{key:"supportsIntegratedFind",get:function get(){return(0,o.shadow)(this,"supportsIntegratedFind",!1)}},{key:"supportsDocumentFonts",get:function get(){return(0,o.shadow)(this,"supportsDocumentFonts",!0)}},{key:"supportedMouseWheelZoomModifierKeys",get:function get(){return(0,o.shadow)(this,"supportedMouseWheelZoomModifierKeys",{ctrlKey:!0,metaKey:!0})}},{key:"isInAutomation",get:function get(){return(0,o.shadow)(this,"isInAutomation",!1)}},{key:"updateEditorStates",value:function updateEditorStates(t){throw new Error("Not implemented: updateEditorStates")}},{key:"canvasMaxAreaInBytes",get:function get(){return(0,o.shadow)(this,"canvasMaxAreaInBytes",-1)}},{key:"getNimbusExperimentData",value:function getNimbusExperimentData(){return(0,o.shadow)(this,"getNimbusExperimentData",Promise.resolve(null))}}]);return DefaultExternalServices}();r.DefaultExternalServices=j;var N={initialBookmark:document.location.hash.substring(1),_initializedCapability:new o.PromiseCapability,appConfig:null,pdfDocument:null,pdfLoadingTask:null,printService:null,pdfViewer:null,pdfThumbnailViewer:null,pdfRenderingQueue:null,pdfPresentationMode:null,pdfDocumentProperties:null,pdfLinkService:null,pdfHistory:null,pdfSidebar:null,pdfOutlineViewer:null,pdfAttachmentViewer:null,pdfLayerViewer:null,pdfCursorTools:null,pdfScriptingManager:null,store:null,downloadManager:null,overlayManager:null,preferences:null,toolbar:null,secondaryToolbar:null,eventBus:null,l10n:null,annotationEditorParams:null,isInitialViewSet:!1,downloadComplete:!1,isViewerEmbedded:window.parent!==window,url:"",baseUrl:"",_downloadUrl:"",externalServices:j,_boundEvents:Object.create(null),documentInfo:null,metadata:null,_contentDispositionFilename:null,_contentLength:null,_saveInProgress:!1,_wheelUnusedTicks:0,_wheelUnusedFactor:1,_touchUnusedTicks:0,_touchUnusedFactor:1,_PDFBug:null,_hasAnnotationEditors:!1,_title:document.title,_printAnnotationStoragePromise:null,_touchInfo:null,_isCtrlKeyDown:!1,_nimbusDataPromise:null,initialize:function initialize(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:r.preferences=r.externalServices.createPreferences();r.appConfig=t;a.next=4;return r._initializeOptions();case 4:r._forceCssTheme();a.next=7;return r._initializeL10n();case 7:r.isViewerEmbedded&&u.AppOptions.get("externalLinkTarget")===h.LinkTarget.NONE&&u.AppOptions.set("externalLinkTarget",h.LinkTarget.TOP);a.next=10;return r._initializeViewerComponents();case 10:r.bindEvents();r.bindWindowEvents();i=t.appContainer||document.documentElement;r.l10n.translate(i).then((function(){r.eventBus.dispatch("localized",{source:r})}));r._initializedCapability.resolve();r.initializeLoadingBar();case 16:case"end":return a.stop()}}),_callee)})))()},_initializeOptions:function _initializeOptions(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(!u.AppOptions.get("disablePreferences")){r.next=5;break}if(!u.AppOptions.get("pdfBugEnabled")){r.next=4;break}r.next=4;return t._parseHashParams();case 4:return r.abrupt("return");case 5:u.AppOptions._hasUserOptions()&&globalThis.ngxConsole.warn('_initializeOptions: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');r.prev=6;r.t0=u.AppOptions;r.next=10;return t.preferences.getAll();case 10:r.t1=r.sent;r.t0.setAll.call(r.t0,r.t1);r.next=17;break;case 14:r.prev=14;r.t2=r.catch(6);globalThis.ngxConsole.error('_initializeOptions: "'.concat(null===r.t2||void 0===r.t2?void 0:r.t2.message,'".'));case 17:if(!u.AppOptions.get("pdfBugEnabled")){r.next=20;break}r.next=20;return t._parseHashParams();case 20:case"end":return r.stop()}}),_callee2,null,[[6,14]])})))()},_parseHashParams:function _parseHashParams(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var r,i,o,l,c,h;return _regeneratorRuntime().wrap((function _callee3$(d){for(;;)switch(d.prev=d.next){case 0:if(r=document.location.hash.substring(1)){d.next=3;break}return d.abrupt("return");case 3:i=t.appConfig,o=i.mainContainer,l=i.viewerContainer;if("true"!==(c=(0,a.parseQueryString)(r)).get("disableworker")){d.next=13;break}d.prev=5;d.next=8;return loadFakeWorker();case 8:d.next=13;break;case 10:d.prev=10;d.t0=d.catch(5);console.error('_parseHashParams: "'.concat(d.t0.message,'".'));case 13:c.has("disablerange")&&u.AppOptions.set("disableRange","true"===c.get("disablerange"));c.has("disablestream")&&u.AppOptions.set("disableStream","true"===c.get("disablestream"));c.has("disableautofetch")&&u.AppOptions.set("disableAutoFetch","true"===c.get("disableautofetch"));c.has("disablefontface")&&u.AppOptions.set("disableFontFace","true"===c.get("disablefontface"));c.has("disablehistory")&&u.AppOptions.set("disableHistory","true"===c.get("disablehistory"));c.has("verbosity")&&u.AppOptions.set("verbosity",0|c.get("verbosity"));if(!c.has("textlayer")){d.next=36;break}d.t1=c.get("textlayer");d.next="off"===d.t1?23:"visible"===d.t1||"shadow"===d.t1||"hover"===d.t1?25:36;break;case 23:u.AppOptions.set("textLayerMode",a.TextLayerMode.DISABLE);return d.abrupt("break",36);case 25:l.classList.add("textLayer-".concat(c.get("textlayer")));d.prev=26;d.next=29;return loadPDFBug(t);case 29:t._PDFBug.loadCSS();d.next=35;break;case 32:d.prev=32;d.t2=d.catch(26);console.error('_parseHashParams: "'.concat(d.t2.message,'".'));case 35:return d.abrupt("break",36);case 36:if(!c.has("pdfbug")){d.next=49;break}u.AppOptions.set("pdfBug",!0);u.AppOptions.set("fontExtraProperties",!0);h=c.get("pdfbug").split(",");d.prev=40;d.next=43;return loadPDFBug(t);case 43:t._PDFBug.init(o,h);d.next=49;break;case 46:d.prev=46;d.t3=d.catch(40);console.error('_parseHashParams: "'.concat(d.t3.message,'".'));case 49:c.has("locale")&&u.AppOptions.set("locale",c.get("locale"));case 50:case"end":return d.stop()}}),_callee3,null,[[5,10],[26,32],[40,46]])})))()},_initializeL10n:function _initializeL10n(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var r;return _regeneratorRuntime().wrap((function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:t.l10n=t.externalServices.createL10n({locale:u.AppOptions.get("locale")});i.next=3;return t.l10n.getDirection();case 3:r=i.sent;document.getElementsByTagName("html")[0].dir=r;case 5:case"end":return i.stop()}}),_callee4)})))()},_forceCssTheme:function _forceCssTheme(){var t=u.AppOptions.get("viewerCssTheme");if(t!==B.AUTOMATIC&&Object.values(B).includes(t))try{for(var r=document.styleSheets[0],i=(null==r?void 0:r.cssRules)||[],a=0,o=i.length;a<o;a++){var l,c=i[a];if(c instanceof CSSMediaRule&&"(prefers-color-scheme: dark)"===(null===(l=c.media)||void 0===l?void 0:l[0])){if(t===B.LIGHT){r.deleteRule(a);return}var h=/^@media \(prefers-color-scheme: dark\) {\n\s*([\w\s-.,:;/\\{}()]+)\n}$/.exec(c.cssText);if(null!=h&&h[1]){r.deleteRule(a);r.insertRule(h[1],a)}return}}}catch(t){globalThis.ngxConsole.error('_forceCssTheme: "'.concat(null==t?void 0:t.message,'".'))}},_initializeViewerComponents:function _initializeViewerComponents(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var r,i,l,M,L,R,G,B,j,N,W,V,U,H,z,q,Y,K,X,$,Q,J,Z,ee,te,re,ne,ie;return _regeneratorRuntime().wrap((function _callee5$(ae){for(;;)switch(ae.prev=ae.next){case 0:B=t.appConfig,j=t.externalServices,N=t.l10n;W=j.isInAutomation?new c.AutomationEventBus:new c.EventBus;t.eventBus=W;t.overlayManager=new p.OverlayManager;(V=new x.PDFRenderingQueue).onIdle=t._cleanup.bind(t);t.pdfRenderingQueue=V;U=new h.PDFLinkService({eventBus:W,externalLinkTarget:u.AppOptions.get("externalLinkTarget"),externalLinkRel:u.AppOptions.get("externalLinkRel"),ignoreDestinationZoom:u.AppOptions.get("ignoreDestinationZoom")});t.pdfLinkService=U;H=j.createDownloadManager();t.downloadManager=H;z=new w.PDFFindController({linkService:U,eventBus:W,pageViewMode:u.AppOptions.get("pageViewMode"),updateMatchesCountOnProgress:!0});t.findController=z;q=new D.PDFScriptingManager({eventBus:W,sandboxBundleSrc:u.AppOptions.get("sandboxBundleSrc"),externalServices:j,docProperties:t._scriptingDocProperties.bind(t)});t.pdfScriptingManager=q;Y=B.mainContainer,K=B.viewerContainer;X=u.AppOptions.get("annotationEditorMode");$=u.AppOptions.get("isOffscreenCanvasSupported")&&o.FeatureTest.isOffscreenCanvasSupported;Q=u.AppOptions.get("forcePageColors")||window.matchMedia("(forced-colors: active)").matches?{background:u.AppOptions.get("pageColorsBackground"),foreground:u.AppOptions.get("pageColorsForeground")}:null;J=new T.PDFViewer({container:Y,viewer:K,eventBus:W,renderingQueue:V,linkService:U,downloadManager:H,findController:z,scriptingManager:u.AppOptions.get("enableScripting")&&q,l10n:N,textLayerMode:u.AppOptions.get("textLayerMode"),annotationMode:u.AppOptions.get("annotationMode"),annotationEditorMode:X,imageResourcesPath:u.AppOptions.get("imageResourcesPath"),removePageBorders:u.AppOptions.get("removePageBorders"),enablePrintAutoRotate:u.AppOptions.get("enablePrintAutoRotate"),isOffscreenCanvasSupported:$,maxCanvasPixels:u.AppOptions.get("maxCanvasPixels"),pageViewMode:u.AppOptions.get("pageViewMode"),enablePermissions:u.AppOptions.get("enablePermissions"),pageColors:Q});t.pdfViewer=J;V.setViewer(J);U.setViewer(J);q.setViewer(J);if(null!==(r=B.sidebar)&&void 0!==r&&r.thumbnailView){t.pdfThumbnailViewer=new C.PDFThumbnailViewer({container:B.sidebar.thumbnailView,eventBus:W,renderingQueue:V,linkService:U,l10n:N,pageColors:Q});V.setThumbnailViewer(t.pdfThumbnailViewer)}if(!t.isViewerEmbedded&&!u.AppOptions.get("disableHistory")){t.pdfHistory=new P.PDFHistory({linkService:U,eventBus:W});U.setHistory(t.pdfHistory)}!t.supportsIntegratedFind&&B.findBar&&(t.findBar=new b.PDFFindBar(B.findBar,W,N));if(B.annotationEditorParams)if(X!==o.AnnotationEditorType.DISABLE){u.AppOptions.get("enableStampEditor")&&$&&(null===(Z=B.toolbar)||void 0===Z||null===(Z=Z.editorStampButton)||void 0===Z||Z.classList.remove("hidden"));t.annotationEditorParams=new d.AnnotationEditorParams(B.annotationEditorParams,W)}else for(ee=0,te=["editorModeButtons","editorModeSeparator"];ee<te.length;ee++){ne=te[ee];null===(re=document.getElementById(ne))||void 0===re||re.classList.add("hidden")}B.documentProperties&&(t.pdfDocumentProperties=new m.PDFDocumentProperties(B.documentProperties,t.overlayManager,W,N,(function(){return t._docFilename})));null!==(i=B.secondaryToolbar)&&void 0!==i&&i.cursorHandToolButton&&(t.pdfCursorTools=new g.PDFCursorTools({container:Y,eventBus:W,cursorToolOnLoad:u.AppOptions.get("cursorToolOnLoad")}));B.toolbar&&(t.toolbar=new O.Toolbar(B.toolbar,W,N));B.secondaryToolbar&&(t.secondaryToolbar=new I.SecondaryToolbar(B.secondaryToolbar,W,j));t.supportsFullscreen&&(null!==(l=B.toolbar)&&void 0!==l&&l.presentationModeButton||null!==(M=B.secondaryToolbar)&&void 0!==M&&M.presentationModeButton)&&(t.pdfPresentationMode=new E.PDFPresentationMode({container:Y,pdfViewer:J,eventBus:W}));(ie=u.AppOptions.get("passwordPrompt"))||B.passwordOverlay&&(ie=new v.PasswordPrompt(B.passwordOverlay,t.overlayManager,N,t.isViewerEmbedded));t.passwordPrompt=ie;null!==(L=B.sidebar)&&void 0!==L&&L.outlineView&&(t.pdfOutlineViewer=new S.PDFOutlineViewer({container:B.sidebar.outlineView,eventBus:W,linkService:U,downloadManager:H}));null!==(R=B.sidebar)&&void 0!==R&&R.attachmentsView&&(t.pdfAttachmentViewer=new y.PDFAttachmentViewer({container:B.sidebar.attachmentsView,eventBus:W,downloadManager:H}));null!==(G=B.sidebar)&&void 0!==G&&G.layersView&&(t.pdfLayerViewer=new A.PDFLayerViewer({container:B.sidebar.layersView,eventBus:W,l10n:N}));if(B.sidebar){t.pdfSidebar=new k.PDFSidebar({elements:B.sidebar,eventBus:W,l10n:N});t.pdfSidebar.onToggled=t.forceRendering.bind(t);t.pdfSidebar.onUpdateThumbnails=function(){var r,i=_createForOfIteratorHelper(J.getCachedPageViews());try{for(i.s();!(r=i.n()).done;){var o=r.value;if(o.renderingState===a.RenderingStates.FINISHED){var l;null===(l=t.pdfThumbnailViewer.getThumbnail(o.id-1))||void 0===l||l.setImage(o)}}}catch(t){i.e(t)}finally{i.f()}t.pdfThumbnailViewer.scrollThumbnailIntoView(J.currentPageNumber)}}case 40:case"end":return ae.stop()}}),_callee5)})))()},run:function run(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var i,o,l,c,h,d,p,v,y,g,m;return _regeneratorRuntime().wrap((function _callee6$(b){for(;;)switch(b.prev=b.next){case 0:b.next=2;return r.initialize(t);case 2:o=r.appConfig,l=r.eventBus;h=document.location.search.substring(1);d=(0,a.parseQueryString)(h);c=null!==(i=d.get("file"))&&void 0!==i?i:u.AppOptions.get("defaultUrl");V(c);(p=o.openFileInput).value=null;p.addEventListener("change",(function(t){var r=t.target.files;r&&0!==r.length&&l.dispatch("fileinputchange",{source:this,fileInput:t.target})}));o.mainContainer.addEventListener("dragover",(function(t){if(u.AppOptions.get("enableDragAndDrop")){t.preventDefault();t.dataTransfer.dropEffect="copy"===t.dataTransfer.effectAllowed?"copy":"move"}}));o.mainContainer.addEventListener("drop",(function(t){t.preventDefault();var r=t.dataTransfer.files;r&&0!==r.length&&l.dispatch("fileinputchange",{source:this,fileInput:t.dataTransfer,dropEvent:t})}));if(!r.supportsDocumentFonts){u.AppOptions.set("disableFontFace",!0);r.l10n.get("web_fonts_disabled").then((function(t){console.warn(t)}))}if(!r.supportsPrinting){null===(v=o.toolbar)||void 0===v||null===(v=v.print)||void 0===v||v.classList.add("hidden");null===(y=o.secondaryToolbar)||void 0===y||y.printButton.classList.add("hidden")}if(!r.supportsFullscreen){o.toolbar.presentationModeButton.classList.add("hidden");null===(g=o.secondaryToolbar)||void 0===g||g.presentationModeButton.classList.add("hidden")}r.supportsIntegratedFind&&(null===(m=o.toolbar)||void 0===m||null===(m=m.viewFind)||void 0===m||m.classList.add("hidden"));o.mainContainer.addEventListener("transitionend",(function(t){t.target===this&&l.dispatch("resize",{source:this})}),!0);try{c?r.open({url:c}):r._hideViewBookmark()}catch(t){l10n.get("loading_error").then((function(i){r._documentError(i,t);N.onError&&N.onError(t)}))}case 18:case"end":return b.stop()}}),_callee6)})))()},get initialized(){return this._initializedCapability.settled},get initializedPromise(){return this._initializedCapability.promise},zoomIn:function zoomIn(t,r){this.pdfViewer.isInPresentationMode||this.pdfViewer.increaseScale({drawingDelay:u.AppOptions.get("defaultZoomDelay"),steps:t,scaleFactor:r})},zoomOut:function zoomOut(t,r){this.pdfViewer.isInPresentationMode||this.pdfViewer.decreaseScale({drawingDelay:u.AppOptions.get("defaultZoomDelay"),steps:t,scaleFactor:r})},zoomReset:function zoomReset(){this.pdfViewer.isInPresentationMode||(this.pdfViewer.currentScaleValue=a.DEFAULT_SCALE_VALUE)},get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0},get page(){return this.pdfViewer.currentPageNumber},set page(t){this.pdfViewer.currentPageNumber=t},get supportsPrinting(){return q.instance.supportsPrinting},get supportsFullscreen(){return(0,o.shadow)(this,"supportsFullscreen",document.fullscreenEnabled)},get supportsPinchToZoom(){return this.externalServices.supportsPinchToZoom},get supportsIntegratedFind(){return this.externalServices.supportsIntegratedFind},get supportsDocumentFonts(){return this.externalServices.supportsDocumentFonts},initializeLoadingBar:function initializeLoadingBar(){var t=document.getElementById("loadingBar"),r=t?new a.ProgressBar(t):null;null==r||r.hide();return(0,o.shadow)(this,"loadingBar",r)},get supportedMouseWheelZoomModifierKeys(){return this.externalServices.supportedMouseWheelZoomModifierKeys},initPassiveLoading:function initPassiveLoading(t){throw new Error("Not implemented: initPassiveLoading")},setTitleUsingUrl:function setTitleUsingUrl(){},setTitle:function setTitle(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._title;this._title=t;if(!this.isViewerEmbedded){var r=this._hasAnnotationEditors&&!this.pdfRenderingQueue.printing;document.title="".concat(r?"* ":"").concat(t)}},get _docFilename(){return this._contentDispositionFilename||(0,o.getPdfFilenameFromUrl)(this.url)},_hideViewBookmark:function _hideViewBookmark(){if(this.appConfig){var t=this.appConfig.secondaryToolbar;null==t||t.viewBookmarkButton.classList.add("hidden");if(null!=t&&t.presentationModeButton.classList.contains("hidden")){var r;null===(r=document.getElementById("viewBookmarkSeparator"))||void 0===r||r.classList.add("hidden")}}},close:function close(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee7(){var r,i,a,o,l,u,c,h,d,p,v,y,g;return _regeneratorRuntime().wrap((function _callee7$(m){for(;;)switch(m.prev=m.next){case 0:t._unblockDocumentLoadEvent();t._hideViewBookmark();if(t.pdfLoadingTask){m.next=4;break}return m.abrupt("return");case 4:if(!((null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage.size)>0&&t._annotationStorageModified)){m.next=12;break}m.prev=5;m.next=8;return t.save();case 8:m.next=12;break;case 10:m.prev=10;m.t0=m.catch(5);case 12:(v=[]).push(t.pdfLoadingTask.destroy());t.pdfLoadingTask=null;if(t.pdfDocument){t.pdfDocument=null;null===(y=t.pdfThumbnailViewer)||void 0===y||y.setDocument(null);t.pdfViewer.setDocument(null);t.pdfLinkService.setDocument(null);null===(g=t.pdfDocumentProperties)||void 0===g||g.setDocument(null)}t.pdfLinkService.externalLinkEnabled=!0;t.store=null;t.isInitialViewSet=!1;t.downloadComplete=!1;t.url="";t.baseUrl="";t._downloadUrl="";t.documentInfo=null;t.metadata=null;t._contentDispositionFilename=null;t._contentLength=null;t._saveInProgress=!1;t._hasAnnotationEditors=!1;v.push(t.pdfScriptingManager.destroyPromise,t.passwordPrompt.close());t.setTitle();null===(i=t.pdfSidebar)||void 0===i||i.reset();null===(a=t.pdfOutlineViewer)||void 0===a||a.reset();null===(o=t.pdfAttachmentViewer)||void 0===o||o.reset();null===(l=t.pdfLayerViewer)||void 0===l||l.reset();null===(u=t.pdfHistory)||void 0===u||u.reset();null===(c=t.findBar)||void 0===c||c.reset();null===(h=t.toolbar)||void 0===h||h.reset();null===(d=t.secondaryToolbar)||void 0===d||d.reset();null===(p=t._PDFBug)||void 0===p||p.cleanup();m.next=42;return Promise.all(v);case 42:case"end":return m.stop()}}),_callee7,null,[[5,10]])})))()},open:function open(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee9(){var i;return _regeneratorRuntime().wrap((function _callee9$(a){for(;;)switch(a.prev=a.next){case 0:window.adjacentPagesLoader=void 0;null===(i=r.pdfViewer)||void 0===i||i.destroyBookMode();window.ngxZone.runOutsideAngular(_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var i,a,l,c,h,d;return _regeneratorRuntime().wrap((function _callee8$(p){for(;;)switch(p.prev=p.next){case 0:a=!1;if("string"==typeof t){t={url:t};a=!0}else if(null!==(i=t)&&void 0!==i&&i.byteLength){t={data:t};a=!0}a&&console.error("The `PDFViewerApplication.open` signature was updated, please use an object instead.");if(!r.pdfLoadingTask){p.next=6;break}p.next=6;return r.close();case 6:l=u.AppOptions.getAll(u.OptionKind.WORKER);Object.assign(o.GlobalWorkerOptions,l);t.url&&r.setTitleUsingUrl(t.originalUrl||t.url,t.url);c=u.AppOptions.getAll(u.OptionKind.API);h=_objectSpread(_objectSpread({canvasMaxAreaInBytes:r.externalServices.canvasMaxAreaInBytes},c),t);d=(0,o.getDocument)(h);r.pdfLoadingTask=d;d.onPassword=function(t,i){r.isViewerEmbedded&&r._unblockDocumentLoadEvent();r.pdfLinkService.externalLinkEnabled=!1;r.passwordPrompt.setUpdateCallback(t,i);r.passwordPrompt.open()};d.onProgress=function(t){var i,a=t.loaded,o=t.total;r.progress(a/o);null===(i=r.eventBus)||void 0===i||i.dispatch("progress",{source:r,type:"load",total:o,loaded:a,percent:100*a/o})};return p.abrupt("return",d.promise.then((function(t){r.load(t)}),(function(t){if(d===r.pdfLoadingTask){var i="loading_error";t instanceof o.InvalidPDFException?i="invalid_file_error":t instanceof o.MissingPDFException?i="missing_file_error":t instanceof o.UnexpectedResponseException&&(i="unexpected_response_error");N.onError&&N.onError(t);return r.l10n.get(i).then((function(i){r._documentError(i,{message:null==t?void 0:t.message});throw t}))}})));case 16:case"end":return p.stop()}}),_callee8)}))));case 3:case"end":return a.stop()}}),_callee9)})))()},_ensureDownloadComplete:function _ensureDownloadComplete(){if(!this.pdfDocument||!this.downloadComplete)throw new Error("PDF document not downloaded.")},download:function download(){var t=arguments,r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(){var i,a,o,l,u;return _regeneratorRuntime().wrap((function _callee10$(c){for(;;)switch(c.prev=c.next){case 0:i=t.length>0&&void 0!==t[0]?t[0]:{};a=r._downloadUrl,o=r._docFilename;c.prev=2;r._ensureDownloadComplete();c.next=6;return r.pdfDocument.getData();case 6:l=c.sent;u=new Blob([l],{type:"application/pdf"});c.next=10;return r.downloadManager.download(u,a,o,i);case 10:c.next=16;break;case 12:c.prev=12;c.t0=c.catch(2);c.next=16;return r.downloadManager.downloadUrl(a,o,i);case 16:case"end":return c.stop()}}),_callee10,null,[[2,12]])})))()},save:function save(){var t=arguments,r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee11(){var i,a,o,l,u;return _regeneratorRuntime().wrap((function _callee11$(c){for(;;)switch(c.prev=c.next){case 0:i=t.length>0&&void 0!==t[0]?t[0]:{};if(!r._saveInProgress){c.next=3;break}return c.abrupt("return");case 3:r._saveInProgress=!0;c.next=6;return r.pdfScriptingManager.dispatchWillSave();case 6:a=r._downloadUrl,o=r._docFilename;c.prev=7;r._ensureDownloadComplete();c.next=11;return r.pdfDocument.saveDocument();case 11:l=c.sent;u=new Blob([l],{type:"application/pdf"});c.next=15;return r.downloadManager.download(u,a,o,i);case 15:c.next=22;break;case 17:c.prev=17;c.t0=c.catch(7);globalThis.ngxConsole.error("Error when saving the document: ".concat(c.t0.message));c.next=22;return r.download(i);case 22:c.prev=22;c.next=25;return r.pdfScriptingManager.dispatchDidSave();case 25:r._saveInProgress=!1;return c.finish(22);case 27:r._hasAnnotationEditors&&r.externalServices.reportTelemetry({type:"editing",data:{type:"save"}});case 28:case"end":return c.stop()}}),_callee11,null,[[7,17,22,27]])})))()},downloadOrSave:function downloadOrSave(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(null===(t=this.pdfDocument)||void 0===t?void 0:t.annotationStorage.size)>0?this.save(r):this.download(r)},_exportWithAnnotations:function _exportWithAnnotations(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee12(){var r,i;return _regeneratorRuntime().wrap((function _callee12$(a){for(;;)switch(a.prev=a.next){case 0:if(!t._saveInProgress){a.next=2;break}throw new Error("Already downloading");case 2:t._saveInProgress=!0;a.next=5;return t.pdfScriptingManager.dispatchWillSave();case 5:a.prev=5;t._ensureDownloadComplete();a.next=9;return t.pdfDocument.saveDocument();case 9:r=a.sent;i=new Blob([r],{type:"application/pdf"});return a.abrupt("return",i);case 14:a.prev=14;a.t0=a.catch(5);throw new Error("Error when saving the document: ".concat(a.t0.message));case 17:a.prev=17;a.next=20;return t.pdfScriptingManager.dispatchDidSave();case 20:t._saveInProgress=!1;return a.finish(17);case 22:case"end":return a.stop()}}),_callee12,null,[[5,14,17,22]])})))()},_exportWithoutAnnotations:function _exportWithoutAnnotations(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee13(){var r,i;return _regeneratorRuntime().wrap((function _callee13$(a){for(;;)switch(a.prev=a.next){case 0:a.prev=0;t._ensureDownloadComplete();a.next=4;return t.pdfDocument.getData();case 4:r=a.sent;i=new Blob([r],{type:"application/pdf"});return a.abrupt("return",i);case 9:a.prev=9;a.t0=a.catch(0);throw new Error("Error when saving the document: ".concat(a.t0.message));case 12:case"end":return a.stop()}}),_callee13,null,[[0,9]])})))()},export:function _export(){var t=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee14(){var r;return _regeneratorRuntime().wrap((function _callee14$(i){for(;;)switch(i.prev=i.next){case 0:if(!((null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage.size)>0)){i.next=2;break}return i.abrupt("return",t._exportWithAnnotations());case 2:return i.abrupt("return",t._exportWithoutAnnotations());case 3:case"end":return i.stop()}}),_callee14)})))()},openInExternalApp:function openInExternalApp(){this.downloadOrSave({openInExternalApp:!0})},_documentError:function _documentError(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._unblockDocumentLoadEvent();this._otherError(t,i);this.eventBus.dispatch("documenterror",{source:this,message:t,reason:null!==(r=null==i?void 0:i.message)&&void 0!==r?r:null})},_otherError:function _otherError(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=["PDF.js v".concat(o.version||"?"," (build: ").concat(o.build||"?",")")];if(r){i.push("Message: ".concat(r.message));if(r.stack)i.push("Stack: ".concat(r.stack));else{r.filename&&i.push("File: ".concat(r.filename));r.lineNumber&&i.push("Line: ".concat(r.lineNumber))}}console.error("".concat(t,"\n\n").concat(i.join("\n")))},progress:function progress(t){var r,i;if(this.loadingBar&&!this.downloadComplete){var a=Math.round(100*t);if(!(a<=this.loadingBar.percent)){this.loadingBar.percent=a;(null!==(r=null===(i=this.pdfDocument)||void 0===i?void 0:i.loadingParams.disableAutoFetch)&&void 0!==r?r:u.AppOptions.get("disableAutoFetch"))&&this.loadingBar.setDisableAutoFetch()}}},load:function load(t){var r,i,o,l,c=this;this.pdfDocument=t;t.getDownloadInfo().then((function(t){var r,i=t.length;c._contentLength=i;c.downloadComplete=!0;null===(r=c.loadingBar)||void 0===r||r.hide();y.then((function(){var t;null===(t=c.eventBus)||void 0===t||t.dispatch("documentloaded",{source:c})}))}));var h=t.getPageLayout().catch((function(){})),d=t.getPageMode().catch((function(){})),p=t.getOpenAction().catch((function(){}));null===(r=this.toolbar)||void 0===r||r.setPagesCount(t.numPages,!1);null===(i=this.secondaryToolbar)||void 0===i||i.setPagesCount(t.numPages);this.pdfLinkService.setDocument(t);null===(o=this.pdfDocumentProperties)||void 0===o||o.setDocument(t);var v=this.pdfViewer;v.setDocument(t);var y=v.firstPagePromise,g=v.onePageRendered,m=v.pagesPromise;null===(l=this.pdfThumbnailViewer)||void 0===l||l.setDocument(t);var b=(this.store=new M.ViewHistory(t.fingerprints[0])).getMultiple({page:null,zoom:a.DEFAULT_SCALE_VALUE,scrollLeft:"0",scrollTop:"0",rotation:null,sidebarView:a.SidebarView.UNKNOWN,scrollMode:a.ScrollMode.UNKNOWN,spreadMode:a.SpreadMode.UNKNOWN}).catch((function(){}));y.then((function(r){var i;null===(i=c.loadingBar)||void 0===i||i.setWidth(c.appConfig.viewerContainer);c._initializeAnnotationStorageCallbacks(t);Promise.all([a.animationStarted,b,h,d,p]).then(function(){var r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee15(r){var i,o,l,h,d,p,y,g,b,w,P,A,S,E;return _regeneratorRuntime().wrap((function _callee15$(x){for(;;)switch(x.prev=x.next){case 0:i=_slicedToArray(r,5),i[0],o=i[1],l=i[2],h=i[3],d=i[4];p=u.AppOptions.get("viewOnLoad");c._initializePdfHistory({fingerprint:t.fingerprints[0],viewOnLoad:p,initialDest:null==d?void 0:d.dest});y=c.initialBookmark;g=u.AppOptions.get("defaultZoomValue");b=g?"zoom=".concat(g):null;w=null;P=u.AppOptions.get("sidebarViewOnLoad");A=u.AppOptions.get("scrollModeOnLoad");S=u.AppOptions.get("spreadModeOnLoad");if(null!=o&&o.page&&p!==G){b="page=".concat(o.page,"&zoom=").concat(g||o.zoom,",")+"".concat(o.scrollLeft,",").concat(o.scrollTop);w=parseInt(o.rotation,10);P===a.SidebarView.UNKNOWN&&(P=0|o.sidebarView);A===a.ScrollMode.UNKNOWN&&(A=0|o.scrollMode);S===a.SpreadMode.UNKNOWN&&(S=0|o.spreadMode)}h&&P===a.SidebarView.UNKNOWN&&(P=(0,a.apiPageModeToSidebarView)(h));if(l&&A===a.ScrollMode.UNKNOWN&&S===a.SpreadMode.UNKNOWN){E=(0,a.apiPageLayoutToViewerModes)(l);S=E.spreadMode}c.setInitialView(b,{rotation:w,sidebarView:P,scrollMode:A,spreadMode:S});c.eventBus.dispatch("documentinit",{source:c});c.isViewerEmbedded||v.focus();x.next=18;return Promise.race([m,new Promise((function(t){setTimeout(t,10)}))]);case 18:if(y||b){x.next=20;break}return x.abrupt("return");case 20:if(!v.hasEqualPageSizes){x.next=22;break}return x.abrupt("return");case 22:c.initialBookmark=y;v.currentScaleValue=v.currentScaleValue;c.setInitialView(b);case 25:case"end":return x.stop()}}),_callee15)})));return function(t){return r.apply(this,arguments)}}()).catch((function(){c.setInitialView()})).then((function(){v.update()}))}));m.then((function(){c._unblockDocumentLoadEvent();c._initializeAutoPrint(t,p)}),(function(t){N.onError&&N.onError(t);c.l10n.get("loading_error").then((function(r){c._documentError(r,{message:null==t?void 0:t.message})}))}));g.then((function(r){c.externalServices.reportTelemetry({type:"pageInfo",timestamp:r.timestamp});c.pdfOutlineViewer&&t.getOutline().then((function(r){t===c.pdfDocument&&c.pdfOutlineViewer.render({outline:r,pdfDocument:t})}));c.pdfAttachmentViewer&&t.getAttachments().then((function(r){t===c.pdfDocument&&c.pdfAttachmentViewer.render({attachments:r})}));c.pdfLayerViewer&&v.optionalContentConfigPromise.then((function(r){t===c.pdfDocument&&c.pdfLayerViewer.render({optionalContentConfig:r,pdfDocument:t})}))}));this._initializePageLabels(t);this._initializeMetadata(t)},_scriptingDocProperties:function _scriptingDocProperties(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee16(){var i,a;return _regeneratorRuntime().wrap((function _callee16$(o){for(;;)switch(o.prev=o.next){case 0:if(r.documentInfo){o.next=5;break}o.next=3;return new Promise((function(t){r.eventBus._on("metadataloaded",t,{once:!0})}));case 3:if(t===r.pdfDocument){o.next=5;break}return o.abrupt("return",null);case 5:if(r._contentLength){o.next=10;break}o.next=8;return new Promise((function(t){r.eventBus._on("documentloaded",t,{once:!0})}));case 8:if(t===r.pdfDocument){o.next=10;break}return o.abrupt("return",null);case 10:return o.abrupt("return",_objectSpread(_objectSpread({},r.documentInfo),{},{baseURL:r.baseUrl,filesize:r._contentLength,filename:r._docFilename,metadata:null===(i=r.metadata)||void 0===i?void 0:i.getRaw(),authors:null===(a=r.metadata)||void 0===a?void 0:a.get("dc:creator"),numPages:r.pagesCount,URL:r.url}));case 11:case"end":return o.stop()}}),_callee16)})))()},_initializeAutoPrint:function _initializeAutoPrint(t,r){var i=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee17(){var o,l,u,c,h,d;return _regeneratorRuntime().wrap((function _callee17$(p){for(;;)switch(p.prev=p.next){case 0:p.next=2;return Promise.all([r,i.pdfViewer.enableScripting?null:t.getJSActions()]);case 2:o=p.sent;l=_slicedToArray(o,2);u=l[0];c=l[1];if(t===i.pdfDocument){p.next=8;break}return p.abrupt("return");case 8:h="Print"===(null==u?void 0:u.action);if(!c){p.next=23;break}globalThis.ngxConsole.warn("Warning: JavaScript support is not enabled");p.t0=_regeneratorRuntime().keys(c);case 12:if((p.t1=p.t0()).done){p.next=23;break}d=p.t1.value;if(!h){p.next=16;break}return p.abrupt("break",23);case 16:p.t2=d;p.next="WillClose"===p.t2||"WillSave"===p.t2||"DidSave"===p.t2||"WillPrint"===p.t2||"DidPrint"===p.t2?19:20;break;case 19:return p.abrupt("continue",12);case 20:h=c[d].some((function(t){return a.AutoPrintRegExp.test(t)}));p.next=12;break;case 23:h&&i.triggerPrinting();case 24:case"end":return p.stop()}}),_callee17)})))()},_initializeMetadata:function _initializeMetadata(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee18(){var i,a,u,c,h,d,p,v,y,g;return _regeneratorRuntime().wrap((function _callee18$(m){for(;;)switch(m.prev=m.next){case 0:m.next=2;return t.getMetadata();case 2:u=m.sent;c=u.info;h=u.metadata;d=u.contentDispositionFilename;p=u.contentLength;if(t===r.pdfDocument){m.next=9;break}return m.abrupt("return");case 9:r.documentInfo=c;r.metadata=h;null!==(i=r._contentDispositionFilename)&&void 0!==i||(r._contentDispositionFilename=d);null!==(a=r._contentLength)&&void 0!==a||(r._contentLength=p);(!(v=window.PDFViewerApplicationOptions)||v.get("verbosity")>0)&&globalThis.ngxConsole.log("PDF ".concat(t.fingerprints[0]," [").concat(c.PDFFormatVersion," ")+"".concat((c.Producer||"-").trim()," / ").concat((c.Creator||"-").trim(),"] ")+"(PDF.js: ".concat(o.version||"?"," [").concat(o.build||"?","])  modified by ngx-extended-pdf-viewer ").concat(l.ngxExtendedPdfViewerVersion));y=c.Title;(g=null==h?void 0:h.get("dc:title"))&&("Untitled"===g||/[\uFFF0-\uFFFF]/g.test(g)||(y=g));y?r.setTitle("".concat(y," - ").concat(r._contentDispositionFilename||r._title)):r._contentDispositionFilename&&r.setTitle(r._contentDispositionFilename);!c.IsXFAPresent||c.IsAcroFormPresent||t.isPureXfa?!c.IsAcroFormPresent&&!c.IsXFAPresent||r.pdfViewer.renderForms||console.warn("Warning: Interactive form support is not enabled"):t.loadingParams.enableXfa?globalThis.ngxConsole.warn("Warning: XFA Foreground documents are not supported"):globalThis.ngxConsole.warn("Warning: XFA support is not enabled");c.IsSignaturesPresent&&console.warn("Warning: Digital signatures validation is not supported");r.eventBus.dispatch("metadataloaded",{source:r});case 22:case"end":return m.stop()}}),_callee18)})))()},_initializePageLabels:function _initializePageLabels(t){var r=this;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee19(){var i,a,o,l,c,h,d,p,v;return _regeneratorRuntime().wrap((function _callee19$(y){for(;;)switch(y.prev=y.next){case 0:y.next=2;return t.getPageLabels();case 2:i=y.sent;if(t===r.pdfDocument){y.next=5;break}return y.abrupt("return");case 5:if(i&&!u.AppOptions.get("disablePageLabels")){y.next=7;break}return y.abrupt("return");case 7:a=i.length;o=0,l=0;c=0;case 10:if(!(c<a)){y.next=24;break}if((h=i[c])!==(c+1).toString()){y.next=16;break}o++;y.next=21;break;case 16:if(""!==h){y.next=20;break}l++;y.next=21;break;case 20:return y.abrupt("break",24);case 21:c++;y.next=10;break;case 24:if(!(o>=a||l>=a)){y.next=26;break}return y.abrupt("return");case 26:d=r.pdfViewer,p=r.pdfThumbnailViewer,v=r.toolbar;d.setPageLabels(i);null==p||p.setPageLabels(i);null==v||v.setPagesCount(a,!0);null==v||v.setPageNumber(d.currentPageNumber,d.currentPageLabel);case 31:case"end":return y.stop()}}),_callee19)})))()},_initializePdfHistory:function _initializePdfHistory(t){var r=t.fingerprint,i=t.viewOnLoad,a=t.initialDest,o=void 0===a?null:a;if(this.pdfHistory){this.pdfHistory.initialize({fingerprint:r,resetHistory:i===G,updateUrl:u.AppOptions.get("historyUpdateUrl")});if(this.pdfHistory.initialBookmark){this.initialBookmark=this.pdfHistory.initialBookmark;this.initialRotation=this.pdfHistory.initialRotation}if(o&&!this.initialBookmark&&i===R){this.initialBookmark=JSON.stringify(o);this.pdfHistory.push({explicitDest:o,pageNumber:null})}}},_initializeAnnotationStorageCallbacks:function _initializeAnnotationStorageCallbacks(t){var r=this;if(t===this.pdfDocument){var i=t.annotationStorage;i.onSetModified=function(){window.addEventListener("beforeunload",beforeUnload);r._annotationStorageModified=!0};i.onResetModified=function(){window.removeEventListener("beforeunload",beforeUnload);delete r._annotationStorageModified};i.onAnnotationEditor=function(t){r._hasAnnotationEditors=!!t;r.setTitle();t&&r.externalServices.reportTelemetry({type:"editing",data:{type:t}})}}},setInitialView:function setInitialView(t){var r,i,o,l=this,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=u.rotation,h=u.sidebarView,d=u.scrollMode,p=u.spreadMode,v=function setRotation(t){(0,a.isValidRotation)(t)&&(l.pdfViewer.pagesRotation=t)};this.isInitialViewSet=!0;null===(r=this.pdfSidebar)||void 0===r||r.setInitialView(h);!function setViewerModes(t,r){(0,a.isValidScrollMode)(t)&&(l.pdfViewer.scrollMode=t);(0,a.isValidSpreadMode)(r)&&(l.pdfViewer.spreadMode=r)}(d,p);if(this.initialBookmark){v(this.initialRotation);delete this.initialRotation;this.pdfLinkService.setHash(this.initialBookmark);this.initialBookmark=null}else if(t){v(c);this.pdfLinkService.setHash(t)}null===(i=this.toolbar)||void 0===i||i.setPageNumber(this.pdfViewer.currentPageNumber,this.pdfViewer.currentPageLabel);null===(o=this.secondaryToolbar)||void 0===o||o.setPageNumber(this.pdfViewer.currentPageNumber);if(!this.pdfViewer.currentScaleValue){var y=PDFViewerApplicationOptions.get("defaultZoomValue");y&&(this.pdfViewer.currentScaleValue=y)}},_cleanup:function _cleanup(){var t;if(this.pdfDocument){this.pdfViewer.cleanup();null===(t=this.pdfThumbnailViewer)||void 0===t||t.cleanup();this.pdfDocument.cleanup()}},forceRendering:function forceRendering(){var t;this.pdfRenderingQueue.printing=!!this.printService;this.pdfRenderingQueue.isThumbnailViewEnabled=(null===(t=this.pdfSidebar)||void 0===t?void 0:t.visibleView)===a.SidebarView.THUMBS;this.pdfRenderingQueue.renderHighestPriority()},beforePrint:function beforePrint(){var t=this;this._printAnnotationStoragePromise=this.pdfScriptingManager.dispatchWillPrint().catch((function(){})).then((function(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage.print}));if(!this.printService)if(this.supportsPrinting)if(this.pdfViewer.pageViewsReady){var r=this.pdfViewer.getPagesOverview(),i=this.appConfig.printContainer,a=u.AppOptions.get("printResolution"),o=this.pdfViewer.optionalContentConfigPromise,l=q.instance.createPrintService(this.pdfDocument,r,i,a,o,this._printAnnotationStoragePromise,this.l10n,this.pdfViewer.eventBus);this.printService=l;this.forceRendering();this.setTitle();l.layout();this._hasAnnotationEditors&&this.externalServices.reportTelemetry({type:"editing",data:{type:"print"}})}else this.l10n.get("printing_not_ready").then((function(t){window.alert(t)}));else this.l10n.get("printing_not_supported").then((function(r){t._otherError(r)}))},afterPrint:function afterPrint(){var t=this;if(this._printAnnotationStoragePromise){this._printAnnotationStoragePromise.then((function(){t.pdfScriptingManager.dispatchDidPrint()}));this._printAnnotationStoragePromise=null}if(this.printService){var r;this.printService.destroy();this.printService=null;null===(r=this.pdfDocument)||void 0===r||r.annotationStorage.resetModified()}this.forceRendering();this.setTitle()},rotatePages:function rotatePages(t){this.pdfViewer.pagesRotation+=t},requestPresentationMode:function requestPresentationMode(){var t;null===(t=this.pdfPresentationMode)||void 0===t||t.request()},triggerPrinting:function triggerPrinting(){this.supportsPrinting&&window.printPDF()},bindEvents:function bindEvents(){var t=this.eventBus,r=this._boundEvents;r.beforePrint=this.beforePrint.bind(this);r.afterPrint=this.afterPrint.bind(this);t._on("resize",webViewerResize);t._on("hashchange",webViewerHashchange);t._on("beforeprint",r.beforePrint);t._on("afterprint",r.afterPrint);t._on("pagerender",webViewerPageRender);t._on("pagerendered",webViewerPageRendered);t._on("updateviewarea",webViewerUpdateViewarea);t._on("pagechanging",webViewerPageChanging);t._on("scalechanging",webViewerScaleChanging);t._on("rotationchanging",webViewerRotationChanging);t._on("sidebarviewchanged",webViewerSidebarViewChanged);t._on("pagemode",webViewerPageMode);t._on("namedaction",webViewerNamedAction);t._on("presentationmodechanged",webViewerPresentationModeChanged);t._on("presentationmode",webViewerPresentationMode);t._on("switchannotationeditormode",webViewerSwitchAnnotationEditorMode);t._on("switchannotationeditorparams",webViewerSwitchAnnotationEditorParams);t._on("print",webViewerPrint);t._on("download",webViewerDownload);t._on("openinexternalapp",webViewerOpenInExternalApp);t._on("firstpage",webViewerFirstPage);t._on("lastpage",webViewerLastPage);t._on("nextpage",webViewerNextPage);t._on("previouspage",webViewerPreviousPage);t._on("zoomin",webViewerZoomIn);t._on("zoomout",webViewerZoomOut);t._on("zoomreset",webViewerZoomReset);t._on("pagenumberchanged",webViewerPageNumberChanged);t._on("scalechanged",webViewerScaleChanged);t._on("rotatecw",webViewerRotateCw);t._on("rotateccw",webViewerRotateCcw);t._on("optionalcontentconfig",webViewerOptionalContentConfig);t._on("switchscrollmode",webViewerSwitchScrollMode);t._on("scrollmodechanged",webViewerScrollModeChanged);t._on("switchspreadmode",webViewerSwitchSpreadMode);t._on("spreadmodechanged",webViewerSpreadModeChanged);t._on("documentproperties",webViewerDocumentProperties);t._on("findfromurlhash",webViewerFindFromUrlHash);t._on("updatefindmatchescount",webViewerUpdateFindMatchesCount);t._on("updatefindcontrolstate",webViewerUpdateFindControlState);if(u.AppOptions.get("pdfBug")){r.reportPageStatsPDFBug=reportPageStatsPDFBug;t._on("pagerendered",r.reportPageStatsPDFBug);t._on("pagechanging",r.reportPageStatsPDFBug)}t._on("fileinputchange",U);t._on("openfile",H)},bindWindowEvents:function bindWindowEvents(){var t=this.eventBus,r=this._boundEvents;!function addWindowResolutionChange(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&function webViewerResolutionChange(t){N.pdfViewer.refresh()}();var i=window.matchMedia("(resolution: ".concat(window.devicePixelRatio||1,"dppx)"));i.addEventListener("change",addWindowResolutionChange,{once:!0});r.removeWindowResolutionChange||(r.removeWindowResolutionChange=function(){i.removeEventListener("change",addWindowResolutionChange);r.removeWindowResolutionChange=null})}();r.windowResize=function(){t.dispatch("resize",{source:window})};r.windowHashChange=function(){t.dispatch("hashchange",{source:window,hash:document.location.hash.substring(1)})};r.windowBeforePrint=function(){t.dispatch("beforeprint",{source:window})};r.windowAfterPrint=function(){t.dispatch("afterprint",{source:window})};r.windowUpdateFromSandbox=function(r){t.dispatch("updatefromsandbox",{source:window,detail:r.detail})};window.addEventListener("visibilitychange",webViewerVisibilityChange);var i=document.getElementById("viewerContainer");null==i||i.addEventListener("wheel",webViewerWheel,{passive:!1});var a=document.getElementById("mainContainer");null==a||a.addEventListener("touchstart",webViewerTouchStart,{passive:!1});null==a||a.addEventListener("touchmove",webViewerTouchMove,{passive:!1});null==a||a.addEventListener("touchend",webViewerTouchEnd,{passive:!1});window.addEventListener("click",webViewerClick);window.addEventListener("keydown",webViewerKeyDown);window.addEventListener("keyup",webViewerKeyUp);window.addEventListener("resize",r.windowResize);window.addEventListener("hashchange",r.windowHashChange);window.addEventListener("beforeprint",r.windowBeforePrint);window.addEventListener("afterprint",r.windowAfterPrint);window.addEventListener("updatefromsandbox",r.windowUpdateFromSandbox)},unbindEvents:function unbindEvents(){var t=this.eventBus,r=this._boundEvents;t._off("resize",webViewerResize);t._off("hashchange",webViewerHashchange);t._off("beforeprint",r.beforePrint);t._off("afterprint",r.afterPrint);t._off("pagerender",webViewerPageRender);t._off("pagerendered",webViewerPageRendered);t._off("updateviewarea",webViewerUpdateViewarea);t._off("pagechanging",webViewerPageChanging);t._off("scalechanging",webViewerScaleChanging);t._off("rotationchanging",webViewerRotationChanging);t._off("sidebarviewchanged",webViewerSidebarViewChanged);t._off("pagemode",webViewerPageMode);t._off("namedaction",webViewerNamedAction);t._off("presentationmodechanged",webViewerPresentationModeChanged);t._off("presentationmode",webViewerPresentationMode);t._off("print",webViewerPrint);t._off("download",webViewerDownload);t._off("openinexternalapp",webViewerOpenInExternalApp);t._off("firstpage",webViewerFirstPage);t._off("lastpage",webViewerLastPage);t._off("nextpage",webViewerNextPage);t._off("previouspage",webViewerPreviousPage);t._off("zoomin",webViewerZoomIn);t._off("zoomout",webViewerZoomOut);t._off("zoomreset",webViewerZoomReset);t._off("pagenumberchanged",webViewerPageNumberChanged);t._off("scalechanged",webViewerScaleChanged);t._off("rotatecw",webViewerRotateCw);t._off("rotateccw",webViewerRotateCcw);t._off("optionalcontentconfig",webViewerOptionalContentConfig);t._off("switchscrollmode",webViewerSwitchScrollMode);t._off("scrollmodechanged",webViewerScrollModeChanged);t._off("switchspreadmode",webViewerSwitchSpreadMode);t._off("spreadmodechanged",webViewerSpreadModeChanged);t._off("documentproperties",webViewerDocumentProperties);t._off("findfromurlhash",webViewerFindFromUrlHash);t._off("updatefindmatchescount",webViewerUpdateFindMatchesCount);t._off("updatefindcontrolstate",webViewerUpdateFindControlState);if(r.reportPageStatsPDFBug){t._off("pagerendered",r.reportPageStatsPDFBug);t._off("pagechanging",r.reportPageStatsPDFBug);r.reportPageStatsPDFBug=null}t._off("fileinputchange",U);t._off("openfile",H);r.beforePrint=null;r.afterPrint=null},unbindWindowEvents:function unbindWindowEvents(){var t,r=this._boundEvents;window.removeEventListener("visibilitychange",webViewerVisibilityChange);window.removeEventListener("wheel",webViewerWheel,{passive:!1});var i=document.getElementById("mainContainer");if(i){i.removeEventListener("touchstart",webViewerTouchStart,{passive:!1});i.removeEventListener("touchmove",webViewerTouchMove,{passive:!1});i.removeEventListener("touchend",webViewerTouchEnd,{passive:!1})}window.removeEventListener("click",webViewerClick);window.removeEventListener("keydown",webViewerKeyDown);window.removeEventListener("keyup",webViewerKeyUp);window.removeEventListener("resize",r.windowResize);window.removeEventListener("hashchange",r.windowHashChange);window.removeEventListener("beforeprint",r.windowBeforePrint);window.removeEventListener("afterprint",r.windowAfterPrint);window.removeEventListener("updatefromsandbox",r.windowUpdateFromSandbox);null===(t=r.removeWindowResolutionChange)||void 0===t||t.call(r);r.windowResize=null;r.windowHashChange=null;r.windowBeforePrint=null;r.windowAfterPrint=null;r.windowUpdateFromSandbox=null},_accumulateTicks:function _accumulateTicks(t,r){(this[r]>0&&t<0||this[r]<0&&t>0)&&(this[r]=0);this[r]+=t;var i=Math.trunc(this[r]);this[r]-=i;return i},_accumulateFactor:function _accumulateFactor(t,r,i){if(1===r)return 1;(this[i]>1&&r<1||this[i]<1&&r>1)&&(this[i]=1);var a=Math.floor(t*r*this[i]*100)/(100*t);this[i]=r/a;return a},_centerAtPos:function _centerAtPos(t,r,i){var a=this.pdfViewer,o=a.currentScale/t-1;if(0!==o){var l=_slicedToArray(a.containerTopLeft,2),u=l[0],c=l[1];a.container.scrollLeft+=(r-c)*o;a.container.scrollTop+=(i-u)*o}},_unblockDocumentLoadEvent:function _unblockDocumentLoadEvent(){var t,r;null===(t=(r=document).blockUnblockOnload)||void 0===t||t.call(r,!1);this._unblockDocumentLoadEvent=function(){}},get scriptingReady(){return this.pdfScriptingManager.ready}};r.PDFViewerApplication=N;var W=["null","http://mozilla.github.io","https://mozilla.github.io"],V=function validateFileURL(t){if(t)try{var r=new URL(window.location.href).origin||"null";if(W.includes(r))return;if(new URL(t,window.location.href).origin!==r)throw new Error("file origin does not match viewer's")}catch(t){N.onError&&N.onError(t);N.l10n.get("loading_error").then((function(r){N._documentError(r,{message:null==t?void 0:t.message})}));throw t}};function loadFakeWorker(){return _loadFakeWorker.apply(this,arguments)}function _loadFakeWorker(){return(_loadFakeWorker=_asyncToGenerator(_regeneratorRuntime().mark((function _callee20(){return _regeneratorRuntime().wrap((function _callee20$(t){for(;;)switch(t.prev=t.next){case 0:o.GlobalWorkerOptions.workerSrc||(o.GlobalWorkerOptions.workerSrc=u.AppOptions.get("workerSrc"));"Function"===o.GlobalWorkerOptions.workerSrc.constructor.name&&(o.GlobalWorkerOptions.workerSrc=o.GlobalWorkerOptions.workerSrc());t.next=4;return(0,o.loadScript)(o.PDFWorker.workerSrc);case 4:case"end":return t.stop()}}),_callee20)})))).apply(this,arguments)}function loadPDFBug(t){return _loadPDFBug.apply(this,arguments)}function _loadPDFBug(){return(_loadPDFBug=_asyncToGenerator(_regeneratorRuntime().mark((function _callee21(t){return _regeneratorRuntime().wrap((function _callee21$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee21)})))).apply(this,arguments)}function reportPageStatsPDFBug(t){var r,i,a=t.pageNumber;if(null!==(r=globalThis.Stats)&&void 0!==r&&r.enabled){var o=N.pdfViewer.getPageView(a-1);globalThis.Stats.add(a,null==o||null===(i=o.pdfPage)||void 0===i?void 0:i.stats)}}function webViewerPageRender(t){if(t.pageNumber===N.page){var r;null===(r=N.toolbar)||void 0===r||r.updateLoadingIndicatorState(!0)}}function webViewerPageRendered(t){var r,i=t.pageNumber,o=t.error;if(i===N.page){var l;null===(l=N.toolbar)||void 0===l||l.updateLoadingIndicatorState(!1)}if((null===(r=N.pdfSidebar)||void 0===r?void 0:r.visibleView)===a.SidebarView.THUMBS){var u,c=N.pdfViewer.getPageView(i-1),h=null===(u=N.pdfThumbnailViewer)||void 0===u?void 0:u.getThumbnail(i-1);c&&(null==h||h.setImage(c))}o&&N.l10n.get("rendering_error").then((function(t){N._otherError(t,o)}))}function webViewerPageMode(t){var r,i,o=t.mode;switch(o){case"thumbs":i=a.SidebarView.THUMBS;break;case"bookmarks":case"outline":i=a.SidebarView.OUTLINE;break;case"attachments":i=a.SidebarView.ATTACHMENTS;break;case"layers":i=a.SidebarView.LAYERS;break;case"none":i=a.SidebarView.NONE;break;default:globalThis.ngxConsole.error('Invalid "pagemode" hash parameter: '+o);return}null===(r=N.pdfSidebar)||void 0===r||r.switchView(i,!0)}function webViewerNamedAction(t){var r;switch(t.action){case"GoToPage":null===(r=N.appConfig.toolbar)||void 0===r||r.pageNumber.select();break;case"Find":N.supportsIntegratedFind||null==N||N.findBar.toggle();break;case"Print":N.triggerPrinting();break;case"SaveAs":N.downloadOrSave()}}function webViewerPresentationModeChanged(t){N.pdfViewer.presentationModeState=t.state}function webViewerSidebarViewChanged(t){var r=t.view;N.pdfRenderingQueue.isThumbnailViewEnabled=r===a.SidebarView.THUMBS;if(N.isInitialViewSet){var i;null===(i=N.store)||void 0===i||i.set("sidebarView",r).catch((function(){}))}}function webViewerUpdateViewarea(t){var r=t.location;if(N.isInitialViewSet){var i,a={};void 0===r.pageNumber&&null===r.pageNumber||(a.page=r.pageNumber);r.scale&&(a.zoom=r.scale);r.left&&(a.scrollLeft=r.left);r.top&&(a.scrollTop=r.top);void 0===r.rotation&&null===r.rotation||(a.rotation=r.rotation);null===(i=N.store)||void 0===i||i.setMultiple(a).catch((function(){}))}if(N.appConfig.secondaryToolbar){var o=N.pdfLinkService.getAnchorUrl(r.pdfOpenParams);N.appConfig.secondaryToolbar.viewBookmarkButton.href=o}}function webViewerScrollModeChanged(t){if(N.isInitialViewSet&&!N.pdfViewer.isInPresentationMode){var r;null===(r=N.store)||void 0===r||r.set("scrollMode",t.mode).catch((function(){}))}}function webViewerSpreadModeChanged(t){if(N.isInitialViewSet&&!N.pdfViewer.isInPresentationMode){var r;null===(r=N.store)||void 0===r||r.set("spreadMode",t.mode).catch((function(){}))}}function webViewerResize(){var t=N.pdfDocument,r=N.pdfViewer;if((!N.pdfRenderingQueue.printing||!window.matchMedia("print").matches)&&t){var i=r.currentScaleValue;"auto"!==i&&"page-fit"!==i&&"page-width"!==i||(r.currentScaleValue=i);r.update()}}function webViewerHashchange(t){var r,i=t.hash;i&&(N.isInitialViewSet?null!==(r=N.pdfHistory)&&void 0!==r&&r.popStateInProgress||N.pdfLinkService.setHash(i):N.initialBookmark=i)}var U=function webViewerFileInputChange(t){var r;if(null===(r=N.pdfViewer)||void 0===r||!r.isInPresentationMode){var i=t.fileInput.files[0];N.open({url:URL.createObjectURL(i),originalUrl:i.name});if(globalThis.setNgxExtendedPdfViewerSource){var a;globalThis.setNgxExtendedPdfViewerSource(null!==(a=i.name)&&void 0!==a?a:URL.createObjectURL(i))}}},H=function webViewerOpenFile(t){N.appConfig.openFileInput.click()};function webViewerPresentationMode(){N.requestPresentationMode()}function webViewerSwitchAnnotationEditorMode(t){N.pdfViewer.annotationEditorMode=t}function webViewerSwitchAnnotationEditorParams(t){N.pdfViewer.annotationEditorParams=t}function webViewerPrint(){N.triggerPrinting()}function webViewerDownload(){N.downloadOrSave()}function webViewerOpenInExternalApp(){N.openInExternalApp()}function webViewerFirstPage(){N.page=1}function webViewerLastPage(){N.page=N.pagesCount}function webViewerNextPage(){N.pdfViewer.nextPage()}function webViewerPreviousPage(){N.pdfViewer.previousPage()}function webViewerZoomIn(){N.zoomIn()}function webViewerZoomOut(){N.zoomOut()}function webViewerZoomReset(){N.zoomReset()}function webViewerPageNumberChanged(t){var r=N.pdfViewer;""!==t.value&&N.pdfLinkService.goToPage(t.value);if(t.value!==r.currentPageNumber.toString()&&t.value!==r.currentPageLabel){var i;null===(i=N.toolbar)||void 0===i||i.setPageNumber(r.currentPageNumber,r.currentPageLabel)}}function webViewerScaleChanged(t){N.pdfViewer.currentScaleValue=t.value}function webViewerRotateCw(){N.rotatePages(90)}function webViewerRotateCcw(){N.rotatePages(-90)}function webViewerOptionalContentConfig(t){N.pdfViewer.optionalContentConfigPromise=t.promise}function webViewerSwitchScrollMode(t){N.pdfViewer.scrollMode=t.mode}function webViewerSwitchSpreadMode(t){N.pdfViewer.spreadMode=t.mode}function webViewerDocumentProperties(){var t;null===(t=N.pdfDocumentProperties)||void 0===t||t.open()}function webViewerFindFromUrlHash(t){N.eventBus.dispatch("find",{source:t.source,type:"",query:t.query,caseSensitive:!1,entireWord:!1,highlightAll:!0,findPrevious:!1,matchDiacritics:!0})}function webViewerUpdateFindMatchesCount(t){var r=t.matchesCount;N.supportsIntegratedFind?N.externalServices.updateFindMatchesCount(r):N.findBar.updateResultsCount(r)}function webViewerUpdateFindControlState(t){var r=t.state,i=t.previous,a=t.matchesCount,o=t.rawQuery;if(N.supportsIntegratedFind)N.externalServices.updateFindControlState({result:r,findPrevious:i,matchesCount:a,rawQuery:o});else{var l;null===(l=N.findBar)||void 0===l||l.updateUIState(r,i,a)}}function webViewerScaleChanging(t){var r;null===(r=N.toolbar)||void 0===r||r.setPageScale(t.presetValue,t.scale);N.pdfViewer.update()}function webViewerRotationChanging(t){N.pdfThumbnailViewer&&(N.pdfThumbnailViewer.pagesRotation=t.pagesRotation);N.forceRendering();N.pdfViewer.currentPageNumber=t.pageNumber}function webViewerPageChanging(t){var r,i,o,l,u=t.pageNumber,c=t.pageLabel;null===(r=N.toolbar)||void 0===r||r.setPageNumber(u,c);null===(i=N.secondaryToolbar)||void 0===i||i.setPageNumber(u);if((null===(o=N.pdfSidebar)||void 0===o?void 0:o.visibleView)===a.SidebarView.THUMBS){var h;null===(h=N.pdfThumbnailViewer)||void 0===h||h.scrollThumbnailIntoView(u)}var d=N.pdfViewer.getPageView(u-1);null===(l=N.toolbar)||void 0===l||l.updateLoadingIndicatorState((null==d?void 0:d.renderingState)===a.RenderingStates.RUNNING);var p=document.getElementById("pageNumber");if(p){var v=new CustomEvent("page-change");p.dispatchEvent(v)}}function webViewerVisibilityChange(t){"visible"===document.visibilityState&&setZoomDisabledTimeout()}var z=null;function setZoomDisabledTimeout(){z&&clearTimeout(z);z=setTimeout((function(){z=null}),L)}function webViewerWheel(t){var r=document.getElementById("viewerContainer");if(r.parentNode.querySelector(":hover")===r){var i=N.pdfViewer,o=N.supportedMouseWheelZoomModifierKeys,l=N.supportsPinchToZoom;if(!i.isInPresentationMode){var u=(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0);if(!window.isKeyIgnored||!window.isKeyIgnored(u,"WHEEL")){var c=t.deltaMode,h=Math.exp(-t.deltaY/100),d=t.ctrlKey&&!N._isCtrlKeyDown&&c===WheelEvent.DOM_DELTA_PIXEL&&0===t.deltaX&&(Math.abs(h-1)<.05||!1)&&0===t.deltaZ;if(d||t.ctrlKey&&o.ctrlKey||t.metaKey&&o.metaKey){t.preventDefault();if(z||"hidden"===document.visibilityState)return;var p=i.currentScale;if(d&&l)if((h=N._accumulateFactor(p,h,"_wheelUnusedFactor"))<1)N.zoomOut(null,h);else{if(!(h>1))return;N.zoomIn(null,h)}else{var v=(0,a.normalizeWheelEventDirection)(t),y=0;if(c===WheelEvent.DOM_DELTA_LINE||c===WheelEvent.DOM_DELTA_PAGE)y=Math.abs(v)>=1?Math.sign(v):N._accumulateTicks(v,"_wheelUnusedTicks");else{y=N._accumulateTicks(v/30,"_wheelUnusedTicks")}if(y<0)N.zoomOut(-y);else{if(!(y>0))return;N.zoomIn(y)}}N._centerAtPos(p,t.clientX,t.clientY)}else setZoomDisabledTimeout()}}}}function webViewerTouchStart(t){if(!(N.pdfViewer.isInPresentationMode||t.touches.length<2)){t.preventDefault();if(2===t.touches.length){var r=_slicedToArray(t.touches,2),i=r[0],a=r[1];if(i.identifier>a.identifier){var o=[a,i];i=o[0];a=o[1]}N._touchInfo={touch0X:i.pageX,touch0Y:i.pageY,touch1X:a.pageX,touch1Y:a.pageY}}else N._touchInfo=null}}function webViewerTouchMove(t){if(N._touchInfo&&2===t.touches.length){var r=N.pdfViewer,i=N._touchInfo,a=N.supportsPinchToZoom,o=_slicedToArray(t.touches,2),l=o[0],u=o[1];if(l.identifier>u.identifier){var c=[u,l];l=c[0];u=c[1]}var h=l,d=h.pageX,p=h.pageY,v=u,y=v.pageX,g=v.pageY,m=i.touch0X,b=i.touch0Y,w=i.touch1X,P=i.touch1Y;if(!(Math.abs(m-d)<=1&&Math.abs(b-p)<=1&&Math.abs(w-y)<=1&&Math.abs(P-g)<=1)){i.touch0X=d;i.touch0Y=p;i.touch1X=y;i.touch1Y=g;if(m===d&&b===p){var A=w-d,S=P-p,E=y-d,x=g-p,D=A*x-S*E;if(Math.abs(D)>.02*Math.hypot(A,S)*Math.hypot(E,x))return}else if(w===y&&P===g){var k=m-y,C=b-g,T=d-y,I=p-g,O=k*I-C*T;if(Math.abs(O)>.02*Math.hypot(k,C)*Math.hypot(T,I))return}else{if((d-m)*(y-w)+(p-b)*(g-P)>=0)return}t.preventDefault();var M=Math.hypot(d-y,p-g)||1,L=Math.hypot(m-w,b-P)||1,R=r.currentScale;if(a){var G=N._accumulateFactor(R,M/L,"_touchUnusedFactor");if(G<1)N.zoomOut(null,G);else{if(!(G>1))return;N.zoomIn(null,G)}}else{var B=N._accumulateTicks((M-L)/30,"_touchUnusedTicks");if(B<0)N.zoomOut(-B);else{if(!(B>0))return;N.zoomIn(B)}}N._centerAtPos(R,(d+y)/2,(p+g)/2)}}}function webViewerTouchEnd(t){if(N._touchInfo){t.preventDefault();N._touchInfo=null;N._touchUnusedTicks=0;N._touchUnusedFactor=1}}function webViewerClick(t){var r,i,a;if(null!==(r=N.secondaryToolbar)&&void 0!==r&&r.isOpen){var o=N.appConfig;if(N.pdfViewer.containsElement(t.target)||null!==(i=o.toolbar)&&void 0!==i&&i.container.contains(t.target)&&t.target!==(null===(a=o.secondaryToolbar)||void 0===a?void 0:a.toggleButton)){if(t.target&&t.target.parentElement===o.secondaryToolbar.toggleButton)return;if(t.target&&t.target.parentElement&&t.target.parentElement.parentElement===o.secondaryToolbar.toggleButton)return;N.secondaryToolbar.close()}}}function webViewerKeyUp(t){"Control"===t.key&&(N._isCtrlKeyDown=!1)}function webViewerKeyDown(t){var r,i,o,l,u;N._isCtrlKeyDown="Control"===t.key;if(!N.overlayManager.active){var c=N.eventBus,h=N.pdfViewer,d=h.isInPresentationMode,p=!1,v=!1,y=(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0);if(!window.isKeyIgnored||!window.isKeyIgnored(y,t.keyCode)){if(1===y||8===y||5===y||12===y)switch(t.keyCode){case 70:if(!N.supportsIntegratedFind&&!t.shiftKey){var g;null===(g=N.findBar)||void 0===g||g.open();p=!0}break;case 71:if(!N.supportsIntegratedFind){var m=N.findController.state;if(m){var b={source:window,type:"again",findPrevious:5===y||12===y};c.dispatch("find",_objectSpread(_objectSpread({},m),b))}p=!0}break;case 61:case 107:case 187:case 171:N.zoomIn();p=!0;break;case 173:case 109:case 189:N.zoomOut();p=!0;break;case 48:case 96:if(!d){setTimeout((function(){N.zoomReset()}));p=!1}break;case 38:if(d||N.page>1){N.page=1;p=!0;v=!0}break;case 40:if(d||N.page<N.pagesCount){N.page=N.pagesCount;p=!0;v=!0}}if(1===y||8===y)switch(t.keyCode){case 83:c.dispatch("download",{source:window});p=!0;break;case 79:c.dispatch("openfile",{source:window});p=!0}if(3===y||10===y)switch(t.keyCode){case 80:N.requestPresentationMode();p=!0;N.externalServices.reportTelemetry({type:"buttons",data:{id:"presentationModeKeyboard"}});break;case 71:if(N.appConfig.toolbar){N.appConfig.toolbar.pageNumber.select();p=!0}}if(p){v&&!d&&h.focus();t.preventDefault()}else{var w=(0,a.getActiveOrFocusedElement)(),P=null==w?void 0:w.tagName.toUpperCase();if(!("INPUT"===P||"TEXTAREA"===P||"SELECT"===P||null!=w&&w.isContentEditable)||27===t.keyCode){if(0===y){var A=0,S=!1;switch(t.keyCode){case 38:case 33:h.isVerticalScrollbarEnabled&&(S=!0);A=-1;break;case 8:d||(S=!0);A=-1;break;case 37:h.isHorizontalScrollbarEnabled&&(S=!0);case 75:case 80:A=-1;break;case 27:if(null!==(r=N.secondaryToolbar)&&void 0!==r&&r.isOpen){N.secondaryToolbar.close();p=!0}if(!N.supportsIntegratedFind&&null!==(i=N.findBar)&&void 0!==i&&i.opened){N.findBar.close();p=!0}break;case 40:case 34:h.isVerticalScrollbarEnabled&&(S=!0);A=1;break;case 13:case 32:d||(S=!0);A=1;break;case 39:h.isHorizontalScrollbarEnabled&&(S=!0);case 74:case 78:A=1;break;case 36:if(d||N.page>1){N.page=1;p=!0;v=!0}break;case 35:if(d||N.page<N.pagesCount){N.page=N.pagesCount;p=!0;v=!0}break;case 83:null===(o=N.pdfCursorTools)||void 0===o||o.switchTool(a.CursorTool.SELECT);break;case 72:null===(l=N.pdfCursorTools)||void 0===l||l.switchTool(a.CursorTool.HAND);break;case 82:N.rotatePages(90);break;case 115:null===(u=N.pdfSidebar)||void 0===u||u.toggle()}if(0!==A&&(!S||"page-fit"===h.currentScaleValue)){A>0?h.nextPage():h.previousPage();p=!0}}if(4===y)switch(t.keyCode){case 13:case 32:if(!d&&"page-fit"!==h.currentScaleValue)break;h.previousPage();p=!0;break;case 82:N.rotatePages(-90)}v&&!h.containsElement(w)&&h.focus();p&&t.preventDefault()}}}}}function beforeUnload(t){t.preventDefault();t.returnValue="";return!1}var q={instance:{supportsPrinting:!1,createPrintService:function createPrintService(){throw new Error("Not implemented: createPrintService")}}};r.PDFPrintServiceFactory=q},(t,r,i)=>{var a=i(67),o=i(193);a({target:"Array",stat:!0,forced:!i(169)((function(t){Array.from(t)}))},{from:o})},(t,r,i)=>{var a=i(106),o=i(34),l=i(9),u=i(194),c=i(164),h=i(111),d=i(55),p=i(102),v=i(165),y=i(166),g=Array;t.exports=function from(t){var r=l(t),i=h(this),m=arguments.length,b=m>1?arguments[1]:void 0,w=void 0!==b;w&&(b=a(b,m>2?arguments[2]:void 0));var P,A,S,E,x,D,k=y(r),C=0;if(!k||this===g&&c(k)){P=d(r);A=i?new this(P):g(P);for(;P>C;C++){D=w?b(r[C],C):r[C];p(A,C,D)}}else{x=(E=v(r,k)).next;A=i?new this:[];for(;!(S=o(x,E)).done;C++){D=w?u(E,b,[S.value,C],!0):S.value;p(A,C,D)}}A.length=C;return A}},(t,r,i)=>{var a=i(31),o=i(167);t.exports=function(t,r,i,l){try{return l?r(a(i)[0],i[1]):r(i)}catch(r){o(t,"throw",r)}}},(t,r,i)=>{var a=i(67),o=i(105).filter;a({target:"Array",proto:!0,forced:!i(186)("filter")},{filter:function filter(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(67),o=i(8),l=i(43),u=i(68).f,c=i(24);a({target:"Object",stat:!0,forced:!c||o((function(){u(1)})),sham:!c},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return u(l(t),r)}})},(t,r,i)=>{var a=i(67),o=i(24),l=i(75),u=i(43),c=i(68),h=i(102);a({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r,i,a=u(t),o=c.f,d=l(a),p={},v=0;d.length>v;)void 0!==(i=o(a,r=d[v++]))&&h(p,r,i);return p}})},(t,r,i)=>{var a=i(67),o=i(4);a({global:!0,forced:o.globalThis!==o},{globalThis:o})},(t,r,i)=>{var a=i(67),o=i(51).includes,l=i(8),u=i(46);a({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function includes(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});u("includes")},(t,r,i)=>{var a=i(67),o=i(6),l=i(201),u=i(10),c=i(94),h=i(203),d=o("".indexOf);a({target:"String",proto:!0,forced:!h("includes")},{includes:function includes(t){return!!~d(c(u(this)),c(l(t)),arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(202),o=TypeError;t.exports=function(t){if(a(t))throw o("The method doesn't accept regular expressions");return t}},(t,r,i)=>{var a=i(27),o=i(45),l=i(13)("match");t.exports=function(t){var r;return a(t)&&(void 0!==(r=t[l])?!!r:"RegExp"===o(t))}},(t,r,i)=>{var a=i(13)("match");t.exports=function(t){var r=/./;try{"/./"[t](r)}catch(i){try{r[a]=!1;return"/./"[t](r)}catch(t){}}return!1}},(t,r,i)=>{var a=i(67),o=i(205).values;a({target:"Object",stat:!0},{values:function values(t){return o(t)}})},(t,r,i)=>{var a=i(24),o=i(8),l=i(6),u=i(81),c=i(49),h=i(43),d=l(i(69).f),p=l([].push),v=a&&o((function(){var t=Object.create(null);t[2]=2;return!d(t,2)})),createMethod=function(t){return function(r){for(var i,o=h(r),l=c(o),y=v&&null===u(o),g=l.length,m=0,b=[];g>m;){i=l[m++];a&&!(y?i in o:d(o,i))||p(b,t?[i,o[i]]:o[i])}return b}};t.exports={entries:createMethod(!0),values:createMethod(!1)}},(t,r,i)=>{var a=i(67),o=i(207);a({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},(t,r,i)=>{var a=i(34),o=i(6),l=i(94),u=i(208),c=i(209),h=i(14),d=i(47),p=i(62).get,v=i(210),y=i(211),g=h("native-string-replace",String.prototype.replace),m=RegExp.prototype.exec,b=m,w=o("".charAt),P=o("".indexOf),A=o("".replace),S=o("".slice),E=function(){var t=/a/,r=/b*/g;a(m,t,"a");a(m,r,"a");return 0!==t.lastIndex||0!==r.lastIndex}(),x=c.BROKEN_CARET,D=void 0!==/()??/.exec("")[1];(E||D||x||v||y)&&(b=function exec(t){var r,i,o,c,h,v,y,k=this,C=p(k),T=l(t),I=C.raw;if(I){I.lastIndex=k.lastIndex;r=a(b,I,T);k.lastIndex=I.lastIndex;return r}var O=C.groups,M=x&&k.sticky,L=a(u,k),R=k.source,G=0,B=T;if(M){L=A(L,"y","");-1===P(L,"g")&&(L+="g");B=S(T,k.lastIndex);if(k.lastIndex>0&&(!k.multiline||k.multiline&&"\n"!==w(T,k.lastIndex-1))){R="(?: "+R+")";B=" "+B;G++}i=new RegExp("^(?:"+R+")",L)}D&&(i=new RegExp("^"+R+"$(?!\\s)",L));E&&(o=k.lastIndex);c=a(m,M?i:k,B);if(M)if(c){c.input=S(c.input,G);c[0]=S(c[0],G);c.index=k.lastIndex;k.lastIndex+=c[0].length}else k.lastIndex=0;else E&&c&&(k.lastIndex=k.global?c.index+c[0].length:o);D&&c&&c.length>1&&a(g,c[0],i,(function(){for(h=1;h<arguments.length-2;h++)void 0===arguments[h]&&(c[h]=void 0)}));if(c&&O){c.groups=v=d(null);for(h=0;h<O.length;h++)v[(y=O[h])[0]]=c[y[1]]}return c});t.exports=b},(t,r,i)=>{var a=i(31);t.exports=function(){var t=a(this),r="";t.hasIndices&&(r+="d");t.global&&(r+="g");t.ignoreCase&&(r+="i");t.multiline&&(r+="m");t.dotAll&&(r+="s");t.unicode&&(r+="u");t.unicodeSets&&(r+="v");t.sticky&&(r+="y");return r}},(t,r,i)=>{var a=i(8),o=i(4).RegExp,l=a((function(){var t=o("a","y");t.lastIndex=2;return null!==t.exec("abcd")})),u=l||a((function(){return!o("a","y").sticky})),c=l||a((function(){var t=o("^r","gy");t.lastIndex=2;return null!==t.exec("str")}));t.exports={BROKEN_CARET:c,MISSED_STICKY:u,UNSUPPORTED_Y:l}},(t,r,i)=>{var a=i(8),o=i(4).RegExp;t.exports=a((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},(t,r,i)=>{var a=i(8),o=i(4).RegExp;t.exports=a((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},(t,r,i)=>{var a=i(34),o=i(213),l=i(31),u=i(11),c=i(10),h=i(214),d=i(94),p=i(38),v=i(215);o("search",(function(t,r,i){return[function search(r){var i=c(this),o=u(r)?void 0:p(r,t);return o?a(o,r,i):new RegExp(r)[t](d(i))},function(t){var a=l(this),o=d(t),u=i(r,a,o);if(u.done)return u.value;var c=a.lastIndex;h(c,0)||(a.lastIndex=0);var p=v(a,o);h(a.lastIndex,c)||(a.lastIndex=c);return null===p?-1:p.index}]}))},(t,r,i)=>{i(206);var a=i(107),o=i(70),l=i(207),u=i(8),c=i(13),h=i(64),d=c("species"),p=RegExp.prototype;t.exports=function(t,r,i,v){var y=c(t),g=!u((function(){var r={};r[y]=function(){return 7};return 7!==""[t](r)})),m=g&&!u((function(){var r=!1,i=/a/;if("split"===t){(i={}).constructor={};i.constructor[d]=function(){return i};i.flags="";i[y]=/./[y]}i.exec=function(){r=!0;return null};i[y]("");return!r}));if(!g||!m||i){var b=a(/./[y]),w=r(y,""[t],(function(t,r,i,o,u){var c=a(t),h=r.exec;return h===l||h===p.exec?g&&!u?{done:!0,value:b(r,i,o)}:{done:!0,value:c(i,r,o)}:{done:!1}}));o(String.prototype,t,w[0]);o(p,y,w[1])}v&&h(p[y],"sham",!0)}},t=>{t.exports=Object.is||function is(t,r){return t===r?0!==t||1/t==1/r:t!=t&&r!=r}},(t,r,i)=>{var a=i(34),o=i(31),l=i(28),u=i(45),c=i(207),h=TypeError;t.exports=function(t,r){var i=t.exec;if(l(i)){var d=a(i,t,r);null!==d&&o(d);return d}if("RegExp"===u(t))return a(c,t,r);throw h("RegExp#exec called on incompatible receiver")}},(t,r,i)=>{var a=i(67),o=i(8),l=i(110),u=i(27),c=i(9),h=i(55),d=i(181),p=i(102),v=i(108),y=i(186),g=i(13),m=i(20),b=g("isConcatSpreadable"),w=m>=51||!o((function(){var t=[];t[b]=!1;return t.concat()[0]!==t})),isConcatSpreadable=function(t){if(!u(t))return!1;var r=t[b];return void 0!==r?!!r:l(t)};a({target:"Array",proto:!0,arity:1,forced:!w||!y("concat")},{concat:function concat(t){var r,i,a,o,l,u=c(this),y=v(u,0),g=0;for(r=-1,a=arguments.length;r<a;r++)if(isConcatSpreadable(l=-1===r?u:arguments[r])){o=h(l);d(g+o);for(i=0;i<o;i++,g++)i in l&&p(y,g,l[i])}else{d(g+1);p(y,g++,l)}y.length=g;return y}})},(t,r,i)=>{var a=i(67),o=i(218);a({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},(t,r,i)=>{var a=i(24),o=i(6),l=i(34),u=i(8),c=i(49),h=i(77),d=i(69),p=i(9),v=i(44),y=Object.assign,g=Object.defineProperty,m=o([].concat);t.exports=!y||u((function(){if(a&&1!==y({b:1},y(g({},"a",{enumerable:!0,get:function(){g(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},i=Symbol("assign detection"),o="abcdefghijklmnopqrst";t[i]=7;o.split("").forEach((function(t){r[t]=t}));return 7!==y({},t)[i]||c(y({},r)).join("")!==o}))?function assign(t,r){for(var i=p(t),o=arguments.length,u=1,y=h.f,g=d.f;o>u;)for(var b,w=v(arguments[u++]),P=y?m(c(w),y(w)):c(w),A=P.length,S=0;A>S;){b=P[S++];a&&!l(g,w,b)||(i[b]=w[b])}return i}:y},(t,r,i)=>{i(206);var a=i(67),o=i(34),l=i(28),u=i(31),c=i(94),h=function(){var t=!1,r=/[ac]/;r.exec=function(){t=!0;return/./.exec.apply(this,arguments)};return!0===r.test("abc")&&t}(),d=/./.test;a({target:"RegExp",proto:!0,forced:!h},{test:function(t){var r=u(this),i=c(t),a=r.exec;if(!l(a))return o(d,r,i);var h=o(a,r,i);if(null===h)return!1;u(h);return!0}})},(t,r,i)=>{var a=i(67),o=i(140).trim;a({target:"String",proto:!0,forced:i(221)("trim")},{trim:function trim(){return o(this)}})},(t,r,i)=>{var a=i(72).PROPER,o=i(8),l=i(141);t.exports=function(t){return o((function(){return!!l[t]()||"​…᠎"!=="​…᠎"[t]()||a&&l[t].name!==t}))}},(t,r,i)=>{var a=i(72).PROPER,o=i(70),l=i(31),u=i(94),c=i(8),h=i(223),d="toString",p=RegExp.prototype[d],v=c((function(){return"/a/b"!==p.call({source:"a",flags:"b"})})),y=a&&p.name!==d;(v||y)&&o(RegExp.prototype,d,(function toString(){var t=l(this);return"/"+u(t.source)+"/"+u(h(t))}),{unsafe:!0})},(t,r,i)=>{var a=i(34),o=i(5),l=i(37),u=i(208),c=RegExp.prototype;t.exports=function(t){var r=t.flags;return void 0!==r||"flags"in c||o(t,"flags")||!l(c,t)?r:a(u,t)}},(t,r,i)=>{i(67)({target:"Math",stat:!0},{trunc:i(54)})},(t,r,i)=>{i(226)},(t,r,i)=>{i(92);var a,o=i(67),l=i(24),u=i(227),c=i(4),h=i(106),d=i(6),p=i(70),v=i(103),y=i(146),g=i(5),m=i(218),b=i(193),w=i(101),P=i(93).codeAt,A=i(228),S=i(94),E=i(83),x=i(149),D=i(229),k=i(62),C=k.set,T=k.getterFor("URL"),I=D.URLSearchParams,O=D.getState,M=c.URL,L=c.TypeError,R=c.parseInt,G=Math.floor,B=Math.pow,j=d("".charAt),N=d(/./.exec),W=d([].join),V=d(1..toString),U=d([].pop),H=d([].push),z=d("".replace),q=d([].shift),Y=d("".split),K=d("".slice),X=d("".toLowerCase),$=d([].unshift),Q="Invalid scheme",J="Invalid host",Z="Invalid port",ee=/[a-z]/i,te=/[\d+-.a-z]/i,re=/\d/,ne=/^0x/i,ie=/^[0-7]+$/,ae=/^\d+$/,oe=/^[\da-f]+$/i,se=/[\0\t\n\r #%/:<>?@[\\\]^|]/,le=/[\0\t\n\r #/:<>?@[\\\]^|]/,ue=/^[\u0000-\u0020]+/,ce=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,he=/[\t\n\r]/g,serializeHost=function(t){var r,i,a,o;if("number"==typeof t){r=[];for(i=0;i<4;i++){$(r,t%256);t=G(t/256)}return W(r,".")}if("object"==typeof t){r="";a=function(t){for(var r=null,i=1,a=null,o=0,l=0;l<8;l++)if(0!==t[l]){if(o>i){r=a;i=o}a=null;o=0}else{null===a&&(a=l);++o}if(o>i){r=a;i=o}return r}(t);for(i=0;i<8;i++)if(!o||0!==t[i]){o&&(o=!1);if(a===i){r+=i?":":"::";o=!0}else{r+=V(t[i],16);i<7&&(r+=":")}}return"["+r+"]"}return t},de={},fe=m({},de,{" ":1,'"':1,"<":1,">":1,"`":1}),pe=m({},fe,{"#":1,"?":1,"{":1,"}":1}),ve=m({},pe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,r){var i=P(t,0);return i>32&&i<127&&!g(r,t)?t:encodeURIComponent(t)},ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isWindowsDriveLetter=function(t,r){var i;return 2===t.length&&N(ee,j(t,0))&&(":"===(i=j(t,1))||!r&&"|"===i)},startsWithWindowsDriveLetter=function(t){var r;return t.length>1&&isWindowsDriveLetter(K(t,0,2))&&(2===t.length||"/"===(r=j(t,2))||"\\"===r||"?"===r||"#"===r)},isSingleDot=function(t){return"."===t||"%2e"===X(t)},ge={},me={},_e={},be={},we={},Pe={},Ae={},Se={},Ee={},Fe={},xe={},De={},ke={},Ce={},Te={},Ie={},Oe={},Me={},Le={},Re={},Ge={},URLState=function(t,r,i){var a,o,l,u=S(t);if(r){if(o=this.parse(u))throw L(o);this.searchParams=null}else{void 0!==i&&(a=new URLState(i,!0));if(o=this.parse(u,null,a))throw L(o);(l=O(new I)).bindURL(this);this.searchParams=l}};URLState.prototype={type:"URL",parse:function(t,r,i){var o,l,u,c,h,d=this,p=r||ge,v=0,y="",m=!1,P=!1,A=!1;t=S(t);if(!r){d.scheme="";d.username="";d.password="";d.host=null;d.port=null;d.path=[];d.query=null;d.fragment=null;d.cannotBeABaseURL=!1;t=z(t,ue,"");t=z(t,ce,"$1")}t=z(t,he,"");o=b(t);for(;v<=o.length;){l=o[v];switch(p){case ge:if(!l||!N(ee,l)){if(r)return Q;p=_e;continue}y+=X(l);p=me;break;case me:if(l&&(N(te,l)||"+"===l||"-"===l||"."===l))y+=X(l);else{if(":"!==l){if(r)return Q;y="";p=_e;v=0;continue}if(r&&(d.isSpecial()!==g(ye,y)||"file"===y&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;d.scheme=y;if(r){d.isSpecial()&&ye[d.scheme]===d.port&&(d.port=null);return}y="";if("file"===d.scheme)p=Ce;else if(d.isSpecial()&&i&&i.scheme===d.scheme)p=be;else if(d.isSpecial())p=Se;else if("/"===o[v+1]){p=we;v++}else{d.cannotBeABaseURL=!0;H(d.path,"");p=Le}}break;case _e:if(!i||i.cannotBeABaseURL&&"#"!==l)return Q;if(i.cannotBeABaseURL&&"#"===l){d.scheme=i.scheme;d.path=w(i.path);d.query=i.query;d.fragment="";d.cannotBeABaseURL=!0;p=Ge;break}p="file"===i.scheme?Ce:Pe;continue;case be:if("/"!==l||"/"!==o[v+1]){p=Pe;continue}p=Ee;v++;break;case we:if("/"===l){p=Fe;break}p=Me;continue;case Pe:d.scheme=i.scheme;if(l===a){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.query=i.query}else if("/"===l||"\\"===l&&d.isSpecial())p=Ae;else if("?"===l){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.query="";p=Re}else{if("#"!==l){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.path.length--;p=Me;continue}d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;d.path=w(i.path);d.query=i.query;d.fragment="";p=Ge}break;case Ae:if(!d.isSpecial()||"/"!==l&&"\\"!==l){if("/"!==l){d.username=i.username;d.password=i.password;d.host=i.host;d.port=i.port;p=Me;continue}p=Fe}else p=Ee;break;case Se:p=Ee;if("/"!==l||"/"!==j(y,v+1))continue;v++;break;case Ee:if("/"!==l&&"\\"!==l){p=Fe;continue}break;case Fe:if("@"===l){m&&(y="%40"+y);m=!0;u=b(y);for(var E=0;E<u.length;E++){var x=u[E];if(":"!==x||A){var D=percentEncode(x,ve);A?d.password+=D:d.username+=D}else A=!0}y=""}else if(l===a||"/"===l||"?"===l||"#"===l||"\\"===l&&d.isSpecial()){if(m&&""===y)return"Invalid authority";v-=b(y).length+1;y="";p=xe}else y+=l;break;case xe:case De:if(r&&"file"===d.scheme){p=Ie;continue}if(":"!==l||P){if(l===a||"/"===l||"?"===l||"#"===l||"\\"===l&&d.isSpecial()){if(d.isSpecial()&&""===y)return J;if(r&&""===y&&(d.includesCredentials()||null!==d.port))return;if(c=d.parseHost(y))return c;y="";p=Oe;if(r)return;continue}"["===l?P=!0:"]"===l&&(P=!1);y+=l}else{if(""===y)return J;if(c=d.parseHost(y))return c;y="";p=ke;if(r===De)return}break;case ke:if(!N(re,l)){if(l===a||"/"===l||"?"===l||"#"===l||"\\"===l&&d.isSpecial()||r){if(""!==y){var k=R(y,10);if(k>65535)return Z;d.port=d.isSpecial()&&k===ye[d.scheme]?null:k;y=""}if(r)return;p=Oe;continue}return Z}y+=l;break;case Ce:d.scheme="file";if("/"===l||"\\"===l)p=Te;else{if(!i||"file"!==i.scheme){p=Me;continue}switch(l){case a:d.host=i.host;d.path=w(i.path);d.query=i.query;break;case"?":d.host=i.host;d.path=w(i.path);d.query="";p=Re;break;case"#":d.host=i.host;d.path=w(i.path);d.query=i.query;d.fragment="";p=Ge;break;default:if(!startsWithWindowsDriveLetter(W(w(o,v),""))){d.host=i.host;d.path=w(i.path);d.shortenPath()}p=Me;continue}}break;case Te:if("/"===l||"\\"===l){p=Ie;break}i&&"file"===i.scheme&&!startsWithWindowsDriveLetter(W(w(o,v),""))&&(isWindowsDriveLetter(i.path[0],!0)?H(d.path,i.path[0]):d.host=i.host);p=Me;continue;case Ie:if(l===a||"/"===l||"\\"===l||"?"===l||"#"===l){if(!r&&isWindowsDriveLetter(y))p=Me;else if(""===y){d.host="";if(r)return;p=Oe}else{if(c=d.parseHost(y))return c;"localhost"===d.host&&(d.host="");if(r)return;y="";p=Oe}continue}y+=l;break;case Oe:if(d.isSpecial()){p=Me;if("/"!==l&&"\\"!==l)continue}else if(r||"?"!==l)if(r||"#"!==l){if(l!==a){p=Me;if("/"!==l)continue}}else{d.fragment="";p=Ge}else{d.query="";p=Re}break;case Me:if(l===a||"/"===l||"\\"===l&&d.isSpecial()||!r&&("?"===l||"#"===l)){if(".."===(h=X(h=y))||"%2e."===h||".%2e"===h||"%2e%2e"===h){d.shortenPath();"/"===l||"\\"===l&&d.isSpecial()||H(d.path,"")}else if(isSingleDot(y))"/"===l||"\\"===l&&d.isSpecial()||H(d.path,"");else{if("file"===d.scheme&&!d.path.length&&isWindowsDriveLetter(y)){d.host&&(d.host="");y=j(y,0)+":"}H(d.path,y)}y="";if("file"===d.scheme&&(l===a||"?"===l||"#"===l))for(;d.path.length>1&&""===d.path[0];)q(d.path);if("?"===l){d.query="";p=Re}else if("#"===l){d.fragment="";p=Ge}}else y+=percentEncode(l,pe);break;case Le:if("?"===l){d.query="";p=Re}else if("#"===l){d.fragment="";p=Ge}else l!==a&&(d.path[0]+=percentEncode(l,de));break;case Re:if(r||"#"!==l)l!==a&&("'"===l&&d.isSpecial()?d.query+="%27":d.query+="#"===l?"%23":percentEncode(l,de));else{d.fragment="";p=Ge}break;case Ge:l!==a&&(d.fragment+=percentEncode(l,fe))}v++}},parseHost:function(t){var r,i,a;if("["===j(t,0)){if("]"!==j(t,t.length-1))return J;r=function(t){var r,i,a,o,l,u,c,h=[0,0,0,0,0,0,0,0],d=0,p=null,v=0,chr=function(){return j(t,v)};if(":"===chr()){if(":"!==j(t,1))return;v+=2;p=++d}for(;chr();){if(8===d)return;if(":"!==chr()){r=i=0;for(;i<4&&N(oe,chr());){r=16*r+R(chr(),16);v++;i++}if("."===chr()){if(0===i)return;v-=i;if(d>6)return;a=0;for(;chr();){o=null;if(a>0){if(!("."===chr()&&a<4))return;v++}if(!N(re,chr()))return;for(;N(re,chr());){l=R(chr(),10);if(null===o)o=l;else{if(0===o)return;o=10*o+l}if(o>255)return;v++}h[d]=256*h[d]+o;2!=++a&&4!==a||d++}if(4!==a)return;break}if(":"===chr()){v++;if(!chr())return}else if(chr())return;h[d++]=r}else{if(null!==p)return;v++;p=++d}}if(null!==p){u=d-p;d=7;for(;0!==d&&u>0;){c=h[d];h[d--]=h[p+u-1];h[p+--u]=c}}else if(8!==d)return;return h}(K(t,1,-1));if(!r)return J;this.host=r}else if(this.isSpecial()){t=A(t);if(N(se,t))return J;r=function(t){var r,i,a,o,l,u,c,h=Y(t,".");h.length&&""===h[h.length-1]&&h.length--;if((r=h.length)>4)return t;i=[];for(a=0;a<r;a++){if(""===(o=h[a]))return t;l=10;if(o.length>1&&"0"===j(o,0)){l=N(ne,o)?16:8;o=K(o,8===l?1:2)}if(""===o)u=0;else{if(!N(10===l?ae:8===l?ie:oe,o))return t;u=R(o,l)}H(i,u)}for(a=0;a<r;a++){u=i[a];if(a===r-1){if(u>=B(256,5-r))return null}else if(u>255)return null}c=U(i);for(a=0;a<i.length;a++)c+=i[a]*B(256,3-a);return c}(t);if(null===r)return J;this.host=r}else{if(N(le,t))return J;r="";i=b(t);for(a=0;a<i.length;a++)r+=percentEncode(i[a],de);this.host=r}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return g(ye,this.scheme)},shortenPath:function(){var t=this.path,r=t.length;!r||"file"===this.scheme&&1===r&&isWindowsDriveLetter(t[0],!0)||t.length--},serialize:function(){var t=this,r=t.scheme,i=t.username,a=t.password,o=t.host,l=t.port,u=t.path,c=t.query,h=t.fragment,d=r+":";if(null!==o){d+="//";t.includesCredentials()&&(d+=i+(a?":"+a:"")+"@");d+=serializeHost(o);null!==l&&(d+=":"+l)}else"file"===r&&(d+="//");d+=t.cannotBeABaseURL?u[0]:u.length?"/"+W(u,"/"):"";null!==c&&(d+="?"+c);null!==h&&(d+="#"+h);return d},setHref:function(t){var r=this.parse(t);if(r)throw L(r);this.searchParams.update()},getOrigin:function(){var t=this.scheme,r=this.port;if("blob"===t)try{return new Be(t.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+serializeHost(this.host)+(null!==r?":"+r:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(S(t)+":",ge)},getUsername:function(){return this.username},setUsername:function(t){var r=b(S(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var i=0;i<r.length;i++)this.username+=percentEncode(r[i],ve)}},getPassword:function(){return this.password},setPassword:function(t){var r=b(S(t));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var i=0;i<r.length;i++)this.password+=percentEncode(r[i],ve)}},getHost:function(){var t=this.host,r=this.port;return null===t?"":null===r?serializeHost(t):serializeHost(t)+":"+r},setHost:function(t){this.cannotBeABaseURL||this.parse(t,xe)},getHostname:function(){var t=this.host;return null===t?"":serializeHost(t)},setHostname:function(t){this.cannotBeABaseURL||this.parse(t,De)},getPort:function(){var t=this.port;return null===t?"":S(t)},setPort:function(t){this.cannotHaveUsernamePasswordPort()||(""===(t=S(t))?this.port=null:this.parse(t,ke))},getPathname:function(){var t=this.path;return this.cannotBeABaseURL?t[0]:t.length?"/"+W(t,"/"):""},setPathname:function(t){if(!this.cannotBeABaseURL){this.path=[];this.parse(t,Oe)}},getSearch:function(){var t=this.query;return t?"?"+t:""},setSearch:function(t){if(""===(t=S(t)))this.query=null;else{"?"===j(t,0)&&(t=K(t,1));this.query="";this.parse(t,Re)}this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var t=this.fragment;return t?"#"+t:""},setHash:function(t){if(""!==(t=S(t))){"#"===j(t,0)&&(t=K(t,1));this.fragment="";this.parse(t,Ge)}else this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Be=function URL(t){var r=y(this,je),i=x(arguments.length,1)>1?arguments[1]:void 0,a=C(r,new URLState(t,!1,i));if(!l){r.href=a.serialize();r.origin=a.getOrigin();r.protocol=a.getProtocol();r.username=a.getUsername();r.password=a.getPassword();r.host=a.getHost();r.hostname=a.getHostname();r.port=a.getPort();r.pathname=a.getPathname();r.search=a.getSearch();r.searchParams=a.getSearchParams();r.hash=a.getHash()}},je=Be.prototype,accessorDescriptor=function(t,r){return{get:function(){return T(this)[t]()},set:r&&function(t){return T(this)[r](t)},configurable:!0,enumerable:!0}};if(l){v(je,"href",accessorDescriptor("serialize","setHref"));v(je,"origin",accessorDescriptor("getOrigin"));v(je,"protocol",accessorDescriptor("getProtocol","setProtocol"));v(je,"username",accessorDescriptor("getUsername","setUsername"));v(je,"password",accessorDescriptor("getPassword","setPassword"));v(je,"host",accessorDescriptor("getHost","setHost"));v(je,"hostname",accessorDescriptor("getHostname","setHostname"));v(je,"port",accessorDescriptor("getPort","setPort"));v(je,"pathname",accessorDescriptor("getPathname","setPathname"));v(je,"search",accessorDescriptor("getSearch","setSearch"));v(je,"searchParams",accessorDescriptor("getSearchParams"));v(je,"hash",accessorDescriptor("getHash","setHash"))}p(je,"toJSON",(function toJSON(){return T(this).serialize()}),{enumerable:!0});p(je,"toString",(function toString(){return T(this).serialize()}),{enumerable:!0});if(M){var Ne=M.createObjectURL,We=M.revokeObjectURL;Ne&&p(Be,"createObjectURL",h(Ne,M));We&&p(Be,"revokeObjectURL",h(We,M))}E(Be,"URL");o({global:!0,constructor:!0,forced:!u,sham:!l},{URL:Be})},(t,r,i)=>{var a=i(8),o=i(13),l=i(24),u=i(15),c=o("iterator");t.exports=!a((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,i=new URLSearchParams("a=1&a=2&b=3"),a="";t.pathname="c%20d";r.forEach((function(t,i){r.delete("b");a+=i+t}));i.delete("a",2);i.delete("b",void 0);return u&&(!t.toJSON||!i.has("a",1)||i.has("a",2)||!i.has("a",void 0)||i.has("b"))||!r.size&&(u||!l)||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[c]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==a||"x"!==new URL("http://x",void 0).host}))},(t,r,i)=>{var a=i(6),o=2147483647,l=/[^\0-\u007E]/,u=/[.\u3002\uFF0E\uFF61]/g,c="Overflow: input needs wider integers to process",h=RangeError,d=a(u.exec),p=Math.floor,v=String.fromCharCode,y=a("".charCodeAt),g=a([].join),m=a([].push),b=a("".replace),w=a("".split),P=a("".toLowerCase),digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,r,i){var a=0;t=i?p(t/700):t>>1;t+=p(t/r);for(;t>455;){t=p(t/35);a+=36}return p(a+36*t/(t+38))},encode=function(t){var r=[];t=function(t){for(var r=[],i=0,a=t.length;i<a;){var o=y(t,i++);if(o>=55296&&o<=56319&&i<a){var l=y(t,i++);if(56320==(64512&l))m(r,((1023&o)<<10)+(1023&l)+65536);else{m(r,o);i--}}else m(r,o)}return r}(t);var i,a,l=t.length,u=128,d=0,b=72;for(i=0;i<t.length;i++)(a=t[i])<128&&m(r,v(a));var w=r.length,P=w;w&&m(r,"-");for(;P<l;){var A=o;for(i=0;i<t.length;i++)(a=t[i])>=u&&a<A&&(A=a);var S=P+1;if(A-u>p((o-d)/S))throw h(c);d+=(A-u)*S;u=A;for(i=0;i<t.length;i++){if((a=t[i])<u&&++d>o)throw h(c);if(a===u){for(var E=d,x=36;;){var D=x<=b?1:x>=b+26?26:x-b;if(E<D)break;var k=E-D,C=36-D;m(r,v(digitToBasic(D+k%C)));E=p(k/C);x+=36}m(r,v(digitToBasic(E)));b=adapt(d,S,P===w);d=0;P++}}d++;u++}return g(r,"")};t.exports=function(t){var r,i,a=[],o=w(b(P(t),u,"."),".");for(r=0;r<o.length;r++){i=o[r];m(a,d(l,i)?"xn--"+encode(i):i)}return g(a,".")}},(t,r,i)=>{i(42);var a=i(67),o=i(4),l=i(34),u=i(6),c=i(24),h=i(227),d=i(70),p=i(103),v=i(230),y=i(83),g=i(79),m=i(62),b=i(146),w=i(28),P=i(5),A=i(106),S=i(91),E=i(31),x=i(27),D=i(94),k=i(47),C=i(65),T=i(165),I=i(166),O=i(149),M=i(13),L=i(231),R=M("iterator"),G="URLSearchParams",B=G+"Iterator",j=m.set,N=m.getterFor(G),W=m.getterFor(B),V=Object.getOwnPropertyDescriptor,safeGetBuiltIn=function(t){if(!c)return o[t];var r=V(o,t);return r&&r.value},U=safeGetBuiltIn("fetch"),H=safeGetBuiltIn("Request"),z=safeGetBuiltIn("Headers"),q=H&&H.prototype,Y=z&&z.prototype,K=o.RegExp,X=o.TypeError,$=o.decodeURIComponent,Q=o.encodeURIComponent,J=u("".charAt),Z=u([].join),ee=u([].push),te=u("".replace),re=u([].shift),ne=u([].splice),ie=u("".split),ae=u("".slice),oe=/\+/g,se=Array(4),percentSequence=function(t){return se[t-1]||(se[t-1]=K("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return $(t)}catch(r){return t}},deserialize=function(t){var r=te(t,oe," "),i=4;try{return $(r)}catch(t){for(;i;)r=te(r,percentSequence(i--),percentDecode);return r}},le=/[!'()~]|%20/g,ue={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return ue[t]},serialize=function(t){return te(Q(t),le,replacer)},ce=g((function Iterator(t,r){j(this,{type:B,iterator:T(N(t).entries),kind:r})}),"Iterator",(function next(){var t=W(this),r=t.kind,i=t.iterator.next(),a=i.value;i.done||(i.value="keys"===r?a.key:"values"===r?a.value:[a.key,a.value]);return i}),!0),URLSearchParamsState=function(t){this.entries=[];this.url=null;void 0!==t&&(x(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===J(t,0)?ae(t,1):t:D(t)))};URLSearchParamsState.prototype={type:G,bindURL:function(t){this.url=t;this.update()},parseObject:function(t){var r,i,a,o,u,c,h,d=I(t);if(d){i=(r=T(t,d)).next;for(;!(a=l(i,r)).done;){u=(o=T(E(a.value))).next;if((c=l(u,o)).done||(h=l(u,o)).done||!l(u,o).done)throw X("Expected sequence with length 2");ee(this.entries,{key:D(c.value),value:D(h.value)})}}else for(var p in t)P(t,p)&&ee(this.entries,{key:p,value:D(t[p])})},parseQuery:function(t){if(t)for(var r,i,a=ie(t,"&"),o=0;o<a.length;)if((r=a[o++]).length){i=ie(r,"=");ee(this.entries,{key:deserialize(re(i)),value:deserialize(Z(i,"="))})}},serialize:function(){for(var t,r=this.entries,i=[],a=0;a<r.length;){t=r[a++];ee(i,serialize(t.key)+"="+serialize(t.value))}return Z(i,"&")},update:function(){this.entries.length=0;this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var he=function URLSearchParams(){b(this,de);var t=j(this,new URLSearchParamsState(arguments.length>0?arguments[0]:void 0));c||(this.size=t.entries.length)},de=he.prototype;v(de,{append:function append(t,r){var i=N(this);O(arguments.length,2);ee(i.entries,{key:D(t),value:D(r)});c||this.length++;i.updateURL()},delete:function(t){for(var r=N(this),i=O(arguments.length,1),a=r.entries,o=D(t),l=i<2?void 0:arguments[1],u=void 0===l?l:D(l),h=0;h<a.length;){var d=a[h];if(d.key!==o||void 0!==u&&d.value!==u)h++;else{ne(a,h,1);if(void 0!==u)break}}c||(this.size=a.length);r.updateURL()},get:function get(t){var r=N(this).entries;O(arguments.length,1);for(var i=D(t),a=0;a<r.length;a++)if(r[a].key===i)return r[a].value;return null},getAll:function getAll(t){var r=N(this).entries;O(arguments.length,1);for(var i=D(t),a=[],o=0;o<r.length;o++)r[o].key===i&&ee(a,r[o].value);return a},has:function has(t){for(var r=N(this).entries,i=O(arguments.length,1),a=D(t),o=i<2?void 0:arguments[1],l=void 0===o?o:D(o),u=0;u<r.length;){var c=r[u++];if(c.key===a&&(void 0===l||c.value===l))return!0}return!1},set:function set(t,r){var i=N(this);O(arguments.length,1);for(var a,o=i.entries,l=!1,u=D(t),h=D(r),d=0;d<o.length;d++)if((a=o[d]).key===u)if(l)ne(o,d--,1);else{l=!0;a.value=h}l||ee(o,{key:u,value:h});c||(this.size=o.length);i.updateURL()},sort:function sort(){var t=N(this);L(t.entries,(function(t,r){return t.key>r.key?1:-1}));t.updateURL()},forEach:function forEach(t){for(var r,i=N(this).entries,a=A(t,arguments.length>1?arguments[1]:void 0),o=0;o<i.length;)a((r=i[o++]).value,r.key,this)},keys:function keys(){return new ce(this,"keys")},values:function values(){return new ce(this,"values")},entries:function entries(){return new ce(this,"entries")}},{enumerable:!0});d(de,R,de.entries,{name:"entries"});d(de,"toString",(function toString(){return N(this).serialize()}),{enumerable:!0});c&&p(de,"size",{get:function size(){return N(this).entries.length},configurable:!0,enumerable:!0});y(he,G);a({global:!0,constructor:!0,forced:!h},{URLSearchParams:he});if(!h&&w(z)){var fe=u(Y.has),pe=u(Y.set),wrapRequestOptions=function(t){if(x(t)){var r,i=t.body;if(S(i)===G){r=t.headers?new z(t.headers):new z;fe(r,"content-type")||pe(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8");return k(t,{body:C(0,D(i)),headers:C(0,r)})}}return t};w(U)&&a({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function fetch(t){return U(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})}});if(w(H)){var ve=function Request(t){b(this,q);return new H(t,arguments.length>1?wrapRequestOptions(arguments[1]):{})};q.constructor=ve;ve.prototype=q;a({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ve})}}t.exports={URLSearchParams:he,getState:N}},(t,r,i)=>{var a=i(70);t.exports=function(t,r,i){for(var o in r)a(t,o,r[o],i);return t}},(t,r,i)=>{var a=i(101),o=Math.floor,mergeSort=function(t,r){var i=t.length,l=o(i/2);return i<8?insertionSort(t,r):merge(t,mergeSort(a(t,0,l),r),mergeSort(a(t,l),r),r)},insertionSort=function(t,r){for(var i,a,o=t.length,l=1;l<o;){a=l;i=t[l];for(;a&&r(t[a-1],i)>0;)t[a]=t[--a];a!==l++&&(t[a]=i)}return t},merge=function(t,r,i,a){for(var o=r.length,l=i.length,u=0,c=0;u<o||c<l;)t[u+c]=u<o&&c<l?a(r[u],i[c])<=0?r[u++]:i[c++]:u<o?r[u++]:i[c++];return t};t.exports=mergeSort},(t,r,i)=>{i(229)},(t,r,i)=>{var a=i(70),o=i(6),l=i(94),u=i(149),c=URLSearchParams,h=c.prototype,d=o(h.append),p=o(h.delete),v=o(h.forEach),y=o([].push),g=new c("a=1&a=2&b=3");g.delete("a",1);g.delete("b",void 0);g+""!="a=2"&&a(h,"delete",(function(t){var r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return p(this,t);var a=[];v(this,(function(t,r){y(a,{key:r,value:t})}));u(r,1);for(var o,c=l(t),h=l(i),g=0,m=0,b=!1,w=a.length;g<w;){o=a[g++];if(b||o.key===c){b=!0;p(this,o.key)}else m++}for(;m<w;)(o=a[m++]).key===c&&o.value===h||d(this,o.key,o.value)}),{enumerable:!0,unsafe:!0})},(t,r,i)=>{var a=i(70),o=i(6),l=i(94),u=i(149),c=URLSearchParams,h=c.prototype,d=o(h.getAll),p=o(h.has),v=new c("a=1");!v.has("a",2)&&v.has("a",void 0)||a(h,"has",(function has(t){var r=arguments.length,i=r<2?void 0:arguments[1];if(r&&void 0===i)return p(this,t);var a=d(this,t);u(r,1);for(var o=l(i),c=0;c<a.length;)if(a[c++]===o)return!0;return!1}),{enumerable:!0,unsafe:!0})},(t,r,i)=>{var a=i(24),o=i(6),l=i(103),u=URLSearchParams.prototype,c=o(u.forEach);a&&!("size"in u)&&l(u,"size",{get:function size(){var t=0;c(this,(function(){t++}));return t},configurable:!0,enumerable:!0})},(t,r,i)=>{i(67)({target:"Math",stat:!0},{sign:i(237)})},t=>{t.exports=Math.sign||function sign(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1}},(t,r,i)=>{var a=i(67),o=Math.hypot,l=Math.abs,u=Math.sqrt;a({target:"Math",stat:!0,arity:2,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function hypot(t,r){for(var i,a,o=0,c=0,h=arguments.length,d=0;c<h;)if(d<(i=l(arguments[c++]))){o=o*(a=d/i)*a+1;d=i}else o+=i>0?(a=i/d)*a:i;return d===1/0?1/0:d*u(o)}})},(t,r,i)=>{i(1);i(185);i(222);i(192);i(219);Object.defineProperty(r,"__esModule",{value:!0});r.animationStarted=r.VERTICAL_PADDING=r.UNKNOWN_SCALE=r.TextLayerMode=r.SpreadMode=r.SidebarView=r.ScrollMode=r.SCROLLBAR_PADDING=r.RenderingStates=r.ProgressBar=r.PresentationModeState=r.OutputScale=r.MIN_SCALE=r.MAX_SCALE=r.MAX_AUTO_SCALE=r.DEFAULT_SCALE_VALUE=r.DEFAULT_SCALE_DELTA=r.DEFAULT_SCALE=r.CursorTool=r.AutoPrintRegExp=void 0;r.apiPageLayoutToViewerModes=function apiPageLayoutToViewerModes(t){var r=o.VERTICAL,i=l.NONE;switch(t){case"SinglePage":r=o.PAGE;break;case"OneColumn":break;case"TwoPageLeft":r=o.PAGE;case"TwoColumnLeft":i=l.ODD;break;case"TwoPageRight":r=o.PAGE;case"TwoColumnRight":i=l.EVEN}return{scrollMode:r,spreadMode:i}};r.apiPageModeToSidebarView=function apiPageModeToSidebarView(t){switch(t){case"UseNone":return a.NONE;case"UseThumbs":return a.THUMBS;case"UseOutlines":return a.OUTLINE;case"UseAttachments":return a.ATTACHMENTS;case"UseOC":return a.LAYERS}return a.NONE};r.approximateFraction=function approximateFraction(t){if(Math.floor(t)===t)return[t,1];var r=1/t;if(r>8)return[1,8];if(Math.floor(r)===r)return[1,r];var i,a=t>1?r:t,o=0,l=1,u=1,c=1;for(;;){var h=o+u,d=l+c;if(d>8)break;if(a<=h/d){u=h;c=d}else{o=h;l=d}}i=a-o/l<u/c-a?a===t?[o,l]:[l,o]:a===t?[u,c]:[c,u];return i};r.backtrackBeforeAllVisibleElements=backtrackBeforeAllVisibleElements;r.binarySearchFirstItem=binarySearchFirstItem;r.docStyle=void 0;r.getActiveOrFocusedElement=function getActiveOrFocusedElement(){var t=document,r=t.activeElement||t.querySelector(":focus");for(;null!==(i=r)&&void 0!==i&&i.shadowRoot;){var i;r=(t=r.shadowRoot).activeElement||t.querySelector(":focus")}return r};r.getPageSizeInches=function getPageSizeInches(t){var r=t.view,i=t.userUnit,a=t.rotate,o=_slicedToArray(r,4),l=o[0],u=o[1],c=o[2],h=o[3],d=a%180!=0,p=(c-l)/72*i,v=(h-u)/72*i;return{width:d?v:p,height:d?p:v}};r.getVisibleElements=function getVisibleElements(t){var r=t.scrollEl,i=t.views,a=t.sortByVisibility,o=void 0!==a&&a,l=t.horizontal,u=void 0!==l&&l,c=t.rtl,h=void 0!==c&&c,d=r.scrollTop,p=d+r.clientHeight,v=r.scrollLeft,y=v+r.clientWidth;var g=[],m=new Set,b=i.length,w=binarySearchFirstItem(i,u?function isElementNextAfterViewHorizontally(t){var r=t.div,i=r.offsetLeft+r.clientLeft,a=i+r.clientWidth;return h?i<y:a>v}:function isElementBottomAfterViewTop(t){var r=t.div;return r.offsetTop+r.clientTop+r.clientHeight>d});w>0&&w<b&&!u&&(w=backtrackBeforeAllVisibleElements(w,i,d));for(var P=u?y:-1,A=w;A<b;A++){var S=i[A],E=S.div,x=E.offsetLeft+E.clientLeft,D=E.offsetTop+E.clientTop,k=E.clientWidth,C=E.clientHeight,T=x+k,I=D+C;if(-1===P)I>=p&&(P=I);else if((u?x:D)>P)break;if(!(I<=d||D>=p||T<=v||x>=y)){var O=Math.max(0,d-D)+Math.max(0,I-p),M=(k-(Math.max(0,v-x)+Math.max(0,T-y)))/k,L=(C-O)/C*M*100|0;g.push({id:S.id,x:x,y:D,view:S,percent:L,widthPercent:100*M|0});m.add(S.id)}}var R=g[0],G=g.at(-1);o&&g.sort((function(t,r){var i=t.percent-r.percent;return Math.abs(i)>.001?-i:t.id-r.id}));return{first:R,last:G,views:g,ids:m}};r.isPortraitOrientation=function isPortraitOrientation(t){return t.width<=t.height};r.isValidRotation=function isValidRotation(t){return Number.isInteger(t)&&t%90==0};r.isValidScrollMode=function isValidScrollMode(t){return Number.isInteger(t)&&Object.values(o).includes(t)&&t!==o.UNKNOWN};r.isValidSpreadMode=function isValidSpreadMode(t){return Number.isInteger(t)&&Object.values(l).includes(t)&&t!==l.UNKNOWN};r.noContextMenuHandler=function noContextMenuHandler(t){t.preventDefault()};r.normalizeWheelEventDelta=function normalizeWheelEventDelta(t){var r=t.deltaMode,i=normalizeWheelEventDirection(t);r===WheelEvent.DOM_DELTA_PIXEL?i/=900:r===WheelEvent.DOM_DELTA_LINE&&(i/=30);return i};r.normalizeWheelEventDirection=normalizeWheelEventDirection;r.parseQueryString=function parseQueryString(t){var r,i=new Map,a=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}(new URLSearchParams(t));try{for(a.s();!(r=a.n()).done;){var o=_slicedToArray(r.value,2),l=o[0],u=o[1];i.set(l.toLowerCase(),u)}}catch(t){a.e(t)}finally{a.f()}return i};r.removeNullCharacters=function removeNullCharacters(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof t){console.error("The argument must be a string.");return t}r&&(t=t.replaceAll(c," "));return t.replaceAll("\0","")};r.roundToDivide=function roundToDivide(t,r){var i=t%r;return 0===i?t:Math.round(t-i+r)};r.scrollIntoView=function scrollIntoView(t,r){var i,a,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.classList.contains("stf__item")||null!==(i=t.parentElement)&&void 0!==i&&i.classList.contains("stf__item")||null!==(a=t.parentElement)&&void 0!==a&&null!==(a=a.parentElement)&&void 0!==a&&a.classList.contains("stf__item"))return;var u=t.offsetParent;if(!u){globalThis.ngxConsole.error("offsetParent is not set -- cannot scroll");return}var c=t.offsetTop+t.clientTop,h=t.offsetLeft+t.clientLeft;for(;u.clientHeight===u.scrollHeight&&u.clientWidth===u.scrollWidth||o&&(u.classList.contains("markedContent")||"hidden"===getComputedStyle(u).overflow);){c+=u.offsetTop;h+=u.offsetLeft;if(!(u=u.offsetParent)){if(l&&document.body.clientHeight>c){c-=32;window.scrollTo(window.scrollX,c)}return}}if(r){void 0!==r.top&&(c+=r.top);if(void 0!==r.left){h+=r.left;u.scrollLeft=h}}else if(function isDivInViewport(t){var r=t.getBoundingClientRect();return r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)}(t))return;u.scrollTop=c};r.toggleCheckedBtn=function toggleCheckedBtn(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.classList.toggle("toggled",r);t.setAttribute("aria-checked",r);null==i||i.classList.toggle("hidden",!r)};r.toggleExpandedBtn=function toggleExpandedBtn(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.classList.toggle("toggled",r);t.setAttribute("aria-expanded",r);null==i||i.classList.toggle("hidden",!r)};r.watchScroll=function watchScroll(t,r){var i=function debounceScroll(i){o||(o=window.requestAnimationFrame((function viewAreaElementScrolled(){o=null;var i=t.scrollLeft,l=a.lastX;i!==l&&(a.right=i>l);a.lastX=i;var u=t.scrollTop,c=a.lastY;u!==c&&(a.down=u>c);a.lastY=u;r(a)})))},a={right:!0,down:!0,lastX:t.scrollLeft,lastY:t.scrollTop,_eventHandler:i},o=null;t.addEventListener("scroll",i,!0);return a};i(135);i(136);i(98);i(120);i(88);i(126);i(138);i(198);i(42);i(240);i(92);i(95);i(232);i(233);i(234);i(235);i(206);i(248);i(251);i(252);i(254);i(265);i(267);i(269);i(271);i(273);i(275);i(179);i(277);i(278);i(238);i(199);i(200);i(204);i(142);i(283);function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}r.DEFAULT_SCALE_VALUE="auto";r.DEFAULT_SCALE=1;r.DEFAULT_SCALE_DELTA=1.1;r.MIN_SCALE=.1;r.MAX_SCALE=10;r.UNKNOWN_SCALE=0;r.MAX_AUTO_SCALE=1.25;r.SCROLLBAR_PADDING=40;r.VERTICAL_PADDING=5;r.RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};r.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3};var a={UNKNOWN:-1,NONE:0,THUMBS:1,OUTLINE:2,ATTACHMENTS:3,LAYERS:4};r.SidebarView=a;r.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_PERMISSIONS:2};var o={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2,PAGE:3};r.ScrollMode=o;var l={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};r.SpreadMode=l;r.CursorTool={SELECT:0,HAND:1,ZOOM:2};r.AutoPrintRegExp=/\bprint\s*\(/;var u=function(){function OutputScale(){_classCallCheck(this,OutputScale);var t=window.devicePixelRatio||1;this.sx=t;this.sy=t}_createClass(OutputScale,[{key:"scaled",get:function get(){return 1!==this.sx||1!==this.sy}}]);return OutputScale}();r.OutputScale=u;var c=/[\x01-\x1F]/g;function binarySearchFirstItem(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=t.length-1;if(a<0||!r(t[a]))return t.length;if(r(t[i]))return i;for(;i<a;){var o=i+a>>1;r(t[o])?a=o:i=o+1}return i}function backtrackBeforeAllVisibleElements(t,r,i){if(t<2)return t;var a=r[t].div,o=a.offsetTop+a.clientTop;o>=i&&(o=(a=r[t-1].div).offsetTop+a.clientTop);for(var l=t-2;l>=0&&!((a=r[l].div).offsetTop+a.clientTop+a.clientHeight<=o);--l)t=l;return t}function normalizeWheelEventDirection(t){var r=Math.hypot(t.deltaX,t.deltaY),i=Math.atan2(t.deltaY,t.deltaX);-.25*Math.PI<i&&i<.75*Math.PI&&(r=-r);return r}var h=new Promise((function(t){window.ngxZone.runOutsideAngular((function(){window.requestAnimationFrame(t)}))}));r.animationStarted=h;var d=document.documentElement.style;r.docStyle=d;var p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=function(){function ProgressBar(t){_classCallCheck(this,ProgressBar);_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,y,{writable:!0,value:0});_classPrivateFieldInitSpec(this,g,{writable:!0,value:null});_classPrivateFieldInitSpec(this,m,{writable:!0,value:!0});_classPrivateFieldSet(this,p,t.classList);_classPrivateFieldSet(this,g,t.style)}_createClass(ProgressBar,[{key:"percent",get:function get(){return _classPrivateFieldGet(this,y)},set:function set(t){_classPrivateFieldSet(this,y,function clamp(t,r,i){return Math.min(Math.max(t,r),i)}(t,0,100));if(isNaN(t))_classPrivateFieldGet(this,p).add("indeterminate");else{_classPrivateFieldGet(this,p).remove("indeterminate");_classPrivateFieldGet(this,g).setProperty("--progressBar-percent","".concat(_classPrivateFieldGet(this,y),"%"))}}},{key:"setWidth",value:function setWidth(t){if(t){var r=t.parentNode.offsetWidth-t.offsetWidth;r>0&&_classPrivateFieldGet(this,g).setProperty("--progressBar-end-offset","".concat(r,"px"))}}},{key:"setDisableAutoFetch",value:function setDisableAutoFetch(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3;if(!isNaN(_classPrivateFieldGet(this,y))){_classPrivateFieldGet(this,v)&&clearTimeout(_classPrivateFieldGet(this,v));this.show();_classPrivateFieldSet(this,v,setTimeout((function(){_classPrivateFieldSet(t,v,null);t.hide()}),r))}}},{key:"hide",value:function hide(){if(_classPrivateFieldGet(this,m)){_classPrivateFieldSet(this,m,!1);_classPrivateFieldGet(this,p).add("hidden")}}},{key:"show",value:function show(){if(!_classPrivateFieldGet(this,m)){_classPrivateFieldSet(this,m,!0);_classPrivateFieldGet(this,p).remove("hidden")}}}]);return ProgressBar}();r.ProgressBar=b},(t,r,i)=>{i(241)},(t,r,i)=>{i(242)("Map",(function(t){return function Map(){return t(this,arguments.length?arguments[0]:void 0)}}),i(247))},(t,r,i)=>{var a=i(67),o=i(4),l=i(6),u=i(78),c=i(70),h=i(243),d=i(163),p=i(146),v=i(28),y=i(11),g=i(27),m=i(8),b=i(169),w=i(83),P=i(129);t.exports=function(t,r,i){var A=-1!==t.indexOf("Map"),S=-1!==t.indexOf("Weak"),E=A?"set":"add",x=o[t],D=x&&x.prototype,k=x,C={},fixMethod=function(t){var r=l(D[t]);c(D,t,"add"===t?function add(t){r(this,0===t?0:t);return this}:"delete"===t?function(t){return!(S&&!g(t))&&r(this,0===t?0:t)}:"get"===t?function get(t){return S&&!g(t)?void 0:r(this,0===t?0:t)}:"has"===t?function has(t){return!(S&&!g(t))&&r(this,0===t?0:t)}:function set(t,i){r(this,0===t?0:t,i);return this})};if(u(t,!v(x)||!(S||D.forEach&&!m((function(){(new x).entries().next()}))))){k=i.getConstructor(r,t,A,E);h.enable()}else if(u(t,!0)){var T=new k,I=T[E](S?{}:-0,1)!==T,O=m((function(){T.has(1)})),M=b((function(t){new x(t)})),L=!S&&m((function(){for(var t=new x,r=5;r--;)t[E](r,r);return!t.has(-0)}));if(!M){(k=r((function(t,r){p(t,D);var i=P(new x,t,k);y(r)||d(r,i[E],{that:i,AS_ENTRIES:A});return i}))).prototype=D;D.constructor=k}if(O||L){fixMethod("delete");fixMethod("has");A&&fixMethod("get")}(L||I)&&fixMethod(E);S&&D.clear&&delete D.clear}C[t]=k;a({global:!0,constructor:!0,forced:k!==x},C);w(k,t);S||i.setStrong(k,t,A);return k}},(t,r,i)=>{var a=i(67),o=i(6),l=i(57),u=i(27),c=i(5),h=i(23).f,d=i(76),p=i(100),v=i(244),y=i(18),g=i(246),m=!1,b=y("meta"),w=0,setMetadata=function(t){h(t,b,{value:{objectID:"O"+w++,weakData:{}}})},P=t.exports={enable:function(){P.enable=function(){};m=!0;var t=d.f,r=o([].splice),i={};i[b]=1;if(t(i).length){d.f=function(i){for(var a=t(i),o=0,l=a.length;o<l;o++)if(a[o]===b){r(a,o,1);break}return a};a({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:p.f})}},fastKey:function(t,r){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!c(t,b)){if(!v(t))return"F";if(!r)return"E";setMetadata(t)}return t[b].objectID},getWeakData:function(t,r){if(!c(t,b)){if(!v(t))return!0;if(!r)return!1;setMetadata(t)}return t[b].weakData},onFreeze:function(t){g&&m&&v(t)&&!c(t,b)&&setMetadata(t);return t}};l[b]=!0},(t,r,i)=>{var a=i(8),o=i(27),l=i(45),u=i(245),c=Object.isExtensible,h=a((function(){c(1)}));t.exports=h||u?function isExtensible(t){return!!o(t)&&((!u||"ArrayBuffer"!==l(t))&&(!c||c(t)))}:c},(t,r,i)=>{var a=i(8);t.exports=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},(t,r,i)=>{var a=i(8);t.exports=!a((function(){return Object.isExtensible(Object.preventExtensions({}))}))},(t,r,i)=>{var a=i(47),o=i(103),l=i(230),u=i(106),c=i(146),h=i(11),d=i(163),p=i(66),v=i(87),y=i(145),g=i(24),m=i(243).fastKey,b=i(62),w=b.set,P=b.getterFor;t.exports={getConstructor:function(t,r,i,p){var v=t((function(t,o){c(t,y);w(t,{type:r,index:a(null),first:void 0,last:void 0,size:0});g||(t.size=0);h(o)||d(o,t[p],{that:t,AS_ENTRIES:i})})),y=v.prototype,b=P(r),define=function(t,r,i){var a,o,l=b(t),u=getEntry(t,r);if(u)u.value=i;else{l.last=u={index:o=m(r,!0),key:r,value:i,previous:a=l.last,next:void 0,removed:!1};l.first||(l.first=u);a&&(a.next=u);g?l.size++:t.size++;"F"!==o&&(l.index[o]=u)}return t},getEntry=function(t,r){var i,a=b(t),o=m(r);if("F"!==o)return a.index[o];for(i=a.first;i;i=i.next)if(i.key===r)return i};l(y,{clear:function clear(){for(var t=b(this),r=t.index,i=t.first;i;){i.removed=!0;i.previous&&(i.previous=i.previous.next=void 0);delete r[i.index];i=i.next}t.first=t.last=void 0;g?t.size=0:this.size=0},delete:function(t){var r=this,i=b(r),a=getEntry(r,t);if(a){var o=a.next,l=a.previous;delete i.index[a.index];a.removed=!0;l&&(l.next=o);o&&(o.previous=l);i.first===a&&(i.first=o);i.last===a&&(i.last=l);g?i.size--:r.size--}return!!a},forEach:function forEach(t){for(var r,i=b(this),a=u(t,arguments.length>1?arguments[1]:void 0);r=r?r.next:i.first;){a(r.value,r.key,this);for(;r&&r.removed;)r=r.previous}},has:function has(t){return!!getEntry(this,t)}});l(y,i?{get:function get(t){var r=getEntry(this,t);return r&&r.value},set:function set(t,r){return define(this,0===t?0:t,r)}}:{add:function add(t){return define(this,t=0===t?0:t,t)}});g&&o(y,"size",{configurable:!0,get:function(){return b(this).size}});return v},setStrong:function(t,r,i){var a=r+" Iterator",o=P(r),l=P(a);p(t,r,(function(t,r){w(this,{type:a,target:t,state:o(t),kind:r,last:void 0})}),(function(){for(var t=l(this),r=t.kind,i=t.last;i&&i.removed;)i=i.previous;if(!t.target||!(t.last=i=i?i.next:t.state.first)){t.target=void 0;return v(void 0,!0)}return v("keys"===r?i.key:"values"===r?i.value:[i.key,i.value],!1)}),i?"entries":"values",!i,!0);y(r)}}},(t,r,i)=>{var a=i(116),o=i(34),l=i(6),u=i(213),c=i(8),h=i(31),d=i(28),p=i(11),v=i(53),y=i(56),g=i(94),m=i(10),b=i(249),w=i(38),P=i(250),A=i(215),S=i(13)("replace"),E=Math.max,x=Math.min,D=l([].concat),k=l([].push),C=l("".indexOf),T=l("".slice),I="$0"==="a".replace(/./,"$0"),O=!!/./[S]&&""===/./[S]("a","$0");u("replace",(function(t,r,i){var l=O?"$":"$0";return[function replace(t,i){var a=m(this),l=p(t)?void 0:w(t,S);return l?o(l,t,a,i):o(r,g(a),t,i)},function(t,o){var u=h(this),c=g(t);if("string"==typeof o&&-1===C(o,l)&&-1===C(o,"$<")){var p=i(r,u,c,o);if(p.done)return p.value}var m=d(o);m||(o=g(o));var w,S=u.global;if(S){w=u.unicode;u.lastIndex=0}for(var I,O=[];null!==(I=A(u,c));){k(O,I);if(!S)break;""===g(I[0])&&(u.lastIndex=b(c,y(u.lastIndex),w))}for(var M,L="",R=0,G=0;G<O.length;G++){for(var B,j=g((I=O[G])[0]),N=E(x(v(I.index),c.length),0),W=[],V=1;V<I.length;V++)k(W,void 0===(M=I[V])?M:String(M));var U=I.groups;if(m){var H=D([j],W,N,c);void 0!==U&&k(H,U);B=g(a(o,void 0,H))}else B=P(j,c,N,W,U,o);if(N>=R){L+=T(c,R,N)+B;R=N+j.length}}return L+T(c,R)}]}),!!c((function(){var t=/./;t.exec=function(){var t=[];t.groups={a:"7"};return t};return"7"!=="".replace(t,"$<a>")}))||!I||O)},(t,r,i)=>{var a=i(93).charAt;t.exports=function(t,r,i){return r+(i?a(t,r).length:1)}},(t,r,i)=>{var a=i(6),o=i(9),l=Math.floor,u=a("".charAt),c=a("".replace),h=a("".slice),d=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,p=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,r,i,a,v,y){var g=i+t.length,m=a.length,b=p;if(void 0!==v){v=o(v);b=d}return c(y,b,(function(o,c){var d;switch(u(c,0)){case"$":return"$";case"&":return t;case"`":return h(r,0,i);case"'":return h(r,g);case"<":d=v[h(c,1,-1)];break;default:var p=+c;if(0===p)return o;if(p>m){var y=l(p/10);return 0===y?o:y<=m?void 0===a[y-1]?u(c,1):a[y-1]+u(c,1):o}d=a[p-1]}return void 0===d?"":d}))}},(t,r,i)=>{var a=i(67),o=i(34),l=i(6),u=i(10),c=i(28),h=i(11),d=i(202),p=i(94),v=i(38),y=i(223),g=i(250),m=i(13),b=i(15),w=m("replace"),P=TypeError,A=l("".indexOf),S=l("".replace),E=l("".slice),x=Math.max,stringIndexOf=function(t,r,i){return i>t.length?-1:""===r?i:A(t,r,i)};a({target:"String",proto:!0},{replaceAll:function replaceAll(t,r){var i,a,l,m,D,k,C,T,I,O=u(this),M=0,L=0,R="";if(!h(t)){if(i=d(t)){a=p(u(y(t)));if(!~A(a,"g"))throw P("`.replaceAll` does not allow non-global regexes")}if(l=v(t,w))return o(l,t,O,r);if(b&&i)return S(p(O),t,r)}m=p(O);D=p(t);(k=c(r))||(r=p(r));C=D.length;T=x(1,C);M=stringIndexOf(m,D,0);for(;-1!==M;){I=k?p(r(D,M,m)):g(D,m,M,[],void 0,r);R+=E(m,L,M)+I;L=M+C;M=stringIndexOf(m,D,M+T)}L<m.length&&(R+=E(m,L));return R}})},(t,r,i)=>{i(253)},(t,r,i)=>{i(242)("Set",(function(t){return function Set(){return t(this,arguments.length?arguments[0]:void 0)}}),i(247))},(t,r,i)=>{var a=i(67),o=i(255);a({target:"Set",proto:!0,real:!0,forced:!i(264)("difference")},{difference:o})},(t,r,i)=>{var a=i(256),o=i(257),l=i(258),u=i(261),c=i(262),h=i(259),d=i(260),p=o.has,v=o.remove;t.exports=function difference(t){var r=a(this),i=c(t),o=l(r);u(r)<=i.size?h(r,(function(t){i.includes(t)&&v(o,t)})):d(i.getIterator(),(function(t){p(r,t)&&v(o,t)}));return o}},(t,r,i)=>{var a=i(257).has;t.exports=function(t){a(t);return t}},(t,r,i)=>{var a=i(6),o=Set.prototype;t.exports={Set:Set,add:a(o.add),has:a(o.has),remove:a(o.delete),proto:o}},(t,r,i)=>{var a=i(257),o=i(259),l=a.Set,u=a.add;t.exports=function(t){var r=new l;o(t,(function(t){u(r,t)}));return r}},(t,r,i)=>{var a=i(6),o=i(260),l=i(257),u=l.Set,c=l.proto,h=a(c.forEach),d=a(c.keys),p=d(new u).next;t.exports=function(t,r,i){return i?o({iterator:d(t),next:p},r):h(t,r)}},(t,r,i)=>{var a=i(34);t.exports=function(t,r,i){for(var o,l,u=i?t:t.iterator,c=t.next;!(o=a(c,u)).done;)if(void 0!==(l=r(o.value)))return l}},(t,r,i)=>{var a=i(85),o=i(257);t.exports=a(o.proto,"size","get")||function(t){return t.size}},(t,r,i)=>{var a=i(39),o=i(31),l=i(34),u=i(53),c=i(263),h="Invalid size",d=RangeError,p=TypeError,v=Math.max,SetRecord=function(t,r,i,a){this.set=t;this.size=r;this.has=i;this.keys=a};SetRecord.prototype={getIterator:function(){return c(o(l(this.keys,this.set)))},includes:function(t){return l(this.has,this.set,t)}};t.exports=function(t){o(t);var r=+t.size;if(r!=r)throw p(h);var i=u(r);if(i<0)throw d(h);return new SetRecord(t,v(i,0),a(t.has),a(t.keys))}},t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},(t,r,i)=>{var a=i(36),createSetLike=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};t.exports=function(t){var r=a("Set");try{(new r)[t](createSetLike(0));try{(new r)[t](createSetLike(-1));return!1}catch(t){return!0}}catch(t){return!1}}},(t,r,i)=>{var a=i(67),o=i(8),l=i(266);a({target:"Set",proto:!0,real:!0,forced:!i(264)("intersection")||o((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:l})},(t,r,i)=>{var a=i(256),o=i(257),l=i(261),u=i(262),c=i(259),h=i(260),d=o.Set,p=o.add,v=o.has;t.exports=function intersection(t){var r=a(this),i=u(t),o=new d;l(r)>i.size?h(i.getIterator(),(function(t){v(r,t)&&p(o,t)})):c(r,(function(t){i.includes(t)&&p(o,t)}));return o}},(t,r,i)=>{var a=i(67),o=i(268);a({target:"Set",proto:!0,real:!0,forced:!i(264)("isDisjointFrom")},{isDisjointFrom:o})},(t,r,i)=>{var a=i(256),o=i(257).has,l=i(261),u=i(262),c=i(259),h=i(260),d=i(167);t.exports=function isDisjointFrom(t){var r=a(this),i=u(t);if(l(r)<=i.size)return!1!==c(r,(function(t){if(i.includes(t))return!1}),!0);var p=i.getIterator();return!1!==h(p,(function(t){if(o(r,t))return d(p,"normal",!1)}))}},(t,r,i)=>{var a=i(67),o=i(270);a({target:"Set",proto:!0,real:!0,forced:!i(264)("isSubsetOf")},{isSubsetOf:o})},(t,r,i)=>{var a=i(256),o=i(261),l=i(259),u=i(262);t.exports=function isSubsetOf(t){var r=a(this),i=u(t);return!(o(r)>i.size)&&!1!==l(r,(function(t){if(!i.includes(t))return!1}),!0)}},(t,r,i)=>{var a=i(67),o=i(272);a({target:"Set",proto:!0,real:!0,forced:!i(264)("isSupersetOf")},{isSupersetOf:o})},(t,r,i)=>{var a=i(256),o=i(257).has,l=i(261),u=i(262),c=i(260),h=i(167);t.exports=function isSupersetOf(t){var r=a(this),i=u(t);if(l(r)<i.size)return!1;var d=i.getIterator();return!1!==c(d,(function(t){if(!o(r,t))return h(d,"normal",!1)}))}},(t,r,i)=>{var a=i(67),o=i(274);a({target:"Set",proto:!0,real:!0,forced:!i(264)("symmetricDifference")},{symmetricDifference:o})},(t,r,i)=>{var a=i(256),o=i(257),l=i(258),u=i(262),c=i(260),h=o.add,d=o.has,p=o.remove;t.exports=function symmetricDifference(t){var r=a(this),i=u(t).getIterator(),o=l(r);c(i,(function(t){d(r,t)?p(o,t):h(o,t)}));return o}},(t,r,i)=>{var a=i(67),o=i(276);a({target:"Set",proto:!0,real:!0,forced:!i(264)("union")},{union:o})},(t,r,i)=>{var a=i(256),o=i(257).add,l=i(258),u=i(262),c=i(260);t.exports=function union(t){var r=a(this),i=u(t).getIterator(),h=l(r);c(i,(function(t){o(h,t)}));return h}},(t,r,i)=>{var a=i(67),o=i(9),l=i(55),u=i(53),c=i(46);a({target:"Array",proto:!0},{at:function at(t){var r=o(this),i=l(r),a=u(t),c=a>=0?a:i+a;return c<0||c>=i?void 0:r[c]}});c("at")},(t,r,i)=>{var a=i(67),o=i(6),l=i(39),u=i(9),c=i(55),h=i(279),d=i(94),p=i(8),v=i(231),y=i(184),g=i(280),m=i(281),b=i(20),w=i(282),P=[],A=o(P.sort),S=o(P.push),E=p((function(){P.sort(void 0)})),x=p((function(){P.sort(null)})),D=y("sort"),k=!p((function(){if(b)return b<70;if(!(g&&g>3)){if(m)return!0;if(w)return w<603;var t,r,i,a,o="";for(t=65;t<76;t++){r=String.fromCharCode(t);switch(t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(a=0;a<47;a++)P.push({k:r+a,v:i})}P.sort((function(t,r){return r.v-t.v}));for(a=0;a<P.length;a++){r=P[a].k.charAt(0);o.charAt(o.length-1)!==r&&(o+=r)}return"DGBEFHACIJK"!==o}}));a({target:"Array",proto:!0,forced:E||!x||!D||!k},{sort:function sort(t){void 0!==t&&l(t);var r=u(this);if(k)return void 0===t?A(r):A(r,t);var i,a,o=[],p=c(r);for(a=0;a<p;a++)a in r&&S(o,r[a]);v(o,function(t){return function(r,i){return void 0===i?-1:void 0===r?1:void 0!==t?+t(r,i)||0:d(r)>d(i)?1:-1}}(t));i=c(o);a=0;for(;a<i;)r[a]=o[a++];for(;a<p;)h(r,a++);return r}})},(t,r,i)=>{var a=i(40),o=TypeError;t.exports=function(t,r){if(!delete t[r])throw o("Cannot delete property "+a(r)+" of "+a(t))}},(t,r,i)=>{var a=i(21).match(/firefox\/(\d+)/i);t.exports=!!a&&+a[1]},(t,r,i)=>{var a=i(21);t.exports=/MSIE|Trident/.test(a)},(t,r,i)=>{var a=i(21).match(/AppleWebKit\/(\d+)\./);t.exports=!!a&&+a[1]},(t,r,i)=>{i(284)},(t,r,i)=>{var a,o=i(246),l=i(4),u=i(6),c=i(230),h=i(243),d=i(242),p=i(285),v=i(27),y=i(62).enforce,g=i(8),m=i(63),b=Object,w=Array.isArray,P=b.isExtensible,A=b.isFrozen,S=b.isSealed,E=b.freeze,x=b.seal,D={},k={},C=!l.ActiveXObject&&"ActiveXObject"in l,wrapper=function(t){return function WeakMap(){return t(this,arguments.length?arguments[0]:void 0)}},T=d("WeakMap",wrapper,p),I=T.prototype,O=u(I.set);if(m)if(C){a=p.getConstructor(wrapper,"WeakMap",!0);h.enable();var M=u(I.delete),L=u(I.has),R=u(I.get);c(I,{delete:function(t){if(v(t)&&!P(t)){var r=y(this);r.frozen||(r.frozen=new a);return M(this,t)||r.frozen.delete(t)}return M(this,t)},has:function has(t){if(v(t)&&!P(t)){var r=y(this);r.frozen||(r.frozen=new a);return L(this,t)||r.frozen.has(t)}return L(this,t)},get:function get(t){if(v(t)&&!P(t)){var r=y(this);r.frozen||(r.frozen=new a);return L(this,t)?R(this,t):r.frozen.get(t)}return R(this,t)},set:function set(t,r){if(v(t)&&!P(t)){var i=y(this);i.frozen||(i.frozen=new a);L(this,t)?O(this,t,r):i.frozen.set(t,r)}else O(this,t,r);return this}})}else o&&g((function(){var t=E([]);O(new T,t,1);return!A(t)}))&&c(I,{set:function set(t,r){var i;w(t)&&(A(t)?i=D:S(t)&&(i=k));O(this,t,r);i===D&&E(t);i===k&&x(t);return this}})},(t,r,i)=>{var a=i(6),o=i(230),l=i(243).getWeakData,u=i(146),c=i(31),h=i(11),d=i(27),p=i(163),v=i(105),y=i(5),g=i(62),m=g.set,b=g.getterFor,w=v.find,P=v.findIndex,A=a([].splice),S=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,r){return w(t.entries,(function(t){return t[0]===r}))};UncaughtFrozenStore.prototype={get:function(t){var r=findUncaughtFrozen(this,t);if(r)return r[1]},has:function(t){return!!findUncaughtFrozen(this,t)},set:function(t,r){var i=findUncaughtFrozen(this,t);i?i[1]=r:this.entries.push([t,r])},delete:function(t){var r=P(this.entries,(function(r){return r[0]===t}));~r&&A(this.entries,r,1);return!!~r}};t.exports={getConstructor:function(t,r,i,a){var v=t((function(t,o){u(t,g);m(t,{type:r,id:S++,frozen:void 0});h(o)||p(o,t[a],{that:t,AS_ENTRIES:i})})),g=v.prototype,w=b(r),define=function(t,r,i){var a=w(t),o=l(c(r),!0);!0===o?uncaughtFrozenStore(a).set(r,i):o[a.id]=i;return t};o(g,{delete:function(t){var r=w(this);if(!d(t))return!1;var i=l(t);return!0===i?uncaughtFrozenStore(r).delete(t):i&&y(i,r.id)&&delete i[r.id]},has:function has(t){var r=w(this);if(!d(t))return!1;var i=l(t);return!0===i?uncaughtFrozenStore(r).has(t):i&&y(i,r.id)}});o(g,i?{get:function get(t){var r=w(this);if(d(t)){var i=l(t);return!0===i?uncaughtFrozenStore(r).get(t):i?i[r.id]:void 0}},set:function set(t,r){return define(this,t,r)}}:{add:function add(t){return define(this,t,!0)}});return v}}},(t,r,i)=>{i(198);t.exports=globalThis.pdfjsLib},(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.ngxExtendedPdfViewerVersion=void 0;r.ngxExtendedPdfViewerVersion="18.1.2"},(t,r,i)=>{i(135);i(136);i(98);i(120);i(88);i(1);i(42);i(92);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.compatibilityParams=r.OptionKind=r.AppOptions=void 0;i(206);i(219);i(198);i(126);i(138);i(187);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}var a=Object.create(null);r.compatibilityParams=a;var o=navigator.userAgent||"",l=navigator.platform||"",u=navigator.maxTouchPoints||1,c=/Android/.test(o),h=/\b(iPad|iPhone|iPod)(?=;)/.test(o)||"MacIntel"===l&&u>1;!function checkCanvasSizeLimitation(){(h||c)&&(a.maxCanvasPixels=5242880)}();var d={VIEWER:2,API:4,WORKER:8,PREFERENCE:128};r.OptionKind=d;var p={annotationEditorMode:{value:0,kind:d.VIEWER+d.PREFERENCE},annotationMode:{value:2,kind:d.VIEWER+d.PREFERENCE},cursorToolOnLoad:{value:0,kind:d.VIEWER+d.PREFERENCE},defaultZoomDelay:{value:400,kind:d.VIEWER+d.PREFERENCE},defaultZoomValue:{value:"",kind:d.VIEWER+d.PREFERENCE},disableHistory:{value:!1,kind:d.VIEWER},disablePageLabels:{value:!1,kind:d.VIEWER+d.PREFERENCE},enablePermissions:{value:!1,kind:d.VIEWER+d.PREFERENCE},enablePrintAutoRotate:{value:!0,kind:d.VIEWER+d.PREFERENCE},enableScripting:{value:!0,kind:d.VIEWER+d.PREFERENCE},enableStampEditor:{value:!0,kind:d.VIEWER+d.PREFERENCE},externalLinkRel:{value:"noopener noreferrer nofollow",kind:d.VIEWER},externalLinkTarget:{value:0,kind:d.VIEWER+d.PREFERENCE},historyUpdateUrl:{value:!1,kind:d.VIEWER+d.PREFERENCE},ignoreDestinationZoom:{value:!1,kind:d.VIEWER+d.PREFERENCE},imageResourcesPath:{value:"./images/",kind:d.VIEWER},maxCanvasPixels:{value:16777216,kind:d.VIEWER},forcePageColors:{value:!1,kind:d.VIEWER+d.PREFERENCE},pageColorsBackground:{value:"Canvas",kind:d.VIEWER+d.PREFERENCE},pageColorsForeground:{value:"CanvasText",kind:d.VIEWER+d.PREFERENCE},pdfBugEnabled:{value:!1,kind:d.VIEWER+d.PREFERENCE},printResolution:{value:150,kind:d.VIEWER},removePageBorders:{value:!1,kind:d.VIEWER+d.PREFERENCE},sidebarViewOnLoad:{value:-1,kind:d.VIEWER+d.PREFERENCE},scrollModeOnLoad:{value:-1,kind:d.VIEWER+d.PREFERENCE},spreadModeOnLoad:{value:-1,kind:d.VIEWER+d.PREFERENCE},textLayerMode:{value:1,kind:d.VIEWER+d.PREFERENCE},viewerCssTheme:{value:0,kind:d.VIEWER+d.PREFERENCE},viewOnLoad:{value:0,kind:d.VIEWER+d.PREFERENCE},cMapPacked:{value:!0,kind:d.API},cMapUrl:{value:"../web/cmaps/",kind:d.API},disableAutoFetch:{value:!1,kind:d.API+d.PREFERENCE},disableFontFace:{value:!1,kind:d.API+d.PREFERENCE},disableRange:{value:!1,kind:d.API+d.PREFERENCE},disableStream:{value:!1,kind:d.API+d.PREFERENCE},docBaseUrl:{value:"",kind:d.API},enableXfa:{value:!0,kind:d.API+d.PREFERENCE},fontExtraProperties:{value:!1,kind:d.API},isEvalSupported:{value:!0,kind:d.API},isOffscreenCanvasSupported:{value:!0,kind:d.API},maxImageSize:{value:-1,kind:d.API},pdfBug:{value:!1,kind:d.API},standardFontDataUrl:{value:"../web/standard_fonts/",kind:d.API},verbosity:{value:1,kind:d.API},workerPort:{value:null,kind:d.WORKER},workerSrc:{value:"./assets/pdf.worker.js",kind:d.WORKER}};p.defaultUrl={value:"compressed.tracemonkey-pldi-09.pdf",kind:d.VIEWER};p.disablePreferences={value:!1,kind:d.VIEWER};p.locale={value:navigator.language||"en-US",kind:d.VIEWER};p.sandboxBundleSrc={value:"../build/pdf.sandbox.js",kind:d.VIEWER};var v=Object.create(null);if(globalThis.pdfDefaultOptions)for(var y in globalThis.pdfDefaultOptions)v[y]=globalThis.pdfDefaultOptions[y];var g=function(){function AppOptions(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AppOptions);throw new Error("Cannot initialize AppOptions.")}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AppOptions,null,[{key:"get",value:function get(t){var r=v[t];if(void 0!==r)return r;var i=p[t];if(void 0!==i){var o;return null!==(o=a[t])&&void 0!==o?o:i.value}}},{key:"getAll",value:function getAll(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=Object.create(null);for(var i in p){var o,l=p[i];if(t){if(0==(t&l.kind))continue;if(t===d.PREFERENCE){var u=l.value,c=_typeof(u);if("boolean"===c||"string"===c||"number"===c&&Number.isInteger(u)){r[i]=u;continue}throw new Error("Invalid type for preference: ".concat(i))}}var h=v[i];r[i]=void 0!==h?h:null!==(o=a[i])&&void 0!==o?o:l.value}return r}},{key:"set",value:function set(t,r){v[t]=r}},{key:"setAll",value:function setAll(t){for(var r in t)v[r]=t[r]}},{key:"remove",value:function remove(t){delete v[t]}}]);return AppOptions}();r.AppOptions=g;g._hasUserOptions=function(){return Object.keys(v).length>0}},(t,r,i)=>{i(98);i(120);i(1);i(135);i(136);i(222);i(192);i(206);i(219);i(190);i(122);i(123);Object.defineProperty(r,"__esModule",{value:!0});r.WaitOnType=r.EventBus=r.AutomationEventBus=void 0;r.waitOnEventOrTimeout=function waitOnEventOrTimeout(t){var r=t.target,i=t.name,o=t.delay,u=void 0===o?0:o;return new Promise((function(t,o){if("object"!==_typeof(r)||!i||"string"!=typeof i||!(Number.isInteger(u)&&u>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function handler(a){r instanceof l?r._off(i,c):r.removeEventListener(i,c);d&&clearTimeout(d);t(a)}var c=handler.bind(null,a.EVENT);r instanceof l?r._on(i,c):r.addEventListener(i,c);var h=handler.bind(null,a.TIMEOUT),d=setTimeout(h,u)}))};i(88);i(142);i(138);i(126);i(185);i(179);i(290);i(42);i(92);i(283);i(95);function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var a={EVENT:"event",TIMEOUT:"timeout"};r.WaitOnType=a;var o=new WeakMap,l=function(){function EventBus(){_classCallCheck(this,EventBus);_classPrivateFieldInitSpec(this,o,{writable:!0,value:Object.create(null)})}_createClass(EventBus,[{key:"on",value:function on(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._on(t,r,{external:!0,once:null==i?void 0:i.once})}},{key:"off",value:function off(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._off(t,r,{external:!0,once:null==i?void 0:i.once})}},{key:"dispatch",value:function dispatch(t,r){var i=_classPrivateFieldGet(this,o)[t];if(i&&0!==i.length){var a,l,u=_createForOfIteratorHelper(i.slice(0));try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c.listener,d=c.external;c.once&&this._off(t,h);d?(a||(a=[])).push(h):h(r)}}catch(t){u.e(t)}finally{u.f()}if(a){var p,v=_createForOfIteratorHelper(a);try{for(v.s();!(p=v.n()).done;){(0,p.value)(r)}}catch(t){v.e(t)}finally{v.f()}a=null}}}},{key:"_on",value:function _on(t,r){var i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;((i=_classPrivateFieldGet(this,o))[t]||(i[t]=[])).push({listener:r,external:!0===(null==a?void 0:a.external),once:!0===(null==a?void 0:a.once)})}},{key:"_off",value:function _off(t,r){var i=_classPrivateFieldGet(this,o)[t];if(i)for(var a=0,l=i.length;a<l;a++)if(i[a].listener===r){i.splice(a,1);return}}}]);return EventBus}();r.EventBus=l;var u=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(AutomationEventBus,t);var r=_createSuper(AutomationEventBus);function AutomationEventBus(){_classCallCheck(this,AutomationEventBus);return r.apply(this,arguments)}_createClass(AutomationEventBus,[{key:"dispatch",value:function dispatch(t,r){throw new Error("Not implemented: AutomationEventBus.dispatch")}}]);return AutomationEventBus}(l);r.AutomationEventBus=u},(t,r,i)=>{var a=i(67),o=i(9),l=i(52),u=i(53),c=i(55),h=i(180),d=i(181),p=i(108),v=i(102),y=i(279),g=i(186)("splice"),m=Math.max,b=Math.min;a({target:"Array",proto:!0,forced:!g},{splice:function splice(t,r){var i,a,g,w,P,A,S=o(this),E=c(S),x=l(t,E),D=arguments.length;if(0===D)i=a=0;else if(1===D){i=0;a=E-x}else{i=D-2;a=b(m(u(r),0),E-x)}d(E+i-a);g=p(S,a);for(w=0;w<a;w++)(P=x+w)in S&&v(g,w,S[P]);g.length=a;if(i<a){for(w=x;w<E-a;w++){A=w+i;(P=w+a)in S?S[A]=S[P]:y(S,A)}for(w=E;w>E-a+i;w--)y(S,w-1)}else if(i>a)for(w=E-a;w>x;w--){A=w+i-1;(P=w+a-1)in S?S[A]=S[P]:y(S,A)}for(w=0;w<i;w++)S[w+x]=arguments[w+2];h(S,E-a+i);return g}})},(t,r,i)=>{i(135);i(136);i(98);i(120);i(1);i(175);i(176);i(177);i(178);i(190);i(182);i(185);i(192);i(219);Object.defineProperty(r,"__esModule",{value:!0});r.SimpleLinkService=r.PDFLinkService=r.LinkTarget=void 0;i(126);i(42);i(240);i(88);i(92);i(95);i(198);i(138);i(115);i(199);i(200);i(206);i(248);i(251);i(292);i(187);i(188);i(222);i(142);i(216);i(283);i(293);i(179);var a=i(239);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classStaticPrivateMethodGet(t,r,i){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return i}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}var o={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};r.LinkTarget=o;function _addLinkAttributes(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.url,l=r.target,u=r.rel,c=r.enabled,h=void 0===c||c;if(!i||"string"!=typeof i)throw new Error('A valid "url" parameter must provided.');var d=(0,a.removeNullCharacters)(i);if(h)t.href=t.title=d;else{t.href="";t.title="Disabled: ".concat(d);t.onclick=function(){return!1}}var p="";switch(l){case o.NONE:break;case o.SELF:p="_self";break;case o.BLANK:p="_blank";break;case o.PARENT:p="_parent";break;case o.TOP:p="_top"}t.target=p;t.rel="string"==typeof u?u:"noopener noreferrer nofollow"}var l=new WeakMap,u=new WeakSet,c=function(){function PDFLinkService(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.eventBus,i=t.externalLinkTarget,a=void 0===i?null:i,o=t.externalLinkRel,c=void 0===o?null:o,h=t.ignoreDestinationZoom,d=void 0!==h&&h;_classCallCheck(this,PDFLinkService);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,u);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,l,{writable:!0,value:new Map});this.eventBus=r;this.externalLinkTarget=a;this.externalLinkRel=c;this.externalLinkEnabled=!0;this._ignoreDestinationZoom=d;this.baseUrl=null;this.pdfDocument=null;this.pdfViewer=null;this.pdfHistory=null}_createClass(PDFLinkService,[{key:"setDocument",value:function setDocument(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.baseUrl=r;this.pdfDocument=t;_classPrivateFieldGet(this,l).clear()}},{key:"setViewer",value:function setViewer(t){this.pdfViewer=t}},{key:"setHistory",value:function setHistory(t){this.pdfHistory=t}},{key:"pagesCount",get:function get(){return this.pdfDocument?this.pdfDocument.numPages:0}},{key:"page",get:function get(){return this.pdfViewer.currentPageNumber},set:function set(t){this.pdfViewer.currentPageNumber=t}},{key:"rotation",get:function get(){return this.pdfViewer.pagesRotation},set:function set(t){this.pdfViewer.pagesRotation=t}},{key:"isInPresentationMode",get:function get(){return this.pdfViewer.isInPresentationMode}},{key:"goToDestination",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i;return _regeneratorRuntime().wrap((function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if(this.pdfDocument){a.next=2;break}return a.abrupt("return");case 2:if("string"!=typeof t){a.next=9;break}r=t;a.next=6;return this.pdfDocument.getDestination(t);case 6:i=a.sent;a.next=13;break;case 9:r=null;a.next=12;return t;case 12:i=a.sent;case 13:if(Array.isArray(i)){a.next=16;break}globalThis.ngxConsole.error('PDFLinkService.goToDestination: "'.concat(i,'" is not ')+'a valid destination array, for dest="'.concat(t,'".'));return a.abrupt("return");case 16:_classPrivateMethodGet(this,u,_goToDestinationHelper2).call(this,t,r,i);case 17:case"end":return a.stop()}}),_callee,this)}))),function goToDestination(t){return r.apply(this,arguments)})},{key:"goToPage",value:function goToPage(t){if(this.pdfDocument){var r="string"==typeof t&&this.pdfViewer.pageLabelToPageNumber(t)||0|t;if(Number.isInteger(r)&&r>0&&r<=this.pagesCount){if(this.pdfHistory){this.pdfHistory.pushCurrentPosition();this.pdfHistory.pushPage(r)}if("book"===this.pdfViewer.pageViewMode){if(this.pdfViewer.pageFlip){this.pdfViewer.ensureAdjecentPagesAreLoaded();var i=this.pdfViewer.currentPageNumber-this.pdfViewer.currentPageNumber%2,a=r-r%2;i===a-2?this.pdfViewer.pageFlip.flipNext():i===a+2?this.pdfViewer.pageFlip.flipPrev():this.pdfViewer.pageFlip.turnToPage(r-1)}}else this.pdfViewer.scrollPageIntoView({pageNumber:r})}else globalThis.ngxConsole.error('PDFLinkService.goToPage: "'.concat(t,'" is not a valid page.'))}}},{key:"addLinkAttributes",value:function addLinkAttributes(t,r){_addLinkAttributes(t,{url:r,target:arguments.length>2&&void 0!==arguments[2]&&arguments[2]?o.BLANK:this.externalLinkTarget,rel:this.externalLinkRel,enabled:this.externalLinkEnabled})}},{key:"getDestinationHash",value:function getDestinationHash(t){if("string"==typeof t){if(t.length>0)return this.getAnchorUrl("#"+escape(t))}else if(Array.isArray(t)){var r=JSON.stringify(t);if(r.length>0)return this.getAnchorUrl("#"+escape(r))}return this.getAnchorUrl("")}},{key:"getAnchorUrl",value:function getAnchorUrl(t){return this.baseUrl?this.baseUrl+t:t}},{key:"setHash",value:function setHash(t){if(this.pdfDocument){var r,i;if(t.includes("=")){var o=(0,a.parseQueryString)(t);if(o.has("search")){var l=o.get("search").replaceAll('"',""),u="true"===o.get("phrase");this.eventBus.dispatch("findfromurlhash",{source:this,query:u?l:l.match(/\S+/g)})}o.has("page")&&(r=0|o.get("page")||1);if(o.has("zoom")){var c=o.get("zoom").split(","),h=c[0],d=parseFloat(h);h.includes("Fit")?"Fit"===h||"FitB"===h?i=[null,{name:h}]:"FitH"===h||"FitBH"===h||"FitV"===h||"FitBV"===h?i=[null,{name:h},c.length>1?0|c[1]:null]:"FitR"===h?5!==c.length?globalThis.ngxConsole.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:h},0|c[1],0|c[2],0|c[3],0|c[4]]:globalThis.ngxConsole.error('PDFLinkService.setHash: "'.concat(h,'" is not a valid zoom value.')):i=[null,{name:"XYZ"},c.length>1?0|c[1]:null,c.length>2?0|c[2]:null,d?d/100:h]}i?this.pdfViewer.scrollPageIntoView({pageNumber:r||this.page,destArray:i,allowNegativeOffset:!0}):r&&(this.page=r);o.has("pagemode")&&this.eventBus.dispatch("pagemode",{source:this,mode:o.get("pagemode")});o.has("nameddest")&&this.goToDestination(o.get("nameddest"))}else{i=unescape(t);try{i=JSON.parse(i);Array.isArray(i)||(i=i.toString())}catch(t){}if("string"==typeof i||_classStaticPrivateMethodGet(PDFLinkService,PDFLinkService,_isValidExplicitDestination).call(PDFLinkService,i)){this.goToDestination(i);return}globalThis.ngxConsole.error('PDFLinkService.setHash: "'.concat(unescape(t),'" is not a valid destination.'))}}}},{key:"executeNamedAction",value:function executeNamedAction(t){var r,i;switch(t){case"GoBack":null===(r=this.pdfHistory)||void 0===r||r.back();break;case"GoForward":null===(i=this.pdfHistory)||void 0===i||i.forward();break;case"NextPage":this.pdfViewer.nextPage();break;case"PrevPage":this.pdfViewer.previousPage();break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:t})}},{key:"executeSetOCGState",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,a,o,l,u,c;return _regeneratorRuntime().wrap((function _callee2$(h){for(;;)switch(h.prev=h.next){case 0:r=this.pdfDocument;h.next=3;return this.pdfViewer.optionalContentConfigPromise;case 3:i=h.sent;if(r===this.pdfDocument){h.next=6;break}return h.abrupt("return");case 6:o=_createForOfIteratorHelper(t.state);h.prev=7;o.s();case 9:if((l=o.n()).done){h.next=28;break}u=l.value;h.t0=u;h.next="ON"===h.t0||"OFF"===h.t0||"Toggle"===h.t0?14:16;break;case 14:a=u;return h.abrupt("continue",26);case 16:h.t1=a;h.next="ON"===h.t1?19:"OFF"===h.t1?21:"Toggle"===h.t1?23:26;break;case 19:i.setVisibility(u,!0);return h.abrupt("break",26);case 21:i.setVisibility(u,!1);return h.abrupt("break",26);case 23:(c=i.getGroup(u))&&i.setVisibility(u,!c.visible);return h.abrupt("break",26);case 26:h.next=9;break;case 28:h.next=33;break;case 30:h.prev=30;h.t2=h.catch(7);o.e(h.t2);case 33:h.prev=33;o.f();return h.finish(33);case 36:this.pdfViewer.optionalContentConfigPromise=Promise.resolve(i);case 37:case"end":return h.stop()}}),_callee2,this,[[7,30,33,36]])}))),function executeSetOCGState(r){return t.apply(this,arguments)})},{key:"cachePageRef",value:function cachePageRef(t,r){if(r){var i=0===r.gen?"".concat(r.num,"R"):"".concat(r.num,"R").concat(r.gen);_classPrivateFieldGet(this,l).set(i,t)}}},{key:"_cachedPageNumber",value:function _cachedPageNumber(t){if(!t)return null;var r=0===t.gen?"".concat(t.num,"R"):"".concat(t.num,"R").concat(t.gen);return _classPrivateFieldGet(this,l).get(r)||null}}]);var t,r;return PDFLinkService}();r.PDFLinkService=c;function _goToDestinationHelper2(t){var r,i=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0,l=o[0];if("object"===_typeof(l)&&null!==l){if(!(r=this._cachedPageNumber(l))){this.pdfDocument.getPageIndex(l).then((function(r){i.cachePageRef(r+1,l);_classPrivateMethodGet(i,u,_goToDestinationHelper2).call(i,t,a,o)})).catch((function(){globalThis.ngxConsole.error('PDFLinkService.#goToDestinationHelper: "'.concat(l,'" is not ')+'a valid page reference, for dest="'.concat(t,'".'))}));return}}else{if(!Number.isInteger(l)){globalThis.ngxConsole.error('PDFLinkService.#goToDestinationHelper: "'.concat(l,'" is not ')+'a valid destination reference, for dest="'.concat(t,'".'));return}r=l+1}if(!r||r<1||r>this.pagesCount)globalThis.ngxConsole.error('PDFLinkService.#goToDestinationHelper: "'.concat(r,'" is not ')+'a valid page number, for dest="'.concat(t,'".'));else{if(this.pdfHistory){this.pdfHistory.pushCurrentPosition();this.pdfHistory.push({namedDest:a,explicitDest:o,pageNumber:r})}this.pdfViewer.scrollPageIntoView({pageNumber:r,destArray:o,ignoreDestinationZoom:this._ignoreDestinationZoom})}}function _isValidExplicitDestination(t){if(!Array.isArray(t))return!1;var r=t.length;if(r<2)return!1;var i=t[0];if(!("object"===_typeof(i)&&Number.isInteger(i.num)&&Number.isInteger(i.gen)||Number.isInteger(i)&&i>=0))return!1;var a=t[1];if("object"!==_typeof(a)||"string"!=typeof a.name)return!1;var o=!0;switch(a.name){case"XYZ":if(5!==r)return!1;break;case"Fit":case"FitB":return 2===r;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==r)return!1;break;case"FitR":if(6!==r)return!1;o=!1;break;default:return!1}for(var l=2;l<r;l++){var u=t[l];if(!("number"==typeof u||o&&null===u))return!1}return!0}var h=function(){function SimpleLinkService(){_classCallCheck(this,SimpleLinkService);this.externalLinkEnabled=!0}_createClass(SimpleLinkService,[{key:"pagesCount",get:function get(){return 0}},{key:"page",get:function get(){return 0},set:function set(t){}},{key:"rotation",get:function get(){return 0},set:function set(t){}},{key:"isInPresentationMode",get:function get(){return!1}},{key:"goToDestination",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t){return _regeneratorRuntime().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee3)}))),function goToDestination(r){return t.apply(this,arguments)})},{key:"goToPage",value:function goToPage(t){}},{key:"addLinkAttributes",value:function addLinkAttributes(t,r){_addLinkAttributes(t,{url:r,enabled:this.externalLinkEnabled})}},{key:"getDestinationHash",value:function getDestinationHash(t){return"#"}},{key:"getAnchorUrl",value:function getAnchorUrl(t){return"#"}},{key:"setHash",value:function setHash(t){}},{key:"executeNamedAction",value:function executeNamedAction(t){}},{key:"executeSetOCGState",value:function executeSetOCGState(t){}},{key:"cachePageRef",value:function cachePageRef(t,r){}}]);var t;return SimpleLinkService}();r.SimpleLinkService=h},(t,r,i)=>{var a=i(34),o=i(213),l=i(31),u=i(11),c=i(56),h=i(94),d=i(10),p=i(38),v=i(249),y=i(215);o("match",(function(t,r,i){return[function match(r){var i=d(this),o=u(r)?void 0:p(r,t);return o?a(o,r,i):new RegExp(r)[t](h(i))},function(t){var a=l(this),o=h(t),u=i(r,a,o);if(u.done)return u.value;if(!a.global)return y(a,o);var d=a.unicode;a.lastIndex=0;for(var p,g=[],m=0;null!==(p=y(a,o));){var b=h(p[0]);g[m]=b;""===b&&(a.lastIndex=v(o,c(a.lastIndex),d));m++}return 0===m?null:g}]}))},(t,r,i)=>{i(294)},(t,r,i)=>{i(242)("WeakSet",(function(t){return function WeakSet(){return t(this,arguments.length?arguments[0]:void 0)}}),i(285))},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(185);i(222);i(192);i(206);i(219);i(1);i(179);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditorParams=void 0;i(126);i(42);i(88);i(92);i(293);i(95);var a=i(286);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}var o=new WeakSet,l=_createClass((function AnnotationEditorParams(t,r){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorParams);_classPrivateMethodInitSpec(this,o);this.eventBus=r;(function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i})(this,o,_bindListeners2).call(this,t)}));r.AnnotationEditorParams=l;function _bindListeners2(t){var r=this,i=t.editorFreeTextFontSize,o=t.editorFreeTextColor,l=t.editorInkColor,u=t.editorInkThickness,c=t.editorInkOpacity,h=t.editorStampAddImage,d=function dispatchEvent(t,i){r.eventBus.dispatch("switchannotationeditorparams",{source:r,type:a.AnnotationEditorParamsType[t],value:i})};i.addEventListener("input",(function(){d("FREETEXT_SIZE",this.valueAsNumber)}));o.addEventListener("input",(function(){d("FREETEXT_COLOR",this.value)}));l.addEventListener("input",(function(){d("INK_COLOR",this.value)}));u.addEventListener("input",(function(){d("INK_THICKNESS",this.valueAsNumber)}));c.addEventListener("input",(function(){d("INK_OPACITY",this.valueAsNumber)}));h.addEventListener("click",(function(){d("CREATE")}));this.eventBus._on("annotationeditorparamschanged",(function(t){var r,h=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}(t.details);try{for(h.s();!(r=h.n()).done;){var d=_slicedToArray(r.value,2),p=d[0],v=d[1];switch(p){case a.AnnotationEditorParamsType.FREETEXT_SIZE:i.value=v;break;case a.AnnotationEditorParamsType.FREETEXT_COLOR:o.value=v;break;case a.AnnotationEditorParamsType.INK_COLOR:l.value=v;break;case a.AnnotationEditorParamsType.INK_THICKNESS:u.value=v;break;case a.AnnotationEditorParamsType.INK_OPACITY:c.value=v}}}catch(t){h.e(t)}finally{h.f()}}))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.OverlayManager=void 0;i(42);i(88);i(92);i(283);i(95);i(126);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var a=new WeakMap,o=new WeakMap,l=function(){function OverlayManager(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,OverlayManager);_classPrivateFieldInitSpec(this,a,{writable:!0,value:new WeakMap});_classPrivateFieldInitSpec(this,o,{writable:!0,value:null})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(OverlayManager,[{key:"active",get:function get(){return _classPrivateFieldGet(this,o)}},{key:"register",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,i=this,l=arguments;return _regeneratorRuntime().wrap((function _callee$(u){for(;;)switch(u.prev=u.next){case 0:r=l.length>1&&void 0!==l[1]&&l[1];if("object"===_typeof(t)){u.next=5;break}throw new Error("Not enough parameters.");case 5:if(!_classPrivateFieldGet(this,a).has(t)){u.next=7;break}throw new Error("The overlay is already registered.");case 7:_classPrivateFieldGet(this,a).set(t,{canForceClose:r});t.addEventListener("cancel",(function(t){_classPrivateFieldSet(i,o,null)}));case 9:case"end":return u.stop()}}),_callee,this)}))),function register(t){return i.apply(this,arguments)})},{key:"open",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:if(_classPrivateFieldGet(this,a).has(t)){r.next=4;break}throw new Error("The overlay does not exist.");case 4:if(!_classPrivateFieldGet(this,o)){r.next=15;break}if(_classPrivateFieldGet(this,o)!==t){r.next=9;break}throw new Error("The overlay is already active.");case 9:if(!_classPrivateFieldGet(this,a).get(t).canForceClose){r.next=14;break}r.next=12;return this.close();case 12:r.next=15;break;case 14:throw new Error("Another overlay is currently active.");case 15:_classPrivateFieldSet(this,o,t);t.showModal();t.classList.remove("hidden");case 18:case"end":return r.stop()}}),_callee2,this)}))),function open(t){return r.apply(this,arguments)})},{key:"close",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r=arguments;return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:t=r.length>0&&void 0!==r[0]?r[0]:_classPrivateFieldGet(this,o);if(_classPrivateFieldGet(this,a).has(t)){i.next=5;break}throw new Error("The overlay does not exist.");case 5:if(_classPrivateFieldGet(this,o)){i.next=9;break}throw new Error("The overlay is currently not active.");case 9:if(_classPrivateFieldGet(this,o)===t){i.next=11;break}throw new Error("Another overlay is currently active.");case 11:t.close();_classPrivateFieldSet(this,o,null);case 13:case"end":return i.stop()}}),_callee3,this)}))),function close(){return t.apply(this,arguments)})}]);var t,r,i;return OverlayManager}();r.OverlayManager=l},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PasswordPrompt=void 0;i(126);i(42);i(88);i(92);i(283);i(95);i(293);var a=i(286);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var o=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakSet,h=new WeakSet,d=new WeakSet,p=function(){function PasswordPrompt(t,r,i){var a=this,p=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PasswordPrompt);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);_classPrivateFieldInitSpec(this,o,{writable:!0,value:null});_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});this.dialog=t.dialog;this.label=t.label;this.input=t.input;this.submitButton=t.submitButton;this.cancelButton=t.cancelButton;this.overlayManager=r;this.l10n=i;this._isViewerEmbedded=p;this.submitButton.addEventListener("click",_classPrivateMethodGet(this,c,_verify2).bind(this));this.cancelButton.addEventListener("click",this.close.bind(this));this.input.addEventListener("keydown",(function(t){13===t.keyCode&&_classPrivateMethodGet(a,c,_verify2).call(a)}));this.overlayManager.register(this.dialog,!0);this.dialog.addEventListener("close",_classPrivateMethodGet(this,h,_cancel2).bind(this))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PasswordPrompt,[{key:"open",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t;return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(!_classPrivateFieldGet(this,o)){r.next=3;break}r.next=3;return _classPrivateFieldGet(this,o).promise;case 3:_classPrivateFieldSet(this,o,new a.PromiseCapability);r.prev=4;r.next=7;return this.overlayManager.open(this.dialog);case 7:this.input.type="password";this.input.focus();r.next=15;break;case 11:r.prev=11;r.t0=r.catch(4);_classPrivateFieldGet(this,o).resolve();throw r.t0;case 15:t=_classPrivateFieldGet(this,u)===a.PasswordResponses.INCORRECT_PASSWORD;this._isViewerEmbedded&&!t||this.input.focus();r.next=19;return this.l10n.get("password_".concat(t?"invalid":"label"));case 19:this.label.textContent=r.sent;case 20:case"end":return r.stop()}}),_callee,this,[[4,11]])}))),function open(){return i.apply(this,arguments)})},{key:"close",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:if(this.overlayManager.active===this.dialog){this.overlayManager.close(this.dialog);this.input.value="";this.input.type="hidden"}case 1:case"end":return t.stop()}}),_callee2,this)}))),function close(){return r.apply(this,arguments)})},{key:"setUpdateCallback",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t,r){return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:if(!_classPrivateFieldGet(this,o)){i.next=3;break}i.next=3;return _classPrivateFieldGet(this,o).promise;case 3:_classPrivateFieldSet(this,l,t);_classPrivateFieldSet(this,u,r);case 5:case"end":return i.stop()}}),_callee3,this)}))),function setUpdateCallback(r,i){return t.apply(this,arguments)})}]);var t,r,i;return PasswordPrompt}();r.PasswordPrompt=p;function _verify2(){var t=this.input.value;(null==t?void 0:t.length)>0&&_classPrivateMethodGet(this,d,_invokeCallback2).call(this,t)}function _cancel2(){_classPrivateMethodGet(this,d,_invokeCallback2).call(this,new Error("PasswordPrompt cancelled."));_classPrivateFieldGet(this,o).resolve()}function _invokeCallback2(t){if(_classPrivateFieldGet(this,l)){this.close();this.input.value="";_classPrivateFieldGet(this,l).call(this,t);_classPrivateFieldSet(this,l,null)}}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(190);i(122);i(123);i(299);i(196);i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.PDFAttachmentViewer=void 0;i(126);i(42);i(88);i(92);i(293);i(95);var a=i(286),o=i(301),l=i(289);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}var u=new WeakSet,c=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PDFAttachmentViewer,t);var r,i=_createSuper(PDFAttachmentViewer);function PDFAttachmentViewer(t){var r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFAttachmentViewer);_classPrivateMethodInitSpec(_assertThisInitialized(r=i.call(this,t)),u);r.downloadManager=t.downloadManager;r.eventBus._on("fileattachmentannotation",function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}(_assertThisInitialized(r),u,_appendAttachment2).bind(_assertThisInitialized(r)));return r}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFAttachmentViewer,[{key:"reset",value:function reset(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];_get(_getPrototypeOf(PDFAttachmentViewer.prototype),"reset",this).call(this);this._attachments=null;t||(this._renderedCapability=new a.PromiseCapability);this._pendingDispatchEvent=!1}},{key:"_dispatchEvent",value:(r=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:this._renderedCapability.resolve();if(0!==t||this._pendingDispatchEvent){r.next=7;break}this._pendingDispatchEvent=!0;r.next=5;return(0,l.waitOnEventOrTimeout)({target:this.eventBus,name:"annotationlayerrendered",delay:1e3});case 5:if(this._pendingDispatchEvent){r.next=7;break}return r.abrupt("return");case 7:this._pendingDispatchEvent=!1;this.eventBus.dispatch("attachmentsloaded",{source:this,attachmentsCount:t});case 9:case"end":return r.stop()}}),_callee,this)}))),function _dispatchEvent(t){return r.apply(this,arguments)})},{key:"_bindLink",value:function _bindLink(t,r){var i=this,a=r.content,o=r.filename;t.onclick=function(){i.downloadManager.openOrDownloadData(t,a,o);return!1}}},{key:"render",value:function render(t){var r=t.attachments,i=t.keepRenderedCapability,o=void 0!==i&&i;this._attachments&&this.reset(o);this._attachments=r||null;if(r){var l=document.createDocumentFragment(),u=0;for(var c in r){var h=r[c],d=h.content,p=(0,a.getFilenameFromUrl)(h.filename,!0),v=document.createElement("div");v.className="treeItem";var y=document.createElement("a");this._bindLink(y,{content:d,filename:p});y.textContent=this._normalizeTextContent(p);v.append(y);l.append(v);u++}this._finishRendering(l,u)}else this._dispatchEvent(0)}}]);return PDFAttachmentViewer}(o.BaseTreeViewer);r.PDFAttachmentViewer=c;function _appendAttachment2(t){var r=this,i=t.filename,a=t.content,o=this._renderedCapability.promise;o.then((function(){if(o===r._renderedCapability.promise){var t=r._attachments||Object.create(null);for(var l in t)if(i===l)return;t[i]={filename:i,content:a};r.render({attachments:t,keepRenderedCapability:!0})}}))}},(t,r,i)=>{var a=i(67),o=i(34),l=i(27),u=i(31),c=i(300),h=i(68),d=i(81);a({target:"Reflect",stat:!0},{get:function get(t,r){var i,a,p=arguments.length<3?t:arguments[2];return u(t)===p?t[r]:(i=h.f(t,r))?c(i)?i.value:void 0===i.get?void 0:o(i.get,p):l(a=d(t))?get(a,r,p):void 0}})},(t,r,i)=>{var a=i(5);t.exports=function(t){return void 0!==t&&(a(t,"value")||a(t,"writable"))}},(t,r,i)=>{i(185);i(222);i(192);i(92);i(206);i(219);i(1);i(42);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.BaseTreeViewer=void 0;i(126);i(135);i(136);i(98);i(120);i(88);i(138);var a=i(239);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var o="selected",l=function(){function BaseTreeViewer(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BaseTreeViewer);if(this.constructor===BaseTreeViewer)throw new Error("Cannot initialize BaseTreeViewer.");this.container=t.container;this.eventBus=t.eventBus;this.reset()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(BaseTreeViewer,[{key:"reset",value:function reset(){this._pdfDocument=null;this._lastToggleIsShow=!0;this._currentTreeItem=null;this.container.textContent="";this.container.classList.remove("treeWithDeepNesting")}},{key:"_dispatchEvent",value:function _dispatchEvent(t){throw new Error("Not implemented: _dispatchEvent")}},{key:"_bindLink",value:function _bindLink(t,r){throw new Error("Not implemented: _bindLink")}},{key:"_normalizeTextContent",value:function _normalizeTextContent(t){return(0,a.removeNullCharacters)(t,!0)||"–"}},{key:"_addToggleButton",value:function _addToggleButton(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=document.createElement("div");a.className="treeItemToggler";i&&a.classList.add("treeItemsHidden");a.onclick=function(i){i.stopPropagation();a.classList.toggle("treeItemsHidden");if(i.shiftKey){var o=!a.classList.contains("treeItemsHidden");r._toggleTreeItem(t,o)}};t.prepend(a)}},{key:"_toggleTreeItem",value:function _toggleTreeItem(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._lastToggleIsShow=r;var i,a=_createForOfIteratorHelper(t.querySelectorAll(".treeItemToggler"));try{for(a.s();!(i=a.n()).done;){i.value.classList.toggle("treeItemsHidden",!r)}}catch(t){a.e(t)}finally{a.f()}}},{key:"_toggleAllTreeItems",value:function _toggleAllTreeItems(){this._toggleTreeItem(this.container,!this._lastToggleIsShow)}},{key:"_finishRendering",value:function _finishRendering(t,r){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]){this.container.classList.add("treeWithDeepNesting");this._lastToggleIsShow=!t.querySelector(".treeItemsHidden")}this.container.append(t);this._dispatchEvent(r)}},{key:"render",value:function render(t){throw new Error("Not implemented: render")}},{key:"_updateCurrentTreeItem",value:function _updateCurrentTreeItem(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this._currentTreeItem){this._currentTreeItem.classList.remove(o);this._currentTreeItem=null}if(t){t.classList.add(o);this._currentTreeItem=t}}},{key:"_scrollToCurrentTreeItem",value:function _scrollToCurrentTreeItem(t){if(t){for(var r=t.parentNode;r&&r!==this.container;){if(r.classList.contains("treeItem")){var i=r.firstElementChild;null==i||i.classList.remove("treeItemsHidden")}r=r.parentNode}this._updateCurrentTreeItem(t);this.container.scrollTo(t.offsetLeft,t.offsetTop+-100)}}}]);return BaseTreeViewer}();r.BaseTreeViewer=l},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFCursorTools=void 0;i(88);i(142);i(198);i(126);i(42);i(92);i(283);i(95);i(293);var a=i(286),o=i(239),l=i(303);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var u=new WeakMap,c=new WeakMap,h=new WeakSet,d=function(){function PDFCursorTools(t){var r=this,i=t.container,a=t.eventBus,l=t.cursorToolOnLoad,d=void 0===l?o.CursorTool.SELECT:l;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFCursorTools);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,h);_classPrivateFieldInitSpec(this,u,{writable:!0,value:o.CursorTool.SELECT});_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});this.container=i;this.eventBus=a;(function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i})(this,h,_addEventListeners2).call(this);Promise.resolve().then((function(){r.switchTool(d)}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFCursorTools,[{key:"activeTool",get:function get(){return _classPrivateFieldGet(this,u)}},{key:"switchTool",value:function switchTool(t){var r=this;if(null===_classPrivateFieldGet(this,c)&&t!==_classPrivateFieldGet(this,u)){var i=function disableActiveTool(){switch(_classPrivateFieldGet(r,u)){case o.CursorTool.SELECT:break;case o.CursorTool.HAND:r._handTool.deactivate();case o.CursorTool.ZOOM:}};switch(t){case o.CursorTool.SELECT:i();break;case o.CursorTool.HAND:i();this._handTool.activate();break;case o.CursorTool.ZOOM:default:globalThis.ngxConsole.error('switchTool: "'.concat(t,'" is an unsupported value.'));return}_classPrivateFieldSet(this,u,t);this.eventBus.dispatch("cursortoolchanged",{source:this,tool:t})}}},{key:"_handTool",get:function get(){return(0,a.shadow)(this,"_handTool",new l.GrabToPan({element:this.container}))}}]);return PDFCursorTools}();r.PDFCursorTools=d;function _addEventListeners2(){var t=this;this.eventBus._on("switchcursortool",(function(r){t.switchTool(r.tool)}));var r=a.AnnotationEditorType.NONE,i=o.PresentationModeState.NORMAL,l=function disableActive(){var r,i=_classPrivateFieldGet(t,u);t.switchTool(o.CursorTool.SELECT);null!==(r=_classPrivateFieldGet(t,c))&&void 0!==r||_classPrivateFieldSet(t,c,i)},h=function enableActive(){var l=_classPrivateFieldGet(t,c);if(null!==l&&r===a.AnnotationEditorType.NONE&&i===o.PresentationModeState.NORMAL){_classPrivateFieldSet(t,c,null);t.switchTool(l)}};this.eventBus._on("secondarytoolbarreset",(function(l){if(null!==_classPrivateFieldGet(t,c)){r=a.AnnotationEditorType.NONE;i=o.PresentationModeState.NORMAL;h()}}));this.eventBus._on("annotationeditormodechanged",(function(t){var i=t.mode;r=i;i===a.AnnotationEditorType.NONE?h():l()}));this.eventBus._on("presentationmodechanged",(function(t){var r=t.state;i=r;r===o.PresentationModeState.NORMAL?h():r===o.PresentationModeState.FULLSCREEN&&l()}))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.GrabToPan=void 0;i(126);i(42);i(88);i(92);i(293);i(95);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var a="grab-to-pan-grab",o=new WeakSet,l=new WeakSet,u=new WeakSet,c=function(){function GrabToPan(t){var r=t.element;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GrabToPan);_classPrivateMethodInitSpec(this,u);_classPrivateMethodInitSpec(this,l);_classPrivateMethodInitSpec(this,o);this.element=r;this.document=r.ownerDocument;this.activate=this.activate.bind(this);this.deactivate=this.deactivate.bind(this);this.toggle=this.toggle.bind(this);this._onMouseDown=_classPrivateMethodGet(this,o,_onMouseDown2).bind(this);this._onMouseMove=_classPrivateMethodGet(this,l,_onMouseMove2).bind(this);this._endPan=_classPrivateMethodGet(this,u,_endPan2).bind(this);(this.overlay=document.createElement("div")).className="grab-to-pan-grabbing"}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(GrabToPan,[{key:"activate",value:function activate(){if(!this.active){this.active=!0;this.element.addEventListener("mousedown",this._onMouseDown);this.element.classList.add(a)}}},{key:"deactivate",value:function deactivate(){if(this.active){this.active=!1;this.element.removeEventListener("mousedown",this._onMouseDown);this._endPan();this.element.classList.remove(a)}}},{key:"toggle",value:function toggle(){this.active?this.deactivate():this.activate()}},{key:"ignoreTarget",value:function ignoreTarget(t){return!!document.querySelector(".stf__item")||t.matches("a[href], a[href] *, input, textarea, button, button *, select, option")}}]);return GrabToPan}();r.GrabToPan=c;function _onMouseDown2(t){if(0===t.button&&!this.ignoreTarget(t.target)){if(t.originalTarget)try{t.originalTarget.tagName}catch(t){return}this.scrollLeftStart=this.element.scrollLeft;this.scrollTopStart=this.element.scrollTop;this.clientXStart=t.clientX;this.clientYStart=t.clientY;if(!isOverPerfectScrollbar(this.clientXStart,this.clientYStart,"ps__rail-x")&&!isOverPerfectScrollbar(this.clientXStart,this.clientYStart,"ps__rail-y")){this.document.addEventListener("mousemove",this._onMouseMove,!0);this.document.addEventListener("mouseup",this._endPan,!0);this.element.addEventListener("scroll",this._endPan,!0);t.preventDefault();t.stopPropagation();var r=document.activeElement;r&&!r.contains(t.target)&&r.blur()}}}function _onMouseMove2(t){this.element.removeEventListener("scroll",this._endPan,!0);if(1&t.buttons){var r=t.clientX-this.clientXStart,i=t.clientY-this.clientYStart;this.element.scrollTo({top:this.scrollTopStart-i,left:this.scrollLeftStart-r,behavior:"instant"});this.overlay.parentNode||document.body.append(this.overlay)}else this._endPan()}function _endPan2(){this.element.removeEventListener("scroll",this._endPan,!0);this.document.removeEventListener("mousemove",this._onMouseMove,!0);this.document.removeEventListener("mouseup",this._endPan,!0);this.overlay.remove()}function isOverPerfectScrollbar(t,r,i){var a=document.getElementsByClassName(i);if(a&&1===a.length){var o=a[0].getBoundingClientRect(),l=o.top,u=o.right,c=o.bottom,h=o.left;if(r>=l&&r<=c&&t<=u&&t>=h)return!0}return!1}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(126);i(135);i(136);i(98);i(120);i(1);i(179);i(185);i(222);i(192);i(206);i(219);i(175);i(176);i(177);i(178);i(190);i(182);Object.defineProperty(r,"__esModule",{value:!0});r.PDFDocumentProperties=void 0;i(216);i(199);i(42);i(88);i(142);i(92);i(95);i(305);i(217);i(283);i(293);i(138);var a=i(239),o=i(286);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=["en-us","en-lr","my"],u={"8.5x11":"Letter","8.5x14":"Legal"},c={"297x420":"A3","210x297":"A4"};function getPageName(t,r,i){var a=r?t.width:t.height,o=r?t.height:t.width;return i["".concat(a,"x").concat(o)]}var h=new WeakMap,d=new WeakSet,p=new WeakSet,v=new WeakSet,y=new WeakSet,g=new WeakSet,m=new WeakSet,b=function(){function PDFDocumentProperties(t,r,i,a,o){var u=this,c=t.dialog,b=t.fields,w=t.closeButton;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFDocumentProperties);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,g);_classPrivateMethodInitSpec(this,y);_classPrivateMethodInitSpec(this,v);_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,h,{writable:!0,value:null});this.dialog=c;this.fields=b;this.overlayManager=r;this.l10n=a;this._fileNameLookup=o;this.eventBus=i;_classPrivateMethodGet(this,d,_reset2).call(this);w.addEventListener("click",this.close.bind(this));this.overlayManager.register(this.dialog);i._on("pagechanging",(function(t){u._currentPageNumber=t.pageNumber}));i._on("rotationchanging",(function(t){u._pagesRotation=t.pagesRotation}));this._isNonMetricLocale=!0;a.getLanguage().then((function(t){u._isNonMetricLocale=l.includes(t)}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFDocumentProperties,[{key:"open",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,o,l,u,c,d,b,w,P,A,S,E,x,D,k=this;return _regeneratorRuntime().wrap((function _callee$(C){for(;;)switch(C.prev=C.next){case 0:C.next=2;return Promise.all([this.overlayManager.open(this.dialog),this._dataAvailableCapability.promise]);case 2:this.eventBus.dispatch("propertiesdialogopen",this);t=this._currentPageNumber;r=this._pagesRotation;if(!_classPrivateFieldGet(this,h)||t!==_classPrivateFieldGet(this,h)._currentPageNumber||r!==_classPrivateFieldGet(this,h)._pagesRotation){C.next=8;break}_classPrivateMethodGet(this,p,_updateUI2).call(this);return C.abrupt("return");case 8:C.next=10;return this.pdfDocument.getMetadata();case 10:i=C.sent;o=i.info;l=i.contentLength;C.next=15;return Promise.all([this._fileNameLookup(),_classPrivateMethodGet(this,v,_parseFileSize2).call(this,l),_classPrivateMethodGet(this,g,_parseDate2).call(this,o.CreationDate),_classPrivateMethodGet(this,g,_parseDate2).call(this,o.ModDate),this.pdfDocument.getPage(t).then((function(t){return _classPrivateMethodGet(k,y,_parsePageSize2).call(k,(0,a.getPageSizeInches)(t),r)})),_classPrivateMethodGet(this,m,_parseLinearization2).call(this,o.IsLinearized)]);case 15:u=C.sent;c=_slicedToArray(u,6);d=c[0];b=c[1];w=c[2];P=c[3];A=c[4];S=c[5];_classPrivateFieldSet(this,h,Object.freeze({fileName:d,fileSize:b,title:o.Title,author:o.Author,subject:o.Subject,keywords:o.Keywords,creationDate:w,modificationDate:P,creator:o.Creator,producer:o.Producer,version:o.PDFFormatVersion,pageCount:this.pdfDocument.numPages,pageSize:A,linearized:S,_currentPageNumber:t,_pagesRotation:r}));_classPrivateMethodGet(this,p,_updateUI2).call(this);C.next=27;return this.pdfDocument.getDownloadInfo();case 27:E=C.sent;x=E.length;if(l!==x){C.next=31;break}return C.abrupt("return");case 31:D=Object.assign(Object.create(null),_classPrivateFieldGet(this,h));C.next=34;return _classPrivateMethodGet(this,v,_parseFileSize2).call(this,x);case 34:D.fileSize=C.sent;_classPrivateFieldSet(this,h,Object.freeze(D));_classPrivateMethodGet(this,p,_updateUI2).call(this);case 37:case"end":return C.stop()}}),_callee,this)}))),function open(){return r.apply(this,arguments)})},{key:"close",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:this.overlayManager.close(this.dialog);this.eventBus.dispatch("propertiesdialogclose",this);case 2:case"end":return t.stop()}}),_callee2,this)}))),function close(){return t.apply(this,arguments)})},{key:"setDocument",value:function setDocument(t){if(this.pdfDocument){_classPrivateMethodGet(this,d,_reset2).call(this);_classPrivateMethodGet(this,p,_updateUI2).call(this,!0)}if(t){this.pdfDocument=t;this._dataAvailableCapability.resolve()}}}]);var t,r;return PDFDocumentProperties}();r.PDFDocumentProperties=b;function _reset2(){this.pdfDocument=null;_classPrivateFieldSet(this,h,null);this._dataAvailableCapability=new o.PromiseCapability;this._currentPageNumber=1;this._pagesRotation=0}function _updateUI2(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&_classPrivateFieldGet(this,h)){if(this.overlayManager.active===this.dialog)for(var t in this.fields){var r=_classPrivateFieldGet(this,h)[t];this.fields[t].textContent=r||0===r?r:"-"}}else for(var i in this.fields)this.fields[i].textContent="-"}function _parseFileSize2(){return _parseFileSize3.apply(this,arguments)}function _parseFileSize3(){_parseFileSize3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r,i,a=arguments;return _regeneratorRuntime().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:i=(r=(t=a.length>0&&void 0!==a[0]?a[0]:0)/1024)/1024;if(r){o.next=4;break}return o.abrupt("return",void 0);case 4:return o.abrupt("return",this.l10n.get("document_properties_".concat(i>=1?"mb":"kb"),{size_mb:i>=1&&(+i.toPrecision(3)).toLocaleString(),size_kb:i<1&&(+r.toPrecision(3)).toLocaleString(),size_b:t.toLocaleString()}));case 5:case"end":return o.stop()}}),_callee3,this)})));return _parseFileSize3.apply(this,arguments)}function _parsePageSize2(t,r){return _parsePageSize3.apply(this,arguments)}function _parsePageSize3(){return(_parsePageSize3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t,r){var i,o,l,h,d,p,v,y,g,m,b,w,P,A;return _regeneratorRuntime().wrap((function _callee4$(S){for(;;)switch(S.prev=S.next){case 0:if(t){S.next=2;break}return S.abrupt("return",void 0);case 2:r%180!=0&&(t={width:t.height,height:t.width});i=(0,a.isPortraitOrientation)(t);o={width:Math.round(100*t.width)/100,height:Math.round(100*t.height)/100};l={width:Math.round(25.4*t.width*10)/10,height:Math.round(25.4*t.height*10)/10};if(!((h=getPageName(o,i,u)||getPageName(l,i,c))||Number.isInteger(l.width)&&Number.isInteger(l.height))){d={width:25.4*t.width,height:25.4*t.height};p={width:Math.round(l.width),height:Math.round(l.height)};if(Math.abs(d.width-p.width)<.1&&Math.abs(d.height-p.height)<.1&&(h=getPageName(p,i,c))){o={width:Math.round(p.width/25.4*100)/100,height:Math.round(p.height/25.4*100)/100};l=p}}S.next=10;return Promise.all([this._isNonMetricLocale?o:l,this.l10n.get("document_properties_page_size_unit_".concat(this._isNonMetricLocale?"inches":"millimeters")),h&&this.l10n.get("document_properties_page_size_name_".concat(h.toLowerCase())),this.l10n.get("document_properties_page_size_orientation_".concat(i?"portrait":"landscape"))]);case 10:v=S.sent;y=_slicedToArray(v,4);g=y[0];m=g.width;b=g.height;w=y[1];P=y[2];A=y[3];return S.abrupt("return",this.l10n.get("document_properties_page_size_dimension_".concat(P?"name_":"","string"),{width:m.toLocaleString(),height:b.toLocaleString(),unit:w,name:P,orientation:A}));case 19:case"end":return S.stop()}}),_callee4,this)})))).apply(this,arguments)}function _parseDate2(t){return _parseDate3.apply(this,arguments)}function _parseDate3(){return(_parseDate3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r;return _regeneratorRuntime().wrap((function _callee5$(i){for(;;)switch(i.prev=i.next){case 0:if(r=o.PDFDateString.toDateObject(t)){i.next=3;break}return i.abrupt("return",void 0);case 3:return i.abrupt("return",this.l10n.get("document_properties_date_string",{date:r.toLocaleDateString(),time:r.toLocaleTimeString()}));case 4:case"end":return i.stop()}}),_callee5,this)})))).apply(this,arguments)}function _parseLinearization2(t){return this.l10n.get("document_properties_linearized_".concat(t?"yes":"no"))}},(t,r,i)=>{var a=i(67),o=i(246),l=i(8),u=i(27),c=i(243).onFreeze,h=Object.freeze;a({target:"Object",stat:!0,forced:l((function(){h(1)})),sham:!o},{freeze:function freeze(t){return h&&u(t)?h(c(t)):t}})},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFFindBar=void 0;i(88);i(142);i(126);i(42);i(92);i(293);i(95);var a=i(307),o=i(239);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=new WeakSet,u=function(){function PDFFindBar(t,r,i){var a,o=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFFindBar);_classPrivateMethodInitSpec(this,l);this.opened=!1;this.bar=t.bar;this.toggleButton=t.toggleButton;this.findField=t.findField;this.highlightAll=t.highlightAllCheckbox;this.currentPage=t.findCurrentPageCheckbox;this.pageRange=t.findPageRangeField;this.caseSensitive=t.caseSensitiveCheckbox;this.matchDiacritics=t.matchDiacriticsCheckbox;this.entireWord=t.entireWordCheckbox;this.findMsg=t.findMsg;this.findResultsCount=t.findResultsCount;this.findPreviousButton=t.findPreviousButton;this.findNextButton=t.findNextButton;this.eventBus=r;this.l10n=i;this.toggleButton.addEventListener("click",(function(){o.toggle()}));this.findField.addEventListener("input",(function(){o.dispatchEvent("")}));this.bar.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:t.target===o.findField&&o.dispatchEvent("again",t.shiftKey);break;case 27:o.close()}}));this.findPreviousButton.addEventListener("click",(function(){o.dispatchEvent("again",!0)}));this.findNextButton.addEventListener("click",(function(){o.dispatchEvent("again",!1)}));this.highlightAll.addEventListener("click",(function(){o.dispatchEvent("highlightallchange")}));this.caseSensitive.addEventListener("click",(function(){o.dispatchEvent("casesensitivitychange")}));this.entireWord.addEventListener("click",(function(){o.dispatchEvent("entirewordchange")}));null===(a=this.matchDiacritics)||void 0===a||a.addEventListener("click",(function(){o.dispatchEvent("diacriticmatchingchange")}));this.eventBus._on("resize",_classPrivateMethodGet(this,l,_adjustWidth2).bind(this))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFFindBar,[{key:"reset",value:function reset(){this.updateUIState()}},{key:"dispatchEvent",value:function dispatchEvent(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.eventBus.dispatch("find",{source:this,type:t,query:this.findField.value,caseSensitive:this.caseSensitive.checked,entireWord:this.entireWord.checked,highlightAll:this.highlightAll.checked,findPrevious:r,matchDiacritics:this.matchDiacritics.checked})}},{key:"updateUIState",value:function updateUIState(t,r,i){var o=this,u=Promise.resolve(""),c="";switch(t){case a.FindState.FOUND:break;case a.FindState.PENDING:c="pending";break;case a.FindState.NOT_FOUND:u=this.l10n.get("find_not_found");c="notFound";break;case a.FindState.WRAPPED:u=this.l10n.get("find_reached_".concat(r?"top":"bottom"))}this.findField.setAttribute("data-status",c);this.findField.setAttribute("aria-invalid",t===a.FindState.NOT_FOUND);u.then((function(t){o.findMsg.setAttribute("data-status",c);o.findMsg.textContent=t;_classPrivateMethodGet(o,l,_adjustWidth2).call(o)}));this.updateResultsCount(i)}},{key:"updateResultsCount",value:function updateResultsCount(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.current,a=void 0===i?0:i,o=r.total,u=void 0===o?0:o,c=Promise.resolve("");if(u>0)if(u>1e3){c=this.l10n.get("find_match_count_limit",{limit:1e3})}else{c=this.l10n.get("find_match_count",{current:a,total:u})}c.then((function(r){t.findResultsCount.textContent=r;_classPrivateMethodGet(t,l,_adjustWidth2).call(t)}))}},{key:"open",value:function open(){if(!this.opened){this.opened=!0;(0,o.toggleExpandedBtn)(this.toggleButton,!0,this.bar)}this.findField.select();this.findField.focus();this.dispatchEvent("");this.eventBus.dispatch("findbaropen",{source:this});_classPrivateMethodGet(this,l,_adjustWidth2).call(this)}},{key:"close",value:function close(){if(this.opened){this.opened=!1;(0,o.toggleExpandedBtn)(this.toggleButton,!1,this.bar);this.eventBus.dispatch("findbarclose",{source:this})}}},{key:"toggle",value:function toggle(){this.opened?this.close():this.open()}}]);return PDFFindBar}();r.PDFFindBar=u;function _adjustWidth2(){if(this.opened){this.bar.classList.remove("wrapContainers");this.bar.clientHeight>this.bar.firstElementChild.clientHeight&&this.bar.classList.add("wrapContainers")}}},(t,r,i)=>{i(192);i(219);i(98);i(120);i(1);i(126);i(135);i(136);i(138);Object.defineProperty(r,"__esModule",{value:!0});r.PDFFindController=r.FindState=void 0;i(42);i(88);i(252);i(92);i(254);i(265);i(267);i(269);i(271);i(273);i(275);i(95);i(240);i(206);i(179);i(187);i(216);i(308);i(309);i(310);i(222);i(248);i(311);i(185);i(283);i(293);i(292);i(312);i(195);i(115);i(251);i(278);i(142);var a=i(239),o=i(313),l=i(286);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}var u={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};r.FindState=u;var c,h={"‐":"-","‘":"'","’":"'","‚":"'","‛":"'","“":'"',"”":'"',"„":'"',"‟":'"',"¼":"1/4","½":"1/2","¾":"3/4"},d=new Set([12441,12442,2381,2509,2637,2765,2893,3021,3149,3277,3387,3388,3405,3530,3642,3770,3972,4153,4154,5908,5940,6098,6752,6980,7082,7083,7154,7155,11647,43014,43052,43204,43347,43456,43766,44013,3158,3953,3954,3962,3963,3964,3965,3968,3956]),p=/(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])+/g,v=/([\$\(-\+\.\?\[-\^\{-\}])|((?:[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]))|([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)|((?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]))|((?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]))/g,y=/((?:[\0-\u02FF\u0370-\u0482\u048A-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u060F\u061B-\u064A\u0660-\u066F\u0671-\u06D5\u06DD\u06DE\u06E5\u06E6\u06E9\u06EE-\u0710\u0712-\u072F\u074B-\u07A5\u07B1-\u07EA\u07F4-\u07FC\u07FE-\u0815\u081A\u0824\u0828\u082E-\u0858\u085C-\u0897\u08A0-\u08C9\u08E2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0964-\u0980\u0984-\u09BB\u09BD\u09C5\u09C6\u09C9\u09CA\u09CE-\u09D6\u09D8-\u09E1\u09E4-\u09FD\u09FF\u0A00\u0A04-\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A6F\u0A72-\u0A74\u0A76-\u0A80\u0A84-\u0ABB\u0ABD\u0AC6\u0ACA\u0ACE-\u0AE1\u0AE4-\u0AF9\u0B00\u0B04-\u0B3B\u0B3D\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B61\u0B64-\u0B81\u0B83-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE-\u0BD6\u0BD8-\u0BFF\u0C05-\u0C3B\u0C3D\u0C45\u0C49\u0C4E-\u0C54\u0C57-\u0C61\u0C64-\u0C80\u0C84-\u0CBB\u0CBD\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CE1\u0CE4-\u0CF2\u0CF4-\u0CFF\u0D04-\u0D3A\u0D3D\u0D45\u0D49\u0D4E-\u0D56\u0D58-\u0D61\u0D64-\u0D80\u0D84-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF4-\u0E30\u0E32\u0E33\u0E3B-\u0E46\u0E4F-\u0EB0\u0EB2\u0EB3\u0EBD-\u0EC7\u0ECF-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F40-\u0F70\u0F85\u0F88-\u0F8C\u0F98\u0FBD-\u0FC5\u0FC7-\u102A\u103F-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u109E-\u135C\u1360-\u1711\u1716-\u1731\u1735-\u1751\u1754-\u1771\u1774-\u17B3\u17D4-\u17DC\u17DE-\u180A\u180E\u1810-\u1884\u1887-\u18A8\u18AA-\u191F\u192C-\u192F\u193C-\u1A16\u1A1C-\u1A54\u1A5F\u1A7D\u1A7E\u1A80-\u1AAF\u1ACF-\u1AFF\u1B05-\u1B33\u1B45-\u1B6A\u1B74-\u1B7F\u1B83-\u1BA0\u1BAE-\u1BE5\u1BF4-\u1C23\u1C38-\u1CCF\u1CD3\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA-\u1DBF\u1E00-\u20CF\u20F1-\u2CEE\u2CF2-\u2D7E\u2D80-\u2DDF\u2E00-\u3029\u3030-\u3098\u309B-\uA66E\uA673\uA67E-\uA69D\uA6A0-\uA6EF\uA6F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA828-\uA82B\uA82D-\uA87F\uA882-\uA8B3\uA8C6-\uA8DF\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA954-\uA97F\uA984-\uA9B2\uA9C1-\uA9E4\uA9E6-\uAA28\uAA37-\uAA42\uAA44-\uAA4B\uAA4E-\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2-\uAAEA\uAAF0-\uAAF4\uAAF7-\uABE2\uABEB\uABEE-\uD7FF\uE000-\uFB1D\uFB1F-\uFDFF\uFE10-\uFE1F\uFE30-\uFFFF]|\uD800[\uDC00-\uDDFC\uDDFE-\uDEDF\uDEE1-\uDF75\uDF7B-\uDFFF]|[\uD801\uD808-\uD80C\uD80E-\uD819\uD81C-\uD82E\uD830-\uD832\uD835\uD837\uD83B-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDE00\uDE04\uDE07-\uDE0B\uDE10-\uDE37\uDE3B-\uDE3E\uDE40-\uDEE4\uDEE7-\uDFFF]|\uD803[\uDC00-\uDD23\uDD28-\uDEAA\uDEAD-\uDEFC\uDF00-\uDF45\uDF51-\uDF81\uDF86-\uDFFF]|\uD804[\uDC03-\uDC37\uDC47-\uDC6F\uDC71\uDC72\uDC75-\uDC7E\uDC83-\uDCAF\uDCBB-\uDCC1\uDCC3-\uDCFF\uDD03-\uDD26\uDD35-\uDD44\uDD47-\uDD72\uDD74-\uDD7F\uDD83-\uDDB2\uDDC1-\uDDC8\uDDCD\uDDD0-\uDE2B\uDE38-\uDE3D\uDE3F\uDE40\uDE42-\uDEDE\uDEEB-\uDEFF\uDF04-\uDF3A\uDF3D\uDF45\uDF46\uDF49\uDF4A\uDF4E-\uDF56\uDF58-\uDF61\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC00-\uDC34\uDC47-\uDC5D\uDC5F-\uDCAF\uDCC4-\uDDAE\uDDB6\uDDB7\uDDC1-\uDDDB\uDDDE-\uDE2F\uDE41-\uDEAA\uDEB8-\uDF1C\uDF2C-\uDFFF]|\uD806[\uDC00-\uDC2B\uDC3B-\uDD2F\uDD36\uDD39\uDD3A\uDD3F\uDD41\uDD44-\uDDD0\uDDD8\uDDD9\uDDE1-\uDDE3\uDDE5-\uDE00\uDE0B-\uDE32\uDE3A\uDE3F-\uDE46\uDE48-\uDE50\uDE5C-\uDE89\uDE9A-\uDFFF]|\uD807[\uDC00-\uDC2E\uDC37\uDC40-\uDC91\uDCA8\uDCB7-\uDD30\uDD37-\uDD39\uDD3B\uDD3E\uDD46\uDD48-\uDD89\uDD8F\uDD92\uDD98-\uDEF2\uDEF7-\uDEFF\uDF02\uDF04-\uDF33\uDF3B-\uDF3D\uDF43-\uDFFF]|\uD80D[\uDC00-\uDC3F\uDC41-\uDC46\uDC56-\uDFFF]|\uD81A[\uDC00-\uDEEF\uDEF5-\uDF2F\uDF37-\uDFFF]|\uD81B[\uDC00-\uDF4E\uDF50\uDF88-\uDF8E\uDF93-\uDFE3\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD82F[\uDC00-\uDC9C\uDC9F-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDC8E\uDC90-\uDD2F\uDD37-\uDEAD\uDEAF-\uDEEB\uDEF0-\uDFFF]|\uD839[\uDC00-\uDCEB\uDCF0-\uDFFF]|\uD83A[\uDC00-\uDCCF\uDCD7-\uDD43\uDD4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*$/,g=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])*((?:[\0-\u02FF\u0370-\u0482\u048A-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u060F\u061B-\u064A\u0660-\u066F\u0671-\u06D5\u06DD\u06DE\u06E5\u06E6\u06E9\u06EE-\u0710\u0712-\u072F\u074B-\u07A5\u07B1-\u07EA\u07F4-\u07FC\u07FE-\u0815\u081A\u0824\u0828\u082E-\u0858\u085C-\u0897\u08A0-\u08C9\u08E2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0964-\u0980\u0984-\u09BB\u09BD\u09C5\u09C6\u09C9\u09CA\u09CE-\u09D6\u09D8-\u09E1\u09E4-\u09FD\u09FF\u0A00\u0A04-\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A6F\u0A72-\u0A74\u0A76-\u0A80\u0A84-\u0ABB\u0ABD\u0AC6\u0ACA\u0ACE-\u0AE1\u0AE4-\u0AF9\u0B00\u0B04-\u0B3B\u0B3D\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B61\u0B64-\u0B81\u0B83-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE-\u0BD6\u0BD8-\u0BFF\u0C05-\u0C3B\u0C3D\u0C45\u0C49\u0C4E-\u0C54\u0C57-\u0C61\u0C64-\u0C80\u0C84-\u0CBB\u0CBD\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CE1\u0CE4-\u0CF2\u0CF4-\u0CFF\u0D04-\u0D3A\u0D3D\u0D45\u0D49\u0D4E-\u0D56\u0D58-\u0D61\u0D64-\u0D80\u0D84-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF4-\u0E30\u0E32\u0E33\u0E3B-\u0E46\u0E4F-\u0EB0\u0EB2\u0EB3\u0EBD-\u0EC7\u0ECF-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F40-\u0F70\u0F85\u0F88-\u0F8C\u0F98\u0FBD-\u0FC5\u0FC7-\u102A\u103F-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u109E-\u135C\u1360-\u1711\u1716-\u1731\u1735-\u1751\u1754-\u1771\u1774-\u17B3\u17D4-\u17DC\u17DE-\u180A\u180E\u1810-\u1884\u1887-\u18A8\u18AA-\u191F\u192C-\u192F\u193C-\u1A16\u1A1C-\u1A54\u1A5F\u1A7D\u1A7E\u1A80-\u1AAF\u1ACF-\u1AFF\u1B05-\u1B33\u1B45-\u1B6A\u1B74-\u1B7F\u1B83-\u1BA0\u1BAE-\u1BE5\u1BF4-\u1C23\u1C38-\u1CCF\u1CD3\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA-\u1DBF\u1E00-\u20CF\u20F1-\u2CEE\u2CF2-\u2D7E\u2D80-\u2DDF\u2E00-\u3029\u3030-\u3098\u309B-\uA66E\uA673\uA67E-\uA69D\uA6A0-\uA6EF\uA6F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA828-\uA82B\uA82D-\uA87F\uA882-\uA8B3\uA8C6-\uA8DF\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA954-\uA97F\uA984-\uA9B2\uA9C1-\uA9E4\uA9E6-\uAA28\uAA37-\uAA42\uAA44-\uAA4B\uAA4E-\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2-\uAAEA\uAAF0-\uAAF4\uAAF7-\uABE2\uABEB\uABEE-\uD7FF\uE000-\uFB1D\uFB1F-\uFDFF\uFE10-\uFE1F\uFE30-\uFFFF]|\uD800[\uDC00-\uDDFC\uDDFE-\uDEDF\uDEE1-\uDF75\uDF7B-\uDFFF]|[\uD801\uD808-\uD80C\uD80E-\uD819\uD81C-\uD82E\uD830-\uD832\uD835\uD837\uD83B-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD802[\uDC00-\uDE00\uDE04\uDE07-\uDE0B\uDE10-\uDE37\uDE3B-\uDE3E\uDE40-\uDEE4\uDEE7-\uDFFF]|\uD803[\uDC00-\uDD23\uDD28-\uDEAA\uDEAD-\uDEFC\uDF00-\uDF45\uDF51-\uDF81\uDF86-\uDFFF]|\uD804[\uDC03-\uDC37\uDC47-\uDC6F\uDC71\uDC72\uDC75-\uDC7E\uDC83-\uDCAF\uDCBB-\uDCC1\uDCC3-\uDCFF\uDD03-\uDD26\uDD35-\uDD44\uDD47-\uDD72\uDD74-\uDD7F\uDD83-\uDDB2\uDDC1-\uDDC8\uDDCD\uDDD0-\uDE2B\uDE38-\uDE3D\uDE3F\uDE40\uDE42-\uDEDE\uDEEB-\uDEFF\uDF04-\uDF3A\uDF3D\uDF45\uDF46\uDF49\uDF4A\uDF4E-\uDF56\uDF58-\uDF61\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC00-\uDC34\uDC47-\uDC5D\uDC5F-\uDCAF\uDCC4-\uDDAE\uDDB6\uDDB7\uDDC1-\uDDDB\uDDDE-\uDE2F\uDE41-\uDEAA\uDEB8-\uDF1C\uDF2C-\uDFFF]|\uD806[\uDC00-\uDC2B\uDC3B-\uDD2F\uDD36\uDD39\uDD3A\uDD3F\uDD41\uDD44-\uDDD0\uDDD8\uDDD9\uDDE1-\uDDE3\uDDE5-\uDE00\uDE0B-\uDE32\uDE3A\uDE3F-\uDE46\uDE48-\uDE50\uDE5C-\uDE89\uDE9A-\uDFFF]|\uD807[\uDC00-\uDC2E\uDC37\uDC40-\uDC91\uDCA8\uDCB7-\uDD30\uDD37-\uDD39\uDD3B\uDD3E\uDD46\uDD48-\uDD89\uDD8F\uDD92\uDD98-\uDEF2\uDEF7-\uDEFF\uDF02\uDF04-\uDF33\uDF3B-\uDF3D\uDF43-\uDFFF]|\uD80D[\uDC00-\uDC3F\uDC41-\uDC46\uDC56-\uDFFF]|\uD81A[\uDC00-\uDEEF\uDEF5-\uDF2F\uDF37-\uDFFF]|\uD81B[\uDC00-\uDF4E\uDF50\uDF88-\uDF8E\uDF93-\uDFE3\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD82F[\uDC00-\uDC9C\uDC9F-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDC8E\uDC90-\uDD2F\uDD37-\uDEAD\uDEAF-\uDEEB\uDEF0-\uDFFF]|\uD839[\uDC00-\uDCEB\uDCF0-\uDFFF]|\uD83A[\uDC00-\uDCCF\uDCD7-\uDD43\uDD4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]))/,m=/[\uAC00-\uD7AF\uFA6C\uFACF-\uFAD1\uFAD5-\uFAD7]+/g,b=new Map,w="[\\u1100-\\u1112\\ud7a4-\\ud7af\\ud84a\\ud84c\\ud850\\ud854\\ud857\\ud85f]",P=new Map,A=null,S=null;function normalize(t){for(var r,i,a=[];null!==(r=m.exec(t));){var l,u=r.index,c=_createForOfIteratorHelper(r[0]);try{for(c.s();!(l=c.n()).done;){var d=l.value,v=b.get(d);if(!v){v=d.normalize("NFD").length;b.set(d,v)}a.push([v,u++])}}catch(t){c.e(t)}finally{c.f()}}if(0===a.length&&A)i=A;else if(a.length>0&&S)i=S;else{var y=Object.keys(h).join(""),g=(0,o.getNormalizeWithNFKC)(),E="([".concat(y,"])|([").concat(g,"])|(").concat("(?:゙|゚)","\\n)|(\\p{M}+(?:-\\n)?)|(\\S-\\n)|(").concat("(?:\\p{Ideographic}|[぀-ヿ])","\\n)|(\\n)");i=0===a.length?A=new RegExp(E+"|(\\u0000)","gum"):S=new RegExp(E+"|(".concat(w,")"),"gum")}for(var x=[];null!==(r=p.exec(t));)x.push([r[0].length,r.index]);var D=t.normalize("NFD"),k=[[0,0]],C=0,T=0,I=0,O=0,M=0,L=!1;D=D.replace(i,(function(t,r,i,o,l,u,c,d,p,v){var y;v-=O;if(r){for(var g=h[r],m=g.length,b=1;b<m;b++)k.push([v-I+b,I-b]);I-=m-1;return g}if(i){var w=P.get(i);if(!w){w=i.normalize("NFKC");P.set(i,w)}for(var A=w.length,S=1;S<A;S++)k.push([v-I+S,I-S]);I-=A-1;return w}if(o){var E;L=!0;if(v+M===(null===(E=x[C])||void 0===E?void 0:E[1]))++C;else{k.push([v-1-I+1,I-1]);I-=1;O+=1}k.push([v-I+1,I]);O+=1;M+=1;return o.charAt(0)}if(l){var D,R=l.endsWith("\n"),G=R?l.length-2:l.length;L=!0;var B=G;if(v+M===(null===(D=x[C])||void 0===D?void 0:D[1])){B-=x[C][0];++C}for(var j=1;j<=B;j++)k.push([v-1-I+j,I-j]);I-=B;O+=B;if(R){v+=G-1;k.push([v-I+1,1+I]);I+=1;O+=1;M+=1;return l.slice(0,G)}return l}if(u){var N=u.length-2;k.push([v-I+N,1+I]);I+=1;O+=1;M+=1;return u.slice(0,-2)}if(c){var W=c.length-1;k.push([v-I+W,I]);O+=1;M+=1;return c.slice(0,-1)}if(d){k.push([v-I+1,I-1]);I-=1;O+=1;M+=1;return" "}if(v+M===(null===(y=a[T])||void 0===y?void 0:y[1])){var V=a[T][0]-1;++T;for(var U=1;U<=V;U++)k.push([v-(I-U),I-U]);I-=V;O+=V}return p}));k.push([D.length,I]);return[D,k,L]}function getOriginalIndex(t,r,i){if(!t)return[r,i];var o=r,l=r+i-1,u=(0,a.binarySearchFirstItem)(t,(function(t){return t[0]>=o}));t[u][0]>o&&--u;var c=(0,a.binarySearchFirstItem)(t,(function(t){return t[0]>=l}),u);t[c][0]>l&&--c;var h=o+t[u][1];return[h,l+t[c][1]+1-h]}var E=new WeakMap,x=new WeakMap,D=new WeakMap,k=new WeakSet,C=new WeakSet,T=new WeakMap,I=new WeakSet,O=new WeakSet,M=new WeakSet,L=new WeakSet,R=new WeakSet,G=new WeakSet,B=new WeakSet,j=new WeakSet,N=new WeakSet,W=new WeakSet,V=new WeakSet,U=new WeakSet,H=new WeakSet,z=new WeakSet,q=new WeakSet,Y=new WeakSet,K=new WeakSet,X=function(){function PDFFindController(t){var r=t.linkService,i=t.eventBus,a=t.updateMatchesCountOnProgress,o=void 0===a||a,l=t.pageViewMode;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFFindController);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,Y);_classPrivateMethodInitSpec(this,q);_classPrivateMethodInitSpec(this,z);_classPrivateMethodInitSpec(this,H);_classPrivateMethodInitSpec(this,U);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,W);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,R);_classPrivateMethodInitSpec(this,L);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,I);_classPrivateFieldInitSpec(this,T,{get:_get_query,set:void 0});_classPrivateMethodInitSpec(this,C);_classPrivateMethodInitSpec(this,k);_classPrivateFieldInitSpec(this,E,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:!0});_classPrivateFieldInitSpec(this,D,{writable:!0,value:0});this._linkService=r;this._eventBus=i;_classPrivateFieldSet(this,x,o);this._pageViewMode=l;this.onIsPageVisible=null;_classPrivateMethodGet(this,C,_reset2).call(this);i._on("find",_classPrivateMethodGet(this,k,_onFind2).bind(this));i._on("findbarclose",_classPrivateMethodGet(this,z,_onFindBarClose2).bind(this))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFFindController,[{key:"highlightMatches",get:function get(){return this._highlightMatches}},{key:"pageMatches",get:function get(){return this._pageMatches}},{key:"pageMatchesLength",get:function get(){return this._pageMatchesLength}},{key:"selected",get:function get(){return this._selected}},{key:"state",get:function get(){return _classPrivateFieldGet(this,E)}},{key:"setDocument",value:function setDocument(t){this._pdfDocument&&_classPrivateMethodGet(this,C,_reset2).call(this);if(t){this._pdfDocument=t;this._firstPageCapability.resolve()}}},{key:"scrollMatchIntoView",value:function scrollMatchIntoView(t){var r=t.element,i=void 0===r?null:r,o=t.selectedLeft,l=void 0===o?0:o,u=t.pageIndex,c=void 0===u?-1:u,h=t.matchIndex,d=void 0===h?-1:h;if(this._scrollMatches&&i&&-1!==d&&d===this._selected.matchIdx&&-1!==c&&c===this._selected.pageIdx){this._scrollMatches=!1;var p={top:-50,left:l+-400};(0,a.scrollIntoView)(i,p,!0,"infinite-scroll"===this._pageViewMode)}}}]);return PDFFindController}();r.PDFFindController=X;function _onFind2(t){var r=this;if(t){if(!1===t.phraseSearch){console.error("The `phraseSearch`-parameter was removed, please provide an Array of strings in the `query`-parameter instead.");"string"==typeof t.query&&(t.query=t.query.match(/\S+/g))}var i=this._pdfDocument,a=t.type;(null===_classPrivateFieldGet(this,E)||_classPrivateMethodGet(this,I,_shouldDirtyMatch2).call(this,t))&&(this._dirtyMatch=!0);_classPrivateFieldSet(this,E,t);if("highlightallchange"!==a)_classPrivateMethodGet(this,K,_updateUIState2).call(this,u.PENDING);else{var o,l=this._pageMatches.some((function(t){return t.length>0})),c=!(null!==(o=this.state)&&void 0!==o&&o.query)||l;_classPrivateMethodGet(this,K,_updateUIState2).call(this,c?u.FOUND:u.NOT_FOUND)}this._firstPageCapability.promise.then((function(){if(r._pdfDocument&&(!i||r._pdfDocument===i)){_classPrivateMethodGet(r,G,_extractText2).call(r);var t=!r._highlightMatches,o=!!r._findTimeout;if(r._findTimeout){clearTimeout(r._findTimeout);r._findTimeout=null}if(a)if(r._dirtyMatch)_classPrivateMethodGet(r,N,_nextMatch2).call(r);else if("again"===a){_classPrivateMethodGet(r,N,_nextMatch2).call(r);t&&_classPrivateFieldGet(r,E).highlightAll&&_classPrivateMethodGet(r,j,_updateAllPages2).call(r)}else if("highlightallchange"===a){o?_classPrivateMethodGet(r,N,_nextMatch2).call(r):r._highlightMatches=!0;_classPrivateMethodGet(r,j,_updateAllPages2).call(r)}else _classPrivateMethodGet(r,N,_nextMatch2).call(r);else r._findTimeout=setTimeout((function(){_classPrivateMethodGet(r,N,_nextMatch2).call(r);r._findTimeout=null}),250)}}))}}function _reset2(){this._highlightMatches=!1;this._scrollMatches=!1;this._pdfDocument=null;this._pageMatches=[];this._pageMatchesLength=[];_classPrivateFieldSet(this,D,0);_classPrivateFieldSet(this,E,null);this._selected={pageIdx:-1,matchIdx:-1};this._offset={pageIdx:null,matchIdx:null,wrapped:!1};this._extractTextPromises=[];this._pageContents=[];this._pageDiffs=[];this._hasDiacritics=[];this._matchesCountTotal=0;this._pagesToSearch=null;this._pendingFindMatches=new Set;this._resumePageIdx=null;this._dirtyMatch=!1;clearTimeout(this._findTimeout);this._findTimeout=null;this._firstPageCapability=new l.PromiseCapability}function _get_query(){var t=_classPrivateFieldGet(this,E).query;if("string"==typeof t){if(t!==this._rawQuery){this._rawQuery=t;var r=_slicedToArray(normalize(t),1);this._normalizedQuery=r[0]}return this._normalizedQuery}return(t||[]).filter((function(t){return!!t})).map((function(t){return normalize(t)[0]}))}function _shouldDirtyMatch2(t){var r,i,a=t.query,o=_classPrivateFieldGet(this,E).query,l=_typeof(a);if(l!==_typeof(o))return!0;if("string"===l){if(a!==o)return!0}else if(JSON.stringify(a)!==JSON.stringify(o))return!0;switch(t.type){case"again":var u=this._selected.pageIdx+1,c=this._linkService;return u>=1&&u<=c.pagesCount&&u!==c.page&&!(null===(r=null===(i=this.onIsPageVisible)||void 0===i?void 0:i.call(this,u))||void 0===r||r);case"highlightallchange":return!1}return!0}function _isEntireWord2(t,r,i){var a=t.slice(0,r).match(y);if(a){var l=t.charCodeAt(r),u=a[1].charCodeAt(0);if((0,o.getCharacterType)(l)===(0,o.getCharacterType)(u))return!1}if(a=t.slice(r+i).match(g)){var c=t.charCodeAt(r+i-1),h=a[1].charCodeAt(0);if((0,o.getCharacterType)(c)===(0,o.getCharacterType)(h))return!1}return!0}function _calculateRegExpMatch2(t,r,i,a){var o=this._pageMatches[i]=[],l=this._pageMatchesLength[i]=[];if(t)for(var u,c=this._pageDiffs[i];null!==(u=t.exec(a));)if(!r||_classPrivateMethodGet(this,O,_isEntireWord2).call(this,a,u.index,u[0].length)){var h=_slicedToArray(getOriginalIndex(c,u.index,u[0].length),2),d=h[0],p=h[1];if(p){o.push(d);l.push(p)}}}function _convertToRegExpString2(t,r){var i=_classPrivateFieldGet(this,E).matchDiacritics,a=!1,o="[ ]*";(t=t.replaceAll(v,(function(t,o,l,u,c,h){if(o)return"[ ]*\\".concat(o,"[ ]*");if(l)return"[ ]*".concat(l,"[ ]*");if(u)return"[ ]+";if(i)return c||h;if(c)return d.has(c.charCodeAt(0))?c:"";if(r){a=!0;return"".concat(h,"\\p{M}*")}return h}))).endsWith(o)&&(t=t.slice(0,t.length-4));if(i&&r){c||(c=String.fromCharCode.apply(String,_toConsumableArray(d)));a=!0;t="".concat(t,"(?=[").concat(c,"]|[^\\p{M}]|$)")}return[a,t]}function _calculateMatch2(t){var r,i=this,a=_classPrivateFieldGet(this,T);if(0!==a.length){var o=_classPrivateFieldGet(this,E),l=o.caseSensitive,u=o.entireWord,c=this._pageContents[t],h=this._hasDiacritics[t],d=!1;if("string"==typeof a){var p=_slicedToArray(_classPrivateMethodGet(this,L,_convertToRegExpString2).call(this,a,h),2);d=p[0];a=p[1]}else a=a.sort().reverse().map((function(t){var r=_slicedToArray(_classPrivateMethodGet(i,L,_convertToRegExpString2).call(i,t,h),2),a=r[0],o=r[1];d||(d=a);return"(".concat(o,")")})).join("|");var v="g".concat(d?"u":"").concat(l?"":"i");a=a?new RegExp(a,v):null;_classPrivateMethodGet(this,M,_calculateRegExpMatch2).call(this,a,u,t,c);_classPrivateFieldGet(this,E).highlightAll&&_classPrivateMethodGet(this,B,_updatePage2).call(this,t);if(this._resumePageIdx===t){this._resumePageIdx=null;_classPrivateMethodGet(this,V,_nextPageMatch2).call(this)}var y=this._pageMatches[t].length;this._matchesCountTotal+=y;_classPrivateFieldGet(this,x)?y>0&&_classPrivateMethodGet(this,Y,_updateUIResultsCount2).call(this):_classPrivateFieldSet(this,D,(r=_classPrivateFieldGet(this,D),++r))===this._linkService.pagesCount&&_classPrivateMethodGet(this,Y,_updateUIResultsCount2).call(this)}}function _extractText2(){var t=this;if(!(this._extractTextPromises.length>0))for(var r=Promise.resolve(),i={disableNormalization:!0},a=function _loop(a){var o=new l.PromiseCapability;t._extractTextPromises[a]=o.promise;r=r.then((function(){return t._pdfDocument.getPage(a+1).then((function(t){return t.getTextContent(i)})).then((function(r){var i,l=[],u=_createForOfIteratorHelper(r.items);try{for(u.s();!(i=u.n()).done;){var c=i.value;l.push(c.str);c.hasEOL&&l.push("\n")}}catch(t){u.e(t)}finally{u.f()}var h=_slicedToArray(normalize(l.join("")),3);t._pageContents[a]=h[0];t._pageDiffs[a]=h[1];t._hasDiacritics[a]=h[2];o.resolve()}),(function(r){console.error("Unable to get text content for page ".concat(a+1),r);t._pageContents[a]="";t._pageDiffs[a]=null;t._hasDiacritics[a]=!1;o.resolve()}))}))},o=0,u=this._linkService.pagesCount;o<u;o++)a(o)}function _updatePage2(t){this._scrollMatches&&this._selected.pageIdx===t&&(this._linkService.page=t+1);this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:t})}function _updateAllPages2(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}function _nextMatch2(){var t=this,r=_classPrivateFieldGet(this,E).findPrevious,i=this._linkService.page-1,a=this._linkService.pagesCount;this._highlightMatches=!0;if(this._dirtyMatch){this._dirtyMatch=!1;this._selected.pageIdx=this._selected.matchIdx=-1;this._offset.pageIdx=i;this._offset.matchIdx=null;this._offset.wrapped=!1;this._resumePageIdx=null;this._pageMatches.length=0;this._pageMatchesLength.length=0;_classPrivateFieldSet(this,D,0);this._matchesCountTotal=0;_classPrivateMethodGet(this,j,_updateAllPages2).call(this);for(var o=function _loop2(r){if(t._pendingFindMatches.has(r))return 1;t._pendingFindMatches.add(r);t._extractTextPromises[r].then((function(){t._pendingFindMatches.delete(r);_classPrivateMethodGet(t,R,_calculateMatch2).call(t,r)}))},l=0;l<a;l++)o(l)}if(0!==_classPrivateFieldGet(this,T).length){if(!this._resumePageIdx){var c=this._offset;this._pagesToSearch=a;if(null!==c.matchIdx){var h=this._pageMatches[c.pageIdx].length;if(!r&&c.matchIdx+1<h||r&&c.matchIdx>0){c.matchIdx=r?c.matchIdx-1:c.matchIdx+1;_classPrivateMethodGet(this,H,_updateMatch2).call(this,!0);return}_classPrivateMethodGet(this,U,_advanceOffsetPage2).call(this,r)}_classPrivateMethodGet(this,V,_nextPageMatch2).call(this)}}else _classPrivateMethodGet(this,K,_updateUIState2).call(this,u.FOUND)}function _matchesReady2(t){var r=this._offset,i=t.length,a=_classPrivateFieldGet(this,E).findPrevious;if(i){r.matchIdx=a?i-1:0;_classPrivateMethodGet(this,H,_updateMatch2).call(this,!0);return!0}_classPrivateMethodGet(this,U,_advanceOffsetPage2).call(this,a);if(r.wrapped){r.matchIdx=null;if(this._pagesToSearch<0){_classPrivateMethodGet(this,H,_updateMatch2).call(this,!1);return!0}}return!1}function _nextPageMatch2(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");var t=null;do{var r=this._offset.pageIdx;if(!(t=this._pageMatches[r])){this._resumePageIdx=r;break}}while(!_classPrivateMethodGet(this,W,_matchesReady2).call(this,t))}function _advanceOffsetPage2(t){var r=this._offset,i=this._linkService.pagesCount;r.pageIdx=t?r.pageIdx-1:r.pageIdx+1;r.matchIdx=null;this._pagesToSearch--;if(r.pageIdx>=i||r.pageIdx<0){r.pageIdx=t?i-1:0;r.wrapped=!0}}function _updateMatch2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=u.NOT_FOUND,i=this._offset.wrapped;this._offset.wrapped=!1;if(t){var a=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx;this._selected.matchIdx=this._offset.matchIdx;r=i?u.WRAPPED:u.FOUND;-1!==a&&a!==this._selected.pageIdx&&_classPrivateMethodGet(this,B,_updatePage2).call(this,a)}_classPrivateMethodGet(this,K,_updateUIState2).call(this,r,_classPrivateFieldGet(this,E).findPrevious);if(-1!==this._selected.pageIdx){this._scrollMatches=!0;_classPrivateMethodGet(this,B,_updatePage2).call(this,this._selected.pageIdx)}}function _onFindBarClose2(t){var r=this,i=this._pdfDocument;this._firstPageCapability.promise.then((function(){if(r._pdfDocument&&(!i||r._pdfDocument===i)){if(r._findTimeout){clearTimeout(r._findTimeout);r._findTimeout=null}if(r._resumePageIdx){r._resumePageIdx=null;r._dirtyMatch=!0}_classPrivateMethodGet(r,K,_updateUIState2).call(r,u.FOUND);r._highlightMatches=!1;_classPrivateMethodGet(r,j,_updateAllPages2).call(r)}}))}function _requestMatchesCount2(){var t=this._selected,r=t.pageIdx,i=t.matchIdx,a=0,o=this._matchesCountTotal;if(-1!==i){for(var l=0;l<r;l++){var u;a+=(null===(u=this._pageMatches[l])||void 0===u?void 0:u.length)||0}a+=i+1}(a<1||a>o)&&(a=o=0);return{current:a,total:o}}function _updateUIResultsCount2(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:_classPrivateMethodGet(this,q,_requestMatchesCount2).call(this)})}function _updateUIState2(t){var r,i,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(_classPrivateFieldGet(this,x)||_classPrivateFieldGet(this,D)===this._linkService.pagesCount&&t!==u.PENDING)&&this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:t,previous:a,matchesCount:_classPrivateMethodGet(this,q,_requestMatchesCount2).call(this),rawQuery:null!==(r=null===(i=_classPrivateFieldGet(this,E))||void 0===i?void 0:i.query)&&void 0!==r?r:null})}},(t,r,i)=>{var a=i(24),o=i(4),l=i(6),u=i(78),c=i(129),h=i(64),d=i(76).f,p=i(37),v=i(202),y=i(94),g=i(223),m=i(209),b=i(128),w=i(70),P=i(8),A=i(5),S=i(62).enforce,E=i(145),x=i(13),D=i(210),k=i(211),C=x("match"),T=o.RegExp,I=T.prototype,O=o.SyntaxError,M=l(I.exec),L=l("".charAt),R=l("".replace),G=l("".indexOf),B=l("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,W=/a/g,V=new T(N)!==N,U=m.MISSED_STICKY,H=m.UNSUPPORTED_Y,z=a&&(!V||U||D||k||P((function(){W[C]=!1;return T(N)!==N||T(W)===W||"/a/i"!==String(T(N,"i"))})));if(u("RegExp",z)){for(var q=function RegExp(t,r){var i,a,o,l,u,d,m=p(I,this),b=v(t),w=void 0===r,P=[],E=t;if(!m&&b&&w&&t.constructor===q)return t;if(b||p(I,t)){t=t.source;w&&(r=g(E))}t=void 0===t?"":y(t);r=void 0===r?"":y(r);E=t;D&&"dotAll"in N&&(a=!!r&&G(r,"s")>-1)&&(r=R(r,/s/g,""));i=r;U&&"sticky"in N&&(o=!!r&&G(r,"y")>-1)&&H&&(r=R(r,/y/g,""));if(k){l=function(t){for(var r,i=t.length,a=0,o="",l=[],u={},c=!1,h=!1,d=0,p="";a<=i;a++){if("\\"===(r=L(t,a)))r+=L(t,++a);else if("]"===r)c=!1;else if(!c)switch(!0){case"["===r:c=!0;break;case"("===r:if(M(j,B(t,a+1))){a+=2;h=!0}o+=r;d++;continue;case">"===r&&h:if(""===p||A(u,p))throw new O("Invalid capture group name");u[p]=!0;l[l.length]=[p,d];h=!1;p="";continue}h?p+=r:o+=r}return[o,l]}(t);t=l[0];P=l[1]}u=c(T(t,r),m?this:I,q);if(a||o||P.length){d=S(u);if(a){d.dotAll=!0;d.raw=q(function(t){for(var r,i=t.length,a=0,o="",l=!1;a<=i;a++)if("\\"!==(r=L(t,a)))if(l||"."!==r){"["===r?l=!0:"]"===r&&(l=!1);o+=r}else o+="[\\s\\S]";else o+=r+L(t,++a);return o}(t),i)}o&&(d.sticky=!0);P.length&&(d.groups=P)}if(t!==E)try{h(u,"source",""===E?"(?:)":E)}catch(t){}return u},Y=d(T),K=0;Y.length>K;)b(q,T,Y[K++]);I.constructor=q;q.prototype=I;w(o,"RegExp",q,{constructor:!0})}E("RegExp")},(t,r,i)=>{var a=i(24),o=i(210),l=i(45),u=i(103),c=i(62).get,h=RegExp.prototype,d=TypeError;a&&o&&u(h,"dotAll",{configurable:!0,get:function dotAll(){if(this!==h){if("RegExp"===l(this))return!!c(this).dotAll;throw d("Incompatible receiver, RegExp required")}}})},(t,r,i)=>{var a=i(24),o=i(209).MISSED_STICKY,l=i(45),u=i(103),c=i(62).get,h=RegExp.prototype,d=TypeError;a&&o&&u(h,"sticky",{configurable:!0,get:function sticky(){if(this!==h){if("RegExp"===l(this))return!!c(this).sticky;throw d("Incompatible receiver, RegExp required")}}})},(t,r,i)=>{var a,o=i(67),l=i(107),u=i(68).f,c=i(56),h=i(94),d=i(201),p=i(10),v=i(203),y=i(15),g=l("".endsWith),m=l("".slice),b=Math.min,w=v("endsWith");o({target:"String",proto:!0,forced:!(!y&&!w&&!!(a=u(String.prototype,"endsWith"),a&&!a.writable))&&!w},{endsWith:function endsWith(t){var r=h(p(this));d(t);var i=arguments.length>1?arguments[1]:void 0,a=r.length,o=void 0===i?a:b(c(i),a),l=h(t);return g?g(r,l,o):m(r,o-l.length,o)===l}})},(t,r,i)=>{var a=i(67),o=i(105).map;a({target:"Array",proto:!0,forced:!i(186)("map")},{map:function map(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.CharacterType=void 0;r.getCharacterType=function getCharacterType(t){if(function isAlphabeticalScript(t){return t<11904}(t))return function isAscii(t){return 0==(65408&t)}(t)?function isAsciiSpace(t){return 32===t||9===t||13===t||10===t}(t)?a.SPACE:function isAsciiAlpha(t){return t>=97&&t<=122||t>=65&&t<=90}(t)||function isAsciiDigit(t){return t>=48&&t<=57}(t)||95===t?a.ALPHA_LETTER:a.PUNCT:function isThai(t){return 3584==(65408&t)}(t)?a.THAI_LETTER:160===t?a.SPACE:a.ALPHA_LETTER;if(function isHan(t){return t>=13312&&t<=40959||t>=63744&&t<=64255}(t))return a.HAN_LETTER;if(function isKatakana(t){return t>=12448&&t<=12543}(t))return a.KATAKANA_LETTER;if(function isHiragana(t){return t>=12352&&t<=12447}(t))return a.HIRAGANA_LETTER;if(function isHalfwidthKatakana(t){return t>=65376&&t<=65439}(t))return a.HALFWIDTH_KATAKANA_LETTER;return a.ALPHA_LETTER};r.getNormalizeWithNFKC=function getNormalizeWithNFKC(){i||(i=" ¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩");return i};var i,a={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};r.CharacterType=a},(t,r,i)=>{i(1);i(42);i(92);i(95);i(179);i(185);i(222);i(192);i(206);i(219);Object.defineProperty(r,"__esModule",{value:!0});r.PDFHistory=void 0;r.isDestArraysEqual=isDestArraysEqual;r.isDestHashesEqual=isDestHashesEqual;i(198);i(115);i(88);i(142);i(315);i(216);i(217);i(138);i(135);i(136);i(98);i(120);i(126);i(187);var a=i(239),o=i(289);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function getCurrentHash(){return document.location.hash}var l=function(){function PDFHistory(t){var r=this,i=t.linkService,a=t.eventBus;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFHistory);this.linkService=i;this.eventBus=a;this._initialized=!1;this._fingerprint="";this.reset();this._boundEvents=null;this.eventBus._on("pagesinit",(function(){r._isPagesLoaded=!1;r.eventBus._on("pagesloaded",(function(t){r._isPagesLoaded=!!t.pagesCount}),{once:!0})}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFHistory,[{key:"initialize",value:function initialize(t){var r=t.fingerprint,i=t.resetHistory,a=void 0!==i&&i,o=t.updateUrl,l=void 0!==o&&o;if(r&&"string"==typeof r){this._initialized&&this.reset();var u=""!==this._fingerprint&&this._fingerprint!==r;this._fingerprint=r;this._updateUrl=!0===l;this._initialized=!0;this._bindEvents();var c=window.history.state;this._popStateInProgress=!1;this._blockHashChange=0;this._currentHash=getCurrentHash();this._numPositionUpdates=0;this._uid=this._maxUid=0;this._destination=null;this._position=null;if(this._isValidState(c,!0)&&!a){var h=c.destination;this._updateInternalState(h,c.uid,!0);void 0!==h.rotation&&(this._initialRotation=h.rotation);if(h.dest){this._initialBookmark=JSON.stringify(h.dest);this._destination.page=null}else h.hash?this._initialBookmark=h.hash:h.page&&(this._initialBookmark="page=".concat(h.page))}else{var d=this._parseCurrentHash(!0),p=d.hash,v=d.page,y=d.rotation;if(!p||u||a){this._pushOrReplaceState(null,!0);return}this._pushOrReplaceState({hash:p,page:v,rotation:y},!0)}}else globalThis.ngxConsole.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.')}},{key:"reset",value:function reset(){if(this._initialized){this._pageHide();this._initialized=!1;this._unbindEvents()}if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._initialBookmark=null;this._initialRotation=null}},{key:"push",value:function push(t){var r=this,i=t.namedDest,a=void 0===i?null:i,o=t.explicitDest,l=t.pageNumber;if(this._initialized)if(a&&"string"!=typeof a)globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(a,'" is not a valid namedDest parameter.'));else if(Array.isArray(o))if(this._isValidPage(l)||null===l&&!this._destination){var u=a||JSON.stringify(o);if(u){var c=!1;if(this._destination&&(isDestHashesEqual(this._destination.hash,u)||isDestArraysEqual(this._destination.dest,o))){if(this._destination.page)return;c=!0}if(!this._popStateInProgress||c){this._pushOrReplaceState({dest:o,hash:u,page:l,rotation:this.linkService.rotation},c);if(!this._popStateInProgress){this._popStateInProgress=!0;Promise.resolve().then((function(){r._popStateInProgress=!1}))}}}}else globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(l,'" is not a valid pageNumber parameter.'));else globalThis.ngxConsole.error("PDFHistory.push: "+'"'.concat(o,'" is not a valid explicitDest parameter.'))}},{key:"pushPage",value:function pushPage(t){var r,i=this;if(this._initialized)if(this._isValidPage(t)){if((null===(r=this._destination)||void 0===r?void 0:r.page)!==t&&!this._popStateInProgress){this._pushOrReplaceState({dest:null,hash:"page=".concat(t),page:t,rotation:this.linkService.rotation});if(!this._popStateInProgress){this._popStateInProgress=!0;Promise.resolve().then((function(){i._popStateInProgress=!1}))}}}else globalThis.ngxConsole.error('PDFHistory.pushPage: "'.concat(t,'" is not a valid page number.'))}},{key:"pushCurrentPosition",value:function pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}},{key:"back",value:function back(){if(this._initialized&&!this._popStateInProgress){var t=window.history.state;this._isValidState(t)&&t.uid>0&&window.history.back()}}},{key:"forward",value:function forward(){if(this._initialized&&!this._popStateInProgress){var t=window.history.state;this._isValidState(t)&&t.uid<this._maxUid&&window.history.forward()}}},{key:"popStateInProgress",get:function get(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}},{key:"initialBookmark",get:function get(){return this._initialized?this._initialBookmark:null}},{key:"initialRotation",get:function get(){return this._initialized?this._initialRotation:null}},{key:"_pushOrReplaceState",value:function _pushOrReplaceState(t){var r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1]||!this._destination,a={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:t};this._updateInternalState(t,a.uid);if(this._updateUrl&&null!=t&&t.hash){var o=document.location.href.split("#")[0];o.startsWith("file://")||(r="".concat(o,"#").concat(t.hash))}i?window.history.replaceState(a,"",r):window.history.pushState(a,"",r)}},{key:"_tryPushCurrentPosition",value:function _tryPushCurrentPosition(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._position){var r=this._position;t&&((r=Object.assign(Object.create(null),this._position)).temporary=!0);if(this._destination){if(this._destination.temporary)this._pushOrReplaceState(r,!0);else if(this._destination.hash!==r.hash&&(this._destination.page||!(this._numPositionUpdates<=50))){var i=!1;if(this._destination.page>=r.first&&this._destination.page<=r.page){if(void 0!==this._destination.dest||!this._destination.first)return;i=!0}this._pushOrReplaceState(r,i)}}else this._pushOrReplaceState(r)}}},{key:"_isValidPage",value:function _isValidPage(t){return Number.isInteger(t)&&t>0&&t<=this.linkService.pagesCount}},{key:"_isValidState",value:function _isValidState(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return!1;if(t.fingerprint!==this._fingerprint){if(!r)return!1;if("string"!=typeof t.fingerprint||t.fingerprint.length!==this._fingerprint.length)return!1;var i=_slicedToArray(performance.getEntriesByType("navigation"),1)[0];if("reload"!==(null==i?void 0:i.type))return!1}return!(!Number.isInteger(t.uid)||t.uid<0)&&(null!==t.destination&&"object"===_typeof(t.destination))}},{key:"_updateInternalState",value:function _updateInternalState(t,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}i&&null!=t&&t.temporary&&delete t.temporary;this._destination=t;this._uid=r;this._maxUid=Math.max(this._maxUid,r);this._numPositionUpdates=0}},{key:"_parseCurrentHash",value:function _parseCurrentHash(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=unescape(getCurrentHash()).substring(1),i=(0,a.parseQueryString)(r),o=i.get("nameddest")||"",l=0|i.get("page");(!this._isValidPage(l)||t&&o.length>0)&&(l=null);return{hash:r,page:l,rotation:this.linkService.rotation}}},{key:"_updateViewarea",value:function _updateViewarea(t){var r=this,i=t.location;if(this._updateViewareaTimeout){clearTimeout(this._updateViewareaTimeout);this._updateViewareaTimeout=null}this._position={hash:i.pdfOpenParams.substring(1),page:this.linkService.page,first:i.pageNumber,rotation:i.rotation};if(!this._popStateInProgress){this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++;this._updateViewareaTimeout=setTimeout((function(){r._popStateInProgress||r._tryPushCurrentPosition(!0);r._updateViewareaTimeout=null}),1e3)}}},{key:"_popState",value:function _popState(t){var r=this,i=t.state,l=getCurrentHash(),u=this._currentHash!==l;this._currentHash=l;if(i){if(this._isValidState(i)){this._popStateInProgress=!0;if(u){this._blockHashChange++;(0,o.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then((function(){r._blockHashChange--}))}var c=i.destination;this._updateInternalState(c,i.uid,!0);(0,a.isValidRotation)(c.rotation)&&(this.linkService.rotation=c.rotation);c.dest?this.linkService.goToDestination(c.dest):c.hash?this.linkService.setHash(c.hash):c.page&&(this.linkService.page=c.page);Promise.resolve().then((function(){r._popStateInProgress=!1}))}}else{this._uid++;var h=this._parseCurrentHash(),d=h.hash,p=h.page,v=h.rotation;this._pushOrReplaceState({hash:d,page:p,rotation:v},!0)}}},{key:"_pageHide",value:function _pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}},{key:"_bindEvents",value:function _bindEvents(){if(!this._boundEvents){this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)};this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea);window.addEventListener("popstate",this._boundEvents.popState);window.addEventListener("pagehide",this._boundEvents.pageHide)}}},{key:"_unbindEvents",value:function _unbindEvents(){if(this._boundEvents){this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea);window.removeEventListener("popstate",this._boundEvents.popState);window.removeEventListener("pagehide",this._boundEvents.pageHide);this._boundEvents=null}}}]);return PDFHistory}();r.PDFHistory=l;function isDestHashesEqual(t,r){return"string"==typeof t&&"string"==typeof r&&(t===r||(0,a.parseQueryString)(t).get("nameddest")===r)}function isDestArraysEqual(t,r){function isEntryEqual(t,r){if(_typeof(t)!==_typeof(r))return!1;if(Array.isArray(t)||Array.isArray(r))return!1;if(null!==t&&"object"===_typeof(t)&&null!==r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var i in t)if(!isEntryEqual(t[i],r[i]))return!1;return!0}return t===r||Number.isNaN(t)&&Number.isNaN(r)}if(!Array.isArray(t)||!Array.isArray(r))return!1;if(t.length!==r.length)return!1;for(var i=0,a=t.length;i<a;i++)if(!isEntryEqual(t[i],r[i]))return!1;return!0}},(t,r,i)=>{var a,o=i(67),l=i(107),u=i(68).f,c=i(56),h=i(94),d=i(201),p=i(10),v=i(203),y=i(15),g=l("".startsWith),m=l("".slice),b=Math.min,w=v("startsWith");o({target:"String",proto:!0,forced:!(!y&&!w&&!!(a=u(String.prototype,"startsWith"),a&&!a.writable))&&!w},{startsWith:function startsWith(t){var r=h(p(this));d(t);var i=c(b(arguments.length>1?arguments[1]:void 0,r.length)),a=h(t);return g?g(r,a,i):m(r,i,i+a.length)===a}})},(t,r,i)=>{i(190);i(122);i(123);i(299);i(196);i(135);i(136);i(98);i(120);i(138);i(1);i(175);i(176);i(177);i(178);i(182);i(185);i(222);i(192);i(206);i(219);Object.defineProperty(r,"__esModule",{value:!0});r.PDFLayerViewer=void 0;i(88);i(142);i(179);i(126);i(42);i(92);i(293);i(95);var a=i(301);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var o=new WeakSet,l=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PDFLayerViewer,t);var r,i=_createSuper(PDFLayerViewer);function PDFLayerViewer(t){var r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFLayerViewer);_classPrivateMethodInitSpec(_assertThisInitialized(r=i.call(this,t)),o);r.l10n=t.l10n;r.eventBus._on("optionalcontentconfigchanged",(function(t){_classPrivateMethodGet(_assertThisInitialized(r),o,_updateLayers2).call(_assertThisInitialized(r),t.promise)}));r.eventBus._on("resetlayers",(function(){_classPrivateMethodGet(_assertThisInitialized(r),o,_updateLayers2).call(_assertThisInitialized(r))}));r.eventBus._on("togglelayerstree",r._toggleAllTreeItems.bind(_assertThisInitialized(r)));return r}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFLayerViewer,[{key:"reset",value:function reset(){_get(_getPrototypeOf(PDFLayerViewer.prototype),"reset",this).call(this);this._optionalContentConfig=null;this._optionalContentHash=null}},{key:"_dispatchEvent",value:function _dispatchEvent(t){this.eventBus.dispatch("layersloaded",{source:this,layersCount:t})}},{key:"_bindLink",value:function _bindLink(t,r){var i=this,a=r.groupId,o=r.input,l=function setVisibility(){i._optionalContentConfig.setVisibility(a,o.checked);i._optionalContentHash=i._optionalContentConfig.getHash();i.eventBus.dispatch("optionalcontentconfig",{source:i,promise:Promise.resolve(i._optionalContentConfig)})};t.onclick=function(r){if(r.target===o){l();return!0}if(r.target!==t)return!0;o.checked=!o.checked;l();return!1}}},{key:"_setNestedName",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t,r){var i,a;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:i=r.name;if("string"!=typeof(a=void 0===i?null:i)){o.next=4;break}t.textContent=this._normalizeTextContent(a);return o.abrupt("return");case 4:o.next=6;return this.l10n.get("additional_layers");case 6:t.textContent=o.sent;t.style.fontStyle="italic";case 8:case"end":return o.stop()}}),_callee,this)}))),function _setNestedName(t,i){return r.apply(this,arguments)})},{key:"_addToggleButton",value:function _addToggleButton(t,r){var i=r.name,a=void 0===i?null:i;_get(_getPrototypeOf(PDFLayerViewer.prototype),"_addToggleButton",this).call(this,t,null===a)}},{key:"_toggleAllTreeItems",value:function _toggleAllTreeItems(){this._optionalContentConfig&&_get(_getPrototypeOf(PDFLayerViewer.prototype),"_toggleAllTreeItems",this).call(this)}},{key:"render",value:function render(t){var r=t.optionalContentConfig,i=t.pdfDocument;this._optionalContentConfig&&this.reset();this._optionalContentConfig=r||null;this._pdfDocument=i||null;var a=null==r?void 0:r.getOrder();if(a){this._optionalContentHash=r.getHash();for(var o=document.createDocumentFragment(),l=[{parent:o,groups:a}],u=0,c=!1;l.length>0;){var h,d=l.shift(),p=_createForOfIteratorHelper(d.groups);try{for(p.s();!(h=p.n()).done;){var v=h.value,y=document.createElement("div");y.className="treeItem";var g=document.createElement("a");y.append(g);if("object"===_typeof(v)){c=!0;this._addToggleButton(y,v);this._setNestedName(g,v);var m=document.createElement("div");m.className="treeItems";y.append(m);l.push({parent:m,groups:v.order})}else{var b=r.getGroup(v),w=document.createElement("input");this._bindLink(g,{groupId:v,input:w});w.type="checkbox";w.checked=b.visible;var P=document.createElement("label");P.textContent=this._normalizeTextContent(b.name);P.append(w);g.append(P);u++}d.parent.append(y)}}catch(t){p.e(t)}finally{p.f()}}this._finishRendering(o,u,c)}else this._dispatchEvent(0)}}]);return PDFLayerViewer}(a.BaseTreeViewer);r.PDFLayerViewer=l;function _updateLayers2(){return _updateLayers3.apply(this,arguments)}function _updateLayers3(){_updateLayers3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,a=arguments;return _regeneratorRuntime().wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:t=a.length>0&&void 0!==a[0]?a[0]:null;if(this._optionalContentConfig){o.next=3;break}return o.abrupt("return");case 3:r=this._pdfDocument;o.next=6;return t||r.getOptionalContentConfig();case 6:i=o.sent;if(r===this._pdfDocument){o.next=9;break}return o.abrupt("return");case 9:if(!t){o.next=14;break}if(i.getHash()!==this._optionalContentHash){o.next=12;break}return o.abrupt("return");case 12:o.next=15;break;case 14:this.eventBus.dispatch("optionalcontentconfig",{source:this,promise:Promise.resolve(i)});case 15:this.render({optionalContentConfig:i,pdfDocument:this._pdfDocument});case 16:case"end":return o.stop()}}),_callee2,this)})));return _updateLayers3.apply(this,arguments)}},(t,r,i)=>{i(122);i(123);i(299);i(196);i(135);i(136);i(98);i(120);i(1);i(192);i(185);i(222);i(206);i(219);i(142);i(175);i(176);i(177);i(178);i(182);Object.defineProperty(r,"__esModule",{value:!0});r.PDFOutlineViewer=void 0;i(179);i(126);i(42);i(240);i(88);i(92);i(95);i(138);i(190);var a=i(301),o=i(286),l=i(239);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}(this,i)}}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}var u=function(t){!function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}(PDFOutlineViewer,t);var r,i,a=_createSuper(PDFOutlineViewer);function PDFOutlineViewer(t){var r;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFOutlineViewer);(r=a.call(this,t)).linkService=t.linkService;r.downloadManager=t.downloadManager;r.eventBus._on("toggleoutlinetree",r._toggleAllTreeItems.bind(_assertThisInitialized(r)));r.eventBus._on("currentoutlineitem",r._currentOutlineItem.bind(_assertThisInitialized(r)));r.eventBus._on("pagechanging",(function(t){r._currentPageNumber=t.pageNumber}));r.eventBus._on("pagesloaded",(function(t){r._isPagesLoaded=!!t.pagesCount;r._currentOutlineItemCapability&&!r._currentOutlineItemCapability.settled&&r._currentOutlineItemCapability.resolve(r._isPagesLoaded)}));r.eventBus._on("sidebarviewchanged",(function(t){r._sidebarView=t.view}));return r}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFOutlineViewer,[{key:"reset",value:function reset(){_get(_getPrototypeOf(PDFOutlineViewer.prototype),"reset",this).call(this);this._outline=null;this._pageNumberToDestHashCapability=null;this._currentPageNumber=1;this._isPagesLoaded=null;this._currentOutlineItemCapability&&!this._currentOutlineItemCapability.settled&&this._currentOutlineItemCapability.resolve(!1);this._currentOutlineItemCapability=null}},{key:"_dispatchEvent",value:function _dispatchEvent(t){var r;this._currentOutlineItemCapability=new o.PromiseCapability;0===t||null!==(r=this._pdfDocument)&&void 0!==r&&r.loadingParams.disableAutoFetch?this._currentOutlineItemCapability.resolve(!1):null!==this._isPagesLoaded&&this._currentOutlineItemCapability.resolve(this._isPagesLoaded);this.eventBus.dispatch("outlineloaded",{source:this,outlineCount:t,currentOutlineItemPromise:this._currentOutlineItemCapability.promise})}},{key:"_bindLink",value:function _bindLink(t,r){var i=this,a=r.url,o=r.newWindow,l=r.action,u=r.attachment,c=r.dest,h=r.setOCGState,d=this.linkService;if(a)d.addLinkAttributes(t,a,o);else if(l){t.href=d.getAnchorUrl("");t.onclick=function(){d.executeNamedAction(l);return!1}}else if(u){t.href=d.getAnchorUrl("");t.onclick=function(){i.downloadManager.openOrDownloadData(t,u.content,u.filename);return!1}}else if(h){t.href=d.getAnchorUrl("");t.onclick=function(){d.executeSetOCGState(h);return!1}}else{t.href=d.getDestinationHash(c);t.onclick=function(t){i._updateCurrentTreeItem(t.target.parentNode);c&&d.goToDestination(c);return!1}}}},{key:"_setStyles",value:function _setStyles(t,r){var i=r.bold,a=r.italic;i&&(t.style.fontWeight="bold");a&&(t.style.fontStyle="italic")}},{key:"_addToggleButton",value:function _addToggleButton(t,r){var i=r.count,a=r.items,o=!1;if(i<0){var l=a.length;if(l>0)for(var u=_toConsumableArray(a);u.length>0;){var c=u.shift(),h=c.count,d=c.items;if(h>0&&d.length>0){l+=d.length;u.push.apply(u,_toConsumableArray(d))}}Math.abs(i)===l&&(o=!0)}_get(_getPrototypeOf(PDFOutlineViewer.prototype),"_addToggleButton",this).call(this,t,o)}},{key:"_toggleAllTreeItems",value:function _toggleAllTreeItems(){this._outline&&_get(_getPrototypeOf(PDFOutlineViewer.prototype),"_toggleAllTreeItems",this).call(this)}},{key:"render",value:function render(t){var r=t.outline,i=t.pdfDocument;this._outline&&this.reset();this._outline=r||null;this._pdfDocument=i||null;if(r){for(var a=document.createDocumentFragment(),o=[{parent:a,items:r}],l=0,u=!1;o.length>0;){var c,h=o.shift(),d=_createForOfIteratorHelper(h.items);try{for(d.s();!(c=d.n()).done;){var p=c.value,v=document.createElement("div");v.className="treeItem";var y=document.createElement("a");this._bindLink(y,p);this._setStyles(y,p);y.textContent=this._normalizeTextContent(p.title);v.append(y);if(p.items.length>0){u=!0;this._addToggleButton(v,p);var g=document.createElement("div");g.className="treeItems";v.append(g);o.push({parent:g,items:p.items})}h.parent.append(v);l++}}catch(t){d.e(t)}finally{d.f()}}this._finishRendering(a,l,u)}else this._dispatchEvent(0)}},{key:"_currentOutlineItem",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,a;return _regeneratorRuntime().wrap((function _callee$(o){for(;;)switch(o.prev=o.next){case 0:if(this._isPagesLoaded){o.next=2;break}throw new Error("_currentOutlineItem: All pages have not been loaded.");case 2:if(this._outline&&this._pdfDocument){o.next=4;break}return o.abrupt("return");case 4:o.next=6;return this._getPageNumberToDestHash(this._pdfDocument);case 6:if(t=o.sent){o.next=9;break}return o.abrupt("return");case 9:this._updateCurrentTreeItem(null);if(this._sidebarView===l.SidebarView.OUTLINE){o.next=12;break}return o.abrupt("return");case 12:r=this._currentPageNumber;case 13:if(!(r>0)){o.next=25;break}if(i=t.get(r)){o.next=17;break}return o.abrupt("continue",22);case 17:if(a=this.container.querySelector('a[href="'.concat(i,'"]'))){o.next=20;break}return o.abrupt("continue",22);case 20:this._scrollToCurrentTreeItem(a.parentNode);return o.abrupt("break",25);case 22:r--;o.next=13;break;case 25:case"end":return o.stop()}}),_callee,this)}))),function _currentOutlineItem(){return i.apply(this,arguments)})},{key:"_getPageNumberToDestHash",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,a,l,u,c,h,d,p,v,y,g,m,b,w;return _regeneratorRuntime().wrap((function _callee2$(P){for(;;)switch(P.prev=P.next){case 0:if(!this._pageNumberToDestHashCapability){P.next=2;break}return P.abrupt("return",this._pageNumberToDestHashCapability.promise);case 2:this._pageNumberToDestHashCapability=new o.PromiseCapability;r=new Map,i=new Map;a=[{nesting:0,items:this._outline}];case 5:if(!(a.length>0)){P.next=56;break}l=a.shift(),u=l.nesting;c=_createForOfIteratorHelper(l.items);P.prev=8;c.s();case 10:if((h=c.n()).done){P.next=46;break}d=h.value,p=d.dest,v=d.items;y=void 0,g=void 0;if("string"!=typeof p){P.next=21;break}P.next=16;return t.getDestination(p);case 16:y=P.sent;if(t===this._pdfDocument){P.next=19;break}return P.abrupt("return",null);case 19:P.next=22;break;case 21:y=p;case 22:if(!Array.isArray(y)){P.next=43;break}m=_slicedToArray(y,1);if("object"!==_typeof(b=m[0])||null===b){P.next=41;break}if(g=this.linkService._cachedPageNumber(b)){P.next=39;break}P.prev=27;P.next=30;return t.getPageIndex(b);case 30:P.t0=P.sent;g=P.t0+1;if(t===this._pdfDocument){P.next=34;break}return P.abrupt("return",null);case 34:this.linkService.cachePageRef(g,b);P.next=39;break;case 37:P.prev=37;P.t1=P.catch(27);case 39:P.next=42;break;case 41:Number.isInteger(b)&&(g=b+1);case 42:if(Number.isInteger(g)&&(!r.has(g)||u>i.get(g))){w=this.linkService.getDestinationHash(p);r.set(g,w);i.set(g,u)}case 43:v.length>0&&a.push({nesting:u+1,items:v});case 44:P.next=10;break;case 46:P.next=51;break;case 48:P.prev=48;P.t2=P.catch(8);c.e(P.t2);case 51:P.prev=51;c.f();return P.finish(51);case 54:P.next=5;break;case 56:this._pageNumberToDestHashCapability.resolve(r.size>0?r:null);return P.abrupt("return",this._pageNumberToDestHashCapability.promise);case 58:case"end":return P.stop()}}),_callee2,this,[[8,48,51,54],[27,37]])}))),function _getPageNumberToDestHash(t){return r.apply(this,arguments)})}]);return PDFOutlineViewer}(a.BaseTreeViewer);r.PDFOutlineViewer=u},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFPresentationMode=void 0;i(126);i(42);i(88);i(92);i(283);i(95);i(293);var a=i(239),o=i(286);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=3e3,u="pdfPresentationMode",c="pdfPresentationModeControls",h=50,d=.1,p=50,v=Math.PI/6,y=new WeakMap,g=new WeakMap,m=new WeakSet,b=new WeakSet,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,E=new WeakSet,x=new WeakSet,D=new WeakSet,k=new WeakSet,C=new WeakSet,T=new WeakSet,I=new WeakSet,O=new WeakSet,M=new WeakSet,L=function(){function PDFPresentationMode(t){var r=t.container,i=t.pdfViewer,o=t.eventBus;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFPresentationMode);_classPrivateMethodInitSpec(this,M);_classPrivateMethodInitSpec(this,O);_classPrivateMethodInitSpec(this,I);_classPrivateMethodInitSpec(this,T);_classPrivateMethodInitSpec(this,C);_classPrivateMethodInitSpec(this,k);_classPrivateMethodInitSpec(this,D);_classPrivateMethodInitSpec(this,x);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);_classPrivateFieldInitSpec(this,y,{writable:!0,value:a.PresentationModeState.UNKNOWN});_classPrivateFieldInitSpec(this,g,{writable:!0,value:null});this.container=r;this.pdfViewer=i;this.eventBus=o;this.contextMenuOpen=!1;this.mouseScrollTimeStamp=0;this.mouseScrollDelta=0;this.touchSwipeState=null}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFPresentationMode,[{key:"request",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var t,r,i;return _regeneratorRuntime().wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:t=this.container,r=this.pdfViewer;if(!this.active&&r.pagesCount&&t.requestFullscreen){l.next=3;break}return l.abrupt("return",!1);case 3:_classPrivateMethodGet(this,O,_addFullscreenChangeListeners2).call(this);_classPrivateMethodGet(this,b,_notifyStateChange2).call(this,a.PresentationModeState.CHANGING);i=t.requestFullscreen();_classPrivateFieldSet(this,g,{pageNumber:r.currentPageNumber,scaleValue:r.currentScaleValue,scrollMode:r.scrollMode,spreadMode:null,annotationEditorMode:null});if(!(r.spreadMode===a.SpreadMode.NONE||r.pageViewsReady&&r.hasEqualPageSizes)){console.warn("Ignoring Spread modes when entering PresentationMode, since the document may contain varying page sizes.");_classPrivateFieldGet(this,g).spreadMode=r.spreadMode}r.annotationEditorMode!==o.AnnotationEditorType.DISABLE&&(_classPrivateFieldGet(this,g).annotationEditorMode=r.annotationEditorMode);l.prev=9;l.next=12;return i;case 12:r.focus();return l.abrupt("return",!0);case 16:l.prev=16;l.t0=l.catch(9);_classPrivateMethodGet(this,M,_removeFullscreenChangeListeners2).call(this);_classPrivateMethodGet(this,b,_notifyStateChange2).call(this,a.PresentationModeState.NORMAL);case 20:return l.abrupt("return",!1);case 21:case"end":return l.stop()}}),_callee,this,[[9,16]])}))),function request(){return t.apply(this,arguments)})},{key:"active",get:function get(){return _classPrivateFieldGet(this,y)===a.PresentationModeState.CHANGING||_classPrivateFieldGet(this,y)===a.PresentationModeState.FULLSCREEN}},{key:"_prepareFullscreenMode",value:function _prepareFullscreenMode(){var t=document.getElementsByClassName("zoom")[0].parentElement,r=t.parentElement;this.ngxContainer=r;for(var i=0;i<r.childElementCount;i++)r.children.item(i)===t&&(this.ngxContainerIndex=i);r.removeChild(t);document.body.append(t);for(var a=document.body.children,o=0;o<a.length;o++){var l=a.item(o);l!==t&&l instanceof HTMLElement&&l.classList.add("hidden-by-fullscreen")}document.getElementById("sidebarContainer").classList.add("hidden-by-fullscreen");document.getElementsByClassName("toolbar")[0].classList.add("hidden-by-fullscreen")}},{key:"_tidyUpFullscreenMode",value:function _tidyUpFullscreenMode(){if(this.ngxContainer){var t=document.getElementsByClassName("zoom")[0].parentElement;document.body.removeChild(t);this.ngxContainerIndex>=this.ngxContainer.childElementCount?this.ngxContainer.append(t):this.ngxContainer.insertBefore(t,this.ngxContainer.children.item(this.ngxContainerIndex));this.ngxContainer=void 0;for(var r=document.body.children,i=0;i<r.length;i++){var a=r.item(i);a!==t&&a instanceof HTMLElement&&a.classList.contains("hidden-by-fullscreen")&&a.classList.remove("hidden-by-fullscreen")}document.getElementById("sidebarContainer").classList.remove("hidden-by-fullscreen");document.getElementsByClassName("toolbar")[0].classList.remove("hidden-by-fullscreen")}}}]);var t;return PDFPresentationMode}();r.PDFPresentationMode=L;function _mouseWheel2(t){if(this.active){t.preventDefault();var r=(0,a.normalizeWheelEventDelta)(t),i=Date.now(),o=this.mouseScrollTimeStamp;if(!(i>o&&i-o<h)){(this.mouseScrollDelta>0&&r<0||this.mouseScrollDelta<0&&r>0)&&_classPrivateMethodGet(this,D,_resetMouseScrollState2).call(this);this.mouseScrollDelta+=r;if(Math.abs(this.mouseScrollDelta)>=d){var l=this.mouseScrollDelta;_classPrivateMethodGet(this,D,_resetMouseScrollState2).call(this);(l>0?this.pdfViewer.previousPage():this.pdfViewer.nextPage())&&(this.mouseScrollTimeStamp=i)}}}}function _notifyStateChange2(t){_classPrivateFieldSet(this,y,t);this.eventBus.dispatch("presentationmodechanged",{source:this,state:t})}function _enter2(){var t=this;_classPrivateMethodGet(this,b,_notifyStateChange2).call(this,a.PresentationModeState.FULLSCREEN);this.container.classList.add(u);setTimeout((function(){t.pdfViewer.scrollMode=a.ScrollMode.PAGE;null!==_classPrivateFieldGet(t,g).spreadMode&&(t.pdfViewer.spreadMode=a.SpreadMode.NONE);t.pdfViewer.currentPageNumber=_classPrivateFieldGet(t,g).pageNumber;t.pdfViewer.currentScaleValue="page-fit";null!==_classPrivateFieldGet(t,g).annotationEditorMode&&(t.pdfViewer.annotationEditorMode={mode:o.AnnotationEditorType.NONE})}),0);_classPrivateMethodGet(this,C,_addWindowListeners2).call(this);_classPrivateMethodGet(this,E,_showControls2).call(this);this.contextMenuOpen=!1;window.getSelection().removeAllRanges()}function _exit2(){var t=this,r=this.pdfViewer.currentPageNumber;this.container.classList.remove(u);setTimeout((function(){_classPrivateMethodGet(t,M,_removeFullscreenChangeListeners2).call(t);_classPrivateMethodGet(t,b,_notifyStateChange2).call(t,a.PresentationModeState.NORMAL);t.pdfViewer.scrollMode=_classPrivateFieldGet(t,g).scrollMode;null!==_classPrivateFieldGet(t,g).spreadMode&&(t.pdfViewer.spreadMode=_classPrivateFieldGet(t,g).spreadMode);t.pdfViewer.currentScaleValue=_classPrivateFieldGet(t,g).scaleValue;t.pdfViewer.currentPageNumber=r;null!==_classPrivateFieldGet(t,g).annotationEditorMode&&(t.pdfViewer.annotationEditorMode={mode:_classPrivateFieldGet(t,g).annotationEditorMode});_classPrivateFieldSet(t,g,null)}),0);_classPrivateMethodGet(this,T,_removeWindowListeners2).call(this);_classPrivateMethodGet(this,x,_hideControls2).call(this);_classPrivateMethodGet(this,D,_resetMouseScrollState2).call(this);this.contextMenuOpen=!1}function _mouseDown2(t){var r;if(this.contextMenuOpen){this.contextMenuOpen=!1;t.preventDefault()}else if(!(0!==t.button||t.target.href&&null!==(r=t.target.parentNode)&&void 0!==r&&r.hasAttribute("data-internal-link"))){t.preventDefault();t.shiftKey?this.pdfViewer.previousPage():this.pdfViewer.nextPage()}}function _contextMenu2(){this.contextMenuOpen=!0}function _showControls2(){var t=this;this.controlsTimeout?clearTimeout(this.controlsTimeout):this.container.classList.add(c);this.controlsTimeout=setTimeout((function(){t.container.classList.remove(c);delete t.controlsTimeout}),l)}function _hideControls2(){if(this.controlsTimeout){clearTimeout(this.controlsTimeout);this.container.classList.remove(c);delete this.controlsTimeout}}function _resetMouseScrollState2(){this.mouseScrollTimeStamp=0;this.mouseScrollDelta=0}function _touchSwipe2(t){if(this.active)if(t.touches.length>1)this.touchSwipeState=null;else switch(t.type){case"touchstart":this.touchSwipeState={startX:t.touches[0].pageX,startY:t.touches[0].pageY,endX:t.touches[0].pageX,endY:t.touches[0].pageY};break;case"touchmove":if(null===this.touchSwipeState)return;this.touchSwipeState.endX=t.touches[0].pageX;this.touchSwipeState.endY=t.touches[0].pageY;t.preventDefault();break;case"touchend":if(null===this.touchSwipeState)return;var r=0,i=this.touchSwipeState.endX-this.touchSwipeState.startX,a=this.touchSwipeState.endY-this.touchSwipeState.startY,o=Math.abs(Math.atan2(a,i));Math.abs(i)>p&&(o<=v||o>=Math.PI-v)?r=i:Math.abs(a)>p&&Math.abs(o-Math.PI/2)<=v&&(r=a);r>0?this.pdfViewer.previousPage():r<0&&this.pdfViewer.nextPage()}}function _addWindowListeners2(){this.showControlsBind=_classPrivateMethodGet(this,E,_showControls2).bind(this);this.mouseDownBind=_classPrivateMethodGet(this,A,_mouseDown2).bind(this);this.mouseWheelBind=_classPrivateMethodGet(this,m,_mouseWheel2).bind(this);this.resetMouseScrollStateBind=_classPrivateMethodGet(this,D,_resetMouseScrollState2).bind(this);this.contextMenuBind=_classPrivateMethodGet(this,S,_contextMenu2).bind(this);this.touchSwipeBind=_classPrivateMethodGet(this,k,_touchSwipe2).bind(this);window.addEventListener("mousemove",this.showControlsBind);window.addEventListener("mousedown",this.mouseDownBind);window.addEventListener("wheel",this.mouseWheelBind,{passive:!1});window.addEventListener("keydown",this.resetMouseScrollStateBind);window.addEventListener("contextmenu",this.contextMenuBind);window.addEventListener("touchstart",this.touchSwipeBind);window.addEventListener("touchmove",this.touchSwipeBind);window.addEventListener("touchend",this.touchSwipeBind)}function _removeWindowListeners2(){window.removeEventListener("mousemove",this.showControlsBind);window.removeEventListener("mousedown",this.mouseDownBind);window.removeEventListener("wheel",this.mouseWheelBind,{passive:!1});window.removeEventListener("keydown",this.resetMouseScrollStateBind);window.removeEventListener("contextmenu",this.contextMenuBind);window.removeEventListener("touchstart",this.touchSwipeBind);window.removeEventListener("touchmove",this.touchSwipeBind);window.removeEventListener("touchend",this.touchSwipeBind);delete this.showControlsBind;delete this.mouseDownBind;delete this.mouseWheelBind;delete this.resetMouseScrollStateBind;delete this.contextMenuBind;delete this.touchSwipeBind}function _fullscreenChange2(){document.fullscreenElement?_classPrivateMethodGet(this,w,_enter2).call(this):_classPrivateMethodGet(this,P,_exit2).call(this)}function _addFullscreenChangeListeners2(){this.fullscreenChangeBind=_classPrivateMethodGet(this,I,_fullscreenChange2).bind(this);window.addEventListener("fullscreenchange",this.fullscreenChangeBind)}function _removeFullscreenChangeListeners2(){window.removeEventListener("fullscreenchange",this.fullscreenChangeBind);delete this.fullscreenChangeBind}},(t,r,i)=>{i(1);i(42);i(92);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.PDFRenderingQueue=void 0;i(88);i(142);i(320);i(198);i(135);i(136);i(98);i(120);i(126);i(138);var a=i(286),o=i(239);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var l=function(){function PDFRenderingQueue(){var t=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFRenderingQueue);this.pdfViewer=null;this.pdfThumbnailViewer=null;this.onIdle=null;this.highestPriorityPage=null;this.idleTimeout=null;this.printing=!1;this.isThumbnailViewEnabled=!1;Object.defineProperty(this,"hasViewer",{value:function value(){return!!t.pdfViewer}})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFRenderingQueue,[{key:"setViewer",value:function setViewer(t){this.pdfViewer=t}},{key:"setThumbnailViewer",value:function setThumbnailViewer(t){this.pdfThumbnailViewer=t}},{key:"isHighestPriority",value:function isHighestPriority(t){return this.highestPriorityPage===t.renderingId}},{key:"renderHighestPriority",value:function renderHighestPriority(t){var r;if(this.idleTimeout){clearTimeout(this.idleTimeout);this.idleTimeout=null}this.pdfViewer.forceRendering(t)||this.isThumbnailViewEnabled&&null!==(r=this.pdfThumbnailViewer)&&void 0!==r&&r.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}},{key:"getHighestPriority",value:function getHighestPriority(t,r,i){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=t.views,l=o.length;if(0===l)return null;for(var u=0;u<l;u++){var c=o[u].view;if(!this.isViewFinished(c))return c}var h=t.first.id,d=t.last.id;if(d-h+1>l)for(var p=t.ids,v=1,y=d-h;v<y;v++){var g=i?h+v:d-v;if(!p.has(g)){var m=r[g-1];if(!this.isViewFinished(m))return m}}var b=i?d:h-2,w=r[b];return w&&!this.isViewFinished(w)||a&&(w=r[b+=i?1:-1])&&!this.isViewFinished(w)?w:null}},{key:"isViewFinished",value:function isViewFinished(t){return t.renderingState===o.RenderingStates.FINISHED}},{key:"renderView",value:function renderView(t){var r=this;switch(t.renderingState){case o.RenderingStates.FINISHED:return!1;case o.RenderingStates.PAUSED:this.highestPriorityPage=t.renderingId;t.resume();break;case o.RenderingStates.RUNNING:this.highestPriorityPage=t.renderingId;break;case o.RenderingStates.INITIAL:this.highestPriorityPage=t.renderingId;t.draw().finally((function(){r.renderHighestPriority()})).catch((function(t){t instanceof a.RenderingCancelledException||globalThis.ngxConsole.error('renderView: "'.concat(t,'"'))}))}return!0}}]);return PDFRenderingQueue}();r.PDFRenderingQueue=l},(t,r,i)=>{var a=i(67),o=i(15),l=i(157),u=i(8),c=i(36),h=i(28),d=i(147),p=i(174),v=i(70),y=l&&l.prototype;a({target:"Promise",proto:!0,real:!0,forced:!!l&&u((function(){y.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var r=d(this,c("Promise")),i=h(t);return this.then(i?function(i){return p(r,t()).then((function(){return i}))}:t,i?function(i){return p(r,t()).then((function(){throw i}))}:t)}});if(!o&&h(l)){var g=c("Promise").prototype.finally;y.finally!==g&&v(y,"finally",g,{unsafe:!0})}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(179);i(185);i(222);i(192);i(206);i(219);i(175);i(176);i(177);i(178);i(190);i(182);i(187);i(195);i(196);i(197);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFScriptingManager=void 0;i(42);i(88);i(142);i(92);i(95);i(198);i(240);i(252);i(254);i(265);i(267);i(269);i(271);i(273);i(275);i(126);i(283);i(293);i(216);var a=i(239),o=i(286);function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakMap,m=new WeakMap,b=new WeakMap,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,E=new WeakSet,x=function(){function PDFScriptingManager(t){var r=t.eventBus,i=t.sandboxBundleSrc,a=void 0===i?null:i,o=t.externalServices,x=void 0===o?null:o,D=t.docProperties,k=void 0===D?null:D;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFScriptingManager);_classPrivateMethodInitSpec(this,E);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,u,{writable:!0,value:null});_classPrivateFieldInitSpec(this,c,{writable:!0,value:null});_classPrivateFieldInitSpec(this,h,{writable:!0,value:null});_classPrivateFieldInitSpec(this,d,{writable:!0,value:null});_classPrivateFieldInitSpec(this,p,{writable:!0,value:null});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,y,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,g,{writable:!0,value:null});_classPrivateFieldInitSpec(this,m,{writable:!0,value:null});_classPrivateFieldInitSpec(this,b,{writable:!0,value:null});_classPrivateFieldSet(this,h,r);_classPrivateFieldSet(this,g,a);_classPrivateFieldSet(this,d,x);_classPrivateFieldSet(this,c,k)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFScriptingManager,[{key:"setViewer",value:function setViewer(t){_classPrivateFieldSet(this,v,t)}},{key:"setDocument",value:(x=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,i,a,o,u,d,g,b,x,D,k,C,T=this;return _regeneratorRuntime().wrap((function _callee2$(I){for(;;)switch(I.prev=I.next){case 0:if(!_classPrivateFieldGet(this,p)){I.next=3;break}I.next=3;return _classPrivateMethodGet(this,E,_destroyScripting2).call(this);case 3:_classPrivateFieldSet(this,p,t);if(t){I.next=6;break}return I.abrupt("return");case 6:I.next=8;return Promise.all([t.getFieldObjects(),t.getCalculationOrderIds(),t.getJSActions()]);case 8:i=I.sent;a=_slicedToArray(i,3);o=a[0];u=a[1];d=a[2];if(o||d){I.next=17;break}I.next=16;return _classPrivateMethodGet(this,E,_destroyScripting2).call(this);case 16:return I.abrupt("return");case 17:if(t===_classPrivateFieldGet(this,p)){I.next=19;break}return I.abrupt("return");case 19:I.prev=19;_classPrivateFieldSet(this,m,_classPrivateMethodGet(this,S,_initScripting2).call(this));I.next=29;break;case 23:I.prev=23;I.t0=I.catch(19);globalThis.ngxConsole.error('setDocument: "'.concat(I.t0.message,'".'));I.next=28;return _classPrivateMethodGet(this,E,_destroyScripting2).call(this);case 28:return I.abrupt("return");case 29:this._internalEvents.set("updatefromsandbox",(function(t){(null==t?void 0:t.source)===window&&_classPrivateMethodGet(T,w,_updateFromSandbox2).call(T,t.detail)}));this._internalEvents.set("dispatcheventinsandbox",(function(t){var r;null===(r=_classPrivateFieldGet(T,m))||void 0===r||r.dispatchEventInSandbox(t.detail)}));this._internalEvents.set("pagechanging",(function(t){var r=t.pageNumber,i=t.previous;if(r!==i){_classPrivateMethodGet(T,A,_dispatchPageClose2).call(T,i);_classPrivateMethodGet(T,P,_dispatchPageOpen2).call(T,r)}}));this._internalEvents.set("pagerendered",(function(t){var r=t.pageNumber;T._pageOpenPending.has(r)&&r===_classPrivateFieldGet(T,v).currentPageNumber&&_classPrivateMethodGet(T,P,_dispatchPageOpen2).call(T,r)}));this._internalEvents.set("pagesdestroy",_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return _classPrivateMethodGet(T,A,_dispatchPageClose2).call(T,_classPrivateFieldGet(T,v).currentPageNumber);case 2:i.next=4;return null===(t=_classPrivateFieldGet(T,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillClose"});case 4:null===(r=_classPrivateFieldGet(T,l))||void 0===r||r.resolve();case 5:case"end":return i.stop()}}),_callee)}))));g=_createForOfIteratorHelper(this._internalEvents);try{for(g.s();!(b=g.n()).done;){x=_slicedToArray(b.value,2),D=x[0],k=x[1];_classPrivateFieldGet(this,h)._on(D,k)}}catch(t){g.e(t)}finally{g.f()}I.prev=36;I.next=39;return _classPrivateFieldGet(this,c).call(this,t);case 39:C=I.sent;if(t===_classPrivateFieldGet(this,p)){I.next=42;break}return I.abrupt("return");case 42:I.next=44;return _classPrivateFieldGet(this,m).createSandbox({objects:o,calculationOrder:u,appInfo:{platform:navigator.platform,language:navigator.language},docInfo:_objectSpread(_objectSpread({},C),{},{actions:d})});case 44:_classPrivateFieldGet(this,h).dispatch("sandboxcreated",{source:this});I.next=53;break;case 47:I.prev=47;I.t1=I.catch(36);globalThis.ngxConsole.error('setDocument: "'.concat(I.t1.message,'".'));I.next=52;return _classPrivateMethodGet(this,E,_destroyScripting2).call(this);case 52:return I.abrupt("return");case 53:I.next=55;return null===(r=_classPrivateFieldGet(this,m))||void 0===r?void 0:r.dispatchEventInSandbox({id:"doc",name:"Open"});case 55:I.next=57;return _classPrivateMethodGet(this,P,_dispatchPageOpen2).call(this,_classPrivateFieldGet(this,v).currentPageNumber,!0);case 57:Promise.resolve().then((function(){t===_classPrivateFieldGet(T,p)&&_classPrivateFieldSet(T,y,!0)}));case 58:case"end":return I.stop()}}),_callee2,this,[[19,23],[36,47]])}))),function setDocument(t){return x.apply(this,arguments)})},{key:"dispatchWillSave",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t;return _regeneratorRuntime().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null===(t=_classPrivateFieldGet(this,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"WillSave"}));case 1:case"end":return r.stop()}}),_callee3,this)}))),function dispatchWillSave(){return a.apply(this,arguments)})},{key:"dispatchDidSave",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t;return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null===(t=_classPrivateFieldGet(this,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidSave"}));case 1:case"end":return r.stop()}}),_callee4,this)}))),function dispatchDidSave(){return i.apply(this,arguments)})},{key:"dispatchWillPrint",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var t;return _regeneratorRuntime().wrap((function _callee5$(r){for(;;)switch(r.prev=r.next){case 0:if(_classPrivateFieldGet(this,m)){r.next=2;break}return r.abrupt("return");case 2:r.next=4;return null===(t=_classPrivateFieldGet(this,b))||void 0===t?void 0:t.promise;case 4:_classPrivateFieldSet(this,b,new o.PromiseCapability);r.prev=5;r.next=8;return _classPrivateFieldGet(this,m).dispatchEventInSandbox({id:"doc",name:"WillPrint"});case 8:r.next=15;break;case 10:r.prev=10;r.t0=r.catch(5);_classPrivateFieldGet(this,b).resolve();_classPrivateFieldSet(this,b,null);throw r.t0;case 15:r.next=17;return _classPrivateFieldGet(this,b).promise;case 17:case"end":return r.stop()}}),_callee5,this,[[5,10]])}))),function dispatchWillPrint(){return r.apply(this,arguments)})},{key:"dispatchDidPrint",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t;return _regeneratorRuntime().wrap((function _callee6$(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null===(t=_classPrivateFieldGet(this,m))||void 0===t?void 0:t.dispatchEventInSandbox({id:"doc",name:"DidPrint"}));case 1:case"end":return r.stop()}}),_callee6,this)}))),function dispatchDidPrint(){return t.apply(this,arguments)})},{key:"destroyPromise",get:function get(){var t;return(null===(t=_classPrivateFieldGet(this,u))||void 0===t?void 0:t.promise)||null}},{key:"ready",get:function get(){return _classPrivateFieldGet(this,y)}},{key:"_internalEvents",get:function get(){return(0,o.shadow)(this,"_internalEvents",new Map)}},{key:"_pageOpenPending",get:function get(){return(0,o.shadow)(this,"_pageOpenPending",new Set)}},{key:"_visitedPages",get:function get(){return(0,o.shadow)(this,"_visitedPages",new Map)}}]);var t,r,i,a,x;return PDFScriptingManager}();r.PDFScriptingManager=x;function _updateFromSandbox2(t){return _updateFromSandbox3.apply(this,arguments)}function _updateFromSandbox3(){return(_updateFromSandbox3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(t){var r,i,o,l,u,c,d,y,g,m,w,P,A,S;return _regeneratorRuntime().wrap((function _callee7$(E){for(;;)switch(E.prev=E.next){case 0:i=_classPrivateFieldGet(this,v);o=i.isInPresentationMode||i.isChangingPresentationMode;l=t.id,u=t.siblings,c=t.command,d=t.value;if(l){E.next=41;break}E.t0=c;E.next="clear"===E.t0?7:"error"===E.t0?9:"layout"===E.t0?11:"page-num"===E.t0?13:"print"===E.t0?15:"println"===E.t0?19:"zoom"===E.t0?21:"SaveAs"===E.t0?23:"FirstPage"===E.t0?25:"LastPage"===E.t0?27:"NextPage"===E.t0?29:"PrevPage"===E.t0?31:"ZoomViewIn"===E.t0?33:"ZoomViewOut"===E.t0?35:"WillPrintFinished"===E.t0?37:40;break;case 7:globalThis.ngxConsole.clear();return E.abrupt("break",40);case 9:globalThis.ngxConsole.error(d);return E.abrupt("break",40);case 11:if(!o){y=(0,a.apiPageLayoutToViewerModes)(d);i.spreadMode=y.spreadMode}return E.abrupt("break",40);case 13:i.currentPageNumber=d+1;return E.abrupt("break",40);case 15:E.next=17;return i.pagesPromise;case 17:_classPrivateFieldGet(this,h).dispatch("print",{source:this});return E.abrupt("break",40);case 19:globalThis.ngxConsole.log(d);return E.abrupt("break",40);case 21:o||(i.currentScaleValue=d);return E.abrupt("break",40);case 23:_classPrivateFieldGet(this,h).dispatch("download",{source:this});return E.abrupt("break",40);case 25:i.currentPageNumber=1;return E.abrupt("break",40);case 27:i.currentPageNumber=i.pagesCount;return E.abrupt("break",40);case 29:i.nextPage();return E.abrupt("break",40);case 31:i.previousPage();return E.abrupt("break",40);case 33:o||i.increaseScale();return E.abrupt("break",40);case 35:o||i.decreaseScale();return E.abrupt("break",40);case 37:null===(r=_classPrivateFieldGet(this,b))||void 0===r||r.resolve();_classPrivateFieldSet(this,b,null);return E.abrupt("break",40);case 40:return E.abrupt("return");case 41:if(!o||!t.focus){E.next=43;break}return E.abrupt("return");case 43:delete t.id;delete t.siblings;g=u?[l].concat(_toConsumableArray(u)):[l];m=_createForOfIteratorHelper(g);try{for(m.s();!(w=m.n()).done;){P=w.value;(A=document.querySelector('[data-element-id="'.concat(P,'"]')))?A.dispatchEvent(new CustomEvent("updatefromsandbox",{detail:t})):null===(S=_classPrivateFieldGet(this,p))||void 0===S||S.annotationStorage.setValue(P,t)}}catch(t){m.e(t)}finally{m.f()}case 48:case"end":return E.stop()}}),_callee7,this)})))).apply(this,arguments)}function _dispatchPageOpen2(t){return _dispatchPageOpen3.apply(this,arguments)}function _dispatchPageOpen3(){_dispatchPageOpen3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee9(t){var r,i,u,c,h,d=this,y=arguments;return _regeneratorRuntime().wrap((function _callee9$(g){for(;;)switch(g.prev=g.next){case 0:r=y.length>1&&void 0!==y[1]&&y[1];i=_classPrivateFieldGet(this,p),u=this._visitedPages;r&&_classPrivateFieldSet(this,l,new o.PromiseCapability);if(_classPrivateFieldGet(this,l)){g.next=5;break}return g.abrupt("return");case 5:if((null==(c=_classPrivateFieldGet(this,v).getPageView(t-1))?void 0:c.renderingState)===a.RenderingStates.FINISHED){g.next=9;break}this._pageOpenPending.add(t);return g.abrupt("return");case 9:this._pageOpenPending.delete(t);h=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(){var r,a,o;return _regeneratorRuntime().wrap((function _callee8$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return u.has(t)?null:null===(r=c.pdfPage)||void 0===r?void 0:r.getJSActions();case 2:o=l.sent;if(i===_classPrivateFieldGet(d,p)){l.next=5;break}return l.abrupt("return");case 5:l.next=7;return null===(a=_classPrivateFieldGet(d,m))||void 0===a?void 0:a.dispatchEventInSandbox({id:"page",name:"PageOpen",pageNumber:t,actions:o});case 7:case"end":return l.stop()}}),_callee8)})))();u.set(t,h);case 12:case"end":return g.stop()}}),_callee9,this)})));return _dispatchPageOpen3.apply(this,arguments)}function _dispatchPageClose2(t){return _dispatchPageClose3.apply(this,arguments)}function _dispatchPageClose3(){return(_dispatchPageClose3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee10(t){var r,i,a,o;return _regeneratorRuntime().wrap((function _callee10$(u){for(;;)switch(u.prev=u.next){case 0:i=_classPrivateFieldGet(this,p),a=this._visitedPages;if(_classPrivateFieldGet(this,l)){u.next=3;break}return u.abrupt("return");case 3:if(!this._pageOpenPending.has(t)){u.next=5;break}return u.abrupt("return");case 5:if(o=a.get(t)){u.next=8;break}return u.abrupt("return");case 8:a.set(t,null);u.next=11;return o;case 11:if(i===_classPrivateFieldGet(this,p)){u.next=13;break}return u.abrupt("return");case 13:u.next=15;return null===(r=_classPrivateFieldGet(this,m))||void 0===r?void 0:r.dispatchEventInSandbox({id:"page",name:"PageClose",pageNumber:t});case 15:case"end":return u.stop()}}),_callee10,this)})))).apply(this,arguments)}function _initScripting2(){_classPrivateFieldSet(this,u,new o.PromiseCapability);if(_classPrivateFieldGet(this,m))throw new Error("#initScripting: Scripting already exists.");return _classPrivateFieldGet(this,d).createScripting({sandboxBundleSrc:_classPrivateFieldGet(this,g)})}function _destroyScripting2(){return _destroyScripting3.apply(this,arguments)}function _destroyScripting3(){return(_destroyScripting3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee11(){var t,r,i,a,o,c,d,v;return _regeneratorRuntime().wrap((function _callee11$(g){for(;;)switch(g.prev=g.next){case 0:if(_classPrivateFieldGet(this,m)){g.next=4;break}_classPrivateFieldSet(this,p,null);null===(i=_classPrivateFieldGet(this,u))||void 0===i||i.resolve();return g.abrupt("return");case 4:if(!_classPrivateFieldGet(this,l)){g.next=8;break}g.next=7;return Promise.race([_classPrivateFieldGet(this,l).promise,new Promise((function(t){setTimeout(t,1e3)}))]).catch((function(){}));case 7:_classPrivateFieldSet(this,l,null);case 8:_classPrivateFieldSet(this,p,null);g.prev=9;g.next=12;return _classPrivateFieldGet(this,m).destroySandbox();case 12:g.next=16;break;case 14:g.prev=14;g.t0=g.catch(9);case 16:null===(t=_classPrivateFieldGet(this,b))||void 0===t||t.reject(new Error("Scripting destroyed."));_classPrivateFieldSet(this,b,null);a=_createForOfIteratorHelper(this._internalEvents);try{for(a.s();!(o=a.n()).done;){c=_slicedToArray(o.value,2),d=c[0],v=c[1];_classPrivateFieldGet(this,h)._off(d,v)}}catch(t){a.e(t)}finally{a.f()}this._internalEvents.clear();this._pageOpenPending.clear();this._visitedPages.clear();_classPrivateFieldSet(this,m,null);_classPrivateFieldSet(this,y,!1);null===(r=_classPrivateFieldGet(this,u))||void 0===r||r.resolve();case 26:case"end":return g.stop()}}),_callee11,this,[[9,14]])})))).apply(this,arguments)}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFSidebar=void 0;i(198);i(126);i(42);i(88);i(92);i(283);i(95);i(293);i(142);var a=i(239);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var o="--sidebar-width",l=200,u="sidebarResizing",c="pdfSidebarNotification",h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,y=new WeakMap,g=new WeakSet,m=new WeakSet,b=new WeakSet,w=new WeakSet,P=new WeakSet,A=new WeakSet,S=new WeakSet,E=function(){function PDFSidebar(t){var r=this,i=t.elements,o=t.eventBus,l=t.l10n;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFSidebar);_classPrivateMethodInitSpec(this,S);_classPrivateMethodInitSpec(this,A);_classPrivateMethodInitSpec(this,P);_classPrivateMethodInitSpec(this,w);_classPrivateMethodInitSpec(this,b);_classPrivateMethodInitSpec(this,m);_classPrivateMethodInitSpec(this,g);_classPrivateFieldInitSpec(this,h,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,d,{writable:!0,value:_classPrivateMethodGet(this,A,_mouseMove2).bind(this)});_classPrivateFieldInitSpec(this,p,{writable:!0,value:_classPrivateMethodGet(this,S,_mouseUp2).bind(this)});_classPrivateFieldInitSpec(this,v,{writable:!0,value:null});_classPrivateFieldInitSpec(this,y,{writable:!0,value:null});this.isOpen=!1;this.active=a.SidebarView.THUMBS;this.isInitialViewSet=!1;this.isInitialEventDispatched=!1;this.onToggled=null;this.onUpdateThumbnails=null;this.outerContainer=i.outerContainer;this.sidebarContainer=i.sidebarContainer;this.toggleButton=i.toggleButton;this.resizer=i.resizer;this.thumbnailButton=i.thumbnailButton;this.outlineButton=i.outlineButton;this.attachmentsButton=i.attachmentsButton;this.layersButton=i.layersButton;this.thumbnailView=i.thumbnailView;this.outlineView=i.outlineView;this.attachmentsView=i.attachmentsView;this.layersView=i.layersView;this._outlineOptionsContainer=i.outlineOptionsContainer;this._currentOutlineItemButton=i.currentOutlineItemButton;this.eventBus=o;this.l10n=l;l.getDirection().then((function(t){_classPrivateFieldSet(r,h,"rtl"===t)}));_classPrivateMethodGet(this,w,_addEventListeners2).call(this)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFSidebar,[{key:"reset",value:function reset(){this.isInitialViewSet=!1;this.isInitialEventDispatched=!1;_classPrivateMethodGet(this,b,_hideUINotification2).call(this,!0);this.switchView(a.SidebarView.THUMBS);this.outlineButton.disabled=!1;this.attachmentsButton.disabled=!1;this.layersButton.disabled=!1;this.outlineButton.hidden=!1;this.attachmentsButton.hidden=!1;this.layersButton.hidden=!1;this._currentOutlineItemButton.disabled=!0}},{key:"visibleView",get:function get(){return this.isOpen?this.active:a.SidebarView.NONE}},{key:"setInitialView",value:function setInitialView(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.SidebarView.NONE;if(!this.isInitialViewSet){this.isInitialViewSet=!0;if(t!==a.SidebarView.NONE&&t!==a.SidebarView.UNKNOWN){this.switchView(t,!0);this.isInitialEventDispatched||_classPrivateMethodGet(this,g,_dispatchEvent2).call(this)}else _classPrivateMethodGet(this,g,_dispatchEvent2).call(this)}}},{key:"switchView",value:function switchView(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t!==this.active,o=!1;switch(t){case a.SidebarView.NONE:this.isOpen&&this.close();return;case a.SidebarView.THUMBS:this.isOpen&&i&&(o=!0);break;case a.SidebarView.OUTLINE:if(this.outlineButton.disabled)return;break;case a.SidebarView.ATTACHMENTS:if(this.attachmentsButton.disabled)return;break;case a.SidebarView.LAYERS:if(this.layersButton.disabled)return;break;default:globalThis.ngxConsole.error('PDFSidebar.switchView: "'.concat(t,'" is not a valid view.'));return}this.active=t;(0,a.toggleCheckedBtn)(this.thumbnailButton,t===a.SidebarView.THUMBS,this.thumbnailView);(0,a.toggleCheckedBtn)(this.outlineButton,t===a.SidebarView.OUTLINE,this.outlineView);(0,a.toggleCheckedBtn)(this.attachmentsButton,t===a.SidebarView.ATTACHMENTS,this.attachmentsView);(0,a.toggleCheckedBtn)(this.layersButton,t===a.SidebarView.LAYERS,this.layersView);this._outlineOptionsContainer.classList.toggle("hidden",t!==a.SidebarView.OUTLINE);if(!r||this.isOpen){if(o){this.onUpdateThumbnails();this.onToggled()}i&&_classPrivateMethodGet(this,g,_dispatchEvent2).call(this)}else this.open()}},{key:"open",value:function open(){if(!this.isOpen){this.isOpen=!0;(0,a.toggleExpandedBtn)(this.toggleButton,!0);this.outerContainer.classList.add("sidebarMoving","sidebarOpen");this.active===a.SidebarView.THUMBS&&this.onUpdateThumbnails();this.onToggled();_classPrivateMethodGet(this,g,_dispatchEvent2).call(this);_classPrivateMethodGet(this,b,_hideUINotification2).call(this)}}},{key:"close",value:function close(){if(this.isOpen){this.isOpen=!1;(0,a.toggleExpandedBtn)(this.toggleButton,!1);this.outerContainer.classList.add("sidebarMoving");this.outerContainer.classList.remove("sidebarOpen");this.onToggled();_classPrivateMethodGet(this,g,_dispatchEvent2).call(this)}}},{key:"toggle",value:function toggle(){this.isOpen?this.close():this.open()}},{key:"outerContainerWidth",get:function get(){return _classPrivateFieldGet(this,v)||_classPrivateFieldSet(this,v,this.outerContainer.clientWidth)}}]);return PDFSidebar}();r.PDFSidebar=E;function _dispatchEvent2(){this.isInitialViewSet&&(this.isInitialEventDispatched||(this.isInitialEventDispatched=!0));this.eventBus.dispatch("sidebarviewchanged",{source:this,view:this.visibleView})}function _showUINotification2(){this.toggleButton.setAttribute("data-l10n-id","toggle_sidebar_notification2");this.l10n.translate(this.toggleButton);this.isOpen||this.toggleButton.classList.add(c)}function _hideUINotification2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(this.isOpen||t)&&this.toggleButton.classList.remove(c);if(t){this.toggleButton.setAttribute("data-l10n-id","toggle_sidebar");this.l10n.translate(this.toggleButton)}}function _addEventListeners2(){var t=this;this.sidebarContainer.addEventListener("transitionend",(function(r){r.target===t.sidebarContainer&&t.outerContainer.classList.remove("sidebarMoving")}));this.toggleButton.addEventListener("click",(function(){t.toggle()}));this.thumbnailButton.addEventListener("click",(function(){t.switchView(a.SidebarView.THUMBS)}));this.outlineButton.addEventListener("click",(function(){t.switchView(a.SidebarView.OUTLINE)}));this.outlineButton.addEventListener("dblclick",(function(){t.eventBus.dispatch("toggleoutlinetree",{source:t})}));this.attachmentsButton.addEventListener("click",(function(){t.switchView(a.SidebarView.ATTACHMENTS)}));this.layersButton.addEventListener("click",(function(){t.switchView(a.SidebarView.LAYERS)}));this.layersButton.addEventListener("dblclick",(function(){t.eventBus.dispatch("resetlayers",{source:t})}));this._currentOutlineItemButton.addEventListener("click",(function(){t.eventBus.dispatch("currentoutlineitem",{source:t})}));var r=function onTreeLoaded(r,i,o){i.disabled=!r;i.hidden=!r;r?_classPrivateMethodGet(t,m,_showUINotification2).call(t):t.active===o&&t.switchView(a.SidebarView.THUMBS)};this.eventBus._on("outlineloaded",(function(i){r(i.outlineCount,t.outlineButton,a.SidebarView.OUTLINE);i.enableCurrentOutlineItemButton&&i.currentOutlineItemPromise&&i.currentOutlineItemPromise.then((function(r){t.isInitialViewSet&&(t._currentOutlineItemButton.disabled=!r)}))}));this.eventBus._on("attachmentsloaded",(function(i){r(i.attachmentsCount,t.attachmentsButton,a.SidebarView.ATTACHMENTS)}));this.eventBus._on("layersloaded",(function(i){r(i.layersCount,t.layersButton,a.SidebarView.LAYERS)}));this.eventBus._on("presentationmodechanged",(function(r){r.state===a.PresentationModeState.NORMAL&&t.visibleView===a.SidebarView.THUMBS&&t.onUpdateThumbnails()}));this.resizer.addEventListener("mousedown",(function(r){if(0===r.button){t.outerContainer.classList.add(u);window.addEventListener("mousemove",_classPrivateFieldGet(t,d));window.addEventListener("mouseup",_classPrivateFieldGet(t,p))}}));this.eventBus._on("resize",(function(r){if(r.source===window){_classPrivateFieldSet(t,v,null);if(_classPrivateFieldGet(t,y))if(t.isOpen){t.outerContainer.classList.add(u);var i=_classPrivateMethodGet(t,P,_updateWidth2).call(t,_classPrivateFieldGet(t,y));Promise.resolve().then((function(){t.outerContainer.classList.remove(u);i&&t.eventBus.dispatch("resize",{source:t})}))}else _classPrivateMethodGet(t,P,_updateWidth2).call(t,_classPrivateFieldGet(t,y))}}))}function _updateWidth2(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=Math.floor(this.outerContainerWidth/2);t>r&&(t=r);t<l&&(t=l);if(t===_classPrivateFieldGet(this,y))return!1;_classPrivateFieldSet(this,y,t);a.docStyle.setProperty(o,"".concat(t,"px"));return!0}function _mouseMove2(t){var r=t.clientX;_classPrivateFieldGet(this,h)&&(r=this.outerContainerWidth-r);_classPrivateMethodGet(this,P,_updateWidth2).call(this,r)}function _mouseUp2(t){this.outerContainer.classList.remove(u);this.eventBus.dispatch("resize",{source:this});window.removeEventListener("mousemove",_classPrivateFieldGet(this,d));window.removeEventListener("mouseup",_classPrivateFieldGet(this,p))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(185);i(222);i(192);i(206);i(219);i(1);i(142);i(175);i(176);i(177);i(178);i(190);i(182);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFThumbnailViewer=void 0;i(198);i(126);i(179);i(42);i(88);i(92);i(293);i(95);var a=i(239),o=i(324);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l="selected",u=new WeakSet,c=new WeakSet,h=function(){function PDFThumbnailViewer(t){var r=t.container,i=t.eventBus,o=t.linkService,l=t.renderingQueue,h=t.l10n,d=t.pageColors;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFThumbnailViewer);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,u);this.container=r;this.eventBus=i;this.linkService=o;this.renderingQueue=l;this.l10n=h;this.pageColors=d||null;this.scroll=(0,a.watchScroll)(this.container,this._scrollUpdated.bind(this));this._resetView()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFThumbnailViewer,[{key:"_scrollUpdated",value:function _scrollUpdated(){this.renderingQueue.renderHighestPriority()}},{key:"getThumbnail",value:function getThumbnail(t){return this._thumbnails[t]}},{key:"_getVisibleThumbs",value:function _getVisibleThumbs(){return(0,a.getVisibleElements)({scrollEl:this.container,views:this._thumbnails})}},{key:"scrollThumbnailIntoView",value:function scrollThumbnailIntoView(t){if(this.pdfDocument){var r=this._thumbnails[t-1];if(r){if(t!==this._currentPageNumber){this._thumbnails[this._currentPageNumber-1].div.classList.remove(l);r.div.classList.add(l)}var i=this._getVisibleThumbs(),o=i.first,u=i.last,c=i.views;if(c.length>0){var h=!1;if(t<=o.id||t>=u.id)h=!0;else{var d,p=_createForOfIteratorHelper(c);try{for(p.s();!(d=p.n()).done;){var v=d.value,y=v.id,g=v.percent;if(y===t){h=g<100;break}}}catch(t){p.e(t)}finally{p.f()}}h&&(0,a.scrollIntoView)(r.div,{top:-19})}this._currentPageNumber=t}else globalThis.ngxConsole.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.')}}},{key:"pagesRotation",get:function get(){return this._pagesRotation},set:function set(t){if(!(0,a.isValidRotation)(t))throw new Error("Invalid thumbnails rotation angle.");if(this.pdfDocument&&this._pagesRotation!==t){this._pagesRotation=t;var r,i={rotation:t},o=_createForOfIteratorHelper(this._thumbnails);try{for(o.s();!(r=o.n()).done;){r.value.update(i)}}catch(t){o.e(t)}finally{o.f()}}}},{key:"cleanup",value:function cleanup(){var t,r=_createForOfIteratorHelper(this._thumbnails);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.renderingState!==a.RenderingStates.FINISHED&&i.reset()}}catch(t){r.e(t)}finally{r.f()}o.TempImageFactory.destroyCanvas()}},{key:"_resetView",value:function _resetView(){this._thumbnails=[];this._currentPageNumber=1;this._pageLabels=null;this._pagesRotation=0;this.container.textContent=""}},{key:"setDocument",value:function setDocument(t){var r=this;this.initialized=!1;if(this.pdfDocument){this._cancelRendering();this._resetView()}this.pdfDocument=t;if(t&&!this.initialized){this.initialized=!0;var i=t.getPage(1),a=t.getOptionalContentConfig();i.then((function(i){for(var u,c=t.numPages,h=i.getViewport({scale:1}),d=1;d<=c;++d){var p=new o.PDFThumbnailView(_defineProperty({container:r.container,eventBus:r.eventBus,id:d,defaultViewport:h.clone(),optionalContentConfigPromise:a,linkService:r.linkService,renderingQueue:r.renderingQueue,l10n:r.l10n,pageColors:r.pageColors},"eventBus",r.eventBus));r._thumbnails.push(p)}null===(u=r._thumbnails[0])||void 0===u||u.setPdfPage(i);r._thumbnails[r._currentPageNumber-1].div.classList.add(l)})).catch((function(t){globalThis.ngxConsole.error("Unable to initialize thumbnail viewer",t)}))}}},{key:"_cancelRendering",value:function _cancelRendering(){var t,r=_createForOfIteratorHelper(this._thumbnails);try{for(r.s();!(t=r.n()).done;){t.value.cancelRendering()}}catch(t){r.e(t)}finally{r.f()}}},{key:"setPageLabels",value:function setPageLabels(t){if(this.pdfDocument){if(t)if(Array.isArray(t)&&this.pdfDocument.numPages===t.length)this._pageLabels=t;else{this._pageLabels=null;globalThis.ngxConsole.error("PDFThumbnailViewer_setPageLabels: Invalid page labels.")}else this._pageLabels=null;for(var r=0,i=this._thumbnails.length;r<i;r++){var a,o;this._thumbnails[r].setPageLabel(null!==(a=null===(o=this._pageLabels)||void 0===o?void 0:o[r])&&void 0!==a?a:null)}}}},{key:"forceRendering",value:function forceRendering(){var t=this,r=this._getVisibleThumbs(),i=_classPrivateMethodGet(this,c,_getScrollAhead2).call(this,r),a=this.renderingQueue.getHighestPriority(r,this._thumbnails,i);if(a){_classPrivateMethodGet(this,u,_ensurePdfPageLoaded2).call(this,a).then((function(){t.renderingQueue.renderView(a)}));return!0}return!1}},{key:"stopRendering",value:function stopRendering(){this._cancelRendering()}}]);return PDFThumbnailViewer}();r.PDFThumbnailViewer=h;function _ensurePdfPageLoaded2(t){return _ensurePdfPageLoaded3.apply(this,arguments)}function _ensurePdfPageLoaded3(){_ensurePdfPageLoaded3=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(!t.pdfPage){i.next=2;break}return i.abrupt("return",t.pdfPage);case 2:i.prev=2;i.next=5;return this.pdfDocument.getPage(t.id);case 5:r=i.sent;t.pdfPage||t.setPdfPage(r);return i.abrupt("return",r);case 10:i.prev=10;i.t0=i.catch(2);globalThis.ngxConsole.error("Unable to get page for thumb view",i.t0);return i.abrupt("return",null);case 14:case"end":return i.stop()}}),_callee,this,[[2,10]])})));return _ensurePdfPageLoaded3.apply(this,arguments)}function _getScrollAhead2(t){var r,i;return 1===(null===(r=t.first)||void 0===r?void 0:r.id)||(null===(i=t.last)||void 0===i?void 0:i.id)!==this._thumbnails.length&&this.scroll.down}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);i(222);i(192);i(206);i(219);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TempImageFactory=r.PDFThumbnailView=void 0;i(126);i(198);i(88);i(142);i(320);i(42);i(92);i(293);i(95);var a=i(239),o=i(286);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classStaticPrivateFieldSpecSet(t,r,i,a){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"set");!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,i,a);return a}function _classStaticPrivateFieldSpecGet(t,r,i){_classCheckPrivateStaticAccess(t,r);_classCheckPrivateStaticFieldDescriptor(i,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}function _classCheckPrivateStaticFieldDescriptor(t,r){if(void 0===t)throw new TypeError("attempted to "+r+" private static field before its declaration")}function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}var l=function(){function TempImageFactory(){_classCallCheck(this,TempImageFactory)}_createClass(TempImageFactory,null,[{key:"getCanvas",value:function getCanvas(t,r){var i=_classStaticPrivateFieldSpecGet(this,TempImageFactory,u)||_classStaticPrivateFieldSpecSet(this,TempImageFactory,u,document.createElement("canvas"));i.width=t;i.height=r;var a=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1},o=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,l=i.getContext("2d",a);l.save();l.fillStyle="rgb(255, 255, 255)";l.fillRect(0,0,t,r);l.restore();return[i,i.getContext("2d",o)]}},{key:"destroyCanvas",value:function destroyCanvas(){var t=_classStaticPrivateFieldSpecGet(this,TempImageFactory,u);if(t){t.width=0;t.height=0}_classStaticPrivateFieldSpecSet(this,TempImageFactory,u,null)}}]);return TempImageFactory}();r.TempImageFactory=l;var u={writable:!0,value:null},c=new WeakSet,h=new WeakSet,d=function(){function PDFThumbnailView(t){var r=t.container,i=t.eventBus,o=t.id,l=t.defaultViewport,u=t.optionalContentConfigPromise,d=t.linkService,p=t.renderingQueue,v=t.l10n,y=t.pageColors;_classCallCheck(this,PDFThumbnailView);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);this.id=o;this.renderingId="thumbnail"+o;this.pageLabel=null;this.pdfPage=null;this.rotation=0;this.viewport=l;this.pdfPageRotate=l.rotation;this._optionalContentConfigPromise=u||null;this.pageColors=y||null;this.eventBus=i;this.linkService=d;this.renderingQueue=p;this.eventBus=i;this.renderTask=null;this.renderingState=a.RenderingStates.INITIAL;this.resume=null;this.l10n=v;window.pdfThumbnailGenerator?this._placeholderImg=window.pdfThumbnailGenerator(this,d,o,r,this._thumbPageTitle):this.createThumbnail(this,d,o,r,this._thumbPageTitle)}_createClass(PDFThumbnailView,[{key:"createThumbnail",value:function createThumbnail(t,r,i,a,o){var l=document.createElement("a");l.href=r.getAnchorUrl("#page="+i);this._thumbPageTitle.then((function(t){l.title=t}));l.onclick=function(){r.goToPage(i);return!1};this.anchor=l;var u=document.createElement("div");u.className="thumbnail";u.setAttribute("data-page-number",this.id);this.div=u;_classPrivateMethodGet(this,c,_updateDims2).call(this);var h=document.createElement("div");h.className="thumbnailImage";this._placeholderImg=h;u.append(h);l.append(u);a.append(l)}},{key:"setPdfPage",value:function setPdfPage(t){this.pdfPage=t;this.pdfPageRotate=t.rotate;var r=(this.rotation+this.pdfPageRotate)%360;this.viewport=t.getViewport({scale:1,rotation:r});this.reset()}},{key:"reset",value:function reset(){var t;this.cancelRendering();this.renderingState=a.RenderingStates.INITIAL;this.div.removeAttribute("data-loaded");null===(t=this.image)||void 0===t||t.replaceWith(this._placeholderImg);_classPrivateMethodGet(this,c,_updateDims2).call(this);if(this.image){this.image.removeAttribute("src");delete this.image}}},{key:"update",value:function update(t){var r=t.rotation,i=void 0===r?null:r;"number"==typeof i&&(this.rotation=i);var a=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:1,rotation:a});this.reset()}},{key:"cancelRendering",value:function cancelRendering(){if(this.renderTask){this.renderTask.cancel();this.renderTask=null}this.resume=null}},{key:"_getPageDrawContext",value:function _getPageDrawContext(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=document.createElement("canvas"),i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1},o=r.getContext("2d",i),l=new a.OutputScale;r.width=t*this.canvasWidth*l.sx|0;r.height=t*this.canvasHeight*l.sy|0;return{ctx:o,canvas:r,transform:l.scaled?[l.sx,0,0,l.sy,0,0]:null}}},{key:"_convertCanvasToImage",value:function _convertCanvasToImage(t){if(this.renderingState!==a.RenderingStates.FINISHED)throw new Error("_convertCanvasToImage: Rendering has not finished.");var r=this._reduceImage(t),i=document.createElement("img");i.className="thumbnailImage";this._thumbPageCanvas.then((function(t){i.setAttribute("aria-label",t)}));i.src=r.toDataURL();this.image=i;this.div.setAttribute("data-loaded",!0);this._placeholderImg.replaceWith(i);r.width=0;r.height=0}},{key:"draw",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,o,l,u,c,d,p,v,y=this;return _regeneratorRuntime().wrap((function _callee$(g){for(;;)switch(g.prev=g.next){case 0:if(this.renderingState===a.RenderingStates.INITIAL){g.next=3;break}globalThis.ngxConsole.error("Must be in new state before drawing");return g.abrupt("return",void 0);case 3:if(t=this.pdfPage){g.next=7;break}this.renderingState=a.RenderingStates.FINISHED;throw new Error("pdfPage is not loaded");case 7:this.renderingState=a.RenderingStates.RUNNING;r=this._getPageDrawContext(2),i=r.ctx,o=r.canvas,l=r.transform;u=this.viewport.clone({scale:2*this.scale});c=function renderContinueCallback(t){if(y.renderingQueue.isHighestPriority(y))t();else{y.renderingState=a.RenderingStates.PAUSED;y.resume=function(){y.renderingState=a.RenderingStates.RUNNING;t()}}};d={canvasContext:i,transform:l,viewport:u,optionalContentConfigPromise:this._optionalContentConfigPromise,pageColors:this.pageColors};(p=this.renderTask=t.render(d)).onContinue=c;(v=p.promise.then((function(){return _classPrivateMethodGet(y,h,_finishRenderTask2).call(y,p,o)}),(function(t){return _classPrivateMethodGet(y,h,_finishRenderTask2).call(y,p,o,t)}))).finally((function(){o.width=0;o.height=0;y.eventBus.dispatch("thumbnailrendered",{source:y,pageNumber:y.id,pdfPage:y.pdfPage})}));return g.abrupt("return",v);case 17:case"end":return g.stop()}}),_callee,this)}))),function draw(){return t.apply(this,arguments)})},{key:"setImage",value:function setImage(t){if(this.renderingState===a.RenderingStates.INITIAL){var r=t.thumbnailCanvas,i=t.pdfPage,o=t.scale;if(r){this.pdfPage||this.setPdfPage(i);if(!(o<this.scale)){this.renderingState=a.RenderingStates.FINISHED;this._convertCanvasToImage(r)}}}}},{key:"_reduceImage",value:function _reduceImage(t){var r=this._getPageDrawContext(),i=r.ctx,a=r.canvas;if(t.width<=2*a.width){i.drawImage(t,0,0,t.width,t.height,0,0,a.width,a.height);return a}for(var o=a.width<<3,u=a.height<<3,c=_slicedToArray(l.getCanvas(o,u),2),h=c[0],d=c[1];o>t.width||u>t.height;){o>>=1;u>>=1}d.drawImage(t,0,0,t.width,t.height,0,0,o,u);for(;o>2*a.width;){d.drawImage(h,0,0,o,u,0,0,o>>1,u>>1);o>>=1;u>>=1}i.drawImage(h,0,0,o,u,0,0,a.width,a.height);return a}},{key:"_thumbPageTitle",get:function get(){var t;return this.l10n.get("thumb_page_title",{page:null!==(t=this.pageLabel)&&void 0!==t?t:this.id})}},{key:"_thumbPageCanvas",get:function get(){var t;return this.l10n.get("thumb_page_canvas",{page:null!==(t=this.pageLabel)&&void 0!==t?t:this.id})}},{key:"setPageLabel",value:function setPageLabel(t){var r=this;this.pageLabel="string"==typeof t?t:null;this._thumbPageTitle.then((function(t){r.anchor.title=t}));this.renderingState===a.RenderingStates.FINISHED&&this._thumbPageCanvas.then((function(t){var i;null===(i=r.image)||void 0===i||i.setAttribute("aria-label",t)}))}}]);var t;return PDFThumbnailView}();r.PDFThumbnailView=d;function _updateDims2(){var t=this.viewport,r=t.width,i=r/t.height;this.canvasWidth=98;this.canvasHeight=this.canvasWidth/i|0;this.scale=this.canvasWidth/r;var a=this.div.style;a.setProperty("--thumbnail-width","".concat(this.canvasWidth,"px"));a.setProperty("--thumbnail-height","".concat(this.canvasHeight,"px"))}function _finishRenderTask2(t,r){return _finishRenderTask3.apply(this,arguments)}function _finishRenderTask3(){_finishRenderTask3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t,r){var i,l=arguments;return _regeneratorRuntime().wrap((function _callee2$(u){for(;;)switch(u.prev=u.next){case 0:i=l.length>2&&void 0!==l[2]?l[2]:null;t===this.renderTask&&(this.renderTask=null);if(!(i instanceof o.RenderingCancelledException)){u.next=4;break}return u.abrupt("return");case 4:this.renderingState=a.RenderingStates.FINISHED;this._convertCanvasToImage(r);if(!i){u.next=8;break}throw i;case 8:this.eventBus.dispatch("thumbnailRendered",this.id);case 9:case"end":return u.stop()}}),_callee2,this)})));return _finishRenderTask3.apply(this,arguments)}},(t,r,i)=>{i(135);i(136);i(185);i(192);i(219);i(175);i(176);i(177);i(178);i(190);i(187);i(195);i(196);i(197);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PagesCountLimit=r.PDFViewer=r.PDFPageViewBuffer=void 0;i(199);i(200);i(204);i(42);i(88);i(252);i(92);i(254);i(265);i(267);i(269);i(271);i(273);i(275);i(95);i(126);i(216);i(138);i(198);i(182);i(326);i(327);i(179);i(142);i(311);i(206);i(248);i(312);i(240);i(283);i(293);i(1);i(98);i(120);i(320);i(222);var a,o=i(286),l=i(239),u=i(328),c=i(329),h=i(332),d=i(319),p=i(291);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var v={FORCE_SCROLL_MODE_PAGE:15e3,FORCE_LAZY_PAGE_INIT:7500,PAUSE_EAGER_PAGE_INIT:250};r.PagesCountLimit=v;function isValidAnnotationEditorMode(t){return Object.values(o.AnnotationEditorType).includes(t)&&t!==o.AnnotationEditorType.DISABLE}var y=new WeakMap,g=new WeakMap,m=new WeakSet;a=Symbol.iterator;var b=function(){function PDFPageViewBuffer(t){_classCallCheck(this,PDFPageViewBuffer);_classPrivateMethodInitSpec(this,m);_classPrivateFieldInitSpec(this,y,{writable:!0,value:new Set});_classPrivateFieldInitSpec(this,g,{writable:!0,value:0});_classPrivateFieldSet(this,g,t)}_createClass(PDFPageViewBuffer,[{key:"push",value:function push(t){var r=_classPrivateFieldGet(this,y);r.has(t)&&r.delete(t);r.add(t);r.size>_classPrivateFieldGet(this,g)&&_classPrivateMethodGet(this,m,_destroyFirstView2).call(this)}},{key:"resize",value:function resize(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_classPrivateFieldSet(this,g,t);var i=_classPrivateFieldGet(this,y);if(r){var a,o=i.size,l=1,u=_createForOfIteratorHelper(i);try{for(u.s();!(a=u.n()).done;){var c=a.value;if(r.has(c.id)){i.delete(c);i.add(c)}if(++l>o)break}}catch(t){u.e(t)}finally{u.f()}}for(;i.size>_classPrivateFieldGet(this,g);)_classPrivateMethodGet(this,m,_destroyFirstView2).call(this)}},{key:"has",value:function has(t){return _classPrivateFieldGet(this,y).has(t)}},{key:a,value:function value(){return _classPrivateFieldGet(this,y).keys()}}]);return PDFPageViewBuffer}();r.PDFPageViewBuffer=b;function _destroyFirstView2(){var t=_classPrivateFieldGet(this,y).keys().next().value;null==t||t.destroy();_classPrivateFieldGet(this,y).delete(t)}var w=new WeakMap,P=new WeakMap,A=new WeakMap,S=new WeakMap,E=new WeakMap,x=new WeakMap,D=new WeakMap,k=new WeakMap,C=new WeakMap,T=new WeakMap,I=new WeakMap,O=new WeakMap,M=new WeakMap,L=new WeakMap,R=new WeakMap,G=new WeakMap,B=new WeakSet,j=new WeakSet,N=new WeakSet,W=new WeakSet,V=new WeakSet,U=new WeakSet,H=new WeakSet,z=new WeakSet,q=new WeakMap,Y=new WeakSet,K=new WeakSet,X=new WeakSet,$=new WeakSet,Q=new WeakSet,J=new WeakSet,Z=function(){function PDFViewer(t){var r,i,a,c,h,v,y=this;_classCallCheck(this,PDFViewer);_classPrivateMethodInitSpec(this,J);_classPrivateMethodInitSpec(this,Q);_classPrivateMethodInitSpec(this,$);_classPrivateMethodInitSpec(this,X);_classPrivateMethodInitSpec(this,K);_classPrivateMethodInitSpec(this,Y);_classPrivateFieldInitSpec(this,q,{get:_get_pageWidthScaleFactor,set:void 0});_classPrivateMethodInitSpec(this,z);_classPrivateMethodInitSpec(this,H);_classPrivateMethodInitSpec(this,U);_classPrivateMethodInitSpec(this,V);_classPrivateMethodInitSpec(this,W);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,B);_classPrivateFieldInitSpec(this,w,{writable:!0,value:null});_classPrivateFieldInitSpec(this,P,{writable:!0,value:o.AnnotationEditorType.NONE});_classPrivateFieldInitSpec(this,A,{writable:!0,value:null});_classPrivateFieldInitSpec(this,S,{writable:!0,value:o.AnnotationMode.ENABLE_FORMS});_classPrivateFieldInitSpec(this,E,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:null});_classPrivateFieldInitSpec(this,D,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,k,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,C,{writable:!0,value:null});_classPrivateFieldInitSpec(this,T,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,I,{writable:!0,value:0});_classPrivateFieldInitSpec(this,O,{writable:!0,value:new ResizeObserver(_classPrivateMethodGet(this,J,_resizeObserverCallback2).bind(this))});_classPrivateFieldInitSpec(this,M,{writable:!0,value:null});_classPrivateFieldInitSpec(this,L,{writable:!0,value:null});_classPrivateFieldInitSpec(this,R,{writable:!0,value:null});_classPrivateFieldInitSpec(this,G,{writable:!0,value:l.TextLayerMode.ENABLE});var g="3.11.440";if(o.version!==g)throw new Error('The API version "'.concat(o.version,'" does not match the Viewer version "').concat(g,'".'));this.container=t.container;this.viewer=t.viewer||t.container.firstElementChild;this.pageViewMode=t.pageViewMode||"multiple";if("DIV"!==(null===(r=this.container)||void 0===r?void 0:r.tagName)||"DIV"!==(null===(i=this.viewer)||void 0===i?void 0:i.tagName))throw new Error("Invalid `container` and/or `viewer` option.");if(this.container.offsetParent&&"absolute"!==getComputedStyle(this.container).position)throw new Error("The `container` must be absolutely positioned.");_classPrivateFieldGet(this,O).observe(this.container);this.eventBus=t.eventBus;this.linkService=t.linkService||new p.SimpleLinkService;this.downloadManager=t.downloadManager||null;this.findController=t.findController||null;this.findController&&(this.findController.onIsPageVisible=function(t){return y._getVisiblePages().ids.has(t)});this._scriptingManager=t.scriptingManager||null;_classPrivateFieldSet(this,G,null!==(a=t.textLayerMode)&&void 0!==a?a:l.TextLayerMode.ENABLE);_classPrivateFieldSet(this,S,null!==(c=t.annotationMode)&&void 0!==c?c:o.AnnotationMode.ENABLE_FORMS);_classPrivateFieldSet(this,P,null!==(h=t.annotationEditorMode)&&void 0!==h?h:o.AnnotationEditorType.NONE);this.imageResourcesPath=t.imageResourcesPath||"";this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1;this.removePageBorders=t.removePageBorders||!1;if(t.useOnlyCssZoom){console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead.");t.maxCanvasPixels=0}this.isOffscreenCanvasSupported=null===(v=t.isOffscreenCanvasSupported)||void 0===v||v;this.maxCanvasPixels=t.maxCanvasPixels;this.l10n=t.l10n||u.NullL10n;_classPrivateFieldSet(this,D,t.enablePermissions||!1);this.pageColors=t.pageColors||null;this.defaultRenderingQueue=!t.renderingQueue;if(this.defaultRenderingQueue){this.renderingQueue=new d.PDFRenderingQueue;this.renderingQueue.setViewer(this)}else this.renderingQueue=t.renderingQueue;this.scroll=(0,l.watchScroll)(this.container,this._scrollUpdate.bind(this));this.presentationModeState=l.PresentationModeState.UNKNOWN;this._onBeforeDraw=this._onAfterDraw=null;this._resetView();this.removePageBorders&&this.viewer.classList.add("removePageBorders");_classPrivateMethodGet(this,Q,_updateContainerHeightCss2).call(this);this.eventBus._on("thumbnailrendered",(function(t){var r=t.pageNumber,i=t.pdfPage,a=y._pages[r-1];_classPrivateFieldGet(y,w).has(a)||null==i||i.cleanup()}))}_createClass(PDFViewer,[{key:"pagesCount",get:function get(){return this._pages.length}},{key:"getPageView",value:function getPageView(t){return this._pages[t]}},{key:"getCachedPageViews",value:function getCachedPageViews(){return new Set(_classPrivateFieldGet(this,w))}},{key:"pageViewsReady",get:function get(){return this._pagesCapability.settled&&this._pages.every((function(t){return null==t?void 0:t.pdfPage}))}},{key:"renderForms",get:function get(){return _classPrivateFieldGet(this,S)===o.AnnotationMode.ENABLE_FORMS}},{key:"enableScripting",get:function get(){return!!this._scriptingManager}},{key:"currentPageNumber",get:function get(){return this._currentPageNumber},set:function set(t){if(!Number.isInteger(t))throw new Error("Invalid page number.");if(this.pdfDocument){var r=Math.abs(this._currentPageNumber-t)<=2;this._setCurrentPageNumber(t,!0)||globalThis.ngxConsole.error('currentPageNumber: "'.concat(t,'" is not a valid page.'));this.pageFlip&&(r?this.pageFlip.flip(t-1):this.pageFlip.turnToPage(t-1))}}},{key:"hidePagesDependingOnpageViewMode",value:function hidePagesDependingOnpageViewMode(){var t=this;"book"===this.pageViewMode&&(this.pageFlip||setTimeout((function(){if(!t.pageFlip){var r=t._pages[0].div,i=r.parentElement,a=i.parentElement;a.style.width=2*r.clientWidth+"px";a.style.overflow="hidden";a.style.marginLeft="auto";a.style.marginRight="auto";t.pageFlip=new c.PageFlip(i,{width:r.clientWidth,height:r.clientHeight,showCover:!0,size:"fixed"});t.pageFlip.loadFromHTML(document.querySelectorAll(".page"));t.ensureAdjecentPagesAreLoaded();t.pageFlip.on("flip",(function(r){t._currentPageNumber!==r.data+1&&t._setCurrentPageNumber(r.data+1,!1)}))}}),100))}},{key:"_setCurrentPageNumber",value:function _setCurrentPageNumber(t){var r,i,a=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._currentPageNumber===t){o&&_classPrivateMethodGet(this,K,_resetCurrentPageView2).call(this);return!0}if(!(0<t&&t<=this.pagesCount))return!1;var l=this._currentPageNumber;this._currentPageNumber=t;this.hidePagesDependingOnpageViewMode();if("book"===this.pageViewMode||"infinite-scroll"===this.pageViewMode){var u=this._pages[this.currentPageNumber-1];if(u.div.parentElement.classList.contains("spread"))u.div.parentElement.childNodes.forEach((function(t){var r=Number(t.getAttribute("data-page-number")),i=a._pages[r-1];_classPrivateMethodGet(a,X,_ensurePdfPageLoaded2).call(a,i).then((function(){a.renderingQueue.renderView(i)}));t.style.display="inline-block"}));else{_classPrivateMethodGet(this,X,_ensurePdfPageLoaded2).call(this,u).then((function(){a.renderingQueue.renderView(u)}));"book"===this.pageViewMode&&this.ensureAdjecentPagesAreLoaded()}}this.eventBus.dispatch("pagechanging",{source:this,pageNumber:t,pageLabel:null!==(r=null===(i=this._pageLabels)||void 0===i?void 0:i[t-1])&&void 0!==r?r:null,previous:l});o&&_classPrivateMethodGet(this,K,_resetCurrentPageView2).call(this);return!0}},{key:"addPageToRenderQueue",value:function addPageToRenderQueue(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(r>=0&&r<=this._pages.length-1){var i=this._pages[r];if(i.renderingState===l.RenderingStates.INITIAL){_classPrivateMethodGet(this,X,_ensurePdfPageLoaded2).call(this,i).then((function(){t.renderingQueue.renderView(i)}));return!0}}return!1}},{key:"ensureAdjecentPagesAreLoaded",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t,r,i,a,o,l,u=this;return _regeneratorRuntime().wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:t=0,r=[0,1,-1,2,-2];case 2:if(!(t<r.length)){c.next=12;break}i=r[t];if(!((a=this.currentPageNumber+i)>=0&&a<this._pages.length)){c.next=9;break}o=this._pages[a];c.next=9;return _classPrivateMethodGet(this,X,_ensurePdfPageLoaded2).call(this,o);case 9:t++;c.next=2;break;case 12:l=function loader(){return u.adjacentPagesLoader(loader)};this.eventBus._on("pagerendered",l);this.eventBus._on("thumbnailRendered",l);case 15:case"end":return c.stop()}}),_callee,this)}))),function ensureAdjecentPagesAreLoaded(){return r.apply(this,arguments)})},{key:"adjacentPagesLoader",value:function adjacentPagesLoader(t){var r=this._pages.some((function(t){return t.renderingState===l.RenderingStates.RUNNING}));if(!r){var i=this._pages.find((function(t){return t.renderingState===l.RenderingStates.PAUSED}));if(i)this.renderingQueue.renderView(i);else{for(var a=0,o=[0,1,-1,2,-2];a<o.length;a++){var u=o[a],c=this.currentPageNumber+u;if(c>=0&&c<this._pages.length){var h=this._pages[c];if(h.renderingState===l.RenderingStates.INITIAL){this.renderingQueue.renderView(h);return}}}this.eventBus._off("pagerendered",t);this.eventBus._off("thumbnailRendered",t)}}}},{key:"currentPageLabel",get:function get(){var t,r;return null!==(t=null===(r=this._pageLabels)||void 0===r?void 0:r[this._currentPageNumber-1])&&void 0!==t?t:null},set:function set(t){if(this.pdfDocument){var r=0|t;if(this._pageLabels){var i=this._pageLabels.indexOf(t);i>=0&&(r=i+1)}this._setCurrentPageNumber(r,!0)||globalThis.ngxConsole.error('currentPageLabel: "'.concat(t,'" is not a valid page.'))}}},{key:"currentScale",get:function get(){return this._currentScale!==l.UNKNOWN_SCALE?this._currentScale:l.DEFAULT_SCALE},set:function set(t){if(isNaN(t))throw new Error("Invalid numeric scale.");this.pdfDocument&&_classPrivateMethodGet(this,Y,_setScale2).call(this,t,{noScroll:!1})}},{key:"currentScaleValue",get:function get(){return this._currentScaleValue},set:function set(t){this.pdfDocument&&_classPrivateMethodGet(this,Y,_setScale2).call(this,t,{noScroll:!1})}},{key:"pagesRotation",get:function get(){return this._pagesRotation},set:function set(t){if(!(0,l.isValidRotation)(t))throw new Error("Invalid pages rotation angle.");if(this.pdfDocument){(t%=360)<0&&(t+=360);if(this._pagesRotation!==t){this._pagesRotation=t;var r=this._currentPageNumber;this.refresh(!0,{rotation:t});this._currentScaleValue&&_classPrivateMethodGet(this,Y,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:t,pageNumber:r});this.defaultRenderingQueue&&this.update()}}}},{key:"firstPagePromise",get:function get(){return this.pdfDocument?this._firstPageCapability.promise:null}},{key:"onePageRendered",get:function get(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}},{key:"pagesPromise",get:function get(){return this.pdfDocument?this._pagesCapability.promise:null}},{key:"getAllText",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,a,o,u,c,h,d,p;return _regeneratorRuntime().wrap((function _callee2$(v){for(;;)switch(v.prev=v.next){case 0:t=[];r=[];i=1,a=this.pdfDocument.numPages;case 3:if(!(i<=a)){v.next=20;break}if(!_classPrivateFieldGet(this,T)){v.next=6;break}return v.abrupt("return",null);case 6:r.length=0;v.next=9;return this.pdfDocument.getPage(i);case 9:o=v.sent;v.next=12;return o.getTextContent();case 12:u=v.sent;c=u.items;h=_createForOfIteratorHelper(c);try{for(h.s();!(d=h.n()).done;){(p=d.value).str&&r.push(p.str);p.hasEOL&&r.push("\n")}}catch(t){h.e(t)}finally{h.f()}t.push((0,l.removeNullCharacters)(r.join("")));case 17:++i;v.next=3;break;case 20:return v.abrupt("return",t.join("\n"));case 21:case"end":return v.stop()}}),_callee2,this)}))),function getAllText(){return t.apply(this,arguments)})},{key:"setDocument",value:function setDocument(t){var r=this;if(this.pdfDocument){var i,a;this.eventBus.dispatch("pagesdestroy",{source:this});this._cancelRendering();this._resetView();null===(i=this.findController)||void 0===i||i.setDocument(null);null===(a=this._scriptingManager)||void 0===a||a.setDocument(null);if(_classPrivateFieldGet(this,A)){_classPrivateFieldGet(this,A).destroy();_classPrivateFieldSet(this,A,null)}}this.pdfDocument=t;if(t){var u=t.numPages,c=t.getPage(1),d=t.getOptionalContentConfig(),p=_classPrivateFieldGet(this,D)?t.getPermissions():Promise.resolve();if(u>v.FORCE_SCROLL_MODE_PAGE){console.warn("Forcing PAGE-scrolling for performance reasons, given the length of the document.");var y=this._scrollMode=l.ScrollMode.PAGE;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:y})}this._pagesCapability.promise.then((function(){r.eventBus.dispatch("pagesloaded",{source:r,pagesCount:u})}),(function(){}));this._onBeforeDraw=function(t){var i=r._pages[t.pageNumber-1];i&&_classPrivateFieldGet(r,w).push(i)};this.eventBus._on("pagerender",this._onBeforeDraw);this._onAfterDraw=function(t){if(!t.cssTransform&&!r._onePageRenderedCapability.settled){r._onePageRenderedCapability.resolve({timestamp:t.timestamp});r.eventBus._off("pagerendered",r._onAfterDraw);r._onAfterDraw=null;if(_classPrivateFieldGet(r,L)){document.removeEventListener("visibilitychange",_classPrivateFieldGet(r,L));_classPrivateFieldSet(r,L,null)}}};this.eventBus._on("pagerendered",this._onAfterDraw);Promise.all([c,p]).then((function(i){var a,c,p=_slicedToArray(i,2),y=p[0],g=p[1];if(t===r.pdfDocument){r._firstPageCapability.resolve(y);r._optionalContentConfigPromise=d;var m=_classPrivateMethodGet(r,j,_initializePermissions2).call(r,g),b=m.annotationEditorMode,w=m.annotationMode,S=m.textLayerMode;if(S!==l.TextLayerMode.DISABLE){var E=_classPrivateFieldSet(r,C,document.createElement("div"));E.id="hiddenCopyElement";r.viewer.before(E)}if(b!==o.AnnotationEditorType.DISABLE){var D=b;if(t.isPureXfa)console.warn("Warning: XFA-editing is not implemented.");else if(isValidAnnotationEditorMode(D)){_classPrivateFieldSet(r,A,new o.AnnotationEditorUIManager(r.container,r.viewer,r.eventBus,t,r.pageColors));D!==o.AnnotationEditorType.NONE&&_classPrivateFieldGet(r,A).updateMode(D)}else console.error("Invalid AnnotationEditor mode: ".concat(D))}var k=_classPrivateMethodGet(r,B,_layerProperties2).bind(r),T=r._scrollMode===l.ScrollMode.PAGE?null:r.viewer,I=r.currentScale,O=y.getViewport({scale:I*o.PixelsPerInch.PDF_TO_CSS_UNITS});r.viewer.style.setProperty("--scale-factor",O.scale);"CanvasText"!==(null===(a=r.pageColors)||void 0===a?void 0:a.foreground)&&"Canvas"!==(null===(c=r.pageColors)||void 0===c?void 0:c.background)||r.viewer.style.setProperty("--hcm-highligh-filter",t.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"));for(var M=1;M<=u;++M){var L=new h.PDFPageView({container:T,eventBus:r.eventBus,id:M,scale:I,defaultViewport:O.clone(),optionalContentConfigPromise:d,renderingQueue:r.renderingQueue,textLayerMode:S,annotationMode:w,imageResourcesPath:r.imageResourcesPath,removePageBorders:r.removePageBorders,useOnlyCssZoom:r.useOnlyCssZoom,isOffscreenCanvasSupported:r.isOffscreenCanvasSupported,maxCanvasPixels:r.maxCanvasPixels,pageColors:r.pageColors,l10n:r.l10n,layerProperties:k});r._pages.push(L)}var R=r._pages[0];if(R){R.setPdfPage(y);r.linkService.cachePageRef(1,y.ref)}r._scrollMode===l.ScrollMode.PAGE?_classPrivateMethodGet(r,V,_ensurePageViewVisible2).call(r):r._spreadMode!==l.SpreadMode.NONE&&r._updateSpreadMode();_classPrivateMethodGet(r,N,_onePageRenderedOrForceFetch2).call(r).then(_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var i,a,o,l,c;return _regeneratorRuntime().wrap((function _callee3$(h){for(;;)switch(h.prev=h.next){case 0:null===(i=r.findController)||void 0===i||i.setDocument(t);null===(a=r._scriptingManager)||void 0===a||a.setDocument(t);if(_classPrivateFieldGet(r,C)){_classPrivateFieldSet(r,x,_classPrivateMethodGet(r,W,_copyCallback2).bind(r,S));document.addEventListener("copy",_classPrivateFieldGet(r,x))}_classPrivateFieldGet(r,A)&&r.eventBus.dispatch("annotationeditormodechanged",{source:r,mode:_classPrivateFieldGet(r,P)});if(!(t.loadingParams.disableAutoFetch||u>v.FORCE_LAZY_PAGE_INIT)){h.next=7;break}r._pagesCapability.resolve();return h.abrupt("return");case 7:if(!((o=u-1)<=0)){h.next=11;break}r._pagesCapability.resolve();return h.abrupt("return");case 11:l=_regeneratorRuntime().mark((function _loop(i){var a;return _regeneratorRuntime().wrap((function _loop$(l){for(;;)switch(l.prev=l.next){case 0:a=t.getPage(i).then((function(t){var a=r._pages[i-1];a.pdfPage||a.setPdfPage(t);r.linkService.cachePageRef(i,t.ref);0==--o&&r._pagesCapability.resolve()}),(function(t){console.error("Unable to get page ".concat(i," to initialize viewer"),t);0==--o&&r._pagesCapability.resolve()}));if(i%v.PAUSE_EAGER_PAGE_INIT!=0){l.next=4;break}l.next=4;return a;case 4:case"end":return l.stop()}}),_loop)}));c=2;case 13:if(!(c<=u)){h.next=18;break}return h.delegateYield(l(c),"t0",15);case 15:++c;h.next=13;break;case 18:case"end":return h.stop()}}),_callee3)}))));r.hidePagesDependingOnpageViewMode();r.eventBus.dispatch("pagesinit",{source:r});t.getMetadata().then((function(i){var a=i.info;t===r.pdfDocument&&a.Language&&(r.viewer.lang=a.Language)}));r.defaultRenderingQueue&&r.update()}})).catch((function(t){globalThis.ngxConsole.error("Unable to initialize viewer",t);r._pagesCapability.reject(t)}))}}},{key:"setPageLabels",value:function setPageLabels(t){if(this.pdfDocument){if(t)if(Array.isArray(t)&&this.pdfDocument.numPages===t.length)this._pageLabels=t;else{this._pageLabels=null;globalThis.ngxConsole.error("setPageLabels: Invalid page labels.")}else this._pageLabels=null;for(var r=0,i=this._pages.length;r<i;r++){var a,o;this._pages[r].setPageLabel(null!==(a=null===(o=this._pageLabels)||void 0===o?void 0:o[r])&&void 0!==a?a:null)}}}},{key:"_resetView",value:function _resetView(){this._pages=[];this._currentPageNumber=1;this._currentScale=l.UNKNOWN_SCALE;this._currentScaleValue=null;this._pageLabels=null;var t=Number(PDFViewerApplicationOptions.get("defaultCacheSize"))||10;_classPrivateFieldSet(this,w,new b(t));this._location=null;this._pagesRotation=0;this._optionalContentConfigPromise=null;this._firstPageCapability=new o.PromiseCapability;this._onePageRenderedCapability=new o.PromiseCapability;this._pagesCapability=new o.PromiseCapability;this._scrollMode=l.ScrollMode.VERTICAL;this._previousScrollMode=l.ScrollMode.UNKNOWN;this._spreadMode=l.SpreadMode.NONE;_classPrivateFieldSet(this,M,{previousPageNumber:1,scrollDown:!0,pages:[]});if(this._onBeforeDraw){this.eventBus._off("pagerender",this._onBeforeDraw);this._onBeforeDraw=null}if(this._onAfterDraw){this.eventBus._off("pagerendered",this._onAfterDraw);this._onAfterDraw=null}if(_classPrivateFieldGet(this,L)){document.removeEventListener("visibilitychange",_classPrivateFieldGet(this,L));_classPrivateFieldSet(this,L,null)}this.viewer.textContent="";this._updateScrollMode();this.viewer.removeAttribute("lang");if(_classPrivateFieldGet(this,C)){document.removeEventListener("copy",_classPrivateFieldGet(this,x));_classPrivateFieldSet(this,x,null);_classPrivateFieldGet(this,C).remove();_classPrivateFieldSet(this,C,null)}}},{key:"_scrollUpdate",value:function _scrollUpdate(){0!==this.pagesCount&&this.update()}},{key:"scrollPagePosIntoView",value:function scrollPagePosIntoView(t,r){var i=this._pages[t-1].div;if(r){var a=function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({},r);if("string"==typeof a.top&&a.top.endsWith("%")){var o,l=Number(a.top.replace("%","")),u=null===(o=this.viewer.querySelector(".page"))||void 0===o?void 0:o.clientHeight,c=i.clientHeight?i.clientHeight:u,h=this.viewer.parentElement.clientHeight;c=Math.max(0,c-h);a.top=l*c/100}if("string"==typeof a.left&&a.left.endsWith("%")){var d,p=Number(a.left.replace("%","")),v=null===(d=this.viewer.querySelector(".page"))||void 0===d?void 0:d.clientWidth,y=i.clientWidth?i.clientWidth:v;a.left=p*y/100}_classPrivateMethodGet(this,U,_scrollIntoView2).call(this,{div:i,id:t},a)}else _classPrivateMethodGet(this,U,_scrollIntoView2).call(this,{pageDiv:i,pageNumber:t})}},{key:"pageLabelToPageNumber",value:function pageLabelToPageNumber(t){if(!this._pageLabels)return null;var r=this._pageLabels.indexOf(t);return r<0?null:r+1}},{key:"scrollPageIntoView",value:function scrollPageIntoView(t){var r=this,i=t.pageNumber,a=t.destArray,u=void 0===a?null:a,c=t.allowNegativeOffset,h=void 0!==c&&c,d=t.ignoreDestinationZoom,p=void 0!==d&&d;if(this.pdfDocument){var v=Number.isInteger(i)&&this._pages[i-1];if(v)if(!this.isInPresentationMode&&u){var y,g,m=0,b=0,w=0,P=0,A=v.rotation%180!=0,S=(A?v.height:v.width)/v.scale/o.PixelsPerInch.PDF_TO_CSS_UNITS,E=(A?v.width:v.height)/v.scale/o.PixelsPerInch.PDF_TO_CSS_UNITS,x=0;switch(u[1].name){case"XYZ":m=u[2];b=u[3];x=u[4];m=null!==m?m:0;b=null!==b?b:E;break;case"Fit":case"FitB":x="page-fit";break;case"FitH":case"FitBH":x="page-width";if(null===(b=u[2])&&this._location){m=this._location.left;b=this._location.top}else("number"!=typeof b||b<0)&&(b=E);break;case"FitV":case"FitBV":m=u[2];w=S;P=E;x="page-height";break;case"FitR":m=u[2];b=u[3];w=u[4]-m;P=u[5]-b;var D=l.SCROLLBAR_PADDING,k=l.VERTICAL_PADDING;this.removePageBorders&&(D=k=0);y=(this.container.clientWidth-D)/w/o.PixelsPerInch.PDF_TO_CSS_UNITS;g=(this.container.clientHeight-k)/P/o.PixelsPerInch.PDF_TO_CSS_UNITS;x=Math.min(Math.abs(y),Math.abs(g));break;default:console.error('scrollPageIntoView: "'.concat(u[1].name,'" is not a valid destination type.'));return}p||(x&&x!==this._currentScale?this.currentScaleValue=x:this._currentScale===l.UNKNOWN_SCALE&&(this.currentScaleValue=l.DEFAULT_SCALE_VALUE));_classPrivateMethodGet(this,X,_ensurePdfPageLoaded2).call(this,v).then((function(){r.renderingQueue.renderView(v);"single"===r.pageViewMode&&r.currentPageNumber!==i&&(r.currentPageNumber=i)}));if("page-fit"!==x||u[4]){var C=[v.viewport.convertToViewportPoint(m,b),v.viewport.convertToViewportPoint(m+w,b+P)],T=Math.min(C[0][0],C[1][0]),I=Math.min(C[0][1],C[1][1]);if(!h){T=Math.max(T,0);I=Math.max(I,0)}_classPrivateMethodGet(this,U,_scrollIntoView2).call(this,v,{left:T,top:I})}else _classPrivateMethodGet(this,U,_scrollIntoView2).call(this,v)}else this._setCurrentPageNumber(i,!0);else console.error('scrollPageIntoView: "'.concat(i,'" is not a valid pageNumber parameter.'))}}},{key:"_updateLocation",value:function _updateLocation(t){var r=this._currentScale,i=this._currentScaleValue,a=parseFloat(i)===r?Math.round(1e4*r)/100:i,o=t.id,l=this._pages[o-1],u=this.container,c=l.getPagePoint(u.scrollLeft-t.x,u.scrollTop-t.y),h=Math.round(c[0]),d=Math.round(c[1]),p="#page=".concat(o);this.isInPresentationMode||(p+="&zoom=".concat(a,",").concat(h,",").concat(d));this._location={pageNumber:o,scale:a,top:d,left:h,rotation:this._pagesRotation,pdfOpenParams:p}}},{key:"update",value:function update(){this.scrollMode===l.ScrollMode.PAGE?this.viewer.classList.add("singlePageView"):this.viewer.classList.remove("singlePageView");var t=this._getVisiblePages(),r=t.views,i=r.length;if(0!==i){var a=Number(PDFViewerApplicationOptions.get("defaultCacheSize"))||10,o=Math.max(a,2*i+1);_classPrivateFieldGet(this,w).resize(o,t.ids);this.renderingQueue.renderHighestPriority(t);var u,c=this._spreadMode===l.SpreadMode.NONE&&(this._scrollMode===l.ScrollMode.PAGE||this._scrollMode===l.ScrollMode.VERTICAL),h=this._currentPageNumber,d=!1,p=_createForOfIteratorHelper(r);try{for(p.s();!(u=p.n()).done;){var v=u.value;if(v.percent<100)break;if(v.id===h&&c){d=!0;break}}}catch(t){p.e(t)}finally{p.f()}if(this.scrollMode!==l.ScrollMode.PAGE){this._setCurrentPageNumber(d?h:r[0].id);this._updateLocation(t.first);this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}this.hidePagesDependingOnpageViewMode()}}},{key:"containsElement",value:function containsElement(t){return this.container.contains(t)}},{key:"focus",value:function focus(){this.container.focus()}},{key:"_isContainerRtl",get:function get(){return"rtl"===getComputedStyle(this.container).direction}},{key:"isInPresentationMode",get:function get(){return this.presentationModeState===l.PresentationModeState.FULLSCREEN}},{key:"isChangingPresentationMode",get:function get(){return this.presentationModeState===l.PresentationModeState.CHANGING}},{key:"isHorizontalScrollbarEnabled",get:function get(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}},{key:"isVerticalScrollbarEnabled",get:function get(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}},{key:"_getVisiblePages",value:function _getVisiblePages(){var t=this._scrollMode===l.ScrollMode.PAGE?_classPrivateFieldGet(this,M).pages:this._pages,r=this._scrollMode===l.ScrollMode.HORIZONTAL,i=r&&this._isContainerRtl;return(0,l.getVisibleElements)({scrollEl:this.container,views:t,sortByVisibility:!0,horizontal:r,rtl:i})}},{key:"cleanup",value:function cleanup(){var t,r=_createForOfIteratorHelper(this._pages);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.renderingState!==l.RenderingStates.FINISHED&&i.reset()}}catch(t){r.e(t)}finally{r.f()}}},{key:"_cancelRendering",value:function _cancelRendering(){var t,r=_createForOfIteratorHelper(this._pages);try{for(r.s();!(t=r.n()).done;){t.value.cancelRendering()}}catch(t){r.e(t)}finally{r.f()}}},{key:"forceRendering",value:function forceRendering(t){var r=this,i=t||this._getVisiblePages(),a=_classPrivateMethodGet(this,$,_getScrollAhead2).call(this,i),o=this._spreadMode!==l.SpreadMode.NONE&&this._scrollMode!==l.ScrollMode.HORIZONTAL,u=this.renderingQueue.getHighestPriority(i,this._pages,a,o);if(u){_classPrivateMethodGet(this,X,_ensurePdfPageLoaded2).call(this,u).then((function(){r.renderingQueue.renderView(u)}));return!0}return!1}},{key:"hasEqualPageSizes",get:function get(){for(var t=this._pages[0],r=1,i=this._pages.length;r<i;++r){var a=this._pages[r];if(a.width!==t.width||a.height!==t.height)return!1}return!0}},{key:"getPagesOverview",value:function getPagesOverview(){var t,r=this;return this._pages.map((function(i){var a=i.pdfPage.getViewport({scale:1}),o=(0,l.isPortraitOrientation)(a);if(void 0===t)t=o;else if(r.enablePrintAutoRotate&&o!==t)return{width:a.height,height:a.width,rotation:(a.rotation-90)%360};return{width:a.width,height:a.height,rotation:a.rotation}}))}},{key:"optionalContentConfigPromise",get:function get(){if(!this.pdfDocument)return Promise.resolve(null);if(!this._optionalContentConfigPromise){console.error("optionalContentConfigPromise: Not initialized yet.");return this.pdfDocument.getOptionalContentConfig()}return this._optionalContentConfigPromise},set:function set(t){if(!(t instanceof Promise))throw new Error("Invalid optionalContentConfigPromise: ".concat(t));if(this.pdfDocument&&this._optionalContentConfigPromise){this._optionalContentConfigPromise=t;this.refresh(!1,{optionalContentConfigPromise:t});this.eventBus.dispatch("optionalcontentconfigchanged",{source:this,promise:t})}}},{key:"scrollMode",get:function get(){return this._scrollMode},set:function set(t){if(this._scrollMode!==t){if(!(0,l.isValidScrollMode)(t))throw new Error("Invalid scroll mode: ".concat(t));if(!(this.pagesCount>v.FORCE_SCROLL_MODE_PAGE)){this._previousScrollMode=this._scrollMode;this._scrollMode=t;this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t});this._updateScrollMode(this._currentPageNumber)}}}},{key:"_updateScrollMode",value:function _updateScrollMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",r===l.ScrollMode.HORIZONTAL);i.classList.toggle("scrollWrapped",r===l.ScrollMode.WRAPPED);if(this.pdfDocument&&t){r===l.ScrollMode.PAGE?_classPrivateMethodGet(this,V,_ensurePageViewVisible2).call(this):this._previousScrollMode===l.ScrollMode.PAGE&&this._updateSpreadMode();this._currentScaleValue&&isNaN(this._currentScaleValue)&&_classPrivateMethodGet(this,Y,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});this._setCurrentPageNumber(t,!0);this.update()}}},{key:"spreadMode",get:function get(){return this._spreadMode},set:function set(t){if(this._spreadMode!==t){if(!(0,l.isValidSpreadMode)(t))throw new Error("Invalid spread mode: ".concat(t));this._spreadMode=t;this.eventBus.dispatch("spreadmodechanged",{source:this,mode:t});this._updateSpreadMode(this._currentPageNumber)}}},{key:"_updateSpreadMode",value:function _updateSpreadMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.pdfDocument){var r=this.viewer,i=this._pages;if(this._scrollMode===l.ScrollMode.PAGE)_classPrivateMethodGet(this,V,_ensurePageViewVisible2).call(this);else{r.textContent="";if(this._spreadMode===l.SpreadMode.NONE){var a,o=_createForOfIteratorHelper(this._pages);try{for(o.s();!(a=o.n()).done;){var u=a.value;r.append(u.div)}}catch(t){o.e(t)}finally{o.f()}}else for(var c=this._spreadMode-1,h=null,d=0,p=i.length;d<p;++d){if(null===h){(h=document.createElement("div")).className="spread";r.append(h)}else if(d%2===c){h=h.cloneNode(!1);r.append(h)}h.append(i[d].div)}}this.hidePagesDependingOnpageViewMode();if(t){this._currentScaleValue&&isNaN(this._currentScaleValue)&&_classPrivateMethodGet(this,Y,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});this._setCurrentPageNumber(t,!0);this.update()}}}},{key:"_getPageAdvance",value:function _getPageAdvance(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("book"===this.pageViewMode)return 2;switch(this._scrollMode){case l.ScrollMode.WRAPPED:var i,a=this._getVisiblePages().views,o=new Map,u=_createForOfIteratorHelper(a);try{for(u.s();!(i=u.n()).done;){var c=i.value,h=c.id,d=c.y,p=c.percent,v=c.widthPercent;if(!(0===p||v<100)){var y=o.get(d);y||o.set(d,y||(y=[]));y.push(h)}}}catch(t){u.e(t)}finally{u.f()}var g,m=_createForOfIteratorHelper(o.values());try{for(m.s();!(g=m.n()).done;){var b=g.value,w=b.indexOf(t);if(-1!==w){var P=b.length;if(1===P)break;if(r)for(var A=w-1;A>=0;A--){var S=b[A],E=b[A+1]-1;if(S<E)return t-E}else for(var x=w+1,D=P;x<D;x++){var k=b[x],C=b[x-1]+1;if(k>C)return C-t}if(r){var T=b[0];if(T<t)return t-T+1}else{var I=b[P-1];if(I>t)return I-t+1}break}}}catch(t){m.e(t)}finally{m.f()}break;case l.ScrollMode.HORIZONTAL:break;case l.ScrollMode.PAGE:case l.ScrollMode.VERTICAL:if(this._spreadMode===l.SpreadMode.NONE)break;var O=this._spreadMode-1;if(r&&t%2!==O)break;if(!r&&t%2===O)break;var M,L=r?t-1:t+1,R=_createForOfIteratorHelper(this._getVisiblePages().views);try{for(R.s();!(M=R.n()).done;){var G=M.value,B=G.id,j=G.percent,N=G.widthPercent;if(B===L){if(j>0&&100===N)return 2;break}}}catch(t){R.e(t)}finally{R.f()}}return 1}},{key:"nextPage",value:function nextPage(){var t=this._currentPageNumber,r=this.pagesCount;if(t>=r)return!1;var i=this._getPageAdvance(t,!1)||1;this.currentPageNumber=Math.min(t+i,r);return!0}},{key:"previousPage",value:function previousPage(){var t=this._currentPageNumber;if(t<=1)return!1;var r=this._getPageAdvance(t,!0)||1;this.currentPageNumber=Math.max(t-r,1);return!0}},{key:"increaseScale",value:function increaseScale(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.drawingDelay,i=t.scaleFactor,a=t.steps;if(this.pdfDocument){var o=this._currentScale;if(i>1)o=Math.round(o*i*100)/100;else{var u;null!==(u=a)&&void 0!==u||(a=1);do{o=Math.ceil(10*(o*l.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--a>0&&o<l.MAX_SCALE)}var c=Number(PDFViewerApplicationOptions.get("maxZoom"));c||(c=l.MAX_SCALE);_classPrivateMethodGet(this,Y,_setScale2).call(this,Math.min(c,o),{noScroll:!1,drawingDelay:r})}}},{key:"decreaseScale",value:function decreaseScale(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.drawingDelay,i=t.scaleFactor,a=t.steps;if(this.pdfDocument){var o=this._currentScale;if(i>0&&i<1)o=Math.round(o*i*100)/100;else{var u;null!==(u=a)&&void 0!==u||(a=1);do{o=Math.floor(10*(o/l.DEFAULT_SCALE_DELTA).toFixed(2))/10}while(--a>0&&o>l.MIN_SCALE)}var c=Number(PDFViewerApplicationOptions.get("minZoom"));c||(c=l.MIN_SCALE);_classPrivateMethodGet(this,Y,_setScale2).call(this,Math.max(c,o),{noScroll:!1,drawingDelay:r})}}},{key:"containerTopLeft",get:function get(){return _classPrivateFieldGet(this,E)||_classPrivateFieldSet(this,E,[this.container.offsetTop,this.container.offsetLeft])}},{key:"annotationEditorMode",get:function get(){return _classPrivateFieldGet(this,A)?_classPrivateFieldGet(this,P):o.AnnotationEditorType.DISABLE},set:function set(t){var r=t.mode,i=t.editId,a=void 0===i?null:i;if(!_classPrivateFieldGet(this,A))throw new Error("The AnnotationEditor is not enabled.");if(_classPrivateFieldGet(this,P)!==r){if(!isValidAnnotationEditorMode(r))throw new Error("Invalid AnnotationEditor mode: ".concat(r));if(this.pdfDocument){_classPrivateFieldSet(this,P,r);this.eventBus.dispatch("annotationeditormodechanged",{source:this,mode:r});_classPrivateFieldGet(this,A).updateMode(r,a)}}}},{key:"annotationEditorParams",set:function set(t){var r=t.type,i=t.value;if(!_classPrivateFieldGet(this,A))throw new Error("The AnnotationEditor is not enabled.");_classPrivateFieldGet(this,A).updateParams(r,i)}},{key:"refresh",value:function refresh(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.create(null);if(this.pdfDocument){var i,a=_createForOfIteratorHelper(this._pages);try{for(a.s();!(i=a.n()).done;){i.value.update(r)}}catch(t){a.e(t)}finally{a.f()}if(null!==_classPrivateFieldGet(this,R)){clearTimeout(_classPrivateFieldGet(this,R));_classPrivateFieldSet(this,R,null)}t||this.update()}}},{key:"getSerializedAnnotations",value:function getSerializedAnnotations(){var t=this.pdfDocument.annotationStorage.getAll();if(t){return Object.values(t).map((function(t){return t.serialize()}))}return null}},{key:"addEditorAnnotation",value:function addEditorAnnotation(t){Array.isArray(t)||(t=[t]);_classPrivateFieldGet(this,A).addSerializedEditor(t,!0,!0,!1)}},{key:"removeEditorAnnotations",value:function removeEditorAnnotations(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};_classPrivateFieldGet(this,A).removeEditors(t)}},{key:"destroyBookMode",value:function destroyBookMode(){if(this.pageFlip){this.pageFlip.destroy();this.pageFlip=null}}},{key:"stopRendering",value:function stopRendering(){this._cancelRendering()}}]);var t,r;return PDFViewer}();r.PDFViewer=Z;function _layerProperties2(){var t=this;return{get annotationEditorUIManager(){return _classPrivateFieldGet(t,A)},get annotationStorage(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.annotationStorage},get downloadManager(){return t.downloadManager},get enableScripting(){return!!t._scriptingManager},get fieldObjectsPromise(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.getFieldObjects()},get findController(){return t.findController},get hasJSActionsPromise(){var r;return null===(r=t.pdfDocument)||void 0===r?void 0:r.hasJSActions()},get linkService(){return t.linkService}}}function _initializePermissions2(t){var r={annotationEditorMode:_classPrivateFieldGet(this,P),annotationMode:_classPrivateFieldGet(this,S),textLayerMode:_classPrivateFieldGet(this,G)};if(!t)return r;t.includes(o.PermissionFlag.COPY)||_classPrivateFieldGet(this,G)!==l.TextLayerMode.ENABLE||(r.textLayerMode=l.TextLayerMode.ENABLE_PERMISSIONS);t.includes(o.PermissionFlag.MODIFY_CONTENTS)||(r.annotationEditorMode=o.AnnotationEditorType.DISABLE);t.includes(o.PermissionFlag.MODIFY_ANNOTATIONS)||t.includes(o.PermissionFlag.FILL_INTERACTIVE_FORMS)||_classPrivateFieldGet(this,S)!==o.AnnotationMode.ENABLE_FORMS||(r.annotationMode=o.AnnotationMode.ENABLE);return r}function _onePageRenderedOrForceFetch2(){var t=this;if("hidden"===document.visibilityState||!this.container.offsetParent||0===this._getVisiblePages().views.length)return Promise.resolve();var r=new Promise((function(r){_classPrivateFieldSet(t,L,(function(){if("hidden"===document.visibilityState){r();document.removeEventListener("visibilitychange",_classPrivateFieldGet(t,L));_classPrivateFieldSet(t,L,null)}}));document.addEventListener("visibilitychange",_classPrivateFieldGet(t,L))}));return Promise.race([this._onePageRenderedCapability.promise,r])}function _copyCallback2(t,r){var i=this,a=document.getSelection(),o=a.focusNode;if(a.anchorNode&&o&&a.containsNode(_classPrivateFieldGet(this,C))){if(_classPrivateFieldGet(this,k)||t===l.TextLayerMode.ENABLE_PERMISSIONS){r.preventDefault();r.stopPropagation();return}_classPrivateFieldSet(this,k,!0);var u=this.container.style.cursor;this.container.style.cursor="wait";var c=function interruptCopy(t){return _classPrivateFieldSet(i,T,"Escape"===t.key)};window.addEventListener("keydown",c);this.getAllText().then(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:if(null===t){r.next=3;break}r.next=3;return navigator.clipboard.writeText(t);case 3:case"end":return r.stop()}}),_callee4)})));return function(r){return t.apply(this,arguments)}}()).catch((function(t){console.warn("Something goes wrong when extracting the text: ".concat(t.message))})).finally((function(){_classPrivateFieldSet(i,k,!1);_classPrivateFieldSet(i,T,!1);window.removeEventListener("keydown",c);i.container.style.cursor=u}));r.preventDefault();r.stopPropagation()}}function _ensurePageViewVisible2(){if(this._scrollMode!==l.ScrollMode.PAGE)throw new Error("#ensurePageViewVisible: Invalid scrollMode value.");var t=this._currentPageNumber,r=_classPrivateFieldGet(this,M),i=this.viewer;i.textContent="";r.pages.length=0;if(this._spreadMode!==l.SpreadMode.NONE||this.isInPresentationMode){var a=new Set,o=this._spreadMode-1;if(-1===o)a.add(t-1);else if(t%2!==o){a.add(t-1);a.add(t)}else{a.add(t-2);a.add(t-1)}var u=document.createElement("div");u.className="spread";if(this.isInPresentationMode){var c=document.createElement("div");c.className="dummyPage";u.append(c)}var h,d=_createForOfIteratorHelper(a);try{for(d.s();!(h=d.n()).done;){var p=h.value,v=this._pages[p];if(v){u.append(v.div);r.pages.push(v)}}}catch(t){d.e(t)}finally{d.f()}i.append(u)}else{var y=this._pages[t-1];i.append(y.div);r.pages.push(y)}r.scrollDown=t>=r.previousPageNumber;r.previousPageNumber=t}function _scrollIntoView2(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t){var i=t.div,a=t.id;this._currentPageNumber!==a&&this._setCurrentPageNumber(a);if(this._scrollMode===l.ScrollMode.PAGE){_classPrivateMethodGet(this,V,_ensurePageViewVisible2).call(this);this.update()}if(!r&&!this.isInPresentationMode){var o=i.offsetLeft+i.clientLeft,u=o+i.clientWidth,c=this.container,h=c.scrollLeft,d=c.clientWidth;(this._scrollMode===l.ScrollMode.HORIZONTAL||o<h||u>h+d)&&(r={left:0,top:0})}(0,l.scrollIntoView)(i,r,!1,"infinite-scroll"===this.pageViewMode);!this._currentScaleValue&&this._location&&(this._location=null)}}function _isSameScale2(t){return t===this._currentScale||Math.abs(t-this._currentScale)<1e-15}function _setScaleUpdatePages2(t,r,i){var a=this,l=i.noScroll,u=void 0!==l&&l,c=i.preset,h=void 0!==c&&c,d=i.drawingDelay,p=void 0===d?-1:d,v=isNaN(Number(this.currentScale))?void 0:Number(this.currentScale),y=this.currentScaleValue;this._currentScaleValue=r.toString();if(_classPrivateMethodGet(this,H,_isSameScale2).call(this,t))h&&this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:r,previousScale:v,previousPresetValue:y});else{this.viewer.style.setProperty("--scale-factor",t*o.PixelsPerInch.PDF_TO_CSS_UNITS);var g=p>=0&&p<1e3;this.refresh(!0,{scale:t,drawingDelay:g?p:-1});g&&_classPrivateFieldSet(this,R,setTimeout((function(){_classPrivateFieldSet(a,R,null);a.refresh()}),p));this._currentScale=t;if(!u){var m,b=this._currentPageNumber;if(this._location&&!this.isInPresentationMode&&!this.isChangingPresentationMode){b=this._location.pageNumber;m=[null,{name:"XYZ"},this._location.left,this._location.top,null]}this.scrollPageIntoView({pageNumber:b,destArray:m,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:h?r:void 0,previousScale:v,previousPresetValue:y});this.defaultRenderingQueue&&this.update()}}function _get_pageWidthScaleFactor(){return this._spreadMode!==l.SpreadMode.NONE&&this._scrollMode!==l.ScrollMode.HORIZONTAL?2:1}function _setScale2(t,r){t||(t="auto");var i=parseFloat(t);if(this._currentScale!==i)if(i>0){r.preset=!1;_classPrivateMethodGet(this,z,_setScaleUpdatePages2).call(this,i,t,r)}else{var a=this._pages[this._currentPageNumber-1];if(!a)return;var o=l.SCROLLBAR_PADDING,u=l.VERTICAL_PADDING;if(this.isInPresentationMode){o=u=4;this._spreadMode!==l.SpreadMode.NONE&&(o*=2)}else if(this.removePageBorders)o=u=0;else if(this._scrollMode===l.ScrollMode.HORIZONTAL){var c=[u,o];o=c[0];u=c[1]}var h=(this.container.clientWidth-o)/a.width*a.scale/_classPrivateFieldGet(this,q),d=(this.container.clientHeight-u)/a.height*a.scale;switch(t){case"page-actual":i=1;break;case"page-width":i=h;break;case"page-height":i=d;break;case"page-fit":i=Math.min(h,d);break;case"auto":var p=(0,l.isPortraitOrientation)(a)?h:Math.min(d,h);i=Math.min(l.MAX_AUTO_SCALE,p);break;default:globalThis.ngxConsole.error('#setScale: "'.concat(t,'" is an unknown zoom value.'));return}r.preset=!0;_classPrivateMethodGet(this,z,_setScaleUpdatePages2).call(this,i,t,r)}}function _resetCurrentPageView2(){var t=this._pages[this._currentPageNumber-1];this.isInPresentationMode&&_classPrivateMethodGet(this,Y,_setScale2).call(this,this._currentScaleValue,{noScroll:!0});_classPrivateMethodGet(this,U,_scrollIntoView2).call(this,t)}function _ensurePdfPageLoaded2(t){return _ensurePdfPageLoaded3.apply(this,arguments)}function _ensurePdfPageLoaded3(){return(_ensurePdfPageLoaded3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r,i,a;return _regeneratorRuntime().wrap((function _callee5$(o){for(;;)switch(o.prev=o.next){case 0:if(!t.pdfPage){o.next=2;break}return o.abrupt("return",t.pdfPage);case 2:o.prev=2;o.next=5;return this.pdfDocument.getPage(t.id);case 5:a=o.sent;t.pdfPage||t.setPdfPage(a);null!==(r=(i=this.linkService)._cachedPageNumber)&&void 0!==r&&r.call(i,a.ref)||this.linkService.cachePageRef(t.id,a.ref);return o.abrupt("return",a);case 11:o.prev=11;o.t0=o.catch(2);console.error("Unable to get page for page view",o.t0);return o.abrupt("return",null);case 15:case"end":return o.stop()}}),_callee5,this,[[2,11]])})))).apply(this,arguments)}function _getScrollAhead2(t){var r,i;if(1===(null===(r=t.first)||void 0===r?void 0:r.id))return!0;if((null===(i=t.last)||void 0===i?void 0:i.id)===this.pagesCount)return!1;switch(this._scrollMode){case l.ScrollMode.PAGE:return _classPrivateFieldGet(this,M).scrollDown;case l.ScrollMode.HORIZONTAL:return this.scroll.right}return this.scroll.down}function _updateContainerHeightCss2(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.container.clientHeight;if(t!==_classPrivateFieldGet(this,I)){_classPrivateFieldSet(this,I,t);l.docStyle.setProperty("--viewer-container-height","".concat(t,"px"))}}function _resizeObserverCallback2(t){var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a.target===this.container){_classPrivateMethodGet(this,Q,_updateContainerHeightCss2).call(this,Math.floor(a.borderBoxSize[0].blockSize));_classPrivateFieldSet(this,E,null);break}}}catch(t){i.e(t)}finally{i.f()}}},(t,r,i)=>{var a=i(67),o=i(105).find,l=i(46),u="find",c=!0;u in[]&&Array(1)[u]((function(){c=!1}));a({target:"Array",proto:!0,forced:c},{find:function find(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}});l(u)},(t,r,i)=>{var a=i(67),o=i(107),l=i(51).indexOf,u=i(184),c=o([].indexOf),h=!!c&&1/c([1],1,-0)<0;a({target:"Array",proto:!0,forced:h||!u("indexOf")},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return h?c(this,t,r)||0:l(this,t,r)}})},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(88);i(142);i(98);i(120);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(190);i(126);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.NullL10n=void 0;r.getL10nFallback=getL10nFallback;i(206);i(248);i(251);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}var a={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",print_progress_percent:"{{progress}}%"};function getL10nFallback(t,r){switch(t){case"find_match_count":t="find_match_count[".concat(1===r.total?"one":"other","]");break;case"find_match_count_limit":t="find_match_count_limit[".concat(1===r.limit?"one":"other","]")}return a[t]||""}function formatL10nValue(t,r){return r?t.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(function(t,i){return i in r?r[i]:"{{"+i+"}}"})):t}var o={getLanguage:function getLanguage(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","en-us");case 1:case"end":return t.stop()}}),_callee)})))()},getDirection:function getDirection(){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return","ltr");case 1:case"end":return t.stop()}}),_callee2)})))()},get:function get(t){var r=arguments;return _asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var i,a;return _regeneratorRuntime().wrap((function _callee3$(o){for(;;)switch(o.prev=o.next){case 0:i=r.length>1&&void 0!==r[1]?r[1]:null;a=r.length>2&&void 0!==r[2]?r[2]:getL10nFallback(t,i);return o.abrupt("return",formatL10nValue(a,i));case 3:case"end":return o.stop()}}),_callee3)})))()},translate:function translate(t){return _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){return _regeneratorRuntime().wrap((function _callee4$(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),_callee4)})))()}};r.NullL10n=o},(t,r,i)=>{i(1);i(190);i(122);i(123);i(192);i(219);i(299);i(196);Object.defineProperty(r,"__esModule",{value:!0});r.PageFlip=void 0;i(135);i(136);i(98);i(120);i(88);i(126);i(138);i(330);i(179);i(327);i(216);i(185);i(222);i(308);i(309);i(206);i(310);i(199);i(42);i(240);i(92);i(95);i(217);function _get(){_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,i){var a=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(a){var o=Object.getOwnPropertyDescriptor(a,r);return o.get?o.get.call(arguments.length<3?t:i):o.value}};return _get.apply(this,arguments)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}var a=function(){function Page(t,r){_classCallCheck(this,Page);this.state={angle:0,area:[],position:{x:0,y:0},hardAngle:0,hardDrawingAngle:0};this.createdDensity=r;this.nowDrawingDensity=this.createdDensity;this.render=t}_createClass(Page,[{key:"setDensity",value:function setDensity(t){this.createdDensity=t;this.nowDrawingDensity=t}},{key:"setDrawingDensity",value:function setDrawingDensity(t){this.nowDrawingDensity=t}},{key:"setPosition",value:function setPosition(t){this.state.position=t}},{key:"setAngle",value:function setAngle(t){this.state.angle=t}},{key:"setArea",value:function setArea(t){this.state.area=t}},{key:"setHardDrawingAngle",value:function setHardDrawingAngle(t){this.state.hardDrawingAngle=t}},{key:"setHardAngle",value:function setHardAngle(t){this.state.hardAngle=t;this.state.hardDrawingAngle=t}},{key:"setOrientation",value:function setOrientation(t){this.orientation=t}},{key:"getDrawingDensity",value:function getDrawingDensity(){return this.nowDrawingDensity}},{key:"getDensity",value:function getDensity(){return this.createdDensity}},{key:"getHardAngle",value:function getHardAngle(){return this.state.hardAngle}}]);return Page}(),o=function(t){_inherits(ImagePage,t);var r=_createSuper(ImagePage);function ImagePage(t,i,a){var o;_classCallCheck(this,ImagePage);(o=r.call(this,t,a)).image=null;o.isLoad=!1;o.loadingAngle=0;o.image=new Image;o.image.src=i;return o}_createClass(ImagePage,[{key:"draw",value:function draw(t){var r=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,i=canvas.getContext("2d",r),a=this.render.convertToGlobal(this.state.position),o=this.render.getRect().pageWidth,l=this.render.getRect().height;i.save();i.translate(a.x,a.y);i.beginPath();var u,c=_createForOfIteratorHelper(this.state.area);try{for(c.s();!(u=c.n()).done;){var h=u.value;if(null!==h){h=this.render.convertToGlobal(h);i.lineTo(h.x-a.x,h.y-a.y)}}}catch(t){c.e(t)}finally{c.f()}i.rotate(this.state.angle);i.clip();this.isLoad?i.drawImage(this.image,0,0,o,l):this.drawLoader(i,{x:0,y:0},o,l);i.restore()}},{key:"simpleDraw",value:function simpleDraw(t){var r=this.render.getRect(),i=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,a=canvas.getContext("2d",i),o=r.pageWidth,l=r.height,u=1===t?r.left+r.pageWidth:r.left,c=r.top;this.isLoad?a.drawImage(this.image,u,c,o,l):this.drawLoader(a,{x:u,y:c},o,l)}},{key:"drawLoader",value:function drawLoader(t,r,i,a){t.beginPath();t.strokeStyle="rgb(200, 200, 200)";t.fillStyle="rgb(255, 255, 255)";t.lineWidth=1;t.rect(r.x+1,r.y+1,i-1,a-1);t.stroke();t.fill();var o={x:r.x+i/2,y:r.y+a/2};t.beginPath();t.lineWidth=10;t.arc(o.x,o.y,20,this.loadingAngle,3*Math.PI/2+this.loadingAngle);t.stroke();t.closePath();this.loadingAngle+=.07;this.loadingAngle>=2*Math.PI&&(this.loadingAngle=0)}},{key:"load",value:function load(){var t=this;this.isLoad||(this.image.onload=function(){t.isLoad=!0})}},{key:"newTemporaryCopy",value:function newTemporaryCopy(){return this}},{key:"getTemporaryCopy",value:function getTemporaryCopy(){return this}},{key:"hideTemporaryCopy",value:function hideTemporaryCopy(){}}]);return ImagePage}(a),l=function(){function PageCollection(t,r){_classCallCheck(this,PageCollection);this.pages=[];this.currentPageIndex=0;this.currentSpreadIndex=0;this.landscapeSpread=[];this.portraitSpread=[];this.render=r;this.app=t;this.currentPageIndex=0;this.isShowCover=this.app.getSettings().showCover}_createClass(PageCollection,[{key:"destroy",value:function destroy(){this.pages=[]}},{key:"createSpread",value:function createSpread(){this.landscapeSpread=[];this.portraitSpread=[];for(var t=0;t<this.pages.length;t++)this.portraitSpread.push([t]);var r=0;if(this.isShowCover){this.pages[0].setDensity("hard");this.landscapeSpread.push([r]);r++}for(var i=r;i<this.pages.length;i+=2)if(i<this.pages.length-1)this.landscapeSpread.push([i,i+1]);else{this.landscapeSpread.push([i]);this.pages[i].setDensity("hard")}}},{key:"getSpread",value:function getSpread(){return"landscape"===this.render.getOrientation()?this.landscapeSpread:this.portraitSpread}},{key:"getSpreadIndexByPage",value:function getSpreadIndexByPage(t){for(var r=this.getSpread(),i=0;i<r.length;i++)if(t===r[i][0]||t===r[i][1])return i;return null}},{key:"getPageCount",value:function getPageCount(){return this.pages.length}},{key:"getPages",value:function getPages(){return this.pages}},{key:"getPage",value:function getPage(t){if(t>=0&&t<this.pages.length)return this.pages[t];throw new Error("Invalid page number")}},{key:"nextBy",value:function nextBy(t){var r=this.pages.indexOf(t);return r<this.pages.length-1?this.pages[r+1]:null}},{key:"prevBy",value:function prevBy(t){var r=this.pages.indexOf(t);return r>0?this.pages[r-1]:null}},{key:"getFlippingPage",value:function getFlippingPage(t){var r=this.currentSpreadIndex;if("portrait"===this.render.getOrientation())return 0===t?this.pages[r].newTemporaryCopy():this.pages[r-1];var i=0===t?this.getSpread()[r+1]:this.getSpread()[r-1];return 1===i.length||0===t?this.pages[i[0]]:this.pages[i[1]]}},{key:"getBottomPage",value:function getBottomPage(t){var r=this.currentSpreadIndex;if("portrait"===this.render.getOrientation())return 0===t?this.pages[r+1]:this.pages[r-1];var i=0===t?this.getSpread()[r+1]:this.getSpread()[r-1];return 1===i.length?this.pages[i[0]]:0===t?this.pages[i[1]]:this.pages[i[0]]}},{key:"showNext",value:function showNext(){if(this.currentSpreadIndex<this.getSpread().length){this.currentSpreadIndex++;this.showSpread()}}},{key:"showPrev",value:function showPrev(){if(this.currentSpreadIndex>0){this.currentSpreadIndex--;this.showSpread()}}},{key:"getCurrentPageIndex",value:function getCurrentPageIndex(){return this.currentPageIndex}},{key:"show",value:function show(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===t&&(t=this.currentPageIndex);if(!(t<0||t>=this.pages.length)){var r=this.getSpreadIndexByPage(t);if(null!==r){this.currentSpreadIndex=r;this.showSpread()}}}},{key:"getCurrentSpreadIndex",value:function getCurrentSpreadIndex(){return this.currentSpreadIndex}},{key:"setCurrentSpreadIndex",value:function setCurrentSpreadIndex(t){if(!(t>=0&&t<this.getSpread().length))throw new Error("Invalid page");this.currentSpreadIndex=t}},{key:"showSpread",value:function showSpread(){var t=this.getSpread()[this.currentSpreadIndex];if(2===t.length){this.render.setLeftPage(this.pages[t[0]]);this.render.setRightPage(this.pages[t[1]])}else if("landscape"===this.render.getOrientation())if(t[0]===this.pages.length-1){this.render.setLeftPage(this.pages[t[0]]);this.render.setRightPage(null)}else{this.render.setLeftPage(null);this.render.setRightPage(this.pages[t[0]])}else{this.render.setLeftPage(null);this.render.setRightPage(this.pages[t[0]])}this.currentPageIndex=t[0];this.app.updatePageIndex(this.currentPageIndex)}}]);return PageCollection}(),u=function(t){_inherits(ImagePageCollection,t);var r=_createSuper(ImagePageCollection);function ImagePageCollection(t,i,a){var o;_classCallCheck(this,ImagePageCollection);(o=r.call(this,t,i)).imagesHref=a;return o}_createClass(ImagePageCollection,[{key:"load",value:function load(){var t,r=_createForOfIteratorHelper(this.imagesHref);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=new o(this.render,i,"soft");a.load();this.pages.push(a)}}catch(t){r.e(t)}finally{r.f()}this.createSpread()}}]);return ImagePageCollection}(l),c=function(){function Helper(){_classCallCheck(this,Helper)}_createClass(Helper,null,[{key:"GetDistanceBetweenTwoPoint",value:function GetDistanceBetweenTwoPoint(t,r){return null===t||null===r?1/0:Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}},{key:"GetSegmentLength",value:function GetSegmentLength(t){return Helper.GetDistanceBetweenTwoPoint(t[0],t[1])}},{key:"GetAngleBetweenTwoLine",value:function GetAngleBetweenTwoLine(t,r){var i=t[0].y-t[1].y,a=r[0].y-r[1].y,o=t[1].x-t[0].x,l=r[1].x-r[0].x;return Math.acos((i*a+o*l)/(Math.sqrt(i*i+o*o)*Math.sqrt(a*a+l*l)))}},{key:"PointInRect",value:function PointInRect(t,r){return null===r?null:r.x>=t.left&&r.x<=t.width+t.left&&r.y>=t.top&&r.y<=t.top+t.height?r:null}},{key:"GetRotatedPoint",value:function GetRotatedPoint(t,r,i){return{x:t.x*Math.cos(i)+t.y*Math.sin(i)+r.x,y:t.y*Math.cos(i)-t.x*Math.sin(i)+r.y}}},{key:"LimitPointToCircle",value:function LimitPointToCircle(t,r,i){if(Helper.GetDistanceBetweenTwoPoint(t,i)<=r)return i;var a=t.x,o=t.y,l=i.x,u=i.y,c=Math.sqrt(Math.pow(r,2)*Math.pow(a-l,2)/(Math.pow(a-l,2)+Math.pow(o-u,2)))+a;i.x<0&&(c*=-1);var h=(c-a)*(o-u)/(a-l)+o;a-l+o===0&&(h=r);return{x:c,y:h}}},{key:"GetIntersectBetweenTwoSegment",value:function GetIntersectBetweenTwoSegment(t,r,i){return Helper.PointInRect(t,Helper.GetIntersectBeetwenTwoLine(r,i))}},{key:"GetIntersectBeetwenTwoLine",value:function GetIntersectBeetwenTwoLine(t,r){var i=t[0].y-t[1].y,a=r[0].y-r[1].y,o=t[1].x-t[0].x,l=r[1].x-r[0].x,u=t[0].x*t[1].y-t[1].x*t[0].y,c=r[0].x*r[1].y-r[1].x*r[0].y,h=i*c-a*u,d=o*c-l*u,p=-(u*l-c*o)/(i*l-a*o),v=-(i*c-a*u)/(i*l-a*o);if(isFinite(p)&&isFinite(v))return{x:p,y:v};if(Math.abs(h-d)<.1)throw new Error("Segment included");return null}},{key:"GetCordsFromTwoPoint",value:function GetCordsFromTwoPoint(t,r){var i=Math.abs(t.x-r.x),a=Math.abs(t.y-r.y),o=Math.max(i,a),l=[t];function getCord(t,r,i,a,o){return r>t?t+o*(i/a):r<t?t-o*(i/a):t}for(var u=1;u<=o;u+=1)l.push({x:getCord(t.x,r.x,i,o,u),y:getCord(t.y,r.y,a,o,u)});return l}}]);return Helper}(),h=function(t){_inherits(HTMLPage,t);var r=_createSuper(HTMLPage);function HTMLPage(t,i,a){var o;_classCallCheck(this,HTMLPage);(o=r.call(this,t,a)).copiedElement=null;o.temporaryCopy=null;o.isLoad=!1;o.element=i;o.element.classList.add("stf__item");o.element.classList.add("--"+a);return o}_createClass(HTMLPage,[{key:"newTemporaryCopy",value:function newTemporaryCopy(){if("hard"===this.nowDrawingDensity)return this;if(null===this.temporaryCopy){this.copiedElement=this.element.cloneNode(!0);this.element.parentElement.appendChild(this.copiedElement);this.temporaryCopy=new HTMLPage(this.render,this.copiedElement,this.nowDrawingDensity)}return this.getTemporaryCopy()}},{key:"getTemporaryCopy",value:function getTemporaryCopy(){return this.temporaryCopy}},{key:"hideTemporaryCopy",value:function hideTemporaryCopy(){if(null!==this.temporaryCopy){this.copiedElement.remove();this.copiedElement=null;this.temporaryCopy=null}}},{key:"draw",value:function draw(t){var r=t||this.nowDrawingDensity,i=this.render.convertToGlobal(this.state.position),a=this.render.getRect().pageWidth,o=this.render.getRect().height;this.element.classList.remove("--simple");var l="\n            position: absolute;\n            display: block;\n            z-index: ".concat(this.element.style.zIndex,";\n            left: 0;\n            top: 0;\n            width: ").concat(a,"px;\n            height: ").concat(o,"px;\n        ");"hard"===r?this.drawHard(l):this.drawSoft(i,l)}},{key:"drawHard",value:function drawHard(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=this.render.getRect().left+this.render.getRect().width/2,i=this.state.hardDrawingAngle,a=t+"\n                backface-visibility: hidden;\n                -webkit-backface-visibility: hidden;\n                clip-path: none;\n                -webkit-clip-path: none;\n            "+(0===this.orientation?"transform-origin: ".concat(this.render.getRect().pageWidth,"px 0;\n                   transform: translate3d(0, 0, 0) rotateY(").concat(i,"deg);"):"transform-origin: 0 0;\n                   transform: translate3d(".concat(r,"px, 0, 0) rotateY(").concat(i,"deg);"));this.element.style.cssText=a}},{key:"drawSoft",value:function drawSoft(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a="polygon( ",o=_createForOfIteratorHelper(this.state.area);try{for(o.s();!(r=o.n()).done;){var l=r.value;if(null!==l){var u=1===this.render.getDirection()?{x:-l.x+this.state.position.x,y:l.y-this.state.position.y}:{x:l.x-this.state.position.x,y:l.y-this.state.position.y};a+=(u=c.GetRotatedPoint(u,{x:0,y:0},this.state.angle)).x+"px "+u.y+"px, "}}}catch(t){o.e(t)}finally{o.f()}a=a.slice(0,-2);var h=i+"transform-origin: 0 0; clip-path: ".concat(a+=")","; -webkit-clip-path: ").concat(a,";")+(this.render.isSafari()&&0===this.state.angle?"transform: translate(".concat(t.x,"px, ").concat(t.y,"px);"):"transform: translate3d(".concat(t.x,"px, ").concat(t.y,"px, 0) rotate(").concat(this.state.angle,"rad);"));this.element.style.cssText=h}},{key:"simpleDraw",value:function simpleDraw(t){var r=this.render.getRect(),i=r.pageWidth,a=r.height,o=1===t?r.left+r.pageWidth:r.left,l=r.top;this.element.classList.add("--simple");this.element.style.cssText="\n            position: absolute;\n            display: block;\n            height: ".concat(a,"px;\n            left: ").concat(o,"px;\n            top: ").concat(l,"px;\n            width: ").concat(i,"px;\n            z-index: ").concat(this.render.getSettings().startZIndex+1,";")}},{key:"getElement",value:function getElement(){return this.element}},{key:"load",value:function load(){this.isLoad=!0}},{key:"setOrientation",value:function setOrientation(t){_get(_getPrototypeOf(HTMLPage.prototype),"setOrientation",this).call(this,t);this.element.classList.remove("--left","--right");this.element.classList.add(1===t?"--right":"--left")}},{key:"setDrawingDensity",value:function setDrawingDensity(t){this.element.classList.remove("--soft","--hard");this.element.classList.add("--"+t);_get(_getPrototypeOf(HTMLPage.prototype),"setDrawingDensity",this).call(this,t)}}]);return HTMLPage}(a),d=function(t){_inherits(HTMLPageCollection,t);var r=_createSuper(HTMLPageCollection);function HTMLPageCollection(t,i,a,o){var l;_classCallCheck(this,HTMLPageCollection);(l=r.call(this,t,i)).element=a;l.pagesElement=o;return l}_createClass(HTMLPageCollection,[{key:"load",value:function load(){var t,r=_createForOfIteratorHelper(this.pagesElement);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=new h(this.render,i,"hard"===i.dataset.density?"hard":"soft");a.load();this.pages.push(a)}}catch(t){r.e(t)}finally{r.f()}this.createSpread()}}]);return HTMLPageCollection}(l),p=function(){function FlipCalculation(t,r,i,a){_classCallCheck(this,FlipCalculation);this.direction=t;this.corner=r;this.topIntersectPoint=null;this.sideIntersectPoint=null;this.bottomIntersectPoint=null;this.pageWidth=parseInt(i,10);this.pageHeight=parseInt(a,10)}_createClass(FlipCalculation,[{key:"calc",value:function calc(t){try{this.position=this.calcAngleAndPosition(t);this.calculateIntersectPoint(this.position);return!0}catch(t){return!1}}},{key:"getFlippingClipArea",value:function getFlippingClipArea(){var t=[],r=!1;t.push(this.rect.topLeft);t.push(this.topIntersectPoint);if(null===this.sideIntersectPoint)r=!0;else{t.push(this.sideIntersectPoint);null===this.bottomIntersectPoint&&(r=!1)}t.push(this.bottomIntersectPoint);(r||"bottom"===this.corner)&&t.push(this.rect.bottomLeft);return t}},{key:"getBottomClipArea",value:function getBottomClipArea(){var t=[];t.push(this.topIntersectPoint);if("top"===this.corner)t.push({x:this.pageWidth,y:0});else{null!==this.topIntersectPoint&&t.push({x:this.pageWidth,y:0});t.push({x:this.pageWidth,y:this.pageHeight})}null!==this.sideIntersectPoint?c.GetDistanceBetweenTwoPoint(this.sideIntersectPoint,this.topIntersectPoint)>=10&&t.push(this.sideIntersectPoint):"top"===this.corner&&t.push({x:this.pageWidth,y:this.pageHeight});t.push(this.bottomIntersectPoint);t.push(this.topIntersectPoint);return t}},{key:"getAngle",value:function getAngle(){return 0===this.direction?-this.angle:this.angle}},{key:"getRect",value:function getRect(){return this.rect}},{key:"getPosition",value:function getPosition(){return this.position}},{key:"getActiveCorner",value:function getActiveCorner(){return 0===this.direction?this.rect.topLeft:this.rect.topRight}},{key:"getDirection",value:function getDirection(){return this.direction}},{key:"getFlippingProgress",value:function getFlippingProgress(){return Math.abs((this.position.x-this.pageWidth)/(2*this.pageWidth)*100)}},{key:"getCorner",value:function getCorner(){return this.corner}},{key:"getBottomPagePosition",value:function getBottomPagePosition(){return 1===this.direction?{x:this.pageWidth,y:0}:{x:0,y:0}}},{key:"getShadowStartPoint",value:function getShadowStartPoint(){return"top"===this.corner?this.topIntersectPoint:null!==this.sideIntersectPoint?this.sideIntersectPoint:this.topIntersectPoint}},{key:"getShadowAngle",value:function getShadowAngle(){var t=c.GetAngleBetweenTwoLine(this.getSegmentToShadowLine(),[{x:0,y:0},{x:this.pageWidth,y:0}]);return 0===this.direction?t:Math.PI-t}},{key:"calcAngleAndPosition",value:function calcAngleAndPosition(t){var r=t;this.updateAngleAndGeometry(r);r="top"===this.corner?this.checkPositionAtCenterLine(r,{x:0,y:0},{x:0,y:this.pageHeight}):this.checkPositionAtCenterLine(r,{x:0,y:this.pageHeight},{x:0,y:0});if(Math.abs(r.x-this.pageWidth)<1&&Math.abs(r.y)<1)throw new Error("Point is too small");return r}},{key:"updateAngleAndGeometry",value:function updateAngleAndGeometry(t){this.angle=this.calculateAngle(t);this.rect=this.getPageRect(t)}},{key:"calculateAngle",value:function calculateAngle(t){var r=this.pageWidth-t.x+1,i="bottom"===this.corner?this.pageHeight-t.y:t.y,a=2*Math.acos(r/Math.sqrt(i*i+r*r));i<0&&(a=-a);var o=Math.PI-a;if(!isFinite(a)||o>=0&&o<.003)throw new Error("The G point is too small");"bottom"===this.corner&&(a=-a);return a}},{key:"getPageRect",value:function getPageRect(t){return"top"===this.corner?this.getRectFromBasePoint([{x:0,y:0},{x:this.pageWidth,y:0},{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}],t):this.getRectFromBasePoint([{x:0,y:-this.pageHeight},{x:this.pageWidth,y:-this.pageHeight},{x:0,y:0},{x:this.pageWidth,y:0}],t)}},{key:"getRectFromBasePoint",value:function getRectFromBasePoint(t,r){return{topLeft:this.getRotatedPoint(t[0],r),topRight:this.getRotatedPoint(t[1],r),bottomLeft:this.getRotatedPoint(t[2],r),bottomRight:this.getRotatedPoint(t[3],r)}}},{key:"getRotatedPoint",value:function getRotatedPoint(t,r){return{x:t.x*Math.cos(this.angle)+t.y*Math.sin(this.angle)+r.x,y:t.y*Math.cos(this.angle)-t.x*Math.sin(this.angle)+r.y}}},{key:"calculateIntersectPoint",value:function calculateIntersectPoint(t){var r={left:-1,top:-1,width:this.pageWidth+2,height:this.pageHeight+2};if("top"===this.corner){this.topIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[t,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]);this.sideIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[t,this.rect.bottomLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]);this.bottomIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])}else{this.topIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[this.rect.topLeft,this.rect.topRight],[{x:0,y:0},{x:this.pageWidth,y:0}]);this.sideIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[t,this.rect.topLeft],[{x:this.pageWidth,y:0},{x:this.pageWidth,y:this.pageHeight}]);this.bottomIntersectPoint=c.GetIntersectBetweenTwoSegment(r,[this.rect.bottomLeft,this.rect.bottomRight],[{x:0,y:this.pageHeight},{x:this.pageWidth,y:this.pageHeight}])}}},{key:"checkPositionAtCenterLine",value:function checkPositionAtCenterLine(t,r,i){var a=t,o=c.LimitPointToCircle(r,this.pageWidth,a);if(a!==o){a=o;this.updateAngleAndGeometry(a)}var l=Math.sqrt(Math.pow(this.pageWidth,2)+Math.pow(this.pageHeight,2)),u=this.rect.bottomRight,h=this.rect.topLeft;if("bottom"===this.corner){u=this.rect.topRight;h=this.rect.bottomLeft}if(u.x<=0){var d=c.LimitPointToCircle(i,l,h);if(d!==a){a=d;this.updateAngleAndGeometry(a)}}return a}},{key:"getSegmentToShadowLine",value:function getSegmentToShadowLine(){var t=this.getShadowStartPoint();return[t,t!==this.sideIntersectPoint&&null!==this.sideIntersectPoint?this.sideIntersectPoint:this.bottomIntersectPoint]}}]);return FlipCalculation}(),v=function(){function Flip(t,r){_classCallCheck(this,Flip);this.flippingPage=null;this.bottomPage=null;this.calc=null;this.state="read";this.render=t;this.app=r}_createClass(Flip,[{key:"fold",value:function fold(t){this.setState("user_fold");null===this.calc&&this.start(t);this.do(this.render.convertToPage(t))}},{key:"flip",value:function flip(t){if(!this.app.getSettings().disableFlipByClick||this.isPointOnCorners(t)){null!==this.calc&&this.render.finishAnimation();if(this.start(t)){var r=this.getBoundsRect();this.setState("flipping");var i=r.height/10,a="bottom"===this.calc.getCorner()?r.height-i:i,o="bottom"===this.calc.getCorner()?r.height:0;this.calc.calc({x:r.pageWidth-i,y:a});this.animateFlippingTo({x:r.pageWidth-i,y:a},{x:-r.pageWidth,y:o},!0)}}}},{key:"start",value:function start(t){this.reset();var r=this.render.convertToBook(t),i=this.getBoundsRect(),a=this.getDirectionByPoint(r),o=r.y>=i.height/2?"bottom":"top";if(!this.checkDirection(a))return!1;try{this.flippingPage=this.app.getPageCollection().getFlippingPage(a);this.bottomPage=this.app.getPageCollection().getBottomPage(a);if("landscape"===this.render.getOrientation())if(1===a){var l=this.app.getPageCollection().nextBy(this.flippingPage);if(null!==l&&this.flippingPage.getDensity()!==l.getDensity()){this.flippingPage.setDrawingDensity("hard");l.setDrawingDensity("hard")}}else{var u=this.app.getPageCollection().prevBy(this.flippingPage);if(null!==u&&this.flippingPage.getDensity()!==u.getDensity()){this.flippingPage.setDrawingDensity("hard");u.setDrawingDensity("hard")}}this.render.setDirection(a);this.calc=new p(a,o,i.pageWidth.toString(10),i.height.toString(10));return!0}catch(t){return!1}}},{key:"do",value:function _do(t){if(null!==this.calc&&this.calc.calc(t)){var r=this.calc.getFlippingProgress();this.bottomPage.setArea(this.calc.getBottomClipArea());this.bottomPage.setPosition(this.calc.getBottomPagePosition());this.bottomPage.setAngle(0);this.bottomPage.setHardAngle(0);this.flippingPage.setArea(this.calc.getFlippingClipArea());this.flippingPage.setPosition(this.calc.getActiveCorner());this.flippingPage.setAngle(this.calc.getAngle());0===this.calc.getDirection()?this.flippingPage.setHardAngle(90*(200-2*r)/100):this.flippingPage.setHardAngle(-90*(200-2*r)/100);this.render.setPageRect(this.calc.getRect());this.render.setBottomPage(this.bottomPage);this.render.setFlippingPage(this.flippingPage);this.render.setShadowData(this.calc.getShadowStartPoint(),this.calc.getShadowAngle(),r,this.calc.getDirection())}}},{key:"flipToPage",value:function flipToPage(t,r){var i=this.app.getPageCollection().getCurrentSpreadIndex(),a=this.app.getPageCollection().getSpreadIndexByPage(t);try{if(a>i){this.app.getPageCollection().setCurrentSpreadIndex(a-1);this.flipNext(r)}if(a<i){this.app.getPageCollection().setCurrentSpreadIndex(a+1);this.flipPrev(r)}}catch(t){}}},{key:"flipNext",value:function flipNext(t){this.flip({x:this.render.getRect().left+2*this.render.getRect().pageWidth-10,y:"top"===t?1:this.render.getRect().height-2})}},{key:"flipPrev",value:function flipPrev(t){this.flip({x:10,y:"top"===t?1:this.render.getRect().height-2})}},{key:"stopMove",value:function stopMove(){if(null!==this.calc){var t=this.calc.getPosition(),r=this.getBoundsRect(),i="bottom"===this.calc.getCorner()?r.height:0;t.x<=0?this.animateFlippingTo(t,{x:-r.pageWidth,y:i},!0):this.animateFlippingTo(t,{x:r.pageWidth,y:i},!1)}}},{key:"showCorner",value:function showCorner(t){if(this.checkState("read","fold_corner")){var r=this.getBoundsRect(),i=r.pageWidth;if(this.isPointOnCorners(t))if(null===this.calc){if(!this.start(t))return;this.setState("fold_corner");this.calc.calc({x:i-1,y:1});var a="bottom"===this.calc.getCorner()?r.height-1:1,o="bottom"===this.calc.getCorner()?r.height-50:50;this.animateFlippingTo({x:i-1,y:a},{x:i-50,y:o},!1,!1)}else this.do(this.render.convertToPage(t));else{this.setState("read");this.render.finishAnimation();this.stopMove()}}}},{key:"animateFlippingTo",value:function animateFlippingTo(t,r,i){var a,o=this,l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],u=c.GetCordsFromTwoPoint(t,r),h=[],d=_createForOfIteratorHelper(u);try{var p=function _loop(){var t=a.value;h.push((function(){return o.do(t)}))};for(d.s();!(a=d.n()).done;)p()}catch(t){d.e(t)}finally{d.f()}var v=this.getAnimationDuration(u.length);this.render.startAnimation(h,v,(function(){if(o.calc){i&&(1===o.calc.getDirection()?o.app.turnToPrevPage():o.app.turnToNextPage());if(l){o.render.setBottomPage(null);o.render.setFlippingPage(null);o.render.clearShadow();o.setState("read");o.reset()}}}))}},{key:"getCalculation",value:function getCalculation(){return this.calc}},{key:"getState",value:function getState(){return this.state}},{key:"setState",value:function setState(t){if(this.state!==t){this.app.updateState(t);this.state=t}}},{key:"getDirectionByPoint",value:function getDirectionByPoint(t){var r=this.getBoundsRect();if("portrait"===this.render.getOrientation()){if(t.x-r.pageWidth<=r.width/5)return 1}else if(t.x<r.width/2)return 1;return 0}},{key:"getAnimationDuration",value:function getAnimationDuration(t){var r=this.app.getSettings().flippingTime;return t>=1e3?r:t/1e3*r}},{key:"checkDirection",value:function checkDirection(t){return 0===t?this.app.getCurrentPageIndex()<this.app.getPageCount()-1:this.app.getCurrentPageIndex()>=1}},{key:"reset",value:function reset(){this.calc=null;this.flippingPage=null;this.bottomPage=null}},{key:"getBoundsRect",value:function getBoundsRect(){return this.render.getRect()}},{key:"checkState",value:function checkState(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];for(var a=0,o=r;a<o.length;a++){var l=o[a];if(this.state===l)return!0}return!1}},{key:"isPointOnCorners",value:function isPointOnCorners(t){var r=this.getBoundsRect(),i=r.pageWidth,a=Math.sqrt(Math.pow(i,2)+Math.pow(r.height,2))/5,o=this.render.convertToBook(t);return o.x>0&&o.y>0&&o.x<r.width&&o.y<r.height&&(o.x<a||o.x>r.width-a)&&(o.y<a||o.y>r.height-a)}}]);return Flip}(),y=function(){function Render(t,r){_classCallCheck(this,Render);this.leftPage=null;this.rightPage=null;this.flippingPage=null;this.bottomPage=null;this.direction=null;this.orientation=null;this.shadow=null;this.animation=null;this.pageRect=null;this.boundsRect=null;this.timer=0;this.safari=!1;this.setting=r;this.app=t;var i=new RegExp("Version\\/[\\d\\.]+.*Safari/");this.safari=null!==i.exec(window.navigator.userAgent)}_createClass(Render,[{key:"render",value:function render(t){if(null!==this.animation){var r=Math.round((t-this.animation.startedAt)/this.animation.durationFrame);if(r<this.animation.frames.length)this.animation.frames[r]();else{this.animation.onAnimateEnd();this.animation=null}}this.timer=t;this.drawFrame()}},{key:"start",value:function start(){var t=this;this.update();var r=function loop(r){window.ngxZone.runOutsideAngular((function(){t.render(r);requestAnimationFrame(loop)}))};window.ngxZone.runOutsideAngular((function(){requestAnimationFrame(r)}))}},{key:"startAnimation",value:function startAnimation(t,r,i){this.finishAnimation();this.animation={frames:t,duration:r,durationFrame:r/t.length,onAnimateEnd:i,startedAt:this.timer}}},{key:"finishAnimation",value:function finishAnimation(){if(null!==this.animation){this.animation.frames[this.animation.frames.length-1]();null!==this.animation.onAnimateEnd&&this.animation.onAnimateEnd()}this.animation=null}},{key:"update",value:function update(){this.boundsRect=null;var t=this.calculateBoundsRect();if(this.orientation!==t){this.orientation=t;this.app.updateOrientation(t)}}},{key:"calculateBoundsRect",value:function calculateBoundsRect(){var t="landscape",r=this.getBlockWidth(),i=r/2,a=this.getBlockHeight()/2,o=this.setting.width/this.setting.height,l=this.setting.width,u=this.setting.height,c=i-l;if("stretch"===this.setting.size){r<2*this.setting.minWidth&&this.app.getSettings().usePortrait&&(t="portrait");(l="portrait"===t?this.getBlockWidth():this.getBlockWidth()/2)>this.setting.maxWidth&&(l=this.setting.maxWidth);(u=l/o)>this.getBlockHeight()&&(l=(u=this.getBlockHeight())*o);c="portrait"===t?i-l/2-l:i-l}else if(r<2*l&&this.app.getSettings().usePortrait){t="portrait";c=i-l/2-l}this.boundsRect={left:c,top:a-u/2,width:2*l,height:u,pageWidth:l};return t}},{key:"setShadowData",value:function setShadowData(t,r,i,a){if(this.app.getSettings().drawShadow){var o=100*this.getSettings().maxShadowOpacity;this.shadow={pos:t,angle:r,width:3*this.getRect().pageWidth/4*i/100,opacity:(100-i)*o/100/100,direction:a,progress:2*i}}}},{key:"clearShadow",value:function clearShadow(){this.shadow=null}},{key:"getBlockWidth",value:function getBlockWidth(){return this.app.getUI().getDistElement().offsetWidth}},{key:"getBlockHeight",value:function getBlockHeight(){return this.app.getUI().getDistElement().offsetHeight}},{key:"getDirection",value:function getDirection(){return this.direction}},{key:"getRect",value:function getRect(){null===this.boundsRect&&this.calculateBoundsRect();return this.boundsRect}},{key:"getSettings",value:function getSettings(){return this.app.getSettings()}},{key:"getOrientation",value:function getOrientation(){return this.orientation}},{key:"setPageRect",value:function setPageRect(t){this.pageRect=t}},{key:"setDirection",value:function setDirection(t){this.direction=t}},{key:"setRightPage",value:function setRightPage(t){null!==t&&t.setOrientation(1);this.rightPage=t}},{key:"setLeftPage",value:function setLeftPage(t){null!==t&&t.setOrientation(0);this.leftPage=t}},{key:"setBottomPage",value:function setBottomPage(t){null!==t&&t.setOrientation(1===this.direction?0:1);this.bottomPage=t}},{key:"setFlippingPage",value:function setFlippingPage(t){null!==t&&t.setOrientation(0===this.direction&&"portrait"!==this.orientation?0:1);this.flippingPage=t}},{key:"convertToBook",value:function convertToBook(t){var r=this.getRect();return{x:t.x-r.left,y:t.y-r.top}}},{key:"isSafari",value:function isSafari(){return this.safari}},{key:"convertToPage",value:function convertToPage(t,r){r||(r=this.direction);var i=this.getRect();return{x:0===r?t.x-i.left-i.width/2:i.width/2-t.x+i.left,y:t.y-i.top}}},{key:"convertToGlobal",value:function convertToGlobal(t,r){r||(r=this.direction);if(null==t)return null;var i=this.getRect();return{x:0===r?t.x+i.left+i.width/2:i.width/2-t.x+i.left,y:t.y+i.top}}},{key:"convertRectToGlobal",value:function convertRectToGlobal(t,r){r||(r=this.direction);return{topLeft:this.convertToGlobal(t.topLeft,r),topRight:this.convertToGlobal(t.topRight,r),bottomLeft:this.convertToGlobal(t.bottomLeft,r),bottomRight:this.convertToGlobal(t.bottomRight,r)}}}]);return Render}(),g=function(t){_inherits(CanvasRender,t);var r=_createSuper(CanvasRender);function CanvasRender(t,i,a){var o;_classCallCheck(this,CanvasRender);(o=r.call(this,t,i)).canvas=a;var l=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0;canvas.getContext("2d",l);return o}_createClass(CanvasRender,[{key:"getContext",value:function getContext(){return this.ctx}},{key:"reload",value:function reload(){}},{key:"drawFrame",value:function drawFrame(){this.clear();"portrait"!==this.orientation&&null!=this.leftPage&&this.leftPage.simpleDraw(0);null!=this.rightPage&&this.rightPage.simpleDraw(1);null!=this.bottomPage&&this.bottomPage.draw();this.drawBookShadow();null!=this.flippingPage&&this.flippingPage.draw();if(null!=this.shadow){this.drawOuterShadow();this.drawInnerShadow()}var t=this.getRect();if("portrait"===this.orientation){this.ctx.beginPath();this.ctx.rect(t.left+t.pageWidth,t.top,t.width,t.height);this.ctx.clip()}}},{key:"drawBookShadow",value:function drawBookShadow(){var t=this.getRect();this.ctx.save();this.ctx.beginPath();var r=t.width/20;this.ctx.rect(t.left,t.top,t.width,t.height);var i={x:t.left+t.width/2-r/2,y:0};this.ctx.translate(i.x,i.y);var a=this.ctx.createLinearGradient(0,0,r,0);a.addColorStop(0,"rgba(0, 0, 0, 0)");a.addColorStop(.4,"rgba(0, 0, 0, 0.2)");a.addColorStop(.49,"rgba(0, 0, 0, 0.1)");a.addColorStop(.5,"rgba(0, 0, 0, 0.5)");a.addColorStop(.51,"rgba(0, 0, 0, 0.4)");a.addColorStop(1,"rgba(0, 0, 0, 0)");this.ctx.clip();this.ctx.fillStyle=a;this.ctx.fillRect(0,0,r,2*t.height);this.ctx.restore()}},{key:"drawOuterShadow",value:function drawOuterShadow(){var t=this.getRect();this.ctx.save();this.ctx.beginPath();this.ctx.rect(t.left,t.top,t.width,t.height);var r=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y});this.ctx.translate(r.x,r.y);this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);var i=this.ctx.createLinearGradient(0,0,this.shadow.width,0);if(0===this.shadow.direction){this.ctx.translate(0,-100);i.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")");i.addColorStop(1,"rgba(0, 0, 0, 0)")}else{this.ctx.translate(-this.shadow.width,-100);i.addColorStop(0,"rgba(0, 0, 0, 0)");i.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")")}this.ctx.clip();this.ctx.fillStyle=i;this.ctx.fillRect(0,0,this.shadow.width,2*t.height);this.ctx.restore()}},{key:"drawInnerShadow",value:function drawInnerShadow(){var t=this.getRect();this.ctx.save();this.ctx.beginPath();var r=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.convertRectToGlobal(this.pageRect);this.ctx.moveTo(i.topLeft.x,i.topLeft.y);this.ctx.lineTo(i.topRight.x,i.topRight.y);this.ctx.lineTo(i.bottomRight.x,i.bottomRight.y);this.ctx.lineTo(i.bottomLeft.x,i.bottomLeft.y);this.ctx.translate(r.x,r.y);this.ctx.rotate(Math.PI+this.shadow.angle+Math.PI/2);var a=3*this.shadow.width/4,o=this.ctx.createLinearGradient(0,0,a,0);if(0===this.shadow.direction){this.ctx.translate(-a,-100);o.addColorStop(1,"rgba(0, 0, 0, "+this.shadow.opacity+")");o.addColorStop(.9,"rgba(0, 0, 0, 0.05)");o.addColorStop(.7,"rgba(0, 0, 0, "+this.shadow.opacity+")");o.addColorStop(0,"rgba(0, 0, 0, 0)")}else{this.ctx.translate(0,-100);o.addColorStop(0,"rgba(0, 0, 0, "+this.shadow.opacity+")");o.addColorStop(.1,"rgba(0, 0, 0, 0.05)");o.addColorStop(.3,"rgba(0, 0, 0, "+this.shadow.opacity+")");o.addColorStop(1,"rgba(0, 0, 0, 0)")}this.ctx.clip();this.ctx.fillStyle=o;this.ctx.fillRect(0,0,a,2*t.height);this.ctx.restore()}},{key:"clear",value:function clear(){this.ctx.fillStyle="white";this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}}]);return CanvasRender}(y),m=function(){function UI(t,r,i){var a=this;_classCallCheck(this,UI);this.touchPoint=null;this.swipeTimeout=250;this.onResize=function(){a.update()};this.onMouseDown=function(t){if(a.checkTarget(t.target)){var r=a.getMousePos(t.clientX,t.clientY);a.app.startUserTouch(r);t.preventDefault()}};this.onTouchStart=function(t){if(a.checkTarget(t.target)&&t.changedTouches.length>0){var r=t.changedTouches[0],i=a.getMousePos(r.clientX,r.clientY);a.touchPoint={point:i,time:Date.now()};setTimeout((function(){null!==a.touchPoint&&a.app.startUserTouch(i)}),a.swipeTimeout);a.app.getSettings().mobileScrollSupport||t.preventDefault()}};this.onMouseUp=function(t){var r=a.getMousePos(t.clientX,t.clientY);a.app.userStop(r)};this.onMouseMove=function(t){var r=a.getMousePos(t.clientX,t.clientY);a.app.userMove(r,!1)};this.onTouchMove=function(t){if(t.changedTouches.length>0){var r=t.changedTouches[0],i=a.getMousePos(r.clientX,r.clientY);if(a.app.getSettings().mobileScrollSupport){null!==a.touchPoint&&(Math.abs(a.touchPoint.point.x-i.x)>10||"read"!==a.app.getState())&&t.cancelable&&a.app.userMove(i,!0);"read"!==a.app.getState()&&t.preventDefault()}else a.app.userMove(i,!0)}};this.onTouchEnd=function(t){if(t.changedTouches.length>0){var r=t.changedTouches[0],i=a.getMousePos(r.clientX,r.clientY),o=!1;if(null!==a.touchPoint){var l=i.x-a.touchPoint.point.x,u=Math.abs(i.y-a.touchPoint.point.y);if(Math.abs(l)>a.swipeDistance&&u<2*a.swipeDistance&&Date.now()-a.touchPoint.time<a.swipeTimeout){l>0?a.app.flipPrev(a.touchPoint.point.y<a.app.getRender().getRect().height/2?"top":"bottom"):a.app.flipNext(a.touchPoint.point.y<a.app.getRender().getRect().height/2?"top":"bottom");o=!0}a.touchPoint=null}a.app.userStop(i,o)}};this.parentElement=t;t.classList.add("stf__parent");t.insertAdjacentHTML("afterbegin",'<div class="stf__wrapper"></div>');this.wrapper=t.querySelector(".stf__wrapper");this.app=r;var o=this.app.getSettings().usePortrait?1:2;t.style.minWidth=i.minWidth*o+"px";t.style.minHeight=i.minHeight+"px";if("fixed"===i.size){t.style.minWidth=i.width*o+"px";t.style.minHeight=i.height+"px"}if(i.autoSize){t.style.width="100%";t.style.maxWidth=2*i.maxWidth+"px"}t.style.display="block";window.addEventListener("resize",this.onResize,!1);this.swipeDistance=i.swipeDistance}_createClass(UI,[{key:"destroy",value:function destroy(){this.app.getSettings().useMouseEvents&&this.removeHandlers();this.distElement.remove();this.wrapper.remove()}},{key:"getDistElement",value:function getDistElement(){return this.distElement}},{key:"getWrapper",value:function getWrapper(){return this.wrapper}},{key:"setOrientationStyle",value:function setOrientationStyle(t){this.wrapper.classList.remove("--portrait","--landscape");if("portrait"===t){this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/this.app.getSettings().width*100+"%");this.wrapper.classList.add("--portrait")}else{this.app.getSettings().autoSize&&(this.wrapper.style.paddingBottom=this.app.getSettings().height/(2*this.app.getSettings().width)*100+"%");this.wrapper.classList.add("--landscape")}this.update()}},{key:"removeHandlers",value:function removeHandlers(){window.removeEventListener("resize",this.onResize);this.distElement.removeEventListener("mousedown",this.onMouseDown);this.distElement.removeEventListener("touchstart",this.onTouchStart);window.removeEventListener("mousemove",this.onMouseMove);window.removeEventListener("touchmove",this.onTouchMove);window.removeEventListener("mouseup",this.onMouseUp);window.removeEventListener("touchend",this.onTouchEnd)}},{key:"setHandlers",value:function setHandlers(){window.addEventListener("resize",this.onResize,!1);if(this.app.getSettings().useMouseEvents){this.distElement.addEventListener("mousedown",this.onMouseDown);this.distElement.addEventListener("touchstart",this.onTouchStart);window.addEventListener("mousemove",this.onMouseMove);window.addEventListener("touchmove",this.onTouchMove,{passive:!this.app.getSettings().mobileScrollSupport});window.addEventListener("mouseup",this.onMouseUp);window.addEventListener("touchend",this.onTouchEnd)}}},{key:"getMousePos",value:function getMousePos(t,r){var i=this.distElement.getBoundingClientRect();return{x:t-i.left,y:r-i.top}}},{key:"checkTarget",value:function checkTarget(t){return!this.app.getSettings().clickEventForward||!["a","button"].includes(t.tagName.toLowerCase())}}]);return UI}(),b=function(t){_inherits(HTMLUI,t);var r=_createSuper(HTMLUI);function HTMLUI(t,i,a,o){var l;_classCallCheck(this,HTMLUI);(l=r.call(this,t,i,a)).wrapper.insertAdjacentHTML("afterbegin",'<div class="stf__block"></div>');l.distElement=t.querySelector(".stf__block");l.items=o;var u,c=_createForOfIteratorHelper(o);try{for(c.s();!(u=c.n()).done;){var h=u.value;l.distElement.appendChild(h)}}catch(t){c.e(t)}finally{c.f()}l.setHandlers();return l}_createClass(HTMLUI,[{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.items);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.parentElement.appendChild(i)}}catch(t){r.e(t)}finally{r.f()}}},{key:"updateItems",value:function updateItems(t){this.removeHandlers();this.distElement.innerHTML="";var r,i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;this.distElement.appendChild(a)}}catch(t){i.e(t)}finally{i.f()}this.items=t;this.setHandlers()}},{key:"update",value:function update(){this.app.getRender().update()}}]);return HTMLUI}(m),w=function(t){_inherits(CanvasUI,t);var r=_createSuper(CanvasUI);function CanvasUI(t,i,a){var o;_classCallCheck(this,CanvasUI);(o=r.call(this,t,i,a)).wrapper.innerHTML='<canvas class="stf__canvas"></canvas>';o.canvas=t.querySelectorAll("canvas")[0];o.distElement=o.canvas;o.resizeCanvas();o.setHandlers();return o}_createClass(CanvasUI,[{key:"resizeCanvas",value:function resizeCanvas(){var t=getComputedStyle(this.canvas),r=parseInt(t.getPropertyValue("width"),10),i=parseInt(t.getPropertyValue("height"),10);this.canvas.width=r;this.canvas.height=i}},{key:"getCanvas",value:function getCanvas(){return this.canvas}},{key:"update",value:function update(){this.resizeCanvas();this.app.getRender().update()}}]);return CanvasUI}(m),P=function(){function EventObject(){_classCallCheck(this,EventObject);this.events=new Map}_createClass(EventObject,[{key:"on",value:function on(t,r){this.events.has(t)?this.events.get(t).push(r):this.events.set(t,[r]);return this}},{key:"off",value:function off(t){this.events.delete(t)}},{key:"trigger",value:function trigger(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(this.events.has(t)){var a,o=_createForOfIteratorHelper(this.events.get(t));try{for(o.s();!(a=o.n()).done;){(0,a.value)({data:i,object:r})}}catch(t){o.e(t)}finally{o.f()}}}}]);return EventObject}(),A=function(t){_inherits(HTMLRender,t);var r=_createSuper(HTMLRender);function HTMLRender(t,i,a){var o;_classCallCheck(this,HTMLRender);(o=r.call(this,t,i)).outerShadow=null;o.innerShadow=null;o.hardShadow=null;o.hardInnerShadow=null;o.element=a;o.createShadows();return o}_createClass(HTMLRender,[{key:"createShadows",value:function createShadows(){this.element.insertAdjacentHTML("beforeend",'<div class="stf__outerShadow"></div>\n             <div class="stf__innerShadow"></div>\n             <div class="stf__hardShadow"></div>\n             <div class="stf__hardInnerShadow"></div>');this.outerShadow=this.element.querySelector(".stf__outerShadow");this.innerShadow=this.element.querySelector(".stf__innerShadow");this.hardShadow=this.element.querySelector(".stf__hardShadow");this.hardInnerShadow=this.element.querySelector(".stf__hardInnerShadow")}},{key:"clearShadow",value:function clearShadow(){_get(_getPrototypeOf(HTMLRender.prototype),"clearShadow",this).call(this);this.outerShadow.style.cssText="display: none";this.innerShadow.style.cssText="display: none";this.hardShadow.style.cssText="display: none";this.hardInnerShadow.style.cssText="display: none"}},{key:"reload",value:function reload(){this.element.querySelector(".stf__outerShadow")||this.createShadows()}},{key:"drawHardInnerShadow",value:function drawHardInnerShadow(){var t=this.getRect(),r=this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress,i=(100-r)*(2.5*t.pageWidth)/100+20;i>t.pageWidth&&(i=t.pageWidth);var a="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+5).toString(10),";\n            width: ").concat(i,"px;\n            height: ").concat(t.height,"px;\n            background: linear-gradient(to right,\n                rgba(0, 0, 0, ").concat(this.shadow.opacity*r/100,") 5%,\n                rgba(0, 0, 0, 0) 100%);\n            left: ").concat(t.left+t.width/2,"px;\n            transform-origin: 0 0;\n        ");a+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0);":"transform: translate3d(0, 0, 0) rotateY(180deg);";this.hardInnerShadow.style.cssText=a}},{key:"drawHardOuterShadow",value:function drawHardOuterShadow(){var t=this.getRect(),r=(100-(this.shadow.progress>100?200-this.shadow.progress:this.shadow.progress))*(2.5*t.pageWidth)/100+20;r>t.pageWidth&&(r=t.pageWidth);var i="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+4).toString(10),";\n            width: ").concat(r,"px;\n            height: ").concat(t.height,"px;\n            background: linear-gradient(to left, rgba(0, 0, 0, ").concat(this.shadow.opacity,") 5%, rgba(0, 0, 0, 0) 100%);\n            left: ").concat(t.left+t.width/2,"px;\n            transform-origin: 0 0;\n        ");i+=0===this.getDirection()&&this.shadow.progress>100||1===this.getDirection()&&this.shadow.progress<=100?"transform: translate3d(0, 0, 0) rotateY(180deg);":"transform: translate3d(0, 0, 0);";this.hardShadow.style.cssText=i}},{key:"drawInnerShadow",value:function drawInnerShadow(){for(var t=this.getRect(),r=3*this.shadow.width/4,i=0===this.getDirection()?r:0,a=0===this.getDirection()?"to left":"to right",o=this.convertToGlobal(this.shadow.pos),l=this.shadow.angle+3*Math.PI/2,u="polygon( ",h=0,d=[this.pageRect.topLeft,this.pageRect.topRight,this.pageRect.bottomRight,this.pageRect.bottomLeft];h<d.length;h++){var p=d[h],v=1===this.getDirection()?{x:-p.x+this.shadow.pos.x,y:p.y-this.shadow.pos.y}:{x:p.x-this.shadow.pos.x,y:p.y-this.shadow.pos.y};u+=(v=c.GetRotatedPoint(v,{x:i,y:100},l)).x+"px "+v.y+"px, "}u=u.slice(0,-2);u+=")";var y="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+10).toString(10),";\n            width: ").concat(r,"px;\n            height: ").concat(2*t.height,"px;\n            background: linear-gradient(").concat(a,",\n                rgba(0, 0, 0, ").concat(this.shadow.opacity,") 5%,\n                rgba(0, 0, 0, 0.05) 15%,\n                rgba(0, 0, 0, ").concat(this.shadow.opacity,") 35%,\n                rgba(0, 0, 0, 0) 100%);\n            transform-origin: ").concat(i,"px 100px;\n            transform: translate3d(").concat(o.x-i,"px, ").concat(o.y-100,"px, 0) rotate(").concat(l,"rad);\n            clip-path: ").concat(u,";\n            -webkit-clip-path: ").concat(u,";\n        ");this.innerShadow.style.cssText=y}},{key:"drawOuterShadow",value:function drawOuterShadow(){for(var t=this.getRect(),r=this.convertToGlobal({x:this.shadow.pos.x,y:this.shadow.pos.y}),i=this.shadow.angle+3*Math.PI/2,a=1===this.getDirection()?this.shadow.width:0,o=0===this.getDirection()?"to right":"to left",l="polygon( ",u=0,h=[{x:0,y:0},{x:t.pageWidth,y:0},{x:t.pageWidth,y:t.height},{x:0,y:t.height}];u<h.length;u++){var d=h[u];if(null!==d){var p=1===this.getDirection()?{x:-d.x+this.shadow.pos.x,y:d.y-this.shadow.pos.y}:{x:d.x-this.shadow.pos.x,y:d.y-this.shadow.pos.y};l+=(p=c.GetRotatedPoint(p,{x:a,y:100},i)).x+"px "+p.y+"px, "}}l=l.slice(0,-2);l+=")";var v="\n            display: block;\n            z-index: ".concat((this.getSettings().startZIndex+10).toString(10),";\n            width: ").concat(this.shadow.width,"px;\n            height: ").concat(2*t.height,"px;\n            background: linear-gradient(").concat(o,", rgba(0, 0, 0, ").concat(this.shadow.opacity,"), rgba(0, 0, 0, 0));\n            transform-origin: ").concat(a,"px 100px;\n            transform: translate3d(").concat(r.x-a,"px, ").concat(r.y-100,"px, 0) rotate(").concat(i,"rad);\n            clip-path: ").concat(l,";\n            -webkit-clip-path: ").concat(l,";\n        ");this.outerShadow.style.cssText=v}},{key:"drawLeftPage",value:function drawLeftPage(){if("portrait"!==this.orientation&&null!==this.leftPage)if(1===this.direction&&null!==this.flippingPage&&"hard"===this.flippingPage.getDrawingDensity()){if(this.flippingPage.getHardAngle()<-90){this.leftPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10);this.leftPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle());this.leftPage.draw(this.flippingPage.getDrawingDensity())}else this.leftPage.getElement().style.display="none"}else this.leftPage.simpleDraw(0)}},{key:"drawRightPage",value:function drawRightPage(){if(null!==this.rightPage)if(0===this.direction&&null!==this.flippingPage&&"hard"===this.flippingPage.getDrawingDensity()){if(this.flippingPage.getHardAngle()>90){this.rightPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10);this.rightPage.setHardDrawingAngle(180+this.flippingPage.getHardAngle());this.rightPage.draw(this.flippingPage.getDrawingDensity())}else this.rightPage.getElement().style.display="none"}else this.rightPage.simpleDraw(1)}},{key:"drawBottomPage",value:function drawBottomPage(){if(null!==this.bottomPage){var t=null!=this.flippingPage?this.flippingPage.getDrawingDensity():null;if("portrait"!==this.orientation||1!==this.direction){this.bottomPage.getElement().style.zIndex=(this.getSettings().startZIndex+3).toString(10);this.bottomPage.draw(t)}}}},{key:"drawFrame",value:function drawFrame(){if(null!==this.flippingPage){if(this.flippingPage.getHardAngle()===this.lastAngle)return;this.lastAngle=this.flippingPage.getHardAngle()}else this.lastAngle=-1234;this.clear();this.drawLeftPage();this.drawRightPage();this.drawBottomPage();if(null!=this.flippingPage){if(this.flippingPage.state.hardDrawingAngle<=90){this.flippingPage.getElement().style.zIndex=(this.getSettings().startZIndex+5).toString(10);this.flippingPage.draw()}else this.flippingPage.getElement().style.display="none"}if(null!=this.shadow&&null!==this.flippingPage)if("soft"===this.flippingPage.getDrawingDensity()){this.drawOuterShadow();this.drawInnerShadow()}else{this.drawHardOuterShadow();this.drawHardInnerShadow()}}},{key:"clear",value:function clear(){var t,r=_createForOfIteratorHelper(this.app.getPageCollection().getPages());try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i!==this.leftPage&&i!==this.rightPage&&i!==this.flippingPage&&i!==this.bottomPage){var a=i.getElement().style;"none"!==a.display&&(a.cssText="display: none")}i.getTemporaryCopy()!==this.flippingPage&&i.hideTemporaryCopy()}}catch(t){r.e(t)}finally{r.f()}}},{key:"update",value:function update(){_get(_getPrototypeOf(HTMLRender.prototype),"update",this).call(this);null!==this.rightPage&&this.rightPage.setOrientation(1);null!==this.leftPage&&this.leftPage.setOrientation(0)}}]);return HTMLRender}(y),S=function(){function Settings(){_classCallCheck(this,Settings);this._default={startPage:0,size:"fixed",width:0,height:0,minWidth:0,maxWidth:0,minHeight:0,maxHeight:0,drawShadow:!0,flippingTime:1e3,usePortrait:!0,startZIndex:0,autoSize:!0,maxShadowOpacity:1,showCover:!1,mobileScrollSupport:!0,swipeDistance:30,clickEventForward:!0,useMouseEvents:!0,showPageCorners:!0,disableFlipByClick:!1}}_createClass(Settings,[{key:"getSettings",value:function getSettings(t){var r=this._default;Object.assign(r,t);if("stretch"!==r.size&&"fixed"!==r.size)throw new Error('Invalid size type. Available only "fixed" and "stretch" value');if(r.width<=0||r.height<=0)throw new Error("Invalid width or height");if(r.flippingTime<=0)throw new Error("Invalid flipping time");if("stretch"===r.size){r.minWidth<=0&&(r.minWidth=100);r.maxWidth<r.minWidth&&(r.maxWidth=2e3);r.minHeight<=0&&(r.minHeight=100);r.maxHeight<r.minHeight&&(r.maxHeight=2e3)}else{r.minWidth=r.width;r.maxWidth=r.width;r.minHeight=r.height;r.maxHeight=r.height}return r}}]);return Settings}();!function styleInject(t,r){void 0===r&&(r={});var i=r.insertAt;if(t&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css";"top"===i&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o);o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".stf__parent {\n  position: relative;\n  display: block;\n  box-sizing: border-box;\n  transform: translateZ(0);\n\n  -ms-touch-action: pan-y;\n  touch-action: pan-y;\n}\n\n.sft__wrapper {\n  position: relative;\n  width: 100%;\n  box-sizing: border-box;\n}\n\n.stf__parent canvas {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  left: 0;\n  top: 0;\n}\n\n.stf__block {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  box-sizing: border-box;\n  perspective: 2000px;\n}\n\n.stf__item {\n  display: none;\n  position: absolute;\n  transform-style: preserve-3d;\n}\n\n.stf__outerShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n\n.stf__innerShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n\n.stf__hardShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n\n.stf__hardInnerShadow {\n  position: absolute;\n  left: 0;\n  top: 0;\n}");var E=function(t){_inherits(PageFlip,t);var r=_createSuper(PageFlip);function PageFlip(t,i){var a;_classCallCheck(this,PageFlip);(a=r.call(this)).isUserTouch=!1;a.isUserMove=!1;a.setting=null;a.pages=null;a.setting=(new S).getSettings(i);a.block=t;return a}_createClass(PageFlip,[{key:"destroy",value:function destroy(){this.ui.destroy()}},{key:"update",value:function update(){this.render.update();this.pages.show()}},{key:"loadFromImages",value:function loadFromImages(t){var r=this;this.ui=new w(this.block,this,this.setting);var i=this.ui.getCanvas();this.render=new g(this,this.setting,i);this.flipController=new v(this.render,this);this.pages=new u(this,this.render,t);this.pages.load();this.render.start();this.pages.show(this.setting.startPage);setTimeout((function(){r.ui.update();r.trigger("init",r,{page:r.setting.startPage,mode:r.render.getOrientation()})}),1)}},{key:"loadFromHTML",value:function loadFromHTML(t){var r=this;this.ui=new b(this.block,this,this.setting,t);this.render=new A(this,this.setting,this.ui.getDistElement());this.flipController=new v(this.render,this);this.pages=new d(this,this.render,this.ui.getDistElement(),t);this.pages.load();this.render.start();this.pages.show(this.setting.startPage);setTimeout((function(){r.ui.update();r.trigger("init",r,{page:r.setting.startPage,mode:r.render.getOrientation()})}),1)}},{key:"updateFromImages",value:function updateFromImages(t){var r=this.pages.getCurrentPageIndex();this.pages.destroy();this.pages=new u(this,this.render,t);this.pages.load();this.pages.show(r);this.trigger("update",this,{page:r,mode:this.render.getOrientation()})}},{key:"updateFromHtml",value:function updateFromHtml(t){var r=this.pages.getCurrentPageIndex();this.pages.destroy();this.pages=new d(this,this.render,this.ui.getDistElement(),t);this.pages.load();this.ui.updateItems(t);this.render.reload();this.pages.show(r);this.trigger("update",this,{page:r,mode:this.render.getOrientation()})}},{key:"clear",value:function clear(){this.pages.destroy();this.ui.clear()}},{key:"turnToPrevPage",value:function turnToPrevPage(){this.pages.showPrev()}},{key:"turnToNextPage",value:function turnToNextPage(){this.pages.showNext()}},{key:"turnToPage",value:function turnToPage(t){this.pages.show(t)}},{key:"flipNext",value:function flipNext(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"top";this.flipController.flipNext(t)}},{key:"flipPrev",value:function flipPrev(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"top";this.flipController.flipPrev(t)}},{key:"flip",value:function flip(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top";this.flipController.flipToPage(t,r)}},{key:"updateState",value:function updateState(t){this.trigger("changeState",this,t)}},{key:"updatePageIndex",value:function updatePageIndex(t){this.trigger("flip",this,t)}},{key:"updateOrientation",value:function updateOrientation(t){this.ui.setOrientationStyle(t);this.update();this.trigger("changeOrientation",this,t)}},{key:"getPageCount",value:function getPageCount(){return this.pages.getPageCount()}},{key:"getCurrentPageIndex",value:function getCurrentPageIndex(){return this.pages.getCurrentPageIndex()}},{key:"getPage",value:function getPage(t){return this.pages.getPage(t)}},{key:"getRender",value:function getRender(){return this.render}},{key:"getFlipController",value:function getFlipController(){return this.flipController}},{key:"getOrientation",value:function getOrientation(){return this.render.getOrientation()}},{key:"getBoundsRect",value:function getBoundsRect(){return this.render.getRect()}},{key:"getSettings",value:function getSettings(){return this.setting}},{key:"getUI",value:function getUI(){return this.ui}},{key:"getState",value:function getState(){return this.flipController.getState()}},{key:"getPageCollection",value:function getPageCollection(){return this.pages}},{key:"startUserTouch",value:function startUserTouch(t){this.mousePosition=t;this.isUserTouch=!0;this.isUserMove=!1}},{key:"userMove",value:function userMove(t,r){if(this.isUserTouch||r||!this.setting.showPageCorners){if(this.isUserTouch&&c.GetDistanceBetweenTwoPoint(this.mousePosition,t)>5){this.isUserMove=!0;this.flipController.fold(t)}}else this.flipController.showCorner(t)}},{key:"userStop",value:function userStop(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isUserTouch){this.isUserTouch=!1;r||(this.isUserMove?this.flipController.stopMove():this.flipController.flip(t))}}}]);return PageFlip}(P);r.PageFlip=E},(t,r,i)=>{var a=i(67),o=i(331),l=i(46);a({target:"Array",proto:!0},{fill:o});l("fill")},(t,r,i)=>{var a=i(9),o=i(52),l=i(55);t.exports=function fill(t){for(var r=a(this),i=l(r),u=arguments.length,c=o(u>1?arguments[1]:void 0,i),h=u>2?arguments[2]:void 0,d=void 0===h?i:o(h,i);d>c;)r[c++]=t;return r}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(175);i(176);i(177);i(178);i(190);i(182);i(185);i(222);i(192);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.PDFPageView=void 0;i(42);i(88);i(92);i(283);i(95);i(142);i(216);i(198);i(126);i(240);i(206);i(219);i(293);i(179);var a=i(286),o=i(239),l=i(333),u=i(334),c=i(288),h=i(328),d=(i(291),i(335)),p=i(336),v=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(337)),y=i(339),g=i(404),m=i(405),b=i(406);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var w=c.compatibilityParams.maxCanvasPixels||16777216,P=function DEFAULT_LAYER_PROPERTIES(){return null},A=new WeakMap,S=new WeakMap,E=new WeakMap,x=new WeakMap,D=new WeakMap,k=new WeakMap,C=new WeakMap,T=new WeakMap,I=new WeakMap,O=new WeakMap,M=new WeakSet,L=new WeakSet,R=new WeakSet,G=new WeakSet,B=new WeakSet,j=new WeakSet,N=new WeakSet,W=new WeakSet,V=function(){function PDFPageView(t){var r,i,l,u,c,d=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFPageView);_classPrivateMethodInitSpec(this,W);_classPrivateMethodInitSpec(this,N);_classPrivateMethodInitSpec(this,j);_classPrivateMethodInitSpec(this,B);_classPrivateMethodInitSpec(this,G);_classPrivateMethodInitSpec(this,R);_classPrivateMethodInitSpec(this,L);_classPrivateMethodInitSpec(this,M);_classPrivateFieldInitSpec(this,A,{writable:!0,value:a.AnnotationMode.ENABLE_FORMS});_classPrivateFieldInitSpec(this,S,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,E,{writable:!0,value:null});_classPrivateFieldInitSpec(this,x,{writable:!0,value:null});_classPrivateFieldInitSpec(this,D,{writable:!0,value:null});_classPrivateFieldInitSpec(this,k,{writable:!0,value:null});_classPrivateFieldInitSpec(this,C,{writable:!0,value:o.RenderingStates.INITIAL});_classPrivateFieldInitSpec(this,T,{writable:!0,value:o.TextLayerMode.ENABLE});_classPrivateFieldInitSpec(this,I,{writable:!0,value:{directDrawing:!0,initialOptionalContent:!0,regularAnnotations:!0}});_classPrivateFieldInitSpec(this,O,{writable:!0,value:new WeakMap});var p=t.container,v=t.defaultViewport;this.id=t.id;this.renderingId="page"+this.id;_classPrivateFieldSet(this,E,t.layerProperties||P);this.pdfPage=null;this.pageLabel=null;this.rotation=0;this.scale=t.scale||o.DEFAULT_SCALE;this.viewport=v;this.pdfPageRotate=v.rotation;this._optionalContentConfigPromise=t.optionalContentConfigPromise||null;_classPrivateFieldSet(this,T,null!==(r=t.textLayerMode)&&void 0!==r?r:o.TextLayerMode.ENABLE);_classPrivateFieldSet(this,A,null!==(i=t.annotationMode)&&void 0!==i?i:a.AnnotationMode.ENABLE_FORMS);this.imageResourcesPath=t.imageResourcesPath||"";this.isOffscreenCanvasSupported=null===(l=t.isOffscreenCanvasSupported)||void 0===l||l;this.maxCanvasPixels=null!==(u=t.maxCanvasPixels)&&void 0!==u?u:w;this.pageColors=t.pageColors||null;this.eventBus=t.eventBus;this.renderingQueue=t.renderingQueue;this.l10n=t.l10n||h.NullL10n;this.renderTask=null;this.resume=null;this._isStandalone=!(null!==(c=this.renderingQueue)&&void 0!==c&&c.hasViewer());this._container=p;if(t.useOnlyCssZoom){console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead.");this.maxCanvasPixels=0}this._annotationCanvasMap=null;this.annotationLayer=null;this.annotationEditorLayer=null;this.textLayer=null;this.zoomLayer=null;this.xfaLayer=null;this.structTreeLayer=null;var y=document.createElement("div");y.className="page";y.setAttribute("data-page-number",this.id);y.setAttribute("role","region");this.l10n.get("page_landmark",{page:this.id}).then((function(t){y.setAttribute("aria-label",t)}));this.div=y;_classPrivateMethodGet(this,M,_setDimensions2).call(this);null==p||p.append(y);if(this._isStandalone){null==p||p.style.setProperty("--scale-factor",this.scale*a.PixelsPerInch.PDF_TO_CSS_UNITS);var g=t.optionalContentConfigPromise;g&&g.then((function(t){g===d._optionalContentConfigPromise&&(_classPrivateFieldGet(d,I).initialOptionalContent=t.hasInitialVisibility)}))}}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFPageView,[{key:"renderingState",get:function get(){return _classPrivateFieldGet(this,C)},set:function set(t){var r=this;if(t!==_classPrivateFieldGet(this,C)){_classPrivateFieldSet(this,C,t);if(_classPrivateFieldGet(this,x)){clearTimeout(_classPrivateFieldGet(this,x));_classPrivateFieldSet(this,x,null)}switch(t){case o.RenderingStates.PAUSED:this.div.classList.remove("loading");break;case o.RenderingStates.RUNNING:this.div.classList.add("loadingIcon");_classPrivateFieldSet(this,x,setTimeout((function(){r.div.classList.add("loading");_classPrivateFieldSet(r,x,null)}),0));break;case o.RenderingStates.INITIAL:case o.RenderingStates.FINISHED:this.div.classList.remove("loadingIcon","loading")}}}},{key:"setPdfPage",value:function setPdfPage(t){var r,i;if(this._isStandalone&&("CanvasText"===(null===(r=this.pageColors)||void 0===r?void 0:r.foreground)||"Canvas"===(null===(i=this.pageColors)||void 0===i?void 0:i.background))){var o;null===(o=this._container)||void 0===o||o.style.setProperty("--hcm-highligh-filter",t.filterFactory.addHighlightHCMFilter("CanvasText","Canvas","HighlightText","Highlight"))}this.pdfPage=t;this.pdfPageRotate=t.rotate;var l=(this.rotation+this.pdfPageRotate)%360;this.viewport=t.getViewport({scale:this.scale*a.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:l});_classPrivateMethodGet(this,M,_setDimensions2).call(this);this.reset()}},{key:"destroy",value:function destroy(){var t;this.reset();null===(t=this.pdfPage)||void 0===t||t.cleanup()}},{key:"_textHighlighter",get:function get(){return(0,a.shadow)(this,"_textHighlighter",new g.TextHighlighter({pageIndex:this.id-1,eventBus:this.eventBus,findController:_classPrivateFieldGet(this,E).call(this).findController}))}},{key:"_resetZoomLayer",value:function _resetZoomLayer(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.zoomLayer){var r=this.zoomLayer.firstChild;_classPrivateFieldGet(this,O).delete(r);r.width=0;r.height=0;t&&this.zoomLayer.remove();this.zoomLayer=null}}},{key:"reset",value:function reset(){var t,r,i,a,l,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=u.keepZoomLayer,h=void 0!==c&&c,d=u.keepAnnotationLayer,p=void 0!==d&&d,v=u.keepAnnotationEditorLayer,y=void 0!==v&&v,g=u.keepXfaLayer,m=void 0!==g&&g,b=u.keepTextLayer,w=void 0!==b&&b;this.cancelRendering({keepAnnotationLayer:p,keepAnnotationEditorLayer:y,keepXfaLayer:m,keepTextLayer:w});this.renderingState=o.RenderingStates.INITIAL;for(var P=this.div,A=P.childNodes,S=h&&this.zoomLayer||null,E=p&&(null===(t=this.annotationLayer)||void 0===t?void 0:t.div)||null,x=y&&(null===(r=this.annotationEditorLayer)||void 0===r?void 0:r.div)||null,D=m&&(null===(i=this.xfaLayer)||void 0===i?void 0:i.div)||null,k=w&&(null===(a=this.textLayer)||void 0===a?void 0:a.div)||null,C=A.length-1;C>=0;C--){var T=A[C];switch(T){case S:case E:case x:case D:case k:continue}T.remove()}P.removeAttribute("data-loaded");E&&this.annotationLayer.hide();x&&this.annotationEditorLayer.hide();D&&this.xfaLayer.hide();k&&this.textLayer.hide();null===(l=this.structTreeLayer)||void 0===l||l.hide();if(!S){if(this.canvas){_classPrivateFieldGet(this,O).delete(this.canvas);this.canvas.width=0;this.canvas.height=0;delete this.canvas}this._resetZoomLayer()}}},{key:"update",value:function update(t){var r=this,i=t.scale,l=void 0===i?0:i,u=t.rotation,c=void 0===u?null:u,h=t.optionalContentConfigPromise,d=void 0===h?null:h,p=t.drawingDelay,v=void 0===p?-1:p;this.scale=l||this.scale;"number"==typeof c&&(this.rotation=c);if(d instanceof Promise){this._optionalContentConfigPromise=d;d.then((function(t){d===r._optionalContentConfigPromise&&(_classPrivateFieldGet(r,I).initialOptionalContent=t.hasInitialVisibility)}))}_classPrivateFieldGet(this,I).directDrawing=!0;var y=(this.rotation+this.pdfPageRotate)%360;this.viewport=this.viewport.clone({scale:this.scale*a.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:y});_classPrivateMethodGet(this,M,_setDimensions2).call(this);if(this._isStandalone){var g;null===(g=this._container)||void 0===g||g.style.setProperty("--scale-factor",this.viewport.scale)}if(this.canvas){var m=!1;if(_classPrivateFieldGet(this,S))if(0===this.maxCanvasPixels)m=!0;else if(this.maxCanvasPixels>0){var b=this.viewport,w=b.width,P=b.height,A=this.outputScale,E=A.sx,x=A.sy;m=(Math.floor(w)*E|0)*(Math.floor(P)*x|0)>this.maxCanvasPixels}var D=!m&&v>=0&&v<1e3;if(D||m){if(D&&this.renderingState!==o.RenderingStates.FINISHED){this.cancelRendering({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0,cancelExtraDelay:v});this.renderingState=o.RenderingStates.FINISHED;_classPrivateFieldGet(this,I).directDrawing=!1}this.cssTransform({target:this.canvas,redrawAnnotationLayer:!0,redrawAnnotationEditorLayer:!0,redrawXfaLayer:!0,redrawTextLayer:!D,hideTextLayer:D});if(D)return;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now(),error:_classPrivateFieldGet(this,k)});return}if(!this.zoomLayer&&!this.canvas.hidden){this.zoomLayer=this.canvas.parentNode;this.zoomLayer.style.position="absolute"}}this.zoomLayer&&this.cssTransform({target:this.zoomLayer.firstChild});this.reset({keepZoomLayer:!0,keepAnnotationLayer:!0,keepAnnotationEditorLayer:!0,keepXfaLayer:!0,keepTextLayer:!0})}},{key:"cancelRendering",value:function cancelRendering(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.keepAnnotationLayer,i=void 0!==r&&r,a=t.keepAnnotationEditorLayer,o=void 0!==a&&a,l=t.keepXfaLayer,u=void 0!==l&&l,c=t.keepTextLayer,h=void 0!==c&&c,d=t.cancelExtraDelay,p=void 0===d?0:d;if(this.renderTask){this.renderTask.cancel(p);this.renderTask=null}this.resume=null;if(this.textLayer&&(!h||!this.textLayer.div)){this.textLayer.cancel();this.textLayer=null}this.structTreeLayer&&!this.textLayer&&(this.structTreeLayer=null);if(this.annotationLayer&&(!i||!this.annotationLayer.div)){this.annotationLayer.cancel();this.annotationLayer=null;this._annotationCanvasMap=null}if(this.annotationEditorLayer&&(!o||!this.annotationEditorLayer.div)){this.annotationEditorLayer.cancel();this.annotationEditorLayer=null}if(this.xfaLayer&&(!u||!this.xfaLayer.div)){var v;this.xfaLayer.cancel();this.xfaLayer=null;null===(v=this._textHighlighter)||void 0===v||v.disable()}}},{key:"cssTransform",value:function cssTransform(t){var r=t.target,i=t.redrawAnnotationLayer,a=void 0!==i&&i,o=t.redrawAnnotationEditorLayer,l=void 0!==o&&o,u=t.redrawXfaLayer,c=void 0!==u&&u,h=t.redrawTextLayer,d=void 0!==h&&h,p=t.hideTextLayer,v=void 0!==p&&p;if(!r.hasAttribute("zooming")){r.setAttribute("zooming",!0);var y=r.style;y.width=y.height=""}var g=_classPrivateFieldGet(this,O).get(r);if(this.viewport!==g){var m=this.viewport.rotation-g.rotation,b=Math.abs(m),w=1,P=1;if(90===b||270===b){var A=this.viewport,S=A.width,E=A.height;w=E/S;P=S/E}r.style.transform="rotate(".concat(m,"deg) scale(").concat(w,", ").concat(P,")")}a&&this.annotationLayer&&_classPrivateMethodGet(this,L,_renderAnnotationLayer2).call(this);l&&this.annotationEditorLayer&&_classPrivateMethodGet(this,R,_renderAnnotationEditorLayer2).call(this);c&&this.xfaLayer&&_classPrivateMethodGet(this,G,_renderXfaLayer2).call(this);if(this.textLayer)if(v){var x;this.textLayer.hide();null===(x=this.structTreeLayer)||void 0===x||x.hide()}else d&&_classPrivateMethodGet(this,B,_renderTextLayer2).call(this)}},{key:"width",get:function get(){return this.viewport.width}},{key:"height",get:function get(){return this.viewport.height}},{key:"getPagePoint",value:function getPagePoint(t,r){return this.viewport.convertToPdfPoint(t,r)}},{key:"draw",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,i,c,h,d,g,w,P,x,D,k,C,I,M,j,N,V,U,H,z,q,Y,K,X,$,Q,J,Z,ee,te,re,ne,ie,ae,oe,se,le,ue=this;return _regeneratorRuntime().wrap((function _callee2$(ce){for(;;)switch(ce.prev=ce.next){case 0:if(this.renderingState!==o.RenderingStates.INITIAL){globalThis.ngxConsole.error("Must be in new state before drawing");this.reset()}t=this.div,r=this.l10n,i=this.pageColors,c=this.pdfPage,h=this.viewport;if(c){ce.next=5;break}this.renderingState=o.RenderingStates.FINISHED;throw new Error("pdfPage is not loaded");case 5:this.renderingState=o.RenderingStates.RUNNING;(d=document.createElement("div")).classList.add("canvasWrapper");t.append(d);if(!this.textLayer&&_classPrivateFieldGet(this,T)!==o.TextLayerMode.DISABLE&&!c.isPureXfa){this._accessibilityManager||(this._accessibilityManager=new p.TextAccessibilityManager);this.textLayer=new m.TextLayerBuilder({highlighter:this._textHighlighter,accessibilityManager:this._accessibilityManager,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,enablePermissions:_classPrivateFieldGet(this,T)===o.TextLayerMode.ENABLE_PERMISSIONS});t.append(this.textLayer.div)}if(!this.annotationLayer&&_classPrivateFieldGet(this,A)!==a.AnnotationMode.DISABLE){g=_classPrivateFieldGet(this,E).call(this),w=g.annotationStorage,P=g.downloadManager,x=g.enableScripting,D=g.fieldObjectsPromise,k=g.hasJSActionsPromise,C=g.linkService;this._annotationCanvasMap||(this._annotationCanvasMap=new Map);this.annotationLayer=new u.AnnotationLayerBuilder({pageDiv:t,pdfPage:c,annotationStorage:w,imageResourcesPath:this.imageResourcesPath,renderForms:_classPrivateFieldGet(this,A)===a.AnnotationMode.ENABLE_FORMS,linkService:C,downloadManager:P,l10n:r,enableScripting:x,hasJSActionsPromise:k,fieldObjectsPromise:D,annotationCanvasMap:this._annotationCanvasMap,accessibilityManager:this._accessibilityManager})}I=function renderContinueCallback(t){var r;null===(r=U)||void 0===r||r(!1);if(!ue.renderingQueue||ue.renderingQueue.isHighestPriority(ue))t();else{ue.renderingState=o.RenderingStates.PAUSED;ue.resume=function(){ue.renderingState=o.RenderingStates.RUNNING;t()}}};M=h.width,j=h.height;(N=document.createElement("canvas")).setAttribute("role","presentation");N.hidden=!0;V=!(null==i||!i.background||null==i||!i.foreground);U=function showCanvas(t){if(!V||t){N.hidden=!1;U=null}};d.append(N);this.canvas=N;H=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};z=N.getContext("2d",H);q=this.outputScale=new o.OutputScale;if(0===this.maxCanvasPixels){Y=1/this.scale;q.sx*=Y;q.sy*=Y;_classPrivateFieldSet(this,S,!0)}else if(this.maxCanvasPixels>0){K=M*j;X=Math.sqrt(this.maxCanvasPixels/K);if(q.sx>X||q.sy>X){q.sx=X;q.sy=X;_classPrivateFieldSet(this,S,!0)}else _classPrivateFieldSet(this,S,!1)}$=(0,o.approximateFraction)(q.sx);Q=(0,o.approximateFraction)(q.sy);M=(0,o.roundToDivide)(M*q.sx,$[0]);j=(0,o.roundToDivide)(j*q.sy,Q[0]);J=1;if((M>=4096||j>=4096)&&(this.maxWidth||!v.default.test({width:M,height:j}))){Z=this.determineMaxDimensions();if((J=Math.max(M/Z,j/Z))>1){ee=Math.floor(100*this.scale/J)/100;J=this.scale/ee;h.width/=J;h.height/=J;(0,y.warn)("Page ".concat(this.id,": Reduced the maximum zoom to ").concat(ee," because the browser can't render larger canvases."))}else J=1}N.width=(0,o.roundToDivide)(h.width*q.sx,$[0]);N.height=(0,o.roundToDivide)(h.height*q.sy,Q[0]);(te=N.style).width=(0,o.roundToDivide)(h.width,$[1])+"px";te.height=(0,o.roundToDivide)(h.height,Q[1])+"px";_classPrivateFieldGet(this,O).set(N,h);re=q.scaled?[q.sx,0,0,q.sy,0,0]:null;ne={canvasContext:z,transform:re,viewport:h,annotationMode:_classPrivateFieldGet(this,A),optionalContentConfigPromise:this._optionalContentConfigPromise,annotationCanvasMap:this._annotationCanvasMap,pageColors:i};(ie=this.renderTask=this.pdfPage.render(ne)).onContinue=I;ae=ie.promise.then(_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var i,a,o,u;return _regeneratorRuntime().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:null===(i=U)||void 0===i||i(!0);h.next=3;return _classPrivateMethodGet(ue,W,_finishRenderTask2).call(ue,ie);case 3:_classPrivateMethodGet(ue,B,_renderTextLayer2).call(ue);if(!ue.annotationLayer){h.next=7;break}h.next=7;return _classPrivateMethodGet(ue,L,_renderAnnotationLayer2).call(ue);case 7:if(ue.annotationEditorLayer){h.next=12;break}o=_classPrivateFieldGet(ue,E).call(ue);if(u=o.annotationEditorUIManager){h.next=11;break}return h.abrupt("return");case 11:ue.annotationEditorLayer=new l.AnnotationEditorLayerBuilder({uiManager:u,pageDiv:t,pdfPage:c,l10n:r,accessibilityManager:ue._accessibilityManager,annotationLayer:null===(a=ue.annotationLayer)||void 0===a?void 0:a.annotationLayer});case 12:_classPrivateMethodGet(ue,R,_renderAnnotationEditorLayer2).call(ue);case 13:case"end":return h.stop()}}),_callee)}))),(function(t){if(!(t instanceof a.RenderingCancelledException)){var r;null===(r=U)||void 0===r||r(!0)}return _classPrivateMethodGet(ue,W,_finishRenderTask2).call(ue,ie,t)}));if(c.isPureXfa){if(this.xfaLayer)this.xfaLayer.div&&t.append(this.xfaLayer.div);else{oe=_classPrivateFieldGet(this,E).call(this),se=oe.annotationStorage,le=oe.linkService;this.xfaLayer=new b.XfaLayerBuilder({pageDiv:t,pdfPage:c,annotationStorage:se,linkService:le})}_classPrivateMethodGet(this,G,_renderXfaLayer2).call(this)}t.setAttribute("data-loaded",!0);this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id});return ce.abrupt("return",ae);case 45:case"end":return ce.stop()}}),_callee2,this)}))),function draw(){return t.apply(this,arguments)})},{key:"setPageLabel",value:function setPageLabel(t){this.pageLabel="string"==typeof t?t:null;null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}},{key:"determineMaxDimensions",value:function determineMaxDimensions(){if(this.maxWidth)return this.maxWidth;for(var t=0,r=[4096,8192,10836,11180,11402,14188,16384];t<r.length;t++){var i=r[t];if(!v.default.test({width:i+1,height:i+1})){this.maxWidth=i;return this.maxWidth}}return 16384}},{key:"thumbnailCanvas",get:function get(){var t=_classPrivateFieldGet(this,I),r=t.directDrawing,i=t.initialOptionalContent,a=t.regularAnnotations;return r&&i&&a?this.canvas:null}}]);var t;return PDFPageView}();r.PDFPageView=V;function _setDimensions2(){var t=this.viewport;if(this.pdfPage){if(_classPrivateFieldGet(this,D)===t.rotation)return;_classPrivateFieldSet(this,D,t.rotation)}(0,a.setLayerDimensions)(this.div,t,!0,!1)}function _renderAnnotationLayer2(){return _renderAnnotationLayer3.apply(this,arguments)}function _renderAnnotationLayer3(){return(_renderAnnotationLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t;return _regeneratorRuntime().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:t=null;r.prev=1;r.next=4;return this.annotationLayer.render(this.viewport,"display");case 4:r.next=10;break;case 6:r.prev=6;r.t0=r.catch(1);console.error('#renderAnnotationLayer: "'.concat(r.t0,'".'));t=r.t0;case 10:r.prev=10;this.eventBus.dispatch("annotationlayerrendered",{source:this,pageNumber:this.id,error:t});return r.finish(10);case 13:case"end":return r.stop()}}),_callee3,this,[[1,6,10,13]])})))).apply(this,arguments)}function _renderAnnotationEditorLayer2(){return _renderAnnotationEditorLayer3.apply(this,arguments)}function _renderAnnotationEditorLayer3(){return(_renderAnnotationEditorLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(){var t;return _regeneratorRuntime().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:t=null;r.prev=1;r.next=4;return this.annotationEditorLayer.render(this.viewport,"display");case 4:r.next=10;break;case 6:r.prev=6;r.t0=r.catch(1);console.error('#renderAnnotationEditorLayer: "'.concat(r.t0,'".'));t=r.t0;case 10:r.prev=10;this.eventBus.dispatch("annotationeditorlayerrendered",{source:this,pageNumber:this.id,error:t});return r.finish(10);case 13:case"end":return r.stop()}}),_callee4,this,[[1,6,10,13]])})))).apply(this,arguments)}function _renderXfaLayer2(){return _renderXfaLayer3.apply(this,arguments)}function _renderXfaLayer3(){return(_renderXfaLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(){var t,r;return _regeneratorRuntime().wrap((function _callee5$(i){for(;;)switch(i.prev=i.next){case 0:t=null;i.prev=1;i.next=4;return this.xfaLayer.render(this.viewport,"display");case 4:null!=(r=i.sent)&&r.textDivs&&this._textHighlighter&&_classPrivateMethodGet(this,N,_buildXfaTextContentItems2).call(this,r.textDivs);i.next=12;break;case 8:i.prev=8;i.t0=i.catch(1);console.error('#renderXfaLayer: "'.concat(i.t0,'".'));t=i.t0;case 12:i.prev=12;this.eventBus.dispatch("xfalayerrendered",{source:this,pageNumber:this.id,error:t});return i.finish(12);case 15:case"end":return i.stop()}}),_callee5,this,[[1,8,12,15]])})))).apply(this,arguments)}function _renderTextLayer2(){return _renderTextLayer3.apply(this,arguments)}function _renderTextLayer3(){return(_renderTextLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t,r,i,o,l;return _regeneratorRuntime().wrap((function _callee6$(u){for(;;)switch(u.prev=u.next){case 0:t=this.pdfPage,r=this.textLayer,i=this.viewport;if(r){u.next=3;break}return u.abrupt("return");case 3:o=null;u.prev=4;if(!r.renderingDone){l=t.streamTextContent({includeMarkedContent:!0,disableNormalization:!0});r.setTextContentSource(l)}u.next=8;return r.render(i);case 8:u.next=16;break;case 10:u.prev=10;u.t0=u.catch(4);if(!(u.t0 instanceof a.AbortException)){u.next=14;break}return u.abrupt("return");case 14:console.error('#renderTextLayer: "'.concat(u.t0,'".'));o=u.t0;case 16:this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.id,numTextDivs:r.numTextDivs,error:o});_classPrivateMethodGet(this,j,_renderStructTreeLayer2).call(this);case 18:case"end":return u.stop()}}),_callee6,this,[[4,10]])})))).apply(this,arguments)}function _renderStructTreeLayer2(){return _renderStructTreeLayer3.apply(this,arguments)}function _renderStructTreeLayer3(){return(_renderStructTreeLayer3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee7(){var t,r,i,a,o;return _regeneratorRuntime().wrap((function _callee7$(l){for(;;)switch(l.prev=l.next){case 0:if(this.textLayer){l.next=2;break}return l.abrupt("return");case 2:this.structTreeLayer||(this.structTreeLayer=new d.StructTreeLayerBuilder);l.next=5;return this.structTreeLayer.renderingDone?null:this.pdfPage.getStructTree();case 5:i=l.sent;(a=null===(t=this.structTreeLayer)||void 0===t?void 0:t.render(i))&&(null===(o=this.canvas)||void 0===o||o.append(a));null===(r=this.structTreeLayer)||void 0===r||r.show();case 9:case"end":return l.stop()}}),_callee7,this)})))).apply(this,arguments)}function _buildXfaTextContentItems2(t){return _buildXfaTextContentItems3.apply(this,arguments)}function _buildXfaTextContentItems3(){return(_buildXfaTextContentItems3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee8(t){var r,i,a,o,l;return _regeneratorRuntime().wrap((function _callee8$(u){for(;;)switch(u.prev=u.next){case 0:u.next=2;return this.pdfPage.getTextContent();case 2:r=u.sent;i=[];a=_createForOfIteratorHelper(r.items);try{for(a.s();!(o=a.n()).done;){l=o.value;i.push(l.str)}}catch(t){a.e(t)}finally{a.f()}this._textHighlighter.setTextMapping(t,i);this._textHighlighter.enable();case 8:case"end":return u.stop()}}),_callee8,this)})))).apply(this,arguments)}function _finishRenderTask2(t){return _finishRenderTask3.apply(this,arguments)}function _finishRenderTask3(){_finishRenderTask3=_asyncToGenerator(_regeneratorRuntime().mark((function _callee9(t){var r,i=arguments;return _regeneratorRuntime().wrap((function _callee9$(l){for(;;)switch(l.prev=l.next){case 0:r=i.length>1&&void 0!==i[1]?i[1]:null;t===this.renderTask&&(this.renderTask=null);if(!(r instanceof a.RenderingCancelledException)){l.next=5;break}_classPrivateFieldSet(this,k,null);return l.abrupt("return");case 5:_classPrivateFieldSet(this,k,r);this.renderingState=o.RenderingStates.FINISHED;this._resetZoomLayer(!0);_classPrivateFieldGet(this,I).regularAnnotations=!t.separateAnnots;this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now(),error:_classPrivateFieldGet(this,k)});if(!r){l.next=12;break}throw r;case 12:case"end":return l.stop()}}),_callee9,this)})));return _finishRenderTask3.apply(this,arguments)}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationEditorLayerBuilder=void 0;i(126);i(42);i(88);i(92);i(283);i(95);var a=i(286),o=i(328);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var l=new WeakMap,u=new WeakMap,c=function(){function AnnotationEditorLayerBuilder(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationEditorLayerBuilder);_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,u,{writable:!0,value:void 0});this.pageDiv=t.pageDiv;this.pdfPage=t.pdfPage;this.accessibilityManager=t.accessibilityManager;this.l10n=t.l10n||o.NullL10n;this.annotationEditorLayer=null;this.div=null;this._cancelled=!1;_classPrivateFieldSet(this,u,t.uiManager);_classPrivateFieldSet(this,l,t.annotationLayer||null)}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationEditorLayerBuilder,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,o,c,h=arguments;return _regeneratorRuntime().wrap((function _callee$(d){for(;;)switch(d.prev=d.next){case 0:if("display"===(r=h.length>1&&void 0!==h[1]?h[1]:"display")){d.next=3;break}return d.abrupt("return");case 3:if(!this._cancelled){d.next=5;break}return d.abrupt("return");case 5:i=t.clone({dontFlip:!0});if(!this.div){d.next=10;break}this.annotationEditorLayer.update({viewport:i});this.show();return d.abrupt("return");case 10:(o=this.div=document.createElement("div")).className="annotationEditorLayer";o.tabIndex=0;o.hidden=!0;this.pageDiv.append(o);this.annotationEditorLayer=new a.AnnotationEditorLayer({uiManager:_classPrivateFieldGet(this,u),div:o,accessibilityManager:this.accessibilityManager,pageIndex:this.pdfPage.pageNumber-1,l10n:this.l10n,viewport:i,annotationLayer:_classPrivateFieldGet(this,l)});c={viewport:i,div:o,annotations:null,intent:r};this.annotationEditorLayer.render(c);this.show();case 19:case"end":return d.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0;if(this.div){this.pageDiv=null;this.annotationEditorLayer.destroy();this.div.remove()}}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}},{key:"show",value:function show(){this.div&&!this.annotationEditorLayer.isEmpty&&(this.div.hidden=!1)}}]);var t;return AnnotationEditorLayerBuilder}();r.AnnotationEditorLayerBuilder=c},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);i(179);i(185);i(222);i(192);i(206);i(219);i(175);i(176);i(177);i(178);i(190);i(182);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.AnnotationLayerBuilder=void 0;i(88);i(142);i(42);i(92);i(95);i(126);i(283);i(293);var a=i(286),o=i(328),l=i(239);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var u=new WeakMap,c=new WeakSet,h=function(){function AnnotationLayerBuilder(t){var r=t.pageDiv,i=t.pdfPage,a=t.linkService,l=t.downloadManager,h=t.annotationStorage,d=void 0===h?null:h,p=t.imageResourcesPath,v=void 0===p?"":p,y=t.renderForms,g=void 0===y||y,m=t.l10n,b=void 0===m?o.NullL10n:m,w=t.enableScripting,P=void 0!==w&&w,A=t.hasJSActionsPromise,S=void 0===A?null:A,E=t.fieldObjectsPromise,x=void 0===E?null:E,D=t.annotationCanvasMap,k=void 0===D?null:D,C=t.accessibilityManager,T=void 0===C?null:C;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,AnnotationLayerBuilder);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,c);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,u,{writable:!0,value:null});this.pageDiv=r;this.pdfPage=i;this.linkService=a;this.downloadManager=l;this.imageResourcesPath=v;this.renderForms=g;this.l10n=b;this.annotationStorage=d;this.enableScripting=P;this._hasJSActionsPromise=S||Promise.resolve(!1);this._fieldObjectsPromise=x||Promise.resolve(null);this._annotationCanvasMap=k;this._accessibilityManager=T;this.annotationLayer=null;this.div=null;this._cancelled=!1;this._eventBus=a.eventBus}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(AnnotationLayerBuilder,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,o,h,d,p,v,y,g=this,m=arguments;return _regeneratorRuntime().wrap((function _callee$(b){for(;;)switch(b.prev=b.next){case 0:r=m.length>1&&void 0!==m[1]?m[1]:"display";if(!this.div){b.next=6;break}if(!this._cancelled&&this.annotationLayer){b.next=4;break}return b.abrupt("return");case 4:this.annotationLayer.update({viewport:t.clone({dontFlip:!0})});return b.abrupt("return");case 6:b.next=8;return Promise.all([this.pdfPage.getAnnotations({intent:r}),this._hasJSActionsPromise,this._fieldObjectsPromise]);case 8:i=b.sent;o=_slicedToArray(i,3);h=o[0];d=o[1];p=o[2];if(!this._cancelled){b.next=15;break}return b.abrupt("return");case 15:(v=this.div=document.createElement("div")).className="annotationLayer";this.pageDiv.append(v);if(0!==h.length){b.next=21;break}this.hide();return b.abrupt("return");case 21:this.annotationLayer=new a.AnnotationLayer({div:v,accessibilityManager:this._accessibilityManager,annotationCanvasMap:this._annotationCanvasMap,l10n:this.l10n,page:this.pdfPage,viewport:t.clone({dontFlip:!0})});b.next=24;return this.annotationLayer.render({annotations:h,imageResourcesPath:this.imageResourcesPath,renderForms:this.renderForms,linkService:this.linkService,downloadManager:this.downloadManager,annotationStorage:this.annotationStorage,enableScripting:this.enableScripting,hasJSActions:d,fieldObjects:p});case 24:this.linkService.isInPresentationMode&&_classPrivateMethodGet(this,c,_updatePresentationModeState2).call(this,l.PresentationModeState.FULLSCREEN);if(!_classPrivateFieldGet(this,u)){_classPrivateFieldSet(this,u,(function(t){_classPrivateMethodGet(g,c,_updatePresentationModeState2).call(g,t.state)}));null===(y=this._eventBus)||void 0===y||y._on("presentationmodechanged",_classPrivateFieldGet(this,u))}case 26:case"end":return b.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0;if(_classPrivateFieldGet(this,u)){var t;null===(t=this._eventBus)||void 0===t||t._off("presentationmodechanged",_classPrivateFieldGet(this,u));_classPrivateFieldSet(this,u,null)}}},{key:"hide",value:function hide(){this.div&&(document.querySelector("[data-pdfjsprinting=true]")||(this.div.hidden=!0))}}]);var t;return AnnotationLayerBuilder}();r.AnnotationLayerBuilder=h;function _updatePresentationModeState2(t){if(this.div){var r=!1;switch(t){case l.PresentationModeState.FULLSCREEN:r=!0;break;case l.PresentationModeState.NORMAL:break;default:return}var i,a=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}(this.div.childNodes);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.hasAttribute("data-internal-link")||(o.inert=r)}}catch(t){a.e(t)}finally{a.f()}}}},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(126);i(135);i(136);i(98);i(120);i(138);i(185);i(222);i(192);i(219);i(1);Object.defineProperty(r,"__esModule",{value:!0});r.StructTreeLayerBuilder=void 0;i(42);i(88);i(92);i(283);i(95);i(293);i(206);i(292);function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var a={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},o=/^H(\d+)$/,l=new WeakMap,u=new WeakSet,c=new WeakSet,h=function(){function StructTreeLayerBuilder(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,StructTreeLayerBuilder);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,u);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,l,{writable:!0,value:void 0})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(StructTreeLayerBuilder,[{key:"renderingDone",get:function get(){return void 0!==_classPrivateFieldGet(this,l)}},{key:"render",value:function render(t){if(void 0!==_classPrivateFieldGet(this,l))return _classPrivateFieldGet(this,l);var r=_classPrivateMethodGet(this,c,_walk2).call(this,t);null==r||r.classList.add("structTree");return _classPrivateFieldSet(this,l,r)}},{key:"hide",value:function hide(){_classPrivateFieldGet(this,l)&&!_classPrivateFieldGet(this,l).hidden&&(_classPrivateFieldGet(this,l).hidden=!0)}},{key:"show",value:function show(){var t;null!==(t=_classPrivateFieldGet(this,l))&&void 0!==t&&t.hidden&&(_classPrivateFieldGet(this,l).hidden=!1)}}]);return StructTreeLayerBuilder}();r.StructTreeLayerBuilder=h;function _setAttributes2(t,r){void 0!==t.alt&&r.setAttribute("aria-label",t.alt);void 0!==t.id&&r.setAttribute("aria-owns",t.id);void 0!==t.lang&&r.setAttribute("lang",t.lang)}function _walk2(t){if(!t)return null;var r=document.createElement("span");if("role"in t){var i=t.role,l=i.match(o);if(l){r.setAttribute("role","heading");r.setAttribute("aria-level",l[1])}else a[i]&&r.setAttribute("role",a[i])}_classPrivateMethodGet(this,u,_setAttributes2).call(this,t,r);if(t.children)if(1===t.children.length&&"id"in t.children[0])_classPrivateMethodGet(this,u,_setAttributes2).call(this,t.children[0],r);else{var h,d=_createForOfIteratorHelper(t.children);try{for(d.s();!(h=d.n()).done;){var p=h.value;r.append(_classPrivateMethodGet(this,c,_walk2).call(this,p))}}catch(t){d.e(t)}finally{d.f()}}return r}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(222);i(206);i(219);i(1);i(179);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TextAccessibilityManager=void 0;i(42);i(240);i(88);i(92);i(95);i(126);i(185);i(278);i(199);i(200);i(195);i(192);i(283);i(293);i(216);var a=i(239);function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classStaticPrivateMethodGet(t,r,i){!function _classCheckPrivateStaticAccess(t,r){if(t!==r)throw new TypeError("Private static access of wrong provenance")}(t,r);return i}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var o=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakSet,d=function(){function TextAccessibilityManager(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextAccessibilityManager);!function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}(this,h);_classPrivateFieldInitSpec(this,o,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});_classPrivateFieldInitSpec(this,u,{writable:!0,value:new Map});_classPrivateFieldInitSpec(this,c,{writable:!0,value:new Map})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextAccessibilityManager,[{key:"setTextMapping",value:function setTextMapping(t){_classPrivateFieldSet(this,l,t)}},{key:"enable",value:function enable(){if(_classPrivateFieldGet(this,o))throw new Error("TextAccessibilityManager is already enabled.");if(!_classPrivateFieldGet(this,l))throw new Error("Text divs and strings have not been set.");_classPrivateFieldSet(this,o,!0);_classPrivateFieldSet(this,l,_classPrivateFieldGet(this,l).slice());_classPrivateFieldGet(this,l).sort(_classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions));if(_classPrivateFieldGet(this,u).size>0){var t,r=_classPrivateFieldGet(this,l),i=_createForOfIteratorHelper(_classPrivateFieldGet(this,u));try{for(i.s();!(t=i.n()).done;){var a=_slicedToArray(t.value,2),d=a[0],p=a[1];document.getElementById(d)?_classPrivateMethodGet(this,h,_addIdToAriaOwns2).call(this,d,r[p]):_classPrivateFieldGet(this,u).delete(d)}}catch(t){i.e(t)}finally{i.f()}}var v,y=_createForOfIteratorHelper(_classPrivateFieldGet(this,c));try{for(y.s();!(v=y.n()).done;){var g=_slicedToArray(v.value,2),m=g[0],b=g[1];this.addPointerInTextLayer(m,b)}}catch(t){y.e(t)}finally{y.f()}_classPrivateFieldGet(this,c).clear()}},{key:"disable",value:function disable(){if(_classPrivateFieldGet(this,o)){_classPrivateFieldGet(this,c).clear();_classPrivateFieldSet(this,l,null);_classPrivateFieldSet(this,o,!1)}}},{key:"removePointerInTextLayer",value:function removePointerInTextLayer(t){var r;if(_classPrivateFieldGet(this,o)){var i=_classPrivateFieldGet(this,l);if(i&&0!==i.length){var a=t.id,h=_classPrivateFieldGet(this,u).get(a);if(void 0!==h){var d=i[h];_classPrivateFieldGet(this,u).delete(a);var p=d.getAttribute("aria-owns");if(null!==(r=p)&&void 0!==r&&r.includes(a))if(p=p.split(" ").filter((function(t){return t!==a})).join(" "))d.setAttribute("aria-owns",p);else{d.removeAttribute("aria-owns");d.setAttribute("role","presentation")}}}}else _classPrivateFieldGet(this,c).delete(t)}},{key:"addPointerInTextLayer",value:function addPointerInTextLayer(t,r){var i=t.id;if(i)if(_classPrivateFieldGet(this,o)){r&&this.removePointerInTextLayer(t);var d=_classPrivateFieldGet(this,l);if(d&&0!==d.length){var p=(0,a.binarySearchFirstItem)(d,(function(r){return _classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions).call(TextAccessibilityManager,t,r)<0})),v=Math.max(0,p-1);_classPrivateMethodGet(this,h,_addIdToAriaOwns2).call(this,i,d[v]);_classPrivateFieldGet(this,u).set(i,v)}}else _classPrivateFieldGet(this,c).set(t,r)}},{key:"moveElementInDOM",value:function moveElementInDOM(t,r,i,o){this.addPointerInTextLayer(i,o);if(t.hasChildNodes()){var l=Array.from(t.childNodes).filter((function(t){return t!==r}));if(0!==l.length){var u=i||r,c=(0,a.binarySearchFirstItem)(l,(function(t){return _classStaticPrivateMethodGet(TextAccessibilityManager,TextAccessibilityManager,_compareElementPositions).call(TextAccessibilityManager,u,t)<0}));0===c?l[0].before(r):l[c-1].after(r)}}else t.append(r)}}]);return TextAccessibilityManager}();r.TextAccessibilityManager=d;function _compareElementPositions(t,r){var i=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(0===i.width&&0===i.height)return 1;if(0===a.width&&0===a.height)return-1;var o=i.y,l=i.y+i.height,u=i.y+i.height/2,c=a.y,h=a.y+a.height,d=a.y+a.height/2;return u<=c&&d>=l?-1:d<=o&&u>=h?1:i.x+i.width/2-(a.x+a.width/2)}function _addIdToAriaOwns2(t,r){var i=r.getAttribute("aria-owns");null!=i&&i.includes(t)||r.setAttribute("aria-owns",i?"".concat(i," ").concat(t):t);r.removeAttribute("role")}},(t,r,i)=>{Object.defineProperty(r,"__esModule",{value:!0});r.default=void 0;i(98);i(120);i(88);i(1);i(42);i(92);i(95);i(179);i(187);i(195);i(196);i(182);i(197);i(327);i(192);i(185);i(222);i(206);i(219);i(126);i(135);i(136);i(138);i(338);i(225);i(232);i(233);i(234);i(235);i(142);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread2(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _objectWithoutProperties(t,r){if(null==t)return{};var i,a,o=function _objectWithoutPropertiesLoose(t,r){if(null==t)return{};var i,a,o={},l=Object.keys(t);for(a=0;a<l.length;a++){i=l[a];r.indexOf(i)>=0||(o[i]=t[i])}return o}(t,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++){i=l[a];r.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(o[i]=t[i])}}return o}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function canvasTest(t){var r,i,a=t.sizes.shift(),o=Math.max(Math.ceil(a[0]),1),l=Math.max(Math.ceil(a[1]),1),u=[o-1,l-1,1,1],c=Date.now(),h="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;if(h){r=new OffscreenCanvas(1,1);i=new OffscreenCanvas(o,l)}else{(r=document.createElement("canvas")).width=1;r.height=1;(i=document.createElement("canvas")).width=o;i.height=l}var d=r.getContext("2d"),p=i.getContext("2d");if(p){p.fillRect.apply(p,u);d.drawImage(i,o-1,l-1,1,1,0,0,1,1)}var v=d&&0!==d.getImageData(0,0,1,1).data[3],y=Date.now()-c;[r,i].forEach((function(t){t.height=0;t.width=0}));if(h){postMessage({width:o,height:l,benchmark:y,isTestPass:v});!v&&t.sizes.length&&canvasTest(t)}else if(v)t.onSuccess(o,l,y);else{t.onError(o,l,y);t.sizes.length&&canvasTest(t)}return v}var a=[16384,14188,11402,11180,10836,8192,4096,1],o=[8388607,65535,32767,16384,8192,4096,1],l=[4194303,65535,32767,16384,8192,4096,1],u=["onError","onSuccess"],c={max:null,min:1,sizes:[],step:1024,usePromise:!1,useWorker:!1,onError:Function.prototype,onSuccess:Function.prototype},h={};function createSizesArray(t){var r=t.width===t.height,i=1===t.height,a=1===t.width,o=[];if(t.width&&t.height)for(var l=t.min||c.min,u=t.step||c.step,h=Math.max(t.width,t.height);h>=l;){var d=r||i?h:1,p=r||a?h:1;o.push([d,p]);h-=u}else t.sizes.forEach((function(t){var l=r||i?t:1,u=r||a?t:1;o.push([l,u])}));return o}function handleMethod(t){var r=window&&"HTMLCanvasElement"in window,i=window&&"OffscreenCanvas"in window,a=Date.now(),o=t.onError,l=t.onSuccess,c=_objectWithoutProperties(t,u),d=null;if(!r)return!1;if(t.useWorker&&i){var p="\n            var canvasTest = ".concat(canvasTest.toString(),";\n            onmessage = function(e) {\n                canvasTest(e.data);\n            };\n        "),v=new Blob([p],{type:"application/javascript"}),y=URL.createObjectURL(v);d=new Worker(y);URL.revokeObjectURL(y);d.onmessage=function(t){var r=t.data,i=r.width,o=r.height,l=r.benchmark;if(r.isTestPass){h[a].onSuccess(i,o,l);delete h[a]}else h[a].onError(i,o,l)}}if(t.usePromise)return new Promise((function(r,i){var u=_objectSpread2(_objectSpread2({},t),{},{onError:function onError(r,a,l){var u;if(0===t.sizes.length)u=!0;else{var c=_slicedToArray(t.sizes.slice(-1),1),h=_slicedToArray(c[0],2),d=h[0],p=h[1];u=r===d&&a===p}o(r,a,l);u&&i({width:r,height:a,benchmark:l})},onSuccess:function onSuccess(t,i,a){l(t,i,a);r({width:t,height:i,benchmark:a})}});if(d){var p=u.onError,v=u.onSuccess;h[a]={onError:p,onSuccess:v};d.postMessage(c)}else canvasTest(u)}));if(!d)return canvasTest(t);h[a]={onError:o,onSuccess:l};d.postMessage(c)}var d={maxArea:function maxArea(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=createSizesArray({width:t.max,height:t.max,min:t.min,step:t.step,sizes:_toConsumableArray(a)});return handleMethod(_objectSpread2(_objectSpread2(_objectSpread2({},c),t),{},{sizes:r}))},maxHeight:function maxHeight(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=createSizesArray({width:1,height:t.max,min:t.min,step:t.step,sizes:_toConsumableArray(o)});return handleMethod(_objectSpread2(_objectSpread2(_objectSpread2({},c),t),{},{sizes:r}))},maxWidth:function maxWidth(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=createSizesArray({width:t.max,height:1,min:t.min,step:t.step,sizes:_toConsumableArray(l)});return handleMethod(_objectSpread2(_objectSpread2(_objectSpread2({},c),t),{},{sizes:r}))},test:function test(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=_objectSpread2(_objectSpread2({},c),t);r.sizes=_toConsumableArray(r.sizes);r.width&&r.height&&(r.sizes=[[r.width,r.height]]);return handleMethod(r)}};r.default=d},(t,r,i)=>{var a=i(67),o=i(4),l=i(103),u=i(24),c=TypeError,h=Object.defineProperty,d=o.self!==o;try{if(u){var p=Object.getOwnPropertyDescriptor(o,"self");!d&&p&&p.get&&p.enumerable||l(o,"self",{get:function self(){return o},set:function self(t){if(this!==o)throw c("Illegal invocation");h(o,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else a({global:!0,simple:!0,forced:d},{self:o})}catch(t){}},(t,r,i)=>{i(190);i(122);i(123);i(135);i(136);i(192);i(219);Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.RenderingIntentFlag=r.PromiseCapability=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.MAX_IMAGE_SIZE_TO_CACHE=r.LINE_FACTOR=r.LINE_DESCENT_FACTOR=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FeatureTest=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.BASELINE_FACTOR=r.AnnotationType=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationEditorType=r.AnnotationEditorPrefix=r.AnnotationEditorParamsType=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=bytesToString;r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(i&&"string"==typeof t){if(i.addDefaultProtocol&&t.startsWith("www.")){var a=t.match(/\./g);(null==a?void 0:a.length)>=2&&(t="http://".concat(t))}if(i.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var o=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){switch(null==t?void 0:t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":case"capacitor":return!0;default:return!1}}(o))return o}catch(t){}return null};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")].join("")};r.getUuid=function getUuid(){var t,r;if("undefined"!=typeof crypto&&"function"==typeof(null===(t=crypto)||void 0===t?void 0:t.randomUUID))return crypto.randomUUID();var i=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof(null===(r=crypto)||void 0===r?void 0:r.getRandomValues))crypto.getRandomValues(i);else for(var a=0;a<32;a++)i[a]=Math.floor(255*Math.random());return bytesToString(i)};r.getVerbosityLevel=function getVerbosityLevel(){return l};r.info=function info(t){l>=o.INFOS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Info: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Info: ".concat(t)):console.log("Info: ".concat(t)))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&void 0!==(null==t?void 0:t.byteLength)};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var i=0,a=t.length;i<a;i++)if(t[i]!==r[i])return!1;return!0};r.isNodeJS=void 0;r.normalizeUnicode=function normalizeUnicode(t){if(!E){E=/([\xA0\xB5\u037E\u0EB3\u2000-\u200A\u202F\u2126\uFB00-\uFB04\uFB06\uFB20-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBA1\uFBA4-\uFBA9\uFBAE-\uFBB1\uFBD3-\uFBDC\uFBDE-\uFBE7\uFBEA-\uFBF8\uFBFC\uFBFD\uFC00-\uFC5D\uFC64-\uFCF1\uFCF5-\uFD3D\uFD88\uFDF4\uFDFA\uFDFB\uFE71\uFE77\uFE79\uFE7B\uFE7D]+)|(\uFB05+)/g;x=new Map([["ſt","ſt"]])}return t.replaceAll(E,(function(t,r,i){return r?r.normalize("NFKC"):x.get(i)}))};r.objectFromMap=function objectFromMap(t){var r,i=Object.create(null),a=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}(t);try{for(a.s();!(r=a.n()).done;){var o=(c=r.value,h=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(c)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(c,h)||_unsupportedIterableToArray(c,h)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=o[0],u=o[1];i[l]=u}}catch(t){a.e(t)}finally{a.f()}var c,h;return i};r.objectSize=function objectSize(t){return Object.keys(t).length};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(l=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){if(t[0]>="ï"){var r;"þ"===t[0]&&"ÿ"===t[1]?r="utf-16be":"ÿ"===t[0]&&"þ"===t[1]?r="utf-16le":"ï"===t[0]&&"»"===t[1]&&"¿"===t[2]&&(r="utf-8");if(r)try{var i=new TextDecoder(r,{fatal:!0}),a=stringToBytes(t);return i.decode(a)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var o=[],l=0,u=t.length;l<u;l++){var c=P[t.charCodeAt(l)];o.push(c?String.fromCharCode(c):t.charAt(l))}return o.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;i(138);i(338);i(198);i(126);i(315);i(206);i(292);i(42);i(88);i(92);i(95);i(225);i(232);i(233);i(234);i(235);i(179);i(340);i(355);i(356);i(358);i(359);i(360);i(364);i(365);i(366);i(368);i(369);i(370);i(371);i(372);i(373);i(374);i(376);i(377);i(379);i(380);i(381);i(382);i(383);i(384);i(385);i(386);i(388);i(389);i(390);i(392);i(395);i(398);i(187);i(399);i(199);i(200);i(312);i(400);i(222);i(216);i(185);i(142);i(240);i(248);i(251);i(98);i(120);i(1);i(283);function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Object.defineProperty(t,"prototype",{writable:!1});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){t.__proto__=r;return t};return _setPrototypeOf(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(t);if(r){var o=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,o)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,i)}}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var a=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=a;r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.MAX_IMAGE_SIZE_TO_CACHE=1e7;r.LINE_FACTOR=1.35;r.LINE_DESCENT_FACTOR=.35;r.BASELINE_FACTOR=.25925925925925924;r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};r.AnnotationEditorPrefix="pdfjs_internal_editor_";r.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};r.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};var o={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=o;r.CMapCompressionType={NONE:0,BINARY:1};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var l=o.WARNINGS;function warn(t){l>=o.WARNINGS&&("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?console.log("Warning: ".concat(t)):Window&&globalThis.ngxConsole?globalThis.ngxConsole.log("Warning: ".concat(t)):console.log("Warning: ".concat(t)))}function unreachable(t){throw new Error(t)}function shadow(t,r,i){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object.defineProperty(t,r,{value:i,enumerable:!a,configurable:!0,writable:!1});return i}var u=function BaseExceptionClosure(){function BaseException(t,r){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=r}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=u;var c=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,i){var a;_classCallCheck(this,PasswordException);(a=r.call(this,t,"PasswordException")).code=i;return a}return _createClass(PasswordException)}(u);r.PasswordException=c;var h=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,i){var a;_classCallCheck(this,UnknownErrorException);(a=r.call(this,t,"UnknownErrorException")).details=i;return a}return _createClass(UnknownErrorException)}(u);r.UnknownErrorException=h;var d=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(t){_classCallCheck(this,InvalidPDFException);return r.call(this,t,"InvalidPDFException")}return _createClass(InvalidPDFException)}(u);r.InvalidPDFException=d;var p=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(t){_classCallCheck(this,MissingPDFException);return r.call(this,t,"MissingPDFException")}return _createClass(MissingPDFException)}(u);r.MissingPDFException=p;var v=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,i){var a;_classCallCheck(this,UnexpectedResponseException);(a=r.call(this,t,"UnexpectedResponseException")).status=i;return a}return _createClass(UnexpectedResponseException)}(u);r.UnexpectedResponseException=v;var y=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(t){_classCallCheck(this,FormatError);return r.call(this,t,"FormatError")}return _createClass(FormatError)}(u);r.FormatError=y;var g=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(t){_classCallCheck(this,AbortException);return r.call(this,t,"AbortException")}return _createClass(AbortException)}(u);r.AbortException=g;function bytesToString(t){"object"===_typeof(t)&&void 0!==(null==t?void 0:t.length)||unreachable("Invalid argument for bytesToString");var r=t.length,i=8192;if(r<i)return String.fromCharCode.apply(null,t);for(var a=[],o=0;o<r;o+=i){var l=Math.min(o+i,r),u=t.subarray(o,l);a.push(String.fromCharCode.apply(null,u))}return a.join("")}function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,i=new Uint8Array(r),a=0;a<r;++a)i[a]=255&t.charCodeAt(a);return i}var m=function(){function FeatureTest(){_classCallCheck(this,FeatureTest)}_createClass(FeatureTest,null,[{key:"isLittleEndian",get:function get(){return shadow(this,"isLittleEndian",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}},{key:"isEvalSupported",get:function get(){return shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}},{key:"isOffscreenCanvasSupported",get:function get(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}},{key:"platform",get:function get(){return"undefined"==typeof navigator?shadow(this,"platform",{isWin:!1,isMac:!1}):shadow(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}},{key:"isCSSRoundSupported",get:function get(){var t,r;return shadow(this,"isCSSRoundSupported",null===(t=globalThis.CSS)||void 0===t||null===(r=t.supports)||void 0===r?void 0:r.call(t,"width: round(1.5px, 1px)"))}}]);return FeatureTest}();r.FeatureTest=m;var b=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),w=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,i){return"#".concat(b[t]).concat(b[r]).concat(b[i])}},{key:"scaleMinMax",value:function scaleMinMax(t,r){var i;if(t[0]){if(t[0]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[0];r[1]*=t[0];if(t[3]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[3];r[3]*=t[3]}else{i=r[0];r[0]=r[2];r[2]=i;i=r[1];r[1]=r[3];r[3]=i;if(t[1]<0){i=r[2];r[2]=r[3];r[3]=i}r[2]*=t[1];r[3]*=t[1];if(t[2]<0){i=r[0];r[0]=r[1];r[1]=i}r[0]*=t[2];r[1]*=t[2]}r[0]+=t[4];r[1]+=t[4];r[2]+=t[5];r[3]+=t[5]}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var i=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/i,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/i]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var i=this.applyTransform(t,r),a=this.applyTransform(t.slice(2,4),r),o=this.applyTransform([t[0],t[3]],r),l=this.applyTransform([t[2],t[1]],r);return[Math.min(i[0],a[0],o[0],l[0]),Math.min(i[1],a[1],o[1],l[1]),Math.max(i[0],a[0],o[0],l[0]),Math.max(i[1],a[1],o[1],l[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],i=t[0]*r[0]+t[1]*r[2],a=t[0]*r[1]+t[1]*r[3],o=t[2]*r[0]+t[3]*r[2],l=t[2]*r[1]+t[3]*r[3],u=(i+l)/2,c=Math.sqrt(Math.pow(i+l,2)-4*(i*l-o*a))/2,h=u+c||1,d=u-c||1;return[Math.sqrt(h),Math.sqrt(d)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){var i=Math.max(Math.min(t[0],t[2]),Math.min(r[0],r[2])),a=Math.min(Math.max(t[0],t[2]),Math.max(r[0],r[2]));if(i>a)return null;var o=Math.max(Math.min(t[1],t[3]),Math.min(r[1],r[3])),l=Math.min(Math.max(t[1],t[3]),Math.max(r[1],r[3]));return o>l?null:[i,o,a,l]}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,i,a,o,l,u,c){for(var h,d,p,v,y,g,m,b,w=[],P=[[],[]],A=0;A<2;++A){if(0===A){d=6*t-12*i+6*o;h=-3*t+9*i-9*o+3*u;p=3*i-3*t}else{d=6*r-12*a+6*l;h=-3*r+9*a-9*l+3*c;p=3*a-3*r}if(Math.abs(h)<1e-12){if(Math.abs(d)<1e-12)continue;0<(v=-p/d)&&v<1&&w.push(v)}else{m=d*d-4*p*h;b=Math.sqrt(m);if(!(m<0)){0<(y=(-d+b)/(2*h))&&y<1&&w.push(y);0<(g=(-d-b)/(2*h))&&g<1&&w.push(g)}}}for(var S,E=w.length,x=E;E--;){S=1-(v=w[E]);P[0][E]=S*S*S*t+3*S*S*v*i+3*S*v*v*o+v*v*v*u;P[1][E]=S*S*S*r+3*S*S*v*a+3*S*v*v*l+v*v*v*c}P[0][x]=t;P[1][x]=r;P[0][x+1]=u;P[1][x+1]=c;P[0].length=P[1].length=x+2;return[Math.min.apply(Math,_toConsumableArray(P[0])),Math.min.apply(Math,_toConsumableArray(P[1])),Math.max.apply(Math,_toConsumableArray(P[0])),Math.max.apply(Math,_toConsumableArray(P[1]))]}}]);return Util}();r.Util=w;var P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToUTF8String(t){return decodeURIComponent(escape(t))}var A=new WeakMap,S=function(){function PromiseCapability(){var t=this;_classCallCheck(this,PromiseCapability);_classPrivateFieldInitSpec(this,A,{writable:!0,value:!1});this.promise=new Promise((function(r,i){t.resolve=function(i){_classPrivateFieldSet(t,A,!0);r(i)};t.reject=function(r){_classPrivateFieldSet(t,A,!0);i(r)}}))}_createClass(PromiseCapability,[{key:"settled",get:function get(){return function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,A)}}]);return PromiseCapability}();r.PromiseCapability=S;var E=null,x=null},(t,r,i)=>{i(341)("Uint8",(function(t){return function Uint8Array(r,i,a){return t(this,r,i,a)}}))},(t,r,i)=>{var a=i(67),o=i(4),l=i(34),u=i(24),c=i(342),h=i(343),d=i(345),p=i(146),v=i(65),y=i(64),g=i(348),m=i(56),b=i(346),w=i(349),P=i(351),A=i(32),S=i(5),E=i(91),x=i(27),D=i(35),k=i(47),C=i(37),T=i(84),I=i(76).f,O=i(352),M=i(105).forEach,L=i(145),R=i(103),G=i(23),B=i(68),j=i(62),N=i(129),W=j.get,V=j.set,U=j.enforce,H=G.f,z=B.f,q=o.RangeError,Y=d.ArrayBuffer,K=Y.prototype,X=d.DataView,$=h.NATIVE_ARRAY_BUFFER_VIEWS,Q=h.TYPED_ARRAY_TAG,J=h.TypedArray,Z=h.TypedArrayPrototype,ee=h.aTypedArrayConstructor,te=h.isTypedArray,re="BYTES_PER_ELEMENT",ne="Wrong length",fromList=function(t,r){ee(t);for(var i=0,a=r.length,o=new t(a);a>i;)o[i]=r[i++];return o},addGetter=function(t,r){R(t,r,{configurable:!0,get:function(){return W(this)[r]}})},isArrayBuffer=function(t){var r;return C(K,t)||"ArrayBuffer"===(r=E(t))||"SharedArrayBuffer"===r},isTypedArrayIndex=function(t,r){return te(t)&&!D(r)&&r in t&&g(+r)&&r>=0},ie=function getOwnPropertyDescriptor(t,r){r=A(r);return isTypedArrayIndex(t,r)?v(2,t[r]):z(t,r)},ae=function defineProperty(t,r,i){r=A(r);if(isTypedArrayIndex(t,r)&&x(i)&&S(i,"value")&&!S(i,"get")&&!S(i,"set")&&!i.configurable&&(!S(i,"writable")||i.writable)&&(!S(i,"enumerable")||i.enumerable)){t[r]=i.value;return t}return H(t,r,i)};if(u){if(!$){B.f=ie;G.f=ae;addGetter(Z,"buffer");addGetter(Z,"byteOffset");addGetter(Z,"byteLength");addGetter(Z,"length")}a({target:"Object",stat:!0,forced:!$},{getOwnPropertyDescriptor:ie,defineProperty:ae});t.exports=function(t,r,i){var u=t.match(/\d+/)[0]/8,h=t+(i?"Clamped":"")+"Array",d="get"+t,v="set"+t,g=o[h],A=g,S=A&&A.prototype,E={},addElement=function(t,r){H(t,r,{get:function(){return function(t,r){var i=W(t);return i.view[d](r*u+i.byteOffset,!0)}(this,r)},set:function(t){return function(t,r,a){var o=W(t);o.view[v](r*u+o.byteOffset,i?P(a):a,!0)}(this,r,t)},enumerable:!0})};if($){if(c){A=r((function(t,r,i,a){p(t,S);return N(x(r)?isArrayBuffer(r)?void 0!==a?new g(r,w(i,u),a):void 0!==i?new g(r,w(i,u)):new g(r):te(r)?fromList(A,r):l(O,A,r):new g(b(r)),t,A)}));T&&T(A,J);M(I(g),(function(t){t in A||y(A,t,g[t])}));A.prototype=S}}else{A=r((function(t,r,i,a){p(t,S);var o,c,h,d=0,v=0;if(x(r)){if(!isArrayBuffer(r))return te(r)?fromList(A,r):l(O,A,r);o=r;v=w(i,u);var y=r.byteLength;if(void 0===a){if(y%u)throw q(ne);if((c=y-v)<0)throw q(ne)}else if((c=m(a)*u)+v>y)throw q(ne);h=c/u}else{h=b(r);o=new Y(c=h*u)}V(t,{buffer:o,byteOffset:v,byteLength:c,length:h,view:new X(o)});for(;d<h;)addElement(t,d++)}));T&&T(A,J);S=A.prototype=k(Z)}S.constructor!==A&&y(S,"constructor",A);U(S).TypedArrayConstructor=A;Q&&y(S,Q,h);var D=A!==g;E[h]=A;a({global:!0,constructor:!0,forced:D,sham:!$},E);re in A||y(A,re,u);re in S||y(S,re,u);L(h)}}else t.exports=function(){}},(t,r,i)=>{var a=i(4),o=i(8),l=i(169),u=i(343).NATIVE_ARRAY_BUFFER_VIEWS,c=a.ArrayBuffer,h=a.Int8Array;t.exports=!u||!o((function(){h(1)}))||!o((function(){new h(-1)}))||!l((function(t){new h;new h(null);new h(1.5);new h(t)}),!0)||o((function(){return 1!==new h(new c(2),1,void 0).length}))},(t,r,i)=>{var a,o,l,u=i(344),c=i(24),h=i(4),d=i(28),p=i(27),v=i(5),y=i(91),g=i(40),m=i(64),b=i(70),w=i(103),P=i(37),A=i(81),S=i(84),E=i(13),x=i(18),D=i(62),k=D.enforce,C=D.get,T=h.Int8Array,I=T&&T.prototype,O=h.Uint8ClampedArray,M=O&&O.prototype,L=T&&A(T),R=I&&A(I),G=Object.prototype,B=h.TypeError,j=E("toStringTag"),N=x("TYPED_ARRAY_TAG"),W="TypedArrayConstructor",V=u&&!!S&&"Opera"!==y(h.opera),U=!1,H={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},getTypedArrayConstructor=function(t){var r=A(t);if(p(r)){var i=C(r);return i&&v(i,W)?i[W]:getTypedArrayConstructor(r)}},isTypedArray=function(t){if(!p(t))return!1;var r=y(t);return v(H,r)||v(z,r)};for(a in H)(l=(o=h[a])&&o.prototype)?k(l)[W]=o:V=!1;for(a in z)(l=(o=h[a])&&o.prototype)&&(k(l)[W]=o);if(!V||!d(L)||L===Function.prototype){L=function TypedArray(){throw B("Incorrect invocation")};if(V)for(a in H)h[a]&&S(h[a],L)}if(!V||!R||R===G){R=L.prototype;if(V)for(a in H)h[a]&&S(h[a].prototype,R)}V&&A(M)!==R&&S(M,R);if(c&&!v(R,j)){U=!0;w(R,j,{configurable:!0,get:function(){return p(this)?this[N]:void 0}});for(a in H)h[a]&&m(h[a],N,a)}t.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:U&&N,aTypedArray:function(t){if(isTypedArray(t))return t;throw B("Target is not a typed array")},aTypedArrayConstructor:function(t){if(d(t)&&(!S||P(L,t)))return t;throw B(g(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,i,a){if(c){if(i)for(var o in H){var l=h[o];if(l&&v(l.prototype,t))try{delete l.prototype[t]}catch(i){try{l.prototype[t]=r}catch(t){}}}R[t]&&!i||b(R,t,i?r:V&&I[t]||r,a)}},exportTypedArrayStaticMethod:function(t,r,i){var a,o;if(c){if(S){if(i)for(a in H)if((o=h[a])&&v(o,t))try{delete o[t]}catch(t){}if(L[t]&&!i)return;try{return b(L,t,i?r:V&&L[t]||r)}catch(t){}}for(a in H)!(o=h[a])||o[t]&&!i||b(o,t,r)}},getTypedArrayConstructor:getTypedArrayConstructor,isView:function isView(t){if(!p(t))return!1;var r=y(t);return"DataView"===r||v(H,r)||v(z,r)},isTypedArray:isTypedArray,TypedArray:L,TypedArrayPrototype:R}},t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(t,r,i)=>{var a=i(4),o=i(6),l=i(24),u=i(344),c=i(72),h=i(64),d=i(103),p=i(230),v=i(8),y=i(146),g=i(53),m=i(56),b=i(346),w=i(347),P=i(81),A=i(84),S=i(76).f,E=i(331),x=i(101),D=i(83),k=i(62),C=c.PROPER,T=c.CONFIGURABLE,I="ArrayBuffer",O="DataView",M="prototype",L="Wrong index",R=k.getterFor(I),G=k.getterFor(O),B=k.set,j=a[I],N=j,W=N&&N[M],V=a[O],U=V&&V[M],H=Object.prototype,z=a.Array,q=a.RangeError,Y=o(E),K=o([].reverse),X=w.pack,$=w.unpack,packInt8=function(t){return[255&t]},packInt16=function(t){return[255&t,t>>8&255]},packInt32=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},unpackInt32=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},packFloat32=function(t){return X(t,23,4)},packFloat64=function(t){return X(t,52,8)},addGetter=function(t,r,i){d(t[M],r,{configurable:!0,get:function(){return i(this)[r]}})},get=function(t,r,i,a){var o=G(t),l=b(i),u=!!a;if(l+r>o.byteLength)throw q(L);var c=o.bytes,h=l+o.byteOffset,d=x(c,h,h+r);return u?d:K(d)},set=function(t,r,i,a,o,l){var u=G(t),c=b(i),h=a(+o),d=!!l;if(c+r>u.byteLength)throw q(L);for(var p=u.bytes,v=c+u.byteOffset,y=0;y<r;y++)p[v+y]=h[d?y:r-y-1]};if(u){var Q=C&&j.name!==I;if(v((function(){j(1)}))&&v((function(){new j(-1)}))&&!v((function(){new j;new j(1.5);new j(NaN);return 1!==j.length||Q&&!T})))Q&&T&&h(j,"name",I);else{(N=function ArrayBuffer(t){y(this,W);return new j(b(t))})[M]=W;for(var J,Z=S(j),ee=0;Z.length>ee;)(J=Z[ee++])in N||h(N,J,j[J]);W.constructor=N}A&&P(U)!==H&&A(U,H);var te=new V(new N(2)),re=o(U.setInt8);te.setInt8(0,2147483648);te.setInt8(1,2147483649);!te.getInt8(0)&&te.getInt8(1)||p(U,{setInt8:function setInt8(t,r){re(this,t,r<<24>>24)},setUint8:function setUint8(t,r){re(this,t,r<<24>>24)}},{unsafe:!0})}else{W=(N=function ArrayBuffer(t){y(this,W);var r=b(t);B(this,{type:I,bytes:Y(z(r),0),byteLength:r});if(!l){this.byteLength=r;this.detached=!1}})[M];U=(V=function DataView(t,r,i){y(this,U);y(t,W);var a=R(t),o=a.byteLength,u=g(r);if(u<0||u>o)throw q("Wrong offset");if(u+(i=void 0===i?o-u:m(i))>o)throw q("Wrong length");B(this,{type:O,buffer:t,byteLength:i,byteOffset:u,bytes:a.bytes});if(!l){this.buffer=t;this.byteLength=i;this.byteOffset=u}})[M];if(l){addGetter(N,"byteLength",R);addGetter(V,"buffer",G);addGetter(V,"byteLength",G);addGetter(V,"byteOffset",G)}p(U,{getInt8:function getInt8(t){return get(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return get(this,1,t)[0]},getInt16:function getInt16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=get(this,2,t,arguments.length>1&&arguments[1]);return r[1]<<8|r[0]},getInt32:function getInt32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function getUint32(t){return unpackInt32(get(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function getFloat32(t){return $(get(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function getFloat64(t){return $(get(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function setInt8(t,r){set(this,1,t,packInt8,r)},setUint8:function setUint8(t,r){set(this,1,t,packInt8,r)},setInt16:function setInt16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setUint16:function setUint16(t,r){set(this,2,t,packInt16,r,arguments.length>2&&arguments[2])},setInt32:function setInt32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setUint32:function setUint32(t,r){set(this,4,t,packInt32,r,arguments.length>2&&arguments[2])},setFloat32:function setFloat32(t,r){set(this,4,t,packFloat32,r,arguments.length>2&&arguments[2])},setFloat64:function setFloat64(t,r){set(this,8,t,packFloat64,r,arguments.length>2&&arguments[2])}})}D(N,I);D(V,O);t.exports={ArrayBuffer:N,DataView:V}},(t,r,i)=>{var a=i(53),o=i(56),l=RangeError;t.exports=function(t){if(void 0===t)return 0;var r=a(t),i=o(r);if(r!==i)throw l("Wrong length or index");return i}},(t,r,i)=>{var a=i(237),o=i(54),l=Array,u=Math.abs,c=Math.pow,h=Math.floor,d=Math.log,p=Math.LN2,roundToEven=function(t){var r=o(t),i=u(t-r);return i>.5||.5===i&&r%2!=0?r+a(t):r};t.exports={pack:function(t,r,i){var a,o,v,y=l(i),g=8*i-r-1,m=(1<<g)-1,b=m>>1,w=23===r?c(2,-24)-c(2,-77):0,P=t<0||0===t&&1/t<0?1:0,A=0;if((t=u(t))!=t||t===1/0){o=t!=t?1:0;a=m}else{a=h(d(t)/p);if(t*(v=c(2,-a))<1){a--;v*=2}if((t+=a+b>=1?w/v:w*c(2,1-b))*v>=2){a++;v/=2}if(a+b>=m){o=0;a=m}else if(a+b>=1){o=roundToEven((t*v-1)*c(2,r));a+=b}else{o=roundToEven(t*c(2,b-1)*c(2,r));a=0}}for(;r>=8;){y[A++]=255&o;o/=256;r-=8}a=a<<r|o;g+=r;for(;g>0;){y[A++]=255&a;a/=256;g-=8}y[--A]|=128*P;return y},unpack:function(t,r){var i,a=t.length,o=8*a-r-1,l=(1<<o)-1,u=l>>1,h=o-7,d=a-1,p=t[d--],v=127&p;p>>=7;for(;h>0;){v=256*v+t[d--];h-=8}i=v&(1<<-h)-1;v>>=-h;h+=r;for(;h>0;){i=256*i+t[d--];h-=8}if(0===v)v=1-u;else{if(v===l)return i?NaN:p?-1/0:1/0;i+=c(2,r);v-=u}return(p?-1:1)*i*c(2,v-r)}}},(t,r,i)=>{var a=i(27),o=Math.floor;t.exports=Number.isInteger||function isInteger(t){return!a(t)&&isFinite(t)&&o(t)===t}},(t,r,i)=>{var a=i(350),o=RangeError;t.exports=function(t,r){var i=a(t);if(i%r)throw o("Wrong offset");return i}},(t,r,i)=>{var a=i(53),o=RangeError;t.exports=function(t){var r=a(t);if(r<0)throw o("The argument can't be less than 0");return r}},t=>{var r=Math.round;t.exports=function(t){var i=r(t);return i<0?0:i>255?255:255&i}},(t,r,i)=>{var a=i(106),o=i(34),l=i(125),u=i(9),c=i(55),h=i(165),d=i(166),p=i(164),v=i(353),y=i(343).aTypedArrayConstructor,g=i(354);t.exports=function from(t){var r,i,m,b,w,P,A,S,E=l(this),x=u(t),D=arguments.length,k=D>1?arguments[1]:void 0,C=void 0!==k,T=d(x);if(T&&!p(T)){S=(A=h(x,T)).next;x=[];for(;!(P=o(S,A)).done;)x.push(P.value)}C&&D>2&&(k=a(k,arguments[2]));i=c(x);m=new(y(E))(i);b=v(m);for(r=0;i>r;r++){w=C?k(x[r],r):x[r];m[r]=b?g(w):+w}return m}},(t,r,i)=>{var a=i(91);t.exports=function(t){var r=a(t);return"BigInt64Array"===r||"BigUint64Array"===r}},(t,r,i)=>{var a=i(33),o=TypeError;t.exports=function(t){var r=a(t,"number");if("number"==typeof r)throw o("Can't convert number to bigint");return BigInt(r)}},(t,r,i)=>{var a=i(343),o=i(55),l=i(53),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("at",(function at(t){var r=u(this),i=o(r),a=l(t),c=a>=0?a:i+a;return c<0||c>=i?void 0:r[c]}))},(t,r,i)=>{var a=i(6),o=i(343),l=a(i(357)),u=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function copyWithin(t,r){return l(u(this),t,r,arguments.length>2?arguments[2]:void 0)}))},(t,r,i)=>{var a=i(9),o=i(52),l=i(55),u=i(279),c=Math.min;t.exports=[].copyWithin||function copyWithin(t,r){var i=a(this),h=l(i),d=o(t,h),p=o(r,h),v=arguments.length>2?arguments[2]:void 0,y=c((void 0===v?h:o(v,h))-p,h-d),g=1;if(p<d&&d<p+y){g=-1;p+=y-1;d+=y-1}for(;y-- >0;){p in i?i[d]=i[p]:u(i,d);d+=g;p+=g}return i}},(t,r,i)=>{var a=i(343),o=i(105).every,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("every",(function every(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=i(331),l=i(354),u=i(91),c=i(34),h=i(6),d=i(8),p=a.aTypedArray,v=a.exportTypedArrayMethod,y=h("".slice);v("fill",(function fill(t){var r=arguments.length;p(this);var i="Big"===y(u(this),0,3)?l(t):+t;return c(o,this,i,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),d((function(){var t=0;new Int8Array(2).fill({valueOf:function(){return t++}});return 1!==t})))},(t,r,i)=>{var a=i(343),o=i(105).filter,l=i(361),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("filter",(function filter(t){var r=o(u(this),t,arguments.length>1?arguments[1]:void 0);return l(this,r)}))},(t,r,i)=>{var a=i(362),o=i(363);t.exports=function(t,r){return a(o(t),r)}},(t,r,i)=>{var a=i(55);t.exports=function(t,r){for(var i=0,o=a(r),l=new t(o);o>i;)l[i]=r[i++];return l}},(t,r,i)=>{var a=i(343),o=i(147),l=a.aTypedArrayConstructor,u=a.getTypedArrayConstructor;t.exports=function(t){return l(o(t,u(t)))}},(t,r,i)=>{var a=i(343),o=i(105).find,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("find",(function find(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=i(105).findIndex,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("findIndex",(function findIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=i(367).findLast,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("findLast",(function findLast(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(106),o=i(44),l=i(9),u=i(55),createMethod=function(t){var r=1===t;return function(i,c,h){for(var d,p=l(i),v=o(p),y=a(c,h),g=u(v);g-- >0;)if(y(d=v[g],g,p))switch(t){case 0:return d;case 1:return g}return r?-1:void 0}};t.exports={findLast:createMethod(0),findLastIndex:createMethod(1)}},(t,r,i)=>{var a=i(343),o=i(367).findLastIndex,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("findLastIndex",(function findLastIndex(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=i(105).forEach,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("forEach",(function forEach(t){o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=i(51).includes,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("includes",(function includes(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=i(51).indexOf,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("indexOf",(function indexOf(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(4),o=i(8),l=i(6),u=i(343),c=i(42),h=i(13)("iterator"),d=a.Uint8Array,p=l(c.values),v=l(c.keys),y=l(c.entries),g=u.aTypedArray,m=u.exportTypedArrayMethod,b=d&&d.prototype,w=!o((function(){b[h].call([1])})),P=!!b&&b.values&&b[h]===b.values&&"values"===b.values.name,A=function values(){return p(g(this))};m("entries",(function entries(){return y(g(this))}),w);m("keys",(function keys(){return v(g(this))}),w);m("values",A,w||!P,{name:"values"});m(h,A,w||!P,{name:"values"})},(t,r,i)=>{var a=i(343),o=i(6),l=a.aTypedArray,u=a.exportTypedArrayMethod,c=o([].join);u("join",(function join(t){return c(l(this),t)}))},(t,r,i)=>{var a=i(343),o=i(116),l=i(375),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("lastIndexOf",(function lastIndexOf(t){var r=arguments.length;return o(l,u(this),r>1?[t,arguments[1]]:[t])}))},(t,r,i)=>{var a=i(116),o=i(43),l=i(53),u=i(55),c=i(184),h=Math.min,d=[].lastIndexOf,p=!!d&&1/[1].lastIndexOf(1,-0)<0,v=c("lastIndexOf"),y=p||!v;t.exports=y?function lastIndexOf(t){if(p)return a(d,this,arguments)||0;var r=o(this),i=u(r),c=i-1;arguments.length>1&&(c=h(c,l(arguments[1])));c<0&&(c=i+c);for(;c>=0;c--)if(c in r&&r[c]===t)return c||0;return-1}:d},(t,r,i)=>{var a=i(343),o=i(105).map,l=i(363),u=a.aTypedArray;(0,a.exportTypedArrayMethod)("map",(function map(t){return o(u(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(l(t))(r)}))}))},(t,r,i)=>{var a=i(343),o=i(378).left,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("reduce",(function reduce(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(39),o=i(9),l=i(44),u=i(55),c=TypeError,createMethod=function(t){return function(r,i,h,d){a(i);var p=o(r),v=l(p),y=u(p),g=t?y-1:0,m=t?-1:1;if(h<2)for(;;){if(g in v){d=v[g];g+=m;break}g+=m;if(t?g<0:y<=g)throw c("Reduce of empty array with no initial value")}for(;t?g>=0:y>g;g+=m)g in v&&(d=i(d,v[g],g,p));return d}};t.exports={left:createMethod(!1),right:createMethod(!0)}},(t,r,i)=>{var a=i(343),o=i(378).right,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("reduceRight",(function reduceRight(t){var r=arguments.length;return o(l(this),t,r,r>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(343),o=a.aTypedArray,l=a.exportTypedArrayMethod,u=Math.floor;l("reverse",(function reverse(){for(var t,r=this,i=o(r).length,a=u(i/2),l=0;l<a;){t=r[l];r[l++]=r[--i];r[i]=t}return r}))},(t,r,i)=>{var a=i(4),o=i(34),l=i(343),u=i(55),c=i(349),h=i(9),d=i(8),p=a.RangeError,v=a.Int8Array,y=v&&v.prototype,g=y&&y.set,m=l.aTypedArray,b=l.exportTypedArrayMethod,w=!d((function(){var t=new Uint8ClampedArray(2);o(g,t,{length:1,0:3},1);return 3!==t[1]})),P=w&&l.NATIVE_ARRAY_BUFFER_VIEWS&&d((function(){var t=new v(2);t.set(1);t.set("2",1);return 0!==t[0]||2!==t[1]}));b("set",(function set(t){m(this);var r=c(arguments.length>1?arguments[1]:void 0,1),i=h(t);if(w)return o(g,this,i,r);var a=this.length,l=u(i),d=0;if(l+r>a)throw p("Wrong length");for(;d<l;)this[r+d]=i[d++]}),!w||P)},(t,r,i)=>{var a=i(343),o=i(363),l=i(8),u=i(117),c=a.aTypedArray;(0,a.exportTypedArrayMethod)("slice",(function slice(t,r){for(var i=u(c(this),t,r),a=o(this),l=0,h=i.length,d=new a(h);h>l;)d[l]=i[l++];return d}),l((function(){new Int8Array(1).slice()})))},(t,r,i)=>{var a=i(343),o=i(105).some,l=a.aTypedArray;(0,a.exportTypedArrayMethod)("some",(function some(t){return o(l(this),t,arguments.length>1?arguments[1]:void 0)}))},(t,r,i)=>{var a=i(4),o=i(107),l=i(8),u=i(39),c=i(231),h=i(343),d=i(280),p=i(281),v=i(20),y=i(282),g=h.aTypedArray,m=h.exportTypedArrayMethod,b=a.Uint16Array,w=b&&o(b.prototype.sort),P=!(!w||l((function(){w(new b(2),null)}))&&l((function(){w(new b(2),{})}))),A=!!w&&!l((function(){if(v)return v<74;if(d)return d<67;if(p)return!0;if(y)return y<602;var t,r,i=new b(516),a=Array(516);for(t=0;t<516;t++){r=t%4;i[t]=515-t;a[t]=t-2*r+3}w(i,(function(t,r){return(t/4|0)-(r/4|0)}));for(t=0;t<516;t++)if(i[t]!==a[t])return!0}));m("sort",(function sort(t){void 0!==t&&u(t);return A?w(this,t):c(g(this),function(t){return function(r,i){return void 0!==t?+t(r,i)||0:i!=i?-1:r!=r?1:0===r&&0===i?1/r>0&&1/i<0?1:-1:r>i}}(t))}),!A||P)},(t,r,i)=>{var a=i(4),o=i(116),l=i(343),u=i(8),c=i(117),h=a.Int8Array,d=l.aTypedArray,p=l.exportTypedArrayMethod,v=[].toLocaleString,y=!!h&&u((function(){v.call(new h(1))}));p("toLocaleString",(function toLocaleString(){return o(v,y?c(d(this)):d(this),c(arguments))}),u((function(){return[1,2].toLocaleString()!==new h([1,2]).toLocaleString()}))||!u((function(){h.prototype.toLocaleString.call([1,2])})))},(t,r,i)=>{var a=i(387),o=i(343),l=o.aTypedArray,u=o.exportTypedArrayMethod,c=o.getTypedArrayConstructor;u("toReversed",(function toReversed(){return a(l(this),c(this))}))},(t,r,i)=>{var a=i(55);t.exports=function(t,r){for(var i=a(t),o=new r(i),l=0;l<i;l++)o[l]=t[i-l-1];return o}},(t,r,i)=>{var a=i(343),o=i(6),l=i(39),u=i(362),c=a.aTypedArray,h=a.getTypedArrayConstructor,d=a.exportTypedArrayMethod,p=o(a.TypedArrayPrototype.sort);d("toSorted",(function toSorted(t){void 0!==t&&l(t);var r=c(this),i=u(h(r),r);return p(i,t)}))},(t,r,i)=>{var a=i(343).exportTypedArrayMethod,o=i(8),l=i(4),u=i(6),c=l.Uint8Array,h=c&&c.prototype||{},d=[].toString,p=u([].join);o((function(){d.call({})}))&&(d=function toString(){return p(this)});var v=h.toString!==d;a("toString",d,v)},(t,r,i)=>{var a=i(391),o=i(343),l=i(353),u=i(53),c=i(354),h=o.aTypedArray,d=o.getTypedArrayConstructor,p=o.exportTypedArrayMethod,v=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,r){var i=h(this),o=u(t),p=l(i)?c(r):+r;return a(i,d(i),o,p)}}.with,!v)},(t,r,i)=>{var a=i(55),o=i(53),l=RangeError;t.exports=function(t,r,i,u){var c=a(t),h=o(i),d=h<0?c+h:h;if(d>=c||d<0)throw l("Incorrect index");for(var p=new r(c),v=0;v<c;v++)p[v]=v===d?u:t[v];return p}},(t,r,i)=>{var a=i(24),o=i(103),l=i(393),u=ArrayBuffer.prototype;a&&!("detached"in u)&&o(u,"detached",{configurable:!0,get:function detached(){return l(this)}})},(t,r,i)=>{var a=i(6),o=i(394),l=a(ArrayBuffer.prototype.slice);t.exports=function(t){if(0!==o(t))return!1;try{l(t,0,0);return!1}catch(t){return!0}}},(t,r,i)=>{var a=i(85),o=i(45),l=TypeError;t.exports=a(ArrayBuffer.prototype,"byteLength","get")||function(t){if("ArrayBuffer"!==o(t))throw l("ArrayBuffer expected");return t.byteLength}},(t,r,i)=>{var a=i(67),o=i(396);o&&a({target:"ArrayBuffer",proto:!0},{transfer:function transfer(){return o(this,arguments.length?arguments[0]:void 0,!0)}})},(t,r,i)=>{var a=i(4),o=i(6),l=i(85),u=i(346),c=i(393),h=i(394),d=i(397),p=a.TypeError,v=a.structuredClone,y=a.ArrayBuffer,g=a.DataView,m=Math.min,b=y.prototype,w=g.prototype,P=o(b.slice),A=l(b,"resizable","get"),S=l(b,"maxByteLength","get"),E=o(w.getInt8),x=o(w.setInt8);t.exports=d&&function(t,r,i){var a=h(t),o=void 0===r?a:u(r),l=!A||!A(t);if(c(t))throw p("ArrayBuffer is detached");var d=v(t,{transfer:[t]});if(a===o&&(i||l))return d;if(a>=o&&(!i||l))return P(d,0,o);for(var b=i&&!l&&S?{maxByteLength:S(d)}:void 0,w=new y(o,b),D=new g(d),k=new g(w),C=m(o,a),T=0;T<C;T++)x(k,T,E(D,T));return w}},(t,r,i)=>{var a=i(4),o=i(8),l=i(20),u=i(159),c=i(160),h=i(144),d=a.structuredClone;t.exports=!!d&&!o((function(){if(c&&l>92||h&&l>94||u&&l>97)return!1;var t=new ArrayBuffer(8),r=d(t,{transfer:[t]});return 0!==t.byteLength||8!==r.byteLength}))},(t,r,i)=>{var a=i(67),o=i(396);o&&a({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function transferToFixedLength(){return o(this,arguments.length?arguments[0]:void 0,!1)}})},(t,r,i)=>{i(341)("Uint32",(function(t){return function Uint32Array(r,i,a){return t(this,r,i,a)}}))},(t,r,i)=>{var a=i(67),o=i(401).start;a({target:"String",proto:!0,forced:i(403)},{padStart:function padStart(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},(t,r,i)=>{var a=i(6),o=i(56),l=i(94),u=i(402),c=i(10),h=a(u),d=a("".slice),p=Math.ceil,createMethod=function(t){return function(r,i,a){var u,v,y=l(c(r)),g=o(i),m=y.length,b=void 0===a?" ":l(a);if(g<=m||""===b)return y;(v=h(b,p((u=g-m)/b.length))).length>u&&(v=d(v,0,u));return t?y+v:v+y}};t.exports={start:createMethod(!1),end:createMethod(!0)}},(t,r,i)=>{var a=i(53),o=i(94),l=i(10),u=RangeError;t.exports=function repeat(t){var r=o(l(this)),i="",c=a(t);if(c<0||c===1/0)throw u("Wrong number of repetitions");for(;c>0;(c>>>=1)&&(r+=r))1&c&&(i+=r);return i}},(t,r,i)=>{var a=i(21);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(a)},(t,r,i)=>{i(185);i(222);i(192);i(92);i(206);i(219);i(1);i(42);i(95);Object.defineProperty(r,"__esModule",{value:!0});r.TextHighlighter=void 0;i(126);i(198);i(179);i(199);i(200);i(135);i(136);i(98);i(120);i(88);i(138);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var a=function(){function TextHighlighter(t){var r=t.findController,i=t.eventBus,a=t.pageIndex;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextHighlighter);this.findController=r;this.matches=[];this.eventBus=i;this.pageIdx=a;this._onUpdateTextLayerMatches=null;this.textDivs=null;this.textContentItemsStr=null;this.enabled=!1}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextHighlighter,[{key:"setTextMapping",value:function setTextMapping(t,r){this.textDivs=t;this.textContentItemsStr=r}},{key:"enable",value:function enable(){var t=this;if(!this.textDivs||!this.textContentItemsStr)throw new Error("Text divs and strings have not been set.");if(!this.enabled){this.enabled=!0;if(!this._onUpdateTextLayerMatches){this._onUpdateTextLayerMatches=function(r){r.pageIndex!==t.pageIdx&&-1!==r.pageIndex||t._updateMatches()};this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches)}this._updateMatches()}}},{key:"disable",value:function disable(){if(this.enabled){this.enabled=!1;if(this._onUpdateTextLayerMatches){this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches);this._onUpdateTextLayerMatches=null}this._updateMatches(!0)}}},{key:"_convertMatches",value:function _convertMatches(t,r){if(!t)return[];for(var i=this.textContentItemsStr,a=0,o=0,l=i.length-1,u=[],c=0,h=t.length;c<h;c++){for(var d=t[c];a!==l&&d>=o+i[a].length;){o+=i[a].length;a++}a===i.length&&globalThis.ngxConsole.error("Could not find a matching mapping");var p={begin:{divIdx:a,offset:d-o}};d+=r[c];for(;a!==l&&d>o+i[a].length;){o+=i[a].length;a++}p.end={divIdx:a,offset:d-o};u.push(p)}return u}},{key:"_renderMatches",value:function _renderMatches(t){if(0!==t.length){var r=this.findController,i=this.pageIdx,a=this.textContentItemsStr,o=this.textDivs,l=i===r.selected.pageIdx,u=r.selected.matchIdx,c=null,h={divIdx:-1,offset:void 0},d=u,p=d+1;if(r.state.highlightAll){d=0;p=t.length}else if(!l)return;for(var v=-1,y=-1,g=d;g<p;g++){var m=t[g],b=m.begin;if(b.divIdx!==v||b.offset!==y){v=b.divIdx;y=b.offset;var w=m.end,P=l&&g===u,A=P?" selected":"",S=0;if(c&&b.divIdx===c.divIdx)appendTextToDiv(c.divIdx,c.offset,b.offset);else{null!==c&&appendTextToDiv(c.divIdx,c.offset,h.offset);beginText(b)}if(b.divIdx===w.divIdx)S=appendTextToDiv(b.divIdx,b.offset,w.offset,"highlight"+A);else{S=appendTextToDiv(b.divIdx,b.offset,h.offset,"highlight begin"+A);for(var E=b.divIdx+1,x=w.divIdx;E<x;E++)o[E].className="highlight middle"+A;beginText(w,"highlight end"+A)}c=w;P&&r.scrollMatchIntoView({element:o[b.divIdx],selectedLeft:S,pageIndex:i,matchIndex:u})}}c&&appendTextToDiv(c.divIdx,c.offset,h.offset)}function beginText(t,r){var i=t.divIdx;o[i].textContent="";return appendTextToDiv(i,0,t.offset,r)}function appendTextToDiv(t,r,i,l){var u=o[t];if(u.nodeType===Node.TEXT_NODE){var c=document.createElement("span");u.before(c);c.append(u);o[t]=c;u=c}var h=a[t].substring(r,i),d=document.createTextNode(h);if(l){var p=document.createElement("span");p.className="".concat(l," appended");p.append(d);u.append(p);return l.includes("selected")?p.offsetLeft:0}u.append(d);return 0}}},{key:"_updateMatches",value:function _updateMatches(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.enabled||t){var r,i=this.findController,a=this.matches,o=this.pageIdx,l=this.textContentItemsStr,u=this.textDivs,c=-1,h=_createForOfIteratorHelper(a);try{for(h.s();!(r=h.n()).done;){for(var d=r.value,p=Math.max(c,d.begin.divIdx),v=d.end.divIdx;p<=v;p++){var y=u[p];y.textContent=l[p];y.className=""}c=d.end.divIdx+1}}catch(t){h.e(t)}finally{h.f()}if(null!=i&&i.highlightMatches&&!t){var g=i.pageMatches[o]||null,m=i.pageMatchesLength[o]||null;this.matches=this._convertMatches(g,m);this._renderMatches(this.matches)}}}}]);return TextHighlighter}();r.TextHighlighter=a},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(142);i(1);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.TextLayerBuilder=void 0;i(42);i(88);i(92);i(283);i(95);i(126);i(198);i(293);i(222);var a=i(286),o=i(239);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var l=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,d=new WeakSet,p=new WeakSet,v=function(){function TextLayerBuilder(t){var r=t.highlighter,i=void 0===r?null:r,a=t.accessibilityManager,o=void 0===a?null:a,v=t.isOffscreenCanvasSupported,y=void 0===v||v,g=t.enablePermissions,m=void 0!==g&&g;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,TextLayerBuilder);_classPrivateMethodInitSpec(this,p);_classPrivateMethodInitSpec(this,d);_classPrivateFieldInitSpec(this,l,{writable:!0,value:!1});_classPrivateFieldInitSpec(this,u,{writable:!0,value:0});_classPrivateFieldInitSpec(this,c,{writable:!0,value:0});_classPrivateFieldInitSpec(this,h,{writable:!0,value:null});this.textContentItemsStr=[];this.renderingDone=!1;this.textDivs=[];this.textDivProperties=new WeakMap;this.textLayerRenderTask=null;this.highlighter=i;this.accessibilityManager=o;this.isOffscreenCanvasSupported=y;_classPrivateFieldSet(this,l,!0===m);this.div=document.createElement("div");this.div.className="textLayer";this.hide()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(TextLayerBuilder,[{key:"numTextDivs",get:function get(){return this.textDivs.length}},{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,o,l,p,v,y;return _regeneratorRuntime().wrap((function _callee$(g){for(;;)switch(g.prev=g.next){case 0:if(_classPrivateFieldGet(this,h)){g.next=2;break}throw new Error('No "textContentSource" parameter specified.');case 2:l=t.scale*(globalThis.devicePixelRatio||1);p=t.rotation;if(!this.renderingDone){g.next=10;break}v=p!==_classPrivateFieldGet(this,u);y=l!==_classPrivateFieldGet(this,c);if(v||y){this.hide();(0,a.updateTextLayer)({container:this.div,viewport:t,textDivs:this.textDivs,textDivProperties:this.textDivProperties,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported,mustRescale:y,mustRotate:v});_classPrivateFieldSet(this,c,l);_classPrivateFieldSet(this,u,p)}this.show();return g.abrupt("return");case 10:this.cancel();null===(r=this.highlighter)||void 0===r||r.setTextMapping(this.textDivs,this.textContentItemsStr);null===(i=this.accessibilityManager)||void 0===i||i.setTextMapping(this.textDivs);this.textLayerRenderTask=(0,a.renderTextLayer)({textContentSource:_classPrivateFieldGet(this,h),container:this.div,viewport:t,textDivs:this.textDivs,textDivProperties:this.textDivProperties,textContentItemsStr:this.textContentItemsStr,isOffscreenCanvasSupported:this.isOffscreenCanvasSupported});g.next=16;return this.textLayerRenderTask.promise;case 16:_classPrivateMethodGet(this,d,_finishRendering2).call(this);_classPrivateFieldSet(this,c,l);_classPrivateFieldSet(this,u,p);this.show();null===(o=this.accessibilityManager)||void 0===o||o.enable();case 21:case"end":return g.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"hide",value:function hide(){if(!this.div.hidden){var t;null===(t=this.highlighter)||void 0===t||t.disable();this.div.hidden=!0}}},{key:"show",value:function show(){if(this.div.hidden&&this.renderingDone){var t;this.div.hidden=!1;null===(t=this.highlighter)||void 0===t||t.enable()}}},{key:"cancel",value:function cancel(){var t,r;if(this.textLayerRenderTask){this.textLayerRenderTask.cancel();this.textLayerRenderTask=null}null===(t=this.highlighter)||void 0===t||t.disable();null===(r=this.accessibilityManager)||void 0===r||r.disable();this.textContentItemsStr.length=0;this.textDivs.length=0;this.textDivProperties=new WeakMap}},{key:"setTextContentSource",value:function setTextContentSource(t){this.cancel();_classPrivateFieldSet(this,h,t)}}]);var t;return TextLayerBuilder}();r.TextLayerBuilder=v;function _finishRendering2(){this.renderingDone=!0;var t=document.createElement("div");t.className="endOfContent";this.div.append(t);_classPrivateMethodGet(this,p,_bindMouse2).call(this)}function _bindMouse2(){var t=this,r=this.div;r.addEventListener("mousedown",(function(t){var i=r.querySelector(".endOfContent");if(i){var a=t.target!==r;a&&(a="none"!==getComputedStyle(i).getPropertyValue("-moz-user-select"));if(a){var o=r.getBoundingClientRect(),l=Math.max(0,(t.pageY-o.top)/o.height);i.style.top=(100*l).toFixed(2)+"%"}i.classList.add("active")}}));r.addEventListener("mouseup",(function(){var t=r.querySelector(".endOfContent");if(t){t.style.top="";t.classList.remove("active")}}));r.addEventListener("copy",(function(r){if(!_classPrivateFieldGet(t,l)){var i=document.getSelection();r.clipboardData.setData("text/plain",(0,o.removeNullCharacters)((0,a.normalizeUnicode)(i.toString())))}r.preventDefault();r.stopPropagation()}))}},(t,r,i)=>{i(142);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.XfaLayerBuilder=void 0;i(135);i(136);i(98);i(120);i(88);i(126);i(138);var a=i(286);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var o=function(){function XfaLayerBuilder(t){var r=t.pageDiv,i=t.pdfPage,a=t.annotationStorage,o=void 0===a?null:a,l=t.linkService,u=t.xfaHtml,c=void 0===u?null:u;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,XfaLayerBuilder);this.pageDiv=r;this.pdfPage=i;this.annotationStorage=o;this.linkService=l;this.xfaHtml=c;this.div=null;this._cancelled=!1}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(XfaLayerBuilder,[{key:"render",value:(t=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(t){var r,i,o,l,u,c=arguments;return _regeneratorRuntime().wrap((function _callee$(h){for(;;)switch(h.prev=h.next){case 0:if("print"!==(r=c.length>1&&void 0!==c[1]?c[1]:"display")){h.next=7;break}i={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:this.xfaHtml,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:r};o=document.createElement("div");this.pageDiv.append(o);i.div=o;return h.abrupt("return",a.XfaLayer.render(i));case 7:h.next=9;return this.pdfPage.getXfa();case 9:l=h.sent;if(!this._cancelled&&l){h.next=12;break}return h.abrupt("return",{textDivs:[]});case 12:u={viewport:t.clone({dontFlip:!0}),div:this.div,xfaHtml:l,annotationStorage:this.annotationStorage,linkService:this.linkService,intent:r};if(!this.div){h.next=15;break}return h.abrupt("return",a.XfaLayer.update(u));case 15:this.div=document.createElement("div");this.pageDiv.append(this.div);u.div=this.div;return h.abrupt("return",a.XfaLayer.render(u));case 19:case"end":return h.stop()}}),_callee,this)}))),function render(r){return t.apply(this,arguments)})},{key:"cancel",value:function cancel(){this._cancelled=!0}},{key:"hide",value:function hide(){this.div&&(this.div.hidden=!0)}}]);var t;return XfaLayerBuilder}();r.XfaLayerBuilder=o},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(185);i(222);i(192);i(206);i(219);i(1);i(187);i(195);i(196);i(182);i(197);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.SecondaryToolbar=void 0;i(179);i(126);i(42);i(88);i(92);i(293);i(95);var a=i(239),o=i(325);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.add(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=new WeakSet,u=new WeakSet,c=new WeakSet,h=new WeakSet,d=new WeakSet,p=function(){function SecondaryToolbar(t,r,i){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,SecondaryToolbar);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,u);_classPrivateMethodInitSpec(this,l);this.toolbar=t.toolbar;this.toggleButton=t.toggleButton;this.buttons=[{element:t.presentationModeButton,eventName:"presentationmode",close:!0},{element:t.printButton,eventName:"print",close:!0},{element:t.downloadButton,eventName:"download",close:!0},{element:t.viewBookmarkButton,eventName:null,close:!0},{element:t.firstPageButton,eventName:"firstpage",close:!0},{element:t.lastPageButton,eventName:"lastpage",close:!0},{element:t.pageRotateCwButton,eventName:"rotatecw",close:!1},{element:t.pageRotateCcwButton,eventName:"rotateccw",close:!1},{element:t.cursorSelectToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.SELECT},close:!0},{element:t.cursorHandToolButton,eventName:"switchcursortool",eventDetails:{tool:a.CursorTool.HAND},close:!0},{element:t.scrollPageButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.PAGE},close:!0},{element:t.scrollVerticalButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.VERTICAL},close:!0},{element:t.scrollHorizontalButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.HORIZONTAL},close:!0},{element:t.scrollWrappedButton,eventName:"switchscrollmode",eventDetails:{mode:a.ScrollMode.WRAPPED},close:!0},{element:t.spreadNoneButton,eventName:"switchspreadmode",eventDetails:{mode:a.SpreadMode.NONE},close:!0},{element:t.spreadOddButton,eventName:"switchspreadmode",eventDetails:{mode:a.SpreadMode.ODD},close:!0},{element:t.spreadEvenButton,eventName:"switchspreadmode",eventDetails:{mode:a.SpreadMode.EVEN},close:!0},{element:t.documentPropertiesButton,eventName:"documentproperties",close:!0}];this.buttons.push({element:t.openFileButton,eventName:"openfile",close:!0});this.items={firstPage:t.firstPageButton,lastPage:t.lastPageButton,pageRotateCw:t.pageRotateCwButton,pageRotateCcw:t.pageRotateCcwButton};this.eventBus=r;this.externalServices=i;this.opened=!1;_classPrivateMethodGet(this,u,_bindClickListeners2).call(this);_classPrivateMethodGet(this,c,_bindCursorToolsListener2).call(this,t);_classPrivateMethodGet(this,h,_bindScrollModeListener2).call(this,t);_classPrivateMethodGet(this,d,_bindSpreadModeListener2).call(this,t);this.reset()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(SecondaryToolbar,[{key:"isOpen",get:function get(){return this.opened}},{key:"setPageNumber",value:function setPageNumber(t){this.pageNumber=t;_classPrivateMethodGet(this,l,_updateUIState2).call(this)}},{key:"setPagesCount",value:function setPagesCount(t){this.pagesCount=t;_classPrivateMethodGet(this,l,_updateUIState2).call(this)}},{key:"reset",value:function reset(){this.pageNumber=0;this.pagesCount=0;_classPrivateMethodGet(this,l,_updateUIState2).call(this);this.eventBus.dispatch("secondarytoolbarreset",{source:this})}},{key:"open",value:function open(){if(!this.opened){this.opened=!0;(0,a.toggleExpandedBtn)(this.toggleButton,!0,this.toolbar)}}},{key:"close",value:function close(){if(this.opened){this.opened=!1;(0,a.toggleExpandedBtn)(this.toggleButton,!1,this.toolbar)}}},{key:"toggle",value:function toggle(){this.opened?this.close():this.open()}}]);return SecondaryToolbar}();r.SecondaryToolbar=p;function _updateUIState2(){this.items.firstPage.disabled=this.pageNumber<=1;document.getElementById("previousPage")&&(document.getElementById("previousPage").disabled=this.pageNumber<=1);this.items.lastPage.disabled=this.pageNumber>=this.pagesCount;document.getElementById("nextPage")&&(document.getElementById("nextPage").disabled=this.pageNumber>=this.pagesCount);this.items.pageRotateCw.disabled=0===this.pagesCount;this.items.pageRotateCcw.disabled=0===this.pagesCount;this.eventBus.dispatch("updateuistate",{source:this,widget:"SecondaryToolbar",pageNumber:this.pageNumber,pagesCount:this.pagesCount})}function _bindClickListeners2(){var t=this;this.toggleButton.addEventListener("click",this.toggle.bind(this));var r,i=_createForOfIteratorHelper(this.buttons);try{var a=function _loop(){var i=r.value,a=i.element,o=i.eventName,l=i.close,u=i.eventDetails;null==a||a.addEventListener("click",(function(r){null!==o&&t.eventBus.dispatch(o,function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({source:t},u));l&&t.close();t.externalServices.reportTelemetry({type:"buttons",data:{id:a.id}})}))};for(i.s();!(r=i.n()).done;)a()}catch(t){i.e(t)}finally{i.f()}}function _bindCursorToolsListener2(t){var r=t.cursorSelectToolButton,i=t.cursorHandToolButton;this.eventBus._on("cursortoolchanged",(function(t){var o=t.tool;(0,a.toggleCheckedBtn)(r,o===a.CursorTool.SELECT);(0,a.toggleCheckedBtn)(i,o===a.CursorTool.HAND)}))}function _bindScrollModeListener2(t){var r=this,i=t.scrollPageButton,l=t.scrollVerticalButton,u=t.scrollHorizontalButton,c=t.scrollWrappedButton,h=t.spreadNoneButton,d=t.spreadOddButton,p=t.spreadEvenButton,v=function scrollModeChanged(t){var v=t.mode;(0,a.toggleCheckedBtn)(i,v===a.ScrollMode.PAGE);(0,a.toggleCheckedBtn)(l,v===a.ScrollMode.VERTICAL);(0,a.toggleCheckedBtn)(u,v===a.ScrollMode.HORIZONTAL);(0,a.toggleCheckedBtn)(c,v===a.ScrollMode.WRAPPED);var y=r.pagesCount>o.PagesCountLimit.FORCE_SCROLL_MODE_PAGE;i.disabled=y;l.disabled=y;u.disabled=y;c.disabled=y;var g=v===a.ScrollMode.HORIZONTAL;h.disabled=g;d.disabled=g;p.disabled=g};this.eventBus._on("scrollmodechanged",v);this.eventBus._on("secondarytoolbarreset",(function(t){t.source===r&&v({mode:a.ScrollMode.VERTICAL})}))}function _bindSpreadModeListener2(t){var r=this,i=t.spreadNoneButton,o=t.spreadOddButton,l=t.spreadEvenButton,u=function spreadModeChanged(t){var r=t.mode;(0,a.toggleCheckedBtn)(i,r===a.SpreadMode.NONE);(0,a.toggleCheckedBtn)(o,r===a.SpreadMode.ODD);(0,a.toggleCheckedBtn)(l,r===a.SpreadMode.EVEN)};this.eventBus._on("spreadmodechanged",u);this.eventBus._on("secondarytoolbarreset",(function(t){t.source===r&&u({mode:a.SpreadMode.NONE})}))}},(t,r,i)=>{i(135);i(136);i(98);i(120);i(185);i(192);i(206);i(219);i(1);i(187);i(195);i(196);i(182);i(197);i(175);i(176);i(177);i(178);i(190);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.Toolbar=void 0;i(179);i(88);i(222);i(138);i(126);i(42);i(92);i(283);i(95);i(293);i(142);i(216);var a=i(239),o=i(286);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function _classPrivateMethodInitSpec(t,r){_checkPrivateRedeclaration(t,r);r.add(t)}function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}function _classPrivateMethodGet(t,r,i){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return i}var l=new WeakMap,u=new WeakSet,c=new WeakSet,h=new WeakSet,d=new WeakSet,p=function(){function Toolbar(t,r,i){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Toolbar);_classPrivateMethodInitSpec(this,d);_classPrivateMethodInitSpec(this,h);_classPrivateMethodInitSpec(this,c);_classPrivateMethodInitSpec(this,u);!function _classPrivateFieldInitSpec(t,r,i){_checkPrivateRedeclaration(t,r);r.set(t,i)}(this,l,{writable:!0,value:!1});this.toolbar=t.container;this.eventBus=r;this.l10n=i;this.buttons=[{element:t.previous,eventName:"previouspage"},{element:t.next,eventName:"nextpage"},{element:t.zoomIn,eventName:"zoomin"},{element:t.zoomOut,eventName:"zoomout"},{element:t.print,eventName:"print"},{element:t.presentationModeButton,eventName:"presentationmode"},{element:t.download,eventName:"download"},{element:t.editorFreeTextButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){return t.editorFreeTextButton.classList.contains("toggled")?o.AnnotationEditorType.NONE:o.AnnotationEditorType.FREETEXT}}},{element:t.editorInkButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){return t.editorInkButton.classList.contains("toggled")?o.AnnotationEditorType.NONE:o.AnnotationEditorType.INK}}},{element:t.editorStampButton,eventName:"switchannotationeditormode",eventDetails:{get mode(){return t.editorStampButton.classList.contains("toggled")?o.AnnotationEditorType.NONE:o.AnnotationEditorType.STAMP}}}];this.buttons.push({element:t.openFile,eventName:"openfile"});this.items={numPages:t.numPages,pageNumber:t.pageNumber,scaleSelect:t.scaleSelect,customScaleOption:t.customScaleOption,previous:t.previous,next:t.next,zoomIn:t.zoomIn,zoomOut:t.zoomOut};_classPrivateMethodGet(this,u,_bindListeners2).call(this,t);this.reset()}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(Toolbar,[{key:"setPageNumber",value:function setPageNumber(t,r){this.pageNumber=t;this.pageLabel=r;_classPrivateMethodGet(this,h,_updateUIState2).call(this,!1)}},{key:"setPagesCount",value:function setPagesCount(t,r){this.pagesCount=t;this.hasPageLabels=r;_classPrivateMethodGet(this,h,_updateUIState2).call(this,!0)}},{key:"setPageScale",value:function setPageScale(t,r){this.pageScaleValue=(t||r).toString();this.pageScale=r;_classPrivateMethodGet(this,h,_updateUIState2).call(this,!1)}},{key:"reset",value:function reset(){this.pageNumber=0;this.pageLabel=null;this.hasPageLabels=!1;this.pagesCount=0;var t=PDFViewerApplicationOptions.get("defaultZoomValue");if(t){this.pageScaleValue=t;Number(t)&&(this.pageScale=Number(t))}else{this.pageScaleValue=a.DEFAULT_SCALE_VALUE;this.pageScale=a.DEFAULT_SCALE}_classPrivateMethodGet(this,h,_updateUIState2).call(this,!0);this.updateLoadingIndicatorState();this.eventBus.dispatch("toolbarreset",{source:this})}},{key:"updateLoadingIndicatorState",value:function updateLoadingIndicatorState(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.items.pageNumber.classList.toggle("visiblePageIsLoading",t)}}]);return Toolbar}();r.Toolbar=p;function _bindListeners2(t){var r,i=this,o=this.items,u=o.pageNumber,p=o.scaleSelect,v=this,y=_createForOfIteratorHelper(this.buttons);try{var g=function _loop(){var t=r.value,a=t.element,o=t.eventName,l=t.eventDetails;null==a||a.addEventListener("click",(function(t){null!==o&&i.eventBus.dispatch(o,function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}({source:i},l))}))};for(y.s();!(r=y.n()).done;)g()}catch(t){y.e(t)}finally{y.f()}u.addEventListener("click",(function(){this.select()}));u.addEventListener("change",(function(){v.eventBus.dispatch("pagenumberchanged",{source:v,value:this.value})}));p.addEventListener("change",(function(){"custom"!==this.value&&v.eventBus.dispatch("scalechanged",{source:v,value:this.value})}));p.addEventListener("click",(function(t){var r=t.target;this.value===v.pageScaleValue&&"OPTION"===r.tagName.toUpperCase()&&this.blur()}));p.oncontextmenu=a.noContextMenuHandler;this.eventBus._on("localized",(function(){_classPrivateFieldSet(i,l,!0);_classPrivateMethodGet(i,d,_adjustScaleWidth2).call(i);_classPrivateMethodGet(i,h,_updateUIState2).call(i,!0)}));_classPrivateMethodGet(this,c,_bindEditorToolsListener2).call(this,t)}function _bindEditorToolsListener2(t){var r=this,i=t.editorFreeTextButton,l=t.editorFreeTextParamsToolbar,u=t.editorInkButton,c=t.editorInkParamsToolbar,h=t.editorStampButton,d=t.editorStampParamsToolbar,p=function editorModeChanged(t){var r=t.mode;(0,a.toggleCheckedBtn)(i,r===o.AnnotationEditorType.FREETEXT,l);(0,a.toggleCheckedBtn)(u,r===o.AnnotationEditorType.INK,c);(0,a.toggleCheckedBtn)(h,r===o.AnnotationEditorType.STAMP,d);var p=r===o.AnnotationEditorType.DISABLE;i.disabled=p;u.disabled=p;h.disabled=p};this.eventBus._on("annotationeditormodechanged",p);this.eventBus._on("toolbarreset",(function(t){t.source===r&&p({mode:o.AnnotationEditorType.DISABLE})}))}function _updateUIState2(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){return r.get?r.get.call(t):r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}(this,l)){var r=this.pageNumber,i=this.pagesCount,o=this.pageScaleValue,u=this.pageScale,c=this.items;if(t){if(this.hasPageLabels)c.pageNumber.type="text";else{c.pageNumber.type="number";this.l10n.get("of_pages",{pagesCount:i}).then((function(t){c.numPages.textContent=t}))}c.pageNumber.max=i}if(this.hasPageLabels){c.pageNumber.value=this.pageLabel;this.l10n.get("page_of_pages",{pageNumber:r,pagesCount:i}).then((function(t){c.numPages.textContent=t}))}else c.pageNumber.value=r;c.previous.disabled=r<=1;c.next.disabled=r>=i;c.zoomOut.disabled=u<=a.MIN_SCALE;c.zoomIn.disabled=u>=a.MAX_SCALE;this.l10n.get("page_scale_percent",{scale:Math.round(1e4*u)/100}).then((function(t){var r=!1;if(c.scaleSelect.options){var i,a=_createForOfIteratorHelper(c.scaleSelect.options);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(l.value===o){l.selected=!0;r=!0}else l.selected=!1}}catch(t){a.e(t)}finally{a.f()}}if(!r){c.customScaleOption.textContent=t;c.customScaleOption.selected=!0}}));this.eventBus.dispatch("updateuistate",{source:this,widget:"Toolbar",pageNumber:r,pagesCount:i,pageScaleValue:o,pageScale:u})}}function _adjustScaleWidth2(){return _adjustScaleWidth3.apply(this,arguments)}function _adjustScaleWidth3(){_adjustScaleWidth3=function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var t,r,i,o,l,u,c,h,d,p,v,y,g,m;return _regeneratorRuntime().wrap((function _callee$(b){for(;;)switch(b.prev=b.next){case 0:t=this.items,r=this.l10n;i=Promise.all([r.get("page_scale_auto"),r.get("page_scale_actual"),r.get("page_scale_fit"),r.get("page_scale_width")]);b.next=4;return a.animationStarted;case 4:o=getComputedStyle(t.scaleSelect);l=parseFloat(o.getPropertyValue("--scale-select-width"));u=document.createElement("canvas");c=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0,alpha:!1}:{alpha:!1};(h=u.getContext("2d",c)).font="".concat(o.fontSize," ").concat(o.fontFamily);d=0;b.t0=_createForOfIteratorHelper;b.next=14;return i;case 14:b.t1=b.sent;p=(0,b.t0)(b.t1);try{for(p.s();!(v=p.n()).done;){y=v.value;try{g=h.measureText(y);(m=g.width)>d&&(d=m)}catch(t){}}}catch(t){p.e(t)}finally{p.f()}(d+=.3*l)>l&&t.scaleSelect.parentNode.style.setProperty("--scale-select-width","".concat(d,"px"));u.width=0;u.height=0;case 21:case"end":return b.stop()}}),_callee,this)})));return _adjustScaleWidth3.apply(this,arguments)}},(t,r,i)=>{i(142);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(190);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.ViewHistory=void 0;i(187);i(188);i(179);i(115);i(135);i(136);i(98);i(120);i(88);i(126);i(138);var a=i(288);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var o=function(){function ViewHistory(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,ViewHistory);this.fingerprint=t;this.cacheSize=i;this._initializedPromise=this._readFromStorage().then((function(t){var i=JSON.parse(t||"{}"),a=-1;if(Array.isArray(i.files)){for(;i.files.length>=r.cacheSize;)i.files.shift();for(var o=0,l=i.files.length;o<l;o++){if(i.files[o].fingerprint===r.fingerprint){a=o;break}}}else i.files=[];-1===a&&(a=i.files.push({fingerprint:r.fingerprint})-1);r.file=i.files[a];r.database=i}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(ViewHistory,[{key:"_writeToStorage",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t;return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(!a.AppOptions.get("disableHistory")){r.next=2;break}return r.abrupt("return");case 2:t=JSON.stringify(this.database);try{localStorage.setItem("pdfjs.history",t)}catch(t){}case 4:case"end":return r.stop()}}),_callee,this)}))),function _writeToStorage(){return u.apply(this,arguments)})},{key:"_readFromStorage",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:if(!a.AppOptions.get("disableHistory")){t.next=2;break}return t.abrupt("return",void 0);case 2:t.prev=2;return t.abrupt("return",localStorage.getItem("pdfjs.history"));case 6:t.prev=6;t.t0=t.catch(2);return t.abrupt("return",void 0);case 9:case"end":return t.stop()}}),_callee2,null,[[2,6]])}))),function _readFromStorage(){return l.apply(this,arguments)})},{key:"set",value:(o=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t,r){return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._initializedPromise;case 2:this.file[t]=r;return i.abrupt("return",this._writeToStorage());case 4:case"end":return i.stop()}}),_callee3,this)}))),function set(t,r){return o.apply(this,arguments)})},{key:"setMultiple",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){var r;return _regeneratorRuntime().wrap((function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._initializedPromise;case 2:for(r in t)this.file[r]=t[r];return i.abrupt("return",this._writeToStorage());case 4:case"end":return i.stop()}}),_callee4,this)}))),function setMultiple(t){return i.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t,r){var i;return _regeneratorRuntime().wrap((function _callee5$(a){for(;;)switch(a.prev=a.next){case 0:a.next=2;return this._initializedPromise;case 2:i=this.file[t];return a.abrupt("return",void 0!==i?i:r);case 4:case"end":return a.stop()}}),_callee5,this)}))),function get(t,i){return r.apply(this,arguments)})},{key:"getMultiple",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(t){var r,i,a;return _regeneratorRuntime().wrap((function _callee6$(o){for(;;)switch(o.prev=o.next){case 0:o.next=2;return this._initializedPromise;case 2:r=Object.create(null);for(i in t){a=this.file[i];r[i]=void 0!==a?a:t[i]}return o.abrupt("return",r);case 5:case"end":return o.stop()}}),_callee6,this)}))),function getMultiple(r){return t.apply(this,arguments)})}]);var t,r,i,o,l,u;return ViewHistory}();r.ViewHistory=o},(t,r,i)=>{i(135);i(136);i(98);i(120);i(1);i(142);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.BasePreferences=void 0;i(305);i(126);i(88);i(222);i(216);i(138);i(42);i(92);i(283);i(95);i(288);function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,_classExtractFieldDescriptor(t,r,"get"))}function _classPrivateFieldSet(t,r,i){!function _classApplyDescriptorSet(t,r,i){if(r.set)r.set.call(t,i);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=i}}(t,_classExtractFieldDescriptor(t,r,"set"),i);return i}function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}var a=new WeakMap,o=new WeakMap,l=new WeakMap,u=function(){function BasePreferences(){var t=this;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BasePreferences);_classPrivateFieldInitSpec(this,a,{writable:!0,value:Object.freeze({annotationEditorMode:0,annotationMode:2,cursorToolOnLoad:0,defaultZoomDelay:400,defaultZoomValue:"",disablePageLabels:!1,enablePermissions:!1,enablePrintAutoRotate:!0,enableScripting:!0,enableStampEditor:!0,externalLinkTarget:0,historyUpdateUrl:!1,ignoreDestinationZoom:!1,forcePageColors:!1,pageColorsBackground:"Canvas",pageColorsForeground:"CanvasText",pdfBugEnabled:!1,removePageBorders:!1,sidebarViewOnLoad:-1,scrollModeOnLoad:-1,spreadModeOnLoad:-1,textLayerMode:1,viewerCssTheme:0,viewOnLoad:0,disableAutoFetch:!1,disableFontFace:!1,disableRange:!1,disableStream:!1,enableXfa:!0})});_classPrivateFieldInitSpec(this,o,{writable:!0,value:Object.create(null)});_classPrivateFieldInitSpec(this,l,{writable:!0,value:null});if(this.constructor===BasePreferences)throw new Error("Cannot initialize BasePreferences.");_classPrivateFieldSet(this,l,this._readFromStorage(_classPrivateFieldGet(this,a)).then((function(r){for(var i in _classPrivateFieldGet(t,a)){var l=null==r?void 0:r[i];_typeof(l)===_typeof(_classPrivateFieldGet(t,a)[i])&&(_classPrivateFieldGet(t,o)[i]=l)}})))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(BasePreferences,[{key:"_writeToStorage",value:(h=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented: _writeToStorage");case 1:case"end":return t.stop()}}),_callee)}))),function _writeToStorage(t){return h.apply(this,arguments)})},{key:"_readFromStorage",value:(c=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){return _regeneratorRuntime().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented: _readFromStorage");case 1:case"end":return t.stop()}}),_callee2)}))),function _readFromStorage(t){return c.apply(this,arguments)})},{key:"reset",value:(u=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t,r=this;return _regeneratorRuntime().wrap((function _callee3$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return _classPrivateFieldGet(this,l);case 2:t=_classPrivateFieldGet(this,o);_classPrivateFieldSet(this,o,Object.create(null));return i.abrupt("return",this._writeToStorage(_classPrivateFieldGet(this,a)).catch((function(i){_classPrivateFieldSet(r,o,t);throw i})));case 5:case"end":return i.stop()}}),_callee3,this)}))),function reset(){return u.apply(this,arguments)})},{key:"set",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t,r){var i,u,c,h,d=this;return _regeneratorRuntime().wrap((function _callee4$(p){for(;;)switch(p.prev=p.next){case 0:p.next=2;return _classPrivateFieldGet(this,l);case 2:i=_classPrivateFieldGet(this,a)[t],u=_classPrivateFieldGet(this,o);if(void 0!==i){p.next=7;break}throw new Error('Set preference: "'.concat(t,'" is undefined.'));case 7:if(void 0!==r){p.next=9;break}throw new Error("Set preference: no value is specified.");case 9:c=_typeof(r),h=_typeof(i);if(c===h){p.next=18;break}if("number"!==c||"string"!==h){p.next=15;break}r=r.toString();p.next=16;break;case 15:throw new Error('Set preference: "'.concat(r,'" is a ').concat(c,", expected a ").concat(h,"."));case 16:p.next=20;break;case 18:if("number"!==c||Number.isInteger(r)){p.next=20;break}throw new Error('Set preference: "'.concat(r,'" must be an integer.'));case 20:_classPrivateFieldGet(this,o)[t]=r;return p.abrupt("return",this._writeToStorage(_classPrivateFieldGet(this,o)).catch((function(t){_classPrivateFieldSet(d,o,u);throw t})));case 22:case"end":return p.stop()}}),_callee4,this)}))),function set(t,r){return i.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee5(t){var r,i;return _regeneratorRuntime().wrap((function _callee5$(u){for(;;)switch(u.prev=u.next){case 0:u.next=2;return _classPrivateFieldGet(this,l);case 2:if(void 0!==(i=_classPrivateFieldGet(this,a)[t])){u.next=5;break}throw new Error('Get preference: "'.concat(t,'" is undefined.'));case 5:return u.abrupt("return",null!==(r=_classPrivateFieldGet(this,o)[t])&&void 0!==r?r:i);case 6:case"end":return u.stop()}}),_callee5,this)}))),function get(t){return r.apply(this,arguments)})},{key:"getAll",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee6(){var t,r,i;return _regeneratorRuntime().wrap((function _callee6$(u){for(;;)switch(u.prev=u.next){case 0:u.next=2;return _classPrivateFieldGet(this,l);case 2:t=Object.create(null);for(r in _classPrivateFieldGet(this,a))t[r]=null!==(i=_classPrivateFieldGet(this,o)[r])&&void 0!==i?i:_classPrivateFieldGet(this,a)[r];return u.abrupt("return",t);case 5:case"end":return u.stop()}}),_callee6,this)}))),function getAll(){return t.apply(this,arguments)})}]);var t,r,i,u,c,h;return BasePreferences}();r.BasePreferences=u},(t,r,i)=>{i(135);i(136);i(98);i(120);i(138);i(1);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.DownloadManager=void 0;i(126);i(42);i(88);i(92);i(283);i(95);i(198);i(225);i(232);i(233);i(234);i(235);var a=i(286);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _classPrivateFieldInitSpec(t,r,i){!function _checkPrivateRedeclaration(t,r){if(r.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,r);r.set(t,i)}function _classPrivateFieldGet(t,r){var i=function _classExtractFieldDescriptor(t,r,i){if(!r.has(t))throw new TypeError("attempted to "+i+" private field on non-instance");return r.get(t)}(t,r,"get");return function _classApplyDescriptorGet(t,r){if(r.get)return r.get.call(t);return r.value}(t,i)}function _download(t,r){var i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=t;i.target="_parent";"download"in i&&(i.download=r);(document.body||document.documentElement).append(i);i.click();i.remove()}var o=new WeakMap,l=function(){function DownloadManager(){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DownloadManager);_classPrivateFieldInitSpec(this,o,{writable:!0,value:new WeakMap})}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(DownloadManager,[{key:"downloadUrl",value:function downloadUrl(t,r,i){(0,a.createValidAbsoluteUrl)(t,"http://example.com")?_download(t+"#pdfjs.action=download",r):globalThis.ngxConsole.error("downloadUrl - not a valid URL: ".concat(t))}},{key:"downloadData",value:function downloadData(t,r,i){_download(URL.createObjectURL(new Blob([t],{type:i})),r)}},{key:"openOrDownloadData",value:function openOrDownloadData(t,r,i){var l=(0,a.isPdfFile)(i),u=l?"application/pdf":"";if(l){var c=_classPrivateFieldGet(this,o).get(t);if(!c){c=URL.createObjectURL(new Blob([r],{type:u}));_classPrivateFieldGet(this,o).set(t,c)}try{window.open(c);return!0}catch(r){globalThis.ngxConsole.error("openOrDownloadData: ".concat(r));URL.revokeObjectURL(c);_classPrivateFieldGet(this,o).delete(t)}}this.downloadData(r,i,u);return!1}},{key:"download",value:function download(t,r,i,a){_download(URL.createObjectURL(t),i)}}]);return DownloadManager}();r.DownloadManager=l},(t,r,i)=>{i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);Object.defineProperty(r,"__esModule",{value:!0});r.GenericL10n=void 0;i(88);i(142);i(135);i(136);i(98);i(120);i(126);i(138);i(413);var a=i(328);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}var o={en:"en-US",es:"es-ES",fy:"fy-NL",ga:"ga-IE",gu:"gu-IN",hi:"hi-IN",hy:"hy-AM",nb:"nb-NO",ne:"ne-NP",nn:"nn-NO",pa:"pa-IN",pt:"pt-PT",sv:"sv-SE",zh:"zh-CN"};var l=function(){function GenericL10n(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GenericL10n);var r=document.webL10n;this._lang=t;this._ready=new Promise((function(i,a){r.setLanguage(function fixupLangCode(t){return o[null==t?void 0:t.toLowerCase()]||t}(t),(function(){i(r)}))}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(GenericL10n,[{key:"getLanguage",value:(l=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){var t;return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return this._ready;case 2:t=r.sent;return r.abrupt("return",t.getLanguage());case 4:case"end":return r.stop()}}),_callee,this)}))),function getLanguage(){return l.apply(this,arguments)})},{key:"getDirection",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t;return _regeneratorRuntime().wrap((function _callee2$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return this._ready;case 2:t=r.sent;return r.abrupt("return",t.getDirection());case 4:case"end":return r.stop()}}),_callee2,this)}))),function getDirection(){return i.apply(this,arguments)})},{key:"get",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(t){var r,i,o,l=arguments;return _regeneratorRuntime().wrap((function _callee3$(u){for(;;)switch(u.prev=u.next){case 0:r=l.length>1&&void 0!==l[1]?l[1]:null;i=l.length>2&&void 0!==l[2]?l[2]:(0,a.getL10nFallback)(t,r);u.next=4;return this._ready;case 4:o=u.sent;return u.abrupt("return",o.get(t,r,i));case 6:case"end":return u.stop()}}),_callee3,this)}))),function get(t){return r.apply(this,arguments)})},{key:"translate",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){var r;return _regeneratorRuntime().wrap((function _callee4$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._ready;case 2:r=i.sent;return i.abrupt("return",r.translate(t));case 4:case"end":return i.stop()}}),_callee4,this)}))),function translate(r){return t.apply(this,arguments)})}]);var t,r,i,l;return GenericL10n}();r.GenericL10n=l},(t,r,i)=>{i(187);i(188);i(198);i(206);i(248);i(414);i(415);i(219);i(292);i(327);document.webL10n=function(t,r){var i={},a="",o="textContent",l="",u={},c="loading",h=!0;function fireL10nReadyEvent(t){var i=r.createEvent("Event");i.initEvent("localized",!0,!1);i.language=t;r.dispatchEvent(i)}function xhrLoadText(t,r,i){r=r||function _onSuccess(t){};i=i||function _onFailure(){};var a=new XMLHttpRequest;a.open("GET",t,h);a.overrideMimeType&&a.overrideMimeType("text/plain; charset=utf-8");a.onreadystatechange=function(){4==a.readyState&&(200==a.status||0===a.status?r(a.responseText):i())};a.onerror=i;a.ontimeout=i;try{a.send(null)}catch(t){i()}}function parseResource(r,l,u,c){var h=r.replace(/[^\/]*$/,"")||"./";function evalString(t){return t.lastIndexOf("\\")<0?t:t.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}xhrLoadText(r,(function(r){a+=r;!function parseProperties(r,i){var a={},o=/^\s*|\s*$/,u=/^\s*#|^\s*$/,c=/^\s*\[(.*)\]\s*$/,d=/^\s*@import\s+url\((.*)\)\s*$/i,p=/^([^=\s]*)\s*=\s*(.+)$/;function parseRawLines(t,r,i){var v=t.replace(o,"").split(/[\r\n]+/),y="*",g=l.split("-",1)[0],m=!1,b="",w=!1;!function nextEntry(){for(var t=void 0;;){if(!v.length&&t){w?nextEntry():loadImport(t,nextEntry);return}if(!v.length){i();return}var o=v.shift();if(!u.test(o)){if(r){if(b=c.exec(o)){y=b[1].toLowerCase();m="*"!==y&&y!==l&&y!==g;continue}if(m)continue;if(b=d.exec(o)){if("*"===y||y===l){loadImport(h+b[1],nextEntry);w=!0;return}t=h+b[1]}}var P=o.match(p);P&&3==P.length&&(a[P[1]]=evalString(P[2]))}}}()}function loadImport(r,i){xhrLoadText(r,(function(t){parseRawLines(t,!1,i)}),(function(){var a=t.PDFViewerApplicationOptions;(!a||a.get("verbosity")>0)&&globalThis.ngxConsole.warn(r+" not found.");i()}))}parseRawLines(r,!0,(function(){i(a)}))}(r,(function(t){for(var r in t){var a,l,c=r.lastIndexOf(".");if(c>0){a=r.substring(0,c);l=r.substring(c+1)}else{a=r;l=o}i[a]||(i[a]={});i[a][l]=t[r]}u&&u()}))}),c)}function loadLocale(o,u){var h=o;o&&(o=o.toLowerCase());u=u||function _callback(){};!function clear(){i={};a="";l=""}();l=o;var d=function getL10nResourceLinks(){return r.querySelectorAll('link[type="application/l10n"]')}(),p=d.length;if(0!==p){var v,y=0;v=function onResourceLoaded(){if(++y>=p){u();fireL10nReadyEvent(o);c="complete"}};for(var g=0;g<p;g++){new L10nResourceLink(d[g]).load(o,v)}}else{var m=function getL10nDictionary(){var t=r.querySelector('script[type="application/l10n"]');return t?JSON.parse(t.innerHTML):null}();if(m&&m.locales&&m.default_locale){globalThis.ngxConsole.log("The PDF viewer uses the pre-compiled language bundle stored in the HTML page.");if(!(i=m.locales[h])){var b=m.default_locale.toLowerCase();for(var w in m.locales){h=w;if((w=w.toLowerCase())===o){i=m.locales[h];break}w===b&&(i=m.locales[h])}}u()}else globalThis.ngxConsole.log("Could not load the translation files for the PDF viewer. Check the flag useBrowserLocale, check the locales subfolder of the assets folder, or add the locale definition to the index.html");fireL10nReadyEvent(o);c="complete"}function L10nResourceLink(r){var i=r.href;this.load=function(r,a){parseResource(i,r,a,(function(){var o=t.PDFViewerApplicationOptions;if(!o||o.get("verbosity")>0){globalThis.ngxConsole.warn(i+" not found.");globalThis.ngxConsole.warn('"'+r+'" resource not found')}l="";a()}))}}}u.plural=function(r,a,c,h){var d=parseFloat(a);if(isNaN(d))return r;if(h!=o)return r;u._pluralRules||(u._pluralRules=function getPluralRules(r){function isIn(t,r){return-1!==r.indexOf(t)}function isBetween(t,r,i){return r<=t&&t<=i}var i={0:function _(t){return"other"},1:function _(t){return isBetween(t%100,3,10)?"few":0===t?"zero":isBetween(t%100,11,99)?"many":2==t?"two":1==t?"one":"other"},2:function _(t){return 0!==t&&t%10==0?"many":2==t?"two":1==t?"one":"other"},3:function _(t){return 1==t?"one":"other"},4:function _(t){return isBetween(t,0,1)?"one":"other"},5:function _(t){return isBetween(t,0,2)&&2!=t?"one":"other"},6:function _(t){return 0===t?"zero":t%10==1&&t%100!=11?"one":"other"},7:function _(t){return 2==t?"two":1==t?"one":"other"},8:function _(t){return isBetween(t,3,6)?"few":isBetween(t,7,10)?"many":2==t?"two":1==t?"one":"other"},9:function _(t){return 0===t||1!=t&&isBetween(t%100,1,19)?"few":1==t?"one":"other"},10:function _(t){return isBetween(t%10,2,9)&&!isBetween(t%100,11,19)?"few":t%10!=1||isBetween(t%100,11,19)?"other":"one"},11:function _(t){return isBetween(t%10,2,4)&&!isBetween(t%100,12,14)?"few":t%10==0||isBetween(t%10,5,9)||isBetween(t%100,11,14)?"many":t%10==1&&t%100!=11?"one":"other"},12:function _(t){return isBetween(t,2,4)?"few":1==t?"one":"other"},13:function _(t){return isBetween(t%10,2,4)&&!isBetween(t%100,12,14)?"few":1!=t&&isBetween(t%10,0,1)||isBetween(t%10,5,9)||isBetween(t%100,12,14)?"many":1==t?"one":"other"},14:function _(t){return isBetween(t%100,3,4)?"few":t%100==2?"two":t%100==1?"one":"other"},15:function _(t){return 0===t||isBetween(t%100,2,10)?"few":isBetween(t%100,11,19)?"many":1==t?"one":"other"},16:function _(t){return t%10==1&&11!=t?"one":"other"},17:function _(t){return 3==t?"few":0===t?"zero":6==t?"many":2==t?"two":1==t?"one":"other"},18:function _(t){return 0===t?"zero":isBetween(t,0,2)&&0!==t&&2!=t?"one":"other"},19:function _(t){return isBetween(t,2,10)?"few":isBetween(t,0,1)?"one":"other"},20:function _(t){return!isBetween(t%10,3,4)&&t%10!=9||isBetween(t%100,10,19)||isBetween(t%100,70,79)||isBetween(t%100,90,99)?t%1e6==0&&0!==t?"many":t%10!=2||isIn(t%100,[12,72,92])?t%10!=1||isIn(t%100,[11,71,91])?"other":"one":"two":"few"},21:function _(t){return 0===t?"zero":1==t?"one":"other"},22:function _(t){return isBetween(t,0,1)||isBetween(t,11,99)?"one":"other"},23:function _(t){return isBetween(t%10,1,2)||t%20==0?"one":"other"},24:function _(t){return isBetween(t,3,10)||isBetween(t,13,19)?"few":isIn(t,[2,12])?"two":isIn(t,[1,11])?"one":"other"}},a={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[r.replace(/-.*$/,"")];if(!(a in i)){var o=t.PDFViewerApplicationOptions;(!o||o.get("verbosity")>0)&&globalThis.ngxConsole.warn("plural form unknown for ["+r+"]");return function(){return"other"}}return i[a]}(l));var p="["+u._pluralRules(d)+"]";0===d&&c+"[zero]"in i?r=i[c+"[zero]"][h]:1==d&&c+"[one]"in i?r=i[c+"[one]"][h]:2==d&&c+"[two]"in i?r=i[c+"[two]"][h]:c+p in i?r=i[c+p][h]:c+"[other]"in i&&(r=i[c+"[other]"][h]);return r};function getL10nData(r,a,o){var l=i[r];if(!l){var u=t.PDFViewerApplicationOptions;(!u||u.get("verbosity")>0)&&globalThis.ngxConsole.warn("Translation for the key #"+r+" is missing.");if(!o)return null;l=o}var c={};for(var h in l){var d=l[h];d=substArguments(d=substIndexes(d,a,r,h),a,r);c[h]=d}return c}function substIndexes(t,r,a,o){var l=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(t);if(!l||!l.length)return t;var c,h=l[1],d=l[2];r&&d in r?c=r[d]:d in i&&(c=i[d]);if(h in u){t=(0,u[h])(t,c,a,o)}return t}function substArguments(t,r,a){return t.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(t,o){if(r&&o in r)return r[o];if(o in i)return i[o];globalThis.ngxConsole.log("argument {{"+o+"}} for #"+a+" is undefined.");return t}))}function translateElement(i){var a=function getL10nAttributes(r){if(!r)return{};var i=r.getAttribute("data-l10n-id"),a=r.getAttribute("data-l10n-args"),o={};if(a)try{o=JSON.parse(a)}catch(r){var l=t.PDFViewerApplicationOptions;(!l||l.get("verbosity")>0)&&globalThis.ngxConsole.warn("could not parse arguments for #"+i)}return{id:i,args:o}}(i);if(a.id){var l=getL10nData(a.id,a.args);if(l){if(l[o]){if(0===function getChildElementCount(t){if(t.children)return t.children.length;if(void 0!==t.childElementCount)return t.childElementCount;for(var r=0,i=0;i<t.childNodes.length;i++)r+=1===t.nodeType?1:0;return r}(i))i[o]=l[o];else{for(var u=i.childNodes,c=!1,h=0,d=u.length;h<d;h++)if(3===u[h].nodeType&&/\S/.test(u[h].nodeValue))if(c)u[h].nodeValue="";else{u[h].nodeValue=l[o];c=!0}if(!c){var p=r.createTextNode(l[o]);i.prepend(p)}}delete l[o]}for(var v in l)i[v]=l[v]}else{var y=t.PDFViewerApplicationOptions;(!y||y.get("verbosity")>0)&&globalThis.ngxConsole.warn("#"+a.id+" is undefined.")}}}return{get:function get(t,r,i){var a,l=t.lastIndexOf("."),u=o;if(l>0){u=t.substring(l+1);t=t.substring(0,l)}i&&((a={})[u]=i);var c=getL10nData(t,r,a);return c&&u in c?c[u]:"{{"+t+"}}"},getData:function getData(){return i},getText:function getText(){return a},getLanguage:function getLanguage(){return l},setLanguage:function setLanguage(t,r){loadLocale(t,(function(){r&&r()}))},getDirection:function getDirection(){var t=l.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(t)>=0?"rtl":"ltr"},translate:function translateFragment(t){for(var i=function getTranslatableChildren(t){return t?t.querySelectorAll("*[data-l10n-id]"):[]}(t=t||r.documentElement),a=i.length,o=0;o<a;o++)translateElement(i[o]);translateElement(t)},getReadyState:function getReadyState(){return c},ready:function ready(i){i&&("complete"==c||"interactive"==c?t.setTimeout((function(){i()})):r.addEventListener&&r.addEventListener("localized",(function once(){r.removeEventListener("localized",once);i()})))}}}(window,document)},(t,r,i)=>{var a=i(67),o=i(375);a({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},(t,r,i)=>{var a=i(116),o=i(34),l=i(6),u=i(213),c=i(31),h=i(11),d=i(202),p=i(10),v=i(147),y=i(249),g=i(56),m=i(94),b=i(38),w=i(101),P=i(215),A=i(207),S=i(209),E=i(8),x=S.UNSUPPORTED_Y,D=4294967295,k=Math.min,C=[].push,T=l(/./.exec),I=l(C),O=l("".slice);u("split",(function(t,r,i){var l;l="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var l=m(p(this)),u=void 0===i?D:i>>>0;if(0===u)return[];if(void 0===t)return[l];if(!d(t))return o(r,l,t,u);for(var c,h,v,y=[],g=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),b=0,P=new RegExp(t.source,g+"g");c=o(A,P,l);){if((h=P.lastIndex)>b){I(y,O(l,b,c.index));c.length>1&&c.index<l.length&&a(C,y,w(c,1));v=c[0].length;b=h;if(y.length>=u)break}P.lastIndex===c.index&&P.lastIndex++}b===l.length?!v&&T(P,"")||I(y,""):I(y,O(l,b));return y.length>u?w(y,0,u):y}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:o(r,this,t,i)}:r;return[function split(r,i){var a=p(this),u=h(r)?void 0:b(r,t);return u?o(u,r,a,i):o(l,m(a),r,i)},function(t,a){var o=c(this),u=m(t),h=i(l,o,u,a,l!==r);if(h.done)return h.value;var d=v(o,RegExp),p=o.unicode,b=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(x?"g":"y"),w=new d(x?"^(?:"+o.source+")":o,b),A=void 0===a?D:a>>>0;if(0===A)return[];if(0===u.length)return null===P(w,u)?[u]:[];for(var S=0,E=0,C=[];E<u.length;){w.lastIndex=x?0:E;var T,M=P(w,x?O(u,E):u);if(null===M||(T=k(g(w.lastIndex+(x?E:0)),u.length))===S)E=y(u,E,p);else{I(C,O(u,S,E));if(C.length===A)return C;for(var L=1;L<=M.length-1;L++){I(C,M[L]);if(C.length===A)return C}E=S=T}}I(C,O(u,S));return C}]}),!!E((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),x)},(t,r,i)=>{i(135);i(136);i(98);i(120);i(126);i(138);i(1);i(42);i(92);i(95);i(175);i(176);i(177);i(178);i(190);i(179);i(182);i(185);i(187);i(195);i(196);i(197);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}Object.defineProperty(r,"__esModule",{value:!0});r.GenericScripting=void 0;r.docProperties=function docProperties(t){return _docProperties.apply(this,arguments)};i(88);i(142);var a=i(286);function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(i),!0).forEach((function(r){_defineProperty(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}function _defineProperty(t,r,i){(r=_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i;return t}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return t};var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,r,i){t[r]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,r,i){return Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,i){return t[r]=i}}function wrap(t,r,i,o){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(o||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,i,c)}),u}function tryCatch(t,r,i){try{return{type:"normal",arg:t.call(r,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var d={};define(d,l,(function(){return this}));var p=Object.getPrototypeOf,v=p&&p(p(values([])));v&&v!==r&&i.call(v,l)&&(d=v);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(d);function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}function AsyncIterator(t,r){function invoke(a,o,l,u){var c=tryCatch(t[a],t,o);if("throw"!==c.type){var h=c.arg,d=h.value;return d&&"object"==_typeof(d)&&i.call(d,"__await")?r.resolve(d.__await).then((function(t){invoke("next",t,l,u)}),(function(t){invoke("throw",t,l,u)})):r.resolve(d).then((function(t){h.value=t,l(h)}),(function(t){return invoke("throw",t,l,u)}))}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r((function(r,a){invoke(t,i,r,a)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(t,r,i){var a="suspendedStart";return function(o,l){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===o)throw l;return{value:void 0,done:!0}}for(i.method=o,i.arg=l;;){var u=i.delegate;if(u){var c=maybeInvokeDelegate(u,i);if(c){if(c===h)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===a)throw a="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a="executing";var d=tryCatch(t,r,i);if("normal"===d.type){if(a=i.done?"completed":"suspendedYield",d.arg===h)continue;return{value:d.arg,done:i.done}}"throw"===d.type&&(a="completed",i.method="throw",i.arg=d.arg)}}}function maybeInvokeDelegate(t,r){var i=r.method,a=t.iterator[i];if(void 0===a)return r.delegate=null,"throw"===i&&t.iterator.return&&(r.method="return",r.arg=void 0,maybeInvokeDelegate(t,r),"throw"===r.method)||"return"!==i&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var o=tryCatch(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var l=o.arg;return l?l.done?(r[t.resultName]=l.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,h):l:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function next(){for(;++a<t.length;)if(i.call(t,a))return next.value=t[a],next.done=!1,next;return next.value=void 0,next.done=!0,next};return o.next=o}}throw new TypeError(_typeof(t)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(y,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,u,(function(){return this})),t.AsyncIterator=AsyncIterator,t.async=function(r,i,a,o,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(r,i,a,o),l);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),define(y,l,(function(){return this})),define(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=Object(t),i=[];for(var a in r)i.push(a);return i.reverse(),function next(){for(;i.length;){var t=i.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(i,a){return l.type="throw",l.arg=t,r.next=i,a&&(r.method="next",r.arg=void 0),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var l=o;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,h):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),h},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),resetTryEntry(i),h}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc===t){var a=i.completion;if("throw"===a.type){var o=a.arg;resetTryEntry(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,i){return this.delegate={iterator:values(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===_typeof(r)?r:String(r)}function asyncGeneratorStep(t,r,i,a,o,l,u){try{var c=t[l](u),h=c.value}catch(t){i(t);return}c.done?r(h):Promise.resolve(h).then(a,o)}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(a,o){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,a,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,a,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _docProperties(){return(_docProperties=_asyncToGenerator(_regeneratorRuntime().mark((function _callee4(t){var r,i,o,l,u,c,h,d,p;return _regeneratorRuntime().wrap((function _callee4$(v){for(;;)switch(v.prev=v.next){case 0:i=(r="").split("#")[0];v.next=3;return t.getMetadata();case 3:o=v.sent;l=o.info;u=o.metadata;c=o.contentDispositionFilename;if(h=o.contentLength){v.next=14;break}v.next=11;return t.getDownloadInfo();case 11:d=v.sent;p=d.length;h=p;case 14:return v.abrupt("return",_objectSpread(_objectSpread({},l),{},{baseURL:i,filesize:h,filename:c||(0,a.getPdfFilenameFromUrl)(r),metadata:null==u?void 0:u.getRaw(),authors:null==u?void 0:u.get("dc:creator"),numPages:t.numPages,URL:r}));case 15:case"end":return v.stop()}}),_callee4)})))).apply(this,arguments)}var o=function(){function GenericScripting(t){!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GenericScripting);this._ready=(0,a.loadScript)(t,!0).then((function(){return window.pdfjsSandbox.QuickJSSandbox()}))}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(GenericScripting,[{key:"createSandbox",value:(i=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:r.next=2;return this._ready;case 2:r.sent.create(t);case 4:case"end":return r.stop()}}),_callee,this)}))),function createSandbox(t){return i.apply(this,arguments)})},{key:"dispatchEventInSandbox",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r;return _regeneratorRuntime().wrap((function _callee2$(i){for(;;)switch(i.prev=i.next){case 0:i.next=2;return this._ready;case 2:r=i.sent;setTimeout((function(){return r.dispatchEvent(t)}),0);case 4:case"end":return i.stop()}}),_callee2,this)}))),function dispatchEventInSandbox(t){return r.apply(this,arguments)})},{key:"destroySandbox",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){return _regeneratorRuntime().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:t.next=2;return this._ready;case 2:t.sent.nukeSandbox();case 4:case"end":return t.stop()}}),_callee3,this)}))),function destroySandbox(){return t.apply(this,arguments)})}]);var t,r,i;return GenericScripting}();r.GenericScripting=o},(t,r,i)=>{function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}i(98);i(120);i(1);i(179);i(185);i(222);i(192);i(135);i(136);i(138);Object.defineProperty(r,"__esModule",{value:!0});r.PDFPrintService=void 0;i(206);i(219);i(42);i(88);i(142);i(92);i(95);i(198);i(216);i(225);i(232);i(233);i(234);i(235);i(199);i(200);i(126);var a=i(286),o=i(191),l=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(i(337)),u=i(418),c=i(339);function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(t,(o=a.key,l=void 0,l=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var a=i.call(t,r||"default");if("object"!==_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(o,"string"),"symbol"===_typeof(l)?l:String(l)),a)}var o,l}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,o,l,u,c=[],h=!0,d=!1;try{if(l=(i=i.call(t)).next,0===r){if(Object(i)!==i)return;h=!1}else for(;!(h=(a=l.call(i)).done)&&(c.push(a.value),c.length!==r);h=!0);}catch(t){d=!0,o=t}finally{try{if(!h&&null!=i.return&&(u=i.return(),Object(u)!==u))return}finally{if(d)throw o}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}var h=null,d=null,p=null;function renderPage(t,r,i,o,u,d,p){var v=h.scratchCanvas,y=u/a.PixelsPerInch.PDF,g=1,m=Math.floor(o.width*y),b=Math.floor(o.height*y);if(m>=4096||b>=4096){if(!l.default.test({width:m,height:b})){var w=function determineMaxDimensions(){for(var t=0,r=[4096,8192,10836,11180,11402,14188,16384];t<r.length;t++){var i=r[t];if(!l.default.test({width:i+1,height:i+1}))return i}return 16384}();g=.95*Math.min(w/m,w/b)}(0,c.warn)("Page "+i+": Reduced the [printResolution] to "+Math.floor(u*g)+" because the browser can't render larger canvases. If you see blank page in the print preview, reduce [printResolution] manually to a lower value.")}y*=g;v.width=Math.floor(o.width*y);v.height=Math.floor(o.height*y);var P=window.pdfDefaultOptions.activateWillReadFrequentlyFlag?{willReadFrequently:!0}:void 0,A=v.getContext("2d",P);A.save();A.fillStyle="rgb(255, 255, 255)";A.fillRect(0,0,v.width,v.height);A.restore();return Promise.all([r.getPage(i),p]).then((function(t){var r=_slicedToArray(t,2),i=r[0],l=r[1],u={canvasContext:A,transform:[y,0,0,y,0,0],viewport:i.getViewport({scale:1,rotation:o.rotation}),intent:"print",annotationMode:a.AnnotationMode.ENABLE_STORAGE,optionalContentConfigPromise:d,printAnnotationStorage:l};return i.render(u).promise}))}var v=function(){function PDFPrintService(t,r,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments.length>6?arguments[6]:void 0,c=arguments.length>7?arguments[7]:void 0;!function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,PDFPrintService);this.pdfDocument=t;this.pagesOverview=r;this.printContainer=i;this._printResolution=a||150;this._optionalContentConfigPromise=o||t.getOptionalContentConfig();this._printAnnotationStoragePromise=l||Promise.resolve();this.l10n=u;this.currentPage=-1;this.scratchCanvas=document.createElement("canvas");this.eventBus=c}!function _createClass(t,r,i){r&&_defineProperties(t.prototype,r);i&&_defineProperties(t,i);Object.defineProperty(t,"prototype",{writable:!1});return t}(PDFPrintService,[{key:"layout",value:function layout(){this.throwIfInactive();var t=document.querySelector("body");t.setAttribute("data-pdfjsprinting",!0);document.querySelector("html").setAttribute("data-pdfjsprinting",!0);var r=this.pagesOverview[0],i=r.width,a=r.height;this.pagesOverview.every((function(t){return t.width===i&&t.height===a}))||globalThis.ngxConsole.warn("Not all pages have the same size. The printed result may be incorrect!");this.pageStyleSheet=document.createElement("style");this.pageStyleSheet.textContent="@page { size: ".concat(i,"pt ").concat(a,"pt;}");t.append(this.pageStyleSheet)}},{key:"destroy",value:function destroy(){if(h===this){this.printContainer.textContent="";document.querySelector("body").removeAttribute("data-pdfjsprinting");document.querySelector("html").removeAttribute("data-pdfjsprinting");if(this.pageStyleSheet){this.pageStyleSheet.remove();this.pageStyleSheet=null}this.scratchCanvas.width=this.scratchCanvas.height=0;this.scratchCanvas=null;h=null;ensureOverlay().then((function(){p.active===d&&p.close(d)}))}}},{key:"renderPages",value:function renderPages(){var t=this;if(this.pdfDocument.isPureXfa){(0,u.getXfaHtmlForPrinting)(this.printContainer,this.pdfDocument);return Promise.resolve()}var r=this.pagesOverview.length;return new Promise((function renderNextPage(i,a){t.throwIfInactive();for(;;){++t.currentPage;if(t.currentPage>=r)break;if(!window.isInPDFPrintRange||window.isInPDFPrintRange(t.currentPage))break}if(t.currentPage>=r){renderProgress(window.filteredPageCount|r,window.filteredPageCount|r,t.l10n,t.eventBus);i()}else{var o=t.currentPage;renderProgress(o,window.filteredPageCount|r,t.l10n,t.eventBus);renderPage(0,t.pdfDocument,o+1,t.pagesOverview[o],t._printResolution,t._optionalContentConfigPromise,t._printAnnotationStoragePromise).then(t.useRenderedPage.bind(t)).then((function(){renderNextPage(i,a)}),a)}}))}},{key:"useRenderedPage",value:function useRenderedPage(){this.throwIfInactive();var t=document.createElement("img"),r=this.scratchCanvas;"toBlob"in r?r.toBlob((function(r){t.src=URL.createObjectURL(r)})):t.src=r.toDataURL();var i=document.createElement("div");i.className="printedPage";i.append(t);this.printContainer.append(i);return new Promise((function(r,i){t.onload=r;t.onerror=i}))}},{key:"performPrint",value:function performPrint(){var t=this;this.throwIfInactive();return new Promise((function(r){setTimeout((function(){if(t.active){g.call(window);var i=navigator.platform&&["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document;setTimeout(r,i?1500:20)}else r()}),0)}))}},{key:"active",get:function get(){return this===h}},{key:"throwIfInactive",value:function throwIfInactive(){if(!this.active)throw new Error("This print request was cancelled or completed.")}}]);return PDFPrintService}();r.PDFPrintService=v;var y,g=window.print;window.printPDF=function printPdf(){if(o.PDFViewerApplication.enablePrint)if(h)globalThis.ngxConsole.warn("Ignored window.printPDF() because of a pending print job.");else{ensureOverlay().then((function(){h&&p.open(d)}));try{dispatchEvent("beforeprint")}finally{if(!h){globalThis.ngxConsole.error("Expected print service to be initialized.");ensureOverlay().then((function(){p.active===d&&p.close(d)}));return}var t=h;h.renderPages().then((function(){var r=document.getElementById("printServiceDialog");r&&r.classList.add("hidden");return t.performPrint()})).catch((function(){})).then((function(){t.active&&abort()}))}}};function dispatchEvent(t){var r=new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:"custom"});window.dispatchEvent(r)}function abort(){if(h){h.destroy();dispatchEvent("afterprint")}}function renderProgress(t,r,i,a){d=document.getElementById("printServiceDialog");var o=Math.round(100*t/r),l=d.querySelector("progress"),u=d.querySelector(".relative-progress");l.value=o;i.get("print_progress_percent",{progress:o}).then((function(t){u.textContent=t}));a.dispatch("progress",{source:this,type:"print",total:r,page:t,percent:100*t/r})}window.addEventListener("keydown",(function(t){if(80===t.keyCode&&(t.ctrlKey||t.metaKey)&&!t.altKey&&(!t.shiftKey||window.chrome||window.opera)){window.print();t.preventDefault();t.stopImmediatePropagation()}}),!0);if("onbeforeprint"in window){var m=function stopPropagationIfNeeded(t){"custom"!==t.detail&&t.stopImmediatePropagation()};window.addEventListener("beforeprint",m);window.addEventListener("afterprint",m)}function ensureOverlay(){if(!y){if(!(p=o.PDFViewerApplication.overlayManager))throw new Error("The overlay manager has not yet been initialized.");d=document.getElementById("printServiceDialog");y=p.register(d,!0);document.getElementById("printCancel").onclick=abort;d.addEventListener("close",abort)}return y}o.PDFPrintServiceFactory.instance={supportsPrinting:!0,createPrintService:function createPrintService(t,r,i,a,o,l,u,c){if(h)throw new Error("The print service is created and active.");return h=new v(t,r,i,a,o,l,u,c)}}},(t,r,i)=>{i(185);i(88);i(222);i(192);i(92);i(206);i(219);i(98);i(120);i(1);i(42);i(95);i(126);Object.defineProperty(r,"__esModule",{value:!0});r.getXfaHtmlForPrinting=function getXfaHtmlForPrinting(t,r){var i,u=r.allXfaHtml,c=new o.SimpleLinkService,h=Math.round(100*a.PixelsPerInch.PDF_TO_CSS_UNITS)/100,d=function _createForOfIteratorHelper(t,r){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function _unsupportedIterableToArray(t,r){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}(t))||r&&t&&"number"==typeof t.length){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();u=t.done;return t},e:function e(t){c=!0;l=t},f:function f(){try{u||null==i.return||i.return()}finally{if(c)throw l}}}}(u.children);try{for(d.s();!(i=d.n()).done;){var p=i.value,v=document.createElement("div");v.className="xfaPrintedPage";t.append(v);var y=new l.XfaLayerBuilder({pageDiv:v,pdfPage:null,annotationStorage:r.annotationStorage,linkService:c,xfaHtml:p}),g=(0,a.getXfaPageViewport)(p,{scale:h});y.render(g,"print")}}catch(t){d.e(t)}finally{d.f()}};var a=i(286),o=i(291),l=i(406);function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}}],r={};function __webpack_require__(i){var a=r[i];if(void 0!==a)return a.exports;var o=r[i]={exports:{}};t[i].call(o.exports,o,o.exports,__webpack_require__);return o.exports}var i={};(()=>{var t=i;Object.defineProperty(t,"__esModule",{value:!0});Object.defineProperty(t,"PDFViewerApplication",{enumerable:!0,get:function get(){return c.PDFViewerApplication}});t.PDFViewerApplicationConstants=void 0;Object.defineProperty(t,"PDFViewerApplicationOptions",{enumerable:!0,get:function get(){return l.AppOptions}});__webpack_require__(1);__webpack_require__(42);__webpack_require__(88);__webpack_require__(92);__webpack_require__(95);__webpack_require__(98);__webpack_require__(120);__webpack_require__(121);__webpack_require__(417);var r,a,o=__webpack_require__(239),l=__webpack_require__(288),u=__webpack_require__(291),c=__webpack_require__(191),h={LinkTarget:u.LinkTarget,RenderingStates:o.RenderingStates,ScrollMode:o.ScrollMode,SpreadMode:o.SpreadMode};t.PDFViewerApplicationConstants=h;window.PDFViewerApplication=c.PDFViewerApplication;window.PDFViewerApplicationConstants=h;window.PDFViewerApplicationOptions=l.AppOptions;HTMLCollection.prototype[Symbol.iterator]||(HTMLCollection.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator]);"function"!=typeof window.CustomEvent&&(window.CustomEvent=function CustomEvent(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail);return i});null===(r=(a=document).blockUnblockOnload)||void 0===r||r.call(a,!0);window.webViewerLoad=function webViewerLoad(){var t=function getViewerConfiguration(){return{appContainer:document.body,mainContainer:document.getElementById("viewerContainer"),viewerContainer:document.getElementById("viewer"),toolbar:{container:document.getElementById("toolbarViewer"),numPages:document.getElementById("numPages"),pageNumber:document.getElementById("pageNumber"),scaleSelect:document.getElementById("scaleSelect"),customScaleOption:document.getElementById("customScaleOption"),previous:document.getElementById("previous"),next:document.getElementById("next"),zoomIn:document.getElementById("zoomIn"),zoomOut:document.getElementById("zoomOut"),viewFind:document.getElementById("viewFind"),openFile:document.getElementById("openFile"),print:document.getElementById("print"),editorFreeTextButton:document.getElementById("editorFreeText"),editorFreeTextParamsToolbar:document.getElementById("editorFreeTextParamsToolbar"),editorInkButton:document.getElementById("editorInk"),editorInkParamsToolbar:document.getElementById("editorInkParamsToolbar"),editorStampButton:document.getElementById("editorStamp"),presentationModeButton:document.getElementById("presentationMode"),editorStampParamsToolbar:document.getElementById("editorStampParamsToolbar"),download:document.getElementById("download")},secondaryToolbar:{toolbar:document.getElementById("secondaryToolbar"),toggleButton:document.getElementById("secondaryToolbarToggle"),presentationModeButton:document.getElementById("secondaryPresentationMode"),openFileButton:document.getElementById("secondaryOpenFile"),printButton:document.getElementById("secondaryPrint"),downloadButton:document.getElementById("secondaryDownload"),viewBookmarkButton:document.getElementById("viewBookmark"),firstPageButton:document.getElementById("firstPage"),lastPageButton:document.getElementById("lastPage"),pageRotateCwButton:document.getElementById("pageRotateCw"),pageRotateCcwButton:document.getElementById("pageRotateCcw"),cursorSelectToolButton:document.getElementById("cursorSelectTool"),cursorHandToolButton:document.getElementById("cursorHandTool"),scrollPageButton:document.getElementById("scrollPage"),scrollVerticalButton:document.getElementById("scrollVertical"),scrollHorizontalButton:document.getElementById("scrollHorizontal"),scrollWrappedButton:document.getElementById("scrollWrapped"),spreadNoneButton:document.getElementById("spreadNone"),spreadOddButton:document.getElementById("spreadOdd"),spreadEvenButton:document.getElementById("spreadEven"),documentPropertiesButton:document.getElementById("documentProperties")},sidebar:{outerContainer:document.getElementById("outerContainer"),sidebarContainer:document.getElementById("sidebarContainer"),toggleButton:document.getElementById("sidebarToggle"),resizer:document.getElementById("sidebarResizer"),thumbnailButton:document.getElementById("viewThumbnail"),outlineButton:document.getElementById("viewOutline"),attachmentsButton:document.getElementById("viewAttachments"),layersButton:document.getElementById("viewLayers"),thumbnailView:document.getElementById("thumbnailView"),outlineView:document.getElementById("outlineView"),attachmentsView:document.getElementById("attachmentsView"),layersView:document.getElementById("layersView"),outlineOptionsContainer:document.getElementById("outlineOptionsContainer"),currentOutlineItemButton:document.getElementById("currentOutlineItem")},findBar:{bar:document.getElementById("findbar"),toggleButton:document.getElementById("viewFind"),findField:document.getElementById("findInput"),highlightAllCheckbox:document.getElementById("findHighlightAll"),caseSensitiveCheckbox:document.getElementById("findMatchCase"),matchDiacriticsCheckbox:document.getElementById("findMatchDiacritics"),entireWordCheckbox:document.getElementById("findEntireWord"),findMsg:document.getElementById("findMsg"),findResultsCount:document.getElementById("findResultsCount"),findPreviousButton:document.getElementById("findPrevious"),findNextButton:document.getElementById("findNext")},passwordOverlay:{dialog:document.getElementById("passwordDialog"),label:document.getElementById("passwordText"),input:document.getElementById("password"),submitButton:document.getElementById("passwordSubmit"),cancelButton:document.getElementById("passwordCancel")},documentProperties:{dialog:document.getElementById("documentPropertiesDialog"),closeButton:document.getElementById("documentPropertiesClose"),fields:{fileName:document.getElementById("fileNameField"),fileSize:document.getElementById("fileSizeField"),title:document.getElementById("titleField"),author:document.getElementById("authorField"),subject:document.getElementById("subjectField"),keywords:document.getElementById("keywordsField"),creationDate:document.getElementById("creationDateField"),modificationDate:document.getElementById("modificationDateField"),creator:document.getElementById("creatorField"),producer:document.getElementById("producerField"),version:document.getElementById("versionField"),pageCount:document.getElementById("pageCountField"),pageSize:document.getElementById("pageSizeField"),linearized:document.getElementById("linearizedField")}},annotationEditorParams:{editorFreeTextFontSize:document.getElementById("editorFreeTextFontSize"),editorFreeTextColor:document.getElementById("editorFreeTextColor"),editorInkColor:document.getElementById("editorInkColor"),editorInkThickness:document.getElementById("editorInkThickness"),editorInkOpacity:document.getElementById("editorInkOpacity"),editorStampAddImage:document.getElementById("editorStampAddImage")},printContainer:document.getElementById("printContainer"),openFileInput:document.getElementById("fileInput"),debuggerScriptPath:"./debugger.js"}}(),r=new CustomEvent("webviewerloaded",{bubbles:!0,cancelable:!0,detail:{source:window}});try{parent.document.dispatchEvent(r)}catch(t){console.error("webviewerloaded: ".concat(t));document.dispatchEvent(r)}c.PDFViewerApplication.run(t)}})()})();
});