satoru-render 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.d.ts +13 -0
- package/dist/core.js +39 -3
- package/dist/node.js +12 -4
- package/dist/satoru-single.js +0 -0
- package/dist/satoru.js +2 -4727
- package/dist/satoru.wasm +0 -0
- package/dist/web-workers.js +442 -551
- package/dist/workers-parent.js +32 -3
- package/package.json +1 -1
package/dist/satoru.js
CHANGED
|
@@ -1,4727 +1,2 @@
|
|
|
1
|
-
// This code implements the `-sMODULARIZE` settings by taking the generated
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// When targeting node and ES6 we use `await import ..` in the generated code
|
|
5
|
-
// so the outer function needs to be marked as async.
|
|
6
|
-
async function createSatoruModule(moduleArg = {}) {
|
|
7
|
-
var moduleRtn;
|
|
8
|
-
|
|
9
|
-
// include: shell.js
|
|
10
|
-
// include: minimum_runtime_check.js
|
|
11
|
-
// end include: minimum_runtime_check.js
|
|
12
|
-
// The Module object: Our interface to the outside world. We import
|
|
13
|
-
// and export values on it. There are various ways Module can be used:
|
|
14
|
-
// 1. Not defined. We create it here
|
|
15
|
-
// 2. A function parameter, function(moduleArg) => Promise<Module>
|
|
16
|
-
// 3. pre-run appended it, var Module = {}; ..generated code..
|
|
17
|
-
// 4. External script tag defines var Module.
|
|
18
|
-
// We need to check if Module already exists (e.g. case 3 above).
|
|
19
|
-
// Substitution will be replaced with actual code on later stage of the build,
|
|
20
|
-
// this way Closure Compiler will not mangle it (e.g. case 4. above).
|
|
21
|
-
// Note that if you want to run closure, and also to use Module
|
|
22
|
-
// after the generated code, you will need to define var Module = {};
|
|
23
|
-
// before the code. Then that object will be used in the code, and you
|
|
24
|
-
// can continue to use Module afterwards as well.
|
|
25
|
-
var Module = moduleArg;
|
|
26
|
-
|
|
27
|
-
// Determine the runtime environment we are in. You can customize this by
|
|
28
|
-
// setting the ENVIRONMENT setting at compile time (see settings.js).
|
|
29
|
-
|
|
30
|
-
// Attempt to auto-detect the environment
|
|
31
|
-
var ENVIRONMENT_IS_WEB = !!globalThis.window;
|
|
32
|
-
var ENVIRONMENT_IS_WORKER = !!globalThis.WorkerGlobalScope;
|
|
33
|
-
// N.b. Electron.js environment is simultaneously a NODE-environment, but
|
|
34
|
-
// also a web environment.
|
|
35
|
-
var ENVIRONMENT_IS_NODE = globalThis.process?.versions?.node && globalThis.process?.type != 'renderer';
|
|
36
|
-
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
|
|
37
|
-
|
|
38
|
-
// --pre-jses are emitted after the Module integration code, so that they can
|
|
39
|
-
// refer to Module (if they choose; they can also define Module)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var arguments_ = [];
|
|
43
|
-
var thisProgram = './this.program';
|
|
44
|
-
var quit_ = (status, toThrow) => {
|
|
45
|
-
throw toThrow;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _scriptName = import.meta.url;
|
|
49
|
-
|
|
50
|
-
// `/` should be present at the end if `scriptDirectory` is not empty
|
|
51
|
-
var scriptDirectory = '';
|
|
52
|
-
function locateFile(path) {
|
|
53
|
-
if (Module['locateFile']) {
|
|
54
|
-
return Module['locateFile'](path, scriptDirectory);
|
|
55
|
-
}
|
|
56
|
-
return scriptDirectory + path;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Hooks that are implemented differently in different runtime environments.
|
|
60
|
-
var readAsync, readBinary;
|
|
61
|
-
|
|
62
|
-
// Note that this includes Node.js workers when relevant (pthreads is enabled).
|
|
63
|
-
// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
|
|
64
|
-
// ENVIRONMENT_IS_NODE.
|
|
65
|
-
if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
|
|
66
|
-
try {
|
|
67
|
-
scriptDirectory = new URL('.', _scriptName).href; // includes trailing slash
|
|
68
|
-
} catch {
|
|
69
|
-
// Must be a `blob:` or `data:` URL (e.g. `blob:http://site.com/etc/etc`), we cannot
|
|
70
|
-
// infer anything from them.
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
// include: web_or_worker_shell_read.js
|
|
75
|
-
if (ENVIRONMENT_IS_WORKER) {
|
|
76
|
-
readBinary = (url) => {
|
|
77
|
-
var xhr = new XMLHttpRequest();
|
|
78
|
-
xhr.open('GET', url, false);
|
|
79
|
-
xhr.responseType = 'arraybuffer';
|
|
80
|
-
xhr.send(null);
|
|
81
|
-
return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
readAsync = async (url) => {
|
|
86
|
-
var response = await fetch(url, { credentials: 'same-origin' });
|
|
87
|
-
if (response.ok) {
|
|
88
|
-
return response.arrayBuffer();
|
|
89
|
-
}
|
|
90
|
-
throw new Error(response.status + ' : ' + response.url);
|
|
91
|
-
};
|
|
92
|
-
// end include: web_or_worker_shell_read.js
|
|
93
|
-
}
|
|
94
|
-
} else
|
|
95
|
-
{
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
var out = console.log.bind(console);
|
|
99
|
-
var err = console.error.bind(console);
|
|
100
|
-
|
|
101
|
-
// end include: shell.js
|
|
102
|
-
|
|
103
|
-
// include: preamble.js
|
|
104
|
-
// === Preamble library stuff ===
|
|
105
|
-
|
|
106
|
-
// Documentation for the public APIs defined in this file must be updated in:
|
|
107
|
-
// site/source/docs/api_reference/preamble.js.rst
|
|
108
|
-
// A prebuilt local version of the documentation is available at:
|
|
109
|
-
// site/build/text/docs/api_reference/preamble.js.txt
|
|
110
|
-
// You can also build docs locally as HTML or other formats in site/
|
|
111
|
-
// An online HTML version (which may be of a different version of Emscripten)
|
|
112
|
-
// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
|
|
113
|
-
|
|
114
|
-
var wasmBinary;
|
|
115
|
-
|
|
116
|
-
// Wasm globals
|
|
117
|
-
|
|
118
|
-
//========================================
|
|
119
|
-
// Runtime essentials
|
|
120
|
-
//========================================
|
|
121
|
-
|
|
122
|
-
// whether we are quitting the application. no code should run after this.
|
|
123
|
-
// set in exit() and abort()
|
|
124
|
-
var ABORT = false;
|
|
125
|
-
|
|
126
|
-
// set by exit() and abort(). Passed to 'onExit' handler.
|
|
127
|
-
// NOTE: This is also used as the process return code in shell environments
|
|
128
|
-
// but only when noExitRuntime is false.
|
|
129
|
-
var EXITSTATUS;
|
|
130
|
-
|
|
131
|
-
// In STRICT mode, we only define assert() when ASSERTIONS is set. i.e. we
|
|
132
|
-
// don't define it at all in release modes. This matches the behaviour of
|
|
133
|
-
// MINIMAL_RUNTIME.
|
|
134
|
-
// TODO(sbc): Make this the default even without STRICT enabled.
|
|
135
|
-
/** @type {function(*, string=)} */
|
|
136
|
-
function assert(condition, text) {
|
|
137
|
-
if (!condition) {
|
|
138
|
-
// This build was created without ASSERTIONS defined. `assert()` should not
|
|
139
|
-
// ever be called in this configuration but in case there are callers in
|
|
140
|
-
// the wild leave this simple abort() implementation here for now.
|
|
141
|
-
abort(text);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Indicates whether filename is delivered via file protocol (as opposed to http/https)
|
|
147
|
-
* @noinline
|
|
148
|
-
*/
|
|
149
|
-
var isFileURI = (filename) => filename.startsWith('file://');
|
|
150
|
-
|
|
151
|
-
// include: runtime_common.js
|
|
152
|
-
// include: runtime_stack_check.js
|
|
153
|
-
// end include: runtime_stack_check.js
|
|
154
|
-
// include: runtime_exceptions.js
|
|
155
|
-
// end include: runtime_exceptions.js
|
|
156
|
-
// include: runtime_debug.js
|
|
157
|
-
// end include: runtime_debug.js
|
|
158
|
-
var readyPromiseResolve, readyPromiseReject;
|
|
159
|
-
|
|
160
|
-
// Memory management
|
|
161
|
-
var
|
|
162
|
-
/** @type {!Int8Array} */
|
|
163
|
-
HEAP8,
|
|
164
|
-
/** @type {!Uint8Array} */
|
|
165
|
-
HEAPU8,
|
|
166
|
-
/** @type {!Int16Array} */
|
|
167
|
-
HEAP16,
|
|
168
|
-
/** @type {!Uint16Array} */
|
|
169
|
-
HEAPU16,
|
|
170
|
-
/** @type {!Int32Array} */
|
|
171
|
-
HEAP32,
|
|
172
|
-
/** @type {!Uint32Array} */
|
|
173
|
-
HEAPU32,
|
|
174
|
-
/** @type {!Float32Array} */
|
|
175
|
-
HEAPF32,
|
|
176
|
-
/** @type {!Float64Array} */
|
|
177
|
-
HEAPF64;
|
|
178
|
-
|
|
179
|
-
// BigInt64Array type is not correctly defined in closure
|
|
180
|
-
var
|
|
181
|
-
/** not-@type {!BigInt64Array} */
|
|
182
|
-
HEAP64,
|
|
183
|
-
/* BigUint64Array type is not correctly defined in closure
|
|
184
|
-
/** not-@type {!BigUint64Array} */
|
|
185
|
-
HEAPU64;
|
|
186
|
-
|
|
187
|
-
var runtimeInitialized = false;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
function updateMemoryViews() {
|
|
192
|
-
var b = wasmMemory.buffer;
|
|
193
|
-
HEAP8 = new Int8Array(b);
|
|
194
|
-
HEAP16 = new Int16Array(b);
|
|
195
|
-
HEAPU8 = new Uint8Array(b);
|
|
196
|
-
HEAPU16 = new Uint16Array(b);
|
|
197
|
-
HEAP32 = new Int32Array(b);
|
|
198
|
-
HEAPU32 = new Uint32Array(b);
|
|
199
|
-
HEAPF32 = new Float32Array(b);
|
|
200
|
-
HEAPF64 = new Float64Array(b);
|
|
201
|
-
HEAP64 = new BigInt64Array(b);
|
|
202
|
-
HEAPU64 = new BigUint64Array(b);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// include: memoryprofiler.js
|
|
206
|
-
// end include: memoryprofiler.js
|
|
207
|
-
// end include: runtime_common.js
|
|
208
|
-
function preRun() {
|
|
209
|
-
if (Module['preRun']) {
|
|
210
|
-
if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
|
|
211
|
-
while (Module['preRun'].length) {
|
|
212
|
-
addOnPreRun(Module['preRun'].shift());
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
// Begin ATPRERUNS hooks
|
|
216
|
-
callRuntimeCallbacks(onPreRuns);
|
|
217
|
-
// End ATPRERUNS hooks
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function initRuntime() {
|
|
221
|
-
runtimeInitialized = true;
|
|
222
|
-
|
|
223
|
-
// No ATINITS hooks
|
|
224
|
-
|
|
225
|
-
wasmExports['__wasm_call_ctors']();
|
|
226
|
-
|
|
227
|
-
// No ATPOSTCTORS hooks
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function postRun() {
|
|
231
|
-
// PThreads reuse the runtime from the main thread.
|
|
232
|
-
|
|
233
|
-
if (Module['postRun']) {
|
|
234
|
-
if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
|
|
235
|
-
while (Module['postRun'].length) {
|
|
236
|
-
addOnPostRun(Module['postRun'].shift());
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// Begin ATPOSTRUNS hooks
|
|
241
|
-
callRuntimeCallbacks(onPostRuns);
|
|
242
|
-
// End ATPOSTRUNS hooks
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/** @param {string|number=} what */
|
|
246
|
-
function abort(what) {
|
|
247
|
-
Module['onAbort']?.(what);
|
|
248
|
-
|
|
249
|
-
what = 'Aborted(' + what + ')';
|
|
250
|
-
// TODO(sbc): Should we remove printing and leave it up to whoever
|
|
251
|
-
// catches the exception?
|
|
252
|
-
err(what);
|
|
253
|
-
|
|
254
|
-
ABORT = true;
|
|
255
|
-
|
|
256
|
-
what += '. Build with -sASSERTIONS for more info.';
|
|
257
|
-
|
|
258
|
-
// Use a wasm runtime error, because a JS error might be seen as a foreign
|
|
259
|
-
// exception, which means we'd run destructors on it. We need the error to
|
|
260
|
-
// simply make the program stop.
|
|
261
|
-
// FIXME This approach does not work in Wasm EH because it currently does not assume
|
|
262
|
-
// all RuntimeErrors are from traps; it decides whether a RuntimeError is from
|
|
263
|
-
// a trap or not based on a hidden field within the object. So at the moment
|
|
264
|
-
// we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that
|
|
265
|
-
// allows this in the wasm spec.
|
|
266
|
-
|
|
267
|
-
// Suppress closure compiler warning here. Closure compiler's builtin extern
|
|
268
|
-
// definition for WebAssembly.RuntimeError claims it takes no arguments even
|
|
269
|
-
// though it can.
|
|
270
|
-
// TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
|
|
271
|
-
/** @suppress {checkTypes} */
|
|
272
|
-
var e = new WebAssembly.RuntimeError(what);
|
|
273
|
-
|
|
274
|
-
readyPromiseReject?.(e);
|
|
275
|
-
// Throw the error whether or not MODULARIZE is set because abort is used
|
|
276
|
-
// in code paths apart from instantiation where an exception is expected
|
|
277
|
-
// to be thrown when abort is called.
|
|
278
|
-
throw e;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
var wasmBinaryFile;
|
|
282
|
-
|
|
283
|
-
function findWasmBinary() {
|
|
284
|
-
|
|
285
|
-
if (Module['locateFile']) {
|
|
286
|
-
return locateFile('satoru.wasm');
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
|
|
290
|
-
return new URL('satoru.wasm', import.meta.url).href;
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function getBinarySync(file) {
|
|
295
|
-
if (file == wasmBinaryFile && wasmBinary) {
|
|
296
|
-
return new Uint8Array(wasmBinary);
|
|
297
|
-
}
|
|
298
|
-
if (readBinary) {
|
|
299
|
-
return readBinary(file);
|
|
300
|
-
}
|
|
301
|
-
// Throwing a plain string here, even though it not normally advisable since
|
|
302
|
-
// this gets turning into an `abort` in instantiateArrayBuffer.
|
|
303
|
-
throw 'both async and sync fetching of the wasm failed';
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
async function getWasmBinary(binaryFile) {
|
|
307
|
-
// If we don't have the binary yet, load it asynchronously using readAsync.
|
|
308
|
-
if (!wasmBinary) {
|
|
309
|
-
// Fetch the binary using readAsync
|
|
310
|
-
try {
|
|
311
|
-
var response = await readAsync(binaryFile);
|
|
312
|
-
return new Uint8Array(response);
|
|
313
|
-
} catch {
|
|
314
|
-
// Fall back to getBinarySync below;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Otherwise, getBinarySync should be able to get it synchronously
|
|
319
|
-
return getBinarySync(binaryFile);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
async function instantiateArrayBuffer(binaryFile, imports) {
|
|
323
|
-
try {
|
|
324
|
-
var binary = await getWasmBinary(binaryFile);
|
|
325
|
-
var instance = await WebAssembly.instantiate(binary, imports);
|
|
326
|
-
return instance;
|
|
327
|
-
} catch (reason) {
|
|
328
|
-
err(`failed to asynchronously prepare wasm: ${reason}`);
|
|
329
|
-
|
|
330
|
-
abort(reason);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
async function instantiateAsync(binary, binaryFile, imports) {
|
|
335
|
-
if (!binary
|
|
336
|
-
) {
|
|
337
|
-
try {
|
|
338
|
-
var response = fetch(binaryFile, { credentials: 'same-origin' });
|
|
339
|
-
var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);
|
|
340
|
-
return instantiationResult;
|
|
341
|
-
} catch (reason) {
|
|
342
|
-
// We expect the most common failure cause to be a bad MIME type for the binary,
|
|
343
|
-
// in which case falling back to ArrayBuffer instantiation should work.
|
|
344
|
-
err(`wasm streaming compile failed: ${reason}`);
|
|
345
|
-
err('falling back to ArrayBuffer instantiation');
|
|
346
|
-
// fall back of instantiateArrayBuffer below
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
return instantiateArrayBuffer(binaryFile, imports);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
function getWasmImports() {
|
|
353
|
-
// prepare imports
|
|
354
|
-
var imports = {
|
|
355
|
-
'env': wasmImports,
|
|
356
|
-
'wasi_snapshot_preview1': wasmImports,
|
|
357
|
-
};
|
|
358
|
-
return imports;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// Create the wasm instance.
|
|
362
|
-
// Receives the wasm imports, returns the exports.
|
|
363
|
-
async function createWasm() {
|
|
364
|
-
// Load the wasm module and create an instance of using native support in the JS engine.
|
|
365
|
-
// handle a generated wasm instance, receiving its exports and
|
|
366
|
-
// performing other necessary setup
|
|
367
|
-
/** @param {WebAssembly.Module=} module*/
|
|
368
|
-
function receiveInstance(instance, module) {
|
|
369
|
-
wasmExports = instance.exports;
|
|
370
|
-
|
|
371
|
-
assignWasmExports(wasmExports);
|
|
372
|
-
|
|
373
|
-
updateMemoryViews();
|
|
374
|
-
|
|
375
|
-
return wasmExports;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// Prefer streaming instantiation if available.
|
|
379
|
-
function receiveInstantiationResult(result) {
|
|
380
|
-
// 'result' is a ResultObject object which has both the module and instance.
|
|
381
|
-
// receiveInstance() will swap in the exports (to Module.asm) so they can be called
|
|
382
|
-
// TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
|
|
383
|
-
// When the regression is fixed, can restore the above PTHREADS-enabled path.
|
|
384
|
-
return receiveInstance(result['instance']);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
var info = getWasmImports();
|
|
388
|
-
|
|
389
|
-
// User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
|
|
390
|
-
// to manually instantiate the Wasm module themselves. This allows pages to
|
|
391
|
-
// run the instantiation parallel to any other async startup actions they are
|
|
392
|
-
// performing.
|
|
393
|
-
// Also pthreads and wasm workers initialize the wasm instance through this
|
|
394
|
-
// path.
|
|
395
|
-
if (Module['instantiateWasm']) {
|
|
396
|
-
return new Promise((resolve, reject) => {
|
|
397
|
-
Module['instantiateWasm'](info, (inst, mod) => {
|
|
398
|
-
resolve(receiveInstance(inst, mod));
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
wasmBinaryFile ??= findWasmBinary();
|
|
404
|
-
var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info);
|
|
405
|
-
var exports = receiveInstantiationResult(result);
|
|
406
|
-
return exports;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
// end include: preamble.js
|
|
410
|
-
|
|
411
|
-
// Begin JS library code
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
class ExitStatus {
|
|
415
|
-
name = 'ExitStatus';
|
|
416
|
-
constructor(status) {
|
|
417
|
-
this.message = `Program terminated with exit(${status})`;
|
|
418
|
-
this.status = status;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
var callRuntimeCallbacks = (callbacks) => {
|
|
423
|
-
while (callbacks.length > 0) {
|
|
424
|
-
// Pass the module as the first argument.
|
|
425
|
-
callbacks.shift()(Module);
|
|
426
|
-
}
|
|
427
|
-
};
|
|
428
|
-
var onPostRuns = [];
|
|
429
|
-
var addOnPostRun = (cb) => onPostRuns.push(cb);
|
|
430
|
-
|
|
431
|
-
var onPreRuns = [];
|
|
432
|
-
var addOnPreRun = (cb) => onPreRuns.push(cb);
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* @param {number} ptr
|
|
438
|
-
* @param {string} type
|
|
439
|
-
*/
|
|
440
|
-
function getValue(ptr, type = 'i8') {
|
|
441
|
-
if (type.endsWith('*')) type = '*';
|
|
442
|
-
switch (type) {
|
|
443
|
-
case 'i1': return HEAP8[ptr];
|
|
444
|
-
case 'i8': return HEAP8[ptr];
|
|
445
|
-
case 'i16': return HEAP16[((ptr)>>1)];
|
|
446
|
-
case 'i32': return HEAP32[((ptr)>>2)];
|
|
447
|
-
case 'i64': return HEAP64[((ptr)>>3)];
|
|
448
|
-
case 'float': return HEAPF32[((ptr)>>2)];
|
|
449
|
-
case 'double': return HEAPF64[((ptr)>>3)];
|
|
450
|
-
case '*': return HEAPU32[((ptr)>>2)];
|
|
451
|
-
default: abort(`invalid type for getValue: ${type}`);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
var noExitRuntime = true;
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* @param {number} ptr
|
|
460
|
-
* @param {number} value
|
|
461
|
-
* @param {string} type
|
|
462
|
-
*/
|
|
463
|
-
function setValue(ptr, value, type = 'i8') {
|
|
464
|
-
if (type.endsWith('*')) type = '*';
|
|
465
|
-
switch (type) {
|
|
466
|
-
case 'i1': HEAP8[ptr] = value; break;
|
|
467
|
-
case 'i8': HEAP8[ptr] = value; break;
|
|
468
|
-
case 'i16': HEAP16[((ptr)>>1)] = value; break;
|
|
469
|
-
case 'i32': HEAP32[((ptr)>>2)] = value; break;
|
|
470
|
-
case 'i64': HEAP64[((ptr)>>3)] = BigInt(value); break;
|
|
471
|
-
case 'float': HEAPF32[((ptr)>>2)] = value; break;
|
|
472
|
-
case 'double': HEAPF64[((ptr)>>3)] = value; break;
|
|
473
|
-
case '*': HEAPU32[((ptr)>>2)] = value; break;
|
|
474
|
-
default: abort(`invalid type for setValue: ${type}`);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
var stackRestore = (val) => __emscripten_stack_restore(val);
|
|
479
|
-
|
|
480
|
-
var stackSave = () => _emscripten_stack_get_current();
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
var exceptionCaught = [];
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
var uncaughtExceptionCount = 0;
|
|
488
|
-
var ___cxa_begin_catch = (ptr) => {
|
|
489
|
-
var info = new ExceptionInfo(ptr);
|
|
490
|
-
if (!info.get_caught()) {
|
|
491
|
-
info.set_caught(true);
|
|
492
|
-
uncaughtExceptionCount--;
|
|
493
|
-
}
|
|
494
|
-
info.set_rethrown(false);
|
|
495
|
-
exceptionCaught.push(info);
|
|
496
|
-
return ___cxa_get_exception_ptr(ptr);
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
var exceptionLast = 0;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
var ___cxa_end_catch = () => {
|
|
504
|
-
// Clear state flag.
|
|
505
|
-
_setThrew(0, 0);
|
|
506
|
-
// Call destructor if one is registered then clear it.
|
|
507
|
-
var info = exceptionCaught.pop();
|
|
508
|
-
|
|
509
|
-
___cxa_decrement_exception_refcount(info.excPtr);
|
|
510
|
-
exceptionLast = 0; // XXX in decRef?
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
class ExceptionInfo {
|
|
515
|
-
// excPtr - Thrown object pointer to wrap. Metadata pointer is calculated from it.
|
|
516
|
-
constructor(excPtr) {
|
|
517
|
-
this.excPtr = excPtr;
|
|
518
|
-
this.ptr = excPtr - 24;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
set_type(type) {
|
|
522
|
-
HEAPU32[(((this.ptr)+(4))>>2)] = type;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
get_type() {
|
|
526
|
-
return HEAPU32[(((this.ptr)+(4))>>2)];
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
set_destructor(destructor) {
|
|
530
|
-
HEAPU32[(((this.ptr)+(8))>>2)] = destructor;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
get_destructor() {
|
|
534
|
-
return HEAPU32[(((this.ptr)+(8))>>2)];
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
set_caught(caught) {
|
|
538
|
-
caught = caught ? 1 : 0;
|
|
539
|
-
HEAP8[(this.ptr)+(12)] = caught;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
get_caught() {
|
|
543
|
-
return HEAP8[(this.ptr)+(12)] != 0;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
set_rethrown(rethrown) {
|
|
547
|
-
rethrown = rethrown ? 1 : 0;
|
|
548
|
-
HEAP8[(this.ptr)+(13)] = rethrown;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
get_rethrown() {
|
|
552
|
-
return HEAP8[(this.ptr)+(13)] != 0;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
// Initialize native structure fields. Should be called once after allocated.
|
|
556
|
-
init(type, destructor) {
|
|
557
|
-
this.set_adjusted_ptr(0);
|
|
558
|
-
this.set_type(type);
|
|
559
|
-
this.set_destructor(destructor);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
set_adjusted_ptr(adjustedPtr) {
|
|
563
|
-
HEAPU32[(((this.ptr)+(16))>>2)] = adjustedPtr;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
get_adjusted_ptr() {
|
|
567
|
-
return HEAPU32[(((this.ptr)+(16))>>2)];
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
var setTempRet0 = (val) => __emscripten_tempret_set(val);
|
|
573
|
-
var findMatchingCatch = (args) => {
|
|
574
|
-
var thrown =
|
|
575
|
-
exceptionLast;
|
|
576
|
-
if (!thrown) {
|
|
577
|
-
// just pass through the null ptr
|
|
578
|
-
setTempRet0(0);
|
|
579
|
-
return 0;
|
|
580
|
-
}
|
|
581
|
-
var info = new ExceptionInfo(thrown);
|
|
582
|
-
info.set_adjusted_ptr(thrown);
|
|
583
|
-
var thrownType = info.get_type();
|
|
584
|
-
if (!thrownType) {
|
|
585
|
-
// just pass through the thrown ptr
|
|
586
|
-
setTempRet0(0);
|
|
587
|
-
return thrown;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
// can_catch receives a **, add indirection
|
|
591
|
-
// The different catch blocks are denoted by different types.
|
|
592
|
-
// Due to inheritance, those types may not precisely match the
|
|
593
|
-
// type of the thrown object. Find one which matches, and
|
|
594
|
-
// return the type of the catch block which should be called.
|
|
595
|
-
for (var caughtType of args) {
|
|
596
|
-
if (caughtType === 0 || caughtType === thrownType) {
|
|
597
|
-
// Catch all clause matched or exactly the same type is caught
|
|
598
|
-
break;
|
|
599
|
-
}
|
|
600
|
-
var adjusted_ptr_addr = info.ptr + 16;
|
|
601
|
-
if (___cxa_can_catch(caughtType, thrownType, adjusted_ptr_addr)) {
|
|
602
|
-
setTempRet0(caughtType);
|
|
603
|
-
return thrown;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
setTempRet0(thrownType);
|
|
607
|
-
return thrown;
|
|
608
|
-
};
|
|
609
|
-
var ___cxa_find_matching_catch_2 = () => findMatchingCatch([]);
|
|
610
|
-
|
|
611
|
-
var ___cxa_find_matching_catch_3 = (arg0) => findMatchingCatch([arg0]);
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
var ___cxa_rethrow = () => {
|
|
617
|
-
var info = exceptionCaught.pop();
|
|
618
|
-
if (!info) {
|
|
619
|
-
abort('no exception to throw');
|
|
620
|
-
}
|
|
621
|
-
var ptr = info.excPtr;
|
|
622
|
-
if (!info.get_rethrown()) {
|
|
623
|
-
// Only pop if the corresponding push was through rethrow_primary_exception
|
|
624
|
-
exceptionCaught.push(info);
|
|
625
|
-
info.set_rethrown(true);
|
|
626
|
-
info.set_caught(false);
|
|
627
|
-
uncaughtExceptionCount++;
|
|
628
|
-
}
|
|
629
|
-
___cxa_increment_exception_refcount(ptr);
|
|
630
|
-
exceptionLast = ptr;
|
|
631
|
-
throw exceptionLast;
|
|
632
|
-
};
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
var ___cxa_throw = (ptr, type, destructor) => {
|
|
638
|
-
var info = new ExceptionInfo(ptr);
|
|
639
|
-
// Initialize ExceptionInfo content after it was allocated in __cxa_allocate_exception.
|
|
640
|
-
info.init(type, destructor);
|
|
641
|
-
___cxa_increment_exception_refcount(ptr);
|
|
642
|
-
exceptionLast = ptr;
|
|
643
|
-
uncaughtExceptionCount++;
|
|
644
|
-
throw exceptionLast;
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
var ___cxa_uncaught_exceptions = () => uncaughtExceptionCount;
|
|
648
|
-
|
|
649
|
-
var ___resumeException = (ptr) => {
|
|
650
|
-
if (!exceptionLast) {
|
|
651
|
-
exceptionLast = ptr;
|
|
652
|
-
}
|
|
653
|
-
throw exceptionLast;
|
|
654
|
-
};
|
|
655
|
-
|
|
656
|
-
var UTF8Decoder = globalThis.TextDecoder && new TextDecoder();
|
|
657
|
-
|
|
658
|
-
var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {
|
|
659
|
-
var maxIdx = idx + maxBytesToRead;
|
|
660
|
-
if (ignoreNul) return maxIdx;
|
|
661
|
-
// TextDecoder needs to know the byte length in advance, it doesn't stop on
|
|
662
|
-
// null terminator by itself.
|
|
663
|
-
// As a tiny code save trick, compare idx against maxIdx using a negation,
|
|
664
|
-
// so that maxBytesToRead=undefined/NaN means Infinity.
|
|
665
|
-
while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;
|
|
666
|
-
return idx;
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
* Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
|
|
671
|
-
* array that contains uint8 values, returns a copy of that string as a
|
|
672
|
-
* Javascript String object.
|
|
673
|
-
* heapOrArray is either a regular array, or a JavaScript typed array view.
|
|
674
|
-
* @param {number=} idx
|
|
675
|
-
* @param {number=} maxBytesToRead
|
|
676
|
-
* @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.
|
|
677
|
-
* @return {string}
|
|
678
|
-
*/
|
|
679
|
-
var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {
|
|
680
|
-
|
|
681
|
-
var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul);
|
|
682
|
-
|
|
683
|
-
// When using conditional TextDecoder, skip it for short strings as the overhead of the native call is not worth it.
|
|
684
|
-
if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
|
|
685
|
-
return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
|
|
686
|
-
}
|
|
687
|
-
var str = '';
|
|
688
|
-
while (idx < endPtr) {
|
|
689
|
-
// For UTF8 byte structure, see:
|
|
690
|
-
// http://en.wikipedia.org/wiki/UTF-8#Description
|
|
691
|
-
// https://www.ietf.org/rfc/rfc2279.txt
|
|
692
|
-
// https://tools.ietf.org/html/rfc3629
|
|
693
|
-
var u0 = heapOrArray[idx++];
|
|
694
|
-
if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
|
|
695
|
-
var u1 = heapOrArray[idx++] & 63;
|
|
696
|
-
if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
|
|
697
|
-
var u2 = heapOrArray[idx++] & 63;
|
|
698
|
-
if ((u0 & 0xF0) == 0xE0) {
|
|
699
|
-
u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
|
|
700
|
-
} else {
|
|
701
|
-
u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
if (u0 < 0x10000) {
|
|
705
|
-
str += String.fromCharCode(u0);
|
|
706
|
-
} else {
|
|
707
|
-
var ch = u0 - 0x10000;
|
|
708
|
-
str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
return str;
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
|
|
716
|
-
* emscripten HEAP, returns a copy of that string as a Javascript String object.
|
|
717
|
-
*
|
|
718
|
-
* @param {number} ptr
|
|
719
|
-
* @param {number=} maxBytesToRead - An optional length that specifies the
|
|
720
|
-
* maximum number of bytes to read. You can omit this parameter to scan the
|
|
721
|
-
* string until the first 0 byte. If maxBytesToRead is passed, and the string
|
|
722
|
-
* at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
|
|
723
|
-
* string will cut short at that byte index.
|
|
724
|
-
* @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.
|
|
725
|
-
* @return {string}
|
|
726
|
-
*/
|
|
727
|
-
var UTF8ToString = (ptr, maxBytesToRead, ignoreNul) => {
|
|
728
|
-
return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : '';
|
|
729
|
-
};
|
|
730
|
-
var SYSCALLS = {
|
|
731
|
-
varargs:undefined,
|
|
732
|
-
getStr(ptr) {
|
|
733
|
-
var ret = UTF8ToString(ptr);
|
|
734
|
-
return ret;
|
|
735
|
-
},
|
|
736
|
-
};
|
|
737
|
-
function ___syscall_fcntl64(fd, cmd, varargs) {
|
|
738
|
-
SYSCALLS.varargs = varargs;
|
|
739
|
-
|
|
740
|
-
return 0;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
var ___syscall_fstat64 = (fd, buf) => {
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
function ___syscall_ioctl(fd, op, varargs) {
|
|
747
|
-
SYSCALLS.varargs = varargs;
|
|
748
|
-
|
|
749
|
-
return 0;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
var ___syscall_lstat64 = (path, buf) => {
|
|
753
|
-
};
|
|
754
|
-
|
|
755
|
-
var ___syscall_newfstatat = (dirfd, path, buf, flags) => {
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
function ___syscall_openat(dirfd, path, flags, varargs) {
|
|
759
|
-
SYSCALLS.varargs = varargs;
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
var ___syscall_stat64 = (path, buf) => {
|
|
764
|
-
};
|
|
765
|
-
|
|
766
|
-
var __abort_js = () =>
|
|
767
|
-
abort('');
|
|
768
|
-
|
|
769
|
-
var AsciiToString = (ptr) => {
|
|
770
|
-
var str = '';
|
|
771
|
-
while (1) {
|
|
772
|
-
var ch = HEAPU8[ptr++];
|
|
773
|
-
if (!ch) return str;
|
|
774
|
-
str += String.fromCharCode(ch);
|
|
775
|
-
}
|
|
776
|
-
};
|
|
777
|
-
|
|
778
|
-
var awaitingDependencies = {
|
|
779
|
-
};
|
|
780
|
-
|
|
781
|
-
var registeredTypes = {
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
var typeDependencies = {
|
|
785
|
-
};
|
|
786
|
-
|
|
787
|
-
var BindingError = class BindingError extends Error { constructor(message) { super(message); this.name = 'BindingError'; }};
|
|
788
|
-
var throwBindingError = (message) => { throw new BindingError(message); };
|
|
789
|
-
/** @param {Object=} options */
|
|
790
|
-
function sharedRegisterType(rawType, registeredInstance, options = {}) {
|
|
791
|
-
var name = registeredInstance.name;
|
|
792
|
-
if (!rawType) {
|
|
793
|
-
throwBindingError(`type "${name}" must have a positive integer typeid pointer`);
|
|
794
|
-
}
|
|
795
|
-
if (registeredTypes.hasOwnProperty(rawType)) {
|
|
796
|
-
if (options.ignoreDuplicateRegistrations) {
|
|
797
|
-
return;
|
|
798
|
-
} else {
|
|
799
|
-
throwBindingError(`Cannot register type '${name}' twice`);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
registeredTypes[rawType] = registeredInstance;
|
|
804
|
-
delete typeDependencies[rawType];
|
|
805
|
-
|
|
806
|
-
if (awaitingDependencies.hasOwnProperty(rawType)) {
|
|
807
|
-
var callbacks = awaitingDependencies[rawType];
|
|
808
|
-
delete awaitingDependencies[rawType];
|
|
809
|
-
callbacks.forEach((cb) => cb());
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
/** @param {Object=} options */
|
|
813
|
-
function registerType(rawType, registeredInstance, options = {}) {
|
|
814
|
-
return sharedRegisterType(rawType, registeredInstance, options);
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
var integerReadValueFromPointer = (name, width, signed) => {
|
|
818
|
-
// integers are quite common, so generate very specialized functions
|
|
819
|
-
switch (width) {
|
|
820
|
-
case 1: return signed ?
|
|
821
|
-
(pointer) => HEAP8[pointer] :
|
|
822
|
-
(pointer) => HEAPU8[pointer];
|
|
823
|
-
case 2: return signed ?
|
|
824
|
-
(pointer) => HEAP16[((pointer)>>1)] :
|
|
825
|
-
(pointer) => HEAPU16[((pointer)>>1)]
|
|
826
|
-
case 4: return signed ?
|
|
827
|
-
(pointer) => HEAP32[((pointer)>>2)] :
|
|
828
|
-
(pointer) => HEAPU32[((pointer)>>2)]
|
|
829
|
-
case 8: return signed ?
|
|
830
|
-
(pointer) => HEAP64[((pointer)>>3)] :
|
|
831
|
-
(pointer) => HEAPU64[((pointer)>>3)]
|
|
832
|
-
default:
|
|
833
|
-
throw new TypeError(`invalid integer width (${width}): ${name}`);
|
|
834
|
-
}
|
|
835
|
-
};
|
|
836
|
-
/** @suppress {globalThis} */
|
|
837
|
-
var __embind_register_bigint = (primitiveType, name, size, minRange, maxRange) => {
|
|
838
|
-
name = AsciiToString(name);
|
|
839
|
-
|
|
840
|
-
const isUnsignedType = minRange === 0n;
|
|
841
|
-
|
|
842
|
-
let fromWireType = (value) => value;
|
|
843
|
-
if (isUnsignedType) {
|
|
844
|
-
// uint64 get converted to int64 in ABI, fix them up like we do for 32-bit integers.
|
|
845
|
-
const bitSize = size * 8;
|
|
846
|
-
fromWireType = (value) => {
|
|
847
|
-
return BigInt.asUintN(bitSize, value);
|
|
848
|
-
}
|
|
849
|
-
maxRange = fromWireType(maxRange);
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
registerType(primitiveType, {
|
|
853
|
-
name,
|
|
854
|
-
fromWireType: fromWireType,
|
|
855
|
-
toWireType: (destructors, value) => {
|
|
856
|
-
if (typeof value == "number") {
|
|
857
|
-
value = BigInt(value);
|
|
858
|
-
}
|
|
859
|
-
return value;
|
|
860
|
-
},
|
|
861
|
-
readValueFromPointer: integerReadValueFromPointer(name, size, !isUnsignedType),
|
|
862
|
-
destructorFunction: null, // This type does not need a destructor
|
|
863
|
-
});
|
|
864
|
-
};
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
/** @suppress {globalThis} */
|
|
868
|
-
var __embind_register_bool = (rawType, name, trueValue, falseValue) => {
|
|
869
|
-
name = AsciiToString(name);
|
|
870
|
-
registerType(rawType, {
|
|
871
|
-
name,
|
|
872
|
-
fromWireType: function(wt) {
|
|
873
|
-
// ambiguous emscripten ABI: sometimes return values are
|
|
874
|
-
// true or false, and sometimes integers (0 or 1)
|
|
875
|
-
return !!wt;
|
|
876
|
-
},
|
|
877
|
-
toWireType: function(destructors, o) {
|
|
878
|
-
return o ? trueValue : falseValue;
|
|
879
|
-
},
|
|
880
|
-
readValueFromPointer: function(pointer) {
|
|
881
|
-
return this.fromWireType(HEAPU8[pointer]);
|
|
882
|
-
},
|
|
883
|
-
destructorFunction: null, // This type does not need a destructor
|
|
884
|
-
});
|
|
885
|
-
};
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
var shallowCopyInternalPointer = (o) => {
|
|
890
|
-
return {
|
|
891
|
-
count: o.count,
|
|
892
|
-
deleteScheduled: o.deleteScheduled,
|
|
893
|
-
preservePointerOnDelete: o.preservePointerOnDelete,
|
|
894
|
-
ptr: o.ptr,
|
|
895
|
-
ptrType: o.ptrType,
|
|
896
|
-
smartPtr: o.smartPtr,
|
|
897
|
-
smartPtrType: o.smartPtrType,
|
|
898
|
-
};
|
|
899
|
-
};
|
|
900
|
-
|
|
901
|
-
var throwInstanceAlreadyDeleted = (obj) => {
|
|
902
|
-
function getInstanceTypeName(handle) {
|
|
903
|
-
return handle.$$.ptrType.registeredClass.name;
|
|
904
|
-
}
|
|
905
|
-
throwBindingError(getInstanceTypeName(obj) + ' instance already deleted');
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
var finalizationRegistry = false;
|
|
909
|
-
|
|
910
|
-
var detachFinalizer = (handle) => {};
|
|
911
|
-
|
|
912
|
-
var runDestructor = ($$) => {
|
|
913
|
-
if ($$.smartPtr) {
|
|
914
|
-
$$.smartPtrType.rawDestructor($$.smartPtr);
|
|
915
|
-
} else {
|
|
916
|
-
$$.ptrType.registeredClass.rawDestructor($$.ptr);
|
|
917
|
-
}
|
|
918
|
-
};
|
|
919
|
-
var releaseClassHandle = ($$) => {
|
|
920
|
-
$$.count.value -= 1;
|
|
921
|
-
var toDelete = 0 === $$.count.value;
|
|
922
|
-
if (toDelete) {
|
|
923
|
-
runDestructor($$);
|
|
924
|
-
}
|
|
925
|
-
};
|
|
926
|
-
var attachFinalizer = (handle) => {
|
|
927
|
-
if (!globalThis.FinalizationRegistry) {
|
|
928
|
-
attachFinalizer = (handle) => handle;
|
|
929
|
-
return handle;
|
|
930
|
-
}
|
|
931
|
-
// If the running environment has a FinalizationRegistry (see
|
|
932
|
-
// https://github.com/tc39/proposal-weakrefs), then attach finalizers
|
|
933
|
-
// for class handles. We check for the presence of FinalizationRegistry
|
|
934
|
-
// at run-time, not build-time.
|
|
935
|
-
finalizationRegistry = new FinalizationRegistry((info) => {
|
|
936
|
-
releaseClassHandle(info.$$);
|
|
937
|
-
});
|
|
938
|
-
attachFinalizer = (handle) => {
|
|
939
|
-
var $$ = handle.$$;
|
|
940
|
-
var hasSmartPtr = !!$$.smartPtr;
|
|
941
|
-
if (hasSmartPtr) {
|
|
942
|
-
// We should not call the destructor on raw pointers in case other code expects the pointee to live
|
|
943
|
-
var info = { $$: $$ };
|
|
944
|
-
finalizationRegistry.register(handle, info, handle);
|
|
945
|
-
}
|
|
946
|
-
return handle;
|
|
947
|
-
};
|
|
948
|
-
detachFinalizer = (handle) => finalizationRegistry.unregister(handle);
|
|
949
|
-
return attachFinalizer(handle);
|
|
950
|
-
};
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
var deletionQueue = [];
|
|
956
|
-
var flushPendingDeletes = () => {
|
|
957
|
-
while (deletionQueue.length) {
|
|
958
|
-
var obj = deletionQueue.pop();
|
|
959
|
-
obj.$$.deleteScheduled = false;
|
|
960
|
-
obj['delete']();
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
|
|
964
|
-
var delayFunction;
|
|
965
|
-
var init_ClassHandle = () => {
|
|
966
|
-
let proto = ClassHandle.prototype;
|
|
967
|
-
|
|
968
|
-
Object.assign(proto, {
|
|
969
|
-
"isAliasOf"(other) {
|
|
970
|
-
if (!(this instanceof ClassHandle)) {
|
|
971
|
-
return false;
|
|
972
|
-
}
|
|
973
|
-
if (!(other instanceof ClassHandle)) {
|
|
974
|
-
return false;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
var leftClass = this.$$.ptrType.registeredClass;
|
|
978
|
-
var left = this.$$.ptr;
|
|
979
|
-
other.$$ = /** @type {Object} */ (other.$$);
|
|
980
|
-
var rightClass = other.$$.ptrType.registeredClass;
|
|
981
|
-
var right = other.$$.ptr;
|
|
982
|
-
|
|
983
|
-
while (leftClass.baseClass) {
|
|
984
|
-
left = leftClass.upcast(left);
|
|
985
|
-
leftClass = leftClass.baseClass;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
while (rightClass.baseClass) {
|
|
989
|
-
right = rightClass.upcast(right);
|
|
990
|
-
rightClass = rightClass.baseClass;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
return leftClass === rightClass && left === right;
|
|
994
|
-
},
|
|
995
|
-
|
|
996
|
-
"clone"() {
|
|
997
|
-
if (!this.$$.ptr) {
|
|
998
|
-
throwInstanceAlreadyDeleted(this);
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
if (this.$$.preservePointerOnDelete) {
|
|
1002
|
-
this.$$.count.value += 1;
|
|
1003
|
-
return this;
|
|
1004
|
-
} else {
|
|
1005
|
-
var clone = attachFinalizer(Object.create(Object.getPrototypeOf(this), {
|
|
1006
|
-
$$: {
|
|
1007
|
-
value: shallowCopyInternalPointer(this.$$),
|
|
1008
|
-
}
|
|
1009
|
-
}));
|
|
1010
|
-
|
|
1011
|
-
clone.$$.count.value += 1;
|
|
1012
|
-
clone.$$.deleteScheduled = false;
|
|
1013
|
-
return clone;
|
|
1014
|
-
}
|
|
1015
|
-
},
|
|
1016
|
-
|
|
1017
|
-
"delete"() {
|
|
1018
|
-
if (!this.$$.ptr) {
|
|
1019
|
-
throwInstanceAlreadyDeleted(this);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
if (this.$$.deleteScheduled && !this.$$.preservePointerOnDelete) {
|
|
1023
|
-
throwBindingError('Object already scheduled for deletion');
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
detachFinalizer(this);
|
|
1027
|
-
releaseClassHandle(this.$$);
|
|
1028
|
-
|
|
1029
|
-
if (!this.$$.preservePointerOnDelete) {
|
|
1030
|
-
this.$$.smartPtr = undefined;
|
|
1031
|
-
this.$$.ptr = undefined;
|
|
1032
|
-
}
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1035
|
-
"isDeleted"() {
|
|
1036
|
-
return !this.$$.ptr;
|
|
1037
|
-
},
|
|
1038
|
-
|
|
1039
|
-
"deleteLater"() {
|
|
1040
|
-
if (!this.$$.ptr) {
|
|
1041
|
-
throwInstanceAlreadyDeleted(this);
|
|
1042
|
-
}
|
|
1043
|
-
if (this.$$.deleteScheduled && !this.$$.preservePointerOnDelete) {
|
|
1044
|
-
throwBindingError('Object already scheduled for deletion');
|
|
1045
|
-
}
|
|
1046
|
-
deletionQueue.push(this);
|
|
1047
|
-
if (deletionQueue.length === 1 && delayFunction) {
|
|
1048
|
-
delayFunction(flushPendingDeletes);
|
|
1049
|
-
}
|
|
1050
|
-
this.$$.deleteScheduled = true;
|
|
1051
|
-
return this;
|
|
1052
|
-
},
|
|
1053
|
-
});
|
|
1054
|
-
|
|
1055
|
-
// Support `using ...` from https://github.com/tc39/proposal-explicit-resource-management.
|
|
1056
|
-
const symbolDispose = Symbol.dispose;
|
|
1057
|
-
if (symbolDispose) {
|
|
1058
|
-
proto[symbolDispose] = proto['delete'];
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
/** @constructor */
|
|
1062
|
-
function ClassHandle() {
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
var createNamedFunction = (name, func) => Object.defineProperty(func, 'name', { value: name });
|
|
1066
|
-
|
|
1067
|
-
var registeredPointers = {
|
|
1068
|
-
};
|
|
1069
|
-
|
|
1070
|
-
var ensureOverloadTable = (proto, methodName, humanName) => {
|
|
1071
|
-
if (undefined === proto[methodName].overloadTable) {
|
|
1072
|
-
var prevFunc = proto[methodName];
|
|
1073
|
-
// Inject an overload resolver function that routes to the appropriate overload based on the number of arguments.
|
|
1074
|
-
proto[methodName] = function(...args) {
|
|
1075
|
-
// TODO This check can be removed in -O3 level "unsafe" optimizations.
|
|
1076
|
-
if (!proto[methodName].overloadTable.hasOwnProperty(args.length)) {
|
|
1077
|
-
throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${args.length}) - expects one of (${proto[methodName].overloadTable})!`);
|
|
1078
|
-
}
|
|
1079
|
-
return proto[methodName].overloadTable[args.length].apply(this, args);
|
|
1080
|
-
};
|
|
1081
|
-
// Move the previous function into the overload table.
|
|
1082
|
-
proto[methodName].overloadTable = [];
|
|
1083
|
-
proto[methodName].overloadTable[prevFunc.argCount] = prevFunc;
|
|
1084
|
-
}
|
|
1085
|
-
};
|
|
1086
|
-
|
|
1087
|
-
/** @param {number=} numArguments */
|
|
1088
|
-
var exposePublicSymbol = (name, value, numArguments) => {
|
|
1089
|
-
if (Module.hasOwnProperty(name)) {
|
|
1090
|
-
if (undefined === numArguments || (undefined !== Module[name].overloadTable && undefined !== Module[name].overloadTable[numArguments])) {
|
|
1091
|
-
throwBindingError(`Cannot register public name '${name}' twice`);
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
// We are exposing a function with the same name as an existing function. Create an overload table and a function selector
|
|
1095
|
-
// that routes between the two.
|
|
1096
|
-
ensureOverloadTable(Module, name, name);
|
|
1097
|
-
if (Module[name].overloadTable.hasOwnProperty(numArguments)) {
|
|
1098
|
-
throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`);
|
|
1099
|
-
}
|
|
1100
|
-
// Add the new function into the overload table.
|
|
1101
|
-
Module[name].overloadTable[numArguments] = value;
|
|
1102
|
-
} else {
|
|
1103
|
-
Module[name] = value;
|
|
1104
|
-
Module[name].argCount = numArguments;
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
|
|
1108
|
-
var char_0 = 48;
|
|
1109
|
-
|
|
1110
|
-
var char_9 = 57;
|
|
1111
|
-
var makeLegalFunctionName = (name) => {
|
|
1112
|
-
name = name.replace(/[^a-zA-Z0-9_]/g, '$');
|
|
1113
|
-
var f = name.charCodeAt(0);
|
|
1114
|
-
if (f >= char_0 && f <= char_9) {
|
|
1115
|
-
return `_${name}`;
|
|
1116
|
-
}
|
|
1117
|
-
return name;
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
/** @constructor */
|
|
1122
|
-
function RegisteredClass(name,
|
|
1123
|
-
constructor,
|
|
1124
|
-
instancePrototype,
|
|
1125
|
-
rawDestructor,
|
|
1126
|
-
baseClass,
|
|
1127
|
-
getActualType,
|
|
1128
|
-
upcast,
|
|
1129
|
-
downcast) {
|
|
1130
|
-
this.name = name;
|
|
1131
|
-
this.constructor = constructor;
|
|
1132
|
-
this.instancePrototype = instancePrototype;
|
|
1133
|
-
this.rawDestructor = rawDestructor;
|
|
1134
|
-
this.baseClass = baseClass;
|
|
1135
|
-
this.getActualType = getActualType;
|
|
1136
|
-
this.upcast = upcast;
|
|
1137
|
-
this.downcast = downcast;
|
|
1138
|
-
this.pureVirtualFunctions = [];
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
var upcastPointer = (ptr, ptrClass, desiredClass) => {
|
|
1143
|
-
while (ptrClass !== desiredClass) {
|
|
1144
|
-
if (!ptrClass.upcast) {
|
|
1145
|
-
throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`);
|
|
1146
|
-
}
|
|
1147
|
-
ptr = ptrClass.upcast(ptr);
|
|
1148
|
-
ptrClass = ptrClass.baseClass;
|
|
1149
|
-
}
|
|
1150
|
-
return ptr;
|
|
1151
|
-
};
|
|
1152
|
-
|
|
1153
|
-
var embindRepr = (v) => {
|
|
1154
|
-
if (v === null) {
|
|
1155
|
-
return 'null';
|
|
1156
|
-
}
|
|
1157
|
-
var t = typeof v;
|
|
1158
|
-
if (t === 'object' || t === 'array' || t === 'function') {
|
|
1159
|
-
return v.toString();
|
|
1160
|
-
} else {
|
|
1161
|
-
return '' + v;
|
|
1162
|
-
}
|
|
1163
|
-
};
|
|
1164
|
-
/** @suppress {globalThis} */
|
|
1165
|
-
function constNoSmartPtrRawPointerToWireType(destructors, handle) {
|
|
1166
|
-
if (handle === null) {
|
|
1167
|
-
if (this.isReference) {
|
|
1168
|
-
throwBindingError(`null is not a valid ${this.name}`);
|
|
1169
|
-
}
|
|
1170
|
-
return 0;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
if (!handle.$$) {
|
|
1174
|
-
throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`);
|
|
1175
|
-
}
|
|
1176
|
-
if (!handle.$$.ptr) {
|
|
1177
|
-
throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1178
|
-
}
|
|
1179
|
-
var handleClass = handle.$$.ptrType.registeredClass;
|
|
1180
|
-
var ptr = upcastPointer(handle.$$.ptr, handleClass, this.registeredClass);
|
|
1181
|
-
return ptr;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
/** @suppress {globalThis} */
|
|
1186
|
-
function genericPointerToWireType(destructors, handle) {
|
|
1187
|
-
var ptr;
|
|
1188
|
-
if (handle === null) {
|
|
1189
|
-
if (this.isReference) {
|
|
1190
|
-
throwBindingError(`null is not a valid ${this.name}`);
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
if (this.isSmartPointer) {
|
|
1194
|
-
ptr = this.rawConstructor();
|
|
1195
|
-
if (destructors !== null) {
|
|
1196
|
-
destructors.push(this.rawDestructor, ptr);
|
|
1197
|
-
}
|
|
1198
|
-
return ptr;
|
|
1199
|
-
} else {
|
|
1200
|
-
return 0;
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
if (!handle || !handle.$$) {
|
|
1205
|
-
throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`);
|
|
1206
|
-
}
|
|
1207
|
-
if (!handle.$$.ptr) {
|
|
1208
|
-
throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1209
|
-
}
|
|
1210
|
-
if (!this.isConst && handle.$$.ptrType.isConst) {
|
|
1211
|
-
throwBindingError(`Cannot convert argument of type ${(handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name)} to parameter type ${this.name}`);
|
|
1212
|
-
}
|
|
1213
|
-
var handleClass = handle.$$.ptrType.registeredClass;
|
|
1214
|
-
ptr = upcastPointer(handle.$$.ptr, handleClass, this.registeredClass);
|
|
1215
|
-
|
|
1216
|
-
if (this.isSmartPointer) {
|
|
1217
|
-
// TODO: this is not strictly true
|
|
1218
|
-
// We could support BY_EMVAL conversions from raw pointers to smart pointers
|
|
1219
|
-
// because the smart pointer can hold a reference to the handle
|
|
1220
|
-
if (undefined === handle.$$.smartPtr) {
|
|
1221
|
-
throwBindingError('Passing raw pointer to smart pointer is illegal');
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
switch (this.sharingPolicy) {
|
|
1225
|
-
case 0: // NONE
|
|
1226
|
-
// no upcasting
|
|
1227
|
-
if (handle.$$.smartPtrType === this) {
|
|
1228
|
-
ptr = handle.$$.smartPtr;
|
|
1229
|
-
} else {
|
|
1230
|
-
throwBindingError(`Cannot convert argument of type ${(handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name)} to parameter type ${this.name}`);
|
|
1231
|
-
}
|
|
1232
|
-
break;
|
|
1233
|
-
|
|
1234
|
-
case 1: // INTRUSIVE
|
|
1235
|
-
ptr = handle.$$.smartPtr;
|
|
1236
|
-
break;
|
|
1237
|
-
|
|
1238
|
-
case 2: // BY_EMVAL
|
|
1239
|
-
if (handle.$$.smartPtrType === this) {
|
|
1240
|
-
ptr = handle.$$.smartPtr;
|
|
1241
|
-
} else {
|
|
1242
|
-
var clonedHandle = handle['clone']();
|
|
1243
|
-
ptr = this.rawShare(
|
|
1244
|
-
ptr,
|
|
1245
|
-
Emval.toHandle(() => clonedHandle['delete']())
|
|
1246
|
-
);
|
|
1247
|
-
if (destructors !== null) {
|
|
1248
|
-
destructors.push(this.rawDestructor, ptr);
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
break;
|
|
1252
|
-
|
|
1253
|
-
default:
|
|
1254
|
-
throwBindingError('Unsupported sharing policy');
|
|
1255
|
-
}
|
|
1256
|
-
}
|
|
1257
|
-
return ptr;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
/** @suppress {globalThis} */
|
|
1263
|
-
function nonConstNoSmartPtrRawPointerToWireType(destructors, handle) {
|
|
1264
|
-
if (handle === null) {
|
|
1265
|
-
if (this.isReference) {
|
|
1266
|
-
throwBindingError(`null is not a valid ${this.name}`);
|
|
1267
|
-
}
|
|
1268
|
-
return 0;
|
|
1269
|
-
}
|
|
1270
|
-
|
|
1271
|
-
if (!handle.$$) {
|
|
1272
|
-
throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`);
|
|
1273
|
-
}
|
|
1274
|
-
if (!handle.$$.ptr) {
|
|
1275
|
-
throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
1276
|
-
}
|
|
1277
|
-
if (handle.$$.ptrType.isConst) {
|
|
1278
|
-
throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`);
|
|
1279
|
-
}
|
|
1280
|
-
var handleClass = handle.$$.ptrType.registeredClass;
|
|
1281
|
-
var ptr = upcastPointer(handle.$$.ptr, handleClass, this.registeredClass);
|
|
1282
|
-
return ptr;
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
/** @suppress {globalThis} */
|
|
1287
|
-
function readPointer(pointer) {
|
|
1288
|
-
return this.fromWireType(HEAPU32[((pointer)>>2)]);
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
var downcastPointer = (ptr, ptrClass, desiredClass) => {
|
|
1292
|
-
if (ptrClass === desiredClass) {
|
|
1293
|
-
return ptr;
|
|
1294
|
-
}
|
|
1295
|
-
if (undefined === desiredClass.baseClass) {
|
|
1296
|
-
return null; // no conversion
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
var rv = downcastPointer(ptr, ptrClass, desiredClass.baseClass);
|
|
1300
|
-
if (rv === null) {
|
|
1301
|
-
return null;
|
|
1302
|
-
}
|
|
1303
|
-
return desiredClass.downcast(rv);
|
|
1304
|
-
};
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
var registeredInstances = {
|
|
1308
|
-
};
|
|
1309
|
-
|
|
1310
|
-
var getBasestPointer = (class_, ptr) => {
|
|
1311
|
-
if (ptr === undefined) {
|
|
1312
|
-
throwBindingError('ptr should not be undefined');
|
|
1313
|
-
}
|
|
1314
|
-
while (class_.baseClass) {
|
|
1315
|
-
ptr = class_.upcast(ptr);
|
|
1316
|
-
class_ = class_.baseClass;
|
|
1317
|
-
}
|
|
1318
|
-
return ptr;
|
|
1319
|
-
};
|
|
1320
|
-
var getInheritedInstance = (class_, ptr) => {
|
|
1321
|
-
ptr = getBasestPointer(class_, ptr);
|
|
1322
|
-
return registeredInstances[ptr];
|
|
1323
|
-
};
|
|
1324
|
-
|
|
1325
|
-
var InternalError = class InternalError extends Error { constructor(message) { super(message); this.name = 'InternalError'; }};
|
|
1326
|
-
var throwInternalError = (message) => { throw new InternalError(message); };
|
|
1327
|
-
|
|
1328
|
-
var makeClassHandle = (prototype, record) => {
|
|
1329
|
-
if (!record.ptrType || !record.ptr) {
|
|
1330
|
-
throwInternalError('makeClassHandle requires ptr and ptrType');
|
|
1331
|
-
}
|
|
1332
|
-
var hasSmartPtrType = !!record.smartPtrType;
|
|
1333
|
-
var hasSmartPtr = !!record.smartPtr;
|
|
1334
|
-
if (hasSmartPtrType !== hasSmartPtr) {
|
|
1335
|
-
throwInternalError('Both smartPtrType and smartPtr must be specified');
|
|
1336
|
-
}
|
|
1337
|
-
record.count = { value: 1 };
|
|
1338
|
-
return attachFinalizer(Object.create(prototype, {
|
|
1339
|
-
$$: {
|
|
1340
|
-
value: record,
|
|
1341
|
-
writable: true,
|
|
1342
|
-
},
|
|
1343
|
-
}));
|
|
1344
|
-
};
|
|
1345
|
-
/** @suppress {globalThis} */
|
|
1346
|
-
function RegisteredPointer_fromWireType(ptr) {
|
|
1347
|
-
// ptr is a raw pointer (or a raw smartpointer)
|
|
1348
|
-
|
|
1349
|
-
// rawPointer is a maybe-null raw pointer
|
|
1350
|
-
var rawPointer = this.getPointee(ptr);
|
|
1351
|
-
if (!rawPointer) {
|
|
1352
|
-
this.destructor(ptr);
|
|
1353
|
-
return null;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
var registeredInstance = getInheritedInstance(this.registeredClass, rawPointer);
|
|
1357
|
-
if (undefined !== registeredInstance) {
|
|
1358
|
-
// JS object has been neutered, time to repopulate it
|
|
1359
|
-
if (0 === registeredInstance.$$.count.value) {
|
|
1360
|
-
registeredInstance.$$.ptr = rawPointer;
|
|
1361
|
-
registeredInstance.$$.smartPtr = ptr;
|
|
1362
|
-
return registeredInstance['clone']();
|
|
1363
|
-
} else {
|
|
1364
|
-
// else, just increment reference count on existing object
|
|
1365
|
-
// it already has a reference to the smart pointer
|
|
1366
|
-
var rv = registeredInstance['clone']();
|
|
1367
|
-
this.destructor(ptr);
|
|
1368
|
-
return rv;
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
function makeDefaultHandle() {
|
|
1373
|
-
if (this.isSmartPointer) {
|
|
1374
|
-
return makeClassHandle(this.registeredClass.instancePrototype, {
|
|
1375
|
-
ptrType: this.pointeeType,
|
|
1376
|
-
ptr: rawPointer,
|
|
1377
|
-
smartPtrType: this,
|
|
1378
|
-
smartPtr: ptr,
|
|
1379
|
-
});
|
|
1380
|
-
} else {
|
|
1381
|
-
return makeClassHandle(this.registeredClass.instancePrototype, {
|
|
1382
|
-
ptrType: this,
|
|
1383
|
-
ptr,
|
|
1384
|
-
});
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
var actualType = this.registeredClass.getActualType(rawPointer);
|
|
1389
|
-
var registeredPointerRecord = registeredPointers[actualType];
|
|
1390
|
-
if (!registeredPointerRecord) {
|
|
1391
|
-
return makeDefaultHandle.call(this);
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
var toType;
|
|
1395
|
-
if (this.isConst) {
|
|
1396
|
-
toType = registeredPointerRecord.constPointerType;
|
|
1397
|
-
} else {
|
|
1398
|
-
toType = registeredPointerRecord.pointerType;
|
|
1399
|
-
}
|
|
1400
|
-
var dp = downcastPointer(
|
|
1401
|
-
rawPointer,
|
|
1402
|
-
this.registeredClass,
|
|
1403
|
-
toType.registeredClass);
|
|
1404
|
-
if (dp === null) {
|
|
1405
|
-
return makeDefaultHandle.call(this);
|
|
1406
|
-
}
|
|
1407
|
-
if (this.isSmartPointer) {
|
|
1408
|
-
return makeClassHandle(toType.registeredClass.instancePrototype, {
|
|
1409
|
-
ptrType: toType,
|
|
1410
|
-
ptr: dp,
|
|
1411
|
-
smartPtrType: this,
|
|
1412
|
-
smartPtr: ptr,
|
|
1413
|
-
});
|
|
1414
|
-
} else {
|
|
1415
|
-
return makeClassHandle(toType.registeredClass.instancePrototype, {
|
|
1416
|
-
ptrType: toType,
|
|
1417
|
-
ptr: dp,
|
|
1418
|
-
});
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
var init_RegisteredPointer = () => {
|
|
1422
|
-
Object.assign(RegisteredPointer.prototype, {
|
|
1423
|
-
getPointee(ptr) {
|
|
1424
|
-
if (this.rawGetPointee) {
|
|
1425
|
-
ptr = this.rawGetPointee(ptr);
|
|
1426
|
-
}
|
|
1427
|
-
return ptr;
|
|
1428
|
-
},
|
|
1429
|
-
destructor(ptr) {
|
|
1430
|
-
this.rawDestructor?.(ptr);
|
|
1431
|
-
},
|
|
1432
|
-
readValueFromPointer: readPointer,
|
|
1433
|
-
fromWireType: RegisteredPointer_fromWireType,
|
|
1434
|
-
});
|
|
1435
|
-
};
|
|
1436
|
-
/** @constructor
|
|
1437
|
-
@param {*=} pointeeType,
|
|
1438
|
-
@param {*=} sharingPolicy,
|
|
1439
|
-
@param {*=} rawGetPointee,
|
|
1440
|
-
@param {*=} rawConstructor,
|
|
1441
|
-
@param {*=} rawShare,
|
|
1442
|
-
@param {*=} rawDestructor,
|
|
1443
|
-
*/
|
|
1444
|
-
function RegisteredPointer(
|
|
1445
|
-
name,
|
|
1446
|
-
registeredClass,
|
|
1447
|
-
isReference,
|
|
1448
|
-
isConst,
|
|
1449
|
-
|
|
1450
|
-
// smart pointer properties
|
|
1451
|
-
isSmartPointer,
|
|
1452
|
-
pointeeType,
|
|
1453
|
-
sharingPolicy,
|
|
1454
|
-
rawGetPointee,
|
|
1455
|
-
rawConstructor,
|
|
1456
|
-
rawShare,
|
|
1457
|
-
rawDestructor
|
|
1458
|
-
) {
|
|
1459
|
-
this.name = name;
|
|
1460
|
-
this.registeredClass = registeredClass;
|
|
1461
|
-
this.isReference = isReference;
|
|
1462
|
-
this.isConst = isConst;
|
|
1463
|
-
|
|
1464
|
-
// smart pointer properties
|
|
1465
|
-
this.isSmartPointer = isSmartPointer;
|
|
1466
|
-
this.pointeeType = pointeeType;
|
|
1467
|
-
this.sharingPolicy = sharingPolicy;
|
|
1468
|
-
this.rawGetPointee = rawGetPointee;
|
|
1469
|
-
this.rawConstructor = rawConstructor;
|
|
1470
|
-
this.rawShare = rawShare;
|
|
1471
|
-
this.rawDestructor = rawDestructor;
|
|
1472
|
-
|
|
1473
|
-
if (!isSmartPointer && registeredClass.baseClass === undefined) {
|
|
1474
|
-
if (isConst) {
|
|
1475
|
-
this.toWireType = constNoSmartPtrRawPointerToWireType;
|
|
1476
|
-
this.destructorFunction = null;
|
|
1477
|
-
} else {
|
|
1478
|
-
this.toWireType = nonConstNoSmartPtrRawPointerToWireType;
|
|
1479
|
-
this.destructorFunction = null;
|
|
1480
|
-
}
|
|
1481
|
-
} else {
|
|
1482
|
-
this.toWireType = genericPointerToWireType;
|
|
1483
|
-
// Here we must leave this.destructorFunction undefined, since whether genericPointerToWireType returns
|
|
1484
|
-
// a pointer that needs to be freed up is runtime-dependent, and cannot be evaluated at registration time.
|
|
1485
|
-
// TODO: Create an alternative mechanism that allows removing the use of var destructors = []; array in
|
|
1486
|
-
// craftInvokerFunction altogether.
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
/** @param {number=} numArguments */
|
|
1491
|
-
var replacePublicSymbol = (name, value, numArguments) => {
|
|
1492
|
-
if (!Module.hasOwnProperty(name)) {
|
|
1493
|
-
throwInternalError('Replacing nonexistent public symbol');
|
|
1494
|
-
}
|
|
1495
|
-
// If there's an overload table for this symbol, replace the symbol in the overload table instead.
|
|
1496
|
-
if (undefined !== Module[name].overloadTable && undefined !== numArguments) {
|
|
1497
|
-
Module[name].overloadTable[numArguments] = value;
|
|
1498
|
-
} else {
|
|
1499
|
-
Module[name] = value;
|
|
1500
|
-
Module[name].argCount = numArguments;
|
|
1501
|
-
}
|
|
1502
|
-
};
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
var wasmTableMirror = [];
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
var getWasmTableEntry = (funcPtr) => {
|
|
1510
|
-
var func = wasmTableMirror[funcPtr];
|
|
1511
|
-
if (!func) {
|
|
1512
|
-
/** @suppress {checkTypes} */
|
|
1513
|
-
wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);
|
|
1514
|
-
}
|
|
1515
|
-
return func;
|
|
1516
|
-
};
|
|
1517
|
-
var embind__requireFunction = (signature, rawFunction, isAsync = false) => {
|
|
1518
|
-
|
|
1519
|
-
signature = AsciiToString(signature);
|
|
1520
|
-
|
|
1521
|
-
function makeDynCaller() {
|
|
1522
|
-
var rtn = getWasmTableEntry(rawFunction);
|
|
1523
|
-
return rtn;
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
var fp = makeDynCaller();
|
|
1527
|
-
if (typeof fp != 'function') {
|
|
1528
|
-
throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`);
|
|
1529
|
-
}
|
|
1530
|
-
return fp;
|
|
1531
|
-
};
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
class UnboundTypeError extends Error {}
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
var getTypeName = (type) => {
|
|
1540
|
-
var ptr = ___getTypeName(type);
|
|
1541
|
-
var rv = AsciiToString(ptr);
|
|
1542
|
-
_free(ptr);
|
|
1543
|
-
return rv;
|
|
1544
|
-
};
|
|
1545
|
-
var throwUnboundTypeError = (message, types) => {
|
|
1546
|
-
var unboundTypes = [];
|
|
1547
|
-
var seen = {};
|
|
1548
|
-
function visit(type) {
|
|
1549
|
-
if (seen[type]) {
|
|
1550
|
-
return;
|
|
1551
|
-
}
|
|
1552
|
-
if (registeredTypes[type]) {
|
|
1553
|
-
return;
|
|
1554
|
-
}
|
|
1555
|
-
if (typeDependencies[type]) {
|
|
1556
|
-
typeDependencies[type].forEach(visit);
|
|
1557
|
-
return;
|
|
1558
|
-
}
|
|
1559
|
-
unboundTypes.push(type);
|
|
1560
|
-
seen[type] = true;
|
|
1561
|
-
}
|
|
1562
|
-
types.forEach(visit);
|
|
1563
|
-
|
|
1564
|
-
throw new UnboundTypeError(`${message}: ` + unboundTypes.map(getTypeName).join([', ']));
|
|
1565
|
-
};
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
var whenDependentTypesAreResolved = (myTypes, dependentTypes, getTypeConverters) => {
|
|
1571
|
-
myTypes.forEach((type) => typeDependencies[type] = dependentTypes);
|
|
1572
|
-
|
|
1573
|
-
function onComplete(typeConverters) {
|
|
1574
|
-
var myTypeConverters = getTypeConverters(typeConverters);
|
|
1575
|
-
if (myTypeConverters.length !== myTypes.length) {
|
|
1576
|
-
throwInternalError('Mismatched type converter count');
|
|
1577
|
-
}
|
|
1578
|
-
for (var i = 0; i < myTypes.length; ++i) {
|
|
1579
|
-
registerType(myTypes[i], myTypeConverters[i]);
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
var typeConverters = new Array(dependentTypes.length);
|
|
1584
|
-
var unregisteredTypes = [];
|
|
1585
|
-
var registered = 0;
|
|
1586
|
-
for (let [i, dt] of dependentTypes.entries()) {
|
|
1587
|
-
if (registeredTypes.hasOwnProperty(dt)) {
|
|
1588
|
-
typeConverters[i] = registeredTypes[dt];
|
|
1589
|
-
} else {
|
|
1590
|
-
unregisteredTypes.push(dt);
|
|
1591
|
-
if (!awaitingDependencies.hasOwnProperty(dt)) {
|
|
1592
|
-
awaitingDependencies[dt] = [];
|
|
1593
|
-
}
|
|
1594
|
-
awaitingDependencies[dt].push(() => {
|
|
1595
|
-
typeConverters[i] = registeredTypes[dt];
|
|
1596
|
-
++registered;
|
|
1597
|
-
if (registered === unregisteredTypes.length) {
|
|
1598
|
-
onComplete(typeConverters);
|
|
1599
|
-
}
|
|
1600
|
-
});
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
if (0 === unregisteredTypes.length) {
|
|
1604
|
-
onComplete(typeConverters);
|
|
1605
|
-
}
|
|
1606
|
-
};
|
|
1607
|
-
var __embind_register_class = (rawType,
|
|
1608
|
-
rawPointerType,
|
|
1609
|
-
rawConstPointerType,
|
|
1610
|
-
baseClassRawType,
|
|
1611
|
-
getActualTypeSignature,
|
|
1612
|
-
getActualType,
|
|
1613
|
-
upcastSignature,
|
|
1614
|
-
upcast,
|
|
1615
|
-
downcastSignature,
|
|
1616
|
-
downcast,
|
|
1617
|
-
name,
|
|
1618
|
-
destructorSignature,
|
|
1619
|
-
rawDestructor) => {
|
|
1620
|
-
name = AsciiToString(name);
|
|
1621
|
-
getActualType = embind__requireFunction(getActualTypeSignature, getActualType);
|
|
1622
|
-
upcast &&= embind__requireFunction(upcastSignature, upcast);
|
|
1623
|
-
downcast &&= embind__requireFunction(downcastSignature, downcast);
|
|
1624
|
-
rawDestructor = embind__requireFunction(destructorSignature, rawDestructor);
|
|
1625
|
-
var legalFunctionName = makeLegalFunctionName(name);
|
|
1626
|
-
|
|
1627
|
-
exposePublicSymbol(legalFunctionName, function() {
|
|
1628
|
-
// this code cannot run if baseClassRawType is zero
|
|
1629
|
-
throwUnboundTypeError(`Cannot construct ${name} due to unbound types`, [baseClassRawType]);
|
|
1630
|
-
});
|
|
1631
|
-
|
|
1632
|
-
whenDependentTypesAreResolved(
|
|
1633
|
-
[rawType, rawPointerType, rawConstPointerType],
|
|
1634
|
-
baseClassRawType ? [baseClassRawType] : [],
|
|
1635
|
-
(base) => {
|
|
1636
|
-
base = base[0];
|
|
1637
|
-
|
|
1638
|
-
var baseClass;
|
|
1639
|
-
var basePrototype;
|
|
1640
|
-
if (baseClassRawType) {
|
|
1641
|
-
baseClass = base.registeredClass;
|
|
1642
|
-
basePrototype = baseClass.instancePrototype;
|
|
1643
|
-
} else {
|
|
1644
|
-
basePrototype = ClassHandle.prototype;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
var constructor = createNamedFunction(name, function(...args) {
|
|
1648
|
-
if (Object.getPrototypeOf(this) !== instancePrototype) {
|
|
1649
|
-
throw new BindingError(`Use 'new' to construct ${name}`);
|
|
1650
|
-
}
|
|
1651
|
-
if (undefined === registeredClass.constructor_body) {
|
|
1652
|
-
throw new BindingError(`${name} has no accessible constructor`);
|
|
1653
|
-
}
|
|
1654
|
-
var body = registeredClass.constructor_body[args.length];
|
|
1655
|
-
if (undefined === body) {
|
|
1656
|
-
throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${args.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`);
|
|
1657
|
-
}
|
|
1658
|
-
return body.apply(this, args);
|
|
1659
|
-
});
|
|
1660
|
-
|
|
1661
|
-
var instancePrototype = Object.create(basePrototype, {
|
|
1662
|
-
constructor: { value: constructor },
|
|
1663
|
-
});
|
|
1664
|
-
|
|
1665
|
-
constructor.prototype = instancePrototype;
|
|
1666
|
-
|
|
1667
|
-
var registeredClass = new RegisteredClass(name,
|
|
1668
|
-
constructor,
|
|
1669
|
-
instancePrototype,
|
|
1670
|
-
rawDestructor,
|
|
1671
|
-
baseClass,
|
|
1672
|
-
getActualType,
|
|
1673
|
-
upcast,
|
|
1674
|
-
downcast);
|
|
1675
|
-
|
|
1676
|
-
if (registeredClass.baseClass) {
|
|
1677
|
-
// Keep track of class hierarchy. Used to allow sub-classes to inherit class functions.
|
|
1678
|
-
registeredClass.baseClass.__derivedClasses ??= [];
|
|
1679
|
-
|
|
1680
|
-
registeredClass.baseClass.__derivedClasses.push(registeredClass);
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
var referenceConverter = new RegisteredPointer(name,
|
|
1684
|
-
registeredClass,
|
|
1685
|
-
true,
|
|
1686
|
-
false,
|
|
1687
|
-
false);
|
|
1688
|
-
|
|
1689
|
-
var pointerConverter = new RegisteredPointer(name + '*',
|
|
1690
|
-
registeredClass,
|
|
1691
|
-
false,
|
|
1692
|
-
false,
|
|
1693
|
-
false);
|
|
1694
|
-
|
|
1695
|
-
var constPointerConverter = new RegisteredPointer(name + ' const*',
|
|
1696
|
-
registeredClass,
|
|
1697
|
-
false,
|
|
1698
|
-
true,
|
|
1699
|
-
false);
|
|
1700
|
-
|
|
1701
|
-
registeredPointers[rawType] = {
|
|
1702
|
-
pointerType: pointerConverter,
|
|
1703
|
-
constPointerType: constPointerConverter
|
|
1704
|
-
};
|
|
1705
|
-
|
|
1706
|
-
replacePublicSymbol(legalFunctionName, constructor);
|
|
1707
|
-
|
|
1708
|
-
return [referenceConverter, pointerConverter, constPointerConverter];
|
|
1709
|
-
}
|
|
1710
|
-
);
|
|
1711
|
-
};
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
var emval_freelist = [];
|
|
1715
|
-
|
|
1716
|
-
var emval_handles = [0,1,,1,null,1,true,1,false,1];
|
|
1717
|
-
var __emval_decref = (handle) => {
|
|
1718
|
-
if (handle > 9 && 0 === --emval_handles[handle + 1]) {
|
|
1719
|
-
emval_handles[handle] = undefined;
|
|
1720
|
-
emval_freelist.push(handle);
|
|
1721
|
-
}
|
|
1722
|
-
};
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
var Emval = {
|
|
1727
|
-
toValue:(handle) => {
|
|
1728
|
-
if (!handle) {
|
|
1729
|
-
throwBindingError(`Cannot use deleted val. handle = ${handle}`);
|
|
1730
|
-
}
|
|
1731
|
-
return emval_handles[handle];
|
|
1732
|
-
},
|
|
1733
|
-
toHandle:(value) => {
|
|
1734
|
-
switch (value) {
|
|
1735
|
-
case undefined: return 2;
|
|
1736
|
-
case null: return 4;
|
|
1737
|
-
case true: return 6;
|
|
1738
|
-
case false: return 8;
|
|
1739
|
-
default:{
|
|
1740
|
-
const handle = emval_freelist.pop() || emval_handles.length;
|
|
1741
|
-
emval_handles[handle] = value;
|
|
1742
|
-
emval_handles[handle + 1] = 1;
|
|
1743
|
-
return handle;
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
},
|
|
1747
|
-
};
|
|
1748
|
-
|
|
1749
|
-
var EmValType = {
|
|
1750
|
-
name: 'emscripten::val',
|
|
1751
|
-
fromWireType: (handle) => {
|
|
1752
|
-
var rv = Emval.toValue(handle);
|
|
1753
|
-
__emval_decref(handle);
|
|
1754
|
-
return rv;
|
|
1755
|
-
},
|
|
1756
|
-
toWireType: (destructors, value) => Emval.toHandle(value),
|
|
1757
|
-
readValueFromPointer: readPointer,
|
|
1758
|
-
destructorFunction: null, // This type does not need a destructor
|
|
1759
|
-
|
|
1760
|
-
// TODO: do we need a deleteObject here? write a test where
|
|
1761
|
-
// emval is passed into JS via an interface
|
|
1762
|
-
};
|
|
1763
|
-
var __embind_register_emval = (rawType) => registerType(rawType, EmValType);
|
|
1764
|
-
|
|
1765
|
-
var floatReadValueFromPointer = (name, width) => {
|
|
1766
|
-
switch (width) {
|
|
1767
|
-
case 4: return function(pointer) {
|
|
1768
|
-
return this.fromWireType(HEAPF32[((pointer)>>2)]);
|
|
1769
|
-
};
|
|
1770
|
-
case 8: return function(pointer) {
|
|
1771
|
-
return this.fromWireType(HEAPF64[((pointer)>>3)]);
|
|
1772
|
-
};
|
|
1773
|
-
default:
|
|
1774
|
-
throw new TypeError(`invalid float width (${width}): ${name}`);
|
|
1775
|
-
}
|
|
1776
|
-
};
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
var __embind_register_float = (rawType, name, size) => {
|
|
1780
|
-
name = AsciiToString(name);
|
|
1781
|
-
registerType(rawType, {
|
|
1782
|
-
name,
|
|
1783
|
-
fromWireType: (value) => value,
|
|
1784
|
-
toWireType: (destructors, value) => {
|
|
1785
|
-
// The VM will perform JS to Wasm value conversion, according to the spec:
|
|
1786
|
-
// https://www.w3.org/TR/wasm-js-api-1/#towebassemblyvalue
|
|
1787
|
-
return value;
|
|
1788
|
-
},
|
|
1789
|
-
readValueFromPointer: floatReadValueFromPointer(name, size),
|
|
1790
|
-
destructorFunction: null, // This type does not need a destructor
|
|
1791
|
-
});
|
|
1792
|
-
};
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
var runDestructors = (destructors) => {
|
|
1796
|
-
while (destructors.length) {
|
|
1797
|
-
var ptr = destructors.pop();
|
|
1798
|
-
var del = destructors.pop();
|
|
1799
|
-
del(ptr);
|
|
1800
|
-
}
|
|
1801
|
-
};
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
function usesDestructorStack(argTypes) {
|
|
1805
|
-
// Skip return value at index 0 - it's not deleted here.
|
|
1806
|
-
for (var i = 1; i < argTypes.length; ++i) {
|
|
1807
|
-
// The type does not define a destructor function - must use dynamic stack
|
|
1808
|
-
if (argTypes[i] !== null && argTypes[i].destructorFunction === undefined) {
|
|
1809
|
-
return true;
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
return false;
|
|
1813
|
-
}
|
|
1814
|
-
function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cppTargetFunc, /** boolean= */ isAsync) {
|
|
1815
|
-
// humanName: a human-readable string name for the function to be generated.
|
|
1816
|
-
// argTypes: An array that contains the embind type objects for all types in the function signature.
|
|
1817
|
-
// argTypes[0] is the type object for the function return value.
|
|
1818
|
-
// argTypes[1] is the type object for function this object/class type, or null if not crafting an invoker for a class method.
|
|
1819
|
-
// argTypes[2...] are the actual function parameters.
|
|
1820
|
-
// classType: The embind type object for the class to be bound, or null if this is not a method of a class.
|
|
1821
|
-
// cppInvokerFunc: JS Function object to the C++-side function that interops into C++ code.
|
|
1822
|
-
// cppTargetFunc: Function pointer (an integer to FUNCTION_TABLE) to the target C++ function the cppInvokerFunc will end up calling.
|
|
1823
|
-
// isAsync: Optional. If true, returns an async function. Async bindings are only supported with JSPI.
|
|
1824
|
-
var argCount = argTypes.length;
|
|
1825
|
-
|
|
1826
|
-
if (argCount < 2) {
|
|
1827
|
-
throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
var isClassMethodFunc = (argTypes[1] !== null && classType !== null);
|
|
1831
|
-
|
|
1832
|
-
// Free functions with signature "void function()" do not need an invoker that marshalls between wire types.
|
|
1833
|
-
// TODO: This omits argument count check - enable only at -O3 or similar.
|
|
1834
|
-
// if (ENABLE_UNSAFE_OPTS && argCount == 2 && argTypes[0].name == "void" && !isClassMethodFunc) {
|
|
1835
|
-
// return FUNCTION_TABLE[fn];
|
|
1836
|
-
// }
|
|
1837
|
-
|
|
1838
|
-
// Determine if we need to use a dynamic stack to store the destructors for the function parameters.
|
|
1839
|
-
// TODO: Remove this completely once all function invokers are being dynamically generated.
|
|
1840
|
-
var needsDestructorStack = usesDestructorStack(argTypes);
|
|
1841
|
-
|
|
1842
|
-
var returns = !argTypes[0].isVoid;
|
|
1843
|
-
|
|
1844
|
-
var expectedArgCount = argCount - 2;
|
|
1845
|
-
var argsWired = new Array(expectedArgCount);
|
|
1846
|
-
var invokerFuncArgs = [];
|
|
1847
|
-
var destructors = [];
|
|
1848
|
-
var invokerFn = function(...args) {
|
|
1849
|
-
destructors.length = 0;
|
|
1850
|
-
var thisWired;
|
|
1851
|
-
invokerFuncArgs.length = isClassMethodFunc ? 2 : 1;
|
|
1852
|
-
invokerFuncArgs[0] = cppTargetFunc;
|
|
1853
|
-
if (isClassMethodFunc) {
|
|
1854
|
-
thisWired = argTypes[1].toWireType(destructors, this);
|
|
1855
|
-
invokerFuncArgs[1] = thisWired;
|
|
1856
|
-
}
|
|
1857
|
-
for (var i = 0; i < expectedArgCount; ++i) {
|
|
1858
|
-
argsWired[i] = argTypes[i + 2].toWireType(destructors, args[i]);
|
|
1859
|
-
invokerFuncArgs.push(argsWired[i]);
|
|
1860
|
-
}
|
|
1861
|
-
|
|
1862
|
-
var rv = cppInvokerFunc(...invokerFuncArgs);
|
|
1863
|
-
|
|
1864
|
-
function onDone(rv) {
|
|
1865
|
-
if (needsDestructorStack) {
|
|
1866
|
-
runDestructors(destructors);
|
|
1867
|
-
} else {
|
|
1868
|
-
for (var i = isClassMethodFunc ? 1 : 2; i < argTypes.length; i++) {
|
|
1869
|
-
var param = i === 1 ? thisWired : argsWired[i - 2];
|
|
1870
|
-
if (argTypes[i].destructorFunction !== null) {
|
|
1871
|
-
argTypes[i].destructorFunction(param);
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
if (returns) {
|
|
1877
|
-
return argTypes[0].fromWireType(rv);
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
return onDone(rv);
|
|
1882
|
-
};
|
|
1883
|
-
return createNamedFunction(humanName, invokerFn);
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
var heap32VectorToArray = (count, firstElement) => {
|
|
1888
|
-
var array = [];
|
|
1889
|
-
for (var i = 0; i < count; i++) {
|
|
1890
|
-
// TODO(https://github.com/emscripten-core/emscripten/issues/17310):
|
|
1891
|
-
// Find a way to hoist the `>> 2` or `>> 3` out of this loop.
|
|
1892
|
-
array.push(HEAPU32[(((firstElement)+(i * 4))>>2)]);
|
|
1893
|
-
}
|
|
1894
|
-
return array;
|
|
1895
|
-
};
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
var getFunctionName = (signature) => {
|
|
1903
|
-
signature = signature.trim();
|
|
1904
|
-
const argsIndex = signature.indexOf("(");
|
|
1905
|
-
if (argsIndex === -1) return signature;
|
|
1906
|
-
return signature.slice(0, argsIndex);
|
|
1907
|
-
};
|
|
1908
|
-
var __embind_register_function = (name, argCount, rawArgTypesAddr, signature, rawInvoker, fn, isAsync, isNonnullReturn) => {
|
|
1909
|
-
var argTypes = heap32VectorToArray(argCount, rawArgTypesAddr);
|
|
1910
|
-
name = AsciiToString(name);
|
|
1911
|
-
name = getFunctionName(name);
|
|
1912
|
-
|
|
1913
|
-
rawInvoker = embind__requireFunction(signature, rawInvoker, isAsync);
|
|
1914
|
-
|
|
1915
|
-
exposePublicSymbol(name, function() {
|
|
1916
|
-
throwUnboundTypeError(`Cannot call ${name} due to unbound types`, argTypes);
|
|
1917
|
-
}, argCount - 1);
|
|
1918
|
-
|
|
1919
|
-
whenDependentTypesAreResolved([], argTypes, (argTypes) => {
|
|
1920
|
-
var invokerArgsArray = [argTypes[0] /* return value */, null /* no class 'this'*/].concat(argTypes.slice(1) /* actual params */);
|
|
1921
|
-
replacePublicSymbol(name, craftInvokerFunction(name, invokerArgsArray, null /* no class 'this'*/, rawInvoker, fn, isAsync), argCount - 1);
|
|
1922
|
-
return [];
|
|
1923
|
-
});
|
|
1924
|
-
};
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
/** @suppress {globalThis} */
|
|
1929
|
-
var __embind_register_integer = (primitiveType, name, size, minRange, maxRange) => {
|
|
1930
|
-
name = AsciiToString(name);
|
|
1931
|
-
|
|
1932
|
-
const isUnsignedType = minRange === 0;
|
|
1933
|
-
|
|
1934
|
-
let fromWireType = (value) => value;
|
|
1935
|
-
if (isUnsignedType) {
|
|
1936
|
-
var bitshift = 32 - 8*size;
|
|
1937
|
-
fromWireType = (value) => (value << bitshift) >>> bitshift;
|
|
1938
|
-
maxRange = fromWireType(maxRange);
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
registerType(primitiveType, {
|
|
1942
|
-
name,
|
|
1943
|
-
fromWireType: fromWireType,
|
|
1944
|
-
toWireType: (destructors, value) => {
|
|
1945
|
-
// The VM will perform JS to Wasm value conversion, according to the spec:
|
|
1946
|
-
// https://www.w3.org/TR/wasm-js-api-1/#towebassemblyvalue
|
|
1947
|
-
return value;
|
|
1948
|
-
},
|
|
1949
|
-
readValueFromPointer: integerReadValueFromPointer(name, size, minRange !== 0),
|
|
1950
|
-
destructorFunction: null, // This type does not need a destructor
|
|
1951
|
-
});
|
|
1952
|
-
};
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
var __embind_register_memory_view = (rawType, dataTypeIndex, name) => {
|
|
1956
|
-
var typeMapping = [
|
|
1957
|
-
Int8Array,
|
|
1958
|
-
Uint8Array,
|
|
1959
|
-
Int16Array,
|
|
1960
|
-
Uint16Array,
|
|
1961
|
-
Int32Array,
|
|
1962
|
-
Uint32Array,
|
|
1963
|
-
Float32Array,
|
|
1964
|
-
Float64Array,
|
|
1965
|
-
BigInt64Array,
|
|
1966
|
-
BigUint64Array,
|
|
1967
|
-
];
|
|
1968
|
-
|
|
1969
|
-
var TA = typeMapping[dataTypeIndex];
|
|
1970
|
-
|
|
1971
|
-
function decodeMemoryView(handle) {
|
|
1972
|
-
var size = HEAPU32[((handle)>>2)];
|
|
1973
|
-
var data = HEAPU32[(((handle)+(4))>>2)];
|
|
1974
|
-
return new TA(HEAP8.buffer, data, size);
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
name = AsciiToString(name);
|
|
1978
|
-
registerType(rawType, {
|
|
1979
|
-
name,
|
|
1980
|
-
fromWireType: decodeMemoryView,
|
|
1981
|
-
readValueFromPointer: decodeMemoryView,
|
|
1982
|
-
}, {
|
|
1983
|
-
ignoreDuplicateRegistrations: true,
|
|
1984
|
-
});
|
|
1985
|
-
};
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
|
|
1992
|
-
// Parameter maxBytesToWrite is not optional. Negative values, 0, null,
|
|
1993
|
-
// undefined and false each don't write out any bytes.
|
|
1994
|
-
if (!(maxBytesToWrite > 0))
|
|
1995
|
-
return 0;
|
|
1996
|
-
|
|
1997
|
-
var startIdx = outIdx;
|
|
1998
|
-
var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
|
|
1999
|
-
for (var i = 0; i < str.length; ++i) {
|
|
2000
|
-
// For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description
|
|
2001
|
-
// and https://www.ietf.org/rfc/rfc2279.txt
|
|
2002
|
-
// and https://tools.ietf.org/html/rfc3629
|
|
2003
|
-
var u = str.codePointAt(i);
|
|
2004
|
-
if (u <= 0x7F) {
|
|
2005
|
-
if (outIdx >= endIdx) break;
|
|
2006
|
-
heap[outIdx++] = u;
|
|
2007
|
-
} else if (u <= 0x7FF) {
|
|
2008
|
-
if (outIdx + 1 >= endIdx) break;
|
|
2009
|
-
heap[outIdx++] = 0xC0 | (u >> 6);
|
|
2010
|
-
heap[outIdx++] = 0x80 | (u & 63);
|
|
2011
|
-
} else if (u <= 0xFFFF) {
|
|
2012
|
-
if (outIdx + 2 >= endIdx) break;
|
|
2013
|
-
heap[outIdx++] = 0xE0 | (u >> 12);
|
|
2014
|
-
heap[outIdx++] = 0x80 | ((u >> 6) & 63);
|
|
2015
|
-
heap[outIdx++] = 0x80 | (u & 63);
|
|
2016
|
-
} else {
|
|
2017
|
-
if (outIdx + 3 >= endIdx) break;
|
|
2018
|
-
heap[outIdx++] = 0xF0 | (u >> 18);
|
|
2019
|
-
heap[outIdx++] = 0x80 | ((u >> 12) & 63);
|
|
2020
|
-
heap[outIdx++] = 0x80 | ((u >> 6) & 63);
|
|
2021
|
-
heap[outIdx++] = 0x80 | (u & 63);
|
|
2022
|
-
// Gotcha: if codePoint is over 0xFFFF, it is represented as a surrogate pair in UTF-16.
|
|
2023
|
-
// We need to manually skip over the second code unit for correct iteration.
|
|
2024
|
-
i++;
|
|
2025
|
-
}
|
|
2026
|
-
}
|
|
2027
|
-
// Null-terminate the pointer to the buffer.
|
|
2028
|
-
heap[outIdx] = 0;
|
|
2029
|
-
return outIdx - startIdx;
|
|
2030
|
-
};
|
|
2031
|
-
var stringToUTF8 = (str, outPtr, maxBytesToWrite) => {
|
|
2032
|
-
return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
|
|
2033
|
-
};
|
|
2034
|
-
|
|
2035
|
-
var lengthBytesUTF8 = (str) => {
|
|
2036
|
-
var len = 0;
|
|
2037
|
-
for (var i = 0; i < str.length; ++i) {
|
|
2038
|
-
// Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
|
|
2039
|
-
// unit, not a Unicode code point of the character! So decode
|
|
2040
|
-
// UTF16->UTF32->UTF8.
|
|
2041
|
-
// See http://unicode.org/faq/utf_bom.html#utf16-3
|
|
2042
|
-
var c = str.charCodeAt(i); // possibly a lead surrogate
|
|
2043
|
-
if (c <= 0x7F) {
|
|
2044
|
-
len++;
|
|
2045
|
-
} else if (c <= 0x7FF) {
|
|
2046
|
-
len += 2;
|
|
2047
|
-
} else if (c >= 0xD800 && c <= 0xDFFF) {
|
|
2048
|
-
len += 4; ++i;
|
|
2049
|
-
} else {
|
|
2050
|
-
len += 3;
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
return len;
|
|
2054
|
-
};
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
var __embind_register_std_string = (rawType, name) => {
|
|
2059
|
-
name = AsciiToString(name);
|
|
2060
|
-
var stdStringIsUTF8 = true;
|
|
2061
|
-
|
|
2062
|
-
registerType(rawType, {
|
|
2063
|
-
name,
|
|
2064
|
-
// For some method names we use string keys here since they are part of
|
|
2065
|
-
// the public/external API and/or used by the runtime-generated code.
|
|
2066
|
-
fromWireType(value) {
|
|
2067
|
-
var length = HEAPU32[((value)>>2)];
|
|
2068
|
-
var payload = value + 4;
|
|
2069
|
-
|
|
2070
|
-
var str;
|
|
2071
|
-
if (stdStringIsUTF8) {
|
|
2072
|
-
str = UTF8ToString(payload, length, true);
|
|
2073
|
-
} else {
|
|
2074
|
-
str = '';
|
|
2075
|
-
for (var i = 0; i < length; ++i) {
|
|
2076
|
-
str += String.fromCharCode(HEAPU8[payload + i]);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
_free(value);
|
|
2081
|
-
|
|
2082
|
-
return str;
|
|
2083
|
-
},
|
|
2084
|
-
toWireType(destructors, value) {
|
|
2085
|
-
if (value instanceof ArrayBuffer) {
|
|
2086
|
-
value = new Uint8Array(value);
|
|
2087
|
-
}
|
|
2088
|
-
|
|
2089
|
-
var length;
|
|
2090
|
-
var valueIsOfTypeString = (typeof value == 'string');
|
|
2091
|
-
|
|
2092
|
-
// We accept `string` or array views with single byte elements
|
|
2093
|
-
if (!(valueIsOfTypeString || (ArrayBuffer.isView(value) && value.BYTES_PER_ELEMENT == 1))) {
|
|
2094
|
-
throwBindingError('Cannot pass non-string to std::string');
|
|
2095
|
-
}
|
|
2096
|
-
if (stdStringIsUTF8 && valueIsOfTypeString) {
|
|
2097
|
-
length = lengthBytesUTF8(value);
|
|
2098
|
-
} else {
|
|
2099
|
-
length = value.length;
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
// assumes POINTER_SIZE alignment
|
|
2103
|
-
var base = _malloc(4 + length + 1);
|
|
2104
|
-
var ptr = base + 4;
|
|
2105
|
-
HEAPU32[((base)>>2)] = length;
|
|
2106
|
-
if (valueIsOfTypeString) {
|
|
2107
|
-
if (stdStringIsUTF8) {
|
|
2108
|
-
stringToUTF8(value, ptr, length + 1);
|
|
2109
|
-
} else {
|
|
2110
|
-
for (var i = 0; i < length; ++i) {
|
|
2111
|
-
var charCode = value.charCodeAt(i);
|
|
2112
|
-
if (charCode > 255) {
|
|
2113
|
-
_free(base);
|
|
2114
|
-
throwBindingError('String has UTF-16 code units that do not fit in 8 bits');
|
|
2115
|
-
}
|
|
2116
|
-
HEAPU8[ptr + i] = charCode;
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
} else {
|
|
2120
|
-
HEAPU8.set(value, ptr);
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
if (destructors !== null) {
|
|
2124
|
-
destructors.push(_free, base);
|
|
2125
|
-
}
|
|
2126
|
-
return base;
|
|
2127
|
-
},
|
|
2128
|
-
readValueFromPointer: readPointer,
|
|
2129
|
-
destructorFunction(ptr) {
|
|
2130
|
-
_free(ptr);
|
|
2131
|
-
},
|
|
2132
|
-
});
|
|
2133
|
-
};
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
var UTF16Decoder = globalThis.TextDecoder ? new TextDecoder('utf-16le') : undefined;;
|
|
2139
|
-
|
|
2140
|
-
var UTF16ToString = (ptr, maxBytesToRead, ignoreNul) => {
|
|
2141
|
-
var idx = ((ptr)>>1);
|
|
2142
|
-
var endIdx = findStringEnd(HEAPU16, idx, maxBytesToRead / 2, ignoreNul);
|
|
2143
|
-
|
|
2144
|
-
// When using conditional TextDecoder, skip it for short strings as the overhead of the native call is not worth it.
|
|
2145
|
-
if (endIdx - idx > 16 && UTF16Decoder)
|
|
2146
|
-
return UTF16Decoder.decode(HEAPU16.subarray(idx, endIdx));
|
|
2147
|
-
|
|
2148
|
-
// Fallback: decode without UTF16Decoder
|
|
2149
|
-
var str = '';
|
|
2150
|
-
|
|
2151
|
-
// If maxBytesToRead is not passed explicitly, it will be undefined, and the
|
|
2152
|
-
// for-loop's condition will always evaluate to true. The loop is then
|
|
2153
|
-
// terminated on the first null char.
|
|
2154
|
-
for (var i = idx; i < endIdx; ++i) {
|
|
2155
|
-
var codeUnit = HEAPU16[i];
|
|
2156
|
-
// fromCharCode constructs a character from a UTF-16 code unit, so we can
|
|
2157
|
-
// pass the UTF16 string right through.
|
|
2158
|
-
str += String.fromCharCode(codeUnit);
|
|
2159
|
-
}
|
|
2160
|
-
|
|
2161
|
-
return str;
|
|
2162
|
-
};
|
|
2163
|
-
|
|
2164
|
-
var stringToUTF16 = (str, outPtr, maxBytesToWrite) => {
|
|
2165
|
-
// Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
|
|
2166
|
-
maxBytesToWrite ??= 0x7FFFFFFF;
|
|
2167
|
-
if (maxBytesToWrite < 2) return 0;
|
|
2168
|
-
maxBytesToWrite -= 2; // Null terminator.
|
|
2169
|
-
var startPtr = outPtr;
|
|
2170
|
-
var numCharsToWrite = (maxBytesToWrite < str.length*2) ? (maxBytesToWrite / 2) : str.length;
|
|
2171
|
-
for (var i = 0; i < numCharsToWrite; ++i) {
|
|
2172
|
-
// charCodeAt returns a UTF-16 encoded code unit, so it can be directly written to the HEAP.
|
|
2173
|
-
var codeUnit = str.charCodeAt(i); // possibly a lead surrogate
|
|
2174
|
-
HEAP16[((outPtr)>>1)] = codeUnit;
|
|
2175
|
-
outPtr += 2;
|
|
2176
|
-
}
|
|
2177
|
-
// Null-terminate the pointer to the HEAP.
|
|
2178
|
-
HEAP16[((outPtr)>>1)] = 0;
|
|
2179
|
-
return outPtr - startPtr;
|
|
2180
|
-
};
|
|
2181
|
-
|
|
2182
|
-
var lengthBytesUTF16 = (str) => str.length*2;
|
|
2183
|
-
|
|
2184
|
-
var UTF32ToString = (ptr, maxBytesToRead, ignoreNul) => {
|
|
2185
|
-
var str = '';
|
|
2186
|
-
var startIdx = ((ptr)>>2);
|
|
2187
|
-
// If maxBytesToRead is not passed explicitly, it will be undefined, and this
|
|
2188
|
-
// will always evaluate to true. This saves on code size.
|
|
2189
|
-
for (var i = 0; !(i >= maxBytesToRead / 4); i++) {
|
|
2190
|
-
var utf32 = HEAPU32[startIdx + i];
|
|
2191
|
-
if (!utf32 && !ignoreNul) break;
|
|
2192
|
-
str += String.fromCodePoint(utf32);
|
|
2193
|
-
}
|
|
2194
|
-
return str;
|
|
2195
|
-
};
|
|
2196
|
-
|
|
2197
|
-
var stringToUTF32 = (str, outPtr, maxBytesToWrite) => {
|
|
2198
|
-
// Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
|
|
2199
|
-
maxBytesToWrite ??= 0x7FFFFFFF;
|
|
2200
|
-
if (maxBytesToWrite < 4) return 0;
|
|
2201
|
-
var startPtr = outPtr;
|
|
2202
|
-
var endPtr = startPtr + maxBytesToWrite - 4;
|
|
2203
|
-
for (var i = 0; i < str.length; ++i) {
|
|
2204
|
-
var codePoint = str.codePointAt(i);
|
|
2205
|
-
// Gotcha: if codePoint is over 0xFFFF, it is represented as a surrogate pair in UTF-16.
|
|
2206
|
-
// We need to manually skip over the second code unit for correct iteration.
|
|
2207
|
-
if (codePoint > 0xFFFF) {
|
|
2208
|
-
i++;
|
|
2209
|
-
}
|
|
2210
|
-
HEAP32[((outPtr)>>2)] = codePoint;
|
|
2211
|
-
outPtr += 4;
|
|
2212
|
-
if (outPtr + 4 > endPtr) break;
|
|
2213
|
-
}
|
|
2214
|
-
// Null-terminate the pointer to the HEAP.
|
|
2215
|
-
HEAP32[((outPtr)>>2)] = 0;
|
|
2216
|
-
return outPtr - startPtr;
|
|
2217
|
-
};
|
|
2218
|
-
|
|
2219
|
-
var lengthBytesUTF32 = (str) => {
|
|
2220
|
-
var len = 0;
|
|
2221
|
-
for (var i = 0; i < str.length; ++i) {
|
|
2222
|
-
var codePoint = str.codePointAt(i);
|
|
2223
|
-
// Gotcha: if codePoint is over 0xFFFF, it is represented as a surrogate pair in UTF-16.
|
|
2224
|
-
// We need to manually skip over the second code unit for correct iteration.
|
|
2225
|
-
if (codePoint > 0xFFFF) {
|
|
2226
|
-
i++;
|
|
2227
|
-
}
|
|
2228
|
-
len += 4;
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
return len;
|
|
2232
|
-
};
|
|
2233
|
-
var __embind_register_std_wstring = (rawType, charSize, name) => {
|
|
2234
|
-
name = AsciiToString(name);
|
|
2235
|
-
var decodeString, encodeString, lengthBytesUTF;
|
|
2236
|
-
if (charSize === 2) {
|
|
2237
|
-
decodeString = UTF16ToString;
|
|
2238
|
-
encodeString = stringToUTF16;
|
|
2239
|
-
lengthBytesUTF = lengthBytesUTF16;
|
|
2240
|
-
} else {
|
|
2241
|
-
decodeString = UTF32ToString;
|
|
2242
|
-
encodeString = stringToUTF32;
|
|
2243
|
-
lengthBytesUTF = lengthBytesUTF32;
|
|
2244
|
-
}
|
|
2245
|
-
registerType(rawType, {
|
|
2246
|
-
name,
|
|
2247
|
-
fromWireType: (value) => {
|
|
2248
|
-
// Code mostly taken from _embind_register_std_string fromWireType
|
|
2249
|
-
var length = HEAPU32[((value)>>2)];
|
|
2250
|
-
var str = decodeString(value + 4, length * charSize, true);
|
|
2251
|
-
|
|
2252
|
-
_free(value);
|
|
2253
|
-
|
|
2254
|
-
return str;
|
|
2255
|
-
},
|
|
2256
|
-
toWireType: (destructors, value) => {
|
|
2257
|
-
if (!(typeof value == 'string')) {
|
|
2258
|
-
throwBindingError(`Cannot pass non-string to C++ string type ${name}`);
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
// assumes POINTER_SIZE alignment
|
|
2262
|
-
var length = lengthBytesUTF(value);
|
|
2263
|
-
var ptr = _malloc(4 + length + charSize);
|
|
2264
|
-
HEAPU32[((ptr)>>2)] = length / charSize;
|
|
2265
|
-
|
|
2266
|
-
encodeString(value, ptr + 4, length + charSize);
|
|
2267
|
-
|
|
2268
|
-
if (destructors !== null) {
|
|
2269
|
-
destructors.push(_free, ptr);
|
|
2270
|
-
}
|
|
2271
|
-
return ptr;
|
|
2272
|
-
},
|
|
2273
|
-
readValueFromPointer: readPointer,
|
|
2274
|
-
destructorFunction(ptr) {
|
|
2275
|
-
_free(ptr);
|
|
2276
|
-
}
|
|
2277
|
-
});
|
|
2278
|
-
};
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
var __embind_register_void = (rawType, name) => {
|
|
2282
|
-
name = AsciiToString(name);
|
|
2283
|
-
registerType(rawType, {
|
|
2284
|
-
isVoid: true, // void return values can be optimized out sometimes
|
|
2285
|
-
name,
|
|
2286
|
-
fromWireType: () => undefined,
|
|
2287
|
-
// TODO: assert if anything else is given?
|
|
2288
|
-
toWireType: (destructors, o) => undefined,
|
|
2289
|
-
});
|
|
2290
|
-
};
|
|
2291
|
-
|
|
2292
|
-
var __emscripten_throw_longjmp = () => {
|
|
2293
|
-
throw Infinity;
|
|
2294
|
-
};
|
|
2295
|
-
|
|
2296
|
-
var emval_methodCallers = [];
|
|
2297
|
-
var emval_addMethodCaller = (caller) => {
|
|
2298
|
-
var id = emval_methodCallers.length;
|
|
2299
|
-
emval_methodCallers.push(caller);
|
|
2300
|
-
return id;
|
|
2301
|
-
};
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
var requireRegisteredType = (rawType, humanName) => {
|
|
2306
|
-
var impl = registeredTypes[rawType];
|
|
2307
|
-
if (undefined === impl) {
|
|
2308
|
-
throwBindingError(`${humanName} has unknown type ${getTypeName(rawType)}`);
|
|
2309
|
-
}
|
|
2310
|
-
return impl;
|
|
2311
|
-
};
|
|
2312
|
-
var emval_lookupTypes = (argCount, argTypes) => {
|
|
2313
|
-
var a = new Array(argCount);
|
|
2314
|
-
for (var i = 0; i < argCount; ++i) {
|
|
2315
|
-
a[i] = requireRegisteredType(HEAPU32[(((argTypes)+(i*4))>>2)],
|
|
2316
|
-
`parameter ${i}`);
|
|
2317
|
-
}
|
|
2318
|
-
return a;
|
|
2319
|
-
};
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
var emval_returnValue = (toReturnWire, destructorsRef, handle) => {
|
|
2323
|
-
var destructors = [];
|
|
2324
|
-
var result = toReturnWire(destructors, handle);
|
|
2325
|
-
if (destructors.length) {
|
|
2326
|
-
// void, primitives and any other types w/o destructors don't need to allocate a handle
|
|
2327
|
-
HEAPU32[((destructorsRef)>>2)] = Emval.toHandle(destructors);
|
|
2328
|
-
}
|
|
2329
|
-
return result;
|
|
2330
|
-
};
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
var emval_symbols = {
|
|
2334
|
-
};
|
|
2335
|
-
|
|
2336
|
-
var getStringOrSymbol = (address) => {
|
|
2337
|
-
var symbol = emval_symbols[address];
|
|
2338
|
-
if (symbol === undefined) {
|
|
2339
|
-
return AsciiToString(address);
|
|
2340
|
-
}
|
|
2341
|
-
return symbol;
|
|
2342
|
-
};
|
|
2343
|
-
var __emval_create_invoker = (argCount, argTypesPtr, kind) => {
|
|
2344
|
-
var GenericWireTypeSize = 8;
|
|
2345
|
-
|
|
2346
|
-
var [retType, ...argTypes] = emval_lookupTypes(argCount, argTypesPtr);
|
|
2347
|
-
var toReturnWire = retType.toWireType.bind(retType);
|
|
2348
|
-
var argFromPtr = argTypes.map(type => type.readValueFromPointer.bind(type));
|
|
2349
|
-
argCount--; // remove the extracted return type
|
|
2350
|
-
|
|
2351
|
-
var argN = new Array(argCount);
|
|
2352
|
-
var invokerFunction = (handle, methodName, destructorsRef, args) => {
|
|
2353
|
-
var offset = 0;
|
|
2354
|
-
for (var i = 0; i < argCount; ++i) {
|
|
2355
|
-
argN[i] = argFromPtr[i](args + offset);
|
|
2356
|
-
offset += GenericWireTypeSize;
|
|
2357
|
-
}
|
|
2358
|
-
var rv;
|
|
2359
|
-
switch (kind) {
|
|
2360
|
-
case 0:
|
|
2361
|
-
rv = Emval.toValue(handle).apply(null, argN);
|
|
2362
|
-
break;
|
|
2363
|
-
case 2:
|
|
2364
|
-
rv = Reflect.construct(Emval.toValue(handle), argN);
|
|
2365
|
-
break;
|
|
2366
|
-
case 3:
|
|
2367
|
-
// no-op, just return the argument
|
|
2368
|
-
rv = argN[0];
|
|
2369
|
-
break;
|
|
2370
|
-
case 1:
|
|
2371
|
-
rv = Emval.toValue(handle)[getStringOrSymbol(methodName)](...argN);
|
|
2372
|
-
break;
|
|
2373
|
-
}
|
|
2374
|
-
return emval_returnValue(toReturnWire, destructorsRef, rv);
|
|
2375
|
-
};
|
|
2376
|
-
var functionName = `methodCaller<(${argTypes.map(t => t.name)}) => ${retType.name}>`;
|
|
2377
|
-
return emval_addMethodCaller(createNamedFunction(functionName, invokerFunction));
|
|
2378
|
-
};
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
var __emval_get_global = (name) => {
|
|
2383
|
-
if (!name) {
|
|
2384
|
-
return Emval.toHandle(globalThis);
|
|
2385
|
-
}
|
|
2386
|
-
name = getStringOrSymbol(name);
|
|
2387
|
-
return Emval.toHandle(globalThis[name]);
|
|
2388
|
-
};
|
|
2389
|
-
|
|
2390
|
-
var __emval_get_property = (handle, key) => {
|
|
2391
|
-
handle = Emval.toValue(handle);
|
|
2392
|
-
key = Emval.toValue(key);
|
|
2393
|
-
return Emval.toHandle(handle[key]);
|
|
2394
|
-
};
|
|
2395
|
-
|
|
2396
|
-
var __emval_incref = (handle) => {
|
|
2397
|
-
if (handle > 9) {
|
|
2398
|
-
emval_handles[handle + 1] += 1;
|
|
2399
|
-
}
|
|
2400
|
-
};
|
|
2401
|
-
|
|
2402
|
-
var __emval_instanceof = (object, constructor) => {
|
|
2403
|
-
object = Emval.toValue(object);
|
|
2404
|
-
constructor = Emval.toValue(constructor);
|
|
2405
|
-
return object instanceof constructor;
|
|
2406
|
-
};
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
var __emval_invoke = (caller, handle, methodName, destructorsRef, args) => {
|
|
2411
|
-
return emval_methodCallers[caller](handle, methodName, destructorsRef, args);
|
|
2412
|
-
};
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
var __emval_new_cstring = (v) => Emval.toHandle(getStringOrSymbol(v));
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
var __emval_run_destructors = (handle) => {
|
|
2420
|
-
var destructors = Emval.toValue(handle);
|
|
2421
|
-
runDestructors(destructors);
|
|
2422
|
-
__emval_decref(handle);
|
|
2423
|
-
};
|
|
2424
|
-
|
|
2425
|
-
var INT53_MAX = 9007199254740992;
|
|
2426
|
-
|
|
2427
|
-
var INT53_MIN = -9007199254740992;
|
|
2428
|
-
var bigintToI53Checked = (num) => (num < INT53_MIN || num > INT53_MAX) ? NaN : Number(num);
|
|
2429
|
-
function __gmtime_js(time, tmPtr) {
|
|
2430
|
-
time = bigintToI53Checked(time);
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
var date = new Date(time * 1000);
|
|
2434
|
-
HEAP32[((tmPtr)>>2)] = date.getUTCSeconds();
|
|
2435
|
-
HEAP32[(((tmPtr)+(4))>>2)] = date.getUTCMinutes();
|
|
2436
|
-
HEAP32[(((tmPtr)+(8))>>2)] = date.getUTCHours();
|
|
2437
|
-
HEAP32[(((tmPtr)+(12))>>2)] = date.getUTCDate();
|
|
2438
|
-
HEAP32[(((tmPtr)+(16))>>2)] = date.getUTCMonth();
|
|
2439
|
-
HEAP32[(((tmPtr)+(20))>>2)] = date.getUTCFullYear()-1900;
|
|
2440
|
-
HEAP32[(((tmPtr)+(24))>>2)] = date.getUTCDay();
|
|
2441
|
-
var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0);
|
|
2442
|
-
var yday = ((date.getTime() - start) / (1000 * 60 * 60 * 24))|0;
|
|
2443
|
-
HEAP32[(((tmPtr)+(28))>>2)] = yday;
|
|
2444
|
-
;
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
function __mmap_js(len, prot, flags, fd, offset, allocated, addr) {
|
|
2449
|
-
offset = bigintToI53Checked(offset);
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
return -52;
|
|
2453
|
-
;
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
function __munmap_js(addr, len, prot, flags, fd, offset) {
|
|
2457
|
-
offset = bigintToI53Checked(offset);
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
;
|
|
2461
|
-
}
|
|
2462
|
-
|
|
2463
|
-
var __tzset_js = (timezone, daylight, std_name, dst_name) => {
|
|
2464
|
-
// TODO: Use (malleable) environment variables instead of system settings.
|
|
2465
|
-
var currentYear = new Date().getFullYear();
|
|
2466
|
-
var winter = new Date(currentYear, 0, 1);
|
|
2467
|
-
var summer = new Date(currentYear, 6, 1);
|
|
2468
|
-
var winterOffset = winter.getTimezoneOffset();
|
|
2469
|
-
var summerOffset = summer.getTimezoneOffset();
|
|
2470
|
-
|
|
2471
|
-
// Local standard timezone offset. Local standard time is not adjusted for
|
|
2472
|
-
// daylight savings. This code uses the fact that getTimezoneOffset returns
|
|
2473
|
-
// a greater value during Standard Time versus Daylight Saving Time (DST).
|
|
2474
|
-
// Thus it determines the expected output during Standard Time, and it
|
|
2475
|
-
// compares whether the output of the given date the same (Standard) or less
|
|
2476
|
-
// (DST).
|
|
2477
|
-
var stdTimezoneOffset = Math.max(winterOffset, summerOffset);
|
|
2478
|
-
|
|
2479
|
-
// timezone is specified as seconds west of UTC ("The external variable
|
|
2480
|
-
// `timezone` shall be set to the difference, in seconds, between
|
|
2481
|
-
// Coordinated Universal Time (UTC) and local standard time."), the same
|
|
2482
|
-
// as returned by stdTimezoneOffset.
|
|
2483
|
-
// See http://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html
|
|
2484
|
-
HEAPU32[((timezone)>>2)] = stdTimezoneOffset * 60;
|
|
2485
|
-
|
|
2486
|
-
HEAP32[((daylight)>>2)] = Number(winterOffset != summerOffset);
|
|
2487
|
-
|
|
2488
|
-
var extractZone = (timezoneOffset) => {
|
|
2489
|
-
// Why inverse sign?
|
|
2490
|
-
// Read here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset
|
|
2491
|
-
var sign = timezoneOffset >= 0 ? "-" : "+";
|
|
2492
|
-
|
|
2493
|
-
var absOffset = Math.abs(timezoneOffset)
|
|
2494
|
-
var hours = String(Math.floor(absOffset / 60)).padStart(2, "0");
|
|
2495
|
-
var minutes = String(absOffset % 60).padStart(2, "0");
|
|
2496
|
-
|
|
2497
|
-
return `UTC${sign}${hours}${minutes}`;
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
|
-
var winterName = extractZone(winterOffset);
|
|
2501
|
-
var summerName = extractZone(summerOffset);
|
|
2502
|
-
if (summerOffset < winterOffset) {
|
|
2503
|
-
// Northern hemisphere
|
|
2504
|
-
stringToUTF8(winterName, std_name, 17);
|
|
2505
|
-
stringToUTF8(summerName, dst_name, 17);
|
|
2506
|
-
} else {
|
|
2507
|
-
stringToUTF8(winterName, dst_name, 17);
|
|
2508
|
-
stringToUTF8(summerName, std_name, 17);
|
|
2509
|
-
}
|
|
2510
|
-
};
|
|
2511
|
-
|
|
2512
|
-
var _emscripten_get_now = () => performance.now();
|
|
2513
|
-
|
|
2514
|
-
var _emscripten_date_now = () => Date.now();
|
|
2515
|
-
|
|
2516
|
-
var nowIsMonotonic = 1;
|
|
2517
|
-
|
|
2518
|
-
var checkWasiClock = (clock_id) => clock_id >= 0 && clock_id <= 3;
|
|
2519
|
-
|
|
2520
|
-
function _clock_time_get(clk_id, ignored_precision, ptime) {
|
|
2521
|
-
ignored_precision = bigintToI53Checked(ignored_precision);
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
if (!checkWasiClock(clk_id)) {
|
|
2525
|
-
return 28;
|
|
2526
|
-
}
|
|
2527
|
-
var now;
|
|
2528
|
-
// all wasi clocks but realtime are monotonic
|
|
2529
|
-
if (clk_id === 0) {
|
|
2530
|
-
now = _emscripten_date_now();
|
|
2531
|
-
} else if (nowIsMonotonic) {
|
|
2532
|
-
now = _emscripten_get_now();
|
|
2533
|
-
} else {
|
|
2534
|
-
return 52;
|
|
2535
|
-
}
|
|
2536
|
-
// "now" is in ms, and wasi times are in ns.
|
|
2537
|
-
var nsec = Math.round(now * 1000 * 1000);
|
|
2538
|
-
HEAP64[((ptime)>>3)] = BigInt(nsec);
|
|
2539
|
-
return 0;
|
|
2540
|
-
;
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
var getHeapMax = () =>
|
|
2545
|
-
// Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate
|
|
2546
|
-
// full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side
|
|
2547
|
-
// for any code that deals with heap sizes, which would require special
|
|
2548
|
-
// casing all heap size related code to treat 0 specially.
|
|
2549
|
-
2147483648;
|
|
2550
|
-
var _emscripten_get_heap_max = () => getHeapMax();
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
var alignMemory = (size, alignment) => {
|
|
2554
|
-
return Math.ceil(size / alignment) * alignment;
|
|
2555
|
-
};
|
|
2556
|
-
|
|
2557
|
-
var growMemory = (size) => {
|
|
2558
|
-
var oldHeapSize = wasmMemory.buffer.byteLength;
|
|
2559
|
-
var pages = ((size - oldHeapSize + 65535) / 65536) | 0;
|
|
2560
|
-
try {
|
|
2561
|
-
// round size grow request up to wasm page size (fixed 64KB per spec)
|
|
2562
|
-
wasmMemory.grow(pages); // .grow() takes a delta compared to the previous size
|
|
2563
|
-
updateMemoryViews();
|
|
2564
|
-
return 1 /*success*/;
|
|
2565
|
-
} catch(e) {
|
|
2566
|
-
}
|
|
2567
|
-
// implicit 0 return to save code size (caller will cast "undefined" into 0
|
|
2568
|
-
// anyhow)
|
|
2569
|
-
};
|
|
2570
|
-
var _emscripten_resize_heap = (requestedSize) => {
|
|
2571
|
-
var oldSize = HEAPU8.length;
|
|
2572
|
-
// With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
|
|
2573
|
-
requestedSize >>>= 0;
|
|
2574
|
-
// With multithreaded builds, races can happen (another thread might increase the size
|
|
2575
|
-
// in between), so return a failure, and let the caller retry.
|
|
2576
|
-
|
|
2577
|
-
// Memory resize rules:
|
|
2578
|
-
// 1. Always increase heap size to at least the requested size, rounded up
|
|
2579
|
-
// to next page multiple.
|
|
2580
|
-
// 2a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap
|
|
2581
|
-
// geometrically: increase the heap size according to
|
|
2582
|
-
// MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%), At most
|
|
2583
|
-
// overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB).
|
|
2584
|
-
// 2b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap
|
|
2585
|
-
// linearly: increase the heap size by at least
|
|
2586
|
-
// MEMORY_GROWTH_LINEAR_STEP bytes.
|
|
2587
|
-
// 3. Max size for the heap is capped at 2048MB-WASM_PAGE_SIZE, or by
|
|
2588
|
-
// MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest
|
|
2589
|
-
// 4. If we were unable to allocate as much memory, it may be due to
|
|
2590
|
-
// over-eager decision to excessively reserve due to (3) above.
|
|
2591
|
-
// Hence if an allocation fails, cut down on the amount of excess
|
|
2592
|
-
// growth, in an attempt to succeed to perform a smaller allocation.
|
|
2593
|
-
|
|
2594
|
-
// A limit is set for how much we can grow. We should not exceed that
|
|
2595
|
-
// (the wasm binary specifies it, so if we tried, we'd fail anyhow).
|
|
2596
|
-
var maxHeapSize = getHeapMax();
|
|
2597
|
-
if (requestedSize > maxHeapSize) {
|
|
2598
|
-
return false;
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
// Loop through potential heap size increases. If we attempt a too eager
|
|
2602
|
-
// reservation that fails, cut down on the attempted size and reserve a
|
|
2603
|
-
// smaller bump instead. (max 3 times, chosen somewhat arbitrarily)
|
|
2604
|
-
for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {
|
|
2605
|
-
var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth
|
|
2606
|
-
// but limit overreserving (default to capping at +96MB overgrowth at most)
|
|
2607
|
-
overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 );
|
|
2608
|
-
|
|
2609
|
-
var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536));
|
|
2610
|
-
|
|
2611
|
-
var replacement = growMemory(newSize);
|
|
2612
|
-
if (replacement) {
|
|
2613
|
-
|
|
2614
|
-
return true;
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
return false;
|
|
2618
|
-
};
|
|
2619
|
-
|
|
2620
|
-
var ENV = {
|
|
2621
|
-
};
|
|
2622
|
-
|
|
2623
|
-
var getExecutableName = () => thisProgram || './this.program';
|
|
2624
|
-
var getEnvStrings = () => {
|
|
2625
|
-
if (!getEnvStrings.strings) {
|
|
2626
|
-
// Default values.
|
|
2627
|
-
// Browser language detection #8751
|
|
2628
|
-
var lang = (globalThis.navigator?.language ?? 'C').replace('-', '_') + '.UTF-8';
|
|
2629
|
-
var env = {
|
|
2630
|
-
'USER': 'web_user',
|
|
2631
|
-
'LOGNAME': 'web_user',
|
|
2632
|
-
'PATH': '/',
|
|
2633
|
-
'PWD': '/',
|
|
2634
|
-
'HOME': '/home/web_user',
|
|
2635
|
-
'LANG': lang,
|
|
2636
|
-
'_': getExecutableName()
|
|
2637
|
-
};
|
|
2638
|
-
// Apply the user-provided values, if any.
|
|
2639
|
-
for (var x in ENV) {
|
|
2640
|
-
// x is a key in ENV; if ENV[x] is undefined, that means it was
|
|
2641
|
-
// explicitly set to be so. We allow user code to do that to
|
|
2642
|
-
// force variables with default values to remain unset.
|
|
2643
|
-
if (ENV[x] === undefined) delete env[x];
|
|
2644
|
-
else env[x] = ENV[x];
|
|
2645
|
-
}
|
|
2646
|
-
var strings = [];
|
|
2647
|
-
for (var x in env) {
|
|
2648
|
-
strings.push(`${x}=${env[x]}`);
|
|
2649
|
-
}
|
|
2650
|
-
getEnvStrings.strings = strings;
|
|
2651
|
-
}
|
|
2652
|
-
return getEnvStrings.strings;
|
|
2653
|
-
};
|
|
2654
|
-
|
|
2655
|
-
var _environ_get = (__environ, environ_buf) => {
|
|
2656
|
-
var bufSize = 0;
|
|
2657
|
-
var envp = 0;
|
|
2658
|
-
for (var string of getEnvStrings()) {
|
|
2659
|
-
var ptr = environ_buf + bufSize;
|
|
2660
|
-
HEAPU32[(((__environ)+(envp))>>2)] = ptr;
|
|
2661
|
-
bufSize += stringToUTF8(string, ptr, Infinity) + 1;
|
|
2662
|
-
envp += 4;
|
|
2663
|
-
}
|
|
2664
|
-
return 0;
|
|
2665
|
-
};
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
|
|
2669
|
-
var strings = getEnvStrings();
|
|
2670
|
-
HEAPU32[((penviron_count)>>2)] = strings.length;
|
|
2671
|
-
var bufSize = 0;
|
|
2672
|
-
for (var string of strings) {
|
|
2673
|
-
bufSize += lengthBytesUTF8(string) + 1;
|
|
2674
|
-
}
|
|
2675
|
-
HEAPU32[((penviron_buf_size)>>2)] = bufSize;
|
|
2676
|
-
return 0;
|
|
2677
|
-
};
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
var runtimeKeepaliveCounter = 0;
|
|
2681
|
-
var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0;
|
|
2682
|
-
var _proc_exit = (code) => {
|
|
2683
|
-
EXITSTATUS = code;
|
|
2684
|
-
if (!keepRuntimeAlive()) {
|
|
2685
|
-
Module['onExit']?.(code);
|
|
2686
|
-
ABORT = true;
|
|
2687
|
-
}
|
|
2688
|
-
quit_(code, new ExitStatus(code));
|
|
2689
|
-
};
|
|
2690
|
-
/** @param {boolean|number=} implicit */
|
|
2691
|
-
var exitJS = (status, implicit) => {
|
|
2692
|
-
EXITSTATUS = status;
|
|
2693
|
-
|
|
2694
|
-
_proc_exit(status);
|
|
2695
|
-
};
|
|
2696
|
-
var _exit = exitJS;
|
|
2697
|
-
|
|
2698
|
-
var _fd_close = (fd) => {
|
|
2699
|
-
return 52;
|
|
2700
|
-
};
|
|
2701
|
-
|
|
2702
|
-
function _fd_pread(fd, iov, iovcnt, offset, pnum) {
|
|
2703
|
-
offset = bigintToI53Checked(offset);
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
return 52;
|
|
2707
|
-
;
|
|
2708
|
-
}
|
|
2709
|
-
|
|
2710
|
-
var _fd_read = (fd, iov, iovcnt, pnum) => {
|
|
2711
|
-
return 52;
|
|
2712
|
-
};
|
|
2713
|
-
|
|
2714
|
-
function _fd_seek(fd, offset, whence, newOffset) {
|
|
2715
|
-
offset = bigintToI53Checked(offset);
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
return 70;
|
|
2719
|
-
;
|
|
2720
|
-
}
|
|
2721
|
-
|
|
2722
|
-
var printCharBuffers = [null,[],[]];
|
|
2723
|
-
|
|
2724
|
-
var printChar = (stream, curr) => {
|
|
2725
|
-
var buffer = printCharBuffers[stream];
|
|
2726
|
-
if (curr === 0 || curr === 10) {
|
|
2727
|
-
(stream === 1 ? out : err)(UTF8ArrayToString(buffer));
|
|
2728
|
-
buffer.length = 0;
|
|
2729
|
-
} else {
|
|
2730
|
-
buffer.push(curr);
|
|
2731
|
-
}
|
|
2732
|
-
};
|
|
2733
|
-
|
|
2734
|
-
var flush_NO_FILESYSTEM = () => {
|
|
2735
|
-
// flush anything remaining in the buffers during shutdown
|
|
2736
|
-
if (printCharBuffers[1].length) printChar(1, 10);
|
|
2737
|
-
if (printCharBuffers[2].length) printChar(2, 10);
|
|
2738
|
-
};
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
var _fd_write = (fd, iov, iovcnt, pnum) => {
|
|
2742
|
-
// hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0
|
|
2743
|
-
var num = 0;
|
|
2744
|
-
for (var i = 0; i < iovcnt; i++) {
|
|
2745
|
-
var ptr = HEAPU32[((iov)>>2)];
|
|
2746
|
-
var len = HEAPU32[(((iov)+(4))>>2)];
|
|
2747
|
-
iov += 8;
|
|
2748
|
-
for (var j = 0; j < len; j++) {
|
|
2749
|
-
printChar(fd, HEAPU8[ptr+j]);
|
|
2750
|
-
}
|
|
2751
|
-
num += len;
|
|
2752
|
-
}
|
|
2753
|
-
HEAPU32[((pnum)>>2)] = num;
|
|
2754
|
-
return 0;
|
|
2755
|
-
};
|
|
2756
|
-
|
|
2757
|
-
var _llvm_eh_typeid_for = (type) => type;
|
|
2758
|
-
|
|
2759
|
-
init_ClassHandle();
|
|
2760
|
-
init_RegisteredPointer();
|
|
2761
|
-
// End JS library code
|
|
2762
|
-
|
|
2763
|
-
// include: postlibrary.js
|
|
2764
|
-
// This file is included after the automatically-generated JS library code
|
|
2765
|
-
// but before the wasm module is created.
|
|
2766
|
-
|
|
2767
|
-
{
|
|
2768
|
-
|
|
2769
|
-
// Begin ATMODULES hooks
|
|
2770
|
-
if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];
|
|
2771
|
-
if (Module['print']) out = Module['print'];
|
|
2772
|
-
if (Module['printErr']) err = Module['printErr'];
|
|
2773
|
-
if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];
|
|
2774
|
-
// End ATMODULES hooks
|
|
2775
|
-
|
|
2776
|
-
if (Module['arguments']) arguments_ = Module['arguments'];
|
|
2777
|
-
if (Module['thisProgram']) thisProgram = Module['thisProgram'];
|
|
2778
|
-
|
|
2779
|
-
if (Module['preInit']) {
|
|
2780
|
-
if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
|
|
2781
|
-
while (Module['preInit'].length > 0) {
|
|
2782
|
-
Module['preInit'].shift()();
|
|
2783
|
-
}
|
|
2784
|
-
}
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2787
|
-
// Begin runtime exports
|
|
2788
|
-
// End runtime exports
|
|
2789
|
-
// Begin JS library exports
|
|
2790
|
-
// End JS library exports
|
|
2791
|
-
|
|
2792
|
-
// end include: postlibrary.js
|
|
2793
|
-
|
|
2794
|
-
function satoru_log_js(level,message) { if (Module.onLog) { Module.onLog(level, UTF8ToString(message)); } }
|
|
2795
|
-
|
|
2796
|
-
// Imports from the Wasm binary.
|
|
2797
|
-
var ___getTypeName,
|
|
2798
|
-
_create_instance,
|
|
2799
|
-
_destroy_instance,
|
|
2800
|
-
___cxa_free_exception,
|
|
2801
|
-
_malloc,
|
|
2802
|
-
_free,
|
|
2803
|
-
_setThrew,
|
|
2804
|
-
__emscripten_tempret_set,
|
|
2805
|
-
__emscripten_stack_restore,
|
|
2806
|
-
__emscripten_stack_alloc,
|
|
2807
|
-
_emscripten_stack_get_current,
|
|
2808
|
-
___cxa_decrement_exception_refcount,
|
|
2809
|
-
___cxa_increment_exception_refcount,
|
|
2810
|
-
___cxa_can_catch,
|
|
2811
|
-
___cxa_get_exception_ptr,
|
|
2812
|
-
memory,
|
|
2813
|
-
__indirect_function_table,
|
|
2814
|
-
wasmMemory,
|
|
2815
|
-
wasmTable;
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
function assignWasmExports(wasmExports) {
|
|
2819
|
-
___getTypeName = wasmExports['__getTypeName'];
|
|
2820
|
-
_create_instance = Module['_create_instance'] = wasmExports['create_instance'];
|
|
2821
|
-
_destroy_instance = Module['_destroy_instance'] = wasmExports['destroy_instance'];
|
|
2822
|
-
___cxa_free_exception = wasmExports['__cxa_free_exception'];
|
|
2823
|
-
_malloc = wasmExports['malloc'];
|
|
2824
|
-
_free = wasmExports['free'];
|
|
2825
|
-
_setThrew = wasmExports['setThrew'];
|
|
2826
|
-
__emscripten_tempret_set = wasmExports['_emscripten_tempret_set'];
|
|
2827
|
-
__emscripten_stack_restore = wasmExports['_emscripten_stack_restore'];
|
|
2828
|
-
__emscripten_stack_alloc = wasmExports['_emscripten_stack_alloc'];
|
|
2829
|
-
_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'];
|
|
2830
|
-
___cxa_decrement_exception_refcount = wasmExports['__cxa_decrement_exception_refcount'];
|
|
2831
|
-
___cxa_increment_exception_refcount = wasmExports['__cxa_increment_exception_refcount'];
|
|
2832
|
-
___cxa_can_catch = wasmExports['__cxa_can_catch'];
|
|
2833
|
-
___cxa_get_exception_ptr = wasmExports['__cxa_get_exception_ptr'];
|
|
2834
|
-
memory = wasmMemory = wasmExports['memory'];
|
|
2835
|
-
__indirect_function_table = wasmTable = wasmExports['__indirect_function_table'];
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
var wasmImports = {
|
|
2839
|
-
/** @export */
|
|
2840
|
-
__cxa_begin_catch: ___cxa_begin_catch,
|
|
2841
|
-
/** @export */
|
|
2842
|
-
__cxa_end_catch: ___cxa_end_catch,
|
|
2843
|
-
/** @export */
|
|
2844
|
-
__cxa_find_matching_catch_2: ___cxa_find_matching_catch_2,
|
|
2845
|
-
/** @export */
|
|
2846
|
-
__cxa_find_matching_catch_3: ___cxa_find_matching_catch_3,
|
|
2847
|
-
/** @export */
|
|
2848
|
-
__cxa_rethrow: ___cxa_rethrow,
|
|
2849
|
-
/** @export */
|
|
2850
|
-
__cxa_throw: ___cxa_throw,
|
|
2851
|
-
/** @export */
|
|
2852
|
-
__cxa_uncaught_exceptions: ___cxa_uncaught_exceptions,
|
|
2853
|
-
/** @export */
|
|
2854
|
-
__resumeException: ___resumeException,
|
|
2855
|
-
/** @export */
|
|
2856
|
-
__syscall_fcntl64: ___syscall_fcntl64,
|
|
2857
|
-
/** @export */
|
|
2858
|
-
__syscall_fstat64: ___syscall_fstat64,
|
|
2859
|
-
/** @export */
|
|
2860
|
-
__syscall_ioctl: ___syscall_ioctl,
|
|
2861
|
-
/** @export */
|
|
2862
|
-
__syscall_lstat64: ___syscall_lstat64,
|
|
2863
|
-
/** @export */
|
|
2864
|
-
__syscall_newfstatat: ___syscall_newfstatat,
|
|
2865
|
-
/** @export */
|
|
2866
|
-
__syscall_openat: ___syscall_openat,
|
|
2867
|
-
/** @export */
|
|
2868
|
-
__syscall_stat64: ___syscall_stat64,
|
|
2869
|
-
/** @export */
|
|
2870
|
-
_abort_js: __abort_js,
|
|
2871
|
-
/** @export */
|
|
2872
|
-
_embind_register_bigint: __embind_register_bigint,
|
|
2873
|
-
/** @export */
|
|
2874
|
-
_embind_register_bool: __embind_register_bool,
|
|
2875
|
-
/** @export */
|
|
2876
|
-
_embind_register_class: __embind_register_class,
|
|
2877
|
-
/** @export */
|
|
2878
|
-
_embind_register_emval: __embind_register_emval,
|
|
2879
|
-
/** @export */
|
|
2880
|
-
_embind_register_float: __embind_register_float,
|
|
2881
|
-
/** @export */
|
|
2882
|
-
_embind_register_function: __embind_register_function,
|
|
2883
|
-
/** @export */
|
|
2884
|
-
_embind_register_integer: __embind_register_integer,
|
|
2885
|
-
/** @export */
|
|
2886
|
-
_embind_register_memory_view: __embind_register_memory_view,
|
|
2887
|
-
/** @export */
|
|
2888
|
-
_embind_register_std_string: __embind_register_std_string,
|
|
2889
|
-
/** @export */
|
|
2890
|
-
_embind_register_std_wstring: __embind_register_std_wstring,
|
|
2891
|
-
/** @export */
|
|
2892
|
-
_embind_register_void: __embind_register_void,
|
|
2893
|
-
/** @export */
|
|
2894
|
-
_emscripten_throw_longjmp: __emscripten_throw_longjmp,
|
|
2895
|
-
/** @export */
|
|
2896
|
-
_emval_create_invoker: __emval_create_invoker,
|
|
2897
|
-
/** @export */
|
|
2898
|
-
_emval_decref: __emval_decref,
|
|
2899
|
-
/** @export */
|
|
2900
|
-
_emval_get_global: __emval_get_global,
|
|
2901
|
-
/** @export */
|
|
2902
|
-
_emval_get_property: __emval_get_property,
|
|
2903
|
-
/** @export */
|
|
2904
|
-
_emval_incref: __emval_incref,
|
|
2905
|
-
/** @export */
|
|
2906
|
-
_emval_instanceof: __emval_instanceof,
|
|
2907
|
-
/** @export */
|
|
2908
|
-
_emval_invoke: __emval_invoke,
|
|
2909
|
-
/** @export */
|
|
2910
|
-
_emval_new_cstring: __emval_new_cstring,
|
|
2911
|
-
/** @export */
|
|
2912
|
-
_emval_run_destructors: __emval_run_destructors,
|
|
2913
|
-
/** @export */
|
|
2914
|
-
_gmtime_js: __gmtime_js,
|
|
2915
|
-
/** @export */
|
|
2916
|
-
_mmap_js: __mmap_js,
|
|
2917
|
-
/** @export */
|
|
2918
|
-
_munmap_js: __munmap_js,
|
|
2919
|
-
/** @export */
|
|
2920
|
-
_tzset_js: __tzset_js,
|
|
2921
|
-
/** @export */
|
|
2922
|
-
clock_time_get: _clock_time_get,
|
|
2923
|
-
/** @export */
|
|
2924
|
-
emscripten_date_now: _emscripten_date_now,
|
|
2925
|
-
/** @export */
|
|
2926
|
-
emscripten_get_heap_max: _emscripten_get_heap_max,
|
|
2927
|
-
/** @export */
|
|
2928
|
-
emscripten_resize_heap: _emscripten_resize_heap,
|
|
2929
|
-
/** @export */
|
|
2930
|
-
environ_get: _environ_get,
|
|
2931
|
-
/** @export */
|
|
2932
|
-
environ_sizes_get: _environ_sizes_get,
|
|
2933
|
-
/** @export */
|
|
2934
|
-
exit: _exit,
|
|
2935
|
-
/** @export */
|
|
2936
|
-
fd_close: _fd_close,
|
|
2937
|
-
/** @export */
|
|
2938
|
-
fd_pread: _fd_pread,
|
|
2939
|
-
/** @export */
|
|
2940
|
-
fd_read: _fd_read,
|
|
2941
|
-
/** @export */
|
|
2942
|
-
fd_seek: _fd_seek,
|
|
2943
|
-
/** @export */
|
|
2944
|
-
fd_write: _fd_write,
|
|
2945
|
-
/** @export */
|
|
2946
|
-
invoke_diii,
|
|
2947
|
-
/** @export */
|
|
2948
|
-
invoke_diiiii,
|
|
2949
|
-
/** @export */
|
|
2950
|
-
invoke_diiiiiiiiiiiiiii,
|
|
2951
|
-
/** @export */
|
|
2952
|
-
invoke_fi,
|
|
2953
|
-
/** @export */
|
|
2954
|
-
invoke_fif,
|
|
2955
|
-
/** @export */
|
|
2956
|
-
invoke_fifff,
|
|
2957
|
-
/** @export */
|
|
2958
|
-
invoke_fifi,
|
|
2959
|
-
/** @export */
|
|
2960
|
-
invoke_fii,
|
|
2961
|
-
/** @export */
|
|
2962
|
-
invoke_fiifi,
|
|
2963
|
-
/** @export */
|
|
2964
|
-
invoke_fiifii,
|
|
2965
|
-
/** @export */
|
|
2966
|
-
invoke_fiii,
|
|
2967
|
-
/** @export */
|
|
2968
|
-
invoke_fiiif,
|
|
2969
|
-
/** @export */
|
|
2970
|
-
invoke_fiiiii,
|
|
2971
|
-
/** @export */
|
|
2972
|
-
invoke_i,
|
|
2973
|
-
/** @export */
|
|
2974
|
-
invoke_idd,
|
|
2975
|
-
/** @export */
|
|
2976
|
-
invoke_if,
|
|
2977
|
-
/** @export */
|
|
2978
|
-
invoke_iffff,
|
|
2979
|
-
/** @export */
|
|
2980
|
-
invoke_iffffffffi,
|
|
2981
|
-
/** @export */
|
|
2982
|
-
invoke_ii,
|
|
2983
|
-
/** @export */
|
|
2984
|
-
invoke_iid,
|
|
2985
|
-
/** @export */
|
|
2986
|
-
invoke_iiddi,
|
|
2987
|
-
/** @export */
|
|
2988
|
-
invoke_iidi,
|
|
2989
|
-
/** @export */
|
|
2990
|
-
invoke_iif,
|
|
2991
|
-
/** @export */
|
|
2992
|
-
invoke_iiff,
|
|
2993
|
-
/** @export */
|
|
2994
|
-
invoke_iiffff,
|
|
2995
|
-
/** @export */
|
|
2996
|
-
invoke_iifffi,
|
|
2997
|
-
/** @export */
|
|
2998
|
-
invoke_iiffi,
|
|
2999
|
-
/** @export */
|
|
3000
|
-
invoke_iiffii,
|
|
3001
|
-
/** @export */
|
|
3002
|
-
invoke_iifi,
|
|
3003
|
-
/** @export */
|
|
3004
|
-
invoke_iifii,
|
|
3005
|
-
/** @export */
|
|
3006
|
-
invoke_iifiiiiii,
|
|
3007
|
-
/** @export */
|
|
3008
|
-
invoke_iii,
|
|
3009
|
-
/** @export */
|
|
3010
|
-
invoke_iiif,
|
|
3011
|
-
/** @export */
|
|
3012
|
-
invoke_iiiff,
|
|
3013
|
-
/** @export */
|
|
3014
|
-
invoke_iiifff,
|
|
3015
|
-
/** @export */
|
|
3016
|
-
invoke_iiiffi,
|
|
3017
|
-
/** @export */
|
|
3018
|
-
invoke_iiifi,
|
|
3019
|
-
/** @export */
|
|
3020
|
-
invoke_iiifii,
|
|
3021
|
-
/** @export */
|
|
3022
|
-
invoke_iiifiii,
|
|
3023
|
-
/** @export */
|
|
3024
|
-
invoke_iiii,
|
|
3025
|
-
/** @export */
|
|
3026
|
-
invoke_iiiiddddi,
|
|
3027
|
-
/** @export */
|
|
3028
|
-
invoke_iiiif,
|
|
3029
|
-
/** @export */
|
|
3030
|
-
invoke_iiiifii,
|
|
3031
|
-
/** @export */
|
|
3032
|
-
invoke_iiiii,
|
|
3033
|
-
/** @export */
|
|
3034
|
-
invoke_iiiiid,
|
|
3035
|
-
/** @export */
|
|
3036
|
-
invoke_iiiiii,
|
|
3037
|
-
/** @export */
|
|
3038
|
-
invoke_iiiiiif,
|
|
3039
|
-
/** @export */
|
|
3040
|
-
invoke_iiiiiii,
|
|
3041
|
-
/** @export */
|
|
3042
|
-
invoke_iiiiiiii,
|
|
3043
|
-
/** @export */
|
|
3044
|
-
invoke_iiiiiiiii,
|
|
3045
|
-
/** @export */
|
|
3046
|
-
invoke_iiiiiiiiii,
|
|
3047
|
-
/** @export */
|
|
3048
|
-
invoke_iiiiiiiiiii,
|
|
3049
|
-
/** @export */
|
|
3050
|
-
invoke_iiiiiiiiiiii,
|
|
3051
|
-
/** @export */
|
|
3052
|
-
invoke_iiiiiiiiiiiii,
|
|
3053
|
-
/** @export */
|
|
3054
|
-
invoke_iiiiij,
|
|
3055
|
-
/** @export */
|
|
3056
|
-
invoke_iiji,
|
|
3057
|
-
/** @export */
|
|
3058
|
-
invoke_j,
|
|
3059
|
-
/** @export */
|
|
3060
|
-
invoke_jiiii,
|
|
3061
|
-
/** @export */
|
|
3062
|
-
invoke_v,
|
|
3063
|
-
/** @export */
|
|
3064
|
-
invoke_vffffffi,
|
|
3065
|
-
/** @export */
|
|
3066
|
-
invoke_vfffffiii,
|
|
3067
|
-
/** @export */
|
|
3068
|
-
invoke_vffi,
|
|
3069
|
-
/** @export */
|
|
3070
|
-
invoke_vfi,
|
|
3071
|
-
/** @export */
|
|
3072
|
-
invoke_vfii,
|
|
3073
|
-
/** @export */
|
|
3074
|
-
invoke_vfiiiii,
|
|
3075
|
-
/** @export */
|
|
3076
|
-
invoke_vi,
|
|
3077
|
-
/** @export */
|
|
3078
|
-
invoke_vif,
|
|
3079
|
-
/** @export */
|
|
3080
|
-
invoke_viff,
|
|
3081
|
-
/** @export */
|
|
3082
|
-
invoke_vifff,
|
|
3083
|
-
/** @export */
|
|
3084
|
-
invoke_viffff,
|
|
3085
|
-
/** @export */
|
|
3086
|
-
invoke_vifffffffff,
|
|
3087
|
-
/** @export */
|
|
3088
|
-
invoke_viffffi,
|
|
3089
|
-
/** @export */
|
|
3090
|
-
invoke_viffffiiif,
|
|
3091
|
-
/** @export */
|
|
3092
|
-
invoke_viffffiiii,
|
|
3093
|
-
/** @export */
|
|
3094
|
-
invoke_vifffi,
|
|
3095
|
-
/** @export */
|
|
3096
|
-
invoke_viffifi,
|
|
3097
|
-
/** @export */
|
|
3098
|
-
invoke_viffii,
|
|
3099
|
-
/** @export */
|
|
3100
|
-
invoke_viffiii,
|
|
3101
|
-
/** @export */
|
|
3102
|
-
invoke_vifi,
|
|
3103
|
-
/** @export */
|
|
3104
|
-
invoke_vifiii,
|
|
3105
|
-
/** @export */
|
|
3106
|
-
invoke_vii,
|
|
3107
|
-
/** @export */
|
|
3108
|
-
invoke_viid,
|
|
3109
|
-
/** @export */
|
|
3110
|
-
invoke_viidd,
|
|
3111
|
-
/** @export */
|
|
3112
|
-
invoke_viidii,
|
|
3113
|
-
/** @export */
|
|
3114
|
-
invoke_viif,
|
|
3115
|
-
/** @export */
|
|
3116
|
-
invoke_viiff,
|
|
3117
|
-
/** @export */
|
|
3118
|
-
invoke_viiffffi,
|
|
3119
|
-
/** @export */
|
|
3120
|
-
invoke_viiffffiii,
|
|
3121
|
-
/** @export */
|
|
3122
|
-
invoke_viiffi,
|
|
3123
|
-
/** @export */
|
|
3124
|
-
invoke_viiffii,
|
|
3125
|
-
/** @export */
|
|
3126
|
-
invoke_viiffiii,
|
|
3127
|
-
/** @export */
|
|
3128
|
-
invoke_viiffiiii,
|
|
3129
|
-
/** @export */
|
|
3130
|
-
invoke_viifi,
|
|
3131
|
-
/** @export */
|
|
3132
|
-
invoke_viifif,
|
|
3133
|
-
/** @export */
|
|
3134
|
-
invoke_viififii,
|
|
3135
|
-
/** @export */
|
|
3136
|
-
invoke_viifii,
|
|
3137
|
-
/** @export */
|
|
3138
|
-
invoke_viifiiiiii,
|
|
3139
|
-
/** @export */
|
|
3140
|
-
invoke_viii,
|
|
3141
|
-
/** @export */
|
|
3142
|
-
invoke_viiid,
|
|
3143
|
-
/** @export */
|
|
3144
|
-
invoke_viiif,
|
|
3145
|
-
/** @export */
|
|
3146
|
-
invoke_viiifffi,
|
|
3147
|
-
/** @export */
|
|
3148
|
-
invoke_viiifffii,
|
|
3149
|
-
/** @export */
|
|
3150
|
-
invoke_viiiffi,
|
|
3151
|
-
/** @export */
|
|
3152
|
-
invoke_viiiffifffii,
|
|
3153
|
-
/** @export */
|
|
3154
|
-
invoke_viiiffiffii,
|
|
3155
|
-
/** @export */
|
|
3156
|
-
invoke_viiiffii,
|
|
3157
|
-
/** @export */
|
|
3158
|
-
invoke_viiifiii,
|
|
3159
|
-
/** @export */
|
|
3160
|
-
invoke_viiii,
|
|
3161
|
-
/** @export */
|
|
3162
|
-
invoke_viiiidi,
|
|
3163
|
-
/** @export */
|
|
3164
|
-
invoke_viiiif,
|
|
3165
|
-
/** @export */
|
|
3166
|
-
invoke_viiiiffii,
|
|
3167
|
-
/** @export */
|
|
3168
|
-
invoke_viiiii,
|
|
3169
|
-
/** @export */
|
|
3170
|
-
invoke_viiiiidi,
|
|
3171
|
-
/** @export */
|
|
3172
|
-
invoke_viiiiif,
|
|
3173
|
-
/** @export */
|
|
3174
|
-
invoke_viiiiifii,
|
|
3175
|
-
/** @export */
|
|
3176
|
-
invoke_viiiiii,
|
|
3177
|
-
/** @export */
|
|
3178
|
-
invoke_viiiiiii,
|
|
3179
|
-
/** @export */
|
|
3180
|
-
invoke_viiiiiiifi,
|
|
3181
|
-
/** @export */
|
|
3182
|
-
invoke_viiiiiiifii,
|
|
3183
|
-
/** @export */
|
|
3184
|
-
invoke_viiiiiiii,
|
|
3185
|
-
/** @export */
|
|
3186
|
-
invoke_viiiiiiiii,
|
|
3187
|
-
/** @export */
|
|
3188
|
-
invoke_viiiiiiiiifi,
|
|
3189
|
-
/** @export */
|
|
3190
|
-
invoke_viiiiiiiiii,
|
|
3191
|
-
/** @export */
|
|
3192
|
-
invoke_viiiiiiiiiifi,
|
|
3193
|
-
/** @export */
|
|
3194
|
-
invoke_viiiiiiiiiifiiiiii,
|
|
3195
|
-
/** @export */
|
|
3196
|
-
invoke_viiiiiiiiiii,
|
|
3197
|
-
/** @export */
|
|
3198
|
-
invoke_viiiiiiiiiiiiiii,
|
|
3199
|
-
/** @export */
|
|
3200
|
-
invoke_viiji,
|
|
3201
|
-
/** @export */
|
|
3202
|
-
invoke_vij,
|
|
3203
|
-
/** @export */
|
|
3204
|
-
invoke_viji,
|
|
3205
|
-
/** @export */
|
|
3206
|
-
invoke_vj,
|
|
3207
|
-
/** @export */
|
|
3208
|
-
llvm_eh_typeid_for: _llvm_eh_typeid_for,
|
|
3209
|
-
/** @export */
|
|
3210
|
-
satoru_log_js
|
|
3211
|
-
};
|
|
3212
|
-
|
|
3213
|
-
function invoke_viiii(index,a1,a2,a3,a4) {
|
|
3214
|
-
var sp = stackSave();
|
|
3215
|
-
try {
|
|
3216
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3217
|
-
} catch(e) {
|
|
3218
|
-
stackRestore(sp);
|
|
3219
|
-
if (e !== e+0) throw e;
|
|
3220
|
-
_setThrew(1, 0);
|
|
3221
|
-
}
|
|
3222
|
-
}
|
|
3223
|
-
|
|
3224
|
-
function invoke_iii(index,a1,a2) {
|
|
3225
|
-
var sp = stackSave();
|
|
3226
|
-
try {
|
|
3227
|
-
return getWasmTableEntry(index)(a1,a2);
|
|
3228
|
-
} catch(e) {
|
|
3229
|
-
stackRestore(sp);
|
|
3230
|
-
if (e !== e+0) throw e;
|
|
3231
|
-
_setThrew(1, 0);
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
|
|
3235
|
-
function invoke_vii(index,a1,a2) {
|
|
3236
|
-
var sp = stackSave();
|
|
3237
|
-
try {
|
|
3238
|
-
getWasmTableEntry(index)(a1,a2);
|
|
3239
|
-
} catch(e) {
|
|
3240
|
-
stackRestore(sp);
|
|
3241
|
-
if (e !== e+0) throw e;
|
|
3242
|
-
_setThrew(1, 0);
|
|
3243
|
-
}
|
|
3244
|
-
}
|
|
3245
|
-
|
|
3246
|
-
function invoke_ii(index,a1) {
|
|
3247
|
-
var sp = stackSave();
|
|
3248
|
-
try {
|
|
3249
|
-
return getWasmTableEntry(index)(a1);
|
|
3250
|
-
} catch(e) {
|
|
3251
|
-
stackRestore(sp);
|
|
3252
|
-
if (e !== e+0) throw e;
|
|
3253
|
-
_setThrew(1, 0);
|
|
3254
|
-
}
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
function invoke_vi(index,a1) {
|
|
3258
|
-
var sp = stackSave();
|
|
3259
|
-
try {
|
|
3260
|
-
getWasmTableEntry(index)(a1);
|
|
3261
|
-
} catch(e) {
|
|
3262
|
-
stackRestore(sp);
|
|
3263
|
-
if (e !== e+0) throw e;
|
|
3264
|
-
_setThrew(1, 0);
|
|
3265
|
-
}
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
function invoke_iiiii(index,a1,a2,a3,a4) {
|
|
3269
|
-
var sp = stackSave();
|
|
3270
|
-
try {
|
|
3271
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3272
|
-
} catch(e) {
|
|
3273
|
-
stackRestore(sp);
|
|
3274
|
-
if (e !== e+0) throw e;
|
|
3275
|
-
_setThrew(1, 0);
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
function invoke_viii(index,a1,a2,a3) {
|
|
3280
|
-
var sp = stackSave();
|
|
3281
|
-
try {
|
|
3282
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
3283
|
-
} catch(e) {
|
|
3284
|
-
stackRestore(sp);
|
|
3285
|
-
if (e !== e+0) throw e;
|
|
3286
|
-
_setThrew(1, 0);
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
|
|
3290
|
-
function invoke_iiii(index,a1,a2,a3) {
|
|
3291
|
-
var sp = stackSave();
|
|
3292
|
-
try {
|
|
3293
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
3294
|
-
} catch(e) {
|
|
3295
|
-
stackRestore(sp);
|
|
3296
|
-
if (e !== e+0) throw e;
|
|
3297
|
-
_setThrew(1, 0);
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
|
|
3301
|
-
function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
3302
|
-
var sp = stackSave();
|
|
3303
|
-
try {
|
|
3304
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
3305
|
-
} catch(e) {
|
|
3306
|
-
stackRestore(sp);
|
|
3307
|
-
if (e !== e+0) throw e;
|
|
3308
|
-
_setThrew(1, 0);
|
|
3309
|
-
}
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
|
-
function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6) {
|
|
3313
|
-
var sp = stackSave();
|
|
3314
|
-
try {
|
|
3315
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
3316
|
-
} catch(e) {
|
|
3317
|
-
stackRestore(sp);
|
|
3318
|
-
if (e !== e+0) throw e;
|
|
3319
|
-
_setThrew(1, 0);
|
|
3320
|
-
}
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3323
|
-
function invoke_v(index) {
|
|
3324
|
-
var sp = stackSave();
|
|
3325
|
-
try {
|
|
3326
|
-
getWasmTableEntry(index)();
|
|
3327
|
-
} catch(e) {
|
|
3328
|
-
stackRestore(sp);
|
|
3329
|
-
if (e !== e+0) throw e;
|
|
3330
|
-
_setThrew(1, 0);
|
|
3331
|
-
}
|
|
3332
|
-
}
|
|
3333
|
-
|
|
3334
|
-
function invoke_j(index) {
|
|
3335
|
-
var sp = stackSave();
|
|
3336
|
-
try {
|
|
3337
|
-
return getWasmTableEntry(index)();
|
|
3338
|
-
} catch(e) {
|
|
3339
|
-
stackRestore(sp);
|
|
3340
|
-
if (e !== e+0) throw e;
|
|
3341
|
-
_setThrew(1, 0);
|
|
3342
|
-
return 0n;
|
|
3343
|
-
}
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
function invoke_iiiiii(index,a1,a2,a3,a4,a5) {
|
|
3347
|
-
var sp = stackSave();
|
|
3348
|
-
try {
|
|
3349
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3350
|
-
} catch(e) {
|
|
3351
|
-
stackRestore(sp);
|
|
3352
|
-
if (e !== e+0) throw e;
|
|
3353
|
-
_setThrew(1, 0);
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3356
|
-
|
|
3357
|
-
function invoke_iiiiij(index,a1,a2,a3,a4,a5) {
|
|
3358
|
-
var sp = stackSave();
|
|
3359
|
-
try {
|
|
3360
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3361
|
-
} catch(e) {
|
|
3362
|
-
stackRestore(sp);
|
|
3363
|
-
if (e !== e+0) throw e;
|
|
3364
|
-
_setThrew(1, 0);
|
|
3365
|
-
}
|
|
3366
|
-
}
|
|
3367
|
-
|
|
3368
|
-
function invoke_iiiiid(index,a1,a2,a3,a4,a5) {
|
|
3369
|
-
var sp = stackSave();
|
|
3370
|
-
try {
|
|
3371
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3372
|
-
} catch(e) {
|
|
3373
|
-
stackRestore(sp);
|
|
3374
|
-
if (e !== e+0) throw e;
|
|
3375
|
-
_setThrew(1, 0);
|
|
3376
|
-
}
|
|
3377
|
-
}
|
|
3378
|
-
|
|
3379
|
-
function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
3380
|
-
var sp = stackSave();
|
|
3381
|
-
try {
|
|
3382
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
3383
|
-
} catch(e) {
|
|
3384
|
-
stackRestore(sp);
|
|
3385
|
-
if (e !== e+0) throw e;
|
|
3386
|
-
_setThrew(1, 0);
|
|
3387
|
-
}
|
|
3388
|
-
}
|
|
3389
|
-
|
|
3390
|
-
function invoke_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
|
|
3391
|
-
var sp = stackSave();
|
|
3392
|
-
try {
|
|
3393
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
|
|
3394
|
-
} catch(e) {
|
|
3395
|
-
stackRestore(sp);
|
|
3396
|
-
if (e !== e+0) throw e;
|
|
3397
|
-
_setThrew(1, 0);
|
|
3398
|
-
}
|
|
3399
|
-
}
|
|
3400
|
-
|
|
3401
|
-
function invoke_jiiii(index,a1,a2,a3,a4) {
|
|
3402
|
-
var sp = stackSave();
|
|
3403
|
-
try {
|
|
3404
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3405
|
-
} catch(e) {
|
|
3406
|
-
stackRestore(sp);
|
|
3407
|
-
if (e !== e+0) throw e;
|
|
3408
|
-
_setThrew(1, 0);
|
|
3409
|
-
return 0n;
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
function invoke_iiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) {
|
|
3414
|
-
var sp = stackSave();
|
|
3415
|
-
try {
|
|
3416
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
|
|
3417
|
-
} catch(e) {
|
|
3418
|
-
stackRestore(sp);
|
|
3419
|
-
if (e !== e+0) throw e;
|
|
3420
|
-
_setThrew(1, 0);
|
|
3421
|
-
}
|
|
3422
|
-
}
|
|
3423
|
-
|
|
3424
|
-
function invoke_fiii(index,a1,a2,a3) {
|
|
3425
|
-
var sp = stackSave();
|
|
3426
|
-
try {
|
|
3427
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
3428
|
-
} catch(e) {
|
|
3429
|
-
stackRestore(sp);
|
|
3430
|
-
if (e !== e+0) throw e;
|
|
3431
|
-
_setThrew(1, 0);
|
|
3432
|
-
}
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
|
-
function invoke_diii(index,a1,a2,a3) {
|
|
3436
|
-
var sp = stackSave();
|
|
3437
|
-
try {
|
|
3438
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
3439
|
-
} catch(e) {
|
|
3440
|
-
stackRestore(sp);
|
|
3441
|
-
if (e !== e+0) throw e;
|
|
3442
|
-
_setThrew(1, 0);
|
|
3443
|
-
}
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
function invoke_i(index) {
|
|
3447
|
-
var sp = stackSave();
|
|
3448
|
-
try {
|
|
3449
|
-
return getWasmTableEntry(index)();
|
|
3450
|
-
} catch(e) {
|
|
3451
|
-
stackRestore(sp);
|
|
3452
|
-
if (e !== e+0) throw e;
|
|
3453
|
-
_setThrew(1, 0);
|
|
3454
|
-
}
|
|
3455
|
-
}
|
|
3456
|
-
|
|
3457
|
-
function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
3458
|
-
var sp = stackSave();
|
|
3459
|
-
try {
|
|
3460
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
3461
|
-
} catch(e) {
|
|
3462
|
-
stackRestore(sp);
|
|
3463
|
-
if (e !== e+0) throw e;
|
|
3464
|
-
_setThrew(1, 0);
|
|
3465
|
-
}
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) {
|
|
3469
|
-
var sp = stackSave();
|
|
3470
|
-
try {
|
|
3471
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
|
|
3472
|
-
} catch(e) {
|
|
3473
|
-
stackRestore(sp);
|
|
3474
|
-
if (e !== e+0) throw e;
|
|
3475
|
-
_setThrew(1, 0);
|
|
3476
|
-
}
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
|
-
function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
|
|
3480
|
-
var sp = stackSave();
|
|
3481
|
-
try {
|
|
3482
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
|
|
3483
|
-
} catch(e) {
|
|
3484
|
-
stackRestore(sp);
|
|
3485
|
-
if (e !== e+0) throw e;
|
|
3486
|
-
_setThrew(1, 0);
|
|
3487
|
-
}
|
|
3488
|
-
}
|
|
3489
|
-
|
|
3490
|
-
function invoke_viiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) {
|
|
3491
|
-
var sp = stackSave();
|
|
3492
|
-
try {
|
|
3493
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15);
|
|
3494
|
-
} catch(e) {
|
|
3495
|
-
stackRestore(sp);
|
|
3496
|
-
if (e !== e+0) throw e;
|
|
3497
|
-
_setThrew(1, 0);
|
|
3498
|
-
}
|
|
3499
|
-
}
|
|
3500
|
-
|
|
3501
|
-
function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6) {
|
|
3502
|
-
var sp = stackSave();
|
|
3503
|
-
try {
|
|
3504
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
3505
|
-
} catch(e) {
|
|
3506
|
-
stackRestore(sp);
|
|
3507
|
-
if (e !== e+0) throw e;
|
|
3508
|
-
_setThrew(1, 0);
|
|
3509
|
-
}
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
|
-
function invoke_viif(index,a1,a2,a3) {
|
|
3513
|
-
var sp = stackSave();
|
|
3514
|
-
try {
|
|
3515
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
3516
|
-
} catch(e) {
|
|
3517
|
-
stackRestore(sp);
|
|
3518
|
-
if (e !== e+0) throw e;
|
|
3519
|
-
_setThrew(1, 0);
|
|
3520
|
-
}
|
|
3521
|
-
}
|
|
3522
|
-
|
|
3523
|
-
function invoke_viid(index,a1,a2,a3) {
|
|
3524
|
-
var sp = stackSave();
|
|
3525
|
-
try {
|
|
3526
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
3527
|
-
} catch(e) {
|
|
3528
|
-
stackRestore(sp);
|
|
3529
|
-
if (e !== e+0) throw e;
|
|
3530
|
-
_setThrew(1, 0);
|
|
3531
|
-
}
|
|
3532
|
-
}
|
|
3533
|
-
|
|
3534
|
-
function invoke_diiiii(index,a1,a2,a3,a4,a5) {
|
|
3535
|
-
var sp = stackSave();
|
|
3536
|
-
try {
|
|
3537
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3538
|
-
} catch(e) {
|
|
3539
|
-
stackRestore(sp);
|
|
3540
|
-
if (e !== e+0) throw e;
|
|
3541
|
-
_setThrew(1, 0);
|
|
3542
|
-
}
|
|
3543
|
-
}
|
|
3544
|
-
|
|
3545
|
-
function invoke_viiiii(index,a1,a2,a3,a4,a5) {
|
|
3546
|
-
var sp = stackSave();
|
|
3547
|
-
try {
|
|
3548
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3549
|
-
} catch(e) {
|
|
3550
|
-
stackRestore(sp);
|
|
3551
|
-
if (e !== e+0) throw e;
|
|
3552
|
-
_setThrew(1, 0);
|
|
3553
|
-
}
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
|
-
function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
3557
|
-
var sp = stackSave();
|
|
3558
|
-
try {
|
|
3559
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
3560
|
-
} catch(e) {
|
|
3561
|
-
stackRestore(sp);
|
|
3562
|
-
if (e !== e+0) throw e;
|
|
3563
|
-
_setThrew(1, 0);
|
|
3564
|
-
}
|
|
3565
|
-
}
|
|
3566
|
-
|
|
3567
|
-
function invoke_viiff(index,a1,a2,a3,a4) {
|
|
3568
|
-
var sp = stackSave();
|
|
3569
|
-
try {
|
|
3570
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3571
|
-
} catch(e) {
|
|
3572
|
-
stackRestore(sp);
|
|
3573
|
-
if (e !== e+0) throw e;
|
|
3574
|
-
_setThrew(1, 0);
|
|
3575
|
-
}
|
|
3576
|
-
}
|
|
3577
|
-
|
|
3578
|
-
function invoke_viffii(index,a1,a2,a3,a4,a5) {
|
|
3579
|
-
var sp = stackSave();
|
|
3580
|
-
try {
|
|
3581
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3582
|
-
} catch(e) {
|
|
3583
|
-
stackRestore(sp);
|
|
3584
|
-
if (e !== e+0) throw e;
|
|
3585
|
-
_setThrew(1, 0);
|
|
3586
|
-
}
|
|
3587
|
-
}
|
|
3588
|
-
|
|
3589
|
-
function invoke_vif(index,a1,a2) {
|
|
3590
|
-
var sp = stackSave();
|
|
3591
|
-
try {
|
|
3592
|
-
getWasmTableEntry(index)(a1,a2);
|
|
3593
|
-
} catch(e) {
|
|
3594
|
-
stackRestore(sp);
|
|
3595
|
-
if (e !== e+0) throw e;
|
|
3596
|
-
_setThrew(1, 0);
|
|
3597
|
-
}
|
|
3598
|
-
}
|
|
3599
|
-
|
|
3600
|
-
function invoke_viffiii(index,a1,a2,a3,a4,a5,a6) {
|
|
3601
|
-
var sp = stackSave();
|
|
3602
|
-
try {
|
|
3603
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
3604
|
-
} catch(e) {
|
|
3605
|
-
stackRestore(sp);
|
|
3606
|
-
if (e !== e+0) throw e;
|
|
3607
|
-
_setThrew(1, 0);
|
|
3608
|
-
}
|
|
3609
|
-
}
|
|
3610
|
-
|
|
3611
|
-
function invoke_iiifi(index,a1,a2,a3,a4) {
|
|
3612
|
-
var sp = stackSave();
|
|
3613
|
-
try {
|
|
3614
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3615
|
-
} catch(e) {
|
|
3616
|
-
stackRestore(sp);
|
|
3617
|
-
if (e !== e+0) throw e;
|
|
3618
|
-
_setThrew(1, 0);
|
|
3619
|
-
}
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
|
-
function invoke_iiif(index,a1,a2,a3) {
|
|
3623
|
-
var sp = stackSave();
|
|
3624
|
-
try {
|
|
3625
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
3626
|
-
} catch(e) {
|
|
3627
|
-
stackRestore(sp);
|
|
3628
|
-
if (e !== e+0) throw e;
|
|
3629
|
-
_setThrew(1, 0);
|
|
3630
|
-
}
|
|
3631
|
-
}
|
|
3632
|
-
|
|
3633
|
-
function invoke_fii(index,a1,a2) {
|
|
3634
|
-
var sp = stackSave();
|
|
3635
|
-
try {
|
|
3636
|
-
return getWasmTableEntry(index)(a1,a2);
|
|
3637
|
-
} catch(e) {
|
|
3638
|
-
stackRestore(sp);
|
|
3639
|
-
if (e !== e+0) throw e;
|
|
3640
|
-
_setThrew(1, 0);
|
|
3641
|
-
}
|
|
3642
|
-
}
|
|
3643
|
-
|
|
3644
|
-
function invoke_fiiiii(index,a1,a2,a3,a4,a5) {
|
|
3645
|
-
var sp = stackSave();
|
|
3646
|
-
try {
|
|
3647
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3648
|
-
} catch(e) {
|
|
3649
|
-
stackRestore(sp);
|
|
3650
|
-
if (e !== e+0) throw e;
|
|
3651
|
-
_setThrew(1, 0);
|
|
3652
|
-
}
|
|
3653
|
-
}
|
|
3654
|
-
|
|
3655
|
-
function invoke_viiiiiiiiiifiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17) {
|
|
3656
|
-
var sp = stackSave();
|
|
3657
|
-
try {
|
|
3658
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17);
|
|
3659
|
-
} catch(e) {
|
|
3660
|
-
stackRestore(sp);
|
|
3661
|
-
if (e !== e+0) throw e;
|
|
3662
|
-
_setThrew(1, 0);
|
|
3663
|
-
}
|
|
3664
|
-
}
|
|
3665
|
-
|
|
3666
|
-
function invoke_viifi(index,a1,a2,a3,a4) {
|
|
3667
|
-
var sp = stackSave();
|
|
3668
|
-
try {
|
|
3669
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3670
|
-
} catch(e) {
|
|
3671
|
-
stackRestore(sp);
|
|
3672
|
-
if (e !== e+0) throw e;
|
|
3673
|
-
_setThrew(1, 0);
|
|
3674
|
-
}
|
|
3675
|
-
}
|
|
3676
|
-
|
|
3677
|
-
function invoke_viff(index,a1,a2,a3) {
|
|
3678
|
-
var sp = stackSave();
|
|
3679
|
-
try {
|
|
3680
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
3681
|
-
} catch(e) {
|
|
3682
|
-
stackRestore(sp);
|
|
3683
|
-
if (e !== e+0) throw e;
|
|
3684
|
-
_setThrew(1, 0);
|
|
3685
|
-
}
|
|
3686
|
-
}
|
|
3687
|
-
|
|
3688
|
-
function invoke_viffff(index,a1,a2,a3,a4,a5) {
|
|
3689
|
-
var sp = stackSave();
|
|
3690
|
-
try {
|
|
3691
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3692
|
-
} catch(e) {
|
|
3693
|
-
stackRestore(sp);
|
|
3694
|
-
if (e !== e+0) throw e;
|
|
3695
|
-
_setThrew(1, 0);
|
|
3696
|
-
}
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
function invoke_iiffff(index,a1,a2,a3,a4,a5) {
|
|
3700
|
-
var sp = stackSave();
|
|
3701
|
-
try {
|
|
3702
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3703
|
-
} catch(e) {
|
|
3704
|
-
stackRestore(sp);
|
|
3705
|
-
if (e !== e+0) throw e;
|
|
3706
|
-
_setThrew(1, 0);
|
|
3707
|
-
}
|
|
3708
|
-
}
|
|
3709
|
-
|
|
3710
|
-
function invoke_viifii(index,a1,a2,a3,a4,a5) {
|
|
3711
|
-
var sp = stackSave();
|
|
3712
|
-
try {
|
|
3713
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3714
|
-
} catch(e) {
|
|
3715
|
-
stackRestore(sp);
|
|
3716
|
-
if (e !== e+0) throw e;
|
|
3717
|
-
_setThrew(1, 0);
|
|
3718
|
-
}
|
|
3719
|
-
}
|
|
3720
|
-
|
|
3721
|
-
function invoke_viiffii(index,a1,a2,a3,a4,a5,a6) {
|
|
3722
|
-
var sp = stackSave();
|
|
3723
|
-
try {
|
|
3724
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
3725
|
-
} catch(e) {
|
|
3726
|
-
stackRestore(sp);
|
|
3727
|
-
if (e !== e+0) throw e;
|
|
3728
|
-
_setThrew(1, 0);
|
|
3729
|
-
}
|
|
3730
|
-
}
|
|
3731
|
-
|
|
3732
|
-
function invoke_fif(index,a1,a2) {
|
|
3733
|
-
var sp = stackSave();
|
|
3734
|
-
try {
|
|
3735
|
-
return getWasmTableEntry(index)(a1,a2);
|
|
3736
|
-
} catch(e) {
|
|
3737
|
-
stackRestore(sp);
|
|
3738
|
-
if (e !== e+0) throw e;
|
|
3739
|
-
_setThrew(1, 0);
|
|
3740
|
-
}
|
|
3741
|
-
}
|
|
3742
|
-
|
|
3743
|
-
function invoke_iiff(index,a1,a2,a3) {
|
|
3744
|
-
var sp = stackSave();
|
|
3745
|
-
try {
|
|
3746
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
3747
|
-
} catch(e) {
|
|
3748
|
-
stackRestore(sp);
|
|
3749
|
-
if (e !== e+0) throw e;
|
|
3750
|
-
_setThrew(1, 0);
|
|
3751
|
-
}
|
|
3752
|
-
}
|
|
3753
|
-
|
|
3754
|
-
function invoke_viiiif(index,a1,a2,a3,a4,a5) {
|
|
3755
|
-
var sp = stackSave();
|
|
3756
|
-
try {
|
|
3757
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3758
|
-
} catch(e) {
|
|
3759
|
-
stackRestore(sp);
|
|
3760
|
-
if (e !== e+0) throw e;
|
|
3761
|
-
_setThrew(1, 0);
|
|
3762
|
-
}
|
|
3763
|
-
}
|
|
3764
|
-
|
|
3765
|
-
function invoke_viffffiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
3766
|
-
var sp = stackSave();
|
|
3767
|
-
try {
|
|
3768
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
3769
|
-
} catch(e) {
|
|
3770
|
-
stackRestore(sp);
|
|
3771
|
-
if (e !== e+0) throw e;
|
|
3772
|
-
_setThrew(1, 0);
|
|
3773
|
-
}
|
|
3774
|
-
}
|
|
3775
|
-
|
|
3776
|
-
function invoke_iifffi(index,a1,a2,a3,a4,a5) {
|
|
3777
|
-
var sp = stackSave();
|
|
3778
|
-
try {
|
|
3779
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3780
|
-
} catch(e) {
|
|
3781
|
-
stackRestore(sp);
|
|
3782
|
-
if (e !== e+0) throw e;
|
|
3783
|
-
_setThrew(1, 0);
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3786
|
-
|
|
3787
|
-
function invoke_viiiiiiiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) {
|
|
3788
|
-
var sp = stackSave();
|
|
3789
|
-
try {
|
|
3790
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
|
|
3791
|
-
} catch(e) {
|
|
3792
|
-
stackRestore(sp);
|
|
3793
|
-
if (e !== e+0) throw e;
|
|
3794
|
-
_setThrew(1, 0);
|
|
3795
|
-
}
|
|
3796
|
-
}
|
|
3797
|
-
|
|
3798
|
-
function invoke_viiffi(index,a1,a2,a3,a4,a5) {
|
|
3799
|
-
var sp = stackSave();
|
|
3800
|
-
try {
|
|
3801
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3802
|
-
} catch(e) {
|
|
3803
|
-
stackRestore(sp);
|
|
3804
|
-
if (e !== e+0) throw e;
|
|
3805
|
-
_setThrew(1, 0);
|
|
3806
|
-
}
|
|
3807
|
-
}
|
|
3808
|
-
|
|
3809
|
-
function invoke_viiffiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
3810
|
-
var sp = stackSave();
|
|
3811
|
-
try {
|
|
3812
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
3813
|
-
} catch(e) {
|
|
3814
|
-
stackRestore(sp);
|
|
3815
|
-
if (e !== e+0) throw e;
|
|
3816
|
-
_setThrew(1, 0);
|
|
3817
|
-
}
|
|
3818
|
-
}
|
|
3819
|
-
|
|
3820
|
-
function invoke_viiiiidi(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
3821
|
-
var sp = stackSave();
|
|
3822
|
-
try {
|
|
3823
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
3824
|
-
} catch(e) {
|
|
3825
|
-
stackRestore(sp);
|
|
3826
|
-
if (e !== e+0) throw e;
|
|
3827
|
-
_setThrew(1, 0);
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
|
|
3831
|
-
function invoke_diiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) {
|
|
3832
|
-
var sp = stackSave();
|
|
3833
|
-
try {
|
|
3834
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15);
|
|
3835
|
-
} catch(e) {
|
|
3836
|
-
stackRestore(sp);
|
|
3837
|
-
if (e !== e+0) throw e;
|
|
3838
|
-
_setThrew(1, 0);
|
|
3839
|
-
}
|
|
3840
|
-
}
|
|
3841
|
-
|
|
3842
|
-
function invoke_viiiidi(index,a1,a2,a3,a4,a5,a6) {
|
|
3843
|
-
var sp = stackSave();
|
|
3844
|
-
try {
|
|
3845
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
3846
|
-
} catch(e) {
|
|
3847
|
-
stackRestore(sp);
|
|
3848
|
-
if (e !== e+0) throw e;
|
|
3849
|
-
_setThrew(1, 0);
|
|
3850
|
-
}
|
|
3851
|
-
}
|
|
3852
|
-
|
|
3853
|
-
function invoke_viiifffi(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
3854
|
-
var sp = stackSave();
|
|
3855
|
-
try {
|
|
3856
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
3857
|
-
} catch(e) {
|
|
3858
|
-
stackRestore(sp);
|
|
3859
|
-
if (e !== e+0) throw e;
|
|
3860
|
-
_setThrew(1, 0);
|
|
3861
|
-
}
|
|
3862
|
-
}
|
|
3863
|
-
|
|
3864
|
-
function invoke_viidd(index,a1,a2,a3,a4) {
|
|
3865
|
-
var sp = stackSave();
|
|
3866
|
-
try {
|
|
3867
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3868
|
-
} catch(e) {
|
|
3869
|
-
stackRestore(sp);
|
|
3870
|
-
if (e !== e+0) throw e;
|
|
3871
|
-
_setThrew(1, 0);
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
|
|
3875
|
-
function invoke_viiiiffii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
3876
|
-
var sp = stackSave();
|
|
3877
|
-
try {
|
|
3878
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
3879
|
-
} catch(e) {
|
|
3880
|
-
stackRestore(sp);
|
|
3881
|
-
if (e !== e+0) throw e;
|
|
3882
|
-
_setThrew(1, 0);
|
|
3883
|
-
}
|
|
3884
|
-
}
|
|
3885
|
-
|
|
3886
|
-
function invoke_iif(index,a1,a2) {
|
|
3887
|
-
var sp = stackSave();
|
|
3888
|
-
try {
|
|
3889
|
-
return getWasmTableEntry(index)(a1,a2);
|
|
3890
|
-
} catch(e) {
|
|
3891
|
-
stackRestore(sp);
|
|
3892
|
-
if (e !== e+0) throw e;
|
|
3893
|
-
_setThrew(1, 0);
|
|
3894
|
-
}
|
|
3895
|
-
}
|
|
3896
|
-
|
|
3897
|
-
function invoke_fifi(index,a1,a2,a3) {
|
|
3898
|
-
var sp = stackSave();
|
|
3899
|
-
try {
|
|
3900
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
3901
|
-
} catch(e) {
|
|
3902
|
-
stackRestore(sp);
|
|
3903
|
-
if (e !== e+0) throw e;
|
|
3904
|
-
_setThrew(1, 0);
|
|
3905
|
-
}
|
|
3906
|
-
}
|
|
3907
|
-
|
|
3908
|
-
function invoke_iiffi(index,a1,a2,a3,a4) {
|
|
3909
|
-
var sp = stackSave();
|
|
3910
|
-
try {
|
|
3911
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3912
|
-
} catch(e) {
|
|
3913
|
-
stackRestore(sp);
|
|
3914
|
-
if (e !== e+0) throw e;
|
|
3915
|
-
_setThrew(1, 0);
|
|
3916
|
-
}
|
|
3917
|
-
}
|
|
3918
|
-
|
|
3919
|
-
function invoke_iifii(index,a1,a2,a3,a4) {
|
|
3920
|
-
var sp = stackSave();
|
|
3921
|
-
try {
|
|
3922
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3923
|
-
} catch(e) {
|
|
3924
|
-
stackRestore(sp);
|
|
3925
|
-
if (e !== e+0) throw e;
|
|
3926
|
-
_setThrew(1, 0);
|
|
3927
|
-
}
|
|
3928
|
-
}
|
|
3929
|
-
|
|
3930
|
-
function invoke_iiifii(index,a1,a2,a3,a4,a5) {
|
|
3931
|
-
var sp = stackSave();
|
|
3932
|
-
try {
|
|
3933
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3934
|
-
} catch(e) {
|
|
3935
|
-
stackRestore(sp);
|
|
3936
|
-
if (e !== e+0) throw e;
|
|
3937
|
-
_setThrew(1, 0);
|
|
3938
|
-
}
|
|
3939
|
-
}
|
|
3940
|
-
|
|
3941
|
-
function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
3942
|
-
var sp = stackSave();
|
|
3943
|
-
try {
|
|
3944
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
3945
|
-
} catch(e) {
|
|
3946
|
-
stackRestore(sp);
|
|
3947
|
-
if (e !== e+0) throw e;
|
|
3948
|
-
_setThrew(1, 0);
|
|
3949
|
-
}
|
|
3950
|
-
}
|
|
3951
|
-
|
|
3952
|
-
function invoke_fi(index,a1) {
|
|
3953
|
-
var sp = stackSave();
|
|
3954
|
-
try {
|
|
3955
|
-
return getWasmTableEntry(index)(a1);
|
|
3956
|
-
} catch(e) {
|
|
3957
|
-
stackRestore(sp);
|
|
3958
|
-
if (e !== e+0) throw e;
|
|
3959
|
-
_setThrew(1, 0);
|
|
3960
|
-
}
|
|
3961
|
-
}
|
|
3962
|
-
|
|
3963
|
-
function invoke_fiiif(index,a1,a2,a3,a4) {
|
|
3964
|
-
var sp = stackSave();
|
|
3965
|
-
try {
|
|
3966
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3967
|
-
} catch(e) {
|
|
3968
|
-
stackRestore(sp);
|
|
3969
|
-
if (e !== e+0) throw e;
|
|
3970
|
-
_setThrew(1, 0);
|
|
3971
|
-
}
|
|
3972
|
-
}
|
|
3973
|
-
|
|
3974
|
-
function invoke_viiif(index,a1,a2,a3,a4) {
|
|
3975
|
-
var sp = stackSave();
|
|
3976
|
-
try {
|
|
3977
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
3978
|
-
} catch(e) {
|
|
3979
|
-
stackRestore(sp);
|
|
3980
|
-
if (e !== e+0) throw e;
|
|
3981
|
-
_setThrew(1, 0);
|
|
3982
|
-
}
|
|
3983
|
-
}
|
|
3984
|
-
|
|
3985
|
-
function invoke_fiifii(index,a1,a2,a3,a4,a5) {
|
|
3986
|
-
var sp = stackSave();
|
|
3987
|
-
try {
|
|
3988
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
3989
|
-
} catch(e) {
|
|
3990
|
-
stackRestore(sp);
|
|
3991
|
-
if (e !== e+0) throw e;
|
|
3992
|
-
_setThrew(1, 0);
|
|
3993
|
-
}
|
|
3994
|
-
}
|
|
3995
|
-
|
|
3996
|
-
function invoke_fifff(index,a1,a2,a3,a4) {
|
|
3997
|
-
var sp = stackSave();
|
|
3998
|
-
try {
|
|
3999
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4000
|
-
} catch(e) {
|
|
4001
|
-
stackRestore(sp);
|
|
4002
|
-
if (e !== e+0) throw e;
|
|
4003
|
-
_setThrew(1, 0);
|
|
4004
|
-
}
|
|
4005
|
-
}
|
|
4006
|
-
|
|
4007
|
-
function invoke_vifi(index,a1,a2,a3) {
|
|
4008
|
-
var sp = stackSave();
|
|
4009
|
-
try {
|
|
4010
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
4011
|
-
} catch(e) {
|
|
4012
|
-
stackRestore(sp);
|
|
4013
|
-
if (e !== e+0) throw e;
|
|
4014
|
-
_setThrew(1, 0);
|
|
4015
|
-
}
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
function invoke_viiffiii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
4019
|
-
var sp = stackSave();
|
|
4020
|
-
try {
|
|
4021
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
4022
|
-
} catch(e) {
|
|
4023
|
-
stackRestore(sp);
|
|
4024
|
-
if (e !== e+0) throw e;
|
|
4025
|
-
_setThrew(1, 0);
|
|
4026
|
-
}
|
|
4027
|
-
}
|
|
4028
|
-
|
|
4029
|
-
function invoke_viiffffi(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
4030
|
-
var sp = stackSave();
|
|
4031
|
-
try {
|
|
4032
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
4033
|
-
} catch(e) {
|
|
4034
|
-
stackRestore(sp);
|
|
4035
|
-
if (e !== e+0) throw e;
|
|
4036
|
-
_setThrew(1, 0);
|
|
4037
|
-
}
|
|
4038
|
-
}
|
|
4039
|
-
|
|
4040
|
-
function invoke_viiffffiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
4041
|
-
var sp = stackSave();
|
|
4042
|
-
try {
|
|
4043
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
4044
|
-
} catch(e) {
|
|
4045
|
-
stackRestore(sp);
|
|
4046
|
-
if (e !== e+0) throw e;
|
|
4047
|
-
_setThrew(1, 0);
|
|
4048
|
-
}
|
|
4049
|
-
}
|
|
4050
|
-
|
|
4051
|
-
function invoke_iifi(index,a1,a2,a3) {
|
|
4052
|
-
var sp = stackSave();
|
|
4053
|
-
try {
|
|
4054
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
4055
|
-
} catch(e) {
|
|
4056
|
-
stackRestore(sp);
|
|
4057
|
-
if (e !== e+0) throw e;
|
|
4058
|
-
_setThrew(1, 0);
|
|
4059
|
-
}
|
|
4060
|
-
}
|
|
4061
|
-
|
|
4062
|
-
function invoke_vifffffffff(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
|
|
4063
|
-
var sp = stackSave();
|
|
4064
|
-
try {
|
|
4065
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
|
|
4066
|
-
} catch(e) {
|
|
4067
|
-
stackRestore(sp);
|
|
4068
|
-
if (e !== e+0) throw e;
|
|
4069
|
-
_setThrew(1, 0);
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
|
-
function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
4074
|
-
var sp = stackSave();
|
|
4075
|
-
try {
|
|
4076
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
4077
|
-
} catch(e) {
|
|
4078
|
-
stackRestore(sp);
|
|
4079
|
-
if (e !== e+0) throw e;
|
|
4080
|
-
_setThrew(1, 0);
|
|
4081
|
-
}
|
|
4082
|
-
}
|
|
4083
|
-
|
|
4084
|
-
function invoke_viiiiiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
4085
|
-
var sp = stackSave();
|
|
4086
|
-
try {
|
|
4087
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
4088
|
-
} catch(e) {
|
|
4089
|
-
stackRestore(sp);
|
|
4090
|
-
if (e !== e+0) throw e;
|
|
4091
|
-
_setThrew(1, 0);
|
|
4092
|
-
}
|
|
4093
|
-
}
|
|
4094
|
-
|
|
4095
|
-
function invoke_viiiiiiiiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) {
|
|
4096
|
-
var sp = stackSave();
|
|
4097
|
-
try {
|
|
4098
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
|
|
4099
|
-
} catch(e) {
|
|
4100
|
-
stackRestore(sp);
|
|
4101
|
-
if (e !== e+0) throw e;
|
|
4102
|
-
_setThrew(1, 0);
|
|
4103
|
-
}
|
|
4104
|
-
}
|
|
4105
|
-
|
|
4106
|
-
function invoke_viiid(index,a1,a2,a3,a4) {
|
|
4107
|
-
var sp = stackSave();
|
|
4108
|
-
try {
|
|
4109
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4110
|
-
} catch(e) {
|
|
4111
|
-
stackRestore(sp);
|
|
4112
|
-
if (e !== e+0) throw e;
|
|
4113
|
-
_setThrew(1, 0);
|
|
4114
|
-
}
|
|
4115
|
-
}
|
|
4116
|
-
|
|
4117
|
-
function invoke_viiifiii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
4118
|
-
var sp = stackSave();
|
|
4119
|
-
try {
|
|
4120
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
4121
|
-
} catch(e) {
|
|
4122
|
-
stackRestore(sp);
|
|
4123
|
-
if (e !== e+0) throw e;
|
|
4124
|
-
_setThrew(1, 0);
|
|
4125
|
-
}
|
|
4126
|
-
}
|
|
4127
|
-
|
|
4128
|
-
function invoke_viiifffii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
4129
|
-
var sp = stackSave();
|
|
4130
|
-
try {
|
|
4131
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
4132
|
-
} catch(e) {
|
|
4133
|
-
stackRestore(sp);
|
|
4134
|
-
if (e !== e+0) throw e;
|
|
4135
|
-
_setThrew(1, 0);
|
|
4136
|
-
}
|
|
4137
|
-
}
|
|
4138
|
-
|
|
4139
|
-
function invoke_viiiffifffii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) {
|
|
4140
|
-
var sp = stackSave();
|
|
4141
|
-
try {
|
|
4142
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
|
|
4143
|
-
} catch(e) {
|
|
4144
|
-
stackRestore(sp);
|
|
4145
|
-
if (e !== e+0) throw e;
|
|
4146
|
-
_setThrew(1, 0);
|
|
4147
|
-
}
|
|
4148
|
-
}
|
|
4149
|
-
|
|
4150
|
-
function invoke_viiiffii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
4151
|
-
var sp = stackSave();
|
|
4152
|
-
try {
|
|
4153
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
4154
|
-
} catch(e) {
|
|
4155
|
-
stackRestore(sp);
|
|
4156
|
-
if (e !== e+0) throw e;
|
|
4157
|
-
_setThrew(1, 0);
|
|
4158
|
-
}
|
|
4159
|
-
}
|
|
4160
|
-
|
|
4161
|
-
function invoke_viiiffiffii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
|
|
4162
|
-
var sp = stackSave();
|
|
4163
|
-
try {
|
|
4164
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
|
|
4165
|
-
} catch(e) {
|
|
4166
|
-
stackRestore(sp);
|
|
4167
|
-
if (e !== e+0) throw e;
|
|
4168
|
-
_setThrew(1, 0);
|
|
4169
|
-
}
|
|
4170
|
-
}
|
|
4171
|
-
|
|
4172
|
-
function invoke_viffifi(index,a1,a2,a3,a4,a5,a6) {
|
|
4173
|
-
var sp = stackSave();
|
|
4174
|
-
try {
|
|
4175
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4176
|
-
} catch(e) {
|
|
4177
|
-
stackRestore(sp);
|
|
4178
|
-
if (e !== e+0) throw e;
|
|
4179
|
-
_setThrew(1, 0);
|
|
4180
|
-
}
|
|
4181
|
-
}
|
|
4182
|
-
|
|
4183
|
-
function invoke_viififii(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
4184
|
-
var sp = stackSave();
|
|
4185
|
-
try {
|
|
4186
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
4187
|
-
} catch(e) {
|
|
4188
|
-
stackRestore(sp);
|
|
4189
|
-
if (e !== e+0) throw e;
|
|
4190
|
-
_setThrew(1, 0);
|
|
4191
|
-
}
|
|
4192
|
-
}
|
|
4193
|
-
|
|
4194
|
-
function invoke_iiiif(index,a1,a2,a3,a4) {
|
|
4195
|
-
var sp = stackSave();
|
|
4196
|
-
try {
|
|
4197
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4198
|
-
} catch(e) {
|
|
4199
|
-
stackRestore(sp);
|
|
4200
|
-
if (e !== e+0) throw e;
|
|
4201
|
-
_setThrew(1, 0);
|
|
4202
|
-
}
|
|
4203
|
-
}
|
|
4204
|
-
|
|
4205
|
-
function invoke_iffffffffi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
4206
|
-
var sp = stackSave();
|
|
4207
|
-
try {
|
|
4208
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
4209
|
-
} catch(e) {
|
|
4210
|
-
stackRestore(sp);
|
|
4211
|
-
if (e !== e+0) throw e;
|
|
4212
|
-
_setThrew(1, 0);
|
|
4213
|
-
}
|
|
4214
|
-
}
|
|
4215
|
-
|
|
4216
|
-
function invoke_vfiiiii(index,a1,a2,a3,a4,a5,a6) {
|
|
4217
|
-
var sp = stackSave();
|
|
4218
|
-
try {
|
|
4219
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4220
|
-
} catch(e) {
|
|
4221
|
-
stackRestore(sp);
|
|
4222
|
-
if (e !== e+0) throw e;
|
|
4223
|
-
_setThrew(1, 0);
|
|
4224
|
-
}
|
|
4225
|
-
}
|
|
4226
|
-
|
|
4227
|
-
function invoke_viiiiiiifii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
|
|
4228
|
-
var sp = stackSave();
|
|
4229
|
-
try {
|
|
4230
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
|
|
4231
|
-
} catch(e) {
|
|
4232
|
-
stackRestore(sp);
|
|
4233
|
-
if (e !== e+0) throw e;
|
|
4234
|
-
_setThrew(1, 0);
|
|
4235
|
-
}
|
|
4236
|
-
}
|
|
4237
|
-
|
|
4238
|
-
function invoke_viiiiif(index,a1,a2,a3,a4,a5,a6) {
|
|
4239
|
-
var sp = stackSave();
|
|
4240
|
-
try {
|
|
4241
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4242
|
-
} catch(e) {
|
|
4243
|
-
stackRestore(sp);
|
|
4244
|
-
if (e !== e+0) throw e;
|
|
4245
|
-
_setThrew(1, 0);
|
|
4246
|
-
}
|
|
4247
|
-
}
|
|
4248
|
-
|
|
4249
|
-
function invoke_vifffi(index,a1,a2,a3,a4,a5) {
|
|
4250
|
-
var sp = stackSave();
|
|
4251
|
-
try {
|
|
4252
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4253
|
-
} catch(e) {
|
|
4254
|
-
stackRestore(sp);
|
|
4255
|
-
if (e !== e+0) throw e;
|
|
4256
|
-
_setThrew(1, 0);
|
|
4257
|
-
}
|
|
4258
|
-
}
|
|
4259
|
-
|
|
4260
|
-
function invoke_iiifff(index,a1,a2,a3,a4,a5) {
|
|
4261
|
-
var sp = stackSave();
|
|
4262
|
-
try {
|
|
4263
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4264
|
-
} catch(e) {
|
|
4265
|
-
stackRestore(sp);
|
|
4266
|
-
if (e !== e+0) throw e;
|
|
4267
|
-
_setThrew(1, 0);
|
|
4268
|
-
}
|
|
4269
|
-
}
|
|
4270
|
-
|
|
4271
|
-
function invoke_viifiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
4272
|
-
var sp = stackSave();
|
|
4273
|
-
try {
|
|
4274
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
4275
|
-
} catch(e) {
|
|
4276
|
-
stackRestore(sp);
|
|
4277
|
-
if (e !== e+0) throw e;
|
|
4278
|
-
_setThrew(1, 0);
|
|
4279
|
-
}
|
|
4280
|
-
}
|
|
4281
|
-
|
|
4282
|
-
function invoke_iiiff(index,a1,a2,a3,a4) {
|
|
4283
|
-
var sp = stackSave();
|
|
4284
|
-
try {
|
|
4285
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4286
|
-
} catch(e) {
|
|
4287
|
-
stackRestore(sp);
|
|
4288
|
-
if (e !== e+0) throw e;
|
|
4289
|
-
_setThrew(1, 0);
|
|
4290
|
-
}
|
|
4291
|
-
}
|
|
4292
|
-
|
|
4293
|
-
function invoke_iiiffi(index,a1,a2,a3,a4,a5) {
|
|
4294
|
-
var sp = stackSave();
|
|
4295
|
-
try {
|
|
4296
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4297
|
-
} catch(e) {
|
|
4298
|
-
stackRestore(sp);
|
|
4299
|
-
if (e !== e+0) throw e;
|
|
4300
|
-
_setThrew(1, 0);
|
|
4301
|
-
}
|
|
4302
|
-
}
|
|
4303
|
-
|
|
4304
|
-
function invoke_vj(index,a1) {
|
|
4305
|
-
var sp = stackSave();
|
|
4306
|
-
try {
|
|
4307
|
-
getWasmTableEntry(index)(a1);
|
|
4308
|
-
} catch(e) {
|
|
4309
|
-
stackRestore(sp);
|
|
4310
|
-
if (e !== e+0) throw e;
|
|
4311
|
-
_setThrew(1, 0);
|
|
4312
|
-
}
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
function invoke_viji(index,a1,a2,a3) {
|
|
4316
|
-
var sp = stackSave();
|
|
4317
|
-
try {
|
|
4318
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
4319
|
-
} catch(e) {
|
|
4320
|
-
stackRestore(sp);
|
|
4321
|
-
if (e !== e+0) throw e;
|
|
4322
|
-
_setThrew(1, 0);
|
|
4323
|
-
}
|
|
4324
|
-
}
|
|
4325
|
-
|
|
4326
|
-
function invoke_vij(index,a1,a2) {
|
|
4327
|
-
var sp = stackSave();
|
|
4328
|
-
try {
|
|
4329
|
-
getWasmTableEntry(index)(a1,a2);
|
|
4330
|
-
} catch(e) {
|
|
4331
|
-
stackRestore(sp);
|
|
4332
|
-
if (e !== e+0) throw e;
|
|
4333
|
-
_setThrew(1, 0);
|
|
4334
|
-
}
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
function invoke_viifif(index,a1,a2,a3,a4,a5) {
|
|
4338
|
-
var sp = stackSave();
|
|
4339
|
-
try {
|
|
4340
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4341
|
-
} catch(e) {
|
|
4342
|
-
stackRestore(sp);
|
|
4343
|
-
if (e !== e+0) throw e;
|
|
4344
|
-
_setThrew(1, 0);
|
|
4345
|
-
}
|
|
4346
|
-
}
|
|
4347
|
-
|
|
4348
|
-
function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) {
|
|
4349
|
-
var sp = stackSave();
|
|
4350
|
-
try {
|
|
4351
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
|
|
4352
|
-
} catch(e) {
|
|
4353
|
-
stackRestore(sp);
|
|
4354
|
-
if (e !== e+0) throw e;
|
|
4355
|
-
_setThrew(1, 0);
|
|
4356
|
-
}
|
|
4357
|
-
}
|
|
4358
|
-
|
|
4359
|
-
function invoke_vifiii(index,a1,a2,a3,a4,a5) {
|
|
4360
|
-
var sp = stackSave();
|
|
4361
|
-
try {
|
|
4362
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4363
|
-
} catch(e) {
|
|
4364
|
-
stackRestore(sp);
|
|
4365
|
-
if (e !== e+0) throw e;
|
|
4366
|
-
_setThrew(1, 0);
|
|
4367
|
-
}
|
|
4368
|
-
}
|
|
4369
|
-
|
|
4370
|
-
function invoke_viffffi(index,a1,a2,a3,a4,a5,a6) {
|
|
4371
|
-
var sp = stackSave();
|
|
4372
|
-
try {
|
|
4373
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4374
|
-
} catch(e) {
|
|
4375
|
-
stackRestore(sp);
|
|
4376
|
-
if (e !== e+0) throw e;
|
|
4377
|
-
_setThrew(1, 0);
|
|
4378
|
-
}
|
|
4379
|
-
}
|
|
4380
|
-
|
|
4381
|
-
function invoke_vifff(index,a1,a2,a3,a4) {
|
|
4382
|
-
var sp = stackSave();
|
|
4383
|
-
try {
|
|
4384
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4385
|
-
} catch(e) {
|
|
4386
|
-
stackRestore(sp);
|
|
4387
|
-
if (e !== e+0) throw e;
|
|
4388
|
-
_setThrew(1, 0);
|
|
4389
|
-
}
|
|
4390
|
-
}
|
|
4391
|
-
|
|
4392
|
-
function invoke_iiiiddddi(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
4393
|
-
var sp = stackSave();
|
|
4394
|
-
try {
|
|
4395
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
4396
|
-
} catch(e) {
|
|
4397
|
-
stackRestore(sp);
|
|
4398
|
-
if (e !== e+0) throw e;
|
|
4399
|
-
_setThrew(1, 0);
|
|
4400
|
-
}
|
|
4401
|
-
}
|
|
4402
|
-
|
|
4403
|
-
function invoke_iidi(index,a1,a2,a3) {
|
|
4404
|
-
var sp = stackSave();
|
|
4405
|
-
try {
|
|
4406
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
4407
|
-
} catch(e) {
|
|
4408
|
-
stackRestore(sp);
|
|
4409
|
-
if (e !== e+0) throw e;
|
|
4410
|
-
_setThrew(1, 0);
|
|
4411
|
-
}
|
|
4412
|
-
}
|
|
4413
|
-
|
|
4414
|
-
function invoke_iid(index,a1,a2) {
|
|
4415
|
-
var sp = stackSave();
|
|
4416
|
-
try {
|
|
4417
|
-
return getWasmTableEntry(index)(a1,a2);
|
|
4418
|
-
} catch(e) {
|
|
4419
|
-
stackRestore(sp);
|
|
4420
|
-
if (e !== e+0) throw e;
|
|
4421
|
-
_setThrew(1, 0);
|
|
4422
|
-
}
|
|
4423
|
-
}
|
|
4424
|
-
|
|
4425
|
-
function invoke_iiddi(index,a1,a2,a3,a4) {
|
|
4426
|
-
var sp = stackSave();
|
|
4427
|
-
try {
|
|
4428
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4429
|
-
} catch(e) {
|
|
4430
|
-
stackRestore(sp);
|
|
4431
|
-
if (e !== e+0) throw e;
|
|
4432
|
-
_setThrew(1, 0);
|
|
4433
|
-
}
|
|
4434
|
-
}
|
|
4435
|
-
|
|
4436
|
-
function invoke_viidii(index,a1,a2,a3,a4,a5) {
|
|
4437
|
-
var sp = stackSave();
|
|
4438
|
-
try {
|
|
4439
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4440
|
-
} catch(e) {
|
|
4441
|
-
stackRestore(sp);
|
|
4442
|
-
if (e !== e+0) throw e;
|
|
4443
|
-
_setThrew(1, 0);
|
|
4444
|
-
}
|
|
4445
|
-
}
|
|
4446
|
-
|
|
4447
|
-
function invoke_idd(index,a1,a2) {
|
|
4448
|
-
var sp = stackSave();
|
|
4449
|
-
try {
|
|
4450
|
-
return getWasmTableEntry(index)(a1,a2);
|
|
4451
|
-
} catch(e) {
|
|
4452
|
-
stackRestore(sp);
|
|
4453
|
-
if (e !== e+0) throw e;
|
|
4454
|
-
_setThrew(1, 0);
|
|
4455
|
-
}
|
|
4456
|
-
}
|
|
4457
|
-
|
|
4458
|
-
function invoke_iiji(index,a1,a2,a3) {
|
|
4459
|
-
var sp = stackSave();
|
|
4460
|
-
try {
|
|
4461
|
-
return getWasmTableEntry(index)(a1,a2,a3);
|
|
4462
|
-
} catch(e) {
|
|
4463
|
-
stackRestore(sp);
|
|
4464
|
-
if (e !== e+0) throw e;
|
|
4465
|
-
_setThrew(1, 0);
|
|
4466
|
-
}
|
|
4467
|
-
}
|
|
4468
|
-
|
|
4469
|
-
function invoke_iiiiiif(index,a1,a2,a3,a4,a5,a6) {
|
|
4470
|
-
var sp = stackSave();
|
|
4471
|
-
try {
|
|
4472
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4473
|
-
} catch(e) {
|
|
4474
|
-
stackRestore(sp);
|
|
4475
|
-
if (e !== e+0) throw e;
|
|
4476
|
-
_setThrew(1, 0);
|
|
4477
|
-
}
|
|
4478
|
-
}
|
|
4479
|
-
|
|
4480
|
-
function invoke_vffi(index,a1,a2,a3) {
|
|
4481
|
-
var sp = stackSave();
|
|
4482
|
-
try {
|
|
4483
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
4484
|
-
} catch(e) {
|
|
4485
|
-
stackRestore(sp);
|
|
4486
|
-
if (e !== e+0) throw e;
|
|
4487
|
-
_setThrew(1, 0);
|
|
4488
|
-
}
|
|
4489
|
-
}
|
|
4490
|
-
|
|
4491
|
-
function invoke_vfi(index,a1,a2) {
|
|
4492
|
-
var sp = stackSave();
|
|
4493
|
-
try {
|
|
4494
|
-
getWasmTableEntry(index)(a1,a2);
|
|
4495
|
-
} catch(e) {
|
|
4496
|
-
stackRestore(sp);
|
|
4497
|
-
if (e !== e+0) throw e;
|
|
4498
|
-
_setThrew(1, 0);
|
|
4499
|
-
}
|
|
4500
|
-
}
|
|
4501
|
-
|
|
4502
|
-
function invoke_vfii(index,a1,a2,a3) {
|
|
4503
|
-
var sp = stackSave();
|
|
4504
|
-
try {
|
|
4505
|
-
getWasmTableEntry(index)(a1,a2,a3);
|
|
4506
|
-
} catch(e) {
|
|
4507
|
-
stackRestore(sp);
|
|
4508
|
-
if (e !== e+0) throw e;
|
|
4509
|
-
_setThrew(1, 0);
|
|
4510
|
-
}
|
|
4511
|
-
}
|
|
4512
|
-
|
|
4513
|
-
function invoke_viffffiiif(index,a1,a2,a3,a4,a5,a6,a7,a8,a9) {
|
|
4514
|
-
var sp = stackSave();
|
|
4515
|
-
try {
|
|
4516
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9);
|
|
4517
|
-
} catch(e) {
|
|
4518
|
-
stackRestore(sp);
|
|
4519
|
-
if (e !== e+0) throw e;
|
|
4520
|
-
_setThrew(1, 0);
|
|
4521
|
-
}
|
|
4522
|
-
}
|
|
4523
|
-
|
|
4524
|
-
function invoke_iffff(index,a1,a2,a3,a4) {
|
|
4525
|
-
var sp = stackSave();
|
|
4526
|
-
try {
|
|
4527
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4528
|
-
} catch(e) {
|
|
4529
|
-
stackRestore(sp);
|
|
4530
|
-
if (e !== e+0) throw e;
|
|
4531
|
-
_setThrew(1, 0);
|
|
4532
|
-
}
|
|
4533
|
-
}
|
|
4534
|
-
|
|
4535
|
-
function invoke_vffffffi(index,a1,a2,a3,a4,a5,a6,a7) {
|
|
4536
|
-
var sp = stackSave();
|
|
4537
|
-
try {
|
|
4538
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7);
|
|
4539
|
-
} catch(e) {
|
|
4540
|
-
stackRestore(sp);
|
|
4541
|
-
if (e !== e+0) throw e;
|
|
4542
|
-
_setThrew(1, 0);
|
|
4543
|
-
}
|
|
4544
|
-
}
|
|
4545
|
-
|
|
4546
|
-
function invoke_if(index,a1) {
|
|
4547
|
-
var sp = stackSave();
|
|
4548
|
-
try {
|
|
4549
|
-
return getWasmTableEntry(index)(a1);
|
|
4550
|
-
} catch(e) {
|
|
4551
|
-
stackRestore(sp);
|
|
4552
|
-
if (e !== e+0) throw e;
|
|
4553
|
-
_setThrew(1, 0);
|
|
4554
|
-
}
|
|
4555
|
-
}
|
|
4556
|
-
|
|
4557
|
-
function invoke_iiffii(index,a1,a2,a3,a4,a5) {
|
|
4558
|
-
var sp = stackSave();
|
|
4559
|
-
try {
|
|
4560
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5);
|
|
4561
|
-
} catch(e) {
|
|
4562
|
-
stackRestore(sp);
|
|
4563
|
-
if (e !== e+0) throw e;
|
|
4564
|
-
_setThrew(1, 0);
|
|
4565
|
-
}
|
|
4566
|
-
}
|
|
4567
|
-
|
|
4568
|
-
function invoke_fiifi(index,a1,a2,a3,a4) {
|
|
4569
|
-
var sp = stackSave();
|
|
4570
|
-
try {
|
|
4571
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4572
|
-
} catch(e) {
|
|
4573
|
-
stackRestore(sp);
|
|
4574
|
-
if (e !== e+0) throw e;
|
|
4575
|
-
_setThrew(1, 0);
|
|
4576
|
-
}
|
|
4577
|
-
}
|
|
4578
|
-
|
|
4579
|
-
function invoke_viiji(index,a1,a2,a3,a4) {
|
|
4580
|
-
var sp = stackSave();
|
|
4581
|
-
try {
|
|
4582
|
-
getWasmTableEntry(index)(a1,a2,a3,a4);
|
|
4583
|
-
} catch(e) {
|
|
4584
|
-
stackRestore(sp);
|
|
4585
|
-
if (e !== e+0) throw e;
|
|
4586
|
-
_setThrew(1, 0);
|
|
4587
|
-
}
|
|
4588
|
-
}
|
|
4589
|
-
|
|
4590
|
-
function invoke_iiifiii(index,a1,a2,a3,a4,a5,a6) {
|
|
4591
|
-
var sp = stackSave();
|
|
4592
|
-
try {
|
|
4593
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4594
|
-
} catch(e) {
|
|
4595
|
-
stackRestore(sp);
|
|
4596
|
-
if (e !== e+0) throw e;
|
|
4597
|
-
_setThrew(1, 0);
|
|
4598
|
-
}
|
|
4599
|
-
}
|
|
4600
|
-
|
|
4601
|
-
function invoke_viiiffi(index,a1,a2,a3,a4,a5,a6) {
|
|
4602
|
-
var sp = stackSave();
|
|
4603
|
-
try {
|
|
4604
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4605
|
-
} catch(e) {
|
|
4606
|
-
stackRestore(sp);
|
|
4607
|
-
if (e !== e+0) throw e;
|
|
4608
|
-
_setThrew(1, 0);
|
|
4609
|
-
}
|
|
4610
|
-
}
|
|
4611
|
-
|
|
4612
|
-
function invoke_viiiiifii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
4613
|
-
var sp = stackSave();
|
|
4614
|
-
try {
|
|
4615
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
4616
|
-
} catch(e) {
|
|
4617
|
-
stackRestore(sp);
|
|
4618
|
-
if (e !== e+0) throw e;
|
|
4619
|
-
_setThrew(1, 0);
|
|
4620
|
-
}
|
|
4621
|
-
}
|
|
4622
|
-
|
|
4623
|
-
function invoke_vfffffiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
4624
|
-
var sp = stackSave();
|
|
4625
|
-
try {
|
|
4626
|
-
getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
4627
|
-
} catch(e) {
|
|
4628
|
-
stackRestore(sp);
|
|
4629
|
-
if (e !== e+0) throw e;
|
|
4630
|
-
_setThrew(1, 0);
|
|
4631
|
-
}
|
|
4632
|
-
}
|
|
4633
|
-
|
|
4634
|
-
function invoke_iifiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
|
|
4635
|
-
var sp = stackSave();
|
|
4636
|
-
try {
|
|
4637
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
|
|
4638
|
-
} catch(e) {
|
|
4639
|
-
stackRestore(sp);
|
|
4640
|
-
if (e !== e+0) throw e;
|
|
4641
|
-
_setThrew(1, 0);
|
|
4642
|
-
}
|
|
4643
|
-
}
|
|
4644
|
-
|
|
4645
|
-
function invoke_iiiifii(index,a1,a2,a3,a4,a5,a6) {
|
|
4646
|
-
var sp = stackSave();
|
|
4647
|
-
try {
|
|
4648
|
-
return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
|
|
4649
|
-
} catch(e) {
|
|
4650
|
-
stackRestore(sp);
|
|
4651
|
-
if (e !== e+0) throw e;
|
|
4652
|
-
_setThrew(1, 0);
|
|
4653
|
-
}
|
|
4654
|
-
}
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
// include: postamble.js
|
|
4658
|
-
// === Auto-generated postamble setup entry stuff ===
|
|
4659
|
-
|
|
4660
|
-
function run() {
|
|
4661
|
-
|
|
4662
|
-
preRun();
|
|
4663
|
-
|
|
4664
|
-
function doRun() {
|
|
4665
|
-
// run may have just been called through dependencies being fulfilled just in this very frame,
|
|
4666
|
-
// or while the async setStatus time below was happening
|
|
4667
|
-
Module['calledRun'] = true;
|
|
4668
|
-
|
|
4669
|
-
if (ABORT) return;
|
|
4670
|
-
|
|
4671
|
-
initRuntime();
|
|
4672
|
-
|
|
4673
|
-
readyPromiseResolve?.(Module);
|
|
4674
|
-
Module['onRuntimeInitialized']?.();
|
|
4675
|
-
|
|
4676
|
-
postRun();
|
|
4677
|
-
}
|
|
4678
|
-
|
|
4679
|
-
if (Module['setStatus']) {
|
|
4680
|
-
Module['setStatus']('Running...');
|
|
4681
|
-
setTimeout(() => {
|
|
4682
|
-
setTimeout(() => Module['setStatus'](''), 1);
|
|
4683
|
-
doRun();
|
|
4684
|
-
}, 1);
|
|
4685
|
-
} else
|
|
4686
|
-
{
|
|
4687
|
-
doRun();
|
|
4688
|
-
}
|
|
4689
|
-
}
|
|
4690
|
-
|
|
4691
|
-
var wasmExports;
|
|
4692
|
-
|
|
4693
|
-
// In modularize mode the generated code is within a factory function so we
|
|
4694
|
-
// can use await here (since it's not top-level-await).
|
|
4695
|
-
wasmExports = await (createWasm());
|
|
4696
|
-
|
|
4697
|
-
run();
|
|
4698
|
-
|
|
4699
|
-
// end include: postamble.js
|
|
4700
|
-
|
|
4701
|
-
// include: postamble_modularize.js
|
|
4702
|
-
// In MODULARIZE mode we wrap the generated code in a factory function
|
|
4703
|
-
// and return either the Module itself, or a promise of the module.
|
|
4704
|
-
//
|
|
4705
|
-
// We assign to the `moduleRtn` global here and configure closure to see
|
|
4706
|
-
// this as an extern so it won't get minified.
|
|
4707
|
-
|
|
4708
|
-
if (runtimeInitialized) {
|
|
4709
|
-
moduleRtn = Module;
|
|
4710
|
-
} else {
|
|
4711
|
-
// Set up the promise that indicates the Module is initialized
|
|
4712
|
-
moduleRtn = new Promise((resolve, reject) => {
|
|
4713
|
-
readyPromiseResolve = resolve;
|
|
4714
|
-
readyPromiseReject = reject;
|
|
4715
|
-
});
|
|
4716
|
-
}
|
|
4717
|
-
|
|
4718
|
-
// end include: postamble_modularize.js
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
return moduleRtn;
|
|
4723
|
-
}
|
|
4724
|
-
|
|
4725
|
-
// Export using a UMD style export, or ES6 exports if selected
|
|
4726
|
-
export default createSatoruModule;
|
|
4727
|
-
|
|
1
|
+
async function createSatoruModule(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=!!globalThis.window;var ENVIRONMENT_IS_WORKER=!!globalThis.WorkerGlobalScope;var ENVIRONMENT_IS_NODE=globalThis.process?.versions?.node&&globalThis.process?.type!="renderer";var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{}var out=console.log.bind(console);var err=console.error.bind(console);var wasmBinary;var ABORT=false;var EXITSTATUS;var readyPromiseResolve,readyPromiseReject;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(onPreRuns)}function initRuntime(){runtimeInitialized=true;wasmExports["sc"]()}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("satoru.wasm")}return new URL("satoru.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){var imports={a:wasmImports};return imports}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;assignWasmExports(wasmExports);updateMemoryViews();return wasmExports}function receiveInstantiationResult(result){return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{Module["instantiateWasm"](info,(inst,mod)=>{resolve(receiveInstance(inst,mod))})})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var noExitRuntime=true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var wasmTableMirror=[];var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var ___call_sighandler=(fp,sig)=>getWasmTableEntry(fp)(sig);var exceptionCaught=[];var uncaughtExceptionCount=0;var ___cxa_begin_catch=ptr=>{var info=new ExceptionInfo(ptr);if(!info.get_caught()){info.set_caught(true);uncaughtExceptionCount--}info.set_rethrown(false);exceptionCaught.push(info);return ___cxa_get_exception_ptr(ptr)};var exceptionLast=0;var ___cxa_end_catch=()=>{_setThrew(0,0);var info=exceptionCaught.pop();___cxa_decrement_exception_refcount(info.excPtr);exceptionLast=0};class ExceptionInfo{constructor(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24}set_type(type){HEAPU32[this.ptr+4>>2]=type}get_type(){return HEAPU32[this.ptr+4>>2]}set_destructor(destructor){HEAPU32[this.ptr+8>>2]=destructor}get_destructor(){return HEAPU32[this.ptr+8>>2]}set_caught(caught){caught=caught?1:0;HEAP8[this.ptr+12]=caught}get_caught(){return HEAP8[this.ptr+12]!=0}set_rethrown(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13]=rethrown}get_rethrown(){return HEAP8[this.ptr+13]!=0}init(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)}set_adjusted_ptr(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>2]}}var setTempRet0=val=>__emscripten_tempret_set(val);var findMatchingCatch=args=>{var thrown=exceptionLast;if(!thrown){setTempRet0(0);return 0}var info=new ExceptionInfo(thrown);info.set_adjusted_ptr(thrown);var thrownType=info.get_type();if(!thrownType){setTempRet0(0);return thrown}for(var caughtType of args){if(caughtType===0||caughtType===thrownType){break}var adjusted_ptr_addr=info.ptr+16;if(___cxa_can_catch(caughtType,thrownType,adjusted_ptr_addr)){setTempRet0(caughtType);return thrown}}setTempRet0(thrownType);return thrown};var ___cxa_find_matching_catch_2=()=>findMatchingCatch([]);var ___cxa_find_matching_catch_3=arg0=>findMatchingCatch([arg0]);var ___cxa_find_matching_catch_4=(arg0,arg1)=>findMatchingCatch([arg0,arg1]);var ___cxa_rethrow=()=>{var info=exceptionCaught.pop();if(!info){abort("no exception to throw")}var ptr=info.excPtr;if(!info.get_rethrown()){exceptionCaught.push(info);info.set_rethrown(true);info.set_caught(false);uncaughtExceptionCount++}___cxa_increment_exception_refcount(ptr);exceptionLast=ptr;throw exceptionLast};var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);___cxa_increment_exception_refcount(ptr);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};var ___cxa_uncaught_exceptions=()=>uncaughtExceptionCount;var ___resumeException=ptr=>{if(!exceptionLast){exceptionLast=ptr}throw exceptionLast};var UTF8Decoder=globalThis.TextDecoder&&new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead,ignoreNul):"";var SYSCALLS={varargs:undefined,getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;return 0}var ___syscall_fstat64=(fd,buf)=>{};function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;return 0}var ___syscall_newfstatat=(dirfd,path,buf,flags)=>{};function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs}var __abort_js=()=>abort("");var AsciiToString=ptr=>{var str="";while(1){var ch=HEAPU8[ptr++];if(!ch)return str;str+=String.fromCharCode(ch)}};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};var throwBindingError=message=>{throw new BindingError(message)};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){return sharedRegisterType(rawType,registeredInstance,options)}var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer]:pointer=>HEAPU8[pointer];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];case 8:return signed?pointer=>HEAP64[pointer>>3]:pointer=>HEAPU64[pointer>>3];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{name=AsciiToString(name);const isUnsignedType=minRange===0n;let fromWireType=value=>value;if(isUnsignedType){const bitSize=size*8;fromWireType=value=>BigInt.asUintN(bitSize,value);maxRange=fromWireType(maxRange)}registerType(primitiveType,{name,fromWireType,toWireType:(destructors,value)=>{if(typeof value=="number"){value=BigInt(value)}return value},readValueFromPointer:integerReadValueFromPointer(name,size,!isUnsignedType),destructorFunction:null})};var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=AsciiToString(name);registerType(rawType,{name,fromWireType:function(wt){return!!wt},toWireType:function(destructors,o){return o?trueValue:falseValue},readValueFromPointer:function(pointer){return this.fromWireType(HEAPU8[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var attachFinalizer=handle=>{if(!globalThis.FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var init_ClassHandle=()=>{let proto=ClassHandle.prototype;Object.assign(proto,{isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},isDeleted(){return!this.$$.ptr},deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}});const symbolDispose=Symbol.dispose;if(symbolDispose){proto[symbolDispose]=proto["delete"]}};function ClassHandle(){}var createNamedFunction=(name,func)=>Object.defineProperty(func,"name",{value:name});var registeredPointers={};var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(...args){if(!proto[methodName].overloadTable.hasOwnProperty(args.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${args.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[args.length].apply(this,args)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module[name].overloadTable.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle||!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupported sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this.fromWireType(HEAPU32[pointer>>2])}var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var InternalError=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};var throwInternalError=message=>{throw new InternalError(message)};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record,writable:true}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){this.rawDestructor?.(ptr)},readValueFromPointer:readPointer,fromWireType:RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this.toWireType=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this.toWireType=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this.toWireType=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistent public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var embind__requireFunction=(signature,rawFunction,isAsync=false)=>{signature=AsciiToString(signature);function makeDynCaller(){var rtn=getWasmTableEntry(rawFunction);return rtn}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};class UnboundTypeError extends Error{}var getTypeName=type=>{var ptr=___getTypeName(type);var rv=AsciiToString(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(type=>typeDependencies[type]=dependentTypes);function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;for(let[i,dt]of dependentTypes.entries()){if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}}if(0===unregisteredTypes.length){onComplete(typeConverters)}};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=AsciiToString(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);upcast&&=embind__requireFunction(upcastSignature,upcast);downcast&&=embind__requireFunction(downcastSignature,downcast);rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],base=>{base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(name,function(...args){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError(`Use 'new' to construct ${name}`)}if(undefined===registeredClass.constructor_body){throw new BindingError(`${name} has no accessible constructor`)}var body=registeredClass.constructor_body[args.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${args.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,args)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){registeredClass.baseClass.__derivedClasses??=[];registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var emval_freelist=[];var emval_handles=[0,1,,1,null,1,true,1,false,1];var __emval_decref=handle=>{if(handle>9&&0===--emval_handles[handle+1]){emval_handles[handle]=undefined;emval_freelist.push(handle)}};var Emval={toValue:handle=>{if(!handle){throwBindingError(`Cannot use deleted val. handle = ${handle}`)}return emval_handles[handle]},toHandle:value=>{switch(value){case undefined:return 2;case null:return 4;case true:return 6;case false:return 8;default:{const handle=emval_freelist.pop()||emval_handles.length;emval_handles[handle]=value;emval_handles[handle+1]=1;return handle}}}};var EmValType={name:"emscripten::val",fromWireType:handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},toWireType:(destructors,value)=>Emval.toHandle(value),readValueFromPointer:readPointer,destructorFunction:null};var __embind_register_emval=rawType=>registerType(rawType,EmValType);var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this.fromWireType(HEAPF32[pointer>>2])};case 8:return function(pointer){return this.fromWireType(HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=AsciiToString(name);registerType(rawType,{name,fromWireType:value=>value,toWireType:(destructors,value)=>value,readValueFromPointer:floatReadValueFromPointer(name,size),destructorFunction:null})};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function usesDestructorStack(argTypes){for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){return true}}return false}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=usesDestructorStack(argTypes);var returns=!argTypes[0].isVoid;var expectedArgCount=argCount-2;var argsWired=new Array(expectedArgCount);var invokerFuncArgs=[];var destructors=[];var invokerFn=function(...args){destructors.length=0;var thisWired;invokerFuncArgs.length=isClassMethodFunc?2:1;invokerFuncArgs[0]=cppTargetFunc;if(isClassMethodFunc){thisWired=argTypes[1].toWireType(destructors,this);invokerFuncArgs[1]=thisWired}for(var i=0;i<expectedArgCount;++i){argsWired[i]=argTypes[i+2].toWireType(destructors,args[i]);invokerFuncArgs.push(argsWired[i])}var rv=cppInvokerFunc(...invokerFuncArgs);function onDone(rv){if(needsDestructorStack){runDestructors(destructors)}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;i++){var param=i===1?thisWired:argsWired[i-2];if(argTypes[i].destructorFunction!==null){argTypes[i].destructorFunction(param)}}}if(returns){return argTypes[0].fromWireType(rv)}}return onDone(rv)};return createNamedFunction(humanName,invokerFn)}var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i<count;i++){array.push(HEAPU32[firstElement+i*4>>2])}return array};var getFunctionName=signature=>{signature=signature.trim();const argsIndex=signature.indexOf("(");if(argsIndex===-1)return signature;return signature.slice(0,argsIndex)};var __embind_register_function=(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn,isAsync,isNonnullReturn)=>{var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=AsciiToString(name);name=getFunctionName(name);rawInvoker=embind__requireFunction(signature,rawInvoker,isAsync);exposePublicSymbol(name,function(){throwUnboundTypeError(`Cannot call ${name} due to unbound types`,argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,argTypes=>{var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn,isAsync),argCount-1);return[]})};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=AsciiToString(name);const isUnsignedType=minRange===0;let fromWireType=value=>value;if(isUnsignedType){var bitshift=32-8*size;fromWireType=value=>value<<bitshift>>>bitshift;maxRange=fromWireType(maxRange)}registerType(primitiveType,{name,fromWireType,toWireType:(destructors,value)=>value,readValueFromPointer:integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=AsciiToString(name);registerType(rawType,{name,fromWireType:decodeMemoryView,readValueFromPointer:decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var __embind_register_std_string=(rawType,name)=>{name=AsciiToString(name);var stdStringIsUTF8=true;registerType(rawType,{name,fromWireType(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){str=UTF8ToString(payload,length,true)}else{str="";for(var i=0;i<length;++i){str+=String.fromCharCode(HEAPU8[payload+i])}}_free(value);return str},toWireType(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var length;var valueIsOfTypeString=typeof value=="string";if(!(valueIsOfTypeString||ArrayBuffer.isView(value)&&value.BYTES_PER_ELEMENT==1)){throwBindingError("Cannot pass non-string to std::string")}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value)}else{length=value.length}var base=_malloc(4+length+1);var ptr=base+4;HEAPU32[base>>2]=length;if(valueIsOfTypeString){if(stdStringIsUTF8){stringToUTF8(value,ptr,length+1)}else{for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(base);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}}else{HEAPU8.set(value,ptr)}if(destructors!==null){destructors.push(_free,base)}return base},readValueFromPointer:readPointer,destructorFunction(ptr){_free(ptr)}})};var UTF16Decoder=globalThis.TextDecoder?new TextDecoder("utf-16le"):undefined;var UTF16ToString=(ptr,maxBytesToRead,ignoreNul)=>{var idx=ptr>>1;var endIdx=findStringEnd(HEAPU16,idx,maxBytesToRead/2,ignoreNul);if(endIdx-idx>16&&UTF16Decoder)return UTF16Decoder.decode(HEAPU16.subarray(idx,endIdx));var str="";for(var i=idx;i<endIdx;++i){var codeUnit=HEAPU16[i];str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead,ignoreNul)=>{var str="";var startIdx=ptr>>2;for(var i=0;!(i>=maxBytesToRead/4);i++){var utf32=HEAPU32[startIdx+i];if(!utf32&&!ignoreNul)break;str+=String.fromCodePoint(utf32)}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codePoint=str.codePointAt(i);if(codePoint>65535){i++}HEAP32[outPtr>>2]=codePoint;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i<str.length;++i){var codePoint=str.codePointAt(i);if(codePoint>65535){i++}len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=AsciiToString(name);var decodeString,encodeString,lengthBytesUTF;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16}else{decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32}registerType(rawType,{name,fromWireType:value=>{var length=HEAPU32[value>>2];var str=decodeString(value+4,length*charSize,true);_free(value);return str},toWireType:(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length/charSize;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},readValueFromPointer:readPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=AsciiToString(name);registerType(rawType,{isVoid:true,name,fromWireType:()=>undefined,toWireType:(destructors,o)=>undefined})};var runtimeKeepaliveCounter=0;var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=false;runtimeKeepaliveCounter=0};var __emscripten_throw_longjmp=()=>{throw Infinity};var emval_methodCallers=[];var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(`${humanName} has unknown type ${getTypeName(rawType)}`)}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i<argCount;++i){a[i]=requireRegisteredType(HEAPU32[argTypes+i*4>>2],`parameter ${i}`)}return a};var emval_returnValue=(toReturnWire,destructorsRef,handle)=>{var destructors=[];var result=toReturnWire(destructors,handle);if(destructors.length){HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return AsciiToString(address)}return symbol};var __emval_create_invoker=(argCount,argTypesPtr,kind)=>{var GenericWireTypeSize=8;var[retType,...argTypes]=emval_lookupTypes(argCount,argTypesPtr);var toReturnWire=retType.toWireType.bind(retType);var argFromPtr=argTypes.map(type=>type.readValueFromPointer.bind(type));argCount--;var argN=new Array(argCount);var invokerFunction=(handle,methodName,destructorsRef,args)=>{var offset=0;for(var i=0;i<argCount;++i){argN[i]=argFromPtr[i](args+offset);offset+=GenericWireTypeSize}var rv;switch(kind){case 0:rv=Emval.toValue(handle).apply(null,argN);break;case 2:rv=Reflect.construct(Emval.toValue(handle),argN);break;case 3:rv=argN[0];break;case 1:rv=Emval.toValue(handle)[getStringOrSymbol(methodName)](...argN);break}return emval_returnValue(toReturnWire,destructorsRef,rv)};var functionName=`methodCaller<(${argTypes.map(t=>t.name)}) => ${retType.name}>`;return emval_addMethodCaller(createNamedFunction(functionName,invokerFunction))};var __emval_get_global=name=>{if(!name){return Emval.toHandle(globalThis)}name=getStringOrSymbol(name);return Emval.toHandle(globalThis[name])};var __emval_get_property=(handle,key)=>{handle=Emval.toValue(handle);key=Emval.toValue(key);return Emval.toHandle(handle[key])};var __emval_incref=handle=>{if(handle>9){emval_handles[handle+1]+=1}};var __emval_instanceof=(object,constructor)=>{object=Emval.toValue(object);constructor=Emval.toValue(constructor);return object instanceof constructor};var __emval_invoke=(caller,handle,methodName,destructorsRef,args)=>emval_methodCallers[caller](handle,methodName,destructorsRef,args);var __emval_new_cstring=v=>Emval.toHandle(getStringOrSymbol(v));var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var INT53_MAX=9007199254740992;var INT53_MIN=-9007199254740992;var bigintToI53Checked=num=>num<INT53_MIN||num>INT53_MAX?NaN:Number(num);function __gmtime_js(time,tmPtr){time=bigintToI53Checked(time);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function __mmap_js(len,prot,flags,fd,offset,allocated,addr){offset=bigintToI53Checked(offset);return-52}function __munmap_js(addr,len,prot,flags,fd,offset){offset=bigintToI53Checked(offset)}var timers={};var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var _proc_exit=code=>{EXITSTATUS=code;if(!keepRuntimeAlive()){Module["onExit"]?.(code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=(status,implicit)=>{EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=()=>{if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{return func()}catch(e){handleException(e)}finally{maybeExit()}};var _emscripten_get_now=()=>performance.now();var __setitimer_js=(which,timeout_ms)=>{if(timers[which]){clearTimeout(timers[which].id);delete timers[which]}if(!timeout_ms)return 0;var id=setTimeout(()=>{delete timers[which];callUserCallback(()=>__emscripten_timeout(which,_emscripten_get_now()))},timeout_ms);timers[which]={id,timeout_ms};return 0};var __tzset_js=(timezone,daylight,std_name,dst_name)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset<winterOffset){stringToUTF8(winterName,std_name,17);stringToUTF8(summerName,dst_name,17)}else{stringToUTF8(winterName,dst_name,17);stringToUTF8(summerName,std_name,17)}};var _emscripten_date_now=()=>Date.now();var nowIsMonotonic=1;var checkWasiClock=clock_id=>clock_id>=0&&clock_id<=3;function _clock_time_get(clk_id,ignored_precision,ptime){ignored_precision=bigintToI53Checked(ignored_precision);if(!checkWasiClock(clk_id)){return 28}var now;if(clk_id===0){now=_emscripten_date_now()}else if(nowIsMonotonic){now=_emscripten_get_now()}else{return 52}var nsec=Math.round(now*1e3*1e3);HEAP64[ptime>>3]=BigInt(nsec);return 0}var getHeapMax=()=>2147483648;var _emscripten_get_heap_max=()=>getHeapMax();var alignMemory=(size,alignment)=>Math.ceil(size/alignment)*alignment;var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var _environ_get=(__environ,environ_buf)=>{var bufSize=0;var envp=0;for(var string of getEnvStrings()){var ptr=environ_buf+bufSize;HEAPU32[__environ+envp>>2]=ptr;bufSize+=stringToUTF8(string,ptr,Infinity)+1;envp+=4}return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;for(var string of strings){bufSize+=lengthBytesUTF8(string)+1}HEAPU32[penviron_buf_size>>2]=bufSize;return 0};var _fd_close=fd=>52;function _fd_pread(fd,iov,iovcnt,offset,pnum){offset=bigintToI53Checked(offset);return 52}var _fd_read=(fd,iov,iovcnt,pnum)=>52;function _fd_seek(fd,offset,whence,newOffset){offset=bigintToI53Checked(offset);return 70}var printCharBuffers=[null,[],[]];var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};var _llvm_eh_typeid_for=type=>type;init_ClassHandle();init_RegisteredPointer();{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}}function satoru_log_js(level,message){if(Module.onLog){try{Module.onLog(level,UTF8ToString(message))}catch(e){}}}var ___getTypeName,_create_instance,_destroy_instance,_malloc,_free,__emscripten_timeout,_setThrew,__emscripten_tempret_set,__emscripten_stack_restore,_emscripten_stack_get_current,___cxa_decrement_exception_refcount,___cxa_increment_exception_refcount,___cxa_can_catch,___cxa_get_exception_ptr,memory,__indirect_function_table,wasmMemory,wasmTable;function assignWasmExports(wasmExports){___getTypeName=wasmExports["tc"];_create_instance=Module["_create_instance"]=wasmExports["uc"];_destroy_instance=Module["_destroy_instance"]=wasmExports["vc"];_malloc=wasmExports["wc"];_free=wasmExports["xc"];__emscripten_timeout=wasmExports["zc"];_setThrew=wasmExports["Ac"];__emscripten_tempret_set=wasmExports["Bc"];__emscripten_stack_restore=wasmExports["Cc"];_emscripten_stack_get_current=wasmExports["Dc"];___cxa_decrement_exception_refcount=wasmExports["Ec"];___cxa_increment_exception_refcount=wasmExports["Fc"];___cxa_can_catch=wasmExports["Gc"];___cxa_get_exception_ptr=wasmExports["Hc"];memory=wasmMemory=wasmExports["rc"];__indirect_function_table=wasmTable=wasmExports["yc"]}var wasmImports={ub:___call_sighandler,H:___cxa_begin_catch,O:___cxa_end_catch,a:___cxa_find_matching_catch_2,k:___cxa_find_matching_catch_3,ha:___cxa_find_matching_catch_4,Ya:___cxa_rethrow,m:___cxa_throw,yb:___cxa_uncaught_exceptions,c:___resumeException,Ea:___syscall_fcntl64,Lb:___syscall_fstat64,Ob:___syscall_ioctl,Kb:___syscall_newfstatat,Ta:___syscall_openat,Mb:__abort_js,_a:__embind_register_bigint,jc:__embind_register_bool,qc:__embind_register_class,Zb:__embind_register_emval,Za:__embind_register_float,M:__embind_register_function,X:__embind_register_integer,L:__embind_register_memory_view,fc:__embind_register_std_string,Ha:__embind_register_std_wstring,mc:__embind_register_void,wb:__emscripten_runtime_keepalive_clear,Ab:__emscripten_throw_longjmp,W:__emval_create_invoker,Sb:__emval_decref,qb:__emval_get_global,Rb:__emval_get_property,Sa:__emval_incref,Pb:__emval_instanceof,V:__emval_invoke,sb:__emval_new_cstring,tb:__emval_run_destructors,Gb:__gmtime_js,Eb:__mmap_js,Fb:__munmap_js,xb:__setitimer_js,Nb:__tzset_js,zb:_clock_time_get,Ua:_emscripten_date_now,Cb:_emscripten_get_heap_max,Bb:_emscripten_resize_heap,Ib:_environ_get,Jb:_environ_sizes_get,Xa:_exit,Da:_fd_close,Db:_fd_pread,Wa:_fd_read,Hb:_fd_seek,Va:_fd_write,$a:invoke_diii,Ca:invoke_diiiii,ob:invoke_diiiiiiiiiiiiiii,x:invoke_fi,R:invoke_fif,mb:invoke_fifff,ia:invoke_fifi,U:invoke_fii,Xb:invoke_fiifi,nb:invoke_fiifii,G:invoke_fiii,F:invoke_fiiif,aa:invoke_fiiiii,u:invoke_i,Fa:invoke_iffff,f:invoke_ii,ya:invoke_iid,_:invoke_iidi,t:invoke_iif,z:invoke_iiff,Qa:invoke_iiffff,Pa:invoke_iifffi,pa:invoke_iiffi,da:invoke_iiffii,lb:invoke_iifi,Ma:invoke_iifii,cb:invoke_iifiiiiii,b:invoke_iii,ba:invoke_iiif,ka:invoke_iiiff,dc:invoke_iiifff,oa:invoke_iiiffi,ca:invoke_iiifi,B:invoke_iiifii,Wb:invoke_iiifiii,g:invoke_iiii,eb:invoke_iiiiddddi,$:invoke_iiiif,bb:invoke_iiiifii,j:invoke_iiiii,Tb:invoke_iiiiid,n:invoke_iiiiii,S:invoke_iiiiiif,q:invoke_iiiiiii,E:invoke_iiiiiiii,Q:invoke_iiiiiiiii,ja:invoke_iiiiiiiiii,hb:invoke_iiiiiiiiiii,va:invoke_iiiiiiiiiiii,ab:invoke_iiiiij,db:invoke_iiji,Ub:invoke_j,wa:invoke_jiiii,o:invoke_v,Yb:invoke_vffffffi,ea:invoke_vffi,A:invoke_vfi,Ga:invoke_vfii,gc:invoke_vfiiiii,i:invoke_vi,s:invoke_vif,C:invoke_viff,ma:invoke_vifff,ta:invoke_viffff,$b:invoke_viffffi,xa:invoke_viffffiiif,Aa:invoke_viffffiiii,ec:invoke_vifffi,ib:invoke_viffifi,J:invoke_viffii,Ra:invoke_viffiii,nc:invoke_vifi,d:invoke_vii,D:invoke_viid,Na:invoke_viidd,_b:invoke_viidii,y:invoke_viif,Z:invoke_viiff,za:invoke_viiffffi,Y:invoke_viiffffiii,P:invoke_viiffi,I:invoke_viiffii,ga:invoke_viiffiii,qa:invoke_viiffiiii,N:invoke_viifi,ac:invoke_viifif,Ka:invoke_viififii,la:invoke_viifii,gb:invoke_viifiiiiii,e:invoke_viii,K:invoke_viiid,w:invoke_viiif,Oa:invoke_viiifffi,jb:invoke_viiifffii,ic:invoke_viiiffifffii,hc:invoke_viiiffiffii,La:invoke_viiiffii,kb:invoke_viiifiii,h:invoke_viiii,pc:invoke_viiiidi,sa:invoke_viiiif,oc:invoke_viiiiffii,l:invoke_viiiii,pb:invoke_viiiiidi,Ia:invoke_viiiiif,Vb:invoke_viiiiifii,r:invoke_viiiiii,p:invoke_viiiiiii,lc:invoke_viiiiiiifi,Ja:invoke_viiiiiiifii,v:invoke_viiiiiiii,T:invoke_viiiiiiiii,ra:invoke_viiiiiiiiifi,fa:invoke_viiiiiiiiii,kc:invoke_viiiiiiiiiifi,rb:invoke_viiiiiiiiiifiiiiii,na:invoke_viiiiiiiiiii,ua:invoke_viiiiiiiiiiiiiii,fb:invoke_vij,bc:invoke_viji,cc:invoke_vj,Ba:_llvm_eh_typeid_for,vb:_proc_exit,Qb:satoru_log_js};function invoke_viiii(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vii(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_ii(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vi(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_v(index){var sp=stackSave();try{getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fi(index,a1){var sp=stackSave();try{return getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_diiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fifi(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiff(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vif(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiifi(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiif(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fii(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiiiii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiifiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifi(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viff(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffff(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiffff(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fif(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viif(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiff(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiif(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffffiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iifffi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiidi(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_diiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiidi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiifffi(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viidd(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiffii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iif(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiffi(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iifii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiifii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiiif(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiif(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiifii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fifff(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifi(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffffi(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiffffiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iifi(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiifi(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_i(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiid(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiifiii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiifffii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiffifffii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiffii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiffiffii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffifi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viififii(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiif(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viid(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vfiiiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiifii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiif(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifffi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiifff(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiff(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiffi(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vj(index,a1){var sp=stackSave();try{getWasmTableEntry(index)(a1)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viji(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vij(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viifif(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffffi(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vifff(index,a1,a2,a3,a4){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiddddi(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iidi(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iid(index,a1,a2){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viidii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiji(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiif(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vffi(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vfi(index,a1,a2){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vfii(index,a1,a2,a3){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viffffiiif(index,a1,a2,a3,a4,a5,a6,a7,a8,a9){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iffff(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_vffffffi(index,a1,a2,a3,a4,a5,a6,a7){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiffii(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_fiifi(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiifiii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiifii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iifiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiifii(index,a1,a2,a3,a4,a5,a6){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_j(index){var sp=stackSave();try{return getWasmTableEntry(index)()}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0);return 0n}}function invoke_iiiiij(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiid(index,a1,a2,a3,a4,a5){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_jiiii(index,a1,a2,a3,a4){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0);return 0n}}function invoke_diii(index,a1,a2,a3){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){var sp=stackSave();try{return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15){var sp=stackSave();try{getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}catch(e){stackRestore(sp);if(e!==e+0)throw e;_setThrew(1,0)}}function run(){preRun();function doRun(){Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}}var wasmExports;wasmExports=await (createWasm());run();if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}
|
|
2
|
+
;return moduleRtn}export default createSatoruModule;
|