@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/api.mjs
CHANGED
|
@@ -6578,6 +6578,20 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"
|
|
|
6578
6578
|
|
|
6579
6579
|
/***/ }),
|
|
6580
6580
|
|
|
6581
|
+
/***/ 6005:
|
|
6582
|
+
/***/ ((module) => {
|
|
6583
|
+
|
|
6584
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:crypto");
|
|
6585
|
+
|
|
6586
|
+
/***/ }),
|
|
6587
|
+
|
|
6588
|
+
/***/ 7561:
|
|
6589
|
+
/***/ ((module) => {
|
|
6590
|
+
|
|
6591
|
+
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs");
|
|
6592
|
+
|
|
6593
|
+
/***/ }),
|
|
6594
|
+
|
|
6581
6595
|
/***/ 612:
|
|
6582
6596
|
/***/ ((module) => {
|
|
6583
6597
|
|
|
@@ -6632,24 +6646,6 @@ module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("url");
|
|
|
6632
6646
|
|
|
6633
6647
|
module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util");
|
|
6634
6648
|
|
|
6635
|
-
/***/ }),
|
|
6636
|
-
|
|
6637
|
-
/***/ 2759:
|
|
6638
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
6639
|
-
|
|
6640
|
-
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
6641
|
-
/* harmony export */ "v": () => (/* binding */ error)
|
|
6642
|
-
/* harmony export */ });
|
|
6643
|
-
/* unused harmony export log */
|
|
6644
|
-
function log(msg) {
|
|
6645
|
-
console.log(msg);
|
|
6646
|
-
}
|
|
6647
|
-
|
|
6648
|
-
function error(msg) {
|
|
6649
|
-
console.error(msg);
|
|
6650
|
-
}
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
6649
|
/***/ }),
|
|
6654
6650
|
|
|
6655
6651
|
/***/ 267:
|
|
@@ -40037,47 +40033,20 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
40037
40033
|
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
40038
40034
|
/* harmony export */ "I": () => (/* binding */ exports)
|
|
40039
40035
|
/* harmony export */ });
|
|
40040
|
-
/* harmony import */ var
|
|
40036
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(7393);
|
|
40037
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(8576);
|
|
40038
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(5331);
|
|
40039
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9213);
|
|
40040
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(833);
|
|
40041
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(9187);
|
|
40041
40042
|
|
|
40042
40043
|
|
|
40043
|
-
const instantiateCore = WebAssembly.instantiate;
|
|
40044
40044
|
|
|
40045
|
-
const utf8Decoder = new TextDecoder();
|
|
40046
40045
|
|
|
40047
|
-
let dv = new DataView(new ArrayBuffer());
|
|
40048
|
-
const dataView = mem => dv.buffer === mem.buffer ? dv : dv = new DataView(mem.buffer);
|
|
40049
40046
|
|
|
40050
|
-
const utf8Encoder = new TextEncoder();
|
|
40051
40047
|
|
|
40052
|
-
let utf8EncodedLen = 0;
|
|
40053
|
-
function utf8Encode(s, realloc, memory) {
|
|
40054
|
-
if (typeof s !== 'string') throw new TypeError('expected a string');
|
|
40055
|
-
if (s.length === 0) {
|
|
40056
|
-
utf8EncodedLen = 0;
|
|
40057
|
-
return 1;
|
|
40058
|
-
}
|
|
40059
|
-
let allocLen = 0;
|
|
40060
|
-
let ptr = 0;
|
|
40061
|
-
let writtenTotal = 0;
|
|
40062
|
-
while (s.length > 0) {
|
|
40063
|
-
ptr = realloc(ptr, allocLen, 1, allocLen + s.length);
|
|
40064
|
-
allocLen += s.length;
|
|
40065
|
-
const { read, written } = utf8Encoder.encodeInto(
|
|
40066
|
-
s,
|
|
40067
|
-
new Uint8Array(memory.buffer, ptr + writtenTotal, allocLen - writtenTotal),
|
|
40068
|
-
);
|
|
40069
|
-
writtenTotal += written;
|
|
40070
|
-
s = s.slice(read);
|
|
40071
|
-
}
|
|
40072
|
-
if (allocLen > writtenTotal)
|
|
40073
|
-
ptr = realloc(ptr, allocLen, 1, writtenTotal);
|
|
40074
|
-
utf8EncodedLen = writtenTotal;
|
|
40075
|
-
return ptr;
|
|
40076
|
-
}
|
|
40077
40048
|
|
|
40078
|
-
|
|
40079
|
-
return val >>> 0;
|
|
40080
|
-
}
|
|
40049
|
+
const base64Compile = str => WebAssembly.compile(typeof Buffer !== 'undefined' ? Buffer.from(str, 'base64') : Uint8Array.from(atob(str), b => b.charCodeAt(0)));
|
|
40081
40050
|
|
|
40082
40051
|
class ComponentError extends Error {
|
|
40083
40052
|
constructor (value) {
|
|
@@ -40087,6 +40056,9 @@ class ComponentError extends Error {
|
|
|
40087
40056
|
}
|
|
40088
40057
|
}
|
|
40089
40058
|
|
|
40059
|
+
let dv = new DataView(new ArrayBuffer());
|
|
40060
|
+
const dataView = mem => dv.buffer === mem.buffer ? dv : dv = new DataView(mem.buffer);
|
|
40061
|
+
|
|
40090
40062
|
const isNode = typeof process !== 'undefined' && process.versions && process.versions.node;
|
|
40091
40063
|
let _fs;
|
|
40092
40064
|
async function fetchCompile (url) {
|
|
@@ -40097,242 +40069,26 @@ async function fetchCompile (url) {
|
|
|
40097
40069
|
return fetch(url).then(WebAssembly.compileStreaming);
|
|
40098
40070
|
}
|
|
40099
40071
|
|
|
40100
|
-
|
|
40101
|
-
|
|
40102
|
-
|
|
40103
|
-
|
|
40104
|
-
let memory0;
|
|
40105
|
-
|
|
40106
|
-
function lowering0(arg0, arg1) {
|
|
40107
|
-
const ptr0 = arg0;
|
|
40108
|
-
const len0 = arg1;
|
|
40109
|
-
const result0 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr0, len0));
|
|
40110
|
-
(0,_lib_console_js__WEBPACK_IMPORTED_MODULE_0__/* .error */ .v)(result0);
|
|
40072
|
+
function getErrorPayload(e) {
|
|
40073
|
+
if (hasOwnProperty.call(e, 'payload')) return e.payload;
|
|
40074
|
+
if (hasOwnProperty.call(e, 'message')) return String(e.message);
|
|
40075
|
+
return String(e);
|
|
40111
40076
|
}
|
|
40112
|
-
let exports2;
|
|
40113
|
-
let realloc0;
|
|
40114
|
-
let postReturn0;
|
|
40115
|
-
const exports = {
|
|
40116
|
-
generate(arg0, arg1) {
|
|
40117
|
-
const ptr0 = realloc0(0, 0, 4, 48);
|
|
40118
|
-
const val1 = arg0;
|
|
40119
|
-
const len1 = val1.byteLength;
|
|
40120
|
-
const ptr1 = realloc0(0, 0, 1, len1 * 1);
|
|
40121
|
-
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
40122
|
-
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
40123
|
-
dataView(memory0).setInt32(ptr0 + 4, len1, true);
|
|
40124
|
-
dataView(memory0).setInt32(ptr0 + 0, ptr1, true);
|
|
40125
|
-
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;
|
|
40126
|
-
const ptr3 = utf8Encode(v2_0, realloc0, memory0);
|
|
40127
|
-
const len3 = utf8EncodedLen;
|
|
40128
|
-
dataView(memory0).setInt32(ptr0 + 12, len3, true);
|
|
40129
|
-
dataView(memory0).setInt32(ptr0 + 8, ptr3, true);
|
|
40130
|
-
const variant4 = v2_1;
|
|
40131
|
-
if (variant4 === null || variant4=== undefined) {
|
|
40132
|
-
dataView(memory0).setInt8(ptr0 + 16, 0, true);
|
|
40133
|
-
} else {
|
|
40134
|
-
const e = variant4;
|
|
40135
|
-
dataView(memory0).setInt8(ptr0 + 16, 1, true);
|
|
40136
|
-
dataView(memory0).setInt8(ptr0 + 17, e ? 1 : 0, true);
|
|
40137
|
-
}
|
|
40138
|
-
const variant5 = v2_2;
|
|
40139
|
-
if (variant5 === null || variant5=== undefined) {
|
|
40140
|
-
dataView(memory0).setInt8(ptr0 + 18, 0, true);
|
|
40141
|
-
} else {
|
|
40142
|
-
const e = variant5;
|
|
40143
|
-
dataView(memory0).setInt8(ptr0 + 18, 1, true);
|
|
40144
|
-
dataView(memory0).setInt8(ptr0 + 19, e ? 1 : 0, true);
|
|
40145
|
-
}
|
|
40146
|
-
const variant10 = v2_3;
|
|
40147
|
-
if (variant10 === null || variant10=== undefined) {
|
|
40148
|
-
dataView(memory0).setInt8(ptr0 + 20, 0, true);
|
|
40149
|
-
} else {
|
|
40150
|
-
const e = variant10;
|
|
40151
|
-
dataView(memory0).setInt8(ptr0 + 20, 1, true);
|
|
40152
|
-
const vec9 = e;
|
|
40153
|
-
const len9 = vec9.length;
|
|
40154
|
-
const result9 = realloc0(0, 0, 4, len9 * 16);
|
|
40155
|
-
for (let i = 0; i < vec9.length; i++) {
|
|
40156
|
-
const e = vec9[i];
|
|
40157
|
-
const base = result9 + i * 16;const [tuple6_0, tuple6_1] = e;
|
|
40158
|
-
const ptr7 = utf8Encode(tuple6_0, realloc0, memory0);
|
|
40159
|
-
const len7 = utf8EncodedLen;
|
|
40160
|
-
dataView(memory0).setInt32(base + 4, len7, true);
|
|
40161
|
-
dataView(memory0).setInt32(base + 0, ptr7, true);
|
|
40162
|
-
const ptr8 = utf8Encode(tuple6_1, realloc0, memory0);
|
|
40163
|
-
const len8 = utf8EncodedLen;
|
|
40164
|
-
dataView(memory0).setInt32(base + 12, len8, true);
|
|
40165
|
-
dataView(memory0).setInt32(base + 8, ptr8, true);
|
|
40166
|
-
}
|
|
40167
|
-
dataView(memory0).setInt32(ptr0 + 28, len9, true);
|
|
40168
|
-
dataView(memory0).setInt32(ptr0 + 24, result9, true);
|
|
40169
|
-
}
|
|
40170
|
-
const variant11 = v2_4;
|
|
40171
|
-
if (variant11 === null || variant11=== undefined) {
|
|
40172
|
-
dataView(memory0).setInt8(ptr0 + 32, 0, true);
|
|
40173
|
-
} else {
|
|
40174
|
-
const e = variant11;
|
|
40175
|
-
dataView(memory0).setInt8(ptr0 + 32, 1, true);
|
|
40176
|
-
dataView(memory0).setInt8(ptr0 + 33, e ? 1 : 0, true);
|
|
40177
|
-
}
|
|
40178
|
-
const variant12 = v2_5;
|
|
40179
|
-
if (variant12 === null || variant12=== undefined) {
|
|
40180
|
-
dataView(memory0).setInt8(ptr0 + 34, 0, true);
|
|
40181
|
-
} else {
|
|
40182
|
-
const e = variant12;
|
|
40183
|
-
dataView(memory0).setInt8(ptr0 + 34, 1, true);
|
|
40184
|
-
dataView(memory0).setInt8(ptr0 + 35, e ? 1 : 0, true);
|
|
40185
|
-
}
|
|
40186
|
-
const variant13 = v2_6;
|
|
40187
|
-
if (variant13 === null || variant13=== undefined) {
|
|
40188
|
-
dataView(memory0).setInt8(ptr0 + 36, 0, true);
|
|
40189
|
-
} else {
|
|
40190
|
-
const e = variant13;
|
|
40191
|
-
dataView(memory0).setInt8(ptr0 + 36, 1, true);
|
|
40192
|
-
dataView(memory0).setInt32(ptr0 + 40, toUint32(e), true);
|
|
40193
|
-
}
|
|
40194
|
-
const variant14 = v2_7;
|
|
40195
|
-
if (variant14 === null || variant14=== undefined) {
|
|
40196
|
-
dataView(memory0).setInt8(ptr0 + 44, 0, true);
|
|
40197
|
-
} else {
|
|
40198
|
-
const e = variant14;
|
|
40199
|
-
dataView(memory0).setInt8(ptr0 + 44, 1, true);
|
|
40200
|
-
dataView(memory0).setInt8(ptr0 + 45, e ? 1 : 0, true);
|
|
40201
|
-
}
|
|
40202
|
-
const variant15 = v2_8;
|
|
40203
|
-
if (variant15 === null || variant15=== undefined) {
|
|
40204
|
-
dataView(memory0).setInt8(ptr0 + 46, 0, true);
|
|
40205
|
-
} else {
|
|
40206
|
-
const e = variant15;
|
|
40207
|
-
dataView(memory0).setInt8(ptr0 + 46, 1, true);
|
|
40208
|
-
dataView(memory0).setInt8(ptr0 + 47, e ? 1 : 0, true);
|
|
40209
|
-
}
|
|
40210
|
-
const ret = exports1['exports#generate'](ptr0);
|
|
40211
|
-
let variant25;
|
|
40212
|
-
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
40213
|
-
case 0: {
|
|
40214
|
-
const len18 = dataView(memory0).getInt32(ret + 8, true);
|
|
40215
|
-
const base18 = dataView(memory0).getInt32(ret + 4, true);
|
|
40216
|
-
const result18 = [];
|
|
40217
|
-
for (let i = 0; i < len18; i++) {
|
|
40218
|
-
const base = base18 + i * 16;
|
|
40219
|
-
const ptr16 = dataView(memory0).getInt32(base + 0, true);
|
|
40220
|
-
const len16 = dataView(memory0).getInt32(base + 4, true);
|
|
40221
|
-
const result16 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr16, len16));
|
|
40222
|
-
const ptr17 = dataView(memory0).getInt32(base + 8, true);
|
|
40223
|
-
const len17 = dataView(memory0).getInt32(base + 12, true);
|
|
40224
|
-
const result17 = new Uint8Array(memory0.buffer.slice(ptr17, ptr17 + len17 * 1));
|
|
40225
|
-
result18.push([result16, result17]);
|
|
40226
|
-
}
|
|
40227
|
-
const len20 = dataView(memory0).getInt32(ret + 16, true);
|
|
40228
|
-
const base20 = dataView(memory0).getInt32(ret + 12, true);
|
|
40229
|
-
const result20 = [];
|
|
40230
|
-
for (let i = 0; i < len20; i++) {
|
|
40231
|
-
const base = base20 + i * 8;
|
|
40232
|
-
const ptr19 = dataView(memory0).getInt32(base + 0, true);
|
|
40233
|
-
const len19 = dataView(memory0).getInt32(base + 4, true);
|
|
40234
|
-
const result19 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr19, len19));
|
|
40235
|
-
result20.push(result19);
|
|
40236
|
-
}
|
|
40237
|
-
const len23 = dataView(memory0).getInt32(ret + 24, true);
|
|
40238
|
-
const base23 = dataView(memory0).getInt32(ret + 20, true);
|
|
40239
|
-
const result23 = [];
|
|
40240
|
-
for (let i = 0; i < len23; i++) {
|
|
40241
|
-
const base = base23 + i * 12;
|
|
40242
|
-
const ptr21 = dataView(memory0).getInt32(base + 0, true);
|
|
40243
|
-
const len21 = dataView(memory0).getInt32(base + 4, true);
|
|
40244
|
-
const result21 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr21, len21));
|
|
40245
|
-
let enum22;
|
|
40246
|
-
switch (dataView(memory0).getUint8(base + 8, true)) {
|
|
40247
|
-
case 0: {
|
|
40248
|
-
enum22 = 'function';
|
|
40249
|
-
break;
|
|
40250
|
-
}
|
|
40251
|
-
case 1: {
|
|
40252
|
-
enum22 = 'instance';
|
|
40253
|
-
break;
|
|
40254
|
-
}
|
|
40255
|
-
default: {
|
|
40256
|
-
throw new TypeError('invalid discriminant specified for ExportType');
|
|
40257
|
-
}
|
|
40258
|
-
}
|
|
40259
|
-
result23.push([result21, enum22]);
|
|
40260
|
-
}
|
|
40261
|
-
variant25= {
|
|
40262
|
-
tag: 'ok',
|
|
40263
|
-
val: {
|
|
40264
|
-
files: result18,
|
|
40265
|
-
imports: result20,
|
|
40266
|
-
exports: result23,
|
|
40267
|
-
}
|
|
40268
|
-
};
|
|
40269
|
-
break;
|
|
40270
|
-
}
|
|
40271
|
-
case 1: {
|
|
40272
|
-
const ptr24 = dataView(memory0).getInt32(ret + 4, true);
|
|
40273
|
-
const len24 = dataView(memory0).getInt32(ret + 8, true);
|
|
40274
|
-
const result24 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr24, len24));
|
|
40275
|
-
variant25= {
|
|
40276
|
-
tag: 'err',
|
|
40277
|
-
val: result24
|
|
40278
|
-
};
|
|
40279
|
-
break;
|
|
40280
|
-
}
|
|
40281
|
-
default: {
|
|
40282
|
-
throw new TypeError('invalid variant discriminant for expected');
|
|
40283
|
-
}
|
|
40284
|
-
}
|
|
40285
|
-
postReturn0(ret);
|
|
40286
|
-
if (variant25.tag === 'err') {
|
|
40287
|
-
throw new ComponentError(variant25.val);
|
|
40288
|
-
}
|
|
40289
|
-
return variant25.val;
|
|
40290
|
-
},
|
|
40291
|
-
|
|
40292
|
-
};
|
|
40293
40077
|
|
|
40078
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
40294
40079
|
|
|
40080
|
+
const instantiateCore = WebAssembly.instantiate;
|
|
40295
40081
|
|
|
40296
|
-
const
|
|
40297
|
-
const module0 = fetchCompile(__nccwpck_require__.ab + "js-component-bindgen-component.core.wasm");
|
|
40298
|
-
const module1 = base64Compile('AGFzbQEAAAABBgFgAn9/AAMCAQAEBQFwAQEBBxACATAAAAgkaW1wb3J0cwEACg0BCwAgACABQQARAAALAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjEANQRuYW1lABMSd2l0LWNvbXBvbmVudDpzaGltARkBABZpbmRpcmVjdC1jb25zb2xlLWVycm9y');
|
|
40299
|
-
const module2 = base64Compile('AGFzbQEAAAABBgFgAn9/AAIVAgABMAAAAAgkaW1wb3J0cwFwAQEBCQcBAEEACwEAAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjEAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM=');
|
|
40300
|
-
Promise.all([module0, module1, module2]).catch(() => {});
|
|
40301
|
-
({ exports: exports0 } = await instantiateCore(await module1));
|
|
40302
|
-
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
40303
|
-
console: {
|
|
40304
|
-
error: exports0['0'],
|
|
40305
|
-
},
|
|
40306
|
-
}));
|
|
40307
|
-
memory0 = exports1.memory;
|
|
40308
|
-
({ exports: exports2 } = await instantiateCore(await module2, {
|
|
40309
|
-
'': {
|
|
40310
|
-
$imports: exports0.$imports,
|
|
40311
|
-
'0': lowering0,
|
|
40312
|
-
},
|
|
40313
|
-
}));
|
|
40314
|
-
realloc0 = exports1.cabi_realloc;
|
|
40315
|
-
postReturn0 = exports1['cabi_post_exports#generate'];
|
|
40316
|
-
})();
|
|
40317
|
-
|
|
40318
|
-
await $init;
|
|
40319
|
-
|
|
40320
|
-
__webpack_async_result__();
|
|
40321
|
-
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
40322
|
-
|
|
40323
|
-
/***/ }),
|
|
40324
|
-
|
|
40325
|
-
/***/ 8980:
|
|
40326
|
-
/***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
40327
|
-
|
|
40328
|
-
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
40329
|
-
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
40330
|
-
/* harmony export */ "I": () => (/* binding */ exports)
|
|
40331
|
-
/* harmony export */ });
|
|
40332
|
-
/* harmony import */ var _lib_console_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(2759);
|
|
40082
|
+
const toUint64 = val => BigInt.asUintN(64, val);
|
|
40333
40083
|
|
|
40084
|
+
function toString(val) {
|
|
40085
|
+
if (typeof val === 'symbol') throw new TypeError('symbols cannot be converted to strings');
|
|
40086
|
+
return String(val);
|
|
40087
|
+
}
|
|
40334
40088
|
|
|
40335
|
-
|
|
40089
|
+
function toUint32(val) {
|
|
40090
|
+
return val >>> 0;
|
|
40091
|
+
}
|
|
40336
40092
|
|
|
40337
40093
|
const utf8Decoder = new TextDecoder();
|
|
40338
40094
|
|
|
@@ -40364,8 +40120,680 @@ function utf8Encode(s, realloc, memory) {
|
|
|
40364
40120
|
return ptr;
|
|
40365
40121
|
}
|
|
40366
40122
|
|
|
40367
|
-
let
|
|
40368
|
-
|
|
40123
|
+
let exports0;
|
|
40124
|
+
let exports1;
|
|
40125
|
+
|
|
40126
|
+
function lowering0(arg0, arg1) {
|
|
40127
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .writeViaStream */ .Zw)(arg0 >>> 0, BigInt.asUintN(64, arg1));
|
|
40128
|
+
return toUint32(ret);
|
|
40129
|
+
}
|
|
40130
|
+
|
|
40131
|
+
function lowering1(arg0) {
|
|
40132
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .appendViaStream */ .Tk)(arg0 >>> 0);
|
|
40133
|
+
return toUint32(ret);
|
|
40134
|
+
}
|
|
40135
|
+
|
|
40136
|
+
function lowering2(arg0) {
|
|
40137
|
+
(0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .dropDescriptor */ .Lk)(arg0 >>> 0);
|
|
40138
|
+
}
|
|
40139
|
+
|
|
40140
|
+
function lowering3(arg0) {
|
|
40141
|
+
let variant0;
|
|
40142
|
+
switch (arg0) {
|
|
40143
|
+
case 0: {
|
|
40144
|
+
variant0= {
|
|
40145
|
+
tag: 'ok',
|
|
40146
|
+
val: undefined
|
|
40147
|
+
};
|
|
40148
|
+
break;
|
|
40149
|
+
}
|
|
40150
|
+
case 1: {
|
|
40151
|
+
variant0= {
|
|
40152
|
+
tag: 'err',
|
|
40153
|
+
val: undefined
|
|
40154
|
+
};
|
|
40155
|
+
break;
|
|
40156
|
+
}
|
|
40157
|
+
default: {
|
|
40158
|
+
throw new TypeError('invalid variant discriminant for expected');
|
|
40159
|
+
}
|
|
40160
|
+
}
|
|
40161
|
+
(0,_bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__/* .exit */ .J)(variant0);
|
|
40162
|
+
}
|
|
40163
|
+
|
|
40164
|
+
function lowering4(arg0) {
|
|
40165
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .dropInputStream */ .dU)(arg0 >>> 0);
|
|
40166
|
+
}
|
|
40167
|
+
|
|
40168
|
+
function lowering5(arg0) {
|
|
40169
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .dropOutputStream */ .oc)(arg0 >>> 0);
|
|
40170
|
+
}
|
|
40171
|
+
let exports2;
|
|
40172
|
+
let memory0;
|
|
40173
|
+
|
|
40174
|
+
function lowering6(arg0) {
|
|
40175
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_3__/* .getStdio */ .vT)();
|
|
40176
|
+
const {stdin: v0_0, stdout: v0_1, stderr: v0_2 } = ret;
|
|
40177
|
+
dataView(memory0).setInt32(arg0 + 0, toUint32(v0_0), true);
|
|
40178
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(v0_1), true);
|
|
40179
|
+
dataView(memory0).setInt32(arg0 + 8, toUint32(v0_2), true);
|
|
40180
|
+
}
|
|
40181
|
+
let realloc0;
|
|
40182
|
+
|
|
40183
|
+
function lowering7(arg0) {
|
|
40184
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_3__/* .getDirectories */ .$z)();
|
|
40185
|
+
const vec2 = ret;
|
|
40186
|
+
const len2 = vec2.length;
|
|
40187
|
+
const result2 = realloc0(0, 0, 4, len2 * 12);
|
|
40188
|
+
for (let i = 0; i < vec2.length; i++) {
|
|
40189
|
+
const e = vec2[i];
|
|
40190
|
+
const base = result2 + i * 12;const [tuple0_0, tuple0_1] = e;
|
|
40191
|
+
dataView(memory0).setInt32(base + 0, toUint32(tuple0_0), true);
|
|
40192
|
+
const ptr1 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
40193
|
+
const len1 = utf8EncodedLen;
|
|
40194
|
+
dataView(memory0).setInt32(base + 8, len1, true);
|
|
40195
|
+
dataView(memory0).setInt32(base + 4, ptr1, true);
|
|
40196
|
+
}
|
|
40197
|
+
dataView(memory0).setInt32(arg0 + 4, len2, true);
|
|
40198
|
+
dataView(memory0).setInt32(arg0 + 0, result2, true);
|
|
40199
|
+
}
|
|
40200
|
+
|
|
40201
|
+
function lowering8(arg0, arg1) {
|
|
40202
|
+
let ret;
|
|
40203
|
+
try {
|
|
40204
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_1__/* .getType */ .oL)(arg0 >>> 0) };
|
|
40205
|
+
} catch (e) {
|
|
40206
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
40207
|
+
}
|
|
40208
|
+
const variant2 = ret;
|
|
40209
|
+
switch (variant2.tag) {
|
|
40210
|
+
case 'ok': {
|
|
40211
|
+
const e = variant2.val;
|
|
40212
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
40213
|
+
const val0 = toString(e);
|
|
40214
|
+
let enum0;
|
|
40215
|
+
switch (val0) {
|
|
40216
|
+
case 'unknown': {
|
|
40217
|
+
enum0 = 0;
|
|
40218
|
+
break;
|
|
40219
|
+
}
|
|
40220
|
+
case 'block-device': {
|
|
40221
|
+
enum0 = 1;
|
|
40222
|
+
break;
|
|
40223
|
+
}
|
|
40224
|
+
case 'character-device': {
|
|
40225
|
+
enum0 = 2;
|
|
40226
|
+
break;
|
|
40227
|
+
}
|
|
40228
|
+
case 'directory': {
|
|
40229
|
+
enum0 = 3;
|
|
40230
|
+
break;
|
|
40231
|
+
}
|
|
40232
|
+
case 'fifo': {
|
|
40233
|
+
enum0 = 4;
|
|
40234
|
+
break;
|
|
40235
|
+
}
|
|
40236
|
+
case 'symbolic-link': {
|
|
40237
|
+
enum0 = 5;
|
|
40238
|
+
break;
|
|
40239
|
+
}
|
|
40240
|
+
case 'regular-file': {
|
|
40241
|
+
enum0 = 6;
|
|
40242
|
+
break;
|
|
40243
|
+
}
|
|
40244
|
+
case 'socket': {
|
|
40245
|
+
enum0 = 7;
|
|
40246
|
+
break;
|
|
40247
|
+
}
|
|
40248
|
+
default: {
|
|
40249
|
+
throw new TypeError(`"${val0}" is not one of the cases of descriptor-type`);
|
|
40250
|
+
}
|
|
40251
|
+
}
|
|
40252
|
+
dataView(memory0).setInt8(arg1 + 1, enum0, true);
|
|
40253
|
+
break;
|
|
40254
|
+
}
|
|
40255
|
+
case 'err': {
|
|
40256
|
+
const e = variant2.val;
|
|
40257
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
40258
|
+
const val1 = toString(e);
|
|
40259
|
+
let enum1;
|
|
40260
|
+
switch (val1) {
|
|
40261
|
+
case 'access': {
|
|
40262
|
+
enum1 = 0;
|
|
40263
|
+
break;
|
|
40264
|
+
}
|
|
40265
|
+
case 'would-block': {
|
|
40266
|
+
enum1 = 1;
|
|
40267
|
+
break;
|
|
40268
|
+
}
|
|
40269
|
+
case 'already': {
|
|
40270
|
+
enum1 = 2;
|
|
40271
|
+
break;
|
|
40272
|
+
}
|
|
40273
|
+
case 'bad-descriptor': {
|
|
40274
|
+
enum1 = 3;
|
|
40275
|
+
break;
|
|
40276
|
+
}
|
|
40277
|
+
case 'busy': {
|
|
40278
|
+
enum1 = 4;
|
|
40279
|
+
break;
|
|
40280
|
+
}
|
|
40281
|
+
case 'deadlock': {
|
|
40282
|
+
enum1 = 5;
|
|
40283
|
+
break;
|
|
40284
|
+
}
|
|
40285
|
+
case 'quota': {
|
|
40286
|
+
enum1 = 6;
|
|
40287
|
+
break;
|
|
40288
|
+
}
|
|
40289
|
+
case 'exist': {
|
|
40290
|
+
enum1 = 7;
|
|
40291
|
+
break;
|
|
40292
|
+
}
|
|
40293
|
+
case 'file-too-large': {
|
|
40294
|
+
enum1 = 8;
|
|
40295
|
+
break;
|
|
40296
|
+
}
|
|
40297
|
+
case 'illegal-byte-sequence': {
|
|
40298
|
+
enum1 = 9;
|
|
40299
|
+
break;
|
|
40300
|
+
}
|
|
40301
|
+
case 'in-progress': {
|
|
40302
|
+
enum1 = 10;
|
|
40303
|
+
break;
|
|
40304
|
+
}
|
|
40305
|
+
case 'interrupted': {
|
|
40306
|
+
enum1 = 11;
|
|
40307
|
+
break;
|
|
40308
|
+
}
|
|
40309
|
+
case 'invalid': {
|
|
40310
|
+
enum1 = 12;
|
|
40311
|
+
break;
|
|
40312
|
+
}
|
|
40313
|
+
case 'io': {
|
|
40314
|
+
enum1 = 13;
|
|
40315
|
+
break;
|
|
40316
|
+
}
|
|
40317
|
+
case 'is-directory': {
|
|
40318
|
+
enum1 = 14;
|
|
40319
|
+
break;
|
|
40320
|
+
}
|
|
40321
|
+
case 'loop': {
|
|
40322
|
+
enum1 = 15;
|
|
40323
|
+
break;
|
|
40324
|
+
}
|
|
40325
|
+
case 'too-many-links': {
|
|
40326
|
+
enum1 = 16;
|
|
40327
|
+
break;
|
|
40328
|
+
}
|
|
40329
|
+
case 'message-size': {
|
|
40330
|
+
enum1 = 17;
|
|
40331
|
+
break;
|
|
40332
|
+
}
|
|
40333
|
+
case 'name-too-long': {
|
|
40334
|
+
enum1 = 18;
|
|
40335
|
+
break;
|
|
40336
|
+
}
|
|
40337
|
+
case 'no-device': {
|
|
40338
|
+
enum1 = 19;
|
|
40339
|
+
break;
|
|
40340
|
+
}
|
|
40341
|
+
case 'no-entry': {
|
|
40342
|
+
enum1 = 20;
|
|
40343
|
+
break;
|
|
40344
|
+
}
|
|
40345
|
+
case 'no-lock': {
|
|
40346
|
+
enum1 = 21;
|
|
40347
|
+
break;
|
|
40348
|
+
}
|
|
40349
|
+
case 'insufficient-memory': {
|
|
40350
|
+
enum1 = 22;
|
|
40351
|
+
break;
|
|
40352
|
+
}
|
|
40353
|
+
case 'insufficient-space': {
|
|
40354
|
+
enum1 = 23;
|
|
40355
|
+
break;
|
|
40356
|
+
}
|
|
40357
|
+
case 'not-directory': {
|
|
40358
|
+
enum1 = 24;
|
|
40359
|
+
break;
|
|
40360
|
+
}
|
|
40361
|
+
case 'not-empty': {
|
|
40362
|
+
enum1 = 25;
|
|
40363
|
+
break;
|
|
40364
|
+
}
|
|
40365
|
+
case 'not-recoverable': {
|
|
40366
|
+
enum1 = 26;
|
|
40367
|
+
break;
|
|
40368
|
+
}
|
|
40369
|
+
case 'unsupported': {
|
|
40370
|
+
enum1 = 27;
|
|
40371
|
+
break;
|
|
40372
|
+
}
|
|
40373
|
+
case 'no-tty': {
|
|
40374
|
+
enum1 = 28;
|
|
40375
|
+
break;
|
|
40376
|
+
}
|
|
40377
|
+
case 'no-such-device': {
|
|
40378
|
+
enum1 = 29;
|
|
40379
|
+
break;
|
|
40380
|
+
}
|
|
40381
|
+
case 'overflow': {
|
|
40382
|
+
enum1 = 30;
|
|
40383
|
+
break;
|
|
40384
|
+
}
|
|
40385
|
+
case 'not-permitted': {
|
|
40386
|
+
enum1 = 31;
|
|
40387
|
+
break;
|
|
40388
|
+
}
|
|
40389
|
+
case 'pipe': {
|
|
40390
|
+
enum1 = 32;
|
|
40391
|
+
break;
|
|
40392
|
+
}
|
|
40393
|
+
case 'read-only': {
|
|
40394
|
+
enum1 = 33;
|
|
40395
|
+
break;
|
|
40396
|
+
}
|
|
40397
|
+
case 'invalid-seek': {
|
|
40398
|
+
enum1 = 34;
|
|
40399
|
+
break;
|
|
40400
|
+
}
|
|
40401
|
+
case 'text-file-busy': {
|
|
40402
|
+
enum1 = 35;
|
|
40403
|
+
break;
|
|
40404
|
+
}
|
|
40405
|
+
case 'cross-device': {
|
|
40406
|
+
enum1 = 36;
|
|
40407
|
+
break;
|
|
40408
|
+
}
|
|
40409
|
+
default: {
|
|
40410
|
+
throw new TypeError(`"${val1}" is not one of the cases of error-code`);
|
|
40411
|
+
}
|
|
40412
|
+
}
|
|
40413
|
+
dataView(memory0).setInt8(arg1 + 1, enum1, true);
|
|
40414
|
+
break;
|
|
40415
|
+
}
|
|
40416
|
+
default: {
|
|
40417
|
+
throw new TypeError('invalid variant specified for result');
|
|
40418
|
+
}
|
|
40419
|
+
}
|
|
40420
|
+
}
|
|
40421
|
+
|
|
40422
|
+
function lowering9(arg0, arg1) {
|
|
40423
|
+
const ret = (0,_bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_0__/* .getRandomBytes */ .Iv)(BigInt.asUintN(64, arg0));
|
|
40424
|
+
const val0 = ret;
|
|
40425
|
+
const len0 = val0.byteLength;
|
|
40426
|
+
const ptr0 = realloc0(0, 0, 1, len0 * 1);
|
|
40427
|
+
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
40428
|
+
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
40429
|
+
dataView(memory0).setInt32(arg1 + 4, len0, true);
|
|
40430
|
+
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
40431
|
+
}
|
|
40432
|
+
|
|
40433
|
+
function lowering10(arg0) {
|
|
40434
|
+
const ret = (0,_bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_4__/* .getEnvironment */ .zj)();
|
|
40435
|
+
const vec3 = ret;
|
|
40436
|
+
const len3 = vec3.length;
|
|
40437
|
+
const result3 = realloc0(0, 0, 4, len3 * 16);
|
|
40438
|
+
for (let i = 0; i < vec3.length; i++) {
|
|
40439
|
+
const e = vec3[i];
|
|
40440
|
+
const base = result3 + i * 16;const [tuple0_0, tuple0_1] = e;
|
|
40441
|
+
const ptr1 = utf8Encode(tuple0_0, realloc0, memory0);
|
|
40442
|
+
const len1 = utf8EncodedLen;
|
|
40443
|
+
dataView(memory0).setInt32(base + 4, len1, true);
|
|
40444
|
+
dataView(memory0).setInt32(base + 0, ptr1, true);
|
|
40445
|
+
const ptr2 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
40446
|
+
const len2 = utf8EncodedLen;
|
|
40447
|
+
dataView(memory0).setInt32(base + 12, len2, true);
|
|
40448
|
+
dataView(memory0).setInt32(base + 8, ptr2, true);
|
|
40449
|
+
}
|
|
40450
|
+
dataView(memory0).setInt32(arg0 + 4, len3, true);
|
|
40451
|
+
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
40452
|
+
}
|
|
40453
|
+
|
|
40454
|
+
function lowering11(arg0, arg1, arg2, arg3) {
|
|
40455
|
+
const ptr0 = arg1;
|
|
40456
|
+
const len0 = arg2;
|
|
40457
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
40458
|
+
let ret;
|
|
40459
|
+
try {
|
|
40460
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .write */ .cW)(arg0 >>> 0, result0) };
|
|
40461
|
+
} catch (e) {
|
|
40462
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
40463
|
+
}
|
|
40464
|
+
const variant2 = ret;
|
|
40465
|
+
switch (variant2.tag) {
|
|
40466
|
+
case 'ok': {
|
|
40467
|
+
const e = variant2.val;
|
|
40468
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
40469
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
40470
|
+
break;
|
|
40471
|
+
}
|
|
40472
|
+
case 'err': {
|
|
40473
|
+
const e = variant2.val;
|
|
40474
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
40475
|
+
const { } = e;
|
|
40476
|
+
break;
|
|
40477
|
+
}
|
|
40478
|
+
default: {
|
|
40479
|
+
throw new TypeError('invalid variant specified for result');
|
|
40480
|
+
}
|
|
40481
|
+
}
|
|
40482
|
+
}
|
|
40483
|
+
|
|
40484
|
+
function lowering12(arg0, arg1, arg2, arg3) {
|
|
40485
|
+
const ptr0 = arg1;
|
|
40486
|
+
const len0 = arg2;
|
|
40487
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
40488
|
+
let ret;
|
|
40489
|
+
try {
|
|
40490
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_2__/* .blockingWrite */ .v_)(arg0 >>> 0, result0) };
|
|
40491
|
+
} catch (e) {
|
|
40492
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
40493
|
+
}
|
|
40494
|
+
const variant2 = ret;
|
|
40495
|
+
switch (variant2.tag) {
|
|
40496
|
+
case 'ok': {
|
|
40497
|
+
const e = variant2.val;
|
|
40498
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
40499
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
40500
|
+
break;
|
|
40501
|
+
}
|
|
40502
|
+
case 'err': {
|
|
40503
|
+
const e = variant2.val;
|
|
40504
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
40505
|
+
const { } = e;
|
|
40506
|
+
break;
|
|
40507
|
+
}
|
|
40508
|
+
default: {
|
|
40509
|
+
throw new TypeError('invalid variant specified for result');
|
|
40510
|
+
}
|
|
40511
|
+
}
|
|
40512
|
+
}
|
|
40513
|
+
let exports3;
|
|
40514
|
+
let realloc1;
|
|
40515
|
+
let postReturn0;
|
|
40516
|
+
const exports = {
|
|
40517
|
+
generate(arg0, arg1) {
|
|
40518
|
+
const ptr0 = realloc1(0, 0, 4, 48);
|
|
40519
|
+
const val1 = arg0;
|
|
40520
|
+
const len1 = val1.byteLength;
|
|
40521
|
+
const ptr1 = realloc1(0, 0, 1, len1 * 1);
|
|
40522
|
+
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
40523
|
+
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
40524
|
+
dataView(memory0).setInt32(ptr0 + 4, len1, true);
|
|
40525
|
+
dataView(memory0).setInt32(ptr0 + 0, ptr1, true);
|
|
40526
|
+
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;
|
|
40527
|
+
const ptr3 = utf8Encode(v2_0, realloc1, memory0);
|
|
40528
|
+
const len3 = utf8EncodedLen;
|
|
40529
|
+
dataView(memory0).setInt32(ptr0 + 12, len3, true);
|
|
40530
|
+
dataView(memory0).setInt32(ptr0 + 8, ptr3, true);
|
|
40531
|
+
const variant4 = v2_1;
|
|
40532
|
+
if (variant4 === null || variant4=== undefined) {
|
|
40533
|
+
dataView(memory0).setInt8(ptr0 + 16, 0, true);
|
|
40534
|
+
} else {
|
|
40535
|
+
const e = variant4;
|
|
40536
|
+
dataView(memory0).setInt8(ptr0 + 16, 1, true);
|
|
40537
|
+
dataView(memory0).setInt8(ptr0 + 17, e ? 1 : 0, true);
|
|
40538
|
+
}
|
|
40539
|
+
const variant5 = v2_2;
|
|
40540
|
+
if (variant5 === null || variant5=== undefined) {
|
|
40541
|
+
dataView(memory0).setInt8(ptr0 + 18, 0, true);
|
|
40542
|
+
} else {
|
|
40543
|
+
const e = variant5;
|
|
40544
|
+
dataView(memory0).setInt8(ptr0 + 18, 1, true);
|
|
40545
|
+
dataView(memory0).setInt8(ptr0 + 19, e ? 1 : 0, true);
|
|
40546
|
+
}
|
|
40547
|
+
const variant10 = v2_3;
|
|
40548
|
+
if (variant10 === null || variant10=== undefined) {
|
|
40549
|
+
dataView(memory0).setInt8(ptr0 + 20, 0, true);
|
|
40550
|
+
} else {
|
|
40551
|
+
const e = variant10;
|
|
40552
|
+
dataView(memory0).setInt8(ptr0 + 20, 1, true);
|
|
40553
|
+
const vec9 = e;
|
|
40554
|
+
const len9 = vec9.length;
|
|
40555
|
+
const result9 = realloc1(0, 0, 4, len9 * 16);
|
|
40556
|
+
for (let i = 0; i < vec9.length; i++) {
|
|
40557
|
+
const e = vec9[i];
|
|
40558
|
+
const base = result9 + i * 16;const [tuple6_0, tuple6_1] = e;
|
|
40559
|
+
const ptr7 = utf8Encode(tuple6_0, realloc1, memory0);
|
|
40560
|
+
const len7 = utf8EncodedLen;
|
|
40561
|
+
dataView(memory0).setInt32(base + 4, len7, true);
|
|
40562
|
+
dataView(memory0).setInt32(base + 0, ptr7, true);
|
|
40563
|
+
const ptr8 = utf8Encode(tuple6_1, realloc1, memory0);
|
|
40564
|
+
const len8 = utf8EncodedLen;
|
|
40565
|
+
dataView(memory0).setInt32(base + 12, len8, true);
|
|
40566
|
+
dataView(memory0).setInt32(base + 8, ptr8, true);
|
|
40567
|
+
}
|
|
40568
|
+
dataView(memory0).setInt32(ptr0 + 28, len9, true);
|
|
40569
|
+
dataView(memory0).setInt32(ptr0 + 24, result9, true);
|
|
40570
|
+
}
|
|
40571
|
+
const variant11 = v2_4;
|
|
40572
|
+
if (variant11 === null || variant11=== undefined) {
|
|
40573
|
+
dataView(memory0).setInt8(ptr0 + 32, 0, true);
|
|
40574
|
+
} else {
|
|
40575
|
+
const e = variant11;
|
|
40576
|
+
dataView(memory0).setInt8(ptr0 + 32, 1, true);
|
|
40577
|
+
dataView(memory0).setInt8(ptr0 + 33, e ? 1 : 0, true);
|
|
40578
|
+
}
|
|
40579
|
+
const variant12 = v2_5;
|
|
40580
|
+
if (variant12 === null || variant12=== undefined) {
|
|
40581
|
+
dataView(memory0).setInt8(ptr0 + 34, 0, true);
|
|
40582
|
+
} else {
|
|
40583
|
+
const e = variant12;
|
|
40584
|
+
dataView(memory0).setInt8(ptr0 + 34, 1, true);
|
|
40585
|
+
dataView(memory0).setInt8(ptr0 + 35, e ? 1 : 0, true);
|
|
40586
|
+
}
|
|
40587
|
+
const variant13 = v2_6;
|
|
40588
|
+
if (variant13 === null || variant13=== undefined) {
|
|
40589
|
+
dataView(memory0).setInt8(ptr0 + 36, 0, true);
|
|
40590
|
+
} else {
|
|
40591
|
+
const e = variant13;
|
|
40592
|
+
dataView(memory0).setInt8(ptr0 + 36, 1, true);
|
|
40593
|
+
dataView(memory0).setInt32(ptr0 + 40, toUint32(e), true);
|
|
40594
|
+
}
|
|
40595
|
+
const variant14 = v2_7;
|
|
40596
|
+
if (variant14 === null || variant14=== undefined) {
|
|
40597
|
+
dataView(memory0).setInt8(ptr0 + 44, 0, true);
|
|
40598
|
+
} else {
|
|
40599
|
+
const e = variant14;
|
|
40600
|
+
dataView(memory0).setInt8(ptr0 + 44, 1, true);
|
|
40601
|
+
dataView(memory0).setInt8(ptr0 + 45, e ? 1 : 0, true);
|
|
40602
|
+
}
|
|
40603
|
+
const variant15 = v2_8;
|
|
40604
|
+
if (variant15 === null || variant15=== undefined) {
|
|
40605
|
+
dataView(memory0).setInt8(ptr0 + 46, 0, true);
|
|
40606
|
+
} else {
|
|
40607
|
+
const e = variant15;
|
|
40608
|
+
dataView(memory0).setInt8(ptr0 + 46, 1, true);
|
|
40609
|
+
dataView(memory0).setInt8(ptr0 + 47, e ? 1 : 0, true);
|
|
40610
|
+
}
|
|
40611
|
+
const ret = exports1['exports#generate'](ptr0);
|
|
40612
|
+
let variant25;
|
|
40613
|
+
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
40614
|
+
case 0: {
|
|
40615
|
+
const len18 = dataView(memory0).getInt32(ret + 8, true);
|
|
40616
|
+
const base18 = dataView(memory0).getInt32(ret + 4, true);
|
|
40617
|
+
const result18 = [];
|
|
40618
|
+
for (let i = 0; i < len18; i++) {
|
|
40619
|
+
const base = base18 + i * 16;
|
|
40620
|
+
const ptr16 = dataView(memory0).getInt32(base + 0, true);
|
|
40621
|
+
const len16 = dataView(memory0).getInt32(base + 4, true);
|
|
40622
|
+
const result16 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr16, len16));
|
|
40623
|
+
const ptr17 = dataView(memory0).getInt32(base + 8, true);
|
|
40624
|
+
const len17 = dataView(memory0).getInt32(base + 12, true);
|
|
40625
|
+
const result17 = new Uint8Array(memory0.buffer.slice(ptr17, ptr17 + len17 * 1));
|
|
40626
|
+
result18.push([result16, result17]);
|
|
40627
|
+
}
|
|
40628
|
+
const len20 = dataView(memory0).getInt32(ret + 16, true);
|
|
40629
|
+
const base20 = dataView(memory0).getInt32(ret + 12, true);
|
|
40630
|
+
const result20 = [];
|
|
40631
|
+
for (let i = 0; i < len20; i++) {
|
|
40632
|
+
const base = base20 + i * 8;
|
|
40633
|
+
const ptr19 = dataView(memory0).getInt32(base + 0, true);
|
|
40634
|
+
const len19 = dataView(memory0).getInt32(base + 4, true);
|
|
40635
|
+
const result19 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr19, len19));
|
|
40636
|
+
result20.push(result19);
|
|
40637
|
+
}
|
|
40638
|
+
const len23 = dataView(memory0).getInt32(ret + 24, true);
|
|
40639
|
+
const base23 = dataView(memory0).getInt32(ret + 20, true);
|
|
40640
|
+
const result23 = [];
|
|
40641
|
+
for (let i = 0; i < len23; i++) {
|
|
40642
|
+
const base = base23 + i * 12;
|
|
40643
|
+
const ptr21 = dataView(memory0).getInt32(base + 0, true);
|
|
40644
|
+
const len21 = dataView(memory0).getInt32(base + 4, true);
|
|
40645
|
+
const result21 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr21, len21));
|
|
40646
|
+
let enum22;
|
|
40647
|
+
switch (dataView(memory0).getUint8(base + 8, true)) {
|
|
40648
|
+
case 0: {
|
|
40649
|
+
enum22 = 'function';
|
|
40650
|
+
break;
|
|
40651
|
+
}
|
|
40652
|
+
case 1: {
|
|
40653
|
+
enum22 = 'instance';
|
|
40654
|
+
break;
|
|
40655
|
+
}
|
|
40656
|
+
default: {
|
|
40657
|
+
throw new TypeError('invalid discriminant specified for ExportType');
|
|
40658
|
+
}
|
|
40659
|
+
}
|
|
40660
|
+
result23.push([result21, enum22]);
|
|
40661
|
+
}
|
|
40662
|
+
variant25= {
|
|
40663
|
+
tag: 'ok',
|
|
40664
|
+
val: {
|
|
40665
|
+
files: result18,
|
|
40666
|
+
imports: result20,
|
|
40667
|
+
exports: result23,
|
|
40668
|
+
}
|
|
40669
|
+
};
|
|
40670
|
+
break;
|
|
40671
|
+
}
|
|
40672
|
+
case 1: {
|
|
40673
|
+
const ptr24 = dataView(memory0).getInt32(ret + 4, true);
|
|
40674
|
+
const len24 = dataView(memory0).getInt32(ret + 8, true);
|
|
40675
|
+
const result24 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr24, len24));
|
|
40676
|
+
variant25= {
|
|
40677
|
+
tag: 'err',
|
|
40678
|
+
val: result24
|
|
40679
|
+
};
|
|
40680
|
+
break;
|
|
40681
|
+
}
|
|
40682
|
+
default: {
|
|
40683
|
+
throw new TypeError('invalid variant discriminant for expected');
|
|
40684
|
+
}
|
|
40685
|
+
}
|
|
40686
|
+
postReturn0(ret);
|
|
40687
|
+
if (variant25.tag === 'err') {
|
|
40688
|
+
throw new ComponentError(variant25.val);
|
|
40689
|
+
}
|
|
40690
|
+
return variant25.val;
|
|
40691
|
+
},
|
|
40692
|
+
|
|
40693
|
+
};
|
|
40694
|
+
|
|
40695
|
+
|
|
40696
|
+
|
|
40697
|
+
const $init = (async() => {
|
|
40698
|
+
const module0 = fetchCompile(__nccwpck_require__.ab + "js-component-bindgen-component.core.wasm");
|
|
40699
|
+
const module1 = fetchCompile(__nccwpck_require__.ab + "js-component-bindgen-component.core2.wasm");
|
|
40700
|
+
const module2 = base64Compile('AGFzbQEAAAABKAdgAX8AYAJ/fwBgAn5/AGAEf39/fwBgBH9/f38Bf2ACf38Bf2ABfwADDQwAAAECAAMDBAUFBQYEBQFwAQwMBz4NATAAAAExAAEBMgACATMAAwE0AAQBNQAFATYABgE3AAcBOAAIATkACQIxMAAKAjExAAsIJGltcG9ydHMBAAqVAQwJACAAQQARAAALCQAgAEEBEQAACwsAIAAgAUECEQEACwsAIAAgAUEDEQIACwkAIABBBBEAAAsPACAAIAEgAiADQQURAwALDwAgACABIAIgA0EGEQMACw8AIAAgASACIANBBxEEAAsLACAAIAFBCBEFAAsLACAAIAFBCREFAAsLACAAIAFBChEFAAsJACAAQQsRBgALAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjIAzwMEbmFtZQATEndpdC1jb21wb25lbnQ6c2hpbQGyAwwAG2luZGlyZWN0LXByZW9wZW5zLWdldC1zdGRpbwEhaW5kaXJlY3QtcHJlb3BlbnMtZ2V0LWRpcmVjdG9yaWVzAhxpbmRpcmVjdC1maWxlc3lzdGVtLWdldC10eXBlAyBpbmRpcmVjdC1yYW5kb20tZ2V0LXJhbmRvbS1ieXRlcwQkaW5kaXJlY3QtZW52aXJvbm1lbnQtZ2V0LWVudmlyb25tZW50BRZpbmRpcmVjdC1zdHJlYW1zLXdyaXRlBh9pbmRpcmVjdC1zdHJlYW1zLWJsb2NraW5nLXdyaXRlByVhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3dyaXRlCCdhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLXJhbmRvbV9nZXQJKGFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9nZXQKLmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtZW52aXJvbl9zaXplc19nZXQLJmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtcHJvY19leGl0');
|
|
40701
|
+
const module3 = base64Compile('AGFzbQEAAAABKAdgAX8AYAJ/fwBgAn5/AGAEf39/fwBgBH9/f38Bf2ACf38Bf2ABfwACTg0AATAAAAABMQAAAAEyAAEAATMAAgABNAAAAAE1AAMAATYAAwABNwAEAAE4AAUAATkABQACMTAABQACMTEABgAIJGltcG9ydHMBcAEMDAkSAQBBAAsMAAECAwQFBgcICQoLAC0JcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkBDXdpdC1jb21wb25lbnQFMC44LjIAHARuYW1lABUUd2l0LWNvbXBvbmVudDpmaXh1cHM');
|
|
40702
|
+
Promise.all([module0, module1, module2, module3]).catch(() => {});
|
|
40703
|
+
({ exports: exports0 } = await instantiateCore(await module2));
|
|
40704
|
+
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
40705
|
+
wasi_snapshot_preview1: {
|
|
40706
|
+
environ_get: exports0['9'],
|
|
40707
|
+
environ_sizes_get: exports0['10'],
|
|
40708
|
+
fd_write: exports0['7'],
|
|
40709
|
+
proc_exit: exports0['11'],
|
|
40710
|
+
random_get: exports0['8'],
|
|
40711
|
+
},
|
|
40712
|
+
}));
|
|
40713
|
+
({ exports: exports2 } = await instantiateCore(await module1, {
|
|
40714
|
+
__main_module__: {
|
|
40715
|
+
cabi_realloc: exports1.cabi_realloc,
|
|
40716
|
+
},
|
|
40717
|
+
env: {
|
|
40718
|
+
memory: exports1.memory,
|
|
40719
|
+
},
|
|
40720
|
+
environment: {
|
|
40721
|
+
'get-environment': exports0['4'],
|
|
40722
|
+
},
|
|
40723
|
+
exit: {
|
|
40724
|
+
exit: lowering3,
|
|
40725
|
+
},
|
|
40726
|
+
filesystem: {
|
|
40727
|
+
'append-via-stream': lowering1,
|
|
40728
|
+
'drop-descriptor': lowering2,
|
|
40729
|
+
'get-type': exports0['2'],
|
|
40730
|
+
'write-via-stream': lowering0,
|
|
40731
|
+
},
|
|
40732
|
+
preopens: {
|
|
40733
|
+
'get-directories': exports0['1'],
|
|
40734
|
+
'get-stdio': exports0['0'],
|
|
40735
|
+
},
|
|
40736
|
+
random: {
|
|
40737
|
+
'get-random-bytes': exports0['3'],
|
|
40738
|
+
},
|
|
40739
|
+
streams: {
|
|
40740
|
+
'blocking-write': exports0['6'],
|
|
40741
|
+
'drop-input-stream': lowering4,
|
|
40742
|
+
'drop-output-stream': lowering5,
|
|
40743
|
+
write: exports0['5'],
|
|
40744
|
+
},
|
|
40745
|
+
}));
|
|
40746
|
+
memory0 = exports1.memory;
|
|
40747
|
+
realloc0 = exports2.cabi_import_realloc;
|
|
40748
|
+
({ exports: exports3 } = await instantiateCore(await module3, {
|
|
40749
|
+
'': {
|
|
40750
|
+
$imports: exports0.$imports,
|
|
40751
|
+
'0': lowering6,
|
|
40752
|
+
'1': lowering7,
|
|
40753
|
+
'10': exports2.environ_sizes_get,
|
|
40754
|
+
'11': exports2.proc_exit,
|
|
40755
|
+
'2': lowering8,
|
|
40756
|
+
'3': lowering9,
|
|
40757
|
+
'4': lowering10,
|
|
40758
|
+
'5': lowering11,
|
|
40759
|
+
'6': lowering12,
|
|
40760
|
+
'7': exports2.fd_write,
|
|
40761
|
+
'8': exports2.random_get,
|
|
40762
|
+
'9': exports2.environ_get,
|
|
40763
|
+
},
|
|
40764
|
+
}));
|
|
40765
|
+
realloc1 = exports1.cabi_realloc;
|
|
40766
|
+
postReturn0 = exports1['cabi_post_exports#generate'];
|
|
40767
|
+
})();
|
|
40768
|
+
|
|
40769
|
+
await $init;
|
|
40770
|
+
|
|
40771
|
+
__webpack_async_result__();
|
|
40772
|
+
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
40773
|
+
|
|
40774
|
+
/***/ }),
|
|
40775
|
+
|
|
40776
|
+
/***/ 8980:
|
|
40777
|
+
/***/ ((__webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
40778
|
+
|
|
40779
|
+
__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
40780
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
40781
|
+
/* harmony export */ "I": () => (/* binding */ exports)
|
|
40782
|
+
/* harmony export */ });
|
|
40783
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(5331);
|
|
40784
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(7393);
|
|
40785
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(8576);
|
|
40786
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9187);
|
|
40787
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(9213);
|
|
40788
|
+
/* harmony import */ var _bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(833);
|
|
40789
|
+
|
|
40790
|
+
|
|
40791
|
+
|
|
40792
|
+
|
|
40793
|
+
|
|
40794
|
+
|
|
40795
|
+
|
|
40796
|
+
const base64Compile = str => WebAssembly.compile(typeof Buffer !== 'undefined' ? Buffer.from(str, 'base64') : Uint8Array.from(atob(str), b => b.charCodeAt(0)));
|
|
40369
40797
|
|
|
40370
40798
|
class ComponentError extends Error {
|
|
40371
40799
|
constructor (value) {
|
|
@@ -40375,10 +40803,8 @@ class ComponentError extends Error {
|
|
|
40375
40803
|
}
|
|
40376
40804
|
}
|
|
40377
40805
|
|
|
40378
|
-
|
|
40379
|
-
|
|
40380
|
-
return String(val);
|
|
40381
|
-
}
|
|
40806
|
+
let dv = new DataView(new ArrayBuffer());
|
|
40807
|
+
const dataView = mem => dv.buffer === mem.buffer ? dv : dv = new DataView(mem.buffer);
|
|
40382
40808
|
|
|
40383
40809
|
const isNode = typeof process !== 'undefined' && process.versions && process.versions.node;
|
|
40384
40810
|
let _fs;
|
|
@@ -40390,25 +40816,987 @@ async function fetchCompile (url) {
|
|
|
40390
40816
|
return fetch(url).then(WebAssembly.compileStreaming);
|
|
40391
40817
|
}
|
|
40392
40818
|
|
|
40393
|
-
|
|
40819
|
+
function getErrorPayload(e) {
|
|
40820
|
+
if (hasOwnProperty.call(e, 'payload')) return e.payload;
|
|
40821
|
+
if (hasOwnProperty.call(e, 'message')) return String(e.message);
|
|
40822
|
+
return String(e);
|
|
40823
|
+
}
|
|
40824
|
+
|
|
40825
|
+
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
40826
|
+
|
|
40827
|
+
const instantiateCore = WebAssembly.instantiate;
|
|
40828
|
+
|
|
40829
|
+
const toUint64 = val => BigInt.asUintN(64, val);
|
|
40830
|
+
|
|
40831
|
+
function toString(val) {
|
|
40832
|
+
if (typeof val === 'symbol') throw new TypeError('symbols cannot be converted to strings');
|
|
40833
|
+
return String(val);
|
|
40834
|
+
}
|
|
40835
|
+
|
|
40836
|
+
function toUint32(val) {
|
|
40837
|
+
return val >>> 0;
|
|
40838
|
+
}
|
|
40839
|
+
|
|
40840
|
+
const utf8Decoder = new TextDecoder();
|
|
40841
|
+
|
|
40842
|
+
const utf8Encoder = new TextEncoder();
|
|
40843
|
+
|
|
40844
|
+
let utf8EncodedLen = 0;
|
|
40845
|
+
function utf8Encode(s, realloc, memory) {
|
|
40846
|
+
if (typeof s !== 'string') throw new TypeError('expected a string');
|
|
40847
|
+
if (s.length === 0) {
|
|
40848
|
+
utf8EncodedLen = 0;
|
|
40849
|
+
return 1;
|
|
40850
|
+
}
|
|
40851
|
+
let allocLen = 0;
|
|
40852
|
+
let ptr = 0;
|
|
40853
|
+
let writtenTotal = 0;
|
|
40854
|
+
while (s.length > 0) {
|
|
40855
|
+
ptr = realloc(ptr, allocLen, 1, allocLen + s.length);
|
|
40856
|
+
allocLen += s.length;
|
|
40857
|
+
const { read, written } = utf8Encoder.encodeInto(
|
|
40858
|
+
s,
|
|
40859
|
+
new Uint8Array(memory.buffer, ptr + writtenTotal, allocLen - writtenTotal),
|
|
40860
|
+
);
|
|
40861
|
+
writtenTotal += written;
|
|
40862
|
+
s = s.slice(read);
|
|
40863
|
+
}
|
|
40864
|
+
if (allocLen > writtenTotal)
|
|
40865
|
+
ptr = realloc(ptr, allocLen, 1, writtenTotal);
|
|
40866
|
+
utf8EncodedLen = writtenTotal;
|
|
40867
|
+
return ptr;
|
|
40868
|
+
}
|
|
40394
40869
|
|
|
40395
40870
|
let exports0;
|
|
40396
40871
|
let exports1;
|
|
40397
|
-
let memory0;
|
|
40398
40872
|
|
|
40399
|
-
function lowering0(arg0
|
|
40400
|
-
|
|
40401
|
-
|
|
40402
|
-
|
|
40403
|
-
|
|
40873
|
+
function lowering0(arg0) {
|
|
40874
|
+
(0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .dropDirectoryEntryStream */ .h1)(arg0 >>> 0);
|
|
40875
|
+
}
|
|
40876
|
+
|
|
40877
|
+
function lowering1(arg0, arg1) {
|
|
40878
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .readViaStream */ .wF)(arg0 >>> 0, BigInt.asUintN(64, arg1));
|
|
40879
|
+
return toUint32(ret);
|
|
40880
|
+
}
|
|
40881
|
+
|
|
40882
|
+
function lowering2(arg0, arg1) {
|
|
40883
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .writeViaStream */ .Zw)(arg0 >>> 0, BigInt.asUintN(64, arg1));
|
|
40884
|
+
return toUint32(ret);
|
|
40885
|
+
}
|
|
40886
|
+
|
|
40887
|
+
function lowering3(arg0) {
|
|
40888
|
+
const ret = (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .appendViaStream */ .Tk)(arg0 >>> 0);
|
|
40889
|
+
return toUint32(ret);
|
|
40890
|
+
}
|
|
40891
|
+
|
|
40892
|
+
function lowering4(arg0) {
|
|
40893
|
+
(0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .dropDescriptor */ .Lk)(arg0 >>> 0);
|
|
40894
|
+
}
|
|
40895
|
+
|
|
40896
|
+
function lowering5(arg0) {
|
|
40897
|
+
let variant0;
|
|
40898
|
+
switch (arg0) {
|
|
40899
|
+
case 0: {
|
|
40900
|
+
variant0= {
|
|
40901
|
+
tag: 'ok',
|
|
40902
|
+
val: undefined
|
|
40903
|
+
};
|
|
40904
|
+
break;
|
|
40905
|
+
}
|
|
40906
|
+
case 1: {
|
|
40907
|
+
variant0= {
|
|
40908
|
+
tag: 'err',
|
|
40909
|
+
val: undefined
|
|
40910
|
+
};
|
|
40911
|
+
break;
|
|
40912
|
+
}
|
|
40913
|
+
default: {
|
|
40914
|
+
throw new TypeError('invalid variant discriminant for expected');
|
|
40915
|
+
}
|
|
40916
|
+
}
|
|
40917
|
+
(0,_bytecodealliance_preview2_shim_exit__WEBPACK_IMPORTED_MODULE_5__/* .exit */ .J)(variant0);
|
|
40918
|
+
}
|
|
40919
|
+
|
|
40920
|
+
function lowering6(arg0) {
|
|
40921
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .dropInputStream */ .dU)(arg0 >>> 0);
|
|
40922
|
+
}
|
|
40923
|
+
|
|
40924
|
+
function lowering7(arg0) {
|
|
40925
|
+
(0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .dropOutputStream */ .oc)(arg0 >>> 0);
|
|
40404
40926
|
}
|
|
40405
40927
|
let exports2;
|
|
40928
|
+
let memory0;
|
|
40929
|
+
|
|
40930
|
+
function lowering8(arg0) {
|
|
40931
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_4__/* .getStdio */ .vT)();
|
|
40932
|
+
const {stdin: v0_0, stdout: v0_1, stderr: v0_2 } = ret;
|
|
40933
|
+
dataView(memory0).setInt32(arg0 + 0, toUint32(v0_0), true);
|
|
40934
|
+
dataView(memory0).setInt32(arg0 + 4, toUint32(v0_1), true);
|
|
40935
|
+
dataView(memory0).setInt32(arg0 + 8, toUint32(v0_2), true);
|
|
40936
|
+
}
|
|
40406
40937
|
let realloc0;
|
|
40938
|
+
|
|
40939
|
+
function lowering9(arg0) {
|
|
40940
|
+
const ret = (0,_bytecodealliance_preview2_shim_preopens__WEBPACK_IMPORTED_MODULE_4__/* .getDirectories */ .$z)();
|
|
40941
|
+
const vec2 = ret;
|
|
40942
|
+
const len2 = vec2.length;
|
|
40943
|
+
const result2 = realloc0(0, 0, 4, len2 * 12);
|
|
40944
|
+
for (let i = 0; i < vec2.length; i++) {
|
|
40945
|
+
const e = vec2[i];
|
|
40946
|
+
const base = result2 + i * 12;const [tuple0_0, tuple0_1] = e;
|
|
40947
|
+
dataView(memory0).setInt32(base + 0, toUint32(tuple0_0), true);
|
|
40948
|
+
const ptr1 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
40949
|
+
const len1 = utf8EncodedLen;
|
|
40950
|
+
dataView(memory0).setInt32(base + 8, len1, true);
|
|
40951
|
+
dataView(memory0).setInt32(base + 4, ptr1, true);
|
|
40952
|
+
}
|
|
40953
|
+
dataView(memory0).setInt32(arg0 + 4, len2, true);
|
|
40954
|
+
dataView(memory0).setInt32(arg0 + 0, result2, true);
|
|
40955
|
+
}
|
|
40956
|
+
|
|
40957
|
+
function lowering10(arg0, arg1) {
|
|
40958
|
+
let ret;
|
|
40959
|
+
try {
|
|
40960
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .getType */ .oL)(arg0 >>> 0) };
|
|
40961
|
+
} catch (e) {
|
|
40962
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
40963
|
+
}
|
|
40964
|
+
const variant2 = ret;
|
|
40965
|
+
switch (variant2.tag) {
|
|
40966
|
+
case 'ok': {
|
|
40967
|
+
const e = variant2.val;
|
|
40968
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
40969
|
+
const val0 = toString(e);
|
|
40970
|
+
let enum0;
|
|
40971
|
+
switch (val0) {
|
|
40972
|
+
case 'unknown': {
|
|
40973
|
+
enum0 = 0;
|
|
40974
|
+
break;
|
|
40975
|
+
}
|
|
40976
|
+
case 'block-device': {
|
|
40977
|
+
enum0 = 1;
|
|
40978
|
+
break;
|
|
40979
|
+
}
|
|
40980
|
+
case 'character-device': {
|
|
40981
|
+
enum0 = 2;
|
|
40982
|
+
break;
|
|
40983
|
+
}
|
|
40984
|
+
case 'directory': {
|
|
40985
|
+
enum0 = 3;
|
|
40986
|
+
break;
|
|
40987
|
+
}
|
|
40988
|
+
case 'fifo': {
|
|
40989
|
+
enum0 = 4;
|
|
40990
|
+
break;
|
|
40991
|
+
}
|
|
40992
|
+
case 'symbolic-link': {
|
|
40993
|
+
enum0 = 5;
|
|
40994
|
+
break;
|
|
40995
|
+
}
|
|
40996
|
+
case 'regular-file': {
|
|
40997
|
+
enum0 = 6;
|
|
40998
|
+
break;
|
|
40999
|
+
}
|
|
41000
|
+
case 'socket': {
|
|
41001
|
+
enum0 = 7;
|
|
41002
|
+
break;
|
|
41003
|
+
}
|
|
41004
|
+
default: {
|
|
41005
|
+
throw new TypeError(`"${val0}" is not one of the cases of descriptor-type`);
|
|
41006
|
+
}
|
|
41007
|
+
}
|
|
41008
|
+
dataView(memory0).setInt8(arg1 + 1, enum0, true);
|
|
41009
|
+
break;
|
|
41010
|
+
}
|
|
41011
|
+
case 'err': {
|
|
41012
|
+
const e = variant2.val;
|
|
41013
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
41014
|
+
const val1 = toString(e);
|
|
41015
|
+
let enum1;
|
|
41016
|
+
switch (val1) {
|
|
41017
|
+
case 'access': {
|
|
41018
|
+
enum1 = 0;
|
|
41019
|
+
break;
|
|
41020
|
+
}
|
|
41021
|
+
case 'would-block': {
|
|
41022
|
+
enum1 = 1;
|
|
41023
|
+
break;
|
|
41024
|
+
}
|
|
41025
|
+
case 'already': {
|
|
41026
|
+
enum1 = 2;
|
|
41027
|
+
break;
|
|
41028
|
+
}
|
|
41029
|
+
case 'bad-descriptor': {
|
|
41030
|
+
enum1 = 3;
|
|
41031
|
+
break;
|
|
41032
|
+
}
|
|
41033
|
+
case 'busy': {
|
|
41034
|
+
enum1 = 4;
|
|
41035
|
+
break;
|
|
41036
|
+
}
|
|
41037
|
+
case 'deadlock': {
|
|
41038
|
+
enum1 = 5;
|
|
41039
|
+
break;
|
|
41040
|
+
}
|
|
41041
|
+
case 'quota': {
|
|
41042
|
+
enum1 = 6;
|
|
41043
|
+
break;
|
|
41044
|
+
}
|
|
41045
|
+
case 'exist': {
|
|
41046
|
+
enum1 = 7;
|
|
41047
|
+
break;
|
|
41048
|
+
}
|
|
41049
|
+
case 'file-too-large': {
|
|
41050
|
+
enum1 = 8;
|
|
41051
|
+
break;
|
|
41052
|
+
}
|
|
41053
|
+
case 'illegal-byte-sequence': {
|
|
41054
|
+
enum1 = 9;
|
|
41055
|
+
break;
|
|
41056
|
+
}
|
|
41057
|
+
case 'in-progress': {
|
|
41058
|
+
enum1 = 10;
|
|
41059
|
+
break;
|
|
41060
|
+
}
|
|
41061
|
+
case 'interrupted': {
|
|
41062
|
+
enum1 = 11;
|
|
41063
|
+
break;
|
|
41064
|
+
}
|
|
41065
|
+
case 'invalid': {
|
|
41066
|
+
enum1 = 12;
|
|
41067
|
+
break;
|
|
41068
|
+
}
|
|
41069
|
+
case 'io': {
|
|
41070
|
+
enum1 = 13;
|
|
41071
|
+
break;
|
|
41072
|
+
}
|
|
41073
|
+
case 'is-directory': {
|
|
41074
|
+
enum1 = 14;
|
|
41075
|
+
break;
|
|
41076
|
+
}
|
|
41077
|
+
case 'loop': {
|
|
41078
|
+
enum1 = 15;
|
|
41079
|
+
break;
|
|
41080
|
+
}
|
|
41081
|
+
case 'too-many-links': {
|
|
41082
|
+
enum1 = 16;
|
|
41083
|
+
break;
|
|
41084
|
+
}
|
|
41085
|
+
case 'message-size': {
|
|
41086
|
+
enum1 = 17;
|
|
41087
|
+
break;
|
|
41088
|
+
}
|
|
41089
|
+
case 'name-too-long': {
|
|
41090
|
+
enum1 = 18;
|
|
41091
|
+
break;
|
|
41092
|
+
}
|
|
41093
|
+
case 'no-device': {
|
|
41094
|
+
enum1 = 19;
|
|
41095
|
+
break;
|
|
41096
|
+
}
|
|
41097
|
+
case 'no-entry': {
|
|
41098
|
+
enum1 = 20;
|
|
41099
|
+
break;
|
|
41100
|
+
}
|
|
41101
|
+
case 'no-lock': {
|
|
41102
|
+
enum1 = 21;
|
|
41103
|
+
break;
|
|
41104
|
+
}
|
|
41105
|
+
case 'insufficient-memory': {
|
|
41106
|
+
enum1 = 22;
|
|
41107
|
+
break;
|
|
41108
|
+
}
|
|
41109
|
+
case 'insufficient-space': {
|
|
41110
|
+
enum1 = 23;
|
|
41111
|
+
break;
|
|
41112
|
+
}
|
|
41113
|
+
case 'not-directory': {
|
|
41114
|
+
enum1 = 24;
|
|
41115
|
+
break;
|
|
41116
|
+
}
|
|
41117
|
+
case 'not-empty': {
|
|
41118
|
+
enum1 = 25;
|
|
41119
|
+
break;
|
|
41120
|
+
}
|
|
41121
|
+
case 'not-recoverable': {
|
|
41122
|
+
enum1 = 26;
|
|
41123
|
+
break;
|
|
41124
|
+
}
|
|
41125
|
+
case 'unsupported': {
|
|
41126
|
+
enum1 = 27;
|
|
41127
|
+
break;
|
|
41128
|
+
}
|
|
41129
|
+
case 'no-tty': {
|
|
41130
|
+
enum1 = 28;
|
|
41131
|
+
break;
|
|
41132
|
+
}
|
|
41133
|
+
case 'no-such-device': {
|
|
41134
|
+
enum1 = 29;
|
|
41135
|
+
break;
|
|
41136
|
+
}
|
|
41137
|
+
case 'overflow': {
|
|
41138
|
+
enum1 = 30;
|
|
41139
|
+
break;
|
|
41140
|
+
}
|
|
41141
|
+
case 'not-permitted': {
|
|
41142
|
+
enum1 = 31;
|
|
41143
|
+
break;
|
|
41144
|
+
}
|
|
41145
|
+
case 'pipe': {
|
|
41146
|
+
enum1 = 32;
|
|
41147
|
+
break;
|
|
41148
|
+
}
|
|
41149
|
+
case 'read-only': {
|
|
41150
|
+
enum1 = 33;
|
|
41151
|
+
break;
|
|
41152
|
+
}
|
|
41153
|
+
case 'invalid-seek': {
|
|
41154
|
+
enum1 = 34;
|
|
41155
|
+
break;
|
|
41156
|
+
}
|
|
41157
|
+
case 'text-file-busy': {
|
|
41158
|
+
enum1 = 35;
|
|
41159
|
+
break;
|
|
41160
|
+
}
|
|
41161
|
+
case 'cross-device': {
|
|
41162
|
+
enum1 = 36;
|
|
41163
|
+
break;
|
|
41164
|
+
}
|
|
41165
|
+
default: {
|
|
41166
|
+
throw new TypeError(`"${val1}" is not one of the cases of error-code`);
|
|
41167
|
+
}
|
|
41168
|
+
}
|
|
41169
|
+
dataView(memory0).setInt8(arg1 + 1, enum1, true);
|
|
41170
|
+
break;
|
|
41171
|
+
}
|
|
41172
|
+
default: {
|
|
41173
|
+
throw new TypeError('invalid variant specified for result');
|
|
41174
|
+
}
|
|
41175
|
+
}
|
|
41176
|
+
}
|
|
41177
|
+
|
|
41178
|
+
function lowering11(arg0, arg1) {
|
|
41179
|
+
let ret;
|
|
41180
|
+
try {
|
|
41181
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .stat */ .lz)(arg0 >>> 0) };
|
|
41182
|
+
} catch (e) {
|
|
41183
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
41184
|
+
}
|
|
41185
|
+
const variant6 = ret;
|
|
41186
|
+
switch (variant6.tag) {
|
|
41187
|
+
case 'ok': {
|
|
41188
|
+
const e = variant6.val;
|
|
41189
|
+
dataView(memory0).setInt8(arg1 + 0, 0, true);
|
|
41190
|
+
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;
|
|
41191
|
+
dataView(memory0).setBigInt64(arg1 + 8, toUint64(v0_0), true);
|
|
41192
|
+
dataView(memory0).setBigInt64(arg1 + 16, toUint64(v0_1), true);
|
|
41193
|
+
const val1 = toString(v0_2);
|
|
41194
|
+
let enum1;
|
|
41195
|
+
switch (val1) {
|
|
41196
|
+
case 'unknown': {
|
|
41197
|
+
enum1 = 0;
|
|
41198
|
+
break;
|
|
41199
|
+
}
|
|
41200
|
+
case 'block-device': {
|
|
41201
|
+
enum1 = 1;
|
|
41202
|
+
break;
|
|
41203
|
+
}
|
|
41204
|
+
case 'character-device': {
|
|
41205
|
+
enum1 = 2;
|
|
41206
|
+
break;
|
|
41207
|
+
}
|
|
41208
|
+
case 'directory': {
|
|
41209
|
+
enum1 = 3;
|
|
41210
|
+
break;
|
|
41211
|
+
}
|
|
41212
|
+
case 'fifo': {
|
|
41213
|
+
enum1 = 4;
|
|
41214
|
+
break;
|
|
41215
|
+
}
|
|
41216
|
+
case 'symbolic-link': {
|
|
41217
|
+
enum1 = 5;
|
|
41218
|
+
break;
|
|
41219
|
+
}
|
|
41220
|
+
case 'regular-file': {
|
|
41221
|
+
enum1 = 6;
|
|
41222
|
+
break;
|
|
41223
|
+
}
|
|
41224
|
+
case 'socket': {
|
|
41225
|
+
enum1 = 7;
|
|
41226
|
+
break;
|
|
41227
|
+
}
|
|
41228
|
+
default: {
|
|
41229
|
+
throw new TypeError(`"${val1}" is not one of the cases of descriptor-type`);
|
|
41230
|
+
}
|
|
41231
|
+
}
|
|
41232
|
+
dataView(memory0).setInt8(arg1 + 24, enum1, true);
|
|
41233
|
+
dataView(memory0).setBigInt64(arg1 + 32, toUint64(v0_3), true);
|
|
41234
|
+
dataView(memory0).setBigInt64(arg1 + 40, toUint64(v0_4), true);
|
|
41235
|
+
const {seconds: v2_0, nanoseconds: v2_1 } = v0_5;
|
|
41236
|
+
dataView(memory0).setBigInt64(arg1 + 48, toUint64(v2_0), true);
|
|
41237
|
+
dataView(memory0).setInt32(arg1 + 56, toUint32(v2_1), true);
|
|
41238
|
+
const {seconds: v3_0, nanoseconds: v3_1 } = v0_6;
|
|
41239
|
+
dataView(memory0).setBigInt64(arg1 + 64, toUint64(v3_0), true);
|
|
41240
|
+
dataView(memory0).setInt32(arg1 + 72, toUint32(v3_1), true);
|
|
41241
|
+
const {seconds: v4_0, nanoseconds: v4_1 } = v0_7;
|
|
41242
|
+
dataView(memory0).setBigInt64(arg1 + 80, toUint64(v4_0), true);
|
|
41243
|
+
dataView(memory0).setInt32(arg1 + 88, toUint32(v4_1), true);
|
|
41244
|
+
break;
|
|
41245
|
+
}
|
|
41246
|
+
case 'err': {
|
|
41247
|
+
const e = variant6.val;
|
|
41248
|
+
dataView(memory0).setInt8(arg1 + 0, 1, true);
|
|
41249
|
+
const val5 = toString(e);
|
|
41250
|
+
let enum5;
|
|
41251
|
+
switch (val5) {
|
|
41252
|
+
case 'access': {
|
|
41253
|
+
enum5 = 0;
|
|
41254
|
+
break;
|
|
41255
|
+
}
|
|
41256
|
+
case 'would-block': {
|
|
41257
|
+
enum5 = 1;
|
|
41258
|
+
break;
|
|
41259
|
+
}
|
|
41260
|
+
case 'already': {
|
|
41261
|
+
enum5 = 2;
|
|
41262
|
+
break;
|
|
41263
|
+
}
|
|
41264
|
+
case 'bad-descriptor': {
|
|
41265
|
+
enum5 = 3;
|
|
41266
|
+
break;
|
|
41267
|
+
}
|
|
41268
|
+
case 'busy': {
|
|
41269
|
+
enum5 = 4;
|
|
41270
|
+
break;
|
|
41271
|
+
}
|
|
41272
|
+
case 'deadlock': {
|
|
41273
|
+
enum5 = 5;
|
|
41274
|
+
break;
|
|
41275
|
+
}
|
|
41276
|
+
case 'quota': {
|
|
41277
|
+
enum5 = 6;
|
|
41278
|
+
break;
|
|
41279
|
+
}
|
|
41280
|
+
case 'exist': {
|
|
41281
|
+
enum5 = 7;
|
|
41282
|
+
break;
|
|
41283
|
+
}
|
|
41284
|
+
case 'file-too-large': {
|
|
41285
|
+
enum5 = 8;
|
|
41286
|
+
break;
|
|
41287
|
+
}
|
|
41288
|
+
case 'illegal-byte-sequence': {
|
|
41289
|
+
enum5 = 9;
|
|
41290
|
+
break;
|
|
41291
|
+
}
|
|
41292
|
+
case 'in-progress': {
|
|
41293
|
+
enum5 = 10;
|
|
41294
|
+
break;
|
|
41295
|
+
}
|
|
41296
|
+
case 'interrupted': {
|
|
41297
|
+
enum5 = 11;
|
|
41298
|
+
break;
|
|
41299
|
+
}
|
|
41300
|
+
case 'invalid': {
|
|
41301
|
+
enum5 = 12;
|
|
41302
|
+
break;
|
|
41303
|
+
}
|
|
41304
|
+
case 'io': {
|
|
41305
|
+
enum5 = 13;
|
|
41306
|
+
break;
|
|
41307
|
+
}
|
|
41308
|
+
case 'is-directory': {
|
|
41309
|
+
enum5 = 14;
|
|
41310
|
+
break;
|
|
41311
|
+
}
|
|
41312
|
+
case 'loop': {
|
|
41313
|
+
enum5 = 15;
|
|
41314
|
+
break;
|
|
41315
|
+
}
|
|
41316
|
+
case 'too-many-links': {
|
|
41317
|
+
enum5 = 16;
|
|
41318
|
+
break;
|
|
41319
|
+
}
|
|
41320
|
+
case 'message-size': {
|
|
41321
|
+
enum5 = 17;
|
|
41322
|
+
break;
|
|
41323
|
+
}
|
|
41324
|
+
case 'name-too-long': {
|
|
41325
|
+
enum5 = 18;
|
|
41326
|
+
break;
|
|
41327
|
+
}
|
|
41328
|
+
case 'no-device': {
|
|
41329
|
+
enum5 = 19;
|
|
41330
|
+
break;
|
|
41331
|
+
}
|
|
41332
|
+
case 'no-entry': {
|
|
41333
|
+
enum5 = 20;
|
|
41334
|
+
break;
|
|
41335
|
+
}
|
|
41336
|
+
case 'no-lock': {
|
|
41337
|
+
enum5 = 21;
|
|
41338
|
+
break;
|
|
41339
|
+
}
|
|
41340
|
+
case 'insufficient-memory': {
|
|
41341
|
+
enum5 = 22;
|
|
41342
|
+
break;
|
|
41343
|
+
}
|
|
41344
|
+
case 'insufficient-space': {
|
|
41345
|
+
enum5 = 23;
|
|
41346
|
+
break;
|
|
41347
|
+
}
|
|
41348
|
+
case 'not-directory': {
|
|
41349
|
+
enum5 = 24;
|
|
41350
|
+
break;
|
|
41351
|
+
}
|
|
41352
|
+
case 'not-empty': {
|
|
41353
|
+
enum5 = 25;
|
|
41354
|
+
break;
|
|
41355
|
+
}
|
|
41356
|
+
case 'not-recoverable': {
|
|
41357
|
+
enum5 = 26;
|
|
41358
|
+
break;
|
|
41359
|
+
}
|
|
41360
|
+
case 'unsupported': {
|
|
41361
|
+
enum5 = 27;
|
|
41362
|
+
break;
|
|
41363
|
+
}
|
|
41364
|
+
case 'no-tty': {
|
|
41365
|
+
enum5 = 28;
|
|
41366
|
+
break;
|
|
41367
|
+
}
|
|
41368
|
+
case 'no-such-device': {
|
|
41369
|
+
enum5 = 29;
|
|
41370
|
+
break;
|
|
41371
|
+
}
|
|
41372
|
+
case 'overflow': {
|
|
41373
|
+
enum5 = 30;
|
|
41374
|
+
break;
|
|
41375
|
+
}
|
|
41376
|
+
case 'not-permitted': {
|
|
41377
|
+
enum5 = 31;
|
|
41378
|
+
break;
|
|
41379
|
+
}
|
|
41380
|
+
case 'pipe': {
|
|
41381
|
+
enum5 = 32;
|
|
41382
|
+
break;
|
|
41383
|
+
}
|
|
41384
|
+
case 'read-only': {
|
|
41385
|
+
enum5 = 33;
|
|
41386
|
+
break;
|
|
41387
|
+
}
|
|
41388
|
+
case 'invalid-seek': {
|
|
41389
|
+
enum5 = 34;
|
|
41390
|
+
break;
|
|
41391
|
+
}
|
|
41392
|
+
case 'text-file-busy': {
|
|
41393
|
+
enum5 = 35;
|
|
41394
|
+
break;
|
|
41395
|
+
}
|
|
41396
|
+
case 'cross-device': {
|
|
41397
|
+
enum5 = 36;
|
|
41398
|
+
break;
|
|
41399
|
+
}
|
|
41400
|
+
default: {
|
|
41401
|
+
throw new TypeError(`"${val5}" is not one of the cases of error-code`);
|
|
41402
|
+
}
|
|
41403
|
+
}
|
|
41404
|
+
dataView(memory0).setInt8(arg1 + 8, enum5, true);
|
|
41405
|
+
break;
|
|
41406
|
+
}
|
|
41407
|
+
default: {
|
|
41408
|
+
throw new TypeError('invalid variant specified for result');
|
|
41409
|
+
}
|
|
41410
|
+
}
|
|
41411
|
+
}
|
|
41412
|
+
|
|
41413
|
+
function lowering12(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
|
|
41414
|
+
if ((arg1 & 4294967294) !== 0) {
|
|
41415
|
+
throw new TypeError('flags have extraneous bits set');
|
|
41416
|
+
}
|
|
41417
|
+
const flags0 = {
|
|
41418
|
+
symlinkFollow: Boolean(arg1 & 1),
|
|
41419
|
+
};
|
|
41420
|
+
const ptr1 = arg2;
|
|
41421
|
+
const len1 = arg3;
|
|
41422
|
+
const result1 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr1, len1));
|
|
41423
|
+
if ((arg4 & 4294967280) !== 0) {
|
|
41424
|
+
throw new TypeError('flags have extraneous bits set');
|
|
41425
|
+
}
|
|
41426
|
+
const flags2 = {
|
|
41427
|
+
create: Boolean(arg4 & 1),
|
|
41428
|
+
directory: Boolean(arg4 & 2),
|
|
41429
|
+
exclusive: Boolean(arg4 & 4),
|
|
41430
|
+
truncate: Boolean(arg4 & 8),
|
|
41431
|
+
};
|
|
41432
|
+
if ((arg5 & 4294967232) !== 0) {
|
|
41433
|
+
throw new TypeError('flags have extraneous bits set');
|
|
41434
|
+
}
|
|
41435
|
+
const flags3 = {
|
|
41436
|
+
read: Boolean(arg5 & 1),
|
|
41437
|
+
write: Boolean(arg5 & 2),
|
|
41438
|
+
fileIntegritySync: Boolean(arg5 & 4),
|
|
41439
|
+
dataIntegritySync: Boolean(arg5 & 8),
|
|
41440
|
+
requestedWriteSync: Boolean(arg5 & 16),
|
|
41441
|
+
mutateDirectory: Boolean(arg5 & 32),
|
|
41442
|
+
};
|
|
41443
|
+
if ((arg6 & 4294967288) !== 0) {
|
|
41444
|
+
throw new TypeError('flags have extraneous bits set');
|
|
41445
|
+
}
|
|
41446
|
+
const flags4 = {
|
|
41447
|
+
readable: Boolean(arg6 & 1),
|
|
41448
|
+
writeable: Boolean(arg6 & 2),
|
|
41449
|
+
executable: Boolean(arg6 & 4),
|
|
41450
|
+
};
|
|
41451
|
+
let ret;
|
|
41452
|
+
try {
|
|
41453
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_filesystem__WEBPACK_IMPORTED_MODULE_0__/* .openAt */ .d2)(arg0 >>> 0, flags0, result1, flags2, flags3, flags4) };
|
|
41454
|
+
} catch (e) {
|
|
41455
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
41456
|
+
}
|
|
41457
|
+
const variant6 = ret;
|
|
41458
|
+
switch (variant6.tag) {
|
|
41459
|
+
case 'ok': {
|
|
41460
|
+
const e = variant6.val;
|
|
41461
|
+
dataView(memory0).setInt8(arg7 + 0, 0, true);
|
|
41462
|
+
dataView(memory0).setInt32(arg7 + 4, toUint32(e), true);
|
|
41463
|
+
break;
|
|
41464
|
+
}
|
|
41465
|
+
case 'err': {
|
|
41466
|
+
const e = variant6.val;
|
|
41467
|
+
dataView(memory0).setInt8(arg7 + 0, 1, true);
|
|
41468
|
+
const val5 = toString(e);
|
|
41469
|
+
let enum5;
|
|
41470
|
+
switch (val5) {
|
|
41471
|
+
case 'access': {
|
|
41472
|
+
enum5 = 0;
|
|
41473
|
+
break;
|
|
41474
|
+
}
|
|
41475
|
+
case 'would-block': {
|
|
41476
|
+
enum5 = 1;
|
|
41477
|
+
break;
|
|
41478
|
+
}
|
|
41479
|
+
case 'already': {
|
|
41480
|
+
enum5 = 2;
|
|
41481
|
+
break;
|
|
41482
|
+
}
|
|
41483
|
+
case 'bad-descriptor': {
|
|
41484
|
+
enum5 = 3;
|
|
41485
|
+
break;
|
|
41486
|
+
}
|
|
41487
|
+
case 'busy': {
|
|
41488
|
+
enum5 = 4;
|
|
41489
|
+
break;
|
|
41490
|
+
}
|
|
41491
|
+
case 'deadlock': {
|
|
41492
|
+
enum5 = 5;
|
|
41493
|
+
break;
|
|
41494
|
+
}
|
|
41495
|
+
case 'quota': {
|
|
41496
|
+
enum5 = 6;
|
|
41497
|
+
break;
|
|
41498
|
+
}
|
|
41499
|
+
case 'exist': {
|
|
41500
|
+
enum5 = 7;
|
|
41501
|
+
break;
|
|
41502
|
+
}
|
|
41503
|
+
case 'file-too-large': {
|
|
41504
|
+
enum5 = 8;
|
|
41505
|
+
break;
|
|
41506
|
+
}
|
|
41507
|
+
case 'illegal-byte-sequence': {
|
|
41508
|
+
enum5 = 9;
|
|
41509
|
+
break;
|
|
41510
|
+
}
|
|
41511
|
+
case 'in-progress': {
|
|
41512
|
+
enum5 = 10;
|
|
41513
|
+
break;
|
|
41514
|
+
}
|
|
41515
|
+
case 'interrupted': {
|
|
41516
|
+
enum5 = 11;
|
|
41517
|
+
break;
|
|
41518
|
+
}
|
|
41519
|
+
case 'invalid': {
|
|
41520
|
+
enum5 = 12;
|
|
41521
|
+
break;
|
|
41522
|
+
}
|
|
41523
|
+
case 'io': {
|
|
41524
|
+
enum5 = 13;
|
|
41525
|
+
break;
|
|
41526
|
+
}
|
|
41527
|
+
case 'is-directory': {
|
|
41528
|
+
enum5 = 14;
|
|
41529
|
+
break;
|
|
41530
|
+
}
|
|
41531
|
+
case 'loop': {
|
|
41532
|
+
enum5 = 15;
|
|
41533
|
+
break;
|
|
41534
|
+
}
|
|
41535
|
+
case 'too-many-links': {
|
|
41536
|
+
enum5 = 16;
|
|
41537
|
+
break;
|
|
41538
|
+
}
|
|
41539
|
+
case 'message-size': {
|
|
41540
|
+
enum5 = 17;
|
|
41541
|
+
break;
|
|
41542
|
+
}
|
|
41543
|
+
case 'name-too-long': {
|
|
41544
|
+
enum5 = 18;
|
|
41545
|
+
break;
|
|
41546
|
+
}
|
|
41547
|
+
case 'no-device': {
|
|
41548
|
+
enum5 = 19;
|
|
41549
|
+
break;
|
|
41550
|
+
}
|
|
41551
|
+
case 'no-entry': {
|
|
41552
|
+
enum5 = 20;
|
|
41553
|
+
break;
|
|
41554
|
+
}
|
|
41555
|
+
case 'no-lock': {
|
|
41556
|
+
enum5 = 21;
|
|
41557
|
+
break;
|
|
41558
|
+
}
|
|
41559
|
+
case 'insufficient-memory': {
|
|
41560
|
+
enum5 = 22;
|
|
41561
|
+
break;
|
|
41562
|
+
}
|
|
41563
|
+
case 'insufficient-space': {
|
|
41564
|
+
enum5 = 23;
|
|
41565
|
+
break;
|
|
41566
|
+
}
|
|
41567
|
+
case 'not-directory': {
|
|
41568
|
+
enum5 = 24;
|
|
41569
|
+
break;
|
|
41570
|
+
}
|
|
41571
|
+
case 'not-empty': {
|
|
41572
|
+
enum5 = 25;
|
|
41573
|
+
break;
|
|
41574
|
+
}
|
|
41575
|
+
case 'not-recoverable': {
|
|
41576
|
+
enum5 = 26;
|
|
41577
|
+
break;
|
|
41578
|
+
}
|
|
41579
|
+
case 'unsupported': {
|
|
41580
|
+
enum5 = 27;
|
|
41581
|
+
break;
|
|
41582
|
+
}
|
|
41583
|
+
case 'no-tty': {
|
|
41584
|
+
enum5 = 28;
|
|
41585
|
+
break;
|
|
41586
|
+
}
|
|
41587
|
+
case 'no-such-device': {
|
|
41588
|
+
enum5 = 29;
|
|
41589
|
+
break;
|
|
41590
|
+
}
|
|
41591
|
+
case 'overflow': {
|
|
41592
|
+
enum5 = 30;
|
|
41593
|
+
break;
|
|
41594
|
+
}
|
|
41595
|
+
case 'not-permitted': {
|
|
41596
|
+
enum5 = 31;
|
|
41597
|
+
break;
|
|
41598
|
+
}
|
|
41599
|
+
case 'pipe': {
|
|
41600
|
+
enum5 = 32;
|
|
41601
|
+
break;
|
|
41602
|
+
}
|
|
41603
|
+
case 'read-only': {
|
|
41604
|
+
enum5 = 33;
|
|
41605
|
+
break;
|
|
41606
|
+
}
|
|
41607
|
+
case 'invalid-seek': {
|
|
41608
|
+
enum5 = 34;
|
|
41609
|
+
break;
|
|
41610
|
+
}
|
|
41611
|
+
case 'text-file-busy': {
|
|
41612
|
+
enum5 = 35;
|
|
41613
|
+
break;
|
|
41614
|
+
}
|
|
41615
|
+
case 'cross-device': {
|
|
41616
|
+
enum5 = 36;
|
|
41617
|
+
break;
|
|
41618
|
+
}
|
|
41619
|
+
default: {
|
|
41620
|
+
throw new TypeError(`"${val5}" is not one of the cases of error-code`);
|
|
41621
|
+
}
|
|
41622
|
+
}
|
|
41623
|
+
dataView(memory0).setInt8(arg7 + 4, enum5, true);
|
|
41624
|
+
break;
|
|
41625
|
+
}
|
|
41626
|
+
default: {
|
|
41627
|
+
throw new TypeError('invalid variant specified for result');
|
|
41628
|
+
}
|
|
41629
|
+
}
|
|
41630
|
+
}
|
|
41631
|
+
|
|
41632
|
+
function lowering13(arg0, arg1) {
|
|
41633
|
+
const ret = (0,_bytecodealliance_preview2_shim_random__WEBPACK_IMPORTED_MODULE_1__/* .getRandomBytes */ .Iv)(BigInt.asUintN(64, arg0));
|
|
41634
|
+
const val0 = ret;
|
|
41635
|
+
const len0 = val0.byteLength;
|
|
41636
|
+
const ptr0 = realloc0(0, 0, 1, len0 * 1);
|
|
41637
|
+
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
41638
|
+
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
41639
|
+
dataView(memory0).setInt32(arg1 + 4, len0, true);
|
|
41640
|
+
dataView(memory0).setInt32(arg1 + 0, ptr0, true);
|
|
41641
|
+
}
|
|
41642
|
+
|
|
41643
|
+
function lowering14(arg0) {
|
|
41644
|
+
const ret = (0,_bytecodealliance_preview2_shim_environment__WEBPACK_IMPORTED_MODULE_2__/* .getEnvironment */ .zj)();
|
|
41645
|
+
const vec3 = ret;
|
|
41646
|
+
const len3 = vec3.length;
|
|
41647
|
+
const result3 = realloc0(0, 0, 4, len3 * 16);
|
|
41648
|
+
for (let i = 0; i < vec3.length; i++) {
|
|
41649
|
+
const e = vec3[i];
|
|
41650
|
+
const base = result3 + i * 16;const [tuple0_0, tuple0_1] = e;
|
|
41651
|
+
const ptr1 = utf8Encode(tuple0_0, realloc0, memory0);
|
|
41652
|
+
const len1 = utf8EncodedLen;
|
|
41653
|
+
dataView(memory0).setInt32(base + 4, len1, true);
|
|
41654
|
+
dataView(memory0).setInt32(base + 0, ptr1, true);
|
|
41655
|
+
const ptr2 = utf8Encode(tuple0_1, realloc0, memory0);
|
|
41656
|
+
const len2 = utf8EncodedLen;
|
|
41657
|
+
dataView(memory0).setInt32(base + 12, len2, true);
|
|
41658
|
+
dataView(memory0).setInt32(base + 8, ptr2, true);
|
|
41659
|
+
}
|
|
41660
|
+
dataView(memory0).setInt32(arg0 + 4, len3, true);
|
|
41661
|
+
dataView(memory0).setInt32(arg0 + 0, result3, true);
|
|
41662
|
+
}
|
|
41663
|
+
|
|
41664
|
+
function lowering15(arg0, arg1, arg2) {
|
|
41665
|
+
let ret;
|
|
41666
|
+
try {
|
|
41667
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .read */ .ij)(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
41668
|
+
} catch (e) {
|
|
41669
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
41670
|
+
}
|
|
41671
|
+
const variant3 = ret;
|
|
41672
|
+
switch (variant3.tag) {
|
|
41673
|
+
case 'ok': {
|
|
41674
|
+
const e = variant3.val;
|
|
41675
|
+
dataView(memory0).setInt8(arg2 + 0, 0, true);
|
|
41676
|
+
const [tuple0_0, tuple0_1] = e;
|
|
41677
|
+
const val1 = tuple0_0;
|
|
41678
|
+
const len1 = val1.byteLength;
|
|
41679
|
+
const ptr1 = realloc0(0, 0, 1, len1 * 1);
|
|
41680
|
+
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
41681
|
+
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
41682
|
+
dataView(memory0).setInt32(arg2 + 8, len1, true);
|
|
41683
|
+
dataView(memory0).setInt32(arg2 + 4, ptr1, true);
|
|
41684
|
+
dataView(memory0).setInt8(arg2 + 12, tuple0_1 ? 1 : 0, true);
|
|
41685
|
+
break;
|
|
41686
|
+
}
|
|
41687
|
+
case 'err': {
|
|
41688
|
+
const e = variant3.val;
|
|
41689
|
+
dataView(memory0).setInt8(arg2 + 0, 1, true);
|
|
41690
|
+
const { } = e;
|
|
41691
|
+
break;
|
|
41692
|
+
}
|
|
41693
|
+
default: {
|
|
41694
|
+
throw new TypeError('invalid variant specified for result');
|
|
41695
|
+
}
|
|
41696
|
+
}
|
|
41697
|
+
}
|
|
41698
|
+
|
|
41699
|
+
function lowering16(arg0, arg1, arg2) {
|
|
41700
|
+
let ret;
|
|
41701
|
+
try {
|
|
41702
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .blockingRead */ .O_)(arg0 >>> 0, BigInt.asUintN(64, arg1)) };
|
|
41703
|
+
} catch (e) {
|
|
41704
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
41705
|
+
}
|
|
41706
|
+
const variant3 = ret;
|
|
41707
|
+
switch (variant3.tag) {
|
|
41708
|
+
case 'ok': {
|
|
41709
|
+
const e = variant3.val;
|
|
41710
|
+
dataView(memory0).setInt8(arg2 + 0, 0, true);
|
|
41711
|
+
const [tuple0_0, tuple0_1] = e;
|
|
41712
|
+
const val1 = tuple0_0;
|
|
41713
|
+
const len1 = val1.byteLength;
|
|
41714
|
+
const ptr1 = realloc0(0, 0, 1, len1 * 1);
|
|
41715
|
+
const src1 = new Uint8Array(val1.buffer || val1, val1.byteOffset, len1 * 1);
|
|
41716
|
+
(new Uint8Array(memory0.buffer, ptr1, len1 * 1)).set(src1);
|
|
41717
|
+
dataView(memory0).setInt32(arg2 + 8, len1, true);
|
|
41718
|
+
dataView(memory0).setInt32(arg2 + 4, ptr1, true);
|
|
41719
|
+
dataView(memory0).setInt8(arg2 + 12, tuple0_1 ? 1 : 0, true);
|
|
41720
|
+
break;
|
|
41721
|
+
}
|
|
41722
|
+
case 'err': {
|
|
41723
|
+
const e = variant3.val;
|
|
41724
|
+
dataView(memory0).setInt8(arg2 + 0, 1, true);
|
|
41725
|
+
const { } = e;
|
|
41726
|
+
break;
|
|
41727
|
+
}
|
|
41728
|
+
default: {
|
|
41729
|
+
throw new TypeError('invalid variant specified for result');
|
|
41730
|
+
}
|
|
41731
|
+
}
|
|
41732
|
+
}
|
|
41733
|
+
|
|
41734
|
+
function lowering17(arg0, arg1, arg2, arg3) {
|
|
41735
|
+
const ptr0 = arg1;
|
|
41736
|
+
const len0 = arg2;
|
|
41737
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
41738
|
+
let ret;
|
|
41739
|
+
try {
|
|
41740
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .write */ .cW)(arg0 >>> 0, result0) };
|
|
41741
|
+
} catch (e) {
|
|
41742
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
41743
|
+
}
|
|
41744
|
+
const variant2 = ret;
|
|
41745
|
+
switch (variant2.tag) {
|
|
41746
|
+
case 'ok': {
|
|
41747
|
+
const e = variant2.val;
|
|
41748
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
41749
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
41750
|
+
break;
|
|
41751
|
+
}
|
|
41752
|
+
case 'err': {
|
|
41753
|
+
const e = variant2.val;
|
|
41754
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
41755
|
+
const { } = e;
|
|
41756
|
+
break;
|
|
41757
|
+
}
|
|
41758
|
+
default: {
|
|
41759
|
+
throw new TypeError('invalid variant specified for result');
|
|
41760
|
+
}
|
|
41761
|
+
}
|
|
41762
|
+
}
|
|
41763
|
+
|
|
41764
|
+
function lowering18(arg0, arg1, arg2, arg3) {
|
|
41765
|
+
const ptr0 = arg1;
|
|
41766
|
+
const len0 = arg2;
|
|
41767
|
+
const result0 = new Uint8Array(memory0.buffer.slice(ptr0, ptr0 + len0 * 1));
|
|
41768
|
+
let ret;
|
|
41769
|
+
try {
|
|
41770
|
+
ret = { tag: 'ok', val: (0,_bytecodealliance_preview2_shim_streams__WEBPACK_IMPORTED_MODULE_3__/* .blockingWrite */ .v_)(arg0 >>> 0, result0) };
|
|
41771
|
+
} catch (e) {
|
|
41772
|
+
ret = { tag: 'err', val: getErrorPayload(e) };
|
|
41773
|
+
}
|
|
41774
|
+
const variant2 = ret;
|
|
41775
|
+
switch (variant2.tag) {
|
|
41776
|
+
case 'ok': {
|
|
41777
|
+
const e = variant2.val;
|
|
41778
|
+
dataView(memory0).setInt8(arg3 + 0, 0, true);
|
|
41779
|
+
dataView(memory0).setBigInt64(arg3 + 8, toUint64(e), true);
|
|
41780
|
+
break;
|
|
41781
|
+
}
|
|
41782
|
+
case 'err': {
|
|
41783
|
+
const e = variant2.val;
|
|
41784
|
+
dataView(memory0).setInt8(arg3 + 0, 1, true);
|
|
41785
|
+
const { } = e;
|
|
41786
|
+
break;
|
|
41787
|
+
}
|
|
41788
|
+
default: {
|
|
41789
|
+
throw new TypeError('invalid variant specified for result');
|
|
41790
|
+
}
|
|
41791
|
+
}
|
|
41792
|
+
}
|
|
41793
|
+
let exports3;
|
|
41794
|
+
let realloc1;
|
|
40407
41795
|
let postReturn0;
|
|
40408
41796
|
let postReturn1;
|
|
40409
41797
|
const exports = {
|
|
40410
41798
|
parse(arg0) {
|
|
40411
|
-
const ptr0 = utf8Encode(arg0,
|
|
41799
|
+
const ptr0 = utf8Encode(arg0, realloc1, memory0);
|
|
40412
41800
|
const len0 = utf8EncodedLen;
|
|
40413
41801
|
const ret = exports1['exports#parse'](ptr0, len0);
|
|
40414
41802
|
let variant3;
|
|
@@ -40446,7 +41834,7 @@ const exports = {
|
|
|
40446
41834
|
print(arg0) {
|
|
40447
41835
|
const val0 = arg0;
|
|
40448
41836
|
const len0 = val0.byteLength;
|
|
40449
|
-
const ptr0 =
|
|
41837
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
40450
41838
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
40451
41839
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
40452
41840
|
const ret = exports1['exports#print'](ptr0, len0);
|
|
@@ -40485,7 +41873,7 @@ const exports = {
|
|
|
40485
41873
|
componentNew(arg0, arg1) {
|
|
40486
41874
|
const val0 = arg0;
|
|
40487
41875
|
const len0 = val0.byteLength;
|
|
40488
|
-
const ptr0 =
|
|
41876
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
40489
41877
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
40490
41878
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
40491
41879
|
const variant5 = arg1;
|
|
@@ -40500,17 +41888,17 @@ const exports = {
|
|
|
40500
41888
|
const e = variant5;
|
|
40501
41889
|
const vec4 = e;
|
|
40502
41890
|
const len4 = vec4.length;
|
|
40503
|
-
const result4 =
|
|
41891
|
+
const result4 = realloc1(0, 0, 4, len4 * 16);
|
|
40504
41892
|
for (let i = 0; i < vec4.length; i++) {
|
|
40505
41893
|
const e = vec4[i];
|
|
40506
41894
|
const base = result4 + i * 16;const [tuple1_0, tuple1_1] = e;
|
|
40507
|
-
const ptr2 = utf8Encode(tuple1_0,
|
|
41895
|
+
const ptr2 = utf8Encode(tuple1_0, realloc1, memory0);
|
|
40508
41896
|
const len2 = utf8EncodedLen;
|
|
40509
41897
|
dataView(memory0).setInt32(base + 4, len2, true);
|
|
40510
41898
|
dataView(memory0).setInt32(base + 0, ptr2, true);
|
|
40511
41899
|
const val3 = tuple1_1;
|
|
40512
41900
|
const len3 = val3.byteLength;
|
|
40513
|
-
const ptr3 =
|
|
41901
|
+
const ptr3 = realloc1(0, 0, 1, len3 * 1);
|
|
40514
41902
|
const src3 = new Uint8Array(val3.buffer || val3, val3.byteOffset, len3 * 1);
|
|
40515
41903
|
(new Uint8Array(memory0.buffer, ptr3, len3 * 1)).set(src3);
|
|
40516
41904
|
dataView(memory0).setInt32(base + 12, len3, true);
|
|
@@ -40556,7 +41944,7 @@ const exports = {
|
|
|
40556
41944
|
componentWit(arg0, arg1) {
|
|
40557
41945
|
const val0 = arg0;
|
|
40558
41946
|
const len0 = val0.byteLength;
|
|
40559
|
-
const ptr0 =
|
|
41947
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
40560
41948
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
40561
41949
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
40562
41950
|
const variant2 = arg1;
|
|
@@ -40569,7 +41957,7 @@ const exports = {
|
|
|
40569
41957
|
variant2_2 = 0;
|
|
40570
41958
|
} else {
|
|
40571
41959
|
const e = variant2;
|
|
40572
|
-
const ptr1 = utf8Encode(e,
|
|
41960
|
+
const ptr1 = utf8Encode(e, realloc1, memory0);
|
|
40573
41961
|
const len1 = utf8EncodedLen;
|
|
40574
41962
|
variant2_0 = 1;
|
|
40575
41963
|
variant2_1 = ptr1;
|
|
@@ -40608,186 +41996,148 @@ const exports = {
|
|
|
40608
41996
|
}
|
|
40609
41997
|
return variant5.val;
|
|
40610
41998
|
},
|
|
40611
|
-
componentEmbed(arg0
|
|
40612
|
-
const
|
|
40613
|
-
|
|
40614
|
-
|
|
40615
|
-
|
|
40616
|
-
|
|
40617
|
-
variant1_0 = 0;
|
|
40618
|
-
variant1_1 = 0;
|
|
40619
|
-
variant1_2 = 0;
|
|
41999
|
+
componentEmbed(arg0) {
|
|
42000
|
+
const ptr0 = realloc1(0, 0, 4, 64);
|
|
42001
|
+
const {binary: v1_0, witSource: v1_1, witPath: v1_2, stringEncoding: v1_3, dummy: v1_4, world: v1_5, metadata: v1_6 } = arg0;
|
|
42002
|
+
const variant3 = v1_0;
|
|
42003
|
+
if (variant3 === null || variant3=== undefined) {
|
|
42004
|
+
dataView(memory0).setInt8(ptr0 + 0, 0, true);
|
|
40620
42005
|
} else {
|
|
40621
|
-
const e =
|
|
40622
|
-
|
|
40623
|
-
const
|
|
40624
|
-
const
|
|
40625
|
-
const
|
|
40626
|
-
|
|
40627
|
-
|
|
40628
|
-
|
|
40629
|
-
|
|
40630
|
-
}
|
|
40631
|
-
const
|
|
40632
|
-
|
|
40633
|
-
|
|
40634
|
-
let variant17_0;
|
|
40635
|
-
let variant17_1;
|
|
40636
|
-
let variant17_2;
|
|
40637
|
-
let variant17_3;
|
|
40638
|
-
let variant17_4;
|
|
40639
|
-
let variant17_5;
|
|
40640
|
-
let variant17_6;
|
|
40641
|
-
let variant17_7;
|
|
40642
|
-
let variant17_8;
|
|
40643
|
-
let variant17_9;
|
|
40644
|
-
let variant17_10;
|
|
40645
|
-
if (variant17 === null || variant17=== undefined) {
|
|
40646
|
-
variant17_0 = 0;
|
|
40647
|
-
variant17_1 = 0;
|
|
40648
|
-
variant17_2 = 0;
|
|
40649
|
-
variant17_3 = 0;
|
|
40650
|
-
variant17_4 = 0;
|
|
40651
|
-
variant17_5 = 0;
|
|
40652
|
-
variant17_6 = 0;
|
|
40653
|
-
variant17_7 = 0;
|
|
40654
|
-
variant17_8 = 0;
|
|
40655
|
-
variant17_9 = 0;
|
|
40656
|
-
variant17_10 = 0;
|
|
42006
|
+
const e = variant3;
|
|
42007
|
+
dataView(memory0).setInt8(ptr0 + 0, 1, true);
|
|
42008
|
+
const val2 = e;
|
|
42009
|
+
const len2 = val2.byteLength;
|
|
42010
|
+
const ptr2 = realloc1(0, 0, 1, len2 * 1);
|
|
42011
|
+
const src2 = new Uint8Array(val2.buffer || val2, val2.byteOffset, len2 * 1);
|
|
42012
|
+
(new Uint8Array(memory0.buffer, ptr2, len2 * 1)).set(src2);
|
|
42013
|
+
dataView(memory0).setInt32(ptr0 + 8, len2, true);
|
|
42014
|
+
dataView(memory0).setInt32(ptr0 + 4, ptr2, true);
|
|
42015
|
+
}
|
|
42016
|
+
const variant5 = v1_1;
|
|
42017
|
+
if (variant5 === null || variant5=== undefined) {
|
|
42018
|
+
dataView(memory0).setInt8(ptr0 + 12, 0, true);
|
|
40657
42019
|
} else {
|
|
40658
|
-
const e =
|
|
40659
|
-
|
|
40660
|
-
const
|
|
40661
|
-
|
|
40662
|
-
|
|
40663
|
-
|
|
40664
|
-
|
|
40665
|
-
|
|
40666
|
-
|
|
40667
|
-
|
|
40668
|
-
|
|
40669
|
-
|
|
40670
|
-
|
|
40671
|
-
|
|
40672
|
-
|
|
40673
|
-
|
|
40674
|
-
|
|
40675
|
-
|
|
40676
|
-
|
|
40677
|
-
|
|
40678
|
-
|
|
40679
|
-
|
|
40680
|
-
|
|
40681
|
-
|
|
40682
|
-
|
|
40683
|
-
|
|
40684
|
-
|
|
40685
|
-
|
|
42020
|
+
const e = variant5;
|
|
42021
|
+
dataView(memory0).setInt8(ptr0 + 12, 1, true);
|
|
42022
|
+
const ptr4 = utf8Encode(e, realloc1, memory0);
|
|
42023
|
+
const len4 = utf8EncodedLen;
|
|
42024
|
+
dataView(memory0).setInt32(ptr0 + 20, len4, true);
|
|
42025
|
+
dataView(memory0).setInt32(ptr0 + 16, ptr4, true);
|
|
42026
|
+
}
|
|
42027
|
+
const variant7 = v1_2;
|
|
42028
|
+
if (variant7 === null || variant7=== undefined) {
|
|
42029
|
+
dataView(memory0).setInt8(ptr0 + 24, 0, true);
|
|
42030
|
+
} else {
|
|
42031
|
+
const e = variant7;
|
|
42032
|
+
dataView(memory0).setInt8(ptr0 + 24, 1, true);
|
|
42033
|
+
const ptr6 = utf8Encode(e, realloc1, memory0);
|
|
42034
|
+
const len6 = utf8EncodedLen;
|
|
42035
|
+
dataView(memory0).setInt32(ptr0 + 32, len6, true);
|
|
42036
|
+
dataView(memory0).setInt32(ptr0 + 28, ptr6, true);
|
|
42037
|
+
}
|
|
42038
|
+
const variant9 = v1_3;
|
|
42039
|
+
if (variant9 === null || variant9=== undefined) {
|
|
42040
|
+
dataView(memory0).setInt8(ptr0 + 36, 0, true);
|
|
42041
|
+
} else {
|
|
42042
|
+
const e = variant9;
|
|
42043
|
+
dataView(memory0).setInt8(ptr0 + 36, 1, true);
|
|
42044
|
+
const val8 = toString(e);
|
|
42045
|
+
let enum8;
|
|
42046
|
+
switch (val8) {
|
|
42047
|
+
case 'utf8': {
|
|
42048
|
+
enum8 = 0;
|
|
42049
|
+
break;
|
|
40686
42050
|
}
|
|
40687
|
-
|
|
40688
|
-
|
|
40689
|
-
|
|
40690
|
-
|
|
40691
|
-
|
|
40692
|
-
|
|
40693
|
-
|
|
40694
|
-
|
|
40695
|
-
|
|
40696
|
-
|
|
40697
|
-
const e = variant6;
|
|
40698
|
-
variant6_0 = 1;
|
|
40699
|
-
variant6_1 = e ? 1 : 0;
|
|
40700
|
-
}
|
|
40701
|
-
const variant8 = v3_2;
|
|
40702
|
-
let variant8_0;
|
|
40703
|
-
let variant8_1;
|
|
40704
|
-
let variant8_2;
|
|
40705
|
-
if (variant8 === null || variant8=== undefined) {
|
|
40706
|
-
variant8_0 = 0;
|
|
40707
|
-
variant8_1 = 0;
|
|
40708
|
-
variant8_2 = 0;
|
|
40709
|
-
} else {
|
|
40710
|
-
const e = variant8;
|
|
40711
|
-
const ptr7 = utf8Encode(e, realloc0, memory0);
|
|
40712
|
-
const len7 = utf8EncodedLen;
|
|
40713
|
-
variant8_0 = 1;
|
|
40714
|
-
variant8_1 = ptr7;
|
|
40715
|
-
variant8_2 = len7;
|
|
40716
|
-
}
|
|
40717
|
-
const variant16 = v3_3;
|
|
40718
|
-
let variant16_0;
|
|
40719
|
-
let variant16_1;
|
|
40720
|
-
let variant16_2;
|
|
40721
|
-
if (variant16 === null || variant16=== undefined) {
|
|
40722
|
-
variant16_0 = 0;
|
|
40723
|
-
variant16_1 = 0;
|
|
40724
|
-
variant16_2 = 0;
|
|
40725
|
-
} else {
|
|
40726
|
-
const e = variant16;
|
|
40727
|
-
const vec15 = e;
|
|
40728
|
-
const len15 = vec15.length;
|
|
40729
|
-
const result15 = realloc0(0, 0, 4, len15 * 16);
|
|
40730
|
-
for (let i = 0; i < vec15.length; i++) {
|
|
40731
|
-
const e = vec15[i];
|
|
40732
|
-
const base = result15 + i * 16;const [tuple9_0, tuple9_1] = e;
|
|
40733
|
-
const ptr10 = utf8Encode(tuple9_0, realloc0, memory0);
|
|
40734
|
-
const len10 = utf8EncodedLen;
|
|
40735
|
-
dataView(memory0).setInt32(base + 4, len10, true);
|
|
40736
|
-
dataView(memory0).setInt32(base + 0, ptr10, true);
|
|
40737
|
-
const vec14 = tuple9_1;
|
|
40738
|
-
const len14 = vec14.length;
|
|
40739
|
-
const result14 = realloc0(0, 0, 4, len14 * 16);
|
|
40740
|
-
for (let i = 0; i < vec14.length; i++) {
|
|
40741
|
-
const e = vec14[i];
|
|
40742
|
-
const base = result14 + i * 16;const [tuple11_0, tuple11_1] = e;
|
|
40743
|
-
const ptr12 = utf8Encode(tuple11_0, realloc0, memory0);
|
|
40744
|
-
const len12 = utf8EncodedLen;
|
|
40745
|
-
dataView(memory0).setInt32(base + 4, len12, true);
|
|
40746
|
-
dataView(memory0).setInt32(base + 0, ptr12, true);
|
|
40747
|
-
const ptr13 = utf8Encode(tuple11_1, realloc0, memory0);
|
|
40748
|
-
const len13 = utf8EncodedLen;
|
|
40749
|
-
dataView(memory0).setInt32(base + 12, len13, true);
|
|
40750
|
-
dataView(memory0).setInt32(base + 8, ptr13, true);
|
|
40751
|
-
}
|
|
40752
|
-
dataView(memory0).setInt32(base + 12, len14, true);
|
|
40753
|
-
dataView(memory0).setInt32(base + 8, result14, true);
|
|
42051
|
+
case 'utf16': {
|
|
42052
|
+
enum8 = 1;
|
|
42053
|
+
break;
|
|
42054
|
+
}
|
|
42055
|
+
case 'compact-utf16': {
|
|
42056
|
+
enum8 = 2;
|
|
42057
|
+
break;
|
|
42058
|
+
}
|
|
42059
|
+
default: {
|
|
42060
|
+
throw new TypeError(`"${val8}" is not one of the cases of string-encoding`);
|
|
40754
42061
|
}
|
|
40755
|
-
variant16_0 = 1;
|
|
40756
|
-
variant16_1 = result15;
|
|
40757
|
-
variant16_2 = len15;
|
|
40758
42062
|
}
|
|
40759
|
-
|
|
40760
|
-
|
|
40761
|
-
|
|
40762
|
-
|
|
40763
|
-
|
|
40764
|
-
|
|
40765
|
-
|
|
40766
|
-
|
|
40767
|
-
|
|
40768
|
-
|
|
40769
|
-
|
|
40770
|
-
|
|
40771
|
-
|
|
40772
|
-
|
|
42063
|
+
dataView(memory0).setInt8(ptr0 + 37, enum8, true);
|
|
42064
|
+
}
|
|
42065
|
+
const variant10 = v1_4;
|
|
42066
|
+
if (variant10 === null || variant10=== undefined) {
|
|
42067
|
+
dataView(memory0).setInt8(ptr0 + 38, 0, true);
|
|
42068
|
+
} else {
|
|
42069
|
+
const e = variant10;
|
|
42070
|
+
dataView(memory0).setInt8(ptr0 + 38, 1, true);
|
|
42071
|
+
dataView(memory0).setInt8(ptr0 + 39, e ? 1 : 0, true);
|
|
42072
|
+
}
|
|
42073
|
+
const variant12 = v1_5;
|
|
42074
|
+
if (variant12 === null || variant12=== undefined) {
|
|
42075
|
+
dataView(memory0).setInt8(ptr0 + 40, 0, true);
|
|
42076
|
+
} else {
|
|
42077
|
+
const e = variant12;
|
|
42078
|
+
dataView(memory0).setInt8(ptr0 + 40, 1, true);
|
|
42079
|
+
const ptr11 = utf8Encode(e, realloc1, memory0);
|
|
42080
|
+
const len11 = utf8EncodedLen;
|
|
42081
|
+
dataView(memory0).setInt32(ptr0 + 48, len11, true);
|
|
42082
|
+
dataView(memory0).setInt32(ptr0 + 44, ptr11, true);
|
|
42083
|
+
}
|
|
42084
|
+
const variant20 = v1_6;
|
|
42085
|
+
if (variant20 === null || variant20=== undefined) {
|
|
42086
|
+
dataView(memory0).setInt8(ptr0 + 52, 0, true);
|
|
42087
|
+
} else {
|
|
42088
|
+
const e = variant20;
|
|
42089
|
+
dataView(memory0).setInt8(ptr0 + 52, 1, true);
|
|
42090
|
+
const vec19 = e;
|
|
42091
|
+
const len19 = vec19.length;
|
|
42092
|
+
const result19 = realloc1(0, 0, 4, len19 * 16);
|
|
42093
|
+
for (let i = 0; i < vec19.length; i++) {
|
|
42094
|
+
const e = vec19[i];
|
|
42095
|
+
const base = result19 + i * 16;const [tuple13_0, tuple13_1] = e;
|
|
42096
|
+
const ptr14 = utf8Encode(tuple13_0, realloc1, memory0);
|
|
42097
|
+
const len14 = utf8EncodedLen;
|
|
42098
|
+
dataView(memory0).setInt32(base + 4, len14, true);
|
|
42099
|
+
dataView(memory0).setInt32(base + 0, ptr14, true);
|
|
42100
|
+
const vec18 = tuple13_1;
|
|
42101
|
+
const len18 = vec18.length;
|
|
42102
|
+
const result18 = realloc1(0, 0, 4, len18 * 16);
|
|
42103
|
+
for (let i = 0; i < vec18.length; i++) {
|
|
42104
|
+
const e = vec18[i];
|
|
42105
|
+
const base = result18 + i * 16;const [tuple15_0, tuple15_1] = e;
|
|
42106
|
+
const ptr16 = utf8Encode(tuple15_0, realloc1, memory0);
|
|
42107
|
+
const len16 = utf8EncodedLen;
|
|
42108
|
+
dataView(memory0).setInt32(base + 4, len16, true);
|
|
42109
|
+
dataView(memory0).setInt32(base + 0, ptr16, true);
|
|
42110
|
+
const ptr17 = utf8Encode(tuple15_1, realloc1, memory0);
|
|
42111
|
+
const len17 = utf8EncodedLen;
|
|
42112
|
+
dataView(memory0).setInt32(base + 12, len17, true);
|
|
42113
|
+
dataView(memory0).setInt32(base + 8, ptr17, true);
|
|
42114
|
+
}
|
|
42115
|
+
dataView(memory0).setInt32(base + 12, len18, true);
|
|
42116
|
+
dataView(memory0).setInt32(base + 8, result18, true);
|
|
42117
|
+
}
|
|
42118
|
+
dataView(memory0).setInt32(ptr0 + 60, len19, true);
|
|
42119
|
+
dataView(memory0).setInt32(ptr0 + 56, result19, true);
|
|
42120
|
+
}
|
|
42121
|
+
const ret = exports1['exports#component-embed'](ptr0);
|
|
42122
|
+
let variant23;
|
|
40773
42123
|
switch (dataView(memory0).getUint8(ret + 0, true)) {
|
|
40774
42124
|
case 0: {
|
|
40775
|
-
const
|
|
40776
|
-
const
|
|
40777
|
-
const
|
|
40778
|
-
|
|
42125
|
+
const ptr21 = dataView(memory0).getInt32(ret + 4, true);
|
|
42126
|
+
const len21 = dataView(memory0).getInt32(ret + 8, true);
|
|
42127
|
+
const result21 = new Uint8Array(memory0.buffer.slice(ptr21, ptr21 + len21 * 1));
|
|
42128
|
+
variant23= {
|
|
40779
42129
|
tag: 'ok',
|
|
40780
|
-
val:
|
|
42130
|
+
val: result21
|
|
40781
42131
|
};
|
|
40782
42132
|
break;
|
|
40783
42133
|
}
|
|
40784
42134
|
case 1: {
|
|
40785
|
-
const
|
|
40786
|
-
const
|
|
40787
|
-
const
|
|
40788
|
-
|
|
42135
|
+
const ptr22 = dataView(memory0).getInt32(ret + 4, true);
|
|
42136
|
+
const len22 = dataView(memory0).getInt32(ret + 8, true);
|
|
42137
|
+
const result22 = utf8Decoder.decode(new Uint8Array(memory0.buffer, ptr22, len22));
|
|
42138
|
+
variant23= {
|
|
40789
42139
|
tag: 'err',
|
|
40790
|
-
val:
|
|
42140
|
+
val: result22
|
|
40791
42141
|
};
|
|
40792
42142
|
break;
|
|
40793
42143
|
}
|
|
@@ -40796,15 +42146,15 @@ const exports = {
|
|
|
40796
42146
|
}
|
|
40797
42147
|
}
|
|
40798
42148
|
postReturn0(ret);
|
|
40799
|
-
if (
|
|
40800
|
-
throw new ComponentError(
|
|
42149
|
+
if (variant23.tag === 'err') {
|
|
42150
|
+
throw new ComponentError(variant23.val);
|
|
40801
42151
|
}
|
|
40802
|
-
return
|
|
42152
|
+
return variant23.val;
|
|
40803
42153
|
},
|
|
40804
42154
|
metadataShow(arg0) {
|
|
40805
42155
|
const val0 = arg0;
|
|
40806
42156
|
const len0 = val0.byteLength;
|
|
40807
|
-
const ptr0 =
|
|
42157
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
40808
42158
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
40809
42159
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
40810
42160
|
const ret = exports1['exports#metadata-show'](ptr0, len0);
|
|
@@ -40911,30 +42261,30 @@ const exports = {
|
|
|
40911
42261
|
metadataAdd(arg0, arg1) {
|
|
40912
42262
|
const val0 = arg0;
|
|
40913
42263
|
const len0 = val0.byteLength;
|
|
40914
|
-
const ptr0 =
|
|
42264
|
+
const ptr0 = realloc1(0, 0, 1, len0 * 1);
|
|
40915
42265
|
const src0 = new Uint8Array(val0.buffer || val0, val0.byteOffset, len0 * 1);
|
|
40916
42266
|
(new Uint8Array(memory0.buffer, ptr0, len0 * 1)).set(src0);
|
|
40917
42267
|
const vec7 = arg1;
|
|
40918
42268
|
const len7 = vec7.length;
|
|
40919
|
-
const result7 =
|
|
42269
|
+
const result7 = realloc1(0, 0, 4, len7 * 16);
|
|
40920
42270
|
for (let i = 0; i < vec7.length; i++) {
|
|
40921
42271
|
const e = vec7[i];
|
|
40922
42272
|
const base = result7 + i * 16;const [tuple1_0, tuple1_1] = e;
|
|
40923
|
-
const ptr2 = utf8Encode(tuple1_0,
|
|
42273
|
+
const ptr2 = utf8Encode(tuple1_0, realloc1, memory0);
|
|
40924
42274
|
const len2 = utf8EncodedLen;
|
|
40925
42275
|
dataView(memory0).setInt32(base + 4, len2, true);
|
|
40926
42276
|
dataView(memory0).setInt32(base + 0, ptr2, true);
|
|
40927
42277
|
const vec6 = tuple1_1;
|
|
40928
42278
|
const len6 = vec6.length;
|
|
40929
|
-
const result6 =
|
|
42279
|
+
const result6 = realloc1(0, 0, 4, len6 * 16);
|
|
40930
42280
|
for (let i = 0; i < vec6.length; i++) {
|
|
40931
42281
|
const e = vec6[i];
|
|
40932
42282
|
const base = result6 + i * 16;const [tuple3_0, tuple3_1] = e;
|
|
40933
|
-
const ptr4 = utf8Encode(tuple3_0,
|
|
42283
|
+
const ptr4 = utf8Encode(tuple3_0, realloc1, memory0);
|
|
40934
42284
|
const len4 = utf8EncodedLen;
|
|
40935
42285
|
dataView(memory0).setInt32(base + 4, len4, true);
|
|
40936
42286
|
dataView(memory0).setInt32(base + 0, ptr4, true);
|
|
40937
|
-
const ptr5 = utf8Encode(tuple3_1,
|
|
42287
|
+
const ptr5 = utf8Encode(tuple3_1, realloc1, memory0);
|
|
40938
42288
|
const len5 = utf8EncodedLen;
|
|
40939
42289
|
dataView(memory0).setInt32(base + 12, len5, true);
|
|
40940
42290
|
dataView(memory0).setInt32(base + 8, ptr5, true);
|
|
@@ -40982,23 +42332,95 @@ const exports = {
|
|
|
40982
42332
|
|
|
40983
42333
|
const $init = (async() => {
|
|
40984
42334
|
const module0 = fetchCompile(__nccwpck_require__.ab + "wasm-tools.core.wasm");
|
|
40985
|
-
const module1 =
|
|
40986
|
-
const module2 = base64Compile('
|
|
40987
|
-
|
|
40988
|
-
(
|
|
42335
|
+
const module1 = fetchCompile(__nccwpck_require__.ab + "wasm-tools.core2.wasm");
|
|
42336
|
+
const module2 = base64Compile('AGFzbQEAAAABUgxgAX8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAN/fn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwADFxYAAAEBAgMABAQFBQYHBwgGBgYJBgoLBAUBcAEWFgdwFwEwAAABMQABATIAAgEzAAMBNAAEATUABQE2AAYBNwAHATgACAE5AAkCMTAACgIxMQALAjEyAAwCMTMADQIxNAAOAjE1AA8CMTYAEAIxNwARAjE4ABICMTkAEwIyMAAUAjIxABUIJGltcG9ydHMBAAqvAhYJACAAQQARAAALCQAgAEEBEQAACwsAIAAgAUECEQEACwsAIAAgAUEDEQEACxcAIAAgASACIAMgBCAFIAYgB0EEEQIACwsAIAAgAUEFEQMACwkAIABBBhEAAAsNACAAIAEgAkEHEQQACw0AIAAgASACQQgRBAALDwAgACABIAIgA0EJEQUACw8AIAAgASACIANBChEFAAsLACAAIAFBCxEGAAsPACAAIAEgAiADQQwRBwALDwAgACABIAIgA0ENEQcACxkAIAAgASACIAMgBCAFIAYgByAIQQ4RCAALCwAgACABQQ8RBgALCwAgACABQRARBgALCwAgACABQRERBgALCQAgAEESEQkACwsAIAAgAUETEQYACw0AIAAgASACQRQRCgALCQAgAEEVEQsACwAtCXByb2R1Y2VycwEMcHJvY2Vzc2VkLWJ5AQ13aXQtY29tcG9uZW50BTAuOC4yAL8GBG5hbWUAExJ3aXQtY29tcG9uZW50OnNoaW0BogYWABtpbmRpcmVjdC1wcmVvcGVucy1nZXQtc3RkaW8BIWluZGlyZWN0LXByZW9wZW5zLWdldC1kaXJlY3RvcmllcwIcaW5kaXJlY3QtZmlsZXN5c3RlbS1nZXQtdHlwZQMYaW5kaXJlY3QtZmlsZXN5c3RlbS1zdGF0BBtpbmRpcmVjdC1maWxlc3lzdGVtLW9wZW4tYXQFIGluZGlyZWN0LXJhbmRvbS1nZXQtcmFuZG9tLWJ5dGVzBiRpbmRpcmVjdC1lbnZpcm9ubWVudC1nZXQtZW52aXJvbm1lbnQHFWluZGlyZWN0LXN0cmVhbXMtcmVhZAgeaW5kaXJlY3Qtc3RyZWFtcy1ibG9ja2luZy1yZWFkCRZpbmRpcmVjdC1zdHJlYW1zLXdyaXRlCh9pbmRpcmVjdC1zdHJlYW1zLWJsb2NraW5nLXdyaXRlCyxhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX2ZpbGVzdGF0X2dldAwkYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1mZF9yZWFkDSVhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3dyaXRlDiZhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLXBhdGhfb3Blbg8nYWRhcHQtd2FzaV9zbmFwc2hvdF9wcmV2aWV3MS1yYW5kb21fZ2V0EChhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWVudmlyb25fZ2V0ES5hZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWVudmlyb25fc2l6ZXNfZ2V0EiVhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX2Nsb3NlEythZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3ByZXN0YXRfZ2V0FDBhZGFwdC13YXNpX3NuYXBzaG90X3ByZXZpZXcxLWZkX3ByZXN0YXRfZGlyX25hbWUVJmFkYXB0LXdhc2lfc25hcHNob3RfcHJldmlldzEtcHJvY19leGl0');
|
|
42337
|
+
const module3 = base64Compile('AGFzbQEAAAABUgxgAX8AYAJ/fwBgCH9/f39/f39/AGACfn8AYAN/fn8AYAR/f39/AGACf38Bf2AEf39/fwF/YAl/f39/f35+f38Bf2ABfwF/YAN/f38Bf2ABfwACigEXAAEwAAAAATEAAAABMgABAAEzAAEAATQAAgABNQADAAE2AAAAATcABAABOAAEAAE5AAUAAjEwAAUAAjExAAYAAjEyAAcAAjEzAAcAAjE0AAgAAjE1AAYAAjE2AAYAAjE3AAYAAjE4AAkAAjE5AAYAAjIwAAoAAjIxAAsACCRpbXBvcnRzAXABFhYJHAEAQQALFgABAgMEBQYHCAkKCwwNDg8QERITFBUALQlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQENd2l0LWNvbXBvbmVudAUwLjguMgAcBG5hbWUAFRR3aXQtY29tcG9uZW50OmZpeHVwcw');
|
|
42338
|
+
Promise.all([module0, module1, module2, module3]).catch(() => {});
|
|
42339
|
+
({ exports: exports0 } = await instantiateCore(await module2));
|
|
40989
42340
|
({ exports: exports1 } = await instantiateCore(await module0, {
|
|
40990
|
-
|
|
40991
|
-
|
|
42341
|
+
wasi_snapshot_preview1: {
|
|
42342
|
+
environ_get: exports0['16'],
|
|
42343
|
+
environ_sizes_get: exports0['17'],
|
|
42344
|
+
fd_close: exports0['18'],
|
|
42345
|
+
fd_filestat_get: exports0['11'],
|
|
42346
|
+
fd_prestat_dir_name: exports0['20'],
|
|
42347
|
+
fd_prestat_get: exports0['19'],
|
|
42348
|
+
fd_read: exports0['12'],
|
|
42349
|
+
fd_write: exports0['13'],
|
|
42350
|
+
path_open: exports0['14'],
|
|
42351
|
+
proc_exit: exports0['21'],
|
|
42352
|
+
random_get: exports0['15'],
|
|
42353
|
+
},
|
|
42354
|
+
}));
|
|
42355
|
+
({ exports: exports2 } = await instantiateCore(await module1, {
|
|
42356
|
+
__main_module__: {
|
|
42357
|
+
cabi_realloc: exports1.cabi_realloc,
|
|
42358
|
+
},
|
|
42359
|
+
env: {
|
|
42360
|
+
memory: exports1.memory,
|
|
42361
|
+
},
|
|
42362
|
+
environment: {
|
|
42363
|
+
'get-environment': exports0['6'],
|
|
42364
|
+
},
|
|
42365
|
+
exit: {
|
|
42366
|
+
exit: lowering5,
|
|
42367
|
+
},
|
|
42368
|
+
filesystem: {
|
|
42369
|
+
'append-via-stream': lowering3,
|
|
42370
|
+
'drop-descriptor': lowering4,
|
|
42371
|
+
'drop-directory-entry-stream': lowering0,
|
|
42372
|
+
'get-type': exports0['2'],
|
|
42373
|
+
'open-at': exports0['4'],
|
|
42374
|
+
'read-via-stream': lowering1,
|
|
42375
|
+
stat: exports0['3'],
|
|
42376
|
+
'write-via-stream': lowering2,
|
|
42377
|
+
},
|
|
42378
|
+
preopens: {
|
|
42379
|
+
'get-directories': exports0['1'],
|
|
42380
|
+
'get-stdio': exports0['0'],
|
|
42381
|
+
},
|
|
42382
|
+
random: {
|
|
42383
|
+
'get-random-bytes': exports0['5'],
|
|
42384
|
+
},
|
|
42385
|
+
streams: {
|
|
42386
|
+
'blocking-read': exports0['8'],
|
|
42387
|
+
'blocking-write': exports0['10'],
|
|
42388
|
+
'drop-input-stream': lowering6,
|
|
42389
|
+
'drop-output-stream': lowering7,
|
|
42390
|
+
read: exports0['7'],
|
|
42391
|
+
write: exports0['9'],
|
|
40992
42392
|
},
|
|
40993
42393
|
}));
|
|
40994
42394
|
memory0 = exports1.memory;
|
|
40995
|
-
|
|
42395
|
+
realloc0 = exports2.cabi_import_realloc;
|
|
42396
|
+
({ exports: exports3 } = await instantiateCore(await module3, {
|
|
40996
42397
|
'': {
|
|
40997
42398
|
$imports: exports0.$imports,
|
|
40998
|
-
'0':
|
|
42399
|
+
'0': lowering8,
|
|
42400
|
+
'1': lowering9,
|
|
42401
|
+
'10': lowering18,
|
|
42402
|
+
'11': exports2.fd_filestat_get,
|
|
42403
|
+
'12': exports2.fd_read,
|
|
42404
|
+
'13': exports2.fd_write,
|
|
42405
|
+
'14': exports2.path_open,
|
|
42406
|
+
'15': exports2.random_get,
|
|
42407
|
+
'16': exports2.environ_get,
|
|
42408
|
+
'17': exports2.environ_sizes_get,
|
|
42409
|
+
'18': exports2.fd_close,
|
|
42410
|
+
'19': exports2.fd_prestat_get,
|
|
42411
|
+
'2': lowering10,
|
|
42412
|
+
'20': exports2.fd_prestat_dir_name,
|
|
42413
|
+
'21': exports2.proc_exit,
|
|
42414
|
+
'3': lowering11,
|
|
42415
|
+
'4': lowering12,
|
|
42416
|
+
'5': lowering13,
|
|
42417
|
+
'6': lowering14,
|
|
42418
|
+
'7': lowering15,
|
|
42419
|
+
'8': lowering16,
|
|
42420
|
+
'9': lowering17,
|
|
40999
42421
|
},
|
|
41000
42422
|
}));
|
|
41001
|
-
|
|
42423
|
+
realloc1 = exports1.cabi_realloc;
|
|
41002
42424
|
postReturn0 = exports1['cabi_post_exports#component-embed'];
|
|
41003
42425
|
postReturn1 = exports1['cabi_post_exports#metadata-show'];
|
|
41004
42426
|
})();
|
|
@@ -41008,6 +42430,611 @@ await $init;
|
|
|
41008
42430
|
__webpack_async_result__();
|
|
41009
42431
|
} catch(e) { __webpack_async_result__(e); } }, 1);
|
|
41010
42432
|
|
|
42433
|
+
/***/ }),
|
|
42434
|
+
|
|
42435
|
+
/***/ 9187:
|
|
42436
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
42437
|
+
|
|
42438
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
42439
|
+
/* harmony export */ "zj": () => (/* binding */ getEnvironment)
|
|
42440
|
+
/* harmony export */ });
|
|
42441
|
+
/* unused harmony exports _setEnv, preopens, getArguments */
|
|
42442
|
+
/* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7742);
|
|
42443
|
+
|
|
42444
|
+
|
|
42445
|
+
let _env;
|
|
42446
|
+
function _setEnv (envObj) {
|
|
42447
|
+
_env = Object.entries(envObj);
|
|
42448
|
+
}
|
|
42449
|
+
|
|
42450
|
+
function getEnvironment () {
|
|
42451
|
+
if (!_env) _setEnv(node_process__WEBPACK_IMPORTED_MODULE_0__.env);
|
|
42452
|
+
return _env;
|
|
42453
|
+
}
|
|
42454
|
+
|
|
42455
|
+
function preopens () {
|
|
42456
|
+
return [];
|
|
42457
|
+
}
|
|
42458
|
+
|
|
42459
|
+
function getArguments () {
|
|
42460
|
+
return [];
|
|
42461
|
+
}
|
|
42462
|
+
|
|
42463
|
+
/***/ }),
|
|
42464
|
+
|
|
42465
|
+
/***/ 7393:
|
|
42466
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
42467
|
+
|
|
42468
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
42469
|
+
/* harmony export */ "J": () => (/* binding */ exit)
|
|
42470
|
+
/* harmony export */ });
|
|
42471
|
+
function exit(status) {
|
|
42472
|
+
process.exit(status.tag === 'err' ? 1 : 0);
|
|
42473
|
+
}
|
|
42474
|
+
|
|
42475
|
+
|
|
42476
|
+
/***/ }),
|
|
42477
|
+
|
|
42478
|
+
/***/ 5331:
|
|
42479
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
42480
|
+
|
|
42481
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
42482
|
+
/* harmony export */ "Lk": () => (/* binding */ dropDescriptor),
|
|
42483
|
+
/* harmony export */ "Tk": () => (/* binding */ appendViaStream),
|
|
42484
|
+
/* harmony export */ "Zw": () => (/* binding */ writeViaStream),
|
|
42485
|
+
/* harmony export */ "d2": () => (/* binding */ openAt),
|
|
42486
|
+
/* harmony export */ "fm": () => (/* binding */ _convertFsError),
|
|
42487
|
+
/* harmony export */ "h1": () => (/* binding */ dropDirectoryEntryStream),
|
|
42488
|
+
/* harmony export */ "lz": () => (/* binding */ stat),
|
|
42489
|
+
/* harmony export */ "oL": () => (/* binding */ getType),
|
|
42490
|
+
/* harmony export */ "wF": () => (/* binding */ readViaStream)
|
|
42491
|
+
/* harmony export */ });
|
|
42492
|
+
/* 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 */
|
|
42493
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7561);
|
|
42494
|
+
/* harmony import */ var _preopens_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(833);
|
|
42495
|
+
/* harmony import */ var _streams_js__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(9213);
|
|
42496
|
+
|
|
42497
|
+
|
|
42498
|
+
|
|
42499
|
+
|
|
42500
|
+
function readViaStream(fd, offset) {
|
|
42501
|
+
return (0,_streams_js__WEBPACK_IMPORTED_MODULE_2__/* ._createFileStream */ .HR)(fd, offset);
|
|
42502
|
+
}
|
|
42503
|
+
|
|
42504
|
+
function writeViaStream(fd, offset) {
|
|
42505
|
+
console.log(`[filesystem] WRITE STREAM ${fd} ${offset}`);
|
|
42506
|
+
}
|
|
42507
|
+
|
|
42508
|
+
function appendViaStream(fd) {
|
|
42509
|
+
console.log(`[filesystem] APPEND STREAM ${fd}`);
|
|
42510
|
+
}
|
|
42511
|
+
|
|
42512
|
+
function advise(fd, offset, length, advice) {
|
|
42513
|
+
console.log(`[filesystem] ADVISE`, fd, offset, length, advice);
|
|
42514
|
+
}
|
|
42515
|
+
|
|
42516
|
+
function syncData(fd) {
|
|
42517
|
+
console.log(`[filesystem] SYNC DATA ${fd}`);
|
|
42518
|
+
}
|
|
42519
|
+
|
|
42520
|
+
function getFlags(fd) {
|
|
42521
|
+
console.log(`[filesystem] FLAGS FOR ${fd}`);
|
|
42522
|
+
}
|
|
42523
|
+
|
|
42524
|
+
function getType(fd) {
|
|
42525
|
+
let type = (0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._getDescriptorType */ .Am)(fd);
|
|
42526
|
+
if (type === null) {
|
|
42527
|
+
stat(fd);
|
|
42528
|
+
type = (0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._getDescriptorType */ .Am)(fd);
|
|
42529
|
+
}
|
|
42530
|
+
return type;
|
|
42531
|
+
}
|
|
42532
|
+
|
|
42533
|
+
function setFlags(fd, flags) {
|
|
42534
|
+
console.log(`[filesystem] SET FLAGS ${fd} ${JSON.stringify(flags)}`);
|
|
42535
|
+
}
|
|
42536
|
+
|
|
42537
|
+
function setSize(fd, size) {
|
|
42538
|
+
console.log(`[filesystem] SET SIZE`, fd, size);
|
|
42539
|
+
}
|
|
42540
|
+
|
|
42541
|
+
function setTimes(fd, dataAccessTimestamp, dataModificationTimestamp) {
|
|
42542
|
+
console.log(`[filesystem] SET TIMES`, fd, dataAccessTimestamp, dataModificationTimestamp);
|
|
42543
|
+
}
|
|
42544
|
+
|
|
42545
|
+
function read(fd, length, offset) {
|
|
42546
|
+
console.log(`[filesystem] READ`, fd, length, offset);
|
|
42547
|
+
}
|
|
42548
|
+
|
|
42549
|
+
function write(fd, buffer, offset) {
|
|
42550
|
+
console.log(`[filesystem] WRITE`, fd, buffer, offset);
|
|
42551
|
+
}
|
|
42552
|
+
|
|
42553
|
+
let _dirStreams = [];
|
|
42554
|
+
function readDirectory(fd) {
|
|
42555
|
+
const fullPath = _getFullPath(fd);
|
|
42556
|
+
let dirs;
|
|
42557
|
+
try {
|
|
42558
|
+
dirs = readdirSync(fullPath, { withFileTypes: true });
|
|
42559
|
+
}
|
|
42560
|
+
catch (e) {
|
|
42561
|
+
_convertFsError(e);
|
|
42562
|
+
}
|
|
42563
|
+
_dirStreams.push({ fd, dirs, cursor: 0 });
|
|
42564
|
+
return _dirStreams.length - 1;
|
|
42565
|
+
}
|
|
42566
|
+
|
|
42567
|
+
function sync(fd) {
|
|
42568
|
+
console.log(`[filesystem] SYNC`, fd);
|
|
42569
|
+
}
|
|
42570
|
+
|
|
42571
|
+
function createDirectoryAt(fd, path) {
|
|
42572
|
+
console.log(`[filesystem] CREATE DIRECTORY`, fd, path);
|
|
42573
|
+
}
|
|
42574
|
+
|
|
42575
|
+
const nsMagnitude = 1_000_000_000_000n;
|
|
42576
|
+
function nsToDateTime (ns) {
|
|
42577
|
+
const seconds = ns / nsMagnitude;
|
|
42578
|
+
const nanoseconds = Number(ns % seconds);
|
|
42579
|
+
return { seconds, nanoseconds };
|
|
42580
|
+
}
|
|
42581
|
+
|
|
42582
|
+
function _convertFsError (e) {
|
|
42583
|
+
switch (e.code) {
|
|
42584
|
+
case 'EACCES': throw 'access';
|
|
42585
|
+
case 'EAGAIN':
|
|
42586
|
+
case 'EWOULDBLOCK': throw 'would-block';
|
|
42587
|
+
case 'EALREADY': throw 'already';
|
|
42588
|
+
case 'EBADF': throw 'bad-descriptor';
|
|
42589
|
+
case 'EBUSY': throw 'busy';
|
|
42590
|
+
case 'EDEADLK': throw 'deadlock';
|
|
42591
|
+
case 'EDQUOT': throw 'quota';
|
|
42592
|
+
case 'EEXIST': throw 'exist';
|
|
42593
|
+
case 'EFBIG': throw 'file-too-large';
|
|
42594
|
+
case 'EILSEQ': throw 'illegal-byte-sequence';
|
|
42595
|
+
case 'EINPROGRESS': throw 'in-progress';
|
|
42596
|
+
case 'EINTR': throw 'interrupted';
|
|
42597
|
+
case 'EINVAL': throw 'invalid';
|
|
42598
|
+
case 'EIO': throw 'io';
|
|
42599
|
+
case 'EISDIR': throw 'is-directory';
|
|
42600
|
+
case 'ELOOP': throw 'loop';
|
|
42601
|
+
case 'EMLINK': throw 'too-many-links';
|
|
42602
|
+
case 'EMSGSIZE': throw 'message-size';
|
|
42603
|
+
case 'ENAMETOOLONG': throw 'name-too-long'
|
|
42604
|
+
case 'ENODEV': throw 'no-device';
|
|
42605
|
+
case 'ENOENT': throw 'no-entry';
|
|
42606
|
+
case 'ENOLCK': throw 'no-lock';
|
|
42607
|
+
case 'ENOMEM': throw 'insufficient-memory';
|
|
42608
|
+
case 'ENOSPC': throw 'insufficient-space';
|
|
42609
|
+
case 'ENOTDIR': throw 'not-directory';
|
|
42610
|
+
case 'ENOTEMPTY': throw 'not-empty';
|
|
42611
|
+
case 'ENOTRECOVERABLE': throw 'not-recoverable';
|
|
42612
|
+
case 'ENOTSUP': throw 'unsupported';
|
|
42613
|
+
case 'ENOTTY': throw 'no-tty';
|
|
42614
|
+
case 'ENXIO': throw 'no-such-device';
|
|
42615
|
+
case 'EOVERFLOW': throw 'overflow';
|
|
42616
|
+
case 'EPERM': throw 'not-permitted';
|
|
42617
|
+
case 'EPIPE': throw 'pipe';
|
|
42618
|
+
case 'EROFS': throw 'read-only';
|
|
42619
|
+
case 'ESPIPE': throw 'invalid-seek';
|
|
42620
|
+
case 'ETXTBSY': throw 'text-file-busy';
|
|
42621
|
+
case 'EXDEV': throw 'cross-device';
|
|
42622
|
+
default: throw e;
|
|
42623
|
+
}
|
|
42624
|
+
}
|
|
42625
|
+
|
|
42626
|
+
function _lookupType (obj) {
|
|
42627
|
+
if (obj.isFile())
|
|
42628
|
+
return 'regular-file';
|
|
42629
|
+
else if (obj.isSocket())
|
|
42630
|
+
return 'socket';
|
|
42631
|
+
else if (obj.isSymbolicLink())
|
|
42632
|
+
return 'symbolic-link';
|
|
42633
|
+
else if (obj.isFIFO())
|
|
42634
|
+
return 'fifo';
|
|
42635
|
+
else if (obj.isDirectory())
|
|
42636
|
+
return 'directory';
|
|
42637
|
+
else if (obj.isCharacterDevice())
|
|
42638
|
+
return 'character-device';
|
|
42639
|
+
else if (obj.isBlockDevice())
|
|
42640
|
+
return 'block-device';
|
|
42641
|
+
return 'unknown';
|
|
42642
|
+
}
|
|
42643
|
+
|
|
42644
|
+
function stat(fd) {
|
|
42645
|
+
let stats;
|
|
42646
|
+
try {
|
|
42647
|
+
stats = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.fstatSync)(fd, { bigint: true });
|
|
42648
|
+
}
|
|
42649
|
+
catch (e) {
|
|
42650
|
+
_convertFsError(e);
|
|
42651
|
+
}
|
|
42652
|
+
const type = _lookupType(stats);
|
|
42653
|
+
(0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._setDescriptorType */ .wM)(fd, type);
|
|
42654
|
+
return {
|
|
42655
|
+
device: stats.dev,
|
|
42656
|
+
inode: stats.ino,
|
|
42657
|
+
type,
|
|
42658
|
+
linkCount: stats.nlink,
|
|
42659
|
+
size: stats.size,
|
|
42660
|
+
dataAccessTimestamp: nsToDateTime(stats.atimeNs),
|
|
42661
|
+
dataModificationTimestamp: nsToDateTime(stats.mtimeNs),
|
|
42662
|
+
statusChangeTimestamp: nsToDateTime(stats.ctimeNs),
|
|
42663
|
+
};
|
|
42664
|
+
}
|
|
42665
|
+
|
|
42666
|
+
function statAt(fd, { symlinkFollow }, path) {
|
|
42667
|
+
const fullPath = _descriptors[fd].path + path;
|
|
42668
|
+
let stats;
|
|
42669
|
+
try {
|
|
42670
|
+
stats = (symlinkFollow ? statSync : lstatSync)(fullPath, { bigint: true });
|
|
42671
|
+
}
|
|
42672
|
+
catch (e) {
|
|
42673
|
+
_convertFsError(e);
|
|
42674
|
+
}
|
|
42675
|
+
const type = _lookupType(stats);
|
|
42676
|
+
_setSubdescriptorType(fd, path, type);
|
|
42677
|
+
return {
|
|
42678
|
+
device: stats.dev,
|
|
42679
|
+
inode: stats.ino,
|
|
42680
|
+
type,
|
|
42681
|
+
linkCount: stats.nlink,
|
|
42682
|
+
size: stats.size,
|
|
42683
|
+
dataAccessTimestamp: nsToDateTime(stats.atimeNs),
|
|
42684
|
+
dataModificationTimestamp: nsToDateTime(stats.mtimeNs),
|
|
42685
|
+
statusChangeTimestamp: nsToDateTime(stats.ctimeNs),
|
|
42686
|
+
};
|
|
42687
|
+
}
|
|
42688
|
+
|
|
42689
|
+
function setTimesAt(fd) {
|
|
42690
|
+
console.log(`[filesystem] SET TIMES AT`, fd);
|
|
42691
|
+
}
|
|
42692
|
+
|
|
42693
|
+
function linkAt(fd) {
|
|
42694
|
+
console.log(`[filesystem] LINK AT`, fd);
|
|
42695
|
+
}
|
|
42696
|
+
|
|
42697
|
+
function openAt(fd, pathFlags, path, openFlags, descriptorFlags, modes) {
|
|
42698
|
+
// TODO
|
|
42699
|
+
// if (pathFlags.symlinkFollow) {
|
|
42700
|
+
// // resolve symlink
|
|
42701
|
+
// }
|
|
42702
|
+
const fullPath = _preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._descriptors */ .$B[fd].path + path;
|
|
42703
|
+
let fsOpenFlags = 0x0;
|
|
42704
|
+
if (openFlags.create)
|
|
42705
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_CREAT;
|
|
42706
|
+
if (openFlags.directory)
|
|
42707
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_DIRECTORY;
|
|
42708
|
+
if (openFlags.exclusive)
|
|
42709
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_EXCL;
|
|
42710
|
+
if (openFlags.truncate)
|
|
42711
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_TRUNC;
|
|
42712
|
+
if (descriptorFlags.read && descriptorFlags.write)
|
|
42713
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_RDWR;
|
|
42714
|
+
else if (descriptorFlags.write)
|
|
42715
|
+
fsOpenFlags |= node_fs__WEBPACK_IMPORTED_MODULE_0__.constants.O_WRONLY;
|
|
42716
|
+
// if (descriptorFlags.fileIntegritySync)
|
|
42717
|
+
// if (descriptorFlags.dataIntegritySync)
|
|
42718
|
+
// if (descriptorFlags.requestedWriteSync)
|
|
42719
|
+
// if (descriptorFlags.mutateDirectory)
|
|
42720
|
+
let fsMode = 0x0;
|
|
42721
|
+
if (modes.readable)
|
|
42722
|
+
fsMode |= 0o444;
|
|
42723
|
+
if (modes.writeable)
|
|
42724
|
+
fsMode |= 0o222;
|
|
42725
|
+
if (modes.executable)
|
|
42726
|
+
fsMode |= 0o111;
|
|
42727
|
+
let localFd;
|
|
42728
|
+
try {
|
|
42729
|
+
localFd = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.openSync)(fullPath, fsOpenFlags, fsMode);
|
|
42730
|
+
}
|
|
42731
|
+
catch (e) {
|
|
42732
|
+
_convertFsError(e);
|
|
42733
|
+
}
|
|
42734
|
+
(0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._addOpenedDescriptor */ .jX)(localFd, path, fd);
|
|
42735
|
+
return localFd;
|
|
42736
|
+
}
|
|
42737
|
+
|
|
42738
|
+
function readlinkAt(fd) {
|
|
42739
|
+
console.log(`[filesystem] READLINK AT`, fd);
|
|
42740
|
+
}
|
|
42741
|
+
|
|
42742
|
+
function removeDirectoryAt(fd) {
|
|
42743
|
+
console.log(`[filesystem] REMOVE DIR AT`, fd);
|
|
42744
|
+
}
|
|
42745
|
+
|
|
42746
|
+
function renameAt(fd) {
|
|
42747
|
+
console.log(`[filesystem] RENAME AT`, fd);
|
|
42748
|
+
}
|
|
42749
|
+
|
|
42750
|
+
function symlinkAt(fd) {
|
|
42751
|
+
console.log(`[filesystem] SYMLINK AT`, fd);
|
|
42752
|
+
}
|
|
42753
|
+
|
|
42754
|
+
function unlinkFileAt(fd) {
|
|
42755
|
+
console.log(`[filesystem] UNLINK FILE AT`, fd);
|
|
42756
|
+
}
|
|
42757
|
+
|
|
42758
|
+
function changeFilePermissionsAt(fd) {
|
|
42759
|
+
console.log(`[filesystem] CHANGE FILE PERMISSIONS AT`, fd);
|
|
42760
|
+
}
|
|
42761
|
+
|
|
42762
|
+
function changeDirectoryPermissionsAt(fd) {
|
|
42763
|
+
console.log(`[filesystem] CHANGE DIR PERMISSIONS AT`, fd);
|
|
42764
|
+
}
|
|
42765
|
+
|
|
42766
|
+
function lockShared(fd) {
|
|
42767
|
+
console.log(`[filesystem] LOCK SHARED`, fd);
|
|
42768
|
+
}
|
|
42769
|
+
|
|
42770
|
+
function lockExclusive(fd) {
|
|
42771
|
+
console.log(`[filesystem] LOCK EXCLUSIVE`, fd);
|
|
42772
|
+
}
|
|
42773
|
+
|
|
42774
|
+
function tryLockShared(fd) {
|
|
42775
|
+
console.log(`[filesystem] TRY LOCK SHARED`, fd);
|
|
42776
|
+
}
|
|
42777
|
+
|
|
42778
|
+
function tryLockExclusive(fd) {
|
|
42779
|
+
console.log(`[filesystem] TRY LOCK EXCLUSIVE`, fd);
|
|
42780
|
+
}
|
|
42781
|
+
|
|
42782
|
+
function unlock(fd) {
|
|
42783
|
+
console.log(`[filesystem] UNLOCK`, fd);
|
|
42784
|
+
}
|
|
42785
|
+
|
|
42786
|
+
function dropDescriptor(fd) {
|
|
42787
|
+
(0,_preopens_js__WEBPACK_IMPORTED_MODULE_1__/* ._removeOpenedDescriptor */ ._x)(fd);
|
|
42788
|
+
(0,node_fs__WEBPACK_IMPORTED_MODULE_0__.closeSync)(fd);
|
|
42789
|
+
}
|
|
42790
|
+
|
|
42791
|
+
function readDirectoryEntry(stream) {
|
|
42792
|
+
const streamValue = _dirStreams[stream];
|
|
42793
|
+
if (streamValue.cursor === streamValue.dirs.length)
|
|
42794
|
+
return null;
|
|
42795
|
+
const dir = streamValue.dirs[streamValue.cursor++];
|
|
42796
|
+
const type = _lookupType(dir);
|
|
42797
|
+
_setSubdescriptorType(streamValue.fd, '/' + dir.name, type);
|
|
42798
|
+
return { inode: null, type, name: dir.name };
|
|
42799
|
+
}
|
|
42800
|
+
|
|
42801
|
+
function dropDirectoryEntryStream(stream) {
|
|
42802
|
+
_dirStreams.splice(stream, 1);
|
|
42803
|
+
}
|
|
42804
|
+
|
|
42805
|
+
|
|
42806
|
+
/***/ }),
|
|
42807
|
+
|
|
42808
|
+
/***/ 833:
|
|
42809
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
42810
|
+
|
|
42811
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
42812
|
+
/* harmony export */ "$B": () => (/* binding */ _descriptors),
|
|
42813
|
+
/* harmony export */ "$z": () => (/* binding */ getDirectories),
|
|
42814
|
+
/* harmony export */ "Am": () => (/* binding */ _getDescriptorType),
|
|
42815
|
+
/* harmony export */ "_x": () => (/* binding */ _removeOpenedDescriptor),
|
|
42816
|
+
/* harmony export */ "jX": () => (/* binding */ _addOpenedDescriptor),
|
|
42817
|
+
/* harmony export */ "vT": () => (/* binding */ getStdio),
|
|
42818
|
+
/* harmony export */ "wM": () => (/* binding */ _setDescriptorType)
|
|
42819
|
+
/* harmony export */ });
|
|
42820
|
+
/* unused harmony exports _getFullPath, _setSubdescriptorType, _setPreopens */
|
|
42821
|
+
// default is full permissions
|
|
42822
|
+
let preopenCnt = 4;
|
|
42823
|
+
let _descriptors = {
|
|
42824
|
+
3: { type: 'directory', path: '/', parent: null, subpathTypes: {} }
|
|
42825
|
+
};
|
|
42826
|
+
let directories = [[3, '/']];
|
|
42827
|
+
|
|
42828
|
+
function _getFullPath (fd) {
|
|
42829
|
+
let path = '';
|
|
42830
|
+
while (fd) {
|
|
42831
|
+
path = _descriptors[fd].path + path;
|
|
42832
|
+
fd = _descriptors[fd].parent;
|
|
42833
|
+
}
|
|
42834
|
+
return path;
|
|
42835
|
+
}
|
|
42836
|
+
|
|
42837
|
+
function _getDescriptorType (fd) {
|
|
42838
|
+
return _descriptors[fd].type;
|
|
42839
|
+
}
|
|
42840
|
+
|
|
42841
|
+
function _setDescriptorType (fd, type) {
|
|
42842
|
+
_descriptors[fd].type = type;
|
|
42843
|
+
}
|
|
42844
|
+
|
|
42845
|
+
function _setSubdescriptorType (fd, path, type) {
|
|
42846
|
+
while (_descriptors[fd].parent) {
|
|
42847
|
+
path = _descriptors[fd].path + path;
|
|
42848
|
+
fd = _descriptors[fd].parent;
|
|
42849
|
+
}
|
|
42850
|
+
_descriptors[fd].subpathTypes[path] = type;
|
|
42851
|
+
}
|
|
42852
|
+
|
|
42853
|
+
function _addOpenedDescriptor (fd, path, parentFd) {
|
|
42854
|
+
if (fd < preopenCnt || _descriptors[fd])
|
|
42855
|
+
throw 'bad-descriptor';
|
|
42856
|
+
let type = null;
|
|
42857
|
+
for (const [_path, _type] of Object.entries(_descriptors[parentFd].subpathTypes)) {
|
|
42858
|
+
if (_path === path)
|
|
42859
|
+
type = _type;
|
|
42860
|
+
}
|
|
42861
|
+
_descriptors[fd] = { path, type, parent: parentFd, subpathTypes: {} };
|
|
42862
|
+
}
|
|
42863
|
+
|
|
42864
|
+
function _removeOpenedDescriptor (fd) {
|
|
42865
|
+
if (fd < preopenCnt)
|
|
42866
|
+
throw 'eperm';
|
|
42867
|
+
delete _descriptors[fd];
|
|
42868
|
+
}
|
|
42869
|
+
|
|
42870
|
+
function _setPreopens (preopens) {
|
|
42871
|
+
_descriptors = {};
|
|
42872
|
+
directories = [,,];
|
|
42873
|
+
for (const [virtualPath, path] of Object.entries(preopens)) {
|
|
42874
|
+
_descriptors[preopenCnt] = { type: 'directory', path, parent: null, subpathTypes: {} };
|
|
42875
|
+
directories.push([preopenCnt++, virtualPath]);
|
|
42876
|
+
}
|
|
42877
|
+
}
|
|
42878
|
+
|
|
42879
|
+
function getStdio () {
|
|
42880
|
+
return {
|
|
42881
|
+
stdin: 0,
|
|
42882
|
+
stdout: 1,
|
|
42883
|
+
stderr: 2,
|
|
42884
|
+
};
|
|
42885
|
+
}
|
|
42886
|
+
|
|
42887
|
+
function getDirectories () {
|
|
42888
|
+
return directories;
|
|
42889
|
+
}
|
|
42890
|
+
|
|
42891
|
+
|
|
42892
|
+
/***/ }),
|
|
42893
|
+
|
|
42894
|
+
/***/ 8576:
|
|
42895
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
42896
|
+
|
|
42897
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
42898
|
+
/* harmony export */ "Iv": () => (/* binding */ getRandomBytes)
|
|
42899
|
+
/* harmony export */ });
|
|
42900
|
+
/* unused harmony exports getRandomU64, insecureRandom */
|
|
42901
|
+
/* harmony import */ var node_crypto__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(6005);
|
|
42902
|
+
|
|
42903
|
+
|
|
42904
|
+
function getRandomBytes(len) {
|
|
42905
|
+
return (0,node_crypto__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(Number(len));
|
|
42906
|
+
}
|
|
42907
|
+
|
|
42908
|
+
function getRandomU64 () {
|
|
42909
|
+
return new BigUint64Array(randomBytes(8).buffer)[0];
|
|
42910
|
+
}
|
|
42911
|
+
|
|
42912
|
+
let insecureRandomValue1, insecureRandomValue2;
|
|
42913
|
+
function insecureRandom () {
|
|
42914
|
+
if (insecureRandomValue1 === undefined) {
|
|
42915
|
+
insecureRandomValue1 = getRandomU64();
|
|
42916
|
+
insecureRandomValue2 = getRandomU64();
|
|
42917
|
+
}
|
|
42918
|
+
return [insecureRandomValue1, insecureRandomValue2];
|
|
42919
|
+
}
|
|
42920
|
+
|
|
42921
|
+
|
|
42922
|
+
/***/ }),
|
|
42923
|
+
|
|
42924
|
+
/***/ 9213:
|
|
42925
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
42926
|
+
|
|
42927
|
+
/* harmony export */ __nccwpck_require__.d(__webpack_exports__, {
|
|
42928
|
+
/* harmony export */ "HR": () => (/* binding */ _createFileStream),
|
|
42929
|
+
/* harmony export */ "O_": () => (/* binding */ blockingRead),
|
|
42930
|
+
/* harmony export */ "cW": () => (/* binding */ write),
|
|
42931
|
+
/* harmony export */ "dU": () => (/* binding */ dropInputStream),
|
|
42932
|
+
/* harmony export */ "ij": () => (/* binding */ read),
|
|
42933
|
+
/* harmony export */ "oc": () => (/* binding */ dropOutputStream),
|
|
42934
|
+
/* harmony export */ "v_": () => (/* binding */ blockingWrite)
|
|
42935
|
+
/* harmony export */ });
|
|
42936
|
+
/* unused harmony exports _streams, skip, blockingSkip, subscribeToInputStream, writeZeroes, blockingWriteZeroes, splice, blockingSplice, forward, subscribeToOutputStream */
|
|
42937
|
+
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(7561);
|
|
42938
|
+
/* harmony import */ var _filesystem_js__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(5331);
|
|
42939
|
+
|
|
42940
|
+
|
|
42941
|
+
|
|
42942
|
+
let _streams = {};
|
|
42943
|
+
let streamCnt = 0;
|
|
42944
|
+
function _createFileStream(fd, offset) {
|
|
42945
|
+
// note we only support offset 0
|
|
42946
|
+
if (Number(offset) === 0)
|
|
42947
|
+
_streams[streamCnt] = {
|
|
42948
|
+
type: 'file',
|
|
42949
|
+
fd: fd
|
|
42950
|
+
};
|
|
42951
|
+
return streamCnt++;
|
|
42952
|
+
}
|
|
42953
|
+
|
|
42954
|
+
function read(s, len) {
|
|
42955
|
+
switch (s) {
|
|
42956
|
+
case 0:
|
|
42957
|
+
return [process.stdin.read(len), true];
|
|
42958
|
+
default:
|
|
42959
|
+
throw new Error(`TODO: write ${s}`);
|
|
42960
|
+
}
|
|
42961
|
+
}
|
|
42962
|
+
function blockingRead(s, len) {
|
|
42963
|
+
len = Number(len);
|
|
42964
|
+
const stream = _streams[s];
|
|
42965
|
+
if (!stream) throw null;
|
|
42966
|
+
switch (stream.type) {
|
|
42967
|
+
case 'file': {
|
|
42968
|
+
const buf = Buffer.alloc(Number(len));
|
|
42969
|
+
try {
|
|
42970
|
+
const readBytes = (0,node_fs__WEBPACK_IMPORTED_MODULE_0__.readSync)(stream.fd, buf, 0, Number(len));
|
|
42971
|
+
if (readBytes < Number(len))
|
|
42972
|
+
return [new Uint8Array(), true];
|
|
42973
|
+
return [new Uint8Array(buf.buffer, 0, readBytes), false];
|
|
42974
|
+
}
|
|
42975
|
+
catch (e) {
|
|
42976
|
+
(0,_filesystem_js__WEBPACK_IMPORTED_MODULE_1__/* ._convertFsError */ .fm)(e);
|
|
42977
|
+
}
|
|
42978
|
+
break;
|
|
42979
|
+
}
|
|
42980
|
+
default: throw null;
|
|
42981
|
+
}
|
|
42982
|
+
}
|
|
42983
|
+
function skip(s, _len) {
|
|
42984
|
+
console.log(`[streams] Skip ${s}`);
|
|
42985
|
+
}
|
|
42986
|
+
function blockingSkip(s, _len) {
|
|
42987
|
+
console.log(`[streams] Blocking skip ${s}`);
|
|
42988
|
+
}
|
|
42989
|
+
function subscribeToInputStream(s) {
|
|
42990
|
+
console.log(`[streams] Subscribe to input stream ${s}`);
|
|
42991
|
+
}
|
|
42992
|
+
function dropInputStream(s) {
|
|
42993
|
+
delete _streams[s];
|
|
42994
|
+
|
|
42995
|
+
}
|
|
42996
|
+
function write(s, buf) {
|
|
42997
|
+
switch (s) {
|
|
42998
|
+
case 0:
|
|
42999
|
+
throw new Error(`TODO: write stdin`);
|
|
43000
|
+
case 1: {
|
|
43001
|
+
process.stdout.write(buf);
|
|
43002
|
+
return BigInt(buf.byteLength);
|
|
43003
|
+
}
|
|
43004
|
+
case 2: {
|
|
43005
|
+
process.stderr.write(buf);
|
|
43006
|
+
return BigInt(buf.byteLength);
|
|
43007
|
+
}
|
|
43008
|
+
default:
|
|
43009
|
+
throw new Error(`TODO: write ${s}`);
|
|
43010
|
+
}
|
|
43011
|
+
}
|
|
43012
|
+
function blockingWrite(s, _buf) {
|
|
43013
|
+
console.log(`[streams] Blocking write ${s}`);
|
|
43014
|
+
}
|
|
43015
|
+
function writeZeroes(s, _len) {
|
|
43016
|
+
console.log(`[streams] Write zeroes ${s}`);
|
|
43017
|
+
}
|
|
43018
|
+
function blockingWriteZeroes(s, _len) {
|
|
43019
|
+
console.log(`[streams] Blocking write zeroes ${s}`);
|
|
43020
|
+
}
|
|
43021
|
+
function splice(s, _src, _len) {
|
|
43022
|
+
console.log(`[streams] Splice ${s}`);
|
|
43023
|
+
}
|
|
43024
|
+
function blockingSplice(s, _src, _len) {
|
|
43025
|
+
console.log(`[streams] Blocking splice ${s}`);
|
|
43026
|
+
}
|
|
43027
|
+
function forward(s, _src) {
|
|
43028
|
+
console.log(`[streams] Forward ${s}`);
|
|
43029
|
+
}
|
|
43030
|
+
function subscribeToOutputStream(s) {
|
|
43031
|
+
console.log(`[streams] Subscribe to output stream ${s}`);
|
|
43032
|
+
}
|
|
43033
|
+
function dropOutputStream(s) {
|
|
43034
|
+
console.log(`[streams] Drop output stream ${s}`);
|
|
43035
|
+
}
|
|
43036
|
+
|
|
43037
|
+
|
|
41011
43038
|
/***/ }),
|
|
41012
43039
|
|
|
41013
43040
|
/***/ 6772:
|
|
@@ -41037,10 +43064,10 @@ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_cmd
|
|
|
41037
43064
|
|
|
41038
43065
|
const { parse, print, componentNew, componentWit, componentEmbed, metadataAdd, metadataShow } = _obj_wasm_tools_js__WEBPACK_IMPORTED_MODULE_2__/* .exports */ .I;
|
|
41039
43066
|
function preview1AdapterCommandPath () {
|
|
41040
|
-
return __nccwpck_require__.ab + "
|
|
43067
|
+
return __nccwpck_require__.ab + "wasi_preview1_component_adapter.command.wasm";
|
|
41041
43068
|
}
|
|
41042
43069
|
function preview1AdapterReactorPath () {
|
|
41043
|
-
return __nccwpck_require__.ab + "
|
|
43070
|
+
return __nccwpck_require__.ab + "wasi_preview1_component_adapter.reactor.wasm";
|
|
41044
43071
|
}
|
|
41045
43072
|
|
|
41046
43073
|
__webpack_async_result__();
|
|
@@ -41060,7 +43087,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
41060
43087
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3292);
|
|
41061
43088
|
/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(7310);
|
|
41062
43089
|
/* harmony import */ var chalk_template__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(267);
|
|
41063
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(
|
|
43090
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(7829);
|
|
41064
43091
|
/* harmony import */ var ora__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(2719);
|
|
41065
43092
|
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_obj_wasm_tools_js__WEBPACK_IMPORTED_MODULE_0__]);
|
|
41066
43093
|
_obj_wasm_tools_js__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
|
|
@@ -41233,7 +43260,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
|
|
|
41233
43260
|
/* harmony import */ var fs_promises__WEBPACK_IMPORTED_MODULE_1__ = __nccwpck_require__(3292);
|
|
41234
43261
|
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __nccwpck_require__(1017);
|
|
41235
43262
|
/* harmony import */ var chalk_template__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(267);
|
|
41236
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(
|
|
43263
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(7829);
|
|
41237
43264
|
/* harmony import */ var _opt_js__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(5862);
|
|
41238
43265
|
/* harmony import */ var terser__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(1124);
|
|
41239
43266
|
/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_7__ = __nccwpck_require__(7310);
|
|
@@ -41323,6 +43350,8 @@ async function wasm2Js (source) {
|
|
|
41323
43350
|
* @returns {Promise<{ files: { [filename: string]: Uint8Array }, imports: string[], exports: [string, 'function' | 'instance'][] }>}
|
|
41324
43351
|
*/
|
|
41325
43352
|
async function transpileComponent (component, opts = {}) {
|
|
43353
|
+
if (opts.noWasiShim) opts.wasiShim = false;
|
|
43354
|
+
|
|
41326
43355
|
let spinner;
|
|
41327
43356
|
const showSpinner = (0,_common_js__WEBPACK_IMPORTED_MODULE_4__/* .getShowSpinner */ .AZ)();
|
|
41328
43357
|
if (opts.optimize) {
|
|
@@ -41330,19 +43359,37 @@ async function transpileComponent (component, opts = {}) {
|
|
|
41330
43359
|
({ component } = await (0,_opt_js__WEBPACK_IMPORTED_MODULE_5__/* .optimizeComponent */ .j)(component, opts));
|
|
41331
43360
|
}
|
|
41332
43361
|
|
|
41333
|
-
if (opts.wasiShim) {
|
|
43362
|
+
if (opts.wasiShim !== false) {
|
|
41334
43363
|
opts.map = Object.assign({
|
|
43364
|
+
// Deprecated
|
|
41335
43365
|
'environment-preopens': '@bytecodealliance/preview2-shim/environment-preopens',
|
|
43366
|
+
'console': '@bytecodealliance/preview2-shim/console',
|
|
43367
|
+
'default-outgoing-HTTP': '@bytecodealliance/preview2-shim/default-outgoing-HTTP',
|
|
41336
43368
|
'environment': '@bytecodealliance/preview2-shim/environment',
|
|
43369
|
+
// Deprecated
|
|
43370
|
+
'environment-preopens': '@bytecodealliance/preview2-shim/environment-preopens',
|
|
41337
43371
|
'exit': '@bytecodealliance/preview2-shim/exit',
|
|
41338
43372
|
'filesystem': '@bytecodealliance/preview2-shim/filesystem',
|
|
43373
|
+
// Deprecated
|
|
41339
43374
|
'instance-monotonic-clock': '@bytecodealliance/preview2-shim/instance-monotonic-clock',
|
|
43375
|
+
// Deprecated
|
|
41340
43376
|
'instance-wall-clock': '@bytecodealliance/preview2-shim/instance-wall-clock',
|
|
43377
|
+
'instance-network': '@bytecodealliance/preview2-shim/instance-network',
|
|
43378
|
+
'ip-name-lookup': '@bytecodealliance/preview2-shim/ip-name-lookup',
|
|
41341
43379
|
'monotonic-clock': '@bytecodealliance/preview2-shim/monotonic-clock',
|
|
43380
|
+
'network': '@bytecodealliance/preview2-shim/network',
|
|
43381
|
+
'poll': '@bytecodealliance/preview2-shim/poll',
|
|
41342
43382
|
'preopens': '@bytecodealliance/preview2-shim/preopens',
|
|
41343
43383
|
'random': '@bytecodealliance/preview2-shim/random',
|
|
43384
|
+
// Deprecated
|
|
41344
43385
|
'stderr': '@bytecodealliance/preview2-shim/stderr',
|
|
41345
43386
|
'streams': '@bytecodealliance/preview2-shim/streams',
|
|
43387
|
+
'tcp-create-socket': '@bytecodealliance/preview2-shim/tcp-create-socket',
|
|
43388
|
+
'tcp': '@bytecodealliance/preview2-shim/tcp',
|
|
43389
|
+
'timezone': '@bytecodealliance/preview2-shim/timezone',
|
|
43390
|
+
'types': '@bytecodealliance/preview2-shim/types',
|
|
43391
|
+
'udp-create-socket': '@bytecodealliance/preview2-shim/udp-create-socket',
|
|
43392
|
+
'udp': '@bytecodealliance/preview2-shim/udp',
|
|
41346
43393
|
'wall-clock': '@bytecodealliance/preview2-shim/wall-clock'
|
|
41347
43394
|
}, opts.map || {});
|
|
41348
43395
|
}
|
|
@@ -41623,7 +43670,7 @@ __webpack_async_result__();
|
|
|
41623
43670
|
|
|
41624
43671
|
/***/ }),
|
|
41625
43672
|
|
|
41626
|
-
/***/
|
|
43673
|
+
/***/ 7829:
|
|
41627
43674
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
|
|
41628
43675
|
|
|
41629
43676
|
|
|
@@ -41636,8 +43683,8 @@ __nccwpck_require__.d(__webpack_exports__, {
|
|
|
41636
43683
|
|
|
41637
43684
|
// UNUSED EXPORTS: fixedDigitDisplay, getTmpFile, readFile, sizeStr, table
|
|
41638
43685
|
|
|
41639
|
-
|
|
41640
|
-
|
|
43686
|
+
// EXTERNAL MODULE: external "node:crypto"
|
|
43687
|
+
var external_node_crypto_ = __nccwpck_require__(6005);
|
|
41641
43688
|
;// CONCATENATED MODULE: external "node:path"
|
|
41642
43689
|
const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path");
|
|
41643
43690
|
// EXTERNAL MODULE: external "node:os"
|
|
@@ -41710,7 +43757,7 @@ function table (data, align = []) {
|
|
|
41710
43757
|
}
|
|
41711
43758
|
|
|
41712
43759
|
function getTmpFile (source, ext) {
|
|
41713
|
-
return (0,external_node_path_namespaceObject.resolve)((0,external_node_os_.tmpdir)(),
|
|
43760
|
+
return (0,external_node_path_namespaceObject.resolve)((0,external_node_os_.tmpdir)(), external_node_crypto_.createHash('sha256').update(source).update(Math.random().toString()).digest('hex') + ext);
|
|
41714
43761
|
}
|
|
41715
43762
|
|
|
41716
43763
|
async function readFileCli (file, encoding) {
|