| import { initRuntime } from './snippets/ort-web-c7b42e3e9fb58316/_loader.js'; |
| import { trackSessionInit } from './snippets/ort-web-c7b42e3e9fb58316/_telemetry.js'; |
|
|
| function __wbg_get_imports() { |
| const import0 = { |
| __proto__: null, |
| __wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) { |
| const ret = Error(getStringFromWasm0(arg0, arg1)); |
| return ret; |
| }, |
| __wbg___wbindgen_bigint_get_as_i64_d9e915702856f831: function(arg0, arg1) { |
| const v = arg1; |
| const ret = typeof(v) === 'bigint' ? v : undefined; |
| getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); |
| }, |
| __wbg___wbindgen_boolean_get_edaed31a367ce1bd: function(arg0) { |
| const v = arg0; |
| const ret = typeof(v) === 'boolean' ? v : undefined; |
| return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0; |
| }, |
| __wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) { |
| const ret = debugString(arg1); |
| const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg___wbindgen_in_4990f46af709e33c: function(arg0, arg1) { |
| const ret = arg0 in arg1; |
| return ret; |
| }, |
| __wbg___wbindgen_is_bigint_90b5ccfe67c78460: function(arg0) { |
| const ret = typeof(arg0) === 'bigint'; |
| return ret; |
| }, |
| __wbg___wbindgen_is_function_acc5528be2b923f2: function(arg0) { |
| const ret = typeof(arg0) === 'function'; |
| return ret; |
| }, |
| __wbg___wbindgen_is_object_0beba4a1980d3eea: function(arg0) { |
| const val = arg0; |
| const ret = typeof(val) === 'object' && val !== null; |
| return ret; |
| }, |
| __wbg___wbindgen_is_string_1fca8072260dd261: function(arg0) { |
| const ret = typeof(arg0) === 'string'; |
| return ret; |
| }, |
| __wbg___wbindgen_is_undefined_721f8decd50c87a3: function(arg0) { |
| const ret = arg0 === undefined; |
| return ret; |
| }, |
| __wbg___wbindgen_jsval_eq_4e8c38722cb8ff51: function(arg0, arg1) { |
| const ret = arg0 === arg1; |
| return ret; |
| }, |
| __wbg___wbindgen_jsval_loose_eq_4b9aba9e5b3c4582: function(arg0, arg1) { |
| const ret = arg0 == arg1; |
| return ret; |
| }, |
| __wbg___wbindgen_number_get_1cc01dd708740256: function(arg0, arg1) { |
| const obj = arg1; |
| const ret = typeof(obj) === 'number' ? obj : undefined; |
| getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); |
| }, |
| __wbg___wbindgen_string_get_71bb4348194e31f0: function(arg0, arg1) { |
| const obj = 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; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) { |
| throw new Error(getStringFromWasm0(arg0, arg1)); |
| }, |
| __wbg__wbg_cb_unref_33c39e13d73b25f6: function(arg0) { |
| arg0._wbg_cb_unref(); |
| }, |
| __wbg_addEventListener_ea90bc131475777e: function() { return handleError(function (arg0, arg1, arg2, arg3) { |
| arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3); |
| }, arguments); }, |
| __wbg_arc_74cf0c033e9df542: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { |
| arg0.arc(arg1, arg2, arg3, arg4, arg5); |
| }, arguments); }, |
| __wbg_arrayBuffer_ff96d08b7b6be32e: function() { return handleError(function (arg0) { |
| const ret = arg0.arrayBuffer(); |
| return ret; |
| }, arguments); }, |
| __wbg_beginPath_c99b5be3516a2077: function(arg0) { |
| arg0.beginPath(); |
| }, |
| __wbg_buffer_9e4d98d0766fb908: function(arg0) { |
| const ret = arg0.buffer; |
| return ret; |
| }, |
| __wbg_byteLength_564c2b9b251b8b6c: function(arg0) { |
| const ret = arg0.byteLength; |
| return ret; |
| }, |
| __wbg_byteOffset_10f01f7956bb8fe3: function(arg0) { |
| const ret = arg0.byteOffset; |
| return ret; |
| }, |
| __wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) { |
| const ret = arg0.call(arg1, arg2); |
| return ret; |
| }, arguments); }, |
| __wbg_call_8e98ed2f3c86c4b5: function() { return handleError(function (arg0, arg1) { |
| const ret = arg0.call(arg1); |
| return ret; |
| }, arguments); }, |
| __wbg_checked_55b8214328709363: function(arg0) { |
| const ret = arg0.checked; |
| return ret; |
| }, |
| __wbg_click_7041a732c15425d9: function(arg0) { |
| arg0.click(); |
| }, |
| __wbg_createElement_9e23ac95e40e302c: function() { return handleError(function (arg0, arg1, arg2) { |
| const ret = arg0.createElement(getStringFromWasm0(arg1, arg2)); |
| return ret; |
| }, arguments); }, |
| __wbg_createObjectURL_d8fd80787743974d: function() { return handleError(function (arg0, arg1) { |
| const ret = URL.createObjectURL(arg1); |
| const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, arguments); }, |
| __wbg_create_604d3dd8b0220101: function() { return handleError(function (arg0, arg1, arg2) { |
| const ret = ort.InferenceSession.create(getStringFromWasm0(arg0, arg1), arg2); |
| return ret; |
| }, arguments); }, |
| __wbg_create_aa26088c323fe759: function() { return handleError(function (arg0, arg1) { |
| const ret = ort.InferenceSession.create(arg0, arg1); |
| return ret; |
| }, arguments); }, |
| __wbg_data_411cafdcea483b74: function(arg0, arg1) { |
| const ret = arg1.data; |
| const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_data_f77ae23e62caa57c: function() { return handleError(function (arg0) { |
| const ret = arg0.data; |
| return ret; |
| }, arguments); }, |
| __wbg_dims_4cbc39371d1db46c: function(arg0, arg1) { |
| const ret = arg1.dims; |
| const ptr1 = passArray32ToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_document_2634180a4c694068: function(arg0) { |
| const ret = arg0.document; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_done_b62d4a7d2286852a: function(arg0) { |
| const ret = arg0.done; |
| return ret; |
| }, |
| __wbg_drawImage_a7e0087acea080d1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { |
| arg0.drawImage(arg1, arg2, arg3, arg4, arg5); |
| }, arguments); }, |
| __wbg_drawImage_baead0925fc14e5f: function() { return handleError(function (arg0, arg1, arg2, arg3) { |
| arg0.drawImage(arg1, arg2, arg3); |
| }, arguments); }, |
| __wbg_entries_c261c3fa1f281256: function(arg0) { |
| const ret = Object.entries(arg0); |
| return ret; |
| }, |
| __wbg_error_a6fa202b58aa1cd3: 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); |
| } |
| }, |
| __wbg_fetch_2d913f7108d17a24: function(arg0, arg1, arg2) { |
| const ret = arg0.fetch(getStringFromWasm0(arg1, arg2)); |
| return ret; |
| }, |
| __wbg_files_e8965ead04936623: function(arg0) { |
| const ret = arg0.files; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_fillRect_3c420f5077df8d3b: function(arg0, arg1, arg2, arg3, arg4) { |
| arg0.fillRect(arg1, arg2, arg3, arg4); |
| }, |
| __wbg_fill_b39141050e50c461: function(arg0) { |
| arg0.fill(); |
| }, |
| __wbg_getContext_486aab500e1c34c9: function() { return handleError(function (arg0, arg1, arg2) { |
| const ret = arg0.getContext(getStringFromWasm0(arg1, arg2)); |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, arguments); }, |
| __wbg_getData_87474928ad362e4c: function() { return handleError(function (arg0) { |
| const ret = arg0.getData(); |
| return ret; |
| }, arguments); }, |
| __wbg_getElementById_c7aba6b93b34bf01: function(arg0, arg1, arg2) { |
| const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_getImageData_bcdd3d54c5e0f471: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { |
| const ret = arg0.getImageData(arg1, arg2, arg3, arg4); |
| return ret; |
| }, arguments); }, |
| __wbg_get_197a3fe98f169e38: function(arg0, arg1) { |
| const ret = arg0[arg1 >>> 0]; |
| return ret; |
| }, |
| __wbg_get_4414cb29e67ef2c6: function(arg0, arg1) { |
| const ret = arg0[arg1 >>> 0]; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_get_9a29be2cb383ed9a: function() { return handleError(function (arg0, arg1) { |
| const ret = Reflect.get(arg0, arg1); |
| return ret; |
| }, arguments); }, |
| __wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) { |
| const ret = Reflect.get(arg0, arg1); |
| return ret; |
| }, arguments); }, |
| __wbg_get_unchecked_54a4374c38e08460: function(arg0, arg1) { |
| const ret = arg0[arg1 >>> 0]; |
| return ret; |
| }, |
| __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) { |
| const ret = arg0[arg1]; |
| return ret; |
| }, |
| __wbg_initRuntime_8e839bc51a59b99d: function() { return handleError(function (arg0, arg1) { |
| const ret = initRuntime(arg0, arg1); |
| return ret; |
| }, arguments); }, |
| __wbg_inputMetadata_87b8670ec1aecff3: function(arg0, arg1) { |
| const ret = arg1.inputMetadata; |
| const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_inputNames_006e79de2e9d06b0: function(arg0, arg1) { |
| const ret = arg1.inputNames; |
| const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof ArrayBuffer; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_CanvasRenderingContext2d_d0cab9e931424c52: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof CanvasRenderingContext2D; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_HtmlAnchorElement_5fe78a8c8a2bb36b: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof HTMLAnchorElement; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_HtmlButtonElement_ed9bdefa1c407160: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof HTMLButtonElement; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_HtmlCanvasElement_8ce29a370a2b10a4: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof HTMLCanvasElement; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_HtmlImageElement_83e43a035d4d5033: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof HTMLImageElement; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_HtmlInputElement_5a4ec7d390cf0cfc: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof HTMLInputElement; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_Map_afa18d5840c04c15: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof Map; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_Response_79948c98d1d2ba75: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof Response; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_Uint8Array_f080092dc70f5d58: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof Uint8Array; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_instanceof_Window_0d356b88a2f77c42: function(arg0) { |
| let result; |
| try { |
| result = arg0 instanceof Window; |
| } catch (_) { |
| result = false; |
| } |
| const ret = result; |
| return ret; |
| }, |
| __wbg_isArray_145a34fd0a38d37b: function(arg0) { |
| const ret = Array.isArray(arg0); |
| return ret; |
| }, |
| __wbg_isSafeInteger_a3389a198582f5f6: function(arg0) { |
| const ret = Number.isSafeInteger(arg0); |
| return ret; |
| }, |
| __wbg_iterator_cc47ba25a2be735a: function() { |
| const ret = Symbol.iterator; |
| return ret; |
| }, |
| __wbg_length_589238bdcf171f0e: function(arg0) { |
| const ret = arg0.length; |
| return ret; |
| }, |
| __wbg_length_c6054974c0a6cdb9: function(arg0) { |
| const ret = arg0.length; |
| return ret; |
| }, |
| __wbg_lineTo_2a649fce185f0bf0: function(arg0, arg1, arg2) { |
| arg0.lineTo(arg1, arg2); |
| }, |
| __wbg_location_40d7e9906760d235: function(arg0) { |
| const ret = arg0.location; |
| return (__wbindgen_enum_DataLocation.indexOf(ret) + 1 || 7) - 1; |
| }, |
| __wbg_moveTo_8973531c3399ba16: function(arg0, arg1, arg2) { |
| arg0.moveTo(arg1, arg2); |
| }, |
| __wbg_naturalHeight_7cbdc2f637f6914f: function(arg0) { |
| const ret = arg0.naturalHeight; |
| return ret; |
| }, |
| __wbg_naturalWidth_5c95710d6c0ff97a: function(arg0) { |
| const ret = arg0.naturalWidth; |
| return ret; |
| }, |
| __wbg_new_227d7c05414eb861: function() { |
| const ret = new Error(); |
| return ret; |
| }, |
| __wbg_new_2e117a478906f062: function() { |
| const ret = new Object(); |
| return ret; |
| }, |
| __wbg_new_3444eb7412549f0b: function() { |
| const ret = new Map(); |
| return ret; |
| }, |
| __wbg_new_36e147a8ced3c6e0: function() { |
| const ret = new Array(); |
| return ret; |
| }, |
| __wbg_new_81880fb5002cb255: function(arg0) { |
| const ret = new Uint8Array(arg0); |
| return ret; |
| }, |
| __wbg_new_ca1920fd471d29cf: function() { return handleError(function () { |
| const ret = new Image(); |
| return ret; |
| }, arguments); }, |
| __wbg_new_from_buffer_raw_4a1de2fd5040de11: function() { return handleError(function (arg0, arg1, arg2) { |
| const ret = new ort.Tensor(__wbindgen_enum_DataType[arg0], arg1, arg2); |
| return ret; |
| }, arguments); }, |
| __wbg_new_with_byte_offset_and_length_f2b65504a914f37a: function(arg0, arg1, arg2) { |
| const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_05efc4acc152457e: function(arg0) { |
| const ret = new Int16Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_0ce56ac4a04c4839: function(arg0) { |
| const ret = new BigUint64Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_13d615bf4acf5111: function(arg0) { |
| const ret = new BigInt64Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_3f188e379a8c6a4d: function(arg0) { |
| const ret = new Float64Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_66ae39fdd9da8c1f: function(arg0) { |
| const ret = new Uint16Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_711111a7d776e50c: function(arg0) { |
| const ret = new Float32Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_793583df958b3ae2: function(arg0) { |
| const ret = new Int32Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_9b650f44b5c44a4e: function(arg0) { |
| const ret = new Uint8Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_d0622e1df06e71a1: function(arg0) { |
| const ret = new Int8Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_new_with_length_ecf42de9ee25651c: function(arg0) { |
| const ret = new Uint32Array(arg0 >>> 0); |
| return ret; |
| }, |
| __wbg_next_0c4066e251d2eff9: function() { return handleError(function (arg0) { |
| const ret = arg0.next(); |
| return ret; |
| }, arguments); }, |
| __wbg_next_402fa10b59ab20c3: function(arg0) { |
| const ret = arg0.next; |
| return ret; |
| }, |
| __wbg_ok_c962da6f1a034d81: function(arg0) { |
| const ret = arg0.ok; |
| return ret; |
| }, |
| __wbg_outputMetadata_f60f543c30563643: function(arg0, arg1) { |
| const ret = arg1.outputMetadata; |
| const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_outputNames_5e88e61bf53e5de8: function(arg0, arg1) { |
| const ret = arg1.outputNames; |
| const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_ownKeys_9c0857bab4917919: function() { return handleError(function (arg0) { |
| const ret = Reflect.ownKeys(arg0); |
| return ret; |
| }, arguments); }, |
| __wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) { |
| Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2); |
| }, |
| __wbg_push_f724b5db8acf89d2: function(arg0, arg1) { |
| const ret = arg0.push(arg1); |
| return ret; |
| }, |
| __wbg_queueMicrotask_1c9b3800e321a967: function(arg0) { |
| const ret = arg0.queueMicrotask; |
| return ret; |
| }, |
| __wbg_queueMicrotask_311744e534a929a3: function(arg0) { |
| queueMicrotask(arg0); |
| }, |
| __wbg_resolve_d82363d90af6928a: function(arg0) { |
| const ret = Promise.resolve(arg0); |
| return ret; |
| }, |
| __wbg_revokeObjectURL_f8e75e321c6e13b8: function() { return handleError(function (arg0, arg1) { |
| URL.revokeObjectURL(getStringFromWasm0(arg0, arg1)); |
| }, arguments); }, |
| __wbg_run_7a8a9fd51d457ba8: function(arg0, arg1, arg2) { |
| try { |
| var state0 = {a: arg1, b: arg2}; |
| var cb0 = () => { |
| const a = state0.a; |
| state0.a = 0; |
| try { |
| return wasm_bindgen__convert__closures_____invoke__hacaa75defecd8551(a, state0.b, ); |
| } finally { |
| state0.a = a; |
| } |
| }; |
| const ret = arg0.run(cb0); |
| return ret; |
| } finally { |
| state0.a = 0; |
| } |
| }, |
| __wbg_run_91f1b7e43bde55af: function() { return handleError(function (arg0, arg1) { |
| const ret = arg0.run(arg1); |
| return ret; |
| }, arguments); }, |
| __wbg_setProperty_da5e4438a912e787: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { |
| arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); |
| }, arguments); }, |
| __wbg_set_0bf1fca872bc6d18: function(arg0, arg1, arg2) { |
| arg0.set(getArrayU8FromWasm0(arg1, arg2)); |
| }, |
| __wbg_set_4564f7dc44fcb0c9: function() { return handleError(function (arg0, arg1, arg2) { |
| const ret = Reflect.set(arg0, arg1, arg2); |
| return ret; |
| }, arguments); }, |
| __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) { |
| arg0[arg1] = arg2; |
| }, |
| __wbg_set_9a1d61e17de7054c: function(arg0, arg1, arg2) { |
| const ret = arg0.set(arg1, arg2); |
| return ret; |
| }, |
| __wbg_set_crossOrigin_54de1be57699a631: function(arg0, arg1, arg2) { |
| arg0.crossOrigin = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2); |
| }, |
| __wbg_set_dc601f4a69da0bc2: function(arg0, arg1, arg2) { |
| arg0[arg1 >>> 0] = arg2; |
| }, |
| __wbg_set_disabled_e36a62aa12d3a7f4: function(arg0, arg1) { |
| arg0.disabled = arg1 !== 0; |
| }, |
| __wbg_set_download_41eabd4cb327b552: function(arg0, arg1, arg2) { |
| arg0.download = getStringFromWasm0(arg1, arg2); |
| }, |
| __wbg_set_fillStyle_01152e00b5737643: function(arg0, arg1) { |
| arg0.fillStyle = arg1; |
| }, |
| __wbg_set_height_ad5056ea051acd78: function(arg0, arg1) { |
| arg0.height = arg1 >>> 0; |
| }, |
| __wbg_set_href_8aeaabf1f418d57f: function(arg0, arg1, arg2) { |
| arg0.href = getStringFromWasm0(arg1, arg2); |
| }, |
| __wbg_set_innerHTML_30fcedd016ac76ab: function(arg0, arg1, arg2) { |
| arg0.innerHTML = getStringFromWasm0(arg1, arg2); |
| }, |
| __wbg_set_lineWidth_fef15cb5c15a6cdc: function(arg0, arg1) { |
| arg0.lineWidth = arg1; |
| }, |
| __wbg_set_onload_ce08214281cbb1e1: function(arg0, arg1) { |
| arg0.onload = arg1; |
| }, |
| __wbg_set_src_00190c2976c83211: function(arg0, arg1, arg2) { |
| arg0.src = getStringFromWasm0(arg1, arg2); |
| }, |
| __wbg_set_strokeStyle_77f54c809146a711: function(arg0, arg1) { |
| arg0.strokeStyle = arg1; |
| }, |
| __wbg_set_textContent_5c5fef072bd24f7a: function(arg0, arg1, arg2) { |
| arg0.textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2); |
| }, |
| __wbg_set_width_031bdecd763c5855: function(arg0, arg1) { |
| arg0.width = arg1 >>> 0; |
| }, |
| __wbg_slice_a9dfe1d05a7a4016: function(arg0, arg1) { |
| const ret = arg1.slice(); |
| const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_malloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_src_34a8fcc4349d8419: function(arg0, arg1) { |
| const ret = arg1.src; |
| const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) { |
| const ret = arg1.stack; |
| const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, |
| __wbg_static_accessor_CREATE_TASK_d23f6bf82576bece: function() { |
| const ret = typeof console === 'undefined' ? null : console?.createTask; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_static_accessor_GLOBAL_THIS_2fee5048bcca5938: function() { |
| const ret = typeof globalThis === 'undefined' ? null : globalThis; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_static_accessor_GLOBAL_ce44e66a4935da8c: function() { |
| const ret = typeof global === 'undefined' ? null : global; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_static_accessor_SELF_44f6e0cb5e67cdad: function() { |
| const ret = typeof self === 'undefined' ? null : self; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_static_accessor_WINDOW_168f178805d978fe: function() { |
| const ret = typeof window === 'undefined' ? null : window; |
| return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); |
| }, |
| __wbg_status_0053aa6239760447: function(arg0) { |
| const ret = arg0.status; |
| return ret; |
| }, |
| __wbg_stroke_d0c2cfbe28711bcb: function(arg0) { |
| arg0.stroke(); |
| }, |
| __wbg_style_f00fbf31e0a68f0e: function(arg0) { |
| const ret = arg0.style; |
| return ret; |
| }, |
| __wbg_then_05edfc8a4fea5106: function(arg0, arg1, arg2) { |
| const ret = arg0.then(arg1, arg2); |
| return ret; |
| }, |
| __wbg_then_591b6b3a75ee817a: function(arg0, arg1) { |
| const ret = arg0.then(arg1); |
| return ret; |
| }, |
| __wbg_toDataURL_5cfdd9ba389a3ed9: function() { return handleError(function (arg0, arg1) { |
| const ret = arg1.toDataURL(); |
| const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); |
| const len1 = WASM_VECTOR_LEN; |
| getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); |
| getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); |
| }, arguments); }, |
| __wbg_toString_cfdf82d318967c36: function(arg0) { |
| const ret = arg0.toString(); |
| return ret; |
| }, |
| __wbg_trackSessionInit_d2f5559748b8ff80: function() { return handleError(function () { |
| const ret = trackSessionInit(); |
| return ret; |
| }, arguments); }, |
| __wbg_type_5bf9facd6ac793eb: function(arg0) { |
| const ret = arg0.type; |
| return (__wbindgen_enum_DataType.indexOf(ret) + 1 || 16) - 1; |
| }, |
| __wbg_value_49f783bb59765962: function(arg0) { |
| const ret = arg0.value; |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000001: function(arg0, arg1) { |
| |
| const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hf7eae4c12c077cec); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000002: function(arg0, arg1) { |
| |
| const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hbfbbb96f0b743e14); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000003: function(arg0, arg1) { |
| |
| const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h334a55614f0fd0fd); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000004: function(arg0, arg1) { |
| |
| const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hf1f27c3e026569b2); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000005: function(arg0, arg1) { |
| |
| const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc67f2d83163dd041); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000006: function(arg0) { |
| |
| const ret = arg0; |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000007: function(arg0) { |
| |
| const ret = arg0; |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000008: function(arg0, arg1) { |
| |
| const ret = getArrayF32FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000009: function(arg0, arg1) { |
| |
| const ret = getArrayF64FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_000000000000000a: function(arg0, arg1) { |
| |
| const ret = getArrayI16FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_000000000000000b: function(arg0, arg1) { |
| |
| const ret = getArrayI32FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_000000000000000c: function(arg0, arg1) { |
| |
| const ret = getArrayI64FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_000000000000000d: function(arg0, arg1) { |
| |
| const ret = getArrayI8FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_000000000000000e: function(arg0, arg1) { |
| |
| const ret = getArrayU16FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_000000000000000f: function(arg0, arg1) { |
| |
| const ret = getArrayU32FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000010: function(arg0, arg1) { |
| |
| const ret = getArrayU64FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000011: function(arg0, arg1) { |
| |
| const ret = getArrayU8FromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000012: function(arg0, arg1) { |
| |
| const ret = getStringFromWasm0(arg0, arg1); |
| return ret; |
| }, |
| __wbindgen_cast_0000000000000013: function(arg0) { |
| |
| const ret = BigInt.asUintN(64, arg0); |
| return ret; |
| }, |
| __wbindgen_init_externref_table: function() { |
| const table = wasm.__wbindgen_externrefs; |
| const offset = table.grow(4); |
| table.set(0, undefined); |
| table.set(offset + 0, undefined); |
| table.set(offset + 1, null); |
| table.set(offset + 2, true); |
| table.set(offset + 3, false); |
| }, |
| }; |
| return { |
| __proto__: null, |
| "./web_bg.js": import0, |
| }; |
| } |
|
|
| function wasm_bindgen__convert__closures_____invoke__hc67f2d83163dd041(arg0, arg1) { |
| wasm.wasm_bindgen__convert__closures_____invoke__hc67f2d83163dd041(arg0, arg1); |
| } |
|
|
| function wasm_bindgen__convert__closures_____invoke__hacaa75defecd8551(arg0, arg1) { |
| const ret = wasm.wasm_bindgen__convert__closures_____invoke__hacaa75defecd8551(arg0, arg1); |
| return ret !== 0; |
| } |
|
|
| function wasm_bindgen__convert__closures_____invoke__h334a55614f0fd0fd(arg0, arg1, arg2) { |
| wasm.wasm_bindgen__convert__closures_____invoke__h334a55614f0fd0fd(arg0, arg1, arg2); |
| } |
|
|
| function wasm_bindgen__convert__closures_____invoke__hf7eae4c12c077cec(arg0, arg1, arg2) { |
| const ret = wasm.wasm_bindgen__convert__closures_____invoke__hf7eae4c12c077cec(arg0, arg1, arg2); |
| if (ret[1]) { |
| throw takeFromExternrefTable0(ret[0]); |
| } |
| } |
|
|
| function wasm_bindgen__convert__closures_____invoke__hbfbbb96f0b743e14(arg0, arg1, arg2) { |
| const ret = wasm.wasm_bindgen__convert__closures_____invoke__hbfbbb96f0b743e14(arg0, arg1, arg2); |
| if (ret[1]) { |
| throw takeFromExternrefTable0(ret[0]); |
| } |
| } |
|
|
| function wasm_bindgen__convert__closures_____invoke__hf1f27c3e026569b2(arg0, arg1, arg2) { |
| const ret = wasm.wasm_bindgen__convert__closures_____invoke__hf1f27c3e026569b2(arg0, arg1, arg2); |
| if (ret[1]) { |
| throw takeFromExternrefTable0(ret[0]); |
| } |
| } |
|
|
|
|
| const __wbindgen_enum_DataLocation = ["none", "cpu", "cpu-pinned", "texture", "gpu-buffer", "ml-tensor"]; |
|
|
|
|
| const __wbindgen_enum_DataType = ["bool", "float16", "float32", "float64", "int4", "int8", "int16", "int32", "int64", "uint4", "uint8", "uint16", "uint32", "uint64", "string"]; |
|
|
| function addToExternrefTable0(obj) { |
| const idx = wasm.__externref_table_alloc(); |
| wasm.__wbindgen_externrefs.set(idx, obj); |
| return idx; |
| } |
|
|
| const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') |
| ? { register: () => {}, unregister: () => {} } |
| : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); |
|
|
| function debugString(val) { |
| |
| 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'; |
| } |
| } |
| |
| 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; |
| } |
| |
| const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); |
| let className; |
| if (builtInMatches && builtInMatches.length > 1) { |
| className = builtInMatches[1]; |
| } else { |
| |
| return toString.call(val); |
| } |
| if (className == 'Object') { |
| |
| |
| |
| try { |
| return 'Object(' + JSON.stringify(val) + ')'; |
| } catch (_) { |
| return 'Object'; |
| } |
| } |
| |
| if (val instanceof Error) { |
| return `${val.name}: ${val.message}\n${val.stack}`; |
| } |
| |
| return className; |
| } |
|
|
| function getArrayF32FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); |
| } |
|
|
| function getArrayF64FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); |
| } |
|
|
| function getArrayI16FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getInt16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); |
| } |
|
|
| function getArrayI32FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); |
| } |
|
|
| function getArrayI64FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getBigInt64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); |
| } |
|
|
| function getArrayI8FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getInt8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); |
| } |
|
|
| function getArrayU16FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); |
| } |
|
|
| function getArrayU32FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); |
| } |
|
|
| function getArrayU64FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); |
| } |
|
|
| function getArrayU8FromWasm0(ptr, len) { |
| ptr = ptr >>> 0; |
| return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); |
| } |
|
|
| let cachedBigInt64ArrayMemory0 = null; |
| function getBigInt64ArrayMemory0() { |
| if (cachedBigInt64ArrayMemory0 === null || cachedBigInt64ArrayMemory0.byteLength === 0) { |
| cachedBigInt64ArrayMemory0 = new BigInt64Array(wasm.memory.buffer); |
| } |
| return cachedBigInt64ArrayMemory0; |
| } |
|
|
| let cachedBigUint64ArrayMemory0 = null; |
| function getBigUint64ArrayMemory0() { |
| if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) { |
| cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer); |
| } |
| return cachedBigUint64ArrayMemory0; |
| } |
|
|
| let cachedDataViewMemory0 = null; |
| function getDataViewMemory0() { |
| if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { |
| cachedDataViewMemory0 = new DataView(wasm.memory.buffer); |
| } |
| return cachedDataViewMemory0; |
| } |
|
|
| let cachedFloat32ArrayMemory0 = null; |
| function getFloat32ArrayMemory0() { |
| if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) { |
| cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer); |
| } |
| return cachedFloat32ArrayMemory0; |
| } |
|
|
| let cachedFloat64ArrayMemory0 = null; |
| function getFloat64ArrayMemory0() { |
| if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) { |
| cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer); |
| } |
| return cachedFloat64ArrayMemory0; |
| } |
|
|
| let cachedInt16ArrayMemory0 = null; |
| function getInt16ArrayMemory0() { |
| if (cachedInt16ArrayMemory0 === null || cachedInt16ArrayMemory0.byteLength === 0) { |
| cachedInt16ArrayMemory0 = new Int16Array(wasm.memory.buffer); |
| } |
| return cachedInt16ArrayMemory0; |
| } |
|
|
| let cachedInt32ArrayMemory0 = null; |
| function getInt32ArrayMemory0() { |
| if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) { |
| cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer); |
| } |
| return cachedInt32ArrayMemory0; |
| } |
|
|
| let cachedInt8ArrayMemory0 = null; |
| function getInt8ArrayMemory0() { |
| if (cachedInt8ArrayMemory0 === null || cachedInt8ArrayMemory0.byteLength === 0) { |
| cachedInt8ArrayMemory0 = new Int8Array(wasm.memory.buffer); |
| } |
| return cachedInt8ArrayMemory0; |
| } |
|
|
| function getStringFromWasm0(ptr, len) { |
| return decodeText(ptr >>> 0, len); |
| } |
|
|
| let cachedUint16ArrayMemory0 = null; |
| function getUint16ArrayMemory0() { |
| if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) { |
| cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer); |
| } |
| return cachedUint16ArrayMemory0; |
| } |
|
|
| let cachedUint32ArrayMemory0 = null; |
| function getUint32ArrayMemory0() { |
| if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) { |
| cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer); |
| } |
| return cachedUint32ArrayMemory0; |
| } |
|
|
| let cachedUint8ArrayMemory0 = null; |
| function getUint8ArrayMemory0() { |
| if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { |
| cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); |
| } |
| return cachedUint8ArrayMemory0; |
| } |
|
|
| function handleError(f, args) { |
| try { |
| return f.apply(this, args); |
| } catch (e) { |
| const idx = addToExternrefTable0(e); |
| wasm.__wbindgen_exn_store(idx); |
| } |
| } |
|
|
| function isLikeNone(x) { |
| return x === undefined || x === null; |
| } |
|
|
| function makeMutClosure(arg0, arg1, f) { |
| const state = { a: arg0, b: arg1, cnt: 1 }; |
| const real = (...args) => { |
|
|
| |
| |
| |
| state.cnt++; |
| const a = state.a; |
| state.a = 0; |
| try { |
| return f(a, state.b, ...args); |
| } finally { |
| state.a = a; |
| real._wbg_cb_unref(); |
| } |
| }; |
| real._wbg_cb_unref = () => { |
| if (--state.cnt === 0) { |
| wasm.__wbindgen_destroy_closure(state.a, state.b); |
| state.a = 0; |
| CLOSURE_DTORS.unregister(state); |
| } |
| }; |
| CLOSURE_DTORS.register(real, state, state); |
| return real; |
| } |
|
|
| function passArray32ToWasm0(arg, malloc) { |
| const ptr = malloc(arg.length * 4, 4) >>> 0; |
| getUint32ArrayMemory0().set(arg, ptr / 4); |
| WASM_VECTOR_LEN = arg.length; |
| return ptr; |
| } |
|
|
| function passArray8ToWasm0(arg, malloc) { |
| const ptr = malloc(arg.length * 1, 1) >>> 0; |
| getUint8ArrayMemory0().set(arg, ptr / 1); |
| WASM_VECTOR_LEN = arg.length; |
| return ptr; |
| } |
|
|
| function passArrayJsValueToWasm0(array, malloc) { |
| const ptr = malloc(array.length * 4, 4) >>> 0; |
| for (let i = 0; i < array.length; i++) { |
| const add = addToExternrefTable0(array[i]); |
| getDataViewMemory0().setUint32(ptr + 4 * i, add, true); |
| } |
| WASM_VECTOR_LEN = array.length; |
| return ptr; |
| } |
|
|
| function passStringToWasm0(arg, malloc, realloc) { |
| if (realloc === undefined) { |
| const buf = cachedTextEncoder.encode(arg); |
| const ptr = malloc(buf.length, 1) >>> 0; |
| getUint8ArrayMemory0().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 = getUint8ArrayMemory0(); |
|
|
| 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 = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); |
| const ret = cachedTextEncoder.encodeInto(arg, view); |
|
|
| offset += ret.written; |
| ptr = realloc(ptr, len, offset, 1) >>> 0; |
| } |
|
|
| WASM_VECTOR_LEN = offset; |
| return ptr; |
| } |
|
|
| function takeFromExternrefTable0(idx) { |
| const value = wasm.__wbindgen_externrefs.get(idx); |
| wasm.__externref_table_dealloc(idx); |
| return value; |
| } |
|
|
| let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); |
| cachedTextDecoder.decode(); |
| const MAX_SAFARI_DECODE_BYTES = 2146435072; |
| let numBytesDecoded = 0; |
| function decodeText(ptr, len) { |
| numBytesDecoded += len; |
| if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { |
| cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); |
| cachedTextDecoder.decode(); |
| numBytesDecoded = len; |
| } |
| return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); |
| } |
|
|
| const cachedTextEncoder = new TextEncoder(); |
|
|
| if (!('encodeInto' in cachedTextEncoder)) { |
| cachedTextEncoder.encodeInto = function (arg, view) { |
| const buf = cachedTextEncoder.encode(arg); |
| view.set(buf); |
| return { |
| read: arg.length, |
| written: buf.length |
| }; |
| }; |
| } |
|
|
| let WASM_VECTOR_LEN = 0; |
|
|
| let wasmModule, wasmInstance, wasm; |
| function __wbg_finalize_init(instance, module) { |
| wasmInstance = instance; |
| wasm = instance.exports; |
| wasmModule = module; |
| cachedBigInt64ArrayMemory0 = null; |
| cachedBigUint64ArrayMemory0 = null; |
| cachedDataViewMemory0 = null; |
| cachedFloat32ArrayMemory0 = null; |
| cachedFloat64ArrayMemory0 = null; |
| cachedInt16ArrayMemory0 = null; |
| cachedInt32ArrayMemory0 = null; |
| cachedInt8ArrayMemory0 = null; |
| cachedUint16ArrayMemory0 = null; |
| cachedUint32ArrayMemory0 = null; |
| cachedUint8ArrayMemory0 = null; |
| wasm.__wbindgen_start(); |
| return wasm; |
| } |
|
|
| 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) { |
| const validResponse = module.ok && expectedResponseType(module.type); |
|
|
| if (validResponse && 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 expectedResponseType(type) { |
| switch (type) { |
| case 'basic': case 'cors': case 'default': return true; |
| } |
| return false; |
| } |
| } |
|
|
| function initSync(module) { |
| if (wasm !== undefined) return wasm; |
|
|
|
|
| if (module !== undefined) { |
| if (Object.getPrototypeOf(module) === Object.prototype) { |
| ({module} = module) |
| } else { |
| console.warn('using deprecated parameters for `initSync()`; pass a single object instead') |
| } |
| } |
|
|
| const imports = __wbg_get_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(module_or_path) { |
| if (wasm !== undefined) return wasm; |
|
|
|
|
| if (module_or_path !== undefined) { |
| if (Object.getPrototypeOf(module_or_path) === Object.prototype) { |
| ({module_or_path} = module_or_path) |
| } else { |
| console.warn('using deprecated parameters for the initialization function; pass a single object instead') |
| } |
| } |
|
|
| if (module_or_path === undefined) { |
| module_or_path = new URL('web_bg.wasm', import.meta.url); |
| } |
| const imports = __wbg_get_imports(); |
|
|
| if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { |
| module_or_path = fetch(module_or_path); |
| } |
|
|
| const { instance, module } = await __wbg_load(await module_or_path, imports); |
|
|
| return __wbg_finalize_init(instance, module); |
| } |
|
|
| export { initSync, __wbg_init as default }; |
|
|