barcode-detector 3.0.6 → 3.0.8

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