@solarpunkltd/swarm-chat-js 6.2.6 → 6.2.7

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/index.esm.js CHANGED
@@ -1,24 +1,24 @@
1
- import { FeedIndex as ci, Identifier as Lt, Span as Be, Bytes as Ue, PrivateKey as ke, Reference as ui, BeeArgumentError as Pl, Signature as Zl, Topic as ut, Stamper as xn, Bee as Bl, EthAddress as Ll } from "@ethersphere/bee-js";
1
+ import { FeedIndex as Lt, Identifier as zt, Span as Be, Bytes as Ue, PrivateKey as ke, Reference as ui, BeeArgumentError as Pl, Signature as Zl, Topic as ut, Stamper as kn, Bee as Bl, EthAddress as Ll } from "@ethersphere/bee-js";
2
2
  const P = [];
3
3
  for (let a = 0; a < 256; ++a)
4
4
  P.push((a + 256).toString(16).slice(1));
5
5
  function zl(a, r = 0) {
6
6
  return (P[a[r + 0]] + P[a[r + 1]] + P[a[r + 2]] + P[a[r + 3]] + "-" + P[a[r + 4]] + P[a[r + 5]] + "-" + P[a[r + 6]] + P[a[r + 7]] + "-" + P[a[r + 8]] + P[a[r + 9]] + "-" + P[a[r + 10]] + P[a[r + 11]] + P[a[r + 12]] + P[a[r + 13]] + P[a[r + 14]] + P[a[r + 15]]).toLowerCase();
7
7
  }
8
- let kn;
8
+ let En;
9
9
  const Vl = new Uint8Array(16);
