
var g;g||(g=typeof Module !== 'undefined' ? Module : {});var aa={},q;for(q in g)g.hasOwnProperty(q)&&(aa[q]=g[q]);var ba=[],ca="./this.program";function da(a,b){throw b;}var v="",ea;v=self.location.href;v=0!==v.indexOf("blob:")?v.substr(0,v.lastIndexOf("/")+1):"";ea=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)};var x=g.print||console.log.bind(console),y=g.printErr||console.warn.bind(console);
for(q in aa)aa.hasOwnProperty(q)&&(g[q]=aa[q]);aa=null;g.arguments&&(ba=g.arguments);g.thisProgram&&(ca=g.thisProgram);g.quit&&(da=g.quit);function fa(a){ha||(ha={});ha[a]||(ha[a]=1,y(a))}var ha,ia;g.wasmBinary&&(ia=g.wasmBinary);var noExitRuntime=g.noExitRuntime||!0;"object"!==typeof WebAssembly&&A("no native wasm support detected");var ja,B=!1,ka;function la(a,b){a||A("Assertion failed: "+b)}
function ma(a,b){b=1==b?na(a.length):C(a.length);a.subarray||a.slice?D.set(a,b):D.set(new Uint8Array(a),b);return b}var oa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
function pa(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.subarray&&oa)return oa.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var f=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|f);else{var l=a[b++]&63;e=224==(e&240)?(e&15)<<12|f<<6|l:(e&7)<<18|f<<12|l<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function qa(a,b){return a?pa(D,a,b):""}
function ra(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var l=a.charCodeAt(f);if(55296<=l&&57343>=l){var k=a.charCodeAt(++f);l=65536+((l&1023)<<10)|k&1023}if(127>=l){if(c>=d)break;b[c++]=l}else{if(2047>=l){if(c+1>=d)break;b[c++]=192|l>>6}else{if(65535>=l){if(c+2>=d)break;b[c++]=224|l>>12}else{if(c+3>=d)break;b[c++]=240|l>>18;b[c++]=128|l>>12&63}b[c++]=128|l>>6&63}b[c++]=128|l&63}}b[c]=0;return c-e}
function sa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var ta="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ua(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&va[c];)++c;c<<=1;if(32<c-a&&ta)return ta.decode(D.subarray(a,c));c="";for(d=0;!(d>=b/2);++d){var e=E[a+2*d>>1];if(0==e)break;c+=String.fromCharCode(e)}return c}
function wa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)E[b>>1]=a.charCodeAt(e),b+=2;E[b>>1]=0;return b-d}function xa(a){return 2*a.length}function ya(a,b){for(var c=0,d="";!(c>=b/4);){var e=F[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}
function za(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);if(55296<=f&&57343>=f){var l=a.charCodeAt(++e);f=65536+((f&1023)<<10)|l&1023}F[b>>2]=f;b+=4;if(b+4>c)break}F[b>>2]=0;return b-d}function Aa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}function Ba(a){var b=sa(a)+1,c=C(b);c&&ra(a,G,c,b);return c}function Ca(a){var b=sa(a)+1,c=na(b);ra(a,G,c,b);return c}
var Da,G,D,E,va,F,H,Ea,Fa;function Ga(){var a=ja.buffer;Da=a;g.HEAP8=G=new Int8Array(a);g.HEAP16=E=new Int16Array(a);g.HEAP32=F=new Int32Array(a);g.HEAPU8=D=new Uint8Array(a);g.HEAPU16=va=new Uint16Array(a);g.HEAPU32=H=new Uint32Array(a);g.HEAPF32=Ea=new Float32Array(a);g.HEAPF64=Fa=new Float64Array(a)}var I,Ha=[],Ia=[],Ja=[],Ka=[],La=!1;function Ma(){var a=g.preRun.shift();Ha.unshift(a)}var J=0,Na=null,Oa=null;g.preloadedImages={};g.preloadedAudios={};
function A(a){if(g.onAbort)g.onAbort(a);y(a);B=!0;ka=1;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}function Pa(){return K.startsWith("data:application/octet-stream;base64,")}var K;K="thing.wasm.worker.wasm";if(!Pa()){var Qa=K;K=g.locateFile?g.locateFile(Qa,v):v+Qa}function Ra(){var a=K;try{if(a==K&&ia)return new Uint8Array(ia);if(ea)return ea(a);throw"both async and sync fetching of the wasm failed";}catch(b){A(b)}}
function Sa(){return ia||"function"!==typeof fetch?Promise.resolve().then(function(){return Ra()}):fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Ra()})}
var Ua={43912:function(){var a="undefined"!==typeof g?g:"undefined"!==typeof TWASMModule?TWASMModule:null;a&&(a=a.Helper,a.createStringFromStack=function(b){return ma(Ta(b),1)},a.createStringFromHeap=function(b){return ma(Ta(b),0)},a.freeString=function(b){return M(b)},a.utf8ToString=function(b){return qa(b)})},44437:function(){function a(b){try{return decodeURIComponent(escape(b))}catch(c){return String.fromCharCode(65533)}}window.decodeBufferToString=function(b){var c=b.length,d="",e="";c=Math.min(b.length,
c||Infinity);for(var f=0;f<c;f++)127>=b[f]?(d+=a(e)+String.fromCharCode(b[f]),e=""):e+="%"+b[f].toString(16);return d+a(e)}}};function Va(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(g);else{var c=b.Oa;"number"===typeof c?void 0===b.Ea?I.get(c)():I.get(c)(b.Ea):c(void 0===b.Ea?null:b.Ea)}}}function Wa(a){a instanceof Xa||"unwind"==a||(y("exception thrown: "+a),da(1,a))}var Ya={};function Za(a){for(;a.length;){var b=a.pop();a.pop()(b)}}
function $a(a){return this.fromWireType(H[a>>2])}var ab={},N={},bb={};function cb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function db(a,b){a=cb(a);return(new Function("body","return function "+a+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n'))(b)}
function eb(a){var b=Error,c=db(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var fb=void 0;function gb(a){throw new fb(a);}
function O(a,b,c){function d(k){k=c(k);k.length!==a.length&&gb("Mismatched type converter count");for(var m=0;m<a.length;++m)P(a[m],k[m])}a.forEach(function(k){bb[k]=b});var e=Array(b.length),f=[],l=0;b.forEach(function(k,m){N.hasOwnProperty(k)?e[m]=N[k]:(f.push(k),ab.hasOwnProperty(k)||(ab[k]=[]),ab[k].push(function(){e[m]=N[k];++l;l===f.length&&d(e)}))});0===f.length&&d(e)}
function hb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var ib=void 0;function Q(a){for(var b="";D[a];)b+=ib[D[a++]];return b}var jb=void 0;function S(a){throw new jb(a);}
function P(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||S('type "'+d+'" must have a positive integer typeid pointer');if(N.hasOwnProperty(a)){if(c.nb)return;S("Cannot register type '"+d+"' twice")}N[a]=b;delete bb[a];ab.hasOwnProperty(a)&&(b=ab[a],delete ab[a],b.forEach(function(e){e()}))}function kb(a){S(a.ta.wa.ua.name+" instance already deleted")}var lb=!1;function mb(){}
function nb(a){--a.count.value;0===a.count.value&&(a.za?a.Ba.Da(a.za):a.wa.ua.Da(a.va))}function ob(a){if("undefined"===typeof FinalizationGroup)return ob=function(b){return b},a;lb=new FinalizationGroup(function(b){for(var c=b.next();!c.done;c=b.next())c=c.value,c.va?nb(c):console.warn("object already deleted: "+c.va)});ob=function(b){lb.register(b,b.ta,b.ta);return b};mb=function(b){lb.unregister(b.ta)};return ob(a)}var pb=void 0,qb=[];
function rb(){for(;qb.length;){var a=qb.pop();a.ta.Ha=!1;a["delete"]()}}function T(){}var sb={};function tb(a,b,c){if(void 0===a[b].xa){var d=a[b];a[b]=function(){a[b].xa.hasOwnProperty(arguments.length)||S("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].xa+")!");return a[b].xa[arguments.length].apply(this,arguments)};a[b].xa=[];a[b].xa[d.Ga]=d}}
function ub(a,b){g.hasOwnProperty(a)?(S("Cannot register public name '"+a+"' twice"),tb(g,a,a),g.hasOwnProperty(void 0)&&S("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),g[a].xa[void 0]=b):g[a]=b}function vb(a,b,c,d,e,f,l,k){this.name=a;this.constructor=b;this.Ia=c;this.Da=d;this.Ca=e;this.hb=f;this.Ma=l;this.fb=k;this.qb=[]}
function wb(a,b,c){for(;b!==c;)b.Ma||S("Expected null or instance of "+c.name+", got an instance of "+b.name),a=b.Ma(a),b=b.Ca;return a}function xb(a,b){if(null===b)return this.Ua&&S("null is not a valid "+this.name),0;b.ta||S('Cannot pass "'+yb(b)+'" as a '+this.name);b.ta.va||S("Cannot pass deleted object as a pointer of type "+this.name);return wb(b.ta.va,b.ta.wa.ua,this.ua)}
function zb(a,b){if(null===b){this.Ua&&S("null is not a valid "+this.name);if(this.Qa){var c=this.Va();null!==a&&a.push(this.Da,c);return c}return 0}b.ta||S('Cannot pass "'+yb(b)+'" as a '+this.name);b.ta.va||S("Cannot pass deleted object as a pointer of type "+this.name);!this.Pa&&b.ta.wa.Pa&&S("Cannot convert argument of type "+(b.ta.Ba?b.ta.Ba.name:b.ta.wa.name)+" to parameter type "+this.name);c=wb(b.ta.va,b.ta.wa.ua,this.ua);if(this.Qa)switch(void 0===b.ta.za&&S("Passing raw pointer to smart pointer is illegal"),
this.wb){case 0:b.ta.Ba===this?c=b.ta.za:S("Cannot convert argument of type "+(b.ta.Ba?b.ta.Ba.name:b.ta.wa.name)+" to parameter type "+this.name);break;case 1:c=b.ta.za;break;case 2:if(b.ta.Ba===this)c=b.ta.za;else{var d=b.clone();c=this.sb(c,U(function(){d["delete"]()}));null!==a&&a.push(this.Da,c)}break;default:S("Unsupporting sharing policy")}return c}
function Ab(a,b){if(null===b)return this.Ua&&S("null is not a valid "+this.name),0;b.ta||S('Cannot pass "'+yb(b)+'" as a '+this.name);b.ta.va||S("Cannot pass deleted object as a pointer of type "+this.name);b.ta.wa.Pa&&S("Cannot convert argument of type "+b.ta.wa.name+" to parameter type "+this.name);return wb(b.ta.va,b.ta.wa.ua,this.ua)}function Bb(a,b,c){if(b===c)return a;if(void 0===c.Ca)return null;a=Bb(a,b,c.Ca);return null===a?null:c.fb(a)}var Cb={};
function Db(a,b){for(void 0===b&&S("ptr should not be undefined");a.Ca;)b=a.Ma(b),a=a.Ca;return Cb[b]}function Eb(a,b){b.wa&&b.va||gb("makeClassHandle requires ptr and ptrType");!!b.Ba!==!!b.za&&gb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return ob(Object.create(a,{ta:{value:b}}))}
function V(a,b,c,d){this.name=a;this.ua=b;this.Ua=c;this.Pa=d;this.Qa=!1;this.Da=this.sb=this.Va=this.cb=this.wb=this.pb=void 0;void 0!==b.Ca?this.toWireType=zb:(this.toWireType=d?xb:Ab,this.Aa=null)}function Fb(a,b){g.hasOwnProperty(a)||gb("Replacing nonexistant public symbol");g[a]=b;g[a].Ga=void 0}
function Gb(a,b){var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];a.includes("j")?(d=g["dynCall_"+a],d=c&&c.length?d.apply(null,[b].concat(c)):d.call(null,b)):d=I.get(b).apply(null,c);return d}}function W(a,b){a=Q(a);var c=a.includes("j")?Gb(a,b):I.get(b);"function"!==typeof c&&S("unknown function pointer with signature "+a+": "+b);return c}var Hb=void 0;function Ib(a){a=Jb(a);var b=Q(a);M(a);return b}
function Kb(a,b){function c(f){e[f]||N[f]||(bb[f]?bb[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new Hb(a+": "+d.map(Ib).join([", "]));}function Lb(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=db(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}
function Mb(a,b,c,d,e){var f=b.length;2>f&&S("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=null!==b[1]&&null!==c,k=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].Aa){k=!0;break}var m="void"!==b[0].name,n="",p="";for(c=0;c<f-2;++c)n+=(0!==c?", ":"")+"arg"+c,p+=(0!==c?", ":"")+"arg"+c+"Wired";a="return function "+cb(a)+"("+n+") {\nif (arguments.length !== "+(f-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+
(f-2)+" args!');\n}\n";k&&(a+="var destructors = [];\n");var t=k?"destructors":"null";n="throwBindingError invoker fn runDestructors retType classParam".split(" ");d=[S,d,e,Za,b[0],b[1]];l&&(a+="var thisWired = classParam.toWireType("+t+", this);\n");for(c=0;c<f-2;++c)a+="var arg"+c+"Wired = argType"+c+".toWireType("+t+", arg"+c+"); // "+b[c+2].name+"\n",n.push("argType"+c),d.push(b[c+2]);l&&(p="thisWired"+(0<p.length?", ":"")+p);a+=(m?"var rv = ":"")+"invoker(fn"+(0<p.length?", ":"")+p+");\n";if(k)a+=
"runDestructors(destructors);\n";else for(c=l?1:2;c<b.length;++c)f=1===c?"thisWired":"arg"+(c-2)+"Wired",null!==b[c].Aa&&(a+=f+"_dtor("+f+"); // "+b[c].name+"\n",n.push(f+"_dtor"),d.push(b[c].Aa));m&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n");n.push(a+"}\n");return Lb(n).apply(null,d)}function Nb(a,b){for(var c=[],d=0;d<a;d++)c.push(F[(b>>2)+d]);return c}var Ob=[],X=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Pb(a){4<a&&0===--X[a].Wa&&(X[a]=void 0,Ob.push(a))}
function U(a){switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=Ob.length?Ob.pop():X.length;X[b]={Wa:1,value:a};return b}}function Qb(a,b,c){switch(b){case 0:return function(d){return this.fromWireType((c?G:D)[d])};case 1:return function(d){return this.fromWireType((c?E:va)[d>>1])};case 2:return function(d){return this.fromWireType((c?F:H)[d>>2])};default:throw new TypeError("Unknown integer type: "+a);}}
function Rb(a,b){var c=N[a];void 0===c&&S(b+" has unknown type "+Ib(a));return c}function yb(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Sb(a,b){switch(b){case 2:return function(c){return this.fromWireType(Ea[c>>2])};case 3:return function(c){return this.fromWireType(Fa[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
function Tb(a,b,c){switch(b){case 0:return c?function(d){return G[d]}:function(d){return D[d]};case 1:return c?function(d){return E[d>>1]}:function(d){return va[d>>1]};case 2:return c?function(d){return F[d>>2]}:function(d){return H[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}function Y(a){a||S("Cannot use deleted val. handle = "+a);return X[a].value}function Ub(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=Rb(F[(b>>2)+d],"parameter "+d);return c}var Vb={};
function Wb(a){var b=Vb[a];return void 0===b?Q(a):b}var Xb=[];function Yb(){return"object"===typeof globalThis?globalThis:Function("return this")()}function Zb(a){var b=Xb.length;Xb.push(a);return b}var $b={},ac=[];
function bc(a,b){cc=a;dc=b;if(ec)if(fc||(fc=!0),0==a)Z=function(){var d=Math.max(0,gc+b-hc())|0;setTimeout(ic,d)};else if(1==a)Z=function(){jc(ic)};else if(2==a){if("undefined"===typeof setImmediate){var c=[];addEventListener("message",function(d){if("setimmediate"===d.data||"setimmediate"===d.data.target)d.stopPropagation(),c.shift()()},!0);setImmediate=function(d){c.push(d);void 0===g.setImmediates&&(g.setImmediates=[]);g.setImmediates.push(d);postMessage({target:"setimmediate"})}}Z=function(){setImmediate(ic)}}}
var hc;hc=function(){return performance.now()};
function kc(a,b,c,d,e){function f(){if(l<lc){if(!noExitRuntime)try{mc(ka)}catch(k){Wa(k)}return!1}return!0}la(!ec,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");ec=a;nc=d;var l=lc;fc=!1;ic=function(){if(!B)if(0<oc.length){var k=Date.now(),m=oc.shift();m.Oa(m.Ea);if(pc){var n=pc,p=0==n%1?n-1:Math.floor(n);pc=m.Db?p:(8*n+(p+.5))/9}x('main loop blocker "'+m.name+
'" took '+(Date.now()-k)+" ms");g.setStatus&&(k=g.statusMessage||"Please wait...",m=pc,n=qc.Fb,m?m<n?g.setStatus(k+" ("+(n-m)+"/"+n+")"):g.setStatus(k):g.setStatus(""));f()&&setTimeout(ic,0)}else f()&&(rc=rc+1|0,1==cc&&1<dc&&0!=rc%dc?Z():(0==cc&&(gc=hc()),B||g.preMainLoop&&!1===g.preMainLoop()||(sc(a),g.postMainLoop&&g.postMainLoop()),f()&&("object"===typeof SDL&&SDL.audio&&SDL.audio.rb&&SDL.audio.rb(),Z())))};e||(b&&0<b?bc(0,1E3/b):bc(1,1),Z());if(c)throw"unwind";}
function sc(a){if(!B)try{a()}catch(b){Wa(b)}}function tc(a){setTimeout(function(){sc(a)},1E4)}var fc=!1,Z=null,lc=0,ec=null,nc=0,cc=0,dc=0,rc=0,oc=[];function uc(){lc++;var a=cc,b=dc,c=ec;ec=null;kc(c,0,!1,nc,!0);bc(a,b);Z()}var qc={},gc,ic,pc,vc=!1,wc=!1,xc=[],yc=[];
function zc(){function a(){wc=document.pointerLockElement===g.canvas||document.mozPointerLockElement===g.canvas||document.webkitPointerLockElement===g.canvas||document.msPointerLockElement===g.canvas}g.preloadPlugins||(g.preloadPlugins=[]);if(!Ac){Ac=!0;try{Bc=!0}catch(c){Bc=!1,x("warning: no blob constructor, cannot create blobs with mimetypes")}Cc="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:Bc?null:x("warning: no BlobBuilder");Fc="undefined"!=
typeof window?window.URL?window.URL:window.webkitURL:void 0;g.ab||"undefined"!==typeof Fc||(x("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),g.ab=!0);g.preloadPlugins.push({canHandle:function(c){return!g.ab&&/\.(jpg|jpeg|png|bmp)$/i.test(c)},handle:function(c,d,e,f){var l=null;if(Bc)try{l=new Blob([c],{type:Gc(d)}),l.size!==c.length&&(l=new Blob([(new Uint8Array(c)).buffer],{type:Gc(d)}))}catch(n){fa("Blob constructor present but fails: "+
n+"; falling back to blob builder")}l||(l=new Cc,l.append((new Uint8Array(c)).buffer),l=l.getBlob());var k=Fc.createObjectURL(l),m=new Image;m.onload=function(){la(m.complete,"Image "+d+" could not be decoded");var n=document.createElement("canvas");n.width=m.width;n.height=m.height;n.getContext("2d").drawImage(m,0,0);g.preloadedImages[d]=n;Fc.revokeObjectURL(k);e&&e(c)};m.onerror=function(){x("Image "+k+" could not be decoded");f&&f()};m.src=k}});g.preloadPlugins.push({canHandle:function(c){return!g.Ib&&
c.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(c,d,e,f){function l(t){m||(m=!0,g.preloadedAudios[d]=t,e&&e(c))}function k(){m||(m=!0,g.preloadedAudios[d]=new Audio,f&&f())}var m=!1;if(Bc){try{var n=new Blob([c],{type:Gc(d)})}catch(t){return k()}n=Fc.createObjectURL(n);var p=new Audio;p.addEventListener("canplaythrough",function(){l(p)},!1);p.onerror=function(){if(!m){x("warning: browser could not fully decode audio "+d+", trying slower base64 approach");for(var t="",u=0,h=0,r=0;r<c.length;r++)for(u=
u<<8|c[r],h+=8;6<=h;){var w=u>>h-6&63;h-=6;t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[w]}2==h?(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(u&3)<<4],t+="=="):4==h&&(t+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(u&15)<<2],t+="=");p.src="data:audio/x-"+d.substr(-3)+";base64,"+t;l(p)}};p.src=n;tc(function(){l(p)})}else return k()}});var b=g.canvas;b&&(b.requestPointerLock=b.requestPointerLock||b.mozRequestPointerLock||b.webkitRequestPointerLock||
b.msRequestPointerLock||function(){},b.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},b.exitPointerLock=b.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),g.elementPointerLock&&b.addEventListener("click",
function(c){!wc&&g.canvas.requestPointerLock&&(g.canvas.requestPointerLock(),c.preventDefault())},!1))}}
function Hc(a,b,c,d){if(b&&g.Ya&&a==g.canvas)return g.Ya;var e;if(b){var f={antialias:!1,alpha:!1,Gb:1};if(d)for(var l in d)f[l]=d[l];if("undefined"!==typeof GL&&(e=GL.Eb(a,f)))var k=GL.getContext(e).Cb}else k=a.getContext("2d");if(!k)return null;c&&(b||la("undefined"===typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),g.Ya=k,b&&GL.Hb(e),g.Kb=b,xc.forEach(function(m){m()}),zc());return k}var Ic=!1,Jc=void 0,Kc=void 0;
function Lc(a,b){function c(){vc=!1;var f=d.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===f?(d.exitFullscreen=Mc,Jc&&d.requestPointerLock(),vc=!0,Kc?("undefined"!=typeof SDL&&(F[SDL.screen>>2]=H[SDL.screen>>2]|8388608),Nc(g.canvas),Oc()):Nc(d)):(f.parentNode.insertBefore(d,f),f.parentNode.removeChild(f),Kc?("undefined"!=typeof SDL&&(F[SDL.screen>>2]=H[SDL.screen>>2]&
-8388609),Nc(g.canvas),Oc()):Nc(d));if(g.onFullScreen)g.onFullScreen(vc);if(g.onFullscreen)g.onFullscreen(vc)}Jc=a;Kc=b;"undefined"===typeof Jc&&(Jc=!0);"undefined"===typeof Kc&&(Kc=!1);var d=g.canvas;Ic||(Ic=!0,document.addEventListener("fullscreenchange",c,!1),document.addEventListener("mozfullscreenchange",c,!1),document.addEventListener("webkitfullscreenchange",c,!1),document.addEventListener("MSFullscreenChange",c,!1));var e=document.createElement("div");d.parentNode.insertBefore(e,d);e.appendChild(d);
e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||(e.webkitRequestFullscreen?function(){e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(e.webkitRequestFullScreen?function(){e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null);e.requestFullscreen()}
function Mc(){if(!vc)return!1;(document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]);return!0}var Pc=0;function jc(a){if("function"===typeof requestAnimationFrame)requestAnimationFrame(a);else{var b=Date.now();if(0===Pc)Pc=b+1E3/60;else for(;b+2>=Pc;)Pc+=1E3/60;setTimeout(a,Math.max(Pc-b,0))}}
function Gc(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]}var Qc=[];function Oc(){var a=g.canvas;Qc.forEach(function(b){b(a.width,a.height)})}
function Nc(a,b,c){b&&c?(a.Bb=b,a.mb=c):(b=a.Bb,c=a.mb);var d=b,e=c;g.forcedAspectRatio&&0<g.forcedAspectRatio&&(d/e<g.forcedAspectRatio?d=Math.round(e*g.forcedAspectRatio):e=Math.round(d/g.forcedAspectRatio));if((document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===a.parentNode&&"undefined"!=typeof screen){var f=Math.min(screen.width/d,screen.height/e);d=Math.round(d*f);e=Math.round(e*
f)}Kc?(a.width!=d&&(a.width=d),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=c&&(a.height=c),"undefined"!=typeof a.style&&(d!=b||e!=c?(a.style.setProperty("width",d+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),a.style.removeProperty("height"))))}var Ac,Bc,Cc,Fc,Rc={};
function Sc(){if(!Tc){var a={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",_:ca||"./this.program"},b;for(b in Rc)void 0===Rc[b]?delete a[b]:a[b]=Rc[b];var c=[];for(b in a)c.push(b+"="+a[b]);Tc=c}return Tc}var Tc,Uc=[null,[],[]];
function Vc(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}return function(){A("randomDevice")}}function Wc(a,b){Wc.bb||(Wc.bb=Vc());for(var c=0;c<b;c++)G[a+c>>0]=Wc.bb();return 0}
function Xc(){function a(l){return(l=l.toTimeString().match(/\(([A-Za-z ]+)\)$/))?l[1]:"GMT"}var b=(new Date).getFullYear(),c=new Date(b,0,1),d=new Date(b,6,1);b=c.getTimezoneOffset();var e=d.getTimezoneOffset(),f=Math.max(b,e);F[Yc()>>2]=60*f;F[Zc()>>2]=Number(b!=e);c=a(c);d=a(d);c=Ba(c);d=Ba(d);e<b?(F[$c()>>2]=c,F[$c()+4>>2]=d):(F[$c()>>2]=d,F[$c()+4>>2]=c)}var ad;function bd(a){return 0===a%4&&(0!==a%100||0===a%400)}function cd(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}
var dd=[31,29,31,30,31,30,31,31,30,31,30,31],ed=[31,28,31,30,31,30,31,31,30,31,30,31];function fd(a,b){for(a=new Date(a.getTime());0<b;){var c=a.getMonth(),d=(bd(a.getFullYear())?dd:ed)[c];if(b>d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
function gd(a,b,c,d){function e(h,r,w){for(h="number"===typeof h?h.toString():h||"";h.length<r;)h=w[0]+h;return h}function f(h,r){return e(h,r,"0")}function l(h,r){function w(R){return 0>R?-1:0<R?1:0}var z;0===(z=w(h.getFullYear()-r.getFullYear()))&&0===(z=w(h.getMonth()-r.getMonth()))&&(z=w(h.getDate()-r.getDate()));return z}function k(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),
0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function m(h){h=fd(new Date(h.ya+1900,0,1),h.Ta);var r=new Date(h.getFullYear()+1,0,4),w=k(new Date(h.getFullYear(),0,4));r=k(r);return 0>=l(w,h)?0>=l(r,h)?h.getFullYear()+1:h.getFullYear():h.getFullYear()-1}var n=F[d+40>>2];d={zb:F[d>>2],yb:F[d+4>>2],Ra:F[d+8>>2],La:F[d+12>>2],Ja:F[d+16>>2],ya:F[d+20>>2],Sa:F[d+24>>2],Ta:F[d+28>>2],Jb:F[d+32>>2],xb:F[d+
36>>2],Ab:n?qa(n):""};c=qa(c);n={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in n)c=c.replace(new RegExp(p,"g"),n[p]);var t="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
u="January February March April May June July August September October November December".split(" ");n={"%a":function(h){return t[h.Sa].substring(0,3)},"%A":function(h){return t[h.Sa]},"%b":function(h){return u[h.Ja].substring(0,3)},"%B":function(h){return u[h.Ja]},"%C":function(h){return f((h.ya+1900)/100|0,2)},"%d":function(h){return f(h.La,2)},"%e":function(h){return e(h.La,2," ")},"%g":function(h){return m(h).toString().substring(2)},"%G":function(h){return m(h)},"%H":function(h){return f(h.Ra,
2)},"%I":function(h){h=h.Ra;0==h?h=12:12<h&&(h-=12);return f(h,2)},"%j":function(h){return f(h.La+cd(bd(h.ya+1900)?dd:ed,h.Ja-1),3)},"%m":function(h){return f(h.Ja+1,2)},"%M":function(h){return f(h.yb,2)},"%n":function(){return"\n"},"%p":function(h){return 0<=h.Ra&&12>h.Ra?"AM":"PM"},"%S":function(h){return f(h.zb,2)},"%t":function(){return"\t"},"%u":function(h){return h.Sa||7},"%U":function(h){var r=new Date(h.ya+1900,0,1),w=0===r.getDay()?r:fd(r,7-r.getDay());h=new Date(h.ya+1900,h.Ja,h.La);return 0>
l(w,h)?f(Math.ceil((31-w.getDate()+(cd(bd(h.getFullYear())?dd:ed,h.getMonth()-1)-31)+h.getDate())/7),2):0===l(w,r)?"01":"00"},"%V":function(h){var r=new Date(h.ya+1901,0,4),w=k(new Date(h.ya+1900,0,4));r=k(r);var z=fd(new Date(h.ya+1900,0,1),h.Ta);return 0>l(z,w)?"53":0>=l(r,z)?"01":f(Math.ceil((w.getFullYear()<h.ya+1900?h.Ta+32-w.getDate():h.Ta+1-w.getDate())/7),2)},"%w":function(h){return h.Sa},"%W":function(h){var r=new Date(h.ya,0,1),w=1===r.getDay()?r:fd(r,0===r.getDay()?1:7-r.getDay()+1);h=
new Date(h.ya+1900,h.Ja,h.La);return 0>l(w,h)?f(Math.ceil((31-w.getDate()+(cd(bd(h.getFullYear())?dd:ed,h.getMonth()-1)-31)+h.getDate())/7),2):0===l(w,r)?"01":"00"},"%y":function(h){return(h.ya+1900).toString().substring(2)},"%Y":function(h){return h.ya+1900},"%z":function(h){h=h.xb;var r=0<=h;h=Math.abs(h)/60;return(r?"+":"-")+String("0000"+(h/60*100+h%60)).slice(-4)},"%Z":function(h){return h.Ab},"%%":function(){return"%"}};for(p in n)c.includes(p)&&(c=c.replace(new RegExp(p,"g"),n[p](d)));p=Ta(c,
!1);if(p.length>b)return 0;G.set(p,a);return p.length-1}fb=g.InternalError=eb("InternalError");for(var hd=Array(256),jd=0;256>jd;++jd)hd[jd]=String.fromCharCode(jd);ib=hd;jb=g.BindingError=eb("BindingError");T.prototype.isAliasOf=function(a){if(!(this instanceof T&&a instanceof T))return!1;var b=this.ta.wa.ua,c=this.ta.va,d=a.ta.wa.ua;for(a=a.ta.va;b.Ca;)c=b.Ma(c),b=b.Ca;for(;d.Ca;)a=d.Ma(a),d=d.Ca;return b===d&&c===a};
T.prototype.clone=function(){this.ta.va||kb(this);if(this.ta.Ka)return this.ta.count.value+=1,this;var a=ob,b=Object,c=b.create,d=Object.getPrototypeOf(this),e=this.ta;a=a(c.call(b,d,{ta:{value:{count:e.count,Ha:e.Ha,Ka:e.Ka,va:e.va,wa:e.wa,za:e.za,Ba:e.Ba}}}));a.ta.count.value+=1;a.ta.Ha=!1;return a};T.prototype["delete"]=function(){this.ta.va||kb(this);this.ta.Ha&&!this.ta.Ka&&S("Object already scheduled for deletion");mb(this);nb(this.ta);this.ta.Ka||(this.ta.za=void 0,this.ta.va=void 0)};
T.prototype.isDeleted=function(){return!this.ta.va};T.prototype.deleteLater=function(){this.ta.va||kb(this);this.ta.Ha&&!this.ta.Ka&&S("Object already scheduled for deletion");qb.push(this);1===qb.length&&pb&&pb(rb);this.ta.Ha=!0;return this};V.prototype.ib=function(a){this.cb&&(a=this.cb(a));return a};V.prototype.Za=function(a){this.Da&&this.Da(a)};V.prototype.argPackAdvance=8;V.prototype.readValueFromPointer=$a;V.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
V.prototype.fromWireType=function(a){function b(){return this.Qa?Eb(this.ua.Ia,{wa:this.pb,va:c,Ba:this,za:a}):Eb(this.ua.Ia,{wa:this,va:a})}var c=this.ib(a);if(!c)return this.Za(a),null;var d=Db(this.ua,c);if(void 0!==d){if(0===d.ta.count.value)return d.ta.va=c,d.ta.za=a,d.clone();d=d.clone();this.Za(a);return d}d=this.ua.hb(c);d=sb[d];if(!d)return b.call(this);d=this.Pa?d.eb:d.pointerType;var e=Bb(c,this.ua,d.ua);return null===e?b.call(this):this.Qa?Eb(d.ua.Ia,{wa:d,va:e,Ba:this,za:a}):Eb(d.ua.Ia,
{wa:d,va:e})};g.getInheritedInstanceCount=function(){return Object.keys(Cb).length};g.getLiveInheritedInstances=function(){var a=[],b;for(b in Cb)Cb.hasOwnProperty(b)&&a.push(Cb[b]);return a};g.flushPendingDeletes=rb;g.setDelayFunction=function(a){pb=a;qb.length&&pb&&pb(rb)};Hb=g.UnboundTypeError=eb("UnboundTypeError");g.count_emval_handles=function(){for(var a=0,b=5;b<X.length;++b)void 0!==X[b]&&++a;return a};g.get_first_emval=function(){for(var a=5;a<X.length;++a)if(void 0!==X[a])return X[a];return null};
g.requestFullscreen=function(a,b){Lc(a,b)};g.requestAnimationFrame=function(a){jc(a)};g.setCanvasSize=function(a,b,c){Nc(g.canvas,a,b);c||Oc()};g.pauseMainLoop=function(){Z=null;lc++};g.resumeMainLoop=function(){uc()};g.getUserMedia=function(){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia);window.getUserMedia(void 0)};g.createContext=function(a,b,c,d){return Hc(a,b,c,d)};
function Ta(a,b){var c=Array(sa(a)+1);a=ra(a,c,0,c.length);b&&(c.length=a);return c}
var md={aa:function(){},F:function(a){var b=Ya[a];delete Ya[a];var c=b.Va,d=b.Da,e=b.$a,f=e.map(function(l){return l.lb}).concat(e.map(function(l){return l.ub}));O([a],f,function(l){var k={};e.forEach(function(m,n){var p=l[n],t=m.jb,u=m.kb,h=l[n+e.length],r=m.tb,w=m.vb;k[m.gb]={read:function(z){return p.fromWireType(t(u,z))},write:function(z,R){var L=[];r(w,z,h.toWireType(L,R));Za(L)}}});return[{name:b.name,fromWireType:function(m){var n={},p;for(p in k)n[p]=k[p].read(m);d(m);return n},toWireType:function(m,
n){for(var p in k)if(!(p in n))throw new TypeError('Missing field:  "'+p+'"');var t=c();for(p in k)k[p].write(t,n[p]);null!==m&&m.push(d,t);return t},argPackAdvance:8,readValueFromPointer:$a,Aa:d}]})},N:function(){},X:function(a,b,c,d,e){var f=hb(c);b=Q(b);P(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,k){return k?d:e},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var k=G;else if(2===c)k=E;else if(4===c)k=F;else throw new TypeError("Unknown boolean type size: "+
b);return this.fromWireType(k[l>>f])},Aa:null})},z:function(a,b,c,d,e,f,l,k,m,n,p,t,u){p=Q(p);f=W(e,f);k&&(k=W(l,k));n&&(n=W(m,n));u=W(t,u);var h=cb(p);ub(h,function(){Kb("Cannot construct "+p+" due to unbound types",[d])});O([a,b,c],d?[d]:[],function(r){r=r[0];if(d){var w=r.ua;var z=w.Ia}else z=T.prototype;r=db(h,function(){if(Object.getPrototypeOf(this)!==R)throw new jb("Use 'new' to construct "+p);if(void 0===L.Fa)throw new jb(p+" has no accessible constructor");var Dc=L.Fa[arguments.length];if(void 0===
Dc)throw new jb("Tried to invoke ctor of "+p+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(L.Fa).toString()+") parameters instead!");return Dc.apply(this,arguments)});var R=Object.create(z,{constructor:{value:r}});r.prototype=R;var L=new vb(p,r,R,u,w,f,k,n);w=new V(p,L,!0,!1);z=new V(p+"*",L,!1,!1);var Ec=new V(p+" const*",L,!1,!0);sb[a]={pointerType:z,eb:Ec};Fb(h,r);return[w,z,Ec]})},h:function(a,b,c,d,e,f,l){var k=Nb(c,d);b=Q(b);f=W(e,f);O([],[a],function(m){function n(){Kb("Cannot call "+
p+" due to unbound types",k)}m=m[0];var p=m.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var t=m.ua.constructor;void 0===t[b]?(n.Ga=c-1,t[b]=n):(tb(t,b,p),t[b].xa[c-1]=n);O([],k,function(u){u=Mb(p,[u[0],null].concat(u.slice(1)),null,f,l);void 0===t[b].xa?(u.Ga=c-1,t[b]=u):t[b].xa[c-1]=u;return[]});return[]})},H:function(a,b,c,d,e,f){la(0<b);var l=Nb(b,c);e=W(d,e);O([],[a],function(k){k=k[0];var m="constructor "+k.name;void 0===k.ua.Fa&&(k.ua.Fa=[]);if(void 0!==k.ua.Fa[b-1])throw new jb("Cannot register multiple constructors with identical number of parameters ("+
(b-1)+") for class '"+k.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");k.ua.Fa[b-1]=function(){Kb("Cannot construct "+k.name+" due to unbound types",l)};O([],l,function(n){n.splice(1,0,null);k.ua.Fa[b-1]=Mb(m,n,null,e,f);return[]});return[]})},o:function(a,b,c,d,e,f,l,k){var m=Nb(c,d);b=Q(b);f=W(e,f);O([],[a],function(n){function p(){Kb("Cannot call "+t+" due to unbound types",m)}n=n[0];var t=n.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);
k&&n.ua.qb.push(b);var u=n.ua.Ia,h=u[b];void 0===h||void 0===h.xa&&h.className!==n.name&&h.Ga===c-2?(p.Ga=c-2,p.className=n.name,u[b]=p):(tb(u,b,t),u[b].xa[c-2]=p);O([],m,function(r){r=Mb(t,r,n,f,l);void 0===u[b].xa?(r.Ga=c-2,u[b]=r):u[b].xa[c-2]=r;return[]});return[]})},V:function(a,b){b=Q(b);P(a,{name:b,fromWireType:function(c){var d=X[c].value;Pb(c);return d},toWireType:function(c,d){return U(d)},argPackAdvance:8,readValueFromPointer:$a,Aa:null})},_:function(a,b,c,d){function e(){}c=hb(c);b=Q(b);
e.values={};P(a,{name:b,constructor:e,fromWireType:function(f){return this.constructor.values[f]},toWireType:function(f,l){return l.value},argPackAdvance:8,readValueFromPointer:Qb(b,c,d),Aa:null});ub(b,e)},I:function(a,b,c){var d=Rb(a,"enum");b=Q(b);a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:db(d.name+"_"+b,function(){})}});a.values[c]=d;a[b]=d},D:function(a,b,c){c=hb(c);b=Q(b);P(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,e){if("number"!==
typeof e&&"boolean"!==typeof e)throw new TypeError('Cannot convert "'+yb(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:Sb(b,c),Aa:null})},m:function(a,b,c,d,e){function f(n){return n}b=Q(b);-1===e&&(e=4294967295);var l=hb(c);if(0===d){var k=32-8*c;f=function(n){return n<<k>>>k}}var m=b.includes("unsigned");P(a,{name:b,fromWireType:f,toWireType:function(n,p){if("number"!==typeof p&&"boolean"!==typeof p)throw new TypeError('Cannot convert "'+yb(p)+'" to '+this.name);if(p<d||
p>e)throw new TypeError('Passing a number "'+yb(p)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+e+"]!");return m?p>>>0:p|0},argPackAdvance:8,readValueFromPointer:Tb(b,l,0!==d),Aa:null})},k:function(a,b,c){function d(f){f>>=2;var l=H;return new e(Da,l[f+1],l[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=Q(c);P(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},
{nb:!0})},E:function(a,b){b=Q(b);var c="std::string"===b;P(a,{name:b,fromWireType:function(d){var e=H[d>>2];if(c)for(var f=d+4,l=0;l<=e;++l){var k=d+4+l;if(l==e||0==D[k]){f=qa(f,k-f);if(void 0===m)var m=f;else m+=String.fromCharCode(0),m+=f;f=k+1}}else{m=Array(e);for(l=0;l<e;++l)m[l]=String.fromCharCode(D[d+4+l]);m=m.join("")}M(d);return m},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var f="string"===typeof e;f||e instanceof Uint8Array||e instanceof Uint8ClampedArray||
e instanceof Int8Array||S("Cannot pass non-string to std::string");var l=(c&&f?function(){return sa(e)}:function(){return e.length})(),k=C(4+l+1);H[k>>2]=l;if(c&&f)ra(e,D,k+4,l+1);else if(f)for(f=0;f<l;++f){var m=e.charCodeAt(f);255<m&&(M(k),S("String has UTF-16 code units that do not fit in 8 bits"));D[k+4+f]=m}else for(f=0;f<l;++f)D[k+4+f]=e[f];null!==d&&d.push(M,k);return k},argPackAdvance:8,readValueFromPointer:$a,Aa:function(d){M(d)}})},x:function(a,b,c){c=Q(c);if(2===b){var d=ua;var e=wa;var f=
xa;var l=function(){return va};var k=1}else 4===b&&(d=ya,e=za,f=Aa,l=function(){return H},k=2);P(a,{name:c,fromWireType:function(m){for(var n=H[m>>2],p=l(),t,u=m+4,h=0;h<=n;++h){var r=m+4+h*b;if(h==n||0==p[r>>k])u=d(u,r-u),void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),u=r+b}M(m);return t},toWireType:function(m,n){"string"!==typeof n&&S("Cannot pass non-string to C++ string type "+c);var p=f(n),t=C(4+p+b);H[t>>2]=p>>k;e(n,t+4,p+b);null!==m&&m.push(M,t);return t},argPackAdvance:8,readValueFromPointer:$a,
Aa:function(m){M(m)}})},G:function(a,b,c,d,e,f){Ya[a]={name:Q(b),Va:W(c,d),Da:W(e,f),$a:[]}},r:function(a,b,c,d,e,f,l,k,m,n){Ya[a].$a.push({gb:Q(b),lb:c,jb:W(d,e),kb:f,ub:l,tb:W(k,m),vb:n})},Y:function(a,b){b=Q(b);P(a,{ob:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},j:function(a,b,c){a=Y(a);b=Rb(b,"emval::as");var d=[],e=U(d);F[c>>2]=e;return b.toWireType(d,a)},q:function(a,b,c,d){a=Y(a);c=Ub(b,c);for(var e=Array(b),f=0;f<b;++f){var l=c[f];e[f]=l.readValueFromPointer(d);
d+=l.argPackAdvance}a=a.apply(void 0,e);return U(a)},v:function(a,b,c,d,e){a=Xb[a];b=Y(b);c=Wb(c);var f=[];F[d>>2]=U(f);return a(b,c,f,e)},s:function(a,b,c,d){a=Xb[a];b=Y(b);c=Wb(c);a(b,c,null,d)},a:Pb,b:function(a,b){a=Y(a);b=Y(b);return a==b},l:function(a){if(0===a)return U(Yb());a=Wb(a);return U(Yb()[a])},n:function(a,b){b=Ub(a,b);for(var c=b[0],d=c.name+"_$"+b.slice(1).map(function(n){return n.name}).join("_")+"$",e=["retType"],f=[c],l="",k=0;k<a-1;++k)l+=(0!==k?", ":"")+"arg"+k,e.push("argType"+
k),f.push(b[1+k]);d="return function "+cb("methodCaller_"+d)+"(handle, name, destructors, args) {\n";var m=0;for(k=0;k<a-1;++k)d+="    var arg"+k+" = argType"+k+".readValueFromPointer(args"+(m?"+"+m:"")+");\n",m+=b[k+1].argPackAdvance;d+="    var rv = handle[name]("+l+");\n";for(k=0;k<a-1;++k)b[k+1].deleteObject&&(d+="    argType"+k+".deleteObject(arg"+k+");\n");c.ob||(d+="    return retType.toWireType(destructors, rv);\n");e.push(d+"};\n");a=Lb(e).apply(null,f);return Zb(a)},g:function(a,b){a=Y(a);
b=Y(b);return U(a[b])},c:function(a){4<a&&(X[a].Wa+=1)},p:function(a,b,c,d){a=Y(a);var e=$b[b];if(!e){e="";for(var f=0;f<b;++f)e+=(0!==f?", ":"")+"arg"+f;var l="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";for(f=0;f<b;++f)l+="var argType"+f+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+f+'], "parameter '+f+'");\nvar arg'+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+f+"['argPackAdvance'];\n";e=(new Function("requireRegisteredType","Module",
"__emval_register",l+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n")))(Rb,g,U);$b[b]=e}return e(a,c,d)},e:function(a){return U(Wb(a))},i:function(a){Za(X[a].value);Pb(a)},t:function(a,b,c){a=Y(a);b=Y(b);c=Y(c);a[b]=c},f:function(a,b){a=Rb(a,"_emval_take_value");a=a.readValueFromPointer(b);return U(a)},d:function(){A()},A:function(a,b,c){ac.length=0;var d;for(c>>=2;d=D[b++];)(d=105>d)&&c&1&&c++,ac.push(d?Fa[c++>>1]:F[c]),++c;return Ua[a].apply(null,ac)},B:function(a,b,c,d,
e,f){b=qa(b);a=yc[a];var l=-1;e&&(l=a.Na.length,a.Na.push({Oa:I.get(e),Ea:f}),a.Xa++);b={funcName:b,callbackId:l,data:c?new Uint8Array(D.subarray(c,c+d)):0};c?a.worker.postMessage(b,[b.data.buffer]):a.worker.postMessage(b)},M:function(a){a=qa(a);var b=yc.length;a={worker:new Worker(a),Na:[],Xa:0,buffer:0,bufferSize:0};a.worker.onmessage=function(c){if(!B){var d=yc[b];if(d){var e=c.data.callbackId,f=d.Na[e];if(f)if(c.data.finalResponse&&(d.Xa--,d.Na[e]=null),c=c.data.data){c.byteLength||(c=new Uint8Array(c));
if(!d.buffer||d.bufferSize<c.length)d.buffer&&M(d.buffer),d.bufferSize=c.length,d.buffer=C(c.length);D.set(c,d.buffer);f.Oa(d.buffer,c.length,f.Ea)}else f.Oa(0,0,f.Ea)}}};yc.push(a);return b},C:function(a){var b=yc[a];b.worker.terminate();b.buffer&&M(b.buffer);yc[a]=null},P:function(a,b,c){D.copyWithin(a,b,b+c)},$:function(){Z=null;lc++},w:function(a){var b=D.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(a,d);0<d%65536&&(d+=65536-
d%65536);a:{try{ja.grow(Math.min(2147483648,d)-Da.byteLength+65535>>>16);Ga();var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},Z:function(){uc()},W:function(a,b,c){a=I.get(a);kc(a,b,c)},y:function(a,b){if(kd)throw"already responded with final response!";kd=!0;b={callbackId:ld,finalResponse:!0,data:a?new Uint8Array(D.subarray(a,a+b)):0};a?postMessage(b,[b.data.buffer]):postMessage(b)},S:function(a,b){var c=0;Sc().forEach(function(d,e){var f=b+c;e=F[a+4*e>>2]=f;for(f=0;f<d.length;++f)G[e++>>
0]=d.charCodeAt(f);G[e>>0]=0;c+=d.length+1});return 0},T:function(a,b){var c=Sc();F[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});F[b>>2]=d;return 0},U:function(a,b,c,d){for(var e=0,f=0;f<c;f++){for(var l=F[b+8*f>>2],k=F[b+(8*f+4)>>2],m=0;m<k;m++){var n=D[l+m],p=Uc[a];0===n||10===n?((1===a?x:y)(pa(p,0)),p.length=0):p.push(n)}e+=k}F[d>>2]=e;return 0},Q:Wc,u:function(a){var b=Date.now();F[a>>2]=b/1E3|0;F[a+4>>2]=b%1E3*1E3|0;return 0},L:function(a,b){ad||(ad=!0,Xc());a=new Date(1E3*F[a>>
2]);F[b>>2]=a.getSeconds();F[b+4>>2]=a.getMinutes();F[b+8>>2]=a.getHours();F[b+12>>2]=a.getDate();F[b+16>>2]=a.getMonth();F[b+20>>2]=a.getFullYear()-1900;F[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);F[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;F[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();a=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0;F[b+32>>2]=a;a=F[$c()+(a?4:0)>>2];F[b+40>>2]=a;return b},J:function(a){ad||
(ad=!0,Xc());var b=new Date(F[a+20>>2]+1900,F[a+16>>2],F[a+12>>2],F[a+8>>2],F[a+4>>2],F[a>>2],0),c=F[a+32>>2],d=b.getTimezoneOffset(),e=new Date(b.getFullYear(),0,1),f=(new Date(b.getFullYear(),6,1)).getTimezoneOffset(),l=e.getTimezoneOffset(),k=Math.min(l,f);0>c?F[a+32>>2]=Number(f!=l&&k==d):0<c!=(k==d)&&(f=Math.max(l,f),b.setTime(b.getTime()+6E4*((0<c?k:f)-d)));F[a+24>>2]=b.getDay();F[a+28>>2]=(b.getTime()-e.getTime())/864E5|0;F[a>>2]=b.getSeconds();F[a+4>>2]=b.getMinutes();F[a+8>>2]=b.getHours();
F[a+12>>2]=b.getDate();F[a+16>>2]=b.getMonth();return b.getTime()/1E3|0},O:function(){},R:function(a,b,c,d){return gd(a,b,c,d)},K:function(a){var b=Date.now()/1E3|0;a&&(F[a>>2]=b);return b}};
(function(){function a(e){g.asm=e.exports;ja=g.asm.ba;Ga();I=g.asm.na;Ia.unshift(g.asm.ca);J--;g.monitorRunDependencies&&g.monitorRunDependencies(J);0==J&&(null!==Na&&(clearInterval(Na),Na=null),Oa&&(e=Oa,Oa=null,e()))}function b(e){a(e.instance)}function c(e){return Sa().then(function(f){return WebAssembly.instantiate(f,d)}).then(function(f){return f}).then(e,function(f){y("failed to asynchronously prepare wasm: "+f);A(f)})}var d={a:md};J++;g.monitorRunDependencies&&g.monitorRunDependencies(J);if(g.instantiateWasm)try{return g.instantiateWasm(d,
a)}catch(e){return y("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return ia||"function"!==typeof WebAssembly.instantiateStreaming||Pa()||"function"!==typeof fetch?c(b):fetch(K,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){y("wasm streaming compile failed: "+f);y("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();
g.___wasm_call_ctors=function(){return(g.___wasm_call_ctors=g.asm.ca).apply(null,arguments)};var C=g._malloc=function(){return(C=g._malloc=g.asm.da).apply(null,arguments)},M=g._free=function(){return(M=g._free=g.asm.ea).apply(null,arguments)};g._main=function(){return(g._main=g.asm.fa).apply(null,arguments)};g._pushData=function(){return(g._pushData=g.asm.ga).apply(null,arguments)};var Jb=g.___getTypeName=function(){return(Jb=g.___getTypeName=g.asm.ha).apply(null,arguments)};
g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.ia).apply(null,arguments)};var $c=g.__get_tzname=function(){return($c=g.__get_tzname=g.asm.ja).apply(null,arguments)},Zc=g.__get_daylight=function(){return(Zc=g.__get_daylight=g.asm.ka).apply(null,arguments)},Yc=g.__get_timezone=function(){return(Yc=g.__get_timezone=g.asm.la).apply(null,arguments)},na=g.stackAlloc=function(){return(na=g.stackAlloc=g.asm.ma).apply(null,arguments)};
g.dynCall_viijj=function(){return(g.dynCall_viijj=g.asm.oa).apply(null,arguments)};g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.pa).apply(null,arguments)};g.dynCall_iiiiij=function(){return(g.dynCall_iiiiij=g.asm.qa).apply(null,arguments)};g.dynCall_iiiiijj=function(){return(g.dynCall_iiiiijj=g.asm.ra).apply(null,arguments)};g.dynCall_iiiiiijj=function(){return(g.dynCall_iiiiiijj=g.asm.sa).apply(null,arguments)};g.print=x;var nd;
function Xa(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}Oa=function od(){nd||pd();nd||(Oa=od)};
function pd(a){function b(){if(!nd&&(nd=!0,g.calledRun=!0,!B)){La=!0;Va(Ia);Va(Ja);if(g.onRuntimeInitialized)g.onRuntimeInitialized();if(qd){var c=a,d=g._main;c=c||[];var e=c.length+1,f=na(4*(e+1));F[f>>2]=Ca(ca);for(var l=1;l<e;l++)F[(f>>2)+l]=Ca(c[l-1]);F[(f>>2)+e]=0;try{var k=d(e,f);mc(k)}catch(m){Wa(m)}finally{}}if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;)c=g.postRun.shift(),Ka.unshift(c);Va(Ka)}}a=a||ba;if(!(0<J)){if(g.preRun)for("function"==typeof g.preRun&&
(g.preRun=[g.preRun]);g.preRun.length;)Ma();Va(Ha);0<J||(g.setStatus?(g.setStatus("Running..."),setTimeout(function(){setTimeout(function(){g.setStatus("")},1);b()},1)):b())}}g.run=pd;function mc(a){ka=ka=a;if(!noExitRuntime){if(g.onExit)g.onExit(a);B=!0}da(a,new Xa(a))}if(g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();var qd=!0;g.noInitialRun&&(qd=!1);pd();var kd=!1,ld=-1;
(function(){function a(){if(c&&La){var f=c;c=null;f.forEach(function(l){onmessage(l)})}}function b(){a();c&&setTimeout(b,100)}var c=null,d=0,e=0;onmessage=function(f){if(La){a();var l=g["_"+f.data.funcName];if(!l)throw"invalid worker function to call: "+f.data.funcName;var k=f.data.data;if(k){k.byteLength||(k=new Uint8Array(k));if(!d||e<k.length)d&&M(d),e=k.length,d=C(k.length);D.set(k,d)}kd=!1;ld=f.data.callbackId;k?l(d,k.length):l(0,0)}else c||(c=[],setTimeout(b,100)),c.push(f)}})();
