|
|
|
@ -1,14 +1,40 @@ |
|
|
|
|
|
|
|
|
|
let wasm; |
|
|
|
|
|
|
|
|
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); |
|
|
|
|
|
|
|
|
|
cachedTextDecoder.decode(); |
|
|
|
|
|
|
|
|
|
let cachedUint8Memory0 = new Uint8Array(); |
|
|
|
|
|
|
|
|
|
function getUint8Memory0() { |
|
|
|
|
if (cachedUint8Memory0.byteLength === 0) { |
|
|
|
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); |
|
|
|
|
} |
|
|
|
|
return cachedUint8Memory0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getStringFromWasm0(ptr, len) { |
|
|
|
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const heap = new Array(32).fill(undefined); |
|
|
|
|
|
|
|
|
|
heap.push(undefined, null, true, false); |
|
|
|
|
|
|
|
|
|
function getObject(idx) { return heap[idx]; } |
|
|
|
|
|
|
|
|
|
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 < 36) return; |
|
|
|
|
heap[idx] = heap_next; |
|
|
|
@ -21,23 +47,6 @@ function takeObject(idx) { |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); |
|
|
|
|
|
|
|
|
|
cachedTextDecoder.decode(); |
|
|
|
|
|
|
|
|
|
let cachedUint8Memory0 = new Uint8Array(); |
|
|
|
|
|
|
|
|
|
function getUint8Memory0() { |
|
|
|
|
if (cachedUint8Memory0.byteLength === 0) { |
|
|
|
|
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); |
|
|
|
|
} |
|
|
|
|
return cachedUint8Memory0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function getStringFromWasm0(ptr, len) { |
|
|
|
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let WASM_VECTOR_LEN = 0; |
|
|
|
|
|
|
|
|
|
const cachedTextEncoder = new TextEncoder('utf-8'); |
|
|
|
@ -101,6 +110,14 @@ export function greet(name) { |
|
|
|
|
wasm.greet(ptr0, len0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @returns {Array<any>} |
|
|
|
|
*/ |
|
|
|
|
export function send_phase() { |
|
|
|
|
const ret = wasm.send_phase(); |
|
|
|
|
return takeObject(ret); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let cachedInt32Memory0 = new Int32Array(); |
|
|
|
|
|
|
|
|
|
function getInt32Memory0() { |
|
|
|
@ -109,30 +126,6 @@ function getInt32Memory0() { |
|
|
|
|
} |
|
|
|
|
return cachedInt32Memory0; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* @returns {string} |
|
|
|
|
*/ |
|
|
|
|
export function send_phase() { |
|
|
|
|
try { |
|
|
|
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); |
|
|
|
|
wasm.send_phase(retptr); |
|
|
|
|
var r0 = getInt32Memory0()[retptr / 4 + 0]; |
|
|
|
|
var r1 = getInt32Memory0()[retptr / 4 + 1]; |
|
|
|
|
return getStringFromWasm0(r0, r1); |
|
|
|
|
} finally { |
|
|
|
|
wasm.__wbindgen_add_to_stack_pointer(16); |
|
|
|
|
wasm.__wbindgen_free(r0, r1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function load(module, imports) { |
|
|
|
|
if (typeof Response === 'function' && module instanceof Response) { |
|
|
|
@ -171,6 +164,10 @@ function getImports() { |
|
|
|
|
imports.wbg.__wbg_alert_b29ee0fb3216154d = function(arg0, arg1) { |
|
|
|
|
alert(getStringFromWasm0(arg0, arg1)); |
|
|
|
|
}; |
|
|
|
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) { |
|
|
|
|
const ret = getStringFromWasm0(arg0, arg1); |
|
|
|
|
return addHeapObject(ret); |
|
|
|
|
}; |
|
|
|
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { |
|
|
|
|
const ret = new Error(); |
|
|
|
|
return addHeapObject(ret); |
|
|
|
@ -192,6 +189,13 @@ function getImports() { |
|
|
|
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { |
|
|
|
|
takeObject(arg0); |
|
|
|
|
}; |
|
|
|
|
imports.wbg.__wbg_newwithlength_7c42f7e738a9d5d3 = function(arg0) { |
|
|
|
|
const ret = new Array(arg0 >>> 0); |
|
|
|
|
return addHeapObject(ret); |
|
|
|
|
}; |
|
|
|
|
imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) { |
|
|
|
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2); |
|
|
|
|
}; |
|
|
|
|
imports.wbg.__wbg_now_58886682b7e790d7 = function() { |
|
|
|
|
const ret = Date.now(); |
|
|
|
|
return ret; |
|
|
|
|