barcode-detector 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -133
- package/dist/cjs/core.d.ts +21 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/polyfill.d.ts +8 -0
- package/dist/cjs/polyfill.js +1 -0
- package/dist/cjs/ponyfill.d.ts +2 -0
- package/dist/cjs/ponyfill.js +2 -0
- package/dist/cjs/utils.d.ts +5 -3
- package/dist/cjs/zxing-exported.d.ts +1 -0
- package/dist/es/core.d.ts +21 -0
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +9 -4
- package/dist/es/polyfill.d.ts +8 -0
- package/dist/es/polyfill.js +12 -0
- package/dist/es/ponyfill.d.ts +2 -0
- package/dist/es/ponyfill.js +2168 -0
- package/dist/es/utils.d.ts +5 -3
- package/dist/es/zxing-exported.d.ts +1 -0
- package/dist/iife/index.js +2 -2
- package/dist/iife/polyfill.js +2 -0
- package/dist/iife/ponyfill.js +2 -0
- package/package.json +59 -28
- package/dist/cjs/BarcodeDetector.d.ts +0 -34
- package/dist/cjs/pure.d.ts +0 -1
- package/dist/cjs/pure.js +0 -2
- package/dist/cjs/side-effects.d.ts +0 -8
- package/dist/cjs/side-effects.js +0 -1
- package/dist/es/BarcodeDetector.d.ts +0 -34
- package/dist/es/pure.d.ts +0 -1
- package/dist/es/pure.js +0 -2176
- package/dist/es/side-effects.d.ts +0 -8
- package/dist/es/side-effects.js +0 -7
- package/dist/iife/pure.js +0 -2
- package/dist/iife/side-effects.js +0 -2
|
@@ -0,0 +1,2168 @@
|
|
|
1
|
+
var Xe = (i) => {
|
|
2
|
+
throw TypeError(i);
|
|
3
|
+
};
|
|
4
|
+
var qe = (i, f, p) => f.has(i) || Xe("Cannot " + p);
|
|
5
|
+
var Ze = (i, f, p) => (qe(i, f, "read from private field"), p ? p.call(i) : f.get(i)), Ye = (i, f, p) => f.has(i) ? Xe("Cannot add the same private member more than once") : f instanceof WeakSet ? f.add(i) : f.set(i, p), Qe = (i, f, p, T) => (qe(i, f, "write to private field"), T ? T.call(i, p) : f.set(i, p), p);
|
|
6
|
+
const Lt = [
|
|
7
|
+
["Aztec", "M"],
|
|
8
|
+
["Codabar", "L"],
|
|
9
|
+
["Code39", "L"],
|
|
10
|
+
["Code93", "L"],
|
|
11
|
+
["Code128", "L"],
|
|
12
|
+
["DataBar", "L"],
|
|
13
|
+
["DataBarExpanded", "L"],
|
|
14
|
+
["DataMatrix", "M"],
|
|
15
|
+
["EAN-8", "L"],
|
|
16
|
+
["EAN-13", "L"],
|
|
17
|
+
["ITF", "L"],
|
|
18
|
+
["MaxiCode", "M"],
|
|
19
|
+
["PDF417", "M"],
|
|
20
|
+
["QRCode", "M"],
|
|
21
|
+
["UPC-A", "L"],
|
|
22
|
+
["UPC-E", "L"],
|
|
23
|
+
["MicroQRCode", "M"],
|
|
24
|
+
["rMQRCode", "M"],
|
|
25
|
+
["DXFilmEdge", "L"],
|
|
26
|
+
["DataBarLimited", "L"]
|
|
27
|
+
], Ut = Lt.map(([i]) => i), Za = Ut.filter(
|
|
28
|
+
(i, f) => Lt[f][1] === "L"
|
|
29
|
+
), Ya = Ut.filter(
|
|
30
|
+
(i, f) => Lt[f][1] === "M"
|
|
31
|
+
);
|
|
32
|
+
function re(i) {
|
|
33
|
+
switch (i) {
|
|
34
|
+
case "Linear-Codes":
|
|
35
|
+
return Za.reduce((f, p) => f | re(p), 0);
|
|
36
|
+
case "Matrix-Codes":
|
|
37
|
+
return Ya.reduce((f, p) => f | re(p), 0);
|
|
38
|
+
case "Any":
|
|
39
|
+
return (1 << Lt.length) - 1;
|
|
40
|
+
case "None":
|
|
41
|
+
return 0;
|
|
42
|
+
default:
|
|
43
|
+
return 1 << Ut.indexOf(i);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function Qa(i) {
|
|
47
|
+
if (i === 0)
|
|
48
|
+
return "None";
|
|
49
|
+
const f = 31 - Math.clz32(i);
|
|
50
|
+
return Ut[f];
|
|
51
|
+
}
|
|
52
|
+
function Ja(i) {
|
|
53
|
+
return i.reduce((f, p) => f | re(p), 0);
|
|
54
|
+
}
|
|
55
|
+
const Ka = [
|
|
56
|
+
"LocalAverage",
|
|
57
|
+
"GlobalHistogram",
|
|
58
|
+
"FixedThreshold",
|
|
59
|
+
"BoolCast"
|
|
60
|
+
];
|
|
61
|
+
function ti(i) {
|
|
62
|
+
return Ka.indexOf(i);
|
|
63
|
+
}
|
|
64
|
+
const Je = [
|
|
65
|
+
"Unknown",
|
|
66
|
+
"ASCII",
|
|
67
|
+
"ISO8859_1",
|
|
68
|
+
"ISO8859_2",
|
|
69
|
+
"ISO8859_3",
|
|
70
|
+
"ISO8859_4",
|
|
71
|
+
"ISO8859_5",
|
|
72
|
+
"ISO8859_6",
|
|
73
|
+
"ISO8859_7",
|
|
74
|
+
"ISO8859_8",
|
|
75
|
+
"ISO8859_9",
|
|
76
|
+
"ISO8859_10",
|
|
77
|
+
"ISO8859_11",
|
|
78
|
+
"ISO8859_13",
|
|
79
|
+
"ISO8859_14",
|
|
80
|
+
"ISO8859_15",
|
|
81
|
+
"ISO8859_16",
|
|
82
|
+
"Cp437",
|
|
83
|
+
"Cp1250",
|
|
84
|
+
"Cp1251",
|
|
85
|
+
"Cp1252",
|
|
86
|
+
"Cp1256",
|
|
87
|
+
"Shift_JIS",
|
|
88
|
+
"Big5",
|
|
89
|
+
"GB2312",
|
|
90
|
+
"GB18030",
|
|
91
|
+
"EUC_JP",
|
|
92
|
+
"EUC_KR",
|
|
93
|
+
"UTF16BE",
|
|
94
|
+
/**
|
|
95
|
+
* UnicodeBig [[deprecated]]
|
|
96
|
+
*/
|
|
97
|
+
"UTF16BE",
|
|
98
|
+
"UTF8",
|
|
99
|
+
"UTF16LE",
|
|
100
|
+
"UTF32BE",
|
|
101
|
+
"UTF32LE",
|
|
102
|
+
"BINARY"
|
|
103
|
+
];
|
|
104
|
+
function ei(i) {
|
|
105
|
+
return i === "UnicodeBig" ? Je.indexOf("UTF16BE") : Je.indexOf(i);
|
|
106
|
+
}
|
|
107
|
+
const ri = [
|
|
108
|
+
"Text",
|
|
109
|
+
"Binary",
|
|
110
|
+
"Mixed",
|
|
111
|
+
"GS1",
|
|
112
|
+
"ISO15434",
|
|
113
|
+
"UnknownECI"
|
|
114
|
+
];
|
|
115
|
+
function ni(i) {
|
|
116
|
+
return ri[i];
|
|
117
|
+
}
|
|
118
|
+
const ai = ["Ignore", "Read", "Require"];
|
|
119
|
+
function ii(i) {
|
|
120
|
+
return ai.indexOf(i);
|
|
121
|
+
}
|
|
122
|
+
const oi = ["Plain", "ECI", "HRI", "Hex", "Escaped"];
|
|
123
|
+
function si(i) {
|
|
124
|
+
return oi.indexOf(i);
|
|
125
|
+
}
|
|
126
|
+
const Bt = {
|
|
127
|
+
formats: [],
|
|
128
|
+
tryHarder: !0,
|
|
129
|
+
tryRotate: !0,
|
|
130
|
+
tryInvert: !0,
|
|
131
|
+
tryDownscale: !0,
|
|
132
|
+
tryDenoise: !1,
|
|
133
|
+
binarizer: "LocalAverage",
|
|
134
|
+
isPure: !1,
|
|
135
|
+
downscaleFactor: 3,
|
|
136
|
+
downscaleThreshold: 500,
|
|
137
|
+
minLineCount: 2,
|
|
138
|
+
maxNumberOfSymbols: 255,
|
|
139
|
+
tryCode39ExtendedMode: !0,
|
|
140
|
+
returnErrors: !1,
|
|
141
|
+
eanAddOnSymbol: "Ignore",
|
|
142
|
+
textMode: "HRI",
|
|
143
|
+
characterSet: "Unknown"
|
|
144
|
+
};
|
|
145
|
+
function Ke(i) {
|
|
146
|
+
return {
|
|
147
|
+
...i,
|
|
148
|
+
formats: Ja(i.formats),
|
|
149
|
+
binarizer: ti(i.binarizer),
|
|
150
|
+
eanAddOnSymbol: ii(i.eanAddOnSymbol),
|
|
151
|
+
textMode: si(i.textMode),
|
|
152
|
+
characterSet: ei(i.characterSet)
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function ui(i) {
|
|
156
|
+
return {
|
|
157
|
+
...i,
|
|
158
|
+
format: Qa(i.format),
|
|
159
|
+
contentType: ni(i.contentType),
|
|
160
|
+
eccLevel: i.ecLevel
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
const Di = "2.0.1", Mi = "7be9048e8176fba4f6ffa3dcf528282c6b0151a9", ci = {
|
|
164
|
+
locateFile: (i, f) => {
|
|
165
|
+
const p = i.match(/_(.+?)\.wasm$/);
|
|
166
|
+
return p ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.0.1/dist/${p[1]}/${i}` : f + i;
|
|
167
|
+
}
|
|
168
|
+
}, Rt = /* @__PURE__ */ new WeakMap();
|
|
169
|
+
function li(i, f) {
|
|
170
|
+
return Object.is(i, f) || Object.keys(i).length === Object.keys(f).length && Object.keys(i).every(
|
|
171
|
+
(p) => Object.prototype.hasOwnProperty.call(f, p) && i[p] === f[p]
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
function er(i, {
|
|
175
|
+
overrides: f,
|
|
176
|
+
equalityFn: p = li,
|
|
177
|
+
fireImmediately: T = !1
|
|
178
|
+
} = {}) {
|
|
179
|
+
var c;
|
|
180
|
+
const [O, x] = (c = Rt.get(i)) != null ? c : [ci], j = f != null ? f : O;
|
|
181
|
+
let M;
|
|
182
|
+
if (T) {
|
|
183
|
+
if (x && (M = p(O, j)))
|
|
184
|
+
return x;
|
|
185
|
+
const L = i({
|
|
186
|
+
...j
|
|
187
|
+
});
|
|
188
|
+
return Rt.set(i, [j, L]), L;
|
|
189
|
+
}
|
|
190
|
+
(M != null ? M : p(O, j)) || Rt.set(i, [j]);
|
|
191
|
+
}
|
|
192
|
+
function fi(i) {
|
|
193
|
+
Rt.delete(i);
|
|
194
|
+
}
|
|
195
|
+
async function di(i, f, p = Bt) {
|
|
196
|
+
const T = {
|
|
197
|
+
...Bt,
|
|
198
|
+
...p
|
|
199
|
+
}, c = await er(i, {
|
|
200
|
+
fireImmediately: !0
|
|
201
|
+
});
|
|
202
|
+
let O, x;
|
|
203
|
+
if ("size" in f) {
|
|
204
|
+
const { size: M } = f, L = new Uint8Array(await f.arrayBuffer());
|
|
205
|
+
x = c._malloc(M), c.HEAPU8.set(L, x), O = c.readBarcodesFromImage(
|
|
206
|
+
x,
|
|
207
|
+
M,
|
|
208
|
+
Ke(T)
|
|
209
|
+
);
|
|
210
|
+
} else {
|
|
211
|
+
const {
|
|
212
|
+
data: M,
|
|
213
|
+
data: { byteLength: L },
|
|
214
|
+
width: k,
|
|
215
|
+
height: Z
|
|
216
|
+
} = f;
|
|
217
|
+
x = c._malloc(L), c.HEAPU8.set(M, x), O = c.readBarcodesFromPixmap(
|
|
218
|
+
x,
|
|
219
|
+
k,
|
|
220
|
+
Z,
|
|
221
|
+
Ke(T)
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
c._free(x);
|
|
225
|
+
const j = [];
|
|
226
|
+
for (let M = 0; M < O.size(); ++M)
|
|
227
|
+
j.push(
|
|
228
|
+
ui(O.get(M))
|
|
229
|
+
);
|
|
230
|
+
return j;
|
|
231
|
+
}
|
|
232
|
+
({
|
|
233
|
+
...Bt,
|
|
234
|
+
formats: [...Bt.formats]
|
|
235
|
+
});
|
|
236
|
+
var ae = (() => {
|
|
237
|
+
var i, f = typeof document < "u" && ((i = document.currentScript) == null ? void 0 : i.tagName.toUpperCase()) === "SCRIPT" ? document.currentScript.src : void 0;
|
|
238
|
+
return function(p = {}) {
|
|
239
|
+
var T, c = p, O, x, j = new Promise((t, e) => {
|
|
240
|
+
O = t, x = e;
|
|
241
|
+
}), M = typeof window == "object", L = typeof Bun < "u", k = typeof WorkerGlobalScope < "u";
|
|
242
|
+
typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer";
|
|
243
|
+
var Z = Object.assign({}, c), tt = "./this.program", R = "";
|
|
244
|
+
function yt(t) {
|
|
245
|
+
return c.locateFile ? c.locateFile(t, R) : R + t;
|
|
246
|
+
}
|
|
247
|
+
var it, ot;
|
|
248
|
+
if (M || k || L) {
|
|
249
|
+
var st;
|
|
250
|
+
k ? R = self.location.href : typeof document < "u" && ((st = document.currentScript) === null || st === void 0 ? void 0 : st.tagName.toUpperCase()) === "SCRIPT" && (R = document.currentScript.src), f && (R = f), R.startsWith("blob:") ? R = "" : R = R.substr(0, R.replace(/[?#].*/, "").lastIndexOf("/") + 1), k && (ot = (t) => {
|
|
251
|
+
var e = new XMLHttpRequest();
|
|
252
|
+
return e.open("GET", t, !1), e.responseType = "arraybuffer", e.send(null), new Uint8Array(e.response);
|
|
253
|
+
}), it = async (t) => {
|
|
254
|
+
var e = await fetch(t, {
|
|
255
|
+
credentials: "same-origin"
|
|
256
|
+
});
|
|
257
|
+
if (e.ok)
|
|
258
|
+
return e.arrayBuffer();
|
|
259
|
+
throw new Error(e.status + " : " + e.url);
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
var dr = c.print || console.log.bind(console), et = c.printErr || console.error.bind(console);
|
|
263
|
+
Object.assign(c, Z), Z = null, c.arguments && c.arguments, c.thisProgram && (tt = c.thisProgram);
|
|
264
|
+
var vt = c.wasmBinary, mt, ie = !1, H, B, ut, gt, rt, _, oe, se;
|
|
265
|
+
function ue() {
|
|
266
|
+
var t = mt.buffer;
|
|
267
|
+
c.HEAP8 = H = new Int8Array(t), c.HEAP16 = ut = new Int16Array(t), c.HEAPU8 = B = new Uint8Array(t), c.HEAPU16 = gt = new Uint16Array(t), c.HEAP32 = rt = new Int32Array(t), c.HEAPU32 = _ = new Uint32Array(t), c.HEAPF32 = oe = new Float32Array(t), c.HEAPF64 = se = new Float64Array(t);
|
|
268
|
+
}
|
|
269
|
+
var ce = [], le = [], fe = [];
|
|
270
|
+
function hr() {
|
|
271
|
+
if (c.preRun)
|
|
272
|
+
for (typeof c.preRun == "function" && (c.preRun = [c.preRun]); c.preRun.length; )
|
|
273
|
+
vr(c.preRun.shift());
|
|
274
|
+
kt(ce);
|
|
275
|
+
}
|
|
276
|
+
function pr() {
|
|
277
|
+
kt(le);
|
|
278
|
+
}
|
|
279
|
+
function yr() {
|
|
280
|
+
if (c.postRun)
|
|
281
|
+
for (typeof c.postRun == "function" && (c.postRun = [c.postRun]); c.postRun.length; )
|
|
282
|
+
gr(c.postRun.shift());
|
|
283
|
+
kt(fe);
|
|
284
|
+
}
|
|
285
|
+
function vr(t) {
|
|
286
|
+
ce.unshift(t);
|
|
287
|
+
}
|
|
288
|
+
function mr(t) {
|
|
289
|
+
le.unshift(t);
|
|
290
|
+
}
|
|
291
|
+
function gr(t) {
|
|
292
|
+
fe.unshift(t);
|
|
293
|
+
}
|
|
294
|
+
var Y = 0, ct = null;
|
|
295
|
+
function wr(t) {
|
|
296
|
+
var e;
|
|
297
|
+
Y++, (e = c.monitorRunDependencies) === null || e === void 0 || e.call(c, Y);
|
|
298
|
+
}
|
|
299
|
+
function $r(t) {
|
|
300
|
+
var e;
|
|
301
|
+
if (Y--, (e = c.monitorRunDependencies) === null || e === void 0 || e.call(c, Y), Y == 0 && ct) {
|
|
302
|
+
var r = ct;
|
|
303
|
+
ct = null, r();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function Wt(t) {
|
|
307
|
+
var e;
|
|
308
|
+
(e = c.onAbort) === null || e === void 0 || e.call(c, t), t = "Aborted(" + t + ")", et(t), ie = !0, t += ". Build with -sASSERTIONS for more info.";
|
|
309
|
+
var r = new WebAssembly.RuntimeError(t);
|
|
310
|
+
throw x(r), r;
|
|
311
|
+
}
|
|
312
|
+
var br = "data:application/octet-stream;base64,", de = (t) => t.startsWith(br);
|
|
313
|
+
function Cr() {
|
|
314
|
+
var t = "zxing_reader.wasm";
|
|
315
|
+
return de(t) ? t : yt(t);
|
|
316
|
+
}
|
|
317
|
+
var wt;
|
|
318
|
+
function Tr(t) {
|
|
319
|
+
if (t == wt && vt)
|
|
320
|
+
return new Uint8Array(vt);
|
|
321
|
+
if (ot)
|
|
322
|
+
return ot(t);
|
|
323
|
+
throw "both async and sync fetching of the wasm failed";
|
|
324
|
+
}
|
|
325
|
+
async function _r(t) {
|
|
326
|
+
if (!vt)
|
|
327
|
+
try {
|
|
328
|
+
var e = await it(t);
|
|
329
|
+
return new Uint8Array(e);
|
|
330
|
+
} catch {
|
|
331
|
+
}
|
|
332
|
+
return Tr(t);
|
|
333
|
+
}
|
|
334
|
+
async function Pr(t, e) {
|
|
335
|
+
try {
|
|
336
|
+
var r = await _r(t), n = await WebAssembly.instantiate(r, e);
|
|
337
|
+
return n;
|
|
338
|
+
} catch (a) {
|
|
339
|
+
et(`failed to asynchronously prepare wasm: ${a}`), Wt(a);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
async function Er(t, e, r) {
|
|
343
|
+
if (!t && typeof WebAssembly.instantiateStreaming == "function" && !de(e) && typeof fetch == "function")
|
|
344
|
+
try {
|
|
345
|
+
var n = fetch(e, {
|
|
346
|
+
credentials: "same-origin"
|
|
347
|
+
}), a = await WebAssembly.instantiateStreaming(n, r);
|
|
348
|
+
return a;
|
|
349
|
+
} catch (o) {
|
|
350
|
+
et(`wasm streaming compile failed: ${o}`), et("falling back to ArrayBuffer instantiation");
|
|
351
|
+
}
|
|
352
|
+
return Pr(e, r);
|
|
353
|
+
}
|
|
354
|
+
function Or() {
|
|
355
|
+
return {
|
|
356
|
+
a: ha
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
async function Ar() {
|
|
360
|
+
var t;
|
|
361
|
+
function e(o, u) {
|
|
362
|
+
return E = o.exports, mt = E.xa, ue(), Ce = E.Ba, mr(E.ya), $r(), E;
|
|
363
|
+
}
|
|
364
|
+
wr();
|
|
365
|
+
function r(o) {
|
|
366
|
+
e(o.instance);
|
|
367
|
+
}
|
|
368
|
+
var n = Or();
|
|
369
|
+
if (c.instantiateWasm)
|
|
370
|
+
try {
|
|
371
|
+
return c.instantiateWasm(n, e);
|
|
372
|
+
} catch (o) {
|
|
373
|
+
et(`Module.instantiateWasm callback failed with error: ${o}`), x(o);
|
|
374
|
+
}
|
|
375
|
+
(t = wt) !== null && t !== void 0 || (wt = Cr());
|
|
376
|
+
try {
|
|
377
|
+
var a = await Er(vt, wt, n);
|
|
378
|
+
return r(a), a;
|
|
379
|
+
} catch (o) {
|
|
380
|
+
x(o);
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
var kt = (t) => {
|
|
385
|
+
for (; t.length > 0; )
|
|
386
|
+
t.shift()(c);
|
|
387
|
+
};
|
|
388
|
+
c.noExitRuntime;
|
|
389
|
+
var m = (t) => je(t), g = () => Re(), $t = [], bt = 0, Sr = (t) => {
|
|
390
|
+
var e = new Ht(t);
|
|
391
|
+
return e.get_caught() || (e.set_caught(!0), bt--), e.set_rethrown(!1), $t.push(e), Le(t), Fe(t);
|
|
392
|
+
}, V = 0, xr = () => {
|
|
393
|
+
v(0, 0);
|
|
394
|
+
var t = $t.pop();
|
|
395
|
+
Be(t.excPtr), V = 0;
|
|
396
|
+
};
|
|
397
|
+
class Ht {
|
|
398
|
+
constructor(e) {
|
|
399
|
+
this.excPtr = e, this.ptr = e - 24;
|
|
400
|
+
}
|
|
401
|
+
set_type(e) {
|
|
402
|
+
_[this.ptr + 4 >> 2] = e;
|
|
403
|
+
}
|
|
404
|
+
get_type() {
|
|
405
|
+
return _[this.ptr + 4 >> 2];
|
|
406
|
+
}
|
|
407
|
+
set_destructor(e) {
|
|
408
|
+
_[this.ptr + 8 >> 2] = e;
|
|
409
|
+
}
|
|
410
|
+
get_destructor() {
|
|
411
|
+
return _[this.ptr + 8 >> 2];
|
|
412
|
+
}
|
|
413
|
+
set_caught(e) {
|
|
414
|
+
e = e ? 1 : 0, H[this.ptr + 12] = e;
|
|
415
|
+
}
|
|
416
|
+
get_caught() {
|
|
417
|
+
return H[this.ptr + 12] != 0;
|
|
418
|
+
}
|
|
419
|
+
set_rethrown(e) {
|
|
420
|
+
e = e ? 1 : 0, H[this.ptr + 13] = e;
|
|
421
|
+
}
|
|
422
|
+
get_rethrown() {
|
|
423
|
+
return H[this.ptr + 13] != 0;
|
|
424
|
+
}
|
|
425
|
+
init(e, r) {
|
|
426
|
+
this.set_adjusted_ptr(0), this.set_type(e), this.set_destructor(r);
|
|
427
|
+
}
|
|
428
|
+
set_adjusted_ptr(e) {
|
|
429
|
+
_[this.ptr + 16 >> 2] = e;
|
|
430
|
+
}
|
|
431
|
+
get_adjusted_ptr() {
|
|
432
|
+
return _[this.ptr + 16 >> 2];
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
var Dr = (t) => {
|
|
436
|
+
throw V || (V = t), V;
|
|
437
|
+
}, Ct = (t) => Ie(t), Vt = (t) => {
|
|
438
|
+
var e = V;
|
|
439
|
+
if (!e)
|
|
440
|
+
return Ct(0), 0;
|
|
441
|
+
var r = new Ht(e);
|
|
442
|
+
r.set_adjusted_ptr(e);
|
|
443
|
+
var n = r.get_type();
|
|
444
|
+
if (!n)
|
|
445
|
+
return Ct(0), e;
|
|
446
|
+
for (var a of t) {
|
|
447
|
+
if (a === 0 || a === n)
|
|
448
|
+
break;
|
|
449
|
+
var o = r.ptr + 16;
|
|
450
|
+
if (Ue(a, n, o))
|
|
451
|
+
return Ct(a), e;
|
|
452
|
+
}
|
|
453
|
+
return Ct(n), e;
|
|
454
|
+
}, Mr = () => Vt([]), Fr = (t) => Vt([t]), Ir = (t, e) => Vt([t, e]), jr = () => {
|
|
455
|
+
var t = $t.pop();
|
|
456
|
+
t || Wt("no exception to throw");
|
|
457
|
+
var e = t.excPtr;
|
|
458
|
+
throw t.get_rethrown() || ($t.push(t), t.set_rethrown(!0), t.set_caught(!1), bt++), V = e, V;
|
|
459
|
+
}, Rr = (t, e, r) => {
|
|
460
|
+
var n = new Ht(t);
|
|
461
|
+
throw n.init(e, r), V = t, bt++, V;
|
|
462
|
+
}, Br = () => bt, Lr = () => Wt(""), Tt = {}, Nt = (t) => {
|
|
463
|
+
for (; t.length; ) {
|
|
464
|
+
var e = t.pop(), r = t.pop();
|
|
465
|
+
r(e);
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
function lt(t) {
|
|
469
|
+
return this.fromWireType(_[t >> 2]);
|
|
470
|
+
}
|
|
471
|
+
var nt = {}, Q = {}, _t = {}, he, Pt = (t) => {
|
|
472
|
+
throw new he(t);
|
|
473
|
+
}, J = (t, e, r) => {
|
|
474
|
+
t.forEach((s) => _t[s] = e);
|
|
475
|
+
function n(s) {
|
|
476
|
+
var l = r(s);
|
|
477
|
+
l.length !== t.length && Pt("Mismatched type converter count");
|
|
478
|
+
for (var d = 0; d < t.length; ++d)
|
|
479
|
+
W(t[d], l[d]);
|
|
480
|
+
}
|
|
481
|
+
var a = new Array(e.length), o = [], u = 0;
|
|
482
|
+
e.forEach((s, l) => {
|
|
483
|
+
Q.hasOwnProperty(s) ? a[l] = Q[s] : (o.push(s), nt.hasOwnProperty(s) || (nt[s] = []), nt[s].push(() => {
|
|
484
|
+
a[l] = Q[s], ++u, u === o.length && n(a);
|
|
485
|
+
}));
|
|
486
|
+
}), o.length === 0 && n(a);
|
|
487
|
+
}, Ur = (t) => {
|
|
488
|
+
var e = Tt[t];
|
|
489
|
+
delete Tt[t];
|
|
490
|
+
var r = e.rawConstructor, n = e.rawDestructor, a = e.fields, o = a.map((u) => u.getterReturnType).concat(a.map((u) => u.setterArgumentType));
|
|
491
|
+
J([t], o, (u) => {
|
|
492
|
+
var s = {};
|
|
493
|
+
return a.forEach((l, d) => {
|
|
494
|
+
var h = l.fieldName, y = u[d], $ = l.getter, C = l.getterContext, P = u[d + a.length], D = l.setter, A = l.setterContext;
|
|
495
|
+
s[h] = {
|
|
496
|
+
read: (S) => y.fromWireType($(C, S)),
|
|
497
|
+
write: (S, K) => {
|
|
498
|
+
var I = [];
|
|
499
|
+
D(A, S, P.toWireType(I, K)), Nt(I);
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
}), [{
|
|
503
|
+
name: e.name,
|
|
504
|
+
fromWireType: (l) => {
|
|
505
|
+
var d = {};
|
|
506
|
+
for (var h in s)
|
|
507
|
+
d[h] = s[h].read(l);
|
|
508
|
+
return n(l), d;
|
|
509
|
+
},
|
|
510
|
+
toWireType: (l, d) => {
|
|
511
|
+
for (var h in s)
|
|
512
|
+
if (!(h in d))
|
|
513
|
+
throw new TypeError(`Missing field: "${h}"`);
|
|
514
|
+
var y = r();
|
|
515
|
+
for (h in s)
|
|
516
|
+
s[h].write(y, d[h]);
|
|
517
|
+
return l !== null && l.push(n, y), y;
|
|
518
|
+
},
|
|
519
|
+
argPackAdvance: N,
|
|
520
|
+
readValueFromPointer: lt,
|
|
521
|
+
destructorFunction: n
|
|
522
|
+
}];
|
|
523
|
+
});
|
|
524
|
+
}, Wr = (t, e, r, n, a) => {
|
|
525
|
+
}, kr = () => {
|
|
526
|
+
for (var t = new Array(256), e = 0; e < 256; ++e)
|
|
527
|
+
t[e] = String.fromCharCode(e);
|
|
528
|
+
pe = t;
|
|
529
|
+
}, pe, F = (t) => {
|
|
530
|
+
for (var e = "", r = t; B[r]; )
|
|
531
|
+
e += pe[B[r++]];
|
|
532
|
+
return e;
|
|
533
|
+
}, at, b = (t) => {
|
|
534
|
+
throw new at(t);
|
|
535
|
+
};
|
|
536
|
+
function Hr(t, e) {
|
|
537
|
+
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
538
|
+
var n = e.name;
|
|
539
|
+
if (t || b(`type "${n}" must have a positive integer typeid pointer`), Q.hasOwnProperty(t)) {
|
|
540
|
+
if (r.ignoreDuplicateRegistrations)
|
|
541
|
+
return;
|
|
542
|
+
b(`Cannot register type '${n}' twice`);
|
|
543
|
+
}
|
|
544
|
+
if (Q[t] = e, delete _t[t], nt.hasOwnProperty(t)) {
|
|
545
|
+
var a = nt[t];
|
|
546
|
+
delete nt[t], a.forEach((o) => o());
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
function W(t, e) {
|
|
550
|
+
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
551
|
+
return Hr(t, e, r);
|
|
552
|
+
}
|
|
553
|
+
var N = 8, Vr = (t, e, r, n) => {
|
|
554
|
+
e = F(e), W(t, {
|
|
555
|
+
name: e,
|
|
556
|
+
fromWireType: function(a) {
|
|
557
|
+
return !!a;
|
|
558
|
+
},
|
|
559
|
+
toWireType: function(a, o) {
|
|
560
|
+
return o ? r : n;
|
|
561
|
+
},
|
|
562
|
+
argPackAdvance: N,
|
|
563
|
+
readValueFromPointer: function(a) {
|
|
564
|
+
return this.fromWireType(B[a]);
|
|
565
|
+
},
|
|
566
|
+
destructorFunction: null
|
|
567
|
+
});
|
|
568
|
+
}, Nr = (t) => ({
|
|
569
|
+
count: t.count,
|
|
570
|
+
deleteScheduled: t.deleteScheduled,
|
|
571
|
+
preservePointerOnDelete: t.preservePointerOnDelete,
|
|
572
|
+
ptr: t.ptr,
|
|
573
|
+
ptrType: t.ptrType,
|
|
574
|
+
smartPtr: t.smartPtr,
|
|
575
|
+
smartPtrType: t.smartPtrType
|
|
576
|
+
}), zt = (t) => {
|
|
577
|
+
function e(r) {
|
|
578
|
+
return r.$$.ptrType.registeredClass.name;
|
|
579
|
+
}
|
|
580
|
+
b(e(t) + " instance already deleted");
|
|
581
|
+
}, Gt = !1, ye = (t) => {
|
|
582
|
+
}, zr = (t) => {
|
|
583
|
+
t.smartPtr ? t.smartPtrType.rawDestructor(t.smartPtr) : t.ptrType.registeredClass.rawDestructor(t.ptr);
|
|
584
|
+
}, ve = (t) => {
|
|
585
|
+
t.count.value -= 1;
|
|
586
|
+
var e = t.count.value === 0;
|
|
587
|
+
e && zr(t);
|
|
588
|
+
}, me = (t, e, r) => {
|
|
589
|
+
if (e === r)
|
|
590
|
+
return t;
|
|
591
|
+
if (r.baseClass === void 0)
|
|
592
|
+
return null;
|
|
593
|
+
var n = me(t, e, r.baseClass);
|
|
594
|
+
return n === null ? null : r.downcast(n);
|
|
595
|
+
}, ge = {}, Gr = {}, Xr = (t, e) => {
|
|
596
|
+
for (e === void 0 && b("ptr should not be undefined"); t.baseClass; )
|
|
597
|
+
e = t.upcast(e), t = t.baseClass;
|
|
598
|
+
return e;
|
|
599
|
+
}, qr = (t, e) => (e = Xr(t, e), Gr[e]), Et = (t, e) => {
|
|
600
|
+
(!e.ptrType || !e.ptr) && Pt("makeClassHandle requires ptr and ptrType");
|
|
601
|
+
var r = !!e.smartPtrType, n = !!e.smartPtr;
|
|
602
|
+
return r !== n && Pt("Both smartPtrType and smartPtr must be specified"), e.count = {
|
|
603
|
+
value: 1
|
|
604
|
+
}, ft(Object.create(t, {
|
|
605
|
+
$$: {
|
|
606
|
+
value: e,
|
|
607
|
+
writable: !0
|
|
608
|
+
}
|
|
609
|
+
}));
|
|
610
|
+
};
|
|
611
|
+
function Zr(t) {
|
|
612
|
+
var e = this.getPointee(t);
|
|
613
|
+
if (!e)
|
|
614
|
+
return this.destructor(t), null;
|
|
615
|
+
var r = qr(this.registeredClass, e);
|
|
616
|
+
if (r !== void 0) {
|
|
617
|
+
if (r.$$.count.value === 0)
|
|
618
|
+
return r.$$.ptr = e, r.$$.smartPtr = t, r.clone();
|
|
619
|
+
var n = r.clone();
|
|
620
|
+
return this.destructor(t), n;
|
|
621
|
+
}
|
|
622
|
+
function a() {
|
|
623
|
+
return this.isSmartPointer ? Et(this.registeredClass.instancePrototype, {
|
|
624
|
+
ptrType: this.pointeeType,
|
|
625
|
+
ptr: e,
|
|
626
|
+
smartPtrType: this,
|
|
627
|
+
smartPtr: t
|
|
628
|
+
}) : Et(this.registeredClass.instancePrototype, {
|
|
629
|
+
ptrType: this,
|
|
630
|
+
ptr: t
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
var o = this.registeredClass.getActualType(e), u = ge[o];
|
|
634
|
+
if (!u)
|
|
635
|
+
return a.call(this);
|
|
636
|
+
var s;
|
|
637
|
+
this.isConst ? s = u.constPointerType : s = u.pointerType;
|
|
638
|
+
var l = me(e, this.registeredClass, s.registeredClass);
|
|
639
|
+
return l === null ? a.call(this) : this.isSmartPointer ? Et(s.registeredClass.instancePrototype, {
|
|
640
|
+
ptrType: s,
|
|
641
|
+
ptr: l,
|
|
642
|
+
smartPtrType: this,
|
|
643
|
+
smartPtr: t
|
|
644
|
+
}) : Et(s.registeredClass.instancePrototype, {
|
|
645
|
+
ptrType: s,
|
|
646
|
+
ptr: l
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
var ft = (t) => typeof FinalizationRegistry > "u" ? (ft = (e) => e, t) : (Gt = new FinalizationRegistry((e) => {
|
|
650
|
+
ve(e.$$);
|
|
651
|
+
}), ft = (e) => {
|
|
652
|
+
var r = e.$$, n = !!r.smartPtr;
|
|
653
|
+
if (n) {
|
|
654
|
+
var a = {
|
|
655
|
+
$$: r
|
|
656
|
+
};
|
|
657
|
+
Gt.register(e, a, e);
|
|
658
|
+
}
|
|
659
|
+
return e;
|
|
660
|
+
}, ye = (e) => Gt.unregister(e), ft(t)), Yr = () => {
|
|
661
|
+
Object.assign(Ot.prototype, {
|
|
662
|
+
isAliasOf(t) {
|
|
663
|
+
if (!(this instanceof Ot) || !(t instanceof Ot))
|
|
664
|
+
return !1;
|
|
665
|
+
var e = this.$$.ptrType.registeredClass, r = this.$$.ptr;
|
|
666
|
+
t.$$ = t.$$;
|
|
667
|
+
for (var n = t.$$.ptrType.registeredClass, a = t.$$.ptr; e.baseClass; )
|
|
668
|
+
r = e.upcast(r), e = e.baseClass;
|
|
669
|
+
for (; n.baseClass; )
|
|
670
|
+
a = n.upcast(a), n = n.baseClass;
|
|
671
|
+
return e === n && r === a;
|
|
672
|
+
},
|
|
673
|
+
clone() {
|
|
674
|
+
if (this.$$.ptr || zt(this), this.$$.preservePointerOnDelete)
|
|
675
|
+
return this.$$.count.value += 1, this;
|
|
676
|
+
var t = ft(Object.create(Object.getPrototypeOf(this), {
|
|
677
|
+
$$: {
|
|
678
|
+
value: Nr(this.$$)
|
|
679
|
+
}
|
|
680
|
+
}));
|
|
681
|
+
return t.$$.count.value += 1, t.$$.deleteScheduled = !1, t;
|
|
682
|
+
},
|
|
683
|
+
delete() {
|
|
684
|
+
this.$$.ptr || zt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && b("Object already scheduled for deletion"), ye(this), ve(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
|
|
685
|
+
},
|
|
686
|
+
isDeleted() {
|
|
687
|
+
return !this.$$.ptr;
|
|
688
|
+
},
|
|
689
|
+
deleteLater() {
|
|
690
|
+
return this.$$.ptr || zt(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && b("Object already scheduled for deletion"), this.$$.deleteScheduled = !0, this;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
};
|
|
694
|
+
function Ot() {
|
|
695
|
+
}
|
|
696
|
+
var At = (t, e) => Object.defineProperty(e, "name", {
|
|
697
|
+
value: t
|
|
698
|
+
}), we = (t, e, r) => {
|
|
699
|
+
if (t[e].overloadTable === void 0) {
|
|
700
|
+
var n = t[e];
|
|
701
|
+
t[e] = function() {
|
|
702
|
+
for (var a = arguments.length, o = new Array(a), u = 0; u < a; u++)
|
|
703
|
+
o[u] = arguments[u];
|
|
704
|
+
return t[e].overloadTable.hasOwnProperty(o.length) || b(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${t[e].overloadTable})!`), t[e].overloadTable[o.length].apply(this, o);
|
|
705
|
+
}, t[e].overloadTable = [], t[e].overloadTable[n.argCount] = n;
|
|
706
|
+
}
|
|
707
|
+
}, $e = (t, e, r) => {
|
|
708
|
+
c.hasOwnProperty(t) ? ((r === void 0 || c[t].overloadTable !== void 0 && c[t].overloadTable[r] !== void 0) && b(`Cannot register public name '${t}' twice`), we(c, t, t), c[t].overloadTable.hasOwnProperty(r) && b(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`), c[t].overloadTable[r] = e) : (c[t] = e, c[t].argCount = r);
|
|
709
|
+
}, Qr = 48, Jr = 57, Kr = (t) => {
|
|
710
|
+
t = t.replace(/[^a-zA-Z0-9_]/g, "$");
|
|
711
|
+
var e = t.charCodeAt(0);
|
|
712
|
+
return e >= Qr && e <= Jr ? `_${t}` : t;
|
|
713
|
+
};
|
|
714
|
+
function tn(t, e, r, n, a, o, u, s) {
|
|
715
|
+
this.name = t, this.constructor = e, this.instancePrototype = r, this.rawDestructor = n, this.baseClass = a, this.getActualType = o, this.upcast = u, this.downcast = s, this.pureVirtualFunctions = [];
|
|
716
|
+
}
|
|
717
|
+
var Xt = (t, e, r) => {
|
|
718
|
+
for (; e !== r; )
|
|
719
|
+
e.upcast || b(`Expected null or instance of ${r.name}, got an instance of ${e.name}`), t = e.upcast(t), e = e.baseClass;
|
|
720
|
+
return t;
|
|
721
|
+
};
|
|
722
|
+
function en(t, e) {
|
|
723
|
+
if (e === null)
|
|
724
|
+
return this.isReference && b(`null is not a valid ${this.name}`), 0;
|
|
725
|
+
e.$$ || b(`Cannot pass "${Jt(e)}" as a ${this.name}`), e.$$.ptr || b(`Cannot pass deleted object as a pointer of type ${this.name}`);
|
|
726
|
+
var r = e.$$.ptrType.registeredClass, n = Xt(e.$$.ptr, r, this.registeredClass);
|
|
727
|
+
return n;
|
|
728
|
+
}
|
|
729
|
+
function rn(t, e) {
|
|
730
|
+
var r;
|
|
731
|
+
if (e === null)
|
|
732
|
+
return this.isReference && b(`null is not a valid ${this.name}`), this.isSmartPointer ? (r = this.rawConstructor(), t !== null && t.push(this.rawDestructor, r), r) : 0;
|
|
733
|
+
(!e || !e.$$) && b(`Cannot pass "${Jt(e)}" as a ${this.name}`), e.$$.ptr || b(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && e.$$.ptrType.isConst && b(`Cannot convert argument of type ${e.$$.smartPtrType ? e.$$.smartPtrType.name : e.$$.ptrType.name} to parameter type ${this.name}`);
|
|
734
|
+
var n = e.$$.ptrType.registeredClass;
|
|
735
|
+
if (r = Xt(e.$$.ptr, n, this.registeredClass), this.isSmartPointer)
|
|
736
|
+
switch (e.$$.smartPtr === void 0 && b("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
|
|
737
|
+
case 0:
|
|
738
|
+
e.$$.smartPtrType === this ? r = e.$$.smartPtr : b(`Cannot convert argument of type ${e.$$.smartPtrType ? e.$$.smartPtrType.name : e.$$.ptrType.name} to parameter type ${this.name}`);
|
|
739
|
+
break;
|
|
740
|
+
case 1:
|
|
741
|
+
r = e.$$.smartPtr;
|
|
742
|
+
break;
|
|
743
|
+
case 2:
|
|
744
|
+
if (e.$$.smartPtrType === this)
|
|
745
|
+
r = e.$$.smartPtr;
|
|
746
|
+
else {
|
|
747
|
+
var a = e.clone();
|
|
748
|
+
r = this.rawShare(r, G.toHandle(() => a.delete())), t !== null && t.push(this.rawDestructor, r);
|
|
749
|
+
}
|
|
750
|
+
break;
|
|
751
|
+
default:
|
|
752
|
+
b("Unsupporting sharing policy");
|
|
753
|
+
}
|
|
754
|
+
return r;
|
|
755
|
+
}
|
|
756
|
+
function nn(t, e) {
|
|
757
|
+
if (e === null)
|
|
758
|
+
return this.isReference && b(`null is not a valid ${this.name}`), 0;
|
|
759
|
+
e.$$ || b(`Cannot pass "${Jt(e)}" as a ${this.name}`), e.$$.ptr || b(`Cannot pass deleted object as a pointer of type ${this.name}`), e.$$.ptrType.isConst && b(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);
|
|
760
|
+
var r = e.$$.ptrType.registeredClass, n = Xt(e.$$.ptr, r, this.registeredClass);
|
|
761
|
+
return n;
|
|
762
|
+
}
|
|
763
|
+
var an = () => {
|
|
764
|
+
Object.assign(St.prototype, {
|
|
765
|
+
getPointee(t) {
|
|
766
|
+
return this.rawGetPointee && (t = this.rawGetPointee(t)), t;
|
|
767
|
+
},
|
|
768
|
+
destructor(t) {
|
|
769
|
+
var e;
|
|
770
|
+
(e = this.rawDestructor) === null || e === void 0 || e.call(this, t);
|
|
771
|
+
},
|
|
772
|
+
argPackAdvance: N,
|
|
773
|
+
readValueFromPointer: lt,
|
|
774
|
+
fromWireType: Zr
|
|
775
|
+
});
|
|
776
|
+
};
|
|
777
|
+
function St(t, e, r, n, a, o, u, s, l, d, h) {
|
|
778
|
+
this.name = t, this.registeredClass = e, this.isReference = r, this.isConst = n, this.isSmartPointer = a, this.pointeeType = o, this.sharingPolicy = u, this.rawGetPointee = s, this.rawConstructor = l, this.rawShare = d, this.rawDestructor = h, !a && e.baseClass === void 0 ? n ? (this.toWireType = en, this.destructorFunction = null) : (this.toWireType = nn, this.destructorFunction = null) : this.toWireType = rn;
|
|
779
|
+
}
|
|
780
|
+
var be = (t, e, r) => {
|
|
781
|
+
c.hasOwnProperty(t) || Pt("Replacing nonexistent public symbol"), c[t].overloadTable !== void 0 && r !== void 0 ? c[t].overloadTable[r] = e : (c[t] = e, c[t].argCount = r);
|
|
782
|
+
}, on = (t, e, r) => {
|
|
783
|
+
t = t.replace(/p/g, "i");
|
|
784
|
+
var n = c["dynCall_" + t];
|
|
785
|
+
return n(e, ...r);
|
|
786
|
+
}, xt = [], Ce, w = (t) => {
|
|
787
|
+
var e = xt[t];
|
|
788
|
+
return e || (t >= xt.length && (xt.length = t + 1), xt[t] = e = Ce.get(t)), e;
|
|
789
|
+
}, sn = function(t, e) {
|
|
790
|
+
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
791
|
+
if (t.includes("j"))
|
|
792
|
+
return on(t, e, r);
|
|
793
|
+
var n = w(e)(...r);
|
|
794
|
+
return n;
|
|
795
|
+
}, un = (t, e) => function() {
|
|
796
|
+
for (var r = arguments.length, n = new Array(r), a = 0; a < r; a++)
|
|
797
|
+
n[a] = arguments[a];
|
|
798
|
+
return sn(t, e, n);
|
|
799
|
+
}, U = (t, e) => {
|
|
800
|
+
t = F(t);
|
|
801
|
+
function r() {
|
|
802
|
+
return t.includes("j") ? un(t, e) : w(e);
|
|
803
|
+
}
|
|
804
|
+
var n = r();
|
|
805
|
+
return typeof n != "function" && b(`unknown function pointer with signature ${t}: ${e}`), n;
|
|
806
|
+
}, cn = (t, e) => {
|
|
807
|
+
var r = At(e, function(n) {
|
|
808
|
+
this.name = e, this.message = n;
|
|
809
|
+
var a = new Error(n).stack;
|
|
810
|
+
a !== void 0 && (this.stack = this.toString() + `
|
|
811
|
+
` + a.replace(/^Error(:[^\n]*)?\n/, ""));
|
|
812
|
+
});
|
|
813
|
+
return r.prototype = Object.create(t.prototype), r.prototype.constructor = r, r.prototype.toString = function() {
|
|
814
|
+
return this.message === void 0 ? this.name : `${this.name}: ${this.message}`;
|
|
815
|
+
}, r;
|
|
816
|
+
}, Te, _e = (t) => {
|
|
817
|
+
var e = Me(t), r = F(e);
|
|
818
|
+
return X(e), r;
|
|
819
|
+
}, Dt = (t, e) => {
|
|
820
|
+
var r = [], n = {};
|
|
821
|
+
function a(o) {
|
|
822
|
+
if (!n[o] && !Q[o]) {
|
|
823
|
+
if (_t[o]) {
|
|
824
|
+
_t[o].forEach(a);
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
r.push(o), n[o] = !0;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
throw e.forEach(a), new Te(`${t}: ` + r.map(_e).join([", "]));
|
|
831
|
+
}, ln = (t, e, r, n, a, o, u, s, l, d, h, y, $) => {
|
|
832
|
+
h = F(h), o = U(a, o), s && (s = U(u, s)), d && (d = U(l, d)), $ = U(y, $);
|
|
833
|
+
var C = Kr(h);
|
|
834
|
+
$e(C, function() {
|
|
835
|
+
Dt(`Cannot construct ${h} due to unbound types`, [n]);
|
|
836
|
+
}), J([t, e, r], n ? [n] : [], (P) => {
|
|
837
|
+
P = P[0];
|
|
838
|
+
var D, A;
|
|
839
|
+
n ? (D = P.registeredClass, A = D.instancePrototype) : A = Ot.prototype;
|
|
840
|
+
var S = At(h, function() {
|
|
841
|
+
if (Object.getPrototypeOf(this) !== K)
|
|
842
|
+
throw new at("Use 'new' to construct " + h);
|
|
843
|
+
if (I.constructor_body === void 0)
|
|
844
|
+
throw new at(h + " has no accessible constructor");
|
|
845
|
+
for (var ze = arguments.length, It = new Array(ze), jt = 0; jt < ze; jt++)
|
|
846
|
+
It[jt] = arguments[jt];
|
|
847
|
+
var Ge = I.constructor_body[It.length];
|
|
848
|
+
if (Ge === void 0)
|
|
849
|
+
throw new at(`Tried to invoke ctor of ${h} with invalid number of parameters (${It.length}) - expected (${Object.keys(I.constructor_body).toString()}) parameters instead!`);
|
|
850
|
+
return Ge.apply(this, It);
|
|
851
|
+
}), K = Object.create(A, {
|
|
852
|
+
constructor: {
|
|
853
|
+
value: S
|
|
854
|
+
}
|
|
855
|
+
});
|
|
856
|
+
S.prototype = K;
|
|
857
|
+
var I = new tn(h, S, K, $, D, o, s, d);
|
|
858
|
+
if (I.baseClass) {
|
|
859
|
+
var q, Ft;
|
|
860
|
+
(Ft = (q = I.baseClass).__derivedClasses) !== null && Ft !== void 0 || (q.__derivedClasses = []), I.baseClass.__derivedClasses.push(I);
|
|
861
|
+
}
|
|
862
|
+
var qa = new St(h, I, !0, !1, !1), Ve = new St(h + "*", I, !1, !1, !1), Ne = new St(h + " const*", I, !1, !0, !1);
|
|
863
|
+
return ge[t] = {
|
|
864
|
+
pointerType: Ve,
|
|
865
|
+
constPointerType: Ne
|
|
866
|
+
}, be(C, S), [qa, Ve, Ne];
|
|
867
|
+
});
|
|
868
|
+
}, qt = (t, e) => {
|
|
869
|
+
for (var r = [], n = 0; n < t; n++)
|
|
870
|
+
r.push(_[e + n * 4 >> 2]);
|
|
871
|
+
return r;
|
|
872
|
+
};
|
|
873
|
+
function fn(t) {
|
|
874
|
+
for (var e = 1; e < t.length; ++e)
|
|
875
|
+
if (t[e] !== null && t[e].destructorFunction === void 0)
|
|
876
|
+
return !0;
|
|
877
|
+
return !1;
|
|
878
|
+
}
|
|
879
|
+
function Zt(t, e, r, n, a, o) {
|
|
880
|
+
var u = e.length;
|
|
881
|
+
u < 2 && b("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
882
|
+
var s = e[1] !== null && r !== null, l = fn(e), d = e[0].name !== "void", h = u - 2, y = new Array(h), $ = [], C = [], P = function() {
|
|
883
|
+
C.length = 0;
|
|
884
|
+
var D;
|
|
885
|
+
$.length = s ? 2 : 1, $[0] = a, s && (D = e[1].toWireType(C, this), $[1] = D);
|
|
886
|
+
for (var A = 0; A < h; ++A)
|
|
887
|
+
y[A] = e[A + 2].toWireType(C, A < 0 || arguments.length <= A ? void 0 : arguments[A]), $.push(y[A]);
|
|
888
|
+
var S = n(...$);
|
|
889
|
+
function K(I) {
|
|
890
|
+
if (l)
|
|
891
|
+
Nt(C);
|
|
892
|
+
else
|
|
893
|
+
for (var q = s ? 1 : 2; q < e.length; q++) {
|
|
894
|
+
var Ft = q === 1 ? D : y[q - 2];
|
|
895
|
+
e[q].destructorFunction !== null && e[q].destructorFunction(Ft);
|
|
896
|
+
}
|
|
897
|
+
if (d)
|
|
898
|
+
return e[0].fromWireType(I);
|
|
899
|
+
}
|
|
900
|
+
return K(S);
|
|
901
|
+
};
|
|
902
|
+
return At(t, P);
|
|
903
|
+
}
|
|
904
|
+
var dn = (t, e, r, n, a, o) => {
|
|
905
|
+
var u = qt(e, r);
|
|
906
|
+
a = U(n, a), J([], [t], (s) => {
|
|
907
|
+
s = s[0];
|
|
908
|
+
var l = `constructor ${s.name}`;
|
|
909
|
+
if (s.registeredClass.constructor_body === void 0 && (s.registeredClass.constructor_body = []), s.registeredClass.constructor_body[e - 1] !== void 0)
|
|
910
|
+
throw new at(`Cannot register multiple constructors with identical number of parameters (${e - 1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
|
|
911
|
+
return s.registeredClass.constructor_body[e - 1] = () => {
|
|
912
|
+
Dt(`Cannot construct ${s.name} due to unbound types`, u);
|
|
913
|
+
}, J([], u, (d) => (d.splice(1, 0, null), s.registeredClass.constructor_body[e - 1] = Zt(l, d, null, a, o), [])), [];
|
|
914
|
+
});
|
|
915
|
+
}, Pe = (t) => {
|
|
916
|
+
t = t.trim();
|
|
917
|
+
const e = t.indexOf("(");
|
|
918
|
+
return e !== -1 ? t.substr(0, e) : t;
|
|
919
|
+
}, hn = (t, e, r, n, a, o, u, s, l, d) => {
|
|
920
|
+
var h = qt(r, n);
|
|
921
|
+
e = F(e), e = Pe(e), o = U(a, o), J([], [t], (y) => {
|
|
922
|
+
y = y[0];
|
|
923
|
+
var $ = `${y.name}.${e}`;
|
|
924
|
+
e.startsWith("@@") && (e = Symbol[e.substring(2)]), s && y.registeredClass.pureVirtualFunctions.push(e);
|
|
925
|
+
function C() {
|
|
926
|
+
Dt(`Cannot call ${$} due to unbound types`, h);
|
|
927
|
+
}
|
|
928
|
+
var P = y.registeredClass.instancePrototype, D = P[e];
|
|
929
|
+
return D === void 0 || D.overloadTable === void 0 && D.className !== y.name && D.argCount === r - 2 ? (C.argCount = r - 2, C.className = y.name, P[e] = C) : (we(P, e, $), P[e].overloadTable[r - 2] = C), J([], h, (A) => {
|
|
930
|
+
var S = Zt($, A, y, o, u);
|
|
931
|
+
return P[e].overloadTable === void 0 ? (S.argCount = r - 2, P[e] = S) : P[e].overloadTable[r - 2] = S, [];
|
|
932
|
+
}), [];
|
|
933
|
+
});
|
|
934
|
+
}, Yt = [], z = [], Qt = (t) => {
|
|
935
|
+
t > 9 && --z[t + 1] === 0 && (z[t] = void 0, Yt.push(t));
|
|
936
|
+
}, pn = () => z.length / 2 - 5 - Yt.length, yn = () => {
|
|
937
|
+
z.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = pn;
|
|
938
|
+
}, G = {
|
|
939
|
+
toValue: (t) => (t || b("Cannot use deleted val. handle = " + t), z[t]),
|
|
940
|
+
toHandle: (t) => {
|
|
941
|
+
switch (t) {
|
|
942
|
+
case void 0:
|
|
943
|
+
return 2;
|
|
944
|
+
case null:
|
|
945
|
+
return 4;
|
|
946
|
+
case !0:
|
|
947
|
+
return 6;
|
|
948
|
+
case !1:
|
|
949
|
+
return 8;
|
|
950
|
+
default: {
|
|
951
|
+
const e = Yt.pop() || z.length;
|
|
952
|
+
return z[e] = t, z[e + 1] = 1, e;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}, Ee = {
|
|
957
|
+
name: "emscripten::val",
|
|
958
|
+
fromWireType: (t) => {
|
|
959
|
+
var e = G.toValue(t);
|
|
960
|
+
return Qt(t), e;
|
|
961
|
+
},
|
|
962
|
+
toWireType: (t, e) => G.toHandle(e),
|
|
963
|
+
argPackAdvance: N,
|
|
964
|
+
readValueFromPointer: lt,
|
|
965
|
+
destructorFunction: null
|
|
966
|
+
}, vn = (t) => W(t, Ee), Jt = (t) => {
|
|
967
|
+
if (t === null)
|
|
968
|
+
return "null";
|
|
969
|
+
var e = typeof t;
|
|
970
|
+
return e === "object" || e === "array" || e === "function" ? t.toString() : "" + t;
|
|
971
|
+
}, mn = (t, e) => {
|
|
972
|
+
switch (e) {
|
|
973
|
+
case 4:
|
|
974
|
+
return function(r) {
|
|
975
|
+
return this.fromWireType(oe[r >> 2]);
|
|
976
|
+
};
|
|
977
|
+
case 8:
|
|
978
|
+
return function(r) {
|
|
979
|
+
return this.fromWireType(se[r >> 3]);
|
|
980
|
+
};
|
|
981
|
+
default:
|
|
982
|
+
throw new TypeError(`invalid float width (${e}): ${t}`);
|
|
983
|
+
}
|
|
984
|
+
}, gn = (t, e, r) => {
|
|
985
|
+
e = F(e), W(t, {
|
|
986
|
+
name: e,
|
|
987
|
+
fromWireType: (n) => n,
|
|
988
|
+
toWireType: (n, a) => a,
|
|
989
|
+
argPackAdvance: N,
|
|
990
|
+
readValueFromPointer: mn(e, r),
|
|
991
|
+
destructorFunction: null
|
|
992
|
+
});
|
|
993
|
+
}, wn = (t, e, r, n, a, o, u, s) => {
|
|
994
|
+
var l = qt(e, r);
|
|
995
|
+
t = F(t), t = Pe(t), a = U(n, a), $e(t, function() {
|
|
996
|
+
Dt(`Cannot call ${t} due to unbound types`, l);
|
|
997
|
+
}, e - 1), J([], l, (d) => {
|
|
998
|
+
var h = [d[0], null].concat(d.slice(1));
|
|
999
|
+
return be(t, Zt(t, h, null, a, o), e - 1), [];
|
|
1000
|
+
});
|
|
1001
|
+
}, $n = (t, e, r) => {
|
|
1002
|
+
switch (e) {
|
|
1003
|
+
case 1:
|
|
1004
|
+
return r ? (n) => H[n] : (n) => B[n];
|
|
1005
|
+
case 2:
|
|
1006
|
+
return r ? (n) => ut[n >> 1] : (n) => gt[n >> 1];
|
|
1007
|
+
case 4:
|
|
1008
|
+
return r ? (n) => rt[n >> 2] : (n) => _[n >> 2];
|
|
1009
|
+
default:
|
|
1010
|
+
throw new TypeError(`invalid integer width (${e}): ${t}`);
|
|
1011
|
+
}
|
|
1012
|
+
}, bn = (t, e, r, n, a) => {
|
|
1013
|
+
e = F(e);
|
|
1014
|
+
var o = (h) => h;
|
|
1015
|
+
if (n === 0) {
|
|
1016
|
+
var u = 32 - 8 * r;
|
|
1017
|
+
o = (h) => h << u >>> u;
|
|
1018
|
+
}
|
|
1019
|
+
var s = e.includes("unsigned"), l = (h, y) => {
|
|
1020
|
+
}, d;
|
|
1021
|
+
s ? d = function(h, y) {
|
|
1022
|
+
return l(y, this.name), y >>> 0;
|
|
1023
|
+
} : d = function(h, y) {
|
|
1024
|
+
return l(y, this.name), y;
|
|
1025
|
+
}, W(t, {
|
|
1026
|
+
name: e,
|
|
1027
|
+
fromWireType: o,
|
|
1028
|
+
toWireType: d,
|
|
1029
|
+
argPackAdvance: N,
|
|
1030
|
+
readValueFromPointer: $n(e, r, n !== 0),
|
|
1031
|
+
destructorFunction: null
|
|
1032
|
+
});
|
|
1033
|
+
}, Cn = (t, e, r) => {
|
|
1034
|
+
var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array], a = n[e];
|
|
1035
|
+
function o(u) {
|
|
1036
|
+
var s = _[u >> 2], l = _[u + 4 >> 2];
|
|
1037
|
+
return new a(H.buffer, l, s);
|
|
1038
|
+
}
|
|
1039
|
+
r = F(r), W(t, {
|
|
1040
|
+
name: r,
|
|
1041
|
+
fromWireType: o,
|
|
1042
|
+
argPackAdvance: N,
|
|
1043
|
+
readValueFromPointer: o
|
|
1044
|
+
}, {
|
|
1045
|
+
ignoreDuplicateRegistrations: !0
|
|
1046
|
+
});
|
|
1047
|
+
}, Tn = Object.assign({
|
|
1048
|
+
optional: !0
|
|
1049
|
+
}, Ee), _n = (t, e) => {
|
|
1050
|
+
W(t, Tn);
|
|
1051
|
+
}, Pn = (t, e, r, n) => {
|
|
1052
|
+
if (!(n > 0)) return 0;
|
|
1053
|
+
for (var a = r, o = r + n - 1, u = 0; u < t.length; ++u) {
|
|
1054
|
+
var s = t.charCodeAt(u);
|
|
1055
|
+
if (s >= 55296 && s <= 57343) {
|
|
1056
|
+
var l = t.charCodeAt(++u);
|
|
1057
|
+
s = 65536 + ((s & 1023) << 10) | l & 1023;
|
|
1058
|
+
}
|
|
1059
|
+
if (s <= 127) {
|
|
1060
|
+
if (r >= o) break;
|
|
1061
|
+
e[r++] = s;
|
|
1062
|
+
} else if (s <= 2047) {
|
|
1063
|
+
if (r + 1 >= o) break;
|
|
1064
|
+
e[r++] = 192 | s >> 6, e[r++] = 128 | s & 63;
|
|
1065
|
+
} else if (s <= 65535) {
|
|
1066
|
+
if (r + 2 >= o) break;
|
|
1067
|
+
e[r++] = 224 | s >> 12, e[r++] = 128 | s >> 6 & 63, e[r++] = 128 | s & 63;
|
|
1068
|
+
} else {
|
|
1069
|
+
if (r + 3 >= o) break;
|
|
1070
|
+
e[r++] = 240 | s >> 18, e[r++] = 128 | s >> 12 & 63, e[r++] = 128 | s >> 6 & 63, e[r++] = 128 | s & 63;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
return e[r] = 0, r - a;
|
|
1074
|
+
}, dt = (t, e, r) => Pn(t, B, e, r), En = (t) => {
|
|
1075
|
+
for (var e = 0, r = 0; r < t.length; ++r) {
|
|
1076
|
+
var n = t.charCodeAt(r);
|
|
1077
|
+
n <= 127 ? e++ : n <= 2047 ? e += 2 : n >= 55296 && n <= 57343 ? (e += 4, ++r) : e += 3;
|
|
1078
|
+
}
|
|
1079
|
+
return e;
|
|
1080
|
+
}, Oe = typeof TextDecoder < "u" ? new TextDecoder() : void 0, Ae = function(t) {
|
|
1081
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : NaN;
|
|
1082
|
+
for (var n = e + r, a = e; t[a] && !(a >= n); ) ++a;
|
|
1083
|
+
if (a - e > 16 && t.buffer && Oe)
|
|
1084
|
+
return Oe.decode(t.subarray(e, a));
|
|
1085
|
+
for (var o = ""; e < a; ) {
|
|
1086
|
+
var u = t[e++];
|
|
1087
|
+
if (!(u & 128)) {
|
|
1088
|
+
o += String.fromCharCode(u);
|
|
1089
|
+
continue;
|
|
1090
|
+
}
|
|
1091
|
+
var s = t[e++] & 63;
|
|
1092
|
+
if ((u & 224) == 192) {
|
|
1093
|
+
o += String.fromCharCode((u & 31) << 6 | s);
|
|
1094
|
+
continue;
|
|
1095
|
+
}
|
|
1096
|
+
var l = t[e++] & 63;
|
|
1097
|
+
if ((u & 240) == 224 ? u = (u & 15) << 12 | s << 6 | l : u = (u & 7) << 18 | s << 12 | l << 6 | t[e++] & 63, u < 65536)
|
|
1098
|
+
o += String.fromCharCode(u);
|
|
1099
|
+
else {
|
|
1100
|
+
var d = u - 65536;
|
|
1101
|
+
o += String.fromCharCode(55296 | d >> 10, 56320 | d & 1023);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
return o;
|
|
1105
|
+
}, On = (t, e) => t ? Ae(B, t, e) : "", An = (t, e) => {
|
|
1106
|
+
e = F(e), W(t, {
|
|
1107
|
+
name: e,
|
|
1108
|
+
fromWireType(r) {
|
|
1109
|
+
for (var n = _[r >> 2], a = r + 4, o, s, u = a, s = 0; s <= n; ++s) {
|
|
1110
|
+
var l = a + s;
|
|
1111
|
+
if (s == n || B[l] == 0) {
|
|
1112
|
+
var d = l - u, h = On(u, d);
|
|
1113
|
+
o === void 0 ? o = h : (o += "\0", o += h), u = l + 1;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
return X(r), o;
|
|
1117
|
+
},
|
|
1118
|
+
toWireType(r, n) {
|
|
1119
|
+
n instanceof ArrayBuffer && (n = new Uint8Array(n));
|
|
1120
|
+
var a, o = typeof n == "string";
|
|
1121
|
+
o || n instanceof Uint8Array || n instanceof Uint8ClampedArray || n instanceof Int8Array || b("Cannot pass non-string to std::string"), o ? a = En(n) : a = n.length;
|
|
1122
|
+
var u = ee(4 + a + 1), s = u + 4;
|
|
1123
|
+
if (_[u >> 2] = a, o)
|
|
1124
|
+
dt(n, s, a + 1);
|
|
1125
|
+
else if (o)
|
|
1126
|
+
for (var l = 0; l < a; ++l) {
|
|
1127
|
+
var d = n.charCodeAt(l);
|
|
1128
|
+
d > 255 && (X(s), b("String has UTF-16 code units that do not fit in 8 bits")), B[s + l] = d;
|
|
1129
|
+
}
|
|
1130
|
+
else
|
|
1131
|
+
for (var l = 0; l < a; ++l)
|
|
1132
|
+
B[s + l] = n[l];
|
|
1133
|
+
return r !== null && r.push(X, u), u;
|
|
1134
|
+
},
|
|
1135
|
+
argPackAdvance: N,
|
|
1136
|
+
readValueFromPointer: lt,
|
|
1137
|
+
destructorFunction(r) {
|
|
1138
|
+
X(r);
|
|
1139
|
+
}
|
|
1140
|
+
});
|
|
1141
|
+
}, Se = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Sn = (t, e) => {
|
|
1142
|
+
for (var r = t, n = r >> 1, a = n + e / 2; !(n >= a) && gt[n]; ) ++n;
|
|
1143
|
+
if (r = n << 1, r - t > 32 && Se) return Se.decode(B.subarray(t, r));
|
|
1144
|
+
for (var o = "", u = 0; !(u >= e / 2); ++u) {
|
|
1145
|
+
var s = ut[t + u * 2 >> 1];
|
|
1146
|
+
if (s == 0) break;
|
|
1147
|
+
o += String.fromCharCode(s);
|
|
1148
|
+
}
|
|
1149
|
+
return o;
|
|
1150
|
+
}, xn = (t, e, r) => {
|
|
1151
|
+
var n;
|
|
1152
|
+
if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 2) return 0;
|
|
1153
|
+
r -= 2;
|
|
1154
|
+
for (var a = e, o = r < t.length * 2 ? r / 2 : t.length, u = 0; u < o; ++u) {
|
|
1155
|
+
var s = t.charCodeAt(u);
|
|
1156
|
+
ut[e >> 1] = s, e += 2;
|
|
1157
|
+
}
|
|
1158
|
+
return ut[e >> 1] = 0, e - a;
|
|
1159
|
+
}, Dn = (t) => t.length * 2, Mn = (t, e) => {
|
|
1160
|
+
for (var r = 0, n = ""; !(r >= e / 4); ) {
|
|
1161
|
+
var a = rt[t + r * 4 >> 2];
|
|
1162
|
+
if (a == 0) break;
|
|
1163
|
+
if (++r, a >= 65536) {
|
|
1164
|
+
var o = a - 65536;
|
|
1165
|
+
n += String.fromCharCode(55296 | o >> 10, 56320 | o & 1023);
|
|
1166
|
+
} else
|
|
1167
|
+
n += String.fromCharCode(a);
|
|
1168
|
+
}
|
|
1169
|
+
return n;
|
|
1170
|
+
}, Fn = (t, e, r) => {
|
|
1171
|
+
var n;
|
|
1172
|
+
if ((n = r) !== null && n !== void 0 || (r = 2147483647), r < 4) return 0;
|
|
1173
|
+
for (var a = e, o = a + r - 4, u = 0; u < t.length; ++u) {
|
|
1174
|
+
var s = t.charCodeAt(u);
|
|
1175
|
+
if (s >= 55296 && s <= 57343) {
|
|
1176
|
+
var l = t.charCodeAt(++u);
|
|
1177
|
+
s = 65536 + ((s & 1023) << 10) | l & 1023;
|
|
1178
|
+
}
|
|
1179
|
+
if (rt[e >> 2] = s, e += 4, e + 4 > o) break;
|
|
1180
|
+
}
|
|
1181
|
+
return rt[e >> 2] = 0, e - a;
|
|
1182
|
+
}, In = (t) => {
|
|
1183
|
+
for (var e = 0, r = 0; r < t.length; ++r) {
|
|
1184
|
+
var n = t.charCodeAt(r);
|
|
1185
|
+
n >= 55296 && n <= 57343 && ++r, e += 4;
|
|
1186
|
+
}
|
|
1187
|
+
return e;
|
|
1188
|
+
}, jn = (t, e, r) => {
|
|
1189
|
+
r = F(r);
|
|
1190
|
+
var n, a, o, u;
|
|
1191
|
+
e === 2 ? (n = Sn, a = xn, u = Dn, o = (s) => gt[s >> 1]) : e === 4 && (n = Mn, a = Fn, u = In, o = (s) => _[s >> 2]), W(t, {
|
|
1192
|
+
name: r,
|
|
1193
|
+
fromWireType: (s) => {
|
|
1194
|
+
for (var l = _[s >> 2], d, h = s + 4, y = 0; y <= l; ++y) {
|
|
1195
|
+
var $ = s + 4 + y * e;
|
|
1196
|
+
if (y == l || o($) == 0) {
|
|
1197
|
+
var C = $ - h, P = n(h, C);
|
|
1198
|
+
d === void 0 ? d = P : (d += "\0", d += P), h = $ + e;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
return X(s), d;
|
|
1202
|
+
},
|
|
1203
|
+
toWireType: (s, l) => {
|
|
1204
|
+
typeof l != "string" && b(`Cannot pass non-string to C++ string type ${r}`);
|
|
1205
|
+
var d = u(l), h = ee(4 + d + e);
|
|
1206
|
+
return _[h >> 2] = d / e, a(l, h + 4, d + e), s !== null && s.push(X, h), h;
|
|
1207
|
+
},
|
|
1208
|
+
argPackAdvance: N,
|
|
1209
|
+
readValueFromPointer: lt,
|
|
1210
|
+
destructorFunction(s) {
|
|
1211
|
+
X(s);
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
}, Rn = (t, e, r, n, a, o) => {
|
|
1215
|
+
Tt[t] = {
|
|
1216
|
+
name: F(e),
|
|
1217
|
+
rawConstructor: U(r, n),
|
|
1218
|
+
rawDestructor: U(a, o),
|
|
1219
|
+
fields: []
|
|
1220
|
+
};
|
|
1221
|
+
}, Bn = (t, e, r, n, a, o, u, s, l, d) => {
|
|
1222
|
+
Tt[t].fields.push({
|
|
1223
|
+
fieldName: F(e),
|
|
1224
|
+
getterReturnType: r,
|
|
1225
|
+
getter: U(n, a),
|
|
1226
|
+
getterContext: o,
|
|
1227
|
+
setterArgumentType: u,
|
|
1228
|
+
setter: U(s, l),
|
|
1229
|
+
setterContext: d
|
|
1230
|
+
});
|
|
1231
|
+
}, Ln = (t, e) => {
|
|
1232
|
+
e = F(e), W(t, {
|
|
1233
|
+
isVoid: !0,
|
|
1234
|
+
name: e,
|
|
1235
|
+
argPackAdvance: 0,
|
|
1236
|
+
fromWireType: () => {
|
|
1237
|
+
},
|
|
1238
|
+
toWireType: (r, n) => {
|
|
1239
|
+
}
|
|
1240
|
+
});
|
|
1241
|
+
}, Un = (t, e, r) => B.copyWithin(t, e, e + r), Kt = [], Wn = (t, e, r, n) => (t = Kt[t], e = G.toValue(e), t(null, e, r, n)), kn = {}, Hn = (t) => {
|
|
1242
|
+
var e = kn[t];
|
|
1243
|
+
return e === void 0 ? F(t) : e;
|
|
1244
|
+
}, xe = () => {
|
|
1245
|
+
if (typeof globalThis == "object")
|
|
1246
|
+
return globalThis;
|
|
1247
|
+
function t(e) {
|
|
1248
|
+
e.$$$embind_global$$$ = e;
|
|
1249
|
+
var r = typeof $$$embind_global$$$ == "object" && e.$$$embind_global$$$ == e;
|
|
1250
|
+
return r || delete e.$$$embind_global$$$, r;
|
|
1251
|
+
}
|
|
1252
|
+
if (typeof $$$embind_global$$$ == "object" || (typeof global == "object" && t(global) ? $$$embind_global$$$ = global : typeof self == "object" && t(self) && ($$$embind_global$$$ = self), typeof $$$embind_global$$$ == "object"))
|
|
1253
|
+
return $$$embind_global$$$;
|
|
1254
|
+
throw Error("unable to get global object.");
|
|
1255
|
+
}, Vn = (t) => t === 0 ? G.toHandle(xe()) : (t = Hn(t), G.toHandle(xe()[t])), Nn = (t) => {
|
|
1256
|
+
var e = Kt.length;
|
|
1257
|
+
return Kt.push(t), e;
|
|
1258
|
+
}, De = (t, e) => {
|
|
1259
|
+
var r = Q[t];
|
|
1260
|
+
return r === void 0 && b(`${e} has unknown type ${_e(t)}`), r;
|
|
1261
|
+
}, zn = (t, e) => {
|
|
1262
|
+
for (var r = new Array(t), n = 0; n < t; ++n)
|
|
1263
|
+
r[n] = De(_[e + n * 4 >> 2], "parameter " + n);
|
|
1264
|
+
return r;
|
|
1265
|
+
}, Gn = Reflect.construct, Xn = (t, e, r) => {
|
|
1266
|
+
var n = [], a = t.toWireType(n, r);
|
|
1267
|
+
return n.length && (_[e >> 2] = G.toHandle(n)), a;
|
|
1268
|
+
}, qn = (t, e, r) => {
|
|
1269
|
+
var n = zn(t, e), a = n.shift();
|
|
1270
|
+
t--;
|
|
1271
|
+
var o = new Array(t), u = (l, d, h, y) => {
|
|
1272
|
+
for (var $ = 0, C = 0; C < t; ++C)
|
|
1273
|
+
o[C] = n[C].readValueFromPointer(y + $), $ += n[C].argPackAdvance;
|
|
1274
|
+
var P = r === 1 ? Gn(d, o) : d.apply(l, o);
|
|
1275
|
+
return Xn(a, h, P);
|
|
1276
|
+
}, s = `methodCaller<(${n.map((l) => l.name).join(", ")}) => ${a.name}>`;
|
|
1277
|
+
return Nn(At(s, u));
|
|
1278
|
+
}, Zn = (t) => {
|
|
1279
|
+
t > 9 && (z[t + 1] += 1);
|
|
1280
|
+
}, Yn = (t) => {
|
|
1281
|
+
var e = G.toValue(t);
|
|
1282
|
+
Nt(e), Qt(t);
|
|
1283
|
+
}, Qn = (t, e) => {
|
|
1284
|
+
t = De(t, "_emval_take_value");
|
|
1285
|
+
var r = t.readValueFromPointer(e);
|
|
1286
|
+
return G.toHandle(r);
|
|
1287
|
+
}, Jn = (t, e, r, n) => {
|
|
1288
|
+
var a = (/* @__PURE__ */ new Date()).getFullYear(), o = new Date(a, 0, 1), u = new Date(a, 6, 1), s = o.getTimezoneOffset(), l = u.getTimezoneOffset(), d = Math.max(s, l);
|
|
1289
|
+
_[t >> 2] = d * 60, rt[e >> 2] = +(s != l);
|
|
1290
|
+
var h = (C) => {
|
|
1291
|
+
var P = C >= 0 ? "-" : "+", D = Math.abs(C), A = String(Math.floor(D / 60)).padStart(2, "0"), S = String(D % 60).padStart(2, "0");
|
|
1292
|
+
return `UTC${P}${A}${S}`;
|
|
1293
|
+
}, y = h(s), $ = h(l);
|
|
1294
|
+
l < s ? (dt(y, r, 17), dt($, n, 17)) : (dt(y, n, 17), dt($, r, 17));
|
|
1295
|
+
}, Kn = () => 2147483648, ta = (t, e) => Math.ceil(t / e) * e, ea = (t) => {
|
|
1296
|
+
var e = mt.buffer, r = (t - e.byteLength + 65535) / 65536 | 0;
|
|
1297
|
+
try {
|
|
1298
|
+
return mt.grow(r), ue(), 1;
|
|
1299
|
+
} catch {
|
|
1300
|
+
}
|
|
1301
|
+
}, ra = (t) => {
|
|
1302
|
+
var e = B.length;
|
|
1303
|
+
t >>>= 0;
|
|
1304
|
+
var r = Kn();
|
|
1305
|
+
if (t > r)
|
|
1306
|
+
return !1;
|
|
1307
|
+
for (var n = 1; n <= 4; n *= 2) {
|
|
1308
|
+
var a = e * (1 + 0.2 / n);
|
|
1309
|
+
a = Math.min(a, t + 100663296);
|
|
1310
|
+
var o = Math.min(r, ta(Math.max(t, a), 65536)), u = ea(o);
|
|
1311
|
+
if (u)
|
|
1312
|
+
return !0;
|
|
1313
|
+
}
|
|
1314
|
+
return !1;
|
|
1315
|
+
}, te = {}, na = () => tt || "./this.program", ht = () => {
|
|
1316
|
+
if (!ht.strings) {
|
|
1317
|
+
var t = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", e = {
|
|
1318
|
+
USER: "web_user",
|
|
1319
|
+
LOGNAME: "web_user",
|
|
1320
|
+
PATH: "/",
|
|
1321
|
+
PWD: "/",
|
|
1322
|
+
HOME: "/home/web_user",
|
|
1323
|
+
LANG: t,
|
|
1324
|
+
_: na()
|
|
1325
|
+
};
|
|
1326
|
+
for (var r in te)
|
|
1327
|
+
te[r] === void 0 ? delete e[r] : e[r] = te[r];
|
|
1328
|
+
var n = [];
|
|
1329
|
+
for (var r in e)
|
|
1330
|
+
n.push(`${r}=${e[r]}`);
|
|
1331
|
+
ht.strings = n;
|
|
1332
|
+
}
|
|
1333
|
+
return ht.strings;
|
|
1334
|
+
}, aa = (t, e) => {
|
|
1335
|
+
for (var r = 0; r < t.length; ++r)
|
|
1336
|
+
H[e++] = t.charCodeAt(r);
|
|
1337
|
+
H[e] = 0;
|
|
1338
|
+
}, ia = (t, e) => {
|
|
1339
|
+
var r = 0;
|
|
1340
|
+
return ht().forEach((n, a) => {
|
|
1341
|
+
var o = e + r;
|
|
1342
|
+
_[t + a * 4 >> 2] = o, aa(n, o), r += n.length + 1;
|
|
1343
|
+
}), 0;
|
|
1344
|
+
}, oa = (t, e) => {
|
|
1345
|
+
var r = ht();
|
|
1346
|
+
_[t >> 2] = r.length;
|
|
1347
|
+
var n = 0;
|
|
1348
|
+
return r.forEach((a) => n += a.length + 1), _[e >> 2] = n, 0;
|
|
1349
|
+
}, sa = (t) => 52;
|
|
1350
|
+
function ua(t, e, r, n, a) {
|
|
1351
|
+
return 70;
|
|
1352
|
+
}
|
|
1353
|
+
var ca = [null, [], []], la = (t, e) => {
|
|
1354
|
+
var r = ca[t];
|
|
1355
|
+
e === 0 || e === 10 ? ((t === 1 ? dr : et)(Ae(r)), r.length = 0) : r.push(e);
|
|
1356
|
+
}, fa = (t, e, r, n) => {
|
|
1357
|
+
for (var a = 0, o = 0; o < r; o++) {
|
|
1358
|
+
var u = _[e >> 2], s = _[e + 4 >> 2];
|
|
1359
|
+
e += 8;
|
|
1360
|
+
for (var l = 0; l < s; l++)
|
|
1361
|
+
la(t, B[u + l]);
|
|
1362
|
+
a += s;
|
|
1363
|
+
}
|
|
1364
|
+
return _[n >> 2] = a, 0;
|
|
1365
|
+
}, da = (t) => t;
|
|
1366
|
+
he = c.InternalError = class extends Error {
|
|
1367
|
+
constructor(t) {
|
|
1368
|
+
super(t), this.name = "InternalError";
|
|
1369
|
+
}
|
|
1370
|
+
}, kr(), at = c.BindingError = class extends Error {
|
|
1371
|
+
constructor(t) {
|
|
1372
|
+
super(t), this.name = "BindingError";
|
|
1373
|
+
}
|
|
1374
|
+
}, Yr(), an(), Te = c.UnboundTypeError = cn(Error, "UnboundTypeError"), yn();
|
|
1375
|
+
var ha = {
|
|
1376
|
+
s: Sr,
|
|
1377
|
+
w: xr,
|
|
1378
|
+
a: Mr,
|
|
1379
|
+
j: Fr,
|
|
1380
|
+
l: Ir,
|
|
1381
|
+
M: jr,
|
|
1382
|
+
p: Rr,
|
|
1383
|
+
ca: Br,
|
|
1384
|
+
d: Dr,
|
|
1385
|
+
Z: Lr,
|
|
1386
|
+
sa: Ur,
|
|
1387
|
+
Y: Wr,
|
|
1388
|
+
na: Vr,
|
|
1389
|
+
qa: ln,
|
|
1390
|
+
pa: dn,
|
|
1391
|
+
D: hn,
|
|
1392
|
+
la: vn,
|
|
1393
|
+
Q: gn,
|
|
1394
|
+
R: wn,
|
|
1395
|
+
x: bn,
|
|
1396
|
+
t: Cn,
|
|
1397
|
+
ra: _n,
|
|
1398
|
+
ma: An,
|
|
1399
|
+
N: jn,
|
|
1400
|
+
J: Rn,
|
|
1401
|
+
ta: Bn,
|
|
1402
|
+
oa: Ln,
|
|
1403
|
+
fa: Un,
|
|
1404
|
+
U: Wn,
|
|
1405
|
+
ua: Qt,
|
|
1406
|
+
wa: Vn,
|
|
1407
|
+
_: qn,
|
|
1408
|
+
S: Zn,
|
|
1409
|
+
va: Yn,
|
|
1410
|
+
ka: Qn,
|
|
1411
|
+
$: Jn,
|
|
1412
|
+
da: ra,
|
|
1413
|
+
aa: ia,
|
|
1414
|
+
ba: oa,
|
|
1415
|
+
ea: sa,
|
|
1416
|
+
W: ua,
|
|
1417
|
+
P: fa,
|
|
1418
|
+
H: Ia,
|
|
1419
|
+
B: Ra,
|
|
1420
|
+
T: wa,
|
|
1421
|
+
O: Va,
|
|
1422
|
+
q: xa,
|
|
1423
|
+
b: ya,
|
|
1424
|
+
C: Fa,
|
|
1425
|
+
ha: La,
|
|
1426
|
+
c: ma,
|
|
1427
|
+
ga: Ua,
|
|
1428
|
+
h: ga,
|
|
1429
|
+
i: _a,
|
|
1430
|
+
r: Pa,
|
|
1431
|
+
L: Ma,
|
|
1432
|
+
v: Oa,
|
|
1433
|
+
G: ka,
|
|
1434
|
+
I: Da,
|
|
1435
|
+
z: Ba,
|
|
1436
|
+
F: Na,
|
|
1437
|
+
X: Ga,
|
|
1438
|
+
V: Xa,
|
|
1439
|
+
k: ba,
|
|
1440
|
+
f: $a,
|
|
1441
|
+
e: va,
|
|
1442
|
+
g: pa,
|
|
1443
|
+
K: Ha,
|
|
1444
|
+
m: Ta,
|
|
1445
|
+
ia: ja,
|
|
1446
|
+
o: Ea,
|
|
1447
|
+
u: Aa,
|
|
1448
|
+
ja: Sa,
|
|
1449
|
+
A: Wa,
|
|
1450
|
+
n: Ca,
|
|
1451
|
+
E: za,
|
|
1452
|
+
y: da
|
|
1453
|
+
}, E;
|
|
1454
|
+
Ar();
|
|
1455
|
+
var Me = (t) => (Me = E.za)(t), X = c._free = (t) => (X = c._free = E.Aa)(t), ee = c._malloc = (t) => (ee = c._malloc = E.Ca)(t), Fe = (t) => (Fe = E.Da)(t), v = (t, e) => (v = E.Ea)(t, e), Ie = (t) => (Ie = E.Fa)(t), je = (t) => (je = E.Ga)(t), Re = () => (Re = E.Ha)(), Be = (t) => (Be = E.Ia)(t), Le = (t) => (Le = E.Ja)(t), Ue = (t, e, r) => (Ue = E.Ka)(t, e, r);
|
|
1456
|
+
c.dynCall_viijii = (t, e, r, n, a, o, u) => (c.dynCall_viijii = E.La)(t, e, r, n, a, o, u);
|
|
1457
|
+
var We = c.dynCall_jiii = (t, e, r, n) => (We = c.dynCall_jiii = E.Ma)(t, e, r, n);
|
|
1458
|
+
c.dynCall_jiji = (t, e, r, n, a) => (c.dynCall_jiji = E.Na)(t, e, r, n, a);
|
|
1459
|
+
var ke = c.dynCall_jiiii = (t, e, r, n, a) => (ke = c.dynCall_jiiii = E.Oa)(t, e, r, n, a);
|
|
1460
|
+
c.dynCall_iiiiij = (t, e, r, n, a, o, u) => (c.dynCall_iiiiij = E.Pa)(t, e, r, n, a, o, u), c.dynCall_iiiiijj = (t, e, r, n, a, o, u, s, l) => (c.dynCall_iiiiijj = E.Qa)(t, e, r, n, a, o, u, s, l), c.dynCall_iiiiiijj = (t, e, r, n, a, o, u, s, l, d) => (c.dynCall_iiiiiijj = E.Ra)(t, e, r, n, a, o, u, s, l, d);
|
|
1461
|
+
function pa(t, e, r, n) {
|
|
1462
|
+
var a = g();
|
|
1463
|
+
try {
|
|
1464
|
+
w(t)(e, r, n);
|
|
1465
|
+
} catch (o) {
|
|
1466
|
+
if (m(a), o !== o + 0) throw o;
|
|
1467
|
+
v(1, 0);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
function ya(t, e) {
|
|
1471
|
+
var r = g();
|
|
1472
|
+
try {
|
|
1473
|
+
return w(t)(e);
|
|
1474
|
+
} catch (n) {
|
|
1475
|
+
if (m(r), n !== n + 0) throw n;
|
|
1476
|
+
v(1, 0);
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
function va(t, e, r) {
|
|
1480
|
+
var n = g();
|
|
1481
|
+
try {
|
|
1482
|
+
w(t)(e, r);
|
|
1483
|
+
} catch (a) {
|
|
1484
|
+
if (m(n), a !== a + 0) throw a;
|
|
1485
|
+
v(1, 0);
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
function ma(t, e, r) {
|
|
1489
|
+
var n = g();
|
|
1490
|
+
try {
|
|
1491
|
+
return w(t)(e, r);
|
|
1492
|
+
} catch (a) {
|
|
1493
|
+
if (m(n), a !== a + 0) throw a;
|
|
1494
|
+
v(1, 0);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
function ga(t, e, r, n) {
|
|
1498
|
+
var a = g();
|
|
1499
|
+
try {
|
|
1500
|
+
return w(t)(e, r, n);
|
|
1501
|
+
} catch (o) {
|
|
1502
|
+
if (m(a), o !== o + 0) throw o;
|
|
1503
|
+
v(1, 0);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
function wa(t, e, r, n, a) {
|
|
1507
|
+
var o = g();
|
|
1508
|
+
try {
|
|
1509
|
+
return w(t)(e, r, n, a);
|
|
1510
|
+
} catch (u) {
|
|
1511
|
+
if (m(o), u !== u + 0) throw u;
|
|
1512
|
+
v(1, 0);
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
function $a(t, e) {
|
|
1516
|
+
var r = g();
|
|
1517
|
+
try {
|
|
1518
|
+
w(t)(e);
|
|
1519
|
+
} catch (n) {
|
|
1520
|
+
if (m(r), n !== n + 0) throw n;
|
|
1521
|
+
v(1, 0);
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
function ba(t) {
|
|
1525
|
+
var e = g();
|
|
1526
|
+
try {
|
|
1527
|
+
w(t)();
|
|
1528
|
+
} catch (r) {
|
|
1529
|
+
if (m(e), r !== r + 0) throw r;
|
|
1530
|
+
v(1, 0);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
function Ca(t, e, r, n, a, o, u, s, l, d, h) {
|
|
1534
|
+
var y = g();
|
|
1535
|
+
try {
|
|
1536
|
+
w(t)(e, r, n, a, o, u, s, l, d, h);
|
|
1537
|
+
} catch ($) {
|
|
1538
|
+
if (m(y), $ !== $ + 0) throw $;
|
|
1539
|
+
v(1, 0);
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
function Ta(t, e, r, n, a) {
|
|
1543
|
+
var o = g();
|
|
1544
|
+
try {
|
|
1545
|
+
w(t)(e, r, n, a);
|
|
1546
|
+
} catch (u) {
|
|
1547
|
+
if (m(o), u !== u + 0) throw u;
|
|
1548
|
+
v(1, 0);
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
function _a(t, e, r, n, a) {
|
|
1552
|
+
var o = g();
|
|
1553
|
+
try {
|
|
1554
|
+
return w(t)(e, r, n, a);
|
|
1555
|
+
} catch (u) {
|
|
1556
|
+
if (m(o), u !== u + 0) throw u;
|
|
1557
|
+
v(1, 0);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
function Pa(t, e, r, n, a, o) {
|
|
1561
|
+
var u = g();
|
|
1562
|
+
try {
|
|
1563
|
+
return w(t)(e, r, n, a, o);
|
|
1564
|
+
} catch (s) {
|
|
1565
|
+
if (m(u), s !== s + 0) throw s;
|
|
1566
|
+
v(1, 0);
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
function Ea(t, e, r, n, a, o) {
|
|
1570
|
+
var u = g();
|
|
1571
|
+
try {
|
|
1572
|
+
w(t)(e, r, n, a, o);
|
|
1573
|
+
} catch (s) {
|
|
1574
|
+
if (m(u), s !== s + 0) throw s;
|
|
1575
|
+
v(1, 0);
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
function Oa(t, e, r, n, a, o, u) {
|
|
1579
|
+
var s = g();
|
|
1580
|
+
try {
|
|
1581
|
+
return w(t)(e, r, n, a, o, u);
|
|
1582
|
+
} catch (l) {
|
|
1583
|
+
if (m(s), l !== l + 0) throw l;
|
|
1584
|
+
v(1, 0);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
function Aa(t, e, r, n, a, o, u, s) {
|
|
1588
|
+
var l = g();
|
|
1589
|
+
try {
|
|
1590
|
+
w(t)(e, r, n, a, o, u, s);
|
|
1591
|
+
} catch (d) {
|
|
1592
|
+
if (m(l), d !== d + 0) throw d;
|
|
1593
|
+
v(1, 0);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
function Sa(t, e, r, n, a, o, u, s, l) {
|
|
1597
|
+
var d = g();
|
|
1598
|
+
try {
|
|
1599
|
+
w(t)(e, r, n, a, o, u, s, l);
|
|
1600
|
+
} catch (h) {
|
|
1601
|
+
if (m(d), h !== h + 0) throw h;
|
|
1602
|
+
v(1, 0);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
function xa(t) {
|
|
1606
|
+
var e = g();
|
|
1607
|
+
try {
|
|
1608
|
+
return w(t)();
|
|
1609
|
+
} catch (r) {
|
|
1610
|
+
if (m(e), r !== r + 0) throw r;
|
|
1611
|
+
v(1, 0);
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
function Da(t, e, r, n, a, o, u, s, l) {
|
|
1615
|
+
var d = g();
|
|
1616
|
+
try {
|
|
1617
|
+
return w(t)(e, r, n, a, o, u, s, l);
|
|
1618
|
+
} catch (h) {
|
|
1619
|
+
if (m(d), h !== h + 0) throw h;
|
|
1620
|
+
v(1, 0);
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
function Ma(t, e, r, n, a, o, u) {
|
|
1624
|
+
var s = g();
|
|
1625
|
+
try {
|
|
1626
|
+
return w(t)(e, r, n, a, o, u);
|
|
1627
|
+
} catch (l) {
|
|
1628
|
+
if (m(s), l !== l + 0) throw l;
|
|
1629
|
+
v(1, 0);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
function Fa(t, e, r, n) {
|
|
1633
|
+
var a = g();
|
|
1634
|
+
try {
|
|
1635
|
+
return w(t)(e, r, n);
|
|
1636
|
+
} catch (o) {
|
|
1637
|
+
if (m(a), o !== o + 0) throw o;
|
|
1638
|
+
v(1, 0);
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
function Ia(t, e, r, n) {
|
|
1642
|
+
var a = g();
|
|
1643
|
+
try {
|
|
1644
|
+
return w(t)(e, r, n);
|
|
1645
|
+
} catch (o) {
|
|
1646
|
+
if (m(a), o !== o + 0) throw o;
|
|
1647
|
+
v(1, 0);
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
function ja(t, e, r, n, a, o, u, s) {
|
|
1651
|
+
var l = g();
|
|
1652
|
+
try {
|
|
1653
|
+
w(t)(e, r, n, a, o, u, s);
|
|
1654
|
+
} catch (d) {
|
|
1655
|
+
if (m(l), d !== d + 0) throw d;
|
|
1656
|
+
v(1, 0);
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
function Ra(t, e, r, n, a, o) {
|
|
1660
|
+
var u = g();
|
|
1661
|
+
try {
|
|
1662
|
+
return w(t)(e, r, n, a, o);
|
|
1663
|
+
} catch (s) {
|
|
1664
|
+
if (m(u), s !== s + 0) throw s;
|
|
1665
|
+
v(1, 0);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
function Ba(t, e, r, n, a, o, u, s, l, d) {
|
|
1669
|
+
var h = g();
|
|
1670
|
+
try {
|
|
1671
|
+
return w(t)(e, r, n, a, o, u, s, l, d);
|
|
1672
|
+
} catch (y) {
|
|
1673
|
+
if (m(h), y !== y + 0) throw y;
|
|
1674
|
+
v(1, 0);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
function La(t, e, r) {
|
|
1678
|
+
var n = g();
|
|
1679
|
+
try {
|
|
1680
|
+
return w(t)(e, r);
|
|
1681
|
+
} catch (a) {
|
|
1682
|
+
if (m(n), a !== a + 0) throw a;
|
|
1683
|
+
v(1, 0);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
function Ua(t, e, r, n, a) {
|
|
1687
|
+
var o = g();
|
|
1688
|
+
try {
|
|
1689
|
+
return w(t)(e, r, n, a);
|
|
1690
|
+
} catch (u) {
|
|
1691
|
+
if (m(o), u !== u + 0) throw u;
|
|
1692
|
+
v(1, 0);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
function Wa(t, e, r, n, a, o, u, s, l, d) {
|
|
1696
|
+
var h = g();
|
|
1697
|
+
try {
|
|
1698
|
+
w(t)(e, r, n, a, o, u, s, l, d);
|
|
1699
|
+
} catch (y) {
|
|
1700
|
+
if (m(h), y !== y + 0) throw y;
|
|
1701
|
+
v(1, 0);
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
function ka(t, e, r, n, a, o, u, s) {
|
|
1705
|
+
var l = g();
|
|
1706
|
+
try {
|
|
1707
|
+
return w(t)(e, r, n, a, o, u, s);
|
|
1708
|
+
} catch (d) {
|
|
1709
|
+
if (m(l), d !== d + 0) throw d;
|
|
1710
|
+
v(1, 0);
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
function Ha(t, e, r, n, a, o, u) {
|
|
1714
|
+
var s = g();
|
|
1715
|
+
try {
|
|
1716
|
+
w(t)(e, r, n, a, o, u);
|
|
1717
|
+
} catch (l) {
|
|
1718
|
+
if (m(s), l !== l + 0) throw l;
|
|
1719
|
+
v(1, 0);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
function Va(t, e, r, n) {
|
|
1723
|
+
var a = g();
|
|
1724
|
+
try {
|
|
1725
|
+
return w(t)(e, r, n);
|
|
1726
|
+
} catch (o) {
|
|
1727
|
+
if (m(a), o !== o + 0) throw o;
|
|
1728
|
+
v(1, 0);
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
function Na(t, e, r, n, a, o, u, s, l, d, h, y) {
|
|
1732
|
+
var $ = g();
|
|
1733
|
+
try {
|
|
1734
|
+
return w(t)(e, r, n, a, o, u, s, l, d, h, y);
|
|
1735
|
+
} catch (C) {
|
|
1736
|
+
if (m($), C !== C + 0) throw C;
|
|
1737
|
+
v(1, 0);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
function za(t, e, r, n, a, o, u, s, l, d, h, y, $, C, P, D) {
|
|
1741
|
+
var A = g();
|
|
1742
|
+
try {
|
|
1743
|
+
w(t)(e, r, n, a, o, u, s, l, d, h, y, $, C, P, D);
|
|
1744
|
+
} catch (S) {
|
|
1745
|
+
if (m(A), S !== S + 0) throw S;
|
|
1746
|
+
v(1, 0);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
function Ga(t, e, r, n) {
|
|
1750
|
+
var a = g();
|
|
1751
|
+
try {
|
|
1752
|
+
return We(t, e, r, n);
|
|
1753
|
+
} catch (o) {
|
|
1754
|
+
if (m(a), o !== o + 0) throw o;
|
|
1755
|
+
v(1, 0);
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
function Xa(t, e, r, n, a) {
|
|
1759
|
+
var o = g();
|
|
1760
|
+
try {
|
|
1761
|
+
return ke(t, e, r, n, a);
|
|
1762
|
+
} catch (u) {
|
|
1763
|
+
if (m(o), u !== u + 0) throw u;
|
|
1764
|
+
v(1, 0);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
var Mt;
|
|
1768
|
+
ct = function t() {
|
|
1769
|
+
Mt || He(), Mt || (ct = t);
|
|
1770
|
+
};
|
|
1771
|
+
function He() {
|
|
1772
|
+
if (Y > 0 || (hr(), Y > 0))
|
|
1773
|
+
return;
|
|
1774
|
+
function t() {
|
|
1775
|
+
var e;
|
|
1776
|
+
Mt || (Mt = !0, c.calledRun = !0, !ie && (pr(), O(c), (e = c.onRuntimeInitialized) === null || e === void 0 || e.call(c), yr()));
|
|
1777
|
+
}
|
|
1778
|
+
c.setStatus ? (c.setStatus("Running..."), setTimeout(() => {
|
|
1779
|
+
setTimeout(() => c.setStatus(""), 1), t();
|
|
1780
|
+
}, 1)) : t();
|
|
1781
|
+
}
|
|
1782
|
+
if (c.preInit)
|
|
1783
|
+
for (typeof c.preInit == "function" && (c.preInit = [c.preInit]); c.preInit.length > 0; )
|
|
1784
|
+
c.preInit.pop()();
|
|
1785
|
+
return He(), T = j, T;
|
|
1786
|
+
};
|
|
1787
|
+
})();
|
|
1788
|
+
function rr(i) {
|
|
1789
|
+
return er(ae, i);
|
|
1790
|
+
}
|
|
1791
|
+
function Fi() {
|
|
1792
|
+
return fi(ae);
|
|
1793
|
+
}
|
|
1794
|
+
function Ii(i) {
|
|
1795
|
+
rr({
|
|
1796
|
+
overrides: i,
|
|
1797
|
+
equalityFn: Object.is,
|
|
1798
|
+
fireImmediately: !1
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
async function hi(i, f) {
|
|
1802
|
+
return di(ae, i, f);
|
|
1803
|
+
}
|
|
1804
|
+
const ji = "fd885aab6c1040e991da4bdf2c3849d27b3c238c437a29c8d30efbe68e509bb1", nr = [
|
|
1805
|
+
["aztec", "Aztec"],
|
|
1806
|
+
["code_128", "Code128"],
|
|
1807
|
+
["code_39", "Code39"],
|
|
1808
|
+
["code_93", "Code93"],
|
|
1809
|
+
["codabar", "Codabar"],
|
|
1810
|
+
["databar", "DataBar"],
|
|
1811
|
+
["databar_expanded", "DataBarExpanded"],
|
|
1812
|
+
["databar_limited", "DataBarLimited"],
|
|
1813
|
+
["data_matrix", "DataMatrix"],
|
|
1814
|
+
["dx_film_edge", "DXFilmEdge"],
|
|
1815
|
+
["ean_13", "EAN-13"],
|
|
1816
|
+
["ean_8", "EAN-8"],
|
|
1817
|
+
["itf", "ITF"],
|
|
1818
|
+
["maxi_code", "MaxiCode"],
|
|
1819
|
+
["micro_qr_code", "MicroQRCode"],
|
|
1820
|
+
["pdf417", "PDF417"],
|
|
1821
|
+
["qr_code", "QRCode"],
|
|
1822
|
+
["rm_qr_code", "rMQRCode"],
|
|
1823
|
+
["upc_a", "UPC-A"],
|
|
1824
|
+
["upc_e", "UPC-E"],
|
|
1825
|
+
["linear_codes", "Linear-Codes"],
|
|
1826
|
+
["matrix_codes", "Matrix-Codes"],
|
|
1827
|
+
["any", "Any"]
|
|
1828
|
+
], pi = [...nr, ["unknown"]].map((i) => i[0]), ne = new Map(
|
|
1829
|
+
nr
|
|
1830
|
+
);
|
|
1831
|
+
function yi(i) {
|
|
1832
|
+
for (const [f, p] of ne)
|
|
1833
|
+
if (i === p)
|
|
1834
|
+
return f;
|
|
1835
|
+
return "unknown";
|
|
1836
|
+
}
|
|
1837
|
+
function vi(i) {
|
|
1838
|
+
if (ar(i))
|
|
1839
|
+
return {
|
|
1840
|
+
width: i.naturalWidth,
|
|
1841
|
+
height: i.naturalHeight
|
|
1842
|
+
};
|
|
1843
|
+
if (ir(i))
|
|
1844
|
+
return {
|
|
1845
|
+
width: i.width.baseVal.value,
|
|
1846
|
+
height: i.height.baseVal.value
|
|
1847
|
+
};
|
|
1848
|
+
if (or(i))
|
|
1849
|
+
return {
|
|
1850
|
+
width: i.videoWidth,
|
|
1851
|
+
height: i.videoHeight
|
|
1852
|
+
};
|
|
1853
|
+
if (ur(i))
|
|
1854
|
+
return {
|
|
1855
|
+
width: i.width,
|
|
1856
|
+
height: i.height
|
|
1857
|
+
};
|
|
1858
|
+
if (lr(i))
|
|
1859
|
+
return {
|
|
1860
|
+
width: i.displayWidth,
|
|
1861
|
+
height: i.displayHeight
|
|
1862
|
+
};
|
|
1863
|
+
if (sr(i))
|
|
1864
|
+
return {
|
|
1865
|
+
width: i.width,
|
|
1866
|
+
height: i.height
|
|
1867
|
+
};
|
|
1868
|
+
if (cr(i))
|
|
1869
|
+
return {
|
|
1870
|
+
width: i.width,
|
|
1871
|
+
height: i.height
|
|
1872
|
+
};
|
|
1873
|
+
throw new TypeError(
|
|
1874
|
+
"The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'."
|
|
1875
|
+
);
|
|
1876
|
+
}
|
|
1877
|
+
function ar(i) {
|
|
1878
|
+
var f, p;
|
|
1879
|
+
try {
|
|
1880
|
+
return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.HTMLImageElement);
|
|
1881
|
+
} catch {
|
|
1882
|
+
return !1;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
function ir(i) {
|
|
1886
|
+
var f, p;
|
|
1887
|
+
try {
|
|
1888
|
+
return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.SVGImageElement);
|
|
1889
|
+
} catch {
|
|
1890
|
+
return !1;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
function or(i) {
|
|
1894
|
+
var f, p;
|
|
1895
|
+
try {
|
|
1896
|
+
return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.HTMLVideoElement);
|
|
1897
|
+
} catch {
|
|
1898
|
+
return !1;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
function sr(i) {
|
|
1902
|
+
var f, p;
|
|
1903
|
+
try {
|
|
1904
|
+
return i instanceof ((p = (f = i == null ? void 0 : i.ownerDocument) == null ? void 0 : f.defaultView) == null ? void 0 : p.HTMLCanvasElement);
|
|
1905
|
+
} catch {
|
|
1906
|
+
return !1;
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
function ur(i) {
|
|
1910
|
+
try {
|
|
1911
|
+
return i instanceof ImageBitmap || Object.prototype.toString.call(i) === "[object ImageBitmap]";
|
|
1912
|
+
} catch {
|
|
1913
|
+
return !1;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
function cr(i) {
|
|
1917
|
+
try {
|
|
1918
|
+
return i instanceof OffscreenCanvas || Object.prototype.toString.call(i) === "[object OffscreenCanvas]";
|
|
1919
|
+
} catch {
|
|
1920
|
+
return !1;
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
function lr(i) {
|
|
1924
|
+
try {
|
|
1925
|
+
return i instanceof VideoFrame || Object.prototype.toString.call(i) === "[object VideoFrame]";
|
|
1926
|
+
} catch {
|
|
1927
|
+
return !1;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
function mi(i) {
|
|
1931
|
+
try {
|
|
1932
|
+
return i instanceof Blob || Object.prototype.toString.call(i) === "[object Blob]";
|
|
1933
|
+
} catch {
|
|
1934
|
+
return !1;
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
function gi(i) {
|
|
1938
|
+
try {
|
|
1939
|
+
return i instanceof ImageData || Object.prototype.toString.call(i) === "[object ImageData]";
|
|
1940
|
+
} catch {
|
|
1941
|
+
return !1;
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
function wi(i, f) {
|
|
1945
|
+
try {
|
|
1946
|
+
const p = new OffscreenCanvas(i, f);
|
|
1947
|
+
if (p.getContext("2d") instanceof OffscreenCanvasRenderingContext2D)
|
|
1948
|
+
return p;
|
|
1949
|
+
throw void 0;
|
|
1950
|
+
} catch {
|
|
1951
|
+
const p = document.createElement("canvas");
|
|
1952
|
+
return p.width = i, p.height = f, p;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
async function fr(i) {
|
|
1956
|
+
if (ar(i) && !await Ti(i))
|
|
1957
|
+
throw new DOMException(
|
|
1958
|
+
"Failed to load or decode HTMLImageElement.",
|
|
1959
|
+
"InvalidStateError"
|
|
1960
|
+
);
|
|
1961
|
+
if (ir(i) && !await _i(i))
|
|
1962
|
+
throw new DOMException(
|
|
1963
|
+
"Failed to load or decode SVGImageElement.",
|
|
1964
|
+
"InvalidStateError"
|
|
1965
|
+
);
|
|
1966
|
+
if (lr(i) && Pi(i))
|
|
1967
|
+
throw new DOMException("VideoFrame is closed.", "InvalidStateError");
|
|
1968
|
+
if (or(i) && (i.readyState === 0 || i.readyState === 1))
|
|
1969
|
+
throw new DOMException("Invalid element or state.", "InvalidStateError");
|
|
1970
|
+
if (ur(i) && Oi(i))
|
|
1971
|
+
throw new DOMException(
|
|
1972
|
+
"The image source is detached.",
|
|
1973
|
+
"InvalidStateError"
|
|
1974
|
+
);
|
|
1975
|
+
const { width: f, height: p } = vi(i);
|
|
1976
|
+
if (f === 0 || p === 0)
|
|
1977
|
+
return null;
|
|
1978
|
+
const c = wi(f, p).getContext("2d");
|
|
1979
|
+
c.drawImage(i, 0, 0);
|
|
1980
|
+
try {
|
|
1981
|
+
return c.getImageData(0, 0, f, p);
|
|
1982
|
+
} catch {
|
|
1983
|
+
throw new DOMException("Source would taint origin.", "SecurityError");
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
async function $i(i) {
|
|
1987
|
+
let f;
|
|
1988
|
+
try {
|
|
1989
|
+
f = await createImageBitmap(i);
|
|
1990
|
+
} catch {
|
|
1991
|
+
try {
|
|
1992
|
+
if (globalThis.Image) {
|
|
1993
|
+
f = new Image();
|
|
1994
|
+
let c = "";
|
|
1995
|
+
try {
|
|
1996
|
+
c = URL.createObjectURL(i), f.src = c, await f.decode();
|
|
1997
|
+
} finally {
|
|
1998
|
+
URL.revokeObjectURL(c);
|
|
1999
|
+
}
|
|
2000
|
+
} else
|
|
2001
|
+
return i;
|
|
2002
|
+
} catch {
|
|
2003
|
+
throw new DOMException(
|
|
2004
|
+
"Failed to load or decode Blob.",
|
|
2005
|
+
"InvalidStateError"
|
|
2006
|
+
);
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
return await fr(f);
|
|
2010
|
+
}
|
|
2011
|
+
function bi(i) {
|
|
2012
|
+
const { width: f, height: p } = i;
|
|
2013
|
+
if (f === 0 || p === 0)
|
|
2014
|
+
return null;
|
|
2015
|
+
const T = i.getContext("2d");
|
|
2016
|
+
try {
|
|
2017
|
+
return T.getImageData(0, 0, f, p);
|
|
2018
|
+
} catch {
|
|
2019
|
+
throw new DOMException("Source would taint origin.", "SecurityError");
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
async function Ci(i) {
|
|
2023
|
+
if (mi(i))
|
|
2024
|
+
return await $i(i);
|
|
2025
|
+
if (gi(i)) {
|
|
2026
|
+
if (Ei(i))
|
|
2027
|
+
throw new DOMException(
|
|
2028
|
+
"The image data has been detached.",
|
|
2029
|
+
"InvalidStateError"
|
|
2030
|
+
);
|
|
2031
|
+
return i;
|
|
2032
|
+
}
|
|
2033
|
+
return sr(i) || cr(i) ? bi(i) : await fr(i);
|
|
2034
|
+
}
|
|
2035
|
+
async function Ti(i) {
|
|
2036
|
+
try {
|
|
2037
|
+
return await i.decode(), !0;
|
|
2038
|
+
} catch {
|
|
2039
|
+
return !1;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
async function _i(i) {
|
|
2043
|
+
var f;
|
|
2044
|
+
try {
|
|
2045
|
+
return await ((f = i.decode) == null ? void 0 : f.call(i)), !0;
|
|
2046
|
+
} catch {
|
|
2047
|
+
return !1;
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
function Pi(i) {
|
|
2051
|
+
return i.format === null;
|
|
2052
|
+
}
|
|
2053
|
+
function Ei(i) {
|
|
2054
|
+
return i.data.buffer.byteLength === 0;
|
|
2055
|
+
}
|
|
2056
|
+
function Oi(i) {
|
|
2057
|
+
return i.width === 0 && i.height === 0;
|
|
2058
|
+
}
|
|
2059
|
+
function tr(i, f) {
|
|
2060
|
+
return Ai(i) ? new DOMException(`${f}: ${i.message}`, i.name) : Si(i) ? new i.constructor(`${f}: ${i.message}`) : new Error(`${f}: ${i}`);
|
|
2061
|
+
}
|
|
2062
|
+
function Ai(i) {
|
|
2063
|
+
return i instanceof DOMException || Object.prototype.toString.call(i) === "[object DOMException]";
|
|
2064
|
+
}
|
|
2065
|
+
function Si(i) {
|
|
2066
|
+
return i instanceof Error || Object.prototype.toString.call(i) === "[object Error]";
|
|
2067
|
+
}
|
|
2068
|
+
var pt;
|
|
2069
|
+
class Ri {
|
|
2070
|
+
constructor(f = {}) {
|
|
2071
|
+
Ye(this, pt);
|
|
2072
|
+
var p;
|
|
2073
|
+
try {
|
|
2074
|
+
const T = (p = f == null ? void 0 : f.formats) == null ? void 0 : p.filter(
|
|
2075
|
+
(c) => c !== "unknown"
|
|
2076
|
+
);
|
|
2077
|
+
if ((T == null ? void 0 : T.length) === 0)
|
|
2078
|
+
throw new TypeError("Hint option provided, but is empty.");
|
|
2079
|
+
for (const c of T != null ? T : [])
|
|
2080
|
+
if (!ne.has(c))
|
|
2081
|
+
throw new TypeError(
|
|
2082
|
+
`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${c}' is not a valid enum value of type BarcodeFormat.`
|
|
2083
|
+
);
|
|
2084
|
+
Qe(this, pt, T != null ? T : []), rr({ fireImmediately: !0 }).catch(() => {
|
|
2085
|
+
});
|
|
2086
|
+
} catch (T) {
|
|
2087
|
+
throw tr(
|
|
2088
|
+
T,
|
|
2089
|
+
"Failed to construct 'BarcodeDetector'"
|
|
2090
|
+
);
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
static async getSupportedFormats() {
|
|
2094
|
+
return pi.filter((f) => f !== "unknown");
|
|
2095
|
+
}
|
|
2096
|
+
async detect(f) {
|
|
2097
|
+
try {
|
|
2098
|
+
const p = await Ci(f);
|
|
2099
|
+
if (p === null)
|
|
2100
|
+
return [];
|
|
2101
|
+
let T;
|
|
2102
|
+
const c = {
|
|
2103
|
+
tryCode39ExtendedMode: !1,
|
|
2104
|
+
textMode: "Plain",
|
|
2105
|
+
formats: Ze(this, pt).map((O) => ne.get(O))
|
|
2106
|
+
};
|
|
2107
|
+
try {
|
|
2108
|
+
T = await hi(p, c);
|
|
2109
|
+
} catch (O) {
|
|
2110
|
+
throw console.error(O), new DOMException(
|
|
2111
|
+
"Barcode detection service unavailable.",
|
|
2112
|
+
"NotSupportedError"
|
|
2113
|
+
);
|
|
2114
|
+
}
|
|
2115
|
+
return T.map((O) => {
|
|
2116
|
+
const {
|
|
2117
|
+
topLeft: { x, y: j },
|
|
2118
|
+
topRight: { x: M, y: L },
|
|
2119
|
+
bottomLeft: { x: k, y: Z },
|
|
2120
|
+
bottomRight: { x: tt, y: R }
|
|
2121
|
+
} = O.position, yt = Math.min(x, M, k, tt), it = Math.min(j, L, Z, R), ot = Math.max(x, M, k, tt), st = Math.max(j, L, Z, R);
|
|
2122
|
+
return {
|
|
2123
|
+
boundingBox: new DOMRectReadOnly(
|
|
2124
|
+
yt,
|
|
2125
|
+
it,
|
|
2126
|
+
ot - yt,
|
|
2127
|
+
st - it
|
|
2128
|
+
),
|
|
2129
|
+
rawValue: O.text,
|
|
2130
|
+
format: yi(O.format),
|
|
2131
|
+
cornerPoints: [
|
|
2132
|
+
{
|
|
2133
|
+
x,
|
|
2134
|
+
y: j
|
|
2135
|
+
},
|
|
2136
|
+
{
|
|
2137
|
+
x: M,
|
|
2138
|
+
y: L
|
|
2139
|
+
},
|
|
2140
|
+
{
|
|
2141
|
+
x: tt,
|
|
2142
|
+
y: R
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
x: k,
|
|
2146
|
+
y: Z
|
|
2147
|
+
}
|
|
2148
|
+
]
|
|
2149
|
+
};
|
|
2150
|
+
});
|
|
2151
|
+
} catch (p) {
|
|
2152
|
+
throw tr(
|
|
2153
|
+
p,
|
|
2154
|
+
"Failed to execute 'detect' on 'BarcodeDetector'"
|
|
2155
|
+
);
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
pt = new WeakMap();
|
|
2160
|
+
export {
|
|
2161
|
+
Ri as BarcodeDetector,
|
|
2162
|
+
Mi as ZXING_CPP_COMMIT,
|
|
2163
|
+
ji as ZXING_WASM_SHA256,
|
|
2164
|
+
Di as ZXING_WASM_VERSION,
|
|
2165
|
+
rr as prepareZXingModule,
|
|
2166
|
+
Fi as purgeZXingModule,
|
|
2167
|
+
Ii as setZXingModuleOverrides
|
|
2168
|
+
};
|