@keymanapp/kmc-kmn 18.0.29-alpha-local → 18.0.31-alpha

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.
Files changed (32) hide show
  1. package/build/src/compiler/compiler.js +4 -1
  2. package/build/src/compiler/compiler.js.map +1 -1
  3. package/build/src/compiler/kmn-compiler-messages.js +4 -1
  4. package/build/src/compiler/kmn-compiler-messages.js.map +1 -1
  5. package/build/src/compiler/osk.js +4 -1
  6. package/build/src/compiler/osk.js.map +1 -1
  7. package/build/src/import/kmcmplib/wasm-host.d.ts +1 -1
  8. package/build/src/import/kmcmplib/wasm-host.d.ts.map +1 -1
  9. package/build/src/import/kmcmplib/wasm-host.js +1022 -903
  10. package/build/src/import/kmcmplib/wasm-host.js.map +1 -1
  11. package/build/src/import/kmcmplib/wasm-host.wasm +0 -0
  12. package/build/src/kmw-compiler/compiler-globals.js +4 -1
  13. package/build/src/kmw-compiler/compiler-globals.js.map +1 -1
  14. package/build/src/kmw-compiler/constants.js +4 -1
  15. package/build/src/kmw-compiler/constants.js.map +1 -1
  16. package/build/src/kmw-compiler/javascript-strings.js +4 -1
  17. package/build/src/kmw-compiler/javascript-strings.js.map +1 -1
  18. package/build/src/kmw-compiler/keymanweb-key-codes.js +4 -1
  19. package/build/src/kmw-compiler/keymanweb-key-codes.js.map +1 -1
  20. package/build/src/kmw-compiler/kmw-compiler-messages.js +4 -1
  21. package/build/src/kmw-compiler/kmw-compiler-messages.js.map +1 -1
  22. package/build/src/kmw-compiler/kmw-compiler.js +4 -1
  23. package/build/src/kmw-compiler/kmw-compiler.js.map +1 -1
  24. package/build/src/kmw-compiler/util.js +4 -1
  25. package/build/src/kmw-compiler/util.js.map +1 -1
  26. package/build/src/kmw-compiler/validate-layout-file.js +4 -1
  27. package/build/src/kmw-compiler/validate-layout-file.js.map +1 -1
  28. package/build/src/kmw-compiler/visual-keyboard-compiler.js +4 -1
  29. package/build/src/kmw-compiler/visual-keyboard-compiler.js.map +1 -1
  30. package/build/src/main.js +4 -1
  31. package/build/src/main.js.map +1 -1
  32. package/package.json +5 -5
