dicomweb-proxy
Version:
A proxy to translate between dicomweb and dimse
1 lines • 198 kB
JavaScript
(()=>{var __webpack_modules__={7552:(e,t,r)=>{e.exports=r(5697)},2169:(e,t,r)=>{e.exports=r(4608)},2250:(e,t,r)=>{e.exports=r(4731)},973:(e,t,r)=>{e.exports=r(9233)},8327:function(e,t){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(r=r||__filename),function(e){var t,n=void 0!==(e=e||{})?e:{},i={};for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);var o,a,s=[],u=!1,c=!1;u="object"==typeof window,c="function"==typeof importScripts,o="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!u&&!c,a=!u&&!o&&!c;var f,l,p,d,v="";o?(v=__dirname+"/",f=function(e,t){return p||(p=require("fs")),d||(d=require("path")),e=d.normalize(e),p.readFileSync(e,t?null:"utf8")},l=function(e){var t=f(e,!0);return t.buffer||(t=new Uint8Array(t)),b(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),s=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof Dt))throw e})),process.on("unhandledRejection",Y),n.inspect=function(){return"[Emscripten Module object]"}):a?("undefined"!=typeof read&&(f=function(e){return read(e)}),l=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(b("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?s=scriptArgs:void 0!==arguments&&(s=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(u||c)&&(c?v=self.location.href:document.currentScript&&(v=document.currentScript.src),r&&(v=r),v=0!==v.indexOf("blob:")?v.substr(0,v.lastIndexOf("/")+1):"",f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},c&&(l=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var m=n.print||console.log.bind(console),h=n.printErr||console.warn.bind(console);for(t in i)i.hasOwnProperty(t)&&(n[t]=i[t]);i=null,n.arguments&&(s=n.arguments),n.thisProgram&&n.thisProgram,n.quit&&n.quit;var y,g;n.wasmBinary&&(y=n.wasmBinary),n.noExitRuntime&&n.noExitRuntime,"object"!=typeof WebAssembly&&h("no native wasm support detected");var _=new WebAssembly.Table({initial:181,maximum:181,element:"anyfunc"}),w=!1;function b(e,t){e||Y("Assertion failed: "+t)}function T(e){var t=n["_"+e];return b(t,"Cannot call unknown function "+e+", make sure it is exported"),t}var C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function x(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.subarray&&C)return C.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function P(e,t){return e?x(S,e,t):""}function $(e,t,r){return function(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i}(e,S,t,r)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var A,k,S,E,j,O,F,R,W;function I(e,t){return e%t>0&&(e+=t-e%t),e}function D(e){A=e,n.HEAP8=k=new Int8Array(e),n.HEAP16=E=new Int16Array(e),n.HEAP32=O=new Int32Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=j=new Uint16Array(e),n.HEAPU32=F=new Uint32Array(e),n.HEAPF32=R=new Float32Array(e),n.HEAPF64=W=new Float64Array(e)}var U=n.TOTAL_MEMORY||1073741824;function M(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(g=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:U/65536}))&&(A=g.buffer),U=A.byteLength,D(A),O[11512]=5289088;var z=[],N=[],q=[],B=[],L=[];function V(e){z.unshift(e)}function H(e){L.unshift(e)}Math.abs,Math.ceil,Math.floor,Math.min;var G=0,Z=null,X=null;function Y(e){throw n.onAbort&&n.onAbort(e),m(e+=""),h(e),w=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}n.preloadedImages={},n.preloadedAudios={};var J="data:application/octet-stream;base64,";function K(e){return String.prototype.startsWith?e.startsWith(J):0===e.indexOf(J)}var Q="charlswasm_decode.wasm";function ee(){try{if(y)return new Uint8Array(y);if(l)return l(Q);throw"both async and sync fetching of the wasm failed"}catch(e){Y(e)}}function te(e,t){B.unshift({func:e,arg:t})}K(Q)||(Q=function(e){return n.locateFile?n.locateFile(e,v):v+e}(Q)),N.push({func:function(){St()}});var re={};var ne={};function ie(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function oe(e){return this.fromWireType(F[e>>2])}var ae={},se={},ue={},ce=48,fe=57;function le(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=ce&&t<=fe?"_"+e:e}function pe(e,t){return e=le(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function de(e,t){var r=pe(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ve=void 0;function me(e){throw new ve(e)}function he(e,t,r){function n(t){var n=r(t);n.length!==e.length&&me("Mismatched type converter count");for(var i=0;i<e.length;++i)Te(e[i],n[i])}e.forEach((function(e){ue[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach((function(e,t){se.hasOwnProperty(e)?i[t]=se[e]:(o.push(e),ae.hasOwnProperty(e)||(ae[e]=[]),ae[e].push((function(){i[t]=se[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)}function ye(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ge=void 0;function _e(e){for(var t="",r=e;S[r];)t+=ge[S[r++]];return t}var we=void 0;function be(e){throw new we(e)}function Te(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||be('type "'+n+'" must have a positive integer typeid pointer'),se.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;be("Cannot register type '"+n+"' twice")}if(se[e]=t,delete ue[e],ae.hasOwnProperty(e)){var i=ae[e];delete ae[e],i.forEach((function(e){e()}))}}function Ce(e){if(!(this instanceof De))return!1;if(!(e instanceof De))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}function xe(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Pe(e){be(e.$$.ptrType.registeredClass.name+" instance already deleted")}var $e=!1;function Ae(e){}function ke(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function Se(e){return"undefined"==typeof FinalizationGroup?(Se=function(e){return e},e):($e=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?ke(r):console.warn("object already deleted: "+r.ptr)}})),Se=function(e){return $e.register(e,e.$$,e.$$),e},Ae=function(e){$e.unregister(e.$$)},Se(e))}function Ee(){if(this.$$.ptr||Pe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Se(Object.create(Object.getPrototypeOf(this),{$$:{value:xe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function je(){this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&be("Object already scheduled for deletion"),Ae(this),ke(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Oe(){return!this.$$.ptr}var Fe=void 0,Re=[];function We(){for(;Re.length;){var e=Re.pop();e.$$.deleteScheduled=!1,e.delete()}}function Ie(){return this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&be("Object already scheduled for deletion"),Re.push(this),1===Re.length&&Fe&&Fe(We),this.$$.deleteScheduled=!0,this}function De(){}var Ue={};function Me(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||be("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function ze(e,t,r){n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&be("Cannot register public name '"+e+"' twice"),Me(n,e,e),n.hasOwnProperty(r)&&be("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))}function Ne(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function qe(e,t,r){for(;t!==r;)t.upcast||be("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Be(e,t){if(null===t)return this.isReference&&be("null is not a valid "+this.name),0;t.$$||be('Cannot pass "'+yt(t)+'" as a '+this.name),t.$$.ptr||be("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return qe(t.$$.ptr,r,this.registeredClass)}function Le(e,t){var r;if(null===t)return this.isReference&&be("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||be('Cannot pass "'+yt(t)+'" as a '+this.name),t.$$.ptr||be("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&be("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=qe(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&be("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:be("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,ht((function(){i.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:be("Unsupporting sharing policy")}return r}function Ve(e,t){if(null===t)return this.isReference&&be("null is not a valid "+this.name),0;t.$$||be('Cannot pass "'+yt(t)+'" as a '+this.name),t.$$.ptr||be("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&be("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return qe(t.$$.ptr,r,this.registeredClass)}function He(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Ge(e){this.rawDestructor&&this.rawDestructor(e)}function Ze(e){null!==e&&e.delete()}function Xe(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Xe(e,t,r.baseClass);return null===n?null:r.downcast(n)}function Ye(){return Object.keys(Qe).length}function Je(){var e=[];for(var t in Qe)Qe.hasOwnProperty(t)&&e.push(Qe[t]);return e}function Ke(e){Fe=e,Re.length&&Fe&&Fe(We)}var Qe={};function et(e,t){return t=function(e,t){for(void 0===t&&be("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),Qe[t]}function tt(e,t){return t.ptrType&&t.ptr||me("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&me("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Se(Object.create(e,{$$:{value:t}}))}function rt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=et(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?tt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):tt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=Ue[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=Xe(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?tt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):tt(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}function nt(e,t,r,n,i,o,a,s,u,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,i||void 0!==t.baseClass?this.toWireType=Le:n?(this.toWireType=Be,this.destructorFunction=null):(this.toWireType=Ve,this.destructorFunction=null)}function it(e,t,r){n.hasOwnProperty(e)||me("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)}function ot(e,t){var r;if(e=_e(e),void 0!==n["FUNCTION_TABLE_"+e])r=n["FUNCTION_TABLE_"+e][t];else if("undefined"!=typeof FUNCTION_TABLE)r=FUNCTION_TABLE[t];else{var i=n["dynCall_"+e];void 0===i&&void 0===(i=n["dynCall_"+e.replace(/f/g,"d")])&&be("No dynCall invoker for signature: "+e),r=function(r){for(var n=[],i=1;i<e.length;++i)n.push("a"+i);var o="return function dynCall_"+e+"_"+t+"("+n.join(", ")+") {\n";return o+=" return dynCall(rawFunction"+(n.length?", ":"")+n.join(", ")+");\n",o+="};\n",new Function("dynCall","rawFunction",o)(r,t)}(i)}return"function"!=typeof r&&be("unknown function pointer with signature "+e+": "+t),r}var at=void 0;function st(e){var t=Ft(e),r=_e(t);return Ot(t),r}function ut(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||se[t]||(ue[t]?ue[t].forEach(e):(r.push(t),n[t]=!0))})),new at(e+": "+r.map(st).join([", "]))}function ct(e,t){for(var r=[],n=0;n<e;n++)r.push(O[(t>>2)+n]);return r}function ft(e,t,r,n,i){var o=t.length;o<2&&be("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,f="",l="";for(u=0;u<o-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+le(e)+"("+f+") {\nif (arguments.length !== "+(o-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(o-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",v=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[be,n,i,ie,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<o-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+t[u+2].name+"\n",v.push("argType"+u),m.push(t[u+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<t.length;++u){var h=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(p+=h+"_dtor("+h+"); // "+t[u].name+"\n",v.push(h+"_dtor"),m.push(t[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",v.push(p),function(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=pe(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}(Function,v).apply(null,m)}var lt=[],pt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function dt(e){e>4&&0==--pt[e].refcount&&(pt[e]=void 0,lt.push(e))}function vt(){for(var e=0,t=5;t<pt.length;++t)void 0!==pt[t]&&++e;return e}function mt(){for(var e=5;e<pt.length;++e)if(void 0!==pt[e])return pt[e];return null}function ht(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=lt.length?lt.pop():pt.length;return pt[t]={refcount:1,value:e},t}}function yt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function gt(e,t){switch(t){case 2:return function(e){return this.fromWireType(R[e>>2])};case 3:return function(e){return this.fromWireType(W[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function _t(e,t,r){switch(t){case 0:return r?function(e){return k[e]}:function(e){return S[e]};case 1:return r?function(e){return E[e>>1]}:function(e){return j[e>>1]};case 2:return r?function(e){return O[e>>2]}:function(e){return F[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var wt={};function bt(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Tt(e,t){var r=se[e];return void 0===r&&be(t+" has unknown type "+st(e)),r}function Ct(e){for(var t="",r=0;r<e;++r)t+=(0!==r?", ":"")+"arg"+r;var i="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n";for(r=0;r<e;++r)i+="var argType"+r+" = requireRegisteredType(Module['HEAP32'][(argTypes >> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return i+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",i)(Tt,n,ht)}var xt={};var Pt={buffers:[null,[],[]],printChar:function(e,t){var r=Pt.buffers[e];0===t||10===t?((1===e?m:h)(x(r,0)),r.length=0):r.push(t)},varargs:0,get:function(e){return Pt.varargs+=4,O[Pt.varargs-4>>2]},getStr:function(){return P(Pt.get())},get64:function(){var e=Pt.get();return Pt.get(),e},getZero:function(){Pt.get()}};ve=n.InternalError=de(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ge=e}(),we=n.BindingError=de(Error,"BindingError"),De.prototype.isAliasOf=Ce,De.prototype.clone=Ee,De.prototype.delete=je,De.prototype.isDeleted=Oe,De.prototype.deleteLater=Ie,nt.prototype.getPointee=He,nt.prototype.destructor=Ge,nt.prototype.argPackAdvance=8,nt.prototype.readValueFromPointer=oe,nt.prototype.deleteObject=Ze,nt.prototype.fromWireType=rt,n.getInheritedInstanceCount=Ye,n.getLiveInheritedInstances=Je,n.flushPendingDeletes=We,n.setDelayFunction=Ke,at=n.UnboundTypeError=de(Error,"UnboundTypeError"),n.count_emval_handles=vt,n.get_first_emval=mt;var $t={__cxa_allocate_exception:function(e){return Et(e)},__cxa_atexit:function(){return te.apply(null,arguments)},__cxa_thread_atexit:function(){return te.apply(null,arguments)},__cxa_throw:function(e,t,r){throw re[e]={ptr:e,adjusted:[e],type:t,destructor:r,refcount:0,caught:!1,rethrown:!1},"uncaught_exception"in jt?jt.uncaught_exceptions++:jt.uncaught_exceptions=1,e},_embind_finalize_value_object:function(e){var t=ne[e];delete ne[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields;he([e],i.map((function(e){return e.getterReturnType})).concat(i.map((function(e){return e.setterArgumentType}))),(function(e){var o={};return i.forEach((function(t,r){var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+i.length],f=t.setter,l=t.setterContext;o[n]={read:function(e){return a.fromWireType(s(u,e))},write:function(e,t){var r=[];f(l,e,c.toWireType(r,t)),ie(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in o)t[r]=o[r].read(e);return n(e),t},toWireType:function(e,t){for(var i in o)if(!(i in t))throw new TypeError("Missing field");var a=r();for(i in o)o[i].write(a,t[i]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:oe,destructorFunction:n}]}))},_embind_register_bool:function(e,t,r,n,i){var o=ye(r);Te(e,{name:t=_e(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=k;else if(2===r)n=E;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=O}return this.fromWireType(n[e>>o])},destructorFunction:null})},_embind_register_class:function(e,t,r,n,i,o,a,s,u,c,f,l,p){f=_e(f),o=ot(i,o),s&&(s=ot(a,s)),c&&(c=ot(u,c)),p=ot(l,p);var d=le(f);ze(d,(function(){ut("Cannot construct "+f+" due to unbound types",[n])})),he([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:De.prototype;var a=pe(d,(function(){if(Object.getPrototypeOf(this)!==u)throw new we("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new we(f+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new we("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:a}});a.prototype=u;var l=new Ne(f,a,u,p,r,o,s,c),v=new nt(f,l,!0,!1,!1),m=new nt(f+"*",l,!1,!1,!1),h=new nt(f+" const*",l,!1,!0,!1);return Ue[e]={pointerType:m,constPointerType:h},it(d,a),[v,m,h]}))},_embind_register_class_constructor:function(e,t,r,n,i,o){b(t>0);var a=ct(t,r);i=ot(n,i);var s=[o],u=[];he([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new we("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){ut("Cannot construct "+e.name+" due to unbound types",a)},he([],a,(function(n){return e.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&be(r+" called with "+arguments.length+" arguments, expected "+(t-1)),u.length=0,s.length=t;for(var e=1;e<t;++e)s[e]=n[e].toWireType(u,arguments[e-1]);var o=i.apply(null,s);return ie(u),n[0].fromWireType(o)},[]})),[]}))},_embind_register_class_function:function(e,t,r,n,i,o,a,s){var u=ct(r,n);t=_e(t),o=ot(i,o),he([],[e],(function(e){var n=(e=e[0]).name+"."+t;function i(){ut("Cannot call "+n+" due to unbound types",u)}s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===r-2?(i.argCount=r-2,i.className=e.name,c[t]=i):(Me(c,t,n),c[t].overloadTable[r-2]=i),he([],u,(function(i){var s=ft(n,i,e,o,a);return void 0===c[t].overloadTable?(s.argCount=r-2,c[t]=s):c[t].overloadTable[r-2]=s,[]})),[]}))},_embind_register_emval:function(e,t){Te(e,{name:t=_e(t),fromWireType:function(e){var t=pt[e].value;return dt(e),t},toWireType:function(e,t){return ht(t)},argPackAdvance:8,readValueFromPointer:oe,destructorFunction:null})},_embind_register_float:function(e,t,r){var n=ye(r);Te(e,{name:t=_e(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+yt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:gt(t,n),destructorFunction:null})},_embind_register_function:function(e,t,r,n,i,o){var a=ct(t,r);e=_e(e),i=ot(n,i),ze(e,(function(){ut("Cannot call "+e+" due to unbound types",a)}),t-1),he([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return it(e,ft(e,n,null,i,o),t-1),[]}))},_embind_register_integer:function(e,t,r,n,i){t=_e(t),-1===i&&(i=4294967295);var o=ye(r),a=function(e){return e};if(0===n){var s=32-8*r;a=function(e){return e<<s>>>s}}var u=-1!=t.indexOf("unsigned");Te(e,{name:t,fromWireType:a,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+yt(r)+'" to '+this.name);if(r<n||r>i)throw new TypeError('Passing a number "'+yt(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+i+"]!");return u?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:_t(t,o,0!==n),destructorFunction:null})},_embind_register_memory_view:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=F,r=t[e>>=2],i=t[e+1];return new n(t.buffer,i,r)}Te(e,{name:r=_e(r),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(e,t){var r="std::string"===(t=_e(t));Te(e,{name:t,fromWireType:function(e){var t,n=F[e>>2];if(r){var i=S[e+4+n],o=0;0!=i&&(o=i,S[e+4+n]=0);for(var a=e+4,s=0;s<=n;++s){var u=e+4+s;if(0==S[u]){var c=P(a);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),a=u+1}}0!=o&&(S[e+4+n]=o)}else{var f=new Array(n);for(s=0;s<n;++s)f[s]=String.fromCharCode(S[e+4+s]);t=f.join("")}return Ot(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||be("Cannot pass non-string to std::string");var i=(r&&n?function(){return function(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}(t)}:function(){return t.length})(),o=Et(4+i+1);if(F[o>>2]=i,r&&n)$(t,o+4,i+1);else if(n)for(var a=0;a<i;++a){var s=t.charCodeAt(a);s>255&&(Ot(o),be("String has UTF-16 code units that do not fit in 8 bits")),S[o+4+a]=s}else for(a=0;a<i;++a)S[o+4+a]=t[a];return null!==e&&e.push(Ot,o),o},argPackAdvance:8,readValueFromPointer:oe,destructorFunction:function(e){Ot(e)}})},_embind_register_std_wstring:function(e,t,r){var n,i;r=_e(r),2===t?(n=function(){return j},i=1):4===t&&(n=function(){return F},i=2),Te(e,{name:r,fromWireType:function(e){for(var t=n(),r=F[e>>2],o=new Array(r),a=e+4>>i,s=0;s<r;++s)o[s]=String.fromCharCode(t[a+s]);return Ot(e),o.join("")},toWireType:function(e,r){var o=r.length,a=Et(4+o*t),s=n();F[a>>2]=o;for(var u=a+4>>i,c=0;c<o;++c)s[u+c]=r.charCodeAt(c);return null!==e&&e.push(Ot,a),a},argPackAdvance:8,readValueFromPointer:oe,destructorFunction:function(e){Ot(e)}})},_embind_register_value_object:function(e,t,r,n,i,o){ne[e]={name:_e(t),rawConstructor:ot(r,n),rawDestructor:ot(i,o),fields:[]}},_embind_register_value_object_field:function(e,t,r,n,i,o,a,s,u,c){ne[e].fields.push({fieldName:_e(t),getterReturnType:r,getter:ot(n,i),getterContext:o,setterArgumentType:a,setter:ot(s,u),setterContext:c})},_embind_register_void:function(e,t){Te(e,{isVoid:!0,name:t=_e(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},_emval_decref:dt,_emval_get_global:function(e){return 0===e?ht(bt()):(e=function(e){var t=wt[e];return void 0===t?_e(e):t}(e),ht(bt()[e]))},_emval_incref:function(e){e>4&&(pt[e].refcount+=1)},_emval_new:function(e,t,r,n){e=function(e){return e||be("Cannot use deleted val. handle = "+e),pt[e].value}(e);var i=xt[t];return i||(i=Ct(t),xt[t]=i),i(e,r,n)},_emval_take_value:function(e,t){return ht((e=Tt(e,"_emval_take_value")).readValueFromPointer(t))},abort:function(){Y()},emscripten_get_sbrk_ptr:function(){return 46048},emscripten_memcpy_big:function(e,t,r){S.set(S.subarray(t,t+r),e)},emscripten_resize_heap:function(e){var t=k.length,r=2147418112;if(e>r)return!1;for(var n=Math.max(t,16777216);n<e;)n=n<=536870912?I(2*n,65536):Math.min(I((3*n+2147483648)/4,65536),r);return!!function(e){try{return g.grow(e-A.byteLength+65535>>16),D(g.buffer),1}catch(e){}}(n)},fd_close:function(e){try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Y(e),e.errno}},fd_seek:function(e,t,r,n,i){try{return 0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Y(e),e.errno}},fd_write:function(e,t,r,n){try{for(var i=0,o=0;o<r;o++){for(var a=O[t+8*o>>2],s=O[t+(8*o+4)>>2],u=0;u<s;u++)Pt.printChar(e,S[a+u]);i+=s}return O[n>>2]=i,0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Y(e),e.errno}},memory:g,setTempRet0:function(e){},table:_},At=function(){var e={env:$t,wasi_snapshot_preview1:$t};function t(e,t){var r=e.exports;n.asm=r,function(e){if(G--,n.monitorRunDependencies&&n.monitorRunDependencies(G),0==G&&(null!==Z&&(clearInterval(Z),Z=null),X)){var t=X;X=null,t()}}()}function r(e){t(e.instance)}function i(t){return(y||!u&&!c||"function"!=typeof fetch?new Promise((function(e,t){e(ee())})):fetch(Q,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Q+"'";return e.arrayBuffer()})).catch((function(){return ee()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){h("failed to asynchronously prepare wasm: "+e),Y(e)}))}if(G++,n.monitorRunDependencies&&n.monitorRunDependencies(G),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return h("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(y||"function"!=typeof WebAssembly.instantiateStreaming||K(Q)||"function"!=typeof fetch)return i(r);fetch(Q,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){h("wasm streaming compile failed: "+e),h("falling back to ArrayBuffer instantiation"),i(r)}))}))}(),{}}();n.asm=At;var kt,St=n.___wasm_call_ctors=function(){return n.asm.__wasm_call_ctors.apply(null,arguments)},Et=n._malloc=function(){return n.asm.malloc.apply(null,arguments)},jt=(n._setThrew=function(){return n.asm.setThrew.apply(null,arguments)},n.__ZSt18uncaught_exceptionv=function(){return n.asm._ZSt18uncaught_exceptionv.apply(null,arguments)}),Ot=n._free=function(){return n.asm.free.apply(null,arguments)},Ft=n.___getTypeName=function(){return n.asm.__getTypeName.apply(null,arguments)},Rt=(n.___embind_register_native_and_builtin_types=function(){return n.asm.__embind_register_native_and_builtin_types.apply(null,arguments)},n.stackSave=function(){return n.asm.stackSave.apply(null,arguments)}),Wt=n.stackAlloc=function(){return n.asm.stackAlloc.apply(null,arguments)},It=n.stackRestore=function(){return n.asm.stackRestore.apply(null,arguments)};function Dt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ut(e){function t(){kt||(kt=!0,w||(M(N),M(q),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)H(n.postRun.shift());M(L)}()))}e=e||s,G>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)V(n.preRun.shift());M(z)}(),G>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}if(n.__growWasmMemory=function(){return n.asm.__growWasmMemory.apply(null,arguments)},n.dynCall_i=function(){return n.asm.dynCall_i.apply(null,arguments)},n.dynCall_vi=function(){return n.asm.dynCall_vi.apply(null,arguments)},n.dynCall_iii=function(){return n.asm.dynCall_iii.apply(null,arguments)},n.dynCall_viii=function(){return n.asm.dynCall_viii.apply(null,arguments)},n.dynCall_ii=function(){return n.asm.dynCall_ii.apply(null,arguments)},n.dynCall_iiii=function(){return n.asm.dynCall_iiii.apply(null,arguments)},n.dynCall_vii=function(){return n.asm.dynCall_vii.apply(null,arguments)},n.dynCall_viiii=function(){return n.asm.dynCall_viiii.apply(null,arguments)},n.dynCall_v=function(){return n.asm.dynCall_v.apply(null,arguments)},n.dynCall_iidiiii=function(){return n.asm.dynCall_iidiiii.apply(null,arguments)},n.dynCall_jiji=function(){return n.asm.dynCall_jiji.apply(null,arguments)},n.dynCall_viiiiii=function(){return n.asm.dynCall_viiiiii.apply(null,arguments)},n.dynCall_viiiii=function(){return n.asm.dynCall_viiiii.apply(null,arguments)},n.asm=At,n.ccall=function(e,t,r,n,i){var o={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);$(e,t=Wt(r),r)}return t},array:function(e){var t=Wt(e.length);return function(e,t){k.set(e,t)}(e,t),t}},a=T(e),s=[],u=0;if(n)for(var c=0;c<n.length;c++){var f=o[r[c]];f?(0===u&&(u=Rt()),s[c]=f(n[c])):s[c]=n[c]}var l=a.apply(null,s);return l=function(e){return"string"===t?P(e):"boolean"===t?Boolean(e):e}(l),0!==u&&It(u),l},n.then=function(e){if(kt)e(n);else{var t=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){t&&t(),e(n)}}return n},X=function e(){kt||Ut(),kt||(X=e)},n.run=Ut,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ut(),e});"object"==typeof t&&"object"==typeof e?e.exports=n:"function"==typeof define&&define.amd?define([],(function(){return n})):"object"==typeof t&&(t.CharLSWASM=n)},9400:function(e,t){var r,n=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(r=r||__filename),function(e){var t,n=void 0!==(e=e||{})?e:{},i={};for(t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);var o,a,s=[],u="./this.program",c=function(e,t){throw t},f=!1,l=!1;f="object"==typeof window,l="function"==typeof importScripts,o="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!f&&!l,a=!f&&!o&&!l;var p,d,v,m,h="";o?(h=__dirname+"/",p=function(e,t){return v||(v=require("fs")),m||(m=require("path")),e=m.normalize(e),v.readFileSync(e,t?null:"utf8")},d=function(e){var t=p(e,!0);return t.buffer||(t=new Uint8Array(t)),$(t.buffer),t},process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),s=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof Kt))throw e})),process.on("unhandledRejection",te),c=function(e){process.exit(e)},n.inspect=function(){return"[Emscripten Module object]"}):a?("undefined"!=typeof read&&(p=function(e){return read(e)}),d=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):($("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs?s=scriptArgs:void 0!==arguments&&(s=arguments),"function"==typeof quit&&(c=function(e){quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(f||l)&&(l?h=self.location.href:document.currentScript&&(h=document.currentScript.src),r&&(h=r),h=0!==h.indexOf("blob:")?h.substr(0,h.lastIndexOf("/")+1):"",p=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},l&&(d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var y=n.print||console.log.bind(console),g=n.printErr||console.warn.bind(console);for(t in i)i.hasOwnProperty(t)&&(n[t]=i[t]);i=null,n.arguments&&(s=n.arguments),n.thisProgram&&(u=n.thisProgram),n.quit&&(c=n.quit);var _,w,b,T=0,C=function(e){T=e};n.wasmBinary&&(_=n.wasmBinary),n.noExitRuntime&&(w=n.noExitRuntime),"object"!=typeof WebAssembly&&g("no native wasm support detected");var x=new WebAssembly.Table({initial:204,maximum:204,element:"anyfunc"}),P=!1;function $(e,t){e||te("Assertion failed: "+t)}function A(e){var t=n["_"+e];return $(t,"Cannot call unknown function "+e+", make sure it is exported"),t}var k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.subarray&&k)return k.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function E(e,t){return e?S(R,e,t):""}function j(e,t,r){return function(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i}(e,R,t,r)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var O,F,R,W,I,D,U,M,z;function N(e,t){return e%t>0&&(e+=t-e%t),e}function q(e){O=e,n.HEAP8=F=new Int8Array(e),n.HEAP16=W=new Int16Array(e),n.HEAP32=D=new Int32Array(e),n.HEAPU8=R=new Uint8Array(e),n.HEAPU16=I=new Uint16Array(e),n.HEAPU32=U=new Uint32Array(e),n.HEAPF32=M=new Float32Array(e),n.HEAPF64=z=new Float64Array(e)}var B=n.TOTAL_MEMORY||1073741824;function L(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(b=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:B/65536}))&&(O=b.buffer),B=O.byteLength,q(O),D[3932]=5258768;var V=[],H=[],G=[],Z=[],X=[];function Y(e){V.unshift(e)}function J(e){X.unshift(e)}Math.abs,Math.ceil,Math.floor,Math.min;var K=0,Q=null,ee=null;function te(e){throw n.onAbort&&n.onAbort(e),y(e+=""),g(e),P=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}n.preloadedImages={},n.preloadedAudios={};var re="data:application/octet-stream;base64,";function ne(e){return String.prototype.startsWith?e.startsWith(re):0===e.indexOf(re)}var ie="libjpegturbowasm_decode.wasm";function oe(){try{if(_)return new Uint8Array(_);if(d)return d(ie);throw"both async and sync fetching of the wasm failed"}catch(e){te(e)}}function ae(e,t){Z.unshift({func:e,arg:t})}ne(ie)||(ie=function(e){return n.locateFile?n.locateFile(e,h):h+e}(ie)),H.push({func:function(){Dt()}});var se={};var ue={};function ce(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function fe(e){return this.fromWireType(U[e>>2])}var le={},pe={},de={},ve=48,me=57;function he(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=ve&&t<=me?"_"+e:e}function ye(e,t){return e=he(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function ge(e,t){var r=ye(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var _e=void 0;function we(e){throw new _e(e)}function be(e,t,r){function n(t){var n=r(t);n.length!==e.length&&we("Mismatched type converter count");for(var i=0;i<e.length;++i)Ae(e[i],n[i])}e.forEach((function(e){de[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach((function(e,t){pe.hasOwnProperty(e)?i[t]=pe[e]:(o.push(e),le.hasOwnProperty(e)||(le[e]=[]),le[e].push((function(){i[t]=pe[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)}function Te(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var Ce=void 0;function xe(e){for(var t="",r=e;R[r];)t+=Ce[R[r++]];return t}var Pe=void 0;function $e(e){throw new Pe(e)}function Ae(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||$e('type "'+n+'" must have a positive integer typeid pointer'),pe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;$e("Cannot register type '"+n+"' twice")}if(pe[e]=t,delete de[e],le.hasOwnProperty(e)){var i=le[e];delete le[e],i.forEach((function(e){e()}))}}function ke(e){if(!(this instanceof qe))return!1;if(!(e instanceof qe))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}function Se(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Ee(e){$e(e.$$.ptrType.registeredClass.name+" instance already deleted")}var je=!1;function Oe(e){}function Fe(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function Re(e){return"undefined"==typeof FinalizationGroup?(Re=function(e){return e},e):(je=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?Fe(r):console.warn("object already deleted: "+r.ptr)}})),Re=function(e){return je.register(e,e.$$,e.$$),e},Oe=function(e){je.unregister(e.$$)},Re(e))}function We(){if(this.$$.ptr||Ee(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Re(Object.create(Object.getPrototypeOf(this),{$$:{value:Se(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Ie(){this.$$.ptr||Ee(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$e("Object already scheduled for deletion"),Oe(this),Fe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function De(){return!this.$$.ptr}var Ue=void 0,Me=[];function ze(){for(;Me.length;){var e=Me.pop();e.$$.deleteScheduled=!1,e.delete()}}function Ne(){return this.$$.ptr||Ee(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$e("Object already scheduled for deletion"),Me.push(this),1===Me.length&&Ue&&Ue(ze),this.$$.deleteScheduled=!0,this}function qe(){}var Be={};function Le(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||$e("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Ve(e,t,r){n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&$e("Cannot register public name '"+e+"' twice"),Le(n,e,e),n.hasOwnProperty(r)&&$e("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))}function He(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Ge(e,t,r){for(;t!==r;)t.upcast||$e("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Ze(e,t){if(null===t)return this.isReference&&$e("null is not a valid "+this.name),0;t.$$||$e('Cannot pass "'+Tt(t)+'" as a '+this.name),t.$$.ptr||$e("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Ge(t.$$.ptr,r,this.registeredClass)}function Xe(e,t){var r;if(null===t)return this.isReference&&$e("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||$e('Cannot pass "'+Tt(t)+'" as a '+this.name),t.$$.ptr||$e("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&$e("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Ge(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&$e("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:$e("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,bt((function(){i.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:$e("Unsupporting sharing policy")}return r}function Ye(e,t){if(null===t)return this.isReference&&$e("null is not a valid "+this.name),0;t.$$||$e('Cannot pass "'+Tt(t)+'" as a '+this.name),t.$$.ptr||$e("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&$e("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Ge(t.$$.ptr,r,this.registeredClass)}function Je(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Ke(e){this.rawDestructor&&this.rawDestructor(e)}function Qe(e){null!==e&&e.delete()}function et(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=et(e,t,r.baseClass);return null===n?null:r.downcast(n)}function tt(){return Object.keys(it).length}function rt(){var e=[];for(var t in it)it.hasOwnProperty(t)&&e.push(it[t]);return e}function nt(e){Ue=e,Me.length&&Ue&&Ue(ze)}var it={};function ot(e,t){return t=function(e,t){for(void 0===t&&$e("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),it[t]}function at(e,t){return t.ptrType&&t.ptr||we("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&we("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Re(Object.create(e,{$$:{value:t}}))}function st(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ot(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?at(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):at(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=Be[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=et(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?at(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):at(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}function ut(e,t,r,n,i,o,a,s,u,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,i||void 0!==t.baseClass?this.toWireType=Xe:n?(this.toWireType=Ze,this.destructorFunction=null):(this.toWireType=Ye,this.destructorFunction=null)}function ct(e,t,r){n.hasOwnProperty(e)||we("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)}function ft(e,t){var r;if(e=xe(e),void 0!==n["FUNCTION_TABLE_"+e])r=n["FUNCTION_TABLE_"+e][t];else if("undefined"!=typeof FUNCTION_TABLE)r=FUNCTION_TABLE[t];else{var i=n["dynCall_"+e];void 0===i&&void 0===(i=n["dynCall_"+e.replace(/f/g,"d")])&&$e("No dynCall invoker for signature: "+e),r=function(r){for(var n=[],i=1;i<e.length;++i)n.push("a"+i);var o="return function dynCall_"+e+"_"+t+"("+n.join(", ")+") {\n";return o+=" return dynCall(rawFunction"+(n.length?", ":"")+n.join(", ")+");\n",o+="};\n",new Function("dynCall","rawFunction",o)(r,t)}(i)}return"function"!=typeof r&&$e("unknown function pointer with signature "+e+": "+t),r}var lt=void 0;function pt(e){var t=Bt(e),r=xe(t);return Mt(t),r}function dt(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||pe[t]||(de[t]?de[t].forEach(e):(r.push(t),n[t]=!0))})),new lt(e+": "+r.map(pt).join([", "]))}function vt(e,t){for(var r=[],n=0;n<e;n++)r.push(D[(t>>2)+n]);return r}function mt(e,t,r,n,i){var o=t.length;o<2&&$e("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,f="",l="";for(u=0;u<o-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var p="return function "+he(e)+"("+f+") {\nif (arguments.length !== "+(o-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(o-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var d=s?"destructors":"null",v=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[$e,n,i,ce,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),u=0;u<o-2;++u)p+="var arg"+u+"Wired = argType"+u+".toWireType("+d+", arg"+u+"); // "+t[u+2].name+"\n",v.push("argType"+u),m.push(t[u+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),p+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)p+="runDestructors(destructors);\n";else for(u=a?1:2;u<t.length;++u){var h=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(p+=h+"_dtor("+h+"); // "+t[u].name+"\n",v.push(h+"_dtor"),m.push(t[u].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nr