libav-wasm 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -18
- package/build/libav.wasm +0 -0
- package/build/{worker/index.d.ts → worker.d.ts} +3 -11
- package/build/worker.js +554 -554
- package/package.json +1 -2
package/build/worker.js
CHANGED
|
@@ -3,15 +3,15 @@ const Na = "osra-message", Wa = ({
|
|
|
3
3
|
resolvers: u,
|
|
4
4
|
filter: _,
|
|
5
5
|
map: h,
|
|
6
|
-
key:
|
|
6
|
+
key: I = Na
|
|
7
7
|
}) => {
|
|
8
8
|
const i = (k) => {
|
|
9
|
-
if (!k.data || typeof k.data != "object" || k.data?.source !==
|
|
9
|
+
if (!k.data || typeof k.data != "object" || k.data?.source !== I || _ && !_(k))
|
|
10
10
|
return;
|
|
11
|
-
const { type:
|
|
12
|
-
if (!
|
|
13
|
-
throw new Error(`Osra received a message of type "${String(
|
|
14
|
-
h ?
|
|
11
|
+
const { type: $, data: E, port: S } = k.data, F = u[$];
|
|
12
|
+
if (!F)
|
|
13
|
+
throw new Error(`Osra received a message of type "${String($)}" but no resolver was found for type.`);
|
|
14
|
+
h ? F(...h(E, { event: k, type: $, port: S })) : F(E, { event: k, type: $, port: S });
|
|
15
15
|
};
|
|
16
16
|
return c.addEventListener("message", i), {
|
|
17
17
|
listener: i,
|
|
@@ -24,32 +24,32 @@ const Na = "osra-message", Wa = ({
|
|
|
24
24
|
const { port1: u, port2: _ } = new MessageChannel();
|
|
25
25
|
return u.addEventListener("message", async (h) => {
|
|
26
26
|
try {
|
|
27
|
-
const
|
|
27
|
+
const I = await c(...h.data), i = ke(I), k = Zt(i);
|
|
28
28
|
u.postMessage({ result: i }, { transfer: k });
|
|
29
|
-
} catch (
|
|
30
|
-
u.postMessage({ error:
|
|
29
|
+
} catch (I) {
|
|
30
|
+
u.postMessage({ error: I });
|
|
31
31
|
}
|
|
32
32
|
}), u.start(), _;
|
|
33
|
-
},
|
|
33
|
+
}, ke = (c) => qt(c) || Kt(c) ? c : typeof c == "function" ? { [Gt]: Ha(c) } : Array.isArray(c) ? c.map(ke) : c && typeof c == "object" ? Object.fromEntries(
|
|
34
34
|
Object.entries(c).map(([u, _]) => [
|
|
35
35
|
u,
|
|
36
|
-
|
|
36
|
+
ke(_)
|
|
37
37
|
])
|
|
38
38
|
) : c, Ya = (c) => (...u) => new Promise((_, h) => {
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const I = ke(u), i = Zt(I), k = ($) => {
|
|
40
|
+
$.data.error ? h($.data.error) : _(Xt($.data.result)), c.removeEventListener("message", k);
|
|
41
41
|
};
|
|
42
|
-
c.addEventListener("message", k), c.start(), c.postMessage(
|
|
43
|
-
}), Xt = (c) => qt(c) || Kt(c) ? c : c && typeof c == "object" && c[Gt] ? Ya(c[Gt]) : Array.isArray(c) ? c.map(
|
|
42
|
+
c.addEventListener("message", k), c.start(), c.postMessage(I, { transfer: i });
|
|
43
|
+
}), Xt = (c) => qt(c) || Kt(c) ? c : c && typeof c == "object" && c[Gt] ? Ya(c[Gt]) : Array.isArray(c) ? c.map(ke) : c && typeof c == "object" ? Object.fromEntries(
|
|
44
44
|
Object.entries(c).map(([u, _]) => [
|
|
45
45
|
u,
|
|
46
46
|
Xt(_)
|
|
47
47
|
])
|
|
48
48
|
) : c, ja = (c) => async (u, _) => {
|
|
49
|
-
const { port: h } = _,
|
|
49
|
+
const { port: h } = _, I = Xt(u);
|
|
50
50
|
try {
|
|
51
|
-
const i = await c(
|
|
52
|
-
return h.postMessage({ result: k }, { transfer:
|
|
51
|
+
const i = await c(I, _), k = ke(i), $ = Zt(k);
|
|
52
|
+
return h.postMessage({ result: k }, { transfer: $ }), h.close(), i;
|
|
53
53
|
} catch (i) {
|
|
54
54
|
throw h.postMessage({ error: i }), h.close(), i;
|
|
55
55
|
}
|
|
@@ -65,42 +65,42 @@ var Qt = {}, za = {
|
|
|
65
65
|
(function(c, u) {
|
|
66
66
|
var _ = (() => {
|
|
67
67
|
var h = typeof document < "u" && document.currentScript ? document.currentScript.src : void 0;
|
|
68
|
-
return function(
|
|
69
|
-
var i =
|
|
68
|
+
return function(I = {}) {
|
|
69
|
+
var i = I, k, $;
|
|
70
70
|
i.ready = new Promise((e, t) => {
|
|
71
|
-
k = e,
|
|
71
|
+
k = e, $ = t;
|
|
72
72
|
}), ["_main", "__embind_initialize_bindings", "_fflush", "___set_stack_limits", "onRuntimeInitialized"].forEach((e) => {
|
|
73
73
|
Object.getOwnPropertyDescriptor(i.ready, e) || Object.defineProperty(i.ready, e, {
|
|
74
74
|
get: () => J("You are getting " + e + " on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),
|
|
75
75
|
set: () => J("You are setting " + e + " on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
|
-
var
|
|
78
|
+
var E = Object.assign({}, i), S = "./this.program", F = (e, t) => {
|
|
79
79
|
throw t;
|
|
80
|
-
}, O = !0,
|
|
80
|
+
}, O = !0, Q = !1, z = !1, L = !1;
|
|
81
81
|
if (i.ENVIRONMENT)
|
|
82
82
|
throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");
|
|
83
|
-
var
|
|
84
|
-
function
|
|
85
|
-
return i.locateFile ? i.locateFile(e,
|
|
83
|
+
var H = "";
|
|
84
|
+
function w(e) {
|
|
85
|
+
return i.locateFile ? i.locateFile(e, H) : H + e;
|
|
86
86
|
}
|
|
87
87
|
var N;
|
|
88
|
-
if (typeof document < "u" && document.currentScript && (
|
|
88
|
+
if (typeof document < "u" && document.currentScript && (H = document.currentScript.src), h && (H = h), H.indexOf("blob:") !== 0 ? H = H.substr(0, H.replace(/[?#].*/, "").lastIndexOf("/") + 1) : H = "", !(typeof window == "object" || typeof importScripts == "function"))
|
|
89
89
|
throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
90
|
-
var
|
|
91
|
-
Object.assign(i,
|
|
92
|
-
var
|
|
93
|
-
i.wasmBinary && (
|
|
94
|
-
var
|
|
90
|
+
var W = i.print || console.log.bind(console), C = i.printErr || console.error.bind(console);
|
|
91
|
+
Object.assign(i, E), E = null, Ea(), i.arguments && i.arguments, ve("arguments", "arguments_"), i.thisProgram && (S = i.thisProgram), ve("thisProgram", "thisProgram"), i.quit && (F = i.quit), ve("quit", "quit_"), p(typeof i.memoryInitializerPrefixURL > "u", "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"), p(typeof i.pthreadMainPrefixURL > "u", "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"), p(typeof i.cdInitializerPrefixURL > "u", "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"), p(typeof i.filePackagePrefixURL > "u", "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"), p(typeof i.read > "u", "Module.read option was removed (modify read_ in JS)"), p(typeof i.readAsync > "u", "Module.readAsync option was removed (modify readAsync in JS)"), p(typeof i.readBinary > "u", "Module.readBinary option was removed (modify readBinary in JS)"), p(typeof i.setWindowTitle > "u", "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"), p(typeof i.TOTAL_MEMORY > "u", "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"), ve("read", "read_"), ve("readAsync", "readAsync"), ve("readBinary", "readBinary"), ve("setWindowTitle", "setWindowTitle"), p(!Q, "worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."), p(!z, "node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."), p(!L, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");
|
|
92
|
+
var oe;
|
|
93
|
+
i.wasmBinary && (oe = i.wasmBinary), ve("wasmBinary", "wasmBinary");
|
|
94
|
+
var de = i.noExitRuntime || !0;
|
|
95
95
|
ve("noExitRuntime", "noExitRuntime"), typeof WebAssembly != "object" && J("no native wasm support detected");
|
|
96
|
-
var
|
|
96
|
+
var xe, _e = !1, Ue;
|
|
97
97
|
function p(e, t) {
|
|
98
98
|
e || J("Assertion failed" + (t ? ": " + t : ""));
|
|
99
99
|
}
|
|
100
|
-
var
|
|
100
|
+
var se, te, Se, rt, y, x, er, tr;
|
|
101
101
|
function rr() {
|
|
102
|
-
var e =
|
|
103
|
-
i.HEAP8 =
|
|
102
|
+
var e = xe.buffer;
|
|
103
|
+
i.HEAP8 = se = new Int8Array(e), i.HEAP16 = Se = new Int16Array(e), i.HEAP32 = y = new Int32Array(e), i.HEAPU8 = te = new Uint8Array(e), i.HEAPU16 = rt = new Uint16Array(e), i.HEAPU32 = x = new Uint32Array(e), i.HEAPF32 = er = new Float32Array(e), i.HEAPF64 = tr = new Float64Array(e);
|
|
104
104
|
}
|
|
105
105
|
p(!i.STACK_SIZE, "STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"), p(
|
|
106
106
|
typeof Int32Array < "u" && typeof Float64Array < "u" && Int32Array.prototype.subarray != null && Int32Array.prototype.set != null,
|
|
@@ -109,7 +109,7 @@ var Qt = {}, za = {
|
|
|
109
109
|
var nr;
|
|
110
110
|
function Xr() {
|
|
111
111
|
var e = Je();
|
|
112
|
-
p((e & 3) == 0), e == 0 && (e += 4), x[e >> 2] = 34821223,
|
|
112
|
+
p((e & 3) == 0), e == 0 && (e += 4), x[e >> 2] = 34821223, M(34821223), x[e + 4 >> 2] = 2310721022, M(2310721022), x[0] = 1668509029, M(1668509029);
|
|
113
113
|
}
|
|
114
114
|
function Le() {
|
|
115
115
|
if (!_e) {
|
|
@@ -126,7 +126,7 @@ var Qt = {}, za = {
|
|
|
126
126
|
})();
|
|
127
127
|
var wt = [], ir = [], en = [], ar = [], Tt = !1, or = 0;
|
|
128
128
|
function Ct() {
|
|
129
|
-
return
|
|
129
|
+
return de || or > 0;
|
|
130
130
|
}
|
|
131
131
|
function tn() {
|
|
132
132
|
if (i.preRun)
|
|
@@ -156,63 +156,63 @@ var Qt = {}, za = {
|
|
|
156
156
|
ar.unshift(e);
|
|
157
157
|
}
|
|
158
158
|
p(Math.imul, "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), p(Math.fround, "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), p(Math.clz32, "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"), p(Math.trunc, "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");
|
|
159
|
-
var be = 0,
|
|
159
|
+
var be = 0, Fe = null, Ne = null, We = {};
|
|
160
160
|
function un(e) {
|
|
161
|
-
be++, i.monitorRunDependencies && i.monitorRunDependencies(be), e ? (p(!We[e]), We[e] = 1,
|
|
161
|
+
be++, i.monitorRunDependencies && i.monitorRunDependencies(be), e ? (p(!We[e]), We[e] = 1, Fe === null && typeof setInterval < "u" && (Fe = setInterval(() => {
|
|
162
162
|
if (_e) {
|
|
163
|
-
clearInterval(
|
|
163
|
+
clearInterval(Fe), Fe = null;
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
var t = !1;
|
|
167
167
|
for (var r in We)
|
|
168
|
-
t || (t = !0,
|
|
169
|
-
t &&
|
|
170
|
-
}, 1e4))) :
|
|
168
|
+
t || (t = !0, C("still waiting on run dependencies:")), C("dependency: " + r);
|
|
169
|
+
t && C("(end of list)");
|
|
170
|
+
}, 1e4))) : C("warning: run dependency added without ID");
|
|
171
171
|
}
|
|
172
172
|
function cn(e) {
|
|
173
|
-
if (be--, i.monitorRunDependencies && i.monitorRunDependencies(be), e ? (p(We[e]), delete We[e]) :
|
|
173
|
+
if (be--, i.monitorRunDependencies && i.monitorRunDependencies(be), e ? (p(We[e]), delete We[e]) : C("warning: run dependency removed without ID"), be == 0 && (Fe !== null && (clearInterval(Fe), Fe = null), Ne)) {
|
|
174
174
|
var t = Ne;
|
|
175
175
|
Ne = null, t();
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
function J(e) {
|
|
179
|
-
i.onAbort && i.onAbort(e), e = "Aborted(" + e + ")",
|
|
179
|
+
i.onAbort && i.onAbort(e), e = "Aborted(" + e + ")", C(e), _e = !0, Ue = 1, e.indexOf("RuntimeError: unreachable") >= 0 && (e += '. "unreachable" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)');
|
|
180
180
|
var t = new WebAssembly.RuntimeError(e);
|
|
181
|
-
throw
|
|
181
|
+
throw $(t), t;
|
|
182
182
|
}
|
|
183
|
-
var
|
|
183
|
+
var le = {
|
|
184
184
|
error: function() {
|
|
185
185
|
J("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM");
|
|
186
186
|
},
|
|
187
187
|
init: function() {
|
|
188
|
-
|
|
188
|
+
le.error();
|
|
189
189
|
},
|
|
190
190
|
createDataFile: function() {
|
|
191
|
-
|
|
191
|
+
le.error();
|
|
192
192
|
},
|
|
193
193
|
createPreloadedFile: function() {
|
|
194
|
-
|
|
194
|
+
le.error();
|
|
195
195
|
},
|
|
196
196
|
createLazyFile: function() {
|
|
197
|
-
|
|
197
|
+
le.error();
|
|
198
198
|
},
|
|
199
199
|
open: function() {
|
|
200
|
-
|
|
200
|
+
le.error();
|
|
201
201
|
},
|
|
202
202
|
mkdev: function() {
|
|
203
|
-
|
|
203
|
+
le.error();
|
|
204
204
|
},
|
|
205
205
|
registerDevice: function() {
|
|
206
|
-
|
|
206
|
+
le.error();
|
|
207
207
|
},
|
|
208
208
|
analyzePath: function() {
|
|
209
|
-
|
|
209
|
+
le.error();
|
|
210
210
|
},
|
|
211
211
|
ErrnoError: function() {
|
|
212
|
-
|
|
212
|
+
le.error();
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
|
-
i.FS_createDataFile =
|
|
215
|
+
i.FS_createDataFile = le.createDataFile, i.FS_createPreloadedFile = le.createPreloadedFile;
|
|
216
216
|
var fn = "data:application/octet-stream;base64,";
|
|
217
217
|
function sr(e) {
|
|
218
218
|
return e.startsWith(fn);
|
|
@@ -220,25 +220,25 @@ var Qt = {}, za = {
|
|
|
220
220
|
function dn(e) {
|
|
221
221
|
return e.startsWith("file://");
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function D(e, t) {
|
|
224
224
|
return function() {
|
|
225
225
|
var r = e, n = t;
|
|
226
226
|
return t || (n = i.asm), p(Tt, "native function `" + r + "` called before runtime initialization"), n[e] || p(n[e], "exported native function `" + r + "` not found"), n[e].apply(null, arguments);
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
var we;
|
|
230
|
-
we = "libav.wasm", sr(we) || (we =
|
|
230
|
+
we = "libav.wasm", sr(we) || (we = w(we));
|
|
231
231
|
function lr(e) {
|
|
232
232
|
try {
|
|
233
|
-
if (e == we &&
|
|
234
|
-
return new Uint8Array(
|
|
233
|
+
if (e == we && oe)
|
|
234
|
+
return new Uint8Array(oe);
|
|
235
235
|
throw "both async and sync fetching of the wasm failed";
|
|
236
236
|
} catch (t) {
|
|
237
237
|
J(t);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
function _n(e) {
|
|
241
|
-
return !
|
|
241
|
+
return !oe && O && typeof fetch == "function" ? fetch(e, { credentials: "same-origin" }).then((t) => {
|
|
242
242
|
if (!t.ok)
|
|
243
243
|
throw "failed to load wasm binary file at '" + e + "'";
|
|
244
244
|
return t.arrayBuffer();
|
|
@@ -246,7 +246,7 @@ var Qt = {}, za = {
|
|
|
246
246
|
}
|
|
247
247
|
function ur(e, t, r) {
|
|
248
248
|
return _n(e).then((n) => WebAssembly.instantiate(n, t)).then((n) => n).then(r, (n) => {
|
|
249
|
-
|
|
249
|
+
C("failed to asynchronously prepare wasm: " + n), dn(we) && C("warning: Loading from a file URI (" + we + ") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"), J(n);
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
function vn(e, t, r, n) {
|
|
@@ -255,7 +255,7 @@ var Qt = {}, za = {
|
|
|
255
255
|
return s.then(
|
|
256
256
|
n,
|
|
257
257
|
function(o) {
|
|
258
|
-
return
|
|
258
|
+
return C("wasm streaming compile failed: " + o), C("falling back to ArrayBuffer instantiation"), ur(t, r, n);
|
|
259
259
|
}
|
|
260
260
|
);
|
|
261
261
|
}) : ur(t, r, n);
|
|
@@ -267,7 +267,7 @@ var Qt = {}, za = {
|
|
|
267
267
|
};
|
|
268
268
|
function t(a, s) {
|
|
269
269
|
var o = a.exports;
|
|
270
|
-
return o = g.instrumentWasmExports(o), i.asm = o,
|
|
270
|
+
return o = g.instrumentWasmExports(o), i.asm = o, xe = i.asm.memory, p(xe, "memory not found in wasm exports"), rr(), nr = i.asm.__indirect_function_table, p(nr, "table not found in wasm exports"), sn(i.asm.__wasm_call_ctors), cn("wasm-instantiate"), o;
|
|
271
271
|
}
|
|
272
272
|
un("wasm-instantiate");
|
|
273
273
|
var r = i;
|
|
@@ -278,11 +278,11 @@ var Qt = {}, za = {
|
|
|
278
278
|
try {
|
|
279
279
|
return i.instantiateWasm(e, t);
|
|
280
280
|
} catch (a) {
|
|
281
|
-
|
|
281
|
+
C("Module.instantiateWasm callback failed with error: " + a), $(a);
|
|
282
282
|
}
|
|
283
|
-
return vn(
|
|
283
|
+
return vn(oe, we, e, n).catch($), {};
|
|
284
284
|
}
|
|
285
|
-
var
|
|
285
|
+
var ie, De;
|
|
286
286
|
function ve(e, t) {
|
|
287
287
|
Object.getOwnPropertyDescriptor(i, e) || Object.defineProperty(i, e, {
|
|
288
288
|
configurable: !0,
|
|
@@ -301,7 +301,7 @@ var Qt = {}, za = {
|
|
|
301
301
|
typeof globalThis < "u" && Object.defineProperty(globalThis, e, {
|
|
302
302
|
configurable: !0,
|
|
303
303
|
get: function() {
|
|
304
|
-
|
|
304
|
+
ce("`" + e + "` is not longer defined by emscripten. " + t);
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
}
|
|
@@ -311,7 +311,7 @@ var Qt = {}, za = {
|
|
|
311
311
|
configurable: !0,
|
|
312
312
|
get: function() {
|
|
313
313
|
var t = "`" + e + "` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line", r = e;
|
|
314
|
-
r.startsWith("_") || (r = "$" + e), t += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='" + r + "')", cr(e) && (t += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),
|
|
314
|
+
r.startsWith("_") || (r = "$" + e), t += " (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='" + r + "')", cr(e) && (t += ". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"), ce(t);
|
|
315
315
|
}
|
|
316
316
|
}), fr(e);
|
|
317
317
|
}
|
|
@@ -328,7 +328,7 @@ var Qt = {}, za = {
|
|
|
328
328
|
function nt(e, t, r, n) {
|
|
329
329
|
p(Number.isInteger(Number(e)), "attempt to write non-integer (" + e + ") into integer heap"), p(e <= n, "value (" + e + ") too large to write as " + t + "-bit value"), p(e >= r, "value (" + e + ") too small to write as " + t + "-bit value");
|
|
330
330
|
}
|
|
331
|
-
var He = (e) => nt(e, 8, Cn, yn), Et = (e) => nt(e, 16, En, bn),
|
|
331
|
+
var He = (e) => nt(e, 8, Cn, yn), Et = (e) => nt(e, 16, En, bn), M = (e) => nt(e, 32, Sn, wn), dr = (e) => nt(e, 64, Fn, Tn);
|
|
332
332
|
function _r(e) {
|
|
333
333
|
this.name = "ExitStatus", this.message = `Program terminated with exit(${e})`, this.status = e;
|
|
334
334
|
}
|
|
@@ -338,8 +338,8 @@ var Qt = {}, za = {
|
|
|
338
338
|
}, he = (e) => (p(typeof e == "number"), "0x" + e.toString(16).padStart(8, "0")), Pn = () => {
|
|
339
339
|
var e = zt(), t = Je();
|
|
340
340
|
Ia(e, t);
|
|
341
|
-
},
|
|
342
|
-
|
|
341
|
+
}, ce = (e) => {
|
|
342
|
+
ce.shown || (ce.shown = {}), ce.shown[e] || (ce.shown[e] = 1, C(e));
|
|
343
343
|
};
|
|
344
344
|
function An(e) {
|
|
345
345
|
this.excPtr = e, this.ptr = e - 24, this.set_type = function(t) {
|
|
@@ -351,13 +351,13 @@ var Qt = {}, za = {
|
|
|
351
351
|
}, this.get_destructor = function() {
|
|
352
352
|
return x[this.ptr + 8 >> 2];
|
|
353
353
|
}, this.set_caught = function(t) {
|
|
354
|
-
t = t ? 1 : 0,
|
|
354
|
+
t = t ? 1 : 0, se[this.ptr + 12 >> 0] = t, He(t);
|
|
355
355
|
}, this.get_caught = function() {
|
|
356
|
-
return
|
|
356
|
+
return se[this.ptr + 12 >> 0] != 0;
|
|
357
357
|
}, this.set_rethrown = function(t) {
|
|
358
|
-
t = t ? 1 : 0,
|
|
358
|
+
t = t ? 1 : 0, se[this.ptr + 13 >> 0] = t, He(t);
|
|
359
359
|
}, this.get_rethrown = function() {
|
|
360
|
-
return
|
|
360
|
+
return se[this.ptr + 13 >> 0] != 0;
|
|
361
361
|
}, this.init = function(t, r) {
|
|
362
362
|
this.set_adjusted_ptr(0), this.set_type(t), this.set_destructor(r);
|
|
363
363
|
}, this.set_adjusted_ptr = function(t) {
|
|
@@ -397,7 +397,7 @@ var Qt = {}, za = {
|
|
|
397
397
|
continue;
|
|
398
398
|
}
|
|
399
399
|
var d = e[t++] & 63;
|
|
400
|
-
if ((o & 240) == 224 ? o = (o & 15) << 12 | l << 6 | d : ((o & 248) != 240 &&
|
|
400
|
+
if ((o & 240) == 224 ? o = (o & 15) << 12 | l << 6 | d : ((o & 248) != 240 && ce("Invalid UTF-8 leading byte " + he(o) + " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"), o = (o & 7) << 18 | l << 12 | d << 6 | e[t++] & 63), o < 65536)
|
|
401
401
|
s += String.fromCharCode(o);
|
|
402
402
|
else {
|
|
403
403
|
var f = o - 65536;
|
|
@@ -405,7 +405,7 @@ var Qt = {}, za = {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
return s;
|
|
408
|
-
}, St = (e, t) => (p(typeof e == "number"), e ? hr(
|
|
408
|
+
}, St = (e, t) => (p(typeof e == "number"), e ? hr(te, e, t) : "");
|
|
409
409
|
function Mn(e, t, r) {
|
|
410
410
|
return 0;
|
|
411
411
|
}
|
|
@@ -422,7 +422,7 @@ var Qt = {}, za = {
|
|
|
422
422
|
function Ye(e) {
|
|
423
423
|
return this.fromWireType(y[e >> 2]);
|
|
424
424
|
}
|
|
425
|
-
var
|
|
425
|
+
var Me = {}, Pe = {}, ot = {}, On = 48, Rn = 57;
|
|
426
426
|
function Pt(e) {
|
|
427
427
|
if (e === void 0)
|
|
428
428
|
return "_unknown";
|
|
@@ -452,7 +452,7 @@ var Qt = {}, za = {
|
|
|
452
452
|
function st(e) {
|
|
453
453
|
throw new mr(e);
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function $e(e, t, r) {
|
|
456
456
|
e.forEach(function(l) {
|
|
457
457
|
ot[l] = t;
|
|
458
458
|
});
|
|
@@ -464,8 +464,8 @@ var Qt = {}, za = {
|
|
|
464
464
|
}
|
|
465
465
|
var a = new Array(t.length), s = [], o = 0;
|
|
466
466
|
t.forEach((l, d) => {
|
|
467
|
-
|
|
468
|
-
a[d] =
|
|
467
|
+
Pe.hasOwnProperty(l) ? a[d] = Pe[l] : (s.push(l), Me.hasOwnProperty(l) || (Me[l] = []), Me[l].push(() => {
|
|
468
|
+
a[d] = Pe[l], ++o, o === s.length && n(a);
|
|
469
469
|
}));
|
|
470
470
|
}), s.length === 0 && n(a);
|
|
471
471
|
}
|
|
@@ -473,17 +473,17 @@ var Qt = {}, za = {
|
|
|
473
473
|
var t = at[e];
|
|
474
474
|
delete at[e];
|
|
475
475
|
var r = t.rawConstructor, n = t.rawDestructor, a = t.fields, s = a.map((o) => o.getterReturnType).concat(a.map((o) => o.setterArgumentType));
|
|
476
|
-
|
|
476
|
+
$e([e], s, (o) => {
|
|
477
477
|
var l = {};
|
|
478
478
|
return a.forEach((d, f) => {
|
|
479
|
-
var m = d.fieldName,
|
|
479
|
+
var m = d.fieldName, P = o[f], A = d.getter, R = d.getterContext, j = o[f + a.length], V = d.setter, G = d.setterContext;
|
|
480
480
|
l[m] = {
|
|
481
|
-
read: (
|
|
482
|
-
|
|
481
|
+
read: (K) => P.fromWireType(
|
|
482
|
+
A(R, K)
|
|
483
483
|
),
|
|
484
|
-
write: (
|
|
485
|
-
var
|
|
486
|
-
|
|
484
|
+
write: (K, v) => {
|
|
485
|
+
var T = [];
|
|
486
|
+
V(G, K, j.toWireType(T, v)), Ft(T);
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
}), [{
|
|
@@ -498,10 +498,10 @@ var Qt = {}, za = {
|
|
|
498
498
|
for (var m in l)
|
|
499
499
|
if (!(m in f))
|
|
500
500
|
throw new TypeError(`Missing field: "${m}"`);
|
|
501
|
-
var
|
|
501
|
+
var P = r();
|
|
502
502
|
for (m in l)
|
|
503
|
-
l[m].write(
|
|
504
|
-
return d !== null && d.push(n,
|
|
503
|
+
l[m].write(P, f[m]);
|
|
504
|
+
return d !== null && d.push(n, P), P;
|
|
505
505
|
},
|
|
506
506
|
argPackAdvance: 8,
|
|
507
507
|
readValueFromPointer: Ye,
|
|
@@ -531,32 +531,32 @@ var Qt = {}, za = {
|
|
|
531
531
|
pr = e;
|
|
532
532
|
}
|
|
533
533
|
var pr = void 0;
|
|
534
|
-
function
|
|
535
|
-
for (var t = "", r = e;
|
|
536
|
-
t += pr[
|
|
534
|
+
function Z(e) {
|
|
535
|
+
for (var t = "", r = e; te[r]; )
|
|
536
|
+
t += pr[te[r++]];
|
|
537
537
|
return t;
|
|
538
538
|
}
|
|
539
|
-
var
|
|
540
|
-
function
|
|
541
|
-
throw new
|
|
539
|
+
var Oe = void 0;
|
|
540
|
+
function U(e) {
|
|
541
|
+
throw new Oe(e);
|
|
542
542
|
}
|
|
543
543
|
function me(e, t, r = {}) {
|
|
544
544
|
if (!("argPackAdvance" in t))
|
|
545
545
|
throw new TypeError("registerType registeredInstance requires argPackAdvance");
|
|
546
546
|
var n = t.name;
|
|
547
|
-
if (e ||
|
|
547
|
+
if (e || U(`type "${n}" must have a positive integer typeid pointer`), Pe.hasOwnProperty(e)) {
|
|
548
548
|
if (r.ignoreDuplicateRegistrations)
|
|
549
549
|
return;
|
|
550
|
-
|
|
550
|
+
U(`Cannot register type '${n}' twice`);
|
|
551
551
|
}
|
|
552
|
-
if (
|
|
553
|
-
var a =
|
|
554
|
-
delete
|
|
552
|
+
if (Pe[e] = t, delete ot[e], Me.hasOwnProperty(e)) {
|
|
553
|
+
var a = Me[e];
|
|
554
|
+
delete Me[e], a.forEach((s) => s());
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
function Ln(e, t, r, n, a) {
|
|
558
558
|
var s = Dt(r);
|
|
559
|
-
t =
|
|
559
|
+
t = Z(t), me(e, {
|
|
560
560
|
name: t,
|
|
561
561
|
fromWireType: function(o) {
|
|
562
562
|
return !!o;
|
|
@@ -568,9 +568,9 @@ var Qt = {}, za = {
|
|
|
568
568
|
readValueFromPointer: function(o) {
|
|
569
569
|
var l;
|
|
570
570
|
if (r === 1)
|
|
571
|
-
l =
|
|
571
|
+
l = se;
|
|
572
572
|
else if (r === 2)
|
|
573
|
-
l =
|
|
573
|
+
l = Se;
|
|
574
574
|
else if (r === 4)
|
|
575
575
|
l = y;
|
|
576
576
|
else
|
|
@@ -604,7 +604,7 @@ var Qt = {}, za = {
|
|
|
604
604
|
function t(r) {
|
|
605
605
|
return r.$$.ptrType.registeredClass.name;
|
|
606
606
|
}
|
|
607
|
-
|
|
607
|
+
U(t(e) + " instance already deleted");
|
|
608
608
|
}
|
|
609
609
|
var $t = !1;
|
|
610
610
|
function gr(e) {
|
|
@@ -651,7 +651,7 @@ var Qt = {}, za = {
|
|
|
651
651
|
}
|
|
652
652
|
var Ve = {};
|
|
653
653
|
function Bn(e, t) {
|
|
654
|
-
for (t === void 0 &&
|
|
654
|
+
for (t === void 0 && U("ptr should not be undefined"); e.baseClass; )
|
|
655
655
|
t = e.upcast(t), e = e.baseClass;
|
|
656
656
|
return t;
|
|
657
657
|
}
|
|
@@ -735,13 +735,13 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
735
735
|
return e.$$.count.value += 1, e.$$.deleteScheduled = !1, e;
|
|
736
736
|
}
|
|
737
737
|
function Jn() {
|
|
738
|
-
this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete &&
|
|
738
|
+
this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && U("Object already scheduled for deletion"), gr(this), yr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
|
739
739
|
}
|
|
740
740
|
function qn() {
|
|
741
741
|
return !this.$$.ptr;
|
|
742
742
|
}
|
|
743
743
|
function Kn() {
|
|
744
|
-
return this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete &&
|
|
744
|
+
return this.$$.ptr || Mt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && U("Object already scheduled for deletion"), je.push(this), je.length === 1 && ze && ze(Ot), this.$$.deleteScheduled = !0, this;
|
|
745
745
|
}
|
|
746
746
|
function Zn() {
|
|
747
747
|
Te.prototype.isAliasOf = Nn, Te.prototype.clone = Qn, Te.prototype.delete = Jn, Te.prototype.isDeleted = qn, Te.prototype.deleteLater = Kn;
|
|
@@ -752,38 +752,38 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
752
752
|
if (e[t].overloadTable === void 0) {
|
|
753
753
|
var n = e[t];
|
|
754
754
|
e[t] = function() {
|
|
755
|
-
return e[t].overloadTable.hasOwnProperty(arguments.length) ||
|
|
755
|
+
return e[t].overloadTable.hasOwnProperty(arguments.length) || U(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`), e[t].overloadTable[arguments.length].apply(this, arguments);
|
|
756
756
|
}, e[t].overloadTable = [], e[t].overloadTable[n.argCount] = n;
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
759
|
function Xn(e, t, r) {
|
|
760
|
-
i.hasOwnProperty(e) ? ((r === void 0 || i[e].overloadTable !== void 0 && i[e].overloadTable[r] !== void 0) &&
|
|
760
|
+
i.hasOwnProperty(e) ? ((r === void 0 || i[e].overloadTable !== void 0 && i[e].overloadTable[r] !== void 0) && U(`Cannot register public name '${e}' twice`), Cr(i, e, e), i.hasOwnProperty(r) && U(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), i[e].overloadTable[r] = t) : (i[e] = t, r !== void 0 && (i[e].numArguments = r));
|
|
761
761
|
}
|
|
762
762
|
function ei(e, t, r, n, a, s, o, l) {
|
|
763
763
|
this.name = e, this.constructor = t, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = a, this.getActualType = s, this.upcast = o, this.downcast = l, this.pureVirtualFunctions = [];
|
|
764
764
|
}
|
|
765
765
|
function Rt(e, t, r) {
|
|
766
766
|
for (; t !== r; )
|
|
767
|
-
t.upcast ||
|
|
767
|
+
t.upcast || U(`Expected null or instance of ${r.name}, got an instance of ${t.name}`), e = t.upcast(e), t = t.baseClass;
|
|
768
768
|
return e;
|
|
769
769
|
}
|
|
770
770
|
function ti(e, t) {
|
|
771
771
|
if (t === null)
|
|
772
|
-
return this.isReference &&
|
|
773
|
-
t.$$ ||
|
|
772
|
+
return this.isReference && U(`null is not a valid ${this.name}`), 0;
|
|
773
|
+
t.$$ || U(`Cannot pass "${Re(t)}" as a ${this.name}`), t.$$.ptr || U(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
774
774
|
var r = t.$$.ptrType.registeredClass, n = Rt(t.$$.ptr, r, this.registeredClass);
|
|
775
775
|
return n;
|
|
776
776
|
}
|
|
777
777
|
function ri(e, t) {
|
|
778
778
|
var r;
|
|
779
779
|
if (t === null)
|
|
780
|
-
return this.isReference &&
|
|
781
|
-
t.$$ ||
|
|
780
|
+
return this.isReference && U(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), e !== null && e.push(this.rawDestructor, r), r) : 0;
|
|
781
|
+
t.$$ || U(`Cannot pass "${Re(t)}" as a ${this.name}`), t.$$.ptr || U(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && t.$$.ptrType.isConst && U(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
782
782
|
var n = t.$$.ptrType.registeredClass;
|
|
783
783
|
if (r = Rt(t.$$.ptr, n, this.registeredClass), this.isSmartPointer)
|
|
784
|
-
switch (t.$$.smartPtr === void 0 &&
|
|
784
|
+
switch (t.$$.smartPtr === void 0 && U("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
|
785
785
|
case 0:
|
|
786
|
-
t.$$.smartPtrType === this ? r = t.$$.smartPtr :
|
|
786
|
+
t.$$.smartPtrType === this ? r = t.$$.smartPtr : U(`Cannot convert argument of type ${t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
787
787
|
break;
|
|
788
788
|
case 1:
|
|
789
789
|
r = t.$$.smartPtr;
|
|
@@ -795,21 +795,21 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
795
795
|
var a = t.clone();
|
|
796
796
|
r = this.rawShare(
|
|
797
797
|
r,
|
|
798
|
-
|
|
798
|
+
X.toHandle(function() {
|
|
799
799
|
a.delete();
|
|
800
800
|
})
|
|
801
801
|
), e !== null && e.push(this.rawDestructor, r);
|
|
802
802
|
}
|
|
803
803
|
break;
|
|
804
804
|
default:
|
|
805
|
-
|
|
805
|
+
U("Unsupporting sharing policy");
|
|
806
806
|
}
|
|
807
807
|
return r;
|
|
808
808
|
}
|
|
809
809
|
function ni(e, t) {
|
|
810
810
|
if (t === null)
|
|
811
|
-
return this.isReference &&
|
|
812
|
-
t.$$ ||
|
|
811
|
+
return this.isReference && U(`null is not a valid ${this.name}`), 0;
|
|
812
|
+
t.$$ || U(`Cannot pass "${Re(t)}" as a ${this.name}`), t.$$.ptr || U(`Cannot pass deleted object as a pointer of type ${this.name}`), t.$$.ptrType.isConst && U(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);
|
|
813
813
|
var r = t.$$.ptrType.registeredClass, n = Rt(t.$$.ptr, r, this.registeredClass);
|
|
814
814
|
return n;
|
|
815
815
|
}
|
|
@@ -841,23 +841,23 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
841
841
|
return r.length = 0, Object.assign(r, arguments), ci(e, t, r);
|
|
842
842
|
};
|
|
843
843
|
};
|
|
844
|
-
function
|
|
845
|
-
e =
|
|
844
|
+
function fe(e, t) {
|
|
845
|
+
e = Z(e);
|
|
846
846
|
function r() {
|
|
847
847
|
return fi(e, t);
|
|
848
848
|
}
|
|
849
849
|
var n = r();
|
|
850
|
-
return typeof n != "function" &&
|
|
850
|
+
return typeof n != "function" && U(`unknown function pointer with signature ${e}: ${t}`), n;
|
|
851
851
|
}
|
|
852
852
|
var Er = void 0;
|
|
853
853
|
function Sr(e) {
|
|
854
|
-
var t = Fa(e), r =
|
|
854
|
+
var t = Fa(e), r = Z(t);
|
|
855
855
|
return ge(t), r;
|
|
856
856
|
}
|
|
857
857
|
function kt(e, t) {
|
|
858
858
|
var r = [], n = {};
|
|
859
859
|
function a(s) {
|
|
860
|
-
if (!n[s] && !
|
|
860
|
+
if (!n[s] && !Pe[s]) {
|
|
861
861
|
if (ot[s]) {
|
|
862
862
|
ot[s].forEach(a);
|
|
863
863
|
return;
|
|
@@ -867,65 +867,65 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
867
867
|
}
|
|
868
868
|
throw t.forEach(a), new Er(`${e}: ` + r.map(Sr).join([", "]));
|
|
869
869
|
}
|
|
870
|
-
function di(e, t, r, n, a, s, o, l, d, f, m,
|
|
871
|
-
m =
|
|
870
|
+
function di(e, t, r, n, a, s, o, l, d, f, m, P, A) {
|
|
871
|
+
m = Z(m), s = fe(a, s), l && (l = fe(o, l)), f && (f = fe(d, f)), A = fe(P, A);
|
|
872
872
|
var R = Pt(m);
|
|
873
873
|
Xn(R, function() {
|
|
874
874
|
kt(`Cannot construct ${m} due to unbound types`, [n]);
|
|
875
|
-
}),
|
|
875
|
+
}), $e(
|
|
876
876
|
[e, t, r],
|
|
877
877
|
n ? [n] : [],
|
|
878
|
-
function(
|
|
879
|
-
|
|
880
|
-
var
|
|
881
|
-
n ? (
|
|
882
|
-
var
|
|
878
|
+
function(j) {
|
|
879
|
+
j = j[0];
|
|
880
|
+
var V, G;
|
|
881
|
+
n ? (V = j.registeredClass, G = V.instancePrototype) : G = Te.prototype;
|
|
882
|
+
var K = At(R, function() {
|
|
883
883
|
if (Object.getPrototypeOf(this) !== v)
|
|
884
|
-
throw new
|
|
885
|
-
if (
|
|
886
|
-
throw new
|
|
887
|
-
var _t =
|
|
884
|
+
throw new Oe("Use 'new' to construct " + m);
|
|
885
|
+
if (T.constructor_body === void 0)
|
|
886
|
+
throw new Oe(m + " has no accessible constructor");
|
|
887
|
+
var _t = T.constructor_body[arguments.length];
|
|
888
888
|
if (_t === void 0)
|
|
889
|
-
throw new
|
|
889
|
+
throw new Oe(`Tried to invoke ctor of ${m} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(T.constructor_body).toString()}) parameters instead!`);
|
|
890
890
|
return _t.apply(this, arguments);
|
|
891
|
-
}), v = Object.create(
|
|
892
|
-
constructor: { value:
|
|
891
|
+
}), v = Object.create(G, {
|
|
892
|
+
constructor: { value: K }
|
|
893
893
|
});
|
|
894
|
-
|
|
895
|
-
var
|
|
894
|
+
K.prototype = v;
|
|
895
|
+
var T = new ei(
|
|
896
896
|
m,
|
|
897
|
-
|
|
897
|
+
K,
|
|
898
898
|
v,
|
|
899
|
-
|
|
900
|
-
|
|
899
|
+
A,
|
|
900
|
+
V,
|
|
901
901
|
s,
|
|
902
902
|
l,
|
|
903
903
|
f
|
|
904
904
|
);
|
|
905
|
-
|
|
906
|
-
var
|
|
905
|
+
T.baseClass && (T.baseClass.__derivedClasses === void 0 && (T.baseClass.__derivedClasses = []), T.baseClass.__derivedClasses.push(T));
|
|
906
|
+
var ee = new pe(
|
|
907
907
|
m,
|
|
908
|
-
|
|
908
|
+
T,
|
|
909
909
|
!0,
|
|
910
910
|
!1,
|
|
911
911
|
!1
|
|
912
|
-
),
|
|
912
|
+
), q = new pe(
|
|
913
913
|
m + "*",
|
|
914
|
-
|
|
914
|
+
T,
|
|
915
915
|
!1,
|
|
916
916
|
!1,
|
|
917
917
|
!1
|
|
918
|
-
),
|
|
918
|
+
), Ae = new pe(
|
|
919
919
|
m + " const*",
|
|
920
|
-
|
|
920
|
+
T,
|
|
921
921
|
!1,
|
|
922
922
|
!0,
|
|
923
923
|
!1
|
|
924
924
|
);
|
|
925
925
|
return wr[e] = {
|
|
926
|
-
pointerType:
|
|
927
|
-
constPointerType:
|
|
928
|
-
}, li(R,
|
|
926
|
+
pointerType: q,
|
|
927
|
+
constPointerType: Ae
|
|
928
|
+
}, li(R, K), [ee, q, Ae];
|
|
929
929
|
}
|
|
930
930
|
);
|
|
931
931
|
}
|
|
@@ -953,13 +953,13 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
953
953
|
var xt = (e) => {
|
|
954
954
|
if (e instanceof _r || e == "unwind")
|
|
955
955
|
return Ue;
|
|
956
|
-
Le(), e instanceof WebAssembly.RuntimeError && Wr() <= 0 &&
|
|
956
|
+
Le(), e instanceof WebAssembly.RuntimeError && Wr() <= 0 && C("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 52428800)"), F(1, e);
|
|
957
957
|
}, vi = (e) => {
|
|
958
|
-
Ue = e, Ct() || (i.onExit && i.onExit(e), _e = !0),
|
|
958
|
+
Ue = e, Ct() || (i.onExit && i.onExit(e), _e = !0), F(e, new _r(e));
|
|
959
959
|
}, Pr = (e, t) => {
|
|
960
960
|
if (Ue = e, La(), Ct() && !t) {
|
|
961
961
|
var r = `program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=${or}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;
|
|
962
|
-
|
|
962
|
+
$(r), C(r);
|
|
963
963
|
}
|
|
964
964
|
vi(e);
|
|
965
965
|
}, hi = Pr, mi = () => {
|
|
@@ -971,7 +971,7 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
971
971
|
}
|
|
972
972
|
}, pi = (e) => {
|
|
973
973
|
if (_e) {
|
|
974
|
-
|
|
974
|
+
C("user callback triggered after runtime exited or application aborted. Ignoring.");
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
977
|
try {
|
|
@@ -1029,10 +1029,10 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
1029
1029
|
var e = ft(12 + g.StackSize);
|
|
1030
1030
|
return g.setDataHeader(e, e + 12, g.StackSize), g.setDataRewindFunc(e), e;
|
|
1031
1031
|
}, setDataHeader: function(e, t, r) {
|
|
1032
|
-
y[e >> 2] = t,
|
|
1032
|
+
y[e >> 2] = t, M(t), y[e + 4 >> 2] = t + r, M(t + r);
|
|
1033
1033
|
}, setDataRewindFunc: function(e) {
|
|
1034
1034
|
var t = g.exportCallStack[0], r = g.getCallStackId(t);
|
|
1035
|
-
y[e + 8 >> 2] = r,
|
|
1035
|
+
y[e + 8 >> 2] = r, M(r);
|
|
1036
1036
|
}, getDataRewindFunc: function(e) {
|
|
1037
1037
|
var t = y[e + 8 >> 2], r = g.callStackIdToName[t], n = i.asm[r];
|
|
1038
1038
|
return n;
|
|
@@ -1072,7 +1072,7 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
1072
1072
|
} };
|
|
1073
1073
|
function Ar(e, t, r, n, a, s) {
|
|
1074
1074
|
var o = t.length;
|
|
1075
|
-
o < 2 &&
|
|
1075
|
+
o < 2 && U("argTypes array size mismatch! Must at least get return value and 'this' types!"), p(!s, "Async bindings are only supported with JSPI.");
|
|
1076
1076
|
for (var l = t[1] !== null && r !== null, d = !1, f = 1; f < t.length; ++f)
|
|
1077
1077
|
if (t[f] !== null && t[f].destructorFunction === void 0) {
|
|
1078
1078
|
d = !0;
|
|
@@ -1080,67 +1080,67 @@ Originally allocated`), "captureStackTrace" in Error && Error.captureStackTrace(
|
|
|
1080
1080
|
}
|
|
1081
1081
|
var m = t[0].name !== "void";
|
|
1082
1082
|
s && (n = g.makeAsyncFunction(n));
|
|
1083
|
-
for (var
|
|
1084
|
-
|
|
1083
|
+
for (var P = "", A = "", f = 0; f < o - 2; ++f)
|
|
1084
|
+
P += (f !== 0 ? ", " : "") + "arg" + f, A += (f !== 0 ? ", " : "") + "arg" + f + "Wired";
|
|
1085
1085
|
var R = `
|
|
1086
|
-
return function ${Pt(e)}(${
|
|
1086
|
+
return function ${Pt(e)}(${P}) {
|
|
1087
1087
|
if (arguments.length !== ${o - 2}) {
|
|
1088
1088
|
throwBindingError('function ${e} called with ${arguments.length} arguments, expected ${o - 2} args!');
|
|
1089
1089
|
}`;
|
|
1090
1090
|
d && (R += `var destructors = [];
|
|
1091
1091
|
`);
|
|
1092
|
-
var
|
|
1093
|
-
l && (R += "var thisWired = classParam.toWireType(" +
|
|
1092
|
+
var j = d ? "destructors" : "null", V = ["throwBindingError", "invoker", "fn", "runDestructors", "retType", "classParam"], G = [U, n, a, Ft, t[0], t[1]];
|
|
1093
|
+
l && (R += "var thisWired = classParam.toWireType(" + j + `, this);
|
|
1094
1094
|
`);
|
|
1095
1095
|
for (var f = 0; f < o - 2; ++f)
|
|
1096
|
-
R += "var arg" + f + "Wired = argType" + f + ".toWireType(" +
|
|
1097
|
-
`,
|
|
1098
|
-
if (l && (
|
|
1099
|
-
`,
|
|
1096
|
+
R += "var arg" + f + "Wired = argType" + f + ".toWireType(" + j + ", arg" + f + "); // " + t[f + 2].name + `
|
|
1097
|
+
`, V.push("argType" + f), G.push(t[f + 2]);
|
|
1098
|
+
if (l && (A = "thisWired" + (A.length > 0 ? ", " : "") + A), R += (m || s ? "var rv = " : "") + "invoker(fn" + (A.length > 0 ? ", " : "") + A + `);
|
|
1099
|
+
`, V.push("Asyncify"), G.push(g), R += "function onDone(" + (m ? "rv" : "") + `) {
|
|
1100
1100
|
`, d)
|
|
1101
1101
|
R += `runDestructors(destructors);
|
|
1102
1102
|
`;
|
|
1103
1103
|
else
|
|
1104
1104
|
for (var f = l ? 1 : 2; f < t.length; ++f) {
|
|
1105
|
-
var
|
|
1106
|
-
t[f].destructorFunction !== null && (R +=
|
|
1107
|
-
`,
|
|
1105
|
+
var K = f === 1 ? "thisWired" : "arg" + (f - 2) + "Wired";
|
|
1106
|
+
t[f].destructorFunction !== null && (R += K + "_dtor(" + K + "); // " + t[f].name + `
|
|
1107
|
+
`, V.push(K + "_dtor"), G.push(t[f].destructorFunction));
|
|
1108
1108
|
}
|
|
1109
1109
|
return m && (R += `var ret = retType.fromWireType(rv);
|
|
1110
1110
|
return ret;
|
|
1111
1111
|
`), R += `}
|
|
1112
1112
|
`, R += "return Asyncify.currData ? Asyncify.whenDone().then(onDone) : onDone(" + (m ? "rv" : "") + `);
|
|
1113
1113
|
`, R += `}
|
|
1114
|
-
`,
|
|
1114
|
+
`, V.push(R), _i(Function, V).apply(null, G);
|
|
1115
1115
|
}
|
|
1116
1116
|
function gi(e, t, r, n, a, s) {
|
|
1117
1117
|
p(t > 0);
|
|
1118
1118
|
var o = Fr(t, r);
|
|
1119
|
-
a =
|
|
1119
|
+
a = fe(n, a), $e([], [e], function(l) {
|
|
1120
1120
|
l = l[0];
|
|
1121
1121
|
var d = `constructor ${l.name}`;
|
|
1122
1122
|
if (l.registeredClass.constructor_body === void 0 && (l.registeredClass.constructor_body = []), l.registeredClass.constructor_body[t - 1] !== void 0)
|
|
1123
|
-
throw new
|
|
1123
|
+
throw new Oe(`Cannot register multiple constructors with identical number of parameters (${t - 1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
1124
1124
|
return l.registeredClass.constructor_body[t - 1] = () => {
|
|
1125
1125
|
kt(`Cannot construct ${l.name} due to unbound types`, o);
|
|
1126
|
-
},
|
|
1126
|
+
}, $e([], o, function(f) {
|
|
1127
1127
|
return f.splice(1, 0, null), l.registeredClass.constructor_body[t - 1] = Ar(d, f, null, a, s), [];
|
|
1128
1128
|
}), [];
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
1131
|
function yi(e, t, r, n, a, s, o, l, d) {
|
|
1132
1132
|
var f = Fr(r, n);
|
|
1133
|
-
t =
|
|
1133
|
+
t = Z(t), s = fe(a, s), $e([], [e], function(m) {
|
|
1134
1134
|
m = m[0];
|
|
1135
|
-
var
|
|
1135
|
+
var P = `${m.name}.${t}`;
|
|
1136
1136
|
t.startsWith("@@") && (t = Symbol[t.substring(2)]), l && m.registeredClass.pureVirtualFunctions.push(t);
|
|
1137
|
-
function
|
|
1138
|
-
kt(`Cannot call ${
|
|
1137
|
+
function A() {
|
|
1138
|
+
kt(`Cannot call ${P} due to unbound types`, f);
|
|
1139
1139
|
}
|
|
1140
|
-
var R = m.registeredClass.instancePrototype,
|
|
1141
|
-
return
|
|
1142
|
-
var
|
|
1143
|
-
return R[t].overloadTable === void 0 ? (
|
|
1140
|
+
var R = m.registeredClass.instancePrototype, j = R[t];
|
|
1141
|
+
return j === void 0 || j.overloadTable === void 0 && j.className !== m.name && j.argCount === r - 2 ? (A.argCount = r - 2, A.className = m.name, R[t] = A) : (Cr(R, t, P), R[t].overloadTable[r - 2] = A), $e([], f, function(V) {
|
|
1142
|
+
var G = Ar(P, V, m, s, o, d);
|
|
1143
|
+
return R[t].overloadTable === void 0 ? (G.argCount = r - 2, R[t] = G) : R[t].overloadTable[r - 2] = G, [];
|
|
1144
1144
|
}), [];
|
|
1145
1145
|
});
|
|
1146
1146
|
}
|
|
@@ -1156,24 +1156,24 @@ return ret;
|
|
|
1156
1156
|
p(this.allocated[e] !== void 0), this.allocated[e] = void 0, this.freelist.push(e);
|
|
1157
1157
|
};
|
|
1158
1158
|
}
|
|
1159
|
-
var
|
|
1159
|
+
var ae = new bi();
|
|
1160
1160
|
function Ut(e) {
|
|
1161
|
-
e >=
|
|
1161
|
+
e >= ae.reserved && --ae.get(e).refcount === 0 && ae.free(e);
|
|
1162
1162
|
}
|
|
1163
1163
|
function wi() {
|
|
1164
|
-
for (var e = 0, t =
|
|
1165
|
-
|
|
1164
|
+
for (var e = 0, t = ae.reserved; t < ae.allocated.length; ++t)
|
|
1165
|
+
ae.allocated[t] !== void 0 && ++e;
|
|
1166
1166
|
return e;
|
|
1167
1167
|
}
|
|
1168
1168
|
function Ti() {
|
|
1169
|
-
|
|
1169
|
+
ae.allocated.push(
|
|
1170
1170
|
{ value: void 0 },
|
|
1171
1171
|
{ value: null },
|
|
1172
1172
|
{ value: !0 },
|
|
1173
1173
|
{ value: !1 }
|
|
1174
|
-
),
|
|
1174
|
+
), ae.reserved = ae.allocated.length, i.count_emval_handles = wi;
|
|
1175
1175
|
}
|
|
1176
|
-
var
|
|
1176
|
+
var X = { toValue: (e) => (e || U("Cannot use deleted val. handle = " + e), ae.get(e).value), toHandle: (e) => {
|
|
1177
1177
|
switch (e) {
|
|
1178
1178
|
case void 0:
|
|
1179
1179
|
return 1;
|
|
@@ -1184,25 +1184,25 @@ return ret;
|
|
|
1184
1184
|
case !1:
|
|
1185
1185
|
return 4;
|
|
1186
1186
|
default:
|
|
1187
|
-
return
|
|
1187
|
+
return ae.allocate({ refcount: 1, value: e });
|
|
1188
1188
|
}
|
|
1189
1189
|
} };
|
|
1190
1190
|
function Ci(e, t) {
|
|
1191
|
-
t =
|
|
1191
|
+
t = Z(t), me(e, {
|
|
1192
1192
|
name: t,
|
|
1193
1193
|
fromWireType: function(r) {
|
|
1194
|
-
var n =
|
|
1194
|
+
var n = X.toValue(r);
|
|
1195
1195
|
return Ut(r), n;
|
|
1196
1196
|
},
|
|
1197
1197
|
toWireType: function(r, n) {
|
|
1198
|
-
return
|
|
1198
|
+
return X.toHandle(n);
|
|
1199
1199
|
},
|
|
1200
1200
|
argPackAdvance: 8,
|
|
1201
1201
|
readValueFromPointer: Ye,
|
|
1202
1202
|
destructorFunction: null
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Re(e) {
|
|
1206
1206
|
if (e === null)
|
|
1207
1207
|
return "null";
|
|
1208
1208
|
var t = typeof e;
|
|
@@ -1224,14 +1224,14 @@ return ret;
|
|
|
1224
1224
|
}
|
|
1225
1225
|
function Si(e, t, r) {
|
|
1226
1226
|
var n = Dt(r);
|
|
1227
|
-
t =
|
|
1227
|
+
t = Z(t), me(e, {
|
|
1228
1228
|
name: t,
|
|
1229
1229
|
fromWireType: function(a) {
|
|
1230
1230
|
return a;
|
|
1231
1231
|
},
|
|
1232
1232
|
toWireType: function(a, s) {
|
|
1233
1233
|
if (typeof s != "number" && typeof s != "boolean")
|
|
1234
|
-
throw new TypeError(`Cannot convert ${
|
|
1234
|
+
throw new TypeError(`Cannot convert ${Re(s)} to ${this.name}`);
|
|
1235
1235
|
return s;
|
|
1236
1236
|
},
|
|
1237
1237
|
argPackAdvance: 8,
|
|
@@ -1243,13 +1243,13 @@ return ret;
|
|
|
1243
1243
|
switch (t) {
|
|
1244
1244
|
case 0:
|
|
1245
1245
|
return r ? function(a) {
|
|
1246
|
-
return
|
|
1246
|
+
return se[a];
|
|
1247
1247
|
} : function(a) {
|
|
1248
|
-
return
|
|
1248
|
+
return te[a];
|
|
1249
1249
|
};
|
|
1250
1250
|
case 1:
|
|
1251
1251
|
return r ? function(a) {
|
|
1252
|
-
return
|
|
1252
|
+
return Se[a >> 1];
|
|
1253
1253
|
} : function(a) {
|
|
1254
1254
|
return rt[a >> 1];
|
|
1255
1255
|
};
|
|
@@ -1264,22 +1264,22 @@ return ret;
|
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
1266
|
function Pi(e, t, r, n, a) {
|
|
1267
|
-
t =
|
|
1268
|
-
var s = Dt(r), o = (
|
|
1267
|
+
t = Z(t), a === -1 && (a = 4294967295);
|
|
1268
|
+
var s = Dt(r), o = (P) => P;
|
|
1269
1269
|
if (n === 0) {
|
|
1270
1270
|
var l = 32 - 8 * r;
|
|
1271
|
-
o = (
|
|
1271
|
+
o = (P) => P << l >>> l;
|
|
1272
1272
|
}
|
|
1273
|
-
var d = t.includes("unsigned"), f = (
|
|
1274
|
-
if (typeof
|
|
1275
|
-
throw new TypeError(`Cannot convert "${
|
|
1276
|
-
if (
|
|
1277
|
-
throw new TypeError(`Passing a number "${
|
|
1273
|
+
var d = t.includes("unsigned"), f = (P, A) => {
|
|
1274
|
+
if (typeof P != "number" && typeof P != "boolean")
|
|
1275
|
+
throw new TypeError(`Cannot convert "${Re(P)}" to ${A}`);
|
|
1276
|
+
if (P < n || P > a)
|
|
1277
|
+
throw new TypeError(`Passing a number "${Re(P)}" from JS side to C/C++ side to an argument of type "${t}", which is outside the valid range [${n}, ${a}]!`);
|
|
1278
1278
|
}, m;
|
|
1279
|
-
d ? m = function(
|
|
1280
|
-
return f(
|
|
1281
|
-
} : m = function(
|
|
1282
|
-
return f(
|
|
1279
|
+
d ? m = function(P, A) {
|
|
1280
|
+
return f(A, this.name), A >>> 0;
|
|
1281
|
+
} : m = function(P, A) {
|
|
1282
|
+
return f(A, this.name), A;
|
|
1283
1283
|
}, me(e, {
|
|
1284
1284
|
name: t,
|
|
1285
1285
|
fromWireType: o,
|
|
@@ -1305,7 +1305,7 @@ return ret;
|
|
|
1305
1305
|
var l = x, d = l[o], f = l[o + 1];
|
|
1306
1306
|
return new a(l.buffer, f, d);
|
|
1307
1307
|
}
|
|
1308
|
-
r =
|
|
1308
|
+
r = Z(r), me(e, {
|
|
1309
1309
|
name: r,
|
|
1310
1310
|
fromWireType: s,
|
|
1311
1311
|
argPackAdvance: 8,
|
|
@@ -1338,11 +1338,11 @@ return ret;
|
|
|
1338
1338
|
} else {
|
|
1339
1339
|
if (r + 3 >= s)
|
|
1340
1340
|
break;
|
|
1341
|
-
l > 1114111 &&
|
|
1341
|
+
l > 1114111 && ce("Invalid Unicode code point " + he(l) + " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."), t[r++] = 240 | l >> 18, t[r++] = 128 | l >> 12 & 63, t[r++] = 128 | l >> 6 & 63, t[r++] = 128 | l & 63;
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
return t[r] = 0, r - a;
|
|
1345
|
-
}, Dr = (e, t, r) => (p(typeof r == "number", "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), Ir(e,
|
|
1345
|
+
}, Dr = (e, t, r) => (p(typeof r == "number", "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"), Ir(e, te, t, r)), Lt = (e) => {
|
|
1346
1346
|
for (var t = 0, r = 0; r < e.length; ++r) {
|
|
1347
1347
|
var n = e.charCodeAt(r);
|
|
1348
1348
|
n <= 127 ? t++ : n <= 2047 ? t += 2 : n >= 55296 && n <= 57343 ? (t += 4, ++r) : t += 3;
|
|
@@ -1350,7 +1350,7 @@ return ret;
|
|
|
1350
1350
|
return t;
|
|
1351
1351
|
};
|
|
1352
1352
|
function Ii(e, t) {
|
|
1353
|
-
t =
|
|
1353
|
+
t = Z(t);
|
|
1354
1354
|
var r = t === "std::string";
|
|
1355
1355
|
me(e, {
|
|
1356
1356
|
name: t,
|
|
@@ -1359,33 +1359,33 @@ return ret;
|
|
|
1359
1359
|
if (r)
|
|
1360
1360
|
for (var l = s, d = 0; d <= a; ++d) {
|
|
1361
1361
|
var f = s + d;
|
|
1362
|
-
if (d == a ||
|
|
1363
|
-
var m = f - l,
|
|
1364
|
-
o === void 0 ? o =
|
|
1362
|
+
if (d == a || te[f] == 0) {
|
|
1363
|
+
var m = f - l, P = St(l, m);
|
|
1364
|
+
o === void 0 ? o = P : (o += String.fromCharCode(0), o += P), l = f + 1;
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
1367
|
else {
|
|
1368
|
-
for (var
|
|
1369
|
-
|
|
1370
|
-
o =
|
|
1368
|
+
for (var A = new Array(a), d = 0; d < a; ++d)
|
|
1369
|
+
A[d] = String.fromCharCode(te[s + d]);
|
|
1370
|
+
o = A.join("");
|
|
1371
1371
|
}
|
|
1372
1372
|
return ge(n), o;
|
|
1373
1373
|
},
|
|
1374
1374
|
toWireType: function(n, a) {
|
|
1375
1375
|
a instanceof ArrayBuffer && (a = new Uint8Array(a));
|
|
1376
1376
|
var s, o = typeof a == "string";
|
|
1377
|
-
o || a instanceof Uint8Array || a instanceof Uint8ClampedArray || a instanceof Int8Array ||
|
|
1377
|
+
o || a instanceof Uint8Array || a instanceof Uint8ClampedArray || a instanceof Int8Array || U("Cannot pass non-string to std::string"), r && o ? s = Lt(a) : s = a.length;
|
|
1378
1378
|
var l = ft(4 + s + 1), d = l + 4;
|
|
1379
|
-
if (x[l >> 2] = s,
|
|
1379
|
+
if (x[l >> 2] = s, M(s), r && o)
|
|
1380
1380
|
Dr(a, d, s + 1);
|
|
1381
1381
|
else if (o)
|
|
1382
1382
|
for (var f = 0; f < s; ++f) {
|
|
1383
1383
|
var m = a.charCodeAt(f);
|
|
1384
|
-
m > 255 && (ge(d),
|
|
1384
|
+
m > 255 && (ge(d), U("String has UTF-16 code units that do not fit in 8 bits")), te[d + f] = m;
|
|
1385
1385
|
}
|
|
1386
1386
|
else
|
|
1387
1387
|
for (var f = 0; f < s; ++f)
|
|
1388
|
-
|
|
1388
|
+
te[d + f] = a[f];
|
|
1389
1389
|
return n !== null && n.push(ge, l), l;
|
|
1390
1390
|
},
|
|
1391
1391
|
argPackAdvance: 8,
|
|
@@ -1400,9 +1400,9 @@ return ret;
|
|
|
1400
1400
|
for (var r = e, n = r >> 1, a = n + t / 2; !(n >= a) && rt[n]; )
|
|
1401
1401
|
++n;
|
|
1402
1402
|
if (r = n << 1, r - e > 32 && Mr)
|
|
1403
|
-
return Mr.decode(
|
|
1403
|
+
return Mr.decode(te.subarray(e, r));
|
|
1404
1404
|
for (var s = "", o = 0; !(o >= t / 2); ++o) {
|
|
1405
|
-
var l =
|
|
1405
|
+
var l = Se[e + o * 2 >> 1];
|
|
1406
1406
|
if (l == 0)
|
|
1407
1407
|
break;
|
|
1408
1408
|
s += String.fromCharCode(l);
|
|
@@ -1414,9 +1414,9 @@ return ret;
|
|
|
1414
1414
|
r -= 2;
|
|
1415
1415
|
for (var n = t, a = r < e.length * 2 ? r / 2 : e.length, s = 0; s < a; ++s) {
|
|
1416
1416
|
var o = e.charCodeAt(s);
|
|
1417
|
-
|
|
1417
|
+
Se[t >> 1] = o, Et(o), t += 2;
|
|
1418
1418
|
}
|
|
1419
|
-
return
|
|
1419
|
+
return Se[t >> 1] = 0, Et(0), t - n;
|
|
1420
1420
|
}, $i = (e) => e.length * 2, Oi = (e, t) => {
|
|
1421
1421
|
p(e % 4 == 0, "Pointer passed to UTF32ToString must be aligned to four bytes!");
|
|
1422
1422
|
for (var r = 0, n = ""; !(r >= t / 4); ) {
|
|
@@ -1439,10 +1439,10 @@ return ret;
|
|
|
1439
1439
|
var l = e.charCodeAt(++s);
|
|
1440
1440
|
o = 65536 + ((o & 1023) << 10) | l & 1023;
|
|
1441
1441
|
}
|
|
1442
|
-
if (y[t >> 2] = o,
|
|
1442
|
+
if (y[t >> 2] = o, M(o), t += 4, t + 4 > a)
|
|
1443
1443
|
break;
|
|
1444
1444
|
}
|
|
1445
|
-
return y[t >> 2] = 0,
|
|
1445
|
+
return y[t >> 2] = 0, M(0), t - n;
|
|
1446
1446
|
}, ki = (e) => {
|
|
1447
1447
|
for (var t = 0, r = 0; r < e.length; ++r) {
|
|
1448
1448
|
var n = e.charCodeAt(r);
|
|
@@ -1450,24 +1450,24 @@ return ret;
|
|
|
1450
1450
|
}
|
|
1451
1451
|
return t;
|
|
1452
1452
|
}, xi = function(e, t, r) {
|
|
1453
|
-
r =
|
|
1453
|
+
r = Z(r);
|
|
1454
1454
|
var n, a, s, o, l;
|
|
1455
1455
|
t === 2 ? (n = Di, a = Mi, o = $i, s = () => rt, l = 1) : t === 4 && (n = Oi, a = Ri, o = ki, s = () => x, l = 2), me(e, {
|
|
1456
1456
|
name: r,
|
|
1457
1457
|
fromWireType: function(d) {
|
|
1458
|
-
for (var f = x[d >> 2], m = s(),
|
|
1459
|
-
var
|
|
1460
|
-
if (R == f || m[
|
|
1461
|
-
var
|
|
1462
|
-
|
|
1458
|
+
for (var f = x[d >> 2], m = s(), P, A = d + 4, R = 0; R <= f; ++R) {
|
|
1459
|
+
var j = d + 4 + R * t;
|
|
1460
|
+
if (R == f || m[j >> l] == 0) {
|
|
1461
|
+
var V = j - A, G = n(A, V);
|
|
1462
|
+
P === void 0 ? P = G : (P += String.fromCharCode(0), P += G), A = j + t;
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
return ge(d),
|
|
1465
|
+
return ge(d), P;
|
|
1466
1466
|
},
|
|
1467
1467
|
toWireType: function(d, f) {
|
|
1468
|
-
typeof f != "string" &&
|
|
1469
|
-
var m = o(f),
|
|
1470
|
-
return x[
|
|
1468
|
+
typeof f != "string" && U(`Cannot pass non-string to C++ string type ${r}`);
|
|
1469
|
+
var m = o(f), P = ft(4 + m + t);
|
|
1470
|
+
return x[P >> 2] = m >> l, a(f, P + 4, m + t), d !== null && d.push(ge, P), P;
|
|
1471
1471
|
},
|
|
1472
1472
|
argPackAdvance: 8,
|
|
1473
1473
|
readValueFromPointer: Ye,
|
|
@@ -1478,25 +1478,25 @@ return ret;
|
|
|
1478
1478
|
};
|
|
1479
1479
|
function Ui(e, t, r, n, a, s) {
|
|
1480
1480
|
at[e] = {
|
|
1481
|
-
name:
|
|
1482
|
-
rawConstructor:
|
|
1483
|
-
rawDestructor:
|
|
1481
|
+
name: Z(t),
|
|
1482
|
+
rawConstructor: fe(r, n),
|
|
1483
|
+
rawDestructor: fe(a, s),
|
|
1484
1484
|
fields: []
|
|
1485
1485
|
};
|
|
1486
1486
|
}
|
|
1487
1487
|
function Li(e, t, r, n, a, s, o, l, d, f) {
|
|
1488
1488
|
at[e].fields.push({
|
|
1489
|
-
fieldName:
|
|
1489
|
+
fieldName: Z(t),
|
|
1490
1490
|
getterReturnType: r,
|
|
1491
|
-
getter:
|
|
1491
|
+
getter: fe(n, a),
|
|
1492
1492
|
getterContext: s,
|
|
1493
1493
|
setterArgumentType: o,
|
|
1494
|
-
setter:
|
|
1494
|
+
setter: fe(l, d),
|
|
1495
1495
|
setterContext: f
|
|
1496
1496
|
});
|
|
1497
1497
|
}
|
|
1498
1498
|
function Ni(e, t) {
|
|
1499
|
-
t =
|
|
1499
|
+
t = Z(t), me(e, {
|
|
1500
1500
|
isVoid: !0,
|
|
1501
1501
|
name: t,
|
|
1502
1502
|
argPackAdvance: 0,
|
|
@@ -1508,16 +1508,16 @@ return ret;
|
|
|
1508
1508
|
}
|
|
1509
1509
|
var Wi = !0, Hi = () => Wi;
|
|
1510
1510
|
function Nt(e, t) {
|
|
1511
|
-
var r =
|
|
1512
|
-
return r === void 0 &&
|
|
1511
|
+
var r = Pe[e];
|
|
1512
|
+
return r === void 0 && U(t + " has unknown type " + Sr(e)), r;
|
|
1513
1513
|
}
|
|
1514
1514
|
function Yi(e, t, r) {
|
|
1515
|
-
e =
|
|
1516
|
-
var n = [], a =
|
|
1515
|
+
e = X.toValue(e), t = Nt(t, "emval::as");
|
|
1516
|
+
var n = [], a = X.toHandle(n);
|
|
1517
1517
|
return x[r >> 2] = a, t.toWireType(n, e);
|
|
1518
1518
|
}
|
|
1519
1519
|
var $r = function(e) {
|
|
1520
|
-
return g.handleAsync(() => (e =
|
|
1520
|
+
return g.handleAsync(() => (e = X.toValue(e), e.then(X.toHandle)));
|
|
1521
1521
|
};
|
|
1522
1522
|
$r.isAsync = !0;
|
|
1523
1523
|
function ji(e, t) {
|
|
@@ -1529,55 +1529,55 @@ return ret;
|
|
|
1529
1529
|
return r;
|
|
1530
1530
|
}
|
|
1531
1531
|
function zi(e, t, r, n) {
|
|
1532
|
-
e =
|
|
1532
|
+
e = X.toValue(e);
|
|
1533
1533
|
for (var a = ji(t, r), s = new Array(t), o = 0; o < t; ++o) {
|
|
1534
1534
|
var l = a[o];
|
|
1535
1535
|
s[o] = l.readValueFromPointer(n), n += l.argPackAdvance;
|
|
1536
1536
|
}
|
|
1537
1537
|
var d = e.apply(void 0, s);
|
|
1538
|
-
return
|
|
1538
|
+
return X.toHandle(d);
|
|
1539
1539
|
}
|
|
1540
1540
|
function Vi(e, t) {
|
|
1541
|
-
return e =
|
|
1541
|
+
return e = X.toValue(e), t = X.toValue(t), X.toHandle(e[t]);
|
|
1542
1542
|
}
|
|
1543
1543
|
function Bi(e) {
|
|
1544
|
-
e > 4 && (
|
|
1544
|
+
e > 4 && (ae.get(e).refcount += 1);
|
|
1545
1545
|
}
|
|
1546
1546
|
var Gi = {};
|
|
1547
1547
|
function Qi(e) {
|
|
1548
1548
|
var t = Gi[e];
|
|
1549
|
-
return t === void 0 ?
|
|
1549
|
+
return t === void 0 ? Z(e) : t;
|
|
1550
1550
|
}
|
|
1551
1551
|
function Ji(e) {
|
|
1552
|
-
return
|
|
1552
|
+
return X.toHandle(Qi(e));
|
|
1553
1553
|
}
|
|
1554
1554
|
function qi(e) {
|
|
1555
|
-
var t =
|
|
1555
|
+
var t = X.toValue(e);
|
|
1556
1556
|
Ft(t), Ut(e);
|
|
1557
1557
|
}
|
|
1558
1558
|
function Ki(e, t) {
|
|
1559
1559
|
e = Nt(e, "_emval_take_value");
|
|
1560
1560
|
var r = e.readValueFromPointer(t);
|
|
1561
|
-
return
|
|
1561
|
+
return X.toHandle(r);
|
|
1562
1562
|
}
|
|
1563
1563
|
function Or(e) {
|
|
1564
1564
|
return x[e >> 2] + y[e + 4 >> 2] * 4294967296;
|
|
1565
1565
|
}
|
|
1566
1566
|
var Zi = (e, t) => {
|
|
1567
1567
|
var r = new Date(Or(e) * 1e3);
|
|
1568
|
-
y[t >> 2] = r.getUTCSeconds(),
|
|
1568
|
+
y[t >> 2] = r.getUTCSeconds(), M(r.getUTCSeconds()), y[t + 4 >> 2] = r.getUTCMinutes(), M(r.getUTCMinutes()), y[t + 8 >> 2] = r.getUTCHours(), M(r.getUTCHours()), y[t + 12 >> 2] = r.getUTCDate(), M(r.getUTCDate()), y[t + 16 >> 2] = r.getUTCMonth(), M(r.getUTCMonth()), y[t + 20 >> 2] = r.getUTCFullYear() - 1900, M(r.getUTCFullYear() - 1900), y[t + 24 >> 2] = r.getUTCDay(), M(r.getUTCDay());
|
|
1569
1569
|
var n = Date.UTC(r.getUTCFullYear(), 0, 1, 0, 0, 0, 0), a = (r.getTime() - n) / (1e3 * 60 * 60 * 24) | 0;
|
|
1570
|
-
y[t + 28 >> 2] = a,
|
|
1570
|
+
y[t + 28 >> 2] = a, M(a);
|
|
1571
1571
|
}, Ge = (e) => e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0), Xi = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335], ea = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], Rr = (e) => {
|
|
1572
1572
|
var t = Ge(e.getFullYear()), r = t ? Xi : ea, n = r[e.getMonth()] + e.getDate() - 1;
|
|
1573
1573
|
return n;
|
|
1574
1574
|
}, ta = (e, t) => {
|
|
1575
1575
|
var r = new Date(Or(e) * 1e3);
|
|
1576
|
-
y[t >> 2] = r.getSeconds(),
|
|
1576
|
+
y[t >> 2] = r.getSeconds(), M(r.getSeconds()), y[t + 4 >> 2] = r.getMinutes(), M(r.getMinutes()), y[t + 8 >> 2] = r.getHours(), M(r.getHours()), y[t + 12 >> 2] = r.getDate(), M(r.getDate()), y[t + 16 >> 2] = r.getMonth(), M(r.getMonth()), y[t + 20 >> 2] = r.getFullYear() - 1900, M(r.getFullYear() - 1900), y[t + 24 >> 2] = r.getDay(), M(r.getDay());
|
|
1577
1577
|
var n = Rr(r) | 0;
|
|
1578
|
-
y[t + 28 >> 2] = n,
|
|
1578
|
+
y[t + 28 >> 2] = n, M(n), y[t + 36 >> 2] = -(r.getTimezoneOffset() * 60), M(-(r.getTimezoneOffset() * 60));
|
|
1579
1579
|
var a = new Date(r.getFullYear(), 0, 1), s = new Date(r.getFullYear(), 6, 1).getTimezoneOffset(), o = a.getTimezoneOffset(), l = (s != o && r.getTimezoneOffset() == Math.min(o, s)) | 0;
|
|
1580
|
-
y[t + 32 >> 2] = l,
|
|
1580
|
+
y[t + 32 >> 2] = l, M(l);
|
|
1581
1581
|
}, ra = (e) => {
|
|
1582
1582
|
var t = new Date(
|
|
1583
1583
|
y[e + 20 >> 2] + 1900,
|
|
@@ -1589,26 +1589,26 @@ return ret;
|
|
|
1589
1589
|
0
|
|
1590
1590
|
), r = y[e + 32 >> 2], n = t.getTimezoneOffset(), a = new Date(t.getFullYear(), 0, 1), s = new Date(t.getFullYear(), 6, 1).getTimezoneOffset(), o = a.getTimezoneOffset(), l = Math.min(o, s);
|
|
1591
1591
|
if (r < 0)
|
|
1592
|
-
y[e + 32 >> 2] = Number(s != o && l == n),
|
|
1592
|
+
y[e + 32 >> 2] = Number(s != o && l == n), M(Number(s != o && l == n));
|
|
1593
1593
|
else if (r > 0 != (l == n)) {
|
|
1594
1594
|
var d = Math.max(o, s), f = r > 0 ? l : d;
|
|
1595
1595
|
t.setTime(t.getTime() + (f - n) * 6e4);
|
|
1596
1596
|
}
|
|
1597
|
-
y[e + 24 >> 2] = t.getDay(),
|
|
1597
|
+
y[e + 24 >> 2] = t.getDay(), M(t.getDay());
|
|
1598
1598
|
var m = Rr(t) | 0;
|
|
1599
|
-
return y[e + 28 >> 2] = m,
|
|
1599
|
+
return y[e + 28 >> 2] = m, M(m), y[e >> 2] = t.getSeconds(), M(t.getSeconds()), y[e + 4 >> 2] = t.getMinutes(), M(t.getMinutes()), y[e + 8 >> 2] = t.getHours(), M(t.getHours()), y[e + 12 >> 2] = t.getDate(), M(t.getDate()), y[e + 16 >> 2] = t.getMonth(), M(t.getMonth()), y[e + 20 >> 2] = t.getYear(), M(t.getYear()), t.getTime() / 1e3 | 0;
|
|
1600
1600
|
}, kr = (e) => {
|
|
1601
1601
|
var t = Lt(e) + 1, r = ft(t);
|
|
1602
1602
|
return r && Dr(e, r, t), r;
|
|
1603
1603
|
}, na = (e, t, r) => {
|
|
1604
1604
|
var n = new Date().getFullYear(), a = new Date(n, 0, 1), s = new Date(n, 6, 1), o = a.getTimezoneOffset(), l = s.getTimezoneOffset(), d = Math.max(o, l);
|
|
1605
|
-
x[e >> 2] = d * 60,
|
|
1606
|
-
function f(
|
|
1607
|
-
var
|
|
1608
|
-
return
|
|
1605
|
+
x[e >> 2] = d * 60, M(d * 60), y[t >> 2] = Number(o != l), M(Number(o != l));
|
|
1606
|
+
function f(j) {
|
|
1607
|
+
var V = j.toTimeString().match(/\(([A-Za-z ]+)\)$/);
|
|
1608
|
+
return V ? V[1] : "GMT";
|
|
1609
1609
|
}
|
|
1610
|
-
var m = f(a),
|
|
1611
|
-
l < o ? (x[r >> 2] =
|
|
1610
|
+
var m = f(a), P = f(s), A = kr(m), R = kr(P);
|
|
1611
|
+
l < o ? (x[r >> 2] = A, M(A), x[r + 4 >> 2] = R, M(R)) : (x[r >> 2] = R, M(R), x[r + 4 >> 2] = A, M(A));
|
|
1612
1612
|
}, ia = () => {
|
|
1613
1613
|
J("native code called abort()");
|
|
1614
1614
|
};
|
|
@@ -1618,27 +1618,27 @@ return ret;
|
|
|
1618
1618
|
var xr = () => 2147483648, oa = () => xr(), ct;
|
|
1619
1619
|
ct = () => performance.now();
|
|
1620
1620
|
var sa = (e) => {
|
|
1621
|
-
var t =
|
|
1621
|
+
var t = xe.buffer, r = e - t.byteLength + 65535 >>> 16;
|
|
1622
1622
|
try {
|
|
1623
|
-
return
|
|
1623
|
+
return xe.grow(r), rr(), 1;
|
|
1624
1624
|
} catch (n) {
|
|
1625
|
-
|
|
1625
|
+
C(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`);
|
|
1626
1626
|
}
|
|
1627
1627
|
}, la = (e) => {
|
|
1628
|
-
var t =
|
|
1628
|
+
var t = te.length;
|
|
1629
1629
|
e = e >>> 0, p(e > t);
|
|
1630
1630
|
var r = xr();
|
|
1631
1631
|
if (e > r)
|
|
1632
|
-
return
|
|
1633
|
-
for (var n = (m,
|
|
1632
|
+
return C(`Cannot enlarge memory, asked to go up to ${e} bytes, but the limit is ${r} bytes!`), !1;
|
|
1633
|
+
for (var n = (m, P) => m + (P - m % P) % P, a = 1; a <= 4; a *= 2) {
|
|
1634
1634
|
var s = t * (1 + 0.2 / a);
|
|
1635
1635
|
s = Math.min(s, e + 100663296);
|
|
1636
1636
|
var o = Math.min(r, n(Math.max(e, s), 65536)), l = ct(), d = sa(o), f = ct();
|
|
1637
|
-
if (
|
|
1637
|
+
if (W(`Heap resize call from ${t} to ${o} took ${f - l} msecs. Success: ${!!d}`), d)
|
|
1638
1638
|
return !0;
|
|
1639
1639
|
}
|
|
1640
|
-
return
|
|
1641
|
-
}, Wt = {}, ua = () =>
|
|
1640
|
+
return C(`Failed to grow the heap from ${t} bytes to ${o} bytes, not enough memory!`), !1;
|
|
1641
|
+
}, Wt = {}, ua = () => S || "./this.program", Qe = () => {
|
|
1642
1642
|
if (!Qe.strings) {
|
|
1643
1643
|
var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", t = {
|
|
1644
1644
|
USER: "web_user",
|
|
@@ -1659,21 +1659,21 @@ return ret;
|
|
|
1659
1659
|
return Qe.strings;
|
|
1660
1660
|
}, ca = (e, t) => {
|
|
1661
1661
|
for (var r = 0; r < e.length; ++r)
|
|
1662
|
-
p(e.charCodeAt(r) === (e.charCodeAt(r) & 255)),
|
|
1663
|
-
|
|
1662
|
+
p(e.charCodeAt(r) === (e.charCodeAt(r) & 255)), se[t++ >> 0] = e.charCodeAt(r), He(e.charCodeAt(r));
|
|
1663
|
+
se[t >> 0] = 0, He(0);
|
|
1664
1664
|
}, fa = (e, t) => {
|
|
1665
1665
|
var r = 0;
|
|
1666
1666
|
return Qe().forEach(function(n, a) {
|
|
1667
1667
|
var s = t + r;
|
|
1668
|
-
x[e + a * 4 >> 2] = s,
|
|
1668
|
+
x[e + a * 4 >> 2] = s, M(s), ca(n, s), r += n.length + 1;
|
|
1669
1669
|
}), 0;
|
|
1670
1670
|
}, da = (e, t) => {
|
|
1671
1671
|
var r = Qe();
|
|
1672
|
-
x[e >> 2] = r.length,
|
|
1672
|
+
x[e >> 2] = r.length, M(r.length);
|
|
1673
1673
|
var n = 0;
|
|
1674
1674
|
return r.forEach(function(a) {
|
|
1675
1675
|
n += a.length + 1;
|
|
1676
|
-
}), x[t >> 2] = n,
|
|
1676
|
+
}), x[t >> 2] = n, M(n), 0;
|
|
1677
1677
|
}, _a = (e) => {
|
|
1678
1678
|
J("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM");
|
|
1679
1679
|
}, va = (e, t) => {
|
|
@@ -1683,12 +1683,12 @@ return ret;
|
|
|
1683
1683
|
var s = 2;
|
|
1684
1684
|
e == 0 ? r = 2 : (e == 1 || e == 2) && (r = 64), a = 1;
|
|
1685
1685
|
}
|
|
1686
|
-
return
|
|
1686
|
+
return se[t >> 0] = s, He(s), Se[t + 2 >> 1] = a, Et(a), De = [r >>> 0, (ie = r, +Math.abs(ie) >= 1 ? ie > 0 ? +Math.floor(ie / 4294967296) >>> 0 : ~~+Math.ceil((ie - +(~~ie >>> 0)) / 4294967296) >>> 0 : 0)], y[t + 8 >> 2] = De[0], y[t + 12 >> 2] = De[1], dr(r), De = [n >>> 0, (ie = n, +Math.abs(ie) >= 1 ? ie > 0 ? +Math.floor(ie / 4294967296) >>> 0 : ~~+Math.ceil((ie - +(~~ie >>> 0)) / 4294967296) >>> 0 : 0)], y[t + 16 >> 2] = De[0], y[t + 20 >> 2] = De[1], dr(n), 0;
|
|
1687
1687
|
}, ha = (e, t, r, n) => {
|
|
1688
1688
|
J("fd_read called without SYSCALLS_REQUIRE_FILESYSTEM");
|
|
1689
1689
|
}, ma = (e, t, r, n, a) => 70, Ht = [null, [], []], Yt = (e, t) => {
|
|
1690
1690
|
var r = Ht[e];
|
|
1691
|
-
p(r), t === 0 || t === 10 ? ((e === 1 ?
|
|
1691
|
+
p(r), t === 0 || t === 10 ? ((e === 1 ? W : C)(hr(r, 0)), r.length = 0) : r.push(t);
|
|
1692
1692
|
}, pa = () => {
|
|
1693
1693
|
Pa(0), Ht[1].length && Yt(1, 10), Ht[2].length && Yt(2, 10);
|
|
1694
1694
|
}, ga = (e, t, r, n) => {
|
|
@@ -1696,10 +1696,10 @@ return ret;
|
|
|
1696
1696
|
var o = x[t >> 2], l = x[t + 4 >> 2];
|
|
1697
1697
|
t += 8;
|
|
1698
1698
|
for (var d = 0; d < l; d++)
|
|
1699
|
-
Yt(e,
|
|
1699
|
+
Yt(e, te[o + d]);
|
|
1700
1700
|
a += l;
|
|
1701
1701
|
}
|
|
1702
|
-
return x[n >> 2] = a,
|
|
1702
|
+
return x[n >> 2] = a, M(a), 0;
|
|
1703
1703
|
}, ya = (e, t) => {
|
|
1704
1704
|
for (var r = 0, n = 0; n <= t; r += e[n++])
|
|
1705
1705
|
;
|
|
@@ -1719,7 +1719,7 @@ return ret;
|
|
|
1719
1719
|
return t && (a.length = s), a;
|
|
1720
1720
|
}
|
|
1721
1721
|
var Ta = (e, t) => {
|
|
1722
|
-
p(e.length >= 0, "writeArrayToMemory array must have a length (should be an array or typed array)"),
|
|
1722
|
+
p(e.length >= 0, "writeArrayToMemory array must have a length (should be an array or typed array)"), se.set(e, t);
|
|
1723
1723
|
}, Ca = (e, t, r, n) => {
|
|
1724
1724
|
var a = y[n + 40 >> 2], s = {
|
|
1725
1725
|
tm_sec: y[n >> 2],
|
|
@@ -1766,22 +1766,22 @@ return ret;
|
|
|
1766
1766
|
for (var d in l)
|
|
1767
1767
|
o = o.replace(new RegExp(d, "g"), l[d]);
|
|
1768
1768
|
var f = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], m = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
1769
|
-
function
|
|
1770
|
-
for (var
|
|
1771
|
-
|
|
1772
|
-
return
|
|
1769
|
+
function P(v, T, ee) {
|
|
1770
|
+
for (var q = typeof v == "number" ? v.toString() : v || ""; q.length < T; )
|
|
1771
|
+
q = ee[0] + q;
|
|
1772
|
+
return q;
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1775
|
-
return
|
|
1774
|
+
function A(v, T) {
|
|
1775
|
+
return P(v, T, "0");
|
|
1776
1776
|
}
|
|
1777
|
-
function R(v,
|
|
1778
|
-
function
|
|
1779
|
-
return
|
|
1777
|
+
function R(v, T) {
|
|
1778
|
+
function ee(Ae) {
|
|
1779
|
+
return Ae < 0 ? -1 : Ae > 0 ? 1 : 0;
|
|
1780
1780
|
}
|
|
1781
|
-
var
|
|
1782
|
-
return (
|
|
1781
|
+
var q;
|
|
1782
|
+
return (q = ee(v.getFullYear() - T.getFullYear())) === 0 && (q = ee(v.getMonth() - T.getMonth())) === 0 && (q = ee(v.getDate() - T.getDate())), q;
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function j(v) {
|
|
1785
1785
|
switch (v.getDay()) {
|
|
1786
1786
|
case 0:
|
|
1787
1787
|
return new Date(v.getFullYear() - 1, 11, 29);
|
|
@@ -1799,77 +1799,77 @@ return ret;
|
|
|
1799
1799
|
return new Date(v.getFullYear() - 1, 11, 30);
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1803
|
-
var
|
|
1804
|
-
return R(
|
|
1802
|
+
function V(v) {
|
|
1803
|
+
var T = ba(new Date(v.tm_year + 1900, 0, 1), v.tm_yday), ee = new Date(T.getFullYear(), 0, 4), q = new Date(T.getFullYear() + 1, 0, 4), Ae = j(ee), _t = j(q);
|
|
1804
|
+
return R(Ae, T) <= 0 ? R(_t, T) <= 0 ? T.getFullYear() + 1 : T.getFullYear() : T.getFullYear() - 1;
|
|
1805
1805
|
}
|
|
1806
|
-
var
|
|
1806
|
+
var G = {
|
|
1807
1807
|
"%a": (v) => f[v.tm_wday].substring(0, 3),
|
|
1808
1808
|
"%A": (v) => f[v.tm_wday],
|
|
1809
1809
|
"%b": (v) => m[v.tm_mon].substring(0, 3),
|
|
1810
1810
|
"%B": (v) => m[v.tm_mon],
|
|
1811
1811
|
"%C": (v) => {
|
|
1812
|
-
var
|
|
1813
|
-
return
|
|
1812
|
+
var T = v.tm_year + 1900;
|
|
1813
|
+
return A(T / 100 | 0, 2);
|
|
1814
1814
|
},
|
|
1815
|
-
"%d": (v) =>
|
|
1816
|
-
"%e": (v) =>
|
|
1817
|
-
"%g": (v) =>
|
|
1818
|
-
"%G": (v) =>
|
|
1819
|
-
"%H": (v) =>
|
|
1815
|
+
"%d": (v) => A(v.tm_mday, 2),
|
|
1816
|
+
"%e": (v) => P(v.tm_mday, 2, " "),
|
|
1817
|
+
"%g": (v) => V(v).toString().substring(2),
|
|
1818
|
+
"%G": (v) => V(v),
|
|
1819
|
+
"%H": (v) => A(v.tm_hour, 2),
|
|
1820
1820
|
"%I": (v) => {
|
|
1821
|
-
var
|
|
1822
|
-
return
|
|
1821
|
+
var T = v.tm_hour;
|
|
1822
|
+
return T == 0 ? T = 12 : T > 12 && (T -= 12), A(T, 2);
|
|
1823
1823
|
},
|
|
1824
|
-
"%j": (v) =>
|
|
1825
|
-
"%m": (v) =>
|
|
1826
|
-
"%M": (v) =>
|
|
1824
|
+
"%j": (v) => A(v.tm_mday + ya(Ge(v.tm_year + 1900) ? Ur : Lr, v.tm_mon - 1), 3),
|
|
1825
|
+
"%m": (v) => A(v.tm_mon + 1, 2),
|
|
1826
|
+
"%M": (v) => A(v.tm_min, 2),
|
|
1827
1827
|
"%n": () => `
|
|
1828
1828
|
`,
|
|
1829
1829
|
"%p": (v) => v.tm_hour >= 0 && v.tm_hour < 12 ? "AM" : "PM",
|
|
1830
|
-
"%S": (v) =>
|
|
1830
|
+
"%S": (v) => A(v.tm_sec, 2),
|
|
1831
1831
|
"%t": () => " ",
|
|
1832
1832
|
"%u": (v) => v.tm_wday || 7,
|
|
1833
1833
|
"%U": (v) => {
|
|
1834
|
-
var
|
|
1835
|
-
return
|
|
1834
|
+
var T = v.tm_yday + 7 - v.tm_wday;
|
|
1835
|
+
return A(Math.floor(T / 7), 2);
|
|
1836
1836
|
},
|
|
1837
1837
|
"%V": (v) => {
|
|
1838
|
-
var
|
|
1839
|
-
if ((v.tm_wday + 371 - v.tm_yday - 2) % 7 <= 2 &&
|
|
1840
|
-
if (
|
|
1841
|
-
var
|
|
1842
|
-
|
|
1838
|
+
var T = Math.floor((v.tm_yday + 7 - (v.tm_wday + 6) % 7) / 7);
|
|
1839
|
+
if ((v.tm_wday + 371 - v.tm_yday - 2) % 7 <= 2 && T++, T) {
|
|
1840
|
+
if (T == 53) {
|
|
1841
|
+
var q = (v.tm_wday + 371 - v.tm_yday) % 7;
|
|
1842
|
+
q != 4 && (q != 3 || !Ge(v.tm_year)) && (T = 1);
|
|
1843
1843
|
}
|
|
1844
1844
|
} else {
|
|
1845
|
-
|
|
1846
|
-
var
|
|
1847
|
-
(
|
|
1845
|
+
T = 52;
|
|
1846
|
+
var ee = (v.tm_wday + 7 - v.tm_yday - 1) % 7;
|
|
1847
|
+
(ee == 4 || ee == 5 && Ge(v.tm_year % 400 - 1)) && T++;
|
|
1848
1848
|
}
|
|
1849
|
-
return
|
|
1849
|
+
return A(T, 2);
|
|
1850
1850
|
},
|
|
1851
1851
|
"%w": (v) => v.tm_wday,
|
|
1852
1852
|
"%W": (v) => {
|
|
1853
|
-
var
|
|
1854
|
-
return
|
|
1853
|
+
var T = v.tm_yday + 7 - (v.tm_wday + 6) % 7;
|
|
1854
|
+
return A(Math.floor(T / 7), 2);
|
|
1855
1855
|
},
|
|
1856
1856
|
"%y": (v) => (v.tm_year + 1900).toString().substring(2),
|
|
1857
1857
|
"%Y": (v) => v.tm_year + 1900,
|
|
1858
1858
|
"%z": (v) => {
|
|
1859
|
-
var
|
|
1860
|
-
return
|
|
1859
|
+
var T = v.tm_gmtoff, ee = T >= 0;
|
|
1860
|
+
return T = Math.abs(T) / 60, T = T / 60 * 100 + T % 60, (ee ? "+" : "-") + String("0000" + T).slice(-4);
|
|
1861
1861
|
},
|
|
1862
1862
|
"%Z": (v) => v.tm_zone,
|
|
1863
1863
|
"%%": () => "%"
|
|
1864
1864
|
};
|
|
1865
1865
|
o = o.replace(/%%/g, "\0\0");
|
|
1866
|
-
for (var d in
|
|
1867
|
-
o.includes(d) && (o = o.replace(new RegExp(d, "g"),
|
|
1866
|
+
for (var d in G)
|
|
1867
|
+
o.includes(d) && (o = o.replace(new RegExp(d, "g"), G[d](s)));
|
|
1868
1868
|
o = o.replace(/\0\0/g, "%");
|
|
1869
|
-
var
|
|
1870
|
-
return
|
|
1869
|
+
var K = wa(o, !1);
|
|
1870
|
+
return K.length > t ? 0 : (Ta(K, e), K.length - 1);
|
|
1871
1871
|
};
|
|
1872
|
-
mr = i.InternalError = It(Error, "InternalError"), Un(),
|
|
1872
|
+
mr = i.InternalError = It(Error, "InternalError"), Un(), Oe = i.BindingError = It(Error, "BindingError"), Zn(), Vn(), si(), Er = i.UnboundTypeError = It(Error, "UnboundTypeError"), Ti();
|
|
1873
1873
|
function Ea() {
|
|
1874
1874
|
mn("fetchSettings");
|
|
1875
1875
|
}
|
|
@@ -1922,9 +1922,9 @@ return ret;
|
|
|
1922
1922
|
strftime: Ca
|
|
1923
1923
|
};
|
|
1924
1924
|
g.instrumentWasmImports(jt), hn();
|
|
1925
|
-
var ge =
|
|
1926
|
-
i.__embind_initialize_bindings =
|
|
1927
|
-
var Pa = i._fflush =
|
|
1925
|
+
var ge = D("free"), ft = D("malloc"), Sa = i._main = D("main"), Fa = D("__getTypeName");
|
|
1926
|
+
i.__embind_initialize_bindings = D("_embind_initialize_bindings");
|
|
1927
|
+
var Pa = i._fflush = D("fflush"), Nr = function() {
|
|
1928
1928
|
return (Nr = i.asm.emscripten_stack_init).apply(null, arguments);
|
|
1929
1929
|
}, zt = function() {
|
|
1930
1930
|
return (zt = i.asm.emscripten_stack_get_base).apply(null, arguments);
|
|
@@ -1932,9 +1932,9 @@ return ret;
|
|
|
1932
1932
|
return (Je = i.asm.emscripten_stack_get_end).apply(null, arguments);
|
|
1933
1933
|
}, Wr = function() {
|
|
1934
1934
|
return (Wr = i.asm.emscripten_stack_get_current).apply(null, arguments);
|
|
1935
|
-
}, Aa =
|
|
1936
|
-
i.dynCall_viiii =
|
|
1937
|
-
var Da =
|
|
1935
|
+
}, Aa = D("__cxa_is_pointer_type"), Ia = i.___set_stack_limits = D("__set_stack_limits");
|
|
1936
|
+
i.dynCall_viiii = D("dynCall_viiii"), i.dynCall_dd = D("dynCall_dd"), i.dynCall_ii = D("dynCall_ii"), i.dynCall_vii = D("dynCall_vii"), i.dynCall_iii = D("dynCall_iii"), i.dynCall_iiii = D("dynCall_iiii"), i.dynCall_jiji = D("dynCall_jiji"), i.dynCall_ijiii = D("dynCall_ijiii"), i.dynCall_iiiiiii = D("dynCall_iiiiiii"), i.dynCall_vi = D("dynCall_vi"), i.dynCall_viiiiii = D("dynCall_viiiiii"), i.dynCall_viiiii = D("dynCall_viiiii"), i.dynCall_iiiiii = D("dynCall_iiiiii"), i.dynCall_viii = D("dynCall_viii"), i.dynCall_viiiiiiii = D("dynCall_viiiiiiii"), i.dynCall_viiiiiiiiii = D("dynCall_viiiiiiiiii"), i.dynCall_viiiiiiiii = D("dynCall_viiiiiiiii"), i.dynCall_v = D("dynCall_v"), i.dynCall_iiiii = D("dynCall_iiiii"), i.dynCall_viiiiiii = D("dynCall_viiiiiii"), i.dynCall_viiiiiiiiiiii = D("dynCall_viiiiiiiiiiii"), i.dynCall_viiiiiiiiiiiiii = D("dynCall_viiiiiiiiiiiiii"), i.dynCall_viiiiiiiiiii = D("dynCall_viiiiiiiiiii"), i.dynCall_viifi = D("dynCall_viifi"), i.dynCall_fiii = D("dynCall_fiii"), i.dynCall_viidi = D("dynCall_viidi"), i.dynCall_viiiiiifi = D("dynCall_viiiiiifi"), i.dynCall_viiiifii = D("dynCall_viiiifii"), i.dynCall_fii = D("dynCall_fii"), i.dynCall_iiiji = D("dynCall_iiiji"), i.dynCall_i = D("dynCall_i"), i.dynCall_dii = D("dynCall_dii"), i.dynCall_viid = D("dynCall_viid"), i.dynCall_iidiiii = D("dynCall_iidiiii");
|
|
1937
|
+
var Da = D("asyncify_start_unwind"), Ma = D("asyncify_stop_unwind"), $a = D("asyncify_start_rewind"), Oa = D("asyncify_stop_rewind");
|
|
1938
1938
|
i._ff_h264_cabac_tables = 145716;
|
|
1939
1939
|
var Ra = [
|
|
1940
1940
|
"zeroMemory",
|
|
@@ -2333,21 +2333,21 @@ return ret;
|
|
|
2333
2333
|
}, 1)) : e(), Le();
|
|
2334
2334
|
}
|
|
2335
2335
|
function La() {
|
|
2336
|
-
var e =
|
|
2337
|
-
|
|
2336
|
+
var e = W, t = C, r = !1;
|
|
2337
|
+
W = C = (n) => {
|
|
2338
2338
|
r = !0;
|
|
2339
2339
|
};
|
|
2340
2340
|
try {
|
|
2341
2341
|
pa();
|
|
2342
2342
|
} catch {
|
|
2343
2343
|
}
|
|
2344
|
-
|
|
2344
|
+
W = e, C = t, r && (ce("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc."), ce("(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)"));
|
|
2345
2345
|
}
|
|
2346
2346
|
if (i.preInit)
|
|
2347
2347
|
for (typeof i.preInit == "function" && (i.preInit = [i.preInit]); i.preInit.length > 0; )
|
|
2348
2348
|
i.preInit.pop()();
|
|
2349
2349
|
var Yr = !0;
|
|
2350
|
-
return i.noInitialRun && (Yr = !1), Hr(),
|
|
2350
|
+
return i.noInitialRun && (Yr = !1), Hr(), I.ready;
|
|
2351
2351
|
};
|
|
2352
2352
|
})();
|
|
2353
2353
|
c.exports = _;
|
|
@@ -2366,110 +2366,110 @@ var Jt = {}, Ba = {
|
|
|
2366
2366
|
function h() {
|
|
2367
2367
|
}
|
|
2368
2368
|
Object.create && (h.prototype = /* @__PURE__ */ Object.create(null), new h().__proto__ || (_ = !1));
|
|
2369
|
-
function
|
|
2370
|
-
this.fn =
|
|
2369
|
+
function I(E, S, F) {
|
|
2370
|
+
this.fn = E, this.context = S, this.once = F || !1;
|
|
2371
2371
|
}
|
|
2372
|
-
function i(
|
|
2373
|
-
if (typeof
|
|
2372
|
+
function i(E, S, F, O, Q) {
|
|
2373
|
+
if (typeof F != "function")
|
|
2374
2374
|
throw new TypeError("The listener must be a function");
|
|
2375
|
-
var
|
|
2376
|
-
return
|
|
2375
|
+
var z = new I(F, O || E, Q), L = _ ? _ + S : S;
|
|
2376
|
+
return E._events[L] ? E._events[L].fn ? E._events[L] = [E._events[L], z] : E._events[L].push(z) : (E._events[L] = z, E._eventsCount++), E;
|
|
2377
2377
|
}
|
|
2378
|
-
function k(
|
|
2379
|
-
--
|
|
2378
|
+
function k(E, S) {
|
|
2379
|
+
--E._eventsCount === 0 ? E._events = new h() : delete E._events[S];
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function $() {
|
|
2382
2382
|
this._events = new h(), this._eventsCount = 0;
|
|
2383
2383
|
}
|
|
2384
|
-
|
|
2385
|
-
var
|
|
2384
|
+
$.prototype.eventNames = function() {
|
|
2385
|
+
var S = [], F, O;
|
|
2386
2386
|
if (this._eventsCount === 0)
|
|
2387
|
-
return
|
|
2388
|
-
for (O in
|
|
2389
|
-
u.call(
|
|
2390
|
-
return Object.getOwnPropertySymbols ?
|
|
2391
|
-
},
|
|
2392
|
-
var
|
|
2387
|
+
return S;
|
|
2388
|
+
for (O in F = this._events)
|
|
2389
|
+
u.call(F, O) && S.push(_ ? O.slice(1) : O);
|
|
2390
|
+
return Object.getOwnPropertySymbols ? S.concat(Object.getOwnPropertySymbols(F)) : S;
|
|
2391
|
+
}, $.prototype.listeners = function(S) {
|
|
2392
|
+
var F = _ ? _ + S : S, O = this._events[F];
|
|
2393
2393
|
if (!O)
|
|
2394
2394
|
return [];
|
|
2395
2395
|
if (O.fn)
|
|
2396
2396
|
return [O.fn];
|
|
2397
|
-
for (var
|
|
2398
|
-
|
|
2399
|
-
return
|
|
2400
|
-
},
|
|
2401
|
-
var
|
|
2397
|
+
for (var Q = 0, z = O.length, L = new Array(z); Q < z; Q++)
|
|
2398
|
+
L[Q] = O[Q].fn;
|
|
2399
|
+
return L;
|
|
2400
|
+
}, $.prototype.listenerCount = function(S) {
|
|
2401
|
+
var F = _ ? _ + S : S, O = this._events[F];
|
|
2402
2402
|
return O ? O.fn ? 1 : O.length : 0;
|
|
2403
|
-
},
|
|
2404
|
-
var
|
|
2405
|
-
if (!this._events[
|
|
2403
|
+
}, $.prototype.emit = function(S, F, O, Q, z, L) {
|
|
2404
|
+
var H = _ ? _ + S : S;
|
|
2405
|
+
if (!this._events[H])
|
|
2406
2406
|
return !1;
|
|
2407
|
-
var
|
|
2408
|
-
if (
|
|
2409
|
-
switch (
|
|
2407
|
+
var w = this._events[H], N = arguments.length, W, C;
|
|
2408
|
+
if (w.fn) {
|
|
2409
|
+
switch (w.once && this.removeListener(S, w.fn, void 0, !0), N) {
|
|
2410
2410
|
case 1:
|
|
2411
|
-
return
|
|
2411
|
+
return w.fn.call(w.context), !0;
|
|
2412
2412
|
case 2:
|
|
2413
|
-
return
|
|
2413
|
+
return w.fn.call(w.context, F), !0;
|
|
2414
2414
|
case 3:
|
|
2415
|
-
return
|
|
2415
|
+
return w.fn.call(w.context, F, O), !0;
|
|
2416
2416
|
case 4:
|
|
2417
|
-
return
|
|
2417
|
+
return w.fn.call(w.context, F, O, Q), !0;
|
|
2418
2418
|
case 5:
|
|
2419
|
-
return
|
|
2419
|
+
return w.fn.call(w.context, F, O, Q, z), !0;
|
|
2420
2420
|
case 6:
|
|
2421
|
-
return
|
|
2421
|
+
return w.fn.call(w.context, F, O, Q, z, L), !0;
|
|
2422
2422
|
}
|
|
2423
|
-
for (
|
|
2424
|
-
|
|
2425
|
-
|
|
2423
|
+
for (C = 1, W = new Array(N - 1); C < N; C++)
|
|
2424
|
+
W[C - 1] = arguments[C];
|
|
2425
|
+
w.fn.apply(w.context, W);
|
|
2426
2426
|
} else {
|
|
2427
|
-
var
|
|
2428
|
-
for (
|
|
2429
|
-
switch (
|
|
2427
|
+
var oe = w.length, de;
|
|
2428
|
+
for (C = 0; C < oe; C++)
|
|
2429
|
+
switch (w[C].once && this.removeListener(S, w[C].fn, void 0, !0), N) {
|
|
2430
2430
|
case 1:
|
|
2431
|
-
|
|
2431
|
+
w[C].fn.call(w[C].context);
|
|
2432
2432
|
break;
|
|
2433
2433
|
case 2:
|
|
2434
|
-
|
|
2434
|
+
w[C].fn.call(w[C].context, F);
|
|
2435
2435
|
break;
|
|
2436
2436
|
case 3:
|
|
2437
|
-
|
|
2437
|
+
w[C].fn.call(w[C].context, F, O);
|
|
2438
2438
|
break;
|
|
2439
2439
|
case 4:
|
|
2440
|
-
|
|
2440
|
+
w[C].fn.call(w[C].context, F, O, Q);
|
|
2441
2441
|
break;
|
|
2442
2442
|
default:
|
|
2443
|
-
if (!
|
|
2444
|
-
for (
|
|
2445
|
-
|
|
2446
|
-
|
|
2443
|
+
if (!W)
|
|
2444
|
+
for (de = 1, W = new Array(N - 1); de < N; de++)
|
|
2445
|
+
W[de - 1] = arguments[de];
|
|
2446
|
+
w[C].fn.apply(w[C].context, W);
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
2449
|
return !0;
|
|
2450
|
-
},
|
|
2451
|
-
return i(this,
|
|
2452
|
-
},
|
|
2453
|
-
return i(this,
|
|
2454
|
-
},
|
|
2455
|
-
var
|
|
2456
|
-
if (!this._events[
|
|
2450
|
+
}, $.prototype.on = function(S, F, O) {
|
|
2451
|
+
return i(this, S, F, O, !1);
|
|
2452
|
+
}, $.prototype.once = function(S, F, O) {
|
|
2453
|
+
return i(this, S, F, O, !0);
|
|
2454
|
+
}, $.prototype.removeListener = function(S, F, O, Q) {
|
|
2455
|
+
var z = _ ? _ + S : S;
|
|
2456
|
+
if (!this._events[z])
|
|
2457
2457
|
return this;
|
|
2458
|
-
if (!
|
|
2459
|
-
return k(this,
|
|
2460
|
-
var
|
|
2461
|
-
if (
|
|
2462
|
-
|
|
2458
|
+
if (!F)
|
|
2459
|
+
return k(this, z), this;
|
|
2460
|
+
var L = this._events[z];
|
|
2461
|
+
if (L.fn)
|
|
2462
|
+
L.fn === F && (!Q || L.once) && (!O || L.context === O) && k(this, z);
|
|
2463
2463
|
else {
|
|
2464
|
-
for (var
|
|
2465
|
-
(H
|
|
2466
|
-
|
|
2464
|
+
for (var H = 0, w = [], N = L.length; H < N; H++)
|
|
2465
|
+
(L[H].fn !== F || Q && !L[H].once || O && L[H].context !== O) && w.push(L[H]);
|
|
2466
|
+
w.length ? this._events[z] = w.length === 1 ? w[0] : w : k(this, z);
|
|
2467
2467
|
}
|
|
2468
2468
|
return this;
|
|
2469
|
-
},
|
|
2470
|
-
var
|
|
2471
|
-
return
|
|
2472
|
-
},
|
|
2469
|
+
}, $.prototype.removeAllListeners = function(S) {
|
|
2470
|
+
var F;
|
|
2471
|
+
return S ? (F = _ ? _ + S : S, this._events[F] && k(this, F)) : (this._events = new h(), this._eventsCount = 0), this;
|
|
2472
|
+
}, $.prototype.off = $.prototype.removeListener, $.prototype.addListener = $.prototype.on, $.prefixed = _, $.EventEmitter = $, c.exports = $;
|
|
2473
2473
|
})(Ba);
|
|
2474
2474
|
const Ga = Jt;
|
|
2475
2475
|
class Kr extends Error {
|
|
@@ -2487,8 +2487,8 @@ const jr = (c) => globalThis.DOMException === void 0 ? new Qa(c) : new DOMExcept
|
|
|
2487
2487
|
return u instanceof Error ? u : jr(u);
|
|
2488
2488
|
};
|
|
2489
2489
|
function Ja(c, u, _, h) {
|
|
2490
|
-
let
|
|
2491
|
-
const i = new Promise((k,
|
|
2490
|
+
let I;
|
|
2491
|
+
const i = new Promise((k, $) => {
|
|
2492
2492
|
if (typeof u != "number" || Math.sign(u) !== 1)
|
|
2493
2493
|
throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${u}\``);
|
|
2494
2494
|
if (u === Number.POSITIVE_INFINITY) {
|
|
@@ -2499,46 +2499,46 @@ function Ja(c, u, _, h) {
|
|
|
2499
2499
|
customTimers: { setTimeout, clearTimeout },
|
|
2500
2500
|
...h
|
|
2501
2501
|
}, h.signal) {
|
|
2502
|
-
const { signal:
|
|
2503
|
-
|
|
2504
|
-
|
|
2502
|
+
const { signal: E } = h;
|
|
2503
|
+
E.aborted && $(zr(E)), E.addEventListener("abort", () => {
|
|
2504
|
+
$(zr(E));
|
|
2505
2505
|
});
|
|
2506
2506
|
}
|
|
2507
|
-
|
|
2507
|
+
I = h.customTimers.setTimeout.call(void 0, () => {
|
|
2508
2508
|
if (typeof _ == "function") {
|
|
2509
2509
|
try {
|
|
2510
2510
|
k(_());
|
|
2511
|
-
} catch (
|
|
2512
|
-
|
|
2511
|
+
} catch (F) {
|
|
2512
|
+
$(F);
|
|
2513
2513
|
}
|
|
2514
2514
|
return;
|
|
2515
2515
|
}
|
|
2516
|
-
const
|
|
2517
|
-
typeof c.cancel == "function" && c.cancel(),
|
|
2516
|
+
const E = typeof _ == "string" ? _ : `Promise timed out after ${u} milliseconds`, S = _ instanceof Error ? _ : new Kr(E);
|
|
2517
|
+
typeof c.cancel == "function" && c.cancel(), $(S);
|
|
2518
2518
|
}, u), (async () => {
|
|
2519
2519
|
try {
|
|
2520
2520
|
k(await c);
|
|
2521
|
-
} catch (
|
|
2522
|
-
|
|
2521
|
+
} catch (E) {
|
|
2522
|
+
$(E);
|
|
2523
2523
|
} finally {
|
|
2524
|
-
h.customTimers.clearTimeout.call(void 0,
|
|
2524
|
+
h.customTimers.clearTimeout.call(void 0, I);
|
|
2525
2525
|
}
|
|
2526
2526
|
})();
|
|
2527
2527
|
});
|
|
2528
2528
|
return i.clear = () => {
|
|
2529
|
-
clearTimeout(
|
|
2529
|
+
clearTimeout(I), I = void 0;
|
|
2530
2530
|
}, i;
|
|
2531
2531
|
}
|
|
2532
2532
|
function qa(c, u, _) {
|
|
2533
|
-
let h = 0,
|
|
2534
|
-
for (;
|
|
2535
|
-
const i = Math.trunc(
|
|
2533
|
+
let h = 0, I = c.length;
|
|
2534
|
+
for (; I > 0; ) {
|
|
2535
|
+
const i = Math.trunc(I / 2);
|
|
2536
2536
|
let k = h + i;
|
|
2537
|
-
_(c[k], u) <= 0 ? (h = ++k,
|
|
2537
|
+
_(c[k], u) <= 0 ? (h = ++k, I -= i + 1) : I = i;
|
|
2538
2538
|
}
|
|
2539
2539
|
return h;
|
|
2540
2540
|
}
|
|
2541
|
-
var
|
|
2541
|
+
var Ie = globalThis && globalThis.__classPrivateFieldGet || function(c, u, _, h) {
|
|
2542
2542
|
if (_ === "a" && !h)
|
|
2543
2543
|
throw new TypeError("Private accessor was defined without a getter");
|
|
2544
2544
|
if (typeof u == "function" ? c !== u || !h : !u.has(c))
|
|
@@ -2558,47 +2558,47 @@ class Ka {
|
|
|
2558
2558
|
priority: _.priority,
|
|
2559
2559
|
run: u
|
|
2560
2560
|
};
|
|
2561
|
-
if (this.size &&
|
|
2562
|
-
|
|
2561
|
+
if (this.size && Ie(this, ye, "f")[this.size - 1].priority >= _.priority) {
|
|
2562
|
+
Ie(this, ye, "f").push(h);
|
|
2563
2563
|
return;
|
|
2564
2564
|
}
|
|
2565
|
-
const
|
|
2566
|
-
|
|
2565
|
+
const I = qa(Ie(this, ye, "f"), h, (i, k) => k.priority - i.priority);
|
|
2566
|
+
Ie(this, ye, "f").splice(I, 0, h);
|
|
2567
2567
|
}
|
|
2568
2568
|
dequeue() {
|
|
2569
|
-
const u =
|
|
2569
|
+
const u = Ie(this, ye, "f").shift();
|
|
2570
2570
|
return u?.run;
|
|
2571
2571
|
}
|
|
2572
2572
|
filter(u) {
|
|
2573
|
-
return
|
|
2573
|
+
return Ie(this, ye, "f").filter((_) => _.priority === u.priority).map((_) => _.run);
|
|
2574
2574
|
}
|
|
2575
2575
|
get size() {
|
|
2576
|
-
return
|
|
2576
|
+
return Ie(this, ye, "f").length;
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
2579
2579
|
ye = /* @__PURE__ */ new WeakMap();
|
|
2580
|
-
var
|
|
2580
|
+
var Y = globalThis && globalThis.__classPrivateFieldSet || function(c, u, _, h, I) {
|
|
2581
2581
|
if (h === "m")
|
|
2582
2582
|
throw new TypeError("Private method is not writable");
|
|
2583
|
-
if (h === "a" && !
|
|
2583
|
+
if (h === "a" && !I)
|
|
2584
2584
|
throw new TypeError("Private accessor was defined without a setter");
|
|
2585
|
-
if (typeof u == "function" ? c !== u || !
|
|
2585
|
+
if (typeof u == "function" ? c !== u || !I : !u.has(c))
|
|
2586
2586
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2587
|
-
return h === "a" ?
|
|
2587
|
+
return h === "a" ? I.call(c, _) : I ? I.value = _ : u.set(c, _), _;
|
|
2588
2588
|
}, b = globalThis && globalThis.__classPrivateFieldGet || function(c, u, _, h) {
|
|
2589
2589
|
if (_ === "a" && !h)
|
|
2590
2590
|
throw new TypeError("Private accessor was defined without a getter");
|
|
2591
2591
|
if (typeof u == "function" ? c !== u || !h : !u.has(c))
|
|
2592
2592
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2593
2593
|
return _ === "m" ? h : _ === "a" ? h.call(c) : h ? h.value : u.get(c);
|
|
2594
|
-
},
|
|
2594
|
+
}, B, Ze, Xe, Ee, yt, et, vt, ue, Ke, re, ht, ne, tt, Ce, mt, Vr, Br, Zr, Gr, Qr, Jr, pt, Vt, Bt, bt, gt;
|
|
2595
2595
|
const Za = new Kr();
|
|
2596
2596
|
class Xa extends Error {
|
|
2597
2597
|
}
|
|
2598
2598
|
class eo extends Ga {
|
|
2599
2599
|
constructor(u) {
|
|
2600
|
-
var _, h,
|
|
2601
|
-
if (super(),
|
|
2600
|
+
var _, h, I, i;
|
|
2601
|
+
if (super(), B.add(this), Ze.set(this, void 0), Xe.set(this, void 0), Ee.set(this, 0), yt.set(this, void 0), et.set(this, void 0), vt.set(this, 0), ue.set(this, void 0), Ke.set(this, void 0), re.set(this, void 0), ht.set(this, void 0), ne.set(this, 0), tt.set(this, void 0), Ce.set(this, void 0), mt.set(this, void 0), Object.defineProperty(this, "timeout", {
|
|
2602
2602
|
enumerable: !0,
|
|
2603
2603
|
configurable: !0,
|
|
2604
2604
|
writable: !0,
|
|
@@ -2614,8 +2614,8 @@ class eo extends Ga {
|
|
|
2614
2614
|
}, !(typeof u.intervalCap == "number" && u.intervalCap >= 1))
|
|
2615
2615
|
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(h = (_ = u.intervalCap) === null || _ === void 0 ? void 0 : _.toString()) !== null && h !== void 0 ? h : ""}\` (${typeof u.intervalCap})`);
|
|
2616
2616
|
if (u.interval === void 0 || !(Number.isFinite(u.interval) && u.interval >= 0))
|
|
2617
|
-
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i = (
|
|
2618
|
-
|
|
2617
|
+
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i = (I = u.interval) === null || I === void 0 ? void 0 : I.toString()) !== null && i !== void 0 ? i : ""}\` (${typeof u.interval})`);
|
|
2618
|
+
Y(this, Ze, u.carryoverConcurrencyCount, "f"), Y(this, Xe, u.intervalCap === Number.POSITIVE_INFINITY || u.interval === 0, "f"), Y(this, yt, u.intervalCap, "f"), Y(this, et, u.interval, "f"), Y(this, re, new u.queueClass(), "f"), Y(this, ht, u.queueClass, "f"), this.concurrency = u.concurrency, this.timeout = u.timeout, Y(this, mt, u.throwOnTimeout === !0, "f"), Y(this, Ce, u.autoStart === !1, "f");
|
|
2619
2619
|
}
|
|
2620
2620
|
get concurrency() {
|
|
2621
2621
|
return b(this, tt, "f");
|
|
@@ -2623,113 +2623,113 @@ class eo extends Ga {
|
|
|
2623
2623
|
set concurrency(u) {
|
|
2624
2624
|
if (!(typeof u == "number" && u >= 1))
|
|
2625
2625
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${u}\` (${typeof u})`);
|
|
2626
|
-
|
|
2626
|
+
Y(this, tt, u, "f"), b(this, B, "m", bt).call(this);
|
|
2627
2627
|
}
|
|
2628
2628
|
async add(u, _ = {}) {
|
|
2629
|
-
return new Promise((h,
|
|
2629
|
+
return new Promise((h, I) => {
|
|
2630
2630
|
const i = async () => {
|
|
2631
|
-
var k,
|
|
2632
|
-
|
|
2631
|
+
var k, $, E;
|
|
2632
|
+
Y(this, ne, ($ = b(this, ne, "f"), $++, $), "f"), Y(this, Ee, (E = b(this, Ee, "f"), E++, E), "f");
|
|
2633
2633
|
try {
|
|
2634
2634
|
if (!((k = _.signal) === null || k === void 0) && k.aborted) {
|
|
2635
|
-
|
|
2635
|
+
I(new Xa("The task was aborted."));
|
|
2636
2636
|
return;
|
|
2637
2637
|
}
|
|
2638
|
-
const
|
|
2639
|
-
(_.throwOnTimeout === void 0 ? b(this, mt, "f") : _.throwOnTimeout) &&
|
|
2638
|
+
const F = await (this.timeout === void 0 && _.timeout === void 0 ? u({ signal: _.signal }) : Ja(Promise.resolve(u({ signal: _.signal })), _.timeout === void 0 ? this.timeout : _.timeout, () => {
|
|
2639
|
+
(_.throwOnTimeout === void 0 ? b(this, mt, "f") : _.throwOnTimeout) && I(Za);
|
|
2640
2640
|
}));
|
|
2641
|
-
h(
|
|
2642
|
-
} catch (
|
|
2643
|
-
|
|
2641
|
+
h(F), this.emit("completed", F);
|
|
2642
|
+
} catch (S) {
|
|
2643
|
+
I(S), this.emit("error", S);
|
|
2644
2644
|
}
|
|
2645
|
-
b(this,
|
|
2645
|
+
b(this, B, "m", Zr).call(this);
|
|
2646
2646
|
};
|
|
2647
|
-
b(this,
|
|
2647
|
+
b(this, re, "f").enqueue(i, _), b(this, B, "m", pt).call(this), this.emit("add");
|
|
2648
2648
|
});
|
|
2649
2649
|
}
|
|
2650
2650
|
async addAll(u, _) {
|
|
2651
2651
|
return Promise.all(u.map(async (h) => this.add(h, _)));
|
|
2652
2652
|
}
|
|
2653
2653
|
start() {
|
|
2654
|
-
return b(this, Ce, "f") ? (
|
|
2654
|
+
return b(this, Ce, "f") ? (Y(this, Ce, !1, "f"), b(this, B, "m", bt).call(this), this) : this;
|
|
2655
2655
|
}
|
|
2656
2656
|
pause() {
|
|
2657
|
-
|
|
2657
|
+
Y(this, Ce, !0, "f");
|
|
2658
2658
|
}
|
|
2659
2659
|
clear() {
|
|
2660
|
-
|
|
2660
|
+
Y(this, re, new (b(this, ht, "f"))(), "f");
|
|
2661
2661
|
}
|
|
2662
2662
|
async onEmpty() {
|
|
2663
|
-
b(this,
|
|
2663
|
+
b(this, re, "f").size !== 0 && await b(this, B, "m", gt).call(this, "empty");
|
|
2664
2664
|
}
|
|
2665
2665
|
async onSizeLessThan(u) {
|
|
2666
|
-
b(this,
|
|
2666
|
+
b(this, re, "f").size < u || await b(this, B, "m", gt).call(this, "next", () => b(this, re, "f").size < u);
|
|
2667
2667
|
}
|
|
2668
2668
|
async onIdle() {
|
|
2669
|
-
b(this,
|
|
2669
|
+
b(this, ne, "f") === 0 && b(this, re, "f").size === 0 || await b(this, B, "m", gt).call(this, "idle");
|
|
2670
2670
|
}
|
|
2671
2671
|
get size() {
|
|
2672
|
-
return b(this,
|
|
2672
|
+
return b(this, re, "f").size;
|
|
2673
2673
|
}
|
|
2674
2674
|
sizeBy(u) {
|
|
2675
|
-
return b(this,
|
|
2675
|
+
return b(this, re, "f").filter(u).length;
|
|
2676
2676
|
}
|
|
2677
2677
|
get pending() {
|
|
2678
|
-
return b(this,
|
|
2678
|
+
return b(this, ne, "f");
|
|
2679
2679
|
}
|
|
2680
2680
|
get isPaused() {
|
|
2681
2681
|
return b(this, Ce, "f");
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
|
-
Ze = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(),
|
|
2684
|
+
Ze = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), re = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), Vr = function() {
|
|
2685
2685
|
return b(this, Xe, "f") || b(this, Ee, "f") < b(this, yt, "f");
|
|
2686
2686
|
}, Br = function() {
|
|
2687
|
-
return b(this,
|
|
2687
|
+
return b(this, ne, "f") < b(this, tt, "f");
|
|
2688
2688
|
}, Zr = function() {
|
|
2689
2689
|
var u;
|
|
2690
|
-
|
|
2690
|
+
Y(this, ne, (u = b(this, ne, "f"), u--, u), "f"), b(this, B, "m", pt).call(this), this.emit("next");
|
|
2691
2691
|
}, Gr = function() {
|
|
2692
|
-
this.emit("empty"), b(this,
|
|
2692
|
+
this.emit("empty"), b(this, ne, "f") === 0 && this.emit("idle");
|
|
2693
2693
|
}, Qr = function() {
|
|
2694
|
-
b(this,
|
|
2694
|
+
b(this, B, "m", Bt).call(this), b(this, B, "m", Vt).call(this), Y(this, Ke, void 0, "f");
|
|
2695
2695
|
}, Jr = function() {
|
|
2696
2696
|
const u = Date.now();
|
|
2697
|
-
if (b(this,
|
|
2697
|
+
if (b(this, ue, "f") === void 0) {
|
|
2698
2698
|
const _ = b(this, vt, "f") - u;
|
|
2699
2699
|
if (_ < 0)
|
|
2700
|
-
|
|
2700
|
+
Y(this, Ee, b(this, Ze, "f") ? b(this, ne, "f") : 0, "f");
|
|
2701
2701
|
else
|
|
2702
|
-
return b(this, Ke, "f") === void 0 &&
|
|
2703
|
-
b(this,
|
|
2702
|
+
return b(this, Ke, "f") === void 0 && Y(this, Ke, setTimeout(() => {
|
|
2703
|
+
b(this, B, "m", Qr).call(this);
|
|
2704
2704
|
}, _), "f"), !0;
|
|
2705
2705
|
}
|
|
2706
2706
|
return !1;
|
|
2707
2707
|
}, pt = function() {
|
|
2708
|
-
if (b(this,
|
|
2709
|
-
return b(this,
|
|
2708
|
+
if (b(this, re, "f").size === 0)
|
|
2709
|
+
return b(this, ue, "f") && clearInterval(b(this, ue, "f")), Y(this, ue, void 0, "f"), b(this, B, "m", Gr).call(this), !1;
|
|
2710
2710
|
if (!b(this, Ce, "f")) {
|
|
2711
|
-
const u = !b(this,
|
|
2712
|
-
if (b(this,
|
|
2713
|
-
const _ = b(this,
|
|
2714
|
-
return _ ? (this.emit("active"), _(), u && b(this,
|
|
2711
|
+
const u = !b(this, B, "a", Jr);
|
|
2712
|
+
if (b(this, B, "a", Vr) && b(this, B, "a", Br)) {
|
|
2713
|
+
const _ = b(this, re, "f").dequeue();
|
|
2714
|
+
return _ ? (this.emit("active"), _(), u && b(this, B, "m", Vt).call(this), !0) : !1;
|
|
2715
2715
|
}
|
|
2716
2716
|
}
|
|
2717
2717
|
return !1;
|
|
2718
2718
|
}, Vt = function() {
|
|
2719
|
-
b(this, Xe, "f") || b(this,
|
|
2720
|
-
b(this,
|
|
2721
|
-
}, b(this, et, "f")), "f"),
|
|
2719
|
+
b(this, Xe, "f") || b(this, ue, "f") !== void 0 || (Y(this, ue, setInterval(() => {
|
|
2720
|
+
b(this, B, "m", Bt).call(this);
|
|
2721
|
+
}, b(this, et, "f")), "f"), Y(this, vt, Date.now() + b(this, et, "f"), "f"));
|
|
2722
2722
|
}, Bt = function() {
|
|
2723
|
-
b(this, Ee, "f") === 0 && b(this,
|
|
2723
|
+
b(this, Ee, "f") === 0 && b(this, ne, "f") === 0 && b(this, ue, "f") && (clearInterval(b(this, ue, "f")), Y(this, ue, void 0, "f")), Y(this, Ee, b(this, Ze, "f") ? b(this, ne, "f") : 0, "f"), b(this, B, "m", bt).call(this);
|
|
2724
2724
|
}, bt = function() {
|
|
2725
|
-
for (; b(this,
|
|
2725
|
+
for (; b(this, B, "m", pt).call(this); )
|
|
2726
2726
|
;
|
|
2727
2727
|
}, gt = async function(u, _) {
|
|
2728
2728
|
return new Promise((h) => {
|
|
2729
|
-
const
|
|
2730
|
-
_ && !_() || (this.off(u,
|
|
2729
|
+
const I = () => {
|
|
2730
|
+
_ && !_() || (this.off(u, I), h());
|
|
2731
2731
|
};
|
|
2732
|
-
this.on(u,
|
|
2732
|
+
this.on(u, I);
|
|
2733
2733
|
});
|
|
2734
2734
|
};
|
|
2735
2735
|
const qr = (c) => Va({
|
|
@@ -2737,83 +2737,83 @@ const qr = (c) => Va({
|
|
|
2737
2737
|
printErr: (u) => u.includes("Timestamps are unset in a packet") || u.includes("Read error at pos.") ? void 0 : console.error(u)
|
|
2738
2738
|
});
|
|
2739
2739
|
let qe;
|
|
2740
|
-
const to = ja(async ({ publicPath: c, length: u, bufferSize: _, randomRead: h, streamRead:
|
|
2740
|
+
const to = ja(async ({ publicPath: c, length: u, bufferSize: _, randomRead: h, streamRead: I, clearStream: i, attachment: k, subtitle: $ }) => {
|
|
2741
2741
|
qe || (qe = await qr(c));
|
|
2742
|
-
let
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2745
|
-
|
|
2742
|
+
let E = new Uint8Array(0), S, F, O;
|
|
2743
|
+
const Q = () => {
|
|
2744
|
+
O || (O = new Promise((w, N) => {
|
|
2745
|
+
S = w, F = N;
|
|
2746
2746
|
}));
|
|
2747
|
-
},
|
|
2747
|
+
}, z = () => new qe.Remuxer({
|
|
2748
2748
|
promise: Promise.resolve(),
|
|
2749
2749
|
length: u,
|
|
2750
2750
|
bufferSize: _,
|
|
2751
|
-
error: (
|
|
2752
|
-
console.log("worker error",
|
|
2751
|
+
error: (w, N) => {
|
|
2752
|
+
console.log("worker error", w, N);
|
|
2753
2753
|
},
|
|
2754
|
-
subtitle: (
|
|
2755
|
-
|
|
2754
|
+
subtitle: (w, N, W, ...C) => {
|
|
2755
|
+
$(w, N, W, ...C);
|
|
2756
2756
|
},
|
|
2757
|
-
attachment: (
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2757
|
+
attachment: (w, N, W) => {
|
|
2758
|
+
const C = new Uint8Array(W), oe = C.buffer.slice(C.byteOffset, C.byteOffset + C.byteLength);
|
|
2759
|
+
k(w, N, oe);
|
|
2760
2760
|
},
|
|
2761
|
-
streamRead: async (
|
|
2762
|
-
new Promise((
|
|
2763
|
-
|
|
2764
|
-
|
|
2761
|
+
streamRead: async (w) => Promise.race([
|
|
2762
|
+
new Promise((N) => {
|
|
2763
|
+
H.on("add", function W() {
|
|
2764
|
+
H.size !== 0 && (N(void 0), H.off("add", W));
|
|
2765
2765
|
});
|
|
2766
2766
|
}).then(() => ({
|
|
2767
2767
|
buffer: void 0,
|
|
2768
2768
|
done: !1,
|
|
2769
2769
|
cancelled: !0
|
|
2770
2770
|
})),
|
|
2771
|
-
|
|
2772
|
-
buffer:
|
|
2773
|
-
done:
|
|
2774
|
-
cancelled:
|
|
2771
|
+
I(Number(w)).then(({ buffer: N, done: W, cancelled: C }) => ({
|
|
2772
|
+
buffer: N ? new Uint8Array(N) : void 0,
|
|
2773
|
+
done: W,
|
|
2774
|
+
cancelled: C
|
|
2775
2775
|
}))
|
|
2776
2776
|
]),
|
|
2777
2777
|
clearStream: () => i(),
|
|
2778
|
-
randomRead: async (
|
|
2779
|
-
buffer:
|
|
2778
|
+
randomRead: async (w, N) => h(Number(w), N).then((W) => ({
|
|
2779
|
+
buffer: W ? new Uint8Array(W) : void 0,
|
|
2780
2780
|
done: !1,
|
|
2781
2781
|
cancelled: !1
|
|
2782
2782
|
})),
|
|
2783
|
-
write: (
|
|
2784
|
-
const
|
|
2785
|
-
|
|
2783
|
+
write: (w) => {
|
|
2784
|
+
const N = new Uint8Array(E.byteLength + w.byteLength);
|
|
2785
|
+
N.set(E), N.set(new Uint8Array(w), E.byteLength), E = N;
|
|
2786
2786
|
},
|
|
2787
|
-
flush: async (
|
|
2788
|
-
const
|
|
2789
|
-
if (!
|
|
2787
|
+
flush: async (w, N, W, C) => {
|
|
2788
|
+
const oe = Number(w), de = Number(N);
|
|
2789
|
+
if (!E.byteLength)
|
|
2790
2790
|
return !0;
|
|
2791
|
-
if (!
|
|
2791
|
+
if (!S)
|
|
2792
2792
|
throw new Error("No readResultPromiseResolve on libav flush");
|
|
2793
|
-
return
|
|
2793
|
+
return S({
|
|
2794
2794
|
isHeader: !1,
|
|
2795
|
-
offset:
|
|
2796
|
-
buffer:
|
|
2797
|
-
pos:
|
|
2798
|
-
pts:
|
|
2799
|
-
duration:
|
|
2800
|
-
}),
|
|
2795
|
+
offset: oe,
|
|
2796
|
+
buffer: E.buffer,
|
|
2797
|
+
pos: de,
|
|
2798
|
+
pts: W,
|
|
2799
|
+
duration: C
|
|
2800
|
+
}), S = void 0, F = void 0, O = void 0, E = new Uint8Array(0), !1;
|
|
2801
2801
|
},
|
|
2802
2802
|
exit: () => {
|
|
2803
|
-
const
|
|
2804
|
-
|
|
2803
|
+
const w = F;
|
|
2804
|
+
S = void 0, F = void 0, O = void 0, w?.(new Error("exit"));
|
|
2805
2805
|
}
|
|
2806
2806
|
});
|
|
2807
|
-
let
|
|
2808
|
-
const
|
|
2807
|
+
let L = z();
|
|
2808
|
+
const H = new eo({ concurrency: 1 });
|
|
2809
2809
|
return {
|
|
2810
|
-
init: async () => (
|
|
2810
|
+
init: async () => (E = new Uint8Array(0), qe = await qr(c), L = z(), Q(), L.init(), O),
|
|
2811
2811
|
destroy: () => {
|
|
2812
|
-
|
|
2812
|
+
L.destroy(), L = void 0, qe = void 0, E = new Uint8Array(0);
|
|
2813
2813
|
},
|
|
2814
|
-
seek: (
|
|
2815
|
-
read: () =>
|
|
2816
|
-
getInfo: () =>
|
|
2814
|
+
seek: (w) => H.add(() => L.seek(w)),
|
|
2815
|
+
read: () => H.add(async () => (Q(), L.read(), O)),
|
|
2816
|
+
getInfo: async () => L.getInfo()
|
|
2817
2817
|
};
|
|
2818
2818
|
}), ro = {
|
|
2819
2819
|
init: to
|