@cornerstonejs/dicom-image-loader 1.77.13 → 1.78.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ (()=>{var t,e,r={37:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(d){var y=r(716),v=r(401);h=p?v.dirname(h)+"/":"//",a=(t,e)=>(t=q(t)?new URL(t):v.normalize(t),y.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=q(t)?new URL(t):v.normalize(t),y.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof J))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(f||p)&&(p?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),n&&(h=n),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},p&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});i.print||console.log.bind(console);var g,m=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary);var w;i.noExitRuntime;"object"!=typeof WebAssembly&&M("no native wasm support detected");var b,T,P,C,$,_,A,k,S,x=!1,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(t,e){return t?function(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&E)return E.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}(P,t,e):""}function R(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,P,e,r)}function F(t){b=t,i.HEAP8=T=new Int8Array(t),i.HEAP16=C=new Int16Array(t),i.HEAP32=_=new Int32Array(t),i.HEAPU8=P=new Uint8Array(t),i.HEAPU16=$=new Uint16Array(t),i.HEAPU32=A=new Uint32Array(t),i.HEAPF32=k=new Float32Array(t),i.HEAPF64=S=new Float64Array(t)}i.INITIAL_MEMORY;var j,D=[],W=[],I=[],U=0,H=null,L=null;function M(t){i.onAbort&&i.onAbort(t),m(t="Aborted("+t+")"),x=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var B,V,z="data:application/octet-stream;base64,";function N(t){return t.startsWith(z)}function q(t){return t.startsWith("file://")}function G(t){try{if(t==B&&g)return new Uint8Array(g);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){M(t)}}function J(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function X(t){for(;t.length>0;)t.shift()(i)}function Y(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(We(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}N(B="charlswasm_decode.wasm")||(V=B,B=i.locateFile?i.locateFile(V,h):h+V);var K={};function Z(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Q(t){return this.fromWireType(_[t>>2])}var tt={},et={},rt={},nt=48,ot=57;function it(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=nt&&e<=ot?"_"+t:t}function at(t,e){return t=it(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function st(t,e){var r=at(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ut=void 0;function ct(t){throw new ut(t)}function lt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ct("Mismatched type converter count");for(var o=0;o<t.length;++o)vt(t[o],n[o])}t.forEach((function(t){rt[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{et.hasOwnProperty(t)?o[e]=et[t]:(i.push(t),tt.hasOwnProperty(t)||(tt[t]=[]),tt[t].push((()=>{o[e]=et[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ft(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var pt=void 0;function dt(t){for(var e="",r=t;P[r];)e+=pt[P[r++]];return e}var ht=void 0;function yt(t){throw new ht(t)}function vt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||yt('type "'+n+'" must have a positive integer typeid pointer'),et.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;yt("Cannot register type '"+n+"' twice")}if(et[t]=e,delete rt[t],tt.hasOwnProperty(t)){var o=tt[t];delete tt[t],o.forEach((t=>t()))}}function gt(t){if(!(this instanceof Ht))return!1;if(!(t instanceof Ht))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function mt(t){yt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var wt=!1;function bt(t){}function Tt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Pt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=Pt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var Ct={};function $t(){return Object.keys(Et).length}function _t(){var t=[];for(var e in Et)Et.hasOwnProperty(e)&&t.push(Et[e]);return t}var At=[];function kt(){for(;At.length;){var t=At.pop();t.$$.deleteScheduled=!1,t.delete()}}var St=void 0;function xt(t){St=t,At.length&&St&&St(kt)}var Et={};function Ot(t,e){return e=function(t,e){for(void 0===e&&yt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Et[e]}function Rt(t,e){return e.ptrType&&e.ptr||ct("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ct("Both smartPtrType and smartPtr must be specified"),e.count={value:1},jt(Object.create(t,{$$:{value:e}}))}function Ft(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ot(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Rt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Rt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=Ct[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Pt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Rt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Rt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function jt(t){return"undefined"==typeof FinalizationRegistry?(jt=t=>t,t):(wt=new FinalizationRegistry((t=>{Tt(t.$$)})),jt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};wt.register(t,r,t)}return t},bt=t=>wt.unregister(t),jt(t))}function Dt(){if(this.$$.ptr||mt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=jt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Wt(){this.$$.ptr||mt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&yt("Object already scheduled for deletion"),bt(this),Tt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function It(){return!this.$$.ptr}function Ut(){return this.$$.ptr||mt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&yt("Object already scheduled for deletion"),At.push(this),1===At.length&&St&&St(kt),this.$$.deleteScheduled=!0,this}function Ht(){}function Lt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||yt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Mt(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&yt("Cannot register public name '"+t+"' twice"),Lt(i,t,t),i.hasOwnProperty(r)&&yt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}function Bt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Vt(t,e,r){for(;e!==r;)e.upcast||yt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function zt(t,e){if(null===e)return this.isReference&&yt("null is not a valid "+this.name),0;e.$$||yt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||yt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Vt(e.$$.ptr,r,this.registeredClass)}function Nt(t,e){var r;if(null===e)return this.isReference&&yt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||yt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||yt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&yt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Vt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&yt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:yt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,pe.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:yt("Unsupporting sharing policy")}return r}function qt(t,e){if(null===e)return this.isReference&&yt("null is not a valid "+this.name),0;e.$$||yt('Cannot pass "'+de(e)+'" as a '+this.name),e.$$.ptr||yt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&yt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Vt(e.$$.ptr,r,this.registeredClass)}function Gt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Jt(t){this.rawDestructor&&this.rawDestructor(t)}function Xt(t){null!==t&&t.delete()}function Yt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Nt:n?(this.toWireType=zt,this.destructorFunction=null):(this.toWireType=qt,this.destructorFunction=null)}function Kt(t,e,r){i.hasOwnProperty(t)||ct("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}var Zt=[];function Qt(t){var e=Zt[t];return e||(t>=Zt.length&&(Zt.length=t+1),Zt[t]=e=j.get(t)),e}function te(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):Qt(e).apply(null,r)}function ee(t,e){var r,n,o,i=(t=dt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),te(r,n,o)}):Qt(e);return"function"!=typeof i&&yt("unknown function pointer with signature "+t+": "+e),i}var re=void 0;function ne(t){var e=Oe(t),r=dt(e);return Re(e),r}function oe(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||et[e]||(rt[e]?rt[e].forEach(t):(r.push(e),n[e]=!0))})),new re(t+": "+r.map(ne).join([", "]))}function ie(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ae(t,e,r,n,o){var i=e.length;i<2&&yt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+it(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[yt,n,o,Z,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=at(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var se=[],ue=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ce(t){t>4&&0==--ue[t].refcount&&(ue[t]=void 0,se.push(t))}function le(){for(var t=0,e=5;e<ue.length;++e)void 0!==ue[e]&&++t;return t}function fe(){for(var t=5;t<ue.length;++t)if(void 0!==ue[t])return ue[t];return null}var pe={toValue:t=>(t||yt("Cannot use deleted val. handle = "+t),ue[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=se.length?se.pop():ue.length;return ue[e]={refcount:1,value:t},e}}};function de(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function he(t,e){switch(e){case 2:return function(t){return this.fromWireType(k[t>>2])};case 3:return function(t){return this.fromWireType(S[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ye(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ve="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ge(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&$[n];)++n;if((r=n<<1)-t>32&&ve)return ve.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function me(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);C[e>>1]=a,e+=2}return C[e>>1]=0,e-n}function we(t){return 2*t.length}function be(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function Pe(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var Ce={};function $e(){return"object"==typeof globalThis?globalThis:Function("return this")()}function _e(t,e){var r=et[t];return void 0===r&&yt(e+" has unknown type "+ne(t)),r}var Ae={};function ke(t){try{return w.grow(t-b.byteLength+65535>>>16),F(w.buffer),1}catch(t){}}ut=i.InternalError=st(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pt=t}(),ht=i.BindingError=st(Error,"BindingError"),Ht.prototype.isAliasOf=gt,Ht.prototype.clone=Dt,Ht.prototype.delete=Wt,Ht.prototype.isDeleted=It,Ht.prototype.deleteLater=Ut,i.getInheritedInstanceCount=$t,i.getLiveInheritedInstances=_t,i.flushPendingDeletes=kt,i.setDelayFunction=xt,Yt.prototype.getPointee=Gt,Yt.prototype.destructor=Jt,Yt.prototype.argPackAdvance=8,Yt.prototype.readValueFromPointer=Q,Yt.prototype.deleteObject=Xt,Yt.prototype.fromWireType=Ft,re=i.UnboundTypeError=st(Error,"UnboundTypeError"),i.count_emval_handles=le,i.get_first_emval=fe;var Se,xe={h:function(t,e,r){throw new Y(t).init(e,r),t},q:function(t){var e=K[t];delete K[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;lt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),Z(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:n}]}))},r:function(t,e,r,n,o){},w:function(t,e,r,n,o){var i=ft(r);vt(t,{name:e=dt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=C;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},p:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=dt(l),i=ee(o,i),s&&(s=ee(a,s)),c&&(c=ee(u,c)),p=ee(f,p);var d=it(l);Mt(d,(function(){oe("Cannot construct "+l+" due to unbound types",[n])})),lt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Ht.prototype;var a=at(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new ht("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new ht(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new ht("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Bt(l,a,u,p,r,i,s,c),h=new Yt(l,f,!0,!1,!1),y=new Yt(l+"*",f,!1,!1,!1),v=new Yt(l+" const*",f,!1,!0,!1);return Ct[t]={pointerType:y,constPointerType:v},Kt(d,a),[h,y,v]}))},o:function(t,e,r,n,o,i){var a;e>0||M(a);var s=ie(e,r);o=ee(n,o),lt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new ht("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{oe("Cannot construct "+t.name+" due to unbound types",s)},lt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ae(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ie(r,n);e=dt(e),i=ee(o,i),lt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){oe("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Lt(c,e,n),c[e].overloadTable[r-2]=o),lt([],u,(function(o){var s=ae(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},v:function(t,e){vt(t,{name:e=dt(e),fromWireType:function(t){var e=pe.toValue(t);return ce(t),e},toWireType:function(t,e){return pe.toHandle(e)},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:null})},k:function(t,e,r){var n=ft(r);vt(t,{name:e=dt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:he(e,n),destructorFunction:null})},e:function(t,e,r,n,o,i){var a=ie(e,r);t=dt(t),o=ee(n,o),Mt(t,(function(){oe("Cannot call "+t+" due to unbound types",a)}),e-1),lt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Kt(t,ae(t,n,null,o,i),e-1),[]}))},b:function(t,e,r,n,o){e=dt(e),-1===o&&(o=4294967295);var i=ft(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");vt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ye(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}vt(t,{name:r=dt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},j:function(t,e){var r="std::string"===(e=dt(e));vt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==P[s]){var u=O(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(P[o+a]);e=c.join("")}return Re(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||yt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=Ee(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)R(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Re(a),yt("String has UTF-16 code units that do not fit in 8 bits")),P[a+s]=u}else for(s=0;s<n;++s)P[a+s]=e[s];return null!==t&&t.push(Re,i),i},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:function(t){Re(t)}})},g:function(t,e,r){var n,o,i,a,s;r=dt(r),2===e?(n=ge,o=me,a=we,i=()=>$,s=1):4===e&&(n=be,o=Te,a=Pe,i=()=>A,s=2),vt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Re(t),r},toWireType:function(t,n){"string"!=typeof n&&yt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Ee(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Re,u),u},argPackAdvance:8,readValueFromPointer:Q,destructorFunction:function(t){Re(t)}})},u:function(t,e,r,n,o,i){K[t]={name:dt(e),rawConstructor:ee(r,n),rawDestructor:ee(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){K[t].fields.push({fieldName:dt(e),getterReturnType:r,getter:ee(n,o),getterContext:i,setterArgumentType:a,setter:ee(s,u),setterContext:c})},x:function(t,e){vt(t,{isVoid:!0,name:e=dt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},i:ce,m:function(t){return 0===t?pe.toHandle($e()):(t=void 0===(r=Ce[e=t])?dt(e):r,pe.toHandle($e()[t]));var e,r},l:function(t){t>4&&(ue[t].refcount+=1)},y:function(t,e,r,n){t=pe.toValue(t);var o=Ae[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(_e,i,pe.toHandle,(()=>A))}(e),Ae[e]=o),o(t,r,n)},n:function(t,e){var r=(t=_e(t,"_emval_take_value")).readValueFromPointer(e);return pe.toHandle(r)},f:function(){M("")},t:function(t,e,r){P.copyWithin(t,e,e+r)},s:function(t){var e,r,n=P.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),ke(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1}},Ee=(function(){var t={a:xe};function e(t,e){var r,n=t.exports;i.asm=n,F((w=i.asm.z).buffer),j=i.asm.C,r=i.asm.A,W.unshift(r),function(t){if(U--,i.monitorRunDependencies&&i.monitorRunDependencies(U),0==U&&(null!==H&&(clearInterval(H),H=null),L)){var e=L;L=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!g&&(f||p)){if("function"==typeof fetch&&!q(B))return fetch(B,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+B+"'";return t.arrayBuffer()})).catch((function(){return G(B)}));if(s)return new Promise((function(t,e){s(B,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return G(B)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){m("failed to asynchronously prepare wasm: "+t),M(t)}))}if(U++,i.monitorRunDependencies&&i.monitorRunDependencies(U),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){m("Module.instantiateWasm callback failed with error: "+t),o(t)}(g||"function"!=typeof WebAssembly.instantiateStreaming||N(B)||q(B)||d||"function"!=typeof fetch?n(r):fetch(B,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return m("wasm streaming compile failed: "+t),m("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.A).apply(null,arguments)},i._malloc=function(){return(Ee=i._malloc=i.asm.B).apply(null,arguments)}),Oe=i.___getTypeName=function(){return(Oe=i.___getTypeName=i.asm.D).apply(null,arguments)},Re=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.E).apply(null,arguments)},i._free=function(){return(Re=i._free=i.asm.F).apply(null,arguments)}),Fe=i.stackSave=function(){return(Fe=i.stackSave=i.asm.G).apply(null,arguments)},je=i.stackRestore=function(){return(je=i.stackRestore=i.asm.H).apply(null,arguments)},De=i.stackAlloc=function(){return(De=i.stackAlloc=i.asm.I).apply(null,arguments)},We=i.___cxa_is_pointer_type=function(){return(We=i.___cxa_is_pointer_type=i.asm.J).apply(null,arguments)};function Ie(t){function r(){Se||(Se=!0,i.calledRun=!0,x||(X(W),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),I.unshift(t);var t;X(I)}()))}t=t||l,U>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),D.unshift(t);var t;X(D)}(),U>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);R(t,e=De(r),r)}return e},array:t=>{var e=De(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Fe()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&je(c),function(t){return"string"===e?O(t):"boolean"===e?Boolean(t):t}(t)}(p)},L=function t(){Se||Ie(),Se||(L=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ie(),t.ready});t.exports=o},851:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p=(t,e)=>{throw e},d="object"==typeof window,h="function"==typeof importScripts,y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v="";if(y){var g=r(491),m=r(33);v=h?m.dirname(v)+"/":"//",a=(t,e)=>(t=Z(t)?new URL(t):m.normalize(t),g.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=Z(t)?new URL(t):m.normalize(t),g.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof tt))throw t})),process.on("unhandledRejection",(function(t){throw t})),p=(t,e)=>{if(V())throw process.exitCode=t,e;var r;(r=e)instanceof tt||T("exiting due to exception: "+r),process.exit(t)},i.inspect=function(){return"[Emscripten Module object]"}}else(d||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),n&&(v=n),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},h&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var w,b=i.print||console.log.bind(console),T=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&(p=i.quit),i.wasmBinary&&(w=i.wasmBinary);var P,C=i.noExitRuntime||!0;"object"!=typeof WebAssembly&&G("no native wasm support detected");var $,_,A,k,S,x,E,O,R,F=!1,j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&j)return j.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function W(t,e){return t?D(A,t,e):""}function I(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,A,e,r)}function U(t){$=t,i.HEAP8=_=new Int8Array(t),i.HEAP16=k=new Int16Array(t),i.HEAP32=x=new Int32Array(t),i.HEAPU8=A=new Uint8Array(t),i.HEAPU16=S=new Uint16Array(t),i.HEAPU32=E=new Uint32Array(t),i.HEAPF32=O=new Float32Array(t),i.HEAPF64=R=new Float64Array(t)}i.INITIAL_MEMORY;var H,L=[],M=[],B=[];function V(){return C}var z=0,N=null,q=null;function G(t){i.onAbort&&i.onAbort(t),T(t="Aborted("+t+")"),F=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var J,X,Y="data:application/octet-stream;base64,";function K(t){return t.startsWith(Y)}function Z(t){return t.startsWith("file://")}function Q(t){try{if(t==J&&w)return new Uint8Array(w);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){G(t)}}function tt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function et(t){for(;t.length>0;)t.shift()(i)}function rt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){E[this.ptr+4>>2]=t},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(t){E[this.ptr+8>>2]=t},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_refcount=function(t){x[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,_[this.ptr+12|0]=t},this.get_caught=function(){return 0!=_[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,_[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=_[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=x[this.ptr>>2];x[this.ptr>>2]=t+1},this.release_ref=function(){var t=x[this.ptr>>2];return x[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){E[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(qe(this.get_type()))return E[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}K(J="libjpegturbowasm_decode.wasm")||(X=J,J=i.locateFile?i.locateFile(X,v):v+X);var nt={};function ot(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function it(t){return this.fromWireType(x[t>>2])}var at={},st={},ut={},ct=48,lt=57;function ft(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ct&&e<=lt?"_"+t:t}function pt(t,e){return t=ft(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function dt(t,e){var r=pt(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ht=void 0;function yt(t){throw new ht(t)}function vt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&yt("Mismatched type converter count");for(var o=0;o<t.length;++o)Pt(t[o],n[o])}t.forEach((function(t){ut[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{st.hasOwnProperty(t)?o[e]=st[t]:(i.push(t),at.hasOwnProperty(t)||(at[t]=[]),at[t].push((()=>{o[e]=st[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function gt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var mt=void 0;function wt(t){for(var e="",r=t;A[r];)e+=mt[A[r++]];return e}var bt=void 0;function Tt(t){throw new bt(t)}function Pt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||Tt('type "'+n+'" must have a positive integer typeid pointer'),st.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;Tt("Cannot register type '"+n+"' twice")}if(st[t]=e,delete ut[t],at.hasOwnProperty(t)){var o=at[t];delete at[t],o.forEach((t=>t()))}}function Ct(t){if(!(this instanceof Nt))return!1;if(!(t instanceof Nt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function $t(t){Tt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var _t=!1;function At(t){}function kt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function St(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=St(t,e,r.baseClass);return null===n?null:r.downcast(n)}var xt={};function Et(){return Object.keys(Wt).length}function Ot(){var t=[];for(var e in Wt)Wt.hasOwnProperty(e)&&t.push(Wt[e]);return t}var Rt=[];function Ft(){for(;Rt.length;){var t=Rt.pop();t.$$.deleteScheduled=!1,t.delete()}}var jt=void 0;function Dt(t){jt=t,Rt.length&&jt&&jt(Ft)}var Wt={};function It(t,e){return e=function(t,e){for(void 0===e&&Tt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Wt[e]}function Ut(t,e){return e.ptrType&&e.ptr||yt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&yt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Lt(Object.create(t,{$$:{value:e}}))}function Ht(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=It(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Ut(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ut(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=xt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=St(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ut(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Ut(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Lt(t){return"undefined"==typeof FinalizationRegistry?(Lt=t=>t,t):(_t=new FinalizationRegistry((t=>{kt(t.$$)})),Lt=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};_t.register(t,r,t)}return t},At=t=>_t.unregister(t),Lt(t))}function Mt(){if(this.$$.ptr||$t(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Lt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Bt(){this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),At(this),kt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Vt(){return!this.$$.ptr}function zt(){return this.$$.ptr||$t(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Tt("Object already scheduled for deletion"),Rt.push(this),1===Rt.length&&jt&&jt(Ft),this.$$.deleteScheduled=!0,this}function Nt(){}function qt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||Tt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function Gt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Jt(t,e,r){for(;e!==r;)e.upcast||Tt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Xt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+ge(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Jt(e.$$.ptr,r,this.registeredClass)}function Yt(t,e){var r;if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||Tt('Cannot pass "'+ge(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&Tt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&Tt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:Tt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ve.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:Tt("Unsupporting sharing policy")}return r}function Kt(t,e){if(null===e)return this.isReference&&Tt("null is not a valid "+this.name),0;e.$$||Tt('Cannot pass "'+ge(e)+'" as a '+this.name),e.$$.ptr||Tt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&Tt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Jt(e.$$.ptr,r,this.registeredClass)}function Zt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Qt(t){this.rawDestructor&&this.rawDestructor(t)}function te(t){null!==t&&t.delete()}function ee(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Yt:n?(this.toWireType=Xt,this.destructorFunction=null):(this.toWireType=Kt,this.destructorFunction=null)}var re=[];function ne(t){var e=re[t];return e||(t>=re.length&&(re.length=t+1),re[t]=e=H.get(t)),e}function oe(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):ne(e).apply(null,r)}function ie(t,e){var r,n,o,i=(t=wt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),oe(r,n,o)}):ne(e);return"function"!=typeof i&&Tt("unknown function pointer with signature "+t+": "+e),i}var ae=void 0;function se(t){var e=Me(t),r=wt(e);return Le(e),r}function ue(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||st[e]||(ut[e]?ut[e].forEach(t):(r.push(e),n[e]=!0))})),new ae(t+": "+r.map(se).join([", "]))}function ce(t,e){for(var r=[],n=0;n<t;n++)r.push(E[e+4*n>>2]);return r}function le(t,e,r,n,o){var i=e.length;i<2&&Tt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ft(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[Tt,n,o,ot,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=pt(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var fe=[],pe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function de(t){t>4&&0==--pe[t].refcount&&(pe[t]=void 0,fe.push(t))}function he(){for(var t=0,e=5;e<pe.length;++e)void 0!==pe[e]&&++t;return t}function ye(){for(var t=5;t<pe.length;++t)if(void 0!==pe[t])return pe[t];return null}var ve={toValue:t=>(t||Tt("Cannot use deleted val. handle = "+t),pe[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=fe.length?fe.pop():pe.length;return pe[e]={refcount:1,value:t},e}}};function ge(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function me(t,e){switch(e){case 2:return function(t){return this.fromWireType(O[t>>2])};case 3:return function(t){return this.fromWireType(R[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function we(t,e,r){switch(e){case 0:return r?function(t){return _[t]}:function(t){return A[t]};case 1:return r?function(t){return k[t>>1]}:function(t){return S[t>>1]};case 2:return r?function(t){return x[t>>2]}:function(t){return E[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var be="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Te(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&S[n];)++n;if((r=n<<1)-t>32&&be)return be.decode(A.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=k[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Pe(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);k[e>>1]=a,e+=2}return k[e>>1]=0,e-n}function Ce(t){return 2*t.length}function $e(t,e){for(var r=0,n="";!(r>=e/4);){var o=x[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function _e(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),x[e>>2]=a,(e+=4)+4>o)break}return x[e>>2]=0,e-n}function Ae(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var ke={};function Se(){return"object"==typeof globalThis?globalThis:Function("return this")()}function xe(t,e){var r=st[t];return void 0===r&&Tt(e+" has unknown type "+se(t)),r}var Ee={};function Oe(t){try{return P.grow(t-$.byteLength+65535>>>16),U(P.buffer),1}catch(t){}}var Re={};function Fe(){if(!Fe.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in Re)void 0===Re[e]?delete t[e]:t[e]=Re[e];var r=[];for(var e in t)r.push(e+"="+t[e]);Fe.strings=r}return Fe.strings}var je=function(t,e){var r;r=t,V()||(i.onExit&&i.onExit(r),F=!0),p(r,new tt(r))},De=[null,[],[]];function We(t,e){var r=De[t];0===e||10===e?((1===t?b:T)(D(r,0)),r.length=0):r.push(e)}ht=i.InternalError=dt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);mt=t}(),bt=i.BindingError=dt(Error,"BindingError"),Nt.prototype.isAliasOf=Ct,Nt.prototype.clone=Mt,Nt.prototype.delete=Bt,Nt.prototype.isDeleted=Vt,Nt.prototype.deleteLater=zt,i.getInheritedInstanceCount=Et,i.getLiveInheritedInstances=Ot,i.flushPendingDeletes=Ft,i.setDelayFunction=Dt,ee.prototype.getPointee=Zt,ee.prototype.destructor=Qt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=it,ee.prototype.deleteObject=te,ee.prototype.fromWireType=Ht,ae=i.UnboundTypeError=dt(Error,"UnboundTypeError"),i.count_emval_handles=he,i.get_first_emval=ye;var Ie,Ue={g:function(t,e,r){throw new rt(t).init(e,r),t},A:function(t){var e=nt[t];delete nt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;vt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),ot(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:it,destructorFunction:n}]}))},w:function(t,e,r,n,o){},F:function(t,e,r,n,o){var i=gt(r);Pt(t,{name:e=wt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=_;else if(2===r)n=k;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=x}return this.fromWireType(n[t>>i])},destructorFunction:null})},u:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=wt(f),a=ie(o,a),u&&(u=ie(s,u)),l&&(l=ie(c,l)),d=ie(p,d);var h=ft(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&Tt("Cannot register public name '"+t+"' twice"),qt(i,t,t),i.hasOwnProperty(r)&&Tt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(h,(function(){ue("Cannot construct "+f+" due to unbound types",[n])})),vt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Nt.prototype;var s=pt(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new bt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new bt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new bt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new Gt(f,s,c,d,r,a,u,l),y=new ee(f,p,!0,!1,!1),v=new ee(f+"*",p,!1,!1,!1),g=new ee(f+" const*",p,!1,!0,!1);return xt[t]={pointerType:v,constPointerType:g},function(t,e,r){i.hasOwnProperty(t)||yt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(h,s),[y,v,g]}))},t:function(t,e,r,n,o,i){var a;e>0||G(a);var s=ce(e,r);o=ie(n,o),vt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new bt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ue("Cannot construct "+t.name+" due to unbound types",s)},vt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=le(r,n,null,o,i),[]})),[]}))},c:function(t,e,r,n,o,i,a,s){var u=ce(r,n);e=wt(e),i=ie(o,i),vt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ue("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(qt(c,e,n),c[e].overloadTable[r-2]=o),vt([],u,(function(o){var s=le(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},E:function(t,e){Pt(t,{name:e=wt(e),fromWireType:function(t){var e=ve.toValue(t);return de(t),e},toWireType:function(t,e){return ve.toHandle(e)},argPackAdvance:8,readValueFromPointer:it,destructorFunction:null})},m:function(t,e,r){var n=gt(r);Pt(t,{name:e=wt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:me(e,n),destructorFunction:null})},b:function(t,e,r,n,o){e=wt(e),-1===o&&(o=4294967295);var i=gt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Pt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:we(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=E,r=e[t>>=2],o=e[t+1];return new n($,o,r)}Pt(t,{name:r=wt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},l:function(t,e){var r="std::string"===(e=wt(e));Pt(t,{name:e,fromWireType:function(t){var e,n=E[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==A[s]){var u=W(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(A[o+a]);e=c.join("")}return Le(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Tt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=He(4+n+1),a=i+4;if(E[i>>2]=n,r&&o)I(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Le(a),Tt("String has UTF-16 code units that do not fit in 8 bits")),A[a+s]=u}else for(s=0;s<n;++s)A[a+s]=e[s];return null!==t&&t.push(Le,i),i},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){Le(t)}})},h:function(t,e,r){var n,o,i,a,s;r=wt(r),2===e?(n=Te,o=Pe,a=Ce,i=()=>S,s=1):4===e&&(n=$e,o=_e,a=Ae,i=()=>E,s=2),Pt(t,{name:r,fromWireType:function(t){for(var r,o=E[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Le(t),r},toWireType:function(t,n){"string"!=typeof n&&Tt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=He(4+i+e);return E[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Le,u),u},argPackAdvance:8,readValueFromPointer:it,destructorFunction:function(t){Le(t)}})},J:function(t,e,r,n,o,i){nt[t]={name:wt(e),rawConstructor:ie(r,n),rawDestructor:ie(o,i),fields:[]}},d:function(t,e,r,n,o,i,a,s,u,c){nt[t].fields.push({fieldName:wt(e),getterReturnType:r,getter:ie(n,o),getterContext:i,setterArgumentType:a,setter:ie(s,u),setterContext:c})},G:function(t,e){Pt(t,{isVoid:!0,name:e=wt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},x:function(){throw 1/0},i:de,r:function(t){return 0===t?ve.toHandle(Se()):(t=void 0===(r=ke[e=t])?wt(e):r,ve.toHandle(Se()[t]));var e,r},p:function(t){t>4&&(pe[t].refcount+=1)},q:function(t,e,r,n){t=ve.toValue(t);var o=Ee[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(xe,i,ve.toHandle,(()=>E))}(e),Ee[e]=o),o(t,r,n)},s:function(t,e){var r=(t=xe(t,"_emval_take_value")).readValueFromPointer(e);return ve.toHandle(r)},j:function(){G("")},D:function(t,e,r){A.copyWithin(t,e,e+r)},y:function(t){var e,r,n=A.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Oe(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},z:function(t,e){var r=0;return Fe().forEach((function(n,o){var i=e+r;E[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)_[0|e++]=t.charCodeAt(n);r||(_[0|e]=0)}(n,i),r+=n.length+1})),0},B:function(t,e){var r=Fe();E[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),E[e>>2]=n,0},I:je,C:function(t){return 52},v:function(t,e,r,n,o){return 70},k:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=E[e>>2],s=E[e+4>>2];e+=8;for(var u=0;u<s;u++)We(t,A[a+u]);o+=s}return E[n>>2]=o,0},o:function(t,e){var r=Ve();try{return ne(t)(e)}catch(t){if(ze(r),t!==t+0)throw t;Be(1,0)}},n:function(t,e,r){var n=Ve();try{return ne(t)(e,r)}catch(t){if(ze(n),t!==t+0)throw t;Be(1,0)}},H:function(t,e,r,n){var o=Ve();try{return ne(t)(e,r,n)}catch(t){if(ze(o),t!==t+0)throw t;Be(1,0)}},f:function(t,e){var r=Ve();try{ne(t)(e)}catch(t){if(ze(r),t!==t+0)throw t;Be(1,0)}},e:function(t,e,r,n){var o=Ve();try{ne(t)(e,r,n)}catch(t){if(ze(o),t!==t+0)throw t;Be(1,0)}}},He=(function(){var t={a:Ue};function e(t,e){var r,n=t.exports;i.asm=n,U((P=i.asm.K).buffer),H=i.asm.M,r=i.asm.L,M.unshift(r),function(t){if(z--,i.monitorRunDependencies&&i.monitorRunDependencies(z),0==z&&(null!==N&&(clearInterval(N),N=null),q)){var e=q;q=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!w&&(d||h)){if("function"==typeof fetch&&!Z(J))return fetch(J,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+J+"'";return t.arrayBuffer()})).catch((function(){return Q(J)}));if(s)return new Promise((function(t,e){s(J,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Q(J)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){T("failed to asynchronously prepare wasm: "+t),G(t)}))}if(z++,i.monitorRunDependencies&&i.monitorRunDependencies(z),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){T("Module.instantiateWasm callback failed with error: "+t),o(t)}(w||"function"!=typeof WebAssembly.instantiateStreaming||K(J)||Z(J)||y||"function"!=typeof fetch?n(r):fetch(J,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return T("wasm streaming compile failed: "+t),T("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.L).apply(null,arguments)},i._malloc=function(){return(He=i._malloc=i.asm.N).apply(null,arguments)}),Le=i._free=function(){return(Le=i._free=i.asm.O).apply(null,arguments)},Me=i.___getTypeName=function(){return(Me=i.___getTypeName=i.asm.P).apply(null,arguments)},Be=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.Q).apply(null,arguments)},i._setThrew=function(){return(Be=i._setThrew=i.asm.R).apply(null,arguments)}),Ve=i.stackSave=function(){return(Ve=i.stackSave=i.asm.S).apply(null,arguments)},ze=i.stackRestore=function(){return(ze=i.stackRestore=i.asm.T).apply(null,arguments)},Ne=i.stackAlloc=function(){return(Ne=i.stackAlloc=i.asm.U).apply(null,arguments)},qe=i.___cxa_is_pointer_type=function(){return(qe=i.___cxa_is_pointer_type=i.asm.V).apply(null,arguments)};function Ge(t){function r(){Ie||(Ie=!0,i.calledRun=!0,F||(et(M),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),B.unshift(t);var t;et(B)}()))}t=t||l,z>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),L.unshift(t);var t;et(L)}(),z>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.W).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);I(t,e=Ne(r),r)}return e},array:t=>{var e=Ne(t.length);return function(t,e){_.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Ve()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&ze(c),function(t){return"string"===e?W(t):"boolean"===e?Boolean(t):t}(t)}(p)},q=function t(){Ie||Ge(),Ie||(q=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ge(),t.ready});t.exports=o},272:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,o=r}));var a,s,u,c=Object.assign({},i),l=[],f="./this.program",p="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y="";if(h){var v=r(261),g=r(926);y=d?g.dirname(y)+"/":"//",a=(t,e)=>(t=X(t)?new URL(t):g.normalize(t),v.readFileSync(t,e?void 0:"utf8")),u=t=>{var e=a(t,!0);return e.buffer||(e=new Uint8Array(e)),e},s=(t,e,r)=>{t=X(t)?new URL(t):g.normalize(t),v.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&(f=process.argv[1].replace(/\\/g,"/")),l=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof K))throw t})),process.on("unhandledRejection",(function(t){throw t})),i.inspect=function(){return"[Emscripten Module object]"}}else(p||d)&&(d?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),n&&(y=n),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},d&&(u=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),s=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var m,w=i.print||console.log.bind(console),b=i.printErr||console.warn.bind(console);Object.assign(i,c),c=null,i.arguments&&(l=i.arguments),i.thisProgram&&(f=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(m=i.wasmBinary);var T;i.noExitRuntime;"object"!=typeof WebAssembly&&z("no native wasm support detected");var P,C,$,_,A,k,S,x,E,O=!1,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function F(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&R)return R.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function j(t,e){return t?F($,t,e):""}function D(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,$,e,r)}function W(t){P=t,i.HEAP8=C=new Int8Array(t),i.HEAP16=_=new Int16Array(t),i.HEAP32=k=new Int32Array(t),i.HEAPU8=$=new Uint8Array(t),i.HEAPU16=A=new Uint16Array(t),i.HEAPU32=S=new Uint32Array(t),i.HEAPF32=x=new Float32Array(t),i.HEAPF64=E=new Float64Array(t)}i.INITIAL_MEMORY;var I,U=[],H=[],L=[],M=0,B=null,V=null;function z(t){i.onAbort&&i.onAbort(t),b(t="Aborted("+t+")"),O=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw o(e),e}var N,q,G="data:application/octet-stream;base64,";function J(t){return t.startsWith(G)}function X(t){return t.startsWith("file://")}function Y(t){try{if(t==N&&m)return new Uint8Array(m);if(u)return u(t);throw"both async and sync fetching of the wasm failed"}catch(t){z(t)}}function K(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Z(t){for(;t.length>0;)t.shift()(i)}function Q(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){S[this.ptr+4>>2]=t},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(t){S[this.ptr+8>>2]=t},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_refcount=function(t){k[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,C[this.ptr+12|0]=t},this.get_caught=function(){return 0!=C[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,C[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=C[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=k[this.ptr>>2];k[this.ptr>>2]=t+1},this.release_ref=function(){var t=k[this.ptr>>2];return k[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){S[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Me(this.get_type()))return S[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}J(N="openjpegwasm_decode.wasm")||(q=N,N=i.locateFile?i.locateFile(q,y):y+q);var tt={};function et(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function rt(t){return this.fromWireType(k[t>>2])}var nt={},ot={},it={},at=48,st=57;function ut(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=at&&e<=st?"_"+t:t}function ct(t,e){return t=ut(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function lt(t,e){var r=ct(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ft=void 0;function pt(t){throw new ft(t)}function dt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&pt("Mismatched type converter count");for(var o=0;o<t.length;++o)wt(t[o],n[o])}t.forEach((function(t){it[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{ot.hasOwnProperty(t)?o[e]=ot[t]:(i.push(t),nt.hasOwnProperty(t)||(nt[t]=[]),nt[t].push((()=>{o[e]=ot[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function ht(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var yt=void 0;function vt(t){for(var e="",r=t;$[r];)e+=yt[$[r++]];return e}var gt=void 0;function mt(t){throw new gt(t)}function wt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||mt('type "'+n+'" must have a positive integer typeid pointer'),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;mt("Cannot register type '"+n+"' twice")}if(ot[t]=e,delete it[t],nt.hasOwnProperty(t)){var o=nt[t];delete nt[t],o.forEach((t=>t()))}}function bt(t){if(!(this instanceof Bt))return!1;if(!(t instanceof Bt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Tt(t){mt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Pt=!1;function Ct(t){}function $t(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function _t(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=_t(t,e,r.baseClass);return null===n?null:r.downcast(n)}var At={};function kt(){return Object.keys(Ft).length}function St(){var t=[];for(var e in Ft)Ft.hasOwnProperty(e)&&t.push(Ft[e]);return t}var xt=[];function Et(){for(;xt.length;){var t=xt.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ot=void 0;function Rt(t){Ot=t,xt.length&&Ot&&Ot(Et)}var Ft={};function jt(t,e){return e=function(t,e){for(void 0===e&&mt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Ft[e]}function Dt(t,e){return e.ptrType&&e.ptr||pt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},It(Object.create(t,{$$:{value:e}}))}function Wt(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=jt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?Dt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Dt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=At[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=_t(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Dt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):Dt(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function It(t){return"undefined"==typeof FinalizationRegistry?(It=t=>t,t):(Pt=new FinalizationRegistry((t=>{$t(t.$$)})),It=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};Pt.register(t,r,t)}return t},Ct=t=>Pt.unregister(t),It(t))}function Ut(){if(this.$$.ptr||Tt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=It(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ht(){this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),Ct(this),$t(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Lt(){return!this.$$.ptr}function Mt(){return this.$$.ptr||Tt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&mt("Object already scheduled for deletion"),xt.push(this),1===xt.length&&Ot&&Ot(Et),this.$$.deleteScheduled=!0,this}function Bt(){}function Vt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||mt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function zt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||mt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function qt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Nt(e.$$.ptr,r,this.registeredClass)}function Gt(t,e){var r;if(null===e)return this.isReference&&mt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&mt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:mt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,de.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:mt("Unsupporting sharing policy")}return r}function Jt(t,e){if(null===e)return this.isReference&&mt("null is not a valid "+this.name),0;e.$$||mt('Cannot pass "'+he(e)+'" as a '+this.name),e.$$.ptr||mt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&mt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Nt(e.$$.ptr,r,this.registeredClass)}function Xt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Yt(t){this.rawDestructor&&this.rawDestructor(t)}function Kt(t){null!==t&&t.delete()}function Zt(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Gt:n?(this.toWireType=qt,this.destructorFunction=null):(this.toWireType=Jt,this.destructorFunction=null)}var Qt=[];function te(t){var e=Qt[t];return e||(t>=Qt.length&&(Qt.length=t+1),Qt[t]=e=I.get(t)),e}function ee(t,e,r){return t.includes("j")?function(t,e,r){var n=i["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)}(t,e,r):te(e).apply(null,r)}function re(t,e){var r,n,o,i=(t=vt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ee(r,n,o)}):te(e);return"function"!=typeof i&&mt("unknown function pointer with signature "+t+": "+e),i}var ne=void 0;function oe(t){var e=Ie(t),r=vt(e);return We(e),r}function ie(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||ot[e]||(it[e]?it[e].forEach(t):(r.push(e),n[e]=!0))})),new ne(t+": "+r.map(oe).join([", "]))}function ae(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+4*n>>2]);return r}function se(t,e,r,n,o){var i=e.length;i<2&&mt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+ut(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[mt,n,o,et,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ct(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var ue=[],ce=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function le(t){t>4&&0==--ce[t].refcount&&(ce[t]=void 0,ue.push(t))}function fe(){for(var t=0,e=5;e<ce.length;++e)void 0!==ce[e]&&++t;return t}function pe(){for(var t=5;t<ce.length;++t)if(void 0!==ce[t])return ce[t];return null}var de={toValue:t=>(t||mt("Cannot use deleted val. handle = "+t),ce[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=ue.length?ue.pop():ce.length;return ce[e]={refcount:1,value:t},e}}};function he(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ye(t,e){switch(e){case 2:return function(t){return this.fromWireType(x[t>>2])};case 3:return function(t){return this.fromWireType(E[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ve(t,e,r){switch(e){case 0:return r?function(t){return C[t]}:function(t){return $[t]};case 1:return r?function(t){return _[t>>1]}:function(t){return A[t>>1]};case 2:return r?function(t){return k[t>>2]}:function(t){return S[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ge="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function me(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&A[n];)++n;if((r=n<<1)-t>32&&ge)return ge.decode($.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=_[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function we(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);_[e>>1]=a,e+=2}return _[e>>1]=0,e-n}function be(t){return 2*t.length}function Te(t,e){for(var r=0,n="";!(r>=e/4);){var o=k[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function Pe(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),k[e>>2]=a,(e+=4)+4>o)break}return k[e>>2]=0,e-n}function Ce(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}var $e={};function _e(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ae(t,e){var r=ot[t];return void 0===r&&mt(e+" has unknown type "+oe(t)),r}var ke={};function Se(t){try{return T.grow(t-P.byteLength+65535>>>16),W(T.buffer),1}catch(t){}}var xe={};function Ee(){if(!Ee.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var e in xe)void 0===xe[e]?delete t[e]:t[e]=xe[e];var r=[];for(var e in t)r.push(e+"="+t[e]);Ee.strings=r}return Ee.strings}var Oe=[null,[],[]];function Re(t,e){var r=Oe[t];0===e||10===e?((1===t?w:b)(F(r,0)),r.length=0):r.push(e)}ft=i.InternalError=lt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);yt=t}(),gt=i.BindingError=lt(Error,"BindingError"),Bt.prototype.isAliasOf=bt,Bt.prototype.clone=Ut,Bt.prototype.delete=Ht,Bt.prototype.isDeleted=Lt,Bt.prototype.deleteLater=Mt,i.getInheritedInstanceCount=kt,i.getLiveInheritedInstances=St,i.flushPendingDeletes=Et,i.setDelayFunction=Rt,Zt.prototype.getPointee=Xt,Zt.prototype.destructor=Yt,Zt.prototype.argPackAdvance=8,Zt.prototype.readValueFromPointer=rt,Zt.prototype.deleteObject=Kt,Zt.prototype.fromWireType=Wt,ne=i.UnboundTypeError=lt(Error,"UnboundTypeError"),i.count_emval_handles=fe,i.get_first_emval=pe;var Fe,je={D:function(t,e,r){throw new Q(t).init(e,r),t},e:function(t){var e=tt[t];delete tt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;dt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),et(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:n}]}))},t:function(t,e,r,n,o){},B:function(t,e,r,n,o){var i=ht(r);wt(t,{name:e=vt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=C;else if(2===r)n=_;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=k}return this.fromWireType(n[t>>i])},destructorFunction:null})},r:function(t,e,r,n,o,a,s,u,c,l,f,p,d){f=vt(f),a=re(o,a),u&&(u=re(s,u)),l&&(l=re(c,l)),d=re(p,d);var h=ut(f);!function(t,e,r){i.hasOwnProperty(t)?((void 0===r||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[r])&&mt("Cannot register public name '"+t+"' twice"),Vt(i,t,t),i.hasOwnProperty(r)&&mt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[t].overloadTable[r]=e):(i[t]=e,void 0!==r&&(i[t].numArguments=r))}(h,(function(){ie("Cannot construct "+f+" due to unbound types",[n])})),dt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:Bt.prototype;var s=ct(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new gt("Use 'new' to construct "+f);if(void 0===p.constructor_body)throw new gt(f+" has no accessible constructor");var t=p.constructor_body[arguments.length];if(void 0===t)throw new gt("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),c=Object.create(o,{constructor:{value:s}});s.prototype=c;var p=new zt(f,s,c,d,r,a,u,l),y=new Zt(f,p,!0,!1,!1),v=new Zt(f+"*",p,!1,!1,!1),g=new Zt(f+" const*",p,!1,!0,!1);return At[t]={pointerType:v,constPointerType:g},function(t,e,r){i.hasOwnProperty(t)||pt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==r?i[t].overloadTable[r]=e:(i[t]=e,i[t].argCount=r)}(h,s),[y,v,g]}))},q:function(t,e,r,n,o,i){var a;e>0||z(a);var s=ae(e,r);o=re(n,o),dt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new gt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{ie("Cannot construct "+t.name+" due to unbound types",s)},dt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=se(r,n,null,o,i),[]})),[]}))},b:function(t,e,r,n,o,i,a,s){var u=ae(r,n);e=vt(e),i=re(o,i),dt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){ie("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Vt(c,e,n),c[e].overloadTable[r-2]=o),dt([],u,(function(o){var s=se(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},A:function(t,e){wt(t,{name:e=vt(e),fromWireType:function(t){var e=de.toValue(t);return le(t),e},toWireType:function(t,e){return de.toHandle(e)},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:null})},l:function(t,e,r){var n=ht(r);wt(t,{name:e=vt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ye(e,n),destructorFunction:null})},d:function(t,e,r,n,o){e=vt(e),-1===o&&(o=4294967295);var i=ht(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");wt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:ve(e,i,0!==n),destructorFunction:null})},a:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=S,r=e[t>>=2],o=e[t+1];return new n(P,o,r)}wt(t,{name:r=vt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},k:function(t,e){var r="std::string"===(e=vt(e));wt(t,{name:e,fromWireType:function(t){var e,n=S[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==$[s]){var u=j(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode($[o+a]);e=c.join("")}return We(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||mt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=De(4+n+1),a=i+4;if(S[i>>2]=n,r&&o)D(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(We(a),mt("String has UTF-16 code units that do not fit in 8 bits")),$[a+s]=u}else for(s=0;s<n;++s)$[a+s]=e[s];return null!==t&&t.push(We,i),i},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){We(t)}})},f:function(t,e,r){var n,o,i,a,s;r=vt(r),2===e?(n=me,o=we,a=be,i=()=>A,s=1):4===e&&(n=Te,o=Pe,a=Ce,i=()=>S,s=2),wt(t,{name:r,fromWireType:function(t){for(var r,o=S[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return We(t),r},toWireType:function(t,n){"string"!=typeof n&&mt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=De(4+i+e);return S[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(We,u),u},argPackAdvance:8,readValueFromPointer:rt,destructorFunction:function(t){We(t)}})},g:function(t,e,r,n,o,i){tt[t]={name:vt(e),rawConstructor:re(r,n),rawDestructor:re(o,i),fields:[]}},c:function(t,e,r,n,o,i,a,s,u,c){tt[t].fields.push({fieldName:vt(e),getterReturnType:r,getter:re(n,o),getterContext:i,setterArgumentType:a,setter:re(s,u),setterContext:c})},C:function(t,e){wt(t,{isVoid:!0,name:e=vt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},h:le,o:function(t){return 0===t?de.toHandle(_e()):(t=void 0===(r=$e[e=t])?vt(e):r,de.toHandle(_e()[t]));var e,r},m:function(t){t>4&&(ce[t].refcount+=1)},n:function(t,e,r,n){t=de.toValue(t);var o=ke[e];return o||(o=function(t){for(var e="",r=0;r<t;++r)e+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+t+"(constructor, argTypes, args) {\n var HEAPU32 = getMemory();\n";for(r=0;r<t;++r)n+="var argType"+r+" = requireRegisteredType(HEAPU32[((argTypes)>>2)], 'parameter "+r+"');\nvar arg"+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\nargTypes += 4;\n";return n+="var obj = new constructor("+e+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle","getMemory",n)(Ae,i,de.toHandle,(()=>S))}(e),ke[e]=o),o(t,r,n)},p:function(t,e){var r=(t=Ae(t,"_emval_take_value")).readValueFromPointer(e);return de.toHandle(r)},i:function(){z("")},v:function(){return 2147483648},z:function(t,e,r){$.copyWithin(t,e,e+r)},u:function(t){var e,r,n=$.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Se(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},w:function(t,e){var r=0;return Ee().forEach((function(n,o){var i=e+r;S[t+4*o>>2]=i,function(t,e,r){for(var n=0;n<t.length;++n)C[0|e++]=t.charCodeAt(n);r||(C[0|e]=0)}(n,i),r+=n.length+1})),0},x:function(t,e){var r=Ee();S[t>>2]=r.length;var n=0;return r.forEach((function(t){n+=t.length+1})),S[e>>2]=n,0},y:function(t){return 52},s:function(t,e,r,n,o){return 70},j:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=S[e>>2],s=S[e+4>>2];e+=8;for(var u=0;u<s;u++)Re(t,$[a+u]);o+=s}return S[n>>2]=o,0}},De=(function(){var t={a:je};function e(t,e){var r,n=t.exports;i.asm=n,W((T=i.asm.E).buffer),I=i.asm.G,r=i.asm.F,H.unshift(r),function(t){if(M--,i.monitorRunDependencies&&i.monitorRunDependencies(M),0==M&&(null!==B&&(clearInterval(B),B=null),V)){var e=V;V=null,e()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!m&&(p||d)){if("function"==typeof fetch&&!X(N))return fetch(N,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+N+"'";return t.arrayBuffer()})).catch((function(){return Y(N)}));if(s)return new Promise((function(t,e){s(N,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return Y(N)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(t){return t})).then(e,(function(t){b("failed to asynchronously prepare wasm: "+t),z(t)}))}if(M++,i.monitorRunDependencies&&i.monitorRunDependencies(M),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){b("Module.instantiateWasm callback failed with error: "+t),o(t)}(m||"function"!=typeof WebAssembly.instantiateStreaming||J(N)||X(N)||h||"function"!=typeof fetch?n(r):fetch(N,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)}))}))).catch(o)}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.F).apply(null,arguments)},i._malloc=function(){return(De=i._malloc=i.asm.H).apply(null,arguments)}),We=i._free=function(){return(We=i._free=i.asm.I).apply(null,arguments)},Ie=i.___getTypeName=function(){return(Ie=i.___getTypeName=i.asm.J).apply(null,arguments)},Ue=(i.__embind_initialize_bindings=function(){return(i.__embind_initialize_bindings=i.asm.K).apply(null,arguments)},i.stackSave=function(){return(Ue=i.stackSave=i.asm.L).apply(null,arguments)}),He=i.stackRestore=function(){return(He=i.stackRestore=i.asm.M).apply(null,arguments)},Le=i.stackAlloc=function(){return(Le=i.stackAlloc=i.asm.N).apply(null,arguments)},Me=i.___cxa_is_pointer_type=function(){return(Me=i.___cxa_is_pointer_type=i.asm.O).apply(null,arguments)};function Be(t){function r(){Fe||(Fe=!0,i.calledRun=!0,O||(Z(H),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),L.unshift(t);var t;Z(L)}()))}t=t||l,M>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),U.unshift(t);var t;Z(U)}(),M>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),r()}),1)):r()))}if(i.dynCall_iji=function(){return(i.dynCall_iji=i.asm.P).apply(null,arguments)},i.dynCall_jji=function(){return(i.dynCall_jji=i.asm.Q).apply(null,arguments)},i.dynCall_iiji=function(){return(i.dynCall_iiji=i.asm.R).apply(null,arguments)},i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.S).apply(null,arguments)},i.ccall=function(t,e,r,n,o){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);D(t,e=Le(r),r)}return e},array:t=>{var e=Le(t.length);return function(t,e){C.set(t,e)}(t,e),e}},s=function(t){return i["_"+t]}(t),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var f=a[r[l]];f?(0===c&&(c=Ue()),u[l]=f(n[l])):u[l]=n[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&He(c),function(t){return"string"===e?j(t):"boolean"===e?Boolean(t):t}(t)}(p)},V=function t(){Fe||Be(),Fe||(V=t)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Be(),t.ready});t.exports=o},430:(t,e,r)=>{var n,o=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,o;(t=void 0!==(t=t||{})?t:{}).ready=new Promise((function(t,r){e=t,o=r}));var i,a,s,u=Object.assign({},t),c=[],l="object"==typeof window,f="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";if(p){var h=r(280),y=r(103);d=f?y.dirname(d)+"/":"//",i=(t,e)=>(t=G(t)?new URL(t):y.normalize(t),h.readFileSync(t,e?void 0:"utf8")),s=t=>{var e=i(t,!0);return e.buffer||(e=new Uint8Array(e)),e},a=(t,e,r)=>{t=G(t)?new URL(t):y.normalize(t),h.readFile(t,(function(t,n){t?r(t):e(n.buffer)}))},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),c=process.argv.slice(2),process.on("uncaughtException",(function(t){if(!(t instanceof X))throw t})),process.on("unhandledRejection",(function(t){throw t})),t.inspect=function(){return"[Emscripten Module object]"}}else(l||f)&&(f?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},f&&(s=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=(t,e,r)=>{var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)});var v,g=t.print||console.log.bind(console),m=t.printErr||console.warn.bind(console);Object.assign(t,u),u=null,t.arguments&&(c=t.arguments),t.thisProgram&&t.thisProgram,t.quit&&t.quit,t.wasmBinary&&(v=t.wasmBinary);var w;t.noExitRuntime;"object"!=typeof WebAssembly&&B("no native wasm support detected");var b,T,P,C,$,_,A,k,S,x=!1,E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.buffer&&E)return E.decode(t.subarray(e,o));for(var i="";e<o;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var u=63&t[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&t[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function R(t,e){return t?O(P,t,e):""}function F(t,e,r){return function(t,e,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a)),s<=127){if(r>=i)break;e[r++]=s}else if(s<=2047){if(r+1>=i)break;e[r++]=192|s>>6,e[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|63&s}else{if(r+3>=i)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|63&s}}return e[r]=0,r-o}(t,P,e,r)}function j(e){b=e,t.HEAP8=T=new Int8Array(e),t.HEAP16=C=new Int16Array(e),t.HEAP32=_=new Int32Array(e),t.HEAPU8=P=new Uint8Array(e),t.HEAPU16=$=new Uint16Array(e),t.HEAPU32=A=new Uint32Array(e),t.HEAPF32=k=new Float32Array(e),t.HEAPF64=S=new Float64Array(e)}t.INITIAL_MEMORY;var D,W=[],I=[],U=[],H=0,L=null,M=null;function B(e){t.onAbort&&t.onAbort(e),m(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}var V,z,N="data:application/octet-stream;base64,";function q(t){return t.startsWith(N)}function G(t){return t.startsWith("file://")}function J(t){try{if(t==V&&v)return new Uint8Array(v);if(s)return s(t);throw"both async and sync fetching of the wasm failed"}catch(t){B(t)}}function X(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Y(e){for(;e.length>0;)e.shift()(t)}q(V="openjphjs.wasm")||(z=V,V=t.locateFile?t.locateFile(z,d):d+z);var K=[],Z=0,Q=[];function tt(t){var e=Q[t];return e||(t>=Q.length&&(Q.length=t+1),Q[t]=e=D.get(t)),e}function et(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(t){A[this.ptr+4>>2]=t},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(t){A[this.ptr+8>>2]=t},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(t){_[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,T[this.ptr+12|0]=t},this.get_caught=function(){return 0!=T[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,T[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=T[this.ptr+13|0]},this.init=function(t,e){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=_[this.ptr>>2];_[this.ptr>>2]=t+1},this.release_ref=function(){var t=_[this.ptr>>2];return _[this.ptr>>2]=t-1,1===t},this.set_adjusted_ptr=function(t){A[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Le(this.get_type()))return A[this.excPtr>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.excPtr}}var rt={};function nt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ot(t){return this.fromWireType(_[t>>2])}var it={},at={},st={},ut=48,ct=57;function lt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=ut&&e<=ct?"_"+t:t}function ft(t,e){return t=lt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function pt(t,e){var r=ft(e,(function(t){this.name=e,this.message=t;var r=new Error(t).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var dt=void 0;function ht(t){throw new dt(t)}function yt(t,e,r){function n(e){var n=r(e);n.length!==t.length&&ht("Mismatched type converter count");for(var o=0;o<t.length;++o)Tt(t[o],n[o])}t.forEach((function(t){st[t]=e}));var o=new Array(e.length),i=[],a=0;e.forEach(((t,e)=>{at.hasOwnProperty(t)?o[e]=at[t]:(i.push(t),it.hasOwnProperty(t)||(it[t]=[]),it[t].push((()=>{o[e]=at[t],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var gt=void 0;function mt(t){for(var e="",r=t;P[r];)e+=gt[P[r++]];return e}var wt=void 0;function bt(t){throw new wt(t)}function Tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||bt('type "'+n+'" must have a positive integer typeid pointer'),at.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;bt("Cannot register type '"+n+"' twice")}if(at[t]=e,delete st[t],it.hasOwnProperty(t)){var o=it[t];delete it[t],o.forEach((t=>t()))}}function Pt(t){if(!(this instanceof zt))return!1;if(!(t instanceof zt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=t.$$.ptrType.registeredClass,o=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&r===o}function Ct(t){bt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var $t=!1;function _t(t){}function At(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function kt(t,e,r){if(e===r)return t;if(void 0===r.baseClass)return null;var n=kt(t,e,r.baseClass);return null===n?null:r.downcast(n)}var St={};function xt(){return Object.keys(Dt).length}function Et(){var t=[];for(var e in Dt)Dt.hasOwnProperty(e)&&t.push(Dt[e]);return t}var Ot=[];function Rt(){for(;Ot.length;){var t=Ot.pop();t.$$.deleteScheduled=!1,t.delete()}}var Ft=void 0;function jt(t){Ft=t,Ot.length&&Ft&&Ft(Rt)}var Dt={};function Wt(t,e){return e=function(t,e){for(void 0===e&&bt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Dt[e]}function It(t,e){return e.ptrType&&e.ptr||ht("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&ht("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ht(Object.create(t,{$$:{value:e}}))}function Ut(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Wt(this.registeredClass,e);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function o(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i,a=this.registeredClass.getActualType(e),s=St[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=kt(e,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?It(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:t}):It(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ht(t){return"undefined"==typeof FinalizationRegistry?(Ht=t=>t,t):($t=new FinalizationRegistry((t=>{At(t.$$)})),Ht=t=>{var e=t.$$;if(e.smartPtr){var r={$$:e};$t.register(t,r,t)}return t},_t=t=>$t.unregister(t),Ht(t))}function Lt(){if(this.$$.ptr||Ct(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Ht(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Mt(){this.$$.ptr||Ct(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),_t(this),At(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Bt(){return!this.$$.ptr}function Vt(){return this.$$.ptr||Ct(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Ot.push(this),1===Ot.length&&Ft&&Ft(Rt),this.$$.deleteScheduled=!0,this}function zt(){}function Nt(t,e,r){if(void 0===t[e].overloadTable){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||bt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}}function qt(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&bt("Cannot register public name '"+e+"' twice"),Nt(t,e,e),t.hasOwnProperty(n)&&bt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}function Gt(t,e,r,n,o,i,a,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Jt(t,e,r){for(;e!==r;)e.upcast||bt("Expected null or instance of "+r.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function Xt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ve(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name);var r=e.$$.ptrType.registeredClass;return Jt(e.$$.ptr,r,this.registeredClass)}function Yt(t,e){var r;if(null===e)return this.isReference&&bt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,r),r):0;e.$$||bt('Cannot pass "'+ve(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;if(r=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&bt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:bt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var o=e.clone();r=this.rawShare(r,ye.toHandle((function(){o.delete()}))),null!==t&&t.push(this.rawDestructor,r)}break;default:bt("Unsupporting sharing policy")}return r}function Kt(t,e){if(null===e)return this.isReference&&bt("null is not a valid "+this.name),0;e.$$||bt('Cannot pass "'+ve(e)+'" as a '+this.name),e.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&bt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;return Jt(e.$$.ptr,r,this.registeredClass)}function Zt(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Qt(t){this.rawDestructor&&this.rawDestructor(t)}function te(t){null!==t&&t.delete()}function ee(t,e,r,n,o,i,a,s,u,c,l){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Yt:n?(this.toWireType=Xt,this.destructorFunction=null):(this.toWireType=Kt,this.destructorFunction=null)}function re(e,r,n){t.hasOwnProperty(e)||ht("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}function ne(e,r,n){return e.includes("j")?function(e,r,n){var o=t["dynCall_"+e];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(e,r,n):tt(r).apply(null,n)}function oe(t,e){var r,n,o,i=(t=mt(t)).includes("j")?(r=t,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),ne(r,n,o)}):tt(e);return"function"!=typeof i&&bt("unknown function pointer with signature "+t+": "+e),i}var ie=void 0;function ae(t){var e=je(t),r=mt(e);return Fe(e),r}function se(t,e){var r=[],n={};throw e.forEach((function t(e){n[e]||at[e]||(st[e]?st[e].forEach(t):(r.push(e),n[e]=!0))})),new ie(t+": "+r.map(ae).join([", "]))}function ue(t,e){for(var r=[],n=0;n<t;n++)r.push(A[e+4*n>>2]);return r}function ce(t,e,r,n,o){var i=e.length;i<2&&bt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==e[1]&&null!==r,s=!1,u=1;u<e.length;++u)if(null!==e[u]&&void 0===e[u].destructorFunction){s=!0;break}var c="void"!==e[0].name,l="",f="";for(u=0;u<i-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+lt(t)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],y=[bt,n,o,nt,e[0],e[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<i-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+e[u+2].name+"\n",h.push("argType"+u),y.push(e[u+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<e.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==e[u].destructorFunction&&(p+=v+"_dtor("+v+"); // "+e[u].name+"\n",h.push(v+"_dtor"),y.push(e[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",h.push(p),function(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var r=ft(t.name||"unknownFunctionName",(function(){}));r.prototype=t.prototype;var n=new r,o=t.apply(n,e);return o instanceof Object?o:n}(Function,h).apply(null,y)}var le=[],fe=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function pe(t){t>4&&0==--fe[t].refcount&&(fe[t]=void 0,le.push(t))}function de(){for(var t=0,e=5;e<fe.length;++e)void 0!==fe[e]&&++t;return t}function he(){for(var t=5;t<fe.length;++t)if(void 0!==fe[t])return fe[t];return null}var ye={toValue:t=>(t||bt("Cannot use deleted val. handle = "+t),fe[t].value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=le.length?le.pop():fe.length;return fe[e]={refcount:1,value:t},e}}};function ve(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ge(t,e){switch(e){case 2:return function(t){return this.fromWireType(k[t>>2])};case 3:return function(t){return this.fromWireType(S[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function me(t,e,r){switch(e){case 0:return r?function(t){return T[t]}:function(t){return P[t]};case 1:return r?function(t){return C[t>>1]}:function(t){return $[t>>1]};case 2:return r?function(t){return _[t>>2]}:function(t){return A[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var we="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function be(t,e){for(var r=t,n=r>>1,o=n+e/2;!(n>=o)&&$[n];)++n;if((r=n<<1)-t>32&&we)return we.decode(P.subarray(t,r));for(var i="",a=0;!(a>=e/2);++a){var s=C[t+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Te(t,e,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=e,o=(r-=2)<2*t.length?r/2:t.length,i=0;i<o;++i){var a=t.charCodeAt(i);C[e>>1]=a,e+=2}return C[e>>1]=0,e-n}function Pe(t){return 2*t.length}function Ce(t,e){for(var r=0,n="";!(r>=e/4);){var o=_[t+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function $e(t,e,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var a=t.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++i)),_[e>>2]=a,(e+=4)+4>o)break}return _[e>>2]=0,e-n}function _e(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e}function Ae(t){try{return w.grow(t-b.byteLength+65535>>>16),j(w.buffer),1}catch(t){}}var ke=[null,[],[]];function Se(t,e){var r=ke[t];0===e||10===e?((1===t?g:m)(O(r,0)),r.length=0):r.push(e)}dt=t.InternalError=pt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);gt=t}(),wt=t.BindingError=pt(Error,"BindingError"),zt.prototype.isAliasOf=Pt,zt.prototype.clone=Lt,zt.prototype.delete=Mt,zt.prototype.isDeleted=Bt,zt.prototype.deleteLater=Vt,t.getInheritedInstanceCount=xt,t.getLiveInheritedInstances=Et,t.flushPendingDeletes=Rt,t.setDelayFunction=jt,ee.prototype.getPointee=Zt,ee.prototype.destructor=Qt,ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=ot,ee.prototype.deleteObject=te,ee.prototype.fromWireType=Ut,ie=t.UnboundTypeError=pt(Error,"UnboundTypeError"),t.count_emval_handles=de,t.get_first_emval=he;var xe,Ee={L:function(t){var e=new et(t);return e.get_caught()||e.set_caught(!0),e.set_rethrown(!1),K.push(e),function(t){t.add_ref()}(e),e.get_exception_ptr()},v:function(){_setThrew(0),function(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&tt(e)(t.excPtr),Re(t.excPtr)}}(K.pop()),Z=0},c:function(){var t=Z;if(!t)return De(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return De(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(He(o,r,i))return De(o),t}return De(r),t},k:function(){var t=Z;if(!t)return De(0),0;var e=new et(t);e.set_adjusted_ptr(t);var r=e.get_type();if(!r)return De(0),t;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=e.ptr+16;if(He(o,r,i))return De(o),t}return De(r),t},i:function(t,e,r){throw new et(t).init(e,r),Z=t,t},f:function(t){throw Z||(Z=t),t},A:function(t){var e=rt[t];delete rt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields;yt([t],o.map((t=>t.getterReturnType)).concat(o.map((t=>t.setterArgumentType))),(t=>{var i={};return o.forEach(((e,r)=>{var n=e.fieldName,a=t[r],s=e.getter,u=e.getterContext,c=t[r+o.length],l=e.setter,f=e.setterContext;i[n]={read:t=>a.fromWireType(s(u,t)),write:(t,e)=>{var r=[];l(f,t,c.toWireType(r,e)),nt(r)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var r in i)e[r]=i[r].read(t);return n(t),e},toWireType:function(t,e){for(var o in i)if(!(o in e))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,e[o]);return null!==t&&t.push(n,a),a},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:n}]}))},D:function(t,e,r,n,o){},I:function(t,e,r,n,o){var i=vt(r);Tt(t,{name:e=mt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:o},argPackAdvance:8,readValueFromPointer:function(t){var n;if(1===r)n=T;else if(2===r)n=C;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+e);n=_}return this.fromWireType(n[t>>i])},destructorFunction:null})},y:function(t,e,r,n,o,i,a,s,u,c,l,f,p){l=mt(l),i=oe(o,i),s&&(s=oe(a,s)),c&&(c=oe(u,c)),p=oe(f,p);var d=lt(l);qt(d,(function(){se("Cannot construct "+l+" due to unbound types",[n])})),yt([t,e,r],n?[n]:[],(function(e){var r,o;e=e[0],o=n?(r=e.registeredClass).instancePrototype:zt.prototype;var a=ft(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new wt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new wt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new wt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var f=new Gt(l,a,u,p,r,i,s,c),h=new ee(l,f,!0,!1,!1),y=new ee(l+"*",f,!1,!1,!1),v=new ee(l+" const*",f,!1,!0,!1);return St[t]={pointerType:y,constPointerType:v},re(d,a),[h,y,v]}))},x:function(t,e,r,n,o,i){var a;e>0||B(a);var s=ue(e,r);o=oe(n,o),yt([],[t],(function(t){var r="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new wt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=()=>{se("Cannot construct "+t.name+" due to unbound types",s)},yt([],s,(function(n){return n.splice(1,0,null),t.registeredClass.constructor_body[e-1]=ce(r,n,null,o,i),[]})),[]}))},a:function(t,e,r,n,o,i,a,s){var u=ue(r,n);e=mt(e),i=oe(o,i),yt([],[t],(function(t){var n=(t=t[0]).name+"."+e;function o(){se("Cannot call "+n+" due to unbound types",u)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===r-2?(o.argCount=r-2,o.className=t.name,c[e]=o):(Nt(c,e,n),c[e].overloadTable[r-2]=o),yt([],u,(function(o){var s=ce(n,o,t,i,a);return void 0===c[e].overloadTable?(s.argCount=r-2,c[e]=s):c[e].overloadTable[r-2]=s,[]})),[]}))},H:function(t,e){Tt(t,{name:e=mt(e),fromWireType:function(t){var e=ye.toValue(t);return pe(t),e},toWireType:function(t,e){return ye.toHandle(e)},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:null})},u:function(t,e,r){var n=vt(r);Tt(t,{name:e=mt(e),fromWireType:function(t){return t},toWireType:function(t,e){return e},argPackAdvance:8,readValueFromPointer:ge(e,n),destructorFunction:null})},o:function(t,e,r,n,o,i){var a=ue(e,r);t=mt(t),o=oe(n,o),qt(t,(function(){se("Cannot call "+t+" due to unbound types",a)}),e-1),yt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return re(t,ce(t,n,null,o,i),e-1),[]}))},h:function(t,e,r,n,o){e=mt(e),-1===o&&(o=4294967295);var i=vt(r),a=t=>t;if(0===n){var s=32-8*r;a=t=>t<<s>>>s}var u=e.includes("unsigned");Tt(t,{name:e,fromWireType:a,toWireType:u?function(t,e){return this.name,e>>>0}:function(t,e){return this.name,e},argPackAdvance:8,readValueFromPointer:me(e,i,0!==n),destructorFunction:null})},d:function(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(t){var e=A,r=e[t>>=2],o=e[t+1];return new n(b,o,r)}Tt(t,{name:r=mt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},t:function(t,e){var r="std::string"===(e=mt(e));Tt(t,{name:e,fromWireType:function(t){var e,n=A[t>>2],o=t+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==P[s]){var u=R(i,s-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=s+1}}else{var c=new Array(n);for(a=0;a<n;++a)c[a]=String.fromCharCode(P[o+a]);e=c.join("")}return Fe(t),e},toWireType:function(t,e){var n;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var o="string"==typeof e;o||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||bt("Cannot pass non-string to std::string"),n=r&&o?function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e}(e):e.length;var i=Oe(4+n+1),a=i+4;if(A[i>>2]=n,r&&o)F(e,a,n+1);else if(o)for(var s=0;s<n;++s){var u=e.charCodeAt(s);u>255&&(Fe(a),bt("String has UTF-16 code units that do not fit in 8 bits")),P[a+s]=u}else for(s=0;s<n;++s)P[a+s]=e[s];return null!==t&&t.push(Fe,i),i},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Fe(t)}})},q:function(t,e,r){var n,o,i,a,s;r=mt(r),2===e?(n=be,o=Te,a=Pe,i=()=>$,s=1):4===e&&(n=Ce,o=$e,a=_e,i=()=>A,s=2),Tt(t,{name:r,fromWireType:function(t){for(var r,o=A[t>>2],a=i(),u=t+4,c=0;c<=o;++c){var l=t+4+c*e;if(c==o||0==a[l>>s]){var f=n(u,l-u);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),u=l+e}}return Fe(t),r},toWireType:function(t,n){"string"!=typeof n&&bt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Oe(4+i+e);return A[u>>2]=i>>s,o(n,u+4,i+e),null!==t&&t.push(Fe,u),u},argPackAdvance:8,readValueFromPointer:ot,destructorFunction:function(t){Fe(t)}})},p:function(t,e,r,n,o,i){rt[t]={name:mt(e),rawConstructor:oe(r,n),rawDestructor:oe(o,i),fields:[]}},B:function(t,e,r,n,o,i,a,s,u,c){rt[t].fields.push({fieldName:mt(e),getterReturnType:r,getter:oe(n,o),getterContext:i,setterArgumentType:a,setter:oe(s,u),setterContext:c})},J:function(t,e){Tt(t,{isVoid:!0,name:e=mt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},N:pe,O:function(t){t>4&&(fe[t].refcount+=1)},n:function(t,e){var r,n,o;n="_emval_take_value",void 0===(o=at[r=t])&&bt(n+" has unknown type "+ae(r));var i=(t=o).readValueFromPointer(e);return ye.toHandle(i)},r:function(){B("")},G:function(t,e,r){P.copyWithin(t,e,e+r)},E:function(t){var e,r,n=P.length,o=2147483648;if((t>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,t+100663296),Ae(Math.min(o,(e=Math.max(t,a))+((r=65536)-e%r)%r)))return!0}return!1},F:function(t){return 52},C:function(t,e,r,n,o){return 70},s:function(t,e,r,n){for(var o=0,i=0;i<r;i++){var a=A[e>>2],s=A[e+4>>2];e+=8;for(var u=0;u<s;u++)Se(t,P[a+u]);o+=s}return A[n>>2]=o,0},b:function(t,e){var r=We();try{return tt(t)(e)}catch(t){if(Ie(r),t!==t+0)throw t;_setThrew(1,0)}},z:function(t,e,r){var n=We();try{return tt(t)(e,r)}catch(t){if(Ie(n),t!==t+0)throw t;_setThrew(1,0)}},w:function(t,e,r,n){var o=We();try{return tt(t)(e,r,n)}catch(t){if(Ie(o),t!==t+0)throw t;_setThrew(1,0)}},e:function(t,e){var r=We();try{tt(t)(e)}catch(t){if(Ie(r),t!==t+0)throw t;_setThrew(1,0)}},l:function(t,e,r){var n=We();try{tt(t)(e,r)}catch(t){if(Ie(n),t!==t+0)throw t;_setThrew(1,0)}},m:function(t,e,r,n){var o=We();try{tt(t)(e,r,n)}catch(t){if(Ie(o),t!==t+0)throw t;_setThrew(1,0)}},j:function(t,e,r,n,o){var i=We();try{tt(t)(e,r,n,o)}catch(t){if(Ie(i),t!==t+0)throw t;_setThrew(1,0)}},K:function(t,e,r,n,o,i,a){var s=We();try{tt(t)(e,r,n,o,i,a)}catch(t){if(Ie(s),t!==t+0)throw t;_setThrew(1,0)}},g:function(t,e,r,n,o,i,a,s,u,c,l){var f=We();try{tt(t)(e,r,n,o,i,a,s,u,c,l)}catch(t){if(Ie(f),t!==t+0)throw t;_setThrew(1,0)}},M:function(t){return t}},Oe=(function(){var e={a:Ee};function r(e,r){var n,o=e.exports;t.asm=o,j((w=t.asm.P).buffer),D=t.asm.T,n=t.asm.Q,I.unshift(n),function(e){if(H--,t.monitorRunDependencies&&t.monitorRunDependencies(H),0==H&&(null!==L&&(clearInterval(L),L=null),M)){var r=M;M=null,r()}}()}function n(t){r(t.instance)}function i(t){return function(){if(!v&&(l||f)){if("function"==typeof fetch&&!G(V))return fetch(V,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+V+"'";return t.arrayBuffer()})).catch((function(){return J(V)}));if(a)return new Promise((function(t,e){a(V,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return J(V)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(t){return t})).then(t,(function(t){m("failed to asynchronously prepare wasm: "+t),B(t)}))}if(H++,t.monitorRunDependencies&&t.monitorRunDependencies(H),t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(t){m("Module.instantiateWasm callback failed with error: "+t),o(t)}(v||"function"!=typeof WebAssembly.instantiateStreaming||q(V)||G(V)||p||"function"!=typeof fetch?i(n):fetch(V,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(t){return m("wasm streaming compile failed: "+t),m("falling back to ArrayBuffer instantiation"),i(n)}))}))).catch(o)}(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.Q).apply(null,arguments)},t._malloc=function(){return(Oe=t._malloc=t.asm.R).apply(null,arguments)}),Re=t.___cxa_free_exception=function(){return(Re=t.___cxa_free_exception=t.asm.S).apply(null,arguments)},Fe=t._free=function(){return(Fe=t._free=t.asm.U).apply(null,arguments)},je=t.___getTypeName=function(){return(je=t.___getTypeName=t.asm.V).apply(null,arguments)},De=(t.__embind_initialize_bindings=function(){return(t.__embind_initialize_bindings=t.asm.W).apply(null,arguments)},t.setTempRet0=function(){return(De=t.setTempRet0=t.asm.X).apply(null,arguments)}),We=t.stackSave=function(){return(We=t.stackSave=t.asm.Y).apply(null,arguments)},Ie=t.stackRestore=function(){return(Ie=t.stackRestore=t.asm.Z).apply(null,arguments)},Ue=t.stackAlloc=function(){return(Ue=t.stackAlloc=t.asm._).apply(null,arguments)},He=t.___cxa_can_catch=function(){return(He=t.___cxa_can_catch=t.asm.$).apply(null,arguments)},Le=t.___cxa_is_pointer_type=function(){return(Le=t.___cxa_is_pointer_type=t.asm.aa).apply(null,arguments)};function Me(r){function n(){xe||(xe=!0,t.calledRun=!0,x||(Y(I),e(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),function(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),U.unshift(e);var e;Y(U)}()))}r=r||c,H>0||(function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),W.unshift(e);var e;Y(W)}(),H>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),n()}),1)):n()))}if(t.dynCall_ji=function(){return(t.dynCall_ji=t.asm.ba).apply(null,arguments)},t.dynCall_iiji=function(){return(t.dynCall_iiji=t.asm.ca).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.da).apply(null,arguments)},t.ccall=function(e,r,n,o,i){var a={string:t=>{var e=0;if(null!=t&&0!==t){var r=1+(t.length<<2);F(t,e=Ue(r),r)}return e},array:t=>{var e=Ue(t.length);return function(t,e){T.set(t,e)}(t,e),e}},s=function(e){return t["_"+e]}(e),u=[],c=0;if(o)for(var l=0;l<o.length;l++){var f=a[n[l]];f?(0===c&&(c=We()),u[l]=f(o[l])):u[l]=o[l]}var p=s.apply(null,u);return p=function(t){return 0!==c&&Ie(c),function(t){return"string"===r?R(t):"boolean"===r?Boolean(t):t}(t)}(p)},M=function t(){xe||Me(),xe||(M=t)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();return Me(),t.ready});t.exports=o},716:()=>{},401:()=>{},491:()=>{},33:()=>{},261:()=>{},926:()=>{},280:()=>{},103:()=>{}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t].call(i.exports,i,i.exports,o),i.exports}o.m=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&r;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>r[t]));return a.default=()=>r,o.d(i,a),i},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,r)=>(o.f[r](t,e),e)),[])),o.u=t=>t+".min.worker.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!t;)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={362:1};o.f.i=(e,r)=>{t[e]||importScripts(o.p+o.u(e))};var e=self.webpackChunk=self.webpackChunk||[],r=e.push.bind(e);e.push=e=>{var[n,i,a]=e;for(var s in i)o.o(i,s)&&(o.m[s]=i[s]);for(a&&a(o);n.length;)t[n.pop()]=1;r(e)}})(),(()=>{"use strict";const t={};let e,r=!1;function n(n){if(t[n.taskType])return console.log('attempt to register duplicate task handler "',n.taskType,'"'),!1;t[n.taskType]=n,r&&n.initialize(e.taskConfiguration)}self.onmessage=async function(o){if(o.data.taskType)if("initialize"!==o.data.taskType){if("loadWebWorkerTask"===o.data.taskType)return i=o.data,e=i.config,void self.importScripts(i.sourcePath);var i;if(t[o.data.taskType])try{await t[o.data.taskType].handler(o.data,(function(t,e){self.postMessage({taskType:o.data.taskType,status:"success",result:t,workerIndex:o.data.workerIndex},e)}))}catch(t){console.log(`task ${o.data.taskType} failed - ${t.message}`,t),self.postMessage({taskType:o.data.taskType,status:"failed",result:t.message,workerIndex:o.data.workerIndex})}else console.log("no task handler for ",o.data.taskType),console.log(t),self.postMessage({taskType:o.data.taskType,status:"failed - no task handler registered",workerIndex:o.data.workerIndex})}else!function(o){if(!r){if(e=o.config,self.registerTaskHandler=n,o.config.webWorkerTaskPaths)for(let t=0;t<o.config.webWorkerTaskPaths.length;t++)self.importScripts(o.config.webWorkerTaskPaths[t]);Object.keys(t).forEach((function(r){t[r].initialize(e.taskConfiguration)})),self.postMessage({taskType:"initialize",status:"success",result:{},workerIndex:o.workerIndex}),r=!0}}(o.data);else console.log(o.data)};var i=o(272),a=o.n(i);const s=o.p+"031089e563a18ada8441.wasm",u={codec:void 0,decoder:void 0,decodeConfig:{}};function c(t){if(u.decodeConfig=t,u.codec)return Promise.resolve();const e=a()({locateFile:t=>t.endsWith(".wasm")?s.toString():t});return new Promise(((t,r)=>{e.then((e=>{u.codec=e,u.decoder=new e.J2KDecoder,t()}),r)}))}const l=async function(t,e){await c();const r=u.decoder,n=r.getEncodedBuffer(t.length);n.set(t),r.decode();const o=r.getFrameInfo(),i=r.getDecodedBuffer();new Uint8Array(i.length).set(i);const a=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,s=r.getNumDecompositions(),l=r.getNumLayers(),f=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],p=r.getIsReversible(),d=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,h=`${r.getTileSize().width} x ${r.getTileSize().height}`,y=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,v=r.getColorSpace(),g=`${i.length.toLocaleString()} bytes`,m=`${(i.length/n.length).toFixed(2)}:1`,w={columns:o.width,rows:o.height,bitsPerPixel:o.bitsPerSample,signed:o.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:o.componentCount},b=function(t,e){if(t.bitsPerSample>8)return t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(t.isSigned)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(o,i),T={imageOffset:a,numDecompositions:s,numLayers:l,progessionOrder:f,reversible:p,blockDimensions:d,tileSize:h,tileOffset:y,colorTransform:v,decodedSize:g,compressionRatio:m};return{...e,pixelData:b,imageInfo:w,encodeOptions:T,...T,...w}};var f=o(37),p=o.n(f);const d=o.p+"5004fdc02f329ce53b69.wasm",h={codec:void 0,decoder:void 0,decodeConfig:{}};function y(t){if(h.decodeConfig=t,h.codec)return Promise.resolve();const e=p()({locateFile:t=>t.endsWith(".wasm")?d.toString():t});return new Promise(((t,r)=>{e.then((e=>{h.codec=e,h.decoder=new e.JpegLSDecoder,t()}),r)}))}const v=async function(t,e){try{await y();const r=h.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getInterleaveMode(),i=r.getNearLossless(),a=r.getDecodedBuffer(),s={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},u=function(t,e,r){if(t.bitsPerSample>8)return r?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(r)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,a,e.signed),c={nearLossless:i,interleaveMode:o,frameInfo:n};return{...e,pixelData:u,imageInfo:s,encodeOptions:c,...c,...s}}catch(t){throw"number"==typeof(r=t)?h.codec.getExceptionMessage(r):r}var r};const g=function(t){let e,r=t[0],n=t[0];const o=t.length;for(let i=1;i<o;i++)e=t[i],r=Math.min(r,e),n=Math.max(n,e);return{min:r,max:n}};function m(t){return"number"==typeof t}const w=async function(t,e){let r=e.buffer,n=e.byteOffset;const o=e.length;return 16===t.bitsAllocated?(n%2&&(r=r.slice(n),n=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(r,n,o/2):t.pixelData=new Int16Array(r,n,o/2)):8===t.bitsAllocated||1===t.bitsAllocated?t.pixelData=e:32===t.bitsAllocated&&(n%2&&(r=r.slice(n),n=0),t.pixelData=new Float32Array(r,n,o/4)),t};const b=async function(t,e){if(16===t.bitsAllocated){let n=e.buffer,o=e.byteOffset;const i=e.length;o%2&&(n=n.slice(o),o=0),0===t.pixelRepresentation?t.pixelData=new Uint16Array(n,o,i/2):t.pixelData=new Int16Array(n,o,i/2);for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=(255&(r=t.pixelData[e]))<<8|r>>8&255}else 8===t.bitsAllocated&&(t.pixelData=e);var r;return t};const T=async function(t,e){if(8===t.bitsAllocated)return t.planarConfiguration?function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let t=0;t<c;++t){u=t*n;let e=i.getInt32(4*(t+1),!0),o=i.getInt32(4*(t+2),!0);0===o&&(o=r.length);const l=n*c;for(;e<o;){const t=a[e++];if(t>=0&&t<=127)for(let r=0;r<t+1&&u<l;++r)s[u]=a[e++],u++;else if(t<=-1&&t>=-127){const r=a[e++];for(let e=0;e<1-t&&u<l;++e)s[u]=r,u++}}}return t.pixelData=new Uint8Array(o),t}(t,e):function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o);let u=0;const c=i.getInt32(0,!0);for(let e=0;e<c;++e){u=e;let o=i.getInt32(4*(e+1),!0),l=i.getInt32(4*(e+2),!0);0===l&&(l=r.length);const f=n*c;for(;o<l;){const e=a[o++];if(e>=0&&e<=127)for(let r=0;r<e+1&&u<f;++r)s[u]=a[o++],u+=t.samplesPerPixel;else if(e<=-1&&e>=-127){const r=a[o++];for(let n=0;n<1-e&&u<f;++n)s[u]=r,u+=t.samplesPerPixel}}}return t.pixelData=new Uint8Array(o),t}(t,e);if(16===t.bitsAllocated)return function(t,e){const r=e,n=t.rows*t.columns,o=new ArrayBuffer(n*t.samplesPerPixel*2),i=new DataView(r.buffer,r.byteOffset),a=new Int8Array(r.buffer,r.byteOffset),s=new Int8Array(o),u=i.getInt32(0,!0);for(let t=0;t<u;++t){let e=0;const o=0===t?1:0;let u=i.getInt32(4*(t+1),!0),c=i.getInt32(4*(t+2),!0);for(0===c&&(c=r.length);u<c;){const t=a[u++];if(t>=0&&t<=127)for(let r=0;r<t+1&&e<n;++r)s[2*e+o]=a[u++],e++;else if(t<=-1&&t>=-127){const r=a[u++];for(let i=0;i<1-t&&e<n;++i)s[2*e+o]=r,e++}}}0===t.pixelRepresentation?t.pixelData=new Uint16Array(o):t.pixelData=new Int16Array(o);return t}(t,e);throw new Error("unsupported pixel format for RLE")};var P=o(851),C=o.n(P);const $=o.p+"c22b37c3488e1d6c3aa4.wasm",_={codec:void 0,decoder:void 0};const A=async function(t,e){await function(){if(_.codec)return Promise.resolve();const t=C()({locateFile:t=>t.endsWith(".wasm")?$.toString():t});return new Promise(((e,r)=>{t.then((t=>{_.codec=t,_.decoder=new t.JPEGDecoder,e()}),r)}))}();const r=_.decoder;r.getEncodedBuffer(t.length).set(t),r.decode();const n=r.getFrameInfo(),o=r.getDecodedBuffer(),i={columns:n.width,rows:n.height,bitsPerPixel:n.bitsPerSample,signed:e.signed,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:n.componentCount},a=function(t,e){if(t.isSigned)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(n,o),s={frameInfo:n};return{...e,pixelData:a,imageInfo:i,encodeOptions:s,...s,...i}},k={JpegImage:void 0,decodeConfig:{}};const S=async function(t,e){if(await function(t){return k.decodeConfig=t,k.JpegImage?Promise.resolve():new Promise(((t,e)=>{o.e(945).then(o.t.bind(o,945,23)).then((({JpegImage:e})=>{k.JpegImage=e,t()}),e)}))}(),void 0===k.JpegImage)throw new Error("No JPEG Baseline decoder loaded");const r=new k.JpegImage;return r.parse(e),r.colorTransform=!1,8===t.bitsAllocated?(t.pixelData=r.getData(t.columns,t.rows),t):16===t.bitsAllocated?(t.pixelData=r.getData16(t.columns,t.rows),t):void 0},x={jpeg:void 0,decodeConfig:{}};const E=async function(t,e){if(await function(t){return x.decodeConfig=t,x.jpeg?Promise.resolve():new Promise(((t,e)=>{o.e(610).then(o.t.bind(o,610,23)).then((e=>{x.jpeg=e,t()}),e)}))}(),void 0===x.jpeg||void 0===x.jpeg.lossless||void 0===x.jpeg.lossless.Decoder)throw new Error("No JPEG Lossless decoder loaded");const r=t.bitsAllocated<=8?1:2,n=e.buffer,i=(new x.jpeg.lossless.Decoder).decode(n,e.byteOffset,e.length,r);return 0===t.pixelRepresentation?16===t.bitsAllocated?(t.pixelData=new Uint16Array(i.buffer),t):(t.pixelData=new Uint8Array(i.buffer),t):(t.pixelData=new Int16Array(i.buffer),t)};var O=o(430),R=o.n(O);const F=o.p+"20fc4c659b85ccd2a9c0.wasm",j={codec:void 0,decoder:void 0,decodeConfig:{}};const D=async function(t,e){await function(t){if(j.decodeConfig=t,j.codec)return Promise.resolve();const e=R()({locateFile:t=>t.endsWith(".wasm")?F:t});return new Promise(((t,r)=>{e.then((e=>{j.codec=e,j.decoder=new e.HTJ2KDecoder,t()}),r)}))}();const r=new j.codec.HTJ2KDecoder,n=r.getEncodedBuffer(t.length);n.set(t);const o=e.decodeLevel||0;r.decodeSubResolution(o);const i=r.getFrameInfo();if(e.decodeLevel>0){const{width:t,height:r}=function(t,e,r){const n={width:e,height:r};for(;t>0;)n.width=Math.ceil(n.width/2),n.height=Math.ceil(n.height/2),t--;return n}(e.decodeLevel,i.width,i.height);i.width=t,i.height=r}const a=r.getDecodedBuffer();new Uint8Array(a.length).set(a);const s=`x: ${r.getImageOffset().x}, y: ${r.getImageOffset().y}`,u=r.getNumDecompositions(),c=r.getNumLayers(),l=["unknown","LRCP","RLCP","RPCL","PCRL","CPRL"][r.getProgressionOrder()+1],f=r.getIsReversible(),p=`${r.getBlockDimensions().width} x ${r.getBlockDimensions().height}`,d=`${r.getTileSize().width} x ${r.getTileSize().height}`,h=`${r.getTileOffset().x}, ${r.getTileOffset().y}`,y=`${a.length.toLocaleString()} bytes`,v=`${(a.length/n.length).toFixed(2)}:1`,g={columns:i.width,rows:i.height,bitsPerPixel:i.bitsPerSample,signed:i.isSigned,bytesPerPixel:e.bytesPerPixel,componentsPerPixel:i.componentCount};let m=function(t,e){if(t.bitsPerSample>8)return t.isSigned?new Int16Array(e.buffer,e.byteOffset,e.byteLength/2):new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(t.isSigned)return new Int8Array(e.buffer,e.byteOffset,e.byteLength);return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}(i,a);const{buffer:w,byteOffset:b,byteLength:T}=m,P=w.slice(b,b+T);m=new m.constructor(P);const C={imageOffset:s,numDecompositions:u,numLayers:c,progessionOrder:l,reversible:f,blockDimensions:p,tileSize:d,tileOffset:h,decodedSize:y,compressionRatio:v};return{...e,pixelData:m,imageInfo:g,encodeOptions:C,...C,...g}};const W={bilinear:function(t,e){const{rows:r,columns:n,data:o}=t,{rows:i,columns:a,data:s}=e,u=[],c=[],l=[];for(let t=0;t<a;t++){const e=t*(n-1)/(a-1);u[t]=Math.floor(e),c[t]=Math.min(u[t]+1,n-1),l[t]=e-u[t]}for(let t=0;t<i;t++){const e=t*(r-1)/(i-1),f=Math.floor(e)*n,p=Math.min(f+n,(r-1)*n),d=e-Math.floor(e),h=1-d,y=t*a;for(let t=0;t<a;t++){const e=o[f+u[t]],r=o[f+c[t]],n=o[p+u[t]],i=o[p+c[t]],a=1-l[t];s[y+t]=(e*a+r*l[t])*h+(n*a+i*l[t])*d}}return s},replicate:function(t,e){const{rows:r,columns:n,pixelData:o,samplesPerPixel:i=1}=t,{rows:a,columns:s,pixelData:u}=e,c=[];for(let t=0;t<s;t++){const e=t*(n-1)/(s-1);c[t]=Math.floor(e)*i}for(let t=0;t<a;t++){const e=t*(r-1)/(a-1),l=Math.floor(e)*n*i,f=t*s;for(let t=0;t<s;t++)for(let e=0;e<i;e++)u[f+t+e]=o[l+c[t]+e]}return u}};function I(t,e,r){const n=function(t,e){let r;return Number.isInteger(t)&&Number.isInteger(e)&&(t>=0?e<=255?r=Uint8Array:e<=65535&&(r=Uint16Array):t>=-128&&e<=127?r=Int8Array:t>=-32768&&e<=32767&&(r=Int16Array)),r||Float32Array}(t,e),o=new n(r.pixelData.length);return o.set(r.pixelData,0),o}function U(t){if(!t)throw new Error("options.preScale.scalingParameters must be defined if preScale.enabled is true, and scalingParameters cannot be derived from the metadata providers.")}const H=async function(t,e,r,n,o,i){const a=(new Date).getTime();let s,u=null;switch(e){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.1.99":u=w(t,r);break;case"1.2.840.10008.1.2.2":u=b(t,r);break;case"1.2.840.10008.1.2.5":u=T(t,r);break;case"1.2.840.10008.1.2.4.50":s={...t},u=A(r,s);break;case"1.2.840.10008.1.2.4.51":u=S(t,r);break;case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":u=E(t,r);break;case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":s={signed:1===t.pixelRepresentation,bytesPerPixel:t.bitsAllocated<=8?1:2,...t},u=v(r,s);break;case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":s={...t},u=l(r,s);break;case"3.2.840.10008.1.2.4.96":case"1.2.840.10008.1.2.4.201":case"1.2.840.10008.1.2.4.202":case"1.2.840.10008.1.2.4.203":s={...t},u=D(r,s);break;default:throw new Error(`no decoder for transfer syntax ${e}`)}if(!u)throw new Error("decodePromise not defined");const c=function(t,e,r,n){const{use16BitDataType:o}=n||{},i=void 0!==t.pixelRepresentation&&1===t.pixelRepresentation,a=i&&void 0!==t.bitsStored?32-t.bitsStored:void 0;if(i&&void 0!==a)for(let e=0;e<t.pixelData.length;e++)t.pixelData[e]=t.pixelData[e]<<a>>a;let s=t.pixelData;t.pixelDataLength=t.pixelData.length;const{min:u,max:c}=g(t.pixelData),l={Uint8Array,Uint16Array:o?Uint16Array:void 0,Int16Array:o?Int16Array:void 0,Float32Array},f=e.targetBuffer?.type,p=void 0===e.allowFloatRendering||e.allowFloatRendering,d=!(m=t.photometricInterpretation,"RGB"!==m&&"PALETTE COLOR"!==m&&"YBR_FULL"!==m&&"YBR_FULL_422"!==m&&"YBR_PARTIAL_422"!==m&&"YBR_PARTIAL_420"!==m&&"YBR_RCT"!==m&&"YBR_ICT"!==m||void 0!==e.targetBuffer?.offset),h=e.preScale?.enabled,y=h&&Object.values(e.preScale.scalingParameters).some((t=>"number"==typeof t&&!Number.isInteger(t))),v=!e.preScale.enabled||!p&&y;var m;s=f&&!d?function(t,e,r,n){const{arrayBuffer:o,type:i,offset:a=0,length:s,rows:u}=t.targetBuffer,c=r[i];if(!c)throw new Error(`target array ${i} is not supported, you need to set use16BitDataType to true if you want to use Uint16Array or Int16Array.`);u&&u!=e.rows&&function(t,e,r){const n=function(t,e,r){const{samplesPerPixel:n}=t,{rows:o,columns:i}=e,a=o*i*n,s=new r(a),u=s.byteLength/a;return{pixelData:s,rows:o,columns:i,frameInfo:{...t.frameInfo,rows:o,columns:i},imageInfo:{...t.imageInfo,rows:o,columns:i,bytesPerPixel:u}}}(t,e,r),{scalingType:o="replicate"}=e;W[o](t,n),Object.assign(t,n)}(e,t.targetBuffer,c);const l=e.pixelDataLength,f=a,p=null!=s?s:l-f,d=e.pixelData;if(p!==d.length)throw new Error(`target array for image does not have the same length (${p}) as the decoded image length (${d.length}).`);const h=o?new c(o,f,p):new c(p);return h.set(d,0),n=h,n}(e,t,l,s):e.preScale.enabled&&!v?function(t,e,r,n){const o=t.preScale.scalingParameters;U(o);const{rescaleSlope:i,rescaleIntercept:a}=o;let s=e,u=r;"number"==typeof i&&"number"==typeof a&&(s=i*e+a,u=i*r+a);return I(s,u,n)}(e,u,c,t):I(u,c,t);let w=u,b=c;if(e.preScale.enabled&&!v){const r=e.preScale.scalingParameters;U(r);const{rescaleSlope:n,rescaleIntercept:o}=r;if("number"==typeof n&&"number"==typeof o){!function(t,e){const r=t.length,{rescaleSlope:n,rescaleIntercept:o,suvbw:i}=e;if("PT"===e.modality&&"number"==typeof i)for(let e=0;e<r;e++)t[e]=i*(t[e]*n+o);else for(let e=0;e<r;e++)t[e]=t[e]*n+o}(s,r),t.preScale={...e.preScale,scaled:!0};const{rescaleIntercept:n,rescaleSlope:o,suvbw:i}=r;w=o*u+n,b=o*c+n,i&&(w*=i,b*=i)}}else v&&(t.preScale={scaled:!1},w=u,b=c);const T=void 0!==e.targetBuffer;T&&e.isSharedArrayBuffer||(t.pixelData=s);t.minAfterScale=w,t.maxAfterScale=b;const P=(new Date).getTime();return t.decodeTimeInMS=P-r,t}(await u,o,a,n);return i?.(c),c};let L;function M(t){t.decodeTask.initializeCodecsOnStartup&&(c(t.decodeTask),y(t.decodeTask))}const B={taskType:"decodeTask",handler:async function(t,e){M(L);const r=L&&L.decodeTask&&L.decodeTask.strict,n=new Uint8Array(t.data.pixelData),o=await H(t.data.imageFrame,t.data.transferSyntax,n,Object.assign(L.decodeTask,t.data.decodeConfig),t.data.options);if(!o.pixelData)throw new Error("decodeTask: imageFrame.pixelData is undefined after decoding");return function(t,e=!0){const r=void 0!==t.minAfterScale||void 0!==t.maxAfterScale?{min:t.minAfterScale,max:t.maxAfterScale}:g(t.pixelData),n=!(m(t.smallestPixelValue)&&m(t.largestPixelValue));!0!==e||n?(t.smallestPixelValue=r.min,t.largestPixelValue=r.max):(t.smallestPixelValue!==r.min&&console.warn("Image smallestPixelValue tag is incorrect. Rendering performance will suffer considerably."),t.largestPixelValue!==r.max&&console.warn("Image largestPixelValue tag is incorrect. Rendering performance will suffer considerably."))}(o,r),o.pixelData=o.pixelData.buffer,e?.(o,[o.pixelData]),{result:o,transferList:[o.pixelData]}},initialize:function(t){L=t,M(t)}};n(B)})()})();
2
+ //# sourceMappingURL=index.worker.5a5a581362c14598c3d9.worker.js.map