HEX
Server: LiteSpeed
System: Linux CentOS-79-64-minimal 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: vishn3436 (5293)
PHP: 8.0.15
Disabled: NONE
Upload Files
File: //data/geometra-4-host-prod/webviewer/core/pdf/PDFworker.js
(function(){/*
 *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
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

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
*****************************************************************************/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(e){var n=0;return function(){return n<e.length?{done:!1,value:e[n++]}:{done:!0}}};$jscomp.arrayIterator=function(e){return{next:$jscomp.arrayIteratorImpl(e)}};$jscomp.makeIterator=function(e){var n="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return n?n.call(e):$jscomp.arrayIterator(e)};
$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(e,n,l){e!=Array.prototype&&e!=Object.prototype&&(e[n]=l.value)};
$jscomp.polyfill=function(e,n,l,f){if(n){l=$jscomp.global;e=e.split(".");for(f=0;f<e.length-1;f++){var m=e[f];m in l||(l[m]={});l=l[m]}e=e[e.length-1];f=l[e];n=n(f);n!=f&&null!=n&&$jscomp.defineProperty(l,e,{configurable:!0,writable:!0,value:n})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(e){function n(){this.batch_=null}function l(b){return b instanceof m?b:new m(function(a,c){a(b)})}if(e&&!$jscomp.FORCE_POLYFILL_PROMISE)return e;n.prototype.asyncExecute=function(b){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(b);return this};n.prototype.asyncExecuteBatch_=function(){var b=this;this.asyncExecuteFunction(function(){b.executeBatch_()})};var f=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(b){f(b,
0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var b=this.batch_;this.batch_=[];for(var a=0;a<b.length;++a){var c=b[a];b[a]=null;try{c()}catch(k){this.asyncThrow_(k)}}}this.batch_=null};n.prototype.asyncThrow_=function(b){this.asyncExecuteFunction(function(){throw b;})};var m=function(b){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var a=this.createResolveAndReject_();try{b(a.resolve,a.reject)}catch(c){a.reject(c)}};m.prototype.createResolveAndReject_=
function(){function b(k){return function(h){c||(c=!0,k.call(a,h))}}var a=this,c=!1;return{resolve:b(this.resolveTo_),reject:b(this.reject_)}};m.prototype.resolveTo_=function(b){if(b===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof m)this.settleSameAsPromise_(b);else{a:switch(typeof b){case "object":var a=null!=b;break a;case "function":a=!0;break a;default:a=!1}a?this.resolveToNonPromiseObj_(b):this.fulfill_(b)}};m.prototype.resolveToNonPromiseObj_=function(b){var a=
void 0;try{a=b.then}catch(c){this.reject_(c);return}"function"==typeof a?this.settleSameAsThenable_(a,b):this.fulfill_(b)};m.prototype.reject_=function(b){this.settle_(2,b)};m.prototype.fulfill_=function(b){this.settle_(1,b)};m.prototype.settle_=function(b,a){if(0!=this.state_)throw Error("Cannot settle("+b+", "+a+"): Promise already settled in state"+this.state_);this.state_=b;this.result_=a;this.executeOnSettledCallbacks_()};m.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var m=
0;m<this.onSettledCallbacks_.length;++m)b.asyncExecute(this.onSettledCallbacks_[m]);this.onSettledCallbacks_=null}};var b=new n;m.prototype.settleSameAsPromise_=function(b){var a=this.createResolveAndReject_();b.callWhenSettled_(a.resolve,a.reject)};m.prototype.settleSameAsThenable_=function(b,a){var c=this.createResolveAndReject_();try{b.call(a,c.resolve,c.reject)}catch(k){c.reject(k)}};m.prototype.then=function(b,a){function c(a,c){return"function"==typeof a?function(c){try{k(a(c))}catch(x){h(x)}}:
c}var k,h,r=new m(function(a,c){k=a;h=c});this.callWhenSettled_(c(b,k),c(a,h));return r};m.prototype.catch=function(b){return this.then(void 0,b)};m.prototype.callWhenSettled_=function(m,a){function c(){switch(k.state_){case 1:m(k.result_);break;case 2:a(k.result_);break;default:throw Error("Unexpected state: "+k.state_);}}var k=this;null==this.onSettledCallbacks_?b.asyncExecute(c):this.onSettledCallbacks_.push(c)};m.resolve=l;m.reject=function(b){return new m(function(a,c){c(b)})};m.race=function(b){return new m(function(a,
c){for(var k=$jscomp.makeIterator(b),h=k.next();!h.done;h=k.next())l(h.value).callWhenSettled_(a,c)})};m.all=function(b){var a=$jscomp.makeIterator(b),c=a.next();return c.done?l([]):new m(function(k,b){function h(a){return function(c){p[a]=c;v--;0==v&&k(p)}}var p=[],v=0;do p.push(void 0),v++,l(c.value).callWhenSettled_(h(p.length-1),b),c=a.next();while(!c.done)})};return m},"es6","es3");
$jscomp.checkStringArgs=function(e,n,l){if(null==e)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return e+""};
$jscomp.polyfill("String.prototype.endsWith",function(e){return e?e:function(e,l){var f=$jscomp.checkStringArgs(this,e,"endsWith");e+="";void 0===l&&(l=f.length);l=Math.max(0,Math.min(l|0,f.length));for(var m=e.length;0<m&&0<l;)if(f[--l]!=e[--m])return!1;return 0>=m}},"es6","es3");$jscomp.checkEs6ConformanceViaProxy=function(){try{var e={},n=Object.create(new $jscomp.global.Proxy(e,{get:function(l,f,m){return l==e&&"q"==f&&m==n}}));return!0===n.q}catch(l){return!1}};
$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy();$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var e=0;return function(n){return $jscomp.SYMBOL_PREFIX+(n||"")+e++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.asyncIterator;e||(e=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(e){$jscomp.initSymbolIterator();e={next:e};e[$jscomp.global.Symbol.iterator]=function(){return this};return e};$jscomp.owns=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)};
$jscomp.polyfill("WeakMap",function(e){function n(){if(!e||!Object.seal)return!1;try{var a=Object.seal({}),k=Object.seal({}),b=new e([[a,2],[k,3]]);if(2!=b.get(a)||3!=b.get(k))return!1;b.delete(a);b.set(k,4);return!b.has(a)&&4==b.get(k)}catch(r){return!1}}function l(){}function f(a){if(!$jscomp.owns(a,b)){var c=new l;$jscomp.defineProperty(a,b,{value:c})}}function m(a){var c=Object[a];c&&(Object[a]=function(a){if(a instanceof l)return a;f(a);return c(a)})}if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(e&&
$jscomp.ES6_CONFORMANCE)return e}else if(n())return e;var b="$jscomp_hidden_"+Math.random();m("freeze");m("preventExtensions");m("seal");var u=0,a=function(a){this.id_=(u+=Math.random()+1).toString();if(a){a=$jscomp.makeIterator(a);for(var c;!(c=a.next()).done;)c=c.value,this.set(c[0],c[1])}};a.prototype.set=function(a,k){f(a);if(!$jscomp.owns(a,b))throw Error("WeakMap key fail: "+a);a[b][this.id_]=k;return this};a.prototype.get=function(a){return $jscomp.owns(a,b)?a[b][this.id_]:void 0};a.prototype.has=
function(a){return $jscomp.owns(a,b)&&$jscomp.owns(a[b],this.id_)};a.prototype.delete=function(a){return $jscomp.owns(a,b)&&$jscomp.owns(a[b],this.id_)?delete a[b][this.id_]:!1};return a},"es6","es3");$jscomp.MapEntry=function(){};
$jscomp.polyfill("Map",function(e){function n(){if($jscomp.ASSUME_NO_NATIVE_MAP||!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var a=Object.seal({x:4}),k=new e($jscomp.makeIterator([[a,"s"]]));if("s"!=k.get(a)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var b=k.entries(),r=b.next();if(r.done||r.value[0]!=a||"s"!=r.value[1])return!1;r=b.next();return r.done||4!=r.value[0].x||"t"!=r.value[1]||!b.next().done?!1:!0}catch(p){return!1}}
if($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS){if(e&&$jscomp.ES6_CONFORMANCE)return e}else if(n())return e;$jscomp.initSymbolIterator();var l=new WeakMap,f=function(a){this.data_={};this.head_=u();this.size=0;if(a){a=$jscomp.makeIterator(a);for(var c;!(c=a.next()).done;)c=c.value,this.set(c[0],c[1])}};f.prototype.set=function(a,k){a=0===a?0:a;var c=m(this,a);c.list||(c.list=this.data_[c.id]=[]);c.entry?c.entry.value=k:(c.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:a,
value:k},c.list.push(c.entry),this.head_.previous.next=c.entry,this.head_.previous=c.entry,this.size++);return this};f.prototype.delete=function(a){a=m(this,a);return a.entry&&a.list?(a.list.splice(a.index,1),a.list.length||delete this.data_[a.id],a.entry.previous.next=a.entry.next,a.entry.next.previous=a.entry.previous,a.entry.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=u();this.size=0};f.prototype.has=function(a){return!!m(this,a).entry};
f.prototype.get=function(a){return(a=m(this,a).entry)&&a.value};f.prototype.entries=function(){return b(this,function(a){return[a.key,a.value]})};f.prototype.keys=function(){return b(this,function(a){return a.key})};f.prototype.values=function(){return b(this,function(a){return a.value})};f.prototype.forEach=function(a,k){for(var c=this.entries(),b;!(b=c.next()).done;)b=b.value,a.call(k,b[1],b[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var m=function(c,k){var b=k&&typeof k;"object"==
b||"function"==b?l.has(k)?b=l.get(k):(b=""+ ++a,l.set(k,b)):b="p_"+k;var r=c.data_[b];if(r&&$jscomp.owns(c.data_,b))for(c=0;c<r.length;c++){var p=r[c];if(k!==k&&p.key!==p.key||k===p.key)return{id:b,list:r,index:c,entry:p}}return{id:b,list:r,index:-1,entry:void 0}},b=function(a,b){var c=a.head_;return $jscomp.iteratorPrototype(function(){if(c){for(;c.head!=a.head_;)c=c.previous;for(;c.next!=c.head;)return c=c.next,{done:!1,value:b(c)};c=null}return{done:!0,value:void 0}})},u=function(){var a={};return a.previous=
a.next=a.head=a},a=0;return f},"es6","es3");$jscomp.findInternal=function(e,n,l){e instanceof String&&(e=String(e));for(var f=e.length,m=0;m<f;m++){var b=e[m];if(n.call(l,b,m,e))return{i:m,v:b}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(e){return e?e:function(e,l){return $jscomp.findInternal(this,e,l).v}},"es6","es3");$jscomp.underscoreProtoCanBeSet=function(){var e={a:!0},n={};try{return n.__proto__=e,n.a}catch(l){}return!1};
$jscomp.setPrototypeOf="function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(e,n){e.__proto__=n;if(e.__proto__!==n)throw new TypeError(e+" is not extensible");return e}:null;$jscomp.polyfill("Object.setPrototypeOf",function(e){return e||$jscomp.setPrototypeOf},"es6","es5");
$jscomp.assign="function"==typeof Object.assign?Object.assign:function(e,n){for(var l=1;l<arguments.length;l++){var f=arguments[l];if(f)for(var m in f)$jscomp.owns(f,m)&&(e[m]=f[m])}return e};$jscomp.polyfill("Object.assign",function(e){return e||$jscomp.assign},"es6","es3");
$jscomp.iteratorFromArray=function(e,n){$jscomp.initSymbolIterator();e instanceof String&&(e+="");var l=0,f={next:function(){if(l<e.length){var m=l++;return{value:n(m,e[m]),done:!1}}f.next=function(){return{done:!0,value:void 0}};return f.next()}};f[Symbol.iterator]=function(){return f};return f};$jscomp.polyfill("Array.prototype.keys",function(e){return e?e:function(){return $jscomp.iteratorFromArray(this,function(e){return e})}},"es6","es3");
(function(e){function n(f){if(l[f])return l[f].exports;var m=l[f]={i:f,l:!1,exports:{}};e[f].call(m.exports,m,m.exports,n);m.l=!0;return m.exports}var l={};n.m=e;n.c=l;n.d=function(f,m,b){n.o(f,m)||Object.defineProperty(f,m,{enumerable:!0,get:b})};n.r=function(f){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"});Object.defineProperty(f,"__esModule",{value:!0})};n.t=function(f,m){m&1&&(f=n(f));if(m&8||m&4&&"object"===typeof f&&f&&f.__esModule)return f;
var b=Object.create(null);n.r(b);Object.defineProperty(b,"default",{enumerable:!0,value:f});if(m&2&&"string"!=typeof f)for(var e in f)n.d(b,e,function(a){return f[a]}.bind(null,e));return b};n.n=function(e){var m=e&&e.__esModule?function(){return e["default"]}:function(){return e};n.d(m,"a",m);return m};n.o=function(e,m){return Object.prototype.hasOwnProperty.call(e,m)};n.p="/core/pdf/";return n(n.s=17)})([function(e,n,l){l.d(n,"c",function(){return c});l.d(n,"a",function(){return k});l.d(n,"b",function(){return h});
l.d(n,"d",function(){return r});var f=l(8),m=console.log,b=console.warn,u=console.error,a=function(a){void 0===a&&(a=!0);a?(console.log=function(){},console.warn=function(){},console.error=function(){}):(console.log=m,console.warn=b,console.error=u)},c=function(){var c=Object(f.a)(location.search);a("1"===c.disableLogs)},k=function(c){c.on("disableLogs",function(c){a(c.disabled)})},h=function(a,c){return function(){}},r=function(a,c){c?console.warn(a+": "+c):console.warn(a)}},function(e,n,l){l.d(n,
"c",function(){return b});l.d(n,"d",function(){return m});l.d(n,"b",function(){return u});l.d(n,"a",function(){return a});var f=l(3),m=function(a,b){Object(f.a)("disableLogs")||(b?console.warn(a+": "+b):console.warn(a))},b=function(a,b){Object(f.a)("disableLogs")||(b?console.log(a+": "+b):console.log(a))},u=function(a){if(!Object(f.a)("disableLogs"))throw console.error(a),Error(a);},a=function(a,b){}},function(e,n,l){l.d(n,"a",function(){return y});l.d(n,"b",function(){return w});l.d(n,"c",function(){return A});
var f=l(11),m=l(1),b=l(16),u=l(4),a="undefined"===typeof window?self:window,c=a.importScripts,k=function(d){if("string"===typeof d){for(var g=new Uint8Array(d.length),a=d.length,q=0;q<a;q++)g[q]=d.charCodeAt(q);return g}return d},h=function(d){if("string"!==typeof d){for(var g="",a=0,q=d.length,c;a<q;)c=d.subarray(a,a+1024),a+=1024,g+=String.fromCharCode.apply(null,c);return g}return d},r=!1,p=function(d,g){r||(c(a.basePath+"decode.min.js"),r=!0);d=self.BrotliDecode(k(d));return g?d:h(d)},v=function(d,
g){return Object(f.a)(void 0,void 0,Promise,function(){var a;return Object(f.b)(this,function(q){switch(q.label){case 0:return r?[3,2]:[4,Object(u.b)(self.CoreControls.getWorkerPath()+"external/decode.min.js","Failed to download decode.min.js",window)];case 1:q.sent(),r=!0,q.label=2;case 2:return a=self.BrotliDecode(k(d)),[2,g?a:h(a)]}})})};(function(){function d(){this.remainingDataArrays=[]}d.prototype.processRaw=function(d){return d};d.prototype.processBrotli=function(d){this.remainingDataArrays.push(d);
return null};d.prototype.GetNextChunk=function(d){this.decodeFunction||(this.decodeFunction=0===d[0]&&97===d[1]&&115===d[2]&&109===d[3]?this.processRaw:this.processBrotli);return this.decodeFunction(d)};d.prototype.End=function(){if(this.remainingDataArrays.length){for(var d=this.arrays,g=0,a=0;a<d.length;++a)g+=d[a].length;g=new Uint8Array(g);var q=0;for(a=0;a<d.length;++a){var c=d[a];g.set(c,q);q+=c.length}return p(g,!0)}return null};return d})();var z=!1,x=function(d,g){z||(c(a.basePath+"rawinflate.js",
a.basePath+"pako_inflate.min.js"),z=!0);var q=10;if("string"===typeof d){if(d.charCodeAt(3)&8){for(;0!==d.charCodeAt(q);++q);++q}}else if(d[3]&8){for(;0!==d[q];++q);++q}if(g)return d=k(d),d=d.subarray(q,d.length-8),a.pako.inflate(d,{windowBits:-15});d=h(d);d=d.substring(q,d.length-8);return b.a.inflate(d)},t=function(d,g){return g?d:h(d)},B=function(d){var g=!d.shouldOutputArray,a=new XMLHttpRequest;a.open("GET",d.url,d.isAsync);var q=g&&a.overrideMimeType;a.responseType=q?"text":"arraybuffer";q&&
a.overrideMimeType("text/plain; charset=x-user-defined");a.send();var w=function(){var w=Date.now();var b=q?a.responseText:new Uint8Array(a.response);Object(m.a)("worker","Result length is "+b.length);b.length<d.compressedMaximum?(b=d.decompressFunction(b,d.shouldOutputArray),Object(m.d)("There may be some degradation of performance. Your server has not been configured to serve .gz. and .br. files with the expected Content-Encoding. See http://www.pdftron.com/kb_content_encoding for instructions on how to resolve this."),
c&&Object(m.a)("worker","Decompressed length is "+b.length)):g&&(b=h(b));c&&Object(m.a)("worker",d.url+" Decompression took "+(Date.now()-w));return b};if(d.isAsync)var b=new Promise(function(g,q){a.onload=function(){200===this.status||0===this.status?g(w()):q("Download Failed "+d.url)};a.onerror=function(){q("Network error occurred "+d.url)}});else{if(200===a.status||0===a.status)return w();throw Error("Failed to load "+d.url);}return b},y=function(d){var g=d.lastIndexOf("/");-1===g&&(g=0);var a=
d.slice(g).replace(".",".br.");c||(a.endsWith(".js.mem")?a=a.replace(".js.mem",".mem"):a.endsWith(".js")&&(a=a.concat(".mem")));return d.slice(0,g)+a},C=function(d,g){var a=d.lastIndexOf("/");-1===a&&(a=0);var q=d.slice(a).replace(".",".gz.");g.url=d.slice(0,a)+q;g.decompressFunction=x;return B(g)},L=function(d,g){g.url=y(d);g.decompressFunction=c?p:v;return B(g)},d=function(d,g){d.endsWith(".js.mem")?d=d.slice(0,-4):d.endsWith(".mem")&&(d=d.slice(0,-4)+".js.mem");g.url=d;g.decompressFunction=t;return B(g)},
g=function(d,g,a,q){return d.catch(function(d){Object(m.d)(d);return q(g,a)})},q=function(d,a,q){var c;if(q.isAsync){var w=a[0](d,q);for(c=1;c<a.length;++c)w=g(w,d,q,a[c]);return w}for(c=0;c<a.length;++c)try{return a[c](d,q)}catch(K){Object(m.d)(K.message)}throw Error("");},A=function(g,a,c,w){return q(g,[C,L,d],{compressedMaximum:a,isAsync:c,shouldOutputArray:w})},w=function(g,a,c,w){return q(g,[L,C,d],{compressedMaximum:a,isAsync:c,shouldOutputArray:w})}},function(e,n,l){l.d(n,"a",function(){return b});
l.d(n,"b",function(){return u});var f={},m={flattenedResources:!1,CANVAS_CACHE_SIZE:void 0,maxPagesBefore:void 0,maxPagesAhead:void 0,disableLogs:!1,_trnDebugMode:!1,_logFiltersEnabled:null},b=function(a){return m[a]},u=function(a,c){var b;m[a]=c;null===(b=f[a])||void 0===b?void 0:b.forEach(function(a){a(c)})}},function(e,n,l){function f(a,c,k){function h(v){p=p||Date.now();return v?(Object(b.a)("load","Try instantiateStreaming"),fetch(Object(u.a)(a)).then(function(a){return WebAssembly.instantiateStreaming(a,
c)}).catch(function(c){Object(b.a)("load","instantiateStreaming Failed "+a+" message "+c.message);return h(!1)})):Object(u.b)(a,k,!0,!0).then(function(a){r=Date.now();Object(b.a)("load","Request took "+(r-p)+" ms");return WebAssembly.instantiate(a,c)})}var r,p;return h(!!WebAssembly.instantiateStreaming).then(function(a){Object(b.a)("load","WASM compilation took "+(Date.now()-(r||p))+" ms");return a})}function m(a,c,k){return new Promise(function(h){if(!a)return h();var r=k.document.createElement("script");
r.type="text/javascript";r.onload=function(){h()};r.onerror=function(){c&&Object(b.d)(c);h()};r.src=a;k.document.getElementsByTagName("head")[0].appendChild(r)})}l.d(n,"a",function(){return f});l.d(n,"b",function(){return m});var b=l(1),u=l(2)},function(e,n,l){l.d(n,"c",function(){return u});l.d(n,"b",function(){return a});l.d(n,"a",function(){return c});var f="undefined"===typeof window?self:window;e=function(){var a=navigator.userAgent.toLowerCase();return(a=/(msie) ([\w.]+)/.exec(a)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(a))?
parseInt(a[2],10):a}();(function(){var a=f.navigator.userAgent.match(/OPR/),c=f.navigator.userAgent.match(/Maxthon/),b=f.navigator.userAgent.match(/Edge/);return f.navigator.userAgent.match(/Chrome\/(.*?) /)&&!a&&!c&&!b})();navigator.userAgent.match(/Edge/i);n=/iPad|iPhone|iPod/.test(f.navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;(function(){var a=f.navigator.userAgent.match(/.*\/([0-9\.]+)\s(Safari|Mobile).*/i);return a?parseFloat(a[1]):a})();var m=/^((?!chrome|android).)*safari/i.test(f.navigator.userAgent)||
/^((?!chrome|android).)*$/.test(f.navigator.userAgent)&&n;f.navigator.userAgent.match(/Firefox/);e||/Android|webOS|Touch|IEMobile|Silk/i.test(navigator.userAgent);navigator.userAgent.match(/(iPad|iPhone|iPod)/i);f.navigator.userAgent.indexOf("Android");var b=/Mac OS X 10_13_6.*\(KHTML, like Gecko\)$/.test(f.navigator.userAgent),u=function(){return m||b},a=!(!self.WebAssembly||!self.WebAssembly.validate),c=-1<f.navigator.userAgent.indexOf("Edge/16")||-1<f.navigator.userAgent.indexOf("MSAppHost")},
function(e,n,l){function f(a){"@babel/helpers - typeof";f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};return f(a)}var m,b,u;!function(a){"object"===f(n)&&"undefined"!==typeof e?e.exports=a():!(b=[],m=a,u="function"===typeof m?m.apply(n,b):m,void 0!==u&&(e.exports=u))}(function(){return function r(c,b,h){function k(p,t){if(!b[p]){if(!c[p]){if(v)return v(p,
!0);t=Error("Cannot find module '".concat(p,"'"));throw t.code="MODULE_NOT_FOUND",t;}t=b[p]={exports:{}};c[p][0].call(t.exports,function(b){return k(c[p][1][b]||b)},t,t.exports,r,c,b,h)}return b[p].exports}for(var v=!1,z=0;z<h.length;z++)k(h[z]);return k}({1:[function(c,b,h){var k={}.hasOwnProperty,p=function(c,b){function p(){this.constructor=c}for(var t in b)k.call(b,t)&&(c[t]=b[t]);p.prototype=b.prototype;c.prototype=new p;c.__super__=b.prototype;return c};h=c("./PriorityQueue/AbstractPriorityQueue");
c=c("./PriorityQueue/ArrayStrategy");h=function(c){function b(c){c||(c={});c.strategy||(c.strategy=BinaryHeapStrategy);c.comparator||(c.comparator=function(c,b){return(c||0)-(b||0)});b.__super__.constructor.call(this,c)}p(b,c);return b}(h);h.ArrayStrategy=c;b.exports=h},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3}],2:[function(c,b,h){b.exports=function(){function c(c){if(null==(null!=c?c.strategy:void 0))throw"Must pass options.strategy, a strategy";if(null==(null!=
c?c.comparator:void 0))throw"Must pass options.comparator, a comparator";this.priv=new c.strategy(c);this.length=0}c.prototype.queue=function(c){this.length++;this.priv.queue(c)};c.prototype.dequeue=function(c){if(!this.length)throw"Empty queue";this.length--;return this.priv.dequeue()};c.prototype.peek=function(c){if(!this.length)throw"Empty queue";return this.priv.peek()};c.prototype.remove=function(c){this.priv.remove(c)&&--this.length};c.prototype.find=function(c){return 0<=this.priv.find(c)};
c.prototype.removeAllMatching=function(c,b){c=this.priv.removeAllMatching(c,b);this.length-=c};return c}()},{}],3:[function(c,b,h){var k=function(c,b,k){var h;var t=0;for(h=c.length;t<h;){var p=t+h>>>1;0<=k(c[p],b)?t=p+1:h=p}return t};b.exports=function(){function c(c){var b;this.options=c;this.comparator=this.options.comparator;this.data=(null!=(b=this.options.initialValues)?b.slice(0):void 0)||[];this.data.sort(this.comparator).reverse()}c.prototype.queue=function(c){var b=k(this.data,c,this.comparator);
this.data.splice(b,0,c)};c.prototype.dequeue=function(){return this.data.pop()};c.prototype.peek=function(){return this.data[this.data.length-1]};c.prototype.find=function(c){var b=k(this.data,c,this.comparator)-1;return 0<=b&&!this.comparator(this.data[b],c)?b:-1};c.prototype.remove=function(c){c=this.find(c);return 0<=c?(this.data.splice(c,1),!0):!1};c.prototype.removeAllMatching=function(c,b){for(var k=0,t=this.data.length-1;0<=t;--t)if(c(this.data[t])){var h=this.data.splice(t,1)[0];b&&b(h);++k}return k};
return c}()},{}]},{},[1])(1)})},function(e,n,l){(function(e){function m(a,c){this._id=a;this._clearFn=c}var b="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,f=Function.prototype.apply;n.setTimeout=function(){return new m(f.call(setTimeout,b,arguments),clearTimeout)};n.setInterval=function(){return new m(f.call(setInterval,b,arguments),clearInterval)};n.clearTimeout=n.clearInterval=function(a){a&&a.close()};m.prototype.unref=m.prototype.ref=function(){};m.prototype.close=function(){this._clearFn.call(b,
this._id)};n.enroll=function(a,c){clearTimeout(a._idleTimeoutId);a._idleTimeout=c};n.unenroll=function(a){clearTimeout(a._idleTimeoutId);a._idleTimeout=-1};n._unrefActive=n.active=function(a){clearTimeout(a._idleTimeoutId);var c=a._idleTimeout;0<=c&&(a._idleTimeoutId=setTimeout(function(){a._onTimeout&&a._onTimeout()},c))};l(21);n.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate;n.clearImmediate="undefined"!==typeof self&&self.clearImmediate||
"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,l(9))},function(e,n,l){n.a=function(e){var m={};decodeURIComponent(e.slice(1)).split("&").forEach(function(b){b=b.split("=",2);m[b[0]]=b[1]});return m}},function(e,n){n=function(){return this}();try{n=n||(new Function("return this"))()}catch(l){"object"===typeof window&&(n=window)}e.exports=n},function(e,n,l){l.d(n,"b",function(){return u});l.d(n,"a",function(){return c});var f=l(2),m=l(4),b=l(5),u=function(){return b.b&&
!b.a&&!Object(b.c)()},a=function(){function a(a){var c=this;this.promise=a.then(function(a){c.response=a;c.status=200})}a.prototype.addEventListener=function(a,c){this.promise.then(c)};return a}(),c=function(c,b,e){if(u()&&!e)self.Module.instantiateWasm=function(a,k){return Object(m.a)(c+"Wasm.wasm",a,b["Wasm.wasm"]).then(function(a){k(a.instance)})},e=Object(f.b)(c+"Wasm.js.mem",b["Wasm.js.mem"],!1,!1);else{e=Object(f.b)((self.Module.asmjsPrefix?self.Module.asmjsPrefix:"")+c+".js.mem",b[".js.mem"],
!1);var k=Object(f.c)((self.Module.memoryInitializerPrefixURL?self.Module.memoryInitializerPrefixURL:"")+c+".mem",b[".mem"],!0,!0);self.Module.memoryInitializerRequest=new a(k)}e=new Blob([e],{type:"application/javascript"});importScripts(URL.createObjectURL(e))}},function(e,n,l){function f(b,e,a,c){return new (a||(a=Promise))(function(k,h){function m(a){try{v(c.next(a))}catch(x){h(x)}}function p(a){try{v(c["throw"](a))}catch(x){h(x)}}function v(c){c.done?k(c.value):(new a(function(a){a(c.value)})).then(m,
p)}v((c=c.apply(b,e||[])).next())})}function m(b,e){function a(a){return function(b){return c([a,b])}}function c(a){if(h)throw new TypeError("Generator is already executing.");for(;k;)try{if(h=1,m&&(p=a[0]&2?m["return"]:a[0]?m["throw"]||((p=m["return"])&&p.call(m),0):m.next)&&!(p=p.call(m,a[1])).done)return p;if(m=0,p)a=[a[0]&2,p.value];switch(a[0]){case 0:case 1:p=a;break;case 4:return k.label++,{value:a[1],done:!1};case 5:k.label++;m=a[1];a=[0];continue;case 7:a=k.ops.pop();k.trys.pop();continue;
default:if(!(p=k.trys,p=0<p.length&&p[p.length-1])&&(6===a[0]||2===a[0])){k=0;continue}if(3===a[0]&&(!p||a[1]>p[0]&&a[1]<p[3]))k.label=a[1];else if(6===a[0]&&k.label<p[1])k.label=p[1],p=a;else if(p&&k.label<p[2])k.label=p[2],k.ops.push(a);else{p[2]&&k.ops.pop();k.trys.pop();continue}}a=e.call(b,k)}catch(x){a=[6,x],m=0}finally{h=p=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}var k={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},h,m,p,v;return v={next:a(0),
"throw":a(1),"return":a(2)},"function"===typeof Symbol&&(v[Symbol.iterator]=function(){return this}),v}l.d(n,"a",function(){return f});l.d(n,"b",function(){return m})},function(e,n){function l(){throw Error("setTimeout has not been defined");}function f(){throw Error("clearTimeout has not been defined");}function m(a){if(h===setTimeout)return setTimeout(a,0);if((h===l||!h)&&setTimeout)return h=setTimeout,setTimeout(a,0);try{return h(a,0)}catch(B){try{return h.call(null,a,0)}catch(y){return h.call(this,
a,0)}}}function b(a){if(r===clearTimeout)return clearTimeout(a);if((r===f||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(a);try{return r(a)}catch(B){try{return r.call(null,a)}catch(y){return r.call(this,a)}}}function u(){v&&z&&(v=!1,z.length?p=z.concat(p):x=-1,p.length&&a())}function a(){if(!v){var a=m(u);v=!0;for(var c=p.length;c;){z=p;for(p=[];++x<c;)z&&z[x].run();x=-1;c=p.length}z=null;v=!1;b(a)}}function c(a,c){this.fun=a;this.array=c}function k(){}e=e.exports={};try{var h="function"===
typeof setTimeout?setTimeout:l}catch(t){h=l}try{var r="function"===typeof clearTimeout?clearTimeout:f}catch(t){r=f}var p=[],v=!1,z,x=-1;e.nextTick=function(b){var k=Array(arguments.length-1);if(1<arguments.length)for(var t=1;t<arguments.length;t++)k[t-1]=arguments[t];p.push(new c(b,k));1!==p.length||v||m(a)};c.prototype.run=function(){this.fun.apply(null,this.array)};e.title="browser";e.browser=!0;e.env={};e.argv=[];e.version="";e.versions={};e.on=k;e.addListener=k;e.once=k;e.off=k;e.removeListener=
k;e.removeAllListeners=k;e.emit=k;e.prependListener=k;e.prependOnceListener=k;e.listeners=function(a){return[]};e.binding=function(a){throw Error("process.binding is not supported");};e.cwd=function(){return"/"};e.chdir=function(a){throw Error("process.chdir is not supported");};e.umask=function(){return 0}},function(e,n,l){n.a=function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(e,m){void 0===e&&(e=0);void 0===m&&(m=this.byteLength);e=Math.floor(e);m=Math.floor(m);0>e&&(e+=
this.byteLength);0>m&&(m+=this.byteLength);e=Math.min(Math.max(0,e),this.byteLength);m=Math.min(Math.max(0,m),this.byteLength);if(0>=m-e)return new ArrayBuffer(0);var b=new ArrayBuffer(m-e),f=new Uint8Array(b);e=new Uint8Array(this,e,m-e);f.set(e);return b})}},function(e,n,l){(function(e){function m(a){"function"!==typeof a&&(a=new Function(""+a));for(var c=Array(arguments.length-1),d=0;d<c.length;d++)c[d]=arguments[d+1];l[v]={callback:a,args:c};B(v);return v++}function b(a){delete l[a]}function f(a){if(x)setTimeout(f,
0,a);else{var c=l[a];if(c){x=!0;try{var d=c.callback,g=c.args;switch(g.length){case 0:d();break;case 1:d(g[0]);break;case 2:d(g[0],g[1]);break;case 3:d(g[0],g[1],g[2]);break;default:d.apply(void 0,g)}}finally{b(a),x=!1}}}}function a(){B=function(a){e.nextTick(function(){f(a)})}}function c(){if(p.postMessage&&!p.importScripts){var a=!0,c=p.onmessage;p.onmessage=function(){a=!1};p.postMessage("","*");p.onmessage=c;return a}}function k(){var a="setImmediate$"+Math.random()+"$",c=function(d){d.source===
p&&"string"===typeof d.data&&0===d.data.indexOf(a)&&f(+d.data.slice(a.length))};p.addEventListener?p.addEventListener("message",c,!1):p.attachEvent("onmessage",c);B=function(d){p.postMessage(a+d,"*")}}function h(){var a=t.documentElement;B=function(c){var d=t.createElement("script");d.onreadystatechange=function(){f(c);d.onreadystatechange=null;a.removeChild(d);d=null};a.appendChild(d)}}function r(){B=function(a){setTimeout(f,0,a)}}var p="undefined"===typeof window?self:window,v=1,l={},x=!1,t=p.document,
B,y=Object.getPrototypeOf&&Object.getPrototypeOf(p);y=y&&y.setTimeout?y:p;"[object process]"==={}.toString.call(p.process)?a():c()?k():t&&"onreadystatechange"in t.createElement("script")?h():r();y.setImmediate=m;y.clearImmediate=b;n.a={setImmediate:m,clearImmediate:b}}).call(this,l(12))},function(e,n,l){var f=l(1);e=function(){function e(b,e){this.name=b;this.comObj=e;this.callbackIndex=1;this.postMessageTransfers=!0;this.callbacksCapabilities={};this.actionHandler={};this.actionHandlerAsync={};this.nextAsync=
null;this.actionHandler.console_log=[function(a){Object(f.c)(a)}];this.actionHandler.console_error=[function(a){Object(f.b)(a)}];this.actionHandler.workerLoaded=[function(){}];this.msgHandler=this.handleMessage.bind(this);e.addEventListener("message",this.msgHandler)}e.prototype.on=function(b,e,a){var c=this.actionHandler;c[b]&&Object(f.b)('There is already an actionName called "'+b+'"');c[b]=[e,a]};e.prototype.clearActionHandlers=function(){this.actionHandler={};this.comObj.removeEventListener("message",
this.msgHandler)};e.prototype.reset=function(){this.clearActionHandlers();this.comObj.reset&&this.comObj.reset()};e.prototype.replace=function(b,e,a){this.actionHandler[b]=[e,a]};e.prototype.onAsync=function(b,e,a){var c=this.actionHandlerAsync;c[b]&&Object(f.b)('There is already an actionName called "'+b+'"');c[b]=[e,a]};e.prototype.replaceAsync=function(b,e,a){var c=this.actionHandlerAsync,k=this.actionHandler;k[b]&&delete k[b];c[b]=[e,a]};e.prototype.onNextAsync=function(b){this.nextAsync=b};e.prototype.send=
function(b,e){this.postMessage({action:b,data:e})};e.prototype.getNextId=function(){return this.callbackIndex++};e.prototype.sendWithPromise=function(b,e,a){var c=this.getNextId();b={action:b,data:e,callbackId:c,priority:a};e=window.createPromiseCapability();this.callbacksCapabilities[c]=e;try{this.postMessage(b)}catch(k){e.reject(k)}return e.promise};e.prototype.sendWithPromiseReturnId=function(b,e,a){var c=this.getNextId();b={action:b,data:e,callbackId:c,priority:a};e=window.createPromiseCapability();
this.callbacksCapabilities[c]=e;try{this.postMessage(b)}catch(k){e.reject(k)}return{promise:e.promise,callbackId:c}};e.prototype.sendWithPromiseWithId=function(b,e,a){e>this.callbackIndex&&Object(f.b)("Can't reuse callbackId "+e+" lesser than callbackIndex "+this.callbackIndex);e in this.callbacksCapabilities&&Object(f.b)("Can't reuse callbackId "+e+". There is a capability waiting to be resolved. ");b={action:b,data:a,callbackId:e};a=window.createPromiseCapability();this.callbacksCapabilities[e]=
a;try{this.postMessage(b)}catch(c){a.reject(c)}return a.promise};e.prototype.sendError=function(b,e){if(b.message||b.errorData){b.message&&b.message.message&&(b.message=b.message.message);var a=b.errorData;b={type:b.type?b.type:"JavascriptError",message:b.message};a&&Object.keys(a).forEach(function(c){a.hasOwnProperty(c)&&(b[c]=a[c])})}this.postMessage({isReply:!0,callbackId:e,error:b})};e.prototype.getPromise=function(b){if(b in this.callbacksCapabilities)return this.callbacksCapabilities[b];Object(f.b)("Cannot get promise for callback "+
b)};e.prototype.cancelPromise=function(b){if(b in this.callbacksCapabilities){var e=this.callbacksCapabilities[b];delete this.callbacksCapabilities[b];e.reject({type:"Cancelled",message:"Request has been cancelled."});this.postMessage({action:"actionCancel",data:{callbackId:b}})}else Object(f.d)("Cannot cancel callback "+b)};e.prototype.postMessage=function(b){if(this.postMessageTransfers){var e=this.getTransfersArray(b);this.comObj.postMessage(b,e)}else this.comObj.postMessage(b)};e.prototype.getObjectTransfers=
function(b,e){var a=this;null!==b&&"object"===typeof b&&(b instanceof Uint8Array?e.push(b.buffer):b instanceof ArrayBuffer?e.push(b):Object.keys(b).forEach(function(c){b.hasOwnProperty(c)&&a.getObjectTransfers(b[c],e)}))};e.prototype.getTransfersArray=function(b){var e=[];this.getObjectTransfers(b,e);return 0===e.length?void 0:e};e.prototype.handleMessage=function(b){var e=this,a=b.data,c=this.actionHandler,k=this.actionHandlerAsync;b=this.callbacksCapabilities;if(a.isReply)c=a.callbackId,c in b?
(k=b[c],delete b[c],"error"in a?k.reject(a.error):k.resolve(a.data)):Object(f.a)("Cannot resolve callback "+c);else if(a.action in c){var h=c[a.action];a.callbackId?Promise.resolve().then(function(){return h[0].call(h[1],a.data)}).then(function(c){e.postMessage({isReply:!0,callbackId:a.callbackId,data:c})},function(c){e.sendError(c,a.callbackId)}):h[0].call(h[1],a.data)}else a.action in k?(h=k[a.action],a.callbackId?h[0].call(h[1],a).then(function(c){e.postMessage({isReply:!0,callbackId:a.callbackId,
data:c});e.nextAsync()},function(c){e.sendError(c,a.callbackId);e.nextAsync()}):h[0].call(h[1],a).then(function(){e.nextAsync()},function(){e.nextAsync()})):Object(f.b)("Unknown action from worker: "+a.action)};return e}();n.a=e},function(e,n,l){var f=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],m=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],b=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],u=[1,2,3,4,5,7,9,13,
17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],k=function(){this.list=this.next=null},h=function(){this.n=this.b=this.e=0;this.t=null},r=function(a,c,b,e,p,m){this.BMAX=16;this.N_MAX=288;this.status=0;this.root=null;this.m=0;var t=Array(this.BMAX+1),v,d,g,q=Array(this.BMAX+1),A,w=new h,B=Array(this.BMAX);var f=Array(this.N_MAX);
var x=Array(this.BMAX+1),r,l;var y=this.root=null;for(d=0;d<t.length;d++)t[d]=0;for(d=0;d<q.length;d++)q[d]=0;for(d=0;d<B.length;d++)B[d]=null;for(d=0;d<f.length;d++)f[d]=0;for(d=0;d<x.length;d++)x[d]=0;var n=256<c?a[256]:this.BMAX;var z=a;var u=0;d=c;do t[z[u]]++,u++;while(0<--d);if(t[0]==c)this.root=null,this.status=this.m=0;else{for(g=1;g<=this.BMAX&&0==t[g];g++);var G=g;m<g&&(m=g);for(d=this.BMAX;0!=d&&0==t[d];d--);var I=d;m>d&&(m=d);for(r=1<<g;g<d;g++,r<<=1)if(0>(r-=t[g])){this.status=2;this.m=
m;return}if(0>(r-=t[d]))this.status=2,this.m=m;else{t[d]+=r;x[1]=g=0;z=t;u=1;for(A=2;0<--d;)x[A++]=g+=z[u++];z=a;d=u=0;do 0!=(g=z[u++])&&(f[x[g]++]=d);while(++d<c);c=x[I];x[0]=d=0;z=f;u=0;f=-1;var F=q[0]=0;A=null;for(l=0;G<=I;G++)for(a=t[G];0<a--;){for(;G>F+q[1+f];){F+=q[1+f];f++;l=(l=I-F)>m?m:l;if((v=1<<(g=G-F))>a+1)for(v-=a+1,A=G;++g<l&&!((v<<=1)<=t[++A]);)v-=t[A];F+g>n&&F<n&&(g=n-F);l=1<<g;q[1+f]=g;A=Array(l);for(v=0;v<l;v++)A[v]=new h;y=null==y?this.root=new k:y.next=new k;y.next=null;y.list=
A;B[f]=A;0<f&&(x[f]=d,w.b=q[f],w.e=16+g,w.t=A,g=(d&(1<<F)-1)>>F-q[f],B[f-1][g].e=w.e,B[f-1][g].b=w.b,B[f-1][g].n=w.n,B[f-1][g].t=w.t)}w.b=G-F;u>=c?w.e=99:z[u]<b?(w.e=256>z[u]?16:15,w.n=z[u++]):(w.e=p[z[u]-b],w.n=e[z[u++]-b]);v=1<<G-F;for(g=d>>F;g<l;g+=v)A[g].e=w.e,A[g].b=w.b,A[g].n=w.n,A[g].t=w.t;for(g=1<<G-1;0!=(d&g);g>>=1)d^=g;for(d^=g;(d&(1<<F)-1)!=x[f];)F-=q[f],f--}this.m=q[1];this.status=0!=r&&1!=I?1:0}}},p={Stream:function(a){this.zip_inflate_start();this.zip_inflate_data=a;this.zip_inflate_pos=
0}};p.Stream.prototype={getBytes:function(a){for(var c,b=Array(1024),e=[],k=0;k<a&&0<(c=this.zip_inflate_internal(b,0,b.length));)e[e.length]=String.fromCharCode.apply(null,b.slice(0,c)),k+=c;return k?(this.zip_inflate_data=this.zip_inflate_data.slice(this.zip_inflate_pos),this.zip_inflate_pos=0,e.join("")):""},zip_GET_BYTE:function(){return this.zip_inflate_data.length==this.zip_inflate_pos?-1:this.zip_inflate_data.charCodeAt(this.zip_inflate_pos++)&255},zip_NEEDBITS:function(a){for(;this.zip_bit_len<
a;)this.zip_bit_buf|=this.zip_GET_BYTE()<<this.zip_bit_len,this.zip_bit_len+=8},zip_GETBITS:function(a){return this.zip_bit_buf&f[a]},zip_DUMPBITS:function(a){this.zip_bit_buf>>=a;this.zip_bit_len-=a},zip_inflate_codes:function(a,c,b){var e,k;if(0==b)return 0;for(k=0;;){this.zip_NEEDBITS(this.zip_bl);var h=this.zip_tl.list[this.zip_GETBITS(this.zip_bl)];for(e=h.e;16<e;){if(99==e)return-1;this.zip_DUMPBITS(h.b);e-=16;this.zip_NEEDBITS(e);h=h.t[this.zip_GETBITS(e)];e=h.e}this.zip_DUMPBITS(h.b);if(16==
e)this.zip_wp&=32767,a[c+k++]=this.zip_slide[this.zip_wp++]=h.n;else{if(15==e)break;this.zip_NEEDBITS(e);this.zip_copy_leng=h.n+this.zip_GETBITS(e);this.zip_DUMPBITS(e);this.zip_NEEDBITS(this.zip_bd);h=this.zip_td.list[this.zip_GETBITS(this.zip_bd)];for(e=h.e;16<e;){if(99==e)return-1;this.zip_DUMPBITS(h.b);e-=16;this.zip_NEEDBITS(e);h=h.t[this.zip_GETBITS(e)];e=h.e}this.zip_DUMPBITS(h.b);this.zip_NEEDBITS(e);this.zip_copy_dist=this.zip_wp-h.n-this.zip_GETBITS(e);for(this.zip_DUMPBITS(e);0<this.zip_copy_leng&&
k<b;)this.zip_copy_leng--,this.zip_copy_dist&=32767,this.zip_wp&=32767,a[c+k++]=this.zip_slide[this.zip_wp++]=this.zip_slide[this.zip_copy_dist++]}if(k==b)return b}this.zip_method=-1;return k},zip_inflate_stored:function(a,c,b){var e=this.zip_bit_len&7;this.zip_DUMPBITS(e);this.zip_NEEDBITS(16);e=this.zip_GETBITS(16);this.zip_DUMPBITS(16);this.zip_NEEDBITS(16);if(e!=(~this.zip_bit_buf&65535))return-1;this.zip_DUMPBITS(16);this.zip_copy_leng=e;for(e=0;0<this.zip_copy_leng&&e<b;)this.zip_copy_leng--,
this.zip_wp&=32767,this.zip_NEEDBITS(8),a[c+e++]=this.zip_slide[this.zip_wp++]=this.zip_GETBITS(8),this.zip_DUMPBITS(8);0==this.zip_copy_leng&&(this.zip_method=-1);return e},zip_inflate_fixed:function(c,e,k){if(null==this.zip_fixed_tl){var h,p=Array(288);for(h=0;144>h;h++)p[h]=8;for(;256>h;h++)p[h]=9;for(;280>h;h++)p[h]=7;for(;288>h;h++)p[h]=8;this.zip_fixed_bl=7;h=new r(p,288,257,m,b,this.zip_fixed_bl);if(0!=h.status)return alert("HufBuild error: ".concat(h.status)),-1;this.zip_fixed_tl=h.root;this.zip_fixed_bl=
h.m;for(h=0;30>h;h++)p[h]=5;this.zip_fixed_bd=5;h=new r(p,30,0,u,a,this.zip_fixed_bd);if(1<h.status)return this.zip_fixed_tl=null,alert("HufBuild error: ".concat(h.status)),-1;this.zip_fixed_td=h.root;this.zip_fixed_bd=h.m}this.zip_tl=this.zip_fixed_tl;this.zip_td=this.zip_fixed_td;this.zip_bl=this.zip_fixed_bl;this.zip_bd=this.zip_fixed_bd;return this.zip_inflate_codes(c,e,k)},zip_inflate_dynamic:function(e,k,h){var p,f,v,l=Array(316);for(p=0;p<l.length;p++)l[p]=0;this.zip_NEEDBITS(5);var x=257+
this.zip_GETBITS(5);this.zip_DUMPBITS(5);this.zip_NEEDBITS(5);var d=1+this.zip_GETBITS(5);this.zip_DUMPBITS(5);this.zip_NEEDBITS(4);p=4+this.zip_GETBITS(4);this.zip_DUMPBITS(4);if(286<x||30<d)return-1;for(f=0;f<p;f++)this.zip_NEEDBITS(3),l[c[f]]=this.zip_GETBITS(3),this.zip_DUMPBITS(3);for(;19>f;f++)l[c[f]]=0;this.zip_bl=7;f=new r(l,19,19,null,null,this.zip_bl);if(0!=f.status)return-1;this.zip_tl=f.root;this.zip_bl=f.m;var g=x+d;for(p=v=0;p<g;){this.zip_NEEDBITS(this.zip_bl);var q=this.zip_tl.list[this.zip_GETBITS(this.zip_bl)];
f=q.b;this.zip_DUMPBITS(f);f=q.n;if(16>f)l[p++]=v=f;else if(16==f){this.zip_NEEDBITS(2);f=3+this.zip_GETBITS(2);this.zip_DUMPBITS(2);if(p+f>g)return-1;for(;0<f--;)l[p++]=v}else{17==f?(this.zip_NEEDBITS(3),f=3+this.zip_GETBITS(3),this.zip_DUMPBITS(3)):(this.zip_NEEDBITS(7),f=11+this.zip_GETBITS(7),this.zip_DUMPBITS(7));if(p+f>g)return-1;for(;0<f--;)l[p++]=0;v=0}}this.zip_bl=9;f=new r(l,x,257,m,b,this.zip_bl);0==this.zip_bl&&(f.status=1);if(0!=f.status)return-1;this.zip_tl=f.root;this.zip_bl=f.m;for(p=
0;p<d;p++)l[p]=l[p+x];this.zip_bd=6;f=new r(l,d,0,u,a,this.zip_bd);this.zip_td=f.root;this.zip_bd=f.m;return 0==this.zip_bd&&257<x||0!=f.status?-1:this.zip_inflate_codes(e,k,h)},zip_inflate_start:function(){null==this.zip_slide&&(this.zip_slide=Array(65536));this.zip_bit_len=this.zip_bit_buf=this.zip_wp=0;this.zip_method=-1;this.zip_eof=!1;this.zip_copy_leng=this.zip_copy_dist=0;this.zip_fixed_tl=this.zip_tl=null},zip_inflate_internal:function(a,c,b){var e;for(e=0;e<b&&(!this.zip_eof||-1!=this.zip_method);){if(0<
this.zip_copy_leng){if(0!=this.zip_method)for(;0<this.zip_copy_leng&&e<b;)this.zip_copy_leng--,this.zip_copy_dist&=32767,this.zip_wp&=32767,a[c+e++]=this.zip_slide[this.zip_wp++]=this.zip_slide[this.zip_copy_dist++];else{for(;0<this.zip_copy_leng&&e<b;)this.zip_copy_leng--,this.zip_wp&=32767,this.zip_NEEDBITS(8),a[c+e++]=this.zip_slide[this.zip_wp++]=this.zip_GETBITS(8),this.zip_DUMPBITS(8);0==this.zip_copy_leng&&(this.zip_method=-1)}if(e==b)break}if(-1==this.zip_method){if(this.zip_eof)break;this.zip_NEEDBITS(1);
0!=this.zip_GETBITS(1)&&(this.zip_eof=!0);this.zip_DUMPBITS(1);this.zip_NEEDBITS(2);this.zip_method=this.zip_GETBITS(2);this.zip_DUMPBITS(2);this.zip_tl=null;this.zip_copy_leng=0}switch(this.zip_method){case 0:var k=this.zip_inflate_stored(a,c+e,b-e);break;case 1:k=null!=this.zip_tl?this.zip_inflate_codes(a,c+e,b-e):this.zip_inflate_fixed(a,c+e,b-e);break;case 2:k=null!=this.zip_tl?this.zip_inflate_codes(a,c+e,b-e):this.zip_inflate_dynamic(a,c+e,b-e);break;default:k=-1}if(-1==k)return this.zip_eof?
0:-1;e+=k}return e}};p.inflate=function(a){return(new p.Stream(a)).getBytes(4E9)};n.a=p},function(e,n,l){e.exports=l(18)},function(e,n,l){l.r(n);l(5);e=l(13);l(19);l(20);l(23);l(24);l(25);l(26);l(27);Object(e.a)()},function(e,n,l){(function(e){"undefined"===typeof e.crypto&&(e.crypto={getRandomValues:function(e){for(var b=0;b<e.length;b++)e[b]=256*Math.random()}})})("undefined"===typeof window?self:window)},function(e,n,l){(function(e,m){function b(e){"@babel/helpers - typeof";b="function"===typeof Symbol&&
"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};return b(e)}(function(e){function a(){for(var d=0;d<M.length;d++)M[d][0](M[d][1]);M=[];O=!1}function c(d,g){M.push([d,g]);O||(O=!0,D(a,0))}function k(d,a){function g(d){p(a,d)}function c(d){n(a,d)}try{d(g,c)}catch(E){c(E)}}function h(d){var a=d.owner,g=a.state_;a=a.data_;var c=d[g];d=d.then;if("function"===typeof c){g=q;try{a=
c(a)}catch(E){n(d,E)}}f(d,a)||(g===q&&p(d,a),g===A&&n(d,a))}function f(d,a){var g;try{if(d===a)throw new TypeError("A promises callback cannot return that same promise.");if(a&&("function"===typeof a||"object"===b(a))){var c=a.then;if("function"===typeof c)return c.call(a,function(c){g||(g=!0,a!==c?p(d,c):v(d,c))},function(a){g||(g=!0,n(d,a))}),!0}}catch(E){return g||n(d,E),!0}return!1}function p(d,a){d!==a&&f(d,a)||v(d,a)}function v(a,q){a.state_===d&&(a.state_=g,a.data_=q,c(t,a))}function n(a,q){a.state_===
d&&(a.state_=g,a.data_=q,c(B,a))}function x(d){var a=d.then_;d.then_=void 0;for(d=0;d<a.length;d++)h(a[d])}function t(d){d.state_=q;x(d)}function B(d){d.state_=A;x(d)}function y(d){if("function"!==typeof d)throw new TypeError("Promise constructor takes a function argument");if(!1===this instanceof y)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[];k(d,this)}e.createPromiseCapability=function(){var d=
{},a=new y(function(a,g){d.resolve=a;d.reject=g});d.promise=a;return d};var C=e.Promise,u=C&&"resolve"in C&&"reject"in C&&"all"in C&&"race"in C&&function(){var d;new C(function(a){d=a});return"function"===typeof d}();"undefined"!==typeof exports&&exports?(exports.Promise=u?C:y,exports.Polyfill=y):"function"===typeof define&&l(22)?define(function(){return u?C:y}):u||(e.Promise=y);var d="pending",g="sealed",q="fulfilled",A="rejected",w=function(){},D="undefined"!==typeof m?m:setTimeout,M=[],O;y.prototype=
{constructor:y,state_:d,then_:null,data_:void 0,then:function(d,a){d={owner:this,then:new this.constructor(w),fulfilled:d,rejected:a};this.state_===q||this.state_===A?c(h,d):this.then_.push(d);return d.then},"catch":function(d){return this.then(null,d)}};y.all=function(d){if("[object Array]"!==Object.prototype.toString.call(d))throw new TypeError("You must pass an array to Promise.all().");return new this(function(a,g){function c(d){b++;return function(g){q[d]=g;--b||a(q)}}for(var q=[],b=0,e=0,w;e<
d.length;e++)(w=d[e])&&"function"===typeof w.then?w.then(c(e),g):q[e]=w;b||a(q)})};y.race=function(d){if("[object Array]"!==Object.prototype.toString.call(d))throw new TypeError("You must pass an array to Promise.race().");return new this(function(a,g){for(var c=0,q;c<d.length;c++)(q=d[c])&&"function"===typeof q.then?q.then(a,g):a(q)})};y.resolve=function(d){return d&&"object"===b(d)&&d.constructor===this?d:new this(function(a){a(d)})};y.reject=function(d){return new this(function(a,g){g(d)})}})("undefined"!==
typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:void 0)}).call(this,l(9),l(7).setImmediate)},function(e,n,l){(function(e,m){(function(b,e){function a(d){delete t[d]}function c(d){if(B)setTimeout(c,0,d);else{var g=t[d];if(g){B=!0;try{var q=g.callback,b=g.args;switch(b.length){case 0:q();break;case 1:q(b[0]);break;case 2:q(b[0],b[1]);break;case 3:q(b[0],b[1],b[2]);break;default:q.apply(e,b)}}finally{a(d),B=!1}}}}function k(){C=function(d){m.nextTick(function(){c(d)})}}function h(){if(b.postMessage&&
!b.importScripts){var d=!0,a=b.onmessage;b.onmessage=function(){d=!1};b.postMessage("","*");b.onmessage=a;return d}}function f(){var d="setImmediate$"+Math.random()+"$",a=function(a){a.source===b&&"string"===typeof a.data&&0===a.data.indexOf(d)&&c(+a.data.slice(d.length))};b.addEventListener?b.addEventListener("message",a,!1):b.attachEvent("onmessage",a);C=function(a){b.postMessage(d+a,"*")}}function p(){var d=new MessageChannel;d.port1.onmessage=function(d){c(d.data)};C=function(a){d.port2.postMessage(a)}}
function l(){var d=y.documentElement;C=function(a){var g=y.createElement("script");g.onreadystatechange=function(){c(a);g.onreadystatechange=null;d.removeChild(g);g=null};d.appendChild(g)}}function n(){C=function(d){setTimeout(c,0,d)}}if(!b.setImmediate){var x=1,t={},B=!1,y=b.document,C,u=Object.getPrototypeOf&&Object.getPrototypeOf(b);u=u&&u.setTimeout?u:b;"[object process]"==={}.toString.call(b.process)?k():h()?f():b.MessageChannel?p():y&&"onreadystatechange"in y.createElement("script")?l():n();
u.setImmediate=function(d){"function"!==typeof d&&(d=new Function(""+d));for(var a=Array(arguments.length-1),c=0;c<a.length;c++)a[c]=arguments[c+1];t[x]={callback:d,args:a};C(x);return x++};u.clearImmediate=a}})("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,l(9),l(12))},function(e,n){e.exports={}},function(e,n,l){(function(e){var f=function(b,e){var a=function r(a){a=this["catch"](a);return{cancel:e,promise:a,then:c.bind(a),"catch":r.bind(a)}},c=function v(c,b){c=this.then(c,
b);return{cancel:e,promise:c,then:v.bind(c),"catch":a.bind(c)}};return{cancel:e,promise:b,then:c.bind(b),"catch":a.bind(b)}};e.CancellablePromise=function(b,e){var a=!1,c,k=new Promise(function(k,f){c=function(){a||(e(),f("cancelled"))};(new Promise(b)).then(function(c){a=!0;k(c)},function(c){a=!0;f(c)})});return f(k,c)};e.CancellablePromise.all=function(b){var e=Promise.all(b);return f(e,function(){b.forEach(function(a){a.cancel&&a.cancel()})})}})("undefined"===typeof self?void 0:self)},function(e,
n,l){(function(e,m){var b=l(0);(function(f){f.Module={TOTAL_MEMORY:50331648,noExitRuntime:!0,devicePixelRatio:1,cur_doc:null,cachePtrSize:0,hasBufOwnership:!0,loaded:!1,initCb:null,cachePtr:null,cleanupState:null,docs:{},postEvent:function(a,c,b){Module.workerMessageHandler.send("event",{docId:a,type:c,data:b})},postPagesUpdatedEvent:function(a,c,b){a={pageDimensions:Module.GetPageDimensions(a)};if(b)for(var e=0;e<b.length;++e)b[e]in a.pageDimensions?a.pageDimensions[b[e]].contentChanged=!0:console.warn("Invalid Page Number ".concat(b[e]));
Module.postEvent(c,"pagesUpdated",a);return a},GetIndividualPageDimensions:function(a,c,b){a=Module.PageGetPageInfo(b);a.id=Module.PageGetId(b);return a},GetPageDimensionsRange:function(a,c,b){for(var e={},k=Module.PDFDocGetPageIterator(a,c);c<b&&Module.IteratorHasNext(k);++c){var p=Module.stackSave(),f=Module.IteratorCurrent(k);e[c]=this.GetIndividualPageDimensions(a,c,f);Module.IteratorNext(k);Module.stackRestore(p)}return e},GetPageDimensions:function(a){try{var c=Module.stackSave(),b=Module.GetPageCount(a);
if(0===b)throw"This document has no pages.";return Module.GetPageDimensionsRange(a,1,b+1)}finally{Module.stackRestore(c)}},loadDoc:function(a,c){"undefined"===typeof Module&&this._main();var b=null;try{var e=Module.stackSave();c=Module.CreateDoc(a,c);var f=Module.GetDoc(c);if(Module.PDFDocInitSecurityHandler(f))return{docId:c,pageDimensions:Module.GetPageDimensions(f)};b={type:"NeedsPassword",errorData:{docId:c},message:"This document requires a password"}}catch(p){b={type:"InvalidPDF",message:p}}finally{Module.stackRestore(e)}throw b;
},loadCanvas:function(a,c,b,e,f,p,m,l){return new Promise(function(k,h){var v=Module.GetDoc(a),t=c+1,n=function(){k(Module.RasterizePage(v,t,b,e,p,f,m,l))},x=Module.docs[a].chunkStorage;if(x){var d=Module.GetDownloadData(v).downloader,g=x.getRequiredChunkOffsetArrays(d,t);x.keepChunks(g.have);d=function(){var d=x.getChunks(g.missing);Module.loadPromise=d.then(function(){var d=Module.loadPromise.cancelled;Module.loadPromise=null;d||n()})["catch"](function(d){"cancelled"!==d?h(d):Module.loadPromise=
null})};Module.loadPromise?Module.loadPromise.then(d,d):d()}else n()})},loadResources:function(a,c){Module.Initialize(c);Object(b.b)("worker","PDFNet initialized!");Module._TRN_PDFNetSetDefaultDiskCachingEnabled(!1);a=new Uint8Array(a);Module.PDFNetSetResourceData(a)},onRuntimeInitialized:function(){"undefined"===typeof Module&&(("undefined"!==typeof window?window:self).Module={});(function(a){a.PDFDocExportXFDF=function(a,b){a=Module.GetDoc(a);var c=Module.stackSave();try{var e=b?Module.PDFDocFDFExtract(a,
b):Module.PDFDocFDFExtract(a);var k=Module.FDFDocSaveAsXFDF(e);Module.stackRestore(c)}catch(v){throw Module.stackRestore(c),v;}return k};a.PageArrayToPageSet=function(a){var c=Module.stackSave();try{var b=Module.PageSetCreate();for(var e=0;e<a.length;++e)Module.PageSetAddPage(b,a[e]);Module.stackRestore(c)}catch(p){throw Module.stackRestore(c),p;}return b};a.cancelCurrent=function(){var a=Module.loadPromise;return a?(a.cancel(),a.cancelled=!0):(a=Module.cleanupState)?(e(a.timeout),a.cleanupArr.forEach(function(a){a()}),
Module.cleanupState=null,!0):!1};a.SetWorkerRestartCallback=function(a){Module.workerRestartCallback=a};a.XFDFMerge=function(a,e,h){if(e){var c=[];try{Object(b.b)("worker","Merge XFDF of length ".concat(e.length));var k=Module.GetUStringFromJSString(e,!0);c.push(function(){Module.UStringDestroy(k)});var f=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_FDFDocCreateFromXFDF(k,f));var m=Module.getValue(f,"i8*");c.push(function(){Module.FDFDocDestroy(m)});Module.PDFDocFDFUpdate(a,m,h)}finally{c.forEach(function(a){a()})}}};
a.MergeXFDF=function(a,b,e){return new Promise(function(c,k){var f=[];try{var h=Module.stackSave();f[f.length]=function(){Module.stackRestore(h)};var p=Module.GetDoc(a);Module.XFDFMerge(p,b,e);f.forEach(function(a){a()});c({})}catch(t){f.forEach(function(a){a()}),k(t)}})};a.CreateBufferFile=function(a,b){Module.MakeDev(a);var c=new ArrayBuffer(b);c=new Uint8Array(c);for(var e=0;e<b;++e)c[e]=255;Module.docs[a]={buffer:c}};a.ReadBufferFile=function(a,b){var c=Module.docs[a].buffer;b&&(b=new Uint8Array(c.buffer.slice(0)),
Module.docs[a].buffer=b);return c};a.RemoveBufferFile=function(a){Module.docs[a]=null};a.SaveHelper=function(a,b,e){e="undefined"===typeof e?2:e;Module.MakeDev(b);a=Module._TRN_PDFDocSave(a,Module.GetUStringFromJSString(b),e,0);Module.docs[b].sink=null;REX(a);return Module.docs[b].buffer.buffer};a.SaveDoc=function(a,b,e,m,p,l,n){return new Promise(function(c,k){var h=[];try{var t=Module.GetDoc(a),v=Module.stackSave();h[h.length]=function(){Module.stackRestore(v)};Module.XFDFMerge(t,b,n);for(var x=
Module.PDFDocGetPageIterator(t,1);Module.IteratorHasNext(x);){var d=Module.IteratorCurrent(x);try{for(var g=Module.PageGetNumAnnots(d);0<g;){var q=Module.PageGetAnnot(d,--g);Module.AnnotHasAppearance(q)||Module.AnnotRefreshAppearance(q)}}catch(I){Module.ObjErase(d,"Annots")}Module.IteratorNext(x)}if(l){g=function(a){a=new Uint8Array(a);f.FS.writeFile("watermarkFile",a);a=Module.ImageCreateFromFile(t,Module.GetUStringFromJSString("watermarkFile"));f.FS.unlink("watermarkFile");return a};var A=Module.ElementBuilderCreate();
h.push(function(){Module.ElementBuilderDestroy(A)});var w=Module.ElementWriterCreate();h.push(function(){Module.ElementWriterDestroy(w)});try{if(!l.hasOwnProperty("default"))throw Error("Watermark dictionary has no 'default' key!");var D=g(l["default"]);x=Module.PDFDocGetPageIterator(t,1);for(q=-1;Module.IteratorHasNext(x);){d=Module.IteratorCurrent(x);Module.IteratorNext(x);q++;var r=q.toString();try{if(l.hasOwnProperty(r)){var z=l[r];if(z)var u=g(z);else continue}else u=D;var J=Module.PageGetPageInfo(d),
K=Module.ElementBuilderCreateImage(A,u,0,0,J.width,J.height);Module.ElementWriterBegin(w,d);Module.ElementWriterWritePlacedElement(w,K);Module.ElementWriterEnd(w)}catch(I){console.warn("Watermark for page "+r+"can not be added due to error: "+I)}}}catch(I){console.warn("Watermarks can not be added due to error: "+I)}}x=0;if(m){var H=Module.PDFDocGetRoot(t);(x=Module.ObjFindObj(H,"OpenAction"))&&Module.ObjPut(H,"__OpenActionBackup__",x);var E=Module.ObjPutDict(H,"OpenAction");Module.ObjPutName(E,"Type",
"Action");Module.ObjPutName(E,"S","JavaScript");Module.ObjPutString(E,"JS","this.print()")}var N=Module.SaveHelper(t,a,p);m&&(x?Module.ObjPut(H,"OpenAction",Module.ObjFindObj(H,"__OpenActionBackup__")):Module.ObjErase(H,"OpenAction"));h.forEach(function(a){a()});if(e)c({fileData:N});else{var G=N.slice(0);c({fileData:G})}}catch(I){h.forEach(function(a){a()}),k(I)}})};a.SaveDocFromFixedElements=function(a,b,e){a=Module.PDFDocCreateFromLayoutEls(a);a=Module.CreateDoc({type:"ptr",value:a});return Module.SaveDoc(a,
b,!0,!1,e)};a.GetCurrentCanvasData=function(a){var c=Module.currentRenderData;if(!c)return null;a&&REX(Module._TRN_PDFRasterizerUpdateBuffer(c.rast));var e=Date.now();a=Module.ReadBufferFile("b",a);Object(b.b)("bufferTiming","Copy took ".concat(Date.now()-e));return{pageBuf:a.buffer,pageWidth:c.out_width,pageHeight:c.out_height}};a.RasterizePage=function(a,e,f,l,p,n,z,x){return new Promise(function(c,k){Module.currentRenderData={};var h=Module.currentRenderData;h.out_width=parseInt(f,10);h.out_height=
parseInt(l,10);var t=[];t.push(function(){Module.currentRenderData=null});try{var v=Module.stackSave();t[t.length]=function(){Module.stackRestore(v)};var d=Module.GetPage(a,e),g=Module.PageGetPageWidth(d),q=Module.PageGetPageHeight(d);h.stride=4*h.out_width;h.buf_size=h.out_width*h.out_height*4;Object(b.b)("Memory","Created rasterizer");h.rast=Module.PDFRasterizerCreate();t.push(function(){Object(b.b)("Memory","Destroyed rasterizer");Module._TRN_PDFRasterizerDestroy(h.rast)});if(z){var A=Module.EMSCreateUpdatedLayersContext(a,
z);0!==A&&(Module._TRN_PDFRasterizerSetOCGContext(h.rast,A),t.push(function(){Module._TRN_OCGContextDestroy(A)}))}var w=Module.PageGetRotation(d),D=1===n||3===n;w=(1===w||3===w)!==D;var r=Module.allocate(48,"i8",Module.ALLOC_STACK);if(p){p.x1=p[0];p.y1=p[1];p.x2=p[2];p.y2=p[3];var B=Module.PageGetDefaultMatrix(d,0),u=Module.Matrix2DInverse(B);p=Module.Matrix2DMultBBox(u,p);if(p.x2<p.x1){var J=p.x1;p.x1=p.x2;p.x2=J}p.y2<p.y1&&(J=p.y1,p.y1=p.y2,p.y2=J);var K=h.out_width/(w?p.y2-p.y1:p.x2-p.x1);var H=
Module.GetDefaultMatrixBox(d,p,n)}else H=Module.PageGetDefaultMatrix(d,n),K=h.out_width/(D?q:g);Module.Matrix2DSet(r,K,0,0,K,0,0);Module.Matrix2DConcat(r,H);Object(b.b)("Memory","Allocated buffer of ".concat(h.buf_size));t.push(function(){Object(b.b)("Memory","Deallocated buffer of ".concat(h.buf_size));Module._free(h.bufPtr)});var E=Module.allocate(4,"i8",Module.ALLOC_STACK),N=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerSetDrawAnnotations(h.rast,0));Module.CreateBufferFile("b",
h.buf_size);t.push(function(){Module.RemoveBufferFile("b")});if(10===x){REX(Module._TRN_PDFRasterizerSetOverprint(h.rast,1));var G=Module.PDFRasterizerRasterizeSeparations(h.rast,d,h.out_width,h.out_height,r,0,0);c({pageBuf:G,pageWidth:h.out_width,pageHeight:h.out_height})}else{REX(Module._TRN_PDFRasterizerSetOverprint(h.rast,x));REX(Module._TRN_PDFRasterizerGetChunkRendererPath(h.rast,d,Module.GetUStringFromJSString("b"),h.out_width,h.out_height,!0,r,0,0,0,E));var I=Module.getValue(E,"i8*");t.splice(1,
0,function(){REX(Module._TRN_ChunkRendererDestroy(I))})}var F=(new Date).getTime(),Q=m(function R(){try{for(var a=0,d=(new Date).getTime(),g=!1;200>a;){REX(Module._TRN_ChunkRendererRenderNext(I,N));if(!Module.getValue(N,"i8*")){g=!0;break}a=(new Date).getTime()-d}if(g){var e=Module.GetCurrentCanvasData(!1);Object(b.b)("worker","Total Page Time ".concat((new Date).getTime()-F));t.forEach(function(a){a()});c(e)}else Module.cleanupState.timeout=m(R)}catch(S){t.forEach(function(a){a()}),k(S)}});Module.cleanupState=
{cleanupArr:t,timeout:Q};t.push(function(){Module.cleanupState=null})}catch(T){t.forEach(function(a){a()}),k(T)}})};a.GetDestinationVPosHPos=function(a){var c=0,b=0,e=!1,f=!1,m=Module.DestinationGetPage(a),l=Module.DestinationGetExplicitDestObj(a);m=Module.PageGetDefaultMatrix(m);m=Module.Matrix2DInverse(m);var n=Module.Matrix2DMult(m,{x:b,y:c});b=n.x;c=n.y;try{switch(Module.DestinationGetFitType(a)){case 2:case 6:var t=Module.ObjGetAt(l,2);Module.ObjIsNumber(t)&&(c=Module.ObjGetNumber(t),e=!0);break;
case 0:t=Module.ObjGetAt(l,2);Module.ObjIsNumber(t)&&(b=Module.ObjGetNumber(t),f=!0);t=Module.ObjGetAt(l,3);Module.ObjIsNumber(t)&&(c=Module.ObjGetNumber(t),e=!0);break;case 4:t=Module.ObjGetAt(l,2);Module.ObjIsNumber(t)&&(b=Module.ObjGetNumber(t),f=!0);t=Module.ObjGetAt(l,5);Module.ObjIsNumber(t)&&(c=Module.ObjGetNumber(t),e=!0);break;case 3:case 7:t=Module.ObjGetAt(l,2),Module.ObjIsNumber(t)&&(b=Module.ObjGetNumber(t),f=!0)}n=Module.Matrix2DMult(m,{x:b,y:c});b=n.x;c=n.y;e||(c=0);f||(b=0)}catch(B){b=
c=0}return{hpos:b,vpos:c}};a.FillBookmarkTree=function(a,b){for(var c=Module.stackSave(),e=0;Module.BookmarkIsValid(a);a=Module.BookmarkGetNext(a),++e){var k=Module.stackSave();try{var f=[];if(Module.BookmarkHasChildren(a)){var m=Module.BookmarkGetFirstChild(a);Module.FillBookmarkTree(m,f)}var l=Module.BookmarkGetTitle(a);f={children:f,name:l};var t=Module.BookmarkGetAction(a);if(Module.ActionIsValid(t)){var n=Module.ActionGetType(t);if(0===n){var y=Module.ActionGetDest(t);if(Module.DestinationIsValid(y)){var C=
Module.DestinationGetPage(y);if(Module.PageIsValid(C)){var u=Module.PageGetIndex(C);if(0<u){f.pageNumber=u;var d=Module.GetDestinationVPosHPos(y);f.verticalOffset=d.vpos;f.horizontalOffset=d.hpos}}}}else if(5===n){var g=Module.ObjFindObj(t,"URI");g&&(f.url=Module.ObjGetAsPDFText(g))}}b[b.length]=f}catch(q){}Module.stackRestore(k)}Module.stackRestore(c)};a.LoadBookmarks=function(a){a=Module.GetDoc(a);var c=[],b=Module.stackSave();try{var e=Module.PDFDocGetFirstBookmark(a);Module.BookmarkIsValid(e)&&
Module.FillBookmarkTree(e,c)}catch(p){}Module.stackRestore(b);return{bookmarks:c}};a.UpdatePassword=function(a,b){try{var c=Module.stackSave(),e=Module.GetDoc(a);return Module.PDFDocInitStdSecurityHandler(e,b)?(e in downloadDataMap&&REX(Module._TRN_PDFDocDownloaderInitialize(e,downloadDataMap[e].downloader)),{success:!0,pageDimensions:Module.GetPageDimensions(e)}):{success:!1}}finally{Module.stackRestore(c)}};a.GetTextData=function(a,b){return new Promise(function(c,e){var f=b+1,k=Module.GetDoc(a),
h=[];try{var m=Module.stackSave();h[h.length]=function(){Module.stackRestore(m)};var l=Module.GetPage(k,f),n=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_TextExtractorCreate(n));var r=Module.getValue(n,"i8*");h[h.length]=function(){Module._TRN_TextExtractorDestroy(r)};REX(Module._TRN_TextExtractorBegin(r,l,0,1));var C=Module.allocate(48,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetDefaultMatrix(l,!0,1,0,C));var u=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_TextExtractorGetQuads(r,
C,0,u));var d=Module.getValue(u,"i8*"),g=Module._malloc(8*d);h[h.length]=function(){Module._free(g)};REX(Module._TRN_TextExtractorGetQuads(r,C,g,u));var q=Module.GetJSDoubleArrFromCore(g,d),A=Module.allocate(4,"i8",Module.ALLOC_STACK),w=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_UStringCreate(w));h[h.length]=function(){Module._TRN_UStringDestroy(D)};var D=Module.getValue(w,"i8*");REX(Module._TRN_TextExtractorGetAsTextWithOffsets(r,D,0,A));var M=Module.GetJSStringFromUString(D),O=Module.getValue(A,
"i8*"),P=Module._malloc(4*O);h[h.length]=function(){Module._free(P)};REX(Module._TRN_TextExtractorGetAsTextWithOffsets(r,D,P,A));var J=Module.GetJSIntArrayFromCore(P,O),K=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_TextExtractorCmptSemanticInfo(r,C,0,K));var H=Module.getValue(K,"i8*"),E=Module._malloc(8*H);h[h.length]=function(){Module._free(E)};REX(Module._TRN_TextExtractorCmptSemanticInfo(r,C,E,K));var N=Module.GetJSDoubleArrFromCore(E,H);h.forEach(function(a){a()});c({str:M,quads:q,
offsets:J,struct:N})}catch(G){h.forEach(function(a){a()}),e(G)}})};a.InsertBlankPages=function(a,b,e,f){return new Promise(function(c,k){var h=[],m=Module.GetDoc(a);try{var p=Module.stackSave();h[h.length]=function(){Module.stackRestore(p)};for(var l=b.length-1;0<=l;--l){var n=Module.PDFDocGetPageIterator(m,b[l]),v=Module.PDFDocPageCreate(m,e,f);Module.PDFDocPageInsert(m,n,v)}var r=Module.postPagesUpdatedEvent(m,a);h.forEach(function(a){a()});c(r)}catch(d){h.forEach(function(a){a()}),k(d)}})};a.InsertPages=
function(a,b,e,f,m){return new Promise(function(c,h){var k=[],l=Module.GetDoc(a);try{var p=Module.stackSave();k[k.length]=function(){Module.stackRestore(p)};if(b instanceof ArrayBuffer){var n=Module.CreateDoc(b);var v=Module.GetDoc(n);k[k.length]=function(){Module.DeleteDoc(n)}}else v=Module.GetDoc(b);for(var r=e.length,d=Module.PageSetCreate(),g=0;g<r;++g)Module.PageSetAddPage(d,e[g]);Module.PDFDocInsertPages(l,f,v,d,m);var q=Module.postPagesUpdatedEvent(l,a);k.forEach(function(a){a()});c(q)}catch(A){k.forEach(function(a){a()}),
h(A)}})};a.MovePages=function(a,b,e){return new Promise(function(c,f){var k=[],h=Module.GetDoc(a);try{var m=Module.stackSave();k[k.length]=function(){Module.stackRestore(m)};for(var l=b.length,p=Module.PageSetCreate(),n=0;n<l;++n)Module.PageSetAddPage(p,b[n]);Module.PDFDocMovePages(h,e,p);var r=Module.postPagesUpdatedEvent(h,a);k.forEach(function(a){a()});c(r)}catch(L){k.forEach(function(a){a()}),f(L)}})};a.RemovePages=function(a,b){return new Promise(function(c,e){var f=Module.GetDoc(a),k=[];try{var h=
Module.stackSave();k[k.length]=function(){Module.stackRestore(h)};for(var m=b.length-1;0<=m;--m){var l=Module.PDFDocGetPageIterator(f,b[m]);Module.IteratorHasNext(l)&&Module.PDFDocPageRemove(f,l)}var n=Module.postPagesUpdatedEvent(f,a);k.forEach(function(a){a()});c(n)}catch(y){k.forEach(function(a){a()}),e(y)}})};a.RotatePages=function(a,b,e){return new Promise(function(c,f){var k=Module.GetDoc(a),h=[];try{var m=Module.stackSave();h[h.length]=function(){Module.stackRestore(m)};var l=b.length,p=0,
n=Module.PDFDocGetPageIterator(k,b[0]),r=[];h.push(function(){Module._TRN_IteratorDestroy(n)});for(var u=b[0];Module.IteratorHasNext(n)&&p<b[l-1];++u){if(u===b[p]){var d=Module.IteratorCurrent(n),g=(Module.PageGetRotation(d)+e)%4;Module.PageSetRotation(d,g);r.push(u);p++}Module.IteratorNext(n)}var q=Module.postPagesUpdatedEvent(k,a,r);h.forEach(function(a){a()});c(q)}catch(A){h.forEach(function(a){a()}),f(A)}})};a.ExtractPages=function(a,b,e,f,m){return new Promise(function(c,h){var k=[];try{var l=
Module.GetDoc(a),p=Module.stackSave();k[k.length]=function(){Module.stackRestore(p)};var n=function(a){k.forEach(function(a){a()});h(a)};Module.XFDFMerge(l,e,m);var v=Module.CreateEmptyDoc();k[k.length]=function(){Module.DeleteDoc(v)};var r=Module.InsertPages(v,a,b,1,!0).then(function(){return Module.SaveDoc(v,void 0,!0,!1,void 0,f)}).then(function(a){k.forEach(function(a){a()});return a})["catch"](n);c(r)}catch(d){n(d)}})};a.CropPages=function(a,b,e,f,m,l){return new Promise(function(c,k){var h=
Module.GetDoc(a),p=[];try{var n=Module.stackSave();p[p.length]=function(){Module.stackRestore(n)};var x=b.length,v=0,d=Module.PDFDocGetPageIterator(h,b[0]);p.push(function(){Module._TRN_IteratorDestroy(d)});for(var g=[],q=b[0];Module.IteratorHasNext(d)&&v<b[x-1];++q){if(q===b[v]){var A=Module.IteratorCurrent(d),w=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetCropBox(A,w));var D=Module.PageGetRotation(A),r=Module.getValue(w,"double"),u=Module.getValue(w+8,"double"),z=Module.getValue(w+
16,"double"),J=Module.getValue(w+24,"double");0===D%4?(Module.setValue(w,r+m,"double"),Module.setValue(w+8,u+f,"double"),Module.setValue(w+16,z-l,"double"),Module.setValue(w+24,J-e,"double")):1===D%4?(Module.setValue(w,r+e,"double"),Module.setValue(w+8,u+m,"double"),Module.setValue(w+16,z-f,"double"),Module.setValue(w+24,J-l,"double")):2===D%4?(Module.setValue(w,r+l,"double"),Module.setValue(w+8,u+e,"double"),Module.setValue(w+16,z-m,"double"),Module.setValue(w+24,J-f,"double")):3===D%4&&(Module.setValue(w,
r+f,"double"),Module.setValue(w+8,u+l,"double"),Module.setValue(w+16,z-e,"double"),Module.setValue(w+24,J-m,"double"));Module.setValue(w+32,0,"double");REX(Module._TRN_PageSetBox(A,0,w));REX(Module._TRN_PageSetBox(A,1,w));g.push(q);v++}Module.IteratorNext(d)}var K=Module.postPagesUpdatedEvent(h,a,g);p.forEach(function(a){a()});c(K)}catch(H){p.forEach(function(a){a()}),k(H)}})}})("undefined"===typeof self?this.Module:self.Module);this.loaded=!0;Module.initCb&&Module.initCb()}}})(self)}).call(this,
l(7).clearImmediate,l(7).setImmediate)},function(e,n,l){(function(e){function f(a){"@babel/helpers - typeof";f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};return f(a)}var b=l(0),n="undefined"!==typeof window?window:self;n.global=n;(function(a){a.currentFileString="/current";var c=0,k=0,h={},l=null;Module.chunkMax=200;var m=function(a,g,b,
c,e){var d=new XMLHttpRequest;return CancellablePromise(function(q,w){d.open("GET",a,!0);d.responseType="arraybuffer";d.onerror=function(){w("Network error occurred")};d.onload=function(){if(206===this.status&&d.response.byteLength===b){var a=new Int8Array(d.response);q(a)}else w("Download Failed")};var f=["bytes=",g,"-",g+b-1].join("");d.setRequestHeader("Range",f);e&&(d.withCredentials=e);c&&Object.keys(c).forEach(function(a){d.setRequestHeader(a,c[a])});d.send()},function(){d.abort()})},v=function(a){this.file=
a;this.filePosition=0;this.fileLength=a.size;this.chunkData=null;this.chunkPosition=0;this.chunkSize=2097152;this.reader=new FileReaderSync};v.prototype={read:function(a,g,b){b=this.filePosition+b<=this.fileLength?b:this.fileLength-this.filePosition;a=a.subarray(g,g+b);g=b;if(0<b&&this.chunkData&&this.chunkPosition<this.chunkData.length){var d=this.chunkPosition+b;d<=this.chunkData.length?(a.set(this.chunkData.subarray(this.chunkPosition,d)),this.chunkPosition=d,this.filePosition+=b,b=0):(a.set(this.chunkData.subarray(this.chunkPosition)),
this.filePosition+=this.chunkData.length-this.chunkPosition,b=d-this.chunkData.length)}0<b&&(this.fileLength<=this.chunkSize?(this.chunkData=new Int8Array(this.reader.readAsArrayBuffer(this.file)),this.chunkPosition=this.filePosition,a.set(this.chunkData.subarray(this.chunkPosition,this.chunkPosition+b)),this.chunkPosition+=b):b<this.chunkSize?(this.chunkPosition=0,d=this.filePosition,d+this.chunkSize>this.fileLength&&(d=this.fileLength-this.chunkSize,this.chunkPosition=this.filePosition-d),this.chunkData=
new Int8Array(this.reader.readAsArrayBuffer(this.file.slice(d,d+this.chunkSize))),a.set(this.chunkData.subarray(this.chunkPosition,this.chunkPosition+b),g-b),this.chunkPosition+=b):(d=new Int8Array(this.reader.readAsArrayBuffer(this.file.slice(this.filePosition,this.filePosition+b))),a.set(d),this.chunkPosition=0,this.chunkData=null),this.filePosition+=b);return g},seek:function(a){this.chunkData&&(this.chunkPosition+=a-this.filePosition,this.fileLength>this.chunkSize&&(this.chunkPosition>this.chunkData.length||
0>this.chunkPosition)&&(this.chunkPosition=0,this.chunkData=null));this.filePosition=a},close:function(){this.reader=this.file=null},getPos:function(){return this.filePosition},getTotalSize:function(){return this.fileLength}};var u=function(a){this.data=a;this.position=0;this.length=this.data.length};u.prototype={read:function(a,g,b){b=this.position+b<=this.length?b:this.length-this.position;a=a.subarray(g,g+b);g=this.data.subarray(this.position,this.position+b);a.set(g);this.position+=b;return b},
write:function(a,g,b){b=this.position+b<=this.length?b:this.length-this.position;a=a.subarray(g,g+b);this.data.subarray(this.position,this.position+b).set(a);this.position+=b;return b},seek:function(a){this.position=a},close:function(){this.data=null},getPos:function(){return this.position},getTotalSize:function(){return this.length}};var x=function(a,g,b,c,e){"object"===f(a)?(this.lruList=a.lruList,this.chunkMap=a.chunkMap,this.length=a.length,this.url=a.url,this.customHeaders=a.customHeaders,this.withCredentials=
a.withCredentials):(this.lruList=[],this.chunkMap={},this.chunkMap[g]=e,this.length=g,this.url=a,this.customHeaders=b,this.withCredentials=c)};x.prototype={lruUpdate:function(a){var d=this.lruList.lastIndexOf(a);0<=d&&this.lruList.splice(d,1);this.lruList.push(a)},getChunk:function(a){var d=this;if(this.chunkMap[a])this.lruUpdate(a);else{var b=Math.min(a+1048576,this.length)-1,c=new XMLHttpRequest;c.open("GET",this.url,!1);c.responseType="arraybuffer";c.setRequestHeader("Range",["bytes=",a,"-",b].join(""));
this.withCredentials&&(c.withCredentials=this.withCredentials);this.customHeaders&&Object.keys(this.customHeaders).forEach(function(a){c.setRequestHeader(a,d.customHeaders[a])});c.send();if(200===c.status||206===c.status)this.writeChunk(new Int8Array(c.response),a);else throw Error("Failed to load data from");}return this.chunkMap[a]},hadChunk:function(a){return a in this.chunkMap},hasChunk:function(a){return this.chunkMap[a]},getCacheData:function(){return this.chunkMap[this.length]},getRequiredChunkOffsetArrays:function(a,
g){var d={have:[],downloading:[],missing:[]};try{var b=Module.stackSave();var c=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DownloaderGetRequiredChunksSize(a,g,c));var e=Module.getValue(c,"i8*");if(e){var f=Module._malloc(4*e);REX(Module._TRN_DownloaderGetRequiredChunks(a,g,f,e));for(a=0;a<e;++a){var k=Module.getValue(f+4*a,"i8*");this.hasChunk(k)?d.have.push(k):this.hadChunk(k)?d.missing.push(k):d.downloading.push(k)}}}finally{f&&Module._free(f),Module.stackRestore(b)}return d},keepVisibleChunks:function(a,
g){for(var d=g.length,b=Module.chunkMax/2,c=0,e=0;e<d;++e){var f=this.getRequiredChunkOffsetArrays(a,g[e]),k=f.have,h=k.length;c+=h;if(c>b){this.keepChunks(k.slice(0,h-c+b));break}this.keepChunks(f.have)}},getChunkAsync:function(a){var d=this,b=a+1048576,c=1048576;b>this.length&&(c-=b-this.length);return m(this.url,a,c,this.customHeaders,this.withCredentials).then(function(g){d.writeChunk(g,a)})},getChunks:function(a){for(var d=a.length,b=Array(d),c=0;c<d;++c)b[c]=this.getChunkAsync(a[c]);return CancellablePromise.all(b)},
keepChunks:function(a){for(var d=a.length,b=0;b<d;++b)this.lruUpdate(a[b])},writeChunk:function(a,g,b){b=b||0;var d=this.chunkMap[g],c=a.length,e=this.lruList.length>=Module.chunkMax&&!d;1048576!==c||a.buffer.byteLength!==c?(e?(d=this.lruList.shift(),e=this.chunkMap[d],1048576>e.length&&(e=new Int8Array(1048576)),this.chunkMap[d]=null):e=d?this.chunkMap[g]:new Int8Array(1048576),e.subarray(b,b+c).set(a),a=e):e&&(d=this.lruList.shift(),this.chunkMap[d]=null);this.lruUpdate(g);this.chunkMap[g]=a}};
var t=function(a){this.chunkStorage=a;this.position=0;this.length=this.chunkStorage.length};t.prototype={read:function(a,g,b){var d=this.position+b<=this.length,c=d?b:this.length-this.position;if(this.position<this.length){var e;for(e=0;e<c;){var q=this.position%1048576;var f=this.position-q;var k=c-e;if(this.chunkStorage.hadChunk(f)){f=this.chunkStorage.getChunk(f);var h=a.subarray(g+e,g+e+k);q=f.subarray(q,q+k);h.set(q);q=q.length;e+=q;this.position+=q}else for(this.position+=k;e<c;++e)h[e]=0}}if(!d){h=
g+c;if(b-=c)g=this.chunkStorage.getCacheData(),b>g.length&&(b=g.length),d=this.position-this.length,h=a.subarray(h,h+b),q=g.subarray(d,d+b),h.set(q);this.position+=b;return c+b}return c},write:function(a,g,b){var d=this.position+b<=this.length,c=this.position+b<=this.length?b:this.length-this.position,e=a.subarray(g,g+c),q=this.position%1048576;this.chunkStorage.writeChunk(e,this.position-q,q);this.position+=c;if(!d){e=g+c;if(b-=c)g=this.chunkStorage.getCacheData(),b>g.length&&(b=g.length),d=this.position-
this.length,e=a.subarray(e,e+b),g.subarray(d,d+b).set(e);this.position+=b;return c+b}return c},seek:function(a){this.position=a},close:function(){this.chunkStorage=null},getPos:function(){return this.position},getTotalSize:function(){return this.length}};var B=function(a){this.docId=a;this.length=0;this.data=new Int8Array(8192);this.position=0};B.prototype={seek:function(a){this.position=a},close:function(){var a=new Int8Array(this.data.buffer.slice(0,this.length));Module.ChangeDocBackend(this.docId,
{ptr:Module.GetDoc(this.docId),buffer:a});this.data=null},getPos:function(){return this.position},getTotalSize:function(){return this.length},read:function(a,g,b){var d=this.data.length;b=b+g<d?b:d-g;a=a.subarray(g,g+b);g=this.data.subarray(this.position,this.position+b);a.set(g);this.position+=b;return b},write:function(a,g,b){for(var d=this.position+b,c=this.data.length;d>c;){c=Math.max(c*(16777216<c?1.5:2),d);var e=new Int8Array(c);e.set(this.data.subarray(0,this.length),0);this.data=e}a=a.subarray(g,
g+b);this.data.set(a,this.position);this.position+=b;this.position>this.length&&(this.length=this.position);return b}};var y={IsSink:function(a){return 66===(a.flags&255)},open:function(a){var d=a.path.slice(1);this.IsSink(a)?(a.provider=new B(d),Module.docs[d].sink=a.provider):a.provider=Module.docs[d].sink?new u(Module.docs[d].sink.data):Module.docs[d].chunkStorage?new t(Module.docs[d].chunkStorage):Module.docs[d].buffer?new u(Module.docs[d].buffer):new v(Module.docs[d].file)},close:function(a){a.provider.close()},
read:function(a,g,b,c,e){return a.provider.read(g,b,c)},llseek:function(a,g,b){a=a.provider;1===b?g+=a.getPos():2===b&&(g=a.getTotalSize()+g);if(0>g)throw new FS.ErrnoError(n.ERRNO_CODES.EINVAL);a.seek(g);return g},write:function(a,g,b,c,e){return c?a.provider.write(g,b,c):0}};n.THROW=function(a){throw{type:"InvalidPDF",message:a};};var C=function(d){return"Exception: \n\t Message: ".concat(a.GetJSStringFromCString(Module._TRN_GetMessage(d)),"\n\t Filename: ").concat(a.GetJSStringFromCString(Module._TRN_GetFileName(d)),
"\n\t Function: ").concat(a.GetJSStringFromCString(Module._TRN_GetFunction(d)),"\n\t Linenumber: ").concat(a.GetJSStringFromCString(Module._TRN_GetLineNum(d)))};a.GetErrToString=C;n.REX=function(a){a&&THROW(C(a))};a.Initialize=function(a){var d=Module.stackSave();a=a?Module.allocate(Module.intArrayFromString(a),"i8",Module.ALLOC_STACK):0;REX(Module._TRN_PDFNetInitialize(a));Module.stackRestore(d)};a.GetDoc=function(a){if(a in Module.docs)return Module.docs[a].ptr;throw{type:"InvalidDocReference",
message:"Unable to access Document id=".concat(a,". The document appears to be invalid or was deleted.")};};a.clearDocBackend=function(){null!==Module.cachePtr?(Module.hasBufOwnership&&Module._free(Module.cachePtr),Module.cachePtr=null):Module.docs[a.currentFileString]&&delete Module.docs[a.currentFileString]};a.MakeDev=function(a){if(!h[a]){var d=FS.makedev(3,5);FS.registerDevice(d,y);FS.mkdev(a,511,d);h[a]=!0}};a.CreateDocFileBackend=function(a,g){Module.MakeDev(g);var d=Module.allocate(4,"i8",
Module.ALLOC_STACK);Module.docs[g]={file:a};a=Module.allocate(Module.intArrayFromString(g),"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreateFromFilePath(a,d));d=Module.getValue(d,"i8*");Module.docs[g].ptr=d};a.InsertImageIntoDoc=function(a,g,b){var d=[];try{var c=Module.ElementBuilderCreate();d.push(function(){Module.ElementBuilderDestroy(c)});var e=Module.ElementWriterCreate();d.push(function(){Module.ElementWriterDestroy(e)});if(b){var q=b.width;var f=b.height}else q=Module.ImageGetImageWidth(g),
f=Module.ImageGetImageHeight(g),b=q/f,b>612/792?(q=612,f=parseInt(q/b,10)):(f=792,q=parseInt(f*b,10));var k=Module.ElementBuilderCreateImage(c,g,0,0,q,f),h=Module.PDFDocPageCreate(a,q,f);Module.ElementWriterBegin(e,h);Module.ElementWriterWritePlacedElement(e,k);Module.ElementWriterEnd(e);Module.PDFDocPagePushBack(a,h)}finally{d.forEach(function(a){a()})}};var L=function(a,b,c){"object"===f(a)?(this.m_pages=a.m_pages,this.m_has_named_dests=a.m_has_named_dests,this.m_finished_download=a.m_finished_download,
this.m_has_outline=a.m_has_outline,this.m_current_page=a.m_current_page,this.m_id=a.m_id,this.size=a.size,this.timeout=a.timeout,this.eventPageArray=a.eventPageArray,this.requirePageCallbacks=a.requirePageCallbacks):(this.m_pages=[],this.m_has_outline=this.m_finished_download=this.m_has_named_dests=!1,this.m_current_page=1,this.m_id=c,this.size=a,this.timeout=null,this.eventPageArray=[],this.requirePageCallbacks={});this.downloadUserData=Module.createDownloadUserData(b,c)};L.prototype={getJSUrl:function(){return Module.extractDownloadUserData(this.downloadUserData).url},
getDocId:function(){return Module.extractDownloadUserData(this.downloadUserData).docId},destroyUserData:function(){this.m_id in Module.withCredentials&&delete Module.withCredentials[this.m_id];this.m_id in Module.customHeadersMap&&delete Module.customHeadersMap[this.m_id];Module.destroyDownloadUserData(this.downloadUserData)}};a.createDownloadUserData=function(a,b){a=Module.allocate(Module.intArrayFromString(a),"i8",Module.ALLOC_NORMAL);var d=Module.allocate(8,"i8",Module.ALLOC_NORMAL);Module.setValue(d,
a,"i8*");Module.setValue(d+4,parseInt(b,10),"i32");return this.downloadUserData=d};a.extractDownloadUserData=function(d){var b=Module.getValue(d,"i8*");b=a.GetJSStringFromCString(b);d=Module.getValue(d+4,"i32").toString();return{url:b,docId:d}};a.destroyDownloadUserData=function(a){Module._free(Module.getValue(a,"i8*"));Module._free(a)};n.downloadDataMap={};Module.customHeadersMap={};Module.withCredentials={};a.GetDownloadData=function(a){if(a in downloadDataMap)return downloadDataMap[a]};a.DownloaderHint=
function(a,b){var d=this,g=Module.GetDoc(a),c=downloadDataMap[g];b.currentPage&&(c.m_current_page=b.currentPage);if(b.visiblePages){var e=b.visiblePages;for(b=0;b<e.length;++b)++e[b];Object.keys(this.requirePageCallbacks).forEach(function(a){d.requirePageCallbacks.hasOwnProperty(a)&&e.push(parseInt(a,10))});(b=Module.docs[a].chunkStorage)&&b.keepVisibleChunks(c.downloader,e);c=e.length;a=Module.allocate(4*c,"i8",Module.ALLOC_STACK);for(b=0;b<c;++b)Module.setValue(a+4*b,e[b],"i32");REX(Module._TRN_PDFDocDownloadPages(g,
a,c,1,0))}};a.RequirePage=function(a,b){return new Promise(function(d,g){g=Module.GetDoc(a);var c=downloadDataMap[g];!c||c.m_finished_download||c.m_pages[b]?d():(b in c.requirePageCallbacks?c.requirePageCallbacks[b].push(d):c.requirePageCallbacks[b]=[d],d=Module.allocate(4,"i8",Module.ALLOC_STACK),Module.setValue(d,b,"i32"),Module._TRN_PDFDocDownloadPages(g,d,1,0,0))})};a.IsLinearizationValid=function(a){a=Module.GetDoc(a);if(a=downloadDataMap[a]){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);
REX(Module._TRN_DownloaderIsLinearizationValid(a.downloader,d));return 0!==Module.getValue(d,"i8")}return!1};a.ShouldRunRender=function(a,b){a=Module.GetDoc(a);return(a=downloadDataMap[a])?a.m_finished_download?!0:a.m_pages[b]:!0};a.createCallbacksStruct=function(a){if(!l){var d=function(a){return function(d){var b=arguments;d in downloadDataMap?a.apply(this,b):e(function(){d in downloadDataMap&&a.apply(this,b)},0)}};l={downloadProc:Module.addFunction(function(a,d,b,c,g){c=Module.extractDownloadUserData(c);
var e=c.docId;m(c.url,d,b,Module.customHeadersMap[e],Module.withCredentials[e]).then(function(c){e in Module.docs&&Module.docs[e].chunkStorage&&Module.docs[e].chunkStorage.writeChunk(c,d);Module._TRN_DownloadComplete(0,d,b,a)})}),notifyUpdatePage:Module.addFunction(d(function(a,d,b,c){var g=downloadDataMap[a];g.m_pages[d]=!0;var e=g.eventPageArray;if(d in g.requirePageCallbacks)for(b=g.requirePageCallbacks[d],c=0;c<b.length;++c)b[c]();g.timeout?e.push(d):(e=g.eventPageArray=[d],g.timeout=setTimeout(function(){Module.postPagesUpdatedEvent(a,
g.m_id,e);g.timeout=null},100))})),notifyUpdateOutline:Module.addFunction(d(function(a,d){a=downloadDataMap[a];a.m_has_outline||(a.m_has_outline=!0,Module.postEvent(a.m_id,"bookmarksUpdated",{}))})),notifyUpdateNamedDests:Module.addFunction(d(function(a,d){a=downloadDataMap[a];a.m_has_named_dests||(a.m_has_named_dests=!0)})),notifyUpdateThumb:Module.addFunction(d(function(a,d){})),notifyFinishedDownload:Module.addFunction(d(function(a,d){a=downloadDataMap[a];a.m_finished_download||(a.m_finished_download=
!0,Module.postEvent(a.m_id,"documentComplete",{}))})),notifyDocumentError:Module.addFunction(function(a,d){}),getCurrentPage:Module.addFunction(function(a,d){return downloadDataMap[a].m_current_page})}}d=Module.allocate(40,"i8",Module.ALLOC_STACK);Module.setValue(d,l.downloadProc,"i8*");Module.setValue(d+4,a,"i8*");Module.setValue(d+8,l.notifyUpdatePage,"i8*");Module.setValue(d+12,l.notifyUpdateOutline,"i8*");Module.setValue(d+16,l.notifyUpdateNamedDests,"i8*");Module.setValue(d+20,l.notifyUpdateThumb,
"i8*");Module.setValue(d+24,l.notifyFinishedDownload,"i8*");Module.setValue(d+28,l.notifyDocumentError,"i8*");Module.setValue(d+32,l.getCurrentPage,"i8*");Module.setValue(d+36,0,"i8*");return d};a.CreateDocDownloaderBackend=function(a,b,c){var d=a.url,g=a.size,e=a.customHeaders,f=a.withCredentials;e&&(Module.customHeadersMap[c]=e);f&&(Module.withCredentials[c]=f);var q=a.downloadData?new L(a.downloadData,d,c,e,f):new L(a.size,d,c,e,f);var k=Module.createCallbacksStruct(q.downloadUserData),h=Module.allocate(4,
"i8",Module.ALLOC_STACK);Module.MakeDev(c);a.chunkStorage?d=new x(a.chunkStorage):(a=new Int8Array(new ArrayBuffer(Math.ceil((a.size+1048576-1)/1048576/8))),d=new x(d,g,e,f,a));Module.docs[c]={chunkStorage:d};REX(Module._TRN_DownloaderCreate(k,g,Module.GetUStringFromJSString(c),h));q.downloader=Module.getValue(h,"i8*");if(g=Module._TRN_PDFDocCreateFromFilter(q.downloader,b))Module._TRN_FilterDestroy(q.downloader),REX(g);b=Module.getValue(b,"i8*");Module.docs[c].ptr=b;Module.PDFDocInitSecurityHandler(b)&&
REX(Module._TRN_PDFDocDownloaderInitialize(b,q.downloader));downloadDataMap[b]=q};a.CreateDocBackend=function(d,b){var g=d.value,e=d.extension,k=d.type,h=Module.allocate(4,"i8",Module.ALLOC_STACK),l=Module.stackSave();try{if(g)if("ptr"===k)Module.docs[b]={ptr:g};else{var m="object"===f(g)&&g.url;k=e&&"pdf"!==e;if(m)a.CreateDocDownloaderBackend(g,h,b);else{var n=g instanceof ArrayBuffer;m=n?"buffer":"file";if(n&&(g=new Uint8Array(g),10485760>g.length+c&&!k)){c+=g.length;var p=g.length,t=Module._malloc(g.length);
Module.HEAPU8.set(g,t);REX(Module._TRN_PDFDocCreateFromBuffer(t,p,h));var x=Module.getValue(h,"i8*");Module.docs[b]={ptr:x,bufPtr:t,bufPtrSize:p,ownership:!0};Module.docs[b].extension=e;return}Module.MakeDev(b);n={};n[m]=g;Module.docs[b]=n;if(k){if(d.pageSizes&&d.pageSizes.length)var v=d.pageSizes[0];else d.defaultPageSize&&(v=d.defaultPageSize);var r=Module.GetUStringFromJSString(b);REX(Module._TRN_PDFDocCreate(h));x=Module.getValue(h,"i8*");var u=Module.ImageCreateFromFile(x,r);Module.InsertImageIntoDoc(x,
u,v)}else{var B=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreateFromFilePath(B,h));x=Module.getValue(h,"i8*")}Module.docs[b].extension=e;Module.docs[b].ptr=x}}else REX(Module._TRN_PDFDocCreate(h)),x=Module.getValue(h,"i8*"),Module.docs[b]={ptr:x},Module.docs[b].extension=e}finally{Module.stackRestore(l)}};a.ChangeDocBackend=function(a,g){var d=Module.docs[a];d?(d.bufPtr&&d.ownership&&(Module._free(d.bufPtr),c-=d.bufPtrSize),delete Module.docs[a]):
Object(b.d)("Trying to delete document ".concat(a," that does not exist."));Module.docs[a]=g};a.DeleteDoc=function(a){var d=Module.docs[a];d?(d.ptr&&(d.ptr in downloadDataMap&&(clearTimeout(downloadDataMap[d.ptr].timeout),downloadDataMap[d.ptr].destroyUserData(),delete downloadDataMap[d.ptr]),Module.PDFDocDestroy(d.ptr)),d.bufPtr&&d.ownership&&(Module._free(d.bufPtr),c-=d.bufPtrSize),delete Module.docs[a]):Object(b.d)("Trying to delete document ".concat(a," that does not exist."))};a.CreateDoc=function(d,
b){if("id"===d.type)return Module.docPtrStringToIdMap[d.value];if(!b){do b=(++k).toString();while(b in Module.docs)}Module.hasBufOwnership=!0;a.CreateDocBackend(d,b);return b};a.CreateEmptyDoc=function(){var a=(++k).toString(),b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocCreate(b));b=Module.getValue(b,"i8*");Module.docs[a]={ptr:b};return a};a.PDFDocCreateFromLayoutEls=function(a){var d=new Uint8Array(a);a=Module._malloc(d.length);var b=Module.stackSave(),c=Module.allocate(4,
"i8",Module.ALLOC_STACK);Module.HEAPU8.set(d,a);d=Module._TRN_PDFDocCreateFromLayoutEls(a,d.length,c);c=Module.getValue(c,"i8*");Module._free(a);Module.stackRestore(b);REX(d);return c};a.GetPageCount=function(a){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetPageCount(a,d));return Module.getValue(d,"i8*")};a.GetPage=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetPage(a,b,d));a=Module.getValue(d,"i8*");Module.PageIsValid(a)||THROW("Trying to access page that doesn't exist at index ".concat(b));
return a};a.PageGetPageWidth=function(a){var d=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageWidth(a,1,d));return Module.getValue(d,"double")};a.PageGetPageHeight=function(a){var d=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageHeight(a,1,d));return Module.getValue(d,"double")};a.PageGetDefaultMatrix=function(a,b){var d=Module.allocate(48,"i8",Module.ALLOC_STACK);b||(b=0);REX(Module._TRN_PageGetDefaultMatrix(a,!0,1,b,d));return d};a.GetMatrixAsArray=
function(a){for(var d=[],b=0;6>b;++b)d[b]=Module.getValue(a+8*b,"double");return d};a.PageGetPageInfo=function(a){var d=Module.allocate(48,"i8",Module.ALLOC_STACK),b=Module.allocate(8,"i8",Module.ALLOC_STACK),c=Module.allocate(8,"i8",Module.ALLOC_STACK),e=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetPageInfo(a,!0,1,0,b,c,d,e));return{rotation:Module.getValue(e,"i8*"),width:Module.getValue(b,"double"),height:Module.getValue(c,"double"),matrix:Module.GetMatrixAsArray(d)}};a.GetUStringFromJSString=
function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK),c=2*(a.length+1),e=Module.allocate(c,"i8",b?Module.ALLOC_NORMAL:Module.ALLOC_STACK);Module.stringToUTF16(a,e,c);a=Module._TRN_UStringCreateFromString(e,d);b&&Module._free(e);REX(a);return Module.getValue(d,"i8*")};a.GetJSStringFromUString=function(a){var d=Module.allocate(4,"i16*",Module.ALLOC_STACK);REX(Module._TRN_UStringCStr(a,d));return Module.UTF16ToString(Module.getValue(d,"i16*"))};a.GetJSStringFromCString=function(a){return Module.UTF8ToString(a)};
a.PDFNetSetResourceData=function(a){Module.res_ptr=Module._malloc(a.length);Module.HEAPU8.set(a,Module.res_ptr);REX(Module._TRN_PDFNetSetResourceData(Module.res_ptr,a.length));Module.res_ptr_size=a.length};a.PDFDocDestroy=function(a){REX(Module._TRN_PDFDocDestroy(a))};a.VectorGetSize=function(a){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_VectorGetSize(a,d));return Module.getValue(d,"i32")};a.VectorGetAt=function(a,b){var d=Module.allocate(1,"i8*",Module.ALLOC_STACK);REX(Module._TRN_VectorGetAt(a,
b,d));return Module.getValue(d,"i8*")};a.VectorDestroy=function(a){REX(Module._TRN_VectorDestroy(a))};a.PDFRasterizerCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerCreate(0,a));return Module.getValue(a,"i8*")};a.ExtractSeparationData=function(a){var d=Module.getValue(a,"i8*"),b=Module.getValue(a+4,"i32"),c=Module.getValue(a+8,"i8*"),e=Module.HEAPU8[a+12],f=Module.HEAPU8[a+13],h=Module.HEAPU8[a+14];a=Module.HEAPU8[a+15];var k=new Uint8Array(b);k.set(Module.HEAPU8.subarray(d,
d+b));d=Module.GetJSStringFromUString(c);return{color:[e,f,h,a],data:k.buffer,name:d}};a.PDFRasterizerRasterizeSeparations=function(a,b,c,e,f,h,k){var d=Module.allocate(8,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFRasterizerRasterizeSeparations(a,b,c,e,f,h,k,d));a=Module.getValue(d,"i8*");b=Module.VectorGetSize(a);c=Array(b);for(e=0;e<b;++e)f=Module.VectorGetAt(a,e),c[e]=Module.ExtractSeparationData(f);Module.VectorDestroy(a);return c};a.PageGetRotation=function(a){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);
REX(Module._TRN_PageGetRotation(a,d));return Module.getValue(d,"i8*")};a.PageGetId=function(a){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetSDFObj(a,d));d=Module.getValue(d,"i8*");a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetObjNum(d,a));a=Module.getValue(a,"i32");var b=Module.allocate(2,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetGenNum(d,b));b=Module.getValue(b,"i16");return"".concat(a,"-").concat(b)};a.PageSetRotation=function(a,b){REX(Module._TRN_PageSetRotation(a,
b))};a.GetDefaultMatrixBox=function(a,b,c){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetRotation(a,d));a=(Module.getValue(d,"i32")+c)%4;c=Module.allocate(48,"i8",Module.ALLOC_STACK);switch(a){case 0:return REX(Module._TRN_Matrix2DSet(c,1,0,0,-1,-b.x1,b.y2)),c;case 1:return REX(Module._TRN_Matrix2DSet(c,0,1,1,0,-b.y1,-b.x1)),c;case 2:return REX(Module._TRN_Matrix2DSet(c,-1,0,0,1,b.x2,-b.y1)),c;case 3:return REX(Module._TRN_Matrix2DSet(c,0,-1,-1,0,b.y2,b.x2)),c}throw Error("Yikes, we don't support that rotation type");
};a.Matrix2DMultBBox=function(a,b){var d=Module.allocate(8,"i8",Module.ALLOC_STACK),c=Module.allocate(8,"i8",Module.ALLOC_STACK);Module.setValue(d,b.x1,"double");Module.setValue(c,b.y1,"double");REX(Module._TRN_Matrix2DMult(a,d,c));b.x1=Module.getValue(d,"double");b.y1=Module.getValue(c,"double");Module.setValue(d,b.x2,"double");Module.setValue(c,b.y2,"double");REX(Module._TRN_Matrix2DMult(a,d,c));b.x2=Module.getValue(d,"double");b.y2=Module.getValue(c,"double");return b};a.Matrix2DMult=function(a,
b){var d=Module.allocate(8,"i8",Module.ALLOC_STACK),c=Module.allocate(8,"i8",Module.ALLOC_STACK);Module.setValue(d,b.x,"double");Module.setValue(c,b.y,"double");REX(Module._TRN_Matrix2DMult(a,d,c));b.x=Module.getValue(d,"double");b.y=Module.getValue(c,"double");return b};a.Matrix2DConcat=function(a,b){var d=Module.getValue(b,"double"),c=Module.getValue(b+8,"double"),e=Module.getValue(b+16,"double"),g=Module.getValue(b+24,"double"),f=Module.getValue(b+32,"double");b=Module.getValue(b+40,"double");
REX(Module._TRN_Matrix2DConcat(a,d,c,e,g,f,b))};a.Matrix2DSet=function(a,b,c,e,f,h,k){REX(Module._TRN_Matrix2DSet(a,b,c,e,f,h,k))};a.IteratorHasNext=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_IteratorHasNext(a,b));return 0!==Module.getValue(b,"i8")};a.IteratorCurrent=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_IteratorCurrent(a,b));return Module.getValue(Module.getValue(b,"i8*"),"i8*")};a.IteratorNext=function(a){REX(Module._TRN_IteratorNext(a))};
a.PageGetNumAnnots=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetNumAnnots(a,b));return Module.getValue(b,"i32")};a.PageGetAnnot=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetAnnot(a,b,d));return Module.getValue(d,"i8*")};a.PageAnnotRemove=function(a,b){REX(Module._TRN_PageAnnotRemoveByIndex(a,b))};a.AnnotGetType=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_AnnotGetType(a,b));return Module.getValue(b,
"i32")};a.AnnotHasAppearance=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_AnnotGetAppearance(a,0,0,b));return 0!==Module.getValue(b,"i8*")};a.AnnotRefreshAppearance=function(a){REX(Module._TRN_AnnotRefreshAppearance(a))};a.ObjErase=function(a,b){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjEraseFromKey(a,b))};a.GetJSDoubleArrFromCore=function(a,b){for(var d=Array(b),c=0;c<b;++c)d[c]=Module.getValue(a,"double"),a+=8;return d};
a.GetJSIntArrayFromCore=function(a,b){for(var d=Array(b),c=0;c<b;++c)d[c]=Module.getValue(a,"i32"),a+=4;return d};a.BookmarkIsValid=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkIsValid(a,b));return 0!==Module.getValue(b,"i8")};a.BookmarkGetNext=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetNext(a,b));return Module.getValue(b,"i8*")};a.BookmarkGetFirstChild=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);
REX(Module._TRN_BookmarkGetFirstChild(a,b));return Module.getValue(b,"i8*")};a.BookmarkHasChildren=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkHasChildren(a,b));return 0!==Module.getValue(b,"i8")};a.BookmarkGetAction=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetAction(a,b));return Module.getValue(b,"i8*")};a.BookmarkGetTitle=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_BookmarkGetTitle(a,
b));a=Module.getValue(b,"i8*");return Module.GetJSStringFromUString(a)};a.ActionIsValid=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ActionIsValid(a,b));return 0!==Module.getValue(b,"i8")};a.ActionGetType=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ActionGetType(a,b));return Module.getValue(b,"i32")};a.ActionGetDest=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ActionGetDest(a,b));return Module.getValue(b,
"i8*")};a.DestinationIsValid=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationIsValid(a,b));return 0!==Module.getValue(b,"i8")};a.DestinationGetPage=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationGetPage(a,b));return Module.getValue(b,"i8*")};a.PageIsValid=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageIsValid(a,b));return 0!==Module.getValue(b,"i8")};a.PageGetIndex=function(a){var b=
Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageGetIndex(a,b));return Module.getValue(b,"i32")};a.ObjGetAsPDFText=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetAsPDFText(a,b));a=Module.getValue(b,"i8*");return Module.GetJSStringFromUString(a)};a.ObjFindObj=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjFindObj(a,b,d));return Module.getValue(d,
"i8*")};a.PDFDocGetFirstBookmark=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetFirstBookmark(a,b));return Module.getValue(b,"i8*")};a.DestinationGetExplicitDestObj=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationGetExplicitDestObj(a,b));return Module.getValue(b,"i8*")};a.DestinationGetFitType=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_DestinationGetFitType(a,b));return Module.getValue(b,
"i32")};a.ObjIsNumber=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjIsNumber(a,b));return 0!==Module.getValue(b,"i8")};a.ObjGetNumber=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjGetNumber(a,b));return Module.getValue(b,"double")};a.PDFDocGetRoot=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetRoot(a,b));return Module.getValue(b,"i8*")};a.ObjPutName=function(a,b,c){b=Module.allocate(Module.intArrayFromString(b),
"i8",Module.ALLOC_STACK);c=Module.allocate(Module.intArrayFromString(c),"i8",Module.ALLOC_STACK);var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutName(a,b,c,d));return Module.getValue(d,"i8*")};a.ObjPutDict=function(a,b){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutDict(a,b,d));return Module.getValue(d,"i8*")};a.ObjPutString=function(a,b,c){b=Module.allocate(Module.intArrayFromString(b),
"i8",Module.ALLOC_STACK);c=Module.allocate(Module.intArrayFromString(c),"i8",Module.ALLOC_STACK);var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPutString(a,b,c,d));return Module.getValue(d,"i8*")};a.ObjPut=function(a,b,c){b=Module.allocate(Module.intArrayFromString(b),"i8",Module.ALLOC_STACK);var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ObjPut(a,b,c,d));return Module.getValue(d,"i8*")};a.ObjGetAt=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);
REX(Module._TRN_ObjGetAt(a,b,d));return Module.getValue(d,"i8*")};a.Matrix2DInverse=function(a){var b=Module.allocate(48,"i8",Module.ALLOC_STACK);REX(Module._TRN_Matrix2DInverse(a,b));return b};a.PDFDocInitSecurityHandler=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocInitSecurityHandler(a,0,b));return 0!==Module.getValue(b,"i8")};a.PDFDocInitStdSecurityHandler=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);b=Module.intArrayFromString(b);var c=Module.allocate(b,
"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocInitStdSecurityHandler(a,c,b.length-1,d));return 0!==Module.getValue(d,"i8")};a.PDFDocInsertPages=function(a,b,c,e,f){REX(Module._TRN_PDFDocInsertPageSet(a,b,c,e,f?1:0,0))};a.PDFDocMovePages=function(a,b,c){REX(Module._TRN_PDFDocMovePageSet(a,b,a,c,0,0))};a.PDFDocGetPageIterator=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetPageIterator(a,b,d));return Module.getValue(d,"i8*")};a.PDFDocPageRemove=function(a,b){REX(Module._TRN_PDFDocPageRemove(a,
b))};a.PDFDocPageCreate=function(a,b,c){var d=Module.allocate(40,"i8",Module.ALLOC_STACK);Module.setValue(d,0,"double");Module.setValue(d+8,0,"double");Module.setValue(d+16,b,"double");Module.setValue(d+24,c,"double");Module.setValue(d+32,0,"double");b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocPageCreate(a,d,b));return Module.getValue(b,"i8*")};a.PDFDocPageInsert=function(a,b,c){REX(Module._TRN_PDFDocPageInsert(a,b,c))};a.PageSetCreate=function(){var a=Module.allocate(4,"i8",
Module.ALLOC_STACK);REX(Module._TRN_PageSetCreate(a));return Module.getValue(a,"i8*")};a.PageSetCreateRange=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PageSetCreateRange(d,a,b));return Module.getValue(d,"i8*")};a.PageSetAddPage=function(a,b){REX(Module._TRN_PageSetAddPage(a,b))};a.ElementBuilderCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementBuilderCreate(a));return Module.getValue(a,"i8*")};a.ElementBuilderDestroy=function(a){REX(Module._TRN_ElementBuilderDestroy(a))};
a.ElementBuilderCreateImage=function(a,b,c,e,f,h){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementBuilderCreateImageScaled(a,b,c,e,f,h,d));return Module.getValue(d,"i8*")};a.ElementWriterCreate=function(){var a=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementWriterCreate(a));return Module.getValue(a,"i8*")};a.ElementWriterDestroy=function(a){REX(Module._TRN_ElementWriterDestroy(a))};a.ElementWriterBegin=function(a,b){REX(Module._TRN_ElementWriterBeginOnPage(a,
b,1))};a.ElementWriterWritePlacedElement=function(a,b){REX(Module._TRN_ElementWriterWritePlacedElement(a,b))};a.ElementWriterEnd=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ElementWriterEnd(a,b))};a.ImageGetImageWidth=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageGetImageWidth(a,b));return Module.getValue(b,"i32")};a.ImageGetImageHeight=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageGetImageHeight(a,
b));return Module.getValue(b,"i32")};a.ImageCreateFromMemory2=function(a,b,c){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageCreateFromMemory2(a,b,c,0,d));return Module.getValue(d,"i8*")};a.ImageCreateFromFile=function(a,b){var d=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_ImageCreateFromFile(a,b,0,d));return Module.getValue(d,"i8*")};a.PDFDocPagePushBack=function(a,b){REX(Module._TRN_PDFDocPagePushBack(a,b))};a.PDFDocHasOC=function(a){var b=Module.allocate(4,
"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocHasOC(a,b));return 0!==Module.getValue(b,"i8")};a.PDFDocGetOCGConfig=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_PDFDocGetOCGConfig(a,b));return Module.getValue(b,"i8*")};a.OCGContextCreate=function(a){var b=Module.allocate(4,"i8",Module.ALLOC_STACK);REX(Module._TRN_OCGContextCreateFromConfig(a,b));return Module.getValue(b,"i8*")};a.UStringDestroy=function(a){REX(Module._TRN_UStringDestroy(a))};a.PDFDocFDFUpdate=function(a,
b,c){if(c){for(var d=Object.keys(c),e=d.length,f=Module._malloc(8*e),g=0;g<e;++g){var h=8*g,k=d[g],l=Module.GetDoc(c[k]);k=Module.GetUStringFromJSString(k);Module.setValue(f+h,l,"i8*");Module.setValue(f+h+4,k,"i8*")}REX(Module._TRN_PDFDocFDFUpdateAppearanceDocs(a,b,f,e))}else REX(Module._TRN_PDFDocFDFUpdate(a,b))};a.FDFDocDestroy=function(a){REX(Module._TRN_FDFDocDestroy(a))}})(n.Module)}).call(this,l(7).setImmediate)},function(e,n,l){function f(e){"@babel/helpers - typeof";f="function"===typeof Symbol&&
"symbol"===typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};return f(e)}(function(e){e.SetupPDFNetFunctions=function(b){Module._IB_=[];for(var l=function B(a){if("object"===f(a)&&null!==a)if("undefined"!==typeof a.byteLength){var b=Module._IB_.length;Module._IB_[b]=new Uint8Array(a);a={handle:b,isArrayBufferRef:!0}}else Object.keys(a).forEach(function(b){a.hasOwnProperty(b)&&(a[b]=
B(a[b]))});return a},a=function y(a){"object"===f(a)&&null!==a&&(a.buffer?a=a.buffer.slice(a.byteOffset,a.byteOffset+a.length):a.isArrayBufferRef?a=Module._IB_[a.handle].buffer:Object.keys(a).forEach(function(b){a.hasOwnProperty(b)&&(a[b]=y(a[b]))}));return a},c=Module._TRN_EMSCreateSharedWorkerInstance(),k,h=Module._TRN_EMSWorkerInstanceGetFunctionIterator(c),m=function(b,e){return new Promise(function(f,h){b=l(b);var d=b.docId;d=d?Module.GetDoc(d):0;(d=Module.EMSCallSharedFunction(c,e,d))?h({type:"InvalidPDF",
message:Module.GetErrToString(d)}):(h=Module.EMSGetLastResponse(c),h=a(h),f(h))})};k=Module._TRN_EMSFunctionIteratorGetNextCommandName(h);)k=Module.GetJSStringFromCString(k),e.queue.onAsync(k,m);Module._TRN_EMSFunctionIteratorDestroy(h);if(Module._TRN_EMSCreatePDFNetWorkerInstance){var n={};h=function(a,c){b.on(a,c);n[a]=!0};Module.docPtrStringToIdMap={};var v=function(a){if(a in Module.docPtrStringToIdMap)return Module.docPtrStringToIdMap[a];throw Error("Couldn't find document ".concat(a));};e.queue.onAsync("PDFDoc.RequirePage",
function(a){return Module.RequirePage(v(a.docId),a.pageNum)});h("pdfDocCreateFromBuffer",function(a){a=Module.CreateDoc({type:"array",value:a.buf});var b=Module.GetDoc(a).toString(16);Module.docPtrStringToIdMap[b]=a;return b});h("PDFDoc.destroy",function(a){a=v(a.auto_dealloc_obj);Module.DeleteDoc(a)});h("PDFDoc.saveMemoryBuffer",function(a){var b=v(a.doc);return Module.SaveHelper(Module.GetDoc(b),b,a.flags).slice(0)});h("pdfDocCreate",function(){var a=Module.CreateDoc({type:"new"}),b=Module.GetDoc(a).toString(16);
Module.docPtrStringToIdMap[b]=a;return b});h("GetPDFDoc",function(a){a=a.docId;var b=Module.GetDoc(a).toString(16);Module.docPtrStringToIdMap[b]=a;return b});h("ExtractPDFNetLayersContext",function(a){var b=a.layers;a=Module.GetDoc(a.docId);var c=0;b?c=Module.EMSCreateUpdatedLayersContext(a,b):Module.PDFDocHasOC(a)&&(b=Module.PDFDocGetOCGConfig(a),c=Module.OCGContextCreate(b));return c.toString(16)});var z=Module._TRN_EMSCreatePDFNetWorkerInstance();h=Module._TRN_EMSWorkerInstanceGetFunctionIterator(z);
for(m=function(b){return new Promise(function(c,e){b=l(b);var f=Module.EMSCallPDFNetFunction(z,b);f?e(Module.GetErrToString(f)):(e=Module.EMSGetLastResponse(z),e=a(e),c(e))})};k=Module._TRN_EMSFunctionIteratorGetNextCommandName(h);)if(k=Module.GetJSStringFromCString(k),!n[k])b.onAsync(k,m);Module._TRN_EMSFunctionIteratorDestroy(h)}}})(self)},function(e,n,l){e=l(6);var f=l.n(e),m=l(14),b=l(15),u=l(10),a=l(0),c=l(8);(function(e){var h=null;e.basePath="../";var k=function(){var b=e.pdfWorkerPath||"";
e.workerBasePath&&(e.basePath=e.workerBasePath);var f=Object(c.a)(e.location.search),h="true"===f.isfull,k=h?"full/":"lean/";Object(a.c)();f.pdfWorkerPath&&(b=f.pdfWorkerPath,e.basePath="../",Object(u.b)()||(b=""));e.basePath=f.externalPath?f.externalPath:e.basePath+"external/";Object(u.a)("".concat(b+k,"PDFNetC"),{"Wasm.wasm":5E6,"Wasm.js.mem":1E5,".js.mem":6E6,".mem":h?2E6:3E5})};self.shouldResize||k();e.EmscriptenPDFManager=function(){};e.EmscriptenPDFManager.prototype={OnInitialized:function(b){Module.loaded?
b():(Module.initCb=function(){b()},Object(a.b)("worker","PDFNet is not initialized yet!"))},NewDoc:function(a,b){return new Promise(function(c,e){try{c(Module.loadDoc(a,b))}catch(B){e(B)}})},Initialize:function(a,b,c,f){a&&(Module.TOTAL_MEMORY=a);Module.memoryInitializerPrefixURL=b;Module.asmjsPrefix=c;e.basePath=f;k()},shouldRunRender:function(a){return Module.ShouldRunRender(a.docId,a.pageIndex+1)}};var l=new b.a("worker_processor",self);Object(a.a)(l);(function(b){function c(b){var c=b.data,d=
b.action;var f="GetCanvas"===d||"GetCanvasPartial"===d?p.shouldRunRender(c):!0;if(f){h=b;var g=b.asyncCallCapability;Object(a.b)("Memory","Worker running command: ".concat(d));r.actionMap[d](c,b).then(function(a){"BeginOperation"!==h.action&&(h=null);g.resolve(a)},function(a){h=null;g.reject(a)})}else e.deferredQueue.queue(b),n()}function k(a){a.asyncCallCapability=createPromiseCapability();h||r.length?r.queue(a):c(a);return a.asyncCallCapability.promise}function l(a){self.shouldResize&&p.Initialize(a.options.workerHeapSize,
a.options.pdfResourcePath,a.options.pdfAsmPath,a.options.parentUrl);Module.chunkMax=a.options.chunkMax;if(a.array instanceof Uint8Array){var c=255===a.array[0];b.postMessageTransfers=c;"response"in new XMLHttpRequest?p.OnInitialized(function(){e.SetupPDFNetFunctions(b);g();b.send("test",{supportTypedArray:!0,supportTransfers:c})}):b.send("test",!1)}else b.send("test",!1)}function n(){m.a.setImmediate(function(){if((!h||"BeginOperation"!==h.action)&&r.length&&!h){var a=r.dequeue();c(a)}})}var p=new e.EmscriptenPDFManager,
r,u=!1,d=!1;Module.workerMessageHandler=b;var g=function(){u?d||(b.send("workerLoaded",{}),d=!0):u=!0};p.OnInitialized(g);(function(){e.queue=r=new f.a({strategy:f.a.ArrayStrategy,comparator:function(a,b){return a.priority===b.priority?a.callbackId-b.callbackId:b.priority-a.priority}});e.deferredQueue=new f.a({strategy:f.a.ArrayStrategy,comparator:function(a,b){return a.priority===b.priority?a.callbackId-b.callbackId:b.priority-a.priority}});r.actionMap={};r.onAsync=function(a,c){b.onAsync(a,k);r.actionMap[a]=
c}})();b.on("test",l);b.on("InitWorker",l);var q=function(a){h&&a(h)&&(Module.cancelCurrent(),h=null);r.removeAllMatching(a,function(a){a.asyncCallCapability.reject({type:"Cancelled",message:"Operation was cancelled due to a change affecting the loaded document."})})},v=function(a){q(function(b){return b.data&&b.data.docId===a})};b.on("UpdatePassword",function(a){return Module.UpdatePassword(a.docId,a.password)});b.on("LoadRes",function(a){Module.loadResources(a.array,a.l);return{}});b.on("DownloaderHint",
function(a){Module.DownloaderHint(a.docId,a.hint)});b.on("IsLinearized",function(a){return Module.IsLinearizationValid(a.docId)});b.onNextAsync(n);r.onAsync("NewDoc",function(a){return p.NewDoc(a)});r.onAsync("GetCanvas",function(b){Object(a.b)("workerdetails","Run GetCanvas PageIdx: ".concat(b.pageIndex," Width: ").concat(b.width));Object(a.b)("Memory","loadCanvas with potential memory usage ".concat(b.width*b.height*8));return Module.loadCanvas(b.docId,b.pageIndex,b.width,b.height,b.rotation,null,
b.layers,b.overprintMode)});r.onAsync("GetCanvasPartial",function(b){Object(a.b)("Memory","GetCanvasPartial with potential memory usage ".concat(b.width*b.height*8));return Module.loadCanvas(b.docId,b.pageIndex,b.width,b.height,b.rotation,b.bbox,b.layers,b.overprintMode)});r.onAsync("LoadText",function(a){return Module.GetTextData(a.docId,a.pageIndex)});r.onAsync("SaveDoc",function(a){return Module.SaveDoc(a.docId,a.xfdfString,a.finishedWithDocument,a.printDocument,a.flags,a.watermarks,a.apdocs)});
r.onAsync("SaveDocFromFixedElements",function(a){return Module.SaveDocFromFixedElements(a.bytes,a.xfdfString,a.flags,a.watermarks)});r.onAsync("MergeXFDF",function(a){return Module.MergeXFDF(a.docId,a.xfdf,a.apdocs)});r.onAsync("InsertPages",function(a){return Module.InsertPages(a.docId,a.doc,a.pageArray,a.destPos,a.insertBookmarks)});r.onAsync("MovePages",function(a){return Module.MovePages(a.docId,a.pageArray,a.destPos)});r.onAsync("RemovePages",function(a){return Module.RemovePages(a.docId,a.pageArray)});
r.onAsync("RotatePages",function(a){return Module.RotatePages(a.docId,a.pageArray,a.rotation)});r.onAsync("ExtractPages",function(a){return Module.ExtractPages(a.docId,a.pageArray,a.xfdfString,a.watermarks,a.apdocs)});r.onAsync("CropPages",function(a){return Module.CropPages(a.docId,a.pageArray,a.topMargin,a.botMargin,a.leftMargin,a.rightMargin)});r.onAsync("InsertBlankPages",function(a){return Module.InsertBlankPages(a.docId,a.pageArray,a.width,a.height)});r.onAsync("BeginOperation",function(){return Promise.resolve()});
r.onAsync("RequirePage",function(a,b){return Module.RequirePage(a.docId,a.pageNum)});b.on("FinishOperation",function(){if(h&&"BeginOperation"===h.action)h=null,n();else throw{message:"Operation has not started."};});b.on("DeleteDocument",function(a){a=a.docId;v(a);Module.DeleteDoc(a)});b.on("LoadBookmarks",function(a){return Module.LoadBookmarks(a.docId)});b.on("GetCanvasProgressive",function(b){if(h&&h.callbackId===b.callbackId){Object(a.b)("worker","Progressive request in progress");var c=Module.GetCurrentCanvasData(!0)}else{if(r.find({priority:0,
callbackId:b.callbackId}))throw Object(a.b)("worker","Progressive request Queued"),{type:"Queued",message:"Rendering has not started yet."};if(e.deferredQueue.find({priority:0,callbackId:b.callbackId}))throw Object(a.b)("worker","Progressive request Deferred"),{type:"Queued",message:"Rendering has not started yet."};}if(!c)throw Object(a.b)("worker","Progressive request invalid (render already complete)"),{type:"Unavailable",message:"Rendering is complete or was cancelled."};return c});b.on("actionCancel",
function(b){h&&h.callbackId===b.callbackId?(Object(a.b)("workerdetails","Cancelled Current Operation"),Module.cancelCurrent()&&(h=null,n())):(Object(a.b)("workerdetails","Cancelled queued operation"),r.remove({priority:0,callbackId:b.callbackId}),e.deferredQueue.remove({priority:0,callbackId:b.callbackId}))})})(l)})("undefined"===typeof window?self:window)}]);}).call(this || window)