@bytecodealliance/jco 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api.d.ts +21 -8
- package/api.mjs +2545 -498
- package/cli.mjs +2562 -507
- package/js-component-bindgen-component.core.wasm +0 -0
- package/js-component-bindgen-component.core2.wasm +0 -0
- package/package.json +4 -1
- package/wasi_preview1_component_adapter.command.wasm +0 -0
- package/wasi_preview1_component_adapter.reactor.wasm +0 -0
- package/wasm-tools.core.wasm +0 -0
- package/wasm-tools.core2.wasm +0 -0
- package/wasi_snapshot_preview1.command.wasm +0 -0
- package/wasi_snapshot_preview1.reactor.wasm +0 -0
package/cli.mjs
CHANGED
|
@@ -6593,6 +6593,20 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"
|
|
|
6593
6593
|
|
|
6594
6594
|
/***/ }),
|
|
6595
6595
|
|
|
6596
|
+
/***/ 6005:
|
|
6597
|
+
/***/ ((module) => {
|
|
6598
|
+
|
|
6599
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto");
|
|
6600
|
+
|
|
6601
|
+
/***/ }),
|
|
6602
|
+
|
|
6603
|
+
/***/ 7561:
|
|
6604
|
+
/***/ ((module) => {
|
|
6605
|
+
|
|
6606
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
|
|
6607
|
+
|
|
6608
|
+
/***/ }),
|
|
6609
|
+
|
|
6596
6610
|
/***/ 3977:
|
|
6597
6611
|
/***/ ((module) => {
|
|
6598
6612
|
|
|
@@ -10002,24 +10016,6 @@ function suggestSimilar(word, candidates) {
|
|
|
10002
10016
|
exports.suggestSimilar = suggestSimilar;
|
|
10003
10017
|
|
|
10004
10018
|
|
|
10005
|
-
/***/ }),
|
|
10006
|
-
|
|
10007
|
-
/***/ 2759:
|
|
10008
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
10009
|
-
|
|
10010
|
-
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
10011
|
-
/* harmony export */ "v": () => (/* binding */ error)
|
|
10012
|
-
/* harmony export */ });
|
|
10013
|
-
/* unused harmony export log */
|
|
10014
|
-
function log(msg) {
|
|
10015
|
-
console.log(msg);
|
|
10016
|
-
}
|
|
10017
|
-
|
|
10018
|
-
function error(msg) {
|
|
10019
|
-
console.error(msg);
|
|
10020
|
-
}
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
10019
|
/***/ }),
|
|
10024
10020
|
|
|
10025
10021
|
/***/ 267:
|
|
@@ -43435,47 +43431,20 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
43435
43431
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
43436
43432
|
/* harmony export */ "I": () => (/* binding */ exports)
|
|
43437
43433
|
/* harmony export */ });
|
|
43438
|
-
/* harmony import */ var
|
|
43434
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(7393);
|
|
43435
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(8576);
|
|
43436
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(5331);
|
|
43437
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9213);
|
|
43438
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(833);
|
|
43439
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(9187);
|
|
43439
43440
|
|
|
43440
43441
|
|
|
43441
|
-
const instantiateCore = WebAssembly.instantiate;
|
|
43442
43442
|
|
|
43443
|
-
const utf8Decoder = new TextDecoder();
|
|
43444
43443
|
|
|
43445
|
-
let dv = new DataView(new ArrayBuffer());
|
|
43446
|
-
const dataView = mem => dv.buffer === mem.buffer ? dv : dv = new DataView(mem.buffer);
|
|
43447
43444
|
|
|
43448
|
-
const utf8Encoder = new TextEncoder();
|
|
43449
43445
|
|
|
43450
|
-
let utf8EncodedLen = 0;
|
|
43451
|
-
function utf8Encode(s, realloc, memory) {
|
|
43452
|
-
if (typeof s !== 'string') throw new TypeError('expected a string');
|
|
43453
|
-
if (s.length === 0) {
|
|
43454
|
-
utf8EncodedLen = 0;
|
|
43455
|
-
return 1;
|
|
43456
|
-
}
|
|
43457
|
-
let allocLen = 0;
|
|
43458
|
-
let ptr = 0;
|
|
43459
|
-
let writtenTotal = 0;
|
|
43460
|
-
while (s.length > 0) {
|
|
43461
|
-
ptr = realloc(ptr, allocLen, 1, allocLen + s.length);
|
|
43462
|
-
allocLen += s.length;
|
|
43463
|
-
const { read, written } = utf8Encoder.encodeInto(
|
|
43464
|
-
s,
|
|
43465
|
-
new Uint8Array(memory.buffer, ptr + writtenTotal, allocLen - writtenTotal),
|
|
43466
|
-
);
|
|
43467
|
-
writtenTotal += written;
|
|
43468
|
-
s = s.slice(read);
|
|
43469
|
-
}
|
|
43470
|
-
if (allocLen > writtenTotal)
|
|
43471
|
-
ptr = realloc(ptr, allocLen, 1, writtenTotal);
|
|
43472
|
-
utf8EncodedLen = writtenTotal;
|
|
43473
|
-
return ptr;
|
|
43474
|
-
}
|
|
43475
43446
|
|
|
43476
|
-
|
|
43477
|
-
return val >>> 0;
|
|
43478
|
-
}
|
|
43447
|
+
const base64Compile = str => WebAssembly.compile(typeof Buffer !== 'undefined' ? Buffer.from(str, 'base64') : Uint8Array.from(atob(str), b => b.charCodeAt(0)));
|
|
43479
43448
|
|
|
43480
43449
|
class ComponentError extends Error {
|
|
43481
43450
|
constructor (value) {
|
|
@@ -43485,6 +43454,9 @@ class ComponentError extends Error {
|
|
|
43485
43454
|
}
|
|
43486
43455
|
}
|
|
43487
43456
|
|
|
43457
|
+
let dv = new DataView(new ArrayBuffer());
|
|
43458
|
+
const dataView = mem => dv.buffer === mem.buffer ? dv : dv = new DataView(mem.buffer);
|
|
43459
|
+
|
|
43488
43460
|
const isNode = typeof process !== 'undefined' && process.versions && process.versions.node;
|
|
43489
43461
|
let _fs;
|
|
43490
43462
|
async function fetchCompile (url) {
|
|
@@ -43495,242 +43467,26 @@ async function fetchCompile (url) {
|
|
|
43495
43467
|
return fetch(url).then(WebAssembly.compileStreaming);
|
|
43496
43468
|
}
|
|
43497
43469
|
|
|
43498
|
-
|
|
43499
|
-
|
|
43500
|
-
|
|
43501
|
-
|
|
43502
|
-
let memory0;
|
|
43503
|
-
|
|
43504
|
-
function lowering0(arg0, arg1) {
|
|
43505
|
-
const ptr0 = arg0;
|
|
43506
|
-
const len0 = arg1;
|
|
43507
|
-
const result0 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr0, len0));
|
|
43508
|
-
(0,_lib_console_js__WEBPACK_IMPORTED_MODULE_0__/* .error */ .v)(result0);
|
|
43470
|
+
function getErrorPayload(e) {
|
|
43471
|
+
if (hasOwnProperty.call(e, 'payload')) return e.payload;
|
|
43472
|
+
if (hasOwnProperty.call(e, 'message')) return String(e.message);
|
|
43473
|
+
return String(e);
|
|
43509
43474
|
}
|
|
43510
|
-
let exports2;
|
|
43511
|
-
let realloc0;
|
|
43512
|
-
let postReturn0;
|
|
43513
|
-
const exports = {
|
|
43514
|
-
generate(arg0, arg1) {
|
|
43515
|
-
const ptr0 = realloc0(0, 0, 4, 48);
|
|
43516
|
-
const val1 = arg0;
|
|
43517
|
-
const len1 = val1.byteLength;
|
|
43518
|
-
const ptr1 = realloc0(0, 0, 1, len1 * 1);
|
|
43519
|
-
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
43520
|
-
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
43521
|
-
dataView(memory0).setInt32(ptr0 + 4, len1, true);
|
|
43522
|
-
dataView(memory0).setInt32(ptr0 + 0, ptr1, true);
|
|
43523
|
-
const {name: v2_0, noTypescript: v2_1, instantiation: v2_2, map: v2_3, compat: v2_4, noNodejsCompat: v2_5, base64Cutoff: v2_6, tlaCompat: v2_7, validLiftingOptimization: v2_8 } = arg1;
|
|
43524
|
-
const ptr3 = utf8Encode(v2_0, realloc0, memory0);
|
|
43525
|
-
const len3 = utf8EncodedLen;
|
|
43526
|
-
dataView(memory0).setInt32(ptr0 + 12, len3, true);
|
|
43527
|
-
dataView(memory0).setInt32(ptr0 + 8, ptr3, true);
|
|
43528
|
-
const variant4 = v2_1;
|
|
43529
|
-
if (variant4 === null || variant4=== undefined) {
|
|
43530
|
-
dataView(memory0).setInt8(ptr0 + 16, 0, true);
|
|
43531
|
-
} else {
|
|
43532
|
-
const e = variant4;
|
|
43533
|
-
dataView(memory0).setInt8(ptr0 + 16, 1, true);
|
|
43534
|
-
dataView(memory0).setInt8(ptr0 + 17, e ? 1 : 0, true);
|
|
43535
|
-
}
|
|
43536
|
-
const variant5 = v2_2;
|
|
43537
|
-
if (variant5 === null || variant5=== undefined) {
|
|
43538
|
-
dataView(memory0).setInt8(ptr0 + 18, 0, true);
|
|
43539
|
-
} else {
|
|
43540
|
-
const e = variant5;
|
|
43541
|
-
dataView(memory0).setInt8(ptr0 + 18, 1, true);
|
|
43542
|
-
dataView(memory0).setInt8(ptr0 + 19, e ? 1 : 0, true);
|
|
43543
|
-
}
|
|
43544
|
-
const variant10 = v2_3;
|
|
43545
|
-
if (variant10 === null || variant10=== undefined) {
|
|
43546
|
-
dataView(memory0).setInt8(ptr0 + 20, 0, true);
|
|
43547
|
-
} else {
|
|
43548
|
-
const e = variant10;
|
|
43549
|
-
dataView(memory0).setInt8(ptr0 + 20, 1, true);
|
|
43550
|
-
const vec9 = e;
|
|
43551
|
-
const len9 = vec9.length;
|
|
43552
|
-
const result9 = realloc0(0, 0, 4, len9 * 16);
|
|
43553
|
-
for (let i = 0; i < vec9.length; i++) {
|
|
43554
|
-
const e = vec9[i];
|
|
43555
|
-
const base = result9 + i * 16;const [tuple6_0, tuple6_1] = e;
|
|
43556
|
-
const ptr7 = utf8Encode(tuple6_0, realloc0, memory0);
|
|
43557
|
-
const len7 = utf8EncodedLen;
|
|
43558
|
-
dataView(memory0).setInt32(base + 4, len7, true);
|
|
43559
|
-
dataView(memory0).setInt32(base + 0, ptr7, true);
|
|
43560
|
-
const ptr8 = utf8Encode(tuple6_1, realloc0, memory0);
|
|
43561
|
-
const len8 = utf8EncodedLen;
|
|
43562
|
-
dataView(memory0).setInt32(base + 12, len8, true);
|
|
43563
|
-
dataView(memory0).setInt32(base + 8, ptr8, true);
|
|
43564
|
-
}
|
|
43565
|
-
dataView(memory0).setInt32(ptr0 + 28, len9, true);
|
|
43566
|
-
dataView(memory0).setInt32(ptr0 + 24, result9, true);
|
|
43567
|
-
}
|
|
43568
|
-
const variant11 = v2_4;
|
|
43569
|
-
if (variant11 === null || variant11=== undefined) {
|
|
43570
|
-
dataView(memory0).setInt8(ptr0 + 32, 0, true);
|
|
43571
|
-
} else {
|
|
43572
|
-
const e = variant11;
|
|
43573
|
-
dataView(memory0).setInt8(ptr0 + 32, 1, true);
|
|
43574
|
-
dataView(memory0).setInt8(ptr0 + 33, e ? 1 : 0, true);
|
|
43575
|
-
}
|
|
43576
|
-
const variant12 = v2_5;
|
|
43577
|
-
if (variant12 === null || variant12=== undefined) {
|
|
43578
|
-
dataView(memory0).setInt8(ptr0 + 34, 0, true);
|
|
43579
|
-
} else {
|
|
43580
|
-
const e = variant12;
|
|
43581
|
-
dataView(memory0).setInt8(ptr0 + 34, 1, true);
|
|
43582
|
-
dataView(memory0).setInt8(ptr0 + 35, e ? 1 : 0, true);
|
|
43583
|
-
}
|
|
43584
|
-
const variant13 = v2_6;
|
|
43585
|
-
if (variant13 === null || variant13=== undefined) {
|
|
43586
|
-
dataView(memory0).setInt8(ptr0 + 36, 0, true);
|
|
43587
|
-
} else {
|
|
43588
|
-
const e = variant13;
|
|
43589
|
-
dataView(memory0).setInt8(ptr0 + 36, 1, true);
|
|
43590
|
-
dataView(memory0).setInt32(ptr0 + 40, toUint32(e), true);
|
|
43591
|
-
}
|
|
43592
|
-
const variant14 = v2_7;
|
|
43593
|
-
if (variant14 === null || variant14=== undefined) {
|
|
43594
|
-
dataView(memory0).setInt8(ptr0 + 44, 0, true);
|
|
43595
|
-
} else {
|
|
43596
|
-
const e = variant14;
|
|
43597
|
-
dataView(memory0).setInt8(ptr0 + 44, 1, true);
|
|
43598
|
-
dataView(memory0).setInt8(ptr0 + 45, e ? 1 : 0, true);
|
|
43599
|
-
}
|
|
43600
|
-
const variant15 = v2_8;
|
|
43601
|
-
if (variant15 === null || variant15=== undefined) {
|
|
43602
|
-
dataView(memory0).setInt8(ptr0 + 46, 0, true);
|
|
43603
|
-
} else {
|
|
43604
|
-
const e = variant15;
|
|
43605
|
-
dataView(memory0).setInt8(ptr0 + 46, 1, true);
|
|
43606
|
-
dataView(memory0).setInt8(ptr0 + 47, e ? 1 : 0, true);
|
|
43607
|
-
}
|
|
43608
|
-
const ret = exports1['exports#generate'](ptr0);
|
|
43609
|
-
let variant25;
|
|
43610
|
-
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
43611
|
-
case 0: {
|
|
43612
|
-
const len18 = dataView(memory0).getInt32(ret + 8, true);
|
|
43613
|
-
const base18 = dataView(memory0).getInt32(ret + 4, true);
|
|
43614
|
-
const result18 = [];
|
|
43615
|
-
for (let i = 0; i < len18; i++) {
|
|
43616
|
-
const base = base18 + i * 16;
|
|
43617
|
-
const ptr16 = dataView(memory0).getInt32(base + 0, true);
|
|
43618
|
-
const len16 = dataView(memory0).getInt32(base + 4, true);
|
|
43619
|
-
const result16 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr16, len16));
|
|
43620
|
-
const ptr17 = dataView(memory0).getInt32(base + 8, true);
|
|
43621
|
-
const len17 = dataView(memory0).getInt32(base + 12, true);
|
|
43622
|
-
const result17 = new Uint8Array(memory0.buffer.slice(ptr17, ptr17 + len17 * 1));
|
|
43623
|
-
result18.push([result16, result17]);
|
|
43624
|
-
}
|
|
43625
|
-
const len20 = dataView(memory0).getInt32(ret + 16, true);
|
|
43626
|
-
const base20 = dataView(memory0).getInt32(ret + 12, true);
|
|
43627
|
-
const result20 = [];
|
|
43628
|
-
for (let i = 0; i < len20; i++) {
|
|
43629
|
-
const base = base20 + i * 8;
|
|
43630
|
-
const ptr19 = dataView(memory0).getInt32(base + 0, true);
|
|
43631
|
-
const len19 = dataView(memory0).getInt32(base + 4, true);
|
|
43632
|
-
const result19 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr19, len19));
|
|
43633
|
-
result20.push(result19);
|
|
43634
|
-
}
|
|
43635
|
-
const len23 = dataView(memory0).getInt32(ret + 24, true);
|
|
43636
|
-
const base23 = dataView(memory0).getInt32(ret + 20, true);
|
|
43637
|
-
const result23 = [];
|
|
43638
|
-
for (let i = 0; i < len23; i++) {
|
|
43639
|
-
const base = base23 + i * 12;
|
|
43640
|
-
const ptr21 = dataView(memory0).getInt32(base + 0, true);
|
|
43641
|
-
const len21 = dataView(memory0).getInt32(base + 4, true);
|
|
43642
|
-
const result21 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr21, len21));
|
|
43643
|
-
let enum22;
|
|
43644
|
-
switch (dataView(memory0).getUint8(base + 8, true)) {
|
|
43645
|
-
case 0: {
|
|
43646
|
-
enum22 = 'function';
|
|
43647
|
-
break;
|
|
43648
|
-
}
|
|
43649
|
-
case 1: {
|
|
43650
|
-
enum22 = 'instance';
|
|
43651
|
-
break;
|
|
43652
|
-
}
|
|
43653
|
-
default: {
|
|
43654
|
-
throw new TypeError('invalid discriminant specified for ExportType');
|
|
43655
|
-
}
|
|
43656
|
-
}
|
|
43657
|
-
result23.push([result21, enum22]);
|
|
43658
|
-
}
|
|
43659
|
-
variant25= {
|
|
43660
|
-
tag: 'ok',
|
|
43661
|
-
val: {
|
|
43662
|
-
files: result18,
|
|
43663
|
-
imports: result20,
|
|
43664
|
-
exports: result23,
|
|
43665
|
-
}
|
|
43666
|
-
};
|
|
43667
|
-
break;
|
|
43668
|
-
}
|
|
43669
|
-
case 1: {
|
|
43670
|
-
const ptr24 = dataView(memory0).getInt32(ret + 4, true);
|
|
43671
|
-
const len24 = dataView(memory0).getInt32(ret + 8, true);
|
|
43672
|
-
const result24 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr24, len24));
|
|
43673
|
-
variant25= {
|
|
43674
|
-
tag: 'err',
|
|
43675
|
-
val: result24
|
|
43676
|
-
};
|
|
43677
|
-
break;
|
|
43678
|
-
}
|
|
43679
|
-
default: {
|
|
43680
|
-
throw new TypeError('invalid variant discriminant for expected');
|
|
43681
|
-
}
|
|
43682
|
-
}
|
|
43683
|
-
postReturn0(ret);
|
|
43684
|
-
if (variant25.tag === 'err') {
|
|
43685
|
-
throw new ComponentError(variant25.val);
|
|
43686
|
-
}
|
|
43687
|
-
return variant25.val;
|
|
43688
|
-
},
|
|
43689
|
-
|
|
43690
|
-
};
|
|
43691
43475
|
|
|
43476
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
43692
43477
|
|
|
43478
|
+
const instantiateCore = WebAssembly.instantiate;
|
|
43693
43479
|
|
|
43694
|
-
const
|
|
43695
|
-
const module0 = fetchCompile(__nccwpck_require__.ab + "js-component-bindgen-component.core.wasm");
|
|
43696
|
-
const module1 = base64Compile('AGFzbQEAAAABBgFgAn9/AAMCAQAEBQFwAQEBBxACATAAAAgkaW1wb3J0cwEACg0BCwAgACABQQARAAALAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjEANQRuYW1lABMSd2l0LWNvbXBvbmVudDpzaGltARkBABZpbmRpcmVjdC1jb25zb2xlLWVycm9y');
|
|
43697
|
-
const module2 = base64Compile('AGFzbQEAAAABBgFgAn9/AAIVAgABMAAAAAgkaW1wb3J0cwFwAQEBCQcBAEEACwEAAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjEAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM=');
|
|
43698
|
-
Promise.all([module0, module1, module2]).catch(() => {});
|
|
43699
|
-
({ exports: exports0 } = await instantiateCore(await module1));
|
|
43700
|
-
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
43701
|
-
console: {
|
|
43702
|
-
error: exports0['0'],
|
|
43703
|
-
},
|
|
43704
|
-
}));
|
|
43705
|
-
memory0 = exports1.memory;
|
|
43706
|
-
({ exports: exports2 } = await instantiateCore(await module2, {
|
|
43707
|
-
'': {
|
|
43708
|
-
$imports: exports0.$imports,
|
|
43709
|
-
'0': lowering0,
|
|
43710
|
-
},
|
|
43711
|
-
}));
|
|
43712
|
-
realloc0 = exports1.cabi_realloc;
|
|
43713
|
-
postReturn0 = exports1['cabi_post_exports#generate'];
|
|
43714
|
-
})();
|
|
43715
|
-
|
|
43716
|
-
await $init;
|
|
43717
|
-
|
|
43718
|
-
__webpack_async_result__();
|
|
43719
|
-
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
43720
|
-
|
|
43721
|
-
/***/ }),
|
|
43722
|
-
|
|
43723
|
-
/***/ 8980:
|
|
43724
|
-
/***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
43725
|
-
|
|
43726
|
-
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
43727
|
-
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
43728
|
-
/* harmony export */ "I": () => (/* binding */ exports)
|
|
43729
|
-
/* harmony export */ });
|
|
43730
|
-
/* harmony import */ var _lib_console_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(2759);
|
|
43480
|
+
const toUint64 = val => BigInt.asUintN(64, val);
|
|
43731
43481
|
|
|
43482
|
+
function toString(val) {
|
|
43483
|
+
if (typeof val === 'symbol') throw new TypeError('symbols cannot be converted to strings');
|
|
43484
|
+
return String(val);
|
|
43485
|
+
}
|
|
43732
43486
|
|
|
43733
|
-
|
|
43487
|
+
function toUint32(val) {
|
|
43488
|
+
return val >>> 0;
|
|
43489
|
+
}
|
|
43734
43490
|
|
|
43735
43491
|
const utf8Decoder = new TextDecoder();
|
|
43736
43492
|
|
|
@@ -43762,8 +43518,680 @@ function utf8Encode(s, realloc, memory) {
|
|
|
43762
43518
|
return ptr;
|
|
43763
43519
|
}
|
|
43764
43520
|
|
|
43765
|
-
let
|
|
43766
|
-
|
|
43521
|
+
let exports0;
|
|
43522
|
+
let exports1;
|
|
43523
|
+
|
|
43524
|
+
function lowering0(arg0, arg1) {
|
|
43525
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .writeViaStream */ .Zw)(arg0 >>> 0, BigInt.asUintN(64, arg1));
|
|
43526
|
+
return toUint32(ret);
|
|
43527
|
+
}
|
|
43528
|
+
|
|
43529
|
+
function lowering1(arg0) {
|
|
43530
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .appendViaStream */ .Tk)(arg0 >>> 0);
|
|
43531
|
+
return toUint32(ret);
|
|
43532
|
+
}
|
|
43533
|
+
|
|
43534
|
+
function lowering2(arg0) {
|
|
43535
|
+
(0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .dropDescriptor */ .Lk)(arg0 >>> 0);
|
|
43536
|
+
}
|
|
43537
|
+
|
|
43538
|
+
function lowering3(arg0) {
|
|
43539
|
+
let variant0;
|
|
43540
|
+
switch (arg0) {
|
|
43541
|
+
case 0: {
|
|
43542
|
+
variant0= {
|
|
43543
|
+
tag: 'ok',
|
|
43544
|
+
val: undefined
|
|
43545
|
+
};
|
|
43546
|
+
break;
|
|
43547
|
+
}
|
|
43548
|
+
case 1: {
|
|
43549
|
+
variant0= {
|
|
43550
|
+
tag: 'err',
|
|
43551
|
+
val: undefined
|
|
43552
|
+
};
|
|
43553
|
+
break;
|
|
43554
|
+
}
|
|
43555
|
+
default: {
|
|
43556
|
+
throw new TypeError('invalid variant discriminant for expected');
|
|
43557
|
+
}
|
|
43558
|
+
}
|
|
43559
|
+
(0,_bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__/* .exit */ .J)(variant0);
|
|
43560
|
+
}
|
|
43561
|
+
|
|
43562
|
+
function lowering4(arg0) {
|
|
43563
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .dropInputStream */ .dU)(arg0 >>> 0);
|
|
43564
|
+
}
|
|
43565
|
+
|
|
43566
|
+
function lowering5(arg0) {
|
|
43567
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .dropOutputStream */ .oc)(arg0 >>> 0);
|
|
43568
|
+
}
|
|
43569
|
+
let exports2;
|
|
43570
|
+
let memory0;
|
|
43571
|
+
|
|
43572
|
+
function lowering6(arg0) {
|
|
43573
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_3__/* .getStdio */ .vT)();
|
|
43574
|
+
const {stdin: v0_0, stdout: v0_1, stderr: v0_2 } = ret;
|
|
43575
|
+
dataView(memory0).setInt32(arg0 + 0, toUint32(v0_0), true);
|
|
43576
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(v0_1), true);
|
|
43577
|
+
dataView(memory0).setInt32(arg0 + 8, toUint32(v0_2), true);
|
|
43578
|
+
}
|
|
43579
|
+
let realloc0;
|
|
43580
|
+
|
|
43581
|
+
function lowering7(arg0) {
|
|
43582
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_3__/* .getDirectories */ .$z)();
|
|
43583
|
+
const vec2 = ret;
|
|
43584
|
+
const len2 = vec2.length;
|
|
43585
|
+
const result2 = realloc0(0, 0, 4, len2 * 12);
|
|
43586
|
+
for (let i = 0; i < vec2.length; i++) {
|
|
43587
|
+
const e = vec2[i];
|
|
43588
|
+
const base = result2 + i * 12;const [tuple0_0, tuple0_1] = e;
|
|
43589
|
+
dataView(memory0).setInt32(base + 0, toUint32(tuple0_0), true);
|
|
43590
|
+
const ptr1 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
43591
|
+
const len1 = utf8EncodedLen;
|
|
43592
|
+
dataView(memory0).setInt32(base + 8, len1, true);
|
|
43593
|
+
dataView(memory0).setInt32(base + 4, ptr1, true);
|
|
43594
|
+
}
|
|
43595
|
+
dataView(memory0).setInt32(arg0 + 4, len2, true);
|
|
43596
|
+
dataView(memory0).setInt32(arg0 + 0, result2, true);
|
|
43597
|
+
}
|
|
43598
|
+
|
|
43599
|
+
function lowering8(arg0, arg1) {
|
|
43600
|
+
let ret;
|
|
43601
|
+
try {
|
|
43602
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .getType */ .oL)(arg0 >>> 0) };
|
|
43603
|
+
} catch (e) {
|
|
43604
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
43605
|
+
}
|
|
43606
|
+
const variant2 = ret;
|
|
43607
|
+
switch (variant2.tag) {
|
|
43608
|
+
case 'ok': {
|
|
43609
|
+
const e = variant2.val;
|
|
43610
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
43611
|
+
const val0 = toString(e);
|
|
43612
|
+
let enum0;
|
|
43613
|
+
switch (val0) {
|
|
43614
|
+
case 'unknown': {
|
|
43615
|
+
enum0 = 0;
|
|
43616
|
+
break;
|
|
43617
|
+
}
|
|
43618
|
+
case 'block-device': {
|
|
43619
|
+
enum0 = 1;
|
|
43620
|
+
break;
|
|
43621
|
+
}
|
|
43622
|
+
case 'character-device': {
|
|
43623
|
+
enum0 = 2;
|
|
43624
|
+
break;
|
|
43625
|
+
}
|
|
43626
|
+
case 'directory': {
|
|
43627
|
+
enum0 = 3;
|
|
43628
|
+
break;
|
|
43629
|
+
}
|
|
43630
|
+
case 'fifo': {
|
|
43631
|
+
enum0 = 4;
|
|
43632
|
+
break;
|
|
43633
|
+
}
|
|
43634
|
+
case 'symbolic-link': {
|
|
43635
|
+
enum0 = 5;
|
|
43636
|
+
break;
|
|
43637
|
+
}
|
|
43638
|
+
case 'regular-file': {
|
|
43639
|
+
enum0 = 6;
|
|
43640
|
+
break;
|
|
43641
|
+
}
|
|
43642
|
+
case 'socket': {
|
|
43643
|
+
enum0 = 7;
|
|
43644
|
+
break;
|
|
43645
|
+
}
|
|
43646
|
+
default: {
|
|
43647
|
+
throw new TypeError(`"${val0}" is not one of the cases of descriptor-type`);
|
|
43648
|
+
}
|
|
43649
|
+
}
|
|
43650
|
+
dataView(memory0).setInt8(arg1 + 1, enum0, true);
|
|
43651
|
+
break;
|
|
43652
|
+
}
|
|
43653
|
+
case 'err': {
|
|
43654
|
+
const e = variant2.val;
|
|
43655
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
43656
|
+
const val1 = toString(e);
|
|
43657
|
+
let enum1;
|
|
43658
|
+
switch (val1) {
|
|
43659
|
+
case 'access': {
|
|
43660
|
+
enum1 = 0;
|
|
43661
|
+
break;
|
|
43662
|
+
}
|
|
43663
|
+
case 'would-block': {
|
|
43664
|
+
enum1 = 1;
|
|
43665
|
+
break;
|
|
43666
|
+
}
|
|
43667
|
+
case 'already': {
|
|
43668
|
+
enum1 = 2;
|
|
43669
|
+
break;
|
|
43670
|
+
}
|
|
43671
|
+
case 'bad-descriptor': {
|
|
43672
|
+
enum1 = 3;
|
|
43673
|
+
break;
|
|
43674
|
+
}
|
|
43675
|
+
case 'busy': {
|
|
43676
|
+
enum1 = 4;
|
|
43677
|
+
break;
|
|
43678
|
+
}
|
|
43679
|
+
case 'deadlock': {
|
|
43680
|
+
enum1 = 5;
|
|
43681
|
+
break;
|
|
43682
|
+
}
|
|
43683
|
+
case 'quota': {
|
|
43684
|
+
enum1 = 6;
|
|
43685
|
+
break;
|
|
43686
|
+
}
|
|
43687
|
+
case 'exist': {
|
|
43688
|
+
enum1 = 7;
|
|
43689
|
+
break;
|
|
43690
|
+
}
|
|
43691
|
+
case 'file-too-large': {
|
|
43692
|
+
enum1 = 8;
|
|
43693
|
+
break;
|
|
43694
|
+
}
|
|
43695
|
+
case 'illegal-byte-sequence': {
|
|
43696
|
+
enum1 = 9;
|
|
43697
|
+
break;
|
|
43698
|
+
}
|
|
43699
|
+
case 'in-progress': {
|
|
43700
|
+
enum1 = 10;
|
|
43701
|
+
break;
|
|
43702
|
+
}
|
|
43703
|
+
case 'interrupted': {
|
|
43704
|
+
enum1 = 11;
|
|
43705
|
+
break;
|
|
43706
|
+
}
|
|
43707
|
+
case 'invalid': {
|
|
43708
|
+
enum1 = 12;
|
|
43709
|
+
break;
|
|
43710
|
+
}
|
|
43711
|
+
case 'io': {
|
|
43712
|
+
enum1 = 13;
|
|
43713
|
+
break;
|
|
43714
|
+
}
|
|
43715
|
+
case 'is-directory': {
|
|
43716
|
+
enum1 = 14;
|
|
43717
|
+
break;
|
|
43718
|
+
}
|
|
43719
|
+
case 'loop': {
|
|
43720
|
+
enum1 = 15;
|
|
43721
|
+
break;
|
|
43722
|
+
}
|
|
43723
|
+
case 'too-many-links': {
|
|
43724
|
+
enum1 = 16;
|
|
43725
|
+
break;
|
|
43726
|
+
}
|
|
43727
|
+
case 'message-size': {
|
|
43728
|
+
enum1 = 17;
|
|
43729
|
+
break;
|
|
43730
|
+
}
|
|
43731
|
+
case 'name-too-long': {
|
|
43732
|
+
enum1 = 18;
|
|
43733
|
+
break;
|
|
43734
|
+
}
|
|
43735
|
+
case 'no-device': {
|
|
43736
|
+
enum1 = 19;
|
|
43737
|
+
break;
|
|
43738
|
+
}
|
|
43739
|
+
case 'no-entry': {
|
|
43740
|
+
enum1 = 20;
|
|
43741
|
+
break;
|
|
43742
|
+
}
|
|
43743
|
+
case 'no-lock': {
|
|
43744
|
+
enum1 = 21;
|
|
43745
|
+
break;
|
|
43746
|
+
}
|
|
43747
|
+
case 'insufficient-memory': {
|
|
43748
|
+
enum1 = 22;
|
|
43749
|
+
break;
|
|
43750
|
+
}
|
|
43751
|
+
case 'insufficient-space': {
|
|
43752
|
+
enum1 = 23;
|
|
43753
|
+
break;
|
|
43754
|
+
}
|
|
43755
|
+
case 'not-directory': {
|
|
43756
|
+
enum1 = 24;
|
|
43757
|
+
break;
|
|
43758
|
+
}
|
|
43759
|
+
case 'not-empty': {
|
|
43760
|
+
enum1 = 25;
|
|
43761
|
+
break;
|
|
43762
|
+
}
|
|
43763
|
+
case 'not-recoverable': {
|
|
43764
|
+
enum1 = 26;
|
|
43765
|
+
break;
|
|
43766
|
+
}
|
|
43767
|
+
case 'unsupported': {
|
|
43768
|
+
enum1 = 27;
|
|
43769
|
+
break;
|
|
43770
|
+
}
|
|
43771
|
+
case 'no-tty': {
|
|
43772
|
+
enum1 = 28;
|
|
43773
|
+
break;
|
|
43774
|
+
}
|
|
43775
|
+
case 'no-such-device': {
|
|
43776
|
+
enum1 = 29;
|
|
43777
|
+
break;
|
|
43778
|
+
}
|
|
43779
|
+
case 'overflow': {
|
|
43780
|
+
enum1 = 30;
|
|
43781
|
+
break;
|
|
43782
|
+
}
|
|
43783
|
+
case 'not-permitted': {
|
|
43784
|
+
enum1 = 31;
|
|
43785
|
+
break;
|
|
43786
|
+
}
|
|
43787
|
+
case 'pipe': {
|
|
43788
|
+
enum1 = 32;
|
|
43789
|
+
break;
|
|
43790
|
+
}
|
|
43791
|
+
case 'read-only': {
|
|
43792
|
+
enum1 = 33;
|
|
43793
|
+
break;
|
|
43794
|
+
}
|
|
43795
|
+
case 'invalid-seek': {
|
|
43796
|
+
enum1 = 34;
|
|
43797
|
+
break;
|
|
43798
|
+
}
|
|
43799
|
+
case 'text-file-busy': {
|
|
43800
|
+
enum1 = 35;
|
|
43801
|
+
break;
|
|
43802
|
+
}
|
|
43803
|
+
case 'cross-device': {
|
|
43804
|
+
enum1 = 36;
|
|
43805
|
+
break;
|
|
43806
|
+
}
|
|
43807
|
+
default: {
|
|
43808
|
+
throw new TypeError(`"${val1}" is not one of the cases of error-code`);
|
|
43809
|
+
}
|
|
43810
|
+
}
|
|
43811
|
+
dataView(memory0).setInt8(arg1 + 1, enum1, true);
|
|
43812
|
+
break;
|
|
43813
|
+
}
|
|
43814
|
+
default: {
|
|
43815
|
+
throw new TypeError('invalid variant specified for result');
|
|
43816
|
+
}
|
|
43817
|
+
}
|
|
43818
|
+
}
|
|
43819
|
+
|
|
43820
|
+
function lowering9(arg0, arg1) {
|
|
43821
|
+
const ret = (0,_bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_0__/* .getRandomBytes */ .Iv)(BigInt.asUintN(64, arg0));
|
|
43822
|
+
const val0 = ret;
|
|
43823
|
+
const len0 = val0.byteLength;
|
|
43824
|
+
const ptr0 = realloc0(0, 0, 1, len0 * 1);
|
|
43825
|
+
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
43826
|
+
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
43827
|
+
dataView(memory0).setInt32(arg1 + 4, len0, true);
|
|
43828
|
+
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
43829
|
+
}
|
|
43830
|
+
|
|
43831
|
+
function lowering10(arg0) {
|
|
43832
|
+
const ret = (0,_bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_4__/* .getEnvironment */ .zj)();
|
|
43833
|
+
const vec3 = ret;
|
|
43834
|
+
const len3 = vec3.length;
|
|
43835
|
+
const result3 = realloc0(0, 0, 4, len3 * 16);
|
|
43836
|
+
for (let i = 0; i < vec3.length; i++) {
|
|
43837
|
+
const e = vec3[i];
|
|
43838
|
+
const base = result3 + i * 16;const [tuple0_0, tuple0_1] = e;
|
|
43839
|
+
const ptr1 = utf8Encode(tuple0_0, realloc0, memory0);
|
|
43840
|
+
const len1 = utf8EncodedLen;
|
|
43841
|
+
dataView(memory0).setInt32(base + 4, len1, true);
|
|
43842
|
+
dataView(memory0).setInt32(base + 0, ptr1, true);
|
|
43843
|
+
const ptr2 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
43844
|
+
const len2 = utf8EncodedLen;
|
|
43845
|
+
dataView(memory0).setInt32(base + 12, len2, true);
|
|
43846
|
+
dataView(memory0).setInt32(base + 8, ptr2, true);
|
|
43847
|
+
}
|
|
43848
|
+
dataView(memory0).setInt32(arg0 + 4, len3, true);
|
|
43849
|
+
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
43850
|
+
}
|
|
43851
|
+
|
|
43852
|
+
function lowering11(arg0, arg1, arg2, arg3) {
|
|
43853
|
+
const ptr0 = arg1;
|
|
43854
|
+
const len0 = arg2;
|
|
43855
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
43856
|
+
let ret;
|
|
43857
|
+
try {
|
|
43858
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .write */ .cW)(arg0 >>> 0, result0) };
|
|
43859
|
+
} catch (e) {
|
|
43860
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
43861
|
+
}
|
|
43862
|
+
const variant2 = ret;
|
|
43863
|
+
switch (variant2.tag) {
|
|
43864
|
+
case 'ok': {
|
|
43865
|
+
const e = variant2.val;
|
|
43866
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
43867
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
43868
|
+
break;
|
|
43869
|
+
}
|
|
43870
|
+
case 'err': {
|
|
43871
|
+
const e = variant2.val;
|
|
43872
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
43873
|
+
const { } = e;
|
|
43874
|
+
break;
|
|
43875
|
+
}
|
|
43876
|
+
default: {
|
|
43877
|
+
throw new TypeError('invalid variant specified for result');
|
|
43878
|
+
}
|
|
43879
|
+
}
|
|
43880
|
+
}
|
|
43881
|
+
|
|
43882
|
+
function lowering12(arg0, arg1, arg2, arg3) {
|
|
43883
|
+
const ptr0 = arg1;
|
|
43884
|
+
const len0 = arg2;
|
|
43885
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
43886
|
+
let ret;
|
|
43887
|
+
try {
|
|
43888
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .blockingWrite */ .v_)(arg0 >>> 0, result0) };
|
|
43889
|
+
} catch (e) {
|
|
43890
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
43891
|
+
}
|
|
43892
|
+
const variant2 = ret;
|
|
43893
|
+
switch (variant2.tag) {
|
|
43894
|
+
case 'ok': {
|
|
43895
|
+
const e = variant2.val;
|
|
43896
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
43897
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
43898
|
+
break;
|
|
43899
|
+
}
|
|
43900
|
+
case 'err': {
|
|
43901
|
+
const e = variant2.val;
|
|
43902
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
43903
|
+
const { } = e;
|
|
43904
|
+
break;
|
|
43905
|
+
}
|
|
43906
|
+
default: {
|
|
43907
|
+
throw new TypeError('invalid variant specified for result');
|
|
43908
|
+
}
|
|
43909
|
+
}
|
|
43910
|
+
}
|
|
43911
|
+
let exports3;
|
|
43912
|
+
let realloc1;
|
|
43913
|
+
let postReturn0;
|
|
43914
|
+
const exports = {
|
|
43915
|
+
generate(arg0, arg1) {
|
|
43916
|
+
const ptr0 = realloc1(0, 0, 4, 48);
|
|
43917
|
+
const val1 = arg0;
|
|
43918
|
+
const len1 = val1.byteLength;
|
|
43919
|
+
const ptr1 = realloc1(0, 0, 1, len1 * 1);
|
|
43920
|
+
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
43921
|
+
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
43922
|
+
dataView(memory0).setInt32(ptr0 + 4, len1, true);
|
|
43923
|
+
dataView(memory0).setInt32(ptr0 + 0, ptr1, true);
|
|
43924
|
+
const {name: v2_0, noTypescript: v2_1, instantiation: v2_2, map: v2_3, compat: v2_4, noNodejsCompat: v2_5, base64Cutoff: v2_6, tlaCompat: v2_7, validLiftingOptimization: v2_8 } = arg1;
|
|
43925
|
+
const ptr3 = utf8Encode(v2_0, realloc1, memory0);
|
|
43926
|
+
const len3 = utf8EncodedLen;
|
|
43927
|
+
dataView(memory0).setInt32(ptr0 + 12, len3, true);
|
|
43928
|
+
dataView(memory0).setInt32(ptr0 + 8, ptr3, true);
|
|
43929
|
+
const variant4 = v2_1;
|
|
43930
|
+
if (variant4 === null || variant4=== undefined) {
|
|
43931
|
+
dataView(memory0).setInt8(ptr0 + 16, 0, true);
|
|
43932
|
+
} else {
|
|
43933
|
+
const e = variant4;
|
|
43934
|
+
dataView(memory0).setInt8(ptr0 + 16, 1, true);
|
|
43935
|
+
dataView(memory0).setInt8(ptr0 + 17, e ? 1 : 0, true);
|
|
43936
|
+
}
|
|
43937
|
+
const variant5 = v2_2;
|
|
43938
|
+
if (variant5 === null || variant5=== undefined) {
|
|
43939
|
+
dataView(memory0).setInt8(ptr0 + 18, 0, true);
|
|
43940
|
+
} else {
|
|
43941
|
+
const e = variant5;
|
|
43942
|
+
dataView(memory0).setInt8(ptr0 + 18, 1, true);
|
|
43943
|
+
dataView(memory0).setInt8(ptr0 + 19, e ? 1 : 0, true);
|
|
43944
|
+
}
|
|
43945
|
+
const variant10 = v2_3;
|
|
43946
|
+
if (variant10 === null || variant10=== undefined) {
|
|
43947
|
+
dataView(memory0).setInt8(ptr0 + 20, 0, true);
|
|
43948
|
+
} else {
|
|
43949
|
+
const e = variant10;
|
|
43950
|
+
dataView(memory0).setInt8(ptr0 + 20, 1, true);
|
|
43951
|
+
const vec9 = e;
|
|
43952
|
+
const len9 = vec9.length;
|
|
43953
|
+
const result9 = realloc1(0, 0, 4, len9 * 16);
|
|
43954
|
+
for (let i = 0; i < vec9.length; i++) {
|
|
43955
|
+
const e = vec9[i];
|
|
43956
|
+
const base = result9 + i * 16;const [tuple6_0, tuple6_1] = e;
|
|
43957
|
+
const ptr7 = utf8Encode(tuple6_0, realloc1, memory0);
|
|
43958
|
+
const len7 = utf8EncodedLen;
|
|
43959
|
+
dataView(memory0).setInt32(base + 4, len7, true);
|
|
43960
|
+
dataView(memory0).setInt32(base + 0, ptr7, true);
|
|
43961
|
+
const ptr8 = utf8Encode(tuple6_1, realloc1, memory0);
|
|
43962
|
+
const len8 = utf8EncodedLen;
|
|
43963
|
+
dataView(memory0).setInt32(base + 12, len8, true);
|
|
43964
|
+
dataView(memory0).setInt32(base + 8, ptr8, true);
|
|
43965
|
+
}
|
|
43966
|
+
dataView(memory0).setInt32(ptr0 + 28, len9, true);
|
|
43967
|
+
dataView(memory0).setInt32(ptr0 + 24, result9, true);
|
|
43968
|
+
}
|
|
43969
|
+
const variant11 = v2_4;
|
|
43970
|
+
if (variant11 === null || variant11=== undefined) {
|
|
43971
|
+
dataView(memory0).setInt8(ptr0 + 32, 0, true);
|
|
43972
|
+
} else {
|
|
43973
|
+
const e = variant11;
|
|
43974
|
+
dataView(memory0).setInt8(ptr0 + 32, 1, true);
|
|
43975
|
+
dataView(memory0).setInt8(ptr0 + 33, e ? 1 : 0, true);
|
|
43976
|
+
}
|
|
43977
|
+
const variant12 = v2_5;
|
|
43978
|
+
if (variant12 === null || variant12=== undefined) {
|
|
43979
|
+
dataView(memory0).setInt8(ptr0 + 34, 0, true);
|
|
43980
|
+
} else {
|
|
43981
|
+
const e = variant12;
|
|
43982
|
+
dataView(memory0).setInt8(ptr0 + 34, 1, true);
|
|
43983
|
+
dataView(memory0).setInt8(ptr0 + 35, e ? 1 : 0, true);
|
|
43984
|
+
}
|
|
43985
|
+
const variant13 = v2_6;
|
|
43986
|
+
if (variant13 === null || variant13=== undefined) {
|
|
43987
|
+
dataView(memory0).setInt8(ptr0 + 36, 0, true);
|
|
43988
|
+
} else {
|
|
43989
|
+
const e = variant13;
|
|
43990
|
+
dataView(memory0).setInt8(ptr0 + 36, 1, true);
|
|
43991
|
+
dataView(memory0).setInt32(ptr0 + 40, toUint32(e), true);
|
|
43992
|
+
}
|
|
43993
|
+
const variant14 = v2_7;
|
|
43994
|
+
if (variant14 === null || variant14=== undefined) {
|
|
43995
|
+
dataView(memory0).setInt8(ptr0 + 44, 0, true);
|
|
43996
|
+
} else {
|
|
43997
|
+
const e = variant14;
|
|
43998
|
+
dataView(memory0).setInt8(ptr0 + 44, 1, true);
|
|
43999
|
+
dataView(memory0).setInt8(ptr0 + 45, e ? 1 : 0, true);
|
|
44000
|
+
}
|
|
44001
|
+
const variant15 = v2_8;
|
|
44002
|
+
if (variant15 === null || variant15=== undefined) {
|
|
44003
|
+
dataView(memory0).setInt8(ptr0 + 46, 0, true);
|
|
44004
|
+
} else {
|
|
44005
|
+
const e = variant15;
|
|
44006
|
+
dataView(memory0).setInt8(ptr0 + 46, 1, true);
|
|
44007
|
+
dataView(memory0).setInt8(ptr0 + 47, e ? 1 : 0, true);
|
|
44008
|
+
}
|
|
44009
|
+
const ret = exports1['exports#generate'](ptr0);
|
|
44010
|
+
let variant25;
|
|
44011
|
+
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
44012
|
+
case 0: {
|
|
44013
|
+
const len18 = dataView(memory0).getInt32(ret + 8, true);
|
|
44014
|
+
const base18 = dataView(memory0).getInt32(ret + 4, true);
|
|
44015
|
+
const result18 = [];
|
|
44016
|
+
for (let i = 0; i < len18; i++) {
|
|
44017
|
+
const base = base18 + i * 16;
|
|
44018
|
+
const ptr16 = dataView(memory0).getInt32(base + 0, true);
|
|
44019
|
+
const len16 = dataView(memory0).getInt32(base + 4, true);
|
|
44020
|
+
const result16 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr16, len16));
|
|
44021
|
+
const ptr17 = dataView(memory0).getInt32(base + 8, true);
|
|
44022
|
+
const len17 = dataView(memory0).getInt32(base + 12, true);
|
|
44023
|
+
const result17 = new Uint8Array(memory0.buffer.slice(ptr17, ptr17 + len17 * 1));
|
|
44024
|
+
result18.push([result16, result17]);
|
|
44025
|
+
}
|
|
44026
|
+
const len20 = dataView(memory0).getInt32(ret + 16, true);
|
|
44027
|
+
const base20 = dataView(memory0).getInt32(ret + 12, true);
|
|
44028
|
+
const result20 = [];
|
|
44029
|
+
for (let i = 0; i < len20; i++) {
|
|
44030
|
+
const base = base20 + i * 8;
|
|
44031
|
+
const ptr19 = dataView(memory0).getInt32(base + 0, true);
|
|
44032
|
+
const len19 = dataView(memory0).getInt32(base + 4, true);
|
|
44033
|
+
const result19 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr19, len19));
|
|
44034
|
+
result20.push(result19);
|
|
44035
|
+
}
|
|
44036
|
+
const len23 = dataView(memory0).getInt32(ret + 24, true);
|
|
44037
|
+
const base23 = dataView(memory0).getInt32(ret + 20, true);
|
|
44038
|
+
const result23 = [];
|
|
44039
|
+
for (let i = 0; i < len23; i++) {
|
|
44040
|
+
const base = base23 + i * 12;
|
|
44041
|
+
const ptr21 = dataView(memory0).getInt32(base + 0, true);
|
|
44042
|
+
const len21 = dataView(memory0).getInt32(base + 4, true);
|
|
44043
|
+
const result21 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr21, len21));
|
|
44044
|
+
let enum22;
|
|
44045
|
+
switch (dataView(memory0).getUint8(base + 8, true)) {
|
|
44046
|
+
case 0: {
|
|
44047
|
+
enum22 = 'function';
|
|
44048
|
+
break;
|
|
44049
|
+
}
|
|
44050
|
+
case 1: {
|
|
44051
|
+
enum22 = 'instance';
|
|
44052
|
+
break;
|
|
44053
|
+
}
|
|
44054
|
+
default: {
|
|
44055
|
+
throw new TypeError('invalid discriminant specified for ExportType');
|
|
44056
|
+
}
|
|
44057
|
+
}
|
|
44058
|
+
result23.push([result21, enum22]);
|
|
44059
|
+
}
|
|
44060
|
+
variant25= {
|
|
44061
|
+
tag: 'ok',
|
|
44062
|
+
val: {
|
|
44063
|
+
files: result18,
|
|
44064
|
+
imports: result20,
|
|
44065
|
+
exports: result23,
|
|
44066
|
+
}
|
|
44067
|
+
};
|
|
44068
|
+
break;
|
|
44069
|
+
}
|
|
44070
|
+
case 1: {
|
|
44071
|
+
const ptr24 = dataView(memory0).getInt32(ret + 4, true);
|
|
44072
|
+
const len24 = dataView(memory0).getInt32(ret + 8, true);
|
|
44073
|
+
const result24 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr24, len24));
|
|
44074
|
+
variant25= {
|
|
44075
|
+
tag: 'err',
|
|
44076
|
+
val: result24
|
|
44077
|
+
};
|
|
44078
|
+
break;
|
|
44079
|
+
}
|
|
44080
|
+
default: {
|
|
44081
|
+
throw new TypeError('invalid variant discriminant for expected');
|
|
44082
|
+
}
|
|
44083
|
+
}
|
|
44084
|
+
postReturn0(ret);
|
|
44085
|
+
if (variant25.tag === 'err') {
|
|
44086
|
+
throw new ComponentError(variant25.val);
|
|
44087
|
+
}
|
|
44088
|
+
return variant25.val;
|
|
44089
|
+
},
|
|
44090
|
+
|
|
44091
|
+
};
|
|
44092
|
+
|
|
44093
|
+
|
|
44094
|
+
|
|
44095
|
+
const $init = (async() => {
|
|
44096
|
+
const module0 = fetchCompile(__nccwpck_require__.ab + "js-component-bindgen-component.core.wasm");
|
|
44097
|
+
const module1 = fetchCompile(__nccwpck_require__.ab + "js-component-bindgen-component.core2.wasm");
|
|
44098
|
+
const module2 = base64Compile('AGFzbQEAAAABKAdgAX8AYAJ/fwBgAn5/AGAEf39/fwBgBH9/f38Bf2ACf38Bf2ABfwADDQwAAAECAAMDBAUFBQYEBQFwAQwMBz4NATAAAAExAAEBMgACATMAAwE0AAQBNQAFATYABgE3AAcBOAAIATkACQIxMAAKAjExAAsIJGltcG9ydHMBAAqVAQwJACAAQQARAAALCQAgAEEBEQAACwsAIAAgAUECEQEACwsAIAAgAUEDEQIACwkAIABBBBEAAAsPACAAIAEgAiADQQURAwALDwAgACABIAIgA0EGEQMACw8AIAAgASACIANBBxEEAAsLACAAIAFBCBEFAAsLACAAIAFBCREFAAsLACAAIAFBChEFAAsJACAAQQsRBgALAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjIAzwMEbmFtZQATEndpdC1jb21wb25lbnQ6c2hpbQGyAwwAG2luZGlyZWN0LXByZW9wZW5zLWdldC1zdGRpbwEhaW5kaXJlY3QtcHJlb3BlbnMtZ2V0LWRpcmVjdG9yaWVzAhxpbmRpcmVjdC1maWxlc3lzdGVtLWdldC10eXBlAyBpbmRpcmVjdC1yYW5kb20tZ2V0LXJhbmRvbS1ieXRlcwQkaW5kaXJlY3QtZW52aXJvbm1lbnQtZ2V0LWVudmlyb25tZW50BRZpbmRpcmVjdC1zdHJlYW1zLXdyaXRlBh9pbmRpcmVjdC1zdHJlYW1zLWJsb2NraW5nLXdyaXRlByVhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3dyaXRlCCdhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLXJhbmRvbV9nZXQJKGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9nZXQKLmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9zaXplc19nZXQLJmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtcHJvY19leGl0');
|
|
44099
|
+
const module3 = base64Compile('AGFzbQEAAAABKAdgAX8AYAJ/fwBgAn5/AGAEf39/fwBgBH9/f38Bf2ACf38Bf2ABfwACTg0AATAAAAABMQAAAAEyAAEAATMAAgABNAAAAAE1AAMAATYAAwABNwAEAAE4AAUAATkABQACMTAABQACMTEABgAIJGltcG9ydHMBcAEMDAkSAQBBAAsMAAECAwQFBgcICQoLAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjIAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM');
|
|
44100
|
+
Promise.all([module0, module1, module2, module3]).catch(() => {});
|
|
44101
|
+
({ exports: exports0 } = await instantiateCore(await module2));
|
|
44102
|
+
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
44103
|
+
wasi_snapshot_preview1: {
|
|
44104
|
+
environ_get: exports0['9'],
|
|
44105
|
+
environ_sizes_get: exports0['10'],
|
|
44106
|
+
fd_write: exports0['7'],
|
|
44107
|
+
proc_exit: exports0['11'],
|
|
44108
|
+
random_get: exports0['8'],
|
|
44109
|
+
},
|
|
44110
|
+
}));
|
|
44111
|
+
({ exports: exports2 } = await instantiateCore(await module1, {
|
|
44112
|
+
__main_module__: {
|
|
44113
|
+
cabi_realloc: exports1.cabi_realloc,
|
|
44114
|
+
},
|
|
44115
|
+
env: {
|
|
44116
|
+
memory: exports1.memory,
|
|
44117
|
+
},
|
|
44118
|
+
environment: {
|
|
44119
|
+
'get-environment': exports0['4'],
|
|
44120
|
+
},
|
|
44121
|
+
exit: {
|
|
44122
|
+
exit: lowering3,
|
|
44123
|
+
},
|
|
44124
|
+
filesystem: {
|
|
44125
|
+
'append-via-stream': lowering1,
|
|
44126
|
+
'drop-descriptor': lowering2,
|
|
44127
|
+
'get-type': exports0['2'],
|
|
44128
|
+
'write-via-stream': lowering0,
|
|
44129
|
+
},
|
|
44130
|
+
preopens: {
|
|
44131
|
+
'get-directories': exports0['1'],
|
|
44132
|
+
'get-stdio': exports0['0'],
|
|
44133
|
+
},
|
|
44134
|
+
random: {
|
|
44135
|
+
'get-random-bytes': exports0['3'],
|
|
44136
|
+
},
|
|
44137
|
+
streams: {
|
|
44138
|
+
'blocking-write': exports0['6'],
|
|
44139
|
+
'drop-input-stream': lowering4,
|
|
44140
|
+
'drop-output-stream': lowering5,
|
|
44141
|
+
write: exports0['5'],
|
|
44142
|
+
},
|
|
44143
|
+
}));
|
|
44144
|
+
memory0 = exports1.memory;
|
|
44145
|
+
realloc0 = exports2.cabi_import_realloc;
|
|
44146
|
+
({ exports: exports3 } = await instantiateCore(await module3, {
|
|
44147
|
+
'': {
|
|
44148
|
+
$imports: exports0.$imports,
|
|
44149
|
+
'0': lowering6,
|
|
44150
|
+
'1': lowering7,
|
|
44151
|
+
'10': exports2.environ_sizes_get,
|
|
44152
|
+
'11': exports2.proc_exit,
|
|
44153
|
+
'2': lowering8,
|
|
44154
|
+
'3': lowering9,
|
|
44155
|
+
'4': lowering10,
|
|
44156
|
+
'5': lowering11,
|
|
44157
|
+
'6': lowering12,
|
|
44158
|
+
'7': exports2.fd_write,
|
|
44159
|
+
'8': exports2.random_get,
|
|
44160
|
+
'9': exports2.environ_get,
|
|
44161
|
+
},
|
|
44162
|
+
}));
|
|
44163
|
+
realloc1 = exports1.cabi_realloc;
|
|
44164
|
+
postReturn0 = exports1['cabi_post_exports#generate'];
|
|
44165
|
+
})();
|
|
44166
|
+
|
|
44167
|
+
await $init;
|
|
44168
|
+
|
|
44169
|
+
__webpack_async_result__();
|
|
44170
|
+
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
44171
|
+
|
|
44172
|
+
/***/ }),
|
|
44173
|
+
|
|
44174
|
+
/***/ 8980:
|
|
44175
|
+
/***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
44176
|
+
|
|
44177
|
+
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
44178
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
44179
|
+
/* harmony export */ "I": () => (/* binding */ exports)
|
|
44180
|
+
/* harmony export */ });
|
|
44181
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(5331);
|
|
44182
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(7393);
|
|
44183
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(8576);
|
|
44184
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9187);
|
|
44185
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(9213);
|
|
44186
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(833);
|
|
44187
|
+
|
|
44188
|
+
|
|
44189
|
+
|
|
44190
|
+
|
|
44191
|
+
|
|
44192
|
+
|
|
44193
|
+
|
|
44194
|
+
const base64Compile = str => WebAssembly.compile(typeof Buffer !== 'undefined' ? Buffer.from(str, 'base64') : Uint8Array.from(atob(str), b => b.charCodeAt(0)));
|
|
43767
44195
|
|
|
43768
44196
|
class ComponentError extends Error {
|
|
43769
44197
|
constructor (value) {
|
|
@@ -43773,10 +44201,8 @@ class ComponentError extends Error {
|
|
|
43773
44201
|
}
|
|
43774
44202
|
}
|
|
43775
44203
|
|
|
43776
|
-
|
|
43777
|
-
|
|
43778
|
-
return String(val);
|
|
43779
|
-
}
|
|
44204
|
+
let dv = new DataView(new ArrayBuffer());
|
|
44205
|
+
const dataView = mem => dv.buffer === mem.buffer ? dv : dv = new DataView(mem.buffer);
|
|
43780
44206
|
|
|
43781
44207
|
const isNode = typeof process !== 'undefined' && process.versions && process.versions.node;
|
|
43782
44208
|
let _fs;
|
|
@@ -43788,25 +44214,987 @@ async function fetchCompile (url) {
|
|
|
43788
44214
|
return fetch(url).then(WebAssembly.compileStreaming);
|
|
43789
44215
|
}
|
|
43790
44216
|
|
|
43791
|
-
|
|
44217
|
+
function getErrorPayload(e) {
|
|
44218
|
+
if (hasOwnProperty.call(e, 'payload')) return e.payload;
|
|
44219
|
+
if (hasOwnProperty.call(e, 'message')) return String(e.message);
|
|
44220
|
+
return String(e);
|
|
44221
|
+
}
|
|
44222
|
+
|
|
44223
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
44224
|
+
|
|
44225
|
+
const instantiateCore = WebAssembly.instantiate;
|
|
44226
|
+
|
|
44227
|
+
const toUint64 = val => BigInt.asUintN(64, val);
|
|
44228
|
+
|
|
44229
|
+
function toString(val) {
|
|
44230
|
+
if (typeof val === 'symbol') throw new TypeError('symbols cannot be converted to strings');
|
|
44231
|
+
return String(val);
|
|
44232
|
+
}
|
|
44233
|
+
|
|
44234
|
+
function toUint32(val) {
|
|
44235
|
+
return val >>> 0;
|
|
44236
|
+
}
|
|
44237
|
+
|
|
44238
|
+
const utf8Decoder = new TextDecoder();
|
|
44239
|
+
|
|
44240
|
+
const utf8Encoder = new TextEncoder();
|
|
44241
|
+
|
|
44242
|
+
let utf8EncodedLen = 0;
|
|
44243
|
+
function utf8Encode(s, realloc, memory) {
|
|
44244
|
+
if (typeof s !== 'string') throw new TypeError('expected a string');
|
|
44245
|
+
if (s.length === 0) {
|
|
44246
|
+
utf8EncodedLen = 0;
|
|
44247
|
+
return 1;
|
|
44248
|
+
}
|
|
44249
|
+
let allocLen = 0;
|
|
44250
|
+
let ptr = 0;
|
|
44251
|
+
let writtenTotal = 0;
|
|
44252
|
+
while (s.length > 0) {
|
|
44253
|
+
ptr = realloc(ptr, allocLen, 1, allocLen + s.length);
|
|
44254
|
+
allocLen += s.length;
|
|
44255
|
+
const { read, written } = utf8Encoder.encodeInto(
|
|
44256
|
+
s,
|
|
44257
|
+
new Uint8Array(memory.buffer, ptr + writtenTotal, allocLen - writtenTotal),
|
|
44258
|
+
);
|
|
44259
|
+
writtenTotal += written;
|
|
44260
|
+
s = s.slice(read);
|
|
44261
|
+
}
|
|
44262
|
+
if (allocLen > writtenTotal)
|
|
44263
|
+
ptr = realloc(ptr, allocLen, 1, writtenTotal);
|
|
44264
|
+
utf8EncodedLen = writtenTotal;
|
|
44265
|
+
return ptr;
|
|
44266
|
+
}
|
|
43792
44267
|
|
|
43793
44268
|
let exports0;
|
|
43794
44269
|
let exports1;
|
|
43795
|
-
let memory0;
|
|
43796
44270
|
|
|
43797
|
-
function lowering0(arg0
|
|
43798
|
-
|
|
43799
|
-
|
|
43800
|
-
|
|
43801
|
-
|
|
44271
|
+
function lowering0(arg0) {
|
|
44272
|
+
(0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .dropDirectoryEntryStream */ .h1)(arg0 >>> 0);
|
|
44273
|
+
}
|
|
44274
|
+
|
|
44275
|
+
function lowering1(arg0, arg1) {
|
|
44276
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .readViaStream */ .wF)(arg0 >>> 0, BigInt.asUintN(64, arg1));
|
|
44277
|
+
return toUint32(ret);
|
|
44278
|
+
}
|
|
44279
|
+
|
|
44280
|
+
function lowering2(arg0, arg1) {
|
|
44281
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .writeViaStream */ .Zw)(arg0 >>> 0, BigInt.asUintN(64, arg1));
|
|
44282
|
+
return toUint32(ret);
|
|
44283
|
+
}
|
|
44284
|
+
|
|
44285
|
+
function lowering3(arg0) {
|
|
44286
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .appendViaStream */ .Tk)(arg0 >>> 0);
|
|
44287
|
+
return toUint32(ret);
|
|
44288
|
+
}
|
|
44289
|
+
|
|
44290
|
+
function lowering4(arg0) {
|
|
44291
|
+
(0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .dropDescriptor */ .Lk)(arg0 >>> 0);
|
|
44292
|
+
}
|
|
44293
|
+
|
|
44294
|
+
function lowering5(arg0) {
|
|
44295
|
+
let variant0;
|
|
44296
|
+
switch (arg0) {
|
|
44297
|
+
case 0: {
|
|
44298
|
+
variant0= {
|
|
44299
|
+
tag: 'ok',
|
|
44300
|
+
val: undefined
|
|
44301
|
+
};
|
|
44302
|
+
break;
|
|
44303
|
+
}
|
|
44304
|
+
case 1: {
|
|
44305
|
+
variant0= {
|
|
44306
|
+
tag: 'err',
|
|
44307
|
+
val: undefined
|
|
44308
|
+
};
|
|
44309
|
+
break;
|
|
44310
|
+
}
|
|
44311
|
+
default: {
|
|
44312
|
+
throw new TypeError('invalid variant discriminant for expected');
|
|
44313
|
+
}
|
|
44314
|
+
}
|
|
44315
|
+
(0,_bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__/* .exit */ .J)(variant0);
|
|
44316
|
+
}
|
|
44317
|
+
|
|
44318
|
+
function lowering6(arg0) {
|
|
44319
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .dropInputStream */ .dU)(arg0 >>> 0);
|
|
44320
|
+
}
|
|
44321
|
+
|
|
44322
|
+
function lowering7(arg0) {
|
|
44323
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .dropOutputStream */ .oc)(arg0 >>> 0);
|
|
43802
44324
|
}
|
|
43803
44325
|
let exports2;
|
|
44326
|
+
let memory0;
|
|
44327
|
+
|
|
44328
|
+
function lowering8(arg0) {
|
|
44329
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_4__/* .getStdio */ .vT)();
|
|
44330
|
+
const {stdin: v0_0, stdout: v0_1, stderr: v0_2 } = ret;
|
|
44331
|
+
dataView(memory0).setInt32(arg0 + 0, toUint32(v0_0), true);
|
|
44332
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(v0_1), true);
|
|
44333
|
+
dataView(memory0).setInt32(arg0 + 8, toUint32(v0_2), true);
|
|
44334
|
+
}
|
|
43804
44335
|
let realloc0;
|
|
44336
|
+
|
|
44337
|
+
function lowering9(arg0) {
|
|
44338
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_4__/* .getDirectories */ .$z)();
|
|
44339
|
+
const vec2 = ret;
|
|
44340
|
+
const len2 = vec2.length;
|
|
44341
|
+
const result2 = realloc0(0, 0, 4, len2 * 12);
|
|
44342
|
+
for (let i = 0; i < vec2.length; i++) {
|
|
44343
|
+
const e = vec2[i];
|
|
44344
|
+
const base = result2 + i * 12;const [tuple0_0, tuple0_1] = e;
|
|
44345
|
+
dataView(memory0).setInt32(base + 0, toUint32(tuple0_0), true);
|
|
44346
|
+
const ptr1 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
44347
|
+
const len1 = utf8EncodedLen;
|
|
44348
|
+
dataView(memory0).setInt32(base + 8, len1, true);
|
|
44349
|
+
dataView(memory0).setInt32(base + 4, ptr1, true);
|
|
44350
|
+
}
|
|
44351
|
+
dataView(memory0).setInt32(arg0 + 4, len2, true);
|
|
44352
|
+
dataView(memory0).setInt32(arg0 + 0, result2, true);
|
|
44353
|
+
}
|
|
44354
|
+
|
|
44355
|
+
function lowering10(arg0, arg1) {
|
|
44356
|
+
let ret;
|
|
44357
|
+
try {
|
|
44358
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .getType */ .oL)(arg0 >>> 0) };
|
|
44359
|
+
} catch (e) {
|
|
44360
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
44361
|
+
}
|
|
44362
|
+
const variant2 = ret;
|
|
44363
|
+
switch (variant2.tag) {
|
|
44364
|
+
case 'ok': {
|
|
44365
|
+
const e = variant2.val;
|
|
44366
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
44367
|
+
const val0 = toString(e);
|
|
44368
|
+
let enum0;
|
|
44369
|
+
switch (val0) {
|
|
44370
|
+
case 'unknown': {
|
|
44371
|
+
enum0 = 0;
|
|
44372
|
+
break;
|
|
44373
|
+
}
|
|
44374
|
+
case 'block-device': {
|
|
44375
|
+
enum0 = 1;
|
|
44376
|
+
break;
|
|
44377
|
+
}
|
|
44378
|
+
case 'character-device': {
|
|
44379
|
+
enum0 = 2;
|
|
44380
|
+
break;
|
|
44381
|
+
}
|
|
44382
|
+
case 'directory': {
|
|
44383
|
+
enum0 = 3;
|
|
44384
|
+
break;
|
|
44385
|
+
}
|
|
44386
|
+
case 'fifo': {
|
|
44387
|
+
enum0 = 4;
|
|
44388
|
+
break;
|
|
44389
|
+
}
|
|
44390
|
+
case 'symbolic-link': {
|
|
44391
|
+
enum0 = 5;
|
|
44392
|
+
break;
|
|
44393
|
+
}
|
|
44394
|
+
case 'regular-file': {
|
|
44395
|
+
enum0 = 6;
|
|
44396
|
+
break;
|
|
44397
|
+
}
|
|
44398
|
+
case 'socket': {
|
|
44399
|
+
enum0 = 7;
|
|
44400
|
+
break;
|
|
44401
|
+
}
|
|
44402
|
+
default: {
|
|
44403
|
+
throw new TypeError(`"${val0}" is not one of the cases of descriptor-type`);
|
|
44404
|
+
}
|
|
44405
|
+
}
|
|
44406
|
+
dataView(memory0).setInt8(arg1 + 1, enum0, true);
|
|
44407
|
+
break;
|
|
44408
|
+
}
|
|
44409
|
+
case 'err': {
|
|
44410
|
+
const e = variant2.val;
|
|
44411
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
44412
|
+
const val1 = toString(e);
|
|
44413
|
+
let enum1;
|
|
44414
|
+
switch (val1) {
|
|
44415
|
+
case 'access': {
|
|
44416
|
+
enum1 = 0;
|
|
44417
|
+
break;
|
|
44418
|
+
}
|
|
44419
|
+
case 'would-block': {
|
|
44420
|
+
enum1 = 1;
|
|
44421
|
+
break;
|
|
44422
|
+
}
|
|
44423
|
+
case 'already': {
|
|
44424
|
+
enum1 = 2;
|
|
44425
|
+
break;
|
|
44426
|
+
}
|
|
44427
|
+
case 'bad-descriptor': {
|
|
44428
|
+
enum1 = 3;
|
|
44429
|
+
break;
|
|
44430
|
+
}
|
|
44431
|
+
case 'busy': {
|
|
44432
|
+
enum1 = 4;
|
|
44433
|
+
break;
|
|
44434
|
+
}
|
|
44435
|
+
case 'deadlock': {
|
|
44436
|
+
enum1 = 5;
|
|
44437
|
+
break;
|
|
44438
|
+
}
|
|
44439
|
+
case 'quota': {
|
|
44440
|
+
enum1 = 6;
|
|
44441
|
+
break;
|
|
44442
|
+
}
|
|
44443
|
+
case 'exist': {
|
|
44444
|
+
enum1 = 7;
|
|
44445
|
+
break;
|
|
44446
|
+
}
|
|
44447
|
+
case 'file-too-large': {
|
|
44448
|
+
enum1 = 8;
|
|
44449
|
+
break;
|
|
44450
|
+
}
|
|
44451
|
+
case 'illegal-byte-sequence': {
|
|
44452
|
+
enum1 = 9;
|
|
44453
|
+
break;
|
|
44454
|
+
}
|
|
44455
|
+
case 'in-progress': {
|
|
44456
|
+
enum1 = 10;
|
|
44457
|
+
break;
|
|
44458
|
+
}
|
|
44459
|
+
case 'interrupted': {
|
|
44460
|
+
enum1 = 11;
|
|
44461
|
+
break;
|
|
44462
|
+
}
|
|
44463
|
+
case 'invalid': {
|
|
44464
|
+
enum1 = 12;
|
|
44465
|
+
break;
|
|
44466
|
+
}
|
|
44467
|
+
case 'io': {
|
|
44468
|
+
enum1 = 13;
|
|
44469
|
+
break;
|
|
44470
|
+
}
|
|
44471
|
+
case 'is-directory': {
|
|
44472
|
+
enum1 = 14;
|
|
44473
|
+
break;
|
|
44474
|
+
}
|
|
44475
|
+
case 'loop': {
|
|
44476
|
+
enum1 = 15;
|
|
44477
|
+
break;
|
|
44478
|
+
}
|
|
44479
|
+
case 'too-many-links': {
|
|
44480
|
+
enum1 = 16;
|
|
44481
|
+
break;
|
|
44482
|
+
}
|
|
44483
|
+
case 'message-size': {
|
|
44484
|
+
enum1 = 17;
|
|
44485
|
+
break;
|
|
44486
|
+
}
|
|
44487
|
+
case 'name-too-long': {
|
|
44488
|
+
enum1 = 18;
|
|
44489
|
+
break;
|
|
44490
|
+
}
|
|
44491
|
+
case 'no-device': {
|
|
44492
|
+
enum1 = 19;
|
|
44493
|
+
break;
|
|
44494
|
+
}
|
|
44495
|
+
case 'no-entry': {
|
|
44496
|
+
enum1 = 20;
|
|
44497
|
+
break;
|
|
44498
|
+
}
|
|
44499
|
+
case 'no-lock': {
|
|
44500
|
+
enum1 = 21;
|
|
44501
|
+
break;
|
|
44502
|
+
}
|
|
44503
|
+
case 'insufficient-memory': {
|
|
44504
|
+
enum1 = 22;
|
|
44505
|
+
break;
|
|
44506
|
+
}
|
|
44507
|
+
case 'insufficient-space': {
|
|
44508
|
+
enum1 = 23;
|
|
44509
|
+
break;
|
|
44510
|
+
}
|
|
44511
|
+
case 'not-directory': {
|
|
44512
|
+
enum1 = 24;
|
|
44513
|
+
break;
|
|
44514
|
+
}
|
|
44515
|
+
case 'not-empty': {
|
|
44516
|
+
enum1 = 25;
|
|
44517
|
+
break;
|
|
44518
|
+
}
|
|
44519
|
+
case 'not-recoverable': {
|
|
44520
|
+
enum1 = 26;
|
|
44521
|
+
break;
|
|
44522
|
+
}
|
|
44523
|
+
case 'unsupported': {
|
|
44524
|
+
enum1 = 27;
|
|
44525
|
+
break;
|
|
44526
|
+
}
|
|
44527
|
+
case 'no-tty': {
|
|
44528
|
+
enum1 = 28;
|
|
44529
|
+
break;
|
|
44530
|
+
}
|
|
44531
|
+
case 'no-such-device': {
|
|
44532
|
+
enum1 = 29;
|
|
44533
|
+
break;
|
|
44534
|
+
}
|
|
44535
|
+
case 'overflow': {
|
|
44536
|
+
enum1 = 30;
|
|
44537
|
+
break;
|
|
44538
|
+
}
|
|
44539
|
+
case 'not-permitted': {
|
|
44540
|
+
enum1 = 31;
|
|
44541
|
+
break;
|
|
44542
|
+
}
|
|
44543
|
+
case 'pipe': {
|
|
44544
|
+
enum1 = 32;
|
|
44545
|
+
break;
|
|
44546
|
+
}
|
|
44547
|
+
case 'read-only': {
|
|
44548
|
+
enum1 = 33;
|
|
44549
|
+
break;
|
|
44550
|
+
}
|
|
44551
|
+
case 'invalid-seek': {
|
|
44552
|
+
enum1 = 34;
|
|
44553
|
+
break;
|
|
44554
|
+
}
|
|
44555
|
+
case 'text-file-busy': {
|
|
44556
|
+
enum1 = 35;
|
|
44557
|
+
break;
|
|
44558
|
+
}
|
|
44559
|
+
case 'cross-device': {
|
|
44560
|
+
enum1 = 36;
|
|
44561
|
+
break;
|
|
44562
|
+
}
|
|
44563
|
+
default: {
|
|
44564
|
+
throw new TypeError(`"${val1}" is not one of the cases of error-code`);
|
|
44565
|
+
}
|
|
44566
|
+
}
|
|
44567
|
+
dataView(memory0).setInt8(arg1 + 1, enum1, true);
|
|
44568
|
+
break;
|
|
44569
|
+
}
|
|
44570
|
+
default: {
|
|
44571
|
+
throw new TypeError('invalid variant specified for result');
|
|
44572
|
+
}
|
|
44573
|
+
}
|
|
44574
|
+
}
|
|
44575
|
+
|
|
44576
|
+
function lowering11(arg0, arg1) {
|
|
44577
|
+
let ret;
|
|
44578
|
+
try {
|
|
44579
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .stat */ .lz)(arg0 >>> 0) };
|
|
44580
|
+
} catch (e) {
|
|
44581
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
44582
|
+
}
|
|
44583
|
+
const variant6 = ret;
|
|
44584
|
+
switch (variant6.tag) {
|
|
44585
|
+
case 'ok': {
|
|
44586
|
+
const e = variant6.val;
|
|
44587
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
44588
|
+
const {device: v0_0, inode: v0_1, type: v0_2, linkCount: v0_3, size: v0_4, dataAccessTimestamp: v0_5, dataModificationTimestamp: v0_6, statusChangeTimestamp: v0_7 } = e;
|
|
44589
|
+
dataView(memory0).setBigInt64(arg1 + 8, toUint64(v0_0), true);
|
|
44590
|
+
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true);
|
|
44591
|
+
const val1 = toString(v0_2);
|
|
44592
|
+
let enum1;
|
|
44593
|
+
switch (val1) {
|
|
44594
|
+
case 'unknown': {
|
|
44595
|
+
enum1 = 0;
|
|
44596
|
+
break;
|
|
44597
|
+
}
|
|
44598
|
+
case 'block-device': {
|
|
44599
|
+
enum1 = 1;
|
|
44600
|
+
break;
|
|
44601
|
+
}
|
|
44602
|
+
case 'character-device': {
|
|
44603
|
+
enum1 = 2;
|
|
44604
|
+
break;
|
|
44605
|
+
}
|
|
44606
|
+
case 'directory': {
|
|
44607
|
+
enum1 = 3;
|
|
44608
|
+
break;
|
|
44609
|
+
}
|
|
44610
|
+
case 'fifo': {
|
|
44611
|
+
enum1 = 4;
|
|
44612
|
+
break;
|
|
44613
|
+
}
|
|
44614
|
+
case 'symbolic-link': {
|
|
44615
|
+
enum1 = 5;
|
|
44616
|
+
break;
|
|
44617
|
+
}
|
|
44618
|
+
case 'regular-file': {
|
|
44619
|
+
enum1 = 6;
|
|
44620
|
+
break;
|
|
44621
|
+
}
|
|
44622
|
+
case 'socket': {
|
|
44623
|
+
enum1 = 7;
|
|
44624
|
+
break;
|
|
44625
|
+
}
|
|
44626
|
+
default: {
|
|
44627
|
+
throw new TypeError(`"${val1}" is not one of the cases of descriptor-type`);
|
|
44628
|
+
}
|
|
44629
|
+
}
|
|
44630
|
+
dataView(memory0).setInt8(arg1 + 24, enum1, true);
|
|
44631
|
+
dataView(memory0).setBigInt64(arg1 + 32, toUint64(v0_3), true);
|
|
44632
|
+
dataView(memory0).setBigInt64(arg1 + 40, toUint64(v0_4), true);
|
|
44633
|
+
const {seconds: v2_0, nanoseconds: v2_1 } = v0_5;
|
|
44634
|
+
dataView(memory0).setBigInt64(arg1 + 48, toUint64(v2_0), true);
|
|
44635
|
+
dataView(memory0).setInt32(arg1 + 56, toUint32(v2_1), true);
|
|
44636
|
+
const {seconds: v3_0, nanoseconds: v3_1 } = v0_6;
|
|
44637
|
+
dataView(memory0).setBigInt64(arg1 + 64, toUint64(v3_0), true);
|
|
44638
|
+
dataView(memory0).setInt32(arg1 + 72, toUint32(v3_1), true);
|
|
44639
|
+
const {seconds: v4_0, nanoseconds: v4_1 } = v0_7;
|
|
44640
|
+
dataView(memory0).setBigInt64(arg1 + 80, toUint64(v4_0), true);
|
|
44641
|
+
dataView(memory0).setInt32(arg1 + 88, toUint32(v4_1), true);
|
|
44642
|
+
break;
|
|
44643
|
+
}
|
|
44644
|
+
case 'err': {
|
|
44645
|
+
const e = variant6.val;
|
|
44646
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
44647
|
+
const val5 = toString(e);
|
|
44648
|
+
let enum5;
|
|
44649
|
+
switch (val5) {
|
|
44650
|
+
case 'access': {
|
|
44651
|
+
enum5 = 0;
|
|
44652
|
+
break;
|
|
44653
|
+
}
|
|
44654
|
+
case 'would-block': {
|
|
44655
|
+
enum5 = 1;
|
|
44656
|
+
break;
|
|
44657
|
+
}
|
|
44658
|
+
case 'already': {
|
|
44659
|
+
enum5 = 2;
|
|
44660
|
+
break;
|
|
44661
|
+
}
|
|
44662
|
+
case 'bad-descriptor': {
|
|
44663
|
+
enum5 = 3;
|
|
44664
|
+
break;
|
|
44665
|
+
}
|
|
44666
|
+
case 'busy': {
|
|
44667
|
+
enum5 = 4;
|
|
44668
|
+
break;
|
|
44669
|
+
}
|
|
44670
|
+
case 'deadlock': {
|
|
44671
|
+
enum5 = 5;
|
|
44672
|
+
break;
|
|
44673
|
+
}
|
|
44674
|
+
case 'quota': {
|
|
44675
|
+
enum5 = 6;
|
|
44676
|
+
break;
|
|
44677
|
+
}
|
|
44678
|
+
case 'exist': {
|
|
44679
|
+
enum5 = 7;
|
|
44680
|
+
break;
|
|
44681
|
+
}
|
|
44682
|
+
case 'file-too-large': {
|
|
44683
|
+
enum5 = 8;
|
|
44684
|
+
break;
|
|
44685
|
+
}
|
|
44686
|
+
case 'illegal-byte-sequence': {
|
|
44687
|
+
enum5 = 9;
|
|
44688
|
+
break;
|
|
44689
|
+
}
|
|
44690
|
+
case 'in-progress': {
|
|
44691
|
+
enum5 = 10;
|
|
44692
|
+
break;
|
|
44693
|
+
}
|
|
44694
|
+
case 'interrupted': {
|
|
44695
|
+
enum5 = 11;
|
|
44696
|
+
break;
|
|
44697
|
+
}
|
|
44698
|
+
case 'invalid': {
|
|
44699
|
+
enum5 = 12;
|
|
44700
|
+
break;
|
|
44701
|
+
}
|
|
44702
|
+
case 'io': {
|
|
44703
|
+
enum5 = 13;
|
|
44704
|
+
break;
|
|
44705
|
+
}
|
|
44706
|
+
case 'is-directory': {
|
|
44707
|
+
enum5 = 14;
|
|
44708
|
+
break;
|
|
44709
|
+
}
|
|
44710
|
+
case 'loop': {
|
|
44711
|
+
enum5 = 15;
|
|
44712
|
+
break;
|
|
44713
|
+
}
|
|
44714
|
+
case 'too-many-links': {
|
|
44715
|
+
enum5 = 16;
|
|
44716
|
+
break;
|
|
44717
|
+
}
|
|
44718
|
+
case 'message-size': {
|
|
44719
|
+
enum5 = 17;
|
|
44720
|
+
break;
|
|
44721
|
+
}
|
|
44722
|
+
case 'name-too-long': {
|
|
44723
|
+
enum5 = 18;
|
|
44724
|
+
break;
|
|
44725
|
+
}
|
|
44726
|
+
case 'no-device': {
|
|
44727
|
+
enum5 = 19;
|
|
44728
|
+
break;
|
|
44729
|
+
}
|
|
44730
|
+
case 'no-entry': {
|
|
44731
|
+
enum5 = 20;
|
|
44732
|
+
break;
|
|
44733
|
+
}
|
|
44734
|
+
case 'no-lock': {
|
|
44735
|
+
enum5 = 21;
|
|
44736
|
+
break;
|
|
44737
|
+
}
|
|
44738
|
+
case 'insufficient-memory': {
|
|
44739
|
+
enum5 = 22;
|
|
44740
|
+
break;
|
|
44741
|
+
}
|
|
44742
|
+
case 'insufficient-space': {
|
|
44743
|
+
enum5 = 23;
|
|
44744
|
+
break;
|
|
44745
|
+
}
|
|
44746
|
+
case 'not-directory': {
|
|
44747
|
+
enum5 = 24;
|
|
44748
|
+
break;
|
|
44749
|
+
}
|
|
44750
|
+
case 'not-empty': {
|
|
44751
|
+
enum5 = 25;
|
|
44752
|
+
break;
|
|
44753
|
+
}
|
|
44754
|
+
case 'not-recoverable': {
|
|
44755
|
+
enum5 = 26;
|
|
44756
|
+
break;
|
|
44757
|
+
}
|
|
44758
|
+
case 'unsupported': {
|
|
44759
|
+
enum5 = 27;
|
|
44760
|
+
break;
|
|
44761
|
+
}
|
|
44762
|
+
case 'no-tty': {
|
|
44763
|
+
enum5 = 28;
|
|
44764
|
+
break;
|
|
44765
|
+
}
|
|
44766
|
+
case 'no-such-device': {
|
|
44767
|
+
enum5 = 29;
|
|
44768
|
+
break;
|
|
44769
|
+
}
|
|
44770
|
+
case 'overflow': {
|
|
44771
|
+
enum5 = 30;
|
|
44772
|
+
break;
|
|
44773
|
+
}
|
|
44774
|
+
case 'not-permitted': {
|
|
44775
|
+
enum5 = 31;
|
|
44776
|
+
break;
|
|
44777
|
+
}
|
|
44778
|
+
case 'pipe': {
|
|
44779
|
+
enum5 = 32;
|
|
44780
|
+
break;
|
|
44781
|
+
}
|
|
44782
|
+
case 'read-only': {
|
|
44783
|
+
enum5 = 33;
|
|
44784
|
+
break;
|
|
44785
|
+
}
|
|
44786
|
+
case 'invalid-seek': {
|
|
44787
|
+
enum5 = 34;
|
|
44788
|
+
break;
|
|
44789
|
+
}
|
|
44790
|
+
case 'text-file-busy': {
|
|
44791
|
+
enum5 = 35;
|
|
44792
|
+
break;
|
|
44793
|
+
}
|
|
44794
|
+
case 'cross-device': {
|
|
44795
|
+
enum5 = 36;
|
|
44796
|
+
break;
|
|
44797
|
+
}
|
|
44798
|
+
default: {
|
|
44799
|
+
throw new TypeError(`"${val5}" is not one of the cases of error-code`);
|
|
44800
|
+
}
|
|
44801
|
+
}
|
|
44802
|
+
dataView(memory0).setInt8(arg1 + 8, enum5, true);
|
|
44803
|
+
break;
|
|
44804
|
+
}
|
|
44805
|
+
default: {
|
|
44806
|
+
throw new TypeError('invalid variant specified for result');
|
|
44807
|
+
}
|
|
44808
|
+
}
|
|
44809
|
+
}
|
|
44810
|
+
|
|
44811
|
+
function lowering12(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
44812
|
+
if ((arg1 & 4294967294) !== 0) {
|
|
44813
|
+
throw new TypeError('flags have extraneous bits set');
|
|
44814
|
+
}
|
|
44815
|
+
const flags0 = {
|
|
44816
|
+
symlinkFollow: Boolean(arg1 & 1),
|
|
44817
|
+
};
|
|
44818
|
+
const ptr1 = arg2;
|
|
44819
|
+
const len1 = arg3;
|
|
44820
|
+
const result1 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr1, len1));
|
|
44821
|
+
if ((arg4 & 4294967280) !== 0) {
|
|
44822
|
+
throw new TypeError('flags have extraneous bits set');
|
|
44823
|
+
}
|
|
44824
|
+
const flags2 = {
|
|
44825
|
+
create: Boolean(arg4 & 1),
|
|
44826
|
+
directory: Boolean(arg4 & 2),
|
|
44827
|
+
exclusive: Boolean(arg4 & 4),
|
|
44828
|
+
truncate: Boolean(arg4 & 8),
|
|
44829
|
+
};
|
|
44830
|
+
if ((arg5 & 4294967232) !== 0) {
|
|
44831
|
+
throw new TypeError('flags have extraneous bits set');
|
|
44832
|
+
}
|
|
44833
|
+
const flags3 = {
|
|
44834
|
+
read: Boolean(arg5 & 1),
|
|
44835
|
+
write: Boolean(arg5 & 2),
|
|
44836
|
+
fileIntegritySync: Boolean(arg5 & 4),
|
|
44837
|
+
dataIntegritySync: Boolean(arg5 & 8),
|
|
44838
|
+
requestedWriteSync: Boolean(arg5 & 16),
|
|
44839
|
+
mutateDirectory: Boolean(arg5 & 32),
|
|
44840
|
+
};
|
|
44841
|
+
if ((arg6 & 4294967288) !== 0) {
|
|
44842
|
+
throw new TypeError('flags have extraneous bits set');
|
|
44843
|
+
}
|
|
44844
|
+
const flags4 = {
|
|
44845
|
+
readable: Boolean(arg6 & 1),
|
|
44846
|
+
writeable: Boolean(arg6 & 2),
|
|
44847
|
+
executable: Boolean(arg6 & 4),
|
|
44848
|
+
};
|
|
44849
|
+
let ret;
|
|
44850
|
+
try {
|
|
44851
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .openAt */ .d2)(arg0 >>> 0, flags0, result1, flags2, flags3, flags4) };
|
|
44852
|
+
} catch (e) {
|
|
44853
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
44854
|
+
}
|
|
44855
|
+
const variant6 = ret;
|
|
44856
|
+
switch (variant6.tag) {
|
|
44857
|
+
case 'ok': {
|
|
44858
|
+
const e = variant6.val;
|
|
44859
|
+
dataView(memory0).setInt8(arg7 + 0, 0, true);
|
|
44860
|
+
dataView(memory0).setInt32(arg7 + 4, toUint32(e), true);
|
|
44861
|
+
break;
|
|
44862
|
+
}
|
|
44863
|
+
case 'err': {
|
|
44864
|
+
const e = variant6.val;
|
|
44865
|
+
dataView(memory0).setInt8(arg7 + 0, 1, true);
|
|
44866
|
+
const val5 = toString(e);
|
|
44867
|
+
let enum5;
|
|
44868
|
+
switch (val5) {
|
|
44869
|
+
case 'access': {
|
|
44870
|
+
enum5 = 0;
|
|
44871
|
+
break;
|
|
44872
|
+
}
|
|
44873
|
+
case 'would-block': {
|
|
44874
|
+
enum5 = 1;
|
|
44875
|
+
break;
|
|
44876
|
+
}
|
|
44877
|
+
case 'already': {
|
|
44878
|
+
enum5 = 2;
|
|
44879
|
+
break;
|
|
44880
|
+
}
|
|
44881
|
+
case 'bad-descriptor': {
|
|
44882
|
+
enum5 = 3;
|
|
44883
|
+
break;
|
|
44884
|
+
}
|
|
44885
|
+
case 'busy': {
|
|
44886
|
+
enum5 = 4;
|
|
44887
|
+
break;
|
|
44888
|
+
}
|
|
44889
|
+
case 'deadlock': {
|
|
44890
|
+
enum5 = 5;
|
|
44891
|
+
break;
|
|
44892
|
+
}
|
|
44893
|
+
case 'quota': {
|
|
44894
|
+
enum5 = 6;
|
|
44895
|
+
break;
|
|
44896
|
+
}
|
|
44897
|
+
case 'exist': {
|
|
44898
|
+
enum5 = 7;
|
|
44899
|
+
break;
|
|
44900
|
+
}
|
|
44901
|
+
case 'file-too-large': {
|
|
44902
|
+
enum5 = 8;
|
|
44903
|
+
break;
|
|
44904
|
+
}
|
|
44905
|
+
case 'illegal-byte-sequence': {
|
|
44906
|
+
enum5 = 9;
|
|
44907
|
+
break;
|
|
44908
|
+
}
|
|
44909
|
+
case 'in-progress': {
|
|
44910
|
+
enum5 = 10;
|
|
44911
|
+
break;
|
|
44912
|
+
}
|
|
44913
|
+
case 'interrupted': {
|
|
44914
|
+
enum5 = 11;
|
|
44915
|
+
break;
|
|
44916
|
+
}
|
|
44917
|
+
case 'invalid': {
|
|
44918
|
+
enum5 = 12;
|
|
44919
|
+
break;
|
|
44920
|
+
}
|
|
44921
|
+
case 'io': {
|
|
44922
|
+
enum5 = 13;
|
|
44923
|
+
break;
|
|
44924
|
+
}
|
|
44925
|
+
case 'is-directory': {
|
|
44926
|
+
enum5 = 14;
|
|
44927
|
+
break;
|
|
44928
|
+
}
|
|
44929
|
+
case 'loop': {
|
|
44930
|
+
enum5 = 15;
|
|
44931
|
+
break;
|
|
44932
|
+
}
|
|
44933
|
+
case 'too-many-links': {
|
|
44934
|
+
enum5 = 16;
|
|
44935
|
+
break;
|
|
44936
|
+
}
|
|
44937
|
+
case 'message-size': {
|
|
44938
|
+
enum5 = 17;
|
|
44939
|
+
break;
|
|
44940
|
+
}
|
|
44941
|
+
case 'name-too-long': {
|
|
44942
|
+
enum5 = 18;
|
|
44943
|
+
break;
|
|
44944
|
+
}
|
|
44945
|
+
case 'no-device': {
|
|
44946
|
+
enum5 = 19;
|
|
44947
|
+
break;
|
|
44948
|
+
}
|
|
44949
|
+
case 'no-entry': {
|
|
44950
|
+
enum5 = 20;
|
|
44951
|
+
break;
|
|
44952
|
+
}
|
|
44953
|
+
case 'no-lock': {
|
|
44954
|
+
enum5 = 21;
|
|
44955
|
+
break;
|
|
44956
|
+
}
|
|
44957
|
+
case 'insufficient-memory': {
|
|
44958
|
+
enum5 = 22;
|
|
44959
|
+
break;
|
|
44960
|
+
}
|
|
44961
|
+
case 'insufficient-space': {
|
|
44962
|
+
enum5 = 23;
|
|
44963
|
+
break;
|
|
44964
|
+
}
|
|
44965
|
+
case 'not-directory': {
|
|
44966
|
+
enum5 = 24;
|
|
44967
|
+
break;
|
|
44968
|
+
}
|
|
44969
|
+
case 'not-empty': {
|
|
44970
|
+
enum5 = 25;
|
|
44971
|
+
break;
|
|
44972
|
+
}
|
|
44973
|
+
case 'not-recoverable': {
|
|
44974
|
+
enum5 = 26;
|
|
44975
|
+
break;
|
|
44976
|
+
}
|
|
44977
|
+
case 'unsupported': {
|
|
44978
|
+
enum5 = 27;
|
|
44979
|
+
break;
|
|
44980
|
+
}
|
|
44981
|
+
case 'no-tty': {
|
|
44982
|
+
enum5 = 28;
|
|
44983
|
+
break;
|
|
44984
|
+
}
|
|
44985
|
+
case 'no-such-device': {
|
|
44986
|
+
enum5 = 29;
|
|
44987
|
+
break;
|
|
44988
|
+
}
|
|
44989
|
+
case 'overflow': {
|
|
44990
|
+
enum5 = 30;
|
|
44991
|
+
break;
|
|
44992
|
+
}
|
|
44993
|
+
case 'not-permitted': {
|
|
44994
|
+
enum5 = 31;
|
|
44995
|
+
break;
|
|
44996
|
+
}
|
|
44997
|
+
case 'pipe': {
|
|
44998
|
+
enum5 = 32;
|
|
44999
|
+
break;
|
|
45000
|
+
}
|
|
45001
|
+
case 'read-only': {
|
|
45002
|
+
enum5 = 33;
|
|
45003
|
+
break;
|
|
45004
|
+
}
|
|
45005
|
+
case 'invalid-seek': {
|
|
45006
|
+
enum5 = 34;
|
|
45007
|
+
break;
|
|
45008
|
+
}
|
|
45009
|
+
case 'text-file-busy': {
|
|
45010
|
+
enum5 = 35;
|
|
45011
|
+
break;
|
|
45012
|
+
}
|
|
45013
|
+
case 'cross-device': {
|
|
45014
|
+
enum5 = 36;
|
|
45015
|
+
break;
|
|
45016
|
+
}
|
|
45017
|
+
default: {
|
|
45018
|
+
throw new TypeError(`"${val5}" is not one of the cases of error-code`);
|
|
45019
|
+
}
|
|
45020
|
+
}
|
|
45021
|
+
dataView(memory0).setInt8(arg7 + 4, enum5, true);
|
|
45022
|
+
break;
|
|
45023
|
+
}
|
|
45024
|
+
default: {
|
|
45025
|
+
throw new TypeError('invalid variant specified for result');
|
|
45026
|
+
}
|
|
45027
|
+
}
|
|
45028
|
+
}
|
|
45029
|
+
|
|
45030
|
+
function lowering13(arg0, arg1) {
|
|
45031
|
+
const ret = (0,_bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_1__/* .getRandomBytes */ .Iv)(BigInt.asUintN(64, arg0));
|
|
45032
|
+
const val0 = ret;
|
|
45033
|
+
const len0 = val0.byteLength;
|
|
45034
|
+
const ptr0 = realloc0(0, 0, 1, len0 * 1);
|
|
45035
|
+
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
45036
|
+
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
45037
|
+
dataView(memory0).setInt32(arg1 + 4, len0, true);
|
|
45038
|
+
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
45039
|
+
}
|
|
45040
|
+
|
|
45041
|
+
function lowering14(arg0) {
|
|
45042
|
+
const ret = (0,_bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_2__/* .getEnvironment */ .zj)();
|
|
45043
|
+
const vec3 = ret;
|
|
45044
|
+
const len3 = vec3.length;
|
|
45045
|
+
const result3 = realloc0(0, 0, 4, len3 * 16);
|
|
45046
|
+
for (let i = 0; i < vec3.length; i++) {
|
|
45047
|
+
const e = vec3[i];
|
|
45048
|
+
const base = result3 + i * 16;const [tuple0_0, tuple0_1] = e;
|
|
45049
|
+
const ptr1 = utf8Encode(tuple0_0, realloc0, memory0);
|
|
45050
|
+
const len1 = utf8EncodedLen;
|
|
45051
|
+
dataView(memory0).setInt32(base + 4, len1, true);
|
|
45052
|
+
dataView(memory0).setInt32(base + 0, ptr1, true);
|
|
45053
|
+
const ptr2 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
45054
|
+
const len2 = utf8EncodedLen;
|
|
45055
|
+
dataView(memory0).setInt32(base + 12, len2, true);
|
|
45056
|
+
dataView(memory0).setInt32(base + 8, ptr2, true);
|
|
45057
|
+
}
|
|
45058
|
+
dataView(memory0).setInt32(arg0 + 4, len3, true);
|
|
45059
|
+
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
45060
|
+
}
|
|
45061
|
+
|
|
45062
|
+
function lowering15(arg0, arg1, arg2) {
|
|
45063
|
+
let ret;
|
|
45064
|
+
try {
|
|
45065
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .read */ .ij)(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
45066
|
+
} catch (e) {
|
|
45067
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
45068
|
+
}
|
|
45069
|
+
const variant3 = ret;
|
|
45070
|
+
switch (variant3.tag) {
|
|
45071
|
+
case 'ok': {
|
|
45072
|
+
const e = variant3.val;
|
|
45073
|
+
dataView(memory0).setInt8(arg2 + 0, 0, true);
|
|
45074
|
+
const [tuple0_0, tuple0_1] = e;
|
|
45075
|
+
const val1 = tuple0_0;
|
|
45076
|
+
const len1 = val1.byteLength;
|
|
45077
|
+
const ptr1 = realloc0(0, 0, 1, len1 * 1);
|
|
45078
|
+
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
45079
|
+
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
45080
|
+
dataView(memory0).setInt32(arg2 + 8, len1, true);
|
|
45081
|
+
dataView(memory0).setInt32(arg2 + 4, ptr1, true);
|
|
45082
|
+
dataView(memory0).setInt8(arg2 + 12, tuple0_1 ? 1 : 0, true);
|
|
45083
|
+
break;
|
|
45084
|
+
}
|
|
45085
|
+
case 'err': {
|
|
45086
|
+
const e = variant3.val;
|
|
45087
|
+
dataView(memory0).setInt8(arg2 + 0, 1, true);
|
|
45088
|
+
const { } = e;
|
|
45089
|
+
break;
|
|
45090
|
+
}
|
|
45091
|
+
default: {
|
|
45092
|
+
throw new TypeError('invalid variant specified for result');
|
|
45093
|
+
}
|
|
45094
|
+
}
|
|
45095
|
+
}
|
|
45096
|
+
|
|
45097
|
+
function lowering16(arg0, arg1, arg2) {
|
|
45098
|
+
let ret;
|
|
45099
|
+
try {
|
|
45100
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .blockingRead */ .O_)(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
45101
|
+
} catch (e) {
|
|
45102
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
45103
|
+
}
|
|
45104
|
+
const variant3 = ret;
|
|
45105
|
+
switch (variant3.tag) {
|
|
45106
|
+
case 'ok': {
|
|
45107
|
+
const e = variant3.val;
|
|
45108
|
+
dataView(memory0).setInt8(arg2 + 0, 0, true);
|
|
45109
|
+
const [tuple0_0, tuple0_1] = e;
|
|
45110
|
+
const val1 = tuple0_0;
|
|
45111
|
+
const len1 = val1.byteLength;
|
|
45112
|
+
const ptr1 = realloc0(0, 0, 1, len1 * 1);
|
|
45113
|
+
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
45114
|
+
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
45115
|
+
dataView(memory0).setInt32(arg2 + 8, len1, true);
|
|
45116
|
+
dataView(memory0).setInt32(arg2 + 4, ptr1, true);
|
|
45117
|
+
dataView(memory0).setInt8(arg2 + 12, tuple0_1 ? 1 : 0, true);
|
|
45118
|
+
break;
|
|
45119
|
+
}
|
|
45120
|
+
case 'err': {
|
|
45121
|
+
const e = variant3.val;
|
|
45122
|
+
dataView(memory0).setInt8(arg2 + 0, 1, true);
|
|
45123
|
+
const { } = e;
|
|
45124
|
+
break;
|
|
45125
|
+
}
|
|
45126
|
+
default: {
|
|
45127
|
+
throw new TypeError('invalid variant specified for result');
|
|
45128
|
+
}
|
|
45129
|
+
}
|
|
45130
|
+
}
|
|
45131
|
+
|
|
45132
|
+
function lowering17(arg0, arg1, arg2, arg3) {
|
|
45133
|
+
const ptr0 = arg1;
|
|
45134
|
+
const len0 = arg2;
|
|
45135
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
45136
|
+
let ret;
|
|
45137
|
+
try {
|
|
45138
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .write */ .cW)(arg0 >>> 0, result0) };
|
|
45139
|
+
} catch (e) {
|
|
45140
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
45141
|
+
}
|
|
45142
|
+
const variant2 = ret;
|
|
45143
|
+
switch (variant2.tag) {
|
|
45144
|
+
case 'ok': {
|
|
45145
|
+
const e = variant2.val;
|
|
45146
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
45147
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
45148
|
+
break;
|
|
45149
|
+
}
|
|
45150
|
+
case 'err': {
|
|
45151
|
+
const e = variant2.val;
|
|
45152
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
45153
|
+
const { } = e;
|
|
45154
|
+
break;
|
|
45155
|
+
}
|
|
45156
|
+
default: {
|
|
45157
|
+
throw new TypeError('invalid variant specified for result');
|
|
45158
|
+
}
|
|
45159
|
+
}
|
|
45160
|
+
}
|
|
45161
|
+
|
|
45162
|
+
function lowering18(arg0, arg1, arg2, arg3) {
|
|
45163
|
+
const ptr0 = arg1;
|
|
45164
|
+
const len0 = arg2;
|
|
45165
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
45166
|
+
let ret;
|
|
45167
|
+
try {
|
|
45168
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .blockingWrite */ .v_)(arg0 >>> 0, result0) };
|
|
45169
|
+
} catch (e) {
|
|
45170
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
45171
|
+
}
|
|
45172
|
+
const variant2 = ret;
|
|
45173
|
+
switch (variant2.tag) {
|
|
45174
|
+
case 'ok': {
|
|
45175
|
+
const e = variant2.val;
|
|
45176
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
45177
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
45178
|
+
break;
|
|
45179
|
+
}
|
|
45180
|
+
case 'err': {
|
|
45181
|
+
const e = variant2.val;
|
|
45182
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
45183
|
+
const { } = e;
|
|
45184
|
+
break;
|
|
45185
|
+
}
|
|
45186
|
+
default: {
|
|
45187
|
+
throw new TypeError('invalid variant specified for result');
|
|
45188
|
+
}
|
|
45189
|
+
}
|
|
45190
|
+
}
|
|
45191
|
+
let exports3;
|
|
45192
|
+
let realloc1;
|
|
43805
45193
|
let postReturn0;
|
|
43806
45194
|
let postReturn1;
|
|
43807
45195
|
const exports = {
|
|
43808
45196
|
parse(arg0) {
|
|
43809
|
-
const ptr0 = utf8Encode(arg0,
|
|
45197
|
+
const ptr0 = utf8Encode(arg0, realloc1, memory0);
|
|
43810
45198
|
const len0 = utf8EncodedLen;
|
|
43811
45199
|
const ret = exports1['exports#parse'](ptr0, len0);
|
|
43812
45200
|
let variant3;
|
|
@@ -43844,7 +45232,7 @@ const exports = {
|
|
|
43844
45232
|
print(arg0) {
|
|
43845
45233
|
const val0 = arg0;
|
|
43846
45234
|
const len0 = val0.byteLength;
|
|
43847
|
-
const ptr0 =
|
|
45235
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
43848
45236
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
43849
45237
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
43850
45238
|
const ret = exports1['exports#print'](ptr0, len0);
|
|
@@ -43883,7 +45271,7 @@ const exports = {
|
|
|
43883
45271
|
componentNew(arg0, arg1) {
|
|
43884
45272
|
const val0 = arg0;
|
|
43885
45273
|
const len0 = val0.byteLength;
|
|
43886
|
-
const ptr0 =
|
|
45274
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
43887
45275
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
43888
45276
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
43889
45277
|
const variant5 = arg1;
|
|
@@ -43898,17 +45286,17 @@ const exports = {
|
|
|
43898
45286
|
const e = variant5;
|
|
43899
45287
|
const vec4 = e;
|
|
43900
45288
|
const len4 = vec4.length;
|
|
43901
|
-
const result4 =
|
|
45289
|
+
const result4 = realloc1(0, 0, 4, len4 * 16);
|
|
43902
45290
|
for (let i = 0; i < vec4.length; i++) {
|
|
43903
45291
|
const e = vec4[i];
|
|
43904
45292
|
const base = result4 + i * 16;const [tuple1_0, tuple1_1] = e;
|
|
43905
|
-
const ptr2 = utf8Encode(tuple1_0,
|
|
45293
|
+
const ptr2 = utf8Encode(tuple1_0, realloc1, memory0);
|
|
43906
45294
|
const len2 = utf8EncodedLen;
|
|
43907
45295
|
dataView(memory0).setInt32(base + 4, len2, true);
|
|
43908
45296
|
dataView(memory0).setInt32(base + 0, ptr2, true);
|
|
43909
45297
|
const val3 = tuple1_1;
|
|
43910
45298
|
const len3 = val3.byteLength;
|
|
43911
|
-
const ptr3 =
|
|
45299
|
+
const ptr3 = realloc1(0, 0, 1, len3 * 1);
|
|
43912
45300
|
const src3 = new Uint8Array(val3.buffer || val3, val3.byteOffset, len3 * 1);
|
|
43913
45301
|
(new Uint8Array(memory0.buffer, ptr3, len3 * 1)).set(src3);
|
|
43914
45302
|
dataView(memory0).setInt32(base + 12, len3, true);
|
|
@@ -43954,7 +45342,7 @@ const exports = {
|
|
|
43954
45342
|
componentWit(arg0, arg1) {
|
|
43955
45343
|
const val0 = arg0;
|
|
43956
45344
|
const len0 = val0.byteLength;
|
|
43957
|
-
const ptr0 =
|
|
45345
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
43958
45346
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
43959
45347
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
43960
45348
|
const variant2 = arg1;
|
|
@@ -43967,7 +45355,7 @@ const exports = {
|
|
|
43967
45355
|
variant2_2 = 0;
|
|
43968
45356
|
} else {
|
|
43969
45357
|
const e = variant2;
|
|
43970
|
-
const ptr1 = utf8Encode(e,
|
|
45358
|
+
const ptr1 = utf8Encode(e, realloc1, memory0);
|
|
43971
45359
|
const len1 = utf8EncodedLen;
|
|
43972
45360
|
variant2_0 = 1;
|
|
43973
45361
|
variant2_1 = ptr1;
|
|
@@ -44006,186 +45394,148 @@ const exports = {
|
|
|
44006
45394
|
}
|
|
44007
45395
|
return variant5.val;
|
|
44008
45396
|
},
|
|
44009
|
-
componentEmbed(arg0
|
|
44010
|
-
const
|
|
44011
|
-
|
|
44012
|
-
|
|
44013
|
-
|
|
44014
|
-
|
|
44015
|
-
variant1_0 = 0;
|
|
44016
|
-
variant1_1 = 0;
|
|
44017
|
-
variant1_2 = 0;
|
|
45397
|
+
componentEmbed(arg0) {
|
|
45398
|
+
const ptr0 = realloc1(0, 0, 4, 64);
|
|
45399
|
+
const {binary: v1_0, witSource: v1_1, witPath: v1_2, stringEncoding: v1_3, dummy: v1_4, world: v1_5, metadata: v1_6 } = arg0;
|
|
45400
|
+
const variant3 = v1_0;
|
|
45401
|
+
if (variant3 === null || variant3=== undefined) {
|
|
45402
|
+
dataView(memory0).setInt8(ptr0 + 0, 0, true);
|
|
44018
45403
|
} else {
|
|
44019
|
-
const e =
|
|
44020
|
-
|
|
44021
|
-
const
|
|
44022
|
-
const
|
|
44023
|
-
const
|
|
44024
|
-
|
|
44025
|
-
|
|
44026
|
-
|
|
44027
|
-
|
|
44028
|
-
}
|
|
44029
|
-
const
|
|
44030
|
-
|
|
44031
|
-
|
|
44032
|
-
let variant17_0;
|
|
44033
|
-
let variant17_1;
|
|
44034
|
-
let variant17_2;
|
|
44035
|
-
let variant17_3;
|
|
44036
|
-
let variant17_4;
|
|
44037
|
-
let variant17_5;
|
|
44038
|
-
let variant17_6;
|
|
44039
|
-
let variant17_7;
|
|
44040
|
-
let variant17_8;
|
|
44041
|
-
let variant17_9;
|
|
44042
|
-
let variant17_10;
|
|
44043
|
-
if (variant17 === null || variant17=== undefined) {
|
|
44044
|
-
variant17_0 = 0;
|
|
44045
|
-
variant17_1 = 0;
|
|
44046
|
-
variant17_2 = 0;
|
|
44047
|
-
variant17_3 = 0;
|
|
44048
|
-
variant17_4 = 0;
|
|
44049
|
-
variant17_5 = 0;
|
|
44050
|
-
variant17_6 = 0;
|
|
44051
|
-
variant17_7 = 0;
|
|
44052
|
-
variant17_8 = 0;
|
|
44053
|
-
variant17_9 = 0;
|
|
44054
|
-
variant17_10 = 0;
|
|
45404
|
+
const e = variant3;
|
|
45405
|
+
dataView(memory0).setInt8(ptr0 + 0, 1, true);
|
|
45406
|
+
const val2 = e;
|
|
45407
|
+
const len2 = val2.byteLength;
|
|
45408
|
+
const ptr2 = realloc1(0, 0, 1, len2 * 1);
|
|
45409
|
+
const src2 = new Uint8Array(val2.buffer || val2, val2.byteOffset, len2 * 1);
|
|
45410
|
+
(new Uint8Array(memory0.buffer, ptr2, len2 * 1)).set(src2);
|
|
45411
|
+
dataView(memory0).setInt32(ptr0 + 8, len2, true);
|
|
45412
|
+
dataView(memory0).setInt32(ptr0 + 4, ptr2, true);
|
|
45413
|
+
}
|
|
45414
|
+
const variant5 = v1_1;
|
|
45415
|
+
if (variant5 === null || variant5=== undefined) {
|
|
45416
|
+
dataView(memory0).setInt8(ptr0 + 12, 0, true);
|
|
44055
45417
|
} else {
|
|
44056
|
-
const e =
|
|
44057
|
-
|
|
44058
|
-
const
|
|
44059
|
-
|
|
44060
|
-
|
|
44061
|
-
|
|
44062
|
-
|
|
44063
|
-
|
|
44064
|
-
|
|
44065
|
-
|
|
44066
|
-
|
|
44067
|
-
|
|
44068
|
-
|
|
44069
|
-
|
|
44070
|
-
|
|
44071
|
-
|
|
44072
|
-
|
|
44073
|
-
|
|
44074
|
-
|
|
44075
|
-
|
|
44076
|
-
|
|
44077
|
-
|
|
44078
|
-
|
|
44079
|
-
|
|
44080
|
-
|
|
44081
|
-
|
|
44082
|
-
|
|
44083
|
-
|
|
45418
|
+
const e = variant5;
|
|
45419
|
+
dataView(memory0).setInt8(ptr0 + 12, 1, true);
|
|
45420
|
+
const ptr4 = utf8Encode(e, realloc1, memory0);
|
|
45421
|
+
const len4 = utf8EncodedLen;
|
|
45422
|
+
dataView(memory0).setInt32(ptr0 + 20, len4, true);
|
|
45423
|
+
dataView(memory0).setInt32(ptr0 + 16, ptr4, true);
|
|
45424
|
+
}
|
|
45425
|
+
const variant7 = v1_2;
|
|
45426
|
+
if (variant7 === null || variant7=== undefined) {
|
|
45427
|
+
dataView(memory0).setInt8(ptr0 + 24, 0, true);
|
|
45428
|
+
} else {
|
|
45429
|
+
const e = variant7;
|
|
45430
|
+
dataView(memory0).setInt8(ptr0 + 24, 1, true);
|
|
45431
|
+
const ptr6 = utf8Encode(e, realloc1, memory0);
|
|
45432
|
+
const len6 = utf8EncodedLen;
|
|
45433
|
+
dataView(memory0).setInt32(ptr0 + 32, len6, true);
|
|
45434
|
+
dataView(memory0).setInt32(ptr0 + 28, ptr6, true);
|
|
45435
|
+
}
|
|
45436
|
+
const variant9 = v1_3;
|
|
45437
|
+
if (variant9 === null || variant9=== undefined) {
|
|
45438
|
+
dataView(memory0).setInt8(ptr0 + 36, 0, true);
|
|
45439
|
+
} else {
|
|
45440
|
+
const e = variant9;
|
|
45441
|
+
dataView(memory0).setInt8(ptr0 + 36, 1, true);
|
|
45442
|
+
const val8 = toString(e);
|
|
45443
|
+
let enum8;
|
|
45444
|
+
switch (val8) {
|
|
45445
|
+
case 'utf8': {
|
|
45446
|
+
enum8 = 0;
|
|
45447
|
+
break;
|
|
44084
45448
|
}
|
|
44085
|
-
|
|
44086
|
-
|
|
44087
|
-
|
|
44088
|
-
|
|
44089
|
-
|
|
44090
|
-
|
|
44091
|
-
|
|
44092
|
-
|
|
44093
|
-
|
|
44094
|
-
|
|
44095
|
-
const e = variant6;
|
|
44096
|
-
variant6_0 = 1;
|
|
44097
|
-
variant6_1 = e ? 1 : 0;
|
|
44098
|
-
}
|
|
44099
|
-
const variant8 = v3_2;
|
|
44100
|
-
let variant8_0;
|
|
44101
|
-
let variant8_1;
|
|
44102
|
-
let variant8_2;
|
|
44103
|
-
if (variant8 === null || variant8=== undefined) {
|
|
44104
|
-
variant8_0 = 0;
|
|
44105
|
-
variant8_1 = 0;
|
|
44106
|
-
variant8_2 = 0;
|
|
44107
|
-
} else {
|
|
44108
|
-
const e = variant8;
|
|
44109
|
-
const ptr7 = utf8Encode(e, realloc0, memory0);
|
|
44110
|
-
const len7 = utf8EncodedLen;
|
|
44111
|
-
variant8_0 = 1;
|
|
44112
|
-
variant8_1 = ptr7;
|
|
44113
|
-
variant8_2 = len7;
|
|
44114
|
-
}
|
|
44115
|
-
const variant16 = v3_3;
|
|
44116
|
-
let variant16_0;
|
|
44117
|
-
let variant16_1;
|
|
44118
|
-
let variant16_2;
|
|
44119
|
-
if (variant16 === null || variant16=== undefined) {
|
|
44120
|
-
variant16_0 = 0;
|
|
44121
|
-
variant16_1 = 0;
|
|
44122
|
-
variant16_2 = 0;
|
|
44123
|
-
} else {
|
|
44124
|
-
const e = variant16;
|
|
44125
|
-
const vec15 = e;
|
|
44126
|
-
const len15 = vec15.length;
|
|
44127
|
-
const result15 = realloc0(0, 0, 4, len15 * 16);
|
|
44128
|
-
for (let i = 0; i < vec15.length; i++) {
|
|
44129
|
-
const e = vec15[i];
|
|
44130
|
-
const base = result15 + i * 16;const [tuple9_0, tuple9_1] = e;
|
|
44131
|
-
const ptr10 = utf8Encode(tuple9_0, realloc0, memory0);
|
|
44132
|
-
const len10 = utf8EncodedLen;
|
|
44133
|
-
dataView(memory0).setInt32(base + 4, len10, true);
|
|
44134
|
-
dataView(memory0).setInt32(base + 0, ptr10, true);
|
|
44135
|
-
const vec14 = tuple9_1;
|
|
44136
|
-
const len14 = vec14.length;
|
|
44137
|
-
const result14 = realloc0(0, 0, 4, len14 * 16);
|
|
44138
|
-
for (let i = 0; i < vec14.length; i++) {
|
|
44139
|
-
const e = vec14[i];
|
|
44140
|
-
const base = result14 + i * 16;const [tuple11_0, tuple11_1] = e;
|
|
44141
|
-
const ptr12 = utf8Encode(tuple11_0, realloc0, memory0);
|
|
44142
|
-
const len12 = utf8EncodedLen;
|
|
44143
|
-
dataView(memory0).setInt32(base + 4, len12, true);
|
|
44144
|
-
dataView(memory0).setInt32(base + 0, ptr12, true);
|
|
44145
|
-
const ptr13 = utf8Encode(tuple11_1, realloc0, memory0);
|
|
44146
|
-
const len13 = utf8EncodedLen;
|
|
44147
|
-
dataView(memory0).setInt32(base + 12, len13, true);
|
|
44148
|
-
dataView(memory0).setInt32(base + 8, ptr13, true);
|
|
44149
|
-
}
|
|
44150
|
-
dataView(memory0).setInt32(base + 12, len14, true);
|
|
44151
|
-
dataView(memory0).setInt32(base + 8, result14, true);
|
|
45449
|
+
case 'utf16': {
|
|
45450
|
+
enum8 = 1;
|
|
45451
|
+
break;
|
|
45452
|
+
}
|
|
45453
|
+
case 'compact-utf16': {
|
|
45454
|
+
enum8 = 2;
|
|
45455
|
+
break;
|
|
45456
|
+
}
|
|
45457
|
+
default: {
|
|
45458
|
+
throw new TypeError(`"${val8}" is not one of the cases of string-encoding`);
|
|
44152
45459
|
}
|
|
44153
|
-
variant16_0 = 1;
|
|
44154
|
-
variant16_1 = result15;
|
|
44155
|
-
variant16_2 = len15;
|
|
44156
45460
|
}
|
|
44157
|
-
|
|
44158
|
-
|
|
44159
|
-
|
|
44160
|
-
|
|
44161
|
-
|
|
44162
|
-
|
|
44163
|
-
|
|
44164
|
-
|
|
44165
|
-
|
|
44166
|
-
|
|
44167
|
-
|
|
44168
|
-
|
|
44169
|
-
|
|
44170
|
-
|
|
45461
|
+
dataView(memory0).setInt8(ptr0 + 37, enum8, true);
|
|
45462
|
+
}
|
|
45463
|
+
const variant10 = v1_4;
|
|
45464
|
+
if (variant10 === null || variant10=== undefined) {
|
|
45465
|
+
dataView(memory0).setInt8(ptr0 + 38, 0, true);
|
|
45466
|
+
} else {
|
|
45467
|
+
const e = variant10;
|
|
45468
|
+
dataView(memory0).setInt8(ptr0 + 38, 1, true);
|
|
45469
|
+
dataView(memory0).setInt8(ptr0 + 39, e ? 1 : 0, true);
|
|
45470
|
+
}
|
|
45471
|
+
const variant12 = v1_5;
|
|
45472
|
+
if (variant12 === null || variant12=== undefined) {
|
|
45473
|
+
dataView(memory0).setInt8(ptr0 + 40, 0, true);
|
|
45474
|
+
} else {
|
|
45475
|
+
const e = variant12;
|
|
45476
|
+
dataView(memory0).setInt8(ptr0 + 40, 1, true);
|
|
45477
|
+
const ptr11 = utf8Encode(e, realloc1, memory0);
|
|
45478
|
+
const len11 = utf8EncodedLen;
|
|
45479
|
+
dataView(memory0).setInt32(ptr0 + 48, len11, true);
|
|
45480
|
+
dataView(memory0).setInt32(ptr0 + 44, ptr11, true);
|
|
45481
|
+
}
|
|
45482
|
+
const variant20 = v1_6;
|
|
45483
|
+
if (variant20 === null || variant20=== undefined) {
|
|
45484
|
+
dataView(memory0).setInt8(ptr0 + 52, 0, true);
|
|
45485
|
+
} else {
|
|
45486
|
+
const e = variant20;
|
|
45487
|
+
dataView(memory0).setInt8(ptr0 + 52, 1, true);
|
|
45488
|
+
const vec19 = e;
|
|
45489
|
+
const len19 = vec19.length;
|
|
45490
|
+
const result19 = realloc1(0, 0, 4, len19 * 16);
|
|
45491
|
+
for (let i = 0; i < vec19.length; i++) {
|
|
45492
|
+
const e = vec19[i];
|
|
45493
|
+
const base = result19 + i * 16;const [tuple13_0, tuple13_1] = e;
|
|
45494
|
+
const ptr14 = utf8Encode(tuple13_0, realloc1, memory0);
|
|
45495
|
+
const len14 = utf8EncodedLen;
|
|
45496
|
+
dataView(memory0).setInt32(base + 4, len14, true);
|
|
45497
|
+
dataView(memory0).setInt32(base + 0, ptr14, true);
|
|
45498
|
+
const vec18 = tuple13_1;
|
|
45499
|
+
const len18 = vec18.length;
|
|
45500
|
+
const result18 = realloc1(0, 0, 4, len18 * 16);
|
|
45501
|
+
for (let i = 0; i < vec18.length; i++) {
|
|
45502
|
+
const e = vec18[i];
|
|
45503
|
+
const base = result18 + i * 16;const [tuple15_0, tuple15_1] = e;
|
|
45504
|
+
const ptr16 = utf8Encode(tuple15_0, realloc1, memory0);
|
|
45505
|
+
const len16 = utf8EncodedLen;
|
|
45506
|
+
dataView(memory0).setInt32(base + 4, len16, true);
|
|
45507
|
+
dataView(memory0).setInt32(base + 0, ptr16, true);
|
|
45508
|
+
const ptr17 = utf8Encode(tuple15_1, realloc1, memory0);
|
|
45509
|
+
const len17 = utf8EncodedLen;
|
|
45510
|
+
dataView(memory0).setInt32(base + 12, len17, true);
|
|
45511
|
+
dataView(memory0).setInt32(base + 8, ptr17, true);
|
|
45512
|
+
}
|
|
45513
|
+
dataView(memory0).setInt32(base + 12, len18, true);
|
|
45514
|
+
dataView(memory0).setInt32(base + 8, result18, true);
|
|
45515
|
+
}
|
|
45516
|
+
dataView(memory0).setInt32(ptr0 + 60, len19, true);
|
|
45517
|
+
dataView(memory0).setInt32(ptr0 + 56, result19, true);
|
|
45518
|
+
}
|
|
45519
|
+
const ret = exports1['exports#component-embed'](ptr0);
|
|
45520
|
+
let variant23;
|
|
44171
45521
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
44172
45522
|
case 0: {
|
|
44173
|
-
const
|
|
44174
|
-
const
|
|
44175
|
-
const
|
|
44176
|
-
|
|
45523
|
+
const ptr21 = dataView(memory0).getInt32(ret + 4, true);
|
|
45524
|
+
const len21 = dataView(memory0).getInt32(ret + 8, true);
|
|
45525
|
+
const result21 = new Uint8Array(memory0.buffer.slice(ptr21, ptr21 + len21 * 1));
|
|
45526
|
+
variant23= {
|
|
44177
45527
|
tag: 'ok',
|
|
44178
|
-
val:
|
|
45528
|
+
val: result21
|
|
44179
45529
|
};
|
|
44180
45530
|
break;
|
|
44181
45531
|
}
|
|
44182
45532
|
case 1: {
|
|
44183
|
-
const
|
|
44184
|
-
const
|
|
44185
|
-
const
|
|
44186
|
-
|
|
45533
|
+
const ptr22 = dataView(memory0).getInt32(ret + 4, true);
|
|
45534
|
+
const len22 = dataView(memory0).getInt32(ret + 8, true);
|
|
45535
|
+
const result22 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr22, len22));
|
|
45536
|
+
variant23= {
|
|
44187
45537
|
tag: 'err',
|
|
44188
|
-
val:
|
|
45538
|
+
val: result22
|
|
44189
45539
|
};
|
|
44190
45540
|
break;
|
|
44191
45541
|
}
|
|
@@ -44194,15 +45544,15 @@ const exports = {
|
|
|
44194
45544
|
}
|
|
44195
45545
|
}
|
|
44196
45546
|
postReturn0(ret);
|
|
44197
|
-
if (
|
|
44198
|
-
throw new ComponentError(
|
|
45547
|
+
if (variant23.tag === 'err') {
|
|
45548
|
+
throw new ComponentError(variant23.val);
|
|
44199
45549
|
}
|
|
44200
|
-
return
|
|
45550
|
+
return variant23.val;
|
|
44201
45551
|
},
|
|
44202
45552
|
metadataShow(arg0) {
|
|
44203
45553
|
const val0 = arg0;
|
|
44204
45554
|
const len0 = val0.byteLength;
|
|
44205
|
-
const ptr0 =
|
|
45555
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
44206
45556
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
44207
45557
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
44208
45558
|
const ret = exports1['exports#metadata-show'](ptr0, len0);
|
|
@@ -44309,30 +45659,30 @@ const exports = {
|
|
|
44309
45659
|
metadataAdd(arg0, arg1) {
|
|
44310
45660
|
const val0 = arg0;
|
|
44311
45661
|
const len0 = val0.byteLength;
|
|
44312
|
-
const ptr0 =
|
|
45662
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
44313
45663
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
44314
45664
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
44315
45665
|
const vec7 = arg1;
|
|
44316
45666
|
const len7 = vec7.length;
|
|
44317
|
-
const result7 =
|
|
45667
|
+
const result7 = realloc1(0, 0, 4, len7 * 16);
|
|
44318
45668
|
for (let i = 0; i < vec7.length; i++) {
|
|
44319
45669
|
const e = vec7[i];
|
|
44320
45670
|
const base = result7 + i * 16;const [tuple1_0, tuple1_1] = e;
|
|
44321
|
-
const ptr2 = utf8Encode(tuple1_0,
|
|
45671
|
+
const ptr2 = utf8Encode(tuple1_0, realloc1, memory0);
|
|
44322
45672
|
const len2 = utf8EncodedLen;
|
|
44323
45673
|
dataView(memory0).setInt32(base + 4, len2, true);
|
|
44324
45674
|
dataView(memory0).setInt32(base + 0, ptr2, true);
|
|
44325
45675
|
const vec6 = tuple1_1;
|
|
44326
45676
|
const len6 = vec6.length;
|
|
44327
|
-
const result6 =
|
|
45677
|
+
const result6 = realloc1(0, 0, 4, len6 * 16);
|
|
44328
45678
|
for (let i = 0; i < vec6.length; i++) {
|
|
44329
45679
|
const e = vec6[i];
|
|
44330
45680
|
const base = result6 + i * 16;const [tuple3_0, tuple3_1] = e;
|
|
44331
|
-
const ptr4 = utf8Encode(tuple3_0,
|
|
45681
|
+
const ptr4 = utf8Encode(tuple3_0, realloc1, memory0);
|
|
44332
45682
|
const len4 = utf8EncodedLen;
|
|
44333
45683
|
dataView(memory0).setInt32(base + 4, len4, true);
|
|
44334
45684
|
dataView(memory0).setInt32(base + 0, ptr4, true);
|
|
44335
|
-
const ptr5 = utf8Encode(tuple3_1,
|
|
45685
|
+
const ptr5 = utf8Encode(tuple3_1, realloc1, memory0);
|
|
44336
45686
|
const len5 = utf8EncodedLen;
|
|
44337
45687
|
dataView(memory0).setInt32(base + 12, len5, true);
|
|
44338
45688
|
dataView(memory0).setInt32(base + 8, ptr5, true);
|
|
@@ -44380,23 +45730,95 @@ const exports = {
|
|
|
44380
45730
|
|
|
44381
45731
|
const $init = (async() => {
|
|
44382
45732
|
const module0 = fetchCompile(__nccwpck_require__.ab + "wasm-tools.core.wasm");
|
|
44383
|
-
const module1 =
|
|
44384
|
-
const module2 = base64Compile('
|
|
44385
|
-
|
|
44386
|
-
(
|
|
45733
|
+
const module1 = fetchCompile(__nccwpck_require__.ab + "wasm-tools.core2.wasm");
|
|
45734
|
+
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAN/fn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwADFxYAAAEBAgMABAQFBQYHBwgGBgYJBgoLBAUBcAEWFgdwFwEwAAABMQABATIAAgEzAAMBNAAEATUABQE2AAYBNwAHATgACAE5AAkCMTAACgIxMQALAjEyAAwCMTMADQIxNAAOAjE1AA8CMTYAEAIxNwARAjE4ABICMTkAEwIyMAAUAjIxABUIJGltcG9ydHMBAAqvAhYJACAAQQARAAALCQAgAEEBEQAACwsAIAAgAUECEQEACwsAIAAgAUEDEQEACxcAIAAgASACIAMgBCAFIAYgB0EEEQIACwsAIAAgAUEFEQMACwkAIABBBhEAAAsNACAAIAEgAkEHEQQACw0AIAAgASACQQgRBAALDwAgACABIAIgA0EJEQUACw8AIAAgASACIANBChEFAAsLACAAIAFBCxEGAAsPACAAIAEgAiADQQwRBwALDwAgACABIAIgA0ENEQcACxkAIAAgASACIAMgBCAFIAYgByAIQQ4RCAALCwAgACABQQ8RBgALCwAgACABQRARBgALCwAgACABQRERBgALCQAgAEESEQkACwsAIAAgAUETEQYACw0AIAAgASACQRQRCgALCQAgAEEVEQsACwAtCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQ13aXQtY29tcG9uZW50BTAuOC4yAL8GBG5hbWUAExJ3aXQtY29tcG9uZW50OnNoaW0BogYWABtpbmRpcmVjdC1wcmVvcGVucy1nZXQtc3RkaW8BIWluZGlyZWN0LXByZW9wZW5zLWdldC1kaXJlY3RvcmllcwIcaW5kaXJlY3QtZmlsZXN5c3RlbS1nZXQtdHlwZQMYaW5kaXJlY3QtZmlsZXN5c3RlbS1zdGF0BBtpbmRpcmVjdC1maWxlc3lzdGVtLW9wZW4tYXQFIGluZGlyZWN0LXJhbmRvbS1nZXQtcmFuZG9tLWJ5dGVzBiRpbmRpcmVjdC1lbnZpcm9ubWVudC1nZXQtZW52aXJvbm1lbnQHFWluZGlyZWN0LXN0cmVhbXMtcmVhZAgeaW5kaXJlY3Qtc3RyZWFtcy1ibG9ja2luZy1yZWFkCRZpbmRpcmVjdC1zdHJlYW1zLXdyaXRlCh9pbmRpcmVjdC1zdHJlYW1zLWJsb2NraW5nLXdyaXRlCyxhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX2ZpbGVzdGF0X2dldAwkYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1mZF9yZWFkDSVhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3dyaXRlDiZhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLXBhdGhfb3Blbg8nYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1yYW5kb21fZ2V0EChhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWVudmlyb25fZ2V0ES5hZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWVudmlyb25fc2l6ZXNfZ2V0EiVhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX2Nsb3NlEythZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3ByZXN0YXRfZ2V0FDBhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3ByZXN0YXRfZGlyX25hbWUVJmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtcHJvY19leGl0');
|
|
45735
|
+
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAN/fn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwACigEXAAEwAAAAATEAAAABMgABAAEzAAEAATQAAgABNQADAAE2AAAAATcABAABOAAEAAE5AAUAAjEwAAUAAjExAAYAAjEyAAcAAjEzAAcAAjE0AAgAAjE1AAYAAjE2AAYAAjE3AAYAAjE4AAkAAjE5AAYAAjIwAAoAAjIxAAsACCRpbXBvcnRzAXABFhYJHAEAQQALFgABAgMEBQYHCAkKCwwNDg8QERITFBUALQlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAUwLjguMgAcBG5hbWUAFRR3aXQtY29tcG9uZW50OmZpeHVwcw');
|
|
45736
|
+
Promise.all([module0, module1, module2, module3]).catch(() => {});
|
|
45737
|
+
({ exports: exports0 } = await instantiateCore(await module2));
|
|
44387
45738
|
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
44388
|
-
|
|
44389
|
-
|
|
45739
|
+
wasi_snapshot_preview1: {
|
|
45740
|
+
environ_get: exports0['16'],
|
|
45741
|
+
environ_sizes_get: exports0['17'],
|
|
45742
|
+
fd_close: exports0['18'],
|
|
45743
|
+
fd_filestat_get: exports0['11'],
|
|
45744
|
+
fd_prestat_dir_name: exports0['20'],
|
|
45745
|
+
fd_prestat_get: exports0['19'],
|
|
45746
|
+
fd_read: exports0['12'],
|
|
45747
|
+
fd_write: exports0['13'],
|
|
45748
|
+
path_open: exports0['14'],
|
|
45749
|
+
proc_exit: exports0['21'],
|
|
45750
|
+
random_get: exports0['15'],
|
|
45751
|
+
},
|
|
45752
|
+
}));
|
|
45753
|
+
({ exports: exports2 } = await instantiateCore(await module1, {
|
|
45754
|
+
__main_module__: {
|
|
45755
|
+
cabi_realloc: exports1.cabi_realloc,
|
|
45756
|
+
},
|
|
45757
|
+
env: {
|
|
45758
|
+
memory: exports1.memory,
|
|
45759
|
+
},
|
|
45760
|
+
environment: {
|
|
45761
|
+
'get-environment': exports0['6'],
|
|
45762
|
+
},
|
|
45763
|
+
exit: {
|
|
45764
|
+
exit: lowering5,
|
|
45765
|
+
},
|
|
45766
|
+
filesystem: {
|
|
45767
|
+
'append-via-stream': lowering3,
|
|
45768
|
+
'drop-descriptor': lowering4,
|
|
45769
|
+
'drop-directory-entry-stream': lowering0,
|
|
45770
|
+
'get-type': exports0['2'],
|
|
45771
|
+
'open-at': exports0['4'],
|
|
45772
|
+
'read-via-stream': lowering1,
|
|
45773
|
+
stat: exports0['3'],
|
|
45774
|
+
'write-via-stream': lowering2,
|
|
45775
|
+
},
|
|
45776
|
+
preopens: {
|
|
45777
|
+
'get-directories': exports0['1'],
|
|
45778
|
+
'get-stdio': exports0['0'],
|
|
45779
|
+
},
|
|
45780
|
+
random: {
|
|
45781
|
+
'get-random-bytes': exports0['5'],
|
|
45782
|
+
},
|
|
45783
|
+
streams: {
|
|
45784
|
+
'blocking-read': exports0['8'],
|
|
45785
|
+
'blocking-write': exports0['10'],
|
|
45786
|
+
'drop-input-stream': lowering6,
|
|
45787
|
+
'drop-output-stream': lowering7,
|
|
45788
|
+
read: exports0['7'],
|
|
45789
|
+
write: exports0['9'],
|
|
44390
45790
|
},
|
|
44391
45791
|
}));
|
|
44392
45792
|
memory0 = exports1.memory;
|
|
44393
|
-
|
|
45793
|
+
realloc0 = exports2.cabi_import_realloc;
|
|
45794
|
+
({ exports: exports3 } = await instantiateCore(await module3, {
|
|
44394
45795
|
'': {
|
|
44395
45796
|
$imports: exports0.$imports,
|
|
44396
|
-
'0':
|
|
45797
|
+
'0': lowering8,
|
|
45798
|
+
'1': lowering9,
|
|
45799
|
+
'10': lowering18,
|
|
45800
|
+
'11': exports2.fd_filestat_get,
|
|
45801
|
+
'12': exports2.fd_read,
|
|
45802
|
+
'13': exports2.fd_write,
|
|
45803
|
+
'14': exports2.path_open,
|
|
45804
|
+
'15': exports2.random_get,
|
|
45805
|
+
'16': exports2.environ_get,
|
|
45806
|
+
'17': exports2.environ_sizes_get,
|
|
45807
|
+
'18': exports2.fd_close,
|
|
45808
|
+
'19': exports2.fd_prestat_get,
|
|
45809
|
+
'2': lowering10,
|
|
45810
|
+
'20': exports2.fd_prestat_dir_name,
|
|
45811
|
+
'21': exports2.proc_exit,
|
|
45812
|
+
'3': lowering11,
|
|
45813
|
+
'4': lowering12,
|
|
45814
|
+
'5': lowering13,
|
|
45815
|
+
'6': lowering14,
|
|
45816
|
+
'7': lowering15,
|
|
45817
|
+
'8': lowering16,
|
|
45818
|
+
'9': lowering17,
|
|
44397
45819
|
},
|
|
44398
45820
|
}));
|
|
44399
|
-
|
|
45821
|
+
realloc1 = exports1.cabi_realloc;
|
|
44400
45822
|
postReturn0 = exports1['cabi_post_exports#component-embed'];
|
|
44401
45823
|
postReturn1 = exports1['cabi_post_exports#metadata-show'];
|
|
44402
45824
|
})();
|
|
@@ -44406,6 +45828,611 @@ await $init;
|
|
|
44406
45828
|
__webpack_async_result__();
|
|
44407
45829
|
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
44408
45830
|
|
|
45831
|
+
/***/ }),
|
|
45832
|
+
|
|
45833
|
+
/***/ 9187:
|
|
45834
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
45835
|
+
|
|
45836
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
45837
|
+
/* harmony export */ "zj": () => (/* binding */ getEnvironment)
|
|
45838
|
+
/* harmony export */ });
|
|
45839
|
+
/* unused harmony exports _setEnv, preopens, getArguments */
|
|
45840
|
+
/* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7742);
|
|
45841
|
+
|
|
45842
|
+
|
|
45843
|
+
let _env;
|
|
45844
|
+
function _setEnv (envObj) {
|
|
45845
|
+
_env = Object.entries(envObj);
|
|
45846
|
+
}
|
|
45847
|
+
|
|
45848
|
+
function getEnvironment () {
|
|
45849
|
+
if (!_env) _setEnv(node_process__WEBPACK_IMPORTED_MODULE_0__.env);
|
|
45850
|
+
return _env;
|
|
45851
|
+
}
|
|
45852
|
+
|
|
45853
|
+
function preopens () {
|
|
45854
|
+
return [];
|
|
45855
|
+
}
|
|
45856
|
+
|
|
45857
|
+
function getArguments () {
|
|
45858
|
+
return [];
|
|
45859
|
+
}
|
|
45860
|
+
|
|
45861
|
+
/***/ }),
|
|
45862
|
+
|
|
45863
|
+
/***/ 7393:
|
|
45864
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
45865
|
+
|
|
45866
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
45867
|
+
/* harmony export */ "J": () => (/* binding */ exit)
|
|
45868
|
+
/* harmony export */ });
|
|
45869
|
+
function exit(status) {
|
|
45870
|
+
process.exit(status.tag === 'err' ? 1 : 0);
|
|
45871
|
+
}
|
|
45872
|
+
|
|
45873
|
+
|
|
45874
|
+
/***/ }),
|
|
45875
|
+
|
|
45876
|
+
/***/ 5331:
|
|
45877
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
45878
|
+
|
|
45879
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
45880
|
+
/* harmony export */ "Lk": () => (/* binding */ dropDescriptor),
|
|
45881
|
+
/* harmony export */ "Tk": () => (/* binding */ appendViaStream),
|
|
45882
|
+
/* harmony export */ "Zw": () => (/* binding */ writeViaStream),
|
|
45883
|
+
/* harmony export */ "d2": () => (/* binding */ openAt),
|
|
45884
|
+
/* harmony export */ "fm": () => (/* binding */ _convertFsError),
|
|
45885
|
+
/* harmony export */ "h1": () => (/* binding */ dropDirectoryEntryStream),
|
|
45886
|
+
/* harmony export */ "lz": () => (/* binding */ stat),
|
|
45887
|
+
/* harmony export */ "oL": () => (/* binding */ getType),
|
|
45888
|
+
/* harmony export */ "wF": () => (/* binding */ readViaStream)
|
|
45889
|
+
/* harmony export */ });
|
|
45890
|
+
/* unused harmony exports advise, syncData, getFlags, setFlags, setSize, setTimes, read, write, readDirectory, sync, createDirectoryAt, statAt, setTimesAt, linkAt, readlinkAt, removeDirectoryAt, renameAt, symlinkAt, unlinkFileAt, changeFilePermissionsAt, changeDirectoryPermissionsAt, lockShared, lockExclusive, tryLockShared, tryLockExclusive, unlock, readDirectoryEntry */
|
|
45891
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7561);
|
|
45892
|
+
/* harmony import */ var _preopens_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(833);
|
|
45893
|
+
/* harmony import */ var _streams_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9213);
|
|
45894
|
+
|
|
45895
|
+
|
|
45896
|
+
|
|
45897
|
+
|
|
45898
|
+
function readViaStream(fd, offset) {
|
|
45899
|
+
return (0,_streams_js__WEBPACK_IMPORTED_MODULE_2__/* ._createFileStream */ .HR)(fd, offset);
|
|
45900
|
+
}
|
|
45901
|
+
|
|
45902
|
+
function writeViaStream(fd, offset) {
|
|
45903
|
+
console.log(`[filesystem] WRITE STREAM ${fd} ${offset}`);
|
|
45904
|
+
}
|
|
45905
|
+
|
|
45906
|
+
function appendViaStream(fd) {
|
|
45907
|
+
console.log(`[filesystem] APPEND STREAM ${fd}`);
|
|
45908
|
+
}
|
|
45909
|
+
|
|
45910
|
+
function advise(fd, offset, length, advice) {
|
|
45911
|
+
console.log(`[filesystem] ADVISE`, fd, offset, length, advice);
|
|
45912
|
+
}
|
|
45913
|
+
|
|
45914
|
+
function syncData(fd) {
|
|
45915
|
+
console.log(`[filesystem] SYNC DATA ${fd}`);
|
|
45916
|
+
}
|
|
45917
|
+
|
|
45918
|
+
function getFlags(fd) {
|
|
45919
|
+
console.log(`[filesystem] FLAGS FOR ${fd}`);
|
|
45920
|
+
}
|
|
45921
|
+
|
|
45922
|
+
function getType(fd) {
|
|
45923
|
+
let type = (0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._getDescriptorType */ .Am)(fd);
|
|
45924
|
+
if (type === null) {
|
|
45925
|
+
stat(fd);
|
|
45926
|
+
type = (0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._getDescriptorType */ .Am)(fd);
|
|
45927
|
+
}
|
|
45928
|
+
return type;
|
|
45929
|
+
}
|
|
45930
|
+
|
|
45931
|
+
function setFlags(fd, flags) {
|
|
45932
|
+
console.log(`[filesystem] SET FLAGS ${fd} ${JSON.stringify(flags)}`);
|
|
45933
|
+
}
|
|
45934
|
+
|
|
45935
|
+
function setSize(fd, size) {
|
|
45936
|
+
console.log(`[filesystem] SET SIZE`, fd, size);
|
|
45937
|
+
}
|
|
45938
|
+
|
|
45939
|
+
function setTimes(fd, dataAccessTimestamp, dataModificationTimestamp) {
|
|
45940
|
+
console.log(`[filesystem] SET TIMES`, fd, dataAccessTimestamp, dataModificationTimestamp);
|
|
45941
|
+
}
|
|
45942
|
+
|
|
45943
|
+
function read(fd, length, offset) {
|
|
45944
|
+
console.log(`[filesystem] READ`, fd, length, offset);
|
|
45945
|
+
}
|
|
45946
|
+
|
|
45947
|
+
function write(fd, buffer, offset) {
|
|
45948
|
+
console.log(`[filesystem] WRITE`, fd, buffer, offset);
|
|
45949
|
+
}
|
|
45950
|
+
|
|
45951
|
+
let _dirStreams = [];
|
|
45952
|
+
function readDirectory(fd) {
|
|
45953
|
+
const fullPath = _getFullPath(fd);
|
|
45954
|
+
let dirs;
|
|
45955
|
+
try {
|
|
45956
|
+
dirs = readdirSync(fullPath, { withFileTypes: true });
|
|
45957
|
+
}
|
|
45958
|
+
catch (e) {
|
|
45959
|
+
_convertFsError(e);
|
|
45960
|
+
}
|
|
45961
|
+
_dirStreams.push({ fd, dirs, cursor: 0 });
|
|
45962
|
+
return _dirStreams.length - 1;
|
|
45963
|
+
}
|
|
45964
|
+
|
|
45965
|
+
function sync(fd) {
|
|
45966
|
+
console.log(`[filesystem] SYNC`, fd);
|
|
45967
|
+
}
|
|
45968
|
+
|
|
45969
|
+
function createDirectoryAt(fd, path) {
|
|
45970
|
+
console.log(`[filesystem] CREATE DIRECTORY`, fd, path);
|
|
45971
|
+
}
|
|
45972
|
+
|
|
45973
|
+
const nsMagnitude = 1_000_000_000_000n;
|
|
45974
|
+
function nsToDateTime (ns) {
|
|
45975
|
+
const seconds = ns / nsMagnitude;
|
|
45976
|
+
const nanoseconds = Number(ns % seconds);
|
|
45977
|
+
return { seconds, nanoseconds };
|
|
45978
|
+
}
|
|
45979
|
+
|
|
45980
|
+
function _convertFsError (e) {
|
|
45981
|
+
switch (e.code) {
|
|
45982
|
+
case 'EACCES': throw 'access';
|
|
45983
|
+
case 'EAGAIN':
|
|
45984
|
+
case 'EWOULDBLOCK': throw 'would-block';
|
|
45985
|
+
case 'EALREADY': throw 'already';
|
|
45986
|
+
case 'EBADF': throw 'bad-descriptor';
|
|
45987
|
+
case 'EBUSY': throw 'busy';
|
|
45988
|
+
case 'EDEADLK': throw 'deadlock';
|
|
45989
|
+
case 'EDQUOT': throw 'quota';
|
|
45990
|
+
case 'EEXIST': throw 'exist';
|
|
45991
|
+
case 'EFBIG': throw 'file-too-large';
|
|
45992
|
+
case 'EILSEQ': throw 'illegal-byte-sequence';
|
|
45993
|
+
case 'EINPROGRESS': throw 'in-progress';
|
|
45994
|
+
case 'EINTR': throw 'interrupted';
|
|
45995
|
+
case 'EINVAL': throw 'invalid';
|
|
45996
|
+
case 'EIO': throw 'io';
|
|
45997
|
+
case 'EISDIR': throw 'is-directory';
|
|
45998
|
+
case 'ELOOP': throw 'loop';
|
|
45999
|
+
case 'EMLINK': throw 'too-many-links';
|
|
46000
|
+
case 'EMSGSIZE': throw 'message-size';
|
|
46001
|
+
case 'ENAMETOOLONG': throw 'name-too-long'
|
|
46002
|
+
case 'ENODEV': throw 'no-device';
|
|
46003
|
+
case 'ENOENT': throw 'no-entry';
|
|
46004
|
+
case 'ENOLCK': throw 'no-lock';
|
|
46005
|
+
case 'ENOMEM': throw 'insufficient-memory';
|
|
46006
|
+
case 'ENOSPC': throw 'insufficient-space';
|
|
46007
|
+
case 'ENOTDIR': throw 'not-directory';
|
|
46008
|
+
case 'ENOTEMPTY': throw 'not-empty';
|
|
46009
|
+
case 'ENOTRECOVERABLE': throw 'not-recoverable';
|
|
46010
|
+
case 'ENOTSUP': throw 'unsupported';
|
|
46011
|
+
case 'ENOTTY': throw 'no-tty';
|
|
46012
|
+
case 'ENXIO': throw 'no-such-device';
|
|
46013
|
+
case 'EOVERFLOW': throw 'overflow';
|
|
46014
|
+
case 'EPERM': throw 'not-permitted';
|
|
46015
|
+
case 'EPIPE': throw 'pipe';
|
|
46016
|
+
case 'EROFS': throw 'read-only';
|
|
46017
|
+
case 'ESPIPE': throw 'invalid-seek';
|
|
46018
|
+
case 'ETXTBSY': throw 'text-file-busy';
|
|
46019
|
+
case 'EXDEV': throw 'cross-device';
|
|
46020
|
+
default: throw e;
|
|
46021
|
+
}
|
|
46022
|
+
}
|
|
46023
|
+
|
|
46024
|
+
function _lookupType (obj) {
|
|
46025
|
+
if (obj.isFile())
|
|
46026
|
+
return 'regular-file';
|
|
46027
|
+
else if (obj.isSocket())
|
|
46028
|
+
return 'socket';
|
|
46029
|
+
else if (obj.isSymbolicLink())
|
|
46030
|
+
return 'symbolic-link';
|
|
46031
|
+
else if (obj.isFIFO())
|
|
46032
|
+
return 'fifo';
|
|
46033
|
+
else if (obj.isDirectory())
|
|
46034
|
+
return 'directory';
|
|
46035
|
+
else if (obj.isCharacterDevice())
|
|
46036
|
+
return 'character-device';
|
|
46037
|
+
else if (obj.isBlockDevice())
|
|
46038
|
+
return 'block-device';
|
|
46039
|
+
return 'unknown';
|
|
46040
|
+
}
|
|
46041
|
+
|
|
46042
|
+
function stat(fd) {
|
|
46043
|
+
let stats;
|
|
46044
|
+
try {
|
|
46045
|
+
stats = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.fstatSync)(fd, { bigint: true });
|
|
46046
|
+
}
|
|
46047
|
+
catch (e) {
|
|
46048
|
+
_convertFsError(e);
|
|
46049
|
+
}
|
|
46050
|
+
const type = _lookupType(stats);
|
|
46051
|
+
(0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._setDescriptorType */ .wM)(fd, type);
|
|
46052
|
+
return {
|
|
46053
|
+
device: stats.dev,
|
|
46054
|
+
inode: stats.ino,
|
|
46055
|
+
type,
|
|
46056
|
+
linkCount: stats.nlink,
|
|
46057
|
+
size: stats.size,
|
|
46058
|
+
dataAccessTimestamp: nsToDateTime(stats.atimeNs),
|
|
46059
|
+
dataModificationTimestamp: nsToDateTime(stats.mtimeNs),
|
|
46060
|
+
statusChangeTimestamp: nsToDateTime(stats.ctimeNs),
|
|
46061
|
+
};
|
|
46062
|
+
}
|
|
46063
|
+
|
|
46064
|
+
function statAt(fd, { symlinkFollow }, path) {
|
|
46065
|
+
const fullPath = _descriptors[fd].path + path;
|
|
46066
|
+
let stats;
|
|
46067
|
+
try {
|
|
46068
|
+
stats = (symlinkFollow ? statSync : lstatSync)(fullPath, { bigint: true });
|
|
46069
|
+
}
|
|
46070
|
+
catch (e) {
|
|
46071
|
+
_convertFsError(e);
|
|
46072
|
+
}
|
|
46073
|
+
const type = _lookupType(stats);
|
|
46074
|
+
_setSubdescriptorType(fd, path, type);
|
|
46075
|
+
return {
|
|
46076
|
+
device: stats.dev,
|
|
46077
|
+
inode: stats.ino,
|
|
46078
|
+
type,
|
|
46079
|
+
linkCount: stats.nlink,
|
|
46080
|
+
size: stats.size,
|
|
46081
|
+
dataAccessTimestamp: nsToDateTime(stats.atimeNs),
|
|
46082
|
+
dataModificationTimestamp: nsToDateTime(stats.mtimeNs),
|
|
46083
|
+
statusChangeTimestamp: nsToDateTime(stats.ctimeNs),
|
|
46084
|
+
};
|
|
46085
|
+
}
|
|
46086
|
+
|
|
46087
|
+
function setTimesAt(fd) {
|
|
46088
|
+
console.log(`[filesystem] SET TIMES AT`, fd);
|
|
46089
|
+
}
|
|
46090
|
+
|
|
46091
|
+
function linkAt(fd) {
|
|
46092
|
+
console.log(`[filesystem] LINK AT`, fd);
|
|
46093
|
+
}
|
|
46094
|
+
|
|
46095
|
+
function openAt(fd, pathFlags, path, openFlags, descriptorFlags, modes) {
|
|
46096
|
+
// TODO
|
|
46097
|
+
// if (pathFlags.symlinkFollow) {
|
|
46098
|
+
// // resolve symlink
|
|
46099
|
+
// }
|
|
46100
|
+
const fullPath = _preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._descriptors */ .$B[fd].path + path;
|
|
46101
|
+
let fsOpenFlags = 0x0;
|
|
46102
|
+
if (openFlags.create)
|
|
46103
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_CREAT;
|
|
46104
|
+
if (openFlags.directory)
|
|
46105
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_DIRECTORY;
|
|
46106
|
+
if (openFlags.exclusive)
|
|
46107
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_EXCL;
|
|
46108
|
+
if (openFlags.truncate)
|
|
46109
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_TRUNC;
|
|
46110
|
+
if (descriptorFlags.read && descriptorFlags.write)
|
|
46111
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_RDWR;
|
|
46112
|
+
else if (descriptorFlags.write)
|
|
46113
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_WRONLY;
|
|
46114
|
+
// if (descriptorFlags.fileIntegritySync)
|
|
46115
|
+
// if (descriptorFlags.dataIntegritySync)
|
|
46116
|
+
// if (descriptorFlags.requestedWriteSync)
|
|
46117
|
+
// if (descriptorFlags.mutateDirectory)
|
|
46118
|
+
let fsMode = 0x0;
|
|
46119
|
+
if (modes.readable)
|
|
46120
|
+
fsMode |= 0o444;
|
|
46121
|
+
if (modes.writeable)
|
|
46122
|
+
fsMode |= 0o222;
|
|
46123
|
+
if (modes.executable)
|
|
46124
|
+
fsMode |= 0o111;
|
|
46125
|
+
let localFd;
|
|
46126
|
+
try {
|
|
46127
|
+
localFd = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.openSync)(fullPath, fsOpenFlags, fsMode);
|
|
46128
|
+
}
|
|
46129
|
+
catch (e) {
|
|
46130
|
+
_convertFsError(e);
|
|
46131
|
+
}
|
|
46132
|
+
(0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._addOpenedDescriptor */ .jX)(localFd, path, fd);
|
|
46133
|
+
return localFd;
|
|
46134
|
+
}
|
|
46135
|
+
|
|
46136
|
+
function readlinkAt(fd) {
|
|
46137
|
+
console.log(`[filesystem] READLINK AT`, fd);
|
|
46138
|
+
}
|
|
46139
|
+
|
|
46140
|
+
function removeDirectoryAt(fd) {
|
|
46141
|
+
console.log(`[filesystem] REMOVE DIR AT`, fd);
|
|
46142
|
+
}
|
|
46143
|
+
|
|
46144
|
+
function renameAt(fd) {
|
|
46145
|
+
console.log(`[filesystem] RENAME AT`, fd);
|
|
46146
|
+
}
|
|
46147
|
+
|
|
46148
|
+
function symlinkAt(fd) {
|
|
46149
|
+
console.log(`[filesystem] SYMLINK AT`, fd);
|
|
46150
|
+
}
|
|
46151
|
+
|
|
46152
|
+
function unlinkFileAt(fd) {
|
|
46153
|
+
console.log(`[filesystem] UNLINK FILE AT`, fd);
|
|
46154
|
+
}
|
|
46155
|
+
|
|
46156
|
+
function changeFilePermissionsAt(fd) {
|
|
46157
|
+
console.log(`[filesystem] CHANGE FILE PERMISSIONS AT`, fd);
|
|
46158
|
+
}
|
|
46159
|
+
|
|
46160
|
+
function changeDirectoryPermissionsAt(fd) {
|
|
46161
|
+
console.log(`[filesystem] CHANGE DIR PERMISSIONS AT`, fd);
|
|
46162
|
+
}
|
|
46163
|
+
|
|
46164
|
+
function lockShared(fd) {
|
|
46165
|
+
console.log(`[filesystem] LOCK SHARED`, fd);
|
|
46166
|
+
}
|
|
46167
|
+
|
|
46168
|
+
function lockExclusive(fd) {
|
|
46169
|
+
console.log(`[filesystem] LOCK EXCLUSIVE`, fd);
|
|
46170
|
+
}
|
|
46171
|
+
|
|
46172
|
+
function tryLockShared(fd) {
|
|
46173
|
+
console.log(`[filesystem] TRY LOCK SHARED`, fd);
|
|
46174
|
+
}
|
|
46175
|
+
|
|
46176
|
+
function tryLockExclusive(fd) {
|
|
46177
|
+
console.log(`[filesystem] TRY LOCK EXCLUSIVE`, fd);
|
|
46178
|
+
}
|
|
46179
|
+
|
|
46180
|
+
function unlock(fd) {
|
|
46181
|
+
console.log(`[filesystem] UNLOCK`, fd);
|
|
46182
|
+
}
|
|
46183
|
+
|
|
46184
|
+
function dropDescriptor(fd) {
|
|
46185
|
+
(0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._removeOpenedDescriptor */ ._x)(fd);
|
|
46186
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.closeSync)(fd);
|
|
46187
|
+
}
|
|
46188
|
+
|
|
46189
|
+
function readDirectoryEntry(stream) {
|
|
46190
|
+
const streamValue = _dirStreams[stream];
|
|
46191
|
+
if (streamValue.cursor === streamValue.dirs.length)
|
|
46192
|
+
return null;
|
|
46193
|
+
const dir = streamValue.dirs[streamValue.cursor++];
|
|
46194
|
+
const type = _lookupType(dir);
|
|
46195
|
+
_setSubdescriptorType(streamValue.fd, '/' + dir.name, type);
|
|
46196
|
+
return { inode: null, type, name: dir.name };
|
|
46197
|
+
}
|
|
46198
|
+
|
|
46199
|
+
function dropDirectoryEntryStream(stream) {
|
|
46200
|
+
_dirStreams.splice(stream, 1);
|
|
46201
|
+
}
|
|
46202
|
+
|
|
46203
|
+
|
|
46204
|
+
/***/ }),
|
|
46205
|
+
|
|
46206
|
+
/***/ 833:
|
|
46207
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
46208
|
+
|
|
46209
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
46210
|
+
/* harmony export */ "$B": () => (/* binding */ _descriptors),
|
|
46211
|
+
/* harmony export */ "$z": () => (/* binding */ getDirectories),
|
|
46212
|
+
/* harmony export */ "Am": () => (/* binding */ _getDescriptorType),
|
|
46213
|
+
/* harmony export */ "_x": () => (/* binding */ _removeOpenedDescriptor),
|
|
46214
|
+
/* harmony export */ "jX": () => (/* binding */ _addOpenedDescriptor),
|
|
46215
|
+
/* harmony export */ "vT": () => (/* binding */ getStdio),
|
|
46216
|
+
/* harmony export */ "wM": () => (/* binding */ _setDescriptorType)
|
|
46217
|
+
/* harmony export */ });
|
|
46218
|
+
/* unused harmony exports _getFullPath, _setSubdescriptorType, _setPreopens */
|
|
46219
|
+
// default is full permissions
|
|
46220
|
+
let preopenCnt = 4;
|
|
46221
|
+
let _descriptors = {
|
|
46222
|
+
3: { type: 'directory', path: '/', parent: null, subpathTypes: {} }
|
|
46223
|
+
};
|
|
46224
|
+
let directories = [[3, '/']];
|
|
46225
|
+
|
|
46226
|
+
function _getFullPath (fd) {
|
|
46227
|
+
let path = '';
|
|
46228
|
+
while (fd) {
|
|
46229
|
+
path = _descriptors[fd].path + path;
|
|
46230
|
+
fd = _descriptors[fd].parent;
|
|
46231
|
+
}
|
|
46232
|
+
return path;
|
|
46233
|
+
}
|
|
46234
|
+
|
|
46235
|
+
function _getDescriptorType (fd) {
|
|
46236
|
+
return _descriptors[fd].type;
|
|
46237
|
+
}
|
|
46238
|
+
|
|
46239
|
+
function _setDescriptorType (fd, type) {
|
|
46240
|
+
_descriptors[fd].type = type;
|
|
46241
|
+
}
|
|
46242
|
+
|
|
46243
|
+
function _setSubdescriptorType (fd, path, type) {
|
|
46244
|
+
while (_descriptors[fd].parent) {
|
|
46245
|
+
path = _descriptors[fd].path + path;
|
|
46246
|
+
fd = _descriptors[fd].parent;
|
|
46247
|
+
}
|
|
46248
|
+
_descriptors[fd].subpathTypes[path] = type;
|
|
46249
|
+
}
|
|
46250
|
+
|
|
46251
|
+
function _addOpenedDescriptor (fd, path, parentFd) {
|
|
46252
|
+
if (fd < preopenCnt || _descriptors[fd])
|
|
46253
|
+
throw 'bad-descriptor';
|
|
46254
|
+
let type = null;
|
|
46255
|
+
for (const [_path, _type] of Object.entries(_descriptors[parentFd].subpathTypes)) {
|
|
46256
|
+
if (_path === path)
|
|
46257
|
+
type = _type;
|
|
46258
|
+
}
|
|
46259
|
+
_descriptors[fd] = { path, type, parent: parentFd, subpathTypes: {} };
|
|
46260
|
+
}
|
|
46261
|
+
|
|
46262
|
+
function _removeOpenedDescriptor (fd) {
|
|
46263
|
+
if (fd < preopenCnt)
|
|
46264
|
+
throw 'eperm';
|
|
46265
|
+
delete _descriptors[fd];
|
|
46266
|
+
}
|
|
46267
|
+
|
|
46268
|
+
function _setPreopens (preopens) {
|
|
46269
|
+
_descriptors = {};
|
|
46270
|
+
directories = [,,];
|
|
46271
|
+
for (const [virtualPath, path] of Object.entries(preopens)) {
|
|
46272
|
+
_descriptors[preopenCnt] = { type: 'directory', path, parent: null, subpathTypes: {} };
|
|
46273
|
+
directories.push([preopenCnt++, virtualPath]);
|
|
46274
|
+
}
|
|
46275
|
+
}
|
|
46276
|
+
|
|
46277
|
+
function getStdio () {
|
|
46278
|
+
return {
|
|
46279
|
+
stdin: 0,
|
|
46280
|
+
stdout: 1,
|
|
46281
|
+
stderr: 2,
|
|
46282
|
+
};
|
|
46283
|
+
}
|
|
46284
|
+
|
|
46285
|
+
function getDirectories () {
|
|
46286
|
+
return directories;
|
|
46287
|
+
}
|
|
46288
|
+
|
|
46289
|
+
|
|
46290
|
+
/***/ }),
|
|
46291
|
+
|
|
46292
|
+
/***/ 8576:
|
|
46293
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
46294
|
+
|
|
46295
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
46296
|
+
/* harmony export */ "Iv": () => (/* binding */ getRandomBytes)
|
|
46297
|
+
/* harmony export */ });
|
|
46298
|
+
/* unused harmony exports getRandomU64, insecureRandom */
|
|
46299
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(6005);
|
|
46300
|
+
|
|
46301
|
+
|
|
46302
|
+
function getRandomBytes(len) {
|
|
46303
|
+
return (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(Number(len));
|
|
46304
|
+
}
|
|
46305
|
+
|
|
46306
|
+
function getRandomU64 () {
|
|
46307
|
+
return new BigUint64Array(randomBytes(8).buffer)[0];
|
|
46308
|
+
}
|
|
46309
|
+
|
|
46310
|
+
let insecureRandomValue1, insecureRandomValue2;
|
|
46311
|
+
function insecureRandom () {
|
|
46312
|
+
if (insecureRandomValue1 === undefined) {
|
|
46313
|
+
insecureRandomValue1 = getRandomU64();
|
|
46314
|
+
insecureRandomValue2 = getRandomU64();
|
|
46315
|
+
}
|
|
46316
|
+
return [insecureRandomValue1, insecureRandomValue2];
|
|
46317
|
+
}
|
|
46318
|
+
|
|
46319
|
+
|
|
46320
|
+
/***/ }),
|
|
46321
|
+
|
|
46322
|
+
/***/ 9213:
|
|
46323
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
46324
|
+
|
|
46325
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
46326
|
+
/* harmony export */ "HR": () => (/* binding */ _createFileStream),
|
|
46327
|
+
/* harmony export */ "O_": () => (/* binding */ blockingRead),
|
|
46328
|
+
/* harmony export */ "cW": () => (/* binding */ write),
|
|
46329
|
+
/* harmony export */ "dU": () => (/* binding */ dropInputStream),
|
|
46330
|
+
/* harmony export */ "ij": () => (/* binding */ read),
|
|
46331
|
+
/* harmony export */ "oc": () => (/* binding */ dropOutputStream),
|
|
46332
|
+
/* harmony export */ "v_": () => (/* binding */ blockingWrite)
|
|
46333
|
+
/* harmony export */ });
|
|
46334
|
+
/* unused harmony exports _streams, skip, blockingSkip, subscribeToInputStream, writeZeroes, blockingWriteZeroes, splice, blockingSplice, forward, subscribeToOutputStream */
|
|
46335
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7561);
|
|
46336
|
+
/* harmony import */ var _filesystem_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(5331);
|
|
46337
|
+
|
|
46338
|
+
|
|
46339
|
+
|
|
46340
|
+
let _streams = {};
|
|
46341
|
+
let streamCnt = 0;
|
|
46342
|
+
function _createFileStream(fd, offset) {
|
|
46343
|
+
// note we only support offset 0
|
|
46344
|
+
if (Number(offset) === 0)
|
|
46345
|
+
_streams[streamCnt] = {
|
|
46346
|
+
type: 'file',
|
|
46347
|
+
fd: fd
|
|
46348
|
+
};
|
|
46349
|
+
return streamCnt++;
|
|
46350
|
+
}
|
|
46351
|
+
|
|
46352
|
+
function read(s, len) {
|
|
46353
|
+
switch (s) {
|
|
46354
|
+
case 0:
|
|
46355
|
+
return [process.stdin.read(len), true];
|
|
46356
|
+
default:
|
|
46357
|
+
throw new Error(`TODO: write ${s}`);
|
|
46358
|
+
}
|
|
46359
|
+
}
|
|
46360
|
+
function blockingRead(s, len) {
|
|
46361
|
+
len = Number(len);
|
|
46362
|
+
const stream = _streams[s];
|
|
46363
|
+
if (!stream) throw null;
|
|
46364
|
+
switch (stream.type) {
|
|
46365
|
+
case 'file': {
|
|
46366
|
+
const buf = Buffer.alloc(Number(len));
|
|
46367
|
+
try {
|
|
46368
|
+
const readBytes = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readSync)(stream.fd, buf, 0, Number(len));
|
|
46369
|
+
if (readBytes < Number(len))
|
|
46370
|
+
return [new Uint8Array(), true];
|
|
46371
|
+
return [new Uint8Array(buf.buffer, 0, readBytes), false];
|
|
46372
|
+
}
|
|
46373
|
+
catch (e) {
|
|
46374
|
+
(0,_filesystem_js__WEBPACK_IMPORTED_MODULE_1__/* ._convertFsError */ .fm)(e);
|
|
46375
|
+
}
|
|
46376
|
+
break;
|
|
46377
|
+
}
|
|
46378
|
+
default: throw null;
|
|
46379
|
+
}
|
|
46380
|
+
}
|
|
46381
|
+
function skip(s, _len) {
|
|
46382
|
+
console.log(`[streams] Skip ${s}`);
|
|
46383
|
+
}
|
|
46384
|
+
function blockingSkip(s, _len) {
|
|
46385
|
+
console.log(`[streams] Blocking skip ${s}`);
|
|
46386
|
+
}
|
|
46387
|
+
function subscribeToInputStream(s) {
|
|
46388
|
+
console.log(`[streams] Subscribe to input stream ${s}`);
|
|
46389
|
+
}
|
|
46390
|
+
function dropInputStream(s) {
|
|
46391
|
+
delete _streams[s];
|
|
46392
|
+
|
|
46393
|
+
}
|
|
46394
|
+
function write(s, buf) {
|
|
46395
|
+
switch (s) {
|
|
46396
|
+
case 0:
|
|
46397
|
+
throw new Error(`TODO: write stdin`);
|
|
46398
|
+
case 1: {
|
|
46399
|
+
process.stdout.write(buf);
|
|
46400
|
+
return BigInt(buf.byteLength);
|
|
46401
|
+
}
|
|
46402
|
+
case 2: {
|
|
46403
|
+
process.stderr.write(buf);
|
|
46404
|
+
return BigInt(buf.byteLength);
|
|
46405
|
+
}
|
|
46406
|
+
default:
|
|
46407
|
+
throw new Error(`TODO: write ${s}`);
|
|
46408
|
+
}
|
|
46409
|
+
}
|
|
46410
|
+
function blockingWrite(s, _buf) {
|
|
46411
|
+
console.log(`[streams] Blocking write ${s}`);
|
|
46412
|
+
}
|
|
46413
|
+
function writeZeroes(s, _len) {
|
|
46414
|
+
console.log(`[streams] Write zeroes ${s}`);
|
|
46415
|
+
}
|
|
46416
|
+
function blockingWriteZeroes(s, _len) {
|
|
46417
|
+
console.log(`[streams] Blocking write zeroes ${s}`);
|
|
46418
|
+
}
|
|
46419
|
+
function splice(s, _src, _len) {
|
|
46420
|
+
console.log(`[streams] Splice ${s}`);
|
|
46421
|
+
}
|
|
46422
|
+
function blockingSplice(s, _src, _len) {
|
|
46423
|
+
console.log(`[streams] Blocking splice ${s}`);
|
|
46424
|
+
}
|
|
46425
|
+
function forward(s, _src) {
|
|
46426
|
+
console.log(`[streams] Forward ${s}`);
|
|
46427
|
+
}
|
|
46428
|
+
function subscribeToOutputStream(s) {
|
|
46429
|
+
console.log(`[streams] Subscribe to output stream ${s}`);
|
|
46430
|
+
}
|
|
46431
|
+
function dropOutputStream(s) {
|
|
46432
|
+
console.log(`[streams] Drop output stream ${s}`);
|
|
46433
|
+
}
|
|
46434
|
+
|
|
46435
|
+
|
|
44409
46436
|
/***/ }),
|
|
44410
46437
|
|
|
44411
46438
|
/***/ 3216:
|
|
@@ -44415,7 +46442,9 @@ __webpack_async_result__();
|
|
|
44415
46442
|
/* harmony export */ "h": () => (/* binding */ componentize)
|
|
44416
46443
|
/* harmony export */ });
|
|
44417
46444
|
/* harmony import */ var node_fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3977);
|
|
44418
|
-
/* harmony import */ var
|
|
46445
|
+
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(9411);
|
|
46446
|
+
/* harmony import */ var chalk_template__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(267);
|
|
46447
|
+
|
|
44419
46448
|
|
|
44420
46449
|
|
|
44421
46450
|
|
|
@@ -44424,13 +46453,17 @@ async function componentize (jsSource, opts) {
|
|
|
44424
46453
|
try {
|
|
44425
46454
|
({ componentize: componentizeFn } = await eval('import("@bytecodealliance/componentize-js")'));
|
|
44426
46455
|
} catch (e) {
|
|
44427
|
-
|
|
46456
|
+
if (e?.code === 'ERR_MODULE_NOT_FOUND')
|
|
46457
|
+
throw new Error(`componentize-js must first be installed separately via "npm install @bytecodealliance/componentize-js".`);
|
|
46458
|
+
throw e;
|
|
44428
46459
|
}
|
|
44429
46460
|
const source = await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_0__.readFile)(jsSource, 'utf8');
|
|
44430
|
-
const
|
|
44431
|
-
|
|
46461
|
+
const { component, imports } = await componentizeFn(source, {
|
|
46462
|
+
witPath: (0,node_path__WEBPACK_IMPORTED_MODULE_1__.resolve)(opts.wit),
|
|
46463
|
+
worldName: opts.worldName
|
|
46464
|
+
});
|
|
44432
46465
|
await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_0__.writeFile)(opts.out, component);
|
|
44433
|
-
console.log(
|
|
46466
|
+
console.log(chalk_template__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z`{green OK} Successfully written {bold ${opts.out}} with imports (${imports.join(', ')}).`);
|
|
44434
46467
|
}
|
|
44435
46468
|
|
|
44436
46469
|
|
|
@@ -44448,7 +46481,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
44448
46481
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3292);
|
|
44449
46482
|
/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(7310);
|
|
44450
46483
|
/* harmony import */ var chalk_template__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(267);
|
|
44451
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(
|
|
46484
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(6013);
|
|
44452
46485
|
/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(2719);
|
|
44453
46486
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_obj_wasm_tools_js__WEBPACK_IMPORTED_MODULE_0__]);
|
|
44454
46487
|
_obj_wasm_tools_js__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
@@ -44621,7 +46654,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
44621
46654
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3292);
|
|
44622
46655
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(1017);
|
|
44623
46656
|
/* harmony import */ var chalk_template__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(267);
|
|
44624
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(
|
|
46657
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(6013);
|
|
44625
46658
|
/* harmony import */ var _opt_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(5862);
|
|
44626
46659
|
/* harmony import */ var terser__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(1124);
|
|
44627
46660
|
/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(7310);
|
|
@@ -44711,6 +46744,8 @@ async function wasm2Js (source) {
|
|
|
44711
46744
|
* @returns {Promise<{ files: { [filename: string]: Uint8Array }, imports: string[], exports: [string, 'function' | 'instance'][] }>}
|
|
44712
46745
|
*/
|
|
44713
46746
|
async function transpileComponent (component, opts = {}) {
|
|
46747
|
+
if (opts.noWasiShim) opts.wasiShim = false;
|
|
46748
|
+
|
|
44714
46749
|
let spinner;
|
|
44715
46750
|
const showSpinner = (0,_common_js__WEBPACK_IMPORTED_MODULE_4__/* .getShowSpinner */ .AZ)();
|
|
44716
46751
|
if (opts.optimize) {
|
|
@@ -44718,19 +46753,37 @@ async function transpileComponent (component, opts = {}) {
|
|
|
44718
46753
|
({ component } = await (0,_opt_js__WEBPACK_IMPORTED_MODULE_5__/* .optimizeComponent */ .j)(component, opts));
|
|
44719
46754
|
}
|
|
44720
46755
|
|
|
44721
|
-
if (opts.wasiShim) {
|
|
46756
|
+
if (opts.wasiShim !== false) {
|
|
44722
46757
|
opts.map = Object.assign({
|
|
46758
|
+
// Deprecated
|
|
44723
46759
|
'environment-preopens': '@bytecodealliance/preview2-shim/environment-preopens',
|
|
46760
|
+
'console': '@bytecodealliance/preview2-shim/console',
|
|
46761
|
+
'default-outgoing-HTTP': '@bytecodealliance/preview2-shim/default-outgoing-HTTP',
|
|
44724
46762
|
'environment': '@bytecodealliance/preview2-shim/environment',
|
|
46763
|
+
// Deprecated
|
|
46764
|
+
'environment-preopens': '@bytecodealliance/preview2-shim/environment-preopens',
|
|
44725
46765
|
'exit': '@bytecodealliance/preview2-shim/exit',
|
|
44726
46766
|
'filesystem': '@bytecodealliance/preview2-shim/filesystem',
|
|
46767
|
+
// Deprecated
|
|
44727
46768
|
'instance-monotonic-clock': '@bytecodealliance/preview2-shim/instance-monotonic-clock',
|
|
46769
|
+
// Deprecated
|
|
44728
46770
|
'instance-wall-clock': '@bytecodealliance/preview2-shim/instance-wall-clock',
|
|
46771
|
+
'instance-network': '@bytecodealliance/preview2-shim/instance-network',
|
|
46772
|
+
'ip-name-lookup': '@bytecodealliance/preview2-shim/ip-name-lookup',
|
|
44729
46773
|
'monotonic-clock': '@bytecodealliance/preview2-shim/monotonic-clock',
|
|
46774
|
+
'network': '@bytecodealliance/preview2-shim/network',
|
|
46775
|
+
'poll': '@bytecodealliance/preview2-shim/poll',
|
|
44730
46776
|
'preopens': '@bytecodealliance/preview2-shim/preopens',
|
|
44731
46777
|
'random': '@bytecodealliance/preview2-shim/random',
|
|
46778
|
+
// Deprecated
|
|
44732
46779
|
'stderr': '@bytecodealliance/preview2-shim/stderr',
|
|
44733
46780
|
'streams': '@bytecodealliance/preview2-shim/streams',
|
|
46781
|
+
'tcp-create-socket': '@bytecodealliance/preview2-shim/tcp-create-socket',
|
|
46782
|
+
'tcp': '@bytecodealliance/preview2-shim/tcp',
|
|
46783
|
+
'timezone': '@bytecodealliance/preview2-shim/timezone',
|
|
46784
|
+
'types': '@bytecodealliance/preview2-shim/types',
|
|
46785
|
+
'udp-create-socket': '@bytecodealliance/preview2-shim/udp-create-socket',
|
|
46786
|
+
'udp': '@bytecodealliance/preview2-shim/udp',
|
|
44734
46787
|
'wall-clock': '@bytecodealliance/preview2-shim/wall-clock'
|
|
44735
46788
|
}, opts.map || {});
|
|
44736
46789
|
}
|
|
@@ -45025,7 +47078,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
45025
47078
|
/* harmony export */ "eL": () => (/* binding */ metadataShow)
|
|
45026
47079
|
/* harmony export */ });
|
|
45027
47080
|
/* harmony import */ var node_fs_promises__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(3977);
|
|
45028
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(
|
|
47081
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(6013);
|
|
45029
47082
|
/* harmony import */ var _obj_wasm_tools_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(8980);
|
|
45030
47083
|
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(9411);
|
|
45031
47084
|
/* harmony import */ var chalk_template__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(267);
|
|
@@ -45098,8 +47151,9 @@ async function componentEmbed(file, opts) {
|
|
|
45098
47151
|
return [field, [[name, version]]];
|
|
45099
47152
|
});
|
|
45100
47153
|
const source = file ? await (0,_common_js__WEBPACK_IMPORTED_MODULE_1__/* .readFile */ .pJ)(file) : null;
|
|
45101
|
-
|
|
45102
|
-
|
|
47154
|
+
opts.binary = source;
|
|
47155
|
+
opts.witPath = (0,node_path__WEBPACK_IMPORTED_MODULE_3__.resolve)(opts.wit);
|
|
47156
|
+
const output = componentEmbedFn(opts);
|
|
45103
47157
|
await (0,node_fs_promises__WEBPACK_IMPORTED_MODULE_0__.writeFile)(opts.output, output);
|
|
45104
47158
|
}
|
|
45105
47159
|
|
|
@@ -45153,7 +47207,7 @@ __webpack_async_result__();
|
|
|
45153
47207
|
|
|
45154
47208
|
/***/ }),
|
|
45155
47209
|
|
|
45156
|
-
/***/
|
|
47210
|
+
/***/ 6013:
|
|
45157
47211
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
45158
47212
|
|
|
45159
47213
|
|
|
@@ -45170,8 +47224,8 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
45170
47224
|
|
|
45171
47225
|
// UNUSED EXPORTS: getTmpFile
|
|
45172
47226
|
|
|
45173
|
-
|
|
45174
|
-
|
|
47227
|
+
// EXTERNAL MODULE: external "node:crypto"
|
|
47228
|
+
var external_node_crypto_ = __nccwpck_require__(6005);
|
|
45175
47229
|
// EXTERNAL MODULE: external "node:path"
|
|
45176
47230
|
var external_node_path_ = __nccwpck_require__(9411);
|
|
45177
47231
|
// EXTERNAL MODULE: external "node:os"
|
|
@@ -45244,7 +47298,7 @@ function table (data, align = []) {
|
|
|
45244
47298
|
}
|
|
45245
47299
|
|
|
45246
47300
|
function getTmpFile (source, ext) {
|
|
45247
|
-
return (0,external_node_path_.resolve)((0,external_node_os_.tmpdir)(),
|
|
47301
|
+
return (0,external_node_path_.resolve)((0,external_node_os_.tmpdir)(), external_node_crypto_.createHash('sha256').update(source).update(Math.random().toString()).digest('hex') + ext);
|
|
45248
47302
|
}
|
|
45249
47303
|
|
|
45250
47304
|
async function readFileCli (file, encoding) {
|
|
@@ -45315,7 +47369,7 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_cmd
|
|
|
45315
47369
|
commander__WEBPACK_IMPORTED_MODULE_0__/* .program.name */ .Nx.name('jco')
|
|
45316
47370
|
.description(chalk_template__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z`{bold jco - WebAssembly JS Component Tools}\n JS Component Transpilation Bindgen & Wasm Tools for JS`)
|
|
45317
47371
|
.usage('<command> [options]')
|
|
45318
|
-
.version('0.
|
|
47372
|
+
.version('0.7.0');
|
|
45319
47373
|
|
|
45320
47374
|
function myParseInt(value) {
|
|
45321
47375
|
return parseInt(value, 10);
|
|
@@ -45325,7 +47379,8 @@ commander__WEBPACK_IMPORTED_MODULE_0__/* .program.command */ .Nx.command('compon
|
|
|
45325
47379
|
.description('Create a component from a JavaScript module')
|
|
45326
47380
|
.usage('<js-source> -o <component-path>')
|
|
45327
47381
|
.argument('<js-source>', 'JS source file to build')
|
|
45328
|
-
.requiredOption('-w, --wit <
|
|
47382
|
+
.requiredOption('-w, --wit <path>', 'WIT path to build with')
|
|
47383
|
+
.option('-n, --world-name <name>', 'WIT world to build')
|
|
45329
47384
|
.requiredOption('-o, --out <out>', 'output component file')
|
|
45330
47385
|
.action(asyncAction(_cmd_componentize_js__WEBPACK_IMPORTED_MODULE_4__/* .componentize */ .h));
|
|
45331
47386
|
|
|
@@ -45343,7 +47398,7 @@ commander__WEBPACK_IMPORTED_MODULE_0__/* .program.command */ .Nx.command('transp
|
|
|
45343
47398
|
.option('--tla-compat', 'enables compatibility for JS environments without top-level await support via an async $init promise export')
|
|
45344
47399
|
.option('--no-nodejs-compat', 'disables compatibility in Node.js without a fetch global')
|
|
45345
47400
|
.option('-M, --map <mappings...>', 'specifier=./output custom mappings for the component imports')
|
|
45346
|
-
.option('-
|
|
47401
|
+
.option('--no-wasi-shim', 'disable automatic rewriting of WASI imports to use @bytecodealliance/preview2-shim')
|
|
45347
47402
|
.option('--js', 'output JS instead of core WebAssembly')
|
|
45348
47403
|
.option('-I, --instantiation', 'output for custom module instantiation')
|
|
45349
47404
|
.option('-q, --quiet', 'disable logging')
|