@adapt-toolkit/sdk 0.8.0 → 0.9.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"mufl-bindings.d.ts","sourceRoot":"","sources":["../../src/wasm/mufl-bindings.js"],"names":[],"mappings":";AAmCA,8EAOC"}
1
+ {"version":3,"file":"mufl-bindings.d.ts","sourceRoot":"","sources":["../../src/wasm/mufl-bindings.js"],"names":[],"mappings":";AA0CA,8EAOC"}
@@ -1,10 +1,17 @@
1
- // Node-ESM compatibility shim the Emscripten output below assumes a CJS
2
- // environment where `require`, `__filename`, and `__dirname` are globals.
3
- // Under Node's ESM loader they are not. Polyfill them onto `globalThis` so
4
- // the IIFE's scope-chain lookup finds them. The import specifiers are held in
5
- // variables to keep browser bundlers from trying to statically resolve
6
- // `node:*` modules; if anything in this block fails we fall through silently
7
- // and let the original (CJS / browser) code paths run unmodified.
1
+ // Node-ESM compatibility shim. Prepended to mufl-bindings.js by the wasm
2
+ // build scripts so the Emscripten output below (compiled with multi-environment
3
+ // support including `node`) can run under Node's ESM loader, where `require`,
4
+ // `__filename`, and `__dirname` are not globals. The Emscripten Node branch
5
+ // does `if (!(typeof process === "object" && typeof require === "function"))
6
+ // throw new Error("not compiled for this environment ...")`; this shim
7
+ // polyfills those identifiers on globalThis from `import.meta.url` so the
8
+ // check succeeds and the rest of the Node branch (loading `fs`/`path`,
9
+ // locating `mufl-bindings.wasm` from `__dirname`) works.
10
+ //
11
+ // In the browser there is no `process`, so the shim is a no-op and the
12
+ // browser branch of the Emscripten output runs unchanged. The variable names
13
+ // for the dynamic `import()` specifiers are held in locals so browser bundlers
14
+ // don't try to statically resolve `node:*` modules.
8
15
  try {
9
16
  if (typeof process === 'object' &&
10
17
  process !== null &&
@@ -337,6 +344,10 @@ var createEMSCModule = (() => {
337
344
  Object.defineProperty(Module["ready"], "_emscripten_bind_AdaptEnvironment_GetRandomBytes_1", { configurable: true, get: function () { abort("You are getting _emscripten_bind_AdaptEnvironment_GetRandomBytes_1 on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"); } });
338
345
  Object.defineProperty(Module["ready"], "_emscripten_bind_AdaptEnvironment_GetRandomBytes_1", { configurable: true, set: function () { abort("You are setting _emscripten_bind_AdaptEnvironment_GetRandomBytes_1 on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"); } });
339
346
  }
347
+ if (!Object.getOwnPropertyDescriptor(Module["ready"], "_emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1")) {
348
+ Object.defineProperty(Module["ready"], "_emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1", { configurable: true, get: function () { abort("You are getting _emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1 on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"); } });
349
+ Object.defineProperty(Module["ready"], "_emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1", { configurable: true, set: function () { abort("You are setting _emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1 on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"); } });
350
+ }
340
351
  if (!Object.getOwnPropertyDescriptor(Module["ready"], "_emscripten_bind_AdaptEnvironment_hasError_0")) {
341
352
  Object.defineProperty(Module["ready"], "_emscripten_bind_AdaptEnvironment_hasError_0", { configurable: true, get: function () { abort("You are getting _emscripten_bind_AdaptEnvironment_hasError_0 on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"); } });
342
353
  Object.defineProperty(Module["ready"], "_emscripten_bind_AdaptEnvironment_hasError_0", { configurable: true, set: function () { abort("You are setting _emscripten_bind_AdaptEnvironment_hasError_0 on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"); } });
@@ -714,8 +725,6 @@ var createEMSCModule = (() => {
714
725
  len += 4;
715
726
  } return len; }
716
727
  var UTF16Decoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : undefined;
717
- function allocateUTF8(str) { var size = lengthBytesUTF8(str) + 1; var ret = _malloc(size); if (ret)
718
- stringToUTF8Array(str, HEAP8, ret, size); return ret; }
719
728
  function writeArrayToMemory(array, buffer) { assert(array.length >= 0, "writeArrayToMemory array must have a length (should be an array or typed array)"); HEAP8.set(array, buffer); }
720
729
  function writeAsciiToMemory(str, buffer, dontAddNull) { for (var i = 0; i < str.length; ++i) {
721
730
  assert(str.charCodeAt(i) === (str.charCodeAt(i) & 255));
@@ -897,7 +906,7 @@ var createEMSCModule = (() => {
897
906
  } instantiateAsync().catch(readyPromiseReject); return {}; }
898
907
  var tempDouble;
899
908
  var tempI64;
900
- var ASM_CONSTS = { 1021312: function () { return Module.getRandomValue(); }, 1021348: function () { if (Module.getRandomValue === undefined) {
909
+ var ASM_CONSTS = { 1687712: function () { return Module.getRandomValue(); }, 1687748: function () { if (Module.getRandomValue === undefined) {
901
910
  try {
902
911
  var window_ = "object" === typeof window ? window : self;
903
912
  var crypto_ = typeof window_.crypto !== "undefined" ? window_.crypto : window_.msCrypto;
@@ -973,7 +982,6 @@ var createEMSCModule = (() => {
973
982
  } return error.stack.toString(); }
974
983
  function setWasmTableEntry(idx, func) { wasmTable.set(idx, func); }
975
984
  function ___assert_fail(condition, filename, line, func) { abort("Assertion failed: " + UTF8ToString(condition) + ", at: " + [filename ? UTF8ToString(filename) : "unknown filename", line, func ? UTF8ToString(func) : "unknown function"]); }
976
- function ___call_sighandler(fp, sig) { getWasmTableEntry(fp)(sig); }
977
985
  function ___cxa_allocate_exception(size) { return _malloc(size + 16) + 16; }
978
986
  function ExceptionInfo(excPtr) { this.excPtr = excPtr; this.ptr = excPtr - 16; this.set_type = function (type) { HEAP32[this.ptr + 4 >> 2] = type; }; this.get_type = function () { return HEAP32[this.ptr + 4 >> 2]; }; this.set_destructor = function (destructor) { HEAP32[this.ptr + 8 >> 2] = destructor; }; this.get_destructor = function () { return HEAP32[this.ptr + 8 >> 2]; }; this.set_refcount = function (refcount) { HEAP32[this.ptr >> 2] = refcount; }; this.set_caught = function (caught) { caught = caught ? 1 : 0; HEAP8[this.ptr + 12 >> 0] = caught; }; this.get_caught = function () { return HEAP8[this.ptr + 12 >> 0] != 0; }; this.set_rethrown = function (rethrown) { rethrown = rethrown ? 1 : 0; HEAP8[this.ptr + 13 >> 0] = rethrown; }; this.get_rethrown = function () { return HEAP8[this.ptr + 13 >> 0] != 0; }; this.init = function (type, destructor) { this.set_type(type); this.set_destructor(destructor); this.set_refcount(0); this.set_caught(false); this.set_rethrown(false); }; this.add_ref = function () { var value = HEAP32[this.ptr >> 2]; HEAP32[this.ptr >> 2] = value + 1; }; this.release_ref = function () { var prev = HEAP32[this.ptr >> 2]; HEAP32[this.ptr >> 2] = prev - 1; assert(prev > 0); return prev === 1; }; }
979
987
  function CatchInfo(ptr) { this.free = function () { _free(this.ptr); this.ptr = 0; }; this.set_base_ptr = function (basePtr) { HEAP32[this.ptr >> 2] = basePtr; }; this.get_base_ptr = function () { return HEAP32[this.ptr >> 2]; }; this.set_adjusted_ptr = function (adjustedPtr) { HEAP32[this.ptr + 4 >> 2] = adjustedPtr; }; this.get_adjusted_ptr_addr = function () { return this.ptr + 4; }; this.get_adjusted_ptr = function () { return HEAP32[this.ptr + 4 >> 2]; }; this.get_exception_ptr = function () { var isPointer = ___cxa_is_pointer_type(this.get_exception_info().get_type()); if (isPointer) {
@@ -1057,7 +1065,6 @@ var createEMSCModule = (() => {
1057
1065
  function ___cxa_throw(ptr, type, destructor) { var info = new ExceptionInfo(ptr); info.init(type, destructor); exceptionLast = ptr; uncaughtExceptionCount++; throw ptr; }
1058
1066
  function ___cxa_uncaught_exceptions() { return uncaughtExceptionCount; }
1059
1067
  function ___handle_stack_overflow() { abort("stack overflow"); }
1060
- function setErrNo(value) { HEAP32[___errno_location() >> 2] = value; return value; }
1061
1068
  var PATH = { splitPath: function (filename) { var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; return splitPathRe.exec(filename).slice(1); }, normalizeArray: function (parts, allowAboveRoot) { var up = 0; for (var i = parts.length - 1; i >= 0; i--) {
1062
1069
  var last = parts[i];
1063
1070
  if (last === ".") {
@@ -1213,10 +1220,7 @@ var createEMSCModule = (() => {
1213
1220
  err(UTF8ArrayToString(tty.output, 0));
1214
1221
  tty.output = [];
1215
1222
  } } } };
1216
- function zeroMemory(address, size) { HEAPU8.fill(0, address, address + size); }
1217
- function alignMemory(size, alignment) { assert(alignment, "alignment argument is required"); return Math.ceil(size / alignment) * alignment; }
1218
- function mmapAlloc(size) { size = alignMemory(size, 65536); var ptr = _memalign(65536, size); if (!ptr)
1219
- return 0; zeroMemory(ptr, size); return ptr; }
1223
+ function mmapAlloc(size) { abort("internal error: mmapAlloc called but `memalign` native symbol not exported"); }
1220
1224
  var MEMFS = { ops_table: null, mount: function (mount) { return MEMFS.createNode(null, "/", 16384 | 511, 0); }, createNode: function (parent, name, mode, dev) { if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
1221
1225
  throw new FS.ErrnoError(63);
1222
1226
  } if (!MEMFS.ops_table) {
@@ -2264,135 +2268,6 @@ var createEMSCModule = (() => {
2264
2268
  assert(high === 0);
2265
2269
  else
2266
2270
  assert(high === -1); return low; } };
2267
- function ___syscall_fcntl64(fd, cmd, varargs) { SYSCALLS.varargs = varargs; try {
2268
- var stream = SYSCALLS.getStreamFromFD(fd);
2269
- switch (cmd) {
2270
- case 0: {
2271
- var arg = SYSCALLS.get();
2272
- if (arg < 0) {
2273
- return -28;
2274
- }
2275
- var newStream;
2276
- newStream = FS.open(stream.path, stream.flags, 0, arg);
2277
- return newStream.fd;
2278
- }
2279
- case 1:
2280
- case 2: return 0;
2281
- case 3: return stream.flags;
2282
- case 4: {
2283
- var arg = SYSCALLS.get();
2284
- stream.flags |= arg;
2285
- return 0;
2286
- }
2287
- case 5: {
2288
- var arg = SYSCALLS.get();
2289
- var offset = 0;
2290
- HEAP16[arg + offset >> 1] = 2;
2291
- return 0;
2292
- }
2293
- case 6:
2294
- case 7: return 0;
2295
- case 16:
2296
- case 8: return -28;
2297
- case 9:
2298
- setErrNo(28);
2299
- return -1;
2300
- default: {
2301
- return -28;
2302
- }
2303
- }
2304
- }
2305
- catch (e) {
2306
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2307
- throw e;
2308
- return -e.errno;
2309
- } }
2310
- function ___syscall_fstat64(fd, buf) { try {
2311
- var stream = SYSCALLS.getStreamFromFD(fd);
2312
- return SYSCALLS.doStat(FS.stat, stream.path, buf);
2313
- }
2314
- catch (e) {
2315
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2316
- throw e;
2317
- return -e.errno;
2318
- } }
2319
- function ___syscall_fstatat64(dirfd, path, buf, flags) { try {
2320
- path = SYSCALLS.getStr(path);
2321
- var nofollow = flags & 256;
2322
- var allowEmpty = flags & 4096;
2323
- flags = flags & ~4352;
2324
- assert(!flags, flags);
2325
- path = SYSCALLS.calculateAt(dirfd, path, allowEmpty);
2326
- return SYSCALLS.doStat(nofollow ? FS.lstat : FS.stat, path, buf);
2327
- }
2328
- catch (e) {
2329
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2330
- throw e;
2331
- return -e.errno;
2332
- } }
2333
- function ___syscall_getcwd(buf, size) { try {
2334
- if (size === 0)
2335
- return -28;
2336
- var cwd = FS.cwd();
2337
- var cwdLengthInBytes = lengthBytesUTF8(cwd);
2338
- if (size < cwdLengthInBytes + 1)
2339
- return -68;
2340
- stringToUTF8(cwd, buf, size);
2341
- return buf;
2342
- }
2343
- catch (e) {
2344
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2345
- throw e;
2346
- return -e.errno;
2347
- } }
2348
- function ___syscall_getdents64(fd, dirp, count) { try {
2349
- var stream = SYSCALLS.getStreamFromFD(fd);
2350
- if (!stream.getdents) {
2351
- stream.getdents = FS.readdir(stream.path);
2352
- }
2353
- var struct_size = 280;
2354
- var pos = 0;
2355
- var off = FS.llseek(stream, 0, 1);
2356
- var idx = Math.floor(off / struct_size);
2357
- while (idx < stream.getdents.length && pos + struct_size <= count) {
2358
- var id;
2359
- var type;
2360
- var name = stream.getdents[idx];
2361
- if (name === ".") {
2362
- id = stream.node.id;
2363
- type = 4;
2364
- }
2365
- else if (name === "..") {
2366
- var lookup = FS.lookupPath(stream.path, { parent: true });
2367
- id = lookup.node.id;
2368
- type = 4;
2369
- }
2370
- else {
2371
- var child = FS.lookupNode(stream.node, name);
2372
- id = child.id;
2373
- type = FS.isChrdev(child.mode) ? 2 : FS.isDir(child.mode) ? 4 : FS.isLink(child.mode) ? 10 : 8;
2374
- }
2375
- assert(id);
2376
- tempI64 = [id >>> 0, (tempDouble = id, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[dirp + pos >> 2] = tempI64[0], HEAP32[dirp + pos + 4 >> 2] = tempI64[1];
2377
- tempI64 = [(idx + 1) * struct_size >>> 0, (tempDouble = (idx + 1) * struct_size, +Math.abs(tempDouble) >= 1 ? tempDouble > 0 ? (Math.min(+Math.floor(tempDouble / 4294967296), 4294967295) | 0) >>> 0 : ~~+Math.ceil((tempDouble - +(~~tempDouble >>> 0)) / 4294967296) >>> 0 : 0)], HEAP32[dirp + pos + 8 >> 2] = tempI64[0], HEAP32[dirp + pos + 12 >> 2] = tempI64[1];
2378
- HEAP16[dirp + pos + 16 >> 1] = 280;
2379
- HEAP8[dirp + pos + 18 >> 0] = type;
2380
- stringToUTF8(name, dirp + pos + 19, 256);
2381
- pos += struct_size;
2382
- idx += 1;
2383
- }
2384
- FS.llseek(stream, idx * struct_size, 0);
2385
- return pos;
2386
- }
2387
- catch (e) {
2388
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2389
- throw e;
2390
- return -e.errno;
2391
- } }
2392
- function ___syscall_getegid32() { return 0; }
2393
- function ___syscall_geteuid32() { return ___syscall_getegid32(); }
2394
- function ___syscall_getgid32() { return ___syscall_getegid32(); }
2395
- function ___syscall_getuid32() { return ___syscall_getegid32(); }
2396
2271
  function ___syscall_ioctl(fd, op, varargs) { SYSCALLS.varargs = varargs; try {
2397
2272
  var stream = SYSCALLS.getStreamFromFD(fd);
2398
2273
  switch (op) {
@@ -2446,38 +2321,6 @@ var createEMSCModule = (() => {
2446
2321
  throw e;
2447
2322
  return -e.errno;
2448
2323
  } }
2449
- function ___syscall_lstat64(path, buf) { try {
2450
- path = SYSCALLS.getStr(path);
2451
- return SYSCALLS.doStat(FS.lstat, path, buf);
2452
- }
2453
- catch (e) {
2454
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2455
- throw e;
2456
- return -e.errno;
2457
- } }
2458
- function syscallMunmap(addr, len) { var info = SYSCALLS.mappings[addr]; if (len === 0 || !info) {
2459
- return -28;
2460
- } if (len === info.len) {
2461
- var stream = FS.getStream(info.fd);
2462
- if (stream) {
2463
- if (info.prot & 2) {
2464
- SYSCALLS.doMsync(addr, stream, len, info.flags, info.offset);
2465
- }
2466
- FS.munmap(stream);
2467
- }
2468
- SYSCALLS.mappings[addr] = null;
2469
- if (info.allocated) {
2470
- _free(info.malloc);
2471
- }
2472
- } return 0; }
2473
- function ___syscall_munmap(addr, len) { try {
2474
- return syscallMunmap(addr, len);
2475
- }
2476
- catch (e) {
2477
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2478
- throw e;
2479
- return -e.errno;
2480
- } }
2481
2324
  function ___syscall_open(path, flags, varargs) { SYSCALLS.varargs = varargs; try {
2482
2325
  var pathname = SYSCALLS.getStr(path);
2483
2326
  var mode = varargs ? SYSCALLS.get() : 0;
@@ -2489,35 +2332,6 @@ var createEMSCModule = (() => {
2489
2332
  throw e;
2490
2333
  return -e.errno;
2491
2334
  } }
2492
- function ___syscall_stat64(path, buf) { try {
2493
- path = SYSCALLS.getStr(path);
2494
- return SYSCALLS.doStat(FS.stat, path, buf);
2495
- }
2496
- catch (e) {
2497
- if (typeof FS === "undefined" || !(e instanceof FS.ErrnoError))
2498
- throw e;
2499
- return -e.errno;
2500
- } }
2501
- function __gmtime_js(time, tmPtr) { var date = new Date(HEAP32[time >> 2] * 1e3); HEAP32[tmPtr >> 2] = date.getUTCSeconds(); HEAP32[tmPtr + 4 >> 2] = date.getUTCMinutes(); HEAP32[tmPtr + 8 >> 2] = date.getUTCHours(); HEAP32[tmPtr + 12 >> 2] = date.getUTCDate(); HEAP32[tmPtr + 16 >> 2] = date.getUTCMonth(); HEAP32[tmPtr + 20 >> 2] = date.getUTCFullYear() - 1900; HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0; HEAP32[tmPtr + 28 >> 2] = yday; }
2502
- function __mktime_js(tmPtr) { var date = new Date(HEAP32[tmPtr + 20 >> 2] + 1900, HEAP32[tmPtr + 16 >> 2], HEAP32[tmPtr + 12 >> 2], HEAP32[tmPtr + 8 >> 2], HEAP32[tmPtr + 4 >> 2], HEAP32[tmPtr >> 2], 0); var dst = HEAP32[tmPtr + 32 >> 2]; var guessedOffset = date.getTimezoneOffset(); var start = new Date(date.getFullYear(), 0, 1); var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset(); var winterOffset = start.getTimezoneOffset(); var dstOffset = Math.min(winterOffset, summerOffset); if (dst < 0) {
2503
- HEAP32[tmPtr + 32 >> 2] = Number(summerOffset != winterOffset && dstOffset == guessedOffset);
2504
- }
2505
- else if (dst > 0 != (dstOffset == guessedOffset)) {
2506
- var nonDstOffset = Math.max(winterOffset, summerOffset);
2507
- var trueOffset = dst > 0 ? dstOffset : nonDstOffset;
2508
- date.setTime(date.getTime() + (trueOffset - guessedOffset) * 6e4);
2509
- } HEAP32[tmPtr + 24 >> 2] = date.getDay(); var yday = (date.getTime() - start.getTime()) / (1e3 * 60 * 60 * 24) | 0; HEAP32[tmPtr + 28 >> 2] = yday; HEAP32[tmPtr >> 2] = date.getSeconds(); HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); HEAP32[tmPtr + 8 >> 2] = date.getHours(); HEAP32[tmPtr + 12 >> 2] = date.getDate(); HEAP32[tmPtr + 16 >> 2] = date.getMonth(); return date.getTime() / 1e3 | 0; }
2510
- function __timegm_js(tmPtr) { var time = Date.UTC(HEAP32[tmPtr + 20 >> 2] + 1900, HEAP32[tmPtr + 16 >> 2], HEAP32[tmPtr + 12 >> 2], HEAP32[tmPtr + 8 >> 2], HEAP32[tmPtr + 4 >> 2], HEAP32[tmPtr >> 2], 0); var date = new Date(time); HEAP32[tmPtr + 24 >> 2] = date.getUTCDay(); var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0); var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0; HEAP32[tmPtr + 28 >> 2] = yday; return date.getTime() / 1e3 | 0; }
2511
- function _tzset_impl(timezone, daylight, tzname) { var currentYear = (new Date).getFullYear(); var winter = new Date(currentYear, 0, 1); var summer = new Date(currentYear, 6, 1); var winterOffset = winter.getTimezoneOffset(); var summerOffset = summer.getTimezoneOffset(); var stdTimezoneOffset = Math.max(winterOffset, summerOffset); HEAP32[timezone >> 2] = stdTimezoneOffset * 60; HEAP32[daylight >> 2] = Number(winterOffset != summerOffset); function extractZone(date) { var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/); return match ? match[1] : "GMT"; } var winterName = extractZone(winter); var summerName = extractZone(summer); var winterNamePtr = allocateUTF8(winterName); var summerNamePtr = allocateUTF8(summerName); if (summerOffset < winterOffset) {
2512
- HEAP32[tzname >> 2] = winterNamePtr;
2513
- HEAP32[tzname + 4 >> 2] = summerNamePtr;
2514
- }
2515
- else {
2516
- HEAP32[tzname >> 2] = summerNamePtr;
2517
- HEAP32[tzname + 4 >> 2] = winterNamePtr;
2518
- } }
2519
- function __tzset_js(timezone, daylight, tzname) { if (__tzset_js.called)
2520
- return; __tzset_js.called = true; _tzset_impl(timezone, daylight, tzname); }
2521
2335
  function _abort() { abort("native code called abort()"); }
2522
2336
  var _emscripten_get_now;
2523
2337
  if (ENVIRONMENT_IS_NODE) {
@@ -2526,6 +2340,7 @@ var createEMSCModule = (() => {
2526
2340
  else
2527
2341
  _emscripten_get_now = (() => performance.now());
2528
2342
  var _emscripten_get_now_is_monotonic = true;
2343
+ function setErrNo(value) { HEAP32[___errno_location() >> 2] = value; return value; }
2529
2344
  function _clock_gettime(clk_id, tp) { var now; if (clk_id === 0) {
2530
2345
  now = Date.now();
2531
2346
  }
@@ -2641,12 +2456,6 @@ var createEMSCModule = (() => {
2641
2456
  return e.errno;
2642
2457
  } }
2643
2458
  function _getTempRet0() { return getTempRet0(); }
2644
- function _getentropy(buffer, size) { if (!_getentropy.randomDevice) {
2645
- _getentropy.randomDevice = getRandomDevice();
2646
- } for (var i = 0; i < size; i++) {
2647
- HEAP8[buffer + i >> 0] = _getentropy.randomDevice();
2648
- } return 0; }
2649
- function _gettimeofday(ptr) { var now = Date.now(); HEAP32[ptr >> 2] = now / 1e3 | 0; HEAP32[ptr + 4 >> 2] = now % 1e3 * 1e3 | 0; return 0; }
2650
2459
  function _setTempRet0(val) { setTempRet0(val); }
2651
2460
  function __isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); }
2652
2461
  function __arraySum(array, index) { var sum = 0; for (var i = 0; i <= index; sum += array[i++]) { } return sum; }
@@ -2733,9 +2542,6 @@ var createEMSCModule = (() => {
2733
2542
  return 0;
2734
2543
  } writeArrayToMemory(bytes, s); return bytes.length - 1; }
2735
2544
  function _strftime_l(s, maxsize, format, tm) { return _strftime(s, maxsize, format, tm); }
2736
- function _time(ptr) { var ret = Date.now() / 1e3 | 0; if (ptr) {
2737
- HEAP32[ptr >> 2] = ret;
2738
- } return ret; }
2739
2545
  var FSNode = function (parent, name, mode, rdev) { if (!parent) {
2740
2546
  parent = this;
2741
2547
  } this.parent = parent; this.mount = parent.mount; this.mounted = null; this.id = FS.nextInode++; this.name = name; this.mode = mode; this.node_ops = {}; this.stream_ops = {}; this.rdev = rdev; };
@@ -2788,7 +2594,7 @@ var createEMSCModule = (() => {
2788
2594
  catch (_) {
2789
2595
  throw new Error("Converting base64 string to bytes failed.");
2790
2596
  } }
2791
- var asmLibraryArg = { "__assert_fail": ___assert_fail, "__call_sighandler": ___call_sighandler, "__cxa_allocate_exception": ___cxa_allocate_exception, "__cxa_begin_catch": ___cxa_begin_catch, "__cxa_end_catch": ___cxa_end_catch, "__cxa_find_matching_catch_2": ___cxa_find_matching_catch_2, "__cxa_find_matching_catch_3": ___cxa_find_matching_catch_3, "__cxa_free_exception": ___cxa_free_exception, "__cxa_rethrow": ___cxa_rethrow, "__cxa_throw": ___cxa_throw, "__cxa_uncaught_exceptions": ___cxa_uncaught_exceptions, "__handle_stack_overflow": ___handle_stack_overflow, "__resumeException": ___resumeException, "__syscall_fcntl64": ___syscall_fcntl64, "__syscall_fstat64": ___syscall_fstat64, "__syscall_fstatat64": ___syscall_fstatat64, "__syscall_getcwd": ___syscall_getcwd, "__syscall_getdents64": ___syscall_getdents64, "__syscall_getegid32": ___syscall_getegid32, "__syscall_geteuid32": ___syscall_geteuid32, "__syscall_getgid32": ___syscall_getgid32, "__syscall_getuid32": ___syscall_getuid32, "__syscall_ioctl": ___syscall_ioctl, "__syscall_lstat64": ___syscall_lstat64, "__syscall_munmap": ___syscall_munmap, "__syscall_open": ___syscall_open, "__syscall_stat64": ___syscall_stat64, "_gmtime_js": __gmtime_js, "_mktime_js": __mktime_js, "_timegm_js": __timegm_js, "_tzset_js": __tzset_js, "abort": _abort, "array_bounds_check_error": array_bounds_check_error, "clock_gettime": _clock_gettime, "emscripten_asm_const_int": _emscripten_asm_const_int, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "environ_get": _environ_get, "environ_sizes_get": _environ_sizes_get, "exit": _exit, "fd_close": _fd_close, "fd_read": _fd_read, "fd_seek": _fd_seek, "fd_write": _fd_write, "getTempRet0": _getTempRet0, "getentropy": _getentropy, "gettimeofday": _gettimeofday, "invoke_i": invoke_i, "invoke_ii": invoke_ii, "invoke_iii": invoke_iii, "invoke_iiii": invoke_iiii, "invoke_iiiii": invoke_iiiii, "invoke_iiiiiii": invoke_iiiiiii, "invoke_iiiiiiii": invoke_iiiiiiii, "invoke_iiiiiiiiiiii": invoke_iiiiiiiiiiii, "invoke_j": invoke_j, "invoke_v": invoke_v, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_viii": invoke_viii, "invoke_viiii": invoke_viiii, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiiii": invoke_viiiiiiiiii, "invoke_viiiiiiiiiiiiiii": invoke_viiiiiiiiiiiiiii, "setTempRet0": _setTempRet0, "strftime_l": _strftime_l, "time": _time };
2597
+ var asmLibraryArg = { "__assert_fail": ___assert_fail, "__cxa_allocate_exception": ___cxa_allocate_exception, "__cxa_begin_catch": ___cxa_begin_catch, "__cxa_end_catch": ___cxa_end_catch, "__cxa_find_matching_catch_2": ___cxa_find_matching_catch_2, "__cxa_find_matching_catch_3": ___cxa_find_matching_catch_3, "__cxa_free_exception": ___cxa_free_exception, "__cxa_rethrow": ___cxa_rethrow, "__cxa_throw": ___cxa_throw, "__cxa_uncaught_exceptions": ___cxa_uncaught_exceptions, "__handle_stack_overflow": ___handle_stack_overflow, "__resumeException": ___resumeException, "__syscall_ioctl": ___syscall_ioctl, "__syscall_open": ___syscall_open, "abort": _abort, "array_bounds_check_error": array_bounds_check_error, "clock_gettime": _clock_gettime, "emscripten_asm_const_int": _emscripten_asm_const_int, "emscripten_get_heap_max": _emscripten_get_heap_max, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "environ_get": _environ_get, "environ_sizes_get": _environ_sizes_get, "exit": _exit, "fd_close": _fd_close, "fd_read": _fd_read, "fd_seek": _fd_seek, "fd_write": _fd_write, "getTempRet0": _getTempRet0, "invoke_i": invoke_i, "invoke_ii": invoke_ii, "invoke_iii": invoke_iii, "invoke_iiii": invoke_iiii, "invoke_iiiii": invoke_iiiii, "invoke_iiiiiii": invoke_iiiiiii, "invoke_iiiiiiii": invoke_iiiiiiii, "invoke_iiiiiiiiiiii": invoke_iiiiiiiiiiii, "invoke_j": invoke_j, "invoke_v": invoke_v, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_viii": invoke_viii, "invoke_viiii": invoke_viiii, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiiii": invoke_viiiiiiiiii, "invoke_viiiiiiiiiiiiiii": invoke_viiiiiiiiiiiiiii, "setTempRet0": _setTempRet0, "strftime_l": _strftime_l };
2792
2598
  var asm = createWasm();
2793
2599
  var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors");
2794
2600
  var _emscripten_bind_VoidPtr___destroy___0 = Module["_emscripten_bind_VoidPtr___destroy___0"] = createExportWrapper("emscripten_bind_VoidPtr___destroy___0");
@@ -2866,6 +2672,7 @@ var createEMSCModule = (() => {
2866
2672
  var _emscripten_bind_AdaptEnvironment_SystemTime_0 = Module["_emscripten_bind_AdaptEnvironment_SystemTime_0"] = createExportWrapper("emscripten_bind_AdaptEnvironment_SystemTime_0");
2867
2673
  var _emscripten_bind_AdaptEnvironment_ParseTime_1 = Module["_emscripten_bind_AdaptEnvironment_ParseTime_1"] = createExportWrapper("emscripten_bind_AdaptEnvironment_ParseTime_1");
2868
2674
  var _emscripten_bind_AdaptEnvironment_GetRandomBytes_1 = Module["_emscripten_bind_AdaptEnvironment_GetRandomBytes_1"] = createExportWrapper("emscripten_bind_AdaptEnvironment_GetRandomBytes_1");
2675
+ var _emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1 = Module["_emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1"] = createExportWrapper("emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1");
2869
2676
  var _emscripten_bind_AdaptEnvironment_hasError_0 = Module["_emscripten_bind_AdaptEnvironment_hasError_0"] = createExportWrapper("emscripten_bind_AdaptEnvironment_hasError_0");
2870
2677
  var _emscripten_bind_AdaptEnvironment_getError_0 = Module["_emscripten_bind_AdaptEnvironment_getError_0"] = createExportWrapper("emscripten_bind_AdaptEnvironment_getError_0");
2871
2678
  var _emscripten_bind_AdaptEnvironment_clearError_0 = Module["_emscripten_bind_AdaptEnvironment_clearError_0"] = createExportWrapper("emscripten_bind_AdaptEnvironment_clearError_0");
@@ -2876,12 +2683,8 @@ var createEMSCModule = (() => {
2876
2683
  var _malloc = Module["_malloc"] = createExportWrapper("malloc");
2877
2684
  var _free = Module["_free"] = createExportWrapper("free");
2878
2685
  var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location");
2879
- var _ntohs = Module["_ntohs"] = createExportWrapper("ntohs");
2880
2686
  var ___stdio_exit = Module["___stdio_exit"] = createExportWrapper("__stdio_exit");
2881
2687
  var ___funcs_on_exit = Module["___funcs_on_exit"] = createExportWrapper("__funcs_on_exit");
2882
- var _htonl = Module["_htonl"] = createExportWrapper("htonl");
2883
- var _htons = Module["_htons"] = createExportWrapper("htons");
2884
- var _memalign = Module["_memalign"] = createExportWrapper("memalign");
2885
2688
  var _setThrew = Module["_setThrew"] = createExportWrapper("setThrew");
2886
2689
  var _emscripten_stack_init = Module["_emscripten_stack_init"] = function () { return (_emscripten_stack_init = Module["_emscripten_stack_init"] = Module["asm"]["emscripten_stack_init"]).apply(null, arguments); };
2887
2690
  var _emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = function () { return (_emscripten_stack_get_free = Module["_emscripten_stack_get_free"] = Module["asm"]["emscripten_stack_get_free"]).apply(null, arguments); };
@@ -2894,7 +2697,6 @@ var createEMSCModule = (() => {
2894
2697
  var ___cxa_can_catch = Module["___cxa_can_catch"] = createExportWrapper("__cxa_can_catch");
2895
2698
  var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = createExportWrapper("__cxa_is_pointer_type");
2896
2699
  var ___set_stack_limits = Module["___set_stack_limits"] = createExportWrapper("__set_stack_limits");
2897
- var dynCall_iij = Module["dynCall_iij"] = createExportWrapper("dynCall_iij");
2898
2700
  var dynCall_iiiji = Module["dynCall_iiiji"] = createExportWrapper("dynCall_iiiji");
2899
2701
  var dynCall_iiij = Module["dynCall_iiij"] = createExportWrapper("dynCall_iiij");
2900
2702
  var dynCall_iijii = Module["dynCall_iijii"] = createExportWrapper("dynCall_iijii");
@@ -3806,6 +3608,8 @@ var createEMSCModule = (() => {
3806
3608
  timestamp = ensureString(timestamp); return wrapPointer(_emscripten_bind_AdaptEnvironment_ParseTime_1(self, timestamp), AdaptValue); };
3807
3609
  AdaptEnvironment.prototype["GetRandomBytes"] = AdaptEnvironment.prototype.GetRandomBytes = function (length) { var self = this.ptr; if (length && typeof length === "object")
3808
3610
  length = length.ptr; return wrapPointer(_emscripten_bind_AdaptEnvironment_GetRandomBytes_1(self, length), AdaptValue); };
3611
+ AdaptEnvironment.prototype["SetClientDepthLimit"] = AdaptEnvironment.prototype.SetClientDepthLimit = function (limit) { var self = this.ptr; if (limit && typeof limit === "object")
3612
+ limit = limit.ptr; _emscripten_bind_AdaptEnvironment_SetClientDepthLimit_1(self, limit); };
3809
3613
  AdaptEnvironment.prototype["hasError"] = AdaptEnvironment.prototype.hasError = function () { var self = this.ptr; return !!_emscripten_bind_AdaptEnvironment_hasError_0(self); };
3810
3614
  AdaptEnvironment.prototype["getError"] = AdaptEnvironment.prototype.getError = function () { var self = this.ptr; return UTF8ToString(_emscripten_bind_AdaptEnvironment_getError_0(self)); };
3811
3615
  AdaptEnvironment.prototype["clearError"] = AdaptEnvironment.prototype.clearError = function () { var self = this.ptr; _emscripten_bind_AdaptEnvironment_clearError_0(self); };