barcode-detector 2.2.2 → 2.2.3

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