@@ -1,6 +1,8 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c211f816-44aa-5eab-8f12-fbd1b87e723f")}catch(e){}}();
1
3
  var Module = (() => {
2
4
  var _scriptDir = import.meta.url;
3
- return (async function (moduleArg = {}) {
5
+ return (async function (Module = {}) {
4
6
  // include: shell.js
5
7
  // The Module object: Our interface to the outside world. We import
6
8
  // and export values on it. There are various ways Module can be used:
@@ -15,10 +17,10 @@ var Module = (() => {
15
17
  // after the generated code, you will need to define var Module = {};
16
18
  // before the code. Then that object will be used in the code, and you
17
19
  // can continue to use Module afterwards as well.
18
- var Module = moduleArg;
20
+ var Module = typeof Module != 'undefined' ? Module : {};
19
21
  // Set up the promise that indicates the Module is initialized
20
22
  var readyPromiseResolve, readyPromiseReject;
21
- Module['ready'] = new Promise((resolve, reject) => {
23
+ Module['ready'] = new Promise(function (resolve, reject) {
22
24
  readyPromiseResolve = resolve;
23
25
  readyPromiseReject = reject;
24
26
  });
@@ -53,7 +55,7 @@ var Module = (() => {
53
55
  return scriptDirectory + path;
54
56
  }
55
57
  // Hooks that are implemented differently in different runtime environments.
56
- var read_, readAsync, readBinary;
58
+ var read_, readAsync, readBinary, setWindowTitle;
57
59
  if (ENVIRONMENT_IS_NODE) {
58
60
  // `require()` is no-op in an ESM module, use `createRequire()` to construct
59
61
  // the require()` function. This is only necessary for multi-environment
@@ -89,27 +91,42 @@ var Module = (() => {
89
91
  }
90
92
  return ret;
91
93
  };
92
- readAsync = (filename, onload, onerror, binary = true) => {
94
+ readAsync = (filename, onload, onerror) => {
93
95
  // See the comment in the `read_` function.
94
96
  filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
95
- fs.readFile(filename, binary ? undefined : 'utf8', (err, data) => {
97
+ fs.readFile(filename, function (err, data) {
96
98
  if (err)
97
99
  onerror(err);
98
100
  else
99
- onload(binary ? data.buffer : data);
101
+ onload(data.buffer);
100
102
  });
101
103
  };
102
104
  // end include: node_shell_read.js
103
- if (!Module['thisProgram'] && process.argv.length > 1) {
105
+ if (process.argv.length > 1) {
104
106
  thisProgram = process.argv[1].replace(/\\/g, '/');
105
107
  }
106
108
  arguments_ = process.argv.slice(2);
107
109
  // MODULARIZE will export the module in the proper place outside, we don't need to export here
110
+ process.on('uncaughtException', function (ex) {
111
+ // suppress ExitStatus exceptions from showing an error
112
+ if (ex !== 'unwind' && !(ex instanceof ExitStatus) && !(ex.context instanceof ExitStatus)) {
113
+ throw ex;
114
+ }
115
+ });
116
+ // Without this older versions of node (< v15) will log unhandled rejections
117
+ // but return 0, which is not normally the desired behaviour. This is
118
+ // not be needed with node v15 and about because it is now the default
119
+ // behaviour:
120
+ // See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
121
+ var nodeMajor = process.versions.node.split(".")[0];
122
+ if (nodeMajor < 15) {
123
+ process.on('unhandledRejection', function (reason) { throw reason; });
124
+ }
108
125
  quit_ = (status, toThrow) => {
109
126
  process.exitCode = status;
110
127
  throw toThrow;
111
128
  };
112
- Module['inspect'] = () => '[Emscripten Module object]';
129
+ Module['inspect'] = function () { return '[Emscripten Module object]'; };
113
130
  }
114
131
  else
115
132
  // Note that this includes Node.js workers when relevant (pthreads is enabled).
@@ -174,11 +191,12 @@ var Module = (() => {
174
191
  };
175
192
  // end include: web_or_worker_shell_read.js
176
193
  }
194
+ setWindowTitle = (title) => document.title = title;
177
195
  }
178
196
  else {
179
197
  }
180
198
  var out = Module['print'] || console.log.bind(console);
181
- var err = Module['printErr'] || console.error.bind(console);
199
+ var err = Module['printErr'] || console.warn.bind(console);
182
200
  // Merge back in the overrides
183
201
  Object.assign(Module, moduleOverrides);
184
202
  // Free the object hierarchy contained in the overrides, this lets the GC
@@ -233,6 +251,202 @@ var Module = (() => {
233
251
  abort(text);
234
252
  }
235
253
  }
254
+ // include: runtime_strings.js
255
+ // runtime_strings.js: String related runtime functions that are part of both
256
+ // MINIMAL_RUNTIME and regular runtime.
257
+ var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
258
+ /**
259
+ * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
260
+ * array that contains uint8 values, returns a copy of that string as a
261
+ * Javascript String object.
262
+ * heapOrArray is either a regular array, or a JavaScript typed array view.
263
+ * @param {number} idx
264
+ * @param {number=} maxBytesToRead
265
+ * @return {string}
266
+ */
267
+ function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
268
+ var endIdx = idx + maxBytesToRead;
269
+ var endPtr = idx;
270
+ // TextDecoder needs to know the byte length in advance, it doesn't stop on
271
+ // null terminator by itself. Also, use the length info to avoid running tiny
272
+ // strings through TextDecoder, since .subarray() allocates garbage.
273
+ // (As a tiny code save trick, compare endPtr against endIdx using a negation,
274
+ // so that undefined means Infinity)
275
+ while (heapOrArray[endPtr] && !(endPtr >= endIdx))
276
+ ++endPtr;
277
+ if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
278
+ return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
279
+ }
280
+ var str = '';
281
+ // If building with TextDecoder, we have already computed the string length
282
+ // above, so test loop end condition against that
283
+ while (idx < endPtr) {
284
+ // For UTF8 byte structure, see:
285
+ // http://en.wikipedia.org/wiki/UTF-8#Description
286
+ // https://www.ietf.org/rfc/rfc2279.txt
287
+ // https://tools.ietf.org/html/rfc3629
288
+ var u0 = heapOrArray[idx++];
289
+ if (!(u0 & 0x80)) {
290
+ str += String.fromCharCode(u0);
291
+ continue;
292
+ }
293
+ var u1 = heapOrArray[idx++] & 63;
294
+ if ((u0 & 0xE0) == 0xC0) {
295
+ str += String.fromCharCode(((u0 & 31) << 6) | u1);
296
+ continue;
297
+ }
298
+ var u2 = heapOrArray[idx++] & 63;
299
+ if ((u0 & 0xF0) == 0xE0) {
300
+ u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
301
+ }
302
+ else {
303
+ u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
304
+ }
305
+ if (u0 < 0x10000) {
306
+ str += String.fromCharCode(u0);
307
+ }
308
+ else {
309
+ var ch = u0 - 0x10000;
310
+ str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
311
+ }
312
+ }
313
+ return str;
314
+ }
315
+ /**
316
+ * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
317
+ * emscripten HEAP, returns a copy of that string as a Javascript String object.
318
+ *
319
+ * @param {number} ptr
320
+ * @param {number=} maxBytesToRead - An optional length that specifies the
321
+ * maximum number of bytes to read. You can omit this parameter to scan the
322
+ * string until the first \0 byte. If maxBytesToRead is passed, and the string
323
+ * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
324
+ * string will cut short at that byte index (i.e. maxBytesToRead will not
325
+ * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing
326
+ * frequent uses of UTF8ToString() with and without maxBytesToRead may throw
327
+ * JS JIT optimizations off, so it is worth to consider consistently using one
328
+ * @return {string}
329
+ */
330
+ function UTF8ToString(ptr, maxBytesToRead) {
331
+ return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
332
+ }
333
+ /**
334
+ * Copies the given Javascript String object 'str' to the given byte array at
335
+ * address 'outIdx', encoded in UTF8 form and null-terminated. The copy will
336
+ * require at most str.length*4+1 bytes of space in the HEAP. Use the function
337
+ * lengthBytesUTF8 to compute the exact number of bytes (excluding null
338
+ * terminator) that this function will write.
339
+ *
340
+ * @param {string} str - The Javascript string to copy.
341
+ * @param {ArrayBufferView|Array<number>} heap - The array to copy to. Each
342
+ * index in this array is assumed
343
+ * to be one 8-byte element.
344
+ * @param {number} outIdx - The starting offset in the array to begin the copying.
345
+ * @param {number} maxBytesToWrite - The maximum number of bytes this function
346
+ * can write to the array. This count should
347
+ * include the null terminator, i.e. if
348
+ * maxBytesToWrite=1, only the null terminator
349
+ * will be written and nothing else.
350
+ * maxBytesToWrite=0 does not write any bytes
351
+ * to the output, not even the null
352
+ * terminator.
353
+ * @return {number} The number of bytes written, EXCLUDING the null terminator.
354
+ */
355
+ function stringToUTF8Array(str, heap, outIdx, maxBytesToWrite) {
356
+ // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
357
+ // undefined and false each don't write out any bytes.
358
+ if (!(maxBytesToWrite > 0))
359
+ return 0;
360
+ var startIdx = outIdx;
361
+ var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
362
+ for (var i = 0; i < str.length; ++i) {
363
+ // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
364
+ // unit, not a Unicode code point of the character! So decode
365
+ // UTF16->UTF32->UTF8.
366
+ // See http://unicode.org/faq/utf_bom.html#utf16-3
367
+ // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description
368
+ // and https://www.ietf.org/rfc/rfc2279.txt
369
+ // and https://tools.ietf.org/html/rfc3629
370
+ var u = str.charCodeAt(i); // possibly a lead surrogate
371
+ if (u >= 0xD800 && u <= 0xDFFF) {
372
+ var u1 = str.charCodeAt(++i);
373
+ u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
374
+ }
375
+ if (u <= 0x7F) {
376
+ if (outIdx >= endIdx)
377
+ break;
378
+ heap[outIdx++] = u;
379
+ }
380
+ else if (u <= 0x7FF) {
381
+ if (outIdx + 1 >= endIdx)
382
+ break;
383
+ heap[outIdx++] = 0xC0 | (u >> 6);
384
+ heap[outIdx++] = 0x80 | (u & 63);
385
+ }
386
+ else if (u <= 0xFFFF) {
387
+ if (outIdx + 2 >= endIdx)
388
+ break;
389
+ heap[outIdx++] = 0xE0 | (u >> 12);
390
+ heap[outIdx++] = 0x80 | ((u >> 6) & 63);
391
+ heap[outIdx++] = 0x80 | (u & 63);
392
+ }
393
+ else {
394
+ if (outIdx + 3 >= endIdx)
395
+ break;
396
+ heap[outIdx++] = 0xF0 | (u >> 18);
397
+ heap[outIdx++] = 0x80 | ((u >> 12) & 63);
398
+ heap[outIdx++] = 0x80 | ((u >> 6) & 63);
399
+ heap[outIdx++] = 0x80 | (u & 63);
400
+ }
401
+ }
402
+ // Null-terminate the pointer to the buffer.
403
+ heap[outIdx] = 0;
404
+ return outIdx - startIdx;
405
+ }
406
+ /**
407
+ * Copies the given Javascript String object 'str' to the emscripten HEAP at
408
+ * address 'outPtr', null-terminated and encoded in UTF8 form. The copy will
409
+ * require at most str.length*4+1 bytes of space in the HEAP.
410
+ * Use the function lengthBytesUTF8 to compute the exact number of bytes
411
+ * (excluding null terminator) that this function will write.
412
+ *
413
+ * @return {number} The number of bytes written, EXCLUDING the null terminator.
414
+ */
415
+ function stringToUTF8(str, outPtr, maxBytesToWrite) {
416
+ return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
417
+ }
418
+ /**
419
+ * Returns the number of bytes the given Javascript string takes if encoded as a
420
+ * UTF8 byte array, EXCLUDING the null terminator byte.
421
+ *
422
+ * @param {string} str - JavaScript string to operator on
423
+ * @return {number} Length, in bytes, of the UTF8 encoded string.
424
+ */
425
+ function lengthBytesUTF8(str) {
426
+ var len = 0;
427
+ for (var i = 0; i < str.length; ++i) {
428
+ // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
429
+ // unit, not a Unicode code point of the character! So decode
430
+ // UTF16->UTF32->UTF8.
431
+ // See http://unicode.org/faq/utf_bom.html#utf16-3
432
+ var c = str.charCodeAt(i); // possibly a lead surrogate
433
+ if (c <= 0x7F) {
434
+ len++;
435
+ }
436
+ else if (c <= 0x7FF) {
437
+ len += 2;
438
+ }
439
+ else if (c >= 0xD800 && c <= 0xDFFF) {
440
+ len += 4;
441
+ ++i;
442
+ }
443
+ else {
444
+ len += 3;
445
+ }
446
+ }
447
+ return len;
448
+ }
449
+ // end include: runtime_strings.js
236
450
  // Memory management
237
451
  var HEAP,
238
452
  /** @type {!Int8Array} */
@@ -255,13 +469,19 @@ var Module = (() => {
255
469
  var b = wasmMemory.buffer;
256
470
  Module['HEAP8'] = HEAP8 = new Int8Array(b);
257
471
  Module['HEAP16'] = HEAP16 = new Int16Array(b);
472
+ Module['HEAP32'] = HEAP32 = new Int32Array(b);
258
473
  Module['HEAPU8'] = HEAPU8 = new Uint8Array(b);
259
474
  Module['HEAPU16'] = HEAPU16 = new Uint16Array(b);
260
- Module['HEAP32'] = HEAP32 = new Int32Array(b);
261
475
  Module['HEAPU32'] = HEAPU32 = new Uint32Array(b);
262
476
  Module['HEAPF32'] = HEAPF32 = new Float32Array(b);
263
477
  Module['HEAPF64'] = HEAPF64 = new Float64Array(b);
264
478
  }
479
+ // include: runtime_init_table.js
480
+ // In regular non-RELOCATABLE mode the table is exported
481
+ // from the wasm module and this will be assigned once
482
+ // the exports are available.
483
+ var wasmTable;
484
+ // end include: runtime_init_table.js
265
485
  // include: runtime_stack_check.js
266
486
  // end include: runtime_stack_check.js
267
487
  // include: runtime_assertions.js
@@ -378,7 +598,7 @@ var Module = (() => {
378
598
  // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
379
599
  // See above, in the meantime, we resort to wasm code for trapping.
380
600
  //
381
- // In case abort() is called before the module is initialized, wasmExports
601
+ // In case abort() is called before the module is initialized, Module['asm']
382
602
  // and its exported '__trap' function is not available, in which case we throw
383
603
  // a RuntimeError.
384
604
  //
@@ -425,49 +645,57 @@ var Module = (() => {
425
645
  // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
426
646
  wasmBinaryFile = new URL('wasm-host.wasm', import.meta.url).href;
427
647
  }
428
- function getBinarySync(file) {
429
- if (file == wasmBinaryFile && wasmBinary) {
430
- return new Uint8Array(wasmBinary);
648
+ function getBinary(file) {
649
+ try {
650
+ if (file == wasmBinaryFile && wasmBinary) {
651
+ return new Uint8Array(wasmBinary);
652
+ }
653
+ if (readBinary) {
654
+ return readBinary(file);
655
+ }
656
+ throw "both async and sync fetching of the wasm failed";
431
657
  }
432
- if (readBinary) {
433
- return readBinary(file);
658
+ catch (err) {
659
+ abort(err);
434
660
  }
435
- throw "both async and sync fetching of the wasm failed";
436
661
  }
437
662
  function getBinaryPromise(binaryFile) {
438
- // If we don't have the binary yet, try to load it asynchronously.
663
+ // If we don't have the binary yet, try to to load it asynchronously.
439
664
  // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.
440
665
  // See https://github.com/github/fetch/pull/92#issuecomment-140665932
441
666
  // Cordova or Electron apps are typically loaded from a file:// url.
442
667
  // So use fetch if it is available and the url is not a file, otherwise fall back to XHR.
443
- if (!wasmBinary
444
- && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
668
+ if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
445
669
  if (typeof fetch == 'function'
446
670
  && !isFileURI(binaryFile)) {
447
- return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
671
+ return fetch(binaryFile, { credentials: 'same-origin' }).then(function (response) {
448
672
  if (!response['ok']) {
449
673
  throw "failed to load wasm binary file at '" + binaryFile + "'";
450
674
  }
451
675
  return response['arrayBuffer']();
452
- }).catch(() => getBinarySync(binaryFile));
453
- }
454
- else if (readAsync) {
455
- // fetch is not available or url is file => try XHR (readAsync uses XHR internally)
456
- return new Promise((resolve, reject) => {
457
- readAsync(binaryFile, (response) => resolve(new Uint8Array(/** @type{!ArrayBuffer} */ (response))), reject);
676
+ }).catch(function () {
677
+ return getBinary(binaryFile);
458
678
  });
459
679
  }
680
+ else {
681
+ if (readAsync) {
682
+ // fetch is not available or url is file => try XHR (readAsync uses XHR internally)
683
+ return new Promise(function (resolve, reject) {
684
+ readAsync(binaryFile, function (response) { resolve(new Uint8Array(/** @type{!ArrayBuffer} */ (response))); }, reject);
685
+ });
686
+ }
687
+ }
460
688
  }
461
- // Otherwise, getBinarySync should be able to get it synchronously
462
- return Promise.resolve().then(() => getBinarySync(binaryFile));
689
+ // Otherwise, getBinary should be able to get it synchronously
690
+ return Promise.resolve().then(function () { return getBinary(binaryFile); });
463
691
  }
464
692
  function instantiateArrayBuffer(binaryFile, imports, receiver) {
465
- return getBinaryPromise(binaryFile).then((binary) => {
693
+ return getBinaryPromise(binaryFile).then(function (binary) {
466
694
  return WebAssembly.instantiate(binary, imports);
467
- }).then((instance) => {
695
+ }).then(function (instance) {
468
696
  return instance;
469
- }).then(receiver, (reason) => {
470
- err(`failed to asynchronously prepare wasm: ${reason}`);
697
+ }).then(receiver, function (reason) {
698
+ err('failed to asynchronously prepare wasm: ' + reason);
471
699
  abort(reason);
472
700
  });
473
701
  }
@@ -485,7 +713,7 @@ var Module = (() => {
485
713
  // https://github.com/emscripten-core/emscripten/pull/16917
486
714
  !ENVIRONMENT_IS_NODE &&
487
715
  typeof fetch == 'function') {
488
- return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
716
+ return fetch(binaryFile, { credentials: 'same-origin' }).then(function (response) {
489
717
  // Suppress closure warning here since the upstream definition for
490
718
  // instantiateStreaming only allows Promise<Repsponse> rather than
491
719
  // an actual Response.
@@ -495,13 +723,15 @@ var Module = (() => {
495
723
  return result.then(callback, function (reason) {
496
724
  // We expect the most common failure cause to be a bad MIME type for the binary,
497
725
  // in which case falling back to ArrayBuffer instantiation should work.
498
- err(`wasm streaming compile failed: ${reason}`);
726
+ err('wasm streaming compile failed: ' + reason);
499
727
  err('falling back to ArrayBuffer instantiation');
500
728
  return instantiateArrayBuffer(binaryFile, imports, callback);
501
729
  });
502
730
  });
503
731
  }
504
- return instantiateArrayBuffer(binaryFile, imports, callback);
732
+ else {
733
+ return instantiateArrayBuffer(binaryFile, imports, callback);
734
+ }
505
735
  }
506
736
  // Create the wasm instance.
507
737
  // Receives the wasm imports, returns the exports.
@@ -516,14 +746,14 @@ var Module = (() => {
516
746
  // performing other necessary setup
517
747
  /** @param {WebAssembly.Module=} module*/
518
748
  function receiveInstance(instance, module) {
519
- wasmExports = instance.exports;
520
- Module['wasmExports'] = wasmExports;
521
- wasmMemory = wasmExports['memory'];
749
+ var exports = instance.exports;
750
+ Module['asm'] = exports;
751
+ wasmMemory = Module['asm']['memory'];
522
752
  updateMemoryViews();
523
- wasmTable = wasmExports['__indirect_function_table'];
524
- addOnInit(wasmExports['__wasm_call_ctors']);
753
+ wasmTable = Module['asm']['__indirect_function_table'];
754
+ addOnInit(Module['asm']['__wasm_call_ctors']);
525
755
  removeRunDependency('wasm-instantiate');
526
- return wasmExports;
756
+ return exports;
527
757
  }
528
758
  // wait for the pthread pool (if any)
529
759
  addRunDependency('wasm-instantiate');
@@ -532,21 +762,19 @@ var Module = (() => {
532
762
  // 'result' is a ResultObject object which has both the module and instance.
533
763
  // receiveInstance() will swap in the exports (to Module.asm) so they can be called
534
764
  // 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.
535
- // When the regression is fixed, can restore the above PTHREADS-enabled path.
765
+ // When the regression is fixed, can restore the above USE_PTHREADS-enabled path.
536
766
  receiveInstance(result['instance']);
537
767
  }
538
768
  // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
539
- // to manually instantiate the Wasm module themselves. This allows pages to
540
- // run the instantiation parallel to any other async startup actions they are
541
- // performing.
542
- // Also pthreads and wasm workers initialize the wasm instance through this
543
- // path.
769
+ // to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel
770
+ // to any other async startup actions they are performing.
771
+ // Also pthreads and wasm workers initialize the wasm instance through this path.
544
772
  if (Module['instantiateWasm']) {
545
773
  try {
546
774
  return Module['instantiateWasm'](info, receiveInstance);
547
775
  }
548
776
  catch (e) {
549
- err(`Module.instantiateWasm callback failed with error: ${e}`);
777
+ err('Module.instantiateWasm callback failed with error: ' + e);
550
778
  // If instantiation fails, reject the module ready promise.
551
779
  readyPromiseReject(e);
552
780
  }
@@ -583,15 +811,15 @@ var Module = (() => {
583
811
  /** @constructor */
584
812
  function ExitStatus(status) {
585
813
  this.name = 'ExitStatus';
586
- this.message = `Program terminated with exit(${status})`;
814
+ this.message = 'Program terminated with exit(' + status + ')';
587
815
  this.status = status;
588
816
  }
589
- var callRuntimeCallbacks = (callbacks) => {
817
+ function callRuntimeCallbacks(callbacks) {
590
818
  while (callbacks.length > 0) {
591
819
  // Pass the module as the first argument.
592
820
  callbacks.shift()(Module);
593
821
  }
594
- };
822
+ }
595
823
  /**
596
824
  * @param {number} ptr
597
825
  * @param {string} type
@@ -604,11 +832,11 @@ var Module = (() => {
604
832
  case 'i8': return HEAP8[((ptr) >> 0)];
605
833
  case 'i16': return HEAP16[((ptr) >> 1)];
606
834
  case 'i32': return HEAP32[((ptr) >> 2)];
607
- case 'i64': abort('to do getValue(i64) use WASM_BIGINT');
835
+ case 'i64': return HEAP32[((ptr) >> 2)];
608
836
  case 'float': return HEAPF32[((ptr) >> 2)];
609
837
  case 'double': return HEAPF64[((ptr) >> 3)];
610
838
  case '*': return HEAPU32[((ptr) >> 2)];
611
- default: abort(`invalid type for getValue: ${type}`);
839
+ default: abort('invalid type for getValue: ' + type);
612
840
  }
613
841
  }
614
842
  /**
@@ -632,7 +860,9 @@ var Module = (() => {
632
860
  case 'i32':
633
861
  HEAP32[((ptr) >> 2)] = value;
634
862
  break;
635
- case 'i64': abort('to do setValue(i64) use WASM_BIGINT');
863
+ case 'i64':
864
+ (tempI64 = [value >>> 0, (tempDouble = value, (+(Math.abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math.min((+(Math.floor((tempDouble) / 4294967296.0))), 4294967295.0)) | 0) >>> 0 : (~~((+(Math.ceil((tempDouble - +(((~~(tempDouble))) >>> 0)) / 4294967296.0))))) >>> 0) : 0)], HEAP32[((ptr) >> 2)] = tempI64[0], HEAP32[(((ptr) + (4)) >> 2)] = tempI64[1]);
865
+ break;
636
866
  case 'float':
637
867
  HEAPF32[((ptr) >> 2)] = value;
638
868
  break;
@@ -642,106 +872,76 @@ var Module = (() => {
642
872
  case '*':
643
873
  HEAPU32[((ptr) >> 2)] = value;
644
874
  break;
645
- default: abort(`invalid type for setValue: ${type}`);
875
+ default: abort('invalid type for setValue: ' + type);
646
876
  }
647
877
  }
648
- var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
649
- /**
650
- * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
651
- * array that contains uint8 values, returns a copy of that string as a
652
- * Javascript String object.
653
- * heapOrArray is either a regular array, or a JavaScript typed array view.
654
- * @param {number} idx
655
- * @param {number=} maxBytesToRead
656
- * @return {string}
657
- */
658
- var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => {
659
- var endIdx = idx + maxBytesToRead;
660
- var endPtr = idx;
661
- // TextDecoder needs to know the byte length in advance, it doesn't stop on
662
- // null terminator by itself. Also, use the length info to avoid running tiny
663
- // strings through TextDecoder, since .subarray() allocates garbage.
664
- // (As a tiny code save trick, compare endPtr against endIdx using a negation,
665
- // so that undefined means Infinity)
666
- while (heapOrArray[endPtr] && !(endPtr >= endIdx))
667
- ++endPtr;
668
- if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
669
- return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
670
- }
671
- var str = '';
672
- // If building with TextDecoder, we have already computed the string length
673
- // above, so test loop end condition against that
674
- while (idx < endPtr) {
675
- // For UTF8 byte structure, see:
676
- // http://en.wikipedia.org/wiki/UTF-8#Description
677
- // https://www.ietf.org/rfc/rfc2279.txt
678
- // https://tools.ietf.org/html/rfc3629
679
- var u0 = heapOrArray[idx++];
680
- if (!(u0 & 0x80)) {
681
- str += String.fromCharCode(u0);
682
- continue;
683
- }
684
- var u1 = heapOrArray[idx++] & 63;
685
- if ((u0 & 0xE0) == 0xC0) {
686
- str += String.fromCharCode(((u0 & 31) << 6) | u1);
687
- continue;
688
- }
689
- var u2 = heapOrArray[idx++] & 63;
690
- if ((u0 & 0xF0) == 0xE0) {
691
- u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
692
- }
693
- else {
694
- u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
695
- }
696
- if (u0 < 0x10000) {
697
- str += String.fromCharCode(u0);
698
- }
699
- else {
700
- var ch = u0 - 0x10000;
701
- str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
702
- }
703
- }
704
- return str;
705
- };
706
- /**
707
- * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
708
- * emscripten HEAP, returns a copy of that string as a Javascript String object.
709
- *
710
- * @param {number} ptr
711
- * @param {number=} maxBytesToRead - An optional length that specifies the
712
- * maximum number of bytes to read. You can omit this parameter to scan the
713
- * string until the first 0 byte. If maxBytesToRead is passed, and the string
714
- * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
715
- * string will cut short at that byte index (i.e. maxBytesToRead will not
716
- * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing
717
- * frequent uses of UTF8ToString() with and without maxBytesToRead may throw
718
- * JS JIT optimizations off, so it is worth to consider consistently using one
719
- * @return {string}
720
- */
721
- var UTF8ToString = (ptr, maxBytesToRead) => {
722
- return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
723
- };
724
- var ___assert_fail = (condition, filename, line, func) => {
725
- abort(`Assertion failed: ${UTF8ToString(condition)}, at: ` + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']);
726
- };
878
+ function ___assert_fail(condition, filename, line, func) {
879
+ abort('Assertion failed: ' + UTF8ToString(condition) + ', at: ' + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']);
880
+ }
727
881
  var structRegistrations = {};
728
- var runDestructors = (destructors) => {
882
+ function runDestructors(destructors) {
729
883
  while (destructors.length) {
730
884
  var ptr = destructors.pop();
731
885
  var del = destructors.pop();
732
886
  del(ptr);
733
887
  }
734
- };
735
- /** @suppress {globalThis} */
888
+ }
736
889
  function simpleReadValueFromPointer(pointer) {
737
890
  return this['fromWireType'](HEAP32[((pointer) >> 2)]);
738
891
  }
739
892
  var awaitingDependencies = {};
740
893
  var registeredTypes = {};
741
894
  var typeDependencies = {};
742
- var InternalError;
743
- var throwInternalError = (message) => { throw new InternalError(message); };
744
- var whenDependentTypesAreResolved = (myTypes, dependentTypes, getTypeConverters) => {
895
+ var char_0 = 48;
896
+ var char_9 = 57;
897
+ function makeLegalFunctionName(name) {
898
+ if (undefined === name) {
899
+ return '_unknown';
900
+ }
901
+ name = name.replace(/[^a-zA-Z0-9_]/g, '$');
902
+ var f = name.charCodeAt(0);
903
+ if (f >= char_0 && f <= char_9) {
904
+ return '_' + name;
905
+ }
906
+ return name;
907
+ }
908
+ function createNamedFunction(name, body) {
909
+ name = makeLegalFunctionName(name);
910
+ // Use an abject with a computed property name to create a new function with
911
+ // a name specified at runtime, but without using `new Function` or `eval`.
912
+ return {
913
+ [name]: function () {
914
+ return body.apply(this, arguments);
915
+ }
916
+ }[name];
917
+ }
918
+ function extendError(baseErrorType, errorName) {
919
+ var errorClass = createNamedFunction(errorName, function (message) {
920
+ this.name = errorName;
921
+ this.message = message;
922
+ var stack = (new Error(message)).stack;
923
+ if (stack !== undefined) {
924
+ this.stack = this.toString() + '\n' +
925
+ stack.replace(/^Error(:[^\n]*)?\n/, '');
926
+ }
927
+ });
928
+ errorClass.prototype = Object.create(baseErrorType.prototype);
929
+ errorClass.prototype.constructor = errorClass;
930
+ errorClass.prototype.toString = function () {
931
+ if (this.message === undefined) {
932
+ return this.name;
933
+ }
934
+ else {
935
+ return this.name + ': ' + this.message;
936
+ }
937
+ };
938
+ return errorClass;
939
+ }
940
+ var InternalError = undefined;
941
+ function throwInternalError(message) {
942
+ throw new InternalError(message);
943
+ }
944
+ function whenDependentTypesAreResolved(myTypes, dependentTypes, getTypeConverters) {
745
945
  myTypes.forEach(function (type) {
746
946
  typeDependencies[type] = dependentTypes;
747
947
  });
@@ -778,8 +978,8 @@ var Module = (() => {
778
978
  if (0 === unregisteredTypes.length) {
779
979
  onComplete(typeConverters);
780
980
  }
781
- };
782
- var __embind_finalize_value_object = (structType) => {
981
+ }
982
+ function __embind_finalize_value_object(structType) {
783
983
  var reg = structRegistrations[structType];
784
984
  delete structRegistrations[structType];
785
985
  var rawConstructor = reg.rawConstructor;
@@ -810,7 +1010,7 @@ var Module = (() => {
810
1010
  });
811
1011
  return [{
812
1012
  name: reg.name,
813
- 'fromWireType': (ptr) => {
1013
+ 'fromWireType': function (ptr) {
814
1014
  var rv = {};
815
1015
  for (var i in fields) {
816
1016
  rv[i] = fields[i].read(ptr);
@@ -818,12 +1018,12 @@ var Module = (() => {
818
1018
  rawDestructor(ptr);
819
1019
  return rv;
820
1020
  },
821
- 'toWireType': (destructors, o) => {
1021
+ 'toWireType': function (destructors, o) {
822
1022
  // todo: Here we have an opportunity for -O3 level "unsafe" optimizations:
823
1023
  // assume all fields are present without checking.
824
1024
  for (var fieldName in fields) {
825
1025
  if (!(fieldName in o)) {
826
- throw new TypeError(`Missing field: "${fieldName}"`);
1026
+ throw new TypeError('Missing field: "' + fieldName + '"');
827
1027
  }
828
1028
  }
829
1029
  var ptr = rawConstructor();
@@ -835,43 +1035,58 @@ var Module = (() => {
835
1035
  }
836
1036
  return ptr;
837
1037
  },
838
- 'argPackAdvance': GenericWireTypeSize,
1038
+ 'argPackAdvance': 8,
839
1039
  'readValueFromPointer': simpleReadValueFromPointer,
840
1040
  destructorFunction: rawDestructor,
841
1041
  }];
842
1042
  });
843
- };
844
- var __embind_register_bigint = (primitiveType, name, size, minRange, maxRange) => { };
845
- var embind_init_charCodes = () => {
1043
+ }
1044
+ function __embind_register_bigint(primitiveType, name, size, minRange, maxRange) { }
1045
+ function getShiftFromSize(size) {
1046
+ switch (size) {
1047
+ case 1: return 0;
1048
+ case 2: return 1;
1049
+ case 4: return 2;
1050
+ case 8: return 3;
1051
+ default:
1052
+ throw new TypeError('Unknown type size: ' + size);
1053
+ }
1054
+ }
1055
+ function embind_init_charCodes() {
846
1056
  var codes = new Array(256);
847
1057
  for (var i = 0; i < 256; ++i) {
848
1058
  codes[i] = String.fromCharCode(i);
849
1059
  }
850
1060
  embind_charCodes = codes;
851
- };
852
- var embind_charCodes;
853
- var readLatin1String = (ptr) => {
1061
+ }
1062
+ var embind_charCodes = undefined;
1063
+ function readLatin1String(ptr) {
854
1064
  var ret = "";
855
1065
  var c = ptr;
856
1066
  while (HEAPU8[c]) {
857
1067
  ret += embind_charCodes[HEAPU8[c++]];
858
1068
  }
859
1069
  return ret;
860
- };
861
- var BindingError;
862
- var throwBindingError = (message) => { throw new BindingError(message); };
1070
+ }
1071
+ var BindingError = undefined;
1072
+ function throwBindingError(message) {
1073
+ throw new BindingError(message);
1074
+ }
863
1075
  /** @param {Object=} options */
864
- function sharedRegisterType(rawType, registeredInstance, options = {}) {
1076
+ function registerType(rawType, registeredInstance, options = {}) {
1077
+ if (!('argPackAdvance' in registeredInstance)) {
1078
+ throw new TypeError('registerType registeredInstance requires argPackAdvance');
1079
+ }
865
1080
  var name = registeredInstance.name;
866
1081
  if (!rawType) {
867
- throwBindingError(`type "${name}" must have a positive integer typeid pointer`);
1082
+ throwBindingError('type "' + name + '" must have a positive integer typeid pointer');
868
1083
  }
869
1084
  if (registeredTypes.hasOwnProperty(rawType)) {
870
1085
  if (options.ignoreDuplicateRegistrations) {
871
1086
  return;
872
1087
  }
873
1088
  else {
874
- throwBindingError(`Cannot register type '${name}' twice`);
1089
+ throwBindingError("Cannot register type '" + name + "' twice");
875
1090
  }
876
1091
  }
877
1092
  registeredTypes[rawType] = registeredInstance;
@@ -882,19 +1097,11 @@ var Module = (() => {
882
1097
  callbacks.forEach((cb) => cb());
883
1098
  }
884
1099
  }
885
- /** @param {Object=} options */
886
- function registerType(rawType, registeredInstance, options = {}) {
887
- if (!('argPackAdvance' in registeredInstance)) {
888
- throw new TypeError('registerType registeredInstance requires argPackAdvance');
889
- }
890
- return sharedRegisterType(rawType, registeredInstance, options);
891
- }
892
- var GenericWireTypeSize = 8;
893
- /** @suppress {globalThis} */
894
- var __embind_register_bool = (rawType, name, trueValue, falseValue) => {
1100
+ function __embind_register_bool(rawType, name, size, trueValue, falseValue) {
1101
+ var shift = getShiftFromSize(size);
895
1102
  name = readLatin1String(name);
896
1103
  registerType(rawType, {
897
- name,
1104
+ name: name,
898
1105
  'fromWireType': function (wt) {
899
1106
  // ambiguous emscripten ABI: sometimes return values are
900
1107
  // true or false, and sometimes integers (0 or 1)
@@ -903,14 +1110,49 @@ var Module = (() => {
903
1110
  'toWireType': function (destructors, o) {
904
1111
  return o ? trueValue : falseValue;
905
1112
  },
906
- 'argPackAdvance': GenericWireTypeSize,
1113
+ 'argPackAdvance': 8,
907
1114
  'readValueFromPointer': function (pointer) {
908
- return this['fromWireType'](HEAPU8[pointer]);
1115
+ // TODO: if heap is fixed (like in asm.js) this could be executed outside
1116
+ var heap;
1117
+ if (size === 1) {
1118
+ heap = HEAP8;
1119
+ }
1120
+ else if (size === 2) {
1121
+ heap = HEAP16;
1122
+ }
1123
+ else if (size === 4) {
1124
+ heap = HEAP32;
1125
+ }
1126
+ else {
1127
+ throw new TypeError("Unknown boolean type size: " + name);
1128
+ }
1129
+ return this['fromWireType'](heap[pointer >> shift]);
909
1130
  },
910
1131
  destructorFunction: null, // This type does not need a destructor
911
1132
  });
912
- };
913
- var shallowCopyInternalPointer = (o) => {
1133
+ }
1134
+ function ClassHandle_isAliasOf(other) {
1135
+ if (!(this instanceof ClassHandle)) {
1136
+ return false;
1137
+ }
1138
+ if (!(other instanceof ClassHandle)) {
1139
+ return false;
1140
+ }
1141
+ var leftClass = this.$$.ptrType.registeredClass;
1142
+ var left = this.$$.ptr;
1143
+ var rightClass = other.$$.ptrType.registeredClass;
1144
+ var right = other.$$.ptr;
1145
+ while (leftClass.baseClass) {
1146
+ left = leftClass.upcast(left);
1147
+ leftClass = leftClass.baseClass;
1148
+ }
1149
+ while (rightClass.baseClass) {
1150
+ right = rightClass.upcast(right);
1151
+ rightClass = rightClass.baseClass;
1152
+ }
1153
+ return leftClass === rightClass && left === right;
1154
+ }
1155
+ function shallowCopyInternalPointer(o) {
914
1156
  return {
915
1157
  count: o.count,
916
1158
  deleteScheduled: o.deleteScheduled,
@@ -920,31 +1162,31 @@ var Module = (() => {
920
1162
  smartPtr: o.smartPtr,
921
1163
  smartPtrType: o.smartPtrType,
922
1164
  };
923
- };
924
- var throwInstanceAlreadyDeleted = (obj) => {
1165
+ }
1166
+ function throwInstanceAlreadyDeleted(obj) {
925
1167
  function getInstanceTypeName(handle) {
926
1168
  return handle.$$.ptrType.registeredClass.name;
927
1169
  }
928
1170
  throwBindingError(getInstanceTypeName(obj) + ' instance already deleted');
929
- };
1171
+ }
930
1172
  var finalizationRegistry = false;
931
- var detachFinalizer = (handle) => { };
932
- var runDestructor = ($$) => {
1173
+ function detachFinalizer(handle) { }
1174
+ function runDestructor($$) {
933
1175
  if ($$.smartPtr) {
934
1176
  $$.smartPtrType.rawDestructor($$.smartPtr);
935
1177
  }
936
1178
  else {
937
1179
  $$.ptrType.registeredClass.rawDestructor($$.ptr);
938
1180
  }
939
- };
940
- var releaseClassHandle = ($$) => {
1181
+ }
1182
+ function releaseClassHandle($$) {
941
1183
  $$.count.value -= 1;
942
1184
  var toDelete = 0 === $$.count.value;
943
1185
  if (toDelete) {
944
1186
  runDestructor($$);
945
1187
  }
946
- };
947
- var downcastPointer = (ptr, ptrClass, desiredClass) => {
1188
+ }
1189
+ function downcastPointer(ptr, ptrClass, desiredClass) {
948
1190
  if (ptrClass === desiredClass) {
949
1191
  return ptr;
950
1192
  }
@@ -956,12 +1198,12 @@ var Module = (() => {
956
1198
  return null;
957
1199
  }
958
1200
  return desiredClass.downcast(rv);
959
- };
1201
+ }
960
1202
  var registeredPointers = {};
961
- var getInheritedInstanceCount = () => {
1203
+ function getInheritedInstanceCount() {
962
1204
  return Object.keys(registeredInstances).length;
963
- };
964
- var getLiveInheritedInstances = () => {
1205
+ }
1206
+ function getLiveInheritedInstances() {
965
1207
  var rv = [];
966
1208
  for (var k in registeredInstances) {
967
1209
  if (registeredInstances.hasOwnProperty(k)) {
@@ -969,30 +1211,30 @@ var Module = (() => {
969
1211
  }
970
1212
  }
971
1213
  return rv;
972
- };
1214
+ }
973
1215
  var deletionQueue = [];
974
- var flushPendingDeletes = () => {
1216
+ function flushPendingDeletes() {
975
1217
  while (deletionQueue.length) {
976
1218
  var obj = deletionQueue.pop();
977
1219
  obj.$$.deleteScheduled = false;
978
1220
  obj['delete']();
979
1221
  }
980
- };
981
- var delayFunction;
982
- var setDelayFunction = (fn) => {
1222
+ }
1223
+ var delayFunction = undefined;
1224
+ function setDelayFunction(fn) {
983
1225
  delayFunction = fn;
984
1226
  if (deletionQueue.length && delayFunction) {
985
1227
  delayFunction(flushPendingDeletes);
986
1228
  }
987
- };
988
- var init_embind = () => {
1229
+ }
1230
+ function init_embind() {
989
1231
  Module['getInheritedInstanceCount'] = getInheritedInstanceCount;
990
1232
  Module['getLiveInheritedInstances'] = getLiveInheritedInstances;
991
1233
  Module['flushPendingDeletes'] = flushPendingDeletes;
992
1234
  Module['setDelayFunction'] = setDelayFunction;
993
- };
1235
+ }
994
1236
  var registeredInstances = {};
995
- var getBasestPointer = (class_, ptr) => {
1237
+ function getBasestPointer(class_, ptr) {
996
1238
  if (ptr === undefined) {
997
1239
  throwBindingError('ptr should not be undefined');
998
1240
  }
@@ -1001,12 +1243,12 @@ var Module = (() => {
1001
1243
  class_ = class_.baseClass;
1002
1244
  }
1003
1245
  return ptr;
1004
- };
1005
- var getInheritedInstance = (class_, ptr) => {
1246
+ }
1247
+ function getInheritedInstance(class_, ptr) {
1006
1248
  ptr = getBasestPointer(class_, ptr);
1007
1249
  return registeredInstances[ptr];
1008
- };
1009
- var makeClassHandle = (prototype, record) => {
1250
+ }
1251
+ function makeClassHandle(prototype, record) {
1010
1252
  if (!record.ptrType || !record.ptr) {
1011
1253
  throwInternalError('makeClassHandle requires ptr and ptrType');
1012
1254
  }
@@ -1021,8 +1263,7 @@ var Module = (() => {
1021
1263
  value: record,
1022
1264
  },
1023
1265
  }));
1024
- };
1025
- /** @suppress {globalThis} */
1266
+ }
1026
1267
  function RegisteredPointer_fromWireType(ptr) {
1027
1268
  // ptr is a raw pointer (or a raw smartpointer)
1028
1269
  // rawPointer is a maybe-null raw pointer
@@ -1059,7 +1300,7 @@ var Module = (() => {
1059
1300
  else {
1060
1301
  return makeClassHandle(this.registeredClass.instancePrototype, {
1061
1302
  ptrType: this,
1062
- ptr,
1303
+ ptr: ptr,
1063
1304
  });
1064
1305
  }
1065
1306
  }
@@ -1094,7 +1335,7 @@ var Module = (() => {
1094
1335
  });
1095
1336
  }
1096
1337
  }
1097
- var attachFinalizer = (handle) => {
1338
+ function attachFinalizer(handle) {
1098
1339
  if ('undefined' === typeof FinalizationRegistry) {
1099
1340
  attachFinalizer = (handle) => handle;
1100
1341
  return handle;
@@ -1118,117 +1359,74 @@ var Module = (() => {
1118
1359
  };
1119
1360
  detachFinalizer = (handle) => finalizationRegistry.unregister(handle);
1120
1361
  return attachFinalizer(handle);
1121
- };
1122
- var init_ClassHandle = () => {
1123
- Object.assign(ClassHandle.prototype, {
1124
- "isAliasOf"(other) {
1125
- if (!(this instanceof ClassHandle)) {
1126
- return false;
1127
- }
1128
- if (!(other instanceof ClassHandle)) {
1129
- return false;
1130
- }
1131
- var leftClass = this.$$.ptrType.registeredClass;
1132
- var left = this.$$.ptr;
1133
- other.$$ = /** @type {Object} */ (other.$$);
1134
- var rightClass = other.$$.ptrType.registeredClass;
1135
- var right = other.$$.ptr;
1136
- while (leftClass.baseClass) {
1137
- left = leftClass.upcast(left);
1138
- leftClass = leftClass.baseClass;
1139
- }
1140
- while (rightClass.baseClass) {
1141
- right = rightClass.upcast(right);
1142
- rightClass = rightClass.baseClass;
1143
- }
1144
- return leftClass === rightClass && left === right;
1145
- },
1146
- "clone"() {
1147
- if (!this.$$.ptr) {
1148
- throwInstanceAlreadyDeleted(this);
1149
- }
1150
- if (this.$$.preservePointerOnDelete) {
1151
- this.$$.count.value += 1;
1152
- return this;
1153
- }
1154
- else {
1155
- var clone = attachFinalizer(Object.create(Object.getPrototypeOf(this), {
1156
- $$: {
1157
- value: shallowCopyInternalPointer(this.$$),
1158
- }
1159
- }));
1160
- clone.$$.count.value += 1;
1161
- clone.$$.deleteScheduled = false;
1162
- return clone;
1163
- }
1164
- },
1165
- "delete"() {
1166
- if (!this.$$.ptr) {
1167
- throwInstanceAlreadyDeleted(this);
1168
- }
1169
- if (this.$$.deleteScheduled && !this.$$.preservePointerOnDelete) {
1170
- throwBindingError('Object already scheduled for deletion');
1171
- }
1172
- detachFinalizer(this);
1173
- releaseClassHandle(this.$$);
1174
- if (!this.$$.preservePointerOnDelete) {
1175
- this.$$.smartPtr = undefined;
1176
- this.$$.ptr = undefined;
1177
- }
1178
- },
1179
- "isDeleted"() {
1180
- return !this.$$.ptr;
1181
- },
1182
- "deleteLater"() {
1183
- if (!this.$$.ptr) {
1184
- throwInstanceAlreadyDeleted(this);
1185
- }
1186
- if (this.$$.deleteScheduled && !this.$$.preservePointerOnDelete) {
1187
- throwBindingError('Object already scheduled for deletion');
1188
- }
1189
- deletionQueue.push(this);
1190
- if (deletionQueue.length === 1 && delayFunction) {
1191
- delayFunction(flushPendingDeletes);
1362
+ }
1363
+ function ClassHandle_clone() {
1364
+ if (!this.$$.ptr) {
1365
+ throwInstanceAlreadyDeleted(this);
1366
+ }
1367
+ if (this.$$.preservePointerOnDelete) {
1368
+ this.$$.count.value += 1;
1369
+ return this;
1370
+ }
1371
+ else {
1372
+ var clone = attachFinalizer(Object.create(Object.getPrototypeOf(this), {
1373
+ $$: {
1374
+ value: shallowCopyInternalPointer(this.$$),
1192
1375
  }
1193
- this.$$.deleteScheduled = true;
1194
- return this;
1195
- },
1196
- });
1197
- };
1198
- /** @constructor */
1199
- function ClassHandle() {
1376
+ }));
1377
+ clone.$$.count.value += 1;
1378
+ clone.$$.deleteScheduled = false;
1379
+ return clone;
1380
+ }
1200
1381
  }
1201
- var char_0 = 48;
1202
- var char_9 = 57;
1203
- var makeLegalFunctionName = (name) => {
1204
- if (undefined === name) {
1205
- return '_unknown';
1382
+ function ClassHandle_delete() {
1383
+ if (!this.$$.ptr) {
1384
+ throwInstanceAlreadyDeleted(this);
1206
1385
  }
1207
- name = name.replace(/[^a-zA-Z0-9_]/g, '$');
1208
- var f = name.charCodeAt(0);
1209
- if (f >= char_0 && f <= char_9) {
1210
- return `_${name}`;
1386
+ if (this.$$.deleteScheduled && !this.$$.preservePointerOnDelete) {
1387
+ throwBindingError('Object already scheduled for deletion');
1211
1388
  }
1212
- return name;
1213
- };
1214
- function createNamedFunction(name, body) {
1215
- name = makeLegalFunctionName(name);
1216
- // Use an abject with a computed property name to create a new function with
1217
- // a name specified at runtime, but without using `new Function` or `eval`.
1218
- return {
1219
- [name]: function () {
1220
- return body.apply(this, arguments);
1221
- }
1222
- }[name];
1389
+ detachFinalizer(this);
1390
+ releaseClassHandle(this.$$);
1391
+ if (!this.$$.preservePointerOnDelete) {
1392
+ this.$$.smartPtr = undefined;
1393
+ this.$$.ptr = undefined;
1394
+ }
1395
+ }
1396
+ function ClassHandle_isDeleted() {
1397
+ return !this.$$.ptr;
1398
+ }
1399
+ function ClassHandle_deleteLater() {
1400
+ if (!this.$$.ptr) {
1401
+ throwInstanceAlreadyDeleted(this);
1402
+ }
1403
+ if (this.$$.deleteScheduled && !this.$$.preservePointerOnDelete) {
1404
+ throwBindingError('Object already scheduled for deletion');
1405
+ }
1406
+ deletionQueue.push(this);
1407
+ if (deletionQueue.length === 1 && delayFunction) {
1408
+ delayFunction(flushPendingDeletes);
1409
+ }
1410
+ this.$$.deleteScheduled = true;
1411
+ return this;
1412
+ }
1413
+ function init_ClassHandle() {
1414
+ ClassHandle.prototype['isAliasOf'] = ClassHandle_isAliasOf;
1415
+ ClassHandle.prototype['clone'] = ClassHandle_clone;
1416
+ ClassHandle.prototype['delete'] = ClassHandle_delete;
1417
+ ClassHandle.prototype['isDeleted'] = ClassHandle_isDeleted;
1418
+ ClassHandle.prototype['deleteLater'] = ClassHandle_deleteLater;
1223
1419
  }
1224
- var ensureOverloadTable = (proto, methodName, humanName) => {
1420
+ function ClassHandle() {
1421
+ }
1422
+ function ensureOverloadTable(proto, methodName, humanName) {
1225
1423
  if (undefined === proto[methodName].overloadTable) {
1226
1424
  var prevFunc = proto[methodName];
1227
1425
  // Inject an overload resolver function that routes to the appropriate overload based on the number of arguments.
1228
1426
  proto[methodName] = function () {
1229
1427
  // TODO This check can be removed in -O3 level "unsafe" optimizations.
1230
1428
  if (!proto[methodName].overloadTable.hasOwnProperty(arguments.length)) {
1231
- throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`);
1429
+ throwBindingError("Function '" + humanName + "' called with an invalid number of arguments (" + arguments.length + ") - expects one of (" + proto[methodName].overloadTable + ")!");
1232
1430
  }
1233
1431
  return proto[methodName].overloadTable[arguments.length].apply(this, arguments);
1234
1432
  };
@@ -1236,18 +1434,18 @@ var Module = (() => {
1236
1434
  proto[methodName].overloadTable = [];
1237
1435
  proto[methodName].overloadTable[prevFunc.argCount] = prevFunc;
1238
1436
  }
1239
- };
1437
+ }
1240
1438
  /** @param {number=} numArguments */
1241
- var exposePublicSymbol = (name, value, numArguments) => {
1439
+ function exposePublicSymbol(name, value, numArguments) {
1242
1440
  if (Module.hasOwnProperty(name)) {
1243
1441
  if (undefined === numArguments || (undefined !== Module[name].overloadTable && undefined !== Module[name].overloadTable[numArguments])) {
1244
- throwBindingError(`Cannot register public name '${name}' twice`);
1442
+ throwBindingError("Cannot register public name '" + name + "' twice");
1245
1443
  }
1246
1444
  // We are exposing a function with the same name as an existing function. Create an overload table and a function selector
1247
1445
  // that routes between the two.
1248
1446
  ensureOverloadTable(Module, name, name);
1249
1447
  if (Module.hasOwnProperty(numArguments)) {
1250
- throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`);
1448
+ throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (" + numArguments + ")!");
1251
1449
  }
1252
1450
  // Add the new function into the overload table.
1253
1451
  Module[name].overloadTable[numArguments] = value;
@@ -1258,7 +1456,7 @@ var Module = (() => {
1258
1456
  Module[name].numArguments = numArguments;
1259
1457
  }
1260
1458
  }
1261
- };
1459
+ }
1262
1460
  /** @constructor */
1263
1461
  function RegisteredClass(name, constructor, instancePrototype, rawDestructor, baseClass, getActualType, upcast, downcast) {
1264
1462
  this.name = name;
@@ -1271,40 +1469,38 @@ var Module = (() => {
1271
1469
  this.downcast = downcast;
1272
1470
  this.pureVirtualFunctions = [];
1273
1471
  }
1274
- var upcastPointer = (ptr, ptrClass, desiredClass) => {
1472
+ function upcastPointer(ptr, ptrClass, desiredClass) {
1275
1473
  while (ptrClass !== desiredClass) {
1276
1474
  if (!ptrClass.upcast) {
1277
- throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`);
1475
+ throwBindingError("Expected null or instance of " + desiredClass.name + ", got an instance of " + ptrClass.name);
1278
1476
  }
1279
1477
  ptr = ptrClass.upcast(ptr);
1280
1478
  ptrClass = ptrClass.baseClass;
1281
1479
  }
1282
1480
  return ptr;
1283
- };
1284
- /** @suppress {globalThis} */
1481
+ }
1285
1482
  function constNoSmartPtrRawPointerToWireType(destructors, handle) {
1286
1483
  if (handle === null) {
1287
1484
  if (this.isReference) {
1288
- throwBindingError(`null is not a valid ${this.name}`);
1485
+ throwBindingError('null is not a valid ' + this.name);
1289
1486
  }
1290
1487
  return 0;
1291
1488
  }
1292
1489
  if (!handle.$$) {
1293
- throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`);
1490
+ throwBindingError('Cannot pass "' + embindRepr(handle) + '" as a ' + this.name);
1294
1491
  }
1295
1492
  if (!handle.$$.ptr) {
1296
- throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`);
1493
+ throwBindingError('Cannot pass deleted object as a pointer of type ' + this.name);
1297
1494
  }
1298
1495
  var handleClass = handle.$$.ptrType.registeredClass;
1299
1496
  var ptr = upcastPointer(handle.$$.ptr, handleClass, this.registeredClass);
1300
1497
  return ptr;
1301
1498
  }
1302
- /** @suppress {globalThis} */
1303
1499
  function genericPointerToWireType(destructors, handle) {
1304
1500
  var ptr;
1305
1501
  if (handle === null) {
1306
1502
  if (this.isReference) {
1307
- throwBindingError(`null is not a valid ${this.name}`);
1503
+ throwBindingError('null is not a valid ' + this.name);
1308
1504
  }
1309
1505
  if (this.isSmartPointer) {
1310
1506
  ptr = this.rawConstructor();
@@ -1318,13 +1514,13 @@ var Module = (() => {
1318
1514
  }
1319
1515
  }
1320
1516
  if (!handle.$$) {
1321
- throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`);
1517
+ throwBindingError('Cannot pass "' + embindRepr(handle) + '" as a ' + this.name);
1322
1518
  }
1323
1519
  if (!handle.$$.ptr) {
1324
- throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`);
1520
+ throwBindingError('Cannot pass deleted object as a pointer of type ' + this.name);
1325
1521
  }
1326
1522
  if (!this.isConst && handle.$$.ptrType.isConst) {
1327
- throwBindingError(`Cannot convert argument of type ${(handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name)} to parameter type ${this.name}`);
1523
+ throwBindingError('Cannot convert argument of type ' + (handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name) + ' to parameter type ' + this.name);
1328
1524
  }
1329
1525
  var handleClass = handle.$$.ptrType.registeredClass;
1330
1526
  ptr = upcastPointer(handle.$$.ptr, handleClass, this.registeredClass);
@@ -1342,7 +1538,7 @@ var Module = (() => {
1342
1538
  ptr = handle.$$.smartPtr;
1343
1539
  }
1344
1540
  else {
1345
- throwBindingError(`Cannot convert argument of type ${(handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name)} to parameter type ${this.name}`);
1541
+ throwBindingError('Cannot convert argument of type ' + (handle.$$.smartPtrType ? handle.$$.smartPtrType.name : handle.$$.ptrType.name) + ' to parameter type ' + this.name);
1346
1542
  }
1347
1543
  break;
1348
1544
  case 1: // INTRUSIVE
@@ -1354,7 +1550,9 @@ var Module = (() => {
1354
1550
  }
1355
1551
  else {
1356
1552
  var clonedHandle = handle['clone']();
1357
- ptr = this.rawShare(ptr, Emval.toHandle(() => clonedHandle['delete']()));
1553
+ ptr = this.rawShare(ptr, Emval.toHandle(function () {
1554
+ clonedHandle['delete']();
1555
+ }));
1358
1556
  if (destructors !== null) {
1359
1557
  destructors.push(this.rawDestructor, ptr);
1360
1558
  }
@@ -1366,54 +1564,50 @@ var Module = (() => {
1366
1564
  }
1367
1565
  return ptr;
1368
1566
  }
1369
- /** @suppress {globalThis} */
1370
1567
  function nonConstNoSmartPtrRawPointerToWireType(destructors, handle) {
1371
1568
  if (handle === null) {
1372
1569
  if (this.isReference) {
1373
- throwBindingError(`null is not a valid ${this.name}`);
1570
+ throwBindingError('null is not a valid ' + this.name);
1374
1571
  }
1375
1572
  return 0;
1376
1573
  }
1377
1574
  if (!handle.$$) {
1378
- throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`);
1575
+ throwBindingError('Cannot pass "' + embindRepr(handle) + '" as a ' + this.name);
1379
1576
  }
1380
1577
  if (!handle.$$.ptr) {
1381
- throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`);
1578
+ throwBindingError('Cannot pass deleted object as a pointer of type ' + this.name);
1382
1579
  }
1383
1580
  if (handle.$$.ptrType.isConst) {
1384
- throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`);
1581
+ throwBindingError('Cannot convert argument of type ' + handle.$$.ptrType.name + ' to parameter type ' + this.name);
1385
1582
  }
1386
1583
  var handleClass = handle.$$.ptrType.registeredClass;
1387
1584
  var ptr = upcastPointer(handle.$$.ptr, handleClass, this.registeredClass);
1388
1585
  return ptr;
1389
1586
  }
1390
- /** @suppress {globalThis} */
1391
- function readPointer(pointer) {
1392
- return this['fromWireType'](HEAPU32[((pointer) >> 2)]);
1587
+ function RegisteredPointer_getPointee(ptr) {
1588
+ if (this.rawGetPointee) {
1589
+ ptr = this.rawGetPointee(ptr);
1590
+ }
1591
+ return ptr;
1592
+ }
1593
+ function RegisteredPointer_destructor(ptr) {
1594
+ if (this.rawDestructor) {
1595
+ this.rawDestructor(ptr);
1596
+ }
1597
+ }
1598
+ function RegisteredPointer_deleteObject(handle) {
1599
+ if (handle !== null) {
1600
+ handle['delete']();
1601
+ }
1602
+ }
1603
+ function init_RegisteredPointer() {
1604
+ RegisteredPointer.prototype.getPointee = RegisteredPointer_getPointee;
1605
+ RegisteredPointer.prototype.destructor = RegisteredPointer_destructor;
1606
+ RegisteredPointer.prototype['argPackAdvance'] = 8;
1607
+ RegisteredPointer.prototype['readValueFromPointer'] = simpleReadValueFromPointer;
1608
+ RegisteredPointer.prototype['deleteObject'] = RegisteredPointer_deleteObject;
1609
+ RegisteredPointer.prototype['fromWireType'] = RegisteredPointer_fromWireType;
1393
1610
  }
1394
- var init_RegisteredPointer = () => {
1395
- Object.assign(RegisteredPointer.prototype, {
1396
- getPointee(ptr) {
1397
- if (this.rawGetPointee) {
1398
- ptr = this.rawGetPointee(ptr);
1399
- }
1400
- return ptr;
1401
- },
1402
- destructor(ptr) {
1403
- if (this.rawDestructor) {
1404
- this.rawDestructor(ptr);
1405
- }
1406
- },
1407
- 'argPackAdvance': GenericWireTypeSize,
1408
- 'readValueFromPointer': readPointer,
1409
- 'deleteObject'(handle) {
1410
- if (handle !== null) {
1411
- handle['delete']();
1412
- }
1413
- },
1414
- 'fromWireType': RegisteredPointer_fromWireType,
1415
- });
1416
- };
1417
1611
  /** @constructor
1418
1612
  @param {*=} pointeeType,
1419
1613
  @param {*=} sharingPolicy,
@@ -1456,7 +1650,7 @@ var Module = (() => {
1456
1650
  }
1457
1651
  }
1458
1652
  /** @param {number=} numArguments */
1459
- var replacePublicSymbol = (name, value, numArguments) => {
1653
+ function replacePublicSymbol(name, value, numArguments) {
1460
1654
  if (!Module.hasOwnProperty(name)) {
1461
1655
  throwInternalError('Replacing nonexistant public symbol');
1462
1656
  }
@@ -1468,14 +1662,13 @@ var Module = (() => {
1468
1662
  Module[name] = value;
1469
1663
  Module[name].argCount = numArguments;
1470
1664
  }
1471
- };
1472
- var dynCallLegacy = (sig, ptr, args) => {
1665
+ }
1666
+ function dynCallLegacy(sig, ptr, args) {
1473
1667
  var f = Module['dynCall_' + sig];
1474
1668
  return args && args.length ? f.apply(null, [ptr].concat(args)) : f.call(null, ptr);
1475
- };
1669
+ }
1476
1670
  var wasmTableMirror = [];
1477
- var wasmTable;
1478
- var getWasmTableEntry = (funcPtr) => {
1671
+ function getWasmTableEntry(funcPtr) {
1479
1672
  var func = wasmTableMirror[funcPtr];
1480
1673
  if (!func) {
1481
1674
  if (funcPtr >= wasmTableMirror.length)
@@ -1483,9 +1676,9 @@ var Module = (() => {
1483
1676
  wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);
1484
1677
  }
1485
1678
  return func;
1486
- };
1679
+ }
1487
1680
  /** @param {Object=} args */
1488
- var dynCall = (sig, ptr, args) => {
1681
+ function dynCall(sig, ptr, args) {
1489
1682
  // Without WASM_BIGINT support we cannot directly call function with i64 as
1490
1683
  // part of thier signature, so we rely the dynCall functions generated by
1491
1684
  // wasm-emscripten-finalize
@@ -1494,59 +1687,37 @@ var Module = (() => {
1494
1687
  }
1495
1688
  var rtn = getWasmTableEntry(ptr).apply(null, args);
1496
1689
  return rtn;
1497
- };
1498
- var getDynCaller = (sig, ptr) => {
1690
+ }
1691
+ function getDynCaller(sig, ptr) {
1499
1692
  var argCache = [];
1500
1693
  return function () {
1501
1694
  argCache.length = 0;
1502
1695
  Object.assign(argCache, arguments);
1503
1696
  return dynCall(sig, ptr, argCache);
1504
1697
  };
1505
- };
1506
- var embind__requireFunction = (signature, rawFunction) => {
1698
+ }
1699
+ function embind__requireFunction(signature, rawFunction) {
1507
1700
  signature = readLatin1String(signature);
1508
- function makeDynCaller() {
1509
- if (signature.includes('j')) {
1510
- return getDynCaller(signature, rawFunction);
1511
- }
1512
- return getWasmTableEntry(rawFunction);
1513
- }
1514
- var fp = makeDynCaller();
1515
- if (typeof fp != "function") {
1516
- throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`);
1517
- }
1518
- return fp;
1519
- };
1520
- var extendError = (baseErrorType, errorName) => {
1521
- var errorClass = createNamedFunction(errorName, function (message) {
1522
- this.name = errorName;
1523
- this.message = message;
1524
- var stack = (new Error(message)).stack;
1525
- if (stack !== undefined) {
1526
- this.stack = this.toString() + '\n' +
1527
- stack.replace(/^Error(:[^\n]*)?\n/, '');
1528
- }
1529
- });
1530
- errorClass.prototype = Object.create(baseErrorType.prototype);
1531
- errorClass.prototype.constructor = errorClass;
1532
- errorClass.prototype.toString = function () {
1533
- if (this.message === undefined) {
1534
- return this.name;
1535
- }
1536
- else {
1537
- return `${this.name}: ${this.message}`;
1701
+ function makeDynCaller() {
1702
+ if (signature.includes('j')) {
1703
+ return getDynCaller(signature, rawFunction);
1538
1704
  }
1539
- };
1540
- return errorClass;
1541
- };
1542
- var UnboundTypeError;
1543
- var getTypeName = (type) => {
1705
+ return getWasmTableEntry(rawFunction);
1706
+ }
1707
+ var fp = makeDynCaller();
1708
+ if (typeof fp != "function") {
1709
+ throwBindingError("unknown function pointer with signature " + signature + ": " + rawFunction);
1710
+ }
1711
+ return fp;
1712
+ }
1713
+ var UnboundTypeError = undefined;
1714
+ function getTypeName(type) {
1544
1715
  var ptr = ___getTypeName(type);
1545
1716
  var rv = readLatin1String(ptr);
1546
1717
  _free(ptr);
1547
1718
  return rv;
1548
- };
1549
- var throwUnboundTypeError = (message, types) => {
1719
+ }
1720
+ function throwUnboundTypeError(message, types) {
1550
1721
  var unboundTypes = [];
1551
1722
  var seen = {};
1552
1723
  function visit(type) {
@@ -1564,9 +1735,9 @@ var Module = (() => {
1564
1735
  seen[type] = true;
1565
1736
  }
1566
1737
  types.forEach(visit);
1567
- throw new UnboundTypeError(`${message}: ` + unboundTypes.map(getTypeName).join([', ']));
1568
- };
1569
- var __embind_register_class = (rawType, rawPointerType, rawConstPointerType, baseClassRawType, getActualTypeSignature, getActualType, upcastSignature, upcast, downcastSignature, downcast, name, destructorSignature, rawDestructor) => {
1738
+ throw new UnboundTypeError(message + ': ' + unboundTypes.map(getTypeName).join([', ']));
1739
+ }
1740
+ function __embind_register_class(rawType, rawPointerType, rawConstPointerType, baseClassRawType, getActualTypeSignature, getActualType, upcastSignature, upcast, downcastSignature, downcast, name, destructorSignature, rawDestructor) {
1570
1741
  name = readLatin1String(name);
1571
1742
  getActualType = embind__requireFunction(getActualTypeSignature, getActualType);
1572
1743
  if (upcast) {
@@ -1579,7 +1750,7 @@ var Module = (() => {
1579
1750
  var legalFunctionName = makeLegalFunctionName(name);
1580
1751
  exposePublicSymbol(legalFunctionName, function () {
1581
1752
  // this code cannot run if baseClassRawType is zero
1582
- throwUnboundTypeError(`Cannot construct ${name} due to unbound types`, [baseClassRawType]);
1753
+ throwUnboundTypeError('Cannot construct ' + name + ' due to unbound types', [baseClassRawType]);
1583
1754
  });
1584
1755
  whenDependentTypesAreResolved([rawType, rawPointerType, rawConstPointerType], baseClassRawType ? [baseClassRawType] : [], function (base) {
1585
1756
  base = base[0];
@@ -1601,7 +1772,7 @@ var Module = (() => {
1601
1772
  }
1602
1773
  var body = registeredClass.constructor_body[arguments.length];
1603
1774
  if (undefined === body) {
1604
- throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`);
1775
+ throw new BindingError("Tried to invoke ctor of " + name + " with invalid number of parameters (" + arguments.length + ") - expected (" + Object.keys(registeredClass.constructor_body).toString() + ") parameters instead!");
1605
1776
  }
1606
1777
  return body.apply(this, arguments);
1607
1778
  });
@@ -1610,13 +1781,6 @@ var Module = (() => {
1610
1781
  });
1611
1782
  constructor.prototype = instancePrototype;
1612
1783
  var registeredClass = new RegisteredClass(name, constructor, instancePrototype, rawDestructor, baseClass, getActualType, upcast, downcast);
1613
- if (registeredClass.baseClass) {
1614
- // Keep track of class hierarchy. Used to allow sub-classes to inherit class functions.
1615
- if (registeredClass.baseClass.__derivedClasses === undefined) {
1616
- registeredClass.baseClass.__derivedClasses = [];
1617
- }
1618
- registeredClass.baseClass.__derivedClasses.push(registeredClass);
1619
- }
1620
1784
  var referenceConverter = new RegisteredPointer(name, registeredClass, true, false, false);
1621
1785
  var pointerConverter = new RegisteredPointer(name + '*', registeredClass, false, false, false);
1622
1786
  var constPointerConverter = new RegisteredPointer(name + ' const*', registeredClass, false, true, false);
@@ -1627,8 +1791,8 @@ var Module = (() => {
1627
1791
  replacePublicSymbol(legalFunctionName, constructor);
1628
1792
  return [referenceConverter, pointerConverter, constPointerConverter];
1629
1793
  });
1630
- };
1631
- var heap32VectorToArray = (count, firstElement) => {
1794
+ }
1795
+ function heap32VectorToArray(count, firstElement) {
1632
1796
  var array = [];
1633
1797
  for (var i = 0; i < count; i++) {
1634
1798
  // TODO(https://github.com/emscripten-core/emscripten/issues/17310):
@@ -1636,10 +1800,10 @@ var Module = (() => {
1636
1800
  array.push(HEAPU32[(((firstElement) + (i * 4)) >> 2)]);
1637
1801
  }
1638
1802
  return array;
1639
- };
1640
- function newFunc(constructor, argumentList) {
1803
+ }
1804
+ function new_(constructor, argumentList) {
1641
1805
  if (!(constructor instanceof Function)) {
1642
- throw new TypeError(`new_ called with constructor type ${typeof (constructor)} which is not a function`);
1806
+ throw new TypeError('new_ called with constructor type ' + typeof (constructor) + " which is not a function");
1643
1807
  }
1644
1808
  /*
1645
1809
  * Previously, the following line was just:
@@ -1657,7 +1821,7 @@ var Module = (() => {
1657
1821
  var r = constructor.apply(obj, argumentList);
1658
1822
  return (r instanceof Object) ? r : obj;
1659
1823
  }
1660
- function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cppTargetFunc, /** boolean= */ isAsync) {
1824
+ function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cppTargetFunc, isAsync) {
1661
1825
  // humanName: a human-readable string name for the function to be generated.
1662
1826
  // argTypes: An array that contains the embind type objects for all types in the function signature.
1663
1827
  // argTypes[0] is the type object for the function return value.
@@ -1666,7 +1830,6 @@ var Module = (() => {
1666
1830
  // classType: The embind type object for the class to be bound, or null if this is not a method of a class.
1667
1831
  // cppInvokerFunc: JS Function object to the C++-side function that interops into C++ code.
1668
1832
  // cppTargetFunc: Function pointer (an integer to FUNCTION_TABLE) to the target C++ function the cppInvokerFunc will end up calling.
1669
- // isAsync: Optional. If true, returns an async function. Async bindings are only supported with JSPI.
1670
1833
  var argCount = argTypes.length;
1671
1834
  if (argCount < 2) {
1672
1835
  throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");
@@ -1693,11 +1856,10 @@ var Module = (() => {
1693
1856
  argsList += (i !== 0 ? ", " : "") + "arg" + i;
1694
1857
  argsListWired += (i !== 0 ? ", " : "") + "arg" + i + "Wired";
1695
1858
  }
1696
- var invokerFnBody = `
1697
- return function ${makeLegalFunctionName(humanName)}(${argsList}) {
1698
- if (arguments.length !== ${argCount - 2}) {
1699
- throwBindingError('function ${humanName} called with ' + arguments.length + ' arguments, expected ${argCount - 2}');
1700
- }`;
1859
+ var invokerFnBody = "return function " + makeLegalFunctionName(humanName) + "(" + argsList + ") {\n" +
1860
+ "if (arguments.length !== " + (argCount - 2) + ") {\n" +
1861
+ "throwBindingError('function " + humanName + " called with ' + arguments.length + ' arguments, expected " + (argCount - 2) + " args!');\n" +
1862
+ "}\n";
1701
1863
  if (needsDestructorStack) {
1702
1864
  invokerFnBody += "var destructors = [];\n";
1703
1865
  }
@@ -1738,26 +1900,28 @@ var Module = (() => {
1738
1900
  }
1739
1901
  invokerFnBody += "}\n";
1740
1902
  args1.push(invokerFnBody);
1741
- return newFunc(Function, args1).apply(null, args2);
1903
+ var invokerFunction = new_(Function, args1).apply(null, args2);
1904
+ return invokerFunction;
1742
1905
  }
1743
- var __embind_register_class_constructor = (rawClassType, argCount, rawArgTypesAddr, invokerSignature, invoker, rawConstructor) => {
1906
+ function __embind_register_class_constructor(rawClassType, argCount, rawArgTypesAddr, invokerSignature, invoker, rawConstructor) {
1907
+ assert(argCount > 0);
1744
1908
  var rawArgTypes = heap32VectorToArray(argCount, rawArgTypesAddr);
1745
1909
  invoker = embind__requireFunction(invokerSignature, invoker);
1746
1910
  var args = [rawConstructor];
1747
1911
  var destructors = [];
1748
1912
  whenDependentTypesAreResolved([], [rawClassType], function (classType) {
1749
1913
  classType = classType[0];
1750
- var humanName = `constructor ${classType.name}`;
1914
+ var humanName = 'constructor ' + classType.name;
1751
1915
  if (undefined === classType.registeredClass.constructor_body) {
1752
1916
  classType.registeredClass.constructor_body = [];
1753
1917
  }
1754
1918
  if (undefined !== classType.registeredClass.constructor_body[argCount - 1]) {
1755
- throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount - 1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
1919
+ throw new BindingError("Cannot register multiple constructors with identical number of parameters (" + (argCount - 1) + ") for class '" + classType.name + "'! Overload resolution is currently only performed using the parameter count, not actual type info!");
1756
1920
  }
1757
1921
  classType.registeredClass.constructor_body[argCount - 1] = () => {
1758
- throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`, rawArgTypes);
1922
+ throwUnboundTypeError('Cannot construct ' + classType.name + ' due to unbound types', rawArgTypes);
1759
1923
  };
1760
- whenDependentTypesAreResolved([], rawArgTypes, (argTypes) => {
1924
+ whenDependentTypesAreResolved([], rawArgTypes, function (argTypes) {
1761
1925
  // Insert empty slot for context type (argTypes[1]).
1762
1926
  argTypes.splice(1, 0, null);
1763
1927
  classType.registeredClass.constructor_body[argCount - 1] = craftInvokerFunction(humanName, argTypes, null, invoker, rawConstructor);
@@ -1765,44 +1929,48 @@ var Module = (() => {
1765
1929
  });
1766
1930
  return [];
1767
1931
  });
1768
- };
1769
- var validateThis = (this_, classType, humanName) => {
1932
+ }
1933
+ function validateThis(this_, classType, humanName) {
1770
1934
  if (!(this_ instanceof Object)) {
1771
- throwBindingError(`${humanName} with invalid "this": ${this_}`);
1935
+ throwBindingError(humanName + ' with invalid "this": ' + this_);
1772
1936
  }
1773
1937
  if (!(this_ instanceof classType.registeredClass.constructor)) {
1774
- throwBindingError(`${humanName} incompatible with "this" of type ${this_.constructor.name}`);
1938
+ throwBindingError(humanName + ' incompatible with "this" of type ' + this_.constructor.name);
1775
1939
  }
1776
1940
  if (!this_.$$.ptr) {
1777
- throwBindingError(`cannot call emscripten binding method ${humanName} on deleted object`);
1941
+ throwBindingError('cannot call emscripten binding method ' + humanName + ' on deleted object');
1778
1942
  }
1779
1943
  // todo: kill this
1780
1944
  return upcastPointer(this_.$$.ptr, this_.$$.ptrType.registeredClass, classType.registeredClass);
1781
- };
1782
- var __embind_register_class_property = (classType, fieldName, getterReturnType, getterSignature, getter, getterContext, setterArgumentType, setterSignature, setter, setterContext) => {
1945
+ }
1946
+ function __embind_register_class_property(classType, fieldName, getterReturnType, getterSignature, getter, getterContext, setterArgumentType, setterSignature, setter, setterContext) {
1783
1947
  fieldName = readLatin1String(fieldName);
1784
1948
  getter = embind__requireFunction(getterSignature, getter);
1785
1949
  whenDependentTypesAreResolved([], [classType], function (classType) {
1786
1950
  classType = classType[0];
1787
- var humanName = `${classType.name}.${fieldName}`;
1951
+ var humanName = classType.name + '.' + fieldName;
1788
1952
  var desc = {
1789
- get() {
1790
- throwUnboundTypeError(`Cannot access ${humanName} due to unbound types`, [getterReturnType, setterArgumentType]);
1953
+ get: function () {
1954
+ throwUnboundTypeError('Cannot access ' + humanName + ' due to unbound types', [getterReturnType, setterArgumentType]);
1791
1955
  },
1792
1956
  enumerable: true,
1793
1957
  configurable: true
1794
1958
  };
1795
1959
  if (setter) {
1796
- desc.set = () => throwUnboundTypeError(`Cannot access ${humanName} due to unbound types`, [getterReturnType, setterArgumentType]);
1960
+ desc.set = () => {
1961
+ throwUnboundTypeError('Cannot access ' + humanName + ' due to unbound types', [getterReturnType, setterArgumentType]);
1962
+ };
1797
1963
  }
1798
1964
  else {
1799
- desc.set = (v) => throwBindingError(humanName + ' is a read-only property');
1965
+ desc.set = (v) => {
1966
+ throwBindingError(humanName + ' is a read-only property');
1967
+ };
1800
1968
  }
1801
1969
  Object.defineProperty(classType.registeredClass.instancePrototype, fieldName, desc);
1802
1970
  whenDependentTypesAreResolved([], (setter ? [getterReturnType, setterArgumentType] : [getterReturnType]), function (types) {
1803
1971
  var getterReturnType = types[0];
1804
1972
  var desc = {
1805
- get() {
1973
+ get: function () {
1806
1974
  var ptr = validateThis(this, classType, humanName + ' getter');
1807
1975
  return getterReturnType['fromWireType'](getter(getterContext, ptr));
1808
1976
  },
@@ -1823,94 +1991,76 @@ var Module = (() => {
1823
1991
  });
1824
1992
  return [];
1825
1993
  });
1826
- };
1827
- function handleAllocatorInit() {
1828
- Object.assign(HandleAllocator.prototype, /** @lends {HandleAllocator.prototype} */ {
1829
- get(id) {
1830
- return this.allocated[id];
1831
- },
1832
- has(id) {
1833
- return this.allocated[id] !== undefined;
1834
- },
1835
- allocate(handle) {
1836
- var id = this.freelist.pop() || this.allocated.length;
1837
- this.allocated[id] = handle;
1838
- return id;
1839
- },
1840
- free(id) {
1841
- // Set the slot to `undefined` rather than using `delete` here since
1842
- // apparently arrays with holes in them can be less efficient.
1843
- this.allocated[id] = undefined;
1844
- this.freelist.push(id);
1845
- }
1846
- });
1847
- }
1848
- /** @constructor */
1849
- function HandleAllocator() {
1850
- // Reserve slot 0 so that 0 is always an invalid handle
1851
- this.allocated = [undefined];
1852
- this.freelist = [];
1853
1994
  }
1854
- var emval_handles = new HandleAllocator();
1855
- ;
1856
- var __emval_decref = (handle) => {
1857
- if (handle >= emval_handles.reserved && 0 === --emval_handles.get(handle).refcount) {
1858
- emval_handles.free(handle);
1995
+ var emval_free_list = [];
1996
+ var emval_handle_array = [{}, { value: undefined }, { value: null }, { value: true }, { value: false }];
1997
+ function __emval_decref(handle) {
1998
+ if (handle > 4 && 0 === --emval_handle_array[handle].refcount) {
1999
+ emval_handle_array[handle] = undefined;
2000
+ emval_free_list.push(handle);
1859
2001
  }
1860
- };
1861
- var count_emval_handles = () => {
2002
+ }
2003
+ function count_emval_handles() {
1862
2004
  var count = 0;
1863
- for (var i = emval_handles.reserved; i < emval_handles.allocated.length; ++i) {
1864
- if (emval_handles.allocated[i] !== undefined) {
2005
+ for (var i = 5; i < emval_handle_array.length; ++i) {
2006
+ if (emval_handle_array[i] !== undefined) {
1865
2007
  ++count;
1866
2008
  }
1867
2009
  }
1868
2010
  return count;
1869
- };
1870
- var init_emval = () => {
1871
- // reserve some special values. These never get de-allocated.
1872
- // The HandleAllocator takes care of reserving zero.
1873
- emval_handles.allocated.push({ value: undefined }, { value: null }, { value: true }, { value: false });
1874
- emval_handles.reserved = emval_handles.allocated.length;
2011
+ }
2012
+ function get_first_emval() {
2013
+ for (var i = 5; i < emval_handle_array.length; ++i) {
2014
+ if (emval_handle_array[i] !== undefined) {
2015
+ return emval_handle_array[i];
2016
+ }
2017
+ }
2018
+ return null;
2019
+ }
2020
+ function init_emval() {
1875
2021
  Module['count_emval_handles'] = count_emval_handles;
1876
- };
1877
- var Emval = {
1878
- toValue: (handle) => {
2022
+ Module['get_first_emval'] = get_first_emval;
2023
+ }
2024
+ var Emval = { toValue: (handle) => {
1879
2025
  if (!handle) {
1880
2026
  throwBindingError('Cannot use deleted val. handle = ' + handle);
1881
2027
  }
1882
- return emval_handles.get(handle).value;
1883
- },
1884
- toHandle: (value) => {
2028
+ return emval_handle_array[handle].value;
2029
+ }, toHandle: (value) => {
1885
2030
  switch (value) {
1886
2031
  case undefined: return 1;
1887
2032
  case null: return 2;
1888
2033
  case true: return 3;
1889
2034
  case false: return 4;
1890
2035
  default: {
1891
- return emval_handles.allocate({ refcount: 1, value: value });
2036
+ var handle = emval_free_list.length ?
2037
+ emval_free_list.pop() :
2038
+ emval_handle_array.length;
2039
+ emval_handle_array[handle] = { refcount: 1, value: value };
2040
+ return handle;
1892
2041
  }
1893
2042
  }
1894
- },
1895
- };
1896
- var __embind_register_emval = (rawType, name) => {
2043
+ } };
2044
+ function __embind_register_emval(rawType, name) {
1897
2045
  name = readLatin1String(name);
1898
2046
  registerType(rawType, {
1899
- name,
1900
- 'fromWireType': (handle) => {
2047
+ name: name,
2048
+ 'fromWireType': function (handle) {
1901
2049
  var rv = Emval.toValue(handle);
1902
2050
  __emval_decref(handle);
1903
2051
  return rv;
1904
2052
  },
1905
- 'toWireType': (destructors, value) => Emval.toHandle(value),
1906
- 'argPackAdvance': GenericWireTypeSize,
2053
+ 'toWireType': function (destructors, value) {
2054
+ return Emval.toHandle(value);
2055
+ },
2056
+ 'argPackAdvance': 8,
1907
2057
  'readValueFromPointer': simpleReadValueFromPointer,
1908
2058
  destructorFunction: null, // This type does not need a destructor
1909
2059
  // TODO: do we need a deleteObject here? write a test where
1910
2060
  // emval is passed into JS via an interface
1911
2061
  });
1912
- };
1913
- var embindRepr = (v) => {
2062
+ }
2063
+ function embindRepr(v) {
1914
2064
  if (v === null) {
1915
2065
  return 'null';
1916
2066
  }
@@ -1921,71 +2071,74 @@ var Module = (() => {
1921
2071
  else {
1922
2072
  return '' + v;
1923
2073
  }
1924
- };
1925
- var floatReadValueFromPointer = (name, width) => {
1926
- switch (width) {
1927
- case 4: return function (pointer) {
1928
- return this['fromWireType'](HEAPF32[((pointer) >> 2)]);
2074
+ }
2075
+ function floatReadValueFromPointer(name, shift) {
2076
+ switch (shift) {
2077
+ case 2: return function (pointer) {
2078
+ return this['fromWireType'](HEAPF32[pointer >> 2]);
1929
2079
  };
1930
- case 8: return function (pointer) {
1931
- return this['fromWireType'](HEAPF64[((pointer) >> 3)]);
2080
+ case 3: return function (pointer) {
2081
+ return this['fromWireType'](HEAPF64[pointer >> 3]);
1932
2082
  };
1933
2083
  default:
1934
- throw new TypeError(`invalid float width (${width}): ${name}`);
2084
+ throw new TypeError("Unknown float type: " + name);
1935
2085
  }
1936
- };
1937
- var __embind_register_float = (rawType, name, size) => {
2086
+ }
2087
+ function __embind_register_float(rawType, name, size) {
2088
+ var shift = getShiftFromSize(size);
1938
2089
  name = readLatin1String(name);
1939
2090
  registerType(rawType, {
1940
- name,
1941
- 'fromWireType': (value) => value,
1942
- 'toWireType': (destructors, value) => {
2091
+ name: name,
2092
+ 'fromWireType': function (value) {
2093
+ return value;
2094
+ },
2095
+ 'toWireType': function (destructors, value) {
1943
2096
  // The VM will perform JS to Wasm value conversion, according to the spec:
1944
2097
  // https://www.w3.org/TR/wasm-js-api-1/#towebassemblyvalue
1945
2098
  return value;
1946
2099
  },
1947
- 'argPackAdvance': GenericWireTypeSize,
1948
- 'readValueFromPointer': floatReadValueFromPointer(name, size),
2100
+ 'argPackAdvance': 8,
2101
+ 'readValueFromPointer': floatReadValueFromPointer(name, shift),
1949
2102
  destructorFunction: null, // This type does not need a destructor
1950
2103
  });
1951
- };
1952
- var __embind_register_function = (name, argCount, rawArgTypesAddr, signature, rawInvoker, fn, isAsync) => {
2104
+ }
2105
+ function __embind_register_function(name, argCount, rawArgTypesAddr, signature, rawInvoker, fn, isAsync) {
1953
2106
  var argTypes = heap32VectorToArray(argCount, rawArgTypesAddr);
1954
2107
  name = readLatin1String(name);
1955
2108
  rawInvoker = embind__requireFunction(signature, rawInvoker);
1956
2109
  exposePublicSymbol(name, function () {
1957
- throwUnboundTypeError(`Cannot call ${name} due to unbound types`, argTypes);
2110
+ throwUnboundTypeError('Cannot call ' + name + ' due to unbound types', argTypes);
1958
2111
  }, argCount - 1);
1959
2112
  whenDependentTypesAreResolved([], argTypes, function (argTypes) {
1960
2113
  var invokerArgsArray = [argTypes[0] /* return value */, null /* no class 'this'*/].concat(argTypes.slice(1) /* actual params */);
1961
2114
  replacePublicSymbol(name, craftInvokerFunction(name, invokerArgsArray, null /* no class 'this'*/, rawInvoker, fn, isAsync), argCount - 1);
1962
2115
  return [];
1963
2116
  });
1964
- };
1965
- var integerReadValueFromPointer = (name, width, signed) => {
2117
+ }
2118
+ function integerReadValueFromPointer(name, shift, signed) {
1966
2119
  // integers are quite common, so generate very specialized functions
1967
- switch (width) {
2120
+ switch (shift) {
2121
+ case 0: return signed ?
2122
+ function readS8FromPointer(pointer) { return HEAP8[pointer]; } :
2123
+ function readU8FromPointer(pointer) { return HEAPU8[pointer]; };
1968
2124
  case 1: return signed ?
1969
- (pointer) => HEAP8[((pointer) >> 0)] :
1970
- (pointer) => HEAPU8[((pointer) >> 0)];
2125
+ function readS16FromPointer(pointer) { return HEAP16[pointer >> 1]; } :
2126
+ function readU16FromPointer(pointer) { return HEAPU16[pointer >> 1]; };
1971
2127
  case 2: return signed ?
1972
- (pointer) => HEAP16[((pointer) >> 1)] :
1973
- (pointer) => HEAPU16[((pointer) >> 1)];
1974
- case 4: return signed ?
1975
- (pointer) => HEAP32[((pointer) >> 2)] :
1976
- (pointer) => HEAPU32[((pointer) >> 2)];
2128
+ function readS32FromPointer(pointer) { return HEAP32[pointer >> 2]; } :
2129
+ function readU32FromPointer(pointer) { return HEAPU32[pointer >> 2]; };
1977
2130
  default:
1978
- throw new TypeError(`invalid integer width (${width}): ${name}`);
2131
+ throw new TypeError("Unknown integer type: " + name);
1979
2132
  }
1980
- };
1981
- /** @suppress {globalThis} */
1982
- var __embind_register_integer = (primitiveType, name, size, minRange, maxRange) => {
2133
+ }
2134
+ function __embind_register_integer(primitiveType, name, size, minRange, maxRange) {
1983
2135
  name = readLatin1String(name);
1984
2136
  // LLVM doesn't have signed and unsigned 32-bit types, so u32 literals come
1985
2137
  // out as 'i32 -1'. Always treat those as max u32.
1986
2138
  if (maxRange === -1) {
1987
2139
  maxRange = 4294967295;
1988
2140
  }
2141
+ var shift = getShiftFromSize(size);
1989
2142
  var fromWireType = (value) => value;
1990
2143
  if (minRange === 0) {
1991
2144
  var bitshift = 32 - 8 * size;
@@ -2010,15 +2163,15 @@ var Module = (() => {
2010
2163
  };
2011
2164
  }
2012
2165
  registerType(primitiveType, {
2013
- name,
2166
+ name: name,
2014
2167
  'fromWireType': fromWireType,
2015
2168
  'toWireType': toWireType,
2016
- 'argPackAdvance': GenericWireTypeSize,
2017
- 'readValueFromPointer': integerReadValueFromPointer(name, size, minRange !== 0),
2169
+ 'argPackAdvance': 8,
2170
+ 'readValueFromPointer': integerReadValueFromPointer(name, shift, minRange !== 0),
2018
2171
  destructorFunction: null, // This type does not need a destructor
2019
2172
  });
2020
- };
2021
- var __embind_register_memory_view = (rawType, dataTypeIndex, name) => {
2173
+ }
2174
+ function __embind_register_memory_view(rawType, dataTypeIndex, name) {
2022
2175
  var typeMapping = [
2023
2176
  Int8Array,
2024
2177
  Uint8Array,
@@ -2031,108 +2184,30 @@ var Module = (() => {
2031
2184
  ];
2032
2185
  var TA = typeMapping[dataTypeIndex];
2033
2186
  function decodeMemoryView(handle) {
2034
- var size = HEAPU32[((handle) >> 2)];
2035
- var data = HEAPU32[(((handle) + (4)) >> 2)];
2036
- return new TA(HEAP8.buffer, data, size);
2187
+ handle = handle >> 2;
2188
+ var heap = HEAPU32;
2189
+ var size = heap[handle]; // in elements
2190
+ var data = heap[handle + 1]; // byte offset into emscripten heap
2191
+ return new TA(heap.buffer, data, size);
2037
2192
  }
2038
2193
  name = readLatin1String(name);
2039
2194
  registerType(rawType, {
2040
- name,
2195
+ name: name,
2041
2196
  'fromWireType': decodeMemoryView,
2042
- 'argPackAdvance': GenericWireTypeSize,
2197
+ 'argPackAdvance': 8,
2043
2198
  'readValueFromPointer': decodeMemoryView,
2044
2199
  }, {
2045
2200
  ignoreDuplicateRegistrations: true,
2046
2201
  });
2047
- };
2048
- var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
2049
- // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
2050
- // undefined and false each don't write out any bytes.
2051
- if (!(maxBytesToWrite > 0))
2052
- return 0;
2053
- var startIdx = outIdx;
2054
- var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
2055
- for (var i = 0; i < str.length; ++i) {
2056
- // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
2057
- // unit, not a Unicode code point of the character! So decode
2058
- // UTF16->UTF32->UTF8.
2059
- // See http://unicode.org/faq/utf_bom.html#utf16-3
2060
- // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description
2061
- // and https://www.ietf.org/rfc/rfc2279.txt
2062
- // and https://tools.ietf.org/html/rfc3629
2063
- var u = str.charCodeAt(i); // possibly a lead surrogate
2064
- if (u >= 0xD800 && u <= 0xDFFF) {
2065
- var u1 = str.charCodeAt(++i);
2066
- u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
2067
- }
2068
- if (u <= 0x7F) {
2069
- if (outIdx >= endIdx)
2070
- break;
2071
- heap[outIdx++] = u;
2072
- }
2073
- else if (u <= 0x7FF) {
2074
- if (outIdx + 1 >= endIdx)
2075
- break;
2076
- heap[outIdx++] = 0xC0 | (u >> 6);
2077
- heap[outIdx++] = 0x80 | (u & 63);
2078
- }
2079
- else if (u <= 0xFFFF) {
2080
- if (outIdx + 2 >= endIdx)
2081
- break;
2082
- heap[outIdx++] = 0xE0 | (u >> 12);
2083
- heap[outIdx++] = 0x80 | ((u >> 6) & 63);
2084
- heap[outIdx++] = 0x80 | (u & 63);
2085
- }
2086
- else {
2087
- if (outIdx + 3 >= endIdx)
2088
- break;
2089
- heap[outIdx++] = 0xF0 | (u >> 18);
2090
- heap[outIdx++] = 0x80 | ((u >> 12) & 63);
2091
- heap[outIdx++] = 0x80 | ((u >> 6) & 63);
2092
- heap[outIdx++] = 0x80 | (u & 63);
2093
- }
2094
- }
2095
- // Null-terminate the pointer to the buffer.
2096
- heap[outIdx] = 0;
2097
- return outIdx - startIdx;
2098
- };
2099
- var stringToUTF8 = (str, outPtr, maxBytesToWrite) => {
2100
- return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
2101
- };
2102
- var lengthBytesUTF8 = (str) => {
2103
- var len = 0;
2104
- for (var i = 0; i < str.length; ++i) {
2105
- // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
2106
- // unit, not a Unicode code point of the character! So decode
2107
- // UTF16->UTF32->UTF8.
2108
- // See http://unicode.org/faq/utf_bom.html#utf16-3
2109
- var c = str.charCodeAt(i); // possibly a lead surrogate
2110
- if (c <= 0x7F) {
2111
- len++;
2112
- }
2113
- else if (c <= 0x7FF) {
2114
- len += 2;
2115
- }
2116
- else if (c >= 0xD800 && c <= 0xDFFF) {
2117
- len += 4;
2118
- ++i;
2119
- }
2120
- else {
2121
- len += 3;
2122
- }
2123
- }
2124
- return len;
2125
- };
2126
- var __embind_register_std_string = (rawType, name) => {
2202
+ }
2203
+ function __embind_register_std_string(rawType, name) {
2127
2204
  name = readLatin1String(name);
2128
2205
  var stdStringIsUTF8
2129
2206
  //process only std::string bindings with UTF8 support, in contrast to e.g. std::basic_string<unsigned char>
2130
2207
  = (name === "std::string");
2131
2208
  registerType(rawType, {
2132
- name,
2133
- // For some method names we use string keys here since they are part of
2134
- // the public/external API and/or used by the runtime-generated code.
2135
- 'fromWireType'(value) {
2209
+ name: name,
2210
+ 'fromWireType': function (value) {
2136
2211
  var length = HEAPU32[((value) >> 2)];
2137
2212
  var payload = value + 4;
2138
2213
  var str;
@@ -2165,7 +2240,7 @@ var Module = (() => {
2165
2240
  _free(value);
2166
2241
  return str;
2167
2242
  },
2168
- 'toWireType'(destructors, value) {
2243
+ 'toWireType': function (destructors, value) {
2169
2244
  if (value instanceof ArrayBuffer) {
2170
2245
  value = new Uint8Array(value);
2171
2246
  }
@@ -2209,16 +2284,14 @@ var Module = (() => {
2209
2284
  }
2210
2285
  return base;
2211
2286
  },
2212
- 'argPackAdvance': GenericWireTypeSize,
2213
- 'readValueFromPointer': readPointer,
2214
- destructorFunction(ptr) {
2215
- _free(ptr);
2216
- },
2287
+ 'argPackAdvance': 8,
2288
+ 'readValueFromPointer': simpleReadValueFromPointer,
2289
+ destructorFunction: function (ptr) { _free(ptr); },
2217
2290
  });
2218
- };
2291
+ }
2219
2292
  var UTF16Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf-16le') : undefined;
2220
2293
  ;
2221
- var UTF16ToString = (ptr, maxBytesToRead) => {
2294
+ function UTF16ToString(ptr, maxBytesToRead) {
2222
2295
  var endPtr = ptr;
2223
2296
  // TextDecoder needs to know the byte length in advance, it doesn't stop on
2224
2297
  // null terminator by itself.
@@ -2247,8 +2320,8 @@ var Module = (() => {
2247
2320
  str += String.fromCharCode(codeUnit);
2248
2321
  }
2249
2322
  return str;
2250
- };
2251
- var stringToUTF16 = (str, outPtr, maxBytesToWrite) => {
2323
+ }
2324
+ function stringToUTF16(str, outPtr, maxBytesToWrite) {
2252
2325
  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
2253
2326
  if (maxBytesToWrite === undefined) {
2254
2327
  maxBytesToWrite = 0x7FFFFFFF;
@@ -2267,11 +2340,11 @@ var Module = (() => {
2267
2340
  // Null-terminate the pointer to the HEAP.
2268
2341
  HEAP16[((outPtr) >> 1)] = 0;
2269
2342
  return outPtr - startPtr;
2270
- };
2271
- var lengthBytesUTF16 = (str) => {
2343
+ }
2344
+ function lengthBytesUTF16(str) {
2272
2345
  return str.length * 2;
2273
- };
2274
- var UTF32ToString = (ptr, maxBytesToRead) => {
2346
+ }
2347
+ function UTF32ToString(ptr, maxBytesToRead) {
2275
2348
  var i = 0;
2276
2349
  var str = '';
2277
2350
  // If maxBytesToRead is not passed explicitly, it will be undefined, and this
@@ -2292,8 +2365,8 @@ var Module = (() => {
2292
2365
  }
2293
2366
  }
2294
2367
  return str;
2295
- };
2296
- var stringToUTF32 = (str, outPtr, maxBytesToWrite) => {
2368
+ }
2369
+ function stringToUTF32(str, outPtr, maxBytesToWrite) {
2297
2370
  // Backwards compatibility: if max bytes is not specified, assume unsafe unbounded write is allowed.
2298
2371
  if (maxBytesToWrite === undefined) {
2299
2372
  maxBytesToWrite = 0x7FFFFFFF;
@@ -2318,8 +2391,8 @@ var Module = (() => {
2318
2391
  // Null-terminate the pointer to the HEAP.
2319
2392
  HEAP32[((outPtr) >> 2)] = 0;
2320
2393
  return outPtr - startPtr;
2321
- };
2322
- var lengthBytesUTF32 = (str) => {
2394
+ }
2395
+ function lengthBytesUTF32(str) {
2323
2396
  var len = 0;
2324
2397
  for (var i = 0; i < str.length; ++i) {
2325
2398
  // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code unit, not a Unicode code point of the character! We must decode the string to UTF-32 to the heap.
@@ -2330,8 +2403,8 @@ var Module = (() => {
2330
2403
  len += 4;
2331
2404
  }
2332
2405
  return len;
2333
- };
2334
- var __embind_register_std_wstring = (rawType, charSize, name) => {
2406
+ }
2407
+ function __embind_register_std_wstring(rawType, charSize, name) {
2335
2408
  name = readLatin1String(name);
2336
2409
  var decodeString, encodeString, getHeap, lengthBytesUTF, shift;
2337
2410
  if (charSize === 2) {
@@ -2349,10 +2422,10 @@ var Module = (() => {
2349
2422
  shift = 2;
2350
2423
  }
2351
2424
  registerType(rawType, {
2352
- name,
2353
- 'fromWireType': (value) => {
2425
+ name: name,
2426
+ 'fromWireType': function (value) {
2354
2427
  // Code mostly taken from _embind_register_std_string fromWireType
2355
- var length = HEAPU32[((value) >> 2)];
2428
+ var length = HEAPU32[value >> 2];
2356
2429
  var HEAP = getHeap();
2357
2430
  var str;
2358
2431
  var decodeStartPtr = value + 4;
@@ -2375,9 +2448,9 @@ var Module = (() => {
2375
2448
  _free(value);
2376
2449
  return str;
2377
2450
  },
2378
- 'toWireType': (destructors, value) => {
2451
+ 'toWireType': function (destructors, value) {
2379
2452
  if (!(typeof value == 'string')) {
2380
- throwBindingError(`Cannot pass non-string to C++ string type ${name}`);
2453
+ throwBindingError('Cannot pass non-string to C++ string type ' + name);
2381
2454
  }
2382
2455
  // assumes 4-byte alignment
2383
2456
  var length = lengthBytesUTF(value);
@@ -2389,92 +2462,94 @@ var Module = (() => {
2389
2462
  }
2390
2463
  return ptr;
2391
2464
  },
2392
- 'argPackAdvance': GenericWireTypeSize,
2465
+ 'argPackAdvance': 8,
2393
2466
  'readValueFromPointer': simpleReadValueFromPointer,
2394
- destructorFunction(ptr) {
2395
- _free(ptr);
2396
- }
2467
+ destructorFunction: function (ptr) { _free(ptr); },
2397
2468
  });
2398
- };
2399
- var __embind_register_value_object = (rawType, name, constructorSignature, rawConstructor, destructorSignature, rawDestructor) => {
2469
+ }
2470
+ function __embind_register_value_object(rawType, name, constructorSignature, rawConstructor, destructorSignature, rawDestructor) {
2400
2471
  structRegistrations[rawType] = {
2401
2472
  name: readLatin1String(name),
2402
2473
  rawConstructor: embind__requireFunction(constructorSignature, rawConstructor),
2403
2474
  rawDestructor: embind__requireFunction(destructorSignature, rawDestructor),
2404
2475
  fields: [],
2405
2476
  };
2406
- };
2407
- var __embind_register_value_object_field = (structType, fieldName, getterReturnType, getterSignature, getter, getterContext, setterArgumentType, setterSignature, setter, setterContext) => {
2477
+ }
2478
+ function __embind_register_value_object_field(structType, fieldName, getterReturnType, getterSignature, getter, getterContext, setterArgumentType, setterSignature, setter, setterContext) {
2408
2479
  structRegistrations[structType].fields.push({
2409
2480
  fieldName: readLatin1String(fieldName),
2410
- getterReturnType,
2481
+ getterReturnType: getterReturnType,
2411
2482
  getter: embind__requireFunction(getterSignature, getter),
2412
- getterContext,
2413
- setterArgumentType,
2483
+ getterContext: getterContext,
2484
+ setterArgumentType: setterArgumentType,
2414
2485
  setter: embind__requireFunction(setterSignature, setter),
2415
- setterContext,
2486
+ setterContext: setterContext,
2416
2487
  });
2417
- };
2418
- var __embind_register_void = (rawType, name) => {
2488
+ }
2489
+ function __embind_register_void(rawType, name) {
2419
2490
  name = readLatin1String(name);
2420
2491
  registerType(rawType, {
2421
2492
  isVoid: true,
2422
- name,
2493
+ name: name,
2423
2494
  'argPackAdvance': 0,
2424
- 'fromWireType': () => undefined,
2425
- // TODO: assert if anything else is given?
2426
- 'toWireType': (destructors, o) => undefined,
2495
+ 'fromWireType': function () {
2496
+ return undefined;
2497
+ },
2498
+ 'toWireType': function (destructors, o) {
2499
+ // TODO: assert if anything else is given?
2500
+ return undefined;
2501
+ },
2427
2502
  });
2428
- };
2429
- var requireRegisteredType = (rawType, humanName) => {
2503
+ }
2504
+ function requireRegisteredType(rawType, humanName) {
2430
2505
  var impl = registeredTypes[rawType];
2431
2506
  if (undefined === impl) {
2432
2507
  throwBindingError(humanName + " has unknown type " + getTypeName(rawType));
2433
2508
  }
2434
2509
  return impl;
2435
- };
2436
- var __emval_as = (handle, returnType, destructorsRef) => {
2510
+ }
2511
+ function __emval_as(handle, returnType, destructorsRef) {
2437
2512
  handle = Emval.toValue(handle);
2438
2513
  returnType = requireRegisteredType(returnType, 'emval::as');
2439
2514
  var destructors = [];
2440
2515
  var rd = Emval.toHandle(destructors);
2441
2516
  HEAPU32[((destructorsRef) >> 2)] = rd;
2442
2517
  return returnType['toWireType'](destructors, handle);
2443
- };
2444
- var emval_allocateDestructors = (destructorsRef) => {
2518
+ }
2519
+ function emval_allocateDestructors(destructorsRef) {
2445
2520
  var destructors = [];
2446
2521
  HEAPU32[((destructorsRef) >> 2)] = Emval.toHandle(destructors);
2447
2522
  return destructors;
2448
- };
2523
+ }
2449
2524
  var emval_symbols = {};
2450
- var getStringOrSymbol = (address) => {
2525
+ function getStringOrSymbol(address) {
2451
2526
  var symbol = emval_symbols[address];
2452
2527
  if (symbol === undefined) {
2453
2528
  return readLatin1String(address);
2454
2529
  }
2455
2530
  return symbol;
2456
- };
2531
+ }
2457
2532
  var emval_methodCallers = [];
2458
- var __emval_call_void_method = (caller, handle, methodName, args) => {
2533
+ function __emval_call_void_method(caller, handle, methodName, args) {
2459
2534
  caller = emval_methodCallers[caller];
2460
2535
  handle = Emval.toValue(handle);
2461
2536
  methodName = getStringOrSymbol(methodName);
2462
2537
  caller(handle, methodName, null, args);
2463
- };
2464
- var emval_addMethodCaller = (caller) => {
2538
+ }
2539
+ function emval_addMethodCaller(caller) {
2465
2540
  var id = emval_methodCallers.length;
2466
2541
  emval_methodCallers.push(caller);
2467
2542
  return id;
2468
- };
2469
- var emval_lookupTypes = (argCount, argTypes) => {
2543
+ }
2544
+ function emval_lookupTypes(argCount, argTypes) {
2470
2545
  var a = new Array(argCount);
2471
2546
  for (var i = 0; i < argCount; ++i) {
2472
2547
  a[i] = requireRegisteredType(HEAPU32[(((argTypes) + (i * 4)) >> 2)], "parameter " + i);
2473
2548
  }
2474
2549
  return a;
2475
- };
2476
- var emval_registeredMethods = {};
2477
- var __emval_get_method_caller = (argCount, argTypes) => {
2550
+ }
2551
+ var emval_registeredMethods = [];
2552
+ function __emval_get_method_caller(argCount, argTypes) {
2478
2553
  var types = emval_lookupTypes(argCount, argTypes);
2479
2554
  var retType = types[0];
2480
2555
  var signatureName = retType.name + "_$" + types.slice(1).map(function (t) { return t.name; }).join("_") + "$";
@@ -2513,53 +2588,55 @@ var Module = (() => {
2513
2588
  functionBody +=
2514
2589
  "};\n";
2515
2590
  params.push(functionBody);
2516
- var invokerFunction = newFunc(Function, params).apply(null, args);
2591
+ var invokerFunction = new_(Function, params).apply(null, args);
2517
2592
  returnId = emval_addMethodCaller(invokerFunction);
2518
2593
  emval_registeredMethods[signatureName] = returnId;
2519
2594
  return returnId;
2520
- };
2521
- var __emval_get_property = (handle, key) => {
2595
+ }
2596
+ function __emval_get_property(handle, key) {
2522
2597
  handle = Emval.toValue(handle);
2523
2598
  key = Emval.toValue(key);
2524
2599
  return Emval.toHandle(handle[key]);
2525
- };
2526
- var __emval_incref = (handle) => {
2600
+ }
2601
+ function __emval_incref(handle) {
2527
2602
  if (handle > 4) {
2528
- emval_handles.get(handle).refcount += 1;
2603
+ emval_handle_array[handle].refcount += 1;
2529
2604
  }
2530
- };
2531
- var __emval_new_array = () => {
2605
+ }
2606
+ function __emval_new_array() {
2532
2607
  return Emval.toHandle([]);
2533
- };
2534
- var __emval_new_cstring = (v) => {
2608
+ }
2609
+ function __emval_new_cstring(v) {
2535
2610
  return Emval.toHandle(getStringOrSymbol(v));
2536
- };
2537
- var __emval_run_destructors = (handle) => {
2611
+ }
2612
+ function __emval_run_destructors(handle) {
2538
2613
  var destructors = Emval.toValue(handle);
2539
2614
  runDestructors(destructors);
2540
2615
  __emval_decref(handle);
2541
- };
2542
- var __emval_take_value = (type, arg) => {
2616
+ }
2617
+ function __emval_take_value(type, arg) {
2543
2618
  type = requireRegisteredType(type, '_emval_take_value');
2544
2619
  var v = type['readValueFromPointer'](arg);
2545
2620
  return Emval.toHandle(v);
2546
- };
2547
- var _abort = () => {
2621
+ }
2622
+ function _abort() {
2548
2623
  abort('');
2549
- };
2550
- var _emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num);
2551
- var getHeapMax = () =>
2552
- // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate
2553
- // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side
2554
- // for any code that deals with heap sizes, which would require special
2555
- // casing all heap size related code to treat 0 specially.
2556
- 2147483648;
2557
- var growMemory = (size) => {
2624
+ }
2625
+ function _emscripten_memcpy_big(dest, src, num) {
2626
+ HEAPU8.copyWithin(dest, src, src + num);
2627
+ }
2628
+ function getHeapMax() {
2629
+ // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate
2630
+ // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side
2631
+ // for any code that deals with heap sizes, which would require special
2632
+ // casing all heap size related code to treat 0 specially.
2633
+ return 2147483648;
2634
+ }
2635
+ function emscripten_realloc_buffer(size) {
2558
2636
  var b = wasmMemory.buffer;
2559
- var pages = (size - b.byteLength + 65535) / 65536;
2560
2637
  try {
2561
2638
  // 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
2639
+ wasmMemory.grow((size - b.byteLength + 65535) >>> 16); // .grow() takes a delta compared to the previous size
2563
2640
  updateMemoryViews();
2564
2641
  return 1 /*success*/;
2565
2642
  }
@@ -2567,11 +2644,10 @@ var Module = (() => {
2567
2644
  }
2568
2645
  // implicit 0 return to save code size (caller will cast "undefined" into 0
2569
2646
  // anyhow)
2570
- };
2571
- var _emscripten_resize_heap = (requestedSize) => {
2647
+ }
2648
+ function _emscripten_resize_heap(requestedSize) {
2572
2649
  var oldSize = HEAPU8.length;
2573
- // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
2574
- requestedSize >>>= 0;
2650
+ requestedSize = requestedSize >>> 0;
2575
2651
  // With multithreaded builds, races can happen (another thread might increase the size
2576
2652
  // in between), so return a failure, and let the caller retry.
2577
2653
  // Memory resize rules:
@@ -2596,7 +2672,7 @@ var Module = (() => {
2596
2672
  if (requestedSize > maxHeapSize) {
2597
2673
  return false;
2598
2674
  }
2599
- var alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;
2675
+ let alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;
2600
2676
  // Loop through potential heap size increases. If we attempt a too eager
2601
2677
  // reservation that fails, cut down on the attempted size and reserve a
2602
2678
  // smaller bump instead. (max 3 times, chosen somewhat arbitrarily)
@@ -2605,18 +2681,18 @@ var Module = (() => {
2605
2681
  // but limit overreserving (default to capping at +96MB overgrowth at most)
2606
2682
  overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);
2607
2683
  var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));
2608
- var replacement = growMemory(newSize);
2684
+ var replacement = emscripten_realloc_buffer(newSize);
2609
2685
  if (replacement) {
2610
2686
  return true;
2611
2687
  }
2612
2688
  }
2613
2689
  return false;
2614
- };
2690
+ }
2615
2691
  var ENV = {};
2616
- var getExecutableName = () => {
2692
+ function getExecutableName() {
2617
2693
  return thisProgram || './this.program';
2618
- };
2619
- var getEnvStrings = () => {
2694
+ }
2695
+ function getEnvStrings() {
2620
2696
  if (!getEnvStrings.strings) {
2621
2697
  // Default values.
2622
2698
  // Browser language detection #8751
@@ -2642,69 +2718,67 @@ var Module = (() => {
2642
2718
  }
2643
2719
  var strings = [];
2644
2720
  for (var x in env) {
2645
- strings.push(`${x}=${env[x]}`);
2721
+ strings.push(x + '=' + env[x]);
2646
2722
  }
2647
2723
  getEnvStrings.strings = strings;
2648
2724
  }
2649
2725
  return getEnvStrings.strings;
2650
- };
2651
- var stringToAscii = (str, buffer) => {
2726
+ }
2727
+ /** @param {boolean=} dontAddNull */
2728
+ function writeAsciiToMemory(str, buffer, dontAddNull) {
2652
2729
  for (var i = 0; i < str.length; ++i) {
2653
2730
  HEAP8[((buffer++) >> 0)] = str.charCodeAt(i);
2654
2731
  }
2655
- // Null-terminate the string
2656
- HEAP8[((buffer) >> 0)] = 0;
2657
- };
2658
- var SYSCALLS = {
2659
- varargs: undefined,
2660
- get() {
2661
- // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number.
2662
- var ret = HEAP32[((+SYSCALLS.varargs) >> 2)];
2732
+ // Null-terminate the pointer to the HEAP.
2733
+ if (!dontAddNull)
2734
+ HEAP8[((buffer) >> 0)] = 0;
2735
+ }
2736
+ var SYSCALLS = { varargs: undefined, get: function () {
2663
2737
  SYSCALLS.varargs += 4;
2738
+ var ret = HEAP32[(((SYSCALLS.varargs) - (4)) >> 2)];
2664
2739
  return ret;
2665
- },
2666
- getp() { return SYSCALLS.get(); },
2667
- getStr(ptr) {
2740
+ }, getStr: function (ptr) {
2668
2741
  var ret = UTF8ToString(ptr);
2669
2742
  return ret;
2670
- },
2671
- };
2672
- var _environ_get = (__environ, environ_buf) => {
2743
+ } };
2744
+ function _environ_get(__environ, environ_buf) {
2673
2745
  var bufSize = 0;
2674
- getEnvStrings().forEach((string, i) => {
2746
+ getEnvStrings().forEach(function (string, i) {
2675
2747
  var ptr = environ_buf + bufSize;
2676
2748
  HEAPU32[(((__environ) + (i * 4)) >> 2)] = ptr;
2677
- stringToAscii(string, ptr);
2749
+ writeAsciiToMemory(string, ptr);
2678
2750
  bufSize += string.length + 1;
2679
2751
  });
2680
2752
  return 0;
2681
- };
2682
- var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
2753
+ }
2754
+ function _environ_sizes_get(penviron_count, penviron_buf_size) {
2683
2755
  var strings = getEnvStrings();
2684
2756
  HEAPU32[((penviron_count) >> 2)] = strings.length;
2685
2757
  var bufSize = 0;
2686
- strings.forEach((string) => bufSize += string.length + 1);
2758
+ strings.forEach(function (string) {
2759
+ bufSize += string.length + 1;
2760
+ });
2687
2761
  HEAPU32[((penviron_buf_size) >> 2)] = bufSize;
2688
2762
  return 0;
2689
- };
2690
- var isLeapYear = (year) => {
2763
+ }
2764
+ function __isLeapYear(year) {
2691
2765
  return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
2692
- };
2693
- var arraySum = (array, index) => {
2766
+ }
2767
+ function __arraySum(array, index) {
2694
2768
  var sum = 0;
2695
2769
  for (var i = 0; i <= index; sum += array[i++]) {
2696
2770
  // no-op
2697
2771
  }
2698
2772
  return sum;
2699
- };
2700
- var MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2701
- var MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2702
- var addDays = (date, days) => {
2773
+ }
2774
+ var __MONTH_DAYS_LEAP = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2775
+ var __MONTH_DAYS_REGULAR = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
2776
+ function __addDays(date, days) {
2703
2777
  var newDate = new Date(date.getTime());
2704
2778
  while (days > 0) {
2705
- var leap = isLeapYear(newDate.getFullYear());
2779
+ var leap = __isLeapYear(newDate.getFullYear());
2706
2780
  var currentMonth = newDate.getMonth();
2707
- var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth];
2781
+ var daysInCurrentMonth = (leap ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR)[currentMonth];
2708
2782
  if (days > daysInCurrentMonth - newDate.getDate()) {
2709
2783
  // we spill over to next month
2710
2784
  days -= (daysInCurrentMonth - newDate.getDate() + 1);
@@ -2724,7 +2798,7 @@ var Module = (() => {
2724
2798
  }
2725
2799
  }
2726
2800
  return newDate;
2727
- };
2801
+ }
2728
2802
  /** @type {function(string, boolean=, number=)} */
2729
2803
  function intArrayFromString(stringy, dontAddNull, length) {
2730
2804
  var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;
@@ -2734,13 +2808,13 @@ var Module = (() => {
2734
2808
  u8array.length = numBytesWritten;
2735
2809
  return u8array;
2736
2810
  }
2737
- var writeArrayToMemory = (array, buffer) => {
2811
+ function writeArrayToMemory(array, buffer) {
2738
2812
  HEAP8.set(array, buffer);
2739
- };
2740
- var _strftime = (s, maxsize, format, tm) => {
2813
+ }
2814
+ function _strftime(s, maxsize, format, tm) {
2741
2815
  // size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr);
2742
2816
  // http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
2743
- var tm_zone = HEAPU32[(((tm) + (40)) >> 2)];
2817
+ var tm_zone = HEAP32[(((tm) + (40)) >> 2)];
2744
2818
  var date = {
2745
2819
  tm_sec: HEAP32[((tm) >> 2)],
2746
2820
  tm_min: HEAP32[(((tm) + (4)) >> 2)],
@@ -2833,7 +2907,7 @@ var Module = (() => {
2833
2907
  }
2834
2908
  }
2835
2909
  function getWeekBasedYear(date) {
2836
- var thisDate = addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
2910
+ var thisDate = __addDays(new Date(date.tm_year + 1900, 0, 1), date.tm_yday);
2837
2911
  var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4);
2838
2912
  var janFourthNextYear = new Date(thisDate.getFullYear() + 1, 0, 4);
2839
2913
  var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);
@@ -2848,17 +2922,29 @@ var Module = (() => {
2848
2922
  return thisDate.getFullYear() - 1;
2849
2923
  }
2850
2924
  var EXPANSION_RULES_2 = {
2851
- '%a': (date) => WEEKDAYS[date.tm_wday].substring(0, 3),
2852
- '%A': (date) => WEEKDAYS[date.tm_wday],
2853
- '%b': (date) => MONTHS[date.tm_mon].substring(0, 3),
2854
- '%B': (date) => MONTHS[date.tm_mon],
2855
- '%C': (date) => {
2925
+ '%a': function (date) {
2926
+ return WEEKDAYS[date.tm_wday].substring(0, 3);
2927
+ },
2928
+ '%A': function (date) {
2929
+ return WEEKDAYS[date.tm_wday];
2930
+ },
2931
+ '%b': function (date) {
2932
+ return MONTHS[date.tm_mon].substring(0, 3);
2933
+ },
2934
+ '%B': function (date) {
2935
+ return MONTHS[date.tm_mon];
2936
+ },
2937
+ '%C': function (date) {
2856
2938
  var year = date.tm_year + 1900;
2857
2939
  return leadingNulls((year / 100) | 0, 2);
2858
2940
  },
2859
- '%d': (date) => leadingNulls(date.tm_mday, 2),
2860
- '%e': (date) => leadingSomething(date.tm_mday, 2, ' '),
2861
- '%g': (date) => {
2941
+ '%d': function (date) {
2942
+ return leadingNulls(date.tm_mday, 2);
2943
+ },
2944
+ '%e': function (date) {
2945
+ return leadingSomething(date.tm_mday, 2, ' ');
2946
+ },
2947
+ '%g': function (date) {
2862
2948
  // %g, %G, and %V give values according to the ISO 8601:2000 standard week-based year.
2863
2949
  // In this system, weeks begin on a Monday and week 1 of the year is the week that includes
2864
2950
  // January 4th, which is also the week that includes the first Thursday of the year, and
@@ -2870,9 +2956,13 @@ var Module = (() => {
2870
2956
  // Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and %V is replaced by 01.
2871
2957
  return getWeekBasedYear(date).toString().substring(2);
2872
2958
  },
2873
- '%G': (date) => getWeekBasedYear(date),
2874
- '%H': (date) => leadingNulls(date.tm_hour, 2),
2875
- '%I': (date) => {
2959
+ '%G': function (date) {
2960
+ return getWeekBasedYear(date);
2961
+ },
2962
+ '%H': function (date) {
2963
+ return leadingNulls(date.tm_hour, 2);
2964
+ },
2965
+ '%I': function (date) {
2876
2966
  var twelveHour = date.tm_hour;
2877
2967
  if (twelveHour == 0)
2878
2968
  twelveHour = 12;
@@ -2880,27 +2970,39 @@ var Module = (() => {
2880
2970
  twelveHour -= 12;
2881
2971
  return leadingNulls(twelveHour, 2);
2882
2972
  },
2883
- '%j': (date) => {
2973
+ '%j': function (date) {
2884
2974
  // Day of the year (001-366)
2885
- return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year + 1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon - 1), 3);
2975
+ return leadingNulls(date.tm_mday + __arraySum(__isLeapYear(date.tm_year + 1900) ? __MONTH_DAYS_LEAP : __MONTH_DAYS_REGULAR, date.tm_mon - 1), 3);
2976
+ },
2977
+ '%m': function (date) {
2978
+ return leadingNulls(date.tm_mon + 1, 2);
2979
+ },
2980
+ '%M': function (date) {
2981
+ return leadingNulls(date.tm_min, 2);
2982
+ },
2983
+ '%n': function () {
2984
+ return '\n';
2886
2985
  },
2887
- '%m': (date) => leadingNulls(date.tm_mon + 1, 2),
2888
- '%M': (date) => leadingNulls(date.tm_min, 2),
2889
- '%n': () => '\n',
2890
- '%p': (date) => {
2986
+ '%p': function (date) {
2891
2987
  if (date.tm_hour >= 0 && date.tm_hour < 12) {
2892
2988
  return 'AM';
2893
2989
  }
2894
2990
  return 'PM';
2895
2991
  },
2896
- '%S': (date) => leadingNulls(date.tm_sec, 2),
2897
- '%t': () => '\t',
2898
- '%u': (date) => date.tm_wday || 7,
2899
- '%U': (date) => {
2992
+ '%S': function (date) {
2993
+ return leadingNulls(date.tm_sec, 2);
2994
+ },
2995
+ '%t': function () {
2996
+ return '\t';
2997
+ },
2998
+ '%u': function (date) {
2999
+ return date.tm_wday || 7;
3000
+ },
3001
+ '%U': function (date) {
2900
3002
  var days = date.tm_yday + 7 - date.tm_wday;
2901
3003
  return leadingNulls(Math.floor(days / 7), 2);
2902
3004
  },
2903
- '%V': (date) => {
3005
+ '%V': function (date) {
2904
3006
  // Replaced by the week number of the year (Monday as the first day of the week)
2905
3007
  // as a decimal number [01,53]. If the week containing 1 January has four
2906
3008
  // or more days in the new year, then it is considered week 1.
@@ -2917,7 +3019,7 @@ var Module = (() => {
2917
3019
  // If 31 December of prev year a Thursday, or Friday of a
2918
3020
  // leap year, then the prev year has 53 weeks.
2919
3021
  var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7;
2920
- if (dec31 == 4 || (dec31 == 5 && isLeapYear(date.tm_year % 400 - 1))) {
3022
+ if (dec31 == 4 || (dec31 == 5 && __isLeapYear(date.tm_year % 400 - 1))) {
2921
3023
  val++;
2922
3024
  }
2923
3025
  }
@@ -2925,23 +3027,27 @@ var Module = (() => {
2925
3027
  // If 1 January is not a Thursday, and not a Wednesday of a
2926
3028
  // leap year, then this year has only 52 weeks.
2927
3029
  var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7;
2928
- if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year)))
3030
+ if (jan1 != 4 && (jan1 != 3 || !__isLeapYear(date.tm_year)))
2929
3031
  val = 1;
2930
3032
  }
2931
3033
  return leadingNulls(val, 2);
2932
3034
  },
2933
- '%w': (date) => date.tm_wday,
2934
- '%W': (date) => {
3035
+ '%w': function (date) {
3036
+ return date.tm_wday;
3037
+ },
3038
+ '%W': function (date) {
2935
3039
  var days = date.tm_yday + 7 - ((date.tm_wday + 6) % 7);
2936
3040
  return leadingNulls(Math.floor(days / 7), 2);
2937
3041
  },
2938
- '%y': (date) => {
3042
+ '%y': function (date) {
2939
3043
  // Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year]
2940
3044
  return (date.tm_year + 1900).toString().substring(2);
2941
3045
  },
2942
- // Replaced by the year as a decimal number (for example, 1997). [ tm_year]
2943
- '%Y': (date) => date.tm_year + 1900,
2944
- '%z': (date) => {
3046
+ '%Y': function (date) {
3047
+ // Replaced by the year as a decimal number (for example, 1997). [ tm_year]
3048
+ return date.tm_year + 1900;
3049
+ },
3050
+ '%z': function (date) {
2945
3051
  // Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ).
2946
3052
  // For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich).
2947
3053
  var off = date.tm_gmtoff;
@@ -2951,8 +3057,12 @@ var Module = (() => {
2951
3057
  off = (off / 60) * 100 + (off % 60);
2952
3058
  return (ahead ? '+' : '-') + String("0000" + off).slice(-4);
2953
3059
  },
2954
- '%Z': (date) => date.tm_zone,
2955
- '%%': () => '%'
3060
+ '%Z': function (date) {
3061
+ return date.tm_zone;
3062
+ },
3063
+ '%%': function () {
3064
+ return '%';
3065
+ }
2956
3066
  };
2957
3067
  // Replace %% with a pair of NULLs (which cannot occur in a C string), then
2958
3068
  // re-inject them after processing.
@@ -2969,122 +3079,130 @@ var Module = (() => {
2969
3079
  }
2970
3080
  writeArrayToMemory(bytes, s);
2971
3081
  return bytes.length - 1;
2972
- };
2973
- var _strftime_l = (s, maxsize, format, tm, loc) => {
3082
+ }
3083
+ function _strftime_l(s, maxsize, format, tm, loc) {
2974
3084
  return _strftime(s, maxsize, format, tm); // no locale support yet
2975
- };
2976
- InternalError = Module['InternalError'] = class InternalError extends Error {
2977
- constructor(message) { super(message); this.name = 'InternalError'; }
2978
- };
3085
+ }
3086
+ InternalError = Module['InternalError'] = extendError(Error, 'InternalError');
3087
+ ;
2979
3088
  embind_init_charCodes();
2980
- BindingError = Module['BindingError'] = class BindingError extends Error {
2981
- constructor(message) { super(message); this.name = 'BindingError'; }
2982
- };
3089
+ BindingError = Module['BindingError'] = extendError(Error, 'BindingError');
3090
+ ;
2983
3091
  init_ClassHandle();
2984
3092
  init_embind();
2985
3093
  ;
2986
3094
  init_RegisteredPointer();
2987
3095
  UnboundTypeError = Module['UnboundTypeError'] = extendError(Error, 'UnboundTypeError');
2988
3096
  ;
2989
- handleAllocatorInit();
2990
3097
  init_emval();
2991
3098
  ;
2992
3099
  var wasmImports = {
2993
- /** @export */
2994
- __assert_fail: ___assert_fail,
2995
- /** @export */
2996
- _embind_finalize_value_object: __embind_finalize_value_object,
2997
- /** @export */
2998
- _embind_register_bigint: __embind_register_bigint,
2999
- /** @export */
3000
- _embind_register_bool: __embind_register_bool,
3001
- /** @export */
3002
- _embind_register_class: __embind_register_class,
3003
- /** @export */
3004
- _embind_register_class_constructor: __embind_register_class_constructor,
3005
- /** @export */
3006
- _embind_register_class_property: __embind_register_class_property,
3007
- /** @export */
3008
- _embind_register_emval: __embind_register_emval,
3009
- /** @export */
3010
- _embind_register_float: __embind_register_float,
3011
- /** @export */
3012
- _embind_register_function: __embind_register_function,
3013
- /** @export */
3014
- _embind_register_integer: __embind_register_integer,
3015
- /** @export */
3016
- _embind_register_memory_view: __embind_register_memory_view,
3017
- /** @export */
3018
- _embind_register_std_string: __embind_register_std_string,
3019
- /** @export */
3020
- _embind_register_std_wstring: __embind_register_std_wstring,
3021
- /** @export */
3022
- _embind_register_value_object: __embind_register_value_object,
3023
- /** @export */
3024
- _embind_register_value_object_field: __embind_register_value_object_field,
3025
- /** @export */
3026
- _embind_register_void: __embind_register_void,
3027
- /** @export */
3028
- _emval_as: __emval_as,
3029
- /** @export */
3030
- _emval_call_void_method: __emval_call_void_method,
3031
- /** @export */
3032
- _emval_decref: __emval_decref,
3033
- /** @export */
3034
- _emval_get_method_caller: __emval_get_method_caller,
3035
- /** @export */
3036
- _emval_get_property: __emval_get_property,
3037
- /** @export */
3038
- _emval_incref: __emval_incref,
3039
- /** @export */
3040
- _emval_new_array: __emval_new_array,
3041
- /** @export */
3042
- _emval_new_cstring: __emval_new_cstring,
3043
- /** @export */
3044
- _emval_run_destructors: __emval_run_destructors,
3045
- /** @export */
3046
- _emval_take_value: __emval_take_value,
3047
- /** @export */
3048
- abort: _abort,
3049
- /** @export */
3050
- emscripten_memcpy_js: _emscripten_memcpy_js,
3051
- /** @export */
3052
- emscripten_resize_heap: _emscripten_resize_heap,
3053
- /** @export */
3054
- environ_get: _environ_get,
3055
- /** @export */
3056
- environ_sizes_get: _environ_sizes_get,
3057
- /** @export */
3058
- strftime_l: _strftime_l,
3059
- /** @export */
3060
- wasm_loadfileproc: wasm_loadfileproc,
3061
- /** @export */
3062
- wasm_msgproc: wasm_msgproc
3063
- };
3064
- var wasmExports = createWasm();
3065
- var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports['__wasm_call_ctors'])();
3066
- var _kmcmp_CompileKeyboard = Module['_kmcmp_CompileKeyboard'] = (a0, a1, a2, a3, a4, a5) => (_kmcmp_CompileKeyboard = Module['_kmcmp_CompileKeyboard'] = wasmExports['kmcmp_CompileKeyboard'])(a0, a1, a2, a3, a4, a5);
3067
- var _kmcmp_parseUnicodeSet = Module['_kmcmp_parseUnicodeSet'] = (a0, a1, a2) => (_kmcmp_parseUnicodeSet = Module['_kmcmp_parseUnicodeSet'] = wasmExports['kmcmp_parseUnicodeSet'])(a0, a1, a2);
3068
- var _malloc = (a0) => (_malloc = wasmExports['malloc'])(a0);
3069
- var _free = (a0) => (_free = wasmExports['free'])(a0);
3070
- var ___getTypeName = (a0) => (___getTypeName = wasmExports['__getTypeName'])(a0);
3071
- var __embind_initialize_bindings = Module['__embind_initialize_bindings'] = () => (__embind_initialize_bindings = Module['__embind_initialize_bindings'] = wasmExports['_embind_initialize_bindings'])();
3072
- var ___errno_location = () => (___errno_location = wasmExports['__errno_location'])();
3073
- var ___trap = () => (___trap = wasmExports['__trap'])();
3074
- var setTempRet0 = (a0) => (setTempRet0 = wasmExports['setTempRet0'])(a0);
3075
- var stackSave = () => (stackSave = wasmExports['stackSave'])();
3076
- var stackRestore = (a0) => (stackRestore = wasmExports['stackRestore'])(a0);
3077
- var stackAlloc = (a0) => (stackAlloc = wasmExports['stackAlloc'])(a0);
3078
- var dynCall_viijii = Module['dynCall_viijii'] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_viijii = Module['dynCall_viijii'] = wasmExports['dynCall_viijii'])(a0, a1, a2, a3, a4, a5, a6);
3079
- var dynCall_iiiiij = Module['dynCall_iiiiij'] = (a0, a1, a2, a3, a4, a5, a6) => (dynCall_iiiiij = Module['dynCall_iiiiij'] = wasmExports['dynCall_iiiiij'])(a0, a1, a2, a3, a4, a5, a6);
3080
- var dynCall_iiiiijj = Module['dynCall_iiiiijj'] = (a0, a1, a2, a3, a4, a5, a6, a7, a8) => (dynCall_iiiiijj = Module['dynCall_iiiiijj'] = wasmExports['dynCall_iiiiijj'])(a0, a1, a2, a3, a4, a5, a6, a7, a8);
3081
- var dynCall_iiiiiijj = Module['dynCall_iiiiiijj'] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) => (dynCall_iiiiiijj = Module['dynCall_iiiiiijj'] = wasmExports['dynCall_iiiiiijj'])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
3082
- var ___start_em_js = Module['___start_em_js'] = 59184;
3083
- var ___stop_em_js = Module['___stop_em_js'] = 59880;
3100
+ "__assert_fail": ___assert_fail,
3101
+ "_embind_finalize_value_object": __embind_finalize_value_object,
3102
+ "_embind_register_bigint": __embind_register_bigint,
3103
+ "_embind_register_bool": __embind_register_bool,
3104
+ "_embind_register_class": __embind_register_class,
3105
+ "_embind_register_class_constructor": __embind_register_class_constructor,
3106
+ "_embind_register_class_property": __embind_register_class_property,
3107
+ "_embind_register_emval": __embind_register_emval,
3108
+ "_embind_register_float": __embind_register_float,
3109
+ "_embind_register_function": __embind_register_function,
3110
+ "_embind_register_integer": __embind_register_integer,
3111
+ "_embind_register_memory_view": __embind_register_memory_view,
3112
+ "_embind_register_std_string": __embind_register_std_string,
3113
+ "_embind_register_std_wstring": __embind_register_std_wstring,
3114
+ "_embind_register_value_object": __embind_register_value_object,
3115
+ "_embind_register_value_object_field": __embind_register_value_object_field,
3116
+ "_embind_register_void": __embind_register_void,
3117
+ "_emval_as": __emval_as,
3118
+ "_emval_call_void_method": __emval_call_void_method,
3119
+ "_emval_decref": __emval_decref,
3120
+ "_emval_get_method_caller": __emval_get_method_caller,
3121
+ "_emval_get_property": __emval_get_property,
3122
+ "_emval_incref": __emval_incref,
3123
+ "_emval_new_array": __emval_new_array,
3124
+ "_emval_new_cstring": __emval_new_cstring,
3125
+ "_emval_run_destructors": __emval_run_destructors,
3126
+ "_emval_take_value": __emval_take_value,
3127
+ "abort": _abort,
3128
+ "emscripten_memcpy_big": _emscripten_memcpy_big,
3129
+ "emscripten_resize_heap": _emscripten_resize_heap,
3130
+ "environ_get": _environ_get,
3131
+ "environ_sizes_get": _environ_sizes_get,
3132
+ "strftime_l": _strftime_l,
3133
+ "wasm_loadfileproc": wasm_loadfileproc,
3134
+ "wasm_msgproc": wasm_msgproc
3135
+ };
3136
+ var asm = createWasm();
3137
+ /** @type {function(...*):?} */
3138
+ var ___wasm_call_ctors = function () {
3139
+ return (___wasm_call_ctors = Module["asm"]["__wasm_call_ctors"]).apply(null, arguments);
3140
+ };
3141
+ /** @type {function(...*):?} */
3142
+ var _kmcmp_CompileKeyboard = Module["_kmcmp_CompileKeyboard"] = function () {
3143
+ return (_kmcmp_CompileKeyboard = Module["_kmcmp_CompileKeyboard"] = Module["asm"]["kmcmp_CompileKeyboard"]).apply(null, arguments);
3144
+ };
3145
+ /** @type {function(...*):?} */
3146
+ var _kmcmp_parseUnicodeSet = Module["_kmcmp_parseUnicodeSet"] = function () {
3147
+ return (_kmcmp_parseUnicodeSet = Module["_kmcmp_parseUnicodeSet"] = Module["asm"]["kmcmp_parseUnicodeSet"]).apply(null, arguments);
3148
+ };
3149
+ /** @type {function(...*):?} */
3150
+ var _malloc = function () {
3151
+ return (_malloc = Module["asm"]["malloc"]).apply(null, arguments);
3152
+ };
3153
+ /** @type {function(...*):?} */
3154
+ var _free = function () {
3155
+ return (_free = Module["asm"]["free"]).apply(null, arguments);
3156
+ };
3157
+ /** @type {function(...*):?} */
3158
+ var ___getTypeName = Module["___getTypeName"] = function () {
3159
+ return (___getTypeName = Module["___getTypeName"] = Module["asm"]["__getTypeName"]).apply(null, arguments);
3160
+ };
3161
+ /** @type {function(...*):?} */
3162
+ var __embind_initialize_bindings = Module["__embind_initialize_bindings"] = function () {
3163
+ return (__embind_initialize_bindings = Module["__embind_initialize_bindings"] = Module["asm"]["_embind_initialize_bindings"]).apply(null, arguments);
3164
+ };
3165
+ /** @type {function(...*):?} */
3166
+ var ___errno_location = function () {
3167
+ return (___errno_location = Module["asm"]["__errno_location"]).apply(null, arguments);
3168
+ };
3169
+ /** @type {function(...*):?} */
3170
+ var ___trap = function () {
3171
+ return (___trap = Module["asm"]["__trap"]).apply(null, arguments);
3172
+ };
3173
+ /** @type {function(...*):?} */
3174
+ var stackSave = function () {
3175
+ return (stackSave = Module["asm"]["stackSave"]).apply(null, arguments);
3176
+ };
3177
+ /** @type {function(...*):?} */
3178
+ var stackRestore = function () {
3179
+ return (stackRestore = Module["asm"]["stackRestore"]).apply(null, arguments);
3180
+ };
3181
+ /** @type {function(...*):?} */
3182
+ var stackAlloc = function () {
3183
+ return (stackAlloc = Module["asm"]["stackAlloc"]).apply(null, arguments);
3184
+ };
3185
+ /** @type {function(...*):?} */
3186
+ var dynCall_viijii = Module["dynCall_viijii"] = function () {
3187
+ return (dynCall_viijii = Module["dynCall_viijii"] = Module["asm"]["dynCall_viijii"]).apply(null, arguments);
3188
+ };
3189
+ /** @type {function(...*):?} */
3190
+ var dynCall_iiiiij = Module["dynCall_iiiiij"] = function () {
3191
+ return (dynCall_iiiiij = Module["dynCall_iiiiij"] = Module["asm"]["dynCall_iiiiij"]).apply(null, arguments);
3192
+ };
3193
+ /** @type {function(...*):?} */
3194
+ var dynCall_iiiiijj = Module["dynCall_iiiiijj"] = function () {
3195
+ return (dynCall_iiiiijj = Module["dynCall_iiiiijj"] = Module["asm"]["dynCall_iiiiijj"]).apply(null, arguments);
3196
+ };
3197
+ /** @type {function(...*):?} */
3198
+ var dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = function () {
3199
+ return (dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = Module["asm"]["dynCall_iiiiiijj"]).apply(null, arguments);
3200
+ };
3201
+ var ___start_em_js = Module['___start_em_js'] = 59072;
3202
+ var ___stop_em_js = Module['___stop_em_js'] = 59768;
3084
3203
  // include: postamble.js
3085
3204
  // === Auto-generated postamble setup entry stuff ===
3086
- Module['wasmExports'] = wasmExports;
3087
- Module['UTF8ToString'] = UTF8ToString;
3205
+ Module["UTF8ToString"] = UTF8ToString;
3088
3206
  var calledRun;
3089
3207
  dependenciesFulfilled = function runCaller() {
3090
3208
  // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
@@ -3139,8 +3257,9 @@ var Module = (() => {
3139
3257
  }
3140
3258
  run();
3141
3259
  // end include: postamble.js
3142
- return moduleArg.ready;
3260
+ return Module.ready;
3143
3261
  });
3144
3262
  })();
3145
3263
  export default Module;
3146
- //# sourceMappingURL=wasm-host.js.map
3264
+ //# sourceMappingURL=wasm-host.js.map
3265
+ //# debugId=c211f816-44aa-5eab-8f12-fbd1b87e723f