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.
22 lines • 1.85 MB
JavaScript
/**
* @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?module.exports=t.pdfjsWorker=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],(()=>t.pdfjsWorker=r())):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=t.pdfjsWorker=r():t["pdfjs-dist/build/pdf.worker"]=t.pdfjsWorker=r()}(globalThis,(()=>(()=>{"use strict";var t=[,(t,r,o)=>{o(2);o(54);o(56);o(104);o(105);o(113);o(114);o(123);o(129);o(130);o(131);o(132);o(133);o(134);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.WorkerTask=r.WorkerMessageHandler=void 0;o(137);o(143);o(145);o(174);o(175);o(177);o(180);o(182);o(187);o(188);o(189);o(190);o(198);o(217);o(218);o(221);o(222);o(223);o(227);o(228);o(229);o(231);o(232);o(233);o(234);o(235);o(236);o(237);o(240);o(241);o(243);o(244);o(245);o(246);o(247);o(248);o(253);o(254);o(256);o(257);o(258);o(260);o(263);o(268);o(269);o(277);o(287);o(289);o(291);o(293);o(295);o(297);o(299);o(302);o(304);o(305);o(306);o(308);o(309);o(310);o(311);o(313);o(314);var c=o(315),l=o(354),u=o(361),h=o(366),d=o(379),y=o(470),g=o(463),m=o(509),v=o(510);function _toArray(t){return _arrayWithHoles(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||_nonIterableRest()}function _regeneratorRuntime(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},o=Object.prototype,c=o.hasOwnProperty,l=Object.defineProperty||function(t,r,o){t[r]=o.value},u="function"==typeof Symbol?Symbol:{},h=u.iterator||"@@iterator",d=u.asyncIterator||"@@asyncIterator",y=u.toStringTag||"@@toStringTag";function define(t,r,o){return Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,o){return t[r]=o}}function wrap(t,r,o,c){var u=r&&r.prototype instanceof Generator?r:Generator,h=Object.create(u.prototype),d=new Context(c||[]);return l(h,"_invoke",{value:makeInvokeMethod(t,o,d)}),h}function tryCatch(t,r,o){try{return{type:"normal",arg:t.call(r,o)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var g="suspendedStart",m="suspendedYield",v="executing",w="completed",_={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var k={};define(k,h,(function(){return this}));var S=Object.getPrototypeOf,C=S&&S(S(values([])));C&&C!==o&&c.call(C,h)&&(k=C);var x=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(k);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(o,l,u,h){var d=tryCatch(t[o],t,l);if("throw"!==d.type){var y=d.arg,g=y.value;return g&&"object"==_typeof(g)&&c.call(g,"__await")?r.resolve(g.__await).then((function(t){invoke("next",t,u,h)}),(function(t){invoke("throw",t,u,h)})):r.resolve(g).then((function(t){y.value=t,u(y)}),(function(t){return invoke("throw",t,u,h)}))}h(d.arg)}var o;l(this,"_invoke",{value:function value(t,c){function callInvokeWithMethodAndArg(){return new r((function(r,o){invoke(t,c,r,o)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,o,c){var l=g;return function(u,h){if(l===v)throw new Error("Generator is already running");if(l===w){if("throw"===u)throw h;return{value:t,done:!0}}for(c.method=u,c.arg=h;;){var d=c.delegate;if(d){var y=maybeInvokeDelegate(d,c);if(y){if(y===_)continue;return y}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(l===g)throw l=w,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);l=v;var k=tryCatch(r,o,c);if("normal"===k.type){if(l=c.done?w:m,k.arg===_)continue;return{value:k.arg,done:c.done}}"throw"===k.type&&(l=w,c.method="throw",c.arg=k.arg)}}}function maybeInvokeDelegate(r,o){var c=o.method,l=r.iterator[c];if(l===t)return o.delegate=null,"throw"===c&&r.iterator.return&&(o.method="return",o.arg=t,maybeInvokeDelegate(r,o),"throw"===o.method)||"return"!==c&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+c+"' method")),_;var u=tryCatch(l,r.iterator,o.arg);if("throw"===u.type)return o.method="throw",o.arg=u.arg,o.delegate=null,_;var h=u.arg;return h?h.done?(o[r.resultName]=h.value,o.next=r.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,_):h:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,_)}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(r){if(r||""===r){var o=r[h];if(o)return o.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var l=-1,u=function next(){for(;++l<r.length;)if(c.call(r,l))return next.value=r[l],next.done=!1,next;return next.value=t,next.done=!0,next};return u.next=u}}throw new TypeError(_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,l(x,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),l(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,y,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,y,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,d,(function(){return this})),r.AsyncIterator=AsyncIterator,r.async=function(t,o,c,l,u){void 0===u&&(u=Promise);var h=new AsyncIterator(wrap(t,o,c,l),u);return r.isGeneratorFunction(o)?h:h.next().then((function(t){return t.done?t.value:h.next()}))},defineIteratorMethods(x),define(x,y,"Generator"),define(x,h,(function(){return this})),define(x,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),o=[];for(var c in r)o.push(c);return o.reverse(),function next(){for(;o.length;){var t=o.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var o in this)"t"===o.charAt(0)&&c.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},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(r){if(this.done)throw r;var o=this;function handle(c,l){return h.type="throw",h.arg=r,o.next=c,l&&(o.method="next",o.arg=t),!!l}for(var l=this.tryEntries.length-1;l>=0;--l){var u=this.tryEntries[l],h=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var d=c.call(u,"catchLoc"),y=c.call(u,"finallyLoc");if(d&&y){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(d){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!y)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o];if(l.tryLoc<=this.prev&&c.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var u=l;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var h=u?u.completion:{};return h.type=t,h.arg=r,u?(this.method="next",this.next=u.finallyLoc,_):this.complete(h)},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),_},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),resetTryEntry(o),_}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc===t){var c=o.completion;if("throw"===c.type){var l=c.arg;resetTryEntry(o)}return l}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(r,o,c){return this.delegate={iterator:values(r),resultName:o,nextLoc:c},"next"===this.method&&(this.arg=t),_}},r}function _createForOfIteratorHelper(t,r){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){o&&(t=o);var c=0,l=function F(){};return{s:l,n:function n(){return c>=t.length?{done:!0}:{done:!1,value:t[c++]}},e:function e(t){throw t},f:l}}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 u,h=!0,d=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();h=t.done;return t},e:function e(t){d=!0;u=t},f:function f(){try{h||null==o.return||o.return()}finally{if(d)throw u}}}}function _slicedToArray(t,r){return _arrayWithHoles(t)||function _iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var c,l,u,h,d=[],y=!0,g=!1;try{if(u=(o=o.call(t)).next,0===r){if(Object(o)!==o)return;y=!1}else for(;!(y=(c=u.call(o)).done)&&(d.push(c.value),d.length!==r);y=!0);}catch(t){g=!0,l=t}finally{try{if(!y&&null!=o.return&&(h=o.return(),Object(h)!==h))return}finally{if(g)throw l}}return d}}(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 o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);return"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,c=new Array(r);o<r;o++)c[o]=t[o];return c}function _arrayWithHoles(t){if(Array.isArray(t))return t}function asyncGeneratorStep(t,r,o,c,l,u,h){try{var d=t[u](h),y=d.value}catch(t){o(t);return}d.done?r(y):Promise.resolve(y).then(c,l)}function _asyncToGenerator(t){return function(){var r=this,o=arguments;return new Promise((function(c,l){var u=t.apply(r,o);function _next(t){asyncGeneratorStep(u,c,l,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,c,l,_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 o=0;o<r.length;o++){var c=r[o];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(t,(l=c.key,u=void 0,u=function _toPrimitive(t,r){if("object"!==_typeof(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var c=o.call(t,r||"default");if("object"!==_typeof(c))return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(l,"string"),"symbol"===_typeof(u)?u:String(u)),c)}var l,u}function _createClass(t,r,o){r&&_defineProperties(t.prototype,r);o&&_defineProperties(t,o);Object.defineProperty(t,"prototype",{writable:!1});return t}Promise.allSettled||(Promise.allSettled=function(t){var r=t.filter((function(t){return!!t})).map((function(t){return t.then((function(t){return{status:"fulfilled",value:t}})).catch((function(t){return{status:"rejected",reason:t}}))}));return Promise.all(r)});var w=r.WorkerTask=function(){function WorkerTask(t){_classCallCheck(this,WorkerTask);this.name=t;this.terminated=!1;this._capability=new c.PromiseCapability}_createClass(WorkerTask,[{key:"finished",get:function get(){return this._capability.promise}},{key:"finish",value:function finish(){this._capability.resolve()}},{key:"terminate",value:function terminate(){this.terminated=!0}},{key:"ensureNotTerminated",value:function ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}]);return WorkerTask}(),_=r.WorkerMessageHandler=function(){function WorkerMessageHandler(){_classCallCheck(this,WorkerMessageHandler)}_createClass(WorkerMessageHandler,null,[{key:"setup",value:function setup(t,r){var o=!1;t.on("test",(function(r){if(!o){o=!0;t.send("test",r instanceof Uint8Array)}}));t.on("configure",(function(t){(0,c.setVerbosityLevel)(t.verbosity)}));t.on("GetDocRequest",(function(t){return WorkerMessageHandler.createDocumentHandler(t,r)}))}},{key:"createDocumentHandler",value:function createDocumentHandler(t,r){var o,_=!1,k=null,S=new Set,C=(0,c.getVerbosityLevel)(),x=t,O=x.docId,T=x.apiVersion,E="3.10.557";if(T!==E)throw new Error('The API version "'.concat(T,'" does not match ')+'the Worker version "'.concat(E,'".'));var R=[];for(var M in[])R.push(M);if(R.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+R.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");var j=O+"_worker",L=new m.MessageHandler(j,O,r);function ensureNotTerminated(){if(_)throw new Error("Worker was terminated")}function startWorkerTask(t){S.add(t)}function finishWorkerTask(t){t.finish();S.delete(t)}function loadDocument(t){return _loadDocument.apply(this,arguments)}function _loadDocument(){return(_loadDocument=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(t){var r,c,l,u,h,d,y;return _regeneratorRuntime().wrap((function _callee2$(g){for(;;)switch(g.prev=g.next){case 0:g.next=2;return o.ensureDoc("checkHeader");case 2:g.next=4;return o.ensureDoc("parseStartXRef");case 4:g.next=6;return o.ensureDoc("parse",[t]);case 6:g.next=8;return o.ensureDoc("checkFirstPage",[t]);case 8:g.next=10;return o.ensureDoc("checkLastPage",[t]);case 10:g.next=12;return o.ensureDoc("isPureXfa");case 12:if(!(r=g.sent)){g.next=18;break}startWorkerTask(c=new w("loadXfaFonts"));g.next=18;return Promise.all([o.loadXfaFonts(L,c).catch((function(t){})).then((function(){return finishWorkerTask(c)})),o.loadXfaImages()]);case 18:g.next=20;return Promise.all([o.ensureDoc("numPages"),o.ensureDoc("fingerprints")]);case 20:l=g.sent;u=_slicedToArray(l,2);h=u[0];d=u[1];if(!r){g.next=30;break}g.next=27;return o.ensureDoc("htmlForXfa");case 27:g.t0=g.sent;g.next=31;break;case 30:g.t0=null;case 31:y=g.t0;return g.abrupt("return",{numPages:h,fingerprints:d,htmlForXfa:y});case 33:case"end":return g.stop()}}),_callee2)})))).apply(this,arguments)}function getPdfManager(t){var r,o=t.data,u=t.password,d=t.disableAutoFetch,y=t.rangeChunkSize,g=t.length,m=t.docBaseUrl,w=t.enableXfa,_=t.evaluatorOptions,S={source:null,disableAutoFetch:d,docBaseUrl:m,docId:O,enableXfa:w,evaluatorOptions:_,handler:L,length:g,password:u,rangeChunkSize:y},C=new c.PromiseCapability;if(o){try{S.source=o;r=new h.LocalPdfManager(S);C.resolve(r)}catch(t){C.reject(t)}return C.promise}var x,T=[];try{x=new v.PDFWorkerStream(L)}catch(t){C.reject(t);return C.promise}var E=x.getFullReader();E.headersReady.then((function(){if(E.isRangeSupported){S.source=x;S.length=E.contentLength;S.disableAutoFetch||(S.disableAutoFetch=E.isStreamingSupported);r=new h.NetworkPdfManager(S);for(var t=0,o=T;t<o.length;t++){var c=o[t];r.sendProgressiveData(c)}T=[];C.resolve(r);k=null}})).catch((function(t){C.reject(t);k=null}));var R=0;new Promise((function(t,o){E.read().then((function readChunk(t){var u=t.value,d=t.done;try{ensureNotTerminated();if(d){r||function flushChunks(){var t=(0,l.arrayBuffersToBytes)(T);g&&t.length!==g&&(0,c.warn)("reported HTTP length is different from actual");try{S.source=t;r=new h.LocalPdfManager(S);C.resolve(r)}catch(t){C.reject(t)}T=[]}();k=null;return}R+=u.byteLength;E.isStreamingSupported||L.send("DocProgress",{loaded:R,total:Math.max(R,E.contentLength||0)});r?r.sendProgressiveData(u):T.push(u);E.read().then(readChunk,o)}catch(t){o(t)}}),o)})).catch((function(t){C.reject(t);k=null}));k=function cancelXHRs(t){x.cancelAllRequests(t)};return C.promise}L.on("GetPage",(function(t){return o.getPage(t.pageIndex).then((function(t){return Promise.all([o.ensure(t,"rotate"),o.ensure(t,"ref"),o.ensure(t,"userUnit"),o.ensure(t,"view")]).then((function(t){var r=_slicedToArray(t,4);return{rotate:r[0],ref:r[1],userUnit:r[2],view:r[3]}}))}))}));L.on("GetPageIndex",(function(t){var r=u.Ref.get(t.num,t.gen);return o.ensureCatalog("getPageIndex",[r])}));L.on("GetDestinations",(function(t){return o.ensureCatalog("destinations")}));L.on("GetDestination",(function(t){return o.ensureCatalog("getDestination",[t.id])}));L.on("GetPageLabels",(function(t){return o.ensureCatalog("pageLabels")}));L.on("GetPageLayout",(function(t){return o.ensureCatalog("pageLayout")}));L.on("GetPageMode",(function(t){return o.ensureCatalog("pageMode")}));L.on("GetViewerPreferences",(function(t){return o.ensureCatalog("viewerPreferences")}));L.on("GetOpenAction",(function(t){return o.ensureCatalog("openAction")}));L.on("GetAttachments",(function(t){return o.ensureCatalog("attachments")}));L.on("GetDocJSActions",(function(t){return o.ensureCatalog("jsActions")}));L.on("GetPageJSActions",(function(t){var r=t.pageIndex;return o.getPage(r).then((function(t){return o.ensure(t,"jsActions")}))}));L.on("GetOutline",(function(t){return o.ensureCatalog("documentOutline")}));L.on("GetOptionalContentConfig",(function(t){return o.ensureCatalog("optionalContentConfig")}));L.on("GetPermissions",(function(t){return o.ensureCatalog("permissions")}));L.on("GetMetadata",(function(t){return Promise.all([o.ensureDoc("documentInfo"),o.ensureCatalog("metadata")])}));L.on("GetMarkInfo",(function(t){return o.ensureCatalog("markInfo")}));L.on("GetData",(function(t){return o.requestLoadedStream().then((function(t){return t.bytes}))}));L.on("GetAnnotations",(function(t){var r=t.pageIndex,c=t.intent;return o.getPage(r).then((function(t){var o=new w("GetAnnotations: page ".concat(r));startWorkerTask(o);return t.getAnnotationsData(L,o,c).then((function(t){finishWorkerTask(o);return t}),(function(t){finishWorkerTask(o);throw t}))}))}));L.on("GetFieldObjects",(function(t){return o.ensureDoc("fieldObjects")}));L.on("HasJSActions",(function(t){return o.ensureDoc("hasJSActions")}));L.on("GetCalculationOrderIds",(function(t){return o.ensureDoc("calculationOrderIds")}));L.on("SaveDocument",function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){var r,h,y,m,v,_,k,S,C,x,O,T,E;return _regeneratorRuntime().wrap((function _callee$(R){for(;;)switch(R.prev=R.next){case 0:r=t.isPureXfa,h=t.numPages,y=t.annotationStorage,m=t.filename;v=[o.requestLoadedStream(),o.ensureCatalog("acroForm"),o.ensureCatalog("acroFormRef"),o.ensureDoc("startXRef"),o.ensureDoc("linearization")];_=r?null:(0,l.getNewAnnotationsMap)(y);R.next=5;return o.ensureDoc("xref");case 5:k=R.sent;if(!_){R.next=24;break}S=d.AnnotationFactory.generateImages(y.values(),k,o.evaluatorOptions.isOffscreenCanvasSupported);C=_createForOfIteratorHelper(_);R.prev=9;O=_regeneratorRuntime().mark((function _loop(){var t,r,c;return _regeneratorRuntime().wrap((function _loop$(l){for(;;)switch(l.prev=l.next){case 0:t=_slicedToArray(x.value,2),r=t[0],c=t[1];v.push(o.getPage(r).then((function(t){var o=new w("Save (editor): page ".concat(r));return t.saveNewAnnotations(L,o,c,S).finally((function(){finishWorkerTask(o)}))})));case 2:case"end":return l.stop()}}),_loop)}));C.s();case 12:if((x=C.n()).done){R.next=16;break}return R.delegateYield(O(),"t0",14);case 14:R.next=12;break;case 16:R.next=21;break;case 18:R.prev=18;R.t1=R.catch(9);C.e(R.t1);case 21:R.prev=21;C.f();return R.finish(21);case 24:if(!r){R.next=28;break}v.push(o.serializeXfaData(y));R.next=35;break;case 28:T=_regeneratorRuntime().mark((function _loop2(t){return _regeneratorRuntime().wrap((function _loop2$(r){for(;;)switch(r.prev=r.next){case 0:v.push(o.getPage(t).then((function(r){var o=new w("Save: page ".concat(t));return r.save(L,o,y).finally((function(){finishWorkerTask(o)}))})));case 1:case"end":return r.stop()}}),_loop2)}));E=0;case 30:if(!(E<h)){R.next=35;break}return R.delegateYield(T(E),"t2",32);case 32:E++;R.next=30;break;case 35:return R.abrupt("return",Promise.all(v).then((function(t){var o=_toArray(t),l=o[0],h=o[1],d=o[2],y=o[3],v=o[4],w=o.slice(5),_=[],S=null;if(r){if(!(S=w[0]))return l.bytes}else if(0===(_=w.flat(2)).length)return l.bytes;var C=d&&h instanceof u.Dict&&_.some((function(t){return t.needAppearances})),x=h instanceof u.Dict&&h.get("XFA")||null,O=null,T=!1;if(Array.isArray(x)){for(var E=0,R=x.length;E<R;E+=2)if("datasets"===x[E]){O=x[E+1];T=!0}null===O&&(O=k.getNewTemporaryRef())}else x&&(0,c.warn)("Unsupported XFA type.");var M=Object.create(null);if(k.trailer){var j,L=Object.create(null),D=k.trailer.get("Info")||null;D instanceof u.Dict&&D.forEach((function(t,r){"string"==typeof r&&(L[t]=(0,c.stringToPDFString)(r))}));M={rootRef:k.trailer.getRaw("Root")||null,encryptRef:k.trailer.getRaw("Encrypt")||null,newRef:k.getNewTemporaryRef(),infoRef:k.trailer.getRaw("Info")||null,info:L,fileIds:k.trailer.get("ID")||null,startXRef:v?y:null!==(j=k.lastXRefStreamPos)&&void 0!==j?j:y,filename:m}}return(0,g.incrementalUpdate)({originalData:l.bytes,xrefInfo:M,newRefs:_,xref:k,hasXfa:!!x,xfaDatasetsRef:O,hasXfaDatasetsEntry:T,needAppearances:C,acroFormRef:d,acroForm:h,xfaData:S}).finally((function(){k.resetNewTemporaryRef()}))})));case 36:case"end":return R.stop()}}),_callee,null,[[9,18,21,24]])})));return function(r){return t.apply(this,arguments)}}());L.on("GetOperatorList",(function(t,r){var l=t.pageIndex;o.getPage(l).then((function(o){var u=new w("GetOperatorList: page ".concat(l));startWorkerTask(u);var h=C>=c.VerbosityLevel.INFOS?Date.now():0;o.getOperatorList({handler:L,sink:r,task:u,intent:t.intent,cacheKey:t.cacheKey,annotationStorage:t.annotationStorage}).then((function(t){finishWorkerTask(u);h&&(0,c.info)("page=".concat(l+1," - getOperatorList: time=")+"".concat(Date.now()-h,"ms, len=").concat(t.length));r.close()}),(function(t){finishWorkerTask(u);u.terminated||r.error(t)}))}))}));L.on("GetTextContent",(function(t,r){var l=t.pageIndex,u=t.includeMarkedContent,h=t.disableNormalization;o.getPage(l).then((function(t){var o=new w("GetTextContent: page "+l);startWorkerTask(o);var d=C>=c.VerbosityLevel.INFOS?Date.now():0;t.extractTextContent({handler:L,task:o,sink:r,includeMarkedContent:u,disableNormalization:h}).then((function(){finishWorkerTask(o);d&&(0,c.info)("page=".concat(l+1," - getTextContent: time=")+"".concat(Date.now()-d,"ms"));r.close()}),(function(t){finishWorkerTask(o);o.terminated||r.error(t)}))}))}));L.on("GetStructTree",(function(t){return o.getPage(t.pageIndex).then((function(t){return o.ensure(t,"getStructTree")}))}));L.on("FontFallback",(function(t){return o.fontFallback(t.id,L)}));L.on("Cleanup",(function(t){return o.cleanup(!0)}));L.on("Terminate",(function(t){_=!0;var r=[];if(o){o.terminate(new c.AbortException("Worker was terminated."));var l=o.cleanup();r.push(l);o=null}else(0,y.clearGlobalCaches)();k&&k(new c.AbortException("Worker was terminated."));var u,h=_createForOfIteratorHelper(S);try{for(h.s();!(u=h.n()).done;){var d=u.value;r.push(d.finished);d.terminate()}}catch(t){h.e(t)}finally{h.f()}return Promise.all(r).then((function(){L.destroy();L=null}))}));L.on("Ready",(function(r){!function setupDoc(t){function onSuccess(t){ensureNotTerminated();L.send("GetDoc",{pdfInfo:t})}function onFailure(t){ensureNotTerminated();if(t instanceof c.PasswordException){var r=new w("PasswordException: response ".concat(t.code));startWorkerTask(r);L.sendWithPromise("PasswordRequest",t).then((function(t){var c=t.password;finishWorkerTask(r);o.updatePassword(c);pdfManagerReady()})).catch((function(){finishWorkerTask(r);L.send("DocException",t)}))}else t instanceof c.InvalidPDFException||t instanceof c.MissingPDFException||t instanceof c.UnexpectedResponseException||t instanceof c.UnknownErrorException?L.send("DocException",t):L.send("DocException",new c.UnknownErrorException(t.message,t.toString()))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,(function(t){ensureNotTerminated();t instanceof l.XRefParseException?o.requestLoadedStream().then((function(){ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)})):onFailure(t)}))}ensureNotTerminated();getPdfManager(t).then((function(t){if(_){t.terminate(new c.AbortException("Worker was terminated."));throw new Error("Worker was terminated")}(o=t).requestLoadedStream(!0).then((function(t){L.send("DataLoaded",{length:t.bytes.byteLength})}))})).then(pdfManagerReady,onFailure)}(t);t=null}));L.on("showUnverifiedSignatures",(function wphReady(t){t&&(0,c.info)("showUnverifiedSignatures="+t+". This is an incompletely implemented feature. Signatures cannot be validated, so use it at own risk.");self.showUnverifiedSignatures=t}));return j}},{key:"initializeFromPort",value:function initializeFromPort(t){var r=new m.MessageHandler("worker","main",t);WorkerMessageHandler.setup(r,t);r.send("ready",null)}}]);return WorkerMessageHandler}();"undefined"==typeof window&&"undefined"!=typeof self&&function isMessagePort(t){return"function"==typeof t.postMessage&&"onmessage"in t}(self)&&_.initializeFromPort(self)},(t,r,o)=>{var c=o(3),l=o(43);c("toPrimitive");l()},(t,r,o)=>{var c=o(4),l=o(6),u=o(13),h=o(24).f;t.exports=function(t){var r=c.Symbol||(c.Symbol={});l(r,t)||h(r,t,{value:u.f(t)})}},(t,r,o)=>{var c=o(5);t.exports=c},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)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},(t,r,o)=>{var c=o(7),l=o(10),u=c({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,r){return u(l(t),r)}},(t,r,o)=>{var c=o(8),l=Function.prototype,u=l.call,h=c&&l.bind.bind(u,u);t.exports=c?h:function(t){return function(){return u.apply(t,arguments)}}},(t,r,o)=>{var c=o(9);t.exports=!c((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,o)=>{var c=o(11),l=Object;t.exports=function(t){return l(c(t))}},(t,r,o)=>{var c=o(12),l=TypeError;t.exports=function(t){if(c(t))throw new l("Can't call method on "+t);return t}},t=>{t.exports=function(t){return null==t}},(t,r,o)=>{var c=o(14);r.f=c},(t,r,o)=>{var c=o(5),l=o(15),u=o(6),h=o(19),d=o(20),y=o(23),g=c.Symbol,m=l("wks"),v=y?g.for||g:g&&g.withoutSetter||h;t.exports=function(t){u(m,t)||(m[t]=d&&u(g,t)?g[t]:v("Symbol."+t));return m[t]}},(t,r,o)=>{var c=o(16),l=o(17);(t.exports=function(t,r){return l[t]||(l[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.33.3",mode:c?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE",source:"https://github.com/zloirock/core-js"})},t=>{t.exports=!1},(t,r,o)=>{var c=o(5),l=o(18),u="__core-js_shared__",h=c[u]||l(u,{});t.exports=h},(t,r,o)=>{var c=o(5),l=Object.defineProperty;t.exports=function(t,r){try{l(c,t,{value:r,configurable:!0,writable:!0})}catch(o){c[t]=r}return r}},(t,r,o)=>{var c=o(7),l=0,u=Math.random(),h=c(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+h(++l+u,36)}},(t,r,o)=>{var c=o(21),l=o(9),u=o(5).String;t.exports=!!Object.getOwnPropertySymbols&&!l((function(){var t=Symbol("symbol detection");return!u(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&c&&c<41}))},(t,r,o)=>{var c,l,u=o(5),h=o(22),d=u.process,y=u.Deno,g=d&&d.versions||y&&y.version,m=g&&g.v8;m&&(l=(c=m.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1]));!l&&h&&(!(c=h.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=h.match(/Chrome\/(\d+)/))&&(l=+c[1]);t.exports=l},t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(t,r,o)=>{var c=o(20);t.exports=c&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(t,r,o)=>{var c=o(25),l=o(26),u=o(31),h=o(32),d=o(33),y=TypeError,g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,v="enumerable",w="configurable",_="writable";r.f=c?u?function defineProperty(t,r,o){h(t);r=d(r);h(o);if("function"==typeof t&&"prototype"===r&&"value"in o&&_ in o&&!o[_]){var c=m(t,r);if(c&&c[_]){t[r]=o.value;o={configurable:w in o?o[w]:c[w],enumerable:v in o?o[v]:c[v],writable:!1}}}return g(t,r,o)}:g:function defineProperty(t,r,o){h(t);r=d(r);h(o);if(l)try{return g(t,r,o)}catch(t){}if("get"in o||"set"in o)throw new y("Accessors not supported");"value"in o&&(t[r]=o.value);return t}},(t,r,o)=>{var c=o(9);t.exports=!c((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},(t,r,o)=>{var c=o(25),l=o(9),u=o(27);t.exports=!c&&!l((function(){return 7!==Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},(t,r,o)=>{var c=o(5),l=o(28),u=c.document,h=l(u)&&l(u.createElement);t.exports=function(t){return h?u.createElement(t):{}}},(t,r,o)=>{var c=o(29),l=o(30),u=l.all;t.exports=l.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:c(t)||t===u}:function(t){return"object"==typeof t?null!==t:c(t)}},(t,r,o)=>{var c=o(30),l=c.all;t.exports=c.IS_HTMLDDA?function(t){return"function"==typeof t||t===l}:function(t){return"function"==typeof t}},t=>{var r="object"==typeof document&&document.all,o=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:o}},(t,r,o)=>{var c=o(25),l=o(9);t.exports=c&&l((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(t,r,o)=>{var c=o(28),l=String,u=TypeError;t.exports=function(t){if(c(t))return t;throw new u(l(t)+" is not an object")}},(t,r,o)=>{var c=o(34),l=o(36);t.exports=function(t){var r=c(t,"string");return l(r)?r:r+""}},(t,r,o)=>{var c=o(35),l=o(28),u=o(36),h=o(39),d=o(42),y=o(14),g=TypeError,m=y("toPrimitive");t.exports=function(t,r){if(!l(t)||u(t))return t;var o,y=h(t,m);if(y){void 0===r&&(r="default");o=c(y,t,r);if(!l(o)||u(o))return o;throw new g("Can't convert object to primitive value")}void 0===r&&(r="number");return d(t,r)}},(t,r,o)=>{var c=o(8),l=Function.prototype.call;t.exports=c?l.bind(l):function(){return l.apply(l,arguments)}},(t,r,o)=>{var c=o(37),l=o(29),u=o(38),h=o(23),d=Object;t.exports=h?function(t){return"symbol"==typeof t}:function(t){var r=c("Symbol");return l(r)&&u(r.prototype,d(t))}},(t,r,o)=>{var c=o(5),l=o(29);t.exports=function(t,r){return arguments.length<2?(o=c[t],l(o)?o:void 0):c[t]&&c[t][r];var o}},(t,r,o)=>{var c=o(7);t.exports=c({}.isPrototypeOf)},(t,r,o)=>{var c=o(40),l=o(12);t.exports=function(t,r){var o=t[r];return l(o)?void 0:c(o)}},(t,r,o)=>{var c=o(29),l=o(41),u=TypeError;t.exports=function(t){if(c(t))return t;throw new u(l(t)+" is not a function")}},t=>{var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},(t,r,o)=>{var c=o(35),l=o(29),u=o(28),h=TypeError;t.exports=function(t,r){var o,d;if("string"===r&&l(o=t.toString)&&!u(d=c(o,t)))return d;if(l(o=t.valueOf)&&!u(d=c(o,t)))return d;if("string"!==r&&l(o=t.toString)&&!u(d=c(o,t)))return d;throw new h("Can't convert object to primitive value")}},(t,r,o)=>{var c=o(35),l=o(37),u=o(14),h=o(44);t.exports=function(){var t=l("Symbol"),r=t&&t.prototype,o=r&&r.valueOf,d=u("toPrimitive");r&&!r[d]&&h(r,d,(function(t){return c(o,this)}),{arity:1})}},(t,r,o)=>{var c=o(29),l=o(24),u=o(45),h=o(18);t.exports=function(t,r,o,d){d||(d={});var y=d.enumerable,g=void 0!==d.name?d.name:r;c(o)&&u(o,g,d);if(d.global)y?t[r]=o:h(r,o);else{try{d.unsafe?t[r]&&(y=!0):delete t[r]}catch(t){}y?t[r]=o:l.f(t,r,{value:o,enumerable:!1,configurable:!d.nonConfigurable,writable:!d.nonWritable})}return t}},(t,r,o)=>{var c=o(7),l=o(9),u=o(29),h=o(6),d=o(25),y=o(46).CONFIGURABLE,g=o(47),m=o(48),v=m.enforce,w=m.get,_=String,k=Object.defineProperty,S=c("".slice),C=c("".replace),x=c([].join),O=d&&!l((function(){return 8!==k((function(){}),"length",{value:8}).length})),T=String(String).split("String"),E=t.exports=function(t,r,o){"Symbol("===S(_(r),0,7)&&(r="["+C(_(r),/^Symbol\(([^)]*)\)/,"$1")+"]");o&&o.getter&&(r="get "+r);o&&o.setter&&(r="set "+r);(!h(t,"name")||y&&t.name!==r)&&(d?k(t,"name",{value:r,configurable:!0}):t.name=r);O&&o&&h(o,"arity")&&t.length!==o.arity&&k(t,"length",{value:o.arity});try{o&&h(o,"constructor")&&o.constructor?d&&k(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var c=v(t);h(c,"source")||(c.source=x(T,"string"==typeof r?r:""));return t};Function.prototype.toString=E((function toString(){return u(this)&&w(this).source||g(this)}),"toString")},(t,r,o)=>{var c=o(25),l=o(6),u=Function.prototype,h=c&&Object.getOwnPropertyDescriptor,d=l(u,"name"),y=d&&"something"===function something(){}.name,g=d&&(!c||c&&h(u,"name").configurable);t.exports={EXISTS:d,PROPER:y,CONFIGURABLE:g}},(t,r,o)=>{var c=o(7),l=o(29),u=o(17),h=c(Function.toString);l(u.inspectSource)||(u.inspectSource=function(t){return h(t)});t.exports=u.inspectSource},(t,r,o)=>{var c,l,u,h=o(49),d=o(5),y=o(28),g=o(50),m=o(6),v=o(17),w=o(52),_=o(53),k="Object already initialized",S=d.TypeError,C=d.WeakMap;if(h||v.state){var x=v.state||(v.state=new C);x.get=x.get;x.has=x.has;x.set=x.set;c=function(t,r){if(x.has(t))throw new S(k);r.facade=t;x.set(t,r);return r};l=function(t){return x.get(t)||{}};u=function(t){return x.has(t)}}else{var O=w("state");_[O]=!0;c=function(t,r){if(m(t,O))throw new S(k);r.facade=t;g(t,O,r);return r};l=function(t){return m(t,O)?t[O]:{}};u=function(t){return m(t,O)}}t.exports={set:c,get:l,has:u,enforce:function(t){return u(t)?l(t):c(t,{})},getterFor:function(t){return function(r){var o;if(!y(r)||(o=l(r)).type!==t)throw new S("Incompatible receiver, "+t+" required");return o}}}},(t,r,o)=>{var c=o(5),l=o(29),u=c.WeakMap;t.exports=l(u)&&/native code/.test(String(u))},(t,r,o)=>{var c=o(25),l=o(24),u=o(51);t.exports=c?function(t,r,o){return l.f(t,r,u(1,o))}:function(t,r,o){t[r]=o;return t}},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,o)=>{var c=o(15),l=o(19),u=c("keys");t.exports=function(t){return u[t]||(u[t]=l(t))}},t=>{t.exports={}},(t,r,o)=>{var c=o(6),l=o(44),u=o(55),h=o(14)("toPrimitive"),d=Date.prototype;c(d,h)||l(d,h,u)},(t,r,o)=>{var c=o(32),l=o(42),u=TypeError;t.exports=function(t){c(this);if("string"===t||"default"===t)t="string";else if("number"!==t)throw new u("Incorrect hint");return l(this,t)}},(t,r,o)=>{o(57);o(96);o(98);o(99);o(103)},(t,r,o)=>{var c=o(58),l=o(5),u=o(35),h=o(7),d=o(16),y=o(25),g=o(20),m=o(9),v=o(6),w=o(38),_=o(32),k=o(61),S=o(33),C=o(77),x=o(51),O=o(80),T=o(82),E=o(66),R=o(84),M=o(75),j=o(59),L=o(24),D=o(81),N=o(60),U=o(44),G=o(87),$=o(15),H=o(52),X=o(53),q=o(19),z=o(14),W=o(13),V=o(3),K=o(43),Y=o(88),J=o(48),Z=o(89).forEach,Q=H("hidden"),ee="Symbol",te="prototype",re=J.set,ne=J.getterFor(ee),ae=Object[te],ie=l.Symbol,oe=ie&&ie[te],se=l.RangeError,ce=l.TypeError,le=l.QObject,ue=j.f,fe=L.f,he=R.f,pe=N.f,de=h([].push),ye=$("symbols"),ge=$("op-symbols"),me=$("wks"),ve=!le||!le[te]||!le[te].findChild,fallbackDefineProperty=function(t,r,o){var c=ue(ae,r);c&&delete ae[r];fe(t,r,o);c&&t!==ae&&fe(ae,r,c)},be=y&&m((function(){return 7!==O(fe({},"a",{get:function(){return fe(this,"a",{value:7}).a}})).a}))?fallbackDefineProperty:fe,wrap=function(t,r){var o=ye[t]=O(oe);re(o,{type:ee,tag:t,description:r});y||(o.description=r);return o},we=function defineProperty(t,r,o){t===ae&&we(ge,r,o);_(t);var c=S(r);_(o);if(v(ye,c)){if(o.enumerable){v(t,Q)&&t[Q][c]&&(t[Q][c]=!1);o=O(o,{enumerable:x(0,!1)})}else{v(t,Q)||fe(t,Q,x(1,{}));t[Q][c]=!0}return be(t,c,o)}return fe(t,c,o)},_e=function defineProperties(t,r){_(t);var o=k(r),c=T(o).concat($getOwnPropertySymbols(o));Z(c,(function(r){y&&!u(ke,o,r)||we(t,r,o[r])}));return t},ke=function propertyIsEnumerable(t){var r=S(t),o=u(pe,this,r);return!(this===ae&&v(ye,r)&&!v(ge,r))&&(!(o||!v(this,r)||!v(ye,r)||v(this,Q)&&this[Q][r])||o)},Se=function getOwnPropertyDescriptor(t,r){var o=k(t),c=S(r);if(o!==ae||!v(ye,c)||v(ge,c)){var l=ue(o,c);!l||!v(ye,c)||v(o,Q)&&o[Q][c]||(l.enumerable=!0);return l}},Ce=function getOwnPropertyNames(t){var r=he(k(t)),o=[];Z(r,(function(t){v(ye,t)||v(X,t)||de(o,t)}));return o},$getOwnPropertySymbols=function(t){var r=t===ae,o=he(r?ge:k(t)),c=[];Z(o,(function(t){!v(ye,t)||r&&!v(ae,t)||de(c,ye[t])}));return c};if(!g){U(oe=(ie=function Symbol(){if(w(oe,this))throw new ce("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?C(arguments[0]):void 0,r=q(t),setter=function(t){var o=void 0===this?l:this;o===ae&&u(setter,ge,t);v(o,Q)&&v(o[Q],r)&&(o[Q][r]=!1);var c=x(1,t);try{be(o,r,c)}catch(t){if(!(t instanceof se))throw t;fallbackDefineProperty(o,r,c)}};y&&ve&&be(ae,r,{configurable:!0,set:setter});return wrap(r,t)})[te],"toString",(function toString(){return ne(this).tag}));U(ie,"withoutSetter",(function(t){return wrap(q(t),t)}));N.f=ke;L.f=we;D.f=_e;j.f=Se;E.f=R.f=Ce;M.f=$getOwnPropertySymbols;W.f=function(t){return wrap(z(t),t)};if(y){G(oe,"description",{configurable:!0,get:function description(){return ne(this).description}});d||U(ae,"propertyIsEnumerable",ke,{unsafe:!0})}}c({global:!0,constructor:!0,wrap:!0,forced:!g,sham:!g},{Symbol:ie});Z(T(me),(function(t){V(t)}));c({target:ee,stat:!0,forced:!g},{useSetter:function(){ve=!0},useSimple:function(){ve=!1}});c({target:"Object",stat:!0,forced:!g,sham:!y},{create:function create(t,r){return void 0===r?O(t):_e(O(t),r)},defineProperty:we,defineProperties:_e,getOwnPropertyDescriptor:Se});c({target:"Object",stat:!0,forced:!g},{getOwnPropertyNames:Ce});K();Y(ie,ee);X[Q]=!0},(t,r,o)=>{var c=o(5),l=o(59).f,u=o(50),h=o(44),d=o(18),y=o(64),g=o(76);t.exports=function(t,r){var o,m,v,w,_,k=t.target,S=t.global,C=t.stat;if(o=S?c:C?c[k]||d(k,{}):(c[k]||{}).prototype)for(m in r){w=r[m];v=t.dontCallGetSet?(_=l(o,m))&&_.value:o[m];if(!g(S?m:k+(C?".":"#")+m,t.forced)&&void 0!==v){if(typeof w==typeof v)continue;y(w,v)}(t.sham||v&&v.sham)&&u(w,"sham",!0);h(o,m,w,t)}}},(t,r,o)=>{var c=o(25),l=o(35),u=o(60),h=o(51),d=o(61),y=o(33),g=o(6),m=o(26),v=Object.getOwnPropertyDescriptor;r.f=c?v:function getOwnPropertyDescriptor(t,r){t=d(t);r=y(r);if(m)try{return v(t,r)}catch(t){}if(g(t,r))return h(!l(u.f,t,r),t[r])}},(t,r)=>{var o={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,l=c&&!o.call({1:2},1);r.f=l?function propertyIsEnumerable(t){var r=c(this,t);return!!r&&r.enumerable}:o},(t,r,o)=>{var c=o(62),l=o(11);t.exports=function(t){return c(l(t))}},(t,r,o)=>{var c=o(7),l=o(9),u=o(63),h=Object,d=c("".split);t.exports=l((function(){return!h("z").propertyIsEnumerable(0)}))?function(t){return"String"===u(t)?d(t,""):h(t)}:h},(t,r,o)=>{var c=o(7),l=c({}.toString),u=c("".slice);t.exports=function(t){return u(l(t),8,-1)}},(t,r,o)=>{var c=o(6),l=o(65),u=o(59),h=o(24);t.exports=function(t,r,o){for(var d=l(r),y=h.f,g=u.f,m=0;m<d.length;m++){var v=d[m];c(t,v)||o&&c(o,v)||y(t,v,g(r,v))}}},(t,r,o)=>{var c=o(37),l=o(7),u=o(66),h=o(75),d=o(32),y=l([].concat);t.exports=c("Reflect","ownKeys")||function ownKeys(t){var r=u.f(d(t)),o=h.f;return o?y(r,o(t)):r}},(t,r,o)=>{var c=o(67),l=o(74).concat("length","prototype");r.f=Object.getOwnPropertyNames||function getOwnPropertyNames(t){return c(t,l)}},(t,r,o)=>{var c=o(7),l=o(6),u=o(61),h=o(68).indexOf,d=o(53),y=c([].push);t.exports=function(t,r){var o,c=u(t),g=0,m=[];for(o in c)!l(d,o)&&l(c,o)&&y(m,o);for(;r.length>g;)l(c,o=r[g++])&&(~h(m,o)||y(m,o));return m}},(t,r,o)=>{var c=o(61),l=o(69),u=o(72),createMethod=function(t){return function(r,o,h){var d,y=c(r),g=u(y),m=l(h,g);if(t&&o!=o){for(;g>m;)if((d=y[m++])!=d)return!0}else for(;g>m;m++)if((t||m in y)&&y[m]===o)return t||m||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},(t,r,o)=>{var c=o(70),l=Math.max,u=Math.min;t.exports=function(t,r){var o=c(t);return o<0?l(o+r,0):u(o,r)}},(t,r,o)=>{var c=o(71);t.exports=function(t){var r=+t;return r!=r||0===r?0:c(r)}},t=>{var r=Math.ceil,o=Math.floor;t.exports=Math.trunc||function trunc(t){var c=+t;return(c>0?o:r)(c)}},(t,r,o)=>{var c=o(73);t.exports=function(t){return c(t.length)}},(t,r,o)=>{var c=o(70),l=Math.min;t.exports=function(t){return t>0?l(c(t),9007199254740991):0}},t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(t,r)=>{r.f=Object.getOwnPropertySymbols},(t,r,o)=>{var c=o(9),l=o(29),u=/#|\.prototype\./,isForced=function(t,r){var o=d[h(t)];return o===g||o!==y&&(l(r)?c(r):!!r)},h=isForced.normalize=function(t){return String(t).replace(u,".").toLowerCase()},d=isForced.data={},y=isForced.NATIVE="N",g=isForced.POLYFILL="P";t.exports=isForced},(t,r,o)=>{var c=o(78),l=String;t.exports=function(t){if("Symbol"===c(t))throw new TypeError("Cannot convert a Symbol value to a string");return l(t)}},(t,r,o)=>{var c=o(79),l=o(29),u=o(63),h=o(14)("toStringTag"),d=Object,y="Arguments"===u(function(){return arguments}());t.exports=c?u:function(t){var r,o,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(o=function(t,r){try{return t[r]}catch(t){}}(r=d(t),h))?o:y?u(r):"Object"===(c=u(r))&&l(r.callee)?"Arguments":c}},(t,r,o)=>{var c={};c[o(14)("toStringTag")]="z";t.exports="[object z]"===String(c)},(t,r,o)=>{var c,l=o(32),u=o(81),h=o(74),d=o(53),y=o(83),g=o(27),m=o(52),v="prototype",w="script",_=m("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<"+w+">"+t+"</"+w+">"},NullProtoObjectViaActiveX=function(t){t.write(scriptTag(""));t.close();var r=t.parentWindow.Object;t=null;return r},NullProtoObject=function(){try{c=new ActiveXObject("htmlfile")}catch(t){}NullProtoObject="undefined"!=typeof document?document.domain&&c?NullProtoObjectViaActiveX(c):function(){var t,r=g("iframe"),o="java"+w+":";r.style.display="none";y.appendChild(r);r.src=String(o);(t=r.contentWindow.document).open();t.write(scriptTag("document.F=Object"));t.close();return t.F}():NullProtoObjectViaActiveX(c);for(var t=h.length;t--;)delete NullProtoObject[v][h[t]];return NullProtoObject()};d[_]=!0;t.exports=Object.create||function create(t,r){var o;if(null!==t){EmptyConstructor[v]=l(t);o=new EmptyConstructor;EmptyConstructor[v]=null;o[_]=t}else o=NullProtoObject();return void 0===r?o:u.f(o,r)}},(t,r,o)=>{var c=o(25),l=o(31),u=o(24),h=o(32),d=o(61),y=o(82);r.f=c&&!l?Object.defineProperties:function defineProperties(t,r){h(t);for(var o,c=d(r),l=y(r),g=l.length,m=0;g>m;)u.f(t,o=l[m++],c[o]);return t}},(t,r,o)=>{var c=o(67),l=o(74);t.exports=Object.keys||function keys(t){return c(t,l)}},(t,r,o)=>{var c=o(37);t.exports=c("document","documentElement")},(t,r,o)=>{var c=o(63),l=o(61),u=o(66).f,h=o(85),d="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function getOwnPropertyNames(t){return d&&"Window"===c(t)?function(t){try{return u(t)}catch(t){return h(d)}}(t):u(l(t))}},(t,r,o)=>{var c=o(69),l=o(72),u=o(86),h=Array,d=Math.max;t.exports=function(t,r,o){for(var y=l(t),g=c(r,y),m=c(void 0===o?y:o,y),v=h(d(m-g,0)),w=0;g<m;g++,w++)u(v,w,t[g]);v.length=w;return v}},(t,r,o)=>{var c=o(33),l=o(24),u=o(51);t.exports=function(t,r,o){var h=c(r);h in t?l.f(t,h,u(0,o)):t[h]=o}},(t,r,o)=>{var c=o(45),l=o(24);t.exports=function(t,r,o){o.get&&c(o.get,r,{getter:!0});o.set&&c(o.set,r,{setter:!0});return l.f(t,r,o)}},(t,r,o)=>{var c=o(24).f,l=o(6),u=o(14)("toStringTag");t.exports=function(t,r,o){t&&!o&&(t=t.prototype);t&&!l(t,u)&&c(t,u,{configurable:!0,value:r})}},(t,r,o)=>{var c=o(90),l=o(7),u=o(62),h=o(10),d=o(72),y=o(92),g=l([].push),createMethod=function(t){var r=1===t,o=2===t,l=3===t,m=4===t,v=6===t,w=7===t,_=5===t||v;return function(k,S,C,x){for(var O,T,E=h(k),R=u(E),M=c(S,C),j=d(R),L=0,D=x||y,N=r?D(k,j):o||w?D(k,0):void 0;j>L;L++)if(_||L in R){T=M(O=R[L],L,E);if(t)if(r)N[L]=T;else if(T)switch(t){case 3:return!0;case 5:return O;case 6:return L;case 2:g(N,O)}else switch(t){case 4:return!1;case 7:g(N,O)}}return v?-1:l||m?m:N}};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,o)=>{var c=o(91),l=o(40),u=o(8),h=c(c.bind);t.exports=function(t,r){l(t);return void 0===r?t:u?h(t,r):function(){return t.apply(r,arguments)}}},(t,r,o)=>{var c=o(63),l=o(7);t.exports=function(t){if("Function"===c(t))return l(t)}},(t,r,o)=>{var c=o(93);t.exports=function(t,r){return new(c(t))(0===r?0:r)}},(t,r,o)=>{var c=o(94),l=o(95),u=o(28),h=o(14)("species"),d=Array;t.exports=function(t){var r;if(c(t)){r=t.constructor;(l(r)&&(r===d||c(r.prototype))||u(r)&&null===(r=r[h]))&&(r=void 0)}return void 0===r?d:r}},(t,r,o)=>{var c=o(63);t.exports=Array.isArray||function isArray(t){return"Array"===c(t)}},(t,r,o)=>{var c=o(7),l=o(9),u=o(29),h=o(78),d=o(37),y=o(47),noop=function(){},g=[],m=d("Reflect","construct"),v=/^\s*(?:class|function)\b/,w=c(v.exec),_=!v.test(noop),k=function isConstructor(t){if(!u(t))return!1;try{m(noop,g,t);return!0}catch(t){return!1}},S=function isConstructor(t){if(!u(t))return!1;switch(h(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _||!!w(v,y(t))}catch(t){return!0}};S.sham=!0;t.exports=!m||l((function(){var t;return k(k.call)||!k(Object)||!k((function(){t=!0}))||t}))?S:k},(t,r,o)=>{var c=o(58),l=o(37),u=o(6),h=o(77),d=o(15),y=o(97),g=d("string-to-symbol-registry"),m=d("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!y},{for:function(t){var r=h(t);if(u(g,r))return g[r];var o=l("Symbol")(r);g[r]=o;m[o]=r;return o}})},(t,r,o)=>{var c=o(20);t.exports=c&&!!Symbol.for&&!!Symbol.keyFor},(t,r,o)=>{var c=o(58),l=o(6),u=o(36),h=o(41),d=o(15),y=o(97),g=d("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!y},{keyFor:function keyFor(t){if(!u(t))throw new TypeError(h(t)+" is not a symbol");if(l(g,t))return g[t]}})},(t,r,o)=>{var c=o(58),l=o(37),u=o(100),h=o(35),d=o(7),y=o(9),g=o(29),m=o(36),v=o(101),w=o(102),_=o(20),k=String,S=l("JSON","stringify"),C=d(/./.exec),x=d("".charAt),O=d("".charCodeAt),T=d("".replace),E=d(1..toString),R=/[\uD800-\uDFFF]/g,M=/^[\uD800-\uDBFF]$/,j=/^[\uDC00-\uDFFF]$/,L=!_||y((function(){var t=l("Symbol")("stringify detection");return"[null]"!==S([t])||"{}"!==S({a:t})||"{}"!==S(Object(t))})),D=y((function(){return'"\\udf06\\ud834"'!==S("\udf06\ud834")||'"\\udead"'!==S("\udead")})),stringifyWithSymbolsFix=function(t,r){var o=v(arguments),c=w(r);if(g(c)||void 0!==t&&!m(t)){o[1]=function(t,r){g(c)&&(r=h(c,this,k(t),r));if(!m(r))return r};return u(S,null,o)}},fixIllFormed=function(t,r,o){var c=x(o,r-1),l=x(o,r+1);return C(M,t)&&!C(j,l)||C(j,t)&&!C(M,c)?"\\u"+E(O(t,0),16):t};S&&c({target:"JSON",stat:!0,arity:3,forced:L||D},{stringify:function stringify(t,r,o){var c=v(arguments),l=u(L?stringifyWithSymbolsFix:S,null,c);return D&&"string"==typeof l?T(l,R,fixIllFormed):l}})},(t,r,o)=>{var c=o(8),l=Function.prototype,u=l.apply,h=l.call;t.exports="object"==typeof Reflect&&Reflect.apply||(c?h.bind(u):function(){return h.apply(u,arguments)})},(t,r,o)=>{var c=o(7);t.exports=c([].slice)},(t,r,o)=>{var c=o(7),l=o(94),u=o(29),h=o(63),d=o(77),y=c([].push);t.exports=function(t){if(u(t))return t;if(l(t)){for(var r=t.length,o=[],c=0;c<r;c++){var g=t[c];"string"==typeof g?y(o,g):"number"!=typeof g&&"Number"!==h(g)&&"String"!==h(g)||y(o,d(g))}var m=o.length,v=!0;return function(t,r){if(v){v=!1;return r}if(l(this))return r;for(var c=0;c<m;c++)if(o[c]===t)return r}}}},(t,r,o)=>{var c=o(58),l=o(20),u=o(9),h=o(75),d=o(10);c({target:"Object",stat:!0,forced:!l||u((function(){h.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){var r=h.f;return r?r(d(t)):[]}})},(t,r,o)=>{var c=o(58),l=o(25),u=o(5),h=o(7),d=o(6),y=o(29),g=o(38),m=o(77),v=o(87),w=o(64),_=u.Symbol,k=_&&_.prototype;if(l&&y(_)&&(!("description"in k)||void 0!==_().description)){var S={},C=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:m(arguments[0]),r=g(k,this)?new _(t):void 0===t?_():_(t);""===t&&(S[r]=!0);return r};w(C,_);C.prototype=k;k.constructor=C;var x="Symbol(description detection)"===String(_("description detection")),O=h(k.va