|
| 1 | +let wasm; |
| 2 | +export function __wbg_set_wasm(val) { |
| 3 | + wasm = val; |
| 4 | +} |
| 5 | + |
| 6 | + |
| 7 | +const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; |
| 8 | + |
| 9 | +let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); |
| 10 | + |
| 11 | +cachedTextDecoder.decode(); |
| 12 | + |
| 13 | +let cachedUint8ArrayMemory0 = null; |
| 14 | + |
| 15 | +function getUint8ArrayMemory0() { |
| 16 | + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { |
| 17 | + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); |
| 18 | + } |
| 19 | + return cachedUint8ArrayMemory0; |
| 20 | +} |
| 21 | + |
| 22 | +function getStringFromWasm0(ptr, len) { |
| 23 | + ptr = ptr >>> 0; |
| 24 | + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); |
| 25 | +} |
| 26 | +/** |
| 27 | + * @param {number | string} a |
| 28 | + */ |
| 29 | +export function single(a) { |
| 30 | + wasm.single(a); |
| 31 | +} |
| 32 | + |
| 33 | +let cachedDataViewMemory0 = null; |
| 34 | + |
| 35 | +function getDataViewMemory0() { |
| 36 | + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { |
| 37 | + cachedDataViewMemory0 = new DataView(wasm.memory.buffer); |
| 38 | + } |
| 39 | + return cachedDataViewMemory0; |
| 40 | +} |
| 41 | + |
| 42 | +let WASM_VECTOR_LEN = 0; |
| 43 | + |
| 44 | +function addToExternrefTable0(obj) { |
| 45 | + const idx = wasm.__externref_table_alloc(); |
| 46 | + wasm.__wbindgen_export_0.set(idx, obj); |
| 47 | + return idx; |
| 48 | +} |
| 49 | + |
| 50 | +function passArrayJsValueToWasm0(array, malloc) { |
| 51 | + const ptr = malloc(array.length * 4, 4) >>> 0; |
| 52 | + const mem = getDataViewMemory0(); |
| 53 | + for (let i = 0; i < array.length; i++) { |
| 54 | + mem.setUint32(ptr + 4 * i, addToExternrefTable0(array[i]), true); |
| 55 | + } |
| 56 | + WASM_VECTOR_LEN = array.length; |
| 57 | + return ptr; |
| 58 | +} |
| 59 | +/** |
| 60 | + * @param {(number | string)[]} a |
| 61 | + */ |
| 62 | +export function slice(a) { |
| 63 | + const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); |
| 64 | + const len0 = WASM_VECTOR_LEN; |
| 65 | + wasm.slice(ptr0, len0); |
| 66 | +} |
| 67 | + |
| 68 | +export function __wbindgen_init_externref_table() { |
| 69 | + const table = wasm.__wbindgen_export_0; |
| 70 | + const offset = table.grow(4); |
| 71 | + table.set(0, undefined); |
| 72 | + table.set(offset + 0, undefined); |
| 73 | + table.set(offset + 1, null); |
| 74 | + table.set(offset + 2, true); |
| 75 | + table.set(offset + 3, false); |
| 76 | + ; |
| 77 | +}; |
| 78 | + |
| 79 | +export function __wbindgen_throw(arg0, arg1) { |
| 80 | + throw new Error(getStringFromWasm0(arg0, arg1)); |
| 81 | +}; |
| 82 | + |
0 commit comments