@cocalc/cdn
Version:
Files that CoCalc uses that would be natural in various contexts to get from a CDN
22 lines • 1.46 MB
JavaScript
/**
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2022 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @licend The above is the entire license notice for the
* Javascript code in this page
*/
!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],r):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=r():t["pdfjs-dist/build/pdf.worker"]=t.pdfjsWorker=r()}(this,(function(){return(()=>{var t=[,(t,r,o)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.WorkerTask=r.WorkerMessageHandler=void 0;var c=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(o(2)),l=o(4),u=o(147),h=o(148),d=o(208),g=o(214),m=o(6),y=o(242),v=o(243),k=o(150);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 _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 _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)return;var c,l,u=[],h=!0,d=!1;try{for(o=o.call(t);!(h=(c=o.next()).done);h=!0){u.push(c.value);if(r&&u.length===r)break}}catch(t){d=!0;l=t}finally{try{h||null==o.return||o.return()}finally{if(d)throw l}}return u}(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),g=d.value}catch(t){o(t);return}d.done?r(g):Promise.resolve(g).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,c.key,c)}}function _createClass(t,r,o){r&&_defineProperties(t.prototype,r);o&&_defineProperties(t,o);Object.defineProperty(t,"prototype",{writable:!1});return t}var _=function(){function WorkerTask(t){_classCallCheck(this,WorkerTask);this.name=t;this.terminated=!1;this._capability=(0,l.createPromiseCapability)()}_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.WorkerTask=_;var w=function(){function WorkerMessageHandler(){_classCallCheck(this,WorkerMessageHandler)}_createClass(WorkerMessageHandler,null,[{key:"setup",value:function setup(t,r){var o=!1;t.on("test",(function wphSetupTest(r){if(!o){o=!0;t.send("test",r instanceof Uint8Array&&255===r[0])}}));t.on("configure",(function wphConfigure(t){(0,l.setVerbosityLevel)(t.verbosity)}));t.on("GetDocRequest",(function wphSetupDoc(t){return WorkerMessageHandler.createDocumentHandler(t,r)}))}},{key:"createDocumentHandler",value:function createDocumentHandler(t,r){var o,w=!1,S=null,C=[],x=(0,l.getVerbosityLevel)(),O=t.apiVersion,T="2.13.216";if(O!==T)throw new Error('The API version "'.concat(O,'" does not match ')+'the Worker version "'.concat(T,'".'));var E=[];for(var M in[])E.push(M);if(E.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+E.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");if("undefined"==typeof ReadableStream){var R="The browser/environment lacks native support for critical functionality used by the PDF.js library (e.g. `ReadableStream`); ";if(m.isNodeJS)throw new Error(R+"please use a `legacy`-build instead.");throw new Error(R+"please update to a supported browser.")}var j=t.docId,D=t.docBaseUrl,N=t.docId+"_worker",L=new y.MessageHandler(N,j,r);function ensureNotTerminated(){if(w)throw new Error("Worker was terminated")}function startWorkerTask(t){C.push(t)}function finishWorkerTask(t){t.finish();var r=C.indexOf(t);C.splice(r,1)}function loadDocument(t){return _loadDocument.apply(this,arguments)}function _loadDocument(){return(_loadDocument=_asyncToGenerator(c.default.mark((function _callee(t){var r,l,u,h,d,g,m;return c.default.wrap((function _callee$(c){for(;;)switch(c.prev=c.next){case 0:c.next=2;return o.ensureDoc("checkHeader");case 2:c.next=4;return o.ensureDoc("parseStartXRef");case 4:c.next=6;return o.ensureDoc("parse",[t]);case 6:c.next=8;return o.ensureDoc("checkFirstPage",[t]);case 8:c.next=10;return o.ensureDoc("checkLastPage",[t]);case 10:c.next=12;return o.ensureDoc("isPureXfa");case 12:if(!(r=c.sent)){c.next=18;break}startWorkerTask(l=new _("loadXfaFonts"));c.next=18;return Promise.all([o.loadXfaFonts(L,l).catch((function(t){})).then((function(){return finishWorkerTask(l)})),o.loadXfaImages()]);case 18:c.next=20;return Promise.all([o.ensureDoc("numPages"),o.ensureDoc("fingerprints")]);case 20:u=c.sent;h=_slicedToArray(u,2);d=h[0];g=h[1];if(!r){c.next=30;break}c.next=27;return o.ensureDoc("htmlForXfa");case 27:c.t0=c.sent;c.next=31;break;case 30:c.t0=null;case 31:m=c.t0;return c.abrupt("return",{numPages:d,fingerprints:g,htmlForXfa:m});case 33:case"end":return c.stop()}}),_callee)})))).apply(this,arguments)}function getPdfManager(t,r,o){var c,u=(0,l.createPromiseCapability)(),d=t.source;if(d.data){try{c=new h.LocalPdfManager(j,d.data,d.password,L,r,o,D);u.resolve(c)}catch(t){u.reject(t)}return u.promise}var g,m=[];try{g=new v.PDFWorkerStream(L)}catch(t){u.reject(t);return u.promise}var y=g.getFullReader();y.headersReady.then((function(){if(y.isRangeSupported){var t=d.disableAutoFetch||y.isStreamingSupported;c=new h.NetworkPdfManager(j,g,{msgHandler:L,password:d.password,length:y.contentLength,disableAutoFetch:t,rangeChunkSize:d.rangeChunkSize},r,o,D);for(var l=0;l<m.length;l++)c.sendProgressiveData(m[l]);m=[];u.resolve(c);S=null}})).catch((function(t){u.reject(t);S=null}));var k=0;new Promise((function(t,g){y.read().then((function readChunk(t){var v=t.value,_=t.done;try{ensureNotTerminated();if(_){c||function flushChunks(){var t=(0,l.arraysToBytes)(m);d.length&&t.length!==d.length&&(0,l.warn)("reported HTTP length is different from actual");try{c=new h.LocalPdfManager(j,t,d.password,L,r,o,D);u.resolve(c)}catch(t){u.reject(t)}m=[]}();S=null;return}k+=(0,l.arrayByteLength)(v);y.isStreamingSupported||L.send("DocProgress",{loaded:k,total:Math.max(k,y.contentLength||0)});c?c.sendProgressiveData(v):m.push(v);y.read().then(readChunk,g)}catch(t){g(t)}}),g)})).catch((function(t){u.reject(t);S=null}));S=function cancelXHRs(t){g.cancelAllRequests(t)};return u.promise}L.on("GetPage",(function wphSetupGetPage(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 wphSetupGetPageIndex(t){var r=u.Ref.get(t.num,t.gen);return o.ensureCatalog("getPageIndex",[r])}));L.on("GetDestinations",(function wphSetupGetDestinations(t){return o.ensureCatalog("destinations")}));L.on("GetDestination",(function wphSetupGetDestination(t){return o.ensureCatalog("getDestination",[t.id])}));L.on("GetPageLabels",(function wphSetupGetPageLabels(t){return o.ensureCatalog("pageLabels")}));L.on("GetPageLayout",(function wphSetupGetPageLayout(t){return o.ensureCatalog("pageLayout")}));L.on("GetPageMode",(function wphSetupGetPageMode(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 wphSetupGetAttachments(t){return o.ensureCatalog("attachments")}));L.on("GetJavaScript",(function wphSetupGetJavaScript(t){return o.ensureCatalog("javaScript")}));L.on("GetDocJSActions",(function wphSetupGetDocJSActions(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 wphSetupGetOutline(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 wphSetupGetMetadata(t){return Promise.all([o.ensureDoc("documentInfo"),o.ensureCatalog("metadata")])}));L.on("GetMarkInfo",(function wphSetupGetMarkInfo(t){return o.ensureCatalog("markInfo")}));L.on("GetData",(function wphSetupGetData(t){o.requestLoadedStream();return o.onLoadedStream().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){return t.getAnnotationsData(c)}))}));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(t){var r=t.isPureXfa,c=t.numPages,h=t.annotationStorage,d=t.filename;o.requestLoadedStream();var m=[o.onLoadedStream(),o.ensureCatalog("acroForm"),o.ensureCatalog("acroFormRef"),o.ensureDoc("xref"),o.ensureDoc("startXRef")];if(r)m.push(o.serializeXfaData(h));else for(var y=function _loop(t){m.push(o.getPage(t).then((function(r){var o=new _("Save: page ".concat(t));return r.save(L,o,h).finally((function(){finishWorkerTask(o)}))})))},v=0;v<c;v++)y(v);return Promise.all(m).then((function(t){var o=_toArray(t),c=o[0],h=o[1],m=o[2],y=o[3],v=o[4],k=o.slice(5),_=[],w=null;if(r){if(!(w=k[0]))return c.bytes}else{var S,C=_createForOfIteratorHelper(k);try{for(C.s();!(S=C.n()).done;){_=S.value.filter((function(t){return null!==t})).reduce((function(t,r){return t.concat(r)}),_)}}catch(t){C.e(t)}finally{C.f()}if(0===_.length)return c.bytes}var x=h instanceof u.Dict&&h.get("XFA")||null,O=null,T=!1;if(Array.isArray(x)){for(var E=0,M=x.length;E<M;E+=2)if("datasets"===x[E]){O=x[E+1];m=null;T=!0}null===O&&(O=y.getNewRef())}else if(x){m=null;(0,l.warn)("Unsupported XFA type.")}var R=Object.create(null);if(y.trailer){var j=Object.create(null),D=y.trailer.get("Info")||null;D instanceof u.Dict&&D.forEach((function(t,r){"string"==typeof r&&(j[t]=(0,l.stringToPDFString)(r))}));R={rootRef:y.trailer.getRaw("Root")||null,encryptRef:y.trailer.getRaw("Encrypt")||null,newRef:y.getNewRef(),infoRef:y.trailer.getRaw("Info")||null,info:j,fileIds:y.trailer.get("ID")||null,startXRef:v,filename:d}}y.resetNewRef();return(0,g.incrementalUpdate)({originalData:c.bytes,xrefInfo:R,newRefs:_,xref:y,hasXfa:!!x,xfaDatasetsRef:O,hasXfaDatasetsEntry:T,acroFormRef:m,acroForm:h,xfaData:w})}))}));L.on("GetOperatorList",(function wphSetupRenderPage(t,r){var c=t.pageIndex;o.getPage(c).then((function(o){var u=new _("GetOperatorList: page ".concat(c));startWorkerTask(u);var h=x>=l.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,l.info)("page=".concat(c+1," - getOperatorList: time=")+"".concat(Date.now()-h,"ms, len=").concat(t.length));r.close()}),(function(t){finishWorkerTask(u);if(!u.terminated){L.send("UnsupportedFeature",{featureId:l.UNSUPPORTED_FEATURES.errorOperatorList});r.error(t)}}))}))}));L.on("GetTextContent",(function wphExtractText(t,r){var c=t.pageIndex;o.getPage(c).then((function(o){var u=new _("GetTextContent: page "+c);startWorkerTask(u);var h=x>=l.VerbosityLevel.INFOS?Date.now():0;o.extractTextContent({handler:L,task:u,sink:r,includeMarkedContent:t.includeMarkedContent,combineTextItems:t.combineTextItems}).then((function(){finishWorkerTask(u);h&&(0,l.info)("page=".concat(c+1," - getTextContent: time=")+"".concat(Date.now()-h,"ms"));r.close()}),(function(t){finishWorkerTask(u);u.terminated||r.error(t)}))}))}));L.on("GetStructTree",(function wphGetStructTree(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 wphCleanup(t){return o.cleanup(!0)}));L.on("Terminate",(function wphTerminate(t){w=!0;var r=[];if(o){o.terminate(new l.AbortException("Worker was terminated."));var c=o.cleanup();r.push(c);o=null}else(0,d.clearGlobalCaches)();S&&S(new l.AbortException("Worker was terminated."));var u,h=_createForOfIteratorHelper(C);try{for(h.s();!(u=h.n()).done;){var g=u.value;r.push(g.finished);g.terminate()}}catch(t){h.e(t)}finally{h.f()}return Promise.all(r).then((function(){L.destroy();L=null}))}));L.on("Ready",(function wphReady(r){!function setupDoc(t){function onSuccess(t){ensureNotTerminated();L.send("GetDoc",{pdfInfo:t})}function onFailure(t){ensureNotTerminated();if(t instanceof l.PasswordException){var r=new _("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 l.InvalidPDFException||t instanceof l.MissingPDFException||t instanceof l.UnexpectedResponseException||t instanceof l.UnknownErrorException?L.send("DocException",t):L.send("DocException",new l.UnknownErrorException(t.message,t.toString()))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,(function(t){ensureNotTerminated();if(t instanceof k.XRefParseException){o.requestLoadedStream();o.onLoadedStream().then((function(){ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)}))}else onFailure(t)}))}ensureNotTerminated();getPdfManager(t,{maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties,useSystemFonts:t.useSystemFonts,cMapUrl:t.cMapUrl,standardFontDataUrl:t.standardFontDataUrl},t.enableXfa).then((function(t){if(w){t.terminate(new l.AbortException("Worker was terminated."));throw new Error("Worker was terminated")}(o=t).onLoadedStream().then((function(t){L.send("DataLoaded",{length:t.bytes.byteLength})}))})).then(pdfManagerReady,onFailure)}(t);t=null}));return N}},{key:"initializeFromPort",value:function initializeFromPort(t){var r=new y.MessageHandler("worker","main",t);WorkerMessageHandler.setup(r,t);r.send("ready",null)}}]);return WorkerMessageHandler}();r.WorkerMessageHandler=w;"undefined"==typeof window&&!m.isNodeJS&&"undefined"!=typeof self&&function isMessagePort(t){return"function"==typeof t.postMessage&&"onmessage"in t}(self)&&w.initializeFromPort(self)},(t,r,o)=>{"use strict";t.exports=o(3)},(t,r,o)=>{"use strict";function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var c=function(t){var r,o=Object.prototype,c=o.hasOwnProperty,l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",h=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function define(t,r,o){Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0});return t[r]}try{define({},"")}catch(t){define=function define(t,r,o){return t[r]=o}}function wrap(t,r,o,c){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),h=new Context(c||[]);u._invoke=function makeInvokeMethod(t,r,o){var c=g;return function invoke(l,u){if(c===y)throw new Error("Generator is already running");if(c===v){if("throw"===l)throw u;return doneResult()}o.method=l;o.arg=u;for(;;){var h=o.delegate;if(h){var d=maybeInvokeDelegate(h,o);if(d){if(d===k)continue;return d}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(c===g){c=v;throw o.arg}o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);c=y;var _=tryCatch(t,r,o);if("normal"===_.type){c=o.done?v:m;if(_.arg===k)continue;return{value:_.arg,done:o.done}}if("throw"===_.type){c=v;o.method="throw";o.arg=_.arg}}}}(t,o,h);return u}t.wrap=wrap;function tryCatch(t,r,o){try{return{type:"normal",arg:t.call(r,o)}}catch(t){return{type:"throw",arg:t}}}var g="suspendedStart",m="suspendedYield",y="executing",v="completed",k={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var _={};define(_,u,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(values([])));S&&S!==o&&c.call(S,u)&&(_=S);var C=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(_);GeneratorFunction.prototype=GeneratorFunctionPrototype;define(C,"constructor",GeneratorFunctionPrototype);define(GeneratorFunctionPrototype,"constructor",GeneratorFunction);GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction");function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))};t.mark=function(t){if(Object.setPrototypeOf)Object.setPrototypeOf(t,GeneratorFunctionPrototype);else{t.__proto__=GeneratorFunctionPrototype;define(t,d,"GeneratorFunction")}t.prototype=Object.create(C);return t};t.awrap=function(t){return{__await:t}};function AsyncIterator(t,r){function invoke(o,l,u,h){var d=tryCatch(t[o],t,l);if("throw"!==d.type){var g=d.arg,m=g.value;return m&&"object"===_typeof(m)&&c.call(m,"__await")?r.resolve(m.__await).then((function(t){invoke("next",t,u,h)}),(function(t){invoke("throw",t,u,h)})):r.resolve(m).then((function(t){g.value=t;u(g)}),(function(t){return invoke("throw",t,u,h)}))}h(d.arg)}var o;this._invoke=function enqueue(t,c){function callInvokeWithMethodAndArg(){return new r((function(r,o){invoke(t,c,r,o)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}defineIteratorMethods(AsyncIterator.prototype);define(AsyncIterator.prototype,h,(function(){return this}));t.AsyncIterator=AsyncIterator;t.async=function(r,o,c,l,u){void 0===u&&(u=Promise);var h=new AsyncIterator(wrap(r,o,c,l),u);return t.isGeneratorFunction(o)?h:h.next().then((function(t){return t.done?t.value:h.next()}))};function maybeInvokeDelegate(t,o){var c=t.iterator[o.method];if(c===r){o.delegate=null;if("throw"===o.method){if(t.iterator.return){o.method="return";o.arg=r;maybeInvokeDelegate(t,o);if("throw"===o.method)return k}o.method="throw";o.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var l=tryCatch(c,t.iterator,o.arg);if("throw"===l.type){o.method="throw";o.arg=l.arg;o.delegate=null;return k}var u=l.arg;if(!u){o.method="throw";o.arg=new TypeError("iterator result is not an object");o.delegate=null;return k}if(!u.done)return u;o[t.resultName]=u.value;o.next=t.nextLoc;if("return"!==o.method){o.method="next";o.arg=r}o.delegate=null;return k}defineIteratorMethods(C);define(C,d,"Generator");define(C,u,(function(){return this}));define(C,"toString",(function(){return"[object Generator]"}));function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]);if(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)}t.keys=function(t){var r=[];for(var o in t)r.push(o);r.reverse();return function next(){for(;r.length;){var o=r.pop();if(o in t){next.value=o;next.done=!1;return next}}next.done=!0;return next}};function values(t){if(t){var o=t[u];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var l=-1,h=function next(){for(;++l<t.length;)if(c.call(t,l)){next.value=t[l];next.done=!1;return next}next.value=r;next.done=!0;return next};return h.next=h}}return{next:doneResult}}t.values=values;function doneResult(){return{value:r,done:!0}}Context.prototype={constructor:Context,reset:function reset(t){this.prev=0;this.next=0;this.sent=this._sent=r;this.done=!1;this.delegate=null;this.method="next";this.arg=r;this.tryEntries.forEach(resetTryEntry);if(!t)for(var o in this)"t"===o.charAt(0)&&c.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=r)},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 o=this;function handle(c,l){h.type="throw";h.arg=t;o.next=c;if(l){o.method="next";o.arg=r}return!!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"),g=c.call(u,"finallyLoc");if(d&&g){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(!g)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:{};h.type=t;h.arg=r;if(u){this.method="next";this.next=u.finallyLoc;return k}return this.complete(h)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;if("break"===t.type||"continue"===t.type)this.next=t.arg;else if("return"===t.type){this.rval=this.arg=t.arg;this.method="return";this.next="end"}else"normal"===t.type&&r&&(this.next=r);return k},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===t){this.complete(o.completion,o.afterLoc);resetTryEntry(o);return k}}},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(t,o,c){this.delegate={iterator:values(t),resultName:o,nextLoc:c};"next"===this.method&&(this.arg=r);return k}};return t}("object"===_typeof(t=o.nmd(t))?t.exports:{});try{regeneratorRuntime=c}catch(t){"object"===("undefined"==typeof globalThis?"undefined":_typeof(globalThis))?globalThis.regeneratorRuntime=c:Function("r","regeneratorRuntime = r")(c)}},(t,r,o)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.VerbosityLevel=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.UNSUPPORTED_FEATURES=r.TextRenderingMode=r.StreamType=r.RenderingIntentFlag=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.IsLittleEndianCached=r.IsEvalSupportedCached=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FontType=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMode=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;r.arrayByteLength=arrayByteLength;r.arraysToBytes=function arraysToBytes(t){var r=t.length;if(1===r&&t[0]instanceof Uint8Array)return t[0];for(var o=0,c=0;c<r;c++)o+=arrayByteLength(t[c]);for(var l=0,u=new Uint8Array(o),h=0;h<r;h++){var d=t[h];d instanceof Uint8Array||(d="string"==typeof d?stringToBytes(d):new Uint8Array(d));var g=d.byteLength;u.set(d,l);l+=g}return u};r.assert=function assert(t,r){t||unreachable(r)};r.bytesToString=function bytesToString(t){"object"===_typeof(t)&&null!==t&&void 0!==t.length||unreachable("Invalid argument for bytesToString");var r=t.length,o=8192;if(r<o)return String.fromCharCode.apply(null,t);for(var c=[],l=0;l<r;l+=o){var u=Math.min(l+o,r),h=t.subarray(l,u);c.push(String.fromCharCode.apply(null,h))}return c.join("")};r.createPromiseCapability=function createPromiseCapability(){var t=Object.create(null),r=!1;Object.defineProperty(t,"settled",{get:function get(){return r}});t.promise=new Promise((function(o,c){t.resolve=function(t){r=!0;o(t)};t.reject=function(t){r=!0;c(t)}}));return t};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)return null;try{if(o&&"string"==typeof t){if(o.addDefaultProtocol&&t.startsWith("www.")){var c=t.match(/\./g);c&&c.length>=2&&(t="http://".concat(t))}if(o.tryConvertEncoding)try{t=stringToUTF8String(t)}catch(t){}}var l=r?new URL(t,r):new URL(t);if(_isValidProtocol(l))return l}catch(t){}return null};r.escapeString=function escapeString(t){return t.replace(/([()\\\n\r])/g,(function(t){return"\n"===t?"\\n":"\r"===t?"\\r":"\\".concat(t)}))};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,r=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return r.join("")};r.getVerbosityLevel=function getVerbosityLevel(){return l};r.info=function info(t){l>=c.INFOS&&console.log("Info: ".concat(t))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.byteLength};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var o=0,c=t.length;o<c;o++)if(t[o]!==r[o])return!1;return!0};r.isAscii=function isAscii(t){return/^[\x00-\x7F]*$/.test(t)};r.isSameOrigin=function isSameOrigin(t,r){var o;try{if(!(o=new URL(t)).origin||"null"===o.origin)return!1}catch(t){return!1}var c=new URL(r,o);return o.origin===c.origin};r.objectFromMap=function objectFromMap(t){var r,o=Object.create(null),c=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}}}}(t);try{for(c.s();!(r=c.n()).done;){var l=(d=r.value,g=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(d)||function _iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==o)return;var c,l,u=[],h=!0,d=!1;try{for(o=o.call(t);!(h=(c=o.next()).done);h=!0){u.push(c.value);if(r&&u.length===r)break}}catch(t){d=!0;l=t}finally{try{h||null==o.return||o.return()}finally{if(d)throw l}}return u}(d,g)||_unsupportedIterableToArray(d,g)||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.")}()),u=l[0],h=l[1];o[u]=h}}catch(t){c.e(t)}finally{c.f()}var d,g;return o};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 o=new TextDecoder(r,{fatal:!0}),c=stringToBytes(t);return o.decode(c)}catch(t){warn('stringToPDFString: "'.concat(t,'".'))}}for(var l=[],u=0,h=t.length;u<h;u++){var d=x[t.charCodeAt(u)];l.push(d?String.fromCharCode(d):t.charAt(u))}return l.join("")};r.stringToUTF16BEString=function stringToUTF16BEString(t){for(var r=["þÿ"],o=0,c=t.length;o<c;o++){var l=t.charCodeAt(o);r.push(String.fromCharCode(l>>8&255),String.fromCharCode(255&l))}return r.join("")};r.stringToUTF8String=stringToUTF8String;r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;o(5);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 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 _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 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,c.key,c)}}function _createClass(t,r,o){r&&_defineProperties(t.prototype,r);o&&_defineProperties(t,o);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||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 o,c=_getPrototypeOf(t);if(r){var l=_getPrototypeOf(this).constructor;o=Reflect.construct(c,arguments,l)}else o=c.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)};return _getPrototypeOf(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};r.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};r.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};r.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};r.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};r.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};r.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var c={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=c;r.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};r.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};r.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",signatures:"signatures",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontBuildPath:"errorFontBuildPath",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent",errorContentSubStream:"errorContentSubStream"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var l=c.WARNINGS;function warn(t){l>=c.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}function _isValidProtocol(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function shadow(t,r,o){Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!1});return o}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 h=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,o){var c;_classCallCheck(this,PasswordException);(c=r.call(this,t,"PasswordException")).code=o;return c}return _createClass(PasswordException)}(u);r.PasswordException=h;var d=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,o){var c;_classCallCheck(this,UnknownErrorException);(c=r.call(this,t,"UnknownErrorException")).details=o;return c}return _createClass(UnknownErrorException)}(u);r.UnknownErrorException=d;var g=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=g;var m=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=m;var y=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,o){var c;_classCallCheck(this,UnexpectedResponseException);(c=r.call(this,t,"UnexpectedResponseException")).status=o;return c}return _createClass(UnexpectedResponseException)}(u);r.UnexpectedResponseException=y;var v=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=v;var k=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=k;function stringToBytes(t){"string"!=typeof t&&unreachable("Invalid argument for stringToBytes");for(var r=t.length,o=new Uint8Array(r),c=0;c<r;++c)o[c]=255&t.charCodeAt(c);return o}function arrayByteLength(t){if(void 0!==t.length)return t.length;if(void 0!==t.byteLength)return t.byteLength;unreachable("Invalid argument for arrayByteLength")}var _={get value(){return shadow(this,"value",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}};r.IsLittleEndianCached=_;var w={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=w;var S=_toConsumableArray(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),C=function(){function Util(){_classCallCheck(this,Util)}_createClass(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,o){return"#".concat(S[t]).concat(S[r]).concat(S[o])}},{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 o=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])/o,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/o]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var o=Util.applyTransform(t,r),c=Util.applyTransform(t.slice(2,4),r),l=Util.applyTransform([t[0],t[3]],r),u=Util.applyTransform([t[2],t[1]],r);return[Math.min(o[0],c[0],l[0],u[0]),Math.min(o[1],c[1],l[1],u[1]),Math.max(o[0],c[0],l[0],u[0]),Math.max(o[1],c[1],l[1],u[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"apply3dTransform",value:function apply3dTransform(t,r){return[t[0]*r[0]+t[1]*r[1]+t[2]*r[2],t[3]*r[0]+t[4]*r[1]+t[5]*r[2],t[6]*r[0]+t[7]*r[1]+t[8]*r[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],o=t[0]*r[0]+t[1]*r[2],c=t[0]*r[1]+t[1]*r[3],l=t[2]*r[0]+t[3]*r[2],u=t[2]*r[1]+t[3]*r[3],h=(o+u)/2,d=Math.sqrt(Math.pow(o+u,2)-4*(o*u-l*c))/2,g=h+d||1,m=h-d||1;return[Math.sqrt(g),Math.sqrt(m)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){function compare(t,r){return t-r}var o=[t[0],t[2],r[0],r[2]].sort(compare),c=[t[1],t[3],r[1],r[3]].sort(compare),l=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(o[0]===t[0]&&o[1]===r[0]||o[0]===r[0]&&o[1]===t[0]))return null;l[0]=o[1];l[2]=o[2];if(!(c[0]===t[1]&&c[1]===r[1]||c[0]===r[1]&&c[1]===t[1]))return null;l[1]=c[1];l[3]=c[2];return l}},{key:"bezierBoundingBox",value:function bezierBoundingBox(t,r,o,c,l,u,h,d){for(var g,m,y,v,k,_,w,S,C=[],x=[[],[]],O=0;O<2;++O){if(0===O){m=6*t-12*o+6*l;g=-3*t+9*o-9*l+3*h;y=3*o-3*t}else{m=6*r-12*c+6*u;g=-3*r+9*c-9*u+3*d;y=3*c-3*r}if(Math.abs(g)<1e-12){if(Math.abs(m)<1e-12)continue;0<(v=-y/m)&&v<1&&C.push(v)}else{w=m*m-4*y*g;S=Math.sqrt(w);if(!(w<0)){0<(k=(-m+S)/(2*g))&&k<1&&C.push(k);0<(_=(-m-S)/(2*g))&&_<1&&C.push(_)}}}for(var T,E=C.length,M=E;E--;){T=1-(v=C[E]);x[0][E]=T*T*T*t+3*T*T*v*o+3*T*v*v*l+v*v*v*h;x[1][E]=T*T*T*r+3*T*T*v*c+3*T*v*v*u+v*v*v*d}x[0][M]=t;x[1][M]=r;x[0][M+1]=h;x[1][M+1]=d;x[0].length=x[1].length=M+2;return[Math.min.apply(Math,_toConsumableArray(x[0])),Math.min.apply(Math,_toConsumableArray(x[1])),Math.max.apply(Math,_toConsumableArray(x[0])),Math.max.apply(Math,_toConsumableArray(x[1]))]}}]);return Util}();r.Util=C;var x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToUTF8String(t){return decodeURIComponent(escape(t))}},(t,r,o)=>{"use strict";var c=o(6);if(!globalThis._pdfjsCompatibilityChecked){globalThis._pdfjsCompatibilityChecked=!0;!function checkNodeBtoa(){!globalThis.btoa&&c.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&c.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkDOMMatrix(){!globalThis.DOMMatrix&&c.isNodeJS&&(globalThis.DOMMatrix=o(7))}();!function checkPromise(){globalThis.Promise.allSettled||(globalThis.Promise=o(8))}();!function checkReadableStream(){!globalThis.ReadableStream&&c.isNodeJS&&(globalThis.ReadableStream=require("web-streams-polyfill/dist/ponyfill.js").ReadableStream)}();!function checkStructuredClone(){globalThis.structuredClone||o(132)}()}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.isNodeJS=void 0;function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var o=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=o},(t,r,o)=>{"use strict";var c,l,u;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)}u=function(){function fromArray(r){var o=new t,c=Array.from(r);if(!c.every((function(t){return!Number.isNaN(t)})))throw TypeError('CSSMatrix: "'+r+'" must only have numbers.');if(16===c.length){var l=c[0],u=c[1],h=c[2],d=c[3],g=c[4],m=c[5],y=c[6],v=c[7],k=c[8],_=c[9],w=c[10],S=c[11],C=c[12],x=c[13],O=c[14],T=c[15];o.m11=l;o.a=l;o.m21=g;o.c=g;o.m31=k;o.m41=C;o.e=C;o.m12=u;o.b=u;o.m22=m;o.d=m;o.m32=_;o.m42=x;o.f=x;o.m13=h;o.m23=y;o.m33=w;o.m43=O;o.m14=d;o.m24=v;o.m34=S;o.m44=T}else{if(6!==c.length)throw new TypeError("CSSMatrix: expecting an Array of 6/16 values.");var E=c[0],M=c[1],R=c[2],j=c[3],D=c[4],N=c[5];o.m11=E;o.a=E;o.m12=M;o.b=M;o.m21=R;o.c=R;o.m22=j;o.d=j;o.m41=D;o.e=D;o.m42=N;o.f=N}return o}function fromMatrix(r){var o=Object.keys(new t);if("object"===_typeof(r)&&o.every((function(t){return t in r})))return fromArray([r.m11,r.m12,r.m13,r.m14,r.m21,r.m22,r.m23,r.m24,r.m31,r.m32,r.m33,r.m34,r.m41,r.m42,r.m43,r.m44]);throw TypeError('CSSMatrix: "'+r+'" is not a DOMMatrix / CSSMatrix / JSON compatible object.')}function fromString(r){if("string"!=typeof r)throw TypeError('CSSMatrix: "'+r+'" is not a string.');var o=String(r).replace(/\s/g,""),c=new t,l='CSSMatrix: invalid transform string "'+r+'"';o.split(")").filter((function(t){return t})).forEach((function(t){var r=t.split("("),o=r[0],u=r[1];if(!u)throw TypeError(l);var h=u.split(",").map((function(t){return t.includes("rad")?parseFloat(t)*(180/Math.PI):parseFloat(t)})),d=h[0],g=h[1],m=h[2],y=h[3],v=[d,g,m],k=[d,g,m,y];if("perspective"===o&&d&&[g,m].every((function(t){return void 0===t})))c.m34=-1/d;else if(o.includes("matrix")&&[6,16].includes(h.length)&&h.every((function(t){return!Number.isNaN(+t)}))){var _=h.map((function(t){return Math.abs(t)<1e-6?0:t}));c=c.multiply(fromArray(_))}else if("translate3d"===o&&v.every((function(t){return!Number.i