@streamlayer/sdk-web 0.26.1 → 0.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,32 +1,32 @@
1
1
  import { QuestionType as Qe, QuestionStatus as Wt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
2
2
  import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
3
3
  import { SdkOverlayType as ve } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
4
- import { computed as Gr, map as Ln, atom as It } from "nanostores";
4
+ import { computed as Gr, map as $n, atom as It } from "nanostores";
5
5
  import "@nanostores/logger";
6
6
  import "microdiff";
7
- import { Code as $n, createPromiseClient as Dn, createCallbackClient as jn } from "@connectrpc/connect";
8
- import { createGrpcWebTransport as Mn } from "@connectrpc/connect-web";
9
- import { nanoquery as Vn } from "@nanostores/query";
10
- import { Events as qn } from "@streamlayer/sl-eslib/sports/events/events_connect";
7
+ import { Code as Dn, createPromiseClient as jn, createCallbackClient as Mn } from "@connectrpc/connect";
8
+ import { createGrpcWebTransport as Vn } from "@connectrpc/connect-web";
9
+ import { nanoquery as qn } from "@nanostores/query";
10
+ import { Events as Gn } from "@streamlayer/sl-eslib/sports/events/events_connect";
11
11
  import { Client as Ft } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
12
12
  import { Users as Qr } from "@streamlayer/sl-eslib/users/users_connect";
13
- import { pino as Gn } from "pino";
13
+ import { pino as Qn } from "pino";
14
14
  import { Feed as pe } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
15
- import { Leaderboard as Qn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
- var zr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
15
+ import { Leaderboard as zr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
+ var Kr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
17
17
  function zn(t) {
18
18
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
19
19
  }
20
- var _ = {}, Kr = {}, Ct = {};
20
+ var _ = {}, Hr = {}, Ct = {};
21
21
  Ct.byteLength = Wn;
22
22
  Ct.toByteArray = Yn;
23
23
  Ct.fromByteArray = ei;
24
- var we = [], ie = [], Kn = typeof Uint8Array < "u" ? Uint8Array : Array, Pt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
24
+ var we = [], oe = [], Kn = typeof Uint8Array < "u" ? Uint8Array : Array, Pt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
25
25
  for (var je = 0, Hn = Pt.length; je < Hn; ++je)
26
- we[je] = Pt[je], ie[Pt.charCodeAt(je)] = je;
27
- ie["-".charCodeAt(0)] = 62;
28
- ie["_".charCodeAt(0)] = 63;
29
- function Hr(t) {
26
+ we[je] = Pt[je], oe[Pt.charCodeAt(je)] = je;
27
+ oe["-".charCodeAt(0)] = 62;
28
+ oe["_".charCodeAt(0)] = 63;
29
+ function Wr(t) {
30
30
  var e = t.length;
31
31
  if (e % 4 > 0)
32
32
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -36,17 +36,17 @@ function Hr(t) {
36
36
  return [r, o];
37
37
  }
38
38
  function Wn(t) {
39
- var e = Hr(t), r = e[0], o = e[1];
39
+ var e = Wr(t), r = e[0], o = e[1];
40
40
  return (r + o) * 3 / 4 - o;
41
41
  }
42
42
  function Jn(t, e, r) {
43
43
  return (e + r) * 3 / 4 - r;
44
44
  }
45
45
  function Yn(t) {
46
- var e, r = Hr(t), o = r[0], s = r[1], u = new Kn(Jn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, d;
47
- for (d = 0; d < f; d += 4)
48
- e = ie[t.charCodeAt(d)] << 18 | ie[t.charCodeAt(d + 1)] << 12 | ie[t.charCodeAt(d + 2)] << 6 | ie[t.charCodeAt(d + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
49
- return s === 2 && (e = ie[t.charCodeAt(d)] << 2 | ie[t.charCodeAt(d + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = ie[t.charCodeAt(d)] << 10 | ie[t.charCodeAt(d + 1)] << 4 | ie[t.charCodeAt(d + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
46
+ var e, r = Wr(t), o = r[0], s = r[1], u = new Kn(Jn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, p;
47
+ for (p = 0; p < f; p += 4)
48
+ e = oe[t.charCodeAt(p)] << 18 | oe[t.charCodeAt(p + 1)] << 12 | oe[t.charCodeAt(p + 2)] << 6 | oe[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
49
+ return s === 2 && (e = oe[t.charCodeAt(p)] << 2 | oe[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = oe[t.charCodeAt(p)] << 10 | oe[t.charCodeAt(p + 1)] << 4 | oe[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
50
50
  }
51
51
  function Xn(t) {
52
52
  return we[t >> 18 & 63] + we[t >> 12 & 63] + we[t >> 6 & 63] + we[t & 63];
@@ -68,7 +68,7 @@ function ei(t) {
68
68
  var ur = {};
69
69
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
70
70
  ur.read = function(t, e, r, o, s) {
71
- var u, l, f = s * 8 - o - 1, d = (1 << f) - 1, A = d >> 1, g = -7, w = r ? s - 1 : 0, E = r ? -1 : 1, I = t[e + w];
71
+ var u, l, f = s * 8 - o - 1, p = (1 << f) - 1, A = p >> 1, g = -7, w = r ? s - 1 : 0, E = r ? -1 : 1, I = t[e + w];
72
72
  for (w += E, u = I & (1 << -g) - 1, I >>= -g, g += f; g > 0; u = u * 256 + t[e + w], w += E, g -= 8)
73
73
  ;
74
74
  for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + w], w += E, g -= 8)
@@ -76,19 +76,19 @@ ur.read = function(t, e, r, o, s) {
76
76
  if (u === 0)
77
77
  u = 1 - A;
78
78
  else {
79
- if (u === d)
79
+ if (u === p)
80
80
  return l ? NaN : (I ? -1 : 1) * (1 / 0);
81
81
  l = l + Math.pow(2, o), u = u - A;
82
82
  }
83
83
  return (I ? -1 : 1) * l * Math.pow(2, u - o);
84
84
  };
85
85
  ur.write = function(t, e, r, o, s, u) {
86
- var l, f, d, A = u * 8 - s - 1, g = (1 << A) - 1, w = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, I = o ? 0 : u - 1, R = o ? 1 : -1, U = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
87
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (d = Math.pow(2, -l)) < 1 && (l--, d *= 2), l + w >= 1 ? e += E / d : e += E * Math.pow(2, 1 - w), e * d >= 2 && (l++, d /= 2), l + w >= g ? (f = 0, l = g) : l + w >= 1 ? (f = (e * d - 1) * Math.pow(2, s), l = l + w) : (f = e * Math.pow(2, w - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + I] = f & 255, I += R, f /= 256, s -= 8)
86
+ var l, f, p, A = u * 8 - s - 1, g = (1 << A) - 1, w = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, I = o ? 0 : u - 1, R = o ? 1 : -1, L = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
87
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + w >= 1 ? e += E / p : e += E * Math.pow(2, 1 - w), e * p >= 2 && (l++, p /= 2), l + w >= g ? (f = 0, l = g) : l + w >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + w) : (f = e * Math.pow(2, w - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + I] = f & 255, I += R, f /= 256, s -= 8)
88
88
  ;
89
89
  for (l = l << s | f, A += s; A > 0; t[r + I] = l & 255, I += R, l /= 256, A -= 8)
90
90
  ;
91
- t[r + I - R] |= U * 128;
91
+ t[r + I - R] |= L * 128;
92
92
  };
93
93
  /*!
94
94
  * The buffer module from node.js, for the browser.
@@ -140,10 +140,10 @@ ur.write = function(t, e, r, o, s, u) {
140
140
  );
141
141
  return w(a);
142
142
  }
143
- return d(a, n, i);
143
+ return p(a, n, i);
144
144
  }
145
145
  f.poolSize = 8192;
146
- function d(a, n, i) {
146
+ function p(a, n, i) {
147
147
  if (typeof a == "string")
148
148
  return E(a, n);
149
149
  if (ArrayBuffer.isView(a))
@@ -153,7 +153,7 @@ ur.write = function(t, e, r, o, s, u) {
153
153
  "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
154
154
  );
155
155
  if (ge(a, ArrayBuffer) || a && ge(a.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (ge(a, SharedArrayBuffer) || a && ge(a.buffer, SharedArrayBuffer)))
156
- return U(a, n, i);
156
+ return L(a, n, i);
157
157
  if (typeof a == "number")
158
158
  throw new TypeError(
159
159
  'The "value" argument must not be of type number. Received type number'
@@ -171,7 +171,7 @@ ur.write = function(t, e, r, o, s, u) {
171
171
  );
172
172
  }
173
173
  f.from = function(a, n, i) {
174
- return d(a, n, i);
174
+ return p(a, n, i);
175
175
  }, Object.setPrototypeOf(f.prototype, Uint8Array.prototype), Object.setPrototypeOf(f, Uint8Array);
176
176
  function A(a) {
177
177
  if (typeof a != "number")
@@ -210,11 +210,11 @@ ur.write = function(t, e, r, o, s, u) {
210
210
  function R(a) {
211
211
  if (ge(a, Uint8Array)) {
212
212
  const n = new Uint8Array(a);
213
- return U(n.buffer, n.byteOffset, n.byteLength);
213
+ return L(n.buffer, n.byteOffset, n.byteLength);
214
214
  }
215
215
  return I(a);
216
216
  }
217
- function U(a, n, i) {
217
+ function L(a, n, i) {
218
218
  if (n < 0 || a.byteLength < n)
219
219
  throw new RangeError('"offset" is outside of buffer bounds');
220
220
  if (a.byteLength < n + (i || 0))
@@ -485,7 +485,7 @@ ur.write = function(t, e, r, o, s, u) {
485
485
  }, f.prototype.lastIndexOf = function(n, i, c) {
486
486
  return j(this, n, i, c, !1);
487
487
  };
488
- function te(a, n, i, c) {
488
+ function re(a, n, i, c) {
489
489
  i = Number(i) || 0;
490
490
  const h = a.length - i;
491
491
  c ? (c = Number(c), c > h && (c = h)) : c = h;
@@ -500,7 +500,7 @@ ur.write = function(t, e, r, o, s, u) {
500
500
  }
501
501
  return m;
502
502
  }
503
- function re(a, n, i, c) {
503
+ function ne(a, n, i, c) {
504
504
  return nt(rt(n, a.length - i), a, i, c);
505
505
  }
506
506
  function Ce(a, n, i, c) {
@@ -531,10 +531,10 @@ ur.write = function(t, e, r, o, s, u) {
531
531
  for (; ; )
532
532
  switch (h) {
533
533
  case "hex":
534
- return te(this, n, i, c);
534
+ return re(this, n, i, c);
535
535
  case "utf8":
536
536
  case "utf-8":
537
- return re(this, n, i, c);
537
+ return ne(this, n, i, c);
538
538
  case "ascii":
539
539
  case "latin1":
540
540
  case "binary":
@@ -619,7 +619,7 @@ ur.write = function(t, e, r, o, s, u) {
619
619
  (!n || n < 0) && (n = 0), (!i || i < 0 || i > c) && (i = c);
620
620
  let h = "";
621
621
  for (let y = n; y < i; ++y)
622
- h += Nn[a[y]];
622
+ h += Ln[a[y]];
623
623
  return h;
624
624
  }
625
625
  function Oe(a, n, i) {
@@ -666,13 +666,13 @@ ur.write = function(t, e, r, o, s, u) {
666
666
  }, f.prototype.readBigUInt64LE = xe(function(n) {
667
667
  n = n >>> 0, he(n, "offset");
668
668
  const i = this[n], c = this[n + 7];
669
- (i === void 0 || c === void 0) && ne(n, this.length - 8);
669
+ (i === void 0 || c === void 0) && ie(n, this.length - 8);
670
670
  const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + c * 2 ** 24;
671
671
  return BigInt(h) + (BigInt(y) << BigInt(32));
672
672
  }), f.prototype.readBigUInt64BE = xe(function(n) {
673
673
  n = n >>> 0, he(n, "offset");
674
674
  const i = this[n], c = this[n + 7];
675
- (i === void 0 || c === void 0) && ne(n, this.length - 8);
675
+ (i === void 0 || c === void 0) && ie(n, this.length - 8);
676
676
  const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + c;
677
677
  return (BigInt(h) << BigInt(32)) + BigInt(y);
678
678
  }), f.prototype.readIntLE = function(n, i, c) {
@@ -704,13 +704,13 @@ ur.write = function(t, e, r, o, s, u) {
704
704
  }, f.prototype.readBigInt64LE = xe(function(n) {
705
705
  n = n >>> 0, he(n, "offset");
706
706
  const i = this[n], c = this[n + 7];
707
- (i === void 0 || c === void 0) && ne(n, this.length - 8);
707
+ (i === void 0 || c === void 0) && ie(n, this.length - 8);
708
708
  const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (c << 24);
709
709
  return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
710
710
  }), f.prototype.readBigInt64BE = xe(function(n) {
711
711
  n = n >>> 0, he(n, "offset");
712
712
  const i = this[n], c = this[n + 7];
713
- (i === void 0 || c === void 0) && ne(n, this.length - 8);
713
+ (i === void 0 || c === void 0) && ie(n, this.length - 8);
714
714
  const h = (i << 24) + // Overflow
715
715
  this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
716
716
  return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + c);
@@ -723,7 +723,7 @@ ur.write = function(t, e, r, o, s, u) {
723
723
  }, f.prototype.readDoubleBE = function(n, i) {
724
724
  return n = n >>> 0, i || V(n, 8, this.length), r.read(this, n, !1, 52, 8);
725
725
  };
726
- function p(a, n, i, c, h, y) {
726
+ function d(a, n, i, c, h, y) {
727
727
  if (!f.isBuffer(a))
728
728
  throw new TypeError('"buffer" argument must be a Buffer instance');
729
729
  if (n > h || n < y)
@@ -734,7 +734,7 @@ ur.write = function(t, e, r, o, s, u) {
734
734
  f.prototype.writeUintLE = f.prototype.writeUIntLE = function(n, i, c, h) {
735
735
  if (n = +n, i = i >>> 0, c = c >>> 0, !h) {
736
736
  const T = Math.pow(2, 8 * c) - 1;
737
- p(this, n, i, c, T, 0);
737
+ d(this, n, i, c, T, 0);
738
738
  }
739
739
  let y = 1, m = 0;
740
740
  for (this[i] = n & 255; ++m < c && (y *= 256); )
@@ -743,22 +743,22 @@ ur.write = function(t, e, r, o, s, u) {
743
743
  }, f.prototype.writeUintBE = f.prototype.writeUIntBE = function(n, i, c, h) {
744
744
  if (n = +n, i = i >>> 0, c = c >>> 0, !h) {
745
745
  const T = Math.pow(2, 8 * c) - 1;
746
- p(this, n, i, c, T, 0);
746
+ d(this, n, i, c, T, 0);
747
747
  }
748
748
  let y = c - 1, m = 1;
749
749
  for (this[i + y] = n & 255; --y >= 0 && (m *= 256); )
750
750
  this[i + y] = n / m & 255;
751
751
  return i + c;
752
752
  }, f.prototype.writeUint8 = f.prototype.writeUInt8 = function(n, i, c) {
753
- return n = +n, i = i >>> 0, c || p(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
753
+ return n = +n, i = i >>> 0, c || d(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
754
754
  }, f.prototype.writeUint16LE = f.prototype.writeUInt16LE = function(n, i, c) {
755
- return n = +n, i = i >>> 0, c || p(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
755
+ return n = +n, i = i >>> 0, c || d(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
756
756
  }, f.prototype.writeUint16BE = f.prototype.writeUInt16BE = function(n, i, c) {
757
- return n = +n, i = i >>> 0, c || p(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
757
+ return n = +n, i = i >>> 0, c || d(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
758
758
  }, f.prototype.writeUint32LE = f.prototype.writeUInt32LE = function(n, i, c) {
759
- return n = +n, i = i >>> 0, c || p(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
759
+ return n = +n, i = i >>> 0, c || d(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
760
760
  }, f.prototype.writeUint32BE = f.prototype.writeUInt32BE = function(n, i, c) {
761
- return n = +n, i = i >>> 0, c || p(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
761
+ return n = +n, i = i >>> 0, c || d(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
762
762
  };
763
763
  function b(a, n, i, c, h) {
764
764
  ye(n, c, h, a, i, 7);
@@ -781,7 +781,7 @@ ur.write = function(t, e, r, o, s, u) {
781
781
  }), f.prototype.writeIntLE = function(n, i, c, h) {
782
782
  if (n = +n, i = i >>> 0, !h) {
783
783
  const q = Math.pow(2, 8 * c - 1);
784
- p(this, n, i, c, q - 1, -q);
784
+ d(this, n, i, c, q - 1, -q);
785
785
  }
786
786
  let y = 0, m = 1, T = 0;
787
787
  for (this[i] = n & 255; ++y < c && (m *= 256); )
@@ -790,22 +790,22 @@ ur.write = function(t, e, r, o, s, u) {
790
790
  }, f.prototype.writeIntBE = function(n, i, c, h) {
791
791
  if (n = +n, i = i >>> 0, !h) {
792
792
  const q = Math.pow(2, 8 * c - 1);
793
- p(this, n, i, c, q - 1, -q);
793
+ d(this, n, i, c, q - 1, -q);
794
794
  }
795
795
  let y = c - 1, m = 1, T = 0;
796
796
  for (this[i + y] = n & 255; --y >= 0 && (m *= 256); )
797
797
  n < 0 && T === 0 && this[i + y + 1] !== 0 && (T = 1), this[i + y] = (n / m >> 0) - T & 255;
798
798
  return i + c;
799
799
  }, f.prototype.writeInt8 = function(n, i, c) {
800
- return n = +n, i = i >>> 0, c || p(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
800
+ return n = +n, i = i >>> 0, c || d(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
801
801
  }, f.prototype.writeInt16LE = function(n, i, c) {
802
- return n = +n, i = i >>> 0, c || p(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
802
+ return n = +n, i = i >>> 0, c || d(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
803
803
  }, f.prototype.writeInt16BE = function(n, i, c) {
804
- return n = +n, i = i >>> 0, c || p(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
804
+ return n = +n, i = i >>> 0, c || d(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
805
805
  }, f.prototype.writeInt32LE = function(n, i, c) {
806
- return n = +n, i = i >>> 0, c || p(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
806
+ return n = +n, i = i >>> 0, c || d(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
807
807
  }, f.prototype.writeInt32BE = function(n, i, c) {
808
- return n = +n, i = i >>> 0, c || p(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
808
+ return n = +n, i = i >>> 0, c || d(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
809
809
  }, f.prototype.writeBigInt64LE = xe(function(n, i = 0) {
810
810
  return b(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
811
811
  }), f.prototype.writeBigInt64BE = xe(function(n, i = 0) {
@@ -922,11 +922,11 @@ ur.write = function(t, e, r, o, s, u) {
922
922
  "ERR_OUT_OF_RANGE",
923
923
  function(a, n, i) {
924
924
  let c = `The value of "${a}" is out of range.`, h = i;
925
- return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = L(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = L(h)), h += "n"), c += ` It must be ${n}. Received ${h}`, c;
925
+ return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = U(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = U(h)), h += "n"), c += ` It must be ${n}. Received ${h}`, c;
926
926
  },
927
927
  RangeError
928
928
  );
929
- function L(a) {
929
+ function U(a) {
930
930
  let n = "", i = a.length;
931
931
  const c = a[0] === "-" ? 1 : 0;
932
932
  for (; i >= c + 4; i -= 3)
@@ -934,7 +934,7 @@ ur.write = function(t, e, r, o, s, u) {
934
934
  return `${a.slice(0, i)}${n}`;
935
935
  }
936
936
  function Y(a, n, i) {
937
- he(n, "offset"), (a[n] === void 0 || a[n + i] === void 0) && ne(n, a.length - (i + 1));
937
+ he(n, "offset"), (a[n] === void 0 || a[n + i] === void 0) && ie(n, a.length - (i + 1));
938
938
  }
939
939
  function ye(a, n, i, c, h, y) {
940
940
  if (a > i || a < n) {
@@ -948,7 +948,7 @@ ur.write = function(t, e, r, o, s, u) {
948
948
  if (typeof a != "number")
949
949
  throw new C.ERR_INVALID_ARG_TYPE(n, "number", a);
950
950
  }
951
- function ne(a, n, i) {
951
+ function ie(a, n, i) {
952
952
  throw Math.floor(a) !== a ? (he(a, i), new C.ERR_OUT_OF_RANGE(i || "offset", "an integer", a)) : n < 0 ? new C.ERR_BUFFER_OUT_OF_BOUNDS() : new C.ERR_OUT_OF_RANGE(
953
953
  i || "offset",
954
954
  `>= ${i ? 1 : 0} and <= ${n}`,
@@ -1050,7 +1050,7 @@ ur.write = function(t, e, r, o, s, u) {
1050
1050
  function kt(a) {
1051
1051
  return a !== a;
1052
1052
  }
1053
- const Nn = function() {
1053
+ const Ln = function() {
1054
1054
  const a = "0123456789abcdef", n = new Array(256);
1055
1055
  for (let i = 0; i < 16; ++i) {
1056
1056
  const c = i * 16;
@@ -1065,8 +1065,8 @@ ur.write = function(t, e, r, o, s, u) {
1065
1065
  function Un() {
1066
1066
  throw new Error("BigInt not supported");
1067
1067
  }
1068
- })(Kr);
1069
- var Wr = { exports: {} }, K = Wr.exports = {}, me, be;
1068
+ })(Hr);
1069
+ var Jr = { exports: {} }, K = Jr.exports = {}, me, be;
1070
1070
  function Jt() {
1071
1071
  throw new Error("setTimeout has not been defined");
1072
1072
  }
@@ -1085,7 +1085,7 @@ function Yt() {
1085
1085
  be = Yt;
1086
1086
  }
1087
1087
  })();
1088
- function Jr(t) {
1088
+ function Yr(t) {
1089
1089
  if (me === setTimeout)
1090
1090
  return setTimeout(t, 0);
1091
1091
  if ((me === Jt || !me) && setTimeout)
@@ -1117,11 +1117,11 @@ function ti(t) {
1117
1117
  }
1118
1118
  var Ie = [], ze = !1, Ne, lt = -1;
1119
1119
  function ri() {
1120
- !ze || !Ne || (ze = !1, Ne.length ? Ie = Ne.concat(Ie) : lt = -1, Ie.length && Yr());
1120
+ !ze || !Ne || (ze = !1, Ne.length ? Ie = Ne.concat(Ie) : lt = -1, Ie.length && Xr());
1121
1121
  }
1122
- function Yr() {
1122
+ function Xr() {
1123
1123
  if (!ze) {
1124
- var t = Jr(ri);
1124
+ var t = Yr(ri);
1125
1125
  ze = !0;
1126
1126
  for (var e = Ie.length; e; ) {
1127
1127
  for (Ne = Ie, Ie = []; ++lt < e; )
@@ -1136,12 +1136,12 @@ K.nextTick = function(t) {
1136
1136
  if (arguments.length > 1)
1137
1137
  for (var r = 1; r < arguments.length; r++)
1138
1138
  e[r - 1] = arguments[r];
1139
- Ie.push(new Xr(t, e)), Ie.length === 1 && !ze && Jr(Yr);
1139
+ Ie.push(new Zr(t, e)), Ie.length === 1 && !ze && Yr(Xr);
1140
1140
  };
1141
- function Xr(t, e) {
1141
+ function Zr(t, e) {
1142
1142
  this.fun = t, this.array = e;
1143
1143
  }
1144
- Xr.prototype.run = function() {
1144
+ Zr.prototype.run = function() {
1145
1145
  this.fun.apply(null, this.array);
1146
1146
  };
1147
1147
  K.title = "browser";
@@ -1176,10 +1176,10 @@ K.chdir = function(t) {
1176
1176
  K.umask = function() {
1177
1177
  return 0;
1178
1178
  };
1179
- var ni = Wr.exports;
1179
+ var ni = Jr.exports;
1180
1180
  (function(t) {
1181
1181
  Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
1182
- const e = Kr, r = ni, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
1182
+ const e = Hr, r = ni, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
1183
1183
  Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
1184
1184
  })(_);
1185
1185
  class ii {
@@ -1212,7 +1212,7 @@ class it extends _t {
1212
1212
  subscribe = (...e) => this.getStore().subscribe(...e);
1213
1213
  unsubscribe = () => this.getStore().off();
1214
1214
  }
1215
- const ot = (t) => Ln(t);
1215
+ const ot = (t) => $n(t);
1216
1216
  var Ee;
1217
1217
  (function(t) {
1218
1218
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
@@ -1223,10 +1223,10 @@ const si = {
1223
1223
  [ve.PUBLIC_CHAT]: "publicChat",
1224
1224
  [ve.TWITTER]: "twitter"
1225
1225
  };
1226
- var Ue;
1226
+ var Le;
1227
1227
  (function(t) {
1228
1228
  t.Ready = "ready", t.Suspended = "suspended";
1229
- })(Ue || (Ue = {}));
1229
+ })(Le || (Le = {}));
1230
1230
  class cr {
1231
1231
  status;
1232
1232
  source;
@@ -1235,7 +1235,7 @@ class cr {
1235
1235
  listeners = /* @__PURE__ */ new Set();
1236
1236
  settingsKey;
1237
1237
  constructor({ settings: e, ...r }, o) {
1238
- this.settingsKey = si[r.type], this.status = It(Ue.Suspended), this.config = new it(ot(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new it(ot(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new it(ot({}), `feature:settings:${this.settingsKey}`), this.source = o;
1238
+ this.settingsKey = si[r.type], this.status = It(Le.Suspended), this.config = new it(ot(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new it(ot(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new it(ot({}), `feature:settings:${this.settingsKey}`), this.source = o;
1239
1239
  }
1240
1240
  get featureConfig() {
1241
1241
  return this.config.getStore();
@@ -1247,10 +1247,10 @@ class cr {
1247
1247
  this.listeners.add(e);
1248
1248
  }
1249
1249
  enable = () => {
1250
- this.status.set(Ue.Ready);
1250
+ this.status.set(Le.Ready);
1251
1251
  };
1252
1252
  disable = () => {
1253
- this.status.set(Ue.Suspended);
1253
+ this.status.set(Le.Suspended);
1254
1254
  };
1255
1255
  setFeatureConfig = ({ settings: e, ...r }) => {
1256
1256
  let o;
@@ -1293,7 +1293,7 @@ class ae extends _t {
1293
1293
  }
1294
1294
  }
1295
1295
  const ue = (t) => It(t), fr = (t, e) => Gr(t, e);
1296
- class se extends _t {
1296
+ class te extends _t {
1297
1297
  atomStore;
1298
1298
  constructor(e, r, o) {
1299
1299
  super(e, `api:${r}`), this.atomStore = It(), o && e.subscribe((s) => {
@@ -1432,7 +1432,7 @@ class ci {
1432
1432
  this.addStateLog(`data routed to ${this.listeners.size} listeners`);
1433
1433
  };
1434
1434
  onStreamError = (e) => {
1435
- e !== void 0 && (e.code !== $n.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
1435
+ e !== void 0 && (e.code !== Dn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
1436
1436
  };
1437
1437
  }
1438
1438
  class fi {
@@ -1453,8 +1453,8 @@ class fi {
1453
1453
  this.host = e, this.$headers = new it(ot({
1454
1454
  "sl-device-id": _.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
1455
1455
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
1456
- const [r, o, s] = Vn();
1457
- this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Mn({
1456
+ const [r, o, s] = qn();
1457
+ this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Vn({
1458
1458
  baseUrl: e,
1459
1459
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1460
1460
  // @ts-ignore
@@ -1490,14 +1490,14 @@ class fi {
1490
1490
  const r = e.typeName;
1491
1491
  if (this.clients.has(r))
1492
1492
  return this.clients.get(r);
1493
- const o = Dn(e, this.transport);
1493
+ const o = jn(e, this.transport);
1494
1494
  return this.clients.set(r, o), o;
1495
1495
  };
1496
1496
  getCallbackClient = (e) => {
1497
1497
  const r = e.typeName;
1498
1498
  if (this.callbackClients.has(r))
1499
1499
  return this.callbackClients.get(r);
1500
- const o = jn(e, this.transport);
1500
+ const o = Mn(e, this.transport);
1501
1501
  return this.callbackClients.set(r, o), o;
1502
1502
  };
1503
1503
  // create unary client, used for query request
@@ -1533,7 +1533,7 @@ class fi {
1533
1533
  };
1534
1534
  }
1535
1535
  const li = (t, e) => {
1536
- const { client: r, queryKey: o } = e.createPromiseClient(qn, {
1536
+ const { client: r, queryKey: o } = e.createPromiseClient(Gn, {
1537
1537
  method: "retrieveEventId",
1538
1538
  params: [t]
1539
1539
  });
@@ -1566,8 +1566,8 @@ const li = (t, e) => {
1566
1566
  }, di = (t) => {
1567
1567
  const { client: e, queryKeyStr: r } = t.createPromiseClient(Qr, { method: "bypassAuth" });
1568
1568
  return t.nanoquery.createMutatorStore(async ({ data: { userKey: o, schema: s, init: u }, getCacheUpdater: l }) => {
1569
- const [f] = l(r), d = await e.bypassAuth({ userKey: o, schema: s, init: u });
1570
- return f(d), d;
1569
+ const [f] = l(r), p = await e.bypassAuth({ userKey: o, schema: s, init: u });
1570
+ return f(p), p;
1571
1571
  });
1572
1572
  }, yi = (t, e) => {
1573
1573
  const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "get", params: [t] });
@@ -1623,7 +1623,7 @@ var Re;
1623
1623
  (function(t) {
1624
1624
  t.SCHEMA = "schema", t.TOKEN = "token";
1625
1625
  })(Re || (Re = {}));
1626
- class Zr extends lr {
1626
+ class en extends lr {
1627
1627
  constructor() {
1628
1628
  super("user");
1629
1629
  }
@@ -1649,22 +1649,22 @@ var ke;
1649
1649
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
1650
1650
  })(ke || (ke = {}));
1651
1651
  const wi = (t) => {
1652
- const e = new ae(ue(void 0), "enabled"), r = new ae(ue(ke.DISABLED), "status"), o = new ae(ue(void 0), "userKey"), s = new ae(ue(void 0), "userToken"), u = new Zr();
1652
+ const e = new ae(ue(void 0), "enabled"), r = new ae(ue(ke.DISABLED), "status"), o = new ae(ue(void 0), "userKey"), s = new ae(ue(void 0), "userToken"), u = new en();
1653
1653
  s.listen((I) => {
1654
1654
  I ? u.setToken(I) : u.removeToken();
1655
1655
  });
1656
- const l = new ae(ue(void 0), "providerStreamId"), f = new se(li(l.getStore(), t), "slStreamId", (I) => I?.data), d = new se(pi(s.getStore(), t), "user", (I) => I?.data?.data?.id), A = new se(yi(s.getStore(), t), "userSettings"), g = new se(hi(f.getAtomStore(), t), "streamSettings");
1656
+ const l = new ae(ue(void 0), "providerStreamId"), f = new te(li(l.getStore(), t), "slStreamId", (I) => I?.data), p = new te(pi(s.getStore(), t), "user", (I) => I?.data?.data?.id), A = new te(yi(s.getStore(), t), "userSettings"), g = new te(hi(f.getAtomStore(), t), "streamSettings");
1657
1657
  f.getAtomStore().listen((I) => {
1658
1658
  (I === "" || I === void 0) && g.getStore().mutate(void 0);
1659
1659
  });
1660
- const w = new se(gi(e.getStore(), t), "organizationSettings", (I) => I?.data?.id), E = new se(mi(w.getAtomStore(), t), "organizationAdvertising");
1660
+ const w = new te(gi(e.getStore(), t), "organizationSettings", (I) => I?.data?.id), E = new te(mi(w.getAtomStore(), t), "organizationAdvertising");
1661
1661
  return {
1662
1662
  enabled: e,
1663
1663
  status: r,
1664
1664
  providerStreamId: l,
1665
1665
  slStreamId: f,
1666
1666
  streamSettings: g,
1667
- user: d,
1667
+ user: p,
1668
1668
  userKey: o,
1669
1669
  userToken: s,
1670
1670
  userSettings: A,
@@ -1720,7 +1720,7 @@ class Si extends ii {
1720
1720
  }
1721
1721
  const Ai = async (t, e, r) => {
1722
1722
  t.auth = new Si(t.store, t.transport);
1723
- const o = new Zr(), s = o.getSchema(), u = o.getToken();
1723
+ const o = new en(), s = o.getSchema(), u = o.getToken();
1724
1724
  s && u && (console.log("try to login prev user"), await t.auth.login(s, u)), t.sdk.authorizationBypass = async (l, f) => {
1725
1725
  await t.auth.login(l, f), o.setSchema("streamlayer:streamlayer");
1726
1726
  }, t.sdk.logout = () => {
@@ -1744,27 +1744,39 @@ const Ai = async (t, e, r) => {
1744
1744
  }, t.sdk.createEventSession = (o) => {
1745
1745
  t.stores.providerStreamId.setValue(""), t.stores.providerStreamId.setValue(o);
1746
1746
  }, r();
1747
- }, Fi = Gn({
1747
+ }, Fi = Qn({
1748
1748
  level: "trace"
1749
- }), en = (t, e) => Fi.child({ name: t }, e), Ci = (t, e, r) => {
1750
- const { client: o, queryKey: s } = r.createPromiseClient(Qn, {
1749
+ }), tn = (t, e) => Fi.child({ name: t }, e), Ci = (t, e, r) => {
1750
+ const { client: o, queryKey: s } = r.createPromiseClient(zr, {
1751
1751
  method: "summary",
1752
1752
  params: [t, e]
1753
1753
  });
1754
1754
  return r.nanoquery.createFetcherStore(s, {
1755
- fetcher: async (u, l, f, d) => (await o.summary({
1755
+ fetcher: async (u, l, f, p) => (await o.summary({
1756
1756
  eventId: f,
1757
- userId: d
1757
+ userId: p
1758
1758
  })).data?.attributes
1759
1759
  });
1760
- }, _i = (t, e) => {
1760
+ }, _i = (t, e, r) => {
1761
+ const { client: o, queryKey: s } = r.createPromiseClient(zr, {
1762
+ method: "list",
1763
+ params: [t, e]
1764
+ });
1765
+ return r.nanoquery.createFetcherStore(s, {
1766
+ fetcher: async (u, l, f, p) => (await o.list({
1767
+ usersIds: [],
1768
+ eventId: f,
1769
+ leaderboardId: p
1770
+ })).data
1771
+ });
1772
+ }, Ti = (t, e) => {
1761
1773
  const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "get", params: [t] });
1762
1774
  return e.nanoquery.createFetcherStore(o, {
1763
1775
  fetcher: async (s, u, l) => (await r.get({
1764
1776
  eventId: l
1765
1777
  })).data?.attributes
1766
1778
  });
1767
- }, Ti = (t, e) => {
1779
+ }, Bi = (t, e) => {
1768
1780
  const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "syncQuestion", params: [t] });
1769
1781
  return e.nanoquery.createFetcherStore(o, {
1770
1782
  fetcher: async (s, u, l) => l ? (await r.syncQuestion({
@@ -1773,42 +1785,42 @@ const Ai = async (t, e, r) => {
1773
1785
  }
1774
1786
  })).data?.attributes : void 0
1775
1787
  });
1776
- }, Bi = (t, e) => {
1788
+ }, Oi = (t, e) => {
1777
1789
  const { client: r } = e.createCallbackClient(pe), o = It({ eventId: t.get() || "", feedId: "" });
1778
1790
  return t.subscribe((u = "") => {
1779
1791
  o.set({ eventId: u, feedId: "" });
1780
1792
  }), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
1781
- }, Oi = (t, e) => {
1793
+ }, xi = (t, e) => {
1782
1794
  const { client: r } = e.createCallbackClient(pe);
1783
1795
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
1784
- }, xi = async (t, e) => {
1796
+ }, ki = async (t, e) => {
1785
1797
  const { client: r } = e.createPromiseClient(pe, { method: "questionByUser", params: [t] });
1786
1798
  return (await r.questionByUser({
1787
1799
  questionId: t
1788
1800
  })).data?.attributes?.question;
1789
- }, ki = (t, e) => {
1801
+ }, Pi = (t, e) => {
1790
1802
  const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "questionByUser", params: [t] });
1791
1803
  return e.nanoquery.createFetcherStore(o, {
1792
1804
  fetcher: async (s, u, l) => (await r.questionByUser({
1793
1805
  questionId: l
1794
1806
  })).data?.attributes?.question
1795
1807
  });
1796
- }, Pi = (t, e) => {
1808
+ }, Ri = (t, e) => {
1797
1809
  const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "pickHistory", params: [t] });
1798
1810
  return e.nanoquery.createFetcherStore(o, {
1799
1811
  fetcher: async (s, u, l) => l ? (await r.pickHistory({
1800
1812
  eventId: l
1801
- })).data?.map(({ attributes: d }) => d) : void 0
1813
+ })).data?.map(({ attributes: p }) => p) : void 0
1802
1814
  });
1803
- }, Ri = (t, e) => {
1815
+ }, Ni = (t, e) => {
1804
1816
  const { client: r, queryKey: o } = e.createPromiseClient(pe, { method: "insightHistory", params: [t] });
1805
1817
  return e.nanoquery.createFetcherStore(o, {
1806
1818
  fetcher: async (s, u, l) => l ? (await r.insightHistory({
1807
1819
  eventId: l
1808
- })).data?.map(({ attributes: d }) => d) : void 0
1820
+ })).data?.map(({ attributes: p }) => p) : void 0
1809
1821
  });
1810
- }, tn = (t) => (t.gamification || (t.gamification = new Ni(t)), t.gamification);
1811
- class Ni {
1822
+ }, rn = (t) => (t.gamification || (t.gamification = new Li(t)), t.gamification);
1823
+ class Li {
1812
1824
  /** sl event id */
1813
1825
  slStreamId;
1814
1826
  /** organization id */
@@ -1834,13 +1846,13 @@ class Ni {
1834
1846
  constructor(e) {
1835
1847
  if (e.gamification)
1836
1848
  throw new Error("GamificationBackground Singleton error");
1837
- this.log = en("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ae(ue(void 0), "moderationId").getStore(), this.openedQuestionId = new ae(ue(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new se(_i(this.slStreamId, e.transport), "gamification:moderation"), this.activeQuestionId = new se(Ti(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = new se(ki(this.openedQuestionId, e.transport), "gamification:openedQuestion"), this.openedQuestionId.listen((r) => {
1838
- this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Oi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
1849
+ this.log = tn("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ae(ue(void 0), "moderationId").getStore(), this.openedQuestionId = new ae(ue(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new te(Ti(this.slStreamId, e.transport), "gamification:moderation"), this.activeQuestionId = new te(Bi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = new te(Pi(this.openedQuestionId, e.transport), "gamification:openedQuestion"), this.openedQuestionId.listen((r) => {
1850
+ this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = xi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
1839
1851
  window.requestAnimationFrame(() => {
1840
1852
  this.openedQuestion?.getStore().mutate(o.data?.attributes?.question), this.openedQuestion?.getStore().invalidate();
1841
1853
  });
1842
1854
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.openedQuestion?.getStore().mutate(void 0), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1843
- }), this.feedSubscription = Bi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1855
+ }), this.feedSubscription = Oi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1844
1856
  window.requestAnimationFrame(() => {
1845
1857
  const o = this.activeQuestionId.getStore();
1846
1858
  o && o.mutate(r.data?.attributes);
@@ -1885,7 +1897,7 @@ class Ui {
1885
1897
  options;
1886
1898
  logger;
1887
1899
  constructor(e) {
1888
- this.options = e, this.logger = en("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new ae(ue(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = fr(this.notifications.getStore(), (r) => r ? [...r.values()] : []);
1900
+ this.options = e, this.logger = tn("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new ae(ue(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = fr(this.notifications.getStore(), (r) => r ? [...r.values()] : []);
1889
1901
  }
1890
1902
  addToQueue = (e) => {
1891
1903
  if (this.store.has(e.id)) {
@@ -1949,7 +1961,7 @@ var mt;
1949
1961
  (function(t) {
1950
1962
  t.OPENED = "opened";
1951
1963
  })(mt || (mt = {}));
1952
- class Li extends lr {
1964
+ class $i extends lr {
1953
1965
  constructor() {
1954
1966
  super("notification");
1955
1967
  }
@@ -1965,11 +1977,11 @@ var Ke;
1965
1977
  (function(t) {
1966
1978
  t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION";
1967
1979
  })(Ke || (Ke = {}));
1968
- class $i {
1980
+ class Di {
1969
1981
  queue;
1970
1982
  storage;
1971
1983
  constructor(e = {}) {
1972
- this.storage = new Li(), this.queue = new Ui({ concurrency: 1, animationDelay: 300, ...e });
1984
+ this.storage = new $i(), this.queue = new Ui({ concurrency: 1, animationDelay: 300, ...e });
1973
1985
  }
1974
1986
  add = (e) => {
1975
1987
  this.storage.isOpened(e.id) || this.queue.addToQueue(e);
@@ -1982,15 +1994,15 @@ class $i {
1982
1994
  this.storage.setOpened(e);
1983
1995
  };
1984
1996
  }
1985
- const Di = (t, e, r) => {
1986
- t.notifications = new $i(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
1987
- }, ji = (t, e) => {
1997
+ const ji = (t, e, r) => {
1998
+ t.notifications = new Di(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
1999
+ }, Mi = (t, e) => {
1988
2000
  const { client: r } = t.createPromiseClient(pe, { method: "submitAnswer" });
1989
2001
  return r.submitAnswer({ data: e });
1990
- }, Mi = (t, e) => {
2002
+ }, Vi = (t, e) => {
1991
2003
  const { client: r } = t.createPromiseClient(pe, { method: "submitInplay" });
1992
2004
  return r.submitInplay({ data: { eventId: +e } });
1993
- }, Vi = (t, e) => {
2005
+ }, qi = (t, e) => {
1994
2006
  const { client: r } = t.createPromiseClient(pe, { method: "skipQuestion" });
1995
2007
  return r.skipQuestion({ data: { id: e } });
1996
2008
  };
@@ -1998,7 +2010,7 @@ var bt;
1998
2010
  (function(t) {
1999
2011
  t.ONBOARDING = "onboarding";
2000
2012
  })(bt || (bt = {}));
2001
- class qi extends lr {
2013
+ class Gi extends lr {
2002
2014
  constructor() {
2003
2015
  super("gamification");
2004
2016
  }
@@ -2012,13 +2024,15 @@ var Z;
2012
2024
  (function(t) {
2013
2025
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
2014
2026
  })(Z || (Z = {}));
2015
- class Gi extends cr {
2027
+ class Qi extends cr {
2016
2028
  /** user statistics (leaderboard panel) */
2017
2029
  userSummary;
2018
2030
  /** questions list (pick history) */
2019
2031
  questions;
2020
2032
  /** pinned leaderboard id */
2021
2033
  leaderboardId;
2034
+ /** leaderboard list */
2035
+ leaderboardList;
2022
2036
  /** onboarding status */
2023
2037
  onboardingStatus;
2024
2038
  /** opened question */
@@ -2032,13 +2046,13 @@ class Gi extends cr {
2032
2046
  /** Browser cache */
2033
2047
  storage;
2034
2048
  constructor(e, r, o) {
2035
- super(e, r), this.background = tn(o), this.storage = new qi(), this.leaderboardId = new ae(ue(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = new ae(ue(Z.Unset), "onboardingStatus").getStore(), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ve.GAMES), this.openedQuestion = fr(this.background.openedQuestion.getStore(), (s) => {
2049
+ super(e, r), this.background = rn(o), this.storage = new Gi(), this.leaderboardId = new ae(ue(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = new ae(ue(Z.Unset), "onboardingStatus").getStore(), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ve.GAMES), this.openedQuestion = fr(this.background.openedQuestion.getStore(), (s) => {
2036
2050
  if (s.data?.type && Ar.has(s.data.type))
2037
2051
  return s.data;
2038
2052
  }), this.onboardingStatus.subscribe((s) => {
2039
2053
  (s === Z.Optional || Z.Required) && this.showOnboardingInApp();
2040
2054
  }), this.status.subscribe((s) => {
2041
- s === Ue.Ready ? (this.notifications.close(this.background.getCurrentSessionId({ prefix: "onboarding" })), this.connect(o.transport)) : this.disconnect();
2055
+ s === Le.Ready ? (this.notifications.close(this.background.getCurrentSessionId({ prefix: "onboarding" })), this.connect(o.transport)) : this.disconnect();
2042
2056
  }), this.onboardingStatus.subscribe((s) => {
2043
2057
  s && this.background.activeQuestionId.invalidate();
2044
2058
  }), this.background.activeQuestionId.listen((s) => {
@@ -2104,7 +2118,7 @@ class Gi extends cr {
2104
2118
  });
2105
2119
  };
2106
2120
  connect = (e) => {
2107
- this.userSummary ? this.userSummary.invalidate() : this.userSummary = new se(Ci(this.background.slStreamId, this.background.userId, e), "gamification:userSummary"), this.questions ? this.questions.invalidate() : this.questions = new se(Pi(this.background.slStreamId, e), "gamification:questions"), this.background.feedSubscription.addListener("feed-subscription-prediction-close", (r) => {
2121
+ this.userSummary ? this.userSummary.invalidate() : this.userSummary = new te(Ci(this.background.slStreamId, this.background.userId, e), "gamification:userSummary"), this.leaderboardList = new te(_i(this.background.slStreamId, this.leaderboardId, e), "gamification:leaderboardList"), this.questions ? this.questions.invalidate() : this.questions = new te(Ri(this.background.slStreamId, e), "gamification:questions"), this.background.feedSubscription.addListener("feed-subscription-prediction-close", (r) => {
2108
2122
  window.requestAnimationFrame(async () => {
2109
2123
  const o = r.data?.attributes?.question;
2110
2124
  if (!o)
@@ -2113,7 +2127,7 @@ class Gi extends cr {
2113
2127
  if (s === Wt.RESOLVED && u === Qe.PREDICTION) {
2114
2128
  const f = this.background.getCurrentSessionId({
2115
2129
  prefix: `notification-id:${l}`
2116
- }), A = (await xi(l, e))?.answers.find(({ correct: g }) => g);
2130
+ }), A = (await ki(l, e))?.answers.find(({ correct: g }) => g);
2117
2131
  this.notifications.add({
2118
2132
  type: Ke.ONBOARDING,
2119
2133
  action: () => this.openQuestion(l),
@@ -2138,22 +2152,22 @@ class Gi extends cr {
2138
2152
  // onboarding
2139
2153
  submitInplay = async () => {
2140
2154
  const e = this.background.slStreamId.get();
2141
- e && (await Mi(this.transport, e), this.onboardingStatus.set(Z.Completed), this.storage.saveOnboardingStatus({
2155
+ e && (await Vi(this.transport, e), this.onboardingStatus.set(Z.Completed), this.storage.saveOnboardingStatus({
2142
2156
  organizationId: this.background.organizationId.get() || "",
2143
2157
  userId: this.background.userId.get() || "",
2144
2158
  eventId: e
2145
2159
  }, Z.Completed));
2146
2160
  };
2147
2161
  submitAnswer = async (e, r) => {
2148
- await ji(this.transport, { questionId: e, answerId: r }), this.questions?.invalidate();
2162
+ await Mi(this.transport, { questionId: e, answerId: r }), this.questions?.invalidate();
2149
2163
  };
2150
2164
  skipQuestion = async (e) => {
2151
- await Vi(this.transport, e), this.questions?.invalidate();
2165
+ await qi(this.transport, e), this.questions?.invalidate();
2152
2166
  };
2153
2167
  openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
2154
2168
  closeQuestion = (e) => this.background.closeQuestion(e);
2155
2169
  }
2156
- class Qi extends cr {
2170
+ class zi extends cr {
2157
2171
  insights;
2158
2172
  closeFeature;
2159
2173
  openFeature;
@@ -2162,8 +2176,8 @@ class Qi extends cr {
2162
2176
  transport;
2163
2177
  background;
2164
2178
  constructor(e, r, o) {
2165
- super(e, r), this.background = tn(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ve.HIGHLIGHTS), this.status.subscribe((s) => {
2166
- s === Ue.Ready ? this.connect() : this.disconnect();
2179
+ super(e, r), this.background = rn(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ve.HIGHLIGHTS), this.status.subscribe((s) => {
2180
+ s === Le.Ready ? this.connect() : this.disconnect();
2167
2181
  }), this.background.activeQuestionId.listen((s) => {
2168
2182
  s && s.data && s.data.question.type === Qe.FACTOID && s.data.question.status === Wt.ACTIVE && this.notifications.add({
2169
2183
  type: Ke.QUESTION,
@@ -2185,7 +2199,7 @@ class Qi extends cr {
2185
2199
  });
2186
2200
  }
2187
2201
  connect = () => {
2188
- this.insights ? this.insights.invalidate() : this.insights = new se(Ri(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
2202
+ this.insights ? this.insights.invalidate() : this.insights = new te(Ni(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
2189
2203
  window.requestAnimationFrame(() => {
2190
2204
  this.insights?.invalidate();
2191
2205
  });
@@ -2198,18 +2212,18 @@ class Qi extends cr {
2198
2212
  closeHighlight = (e) => this.background.closeQuestion(e);
2199
2213
  }
2200
2214
  ve.GAMES + "", ve.HIGHLIGHTS + "";
2201
- class zi extends cr {
2215
+ class Ki extends cr {
2202
2216
  constructor(e, r) {
2203
2217
  super(e, r);
2204
2218
  }
2205
2219
  }
2206
- const Ki = (t, e, r) => t.type === ve.GAMES ? new Gi(t, e, r) : t.type === ve.HIGHLIGHTS ? new Qi(t, e, r) : new zi(t, e), Hi = (t, e, r) => {
2220
+ const Hi = (t, e, r) => t.type === ve.GAMES ? new Qi(t, e, r) : t.type === ve.HIGHLIGHTS ? new zi(t, e, r) : new Ki(t, e), Wi = (t, e, r) => {
2207
2221
  t.features = /* @__PURE__ */ new Map(), t.activeFeature = new ae(ue(void 0), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
2208
2222
  t.activeFeature.setValue(o);
2209
2223
  }, t.sdk.closeFeature = () => {
2210
2224
  t.activeFeature.setValue(void 0);
2211
2225
  }, t.initFeature = (o, s = Ee.ORGANIZATION) => {
2212
- const u = Ki(o, s, t);
2226
+ const u = Hi(o, s, t);
2213
2227
  t.features.set(o.type, u);
2214
2228
  }, t.updateFeature = (o, s) => {
2215
2229
  t.features.get(o.type)?.update(o, s);
@@ -2260,7 +2274,7 @@ const Ki = (t, e, r) => t.type === ve.GAMES ? new Gi(t, e, r) : t.type === ve.HI
2260
2274
  }, r();
2261
2275
  };
2262
2276
  var hr = { exports: {} }, pr = { exports: {} };
2263
- function Wi(t) {
2277
+ function Ji(t) {
2264
2278
  var e = new t(), r = e;
2265
2279
  function o() {
2266
2280
  var u = e;
@@ -2274,14 +2288,14 @@ function Wi(t) {
2274
2288
  release: s
2275
2289
  };
2276
2290
  }
2277
- var Ji = Wi, Yi = Ji;
2278
- function rn(t, e, r) {
2291
+ var Yi = Ji, Xi = Yi;
2292
+ function nn(t, e, r) {
2279
2293
  if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
2280
2294
  throw new Error("fastqueue concurrency must be greater than 1");
2281
- var o = Yi(Xi), s = null, u = null, l = 0, f = null, d = {
2282
- push: U,
2283
- drain: oe,
2284
- saturated: oe,
2295
+ var o = Xi(Zi), s = null, u = null, l = 0, f = null, p = {
2296
+ push: L,
2297
+ drain: se,
2298
+ saturated: se,
2285
2299
  pause: g,
2286
2300
  paused: !1,
2287
2301
  concurrency: r,
@@ -2291,17 +2305,17 @@ function rn(t, e, r) {
2291
2305
  length: w,
2292
2306
  getQueue: E,
2293
2307
  unshift: Q,
2294
- empty: oe,
2308
+ empty: se,
2295
2309
  kill: X,
2296
2310
  killAndDrain: de,
2297
2311
  error: ee
2298
2312
  };
2299
- return d;
2313
+ return p;
2300
2314
  function A() {
2301
2315
  return l;
2302
2316
  }
2303
2317
  function g() {
2304
- d.paused = !0;
2318
+ p.paused = !0;
2305
2319
  }
2306
2320
  function w() {
2307
2321
  for (var x = s, j = 0; x; )
@@ -2314,80 +2328,80 @@ function rn(t, e, r) {
2314
2328
  return j;
2315
2329
  }
2316
2330
  function I() {
2317
- if (d.paused) {
2318
- d.paused = !1;
2319
- for (var x = 0; x < d.concurrency; x++)
2331
+ if (p.paused) {
2332
+ p.paused = !1;
2333
+ for (var x = 0; x < p.concurrency; x++)
2320
2334
  l++, z();
2321
2335
  }
2322
2336
  }
2323
2337
  function R() {
2324
- return l === 0 && d.length() === 0;
2338
+ return l === 0 && p.length() === 0;
2325
2339
  }
2326
- function U(x, j) {
2340
+ function L(x, j) {
2327
2341
  var B = o.get();
2328
- B.context = t, B.release = z, B.value = x, B.callback = j || oe, B.errorHandler = f, l === d.concurrency || d.paused ? u ? (u.next = B, u = B) : (s = B, u = B, d.saturated()) : (l++, e.call(t, B.value, B.worked));
2342
+ B.context = t, B.release = z, B.value = x, B.callback = j || se, B.errorHandler = f, l === p.concurrency || p.paused ? u ? (u.next = B, u = B) : (s = B, u = B, p.saturated()) : (l++, e.call(t, B.value, B.worked));
2329
2343
  }
2330
2344
  function Q(x, j) {
2331
2345
  var B = o.get();
2332
- B.context = t, B.release = z, B.value = x, B.callback = j || oe, l === d.concurrency || d.paused ? s ? (B.next = s, s = B) : (s = B, u = B, d.saturated()) : (l++, e.call(t, B.value, B.worked));
2346
+ B.context = t, B.release = z, B.value = x, B.callback = j || se, l === p.concurrency || p.paused ? s ? (B.next = s, s = B) : (s = B, u = B, p.saturated()) : (l++, e.call(t, B.value, B.worked));
2333
2347
  }
2334
2348
  function z(x) {
2335
2349
  x && o.release(x);
2336
2350
  var j = s;
2337
- j ? d.paused ? l-- : (u === s && (u = null), s = j.next, j.next = null, e.call(t, j.value, j.worked), u === null && d.empty()) : --l === 0 && d.drain();
2351
+ j ? p.paused ? l-- : (u === s && (u = null), s = j.next, j.next = null, e.call(t, j.value, j.worked), u === null && p.empty()) : --l === 0 && p.drain();
2338
2352
  }
2339
2353
  function X() {
2340
- s = null, u = null, d.drain = oe;
2354
+ s = null, u = null, p.drain = se;
2341
2355
  }
2342
2356
  function de() {
2343
- s = null, u = null, d.drain(), d.drain = oe;
2357
+ s = null, u = null, p.drain(), p.drain = se;
2344
2358
  }
2345
2359
  function ee(x) {
2346
2360
  f = x;
2347
2361
  }
2348
2362
  }
2349
- function oe() {
2363
+ function se() {
2350
2364
  }
2351
- function Xi() {
2352
- this.value = null, this.callback = oe, this.next = null, this.release = oe, this.context = null, this.errorHandler = null;
2365
+ function Zi() {
2366
+ this.value = null, this.callback = se, this.next = null, this.release = se, this.context = null, this.errorHandler = null;
2353
2367
  var t = this;
2354
2368
  this.worked = function(r, o) {
2355
2369
  var s = t.callback, u = t.errorHandler, l = t.value;
2356
- t.value = null, t.callback = oe, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
2370
+ t.value = null, t.callback = se, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
2357
2371
  };
2358
2372
  }
2359
- function Zi(t, e, r) {
2373
+ function eo(t, e, r) {
2360
2374
  typeof t == "function" && (r = e, e = t, t = null);
2361
2375
  function o(g, w) {
2362
2376
  e.call(this, g).then(function(E) {
2363
2377
  w(null, E);
2364
2378
  }, w);
2365
2379
  }
2366
- var s = rn(t, o, r), u = s.push, l = s.unshift;
2367
- return s.push = f, s.unshift = d, s.drained = A, s;
2380
+ var s = nn(t, o, r), u = s.push, l = s.unshift;
2381
+ return s.push = f, s.unshift = p, s.drained = A, s;
2368
2382
  function f(g) {
2369
2383
  var w = new Promise(function(E, I) {
2370
- u(g, function(R, U) {
2384
+ u(g, function(R, L) {
2371
2385
  if (R) {
2372
2386
  I(R);
2373
2387
  return;
2374
2388
  }
2375
- E(U);
2389
+ E(L);
2376
2390
  });
2377
2391
  });
2378
- return w.catch(oe), w;
2392
+ return w.catch(se), w;
2379
2393
  }
2380
- function d(g) {
2394
+ function p(g) {
2381
2395
  var w = new Promise(function(E, I) {
2382
- l(g, function(R, U) {
2396
+ l(g, function(R, L) {
2383
2397
  if (R) {
2384
2398
  I(R);
2385
2399
  return;
2386
2400
  }
2387
- E(U);
2401
+ E(L);
2388
2402
  });
2389
2403
  });
2390
- return w.catch(oe), w;
2404
+ return w.catch(se), w;
2391
2405
  }
2392
2406
  function A() {
2393
2407
  if (s.idle())
@@ -2402,9 +2416,9 @@ function Zi(t, e, r) {
2402
2416
  return w;
2403
2417
  }
2404
2418
  }
2405
- pr.exports = rn;
2406
- pr.exports.promise = Zi;
2407
- var nn = pr.exports, dr = { exports: {} }, He = typeof Reflect == "object" ? Reflect : null, Er = He && typeof He.apply == "function" ? He.apply : function(e, r, o) {
2419
+ pr.exports = nn;
2420
+ pr.exports.promise = eo;
2421
+ var on = pr.exports, dr = { exports: {} }, He = typeof Reflect == "object" ? Reflect : null, Er = He && typeof He.apply == "function" ? He.apply : function(e, r, o) {
2408
2422
  return Function.prototype.apply.call(e, r, o);
2409
2423
  }, ht;
2410
2424
  He && typeof He.ownKeys == "function" ? ht = He.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
@@ -2412,17 +2426,17 @@ He && typeof He.ownKeys == "function" ? ht = He.ownKeys : Object.getOwnPropertyS
2412
2426
  } : ht = function(e) {
2413
2427
  return Object.getOwnPropertyNames(e);
2414
2428
  };
2415
- function eo(t) {
2429
+ function to(t) {
2416
2430
  console && console.warn && console.warn(t);
2417
2431
  }
2418
- var on = Number.isNaN || function(e) {
2432
+ var sn = Number.isNaN || function(e) {
2419
2433
  return e !== e;
2420
2434
  };
2421
2435
  function $() {
2422
2436
  $.init.call(this);
2423
2437
  }
2424
2438
  dr.exports = $;
2425
- dr.exports.once = io;
2439
+ dr.exports.once = oo;
2426
2440
  $.EventEmitter = $;
2427
2441
  $.prototype._events = void 0;
2428
2442
  $.prototype._eventsCount = 0;
@@ -2438,7 +2452,7 @@ Object.defineProperty($, "defaultMaxListeners", {
2438
2452
  return Ir;
2439
2453
  },
2440
2454
  set: function(t) {
2441
- if (typeof t != "number" || t < 0 || on(t))
2455
+ if (typeof t != "number" || t < 0 || sn(t))
2442
2456
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
2443
2457
  Ir = t;
2444
2458
  }
@@ -2447,15 +2461,15 @@ $.init = function() {
2447
2461
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
2448
2462
  };
2449
2463
  $.prototype.setMaxListeners = function(e) {
2450
- if (typeof e != "number" || e < 0 || on(e))
2464
+ if (typeof e != "number" || e < 0 || sn(e))
2451
2465
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
2452
2466
  return this._maxListeners = e, this;
2453
2467
  };
2454
- function sn(t) {
2468
+ function an(t) {
2455
2469
  return t._maxListeners === void 0 ? $.defaultMaxListeners : t._maxListeners;
2456
2470
  }
2457
2471
  $.prototype.getMaxListeners = function() {
2458
- return sn(this);
2472
+ return an(this);
2459
2473
  };
2460
2474
  $.prototype.emit = function(e) {
2461
2475
  for (var r = [], o = 1; o < arguments.length; o++)
@@ -2472,17 +2486,17 @@ $.prototype.emit = function(e) {
2472
2486
  var f = new Error("Unhandled error." + (l ? " (" + l.message + ")" : ""));
2473
2487
  throw f.context = l, f;
2474
2488
  }
2475
- var d = u[e];
2476
- if (d === void 0)
2489
+ var p = u[e];
2490
+ if (p === void 0)
2477
2491
  return !1;
2478
- if (typeof d == "function")
2479
- Er(d, this, r);
2492
+ if (typeof p == "function")
2493
+ Er(p, this, r);
2480
2494
  else
2481
- for (var A = d.length, g = ln(d, A), o = 0; o < A; ++o)
2495
+ for (var A = p.length, g = hn(p, A), o = 0; o < A; ++o)
2482
2496
  Er(g[o], this, r);
2483
2497
  return !0;
2484
2498
  };
2485
- function an(t, e, r, o) {
2499
+ function un(t, e, r, o) {
2486
2500
  var s, u, l;
2487
2501
  if (Tt(r), u = t._events, u === void 0 ? (u = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (u.newListener !== void 0 && (t.emit(
2488
2502
  "newListener",
@@ -2490,33 +2504,33 @@ function an(t, e, r, o) {
2490
2504
  r.listener ? r.listener : r
2491
2505
  ), u = t._events), l = u[e]), l === void 0)
2492
2506
  l = u[e] = r, ++t._eventsCount;
2493
- else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = sn(t), s > 0 && l.length > s && !l.warned) {
2507
+ else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = an(t), s > 0 && l.length > s && !l.warned) {
2494
2508
  l.warned = !0;
2495
2509
  var f = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2496
- f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length, eo(f);
2510
+ f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length, to(f);
2497
2511
  }
2498
2512
  return t;
2499
2513
  }
2500
2514
  $.prototype.addListener = function(e, r) {
2501
- return an(this, e, r, !1);
2515
+ return un(this, e, r, !1);
2502
2516
  };
2503
2517
  $.prototype.on = $.prototype.addListener;
2504
2518
  $.prototype.prependListener = function(e, r) {
2505
- return an(this, e, r, !0);
2519
+ return un(this, e, r, !0);
2506
2520
  };
2507
- function to() {
2521
+ function ro() {
2508
2522
  if (!this.fired)
2509
2523
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
2510
2524
  }
2511
- function un(t, e, r) {
2512
- var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = to.bind(o);
2525
+ function cn(t, e, r) {
2526
+ var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = ro.bind(o);
2513
2527
  return s.listener = r, o.wrapFn = s, s;
2514
2528
  }
2515
2529
  $.prototype.once = function(e, r) {
2516
- return Tt(r), this.on(e, un(this, e, r)), this;
2530
+ return Tt(r), this.on(e, cn(this, e, r)), this;
2517
2531
  };
2518
2532
  $.prototype.prependOnceListener = function(e, r) {
2519
- return Tt(r), this.prependListener(e, un(this, e, r)), this;
2533
+ return Tt(r), this.prependListener(e, cn(this, e, r)), this;
2520
2534
  };
2521
2535
  $.prototype.removeListener = function(e, r) {
2522
2536
  var o, s, u, l, f;
@@ -2534,7 +2548,7 @@ $.prototype.removeListener = function(e, r) {
2534
2548
  }
2535
2549
  if (u < 0)
2536
2550
  return this;
2537
- u === 0 ? o.shift() : ro(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, f || r);
2551
+ u === 0 ? o.shift() : no(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, f || r);
2538
2552
  }
2539
2553
  return this;
2540
2554
  };
@@ -2558,24 +2572,24 @@ $.prototype.removeAllListeners = function(e) {
2558
2572
  this.removeListener(e, r[s]);
2559
2573
  return this;
2560
2574
  };
2561
- function cn(t, e, r) {
2575
+ function fn(t, e, r) {
2562
2576
  var o = t._events;
2563
2577
  if (o === void 0)
2564
2578
  return [];
2565
2579
  var s = o[e];
2566
- return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? no(s) : ln(s, s.length);
2580
+ return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? io(s) : hn(s, s.length);
2567
2581
  }
2568
2582
  $.prototype.listeners = function(e) {
2569
- return cn(this, e, !0);
2583
+ return fn(this, e, !0);
2570
2584
  };
2571
2585
  $.prototype.rawListeners = function(e) {
2572
- return cn(this, e, !1);
2586
+ return fn(this, e, !1);
2573
2587
  };
2574
2588
  $.listenerCount = function(t, e) {
2575
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : fn.call(t, e);
2589
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : ln.call(t, e);
2576
2590
  };
2577
- $.prototype.listenerCount = fn;
2578
- function fn(t) {
2591
+ $.prototype.listenerCount = ln;
2592
+ function ln(t) {
2579
2593
  var e = this._events;
2580
2594
  if (e !== void 0) {
2581
2595
  var r = e[t];
@@ -2589,22 +2603,22 @@ function fn(t) {
2589
2603
  $.prototype.eventNames = function() {
2590
2604
  return this._eventsCount > 0 ? ht(this._events) : [];
2591
2605
  };
2592
- function ln(t, e) {
2606
+ function hn(t, e) {
2593
2607
  for (var r = new Array(e), o = 0; o < e; ++o)
2594
2608
  r[o] = t[o];
2595
2609
  return r;
2596
2610
  }
2597
- function ro(t, e) {
2611
+ function no(t, e) {
2598
2612
  for (; e + 1 < t.length; e++)
2599
2613
  t[e] = t[e + 1];
2600
2614
  t.pop();
2601
2615
  }
2602
- function no(t) {
2616
+ function io(t) {
2603
2617
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
2604
2618
  e[r] = t[r].listener || t[r];
2605
2619
  return e;
2606
2620
  }
2607
- function io(t, e) {
2621
+ function oo(t, e) {
2608
2622
  return new Promise(function(r, o) {
2609
2623
  function s(l) {
2610
2624
  t.removeListener(e, u), o(l);
@@ -2612,13 +2626,13 @@ function io(t, e) {
2612
2626
  function u() {
2613
2627
  typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
2614
2628
  }
2615
- hn(t, e, u, { once: !0 }), e !== "error" && oo(t, s, { once: !0 });
2629
+ pn(t, e, u, { once: !0 }), e !== "error" && so(t, s, { once: !0 });
2616
2630
  });
2617
2631
  }
2618
- function oo(t, e, r) {
2619
- typeof t.on == "function" && hn(t, "error", e, r);
2632
+ function so(t, e, r) {
2633
+ typeof t.on == "function" && pn(t, "error", e, r);
2620
2634
  }
2621
- function hn(t, e, r, o) {
2635
+ function pn(t, e, r, o) {
2622
2636
  if (typeof t.on == "function")
2623
2637
  o.once ? t.once(e, r) : t.on(e, r);
2624
2638
  else if (typeof t.addEventListener == "function")
@@ -2628,7 +2642,7 @@ function hn(t, e, r, o) {
2628
2642
  else
2629
2643
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
2630
2644
  }
2631
- var pn = dr.exports, Bt = {}, dn = {}, yn = function() {
2645
+ var dn = dr.exports, Bt = {}, yn = {}, gn = function() {
2632
2646
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
2633
2647
  return !1;
2634
2648
  if (typeof Symbol.iterator == "symbol")
@@ -2651,33 +2665,33 @@ var pn = dr.exports, Bt = {}, dn = {}, yn = function() {
2651
2665
  return !1;
2652
2666
  }
2653
2667
  return !0;
2654
- }, so = yn, yr = function() {
2655
- return so() && !!Symbol.toStringTag;
2656
- }, Fr = typeof Symbol < "u" && Symbol, ao = yn, uo = function() {
2657
- return typeof Fr != "function" || typeof Symbol != "function" || typeof Fr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ao();
2668
+ }, ao = gn, yr = function() {
2669
+ return ao() && !!Symbol.toStringTag;
2670
+ }, Fr = typeof Symbol < "u" && Symbol, uo = gn, co = function() {
2671
+ return typeof Fr != "function" || typeof Symbol != "function" || typeof Fr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : uo();
2658
2672
  }, Cr = {
2659
2673
  foo: {}
2660
- }, co = Object, fo = function() {
2661
- return { __proto__: Cr }.foo === Cr.foo && !({ __proto__: null } instanceof co);
2662
- }, lo = "Function.prototype.bind called on incompatible ", ho = Object.prototype.toString, po = Math.max, yo = "[object Function]", _r = function(e, r) {
2674
+ }, fo = Object, lo = function() {
2675
+ return { __proto__: Cr }.foo === Cr.foo && !({ __proto__: null } instanceof fo);
2676
+ }, ho = "Function.prototype.bind called on incompatible ", po = Object.prototype.toString, yo = Math.max, go = "[object Function]", _r = function(e, r) {
2663
2677
  for (var o = [], s = 0; s < e.length; s += 1)
2664
2678
  o[s] = e[s];
2665
2679
  for (var u = 0; u < r.length; u += 1)
2666
2680
  o[u + e.length] = r[u];
2667
2681
  return o;
2668
- }, go = function(e, r) {
2682
+ }, mo = function(e, r) {
2669
2683
  for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
2670
2684
  o[u] = e[s];
2671
2685
  return o;
2672
- }, mo = function(t, e) {
2686
+ }, bo = function(t, e) {
2673
2687
  for (var r = "", o = 0; o < t.length; o += 1)
2674
2688
  r += t[o], o + 1 < t.length && (r += e);
2675
2689
  return r;
2676
- }, bo = function(e) {
2690
+ }, wo = function(e) {
2677
2691
  var r = this;
2678
- if (typeof r != "function" || ho.apply(r) !== yo)
2679
- throw new TypeError(lo + r);
2680
- for (var o = go(arguments, 1), s, u = function() {
2692
+ if (typeof r != "function" || po.apply(r) !== go)
2693
+ throw new TypeError(ho + r);
2694
+ for (var o = mo(arguments, 1), s, u = function() {
2681
2695
  if (this instanceof s) {
2682
2696
  var g = r.apply(
2683
2697
  this,
@@ -2689,43 +2703,43 @@ var pn = dr.exports, Bt = {}, dn = {}, yn = function() {
2689
2703
  e,
2690
2704
  _r(o, arguments)
2691
2705
  );
2692
- }, l = po(0, r.length - o.length), f = [], d = 0; d < l; d++)
2693
- f[d] = "$" + d;
2694
- if (s = Function("binder", "return function (" + mo(f, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
2706
+ }, l = yo(0, r.length - o.length), f = [], p = 0; p < l; p++)
2707
+ f[p] = "$" + p;
2708
+ if (s = Function("binder", "return function (" + bo(f, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
2695
2709
  var A = function() {
2696
2710
  };
2697
2711
  A.prototype = r.prototype, s.prototype = new A(), A.prototype = null;
2698
2712
  }
2699
2713
  return s;
2700
- }, wo = bo, gn = Function.prototype.bind || wo, Tr = {}.hasOwnProperty, Rt = Function.prototype.call, vo = Rt.bind ? Rt.bind(Tr) : function(t, e) {
2714
+ }, vo = wo, mn = Function.prototype.bind || vo, Tr = {}.hasOwnProperty, Rt = Function.prototype.call, So = Rt.bind ? Rt.bind(Tr) : function(t, e) {
2701
2715
  return Rt.call(Tr, t, e);
2702
- }, k, Je = SyntaxError, mn = Function, We = TypeError, Nt = function(t) {
2716
+ }, k, Je = SyntaxError, bn = Function, We = TypeError, Nt = function(t) {
2703
2717
  try {
2704
- return mn('"use strict"; return (' + t + ").constructor;")();
2718
+ return bn('"use strict"; return (' + t + ").constructor;")();
2705
2719
  } catch {
2706
2720
  }
2707
- }, Le = Object.getOwnPropertyDescriptor;
2708
- if (Le)
2721
+ }, Ue = Object.getOwnPropertyDescriptor;
2722
+ if (Ue)
2709
2723
  try {
2710
- Le({}, "");
2724
+ Ue({}, "");
2711
2725
  } catch {
2712
- Le = null;
2726
+ Ue = null;
2713
2727
  }
2714
- var Ut = function() {
2728
+ var Lt = function() {
2715
2729
  throw new We();
2716
- }, So = Le ? function() {
2730
+ }, Ao = Ue ? function() {
2717
2731
  try {
2718
- return arguments.callee, Ut;
2732
+ return arguments.callee, Lt;
2719
2733
  } catch {
2720
2734
  try {
2721
- return Le(arguments, "callee").get;
2735
+ return Ue(arguments, "callee").get;
2722
2736
  } catch {
2723
- return Ut;
2737
+ return Lt;
2724
2738
  }
2725
2739
  }
2726
- }() : Ut, Me = uo(), Ao = fo(), H = Object.getPrototypeOf || (Ao ? function(t) {
2740
+ }() : Lt, Me = co(), Eo = lo(), H = Object.getPrototypeOf || (Eo ? function(t) {
2727
2741
  return t.__proto__;
2728
- } : null), qe = {}, Eo = typeof Uint8Array > "u" || !H ? k : H(Uint8Array), $e = {
2742
+ } : null), qe = {}, Io = typeof Uint8Array > "u" || !H ? k : H(Uint8Array), $e = {
2729
2743
  "%AggregateError%": typeof AggregateError > "u" ? k : AggregateError,
2730
2744
  "%Array%": Array,
2731
2745
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? k : ArrayBuffer,
@@ -2753,7 +2767,7 @@ var Ut = function() {
2753
2767
  "%Float32Array%": typeof Float32Array > "u" ? k : Float32Array,
2754
2768
  "%Float64Array%": typeof Float64Array > "u" ? k : Float64Array,
2755
2769
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? k : FinalizationRegistry,
2756
- "%Function%": mn,
2770
+ "%Function%": bn,
2757
2771
  "%GeneratorFunction%": qe,
2758
2772
  "%Int8Array%": typeof Int8Array > "u" ? k : Int8Array,
2759
2773
  "%Int16Array%": typeof Int16Array > "u" ? k : Int16Array,
@@ -2782,8 +2796,8 @@ var Ut = function() {
2782
2796
  "%StringIteratorPrototype%": Me && H ? H(""[Symbol.iterator]()) : k,
2783
2797
  "%Symbol%": Me ? Symbol : k,
2784
2798
  "%SyntaxError%": Je,
2785
- "%ThrowTypeError%": So,
2786
- "%TypedArray%": Eo,
2799
+ "%ThrowTypeError%": Ao,
2800
+ "%TypedArray%": Io,
2787
2801
  "%TypeError%": We,
2788
2802
  "%Uint8Array%": typeof Uint8Array > "u" ? k : Uint8Array,
2789
2803
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? k : Uint8ClampedArray,
@@ -2798,10 +2812,10 @@ if (H)
2798
2812
  try {
2799
2813
  null.error;
2800
2814
  } catch (t) {
2801
- var Io = H(H(t));
2802
- $e["%Error.prototype%"] = Io;
2815
+ var Fo = H(H(t));
2816
+ $e["%Error.prototype%"] = Fo;
2803
2817
  }
2804
- var Fo = function t(e) {
2818
+ var Co = function t(e) {
2805
2819
  var r;
2806
2820
  if (e === "%AsyncFunction%")
2807
2821
  r = Nt("async function () {}");
@@ -2869,21 +2883,21 @@ var Fo = function t(e) {
2869
2883
  "%URIErrorPrototype%": ["URIError", "prototype"],
2870
2884
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2871
2885
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2872
- }, ut = gn, wt = vo, Co = ut.call(Function.call, Array.prototype.concat), _o = ut.call(Function.apply, Array.prototype.splice), Or = ut.call(Function.call, String.prototype.replace), vt = ut.call(Function.call, String.prototype.slice), To = ut.call(Function.call, RegExp.prototype.exec), Bo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Oo = /\\(\\)?/g, xo = function(e) {
2886
+ }, ut = mn, wt = So, _o = ut.call(Function.call, Array.prototype.concat), To = ut.call(Function.apply, Array.prototype.splice), Or = ut.call(Function.call, String.prototype.replace), vt = ut.call(Function.call, String.prototype.slice), Bo = ut.call(Function.call, RegExp.prototype.exec), Oo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, xo = /\\(\\)?/g, ko = function(e) {
2873
2887
  var r = vt(e, 0, 1), o = vt(e, -1);
2874
2888
  if (r === "%" && o !== "%")
2875
2889
  throw new Je("invalid intrinsic syntax, expected closing `%`");
2876
2890
  if (o === "%" && r !== "%")
2877
2891
  throw new Je("invalid intrinsic syntax, expected opening `%`");
2878
2892
  var s = [];
2879
- return Or(e, Bo, function(u, l, f, d) {
2880
- s[s.length] = f ? Or(d, Oo, "$1") : l || u;
2893
+ return Or(e, Oo, function(u, l, f, p) {
2894
+ s[s.length] = f ? Or(p, xo, "$1") : l || u;
2881
2895
  }), s;
2882
- }, ko = function(e, r) {
2896
+ }, Po = function(e, r) {
2883
2897
  var o = e, s;
2884
2898
  if (wt(Br, o) && (s = Br[o], o = "%" + s[0] + "%"), wt($e, o)) {
2885
2899
  var u = $e[o];
2886
- if (u === qe && (u = Fo(o)), typeof u > "u" && !r)
2900
+ if (u === qe && (u = Co(o)), typeof u > "u" && !r)
2887
2901
  throw new We("intrinsic " + e + " exists, but is not available. Please file an issue!");
2888
2902
  return {
2889
2903
  alias: s,
@@ -2897,15 +2911,15 @@ var Fo = function t(e) {
2897
2911
  throw new We("intrinsic name must be a non-empty string");
2898
2912
  if (arguments.length > 1 && typeof r != "boolean")
2899
2913
  throw new We('"allowMissing" argument must be a boolean');
2900
- if (To(/^%?[^%]*%?$/, e) === null)
2914
+ if (Bo(/^%?[^%]*%?$/, e) === null)
2901
2915
  throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2902
- var o = xo(e), s = o.length > 0 ? o[0] : "", u = ko("%" + s + "%", r), l = u.name, f = u.value, d = !1, A = u.alias;
2903
- A && (s = A[0], _o(o, Co([0, 1], A)));
2916
+ var o = ko(e), s = o.length > 0 ? o[0] : "", u = Po("%" + s + "%", r), l = u.name, f = u.value, p = !1, A = u.alias;
2917
+ A && (s = A[0], To(o, _o([0, 1], A)));
2904
2918
  for (var g = 1, w = !0; g < o.length; g += 1) {
2905
2919
  var E = o[g], I = vt(E, 0, 1), R = vt(E, -1);
2906
2920
  if ((I === '"' || I === "'" || I === "`" || R === '"' || R === "'" || R === "`") && I !== R)
2907
2921
  throw new Je("property names with quotes must have matching quotes");
2908
- if ((E === "constructor" || !w) && (d = !0), s += "." + E, l = "%" + s + "%", wt($e, l))
2922
+ if ((E === "constructor" || !w) && (p = !0), s += "." + E, l = "%" + s + "%", wt($e, l))
2909
2923
  f = $e[l];
2910
2924
  else if (f != null) {
2911
2925
  if (!(E in f)) {
@@ -2913,16 +2927,16 @@ var Fo = function t(e) {
2913
2927
  throw new We("base intrinsic for " + e + " exists, but the property is not available.");
2914
2928
  return;
2915
2929
  }
2916
- if (Le && g + 1 >= o.length) {
2917
- var U = Le(f, E);
2918
- w = !!U, w && "get" in U && !("originalValue" in U.get) ? f = U.get : f = f[E];
2930
+ if (Ue && g + 1 >= o.length) {
2931
+ var L = Ue(f, E);
2932
+ w = !!L, w && "get" in L && !("originalValue" in L.get) ? f = L.get : f = f[E];
2919
2933
  } else
2920
2934
  w = wt(f, E), f = f[E];
2921
- w && !d && ($e[l] = f);
2935
+ w && !p && ($e[l] = f);
2922
2936
  }
2923
2937
  }
2924
2938
  return f;
2925
- }, bn = { exports: {} }, Po = Xe, Xt = Po("%Object.defineProperty%", !0), Zt = function() {
2939
+ }, wn = { exports: {} }, Ro = Xe, Xt = Ro("%Object.defineProperty%", !0), Zt = function() {
2926
2940
  if (Xt)
2927
2941
  try {
2928
2942
  return Xt({}, "a", { value: 1 }), !0;
@@ -2940,21 +2954,21 @@ Zt.hasArrayLengthDefineBug = function() {
2940
2954
  return !0;
2941
2955
  }
2942
2956
  };
2943
- var wn = Zt, Ro = Xe, pt = Ro("%Object.getOwnPropertyDescriptor%", !0);
2957
+ var vn = Zt, No = Xe, pt = No("%Object.getOwnPropertyDescriptor%", !0);
2944
2958
  if (pt)
2945
2959
  try {
2946
2960
  pt([], "length");
2947
2961
  } catch {
2948
2962
  pt = null;
2949
2963
  }
2950
- var gr = pt, No = wn(), mr = Xe, st = No && mr("%Object.defineProperty%", !0);
2964
+ var gr = pt, Lo = vn(), mr = Xe, st = Lo && mr("%Object.defineProperty%", !0);
2951
2965
  if (st)
2952
2966
  try {
2953
2967
  st({}, "a", { value: 1 });
2954
2968
  } catch {
2955
2969
  st = !1;
2956
2970
  }
2957
- var Uo = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Lo = function(e, r, o) {
2971
+ var Uo = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, $o = function(e, r, o) {
2958
2972
  if (!e || typeof e != "object" && typeof e != "function")
2959
2973
  throw new Ve("`obj` must be an object or a function`");
2960
2974
  if (typeof r != "string" && typeof r != "symbol")
@@ -2967,37 +2981,37 @@ var Uo = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Lo = function(e,
2967
2981
  throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");
2968
2982
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
2969
2983
  throw new Ve("`loose`, if provided, must be a boolean");
2970
- var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, d = !!xr && xr(e, r);
2984
+ var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, p = !!xr && xr(e, r);
2971
2985
  if (st)
2972
2986
  st(e, r, {
2973
- configurable: l === null && d ? d.configurable : !l,
2974
- enumerable: s === null && d ? d.enumerable : !s,
2987
+ configurable: l === null && p ? p.configurable : !l,
2988
+ enumerable: s === null && p ? p.enumerable : !s,
2975
2989
  value: o,
2976
- writable: u === null && d ? d.writable : !u
2990
+ writable: u === null && p ? p.writable : !u
2977
2991
  });
2978
2992
  else if (f || !s && !u && !l)
2979
2993
  e[r] = o;
2980
2994
  else
2981
2995
  throw new Uo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
2982
- }, vn = Xe, kr = Lo, $o = wn(), Pr = gr, Rr = vn("%TypeError%"), Do = vn("%Math.floor%"), jo = function(e, r) {
2996
+ }, Sn = Xe, kr = $o, Do = vn(), Pr = gr, Rr = Sn("%TypeError%"), jo = Sn("%Math.floor%"), Mo = function(e, r) {
2983
2997
  if (typeof e != "function")
2984
2998
  throw new Rr("`fn` is not a function");
2985
- if (typeof r != "number" || r < 0 || r > 4294967295 || Do(r) !== r)
2999
+ if (typeof r != "number" || r < 0 || r > 4294967295 || jo(r) !== r)
2986
3000
  throw new Rr("`length` must be a positive 32-bit integer");
2987
3001
  var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
2988
3002
  if ("length" in e && Pr) {
2989
3003
  var l = Pr(e, "length");
2990
3004
  l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
2991
3005
  }
2992
- return (s || u || !o) && ($o ? kr(e, "length", r, !0, !0) : kr(e, "length", r)), e;
3006
+ return (s || u || !o) && (Do ? kr(e, "length", r, !0, !0) : kr(e, "length", r)), e;
2993
3007
  };
2994
3008
  (function(t) {
2995
- var e = gn, r = Xe, o = jo, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), d = r("%Object.defineProperty%", !0), A = r("%Math.max%");
2996
- if (d)
3009
+ var e = mn, r = Xe, o = Mo, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), A = r("%Math.max%");
3010
+ if (p)
2997
3011
  try {
2998
- d({}, "a", { value: 1 });
3012
+ p({}, "a", { value: 1 });
2999
3013
  } catch {
3000
- d = null;
3014
+ p = null;
3001
3015
  }
3002
3016
  t.exports = function(E) {
3003
3017
  if (typeof E != "function")
@@ -3012,43 +3026,43 @@ var Uo = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Lo = function(e,
3012
3026
  var g = function() {
3013
3027
  return f(e, u, arguments);
3014
3028
  };
3015
- d ? d(t.exports, "apply", { value: g }) : t.exports.apply = g;
3016
- })(bn);
3017
- var Sn = bn.exports, An = Xe, En = Sn, Mo = En(An("String.prototype.indexOf")), In = function(e, r) {
3018
- var o = An(e, !!r);
3019
- return typeof o == "function" && Mo(e, ".prototype.") > -1 ? En(o) : o;
3020
- }, Vo = yr(), qo = In, er = qo("Object.prototype.toString"), Ot = function(e) {
3021
- return Vo && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : er(e) === "[object Arguments]";
3022
- }, Fn = function(e) {
3029
+ p ? p(t.exports, "apply", { value: g }) : t.exports.apply = g;
3030
+ })(wn);
3031
+ var An = wn.exports, En = Xe, In = An, Vo = In(En("String.prototype.indexOf")), Fn = function(e, r) {
3032
+ var o = En(e, !!r);
3033
+ return typeof o == "function" && Vo(e, ".prototype.") > -1 ? In(o) : o;
3034
+ }, qo = yr(), Go = Fn, er = Go("Object.prototype.toString"), Ot = function(e) {
3035
+ return qo && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : er(e) === "[object Arguments]";
3036
+ }, Cn = function(e) {
3023
3037
  return Ot(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && er(e) !== "[object Array]" && er(e.callee) === "[object Function]";
3024
- }, Go = function() {
3038
+ }, Qo = function() {
3025
3039
  return Ot(arguments);
3026
3040
  }();
3027
- Ot.isLegacyArguments = Fn;
3028
- var Qo = Go ? Ot : Fn, zo = Object.prototype.toString, Ko = Function.prototype.toString, Ho = /^\s*(?:function)?\*/, Cn = yr(), Lt = Object.getPrototypeOf, Wo = function() {
3029
- if (!Cn)
3041
+ Ot.isLegacyArguments = Cn;
3042
+ var zo = Qo ? Ot : Cn, Ko = Object.prototype.toString, Ho = Function.prototype.toString, Wo = /^\s*(?:function)?\*/, _n = yr(), Ut = Object.getPrototypeOf, Jo = function() {
3043
+ if (!_n)
3030
3044
  return !1;
3031
3045
  try {
3032
3046
  return Function("return function*() {}")();
3033
3047
  } catch {
3034
3048
  }
3035
- }, $t, Jo = function(e) {
3049
+ }, $t, Yo = function(e) {
3036
3050
  if (typeof e != "function")
3037
3051
  return !1;
3038
- if (Ho.test(Ko.call(e)))
3052
+ if (Wo.test(Ho.call(e)))
3039
3053
  return !0;
3040
- if (!Cn) {
3041
- var r = zo.call(e);
3054
+ if (!_n) {
3055
+ var r = Ko.call(e);
3042
3056
  return r === "[object GeneratorFunction]";
3043
3057
  }
3044
- if (!Lt)
3058
+ if (!Ut)
3045
3059
  return !1;
3046
3060
  if (typeof $t > "u") {
3047
- var o = Wo();
3048
- $t = o ? Lt(o) : !1;
3061
+ var o = Jo();
3062
+ $t = o ? Ut(o) : !1;
3049
3063
  }
3050
- return Lt(e) === $t;
3051
- }, _n = Function.prototype.toString, Ge = typeof Reflect == "object" && Reflect !== null && Reflect.apply, tr, dt;
3064
+ return Ut(e) === $t;
3065
+ }, Tn = Function.prototype.toString, Ge = typeof Reflect == "object" && Reflect !== null && Reflect.apply, tr, dt;
3052
3066
  if (typeof Ge == "function" && typeof Object.defineProperty == "function")
3053
3067
  try {
3054
3068
  tr = Object.defineProperty({}, "length", {
@@ -3063,35 +3077,35 @@ if (typeof Ge == "function" && typeof Object.defineProperty == "function")
3063
3077
  }
3064
3078
  else
3065
3079
  Ge = null;
3066
- var Yo = /^\s*class\b/, rr = function(e) {
3080
+ var Xo = /^\s*class\b/, rr = function(e) {
3067
3081
  try {
3068
- var r = _n.call(e);
3069
- return Yo.test(r);
3082
+ var r = Tn.call(e);
3083
+ return Xo.test(r);
3070
3084
  } catch {
3071
3085
  return !1;
3072
3086
  }
3073
3087
  }, Dt = function(e) {
3074
3088
  try {
3075
- return rr(e) ? !1 : (_n.call(e), !0);
3089
+ return rr(e) ? !1 : (Tn.call(e), !0);
3076
3090
  } catch {
3077
3091
  return !1;
3078
3092
  }
3079
- }, yt = Object.prototype.toString, Xo = "[object Object]", Zo = "[object Function]", es = "[object GeneratorFunction]", ts = "[object HTMLAllCollection]", rs = "[object HTML document.all class]", ns = "[object HTMLCollection]", is = typeof Symbol == "function" && !!Symbol.toStringTag, os = !(0 in [,]), nr = function() {
3093
+ }, yt = Object.prototype.toString, Zo = "[object Object]", es = "[object Function]", ts = "[object GeneratorFunction]", rs = "[object HTMLAllCollection]", ns = "[object HTML document.all class]", is = "[object HTMLCollection]", os = typeof Symbol == "function" && !!Symbol.toStringTag, ss = !(0 in [,]), nr = function() {
3080
3094
  return !1;
3081
3095
  };
3082
3096
  if (typeof document == "object") {
3083
- var ss = document.all;
3084
- yt.call(ss) === yt.call(document.all) && (nr = function(e) {
3085
- if ((os || !e) && (typeof e > "u" || typeof e == "object"))
3097
+ var as = document.all;
3098
+ yt.call(as) === yt.call(document.all) && (nr = function(e) {
3099
+ if ((ss || !e) && (typeof e > "u" || typeof e == "object"))
3086
3100
  try {
3087
3101
  var r = yt.call(e);
3088
- return (r === ts || r === rs || r === ns || r === Xo) && e("") == null;
3102
+ return (r === rs || r === ns || r === is || r === Zo) && e("") == null;
3089
3103
  } catch {
3090
3104
  }
3091
3105
  return !1;
3092
3106
  });
3093
3107
  }
3094
- var as = Ge ? function(e) {
3108
+ var us = Ge ? function(e) {
3095
3109
  if (nr(e))
3096
3110
  return !0;
3097
3111
  if (!e || typeof e != "function" && typeof e != "object")
@@ -3108,27 +3122,27 @@ var as = Ge ? function(e) {
3108
3122
  return !0;
3109
3123
  if (!e || typeof e != "function" && typeof e != "object")
3110
3124
  return !1;
3111
- if (is)
3125
+ if (os)
3112
3126
  return Dt(e);
3113
3127
  if (rr(e))
3114
3128
  return !1;
3115
3129
  var r = yt.call(e);
3116
- return r !== Zo && r !== es && !/^\[object HTML/.test(r) ? !1 : Dt(e);
3117
- }, us = as, cs = Object.prototype.toString, Tn = Object.prototype.hasOwnProperty, fs = function(e, r, o) {
3130
+ return r !== es && r !== ts && !/^\[object HTML/.test(r) ? !1 : Dt(e);
3131
+ }, cs = us, fs = Object.prototype.toString, Bn = Object.prototype.hasOwnProperty, ls = function(e, r, o) {
3118
3132
  for (var s = 0, u = e.length; s < u; s++)
3119
- Tn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3120
- }, ls = function(e, r, o) {
3133
+ Bn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3134
+ }, hs = function(e, r, o) {
3121
3135
  for (var s = 0, u = e.length; s < u; s++)
3122
3136
  o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
3123
- }, hs = function(e, r, o) {
3124
- for (var s in e)
3125
- Tn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3126
3137
  }, ps = function(e, r, o) {
3127
- if (!us(r))
3138
+ for (var s in e)
3139
+ Bn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3140
+ }, ds = function(e, r, o) {
3141
+ if (!cs(r))
3128
3142
  throw new TypeError("iterator must be a function");
3129
3143
  var s;
3130
- arguments.length >= 3 && (s = o), cs.call(e) === "[object Array]" ? fs(e, r, s) : typeof e == "string" ? ls(e, r, s) : hs(e, r, s);
3131
- }, ds = ps, jt = [
3144
+ arguments.length >= 3 && (s = o), fs.call(e) === "[object Array]" ? ls(e, r, s) : typeof e == "string" ? hs(e, r, s) : ps(e, r, s);
3145
+ }, ys = ds, jt = [
3132
3146
  "BigInt64Array",
3133
3147
  "BigUint64Array",
3134
3148
  "Float32Array",
@@ -3140,18 +3154,18 @@ var as = Ge ? function(e) {
3140
3154
  "Uint32Array",
3141
3155
  "Uint8Array",
3142
3156
  "Uint8ClampedArray"
3143
- ], ys = typeof globalThis > "u" ? zr : globalThis, gs = function() {
3157
+ ], gs = typeof globalThis > "u" ? Kr : globalThis, ms = function() {
3144
3158
  for (var e = [], r = 0; r < jt.length; r++)
3145
- typeof ys[jt[r]] == "function" && (e[e.length] = jt[r]);
3159
+ typeof gs[jt[r]] == "function" && (e[e.length] = jt[r]);
3146
3160
  return e;
3147
- }, St = ds, ms = gs, Nr = Sn, br = In, gt = gr, bs = br("Object.prototype.toString"), Bn = yr(), Ur = typeof globalThis > "u" ? zr : globalThis, ir = ms(), wr = br("String.prototype.slice"), Mt = Object.getPrototypeOf, ws = br("Array.prototype.indexOf", !0) || function(e, r) {
3161
+ }, St = ys, bs = ms, Nr = An, br = Fn, gt = gr, ws = br("Object.prototype.toString"), On = yr(), Lr = typeof globalThis > "u" ? Kr : globalThis, ir = bs(), wr = br("String.prototype.slice"), Mt = Object.getPrototypeOf, vs = br("Array.prototype.indexOf", !0) || function(e, r) {
3148
3162
  for (var o = 0; o < e.length; o += 1)
3149
3163
  if (e[o] === r)
3150
3164
  return o;
3151
3165
  return -1;
3152
3166
  }, At = { __proto__: null };
3153
- Bn && gt && Mt ? St(ir, function(t) {
3154
- var e = new Ur[t]();
3167
+ On && gt && Mt ? St(ir, function(t) {
3168
+ var e = new Lr[t]();
3155
3169
  if (Symbol.toStringTag in e) {
3156
3170
  var r = Mt(e), o = gt(r, Symbol.toStringTag);
3157
3171
  if (!o) {
@@ -3161,10 +3175,10 @@ Bn && gt && Mt ? St(ir, function(t) {
3161
3175
  At["$" + t] = Nr(o.get);
3162
3176
  }
3163
3177
  }) : St(ir, function(t) {
3164
- var e = new Ur[t](), r = e.slice || e.set;
3178
+ var e = new Lr[t](), r = e.slice || e.set;
3165
3179
  r && (At["$" + t] = Nr(r));
3166
3180
  });
3167
- var vs = function(e) {
3181
+ var Ss = function(e) {
3168
3182
  var r = !1;
3169
3183
  return St(At, function(o, s) {
3170
3184
  if (!r)
@@ -3173,7 +3187,7 @@ var vs = function(e) {
3173
3187
  } catch {
3174
3188
  }
3175
3189
  }), r;
3176
- }, Ss = function(e) {
3190
+ }, As = function(e) {
3177
3191
  var r = !1;
3178
3192
  return St(At, function(o, s) {
3179
3193
  if (!r)
@@ -3182,23 +3196,23 @@ var vs = function(e) {
3182
3196
  } catch {
3183
3197
  }
3184
3198
  }), r;
3185
- }, On = function(e) {
3199
+ }, xn = function(e) {
3186
3200
  if (!e || typeof e != "object")
3187
3201
  return !1;
3188
- if (!Bn) {
3189
- var r = wr(bs(e), 8, -1);
3190
- return ws(ir, r) > -1 ? r : r !== "Object" ? !1 : Ss(e);
3202
+ if (!On) {
3203
+ var r = wr(ws(e), 8, -1);
3204
+ return vs(ir, r) > -1 ? r : r !== "Object" ? !1 : As(e);
3191
3205
  }
3192
- return gt ? vs(e) : null;
3193
- }, As = On, Es = function(e) {
3194
- return !!As(e);
3206
+ return gt ? Ss(e) : null;
3207
+ }, Es = xn, Is = function(e) {
3208
+ return !!Es(e);
3195
3209
  };
3196
3210
  (function(t) {
3197
- var e = Qo, r = Jo, o = On, s = Es;
3211
+ var e = zo, r = Yo, o = xn, s = Is;
3198
3212
  function u(v) {
3199
3213
  return v.call.bind(v);
3200
3214
  }
3201
- var l = typeof BigInt < "u", f = typeof Symbol < "u", d = u(Object.prototype.toString), A = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), w = u(Boolean.prototype.valueOf);
3215
+ var l = typeof BigInt < "u", f = typeof Symbol < "u", p = u(Object.prototype.toString), A = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), w = u(Boolean.prototype.valueOf);
3202
3216
  if (l)
3203
3217
  var E = u(BigInt.prototype.valueOf);
3204
3218
  if (f)
@@ -3213,10 +3227,10 @@ var vs = function(e) {
3213
3227
  }
3214
3228
  }
3215
3229
  t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = s;
3216
- function U(v) {
3230
+ function L(v) {
3217
3231
  return typeof Promise < "u" && v instanceof Promise || v !== null && typeof v == "object" && typeof v.then == "function" && typeof v.catch == "function";
3218
3232
  }
3219
- t.isPromise = U;
3233
+ t.isPromise = L;
3220
3234
  function Q(v) {
3221
3235
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(v) : s(v) || b(v);
3222
3236
  }
@@ -3249,14 +3263,14 @@ var vs = function(e) {
3249
3263
  return o(v) === "Int32Array";
3250
3264
  }
3251
3265
  t.isInt32Array = B;
3252
- function te(v) {
3266
+ function re(v) {
3253
3267
  return o(v) === "Float32Array";
3254
3268
  }
3255
- t.isFloat32Array = te;
3256
- function re(v) {
3269
+ t.isFloat32Array = re;
3270
+ function ne(v) {
3257
3271
  return o(v) === "Float64Array";
3258
3272
  }
3259
- t.isFloat64Array = re;
3273
+ t.isFloat64Array = ne;
3260
3274
  function Ce(v) {
3261
3275
  return o(v) === "BigInt64Array";
3262
3276
  }
@@ -3266,7 +3280,7 @@ var vs = function(e) {
3266
3280
  }
3267
3281
  t.isBigUint64Array = Se;
3268
3282
  function ce(v) {
3269
- return d(v) === "[object Map]";
3283
+ return p(v) === "[object Map]";
3270
3284
  }
3271
3285
  ce.working = typeof Map < "u" && ce(/* @__PURE__ */ new Map());
3272
3286
  function et(v) {
@@ -3274,7 +3288,7 @@ var vs = function(e) {
3274
3288
  }
3275
3289
  t.isMap = et;
3276
3290
  function fe(v) {
3277
- return d(v) === "[object Set]";
3291
+ return p(v) === "[object Set]";
3278
3292
  }
3279
3293
  fe.working = typeof Set < "u" && fe(/* @__PURE__ */ new Set());
3280
3294
  function _e(v) {
@@ -3282,7 +3296,7 @@ var vs = function(e) {
3282
3296
  }
3283
3297
  t.isSet = _e;
3284
3298
  function Te(v) {
3285
- return d(v) === "[object WeakMap]";
3299
+ return p(v) === "[object WeakMap]";
3286
3300
  }
3287
3301
  Te.working = typeof WeakMap < "u" && Te(/* @__PURE__ */ new WeakMap());
3288
3302
  function tt(v) {
@@ -3290,7 +3304,7 @@ var vs = function(e) {
3290
3304
  }
3291
3305
  t.isWeakMap = tt;
3292
3306
  function Be(v) {
3293
- return d(v) === "[object WeakSet]";
3307
+ return p(v) === "[object WeakSet]";
3294
3308
  }
3295
3309
  Be.working = typeof WeakSet < "u" && Be(/* @__PURE__ */ new WeakSet());
3296
3310
  function le(v) {
@@ -3298,47 +3312,47 @@ var vs = function(e) {
3298
3312
  }
3299
3313
  t.isWeakSet = le;
3300
3314
  function Oe(v) {
3301
- return d(v) === "[object ArrayBuffer]";
3315
+ return p(v) === "[object ArrayBuffer]";
3302
3316
  }
3303
3317
  Oe.working = typeof ArrayBuffer < "u" && Oe(new ArrayBuffer());
3304
3318
  function V(v) {
3305
3319
  return typeof ArrayBuffer > "u" ? !1 : Oe.working ? Oe(v) : v instanceof ArrayBuffer;
3306
3320
  }
3307
3321
  t.isArrayBuffer = V;
3308
- function p(v) {
3309
- return d(v) === "[object DataView]";
3322
+ function d(v) {
3323
+ return p(v) === "[object DataView]";
3310
3324
  }
3311
- p.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && p(new DataView(new ArrayBuffer(1), 0, 1));
3325
+ d.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && d(new DataView(new ArrayBuffer(1), 0, 1));
3312
3326
  function b(v) {
3313
- return typeof DataView > "u" ? !1 : p.working ? p(v) : v instanceof DataView;
3327
+ return typeof DataView > "u" ? !1 : d.working ? d(v) : v instanceof DataView;
3314
3328
  }
3315
3329
  t.isDataView = b;
3316
3330
  var S = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
3317
3331
  function F(v) {
3318
- return d(v) === "[object SharedArrayBuffer]";
3332
+ return p(v) === "[object SharedArrayBuffer]";
3319
3333
  }
3320
3334
  function P(v) {
3321
3335
  return typeof S > "u" ? !1 : (typeof F.working > "u" && (F.working = F(new S())), F.working ? F(v) : v instanceof S);
3322
3336
  }
3323
3337
  t.isSharedArrayBuffer = P;
3324
3338
  function N(v) {
3325
- return d(v) === "[object AsyncFunction]";
3339
+ return p(v) === "[object AsyncFunction]";
3326
3340
  }
3327
3341
  t.isAsyncFunction = N;
3328
3342
  function C(v) {
3329
- return d(v) === "[object Map Iterator]";
3343
+ return p(v) === "[object Map Iterator]";
3330
3344
  }
3331
3345
  t.isMapIterator = C;
3332
3346
  function O(v) {
3333
- return d(v) === "[object Set Iterator]";
3347
+ return p(v) === "[object Set Iterator]";
3334
3348
  }
3335
3349
  t.isSetIterator = O;
3336
- function L(v) {
3337
- return d(v) === "[object Generator]";
3350
+ function U(v) {
3351
+ return p(v) === "[object Generator]";
3338
3352
  }
3339
- t.isGeneratorObject = L;
3353
+ t.isGeneratorObject = U;
3340
3354
  function Y(v) {
3341
- return d(v) === "[object WebAssembly.Module]";
3355
+ return p(v) === "[object WebAssembly.Module]";
3342
3356
  }
3343
3357
  t.isWebAssemblyCompiledModule = Y;
3344
3358
  function ye(v) {
@@ -3349,10 +3363,10 @@ var vs = function(e) {
3349
3363
  return R(v, g);
3350
3364
  }
3351
3365
  t.isStringObject = he;
3352
- function ne(v) {
3366
+ function ie(v) {
3353
3367
  return R(v, w);
3354
3368
  }
3355
- t.isBooleanObject = ne;
3369
+ t.isBooleanObject = ie;
3356
3370
  function De(v) {
3357
3371
  return l && R(v, E);
3358
3372
  }
@@ -3362,7 +3376,7 @@ var vs = function(e) {
3362
3376
  }
3363
3377
  t.isSymbolObject = ct;
3364
3378
  function rt(v) {
3365
- return ye(v) || he(v) || ne(v) || De(v) || ct(v);
3379
+ return ye(v) || he(v) || ie(v) || De(v) || ct(v);
3366
3380
  }
3367
3381
  t.isBoxedPrimitive = rt;
3368
3382
  function xt(v) {
@@ -3376,8 +3390,8 @@ var vs = function(e) {
3376
3390
  }
3377
3391
  });
3378
3392
  });
3379
- })(dn);
3380
- var Is = function(e) {
3393
+ })(yn);
3394
+ var Fs = function(e) {
3381
3395
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
3382
3396
  }, or = { exports: {} };
3383
3397
  typeof Object.create == "function" ? or.exports = function(e, r) {
@@ -3397,20 +3411,20 @@ typeof Object.create == "function" ? or.exports = function(e, r) {
3397
3411
  o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
3398
3412
  }
3399
3413
  };
3400
- var Fs = or.exports;
3414
+ var Cs = or.exports;
3401
3415
  (function(t) {
3402
3416
  var e = Object.getOwnPropertyDescriptors || function(b) {
3403
3417
  for (var S = Object.keys(b), F = {}, P = 0; P < S.length; P++)
3404
3418
  F[S[P]] = Object.getOwnPropertyDescriptor(b, S[P]);
3405
3419
  return F;
3406
3420
  }, r = /%[sdj%]/g;
3407
- t.format = function(p) {
3408
- if (!x(p)) {
3421
+ t.format = function(d) {
3422
+ if (!x(d)) {
3409
3423
  for (var b = [], S = 0; S < arguments.length; S++)
3410
3424
  b.push(l(arguments[S]));
3411
3425
  return b.join(" ");
3412
3426
  }
3413
- for (var S = 1, F = arguments, P = F.length, N = String(p).replace(r, function(O) {
3427
+ for (var S = 1, F = arguments, P = F.length, N = String(d).replace(r, function(O) {
3414
3428
  if (O === "%%")
3415
3429
  return "%";
3416
3430
  if (S >= P)
@@ -3430,14 +3444,14 @@ var Fs = or.exports;
3430
3444
  return O;
3431
3445
  }
3432
3446
  }), C = F[S]; S < P; C = F[++S])
3433
- X(C) || !re(C) ? N += " " + C : N += " " + l(C);
3447
+ X(C) || !ne(C) ? N += " " + C : N += " " + l(C);
3434
3448
  return N;
3435
- }, t.deprecate = function(p, b) {
3449
+ }, t.deprecate = function(d, b) {
3436
3450
  if (typeof _.process < "u" && _.process.noDeprecation === !0)
3437
- return p;
3451
+ return d;
3438
3452
  if (typeof _.process > "u")
3439
3453
  return function() {
3440
- return t.deprecate(p, b).apply(this, arguments);
3454
+ return t.deprecate(d, b).apply(this, arguments);
3441
3455
  };
3442
3456
  var S = !1;
3443
3457
  function F() {
@@ -3446,7 +3460,7 @@ var Fs = or.exports;
3446
3460
  throw new Error(b);
3447
3461
  _.process.traceDeprecation ? console.trace(b) : console.error(b), S = !0;
3448
3462
  }
3449
- return p.apply(this, arguments);
3463
+ return d.apply(this, arguments);
3450
3464
  }
3451
3465
  return F;
3452
3466
  };
@@ -3455,25 +3469,25 @@ var Fs = or.exports;
3455
3469
  var u = _.process.env.NODE_DEBUG;
3456
3470
  u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
3457
3471
  }
3458
- t.debuglog = function(p) {
3459
- if (p = p.toUpperCase(), !o[p])
3460
- if (s.test(p)) {
3472
+ t.debuglog = function(d) {
3473
+ if (d = d.toUpperCase(), !o[d])
3474
+ if (s.test(d)) {
3461
3475
  var b = _.process.pid;
3462
- o[p] = function() {
3476
+ o[d] = function() {
3463
3477
  var S = t.format.apply(t, arguments);
3464
- console.error("%s %d: %s", p, b, S);
3478
+ console.error("%s %d: %s", d, b, S);
3465
3479
  };
3466
3480
  } else
3467
- o[p] = function() {
3481
+ o[d] = function() {
3468
3482
  };
3469
- return o[p];
3483
+ return o[d];
3470
3484
  };
3471
- function l(p, b) {
3485
+ function l(d, b) {
3472
3486
  var S = {
3473
3487
  seen: [],
3474
- stylize: d
3488
+ stylize: p
3475
3489
  };
3476
- return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), z(b) ? S.showHidden = b : b && t._extend(S, b), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = f), g(S, p, S.depth);
3490
+ return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), z(b) ? S.showHidden = b : b && t._extend(S, b), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = f), g(S, d, S.depth);
3477
3491
  }
3478
3492
  t.inspect = l, l.colors = {
3479
3493
  bold: [1, 22],
@@ -3500,100 +3514,100 @@ var Fs = or.exports;
3500
3514
  // "name": intentionally not styling
3501
3515
  regexp: "red"
3502
3516
  };
3503
- function f(p, b) {
3517
+ function f(d, b) {
3504
3518
  var S = l.styles[b];
3505
- return S ? "\x1B[" + l.colors[S][0] + "m" + p + "\x1B[" + l.colors[S][1] + "m" : p;
3519
+ return S ? "\x1B[" + l.colors[S][0] + "m" + d + "\x1B[" + l.colors[S][1] + "m" : d;
3506
3520
  }
3507
- function d(p, b) {
3508
- return p;
3521
+ function p(d, b) {
3522
+ return d;
3509
3523
  }
3510
- function A(p) {
3524
+ function A(d) {
3511
3525
  var b = {};
3512
- return p.forEach(function(S, F) {
3526
+ return d.forEach(function(S, F) {
3513
3527
  b[S] = !0;
3514
3528
  }), b;
3515
3529
  }
3516
- function g(p, b, S) {
3517
- if (p.customInspect && b && ce(b.inspect) && // Filter out the util module, it's inspect function is special
3530
+ function g(d, b, S) {
3531
+ if (d.customInspect && b && ce(b.inspect) && // Filter out the util module, it's inspect function is special
3518
3532
  b.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
3519
3533
  !(b.constructor && b.constructor.prototype === b)) {
3520
- var F = b.inspect(S, p);
3521
- return x(F) || (F = g(p, F, S)), F;
3534
+ var F = b.inspect(S, d);
3535
+ return x(F) || (F = g(d, F, S)), F;
3522
3536
  }
3523
- var P = w(p, b);
3537
+ var P = w(d, b);
3524
3538
  if (P)
3525
3539
  return P;
3526
3540
  var N = Object.keys(b), C = A(N);
3527
- if (p.showHidden && (N = Object.getOwnPropertyNames(b)), Se(b) && (N.indexOf("message") >= 0 || N.indexOf("description") >= 0))
3541
+ if (d.showHidden && (N = Object.getOwnPropertyNames(b)), Se(b) && (N.indexOf("message") >= 0 || N.indexOf("description") >= 0))
3528
3542
  return E(b);
3529
3543
  if (N.length === 0) {
3530
3544
  if (ce(b)) {
3531
3545
  var O = b.name ? ": " + b.name : "";
3532
- return p.stylize("[Function" + O + "]", "special");
3546
+ return d.stylize("[Function" + O + "]", "special");
3533
3547
  }
3534
- if (te(b))
3535
- return p.stylize(RegExp.prototype.toString.call(b), "regexp");
3548
+ if (re(b))
3549
+ return d.stylize(RegExp.prototype.toString.call(b), "regexp");
3536
3550
  if (Ce(b))
3537
- return p.stylize(Date.prototype.toString.call(b), "date");
3551
+ return d.stylize(Date.prototype.toString.call(b), "date");
3538
3552
  if (Se(b))
3539
3553
  return E(b);
3540
3554
  }
3541
- var L = "", Y = !1, ye = ["{", "}"];
3555
+ var U = "", Y = !1, ye = ["{", "}"];
3542
3556
  if (Q(b) && (Y = !0, ye = ["[", "]"]), ce(b)) {
3543
3557
  var he = b.name ? ": " + b.name : "";
3544
- L = " [Function" + he + "]";
3558
+ U = " [Function" + he + "]";
3545
3559
  }
3546
- if (te(b) && (L = " " + RegExp.prototype.toString.call(b)), Ce(b) && (L = " " + Date.prototype.toUTCString.call(b)), Se(b) && (L = " " + E(b)), N.length === 0 && (!Y || b.length == 0))
3547
- return ye[0] + L + ye[1];
3560
+ if (re(b) && (U = " " + RegExp.prototype.toString.call(b)), Ce(b) && (U = " " + Date.prototype.toUTCString.call(b)), Se(b) && (U = " " + E(b)), N.length === 0 && (!Y || b.length == 0))
3561
+ return ye[0] + U + ye[1];
3548
3562
  if (S < 0)
3549
- return te(b) ? p.stylize(RegExp.prototype.toString.call(b), "regexp") : p.stylize("[Object]", "special");
3550
- p.seen.push(b);
3551
- var ne;
3552
- return Y ? ne = I(p, b, S, C, N) : ne = N.map(function(De) {
3553
- return R(p, b, S, C, De, Y);
3554
- }), p.seen.pop(), U(ne, L, ye);
3555
- }
3556
- function w(p, b) {
3563
+ return re(b) ? d.stylize(RegExp.prototype.toString.call(b), "regexp") : d.stylize("[Object]", "special");
3564
+ d.seen.push(b);
3565
+ var ie;
3566
+ return Y ? ie = I(d, b, S, C, N) : ie = N.map(function(De) {
3567
+ return R(d, b, S, C, De, Y);
3568
+ }), d.seen.pop(), L(ie, U, ye);
3569
+ }
3570
+ function w(d, b) {
3557
3571
  if (B(b))
3558
- return p.stylize("undefined", "undefined");
3572
+ return d.stylize("undefined", "undefined");
3559
3573
  if (x(b)) {
3560
3574
  var S = "'" + JSON.stringify(b).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
3561
- return p.stylize(S, "string");
3575
+ return d.stylize(S, "string");
3562
3576
  }
3563
3577
  if (ee(b))
3564
- return p.stylize("" + b, "number");
3578
+ return d.stylize("" + b, "number");
3565
3579
  if (z(b))
3566
- return p.stylize("" + b, "boolean");
3580
+ return d.stylize("" + b, "boolean");
3567
3581
  if (X(b))
3568
- return p.stylize("null", "null");
3582
+ return d.stylize("null", "null");
3569
3583
  }
3570
- function E(p) {
3571
- return "[" + Error.prototype.toString.call(p) + "]";
3584
+ function E(d) {
3585
+ return "[" + Error.prototype.toString.call(d) + "]";
3572
3586
  }
3573
- function I(p, b, S, F, P) {
3587
+ function I(d, b, S, F, P) {
3574
3588
  for (var N = [], C = 0, O = b.length; C < O; ++C)
3575
3589
  Be(b, String(C)) ? N.push(R(
3576
- p,
3590
+ d,
3577
3591
  b,
3578
3592
  S,
3579
3593
  F,
3580
3594
  String(C),
3581
3595
  !0
3582
3596
  )) : N.push("");
3583
- return P.forEach(function(L) {
3584
- L.match(/^\d+$/) || N.push(R(
3585
- p,
3597
+ return P.forEach(function(U) {
3598
+ U.match(/^\d+$/) || N.push(R(
3599
+ d,
3586
3600
  b,
3587
3601
  S,
3588
3602
  F,
3589
- L,
3603
+ U,
3590
3604
  !0
3591
3605
  ));
3592
3606
  }), N;
3593
3607
  }
3594
- function R(p, b, S, F, P, N) {
3595
- var C, O, L;
3596
- if (L = Object.getOwnPropertyDescriptor(b, P) || { value: b[P] }, L.get ? L.set ? O = p.stylize("[Getter/Setter]", "special") : O = p.stylize("[Getter]", "special") : L.set && (O = p.stylize("[Setter]", "special")), Be(F, P) || (C = "[" + P + "]"), O || (p.seen.indexOf(L.value) < 0 ? (X(S) ? O = g(p, L.value, null) : O = g(p, L.value, S - 1), O.indexOf(`
3608
+ function R(d, b, S, F, P, N) {
3609
+ var C, O, U;
3610
+ if (U = Object.getOwnPropertyDescriptor(b, P) || { value: b[P] }, U.get ? U.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : U.set && (O = d.stylize("[Setter]", "special")), Be(F, P) || (C = "[" + P + "]"), O || (d.seen.indexOf(U.value) < 0 ? (X(S) ? O = g(d, U.value, null) : O = g(d, U.value, S - 1), O.indexOf(`
3597
3611
  `) > -1 && (N ? O = O.split(`
3598
3612
  `).map(function(Y) {
3599
3613
  return " " + Y;
@@ -3603,85 +3617,85 @@ var Fs = or.exports;
3603
3617
  `).map(function(Y) {
3604
3618
  return " " + Y;
3605
3619
  }).join(`
3606
- `))) : O = p.stylize("[Circular]", "special")), B(C)) {
3620
+ `))) : O = d.stylize("[Circular]", "special")), B(C)) {
3607
3621
  if (N && P.match(/^\d+$/))
3608
3622
  return O;
3609
- C = JSON.stringify("" + P), C.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (C = C.slice(1, -1), C = p.stylize(C, "name")) : (C = C.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), C = p.stylize(C, "string"));
3623
+ C = JSON.stringify("" + P), C.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (C = C.slice(1, -1), C = d.stylize(C, "name")) : (C = C.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), C = d.stylize(C, "string"));
3610
3624
  }
3611
3625
  return C + ": " + O;
3612
3626
  }
3613
- function U(p, b, S) {
3614
- var F = p.reduce(function(P, N) {
3627
+ function L(d, b, S) {
3628
+ var F = d.reduce(function(P, N) {
3615
3629
  return N.indexOf(`
3616
3630
  `) >= 0, P + N.replace(/\u001b\[\d\d?m/g, "").length + 1;
3617
3631
  }, 0);
3618
3632
  return F > 60 ? S[0] + (b === "" ? "" : b + `
3619
- `) + " " + p.join(`,
3620
- `) + " " + S[1] : S[0] + b + " " + p.join(", ") + " " + S[1];
3633
+ `) + " " + d.join(`,
3634
+ `) + " " + S[1] : S[0] + b + " " + d.join(", ") + " " + S[1];
3621
3635
  }
3622
- t.types = dn;
3623
- function Q(p) {
3624
- return Array.isArray(p);
3636
+ t.types = yn;
3637
+ function Q(d) {
3638
+ return Array.isArray(d);
3625
3639
  }
3626
3640
  t.isArray = Q;
3627
- function z(p) {
3628
- return typeof p == "boolean";
3641
+ function z(d) {
3642
+ return typeof d == "boolean";
3629
3643
  }
3630
3644
  t.isBoolean = z;
3631
- function X(p) {
3632
- return p === null;
3645
+ function X(d) {
3646
+ return d === null;
3633
3647
  }
3634
3648
  t.isNull = X;
3635
- function de(p) {
3636
- return p == null;
3649
+ function de(d) {
3650
+ return d == null;
3637
3651
  }
3638
3652
  t.isNullOrUndefined = de;
3639
- function ee(p) {
3640
- return typeof p == "number";
3653
+ function ee(d) {
3654
+ return typeof d == "number";
3641
3655
  }
3642
3656
  t.isNumber = ee;
3643
- function x(p) {
3644
- return typeof p == "string";
3657
+ function x(d) {
3658
+ return typeof d == "string";
3645
3659
  }
3646
3660
  t.isString = x;
3647
- function j(p) {
3648
- return typeof p == "symbol";
3661
+ function j(d) {
3662
+ return typeof d == "symbol";
3649
3663
  }
3650
3664
  t.isSymbol = j;
3651
- function B(p) {
3652
- return p === void 0;
3665
+ function B(d) {
3666
+ return d === void 0;
3653
3667
  }
3654
3668
  t.isUndefined = B;
3655
- function te(p) {
3656
- return re(p) && fe(p) === "[object RegExp]";
3669
+ function re(d) {
3670
+ return ne(d) && fe(d) === "[object RegExp]";
3657
3671
  }
3658
- t.isRegExp = te, t.types.isRegExp = te;
3659
- function re(p) {
3660
- return typeof p == "object" && p !== null;
3672
+ t.isRegExp = re, t.types.isRegExp = re;
3673
+ function ne(d) {
3674
+ return typeof d == "object" && d !== null;
3661
3675
  }
3662
- t.isObject = re;
3663
- function Ce(p) {
3664
- return re(p) && fe(p) === "[object Date]";
3676
+ t.isObject = ne;
3677
+ function Ce(d) {
3678
+ return ne(d) && fe(d) === "[object Date]";
3665
3679
  }
3666
3680
  t.isDate = Ce, t.types.isDate = Ce;
3667
- function Se(p) {
3668
- return re(p) && (fe(p) === "[object Error]" || p instanceof Error);
3681
+ function Se(d) {
3682
+ return ne(d) && (fe(d) === "[object Error]" || d instanceof Error);
3669
3683
  }
3670
3684
  t.isError = Se, t.types.isNativeError = Se;
3671
- function ce(p) {
3672
- return typeof p == "function";
3685
+ function ce(d) {
3686
+ return typeof d == "function";
3673
3687
  }
3674
3688
  t.isFunction = ce;
3675
- function et(p) {
3676
- return p === null || typeof p == "boolean" || typeof p == "number" || typeof p == "string" || typeof p == "symbol" || // ES6 symbol
3677
- typeof p > "u";
3689
+ function et(d) {
3690
+ return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
3691
+ typeof d > "u";
3678
3692
  }
3679
- t.isPrimitive = et, t.isBuffer = Is;
3680
- function fe(p) {
3681
- return Object.prototype.toString.call(p);
3693
+ t.isPrimitive = et, t.isBuffer = Fs;
3694
+ function fe(d) {
3695
+ return Object.prototype.toString.call(d);
3682
3696
  }
3683
- function _e(p) {
3684
- return p < 10 ? "0" + p.toString(10) : p.toString(10);
3697
+ function _e(d) {
3698
+ return d < 10 ? "0" + d.toString(10) : d.toString(10);
3685
3699
  }
3686
3700
  var Te = [
3687
3701
  "Jan",
@@ -3698,24 +3712,24 @@ var Fs = or.exports;
3698
3712
  "Dec"
3699
3713
  ];
3700
3714
  function tt() {
3701
- var p = /* @__PURE__ */ new Date(), b = [
3702
- _e(p.getHours()),
3703
- _e(p.getMinutes()),
3704
- _e(p.getSeconds())
3715
+ var d = /* @__PURE__ */ new Date(), b = [
3716
+ _e(d.getHours()),
3717
+ _e(d.getMinutes()),
3718
+ _e(d.getSeconds())
3705
3719
  ].join(":");
3706
- return [p.getDate(), Te[p.getMonth()], b].join(" ");
3720
+ return [d.getDate(), Te[d.getMonth()], b].join(" ");
3707
3721
  }
3708
3722
  t.log = function() {
3709
3723
  console.log("%s - %s", tt(), t.format.apply(t, arguments));
3710
- }, t.inherits = Fs, t._extend = function(p, b) {
3711
- if (!b || !re(b))
3712
- return p;
3724
+ }, t.inherits = Cs, t._extend = function(d, b) {
3725
+ if (!b || !ne(b))
3726
+ return d;
3713
3727
  for (var S = Object.keys(b), F = S.length; F--; )
3714
- p[S[F]] = b[S[F]];
3715
- return p;
3728
+ d[S[F]] = b[S[F]];
3729
+ return d;
3716
3730
  };
3717
- function Be(p, b) {
3718
- return Object.prototype.hasOwnProperty.call(p, b);
3731
+ function Be(d, b) {
3732
+ return Object.prototype.hasOwnProperty.call(d, b);
3719
3733
  }
3720
3734
  var le = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
3721
3735
  t.promisify = function(b) {
@@ -3733,17 +3747,17 @@ var Fs = or.exports;
3733
3747
  }), S;
3734
3748
  }
3735
3749
  function S() {
3736
- for (var F, P, N = new Promise(function(L, Y) {
3737
- F = L, P = Y;
3750
+ for (var F, P, N = new Promise(function(U, Y) {
3751
+ F = U, P = Y;
3738
3752
  }), C = [], O = 0; O < arguments.length; O++)
3739
3753
  C.push(arguments[O]);
3740
- C.push(function(L, Y) {
3741
- L ? P(L) : F(Y);
3754
+ C.push(function(U, Y) {
3755
+ U ? P(U) : F(Y);
3742
3756
  });
3743
3757
  try {
3744
3758
  b.apply(this, C);
3745
- } catch (L) {
3746
- P(L);
3759
+ } catch (U) {
3760
+ P(U);
3747
3761
  }
3748
3762
  return N;
3749
3763
  }
@@ -3757,15 +3771,15 @@ var Fs = or.exports;
3757
3771
  e(b)
3758
3772
  );
3759
3773
  }, t.promisify.custom = le;
3760
- function Oe(p, b) {
3761
- if (!p) {
3774
+ function Oe(d, b) {
3775
+ if (!d) {
3762
3776
  var S = new Error("Promise was rejected with a falsy value");
3763
- S.reason = p, p = S;
3777
+ S.reason = d, d = S;
3764
3778
  }
3765
- return b(p);
3779
+ return b(d);
3766
3780
  }
3767
- function V(p) {
3768
- if (typeof p != "function")
3781
+ function V(d) {
3782
+ if (typeof d != "function")
3769
3783
  throw new TypeError('The "original" argument must be of type Function');
3770
3784
  function b() {
3771
3785
  for (var S = [], F = 0; F < arguments.length; F++)
@@ -3776,7 +3790,7 @@ var Fs = or.exports;
3776
3790
  var N = this, C = function() {
3777
3791
  return P.apply(N, arguments);
3778
3792
  };
3779
- p.apply(this, S).then(
3793
+ d.apply(this, S).then(
3780
3794
  function(O) {
3781
3795
  _.process.nextTick(C.bind(null, null, O));
3782
3796
  },
@@ -3785,14 +3799,14 @@ var Fs = or.exports;
3785
3799
  }
3786
3800
  );
3787
3801
  }
3788
- return Object.setPrototypeOf(b, Object.getPrototypeOf(p)), Object.defineProperties(
3802
+ return Object.setPrototypeOf(b, Object.getPrototypeOf(d)), Object.defineProperties(
3789
3803
  b,
3790
- e(p)
3804
+ e(d)
3791
3805
  ), b;
3792
3806
  }
3793
3807
  t.callbackify = V;
3794
3808
  })(Bt);
3795
- const { inherits: Cs, format: Vt } = Bt;
3809
+ const { inherits: _s, format: Vt } = Bt;
3796
3810
  function Pe(t, e, r = Error) {
3797
3811
  if (!t)
3798
3812
  throw new Error("Avvio error code must not be empty");
@@ -3805,9 +3819,9 @@ function Pe(t, e, r = Error) {
3805
3819
  }
3806
3820
  return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
3807
3821
  return `${this.name} [${this.code}]: ${this.message}`;
3808
- }, Cs(o, r), o;
3822
+ }, _s(o, r), o;
3809
3823
  }
3810
- var xn = {
3824
+ var kn = {
3811
3825
  createError: Pe,
3812
3826
  AVV_ERR_EXPOSE_ALREADY_DEFINED: Pe(
3813
3827
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
@@ -3833,9 +3847,9 @@ var xn = {
3833
3847
  "AVV_ERR_READY_TIMEOUT",
3834
3848
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
3835
3849
  )
3836
- }, _s = function t(e, r, o) {
3850
+ }, Ts = function t(e, r, o) {
3837
3851
  r === void 0 && (r = ""), o || (o = {});
3838
- var s = function(d) {
3852
+ var s = function(p) {
3839
3853
  var A = {
3840
3854
  "│": "|",
3841
3855
  "└": "`",
@@ -3843,27 +3857,27 @@ var xn = {
3843
3857
  "─": "-",
3844
3858
  "┬": "-"
3845
3859
  };
3846
- return o.unicode === !1 ? A[d] : d;
3860
+ return o.unicode === !1 ? A[p] : p;
3847
3861
  };
3848
3862
  typeof e == "string" && (e = { label: e });
3849
3863
  var u = e.nodes || [], l = (e.label || "").split(`
3850
3864
  `), f = `
3851
3865
  ` + r + (u.length ? s("│") : " ") + " ";
3852
3866
  return r + l.join(f) + `
3853
- ` + u.map(function(d, A) {
3854
- var g = A === u.length - 1, w = d.nodes && d.nodes.length, E = r + (g ? " " : s("│")) + " ";
3855
- return r + s(g ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(d, E, o).slice(r.length + 2);
3867
+ ` + u.map(function(p, A) {
3868
+ var g = A === u.length - 1, w = p.nodes && p.nodes.length, E = r + (g ? " " : s("│")) + " ";
3869
+ return r + s(g ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, o).slice(r.length + 2);
3856
3870
  }).join("");
3857
3871
  };
3858
- const Ts = _s, Lr = Symbol("avvio.TimeTree.untrackNode"), qt = Symbol("avvio.TimeTree.trackNode"), $r = Symbol("avvio.TimeTree.getParent"), Dr = Symbol("avvio.TimeTree.getNode"), jr = Symbol("avvio.TimeTree.addNode");
3859
- let Bs = class {
3872
+ const Bs = Ts, Ur = Symbol("avvio.TimeTree.untrackNode"), qt = Symbol("avvio.TimeTree.trackNode"), $r = Symbol("avvio.TimeTree.getParent"), Dr = Symbol("avvio.TimeTree.getNode"), jr = Symbol("avvio.TimeTree.addNode");
3873
+ let Os = class {
3860
3874
  constructor() {
3861
3875
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
3862
3876
  }
3863
3877
  [qt](e) {
3864
3878
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
3865
3879
  }
3866
- [Lr](e) {
3880
+ [Ur](e) {
3867
3881
  this.tableId.delete(e.id);
3868
3882
  const r = this.tableLabel.get(e.label);
3869
3883
  if (r.id) {
@@ -3903,18 +3917,18 @@ let Bs = class {
3903
3917
  }
3904
3918
  stop(e, r = Date.now()) {
3905
3919
  const o = this[Dr](e);
3906
- o && (o.stop = r, o.diff = o.stop - o.start || 0, this[Lr](o));
3920
+ o && (o.stop = r, o.diff = o.stop - o.start || 0, this[Ur](o));
3907
3921
  }
3908
3922
  toJSON() {
3909
3923
  return Object.assign({}, this.root);
3910
3924
  }
3911
3925
  prittyPrint() {
3912
3926
  const e = (o) => (o.label = `${o.label} ${o.diff} ms`, o.nodes.length > 0 && (o.nodes = o.nodes.map((s) => e(s))), o), r = e(this.toJSON());
3913
- return Ts(r);
3927
+ return Bs(r);
3914
3928
  }
3915
3929
  };
3916
- var Os = Bs, vr = { exports: {} }, sr = { exports: {} }, Gt, Mr;
3917
- function xs() {
3930
+ var xs = Os, vr = { exports: {} }, sr = { exports: {} }, Gt, Mr;
3931
+ function ks() {
3918
3932
  if (Mr)
3919
3933
  return Gt;
3920
3934
  Mr = 1;
@@ -3925,7 +3939,7 @@ function xs() {
3925
3939
  if (E === "string" && g.length > 0)
3926
3940
  return l(g);
3927
3941
  if (E === "number" && isFinite(g))
3928
- return w.long ? d(g) : f(g);
3942
+ return w.long ? p(g) : f(g);
3929
3943
  throw new Error(
3930
3944
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(g)
3931
3945
  );
@@ -3986,7 +4000,7 @@ function xs() {
3986
4000
  var w = Math.abs(g);
3987
4001
  return w >= o ? Math.round(g / o) + "d" : w >= r ? Math.round(g / r) + "h" : w >= e ? Math.round(g / e) + "m" : w >= t ? Math.round(g / t) + "s" : g + "ms";
3988
4002
  }
3989
- function d(g) {
4003
+ function p(g) {
3990
4004
  var w = Math.abs(g);
3991
4005
  return w >= o ? A(g, w, o, "day") : w >= r ? A(g, w, r, "hour") : w >= e ? A(g, w, e, "minute") : w >= t ? A(g, w, t, "second") : g + " ms";
3992
4006
  }
@@ -3996,8 +4010,8 @@ function xs() {
3996
4010
  }
3997
4011
  return Gt;
3998
4012
  }
3999
- function ks(t) {
4000
- r.debug = r, r.default = r, r.coerce = d, r.disable = u, r.enable = s, r.enabled = l, r.humanize = xs(), r.destroy = A, Object.keys(t).forEach((g) => {
4013
+ function Ps(t) {
4014
+ r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize = ks(), r.destroy = A, Object.keys(t).forEach((g) => {
4001
4015
  r[g] = t[g];
4002
4016
  }), r.names = [], r.skips = [], r.formatters = {};
4003
4017
  function e(g) {
@@ -4009,32 +4023,32 @@ function ks(t) {
4009
4023
  r.selectColor = e;
4010
4024
  function r(g) {
4011
4025
  let w, E = null, I, R;
4012
- function U(...Q) {
4013
- if (!U.enabled)
4026
+ function L(...Q) {
4027
+ if (!L.enabled)
4014
4028
  return;
4015
- const z = U, X = Number(/* @__PURE__ */ new Date()), de = X - (w || X);
4029
+ const z = L, X = Number(/* @__PURE__ */ new Date()), de = X - (w || X);
4016
4030
  z.diff = de, z.prev = w, z.curr = X, w = X, Q[0] = r.coerce(Q[0]), typeof Q[0] != "string" && Q.unshift("%O");
4017
4031
  let ee = 0;
4018
4032
  Q[0] = Q[0].replace(/%([a-zA-Z%])/g, (j, B) => {
4019
4033
  if (j === "%%")
4020
4034
  return "%";
4021
4035
  ee++;
4022
- const te = r.formatters[B];
4023
- if (typeof te == "function") {
4024
- const re = Q[ee];
4025
- j = te.call(z, re), Q.splice(ee, 1), ee--;
4036
+ const re = r.formatters[B];
4037
+ if (typeof re == "function") {
4038
+ const ne = Q[ee];
4039
+ j = re.call(z, ne), Q.splice(ee, 1), ee--;
4026
4040
  }
4027
4041
  return j;
4028
4042
  }), r.formatArgs.call(z, Q), (z.log || r.log).apply(z, Q);
4029
4043
  }
4030
- return U.namespace = g, U.useColors = r.useColors(), U.color = r.selectColor(g), U.extend = o, U.destroy = r.destroy, Object.defineProperty(U, "enabled", {
4044
+ return L.namespace = g, L.useColors = r.useColors(), L.color = r.selectColor(g), L.extend = o, L.destroy = r.destroy, Object.defineProperty(L, "enabled", {
4031
4045
  enumerable: !0,
4032
4046
  configurable: !1,
4033
4047
  get: () => E !== null ? E : (I !== r.namespaces && (I = r.namespaces, R = r.enabled(g)), R),
4034
4048
  set: (Q) => {
4035
4049
  E = Q;
4036
4050
  }
4037
- }), typeof r.init == "function" && r.init(U), U;
4051
+ }), typeof r.init == "function" && r.init(L), L;
4038
4052
  }
4039
4053
  function o(g, w) {
4040
4054
  const E = r(this.namespace + (typeof w > "u" ? ":" : w) + g);
@@ -4069,7 +4083,7 @@ function ks(t) {
4069
4083
  function f(g) {
4070
4084
  return g.toString().substring(2, g.toString().length - 2).replace(/\.\*\?$/, "*");
4071
4085
  }
4072
- function d(g) {
4086
+ function p(g) {
4073
4087
  return g instanceof Error ? g.stack || g.message : g;
4074
4088
  }
4075
4089
  function A() {
@@ -4077,12 +4091,12 @@ function ks(t) {
4077
4091
  }
4078
4092
  return r.enable(r.load()), r;
4079
4093
  }
4080
- var Ps = ks;
4094
+ var Rs = Ps;
4081
4095
  (function(t, e) {
4082
4096
  e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
4083
- let d = !1;
4097
+ let p = !1;
4084
4098
  return () => {
4085
- d || (d = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
4099
+ p || (p = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
4086
4100
  };
4087
4101
  })(), e.colors = [
4088
4102
  "#0000CC",
@@ -4169,31 +4183,31 @@ var Ps = ks;
4169
4183
  typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
4170
4184
  typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
4171
4185
  }
4172
- function o(d) {
4173
- if (d[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + d[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
4186
+ function o(p) {
4187
+ if (p[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + p[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
4174
4188
  return;
4175
4189
  const A = "color: " + this.color;
4176
- d.splice(1, 0, A, "color: inherit");
4190
+ p.splice(1, 0, A, "color: inherit");
4177
4191
  let g = 0, w = 0;
4178
- d[0].replace(/%[a-zA-Z%]/g, (E) => {
4192
+ p[0].replace(/%[a-zA-Z%]/g, (E) => {
4179
4193
  E !== "%%" && (g++, E === "%c" && (w = g));
4180
- }), d.splice(w, 0, A);
4194
+ }), p.splice(w, 0, A);
4181
4195
  }
4182
4196
  e.log = console.debug || console.log || (() => {
4183
4197
  });
4184
- function s(d) {
4198
+ function s(p) {
4185
4199
  try {
4186
- d ? e.storage.setItem("debug", d) : e.storage.removeItem("debug");
4200
+ p ? e.storage.setItem("debug", p) : e.storage.removeItem("debug");
4187
4201
  } catch {
4188
4202
  }
4189
4203
  }
4190
4204
  function u() {
4191
- let d;
4205
+ let p;
4192
4206
  try {
4193
- d = e.storage.getItem("debug");
4207
+ p = e.storage.getItem("debug");
4194
4208
  } catch {
4195
4209
  }
4196
- return !d && typeof _.process < "u" && "env" in _.process && (d = _.process.env.DEBUG), d;
4210
+ return !p && typeof _.process < "u" && "env" in _.process && (p = _.process.env.DEBUG), p;
4197
4211
  }
4198
4212
  function l() {
4199
4213
  try {
@@ -4201,32 +4215,32 @@ var Ps = ks;
4201
4215
  } catch {
4202
4216
  }
4203
4217
  }
4204
- t.exports = Ps(e);
4218
+ t.exports = Rs(e);
4205
4219
  const { formatters: f } = t.exports;
4206
- f.j = function(d) {
4220
+ f.j = function(p) {
4207
4221
  try {
4208
- return JSON.stringify(d);
4222
+ return JSON.stringify(p);
4209
4223
  } catch (A) {
4210
4224
  return "[UnexpectedJSONParseError]: " + A.message;
4211
4225
  }
4212
4226
  };
4213
4227
  })(sr, sr.exports);
4214
- var kn = sr.exports;
4215
- const Rs = nn, Ns = pn.EventEmitter, Us = Bt.inherits, W = kn("avvio"), { AVV_ERR_READY_TIMEOUT: Ls } = xn, Qt = Symbol.for("plugin-meta");
4216
- function $s(t, e) {
4228
+ var Pn = sr.exports;
4229
+ const Ns = on, Ls = dn.EventEmitter, Us = Bt.inherits, W = Pn("avvio"), { AVV_ERR_READY_TIMEOUT: $s } = kn, Qt = Symbol.for("plugin-meta");
4230
+ function Ds(t, e) {
4217
4231
  return t[Qt] && t[Qt].name ? t[Qt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4218
4232
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
4219
4233
  }
4220
- function Ds() {
4234
+ function js() {
4221
4235
  const t = {};
4222
4236
  return t.promise = new Promise((e, r) => {
4223
4237
  t.resolve = e, t.reject = r;
4224
4238
  }), t;
4225
4239
  }
4226
4240
  function Ze(t, e, r, o, s) {
4227
- this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = $s(e, r), this.isAfter = o, this.q = Rs(t, js, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4241
+ this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = Ds(e, r), this.isAfter = o, this.q = Ns(t, Ms, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4228
4242
  }
4229
- Us(Ze, Ns);
4243
+ Us(Ze, Ls);
4230
4244
  Ze.prototype.exec = function(t, e) {
4231
4245
  const r = this.func;
4232
4246
  let o = !1;
@@ -4240,27 +4254,27 @@ Ze.prototype.exec = function(t, e) {
4240
4254
  else
4241
4255
  try {
4242
4256
  this.server = this.parent.override(t, r, this.opts);
4243
- } catch (d) {
4244
- return W("override errored", s), e(d);
4257
+ } catch (p) {
4258
+ return W("override errored", s), e(p);
4245
4259
  }
4246
4260
  this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, W("exec", s);
4247
4261
  let u;
4248
- const l = (d) => {
4262
+ const l = (p) => {
4249
4263
  if (o) {
4250
4264
  W("loading complete", s);
4251
4265
  return;
4252
4266
  }
4253
- this._error = d, W(d ? "exec errored" : "exec completed", s), o = !0, u && clearTimeout(u), e(d);
4267
+ this._error = p, W(p ? "exec errored" : "exec completed", s), o = !0, u && clearTimeout(u), e(p);
4254
4268
  };
4255
4269
  this.timeout > 0 && (W("setting up timeout", s, this.timeout), u = setTimeout(function() {
4256
4270
  W("timed out", s), u = null;
4257
- const d = new Ls(s);
4258
- d.fn = r, l(d);
4271
+ const p = new $s(s);
4272
+ p.fn = r, l(p);
4259
4273
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4260
4274
  const f = r(this.server, this.opts, l);
4261
4275
  f && typeof f.then == "function" && (W("exec: resolving promise", s), f.then(
4262
4276
  () => _.process.nextTick(l),
4263
- (d) => _.process.nextTick(l, d)
4277
+ (p) => _.process.nextTick(l, p)
4264
4278
  ));
4265
4279
  };
4266
4280
  Ze.prototype.loadedSoFar = function() {
@@ -4272,7 +4286,7 @@ Ze.prototype.loadedSoFar = function() {
4272
4286
  }), this.q.resume();
4273
4287
  };
4274
4288
  let e;
4275
- return this._promise ? e = Promise.resolve() : (this._promise = Ds(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4289
+ return this._promise ? e = Promise.resolve() : (this._promise = js(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4276
4290
  };
4277
4291
  Ze.prototype.enqueue = function(t, e) {
4278
4292
  W("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
@@ -4297,12 +4311,12 @@ Ze.prototype.finish = function(t, e) {
4297
4311
  r();
4298
4312
  else
4299
4313
  W("delayed", this.name), this.q.drain = () => {
4300
- W("drain", this.name), this.q.drain = Ms, queueMicrotask(o);
4314
+ W("drain", this.name), this.q.drain = Vs, queueMicrotask(o);
4301
4315
  };
4302
4316
  };
4303
4317
  queueMicrotask(o), this.q.resume();
4304
4318
  };
4305
- function js(t, e) {
4319
+ function Ms(t, e) {
4306
4320
  const r = this;
4307
4321
  _.process.nextTick(Sr.bind(r), t, e);
4308
4322
  }
@@ -4320,20 +4334,20 @@ function Sr(t, e) {
4320
4334
  });
4321
4335
  });
4322
4336
  }
4323
- function Ms() {
4337
+ function Vs() {
4324
4338
  }
4325
4339
  vr.exports = Ze;
4326
4340
  vr.exports.loadPlugin = Sr;
4327
- var Vs = vr.exports;
4328
- const Vr = nn, qs = pn.EventEmitter, Gs = Bt.inherits, {
4341
+ var qs = vr.exports;
4342
+ const Vr = on, Gs = dn.EventEmitter, Qs = Bt.inherits, {
4329
4343
  AVV_ERR_EXPOSE_ALREADY_DEFINED: zt,
4330
4344
  AVV_ERR_CALLBACK_NOT_FN: at,
4331
- AVV_ERR_PLUGIN_NOT_VALID: Qs,
4332
- AVV_ERR_ROOT_PLG_BOOTED: zs,
4333
- AVV_ERR_READY_TIMEOUT: Ks
4334
- } = xn, Hs = Os, ar = Vs, Ye = kn("avvio"), Et = Symbol("kAvvio"), Kt = Symbol("kThenifyDoNotWrap");
4335
- function Ws(t, e, r) {
4336
- const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose", d = o.close || "close";
4345
+ AVV_ERR_PLUGIN_NOT_VALID: zs,
4346
+ AVV_ERR_ROOT_PLG_BOOTED: Ks,
4347
+ AVV_ERR_READY_TIMEOUT: Hs
4348
+ } = kn, Ws = xs, ar = qs, Ye = Pn("avvio"), Et = Symbol("kAvvio"), Kt = Symbol("kThenifyDoNotWrap");
4349
+ function Js(t, e, r) {
4350
+ const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose", p = o.close || "close";
4337
4351
  if (t[s])
4338
4352
  throw new zt(s);
4339
4353
  if (t[u])
@@ -4342,7 +4356,7 @@ function Ws(t, e, r) {
4342
4356
  throw new zt(l);
4343
4357
  t[s] = function(A, g) {
4344
4358
  return r.use(A, g), this;
4345
- }, Object.defineProperty(t, "then", { get: Pn.bind(r) }), t[Et] = !0, t[u] = function(A) {
4359
+ }, Object.defineProperty(t, "then", { get: Rn.bind(r) }), t[Et] = !0, t[u] = function(A) {
4346
4360
  return typeof A != "function" ? r._loadRegistered() : (r.after(Ht(A, this)), this);
4347
4361
  }, t[l] = function(A) {
4348
4362
  if (A && typeof A != "function")
@@ -4351,25 +4365,25 @@ function Ws(t, e, r) {
4351
4365
  }, t[f] = function(A) {
4352
4366
  if (typeof A != "function")
4353
4367
  throw new at(f, typeof A);
4354
- return r.onClose(ea(A, this)), this;
4355
- }, t[d] = function(A) {
4368
+ return r.onClose(ta(A, this)), this;
4369
+ }, t[p] = function(A) {
4356
4370
  if (A && typeof A != "function")
4357
- throw new at(d, typeof A);
4371
+ throw new at(p, typeof A);
4358
4372
  return A ? (r.close(Ht(A, this)), this) : r.close();
4359
4373
  };
4360
4374
  }
4361
4375
  function J(t, e, r) {
4362
4376
  if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof J)) {
4363
4377
  const o = new J(t, e, r);
4364
- return t && Ws(t, e, o), o;
4378
+ return t && Js(t, e, o), o;
4365
4379
  }
4366
- e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new Hs(), this._readyQ = Vr(this, Rn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
4380
+ e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new Ws(), this._readyQ = Vr(this, Nn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
4367
4381
  this.emit("start"), this._readyQ.drain = qr;
4368
- }, this._closeQ = Vr(this, Zs, 1), this._closeQ.pause(), this._closeQ.drain = () => {
4382
+ }, this._closeQ = Vr(this, ea, 1), this._closeQ.pause(), this._closeQ.drain = () => {
4369
4383
  this.emit("close"), this._closeQ.drain = qr;
4370
- }, this._doStart = null, this._root = new ar(this, Js.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
4384
+ }, this._doStart = null, this._root = new ar(this, Ys.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
4371
4385
  const l = this.pluginTree.start(null, s, u);
4372
- this._root.once("loaded", (f, d, A) => {
4386
+ this._root.once("loaded", (f, p, A) => {
4373
4387
  this.pluginTree.stop(l, A);
4374
4388
  });
4375
4389
  }), ar.loadPlugin.call(this, this._root, (o) => {
@@ -4387,19 +4401,19 @@ function J(t, e, r) {
4387
4401
  this._readyQ.resume();
4388
4402
  });
4389
4403
  }
4390
- function Js(t, e, r) {
4404
+ function Ys(t, e, r) {
4391
4405
  this._doStart = r, e.autostart && this.start();
4392
4406
  }
4393
- Gs(J, qs);
4407
+ Qs(J, Gs);
4394
4408
  J.prototype.start = function() {
4395
4409
  return this.started = !0, _.process.nextTick(this._doStart), this;
4396
4410
  };
4397
4411
  J.prototype.override = function(t, e, r) {
4398
4412
  return t;
4399
4413
  };
4400
- function Ys(t) {
4414
+ function Xs(t) {
4401
4415
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
4402
- throw new Qs(typeof t);
4416
+ throw new zs(typeof t);
4403
4417
  return t;
4404
4418
  }
4405
4419
  J.prototype[Et] = !0;
@@ -4410,15 +4424,15 @@ J.prototype._loadRegistered = function() {
4410
4424
  const t = this._current[0];
4411
4425
  return !this.started && !this.booted && _.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4412
4426
  };
4413
- Object.defineProperty(J.prototype, "then", { get: Pn });
4427
+ Object.defineProperty(J.prototype, "then", { get: Rn });
4414
4428
  J.prototype._addPlugin = function(t, e, r) {
4415
- if (t = Ys(t), e = e || {}, this.booted)
4416
- throw new zs();
4429
+ if (t = Xs(t), e = e || {}, this.booted)
4430
+ throw new Ks();
4417
4431
  const o = this._current[0], s = new ar(this, t, e, r);
4418
4432
  if (s.once("start", (u, l, f) => {
4419
- const d = this.pluginTree.start(o.name, l, f);
4433
+ const p = this.pluginTree.start(o.name, l, f);
4420
4434
  s.once("loaded", (A, g, w) => {
4421
- this.pluginTree.stop(d, w);
4435
+ this.pluginTree.stop(p, w);
4422
4436
  });
4423
4437
  }), o.loaded)
4424
4438
  throw new Error(s.name, o.name);
@@ -4431,7 +4445,7 @@ J.prototype.after = function(t) {
4431
4445
  return this._loadRegistered();
4432
4446
  this._addPlugin(e.bind(this), {}, !0);
4433
4447
  function e(r, o, s) {
4434
- Rn.call(this, t, s);
4448
+ Nn.call(this, t, s);
4435
4449
  }
4436
4450
  return this;
4437
4451
  };
@@ -4484,7 +4498,7 @@ J.prototype.toJSON = function() {
4484
4498
  };
4485
4499
  function qr() {
4486
4500
  }
4487
- function Pn() {
4501
+ function Rn() {
4488
4502
  if (this.booted) {
4489
4503
  Ye("thenify returning null because we are already booted");
4490
4504
  return;
@@ -4495,7 +4509,7 @@ function Pn() {
4495
4509
  }
4496
4510
  return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[Kt] = !0, t(this._server)), e);
4497
4511
  }
4498
- function Rn(t, e) {
4512
+ function Nn(t, e) {
4499
4513
  const r = this._server, o = this._error;
4500
4514
  let s;
4501
4515
  if (this._error = null, t.length === 0)
@@ -4508,14 +4522,14 @@ function Rn(t, e) {
4508
4522
  };
4509
4523
  t.length === 2 ? t(o, u) : t(o, r, u);
4510
4524
  } else
4511
- Xs.call(this, t, o, r, e);
4525
+ Zs.call(this, t, o, r, e);
4512
4526
  }
4513
- function Xs(t, e, r, o) {
4527
+ function Zs(t, e, r, o) {
4514
4528
  const s = t.name;
4515
4529
  Ye("setting up ready timeout", s, this._timeout);
4516
4530
  let u = setTimeout(() => {
4517
4531
  Ye("timed out", s), u = null;
4518
- const f = new Ks(s);
4532
+ const f = new Hs(s);
4519
4533
  f.fn = t, this._error = f, o(f);
4520
4534
  }, this._timeout);
4521
4535
  t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
@@ -4523,7 +4537,7 @@ function Xs(t, e, r, o) {
4523
4537
  u && (clearTimeout(u), this._error = f, o(this._error));
4524
4538
  }
4525
4539
  }
4526
- function Zs(t, e) {
4540
+ function ea(t, e) {
4527
4541
  const r = this._server, o = t[this._isOnCloseHandlerKey];
4528
4542
  if (t.length === 0 || t.length === 1) {
4529
4543
  let s;
@@ -4534,7 +4548,7 @@ function Zs(t, e) {
4534
4548
  } else
4535
4549
  t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
4536
4550
  }
4537
- function ea(t, e) {
4551
+ function ta(t, e) {
4538
4552
  return r.bind(e);
4539
4553
  function r(o, s) {
4540
4554
  let u;
@@ -4564,11 +4578,11 @@ hr.exports.express = function(t) {
4564
4578
  }
4565
4579
  });
4566
4580
  };
4567
- var ta = hr.exports;
4568
- const ra = /* @__PURE__ */ zn(ta);
4569
- function va(t, e = !0) {
4570
- const r = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", o = ra(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4571
- return o.use(Ii), o.use(bi, { sdkKey: t, host: r }), o.use(Ei), o.use(Ai), o.use(Hi), o.use(Di), o.after(async (s, u, l) => {
4581
+ var ra = hr.exports;
4582
+ const na = /* @__PURE__ */ zn(ra);
4583
+ function Sa(t, e = !0) {
4584
+ const r = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", o = na(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4585
+ return o.use(Ii), o.use(bi, { sdkKey: t, host: r }), o.use(Ei), o.use(Ai), o.use(Wi), o.use(ji), o.after(async (s, u, l) => {
4572
4586
  if (s)
4573
4587
  throw s;
4574
4588
  console.log(u), console.log(u.sdk), console.log(typeof u.sdk), await u.sdk.initializeApp(), l();
@@ -4577,5 +4591,5 @@ function va(t, e = !0) {
4577
4591
  }), o;
4578
4592
  }
4579
4593
  export {
4580
- va as StreamLayer
4594
+ Sa as StreamLayer
4581
4595
  };