/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/libavoid-js@0.5.0-beta.5/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
var Bt=e=>({avoidLib:void 0,async load(t=void 0){if(this.avoidLib)console.log("Avoid library is already initialized");else{let r=function(e,r){return void 0!==t&&e.endsWith(".wasm")?t:r+e};this.avoidLib=await e({locateFile:r})}},getInstance(){if(!this.avoidLib)throw new Error("Avoid library should be initialized before using");return this.avoidLib}}),xr=(()=>{var e=import.meta.url;return async function(t={}){var r,n,i,o,a=t,s=new Promise(((e,t)=>{n=e,i=t})),l="./this.program",u="";if(typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),e&&(u=e),u=u.startsWith("blob:")?"":u.slice(0,u.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&typeof WorkerGlobalScope>"u")throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");o=async e=>{if(g(!F(e),"readAsync does not work with file:// URLs"),(e=await fetch(e,{credentials:"same-origin"})).ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)};var c,d=console.log.bind(console),f=console.error.bind(console);g(!0,"worker environment detected but not enabled at build time.  Add `worker` to `-sENVIRONMENT` to enable."),g(!0,"node environment detected but not enabled at build time.  Add `node` to `-sENVIRONMENT` to enable."),g(!0,"shell environment detected but not enabled at build time.  Add `shell` to `-sENVIRONMENT` to enable."),"object"!=typeof WebAssembly&&f("no native wasm support detected");var h,m,p=!1;function g(e,t){e||G("Assertion failed"+(t?": "+t:""))}var y,v,w,b,_,T,E,A,S,C,$=!1,I=!1,F=e=>e.startsWith("file://");function P(){if(!p){var e=jt();0==e&&(e+=4);var t=T[e>>2],r=T[e+4>>2];34821223==t&&2310721022==r||G(`Stack overflow! Stack cookie has been overwritten at ${ie(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ie(r)} ${ie(t)}`),1668509029!=T[0]&&G("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var R=new Int16Array(1),M=new Int8Array(R.buffer);if(R[0]=25459,115!==M[0]||99!==M[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";function O(e){Object.getOwnPropertyDescriptor(a,e)||Object.defineProperty(a,e,{configurable:!0,set(){G(`Attempt to set \`Module.${e}\` after it has already been processed.  This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`)}})}function k(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function x(e,t){typeof globalThis>"u"||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){t()}})}function U(e,t){x(e,(()=>{oe(`\`${e}\` is not longer defined by emscripten. ${t}`)}))}function L(e){Object.getOwnPropertyDescriptor(a,e)||Object.defineProperty(a,e,{configurable:!0,get(){var t=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;k(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),G(t)}})}function W(){var e=h.buffer;y=new Int8Array(e),w=new Int16Array(e),v=new Uint8Array(e),b=new Uint16Array(e),_=new Int32Array(e),T=new Uint32Array(e),E=new Float32Array(e),C=new Float64Array(e),A=new BigInt64Array(e),S=new BigUint64Array(e)}U("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),U("asm","Please use wasmExports instead"),g(typeof Int32Array<"u"&&typeof Float64Array<"u"&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var N=0,D=null,j={},B=null;function G(e){throw a.onAbort?.(e),f(e="Aborted("+e+")"),p=!0,$&&Gt(),e=new WebAssembly.RuntimeError(e),i(e),e}function V(){G("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")}function H(e,t){return(...r)=>{g($,`native function \`${e}\` called before runtime initialization`),g(!I,`native function \`${e}\` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)`);var n=xt[e];return g(n,`exported native function \`${e}\` not found`),g(r.length<=t,`native function \`${e}\` called with ${r.length} args but expects ${t}`),n(...r)}}var z,J=0;function Y(e){return(...t)=>{if(p)throw"program has already aborted!";J++;try{return e(...t)}catch(e){if(p||1<J||"unwind"===e)throw e;G("unhandled exception: "+[e,e.stack])}finally{J--}}}async function K(e,t){try{var r=await async function(e){if(!c)try{var t=await o(e);return new Uint8Array(t)}catch{}if(e!=z||!c)throw"both async and sync fetching of the wasm failed";return new Uint8Array(c)}(e);return await WebAssembly.instantiate(r,t)}catch(e){f(`failed to asynchronously prepare wasm: ${e}`),F(z)&&f(`warning: Loading from a file URI (${z}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),G(e)}}class q{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var Z,X,Q=e=>{for(;0<e.length;)e.shift()(a)},ee=[],te=[],re=()=>{var e=a.preRun.shift();te.push(e)},ne=!1,ie=e=>(g("number"==typeof e),"0x"+(e>>>0).toString(16).padStart(8,"0")),oe=e=>{oe.M||(oe.M={}),oe.M[e]||(oe.M[e]=1,f(e))},ae=typeof TextDecoder<"u"?new TextDecoder:void 0,se=(e,t=0,r=NaN)=>{var n=t+r;for(r=t;e[r]&&!(r>=n);)++r;if(16<r-t&&e.buffer&&ae)return ae.decode(e.subarray(t,r));for(n="";t<r;){var i=e[t++];if(128&i){var o=63&e[t++];if(192==(224&i))n+=String.fromCharCode((31&i)<<6|o);else{var a=63&e[t++];224==(240&i)?i=(15&i)<<12|o<<6|a:(240!=(248&i)&&oe("Invalid UTF-8 leading byte "+ie(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(7&i)<<18|o<<12|a<<6|63&e[t++]),65536>i?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else n+=String.fromCharCode(i)}return n},le=(e,t)=>(g("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),e?se(v,e,t):""),ue=e=>(e=e.getArg(xt.__cpp_exception,0),qt(e)),ce=e=>{var t=ue(e);e=Jt();var r=zt(4),n=zt(4);if(Zt(t,r,n),t=T[r>>2],n=T[n>>2],r=le(t),Wt(t),n){var i=le(n);Wt(n)}return Ht(e),[r,i]},de=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},fe=e=>{for(var t="";v[e];)t+=X[v[e++]];return t},he={},me={},pe={},ge=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},ye=e=>{throw new ge(e)};function ve(e,t,r={}){if(void 0===t.o)throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,r={}){var n=t.name;if(!e)throw new ge(`type "${n}" must have a positive integer typeid pointer`);if(me.hasOwnProperty(e)){if(r.V)return;throw new ge(`Cannot register type '${n}' twice`)}me[e]=t,delete pe[e],he.hasOwnProperty(e)&&(t=he[e],delete he[e],t.forEach((e=>e())))}(e,t,r)}var we=(e,t,r)=>{switch(t){case 1:return r?e=>y[e]:e=>v[e];case 2:return r?e=>w[e>>1]:e=>b[e>>1];case 4:return r?e=>_[e>>2]:e=>T[e>>2];case 8:return r?e=>A[e>>3]:e=>S[e>>3];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},be=e=>{throw new ge(e.g.j.h.name+" instance already deleted")},_e=!1,Te=()=>{},Ee=(e,t,r)=>t===r?e:void 0===r.m?null:null===(e=Ee(e,t,r.m))?null:r.R(e),Ae={},Se={},Ce=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},$e=(e,t)=>{if(!t.j||!t.i)throw new Ce("makeClassHandle requires ptr and ptrType");if(!!t.v!=!!t.l)throw new Ce("Both smartPtrType and smartPtr must be specified");return t.count={value:1},Fe(Object.create(e,{g:{value:t,writable:!0}}))};function Ie(e){function t(){return this.K?$e(this.h.A,{j:this.Y,i:r,v:this,l:e}):$e(this.h.A,{j:this,i:e})}var r=this.U(e);if(!r)return this.N(e),null;var n=((e,t)=>{if(void 0===t)throw new ge("ptr should not be undefined");for(;e.m;)t=e.H(t),e=e.m;return Se[t]})(this.h,r);if(void 0!==n)return 0===n.g.count.value?(n.g.i=r,n.g.l=e,n.clone()):(n=n.clone(),this.N(e),n);if(n=this.h.T(r),!(n=Ae[n]))return t.call(this);n=this.J?n.P:n.pointerType;var i=Ee(r,this.h,n.h);return null===i?t.call(this):this.K?$e(n.h.A,{j:n,i:i,v:this,l:e}):$e(n.h.A,{j:n,i:i})}var Fe=e=>typeof FinalizationRegistry>"u"?(Fe=e=>e,e):(_e=new FinalizationRegistry((e=>{console.warn(e.X),--(e=e.g).count.value,0===e.count.value&&(e.l?e.v.B(e.l):e.j.h.B(e.i))})),Te=e=>{_e.unregister(e)},(Fe=e=>{var t=e.g;if(t.l){var r={g:t};t=Error(`Embind found a leaked C++ instance ${t.j.h.name} <${ie(t.i)}>.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated`),"captureStackTrace"in Error&&Error.captureStackTrace(t,Ie),r.X=t.stack.replace(/^Error: /,""),_e.register(e,r,e)}return e})(e)),Pe=[];function Re(){}var Me=(e,t)=>Object.defineProperty(t,"name",{value:e}),Oe=(e,t,r)=>{if(void 0===e[t].u){var n=e[t];e[t]=function(...n){if(!e[t].u.hasOwnProperty(n.length))throw new ge(`Function '${r}' called with an invalid number of arguments (${n.length}) - expects one of (${e[t].u})!`);return e[t].u[n.length].apply(this,n)},e[t].u=[],e[t].u[n.C]=n}},ke=(e,t)=>{if(a.hasOwnProperty(e))throw new ge(`Cannot register public name '${e}' twice`);a[e]=t,a[e].C=void 0};function xe(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.A=r,this.B=n,this.m=i,this.T=o,this.H=a,this.R=s,this.Z=[]}var Ue=(e,t,r)=>{for(;t!==r;){if(!t.H)throw new ge(`Expected null or instance of ${r.name}, got an instance of ${t.name}`);e=t.H(e),t=t.m}return e};function Le(e,t){if(null===t){if(this.L)throw new ge(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new ge(`Cannot pass "${de(t)}" as a ${this.name}`);if(!t.g.i)throw new ge(`Cannot pass deleted object as a pointer of type ${this.name}`);return Ue(t.g.i,t.g.j.h,this.h)}function We(e,t){if(null===t){if(this.L)throw new ge(`null is not a valid ${this.name}`);if(this.K){var r=this.$();return null!==e&&e.push(this.B,r),r}return 0}if(!t||!t.g)throw new ge(`Cannot pass "${de(t)}" as a ${this.name}`);if(!t.g.i)throw new ge(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.J&&t.g.j.J)throw new ge(`Cannot convert argument of type ${t.g.v?t.g.v.name:t.g.j.name} to parameter type ${this.name}`);if(r=Ue(t.g.i,t.g.j.h,this.h),this.K){if(void 0===t.g.l)throw new ge("Passing raw pointer to smart pointer is illegal");switch(this.ba){case 0:if(t.g.v!==this)throw new ge(`Cannot convert argument of type ${t.g.v?t.g.v.name:t.g.j.name} to parameter type ${this.name}`);r=t.g.l;break;case 1:r=t.g.l;break;case 2:if(t.g.v===this)r=t.g.l;else{var n=t.clone();r=this.aa(r,at((()=>n.delete()))),null!==e&&e.push(this.B,r)}break;default:throw new ge("Unsupporting sharing policy")}}return r}function Ne(e,t){if(null===t){if(this.L)throw new ge(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new ge(`Cannot pass "${de(t)}" as a ${this.name}`);if(!t.g.i)throw new ge(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.j.J)throw new ge(`Cannot convert argument of type ${t.g.j.name} to parameter type ${this.name}`);return Ue(t.g.i,t.g.j.h,this.h)}function De(e){return this.fromWireType(T[e>>2])}function je(e,t,r,n,i,o,a,s,l,u,c){this.name=e,this.h=t,this.L=r,this.J=n,this.K=i,this.Y=o,this.ba=a,this.O=s,this.$=l,this.aa=u,this.B=c,i||void 0!==t.m?this.toWireType=We:(this.toWireType=n?Le:Ne,this.s=null)}var Be=[],Ge=(e,t,r=!1)=>{if(g(!r,"Async bindings are only supported with JSPI."),e=fe(e),(r=Be[t])||(Be[t]=r=Z.get(t)),g(Z.get(t)==r,"JavaScript-side Wasm function table mirror is out of date!"),"function"!=typeof r)throw new ge(`unknown function pointer with signature ${e}: ${t}`);return r};class Ve extends Error{}var He=e=>{e=Ut(e);var t=fe(e);return Wt(e),t},ze=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||me[t]||(pe[t]?pe[t].forEach(e):(r.push(t),n[t]=!0))})),new Ve(`${e}: `+r.map(He).join([", "]))},Je=(e,t,r)=>{function n(t){if((t=r(t)).length!==e.length)throw new Ce("Mismatched type converter count");for(var n=0;n<e.length;++n)ve(e[n],t[n])}e.forEach((e=>pe[e]=t));var i=Array(t.length),o=[],a=0;t.forEach(((e,t)=>{me.hasOwnProperty(e)?i[t]=me[e]:(o.push(e),he.hasOwnProperty(e)||(he[e]=[]),he[e].push((()=>{i[t]=me[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)},Ye=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Ke(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].s)return!0;return!1}function qe(e,t,r,n,i){(e<t||e>r)&&i(`function ${n} called with ${e} arguments, expected ${t==r?t:`${t} to ${r}`}`)}function Ze(e,t,r,n,i,o){var a=t.length;if(2>a)throw new ge("argTypes array size mismatch! Must at least get return value and 'this' types!");g(!o,"Async bindings are only supported with JSPI.");var s=null!==t[1]&&null!==r,l=Ke(t);r="void"!==t[0].name;for(var u=a-2,c=t.length-2,d=t.length-1;2<=d&&t[d].optional;--d)c--;for(n=[e,ye,n,i,Ye,t[0],t[1]],i=0;i<a-2;++i)n.push(t[i+2]);if(!l)for(i=s?1:2;i<t.length;++i)null!==t[i].s&&n.push(t[i].s);for(n.push(qe,c,u),l=Ke(t),u=t.length-2,c=[],i=["fn"],s&&i.push("thisWired"),a=0;a<u;++a)c.push(`arg${a}`),i.push(`arg${a}Wired`);c=c.join(","),i=i.join(","),c=`return function (${c}) {\ncheckArgCount(arguments.length, minArgs, maxArgs, humanName, throwBindingError);\n`,l&&(c+="var destructors = [];\n");var f=l?"destructors":"null";for(d="humanName throwBindingError invoker fn runDestructors retType classParam".split(" "),s&&(c+=`var thisWired = classParam['toWireType'](${f}, this);\n`),a=0;a<u;++a)c+=`var arg${a}Wired = argType${a}['toWireType'](${f}, arg${a});\n`,d.push(`argType${a}`);if(c+=(r||o?"var rv = ":"")+`invoker(${i});\n`,l)c+="runDestructors(destructors);\n";else for(a=s?1:2;a<t.length;++a)o=1===a?"thisWired":"arg"+(a-2)+"Wired",null!==t[a].s&&(c+=`${o}_dtor(${o});\n`,d.push(`${o}_dtor`));r&&(c+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),c+="}\n",d.push("checkArgCount","minArgs","maxArgs"),c=`if (arguments.length !== ${d.length}){ throw new Error(humanName + "Expected ${d.length} closure arguments " + arguments.length + " given."); }\n${c}`;let[h,m]=[d,c];return t=new Function(...h,m)(...n),Me(e,t)}for(var Xe,Qe=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(T[t+4*n>>2]);return r},et=e=>{let t=(e=e.trim()).indexOf("(");return-1===t?e:(g(e.endsWith(")"),"Parentheses for argument names should match."),e.slice(0,t))},tt=(e,t,r)=>{if(!(e instanceof Object))throw new ge(`${r} with invalid "this": ${e}`);if(!(e instanceof t.h.constructor))throw new ge(`${r} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.i)throw new ge(`cannot call emscripten binding method ${r} on deleted object`);return Ue(e.g.i,e.g.j.h,t.h)},rt=[],nt=[],it=e=>{9<e&&0==--nt[e+1]&&(g(void 0!==nt[e],"Decref for unallocated handle."),nt[e]=void 0,rt.push(e))},ot=e=>{if(!e)throw new ge(`Cannot use deleted val. handle = ${e}`);return g(2===e||void 0!==nt[e]&&e%2==0,`invalid handle: ${e}`),nt[e]},at=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=rt.pop()||nt.length;return nt[t]=e,nt[t+1]=1,t}},st={name:"emscripten::val",fromWireType:e=>{var t=ot(e);return it(e),t},toWireType:(e,t)=>at(t),o:8,readValueFromPointer:De,s:null},lt=(e,t,r)=>{switch(t){case 1:return r?function(e){return this.fromWireType(y[e])}:function(e){return this.fromWireType(v[e])};case 2:return r?function(e){return this.fromWireType(w[e>>1])}:function(e){return this.fromWireType(b[e>>1])};case 4:return r?function(e){return this.fromWireType(_[e>>2])}:function(e){return this.fromWireType(T[e>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ut=(e,t)=>{var r=me[e];if(void 0===r)throw e=`${t} has unknown type ${He(e)}`,new ge(e);return r},ct=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(E[e>>2])};case 8:return function(e){return this.fromWireType(C[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dt=Object.assign({optional:!0},st),ft=(e,t,r)=>{g("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");var n=v;if(g("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),0<r){var i=t;r=t+r-1;for(var o=0;o<e.length;++o){var a=e.charCodeAt(o);if(55296<=a&&57343>=a)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(127>=a){if(t>=r)break;n[t++]=a}else{if(2047>=a){if(t+1>=r)break;n[t++]=192|a>>6}else{if(65535>=a){if(t+2>=r)break;n[t++]=224|a>>12}else{if(t+3>=r)break;1114111<a&&oe("Invalid Unicode code point "+ie(a)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),n[t++]=240|a>>18,n[t++]=128|a>>12&63}n[t++]=128|a>>6&63}n[t++]=128|63&a}}n[t]=0,e=t-i}else e=0;return e},ht=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);127>=n?t++:2047>=n?t+=2:55296<=n&&57343>=n?(t+=4,++r):t+=3}return t},mt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,pt=(e,t)=>{g(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e>>1,n=r+t/2;!(r>=n)&&b[r];)++r;if(32<(r<<=1)-e&&mt)return mt.decode(v.subarray(e,r));for(r="",n=0;!(n>=t/2);++n){var i=w[e+2*n>>1];if(0==i)break;r+=String.fromCharCode(i)}return r},gt=(e,t,r)=>{if(g(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),g("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r??=2147483647,2>r)return 0;var n=t;r=(r-=2)<2*e.length?r/2:e.length;for(var i=0;i<r;++i)w[t>>1]=e.charCodeAt(i),t+=2;return w[t>>1]=0,t-n},yt=e=>2*e.length,vt=(e,t)=>{g(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var i=_[e+4*r>>2];if(0==i)break;++r,65536<=i?(i-=65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i)):n+=String.fromCharCode(i)}return n},wt=(e,t,r)=>{if(g(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),g("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r??=2147483647,4>r)return 0;var n=t;r=n+r-4;for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);if(55296<=o&&57343>=o)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i);if(_[t>>2]=o,(t+=4)+4>r)break}return _[t>>2]=0,t-n},bt=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);55296<=n&&57343>=n&&++r,t+=4}return t},_t=0,Tt=[],Et=(e,t,r)=>{var n=[];return e=e.toWireType(n,r),n.length&&(T[t>>2]=at(n)),e},At={},St=e=>{if(!(e instanceof q||"unwind"==e))throw P(),e instanceof WebAssembly.RuntimeError&&0>=Jt()&&f("Stack overflow detected.  You can try increasing -sSTACK_SIZE (currently set to 65536)"),e},Ct=e=>{throw m=e,ne||0<_t||(a.onExit?.(e),p=!0),new q(e)},$t={},It=()=>{if(!Xe){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(e in $t)void 0===$t[e]?delete t[e]:t[e]=$t[e];var r=[];for(e in t)r.push(`${e}=${t[e]}`);Xe=r}return Xe},Ft=[null,[],[]],Pt=(e,t)=>{var r=Ft[e];g(r),0===t||10===t?((1===e?d:f)(se(r)),r.length=0):r.push(t)},Rt=Array(256),Mt=0;256>Mt;++Mt)Rt[Mt]=String.fromCharCode(Mt);X=Rt,(()=>{let e=Re.prototype;Object.assign(e,{isAliasOf:function(e){if(!(this instanceof Re&&e instanceof Re))return!1;var t=this.g.j.h,r=this.g.i;e.g=e.g;var n=e.g.j.h;for(e=e.g.i;t.m;)r=t.H(r),t=t.m;for(;n.m;)e=n.H(e),n=n.m;return t===n&&r===e},clone:function(){if(this.g.i||be(this),this.g.G)return this.g.count.value+=1,this;var e=Fe,t=Object,r=t.create,n=Object.getPrototypeOf(this),i=this.g;return(e=e(r.call(t,n,{g:{value:{count:i.count,F:i.F,G:i.G,i:i.i,j:i.j,l:i.l,v:i.v}}}))).g.count.value+=1,e.g.F=!1,e},delete(){if(this.g.i||be(this),this.g.F&&!this.g.G)throw new ge("Object already scheduled for deletion");Te(this);var e=this.g;--e.count.value,0===e.count.value&&(e.l?e.v.B(e.l):e.j.h.B(e.i)),this.g.G||(this.g.l=void 0,this.g.i=void 0)},isDeleted:function(){return!this.g.i},deleteLater:function(){if(this.g.i||be(this),this.g.F&&!this.g.G)throw new ge("Object already scheduled for deletion");return Pe.push(this),this.g.F=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(je.prototype,{U(e){return this.O&&(e=this.O(e)),e},N(e){this.B?.(e)},o:8,readValueFromPointer:De,fromWireType:Ie}),nt.push(0,1,void 0,1,null,1,!0,1,!1,1),g(10===nt.length),a.count_emval_handles=()=>nt.length/2-5-rt.length,a.noExitRuntime&&(ne=a.noExitRuntime),a.print&&(d=a.print),a.printErr&&(f=a.printErr),a.wasmBinary&&(c=a.wasmBinary),a.FS_createDataFile=function(){V()},a.FS_createPreloadedFile=function(){V()},Object.getOwnPropertyDescriptor(a,"fetchSettings")&&G("`Module.fetchSettings` was supplied but `fetchSettings` not included in INCOMING_MODULE_JS_API"),a.thisProgram&&(l=a.thisProgram),g(typeof a.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),g(typeof a.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),g(typeof a.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),g(typeof a.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),g(typeof a.read>"u","Module.read option was removed"),g(typeof a.readAsync>"u","Module.readAsync option was removed (modify readAsync in JS)"),g(typeof a.readBinary>"u","Module.readBinary option was removed (modify readBinary in JS)"),g(typeof a.setWindowTitle>"u","Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),g(typeof a.TOTAL_MEMORY>"u","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),g(typeof a.ENVIRONMENT>"u","Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)"),g(typeof a.STACK_SIZE>"u","STACK_SIZE can no longer be set at runtime.  Use -sSTACK_SIZE at link time"),g(typeof a.wasmMemory>"u","Use of `wasmMemory` detected.  Use -sIMPORTED_MEMORY to define wasmMemory externally"),g(typeof a.INITIAL_MEMORY>"u","Detected runtime INITIAL_MEMORY setting.  Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),"writeI53ToI64 writeI53ToI64Clamped writeI53ToI64Signaling writeI53ToU64Clamped writeI53ToU64Signaling readI53FromI64 readI53FromU64 convertI32PairToI53 convertI32PairToI53Checked convertU32PairToI53 getTempRet0 setTempRet0 zeroMemory strError inetPton4 inetNtop4 inetPton6 inetNtop6 readSockaddr writeSockaddr emscriptenLog readEmAsmArgs jstoi_q listenOnce autoResumeAudioContext getDynCaller dynCall runtimeKeepalivePush runtimeKeepalivePop asmjsMangle asyncLoad mmapAlloc HandleAllocator getNativeTypeSize addOnInit addOnPostCtor addOnPreMain addOnExit STACK_SIZE STACK_ALIGN POINTER_SIZE ASSERTIONS getCFunc ccall cwrap uleb128Encode sigToWasmTypes generateFuncType convertJsFunctionToWasm getEmptyTableSlot updateTableMap getFunctionAddress addFunction removeFunction reallyNegative unSign strLen reSign formatString intArrayFromString intArrayToString AsciiToString stringToAscii stringToNewUTF8 stringToUTF8OnStack writeArrayToMemory registerKeyEventCallback maybeCStringToJsString findEventTarget getBoundingClientRect fillMouseEventData registerMouseEventCallback registerWheelEventCallback registerUiEventCallback registerFocusEventCallback fillDeviceOrientationEventData registerDeviceOrientationEventCallback fillDeviceMotionEventData registerDeviceMotionEventCallback screenOrientation fillOrientationChangeEventData registerOrientationChangeEventCallback fillFullscreenChangeEventData registerFullscreenChangeEventCallback JSEvents_requestFullscreen JSEvents_resizeCanvasForFullscreen registerRestoreOldStyle hideEverythingExceptGivenElement restoreHiddenElements setLetterbox softFullscreenResizeWebGLRenderTarget doRequestFullscreen fillPointerlockChangeEventData registerPointerlockChangeEventCallback registerPointerlockErrorEventCallback requestPointerLock fillVisibilityChangeEventData registerVisibilityChangeEventCallback registerTouchEventCallback fillGamepadEventData registerGamepadEventCallback registerBeforeUnloadEventCallback fillBatteryEventData battery registerBatteryEventCallback setCanvasElementSize getCanvasElementSize jsStackTrace getCallstack convertPCtoSourceLocation wasiRightsToMuslOFlags wasiOFlagsToMuslOFlags initRandomFill randomFill safeSetTimeout setImmediateWrapped safeRequestAnimationFrame clearImmediateWrapped registerPostMainLoop registerPreMainLoop getPromise makePromise idsToPromises makePromiseCallback Browser_asyncPrepareDataCounter isLeapYear ydayFromDate arraySum addDays getSocketFromFD getSocketAddress heapObjectForWebGLType toTypedArrayIndex webgl_enable_ANGLE_instanced_arrays webgl_enable_OES_vertex_array_object webgl_enable_WEBGL_draw_buffers webgl_enable_WEBGL_multi_draw webgl_enable_EXT_polygon_offset_clamp webgl_enable_EXT_clip_control webgl_enable_WEBGL_polygon_mode emscriptenWebGLGet computeUnpackAlignedImageSize colorChannelsInGlTextureFormat emscriptenWebGLGetTexPixelData emscriptenWebGLGetUniform webglGetUniformLocation webglPrepareUniformLocationsBeforeFirstUse webglGetLeftBracePos emscriptenWebGLGetVertexAttrib __glGetActiveAttribOrUniform writeGLArray registerWebGlEventCallback runAndAbortIfError ALLOC_NORMAL ALLOC_STACK allocate writeStringToMemory writeAsciiToMemory demangle stackTrace getFunctionArgsName createJsInvokerSignature PureVirtualError registerInheritedInstance unregisterInheritedInstance getInheritedInstanceCount getLiveInheritedInstances setDelayFunction getStringOrSymbol emval_get_global".split(" ").forEach((function(e){x(e,(()=>{var t=`\`${e}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,r=e;r.startsWith("_")||(r="$"+e),t+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${r}')`,k(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),oe(t)})),L(e)})),"run addRunDependency removeRunDependency out err callMain abort wasmMemory wasmExports HEAPF32 HEAPF64 HEAP8 HEAPU8 HEAP16 HEAPU16 HEAP32 HEAPU32 HEAP64 HEAPU64 writeStackCookie checkStackCookie INT53_MAX INT53_MIN bigintToI53Checked stackSave stackRestore stackAlloc ptrToString exitJS getHeapMax growMemory ENV ERRNO_CODES DNS Protocols Sockets timers warnOnce readEmAsmArgsArray jstoi_s getExecutableName handleException keepRuntimeAlive callUserCallback maybeExit alignMemory wasmTable noExitRuntime addOnPreRun addOnPostRun freeTableIndexes functionsInTableMap setValue getValue PATH PATH_FS UTF8Decoder UTF8ArrayToString UTF8ToString stringToUTF8Array stringToUTF8 lengthBytesUTF8 UTF16Decoder UTF16ToString stringToUTF16 lengthBytesUTF16 UTF32ToString stringToUTF32 lengthBytesUTF32 JSEvents specialHTMLTargets findCanvasEventTarget currentFullscreenStrategy restoreOldWindowedStyle UNWIND_CACHE ExitStatus getEnvStrings checkWasiClock flush_NO_FILESYSTEM emSetImmediate emClearImmediate_deps emClearImmediate promiseMap getExceptionMessageCommon getCppExceptionTag getCppExceptionThrownObjectFromWebAssemblyException Browser getPreloadedImageData__data wget MONTH_DAYS_REGULAR MONTH_DAYS_LEAP MONTH_DAYS_REGULAR_CUMULATIVE MONTH_DAYS_LEAP_CUMULATIVE SYSCALLS tempFixedLengthArray miniTempWebGLFloatBuffers miniTempWebGLIntBuffers GL AL GLUT EGL GLEW IDBStore SDL SDL_gfx allocateUTF8 allocateUTF8OnStack print printErr InternalError BindingError throwInternalError throwBindingError registeredTypes awaitingDependencies typeDependencies tupleRegistrations structRegistrations sharedRegisterType whenDependentTypesAreResolved embind_charCodes embind_init_charCodes readLatin1String getTypeName getFunctionName heap32VectorToArray requireRegisteredType usesDestructorStack checkArgCount getRequiredArgCount createJsInvoker UnboundTypeError GenericWireTypeSize EmValType EmValOptionalType throwUnboundTypeError ensureOverloadTable exposePublicSymbol replacePublicSymbol createNamedFunction embindRepr registeredInstances getBasestPointer getInheritedInstance registeredPointers registerType integerReadValueFromPointer enumReadValueFromPointer floatReadValueFromPointer readPointer runDestructors craftInvokerFunction embind__requireFunction genericPointerToWireType constNoSmartPtrRawPointerToWireType nonConstNoSmartPtrRawPointerToWireType init_RegisteredPointer RegisteredPointer RegisteredPointer_fromWireType runDestructor releaseClassHandle finalizationRegistry detachFinalizer_deps detachFinalizer attachFinalizer makeClassHandle init_ClassHandle ClassHandle throwInstanceAlreadyDeleted deletionQueue flushPendingDeletes delayFunction RegisteredClass shallowCopyInternalPointer downcastPointer upcastPointer validateThis char_0 char_9 makeLegalFunctionName emval_freelist emval_handles emval_symbols init_emval count_emval_handles Emval emval_returnValue emval_lookupTypes emval_methodCallers emval_addMethodCaller reflectConstruct".split(" ").forEach(L),a.getExceptionMessage=ce,a.incrementExceptionRefcount=e=>{e=ue(e),Kt(e)},a.decrementExceptionRefcount=e=>{e=ue(e),Yt(e)};var Ot,kt={__assert_fail:(e,t,r,n)=>G(`Assertion failed: ${le(e)}, at: `+[t?le(t):"unknown filename",r,n?le(n):"unknown function"]),__throw_exception_with_stack_trace:e=>{throw(e=new WebAssembly.Exception(xt.__cpp_exception,[e],{traceStack:!0})).message=ce(e),e},_abort_js:()=>G("native code called abort()"),_embind_register_bigint:(e,t,r,n,i)=>{var o=-1!=(t=fe(t)).indexOf("u");o&&(i=(1n<<64n)-1n),ve(e,{name:t,fromWireType:e=>e,toWireType:function(e,r){if("bigint"!=typeof r&&"number"!=typeof r)throw new TypeError(`Cannot convert "${de(r)}" to ${this.name}`);if("number"==typeof r&&(r=BigInt(r)),r<n||r>i)throw new TypeError(`Passing a number "${de(r)}" from JS side to C/C++ side to an argument of type "${t}", which is outside the valid range [${n}, ${i}]!`);return r},o:8,readValueFromPointer:we(t,r,!o),s:null})},_embind_register_bool:(e,t,r,n)=>{ve(e,{name:t=fe(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},o:8,readValueFromPointer:function(e){return this.fromWireType(v[e])},s:null})},_embind_register_class:(e,t,r,n,i,o,s,l,u,c,d,f,h)=>{d=fe(d),o=Ge(i,o),l&&=Ge(s,l),c&&=Ge(u,c),h=Ge(f,h);var m=(e=>{g("string"==typeof e);var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e})(d);ke(m,(function(){ze(`Cannot construct ${d} due to unbound types`,[n])})),Je([e,t,r],n?[n]:[],(t=>{if(t=t[0],n)var r=t.h,i=r.A;else i=Re.prototype;t=Me(d,(function(...e){if(Object.getPrototypeOf(this)!==s)throw new ge(`Use 'new' to construct ${d}`);if(void 0===f.D)throw new ge(`${d} has no accessible constructor`);var t=f.D[e.length];if(void 0===t)throw new ge(`Tried to invoke ctor of ${d} with invalid number of parameters (${e.length}) - expected (${Object.keys(f.D).toString()}) parameters instead!`);return t.apply(this,e)}));var s=Object.create(i,{constructor:{value:t}});t.prototype=s;var u,f=new xe(d,t,s,h,r,o,l,c);f.m&&((u=f.m).I??(u.I=[]),f.m.I.push(f));return r=new je(d,f,!0,!1,!1),u=new je(d+"*",f,!1,!1,!1),i=new je(d+" const*",f,!1,!0,!1),Ae[e]={pointerType:u,P:i},((e,t)=>{if(!a.hasOwnProperty(e))throw new Ce("Replacing nonexistent public symbol");a[e]=t,a[e].C=void 0})(m,t),[r,u,i]}))},_embind_register_class_class_function:(e,t,r,n,i,o,a,s)=>{var l=Qe(r,n);t=fe(t),t=et(t),o=Ge(i,o,s),Je([],[e],(e=>{function n(){ze(`Cannot call ${i} due to unbound types`,l)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.h.constructor;return void 0===u[t]?(n.C=r-1,u[t]=n):(Oe(u,t,i),u[t].u[r-1]=n),Je([],l,(n=>{if(n=Ze(i,[n[0],null].concat(n.slice(1)),null,o,a,s),void 0===u[t].u?(n.C=r-1,u[t]=n):u[t].u[r-1]=n,e.h.I)for(let r of e.h.I)r.constructor.hasOwnProperty(t)||(r.constructor[t]=n);return[]})),[]}))},_embind_register_class_constructor:(e,t,r,n,i,o)=>{g(0<t);var a=Qe(t,r);i=Ge(n,i),Je([],[e],(e=>{var r=`constructor ${(e=e[0]).name}`;if(void 0===e.h.D&&(e.h.D=[]),void 0!==e.h.D[t-1])throw new ge(`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.h.D[t-1]=()=>{ze(`Cannot construct ${e.name} due to unbound types`,a)},Je([],a,(n=>(n.splice(1,0,null),e.h.D[t-1]=Ze(r,n,null,i,o),[]))),[]}))},_embind_register_class_function:(e,t,r,n,i,o,a,s,l)=>{var u=Qe(r,n);t=fe(t),t=et(t),o=Ge(i,o,l),Je([],[e],(e=>{function n(){ze(`Cannot call ${i} due to unbound types`,u)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.h.Z.push(t);var c=e.h.A,d=c[t];return void 0===d||void 0===d.u&&d.className!==e.name&&d.C===r-2?(n.C=r-2,n.className=e.name,c[t]=n):(Oe(c,t,i),c[t].u[r-2]=n),Je([],u,(n=>(n=Ze(i,n,e,o,a,l),void 0===c[t].u?(n.C=r-2,c[t]=n):c[t].u[r-2]=n,[]))),[]}))},_embind_register_class_property:(e,t,r,n,i,o,a,s,l,u)=>{t=fe(t),i=Ge(n,i),Je([],[e],(e=>{var n=`${(e=e[0]).name}.${t}`,c={get(){ze(`Cannot access ${n} due to unbound types`,[r,a])},enumerable:!0,configurable:!0};return c.set=l?()=>ze(`Cannot access ${n} due to unbound types`,[r,a]):()=>{throw new ge(n+" is a read-only property")},Object.defineProperty(e.h.A,t,c),Je([],l?[r,a]:[r],(r=>{var a=r[0],c={get(){var t=tt(this,e,n+" getter");return a.fromWireType(i(o,t))},enumerable:!0};if(l){l=Ge(s,l);var d=r[1];c.set=function(t){var r=tt(this,e,n+" setter"),i=[];l(u,r,d.toWireType(i,t)),Ye(i)}}return Object.defineProperty(e.h.A,t,c),[]})),[]}))},_embind_register_emval:e=>ve(e,st),_embind_register_enum:(e,t,r,n)=>{function i(){}t=fe(t),i.values={},ve(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,o:8,readValueFromPointer:lt(t,r,n),s:null}),ke(t,i)},_embind_register_enum_value:(e,t,r)=>{var n=ut(e,"enum");t=fe(t),e=n.constructor,n=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Me(`${n.name}_${t}`,(function(){}))}}),e.values[r]=n,e[t]=n},_embind_register_float:(e,t,r)=>{ve(e,{name:t=fe(t),fromWireType:e=>e,toWireType:(e,t)=>{if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError(`Cannot convert ${de(t)} to ${this.name}`);return t},o:8,readValueFromPointer:ct(t,r),s:null})},_embind_register_integer:(e,t,r,n,i)=>{t=fe(t),-1===i&&(i=4294967295);var o=e=>e;if(0===n){var a=32-8*r;o=e=>e<<a>>>a}var s=(e,r)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert "${de(e)}" to ${r}`);if(e<n||e>i)throw new TypeError(`Passing a number "${de(e)}" from JS side to C/C++ side to an argument of type "${t}", which is outside the valid range [${n}, ${i}]!`)},l=t.includes("unsigned")?function(e,t){return s(t,this.name),t>>>0}:function(e,t){return s(t,this.name),t};ve(e,{name:t,fromWireType:o,toWireType:l,o:8,readValueFromPointer:we(t,r,0!==n),s:null})},_embind_register_memory_view:(e,t,r)=>{function n(e){return new i(y.buffer,T[e+4>>2],T[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];ve(e,{name:r=fe(r),fromWireType:n,o:8,readValueFromPointer:n},{V:!0})},_embind_register_optional:e=>{ve(e,dt)},_embind_register_std_string:(e,t)=>{ve(e,{name:t=fe(t),fromWireType:function(e){for(var t,r=T[e>>2],n=e+4,i=n,o=0;o<=r;++o){var a=n+o;(o==r||0==v[a])&&(i=le(i,a-i),void 0===t?t=i:(t+=String.fromCharCode(0),t+=i),i=a+1)}return Wt(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;if(!(r||ArrayBuffer.isView(t)&&1==t.BYTES_PER_ELEMENT))throw new ge("Cannot pass non-string to std::string");var n=r?ht(t):t.length,i=Lt(4+n+1),o=i+4;return T[i>>2]=n,r?ft(t,o,n+1):v.set(t,o),null!==e&&e.push(Wt,i),i},o:8,readValueFromPointer:De,s(e){Wt(e)}})},_embind_register_std_wstring:(e,t,r)=>{if(r=fe(r),2===t)var n=pt,i=gt,o=yt,a=e=>b[e>>1];else 4===t&&(n=vt,i=wt,o=bt,a=e=>T[e>>2]);ve(e,{name:r,fromWireType:e=>{for(var r,i=T[e>>2],o=e+4,s=0;s<=i;++s){var l=e+4+s*t;(s==i||0==a(l))&&(o=n(o,l-o),void 0===r?r=o:(r+=String.fromCharCode(0),r+=o),o=l+t)}return Wt(e),r},toWireType:(e,n)=>{if("string"!=typeof n)throw new ge(`Cannot pass non-string to C++ string type ${r}`);var a=o(n),s=Lt(4+a+t);return T[s>>2]=a/t,i(n,s+4,a+t),null!==e&&e.push(Wt,s),s},o:8,readValueFromPointer:De,s(e){Wt(e)}})},_embind_register_void:(e,t)=>{ve(e,{W:!0,name:t=fe(t),o:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_runtime_keepalive_clear:()=>{ne=!1,_t=0},_emval_call:(e,t,r,n)=>(e=Tt[e])(null,t=ot(t),r,n),_emval_decref:it,_emval_get_method_caller:(e,t,r)=>{t=((e,t)=>{for(var r=Array(e),n=0;n<e;++n)r[n]=ut(T[t+4*n>>2],`parameter ${n}`);return r})(e,t);var n=t.shift();e--;var i="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var s=["retType"],l=[n],u=0;u<e;++u)a.push(`arg${u}`),s.push(`argType${u}`),l.push(t[u]),i+=`  var arg${u} = argType${u}.readValueFromPointer(args${o?"+"+o:""});\n`,o+=t[u].o;return i+=`  var rv = ${1===r?"new func":"func.call"}(${a.join(", ")});\n`,n.W||(s.push("emval_returnValue"),l.push(Et),i+="  return emval_returnValue(retType, destructorsRef, rv);\n"),e=new Function(...s,i+"};\n")(...l),r=`methodCaller<(${t.map((e=>e.name)).join(", ")}) => ${n.name}>`,(e=>{var t=Tt.length;return Tt.push(e),t})(Me(r,e))},_emval_incref:e=>{9<e&&(nt[e+1]+=1)},_emval_run_destructors:e=>{var t=ot(e);Ye(t),it(e)},_emval_take_value:(e,t)=>(e=(e=ut(e,"_emval_take_value")).readValueFromPointer(t),at(e)),_setitimer_js:(e,t)=>{if(At[e]&&(clearTimeout(At[e].id),delete At[e]),!t)return 0;var r=setTimeout((()=>{g(e in At),delete At[e],(e=>{if(I||p)f("user callback triggered after runtime exited or application aborted.  Ignoring.");else try{if(e(),!(I||ne||0<_t))try{if(m=e=m,ne||0<_t||(g(!I),P(),Dt(),Nt(0),Ft[1].length&&Pt(1,10),Ft[2].length&&Pt(2,10),I=!0),ne||0<_t){var t=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=${_t}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;i(t),f(t)}Ct(e)}catch(e){St(e)}}catch(e){St(e)}})((()=>Bt(e,performance.now())))}),t);return At[e]={id:r,da:t},0},_tzset_js:(e,t,r,n)=>{var i=(new Date).getFullYear(),o=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),T[e>>2]=60*Math.max(o,i),_[t>>2]=+(o!=i),e=(t=e=>{var t=Math.abs(e);return`UTC${0<=e?"-":"+"}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`})(o),t=t(i),g(e),g(t),g(16>=ht(e),`timezone name truncated to fit in TZNAME_MAX (${e})`),g(16>=ht(t),`timezone name truncated to fit in TZNAME_MAX (${t})`),i<o?(ft(e,r,17),ft(t,n,17)):(ft(e,n,17),ft(t,r,17))},clock_time_get:function(e,t,r){return 0<=e&&3>=e?(A[r>>3]=BigInt(Math.round(1e6*(0===e?Date.now():performance.now()))),0):28},emscripten_resize_heap:e=>{var t=v.length;if(g((e>>>=0)>t),2147483648<e)return f(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var r=1;4>=r;r*=2){var n=t*(1+.2/r);n=Math.min(n,e+100663296);var i=Math,o=i.min;n=Math.max(e,n),g(65536,"alignment argument is required"),i=o.call(i,2147483648,65536*Math.ceil(n/65536));e:{var a=((o=i)-(n=h.buffer).byteLength+65535)/65536|0;try{h.grow(a),W();var s=1;break e}catch(e){f(`growMemory: Attempted to grow heap from ${n.byteLength} bytes to ${o} bytes, but got error: ${e}`)}s=void 0}if(s)return!0}return f(`Failed to grow the heap from ${t} bytes to ${i} bytes, not enough memory!`),!1},environ_get:(e,t)=>{var r,n=0,i=0;for(r of It()){var o=t+n;T[e+i>>2]=o,n+=ft(r,o,1/0)+1,i+=4}return 0},environ_sizes_get:(e,t)=>{var r=It();for(var n of(T[e>>2]=r.length,e=0,r))e+=ht(n)+1;return T[t>>2]=e,0},fd_close:()=>{G("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM")},fd_seek:function(){return 70},fd_write:(e,t,r,n)=>{for(var i=0,o=0;o<r;o++){var a=T[t>>2],s=T[t+4>>2];t+=8;for(var l=0;l<s;l++)Pt(e,v[a+l]);i+=s}return T[n>>2]=i,0},proc_exit:Ct},xt=await async function(){function e(e){e=xt=e.exports;var t={};for(n in e){var r=e[n];t[n]="function"==typeof r?Y(r):r}if(g(h=(xt=t).memory,"memory not found in wasm exports"),W(),g(Z=xt.__indirect_function_table,"table not found in wasm exports"),function(){var e=Z.get,t={};Z.get=r=>{var n=e.call(Z,r),i=t[r];return i&&i.S===n||(i=t[r]={S:n,ca:Y(n)}),i.ca}}(),N--,a.monitorRunDependencies?.(N),g(j["wasm-instantiate"]),delete j["wasm-instantiate"],0==N&&(null!==B&&(clearInterval(B),B=null),D)){var n=D;D=null,n()}return xt}N++,a.monitorRunDependencies?.(N),g(!j["wasm-instantiate"]),j["wasm-instantiate"]=1,null===B&&typeof setInterval<"u"&&(B=setInterval((()=>{if(p)clearInterval(B),B=null;else{var e,t=!1;for(e in j)t||(t=!0,f("still waiting on run dependencies:")),f(`dependency: ${e}`);t&&f("(end of list)")}}),1e4));var t,r=a,n={env:kt,wasi_snapshot_preview1:kt};if(a.instantiateWasm)return new Promise(((t,r)=>{try{a.instantiateWasm(n,((r,n)=>{t(e(r))}))}catch(e){f(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}}));z??=a.locateFile?a.locateFile?a.locateFile("libavoid.wasm",u):u+"libavoid.wasm":new URL("libavoid.wasm",import.meta.url).href;try{var o=await async function(e){var t=z;if(!c&&"function"==typeof WebAssembly.instantiateStreaming)try{var r=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,e)}catch(e){f(`wasm streaming compile failed: ${e}`),f("falling back to ArrayBuffer instantiation")}return K(t,e)}(n);return t=o,g(a===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,e(t.instance)}catch(t){return i(t),Promise.reject(t)}}(),Ut=H("__getTypeName",1),Lt=H("malloc",1),Wt=H("free",1),Nt=H("fflush",1),Dt=H("__funcs_on_exit",0),jt=xt.emscripten_stack_get_end,Bt=H("_emscripten_timeout",2),Gt=xt.__trap,Vt=xt.emscripten_stack_init,Ht=xt._emscripten_stack_restore,zt=xt._emscripten_stack_alloc,Jt=xt.emscripten_stack_get_current,Yt=H("__cxa_decrement_exception_refcount",1),Kt=H("__cxa_increment_exception_refcount",1),qt=H("__thrown_object_from_unwind_exception",1),Zt=H("__get_exception_message",3);if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.shift()();O("preInit"),function e(){function t(){if(g(!Ot),Ot=!0,a.calledRun=!0,!p){if(g(!$),$=!0,P(),xt.__wasm_call_ctors(),n(a),a.onRuntimeInitialized?.(),O("onRuntimeInitialized"),g(!a._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),P(),a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;){var e=a.postRun.shift();ee.push(e)}O("postRun"),Q(ee)}}if(0<N)D=e;else{if(Vt(),function(){var e=jt();g(!(3&e)),0==e&&(e+=4),T[e>>2]=34821223,T[e+4>>2]=2310721022,T[0]=1668509029}(),a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)re();O("preRun"),Q(te),0<N?D=e:(a.setStatus?(a.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>a.setStatus("")),1),t()}),1)):t(),P())}}(),r=s;for(let e of Object.keys(a))e in t||Object.defineProperty(t,e,{configurable:!0,get(){G(`Access to module property ('${e}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});return r}})(),Gt=xr,Br=Bt(Gt);export{Br as AvoidLib};
//# sourceMappingURL=/sm/4097686389fc2df570f4b83f822bdccf48bbdf7800f99376dbaafc1785f642f5.map