10
10
  function Fl() {
11
- if (!kn) {
11
+ if (!En) {
12
12
  if (typeof crypto > "u" || !crypto.getRandomValues)
13
13
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
14
- kn = crypto.getRandomValues.bind(crypto);
14
+ En = crypto.getRandomValues.bind(crypto);
15
15
  }
16
- return kn(Vl);
16
+ return En(Vl);
17
17
  }
18
- const Wl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ti = { randomUUID: Wl };
18
+ const Wl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ri = { randomUUID: Wl };
19
19
  function Hl(a, r, i) {
20
- if (ti.randomUUID && !r && !a)
21
- return ti.randomUUID();
20
+ if (ri.randomUUID && !r && !a)
21
+ return ri.randomUUID();
22
22
  a = a || {};
23
23
  const c = a.random || (a.rng || Fl)();
24
24
  return c[6] = c[6] & 15 | 64, c[8] = c[8] & 63 | 128, zl(c);
@@ -108,7 +108,7 @@ var li = {};
108
108
  return i(Promise.all(e.map(i)));
109
109
  }
110
110
  async function u(e, t = 1) {
111
- const n = Ts(e, t), s = [], o = n.map(async (d) => {
111
+ const n = As(e, t), s = [], o = n.map(async (d) => {
112
112
  for (const m of d) s.push(await m());
113
113
  });
114
114
  return await Promise.all(o), s;
@@ -169,12 +169,12 @@ var li = {};
169
169
  return !0;
170
170
  }
171
171
  function Oe(e, t, n = Math.random) {
172
- return f(Gn(0, e.length - 1), n).slice(0, t);
172
+ return f(Jn(0, e.length - 1), n).slice(0, t);
173
173
  }
174
174
  function We(e, t) {
175
175
  return e.map((n) => n[t]);
176
176
  }
177
- function Kt(e) {
177
+ function Yt(e) {
178
178
  let t = e, n = 3405648695, s = 3735928559;
179
179
  return function() {
180
180
  return t += n, n ^= t << 7, t *= s, s ^= t << 13, t ^= n ^ s, (t >>> 0) / 4294967296;
@@ -183,7 +183,7 @@ var li = {};
183
183
  function He(e, t, n = Math.random) {
184
184
  return Math.floor(n() * (t - e + 1)) + e;
185
185
  }
186
- function Cn(e, t, n = Math.random) {
186
+ function Nn(e, t, n = Math.random) {
187
187
  return n() * (t - e) + e;
188
188
  }
189
189
  function Ti() {
@@ -201,12 +201,12 @@ var li = {};
201
201
  }
202
202
  function Ii(e, t = Math.random) {
203
203
  const n = Math.floor(e), s = e - n;
204
- return Nn(s, t) ? n + 1 : n;
204
+ return jn(s, t) ? n + 1 : n;
205
205
  }
206
- function Nn(e, t = Math.random) {
206
+ function jn(e, t = Math.random) {
207
207
  return t() < e;
208
208
  }
209
- function Yt(e, t = Math.random) {
209
+ function Qt(e, t = Math.random) {
210
210
  return e[Math.floor(e.length * t())];
211
211
  }
212
212
  function Mi(e, t, n = Math.random) {
@@ -217,7 +217,7 @@ var li = {};
217
217
  if (t > e.length) throw new Error(`Count (${t}) is greater than array length (${e.length})`);
218
218
  const o = [];
219
219
  for (; o.length < t; ) {
220
- const d = Yt(e, s);
220
+ const d = Qt(e, s);
221
221
  o.some((m) => n(m, d)) || o.push(d);
222
222
  }
223
223
  return o;
@@ -234,11 +234,11 @@ var li = {};
234
234
  if (!e.length) throw Error("Received empty array");
235
235
  return e[e.length - 1];
236
236
  }
237
- function jn(e, t, n) {
237
+ function Dn(e, t, n) {
238
238
  return n(t.reduce((s, o) => o(s), e));
239
239
  }
240
240
  function Ci(e, t) {
241
- return (n) => jn(n, e, t);
241
+ return (n) => Dn(n, e, t);
242
242
  }
243
243
  function Ni(e, t, n) {
244
244
  if (n === void 0 && (n = Math.random()), e.length !== t.length) throw new Error("Array length mismatch");
@@ -280,7 +280,7 @@ var li = {};
280
280
  return ye(e, t) || ve(e, t, n);
281
281
  }
282
282
  function Pi(e, t) {
283
- const n = ar(t, "."), s = Kn(t, ".");
283
+ const n = or(t, "."), s = Yn(t, ".");
284
284
  if (!n || !s) return;
285
285
  const o = ye(e, n);
286
286
  delete o[s];
@@ -351,21 +351,21 @@ var li = {};
351
351
  return parseFloat(t[0]);
352
352
  }
353
353
  function ce(e, t = !0) {
354
- return !e || t && !Qt(e._readableState) || t && e.constructor && (e.constructor.isBuffer || e.constructor.name == "Uint8Array" || e.constructor.name === "ArrayBuffer" || e.constructor.name === "ReadableStream") ? !1 : typeof e == "object";
354
+ return !e || t && !Xt(e._readableState) || t && e.constructor && (e.constructor.isBuffer || e.constructor.name == "Uint8Array" || e.constructor.name === "ArrayBuffer" || e.constructor.name === "ReadableStream") ? !1 : typeof e == "object";
355
355
  }
356
356
  function Ie(e) {
357
357
  return ce(e) && !Array.isArray(e);
358
358
  }
359
- function Dn(e) {
359
+ function Un(e) {
360
360
  return Array.isArray(e) && e.length === 0;
361
361
  }
362
362
  function Yi(e) {
363
363
  return Ie(e) && Object.keys(e).length === 0;
364
364
  }
365
- function Qt(e) {
365
+ function Xt(e) {
366
366
  return e === void 0;
367
367
  }
368
- function Xt(e) {
368
+ function er(e) {
369
369
  return Object.prototype.toString.call(e) === "[object Function]" || Object.prototype.toString.call(e) === "[object AsyncFunction]";
370
370
  }
371
371
  function F(e) {
@@ -374,7 +374,7 @@ var li = {};
374
374
  function ue(e) {
375
375
  return typeof e == "number" && isFinite(e);
376
376
  }
377
- function Un(e) {
377
+ function Pn(e) {
378
378
  return e === !0 || e === !1;
379
379
  }
380
380
  function Me(e) {
@@ -383,16 +383,16 @@ var li = {};
383
383
  function At(e) {
384
384
  return !F(e) || e.trim().length === 0;
385
385
  }
386
- function er(e) {
386
+ function tr(e) {
387
387
  return ue(e) && Number.isInteger(e) && e >= 1;
388
388
  }
389
- function Pn(e) {
389
+ function Zn(e) {
390
390
  return F(e) && e.match(/^-?\d+$/) !== null;
391
391
  }
392
- function Zn(e) {
392
+ function Bn(e) {
393
393
  return F(e) && e.match(/^(0x)?[0-9a-f]+$/i) !== null;
394
394
  }
395
- const Qi = "!@#$%^&*()_+-=[]{}|;:<>?,./", Xi = "!@#$%^&*()_+-=[]{}|;:<>?,./".split(""), tr = "abcdefghijklmnopqrstuvwxyz", ea = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", ta = "1234567890", rr = tr + ea + ta, Bn = rr + Qi, Ln = [
395
+ const Qi = "!@#$%^&*()_+-=[]{}|;:<>?,./", Xi = "!@#$%^&*()_+-=[]{}|;:<>?,./".split(""), rr = "abcdefghijklmnopqrstuvwxyz", ea = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", ta = "1234567890", nr = rr + ea + ta, Ln = nr + Qi, zn = [
396
396
  "—",
397
397
  "\\",
398
398
  "東",
@@ -409,25 +409,25 @@ var li = {};
409
409
  "ᛇ",
410
410
  "ᚻ",
411
411
  "ᛦ"
412
- ], zn = "0123456789abcdef";
412
+ ], Vn = "0123456789abcdef";
413
413
  function ra(e, t = Math.random) {
414
414
  let n = "";
415
- for (let s = 0; s < e; s++) n += tr[Math.floor(t() * tr.length)];
415
+ for (let s = 0; s < e; s++) n += rr[Math.floor(t() * rr.length)];
416
416
  return n;
417
417
  }
418
418
  function na(e, t = Math.random) {
419
419
  let n = "";
420
- for (let s = 0; s < e; s++) n += rr[Math.floor(t() * rr.length)];
420
+ for (let s = 0; s < e; s++) n += nr[Math.floor(t() * nr.length)];
421
421
  return n;
422
422
  }
423
423
  function sa(e, t = Math.random) {
424
424
  let n = "";
425
- for (let s = 0; s < e; s++) n += Bn[Math.floor(t() * Bn.length)];
425
+ for (let s = 0; s < e; s++) n += Ln[Math.floor(t() * Ln.length)];
426
426
  return n;
427
427
  }
428
428
  function ia(e, t = Math.random) {
429
429
  let n = "";
430
- for (let s = 0; s < e; s++) n += Ln[Math.floor(t() * Ln.length)];
430
+ for (let s = 0; s < e; s++) n += zn[Math.floor(t() * zn.length)];
431
431
  return n;
432
432
  }
433
433
  function aa(e, t) {
@@ -435,17 +435,17 @@ var li = {};
435
435
  return s ? s[0] : null;
436
436
  }
437
437
  function oa(e, t, n = Xi) {
438
- const s = Yn(e, n);
438
+ const s = Qn(e, n);
439
439
  for (const o of s) if (t(o)) return o;
440
440
  return null;
441
441
  }
442
442
  function ca(e, t = Math.random) {
443
443
  let n = "";
444
- for (let s = 0; s < e; s++) n += zn[Math.floor(t() * zn.length)];
444
+ for (let s = 0; s < e; s++) n += Vn[Math.floor(t() * Vn.length)];
445
445
  return n;
446
446
  }
447
447
  function ua(e, t) {
448
- if (!Pn(e)) throw new TypeError(`Expected integer string${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
448
+ if (!Zn(e)) throw new TypeError(`Expected integer string${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
449
449
  const n = BigInt(e);
450
450
  if (t && (t.min && n < t.min || t.max && n > t.max))
451
451
  throw RangeError(
@@ -453,7 +453,7 @@ var li = {};
453
453
  );
454
454
  return e;
455
455
  }
456
- function Vn(e, t) {
456
+ function Fn(e, t) {
457
457
  if (At(e)) throw new TypeError(`Expected string${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
458
458
  if (t && (t.min !== void 0 && e.length < t.min || t.max !== void 0 && e.length > t.max))
459
459
  throw RangeError(
@@ -462,7 +462,7 @@ var li = {};
462
462
  return e;
463
463
  }
464
464
  function la(e, t) {
465
- if (!Zn(e)) throw new TypeError(`Expected hex string${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
465
+ if (!Bn(e)) throw new TypeError(`Expected hex string${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
466
466
  const n = e.replace(/^0x/, "");
467
467
  if (t && t.byteLength && n.length !== t.byteLength * 2)
468
468
  throw RangeError(
@@ -471,34 +471,34 @@ var li = {};
471
471
  return n;
472
472
  }
473
473
  function da(e, t) {
474
- if (!Vn(e, t).split("").every((n) => n === "_" || Ke(n)))
474
+ if (!Fn(e, t).split("").every((n) => n === "_" || Ke(n)))
475
475
  throw new TypeError(`Expected safe string${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
476
476
  return e;
477
477
  }
478
- function Fn(e, t) {
478
+ function Wn(e, t) {
479
479
  if (t.min !== void 0 && e < t.min || t.max !== void 0 && e > t.max)
480
480
  throw RangeError(
481
481
  `Expected value${t != null && t.name ? ` for ${t.name}` : ""} in range: ${t.min ?? "-inf"}..${t.max ?? "inf"}; got: ${e}`
482
482
  );
483
483
  }
484
484
  function fa(e, t) {
485
- if (!Xt(e)) throw new TypeError(`Expected function${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
485
+ if (!er(e)) throw new TypeError(`Expected function${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
486
486
  return e;
487
487
  }
488
488
  function Ot(e, t) {
489
- if (ue(e)) return t && Fn(e, t), e;
489
+ if (ue(e)) return t && Wn(e, t), e;
490
490
  if (!F(e) || !e.match(/^-?\d+(\.\d+)?$/))
491
491
  throw new TypeError(`Expected number${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
492
492
  const n = parseFloat(e);
493
- return t && Fn(n, t), n;
493
+ return t && Wn(n, t), n;
494
494
  }
495
- function nr(e, t) {
495
+ function sr(e, t) {
496
496
  return Ot(e, t) | 0;
497
497
  }
498
498
  function ha(e, t) {
499
499
  if (e === "true") return !0;
500
500
  if (e === "false") return !1;
501
- if (!Un(e)) throw new TypeError(`Expected boolean${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
501
+ if (!Pn(e)) throw new TypeError(`Expected boolean${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
502
502
  return e;
503
503
  }
504
504
  function ma(e, t) {
@@ -513,9 +513,9 @@ var li = {};
513
513
  return e;
514
514
  }
515
515
  function ya(e, t) {
516
- if (er(e)) return e;
516
+ if (tr(e)) return e;
517
517
  const n = parseInt(e, 10);
518
- if (!er(n)) throw new TypeError(`Expected id${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
518
+ if (!tr(n)) throw new TypeError(`Expected id${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
519
519
  return n;
520
520
  }
521
521
  function va(e, t) {
@@ -550,11 +550,11 @@ var li = {};
550
550
  throw new TypeError(`Expected numeric dictionary${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
551
551
  return n;
552
552
  }
553
- function Wn(e) {
553
+ function Hn(e) {
554
554
  return F(e) && e.match(/^https?:\/\/.+/) !== null;
555
555
  }
556
556
  function ka(e, t) {
557
- if (!Wn(e)) throw new TypeError(`Expected url${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
557
+ if (!Hn(e)) throw new TypeError(`Expected url${t != null && t.name ? ` for ${t.name}` : ""}, got: ` + e);
558
558
  return e;
559
559
  }
560
560
  function Ea(e, t) {
@@ -566,13 +566,13 @@ var li = {};
566
566
  function Ta(e, t) {
567
567
  return t == null ? void 0 : e(t);
568
568
  }
569
- function Hn(e, t) {
569
+ function qn(e, t) {
570
570
  for (const [n, s] of Object.entries(t)) if (!s(e[n])) throw TypeError(`${n} in value does not exist or match shape`);
571
571
  for (const n of Object.keys(e)) if (!t[n]) throw TypeError(`${n} exists in value but not in shape`);
572
572
  return !0;
573
573
  }
574
574
  function Aa(e, t) {
575
- return e.every((n) => Hn(n, t));
575
+ return e.every((n) => qn(n, t));
576
576
  }
577
577
  function Ge(e, t = "json", n = 0) {
578
578
  if (ce(e, !1)) {
@@ -591,7 +591,7 @@ var li = {};
591
591
  return e.message && !s.includes("message") && s.unshift("message"), s.map((o) => `${o}=${JSON.stringify(Ge(e[o], "json", n + 1))}`).join(" ");
592
592
  }
593
593
  }
594
- return Qt(e) && (e = "undefined"), n === 0 ? JSON.stringify(e) : e;
594
+ return Xt(e) && (e = "undefined"), n === 0 ? JSON.stringify(e) : e;
595
595
  }
596
596
  function Oa(e, t) {
597
597
  if (F(e)) return e;
@@ -615,13 +615,13 @@ var li = {};
615
615
  const s = {};
616
616
  return we(s, e), we(s, t), we(s, n), s;
617
617
  }
618
- function qn(e, t) {
618
+ function Gn(e, t) {
619
619
  const n = {};
620
620
  for (const s of e) for (const o of Object.keys(s)) n[o] ? n[o] = t(n[o], s[o]) : n[o] = s[o];
621
621
  return n;
622
622
  }
623
623
  function $a(e) {
624
- return qn(e, (t, n) => t + n);
624
+ return Gn(e, (t, n) => t + n);
625
625
  }
626
626
  function Ra(e, t, n) {
627
627
  e[t] || (e[t] = []), e[t].push(n);
@@ -646,7 +646,7 @@ var li = {};
646
646
  }
647
647
  function Ua(e, t) {
648
648
  const n = [];
649
- for (let s = 0; s < e.length; s++) n.push(e[s]), s < e.length - 1 && (Xt(t) ? n.push(t()) : n.push(t));
649
+ for (let s = 0; s < e.length; s++) n.push(e[s]), s < e.length - 1 && (er(t) ? n.push(t()) : n.push(t));
650
650
  return n;
651
651
  }
652
652
  function Pa(e, t) {
@@ -695,7 +695,7 @@ var li = {};
695
695
  function Ja(e, t) {
696
696
  return e - (t - 1) / 2;
697
697
  }
698
- function Gn(e, t) {
698
+ function Jn(e, t) {
699
699
  const n = [];
700
700
  for (let s = e; s <= t; s++) n.push(s);
701
701
  return n;
@@ -706,11 +706,11 @@ var li = {};
706
706
  function Ya(e) {
707
707
  return /^[\u4E00-\u9FA5]+$/.test(e);
708
708
  }
709
- function sr(e, t = () => !1) {
709
+ function ir(e, t = () => !1) {
710
710
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").split("").map((n) => /[a-z0-9]/.test(n) || t(n) ? n : "-").join("").replace(/-+/g, "-").replace(/^-|-$/g, "");
711
711
  }
712
712
  function Qa(e) {
713
- return sr(e).replaceAll("-", "");
713
+ return ir(e).replaceAll("-", "");
714
714
  }
715
715
  function Xa(e) {
716
716
  return Rt(e.replace(/([A-Z])/g, " $1"));
@@ -719,7 +719,7 @@ var li = {};
719
719
  return e.split("-").map(Rt).join(" ");
720
720
  }
721
721
  function to(e) {
722
- return Xn(e.split("-").map(Rt).join(""));
722
+ return es(e.split("-").map(Rt).join(""));
723
723
  }
724
724
  function ro(e, t = ", ", n = " and ") {
725
725
  return !e || !e.length ? "" : e.length === 1 ? e[0] : e.length === 2 ? `${e[0]}${n}${e[1]}` : `${e.slice(0, e.length - 1).join(t)}${n}${e[e.length - 1]}`;
@@ -728,7 +728,7 @@ var li = {};
728
728
  return t + e.split("").join(t) + t;
729
729
  }
730
730
  function so(e) {
731
- return sr(e).replace(/-/g, "_").toUpperCase();
731
+ return ir(e).replace(/-/g, "_").toUpperCase();
732
732
  }
733
733
  function $t(e, t) {
734
734
  if (t.length === 0) return 0;
@@ -747,44 +747,44 @@ var li = {};
747
747
  for (const [n, s] of Object.entries(oo)) t = t.replaceAll(n, s);
748
748
  return t;
749
749
  }
750
- function Jn(e, t) {
750
+ function Kn(e, t) {
751
751
  const n = e.indexOf(t);
752
752
  return n === -1 ? null : e.slice(0, n);
753
753
  }
754
- function ir(e, t) {
754
+ function ar(e, t) {
755
755
  const n = e.indexOf(t);
756
756
  return n === -1 ? null : e.slice(n + t.length);
757
757
  }
758
- function ar(e, t) {
758
+ function or(e, t) {
759
759
  const n = e.lastIndexOf(t);
760
760
  return n === -1 ? null : e.slice(0, n);
761
761
  }
762
- function Kn(e, t) {
762
+ function Yn(e, t) {
763
763
  const n = e.lastIndexOf(t);
764
764
  return n === -1 ? null : e.slice(n + t.length);
765
765
  }
766
766
  function uo(e, t, n) {
767
- const s = ar(e, n);
768
- return s ? ir(s, t) : null;
767
+ const s = or(e, n);
768
+ return s ? ar(s, t) : null;
769
769
  }
770
770
  function lo(e, t, n) {
771
- const s = ir(e, t);
772
- return s ? Jn(s, n) : null;
771
+ const s = ar(e, t);
772
+ return s ? Kn(s, n) : null;
773
773
  }
774
- function or(e, t, n = !1) {
774
+ function cr(e, t, n = !1) {
775
775
  const s = n ? e.lastIndexOf(t) : e.indexOf(t);
776
776
  return s === -1 ? n ? [null, e] : [e, null] : [e.slice(0, s), e.slice(s + t.length)];
777
777
  }
778
- function Yn(e, t) {
778
+ function Qn(e, t) {
779
779
  let n = [e];
780
780
  for (const s of t) n = n.flatMap((o) => o.split(s));
781
781
  return n.filter((s) => s);
782
782
  }
783
- function cr(e) {
783
+ function ur(e) {
784
784
  const t = qe(e.split(/\\|\//g)), n = t.lastIndexOf(".", t.length - 1);
785
785
  return n <= 0 ? "" : t.slice(n + 1);
786
786
  }
787
- function ur(e) {
787
+ function lr(e) {
788
788
  const t = qe(e.split(/\\|\//g)), n = t.lastIndexOf(".", t.length - 1);
789
789
  return n <= 0 ? t : t.slice(0, n);
790
790
  }
@@ -796,23 +796,23 @@ var li = {};
796
796
  return n = Je(n.toLowerCase()).replaceAll(" ", ""), `${s}@${n}`;
797
797
  }
798
798
  function ho(e) {
799
- const t = ur(e), n = cr(e);
799
+ const t = lr(e), n = ur(e);
800
800
  return n ? `${t}.${n}` : t;
801
801
  }
802
802
  function mo(e) {
803
- const t = ur(e), n = cr(e);
803
+ const t = lr(e), n = ur(e);
804
804
  return { basename: t, extension: n, filename: n ? `${t}.${n}` : t };
805
805
  }
806
806
  function po(e, t = Math.random) {
807
- return e.replace(/\{(.+?)\}/g, (n, s) => Yt(s.split("|"), t));
807
+ return e.replace(/\{(.+?)\}/g, (n, s) => Qt(s.split("|"), t));
808
808
  }
809
- function Qn(e) {
809
+ function Xn(e) {
810
810
  const t = /\{(.+?)\}/, n = e.match(t);
811
811
  if (!n || !n.index) return [e];
812
812
  const s = n[1].split(","), o = e.slice(0, n.index), d = e.slice(n.index + n[0].length);
813
813
  let m = [];
814
814
  for (const v of s) {
815
- const p = Qn(o + v + d);
815
+ const p = Xn(o + v + d);
816
816
  m = m.concat(p);
817
817
  }
818
818
  return m;
@@ -827,21 +827,21 @@ var li = {};
827
827
  function Rt(e) {
828
828
  return e.charAt(0).toUpperCase() + e.slice(1);
829
829
  }
830
- function Xn(e) {
830
+ function es(e) {
831
831
  return e.charAt(0).toLowerCase() + e.slice(1);
832
832
  }
833
- function es(e) {
833
+ function ts(e) {
834
834
  if (!e) return !1;
835
835
  const t = e.charCodeAt(0);
836
836
  return t >= 65 && t <= 90 || t >= 97 && t <= 122;
837
837
  }
838
- function ts(e) {
838
+ function rs(e) {
839
839
  if (!e) return !1;
840
840
  const t = e.charCodeAt(0);
841
841
  return t >= 48 && t <= 57;
842
842
  }
843
843
  function Ke(e) {
844
- return es(e) || ts(e);
844
+ return ts(e) || rs(e);
845
845
  }
846
846
  const go = `
847
847
  \r.,?!:;"'\`(){}[]~@#$%^&*-+=|<>/\\`.split("");
@@ -854,16 +854,16 @@ var li = {};
854
854
  function wo(e, t, n, s, o) {
855
855
  return e.slice(0, t) + s + e.slice(t, t + n) + o + e.slice(t + n);
856
856
  }
857
- function rs(e, t, n = 0) {
857
+ function ns(e, t, n = 0) {
858
858
  const s = t.exec(e.slice(n));
859
859
  return s ? { index: s.index, match: s[0] } : null;
860
860
  }
861
- function ns(e, t, n = !0) {
861
+ function ss(e, t, n = !0) {
862
862
  if (!n) return t.every((o) => o instanceof RegExp ? o.test(e) : e.indexOf(o, 0) !== -1);
863
863
  let s = 0;
864
864
  for (const o of t)
865
865
  if (o instanceof RegExp) {
866
- const d = rs(e, o, s);
866
+ const d = ns(e, o, s);
867
867
  if (!d) return !1;
868
868
  s = d.index + d.match.length;
869
869
  } else {
@@ -877,7 +877,7 @@ var li = {};
877
877
  let s = 0;
878
878
  for (const o of t) {
879
879
  let d = !1;
880
- for (; !d && s < e.length; ) ns(e[s], o, n) && (d = !0), s++;
880
+ for (; !d && s < e.length; ) ss(e[s], o, n) && (d = !0), s++;
881
881
  if (!d) return !1;
882
882
  }
883
883
  return !0;
@@ -901,10 +901,10 @@ var li = {};
901
901
  for (let n = t; n < e.length; n++) if (e[n] === "#" && Ke(e[n + 1])) return n;
902
902
  return -1;
903
903
  }
904
- function ss(e, t, n = 0) {
904
+ function is(e, t, n = 0) {
905
905
  return e.slice(0, n).lastIndexOf(t);
906
906
  }
907
- function is(e, t = 0, n = "{", s = "}") {
907
+ function as(e, t = 0, n = "{", s = "}") {
908
908
  let o = 1;
909
909
  for (let d = t; d < e.length; d++)
910
910
  if (e.slice(d, d + s.length) === s) {
@@ -912,7 +912,7 @@ var li = {};
912
912
  } else e.slice(d, d + n.length) === n && o++;
913
913
  return -1;
914
914
  }
915
- function as(e, t) {
915
+ function os(e, t) {
916
916
  const n = t.wordBoundary ? $e(
917
917
  e,
918
918
  [
@@ -923,7 +923,7 @@ var li = {};
923
923
  t.start || 0
924
924
  ) : e.indexOf(t.opening, t.start || 0);
925
925
  if (n === -1) return null;
926
- const s = is(e, n + t.opening.length, t.opening, t.closing);
926
+ const s = as(e, n + t.opening.length, t.opening, t.closing);
927
927
  return s === -1 ? null : t.exclusive ? e.slice(n + t.opening.length, s) : e.slice(n, s + t.closing.length);
928
928
  }
929
929
  function Eo(e, t) {
@@ -939,7 +939,7 @@ var li = {};
939
939
  ) : e.indexOf(t.opening, t.start || 0);
940
940
  for (; ; ) {
941
941
  if (s === -1) return n;
942
- const o = as(e, { ...t, start: s });
942
+ const o = os(e, { ...t, start: s });
943
943
  if (!o) return n;
944
944
  n.push(o), s = t.wordBoundary ? $e(
945
945
  e,
@@ -1023,20 +1023,20 @@ var li = {};
1023
1023
  }
1024
1024
  return t;
1025
1025
  }
1026
- const os = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", cs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
1026
+ const cs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", us = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
1027
1027
  function Io(e) {
1028
- return us(e, os);
1028
+ return ls(e, cs);
1029
1029
  }
1030
1030
  function Mo(e) {
1031
- return ls(e, os);
1031
+ return ds(e, cs);
1032
1032
  }
1033
1033
  function $o(e) {
1034
- return us(e, cs);
1034
+ return ls(e, us);
1035
1035
  }
1036
1036
  function Ro(e) {
1037
- return ls(e, cs);
1037
+ return ds(e, us);
1038
1038
  }
1039
- function us(e, t) {
1039
+ function ls(e, t) {
1040
1040
  const n = "=", s = t.length;
1041
1041
  let o = 0, d = 0;
1042
1042
  const m = [];
@@ -1049,7 +1049,7 @@ var li = {};
1049
1049
  }
1050
1050
  return new Uint8Array(m);
1051
1051
  }
1052
- function ls(e, t) {
1052
+ function ds(e, t) {
1053
1053
  const n = t.length;
1054
1054
  let s = 0, o = 0, d = "";
1055
1055
  for (let m = 0; m < e.length; m++)
@@ -1079,7 +1079,7 @@ var li = {};
1079
1079
  }
1080
1080
  return o;
1081
1081
  }
1082
- function lr(e, t, n) {
1082
+ function dr(e, t, n) {
1083
1083
  const s = [];
1084
1084
  for (const o of n) o !== t && s.push(e.replace(t, o));
1085
1085
  return s;
@@ -1097,12 +1097,12 @@ var li = {};
1097
1097
  ), d = [];
1098
1098
  for (const m of o) {
1099
1099
  const v = m.variants.filter((k) => k !== m.avoid), p = v.find((k) => e.includes(k));
1100
- if (p && (Mt(d, lr(e, p, v)), d.length >= n)) break;
1100
+ if (p && (Mt(d, dr(e, p, v)), d.length >= n)) break;
1101
1101
  }
1102
1102
  if (d.length < n)
1103
1103
  for (const m of o) {
1104
1104
  const v = m.variants.find((p) => e.includes(p));
1105
- if (v && (Mt(d, lr(e, v, m.variants)), d.length >= n)) break;
1105
+ if (v && (Mt(d, dr(e, v, m.variants)), d.length >= n)) break;
1106
1106
  }
1107
1107
  return d.slice(0, n);
1108
1108
  }
@@ -1117,7 +1117,7 @@ var li = {};
1117
1117
  function Zo(e) {
1118
1118
  return e.replace(/<[^>]*>/g, "");
1119
1119
  }
1120
- function ds(e) {
1120
+ function fs(e) {
1121
1121
  const t = e.lastIndexOf(" ");
1122
1122
  if (t === -1) return { line: e, rest: "" };
1123
1123
  const n = e.slice(0, t), s = e.slice(t + 1);
@@ -1132,7 +1132,7 @@ var li = {};
1132
1132
  for (let m = 0; m < e.length; m++) {
1133
1133
  const v = e[m], p = n[v] || 1;
1134
1134
  if (o += v, d += p, d > t) {
1135
- const { line: k, rest: M } = ds(o);
1135
+ const { line: k, rest: M } = fs(o);
1136
1136
  s.push(k), o = M, d = M.split("").map((U) => n[U] || 1).reduce((U, je) => U + je, 0);
1137
1137
  }
1138
1138
  }
@@ -1149,17 +1149,17 @@ var li = {};
1149
1149
  }
1150
1150
  return n[e.length][t.length];
1151
1151
  }
1152
- function dr(e, t) {
1152
+ function fr(e, t) {
1153
1153
  return new RegExp(`\\b${t}\\b`).test(e);
1154
1154
  }
1155
1155
  function Vo(e, t, n) {
1156
- return n === "any" ? t.some((s) => dr(e, s)) : t.every((s) => dr(e, s));
1156
+ return n === "any" ? t.some((s) => fr(e, s)) : t.every((s) => fr(e, s));
1157
1157
  }
1158
1158
  function Fo(e) {
1159
1159
  const t = {}, n = e.match(/([a-z\-]+)="([^"]+)"/g);
1160
1160
  if (n)
1161
1161
  for (const s of n) {
1162
- const [o, d] = or(s, "=");
1162
+ const [o, d] = cr(s, "=");
1163
1163
  t[o] = d.slice(1, d.length - 1);
1164
1164
  }
1165
1165
  return t;
@@ -1170,10 +1170,10 @@ var li = {};
1170
1170
  return s;
1171
1171
  }
1172
1172
  function Wo(e, t, n = "$", s = ":") {
1173
- for (const o in t) e = fs(e, o, t[o], n, s);
1174
- return e = hs(e), e;
1173
+ for (const o in t) e = hs(e, o, t[o], n, s);
1174
+ return e = ms(e), e;
1175
1175
  }
1176
- function fs(e, t, n, s = "$", o = ":") {
1176
+ function hs(e, t, n, s = "$", o = ":") {
1177
1177
  if (n === "") return e;
1178
1178
  let d = e.indexOf(`${s}${t}`);
1179
1179
  for (; d !== -1; ) {
@@ -1188,7 +1188,7 @@ var li = {};
1188
1188
  }
1189
1189
  return e;
1190
1190
  }
1191
- function hs(e, t = "$", n = ":") {
1191
+ function ms(e, t = "$", n = ":") {
1192
1192
  let s = e.indexOf(t);
1193
1193
  for (; s !== -1; ) {
1194
1194
  const o = Ct(e, s + 1);
@@ -1205,7 +1205,7 @@ var li = {};
1205
1205
  function Ho(e, t) {
1206
1206
  let n = e.indexOf("](");
1207
1207
  for (; n !== -1; ) {
1208
- const s = ss(e, "[", n), o = e.indexOf(")", n);
1208
+ const s = is(e, "[", n), o = e.indexOf(")", n);
1209
1209
  if (s !== -1 && o !== -1) {
1210
1210
  const [d, m] = e.slice(s + 1, o).split("]("), v = t(d, m);
1211
1211
  e = e.slice(0, s) + v + e.slice(o + 1);
@@ -1214,7 +1214,7 @@ var li = {};
1214
1214
  }
1215
1215
  return e;
1216
1216
  }
1217
- function ms(e, t = !0) {
1217
+ function ps(e, t = !0) {
1218
1218
  const n = Object.entries(e).filter(([s, o]) => o != null).map(([s, o]) => `${s}=${encodeURIComponent(o)}`).join("&");
1219
1219
  return n ? (t ? "?" : "") + n : "";
1220
1220
  }
@@ -1248,11 +1248,11 @@ var li = {};
1248
1248
  }
1249
1249
  function Qo(e, t = ":") {
1250
1250
  return Object.fromEntries(
1251
- e.map((n) => or(n, t)).map((n) => n[0] && n[1] ? [Je(n[0]), Je(n[1])] : null).filter((n) => n)
1251
+ e.map((n) => cr(n, t)).map((n) => n[0] && n[1] ? [Je(n[0]), Je(n[1])] : null).filter((n) => n)
1252
1252
  );
1253
1253
  }
1254
1254
  function Xo(e, t, n) {
1255
- return vs(e, t) + ms(n || {});
1255
+ return ws(e, t) + ps(n || {});
1256
1256
  }
1257
1257
  function ec(e, t = ",", n = '"') {
1258
1258
  const s = [];
@@ -1306,7 +1306,7 @@ var li = {};
1306
1306
  function lc(e) {
1307
1307
  let [t, n] = e.split(":");
1308
1308
  ue(parseInt(t, 10)) || (t = "0"), ue(parseInt(n, 10)) || (n = "0");
1309
- let s = gr(nr(t), 0, 23), o = gr(nr(n), 0, 59);
1309
+ let s = yr(sr(t), 0, 23), o = yr(sr(n), 0, 59);
1310
1310
  return `${K(s)}:${K(o)}`;
1311
1311
  }
1312
1312
  function Nt(e) {
@@ -1336,10 +1336,10 @@ var li = {};
1336
1336
  const n = new Date((t == null ? void 0 : t.now) || Date.now()), s = (t == null ? void 0 : t.labels) || dc, o = Me(e) ? e : new Date(e);
1337
1337
  if (be(n) === be(o)) return s.today(o.getUTCHours(), o.getUTCMinutes(), o.getUTCHours() > 12);
1338
1338
  if (be(n) - be(o) === 1) return s.yesterday();
1339
- const d = hr(o);
1339
+ const d = mr(o);
1340
1340
  return be(n) - be(o) < 7 ? s[d.day]() : s.weeks(Math.round((n.getTime() - o.getTime()) / 6048e5));
1341
1341
  }
1342
- const ps = {
1342
+ const gs = {
1343
1343
  now: () => "A few seconds",
1344
1344
  seconds: (e) => `${e} seconds`,
1345
1345
  minutes: (e) => `${e} minutes`,
@@ -1347,21 +1347,21 @@ var li = {};
1347
1347
  days: (e) => `${e} days`,
1348
1348
  weeks: (e) => `${e} weeks`
1349
1349
  };
1350
- function gs(e, t) {
1351
- const n = (t == null ? void 0 : t.now) ?? Date.now(), s = (t == null ? void 0 : t.labels) || ps, o = a.Types.isDate(e) ? e.getTime() : e;
1350
+ function ys(e, t) {
1351
+ const n = (t == null ? void 0 : t.now) ?? Date.now(), s = (t == null ? void 0 : t.labels) || gs, o = a.Types.isDate(e) ? e.getTime() : e;
1352
1352
  let d = (n - o) / 1e3;
1353
1353
  return d < 10 ? s.now() : d < 120 ? s.seconds(Math.floor(d)) : (d /= 60, d < 120 ? s.minutes(Math.floor(d)) : (d /= 60, d < 48 ? s.hours(Math.floor(d)) : (d /= 24, d < 14 ? s.days(Math.floor(d)) : (d /= 7, s.weeks(Math.floor(d))))));
1354
1354
  }
1355
- function hc(e, t = ps) {
1356
- return gs(0, { now: e * 1e3, labels: t });
1355
+ function hc(e, t = gs) {
1356
+ return ys(0, { now: e * 1e3, labels: t });
1357
1357
  }
1358
1358
  function mc(e, t, n) {
1359
1359
  const s = ((n == null ? void 0 : n.now) ?? Date.now()) - e, o = Math.floor(s / t), d = t / ((n == null ? void 0 : n.precision) ?? 1) - Math.ceil(s % t / ((n == null ? void 0 : n.precision) ?? 1));
1360
1360
  return { cycles: o, remaining: d };
1361
1361
  }
1362
- const fr = {};
1362
+ const hr = {};
1363
1363
  function pc(e, t) {
1364
- return !fr[e] || Date.now() > fr[e] ? (fr[e] = Date.now() + t, !0) : !1;
1364
+ return !hr[e] || Date.now() > hr[e] ? (hr[e] = Date.now() + t, !0) : !1;
1365
1365
  }
1366
1366
  const gc = { s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
1367
1367
  function yc(e, t, n) {
@@ -1381,14 +1381,14 @@ var li = {};
1381
1381
  5: "friday",
1382
1382
  6: "saturday"
1383
1383
  };
1384
- function ys(e) {
1384
+ function vs(e) {
1385
1385
  return { zeroBasedIndex: e, day: wc[e] };
1386
1386
  }
1387
- function hr(e) {
1388
- return ys(e.getDay());
1387
+ function mr(e) {
1388
+ return vs(e.getDay());
1389
1389
  }
1390
1390
  function bc(e) {
1391
- return hr(new Date(e));
1391
+ return mr(new Date(e));
1392
1392
  }
1393
1393
  function _c(e) {
1394
1394
  return e * 1e3;
@@ -1465,17 +1465,17 @@ var li = {};
1465
1465
  function Ic(e) {
1466
1466
  return e.replace(/ +/g, " ").replace(/^ /gm, "");
1467
1467
  }
1468
- const mr = {};
1468
+ const pr = {};
1469
1469
  async function Mc(e, t, n) {
1470
- const s = Date.now(), o = mr[e];
1470
+ const s = Date.now(), o = pr[e];
1471
1471
  if (o && o.validUntil > s) return o.value;
1472
1472
  const d = await n(), m = s + t;
1473
- return mr[e] = { value: d, validUntil: m }, d;
1473
+ return pr[e] = { value: d, validUntil: m }, d;
1474
1474
  }
1475
1475
  function $c(e) {
1476
- delete mr[e];
1476
+ delete pr[e];
1477
1477
  }
1478
- function vs(...e) {
1478
+ function ws(...e) {
1479
1479
  return e.filter((t) => t).join("/").replace(new RegExp("(?<!:)\\/+", "g"), "/");
1480
1480
  }
1481
1481
  function Rc(e, t, n, s, o = !0) {
@@ -1502,23 +1502,23 @@ var li = {};
1502
1502
  for (; e = e.replace(/(\w+)[\s,']+\w+/g, "$1"), e.length !== t; ) t = e.length;
1503
1503
  return e = e.replaceAll(/[A-Z][a-zA-Z0-9]*/g, "A"), e = e.replaceAll(/[a-z][a-zA-Z0-9]*/g, "a"), e = e.replaceAll(/[\u4E00-\u9FA5]+/g, "Z"), e;
1504
1504
  }
1505
- function ws(e) {
1505
+ function bs(e) {
1506
1506
  const t = Object.keys(e).sort((s, o) => s.localeCompare(o)), n = {};
1507
1507
  for (const s of t) n[s] = _e(e[s]);
1508
1508
  return n;
1509
1509
  }
1510
- function bs(e) {
1510
+ function _s(e) {
1511
1511
  const t = [];
1512
1512
  return e.sort((n, s) => JSON.stringify(_e(n)).localeCompare(JSON.stringify(_e(s)))).forEach((n) => t.push(_e(n))), t;
1513
1513
  }
1514
1514
  function _e(e) {
1515
- return Array.isArray(e) ? bs(e) : ce(e) ? ws(e) : e;
1515
+ return Array.isArray(e) ? _s(e) : ce(e) ? bs(e) : e;
1516
1516
  }
1517
- function _s(e, t) {
1517
+ function xs(e, t) {
1518
1518
  return JSON.stringify(_e(e)) === JSON.stringify(_e(t));
1519
1519
  }
1520
1520
  function Dc(...e) {
1521
- for (let t = 1; t < e.length; t++) if (!_s(e[t - 1], e[t])) return !1;
1521
+ for (let t = 1; t < e.length; t++) if (!xs(e[t - 1], e[t])) return !1;
1522
1522
  return !0;
1523
1523
  }
1524
1524
  function Uc(e) {
@@ -1557,12 +1557,12 @@ var li = {};
1557
1557
  const n = Object.keys(e), s = Object.keys(t);
1558
1558
  return { uniqueToA: n.filter((o) => !s.includes(o)), uniqueToB: s.filter((o) => !n.includes(o)) };
1559
1559
  }
1560
- function xs(e) {
1560
+ function ks(e) {
1561
1561
  const t = Object.keys(e);
1562
1562
  return t[Math.floor(Math.random() * t.length)];
1563
1563
  }
1564
1564
  function Vc(e, t) {
1565
- const n = xs(e);
1565
+ const n = ks(e);
1566
1566
  return e[n] = t(e[n]), n;
1567
1567
  }
1568
1568
  function Fc(e) {
@@ -1589,7 +1589,7 @@ var li = {};
1589
1589
  "eth",
1590
1590
  "dai",
1591
1591
  "decillion"
1592
- ], ks = ["K", "M", "B", "T", "Qa", "Qi", "Sx", "Sp", "O", "N", "gwei", "bzz", "eth", "btc", "dai", "D"];
1592
+ ], Es = ["K", "M", "B", "T", "Qa", "Qi", "Sx", "Sp", "O", "N", "gwei", "bzz", "eth", "btc", "dai", "D"];
1593
1593
  function Hc(e, t, n) {
1594
1594
  let s = e.length - t;
1595
1595
  if (s <= 0) return "0." + "0".repeat(-s) + e + (n ? " " + n : "");
@@ -1597,19 +1597,19 @@ var li = {};
1597
1597
  return o === "" && (o = "0"), o + "." + d + (n ? " " + n : "");
1598
1598
  }
1599
1599
  function qc(e, t) {
1600
- const n = (t == null ? void 0 : t.longForm) ?? !1, s = t != null && t.unit ? ` ${t.unit}` : "", o = n ? Wc : ks, d = (t == null ? void 0 : t.precision) ?? 1;
1600
+ const n = (t == null ? void 0 : t.longForm) ?? !1, s = t != null && t.unit ? ` ${t.unit}` : "", o = n ? Wc : Es, d = (t == null ? void 0 : t.precision) ?? 1;
1601
1601
  if (e < le[0]) return `${e}${s}`;
1602
1602
  for (let m = 0; m < le.length - 1; m++)
1603
1603
  if (e < le[m + 1]) return `${(e / le[m]).toFixed(d)}${n ? " " : ""}${o[m]}${s}`;
1604
1604
  return `${(e / le[le.length - 1]).toFixed(d)}${n ? " " : ""}${o[le.length - 1]}${s}`;
1605
1605
  }
1606
- function pr(e) {
1606
+ function gr(e) {
1607
1607
  const t = parseFloat(e);
1608
1608
  if (isNaN(t)) throw Error("makeNumber got NaN for input");
1609
- const n = e.replace(/^-?[0-9.]+/, "").trim(), s = ks.findIndex((o) => o.toLowerCase() === n.toLowerCase());
1609
+ const n = e.replace(/^-?[0-9.]+/, "").trim(), s = Es.findIndex((o) => o.toLowerCase() === n.toLowerCase());
1610
1610
  return s === -1 ? t : t * le[s];
1611
1611
  }
1612
- function gr(e, t, n) {
1612
+ function yr(e, t, n) {
1613
1613
  return e < t ? t : e > n ? n : e;
1614
1614
  }
1615
1615
  function Gc(e, t, n) {
@@ -1635,7 +1635,7 @@ var li = {};
1635
1635
  }
1636
1636
  function eu(e) {
1637
1637
  for (const t of Object.keys(e))
1638
- (Dn(e[t]) || Array.isArray(e[t]) && e[t].every((n) => n == null)) && delete e[t];
1638
+ (Un(e[t]) || Array.isArray(e[t]) && e[t].every((n) => n == null)) && delete e[t];
1639
1639
  return e;
1640
1640
  }
1641
1641
  function tu(e) {
@@ -1716,21 +1716,21 @@ var li = {};
1716
1716
  function hu(e, t = !1, n) {
1717
1717
  return jt({}, e, n || "", !1, t);
1718
1718
  }
1719
- function Es(e) {
1719
+ function Ss(e) {
1720
1720
  if (!ce(e)) return e;
1721
1721
  const t = Array.isArray(e) ? [] : {};
1722
1722
  for (const [n, s] of Object.entries(e))
1723
1723
  Array.isArray(s) ? ve(
1724
1724
  t,
1725
1725
  n,
1726
- s.map((o) => Es(o))
1726
+ s.map((o) => Ss(o))
1727
1727
  ) : ve(t, n, s);
1728
1728
  return t;
1729
1729
  }
1730
1730
  function mu(e, t, n) {
1731
1731
  return t[e] ? t[e] : n;
1732
1732
  }
1733
- function Ss(e, t) {
1733
+ function Ts(e, t) {
1734
1734
  const n = {};
1735
1735
  for (const s of e) {
1736
1736
  const o = t(s);
@@ -1751,30 +1751,30 @@ var li = {};
1751
1751
  for (let s = 0; s < e.length; s += t) n.push(e.slice(s, s + t));
1752
1752
  return n;
1753
1753
  }
1754
- function Ts(e, t) {
1754
+ function As(e, t) {
1755
1755
  const n = Math.ceil(e.length / t), s = [];
1756
1756
  for (let o = 0; o < e.length; o += n) s.push(e.slice(o, o + n));
1757
1757
  return s;
1758
1758
  }
1759
- function As(e, t) {
1759
+ function Os(e, t) {
1760
1760
  const n = [], s = Math.ceil(e.length / t);
1761
1761
  for (let o = 0; o < s; o++) n.push(e.slice(o * t, o * t + t));
1762
1762
  return n;
1763
1763
  }
1764
1764
  function yu(e, t) {
1765
1765
  const n = Math.ceil(e.length / t);
1766
- return As(e, n);
1766
+ return Os(e, n);
1767
1767
  }
1768
1768
  function vu(e, t) {
1769
- return Object.values(Ss(e, t));
1769
+ return Object.values(Ts(e, t));
1770
1770
  }
1771
1771
  function wu(e, t, n, s, o) {
1772
1772
  const d = t ? e.map(t) : e, m = {};
1773
1773
  for (const p of d) m[p] = (m[p] || 0) + 1;
1774
- const v = s ? Os(m, o ? (p, k) => p[1] - k[1] : (p, k) => k[1] - p[1]) : m;
1774
+ const v = s ? Is(m, o ? (p, k) => p[1] - k[1] : (p, k) => k[1] - p[1]) : m;
1775
1775
  return n ? Object.keys(v) : v;
1776
1776
  }
1777
- function Os(e, t) {
1777
+ function Is(e, t) {
1778
1778
  return Object.fromEntries(Object.entries(e).sort(t));
1779
1779
  }
1780
1780
  function bu(e) {
@@ -1792,7 +1792,7 @@ var li = {};
1792
1792
  function xu(e, t, n) {
1793
1793
  for (const s of e) s[t] = n;
1794
1794
  }
1795
- function yr(e, t) {
1795
+ function vr(e, t) {
1796
1796
  const n = [];
1797
1797
  let s = [];
1798
1798
  return e.forEach((o, d) => {
@@ -1805,7 +1805,7 @@ var li = {};
1805
1805
  function Eu() {
1806
1806
  return { map: /* @__PURE__ */ new Map(), keys: [] };
1807
1807
  }
1808
- function Is(e, t, n, s = 100) {
1808
+ function Ms(e, t, n, s = 100) {
1809
1809
  if (e.map.has(t)) {
1810
1810
  const o = e.keys.indexOf(t);
1811
1811
  e.keys.splice(o, 1);
@@ -1826,7 +1826,7 @@ var li = {};
1826
1826
  }
1827
1827
  }
1828
1828
  function Tu(e, t, n, s, o = 100) {
1829
- Is(e, t, { validUntil: Date.now() + s, data: n }, o);
1829
+ Ms(e, t, { validUntil: Date.now() + s, data: n }, o);
1830
1830
  }
1831
1831
  function Au(e, t) {
1832
1832
  const n = e.map.get(t);
@@ -1938,7 +1938,7 @@ var li = {};
1938
1938
  };
1939
1939
  return m.forEach(v), m;
1940
1940
  }
1941
- function Ms(e, t) {
1941
+ function $s(e, t) {
1942
1942
  if (Math.log2(e.length) % 1 !== 0) throw new Error("Array length must be a power of 2");
1943
1943
  let n = [...e];
1944
1944
  for (; n.length > 1; ) {
@@ -1958,17 +1958,17 @@ var li = {};
1958
1958
  n.set(o, s), s += o.length;
1959
1959
  }), n;
1960
1960
  }
1961
- function $s(e) {
1961
+ function Rs(e) {
1962
1962
  return e[0] === 137 && e[1] === 80 && e[2] === 78 && e[3] === 71;
1963
1963
  }
1964
- function Rs(e) {
1964
+ function Cs(e) {
1965
1965
  return e[0] === 255 && e[1] === 216;
1966
1966
  }
1967
- function Cs(e) {
1967
+ function Ns(e) {
1968
1968
  return e[8] === 87 && e[9] === 69 && e[10] === 66 && e[11] === 80;
1969
1969
  }
1970
1970
  function Pu(e) {
1971
- return $s(e) || Rs(e) || Cs(e);
1971
+ return Rs(e) || Cs(e) || Ns(e);
1972
1972
  }
1973
1973
  function Zu(e) {
1974
1974
  return new Uint8Array([e]);
@@ -1990,7 +1990,7 @@ var li = {};
1990
1990
  function Fu(e, t) {
1991
1991
  return new DataView(e.buffer).getUint32(e.byteOffset, t === "LE");
1992
1992
  }
1993
- function vr(e, t) {
1993
+ function wr(e, t) {
1994
1994
  const n = new ArrayBuffer(8);
1995
1995
  return new DataView(n).setBigUint64(0, BigInt(e), t === "LE"), new Uint8Array(n);
1996
1996
  }
@@ -2022,12 +2022,12 @@ var li = {};
2022
2022
  for (const o of t) n.push(e.subarray(s, s + o)), s += o;
2023
2023
  return n;
2024
2024
  }
2025
- function wr(e, t) {
2025
+ function br(e, t) {
2026
2026
  const n = [];
2027
2027
  for (let s = 0; s < e.length; s += t) n.push(e.subarray(s, s + t));
2028
2028
  return n;
2029
2029
  }
2030
- const Ns = [
2030
+ const js = [
2031
2031
  0,
2032
2032
  1,
2033
2033
  0,
@@ -2081,21 +2081,21 @@ var li = {};
2081
2081
  for (let t = 0; t < 24; t++) {
2082
2082
  const n = e[0] ^ e[10] ^ e[20] ^ e[30] ^ e[40], s = e[1] ^ e[11] ^ e[21] ^ e[31] ^ e[41], o = e[2] ^ e[12] ^ e[22] ^ e[32] ^ e[42], d = e[3] ^ e[13] ^ e[23] ^ e[33] ^ e[43], m = e[4] ^ e[14] ^ e[24] ^ e[34] ^ e[44], v = e[5] ^ e[15] ^ e[25] ^ e[35] ^ e[45], p = e[6] ^ e[16] ^ e[26] ^ e[36] ^ e[46], k = e[7] ^ e[17] ^ e[27] ^ e[37] ^ e[47], M = e[8] ^ e[18] ^ e[28] ^ e[38] ^ e[48], U = e[9] ^ e[19] ^ e[29] ^ e[39] ^ e[49], je = o << 1 | d >>> 31, Il = d << 1 | o >>> 31, Xe = M ^ je, et = U ^ Il, Ml = m << 1 | v >>> 31, $l = v << 1 | m >>> 31, tt = n ^ Ml, rt = s ^ $l, Rl = p << 1 | k >>> 31, Cl = k << 1 | p >>> 31, nt = o ^ Rl, st = d ^ Cl, Nl = M << 1 | U >>> 31, jl = U << 1 | M >>> 31, it = m ^ Nl, at = v ^ jl, Dl = n << 1 | s >>> 31, Ul = s << 1 | n >>> 31, ot = p ^ Dl, ct = k ^ Ul;
2083
2083
  e[0] ^= Xe, e[1] ^= et, e[2] ^= tt, e[3] ^= rt, e[4] ^= nt, e[5] ^= st, e[6] ^= it, e[7] ^= at, e[8] ^= ot, e[9] ^= ct, e[10] ^= Xe, e[11] ^= et, e[12] ^= tt, e[13] ^= rt, e[14] ^= nt, e[15] ^= st, e[16] ^= it, e[17] ^= at, e[18] ^= ot, e[19] ^= ct, e[20] ^= Xe, e[21] ^= et, e[22] ^= tt, e[23] ^= rt, e[24] ^= nt, e[25] ^= st, e[26] ^= it, e[27] ^= at, e[28] ^= ot, e[29] ^= ct, e[30] ^= Xe, e[31] ^= et, e[32] ^= tt, e[33] ^= rt, e[34] ^= nt, e[35] ^= st, e[36] ^= it, e[37] ^= at, e[38] ^= ot, e[39] ^= ct, e[40] ^= Xe, e[41] ^= et, e[42] ^= tt, e[43] ^= rt, e[44] ^= nt, e[45] ^= st, e[46] ^= it, e[47] ^= at, e[48] ^= ot, e[49] ^= ct;
2084
- const Sr = e[0], Tr = e[1], Ar = e[2] << 1 | e[3] >>> 31, Or = e[3] << 1 | e[2] >>> 31, Ir = e[5] << 30 | e[4] >>> 2, Mr = e[4] << 30 | e[5] >>> 2, $r = e[6] << 28 | e[7] >>> 4, Rr = e[7] << 28 | e[6] >>> 4, Cr = e[8] << 27 | e[9] >>> 5, Nr = e[9] << 27 | e[8] >>> 5, jr = e[11] << 4 | e[10] >>> 28, Dr = e[10] << 4 | e[11] >>> 28, Ur = e[13] << 12 | e[12] >>> 20, Pr = e[12] << 12 | e[13] >>> 20, Zr = e[14] << 6 | e[15] >>> 26, Br = e[15] << 6 | e[14] >>> 26, Lr = e[17] << 23 | e[16] >>> 9, zr = e[16] << 23 | e[17] >>> 9, Vr = e[18] << 20 | e[19] >>> 12, Fr = e[19] << 20 | e[18] >>> 12, Wr = e[20] << 3 | e[21] >>> 29, Hr = e[21] << 3 | e[20] >>> 29, qr = e[22] << 10 | e[23] >>> 22, Gr = e[23] << 10 | e[22] >>> 22, Jr = e[25] << 11 | e[24] >>> 21, Kr = e[24] << 11 | e[25] >>> 21, Yr = e[26] << 25 | e[27] >>> 7, Qr = e[27] << 25 | e[26] >>> 7, Xr = e[29] << 7 | e[28] >>> 25, en = e[28] << 7 | e[29] >>> 25, tn = e[31] << 9 | e[30] >>> 23, rn = e[30] << 9 | e[31] >>> 23, nn = e[33] << 13 | e[32] >>> 19, sn = e[32] << 13 | e[33] >>> 19, an = e[34] << 15 | e[35] >>> 17, on = e[35] << 15 | e[34] >>> 17, cn = e[36] << 21 | e[37] >>> 11, un = e[37] << 21 | e[36] >>> 11, ln = e[38] << 8 | e[39] >>> 24, dn = e[39] << 8 | e[38] >>> 24, fn = e[40] << 18 | e[41] >>> 14, hn = e[41] << 18 | e[40] >>> 14, mn = e[42] << 2 | e[43] >>> 30, pn = e[43] << 2 | e[42] >>> 30, gn = e[45] << 29 | e[44] >>> 3, yn = e[44] << 29 | e[45] >>> 3, vn = e[47] << 24 | e[46] >>> 8, wn = e[46] << 24 | e[47] >>> 8, bn = e[48] << 14 | e[49] >>> 18, _n = e[49] << 14 | e[48] >>> 18;
2085
- e[0] = Sr ^ ~Ur & Jr, e[1] = Tr ^ ~Pr & Kr, e[2] = Ur ^ ~Jr & cn, e[3] = Pr ^ ~Kr & un, e[4] = Jr ^ ~cn & bn, e[5] = Kr ^ ~un & _n, e[6] = cn ^ ~bn & Sr, e[7] = un ^ ~_n & Tr, e[8] = bn ^ ~Sr & Ur, e[9] = _n ^ ~Tr & Pr, e[10] = $r ^ ~Vr & Wr, e[11] = Rr ^ ~Fr & Hr, e[12] = Vr ^ ~Wr & nn, e[13] = Fr ^ ~Hr & sn, e[14] = Wr ^ ~nn & gn, e[15] = Hr ^ ~sn & yn, e[16] = nn ^ ~gn & $r, e[17] = sn ^ ~yn & Rr, e[18] = gn ^ ~$r & Vr, e[19] = yn ^ ~Rr & Fr, e[20] = Ar ^ ~Zr & Yr, e[21] = Or ^ ~Br & Qr, e[22] = Zr ^ ~Yr & ln, e[23] = Br ^ ~Qr & dn, e[24] = Yr ^ ~ln & fn, e[25] = Qr ^ ~dn & hn, e[26] = ln ^ ~fn & Ar, e[27] = dn ^ ~hn & Or, e[28] = fn ^ ~Ar & Zr, e[29] = hn ^ ~Or & Br, e[30] = Cr ^ ~jr & qr, e[31] = Nr ^ ~Dr & Gr, e[32] = jr ^ ~qr & an, e[33] = Dr ^ ~Gr & on, e[34] = qr ^ ~an & vn, e[35] = Gr ^ ~on & wn, e[36] = an ^ ~vn & Cr, e[37] = on ^ ~wn & Nr, e[38] = vn ^ ~Cr & jr, e[39] = wn ^ ~Nr & Dr, e[40] = Ir ^ ~Lr & Xr, e[41] = Mr ^ ~zr & en, e[42] = Lr ^ ~Xr & tn, e[43] = zr ^ ~en & rn, e[44] = Xr ^ ~tn & mn, e[45] = en ^ ~rn & pn, e[46] = tn ^ ~mn & Ir, e[47] = rn ^ ~pn & Mr, e[48] = mn ^ ~Ir & Lr, e[49] = pn ^ ~Mr & zr, e[0] ^= Ns[t * 2], e[1] ^= Ns[t * 2 + 1];
2084
+ const Tr = e[0], Ar = e[1], Or = e[2] << 1 | e[3] >>> 31, Ir = e[3] << 1 | e[2] >>> 31, Mr = e[5] << 30 | e[4] >>> 2, $r = e[4] << 30 | e[5] >>> 2, Rr = e[6] << 28 | e[7] >>> 4, Cr = e[7] << 28 | e[6] >>> 4, Nr = e[8] << 27 | e[9] >>> 5, jr = e[9] << 27 | e[8] >>> 5, Dr = e[11] << 4 | e[10] >>> 28, Ur = e[10] << 4 | e[11] >>> 28, Pr = e[13] << 12 | e[12] >>> 20, Zr = e[12] << 12 | e[13] >>> 20, Br = e[14] << 6 | e[15] >>> 26, Lr = e[15] << 6 | e[14] >>> 26, zr = e[17] << 23 | e[16] >>> 9, Vr = e[16] << 23 | e[17] >>> 9, Fr = e[18] << 20 | e[19] >>> 12, Wr = e[19] << 20 | e[18] >>> 12, Hr = e[20] << 3 | e[21] >>> 29, qr = e[21] << 3 | e[20] >>> 29, Gr = e[22] << 10 | e[23] >>> 22, Jr = e[23] << 10 | e[22] >>> 22, Kr = e[25] << 11 | e[24] >>> 21, Yr = e[24] << 11 | e[25] >>> 21, Qr = e[26] << 25 | e[27] >>> 7, Xr = e[27] << 25 | e[26] >>> 7, en = e[29] << 7 | e[28] >>> 25, tn = e[28] << 7 | e[29] >>> 25, rn = e[31] << 9 | e[30] >>> 23, nn = e[30] << 9 | e[31] >>> 23, sn = e[33] << 13 | e[32] >>> 19, an = e[32] << 13 | e[33] >>> 19, on = e[34] << 15 | e[35] >>> 17, cn = e[35] << 15 | e[34] >>> 17, un = e[36] << 21 | e[37] >>> 11, ln = e[37] << 21 | e[36] >>> 11, dn = e[38] << 8 | e[39] >>> 24, fn = e[39] << 8 | e[38] >>> 24, hn = e[40] << 18 | e[41] >>> 14, mn = e[41] << 18 | e[40] >>> 14, pn = e[42] << 2 | e[43] >>> 30, gn = e[43] << 2 | e[42] >>> 30, yn = e[45] << 29 | e[44] >>> 3, vn = e[44] << 29 | e[45] >>> 3, wn = e[47] << 24 | e[46] >>> 8, bn = e[46] << 24 | e[47] >>> 8, _n = e[48] << 14 | e[49] >>> 18, xn = e[49] << 14 | e[48] >>> 18;
2085
+ e[0] = Tr ^ ~Pr & Kr, e[1] = Ar ^ ~Zr & Yr, e[2] = Pr ^ ~Kr & un, e[3] = Zr ^ ~Yr & ln, e[4] = Kr ^ ~un & _n, e[5] = Yr ^ ~ln & xn, e[6] = un ^ ~_n & Tr, e[7] = ln ^ ~xn & Ar, e[8] = _n ^ ~Tr & Pr, e[9] = xn ^ ~Ar & Zr, e[10] = Rr ^ ~Fr & Hr, e[11] = Cr ^ ~Wr & qr, e[12] = Fr ^ ~Hr & sn, e[13] = Wr ^ ~qr & an, e[14] = Hr ^ ~sn & yn, e[15] = qr ^ ~an & vn, e[16] = sn ^ ~yn & Rr, e[17] = an ^ ~vn & Cr, e[18] = yn ^ ~Rr & Fr, e[19] = vn ^ ~Cr & Wr, e[20] = Or ^ ~Br & Qr, e[21] = Ir ^ ~Lr & Xr, e[22] = Br ^ ~Qr & dn, e[23] = Lr ^ ~Xr & fn, e[24] = Qr ^ ~dn & hn, e[25] = Xr ^ ~fn & mn, e[26] = dn ^ ~hn & Or, e[27] = fn ^ ~mn & Ir, e[28] = hn ^ ~Or & Br, e[29] = mn ^ ~Ir & Lr, e[30] = Nr ^ ~Dr & Gr, e[31] = jr ^ ~Ur & Jr, e[32] = Dr ^ ~Gr & on, e[33] = Ur ^ ~Jr & cn, e[34] = Gr ^ ~on & wn, e[35] = Jr ^ ~cn & bn, e[36] = on ^ ~wn & Nr, e[37] = cn ^ ~bn & jr, e[38] = wn ^ ~Nr & Dr, e[39] = bn ^ ~jr & Ur, e[40] = Mr ^ ~zr & en, e[41] = $r ^ ~Vr & tn, e[42] = zr ^ ~en & rn, e[43] = Vr ^ ~tn & nn, e[44] = en ^ ~rn & pn, e[45] = tn ^ ~nn & gn, e[46] = rn ^ ~pn & Mr, e[47] = nn ^ ~gn & $r, e[48] = pn ^ ~Mr & zr, e[49] = gn ^ ~$r & Vr, e[0] ^= js[t * 2], e[1] ^= js[t * 2 + 1];
2086
2086
  }
2087
2087
  }
2088
- function js(e) {
2088
+ function Ds(e) {
2089
2089
  const t = [];
2090
2090
  for (let n = 0; n < e.length; n += 4) t.push(e[n] | e[n + 1] << 8 | e[n + 2] << 16 | e[n + 3] << 24);
2091
2091
  return t;
2092
2092
  }
2093
- function Ds(e, t) {
2093
+ function Us(e, t) {
2094
2094
  if (!e.length) {
2095
2095
  const o = new Uint8Array(136);
2096
- return o[0] = t, o[135] = 128, [js(o)];
2096
+ return o[0] = t, o[135] = 128, [Ds(o)];
2097
2097
  }
2098
- const n = wr(e, 136), s = n[n.length - 1];
2098
+ const n = br(e, 136), s = n[n.length - 1];
2099
2099
  if (s.length < 136) {
2100
2100
  const o = new Uint8Array(136);
2101
2101
  o.set(s), o[s.length] = t, o[135] |= 128, n[n.length - 1] = o;
@@ -2104,16 +2104,16 @@ var li = {};
2104
2104
  const o = new Uint8Array(136);
2105
2105
  o[0] = t, o[135] = 128, n.push(o);
2106
2106
  }
2107
- return n.map(js);
2107
+ return n.map(Ds);
2108
2108
  }
2109
- function Us(e, t) {
2109
+ function Ps(e, t) {
2110
2110
  for (const n of t) {
2111
2111
  for (let s = 0; s < 34; s += 2) e[s] ^= n[s + 1], e[s + 1] ^= n[s];
2112
2112
  qu(e);
2113
2113
  }
2114
2114
  return e;
2115
2115
  }
2116
- function Ps(e) {
2116
+ function Zs(e) {
2117
2117
  return new Uint8Array([
2118
2118
  e[1],
2119
2119
  e[1] >> -24,
@@ -2150,10 +2150,10 @@ var li = {};
2150
2150
  ]);
2151
2151
  }
2152
2152
  function se(e) {
2153
- return Ps(Us(new Array(50).fill(0), Ds(e, 1)));
2153
+ return Zs(Ps(new Array(50).fill(0), Us(e, 1)));
2154
2154
  }
2155
2155
  function Gu(e) {
2156
- return Ps(Us(new Array(50).fill(0), Ds(e, 6)));
2156
+ return Zs(Ps(new Array(50).fill(0), Us(e, 6)));
2157
2157
  }
2158
2158
  function Ju(e, t, n) {
2159
2159
  const s = Math.min(e.length, t.length, n / 8 + 1);
@@ -2181,23 +2181,23 @@ var li = {};
2181
2181
  for (let o = 0; o < t.length && e[s + o] === t[o]; o++) if (o === t.length - 1) return s;
2182
2182
  return -1;
2183
2183
  }
2184
- function Zs(e, t, n = 0) {
2184
+ function Bs(e, t, n = 0) {
2185
2185
  if (e.length >= t) return e;
2186
2186
  const s = new Uint8Array(t);
2187
2187
  return s.fill(n), s.set(e, t - e.length), s;
2188
2188
  }
2189
2189
  function el(e, t, n = 0) {
2190
2190
  const s = e.length % t;
2191
- return s === 0 ? e : Zs(e, e.length + t - s, n);
2191
+ return s === 0 ? e : Bs(e, e.length + t - s, n);
2192
2192
  }
2193
- function Bs(e, t, n = 0) {
2193
+ function Ls(e, t, n = 0) {
2194
2194
  if (e.length >= t) return e;
2195
2195
  const s = new Uint8Array(t);
2196
2196
  return s.fill(n), s.set(e, 0), s;
2197
2197
  }
2198
2198
  function tl(e, t, n = 0) {
2199
2199
  const s = e.length % t;
2200
- return s === 0 ? e : Bs(e, e.length + t - s, n);
2200
+ return s === 0 ? e : Ls(e, e.length + t - s, n);
2201
2201
  }
2202
2202
  function rl(e, t) {
2203
2203
  const n = new Uint8Array(e.length);
@@ -2227,11 +2227,11 @@ var li = {};
2227
2227
  for (e = $(e, n); t > 0; ) t % 2n === 1n && (s = $(s * e, n)), e = $(e * e, n), t = t / 2n;
2228
2228
  return s;
2229
2229
  }
2230
- function Ls(e, t) {
2230
+ function zs(e, t) {
2231
2231
  return $(e, t) === 0n ? 0n : t % 4n === 3n ? sl(e, (t + 1n) / 4n, t) : null;
2232
2232
  }
2233
2233
  const Z = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fn, D = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n, Dt = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798n, Ut = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8n;
2234
- function br(e, t, n) {
2234
+ function _r(e, t, n) {
2235
2235
  if (t === 0n) return [0n, 0n];
2236
2236
  const s = $(3n * e * e * Ye(2n * t, n), n), o = $(s * s - 2n * e, n), d = $(s * (e - o) - t, n);
2237
2237
  return [o, d];
@@ -2240,7 +2240,7 @@ var li = {};
2240
2240
  if (e === 0n && t === 0n) return [n, s];
2241
2241
  if (n === 0n && s === 0n) return [e, t];
2242
2242
  if (e === n && t === $(-s, o)) return [0n, 0n];
2243
- if (e === n && t === s) return br(e, t, o);
2243
+ if (e === n && t === s) return _r(e, t, o);
2244
2244
  const d = $((s - t) * Ye(n - e, o), o), m = $(d * d - e - n, o), v = $(d * (e - m) - t, o);
2245
2245
  return [m, v];
2246
2246
  }
@@ -2254,7 +2254,7 @@ var li = {};
2254
2254
  }
2255
2255
  function ol(e) {
2256
2256
  if (e.length !== 33 || e[0] !== 2 && e[0] !== 3) throw new Error("Invalid compressed public key");
2257
- const t = Ne(e.slice(1), "BE"), n = Ls($(t ** 3n + 7n, Z), Z);
2257
+ const t = Ne(e.slice(1), "BE"), n = zs($(t ** 3n + 7n, Z), Z);
2258
2258
  if (!n) throw Error("Invalid x: does not correspond to a valid curve point");
2259
2259
  const s = $(-n, Z), o = n % 2n === 0n;
2260
2260
  return [t, e[0] === 2 ? o ? n : s : o ? s : n];
@@ -2273,13 +2273,13 @@ var li = {};
2273
2273
  let o = [0n, 0n], d = [e, t];
2274
2274
  const m = n.toString(2);
2275
2275
  for (const v of m)
2276
- v === "0" ? (d = Pt(o[0], o[1], d[0], d[1], s), o = br(o[0], o[1], s)) : (o = Pt(o[0], o[1], d[0], d[1], s), d = br(d[0], d[1], s));
2276
+ v === "0" ? (d = Pt(o[0], o[1], d[0], d[1], s), o = _r(o[0], o[1], s)) : (o = Pt(o[0], o[1], d[0], d[1], s), d = _r(d[0], d[1], s));
2277
2277
  return o;
2278
2278
  }
2279
2279
  function ll(e, t, n) {
2280
- return zs(Ne(se(e), "BE"), t, n);
2280
+ return Vs(Ne(se(e), "BE"), t, n);
2281
2281
  }
2282
- function zs(e, t, n) {
2282
+ function Vs(e, t, n) {
2283
2283
  if (t <= 0n || t >= D) throw new Error("Invalid private key");
2284
2284
  if (n || (n = $(
2285
2285
  Ne(
@@ -2296,7 +2296,7 @@ var li = {};
2296
2296
  return m > D / 2n && (m = D - m, v = v === 27n ? 28n : 27n), [d, m, v];
2297
2297
  }
2298
2298
  function dl(e, t, n, s) {
2299
- const o = Ls($(t ** 3n + 7n, Z), Z);
2299
+ const o = zs($(t ** 3n + 7n, Z), Z);
2300
2300
  if (!o) throw new Error("Invalid r: does not correspond to a valid curve point");
2301
2301
  const d = s === 27n ? 0n : 1n, m = o % 2n === d ? o : Z - o, v = $(Ne(se(e), "BE"), D), p = xe(t, m, n, Z), k = xe(Dt, Ut, v, Z), M = Pt(p[0], p[1], k[0], $(-k[1], Z), Z);
2302
2302
  return xe(M[0], M[1], Ye(t, D), Z);
@@ -2305,7 +2305,7 @@ var li = {};
2305
2305
  const o = $(Ne(se(e), "BE"), D), d = Ye(s, D), m = $(o * d, D), v = $(n * d, D), p = xe(Dt, Ut, m, Z), k = xe(t[0], t[1], v, Z), M = Pt(p[0], p[1], k[0], k[1], Z);
2306
2306
  return n === $(M[0], D);
2307
2307
  }
2308
- class Vs {
2308
+ class Fs {
2309
2309
  constructor(t) {
2310
2310
  this.cursor = 0, this.buffer = t;
2311
2311
  }
@@ -2317,8 +2317,8 @@ var li = {};
2317
2317
  return this.buffer.length - this.cursor;
2318
2318
  }
2319
2319
  }
2320
- a.Uint8ArrayReader = Vs;
2321
- class Fs {
2320
+ a.Uint8ArrayReader = Fs;
2321
+ class Ws {
2322
2322
  constructor(t) {
2323
2323
  this.buffer = t, this.cursor = 0;
2324
2324
  }
@@ -2330,21 +2330,21 @@ var li = {};
2330
2330
  return this.buffer.length - this.cursor;
2331
2331
  }
2332
2332
  }
2333
- a.Uint8ArrayWriter = Fs;
2333
+ a.Uint8ArrayWriter = Ws;
2334
2334
  class Zt {
2335
2335
  constructor(t, n = 0n) {
2336
- this.span = n, this.writer = new Fs(new Uint8Array(t));
2336
+ this.span = n, this.writer = new Ws(new Uint8Array(t));
2337
2337
  }
2338
2338
  build() {
2339
- return Re(vr(this.span, "LE"), this.writer.buffer);
2339
+ return Re(wr(this.span, "LE"), this.writer.buffer);
2340
2340
  }
2341
2341
  hash() {
2342
- const t = Ms(wr(this.writer.buffer, 32), (n, s) => se(Re(n, s)));
2343
- return se(Re(vr(this.span, "LE"), t));
2342
+ const t = $s(br(this.writer.buffer, 32), (n, s) => se(Re(n, s)));
2343
+ return se(Re(wr(this.span, "LE"), t));
2344
2344
  }
2345
2345
  }
2346
2346
  a.Chunk = Zt;
2347
- class _r {
2347
+ class xr {
2348
2348
  constructor(t, n = 4096) {
2349
2349
  this.counters = [1], this.capacity = n, this.chunks = [new Zt(n)], this.onChunk = t;
2350
2350
  }
@@ -2353,7 +2353,7 @@ var li = {};
2353
2353
  return await s.append(t), s.finalize();
2354
2354
  }
2355
2355
  async append(t, n = 0, s = 0n) {
2356
- const o = new Vs(t);
2356
+ const o = new Fs(t);
2357
2357
  for (; o.max() > 0; ) {
2358
2358
  this.chunks[n].writer.max() === 0 && await this.elevate(n);
2359
2359
  const d = this.chunks[n].writer.write(o);
@@ -2367,7 +2367,7 @@ var li = {};
2367
2367
  return this.chunks[t + 1] ? this.counters[t] === 1 ? (await this.elevate(t + 1), this.chunks[t + 1] = this.chunks[t], this.finalize(t + 1)) : (await this.elevate(t), this.finalize(t + 1)) : (await this.onChunk(this.chunks[t]), this.chunks[t]);
2368
2368
  }
2369
2369
  }
2370
- a.MerkleTree = _r, r = _r, _r.NOOP = async (e) => {
2370
+ a.MerkleTree = xr, r = xr, xr.NOOP = async (e) => {
2371
2371
  };
2372
2372
  class Y {
2373
2373
  constructor(t, n) {
@@ -2436,7 +2436,7 @@ var li = {};
2436
2436
  const o = Bt(e, t, n, s);
2437
2437
  if (!o) return null;
2438
2438
  try {
2439
- return pr(o);
2439
+ return gr(o);
2440
2440
  } catch {
2441
2441
  throw new Error(`Invalid number argument ${t}: ${o}`);
2442
2442
  }
@@ -2450,44 +2450,44 @@ var li = {};
2450
2450
  if (v.includes(d.toLowerCase())) return !1;
2451
2451
  throw Error(`Invalid boolean argument ${t}: ${d}`);
2452
2452
  }
2453
- function Ws(e, t, n, s) {
2453
+ function Hs(e, t, n, s) {
2454
2454
  const o = Bt(e, t, n, s);
2455
2455
  if (!o) throw new Error(`Missing argument ${t}`);
2456
2456
  return o;
2457
2457
  }
2458
2458
  function gl(e, t, n, s) {
2459
- const o = Ws(e, t, n, s);
2459
+ const o = Hs(e, t, n, s);
2460
2460
  try {
2461
- return pr(o);
2461
+ return gr(o);
2462
2462
  } catch {
2463
2463
  throw new Error(`Invalid argument ${t}: ${o}`);
2464
2464
  }
2465
2465
  }
2466
- function Hs(e, t) {
2466
+ function qs(e, t) {
2467
2467
  const n = e[t];
2468
2468
  e.splice(t, 1), e.unshift(n);
2469
2469
  }
2470
2470
  function yl(e, t) {
2471
2471
  const n = [...e];
2472
- return Hs(n, t), n;
2472
+ return qs(n, t), n;
2473
2473
  }
2474
- function qs(e, t) {
2474
+ function Gs(e, t) {
2475
2475
  return { x: e.x + t.x, y: e.y + t.y };
2476
2476
  }
2477
2477
  function vl(e, t) {
2478
2478
  return { x: e.x - t.x, y: e.y - t.y };
2479
2479
  }
2480
- function xr(e, t) {
2480
+ function kr(e, t) {
2481
2481
  return { x: e.x * t, y: e.y * t };
2482
2482
  }
2483
2483
  function wl(e) {
2484
2484
  const t = Math.sqrt(e.x * e.x + e.y * e.y);
2485
2485
  return { x: e.x / t, y: e.y / t };
2486
2486
  }
2487
- function Gs(e, t, n) {
2487
+ function Js(e, t, n) {
2488
2488
  return { x: e.x + Math.cos(t) * n, y: e.y + Math.sin(t) * n };
2489
2489
  }
2490
- function Js(e, t) {
2490
+ function Ks(e, t) {
2491
2491
  return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
2492
2492
  }
2493
2493
  function Qe(e, t, n = "row-first") {
@@ -2505,24 +2505,24 @@ var li = {};
2505
2505
  var s, o;
2506
2506
  return e[t][n + 1] && e[t][n - 1] && !((s = e[t - 1]) != null && s[n]) && !((o = e[t + 1]) != null && o[n]);
2507
2507
  }
2508
- function Ks(e, t, n) {
2508
+ function Ys(e, t, n) {
2509
2509
  var s;
2510
2510
  return !((s = e[t - 1]) != null && s[n]);
2511
2511
  }
2512
- function Ys(e, t, n) {
2512
+ function Qs(e, t, n) {
2513
2513
  var s;
2514
2514
  return !((s = e[t + 1]) != null && s[n]);
2515
2515
  }
2516
- function Qs(e, t, n) {
2516
+ function Xs(e, t, n) {
2517
2517
  return !e[t][n - 1];
2518
2518
  }
2519
- function Xs(e, t, n) {
2519
+ function ei(e, t, n) {
2520
2520
  return !e[t][n + 1];
2521
2521
  }
2522
2522
  function xl(e, t, n) {
2523
2523
  var o, d, m, v, p, k, M, U;
2524
2524
  const s = [];
2525
- return e[t][n] ? bl(e, t, n) || _l(e, t, n) ? [] : (!((o = e[t - 1]) != null && o[n - 1]) && Ks(e, t, n) && Qs(e, t, n) && s.push({ x: t, y: n }), !((d = e[t + 1]) != null && d[n - 1]) && Ys(e, t, n) && Qs(e, t, n) && s.push({ x: t + 1, y: n }), !((m = e[t - 1]) != null && m[n + 1]) && Ks(e, t, n) && Xs(e, t, n) && s.push({ x: t, y: n + 1 }), !((v = e[t + 1]) != null && v[n + 1]) && Ys(e, t, n) && Xs(e, t, n) && s.push({ x: t + 1, y: n + 1 }), s) : ((p = e[t - 1]) != null && p[n] && e[t][n - 1] && s.push({ x: t, y: n }), (k = e[t + 1]) != null && k[n] && e[t][n - 1] && s.push({ x: t + 1, y: n }), (M = e[t - 1]) != null && M[n] && e[t][n + 1] && s.push({ x: t, y: n + 1 }), (U = e[t + 1]) != null && U[n] && e[t][n + 1] && s.push({ x: t + 1, y: n + 1 }), s);
2525
+ return e[t][n] ? bl(e, t, n) || _l(e, t, n) ? [] : (!((o = e[t - 1]) != null && o[n - 1]) && Ys(e, t, n) && Xs(e, t, n) && s.push({ x: t, y: n }), !((d = e[t + 1]) != null && d[n - 1]) && Qs(e, t, n) && Xs(e, t, n) && s.push({ x: t + 1, y: n }), !((m = e[t - 1]) != null && m[n + 1]) && Ys(e, t, n) && ei(e, t, n) && s.push({ x: t, y: n + 1 }), !((v = e[t + 1]) != null && v[n + 1]) && Qs(e, t, n) && ei(e, t, n) && s.push({ x: t + 1, y: n + 1 }), s) : ((p = e[t - 1]) != null && p[n] && e[t][n - 1] && s.push({ x: t, y: n }), (k = e[t + 1]) != null && k[n] && e[t][n - 1] && s.push({ x: t + 1, y: n }), (M = e[t - 1]) != null && M[n] && e[t][n + 1] && s.push({ x: t, y: n + 1 }), (U = e[t + 1]) != null && U[n] && e[t][n + 1] && s.push({ x: t + 1, y: n + 1 }), s);
2526
2526
  }
2527
2527
  function kl(e, t, n, s) {
2528
2528
  const o = [
@@ -2563,10 +2563,10 @@ var li = {};
2563
2563
  dy: 1
2564
2564
  }));
2565
2565
  n.forEach((p) => p.y++), d.forEach((p) => p.x++);
2566
- const m = yr([...o, ...d], (p, k) => p.x === k.x && p.y - 1 === k.y), v = yr([...s, ...n], (p, k) => p.y === k.y && p.x - 1 === k.x);
2566
+ const m = vr([...o, ...d], (p, k) => p.x === k.x && p.y - 1 === k.y), v = vr([...s, ...n], (p, k) => p.y === k.y && p.x - 1 === k.x);
2567
2567
  return [...m, ...v].map((p) => ({ start: p[0], end: qe(p) })).map((p) => ({
2568
- start: xr(p.start, t),
2569
- end: xr(qs(p.end, { x: p.start.dx, y: p.start.dy }), t)
2568
+ start: kr(p.start, t),
2569
+ end: kr(Gs(p.end, { x: p.start.dx, y: p.start.dy }), t)
2570
2570
  }));
2571
2571
  }
2572
2572
  function Sl(e, t) {
@@ -2575,33 +2575,33 @@ var li = {};
2575
2575
  function Tl(e, t) {
2576
2576
  return t.map((n) => Sl(e, n)).sort((n, s) => n - s);
2577
2577
  }
2578
- function ei(e, t, n, s) {
2578
+ function ti(e, t, n, s) {
2579
2579
  const o = (s.y - n.y) * (t.x - e.x) - (s.x - n.x) * (t.y - e.y);
2580
2580
  if (o === 0) return null;
2581
2581
  let d = e.y - n.y, m = e.x - n.x;
2582
2582
  const v = (s.x - n.x) * d - (s.y - n.y) * m, p = (t.x - e.x) * d - (t.y - e.y) * m;
2583
2583
  return d = v / o, m = p / o, d > 0 && d < 1 && m > 0 && m < 1 ? { x: e.x + d * (t.x - e.x), y: e.y + d * (t.y - e.y) } : null;
2584
2584
  }
2585
- function kr(e, t, n) {
2586
- const s = [], o = Gs(e, n, 1e4);
2585
+ function Er(e, t, n) {
2586
+ const s = [], o = Js(e, n, 1e4);
2587
2587
  for (const d of t) {
2588
- const m = ei(e, o, d.start, d.end);
2588
+ const m = ti(e, o, d.start, d.end);
2589
2589
  m && s.push(m);
2590
2590
  }
2591
2591
  return s.length ? s.reduce((d, m) => {
2592
- const v = Js(e, m), p = Js(e, d);
2592
+ const v = Ks(e, m), p = Ks(e, d);
2593
2593
  return v < p ? m : d;
2594
2594
  }) : null;
2595
2595
  }
2596
2596
  function Al(e, t, n) {
2597
2597
  const s = Tl(e, n), o = [];
2598
2598
  for (const d of s) {
2599
- const m = kr(e, t, d - 1e-3), v = kr(e, t, d + 1e-3);
2599
+ const m = Er(e, t, d - 1e-3), v = Er(e, t, d + 1e-3);
2600
2600
  m && o.push(m), v && o.push(v);
2601
2601
  }
2602
2602
  return o;
2603
2603
  }
2604
- class Er {
2604
+ class Sr {
2605
2605
  constructor() {
2606
2606
  this.subscribers = [];
2607
2607
  }
@@ -2620,10 +2620,10 @@ var li = {};
2620
2620
  return this.subscribers.length;
2621
2621
  }
2622
2622
  }
2623
- a.PubSubChannel = Er;
2623
+ a.PubSubChannel = Sr;
2624
2624
  class Ol {
2625
2625
  constructor(t, n) {
2626
- this.queue = [], this.running = 0, this.onProcessed = new Er(), this.onDrained = new Er(), this.concurrency = t, this.capacity = n;
2626
+ this.queue = [], this.running = 0, this.onProcessed = new Sr(), this.onDrained = new Sr(), this.concurrency = t, this.capacity = n;
2627
2627
  }
2628
2628
  process() {
2629
2629
  if (this.running >= this.concurrency) return;
@@ -2658,8 +2658,8 @@ var li = {};
2658
2658
  uint8ArrayToBase64: Mo,
2659
2659
  base32ToUint8Array: $o,
2660
2660
  uint8ArrayToBase32: Ro,
2661
- log2Reduce: Ms,
2662
- partition: wr,
2661
+ log2Reduce: $s,
2662
+ partition: br,
2663
2663
  concatBytes: Re,
2664
2664
  numberToUint8: Zu,
2665
2665
  uint8ToNumber: Bu,
@@ -2667,7 +2667,7 @@ var li = {};
2667
2667
  uint16ToNumber: zu,
2668
2668
  numberToUint32: Vu,
2669
2669
  uint32ToNumber: Fu,
2670
- numberToUint64: vr,
2670
+ numberToUint64: wr,
2671
2671
  uint64ToNumber: Wu,
2672
2672
  numberToUint256: Ce,
2673
2673
  uint256ToNumber: Ne,
@@ -2680,9 +2680,9 @@ var li = {};
2680
2680
  getBit: Qu,
2681
2681
  indexOf: Xu,
2682
2682
  equals: nl,
2683
- padStart: Zs,
2683
+ padStart: Bs,
2684
2684
  padStartToMultiple: el,
2685
- padEnd: Bs,
2685
+ padEnd: Ls,
2686
2686
  padEndToMultiple: tl,
2687
2687
  xorCypher: rl
2688
2688
  }, a.Elliptic = {
@@ -2691,24 +2691,24 @@ var li = {};
2691
2691
  publicKeyFromCompressed: ol,
2692
2692
  publicKeyToAddress: cl,
2693
2693
  signMessage: ll,
2694
- signHash: zs,
2694
+ signHash: Vs,
2695
2695
  verifySignature: fl,
2696
2696
  recoverPublicKey: dl,
2697
2697
  checksumEncode: ul
2698
2698
  }, a.Random = {
2699
2699
  intBetween: He,
2700
- floatBetween: Cn,
2701
- chance: Nn,
2700
+ floatBetween: Nn,
2701
+ chance: jn,
2702
2702
  signed: Ti,
2703
- makeSeededRng: Kt,
2703
+ makeSeededRng: Yt,
2704
2704
  point: Oi,
2705
2705
  procs: Ii
2706
2706
  }, a.Arrays = {
2707
2707
  countUnique: wu,
2708
2708
  makeUnique: vu,
2709
2709
  splitBySize: gu,
2710
- splitByCount: Ts,
2711
- index: Ss,
2710
+ splitByCount: As,
2711
+ index: Ts,
2712
2712
  indexCollection: pu,
2713
2713
  onlyOrThrow: h,
2714
2714
  onlyOrNull: g,
@@ -2721,14 +2721,14 @@ var li = {};
2721
2721
  containsShape: Fe,
2722
2722
  glue: Ua,
2723
2723
  pluck: We,
2724
- pick: Yt,
2724
+ pick: Qt,
2725
2725
  pickMany: Mi,
2726
2726
  pickManyUnique: $i,
2727
2727
  pickWeighted: Ni,
2728
2728
  pickRandomIndices: Oe,
2729
2729
  pickGuaranteed: Ri,
2730
2730
  last: qe,
2731
- pipe: jn,
2731
+ pipe: Dn,
2732
2732
  makePipe: Ci,
2733
2733
  sortWeighted: ji,
2734
2734
  pushAll: Mt,
@@ -2739,17 +2739,17 @@ var li = {};
2739
2739
  pushToBucket: Ra,
2740
2740
  unshiftAndLimit: Ca,
2741
2741
  atRolling: Na,
2742
- group: yr,
2742
+ group: vr,
2743
2743
  createOscillator: Zc,
2744
2744
  organiseWithLimits: Lc,
2745
2745
  tickPlaybook: hl,
2746
2746
  getArgument: Bt,
2747
2747
  getBooleanArgument: pl,
2748
2748
  getNumberArgument: ml,
2749
- requireStringArgument: Ws,
2749
+ requireStringArgument: Hs,
2750
2750
  requireNumberArgument: gl,
2751
2751
  bringToFront: yl,
2752
- bringToFrontInPlace: Hs,
2752
+ bringToFrontInPlace: qs,
2753
2753
  findInstance: Ru,
2754
2754
  filterInstances: Cu,
2755
2755
  interleave: Nu,
@@ -2758,13 +2758,13 @@ var li = {};
2758
2758
  multicall: Mu,
2759
2759
  maxBy: $u
2760
2760
  }, a.System = { sleepMillis: l, forever: Li, scheduleMany: Fa, waitFor: rc, expandError: Oa, runAndSetInterval: zi }, a.Numbers = {
2761
- make: pr,
2761
+ make: gr,
2762
2762
  sum: Ha,
2763
2763
  average: qa,
2764
2764
  median: Ga,
2765
2765
  getDistanceFromMidpoint: Ja,
2766
- clamp: gr,
2767
- range: Gn,
2766
+ clamp: yr,
2767
+ range: Jn,
2768
2768
  interpolate: Wa,
2769
2769
  createSequence: Pc,
2770
2770
  increment: Gc,
@@ -2783,7 +2783,7 @@ var li = {};
2783
2783
  searchFloat: Ki
2784
2784
  }, a.Promises = { raceFulfilled: c, invert: i, runInParallelBatches: u }, a.Dates = {
2785
2785
  getTimestamp: fc,
2786
- getTimeDelta: gs,
2786
+ getTimeDelta: ys,
2787
2787
  secondsToHumanTime: hc,
2788
2788
  countCycles: mc,
2789
2789
  isoDate: ac,
@@ -2797,8 +2797,8 @@ var li = {};
2797
2797
  humanizeTime: Nt,
2798
2798
  humanizeProgress: tc,
2799
2799
  createTimeDigits: K,
2800
- mapDayNumber: ys,
2801
- getDayInfoFromDate: hr,
2800
+ mapDayNumber: vs,
2801
+ getDayInfoFromDate: mr,
2802
2802
  getDayInfoFromDateTimeString: bc,
2803
2803
  seconds: _c,
2804
2804
  minutes: xc,
@@ -2821,21 +2821,21 @@ var li = {};
2821
2821
  deepMerge3: Ma,
2822
2822
  mapAllAsync: Da,
2823
2823
  cloneWithJson: sc,
2824
- sortObject: ws,
2825
- sortArray: bs,
2824
+ sortObject: bs,
2825
+ sortArray: _s,
2826
2826
  sortAny: _e,
2827
- deepEquals: _s,
2827
+ deepEquals: xs,
2828
2828
  deepEqualsEvery: Dc,
2829
2829
  runOn: Kc,
2830
2830
  ifPresent: Yc,
2831
- zip: qn,
2831
+ zip: Gn,
2832
2832
  zipSum: $a,
2833
2833
  removeEmptyArrays: eu,
2834
2834
  removeEmptyValues: tu,
2835
2835
  flatten: hu,
2836
- unflatten: Es,
2836
+ unflatten: Ss,
2837
2837
  match: mu,
2838
- sort: Os,
2838
+ sort: Is,
2839
2839
  map: su,
2840
2840
  mapIterable: iu,
2841
2841
  filterKeys: ru,
@@ -2851,16 +2851,16 @@ var li = {};
2851
2851
  incrementMulti: _u,
2852
2852
  createBidirectionalMap: ku,
2853
2853
  createTemporalBidirectionalMap: Eu,
2854
- pushToBidirectionalMap: Is,
2854
+ pushToBidirectionalMap: Ms,
2855
2855
  unshiftToBidirectionalMap: Su,
2856
2856
  addToTemporalBidirectionalMap: Tu,
2857
2857
  getFromTemporalBidirectionalMap: Au,
2858
2858
  createStatefulToggle: Bc,
2859
2859
  diffKeys: zc,
2860
- pickRandomKey: xs,
2860
+ pickRandomKey: ks,
2861
2861
  mapRandomKey: Vc,
2862
2862
  fromObjectString: Fc,
2863
- toQueryString: ms,
2863
+ toQueryString: ps,
2864
2864
  parseQueryString: qo,
2865
2865
  hasKey: Go,
2866
2866
  selectMax: Jo,
@@ -2868,29 +2868,29 @@ var li = {};
2868
2868
  unwrapSingleKey: Yo,
2869
2869
  parseKeyValues: Qo
2870
2870
  }, a.Types = {
2871
- isFunction: Xt,
2871
+ isFunction: er,
2872
2872
  isObject: ce,
2873
2873
  isStrictlyObject: Ie,
2874
- isEmptyArray: Dn,
2874
+ isEmptyArray: Un,
2875
2875
  isEmptyObject: Yi,
2876
- isUndefined: Qt,
2876
+ isUndefined: Xt,
2877
2877
  isString: F,
2878
2878
  isNumber: ue,
2879
- isBoolean: Un,
2879
+ isBoolean: Pn,
2880
2880
  isDate: Me,
2881
2881
  isBlank: At,
2882
- isId: er,
2883
- isIntegerString: Pn,
2884
- isHexString: Zn,
2885
- isUrl: Wn,
2882
+ isId: tr,
2883
+ isIntegerString: Zn,
2884
+ isHexString: Bn,
2885
+ isUrl: Hn,
2886
2886
  isNullable: Ea,
2887
- asString: Vn,
2887
+ asString: Fn,
2888
2888
  asHexString: la,
2889
2889
  asSafeString: da,
2890
2890
  asIntegerString: ua,
2891
2891
  asNumber: Ot,
2892
2892
  asFunction: fa,
2893
- asInteger: nr,
2893
+ asInteger: sr,
2894
2894
  asBoolean: ha,
2895
2895
  asDate: ma,
2896
2896
  asNullableString: pa,
@@ -2905,15 +2905,15 @@ var li = {};
2905
2905
  asUrl: ka,
2906
2906
  asNullable: Sa,
2907
2907
  asOptional: Ta,
2908
- enforceObjectShape: Hn,
2908
+ enforceObjectShape: qn,
2909
2909
  enforceArrayShape: Aa,
2910
- isPng: $s,
2911
- isJpg: Rs,
2912
- isWebp: Cs,
2910
+ isPng: Rs,
2911
+ isJpg: Cs,
2912
+ isWebp: Ns,
2913
2913
  isImage: Pu
2914
2914
  }, a.Strings = {
2915
2915
  tokenizeByCount: yu,
2916
- tokenizeByLength: As,
2916
+ tokenizeByLength: Os,
2917
2917
  searchHex: aa,
2918
2918
  searchSubstring: oa,
2919
2919
  randomHex: ca,
@@ -2922,35 +2922,35 @@ var li = {};
2922
2922
  randomRichAscii: sa,
2923
2923
  randomUnicode: ia,
2924
2924
  includesAny: Ka,
2925
- slugify: sr,
2925
+ slugify: ir,
2926
2926
  normalForm: Qa,
2927
2927
  enumify: so,
2928
2928
  escapeHtml: ao,
2929
2929
  decodeHtmlEntities: co,
2930
- after: ir,
2931
- afterLast: Kn,
2932
- before: Jn,
2933
- beforeLast: ar,
2930
+ after: ar,
2931
+ afterLast: Yn,
2932
+ before: Kn,
2933
+ beforeLast: or,
2934
2934
  betweenWide: uo,
2935
2935
  betweenNarrow: lo,
2936
2936
  getPreLine: Ic,
2937
- containsWord: dr,
2937
+ containsWord: fr,
2938
2938
  containsWords: Vo,
2939
- joinUrl: vs,
2939
+ joinUrl: ws,
2940
2940
  getFuzzyMatchScore: $t,
2941
2941
  sortByFuzzyScore: io,
2942
- splitOnce: or,
2943
- splitAll: Yn,
2942
+ splitOnce: cr,
2943
+ splitAll: Qn,
2944
2944
  randomize: po,
2945
- expand: Qn,
2945
+ expand: Xn,
2946
2946
  shrinkTrim: Je,
2947
2947
  capitalize: Rt,
2948
- decapitalize: Xn,
2948
+ decapitalize: es,
2949
2949
  csvEscape: _o,
2950
2950
  parseCsv: ec,
2951
2951
  surroundInOut: no,
2952
- getExtension: cr,
2953
- getBasename: ur,
2952
+ getExtension: ur,
2953
+ getBasename: lr,
2954
2954
  normalizeEmail: fo,
2955
2955
  normalizeFilename: ho,
2956
2956
  parseFilename: mo,
@@ -2958,24 +2958,24 @@ var li = {};
2958
2958
  slugToTitle: eo,
2959
2959
  slugToCamel: to,
2960
2960
  joinHumanly: ro,
2961
- findWeightedPair: is,
2962
- extractBlock: as,
2961
+ findWeightedPair: as,
2962
+ extractBlock: os,
2963
2963
  extractAllBlocks: Eo,
2964
2964
  replaceBlocks: So,
2965
2965
  indexOfEarliest: $e,
2966
- lastIndexOfBefore: ss,
2966
+ lastIndexOfBefore: is,
2967
2967
  parseHtmlAttributes: Fo,
2968
2968
  readNextWord: Ct,
2969
2969
  resolveVariables: Wo,
2970
- resolveVariableWithDefaultSyntax: fs,
2971
- resolveRemainingVariablesWithDefaults: hs,
2972
- isLetter: es,
2973
- isDigit: ts,
2970
+ resolveVariableWithDefaultSyntax: hs,
2971
+ resolveRemainingVariablesWithDefaults: ms,
2972
+ isLetter: ts,
2973
+ isDigit: rs,
2974
2974
  isLetterOrDigit: Ke,
2975
2975
  isValidObjectPathCharacter: vo,
2976
2976
  insert: wo,
2977
- indexOfRegex: rs,
2978
- lineMatches: ns,
2977
+ indexOfRegex: ns,
2978
+ lineMatches: ss,
2979
2979
  linesMatchInOrder: bo,
2980
2980
  represent: Ge,
2981
2981
  resolveMarkdownLinks: Ho,
@@ -2989,27 +2989,27 @@ var li = {};
2989
2989
  splitHashtags: Ao,
2990
2990
  splitUrls: Oo,
2991
2991
  route: jo,
2992
- explodeReplace: lr,
2992
+ explodeReplace: dr,
2993
2993
  generateVariants: Do,
2994
2994
  replaceWord: Uo,
2995
2995
  replacePascalCaseWords: Po,
2996
2996
  stripHtml: Zo,
2997
- breakLine: ds,
2997
+ breakLine: fs,
2998
2998
  measureTextWidth: Bo,
2999
2999
  toLines: Lo,
3000
3000
  levenshteinDistance: zo
3001
3001
  }, a.Assertions = { asEqual: Pa, asTrue: Za, asTruthy: Ba, asFalse: La, asFalsy: za, asEither: Va }, a.Cache = { get: Mc, invalidate: $c }, a.Vector = {
3002
- addPoint: qs,
3002
+ addPoint: Gs,
3003
3003
  subtractPoint: vl,
3004
- multiplyPoint: xr,
3004
+ multiplyPoint: kr,
3005
3005
  normalizePoint: wl,
3006
- pushPoint: Gs,
3006
+ pushPoint: Js,
3007
3007
  filterCoordinates: Qe,
3008
3008
  findCorners: kl,
3009
3009
  findLines: El,
3010
- raycast: kr,
3010
+ raycast: Er,
3011
3011
  raycastCircle: Al,
3012
- getLineIntersectionPoint: ei
3012
+ getLineIntersectionPoint: ti
3013
3013
  };
3014
3014
  })(li);
3015
3015
  const R = /* @__PURE__ */ Gl(li);
@@ -3038,27 +3038,27 @@ R.AsyncLazy;
3038
3038
  R.AsyncQueue;
3039
3039
  R.Uint8ArrayReader;
3040
3040
  R.Uint8ArrayWriter;
3041
- const Kl = new TextEncoder(), ri = 1, ni = 4096, En = 4096, Yl = 32;
3041
+ const Kl = new TextEncoder(), ni = 1, si = 4096, Sn = 4096, Yl = 32;
3042
3042
  function di(a, r) {
3043
- return r = typeof r == "number" ? ci.fromBigInt(BigInt(r)) : r, new Lt(B.keccak256(B.concatBytes(a.toUint8Array(), r.toUint8Array())));
3043
+ return r = typeof r == "number" ? Lt.fromBigInt(BigInt(r)) : r, new zt(B.keccak256(B.concatBytes(a.toUint8Array(), r.toUint8Array())));
3044
3044
  }
3045
3045
  function Ql(a) {
3046
3046
  const r = a.slice(0, Be.LENGTH), i = a.slice(Be.LENGTH), c = Xl(i), u = B.keccak256(B.concatBytes(r, c));
3047
3047
  return new ui(u);
3048
3048
  }
3049
3049
  function Xl(a) {
3050
- if (a.length > En)
3050
+ if (a.length > Sn)
3051
3051
  throw new Pl(
3052
- `payload size ${a.length} exceeds maximum chunk payload size ${En}`,
3052
+ `payload size ${a.length} exceeds maximum chunk payload size ${Sn}`,
3053
3053
  a
3054
3054
  );
3055
- const r = new Uint8Array(En);
3055
+ const r = new Uint8Array(Sn);
3056
3056
  return r.set(a), B.log2Reduce(B.partition(r, Yl), (i, c) => B.keccak256(B.concatBytes(i, c)));
3057
3057
  }
3058
- function si(a) {
3059
- if (a instanceof Uint8Array || (a = Kl.encode(a)), a.length < ri || a.length > ni)
3058
+ function ii(a) {
3059
+ if (a instanceof Uint8Array || (a = Kl.encode(a)), a.length < ni || a.length > si)
3060
3060
  throw new RangeError(
3061
- `payload size ${a.length} exceeds limits [${ri}, ${ni}]`
3061
+ `payload size ${a.length} exceeds limits [${ni}, ${si}]`
3062
3062
  );
3063
3063
  const r = Be.fromBigInt(BigInt(a.length)), i = B.concatBytes(r.toUint8Array(), a);
3064
3064
  return {
@@ -3071,8 +3071,8 @@ function si(a) {
3071
3071
  function ed(a, r) {
3072
3072
  return new ui(B.keccak256(B.concatBytes(a.toUint8Array(), r.toUint8Array())));
3073
3073
  }
3074
- function ii(a, r, i) {
3075
- r = new Lt(r), i = new ke(i);
3074
+ function ai(a, r, i) {
3075
+ r = new zt(r), i = new ke(i);
3076
3076
  const c = ed(r, i.publicKey().address()), u = i.sign(B.concatBytes(r.toUint8Array(), a.address.toUint8Array())), l = B.concatBytes(r.toUint8Array(), u.toUint8Array(), a.data), f = Be.fromSlice(a.data, 0), h = Ue.fromSlice(a.data, Be.LENGTH);
3077
3077
  return {
3078
3078
  data: l,
@@ -3093,11 +3093,11 @@ function nd(a) {
3093
3093
  function fi(a) {
3094
3094
  return (a.startsWith("0x") ? a.slice(2) : a).toLowerCase();
3095
3095
  }
3096
- async function Tn(a, r = 3, i = 250) {
3096
+ async function An(a, r = 3, i = 250) {
3097
3097
  return new Promise((c, u) => {
3098
3098
  a().then(c).catch((l) => {
3099
3099
  r > 0 ? (td.info(`Retrying... Attempts left: ${r}. Error: ${l.message}`), setTimeout(() => {
3100
- Tn(a, r - 1, i).then(c).catch(u);
3100
+ An(a, r - 1, i).then(c).catch(u);
3101
3101
  }, i)) : (rd.handleError(l, "Utils.retryAwaitableAsync"), u(l));
3102
3102
  });
3103
3103
  });
@@ -3165,14 +3165,14 @@ var I;
3165
3165
  }
3166
3166
  a.joinValues = c, a.jsonStringifyReplacer = (u, l) => typeof l == "bigint" ? l.toString() : l;
3167
3167
  })(I || (I = {}));
3168
- var An;
3168
+ var On;
3169
3169
  (function(a) {
3170
3170
  a.mergeShapes = (r, i) => ({
3171
3171
  ...r,
3172
3172
  ...i
3173
3173
  // second overwrites first
3174
3174
  });
3175
- })(An || (An = {}));
3175
+ })(On || (On = {}));
3176
3176
  const _ = I.arrayToEnum([
3177
3177
  "string",
3178
3178
  "nan",
@@ -3353,10 +3353,10 @@ let hi = Le;
3353
3353
  function od(a) {
3354
3354
  hi = a;
3355
3355
  }
3356
- function zt() {
3356
+ function Vt() {
3357
3357
  return hi;
3358
3358
  }
3359
- const Vt = (a) => {
3359
+ const Ft = (a) => {
3360
3360
  const { data: r, path: i, errorMaps: c, issueData: u } = a, l = [...i, ...u.path || []], f = {
3361
3361
  ...u,
3362
3362
  path: l
@@ -3378,7 +3378,7 @@ const Vt = (a) => {
3378
3378
  };
3379
3379
  }, cd = [];
3380
3380
  function b(a, r) {
3381
- const i = zt(), c = Vt({
3381
+ const i = Vt(), c = Ft({
3382
3382
  issueData: r,
3383
3383
  data: a.data,
3384
3384
  path: a.path,
@@ -3438,8 +3438,8 @@ class L {
3438
3438
  }
3439
3439
  const T = Object.freeze({
3440
3440
  status: "aborted"
3441
- }), Pe = (a) => ({ status: "dirty", value: a }), z = (a) => ({ status: "valid", value: a }), On = (a) => a.status === "aborted", In = (a) => a.status === "dirty", Se = (a) => a.status === "valid", ft = (a) => typeof Promise < "u" && a instanceof Promise;
3442
- function Ft(a, r, i, c) {
3441
+ }), Pe = (a) => ({ status: "dirty", value: a }), z = (a) => ({ status: "valid", value: a }), In = (a) => a.status === "aborted", Mn = (a) => a.status === "dirty", Se = (a) => a.status === "valid", ft = (a) => typeof Promise < "u" && a instanceof Promise;
3442
+ function Wt(a, r, i, c) {
3443
3443
  if (typeof r == "function" ? a !== r || !c : !r.has(a)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
3444
3444
  return r.get(a);
3445
3445
  }
@@ -3460,7 +3460,7 @@ class ee {
3460
3460
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
3461
3461
  }
3462
3462
  }
3463
- const ai = (a, r) => {
3463
+ const oi = (a, r) => {
3464
3464
  if (Se(r))
3465
3465
  return { success: !0, data: r.value };
3466
3466
  if (!a.common.issues.length)
@@ -3547,7 +3547,7 @@ class O {
3547
3547
  data: r,
3548
3548
  parsedType: ae(r)
3549
3549
  }, l = this._parseSync({ data: r, path: u.path, parent: u });
3550
- return ai(u, l);
3550
+ return oi(u, l);
3551
3551
  }
3552
3552
  "~validate"(r) {
3553
3553
  var i, c;
@@ -3601,7 +3601,7 @@ class O {
3601
3601
  data: r,
3602
3602
  parsedType: ae(r)
3603
3603
  }, u = this._parse({ data: r, path: c.path, parent: c }), l = await (ft(u) ? u : Promise.resolve(u));
3604
- return ai(c, l);
3604
+ return oi(c, l);
3605
3605
  }
3606
3606
  refine(r, i) {
3607
3607
  const c = (u) => typeof i == "string" || typeof i > "u" ? { message: i } : typeof i == "function" ? i(u) : i;
@@ -3672,7 +3672,7 @@ class O {
3672
3672
  });
3673
3673
  }
3674
3674
  brand() {
3675
- return new $n({
3675
+ return new Rn({
3676
3676
  typeName: S.ZodBranded,
3677
3677
  type: this,
3678
3678
  ...A(this._def)
@@ -3708,7 +3708,7 @@ class O {
3708
3708
  }
3709
3709
  }
3710
3710
  const ud = /^c[^\s-]{8,}$/i, ld = /^[0-9a-z]+$/, dd = /^[0-9A-HJKMNP-TV-Z]{26}$/i, fd = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, hd = /^[a-z0-9_-]{21}$/i, md = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, pd = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, gd = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, yd = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
3711
- let Sn;
3711
+ let Tn;
3712
3712
  const vd = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, wd = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, bd = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, _d = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, xd = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, kd = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, pi = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Ed = new RegExp(`^${pi}$`);
3713
3713
  function gi(a) {
3714
3714
  let r = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
@@ -3793,7 +3793,7 @@ class q extends O {
3793
3793
  message: l.message
3794
3794
  }), c.dirty());
3795
3795
  else if (l.kind === "emoji")
3796
- Sn || (Sn = new RegExp(yd, "u")), Sn.test(r.data) || (u = this._getOrReturnCtx(r, u), b(u, {
3796
+ Tn || (Tn = new RegExp(yd, "u")), Tn.test(r.data) || (u = this._getOrReturnCtx(r, u), b(u, {
3797
3797
  validation: "emoji",
3798
3798
  code: w.invalid_string,
3799
3799
  message: l.message
@@ -4533,7 +4533,7 @@ Te.create = (a) => new Te({
4533
4533
  typeName: S.ZodDate,
4534
4534
  ...A(a)
4535
4535
  });
4536
- class Wt extends O {
4536
+ class Ht extends O {
4537
4537
  _parse(r) {
4538
4538
  if (this._getType(r) !== _.symbol) {
4539
4539
  const c = this._getOrReturnCtx(r);
@@ -4546,7 +4546,7 @@ class Wt extends O {
4546
4546
  return z(r.data);
4547
4547
  }
4548
4548
  }
4549
- Wt.create = (a) => new Wt({
4549
+ Ht.create = (a) => new Ht({
4550
4550
  typeName: S.ZodSymbol,
4551
4551
  ...A(a)
4552
4552
  });
@@ -4622,7 +4622,7 @@ oe.create = (a) => new oe({
4622
4622
  typeName: S.ZodNever,
4623
4623
  ...A(a)
4624
4624
  });
4625
- class Ht extends O {
4625
+ class qt extends O {
4626
4626
  _parse(r) {
4627
4627
  if (this._getType(r) !== _.undefined) {
4628
4628
  const c = this._getOrReturnCtx(r);
@@ -4635,7 +4635,7 @@ class Ht extends O {
4635
4635
  return z(r.data);
4636
4636
  }
4637
4637
  }
4638
- Ht.create = (a) => new Ht({
4638
+ qt.create = (a) => new qt({
4639
4639
  typeName: S.ZodVoid,
4640
4640
  ...A(a)
4641
4641
  });
@@ -5088,8 +5088,8 @@ gt.create = (a, r) => new gt({
5088
5088
  typeName: S.ZodUnion,
5089
5089
  ...A(r)
5090
5090
  });
5091
- const ie = (a) => a instanceof wt ? ie(a.schema) : a instanceof J ? ie(a.innerType()) : a instanceof bt ? [a.value] : a instanceof me ? a.options : a instanceof _t ? I.objectValues(a.enum) : a instanceof xt ? ie(a._def.innerType) : a instanceof mt ? [void 0] : a instanceof pt ? [null] : a instanceof X ? [void 0, ...ie(a.unwrap())] : a instanceof pe ? [null, ...ie(a.unwrap())] : a instanceof $n || a instanceof Et ? ie(a.unwrap()) : a instanceof kt ? ie(a._def.innerType) : [];
5092
- class Jt extends O {
5091
+ const ie = (a) => a instanceof wt ? ie(a.schema) : a instanceof J ? ie(a.innerType()) : a instanceof bt ? [a.value] : a instanceof me ? a.options : a instanceof _t ? I.objectValues(a.enum) : a instanceof xt ? ie(a._def.innerType) : a instanceof mt ? [void 0] : a instanceof pt ? [null] : a instanceof X ? [void 0, ...ie(a.unwrap())] : a instanceof pe ? [null, ...ie(a.unwrap())] : a instanceof Rn || a instanceof Et ? ie(a.unwrap()) : a instanceof kt ? ie(a._def.innerType) : [];
5092
+ class Kt extends O {
5093
5093
  _parse(r) {
5094
5094
  const { ctx: i } = this._processInputParams(r);
5095
5095
  if (i.parsedType !== _.object)
@@ -5142,7 +5142,7 @@ class Jt extends O {
5142
5142
  u.set(h, l);
5143
5143
  }
5144
5144
  }
5145
- return new Jt({
5145
+ return new Kt({
5146
5146
  typeName: S.ZodDiscriminatedUnion,
5147
5147
  discriminator: r,
5148
5148
  options: i,
@@ -5151,14 +5151,14 @@ class Jt extends O {
5151
5151
  });
5152
5152
  }
5153
5153
  }
5154
- function Mn(a, r) {
5154
+ function $n(a, r) {
5155
5155
  const i = ae(a), c = ae(r);
5156
5156
  if (a === r)
5157
5157
  return { valid: !0, data: a };
5158
5158
  if (i === _.object && c === _.object) {
5159
5159
  const u = I.objectKeys(r), l = I.objectKeys(a).filter((h) => u.indexOf(h) !== -1), f = { ...a, ...r };
5160
5160
  for (const h of l) {
5161
- const g = Mn(a[h], r[h]);
5161
+ const g = $n(a[h], r[h]);
5162
5162
  if (!g.valid)
5163
5163
  return { valid: !1 };
5164
5164
  f[h] = g.data;
@@ -5169,7 +5169,7 @@ function Mn(a, r) {
5169
5169
  return { valid: !1 };
5170
5170
  const u = [];
5171
5171
  for (let l = 0; l < a.length; l++) {
5172
- const f = a[l], h = r[l], g = Mn(f, h);
5172
+ const f = a[l], h = r[l], g = $n(f, h);
5173
5173
  if (!g.valid)
5174
5174
  return { valid: !1 };
5175
5175
  u.push(g.data);
@@ -5180,10 +5180,10 @@ function Mn(a, r) {
5180
5180
  class yt extends O {
5181
5181
  _parse(r) {
5182
5182
  const { status: i, ctx: c } = this._processInputParams(r), u = (l, f) => {
5183
- if (On(l) || On(f))
5183
+ if (In(l) || In(f))
5184
5184
  return T;
5185
- const h = Mn(l.value, f.value);
5186
- return h.valid ? ((In(l) || In(f)) && i.dirty(), { status: i.value, value: h.data }) : (b(c, {
5185
+ const h = $n(l.value, f.value);
5186
+ return h.valid ? ((Mn(l) || Mn(f)) && i.dirty(), { status: i.value, value: h.data }) : (b(c, {
5187
5187
  code: w.invalid_intersection_types
5188
5188
  }), T);
5189
5189
  };
@@ -5306,7 +5306,7 @@ class vt extends O {
5306
5306
  });
5307
5307
  }
5308
5308
  }
5309
- class qt extends O {
5309
+ class Gt extends O {
5310
5310
  get keySchema() {
5311
5311
  return this._def.keyType;
5312
5312
  }
@@ -5348,7 +5348,7 @@ class qt extends O {
5348
5348
  }
5349
5349
  }
5350
5350
  }
5351
- qt.create = (a, r, i) => new qt({
5351
+ Gt.create = (a, r, i) => new Gt({
5352
5352
  valueType: r,
5353
5353
  keyType: a,
5354
5354
  typeName: S.ZodMap,
@@ -5431,13 +5431,13 @@ class Ze extends O {
5431
5431
  received: i.parsedType
5432
5432
  }), T;
5433
5433
  function c(h, g) {
5434
- return Vt({
5434
+ return Ft({
5435
5435
  data: h,
5436
5436
  path: i.path,
5437
5437
  errorMaps: [
5438
5438
  i.common.contextualErrorMap,
5439
5439
  i.schemaErrorMap,
5440
- zt(),
5440
+ Vt(),
5441
5441
  Le
5442
5442
  ].filter((y) => !!y),
5443
5443
  issueData: {
@@ -5447,13 +5447,13 @@ class Ze extends O {
5447
5447
  });
5448
5448
  }
5449
5449
  function u(h, g) {
5450
- return Vt({
5450
+ return Ft({
5451
5451
  data: h,
5452
5452
  path: i.path,
5453
5453
  errorMaps: [
5454
5454
  i.common.contextualErrorMap,
5455
5455
  i.schemaErrorMap,
5456
- zt(),
5456
+ Vt(),
5457
5457
  Le
5458
5458
  ].filter((y) => !!y),
5459
5459
  issueData: {
@@ -5574,7 +5574,7 @@ class me extends O {
5574
5574
  code: w.invalid_type
5575
5575
  }), T;
5576
5576
  }
5577
- if (Ft(this, lt) || mi(this, lt, new Set(this._def.values)), !Ft(this, lt).has(r.data)) {
5577
+ if (Wt(this, lt) || mi(this, lt, new Set(this._def.values)), !Wt(this, lt).has(r.data)) {
5578
5578
  const i = this._getOrReturnCtx(r), c = this._def.values;
5579
5579
  return b(i, {
5580
5580
  received: i.data,
@@ -5634,7 +5634,7 @@ class _t extends O {
5634
5634
  code: w.invalid_type
5635
5635
  }), T;
5636
5636
  }
5637
- if (Ft(this, dt) || mi(this, dt, new Set(I.getValidEnumValues(this._def.values))), !Ft(this, dt).has(r.data)) {
5637
+ if (Wt(this, dt) || mi(this, dt, new Set(I.getValidEnumValues(this._def.values))), !Wt(this, dt).has(r.data)) {
5638
5638
  const u = I.objectValues(i);
5639
5639
  return b(c, {
5640
5640
  received: c.data,
@@ -5856,7 +5856,7 @@ kt.create = (a, r) => new kt({
5856
5856
  catchValue: typeof r.catch == "function" ? r.catch : () => r.catch,
5857
5857
  ...A(r)
5858
5858
  });
5859
- class Gt extends O {
5859
+ class Jt extends O {
5860
5860
  _parse(r) {
5861
5861
  if (this._getType(r) !== _.nan) {
5862
5862
  const c = this._getOrReturnCtx(r);
@@ -5869,12 +5869,12 @@ class Gt extends O {
5869
5869
  return { status: "valid", value: r.data };
5870
5870
  }
5871
5871
  }
5872
- Gt.create = (a) => new Gt({
5872
+ Jt.create = (a) => new Jt({
5873
5873
  typeName: S.ZodNaN,
5874
5874
  ...A(a)
5875
5875
  });
5876
5876
  const Md = Symbol("zod_brand");
5877
- class $n extends O {
5877
+ class Rn extends O {
5878
5878
  _parse(r) {
5879
5879
  const { ctx: i } = this._processInputParams(r), c = i.data;
5880
5880
  return this._def.type._parse({
@@ -5959,7 +5959,7 @@ var S;
5959
5959
  })(S || (S = {}));
5960
5960
  const Rd = (a, r = {
5961
5961
  message: `Input not instance of ${a.name}`
5962
- }) => wi((i) => i instanceof a, r), bi = q.create, _i = fe.create, Cd = Gt.create, Nd = he.create, xi = ht.create, jd = Te.create, Dd = Wt.create, Ud = mt.create, Pd = pt.create, Zd = ze.create, Bd = Ee.create, Ld = oe.create, zd = Ht.create, Vd = G.create, Fd = C.create, Wd = C.strictCreate, Hd = gt.create, qd = Jt.create, Gd = yt.create, Jd = te.create, Kd = vt.create, Yd = qt.create, Qd = Ae.create, Xd = Ze.create, ef = wt.create, tf = bt.create, rf = me.create, nf = _t.create, sf = Ve.create, oi = J.create, af = X.create, of = pe.create, cf = J.createWithPreprocess, uf = St.create, lf = () => bi().optional(), df = () => _i().optional(), ff = () => xi().optional(), hf = {
5962
+ }) => wi((i) => i instanceof a, r), bi = q.create, _i = fe.create, Cd = Jt.create, Nd = he.create, xi = ht.create, jd = Te.create, Dd = Ht.create, Ud = mt.create, Pd = pt.create, Zd = ze.create, Bd = Ee.create, Ld = oe.create, zd = qt.create, Vd = G.create, Fd = C.create, Wd = C.strictCreate, Hd = gt.create, qd = Kt.create, Gd = yt.create, Jd = te.create, Kd = vt.create, Yd = Gt.create, Qd = Ae.create, Xd = Ze.create, ef = wt.create, tf = bt.create, rf = me.create, nf = _t.create, sf = Ve.create, ci = J.create, af = X.create, of = pe.create, cf = J.createWithPreprocess, uf = St.create, lf = () => bi().optional(), df = () => _i().optional(), ff = () => xi().optional(), hf = {
5963
5963
  string: (a) => q.create({ ...a, coerce: !0 }),
5964
5964
  number: (a) => fe.create({ ...a, coerce: !0 }),
5965
5965
  boolean: (a) => ht.create({
@@ -5973,23 +5973,23 @@ var j = /* @__PURE__ */ Object.freeze({
5973
5973
  __proto__: null,
5974
5974
  defaultErrorMap: Le,
5975
5975
  setErrorMap: od,
5976
- getErrorMap: zt,
5977
- makeIssue: Vt,
5976
+ getErrorMap: Vt,
5977
+ makeIssue: Ft,
5978
5978
  EMPTY_PATH: cd,
5979
5979
  addIssueToContext: b,
5980
5980
  ParseStatus: L,
5981
5981
  INVALID: T,
5982
5982
  DIRTY: Pe,
5983
5983
  OK: z,
5984
- isAborted: On,
5985
- isDirty: In,
5984
+ isAborted: In,
5985
+ isDirty: Mn,
5986
5986
  isValid: Se,
5987
5987
  isAsync: ft,
5988
5988
  get util() {
5989
5989
  return I;
5990
5990
  },
5991
5991
  get objectUtil() {
5992
- return An;
5992
+ return On;
5993
5993
  },
5994
5994
  ZodParsedType: _,
5995
5995
  getParsedType: ae,
@@ -6000,21 +6000,21 @@ var j = /* @__PURE__ */ Object.freeze({
6000
6000
  ZodBigInt: he,
6001
6001
  ZodBoolean: ht,
6002
6002
  ZodDate: Te,
6003
- ZodSymbol: Wt,
6003
+ ZodSymbol: Ht,
6004
6004
  ZodUndefined: mt,
6005
6005
  ZodNull: pt,
6006
6006
  ZodAny: ze,
6007
6007
  ZodUnknown: Ee,
6008
6008
  ZodNever: oe,
6009
- ZodVoid: Ht,
6009
+ ZodVoid: qt,
6010
6010
  ZodArray: G,
6011
6011
  ZodObject: C,
6012
6012
  ZodUnion: gt,
6013
- ZodDiscriminatedUnion: Jt,
6013
+ ZodDiscriminatedUnion: Kt,
6014
6014
  ZodIntersection: yt,
6015
6015
  ZodTuple: te,
6016
6016
  ZodRecord: vt,
6017
- ZodMap: qt,
6017
+ ZodMap: Gt,
6018
6018
  ZodSet: Ae,
6019
6019
  ZodFunction: Ze,
6020
6020
  ZodLazy: wt,
@@ -6028,9 +6028,9 @@ var j = /* @__PURE__ */ Object.freeze({
6028
6028
  ZodNullable: pe,
6029
6029
  ZodDefault: xt,
6030
6030
  ZodCatch: kt,
6031
- ZodNaN: Gt,
6031
+ ZodNaN: Jt,
6032
6032
  BRAND: Md,
6033
- ZodBranded: $n,
6033
+ ZodBranded: Rn,
6034
6034
  ZodPipeline: St,
6035
6035
  ZodReadonly: Et,
6036
6036
  custom: wi,
@@ -6047,7 +6047,7 @@ var j = /* @__PURE__ */ Object.freeze({
6047
6047
  boolean: xi,
6048
6048
  date: jd,
6049
6049
  discriminatedUnion: qd,
6050
- effect: oi,
6050
+ effect: ci,
6051
6051
  enum: rf,
6052
6052
  function: Xd,
6053
6053
  instanceof: Rd,
@@ -6074,7 +6074,7 @@ var j = /* @__PURE__ */ Object.freeze({
6074
6074
  strictObject: Wd,
6075
6075
  string: bi,
6076
6076
  symbol: Dd,
6077
- transformer: oi,
6077
+ transformer: ci,
6078
6078
  tuple: Jd,
6079
6079
  undefined: Ud,
6080
6080
  union: Hd,
@@ -6098,7 +6098,7 @@ const ge = H.getInstance(), pf = [
6098
6098
  "chatTopic",
6099
6099
  "userTopic",
6100
6100
  "additionalProps"
6101
- ], Rn = j.object({
6101
+ ], Cn = j.object({
6102
6102
  id: j.string(),
6103
6103
  targetMessageId: j.string().optional(),
6104
6104
  type: j.nativeEnum(ki),
@@ -6120,7 +6120,7 @@ const ge = H.getInstance(), pf = [
6120
6120
  reference: j.string(),
6121
6121
  timestamp: j.number()
6122
6122
  }), yf = j.object({
6123
- message: Rn,
6123
+ message: Cn,
6124
6124
  messageStateRefs: j.array(gf).nullable()
6125
6125
  });
6126
6126
  function Ei(a) {
@@ -6136,7 +6136,7 @@ function vf(a) {
6136
6136
  return !0;
6137
6137
  }
6138
6138
  function wf(a) {
6139
- const r = Rn.safeParse(a);
6139
+ const r = Cn.safeParse(a);
6140
6140
  return r.success ? Si(a) ? !0 : (ge.warn("Invalid message signature"), !1) : (ge.warn("Message data validation failed:", r.error.format()), !1);
6141
6141
  }
6142
6142
  function Si(a) {
@@ -6197,7 +6197,7 @@ function bf(a) {
6197
6197
  return Object.keys(a).length > h && r.push(`Too many additional properties: ${Object.keys(a).length} (max: ${h})`), { isValid: r.length === 0, errors: r };
6198
6198
  }
6199
6199
  function _f(a) {
6200
- const r = Rn.safeParse(a);
6200
+ const r = Cn.safeParse(a);
6201
6201
  if (!r.success) {
6202
6202
  const i = r.error.issues.map(
6203
6203
  (c) => c.path.length > 0 ? `${c.path.join(".")}: ${c.message}` : c.message
@@ -6230,7 +6230,7 @@ class xf {
6230
6230
  }
6231
6231
  return i;
6232
6232
  } catch (r) {
6233
- return this.errorHandler.handleError(r, "SwarmHistory.init"), ci.fromBigInt(0n);
6233
+ return this.errorHandler.handleError(r, "SwarmHistory.init"), Lt.fromBigInt(0n);
6234
6234
  }
6235
6235
  }
6236
6236
  async initMessageState(r) {
@@ -6334,10 +6334,10 @@ class kf {
6334
6334
  }
6335
6335
  // TODO: support for wrapped chunks
6336
6336
  async writeOwnFeedDataByIndexEnvelope(r, i) {
6337
- const { bee: c, stamp: u, chatTopic: l } = this.swarmSettings, { privateKey: f, ownAddress: h } = this.userDetails, g = new ke(f), y = xn.fromBlank(f, u, this.depth), x = this.generateUserOwnedFeedId(l, h), N = ut.fromString(x), re = di(N, r), ne = si(i), Fe = ii(ne, re, g), Oe = {
6337
+ const { bee: c, stamp: u, chatTopic: l } = this.swarmSettings, { privateKey: f, ownAddress: h } = this.userDetails, g = new ke(f), y = kn.fromBlank(f, u, this.depth), x = this.generateUserOwnedFeedId(l, h), N = ut.fromString(x), re = di(N, r), ne = ii(i), Fe = ai(ne, re, g), Oe = {
6338
6338
  hash: () => Fe.address.toUint8Array()
6339
- }, We = y.stamp(Oe), { upload: Kt } = c.makeSOCWriter(g), He = Ue.fromUtf8(i);
6340
- return (await Kt(We, re, He.toUint8Array())).reference.toHex();
6339
+ }, We = y.stamp(Oe), { upload: Yt } = c.makeSOCWriter(g), He = Ue.fromUtf8(i);
6340
+ return (await Yt(We, re, He.toUint8Array())).reference.toHex();
6341
6341
  }
6342
6342
  orderMessages(r) {
6343
6343
  return r.sort((i, c) => i.timestamp - c.timestamp);
@@ -6368,7 +6368,7 @@ class kf {
6368
6368
  }
6369
6369
  async uploadObjectToBeeEnvelope(r) {
6370
6370
  try {
6371
- const { bee: i, stamp: c } = this.swarmSettings, { privateKey: u } = this.userDetails, l = xn.fromBlank(u, c, this.depth), f = Ue.fromUtf8(JSON.stringify(r)), h = new Jl(async (y) => {
6371
+ const { bee: i, stamp: c } = this.swarmSettings, { privateKey: u } = this.userDetails, l = kn.fromBlank(u, c, this.depth), f = Ue.fromUtf8(JSON.stringify(r)), h = new Jl(async (y) => {
6372
6372
  await i.uploadChunk(l.stamp(y), y.build());
6373
6373
  });
6374
6374
  await h.append(f.toUint8Array());
@@ -6422,13 +6422,13 @@ class kf {
6422
6422
  }
6423
6423
  }
6424
6424
  async sendMessageToGsocOwn(r) {
6425
- const { bee: i, stamp: c, gsocTopic: u, gsocResourceId: l, gsocWriteTimeout: f } = this.swarmSettings, h = new ke(l), g = Lt.fromString(u), y = Ue.fromUtf8(r), { upload: x } = i.makeSOCWriter(h, {
6425
+ const { bee: i, stamp: c, gsocTopic: u, gsocResourceId: l, gsocWriteTimeout: f } = this.swarmSettings, h = new ke(l), g = zt.fromString(u), y = Ue.fromUtf8(r), { upload: x } = i.makeSOCWriter(h, {
6426
6426
  timeout: f
6427
6427
  });
6428
6428
  await x(c, g, y.toUint8Array());
6429
6429
  }
6430
6430
  async sendMessageToGsocEnvelope(r) {
6431
- const { bee: i, stamp: c, gsocTopic: u, gsocResourceId: l, gsocWriteTimeout: f } = this.swarmSettings, { privateKey: h } = this.userDetails, g = xn.fromBlank(h, c, this.depth), y = new ke(l), x = Lt.fromString(u), N = Ue.fromUtf8(r), re = si(N.toUint8Array()), ne = ii(re, x, y), Fe = {
6431
+ const { bee: i, stamp: c, gsocTopic: u, gsocResourceId: l, gsocWriteTimeout: f } = this.swarmSettings, { privateKey: h } = this.userDetails, g = kn.fromBlank(h, c, this.depth), y = new ke(l), x = zt.fromString(u), N = Ue.fromUtf8(r), re = ii(N.toUint8Array()), ne = ai(re, x, y), Fe = {
6432
6432
  hash: () => ne.address.toUint8Array()
6433
6433
  }, Oe = g.stamp(Fe), { upload: We } = i.makeSOCWriter(y, {
6434
6434
  timeout: f
@@ -6547,20 +6547,20 @@ class Sf {
6547
6547
  );
6548
6548
  if (l.status === "rejected")
6549
6549
  throw l.reason;
6550
- f.status === "fulfilled" && (this.gsocIndex = f.value);
6550
+ f.status === "fulfilled" ? this.gsocIndex = f.value : this.gsocIndex = Lt.fromBigInt(0n);
6551
6551
  } catch (c) {
6552
- this.errorHandler.handleError(c, "Chat.initSelfState"), (r = c.message) != null && r.includes("timed out") || (i = c.message) != null && i.includes("timeout") ? this.userDetails.ownIndex === void 0 && (this.userDetails.ownIndex = -1) : this.emitter.emit(W.CRITICAL_ERROR, c);
6552
+ this.errorHandler.handleError(c, "Chat.initSelfState"), (r = c.message) != null && r.includes("timed out") || (i = c.message) != null && i.includes("timeout") ? (this.userDetails.ownIndex === void 0 && (this.userDetails.ownIndex = -1), this.gsocIndex || (this.gsocIndex = Lt.fromBigInt(0n))) : this.emitter.emit(W.CRITICAL_ERROR, c);
6553
6553
  } finally {
6554
6554
  this.emitter.emit(W.LOADING_INIT, !1);
6555
6555
  }
6556
6556
  }
6557
6557
  async initOwnIndex() {
6558
- const { latestIndex: c } = await Tn(() => this.utils.getOwnLatestFeedIndex(), 10, 1e3);
6558
+ const { latestIndex: c } = await An(() => this.utils.getOwnLatestFeedIndex(), 10, 1e3);
6559
6559
  this.userDetails.ownIndex = c;
6560
6560
  }
6561
6561
  async broadcastUserMessage(r) {
6562
6562
  try {
6563
- return Tn(() => this.utils.sendMessageToGsoc(JSON.stringify(r)));
6563
+ return An(() => this.utils.sendMessageToGsoc(JSON.stringify(r)));
6564
6564
  } catch (i) {
6565
6565
  this.errorHandler.handleError(i, "Chat.broadcastUserMessage");
6566
6566
  }