nano-scan 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  typeof define === 'function' && define.amd ? define([], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.NanoScan = factory()));
5
5
  })(this, function() {
6
- "use strict";
7
6
 
8
7
  //#region node_modules/zxing-wasm/dist/es/share.js
9
8
  const m = [
@@ -54,7 +53,7 @@ const M = [
54
53
  function x(e) {
55
54
  return M.indexOf(e);
56
55
  }
57
- const h = [
56
+ const y = [
58
57
  "Unknown",
59
58
  "ASCII",
60
59
  "ISO8859_1",
@@ -92,7 +91,7 @@ const h = [
92
91
  "BINARY"
93
92
  ];
94
93
  function B(e) {
95
- return e === "UnicodeBig" ? h.indexOf("UTF16BE") : h.indexOf(e);
94
+ return e === "UnicodeBig" ? y.indexOf("UTF16BE") : y.indexOf(e);
96
95
  }
97
96
  const F = [
98
97
  "Text",
@@ -152,7 +151,15 @@ function I(e) {
152
151
  characterSet: B(e.characterSet)
153
152
  };
154
153
  }
155
- const y = {
154
+ function P(e) {
155
+ return {
156
+ ...e,
157
+ format: w(e.format),
158
+ contentType: T(e.contentType),
159
+ eccLevel: e.ecLevel
160
+ };
161
+ }
162
+ const h = {
156
163
  format: "QRCode",
157
164
  readerInit: !1,
158
165
  forceSquareDataMatrix: !1,
@@ -161,22 +168,15 @@ const y = {
161
168
  sizeHint: 0,
162
169
  rotate: 0,
163
170
  withHRT: !1,
164
- withQuietZones: !0
171
+ withQuietZones: !0,
172
+ options: ""
165
173
  };
166
- function z(e) {
167
- return {
168
- ...e,
169
- format: w(e.format),
170
- contentType: T(e.contentType),
171
- eccLevel: e.ecLevel
172
- };
173
- }
174
- const H = "2.1.2", N = "a1516b34167cff504bf3c83698ea841e13a8f7f1", W = { locateFile: (e, t) => {
174
+ const H = "2.2.0", N = "0a3797f698b339c1c01c487a7a43f1368610f503", W = { locateFile: (e, t) => {
175
175
  const r = e.match(/_(.+?)\.wasm$/);
176
- return r ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.2/dist/${r[1]}/${e}` : t + e;
176
+ return r ? `https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.0/dist/${r[1]}/${e}` : t + e;
177
177
  } }, f = /* @__PURE__ */ new WeakMap();
178
178
  function D(e, t) {
179
- return Object.is(e, t) || Object.keys(e).length === Object.keys(t).length && Object.keys(e).every((r) => Object.prototype.hasOwnProperty.call(t, r) && e[r] === t[r]);
179
+ return Object.is(e, t) || Object.keys(e).length === Object.keys(t).length && Object.keys(e).every((r) => Object.hasOwn(t, r) && e[r] === t[r]);
180
180
  }
181
181
  function S(e, { overrides: t, equalityFn: r = D, fireImmediately: d = !1 } = {}) {
182
182
  var a;
@@ -208,135 +208,140 @@ async function Z(e, t, r = u) {
208
208
  }
209
209
  o._free(n);
210
210
  const i = [];
211
- for (let a = 0; a < s.size(); ++a) i.push(z(s.get(a)));
211
+ for (let a = 0; a < s.size(); ++a) i.push(P(s.get(a)));
212
212
  return i;
213
213
  }
214
214
  const j = {
215
215
  ...u,
216
216
  formats: [...u.formats]
217
- }, G = { ...y };
217
+ }, G = { ...h };
218
218
 
219
219
  //#endregion
220
220
  //#region node_modules/zxing-wasm/dist/es/reader/index.js
221
221
  var Mr = async function(F$1 = {}) {
222
- var V, c = F$1, xr, yr, $e = new Promise((e, r) => {
222
+ var x$1, gr, l$1 = F$1, xr, yr, we = new Promise((e, r) => {
223
223
  xr = e, yr = r;
224
- }), be = typeof window == "object", we = typeof Bun < "u", mr = typeof WorkerGlobalScope < "u";
225
- typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type;
226
- var Ir = "./this.program", j$1 = "";
227
- function Ce(e) {
228
- return c.locateFile ? c.locateFile(e, j$1) : j$1 + e;
224
+ }), Ce = typeof window == "object", Pe = typeof Bun < "u", Ir = typeof WorkerGlobalScope < "u";
225
+ typeof process == "object" && !((gr = process.versions) === null || gr === void 0) && gr.node && process.type;
226
+ var Ur = "./this.program", Te, mr = "";
227
+ function Ae(e) {
228
+ return l$1.locateFile ? l$1.locateFile(e, mr) : mr + e;
229
229
  }
230
230
  var Vr, $r;
231
- (be || mr || we) && (mr ? j$1 = self.location.href : typeof document < "u" && document.currentScript && (j$1 = document.currentScript.src), j$1.startsWith("blob:") ? j$1 = "" : j$1 = j$1.slice(0, j$1.replace(/[?#].*/, "").lastIndexOf("/") + 1), mr && ($r = (e) => {
232
- var r = new XMLHttpRequest();
233
- return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);
234
- }), Vr = async (e) => {
235
- var r = await fetch(e, { credentials: "same-origin" });
236
- if (r.ok) return r.arrayBuffer();
237
- throw new Error(r.status + " : " + r.url);
238
- });
239
- var Ur = console.log.bind(console), z$1 = console.error.bind(console), Y, ir, Hr = !1, U$1, E$1, K, ar, G$1, $, Br, Nr;
240
- function Zr() {
241
- var e = ir.buffer;
242
- U$1 = new Int8Array(e), K = new Int16Array(e), c.HEAPU8 = E$1 = new Uint8Array(e), ar = new Uint16Array(e), G$1 = new Int32Array(e), $ = new Uint32Array(e), Br = new Float32Array(e), Nr = new Float64Array(e);
231
+ if (Ce || Ir || Pe) {
232
+ try {
233
+ mr = new URL(".", Te).href;
234
+ } catch {}
235
+ Ir && ($r = (e) => {
236
+ var r = new XMLHttpRequest();
237
+ return r.open("GET", e, !1), r.responseType = "arraybuffer", r.send(null), new Uint8Array(r.response);
238
+ }), Vr = async (e) => {
239
+ var r = await fetch(e, { credentials: "same-origin" });
240
+ if (r.ok) return r.arrayBuffer();
241
+ throw new Error(r.status + " : " + r.url);
242
+ };
243
+ }
244
+ var Hr = console.log.bind(console), Z$1 = console.error.bind(console), Y, nr, Br = !1, I$1, E$1, ir, z, L$1, $, Nr, Zr;
245
+ function zr() {
246
+ var e = nr.buffer;
247
+ I$1 = new Int8Array(e), ir = new Int16Array(e), l$1.HEAPU8 = E$1 = new Uint8Array(e), z = new Uint16Array(e), L$1 = new Int32Array(e), $ = new Uint32Array(e), Nr = new Float32Array(e), Zr = new Float64Array(e);
243
248
  }
244
- function Pe() {
245
- if (c.preRun) for (typeof c.preRun == "function" && (c.preRun = [c.preRun]); c.preRun.length;) xe(c.preRun.shift());
246
- zr(Lr);
249
+ function Re() {
250
+ if (l$1.preRun) for (typeof l$1.preRun == "function" && (l$1.preRun = [l$1.preRun]); l$1.preRun.length;) Ve(l$1.preRun.shift());
251
+ Lr(Xr);
247
252
  }
248
- function Te() {
253
+ function Fe() {
249
254
  b$1.ya();
250
255
  }
251
- function Ae() {
252
- if (c.postRun) for (typeof c.postRun == "function" && (c.postRun = [c.postRun]); c.postRun.length;) Me(c.postRun.shift());
253
- zr(Gr);
256
+ function ke() {
257
+ if (l$1.postRun) for (typeof l$1.postRun == "function" && (l$1.postRun = [l$1.postRun]); l$1.postRun.length;) Ue(l$1.postRun.shift());
258
+ Lr(Gr);
254
259
  }
255
- var H$1 = 0, J = null;
256
- function Re(e) {
260
+ var U$1 = 0, K = null;
261
+ function Ee(e) {
257
262
  var r;
258
- H$1++, (r = c.monitorRunDependencies) === null || r === void 0 || r.call(c, H$1);
263
+ U$1++, (r = l$1.monitorRunDependencies) === null || r === void 0 || r.call(l$1, U$1);
259
264
  }
260
- function Fe(e) {
265
+ function Se(e) {
261
266
  var r;
262
- if (H$1--, (r = c.monitorRunDependencies) === null || r === void 0 || r.call(c, H$1), H$1 == 0 && J) {
263
- var t = J;
264
- J = null, t();
267
+ if (U$1--, (r = l$1.monitorRunDependencies) === null || r === void 0 || r.call(l$1, U$1), U$1 == 0 && K) {
268
+ var t = K;
269
+ K = null, t();
265
270
  }
266
271
  }
267
272
  function br(e) {
268
273
  var r;
269
- (r = c.onAbort) === null || r === void 0 || r.call(c, e), e = "Aborted(" + e + ")", z$1(e), Hr = !0, e += ". Build with -sASSERTIONS for more info.";
274
+ (r = l$1.onAbort) === null || r === void 0 || r.call(l$1, e), e = "Aborted(" + e + ")", Z$1(e), Br = !0, e += ". Build with -sASSERTIONS for more info.";
270
275
  var t = new WebAssembly.RuntimeError(e);
271
276
  throw yr(t), t;
272
277
  }
273
- var L$1;
274
- function Ee() {
275
- return Ce("zxing_reader.wasm");
278
+ var G$1;
279
+ function je() {
280
+ return Ae("zxing_reader.wasm");
276
281
  }
277
- function ke(e) {
278
- if (e == L$1 && Y) return new Uint8Array(Y);
282
+ function Oe(e) {
283
+ if (e == G$1 && Y) return new Uint8Array(Y);
279
284
  if ($r) return $r(e);
280
285
  throw "both async and sync fetching of the wasm failed";
281
286
  }
282
- async function Se(e) {
287
+ async function De(e) {
283
288
  if (!Y) try {
284
289
  var r = await Vr(e);
285
290
  return new Uint8Array(r);
286
291
  } catch {}
287
- return ke(e);
292
+ return Oe(e);
288
293
  }
289
- async function Oe(e, r) {
294
+ async function We(e, r) {
290
295
  try {
291
- var t = await Se(e), n = await WebAssembly.instantiate(t, r);
296
+ var t = await De(e), n = await WebAssembly.instantiate(t, r);
292
297
  return n;
293
298
  } catch (i) {
294
- z$1(`failed to asynchronously prepare wasm: ${i}`), br(i);
299
+ Z$1(`failed to asynchronously prepare wasm: ${i}`), br(i);
295
300
  }
296
301
  }
297
- async function je(e, r, t) {
302
+ async function Me(e, r, t) {
298
303
  if (!e && typeof WebAssembly.instantiateStreaming == "function") try {
299
304
  var n = fetch(r, { credentials: "same-origin" }), i = await WebAssembly.instantiateStreaming(n, t);
300
305
  return i;
301
306
  } catch (a) {
302
- z$1(`wasm streaming compile failed: ${a}`), z$1("falling back to ArrayBuffer instantiation");
307
+ Z$1(`wasm streaming compile failed: ${a}`), Z$1("falling back to ArrayBuffer instantiation");
303
308
  }
304
- return Oe(r, t);
309
+ return We(r, t);
305
310
  }
306
- function De() {
307
- return { a: mn };
311
+ function xe() {
312
+ return { a: $n };
308
313
  }
309
- async function We() {
314
+ async function Ie() {
310
315
  function e(a, s) {
311
- return b$1 = a.exports, ir = b$1.xa, Zr(), ne = b$1.Ba, Fe(), b$1;
316
+ return b$1 = a.exports, nr = b$1.xa, zr(), ie = b$1.Ba, Se(), b$1;
312
317
  }
313
- Re();
318
+ Ee();
314
319
  function r(a) {
315
320
  return e(a.instance);
316
321
  }
317
- var t = De();
318
- if (c.instantiateWasm) return new Promise((a, s) => {
319
- c.instantiateWasm(t, (o, u$1) => {
322
+ var t = xe();
323
+ if (l$1.instantiateWasm) return new Promise((a, s) => {
324
+ l$1.instantiateWasm(t, (o, u$1) => {
320
325
  a(e(o));
321
326
  });
322
327
  });
323
- L$1 ??= Ee();
328
+ G$1 ??= je();
324
329
  try {
325
- var n = await je(Y, L$1, t), i = r(n);
330
+ var n = await Me(Y, G$1, t), i = r(n);
326
331
  return i;
327
332
  } catch (a) {
328
333
  return yr(a), Promise.reject(a);
329
334
  }
330
335
  }
331
- var zr = (e) => {
332
- for (; e.length > 0;) e.shift()(c);
333
- }, Gr = [], Me = (e) => Gr.push(e), Lr = [], xe = (e) => Lr.push(e), p$1 = (e) => Cn(e), h$1 = () => Pn(), or = [], sr = 0, Ie = (e) => {
336
+ var Lr = (e) => {
337
+ for (; e.length > 0;) e.shift()(l$1);
338
+ }, Gr = [], Ue = (e) => Gr.push(e), Xr = [], Ve = (e) => Xr.push(e), p$1 = (e) => Pn(e), h$1 = () => Tn(), ar = [], or = 0, He = (e) => {
334
339
  var r = new wr(e);
335
- return r.get_caught() || (r.set_caught(!0), sr--), r.set_rethrown(!1), or.push(r), An(e), bn(e);
336
- }, D$1 = 0, Ve = () => {
340
+ return r.get_caught() || (r.set_caught(!0), or--), r.set_rethrown(!1), ar.push(r), Rn(e), wn(e);
341
+ }, O$1 = 0, Be = () => {
337
342
  d(0, 0);
338
- var e = or.pop();
339
- Tn(e.excPtr), D$1 = 0;
343
+ var e = ar.pop();
344
+ An(e.excPtr), O$1 = 0;
340
345
  };
341
346
  class wr {
342
347
  constructor(r) {
@@ -355,16 +360,16 @@ var Mr = async function(F$1 = {}) {
355
360
  return $[this.ptr + 8 >> 2];
356
361
  }
357
362
  set_caught(r) {
358
- r = r ? 1 : 0, U$1[this.ptr + 12] = r;
363
+ r = r ? 1 : 0, I$1[this.ptr + 12] = r;
359
364
  }
360
365
  get_caught() {
361
- return U$1[this.ptr + 12] != 0;
366
+ return I$1[this.ptr + 12] != 0;
362
367
  }
363
368
  set_rethrown(r) {
364
- r = r ? 1 : 0, U$1[this.ptr + 13] = r;
369
+ r = r ? 1 : 0, I$1[this.ptr + 13] = r;
365
370
  }
366
371
  get_rethrown() {
367
- return U$1[this.ptr + 13] != 0;
372
+ return I$1[this.ptr + 13] != 0;
368
373
  }
369
374
  init(r, t) {
370
375
  this.set_adjusted_ptr(0), this.set_type(r), this.set_destructor(t);
@@ -376,70 +381,70 @@ var Mr = async function(F$1 = {}) {
376
381
  return $[this.ptr + 16 >> 2];
377
382
  }
378
383
  }
379
- var ur = (e) => wn(e), Cr = (e) => {
380
- var r = D$1;
381
- if (!r) return ur(0), 0;
384
+ var sr = (e) => Cn(e), Cr = (e) => {
385
+ var r = O$1;
386
+ if (!r) return sr(0), 0;
382
387
  var t = new wr(r);
383
388
  t.set_adjusted_ptr(r);
384
389
  var n = t.get_type();
385
- if (!n) return ur(0), r;
390
+ if (!n) return sr(0), r;
386
391
  for (var i of e) {
387
392
  if (i === 0 || i === n) break;
388
393
  var a = t.ptr + 16;
389
- if (Rn(i, n, a)) return ur(i), r;
394
+ if (Fn(i, n, a)) return sr(i), r;
390
395
  }
391
- return ur(n), r;
392
- }, Ue = () => Cr([]), He = (e) => Cr([e]), Be = (e, r) => Cr([e, r]), Ne = () => {
393
- var e = or.pop();
396
+ return sr(n), r;
397
+ }, Ne = () => Cr([]), Ze = (e) => Cr([e]), ze = (e, r) => Cr([e, r]), Le = () => {
398
+ var e = ar.pop();
394
399
  e || br("no exception to throw");
395
400
  var r = e.excPtr;
396
- throw e.get_rethrown() || (or.push(e), e.set_rethrown(!0), e.set_caught(!1), sr++), D$1 = r, D$1;
397
- }, Ze = (e, r, t) => {
401
+ throw e.get_rethrown() || (ar.push(e), e.set_rethrown(!0), e.set_caught(!1), or++), O$1 = r, O$1;
402
+ }, Ge = (e, r, t) => {
398
403
  var n = new wr(e);
399
- throw n.init(r, t), D$1 = e, sr++, D$1;
400
- }, ze = () => sr, Ge = (e) => {
401
- throw D$1 || (D$1 = e), D$1;
402
- }, Le = () => br(""), fr = {}, Pr = (e) => {
404
+ throw n.init(r, t), O$1 = e, or++, O$1;
405
+ }, Xe = () => or, qe = (e) => {
406
+ throw O$1 || (O$1 = e), O$1;
407
+ }, Ye = () => br(""), ur = {}, Pr = (e) => {
403
408
  for (; e.length;) {
404
409
  var r = e.pop(), t = e.pop();
405
410
  t(r);
406
411
  }
407
412
  };
408
- function Q(e) {
413
+ function J(e) {
409
414
  return this.fromWireType($[e >> 2]);
410
415
  }
411
- var X = {}, B$1 = {}, lr = {}, Xe = c.InternalError = class extends Error {
416
+ var X = {}, V = {}, fr = {}, Ke = class extends Error {
412
417
  constructor(r) {
413
418
  super(r), this.name = "InternalError";
414
419
  }
415
- }, cr = (e) => {
416
- throw new Xe(e);
417
- }, N$1 = (e, r, t) => {
418
- e.forEach((o) => lr[o] = r);
420
+ }, lr = (e) => {
421
+ throw new Ke(e);
422
+ }, H$1 = (e, r, t) => {
423
+ e.forEach((o) => fr[o] = r);
419
424
  function n(o) {
420
425
  var u$1 = t(o);
421
- u$1.length !== e.length && cr("Mismatched type converter count");
422
- for (var f$1 = 0; f$1 < e.length; ++f$1) O$1(e[f$1], u$1[f$1]);
426
+ u$1.length !== e.length && lr("Mismatched type converter count");
427
+ for (var f$1 = 0; f$1 < e.length; ++f$1) j$1(e[f$1], u$1[f$1]);
423
428
  }
424
429
  var i = new Array(r.length), a = [], s = 0;
425
430
  r.forEach((o, u$1) => {
426
- B$1.hasOwnProperty(o) ? i[u$1] = B$1[o] : (a.push(o), X.hasOwnProperty(o) || (X[o] = []), X[o].push(() => {
427
- i[u$1] = B$1[o], ++s, s === a.length && n(i);
431
+ V.hasOwnProperty(o) ? i[u$1] = V[o] : (a.push(o), X.hasOwnProperty(o) || (X[o] = []), X[o].push(() => {
432
+ i[u$1] = V[o], ++s, s === a.length && n(i);
428
433
  }));
429
434
  }), a.length === 0 && n(i);
430
- }, qe = (e) => {
431
- var r = fr[e];
432
- delete fr[e];
435
+ }, Je = (e) => {
436
+ var r = ur[e];
437
+ delete ur[e];
433
438
  var t = r.rawConstructor, n = r.rawDestructor, i = r.fields, a = i.map((s) => s.getterReturnType).concat(i.map((s) => s.setterArgumentType));
434
- N$1([e], a, (s) => {
439
+ H$1([e], a, (s) => {
435
440
  var o = {};
436
441
  return i.forEach((u$1, f$1) => {
437
- var l$1 = u$1.fieldName, v = s[f$1], g = s[f$1].optional, y$1 = u$1.getter, w$1 = u$1.getterContext, P = s[f$1 + i.length], C = u$1.setter, T$1 = u$1.setterContext;
438
- o[l$1] = {
439
- read: (I$1) => v.fromWireType(y$1(w$1, I$1)),
440
- write: (I$1, R$1) => {
442
+ var c = u$1.fieldName, v$1 = s[f$1], g = s[f$1].optional, y$1 = u$1.getter, w$1 = u$1.getterContext, P$1 = s[f$1 + i.length], C = u$1.setter, T$1 = u$1.setterContext;
443
+ o[c] = {
444
+ read: (M$1) => v$1.fromWireType(y$1(w$1, M$1)),
445
+ write: (M$1, R$1) => {
441
446
  var k = [];
442
- C(T$1, I$1, P.toWireType(k, R$1)), Pr(k);
447
+ C(T$1, M$1, P$1.toWireType(k, R$1)), Pr(k);
443
448
  },
444
449
  optional: g
445
450
  };
@@ -447,51 +452,51 @@ var Mr = async function(F$1 = {}) {
447
452
  name: r.name,
448
453
  fromWireType: (u$1) => {
449
454
  var f$1 = {};
450
- for (var l$1 in o) f$1[l$1] = o[l$1].read(u$1);
455
+ for (var c in o) f$1[c] = o[c].read(u$1);
451
456
  return n(u$1), f$1;
452
457
  },
453
458
  toWireType: (u$1, f$1) => {
454
- for (var l$1 in o) if (!(l$1 in f$1) && !o[l$1].optional) throw new TypeError(`Missing field: "${l$1}"`);
455
- var v = t();
456
- for (l$1 in o) o[l$1].write(v, f$1[l$1]);
457
- return u$1 !== null && u$1.push(n, v), v;
459
+ for (var c in o) if (!(c in f$1) && !o[c].optional) throw new TypeError(`Missing field: "${c}"`);
460
+ var v$1 = t();
461
+ for (c in o) o[c].write(v$1, f$1[c]);
462
+ return u$1 !== null && u$1.push(n, v$1), v$1;
458
463
  },
459
- argPackAdvance: W$1,
460
- readValueFromPointer: Q,
464
+ argPackAdvance: D$1,
465
+ readValueFromPointer: J,
461
466
  destructorFunction: n
462
467
  }];
463
468
  });
464
- }, Ye = (e, r, t, n, i) => {}, Ke = () => {
469
+ }, Qe = (e, r, t, n, i) => {}, rt = () => {
465
470
  for (var e = new Array(256), r = 0; r < 256; ++r) e[r] = String.fromCharCode(r);
466
- Xr = e;
467
- }, Xr, A$1 = (e) => {
468
- for (var r = "", t = e; E$1[t];) r += Xr[E$1[t++]];
471
+ qr = e;
472
+ }, qr, A$1 = (e) => {
473
+ for (var r = "", t = e; E$1[t];) r += qr[E$1[t++]];
469
474
  return r;
470
- }, rr = c.BindingError = class extends Error {
475
+ }, Q = class extends Error {
471
476
  constructor(r) {
472
477
  super(r), this.name = "BindingError";
473
478
  }
474
479
  }, m$1 = (e) => {
475
- throw new rr(e);
480
+ throw new Q(e);
476
481
  };
477
- function Je(e, r) {
482
+ function et(e, r) {
478
483
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
479
484
  var n = r.name;
480
- if (e || m$1(`type "${n}" must have a positive integer typeid pointer`), B$1.hasOwnProperty(e)) {
485
+ if (e || m$1(`type "${n}" must have a positive integer typeid pointer`), V.hasOwnProperty(e)) {
481
486
  if (t.ignoreDuplicateRegistrations) return;
482
487
  m$1(`Cannot register type '${n}' twice`);
483
488
  }
484
- if (B$1[e] = r, delete lr[e], X.hasOwnProperty(e)) {
489
+ if (V[e] = r, delete fr[e], X.hasOwnProperty(e)) {
485
490
  var i = X[e];
486
491
  delete X[e], i.forEach((a) => a());
487
492
  }
488
493
  }
489
- function O$1(e, r) {
494
+ function j$1(e, r) {
490
495
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
491
- return Je(e, r, t);
496
+ return et(e, r, t);
492
497
  }
493
- var W$1 = 8, Qe = (e, r, t, n) => {
494
- r = A$1(r), O$1(e, {
498
+ var D$1 = 8, tt = (e, r, t, n) => {
499
+ r = A$1(r), j$1(e, {
495
500
  name: r,
496
501
  fromWireType: function(i) {
497
502
  return !!i;
@@ -499,13 +504,13 @@ var Mr = async function(F$1 = {}) {
499
504
  toWireType: function(i, a) {
500
505
  return a ? t : n;
501
506
  },
502
- argPackAdvance: W$1,
507
+ argPackAdvance: D$1,
503
508
  readValueFromPointer: function(i) {
504
509
  return this.fromWireType(E$1[i]);
505
510
  },
506
511
  destructorFunction: null
507
512
  });
508
- }, rt = (e) => ({
513
+ }, nt = (e) => ({
509
514
  count: e.count,
510
515
  deleteScheduled: e.deleteScheduled,
511
516
  preservePointerOnDelete: e.preservePointerOnDelete,
@@ -518,26 +523,26 @@ var Mr = async function(F$1 = {}) {
518
523
  return t.$$.ptrType.registeredClass.name;
519
524
  }
520
525
  m$1(r(e) + " instance already deleted");
521
- }, Ar = !1, qr = (e) => {}, et = (e) => {
526
+ }, Ar = !1, Yr = (e) => {}, it = (e) => {
522
527
  e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
523
- }, Yr = (e) => {
528
+ }, Kr = (e) => {
524
529
  e.count.value -= 1;
525
530
  var r = e.count.value === 0;
526
- r && et(e);
527
- }, er = (e) => typeof FinalizationRegistry > "u" ? (er = (r) => r, e) : (Ar = new FinalizationRegistry((r) => {
528
- Yr(r.$$);
529
- }), er = (r) => {
531
+ r && it(e);
532
+ }, rr = (e) => typeof FinalizationRegistry > "u" ? (rr = (r) => r, e) : (Ar = new FinalizationRegistry((r) => {
533
+ Kr(r.$$);
534
+ }), rr = (r) => {
530
535
  var t = r.$$, n = !!t.smartPtr;
531
536
  if (n) {
532
537
  var i = { $$: t };
533
538
  Ar.register(r, i, r);
534
539
  }
535
540
  return r;
536
- }, qr = (r) => Ar.unregister(r), er(e)), tt = () => {
537
- let e = vr.prototype;
541
+ }, Yr = (r) => Ar.unregister(r), rr(e)), at = () => {
542
+ let e = cr.prototype;
538
543
  Object.assign(e, {
539
544
  isAliasOf(t) {
540
- if (!(this instanceof vr) || !(t instanceof vr)) return !1;
545
+ if (!(this instanceof cr) || !(t instanceof cr)) return !1;
541
546
  var n = this.$$.ptrType.registeredClass, i = this.$$.ptr;
542
547
  t.$$ = t.$$;
543
548
  for (var a = t.$$.ptrType.registeredClass, s = t.$$.ptr; n.baseClass;) i = n.upcast(i), n = n.baseClass;
@@ -546,11 +551,11 @@ var Mr = async function(F$1 = {}) {
546
551
  },
547
552
  clone() {
548
553
  if (this.$$.ptr || Tr(this), this.$$.preservePointerOnDelete) return this.$$.count.value += 1, this;
549
- var t = er(Object.create(Object.getPrototypeOf(this), { $$: { value: rt(this.$$) } }));
554
+ var t = rr(Object.create(Object.getPrototypeOf(this), { $$: { value: nt(this.$$) } }));
550
555
  return t.$$.count.value += 1, t.$$.deleteScheduled = !1, t;
551
556
  },
552
557
  delete() {
553
- this.$$.ptr || Tr(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m$1("Object already scheduled for deletion"), qr(this), Yr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
558
+ this.$$.ptr || Tr(this), this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && m$1("Object already scheduled for deletion"), Yr(this), Kr(this.$$), this.$$.preservePointerOnDelete || (this.$$.smartPtr = void 0, this.$$.ptr = void 0);
554
559
  },
555
560
  isDeleted() {
556
561
  return !this.$$.ptr;
@@ -562,8 +567,8 @@ var Mr = async function(F$1 = {}) {
562
567
  const r = Symbol.dispose;
563
568
  r && (e[r] = e.delete);
564
569
  };
565
- function vr() {}
566
- var Rr = (e, r) => Object.defineProperty(r, "name", { value: e }), Kr = {}, Jr = (e, r, t) => {
570
+ function cr() {}
571
+ var Rr = (e, r) => Object.defineProperty(r, "name", { value: e }), Jr = {}, Qr = (e, r, t) => {
567
572
  if (e[r].overloadTable === void 0) {
568
573
  var n = e[r];
569
574
  e[r] = function() {
@@ -571,30 +576,34 @@ var Mr = async function(F$1 = {}) {
571
576
  return e[r].overloadTable.hasOwnProperty(a.length) || m$1(`Function '${t}' called with an invalid number of arguments (${a.length}) - expects one of (${e[r].overloadTable})!`), e[r].overloadTable[a.length].apply(this, a);
572
577
  }, e[r].overloadTable = [], e[r].overloadTable[n.argCount] = n;
573
578
  }
574
- }, Qr = (e, r, t) => {
575
- c.hasOwnProperty(e) ? ((t === void 0 || c[e].overloadTable !== void 0 && c[e].overloadTable[t] !== void 0) && m$1(`Cannot register public name '${e}' twice`), Jr(c, e, e), c[e].overloadTable.hasOwnProperty(t) && m$1(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`), c[e].overloadTable[t] = r) : (c[e] = r, c[e].argCount = t);
576
- }, nt = 48, it = 57, at = (e) => {
579
+ }, re = (e, r, t) => {
580
+ l$1.hasOwnProperty(e) ? ((t === void 0 || l$1[e].overloadTable !== void 0 && l$1[e].overloadTable[t] !== void 0) && m$1(`Cannot register public name '${e}' twice`), Qr(l$1, e, e), l$1[e].overloadTable.hasOwnProperty(t) && m$1(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`), l$1[e].overloadTable[t] = r) : (l$1[e] = r, l$1[e].argCount = t);
581
+ }, ot = 48, st = 57, ut = (e) => {
577
582
  e = e.replace(/[^a-zA-Z0-9_]/g, "$");
578
583
  var r = e.charCodeAt(0);
579
- return r >= nt && r <= it ? `_${e}` : e;
584
+ return r >= ot && r <= st ? `_${e}` : e;
580
585
  };
581
- function ot(e, r, t, n, i, a, s, o) {
586
+ function ft(e, r, t, n, i, a, s, o) {
582
587
  this.name = e, this.constructor = r, this.instancePrototype = t, this.rawDestructor = n, this.baseClass = i, this.getActualType = a, this.upcast = s, this.downcast = o, this.pureVirtualFunctions = [];
583
588
  }
584
589
  var Fr = (e, r, t) => {
585
590
  for (; r !== t;) r.upcast || m$1(`Expected null or instance of ${t.name}, got an instance of ${r.name}`), e = r.upcast(e), r = r.baseClass;
586
591
  return e;
592
+ }, kr = (e) => {
593
+ if (e === null) return "null";
594
+ var r = typeof e;
595
+ return r === "object" || r === "array" || r === "function" ? e.toString() : "" + e;
587
596
  };
588
- function st(e, r) {
597
+ function lt(e, r) {
589
598
  if (r === null) return this.isReference && m$1(`null is not a valid ${this.name}`), 0;
590
- r.$$ || m$1(`Cannot pass "${embindRepr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`);
599
+ r.$$ || m$1(`Cannot pass "${kr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`);
591
600
  var t = r.$$.ptrType.registeredClass, n = Fr(r.$$.ptr, t, this.registeredClass);
592
601
  return n;
593
602
  }
594
- function ut(e, r) {
603
+ function ct(e, r) {
595
604
  var t;
596
605
  if (r === null) return this.isReference && m$1(`null is not a valid ${this.name}`), this.isSmartPointer ? (t = this.rawConstructor(), e !== null && e.push(this.rawDestructor, t), t) : 0;
597
- (!r || !r.$$) && m$1(`Cannot pass "${embindRepr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name} to parameter type ${this.name}`);
606
+ (!r || !r.$$) && m$1(`Cannot pass "${kr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), !this.isConst && r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.smartPtrType ? r.$$.smartPtrType.name : r.$$.ptrType.name} to parameter type ${this.name}`);
598
607
  var n = r.$$.ptrType.registeredClass;
599
608
  if (t = Fr(r.$$.ptr, n, this.registeredClass), this.isSmartPointer) switch (r.$$.smartPtr === void 0 && m$1("Passing raw pointer to smart pointer is illegal"), this.sharingPolicy) {
600
609
  case 0:
@@ -607,72 +616,72 @@ var Mr = async function(F$1 = {}) {
607
616
  if (r.$$.smartPtrType === this) t = r.$$.smartPtr;
608
617
  else {
609
618
  var i = r.clone();
610
- t = this.rawShare(t, x$1.toHandle(() => i.delete())), e !== null && e.push(this.rawDestructor, t);
619
+ t = this.rawShare(t, W$1.toHandle(() => i.delete())), e !== null && e.push(this.rawDestructor, t);
611
620
  }
612
621
  break;
613
622
  default: m$1("Unsupporting sharing policy");
614
623
  }
615
624
  return t;
616
625
  }
617
- function ft(e, r) {
626
+ function vt(e, r) {
618
627
  if (r === null) return this.isReference && m$1(`null is not a valid ${this.name}`), 0;
619
- r.$$ || m$1(`Cannot pass "${embindRepr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);
628
+ r.$$ || m$1(`Cannot pass "${kr(r)}" as a ${this.name}`), r.$$.ptr || m$1(`Cannot pass deleted object as a pointer of type ${this.name}`), r.$$.ptrType.isConst && m$1(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);
620
629
  var t = r.$$.ptrType.registeredClass, n = Fr(r.$$.ptr, t, this.registeredClass);
621
630
  return n;
622
631
  }
623
- var re = (e, r, t) => {
632
+ var ee = (e, r, t) => {
624
633
  if (r === t) return e;
625
634
  if (t.baseClass === void 0) return null;
626
- var n = re(e, r, t.baseClass);
635
+ var n = ee(e, r, t.baseClass);
627
636
  return n === null ? null : t.downcast(n);
628
- }, lt = {}, ct = (e, r) => {
637
+ }, dt = {}, pt = (e, r) => {
629
638
  for (r === void 0 && m$1("ptr should not be undefined"); e.baseClass;) r = e.upcast(r), e = e.baseClass;
630
639
  return r;
631
- }, vt = (e, r) => (r = ct(e, r), lt[r]), dr = (e, r) => {
632
- (!r.ptrType || !r.ptr) && cr("makeClassHandle requires ptr and ptrType");
640
+ }, ht = (e, r) => (r = pt(e, r), dt[r]), vr = (e, r) => {
641
+ (!r.ptrType || !r.ptr) && lr("makeClassHandle requires ptr and ptrType");
633
642
  var t = !!r.smartPtrType, n = !!r.smartPtr;
634
- return t !== n && cr("Both smartPtrType and smartPtr must be specified"), r.count = { value: 1 }, er(Object.create(e, { $$: {
643
+ return t !== n && lr("Both smartPtrType and smartPtr must be specified"), r.count = { value: 1 }, rr(Object.create(e, { $$: {
635
644
  value: r,
636
645
  writable: !0
637
646
  } }));
638
647
  };
639
- function dt(e) {
648
+ function _t(e) {
640
649
  var r = this.getPointee(e);
641
650
  if (!r) return this.destructor(e), null;
642
- var t = vt(this.registeredClass, r);
651
+ var t = ht(this.registeredClass, r);
643
652
  if (t !== void 0) {
644
653
  if (t.$$.count.value === 0) return t.$$.ptr = r, t.$$.smartPtr = e, t.clone();
645
654
  var n = t.clone();
646
655
  return this.destructor(e), n;
647
656
  }
648
657
  function i() {
649
- return this.isSmartPointer ? dr(this.registeredClass.instancePrototype, {
658
+ return this.isSmartPointer ? vr(this.registeredClass.instancePrototype, {
650
659
  ptrType: this.pointeeType,
651
660
  ptr: r,
652
661
  smartPtrType: this,
653
662
  smartPtr: e
654
- }) : dr(this.registeredClass.instancePrototype, {
663
+ }) : vr(this.registeredClass.instancePrototype, {
655
664
  ptrType: this,
656
665
  ptr: e
657
666
  });
658
667
  }
659
- var a = this.registeredClass.getActualType(r), s = Kr[a];
668
+ var a = this.registeredClass.getActualType(r), s = Jr[a];
660
669
  if (!s) return i.call(this);
661
670
  var o;
662
671
  this.isConst ? o = s.constPointerType : o = s.pointerType;
663
- var u$1 = re(r, this.registeredClass, o.registeredClass);
664
- return u$1 === null ? i.call(this) : this.isSmartPointer ? dr(o.registeredClass.instancePrototype, {
672
+ var u$1 = ee(r, this.registeredClass, o.registeredClass);
673
+ return u$1 === null ? i.call(this) : this.isSmartPointer ? vr(o.registeredClass.instancePrototype, {
665
674
  ptrType: o,
666
675
  ptr: u$1,
667
676
  smartPtrType: this,
668
677
  smartPtr: e
669
- }) : dr(o.registeredClass.instancePrototype, {
678
+ }) : vr(o.registeredClass.instancePrototype, {
670
679
  ptrType: o,
671
680
  ptr: u$1
672
681
  });
673
682
  }
674
- var pt = () => {
675
- Object.assign(pr.prototype, {
683
+ var gt = () => {
684
+ Object.assign(dr.prototype, {
676
685
  getPointee(e) {
677
686
  return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
678
687
  },
@@ -680,157 +689,169 @@ var Mr = async function(F$1 = {}) {
680
689
  var r;
681
690
  (r = this.rawDestructor) === null || r === void 0 || r.call(this, e);
682
691
  },
683
- argPackAdvance: W$1,
684
- readValueFromPointer: Q,
685
- fromWireType: dt
692
+ argPackAdvance: D$1,
693
+ readValueFromPointer: J,
694
+ fromWireType: _t
686
695
  });
687
696
  };
688
- function pr(e, r, t, n, i, a, s, o, u$1, f$1, l$1) {
689
- this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = u$1, this.rawShare = f$1, this.rawDestructor = l$1, !i && r.baseClass === void 0 ? n ? (this.toWireType = st, this.destructorFunction = null) : (this.toWireType = ft, this.destructorFunction = null) : this.toWireType = ut;
690
- }
691
- var ee = (e, r, t) => {
692
- c.hasOwnProperty(e) || cr("Replacing nonexistent public symbol"), c[e].overloadTable !== void 0 && t !== void 0 ? c[e].overloadTable[t] = r : (c[e] = r, c[e].argCount = t);
693
- }, te = [], ne, _ = (e) => {
694
- var r = te[e];
695
- return r || (te[e] = r = ne.get(e)), r;
696
- }, ht = function(e, r) {
697
+ function dr(e, r, t, n, i, a, s, o, u$1, f$1, c) {
698
+ this.name = e, this.registeredClass = r, this.isReference = t, this.isConst = n, this.isSmartPointer = i, this.pointeeType = a, this.sharingPolicy = s, this.rawGetPointee = o, this.rawConstructor = u$1, this.rawShare = f$1, this.rawDestructor = c, !i && r.baseClass === void 0 ? n ? (this.toWireType = lt, this.destructorFunction = null) : (this.toWireType = vt, this.destructorFunction = null) : this.toWireType = ct;
699
+ }
700
+ var te = (e, r, t) => {
701
+ l$1.hasOwnProperty(e) || lr("Replacing nonexistent public symbol"), l$1[e].overloadTable !== void 0 && t !== void 0 ? l$1[e].overloadTable[t] = r : (l$1[e] = r, l$1[e].argCount = t);
702
+ }, ne = [], ie, _ = (e) => {
703
+ var r = ne[e];
704
+ return r || (ne[e] = r = ie.get(e)), r;
705
+ }, yt = function(e, r) {
697
706
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
698
707
  if (e.includes("j")) return dynCallLegacy(e, r, t);
699
708
  var n = _(r), i = n(...t);
709
+ function a(s) {
710
+ return s;
711
+ }
700
712
  return i;
701
- }, _t = function(e, r) {
713
+ }, mt = function(e, r) {
702
714
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
703
715
  return function() {
704
716
  for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++) i[a] = arguments[a];
705
- return ht(e, r, i, t);
717
+ return yt(e, r, i, t);
706
718
  };
707
719
  }, S$1 = function(e, r) {
708
720
  e = A$1(e);
709
721
  function t() {
710
- if (e.includes("j")) return _t(e, r);
722
+ if (e.includes("j")) return mt(e, r);
711
723
  var i = _(r);
712
724
  return i;
713
725
  }
714
726
  var n = t();
715
727
  return typeof n != "function" && m$1(`unknown function pointer with signature ${e}: ${r}`), n;
716
728
  };
717
- class gt extends Error {}
718
- var ie = (e) => {
719
- var r = $n(e), t = A$1(r);
720
- return Z$1(r), t;
721
- }, hr = (e, r) => {
729
+ class $t extends Error {}
730
+ var ae = (e) => {
731
+ var r = bn(e), t = A$1(r);
732
+ return N$1(r), t;
733
+ }, pr = (e, r) => {
722
734
  var t = [], n = {};
723
735
  function i(a) {
724
- if (!n[a] && !B$1[a]) {
725
- if (lr[a]) {
726
- lr[a].forEach(i);
736
+ if (!n[a] && !V[a]) {
737
+ if (fr[a]) {
738
+ fr[a].forEach(i);
727
739
  return;
728
740
  }
729
741
  t.push(a), n[a] = !0;
730
742
  }
731
743
  }
732
- throw r.forEach(i), new gt(`${e}: ` + t.map(ie).join([", "]));
733
- }, yt = (e, r, t, n, i, a, s, o, u$1, f$1, l$1, v, g) => {
734
- l$1 = A$1(l$1), a = S$1(i, a), o && (o = S$1(s, o)), f$1 && (f$1 = S$1(u$1, f$1)), g = S$1(v, g);
735
- var y$1 = at(l$1);
736
- Qr(y$1, function() {
737
- hr(`Cannot construct ${l$1} due to unbound types`, [n]);
738
- }), N$1([
744
+ throw r.forEach(i), new $t(`${e}: ` + t.map(ae).join([", "]));
745
+ }, bt = (e, r, t, n, i, a, s, o, u$1, f$1, c, v$1, g) => {
746
+ c = A$1(c), a = S$1(i, a), o && (o = S$1(s, o)), f$1 && (f$1 = S$1(u$1, f$1)), g = S$1(v$1, g);
747
+ var y$1 = ut(c);
748
+ re(y$1, function() {
749
+ pr(`Cannot construct ${c} due to unbound types`, [n]);
750
+ }), H$1([
739
751
  e,
740
752
  r,
741
753
  t
742
754
  ], n ? [n] : [], (w$1) => {
743
755
  w$1 = w$1[0];
744
- var P, C;
745
- n ? (P = w$1.registeredClass, C = P.instancePrototype) : C = vr.prototype;
746
- var T$1 = Rr(l$1, function() {
747
- if (Object.getPrototypeOf(this) !== I$1) throw new rr(`Use 'new' to construct ${l$1}`);
748
- if (R$1.constructor_body === void 0) throw new rr(`${l$1} has no accessible constructor`);
749
- for (var _e = arguments.length, _r = new Array(_e), gr = 0; gr < _e; gr++) _r[gr] = arguments[gr];
750
- var ge = R$1.constructor_body[_r.length];
751
- if (ge === void 0) throw new rr(`Tried to invoke ctor of ${l$1} with invalid number of parameters (${_r.length}) - expected (${Object.keys(R$1.constructor_body).toString()}) parameters instead!`);
752
- return ge.apply(this, _r);
753
- }), I$1 = Object.create(C, { constructor: { value: T$1 } });
754
- T$1.prototype = I$1;
755
- var R$1 = new ot(l$1, T$1, I$1, g, P, a, o, f$1);
756
+ var P$1, C;
757
+ n ? (P$1 = w$1.registeredClass, C = P$1.instancePrototype) : C = cr.prototype;
758
+ var T$1 = Rr(c, function() {
759
+ if (Object.getPrototypeOf(this) !== M$1) throw new Q(`Use 'new' to construct ${c}`);
760
+ if (R$1.constructor_body === void 0) throw new Q(`${c} has no accessible constructor`);
761
+ for (var ye = arguments.length, hr = new Array(ye), _r = 0; _r < ye; _r++) hr[_r] = arguments[_r];
762
+ var me = R$1.constructor_body[hr.length];
763
+ if (me === void 0) throw new Q(`Tried to invoke ctor of ${c} with invalid number of parameters (${hr.length}) - expected (${Object.keys(R$1.constructor_body).toString()}) parameters instead!`);
764
+ return me.apply(this, hr);
765
+ }), M$1 = Object.create(C, { constructor: { value: T$1 } });
766
+ T$1.prototype = M$1;
767
+ var R$1 = new ft(c, T$1, M$1, g, P$1, a, o, f$1);
756
768
  if (R$1.baseClass) {
757
- var k, nr;
758
- (nr = (k = R$1.baseClass).__derivedClasses) !== null && nr !== void 0 || (k.__derivedClasses = []), R$1.baseClass.__derivedClasses.push(R$1);
769
+ var k, tr;
770
+ (tr = (k = R$1.baseClass).__derivedClasses) !== null && tr !== void 0 || (k.__derivedClasses = []), R$1.baseClass.__derivedClasses.push(R$1);
759
771
  }
760
- var vi = new pr(l$1, R$1, !0, !1, !1), pe = new pr(l$1 + "*", R$1, !1, !1, !1), he = new pr(l$1 + " const*", R$1, !1, !0, !1);
761
- return Kr[e] = {
762
- pointerType: pe,
763
- constPointerType: he
764
- }, ee(y$1, T$1), [
765
- vi,
766
- pe,
767
- he
772
+ var di = new dr(c, R$1, !0, !1, !1), _e = new dr(c + "*", R$1, !1, !1, !1), ge = new dr(c + " const*", R$1, !1, !0, !1);
773
+ return Jr[e] = {
774
+ pointerType: _e,
775
+ constPointerType: ge
776
+ }, te(y$1, T$1), [
777
+ di,
778
+ _e,
779
+ ge
768
780
  ];
769
781
  });
770
782
  }, Er = (e, r) => {
771
783
  for (var t = [], n = 0; n < e; n++) t.push($[r + n * 4 >> 2]);
772
784
  return t;
773
785
  };
774
- function mt(e) {
786
+ function wt(e) {
775
787
  for (var r = 1; r < e.length; ++r) if (e[r] !== null && e[r].destructorFunction === void 0) return !0;
776
788
  return !1;
777
789
  }
778
- function kr(e, r, t, n, i, a) {
790
+ function Sr(e, r, t, n, i, a) {
779
791
  var s = r.length;
780
792
  s < 2 && m$1("argTypes array size mismatch! Must at least get return value and 'this' types!");
781
- var o = r[1] !== null && t !== null, u$1 = mt(r), f$1 = r[0].name !== "void", l$1 = s - 2, v = new Array(l$1), g = [], y$1 = [], w$1 = function() {
793
+ var o = r[1] !== null && t !== null, u$1 = wt(r), f$1 = r[0].name !== "void", c = s - 2, v$1 = new Array(c), g = [], y$1 = [], w$1 = function() {
782
794
  y$1.length = 0;
783
- var P;
784
- g.length = o ? 2 : 1, g[0] = i, o && (P = r[1].toWireType(y$1, this), g[1] = P);
785
- for (var C = 0; C < l$1; ++C) v[C] = r[C + 2].toWireType(y$1, C < 0 || arguments.length <= C ? void 0 : arguments[C]), g.push(v[C]);
795
+ var P$1;
796
+ g.length = o ? 2 : 1, g[0] = i, o && (P$1 = r[1].toWireType(y$1, this), g[1] = P$1);
797
+ for (var C = 0; C < c; ++C) v$1[C] = r[C + 2].toWireType(y$1, C < 0 || arguments.length <= C ? void 0 : arguments[C]), g.push(v$1[C]);
786
798
  var T$1 = n(...g);
787
- function I$1(R$1) {
799
+ function M$1(R$1) {
788
800
  if (u$1) Pr(y$1);
789
801
  else for (var k = o ? 1 : 2; k < r.length; k++) {
790
- var nr = k === 1 ? P : v[k - 2];
791
- r[k].destructorFunction !== null && r[k].destructorFunction(nr);
802
+ var tr = k === 1 ? P$1 : v$1[k - 2];
803
+ r[k].destructorFunction !== null && r[k].destructorFunction(tr);
792
804
  }
793
805
  if (f$1) return r[0].fromWireType(R$1);
794
806
  }
795
- return I$1(T$1);
807
+ return M$1(T$1);
796
808
  };
797
809
  return Rr(e, w$1);
798
810
  }
799
- var $t = (e, r, t, n, i, a) => {
811
+ var Ct = (e, r, t, n, i, a) => {
800
812
  var s = Er(r, t);
801
- i = S$1(n, i), N$1([], [e], (o) => {
813
+ i = S$1(n, i), H$1([], [e], (o) => {
802
814
  o = o[0];
803
815
  var u$1 = `constructor ${o.name}`;
804
- if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[r - 1] !== void 0) throw new rr(`Cannot register multiple constructors with identical number of parameters (${r - 1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
816
+ if (o.registeredClass.constructor_body === void 0 && (o.registeredClass.constructor_body = []), o.registeredClass.constructor_body[r - 1] !== void 0) throw new Q(`Cannot register multiple constructors with identical number of parameters (${r - 1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
805
817
  return o.registeredClass.constructor_body[r - 1] = () => {
806
- hr(`Cannot construct ${o.name} due to unbound types`, s);
807
- }, N$1([], s, (f$1) => (f$1.splice(1, 0, null), o.registeredClass.constructor_body[r - 1] = kr(u$1, f$1, null, i, a), [])), [];
818
+ pr(`Cannot construct ${o.name} due to unbound types`, s);
819
+ }, H$1([], s, (f$1) => (f$1.splice(1, 0, null), o.registeredClass.constructor_body[r - 1] = Sr(u$1, f$1, null, i, a), [])), [];
808
820
  });
809
- }, ae = (e) => {
821
+ }, oe = (e) => {
810
822
  e = e.trim();
811
823
  const r = e.indexOf("(");
812
824
  return r === -1 ? e : e.slice(0, r);
813
- }, bt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
814
- var l$1 = Er(t, n);
815
- r = A$1(r), r = ae(r), a = S$1(i, a), N$1([], [e], (v) => {
816
- v = v[0];
817
- var g = `${v.name}.${r}`;
818
- r.startsWith("@@") && (r = Symbol[r.substring(2)]), o && v.registeredClass.pureVirtualFunctions.push(r);
825
+ }, Pt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
826
+ var c = Er(t, n);
827
+ r = A$1(r), r = oe(r), a = S$1(i, a), H$1([], [e], (v$1) => {
828
+ v$1 = v$1[0];
829
+ var g = `${v$1.name}.${r}`;
830
+ r.startsWith("@@") && (r = Symbol[r.substring(2)]), o && v$1.registeredClass.pureVirtualFunctions.push(r);
819
831
  function y$1() {
820
- hr(`Cannot call ${g} due to unbound types`, l$1);
832
+ pr(`Cannot call ${g} due to unbound types`, c);
821
833
  }
822
- var w$1 = v.registeredClass.instancePrototype, P = w$1[r];
823
- return P === void 0 || P.overloadTable === void 0 && P.className !== v.name && P.argCount === t - 2 ? (y$1.argCount = t - 2, y$1.className = v.name, w$1[r] = y$1) : (Jr(w$1, r, g), w$1[r].overloadTable[t - 2] = y$1), N$1([], l$1, (C) => {
824
- var T$1 = kr(g, C, v, a, s);
834
+ var w$1 = v$1.registeredClass.instancePrototype, P$1 = w$1[r];
835
+ return P$1 === void 0 || P$1.overloadTable === void 0 && P$1.className !== v$1.name && P$1.argCount === t - 2 ? (y$1.argCount = t - 2, y$1.className = v$1.name, w$1[r] = y$1) : (Qr(w$1, r, g), w$1[r].overloadTable[t - 2] = y$1), H$1([], c, (C) => {
836
+ var T$1 = Sr(g, C, v$1, a, s);
825
837
  return w$1[r].overloadTable === void 0 ? (T$1.argCount = t - 2, w$1[r] = T$1) : w$1[r].overloadTable[t - 2] = T$1, [];
826
838
  }), [];
827
839
  });
828
- }, Sr = [], M$1 = [], Or = (e) => {
829
- e > 9 && --M$1[e + 1] === 0 && (M$1[e] = void 0, Sr.push(e));
830
- }, wt = () => M$1.length / 2 - 5 - Sr.length, Ct = () => {
831
- M$1.push(0, 1, void 0, 1, null, 1, !0, 1, !1, 1), c.count_emval_handles = wt;
832
- }, x$1 = {
833
- toValue: (e) => (e || m$1(`Cannot use deleted val. handle = ${e}`), M$1[e]),
840
+ }, se = [], B$1 = [
841
+ 0,
842
+ 1,
843
+ ,
844
+ 1,
845
+ null,
846
+ 1,
847
+ !0,
848
+ 1,
849
+ !1,
850
+ 1
851
+ ], jr = (e) => {
852
+ e > 9 && --B$1[e + 1] === 0 && (B$1[e] = void 0, se.push(e));
853
+ }, W$1 = {
854
+ toValue: (e) => (e || m$1(`Cannot use deleted val. handle = ${e}`), B$1[e]),
834
855
  toHandle: (e) => {
835
856
  switch (e) {
836
857
  case void 0: return 2;
@@ -838,76 +859,72 @@ var Mr = async function(F$1 = {}) {
838
859
  case !0: return 6;
839
860
  case !1: return 8;
840
861
  default: {
841
- const r = Sr.pop() || M$1.length;
842
- return M$1[r] = e, M$1[r + 1] = 1, r;
862
+ const r = se.pop() || B$1.length;
863
+ return B$1[r] = e, B$1[r + 1] = 1, r;
843
864
  }
844
865
  }
845
866
  }
846
- }, oe = {
867
+ }, ue = {
847
868
  name: "emscripten::val",
848
869
  fromWireType: (e) => {
849
- var r = x$1.toValue(e);
850
- return Or(e), r;
870
+ var r = W$1.toValue(e);
871
+ return jr(e), r;
851
872
  },
852
- toWireType: (e, r) => x$1.toHandle(r),
853
- argPackAdvance: W$1,
854
- readValueFromPointer: Q,
873
+ toWireType: (e, r) => W$1.toHandle(r),
874
+ argPackAdvance: D$1,
875
+ readValueFromPointer: J,
855
876
  destructorFunction: null
856
- }, Pt = (e) => O$1(e, oe), Tt = (e, r) => {
877
+ }, Tt = (e) => j$1(e, ue), At = (e, r) => {
857
878
  switch (r) {
858
879
  case 4: return function(t) {
859
- return this.fromWireType(Br[t >> 2]);
880
+ return this.fromWireType(Nr[t >> 2]);
860
881
  };
861
882
  case 8: return function(t) {
862
- return this.fromWireType(Nr[t >> 3]);
883
+ return this.fromWireType(Zr[t >> 3]);
863
884
  };
864
885
  default: throw new TypeError(`invalid float width (${r}): ${e}`);
865
886
  }
866
- }, At = (e, r, t) => {
867
- r = A$1(r), O$1(e, {
887
+ }, Rt = (e, r, t) => {
888
+ r = A$1(r), j$1(e, {
868
889
  name: r,
869
890
  fromWireType: (n) => n,
870
891
  toWireType: (n, i) => i,
871
- argPackAdvance: W$1,
872
- readValueFromPointer: Tt(r, t),
892
+ argPackAdvance: D$1,
893
+ readValueFromPointer: At(r, t),
873
894
  destructorFunction: null
874
895
  });
875
- }, Rt = (e, r, t, n, i, a, s, o) => {
896
+ }, Ft = (e, r, t, n, i, a, s, o) => {
876
897
  var u$1 = Er(r, t);
877
- e = A$1(e), e = ae(e), i = S$1(n, i), Qr(e, function() {
878
- hr(`Cannot call ${e} due to unbound types`, u$1);
879
- }, r - 1), N$1([], u$1, (f$1) => {
880
- var l$1 = [f$1[0], null].concat(f$1.slice(1));
881
- return ee(e, kr(e, l$1, null, i, a), r - 1), [];
898
+ e = A$1(e), e = oe(e), i = S$1(n, i), re(e, function() {
899
+ pr(`Cannot call ${e} due to unbound types`, u$1);
900
+ }, r - 1), H$1([], u$1, (f$1) => {
901
+ var c = [f$1[0], null].concat(f$1.slice(1));
902
+ return te(e, Sr(e, c, null, i, a), r - 1), [];
882
903
  });
883
- }, Ft = (e, r, t) => {
904
+ }, kt = (e, r, t) => {
884
905
  switch (r) {
885
- case 1: return t ? (n) => U$1[n] : (n) => E$1[n];
886
- case 2: return t ? (n) => K[n >> 1] : (n) => ar[n >> 1];
887
- case 4: return t ? (n) => G$1[n >> 2] : (n) => $[n >> 2];
906
+ case 1: return t ? (n) => I$1[n] : (n) => E$1[n];
907
+ case 2: return t ? (n) => ir[n >> 1] : (n) => z[n >> 1];
908
+ case 4: return t ? (n) => L$1[n >> 2] : (n) => $[n >> 2];
888
909
  default: throw new TypeError(`invalid integer width (${r}): ${e}`);
889
910
  }
890
911
  }, Et = (e, r, t, n, i) => {
891
912
  r = A$1(r);
892
- var a = (l$1) => l$1;
893
- if (n === 0) {
894
- var s = 32 - 8 * t;
895
- a = (l$1) => l$1 << s >>> s;
896
- }
897
- var o = r.includes("unsigned"), u$1 = (l$1, v) => {}, f$1;
898
- o ? f$1 = function(l$1, v) {
899
- return u$1(v, this.name), v >>> 0;
900
- } : f$1 = function(l$1, v) {
901
- return u$1(v, this.name), v;
902
- }, O$1(e, {
913
+ const a = n === 0;
914
+ let s = (u$1) => u$1;
915
+ if (a) {
916
+ var o = 32 - 8 * t;
917
+ s = (u$1) => u$1 << o >>> o, i = s(i);
918
+ }
919
+ j$1(e, {
903
920
  name: r,
904
- fromWireType: a,
905
- toWireType: f$1,
906
- argPackAdvance: W$1,
907
- readValueFromPointer: Ft(r, t, n !== 0),
921
+ fromWireType: s,
922
+ toWireType: (u$1, f$1) => f$1,
923
+ argPackAdvance: D$1,
924
+ readValueFromPointer: kt(r, t, n !== 0),
908
925
  destructorFunction: null
909
926
  });
910
- }, kt = (e, r, t) => {
927
+ }, St = (e, r, t) => {
911
928
  var n = [
912
929
  Int8Array,
913
930
  Uint8Array,
@@ -920,17 +937,17 @@ var Mr = async function(F$1 = {}) {
920
937
  ], i = n[r];
921
938
  function a(s) {
922
939
  var o = $[s >> 2], u$1 = $[s + 4 >> 2];
923
- return new i(U$1.buffer, u$1, o);
940
+ return new i(I$1.buffer, u$1, o);
924
941
  }
925
- t = A$1(t), O$1(e, {
942
+ t = A$1(t), j$1(e, {
926
943
  name: t,
927
944
  fromWireType: a,
928
- argPackAdvance: W$1,
945
+ argPackAdvance: D$1,
929
946
  readValueFromPointer: a
930
947
  }, { ignoreDuplicateRegistrations: !0 });
931
- }, St = Object.assign({ optional: !0 }, oe), Ot = (e, r) => {
932
- O$1(e, St);
933
- }, jt = (e, r, t, n) => {
948
+ }, jt = Object.assign({ optional: !0 }, ue), Ot = (e, r) => {
949
+ j$1(e, jt);
950
+ }, Dt = (e, r, t, n) => {
934
951
  if (!(n > 0)) return 0;
935
952
  for (var i = t, a = t + n - 1, s = 0; s < e.length; ++s) {
936
953
  var o = e.charCodeAt(s);
@@ -953,16 +970,16 @@ var Mr = async function(F$1 = {}) {
953
970
  }
954
971
  }
955
972
  return r[t] = 0, t - i;
956
- }, q = (e, r, t) => jt(e, E$1, r, t), se = (e) => {
973
+ }, q = (e, r, t) => Dt(e, E$1, r, t), fe = (e) => {
957
974
  for (var r = 0, t = 0; t < e.length; ++t) {
958
975
  var n = e.charCodeAt(t);
959
976
  n <= 127 ? r++ : n <= 2047 ? r += 2 : n >= 55296 && n <= 57343 ? (r += 4, ++t) : r += 3;
960
977
  }
961
978
  return r;
962
- }, ue = typeof TextDecoder < "u" ? new TextDecoder() : void 0, fe = function(e) {
979
+ }, le = typeof TextDecoder < "u" ? new TextDecoder() : void 0, ce = function(e) {
963
980
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : NaN;
964
981
  for (var n = r + t, i = r; e[i] && !(i >= n);) ++i;
965
- if (i - r > 16 && e.buffer && ue) return ue.decode(e.subarray(r, i));
982
+ if (i - r > 16 && e.buffer && le) return le.decode(e.subarray(r, i));
966
983
  for (var a = ""; r < i;) {
967
984
  var s = e[r++];
968
985
  if (!(s & 128)) {
@@ -982,52 +999,52 @@ var Mr = async function(F$1 = {}) {
982
999
  }
983
1000
  }
984
1001
  return a;
985
- }, Dt = (e, r) => e ? fe(E$1, e, r) : "", Wt = (e, r) => {
986
- r = A$1(r), O$1(e, {
1002
+ }, Wt = (e, r) => e ? ce(E$1, e, r) : "", Mt = (e, r) => {
1003
+ r = A$1(r), j$1(e, {
987
1004
  name: r,
988
1005
  fromWireType(t) {
989
1006
  for (var n = $[t >> 2], i = t + 4, a, s, o = i, s = 0; s <= n; ++s) {
990
1007
  var u$1 = i + s;
991
1008
  if (s == n || E$1[u$1] == 0) {
992
- var f$1 = u$1 - o, l$1 = Dt(o, f$1);
993
- a === void 0 ? a = l$1 : (a += "\0", a += l$1), o = u$1 + 1;
1009
+ var f$1 = u$1 - o, c = Wt(o, f$1);
1010
+ a === void 0 ? a = c : (a += "\0", a += c), o = u$1 + 1;
994
1011
  }
995
1012
  }
996
- return Z$1(t), a;
1013
+ return N$1(t), a;
997
1014
  },
998
1015
  toWireType(t, n) {
999
1016
  n instanceof ArrayBuffer && (n = new Uint8Array(n));
1000
1017
  var i, a = typeof n == "string";
1001
- a || ArrayBuffer.isView(n) && n.BYTES_PER_ELEMENT == 1 || m$1("Cannot pass non-string to std::string"), a ? i = se(n) : i = n.length;
1002
- var s = de(4 + i + 1), o = s + 4;
1003
- return $[s >> 2] = i, a ? q(n, o, i + 1) : E$1.set(n, o), t !== null && t.push(Z$1, s), s;
1018
+ a || ArrayBuffer.isView(n) && n.BYTES_PER_ELEMENT == 1 || m$1("Cannot pass non-string to std::string"), a ? i = fe(n) : i = n.length;
1019
+ var s = he(4 + i + 1), o = s + 4;
1020
+ return $[s >> 2] = i, a ? q(n, o, i + 1) : E$1.set(n, o), t !== null && t.push(N$1, s), s;
1004
1021
  },
1005
- argPackAdvance: W$1,
1006
- readValueFromPointer: Q,
1022
+ argPackAdvance: D$1,
1023
+ readValueFromPointer: J,
1007
1024
  destructorFunction(t) {
1008
- Z$1(t);
1025
+ N$1(t);
1009
1026
  }
1010
1027
  });
1011
- }, le = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, Mt = (e, r) => {
1012
- for (var t = e, n = t >> 1, i = n + r / 2; !(n >= i) && ar[n];) ++n;
1013
- if (t = n << 1, t - e > 32 && le) return le.decode(E$1.subarray(e, t));
1014
- for (var a = "", s = 0; !(s >= r / 2); ++s) {
1015
- var o = K[e + s * 2 >> 1];
1028
+ }, ve = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, xt = (e, r) => {
1029
+ for (var t = e >> 1, n = t + r / 2, i = t; !(i >= n) && z[i];) ++i;
1030
+ if (i - t > 16 && ve) return ve.decode(z.subarray(t, i));
1031
+ for (var a = "", s = t; !(s >= n); ++s) {
1032
+ var o = z[s];
1016
1033
  if (o == 0) break;
1017
1034
  a += String.fromCharCode(o);
1018
1035
  }
1019
1036
  return a;
1020
- }, xt = (e, r, t) => {
1037
+ }, It = (e, r, t) => {
1021
1038
  if (t ??= 2147483647, t < 2) return 0;
1022
1039
  t -= 2;
1023
1040
  for (var n = r, i = t < e.length * 2 ? t / 2 : e.length, a = 0; a < i; ++a) {
1024
1041
  var s = e.charCodeAt(a);
1025
- K[r >> 1] = s, r += 2;
1042
+ ir[r >> 1] = s, r += 2;
1026
1043
  }
1027
- return K[r >> 1] = 0, r - n;
1028
- }, It = (e) => e.length * 2, Vt = (e, r) => {
1044
+ return ir[r >> 1] = 0, r - n;
1045
+ }, Ut = (e) => e.length * 2, Vt = (e, r) => {
1029
1046
  for (var t = 0, n = ""; !(t >= r / 4);) {
1030
- var i = G$1[e + t * 4 >> 2];
1047
+ var i = L$1[e + t * 4 >> 2];
1031
1048
  if (i == 0) break;
1032
1049
  if (++t, i >= 65536) {
1033
1050
  var a = i - 65536;
@@ -1035,7 +1052,7 @@ var Mr = async function(F$1 = {}) {
1035
1052
  } else n += String.fromCharCode(i);
1036
1053
  }
1037
1054
  return n;
1038
- }, Ut = (e, r, t) => {
1055
+ }, Ht = (e, r, t) => {
1039
1056
  if (t ??= 2147483647, t < 4) return 0;
1040
1057
  for (var n = r, i = n + t - 4, a = 0; a < e.length; ++a) {
1041
1058
  var s = e.charCodeAt(a);
@@ -1043,50 +1060,50 @@ var Mr = async function(F$1 = {}) {
1043
1060
  var o = e.charCodeAt(++a);
1044
1061
  s = 65536 + ((s & 1023) << 10) | o & 1023;
1045
1062
  }
1046
- if (G$1[r >> 2] = s, r += 4, r + 4 > i) break;
1063
+ if (L$1[r >> 2] = s, r += 4, r + 4 > i) break;
1047
1064
  }
1048
- return G$1[r >> 2] = 0, r - n;
1049
- }, Ht = (e) => {
1065
+ return L$1[r >> 2] = 0, r - n;
1066
+ }, Bt = (e) => {
1050
1067
  for (var r = 0, t = 0; t < e.length; ++t) {
1051
1068
  var n = e.charCodeAt(t);
1052
1069
  n >= 55296 && n <= 57343 && ++t, r += 4;
1053
1070
  }
1054
1071
  return r;
1055
- }, Bt = (e, r, t) => {
1072
+ }, Nt = (e, r, t) => {
1056
1073
  t = A$1(t);
1057
1074
  var n, i, a, s;
1058
- r === 2 ? (n = Mt, i = xt, s = It, a = (o) => ar[o >> 1]) : r === 4 && (n = Vt, i = Ut, s = Ht, a = (o) => $[o >> 2]), O$1(e, {
1075
+ r === 2 ? (n = xt, i = It, s = Ut, a = (o) => z[o >> 1]) : r === 4 && (n = Vt, i = Ht, s = Bt, a = (o) => $[o >> 2]), j$1(e, {
1059
1076
  name: t,
1060
1077
  fromWireType: (o) => {
1061
- for (var u$1 = $[o >> 2], f$1, l$1 = o + 4, v = 0; v <= u$1; ++v) {
1062
- var g = o + 4 + v * r;
1063
- if (v == u$1 || a(g) == 0) {
1064
- var y$1 = g - l$1, w$1 = n(l$1, y$1);
1065
- f$1 === void 0 ? f$1 = w$1 : (f$1 += "\0", f$1 += w$1), l$1 = g + r;
1078
+ for (var u$1 = $[o >> 2], f$1, c = o + 4, v$1 = 0; v$1 <= u$1; ++v$1) {
1079
+ var g = o + 4 + v$1 * r;
1080
+ if (v$1 == u$1 || a(g) == 0) {
1081
+ var y$1 = g - c, w$1 = n(c, y$1);
1082
+ f$1 === void 0 ? f$1 = w$1 : (f$1 += "\0", f$1 += w$1), c = g + r;
1066
1083
  }
1067
1084
  }
1068
- return Z$1(o), f$1;
1085
+ return N$1(o), f$1;
1069
1086
  },
1070
1087
  toWireType: (o, u$1) => {
1071
1088
  typeof u$1 != "string" && m$1(`Cannot pass non-string to C++ string type ${t}`);
1072
- var f$1 = s(u$1), l$1 = de(4 + f$1 + r);
1073
- return $[l$1 >> 2] = f$1 / r, i(u$1, l$1 + 4, f$1 + r), o !== null && o.push(Z$1, l$1), l$1;
1089
+ var f$1 = s(u$1), c = he(4 + f$1 + r);
1090
+ return $[c >> 2] = f$1 / r, i(u$1, c + 4, f$1 + r), o !== null && o.push(N$1, c), c;
1074
1091
  },
1075
- argPackAdvance: W$1,
1076
- readValueFromPointer: Q,
1092
+ argPackAdvance: D$1,
1093
+ readValueFromPointer: J,
1077
1094
  destructorFunction(o) {
1078
- Z$1(o);
1095
+ N$1(o);
1079
1096
  }
1080
1097
  });
1081
- }, Nt = (e, r, t, n, i, a) => {
1082
- fr[e] = {
1098
+ }, Zt = (e, r, t, n, i, a) => {
1099
+ ur[e] = {
1083
1100
  name: A$1(r),
1084
1101
  rawConstructor: S$1(t, n),
1085
1102
  rawDestructor: S$1(i, a),
1086
1103
  fields: []
1087
1104
  };
1088
- }, Zt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
1089
- fr[e].fields.push({
1105
+ }, zt = (e, r, t, n, i, a, s, o, u$1, f$1) => {
1106
+ ur[e].fields.push({
1090
1107
  fieldName: A$1(r),
1091
1108
  getterReturnType: t,
1092
1109
  getter: S$1(n, i),
@@ -1095,18 +1112,18 @@ var Mr = async function(F$1 = {}) {
1095
1112
  setter: S$1(o, u$1),
1096
1113
  setterContext: f$1
1097
1114
  });
1098
- }, zt = (e, r) => {
1099
- r = A$1(r), O$1(e, {
1115
+ }, Lt = (e, r) => {
1116
+ r = A$1(r), j$1(e, {
1100
1117
  isVoid: !0,
1101
1118
  name: r,
1102
1119
  argPackAdvance: 0,
1103
1120
  fromWireType: () => {},
1104
1121
  toWireType: (t, n) => {}
1105
1122
  });
1106
- }, jr = [], Gt = (e, r, t, n) => (e = jr[e], r = x$1.toValue(r), e(null, r, t, n)), Lt = {}, Xt = (e) => {
1107
- var r = Lt[e];
1123
+ }, Or = [], Gt = (e, r, t, n) => (e = Or[e], r = W$1.toValue(r), e(null, r, t, n)), Xt = {}, qt = (e) => {
1124
+ var r = Xt[e];
1108
1125
  return r === void 0 ? A$1(e) : r;
1109
- }, ce = () => {
1126
+ }, de = () => {
1110
1127
  if (typeof globalThis == "object") return globalThis;
1111
1128
  function e(r) {
1112
1129
  r.$$$embind_global$$$ = r;
@@ -1115,63 +1132,63 @@ var Mr = async function(F$1 = {}) {
1115
1132
  }
1116
1133
  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")) return $$$embind_global$$$;
1117
1134
  throw Error("unable to get global object.");
1118
- }, qt = (e) => e === 0 ? x$1.toHandle(ce()) : (e = Xt(e), x$1.toHandle(ce()[e])), Yt = (e) => {
1119
- var r = jr.length;
1120
- return jr.push(e), r;
1121
- }, ve = (e, r) => {
1122
- var t = B$1[e];
1123
- return t === void 0 && m$1(`${r} has unknown type ${ie(e)}`), t;
1124
- }, Kt = (e, r) => {
1125
- for (var t = new Array(e), n = 0; n < e; ++n) t[n] = ve($[r + n * 4 >> 2], `parameter ${n}`);
1135
+ }, Yt = (e) => e === 0 ? W$1.toHandle(de()) : (e = qt(e), W$1.toHandle(de()[e])), Kt = (e) => {
1136
+ var r = Or.length;
1137
+ return Or.push(e), r;
1138
+ }, pe = (e, r) => {
1139
+ var t = V[e];
1140
+ return t === void 0 && m$1(`${r} has unknown type ${ae(e)}`), t;
1141
+ }, Jt = (e, r) => {
1142
+ for (var t = new Array(e), n = 0; n < e; ++n) t[n] = pe($[r + n * 4 >> 2], `parameter ${n}`);
1126
1143
  return t;
1127
- }, Jt = (e, r, t) => {
1144
+ }, Qt = (e, r, t) => {
1128
1145
  var n = [], i = e.toWireType(n, t);
1129
- return n.length && ($[r >> 2] = x$1.toHandle(n)), i;
1130
- }, Qt = Reflect.construct, rn = (e, r, t) => {
1131
- var n = Kt(e, r), i = n.shift();
1146
+ return n.length && ($[r >> 2] = W$1.toHandle(n)), i;
1147
+ }, rn = Reflect.construct, en = (e, r, t) => {
1148
+ var n = Jt(e, r), i = n.shift();
1132
1149
  e--;
1133
- var a = new Array(e), s = (u$1, f$1, l$1, v) => {
1134
- for (var g = 0, y$1 = 0; y$1 < e; ++y$1) a[y$1] = n[y$1].readValueFromPointer(v + g), g += n[y$1].argPackAdvance;
1135
- var w$1 = t === 1 ? Qt(f$1, a) : f$1.apply(u$1, a);
1136
- return Jt(i, l$1, w$1);
1150
+ var a = new Array(e), s = (u$1, f$1, c, v$1) => {
1151
+ for (var g = 0, y$1 = 0; y$1 < e; ++y$1) a[y$1] = n[y$1].readValueFromPointer(v$1 + g), g += n[y$1].argPackAdvance;
1152
+ var w$1 = t === 1 ? rn(f$1, a) : f$1.apply(u$1, a);
1153
+ return Qt(i, c, w$1);
1137
1154
  }, o = `methodCaller<(${n.map((u$1) => u$1.name).join(", ")}) => ${i.name}>`;
1138
- return Yt(Rr(o, s));
1139
- }, en = (e) => {
1140
- e > 9 && (M$1[e + 1] += 1);
1155
+ return Kt(Rr(o, s));
1141
1156
  }, tn = (e) => {
1142
- var r = x$1.toValue(e);
1143
- Pr(r), Or(e);
1144
- }, nn = (e, r) => {
1145
- e = ve(e, "_emval_take_value");
1157
+ e > 9 && (B$1[e + 1] += 1);
1158
+ }, nn = (e) => {
1159
+ var r = W$1.toValue(e);
1160
+ Pr(r), jr(e);
1161
+ }, an = (e, r) => {
1162
+ e = pe(e, "_emval_take_value");
1146
1163
  var t = e.readValueFromPointer(r);
1147
- return x$1.toHandle(t);
1148
- }, an = (e, r, t, n) => {
1164
+ return W$1.toHandle(t);
1165
+ }, on = (e, r, t, n) => {
1149
1166
  var i = (/* @__PURE__ */ new Date()).getFullYear(), a = new Date(i, 0, 1), s = new Date(i, 6, 1), o = a.getTimezoneOffset(), u$1 = s.getTimezoneOffset(), f$1 = Math.max(o, u$1);
1150
- $[e >> 2] = f$1 * 60, G$1[r >> 2] = +(o != u$1);
1151
- var l$1 = (y$1) => {
1152
- var w$1 = y$1 >= 0 ? "-" : "+", P = Math.abs(y$1), C = String(Math.floor(P / 60)).padStart(2, "0"), T$1 = String(P % 60).padStart(2, "0");
1167
+ $[e >> 2] = f$1 * 60, L$1[r >> 2] = +(o != u$1);
1168
+ var c = (y$1) => {
1169
+ var w$1 = y$1 >= 0 ? "-" : "+", P$1 = Math.abs(y$1), C = String(Math.floor(P$1 / 60)).padStart(2, "0"), T$1 = String(P$1 % 60).padStart(2, "0");
1153
1170
  return `UTC${w$1}${C}${T$1}`;
1154
- }, v = l$1(o), g = l$1(u$1);
1155
- u$1 < o ? (q(v, t, 17), q(g, n, 17)) : (q(v, n, 17), q(g, t, 17));
1156
- }, on = () => 2147483648, sn = (e, r) => Math.ceil(e / r) * r, un = (e) => {
1157
- var r = ir.buffer, t = (e - r.byteLength + 65535) / 65536 | 0;
1171
+ }, v$1 = c(o), g = c(u$1);
1172
+ u$1 < o ? (q(v$1, t, 17), q(g, n, 17)) : (q(v$1, n, 17), q(g, t, 17));
1173
+ }, sn = () => 2147483648, un = (e, r) => Math.ceil(e / r) * r, fn = (e) => {
1174
+ var r = nr.buffer, t = (e - r.byteLength + 65535) / 65536 | 0;
1158
1175
  try {
1159
- return ir.grow(t), Zr(), 1;
1176
+ return nr.grow(t), zr(), 1;
1160
1177
  } catch {}
1161
- }, fn = (e) => {
1178
+ }, ln = (e) => {
1162
1179
  var r = E$1.length;
1163
1180
  e >>>= 0;
1164
- var t = on();
1181
+ var t = sn();
1165
1182
  if (e > t) return !1;
1166
1183
  for (var n = 1; n <= 4; n *= 2) {
1167
1184
  var i = r * (1 + .2 / n);
1168
1185
  i = Math.min(i, e + 100663296);
1169
- var a = Math.min(t, sn(Math.max(e, i), 65536)), s = un(a);
1186
+ var a = Math.min(t, un(Math.max(e, i), 65536)), s = fn(a);
1170
1187
  if (s) return !0;
1171
1188
  }
1172
1189
  return !1;
1173
- }, Dr = {}, ln = () => Ir || "./this.program", tr = () => {
1174
- if (!tr.strings) {
1190
+ }, Dr = {}, cn = () => Ur || "./this.program", er = () => {
1191
+ if (!er.strings) {
1175
1192
  var e = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8", r = {
1176
1193
  USER: "web_user",
1177
1194
  LOGNAME: "web_user",
@@ -1179,198 +1196,198 @@ var Mr = async function(F$1 = {}) {
1179
1196
  PWD: "/",
1180
1197
  HOME: "/home/web_user",
1181
1198
  LANG: e,
1182
- _: ln()
1199
+ _: cn()
1183
1200
  };
1184
1201
  for (var t in Dr) Dr[t] === void 0 ? delete r[t] : r[t] = Dr[t];
1185
1202
  var n = [];
1186
1203
  for (var t in r) n.push(`${t}=${r[t]}`);
1187
- tr.strings = n;
1204
+ er.strings = n;
1188
1205
  }
1189
- return tr.strings;
1190
- }, cn = (e, r) => {
1206
+ return er.strings;
1207
+ }, vn = (e, r) => {
1191
1208
  var t = 0, n = 0;
1192
- for (var i of tr()) {
1209
+ for (var i of er()) {
1193
1210
  var a = r + t;
1194
1211
  $[e + n >> 2] = a, t += q(i, a, Infinity) + 1, n += 4;
1195
1212
  }
1196
1213
  return 0;
1197
- }, vn = (e, r) => {
1198
- var t = tr();
1214
+ }, dn = (e, r) => {
1215
+ var t = er();
1199
1216
  $[e >> 2] = t.length;
1200
1217
  var n = 0;
1201
- for (var i of t) n += se(i) + 1;
1218
+ for (var i of t) n += fe(i) + 1;
1202
1219
  return $[r >> 2] = n, 0;
1203
- }, dn = (e) => 52;
1204
- function pn(e, r, t, n, i) {
1220
+ }, pn = (e) => 52;
1221
+ function hn(e, r, t, n, i) {
1205
1222
  return 70;
1206
1223
  }
1207
- var hn = [
1224
+ var _n = [
1208
1225
  null,
1209
1226
  [],
1210
1227
  []
1211
- ], _n = (e, r) => {
1212
- var t = hn[e];
1213
- r === 0 || r === 10 ? ((e === 1 ? Ur : z$1)(fe(t)), t.length = 0) : t.push(r);
1214
- }, gn = (e, r, t, n) => {
1228
+ ], gn = (e, r) => {
1229
+ var t = _n[e];
1230
+ r === 0 || r === 10 ? ((e === 1 ? Hr : Z$1)(ce(t)), t.length = 0) : t.push(r);
1231
+ }, yn = (e, r, t, n) => {
1215
1232
  for (var i = 0, a = 0; a < t; a++) {
1216
1233
  var s = $[r >> 2], o = $[r + 4 >> 2];
1217
1234
  r += 8;
1218
- for (var u$1 = 0; u$1 < o; u$1++) _n(e, E$1[s + u$1]);
1235
+ for (var u$1 = 0; u$1 < o; u$1++) gn(e, E$1[s + u$1]);
1219
1236
  i += o;
1220
1237
  }
1221
1238
  return $[n >> 2] = i, 0;
1222
- }, yn = (e) => e;
1223
- Ke(), tt(), pt(), Ct(), c.noExitRuntime && c.noExitRuntime, c.print && (Ur = c.print), c.printErr && (z$1 = c.printErr), c.wasmBinary && (Y = c.wasmBinary), c.arguments && c.arguments, c.thisProgram && (Ir = c.thisProgram);
1224
- var mn = {
1225
- s: Ie,
1226
- w: Ve,
1227
- a: Ue,
1228
- j: He,
1229
- m: Be,
1230
- N: Ne,
1231
- p: Ze,
1232
- da: ze,
1233
- d: Ge,
1234
- _: Le,
1235
- sa: qe,
1236
- Z: Ye,
1237
- na: Qe,
1238
- qa: yt,
1239
- pa: $t,
1240
- F: bt,
1241
- la: Pt,
1242
- R: At,
1243
- S: Rt,
1244
- y: Et,
1245
- t: kt,
1246
- ra: Ot,
1247
- ma: Wt,
1248
- O: Bt,
1249
- K: Nt,
1250
- ta: Zt,
1251
- oa: zt,
1252
- V: Gt,
1253
- ua: Or,
1254
- wa: qt,
1255
- $: rn,
1256
- T: en,
1257
- va: tn,
1258
- ka: nn,
1259
- aa: an,
1260
- ea: fn,
1261
- ba: cn,
1262
- ca: vn,
1239
+ }, mn = (e) => e;
1240
+ rt(), at(), gt(), l$1.noExitRuntime && l$1.noExitRuntime, l$1.print && (Hr = l$1.print), l$1.printErr && (Z$1 = l$1.printErr), l$1.wasmBinary && (Y = l$1.wasmBinary), l$1.arguments && l$1.arguments, l$1.thisProgram && (Ur = l$1.thisProgram);
1241
+ var $n = {
1242
+ s: He,
1243
+ w: Be,
1244
+ a: Ne,
1245
+ j: Ze,
1246
+ m: ze,
1247
+ P: Le,
1248
+ p: Ge,
1249
+ ga: Xe,
1250
+ d: qe,
1251
+ ba: Ye,
1252
+ ua: Je,
1253
+ aa: Qe,
1254
+ pa: tt,
1255
+ sa: bt,
1256
+ ra: Ct,
1257
+ H: Pt,
1258
+ na: Tt,
1259
+ V: Rt,
1260
+ W: Ft,
1261
+ x: Et,
1262
+ t: St,
1263
+ ta: Ot,
1264
+ oa: Mt,
1265
+ Q: Nt,
1266
+ I: Zt,
1267
+ va: zt,
1268
+ qa: Lt,
1269
+ da: Gt,
1270
+ wa: jr,
1271
+ D: Yt,
1272
+ ma: en,
1273
+ X: tn,
1274
+ Y: nn,
1275
+ U: an,
1276
+ ca: on,
1277
+ ha: ln,
1278
+ ea: vn,
1263
1279
  fa: dn,
1264
- X: pn,
1265
- Q: gn,
1266
- I: Kn,
1267
- C: Qn,
1268
- U: Wn,
1269
- P: oi,
1270
- q: Ln,
1271
- b: Sn,
1272
- D: Yn,
1273
- ia: ei,
1274
- c: jn,
1275
- ha: ti,
1276
- h: Dn,
1277
- i: Un,
1278
- r: Bn,
1279
- M: qn,
1280
- v: Zn,
1281
- E: Gn,
1282
- J: Xn,
1283
- A: ri,
1284
- H: si,
1285
- W: li,
1286
- k: xn,
1287
- f: Mn,
1288
- e: On,
1289
- g: kn,
1290
- L: ai,
1280
+ ia: pn,
1281
+ _: hn,
1282
+ S: yn,
1283
+ K: ri,
1284
+ C: ti,
1285
+ M: On,
1286
+ R: ui,
1287
+ q: Yn,
1288
+ b: Mn,
1289
+ E: Qn,
1290
+ ka: ii,
1291
+ c: xn,
1292
+ ja: ai,
1293
+ h: jn,
1294
+ i: Hn,
1295
+ r: zn,
1296
+ O: Jn,
1297
+ v: Gn,
1298
+ F: qn,
1299
+ L: Kn,
1300
+ z: ni,
1301
+ J: fi,
1302
+ $: li,
1303
+ Z: ci,
1304
+ k: In,
1305
+ f: Sn,
1306
+ e: Wn,
1307
+ g: Dn,
1308
+ N: si,
1291
1309
  l: Vn,
1292
- ja: Jn,
1293
- o: Nn,
1294
- x: Hn,
1295
- u: zn,
1296
- ga: ii,
1297
- B: ni,
1298
- n: In,
1299
- G: ui,
1300
- Y: fi,
1301
- z: yn
1302
- }, b$1 = await We();
1310
+ la: ei,
1311
+ o: Ln,
1312
+ B: Bn,
1313
+ u: Xn,
1314
+ T: Zn,
1315
+ A: oi,
1316
+ n: Un,
1317
+ G: Nn,
1318
+ y: mn
1319
+ }, b$1 = await Ie();
1303
1320
  b$1.ya;
1304
- var $n = b$1.za, Z$1 = c._free = b$1.Aa, de = c._malloc = b$1.Ca, bn = b$1.Da, d = b$1.Ea, wn = b$1.Fa, Cn = b$1.Ga, Pn = b$1.Ha, Tn = b$1.Ia, An = b$1.Ja, Rn = b$1.Ka;
1305
- c.dynCall_viijii = b$1.La;
1306
- var Fn = c.dynCall_vij = b$1.Ma;
1307
- c.dynCall_jiji = b$1.Na;
1308
- var En = c.dynCall_jiiii = b$1.Oa;
1309
- c.dynCall_iiiiij = b$1.Pa, c.dynCall_iiiiijj = b$1.Qa, c.dynCall_iiiiiijj = b$1.Ra;
1310
- function kn(e, r, t, n) {
1311
- var i = h$1();
1312
- try {
1313
- _(e)(r, t, n);
1314
- } catch (a) {
1315
- if (p$1(i), a !== a + 0) throw a;
1316
- d(1, 0);
1317
- }
1318
- }
1321
+ var bn = b$1.za, N$1 = l$1._free = b$1.Aa, he = l$1._malloc = b$1.Ca, wn = b$1.Da, d = b$1.Ea, Cn = b$1.Fa, Pn = b$1.Ga, Tn = b$1.Ha, An = b$1.Ia, Rn = b$1.Ja, Fn = b$1.Ka;
1322
+ l$1.dynCall_viijii = b$1.La;
1323
+ var kn = l$1.dynCall_iiijj = b$1.Ma;
1324
+ l$1.dynCall_jiji = b$1.Na;
1325
+ var En = l$1.dynCall_jiiii = b$1.Oa;
1326
+ l$1.dynCall_iiiiij = b$1.Pa, l$1.dynCall_iiiiijj = b$1.Qa, l$1.dynCall_iiiiiijj = b$1.Ra;
1319
1327
  function Sn(e, r) {
1320
1328
  var t = h$1();
1321
1329
  try {
1322
- return _(e)(r);
1330
+ _(e)(r);
1323
1331
  } catch (n) {
1324
1332
  if (p$1(t), n !== n + 0) throw n;
1325
1333
  d(1, 0);
1326
1334
  }
1327
1335
  }
1328
- function On(e, r, t) {
1329
- var n = h$1();
1336
+ function jn(e, r, t, n) {
1337
+ var i = h$1();
1330
1338
  try {
1331
- _(e)(r, t);
1332
- } catch (i) {
1333
- if (p$1(n), i !== i + 0) throw i;
1339
+ return _(e)(r, t, n);
1340
+ } catch (a) {
1341
+ if (p$1(i), a !== a + 0) throw a;
1334
1342
  d(1, 0);
1335
1343
  }
1336
1344
  }
1337
- function jn(e, r, t) {
1338
- var n = h$1();
1345
+ function On(e, r, t, n, i) {
1346
+ var a = h$1();
1339
1347
  try {
1340
- return _(e)(r, t);
1341
- } catch (i) {
1342
- if (p$1(n), i !== i + 0) throw i;
1348
+ return _(e)(r, t, n, i);
1349
+ } catch (s) {
1350
+ if (p$1(a), s !== s + 0) throw s;
1343
1351
  d(1, 0);
1344
1352
  }
1345
1353
  }
1346
1354
  function Dn(e, r, t, n) {
1347
1355
  var i = h$1();
1348
1356
  try {
1349
- return _(e)(r, t, n);
1357
+ _(e)(r, t, n);
1350
1358
  } catch (a) {
1351
1359
  if (p$1(i), a !== a + 0) throw a;
1352
1360
  d(1, 0);
1353
1361
  }
1354
1362
  }
1355
- function Wn(e, r, t, n, i) {
1356
- var a = h$1();
1363
+ function Wn(e, r, t) {
1364
+ var n = h$1();
1357
1365
  try {
1358
- return _(e)(r, t, n, i);
1359
- } catch (s) {
1360
- if (p$1(a), s !== s + 0) throw s;
1366
+ _(e)(r, t);
1367
+ } catch (i) {
1368
+ if (p$1(n), i !== i + 0) throw i;
1361
1369
  d(1, 0);
1362
1370
  }
1363
1371
  }
1364
1372
  function Mn(e, r) {
1365
1373
  var t = h$1();
1366
1374
  try {
1367
- _(e)(r);
1375
+ return _(e)(r);
1368
1376
  } catch (n) {
1369
1377
  if (p$1(t), n !== n + 0) throw n;
1370
1378
  d(1, 0);
1371
1379
  }
1372
1380
  }
1373
- function xn(e) {
1381
+ function xn(e, r, t) {
1382
+ var n = h$1();
1383
+ try {
1384
+ return _(e)(r, t);
1385
+ } catch (i) {
1386
+ if (p$1(n), i !== i + 0) throw i;
1387
+ d(1, 0);
1388
+ }
1389
+ }
1390
+ function In(e) {
1374
1391
  var r = h$1();
1375
1392
  try {
1376
1393
  _(e)();
@@ -1379,12 +1396,12 @@ var Mr = async function(F$1 = {}) {
1379
1396
  d(1, 0);
1380
1397
  }
1381
1398
  }
1382
- function In(e, r, t, n, i, a, s, o, u$1, f$1, l$1) {
1383
- var v = h$1();
1399
+ function Un(e, r, t, n, i, a, s, o, u$1, f$1, c) {
1400
+ var v$1 = h$1();
1384
1401
  try {
1385
- _(e)(r, t, n, i, a, s, o, u$1, f$1, l$1);
1402
+ _(e)(r, t, n, i, a, s, o, u$1, f$1, c);
1386
1403
  } catch (g) {
1387
- if (p$1(v), g !== g + 0) throw g;
1404
+ if (p$1(v$1), g !== g + 0) throw g;
1388
1405
  d(1, 0);
1389
1406
  }
1390
1407
  }
@@ -1397,7 +1414,7 @@ var Mr = async function(F$1 = {}) {
1397
1414
  d(1, 0);
1398
1415
  }
1399
1416
  }
1400
- function Un(e, r, t, n, i) {
1417
+ function Hn(e, r, t, n, i) {
1401
1418
  var a = h$1();
1402
1419
  try {
1403
1420
  return _(e)(r, t, n, i);
@@ -1406,7 +1423,7 @@ var Mr = async function(F$1 = {}) {
1406
1423
  d(1, 0);
1407
1424
  }
1408
1425
  }
1409
- function Hn(e, r, t, n, i, a, s) {
1426
+ function Bn(e, r, t, n, i, a, s) {
1410
1427
  var o = h$1();
1411
1428
  try {
1412
1429
  _(e)(r, t, n, i, a, s);
@@ -1415,7 +1432,25 @@ var Mr = async function(F$1 = {}) {
1415
1432
  d(1, 0);
1416
1433
  }
1417
1434
  }
1418
- function Bn(e, r, t, n, i, a) {
1435
+ function Nn(e, r, t, n, i, a, s, o, u$1, f$1, c, v$1, g, y$1, w$1, P$1) {
1436
+ var C = h$1();
1437
+ try {
1438
+ _(e)(r, t, n, i, a, s, o, u$1, f$1, c, v$1, g, y$1, w$1, P$1);
1439
+ } catch (T$1) {
1440
+ if (p$1(C), T$1 !== T$1 + 0) throw T$1;
1441
+ d(1, 0);
1442
+ }
1443
+ }
1444
+ function Zn(e, r, t, n, i, a, s, o, u$1) {
1445
+ var f$1 = h$1();
1446
+ try {
1447
+ _(e)(r, t, n, i, a, s, o, u$1);
1448
+ } catch (c) {
1449
+ if (p$1(f$1), c !== c + 0) throw c;
1450
+ d(1, 0);
1451
+ }
1452
+ }
1453
+ function zn(e, r, t, n, i, a) {
1419
1454
  var s = h$1();
1420
1455
  try {
1421
1456
  return _(e)(r, t, n, i, a);
@@ -1424,7 +1459,7 @@ var Mr = async function(F$1 = {}) {
1424
1459
  d(1, 0);
1425
1460
  }
1426
1461
  }
1427
- function Nn(e, r, t, n, i, a) {
1462
+ function Ln(e, r, t, n, i, a) {
1428
1463
  var s = h$1();
1429
1464
  try {
1430
1465
  _(e)(r, t, n, i, a);
@@ -1433,7 +1468,7 @@ var Mr = async function(F$1 = {}) {
1433
1468
  d(1, 0);
1434
1469
  }
1435
1470
  }
1436
- function Zn(e, r, t, n, i, a, s) {
1471
+ function Gn(e, r, t, n, i, a, s) {
1437
1472
  var o = h$1();
1438
1473
  try {
1439
1474
  return _(e)(r, t, n, i, a, s);
@@ -1442,7 +1477,7 @@ var Mr = async function(F$1 = {}) {
1442
1477
  d(1, 0);
1443
1478
  }
1444
1479
  }
1445
- function zn(e, r, t, n, i, a, s, o) {
1480
+ function Xn(e, r, t, n, i, a, s, o) {
1446
1481
  var u$1 = h$1();
1447
1482
  try {
1448
1483
  _(e)(r, t, n, i, a, s, o);
@@ -1451,7 +1486,7 @@ var Mr = async function(F$1 = {}) {
1451
1486
  d(1, 0);
1452
1487
  }
1453
1488
  }
1454
- function Gn(e, r, t, n, i, a, s, o) {
1489
+ function qn(e, r, t, n, i, a, s, o) {
1455
1490
  var u$1 = h$1();
1456
1491
  try {
1457
1492
  return _(e)(r, t, n, i, a, s, o);
@@ -1460,7 +1495,7 @@ var Mr = async function(F$1 = {}) {
1460
1495
  d(1, 0);
1461
1496
  }
1462
1497
  }
1463
- function Ln(e) {
1498
+ function Yn(e) {
1464
1499
  var r = h$1();
1465
1500
  try {
1466
1501
  return _(e)();
@@ -1469,16 +1504,16 @@ var Mr = async function(F$1 = {}) {
1469
1504
  d(1, 0);
1470
1505
  }
1471
1506
  }
1472
- function Xn(e, r, t, n, i, a, s, o, u$1) {
1507
+ function Kn(e, r, t, n, i, a, s, o, u$1) {
1473
1508
  var f$1 = h$1();
1474
1509
  try {
1475
1510
  return _(e)(r, t, n, i, a, s, o, u$1);
1476
- } catch (l$1) {
1477
- if (p$1(f$1), l$1 !== l$1 + 0) throw l$1;
1511
+ } catch (c) {
1512
+ if (p$1(f$1), c !== c + 0) throw c;
1478
1513
  d(1, 0);
1479
1514
  }
1480
1515
  }
1481
- function qn(e, r, t, n, i, a, s) {
1516
+ function Jn(e, r, t, n, i, a, s) {
1482
1517
  var o = h$1();
1483
1518
  try {
1484
1519
  return _(e)(r, t, n, i, a, s);
@@ -1487,7 +1522,7 @@ var Mr = async function(F$1 = {}) {
1487
1522
  d(1, 0);
1488
1523
  }
1489
1524
  }
1490
- function Yn(e, r, t, n) {
1525
+ function Qn(e, r, t, n) {
1491
1526
  var i = h$1();
1492
1527
  try {
1493
1528
  return _(e)(r, t, n);
@@ -1496,7 +1531,7 @@ var Mr = async function(F$1 = {}) {
1496
1531
  d(1, 0);
1497
1532
  }
1498
1533
  }
1499
- function Kn(e, r, t, n) {
1534
+ function ri(e, r, t, n) {
1500
1535
  var i = h$1();
1501
1536
  try {
1502
1537
  return _(e)(r, t, n);
@@ -1505,7 +1540,7 @@ var Mr = async function(F$1 = {}) {
1505
1540
  d(1, 0);
1506
1541
  }
1507
1542
  }
1508
- function Jn(e, r, t, n, i, a, s, o) {
1543
+ function ei(e, r, t, n, i, a, s, o) {
1509
1544
  var u$1 = h$1();
1510
1545
  try {
1511
1546
  _(e)(r, t, n, i, a, s, o);
@@ -1514,7 +1549,7 @@ var Mr = async function(F$1 = {}) {
1514
1549
  d(1, 0);
1515
1550
  }
1516
1551
  }
1517
- function Qn(e, r, t, n, i, a) {
1552
+ function ti(e, r, t, n, i, a) {
1518
1553
  var s = h$1();
1519
1554
  try {
1520
1555
  return _(e)(r, t, n, i, a);
@@ -1523,16 +1558,16 @@ var Mr = async function(F$1 = {}) {
1523
1558
  d(1, 0);
1524
1559
  }
1525
1560
  }
1526
- function ri(e, r, t, n, i, a, s, o, u$1, f$1) {
1527
- var l$1 = h$1();
1561
+ function ni(e, r, t, n, i, a, s, o, u$1, f$1) {
1562
+ var c = h$1();
1528
1563
  try {
1529
1564
  return _(e)(r, t, n, i, a, s, o, u$1, f$1);
1530
- } catch (v) {
1531
- if (p$1(l$1), v !== v + 0) throw v;
1565
+ } catch (v$1) {
1566
+ if (p$1(c), v$1 !== v$1 + 0) throw v$1;
1532
1567
  d(1, 0);
1533
1568
  }
1534
1569
  }
1535
- function ei(e, r, t) {
1570
+ function ii(e, r, t) {
1536
1571
  var n = h$1();
1537
1572
  try {
1538
1573
  return _(e)(r, t);
@@ -1541,7 +1576,7 @@ var Mr = async function(F$1 = {}) {
1541
1576
  d(1, 0);
1542
1577
  }
1543
1578
  }
1544
- function ti(e, r, t, n, i) {
1579
+ function ai(e, r, t, n, i) {
1545
1580
  var a = h$1();
1546
1581
  try {
1547
1582
  return _(e)(r, t, n, i);
@@ -1550,25 +1585,16 @@ var Mr = async function(F$1 = {}) {
1550
1585
  d(1, 0);
1551
1586
  }
1552
1587
  }
1553
- function ni(e, r, t, n, i, a, s, o, u$1, f$1) {
1554
- var l$1 = h$1();
1588
+ function oi(e, r, t, n, i, a, s, o, u$1, f$1) {
1589
+ var c = h$1();
1555
1590
  try {
1556
1591
  _(e)(r, t, n, i, a, s, o, u$1, f$1);
1557
- } catch (v) {
1558
- if (p$1(l$1), v !== v + 0) throw v;
1559
- d(1, 0);
1560
- }
1561
- }
1562
- function ii(e, r, t, n, i, a, s, o, u$1) {
1563
- var f$1 = h$1();
1564
- try {
1565
- _(e)(r, t, n, i, a, s, o, u$1);
1566
- } catch (l$1) {
1567
- if (p$1(f$1), l$1 !== l$1 + 0) throw l$1;
1592
+ } catch (v$1) {
1593
+ if (p$1(c), v$1 !== v$1 + 0) throw v$1;
1568
1594
  d(1, 0);
1569
1595
  }
1570
1596
  }
1571
- function ai(e, r, t, n, i, a, s) {
1597
+ function si(e, r, t, n, i, a, s) {
1572
1598
  var o = h$1();
1573
1599
  try {
1574
1600
  _(e)(r, t, n, i, a, s);
@@ -1577,7 +1603,7 @@ var Mr = async function(F$1 = {}) {
1577
1603
  d(1, 0);
1578
1604
  }
1579
1605
  }
1580
- function oi(e, r, t, n) {
1606
+ function ui(e, r, t, n) {
1581
1607
  var i = h$1();
1582
1608
  try {
1583
1609
  return _(e)(r, t, n);
@@ -1586,34 +1612,25 @@ var Mr = async function(F$1 = {}) {
1586
1612
  d(1, 0);
1587
1613
  }
1588
1614
  }
1589
- function si(e, r, t, n, i, a, s, o, u$1, f$1, l$1, v) {
1615
+ function fi(e, r, t, n, i, a, s, o, u$1, f$1, c, v$1) {
1590
1616
  var g = h$1();
1591
1617
  try {
1592
- return _(e)(r, t, n, i, a, s, o, u$1, f$1, l$1, v);
1618
+ return _(e)(r, t, n, i, a, s, o, u$1, f$1, c, v$1);
1593
1619
  } catch (y$1) {
1594
1620
  if (p$1(g), y$1 !== y$1 + 0) throw y$1;
1595
1621
  d(1, 0);
1596
1622
  }
1597
1623
  }
1598
- function ui(e, r, t, n, i, a, s, o, u$1, f$1, l$1, v, g, y$1, w$1, P) {
1599
- var C = h$1();
1600
- try {
1601
- _(e)(r, t, n, i, a, s, o, u$1, f$1, l$1, v, g, y$1, w$1, P);
1602
- } catch (T$1) {
1603
- if (p$1(C), T$1 !== T$1 + 0) throw T$1;
1604
- d(1, 0);
1605
- }
1606
- }
1607
- function fi(e, r, t, n) {
1608
- var i = h$1();
1624
+ function li(e, r, t, n, i, a, s) {
1625
+ var o = h$1();
1609
1626
  try {
1610
- Fn(e, r, t, n);
1611
- } catch (a) {
1612
- if (p$1(i), a !== a + 0) throw a;
1627
+ return kn(e, r, t, n, i, a, s);
1628
+ } catch (u$1) {
1629
+ if (p$1(o), u$1 !== u$1 + 0) throw u$1;
1613
1630
  d(1, 0);
1614
1631
  }
1615
1632
  }
1616
- function li(e, r, t, n, i) {
1633
+ function ci(e, r, t, n, i) {
1617
1634
  var a = h$1();
1618
1635
  try {
1619
1636
  return En(e, r, t, n, i);
@@ -1623,32 +1640,32 @@ var Mr = async function(F$1 = {}) {
1623
1640
  }
1624
1641
  }
1625
1642
  function Wr() {
1626
- if (H$1 > 0) {
1627
- J = Wr;
1643
+ if (U$1 > 0) {
1644
+ K = Wr;
1628
1645
  return;
1629
1646
  }
1630
- if (Pe(), H$1 > 0) {
1631
- J = Wr;
1647
+ if (Re(), U$1 > 0) {
1648
+ K = Wr;
1632
1649
  return;
1633
1650
  }
1634
1651
  function e() {
1635
1652
  var r;
1636
- c.calledRun = !0, !Hr && (Te(), xr(c), (r = c.onRuntimeInitialized) === null || r === void 0 || r.call(c), Ae());
1653
+ l$1.calledRun = !0, !Br && (Fe(), xr(l$1), (r = l$1.onRuntimeInitialized) === null || r === void 0 || r.call(l$1), ke());
1637
1654
  }
1638
- c.setStatus ? (c.setStatus("Running..."), setTimeout(() => {
1639
- setTimeout(() => c.setStatus(""), 1), e();
1655
+ l$1.setStatus ? (l$1.setStatus("Running..."), setTimeout(() => {
1656
+ setTimeout(() => l$1.setStatus(""), 1), e();
1640
1657
  }, 1)) : e();
1641
1658
  }
1642
- function ci() {
1643
- if (c.preInit) for (typeof c.preInit == "function" && (c.preInit = [c.preInit]); c.preInit.length > 0;) c.preInit.shift()();
1659
+ function vi() {
1660
+ if (l$1.preInit) for (typeof l$1.preInit == "function" && (l$1.preInit = [l$1.preInit]); l$1.preInit.length > 0;) l$1.preInit.shift()();
1644
1661
  }
1645
- return ci(), Wr(), V = $e, V;
1662
+ return vi(), Wr(), x$1 = we, x$1;
1646
1663
  };
1647
- function ye(F$1) {
1664
+ function $e(F$1) {
1648
1665
  return S(Mr, F$1);
1649
1666
  }
1650
- async function me(F$1, V) {
1651
- return Z(Mr, F$1, V);
1667
+ async function be(F$1, x$1) {
1668
+ return Z(Mr, F$1, x$1);
1652
1669
  }
1653
1670
 
1654
1671
  //#endregion
@@ -1678,6 +1695,11 @@ async function applyVideoZoom(video, zoom) {
1678
1695
  const constraints = { advanced: [{ zoom }] };
1679
1696
  await track.applyConstraints(constraints);
1680
1697
  }
1698
+ async function applyVideoTorch(video, torch) {
1699
+ const track = video.srcObject.getVideoTracks()[0];
1700
+ const constraints = { advanced: [{ torch }] };
1701
+ await track.applyConstraints(constraints);
1702
+ }
1681
1703
  function closeStream(stream) {
1682
1704
  if (stream) {
1683
1705
  const tracks = stream.getTracks();
@@ -1729,7 +1751,7 @@ async function closeCamera(video) {
1729
1751
  async function scanCanvas(ctx, readerOptions) {
1730
1752
  if (!ctx) throw new Error("Canvas context not found");
1731
1753
  const imageData = ctx.getImageData(0, 0, ctx.canvas.width, ctx.canvas.height);
1732
- const imageDataReadResults = await me(imageData, readerOptions);
1754
+ const imageDataReadResults = await be(imageData, readerOptions);
1733
1755
  return imageDataReadResults[0];
1734
1756
  }
1735
1757
  function drawTargetRectangle(ctx, position) {
@@ -1858,7 +1880,7 @@ var NanoScan = class {
1858
1880
  this.offscreenCanvasNode.style.width = `100%`;
1859
1881
  if (this.options.zxingWASMUrl) {
1860
1882
  const wasm_url = this.options.zxingWASMUrl;
1861
- ye({ overrides: { locateFile: (path, prefix) => {
1883
+ $e({ overrides: { locateFile: (path, prefix) => {
1862
1884
  if (path.endsWith(".wasm")) return wasm_url;
1863
1885
  return prefix + path;
1864
1886
  } } });
@@ -1940,6 +1962,9 @@ var NanoScan = class {
1940
1962
  }
1941
1963
  this.zoom = _zoom;
1942
1964
  }
1965
+ toggleTorch(bool) {
1966
+ applyVideoTorch(this.videoNode, bool);
1967
+ }
1943
1968
  };
1944
1969
 
1945
1970
  //#endregion