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