barcode-detector 3.0.1 → 3.0.3

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