diff --git a/index.html b/index.html index d9908d6..34fc8f8 100644 --- a/index.html +++ b/index.html @@ -1 +1,16 @@ -Mamba-Minimal dfdx Example \ No newline at end of file + + + + + + + Mamba-Minimal dfdx Example + + + + + + + + + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..4095ccc --- /dev/null +++ b/index.js @@ -0,0 +1,9 @@ +import init, { + wasm_main, +} from "./pkg/mamba_minimal_dfdx_example.js"; + +async function run() { + await init(); + wasm_main(); +} +run(); \ No newline at end of file diff --git a/mamba-minimal-dfdx-example-6942ab83f543d1d3.js b/mamba-minimal-dfdx-example-6942ab83f543d1d3.js deleted file mode 100644 index 506eafd..0000000 --- a/mamba-minimal-dfdx-example-6942ab83f543d1d3.js +++ /dev/null @@ -1 +0,0 @@ -let T=`function`,N=null,Q=`undefined`,W=`boolean`,a4=640,X=`string`,a0=16,O=0,U=1,Z=`Object`,R=`utf-8`,V=`number`,a1=4,L=Array,Y=Array.isArray,S=Error,$=FinalizationRegistry,_=JSON.stringify,a3=Promise,a2=Reflect,P=Uint8Array,M=undefined;var F=(async(a,b)=>{if(typeof Response===T&&a instanceof Response){if(typeof WebAssembly.instantiateStreaming===T){try{return await WebAssembly.instantiateStreaming(a,b)}catch(b){if(a.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`,b)}else{throw b}}};const c=await a.arrayBuffer();return await WebAssembly.instantiate(c,b)}else{const c=await WebAssembly.instantiate(a,b);if(c instanceof WebAssembly.Instance){return {instance:c,module:a}}else{return c}}});var u=(a=>{const b=typeof a;if(b==V||b==W||a==N){return `${a}`};if(b==X){return `"${a}"`};if(b==`symbol`){const b=a.description;if(b==N){return `Symbol`}else{return `Symbol(${b})`}};if(b==T){const b=a.name;if(typeof b==X&&b.length>O){return `Function(${b})`}else{return `Function`}};if(Y(a)){const b=a.length;let c=`[`;if(b>O){c+=u(a[O])};for(let d=U;dU){d=c[U]}else{return toString.call(a)};if(d==Z){try{return `Object(`+ _(a)+ `)`}catch(a){return Z}};if(a instanceof S){return `${a.name}: ${a.message}\n${a.stack}`};return d});var A=((b,c)=>{a._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6fd0c3d349d87b1d(b,c)});var H=((a,b)=>{});var r=(a=>{if(m===b.length)b.push(b.length+ U);const c=m;m=b[c];b[c]=a;return c});var o=(a=>{const b=c(a);n(a);return b});var K=(async(b)=>{if(a!==M)return a;if(typeof b===Q){b=new URL(`mamba-minimal-dfdx-example-6942ab83f543d1d3_bg.wasm`,import.meta.url)};const c=G();if(typeof b===X||typeof Request===T&&b instanceof Request||typeof URL===T&&b instanceof URL){b=fetch(b)};H(c);const {instance:d,module:e}=await F(await b,c);return I(d,e)});var J=(b=>{if(a!==M)return a;const c=G();H(c);if(!(b instanceof WebAssembly.Module)){b=new WebAssembly.Module(b)};const d=new WebAssembly.Instance(b,c);return I(d,b)});function D(b,c){try{return b.apply(this,c)}catch(b){a.__wbindgen_exn_store(r(b))}}var y=((b,c,d)=>{a.wasm_bindgen__convert__closures__invoke1_mut__h624b8a87ccc4735e(b,c,r(d))});var E=((b,c,d,e)=>{a.wasm_bindgen__convert__closures__invoke2_mut__h44042075aee8e8f2(b,c,r(d),r(e))});var l=(()=>{if(k===N||k.byteLength===O){k=new Int32Array(a.memory.buffer)};return k});var j=(a=>a===M||a===N);var c=(a=>b[a]);var x=((b,c,d)=>{try{const g=a.__wbindgen_add_to_stack_pointer(-a0);a.wasm_bindgen__convert__closures__invoke1_mut__h77ad39fd65acd612(g,b,c,r(d));var e=l()[g/a1+ O];var f=l()[g/a1+ U];if(f){throw o(e)}}finally{a.__wbindgen_add_to_stack_pointer(a0)}});var G=(()=>{const b={};b.wbg={};b.wbg.__wbindgen_string_get=((b,e)=>{const f=c(e);const g=typeof f===X?f:M;var h=j(g)?O:i(g,a.__wbindgen_malloc,a.__wbindgen_realloc);var k=d;l()[b/a1+ U]=k;l()[b/a1+ O]=h});b.wbg.__wbindgen_object_drop_ref=(a=>{o(a)});b.wbg.__wbindgen_is_undefined=(a=>{const b=c(a)===M;return b});b.wbg.__wbindgen_cb_drop=(a=>{const b=o(a).original;if(b.cnt--==U){b.a=O;return !0};const c=!1;return c});b.wbg.__wbindgen_string_new=((a,b)=>{const c=q(a,b);return r(c)});b.wbg.__wbindgen_is_null=(a=>{const b=c(a)===N;return b});b.wbg.__wbg_new_abda76e883ba8a5f=(()=>{const a=new S();return r(a)});b.wbg.__wbg_stack_658279fe44541cf6=((b,e)=>{const f=c(e).stack;const g=i(f,a.__wbindgen_malloc,a.__wbindgen_realloc);const h=d;l()[b/a1+ U]=h;l()[b/a1+ O]=g});b.wbg.__wbg_error_f851667af71bcfc6=((b,c)=>{let d;let e;try{d=b;e=c;console.error(q(b,c))}finally{a.__wbindgen_free(d,e,U)}});b.wbg.__wbg_performance_3f3012faa4463882=(a=>{const b=c(a).performance;return r(b)});b.wbg.__wbg_now_2fd65358804c9485=(a=>{const b=c(a).now();return b});b.wbg.__wbindgen_is_object=(a=>{const b=c(a);const d=typeof b===`object`&&b!==N;return d});b.wbg.__wbindgen_jsval_loose_eq=((a,b)=>{const d=c(a)==c(b);return d});b.wbg.__wbindgen_boolean_get=(a=>{const b=c(a);const d=typeof b===W?(b?U:O):2;return d});b.wbg.__wbindgen_number_get=((a,b)=>{const d=c(b);const e=typeof d===V?d:M;t()[a/8+ U]=j(e)?O:e;l()[a/a1+ O]=!j(e)});b.wbg.__wbindgen_object_clone_ref=(a=>{const b=c(a);return r(b)});b.wbg.__wbindgen_error_new=((a,b)=>{const c=new S(q(a,b));return r(c)});b.wbg.__wbg_fetch_27eb4c0a08a9ca04=(a=>{const b=fetch(c(a));return r(b)});b.wbg.__wbg_queueMicrotask_f61ee94ee663068b=(a=>{queueMicrotask(c(a))});b.wbg.__wbg_queueMicrotask_f82fc5d1e8f816ae=(a=>{const b=c(a).queueMicrotask;return r(b)});b.wbg.__wbindgen_is_function=(a=>{const b=typeof c(a)===T;return b});b.wbg.__wbg_Window_4c97c099b03994c2=(a=>{const b=c(a).Window;return r(b)});b.wbg.__wbg_WorkerGlobalScope_b87d69ab991859f6=(a=>{const b=c(a).WorkerGlobalScope;return r(b)});b.wbg.__wbg_global_c22c39d5b60f622c=(a=>{const b=c(a).global;return r(b)});b.wbg.__wbg_indexedDB_f50e4ba5302a87c6=function(){return D((a=>{const b=c(a).indexedDB;return j(b)?O:r(b)}),arguments)};b.wbg.__wbg_indexedDB_77a16dc2a61961a9=function(){return D((a=>{const b=c(a).indexedDB;return j(b)?O:r(b)}),arguments)};b.wbg.__wbg_key_ef58c847107973b5=function(){return D((a=>{const b=c(a).key;return r(b)}),arguments)};b.wbg.__wbg_advance_b4757fc0d86c7f4b=function(){return D(((a,b)=>{c(a).advance(b>>>O)}),arguments)};b.wbg.__wbg_continue_e476fb4cd4175cd3=function(){return D((a=>{c(a).continue()}),arguments)};b.wbg.__wbg_open_e75f6c89e35c2edf=function(){return D(((a,b,d,e)=>{const f=c(a).open(q(b,d),e>>>O);return r(f)}),arguments)};b.wbg.__wbg_indexedDB_e4614e570b5f5c8f=function(){return D((a=>{const b=c(a).indexedDB;return j(b)?O:r(b)}),arguments)};b.wbg.__wbg_fetch_10edd7d7da150227=((a,b)=>{const d=c(a).fetch(c(b));return r(d)});b.wbg.__wbg_newwithmessage_612f0a9af04adcda=function(){return D(((a,b)=>{const c=new DOMException(q(a,b));return r(c)}),arguments)};b.wbg.__wbg_setonblocked_3b51cb452de6f3bb=((a,b)=>{c(a).onblocked=c(b)});b.wbg.__wbg_setonupgradeneeded_704b0c0061756fd9=((a,b)=>{c(a).onupgradeneeded=c(b)});b.wbg.__wbg_result_43ea35e72f0fa7c7=function(){return D((a=>{const b=c(a).result;return r(b)}),arguments)};b.wbg.__wbg_error_180ee1f6d813554e=function(){return D((a=>{const b=c(a).error;return j(b)?O:r(b)}),arguments)};b.wbg.__wbg_readyState_c01805a61691813e=(a=>{const b=c(a).readyState;return r(b)});b.wbg.__wbg_setonsuccess_07be5f02db609d40=((a,b)=>{c(a).onsuccess=c(b)});b.wbg.__wbg_setonerror_4042c0d324fafcf9=((a,b)=>{c(a).onerror=c(b)});b.wbg.__wbg_signal_8fbb4942ce477464=(a=>{const b=c(a).signal;return r(b)});b.wbg.__wbg_new_92cc7d259297256c=function(){return D((()=>{const a=new AbortController();return r(a)}),arguments)};b.wbg.__wbg_abort_510372063dd66b29=(a=>{c(a).abort()});b.wbg.__wbg_target_6795373f170fd786=(a=>{const b=c(a).target;return j(b)?O:r(b)});b.wbg.__wbg_objectStoreNames_2ecdd48caeba004f=(a=>{const b=c(a).objectStoreNames;return r(b)});b.wbg.__wbg_setonversionchange_205ab84a7e6decc6=((a,b)=>{c(a).onversionchange=c(b)});b.wbg.__wbg_createObjectStore_eaaf25a960c0a966=function(){return D(((a,b,d)=>{const e=c(a).createObjectStore(q(b,d));return r(e)}),arguments)};b.wbg.__wbg_transaction_f5db8426170b02d3=function(){return D(((a,b,d,e)=>{const f=c(a).transaction(q(b,d),o(e));return r(f)}),arguments)};b.wbg.__wbg_get_a511742412eef1ff=function(){return D(((a,b)=>{const d=c(a).get(c(b));return r(d)}),arguments)};b.wbg.__wbg_openKeyCursor_26c1fb36a73b8298=function(){return D(((a,b,d)=>{const e=c(a).openKeyCursor(c(b),o(d));return r(e)}),arguments)};b.wbg.__wbg_put_f5ab898915aa0ec4=function(){return D(((a,b,d)=>{const e=c(a).put(c(b),c(d));return r(e)}),arguments)};b.wbg.__wbg_setonabort_2580e07fbf4b5b38=((a,b)=>{c(a).onabort=c(b)});b.wbg.__wbg_setoncomplete_d9643b9200c8bfcb=((a,b)=>{c(a).oncomplete=c(b)});b.wbg.__wbg_setonerror_493ac3af685d641e=((a,b)=>{c(a).onerror=c(b)});b.wbg.__wbg_objectStore_402a3923882f9f3f=function(){return D(((a,b,d)=>{const e=c(a).objectStore(q(b,d));return r(e)}),arguments)};b.wbg.__wbg_new_4db22fd5d40c5665=function(){return D((()=>{const a=new Headers();return r(a)}),arguments)};b.wbg.__wbg_append_b2e8ed692fc5eb6e=function(){return D(((a,b,d,e,f)=>{c(a).append(q(b,d),q(e,f))}),arguments)};b.wbg.__wbg_newwithstrandinit_11fbc38beb4c26b0=function(){return D(((a,b,d)=>{const e=new Request(q(a,b),c(d));return r(e)}),arguments)};b.wbg.__wbg_instanceof_Response_b5451a06784a2404=(a=>{let b;try{b=c(a) instanceof Response}catch(a){b=!1}const d=b;return d});b.wbg.__wbg_url_e319aee56d26ddf1=((b,e)=>{const f=c(e).url;const g=i(f,a.__wbindgen_malloc,a.__wbindgen_realloc);const h=d;l()[b/a1+ U]=h;l()[b/a1+ O]=g});b.wbg.__wbg_status_bea567d1049f0b6a=(a=>{const b=c(a).status;return b});b.wbg.__wbg_headers_96d9457941f08a33=(a=>{const b=c(a).headers;return r(b)});b.wbg.__wbg_arrayBuffer_eb2005809be09726=function(){return D((a=>{const b=c(a).arrayBuffer();return r(b)}),arguments)};b.wbg.__wbg_bound_2d90577c5b6adffd=function(){return D(((a,b)=>{const d=IDBKeyRange.bound(c(a),c(b));return r(d)}),arguments)};b.wbg.__wbg_debug_a0de8bb323ed3e46=((a,b,d,e)=>{console.debug(c(a),c(b),c(d),c(e))});b.wbg.__wbg_error_621c11091f132493=((a,b,d,e)=>{console.error(c(a),c(b),c(d),c(e))});b.wbg.__wbg_info_0d0cfdd0035dc3f3=((a,b,d,e)=>{console.info(c(a),c(b),c(d),c(e))});b.wbg.__wbg_log_c957bb910fba09c1=((a,b,d,e)=>{console.log(c(a),c(b),c(d),c(e))});b.wbg.__wbg_warn_0912b6f3e9479355=((a,b,d,e)=>{console.warn(c(a),c(b),c(d),c(e))});b.wbg.__wbg_length_f4c93968efbcbe64=(a=>{const b=c(a).length;return b});b.wbg.__wbg_item_4274da988459f191=((b,e,f)=>{const g=c(e).item(f>>>O);var h=j(g)?O:i(g,a.__wbindgen_malloc,a.__wbindgen_realloc);var k=d;l()[b/a1+ U]=k;l()[b/a1+ O]=h});b.wbg.__wbg_crypto_d05b68a3572bb8ca=(a=>{const b=c(a).crypto;return r(b)});b.wbg.__wbg_process_b02b3570280d0366=(a=>{const b=c(a).process;return r(b)});b.wbg.__wbg_versions_c1cb42213cedf0f5=(a=>{const b=c(a).versions;return r(b)});b.wbg.__wbg_node_43b1089f407e4ec2=(a=>{const b=c(a).node;return r(b)});b.wbg.__wbindgen_is_string=(a=>{const b=typeof c(a)===X;return b});b.wbg.__wbg_require_9a7e0f667ead4995=function(){return D((()=>{const a=module.require;return r(a)}),arguments)};b.wbg.__wbg_msCrypto_10fc94afee92bd76=(a=>{const b=c(a).msCrypto;return r(b)});b.wbg.__wbg_randomFillSync_b70ccbdf4926a99d=function(){return D(((a,b)=>{c(a).randomFillSync(o(b))}),arguments)};b.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d=function(){return D(((a,b)=>{c(a).getRandomValues(c(b))}),arguments)};b.wbg.__wbg_get_0ee8ea3c7c984c45=((a,b)=>{const d=c(a)[b>>>O];return r(d)});b.wbg.__wbg_length_161c0d89c6535c1d=(a=>{const b=c(a).length;return b});b.wbg.__wbg_newnoargs_cfecb3965268594c=((a,b)=>{const c=new Function(q(a,b));return r(c)});b.wbg.__wbg_next_586204376d2ed373=(a=>{const b=c(a).next;return r(b)});b.wbg.__wbg_next_b2d3366343a208b3=function(){return D((a=>{const b=c(a).next();return r(b)}),arguments)};b.wbg.__wbg_done_90b14d6f6eacc42f=(a=>{const b=c(a).done;return b});b.wbg.__wbg_value_3158be908c80a75e=(a=>{const b=c(a).value;return r(b)});b.wbg.__wbg_iterator_40027cdd598da26b=(()=>{const a=Symbol.iterator;return r(a)});b.wbg.__wbg_get_3fddfed2c83f434c=function(){return D(((a,b)=>{const d=a2.get(c(a),c(b));return r(d)}),arguments)};b.wbg.__wbg_call_3f093dd26d5569f8=function(){return D(((a,b)=>{const d=c(a).call(c(b));return r(d)}),arguments)};b.wbg.__wbg_new_632630b5cec17f21=(()=>{const a=new Object();return r(a)});b.wbg.__wbg_self_05040bd9523805b9=function(){return D((()=>{const a=self.self;return r(a)}),arguments)};b.wbg.__wbg_window_adc720039f2cb14f=function(){return D((()=>{const a=window.window;return r(a)}),arguments)};b.wbg.__wbg_globalThis_622105db80c1457d=function(){return D((()=>{const a=globalThis.globalThis;return r(a)}),arguments)};b.wbg.__wbg_global_f56b013ed9bcf359=function(){return D((()=>{const a=global.global;return r(a)}),arguments)};b.wbg.__wbg_isArray_e783c41d0dd19b44=(a=>{const b=Y(c(a));return b});b.wbg.__wbg_instanceof_ArrayBuffer_9221fa854ffb71b5=(a=>{let b;try{b=c(a) instanceof ArrayBuffer}catch(a){b=!1}const d=b;return d});b.wbg.__wbg_call_67f2111acd2dfdb6=function(){return D(((a,b,d)=>{const e=c(a).call(c(b),c(d));return r(e)}),arguments)};b.wbg.__wbg_new_70828a4353259d4b=((a,b)=>{try{var c={a:a,b:b};var d=(a,b)=>{const d=c.a;c.a=O;try{return E(d,c.b,a,b)}finally{c.a=d}};const e=new a3(d);return r(e)}finally{c.a=c.b=O}});b.wbg.__wbg_resolve_5da6faf2c96fd1d5=(a=>{const b=a3.resolve(c(a));return r(b)});b.wbg.__wbg_then_f9e58f5a50f43eae=((a,b)=>{const d=c(a).then(c(b));return r(d)});b.wbg.__wbg_then_20a5920e447d1cb1=((a,b,d)=>{const e=c(a).then(c(b),c(d));return r(e)});b.wbg.__wbg_buffer_b914fb8b50ebbc3e=(a=>{const b=c(a).buffer;return r(b)});b.wbg.__wbg_newwithbyteoffsetandlength_0de9ee56e9f6ee6e=((a,b,d)=>{const e=new P(c(a),b>>>O,d>>>O);return r(e)});b.wbg.__wbg_new_b1f2d6842d615181=(a=>{const b=new P(c(a));return r(b)});b.wbg.__wbg_set_7d988c98e6ced92d=((a,b,d)=>{c(a).set(c(b),d>>>O)});b.wbg.__wbg_length_21c4b0ae73cba59d=(a=>{const b=c(a).length;return b});b.wbg.__wbg_instanceof_Uint8Array_c299a4ee232e76ba=(a=>{let b;try{b=c(a) instanceof P}catch(a){b=!1}const d=b;return d});b.wbg.__wbg_newwithlength_0d03cef43b68a530=(a=>{const b=new P(a>>>O);return r(b)});b.wbg.__wbg_subarray_adc418253d76e2f1=((a,b,d)=>{const e=c(a).subarray(b>>>O,d>>>O);return r(e)});b.wbg.__wbg_has_ad45eb020184f624=function(){return D(((a,b)=>{const d=a2.has(c(a),c(b));return d}),arguments)};b.wbg.__wbg_set_961700853a212a39=function(){return D(((a,b,d)=>{const e=a2.set(c(a),c(b),c(d));return e}),arguments)};b.wbg.__wbg_stringify_865daa6fb8c83d5a=function(){return D((a=>{const b=_(c(a));return r(b)}),arguments)};b.wbg.__wbindgen_debug_string=((b,e)=>{const f=u(c(e));const g=i(f,a.__wbindgen_malloc,a.__wbindgen_realloc);const h=d;l()[b/a1+ U]=h;l()[b/a1+ O]=g});b.wbg.__wbindgen_throw=((a,b)=>{throw new S(q(a,b))});b.wbg.__wbindgen_memory=(()=>{const b=a.memory;return r(b)});b.wbg.__wbindgen_closure_wrapper534=((a,b,c)=>{const d=w(a,b,163,x);return r(d)});b.wbg.__wbindgen_closure_wrapper1496=((a,b,c)=>{const d=w(a,b,546,y);return r(d)});b.wbg.__wbindgen_closure_wrapper1739=((a,b,c)=>{const d=z(a,b,a4,A);return r(d)});b.wbg.__wbindgen_closure_wrapper1741=((a,b,c)=>{const d=z(a,b,a4,B);return r(d)});return b});var B=((b,c,d)=>{a._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h19b27ff36840b974(b,c,r(d))});var t=(()=>{if(s===N||s.byteLength===O){s=new Float64Array(a.memory.buffer)};return s});var z=((b,c,d,e)=>{const f={a:b,b:c,cnt:U,dtor:d};const g=(...b)=>{f.cnt++;try{return e(f.a,f.b,...b)}finally{if(--f.cnt===O){a.__wbindgen_export_2.get(f.dtor)(f.a,f.b);f.a=O;v.unregister(f)}}};g.original=f;v.register(g,f,f);return g});var n=(a=>{if(a<132)return;b[a]=m;m=a});var w=((b,c,d,e)=>{const f={a:b,b:c,cnt:U,dtor:d};const g=(...b)=>{f.cnt++;const c=f.a;f.a=O;try{return e(c,f.b,...b)}finally{if(--f.cnt===O){a.__wbindgen_export_2.get(f.dtor)(c,f.b);v.unregister(f)}else{f.a=c}}};g.original=f;v.register(g,f,f);return g});var f=(()=>{if(e===N||e.byteLength===O){e=new P(a.memory.buffer)};return e});var i=((a,b,c)=>{if(c===M){const c=g.encode(a);const e=b(c.length,U)>>>O;f().subarray(e,e+ c.length).set(c);d=c.length;return e};let e=a.length;let i=b(e,U)>>>O;const j=f();let k=O;for(;k127)break;j[i+ k]=b};if(k!==e){if(k!==O){a=a.slice(k)};i=c(i,e,e=k+ a.length*3,U)>>>O;const b=f().subarray(i+ k,i+ e);const d=h(a,b);k+=d.written;i=c(i,e,k,U)>>>O};d=k;return i});var q=((a,b)=>{a=a>>>O;return p.decode(f().subarray(a,a+ b))});var I=((b,c)=>{a=b.exports;K.__wbindgen_wasm_module=c;s=N;k=N;e=N;return a});let a;const b=new L(128).fill(M);b.push(M,N,!0,!1);let d=O;let e=N;const g=typeof TextEncoder!==Q?new TextEncoder(R):{encode:()=>{throw S(`TextEncoder not available`)}};const h=typeof g.encodeInto===T?((a,b)=>g.encodeInto(a,b)):((a,b)=>{const c=g.encode(a);b.set(c);return {read:a.length,written:c.length}});let k=N;let m=b.length;const p=typeof TextDecoder!==Q?new TextDecoder(R,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw S(`TextDecoder not available`)}};if(typeof TextDecoder!==Q){p.decode()};let s=N;const v=typeof $===Q?{register:()=>{},unregister:()=>{}}:new $(b=>{a.__wbindgen_export_2.get(b.dtor)(b.a,b.b)});function C(){const b=a.wasm_main();return o(b)}export default K;export{C as wasm_main,J as initSync} \ No newline at end of file diff --git a/mamba-minimal-dfdx-example-6942ab83f543d1d3_bg.wasm b/mamba-minimal-dfdx-example-6942ab83f543d1d3_bg.wasm deleted file mode 100644 index 1720c0a..0000000 Binary files a/mamba-minimal-dfdx-example-6942ab83f543d1d3_bg.wasm and /dev/null differ diff --git a/pkg/README.md b/pkg/README.md new file mode 100644 index 0000000..42b43af --- /dev/null +++ b/pkg/README.md @@ -0,0 +1,27 @@ +# mamba-minimal-dfdx-example + +Click [here](https://swfsql.github.io/mamba-minimal-dfdx-example/) to run the model in your browser. + +### Information + +Adapted from [huggingface/candle/mamba-minimal](https://github.com/huggingface/candle/blob/fd7c8565646039e35925b8730d27ddad195d7e73/candle-examples/examples/mamba-minimal/). + +### Building + +##### Native +```bash +RUSTFLAGS="-C target-cpu=native" +cargo run --release --no-default-features --features "native" +``` + +##### WASM +```bash +# no-ui (web console only) +wasm-pack build --release --target web --no-default-features + +# yew web ui +wasm-pack build --release --target web --no-default-features --features "wasm_yew_ui" + +# serve +http -a 127.0.0.1 +``` diff --git a/pkg/mamba_minimal_dfdx_example.d.ts b/pkg/mamba_minimal_dfdx_example.d.ts new file mode 100644 index 0000000..cc295ec --- /dev/null +++ b/pkg/mamba_minimal_dfdx_example.d.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/** +* @returns {Promise} +*/ +export function wasm_main(): Promise; + +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; + +export interface InitOutput { + readonly memory: WebAssembly.Memory; + readonly wasm_main: () => number; + readonly __wbindgen_malloc: (a: number, b: number) => number; + readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; + readonly __wbindgen_export_2: WebAssembly.Table; + readonly __wbindgen_add_to_stack_pointer: (a: number) => number; + readonly wasm_bindgen__convert__closures__invoke1_mut__hd900a1c510a7707a: (a: number, b: number, c: number, d: number) => void; + readonly wasm_bindgen__convert__closures__invoke0_mut__h8a02d42e2eddadcb: (a: number, b: number) => void; + readonly wasm_bindgen__convert__closures__invoke1_ref__hb15501be9eb16ca5: (a: number, b: number, c: number) => void; + readonly wasm_bindgen__convert__closures__invoke1_mut__hf3471ddd9a2ede48: (a: number, b: number, c: number) => void; + readonly _dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h54161439976fad6b: (a: number, b: number) => void; + readonly _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3aae48ea73e72c08: (a: number, b: number, c: number) => void; + readonly __wbindgen_free: (a: number, b: number, c: number) => void; + readonly __wbindgen_exn_store: (a: number) => void; + readonly wasm_bindgen__convert__closures__invoke2_mut__h30097a3fa11435cd: (a: number, b: number, c: number, d: number) => void; +} + +export type SyncInitInput = BufferSource | WebAssembly.Module; +/** +* Instantiates the given `module`, which can either be bytes or +* a precompiled `WebAssembly.Module`. +* +* @param {SyncInitInput} module +* +* @returns {InitOutput} +*/ +export function initSync(module: SyncInitInput): InitOutput; + +/** +* If `module_or_path` is {RequestInfo} or {URL}, makes a request and +* for everything else, calls `WebAssembly.instantiate` directly. +* +* @param {InitInput | Promise} module_or_path +* +* @returns {Promise} +*/ +export default function __wbg_init (module_or_path?: InitInput | Promise): Promise; diff --git a/pkg/mamba_minimal_dfdx_example.js b/pkg/mamba_minimal_dfdx_example.js new file mode 100644 index 0000000..2bd595c --- /dev/null +++ b/pkg/mamba_minimal_dfdx_example.js @@ -0,0 +1,1113 @@ +let wasm; + +const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + +if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; + +let cachedUint8Memory0 = null; + +function getUint8Memory0() { + if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { + cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8Memory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + +const heap = new Array(128).fill(undefined); + +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function getObject(idx) { return heap[idx]; } + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +let WASM_VECTOR_LEN = 0; + +const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); + +const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); +} + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length + }; +}); + +function passStringToWasm0(arg, malloc, realloc) { + + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8Memory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7F) break; + mem[ptr + offset] = code; + } + + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; + const view = getUint8Memory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + ptr = realloc(ptr, len, offset, 1) >>> 0; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +function isLikeNone(x) { + return x === undefined || x === null; +} + +let cachedInt32Memory0 = null; + +function getInt32Memory0() { + if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { + cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachedInt32Memory0; +} + +function debugString(val) { + // primitive types + const type = typeof val; + if (type == 'number' || type == 'boolean' || val == null) { + return `${val}`; + } + if (type == 'string') { + return `"${val}"`; + } + if (type == 'symbol') { + const description = val.description; + if (description == null) { + return 'Symbol'; + } else { + return `Symbol(${description})`; + } + } + if (type == 'function') { + const name = val.name; + if (typeof name == 'string' && name.length > 0) { + return `Function(${name})`; + } else { + return 'Function'; + } + } + // objects + if (Array.isArray(val)) { + const length = val.length; + let debug = '['; + if (length > 0) { + debug += debugString(val[0]); + } + for(let i = 1; i < length; i++) { + debug += ', ' + debugString(val[i]); + } + debug += ']'; + return debug; + } + // Test for built-in + const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); + let className; + if (builtInMatches.length > 1) { + className = builtInMatches[1]; + } else { + // Failed to match the standard '[object ClassName]' + return toString.call(val); + } + if (className == 'Object') { + // we're a user defined class or Object + // JSON.stringify avoids problems with cycles, and is generally much + // easier than looping through ownProperties of `val`. + try { + return 'Object(' + JSON.stringify(val) + ')'; + } catch (_) { + return 'Object'; + } + } + // errors + if (val instanceof Error) { + return `${val.name}: ${val.message}\n${val.stack}`; + } + // TODO we could test for more things here, like `Set`s and `Map`s. + return className; +} + +const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') + ? { register: () => {}, unregister: () => {} } + : new FinalizationRegistry(state => { + wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b) +}); + +function makeMutClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + const real = (...args) => { + // First up with a closure we increment the internal reference + // count. This ensures that the Rust closure environment won't + // be deallocated while we're invoking it. + state.cnt++; + const a = state.a; + state.a = 0; + try { + return f(a, state.b, ...args); + } finally { + if (--state.cnt === 0) { + wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); + CLOSURE_DTORS.unregister(state); + } else { + state.a = a; + } + } + }; + real.original = state; + CLOSURE_DTORS.register(real, state, state); + return real; +} +function __wbg_adapter_28(arg0, arg1, arg2) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.wasm_bindgen__convert__closures__invoke1_mut__hd900a1c510a7707a(retptr, arg0, arg1, addHeapObject(arg2)); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + if (r1) { + throw takeObject(r0); + } + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +function __wbg_adapter_31(arg0, arg1) { + wasm.wasm_bindgen__convert__closures__invoke0_mut__h8a02d42e2eddadcb(arg0, arg1); +} + +function makeClosure(arg0, arg1, dtor, f) { + const state = { a: arg0, b: arg1, cnt: 1, dtor }; + const real = (...args) => { + // First up with a closure we increment the internal reference + // count. This ensures that the Rust closure environment won't + // be deallocated while we're invoking it. + state.cnt++; + try { + return f(state.a, state.b, ...args); + } finally { + if (--state.cnt === 0) { + wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b); + state.a = 0; + CLOSURE_DTORS.unregister(state); + } + } + }; + real.original = state; + CLOSURE_DTORS.register(real, state, state); + return real; +} + +let stack_pointer = 128; + +function addBorrowedObject(obj) { + if (stack_pointer == 1) throw new Error('out of js stack'); + heap[--stack_pointer] = obj; + return stack_pointer; +} +function __wbg_adapter_34(arg0, arg1, arg2) { + try { + wasm.wasm_bindgen__convert__closures__invoke1_ref__hb15501be9eb16ca5(arg0, arg1, addBorrowedObject(arg2)); + } finally { + heap[stack_pointer++] = undefined; + } +} + +function __wbg_adapter_37(arg0, arg1, arg2) { + wasm.wasm_bindgen__convert__closures__invoke1_mut__hf3471ddd9a2ede48(arg0, arg1, addHeapObject(arg2)); +} + +function __wbg_adapter_40(arg0, arg1) { + wasm._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h54161439976fad6b(arg0, arg1); +} + +function __wbg_adapter_43(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3aae48ea73e72c08(arg0, arg1, addHeapObject(arg2)); +} + +/** +* @returns {Promise} +*/ +export function wasm_main() { + const ret = wasm.wasm_main(); + return takeObject(ret); +} + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + wasm.__wbindgen_exn_store(addHeapObject(e)); + } +} + +let cachedUint32Memory0 = null; + +function getUint32Memory0() { + if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) { + cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer); + } + return cachedUint32Memory0; +} + +function getArrayJsValueFromWasm0(ptr, len) { + ptr = ptr >>> 0; + const mem = getUint32Memory0(); + const slice = mem.subarray(ptr / 4, ptr / 4 + len); + const result = []; + for (let i = 0; i < slice.length; i++) { + result.push(takeObject(slice[i])); + } + return result; +} +function __wbg_adapter_289(arg0, arg1, arg2, arg3) { + wasm.wasm_bindgen__convert__closures__invoke2_mut__h30097a3fa11435cd(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); +} + +async function __wbg_load(module, imports) { + if (typeof Response === 'function' && module instanceof Response) { + if (typeof WebAssembly.instantiateStreaming === 'function') { + try { + return await WebAssembly.instantiateStreaming(module, imports); + + } catch (e) { + if (module.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", e); + + } else { + throw e; + } + } + } + + const bytes = await module.arrayBuffer(); + return await WebAssembly.instantiate(bytes, imports); + + } else { + const instance = await WebAssembly.instantiate(module, imports); + + if (instance instanceof WebAssembly.Instance) { + return { instance, module }; + + } else { + return instance; + } + } +} + +function __wbg_get_imports() { + const imports = {}; + imports.wbg = {}; + imports.wbg.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_object_drop_ref = function(arg0) { + takeObject(arg0); + }; + imports.wbg.__wbindgen_cb_drop = function(arg0) { + const obj = takeObject(arg0).original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + return ret; + }; + imports.wbg.__wbindgen_is_undefined = function(arg0) { + const ret = getObject(arg0) === undefined; + return ret; + }; + imports.wbg.__wbindgen_string_get = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'string' ? obj : undefined; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbindgen_is_null = function(arg0) { + const ret = getObject(arg0) === null; + return ret; + }; + imports.wbg.__wbindgen_object_clone_ref = function(arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); + }; + imports.wbg.__wbg_listenerid_6dcf1c62b7b7de58 = function(arg0, arg1) { + const ret = getObject(arg1).__yew_listener_id; + getInt32Memory0()[arg0 / 4 + 1] = isLikeNone(ret) ? 0 : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); + }; + imports.wbg.__wbg_setlistenerid_f2e783343fa0cec1 = function(arg0, arg1) { + getObject(arg0).__yew_listener_id = arg1 >>> 0; + }; + imports.wbg.__wbg_cachekey_b81c1aacc6a0645c = function(arg0, arg1) { + const ret = getObject(arg1).__yew_subtree_cache_key; + getInt32Memory0()[arg0 / 4 + 1] = isLikeNone(ret) ? 0 : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); + }; + imports.wbg.__wbg_subtreeid_e80a1798fee782f9 = function(arg0, arg1) { + const ret = getObject(arg1).__yew_subtree_id; + getInt32Memory0()[arg0 / 4 + 1] = isLikeNone(ret) ? 0 : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); + }; + imports.wbg.__wbg_setsubtreeid_e1fab6b578c800cf = function(arg0, arg1) { + getObject(arg0).__yew_subtree_id = arg1 >>> 0; + }; + imports.wbg.__wbg_setcachekey_75bcd45312087529 = function(arg0, arg1) { + getObject(arg0).__yew_subtree_cache_key = arg1 >>> 0; + }; + imports.wbg.__wbg_new_abda76e883ba8a5f = function() { + const ret = new Error(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) { + const ret = getObject(arg1).stack; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) { + let deferred0_0; + let deferred0_1; + try { + deferred0_0 = arg0; + deferred0_1 = arg1; + console.error(getStringFromWasm0(arg0, arg1)); + } finally { + wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); + } + }; + imports.wbg.__wbg_clearInterval_7f51e4380e64c6c5 = function(arg0) { + const ret = clearInterval(takeObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_setInterval_e227d4d8a9d44d66 = function() { return handleError(function (arg0, arg1) { + const ret = setInterval(getObject(arg0), arg1); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_error_a526fb08a0205972 = function(arg0, arg1) { + var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice(); + wasm.__wbindgen_free(arg0, arg1 * 4, 4); + console.error(...v0); + }; + imports.wbg.__wbg_fetch_27eb4c0a08a9ca04 = function(arg0) { + const ret = fetch(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_queueMicrotask_f61ee94ee663068b = function(arg0) { + queueMicrotask(getObject(arg0)); + }; + imports.wbg.__wbg_queueMicrotask_f82fc5d1e8f816ae = function(arg0) { + const ret = getObject(arg0).queueMicrotask; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_is_function = function(arg0) { + const ret = typeof(getObject(arg0)) === 'function'; + return ret; + }; + imports.wbg.__wbg_Window_4c97c099b03994c2 = function(arg0) { + const ret = getObject(arg0).Window; + return addHeapObject(ret); + }; + imports.wbg.__wbg_WorkerGlobalScope_b87d69ab991859f6 = function(arg0) { + const ret = getObject(arg0).WorkerGlobalScope; + return addHeapObject(ret); + }; + imports.wbg.__wbg_global_c22c39d5b60f622c = function(arg0) { + const ret = getObject(arg0).global; + return addHeapObject(ret); + }; + imports.wbg.__wbg_indexedDB_f50e4ba5302a87c6 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).indexedDB; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_body_874ccb42daaab363 = function(arg0) { + const ret = getObject(arg0).body; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_createElement_03cf347ddad1c8c0 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_createElementNS_93f8de4acdef6da8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + const ret = getObject(arg0).createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_createTextNode_ea32ad2506f7ae78 = function(arg0, arg1, arg2) { + const ret = getObject(arg0).createTextNode(getStringFromWasm0(arg1, arg2)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_instanceof_Window_cee7a886d55e7df5 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Window; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_document_eb7fd66bde3ee213 = function(arg0) { + const ret = getObject(arg0).document; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_indexedDB_77a16dc2a61961a9 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).indexedDB; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_instanceof_Element_813f33306edae612 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Element; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_namespaceURI_230708ae7f4baac5 = function(arg0, arg1) { + const ret = getObject(arg1).namespaceURI; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_setinnerHTML_95222f1a2e797983 = function(arg0, arg1, arg2) { + getObject(arg0).innerHTML = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_outerHTML_eb21059e86b1e9f4 = function(arg0, arg1) { + const ret = getObject(arg1).outerHTML; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_removeAttribute_0c021c98a4dc7402 = function() { return handleError(function (arg0, arg1, arg2) { + getObject(arg0).removeAttribute(getStringFromWasm0(arg1, arg2)); + }, arguments) }; + imports.wbg.__wbg_setAttribute_f7ffa687ef977957 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_key_ef58c847107973b5 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).key; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_advance_b4757fc0d86c7f4b = function() { return handleError(function (arg0, arg1) { + getObject(arg0).advance(arg1 >>> 0); + }, arguments) }; + imports.wbg.__wbg_continue_e476fb4cd4175cd3 = function() { return handleError(function (arg0) { + getObject(arg0).continue(); + }, arguments) }; + imports.wbg.__wbg_open_e75f6c89e35c2edf = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = getObject(arg0).open(getStringFromWasm0(arg1, arg2), arg3 >>> 0); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_indexedDB_e4614e570b5f5c8f = function() { return handleError(function (arg0) { + const ret = getObject(arg0).indexedDB; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_fetch_10edd7d7da150227 = function(arg0, arg1) { + const ret = getObject(arg0).fetch(getObject(arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_newwithmessage_612f0a9af04adcda = function() { return handleError(function (arg0, arg1) { + const ret = new DOMException(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_setonblocked_3b51cb452de6f3bb = function(arg0, arg1) { + getObject(arg0).onblocked = getObject(arg1); + }; + imports.wbg.__wbg_setonupgradeneeded_704b0c0061756fd9 = function(arg0, arg1) { + getObject(arg0).onupgradeneeded = getObject(arg1); + }; + imports.wbg.__wbg_result_43ea35e72f0fa7c7 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).result; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_error_180ee1f6d813554e = function() { return handleError(function (arg0) { + const ret = getObject(arg0).error; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_readyState_c01805a61691813e = function(arg0) { + const ret = getObject(arg0).readyState; + return addHeapObject(ret); + }; + imports.wbg.__wbg_setonsuccess_07be5f02db609d40 = function(arg0, arg1) { + getObject(arg0).onsuccess = getObject(arg1); + }; + imports.wbg.__wbg_setonerror_4042c0d324fafcf9 = function(arg0, arg1) { + getObject(arg0).onerror = getObject(arg1); + }; + imports.wbg.__wbg_signal_8fbb4942ce477464 = function(arg0) { + const ret = getObject(arg0).signal; + return addHeapObject(ret); + }; + imports.wbg.__wbg_new_92cc7d259297256c = function() { return handleError(function () { + const ret = new AbortController(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_abort_510372063dd66b29 = function(arg0) { + getObject(arg0).abort(); + }; + imports.wbg.__wbg_instanceof_Event_3282356e36ce8685 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Event; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_target_6795373f170fd786 = function(arg0) { + const ret = getObject(arg0).target; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_bubbles_31126fc08276cf99 = function(arg0) { + const ret = getObject(arg0).bubbles; + return ret; + }; + imports.wbg.__wbg_cancelBubble_ae95595adf5ae83d = function(arg0) { + const ret = getObject(arg0).cancelBubble; + return ret; + }; + imports.wbg.__wbg_composedPath_bd8a0336a042e053 = function(arg0) { + const ret = getObject(arg0).composedPath(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_objectStoreNames_2ecdd48caeba004f = function(arg0) { + const ret = getObject(arg0).objectStoreNames; + return addHeapObject(ret); + }; + imports.wbg.__wbg_setonversionchange_205ab84a7e6decc6 = function(arg0, arg1) { + getObject(arg0).onversionchange = getObject(arg1); + }; + imports.wbg.__wbg_createObjectStore_eaaf25a960c0a966 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).createObjectStore(getStringFromWasm0(arg1, arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_transaction_f5db8426170b02d3 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + const ret = getObject(arg0).transaction(getStringFromWasm0(arg1, arg2), takeObject(arg3)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_delete_e7f0bdfa8e9100d2 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).delete(getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_get_a511742412eef1ff = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).get(getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_openKeyCursor_26c1fb36a73b8298 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).openKeyCursor(getObject(arg1), takeObject(arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_put_f5ab898915aa0ec4 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).put(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_setonabort_2580e07fbf4b5b38 = function(arg0, arg1) { + getObject(arg0).onabort = getObject(arg1); + }; + imports.wbg.__wbg_setoncomplete_d9643b9200c8bfcb = function(arg0, arg1) { + getObject(arg0).oncomplete = getObject(arg1); + }; + imports.wbg.__wbg_setonerror_493ac3af685d641e = function(arg0, arg1) { + getObject(arg0).onerror = getObject(arg1); + }; + imports.wbg.__wbg_objectStore_402a3923882f9f3f = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).objectStore(getStringFromWasm0(arg1, arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_parentNode_e3a5ee563364a613 = function(arg0) { + const ret = getObject(arg0).parentNode; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_parentElement_45a9756dc74ff48b = function(arg0) { + const ret = getObject(arg0).parentElement; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_childNodes_535387effca84f4e = function(arg0) { + const ret = getObject(arg0).childNodes; + return addHeapObject(ret); + }; + imports.wbg.__wbg_lastChild_d22dbf81f92f163b = function(arg0) { + const ret = getObject(arg0).lastChild; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_nextSibling_87d2b32dfbf09fe3 = function(arg0) { + const ret = getObject(arg0).nextSibling; + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }; + imports.wbg.__wbg_setnodeValue_d1cec51282858afe = function(arg0, arg1, arg2) { + getObject(arg0).nodeValue = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_textContent_528ff517a0418a3e = function(arg0, arg1) { + const ret = getObject(arg1).textContent; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_cloneNode_ea49a704f0699b2e = function() { return handleError(function (arg0) { + const ret = getObject(arg0).cloneNode(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_insertBefore_2be91083083caa9e = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).insertBefore(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_removeChild_660924798c7e128c = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).removeChild(getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_instanceof_ShadowRoot_ef56f954a86c7472 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof ShadowRoot; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_host_dfffc3b2ba786fb8 = function(arg0) { + const ret = getObject(arg0).host; + return addHeapObject(ret); + }; + imports.wbg.__wbg_new_4db22fd5d40c5665 = function() { return handleError(function () { + const ret = new Headers(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_append_b2e8ed692fc5eb6e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_instanceof_HtmlTextAreaElement_1897c40a53bffa72 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLTextAreaElement; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_value_ffef403d62e3df58 = function(arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_setvalue_cbab536654d8dd52 = function(arg0, arg1, arg2) { + getObject(arg0).value = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_newwithstrandinit_11fbc38beb4c26b0 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_instanceof_Response_b5451a06784a2404 = function(arg0) { + let result; + try { + result = getObject(arg0) instanceof Response; + } catch (_) { + result = false; + } + const ret = result; + return ret; + }; + imports.wbg.__wbg_url_e319aee56d26ddf1 = function(arg0, arg1) { + const ret = getObject(arg1).url; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_status_bea567d1049f0b6a = function(arg0) { + const ret = getObject(arg0).status; + return ret; + }; + imports.wbg.__wbg_headers_96d9457941f08a33 = function(arg0) { + const ret = getObject(arg0).headers; + return addHeapObject(ret); + }; + imports.wbg.__wbg_arrayBuffer_eb2005809be09726 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).arrayBuffer(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_bound_2d90577c5b6adffd = function() { return handleError(function (arg0, arg1) { + const ret = IDBKeyRange.bound(getObject(arg0), getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_debug_a0de8bb323ed3e46 = function(arg0, arg1, arg2, arg3) { + console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); + }; + imports.wbg.__wbg_error_621c11091f132493 = function(arg0, arg1, arg2, arg3) { + console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); + }; + imports.wbg.__wbg_info_0d0cfdd0035dc3f3 = function(arg0, arg1, arg2, arg3) { + console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); + }; + imports.wbg.__wbg_log_c957bb910fba09c1 = function(arg0, arg1, arg2, arg3) { + console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); + }; + imports.wbg.__wbg_warn_0912b6f3e9479355 = function(arg0, arg1, arg2, arg3) { + console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); + }; + imports.wbg.__wbg_length_f4c93968efbcbe64 = function(arg0) { + const ret = getObject(arg0).length; + return ret; + }; + imports.wbg.__wbg_item_4274da988459f191 = function(arg0, arg1, arg2) { + const ret = getObject(arg1).item(arg2 >>> 0); + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_addEventListener_bc4a7ad4cc72c6bf = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4)); + }, arguments) }; + imports.wbg.__wbg_setchecked_50e21357d62a8ccd = function(arg0, arg1) { + getObject(arg0).checked = arg1 !== 0; + }; + imports.wbg.__wbg_value_99f5294791d62576 = function(arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_setvalue_bba31de32cdbb32c = function(arg0, arg1, arg2) { + getObject(arg0).value = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_crypto_d05b68a3572bb8ca = function(arg0) { + const ret = getObject(arg0).crypto; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_is_object = function(arg0) { + const val = getObject(arg0); + const ret = typeof(val) === 'object' && val !== null; + return ret; + }; + imports.wbg.__wbg_process_b02b3570280d0366 = function(arg0) { + const ret = getObject(arg0).process; + return addHeapObject(ret); + }; + imports.wbg.__wbg_versions_c1cb42213cedf0f5 = function(arg0) { + const ret = getObject(arg0).versions; + return addHeapObject(ret); + }; + imports.wbg.__wbg_node_43b1089f407e4ec2 = function(arg0) { + const ret = getObject(arg0).node; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_is_string = function(arg0) { + const ret = typeof(getObject(arg0)) === 'string'; + return ret; + }; + imports.wbg.__wbg_require_9a7e0f667ead4995 = function() { return handleError(function () { + const ret = module.require; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_msCrypto_10fc94afee92bd76 = function(arg0) { + const ret = getObject(arg0).msCrypto; + return addHeapObject(ret); + }; + imports.wbg.__wbg_randomFillSync_b70ccbdf4926a99d = function() { return handleError(function (arg0, arg1) { + getObject(arg0).randomFillSync(takeObject(arg1)); + }, arguments) }; + imports.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d = function() { return handleError(function (arg0, arg1) { + getObject(arg0).getRandomValues(getObject(arg1)); + }, arguments) }; + imports.wbg.__wbg_get_0ee8ea3c7c984c45 = function(arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; + return addHeapObject(ret); + }; + imports.wbg.__wbg_length_161c0d89c6535c1d = function(arg0) { + const ret = getObject(arg0).length; + return ret; + }; + imports.wbg.__wbg_newnoargs_cfecb3965268594c = function(arg0, arg1) { + const ret = new Function(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_next_586204376d2ed373 = function(arg0) { + const ret = getObject(arg0).next; + return addHeapObject(ret); + }; + imports.wbg.__wbg_next_b2d3366343a208b3 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).next(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_done_90b14d6f6eacc42f = function(arg0) { + const ret = getObject(arg0).done; + return ret; + }; + imports.wbg.__wbg_value_3158be908c80a75e = function(arg0) { + const ret = getObject(arg0).value; + return addHeapObject(ret); + }; + imports.wbg.__wbg_iterator_40027cdd598da26b = function() { + const ret = Symbol.iterator; + return addHeapObject(ret); + }; + imports.wbg.__wbg_get_3fddfed2c83f434c = function() { return handleError(function (arg0, arg1) { + const ret = Reflect.get(getObject(arg0), getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_call_3f093dd26d5569f8 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).call(getObject(arg1)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_new_632630b5cec17f21 = function() { + const ret = new Object(); + return addHeapObject(ret); + }; + imports.wbg.__wbg_self_05040bd9523805b9 = function() { return handleError(function () { + const ret = self.self; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_window_adc720039f2cb14f = function() { return handleError(function () { + const ret = window.window; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_globalThis_622105db80c1457d = function() { return handleError(function () { + const ret = globalThis.globalThis; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_global_f56b013ed9bcf359 = function() { return handleError(function () { + const ret = global.global; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_from_58c79ccfb68060f5 = function(arg0) { + const ret = Array.from(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_call_67f2111acd2dfdb6 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_is_bd5dc4ae269cba1c = function(arg0, arg1) { + const ret = Object.is(getObject(arg0), getObject(arg1)); + return ret; + }; + imports.wbg.__wbg_new_70828a4353259d4b = function(arg0, arg1) { + try { + var state0 = {a: arg0, b: arg1}; + var cb0 = (arg0, arg1) => { + const a = state0.a; + state0.a = 0; + try { + return __wbg_adapter_289(a, state0.b, arg0, arg1); + } finally { + state0.a = a; + } + }; + const ret = new Promise(cb0); + return addHeapObject(ret); + } finally { + state0.a = state0.b = 0; + } + }; + imports.wbg.__wbg_resolve_5da6faf2c96fd1d5 = function(arg0) { + const ret = Promise.resolve(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_then_f9e58f5a50f43eae = function(arg0, arg1) { + const ret = getObject(arg0).then(getObject(arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_then_20a5920e447d1cb1 = function(arg0, arg1, arg2) { + const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_buffer_b914fb8b50ebbc3e = function(arg0) { + const ret = getObject(arg0).buffer; + return addHeapObject(ret); + }; + imports.wbg.__wbg_newwithbyteoffsetandlength_0de9ee56e9f6ee6e = function(arg0, arg1, arg2) { + const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); + return addHeapObject(ret); + }; + imports.wbg.__wbg_new_b1f2d6842d615181 = function(arg0) { + const ret = new Uint8Array(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_set_7d988c98e6ced92d = function(arg0, arg1, arg2) { + getObject(arg0).set(getObject(arg1), arg2 >>> 0); + }; + imports.wbg.__wbg_length_21c4b0ae73cba59d = function(arg0) { + const ret = getObject(arg0).length; + return ret; + }; + imports.wbg.__wbg_newwithlength_0d03cef43b68a530 = function(arg0) { + const ret = new Uint8Array(arg0 >>> 0); + return addHeapObject(ret); + }; + imports.wbg.__wbg_subarray_adc418253d76e2f1 = function(arg0, arg1, arg2) { + const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); + return addHeapObject(ret); + }; + imports.wbg.__wbg_has_ad45eb020184f624 = function() { return handleError(function (arg0, arg1) { + const ret = Reflect.has(getObject(arg0), getObject(arg1)); + return ret; + }, arguments) }; + imports.wbg.__wbg_set_961700853a212a39 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); + return ret; + }, arguments) }; + imports.wbg.__wbg_stringify_865daa6fb8c83d5a = function() { return handleError(function (arg0) { + const ret = JSON.stringify(getObject(arg0)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { + const ret = debugString(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbindgen_throw = function(arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); + }; + imports.wbg.__wbindgen_memory = function() { + const ret = wasm.memory; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper1283 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 469, __wbg_adapter_28); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper1285 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 469, __wbg_adapter_31); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper1515 = function(arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 526, __wbg_adapter_34); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper1855 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 645, __wbg_adapter_37); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper2095 = function(arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 738, __wbg_adapter_40); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper2097 = function(arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 738, __wbg_adapter_43); + return addHeapObject(ret); + }; + + return imports; +} + +function __wbg_init_memory(imports, maybe_memory) { + +} + +function __wbg_finalize_init(instance, module) { + wasm = instance.exports; + __wbg_init.__wbindgen_wasm_module = module; + cachedInt32Memory0 = null; + cachedUint32Memory0 = null; + cachedUint8Memory0 = null; + + + return wasm; +} + +function initSync(module) { + if (wasm !== undefined) return wasm; + + const imports = __wbg_get_imports(); + + __wbg_init_memory(imports); + + if (!(module instanceof WebAssembly.Module)) { + module = new WebAssembly.Module(module); + } + + const instance = new WebAssembly.Instance(module, imports); + + return __wbg_finalize_init(instance, module); +} + +async function __wbg_init(input) { + if (wasm !== undefined) return wasm; + + if (typeof input === 'undefined') { + input = new URL('mamba_minimal_dfdx_example_bg.wasm', import.meta.url); + } + const imports = __wbg_get_imports(); + + if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) { + input = fetch(input); + } + + __wbg_init_memory(imports); + + const { instance, module } = await __wbg_load(await input, imports); + + return __wbg_finalize_init(instance, module); +} + +export { initSync } +export default __wbg_init; diff --git a/pkg/mamba_minimal_dfdx_example_bg.wasm b/pkg/mamba_minimal_dfdx_example_bg.wasm new file mode 100644 index 0000000..30c7e2d Binary files /dev/null and b/pkg/mamba_minimal_dfdx_example_bg.wasm differ diff --git a/pkg/mamba_minimal_dfdx_example_bg.wasm.d.ts b/pkg/mamba_minimal_dfdx_example_bg.wasm.d.ts new file mode 100644 index 0000000..19c2e66 --- /dev/null +++ b/pkg/mamba_minimal_dfdx_example_bg.wasm.d.ts @@ -0,0 +1,17 @@ +/* tslint:disable */ +/* eslint-disable */ +export const memory: WebAssembly.Memory; +export function wasm_main(): number; +export function __wbindgen_malloc(a: number, b: number): number; +export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; +export const __wbindgen_export_2: WebAssembly.Table; +export function __wbindgen_add_to_stack_pointer(a: number): number; +export function wasm_bindgen__convert__closures__invoke1_mut__hd900a1c510a7707a(a: number, b: number, c: number, d: number): void; +export function wasm_bindgen__convert__closures__invoke0_mut__h8a02d42e2eddadcb(a: number, b: number): void; +export function wasm_bindgen__convert__closures__invoke1_ref__hb15501be9eb16ca5(a: number, b: number, c: number): void; +export function wasm_bindgen__convert__closures__invoke1_mut__hf3471ddd9a2ede48(a: number, b: number, c: number): void; +export function _dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h54161439976fad6b(a: number, b: number): void; +export function _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3aae48ea73e72c08(a: number, b: number, c: number): void; +export function __wbindgen_free(a: number, b: number, c: number): void; +export function __wbindgen_exn_store(a: number): void; +export function wasm_bindgen__convert__closures__invoke2_mut__h30097a3fa11435cd(a: number, b: number, c: number, d: number): void; diff --git a/pkg/package.json b/pkg/package.json new file mode 100644 index 0000000..279516e --- /dev/null +++ b/pkg/package.json @@ -0,0 +1,14 @@ +{ + "name": "mamba-minimal-dfdx-example", + "version": "0.1.0", + "files": [ + "mamba_minimal_dfdx_example_bg.wasm", + "mamba_minimal_dfdx_example.js", + "mamba_minimal_dfdx_example.d.ts" + ], + "module": "mamba_minimal_dfdx_example.js", + "types": "mamba_minimal_dfdx_example.d.ts", + "sideEffects": [ + "./snippets/*" + ] +} \ No newline at end of file