var __dotnet_runtime=function(e){"use strict";let t,r,n,o,s,i,a,c;const u={},l={};let _;function f(e,u){r=u.internal,n=u.marshaled_imports,t=u.module,d(e),o=e.isNode,s=e.isShell,i=e.isWeb,a=e.isWorker,c=e.isPThread,m.quit=e.quit_,m.ExitStatus=e.ExitStatus,m.requirePromise=e.requirePromise}function d(e){o=e.isNode,s=e.isShell,i=e.isWeb,a=e.isWorker,c=e.isPThread}const m={javaScriptExports:{},mono_wasm_load_runtime_done:!1,mono_wasm_bindings_is_ready:!1,maxParallelDownloads:16,config:{environmentVariables:{}},diagnosticTracing:!1},p=-1;function h(e){return null==e}const w=[[!0,"mono_wasm_register_root","number",["number","number","string"]],[!0,"mono_wasm_deregister_root",null,["number"]],[!0,"mono_wasm_string_get_data",null,["number","number","number","number"]],[!0,"mono_wasm_string_get_data_ref",null,["number","number","number","number"]],[!0,"mono_wasm_set_is_debugger_attached","void",["bool"]],[!0,"mono_wasm_send_dbg_command","bool",["number","number","number","number","number"]],[!0,"mono_wasm_send_dbg_command_with_parms","bool",["number","number","number","number","number","number","string"]],[!0,"mono_wasm_setenv",null,["string","string"]],[!0,"mono_wasm_parse_runtime_options",null,["number","number"]],[!0,"mono_wasm_strdup","number",["string"]],[!0,"mono_background_exec",null,[]],[!0,"mono_set_timeout_exec",null,[]],[!0,"mono_wasm_load_icu_data","number",["number"]],[!0,"mono_wasm_get_icudt_name","string",["string"]],[!1,"mono_wasm_add_assembly","number",["string","number","number"]],[!0,"mono_wasm_add_satellite_assembly","void",["string","string","number","number"]],[!1,"mono_wasm_load_runtime",null,["string","number"]],[!0,"mono_wasm_change_debugger_log_level","void",["number"]],[!0,"mono_wasm_get_corlib","number",[]],[!0,"mono_wasm_assembly_load","number",["string"]],[!0,"mono_wasm_find_corlib_class","number",["string","string"]],[!0,"mono_wasm_assembly_find_class","number",["number","string","string"]],[!0,"mono_wasm_runtime_run_module_cctor","void",["number"]],[!0,"mono_wasm_find_corlib_type","number",["string","string"]],[!0,"mono_wasm_assembly_find_type","number",["number","string","string"]],[!0,"mono_wasm_assembly_find_method","number",["number","string","number"]],[!0,"mono_wasm_invoke_method","number",["number","number","number","number"]],[!1,"mono_wasm_invoke_method_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_string_get_utf8","number",["number"]],[!0,"mono_wasm_string_from_utf16_ref","void",["number","number","number"]],[!0,"mono_wasm_get_obj_type","number",["number"]],[!0,"mono_wasm_array_length","number",["number"]],[!0,"mono_wasm_array_get","number",["number","number"]],[!0,"mono_wasm_array_get_ref","void",["number","number","number"]],[!1,"mono_wasm_obj_array_new","number",["number"]],[!1,"mono_wasm_obj_array_new_ref","void",["number","number"]],[!1,"mono_wasm_obj_array_set","void",["number","number","number"]],[!1,"mono_wasm_obj_array_set_ref","void",["number","number","number"]],[!0,"mono_wasm_register_bundled_satellite_assemblies","void",[]],[!1,"mono_wasm_try_unbox_primitive_and_get_type_ref","number",["number","number","number"]],[!0,"mono_wasm_box_primitive_ref","void",["number","number","number","number"]],[!0,"mono_wasm_intern_string_ref","void",["number"]],[!0,"mono_wasm_assembly_get_entry_point","number",["number"]],[!0,"mono_wasm_get_delegate_invoke_ref","number",["number"]],[!0,"mono_wasm_string_array_new_ref","void",["number","number"]],[!0,"mono_wasm_typed_array_new_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_class_get_type","number",["number"]],[!0,"mono_wasm_type_get_class","number",["number"]],[!0,"mono_wasm_get_type_name","string",["number"]],[!0,"mono_wasm_get_type_aqn","string",["number"]],[!0,"mono_wasm_event_pipe_enable","bool",["string","number","number","string","bool","number"]],[!0,"mono_wasm_event_pipe_session_start_streaming","bool",["number"]],[!0,"mono_wasm_event_pipe_session_disable","bool",["number"]],[!0,"mono_wasm_diagnostic_server_create_thread","bool",["string","number"]],[!0,"mono_wasm_diagnostic_server_thread_attach_to_runtime","void",[]],[!0,"mono_wasm_diagnostic_server_post_resume_runtime","void",[]],[!0,"mono_wasm_diagnostic_server_create_stream","number",[]],[!0,"mono_wasm_string_from_js","number",["string"]],[!1,"mono_wasm_exit","void",["number"]],[!0,"mono_wasm_getenv","number",["string"]],[!0,"mono_wasm_set_main_args","void",["number","number"]],[!1,"mono_wasm_enable_on_demand_gc","void",["number"]],[!1,"mono_profiler_init_aot","void",["number"]],[!1,"mono_wasm_exec_regression","number",["number","string"]],[!1,"mono_wasm_invoke_method_bound","number",["number","number"]],[!0,"mono_wasm_write_managed_pointer_unsafe","void",["number","number"]],[!0,"mono_wasm_copy_managed_pointer","void",["number","number"]],[!0,"mono_wasm_i52_to_f64","number",["number","number"]],[!0,"mono_wasm_u52_to_f64","number",["number","number"]],[!0,"mono_wasm_f64_to_i52","number",["number","number"]],[!0,"mono_wasm_f64_to_u52","number",["number","number"]]],g={};function y(e,t,r){const n=function(e,t,r){let n,o="number"==typeof t?t:0;n="number"==typeof r?o+r:e.length-o;const s={read:function(){if(o>=n)return null;const t=e[o];return o+=1,t}};return Object.defineProperty(s,"eof",{get:function(){return o>=n},configurable:!0,enumerable:!0}),s}(e,t,r);let o="",s=0,i=0,a=0,c=0,u=0,l=0;for(;s=n.read(),i=n.read(),a=n.read(),null!==s;)null===i&&(i=0,u+=1),null===a&&(a=0,u+=1),l=s<<16|i<<8|a<<0,c=(16777215&l)>>18,o+=b[c],c=(262143&l)>>12,o+=b[c],u<2&&(c=(4095&l)>>6,o+=b[c]),2===u?o+="==":1===u?o+="=":(c=(63&l)>>0,o+=b[c]);return o}const b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];const v=new Map;v.remove=function(e){const t=this.get(e);return this.delete(e),t};let E,A,k,S={},O=0,x=-1;function N(){r.mono_wasm_runtime_is_ready=m.mono_wasm_runtime_is_ready=!0,O=0,S={},x=-1,globalThis.dotnetDebugger||console.debug("mono_wasm_runtime_ready","fe00e07a-5519-4dfe-b35a-f867dbaf2e28")}function j(){}function D(e,r,n,o){const s={res_ok:e,res:{id:r,value:y(new Uint8Array(t.HEAPU8.buffer,n,o))}};v.has(r)&&console.warn(`MONO_WASM: Adding an id (${r}) that already exists in commands_received`),v.set(r,s)}function M(e){e.length>x&&(E&&t._free(E),x=Math.max(e.length,x,256),E=t._malloc(x));const r=atob(e);for(let e=0;ee.value)),e;if(void 0===t.dimensionsDetails||1===t.dimensionsDetails.length)return e=t.items.map((e=>e.value)),e}const r={};return Object.keys(t).forEach((e=>{const n=t[e];void 0!==n.get?Object.defineProperty(r,n.name,{get:()=>T(n.get.id,n.get.commandSet,n.get.command,n.get.buffer),set:function(e){return R(n.set.id,n.set.commandSet,n.set.command,n.set.buffer,n.set.length,n.set.valtype,e),!0}}):void 0!==n.set?Object.defineProperty(r,n.name,{get:()=>n.value,set:function(e){return R(n.set.id,n.set.commandSet,n.set.command,n.set.buffer,n.set.length,n.set.valtype,e),!0}}):r[n.name]=n.value})),r}(t,r);const o=null!=e.arguments?e.arguments.map((e=>JSON.stringify(e.value))):[],s=`const fn = ${e.functionDeclaration}; return fn.apply(proxy, [${o}]);`,i=new Function("proxy",s)(n);if(void 0===i)return{type:"undefined"};if(Object(i)!==i)return"object"==typeof i&&null==i?{type:typeof i,subtype:`${i}`,value:null}:{type:typeof i,description:`${i}`,value:`${i}`};if(e.returnByValue&&null==i.subtype)return{type:"object",value:i};if(Object.getPrototypeOf(i)==Array.prototype){const e=L(i);return{type:"object",subtype:"array",className:"Array",description:`Array(${i.length})`,objectId:e}}if(void 0!==i.value||void 0!==i.subtype)return i;if(i==n)return{type:"object",className:"Object",description:"Object",objectId:t};return{type:"object",className:"Object",description:"Object",objectId:L(i)}}function W(e,t={}){return function(e,t){if(!(e in S))throw new Error(`Could not find any object with id ${e}`);const r=S[e],n=Object.getOwnPropertyDescriptors(r);t.accessorPropertiesOnly&&Object.keys(n).forEach((e=>{void 0===n[e].get&&Reflect.deleteProperty(n,e)}));const o=[];return Object.keys(n).forEach((e=>{let t;const r=n[e];t="object"==typeof r.value?Object.assign({name:e},r):void 0!==r.value?{name:e,value:Object.assign({type:typeof r.value,description:""+r.value},r)}:void 0!==r.get?{name:e,get:{className:"Function",description:`get ${e} () {}`,type:"function"}}:{name:e,value:{type:"symbol",value:"",description:""}},o.push(t)})),{__value_as_json_string__:JSON.stringify(o)}}(`dotnet:cfo_res:${e}`,t)}function L(e){const t="dotnet:cfo_res:"+O++;return S[t]=e,t}function H(e){e in S&&delete S[e]}function V(e,n){const o=t.UTF8ToString(n);r.logging&&"function"==typeof r.logging.debugger&&r.logging.debugger(e,o)}let q=0;function J(e){const t=1===g.mono_wasm_load_icu_data(e);return t&&q++,t}function G(e){return g.mono_wasm_get_icudt_name(e)}function Y(){const e=m.config;let r=!1;if(e.globalizationMode||(e.globalizationMode="auto"),"invariant"===e.globalizationMode&&(r=!0),!r)if(q>0)m.diagnosticTracing&&console.debug("MONO_WASM: ICU data archive(s) loaded, disabling invariant mode");else{if("icu"===e.globalizationMode){const e="invariant globalization mode is inactive and no ICU data archives were loaded";throw t.printErr(`MONO_WASM: ERROR: ${e}`),new Error(e)}m.diagnosticTracing&&console.debug("MONO_WASM: ICU data archive(s) not loaded, using invariant globalization mode"),r=!0}r&&g.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT","1"),g.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY","1")}function X(e){null==e&&(e={}),"writeAt"in e||(e.writeAt="System.Runtime.InteropServices.JavaScript.JavaScriptExports::StopProfile"),"sendTo"in e||(e.sendTo="Interop/Runtime::DumpAotProfileData");const r="aot:write-at-method="+e.writeAt+",send-to-method="+e.sendTo;t.ccall("mono_wasm_load_profiler_aot",null,["string"],[r])}function Z(e){null==e&&(e={}),"writeAt"in e||(e.writeAt="WebAssembly.Runtime::StopProfile"),"sendTo"in e||(e.sendTo="WebAssembly.Runtime::DumpCoverageProfileData");const r="coverage:write-at-method="+e.writeAt+",send-to-method="+e.sendTo;t.ccall("mono_wasm_load_profiler_coverage",null,["string"],[r])}const K=new Map,Q=new Map;let ee=0;function te(e){if(K.has(e))return K.get(e);const t=g.mono_wasm_assembly_load(e);return K.set(e,t),t}function re(e,t,r){ee||(ee=g.mono_wasm_get_corlib());let n=function(e,t,r){let n=Q.get(e);n||Q.set(e,n=new Map);let o=n.get(t);return o||(o=new Map,n.set(t,o)),o.get(r)}(ee,e,t);if(void 0!==n)return n;if(n=g.mono_wasm_assembly_find_class(ee,e,t),r&&!n)throw new Error(`Failed to find corlib class ${e}.${t}`);return function(e,t,r,n){const o=Q.get(e);if(!o)throw new Error("internal error");const s=o.get(t);if(!s)throw new Error("internal error");s.set(r,n)}(ee,e,t,n),n}const ne=new Map,oe=[];function se(e){try{if(0==ne.size)return e;const t=e;for(let r=0;r{const r=t.find((e=>"object"==typeof e&&void 0!==e.replaceSection));if(void 0===r)return e;const n=r.funcNum,o=r.replaceSection,s=ne.get(Number(n));return void 0===s?e:e.replace(o,`${s} (${o})`)}));if(n!==t)return n}return t}catch(t){return console.debug(`MONO_WASM: failed to symbolicate: ${t}`),e}}function ie(e){let t=e;return t instanceof Error||(t=new Error(t)),se(t.stack)}function ae(e,n,o,s,i){const a=t.UTF8ToString(o),c=!!s,u=t.UTF8ToString(e),l=i,_=t.UTF8ToString(n),f=`[MONO] ${a}`;if(r.logging&&"function"==typeof r.logging.trace)r.logging.trace(u,_,f,c,l);else switch(_){case"critical":case"error":console.error(ie(f));break;case"warning":console.warn(f);break;case"message":default:console.log(f);break;case"info":console.info(f);break;case"debug":console.debug(f)}}let ce;function ue(e){if(!m.mono_wasm_symbols_are_ready){m.mono_wasm_symbols_are_ready=!0;try{t.FS_readFile(e,{flags:"r",encoding:"utf8"}).split(/[\r\n]/).forEach((e=>{const t=e.split(/:/);t.length<2||(t[1]=t.splice(1).join(":"),ne.set(Number(t[0]),t[1]))}))}catch(t){return void(44==t.errno||console.log(`MONO_WASM: Error loading symbol file ${e}: ${JSON.stringify(t)}`))}}}async function le(e,t){try{const r=await _e(e,t);return me(r),r}catch(e){return e instanceof m.ExitStatus?e.status:(me(1,e),1)}}async function _e(e,r){(function(e,r){const n=r.length+1,o=t._malloc(4*n);let s=0;t.setValue(o+4*s,g.mono_wasm_strdup(e),"i32"),s+=1;for(let e=0;e{const t=setInterval((()=>{1==m.waitForDebugger&&(clearInterval(t),e())}),100)})));const n=fe(e);return m.javaScriptExports.call_entry_point(n,r)}function fe(e){if(!m.mono_wasm_bindings_is_ready)throw new Error("Assert failed: The runtime must be initialized.");const t=te(e);if(!t)throw new Error("Could not find assembly: "+e);let r=0;1==m.waitForDebugger&&(r=1);const n=g.mono_wasm_assembly_get_entry_point(t,r);if(!n)throw new Error("Could not find entry point for assembly: "+e);return n}function de(e){Mi(e,!1),me(1,e)}function me(e,t){if(m.config.asyncFlushOnExit&&0===e)throw(async()=>{try{await async function(){try{const e=await import("process"),t=e=>new Promise(((t,r)=>{e.on("error",(e=>r(e))),e.write("",(function(){t()}))})),r=t(e.stderr),n=t(e.stdout);await Promise.all([n,r])}catch(e){console.error(`flushing std* streams failed: ${e}`)}}()}finally{pe(e,t)}})(),m.ExitStatus?new m.ExitStatus(e):t||new Error("Stop with exit code "+e);pe(e,t)}function pe(e,n){if(m.ExitStatus&&(!n||n instanceof m.ExitStatus?n=new m.ExitStatus(e):n instanceof Error?t.printErr(r.mono_wasm_stringify_as_error_with_stack(n)):"string"==typeof n?t.printErr(n):t.printErr(JSON.stringify(n))),function(e,t){if(m.config.logExitCode)if(0!=e&&t&&(t instanceof Error?console.error(ie(t)):"string"==typeof t?console.error(t):console.error(JSON.stringify(t))),ce){const t=()=>{0==ce.bufferedAmount?console.log("WASM EXIT "+e):setTimeout(t,100)};t()}else console.log("WASM EXIT "+e)}(e,n),function(e){if(i&&m.config.appendElementOnExit){const t=document.createElement("label");t.id="tests_done",e&&(t.style.background="red"),t.innerHTML=e.toString(),document.body.appendChild(t)}}(e),0!==e||!i){if(!m.quit)throw n;m.quit(e,n)}}oe.push(/at (?[^:()]+:wasm-function\[(?\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/),oe.push(/(?:WASM \[[\da-zA-Z]+\], (?function #(?[\d]+) \(''\)))/),oe.push(/(?[a-z]+:\/\/[^ )]*:wasm-function\[(?\d+)\]:0x[a-fA-F\d]+)/),oe.push(/(?<[^ >]+>[.:]wasm-function\[(?[0-9]+)\])/);const he="function"==typeof globalThis.WeakRef;function we(e){return he?new WeakRef(e):{deref:()=>e}}const ge="function"==typeof globalThis.FinalizationRegistry;let ye;const be=[],ve=[];let Ee=1;const Ae=new Map;ge&&(ye=new globalThis.FinalizationRegistry((function(e){De(null,e)})));const ke=Symbol.for("wasm js_owned_gc_handle"),Se=Symbol.for("wasm cs_owned_js_handle");function Oe(e){return 0!==e&&-1!==e?be[e]:null}function xe(e){if(e[Se])return e[Se];const t=ve.length?ve.pop():Ee++;return be[t]=e,Object.isExtensible(e)&&(e[Se]=t),t}function Ne(e){const t=be[e];if(null!=t){if(globalThis===t)return;void 0!==t[Se]&&(t[Se]=void 0),be[e]=void 0,ve.push(e)}}function je(e,t){e[ke]=t,ge&&ye.register(e,t,e);const r=we(e);Ae.set(t,r)}function De(e,t){e&&(t=e[ke],e[ke]=0,ge&&ye.unregister(e)),0!==t&&Ae.delete(t)&&m.javaScriptExports.release_js_owned_object_by_gc_handle(t)}function Me(e){const t=e[ke];if(0==t)throw new Error("Assert failed: ObjectDisposedException");return t}function Re(e){if(!e)return null;const t=Ae.get(e);return t?t.deref():null}const Te=Symbol.for("wasm promise_control");function Ie(e,t){let r=null;const n=new Promise((function(n,o){r={isDone:!1,promise:null,resolve:t=>{r.isDone||(r.isDone=!0,n(t),e&&e())},reject:e=>{r.isDone||(r.isDone=!0,o(e),t&&t())}}}));r.promise=n;const o=n;return o[Te]=r,{promise:o,promise_control:r}}function $e(e){return e[Te]}function Fe(e){if(!function(e){return void 0!==e[Te]}(e))throw new Error("Assert failed: Promise is not controllable")}const Pe=("object"==typeof Promise||"function"==typeof Promise)&&"function"==typeof Promise.resolve;function Ce(e){return Promise.resolve(e)===e||("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function Ue(e){const{promise:t,promise_control:r}=Ie();return e().then((e=>r.resolve(e))).catch((e=>r.reject(e))),t}function Be(e){const t=Re(e);if(!t)return;const r=t.promise;if(!r)throw new Error(`Assert failed: Expected Promise for GCHandle ${e}`);Fe(r);$e(r).reject("OperationCanceledException")}const ze=[];let We,Le,He=null;const Ve="undefined"!=typeof BigInt&&"undefined"!=typeof BigInt64Array;function qe(){We||(We=t._malloc(32768),Le=We),ze.push(Le)}function Je(e,t,r){if(!Number.isSafeInteger(e))throw new Error(`Assert failed: Value is not an integer: ${e} (${typeof e})`);if(!(e>=t&&e<=r))throw new Error(`Assert failed: Overflow: value ${e} is out of ${t} ${r} range`)}function Ge(e,r){t.HEAP8.fill(0,e,r+e)}function Ye(e,r){const n=!!r;"number"==typeof r&&Je(r,0,1),t.HEAP32[e>>>2]=n?1:0}function Xe(e,r){Je(r,0,255),t.HEAPU8[e]=r}function Ze(e,r){Je(r,0,65535),t.HEAPU16[e>>>1]=r}function Ke(e,r){t.HEAPU32[e>>>2]=r}function Qe(e,r){Je(r,0,4294967295),t.HEAPU32[e>>>2]=r}function et(e,r){Je(r,-128,127),t.HEAP8[e]=r}function tt(e,r){Je(r,-32768,32767),t.HEAP16[e>>>1]=r}function rt(e,r){t.HEAP32[e>>>2]=r}function nt(e,r){Je(r,-2147483648,2147483647),t.HEAP32[e>>>2]=r}function ot(e){if(0!==e)switch(e){case 1:throw new Error("value was not an integer");case 2:throw new Error("value out of range");default:throw new Error("unknown internal error")}}function st(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);ot(g.mono_wasm_f64_to_i52(e,t))}function it(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);if(!(t>=0))throw new Error("Assert failed: Can't convert negative Number into UInt64");ot(g.mono_wasm_f64_to_u52(e,t))}function at(e,t){if(!Ve)throw new Error("Assert failed: BigInt is not supported.");if("bigint"!=typeof t)throw new Error(`Assert failed: Value is not an bigint: ${t} (${typeof t})`);if(!(t>=At&&t<=Et))throw new Error(`Assert failed: Overflow: value ${t} is out of ${At} ${Et} range`);He[e>>>3]=t}function ct(e,r){if("number"!=typeof r)throw new Error(`Assert failed: Value is not a Number: ${r} (${typeof r})`);t.HEAPF32[e>>>2]=r}function ut(e,r){if("number"!=typeof r)throw new Error(`Assert failed: Value is not a Number: ${r} (${typeof r})`);t.HEAPF64[e>>>3]=r}function lt(e){return!!t.HEAP32[e>>>2]}function _t(e){return t.HEAPU8[e]}function ft(e){return t.HEAPU16[e>>>1]}function dt(e){return t.HEAPU32[e>>>2]}function mt(e){return t.HEAP8[e]}function pt(e){return t.HEAP16[e>>>1]}function ht(e){return t.HEAP32[e>>>2]}function wt(e){const t=g.mono_wasm_i52_to_f64(e,m._i52_error_scratch_buffer);return ot(ht(m._i52_error_scratch_buffer)),t}function gt(e){const t=g.mono_wasm_u52_to_f64(e,m._i52_error_scratch_buffer);return ot(ht(m._i52_error_scratch_buffer)),t}function yt(e){if(!Ve)throw new Error("Assert failed: BigInt is not supported.");return He[e>>>3]}function bt(e){return t.HEAPF32[e>>>2]}function vt(e){return t.HEAPF64[e>>>3]}let Et,At;function kt(e){const r=t._malloc(e.length);return new Uint8Array(t.HEAPU8.buffer,r,e.length).set(e),r}const St=8192;let Ot=null,xt=null,Nt=0;const jt=[],Dt=[];function Mt(e,r){if(e<=0)throw new Error("capacity >= 1");const n=4*(e|=0),o=t._malloc(n);if(o%4!=0)throw new Error("Malloc returned an unaligned offset");return Ge(o,n),new $t(o,e,!0,r)}function Rt(e){let t;if(!e)throw new Error("address must be a location in the native heap");return Dt.length>0?(t=Dt.pop(),t._set_address(e)):t=new Pt(e),t}function Tt(e){let t;if(jt.length>0)t=jt.pop();else{const e=function(){if(h(Ot)||!xt){Ot=Mt(St,"js roots"),xt=new Int32Array(St),Nt=St;for(let e=0;e>>2,this.__count=t,this.length=t,this.__handle=g.mono_wasm_register_root(e,o,n||"noname"),this.__ownsAllocation=r}_throw_index_out_of_range(){throw new Error("index out of range")}_check_in_range(e){(e>=this.__count||e<0)&&this._throw_index_out_of_range()}get_address(e){return this._check_in_range(e),this.__offset+4*e}get_address_32(e){return this._check_in_range(e),this.__offset32+e}get(e){this._check_in_range(e);const r=this.get_address_32(e);return t.HEAPU32[r]}set(e,t){const r=this.get_address(e);return g.mono_wasm_write_managed_pointer_unsafe(r,t),t}copy_value_from_address(e,t){const r=this.get_address(e);g.mono_wasm_copy_managed_pointer(r,t)}_unsafe_get(e){return t.HEAPU32[this.__offset32+e]}_unsafe_set(e,t){const r=this.__offset+e;g.mono_wasm_write_managed_pointer_unsafe(r,t)}clear(){this.__offset&&Ge(this.__offset,4*this.__count)}release(){this.__offset&&this.__ownsAllocation&&(g.mono_wasm_deregister_root(this.__offset),Ge(this.__offset,4*this.__count),t._free(this.__offset)),this.__handle=this.__offset=this.__count=this.__offset32=0}toString(){return`[root buffer @${this.get_address(0)}, size ${this.__count} ]`}}class Ft{constructor(e,t){this.__buffer=e,this.__index=t}get_address(){return this.__buffer.get_address(this.__index)}get_address_32(){return this.__buffer.get_address_32(this.__index)}get address(){return this.__buffer.get_address(this.__index)}get(){return this.__buffer._unsafe_get(this.__index)}set(e){const t=this.__buffer.get_address(this.__index);return g.mono_wasm_write_managed_pointer_unsafe(t,e),e}copy_from(e){const t=e.address,r=this.address;g.mono_wasm_copy_managed_pointer(r,t)}copy_to(e){const t=this.address,r=e.address;g.mono_wasm_copy_managed_pointer(r,t)}copy_from_address(e){const t=this.address;g.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.address;g.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){this.set(0)}release(){if(!this.__buffer)throw new Error("No buffer");jt.length>128?(function(e){void 0!==e&&(Ot.set(e,0),xt[Nt]=e,Nt++)}(this.__index),this.__buffer=null,this.__index=0):(this.set(0),jt.push(this))}toString(){return`[root @${this.address}]`}}class Pt{constructor(e){this.__external_address=0,this.__external_address_32=0,this._set_address(e)}_set_address(e){this.__external_address=e,this.__external_address_32=e>>>2}get address(){return this.__external_address}get_address(){return this.__external_address}get_address_32(){return this.__external_address_32}get(){return t.HEAPU32[this.__external_address_32]}set(e){return g.mono_wasm_write_managed_pointer_unsafe(this.__external_address,e),e}copy_from(e){const t=e.address,r=this.__external_address;g.mono_wasm_copy_managed_pointer(r,t)}copy_to(e){const t=this.__external_address,r=e.address;g.mono_wasm_copy_managed_pointer(r,t)}copy_from_address(e){const t=this.__external_address;g.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.__external_address;g.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){this.set(0)}release(){Dt.length<128&&Dt.push(this)}toString(){return`[external root @${this.address}]`}}const Ct=new Map,Ut=new Map,Bt=Symbol.for("wasm bound_cs_function"),zt=Symbol.for("wasm bound_js_function"),Wt=16;function Lt(e){const r=t.stackAlloc(Wt*e);if(!r||r%8!=0)throw new Error("Assert failed: Arg alignment");er(Ht(r,0),yr.None);return er(Ht(r,1),yr.None),r}function Ht(e,t){if(!e)throw new Error("Assert failed: Null args");return e+t*Wt}function Vt(e,t){if(!e)throw new Error("Assert failed: Null signatures");return e+32*t+8}function qt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e)}function Jt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+16)}function Gt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+20)}function Yt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+24)}function Xt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+28)}function Zt(e){if(!e)throw new Error("Assert failed: Null signatures");return ht(e+4)}function Kt(e){if(!e)throw new Error("Assert failed: Null signatures");return ht(e)}function Qt(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+12)}function er(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+12,t)}function tr(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e)}function rr(e,t){if(!e)throw new Error("Assert failed: Null arg");if("boolean"!=typeof t)throw new Error(`Assert failed: Value is not a Boolean: ${t} (${typeof t})`);Xe(e,t?1:0)}function nr(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e,t)}function or(e,t){if(!e)throw new Error("Assert failed: Null arg");ut(e,t.getTime())}function sr(e,t){if(!e)throw new Error("Assert failed: Null arg");ut(e,t)}function ir(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+4)}function ar(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+4,t)}function cr(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+4)}function ur(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+4,t)}function lr(e){if(!e)throw new Error("Assert failed: Null arg");return Rt(e)}function _r(e){if(!e)throw new Error("Assert failed: Null arg");return ht(e+8)}function fr(e,t){if(!e)throw new Error("Assert failed: Null arg");nt(e+8,t)}class dr{dispose(){De(this,0)}get isDisposed(){return 0===this[ke]}toString(){return`CsObject(gc_handle: ${this[ke]})`}}class mr extends Error{constructor(e){super(e),this.superStack=Object.getOwnPropertyDescriptor(this,"stack"),Object.defineProperty(this,"stack",{get:this.getManageStack})}getSuperStack(){return this.superStack?this.superStack.value:super.stack}getManageStack(){const e=this[ke];if(e){const t=m.javaScriptExports.get_managed_stack_trace(e);if(t)return t+"\n"+this.getSuperStack()}return this.getSuperStack()}dispose(){De(this,0)}get isDisposed(){return 0===this[ke]}}function pr(e){return e==yr.Byte?1:e==yr.Int32?4:e==yr.Int52||e==yr.Double?8:e==yr.String||e==yr.Object||e==yr.JSObject?Wt:-1}class hr{constructor(e,t,r){this._pointer=e,this._length=t,this._viewType=r}_unsafe_create_view(){const e=0==this._viewType?new Uint8Array(t.HEAPU8.buffer,this._pointer,this._length):1==this._viewType?new Int32Array(t.HEAP32.buffer,this._pointer,this._length):2==this._viewType?new Float64Array(t.HEAPF64.buffer,this._pointer,this._length):null;if(!e)throw new Error("NotImplementedException");return e}set(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const r=this._unsafe_create_view();if(!e||!r||e.constructor!==r.constructor)throw new Error(`Assert failed: Expected ${r.constructor}`);r.set(e,t)}copyTo(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const r=this._unsafe_create_view();if(!e||!r||e.constructor!==r.constructor)throw new Error(`Assert failed: Expected ${r.constructor}`);const n=r.subarray(t);e.set(n)}slice(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._unsafe_create_view().slice(e,t)}get length(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._length}get byteLength(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return 0==this._viewType?this._length:1==this._viewType?this._length<<2:2==this._viewType?this._length<<3:0}}class wr extends hr{constructor(e,t,r){super(e,t,r),this.is_disposed=!1}dispose(){this.is_disposed=!0}get isDisposed(){return this.is_disposed}}class gr extends hr{constructor(e,t,r){super(e,t,r)}dispose(){De(this,0)}get isDisposed(){return 0===this[ke]}}var yr;!function(e){e[e.None=0]="None",e[e.Void=1]="Void",e[e.Discard=2]="Discard",e[e.Boolean=3]="Boolean",e[e.Byte=4]="Byte",e[e.Char=5]="Char",e[e.Int16=6]="Int16",e[e.Int32=7]="Int32",e[e.Int52=8]="Int52",e[e.BigInt64=9]="BigInt64",e[e.Double=10]="Double",e[e.Single=11]="Single",e[e.IntPtr=12]="IntPtr",e[e.JSObject=13]="JSObject",e[e.Object=14]="Object",e[e.String=15]="String",e[e.Exception=16]="Exception",e[e.DateTime=17]="DateTime",e[e.DateTimeOffset=18]="DateTimeOffset",e[e.Nullable=19]="Nullable",e[e.Task=20]="Task",e[e.Array=21]="Array",e[e.ArraySegment=22]="ArraySegment",e[e.Span=23]="Span",e[e.Action=24]="Action",e[e.Function=25]="Function",e[e.JSException=26]="JSException"}(yr||(yr={}));const br=new Map,vr=new Map;let Er=0,Ar=null,kr=0;const Sr=new class{init_fields(){this.mono_wasm_string_decoder_buffer||(this.mono_text_decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):null,this.mono_wasm_string_root=Tt(),this.mono_wasm_string_decoder_buffer=t._malloc(12))}copy(e){if(this.init_fields(),0===e)return null;this.mono_wasm_string_root.value=e;const t=this.copy_root(this.mono_wasm_string_root);return this.mono_wasm_string_root.value=0,t}copy_root(e){if(this.init_fields(),0===e.value)return null;const t=this.mono_wasm_string_decoder_buffer+0,r=this.mono_wasm_string_decoder_buffer+4,n=this.mono_wasm_string_decoder_buffer+8;let o;g.mono_wasm_string_get_data_ref(e.address,t,r,n);const s=ht(r),i=dt(t),a=ht(n);if(a&&(o=br.get(e.value)),void 0===o&&(s&&i?(o=this.decode(i,i+s),a&&br.set(e.value,o)):o=Or),void 0===o)throw new Error(`internal error when decoding string at location ${e.value}`);return o}decode(e,r){let n="";if(this.mono_text_decoder){const o="undefined"!=typeof SharedArrayBuffer&&t.HEAPU8.buffer instanceof SharedArrayBuffer?t.HEAPU8.slice(e,r):t.HEAPU8.subarray(e,r);n=this.mono_text_decoder.decode(o)}else for(let o=0;o=8192&&(Ar=null),Ar||(Ar=Mt(8192,"interned strings"),kr=0);const n=Ar,o=kr++;if(r&&(g.mono_wasm_intern_string_ref(t.address),!t.value))throw new Error("mono_wasm_intern_string_ref produced a null pointer");vr.set(e,t.value),br.set(t.value,e),0!==e.length||Er||(Er=t.value),n.copy_value_from_address(o,t.address)}(r,t,!0))}function Mr(e,t){if(t.clear(),null!==e)if("symbol"==typeof e)Dr(e,t);else{if("string"!=typeof e)throw new Error("Expected string argument, got "+typeof e);if(0===e.length)Dr(e,t);else{if(e.length<=256){const r=vr.get(e);if(r)return void t.set(r)}Rr(e,t)}}}function Rr(e,r){const n=t._malloc(2*(e.length+1)),o=n>>>1|0;for(let r=0;r{const r=Ht(e,0),a=Ht(e,1),c=Ht(e,2),u=Ht(e,3),l=Ht(e,4);try{let e,r,_;o&&(e=o(c)),s&&(r=s(u)),i&&(_=i(l));const f=t(e,r,_);n&&n(a,f)}catch(e){Qr(r,e)}};a[zt]=!0;ar(e,xe(a)),er(e,yr.Function)}class Zr{constructor(e){this.promise=e}dispose(){De(this,0)}get isDisposed(){return 0===this[ke]}}function Kr(e,t,r,n){if(null==t)return void er(e,yr.None);if(!Ce(t))throw new Error("Assert failed: Value is not a Promise");const o=m.javaScriptExports.create_task_callback();ur(e,o),er(e,yr.Task);const s=new Zr(t);je(s,o),t.then((e=>{m.javaScriptExports.complete_task(o,null,e,n||tn),De(s,o)})).catch((e=>{m.javaScriptExports.complete_task(o,e,null,void 0),De(s,o)}))}function Qr(e,t){if(null==t)er(e,yr.None);else if(t instanceof mr){er(e,yr.Exception);ur(e,Me(t))}else{if("object"!=typeof t&&"string"!=typeof t)throw new Error("Assert failed: Value is not an Error "+typeof t);er(e,yr.JSException);Gr(e,t.toString());const r=t[Se];if(r)ar(e,r);else{ar(e,xe(t))}}}function en(e,t){if(null==t)er(e,yr.None);else{if(void 0!==t[ke])throw new Error("Assert failed: JSObject proxy of ManagedObject proxy is not supported");if("function"!=typeof t&&"object"!=typeof t)throw new Error(`Assert failed: JSObject proxy of ${typeof t} is not supported`);er(e,yr.JSObject);ar(e,xe(t))}}function tn(e,t){if(null==t)er(e,yr.None);else{const r=t[ke],n=typeof t;if(void 0===r)if("string"===n||"symbol"===n)er(e,yr.String),Gr(e,t);else if("number"===n)er(e,yr.Double),sr(e,t);else{if("bigint"===n)throw new Error("NotImplementedException: bigint");if("boolean"===n)er(e,yr.Boolean),rr(e,t);else if(t instanceof Date)er(e,yr.DateTime),or(e,t);else if(t instanceof Error)Qr(e,t);else if(t instanceof Uint8Array)nn(e,t,yr.Byte);else if(t instanceof Float64Array)nn(e,t,yr.Double);else if(t instanceof Int32Array)nn(e,t,yr.Int32);else if(Array.isArray(t))nn(e,t,yr.Object);else{if(t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array)throw new Error("NotImplementedException: TypedArray");if(Ce(t))Kr(e,t);else{if(t instanceof wr)throw new Error("NotImplementedException: Span");if("object"!=n)throw new Error(`JSObject proxy is not supported for ${n} ${t}`);{const r=xe(t);er(e,yr.JSObject),ar(e,r)}}}}else{if(Me(t),t instanceof gr)throw new Error("NotImplementedException: ArraySegment");if(t instanceof mr)er(e,yr.Exception),ur(e,r);else{if(!(t instanceof dr))throw new Error("NotImplementedException "+n);er(e,yr.Object),ur(e,r)}}}}function rn(e,t,r){if(!r)throw new Error("Assert failed: Expected valid sig parameter");nn(e,t,Gt(r))}function nn(e,r,n){if(null==r)er(e,yr.None);else{const o=pr(n);if(-1==o)throw new Error(`Assert failed: Element type ${yr[n]} not supported`);const s=r.length,i=o*s,a=t._malloc(i);if(n==yr.String){if(!Array.isArray(r))throw new Error("Assert failed: Value is not an Array");Ge(a,i),g.mono_wasm_register_root(a,i,"marshal_array_to_cs");for(let e=0;e>2,(a>>2)+s).set(r)}else{if(n!=yr.Double)throw new Error("not implemented");if(!(Array.isArray(r)||r instanceof Float64Array))throw new Error("Assert failed: Value is not an Array or Float64Array");t.HEAPF64.subarray(a>>3,(a>>3)+s).set(r)}nr(e,a),er(e,yr.Array),function(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+4,t)}(e,n),fr(e,r.length)}}function on(e,t,r){if(!r)throw new Error("Assert failed: Expected valid sig parameter");if(t.isDisposed)throw new Error("Assert failed: ObjectDisposedException");an(r,t._viewType),er(e,yr.Span),nr(e,t._pointer),fr(e,t.length)}function sn(e,t,r){if(!r)throw new Error("Assert failed: Expected valid sig parameter");const n=Me(t);if(!n)throw new Error("Assert failed: Only roundtrip of ArraySegment instance created by C#");an(r,t._viewType),er(e,yr.ArraySegment),nr(e,t._pointer),fr(e,t.length),ur(e,n)}function an(e,t){const r=Gt(e);if(r==yr.Byte){if(0!=t)throw new Error("Assert failed: Expected MemoryViewType.Byte")}else if(r==yr.Int32){if(1!=t)throw new Error("Assert failed: Expected MemoryViewType.Int32")}else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);if(2!=t)throw new Error("Assert failed: Expected MemoryViewType.Double")}}function cn(e,t,r,n,o,s){let i="",a="",c="";const u="converter"+t;let l="null",_="null",f="null",d="null",m=qt(e);if(m===yr.None||m===yr.Void)return{converters:i,call_body:c,marshaler_type:m};const p=Jt(e);if(p!==yr.None){const e=Ct.get(p);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${p} at ${t}`);m!=yr.Nullable?(d="converter"+t+"_res",i+=", "+d,a+=" "+yr[p],s[d]=e):m=p}const h=Gt(e);if(h!==yr.None){const e=Ut.get(h);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${h} at ${t}`);l="converter"+t+"_arg1",i+=", "+l,a+=" "+yr[h],s[l]=e}const w=Yt(e);if(w!==yr.None){const e=Ut.get(w);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${w} at ${t}`);_="converter"+t+"_arg2",i+=", "+_,a+=" "+yr[w],s[_]=e}const g=Xt(e);if(g!==yr.None){const e=Ut.get(g);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${g} at ${t}`);f="converter"+t+"_arg3",i+=", "+f,a+=" "+yr[g],s[f]=e}const y=Ct.get(m);if(!y||"function"!=typeof y)throw new Error(`Assert failed: Unknow converter for type ${m} at ${t} `);return i+=", "+u,a+=" "+yr[m],s[u]=y,c=m==yr.Task?` const ${o} = ${u}(args + ${r}, signature + ${n}, ${d}); // ${a} \n`:m==yr.Action||m==yr.Function?` const ${o} = ${u}(args + ${r}, signature + ${n}, ${d}, ${l}, ${_}, ${f}); // ${a} \n`:` const ${o} = ${u}(args + ${r}, signature + ${n}); // ${a} \n`,{converters:i,call_body:c,marshaler_type:m}}function un(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return!!_t(e)}(e)}function ln(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return _t(e)}(e)}function _n(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return ft(e)}(e)}function fn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return pt(e)}(e)}function dn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return ht(e)}(e)}function mn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return vt(e)}(e)}function pn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return yt(e)}(e)}function hn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return bt(e)}(e)}function wn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return vt(e)}(e)}function gn(e){return Qt(e)==yr.None?null:tr(e)}function yn(){return null}function bn(e){return Qt(e)===yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");const t=vt(e);return new Date(t)}(e)}function vn(e,t,r,n,o,s){if(Qt(e)===yr.None)return null;const i=cr(e);let a=Re(i);return null!=a||(a=(e,t,a)=>m.javaScriptExports.call_delegate(i,e,t,a,r,n,o,s),je(a,i)),a}function En(e,t,r){const n=Qt(e);if(n===yr.None)return null;if(n!==yr.Task){if(r||(r=Ct.get(n)),!r)throw new Error(`Assert failed: Unknow sub_converter for type ${yr[n]} `);const t=r(e);return new Promise((e=>e(t)))}const o=ir(e);if(0==o)return new Promise((e=>e(void 0)));const s=Oe(o);if(!s)throw new Error(`Assert failed: ERR28: promise not found for js_handle: ${o} `);Fe(s);const i=$e(s),a=i.resolve;return i.resolve=e=>{const t=Qt(e);if(t===yr.None)return void a(null);if(r||(r=Ct.get(t)),!r)throw new Error(`Assert failed: Unknow sub_converter for type ${yr[t]}`);const n=r(e);a(n)},s}function An(e){const t=Ht(e,0),r=Ht(e,1),n=Ht(e,2),o=Ht(e,3),s=Qt(t),i=Qt(o),a=ir(n);if(0===a){const{promise:e,promise_control:n}=Ie();if(ar(r,xe(e)),s!==yr.None){const e=Sn(t);n.reject(e)}else if(i!==yr.Task){const e=Ct.get(i);if(!e)throw new Error(`Assert failed: Unknow sub_converter for type ${yr[i]} `);const t=e(o);n.resolve(t)}}else{const e=Oe(a);if(!e)throw new Error(`Assert failed: ERR25: promise not found for js_handle: ${a} `);Fe(e);const r=$e(e);if(s!==yr.None){const e=Sn(t);r.reject(e)}else i!==yr.Task&&r.resolve(o)}er(r,yr.Task),er(t,yr.None)}function kn(e){if(Qt(e)==yr.None)return null;const t=lr(e);try{return Nr(t)}finally{t.release()}}function Sn(e){const t=Qt(e);if(t==yr.None)return null;if(t==yr.JSException){return Oe(ir(e))}const r=cr(e);let n=Re(r);if(null==n){const t=kn(e);n=new mr(t),je(n,r)}return n}function On(e){if(Qt(e)==yr.None)return null;return Oe(ir(e))}function xn(e){const t=Qt(e);if(t==yr.None)return null;if(t==yr.JSObject){return Oe(ir(e))}if(t==yr.Array){return jn(e,function(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+4)}(e))}if(t==yr.Object){const t=cr(e);if(0===t)return null;let r=Re(t);return r||(r=new dr,je(r,t)),r}const r=Ct.get(t);if(!r)throw new Error(`Assert failed: Unknow converter for type ${yr[t]}`);return r(e)}function Nn(e,t){if(!t)throw new Error("Assert failed: Expected valid sig parameter");return jn(e,Gt(t))}function jn(e,r){if(Qt(e)==yr.None)return null;if(-1==pr(r))throw new Error(`Assert failed: Element type ${yr[r]} not supported`);const n=tr(e),o=_r(e);let s=null;if(r==yr.String){s=new Array(o);for(let e=0;e>2,(n>>2)+o).slice()}else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);s=t.HEAPF64.subarray(n>>3,(n>>3)+o).slice()}return t._free(n),s}function Dn(e,t){if(!t)throw new Error("Assert failed: Expected valid sig parameter");const r=Gt(t),n=tr(e),o=_r(e);let s=null;if(r==yr.Byte)s=new wr(n,o,0);else if(r==yr.Int32)s=new wr(n,o,1);else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);s=new wr(n,o,2)}return s}function Mn(e,t){if(!t)throw new Error("Assert failed: Expected valid sig parameter");const r=Gt(t),n=tr(e),o=_r(e);let s=null;if(r==yr.Byte)s=new gr(n,o,0);else if(r==yr.Int32)s=new gr(n,o,1);else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);s=new gr(n,o,2)}return je(s,cr(e)),s}let Rn,Tn;const In={};const $n=Symbol.for("wasm type");const Fn=Ie(),Pn=Ie();let Cn=0,Un=0,Bn=0,zn=0;const Wn=[],Ln=Object.create(null);let Hn,Vn=0;const qn={"js-module-threads":!0},Jn={dotnetwasm:!0},Gn={"js-module-threads":!0,dotnetwasm:!0};async function Yn(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_download_assets"),m.maxParallelDownloads=m.config.maxParallelDownloads||m.maxParallelDownloads;try{const e=[];for(const t of m.config.assets){const r=t;if(Gn[r.behavior]||zn++,!qn[r.behavior]){const t=Jn[r.behavior];if(Bn++,r.pendingDownload){r.pendingDownloadInternal=r.pendingDownload;const n=async()=>{const e=await r.pendingDownloadInternal.response;return t||(r.buffer=await e.arrayBuffer()),++Cn,{asset:r,buffer:r.buffer}};e.push(n())}else{const n=async()=>(r.buffer=await Xn(r,!t),{asset:r,buffer:r.buffer});e.push(n())}}}Pn.promise_control.resolve();const r=[];for(const t of e)r.push((async()=>{const e=await t,r=e.asset;if(e.buffer){if(!Gn[r.behavior]){const t=r.pendingDownloadInternal.url,n=new Uint8Array(r.buffer);r.pendingDownloadInternal=null,r.pendingDownload=null,r.buffer=null,e.buffer=null,await ki.promise,eo(r,t,n)}}else{if(Jn[r.behavior])Jn[r.behavior]&&++Cn;else{if(!r.isOptional)throw new Error("Assert failed: Expected asset to have the downloaded buffer");qn[r.behavior]||Bn--,Gn[r.behavior]||zn--}}})());Promise.all(r).then((()=>{Fn.promise_control.resolve()})).catch((e=>{t.printErr("MONO_WASM: Error in mono_download_assets: "+e),Mi(e,!0)}))}catch(e){throw t.printErr("MONO_WASM: Error in mono_download_assets: "+e),e}}async function Xn(e,t){try{return await Zn(e,t)}catch(r){if(s||o)throw r;if(e.pendingDownload&&e.pendingDownloadInternal==e.pendingDownload)throw r;if(e.resolvedUrl&&-1!=e.resolvedUrl.indexOf("file://"))throw r;if(r&&404==r.status)throw r;e.pendingDownloadInternal=void 0,await Pn.promise;try{return await Zn(e,t)}catch(r){return e.pendingDownloadInternal=void 0,await function(e){return new Promise((t=>setTimeout(t,e)))}(100),await Zn(e,t)}}}async function Zn(e,r){for(;Hn;)await Hn.promise;try{++Vn,Vn==m.maxParallelDownloads&&(m.diagnosticTracing&&console.debug("MONO_WASM: Throttling further parallel downloads"),Hn=Ie());const n=await async function(e){if(e.buffer){const t=e.buffer;return e.buffer=null,e.pendingDownloadInternal={url:"undefined://"+e.name,name:e.name,response:Promise.resolve({arrayBuffer:()=>t,headers:{get:()=>{}}})},e.pendingDownloadInternal.response}if(e.pendingDownloadInternal&&e.pendingDownloadInternal.response){return await e.pendingDownloadInternal.response}const r=e.loadRemote&&m.config.remoteSources?m.config.remoteSources:[""];let n;for(let t of r){t=t.trim(),"./"===t&&(t="");const r=Kn(e,t);e.name===r?m.diagnosticTracing&&console.debug(`MONO_WASM: Attempting to download '${r}'`):m.diagnosticTracing&&console.debug(`MONO_WASM: Attempting to download '${r}' for ${e.name}`);try{const t=Qn({name:e.name,resolvedUrl:r,hash:e.hash,behavior:e.behavior});if(e.pendingDownloadInternal=t,n=await t.response,!n.ok)continue;return n}catch(e){continue}}const o=e.isOptional||e.name.match(/\.pdb$/)&&m.config.ignorePdbLoadErrors;if(!n)throw new Error(`Assert failed: Response undefined ${e.name}`);if(o)return void t.print(`MONO_WASM: optional download '${n.url}' for ${e.name} failed ${n.status} ${n.statusText}`);{const t=new Error(`MONO_WASM: download '${n.url}' for ${e.name} failed ${n.status} ${n.statusText}`);throw t.status=n.status,t}}(e);if(!r||!n)return;const o=await n.arrayBuffer();return++Cn,o}finally{if(--Vn,Hn&&Vn==m.maxParallelDownloads-1){m.diagnosticTracing&&console.debug("MONO_WASM: Resuming more parallel downloads");const e=Hn;Hn=void 0,e.promise_control.resolve()}}}function Kn(e,t){if(null==t)throw new Error(`Assert failed: sourcePrefix must be provided for ${e.name}`);let r;const n=m.config.assemblyRootFolder;if(e.resolvedUrl)r=e.resolvedUrl;else{if(""===t)if("assembly"===e.behavior||"pdb"===e.behavior)r=n?n+"/"+e.name:e.name;else if("resource"===e.behavior){const t=e.culture&&""!==e.culture?`${e.culture}/${e.name}`:e.name;r=n?n+"/"+t:t}else r=e.name;else r=t+e.name;r=m.locateFile(r)}if(!r||"string"!=typeof r)throw new Error("Assert failed: attemptUrl need to be path or url string");return r}function Qn(e){try{if("function"==typeof t.downloadResource){const r=t.downloadResource(e);if(r)return r}const r={};e.hash&&(r.integrity=e.hash);const n=m.fetch_like(e.resolvedUrl,r);return{name:e.name,url:e.resolvedUrl,response:n}}catch(t){const r={ok:!1,url:e.resolvedUrl,status:500,statusText:"ERR29: "+t,arrayBuffer:()=>{throw t},json:()=>{throw t}};return{name:e.name,url:e.resolvedUrl,response:Promise.resolve(r)}}}function eo(e,r,n){m.diagnosticTracing&&console.debug(`MONO_WASM: Loaded:${e.name} as ${e.behavior} size ${n.length} from ${r}`);const o="string"==typeof e.virtualPath?e.virtualPath:e.name;let s=null;switch(e.behavior){case"dotnetwasm":case"js-module-threads":break;case"resource":case"assembly":case"pdb":Wn.push({url:r,file:o});case"heap":case"icu":s=kt(n),Ln[o]=[s,n.length];break;case"vfs":{const e=o.lastIndexOf("/");let r=e>0?o.substr(0,e):null,s=e>0?o.substr(e+1):o;s.startsWith("/")&&(s=s.substr(1)),r?(m.diagnosticTracing&&console.debug(`MONO_WASM: Creating directory '${r}'`),t.FS_createPath("/",r,!0,!0)):r="/",m.diagnosticTracing&&console.debug(`MONO_WASM: Creating file '${s}' in directory '${r}'`),to(n,r)||t.FS_createDataFile(r,s,n,!0,!0,!0);break}default:throw new Error(`Unrecognized asset behavior:${e.behavior}, for asset ${e.name}`)}if("assembly"===e.behavior){if(!g.mono_wasm_add_assembly(o,s,n.length)){const e=Wn.findIndex((e=>e.file==o));Wn.splice(e,1)}}else"icu"===e.behavior?J(s)||t.printErr(`MONO_WASM: Error loading ICU asset ${e.name}`):"resource"===e.behavior&&g.mono_wasm_add_satellite_assembly(o,e.culture||"",s,n.length);++Un}function to(e,r){if(e.length<8)return!1;const n=new DataView(e.buffer);if(1651270004!=n.getUint32(0,!0))return!1;const o=n.getUint32(4,!0);if(0==o||e.length{const t=e[0],r=t.lastIndexOf("/"),n=t.slice(0,r+1);i.add(n)})),i.forEach((e=>{t.FS_createPath(r,e,!0,!0)}));for(const n of s){const o=n[0],s=n[1],i=e.slice(0,s);t.FS_createDataFile(r,o,i,!0,!0),e=e.slice(s)}return!0}async function ro(){if(await Fn.promise,m.config.assets){if(Cn!=Bn)throw new Error(`Assert failed: Expected ${Bn} assets to be downloaded, but only finished ${Cn}`);if(Un!=zn)throw new Error(`Assert failed: Expected ${zn} assets to be in memory, but only instantiated ${Un}`);Wn.forEach((e=>Rn.loaded_files.push(e.url))),m.diagnosticTracing&&console.debug("MONO_WASM: all assets are loaded in wasm memory")}}function no(){return Rn.loaded_files}let oo,so;function io(e){const r=t;void 0===globalThis.performance&&(globalThis.performance=ao),void 0===globalThis.URL&&(globalThis.URL=class{constructor(e){this.url=e}toString(){return this.url}});const n=r.imports=t.imports||{},c=e=>r=>t.imports[r]||e(r);n.require?m.requirePromise=e.requirePromise=Promise.resolve(c(n.require)):e.require?m.requirePromise=e.requirePromise=Promise.resolve(c(e.require)):e.requirePromise?m.requirePromise=e.requirePromise.then((e=>c(e))):m.requirePromise=e.requirePromise=Promise.resolve(c((e=>{throw new Error(`Please provide Module.imports.${e} or Module.imports.require`)}))),m.scriptDirectory=e.scriptDirectory=function(e){return a&&(e.scriptUrl=self.location.href),e.scriptUrl||(e.scriptUrl="./dotnet.js"),e.scriptUrl=function(e){return e.replace(/\\/g,"/").replace(/[?#].*/,"")}(e.scriptUrl),function(e){return e.slice(0,e.lastIndexOf("/"))+"/"}(e.scriptUrl)}(e),r.mainScriptUrlOrBlob=e.scriptUrl,r.__locateFile===r.locateFile?r.locateFile=m.locateFile=e=>function(e){return o||s?e.startsWith("/")||e.startsWith("\\")||-1!==e.indexOf("///")||lo.test(e):uo.test(e)}(e)?e:m.scriptDirectory+e:m.locateFile=r.locateFile,n.fetch?e.fetch=m.fetch_like=n.fetch:e.fetch=m.fetch_like=co,e.noExitRuntime=i;const u=e.updateGlobalBufferAndViews;e.updateGlobalBufferAndViews=e=>{u(e),function(e){Ve&&(Et=BigInt("9223372036854775807"),At=BigInt("-9223372036854775808"),He=new BigInt64Array(e))}(e)}}const ao={now:function(){return Date.now()}};async function co(e,r){try{if(o){if(!oo){const e=await m.requirePromise;so=e("url"),oo=e("fs")}e.startsWith("file://")&&(e=so.fileURLToPath(e));const t=await oo.promises.readFile(e);return{ok:!0,url:e,arrayBuffer:()=>t,json:()=>JSON.parse(t)}}if("function"==typeof globalThis.fetch)return globalThis.fetch(e,r||{credentials:"same-origin"});if("function"==typeof read){const r=new Uint8Array(read(e,"binary"));return{ok:!0,url:e,arrayBuffer:()=>r,json:()=>JSON.parse(t.UTF8ArrayToString(r,0,r.length))}}}catch(r){return{ok:!1,url:e,status:500,statusText:"ERR28: "+r,arrayBuffer:()=>{throw r},json:()=>{throw r}}}throw new Error("No fetch implementation available")}const uo=/^[a-zA-Z][a-zA-Z\d+\-.]*?:\/\//,lo=/[a-zA-Z]:[\\/]/;function _o(e,t,r,n,o,s){const i=Rt(e),a=Rt(t),c=Rt(s);try{const e=Kt(r);if(1!==e)throw new Error(`Assert failed: Signature version ${e} mismatch.`);const t=Nr(i),o=Nr(a);m.diagnosticTracing&&console.debug(`MONO_WASM: Binding [JSImport] ${t} from ${o}`);const s=po(t,o),u=Zt(r),l={fn:s,marshal_exception_to_cs:Qr,signature:r},_="_bound_js_"+t.replace(/\./g,"_");let f=`//# sourceURL=https://dotnet.generated.invalid/${_} \n`,d="",p="",h="";for(let e=0;e{const o=await r;return n&&(Eo.set(e,o),m.diagnosticTracing&&console.debug(`MONO_WASM: imported ES6 module '${e}' from '${t}'`)),o}))}function ko(e,r,n){Mr(function(e,r){let n="unknown exception";if(r){n=r.toString();const e=r.stack;e&&(e.startsWith(n)?n=e:n+="\n"+e),n=se(n)}return e&&t.setValue(e,1,"i32"),n}(e,r),n)}const So=new Map;function Oo(e,r,n,o,s){const i=Rt(e),a=Rt(s),c=t;try{const e=Kt(n);if(1!==e)throw new Error(`Assert failed: Signature version ${e} mismatch.`);const t=Zt(n),o=Nr(i);if(!o)throw new Error("Assert failed: fully_qualified_name must be string");m.diagnosticTracing&&console.debug(`MONO_WASM: Binding [JSExport] ${o}`);const{assembly:s,namespace:u,classname:l,methodname:_}=Do(o),f=te(s);if(!f)throw new Error("Could not find assembly: "+s);const d=g.mono_wasm_assembly_find_class(f,u,l);if(!d)throw new Error("Could not find class: "+u+":"+l+" in assembly "+s);const p=`__Wrapper_${_}_${r}`,h=g.mono_wasm_assembly_find_method(d,p,-1);if(!h)throw new Error(`Could not find method: ${p} in ${d} [${s}]`);const w={method:h,signature:n,stackSave:c.stackSave,stackRestore:c.stackRestore,alloc_stack_frame:Lt,invoke_method_and_handle_exception:xo},y="_bound_cs_"+`${u}_${l}_${_}`.replace(/\./g,"_").replace(/\//g,"_");let b=`//# sourceURL=https://dotnet.generated.invalid/${y} \n`,v="",E="";for(let e=0;ea&&(i=a);const c=n*s;return new Uint8Array(e.buffer,0,i).set(t.HEAPU8.subarray(r+c,r+c+i)),i}throw new Error("Object '"+e+"' is not a typed array")}function Io(e){return"undefined"!=typeof SharedArrayBuffer?e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer:e.buffer instanceof ArrayBuffer}function $o(e,t,r){switch(!0){case null===t:case void 0===t:return void r.clear();case"symbol"==typeof t:case"string"==typeof t:return void Es._create_uri_ref(t,r.address);default:return void Co(e,t,r)}}function Fo(e){const t=Tt();try{return Po(e,t,!1),t.value}finally{t.release()}}function Po(e,t,r){if(h(t))throw new Error("Expected (value, WasmRoot, boolean)");switch(!0){case null===e:case void 0===e:return void t.clear();case"number"==typeof e:{let r;return(0|e)===e?(rt(In._box_buffer,e),r=In._class_int32):e>>>0===e?(Ke(In._box_buffer,e),r=In._class_uint32):(ut(In._box_buffer,e),r=In._class_double),void g.mono_wasm_box_primitive_ref(r,In._box_buffer,8,t.address)}case"string"==typeof e:return void Mr(e,t);case"symbol"==typeof e:return void Dr(e,t);case"boolean"==typeof e:return Ye(In._box_buffer,e),void g.mono_wasm_box_primitive_ref(In._class_boolean,In._box_buffer,4,t.address);case!0===Ce(e):return void function(e,t){if(!e)return t.clear(),null;const r=xe(e),n=Es._create_tcs(),o={tcs_gc_handle:n};je(o,n),e.then((e=>{Es._set_tcs_result_ref(n,e)}),(e=>{Es._set_tcs_failure(n,e?e.toString():"")})).finally((()=>{Ne(r),De(o,n)})),Es._get_tcs_task_ref(n,t.address)}(e,t);case"Date"===e.constructor.name:return void Es._create_date_time_ref(e.getTime(),t.address);default:return void Co(r,e,t)}}function Co(e,t,r){if(r.clear(),null!=t){if(void 0!==t[ke]){return void Ko(Me(t),r.address)}if(t[Se]&&(function(e,t,r){if(0===e||-1===e)return void rt(r,0);Es._get_cs_owned_object_by_js_handle_ref(e,t?1:0,r)}(t[Se],e,r.address),r.value||delete t[Se]),!r.value){const n=t[$n],o=void 0===n?0:n,s=xe(t);Es._create_cs_owned_proxy_ref(s,o,e?1:0,r.address)}}}function Uo(e,r){if(!Io(e)||!e.BYTES_PER_ELEMENT)throw new Error("Object '"+e+"' is not a typed array");{const n=e[$n],o=function(e){const r=e.length*e.BYTES_PER_ELEMENT,n=t._malloc(r),o=new Uint8Array(t.HEAPU8.buffer,n,r);return o.set(new Uint8Array(e.buffer,e.byteOffset,r)),o}(e);g.mono_wasm_typed_array_new_ref(o.byteOffset,e.length,e.BYTES_PER_ELEMENT,n,r.address),t._free(o.byteOffset)}}function Bo(e){const t=Tt();try{return Uo(e,t),t.value}finally{t.release()}}function zo(e,t,r){if("number"!=typeof e)throw new Error(`Expected numeric value for enum argument, got '${e}'`);return 0|e}function Wo(e,t,r){const n=Rt(r);try{const r=Oe(e);if(h(r))return void ko(t,"ERR06: Invalid JS object handle '"+e+"'",n);Uo(r,n)}catch(e){ko(t,String(e),n)}finally{n.release()}}const Lo=Symbol.for("wasm delegate_invoke");function Ho(e){if(0===e)return;const t=Tt(e);try{return Jo(t)}finally{t.release()}}function Vo(e,t,r,n){switch(t){case 0:return null;case 26:case 27:throw new Error("int64 not available");case 3:case 29:return Nr(e);case 4:throw new Error("no idea on how to unbox value types");case 5:return function(e){if(0===e.value)return null;return function(e){let t=Re(e);if(t)Me(t);else{t=function(...e){Me(t);return(0,t[Lo])(...e)};const r=Tt();Ko(e,r.address);try{if(void 0===t[Lo]){const n=g.mono_wasm_get_delegate_invoke_ref(r.address),o=ws(n,bs(n,r),!0);if(t[Lo]=o.bind({this_arg_gc_handle:e}),!t[Lo])throw new Error("System.Delegate Invoke method can not be resolved.")}}finally{r.release()}je(t,e)}return t}(Es._get_js_owned_object_gc_handle_ref(e.address))}(e);case 6:return function(e){if(0===e.value)return null;if(!Pe)throw new Error("Promises are not supported thus 'System.Threading.Tasks.Task' can not work in this context.");const t=Es._get_js_owned_object_gc_handle_ref(e.address);let r=Re(t);if(!r){const n=()=>De(r,t),{promise:o,promise_control:s}=Ie(n,n);r=o,Es._setup_js_cont_ref(e.address,s),je(r,t)}return r}(e);case 7:return function(e){if(0===e.value)return null;const t=Es._try_get_cs_owned_object_js_handle_ref(e.address,0);if(t){if(t===p)throw new Error("Cannot access a disposed JSObject at "+e.value);return Oe(t)}const r=Es._get_js_owned_object_gc_handle_ref(e.address);let n=Re(r);return h(n)&&(n=new dr,je(n,r)),n}(e);case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:throw new Error("Marshaling of primitive arrays are not supported.");case 20:return new Date(Es._get_date_value_ref(e.address));case 21:case 22:return Es._object_to_string_ref(e.address);case 23:return function(e){return Oe(Es._get_cs_owned_object_js_handle_ref(e.address,0))}(e);case 30:return;default:throw new Error(`no idea on how to unbox object of MarshalType ${t} at offset ${e.value} (root address is ${e.address})`)}}function qo(e,t,r){if(t>=512)throw new Error(`Got marshaling error ${t} when attempting to unbox object at address ${e.value} (root located at ${e.address})`);let n=0;if((4===t||7==t)&&(n=dt(r),n<1024))throw new Error(`Got invalid MonoType ${n} for object at address ${e.value} (root located at ${e.address})`);return Vo(e,t)}function Jo(e){if(0===e.value)return;const t=In._unbox_buffer,r=g.mono_wasm_try_unbox_primitive_and_get_type_ref(e.address,t,In._unbox_buffer_size);switch(r){case 1:return ht(t);case 25:case 32:return dt(t);case 24:return bt(t);case 2:return vt(t);case 8:return 0!==ht(t);case 28:return String.fromCharCode(ht(t));case 0:return null;default:return qo(e,r,t)}}function Go(e){if(0===e)return null;const t=Tt(e);try{return Xo(t)}finally{t.release()}}function Yo(e){return Es._is_simple_array_ref(e.address)}function Xo(e){if(0===e.value)return null;const t=e.address,r=Tt(),n=r.address;try{const o=g.mono_wasm_array_length(e.value),s=new Array(o);for(let e=0;e0&&Array.isArray(e[0])&&(e[0]=function(e,t,r){const n=Tt();t?g.mono_wasm_string_array_new_ref(e.length,n.address):g.mono_wasm_obj_array_new_ref(e.length,n.address);const o=Tt(0),s=n.address,i=o.address;try{for(let n=0;n{e&&"AbortError"!==e.name&&t.printErr("MONO_WASM: Error in http_wasm_abort_response: "+e)}))}function js(e,t,r,n,o,s,i,a){return Ds(e,t,r,n,o,s,new wr(i,a,0).slice())}function Ds(e,t,r,n,o,s,i){if(!e||"string"!=typeof e)throw new Error("Assert failed: expected url string");if(!(t&&r&&Array.isArray(t)&&Array.isArray(r)&&t.length===r.length))throw new Error("Assert failed: expected headerNames and headerValues arrays");if(!(n&&o&&Array.isArray(n)&&Array.isArray(o)&&n.length===o.length))throw new Error("Assert failed: expected headerNames and headerValues arrays");const a=new Headers;for(let e=0;e{const t=await fetch(e,c);return t.__abort_controller=s,t}))}function Ms(e){if(!e.__headerNames){e.__headerNames=[],e.__headerValues=[];const t=e.headers.entries();for(const r of t)e.__headerNames.push(r[0]),e.__headerValues.push(r[1])}}function Rs(e){return Ms(e),e.__headerNames}function Ts(e){return Ms(e),e.__headerValues}function Is(e){return Ue((async()=>{const t=await e.arrayBuffer();return e.__buffer=t,e.__source_offset=0,t.byteLength}))}function $s(e,t){if(!e.__buffer)throw new Error("Assert failed: expected resoved arrayBuffer");if(e.__source_offset==e.__buffer.byteLength)return 0;const r=new Uint8Array(e.__buffer,e.__source_offset);t.set(r,0);const n=Math.min(t.byteLength,r.byteLength);return e.__source_offset+=n,n}function Fs(e,t,r){const n=new wr(t,r,0);return Ue((async()=>{if(e.__reader||(e.__reader=e.body.getReader()),e.__chunk||(e.__chunk=await e.__reader.read(),e.__source_offset=0),e.__chunk.done)return 0;const t=e.__chunk.value.byteLength-e.__source_offset;if(!(t>0))throw new Error("Assert failed: expected remaining_source to be greater than 0");const r=Math.min(t,n.byteLength),o=e.__chunk.value.subarray(e.__source_offset,e.__source_offset+r);return n.set(o,0),e.__source_offset+=r,t==r&&(e.__chunk=void 0),r}))}let Ps,Cs=0,Us=!1,Bs=0;if(globalThis.navigator){const e=globalThis.navigator;e.userAgentData&&e.userAgentData.brands?Us=e.userAgentData.brands.some((e=>"Chromium"==e.brand)):e.userAgent&&(Us=e.userAgent.includes("Chrome"))}function zs(){for(;Bs>0;)--Bs,g.mono_background_exec()}function Ws(){if(!Us)return;const e=(new Date).valueOf(),t=e+36e4;for(let r=Math.max(e+1e3,Cs);r{g.mono_set_timeout_exec(),Bs++,zs()}),r-e)}Cs=t}function Ls(){++Bs,setTimeout(zs,0)}function Hs(e){Ps&&(clearTimeout(Ps),Ps=void 0),Ps=setTimeout((function(){g.mono_set_timeout_exec()}),e)}class Vs{constructor(){this.queue=[],this.offset=0}getLength(){return this.queue.length-this.offset}isEmpty(){return 0==this.queue.length}enqueue(e){this.queue.push(e)}dequeue(){if(0===this.queue.length)return;const e=this.queue[this.offset];return this.queue[this.offset]=null,2*++this.offset>=this.queue.length&&(this.queue=this.queue.slice(this.offset),this.offset=0),e}peek(){return this.queue.length>0?this.queue[this.offset]:void 0}drain(e){for(;this.getLength();){e(this.dequeue())}}}const qs=Symbol.for("wasm ws_pending_send_buffer"),Js=Symbol.for("wasm ws_pending_send_buffer_offset"),Gs=Symbol.for("wasm ws_pending_send_buffer_type"),Ys=Symbol.for("wasm ws_pending_receive_event_queue"),Xs=Symbol.for("wasm ws_pending_receive_promise_queue"),Zs=Symbol.for("wasm ws_pending_open_promise"),Ks=Symbol.for("wasm ws_pending_close_promises"),Qs=Symbol.for("wasm ws_pending_send_promises"),ei=Symbol.for("wasm ws_is_aborted"),ti=Symbol.for("wasm ws_receive_status_ptr");let ri,ni,oi=!1;const si=new Uint8Array;function ii(e,t,r,n){if(!e||"string"!=typeof e)throw new Error("Assert failed: ERR12: Invalid uri "+typeof e);const o=new globalThis.WebSocket(e,t||void 0),{promise_control:s}=Ie();o[Ys]=new Vs,o[Xs]=new Vs,o[Zs]=s,o[Qs]=[],o[Ks]=[],o[ti]=r,o.binaryType="arraybuffer";const i=e=>{o[ei]||(function(e,t){const r=e[Ys],n=e[Xs];if("string"==typeof t.data)void 0===ni&&(ni=new TextEncoder),r.enqueue({type:0,data:ni.encode(t.data),offset:0});else{if("ArrayBuffer"!==t.data.constructor.name)throw new Error("ERR19: WebSocket receive expected ArrayBuffer");r.enqueue({type:1,data:new Uint8Array(t.data),offset:0})}if(n.getLength()&&r.getLength()>1)throw new Error("ERR21: Invalid WS state");for(;n.getLength()&&r.getLength();){const t=n.dequeue();fi(e,r,t.buffer_ptr,t.buffer_length),t.resolve()}Ws()}(o,e),Ws())};return o.addEventListener("message",i),o.addEventListener("open",(()=>{o[ei]||(s.resolve(o),Ws())}),{once:!0}),o.addEventListener("close",(e=>{if(o.removeEventListener("message",i),o[ei])return;n&&n(e.code,e.reason),s.reject(e.reason);for(const e of o[Ks])e.resolve();o[Xs].drain((e=>{nt(r,0),nt(r+4,2),nt(r+8,1),e.resolve()}))}),{once:!0}),o.addEventListener("error",(e=>{s.reject(e.message||"WebSocket error")}),{once:!0}),o}function ai(e){if(!e)throw new Error("Assert failed: ERR17: expected ws instance");return e[Zs].promise}function ci(e,r,n,o,s){if(!e)throw new Error("Assert failed: ERR17: expected ws instance");const i=function(e,t,r,n){let o=e[qs],s=0;const i=t.byteLength;if(o){if(s=e[Js],r=e[Gs],0!==i){if(s+i>o.length){const r=new Uint8Array(1.5*(s+i+50));r.set(o,0),r.subarray(s).set(t),e[qs]=o=r}else o.subarray(s).set(t);s+=i,e[Js]=s}}else n?0!==i&&(o=t,s=i):(0!==i&&(o=t.slice(),s=i,e[Js]=s,e[qs]=o),e[Gs]=r);if(n){if(0==s||null==o)return si;if(0===r){void 0===ri&&(ri=new TextDecoder("utf-8",{fatal:!1}));const e="undefined"!=typeof SharedArrayBuffer&&o instanceof SharedArrayBuffer?o.slice(0,s):o.subarray(0,s);return ri.decode(e)}return o.subarray(0,s)}return null}(e,new Uint8Array(t.HEAPU8.buffer,r,n),o,s);return s&&i?function(e,t){if(e.send(t),e[qs]=null,e.bufferedAmount<65536)return null;const{promise:r,promise_control:n}=Ie(),o=e[Qs];o.push(n);let s=1;const i=()=>{if(0===e.bufferedAmount)n.resolve();else if(e.readyState!=WebSocket.OPEN)n.reject("InvalidState: The WebSocket is not connected.");else if(!n.isDone)return globalThis.setTimeout(i,s),void(s=Math.min(1.5*s,1e3));const t=o.indexOf(n);t>-1&&o.splice(t,1)};return globalThis.setTimeout(i,0),r}(e,i):null}function ui(e,t,r){if(!e)throw new Error("Assert failed: ERR18: expected ws instance");const n=e[Ys],o=e[Xs],s=e.readyState;if(s!=WebSocket.OPEN&&s!=WebSocket.CLOSING)throw new Error("InvalidState: The WebSocket is not connected.");if(n.getLength()){if(0!=o.getLength())throw new Error("Assert failed: ERR20: Invalid WS state");return fi(e,n,t,r),null}const{promise:i,promise_control:a}=Ie(),c=a;return c.buffer_ptr=t,c.buffer_length=r,o.enqueue(c),i}function li(e,t,r,n){if(!e)throw new Error("Assert failed: ERR19: expected ws instance");if(e.readyState==WebSocket.CLOSED)return null;if(n){const{promise:n,promise_control:o}=Ie();return e[Ks].push(o),"string"==typeof r?e.close(t,r):e.close(t),n}return oi||(oi=!0,console.warn("WARNING: Web browsers do not support closing the output side of a WebSocket. CloseOutputAsync has closed the socket and discarded any incoming messages.")),"string"==typeof r?e.close(t,r):e.close(t),null}function _i(e){if(!e)throw new Error("Assert failed: ERR18: expected ws instance");e[ei]=!0;const t=e[Zs];t&&t.reject("OperationCanceledException");for(const t of e[Ks])t.reject("OperationCanceledException");for(const t of e[Qs])t.reject("OperationCanceledException");e[Xs].drain((e=>{e.reject("OperationCanceledException")})),e.close(1e3,"Connection was aborted.")}function fi(e,r,n,o){const s=r.peek(),i=Math.min(o,s.data.length-s.offset);if(i>0){const e=s.data.subarray(s.offset,s.offset+i);new Uint8Array(t.HEAPU8.buffer,n,o).set(e,0),s.offset+=i}const a=s.data.length===s.offset?1:0;a&&r.dequeue();const c=e[ti];nt(c,i),nt(c+4,s.type),nt(c+8,a)}function di(){return{mono_wasm_exit:e=>{t.printErr("MONO_WASM: early exit "+e)},mono_wasm_enable_on_demand_gc:g.mono_wasm_enable_on_demand_gc,mono_profiler_init_aot:g.mono_profiler_init_aot,mono_wasm_exec_regression:g.mono_wasm_exec_regression,mono_method_resolve:ys,mono_intern_string:jr,logging:void 0,mono_wasm_stringify_as_error_with_stack:ie,mono_wasm_get_loaded_files:no,mono_wasm_send_dbg_command_with_parms:R,mono_wasm_send_dbg_command:T,mono_wasm_get_dbg_command_info:I,mono_wasm_get_details:W,mono_wasm_release_object:H,mono_wasm_call_function_on:z,mono_wasm_debugger_resume:$,mono_wasm_detach_debugger:F,mono_wasm_raise_debug_event:C,mono_wasm_change_debugger_log_level:P,mono_wasm_debugger_attached:U,mono_wasm_runtime_is_ready:m.mono_wasm_runtime_is_ready,get_property:wo,set_property:ho,has_property:go,get_typeof_property:yo,get_global_this:bo,get_dotnet_instance:()=>u,dynamic_import:Ao,mono_wasm_cancel_promise:Be,ws_wasm_create:ii,ws_wasm_open:ai,ws_wasm_send:ci,ws_wasm_receive:ui,ws_wasm_close:li,ws_wasm_abort:_i,http_wasm_supports_streaming_response:Ss,http_wasm_create_abort_controler:Os,http_wasm_abort_request:xs,http_wasm_abort_response:Ns,http_wasm_fetch:Ds,http_wasm_fetch_bytes:js,http_wasm_get_response_header_names:Rs,http_wasm_get_response_header_values:Ts,http_wasm_get_response_bytes:$s,http_wasm_get_response_length:Is,http_wasm_get_streamed_response_bytes:Fs}}function mi(){}let pi,hi=!1,wi=!1;const gi=Ie(),yi=Ie(),bi=Ie(),vi=Ie(),Ei=Ie(),Ai=Ie(),ki=Ie(),Si=Ie(),Oi=Ie();function xi(e,t){const r=e.instantiateWasm,n=e.preInit?"function"==typeof e.preInit?[e.preInit]:e.preInit:[],o=e.preRun?"function"==typeof e.preRun?[e.preRun]:e.preRun:[],s=e.postRun?"function"==typeof e.postRun?[e.postRun]:e.postRun:[],i=e.onRuntimeInitialized?e.onRuntimeInitialized:()=>{};wi=!(e.configSrc||e.config&&e.config.assets&&-1!=e.config.assets.findIndex((e=>"assembly"===e.behavior))),e.instantiateWasm=(e,t)=>Ni(e,t,r),e.preInit=[()=>ji(n)],e.preRun=[()=>Di(o)],e.onRuntimeInitialized=()=>async function(e){await Ai.promise,m.diagnosticTracing&&console.debug("MONO_WASM: onRuntimeInitialized"),ki.promise_control.resolve();try{wi||(await ro(),await async function(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_before_user_runtime_initialized");try{await async function(){try{Ii("TZ",Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")}catch(e){Ii("TZ","UTC")}for(const e in pi.environmentVariables){const t=pi.environmentVariables[e];if("string"!=typeof t)throw new Error(`Expected environment variable '${e}' to be a string but it was ${typeof t}: '${t}'`);Ii(e,t)}pi.runtimeOptions&&$i(pi.runtimeOptions),pi.aotProfilerOptions&&X(pi.aotProfilerOptions),pi.coverageProfilerOptions&&Z(pi.coverageProfilerOptions)}(),Y(),m.mono_wasm_load_runtime_done||Fi("unused",pi.debugLevel),m.mono_wasm_runtime_is_ready||N(),m.mono_wasm_symbols_are_ready||ue("dotnet.js.symbols"),setTimeout((()=>{Sr.init_fields()}))}catch(e){throw Ti("MONO_WASM: Error in mono_wasm_before_user_runtime_initialized",e),e}}()),pi.runtimeOptions&&$i(pi.runtimeOptions);try{e()}catch(e){throw Ti("MONO_WASM: user callback onRuntimeInitialized() failed",e),e}await Ri()}catch(e){throw Ti("MONO_WASM: onRuntimeInitializedAsync() failed",e),Mi(e,!0),e}Si.promise_control.resolve()}(i),e.postRun=[()=>async function(e){await Si.promise,m.diagnosticTracing&&console.debug("MONO_WASM: postRunAsync");try{e.map((e=>e()))}catch(e){throw Ti("MONO_WASM: user callback posRun() failed",e),Mi(e,!0),e}Oi.promise_control.resolve()}(s)],e.ready.then((async()=>{await Oi.promise,gi.promise_control.resolve(t)})).catch((e=>{gi.promise_control.reject(e)})),e.ready=gi.promise,e.onAbort||(e.onAbort=()=>de)}function Ni(e,r,n){if(t.configSrc||t.config||n||t.print("MONO_WASM: configSrc nor config was specified"),pi=t.config?m.config=t.config:m.config=t.config={},m.diagnosticTracing=!!pi.diagnosticTracing,n){return n(e,((e,t)=>{bi.promise_control.resolve(),r(e,t)}))}return async function(e,r){try{await Pi(t.configSrc),m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module");const n=function(e){var t;const r=null===(t=m.config.assets)||void 0===t?void 0:t.find((t=>t.behavior==e));if(!r)throw new Error(`Assert failed: Can't find asset for ${e}`);return r.resolvedUrl||(r.resolvedUrl=Kn(r,"")),r}("dotnetwasm");await Xn(n,!1),await vi.promise,t.addRunDependency("instantiate_wasm_module"),async function(e,t,r){if(!(e&&e.pendingDownloadInternal&&e.pendingDownloadInternal.response))throw new Error("Assert failed: Can't load dotnet.wasm");const n=await e.pendingDownloadInternal.response,o=n.headers&&n.headers.get?n.headers.get("Content-Type"):void 0;let s,a;if("function"==typeof WebAssembly.instantiateStreaming&&"application/wasm"===o){m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module streaming");const e=await WebAssembly.instantiateStreaming(n,t);s=e.instance,a=e.module}else{i&&"application/wasm"!==o&&console.warn('MONO_WASM: WebAssembly resource does not have the expected content type "application/wasm", so falling back to slower ArrayBuffer instantiation.');const e=await n.arrayBuffer();m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module buffered");const r=await WebAssembly.instantiate(e,t);s=r.instance,a=r.module}r(s,a)}(n,e,r),m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module done"),bi.promise_control.resolve()}catch(e){throw Ti("MONO_WASM: instantiate_wasm_module() failed",e),Mi(e,!0),e}t.removeRunDependency("instantiate_wasm_module")}(e,r),[]}function ji(e){t.addRunDependency("mono_pre_init");try{t.addRunDependency("mono_wasm_pre_init_essential"),m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_pre_init_essential"),function(){const e=!!c;for(const r of w){const n=g,[o,s,i,a,c]=r;if(o||e)n[s]=function(...e){const r=t.cwrap(s,i,a,c);return n[s]=r,r(...e)};else{const e=t.cwrap(s,i,a,c);n[s]=e}}}(),function(e){Object.assign(e,{mono_wasm_exit:g.mono_wasm_exit,mono_wasm_enable_on_demand_gc:g.mono_wasm_enable_on_demand_gc,mono_profiler_init_aot:g.mono_profiler_init_aot,mono_wasm_exec_regression:g.mono_wasm_exec_regression})}(r),function(e){Object.assign(e,{mono_wasm_add_assembly:g.mono_wasm_add_assembly})}(Rn),function(e){Object.assign(e,{mono_obj_array_new:g.mono_wasm_obj_array_new,mono_obj_array_set:g.mono_wasm_obj_array_set,mono_obj_array_new_ref:g.mono_wasm_obj_array_new_ref,mono_obj_array_set_ref:g.mono_wasm_obj_array_set_ref})}(Tn),t.removeRunDependency("mono_wasm_pre_init_essential"),m.diagnosticTracing&&console.debug("MONO_WASM: preInit"),vi.promise_control.resolve(),e.forEach((e=>e()))}catch(e){throw Ti("MONO_WASM: user preInint() failed",e),Mi(e,!0),e}(async()=>{try{await async function(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_pre_init_essential_async"),t.addRunDependency("mono_wasm_pre_init_essential_async"),await async function(){if(o){if(r.require=await m.requirePromise,globalThis.performance===ao){const{performance:e}=r.require("perf_hooks");globalThis.performance=e}if(globalThis.crypto||(globalThis.crypto={}),!globalThis.crypto.getRandomValues){let e;try{e=r.require("node:crypto")}catch(e){}e?e.webcrypto?globalThis.crypto=e.webcrypto:e.randomBytes&&(globalThis.crypto.getRandomValues=t=>{t&&t.set(e.randomBytes(t.length))}):globalThis.crypto.getRandomValues=()=>{throw new Error("Using node without crypto support. To enable current operation, either provide polyfill for 'globalThis.crypto.getRandomValues' or enable 'node:crypto' module.")}}}}(),await Pi(t.configSrc),t.removeRunDependency("mono_wasm_pre_init_essential_async")}(),wi||await async function(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_pre_init_full"),t.addRunDependency("mono_wasm_pre_init_full"),await Yn(),t.removeRunDependency("mono_wasm_pre_init_full")}()}catch(e){throw Mi(e,!0),e}Ei.promise_control.resolve(),t.removeRunDependency("mono_pre_init")})()}async function Di(e){t.addRunDependency("mono_pre_run_async"),await bi.promise,await Ei.promise,m.diagnosticTracing&&console.debug("MONO_WASM: preRunAsync");try{e.map((e=>e()))}catch(e){throw Ti("MONO_WASM: user callback preRun() failed",e),Mi(e,!0),e}Ai.promise_control.resolve(),t.removeRunDependency("mono_pre_run_async")}function Mi(e,t){m.diagnosticTracing&&console.trace("MONO_WASM: abort_startup"),gi.promise_control.reject(e),bi.promise_control.reject(e),vi.promise_control.reject(e),Ei.promise_control.reject(e),Ai.promise_control.reject(e),ki.promise_control.reject(e),Si.promise_control.reject(e),Oi.promise_control.reject(e),t&&me(1,e)}async function Ri(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_after_user_runtime_initialized");try{if(!t.disableDotnet6Compatibility&&t.exports){const e=globalThis;for(let r=0;r{const n=e.stackSave();try{const s=Lt(4),i=Ht(s,1),a=Ht(s,2),c=Ht(s,3);return Hr(a,t),r&&0==r.length&&(r=void 0),nn(c,r,yr.String),xo(o,s),En(i,0,dn)||Promise.resolve(0)}finally{e.stackRestore(n)}},m.javaScriptExports.release_js_owned_object_by_gc_handle=t=>{if(!t)throw new Error("Assert failed: Must be valid gc_handle");const r=e.stackSave();try{const n=Lt(3),o=Ht(n,2);er(o,yr.Object),ur(o,t),xo(s,n)}finally{e.stackRestore(r)}},m.javaScriptExports.create_task_callback=()=>{const t=e.stackSave();try{const r=Lt(2);return xo(i,r),cr(Ht(r,1))}finally{e.stackRestore(t)}},m.javaScriptExports.complete_task=(t,r,n,o)=>{const s=e.stackSave();try{const i=Lt(5),c=Ht(i,2);er(c,yr.Object),ur(c,t);const u=Ht(i,3);if(r)Qr(u,r);else{er(u,yr.None);const e=Ht(i,4);if(!o)throw new Error("Assert failed: res_converter missing");o(e,n)}xo(a,i)}finally{e.stackRestore(s)}},m.javaScriptExports.call_delegate=(t,r,n,o,s,i,a,c)=>{const l=e.stackSave();try{const _=Lt(6),f=Ht(_,2);if(er(f,yr.Object),ur(f,t),i&&i(Ht(_,3),r),a&&a(Ht(_,4),n),c&&c(Ht(_,5),o),xo(u,_),s)return s(Ht(_,1))}finally{e.stackRestore(l)}},m.javaScriptExports.get_managed_stack_trace=t=>{const r=e.stackSave();try{const n=Lt(3),o=Ht(n,2);return er(o,yr.Exception),ur(o,t),xo(l,n),kn(Ht(n,1))}finally{e.stackRestore(r)}},n&&(m.javaScriptExports.install_synchronization_context=()=>{const t=e.stackSave();try{const r=Lt(2);xo(n,r)}finally{e.stackRestore(t)}},c||m.javaScriptExports.install_synchronization_context())})(),ks(),0==Ct.size&&(Ct.set(yr.Array,Nn),Ct.set(yr.Span,Dn),Ct.set(yr.ArraySegment,Mn),Ct.set(yr.Boolean,un),Ct.set(yr.Byte,ln),Ct.set(yr.Char,_n),Ct.set(yr.Int16,fn),Ct.set(yr.Int32,dn),Ct.set(yr.Int52,mn),Ct.set(yr.BigInt64,pn),Ct.set(yr.Single,hn),Ct.set(yr.IntPtr,gn),Ct.set(yr.Double,wn),Ct.set(yr.String,kn),Ct.set(yr.Exception,Sn),Ct.set(yr.JSException,Sn),Ct.set(yr.JSObject,On),Ct.set(yr.Object,xn),Ct.set(yr.DateTime,bn),Ct.set(yr.DateTimeOffset,bn),Ct.set(yr.Task,En),Ct.set(yr.Action,vn),Ct.set(yr.Function,vn),Ct.set(yr.None,yn),Ct.set(yr.Void,yn),Ct.set(yr.Discard,yn)),0==Ut.size&&(Ut.set(yr.Array,rn),Ut.set(yr.Span,on),Ut.set(yr.ArraySegment,sn),Ut.set(yr.Boolean,$r),Ut.set(yr.Byte,Fr),Ut.set(yr.Char,Pr),Ut.set(yr.Int16,Cr),Ut.set(yr.Int32,Ur),Ut.set(yr.Int52,Br),Ut.set(yr.BigInt64,zr),Ut.set(yr.Double,Wr),Ut.set(yr.Single,Lr),Ut.set(yr.IntPtr,Hr),Ut.set(yr.DateTime,Vr),Ut.set(yr.DateTimeOffset,qr),Ut.set(yr.String,Jr),Ut.set(yr.Exception,Qr),Ut.set(yr.JSException,Qr),Ut.set(yr.JSObject,en),Ut.set(yr.Object,tn),Ut.set(yr.Task,Kr),Ut.set(yr.Action,Xr),Ut.set(yr.Function,Xr),Ut.set(yr.None,Yr),Ut.set(yr.Discard,Yr),Ut.set(yr.Void,Yr)),m._i52_error_scratch_buffer=t._malloc(4)}catch(e){throw Ti("MONO_WASM: Error in bindings_init",e),e}}}()}catch(e){if(Ti("MONO_WASM: mono_wasm_load_runtime () failed",e),Mi(e,!1),s||o){(0,g.mono_wasm_exit)(1)}throw e}}}async function Pi(e){if(hi)await yi.promise;else{if(hi=!0,!e)return r(),void yi.promise_control.resolve();m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_load_config");try{const n=m.locateFile(e),o=await m.fetch_like(n),s=await o.json()||{};if(s.environmentVariables&&"object"!=typeof s.environmentVariables)throw new Error("Expected config.environmentVariables to be unset or a dictionary-style object");if(s.assets=[...s.assets||[],...pi.assets||[]],s.environmentVariables={...s.environmentVariables||{},...pi.environmentVariables||{}},pi=m.config=t.config=Object.assign(t.config,s),r(),t.onConfigLoaded)try{await t.onConfigLoaded(m.config),r()}catch(e){throw Ti("MONO_WASM: onConfigLoaded() failed",e),e}yi.promise_control.resolve()}catch(r){const n=`Failed to load config file ${e} ${r}`;throw Mi(n,!0),pi=m.config=t.config={message:n,error:r,isError:!0},r}}function r(){pi.environmentVariables=pi.environmentVariables||{},pi.assets=pi.assets||[],pi.runtimeOptions=pi.runtimeOptions||[],pi.globalizationMode=pi.globalizationMode||"auto",pi.debugLevel,pi.diagnosticTracing,m.diagnosticTracing=!!m.config.diagnosticTracing}}function Ci(e,r,n,o,s){if(!0!==m.mono_wasm_runtime_is_ready)return;const i=0!==e?t.UTF8ToString(e).concat(".dll"):"",a=y(new Uint8Array(t.HEAPU8.buffer,r,n));let c;if(o){c=y(new Uint8Array(t.HEAPU8.buffer,o,s))}C({eventName:"AssemblyLoaded",assembly_name:i,assembly_b64:a,pdb_b64:c})}async function Ui(e){pi=t.config=m.config=Object.assign(m.config||{},e||{}),await Yn(),wi||await ro()}var Bi,zi;(function(e){e[e.Sending=0]="Sending",e[e.Closed=1]="Closed",e[e.Error=2]="Error"})(Bi||(Bi={})),function(e){e[e.Idle=0]="Idle",e[e.PartialCommand=1]="PartialCommand",e[e.Error=2]="Error"}(zi||(zi={}));const Wi=new class{constructor(){this.moduleConfig={disableDotnet6Compatibility:!0,configSrc:"./mono-config.json",config:m.config}}withModuleConfig(e){try{return Object.assign(this.moduleConfig,e),this}catch(e){throw me(1,e),e}}withConsoleForwarding(){try{const e={forwardConsoleLogsToWS:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withAsyncFlushOnExit(){try{const e={asyncFlushOnExit:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withExitCodeLogging(){try{const e={logExitCode:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withElementOnExit(){try{const e={appendElementOnExit:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withWaitingForDebugger(e){try{const t={waitForDebugger:e};return Object.assign(this.moduleConfig.config,t),this}catch(e){throw me(1,e),e}}withConfig(e){try{const t={...e};return t.assets=[...this.moduleConfig.config.assets||[],...t.assets||[]],t.environmentVariables={...this.moduleConfig.config.environmentVariables||{},...t.environmentVariables||{}},Object.assign(this.moduleConfig.config,t),this}catch(e){throw me(1,e),e}}withConfigSrc(e){try{if(!e||"string"!=typeof e)throw new Error("Assert failed: must be file path or URL");return Object.assign(this.moduleConfig,{configSrc:e}),this}catch(e){throw me(1,e),e}}withVirtualWorkingDirectory(e){try{if(!e||"string"!=typeof e)throw new Error("Assert failed: must be directory path");return this.virtualWorkingDirectory=e,this}catch(e){throw me(1,e),e}}withEnvironmentVariable(e,t){try{return this.moduleConfig.config.environmentVariables[e]=t,this}catch(e){throw me(1,e),e}}withEnvironmentVariables(e){try{if(!e||"object"!=typeof e)throw new Error("Assert failed: must be dictionary object");return Object.assign(this.moduleConfig.config.environmentVariables,e),this}catch(e){throw me(1,e),e}}withDiagnosticTracing(e){try{if("boolean"!=typeof e)throw new Error("Assert failed: must be boolean");return this.moduleConfig.config.diagnosticTracing=e,this}catch(e){throw me(1,e),e}}withDebugging(e){try{if(!e||"number"!=typeof e)throw new Error("Assert failed: must be number");return this.moduleConfig.config.debugLevel=e,this}catch(e){throw me(1,e),e}}withApplicationArguments(...e){try{if(!e||!Array.isArray(e))throw new Error("Assert failed: must be array of strings");return this.applicationArguments=e,this}catch(e){throw me(1,e),e}}withRuntimeOptions(e){try{if(!e||!Array.isArray(e))throw new Error("Assert failed: must be array of strings");return Object.assign(this.moduleConfig,{runtimeOptions:e}),this}catch(e){throw me(1,e),e}}withMainAssembly(e){try{return this.moduleConfig.config.mainAssemblyName=e,this}catch(e){throw me(1,e),e}}withApplicationArgumentsFromQuery(){try{if(void 0!==globalThis.URLSearchParams){const e=new URLSearchParams(window.location.search).getAll("arg");return this.withApplicationArguments(...e)}throw new Error("URLSearchParams is supported")}catch(e){throw me(1,e),e}}async create(){try{if(!this.instance){if(i&&!c&&this.moduleConfig.config.forwardConsoleLogsToWS&&void 0!==globalThis.WebSocket&&function(e,t,r){const n={log:t.log,error:t.error},o=t;function s(t,r,o){return function(...s){try{let n=s[0];if(void 0===n)n="undefined";else if(null===n)n="null";else if("function"==typeof n)n=n.toString();else if("string"!=typeof n)try{n=JSON.stringify(n)}catch(e){n=n.toString()}"string"==typeof n&&"main"!==e&&(n=`[${e}] ${n}`),r(o?JSON.stringify({method:t,payload:n,arguments:s}):[t+n,...s.slice(1)])}catch(e){n.error(`proxyConsole failed: ${e}`)}}}const i=["debug","trace","warn","info","error"];for(const e of i)"function"!=typeof o[e]&&(o[e]=s(`console.${e}: `,t.log,!1));const a=`${r}/console`.replace("https://","wss://").replace("http://","ws://");ce=new WebSocket(a),ce.addEventListener("open",(()=>{n.log(`browser: [${e}] Console websocket connected.`)})),ce.addEventListener("error",(t=>{n.error(`[${e}] websocket error: ${t}`,t)})),ce.addEventListener("close",(t=>{n.error(`[${e}] websocket closed: ${t}`,t)}));const c=e=>{ce.readyState===WebSocket.OPEN?ce.send(e):n.log(e)};for(const e of["log",...i])o[e]=s(`console.${e}`,c,!0)}("main",globalThis.console,globalThis.location.origin),o){const e=await import("process");if(e.versions.node.split(".")[0]<14)throw new Error(`NodeJS at '${e.execPath}' has too low version '${e.versions.node}'`)}if(!this.moduleConfig)throw new Error("Assert failed: Null moduleConfig");if(!this.moduleConfig.config)throw new Error("Assert failed: Null moduleConfig.config");this.instance=await _(this.moduleConfig)}if(this.virtualWorkingDirectory){const e=this.instance.Module.FS,t=e.stat(this.virtualWorkingDirectory);if(!t||!e.isDir(t.mode))throw new Error(`Assert failed: Could not find working directory ${this.virtualWorkingDirectory}`);e.chdir(this.virtualWorkingDirectory)}return this.instance}catch(e){throw me(1,e),e}}async run(){try{if(!this.moduleConfig.config)throw new Error("Assert failed: Null moduleConfig.config");if(this.instance||await this.create(),!this.moduleConfig.config.mainAssemblyName)throw new Error("Assert failed: Null moduleConfig.config.mainAssemblyName");if(!this.applicationArguments)if(o){const e=await import("process");this.applicationArguments=e.argv.slice(2)}else this.applicationArguments=[];return this.instance.runMainAndExit(this.moduleConfig.config.mainAssemblyName,this.applicationArguments)}catch(e){throw me(1,e),e}}};const Li=function(t,r,n,o){const s=r.module,i=globalThis;f(t,r),function(e){Rn=e.mono,Tn=e.binding}(r),io(n),Object.assign(r.mono,{mono_wasm_setenv:Ii,mono_wasm_load_bytes_into_heap:kt,mono_wasm_load_icu_data:J,mono_wasm_runtime_ready:N,mono_wasm_load_data_archive:to,mono_wasm_load_config:Pi,mono_load_runtime_and_bcl_args:Ui,mono_wasm_new_root_buffer:Mt,mono_wasm_new_root:Tt,mono_wasm_new_external_root:Rt,mono_wasm_release_roots:It,mono_run_main:_e,mono_run_main_and_exit:le,mono_wasm_add_assembly:null,mono_wasm_load_runtime:Fi,config:m.config,loaded_files:[],setB32:Ye,setI8:et,setI16:tt,setI32:nt,setI52:st,setU52:it,setI64Big:at,setU8:Xe,setU16:Ze,setU32:Qe,setF32:ct,setF64:ut,getB32:lt,getI8:mt,getI16:pt,getI32:ht,getI52:wt,getU52:gt,getI64Big:yt,getU8:_t,getU16:ft,getU32:dt,getF32:bt,getF64:vt}),Object.assign(r.binding,{bind_static_method:ts,call_assembly_entry_point:ns,mono_obj_array_new:null,mono_obj_array_set:null,js_string_to_mono_string:Tr,js_typed_array_to_array:Bo,mono_array_to_js_array:Go,js_to_mono_obj:Fo,conv_string:xr,unbox_mono_obj:Ho,mono_obj_array_new_ref:null,mono_obj_array_set_ref:null,js_string_to_mono_string_root:Mr,js_typed_array_to_array_root:Uo,js_to_mono_obj_root:Po,conv_string_root:Nr,unbox_mono_obj_root:Jo,mono_array_root_to_js_array:Xo}),Object.assign(r.internal,di()),Object.assign(r.internal,di());const a={runMain:_e,runMainAndExit:le,setEnvironmentVariable:Ii,getAssemblyExports:jo,setModuleImports:mo,getConfig:()=>m.config,setHeapB32:Ye,setHeapU8:Xe,setHeapU16:Ze,setHeapU32:Qe,setHeapI8:et,setHeapI16:tt,setHeapI32:nt,setHeapI52:st,setHeapU52:it,setHeapI64Big:at,setHeapF32:ct,setHeapF64:ut,getHeapB32:lt,getHeapU8:_t,getHeapU16:ft,getHeapU32:dt,getHeapI8:mt,getHeapI16:pt,getHeapI32:ht,getHeapI52:wt,getHeapU52:gt,getHeapI64Big:yt,getHeapF32:bt,getHeapF64:vt};if(e.__linker_exports={mono_set_timeout:Hs,mono_wasm_asm_loaded:Ci,mono_wasm_fire_debugger_agent_message:j,mono_wasm_debugger_log:V,mono_wasm_add_dbg_command_received:D,schedule_background_exec:Ls,mono_wasm_invoke_js_blazor:ls,mono_wasm_trace_logger:ae,mono_wasm_set_entrypoint_breakpoint:B,mono_wasm_event_pipe_early_startup_callback:mi,mono_wasm_invoke_js_with_args_ref:os,mono_wasm_get_object_property_ref:ss,mono_wasm_set_object_property_ref:is,mono_wasm_get_by_index_ref:as,mono_wasm_set_by_index_ref:cs,mono_wasm_get_global_object_ref:us,mono_wasm_create_cs_owned_object_ref:Zo,mono_wasm_release_cs_owned_object:Ne,mono_wasm_typed_array_to_array_ref:Wo,mono_wasm_typed_array_from_ref:Ro,mono_wasm_bind_js_function:_o,mono_wasm_invoke_bound_function:fo,mono_wasm_bind_cs_function:Oo,mono_wasm_marshal_promise:An,mono_wasm_load_icu_data:J,mono_wasm_get_icudt_name:G},Object.assign(u,{MONO:r.mono,BINDING:r.binding,INTERNAL:r.internal,IMPORTS:r.marshaled_imports,Module:s,runtimeBuildInfo:{productVersion:"7.0.9",buildConfiguration:"Release"},...a}),Object.assign(o,a),r.module.__undefinedConfig&&(s.disableDotnet6Compatibility=!0,s.configSrc="./mono-config.json"),s.print||(s.print=console.log.bind(console)),s.printErr||(s.printErr=console.error.bind(console)),void 0===s.disableDotnet6Compatibility&&(s.disableDotnet6Compatibility=!0),t.isGlobal||!s.disableDotnet6Compatibility){Object.assign(s,u),s.mono_bind_static_method=(e,t)=>(console.warn("MONO_WASM: Module.mono_bind_static_method is obsolete, please use [JSExportAttribute] interop instead"),ts(e,t));const e=(e,t)=>{if(void 0!==i[e])return;let r;Object.defineProperty(globalThis,e,{get:()=>{if(h(r)){const n=(new Error).stack,o=n?n.substr(n.indexOf("\n",8)+1):"";console.warn(`MONO_WASM: global ${e} is obsolete, please use Module.${e} instead ${o}`),r=t()}return r}})};i.MONO=r.mono,i.BINDING=r.binding,i.INTERNAL=r.internal,t.isGlobal||(i.Module=s),e("cwrap",(()=>s.cwrap)),e("addRunDependency",(()=>s.addRunDependency)),e("removeRunDependency",(()=>s.removeRunDependency))}let c;return i.getDotnetRuntime?c=i.getDotnetRuntime.__list:(i.getDotnetRuntime=e=>i.getDotnetRuntime.__list.getRuntime(e),i.getDotnetRuntime.__list=c=new Vi),c.registerRuntime(u),xi(s,u),u},Hi=function(e,t){d(t),Object.assign(l,{dotnet:Wi,exit:me}),function(e){_=e}(e)};e.__linker_exports=null;class Vi{constructor(){this.list={}}registerRuntime(e){return e.runtimeId=Object.keys(this.list).length,this.list[e.runtimeId]=we(e),e.runtimeId}getRuntime(e){const t=this.list[e];return t?t.deref():void 0}}return e.__initializeImportsAndExports=Li,e.__setEmscriptenEntrypoint=Hi,e.moduleExports=l,Object.defineProperty(e,"__esModule",{value:!0}),e}({}),createDotnetRuntime=(()=>{var e=import.meta.url;return function(t){var r,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(e,t){r=e,n=t}));var s=s||void 0,i=i||"",a={MONO,BINDING,INTERNAL,IMPORTS};if("function"==typeof t){a.Module=o={ready:o.ready};const e=t(a);if(e.ready)throw new Error("MONO_WASM: Module.ready couldn't be redefined.");Object.assign(o,e),(t=o).locateFile||(t.locateFile=t.__locateFile=e=>E+e)}else{if("object"!=typeof t)throw new Error("MONO_WASM: Can't use moduleFactory callback of createDotnetRuntime function.");a.Module=o={ready:o.ready,__undefinedConfig:1===Object.keys(t).length},Object.assign(o,t),(t=o).locateFile||(t.locateFile=t.__locateFile=e=>E+e)}var c,u,l,_,f,d,m=Object.assign({},o),p=[],h="./this.program",w=(e,t)=>{throw t},g="object"==typeof window,y="function"==typeof importScripts,b="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=!g&&!b&&!y,E="";function A(e){return o.locateFile?o.locateFile(e,E):E+e}function k(e){if(e instanceof vo)return;O("exiting due to exception: "+e)}b?(E=y?s("path").dirname(E)+"/":i+"/",d=()=>{f||(_=s("fs"),f=s("path"))},c=function(e,t){return d(),e=f.normalize(e),_.readFileSync(e,t?void 0:"utf8")},l=e=>{var t=c(e,!0);return t.buffer||(t=new Uint8Array(t)),t},u=(e,t,r)=>{d(),e=f.normalize(e),_.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(h=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof vo))throw e})),process.on("unhandledRejection",(function(e){throw e})),w=(e,t)=>{if(ae())throw process.exitCode=e,t;k(t),process.exit(e)},o.inspect=function(){return"[Emscripten Module object]"}):v?("undefined"!=typeof read&&(c=function(e){return read(e)}),l=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),I("object"==typeof t),t)},u=function(e,t,r){setTimeout((()=>t(l(e))),0)},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(w=(e,t)=>{k(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(g||y)&&(y?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),e&&(E=e),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(l=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),u=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var S=o.print||console.log.bind(console),O=o.printErr||console.warn.bind(console);Object.assign(o,m),m=null,o.arguments&&(p=o.arguments),o.thisProgram&&(h=o.thisProgram),o.quit&&(w=o.quit);var x,N=0,j=e=>{N=e},D=()=>N;o.wasmBinary&&(x=o.wasmBinary);var M,R=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&ye("no native wasm support detected");var T=!1;function I(e,t){e||ye(t)}function $(e){return o["_"+e]}function F(e,t,r,n,o){var s={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);Z(e,t=Nn(r),r)}return t},array:function(e){var t=Nn(e.length);return ee(e,t),t}};var i=$(e),a=[],c=0;if(n)for(var u=0;u=n);)++o;if(o-t>16&&e.buffer&&J)return J.decode(e.subarray(t,o));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&i)<<6|a)}else s+=String.fromCharCode(i)}return s}function Y(e,t){return e?G(B,e,t):""}function X(e,t,r,n){if(!(n>0))return 0;for(var o=r,s=r+n-1,i=0;i=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-o}function Z(e,t,r){return X(e,B,t,r)}function K(e){for(var t=0,r=0;r=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}function Q(e){var t=K(e)+1,r=yn(t);return r&&X(e,U,r,t),r}function ee(e,t){U.set(e,t)}function te(e,t,r){for(var n=0;n>0]=e.charCodeAt(n);r||(U[t>>0]=0)}function re(e){C=e,o.HEAP8=U=new Int8Array(e),o.HEAP16=z=new Int16Array(e),o.HEAP32=L=new Int32Array(e),o.HEAPU8=B=new Uint8Array(e),o.HEAPU16=W=new Uint16Array(e),o.HEAPU32=H=new Uint32Array(e),o.HEAPF32=V=new Float32Array(e),o.HEAPF64=q=new Float64Array(e)}o.INITIAL_MEMORY;var ne,oe=[],se=[],ie=[];function ae(){return R}function ce(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)_e(o.preRun.shift());De(oe)}function ue(){!0,o.noFSInit||ct.init.initialized||ct.init(),ct.ignorePermissions=!1,tt.init(),ft.root=ct.mount(ft,{},null),De(se)}function le(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)de(o.postRun.shift());De(ie)}function _e(e){oe.unshift(e)}function fe(e){se.unshift(e)}function de(e){ie.unshift(e)}var me=0,pe=null,he=null;function we(e){me++,o.monitorRunDependencies&&o.monitorRunDependencies(me)}function ge(e){if(me--,o.monitorRunDependencies&&o.monitorRunDependencies(me),0==me&&(null!==pe&&(clearInterval(pe),pe=null),he)){var t=he;he=null,t()}}function ye(e){o.onAbort&&o.onAbort(e),O(e="Aborted("+e+")"),T=!0,1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var be,ve,Ee,Ae="data:application/octet-stream;base64,";function ke(e){return e.startsWith(Ae)}function Se(e){return e.startsWith("file://")}function Oe(e){try{if(e==be&&x)return new Uint8Array(x);if(l)return l(e);throw"both async and sync fetching of the wasm failed"}catch(e){ye(e)}}function xe(){if(!x&&(g||y)){if("function"==typeof pn&&!Se(be))return pn(be,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+be+"'";return e.arrayBuffer()})).catch((function(){return Oe(be)}));if(u)return new Promise((function(e,t){u(be,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Oe(be)}))}function Ne(){var e={a:gn};function t(e,t){var r=e.exports;o.asm=r,re((M=o.asm.rb).buffer),ne=o.asm.wb,fe(o.asm.sb),ge()}function r(e){t(e.instance)}function s(t){return xe().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){O("failed to asynchronously prepare wasm: "+e),ye(e)}))}if(we(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return O("Module.instantiateWasm callback failed with error: "+e),!1}return(x||"function"!=typeof WebAssembly.instantiateStreaming||ke(be)||Se(be)||"function"!=typeof pn?s(r):pn(be,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return O("wasm streaming compile failed: "+e),O("falling back to ArrayBuffer instantiation"),s(r)}))}))).catch(n),{}}o.locateFile?ke(be="dotnet.wasm")||(be=A(be)):be=new URL("dotnet.wasm",import.meta.url).toString();var je={4876672:(e,t)=>{setTimeout((function(){console.error(Y(e))}),t)},4876739:e=>{setTimeout((function(){try{"undefined"==typeof window&&"undefined"==typeof document&&"undefined"!=typeof self&&void 0!==self.close?self.close():"undefined"!=typeof process&&void 0!==process.exit?process.exit(1):location.href="https://pspdfkit.com"}catch(e){location.href="https://pspdfkit.com"}}),e)}};function De(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?Te(r)():Te(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Me(e,t="i8"){switch(t.endsWith("*")&&(t="i32"),t){case"i1":case"i8":return U[e>>0];case"i16":return z[e>>1];case"i32":case"i64":return L[e>>2];case"float":return V[e>>2];case"double":return Number(q[e>>3]);default:ye("invalid type for getValue: "+t)}return null}var Re=[];function Te(e){var t=Re[e];return t||(e>=Re.length&&(Re.length=e+1),Re[e]=t=ne.get(e)),t}function Ie(e,t,r="i8"){switch(r.endsWith("*")&&(r="i32"),r){case"i1":case"i8":U[e>>0]=t;break;case"i16":z[e>>1]=t;break;case"i32":L[e>>2]=t;break;case"i64":Ee=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],L[e>>2]=Ee[0],L[e+4>>2]=Ee[1];break;case"float":V[e>>2]=t;break;case"double":q[e>>3]=t;break;default:ye("invalid type for setValue: "+r)}}function $e(e,t,r,n){ye("Assertion failed: "+Y(e)+", at: "+[t?Y(t):"unknown filename",r,n?Y(n):"unknown function"])}function Fe(e){return yn(e+24)+24}var Pe=[];function Ce(e){e.add_ref()}var Ue=0;function Be(e){var t=new We(e);return t.get_caught()||(t.set_caught(!0),Ue--),t.set_rethrown(!1),Pe.push(t),Ce(t),t.get_exception_ptr()}var ze=0;function We(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){H[this.ptr+4>>2]=e},this.get_type=function(){return H[this.ptr+4>>2]},this.set_destructor=function(e){H[this.ptr+8>>2]=e},this.get_destructor=function(){return H[this.ptr+8>>2]},this.set_refcount=function(e){L[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,U[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=U[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,U[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=U[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=L[this.ptr>>2];L[this.ptr>>2]=e+1},this.release_ref=function(){var e=L[this.ptr>>2];return L[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){H[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return H[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Dn(this.get_type()))return H[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Le(e){return bn(new We(e).ptr)}function He(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&Te(t)(e.excPtr),Le(e.excPtr)}}function Ve(){Sn(0),He(Pe.pop()),ze=0}function qe(e){throw ze||(ze=e),e}function Je(){var e=ze;if(!e)return j(0),0;var t=new We(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return j(0),e;for(var n=Array.prototype.slice.call(arguments),o=0;o"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=Ke.isAbs(e),r="/"===e.substr(-1);return(e=Ke.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Ke.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Ke.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return Ke.normalize(e.join("/"))},join2:(e,t)=>Ke.normalize(e+"/"+t)};function Qe(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(b)try{var t=s("crypto");return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){ye("randomDevice")}}var et={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:ct.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=Ke.isAbs(n)}return(t?"/":"")+(e=Ke.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=et.resolve(e).substr(1),t=et.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),s=Math.min(n.length,o.length),i=s,a=0;a0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=hn(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(S(G(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(S(G(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(O(G(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(O(G(e.output,0)),e.output=[])}}};function rt(e,t){B.fill(0,e,e+t)}function nt(e,t){return Math.ceil(e/t)*t}function ot(e){e=nt(e,65536);var t=kn(65536,e);return t?(rt(t,e),t):0}var st={ops_table:null,mount:function(e){return st.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(ct.isBlkdev(r)||ct.isFIFO(r))throw new ct.ErrnoError(63);st.ops_table||(st.ops_table={dir:{node:{getattr:st.node_ops.getattr,setattr:st.node_ops.setattr,lookup:st.node_ops.lookup,mknod:st.node_ops.mknod,rename:st.node_ops.rename,unlink:st.node_ops.unlink,rmdir:st.node_ops.rmdir,readdir:st.node_ops.readdir,symlink:st.node_ops.symlink},stream:{llseek:st.stream_ops.llseek}},file:{node:{getattr:st.node_ops.getattr,setattr:st.node_ops.setattr},stream:{llseek:st.stream_ops.llseek,read:st.stream_ops.read,write:st.stream_ops.write,allocate:st.stream_ops.allocate,mmap:st.stream_ops.mmap,msync:st.stream_ops.msync}},link:{node:{getattr:st.node_ops.getattr,setattr:st.node_ops.setattr,readlink:st.node_ops.readlink},stream:{}},chrdev:{node:{getattr:st.node_ops.getattr,setattr:st.node_ops.setattr},stream:ct.chrdev_stream_ops}});var o=ct.createNode(e,t,r,n);return ct.isDir(o.mode)?(o.node_ops=st.ops_table.dir.node,o.stream_ops=st.ops_table.dir.stream,o.contents={}):ct.isFile(o.mode)?(o.node_ops=st.ops_table.file.node,o.stream_ops=st.ops_table.file.stream,o.usedBytes=0,o.contents=null):ct.isLink(o.mode)?(o.node_ops=st.ops_table.link.node,o.stream_ops=st.ops_table.link.stream):ct.isChrdev(o.mode)&&(o.node_ops=st.ops_table.chrdev.node,o.stream_ops=st.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=ct.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,ct.isDir(e.mode)?t.size=4096:ct.isFile(e.mode)?t.size=e.usedBytes:ct.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&st.resizeFileStorage(e,t.size)},lookup:function(e,t){throw ct.genericErrors[44]},mknod:function(e,t,r,n){return st.createNode(e,t,r,n)},rename:function(e,t,r){if(ct.isDir(e.mode)){var n;try{n=ct.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new ct.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=ct.lookupNode(e,t);for(var n in r.contents)throw new ct.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=st.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!ct.isLink(e.mode))throw new ct.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var s=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&s.subarray)t.set(s.subarray(o,o+i),r);else for(var a=0;a0||r+t=e.node.size)return 0;var s=e.node.contents.slice(o,o+n),i=at.reader.readAsArrayBuffer(s);return t.set(new Uint8Array(i),r),s.size},write:function(e,t,r,n,o){throw new ct.ErrnoError(29)},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&ct.isFile(e.node.mode)&&(n+=e.node.size),n<0)throw new ct.ErrnoError(28);return n}}},ct={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=et.resolve(ct.cwd(),e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new ct.ErrnoError(32);for(var r=Ke.normalizeArray(e.split("/").filter((e=>!!e)),!1),n=ct.root,o="/",s=0;s40)throw new ct.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var t;;){if(ct.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n>>0)%ct.nameTable.length},hashAddNode:e=>{var t=ct.hashName(e.parent.id,e.name);e.name_next=ct.nameTable[t],ct.nameTable[t]=e},hashRemoveNode:e=>{var t=ct.hashName(e.parent.id,e.name);if(ct.nameTable[t]===e)ct.nameTable[t]=e.name_next;else for(var r=ct.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=ct.mayLookup(e);if(r)throw new ct.ErrnoError(r,e);for(var n=ct.hashName(e.id,t),o=ct.nameTable[n];o;o=o.name_next){var s=o.name;if(o.parent.id===e.id&&s===t)return o}return ct.lookup(e,t)},createNode:(e,t,r,n)=>{var o=new ct.FSNode(e,t,r,n);return ct.hashAddNode(o),o},destroyNode:e=>{ct.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=ct.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>ct.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=ct.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{ct.lookupNode(e,t);return 20}catch(e){}return ct.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=ct.lookupNode(e,t)}catch(e){return e.errno}var o=ct.nodePermissions(e,"wx");if(o)return o;if(r){if(!ct.isDir(n.mode))return 54;if(ct.isRoot(n)||ct.getPath(n)===ct.cwd())return 10}else if(ct.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?ct.isLink(e.mode)?32:ct.isDir(e.mode)&&("r"!==ct.flagsToPermissionString(t)||512&t)?31:ct.nodePermissions(e,ct.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=ct.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!ct.streams[r])return r;throw new ct.ErrnoError(33)},getStream:e=>ct.streams[e],createStream:(e,t,r)=>{ct.FSStream||(ct.FSStream=function(){this.shared={}},ct.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get function(){return this.shared.position},set:function(e){this.shared.position=e}}}),e=Object.assign(new ct.FSStream,e);var n=ct.nextfd(t,r);return e.fd=n,ct.streams[n]=e,e},closeStream:e=>{ct.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=ct.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new ct.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{ct.devices[e]={stream_ops:t}},getDevice:e=>ct.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),ct.syncFSRequests++,ct.syncFSRequests>1&&O("warning: "+ct.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=ct.getMounts(ct.root.mount),n=0;function o(e){return ct.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount:(e,t,r)=>{var n,o="/"===r,s=!r;if(o&&ct.root)throw new ct.ErrnoError(10);if(!o&&!s){var i=ct.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,ct.isMountpoint(n))throw new ct.ErrnoError(10);if(!ct.isDir(n.mode))throw new ct.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,o?ct.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount:e=>{var t=ct.lookupPath(e,{follow_mount:!1});if(!ct.isMountpoint(t.node))throw new ct.ErrnoError(28);var r=t.node,n=r.mounted,o=ct.getMounts(n);Object.keys(ct.nameTable).forEach((e=>{for(var t=ct.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&ct.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=ct.lookupPath(e,{parent:!0}).node,o=Ke.basename(e);if(!o||"."===o||".."===o)throw new ct.ErrnoError(28);var s=ct.mayCreate(n,o);if(s)throw new ct.ErrnoError(s);if(!n.node_ops.mknod)throw new ct.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,ct.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,ct.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",o=0;o(void 0===r&&(r=t,t=438),t|=8192,ct.mknod(e,t,r)),symlink:(e,t)=>{if(!et.resolve(e))throw new ct.ErrnoError(44);var r=ct.lookupPath(t,{parent:!0}).node;if(!r)throw new ct.ErrnoError(44);var n=Ke.basename(t),o=ct.mayCreate(r,n);if(o)throw new ct.ErrnoError(o);if(!r.node_ops.symlink)throw new ct.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=Ke.dirname(e),s=Ke.dirname(t),i=Ke.basename(e),a=Ke.basename(t);if(r=ct.lookupPath(e,{parent:!0}).node,n=ct.lookupPath(t,{parent:!0}).node,!r||!n)throw new ct.ErrnoError(44);if(r.mount!==n.mount)throw new ct.ErrnoError(75);var c,u=ct.lookupNode(r,i),l=et.relative(e,s);if("."!==l.charAt(0))throw new ct.ErrnoError(28);if("."!==(l=et.relative(t,o)).charAt(0))throw new ct.ErrnoError(55);try{c=ct.lookupNode(n,a)}catch(e){}if(u!==c){var _=ct.isDir(u.mode),f=ct.mayDelete(r,i,_);if(f)throw new ct.ErrnoError(f);if(f=c?ct.mayDelete(n,a,_):ct.mayCreate(n,a))throw new ct.ErrnoError(f);if(!r.node_ops.rename)throw new ct.ErrnoError(63);if(ct.isMountpoint(u)||c&&ct.isMountpoint(c))throw new ct.ErrnoError(10);if(n!==r&&(f=ct.nodePermissions(r,"w")))throw new ct.ErrnoError(f);ct.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{ct.hashAddNode(u)}}},rmdir:e=>{var t=ct.lookupPath(e,{parent:!0}).node,r=Ke.basename(e),n=ct.lookupNode(t,r),o=ct.mayDelete(t,r,!0);if(o)throw new ct.ErrnoError(o);if(!t.node_ops.rmdir)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);t.node_ops.rmdir(t,r),ct.destroyNode(n)},readdir:e=>{var t=ct.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new ct.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=ct.lookupPath(e,{parent:!0}).node;if(!t)throw new ct.ErrnoError(44);var r=Ke.basename(e),n=ct.lookupNode(t,r),o=ct.mayDelete(t,r,!1);if(o)throw new ct.ErrnoError(o);if(!t.node_ops.unlink)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);t.node_ops.unlink(t,r),ct.destroyNode(n)},readlink:e=>{var t=ct.lookupPath(e).node;if(!t)throw new ct.ErrnoError(44);if(!t.node_ops.readlink)throw new ct.ErrnoError(28);return et.resolve(ct.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=ct.lookupPath(e,{follow:!t}).node;if(!r)throw new ct.ErrnoError(44);if(!r.node_ops.getattr)throw new ct.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>ct.stat(e,!0),chmod:(e,t,r)=>{var n;"string"==typeof e?n=ct.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new ct.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{ct.chmod(e,t,!0)},fchmod:(e,t)=>{var r=ct.getStream(e);if(!r)throw new ct.ErrnoError(8);ct.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;"string"==typeof e?o=ct.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new ct.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{ct.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=ct.getStream(e);if(!n)throw new ct.ErrnoError(8);ct.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new ct.ErrnoError(28);var r;"string"==typeof e?r=ct.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new ct.ErrnoError(63);if(ct.isDir(r.mode))throw new ct.ErrnoError(31);if(!ct.isFile(r.mode))throw new ct.ErrnoError(28);var n=ct.nodePermissions(r,"w");if(n)throw new ct.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=ct.getStream(e);if(!r)throw new ct.ErrnoError(8);if(0==(2097155&r.flags))throw new ct.ErrnoError(28);ct.truncate(r.node,t)},utime:(e,t,r)=>{var n=ct.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r)=>{if(""===e)throw new ct.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?ct.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=Ke.normalize(e);try{n=ct.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new ct.ErrnoError(20)}else n=ct.mknod(e,r,0),s=!0;if(!n)throw new ct.ErrnoError(44);if(ct.isChrdev(n.mode)&&(t&=-513),65536&t&&!ct.isDir(n.mode))throw new ct.ErrnoError(54);if(!s){var i=ct.mayOpen(n,t);if(i)throw new ct.ErrnoError(i)}512&t&&!s&&ct.truncate(n,0),t&=-131713;var a=ct.createStream({node:n,path:ct.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!o.logReadFiles||1&t||(ct.readFiles||(ct.readFiles={}),e in ct.readFiles||(ct.readFiles[e]=1)),a},close:e=>{if(ct.isClosed(e))throw new ct.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ct.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(ct.isClosed(e))throw new ct.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ct.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new ct.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(e))throw new ct.ErrnoError(8);if(1==(2097155&e.flags))throw new ct.ErrnoError(8);if(ct.isDir(e.node.mode))throw new ct.ErrnoError(31);if(!e.stream_ops.read)throw new ct.ErrnoError(28);var s=void 0!==o;if(s){if(!e.seekable)throw new ct.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,t,r,n,o);return s||(e.position+=i),i},write:(e,t,r,n,o,s)=>{if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(e))throw new ct.ErrnoError(8);if(0==(2097155&e.flags))throw new ct.ErrnoError(8);if(ct.isDir(e.node.mode))throw new ct.ErrnoError(31);if(!e.stream_ops.write)throw new ct.ErrnoError(28);e.seekable&&1024&e.flags&&ct.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ct.ErrnoError(70)}else o=e.position;var a=e.stream_ops.write(e,t,r,n,o,s);return i||(e.position+=a),a},allocate:(e,t,r)=>{if(ct.isClosed(e))throw new ct.ErrnoError(8);if(t<0||r<=0)throw new ct.ErrnoError(28);if(0==(2097155&e.flags))throw new ct.ErrnoError(8);if(!ct.isFile(e.node.mode)&&!ct.isDir(e.node.mode))throw new ct.ErrnoError(43);if(!e.stream_ops.allocate)throw new ct.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new ct.ErrnoError(2);if(1==(2097155&e.flags))throw new ct.ErrnoError(2);if(!e.stream_ops.mmap)throw new ct.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:(e,t,r,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new ct.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=ct.open(e,t.flags),o=ct.stat(e).size,s=new Uint8Array(o);return ct.read(n,s,0,o,0),"utf8"===t.encoding?r=G(s,0):"binary"===t.encoding&&(r=s),ct.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=ct.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(K(t)+1),s=X(t,o,0,o.length);ct.write(n,o,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");ct.write(n,t,0,t.byteLength,void 0,r.canOwn)}ct.close(n)},cwd:()=>ct.currentPath,chdir:e=>{var t=ct.lookupPath(e,{follow:!0});if(null===t.node)throw new ct.ErrnoError(44);if(!ct.isDir(t.node.mode))throw new ct.ErrnoError(54);var r=ct.nodePermissions(t.node,"x");if(r)throw new ct.ErrnoError(r);ct.currentPath=t.path},createDefaultDirectories:()=>{ct.mkdir("/tmp"),ct.mkdir("/home"),ct.mkdir("/home/web_user")},createDefaultDevices:()=>{ct.mkdir("/dev"),ct.registerDevice(ct.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),ct.mkdev("/dev/null",ct.makedev(1,3)),tt.register(ct.makedev(5,0),tt.default_tty_ops),tt.register(ct.makedev(6,0),tt.default_tty1_ops),ct.mkdev("/dev/tty",ct.makedev(5,0)),ct.mkdev("/dev/tty1",ct.makedev(6,0));var e=Qe();ct.createDevice("/dev","random",e),ct.createDevice("/dev","urandom",e),ct.mkdir("/dev/shm"),ct.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ct.mkdir("/proc");var e=ct.mkdir("/proc/self");ct.mkdir("/proc/self/fd"),ct.mount({mount:()=>{var t=ct.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=ct.getStream(r);if(!n)throw new ct.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?ct.createDevice("/dev","stdin",o.stdin):ct.symlink("/dev/tty","/dev/stdin"),o.stdout?ct.createDevice("/dev","stdout",null,o.stdout):ct.symlink("/dev/tty","/dev/stdout"),o.stderr?ct.createDevice("/dev","stderr",null,o.stderr):ct.symlink("/dev/tty1","/dev/stderr");ct.open("/dev/stdin",0),ct.open("/dev/stdout",1),ct.open("/dev/stderr",1)},ensureErrnoError:()=>{ct.ErrnoError||(ct.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ct.ErrnoError.prototype=new Error,ct.ErrnoError.prototype.constructor=ct.ErrnoError,[44].forEach((e=>{ct.genericErrors[e]=new ct.ErrnoError(e),ct.genericErrors[e].stack=""})))},staticInit:()=>{ct.ensureErrnoError(),ct.nameTable=new Array(4096),ct.mount(st,{},"/"),ct.createDefaultDirectories(),ct.createDefaultDevices(),ct.createSpecialDirectories(),ct.filesystems={MEMFS:st,WORKERFS:at}},init:(e,t,r)=>{ct.init.initialized=!0,ct.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,ct.createStandardStreams()},quit:()=>{ct.init.initialized=!1;for(var e=0;e{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=ct.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=ct.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ct.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=Ke.basename(e),n=ct.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:ct.getPath(e);for(var o=t.split("/").reverse();o.length;){var s=o.pop();if(s){var i=Ke.join2(e,s);try{ct.mkdir(i)}catch(e){}e=i}}return i},createFile:(e,t,r,n,o)=>{var s=Ke.join2("string"==typeof e?e:ct.getPath(e),t),i=ct.getMode(n,o);return ct.create(s,i)},createDataFile:(e,t,r,n,o,s)=>{var i=t;e&&(e="string"==typeof e?e:ct.getPath(e),i=t?Ke.join2(e,t):e);var a=ct.getMode(n,o),c=ct.create(i,a);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,_=r.length;l<_;++l)u[l]=r.charCodeAt(l);r=u}ct.chmod(c,146|a);var f=ct.open(c,577);ct.write(f,r,0,r.length,0,s),ct.close(f),ct.chmod(c,a)}return c},createDevice:(e,t,r,n)=>{var o=Ke.join2("string"==typeof e?e:ct.getPath(e),t),s=ct.getMode(!!r,!!n);ct.createDevice.major||(ct.createDevice.major=64);var i=ct.makedev(ct.createDevice.major++,0);return ct.registerDevice(i,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,o,s)=>{for(var i=0,a=0;a{for(var i=0;i{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!c)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=hn(c(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ct.ErrnoError(29)}},createLazyFile:(e,t,r,n,o)=>{function s(){this.lengthKnown=!1,this.chunks=[]}if(s.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var a=this;a.setDataGetter((e=>{var t=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):hn(o.responseText||"",!0)})(t,o)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(i=n=1,n=this.getter(0).length,i=n,S("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new s;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:i}}else a={isDevice:!1,url:r};var c=ct.createFile(e,t,a,n,o);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];u[e]=function(){return ct.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{ct.forceLoadFile(c);var s=e.node.contents;if(o>=s.length)return 0;var i=Math.min(s.length-o,n);if(s.slice)for(var a=0;a{var l=t?et.resolve(Ke.join2(e,t)):e;function _(r){function _(r){u&&u(),a||ct.createDataFile(e,t,r,n,o,c),s&&s(),ge()}Browser.handledByPreloadPlugin(r,l,_,(()=>{i&&i(),ge()}))||_(r)}we(),"string"==typeof r?it(r,(e=>_(e)),i):_(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=ct.indexedDB();try{var o=n.open(ct.DB_NAME(),ct.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{S("creating db"),o.result.createObjectStore(ct.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ct.DB_STORE_NAME],"readwrite"),s=n.objectStore(ct.DB_STORE_NAME),i=0,a=0,c=e.length;function u(){0==a?t():r()}e.forEach((e=>{var t=s.put(ct.analyzePath(e).object.contents,e);t.onsuccess=()=>{++i+a==c&&u()},t.onerror=()=>{a++,i+a==c&&u()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=ct.indexedDB();try{var o=n.open(ct.DB_NAME(),ct.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var s=n.transaction([ct.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var i=s.objectStore(ct.DB_STORE_NAME),a=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=i.get(e);t.onsuccess=()=>{ct.analyzePath(e).exists&&ct.unlink(e),ct.createDataFile(Ke.dirname(e),Ke.basename(e),t.result,!0,!0,!0),++a+c==u&&l()},t.onerror=()=>{c++,a+c==u&&l()}})),s.onerror=r},o.onerror=r}},ut={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(Ke.isAbs(t))return t;var n;if(-100===e)n=ct.cwd();else{var o=ct.getStream(e);if(!o)throw new ct.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new ct.ErrnoError(44);return n}return Ke.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&Ke.normalize(t)!==Ke.normalize(ct.getPath(e.node)))return-54;throw e}return L[r>>2]=n.dev,L[r+4>>2]=0,L[r+8>>2]=n.ino,L[r+12>>2]=n.mode,L[r+16>>2]=n.nlink,L[r+20>>2]=n.uid,L[r+24>>2]=n.gid,L[r+28>>2]=n.rdev,L[r+32>>2]=0,Ee=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],L[r+40>>2]=Ee[0],L[r+44>>2]=Ee[1],L[r+48>>2]=4096,L[r+52>>2]=n.blocks,L[r+56>>2]=n.atime.getTime()/1e3|0,L[r+60>>2]=0,L[r+64>>2]=n.mtime.getTime()/1e3|0,L[r+68>>2]=0,L[r+72>>2]=n.ctime.getTime()/1e3|0,L[r+76>>2]=0,Ee=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],L[r+80>>2]=Ee[0],L[r+84>>2]=Ee[1],0},doMsync:function(e,t,r,n,o){var s=B.slice(e,e+r);ct.msync(t,s,o,r,n)},varargs:void 0,get:function(){return ut.varargs+=4,L[ut.varargs-4>>2]},getStr:function(e){return Y(e)},getStreamFromFD:function(e){var t=ct.getStream(e);if(!t)throw new ct.ErrnoError(8);return t}};function lt(e){try{return e=ut.getStr(e),ct.chdir(e),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function _t(e,t){try{return e=ut.getStr(e),ct.chmod(e,t),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}var ft={mount:function(e){return o.websocket=o.websocket&&"object"==typeof o.websocket?o.websocket:{},o.websocket._callbacks={},o.websocket.on=function(e,t){return"function"==typeof t&&(this._callbacks[e]=t),this},o.websocket.emit=function(e,t){"function"==typeof this._callbacks[e]&&this._callbacks[e].call(this,t)},ct.createNode(null,"/",16895,0)},createSocket:function(e,t,r){if(1==(t&=-526337)&&r&&6!=r)throw new ct.ErrnoError(66);var n={family:e,type:t,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:ft.websocket_sock_ops},o=ft.nextname(),s=ct.createNode(ft.root,o,49152,0);s.sock=n;var i=ct.createStream({path:o,node:s,flags:2,seekable:!1,stream_ops:ft.stream_ops});return n.stream=i,n},getSocket:function(e){var t=ct.getStream(e);return t&&ct.isSocket(t.node.mode)?t.node.sock:null},stream_ops:{poll:function(e){var t=e.node.sock;return t.sock_ops.poll(t)},ioctl:function(e,t,r){var n=e.node.sock;return n.sock_ops.ioctl(n,t,r)},read:function(e,t,r,n,o){var s=e.node.sock,i=s.sock_ops.recvmsg(s,n);return i?(t.set(i.buffer,r),i.buffer.length):0},write:function(e,t,r,n,o){var s=e.node.sock;return s.sock_ops.sendmsg(s,t,r,n)},close:function(e){var t=e.node.sock;t.sock_ops.close(t)}},nextname:function(){return ft.nextname.current||(ft.nextname.current=0),"socket["+ft.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,t,r){var n;if("object"==typeof t&&(n=t,t=null,r=null),n)if(n._socket)t=n._socket.remoteAddress,r=n._socket.remotePort;else{var i=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!i)throw new Error("WebSocket URL must be in the format ws(s)://address:port");t=i[1],r=parseInt(i[2],10)}else try{var a=o.websocket&&"object"==typeof o.websocket,c="ws:#".replace("#","//");if(a&&"string"==typeof o.websocket.url&&(c=o.websocket.url),"ws://"===c||"wss://"===c){var u=t.split("/");c=c+u[0]+":"+r+"/"+u.slice(1).join("/")}var l="binary";a&&"string"==typeof o.websocket.subprotocol&&(l=o.websocket.subprotocol);var _=void 0;"null"!==l&&(_=l=l.replace(/^ +| +$/g,"").split(/ *, */)),a&&null===o.websocket.subprotocol&&(l="null",_=void 0),(n=new(b?s("ws"):WebSocket)(c,_)).binaryType="arraybuffer"}catch(e){throw new ct.ErrnoError(23)}var f={addr:t,port:r,socket:n,dgram_send_queue:[]};return ft.websocket_sock_ops.addPeer(e,f),ft.websocket_sock_ops.handlePeerEvents(e,f),2===e.type&&void 0!==e.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),f},getPeer:function(e,t,r){return e.peers[t+":"+r]},addPeer:function(e,t){e.peers[t.addr+":"+t.port]=t},removePeer:function(e,t){delete e.peers[t.addr+":"+t.port]},handlePeerEvents:function(e,t){var r=!0,n=function(){o.websocket.emit("open",e.stream.fd);try{for(var r=t.dgram_send_queue.shift();r;)t.socket.send(r),r=t.dgram_send_queue.shift()}catch(e){t.socket.close()}};function s(n){if("string"==typeof n){n=(new TextEncoder).encode(n)}else{if(I(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var s=r;if(r=!1,s&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var i=n[8]<<8|n[9];return ft.websocket_sock_ops.removePeer(e,t),t.port=i,void ft.websocket_sock_ops.addPeer(e,t)}e.recv_queue.push({addr:t.addr,port:t.port,data:n}),o.websocket.emit("message",e.stream.fd)}b?(t.socket.on("open",n),t.socket.on("message",(function(e,t){t&&s(new Uint8Array(e).buffer)})),t.socket.on("close",(function(){o.websocket.emit("close",e.stream.fd)})),t.socket.on("error",(function(t){e.error=14,o.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])}))):(t.socket.onopen=n,t.socket.onclose=function(){o.websocket.emit("close",e.stream.fd)},t.socket.onmessage=function(e){s(e.data)},t.socket.onerror=function(t){e.error=14,o.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var t=0,r=1===e.type?ft.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(t|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=16),t},ioctl:function(e,t,r){if(21531===t){var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),L[r>>2]=n,0}return 28},close:function(e){if(e.server){try{e.server.close()}catch(e){}e.server=null}for(var t=Object.keys(e.peers),r=0;r>2]=e,e}function pt(e){return(255&e)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255)}function ht(e){var t="",r=0,n=0,o=0,s=0,i=0,a=0,c=[65535&e[0],e[0]>>16,65535&e[1],e[1]>>16,65535&e[2],e[2]>>16,65535&e[3],e[3]>>16],u=!0,l="";for(a=0;a<5;a++)if(0!==c[a]){u=!1;break}if(u){if(l=pt(c[6]|c[7]<<16),-1===c[5])return t="::ffff:",t+=l;if(0===c[5])return t="::","0.0.0.0"===l&&(l=""),"0.0.0.1"===l&&(l="1"),t+=l}for(r=0;r<8;r++)0===c[r]&&(r-o>1&&(i=0),o=r,i++),i>n&&(s=r-(n=i)+1);for(r=0;r<8;r++)n>1&&0===c[r]&&r>=s&&r>1],o=En(W[e+2>>1]);switch(n){case 2:if(16!==t)return{errno:28};r=pt(r=L[e+4>>2]);break;case 10:if(28!==t)return{errno:28};r=ht(r=[L[e+8>>2],L[e+12>>2],L[e+16>>2],L[e+20>>2]]);break;default:return{errno:5}}return{family:n,addr:r,port:o}}function gt(e){for(var t=e.split("."),r=0;r<4;r++){var n=Number(t[r]);if(isNaN(n))return null;t[r]=n}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0}function yt(e){return parseInt(e)}function bt(e){var t,r,n,o,s=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(e))return null;if("::"===e)return[0,0,0,0,0,0,0,0];for((e=e.startsWith("::")?e.replace("::","Z:"):e.replace("::",":Z:")).indexOf(".")>0?((t=(e=e.replace(new RegExp("[.]","g"),":")).split(":"))[t.length-4]=yt(t[t.length-4])+256*yt(t[t.length-3]),t[t.length-3]=yt(t[t.length-2])+256*yt(t[t.length-1]),t=t.slice(0,t.length-2)):t=e.split(":"),n=0,o=0,r=0;r>1]=2,0;case 16:case 8:default:return-28;case 9:return mt(28),-1}}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Nt(e,t){try{var r=ut.getStreamFromFD(e);return ut.doStat(ct.stat,r.path,t)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function jt(e,t,r){try{return e=ut.getStr(e),L[r+4>>2]=4096,L[r+40>>2]=4096,L[r+8>>2]=1e6,L[r+12>>2]=5e5,L[r+16>>2]=5e5,L[r+20>>2]=ct.nextInode,L[r+24>>2]=1e6,L[r+28>>2]=42,L[r+44>>2]=2,L[r+36>>2]=255,0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Dt(e,t,r){try{ut.getStreamFromFD(e);return jt(0,0,r)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Mt(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function Rt(e,t,r){try{var n=Mt(t,r);return isNaN(n)?-61:(ct.ftruncate(e,n),0)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Tt(e,t){try{if(0===t)return-28;var r=ct.cwd(),n=K(r)+1;return t>>0,(ve=c,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],L[t+s>>2]=Ee[0],L[t+s+4>>2]=Ee[1],Ee=[(a+1)*o>>>0,(ve=(a+1)*o,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],L[t+s+8>>2]=Ee[0],L[t+s+12>>2]=Ee[1],z[t+s+16>>1]=280,U[t+s+18>>0]=u,Z(l,t+s+19,256),s+=o,a+=1}return ct.llseek(n,a*o,0),s}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function $t(e,t,r){ut.varargs=r;try{var n=ut.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=ut.get();return L[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=ut.get();return ct.ioctl(n,t,o);default:ye("bad ioctl syscall "+t)}}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Ft(e,t){try{return e=ut.getStr(e),ut.doStat(ct.lstat,e,t)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Pt(e,t,r){try{return t=ut.getStr(t),t=ut.calculateAt(e,t),"/"===(t=Ke.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),ct.mkdir(t,r,0),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Ct(e,t,r,n){try{t=ut.getStr(t);var o=256&n,s=4096&n;return n&=-4353,t=ut.calculateAt(e,t,s),ut.doStat(o?ct.lstat:ct.stat,t,r)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Ut(e,t,r,n){ut.varargs=n;try{t=ut.getStr(t),t=ut.calculateAt(e,t);var o=n?ut.get():0;return ct.open(t,r,o).fd}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Bt(e,t,r,n){try{if(t=ut.getStr(t),t=ut.calculateAt(e,t),n<=0)return-28;var o=ct.readlink(t),s=Math.min(n,K(o)),i=U[r+s];return Z(o,r,n+1),U[r+s]=i,s}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function zt(e,t,r,n){try{return t=ut.getStr(t),n=ut.getStr(n),t=ut.calculateAt(e,t),n=ut.calculateAt(r,n),ct.rename(t,n),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Wt(e){try{return e=ut.getStr(e),ct.rmdir(e),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Lt(e,t,r,n,o,s){try{var i=dt(e),a=Et(o,s,!0);return a?i.sock_ops.sendmsg(i,U,t,r,a.addr,a.port):ct.write(i.stream,U,t,r)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Ht(e,t,r){try{return ft.createSocket(e,t,r).stream.fd}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Vt(e,t){try{return e=ut.getStr(e),ut.doStat(ct.stat,e,t)}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function qt(e,t,r){try{return t=ut.getStr(t),t=ut.calculateAt(e,t),0===r?ct.unlink(t):512===r?ct.rmdir(t):ye("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Jt(e,t,r,n){try{if(t=ut.getStr(t),t=ut.calculateAt(e,t,!0),r){var o=L[r>>2],s=L[r+4>>2];i=1e3*o+s/1e6,a=1e3*(o=L[(r+=8)>>2])+(s=L[r+4>>2])/1e6}else var i=Date.now(),a=i;return ct.utime(t,i,a),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function Gt(){return Date.now()}var Yt=!0;function Xt(){return Yt}function Zt(){throw 1/0}function Kt(e,t){var r=new Date(1e3*L[e>>2]);L[t>>2]=r.getUTCSeconds(),L[t+4>>2]=r.getUTCMinutes(),L[t+8>>2]=r.getUTCHours(),L[t+12>>2]=r.getUTCDate(),L[t+16>>2]=r.getUTCMonth(),L[t+20>>2]=r.getUTCFullYear()-1900,L[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;L[t+28>>2]=o}function Qt(e,t){var r=new Date(1e3*L[e>>2]);L[t>>2]=r.getSeconds(),L[t+4>>2]=r.getMinutes(),L[t+8>>2]=r.getHours(),L[t+12>>2]=r.getDate(),L[t+16>>2]=r.getMonth(),L[t+20>>2]=r.getFullYear()-1900,L[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;L[t+28>>2]=o,L[t+36>>2]=-60*r.getTimezoneOffset();var s=new Date(r.getFullYear(),6,1).getTimezoneOffset(),i=n.getTimezoneOffset(),a=0|(s!=i&&r.getTimezoneOffset()==Math.min(i,s));L[t+32>>2]=a}function er(e){var t=new Date(L[e+20>>2]+1900,L[e+16>>2],L[e+12>>2],L[e+8>>2],L[e+4>>2],L[e>>2],0),r=L[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),s=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),a=Math.min(i,s);if(r<0)L[e+32>>2]=Number(s!=i&&a==n);else if(r>0!=(a==n)){var c=Math.max(i,s),u=r>0?a:c;t.setTime(t.getTime()+6e4*(u-n))}L[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return L[e+28>>2]=l,L[e>>2]=t.getSeconds(),L[e+4>>2]=t.getMinutes(),L[e+8>>2]=t.getHours(),L[e+12>>2]=t.getDate(),L[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function tr(e,t,r,n,o,s){try{var i=ct.getStream(n);if(!i)return-8;var a=ct.mmap(i,e,o,t,r),c=a.ptr;return L[s>>2]=a.allocated,c}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function rr(e,t,r,n,o,s){try{var i=ct.getStream(o);i&&(2&r&&ut.doMsync(e,i,t,n,s),ct.munmap(i))}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return-e.errno}}function nr(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),s=new Date(n,6,1),i=o.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(i,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}L[e>>2]=60*c,L[t>>2]=Number(i!=a);var l=u(o),_=u(s),f=Q(l),d=Q(_);a>2]=f,H[r+4>>2]=d):(H[r>>2]=d,H[r+4>>2]=f)}function or(e,t,r){or.called||(or.called=!0,nr(e,t,r))}function sr(){ye("")}var ir={batchedQuotaMax:65536,getBatchedRandomValues:function(e,t){const r="undefined"!=typeof SharedArrayBuffer&&o.HEAPU8.buffer instanceof SharedArrayBuffer,n=r?new ArrayBuffer(t):o.HEAPU8.buffer,s=r?0:e;for(let e=0;e>=2;r=B[e++];)t+=105!=r&t,ur.push(105==r?L[t]:q[t++>>1]),++t;return ur}function _r(e,t,r){var n=lr(t,r);return je[e].apply(null,n)}function fr(){return 2147483648}function dr(){return b?1:1e3}function mr(e,t,r){B.copyWithin(e,t,t+r)}function pr(e){try{return M.grow(e-C.byteLength+65535>>>16),re(M.buffer),1}catch(e){}}function hr(e){var t=B.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,e+100663296),pr(Math.min(r,(s=Math.max(e,o))+((i=65536)-s%i)%i)))return!0}var s,i;return!1}cr=b?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:()=>performance.now();var wr={};function gr(){return h||"./this.program"}function yr(){if(!yr.strings){var e={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",_:gr()};for(var t in wr)void 0===wr[t]?delete e[t]:e[t]=wr[t];var r=[];for(var t in e)r.push(t+"="+e[t]);yr.strings=r}return yr.strings}function br(e,t){var r=0;return yr().forEach((function(n,o){var s=t+r;H[e+4*o>>2]=s,te(n,s),r+=n.length+1})),0}function vr(e,t){var r=yr();H[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),H[t>>2]=n,0}function Er(e){Ao(e)}function Ar(e){try{var t=ut.getStreamFromFD(e);return ct.close(t),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function kr(e,t){try{var r=ut.getStreamFromFD(e),n=r.tty?2:ct.isDir(r.mode)?3:ct.isLink(r.mode)?7:4;return U[t>>0]=n,0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function Sr(e,t,r,n){for(var o=0,s=0;s>2],a=H[t+4>>2];t+=8;var c=ct.read(e,U,i,a,n);if(c<0)return-1;if(o+=c,c>2]=a,0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function xr(e,t,r,n){for(var o=0,s=0;s>2],a=H[t+4>>2];t+=8;var c=ct.write(e,U,i,a,n);if(c<0)return-1;o+=c}return o}function Nr(e,t,r,n,o,s){try{var i=Mt(n,o);if(isNaN(i))return 61;var a=xr(ut.getStreamFromFD(e),t,r,i);return L[s>>2]=a,0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function jr(e,t,r,n){try{var o=Sr(ut.getStreamFromFD(e),t,r);return L[n>>2]=o,0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function Dr(e,t,r,n,o){try{var s=Mt(t,r);if(isNaN(s))return 61;var i=ut.getStreamFromFD(e);return ct.llseek(i,s,n),Ee=[i.position>>>0,(ve=i.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],L[o>>2]=Ee[0],L[o+4>>2]=Ee[1],i.getdents&&0===s&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function Mr(e){try{var t=ut.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?-t.stream_ops.fsync(t):0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function Rr(e,t,r,n){try{var o=xr(ut.getStreamFromFD(e),t,r);return H[n>>2]=o,0}catch(e){if(void 0===ct||!(e instanceof ct.ErrnoError))throw e;return e.errno}}function Tr(){return D()}function Ir(e){return e}function $r(){return __dotnet_runtime.__linker_exports.mono_set_timeout.apply(__dotnet_runtime,arguments)}function Fr(){return __dotnet_runtime.__linker_exports.mono_wasm_bind_cs_function.apply(__dotnet_runtime,arguments)}function Pr(){return __dotnet_runtime.__linker_exports.mono_wasm_bind_js_function.apply(__dotnet_runtime,arguments)}function Cr(){return __dotnet_runtime.__linker_exports.mono_wasm_create_cs_owned_object_ref.apply(__dotnet_runtime,arguments)}function Ur(){return __dotnet_runtime.__linker_exports.mono_wasm_get_by_index_ref.apply(__dotnet_runtime,arguments)}function Br(){return __dotnet_runtime.__linker_exports.mono_wasm_get_global_object_ref.apply(__dotnet_runtime,arguments)}function zr(){return __dotnet_runtime.__linker_exports.mono_wasm_get_object_property_ref.apply(__dotnet_runtime,arguments)}function Wr(){return __dotnet_runtime.__linker_exports.mono_wasm_invoke_bound_function.apply(__dotnet_runtime,arguments)}function Lr(){return __dotnet_runtime.__linker_exports.mono_wasm_invoke_js_blazor.apply(__dotnet_runtime,arguments)}function Hr(){return __dotnet_runtime.__linker_exports.mono_wasm_invoke_js_with_args_ref.apply(__dotnet_runtime,arguments)}function Vr(){return __dotnet_runtime.__linker_exports.mono_wasm_marshal_promise.apply(__dotnet_runtime,arguments)}function qr(){return __dotnet_runtime.__linker_exports.mono_wasm_release_cs_owned_object.apply(__dotnet_runtime,arguments)}function Jr(){return __dotnet_runtime.__linker_exports.mono_wasm_set_by_index_ref.apply(__dotnet_runtime,arguments)}function Gr(){return __dotnet_runtime.__linker_exports.mono_wasm_set_entrypoint_breakpoint.apply(__dotnet_runtime,arguments)}function Yr(){return __dotnet_runtime.__linker_exports.mono_wasm_set_object_property_ref.apply(__dotnet_runtime,arguments)}function Xr(){return __dotnet_runtime.__linker_exports.mono_wasm_trace_logger.apply(__dotnet_runtime,arguments)}function Zr(){return __dotnet_runtime.__linker_exports.mono_wasm_typed_array_from_ref.apply(__dotnet_runtime,arguments)}function Kr(){return __dotnet_runtime.__linker_exports.mono_wasm_typed_array_to_array_ref.apply(__dotnet_runtime,arguments)}function Qr(){return __dotnet_runtime.__linker_exports.schedule_background_exec.apply(__dotnet_runtime,arguments)}function en(e){j(e)}function tn(e){return e%4==0&&(e%100!=0||e%400==0)}function rn(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var nn=[31,29,31,30,31,30,31,31,30,31,30,31],on=[31,28,31,30,31,30,31,31,30,31,30,31];function sn(e,t){for(var r=new Date(e.getTime());t>0;){var n=tn(r.getFullYear()),o=r.getMonth(),s=(n?nn:on)[o];if(!(t>s-r.getDate()))return r.setDate(r.getDate()+t),r;t-=s-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function an(e,t,r,n){var o=L[n+40>>2],s={tm_sec:L[n>>2],tm_min:L[n+4>>2],tm_hour:L[n+8>>2],tm_mday:L[n+12>>2],tm_mon:L[n+16>>2],tm_year:L[n+20>>2],tm_wday:L[n+24>>2],tm_yday:L[n+28>>2],tm_isdst:L[n+32>>2],tm_gmtoff:L[n+36>>2],tm_zone:o?Y(o):""},i=Y(r),a={"%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 c in a)i=i.replace(new RegExp(c,"g"),a[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function _(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function m(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=sn(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(r),s=m(n);return d(o,t)<=0?d(s,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return _(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+rn(tn(e.tm_year+1900)?nn:on,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return f(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&tn(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&tn(e.tm_year%400-1))&&t++}return f(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in i=i.replace(/%%/g,"\0\0"),h)i.includes(c)&&(i=i.replace(new RegExp(c,"g"),h[c](s)));var w=hn(i=i.replace(/\0\0/g,"%"),!1);return w.length>t?0:(ee(w,e),w.length-1)}function cn(e,t,r,n){return an(e,t,r,n)}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ct.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,_n=146;let fn;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&_n)===_n},set:function(e){e?this.mode|=_n:this.mode&=~_n}},isFolder:{get:function(){return ct.isDir(this.mode)}},isDevice:{get:function(){return ct.isChrdev(this.mode)}}}),ct.FSNode=un,ct.staticInit(),o.FS_createPath=ct.createPath,o.FS_createDataFile=ct.createDataFile,o.FS_readFile=ct.readFile,o.FS_createPath=ct.createPath,o.FS_createDataFile=ct.createDataFile,o.FS_createPreloadedFile=ct.createPreloadedFile,o.FS_unlink=ct.unlink,o.FS_createLazyFile=ct.createLazyFile,o.FS_createDevice=ct.createDevice;let dn={scriptUrl:import.meta.url,fetch:globalThis.fetch,require:s,updateGlobalBufferAndViews:re,pthreadReplacements:fn};b&&(dn.requirePromise=import("module").then((e=>e.createRequire(import.meta.url))));let mn=__dotnet_runtime.__initializeImportsAndExports({isGlobal:!1,isNode:b,isWorker:y,isShell:v,isWeb:g,isPThread:!1,quit_:w,ExitStatus:vo,requirePromise:dn.requirePromise},{mono:MONO,binding:BINDING,internal:INTERNAL,module:o,marshaled_imports:IMPORTS},dn,a);re=dn.updateGlobalBufferAndViews;var pn=dn.fetch;e=i=E=dn.scriptDirectory,b&&dn.requirePromise.then((e=>{s=e}));R=dn.noExitRuntime;function hn(e,t,r){var n=r>0?r:K(e)+1,o=new Array(n),s=X(e,o,0,o.length);return t&&(o.length=s),o}var wn,gn={A:$e,d:Fe,v:Be,w:Ve,b:Je,k:Ge,m:Le,ba:Ye,h:Xe,qb:Ze,g:qe,pb:lt,aa:_t,ob:At,nb:kt,Ga:St,mb:Ot,D:xt,lb:Nt,kb:Dt,Fa:Rt,jb:Tt,ib:It,hb:$t,gb:Ft,fb:Pt,eb:Ct,$:Ut,db:Bt,cb:zt,_:Wt,bb:Lt,Z:Ht,ab:Vt,Y:qt,$a:Jt,L:Gt,W:Xt,Wa:Zt,Va:Kt,Ua:Qt,Ta:er,Sa:tr,Ra:rr,Qa:or,n:sr,V:ar,U:_r,Pa:fr,K:cr,Oa:dr,Na:mr,Ma:hr,_a:br,Za:vr,B:Er,H:Ar,Ya:kr,Ea:Or,Da:Nr,X:jr,Ca:Dr,Xa:Mr,M:Rr,a:Tr,T:fo,S:_o,x:no,i:Pn,e:zn,c:Bn,q:Hn,R:lo,r:Yn,La:Vn,z:Xn,Ka:Zn,Q:so,P:co,O:Jn,N:io,C:Wn,Ba:yo,Aa:ho,za:go,ya:po,xa:bo,t:ro,p:Cn,Ja:Gn,j:Ln,f:Un,s:qn,o:Kn,u:eo,y:to,Ia:uo,G:Qn,E:oo,Ha:ao,J:mo,wa:wo,F:Ir,va:$r,ua:Fr,ta:Pr,sa:Cr,ra:Ur,qa:Br,pa:zr,oa:Wr,na:Lr,ma:Hr,la:Vr,ka:qr,ja:Jr,ia:Gr,ha:Yr,ga:Xr,fa:Zr,ea:Kr,da:Qr,l:en,I:an,ca:cn},yn=(Ne(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.sb).apply(null,arguments)},o._malloc=function(){return(yn=o._malloc=o.asm.tb).apply(null,arguments)}),bn=o._free=function(){return(bn=o._free=o.asm.ub).apply(null,arguments)},vn=(o._memset=function(){return(o._memset=o.asm.vb).apply(null,arguments)},o.___errno_location=function(){return(vn=o.___errno_location=o.asm.xb).apply(null,arguments)}),En=(o._memalign=function(){return(o._memalign=o.asm.yb).apply(null,arguments)},o._ntohs=function(){return(En=o._ntohs=o.asm.zb).apply(null,arguments)}),An=o._htons=function(){return(An=o._htons=o.asm.Ab).apply(null,arguments)},kn=(o._mono_wasm_register_root=function(){return(o._mono_wasm_register_root=o.asm.Bb).apply(null,arguments)},o._mono_wasm_deregister_root=function(){return(o._mono_wasm_deregister_root=o.asm.Cb).apply(null,arguments)},o._mono_wasm_add_assembly=function(){return(o._mono_wasm_add_assembly=o.asm.Db).apply(null,arguments)},o._mono_wasm_add_satellite_assembly=function(){return(o._mono_wasm_add_satellite_assembly=o.asm.Eb).apply(null,arguments)},o._mono_wasm_setenv=function(){return(o._mono_wasm_setenv=o.asm.Fb).apply(null,arguments)},o._mono_wasm_getenv=function(){return(o._mono_wasm_getenv=o.asm.Gb).apply(null,arguments)},o._mono_wasm_register_bundled_satellite_assemblies=function(){return(o._mono_wasm_register_bundled_satellite_assemblies=o.asm.Hb).apply(null,arguments)},o._mono_wasm_load_runtime=function(){return(o._mono_wasm_load_runtime=o.asm.Ib).apply(null,arguments)},o._mono_wasm_assembly_load=function(){return(o._mono_wasm_assembly_load=o.asm.Jb).apply(null,arguments)},o._mono_wasm_get_corlib=function(){return(o._mono_wasm_get_corlib=o.asm.Kb).apply(null,arguments)},o._mono_wasm_assembly_find_class=function(){return(o._mono_wasm_assembly_find_class=o.asm.Lb).apply(null,arguments)},o._mono_wasm_runtime_run_module_cctor=function(){return(o._mono_wasm_runtime_run_module_cctor=o.asm.Mb).apply(null,arguments)},o._mono_wasm_assembly_find_method=function(){return(o._mono_wasm_assembly_find_method=o.asm.Nb).apply(null,arguments)},o._mono_wasm_get_delegate_invoke_ref=function(){return(o._mono_wasm_get_delegate_invoke_ref=o.asm.Ob).apply(null,arguments)},o._mono_wasm_box_primitive_ref=function(){return(o._mono_wasm_box_primitive_ref=o.asm.Pb).apply(null,arguments)},o._mono_wasm_invoke_method_ref=function(){return(o._mono_wasm_invoke_method_ref=o.asm.Qb).apply(null,arguments)},o._mono_wasm_invoke_method_bound=function(){return(o._mono_wasm_invoke_method_bound=o.asm.Rb).apply(null,arguments)},o._mono_wasm_assembly_get_entry_point=function(){return(o._mono_wasm_assembly_get_entry_point=o.asm.Sb).apply(null,arguments)},o._mono_wasm_string_get_utf8=function(){return(o._mono_wasm_string_get_utf8=o.asm.Tb).apply(null,arguments)},o._mono_wasm_string_from_js=function(){return(o._mono_wasm_string_from_js=o.asm.Ub).apply(null,arguments)},o._mono_wasm_string_from_utf16_ref=function(){return(o._mono_wasm_string_from_utf16_ref=o.asm.Vb).apply(null,arguments)},o._mono_wasm_get_obj_class=function(){return(o._mono_wasm_get_obj_class=o.asm.Wb).apply(null,arguments)},o._mono_wasm_get_obj_type=function(){return(o._mono_wasm_get_obj_type=o.asm.Xb).apply(null,arguments)},o._mono_wasm_try_unbox_primitive_and_get_type_ref=function(){return(o._mono_wasm_try_unbox_primitive_and_get_type_ref=o.asm.Yb).apply(null,arguments)},o._mono_wasm_array_length=function(){return(o._mono_wasm_array_length=o.asm.Zb).apply(null,arguments)},o._mono_wasm_array_get=function(){return(o._mono_wasm_array_get=o.asm._b).apply(null,arguments)},o._mono_wasm_array_get_ref=function(){return(o._mono_wasm_array_get_ref=o.asm.$b).apply(null,arguments)},o._mono_wasm_obj_array_new_ref=function(){return(o._mono_wasm_obj_array_new_ref=o.asm.ac).apply(null,arguments)},o._mono_wasm_obj_array_new=function(){return(o._mono_wasm_obj_array_new=o.asm.bc).apply(null,arguments)},o._mono_wasm_obj_array_set=function(){return(o._mono_wasm_obj_array_set=o.asm.cc).apply(null,arguments)},o._mono_wasm_obj_array_set_ref=function(){return(o._mono_wasm_obj_array_set_ref=o.asm.dc).apply(null,arguments)},o._mono_wasm_string_array_new_ref=function(){return(o._mono_wasm_string_array_new_ref=o.asm.ec).apply(null,arguments)},o._mono_wasm_exec_regression=function(){return(o._mono_wasm_exec_regression=o.asm.fc).apply(null,arguments)},o._mono_wasm_exit=function(){return(o._mono_wasm_exit=o.asm.gc).apply(null,arguments)},o._mono_wasm_set_main_args=function(){return(o._mono_wasm_set_main_args=o.asm.hc).apply(null,arguments)},o._mono_wasm_strdup=function(){return(o._mono_wasm_strdup=o.asm.ic).apply(null,arguments)},o._mono_wasm_parse_runtime_options=function(){return(o._mono_wasm_parse_runtime_options=o.asm.jc).apply(null,arguments)},o._mono_wasm_enable_on_demand_gc=function(){return(o._mono_wasm_enable_on_demand_gc=o.asm.kc).apply(null,arguments)},o._mono_wasm_intern_string_ref=function(){return(o._mono_wasm_intern_string_ref=o.asm.lc).apply(null,arguments)},o._mono_wasm_string_get_data_ref=function(){return(o._mono_wasm_string_get_data_ref=o.asm.mc).apply(null,arguments)},o._mono_wasm_string_get_data=function(){return(o._mono_wasm_string_get_data=o.asm.nc).apply(null,arguments)},o._mono_wasm_class_get_type=function(){return(o._mono_wasm_class_get_type=o.asm.oc).apply(null,arguments)},o._mono_wasm_type_get_class=function(){return(o._mono_wasm_type_get_class=o.asm.pc).apply(null,arguments)},o._mono_wasm_get_type_name=function(){return(o._mono_wasm_get_type_name=o.asm.qc).apply(null,arguments)},o._mono_wasm_get_type_aqn=function(){return(o._mono_wasm_get_type_aqn=o.asm.rc).apply(null,arguments)},o._mono_wasm_write_managed_pointer_unsafe=function(){return(o._mono_wasm_write_managed_pointer_unsafe=o.asm.sc).apply(null,arguments)},o._mono_wasm_copy_managed_pointer=function(){return(o._mono_wasm_copy_managed_pointer=o.asm.tc).apply(null,arguments)},o._mono_wasm_i52_to_f64=function(){return(o._mono_wasm_i52_to_f64=o.asm.uc).apply(null,arguments)},o._mono_wasm_u52_to_f64=function(){return(o._mono_wasm_u52_to_f64=o.asm.vc).apply(null,arguments)},o._mono_wasm_f64_to_u52=function(){return(o._mono_wasm_f64_to_u52=o.asm.wc).apply(null,arguments)},o._mono_wasm_f64_to_i52=function(){return(o._mono_wasm_f64_to_i52=o.asm.xc).apply(null,arguments)},o._mono_wasm_typed_array_new_ref=function(){return(o._mono_wasm_typed_array_new_ref=o.asm.yc).apply(null,arguments)},o._mono_wasm_unbox_enum=function(){return(o._mono_wasm_unbox_enum=o.asm.zc).apply(null,arguments)},o._mono_wasm_send_dbg_command_with_parms=function(){return(o._mono_wasm_send_dbg_command_with_parms=o.asm.Ac).apply(null,arguments)},o._mono_wasm_send_dbg_command=function(){return(o._mono_wasm_send_dbg_command=o.asm.Bc).apply(null,arguments)},o._mono_wasm_event_pipe_enable=function(){return(o._mono_wasm_event_pipe_enable=o.asm.Cc).apply(null,arguments)},o._mono_wasm_event_pipe_session_start_streaming=function(){return(o._mono_wasm_event_pipe_session_start_streaming=o.asm.Dc).apply(null,arguments)},o._mono_wasm_event_pipe_session_disable=function(){return(o._mono_wasm_event_pipe_session_disable=o.asm.Ec).apply(null,arguments)},o._mono_background_exec=function(){return(o._mono_background_exec=o.asm.Fc).apply(null,arguments)},o._mono_wasm_get_icudt_name=function(){return(o._mono_wasm_get_icudt_name=o.asm.Gc).apply(null,arguments)},o._mono_wasm_load_icu_data=function(){return(o._mono_wasm_load_icu_data=o.asm.Hc).apply(null,arguments)},o._mono_print_method_from_ip=function(){return(o._mono_print_method_from_ip=o.asm.Ic).apply(null,arguments)},o._mono_set_timeout_exec=function(){return(o._mono_set_timeout_exec=o.asm.Jc).apply(null,arguments)},o._emscripten_builtin_memalign=function(){return(kn=o._emscripten_builtin_memalign=o.asm.Kc).apply(null,arguments)}),Sn=o._setThrew=function(){return(Sn=o._setThrew=o.asm.Lc).apply(null,arguments)},On=o.stackSave=function(){return(On=o.stackSave=o.asm.Mc).apply(null,arguments)},xn=o.stackRestore=function(){return(xn=o.stackRestore=o.asm.Nc).apply(null,arguments)},Nn=o.stackAlloc=function(){return(Nn=o.stackAlloc=o.asm.Oc).apply(null,arguments)},jn=o.___cxa_can_catch=function(){return(jn=o.___cxa_can_catch=o.asm.Pc).apply(null,arguments)},Dn=o.___cxa_is_pointer_type=function(){return(Dn=o.___cxa_is_pointer_type=o.asm.Qc).apply(null,arguments)},Mn=o.dynCall_ji=function(){return(Mn=o.dynCall_ji=o.asm.Rc).apply(null,arguments)},Rn=o.dynCall_jiiii=function(){return(Rn=o.dynCall_jiiii=o.asm.Sc).apply(null,arguments)},Tn=o.dynCall_iij=function(){return(Tn=o.dynCall_iij=o.asm.Tc).apply(null,arguments)},In=o.dynCall_j=function(){return(In=o.dynCall_j=o.asm.Uc).apply(null,arguments)},$n=o.dynCall_viijii=function(){return($n=o.dynCall_viijii=o.asm.Vc).apply(null,arguments)},Fn=o.dynCall_iiiiij=function(){return(Fn=o.dynCall_iiiiij=o.asm.Wc).apply(null,arguments)};function Pn(e,t){var r=On();try{return Te(e)(t)}catch(e){if(xn(r),e!==e+0)throw e;Sn(1,0)}}function Cn(e,t){var r=On();try{Te(e)(t)}catch(e){if(xn(r),e!==e+0)throw e;Sn(1,0)}}function Un(e,t,r,n){var o=On();try{Te(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function Bn(e,t,r,n){var o=On();try{return Te(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function zn(e,t,r){var n=On();try{return Te(e)(t,r)}catch(e){if(xn(n),e!==e+0)throw e;Sn(1,0)}}function Wn(e,t,r,n,o,s,i,a,c,u,l,_){var f=On();try{return Te(e)(t,r,n,o,s,i,a,c,u,l,_)}catch(e){if(xn(f),e!==e+0)throw e;Sn(1,0)}}function Ln(e,t,r){var n=On();try{Te(e)(t,r)}catch(e){if(xn(n),e!==e+0)throw e;Sn(1,0)}}function Hn(e,t,r,n,o){var s=On();try{return Te(e)(t,r,n,o)}catch(e){if(xn(s),e!==e+0)throw e;Sn(1,0)}}function Vn(e,t,r,n,o,s,i){var a=On();try{return Te(e)(t,r,n,o,s,i)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function qn(e,t,r,n,o){var s=On();try{Te(e)(t,r,n,o)}catch(e){if(xn(s),e!==e+0)throw e;Sn(1,0)}}function Jn(e,t,r,n,o,s,i,a,c,u){var l=On();try{return Te(e)(t,r,n,o,s,i,a,c,u)}catch(e){if(xn(l),e!==e+0)throw e;Sn(1,0)}}function Gn(e,t,r,n){var o=On();try{Te(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function Yn(e,t,r,n,o,s){var i=On();try{return Te(e)(t,r,n,o,s)}catch(e){if(xn(i),e!==e+0)throw e;Sn(1,0)}}function Xn(e,t,r,n,o,s,i){var a=On();try{return Te(e)(t,r,n,o,s,i)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function Zn(e,t,r,n,o,s,i,a){var c=On();try{return Te(e)(t,r,n,o,s,i,a)}catch(e){if(xn(c),e!==e+0)throw e;Sn(1,0)}}function Kn(e,t,r,n,o,s){var i=On();try{Te(e)(t,r,n,o,s)}catch(e){if(xn(i),e!==e+0)throw e;Sn(1,0)}}function Qn(e,t,r,n,o,s,i,a,c,u){var l=On();try{Te(e)(t,r,n,o,s,i,a,c,u)}catch(e){if(xn(l),e!==e+0)throw e;Sn(1,0)}}function eo(e,t,r,n,o,s,i){var a=On();try{Te(e)(t,r,n,o,s,i)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function to(e,t,r,n,o,s,i,a){var c=On();try{Te(e)(t,r,n,o,s,i,a)}catch(e){if(xn(c),e!==e+0)throw e;Sn(1,0)}}function ro(e){var t=On();try{Te(e)()}catch(e){if(xn(t),e!==e+0)throw e;Sn(1,0)}}function no(e){var t=On();try{return Te(e)()}catch(e){if(xn(t),e!==e+0)throw e;Sn(1,0)}}function oo(e,t,r,n,o,s,i,a,c,u,l){var _=On();try{Te(e)(t,r,n,o,s,i,a,c,u,l)}catch(e){if(xn(_),e!==e+0)throw e;Sn(1,0)}}function so(e,t,r,n,o,s,i,a){var c=On();try{return Te(e)(t,r,n,o,s,i,a)}catch(e){if(xn(c),e!==e+0)throw e;Sn(1,0)}}function io(e,t,r,n,o,s,i,a,c,u,l){var _=On();try{return Te(e)(t,r,n,o,s,i,a,c,u,l)}catch(e){if(xn(_),e!==e+0)throw e;Sn(1,0)}}function ao(e,t,r,n,o,s,i,a,c,u,l,_){var f=On();try{Te(e)(t,r,n,o,s,i,a,c,u,l,_)}catch(e){if(xn(f),e!==e+0)throw e;Sn(1,0)}}function co(e,t,r,n,o,s,i,a,c){var u=On();try{return Te(e)(t,r,n,o,s,i,a,c)}catch(e){if(xn(u),e!==e+0)throw e;Sn(1,0)}}function uo(e,t,r,n,o,s,i,a,c){var u=On();try{Te(e)(t,r,n,o,s,i,a,c)}catch(e){if(xn(u),e!==e+0)throw e;Sn(1,0)}}function lo(e,t,r,n,o,s){var i=On();try{return Te(e)(t,r,n,o,s)}catch(e){if(xn(i),e!==e+0)throw e;Sn(1,0)}}function _o(e,t,r,n){var o=On();try{return Te(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function fo(e,t,r,n){var o=On();try{return Te(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function mo(e,t,r,n,o,s,i,a,c,u,l,_,f,d,m,p){var h=On();try{Te(e)(t,r,n,o,s,i,a,c,u,l,_,f,d,m,p)}catch(e){if(xn(h),e!==e+0)throw e;Sn(1,0)}}function po(e,t){var r=On();try{return Mn(e,t)}catch(e){if(xn(r),e!==e+0)throw e;Sn(1,0)}}function ho(e,t,r,n){var o=On();try{return Tn(e,t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function wo(e,t,r,n,o,s,i){var a=On();try{$n(e,t,r,n,o,s,i)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function go(e){var t=On();try{return In(e)}catch(e){if(xn(t),e!==e+0)throw e;Sn(1,0)}}function yo(e,t,r,n,o,s,i){var a=On();try{return Fn(e,t,r,n,o,s,i)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function bo(e,t,r,n,o){var s=On();try{return Rn(e,t,r,n,o)}catch(e){if(xn(s),e!==e+0)throw e;Sn(1,0)}}function vo(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Eo(e){function t(){wn||(wn=!0,o.calledRun=!0,T||(ue(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),le()))}e=e||p,me>0||(ce(),me>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}function Ao(e,t){e,ko(e)}function ko(e){e,ae()||(o.onExit&&o.onExit(e),T=!0),w(e,new vo(e))}if(o.ccall=F,o.cwrap=P,o.UTF8ArrayToString=G,o.UTF8ToString=Y,o.addRunDependency=we,o.removeRunDependency=ge,o.FS_createPath=ct.createPath,o.FS_createDataFile=ct.createDataFile,o.FS_createPreloadedFile=ct.createPreloadedFile,o.FS_createLazyFile=ct.createLazyFile,o.FS_createDevice=ct.createDevice,o.FS_unlink=ct.unlink,o.print=S,o.setValue=Ie,o.getValue=Me,o.FS=ct,he=function e(){wn||Eo(),wn||(he=e)},o.run=Eo,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Eo(),t.ready=t.ready.then((()=>mn)),t.ready}})();export default createDotnetRuntime;const MONO={},BINDING={},INTERNAL={},IMPORTS={};var ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;__dotnet_runtime.__setEmscriptenEntrypoint(createDotnetRuntime,{isNode:ENVIRONMENT_IS_NODE,isShell:ENVIRONMENT_IS_SHELL,isWeb:ENVIRONMENT_IS_WEB,isWorker:ENVIRONMENT_IS_WORKER});const dotnet=__dotnet_runtime.moduleExports.dotnet,exit=__dotnet_runtime.moduleExports.exit;export{dotnet,exit,INTERNAL};