@wasm-oj/browser 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{compiler.worker-c6eOLuJo.js → compiler.worker-Cpp5Hq8T.js} +13 -13
- package/dist/assets/go-stage.worker-BIUc7Tsv.js +2 -0
- package/dist/assets/interactive-side.worker-pP6UC6gL.js +1 -0
- package/dist/assets/{runner.worker-CWkfyiLA.js → runner.worker-BEbZIYKj.js} +9 -9
- package/dist/assets/{runtime-core_bg-s75xwQFA.wasm → runtime-core_bg-CKk6CPFH.wasm} +0 -0
- package/dist/assets/rustc-stage.worker-CXdxGODv.js +23 -0
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/assets/go-stage.worker-DMewq4N3.js +0 -2
- package/dist/assets/rustc-stage.worker-BJ5u-1c2.js +0 -22
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,l.unregister(this),e}free(){let e=this.__destroy_into_raw();O.__wbg_gocompilersession_free(e,0)}compilePipeline(e){return O.gocompilersession_compilePipeline(this.__wbg_ptr,e)}get digest(){let e,t;try{let n=O.gocompilersession_digest(this.__wbg_ptr);return e=n[0],t=n[1],g(n[0],n[1])}finally{O.__wbindgen_free(e,t,1)}}get generation(){let e=O.gocompilersession_generation(this.__wbg_ptr);if(e[2])throw C(e[1]);return e[0]>>>0}constructor(e){let t=O.gocompilersession_new(e);if(t[2])throw C(t[1]);return this.__wbg_ptr=t[0],l.register(this,this.__wbg_ptr,this),this}};Symbol.dispose&&(e.prototype[Symbol.dispose]=e.prototype.free);var t=class e{static __wrap(t){let n=Object.create(e.prototype);return n.__wbg_ptr=t,ee.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){let e=this.__destroy_into_raw();O.__wbg_trap_free(e,0)}static __wbg_wasmer_trap(){O.trap___wbg_wasmer_trap()}};Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);function n(){return{__proto__:null,"./runtime-core_bg.js":{__proto__:null,__wbg_BigInt_54837260f97b6890:function(e){return BigInt(e)},__wbg_Error_408e67f47ca7b58b:function(e,t){return Error(g(e,t))},__wbg_Number_3890faa6d3ff057d:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=S(String(t),O.__wbindgen_malloc,O.__wbindgen_realloc),r=D;h().setInt32(e+4,r,!0),h().setInt32(e+0,n,!0)},__wbg___wbindgen_bigint_get_as_i64_c4ecf48528083721:function(e,t){let n=t,r=typeof n==`bigint`?n:void 0;h().setBigInt64(e+8,b(r)?BigInt(0):r,!0),h().setInt32(e+0,!b(r),!0)},__wbg___wbindgen_boolean_get_c9c83ebd41b34df3:function(e){let t=e,n=typeof t==`boolean`?t:void 0;return b(n)?16777215:+!!n},__wbg___wbindgen_debug_string_a57024b9c6e4a48b:function(e,t){let n=S(f(t),O.__wbindgen_malloc,O.__wbindgen_realloc),r=D;h().setInt32(e+4,r,!0),h().setInt32(e+0,n,!0)},__wbg___wbindgen_function_table_cad76479cff6555c:function(){return O.__wbindgen_export},__wbg___wbindgen_in_ac983077f137f2e6:function(e,t){return e in t},__wbg___wbindgen_is_bigint_8ffbbef442139384:function(e){return typeof e==`bigint`},__wbg___wbindgen_is_function_5e4570eb24ffa122:function(e){return typeof e==`function`},__wbg___wbindgen_is_object_a2790eb24c211ea0:function(e){let t=e;return typeof t==`object`&&!!t},__wbg___wbindgen_is_string_e6f02f0ea5f20a32:function(e){return typeof e==`string`},__wbg___wbindgen_is_undefined_6cff064c44e0d823:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_0a18949a61670320:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_acf2776254a8d832:function(e,t){return e==t},__wbg___wbindgen_lt_94fbb50645571f95:function(e,t){return e<t},__wbg___wbindgen_neg_8a39375bffed95b1:function(e){return-e},__wbg___wbindgen_number_get_136b9679cab35cfb:function(e,t){let n=t,r=typeof n==`number`?n:void 0;h().setFloat64(e+8,b(r)?0:r,!0),h().setInt32(e+0,!b(r),!0)},__wbg___wbindgen_rethrow_fbd2dcd7d2b9ac5f:function(e){throw e},__wbg___wbindgen_shr_cf84c7eeac93e2e0:function(e,t){return e>>t},__wbg___wbindgen_string_get_d154f1e671052120:function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=b(r)?0:S(r,O.__wbindgen_malloc,O.__wbindgen_realloc),a=D;h().setInt32(e+4,a,!0),h().setInt32(e+0,i,!0)},__wbg___wbindgen_throw_bb96b2010945f0bc:function(e,t){throw Error(g(e,t))},__wbg__wbg_cb_unref_be22cc64ae6946a0:function(e){e._wbg_cb_unref()},__wbg_apply_6cd9daeacef161ce:function(){return y(function(e,t,n){return Reflect.apply(e,t,n)},arguments)},__wbg_apply_cb180996ed7fdae9:function(){return y(function(e,t,n){return e.apply(t,n)},arguments)},__wbg_arrayBuffer_16433f17fbd74397:function(){return y(function(e){return e.arrayBuffer()},arguments)},__wbg_bind_ba1d91a55e59341a:function(e,t,n){return e.bind(t,n)},__wbg_bind_f0a9af73583d6566:function(e,t,n,r){return e.bind(t,n,r)},__wbg_buffer_8117fe4dab119813:function(e){return e.buffer},__wbg_buffer_bc63d6f0ff4af1fc:function(e){return e.buffer},__wbg_byteLength_031910aabf3577e0:function(e){return e.byteLength},__wbg_byteLength_dfbb09ce977c0dad:function(e){return e.byteLength},__wbg_call_1c5886ab9c57d1c7:function(){return y(function(e,t){return e.call(t)},arguments)},__wbg_call_35dba3c747ad7521:function(){return y(function(e,t,n){return e.call(t,n)},arguments)},__wbg_constructor_aaf603909746f45e:function(e){return e.constructor},__wbg_customSections_b6ef655bf3ceaeb6:function(e,t,n){return WebAssembly.Module.customSections(e,g(t,n))},__wbg_done_669171204c3dcae2:function(e){return e.done},__wbg_entries_7774d489e1da5f4f:function(e){return Object.entries(e)},__wbg_error_757e9472f8410341:function(e,t){let n,r;try{n=e,r=t,console.error(g(e,t))}finally{O.__wbindgen_free(n,r,1)}},__wbg_exports_7d05caa1a0c36b86:function(e){return e.exports},__wbg_exports_c5a4e6d954ac0ad0:function(e){return WebAssembly.Module.exports(e)},__wbg_fetch_729fad2e5272298f:function(e,t){return e.fetch(t)},__wbg_fetch_d752d93f5b259503:function(e,t){return e.fetch(t)},__wbg_from_74f3d90e0ff11240:function(e){return Array.from(e)},__wbg_getPrototypeOf_55a24d07487f0509:function(){return y(function(e){return Reflect.getPrototypeOf(e)},arguments)},__wbg_getRandomValues_436a51d0629d84e1:function(){return y(function(e,t){globalThis.crypto.getRandomValues(p(e,t))},arguments)},__wbg_getTime_63fb0332e6c4ec17:function(e){return e.getTime()},__wbg_getTimezoneOffset_4baa793e0d3962a8:function(e){return e.getTimezoneOffset()},__wbg_get_70e2ce0f7d009e1f:function(){return y(function(e,t){return e.get(t>>>0)},arguments)},__wbg_get_971a0c45d172643f:function(){return y(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_c0c8f8d7da0c03dd:function(e,t){return e[t>>>0]},__wbg_get_d173c0308df22d37:function(){return y(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_unchecked_e20b893aeafc3fca:function(e,t){return e[t>>>0]},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_grow_5344199563323c70:function(){return y(function(e,t){return e.grow(t>>>0)},arguments)},__wbg_grow_adf1e32e3f3bb932:function(){return y(function(e,t){return e.grow(t>>>0)},arguments)},__wbg_headers_6dedf39f001ae99d:function(e){return e.headers},__wbg_headers_92567b07014384b9:function(e){return e.headers},__wbg_imports_d64558b2dafe33b8:function(e){return WebAssembly.Module.imports(e)},__wbg_instanceof_ArrayBuffer_993d02d2d254cad1:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Error_61d8a02a0f3383a1:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_Function_f7fa7e26e46ea413:function(e){let t;try{t=e instanceof Function}catch{t=!1}return t},__wbg_instanceof_Global_eb9f44c43679a9c6:function(e){let t;try{t=e instanceof WebAssembly.Global}catch{t=!1}return t},__wbg_instanceof_Memory_37fa5d38ff0dd2f3:function(e){let t;try{t=e instanceof WebAssembly.Memory}catch{t=!1}return t},__wbg_instanceof_Object_80ad464782e2bd73:function(e){let t;try{t=e instanceof Object}catch{t=!1}return t},__wbg_instanceof_RangeError_b306483892e8598c:function(e){let t;try{t=e instanceof RangeError}catch{t=!1}return t},__wbg_instanceof_Response_8f49efbd4bfd76d6:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_SharedArrayBuffer_c734e76df6d827cb:function(e){let t;try{t=e instanceof SharedArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Table_01ff4017eccbeab8:function(e){let t;try{t=e instanceof WebAssembly.Table}catch{t=!1}return t},__wbg_instanceof_Tag_21ca531473671582:function(e){let t;try{t=e instanceof WebAssembly.Tag}catch{t=!1}return t},__wbg_instanceof_Uint8Array_f935dbb0aa7cdeed:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_instanceof_WorkerGlobalScope_8c58a6d74926b578:function(e){let t;try{t=e instanceof WorkerGlobalScope}catch{t=!1}return t},__wbg_isArray_6339f732981044bf:function(e){return Array.isArray(e)},__wbg_isSafeInteger_f3d6cd19ccfe4512:function(e){return Number.isSafeInteger(e)},__wbg_iterator_5cebbb86e33c6dd6:function(){return Symbol.iterator},__wbg_length_1368b9bb66f6a6aa:function(e){return e.length},__wbg_length_36bd29c6848c2144:function(e){return e.length},__wbg_length_ecfa2c63d3d0d82c:function(e){return e.length},__wbg_message_c141d5e68716b595:function(e){return e.message},__wbg_new_0_f117d868b403dc07:function(){return new Date},__wbg_new_116be93542d39019:function(){return[]},__wbg_new_227d7c05414eb861:function(){return Error()},__wbg_new_52e39b693b131692:function(){return y(function(e){return new WebAssembly.Tag(e)},arguments)},__wbg_new_77cc4f4f472aeb81:function(e){return new Uint8Array(e)},__wbg_new_82966bafe01b664f:function(){return y(function(e){return new WebAssembly.Table(e)},arguments)},__wbg_new_bd7a161a1b96dc2a:function(){return y(function(e,t){return new WebAssembly.Global(e,t)},arguments)},__wbg_new_cdf041679ded4c5f:function(){return new Map},__wbg_new_d1599c9e69d35606:function(){return y(function(e,t){return new WebAssembly.Instance(e,t)},arguments)},__wbg_new_e3fb27841b78e4f4:function(){return y(function(e){return new WebAssembly.Module(e)},arguments)},__wbg_new_ebe3e0f6837f0879:function(){return{}},__wbg_new_f9d6489212f3b2b3:function(e){return new Date(e)},__wbg_new_fee1181bcca662c4:function(){return y(function(e){return new WebAssembly.Memory(e)},arguments)},__wbg_new_typed_cceaf62d8d95e9f2:function(e,t){try{var n={a:e,b:t};return new Promise((e,t)=>{let r=n.a;n.a=0;try{return s(r,n.b,e,t)}finally{n.a=r}})}finally{n.a=0}},__wbg_new_with_args_75f20e1087b74fa8:function(e,t,n,r){return Function(g(e,t),g(n,r))},__wbg_new_with_length_2ccc5dbfb4541247:function(e){return Array(e>>>0)},__wbg_new_with_length_3ffc1c56427c525c:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_str_and_init_5a37d576dec75a86:function(){return y(function(e,t,n){return new Request(g(e,t),n)},arguments)},__wbg_next_42cf16ee0dafc9e2:function(){return y(function(e){return e.next()},arguments)},__wbg_next_8f26b64fa5e9f64b:function(e){return e.next},__wbg_now_8b265300afd5f2b9:function(){return Date.now()},__wbg_prototypesetcall_de8e0d9553586985:function(e,t,n){Uint8Array.prototype.set.call(p(e,t),n)},__wbg_push_adb0107829f02d75:function(e,t){return e.push(t)},__wbg_queueMicrotask_ac694eae12e92dfb:function(e){queueMicrotask(e)},__wbg_queueMicrotask_be5fe34a8f4cad4d:function(e){return e.queueMicrotask},__wbg_redirected_38edd6189354296c:function(e){return e.redirected},__wbg_resolve_020f95d838c6ef25:function(e){return Promise.resolve(e)},__wbg_set_014226dfeca53178:function(e,t,n){return e.set(t,n)},__wbg_set_14811fdb285b1915:function(){return y(function(e,t,n){e.set(t>>>0,n)},arguments)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_8155bb79a948541b:function(){return y(function(e,t,n){return Reflect.set(e,t,n)},arguments)},__wbg_set_a80955eb93b145c6:function(e,t,n){e[t>>>0]=n},__wbg_set_b9b5b5cb7b495037:function(e,t,n){e.set(p(t,n))},__wbg_set_body_f301b68bff45f419:function(e,t){e.body=t},__wbg_set_e92392c4b44c5de1:function(){return y(function(e,t,n,r,i){e.set(g(t,n),g(r,i))},arguments)},__wbg_set_method_cf2b992b9a610bc3:function(e,t,n){e.method=g(t,n)},__wbg_set_mode_d6479dfd6696c8d3:function(e,t){e.mode=c[t]},__wbg_set_value_1b7bd2bc4ef248bb:function(e,t){e.value=t},__wbg_stack_3b0d974bbf31e44f:function(e,t){let n=t.stack,r=S(n,O.__wbindgen_malloc,O.__wbindgen_realloc),i=D;h().setInt32(e+4,i,!0),h().setInt32(e+0,r,!0)},__wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76:function(){let e=typeof globalThis>`u`?null:globalThis;return b(e)?0:u(e)},__wbg_static_accessor_GLOBAL_c7aea38d4de089bc:function(){let e=typeof global>`u`?null:global;return b(e)?0:u(e)},__wbg_static_accessor_SELF_42d4fae05e59267a:function(){let e=typeof self>`u`?null:self;return b(e)?0:u(e)},__wbg_static_accessor_WINDOW_e0db14a0eba6a812:function(){let e=typeof window>`u`?null:window;return b(e)?0:u(e)},__wbg_status_b0de02a07fd7d927:function(e){return e.status},__wbg_subarray_a4cc58201c7359fd:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_7026b513a94278a8:function(e,t){return e.then(t)},__wbg_then_72819b8d4e081fb5:function(e,t,n){return e.then(t,n)},__wbg_toString_2f0b0aec069cb718:function(e){return e.toString()},__wbg_toString_effe882d0e9af91c:function(e,t,n){let r=S(t.toString(n),O.__wbindgen_malloc,O.__wbindgen_realloc),i=D;h().setInt32(e+4,i,!0),h().setInt32(e+0,r,!0)},__wbg_trap_new:function(e){return t.__wrap(e)},__wbg_value_1e2369fab29b420e:function(e){return e.value},__wbg_value_728796e3a1723ff8:function(e){return e.value},__wbindgen_cast_0000000000000001:function(e,t){return x(e,t,r)},__wbindgen_cast_0000000000000002:function(e,t){return x(e,t,a)},__wbindgen_cast_0000000000000003:function(e,t){return x(e,t,o)},__wbindgen_cast_0000000000000004:function(e,t){return x(e,t,i)},__wbindgen_cast_0000000000000005:function(e){return e},__wbindgen_cast_0000000000000006:function(e){return e},__wbindgen_cast_0000000000000007:function(e,t){return p(e,t)},__wbindgen_cast_0000000000000008:function(e,t){return g(e,t)},__wbindgen_cast_0000000000000009:function(e,t){return BigInt.asUintN(64,e)|BigInt.asUintN(64,t)<<BigInt(64)},__wbindgen_cast_000000000000000a:function(e){return BigInt.asUintN(64,e)},__wbindgen_cast_000000000000000b:function(e,t){var n=te(e,t);return O.__wbindgen_free(e,t*4,4),n},__wbindgen_init_externref_table:function(){let e=O.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function r(e,t,n){let r=O.wasm_bindgen_68458880a41dd4bb___convert__closures_____invoke___wasm_bindgen_68458880a41dd4bb___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_68458880a41dd4bb___JsError___true_(e,t,n);if(r[1])throw C(r[0])}function i(e,t,n){let r=O.wasm_bindgen_68458880a41dd4bb___convert__closures________invoke___js_sys_c11fba41208799d1___Array__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_68458880a41dd4bb___JsValue___true_(e,t,n);if(r[1])throw C(r[0])}function a(e,t,n){let r=O.wasm_bindgen_68458880a41dd4bb___convert__closures________invoke___js_sys_c11fba41208799d1___Array__core_9b3796e30d99ddb7___result__Result_js_sys_c11fba41208799d1___Array__wasm_bindgen_68458880a41dd4bb___JsValue___true_(e,t,n);if(r[2])throw C(r[1]);return C(r[0])}function o(e,t,n){let r=O.wasm_bindgen_68458880a41dd4bb___convert__closures________invoke___js_sys_c11fba41208799d1___Array__core_9b3796e30d99ddb7___result__Result_js_sys_c11fba41208799d1___Array__wasm_bindgen_68458880a41dd4bb___JsValue___true__2(e,t,n);if(r[2])throw C(r[1]);return C(r[0])}function s(e,t,n,r){O.wasm_bindgen_68458880a41dd4bb___convert__closures_____invoke___js_sys_c11fba41208799d1___Function_fn_wasm_bindgen_68458880a41dd4bb___JsValue_____wasm_bindgen_68458880a41dd4bb___sys__Undefined___js_sys_c11fba41208799d1___Function_fn_wasm_bindgen_68458880a41dd4bb___JsValue_____wasm_bindgen_68458880a41dd4bb___sys__Undefined_______true_(e,t,n,r)}const c=[`same-origin`,`no-cors`,`cors`,`navigate`],l=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>O.__wbg_gocompilersession_free(e,1)),ee=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>O.__wbg_trap_free(e,1));function u(e){let t=O.__externref_table_alloc();return O.__wbindgen_externrefs.set(t,e),t}const d=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>O.__wbindgen_destroy_closure(e.a,e.b));function f(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`"${e}"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=f(e[0]));for(let r=1;r<t;r++)n+=`, `+f(e[r]);return n+=`]`,n}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(n&&n.length>1)r=n[1];else return toString.call(e);if(r==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function te(e,t){e>>>=0;let n=h(),r=[];for(let i=e;i<e+4*t;i+=4)r.push(O.__wbindgen_externrefs.get(n.getUint32(i,!0)));return O.__externref_drop_slice(e,t),r}function p(e,t){return e>>>=0,v().subarray(e/1,e/1+t)}let m=null;function h(){return(m===null||m.buffer.detached===!0||m.buffer.detached===void 0&&m.buffer!==O.memory.buffer)&&(m=new DataView(O.memory.buffer)),m}function g(e,t){return ne(e>>>0,t)}let _=null;function v(){return(_===null||_.byteLength===0)&&(_=new Uint8Array(O.memory.buffer)),_}function y(e,t){try{return e.apply(this,t)}catch(e){let t=u(e);O.__wbindgen_exn_store(t)}}function b(e){return e==null}function x(e,t,n){let r={a:e,b:t,cnt:1},i=(...e)=>{r.cnt++;let t=r.a;r.a=0;try{return n(t,r.b,...e)}finally{r.a=t,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--r.cnt===0&&(O.__wbindgen_destroy_closure(r.a,r.b),r.a=0,d.unregister(r))},d.register(i,r,r),i}function S(e,t,n){if(n===void 0){let n=E.encode(e),r=t(n.length,1)>>>0;return v().subarray(r,r+n.length).set(n),D=n.length,r}let r=e.length,i=t(r,1)>>>0,a=v(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=v().subarray(i+o,i+r),a=E.encodeInto(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return D=o,i}function C(e){let t=O.__wbindgen_externrefs.get(e);return O.__externref_table_dealloc(e),t}let w=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0});w.decode();let T=0;function ne(e,t){return T+=t,T>=2146435072&&(w=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}),w.decode(),T=t),w.decode(v().subarray(e,e+t))}const E=new TextEncoder;`encodeInto`in E||(E.encodeInto=function(e,t){let n=E.encode(e);return t.set(n),{read:e.length,written:n.length}});let D=0,O;function re(e,t){return O=e.exports,m=null,_=null,O.__wbindgen_start(),O}async function ie(e,t){if(typeof Response==`function`&&e instanceof Response){if(!e.ok)throw Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(n(e.type)&&e.headers.get(`Content-Type`)!==`application/wasm`)console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t);else throw t}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}function n(e){switch(e){case`basic`:case`cors`:case`default`:return!0}return!1}}async function ae(e){if(O!==void 0)return O;e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0&&(e=new URL(``+new URL(`runtime-core_bg-s75xwQFA.wasm`,import.meta.url).href,``+import.meta.url));let t=n();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:i}=await ie(await e,t);return re(r,i)}var oe=``+new URL(`runtime-core_bg-s75xwQFA.wasm`,import.meta.url).href;const k=`wasm-oj-v2`,se=Object.freeze({clangPins:`${k}/clang-pins`,clangLibcxxPch:`${k}/clang-libcxx-pch`,clangToolchain:`${k}/clang-toolchain`,compileBatch:`${k}/compile-batch`,compileTrace:`${k}/compile-trace`,conformance:`${k}/conformance`,conformanceEvidence:`${k}/conformance-evidence`,conformanceMatrix:`${k}/conformance-matrix`,cppDependencyLock:`${k}/cpp-dependency-lock`,dependencyLock:`${k}/dependency-lock`,dependencyOfflineBundle:`${k}/dependency-offline-bundle`,incrementalBuildGraph:`${k}/incremental-build-graph`,interactiveRequest:`${k}/interactive-request`,goToolchain:`${k}/go-toolchain`,objectCache:`${k}/object-cache`,pythonToolchain:`${k}/python-toolchain`,replayBundle:`${k}/replay-bundle`,rustToolchain:`${k}/rust-toolchain`,runRequest:`${k}/run-request`,runtimeBundle:`${k}/runtime-bundle`,runtimeCoreLicenses:`${k}/runtime-core-licenses`,thirdPartyComponents:`${k}/third-party-components`,wasmerSdkLicenses:`${k}/wasmer-sdk-licenses`,toolchainPackage:`${k}/toolchain-package`});Object.freeze({database:`${k}:storage`,databaseVersion:2,dependencyCache:`${k}:dependencies`,incrementalBuildCache:`${k}:incremental-build-cache`,runtimeFilesCache:`${k}:runtime-files`,toolchainCache:`${k}:toolchains`}),Object.freeze([`c`,`cpp`,`rust`,`python`,`javascript`,`typescript`,`go`]),Object.freeze([`cargo`,`npm`,`pypi`,`go`,`cpp`]);const A=`22.0.0-git20542-10`,ce=`wasm-oj/clang@${A}`,le=`/toolchains/clang-${A}.webc.gz.bin`,ue=`/toolchains/clang-${A}.cc1-pins.json`,de=`/toolchains/clang-${A}.manifest.json`,fe=`/toolchains/clang-${A}.libcxx-pch.json`,pe=`/toolchains/clang-${A}.cpp-debug.pch.gz.bin`,me=`/toolchains/clang-${A}.cpp-release.pch.gz.bin`,j=`7f10d90b8e52b270f04874641a1d0bf9e94e85b4f6c7573a774cebbc6d32552a`,he=`21ded33b9c6d4e1aaad5528c940bdaf6c3e84be77ea8f522f018ca7289a2a224`,M=`895eee17c63b1112c84adcc4ddbcb38e0c18e53bff15f50a8689b9b82d87b1ff`,N=`6382dcdfb6a2da49032a0e08da3b1fb490eb24432be85c3c12e3e871a5065273`,ge=Object.freeze({"cpp-debug":Object.freeze({path:pe,sha256:`c420c4643c48826643e75585d5bfdc281f11883d4bda28b283e3c706f3046b3a`,compressedSha256:`a3811351bae3289caf096f2d4bb6d2ee5db84b97e05514e87190d36b65c500cf`}),"cpp-release":Object.freeze({path:me,sha256:`c4b2132cc6d698e97dd1386431fdb54faaaf38b35b2528c7bc854f860d1f64b1`,compressedSha256:`ef004fc05ec50af697a37f7c9c814bf62e9676d0de162d6ac35305533939f93f`})}),P=`3.14.7`,_e=`a42c98f5f00582638c8e445440c506bbf94d5e55b3415d1f8d82d11c56cd4b56`,ve=`${`wasm-oj/cpython@${P}`}#sha256:${_e}`,ye=`/toolchains/python-${P}-wasip1.webc.gz.bin`,be=`/toolchains/python-${P}-wasip1.manifest.json`,xe=`10027f0e32c77dfa0ce1c413b6cb27307d6744fe5e18e6da8cea738bd020260c`,Se=`53a24b258363a8494af164121111a34b49c85fa0e054627fe131feba6f359cd5`,F=`0.15.1`,Ce=`wasm-oj/quickjs-ng@${F}`,we=`/toolchains/quickjs-${F}.wasm.gz.bin`,I=`dc6e02e8610269e61b341331661515616451cec929fd534fa96d1c4f47fbcc9a`,L=`7.0.2`,Te=`/toolchains/typescript-${L}.wasm.gz.bin`,R=`29c6ee0e46151e2644049ae96162b1b1d46dcb13310e2a928114bb9030c3ea92`,z=`1.91.1-dev`,Ee=`/toolchains/rust-${z}.webc.gz.bin`,De=`/toolchains/rust-${z}.manifest.json`,Oe=`cfbdadc67be1315e735aa55bdf8a5a0d00171982a023fefcf7ba586127753887`,ke=`765de8d68d03078e79f69f49dec0dcab1ff96fe3bbe5e9eafebb2ce61a39d3ee`,Ae=`d5bbdca994e61888679c5738cb9420649c0854ed0eb5d65468bc67d5d550bce1`,B=`1.26.5`,je=`/toolchains/go-${B}-wasip1.webc.gz.bin`,Me=`/toolchains/go-${B}-wasip1.manifest.json`,Ne=`/toolchains/go-${B}-wasip1.stdlib.gz.bin`,V=`70a7e359884b09b2e1a622d6ac5cd6e31c334aab519e6dd80dff5e040a9e09e4`,H=`c3a97934b6a83fefdea5c31f99141f70f76189eedc9ec0fa9ccd41302e50963b`,U=`5d784e9ca640b9525e84b598c0beb97ca110ae908568ca45f6441a441d99a262`,W=`aeffc384fdc624544f174ba5fc3c22395717fdbc3c4387d677d20855b6be80d8`,Pe=`e1ec64b08efd02b35b7ffdaf3970875aaae98325fa4795eafca94ebae2d0d192`,Fe=`9e557f5b86961fd604217d7521461c5d2b7322e383fa30dead5669b77db12201`,Ie=`2eefca10af935a307ab7946447146bd30e0ea0fb5460be54dc1c55844d155580`,Le=Object.freeze({[le]:j,[ue]:M,[de]:N,[fe]:`9bbe41d77c786f1c36169369c909268530b05726e1581683f6edd9a2983eebd0`,[pe]:ge[`cpp-debug`].compressedSha256,[me]:ge[`cpp-release`].compressedSha256,[ye]:xe,[be]:Se,[we]:I,[Te]:R,[Ee]:Oe,[De]:Ae,[je]:V,[Me]:U,[Ne]:W,"/toolchains/java-teavm-0.13.1.compiler.wasm":`8c37bce1c6fceeaffeffe93e10834309b67c8b6fb58c6f8a24547afe8be67f5d`,"/toolchains/java-teavm-0.13.1.compile-classlib.bin":`738a82b7d7e7ff8d98b07bb076785da7035847a166afb8446fd150c4efce6103`,"/toolchains/java-teavm-0.13.1.runtime-classlib.bin":`0ed234b66cdde19cb29e6c2865a3636d792d3cf72f102e73a7b3fdede80b79e6`});Object.freeze({c:Object.freeze([j,he,M,N]),cpp:Object.freeze([j,he,M,N]),rust:Object.freeze([Oe,ke,Ae]),python:Object.freeze([xe,_e,Se,`c1acac884af1c86833db5b65f8cc0a2304fce74dea0a05d9b40bde0a4e3e7c0e`]),javascript:Object.freeze([R,I]),typescript:Object.freeze([R,I]),go:Object.freeze([V,H,U,W,Pe,Fe,Ie])});function Re(e){let t=e.startsWith(`/`)?e:`/toolchains/${e}`,n=Le[t];if(!n)throw Error(`No pinned digest is declared for toolchain asset '${e}'.`);return n}function ze(e,t){let n=Re(e),r=new URL(t.href);r.pathname.endsWith(`/`)||(r.pathname+=`/`);let i=[...r.searchParams];r.search=``;let a=e.slice(e.lastIndexOf(`/`)+1),o=new URL(a,r);for(let[e,t]of i)o.searchParams.append(e,t);return o.searchParams.set(`sha256`,n),o}function G(e){return Object.freeze({...e,compilerPackages:Object.freeze([...e.compilerPackages]),targets:Object.freeze([...e.targets])})}Object.freeze({c:G({language:`c`,label:`Clang 22`,artifact:`wasm`,compilerPackages:[ce],targets:[`wasip1`,`wasix`],version:A,note:`Native wasip1 module via Clang and LLD; directly executable by WASI and WASIX runtimes.`}),cpp:G({language:`cpp`,label:`Clang++ 22 (C++20)`,artifact:`wasm`,compilerPackages:[ce],targets:[`wasip1`,`wasix`],version:A,note:`C++20/libc++ wasip1 module; directly executable by WASI and WASIX runtimes.`}),rust:G({language:`rust`,label:`Rust ${z}`,artifact:`wasm`,compilerPackages:[`rustc@${z}#sha256:${ke}`],targets:[`wasip1`],version:z,note:`Real rustc, its matching standard library, and a fresh deterministic wasm-ld stage execute as one pinned WebC under Wasmer.`}),python:G({language:`python`,label:`CPython ${P}`,artifact:`runtime-bundle`,compilerPackages:[ve],runtimePackage:ve,targets:[`wasip1`],version:P,note:`Python source files executed by the source-built CPython wasm32-wasip1 interpreter and standard library.`}),javascript:G({language:`javascript`,label:`QuickJS-ng`,artifact:`runtime-bundle`,compilerPackages:[`typescript@${L}-wasi`],runtimePackage:Ce,targets:[`wasip1`],version:F,note:`JavaScript checked by TypeScript/WASI, then executed by the bundled QuickJS-ng/WASI runtime.`}),typescript:G({language:`typescript`,label:`TypeScript + QuickJS-ng`,artifact:`runtime-bundle`,compilerPackages:[`typescript@${L}-wasi`],runtimePackage:Ce,targets:[`wasip1`],version:L,note:`The native TypeScript compiler and QuickJS-ng runtime both execute as local WASI modules.`}),go:G({language:`go`,label:`Go ${B}`,artifact:`wasm`,compilerPackages:[`go@${B}#sha256:${H}`],targets:[`wasip1`],version:B,note:`The standard Go compiler, linker, and pinned wasip1 standard library execute locally as one WebC under Wasmer.`})}),Object.freeze({c:`cpp`,cpp:`cpp`,rust:`cargo`,python:`pypi`,javascript:`npm`,typescript:`npm`,go:`go`});function Be(e){let t=[],n=/\bimport\s*\(([\s\S]*?)\)/g;for(let r of e.matchAll(n))for(let e of r[1].matchAll(/(?:^|\n)\s*(?:[._A-Za-z][A-Za-z0-9_]*\s+)?["`]([^"`]+)["`]/g))t.push(e[1]);let r=e.replace(n,``);for(let e of r.matchAll(/\bimport\s+(?:[._A-Za-z][A-Za-z0-9_]*\s+)?["`]([^"`]+)["`]/g))t.push(e[1]);return t}const Ve=`go${B.split(`.`).slice(0,2).join(`.`)}`,K=`/work/build/main.a`,He=`/work/build/app.wasm`,q=Object.freeze({version:B,target:`wasip1/wasm`,packageAsset:je,packageCompressedSha256:V,packageSha256:H,manifestAsset:Me,manifestSha256:U,standardLibraryAsset:Ne,standardLibraryCompressedSha256:W,standardLibrarySha256:Pe,compilerSha256:Fe,linkerSha256:Ie});function Ue(e){let t=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e)),n=J(t.compiler,`compiler`),r=J(t.linker,`linker`),i=J(t.output,`output`),a=J(t.standardLibrary,`standardLibrary`);if(t.schema!==se.goToolchain||t.version!==q.version||t.target!==q.target||n.command!==`go-compile`||n.sha256!==q.compilerSha256||r.command!==`go-link`||r.sha256!==q.linkerSha256||JSON.stringify(t.deterministicReplacements)!==JSON.stringify([`wasi_snapshot_preview1.random_get`,`wasi_snapshot_preview1.clock_time_get`,`wasi_snapshot_preview1.sock_accept`,`wasi_snapshot_preview1.sock_shutdown`])||t.filesystemMount!==null||i.sha256!==q.packageSha256||i.compressedSha256!==q.packageCompressedSha256||a.sha256!==q.standardLibrarySha256||a.compressedSha256!==q.standardLibraryCompressedSha256||a.format!==`WOJGO002`)throw Error(`Pinned Go toolchain manifest does not match the compiler contract.`);if(!Array.isArray(t.packages)||t.packages.length<200)throw Error(`Pinned Go toolchain manifest has an incomplete standard library.`);let o=``,s=t.packages.map(e=>{let t=J(e,`packages[]`);if(typeof t.importPath!=`string`||t.importPath<=o||typeof t.archivePath!=`string`||t.archivePath!==`/go/pkg/${t.importPath}.a`||typeof t.sha256!=`string`||!/^[a-f0-9]{64}$/.test(t.sha256))throw Error(`Pinned Go toolchain manifest contains a non-canonical package entry.`);return o=t.importPath,Object.freeze({importPath:t.importPath,archivePath:t.archivePath,sha256:t.sha256})});return Object.freeze({packages:Object.freeze(s)})}function We(e,t){let{dataOffset:n,entries:r}=Ge(e,t),i={"/go/VERSION":new TextEncoder().encode(`go${B}\n`)};for(let t of r)i[t.archivePath]=e.subarray(n+t.offset,n+t.offset+t.length);return i}function Ge(e,t){if(e.byteLength<12||new TextDecoder().decode(e.subarray(0,8))!==`WOJGO002`)throw Error(`Pinned Go standard library has an invalid format header.`);let n=12+new DataView(e.buffer,e.byteOffset+8,4).getUint32(0,!0);if(n>e.byteLength)throw Error(`Pinned Go standard-library index exceeds its archive.`);let r=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e.subarray(12,n)));if(!Array.isArray(r)||r.length!==t.length)throw Error(`Pinned Go standard-library index does not match the manifest.`);let i=[],a=0;for(let o=0;o<t.length;o+=1){let s=J(r[o],`standardLibrary[]`),c=t[o];if(s.importPath!==c.importPath||s.archivePath!==c.archivePath||s.sha256!==c.sha256||!Number.isSafeInteger(s.offset)||s.offset!==a||!Number.isSafeInteger(s.length)||s.length<=8||n+s.offset+s.length>e.byteLength)throw Error(`Pinned Go standard-library index contains a non-canonical archive entry.`);i.push(s),a+=s.length}if(n+a!==e.byteLength)throw Error(`Pinned Go standard library contains trailing or missing archive bytes.`);return{dataOffset:n,entries:Object.freeze(i)}}function Ke(e){let t=new TextEncoder;return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,typeof n==`string`?t.encode(n):n]))}function qe(e,t){let n=e.map(e=>`packagefile ${e.importPath}=${e.archivePath}`);return t&&n.push(`packagefile command-line-arguments=${K}`),`${n.join(`
|
|
2
|
-
`)}\n`}function Je(e,t,n){let r=new Map(t.map(e=>[e.importPath,e])),i=new Set(n.map(e=>e.importPath)),a=new Map,o=[],s=(e,t)=>{if(i.has(e))return;let n=r.get(e);if(!n)throw Error(`Go package '${t}' imports unlocked package '${e}'.`);let c=a.get(e);if(c!==`visited`){if(c===`visiting`)throw Error(`Go dependency import cycle contains '${e}'.`);a.set(e,`visiting`);for(let t of n.imports)s(t,e);a.set(e,`visited`),o.push(n)}};for(let t of e.filter(e=>e.path.endsWith(`.go`)))for(let e of Be(t.content))s(e,`main`);return o}function Ye(e,t){return[`-o`,e.archivePath,`-p`,e.importPath,`-lang`,Ve,`-complete`,`-buildid=wasm_oj_dependency_${e.importPath}`,`-c=1`,`-dwarf=false`,`-trimpath`,`/work=.`,`-importcfg`,`/work/importcfg`,`-pack`,...t===`debug`?[`-N`,`-l`]:[],...e.sourcePaths.map(e=>`/work/${e}`)]}function Xe(e,t){let n=e.filter(e=>e.path.endsWith(`.go`)).map(e=>`/work/${e.path}`).sort();if(n.length===0)throw Error(`A Go project must contain at least one .go source file.`);return[`-o`,K,`-p`,`main`,`-lang`,Ve,`-complete`,`-buildid=wasm_oj_submission`,`-c=1`,`-dwarf=false`,`-trimpath`,`/work=.`,`-importcfg`,`/work/importcfg`,`-pack`,...t===`debug`?[`-N`,`-l`]:[],...n]}function Ze(e){return[`-o`,He,`-importcfg`,`/work/importcfg.link`,`-buildmode=exe`,`-buildid=`,...e===`release`?[`-s`,`-w`]:[],K]}function Qe(){return{GOOS:`wasip1`,GOARCH:`wasm`,GOROOT:`/go`,GOENV:`off`,GOTOOLCHAIN:`local`,PWD:`/work`,SOURCE_DATE_EPOCH:`946684800`,TZ:`UTC`,LC_ALL:`C`}}function J(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Pinned Go toolchain manifest '${t}' field must be an object.`);return e}function $e(e){return e.replace(/^file:\/\//,``).replace(/^\/?(?:workspace|project|work)\//,``).replace(/^\.\//,``)}function et(e){let t=[],n=/^(.*?\.go):(\d+)(?::(\d+))?:\s*(.+)$/gm,r;for(;(r=n.exec(e))!==null;)t.push({severity:`error`,message:r[4],file:$e(r[1]),line:Number(r[2]),column:Number(r[3]??1),source:`go`});return t}Object.freeze({files:256,bytesPerFile:4194304,totalBytes:16777216}),new TextEncoder;async function tt(e){let t=typeof e==`string`?new TextEncoder().encode(e):e,n=new Uint8Array(t.byteLength);n.set(t);let r=await crypto.subtle.digest(`SHA-256`,n);return Array.from(new Uint8Array(r),e=>e.toString(16).padStart(2,`0`)).join(``)}const Y=1048576,nt=Object.freeze({requirements:128,sourceFiles:128,sourceTextBytes:8*Y,hosts:32,roots:512,packages:512,referencesPerPackage:512,concurrency:16,metadataBytes:8*Y,packageBytes:256*Y,totalDownloadBytes:512*Y,archiveFiles:16384,unpackedBytes:512*Y});Object.freeze({packages:nt.packages,filesPerPackage:nt.archiveFiles,bytesPerFile:64*Y,totalBytes:nt.unpackedBytes});const rt=new TextEncoder;var it=class e{digest;binding;generation=0;files=new Map;inFlight=!1;disposed=!1;static hydrate(t,n){lt(n.digest);let r=new t(n);if(r.digest!==n.digest||r.generation!==0)throw r.free(),Error(`The runtime-core Go session did not bind the admitted toolchain digest at generation zero.`);return new e(n.digest,r)}constructor(e,t){this.digest=e,this.binding=t}async compile(e,t){if(this.disposed)throw Error(`The browser Go compiler session is disposed.`);if(this.inFlight)throw Error(`The browser Go compiler session accepts one build at a time.`);if(this.generation>=4294967295)throw Error(`The browser Go compiler session generation is exhausted.`);let n=at(e),r={};for(let[e,t]of n){let n=this.files.get(e);(n===void 0||!ct(n,t))&&(r[e]=t)}let i=[...this.files.keys()].filter(e=>!n.has(e)).sort(ot),a=this.generation+1;this.inFlight=!0;try{let e=await this.binding.compilePipeline({digest:this.digest,sourceDelta:{generation:a,upsertFiles:r,removePaths:i},stages:t.map(st)});if(e.digest!==this.digest||e.generation!==a||this.binding.digest!==this.digest||this.binding.generation!==a)throw Error(`The runtime-core Go session returned a stale or mismatched generation.`);if(!ut(e.response))throw Error(`The runtime-core Go session returned an invalid compiler response.`);return this.files=n,this.generation=a,e.response}finally{this.inFlight=!1}}dispose(){if(!this.disposed){if(this.inFlight)throw Error(`The browser Go compiler session cannot be disposed during a build.`);this.disposed=!0,this.files.clear(),this.binding.free()}}};function at(e){return new Map(Object.entries(e).sort(([e],[t])=>ot(e,t)).map(([e,t])=>[e,Uint8Array.from(t)]))}function ot(e,t){let n=rt.encode(e),r=rt.encode(t),i=Math.min(n.byteLength,r.byteLength);for(let e=0;e<i;e+=1)if(n[e]!==r[e])return n[e]-r[e];return n.byteLength-r.byteLength}function st(e){return{command:e.command,args:[...e.args],env:{...e.env},stdin:e.stdin,files:{...e.files},cwd:e.cwd,outputPaths:[...e.outputPaths],outputLimitBytes:e.outputLimitBytes}}function ct(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n+=1)if(e[n]!==t[n])return!1;return!0}function lt(e){if(!/^[a-f0-9]{64}$/.test(e))throw Error(`The browser Go compiler session digest must be a lowercase SHA-256.`)}function ut(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.ok==`boolean`?t.ok?Object.hasOwn(t,`result`)&&t.error===void 0:t.result===void 0&&typeof t.error==`object`&&t.error!==null&&typeof t.error.code==`string`&&typeof t.error.message==`string`:!1}function dt(){let e=globalThis.location?.href;if(e){let t=new URL(e);if(t.protocol===`http:`||t.protocol===`https:`)return t;if(t.protocol!==`blob:`)throw Error(`A module Worker requires an HTTP(S) browser base URL.`)}let t=globalThis.__wasmOjModuleWorkerBaseUrl;if(typeof t!=`string`)throw Error(`A module Worker requires a browser base URL.`);let n=new URL(t);if(n.origin===`null`||n.protocol!==`http:`&&n.protocol!==`https:`)throw Error(`A module Worker requires an HTTP(S) browser base URL.`);return n}const X=self,ft=dt();let pt=Promise.resolve(),mt,Z,Q;X.addEventListener(`message`,e=>{pt=pt.then(()=>gt(e.data),()=>gt(e.data))});async function ht(e){let t=new URL(e.assetBaseUrl,ft);t.pathname.endsWith(`/`)||(t.pathname+=`/`);let n=await _t(t),r=Je(e.request.files,e.request.dependencies??[],n.manifest.packages),i=[...n.manifest.packages,...r.map(e=>({importPath:e.importPath,archivePath:e.archivePath}))],a=Ke({...Object.fromEntries(e.request.files.map(e=>[`/work/${e.path}`,e.content])),...Object.fromEntries((e.request.dependencyFiles??[]).map(e=>[`/work/${e.path}`,e.content])),"/work/importcfg":qe(i,!1),"/work/importcfg.link":qe(i,!0)}),o={env:Qe(),stdin:new Uint8Array,files:{},cwd:`/work`,outputLimitBytes:33554432},s=[...r.map(t=>({...o,command:`go-compile`,args:Ye(t,e.request.optimization),outputPaths:[t.archivePath]})),{...o,command:`go-compile`,args:Xe(e.request.files,e.request.optimization),outputPaths:[K]},{...o,command:`go-link`,args:Ze(e.request.optimization),outputPaths:[He]}],c=await n.session.compile(a,s);if(!c.ok||!c.result)throw Error(c.error?.message??`The WASM-OJ Go compiler pipeline failed.`);let l=new TextDecoder,ee=c.result.stages.map(e=>l.decode(e.stdout)).join(``),u=c.result.stages.map(e=>l.decode(e.stderr)).join(``),d=c.result.stages.at(-1),f=d?.code===0?d.outputFiles[He]:void 0,te=f!==void 0&&WebAssembly.validate(Uint8Array.from(f));return{success:c.result.stages.length===r.length+2&&c.result.stages.every(e=>e.code===0)&&te,wasm:f,stdout:ee,stderr:u,diagnostics:et(u)}}async function gt(e){try{if(e.type===`shutdown`){Z?.session.dispose(),Z=void 0,mt=void 0,Q=void 0,X.postMessage({type:`shutdown-complete`}),X.close();return}let t=await ht(e);X.postMessage({type:`result`,result:t},t.wasm?[t.wasm.buffer]:[])}catch(e){let t=e instanceof Error?e:Error(String(e));X.postMessage({type:`error`,message:t.message,stack:t.stack})}}function _t(e){if(Q!==void 0&&Q!==e.href)throw Error(`The persistent Go stage cannot change its toolchain asset base URL.`);return Q=e.href,mt??=vt(e),mt}async function vt(t){let[,n,r,i]=await Promise.all([ae({module_or_path:new URL(oe,ft)}),yt(t),bt(t),xt(t)]),a={manifest:r,session:it.hydrate(e,{digest:q.manifestSha256,toolchain:{package:n,memoryLimitBytes:536870912},standardLibraryFiles:We(i,r.packages)})};return Z=a,a}async function yt(e){let t=await St(await Ct(e,q.packageAsset,q.packageCompressedSha256),`Go WebC`);return await $(`decompressed Go WebC`,t,q.packageSha256),t}async function bt(e){return Ue(await wt(e,q.manifestAsset,q.manifestSha256))}async function xt(e){let t=await St(await Ct(e,q.standardLibraryAsset,q.standardLibraryCompressedSha256),`Go standard library`);return await $(`decompressed Go standard library`,t,q.standardLibrarySha256),t}async function St(e,t){let n=e.body;if(!n)throw Error(`Pinned ${t} response has no body.`);return new Uint8Array(await new Response(n.pipeThrough(new DecompressionStream(`gzip`))).arrayBuffer())}async function Ct(e,t,n){let r=await fetch(ze(t,e));if(!r.ok)throw Error(`Unable to load pinned Go toolchain asset '${t}' (${r.status}).`);return await $(t,new Uint8Array(await r.clone().arrayBuffer()),n),r}async function wt(e,t,n){let r=await fetch(ze(t,e));if(!r.ok)throw Error(`Unable to load pinned Go toolchain asset '${t}' (${r.status}).`);let i=new Uint8Array(await r.arrayBuffer());return await $(t,i,n),i}async function $(e,t,n){let r=await tt(t);if(r!==n)throw Error(`Pinned Go toolchain asset '${e}' has digest ${r}; expected ${n}.`)}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @wasmer/sdk
|
|
3
|
-
* Wasmer Javascript SDK. It allows interacting with Wasmer Packages in Node.js and the Browser.
|
|
4
|
-
*
|
|
5
|
-
* @version v0.8.0
|
|
6
|
-
* @author Wasmer Engineering Team <engineering@wasmer.io>
|
|
7
|
-
* @homepage https://github.com/wasmerio/wasmer-js
|
|
8
|
-
* @repository git+https://github.com/wasmerio/wasmer-js.git
|
|
9
|
-
* @license MIT
|
|
10
|
-
*/
|
|
11
|
-
let e,t=null;function n(){return t!==null&&t.buffer===e.memory.buffer||(t=new Uint8Array(e.memory.buffer)),t}let r=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&r.decode();let i=0;function a(e,t){return function(e,t){return i+=t,i>=2146435072&&(r=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}},r.decode(),i=t),r.decode(n().slice(e,e+t))}(e>>>=0,t)}let o=0;const s=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}};function c(e,t,r){if(r===void 0){let r=s.encode(e),i=t(r.length,1)>>>0;return n().subarray(i,i+r.length).set(r),o=r.length,i}let i=e.length,a=t(i,1)>>>0,c=n(),l=0;for(;l<i;l++){let t=e.charCodeAt(l);if(t>127)break;c[a+l]=t}if(l!==i){l!==0&&(e=e.slice(l)),a=r(a,i,i=l+3*e.length,1)>>>0;let t=function(e,t){let n=s.encode(e);return t.set(n),{read:e.length,written:n.length}}(e,n().subarray(a+l,a+i));l+=t.written,a=r(a,i,l,1)>>>0}return o=l,a}let l=null;function u(){return l!==null&&l.buffer===e.memory.buffer||(l=new DataView(e.memory.buffer)),l}function d(e){return e==null}function f(t){let n=e.__externref_table_alloc();return e.__wbindgen_export_5.set(n,t),n}function p(t,n){try{return t.apply(this,n)}catch(t){let n=f(t);e.__wbindgen_exn_store(n)}}function m(e,t){return e>>>=0,n().subarray(e/1,e/1+t)}const h=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>{e.__wbindgen_export_6.get(t.dtor)(t.a,t.b)}));function g(t,n,r,i){let a={a:t,b:n,cnt:1,dtor:r},o=(...t)=>{a.cnt++;let n=a.a;a.a=0;try{return i(n,a.b,...t)}finally{--a.cnt==0?(e.__wbindgen_export_6.get(a.dtor)(n,a.b),h.unregister(a)):a.a=n}};return o.original=a,h.register(o,a,a),o}function ee(t,n,r,i){let a={a:t,b:n,cnt:1,dtor:r},o=(...t)=>{a.cnt++;try{return i(a.a,a.b,...t)}finally{--a.cnt==0&&(e.__wbindgen_export_6.get(a.dtor)(a.a,a.b),a.a=0,h.unregister(a))}};return o.original=a,h.register(o,a,a),o}function _(e){let t=typeof e;if(t==`number`||t==`boolean`||e==null)return`${e}`;if(t==`string`)return`"${e}"`;if(t==`symbol`){let t=e.description;return t==null?`Symbol`:`Symbol(${t})`}if(t==`function`){let t=e.name;return typeof t==`string`&&t.length>0?`Function(${t})`:`Function`}if(Array.isArray(e)){let t=e.length,n=`[`;t>0&&(n+=_(e[0]));for(let r=1;r<t;r++)n+=`, `+_(e[r]);return n+=`]`,n}let n=/\[object ([^\]]+)\]/.exec(toString.call(e)),r;if(!(n&&n.length>1))return toString.call(e);if(r=n[1],r==`Object`)try{return`Object(`+JSON.stringify(e)+`)`}catch{return`Object`}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function v(t){let n=e.__wbindgen_export_5.get(t);return e.__externref_table_dealloc(t),n}function y(e,t){if(!(e instanceof t))throw Error(`expected instance of ${t.name}`)}function te(t){e.setSDKUrl(t)}function ne(t){e.setWorkerUrl(t)}function re(t){var n=d(t)?0:c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;let i=e.initializeLogger(n,r);if(i[1])throw v(i[0])}function b(t,n,r){e.closure542_externref_shim(t,n,r)}function ie(t,n,r){return e.closure752_externref_shim(t,n,r)}function ae(t,n){return e.closure751_externref_shim(t,n)}function oe(t,n,r){let i=e.closure1343_externref_shim_multivalue_shim(t,n,r);if(i[2])throw v(i[1]);return v(i[0])}function se(t,n,r){let i=e.closure1346_externref_shim_multivalue_shim(t,n,r);if(i[1])throw v(i[0])}const ce=[`blob`,`arraybuffer`],le=[`omit`,`same-origin`,`include`],ue=[`same-origin`,`no-cors`,`cors`,`navigate`],de=[`classic`,`module`];typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_atom_free(t>>>0,1)));const fe=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_command_free(t>>>0,1)));var pe=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,fe.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,fe.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_command_free(t,0)}get name(){return e.__wbg_get_command_name(this.__wbg_ptr)}set name(t){e.__wbg_set_command_name(this.__wbg_ptr,t)}run(t){return e.command_run(this.__wbg_ptr,d(t)?0:f(t))}binary(){return e.command_binary(this.__wbg_ptr)}};const me=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_deployedapp_free(t>>>0,1)));var he=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,me.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,me.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_deployedapp_free(t,0)}get id(){let t,n;try{let r=e.__wbg_get_deployedapp_id(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set id(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_id(this.__wbg_ptr,n,r)}get created_at(){let t,n;try{let r=e.__wbg_get_deployedapp_created_at(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set created_at(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_created_at(this.__wbg_ptr,n,r)}get version(){let t,n;try{let r=e.__wbg_get_deployedapp_version(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set version(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_version(this.__wbg_ptr,n,r)}get description(){let t=e.__wbg_get_deployedapp_description(this.__wbg_ptr),n;return t[0]!==0&&(n=a(t[0],t[1]).slice(),e.canonical_abi_free(t[0],1*t[1],1)),n}set description(t){var n=d(t)?0:c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_description(this.__wbg_ptr,n,r)}get yaml_config(){let t,n;try{let r=e.__wbg_get_deployedapp_yaml_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set yaml_config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_yaml_config(this.__wbg_ptr,n,r)}get user_yaml_config(){let t,n;try{let r=e.__wbg_get_deployedapp_user_yaml_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set user_yaml_config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_user_yaml_config(this.__wbg_ptr,n,r)}get config(){let t,n;try{let r=e.__wbg_get_deployedapp_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_config(this.__wbg_ptr,n,r)}get json_config(){let t,n;try{let r=e.__wbg_get_deployedapp_json_config(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set json_config(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_json_config(this.__wbg_ptr,n,r)}get url(){let t,n;try{let r=e.__wbg_get_deployedapp_url(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set url(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_url(this.__wbg_ptr,n,r)}get app_id(){let t=e.__wbg_get_deployedapp_app_id(this.__wbg_ptr),n;return t[0]!==0&&(n=a(t[0],t[1]).slice(),e.canonical_abi_free(t[0],1*t[1],1)),n}set app_id(t){var n=d(t)?0:c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_app_id(this.__wbg_ptr,n,r)}};const ge=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_directory_free(t>>>0,1)));var _e=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ge.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_directory_free(t,0)}__getClassname(){let t,n;try{let r=e.directory___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}constructor(t){let n=e.directory_new(d(t)?0:f(t));if(n[2])throw v(n[1]);return this.__wbg_ptr=n[0]>>>0,ge.register(this,this.__wbg_ptr,this),this}readDir(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;return e.directory_readDir(this.__wbg_ptr,n,r)}writeFile(t,n){let r=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;return e.directory_writeFile(this.__wbg_ptr,r,i,n)}readFile(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;return e.directory_readFile(this.__wbg_ptr,n,r)}readTextFile(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;return e.directory_readTextFile(this.__wbg_ptr,n,r)}createDir(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;return e.directory_createDir(this.__wbg_ptr,n,r)}removeDir(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;return e.directory_removeDir(this.__wbg_ptr,n,r)}removeFile(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;return e.directory_removeFile(this.__wbg_ptr,n,r)}};const ve=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_instance_free(t>>>0,1)));var ye=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,ve.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ve.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_instance_free(t,0)}get stdin(){return e.__wbg_get_instance_stdin(this.__wbg_ptr)}get stdout(){return e.__wbg_get_instance_stdout(this.__wbg_ptr)}get stderr(){return e.__wbg_get_instance_stderr(this.__wbg_ptr)}wait(){let t=this.__destroy_into_raw();return e.instance_wait(t)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_intounderlyingbytesource_free(t>>>0,1))),typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_intounderlyingsink_free(t>>>0,1))),typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_intounderlyingsource_free(t>>>0,1)));const be=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_publishpackageoutput_free(t>>>0,1)));var xe=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,be.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,be.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_publishpackageoutput_free(t,0)}get manifest(){return e.__wbg_get_publishpackageoutput_manifest(this.__wbg_ptr)}set manifest(t){e.__wbg_set_publishpackageoutput_manifest(this.__wbg_ptr,t)}get hash(){let t,n;try{let r=e.__wbg_get_publishpackageoutput_hash(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set hash(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_id(this.__wbg_ptr,n,r)}};const Se=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_readablestreamsource_free(t>>>0,1)));var Ce=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Se.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Se.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_readablestreamsource_free(t,0)}pull(t){return e.readablestreamsource_pull(this.__wbg_ptr,t)}cancel(){e.readablestreamsource_cancel(this.__wbg_ptr)}get type(){return e.readablestreamsource_type(this.__wbg_ptr)}};const x=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_runtime_free(t>>>0,1)));var we=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,x.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,x.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_runtime_free(t,0)}__getClassname(){let t,n;try{let r=e.runtime___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}constructor(t){let n=e.runtime_js_new(d(t)?0:f(t));if(n[2])throw v(n[1]);return this.__wbg_ptr=n[0]>>>0,x.register(this,this.__wbg_ptr,this),this}static global(n){let r=e.runtime_global(d(n)?16777215:+!!n);if(r[2])throw v(r[1]);return r[0]===0?void 0:t.__wrap(r[0])}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_threadpoolworker_free(t>>>0,1)));const Te=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_trap_free(t>>>0,1)));var Ee=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Te.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Te.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_trap_free(t,0)}static __wbg_wasmer_trap(){e.trap___wbg_wasmer_trap()}};const De=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_user_free(t>>>0,1)));var Oe=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,De.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,De.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_user_free(t,0)}get id(){let t,n;try{let r=e.__wbg_get_user_id(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set id(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_id(this.__wbg_ptr,n,r)}get username(){let t,n;try{let r=e.__wbg_get_user_username(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set username(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_deployedapp_created_at(this.__wbg_ptr,n,r)}};const ke=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_userpackagedefinition_free(t>>>0,1)));var S=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,ke.register(n,n.__wbg_ptr,n),n}static __unwrap(e){return e instanceof t?e.__destroy_into_raw():0}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ke.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_userpackagedefinition_free(t,0)}__getClassname(){let t,n;try{let r=e.userpackagedefinition___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}get hash(){let t,n;try{let r=e.__wbg_get_userpackagedefinition_hash(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}set hash(t){let n=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;e.__wbg_set_userpackagedefinition_hash(this.__wbg_ptr,n,r)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_volume_free(t>>>0,1)));const Ae=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_wasmer_free(t>>>0,1)));var je=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Ae.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ae.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_wasmer_free(t,0)}static createPackage(t){return e.wasmer_createPackage(t)}static publishPackage(n){return y(n,t),e.wasmer_publishPackage(n.__wbg_ptr)}static whoami(){return e.wasmer_whoami()}__getClassname(){let t,n;try{let r=e.wasmer___getClassname(this.__wbg_ptr);return t=r[0],n=r[1],a(r[0],r[1])}finally{e.canonical_abi_free(t,n,1)}}get entrypoint(){let t=e.__wbg_get_wasmer_entrypoint(this.__wbg_ptr);return t===0?void 0:pe.__wrap(t)}set entrypoint(t){let n=0;d(t)||(y(t,pe),n=t.__destroy_into_raw()),e.__wbg_set_wasmer_entrypoint(this.__wbg_ptr,n)}get commands(){return e.__wbg_get_wasmer_commands(this.__wbg_ptr)}set commands(t){e.__wbg_set_wasmer_commands(this.__wbg_ptr,t)}get pkg(){let t=e.__wbg_get_wasmer_pkg(this.__wbg_ptr);return t===0?void 0:S.__wrap(t)}set pkg(t){let n=0;d(t)||(y(t,S),n=t.__destroy_into_raw()),e.__wbg_set_wasmer_pkg(this.__wbg_ptr,n)}static fromRegistry(t,n){let r=c(t,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;return e.wasmer_fromRegistry(r,i,d(n)?0:f(n))}static fromFile(t,n){return e.wasmer_fromFile(t,d(n)?0:f(n))}static fromWasm(n,r){let i=e.wasmer_fromWasm(n,d(r)?0:f(r));if(i[2])throw v(i[1]);return t.__wrap(i[0])}static deployApp(t){return e.wasmer_deployApp(t)}static deleteApp(t){return e.wasmer_deleteApp(t)}};typeof FinalizationRegistry>`u`||new FinalizationRegistry((t=>e.__wbg_wasmerpackage_free(t>>>0,1)));const Me=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>e.__wbg_writablestreamsink_free(t>>>0,1)));var Ne=class t{static __wrap(e){e>>>=0;let n=Object.create(t.prototype);return n.__wbg_ptr=e,Me.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Me.unregister(this),e}free(){let t=this.__destroy_into_raw();e.__wbg_writablestreamsink_free(t,0)}close(){return e.writablestreamsink_close(this.__wbg_ptr)}abort(t){e.writablestreamsink_abort(this.__wbg_ptr,t)}write(t){return e.writablestreamsink_write(this.__wbg_ptr,t)}};const Pe=new Set([`basic`,`cors`,`default`]);function Fe(){let t={wbg:{}};return t.wbg.__wbg_BigInt_6e3a01c3311ee796=function(e){return BigInt(e)},t.wbg.__wbg_Error_0497d5bdba9362e5=function(e,t){return Error(a(e,t))},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,n){let r=c(String(n),e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_abort_18ba44d46e13d7fe=function(e){e.abort()},t.wbg.__wbg_apiKey_136c64a1dd577ea4=function(t,n){let r=n.apiKey;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_append_0342728346e47425=function(){return p((function(e,t,n,r,i){e.append(a(t,n),a(r,i))}),arguments)},t.wbg.__wbg_apply_8745fdcf855d21f5=function(){return p((function(e,t,n){return e.apply(t,n)}),arguments)},t.wbg.__wbg_apply_d49e9c0472b015cc=function(){return p((function(e,t,n){return Reflect.apply(e,t,n)}),arguments)},t.wbg.__wbg_args_ce3906bca5fd2b6f=function(e){let t=e.args;return d(t)?0:f(t)},t.wbg.__wbg_arrayBuffer_d58b858456021d7f=function(){return p((function(e){return e.arrayBuffer()}),arguments)},t.wbg.__wbg_assert_83d6354717cc805b=function(e,t){console.assert(e!==0,t)},t.wbg.__wbg_async_89f8ca583cefeb81=function(e){return e.async},t.wbg.__wbg_bind_1e748fe02d440d48=function(e,t,n){return e.bind(t,n)},t.wbg.__wbg_bind_d075481af636a524=function(e,t,n,r){return e.bind(t,n,r)},t.wbg.__wbg_buffer_a1a27a0dfa70165d=function(e){return e.buffer},t.wbg.__wbg_buffer_e495ba54cee589cc=function(e){return e.buffer},t.wbg.__wbg_byobRequest_56aa768ee4dfed17=function(e){let t=e.byobRequest;return d(t)?0:f(t)},t.wbg.__wbg_byteLength_937f8a52f9697148=function(e){return e.byteLength},t.wbg.__wbg_byteLength_bf6d30ef92bae19b=function(e){return e.byteLength},t.wbg.__wbg_byteOffset_4d94b7170e641898=function(e){return e.byteOffset},t.wbg.__wbg_call_f2db6205e5c51dc8=function(){return p((function(e,t,n){return e.call(t,n)}),arguments)},t.wbg.__wbg_call_fbe8be8bf6436ce5=function(){return p((function(e,t){return e.call(t)}),arguments)},t.wbg.__wbg_close_290fb040af98d3ac=function(){return p((function(e){e.close()}),arguments)},t.wbg.__wbg_close_b2641ef0870e518c=function(){return p((function(e){e.close()}),arguments)},t.wbg.__wbg_close_f203332f9561bf29=function(e){return e.close()},t.wbg.__wbg_colno_1fbc9165b6cd1b26=function(e){return e.colno},t.wbg.__wbg_command_new=function(e){return pe.__wrap(e)},t.wbg.__wbg_constructor_1a4f07ad72d5cac3=function(e){return e.constructor},t.wbg.__wbg_createObjectURL_1acd82bf8749f5a9=function(){return p((function(t,n){let r=c(URL.createObjectURL(n),e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)}),arguments)},t.wbg.__wbg_crypto_ed58b8e10a292839=function(e){return e.crypto},t.wbg.__wbg_customSections_3a8a19674e217d36=function(e,t,n){return WebAssembly.Module.customSections(e,a(t,n))},t.wbg.__wbg_cwd_13b069cde8a90c68=function(t,n){let r=n.cwd;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_data_fffd43bf0ca75fff=function(e){return e.data},t.wbg.__wbg_defineProperty_6a428a581612fed4=function(e,t,n){return Object.defineProperty(e,t,n)},t.wbg.__wbg_deleteProperty_ec71c2c829351683=function(){return p((function(e,t){return Reflect.deleteProperty(e,t)}),arguments)},t.wbg.__wbg_deployedapp_new=function(e){return he.__wrap(e)},t.wbg.__wbg_desiredSize_dd7689d8aa7da7dd=function(e,t){let n=t.desiredSize;u().setFloat64(e+8,d(n)?0:n,!0),u().setInt32(e+0,!d(n),!0)},t.wbg.__wbg_done_4d01f352bade43b7=function(e){return e.done},t.wbg.__wbg_enqueue_a62faa171c4fd287=function(){return p((function(e,t){e.enqueue(t)}),arguments)},t.wbg.__wbg_entries_41651c850143b957=function(e){return Object.entries(e)},t.wbg.__wbg_env_6b7462d491e7d2ae=function(e){return e.env},t.wbg.__wbg_error_1950bd19b566135e=function(e,t){e.error(t)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,n){let r,i;try{r=t,i=n,console.error(a(t,n))}finally{e.canonical_abi_free(r,i,1)}},t.wbg.__wbg_exports_5cb55953fb23c405=function(e){return e.exports},t.wbg.__wbg_exports_93f662ec1dd2b1e2=function(e){return WebAssembly.Module.exports(e)},t.wbg.__wbg_fetch_03b6c973bb6da9b8=function(e){return fetch(e)},t.wbg.__wbg_fetch_6e679fcfa9759479=function(e,t){return e.fetch(t)},t.wbg.__wbg_fetch_a8e43a4e138dfc93=function(e,t){return e.fetch(t)},t.wbg.__wbg_filename_5c8881452d91f4fd=function(t,n){let r=c(n.filename,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_for_555902b1a859c603=function(e,t){return Symbol.for(a(e,t))},t.wbg.__wbg_from_12ff8e47307bd4c7=function(e){return Array.from(e)},t.wbg.__wbg_getPrototypeOf_a1794d62c12daab4=function(){return p((function(e){return Reflect.getPrototypeOf(e)}),arguments)},t.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return p((function(e,t){e.getRandomValues(t)}),arguments)},t.wbg.__wbg_getTime_2afe67905d873e92=function(e){return e.getTime()},t.wbg.__wbg_getTimezoneOffset_31f33c0868da345e=function(e){return e.getTimezoneOffset()},t.wbg.__wbg_get_92470be87867c2e5=function(){return p((function(e,t){return Reflect.get(e,t)}),arguments)},t.wbg.__wbg_get_a131a44bd1eb6979=function(e,t){return e[t>>>0]},t.wbg.__wbg_get_be8d302ec5bf8863=function(){return p((function(e,t){return e.get(t>>>0)}),arguments)},t.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,t){return e[t]},t.wbg.__wbg_grow_0a942972adfcde67=function(){return p((function(e,t){return e.grow(t>>>0)}),arguments)},t.wbg.__wbg_grow_ae9c73e837b2d936=function(e,t){return e.grow(t>>>0)},t.wbg.__wbg_grow_d034989fce14cc8e=function(){return p((function(e,t){return e.grow(t>>>0)}),arguments)},t.wbg.__wbg_hardwareConcurrency_10d7194b406e56d2=function(e){return e.hardwareConcurrency},t.wbg.__wbg_hardwareConcurrency_fd778a5fdf975150=function(e){return e.hardwareConcurrency},t.wbg.__wbg_has_809e438ee9d787a7=function(){return p((function(e,t){return Reflect.has(e,t)}),arguments)},t.wbg.__wbg_headers_0f0cbdc6290b6780=function(e){return e.headers},t.wbg.__wbg_headers_67fbc7839fe933b3=function(e){return e.headers},t.wbg.__wbg_imports_1f5c972c2e57dfb5=function(e){return WebAssembly.Module.imports(e)},t.wbg.__wbg_instance_new=function(e){return ye.__wrap(e)},t.wbg.__wbg_instanceof_ArrayBuffer_a8b6f580b363f2bc=function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},t.wbg.__wbg_instanceof_Blob_2688511ca2a71508=function(e){let t;try{t=e instanceof Blob}catch{t=!1}return t},t.wbg.__wbg_instanceof_Date_ef7e3d6f544a9d16=function(e){let t;try{t=e instanceof Date}catch{t=!1}return t},t.wbg.__wbg_instanceof_Error_58a92d81483a4b16=function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},t.wbg.__wbg_instanceof_Function_4de5a228b53c20c3=function(e){let t;try{t=e instanceof Function}catch{t=!1}return t},t.wbg.__wbg_instanceof_Global_d43eb3e1373e574d=function(e){let t;try{t=e instanceof WebAssembly.Global}catch{t=!1}return t},t.wbg.__wbg_instanceof_Map_80cc65041c96417a=function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},t.wbg.__wbg_instanceof_Memory_613951003465ef5c=function(e){let t;try{t=e instanceof WebAssembly.Memory}catch{t=!1}return t},t.wbg.__wbg_instanceof_Module_ac6579472cc013d8=function(e){let t;try{t=e instanceof WebAssembly.Module}catch{t=!1}return t},t.wbg.__wbg_instanceof_Object_9a05796038b7a8f6=function(e){let t;try{t=e instanceof Object}catch{t=!1}return t},t.wbg.__wbg_instanceof_RangeError_67b19cb7651a2151=function(e){let t;try{t=e instanceof RangeError}catch{t=!1}return t},t.wbg.__wbg_instanceof_Response_e80ce8b7a2b968d2=function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},t.wbg.__wbg_instanceof_Table_a5fae5b77c0e21e8=function(e){let t;try{t=e instanceof WebAssembly.Table}catch{t=!1}return t},t.wbg.__wbg_instanceof_Tag_ff306496211677da=function(e){let t;try{t=e instanceof WebAssembly.Tag}catch{t=!1}return t},t.wbg.__wbg_instanceof_TypeError_16d245a01d4dd626=function(e){let t;try{t=e instanceof TypeError}catch{t=!1}return t},t.wbg.__wbg_instanceof_Uint8Array_ca460677bc155827=function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},t.wbg.__wbg_instanceof_Window_68f3f67bad1729c1=function(e){let t;try{t=e instanceof Window}catch{t=!1}return t},t.wbg.__wbg_instanceof_WorkerGlobalScope_11f8a14c11024785=function(e){let t;try{t=e instanceof WorkerGlobalScope}catch{t=!1}return t},t.wbg.__wbg_isArray_2a07fd175d45c496=function(e){return Array.isArray(e)},t.wbg.__wbg_isArray_5f090bed72bd4f89=function(e){return Array.isArray(e)},t.wbg.__wbg_isSafeInteger_90d7c4674047d684=function(e){return Number.isSafeInteger(e)},t.wbg.__wbg_is_49ee71a294f7d2fe=function(e,t){return Object.is(e,t)},t.wbg.__wbg_iterator_4068add5b2aef7a6=function(){return Symbol.iterator},t.wbg.__wbg_keys_42062809bf87339e=function(e){return Object.keys(e)},t.wbg.__wbg_length_865e6e8de4a8c6cb=function(e){return e.length},t.wbg.__wbg_length_ab6d22b5ead75c72=function(e){return e.length},t.wbg.__wbg_length_f00ec12454a5d9fd=function(e){return e.length},t.wbg.__wbg_lineno_9fe2a23a82cebd53=function(e){return e.lineno},t.wbg.__wbg_locked_c5cc88823268db66=function(e){return e.locked},t.wbg.__wbg_log_ea240990d83e374e=function(e){console.log(e)},t.wbg.__wbg_message_4159c15dac08c5e9=function(e){return e.message},t.wbg.__wbg_message_44ef9b801b7d8bc3=function(t,n){let r=c(n.message,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_mount_dfb06836b0f9b20b=function(e){return e.mount},t.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(e){return e.msCrypto},t.wbg.__wbg_navigator_6db993f5ffeb46be=function(e){return e.navigator},t.wbg.__wbg_navigator_fc64ba1417939b25=function(e){return e.navigator},t.wbg.__wbg_networkGateway_79e326cb5c82e7fd=function(t,n){let r=n.networkGateway;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_new0_97314565408dea38=function(){return new Date},t.wbg.__wbg_new_07b483f72211fd66=function(){return{}},t.wbg.__wbg_new_104a6fcd57ac32c0=function(){return p((function(){return new FileReader}),arguments)},t.wbg.__wbg_new_181343b7eb238d99=function(e){return new Int32Array(e)},t.wbg.__wbg_new_186abcfdff244e42=function(){return p((function(){return new AbortController}),arguments)},t.wbg.__wbg_new_2debb2b422bd07bd=function(){return p((function(e,t){return new WebAssembly.Global(e,t)}),arguments)},t.wbg.__wbg_new_39fae4e38868373c=function(){return p((function(e,t){return new Worker(a(e,t))}),arguments)},t.wbg.__wbg_new_476169e6d59f23ae=function(e,t){return Error(a(e,t))},t.wbg.__wbg_new_4796e1cd2eb9ea6d=function(){return p((function(){return new Headers}),arguments)},t.wbg.__wbg_new_58353953ad2097cc=function(){return[]},t.wbg.__wbg_new_5dd74caa1b362828=function(){return p((function(e){return new WebAssembly.Module(e)}),arguments)},t.wbg.__wbg_new_7449da607adc249f=function(){return p((function(e,t){return new WebAssembly.Instance(e,t)}),arguments)},t.wbg.__wbg_new_75fba833e24e4ae9=function(){return p((function(e){return new WebAssembly.Memory(e)}),arguments)},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},t.wbg.__wbg_new_a2957aa5684de228=function(e){return new Date(e)},t.wbg.__wbg_new_a4e7a0370d48e1b4=function(){return p((function(e){return new ReadableStreamDefaultReader(e)}),arguments)},t.wbg.__wbg_new_a979b4b45bd55c7f=function(){return new Map},t.wbg.__wbg_new_b60148568efca43b=function(e,t){return TypeError(a(e,t))},t.wbg.__wbg_new_e30c39c06edaabf2=function(t,n){try{var r={a:t,b:n};return new Promise(((t,n)=>{let i=r.a;r.a=0;try{return function(t,n,r,i){e.closure191_externref_shim(t,n,r,i)}(i,r.b,t,n)}finally{r.a=i}}))}finally{r.a=r.b=0}},t.wbg.__wbg_new_e52b3efaaa774f96=function(e){return new Uint8Array(e)},t.wbg.__wbg_new_e769da3b652f0d9f=function(){return p((function(e){return new WebAssembly.Table(e)}),arguments)},t.wbg.__wbg_new_f42a001532528172=function(){return p((function(e,t){return new WebSocket(a(e,t))}),arguments)},t.wbg.__wbg_new_fd4b538754de98d6=function(){return p((function(e){return new WebAssembly.Tag(e)}),arguments)},t.wbg.__wbg_newfromslice_7c05ab1297cb2d88=function(e,t){return new Uint8Array(m(e,t))},t.wbg.__wbg_newnoargs_ff528e72d35de39a=function(e,t){return Function(a(e,t))},t.wbg.__wbg_newwithargs_17a05078fc85d3aa=function(e,t,n,r){return Function(a(e,t),a(n,r))},t.wbg.__wbg_newwithbyteoffsetandlength_3b01ecda099177e8=function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},t.wbg.__wbg_newwithlength_08f872dc1e3ada2e=function(e){return new Uint8Array(e>>>0)},t.wbg.__wbg_newwithlength_6ee231411efd06b6=function(e){return Array(e>>>0)},t.wbg.__wbg_newwithoptions_9931e161b714ebf9=function(){return p((function(e,t,n){return new Worker(a(e,t),n)}),arguments)},t.wbg.__wbg_newwithstrandinit_f8a9dbe009d6be37=function(){return p((function(e,t,n){return new Request(a(e,t),n)}),arguments)},t.wbg.__wbg_newwithu8arraysequenceandoptions_3b5b6ab7317ffd8f=function(){return p((function(e,t){return new Blob(e,t)}),arguments)},t.wbg.__wbg_newwithunderlyingsinkandstrategy_481c2b5a223a4560=function(){return p((function(e,t){return new WritableStream(e,t)}),arguments)},t.wbg.__wbg_newwithunderlyingsourceandstrategy_594ea2be3e0723ff=function(){return p((function(e,t){return new ReadableStream(e,t)}),arguments)},t.wbg.__wbg_next_8bb824d217961b5d=function(e){return e.next},t.wbg.__wbg_next_e2da48d8fff7439a=function(){return p((function(e){return e.next()}),arguments)},t.wbg.__wbg_node_02999533c4ea02e3=function(e){return e.node},t.wbg.__wbg_now_eb0821f3bd9f6529=function(){return Date.now()},t.wbg.__wbg_of_995ab9c48c3965f1=function(e,t,n){return[e,t,n]},t.wbg.__wbg_postMessage_54ce7f4b41ac732e=function(){return p((function(e,t){e.postMessage(t)}),arguments)},t.wbg.__wbg_postMessage_95ef4554c6b7ca0c=function(){return p((function(e,t){e.postMessage(t)}),arguments)},t.wbg.__wbg_process_5c1d670bc53614b8=function(e){return e.process},t.wbg.__wbg_program_0ccd177127e926dc=function(e){return e.program},t.wbg.__wbg_publishpackageoutput_new=function(e){return xe.__wrap(e)},t.wbg.__wbg_push_73fd7b5550ebf707=function(e,t){return e.push(t)},t.wbg.__wbg_queueMicrotask_46c1df247678729f=function(e){queueMicrotask(e)},t.wbg.__wbg_queueMicrotask_8acf3ccb75ed8d11=function(e){return e.queueMicrotask},t.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return p((function(e,t){e.randomFillSync(t)}),arguments)},t.wbg.__wbg_random_210bb7fbfa33591d=function(){return Math.random()},t.wbg.__wbg_readAsArrayBuffer_ec86f70be9ee80e9=function(){return p((function(e,t){e.readAsArrayBuffer(t)}),arguments)},t.wbg.__wbg_read_f4b89f69cc51efc7=function(e){return e.read()},t.wbg.__wbg_readablestreamsource_new=function(e){return Ce.__wrap(e)},t.wbg.__wbg_redirected_380499cd18bc27c0=function(e){return e.redirected},t.wbg.__wbg_registry_0193688f92324c7c=function(e){let t=e.registry;return d(t)?0:f(t)},t.wbg.__wbg_releaseLock_c589dd51c0812aca=function(e){e.releaseLock()},t.wbg.__wbg_require_79b1e9274cde3c87=function(){return p((function(){return module.require}),arguments)},t.wbg.__wbg_resolve_0dac8c580ffd4678=function(e){return Promise.resolve(e)},t.wbg.__wbg_respond_b227f1c3be2bb879=function(){return p((function(e,t){e.respond(t>>>0)}),arguments)},t.wbg.__wbg_result_142fc4d88cbccb26=function(){return p((function(e){return e.result}),arguments)},t.wbg.__wbg_runtime_3a007260b7cad09f=function(e){return e.runtime},t.wbg.__wbg_send_05456d2bf190b017=function(){return p((function(e,t){e.send(t)}),arguments)},t.wbg.__wbg_setTimeout_84a114fc6c4403f8=function(){return p((function(e,t,n){return e.setTimeout(t,n)}),arguments)},t.wbg.__wbg_setTimeout_906fea9a7279f446=function(){return p((function(e,t,n){return e.setTimeout(t,n)}),arguments)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,t,n){e[t]=n},t.wbg.__wbg_set_7422acbe992d64ab=function(e,t,n){e[t>>>0]=n},t.wbg.__wbg_set_b042eef31c50834d=function(){return p((function(e,t,n,r,i){e.set(a(t,n),a(r,i))}),arguments)},t.wbg.__wbg_set_c43293f93a35998a=function(){return p((function(e,t,n){return Reflect.set(e,t,n)}),arguments)},t.wbg.__wbg_set_d6bdfd275fb8a4ce=function(e,t,n){return e.set(t,n)},t.wbg.__wbg_set_eeace154fc5ce736=function(){return p((function(e,t,n){e.set(t>>>0,n)}),arguments)},t.wbg.__wbg_set_fe4e79d1ed3b0e9b=function(e,t,n){e.set(t,n>>>0)},t.wbg.__wbg_setbinaryType_52787d6025601cc5=function(e,t){e.binaryType=ce[t]},t.wbg.__wbg_setbody_971ec015fc13d6b4=function(e,t){e.body=t},t.wbg.__wbg_setcredentials_920d91fb5984c94a=function(e,t){e.credentials=le[t]},t.wbg.__wbg_setheaders_65a4eb4c0443ae61=function(e,t){e.headers=t},t.wbg.__wbg_sethighwatermark_3017ad772d071dcb=function(e,t){e.highWaterMark=t},t.wbg.__wbg_setmethod_8ce1be0b4d701b7c=function(e,t,n){e.method=a(t,n)},t.wbg.__wbg_setmode_bd35f026f55b6247=function(e,t){e.mode=ue[t]},t.wbg.__wbg_setname_9b01ac306adf8bfd=function(e,t,n){e.name=a(t,n)},t.wbg.__wbg_setonclose_c6db38f935250174=function(e,t){e.onclose=t},t.wbg.__wbg_setonerror_890bfd1ff86e9c78=function(e,t){e.onerror=t},t.wbg.__wbg_setonloadend_a6c211075855db45=function(e,t){e.onloadend=t},t.wbg.__wbg_setonmessage_49ca623a77cfb3e6=function(e,t){e.onmessage=t},t.wbg.__wbg_setonmessage_f6cf46183c427754=function(e,t){e.onmessage=t},t.wbg.__wbg_setonopen_1475cbeb761c101f=function(e,t){e.onopen=t},t.wbg.__wbg_setsignal_8e72abfe7ee03c97=function(e,t){e.signal=t},t.wbg.__wbg_setsize_13f2192310db9b34=function(e,t){e.size=t},t.wbg.__wbg_settype_acc38e64fddb9e3f=function(e,t,n){e.type=a(t,n)},t.wbg.__wbg_settype_ca83ae32b7117898=function(e,t){e.type=de[t]},t.wbg.__wbg_setvalue_bd9df7c968e4b416=function(e,t){e.value=t},t.wbg.__wbg_signal_b96223519a041faa=function(e){return e.signal},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,n){let r=c(n.stack,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_static_accessor_GLOBAL_487c52c58d65314d=function(){let e=typeof global>`u`?null:global;return d(e)?0:f(e)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_ee9704f328b6b291=function(){let e=typeof globalThis>`u`?null:globalThis;return d(e)?0:f(e)},t.wbg.__wbg_static_accessor_SELF_78c9e3071b912620=function(){let e=typeof self>`u`?null:self;return d(e)?0:f(e)},t.wbg.__wbg_static_accessor_WINDOW_a093d21393777366=function(){let e=typeof window>`u`?null:window;return d(e)?0:f(e)},t.wbg.__wbg_status_a54682bbe52f9058=function(e){return e.status},t.wbg.__wbg_stdin_4d05ba90fc2c39de=function(e){let t=e.stdin;return d(t)?0:f(t)},t.wbg.__wbg_stringify_c242842b97f054cc=function(){return p((function(e){return JSON.stringify(e)}),arguments)},t.wbg.__wbg_subarray_dd4ade7d53bd8e26=function(e,t,n){return e.subarray(t>>>0,n>>>0)},t.wbg.__wbg_terminate_af36b01db24a1745=function(e){e.terminate()},t.wbg.__wbg_text_ec0e22f60e30dd2f=function(){return p((function(e){return e.text()}),arguments)},t.wbg.__wbg_then_82ab9fb4080f1707=function(e,t,n){return e.then(t,n)},t.wbg.__wbg_then_db882932c0c714c6=function(e,t){return e.then(t)},t.wbg.__wbg_toString_2a748bb7135f7e4d=function(t,n,r){let i=c(n.toString(r),e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbg_toString_bc7a05a172b5cf14=function(e){return e.toString()},t.wbg.__wbg_trap_new=function(e){return Ee.__wrap(e)},t.wbg.__wbg_url_e6ed869ea05b7a71=function(t,n){let r=c(n.url,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbg_userAgent_470abfd84e4eedcb=function(){return p((function(t,n){let r=c(n.userAgent,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)}),arguments)},t.wbg.__wbg_userAgent_a24a493cd80cbd00=function(){return p((function(t,n){let r=c(n.userAgent,e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)}),arguments)},t.wbg.__wbg_user_new=function(e){return Oe.__wrap(e)},t.wbg.__wbg_userpackagedefinition_unwrap=function(e){return S.__unwrap(e)},t.wbg.__wbg_uses_7494620cc35a86ad=function(e){let t=e.uses;return d(t)?0:f(t)},t.wbg.__wbg_value_17b896954e14f896=function(e){return e.value},t.wbg.__wbg_value_c22dc41e42f5d813=function(e){return e.value},t.wbg.__wbg_value_f8fe3ce05407a213=function(e){return e.value},t.wbg.__wbg_versions_c71aa1626a93e0a1=function(e){return e.versions},t.wbg.__wbg_view_a9ad80dcbad7cf1c=function(e){let t=e.view;return d(t)?0:f(t)},t.wbg.__wbg_waitAsync_c3398694eaa5aeab=function(e,t,n){return Atomics.waitAsync(e,t>>>0,n)},t.wbg.__wbg_waitAsync_e36f18e2e26c3b7d=function(){return Atomics.waitAsync},t.wbg.__wbg_wasmer_new=function(e){return je.__wrap(e)},t.wbg.__wbg_writablestreamsink_new=function(e){return Ne.__wrap(e)},t.wbg.__wbindgen_array_new=function(){return[]},t.wbg.__wbindgen_array_push=function(e,t){e.push(t)},t.wbg.__wbindgen_as_number=function(e){return+e},t.wbg.__wbindgen_bigint_from_i64=function(e){return e},t.wbg.__wbindgen_bigint_from_u128=function(e,t){return BigInt.asUintN(64,e)<<BigInt(64)|BigInt.asUintN(64,t)},t.wbg.__wbindgen_bigint_from_u64=function(e){return BigInt.asUintN(64,e)},t.wbg.__wbindgen_bigint_get_as_i64=function(e,t){let n=typeof t==`bigint`?t:void 0;u().setBigInt64(e+8,d(n)?BigInt(0):n,!0),u().setInt32(e+0,!d(n),!0)},t.wbg.__wbindgen_boolean_get=function(e){return typeof e==`boolean`?+!!e:2},t.wbg.__wbindgen_cb_drop=function(e){let t=e.original;return t.cnt--==1&&(t.a=0,!0)},t.wbg.__wbindgen_closure_wrapper13762=function(e,t,n){return g(e,t,1342,oe)},t.wbg.__wbindgen_closure_wrapper13766=function(e,t,n){return g(e,t,1342,oe)},t.wbg.__wbindgen_closure_wrapper13769=function(e,t,n){return g(e,t,1342,se)},t.wbg.__wbindgen_closure_wrapper7191=function(e,t,n){return g(e,t,541,b)},t.wbg.__wbindgen_closure_wrapper7199=function(e,t,n){return g(e,t,541,b)},t.wbg.__wbindgen_closure_wrapper8876=function(e,t,n){return ee(e,t,750,ie)},t.wbg.__wbindgen_closure_wrapper9091=function(e,t,n){return ee(e,t,750,ae)},t.wbg.__wbindgen_closure_wrapper9126=function(e,t,n){return g(e,t,750,b)},t.wbg.__wbindgen_closure_wrapper9506=function(e,t,n){return g(e,t,750,b)},t.wbg.__wbindgen_debug_string=function(t,n){let r=c(_(n),e.__wbindgen_malloc,e.__wbindgen_realloc),i=o;u().setInt32(t+4,i,!0),u().setInt32(t+0,r,!0)},t.wbg.__wbindgen_function_table=function(){return e.__wbindgen_export_6},t.wbg.__wbindgen_in=function(e,t){return e in t},t.wbg.__wbindgen_init_externref_table=function(){let t=e.__wbindgen_export_5,n=t.grow(4);t.set(0,void 0),t.set(n+0,void 0),t.set(n+1,null),t.set(n+2,!0),t.set(n+3,!1)},t.wbg.__wbindgen_is_bigint=function(e){return typeof e==`bigint`},t.wbg.__wbindgen_is_falsy=function(e){return!e},t.wbg.__wbindgen_is_function=function(e){return typeof e==`function`},t.wbg.__wbindgen_is_null=function(e){return e===null},t.wbg.__wbindgen_is_object=function(e){return typeof e==`object`&&!!e},t.wbg.__wbindgen_is_string=function(e){return typeof e==`string`},t.wbg.__wbindgen_is_undefined=function(e){return e===void 0},t.wbg.__wbindgen_jsval_eq=function(e,t){return e===t},t.wbg.__wbindgen_jsval_loose_eq=function(e,t){return e==t},t.wbg.__wbindgen_link_db87ac8434ca3f93=function(t){let n=c(URL.createObjectURL===void 0?`data:application/javascript,onmessage%20%3D%20function%20(ev)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20%5Bia%2C%20index%2C%20value%5D%20%3D%20ev.data%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20ia%20%3D%20new%20Int32Array(ia.buffer)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20result%20%3D%20Atomics.wait(ia%2C%20index%2C%20value)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20postMessage(result)%3B%0A%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20`:URL.createObjectURL(new Blob([`onmessage = function (ev) {
|
|
12
|
-
let [ia, index, value] = ev.data;
|
|
13
|
-
ia = new Int32Array(ia.buffer);
|
|
14
|
-
let result = Atomics.wait(ia, index, value);
|
|
15
|
-
postMessage(result);
|
|
16
|
-
};
|
|
17
|
-
`],{type:`text/javascript`})),e.__wbindgen_malloc,e.__wbindgen_realloc),r=o;u().setInt32(t+4,r,!0),u().setInt32(t+0,n,!0)},t.wbg.__wbindgen_lt=function(e,t){return e<t},t.wbg.__wbindgen_memory=function(){return e.memory},t.wbg.__wbindgen_module=function(){return C.__wbindgen_wasm_module},t.wbg.__wbindgen_neg=function(e){return-e},t.wbg.__wbindgen_number_get=function(e,t){let n=typeof t==`number`?t:void 0;u().setFloat64(e+8,d(n)?0:n,!0),u().setInt32(e+0,!d(n),!0)},t.wbg.__wbindgen_number_new=function(e){return e},t.wbg.__wbindgen_rethrow=function(e){throw e},t.wbg.__wbindgen_shr=function(e,t){return e>>t},t.wbg.__wbindgen_string_get=function(t,n){let r=typeof n==`string`?n:void 0;var i=d(r)?0:c(r,e.__wbindgen_malloc,e.__wbindgen_realloc),a=o;u().setInt32(t+4,a,!0),u().setInt32(t+0,i,!0)},t.wbg.__wbindgen_string_new=function(e,t){return a(e,t)},t.wbg.__wbindgen_throw=function(e,t){throw Error(a(e,t))},t}function Ie(e,t){e.wbg.memory=t||new WebAssembly.Memory({initial:34,maximum:16384,shared:!0})}function Le(n,r,i){if(e=n.exports,C.__wbindgen_wasm_module=r,l=null,t=null,i!==void 0&&(typeof i!=`number`||i===0||i%65536!=0))throw`invalid stack size`;return e.__wbindgen_start(i),e}async function C(t,n){if(e!==void 0)return e;let r;t!==void 0&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t,memory:n,thread_stack_size:r}=t:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),t===void 0&&(t=new URL(``+new URL(`wasmer_js_bg-lccPpAdN.wasm`,import.meta.url).href,``+import.meta.url));let i=Fe();(typeof t==`string`||typeof Request==`function`&&t instanceof Request||typeof URL==`function`&&t instanceof URL)&&(t=fetch(t)),Ie(i,n);let{instance:a,module:o}=await async function(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!Pe.has(e.type)||e.headers.get(`Content-Type`)===`application/wasm`)throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await t,i);return Le(a,o,r)}const Re=async(e,t)=>{e?(e instanceof WebAssembly.Module||e instanceof URL||e instanceof WebAssembly.Module)&&(t?(console.info("Passing the module and memory as first arguments to the init function is deprecated, please use: `init({module: WASM_MODULE, memory: WASM_MEMORY})`"),e={module:e,memory:t}):(console.info("Passing the module as first argument to the init function is deprecated, please use: `init({module: WASM_MODULE})`"),e={module:e})):e={},ze(e);let n=await C(e.module,e.memory);return e.log&&re(e.log),e.workerUrl&&ne(e.workerUrl.toString()),e.sdkUrl?te(e.sdkUrl.toString()):te(new URL(``+new URL(`index-CMYYN-aK.mjs`,import.meta.url).href,``+import.meta.url).toString()),n},ze=e=>{globalThis.__WASMER_REGISTRY__={registryUrl:e.registryUrl,token:e.token}};var Be=``+new URL(`wasmer_js_bg-lccPpAdN.wasm`,import.meta.url).href;const Ve=`wasm-ld`,w=`/work/build/main.o`,He=`/work/build/main.wasm`,Ue=`__WASM_OJ_RUST_OBJECT__`,We=`__WASM_OJ_RUST_ALLOCATOR_BITCODE__`,Ge=`__WASM_OJ_RUST_OUTPUT__`;function Ke(e){if(!Ye(e))throw Error(`Pinned Rust linker arguments must be an object.`);if(e.objectPlaceholder!==`__WASM_OJ_RUST_OBJECT__`)throw Error(`Pinned Rust linker object placeholder does not match the compiler contract.`);if(e.outputPlaceholder!==`__WASM_OJ_RUST_OUTPUT__`)throw Error(`Pinned Rust linker output placeholder does not match the compiler contract.`);if(e.allocatorPlaceholder!==`__WASM_OJ_RUST_ALLOCATOR_BITCODE__`)throw Error(`Pinned Rust linker allocator placeholder does not match the compiler contract.`);let t=Je(`debug`,e.debug,`-O0`),n=Je(`release`,e.release,`-O2`);return Object.freeze({objectPlaceholder:Ue,allocatorPlaceholder:We,outputPlaceholder:Ge,debug:t,release:n})}function qe(e,t,n){if(!/^\/work\/build\/main\.[a-z0-9]+\.rcgu\.bc$/i.test(n))throw Error(`Rust allocator bitcode has unexpected path '${n}'.`);return(t===`release`?e.release:e.debug).map(t=>t===e.objectPlaceholder?w:t===e.allocatorPlaceholder?n:t===e.outputPlaceholder?He:t)}function Je(e,t,n){if(!Array.isArray(t)||t.length===0||t.some(e=>typeof e!=`string`))throw Error(`Pinned Rust ${e} linker arguments must be a non-empty string array.`);let r=t;T(r,Ue,`${e} object placeholder`),T(r,We,`${e} allocator placeholder`);let i=T(r,Ge,`${e} output placeholder`);if(i===0||r[i-1]!==`-o`)throw Error(`Pinned Rust ${e} linker output placeholder must follow '-o'.`);if(T(r,n,`${e} linker optimization`),!r.includes(`--gc-sections`)||!r.includes(`--shared-memory`))throw Error(`Pinned Rust ${e} linker arguments omit required WebAssembly flags.`);if(!r.some(e=>e.endsWith(`/self-contained/crt1-command.o`)))throw Error(`Pinned Rust ${e} linker arguments omit the WASI command startup object.`);if(!r.some(e=>e.startsWith(`/rust/`)&&e.endsWith(`.rlib`)))throw Error(`Pinned Rust ${e} linker arguments omit the Rust standard library.`);for(let t of r){if(!t||t.includes(`\0`))throw Error(`Pinned Rust ${e} linker arguments contain an empty or NUL-bearing value.`);if(t.startsWith(`@`))throw Error(`Pinned Rust ${e} linker arguments unexpectedly use a response file.`);if(t.startsWith(`/`)&&(!t.startsWith(`/rust/`)||t.split(`/`).includes(`..`)))throw Error(`Pinned Rust ${e} linker arguments reference unmounted path '${t}'.`)}return Object.freeze([...r])}function T(e,t,n){let r=e.flatMap((e,n)=>e===t?[n]:[]);if(r.length!==1)throw Error(`Pinned Rust ${n} must occur exactly once.`);return r[0]}function Ye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const Xe=/^main\.[a-z0-9]+\.rcgu\.bc$/i;function Ze(e){let t=e.filter(e=>Xe.test(e)).sort();if(t.length>1)throw Error(`rustc emitted multiple allocator bitcode modules: ${t.join(`, `)}.`);return t[0]}function Qe(e){if(e.byteLength<4)return!1;let t=e[0]===66&&e[1]===67&&e[2]===192&&e[3]===222,n=e[0]===222&&e[1]===192&&e[2]===23&&e[3]===11;return t||n}Object.freeze([`c`,`cpp`,`rust`,`python`,`javascript`,`typescript`,`go`]),Object.freeze([`cargo`,`npm`,`pypi`,`go`,`cpp`]);const E=`wasm-oj-v2`;Object.freeze({clangPins:`${E}/clang-pins`,clangLibcxxPch:`${E}/clang-libcxx-pch`,clangToolchain:`${E}/clang-toolchain`,compileBatch:`${E}/compile-batch`,compileTrace:`${E}/compile-trace`,conformance:`${E}/conformance`,conformanceEvidence:`${E}/conformance-evidence`,conformanceMatrix:`${E}/conformance-matrix`,cppDependencyLock:`${E}/cpp-dependency-lock`,dependencyLock:`${E}/dependency-lock`,dependencyOfflineBundle:`${E}/dependency-offline-bundle`,incrementalBuildGraph:`${E}/incremental-build-graph`,interactiveRequest:`${E}/interactive-request`,goToolchain:`${E}/go-toolchain`,objectCache:`${E}/object-cache`,pythonToolchain:`${E}/python-toolchain`,replayBundle:`${E}/replay-bundle`,rustToolchain:`${E}/rust-toolchain`,runRequest:`${E}/run-request`,runtimeBundle:`${E}/runtime-bundle`,runtimeCoreLicenses:`${E}/runtime-core-licenses`,thirdPartyComponents:`${E}/third-party-components`,wasmerSdkLicenses:`${E}/wasmer-sdk-licenses`,toolchainPackage:`${E}/toolchain-package`}),Object.freeze({database:`${E}:storage`,databaseVersion:2,dependencyCache:`${E}:dependencies`,incrementalBuildCache:`${E}:incremental-build-cache`,runtimeFilesCache:`${E}:runtime-files`,toolchainCache:`${E}:toolchains`});const D=`22.0.0-git20542-10`,$e=`wasm-oj/clang@${D}`,et=`/toolchains/clang-${D}.webc.gz.bin`,tt=`/toolchains/clang-${D}.cc1-pins.json`,nt=`/toolchains/clang-${D}.manifest.json`,rt=`/toolchains/clang-${D}.libcxx-pch.json`,it=`/toolchains/clang-${D}.cpp-debug.pch.gz.bin`,at=`/toolchains/clang-${D}.cpp-release.pch.gz.bin`,O=`7f10d90b8e52b270f04874641a1d0bf9e94e85b4f6c7573a774cebbc6d32552a`,ot=`21ded33b9c6d4e1aaad5528c940bdaf6c3e84be77ea8f522f018ca7289a2a224`,k=`895eee17c63b1112c84adcc4ddbcb38e0c18e53bff15f50a8689b9b82d87b1ff`,A=`6382dcdfb6a2da49032a0e08da3b1fb490eb24432be85c3c12e3e871a5065273`,st=Object.freeze({"cpp-debug":Object.freeze({path:it,sha256:`c420c4643c48826643e75585d5bfdc281f11883d4bda28b283e3c706f3046b3a`,compressedSha256:`a3811351bae3289caf096f2d4bb6d2ee5db84b97e05514e87190d36b65c500cf`}),"cpp-release":Object.freeze({path:at,sha256:`c4b2132cc6d698e97dd1386431fdb54faaaf38b35b2528c7bc854f860d1f64b1`,compressedSha256:`ef004fc05ec50af697a37f7c9c814bf62e9676d0de162d6ac35305533939f93f`})}),j=`3.14.7`,ct=`a42c98f5f00582638c8e445440c506bbf94d5e55b3415d1f8d82d11c56cd4b56`,lt=`${`wasm-oj/cpython@${j}`}#sha256:${ct}`,ut=`/toolchains/python-${j}-wasip1.webc.gz.bin`,dt=`/toolchains/python-${j}-wasip1.manifest.json`,ft=`10027f0e32c77dfa0ce1c413b6cb27307d6744fe5e18e6da8cea738bd020260c`,pt=`53a24b258363a8494af164121111a34b49c85fa0e054627fe131feba6f359cd5`,M=`0.15.1`,mt=`wasm-oj/quickjs-ng@${M}`,ht=`/toolchains/quickjs-${M}.wasm.gz.bin`,N=`dc6e02e8610269e61b341331661515616451cec929fd534fa96d1c4f47fbcc9a`,P=`7.0.2`,gt=`/toolchains/typescript-${P}.wasm.gz.bin`,F=`29c6ee0e46151e2644049ae96162b1b1d46dcb13310e2a928114bb9030c3ea92`,I=`1.91.1-dev`,_t=`/toolchains/rust-${I}.webc.gz.bin`,vt=`/toolchains/rust-${I}.manifest.json`,L=`cfbdadc67be1315e735aa55bdf8a5a0d00171982a023fefcf7ba586127753887`,R=`765de8d68d03078e79f69f49dec0dcab1ff96fe3bbe5e9eafebb2ce61a39d3ee`,z=`d5bbdca994e61888679c5738cb9420649c0854ed0eb5d65468bc67d5d550bce1`,B=`1.26.5`,yt=`/toolchains/go-${B}-wasip1.webc.gz.bin`,bt=`/toolchains/go-${B}-wasip1.manifest.json`,xt=`/toolchains/go-${B}-wasip1.stdlib.gz.bin`,St=`70a7e359884b09b2e1a622d6ac5cd6e31c334aab519e6dd80dff5e040a9e09e4`,Ct=`c3a97934b6a83fefdea5c31f99141f70f76189eedc9ec0fa9ccd41302e50963b`,wt=`5d784e9ca640b9525e84b598c0beb97ca110ae908568ca45f6441a441d99a262`,Tt=`aeffc384fdc624544f174ba5fc3c22395717fdbc3c4387d677d20855b6be80d8`,Et=Object.freeze({[et]:O,[tt]:k,[nt]:A,[rt]:`9bbe41d77c786f1c36169369c909268530b05726e1581683f6edd9a2983eebd0`,[it]:st[`cpp-debug`].compressedSha256,[at]:st[`cpp-release`].compressedSha256,[ut]:ft,[dt]:pt,[ht]:N,[gt]:F,[_t]:L,[vt]:z,[yt]:St,[bt]:wt,[xt]:Tt,"/toolchains/java-teavm-0.13.1.compiler.wasm":`8c37bce1c6fceeaffeffe93e10834309b67c8b6fb58c6f8a24547afe8be67f5d`,"/toolchains/java-teavm-0.13.1.compile-classlib.bin":`738a82b7d7e7ff8d98b07bb076785da7035847a166afb8446fd150c4efce6103`,"/toolchains/java-teavm-0.13.1.runtime-classlib.bin":`0ed234b66cdde19cb29e6c2865a3636d792d3cf72f102e73a7b3fdede80b79e6`});Object.freeze({c:Object.freeze([O,ot,k,A]),cpp:Object.freeze([O,ot,k,A]),rust:Object.freeze([L,R,z]),python:Object.freeze([ft,ct,pt,`c1acac884af1c86833db5b65f8cc0a2304fce74dea0a05d9b40bde0a4e3e7c0e`]),javascript:Object.freeze([F,N]),typescript:Object.freeze([F,N]),go:Object.freeze([St,Ct,wt,Tt,`e1ec64b08efd02b35b7ffdaf3970875aaae98325fa4795eafca94ebae2d0d192`,`9e557f5b86961fd604217d7521461c5d2b7322e383fa30dead5669b77db12201`,`2eefca10af935a307ab7946447146bd30e0ea0fb5460be54dc1c55844d155580`])});function Dt(e){let t=e.startsWith(`/`)?e:`/toolchains/${e}`,n=Et[t];if(!n)throw Error(`No pinned digest is declared for toolchain asset '${e}'.`);return n}function Ot(e,t){let n=Dt(e),r=new URL(t.href);r.pathname.endsWith(`/`)||(r.pathname+=`/`);let i=[...r.searchParams];r.search=``;let a=e.slice(e.lastIndexOf(`/`)+1),o=new URL(a,r);for(let[e,t]of i)o.searchParams.append(e,t);return o.searchParams.set(`sha256`,n),o}function V(e){return Object.freeze({...e,compilerPackages:Object.freeze([...e.compilerPackages]),targets:Object.freeze([...e.targets])})}Object.freeze({c:V({language:`c`,label:`Clang 22`,artifact:`wasm`,compilerPackages:[$e],targets:[`wasip1`,`wasix`],version:D,note:`Native wasip1 module via Clang and LLD; directly executable by WASI and WASIX runtimes.`}),cpp:V({language:`cpp`,label:`Clang++ 22 (C++20)`,artifact:`wasm`,compilerPackages:[$e],targets:[`wasip1`,`wasix`],version:D,note:`C++20/libc++ wasip1 module; directly executable by WASI and WASIX runtimes.`}),rust:V({language:`rust`,label:`Rust ${I}`,artifact:`wasm`,compilerPackages:[`rustc@${I}#sha256:${R}`],targets:[`wasip1`],version:I,note:`Real rustc, its matching standard library, and a fresh deterministic wasm-ld stage execute as one pinned WebC under Wasmer.`}),python:V({language:`python`,label:`CPython ${j}`,artifact:`runtime-bundle`,compilerPackages:[lt],runtimePackage:lt,targets:[`wasip1`],version:j,note:`Python source files executed by the source-built CPython wasm32-wasip1 interpreter and standard library.`}),javascript:V({language:`javascript`,label:`QuickJS-ng`,artifact:`runtime-bundle`,compilerPackages:[`typescript@${P}-wasi`],runtimePackage:mt,targets:[`wasip1`],version:M,note:`JavaScript checked by TypeScript/WASI, then executed by the bundled QuickJS-ng/WASI runtime.`}),typescript:V({language:`typescript`,label:`TypeScript + QuickJS-ng`,artifact:`runtime-bundle`,compilerPackages:[`typescript@${P}-wasi`],runtimePackage:mt,targets:[`wasip1`],version:P,note:`The native TypeScript compiler and QuickJS-ng runtime both execute as local WASI modules.`}),go:V({language:`go`,label:`Go ${B}`,artifact:`wasm`,compilerPackages:[`go@${B}#sha256:${Ct}`],targets:[`wasip1`],version:B,note:`The standard Go compiler, linker, and pinned wasip1 standard library execute locally as one WebC under Wasmer.`})});const H=`wasm32-wasip1-threads`,kt=`2024`,At=18e4,jt=Object.freeze([`wasi_snapshot_preview1.random_get`,`wasi_snapshot_preview1.clock_time_get`]),U=Object.freeze({version:I,packageAsset:_t,packageCompressedSha256:L,packageSha256:R,manifestAsset:vt,manifestSha256:z,target:H,edition:kt});function Mt(e,t,n=[]){let r=t===`release`?[`-C`,`opt-level=2`,`-C`,`debuginfo=0`]:[`-C`,`opt-level=0`,`-C`,`debuginfo=1`];return[`--target`,H,`--sysroot`,`/rust`,`-Zno-parallel-backend`,`-Z`,`threads=1`,`-Z`,`randomize-layout=no`,`-Z`,`layout-seed=0`,`-Z`,`uninit-const-chunk-threshold=4294967295`,`-C`,`codegen-units=1`,`-C`,`llvm-args=-rng-seed=1`,`-C`,`metadata=wasm_oj_submission`,`-C`,`target-feature=+atomics,+bulk-memory,+mutable-globals`,`/work/${e}`,`--crate-name`,`wasm_oj_submission`,`--crate-type`,`bin`,`--edition`,kt,`--error-format=json`,`--json=diagnostic-rendered-ansi`,`--remap-path-prefix=/work=.`,`-C`,`panic=abort`,...n.flatMap(e=>[`--extern`,`${e.crateName}=${e.path}`]),...r,`-C`,`save-temps=yes`,`--emit=obj`,`-o`,w]}function Nt(e,t){let n=t===`release`?[`-C`,`opt-level=2`,`-C`,`debuginfo=0`]:[`-C`,`opt-level=0`,`-C`,`debuginfo=1`];return[`--target`,H,`--sysroot`,`/rust`,`-Zno-parallel-backend`,`-Z`,`threads=1`,`-Z`,`randomize-layout=no`,`-Z`,`layout-seed=0`,`-C`,`codegen-units=1`,`-C`,`llvm-args=-rng-seed=1`,`-C`,`metadata=${e.id}`,`-C`,`target-feature=+atomics,+bulk-memory,+mutable-globals`,`/work/${e.root}`,`--crate-name`,e.crateName,`--crate-type`,`rlib`,`--edition`,e.edition,`--error-format=json`,`--json=diagnostic-rendered-ansi`,`--remap-path-prefix=/work=.`,`-C`,`panic=abort`,`--cap-lints`,`allow`,...e.features.flatMap(e=>[`--cfg`,`feature=${JSON.stringify(e)}`]),...e.externs.flatMap(e=>[`--extern`,`${e.crateName}=${e.path}`]),...n,`--emit=link`,`-o`,e.outputPath]}function Pt(){return{RUST_MIN_STACK:`16777216`,SOURCE_DATE_EPOCH:`946684800`,TZ:`UTC`,LC_ALL:`C`}}function Ft(){return{SOURCE_DATE_EPOCH:`946684800`,TZ:`UTC`,LC_ALL:`C`,VSLANG:`1033`}}function It(e){let t=JSON.parse(new TextDecoder(`utf-8`,{fatal:!0}).decode(e)),n=W(t.compiler,`compiler`),r=W(t.linker,`linker`),i=W(t.pipeline,`pipeline`),a=W(t.output,`output`),o=W(t.filesystemMounts,`filesystemMounts`);if(t.version!==U.version||t.target!==U.target||n.command!==`rustc`||JSON.stringify(n.deterministicReplacements)!==JSON.stringify(jt)||r.command!==`wasm-ld`||i.strategy!==`rustc-object-then-wasm-ld`||i.objectEmission!==`rustc --emit=obj -C save-temps=yes`||i.allocatorShim!==`rustc-generated LLVM bitcode`||i.linkArgsSource!==`rustc --print=link-args`||o.rust!==`/rust`||o.linker!==`/usr`||a.sha256!==U.packageSha256||a.compressedSha256!==U.packageCompressedSha256)throw Error(`Pinned Rust toolchain manifest does not match the compiler contract.`);return Object.freeze({linkerArguments:Ke(r.arguments)})}function W(e,t){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Pinned Rust toolchain manifest '${t}' field must be an object.`);return e}function Lt(e){return e===`warning`?`warning`:e===`note`||e===`info`?`info`:`error`}function Rt(e){return e.replace(/^file:\/\//,``).replace(/^\/?(?:workspace|project|work)\//,``).replace(/^\.\//,``)}function G(e){let t=[];for(let n of e.split(/\r?\n/)){if(!n.startsWith(`{`))continue;let e;try{e=JSON.parse(n)}catch{continue}if(!e||typeof e!=`object`)continue;let r=e;if(r.$message_type!==`diagnostic`||typeof r.message!=`string`)continue;let i=Array.isArray(r.spans)?r.spans:[],a=i.find(e=>e&&typeof e==`object`&&e.is_primary===!0)??i.find(e=>e&&typeof e==`object`),o=r.code&&typeof r.code==`object`?r.code.code:void 0;t.push({severity:Lt(typeof r.level==`string`?r.level:`error`),message:r.message,file:Rt(typeof a?.file_name==`string`?a.file_name:`main.rs`),line:typeof a?.line_start==`number`?a.line_start:1,column:typeof a?.column_start==`number`?a.column_start:1,endLine:typeof a?.line_end==`number`?a.line_end:void 0,endColumn:typeof a?.column_end==`number`?a.column_end:void 0,source:`rustc`,code:typeof o==`string`?o:void 0})}return t}Object.freeze({files:256,bytesPerFile:4194304,totalBytes:16777216}),new TextEncoder;async function zt(e){let t=typeof e==`string`?new TextEncoder().encode(e):e,n=new Uint8Array(t.byteLength);n.set(t);let r=await crypto.subtle.digest(`SHA-256`,n);return Array.from(new Uint8Array(r),e=>e.toString(16).padStart(2,`0`)).join(``)}const K=1048576,Bt=Object.freeze({requirements:128,sourceFiles:128,sourceTextBytes:8*K,hosts:32,roots:512,packages:512,referencesPerPackage:512,concurrency:16,metadataBytes:8*K,packageBytes:256*K,totalDownloadBytes:512*K,archiveFiles:16384,unpackedBytes:512*K});Object.freeze({packages:Bt.packages,filesPerPackage:Bt.archiveFiles,bytesPerFile:64*K,totalBytes:Bt.unpackedBytes});var Vt=class{#e;#t;#n=0;constructor(e=75){if(!Number.isFinite(e)||e<=0)throw RangeError(`Mounted-output stability interval must be positive and finite.`);this.#e=e}observe(e,t){if(!Number.isFinite(t))throw RangeError(`Mounted-output observation time must be finite.`);if(!e){this.#t=void 0,this.#n=0;return}if(!this.#t||!Ht(this.#t,e)){this.#t=e.slice(),this.#n=t;return}if(!(t-this.#n<this.#e))return e.slice()}};function Ht(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n+=1)if(e[n]!==t[n])return!1;return!0}function Ut(e){let t=Wt(),n=Gt(e),r=new Blob([`const pendingMessages = [];
|
|
18
|
-
`,`const queueMessage = (event) => { event.stopImmediatePropagation(); pendingMessages.push(event.data); };
|
|
19
|
-
`,`globalThis.addEventListener("message", queueMessage);
|
|
20
|
-
`,`Object.defineProperty(globalThis, "__wasmOjModuleWorkerBaseUrl", { value: ${JSON.stringify(t.href)} });\n`,`try { await import(${JSON.stringify(n)}); } finally { globalThis.removeEventListener("message", queueMessage); }\n`,`for (const data of pendingMessages) globalThis.dispatchEvent(new MessageEvent("message", { data }));
|
|
21
|
-
`],{type:`text/javascript`}),i=URL.createObjectURL(r),a=!0;return{url:i,revoke(){a&&(a=!1,URL.revokeObjectURL(i))}}}function Wt(){let e=globalThis.location?.href;if(e){let t=new URL(e);if(t.protocol===`http:`||t.protocol===`https:`)return t;if(t.protocol!==`blob:`)throw Error(`A module Worker requires an HTTP(S) browser base URL.`)}let t=globalThis.__wasmOjModuleWorkerBaseUrl;if(typeof t!=`string`)throw Error(`A module Worker requires a browser base URL.`);let n=new URL(t);if(n.origin===`null`||n.protocol!==`http:`&&n.protocol!==`https:`)throw Error(`A module Worker requires an HTTP(S) browser base URL.`);return n}function Gt(e){let t=Wt(),n;try{n=new URL(e instanceof URL?e.href:e,t)}catch{throw Error(`A module Worker URL must be a valid same-origin HTTP(S) URL.`)}if(n.origin!==t.origin||n.username||n.password||n.search||n.hash)throw Error(`A module Worker URL must be same-origin and contain no credentials, query, or fragment.`);return n.href}var Kt=class{host;originalWorker;originalDescriptor;trackedWorker;workers=new Set;installed=!1;constructor(e){this.host=e,this.originalWorker=e.Worker,this.originalDescriptor=Object.getOwnPropertyDescriptor(e,`Worker`);let t=this.workers;this.trackedWorker=new Proxy(this.originalWorker,{construct(e,n,r){let i=Reflect.construct(e,n,r);return t.add(i),i}})}install(){if(this.installed)throw Error(`Nested Worker ownership is already installed.`);if(this.host.Worker!==this.originalWorker)throw Error(`The Worker constructor changed before nested Worker ownership was installed.`);if(Object.defineProperty(this.host,"Worker",{configurable:!0,enumerable:this.originalDescriptor?.enumerable??!1,writable:!0,value:this.trackedWorker}),this.host.Worker!==this.trackedWorker)throw Error(`Unable to install nested Worker ownership.`);this.installed=!0}terminateAll(){if(!this.installed){if(this.workers.size>0)throw Error(`Nested Workers exist without an installed owner.`);return}if(this.host.Worker!==this.trackedWorker)throw Error(`The Worker constructor changed while nested Worker ownership was active.`);if(this.originalDescriptor)Object.defineProperty(this.host,"Worker",this.originalDescriptor);else if(!Reflect.deleteProperty(this.host,`Worker`))throw Error(`Unable to restore the inherited Worker constructor.`);if(this.host.Worker!==this.originalWorker)throw Error(`The original Worker constructor was not restored.`);this.installed=!1;let e=[...this.workers];this.workers.clear();for(let t of e)t.terminate()}get size(){return this.workers.size}},qt=``+new URL(`wasmer-thread.worker-DKlJE3cb.js`,import.meta.url).href;const q=self,Jt=Wt();let Yt=Promise.resolve(),J,Y,Xt,X;q.addEventListener(`message`,e=>{Yt=Yt.then(()=>Qt(e.data),()=>Qt(e.data))});async function Zt(e){if(e.type!==`compile`)throw Error(`Invalid rustc stage request.`);let t=new URL(e.assetBaseUrl,Jt);t.pathname.endsWith(`/`)||(t.pathname+=`/`);let{rustc:n,linker:r,manifest:i}=await en(t),a;try{a=new _e(Object.fromEntries(e.request.files.map(e=>[`/${e.path}`,e.content]))),await a.createDir(`/build`),await a.createDir(`/build/deps`);let t=``,o=``;for(let r of e.request.dependencies??[]){let i=await nn(await n.run({args:Nt(r,e.request.optimization),env:Pt(),mount:{"/work":a},cwd:`/work`}),a,r.outputPath,`rustc dependency ${r.id}`,e=>G(e).some(e=>e.severity===`error`),!1,cn);if(t+=i.stdout,o+=i.stderr,!i.success)return{success:!1,stdout:t,stderr:o,diagnostics:G(o)}}let s=await nn(await n.run({args:Mt(e.request.entry,e.request.optimization,e.request.rootExterns),env:Pt(),mount:{"/work":a},cwd:`/work`}),a,w,`rustc`,e=>G(e).some(e=>e.severity===`error`),!0),c=G(`${o}${s.stderr}`);if(!s.success)return{success:!1,stdout:`${t}${s.stdout}`,stderr:`${o}${s.stderr}`,diagnostics:c};let l=qe(i.linkerArguments,e.request.optimization,rn(s)),u=l.indexOf(w);if(u<0)throw Error(`Pinned Rust linker arguments omit the submission object.`);let d=[...e.request.dependencies??[]].reverse().map(e=>e.outputPath);d.length>0&&l.splice(u+1,0,...d);let f=await nn(await r.run({args:l,env:Ft(),mount:{"/work":a},cwd:`/work`}),a,He,`wasm-ld`,e=>/(?:wasm-ld|lld): error:/i.test(e));return{success:f.success&&!!f.bytes,wasm:f.bytes,stdout:`${t}${s.stdout}${f.stdout}`,stderr:`${o}${s.stderr}${f.stderr}`,diagnostics:c}}finally{a?.free()}}async function Qt(e){try{if(e.type===`shutdown`){await $t(),q.postMessage({type:`shutdown-complete`}),q.close();return}let t=await Zt(e),n={type:`result`,result:t},r=t.wasm?[t.wasm.buffer]:[];q.postMessage(n,r)}catch(e){let t=e instanceof Error?e:Error(String(e));q.postMessage({type:`error`,message:t.message,stack:t.stack})}}async function $t(){let e=J;if(J=void 0,Y=void 0,!e){Z(),Q();return}let t;try{t=await e}catch(e){throw Z(),Q(),e}Z(),await new Promise(e=>setTimeout(e,1e3));try{t.rustc.free()}finally{try{t.linker.free()}finally{try{t.pkg.free()}finally{t.runtime.free(),Q()}}}}function en(e){let t=e.href;if(Y!==void 0&&Y!==t)throw Error(`The persistent rustc stage cannot change its toolchain asset base URL.`);return Y=t,J??=tn(e),J}async function tn(e){let t=new Kt(globalThis);t.install(),Xt=t;let n=Ut(new URL(qt,Jt));X=n;try{await Re({log:`warn`,module:new URL(Be,Jt),workerUrl:n.url})}catch(e){throw Z(),Q(),e}let r;try{r=new we({registry:null})}catch(e){throw Z(),Q(),e}let i,a,o;try{let[t,n]=await Promise.all([un(e),fn(e)]);if(i=await je.fromFile(t,r),a=i.commands.rustc,!a)throw Error(`The pinned Rust WebC does not expose its rustc command.`);if(o=i.commands[Ve],!o)throw Error(`The pinned Rust WebC does not expose its ${Ve} command.`);return{runtime:r,pkg:i,rustc:a,linker:o,manifest:n}}catch(e){throw a?.free(),o?.free(),i?.free(),r.free(),Z(),Q(),e}}function Z(){let e=Xt;Xt=void 0,e?.terminateAll()}function Q(){X?.revoke(),X=void 0}async function nn(e,t,n,r,i,a=!1,o=e=>WebAssembly.validate(Uint8Array.from(e))){let s=an(e.stdout),c=an(e.stderr),l=new Vt,u=new Vt,d,f=performance.now()+At;try{for(;performance.now()<f;){let e=c.text(),r=s.quietFor(50)&&c.quietFor(50),f=performance.now(),p=l.observe(await sn(t,n,o),f),m=a?await ln(t):void 0;m?.path!==d&&(d=m?.path,u=new Vt);let h=a?u.observe(m?.bytes,f):void 0;if(p&&(!a||h&&d)&&r)return await new Promise(e=>setTimeout(e,0)),{success:!0,bytes:p,allocatorBitcodePath:d,stdout:s.text(),stderr:c.text()};if(r&&i(e))return{success:!1,stdout:s.text(),stderr:e};await new Promise(e=>setTimeout(e,5))}throw Error(`${r} exceeded ${At} ms.`)}finally{await Promise.all([s.cancel(),c.cancel()]),e.free()}}function rn(e){if(!e.allocatorBitcodePath)throw Error(`rustc completed without its allocator bitcode module.`);return e.allocatorBitcodePath}function an(e){let t=e.getReader(),n=[],r=performance.now();return(async()=>{try{for(;;){let e=await t.read();if(e.done)return;let i=e.value instanceof Uint8Array?e.value:new Uint8Array(e.value);n.push(i.slice()),r=performance.now()}}catch{}})(),{text:()=>new TextDecoder().decode(on(n)),quietFor:e=>performance.now()-r>=e,cancel:async()=>{try{await t.cancel()}catch{}}}}function on(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.byteLength,0)),n=0;for(let r of e)t.set(r,n),n+=r.byteLength;return t}async function sn(e,t,n){let r=t.startsWith(`/work/`)?t.slice(5):t;try{let t=(await e.readFile(r)).slice();return t.byteLength>8&&n(t)?t:void 0}catch{return}}function cn(e){return e.byteLength>8&&new TextDecoder().decode(e.subarray(0,8))===`!<arch>
|
|
22
|
-
`}async function ln(e){try{let t=Ze((await e.readDir(`/build`)).map(e=>e.name));if(!t)return;let n=(await e.readFile(`/build/${t}`)).slice();return Qe(n)?{path:`/work/build/${t}`,bytes:n}:void 0}catch(e){if(e instanceof Error&&e.message.startsWith(`rustc emitted multiple`))throw e;return}}async function un(e){let t=(await dn(e,U.packageAsset,U.packageCompressedSha256)).body;if(!t)throw Error(`Pinned Rust WebC response has no body.`);let n=t.pipeThrough(new DecompressionStream(`gzip`)),r=new Uint8Array(await new Response(n).arrayBuffer());return await $(`decompressed Rust WebC`,r,U.packageSha256),r}async function dn(e,t,n){let r=t.slice(t.lastIndexOf(`/`)+1),i=await fetch(Ot(t,e));if(!i.ok)throw Error(`Unable to load pinned Rust toolchain asset '${r}' (${i.status}).`);return await $(r,new Uint8Array(await i.clone().arrayBuffer()),n),i}async function fn(e){return It(await pn(e,U.manifestAsset,U.manifestSha256))}async function pn(e,t,n){let r=t.slice(t.lastIndexOf(`/`)+1),i=await fetch(Ot(t,e));if(!i.ok)throw Error(`Unable to load pinned Rust toolchain asset '${r}' (${i.status}).`);let a=new Uint8Array(await i.arrayBuffer());return await $(r,a,n),a}async function $(e,t,n){let r=await zt(t);if(r!==n)throw Error(`Pinned Rust toolchain asset '${e}' has digest ${r}; expected ${n}.`)}
|