@streamlayer/sdk-web 1.10.11 → 1.10.13

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,50 +1,50 @@
1
- import { pino as Si } from "pino";
2
- import { QuestionType as E, QuestionStatus as W, PromotionType as H, SilenceSetting as wi, UseAsNotification as Ai } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
- import { PickHistoryStatus as ct } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
- import { SdkOverlayType as D } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
1
+ import { pino as vi } from "pino";
2
+ import { QuestionType as E, QuestionStatus as W, PromotionType as H, SilenceSetting as Si, UseAsNotification as wi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
+ import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
+ import { SdkOverlayType as F } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
5
5
  import { InvitationCategory as Rr, InvitationFrom as Vr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
- import { computed as Ei, map as Ii, atom as Ct, batched as $r, onMount as br } from "nanostores";
6
+ import { computed as Ai, map as Ei, atom as Ct, batched as $r, onMount as br } from "nanostores";
7
7
  import { v4 as St } from "uuid";
8
- import { ConnectError as tt, Code as ie, createContextKey as Mr, createClient as Br, createContextValues as Oi } from "@connectrpc/connect";
8
+ import { ConnectError as rt, Code as ie, createContextKey as Mr, createClient as Br, createContextValues as Ii } from "@connectrpc/connect";
9
9
  import { createGrpcWebTransport as Ur } from "@connectrpc/connect-web";
10
10
  import { nanoquery as jr } from "@nanostores/query";
11
11
  import { Events as Tn } from "@streamlayer/sl-eslib/sports/events/events_connect";
12
- import { Client as rt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
12
+ import { Client as nt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
13
13
  import { Users as vr } from "@streamlayer/sl-eslib/users/users_connect";
14
14
  import { Feed as se } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
15
15
  import { Leaderboard as kn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
16
  import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
17
- import { LinksClient as Ti } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
- import { Kind as x, TopicSubType as J, TopicType as q, PollOpenedFrom as X, Category as z, ScreenOrientation as qr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
17
+ import { LinksClient as Oi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
+ import { Kind as q, TopicSubType as J, TopicType as x, PollOpenedFrom as X, Category as z, ScreenOrientation as xr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
19
  import { AnalyticsService as _n } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
- import { InteractionActionType as xr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
20
+ import { InteractionActionType as qr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
21
  import { NotificationKind as ye, NotificationType as Qr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
- function ki(t) {
22
+ function Ti(t) {
23
23
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
24
24
  }
25
25
  var Cn = { exports: {} }, M = Cn.exports = {}, le, de;
26
- function ir() {
26
+ function nr() {
27
27
  throw new Error("setTimeout has not been defined");
28
28
  }
29
- function or() {
29
+ function ir() {
30
30
  throw new Error("clearTimeout has not been defined");
31
31
  }
32
32
  (function() {
33
33
  try {
34
- typeof setTimeout == "function" ? le = setTimeout : le = ir;
34
+ typeof setTimeout == "function" ? le = setTimeout : le = nr;
35
35
  } catch {
36
- le = ir;
36
+ le = nr;
37
37
  }
38
38
  try {
39
- typeof clearTimeout == "function" ? de = clearTimeout : de = or;
39
+ typeof clearTimeout == "function" ? de = clearTimeout : de = ir;
40
40
  } catch {
41
- de = or;
41
+ de = ir;
42
42
  }
43
43
  })();
44
44
  function Ln(t) {
45
45
  if (le === setTimeout)
46
46
  return setTimeout(t, 0);
47
- if ((le === ir || !le) && setTimeout)
47
+ if ((le === nr || !le) && setTimeout)
48
48
  return le = setTimeout, setTimeout(t, 0);
49
49
  try {
50
50
  return le(t, 0);
@@ -56,10 +56,10 @@ function Ln(t) {
56
56
  }
57
57
  }
58
58
  }
59
- function _i(t) {
59
+ function ki(t) {
60
60
  if (de === clearTimeout)
61
61
  return clearTimeout(t);
62
- if ((de === or || !de) && clearTimeout)
62
+ if ((de === ir || !de) && clearTimeout)
63
63
  return de = clearTimeout, clearTimeout(t);
64
64
  try {
65
65
  return de(t);
@@ -71,20 +71,20 @@ function _i(t) {
71
71
  }
72
72
  }
73
73
  }
74
- var Se = [], xe = !1, Ce, ft = -1;
75
- function Ci() {
76
- !xe || !Ce || (xe = !1, Ce.length ? Se = Ce.concat(Se) : ft = -1, Se.length && Pn());
74
+ var Se = [], qe = !1, Ce, pt = -1;
75
+ function _i() {
76
+ !qe || !Ce || (qe = !1, Ce.length ? Se = Ce.concat(Se) : pt = -1, Se.length && Pn());
77
77
  }
78
78
  function Pn() {
79
- if (!xe) {
80
- var t = Ln(Ci);
81
- xe = !0;
79
+ if (!qe) {
80
+ var t = Ln(_i);
81
+ qe = !0;
82
82
  for (var e = Se.length; e; ) {
83
- for (Ce = Se, Se = []; ++ft < e; )
84
- Ce && Ce[ft].run();
85
- ft = -1, e = Se.length;
83
+ for (Ce = Se, Se = []; ++pt < e; )
84
+ Ce && Ce[pt].run();
85
+ pt = -1, e = Se.length;
86
86
  }
87
- Ce = null, xe = !1, _i(t);
87
+ Ce = null, qe = !1, ki(t);
88
88
  }
89
89
  }
90
90
  M.nextTick = function(t) {
@@ -92,7 +92,7 @@ M.nextTick = function(t) {
92
92
  if (arguments.length > 1)
93
93
  for (var r = 1; r < arguments.length; r++)
94
94
  e[r - 1] = arguments[r];
95
- Se.push(new Nn(t, e)), Se.length === 1 && !xe && Ln(Pn);
95
+ Se.push(new Nn(t, e)), Se.length === 1 && !qe && Ln(Pn);
96
96
  };
97
97
  function Nn(t, e) {
98
98
  this.fun = t, this.array = e;
@@ -132,8 +132,8 @@ M.chdir = function(t) {
132
132
  M.umask = function() {
133
133
  return 0;
134
134
  };
135
- var Li = Cn.exports;
136
- const A = /* @__PURE__ */ ki(Li), Pi = Si({
135
+ var Ci = Cn.exports;
136
+ const A = /* @__PURE__ */ Ti(Ci), Li = vi({
137
137
  level: "trace",
138
138
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -141,14 +141,14 @@ const A = /* @__PURE__ */ ki(Li), Pi = Si({
141
141
  console.log(t);
142
142
  }
143
143
  }
144
- }), Ee = (t, e) => Pi.child({ name: t }, e);
145
- class Ni extends Event {
144
+ }), Ee = (t, e) => Li.child({ name: t }, e);
145
+ class Pi extends Event {
146
146
  slEventBus;
147
147
  constructor(e, r) {
148
148
  super(e), this.slEventBus = r;
149
149
  }
150
150
  }
151
- const Fi = Ee("event-bus");
151
+ const Ni = Ee("event-bus");
152
152
  class Di {
153
153
  name;
154
154
  listeners;
@@ -156,8 +156,8 @@ class Di {
156
156
  this.name = e, this.listeners = /* @__PURE__ */ new Set();
157
157
  }
158
158
  emit = (e, r) => {
159
- const n = new Ni(this.name, { ...r, type: e });
160
- Fi.debug(n, "Emitting event"), window.dispatchEvent(n);
159
+ const n = new Pi(this.name, { ...r, type: e });
160
+ Ni.debug(n, "Emitting event"), window.dispatchEvent(n);
161
161
  };
162
162
  listen(e) {
163
163
  return window.addEventListener(this.name, e), this.listeners.add(e), () => {
@@ -173,7 +173,7 @@ class Di {
173
173
  }), this.listeners.clear();
174
174
  };
175
175
  }
176
- class Ri {
176
+ class Fi {
177
177
  }
178
178
  var we;
179
179
  (function(t) {
@@ -196,9 +196,9 @@ class Lt {
196
196
  return this.store;
197
197
  }
198
198
  }
199
- const Vi = (t) => {
199
+ const Ri = (t) => {
200
200
  const e = Object.keys(t);
201
- return Ei(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
201
+ return Ai(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
202
202
  };
203
203
  class Le extends Lt {
204
204
  getValues = () => this.getStore().get();
@@ -207,22 +207,22 @@ class Le extends Lt {
207
207
  subscribe = (...e) => this.getStore().subscribe(...e);
208
208
  unsubscribe = () => this.getStore().off();
209
209
  }
210
- const ee = (t) => Ii(t);
210
+ const ee = (t) => Ei(t);
211
211
  var me;
212
212
  (function(t) {
213
213
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
214
214
  })(me || (me = {}));
215
- const $i = {
216
- [D.BETTING]: "betting",
217
- [D.GAMES]: "games",
218
- [D.PUBLIC_CHAT]: "publicChat",
219
- [D.TWITTER]: "twitter"
215
+ const Vi = {
216
+ [F.BETTING]: "betting",
217
+ [F.GAMES]: "games",
218
+ [F.PUBLIC_CHAT]: "publicChat",
219
+ [F.TWITTER]: "twitter"
220
220
  };
221
- var Xe;
221
+ var Ze;
222
222
  (function(t) {
223
223
  t.Ready = "ready", t.Suspended = "suspended";
224
- })(Xe || (Xe = {}));
225
- class Fn {
224
+ })(Ze || (Ze = {}));
225
+ class Dn {
226
226
  status;
227
227
  source;
228
228
  config;
@@ -230,7 +230,7 @@ class Fn {
230
230
  listeners = /* @__PURE__ */ new Set();
231
231
  settingsKey;
232
232
  constructor({ settings: e, ...r }, n) {
233
- this.settingsKey = $i[r.type], this.status = Ct(Xe.Suspended), this.config = new Le(ee(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(ee(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(ee({}), `feature:settings:${this.settingsKey}`), this.source = n;
233
+ this.settingsKey = Vi[r.type], this.status = Ct(Ze.Suspended), this.config = new Le(ee(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(ee(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(ee({}), `feature:settings:${this.settingsKey}`), this.source = n;
234
234
  }
235
235
  get featureConfig() {
236
236
  return this.config.getStore();
@@ -242,10 +242,10 @@ class Fn {
242
242
  this.listeners.add(e);
243
243
  }
244
244
  enable = () => {
245
- this.status.set(Xe.Ready);
245
+ this.status.set(Ze.Ready);
246
246
  };
247
247
  disable = () => {
248
- this.status.set(Xe.Suspended);
248
+ this.status.set(Ze.Suspended);
249
249
  };
250
250
  setFeatureConfig = ({ settings: e, ...r }) => {
251
251
  let n;
@@ -320,7 +320,7 @@ class oe extends Lt {
320
320
  off = () => this.getStore().off();
321
321
  }
322
322
  const K = new Di();
323
- async function* Mi(t, e) {
323
+ async function* $i(t, e) {
324
324
  for await (const r of e) {
325
325
  t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
326
326
  const n = {
@@ -330,7 +330,7 @@ async function* Mi(t, e) {
330
330
  window.postMessage(n), yield r;
331
331
  }
332
332
  }
333
- const Bi = () => (t) => async (e) => {
333
+ const Mi = () => (t) => async (e) => {
334
334
  const r = {
335
335
  id: Date.now(),
336
336
  name: e.url,
@@ -359,7 +359,7 @@ const Bi = () => (t) => async (e) => {
359
359
  };
360
360
  return window.postMessage(i), {
361
361
  ...n,
362
- message: Mi(r, n.message)
362
+ message: $i(r, n.message)
363
363
  };
364
364
  } else {
365
365
  r.response.message = n.message, r.latency = r.received_at - r.sent_at;
@@ -383,7 +383,7 @@ const Bi = () => (t) => async (e) => {
383
383
  }
384
384
  };
385
385
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
386
- function Dn(t) {
386
+ function Fn(t) {
387
387
  return t instanceof DOMException && // everything except Firefox
388
388
  (t.code === 22 || // Firefox
389
389
  t.code === 1014 || // test name field too, because code might not be present
@@ -391,7 +391,7 @@ function Dn(t) {
391
391
  t.name === "QuotaExceededError" || // Firefox
392
392
  t.name === "NS_ERROR_DOM_QUOTA_REACHED");
393
393
  }
394
- class nt {
394
+ class it {
395
395
  delimiter = ":";
396
396
  prefix;
397
397
  storage;
@@ -408,7 +408,7 @@ class nt {
408
408
  try {
409
409
  this.storage.setItem(n, r);
410
410
  } catch (i) {
411
- Dn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
411
+ Fn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
412
412
  }
413
413
  };
414
414
  read = (...e) => {
@@ -424,7 +424,7 @@ var ne;
424
424
  t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
425
425
  })(ne || (ne = {}));
426
426
  const Gr = Ee("grpc:stream");
427
- class Ui {
427
+ class Bi {
428
428
  params;
429
429
  streamCancel;
430
430
  method;
@@ -463,7 +463,7 @@ class Ui {
463
463
  window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
464
464
  ` + n);
465
465
  } catch (i) {
466
- Dn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
466
+ Fn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
467
467
  }
468
468
  }
469
469
  };
@@ -485,7 +485,7 @@ class Ui {
485
485
  for await (const o of i)
486
486
  this.attempt = 0, this.onData(o);
487
487
  } catch (n) {
488
- n instanceof tt && n.code != ie.Canceled && this.onStreamError(n);
488
+ n instanceof rt && n.code != ie.Canceled && this.onStreamError(n);
489
489
  }
490
490
  })(), this.updateState(ne.Connected);
491
491
  };
@@ -525,7 +525,7 @@ class Ui {
525
525
  */
526
526
  onStreamError = (e) => {
527
527
  if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
528
- if (e instanceof tt && e.code !== ie.Canceled) {
528
+ if (e instanceof rt && e.code !== ie.Canceled) {
529
529
  this.updateState(ne.Failed), this.state.setValue("error", e), e.code === ie.Unknown && e.cause === "missing trailer" && (this.attempt = 0), this.reconnect();
530
530
  return;
531
531
  }
@@ -533,7 +533,7 @@ class Ui {
533
533
  }
534
534
  };
535
535
  }
536
- const ji = /* @__PURE__ */ new Set([
536
+ const Ui = /* @__PURE__ */ new Set([
537
537
  ie.Unknown,
538
538
  ie.Internal,
539
539
  ie.DeadlineExceeded,
@@ -541,8 +541,8 @@ const ji = /* @__PURE__ */ new Set([
541
541
  ie.FailedPrecondition,
542
542
  ie.Unavailable,
543
543
  ie.DataLoss
544
- ]), zr = Ee("grpc:retry"), qi = (t) => async (e) => {
545
- const r = e.contextValues.get(sr.retryAttempts), n = 300, i = e.contextValues.get(sr.retryDelay);
544
+ ]), zr = Ee("grpc:retry"), ji = (t) => async (e) => {
545
+ const r = e.contextValues.get(or.retryAttempts), n = 300, i = e.contextValues.get(or.retryDelay);
546
546
  if (e.stream || r === 0)
547
547
  return t(e);
548
548
  zr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
@@ -551,13 +551,13 @@ const ji = /* @__PURE__ */ new Set([
551
551
  return await t(e);
552
552
  } catch (s) {
553
553
  zr.trace({ attempt: o, error: s, url: e.url }, "retry attempt");
554
- const a = tt.from(s);
555
- if (o >= r || !(a instanceof tt) || !ji.has(a.code))
554
+ const a = rt.from(s);
555
+ if (o >= r || !(a instanceof rt) || !Ui.has(a.code))
556
556
  throw s;
557
557
  const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
558
558
  await new Promise((c) => setTimeout(c, d));
559
559
  }
560
- }, sr = {
560
+ }, or = {
561
561
  retryAttempts: Mr(10, { description: "Number of attempts to retry" }),
562
562
  retryDelay: Mr(3e4, { description: "Max delay between retries in milliseconds" })
563
563
  }, xi = () => {
@@ -566,7 +566,7 @@ const ji = /* @__PURE__ */ new Set([
566
566
  return t;
567
567
  const e = St();
568
568
  return localStorage.setItem("sl-device-id", e), e;
569
- }, Qi = () => navigator.userAgentData?.platform || navigator.platform;
569
+ }, qi = () => navigator.userAgentData?.platform || navigator.platform;
570
570
  class Kr {
571
571
  toJsonOptions = {
572
572
  emitDefaultValues: !1,
@@ -580,6 +580,8 @@ class Kr {
580
580
  nanoquery;
581
581
  host;
582
582
  $headers;
583
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
584
+ storeCache;
583
585
  interceptors = [];
584
586
  clients;
585
587
  streamClients;
@@ -588,8 +590,8 @@ class Kr {
588
590
  constructor(e, r) {
589
591
  this.host = e, this.opts = r, this.$headers = new Le(ee({
590
592
  "sl-device-id": xi(),
591
- "sl-device-os": Qi()
592
- }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
593
+ "sl-device-os": qi()
594
+ }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map(), this.storeCache = /* @__PURE__ */ new Map();
593
595
  const [n, i, o] = jr({
594
596
  dedupeTime: r?.dedupeTime,
595
597
  refetchInterval: r?.refetchInterval
@@ -612,7 +614,7 @@ class Kr {
612
614
  const i = this.subscriptions.get(r);
613
615
  if (i)
614
616
  return i;
615
- const o = new Ui(this.$headers, e, r, n);
617
+ const o = new Bi(this.$headers, e, r, n);
616
618
  return this.subscriptions.set(r, o), o;
617
619
  };
618
620
  removeSubscription = (e) => {
@@ -657,9 +659,9 @@ class Kr {
657
659
  ...Array.isArray(r) ? r : [r]
658
660
  ], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
659
661
  return { client: i, createRequestOptions: (d) => {
660
- const c = Oi();
662
+ const c = Ii();
661
663
  for (const l in d) {
662
- const p = sr[l];
664
+ const p = or[l];
663
665
  c.set(p, d[l]);
664
666
  }
665
667
  return c;
@@ -685,10 +687,10 @@ class Kr {
685
687
  n.header.set(o, i[o]);
686
688
  return r(n);
687
689
  };
688
- this.interceptors.push(e), this.interceptors.push(Bi()), this.opts?.retryable && this.interceptors.push(qi);
690
+ this.interceptors.push(e), this.interceptors.push(Mi()), this.opts?.retryable && this.interceptors.push(ji);
689
691
  };
690
692
  }
691
- const Gi = (t, e) => {
693
+ const Qi = (t, e) => {
692
694
  const { client: r, queryKey: n } = e.createPromiseClient(Tn, {
693
695
  method: "retrieveEventId",
694
696
  params: [t]
@@ -706,22 +708,22 @@ const Gi = (t, e) => {
706
708
  }
707
709
  }
708
710
  });
709
- }, zi = (t, e) => {
710
- const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getStream", params: [t] });
711
+ }, Gi = (t, e) => {
712
+ const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getStream", params: [t] });
711
713
  return e.nanoquery.createFetcherStore(n, {
712
714
  fetcher: async (i, o, s) => s ? (await r.getStream({
713
715
  id: s
714
716
  // we are sure that id is a string
715
717
  })).data?.attributes : void 0
716
718
  });
717
- }, Ki = (t, e) => {
719
+ }, zi = (t, e) => {
718
720
  const { client: r, queryKey: n } = e.createPromiseClient(Tn, { method: "summary", params: [t] });
719
721
  return e.nanoquery.createFetcherStore(n, {
720
722
  fetcher: async (i, o, s) => s ? (await r.summary({
721
723
  id: s
722
724
  })).data?.attributes : void 0
723
725
  });
724
- }, Hi = (t, e) => {
726
+ }, Ki = (t, e) => {
725
727
  const { queryKey: r, client: n } = e.createPromiseClient(vr, { method: "me", params: [t] });
726
728
  return e.nanoquery.createFetcherStore(r, {
727
729
  fetcher: async () => {
@@ -731,16 +733,16 @@ const Gi = (t, e) => {
731
733
  return { data: o };
732
734
  }
733
735
  });
734
- }, Wi = (t) => {
736
+ }, Hi = (t) => {
735
737
  const { client: e, createRequestOptions: r } = t.createPromiseClient(vr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
736
738
  return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
737
- }, Yi = (t, e) => {
738
- const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "get", params: [t] });
739
+ }, Wi = (t, e) => {
740
+ const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "get", params: [t] });
739
741
  return e.nanoquery.createFetcherStore(n, {
740
742
  fetcher: async () => (await r.get({})).data?.attributes
741
743
  });
742
- }, Ji = (t, e) => {
743
- const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getOrganization", params: [t] });
744
+ }, Yi = (t, e) => {
745
+ const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getOrganization", params: [t] });
744
746
  return e.nanoquery.createFetcherStore(n, {
745
747
  fetcher: async () => {
746
748
  const i = await r.getOrganization({});
@@ -750,15 +752,15 @@ const Gi = (t, e) => {
750
752
  } : void 0;
751
753
  }
752
754
  });
753
- }, Xi = (t, e) => {
754
- const { client: r, queryKey: n } = e.createPromiseClient(rt, {
755
+ }, Ji = (t, e) => {
756
+ const { client: r, queryKey: n } = e.createPromiseClient(nt, {
755
757
  method: "getOrganizationAdvertising",
756
758
  params: [t]
757
759
  });
758
760
  return e.nanoquery.createFetcherStore(n, {
759
761
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
760
762
  });
761
- }, Zi = (t, e, r) => {
763
+ }, Xi = (t, e, r) => {
762
764
  t.transport = new Kr(e.host, {
763
765
  dedupeTime: 1e3 * 60 * 5,
764
766
  refetchInterval: 1e3 * 60 * 5,
@@ -773,7 +775,7 @@ var ge;
773
775
  (function(t) {
774
776
  t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
775
777
  })(ge || (ge = {}));
776
- class je extends nt {
778
+ class je extends it {
777
779
  constructor() {
778
780
  super("user");
779
781
  }
@@ -800,19 +802,19 @@ var be;
800
802
  (function(t) {
801
803
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
802
804
  })(be || (be = {}));
803
- const eo = (t) => {
804
- const e = new je(), r = new te(B(e.getExternalToken()), "userKey"), n = new te(B(e.getToken()), "userToken"), i = new oe(Hi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
805
+ const Zi = (t) => {
806
+ const e = new je(), r = new te(B(e.getExternalToken()), "userKey"), n = new te(B(e.getToken()), "userToken"), i = new oe(Ki(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
805
807
  if (!a)
806
808
  return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
807
- }), o = new oe(Yi(n.getStore(), t), "userSettings");
809
+ }), o = new oe(Wi(n.getStore(), t), "userSettings");
808
810
  return {
809
811
  userKey: r,
810
812
  userToken: n,
811
813
  user: i,
812
814
  userSettings: o
813
815
  };
814
- }, to = (t) => {
815
- const e = new te(B(void 0), "providerStreamId"), r = new oe(Gi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new oe(zi(r.getAtomStore(), t), "streamSettings"), i = new oe(Ki(r.getAtomStore(), t), "streamSettings");
816
+ }, eo = (t) => {
817
+ const e = new te(B(void 0), "providerStreamId"), r = new oe(Qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new oe(Gi(r.getAtomStore(), t), "streamSettings"), i = new oe(zi(r.getAtomStore(), t), "streamSettings");
816
818
  return r.getAtomStore().listen((o) => {
817
819
  (o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
818
820
  }), {
@@ -821,8 +823,8 @@ const eo = (t) => {
821
823
  streamSettings: n,
822
824
  streamSummary: i
823
825
  };
824
- }, ro = (t) => {
825
- const e = new te(B(void 0), "enabled"), r = new te(B(be.DISABLED), "status"), n = new oe(Ji(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new oe(Xi(n.getAtomStore(), t), "organizationAdvertising"), o = eo(t), s = to(t);
826
+ }, to = (t) => {
827
+ const e = new te(B(void 0), "enabled"), r = new te(B(be.DISABLED), "status"), n = new oe(Yi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new oe(Ji(n.getAtomStore(), t), "organizationAdvertising"), o = Zi(t), s = eo(t);
826
828
  return {
827
829
  enabled: e,
828
830
  status: r,
@@ -838,10 +840,10 @@ const eo = (t) => {
838
840
  organizationAdvertising: i
839
841
  };
840
842
  };
841
- class no extends Lt {
843
+ class ro extends Lt {
842
844
  stores;
843
845
  constructor(e) {
844
- const r = ro(e), n = Vi(r);
846
+ const r = to(e), n = Ri(r);
845
847
  super(n, "core"), this.stores = r;
846
848
  }
847
849
  getValue() {
@@ -862,17 +864,17 @@ class no extends Lt {
862
864
  };
863
865
  unsubscribe = () => this.getStore().off();
864
866
  }
865
- const io = (t, e, r) => {
866
- t.store = new no(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
867
+ const no = (t, e, r) => {
868
+ t.store = new ro(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
867
869
  t.store.unsubscribe();
868
870
  }, r();
869
- }, oo = (t) => {
871
+ }, io = (t) => {
870
872
  const { client: e } = t.createPromiseClient(kn, { method: "list" });
871
873
  return (r) => e.list(r);
872
874
  }, Rn = (t) => {
873
875
  const { client: e } = t.createPromiseClient(kn, { method: "summary" });
874
876
  return (r) => e.summary(r);
875
- }, so = (t, e) => {
877
+ }, oo = (t, e) => {
876
878
  const { client: r, queryKey: n } = e.createPromiseClient(vr, {
877
879
  method: "getFriends",
878
880
  params: [t]
@@ -888,7 +890,7 @@ const io = (t, e, r) => {
888
890
  }
889
891
  }
890
892
  });
891
- }, ao = (t, e) => {
893
+ }, so = (t, e) => {
892
894
  const { client: r, queryKey: n } = e.createPromiseClient(se, { method: "get", params: [t] });
893
895
  return e.nanoquery.createFetcherStore(n, {
894
896
  fetcher: async (i, o, s) => (await r.get({
@@ -897,7 +899,7 @@ const io = (t, e, r) => {
897
899
  refetchInterval: 1 / 0,
898
900
  dedupeTime: 1e3 * 60 * 60
899
901
  });
900
- }, uo = (t, e, r) => {
902
+ }, ao = (t, e, r) => {
901
903
  const { client: n, queryKey: i } = r.createPromiseClient(se, {
902
904
  method: "syncQuestion",
903
905
  params: [t, e ? "true" : ""]
@@ -918,42 +920,43 @@ const io = (t, e, r) => {
918
920
  // 10 minutes
919
921
  refetchInterval: 1 / 0
920
922
  });
921
- }, co = async (t, e) => {
923
+ }, uo = async (t, e) => {
922
924
  const { client: r } = e.createPromiseClient(se, { method: "item", params: [t] });
923
925
  return (await r.item({
924
926
  id: t
925
927
  })).data;
926
- }, lo = (t, e) => {
928
+ }, co = (t, e) => {
927
929
  const { client: r } = e.createStreamClient(se), n = Ct({ eventId: t.get() || "", feedId: "" });
928
930
  return t.subscribe((o = "") => {
929
931
  n.set({ eventId: o, feedId: "" });
930
932
  }), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
931
- }, fo = (t, e) => {
933
+ }, lo = (t, e) => {
932
934
  const { client: r } = e.createStreamClient(se);
933
935
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
934
- }, Vn = async (t, e) => {
936
+ }, sr = async (t, e) => {
935
937
  const { client: r } = e.createPromiseClient(se, { method: "questionByUser", params: [t] });
936
938
  return (await r.questionByUser({
937
939
  questionId: t
938
940
  })).data?.attributes?.question;
939
- }, Ut = /* @__PURE__ */ new Map(), pt = (t, e) => {
941
+ }, Xe = (t, e) => {
940
942
  const { client: r, queryKey: n, queryKeyStr: i } = e.createPromiseClient(se, {
941
943
  method: "questionByUser",
942
944
  params: [t]
943
945
  });
944
- if (Ut.has(i))
945
- return Ut.get(i);
946
+ let o = i;
947
+ if (typeof t != "object" ? o += t : o += "atom", e.storeCache.has(o))
948
+ return e.storeCache.get(o);
946
949
  {
947
- const o = e.nanoquery.createFetcherStore(n, {
948
- fetcher: async (s, a, u) => (await r.questionByUser({
949
- questionId: u
950
+ const s = e.nanoquery.createFetcherStore(n, {
951
+ fetcher: async (a, u, d) => (await r.questionByUser({
952
+ questionId: d
950
953
  })).data?.attributes?.question,
951
954
  dedupeTime: 1 / 0,
952
955
  refetchInterval: 1 / 0
953
956
  });
954
- return Ut.set(i, o), o;
957
+ return e.storeCache.set(o, s), s;
955
958
  }
956
- }, po = (t, e, r, n, i, o, s) => {
959
+ }, fo = (t, e, r, n, i, o, s) => {
957
960
  const { client: a, queryKey: u } = s.createPromiseClient(se, {
958
961
  method: "list",
959
962
  params: [t, e, o ? "true" : ""]
@@ -986,7 +989,7 @@ const io = (t, e, r) => {
986
989
  dedupeTime: 1 / 0,
987
990
  refetchInterval: 1 / 0
988
991
  });
989
- }, ho = (t, e, r, n, i) => {
992
+ }, po = (t, e, r, n, i) => {
990
993
  const { client: o, queryKey: s } = i.createPromiseClient(se, {
991
994
  method: "betPack",
992
995
  params: [t, e, r]
@@ -1035,14 +1038,14 @@ const io = (t, e, r) => {
1035
1038
  dedupeTime: 1 / 0,
1036
1039
  refetchInterval: 1 / 0
1037
1040
  });
1038
- }, yo = (t, e, r) => {
1041
+ }, ho = (t, e, r) => {
1039
1042
  const n = $r([e, r], () => {
1040
1043
  const a = e.get();
1041
1044
  if (!a)
1042
1045
  return;
1043
1046
  const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
1044
1047
  return u ? (u.openedFrom = d, u) : a.question;
1045
- }), i = $r(n, (a) => a && a.type === "question" ? a.id : void 0), o = pt(i, t);
1048
+ }), i = $r(n, (a) => a && a.type === "question" ? a.id : void 0), o = Xe(i, t);
1046
1049
  return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
1047
1050
  const u = o.get().data, d = (c, l) => {
1048
1051
  if (!c || !l)
@@ -1071,7 +1074,7 @@ var ce;
1071
1074
  (function(t) {
1072
1075
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.QUESTION_RECEIVED = "q-received", t.QUESTION_OPENED = "q-opened";
1073
1076
  })(ce || (ce = {}));
1074
- class go extends nt {
1077
+ class yo extends it {
1075
1078
  constructor() {
1076
1079
  super("gamification-session", window.sessionStorage);
1077
1080
  }
@@ -1080,10 +1083,10 @@ class go extends nt {
1080
1083
  };
1081
1084
  readValue = (e) => this.read(...e);
1082
1085
  }
1083
- class mo extends nt {
1086
+ class go extends it {
1084
1087
  sessionStorage;
1085
1088
  constructor() {
1086
- super("gamification"), this.sessionStorage = new go();
1089
+ super("gamification"), this.sessionStorage = new yo();
1087
1090
  }
1088
1091
  saveQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => {
1089
1092
  this.write(ce.QUESTION_RECEIVED, n, e, r, i, "1");
@@ -1106,7 +1109,7 @@ var Oe;
1106
1109
  (function(t) {
1107
1110
  t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
1108
1111
  })(Oe || (Oe = {}));
1109
- class bo {
1112
+ class mo {
1110
1113
  /** sl event id */
1111
1114
  slStreamId;
1112
1115
  /** organization id */
@@ -1141,12 +1144,12 @@ class bo {
1141
1144
  transport;
1142
1145
  cancels = /* @__PURE__ */ new Set();
1143
1146
  constructor(e) {
1144
- this.transport = e.transport, this.log = Ee("gamification-background"), this.storage = new mo(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new te(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new te(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new te(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new oe(ao(this.slStreamId, e.transport), "gamification:moderation");
1147
+ this.transport = e.transport, this.log = Ee("gamification-background"), this.storage = new go(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new te(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new te(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new te(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new oe(so(this.slStreamId, e.transport), "gamification:moderation");
1145
1148
  const r = !!e.sdk.options.get().betPack;
1146
- this.feedList = new oe(po(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new oe(ho(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = uo(this.slStreamId, r, e.transport), this.openedQuestion = yo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
1147
- this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription = fo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
1149
+ this.feedList = new oe(fo(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new oe(po(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = ao(this.slStreamId, r, e.transport), this.openedQuestion = ho(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
1150
+ this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription = lo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
1148
1151
  const o = i.data?.attributes?.question;
1149
- if (this.openedQuestion.updateExtendedQuestion(o), o?.type === E.PREDICTION && (o.status === W.ACTIVE || o.status === W.RESOLVED)) {
1152
+ if (this.openedQuestion.updateExtendedQuestion(o), this.betPack && o?.type === E.PREDICTION && (o.status === W.ACTIVE || o.status === W.RESOLVED)) {
1150
1153
  const s = this.betPack.getValues().data?.data || {}, a = s?.[o.id];
1151
1154
  if (a) {
1152
1155
  const u = [], d = a.answers.sort((l, p) => l.id > p.id ? 1 : -1), c = o.answers.sort((l, p) => l.id > p.id ? 1 : -1);
@@ -1175,9 +1178,9 @@ class bo {
1175
1178
  }
1176
1179
  }
1177
1180
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1178
- })), this.feedSubscription = lo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
1181
+ })), this.feedSubscription = co(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
1179
1182
  const i = n.data?.attributes?.question;
1180
- if (i?.type === E.PREDICTION && (i.status === W.ACTIVE || i.status === W.RESOLVED)) {
1183
+ if (this.betPack && i?.type === E.PREDICTION && (i.status === W.ACTIVE || i.status === W.RESOLVED)) {
1181
1184
  const o = this.betPack.getValues().data?.data || {}, s = o?.[i.id];
1182
1185
  if (s)
1183
1186
  this.betPack.getStore().mutate({
@@ -1194,7 +1197,7 @@ class bo {
1194
1197
  }
1195
1198
  });
1196
1199
  else if (!s && Object.keys(o).length < 5) {
1197
- const a = await Vn(i.id, this.transport);
1200
+ const a = await sr(i.id, this.transport);
1198
1201
  this.betPack.getStore().mutate({
1199
1202
  timestamp: Date.now(),
1200
1203
  data: {
@@ -1277,7 +1280,7 @@ class bo {
1277
1280
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1278
1281
  };
1279
1282
  }
1280
- class vo {
1283
+ class bo {
1281
1284
  notificationsList;
1282
1285
  store;
1283
1286
  timeouts;
@@ -1377,7 +1380,7 @@ var wt;
1377
1380
  (function(t) {
1378
1381
  t.OPENED = "opened";
1379
1382
  })(wt || (wt = {}));
1380
- class So extends nt {
1383
+ class vo extends it {
1381
1384
  constructor() {
1382
1385
  super("notification");
1383
1386
  }
@@ -1389,11 +1392,11 @@ class So extends nt {
1389
1392
  this.clear();
1390
1393
  };
1391
1394
  }
1392
- class wo {
1395
+ class So {
1393
1396
  queue;
1394
1397
  storage;
1395
1398
  constructor(e = {}) {
1396
- this.storage = new So(), this.queue = new vo({ concurrency: 1, animationDelay: 1600, ...e });
1399
+ this.storage = new vo(), this.queue = new bo({ concurrency: 1, animationDelay: 1600, ...e });
1397
1400
  }
1398
1401
  isViewed = (e) => this.storage.isOpened(e);
1399
1402
  add = (e) => {
@@ -1430,8 +1433,8 @@ class wo {
1430
1433
  this.storage.setOpened(e);
1431
1434
  };
1432
1435
  }
1433
- const Ao = (t, e, r) => {
1434
- t.notifications = new wo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1436
+ const wo = (t, e, r) => {
1437
+ t.notifications = new So(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1435
1438
  t.notifications.queue.drain();
1436
1439
  }), r();
1437
1440
  };
@@ -1444,22 +1447,22 @@ const Hr = async (t, e) => {
1444
1447
  try {
1445
1448
  return await r.submitAnswer({ data: e }, { contextValues: i });
1446
1449
  } catch (o) {
1447
- throw tt.from(o)?.code === ie.AlreadyExists ? new Error(ze.ALREADY_VOTED) : new Error(ze.UNKNOWN);
1450
+ throw rt.from(o)?.code === ie.AlreadyExists ? new Error(ze.ALREADY_VOTED) : new Error(ze.UNKNOWN);
1448
1451
  }
1449
- }, $n = (t, e) => {
1452
+ }, Vn = (t, e) => {
1450
1453
  const { client: r, createRequestOptions: n } = t.createPromiseClient(se, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1451
1454
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1452
- }, Eo = {
1455
+ }, Ao = {
1453
1456
  pageSize: 10
1454
- }, Io = (t, e, r, n, i) => {
1457
+ }, Eo = (t, e, r, n, i) => {
1455
1458
  let o = 0;
1456
- const s = B({ pageSize: Eo.pageSize, page: 0 }), a = ee({
1459
+ const s = B({ pageSize: Ao.pageSize, page: 0 }), a = ee({
1457
1460
  data: [],
1458
1461
  key: Date.now(),
1459
1462
  hasMore: !0,
1460
1463
  loading: void 0,
1461
1464
  error: void 0
1462
- }), u = oo(t), d = async () => {
1465
+ }), u = io(t), d = async () => {
1463
1466
  const p = e.get(), b = n?.getStore().get().data?.map((S) => S.slId) || [];
1464
1467
  if (p && b?.length) {
1465
1468
  const S = r.get();
@@ -1491,7 +1494,7 @@ const Hr = async (t, e) => {
1491
1494
  };
1492
1495
  }), { $store: a, fetchMore: l, invalidate: c };
1493
1496
  };
1494
- class Oo extends nt {
1497
+ class Io extends it {
1495
1498
  get = this.read;
1496
1499
  set = this.write;
1497
1500
  del = this.remove;
@@ -1499,12 +1502,12 @@ class Oo extends nt {
1499
1502
  super("deep-link-context", window.sessionStorage);
1500
1503
  }
1501
1504
  }
1502
- const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /* @__PURE__ */ new Set([Pt, Mn, Bn]), Yr = (t) => {
1505
+ const Wr = "sldl", Pt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", Oo = /* @__PURE__ */ new Set([Pt, $n, Mn]), Yr = (t) => {
1503
1506
  const e = {}, r = {};
1504
1507
  for (const [n, i] of t)
1505
- To.has(n) ? e[n] = i : r[n] = i;
1508
+ Oo.has(n) ? e[n] = i : r[n] = i;
1506
1509
  return { result: e, remain: r };
1507
- }, ko = ({ hash: t, search: e }) => {
1510
+ }, To = ({ hash: t, search: e }) => {
1508
1511
  if (t && t.includes(Wr)) {
1509
1512
  const r = new URLSearchParams(t.substr(1));
1510
1513
  return { hash: Yr(r) };
@@ -1521,10 +1524,10 @@ const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /*
1521
1524
  trace: (...t) => {
1522
1525
  Jr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1523
1526
  }
1524
- }, _o = (t, e) => {
1527
+ }, ko = (t, e) => {
1525
1528
  const { hash: r, search: n } = window.location;
1526
1529
  if (fe.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1527
- const i = ko({ hash: r, search: n });
1530
+ const i = To({ hash: r, search: n });
1528
1531
  if (fe.debug(i, "parse deep link result"), i) {
1529
1532
  const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
1530
1533
  if (Object.keys(a).length !== 0) {
@@ -1543,8 +1546,8 @@ const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /*
1543
1546
  }
1544
1547
  }
1545
1548
  t.setValue("parsed", !0);
1546
- }, Co = (t, e, r) => {
1547
- const n = new Oo(), i = n.get("sl-deep-link-store");
1549
+ }, _o = (t, e, r) => {
1550
+ const n = new Io(), i = n.get("sl-deep-link-store");
1548
1551
  let o = {};
1549
1552
  if (i)
1550
1553
  try {
@@ -1582,15 +1585,15 @@ const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /*
1582
1585
  console.error(d);
1583
1586
  }
1584
1587
  };
1585
- _o(t.deepLink.$store, s), r();
1586
- }, Lo = Ee("bypass");
1587
- class Po extends Ri {
1588
+ ko(t.deepLink.$store, s), r();
1589
+ }, Co = Ee("bypass");
1590
+ class Lo extends Fi {
1588
1591
  $coreStore;
1589
1592
  deepLink;
1590
1593
  transport;
1591
1594
  bypassLogin;
1592
1595
  constructor(e, r, n) {
1593
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Wi(this.transport), this.connect();
1596
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Hi(this.transport), this.connect();
1594
1597
  }
1595
1598
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1596
1599
  /**
@@ -1602,7 +1605,7 @@ class Po extends Ri {
1602
1605
  login = async (e, r) => {
1603
1606
  this.$coreStore.getValues().userKey.setValue(r);
1604
1607
  const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
1605
- Lo.debug({ inviterKey: o }, "login with inviterKey");
1608
+ Co.debug({ inviterKey: o }, "login with inviterKey");
1606
1609
  const s = await this.bypassLogin({
1607
1610
  schema: e,
1608
1611
  userKey: r,
@@ -1672,8 +1675,8 @@ class Po extends Ri {
1672
1675
  });
1673
1676
  };
1674
1677
  }
1675
- const Je = new je(), No = (t, e, r) => {
1676
- t.auth = new Po(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1678
+ const Je = new je(), Po = (t, e, r) => {
1679
+ t.auth = new Lo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1677
1680
  n === be.READY && t.auth.reLogin();
1678
1681
  }), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
1679
1682
  if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
@@ -1685,24 +1688,24 @@ const Je = new je(), No = (t, e, r) => {
1685
1688
  }, t.sdk.logout = () => {
1686
1689
  t.auth.logout(), Je.clear();
1687
1690
  }, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
1688
- }, Xr = Ee("video_player"), lt = {
1691
+ }, Xr = Ee("video_player"), dt = {
1689
1692
  debug: (...t) => {
1690
1693
  Xr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1691
1694
  },
1692
1695
  trace: (...t) => {
1693
1696
  Xr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1694
1697
  }
1695
- }, Fo = (t, e, r) => {
1698
+ }, No = (t, e, r) => {
1696
1699
  t.videoPlayer = {
1697
1700
  controllers: /* @__PURE__ */ new Set()
1698
1701
  }, t.sdk.addVideoPlayerController = (n) => {
1699
- lt.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
1702
+ dt.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
1700
1703
  }, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
1701
- lt.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
1704
+ dt.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
1702
1705
  }, t.sdk.controlVideoPlayer = (n) => {
1703
- lt.trace("controlling video player");
1706
+ dt.trace("controlling video player");
1704
1707
  for (const i of t.videoPlayer.controllers) {
1705
- lt.trace("calling video player controller");
1708
+ dt.trace("calling video player controller");
1706
1709
  try {
1707
1710
  i(n);
1708
1711
  } catch (o) {
@@ -1716,7 +1719,7 @@ const Je = new je(), No = (t, e, r) => {
1716
1719
  [E.TRIVIA]: "trivia",
1717
1720
  [E.PREDICTION]: "prediction",
1718
1721
  [E.TWEET]: "tweet"
1719
- }, Ro = (t, e, r) => {
1722
+ }, Fo = (t, e, r) => {
1720
1723
  t.sdk.uiState = ee({}), t.ui = {
1721
1724
  enableAppNotification: function() {
1722
1725
  t.sdk.uiState.setKey("appNotification", !0);
@@ -1850,7 +1853,7 @@ const Je = new je(), No = (t, e, r) => {
1850
1853
  o(), s();
1851
1854
  };
1852
1855
  }), r();
1853
- }, Vo = (t, e, r) => {
1856
+ }, Ro = (t, e, r) => {
1854
1857
  const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1855
1858
  t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = ee(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
1856
1859
  if (i.has(s)) {
@@ -1877,8 +1880,8 @@ const Je = new je(), No = (t, e, r) => {
1877
1880
  }, t.sdk.createEventSession = (s, a) => {
1878
1881
  a ? t.stores.slStreamId.getStore().set({ loading: !1, data: s }) : t.stores.providerStreamId.setValue(s);
1879
1882
  }, r();
1880
- }, $o = (t, e) => {
1881
- const { client: r, queryKey: n } = t.createPromiseClient(rt, {
1883
+ }, Vo = (t, e) => {
1884
+ const { client: r, queryKey: n } = t.createPromiseClient(nt, {
1882
1885
  method: "generateDeepLink",
1883
1886
  params: e
1884
1887
  });
@@ -1898,21 +1901,21 @@ const Je = new je(), No = (t, e, r) => {
1898
1901
  // 24 hours
1899
1902
  refetchInterval: 1 / 0
1900
1903
  });
1901
- }, Mo = (t, { web: e, mobile: r }) => {
1902
- const { client: n } = t.createPromiseClient(Ti, { method: "generate" });
1904
+ }, $o = (t, { web: e, mobile: r }) => {
1905
+ const { client: n } = t.createPromiseClient(Oi, { method: "generate" });
1903
1906
  return n.generate({ web: e, mobile: r });
1904
1907
  }, Zr = (t, e) => {
1905
1908
  const r = new URLSearchParams(t);
1906
1909
  for (const [n, i] of Object.entries(e))
1907
1910
  r.append(n, i);
1908
1911
  return r.toString();
1909
- }, Bo = (t, e, r, n) => {
1912
+ }, Mo = (t, e, r, n) => {
1910
1913
  const i = ee({});
1911
- return br(i, () => $o(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
1914
+ return br(i, () => Vo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
1912
1915
  const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", l = e.get() || "", p = r.get() || "", b = {
1913
1916
  [Pt]: c,
1914
- [Mn]: l,
1915
- [Bn]: p
1917
+ [$n]: l,
1918
+ [Mn]: p
1916
1919
  };
1917
1920
  if (!u && d) {
1918
1921
  i.setKey("loading", !0);
@@ -1920,7 +1923,7 @@ const Je = new je(), No = (t, e, r) => {
1920
1923
  S && m || m ? S = `?${Zr(S, b)}` : m = `#${Zr("", b)}`;
1921
1924
  const v = window.location.origin + window.location.pathname + S + m;
1922
1925
  try {
1923
- const k = await Mo(t, { web: v, mobile: d });
1926
+ const k = await $o(t, { web: v, mobile: d });
1924
1927
  i.set({
1925
1928
  data: k.data?.link,
1926
1929
  loading: !1
@@ -1940,7 +1943,7 @@ var $;
1940
1943
  (function(t) {
1941
1944
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
1942
1945
  })($ || ($ = {}));
1943
- const Uo = (t, e, r, n) => {
1946
+ const Bo = (t, e, r, n) => {
1944
1947
  const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
1945
1948
  i && r.add({
1946
1949
  type: we.ONBOARDING,
@@ -1964,7 +1967,7 @@ const Uo = (t, e, r, n) => {
1964
1967
  }
1965
1968
  }
1966
1969
  });
1967
- }, dt = (t, e, r, n, i, o, s, a) => {
1970
+ }, ft = (t, e, r, n, i, o, s, a) => {
1968
1971
  try {
1969
1972
  const u = e.userId.get(), d = e.organizationId.get(), c = e.slStreamId.get();
1970
1973
  if (!u || !d || !c)
@@ -1982,7 +1985,7 @@ const Uo = (t, e, r, n) => {
1982
1985
  organizationId: d,
1983
1986
  userId: u,
1984
1987
  eventId: c
1985
- }, $.Completed), $n(s, c));
1988
+ }, $.Completed), Vn(s, c));
1986
1989
  return;
1987
1990
  }
1988
1991
  const p = e.moderation.getStore().value?.data, b = r.featureSettings.get().inplayGame;
@@ -1997,7 +2000,7 @@ const Uo = (t, e, r, n) => {
1997
2000
  let o = !!i?.skipOnboarding;
1998
2001
  const s = e.storage, a = B($.Unset);
1999
2002
  a.subscribe((c) => {
2000
- c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (Uo(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === $.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
2003
+ c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (Bo(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === $.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
2001
2004
  userId: e.userId.get() || "",
2002
2005
  organizationId: e.organizationId.get() || "",
2003
2006
  eventId: e.slStreamId.get() || ""
@@ -2005,15 +2008,15 @@ const Uo = (t, e, r, n) => {
2005
2008
  });
2006
2009
  const u = [];
2007
2010
  return a.get() !== $.Completed && (u.push(e.userId.listen((c) => {
2008
- c && dt(a, e, t, n, s, u, r, i);
2011
+ c && ft(a, e, t, n, s, u, r, i);
2009
2012
  })), u.push(e.moderation.listen((c) => {
2010
- c.data && dt(a, e, t, n, s, u, r, i);
2013
+ c.data && ft(a, e, t, n, s, u, r, i);
2011
2014
  })), u.push(t.featureSettings.listen((c) => {
2012
- c && dt(a, e, t, n, s, u, r, i);
2013
- }))), dt(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
2015
+ c && ft(a, e, t, n, s, u, r, i);
2016
+ }))), ft(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
2014
2017
  const c = e.slStreamId.get();
2015
2018
  if (c) {
2016
- await $n(r, c), a.set($.Completed), s.saveOnboardingStatus({
2019
+ await Vn(r, c), a.set($.Completed), s.saveOnboardingStatus({
2017
2020
  organizationId: e.organizationId.get() || "",
2018
2021
  userId: e.userId.get() || "",
2019
2022
  eventId: c
@@ -2025,7 +2028,7 @@ const Uo = (t, e, r, n) => {
2025
2028
  n.close(l);
2026
2029
  }
2027
2030
  } };
2028
- }, jo = (t, e, r, n) => {
2031
+ }, Uo = (t, e, r, n) => {
2029
2032
  const i = ee(void 0), o = Rn(n), s = async () => {
2030
2033
  const u = t.get(), d = e.get(), c = r ? r.getStore().get().data?.map((b) => b.slId) : [];
2031
2034
  if (!c || !u || !d)
@@ -2046,7 +2049,7 @@ const Uo = (t, e, r, n) => {
2046
2049
  u(), d?.(), c();
2047
2050
  };
2048
2051
  }), { $store: i, invalidate: a };
2049
- }, qo = async (t, e, r, n, i) => {
2052
+ }, jo = async (t, e, r, n, i) => {
2050
2053
  const o = Rn(i), s = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], d = {
2051
2054
  eventId: s,
2052
2055
  userId: n,
@@ -2054,7 +2057,7 @@ const Uo = (t, e, r, n) => {
2054
2057
  };
2055
2058
  return (await o(d)).data?.attributes?.summary;
2056
2059
  }, tn = /* @__PURE__ */ new Set([E.POLL, E.PREDICTION, E.TRIVIA]);
2057
- class xo extends Fn {
2060
+ class xo extends Dn {
2058
2061
  /** user statistics (leaderboard panel) */
2059
2062
  userSummary;
2060
2063
  /** feed list (pick history) */
@@ -2095,9 +2098,9 @@ class xo extends Fn {
2095
2098
  cancels = /* @__PURE__ */ new Set();
2096
2099
  onQuestionActivate;
2097
2100
  constructor(e, r, n) {
2098
- if (super(e, r), this.background = new bo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = B(!n.sdk.withAuth), this.leaderboardId = new te(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Bo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = jo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
2099
- this.friends = new oe(so(this.background.userId, n.transport), "gamification:friends"), this.openedUser = B(void 0);
2100
- const i = this.leaderboardList = Io(this.transport, this.background.slStreamId, this.background.userId, this.friends);
2101
+ if (super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = B(!n.sdk.withAuth), this.leaderboardId = new te(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(F.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Mo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Uo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
2102
+ this.friends = new oe(oo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = B(void 0);
2103
+ const i = this.leaderboardList = Eo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
2101
2104
  this.cancels.add(this.userSummary.$store.listen((o, s) => {
2102
2105
  s?.summary && o?.summary && i.invalidate();
2103
2106
  }));
@@ -2143,17 +2146,17 @@ class xo extends Fn {
2143
2146
  prefix: `notification-id:${s}`
2144
2147
  }), d = [...this.feedList.getValues().data || []], c = d.findIndex((G) => G.id === s), l = d[c];
2145
2148
  let p = l?.attributes?.attributes?.value?.answerId;
2146
- const b = pt(s, this.transport), S = b.subscribe(() => {
2149
+ const b = Xe(s, this.transport), S = b.subscribe(() => {
2147
2150
  });
2148
2151
  await b.get().promise;
2149
2152
  let m = b.get().data;
2150
- m || (m = await Vn(s, this.transport), b.mutate(m)), S(), window.requestAnimationFrame(() => {
2153
+ m || (m = await sr(s, this.transport), b.mutate(m)), S(), window.requestAnimationFrame(() => {
2151
2154
  b.invalidate();
2152
2155
  }), p || (p = m?.answers.find(({ youVoted: G }) => G)?.id);
2153
2156
  const v = a.find(({ correct: G }) => G), k = p ? a.find(({ id: G }) => G === p) : void 0, V = !!k?.correct;
2154
2157
  if (l && d[c]?.attributes?.attributes.case === "question") {
2155
2158
  try {
2156
- d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = V ? ct.WON : ct.LOST);
2159
+ d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = V ? lt.WON : lt.LOST);
2157
2160
  } catch {
2158
2161
  }
2159
2162
  this.feedList.getStore().mutate(d);
@@ -2251,11 +2254,13 @@ class xo extends Fn {
2251
2254
  this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
2252
2255
  };
2253
2256
  betPackVote = async (e, r) => {
2257
+ if (!this.betPack)
2258
+ return;
2254
2259
  try {
2255
2260
  await Hr(this.transport, { questionId: e, answerId: r });
2256
2261
  } catch (o) {
2257
2262
  if (o.message === ze.ALREADY_VOTED) {
2258
- const s = pt(e, this.transport), a = s.subscribe(() => {
2263
+ const s = Xe(e, this.transport), a = s.subscribe(() => {
2259
2264
  });
2260
2265
  s.invalidate(), a();
2261
2266
  }
@@ -2274,7 +2279,7 @@ class xo extends Fn {
2274
2279
  } : o), this.betPack.getStore().mutate({ data: n, timestamp: Date.now() }));
2275
2280
  };
2276
2281
  submitAnswer = async (e, r) => {
2277
- const n = pt(e, this.transport), i = n.subscribe(() => {
2282
+ const n = Xe(e, this.transport), i = n.subscribe(() => {
2278
2283
  }), o = { ...n.get().data || {} }, s = () => {
2279
2284
  const a = this.feedList.getValues().data;
2280
2285
  if (!a)
@@ -2291,7 +2296,7 @@ class xo extends Fn {
2291
2296
  const l = n.get().data;
2292
2297
  if (i(), l) {
2293
2298
  const p = l.answers.find((v) => v.correct === !0), b = l.answers.findIndex((v) => v.id === r), S = l.answers[b], m = l.answers.every(({ percentageDecimal: v }, k) => v === o?.answers[k].percentageDecimal);
2294
- a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = S?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ct.WON : ct.LOST), this.feedList.getStore().mutate([...a]), l.answers[b].correct = p?.id === r, l.answers[b].youVoted = !0, m && l.answers.forEach((v) => {
2299
+ a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = S?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? lt.WON : lt.LOST), this.feedList.getStore().mutate([...a]), l.answers[b].correct = p?.id === r, l.answers[b].youVoted = !0, m && l.answers.forEach((v) => {
2295
2300
  v.percentageDecimal = 0;
2296
2301
  }), p?.id === r && (l.answers[b].pointsEarned = l.status === W.RESOLVED ? 0 : p.points), n.mutate({ ...l });
2297
2302
  }
@@ -2324,7 +2329,12 @@ class xo extends Fn {
2324
2329
  animateHiding: !1
2325
2330
  });
2326
2331
  let i = r?.attributes?.type;
2327
- !i && !n && (i = (this.feedList.getStore().value?.data || []).find((a) => a.id === e)?.attributes?.type);
2332
+ if (!i && !n && (i = (this.feedList.getStore().value?.data || []).find((a) => a.id === e)?.attributes?.type), !n && (i === E.POLL || i === E.TRIVIA || i === E.PREDICTION)) {
2333
+ const s = Xe(e, this.transport);
2334
+ sr(e, this.transport).then((a) => {
2335
+ s.mutate(a);
2336
+ });
2337
+ }
2328
2338
  const o = {
2329
2339
  eventId: this.background.slStreamId.get() || "",
2330
2340
  userId: this.background.userId.get() || "",
@@ -2342,7 +2352,7 @@ class xo extends Fn {
2342
2352
  openedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom
2343
2353
  } : void 0);
2344
2354
  };
2345
- getFeedItem = (e) => co(e, this.transport);
2355
+ getFeedItem = (e) => uo(e, this.transport);
2346
2356
  isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
2347
2357
  closeQuestion = (e) => (e && this.onQuestionActivate({
2348
2358
  stage: "deactivate",
@@ -2366,7 +2376,7 @@ class xo extends Fn {
2366
2376
  }
2367
2377
  const n = { ...r };
2368
2378
  try {
2369
- const i = await qo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2379
+ const i = await jo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2370
2380
  i?.inTop !== void 0 && (this.leaderboardList?.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
2371
2381
  } catch (i) {
2372
2382
  console.error(i);
@@ -2384,7 +2394,7 @@ class xo extends Fn {
2384
2394
  */
2385
2395
  showInApp = (e) => {
2386
2396
  const r = this.onboardingStatus.$store.get();
2387
- if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== wi.ON && e.data.question.status === W.ACTIVE && !e.data.question.marketClosed) {
2397
+ if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Si.ON && e.data.question.status === W.ACTIVE && !e.data.question.marketClosed) {
2388
2398
  if (tn.has(e.data.question.type))
2389
2399
  this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
2390
2400
  type: we.QUESTION,
@@ -2437,7 +2447,7 @@ class xo extends Fn {
2437
2447
  questionType: e.data.question.type,
2438
2448
  insight: s,
2439
2449
  inApp: {
2440
- useMediaFromContent: n?.useAsNotification === Ai.ENABLED,
2450
+ useMediaFromContent: n?.useAsNotification === wi.ENABLED,
2441
2451
  notification: e.data.question.notification,
2442
2452
  appearance: e.data.question.appearance,
2443
2453
  sponsorship: e.data.question.sponsorship
@@ -2488,29 +2498,29 @@ class xo extends Fn {
2488
2498
  }
2489
2499
  };
2490
2500
  }
2491
- const Qo = {
2492
- [D.GAMES]: !0
2501
+ const qo = {
2502
+ [F.GAMES]: !0
2493
2503
  };
2494
- class Go extends Fn {
2504
+ class Qo extends Dn {
2495
2505
  constructor(e, r) {
2496
2506
  super(e, r);
2497
2507
  }
2498
2508
  }
2499
- const zo = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Go(t, e), Ko = (t, e, r) => {
2500
- t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new te(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new te(B(D.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2509
+ const Go = (t, e, r) => t.type === F.GAMES ? new xo(t, e, r) : new Qo(t, e), zo = (t, e, r) => {
2510
+ t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new te(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new te(B(F.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2501
2511
  t.sdk.initializeApp().then(() => {
2502
2512
  t.activeFeature.setValue(n);
2503
2513
  });
2504
2514
  }, t.sdk.closeFeature = (n = !1) => {
2505
2515
  const i = t.activeFeature.getValue();
2506
- if (t.activeFeature.setValue(D.UNSET), n && i) {
2516
+ if (t.activeFeature.setValue(F.UNSET), n && i) {
2507
2517
  t.features.delete(i);
2508
2518
  const o = t.sdk.featuresList.getValue();
2509
2519
  o && o.delete(i), t.sdk.featuresList.setValue(o);
2510
2520
  }
2511
2521
  }, t.initFeature = (n, i = me.ORGANIZATION) => {
2512
- if (n.type in Qo && !t.features.has(n.type)) {
2513
- const o = zo(n, i, t);
2522
+ if (n.type in qo && !t.features.has(n.type)) {
2523
+ const o = Go(n, i, t);
2514
2524
  t.features.set(n.type, o);
2515
2525
  let s = t.sdk.featuresList.getValue();
2516
2526
  s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
@@ -2563,7 +2573,7 @@ const zo = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Go(t, e), Ko
2563
2573
  t.store.subscribe(i);
2564
2574
  }, r();
2565
2575
  };
2566
- class Ho {
2576
+ class Ko {
2567
2577
  analytics;
2568
2578
  constructor(e) {
2569
2579
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2582,7 +2592,7 @@ class Ho {
2582
2592
  this.analytics.write("invitation", {
2583
2593
  common: {
2584
2594
  ...this.analytics.commonStore.getValues(),
2585
- kind: x.INVITATION_ACCEPTED
2595
+ kind: q.INVITATION_ACCEPTED
2586
2596
  },
2587
2597
  category: Rr.GAMES,
2588
2598
  from: Vr.UNSET
@@ -2592,14 +2602,14 @@ class Ho {
2592
2602
  this.analytics.write("invitation", {
2593
2603
  common: {
2594
2604
  ...this.analytics.commonStore.getValues(),
2595
- kind: x.INVITATION_SENT
2605
+ kind: q.INVITATION_SENT
2596
2606
  },
2597
2607
  category: Rr.GAMES,
2598
2608
  from: e || Vr.UNSET
2599
2609
  });
2600
2610
  };
2601
2611
  }
2602
- class Wo {
2612
+ class Ho {
2603
2613
  analytics;
2604
2614
  constructor(e) {
2605
2615
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2621,22 +2631,22 @@ class Wo {
2621
2631
  this.analytics.write("interactions", {
2622
2632
  common: {
2623
2633
  ...this.analytics.commonStore.getValues(),
2624
- kind: x.INTERACTIONS
2634
+ kind: q.INTERACTIONS
2625
2635
  },
2626
- actionType: xr.TAP
2636
+ actionType: qr.TAP
2627
2637
  });
2628
2638
  };
2629
2639
  scroll = () => {
2630
2640
  this.analytics.write("interactions", {
2631
2641
  common: {
2632
2642
  ...this.analytics.commonStore.getValues(),
2633
- kind: x.INTERACTIONS
2643
+ kind: q.INTERACTIONS
2634
2644
  },
2635
- actionType: xr.SCROLL
2645
+ actionType: qr.SCROLL
2636
2646
  });
2637
2647
  };
2638
2648
  }
2639
- const Yo = {
2649
+ const Wo = {
2640
2650
  [H.UNSET]: J.UNSET,
2641
2651
  [H.INGAME_IAB21]: J.PROMOTION_INGAME_IAB21,
2642
2652
  [H.INGAME_IAB11_LBAR]: J.PROMOTION_INGAME_IAB11_LBAR,
@@ -2649,8 +2659,8 @@ const Yo = {
2649
2659
  [H.SHOP_LBAR]: J.PROMOTION_SHOP_LBAR,
2650
2660
  [H.SHOP_OVERLAY]: J.PROMOTION_SHOP_OVERLAY,
2651
2661
  [H.SHOP_SIDEBAR]: J.PROMOTION_SHOP_SIDEBAR
2652
- }, ar = (t) => t ? Yo[t] : J.UNSET;
2653
- class Jo {
2662
+ }, ar = (t) => t ? Wo[t] : J.UNSET;
2663
+ class Yo {
2654
2664
  analytics;
2655
2665
  constructor(e) {
2656
2666
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2686,9 +2696,9 @@ class Jo {
2686
2696
  this.analytics.write("games", {
2687
2697
  common: {
2688
2698
  ...this.analytics.commonStore.getValues(),
2689
- kind: x.POLLS_RECEIVED,
2699
+ kind: q.POLLS_RECEIVED,
2690
2700
  topicId: e,
2691
- topicType: q.POLLS_PROMOTION,
2701
+ topicType: x.POLLS_PROMOTION,
2692
2702
  topicSubType: r
2693
2703
  },
2694
2704
  pollOpenedFrom: X.UNSET
@@ -2698,9 +2708,9 @@ class Jo {
2698
2708
  this.analytics.write("games", {
2699
2709
  common: {
2700
2710
  ...this.analytics.commonStore.getValues(),
2701
- kind: x.POLLS_OPENED,
2711
+ kind: q.POLLS_OPENED,
2702
2712
  topicId: e,
2703
- topicType: q.POLLS_PROMOTION,
2713
+ topicType: x.POLLS_PROMOTION,
2704
2714
  topicSubType: n
2705
2715
  },
2706
2716
  pollOpenedFrom: r === "notification" ? X.IN_APP : X.UNSET
@@ -2710,9 +2720,9 @@ class Jo {
2710
2720
  this.analytics.write("games", {
2711
2721
  common: {
2712
2722
  ...this.analytics.commonStore.getValues(),
2713
- kind: x.POLLS_OPENED,
2723
+ kind: q.POLLS_OPENED,
2714
2724
  topicId: e,
2715
- topicType: q.POLLS_PROMOTION,
2725
+ topicType: x.POLLS_PROMOTION,
2716
2726
  topicSubType: r
2717
2727
  },
2718
2728
  pollOpenedFrom: X.UNSET
@@ -2723,8 +2733,8 @@ class Jo {
2723
2733
  common: {
2724
2734
  ...this.analytics.commonStore.getValues(),
2725
2735
  topicId: e,
2726
- kind: x.AD_VIDEO_PLAYED,
2727
- topicType: q.POLLS_PROMOTION,
2736
+ kind: q.AD_VIDEO_PLAYED,
2737
+ topicType: x.POLLS_PROMOTION,
2728
2738
  topicSubType: r
2729
2739
  },
2730
2740
  pollOpenedFrom: X.UNSET
@@ -2735,8 +2745,8 @@ class Jo {
2735
2745
  common: {
2736
2746
  ...this.analytics.commonStore.getValues(),
2737
2747
  topicId: e,
2738
- kind: x.AD_BUTTON_NAVIGATED,
2739
- topicType: q.POLLS_PROMOTION,
2748
+ kind: q.AD_BUTTON_NAVIGATED,
2749
+ topicType: x.POLLS_PROMOTION,
2740
2750
  topicSubType: r
2741
2751
  },
2742
2752
  pollOpenedFrom: X.UNSET
@@ -2747,45 +2757,45 @@ class Jo {
2747
2757
  common: {
2748
2758
  ...this.analytics.commonStore.getValues(),
2749
2759
  topicId: e,
2750
- kind: x.AD_BANNER_NAVIGATED,
2751
- topicType: q.POLLS_PROMOTION,
2760
+ kind: q.AD_BANNER_NAVIGATED,
2761
+ topicType: x.POLLS_PROMOTION,
2752
2762
  topicSubType: r
2753
2763
  },
2754
2764
  pollOpenedFrom: X.UNSET
2755
2765
  });
2756
2766
  };
2757
2767
  }
2758
- const Ze = {
2759
- [E.UNSET]: q.UNSET,
2760
- [E.FACTOID]: q.POLLS_INSIGHT,
2761
- [E.POLL]: q.POLLS_POLL,
2762
- [E.PREDICTION]: q.POLLS_PREDICTION,
2763
- [E.PROMOTION]: q.POLLS_PROMOTION,
2764
- [E.TRIVIA]: q.POLLS_TRIVIA,
2765
- [E.TWEET]: q.POLLS_TWITTER
2768
+ const et = {
2769
+ [E.UNSET]: x.UNSET,
2770
+ [E.FACTOID]: x.POLLS_INSIGHT,
2771
+ [E.POLL]: x.POLLS_POLL,
2772
+ [E.PREDICTION]: x.POLLS_PREDICTION,
2773
+ [E.PROMOTION]: x.POLLS_PROMOTION,
2774
+ [E.TRIVIA]: x.POLLS_TRIVIA,
2775
+ [E.TWEET]: x.POLLS_TWITTER
2766
2776
  };
2767
2777
  E.UNSET + "", ye.UNSET, E.FACTOID + "", ye.POLLS, E.POLL + "", ye.POLLS, E.PREDICTION + "", ye.POLLS, E.PROMOTION + "", ye.POLLS, E.TRIVIA + "", ye.POLLS, E.TWEET + "", ye.POLLS;
2768
- const Xo = {
2769
- [D.UNSET]: z.UNSET,
2770
- [D.INPLAY]: z.INPLAY,
2771
- [D.MESSAGING]: z.MESSAGING,
2772
- [D.STATISTICS]: z.STATS,
2773
- [D.BETTING]: z.BETTING,
2774
- [D.TWITTER]: z.TWITTER,
2775
- [D.MERCHANDISE]: z.MERCHANDISE,
2776
- [D.CONTESTS]: z.CONTESTS,
2777
- [D.VOICE_CHAT]: z.CALLING,
2778
- [D.TICKETS]: z.TICKETS,
2779
- [D.WHOIS_WATCHING]: z.WHOISWATCHING,
2780
- [D.PROFILE]: z.PROFILE,
2781
- [D.GAMES]: z.POLLS,
2778
+ const Jo = {
2779
+ [F.UNSET]: z.UNSET,
2780
+ [F.INPLAY]: z.INPLAY,
2781
+ [F.MESSAGING]: z.MESSAGING,
2782
+ [F.STATISTICS]: z.STATS,
2783
+ [F.BETTING]: z.BETTING,
2784
+ [F.TWITTER]: z.TWITTER,
2785
+ [F.MERCHANDISE]: z.MERCHANDISE,
2786
+ [F.CONTESTS]: z.CONTESTS,
2787
+ [F.VOICE_CHAT]: z.CALLING,
2788
+ [F.TICKETS]: z.TICKETS,
2789
+ [F.WHOIS_WATCHING]: z.WHOISWATCHING,
2790
+ [F.PROFILE]: z.PROFILE,
2791
+ [F.GAMES]: z.POLLS,
2782
2792
  // ??
2783
- [D.GOLF_STATISTICS]: z.STATS,
2793
+ [F.GOLF_STATISTICS]: z.STATS,
2784
2794
  // ??
2785
- [D.HIGHLIGHTS]: z.HIGHLIGHTS,
2786
- [D.PUBLIC_CHAT]: z.PUBLIC_CHAT
2795
+ [F.HIGHLIGHTS]: z.HIGHLIGHTS,
2796
+ [F.PUBLIC_CHAT]: z.PUBLIC_CHAT
2787
2797
  };
2788
- class Zo {
2798
+ class Xo {
2789
2799
  analytics;
2790
2800
  constructor(e) {
2791
2801
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2824,9 +2834,9 @@ class Zo {
2824
2834
  this.analytics.write("notification", {
2825
2835
  common: {
2826
2836
  ...this.analytics.commonStore.getValues(),
2827
- kind: x.NOTIFICATION_RECEIVED,
2837
+ kind: q.NOTIFICATION_RECEIVED,
2828
2838
  topicId: e,
2829
- topicType: r ? Ze[r] : q.UNSET,
2839
+ topicType: r ? et[r] : x.UNSET,
2830
2840
  topicSubType: n
2831
2841
  },
2832
2842
  notificationKind: ye.POLLS,
@@ -2837,9 +2847,9 @@ class Zo {
2837
2847
  this.analytics.write("notification", {
2838
2848
  common: {
2839
2849
  ...this.analytics.commonStore.getValues(),
2840
- kind: x.NOTIFICATION_OPENED,
2850
+ kind: q.NOTIFICATION_OPENED,
2841
2851
  topicId: e,
2842
- topicType: r ? Ze[r] : q.UNSET,
2852
+ topicType: r ? et[r] : x.UNSET,
2843
2853
  topicSubType: n
2844
2854
  },
2845
2855
  notificationKind: ye.POLLS,
@@ -2847,7 +2857,7 @@ class Zo {
2847
2857
  });
2848
2858
  };
2849
2859
  }
2850
- class es {
2860
+ class Zo {
2851
2861
  analytics;
2852
2862
  constructor(e) {
2853
2863
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2879,9 +2889,9 @@ class es {
2879
2889
  this.analytics.write("games", {
2880
2890
  common: {
2881
2891
  ...this.analytics.commonStore.getValues(),
2882
- kind: x.POLLS_RECEIVED,
2892
+ kind: q.POLLS_RECEIVED,
2883
2893
  topicId: e,
2884
- topicType: r ? Ze[r] : q.UNSET
2894
+ topicType: r ? et[r] : x.UNSET
2885
2895
  },
2886
2896
  pollOpenedFrom: X.UNSET
2887
2897
  });
@@ -2891,9 +2901,9 @@ class es {
2891
2901
  this.analytics.write("games", {
2892
2902
  common: {
2893
2903
  ...this.analytics.commonStore.getValues(),
2894
- kind: x.POLLS_OPENED,
2904
+ kind: q.POLLS_OPENED,
2895
2905
  topicId: e,
2896
- topicType: r ? Ze[r] : q.UNSET
2906
+ topicType: r ? et[r] : x.UNSET
2897
2907
  },
2898
2908
  pollOpenedFrom: n === "list" ? X.PICK_HISTORY : X.IN_APP
2899
2909
  });
@@ -2903,9 +2913,9 @@ class es {
2903
2913
  this.analytics.write("games", {
2904
2914
  common: {
2905
2915
  ...this.analytics.commonStore.getValues(),
2906
- kind: x.POLLS_VOTE,
2916
+ kind: q.POLLS_VOTE,
2907
2917
  topicId: e,
2908
- topicType: r ? Ze[r] : q.UNSET
2918
+ topicType: r ? et[r] : x.UNSET
2909
2919
  },
2910
2920
  pollOpenedFrom: X.UNSET
2911
2921
  });
@@ -2915,7 +2925,7 @@ class es {
2915
2925
  this.analytics.write("games", {
2916
2926
  common: {
2917
2927
  ...this.analytics.commonStore.getValues(),
2918
- kind: x.GAMES_JOINED
2928
+ kind: q.GAMES_JOINED
2919
2929
  },
2920
2930
  pollOpenedFrom: X.UNSET
2921
2931
  });
@@ -2925,13 +2935,13 @@ class es {
2925
2935
  this.analytics.write("games", {
2926
2936
  common: {
2927
2937
  ...this.analytics.commonStore.getValues(),
2928
- kind: x.POLLS_NAVIGATED
2938
+ kind: q.POLLS_NAVIGATED
2929
2939
  },
2930
2940
  pollOpenedFrom: X.UNSET
2931
2941
  });
2932
2942
  };
2933
2943
  }
2934
- const ts = ({ transport: t, $commonStore: e }) => {
2944
+ const es = ({ transport: t, $commonStore: e }) => {
2935
2945
  let r;
2936
2946
  const n = B(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(_n, {
2937
2947
  method: "send",
@@ -2946,7 +2956,7 @@ const ts = ({ transport: t, $commonStore: e }) => {
2946
2956
  value: {
2947
2957
  common: {
2948
2958
  ...p,
2949
- kind: x.SESSION_HEARTBEAT
2959
+ kind: q.SESSION_HEARTBEAT
2950
2960
  }
2951
2961
  }
2952
2962
  }
@@ -2969,7 +2979,7 @@ const ts = ({ transport: t, $commonStore: e }) => {
2969
2979
  ve.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2970
2980
  } };
2971
2981
  }, ve = Ee("analytics");
2972
- class rs {
2982
+ class ts {
2973
2983
  commonStore;
2974
2984
  notifications;
2975
2985
  polls;
@@ -2982,7 +2992,7 @@ class rs {
2982
2992
  listenersCancels;
2983
2993
  connected = !1;
2984
2994
  constructor(e) {
2985
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(ee({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ts({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Zo(this), this.polls = new es(this), this.invitation = new Ho(this), this.interactions = new Wo(this), this.advertisement = new Jo(this);
2995
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(ee({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = es({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Xo(this), this.polls = new Zo(this), this.invitation = new Ko(this), this.interactions = new Ho(this), this.advertisement = new Yo(this);
2986
2996
  const { client: r } = e.analyticsTransport.createPromiseClient(_n, {
2987
2997
  method: "send"
2988
2998
  });
@@ -3012,10 +3022,10 @@ class rs {
3012
3022
  this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
3013
3023
  this.writeCommon("eventId", r);
3014
3024
  })), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
3015
- r && this.writeCommon("category", Xo[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", St()) : this.writeCommon("overlaySessionId", "");
3025
+ r && this.writeCommon("category", Jo[r]), r !== F.UNSET ? this.writeCommon("overlaySessionId", St()) : this.writeCommon("overlaySessionId", "");
3016
3026
  })), this.onConnect(() => {
3017
3027
  const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
3018
- this.writeCommon("screenOrientation", i.matches ? qr.PORTRAIT : qr.LANDSCAPE);
3028
+ this.writeCommon("screenOrientation", i.matches ? xr.PORTRAIT : xr.LANDSCAPE);
3019
3029
  };
3020
3030
  return r.addEventListener("change", n), () => {
3021
3031
  r.removeEventListener("change", n);
@@ -3025,19 +3035,19 @@ class rs {
3025
3035
  }));
3026
3036
  };
3027
3037
  }
3028
- const ns = (t, e, r) => {
3029
- t.analytics = new rs(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
3038
+ const rs = (t, e, r) => {
3039
+ t.analytics = new ts(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
3030
3040
  n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId", St());
3031
3041
  }, () => {
3032
3042
  t.analytics.disconnect();
3033
3043
  })), r();
3034
3044
  };
3035
3045
  var Sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3036
- function is(t) {
3046
+ function ns(t) {
3037
3047
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3038
3048
  }
3039
3049
  var wr = { exports: {} }, Ar = { exports: {} };
3040
- function os(t) {
3050
+ function is(t) {
3041
3051
  var e = new t(), r = e;
3042
3052
  function n() {
3043
3053
  var o = e;
@@ -3051,11 +3061,11 @@ function os(t) {
3051
3061
  release: i
3052
3062
  };
3053
3063
  }
3054
- var ss = os, as = ss;
3055
- function Un(t, e, r) {
3064
+ var os = is, ss = os;
3065
+ function Bn(t, e, r) {
3056
3066
  if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
3057
3067
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
3058
- var n = as(us), i = null, o = null, s = 0, a = null, u = {
3068
+ var n = ss(as), i = null, o = null, s = 0, a = null, u = {
3059
3069
  push: m,
3060
3070
  drain: Z,
3061
3071
  saturated: Z,
@@ -3137,7 +3147,7 @@ function Un(t, e, r) {
3137
3147
  }
3138
3148
  function Z() {
3139
3149
  }
3140
- function us() {
3150
+ function as() {
3141
3151
  this.value = null, this.callback = Z, this.next = null, this.release = Z, this.context = null, this.errorHandler = null;
3142
3152
  var t = this;
3143
3153
  this.worked = function(r, n) {
@@ -3145,14 +3155,14 @@ function us() {
3145
3155
  t.value = null, t.callback = Z, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
3146
3156
  };
3147
3157
  }
3148
- function cs(t, e, r) {
3158
+ function us(t, e, r) {
3149
3159
  typeof t == "function" && (r = e, e = t, t = null);
3150
3160
  function n(c, l) {
3151
3161
  e.call(this, c).then(function(p) {
3152
3162
  l(null, p);
3153
3163
  }, l);
3154
3164
  }
3155
- var i = Un(t, n, r), o = i.push, s = i.unshift;
3165
+ var i = Bn(t, n, r), o = i.push, s = i.unshift;
3156
3166
  return i.push = a, i.unshift = u, i.drained = d, i;
3157
3167
  function a(c) {
3158
3168
  var l = new Promise(function(p, b) {
@@ -3191,9 +3201,9 @@ function cs(t, e, r) {
3191
3201
  return l;
3192
3202
  }
3193
3203
  }
3194
- Ar.exports = Un;
3195
- Ar.exports.promise = cs;
3196
- var jn = Ar.exports, Er = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, rn = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
3204
+ Ar.exports = Bn;
3205
+ Ar.exports.promise = us;
3206
+ var Un = Ar.exports, Er = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, rn = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
3197
3207
  return Function.prototype.apply.call(e, r, n);
3198
3208
  }, ht;
3199
3209
  Qe && typeof Qe.ownKeys == "function" ? ht = Qe.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
@@ -3201,17 +3211,17 @@ Qe && typeof Qe.ownKeys == "function" ? ht = Qe.ownKeys : Object.getOwnPropertyS
3201
3211
  } : ht = function(e) {
3202
3212
  return Object.getOwnPropertyNames(e);
3203
3213
  };
3204
- function ls(t) {
3214
+ function cs(t) {
3205
3215
  console && console.warn && console.warn(t);
3206
3216
  }
3207
- var qn = Number.isNaN || function(e) {
3217
+ var jn = Number.isNaN || function(e) {
3208
3218
  return e !== e;
3209
3219
  };
3210
3220
  function N() {
3211
3221
  N.init.call(this);
3212
3222
  }
3213
3223
  Er.exports = N;
3214
- Er.exports.once = hs;
3224
+ Er.exports.once = ps;
3215
3225
  N.EventEmitter = N;
3216
3226
  N.prototype._events = void 0;
3217
3227
  N.prototype._eventsCount = 0;
@@ -3227,7 +3237,7 @@ Object.defineProperty(N, "defaultMaxListeners", {
3227
3237
  return nn;
3228
3238
  },
3229
3239
  set: function(t) {
3230
- if (typeof t != "number" || t < 0 || qn(t))
3240
+ if (typeof t != "number" || t < 0 || jn(t))
3231
3241
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
3232
3242
  nn = t;
3233
3243
  }
@@ -3236,7 +3246,7 @@ N.init = function() {
3236
3246
  (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;
3237
3247
  };
3238
3248
  N.prototype.setMaxListeners = function(e) {
3239
- if (typeof e != "number" || e < 0 || qn(e))
3249
+ if (typeof e != "number" || e < 0 || jn(e))
3240
3250
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
3241
3251
  return this._maxListeners = e, this;
3242
3252
  };
@@ -3266,11 +3276,11 @@ N.prototype.emit = function(e) {
3266
3276
  if (typeof u == "function")
3267
3277
  rn(u, this, r);
3268
3278
  else
3269
- for (var d = u.length, c = Hn(u, d), n = 0; n < d; ++n)
3279
+ for (var d = u.length, c = Kn(u, d), n = 0; n < d; ++n)
3270
3280
  rn(c[n], this, r);
3271
3281
  return !0;
3272
3282
  };
3273
- function Qn(t, e, r, n) {
3283
+ function qn(t, e, r, n) {
3274
3284
  var i, o, s;
3275
3285
  if (Nt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
3276
3286
  "newListener",
@@ -3281,30 +3291,30 @@ function Qn(t, e, r, n) {
3281
3291
  else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = xn(t), i > 0 && s.length > i && !s.warned) {
3282
3292
  s.warned = !0;
3283
3293
  var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3284
- a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, ls(a);
3294
+ a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, cs(a);
3285
3295
  }
3286
3296
  return t;
3287
3297
  }
3288
3298
  N.prototype.addListener = function(e, r) {
3289
- return Qn(this, e, r, !1);
3299
+ return qn(this, e, r, !1);
3290
3300
  };
3291
3301
  N.prototype.on = N.prototype.addListener;
3292
3302
  N.prototype.prependListener = function(e, r) {
3293
- return Qn(this, e, r, !0);
3303
+ return qn(this, e, r, !0);
3294
3304
  };
3295
- function ds() {
3305
+ function ls() {
3296
3306
  if (!this.fired)
3297
3307
  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);
3298
3308
  }
3299
- function Gn(t, e, r) {
3300
- var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ds.bind(n);
3309
+ function Qn(t, e, r) {
3310
+ var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ls.bind(n);
3301
3311
  return i.listener = r, n.wrapFn = i, i;
3302
3312
  }
3303
3313
  N.prototype.once = function(e, r) {
3304
- return Nt(r), this.on(e, Gn(this, e, r)), this;
3314
+ return Nt(r), this.on(e, Qn(this, e, r)), this;
3305
3315
  };
3306
3316
  N.prototype.prependOnceListener = function(e, r) {
3307
- return Nt(r), this.prependListener(e, Gn(this, e, r)), this;
3317
+ return Nt(r), this.prependListener(e, Qn(this, e, r)), this;
3308
3318
  };
3309
3319
  N.prototype.removeListener = function(e, r) {
3310
3320
  var n, i, o, s, a;
@@ -3322,7 +3332,7 @@ N.prototype.removeListener = function(e, r) {
3322
3332
  }
3323
3333
  if (o < 0)
3324
3334
  return this;
3325
- o === 0 ? n.shift() : fs(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
3335
+ o === 0 ? n.shift() : ds(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
3326
3336
  }
3327
3337
  return this;
3328
3338
  };
@@ -3346,24 +3356,24 @@ N.prototype.removeAllListeners = function(e) {
3346
3356
  this.removeListener(e, r[i]);
3347
3357
  return this;
3348
3358
  };
3349
- function zn(t, e, r) {
3359
+ function Gn(t, e, r) {
3350
3360
  var n = t._events;
3351
3361
  if (n === void 0)
3352
3362
  return [];
3353
3363
  var i = n[e];
3354
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? ps(i) : Hn(i, i.length);
3364
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? fs(i) : Kn(i, i.length);
3355
3365
  }
3356
3366
  N.prototype.listeners = function(e) {
3357
- return zn(this, e, !0);
3367
+ return Gn(this, e, !0);
3358
3368
  };
3359
3369
  N.prototype.rawListeners = function(e) {
3360
- return zn(this, e, !1);
3370
+ return Gn(this, e, !1);
3361
3371
  };
3362
3372
  N.listenerCount = function(t, e) {
3363
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : Kn.call(t, e);
3373
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : zn.call(t, e);
3364
3374
  };
3365
- N.prototype.listenerCount = Kn;
3366
- function Kn(t) {
3375
+ N.prototype.listenerCount = zn;
3376
+ function zn(t) {
3367
3377
  var e = this._events;
3368
3378
  if (e !== void 0) {
3369
3379
  var r = e[t];
@@ -3377,22 +3387,22 @@ function Kn(t) {
3377
3387
  N.prototype.eventNames = function() {
3378
3388
  return this._eventsCount > 0 ? ht(this._events) : [];
3379
3389
  };
3380
- function Hn(t, e) {
3390
+ function Kn(t, e) {
3381
3391
  for (var r = new Array(e), n = 0; n < e; ++n)
3382
3392
  r[n] = t[n];
3383
3393
  return r;
3384
3394
  }
3385
- function fs(t, e) {
3395
+ function ds(t, e) {
3386
3396
  for (; e + 1 < t.length; e++)
3387
3397
  t[e] = t[e + 1];
3388
3398
  t.pop();
3389
3399
  }
3390
- function ps(t) {
3400
+ function fs(t) {
3391
3401
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
3392
3402
  e[r] = t[r].listener || t[r];
3393
3403
  return e;
3394
3404
  }
3395
- function hs(t, e) {
3405
+ function ps(t, e) {
3396
3406
  return new Promise(function(r, n) {
3397
3407
  function i(s) {
3398
3408
  t.removeListener(e, o), n(s);
@@ -3400,13 +3410,13 @@ function hs(t, e) {
3400
3410
  function o() {
3401
3411
  typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
3402
3412
  }
3403
- Wn(t, e, o, { once: !0 }), e !== "error" && ys(t, i, { once: !0 });
3413
+ Hn(t, e, o, { once: !0 }), e !== "error" && hs(t, i, { once: !0 });
3404
3414
  });
3405
3415
  }
3406
- function ys(t, e, r) {
3407
- typeof t.on == "function" && Wn(t, "error", e, r);
3416
+ function hs(t, e, r) {
3417
+ typeof t.on == "function" && Hn(t, "error", e, r);
3408
3418
  }
3409
- function Wn(t, e, r, n) {
3419
+ function Hn(t, e, r, n) {
3410
3420
  if (typeof t.on == "function")
3411
3421
  n.once ? t.once(e, r) : t.on(e, r);
3412
3422
  else if (typeof t.addEventListener == "function")
@@ -3416,7 +3426,7 @@ function Wn(t, e, r, n) {
3416
3426
  else
3417
3427
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
3418
3428
  }
3419
- var Yn = Er.exports, Ft = {}, Jn = {}, Xn = function() {
3429
+ var Wn = Er.exports, Dt = {}, Yn = {}, Jn = function() {
3420
3430
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
3421
3431
  return !1;
3422
3432
  if (typeof Symbol.iterator == "symbol")
@@ -3439,34 +3449,34 @@ var Yn = Er.exports, Ft = {}, Jn = {}, Xn = function() {
3439
3449
  return !1;
3440
3450
  }
3441
3451
  return !0;
3442
- }, gs = Xn, Dt = function() {
3443
- return gs() && !!Symbol.toStringTag;
3444
- }, ms = Error, bs = EvalError, vs = RangeError, Ss = ReferenceError, Zn = SyntaxError, Rt = TypeError, ws = URIError, on = typeof Symbol < "u" && Symbol, As = Xn, Es = function() {
3445
- return typeof on != "function" || typeof Symbol != "function" || typeof on("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : As();
3446
- }, jt = {
3452
+ }, ys = Jn, Ft = function() {
3453
+ return ys() && !!Symbol.toStringTag;
3454
+ }, gs = Error, ms = EvalError, bs = RangeError, vs = ReferenceError, Xn = SyntaxError, Rt = TypeError, Ss = URIError, on = typeof Symbol < "u" && Symbol, ws = Jn, As = function() {
3455
+ return typeof on != "function" || typeof Symbol != "function" || typeof on("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ws();
3456
+ }, Ut = {
3447
3457
  __proto__: null,
3448
3458
  foo: {}
3449
- }, Is = Object, Os = function() {
3450
- return { __proto__: jt }.foo === jt.foo && !(jt instanceof Is);
3451
- }, Ts = "Function.prototype.bind called on incompatible ", ks = Object.prototype.toString, _s = Math.max, Cs = "[object Function]", sn = function(e, r) {
3459
+ }, Es = Object, Is = function() {
3460
+ return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof Es);
3461
+ }, Os = "Function.prototype.bind called on incompatible ", Ts = Object.prototype.toString, ks = Math.max, _s = "[object Function]", sn = function(e, r) {
3452
3462
  for (var n = [], i = 0; i < e.length; i += 1)
3453
3463
  n[i] = e[i];
3454
3464
  for (var o = 0; o < r.length; o += 1)
3455
3465
  n[o + e.length] = r[o];
3456
3466
  return n;
3457
- }, Ls = function(e, r) {
3467
+ }, Cs = function(e, r) {
3458
3468
  for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
3459
3469
  n[o] = e[i];
3460
3470
  return n;
3461
- }, Ps = function(t, e) {
3471
+ }, Ls = function(t, e) {
3462
3472
  for (var r = "", n = 0; n < t.length; n += 1)
3463
3473
  r += t[n], n + 1 < t.length && (r += e);
3464
3474
  return r;
3465
- }, Ns = function(e) {
3475
+ }, Ps = function(e) {
3466
3476
  var r = this;
3467
- if (typeof r != "function" || ks.apply(r) !== Cs)
3468
- throw new TypeError(Ts + r);
3469
- for (var n = Ls(arguments, 1), i, o = function() {
3477
+ if (typeof r != "function" || Ts.apply(r) !== _s)
3478
+ throw new TypeError(Os + r);
3479
+ for (var n = Cs(arguments, 1), i, o = function() {
3470
3480
  if (this instanceof i) {
3471
3481
  var c = r.apply(
3472
3482
  this,
@@ -3478,17 +3488,17 @@ var Yn = Er.exports, Ft = {}, Jn = {}, Xn = function() {
3478
3488
  e,
3479
3489
  sn(n, arguments)
3480
3490
  );
3481
- }, s = _s(0, r.length - n.length), a = [], u = 0; u < s; u++)
3491
+ }, s = ks(0, r.length - n.length), a = [], u = 0; u < s; u++)
3482
3492
  a[u] = "$" + u;
3483
- if (i = Function("binder", "return function (" + Ps(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3493
+ if (i = Function("binder", "return function (" + Ls(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3484
3494
  var d = function() {
3485
3495
  };
3486
3496
  d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
3487
3497
  }
3488
3498
  return i;
3489
- }, Fs = Ns, Ir = Function.prototype.bind || Fs, Ds = Function.prototype.call, Rs = Object.prototype.hasOwnProperty, Vs = Ir, $s = Vs.call(Ds, Rs), O, Ms = ms, Bs = bs, Us = vs, js = Ss, Ke = Zn, Ge = Rt, qs = ws, ei = Function, qt = function(t) {
3499
+ }, Ns = Ps, Ir = Function.prototype.bind || Ns, Ds = Function.prototype.call, Fs = Object.prototype.hasOwnProperty, Rs = Ir, Vs = Rs.call(Ds, Fs), O, $s = gs, Ms = ms, Bs = bs, Us = vs, Ke = Xn, Ge = Rt, js = Ss, Zn = Function, jt = function(t) {
3490
3500
  try {
3491
- return ei('"use strict"; return (' + t + ").constructor;")();
3501
+ return Zn('"use strict"; return (' + t + ").constructor;")();
3492
3502
  } catch {
3493
3503
  }
3494
3504
  }, Pe = Object.getOwnPropertyDescriptor;
@@ -3510,9 +3520,9 @@ var xt = function() {
3510
3520
  return xt;
3511
3521
  }
3512
3522
  }
3513
- }() : xt, Me = Es(), Qs = Os(), U = Object.getPrototypeOf || (Qs ? function(t) {
3523
+ }() : xt, Me = As(), qs = Is(), U = Object.getPrototypeOf || (qs ? function(t) {
3514
3524
  return t.__proto__;
3515
- } : null), Ue = {}, Gs = typeof Uint8Array > "u" || !U ? O : U(Uint8Array), Ne = {
3525
+ } : null), Ue = {}, Qs = typeof Uint8Array > "u" || !U ? O : U(Uint8Array), Ne = {
3516
3526
  __proto__: null,
3517
3527
  "%AggregateError%": typeof AggregateError > "u" ? O : AggregateError,
3518
3528
  "%Array%": Array,
@@ -3534,14 +3544,14 @@ var xt = function() {
3534
3544
  "%decodeURIComponent%": decodeURIComponent,
3535
3545
  "%encodeURI%": encodeURI,
3536
3546
  "%encodeURIComponent%": encodeURIComponent,
3537
- "%Error%": Ms,
3547
+ "%Error%": $s,
3538
3548
  "%eval%": eval,
3539
3549
  // eslint-disable-line no-eval
3540
- "%EvalError%": Bs,
3550
+ "%EvalError%": Ms,
3541
3551
  "%Float32Array%": typeof Float32Array > "u" ? O : Float32Array,
3542
3552
  "%Float64Array%": typeof Float64Array > "u" ? O : Float64Array,
3543
3553
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? O : FinalizationRegistry,
3544
- "%Function%": ei,
3554
+ "%Function%": Zn,
3545
3555
  "%GeneratorFunction%": Ue,
3546
3556
  "%Int8Array%": typeof Int8Array > "u" ? O : Int8Array,
3547
3557
  "%Int16Array%": typeof Int16Array > "u" ? O : Int16Array,
@@ -3559,8 +3569,8 @@ var xt = function() {
3559
3569
  "%parseInt%": parseInt,
3560
3570
  "%Promise%": typeof Promise > "u" ? O : Promise,
3561
3571
  "%Proxy%": typeof Proxy > "u" ? O : Proxy,
3562
- "%RangeError%": Us,
3563
- "%ReferenceError%": js,
3572
+ "%RangeError%": Bs,
3573
+ "%ReferenceError%": Us,
3564
3574
  "%Reflect%": typeof Reflect > "u" ? O : Reflect,
3565
3575
  "%RegExp%": RegExp,
3566
3576
  "%Set%": typeof Set > "u" ? O : Set,
@@ -3571,13 +3581,13 @@ var xt = function() {
3571
3581
  "%Symbol%": Me ? Symbol : O,
3572
3582
  "%SyntaxError%": Ke,
3573
3583
  "%ThrowTypeError%": xs,
3574
- "%TypedArray%": Gs,
3584
+ "%TypedArray%": Qs,
3575
3585
  "%TypeError%": Ge,
3576
3586
  "%Uint8Array%": typeof Uint8Array > "u" ? O : Uint8Array,
3577
3587
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? O : Uint8ClampedArray,
3578
3588
  "%Uint16Array%": typeof Uint16Array > "u" ? O : Uint16Array,
3579
3589
  "%Uint32Array%": typeof Uint32Array > "u" ? O : Uint32Array,
3580
- "%URIError%": qs,
3590
+ "%URIError%": js,
3581
3591
  "%WeakMap%": typeof WeakMap > "u" ? O : WeakMap,
3582
3592
  "%WeakRef%": typeof WeakRef > "u" ? O : WeakRef,
3583
3593
  "%WeakSet%": typeof WeakSet > "u" ? O : WeakSet
@@ -3586,17 +3596,17 @@ if (U)
3586
3596
  try {
3587
3597
  null.error;
3588
3598
  } catch (t) {
3589
- var zs = U(U(t));
3590
- Ne["%Error.prototype%"] = zs;
3599
+ var Gs = U(U(t));
3600
+ Ne["%Error.prototype%"] = Gs;
3591
3601
  }
3592
- var Ks = function t(e) {
3602
+ var zs = function t(e) {
3593
3603
  var r;
3594
3604
  if (e === "%AsyncFunction%")
3595
- r = qt("async function () {}");
3605
+ r = jt("async function () {}");
3596
3606
  else if (e === "%GeneratorFunction%")
3597
- r = qt("function* () {}");
3607
+ r = jt("function* () {}");
3598
3608
  else if (e === "%AsyncGeneratorFunction%")
3599
- r = qt("async function* () {}");
3609
+ r = jt("async function* () {}");
3600
3610
  else if (e === "%AsyncGenerator%") {
3601
3611
  var n = t("%AsyncGeneratorFunction%");
3602
3612
  n && (r = n.prototype);
@@ -3658,21 +3668,21 @@ var Ks = function t(e) {
3658
3668
  "%URIErrorPrototype%": ["URIError", "prototype"],
3659
3669
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3660
3670
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3661
- }, it = Ir, At = $s, Hs = it.call(Function.call, Array.prototype.concat), Ws = it.call(Function.apply, Array.prototype.splice), un = it.call(Function.call, String.prototype.replace), Et = it.call(Function.call, String.prototype.slice), Ys = it.call(Function.call, RegExp.prototype.exec), Js = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Xs = /\\(\\)?/g, Zs = function(e) {
3671
+ }, ot = Ir, At = Vs, Ks = ot.call(Function.call, Array.prototype.concat), Hs = ot.call(Function.apply, Array.prototype.splice), un = ot.call(Function.call, String.prototype.replace), Et = ot.call(Function.call, String.prototype.slice), Ws = ot.call(Function.call, RegExp.prototype.exec), Ys = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Js = /\\(\\)?/g, Xs = function(e) {
3662
3672
  var r = Et(e, 0, 1), n = Et(e, -1);
3663
3673
  if (r === "%" && n !== "%")
3664
3674
  throw new Ke("invalid intrinsic syntax, expected closing `%`");
3665
3675
  if (n === "%" && r !== "%")
3666
3676
  throw new Ke("invalid intrinsic syntax, expected opening `%`");
3667
3677
  var i = [];
3668
- return un(e, Js, function(o, s, a, u) {
3669
- i[i.length] = a ? un(u, Xs, "$1") : s || o;
3678
+ return un(e, Ys, function(o, s, a, u) {
3679
+ i[i.length] = a ? un(u, Js, "$1") : s || o;
3670
3680
  }), i;
3671
- }, ea = function(e, r) {
3681
+ }, Zs = function(e, r) {
3672
3682
  var n = e, i;
3673
3683
  if (At(an, n) && (i = an[n], n = "%" + i[0] + "%"), At(Ne, n)) {
3674
3684
  var o = Ne[n];
3675
- if (o === Ue && (o = Ks(n)), typeof o > "u" && !r)
3685
+ if (o === Ue && (o = zs(n)), typeof o > "u" && !r)
3676
3686
  throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
3677
3687
  return {
3678
3688
  alias: i,
@@ -3681,15 +3691,15 @@ var Ks = function t(e) {
3681
3691
  };
3682
3692
  }
3683
3693
  throw new Ke("intrinsic " + e + " does not exist!");
3684
- }, ot = function(e, r) {
3694
+ }, st = function(e, r) {
3685
3695
  if (typeof e != "string" || e.length === 0)
3686
3696
  throw new Ge("intrinsic name must be a non-empty string");
3687
3697
  if (arguments.length > 1 && typeof r != "boolean")
3688
3698
  throw new Ge('"allowMissing" argument must be a boolean');
3689
- if (Ys(/^%?[^%]*%?$/, e) === null)
3699
+ if (Ws(/^%?[^%]*%?$/, e) === null)
3690
3700
  throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3691
- var n = Zs(e), i = n.length > 0 ? n[0] : "", o = ea("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
3692
- d && (i = d[0], Ws(n, Hs([0, 1], d)));
3701
+ var n = Xs(e), i = n.length > 0 ? n[0] : "", o = Zs("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
3702
+ d && (i = d[0], Hs(n, Ks([0, 1], d)));
3693
3703
  for (var c = 1, l = !0; c < n.length; c += 1) {
3694
3704
  var p = n[c], b = Et(p, 0, 1), S = Et(p, -1);
3695
3705
  if ((b === '"' || b === "'" || b === "`" || S === '"' || S === "'" || S === "`") && b !== S)
@@ -3711,27 +3721,27 @@ var Ks = function t(e) {
3711
3721
  }
3712
3722
  }
3713
3723
  return a;
3714
- }, ti = { exports: {} }, Qt, cn;
3724
+ }, ei = { exports: {} }, qt, cn;
3715
3725
  function Or() {
3716
- if (cn) return Qt;
3726
+ if (cn) return qt;
3717
3727
  cn = 1;
3718
- var t = ot, e = t("%Object.defineProperty%", !0) || !1;
3728
+ var t = st, e = t("%Object.defineProperty%", !0) || !1;
3719
3729
  if (e)
3720
3730
  try {
3721
3731
  e({}, "a", { value: 1 });
3722
3732
  } catch {
3723
3733
  e = !1;
3724
3734
  }
3725
- return Qt = e, Qt;
3735
+ return qt = e, qt;
3726
3736
  }
3727
- var ta = ot, yt = ta("%Object.getOwnPropertyDescriptor%", !0);
3737
+ var ea = st, yt = ea("%Object.getOwnPropertyDescriptor%", !0);
3728
3738
  if (yt)
3729
3739
  try {
3730
3740
  yt([], "length");
3731
3741
  } catch {
3732
3742
  yt = null;
3733
3743
  }
3734
- var Vt = yt, ln = Or(), ra = Zn, Be = Rt, dn = Vt, na = function(e, r, n) {
3744
+ var Vt = yt, ln = Or(), ta = Xn, Be = Rt, dn = Vt, ra = function(e, r, n) {
3735
3745
  if (!e || typeof e != "object" && typeof e != "function")
3736
3746
  throw new Be("`obj` must be an object or a function`");
3737
3747
  if (typeof r != "string" && typeof r != "symbol")
@@ -3755,11 +3765,11 @@ var Vt = yt, ln = Or(), ra = Zn, Be = Rt, dn = Vt, na = function(e, r, n) {
3755
3765
  else if (a || !i && !o && !s)
3756
3766
  e[r] = n;
3757
3767
  else
3758
- throw new ra("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3759
- }, ur = Or(), ri = function() {
3768
+ throw new ta("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3769
+ }, ur = Or(), ti = function() {
3760
3770
  return !!ur;
3761
3771
  };
3762
- ri.hasArrayLengthDefineBug = function() {
3772
+ ti.hasArrayLengthDefineBug = function() {
3763
3773
  if (!ur)
3764
3774
  return null;
3765
3775
  try {
@@ -3768,17 +3778,17 @@ ri.hasArrayLengthDefineBug = function() {
3768
3778
  return !0;
3769
3779
  }
3770
3780
  };
3771
- var ia = ri, oa = ot, fn = na, sa = ia(), pn = Vt, hn = Rt, aa = oa("%Math.floor%"), ua = function(e, r) {
3781
+ var na = ti, ia = st, fn = ra, oa = na(), pn = Vt, hn = Rt, sa = ia("%Math.floor%"), aa = function(e, r) {
3772
3782
  if (typeof e != "function")
3773
3783
  throw new hn("`fn` is not a function");
3774
- if (typeof r != "number" || r < 0 || r > 4294967295 || aa(r) !== r)
3784
+ if (typeof r != "number" || r < 0 || r > 4294967295 || sa(r) !== r)
3775
3785
  throw new hn("`length` must be a positive 32-bit integer");
3776
3786
  var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
3777
3787
  if ("length" in e && pn) {
3778
3788
  var s = pn(e, "length");
3779
3789
  s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
3780
3790
  }
3781
- return (i || o || !n) && (sa ? fn(
3791
+ return (i || o || !n) && (oa ? fn(
3782
3792
  /** @type {Parameters<define>[0]} */
3783
3793
  e,
3784
3794
  "length",
@@ -3793,7 +3803,7 @@ var ia = ri, oa = ot, fn = na, sa = ia(), pn = Vt, hn = Rt, aa = oa("%Math.floor
3793
3803
  )), e;
3794
3804
  };
3795
3805
  (function(t) {
3796
- var e = Ir, r = ot, n = ua, i = Rt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Or(), d = r("%Math.max%");
3806
+ var e = Ir, r = st, n = aa, i = Rt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Or(), d = r("%Math.max%");
3797
3807
  t.exports = function(p) {
3798
3808
  if (typeof p != "function")
3799
3809
  throw new i("a function is required");
@@ -3808,122 +3818,122 @@ var ia = ri, oa = ot, fn = na, sa = ia(), pn = Vt, hn = Rt, aa = oa("%Math.floor
3808
3818
  return a(e, o, arguments);
3809
3819
  };
3810
3820
  u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
3811
- })(ti);
3812
- var Tr = ti.exports, ni = ot, ii = Tr, ca = ii(ni("String.prototype.indexOf")), kr = function(e, r) {
3813
- var n = ni(e, !!r);
3814
- return typeof n == "function" && ca(e, ".prototype.") > -1 ? ii(n) : n;
3815
- }, la = Dt(), da = kr, cr = da("Object.prototype.toString"), $t = function(e) {
3816
- return la && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
3817
- }, oi = function(e) {
3821
+ })(ei);
3822
+ var Tr = ei.exports, ri = st, ni = Tr, ua = ni(ri("String.prototype.indexOf")), kr = function(e, r) {
3823
+ var n = ri(e, !!r);
3824
+ return typeof n == "function" && ua(e, ".prototype.") > -1 ? ni(n) : n;
3825
+ }, ca = Ft(), la = kr, cr = la("Object.prototype.toString"), $t = function(e) {
3826
+ return ca && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
3827
+ }, ii = function(e) {
3818
3828
  return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && cr(e) !== "[object Array]" && cr(e.callee) === "[object Function]";
3819
- }, fa = function() {
3829
+ }, da = function() {
3820
3830
  return $t(arguments);
3821
3831
  }();
3822
- $t.isLegacyArguments = oi;
3823
- var pa = fa ? $t : oi, ha = Object.prototype.toString, ya = Function.prototype.toString, ga = /^\s*(?:function)?\*/, si = Dt(), Gt = Object.getPrototypeOf, ma = function() {
3824
- if (!si)
3832
+ $t.isLegacyArguments = ii;
3833
+ var fa = da ? $t : ii, pa = Object.prototype.toString, ha = Function.prototype.toString, ya = /^\s*(?:function)?\*/, oi = Ft(), Qt = Object.getPrototypeOf, ga = function() {
3834
+ if (!oi)
3825
3835
  return !1;
3826
3836
  try {
3827
3837
  return Function("return function*() {}")();
3828
3838
  } catch {
3829
3839
  }
3830
- }, zt, ba = function(e) {
3840
+ }, Gt, ma = function(e) {
3831
3841
  if (typeof e != "function")
3832
3842
  return !1;
3833
- if (ga.test(ya.call(e)))
3843
+ if (ya.test(ha.call(e)))
3834
3844
  return !0;
3835
- if (!si) {
3836
- var r = ha.call(e);
3845
+ if (!oi) {
3846
+ var r = pa.call(e);
3837
3847
  return r === "[object GeneratorFunction]";
3838
3848
  }
3839
- if (!Gt)
3849
+ if (!Qt)
3840
3850
  return !1;
3841
- if (typeof zt > "u") {
3842
- var n = ma();
3843
- zt = n ? Gt(n) : !1;
3851
+ if (typeof Gt > "u") {
3852
+ var n = ga();
3853
+ Gt = n ? Qt(n) : !1;
3844
3854
  }
3845
- return Gt(e) === zt;
3846
- }, ai = Function.prototype.toString, qe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, lr, gt;
3847
- if (typeof qe == "function" && typeof Object.defineProperty == "function")
3855
+ return Qt(e) === Gt;
3856
+ }, si = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, lr, gt;
3857
+ if (typeof xe == "function" && typeof Object.defineProperty == "function")
3848
3858
  try {
3849
3859
  lr = Object.defineProperty({}, "length", {
3850
3860
  get: function() {
3851
3861
  throw gt;
3852
3862
  }
3853
- }), gt = {}, qe(function() {
3863
+ }), gt = {}, xe(function() {
3854
3864
  throw 42;
3855
3865
  }, null, lr);
3856
3866
  } catch (t) {
3857
- t !== gt && (qe = null);
3867
+ t !== gt && (xe = null);
3858
3868
  }
3859
3869
  else
3860
- qe = null;
3861
- var va = /^\s*class\b/, dr = function(e) {
3870
+ xe = null;
3871
+ var ba = /^\s*class\b/, dr = function(e) {
3862
3872
  try {
3863
- var r = ai.call(e);
3864
- return va.test(r);
3873
+ var r = si.call(e);
3874
+ return ba.test(r);
3865
3875
  } catch {
3866
3876
  return !1;
3867
3877
  }
3868
- }, Kt = function(e) {
3878
+ }, zt = function(e) {
3869
3879
  try {
3870
- return dr(e) ? !1 : (ai.call(e), !0);
3880
+ return dr(e) ? !1 : (si.call(e), !0);
3871
3881
  } catch {
3872
3882
  return !1;
3873
3883
  }
3874
- }, mt = Object.prototype.toString, Sa = "[object Object]", wa = "[object Function]", Aa = "[object GeneratorFunction]", Ea = "[object HTMLAllCollection]", Ia = "[object HTML document.all class]", Oa = "[object HTMLCollection]", Ta = typeof Symbol == "function" && !!Symbol.toStringTag, ka = !(0 in [,]), fr = function() {
3884
+ }, mt = Object.prototype.toString, va = "[object Object]", Sa = "[object Function]", wa = "[object GeneratorFunction]", Aa = "[object HTMLAllCollection]", Ea = "[object HTML document.all class]", Ia = "[object HTMLCollection]", Oa = typeof Symbol == "function" && !!Symbol.toStringTag, Ta = !(0 in [,]), fr = function() {
3875
3885
  return !1;
3876
3886
  };
3877
3887
  if (typeof document == "object") {
3878
- var _a = document.all;
3879
- mt.call(_a) === mt.call(document.all) && (fr = function(e) {
3880
- if ((ka || !e) && (typeof e > "u" || typeof e == "object"))
3888
+ var ka = document.all;
3889
+ mt.call(ka) === mt.call(document.all) && (fr = function(e) {
3890
+ if ((Ta || !e) && (typeof e > "u" || typeof e == "object"))
3881
3891
  try {
3882
3892
  var r = mt.call(e);
3883
- return (r === Ea || r === Ia || r === Oa || r === Sa) && e("") == null;
3893
+ return (r === Aa || r === Ea || r === Ia || r === va) && e("") == null;
3884
3894
  } catch {
3885
3895
  }
3886
3896
  return !1;
3887
3897
  });
3888
3898
  }
3889
- var Ca = qe ? function(e) {
3899
+ var _a = xe ? function(e) {
3890
3900
  if (fr(e))
3891
3901
  return !0;
3892
3902
  if (!e || typeof e != "function" && typeof e != "object")
3893
3903
  return !1;
3894
3904
  try {
3895
- qe(e, null, lr);
3905
+ xe(e, null, lr);
3896
3906
  } catch (r) {
3897
3907
  if (r !== gt)
3898
3908
  return !1;
3899
3909
  }
3900
- return !dr(e) && Kt(e);
3910
+ return !dr(e) && zt(e);
3901
3911
  } : function(e) {
3902
3912
  if (fr(e))
3903
3913
  return !0;
3904
3914
  if (!e || typeof e != "function" && typeof e != "object")
3905
3915
  return !1;
3906
- if (Ta)
3907
- return Kt(e);
3916
+ if (Oa)
3917
+ return zt(e);
3908
3918
  if (dr(e))
3909
3919
  return !1;
3910
3920
  var r = mt.call(e);
3911
- return r !== wa && r !== Aa && !/^\[object HTML/.test(r) ? !1 : Kt(e);
3912
- }, La = Ca, Pa = Object.prototype.toString, ui = Object.prototype.hasOwnProperty, Na = function(e, r, n) {
3921
+ return r !== Sa && r !== wa && !/^\[object HTML/.test(r) ? !1 : zt(e);
3922
+ }, Ca = _a, La = Object.prototype.toString, ai = Object.prototype.hasOwnProperty, Pa = function(e, r, n) {
3913
3923
  for (var i = 0, o = e.length; i < o; i++)
3914
- ui.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3915
- }, Fa = function(e, r, n) {
3924
+ ai.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3925
+ }, Na = function(e, r, n) {
3916
3926
  for (var i = 0, o = e.length; i < o; i++)
3917
3927
  n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
3918
3928
  }, Da = function(e, r, n) {
3919
3929
  for (var i in e)
3920
- ui.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3921
- }, Ra = function(e, r, n) {
3922
- if (!La(r))
3930
+ ai.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3931
+ }, Fa = function(e, r, n) {
3932
+ if (!Ca(r))
3923
3933
  throw new TypeError("iterator must be a function");
3924
3934
  var i;
3925
- arguments.length >= 3 && (i = n), Pa.call(e) === "[object Array]" ? Na(e, r, i) : typeof e == "string" ? Fa(e, r, i) : Da(e, r, i);
3926
- }, ci = Ra, Va = [
3935
+ arguments.length >= 3 && (i = n), La.call(e) === "[object Array]" ? Pa(e, r, i) : typeof e == "string" ? Na(e, r, i) : Da(e, r, i);
3936
+ }, ui = Fa, Ra = [
3927
3937
  "Float32Array",
3928
3938
  "Float64Array",
3929
3939
  "Int8Array",
@@ -3935,22 +3945,22 @@ var Ca = qe ? function(e) {
3935
3945
  "Uint32Array",
3936
3946
  "BigInt64Array",
3937
3947
  "BigUint64Array"
3938
- ], Ht = Va, $a = typeof globalThis > "u" ? Sr : globalThis, li = function() {
3939
- for (var e = [], r = 0; r < Ht.length; r++)
3940
- typeof $a[Ht[r]] == "function" && (e[e.length] = Ht[r]);
3948
+ ], Kt = Ra, Va = typeof globalThis > "u" ? Sr : globalThis, ci = function() {
3949
+ for (var e = [], r = 0; r < Kt.length; r++)
3950
+ typeof Va[Kt[r]] == "function" && (e[e.length] = Kt[r]);
3941
3951
  return e;
3942
- }, It = ci, Ma = li, yn = Tr, _r = kr, bt = Vt, Ba = _r("Object.prototype.toString"), di = Dt(), gn = typeof globalThis > "u" ? Sr : globalThis, pr = Ma(), Cr = _r("String.prototype.slice"), Wt = Object.getPrototypeOf, Ua = _r("Array.prototype.indexOf", !0) || function(e, r) {
3952
+ }, It = ui, $a = ci, yn = Tr, _r = kr, bt = Vt, Ma = _r("Object.prototype.toString"), li = Ft(), gn = typeof globalThis > "u" ? Sr : globalThis, pr = $a(), Cr = _r("String.prototype.slice"), Ht = Object.getPrototypeOf, Ba = _r("Array.prototype.indexOf", !0) || function(e, r) {
3943
3953
  for (var n = 0; n < e.length; n += 1)
3944
3954
  if (e[n] === r)
3945
3955
  return n;
3946
3956
  return -1;
3947
3957
  }, Ot = { __proto__: null };
3948
- di && bt && Wt ? It(pr, function(t) {
3958
+ li && bt && Ht ? It(pr, function(t) {
3949
3959
  var e = new gn[t]();
3950
3960
  if (Symbol.toStringTag in e) {
3951
- var r = Wt(e), n = bt(r, Symbol.toStringTag);
3961
+ var r = Ht(e), n = bt(r, Symbol.toStringTag);
3952
3962
  if (!n) {
3953
- var i = Wt(r);
3963
+ var i = Ht(r);
3954
3964
  n = bt(i, Symbol.toStringTag);
3955
3965
  }
3956
3966
  Ot["$" + t] = yn(n.get);
@@ -3959,7 +3969,7 @@ di && bt && Wt ? It(pr, function(t) {
3959
3969
  var e = new gn[t](), r = e.slice || e.set;
3960
3970
  r && (Ot["$" + t] = yn(r));
3961
3971
  });
3962
- var ja = function(e) {
3972
+ var Ua = function(e) {
3963
3973
  var r = !1;
3964
3974
  return It(Ot, function(n, i) {
3965
3975
  if (!r)
@@ -3968,7 +3978,7 @@ var ja = function(e) {
3968
3978
  } catch {
3969
3979
  }
3970
3980
  }), r;
3971
- }, qa = function(e) {
3981
+ }, ja = function(e) {
3972
3982
  var r = !1;
3973
3983
  return It(Ot, function(n, i) {
3974
3984
  if (!r)
@@ -3980,23 +3990,23 @@ var ja = function(e) {
3980
3990
  }, xa = function(e) {
3981
3991
  if (!e || typeof e != "object")
3982
3992
  return !1;
3983
- if (!di) {
3984
- var r = Cr(Ba(e), 8, -1);
3985
- return Ua(pr, r) > -1 ? r : r !== "Object" ? !1 : qa(e);
3993
+ if (!li) {
3994
+ var r = Cr(Ma(e), 8, -1);
3995
+ return Ba(pr, r) > -1 ? r : r !== "Object" ? !1 : ja(e);
3986
3996
  }
3987
- return bt ? ja(e) : null;
3988
- }, Tt = ci, Qa = li, mn = Tr, Lr = kr, vt = Vt, Ga = Lr("Object.prototype.toString"), fi = Dt(), bn = typeof globalThis > "u" ? Sr : globalThis, hr = Qa(), Pr = Lr("String.prototype.slice"), Yt = Object.getPrototypeOf, za = Lr("Array.prototype.indexOf", !0) || function(e, r) {
3997
+ return bt ? Ua(e) : null;
3998
+ }, Tt = ui, qa = ci, mn = Tr, Lr = kr, vt = Vt, Qa = Lr("Object.prototype.toString"), di = Ft(), bn = typeof globalThis > "u" ? Sr : globalThis, hr = qa(), Pr = Lr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ga = Lr("Array.prototype.indexOf", !0) || function(e, r) {
3989
3999
  for (var n = 0; n < e.length; n += 1)
3990
4000
  if (e[n] === r)
3991
4001
  return n;
3992
4002
  return -1;
3993
4003
  }, kt = { __proto__: null };
3994
- fi && vt && Yt ? Tt(hr, function(t) {
4004
+ di && vt && Wt ? Tt(hr, function(t) {
3995
4005
  var e = new bn[t]();
3996
4006
  if (Symbol.toStringTag in e) {
3997
- var r = Yt(e), n = vt(r, Symbol.toStringTag);
4007
+ var r = Wt(e), n = vt(r, Symbol.toStringTag);
3998
4008
  if (!n) {
3999
- var i = Yt(r);
4009
+ var i = Wt(r);
4000
4010
  n = vt(i, Symbol.toStringTag);
4001
4011
  }
4002
4012
  kt["$" + t] = mn(n.get);
@@ -4005,7 +4015,7 @@ fi && vt && Yt ? Tt(hr, function(t) {
4005
4015
  var e = new bn[t](), r = e.slice || e.set;
4006
4016
  r && (kt["$" + t] = mn(r));
4007
4017
  });
4008
- var Ka = function(e) {
4018
+ var za = function(e) {
4009
4019
  var r = !1;
4010
4020
  return Tt(
4011
4021
  // eslint-disable-next-line no-extra-parens
@@ -4021,7 +4031,7 @@ var Ka = function(e) {
4021
4031
  }
4022
4032
  }
4023
4033
  ), r;
4024
- }, Ha = function(e) {
4034
+ }, Ka = function(e) {
4025
4035
  var r = !1;
4026
4036
  return Tt(
4027
4037
  // eslint-disable-next-line no-extra-parens
@@ -4037,19 +4047,19 @@ var Ka = function(e) {
4037
4047
  }
4038
4048
  }
4039
4049
  ), r;
4040
- }, Wa = function(e) {
4050
+ }, Ha = function(e) {
4041
4051
  if (!e || typeof e != "object")
4042
4052
  return !1;
4043
- if (!fi) {
4044
- var r = Pr(Ga(e), 8, -1);
4045
- return za(hr, r) > -1 ? r : r !== "Object" ? !1 : Ha(e);
4053
+ if (!di) {
4054
+ var r = Pr(Qa(e), 8, -1);
4055
+ return Ga(hr, r) > -1 ? r : r !== "Object" ? !1 : Ka(e);
4046
4056
  }
4047
- return vt ? Ka(e) : null;
4048
- }, Ya = Wa, Ja = function(e) {
4049
- return !!Ya(e);
4057
+ return vt ? za(e) : null;
4058
+ }, Wa = Ha, Ya = function(e) {
4059
+ return !!Wa(e);
4050
4060
  };
4051
4061
  (function(t) {
4052
- var e = pa, r = ba, n = xa, i = Ja;
4062
+ var e = fa, r = ma, n = xa, i = Ya;
4053
4063
  function o(y) {
4054
4064
  return y.call.bind(y);
4055
4065
  }
@@ -4058,11 +4068,11 @@ var Ka = function(e) {
4058
4068
  var p = o(BigInt.prototype.valueOf);
4059
4069
  if (a)
4060
4070
  var b = o(Symbol.prototype.valueOf);
4061
- function S(y, vi) {
4071
+ function S(y, bi) {
4062
4072
  if (typeof y != "object")
4063
4073
  return !1;
4064
4074
  try {
4065
- return vi(y), !0;
4075
+ return bi(y), !0;
4066
4076
  } catch {
4067
4077
  return !1;
4068
4078
  }
@@ -4112,10 +4122,10 @@ var Ka = function(e) {
4112
4122
  return n(y) === "Float64Array";
4113
4123
  }
4114
4124
  t.isFloat64Array = ue;
4115
- function Fe(y) {
4125
+ function De(y) {
4116
4126
  return n(y) === "BigInt64Array";
4117
4127
  }
4118
- t.isBigInt64Array = Fe;
4128
+ t.isBigInt64Array = De;
4119
4129
  function Te(y) {
4120
4130
  return n(y) === "BigUint64Array";
4121
4131
  }
@@ -4136,12 +4146,12 @@ var Ka = function(e) {
4136
4146
  return typeof Set > "u" ? !1 : Ie.working ? Ie(y) : y instanceof Set;
4137
4147
  }
4138
4148
  t.isSet = Ye;
4139
- function De(y) {
4149
+ function Fe(y) {
4140
4150
  return u(y) === "[object WeakMap]";
4141
4151
  }
4142
- De.working = typeof WeakMap < "u" && De(/* @__PURE__ */ new WeakMap());
4152
+ Fe.working = typeof WeakMap < "u" && Fe(/* @__PURE__ */ new WeakMap());
4143
4153
  function Bt(y) {
4144
- return typeof WeakMap > "u" ? !1 : De.working ? De(y) : y instanceof WeakMap;
4154
+ return typeof WeakMap > "u" ? !1 : Fe.working ? Fe(y) : y instanceof WeakMap;
4145
4155
  }
4146
4156
  t.isWeakMap = Bt;
4147
4157
  function Re(y) {
@@ -4156,10 +4166,10 @@ var Ka = function(e) {
4156
4166
  return u(y) === "[object ArrayBuffer]";
4157
4167
  }
4158
4168
  Ve.working = typeof ArrayBuffer < "u" && Ve(new ArrayBuffer());
4159
- function st(y) {
4169
+ function at(y) {
4160
4170
  return typeof ArrayBuffer > "u" ? !1 : Ve.working ? Ve(y) : y instanceof ArrayBuffer;
4161
4171
  }
4162
- t.isArrayBuffer = st;
4172
+ t.isArrayBuffer = at;
4163
4173
  function f(y) {
4164
4174
  return u(y) === "[object DataView]";
4165
4175
  }
@@ -4188,10 +4198,10 @@ var Ka = function(e) {
4188
4198
  return u(y) === "[object Set Iterator]";
4189
4199
  }
4190
4200
  t.isSetIterator = _;
4191
- function F(y) {
4201
+ function D(y) {
4192
4202
  return u(y) === "[object Generator]";
4193
4203
  }
4194
- t.isGeneratorObject = F;
4204
+ t.isGeneratorObject = D;
4195
4205
  function Y(y) {
4196
4206
  return u(y) === "[object WebAssembly.Module]";
4197
4207
  }
@@ -4200,30 +4210,30 @@ var Ka = function(e) {
4200
4210
  return S(y, d);
4201
4211
  }
4202
4212
  t.isNumberObject = ke;
4203
- function at(y) {
4213
+ function ut(y) {
4204
4214
  return S(y, c);
4205
4215
  }
4206
- t.isStringObject = at;
4216
+ t.isStringObject = ut;
4207
4217
  function $e(y) {
4208
4218
  return S(y, l);
4209
4219
  }
4210
4220
  t.isBooleanObject = $e;
4211
- function ut(y) {
4221
+ function ct(y) {
4212
4222
  return s && S(y, p);
4213
4223
  }
4214
- t.isBigIntObject = ut;
4215
- function Dr(y) {
4224
+ t.isBigIntObject = ct;
4225
+ function Fr(y) {
4216
4226
  return a && S(y, b);
4217
4227
  }
4218
- t.isSymbolObject = Dr;
4219
- function mi(y) {
4220
- return ke(y) || at(y) || $e(y) || ut(y) || Dr(y);
4228
+ t.isSymbolObject = Fr;
4229
+ function gi(y) {
4230
+ return ke(y) || ut(y) || $e(y) || ct(y) || Fr(y);
4221
4231
  }
4222
- t.isBoxedPrimitive = mi;
4223
- function bi(y) {
4224
- return typeof Uint8Array < "u" && (st(y) || C(y));
4232
+ t.isBoxedPrimitive = gi;
4233
+ function mi(y) {
4234
+ return typeof Uint8Array < "u" && (at(y) || C(y));
4225
4235
  }
4226
- t.isAnyArrayBuffer = bi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4236
+ t.isAnyArrayBuffer = mi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4227
4237
  Object.defineProperty(t, y, {
4228
4238
  enumerable: !1,
4229
4239
  value: function() {
@@ -4231,8 +4241,8 @@ var Ka = function(e) {
4231
4241
  }
4232
4242
  });
4233
4243
  });
4234
- })(Jn);
4235
- var Xa = function(e) {
4244
+ })(Yn);
4245
+ var Ja = function(e) {
4236
4246
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
4237
4247
  }, yr = { exports: {} };
4238
4248
  typeof Object.create == "function" ? yr.exports = function(e, r) {
@@ -4252,7 +4262,7 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
4252
4262
  n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
4253
4263
  }
4254
4264
  };
4255
- var Za = yr.exports;
4265
+ var Xa = yr.exports;
4256
4266
  (function(t) {
4257
4267
  var e = Object.getOwnPropertyDescriptors || function(h) {
4258
4268
  for (var g = Object.keys(h), w = {}, C = 0; C < g.length; C++)
@@ -4386,25 +4396,25 @@ var Za = yr.exports;
4386
4396
  }
4387
4397
  if (ae(h))
4388
4398
  return f.stylize(RegExp.prototype.toString.call(h), "regexp");
4389
- if (Fe(h))
4399
+ if (De(h))
4390
4400
  return f.stylize(Date.prototype.toString.call(h), "date");
4391
4401
  if (Te(h))
4392
4402
  return p(h);
4393
4403
  }
4394
- var F = "", Y = !1, ke = ["{", "}"];
4404
+ var D = "", Y = !1, ke = ["{", "}"];
4395
4405
  if (v(h) && (Y = !0, ke = ["[", "]"]), pe(h)) {
4396
- var at = h.name ? ": " + h.name : "";
4397
- F = " [Function" + at + "]";
4406
+ var ut = h.name ? ": " + h.name : "";
4407
+ D = " [Function" + ut + "]";
4398
4408
  }
4399
- if (ae(h) && (F = " " + RegExp.prototype.toString.call(h)), Fe(h) && (F = " " + Date.prototype.toUTCString.call(h)), Te(h) && (F = " " + p(h)), L.length === 0 && (!Y || h.length == 0))
4400
- return ke[0] + F + ke[1];
4409
+ if (ae(h) && (D = " " + RegExp.prototype.toString.call(h)), De(h) && (D = " " + Date.prototype.toUTCString.call(h)), Te(h) && (D = " " + p(h)), L.length === 0 && (!Y || h.length == 0))
4410
+ return ke[0] + D + ke[1];
4401
4411
  if (g < 0)
4402
4412
  return ae(h) ? f.stylize(RegExp.prototype.toString.call(h), "regexp") : f.stylize("[Object]", "special");
4403
4413
  f.seen.push(h);
4404
4414
  var $e;
4405
- return Y ? $e = b(f, h, g, I, L) : $e = L.map(function(ut) {
4406
- return S(f, h, g, I, ut, Y);
4407
- }), f.seen.pop(), m($e, F, ke);
4415
+ return Y ? $e = b(f, h, g, I, L) : $e = L.map(function(ct) {
4416
+ return S(f, h, g, I, ct, Y);
4417
+ }), f.seen.pop(), m($e, D, ke);
4408
4418
  }
4409
4419
  function l(f, h) {
4410
4420
  if (T(h))
@@ -4433,20 +4443,20 @@ var Za = yr.exports;
4433
4443
  String(I),
4434
4444
  !0
4435
4445
  )) : L.push("");
4436
- return C.forEach(function(F) {
4437
- F.match(/^\d+$/) || L.push(S(
4446
+ return C.forEach(function(D) {
4447
+ D.match(/^\d+$/) || L.push(S(
4438
4448
  f,
4439
4449
  h,
4440
4450
  g,
4441
4451
  w,
4442
- F,
4452
+ D,
4443
4453
  !0
4444
4454
  ));
4445
4455
  }), L;
4446
4456
  }
4447
4457
  function S(f, h, g, w, C, L) {
4448
- var I, _, F;
4449
- if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? _ = f.stylize("[Getter/Setter]", "special") : _ = f.stylize("[Getter]", "special") : F.set && (_ = f.stylize("[Setter]", "special")), Re(w, C) || (I = "[" + C + "]"), _ || (f.seen.indexOf(F.value) < 0 ? (V(g) ? _ = c(f, F.value, null) : _ = c(f, F.value, g - 1), _.indexOf(`
4458
+ var I, _, D;
4459
+ if (D = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, D.get ? D.set ? _ = f.stylize("[Getter/Setter]", "special") : _ = f.stylize("[Getter]", "special") : D.set && (_ = f.stylize("[Setter]", "special")), Re(w, C) || (I = "[" + C + "]"), _ || (f.seen.indexOf(D.value) < 0 ? (V(g) ? _ = c(f, D.value, null) : _ = c(f, D.value, g - 1), _.indexOf(`
4450
4460
  `) > -1 && (L ? _ = _.split(`
4451
4461
  `).map(function(Y) {
4452
4462
  return " " + Y;
@@ -4472,7 +4482,7 @@ var Za = yr.exports;
4472
4482
  `) + " " + f.join(`,
4473
4483
  `) + " " + g[1] : g[0] + h + " " + f.join(", ") + " " + g[1];
4474
4484
  }
4475
- t.types = Jn;
4485
+ t.types = Yn;
4476
4486
  function v(f) {
4477
4487
  return Array.isArray(f);
4478
4488
  }
@@ -4513,10 +4523,10 @@ var Za = yr.exports;
4513
4523
  return typeof f == "object" && f !== null;
4514
4524
  }
4515
4525
  t.isObject = ue;
4516
- function Fe(f) {
4526
+ function De(f) {
4517
4527
  return ue(f) && Ie(f) === "[object Date]";
4518
4528
  }
4519
- t.isDate = Fe, t.types.isDate = Fe;
4529
+ t.isDate = De, t.types.isDate = De;
4520
4530
  function Te(f) {
4521
4531
  return ue(f) && (Ie(f) === "[object Error]" || f instanceof Error);
4522
4532
  }
@@ -4529,14 +4539,14 @@ var Za = yr.exports;
4529
4539
  return f === null || typeof f == "boolean" || typeof f == "number" || typeof f == "string" || typeof f == "symbol" || // ES6 symbol
4530
4540
  typeof f > "u";
4531
4541
  }
4532
- t.isPrimitive = Mt, t.isBuffer = Xa;
4542
+ t.isPrimitive = Mt, t.isBuffer = Ja;
4533
4543
  function Ie(f) {
4534
4544
  return Object.prototype.toString.call(f);
4535
4545
  }
4536
4546
  function Ye(f) {
4537
4547
  return f < 10 ? "0" + f.toString(10) : f.toString(10);
4538
4548
  }
4539
- var De = [
4549
+ var Fe = [
4540
4550
  "Jan",
4541
4551
  "Feb",
4542
4552
  "Mar",
@@ -4556,11 +4566,11 @@ var Za = yr.exports;
4556
4566
  Ye(f.getMinutes()),
4557
4567
  Ye(f.getSeconds())
4558
4568
  ].join(":");
4559
- return [f.getDate(), De[f.getMonth()], h].join(" ");
4569
+ return [f.getDate(), Fe[f.getMonth()], h].join(" ");
4560
4570
  }
4561
4571
  t.log = function() {
4562
4572
  console.log("%s - %s", Bt(), t.format.apply(t, arguments));
4563
- }, t.inherits = Za, t._extend = function(f, h) {
4573
+ }, t.inherits = Xa, t._extend = function(f, h) {
4564
4574
  if (!h || !ue(h)) return f;
4565
4575
  for (var g = Object.keys(h), w = g.length; w--; )
4566
4576
  f[g[w]] = h[g[w]];
@@ -4585,17 +4595,17 @@ var Za = yr.exports;
4585
4595
  }), g;
4586
4596
  }
4587
4597
  function g() {
4588
- for (var w, C, L = new Promise(function(F, Y) {
4589
- w = F, C = Y;
4598
+ for (var w, C, L = new Promise(function(D, Y) {
4599
+ w = D, C = Y;
4590
4600
  }), I = [], _ = 0; _ < arguments.length; _++)
4591
4601
  I.push(arguments[_]);
4592
- I.push(function(F, Y) {
4593
- F ? C(F) : w(Y);
4602
+ I.push(function(D, Y) {
4603
+ D ? C(D) : w(Y);
4594
4604
  });
4595
4605
  try {
4596
4606
  h.apply(this, I);
4597
- } catch (F) {
4598
- C(F);
4607
+ } catch (D) {
4608
+ C(D);
4599
4609
  }
4600
4610
  return L;
4601
4611
  }
@@ -4616,7 +4626,7 @@ var Za = yr.exports;
4616
4626
  }
4617
4627
  return h(f);
4618
4628
  }
4619
- function st(f) {
4629
+ function at(f) {
4620
4630
  if (typeof f != "function")
4621
4631
  throw new TypeError('The "original" argument must be of type Function');
4622
4632
  function h() {
@@ -4642,22 +4652,22 @@ var Za = yr.exports;
4642
4652
  e(f)
4643
4653
  ), h;
4644
4654
  }
4645
- t.callbackify = st;
4646
- })(Ft);
4647
- const { inherits: eu, format: Jt } = Ft;
4655
+ t.callbackify = at;
4656
+ })(Dt);
4657
+ const { inherits: Za, format: Yt } = Dt;
4648
4658
  function _e(t, e, r = Error) {
4649
4659
  if (!t) throw new Error("Avvio error code must not be empty");
4650
4660
  if (!e) throw new Error("Avvio base error message must not be empty");
4651
4661
  function n(i, o, s) {
4652
4662
  if (!new.target)
4653
4663
  return new n(i, o, s);
4654
- Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Jt(e, i, o, s) : i && o ? this.message = Jt(e, i, o) : i ? this.message = Jt(e, i) : this.message = e;
4664
+ Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Yt(e, i, o, s) : i && o ? this.message = Yt(e, i, o) : i ? this.message = Yt(e, i) : this.message = e;
4655
4665
  }
4656
4666
  return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
4657
4667
  return `${this.name} [${this.code}]: ${this.message}`;
4658
- }, eu(n, r), n;
4668
+ }, Za(n, r), n;
4659
4669
  }
4660
- var pi = {
4670
+ var fi = {
4661
4671
  createError: _e,
4662
4672
  AVV_ERR_EXPOSE_ALREADY_DEFINED: _e(
4663
4673
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
@@ -4683,7 +4693,7 @@ var pi = {
4683
4693
  "AVV_ERR_READY_TIMEOUT",
4684
4694
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
4685
4695
  )
4686
- }, tu = function t(e, r, n) {
4696
+ }, eu = function t(e, r, n) {
4687
4697
  r === void 0 && (r = ""), n || (n = {});
4688
4698
  var i = function(u) {
4689
4699
  var d = {
@@ -4705,12 +4715,12 @@ var pi = {
4705
4715
  return r + i(c ? "└" : "├") + i("─") + i(l ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
4706
4716
  }).join("");
4707
4717
  };
4708
- const ru = tu, vn = Symbol("avvio.TimeTree.untrackNode"), Xt = Symbol("avvio.TimeTree.trackNode"), Sn = Symbol("avvio.TimeTree.getParent"), wn = Symbol("avvio.TimeTree.getNode"), An = Symbol("avvio.TimeTree.addNode");
4709
- let nu = class {
4718
+ const tu = eu, vn = Symbol("avvio.TimeTree.untrackNode"), Jt = Symbol("avvio.TimeTree.trackNode"), Sn = Symbol("avvio.TimeTree.getParent"), wn = Symbol("avvio.TimeTree.getNode"), An = Symbol("avvio.TimeTree.addNode");
4719
+ let ru = class {
4710
4720
  constructor() {
4711
4721
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
4712
4722
  }
4713
- [Xt](e) {
4723
+ [Jt](e) {
4714
4724
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
4715
4725
  }
4716
4726
  [vn](e) {
@@ -4738,7 +4748,7 @@ let nu = class {
4738
4748
  label: r,
4739
4749
  start: n,
4740
4750
  nodes: []
4741
- }, this[Xt](this.root), this.root.id;
4751
+ }, this[Jt](this.root), this.root.id;
4742
4752
  const o = this[Sn](e), s = `${r}-${Math.random()}`, a = {
4743
4753
  id: s,
4744
4754
  parent: e,
@@ -4746,7 +4756,7 @@ let nu = class {
4746
4756
  label: r,
4747
4757
  nodes: []
4748
4758
  };
4749
- return o.nodes.push(a), this[Xt](a), s;
4759
+ return o.nodes.push(a), this[Jt](a), s;
4750
4760
  }
4751
4761
  start(e, r, n = Date.now()) {
4752
4762
  return this[An](e, r, n);
@@ -4760,15 +4770,15 @@ let nu = class {
4760
4770
  }
4761
4771
  prittyPrint() {
4762
4772
  const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
4763
- return ru(r);
4773
+ return tu(r);
4764
4774
  }
4765
4775
  };
4766
- var iu = nu, Nr = { exports: {} }, gr = { exports: {} }, Zt, En;
4767
- function ou() {
4768
- if (En) return Zt;
4776
+ var nu = ru, Nr = { exports: {} }, gr = { exports: {} }, Xt, En;
4777
+ function iu() {
4778
+ if (En) return Xt;
4769
4779
  En = 1;
4770
4780
  var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
4771
- Zt = function(c, l) {
4781
+ Xt = function(c, l) {
4772
4782
  l = l || {};
4773
4783
  var p = typeof c;
4774
4784
  if (p === "string" && c.length > 0)
@@ -4843,10 +4853,10 @@ function ou() {
4843
4853
  var S = l >= p * 1.5;
4844
4854
  return Math.round(c / p) + " " + b + (S ? "s" : "");
4845
4855
  }
4846
- return Zt;
4856
+ return Xt;
4847
4857
  }
4848
- function su(t) {
4849
- r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = ou(), r.destroy = d, Object.keys(t).forEach((c) => {
4858
+ function ou(t) {
4859
+ r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = iu(), r.destroy = d, Object.keys(t).forEach((c) => {
4850
4860
  r[c] = t[c];
4851
4861
  }), r.names = [], r.skips = [], r.formatters = {};
4852
4862
  function e(c) {
@@ -4926,7 +4936,7 @@ function su(t) {
4926
4936
  }
4927
4937
  return r.enable(r.load()), r;
4928
4938
  }
4929
- var au = su;
4939
+ var su = ou;
4930
4940
  (function(t, e) {
4931
4941
  e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
4932
4942
  let u = !1;
@@ -5050,7 +5060,7 @@ var au = su;
5050
5060
  } catch {
5051
5061
  }
5052
5062
  }
5053
- t.exports = au(e);
5063
+ t.exports = su(e);
5054
5064
  const { formatters: a } = t.exports;
5055
5065
  a.j = function(u) {
5056
5066
  try {
@@ -5060,22 +5070,22 @@ var au = su;
5060
5070
  }
5061
5071
  };
5062
5072
  })(gr, gr.exports);
5063
- var hi = gr.exports;
5064
- const uu = jn, cu = Yn.EventEmitter, lu = Ft.inherits, j = hi("avvio"), { AVV_ERR_READY_TIMEOUT: du } = pi, er = Symbol.for("plugin-meta");
5065
- function fu(t, e) {
5066
- return t[er] && t[er].name ? t[er].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
5073
+ var pi = gr.exports;
5074
+ const au = Un, uu = Wn.EventEmitter, cu = Dt.inherits, j = pi("avvio"), { AVV_ERR_READY_TIMEOUT: lu } = fi, Zt = Symbol.for("plugin-meta");
5075
+ function du(t, e) {
5076
+ return t[Zt] && t[Zt].name ? t[Zt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
5067
5077
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
5068
5078
  }
5069
- function pu() {
5079
+ function fu() {
5070
5080
  const t = {};
5071
5081
  return t.promise = new Promise((e, r) => {
5072
5082
  t.resolve = e, t.reject = r;
5073
5083
  }), t;
5074
5084
  }
5075
5085
  function We(t, e, r, n, i) {
5076
- this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = fu(e, r), this.isAfter = n, this.q = uu(t, hu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
5086
+ this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = du(e, r), this.isAfter = n, this.q = au(t, pu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
5077
5087
  }
5078
- lu(We, cu);
5088
+ cu(We, uu);
5079
5089
  We.prototype.exec = function(t, e) {
5080
5090
  const r = this.func;
5081
5091
  let n = !1;
@@ -5103,7 +5113,7 @@ We.prototype.exec = function(t, e) {
5103
5113
  };
5104
5114
  this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
5105
5115
  j("timed out", i), o = null;
5106
- const u = new du(i);
5116
+ const u = new lu(i);
5107
5117
  u.fn = r, s(u);
5108
5118
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
5109
5119
  const a = r(this.server, this.opts, s);
@@ -5121,7 +5131,7 @@ We.prototype.loadedSoFar = function() {
5121
5131
  }), this.q.resume();
5122
5132
  };
5123
5133
  let e;
5124
- return this._promise ? e = Promise.resolve() : (this._promise = pu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
5134
+ return this._promise ? e = Promise.resolve() : (this._promise = fu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
5125
5135
  };
5126
5136
  We.prototype.enqueue = function(t, e) {
5127
5137
  j("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
@@ -5146,19 +5156,19 @@ We.prototype.finish = function(t, e) {
5146
5156
  r();
5147
5157
  else
5148
5158
  j("delayed", this.name), this.q.drain = () => {
5149
- j("drain", this.name), this.q.drain = yu, queueMicrotask(n);
5159
+ j("drain", this.name), this.q.drain = hu, queueMicrotask(n);
5150
5160
  };
5151
5161
  };
5152
5162
  queueMicrotask(n), this.q.resume();
5153
5163
  };
5154
- function hu(t, e) {
5164
+ function pu(t, e) {
5155
5165
  const r = this;
5156
- A.nextTick(Fr.bind(r), t, e);
5166
+ A.nextTick(Dr.bind(r), t, e);
5157
5167
  }
5158
- function Fr(t, e) {
5168
+ function Dr(t, e) {
5159
5169
  if (typeof t.func.then == "function") {
5160
5170
  t.func.then((n) => {
5161
- typeof n.default == "function" && (n = n.default), t.func = n, Fr.call(this, t, e);
5171
+ typeof n.default == "function" && (n = n.default), t.func = n, Dr.call(this, t, e);
5162
5172
  }, e);
5163
5173
  return;
5164
5174
  }
@@ -5169,54 +5179,54 @@ function Fr(t, e) {
5169
5179
  });
5170
5180
  });
5171
5181
  }
5172
- function yu() {
5182
+ function hu() {
5173
5183
  }
5174
5184
  Nr.exports = We;
5175
- Nr.exports.loadPlugin = Fr;
5176
- var gu = Nr.exports;
5177
- const In = jn, mu = Yn.EventEmitter, bu = Ft.inherits, {
5178
- AVV_ERR_EXPOSE_ALREADY_DEFINED: tr,
5179
- AVV_ERR_CALLBACK_NOT_FN: et,
5180
- AVV_ERR_PLUGIN_NOT_VALID: vu,
5181
- AVV_ERR_ROOT_PLG_BOOTED: Su,
5182
- AVV_ERR_READY_TIMEOUT: wu
5183
- } = pi, Au = iu, mr = gu, He = hi("avvio"), _t = Symbol("kAvvio"), rr = Symbol("kThenifyDoNotWrap");
5184
- function Eu(t, e, r) {
5185
+ Nr.exports.loadPlugin = Dr;
5186
+ var yu = Nr.exports;
5187
+ const In = Un, gu = Wn.EventEmitter, mu = Dt.inherits, {
5188
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
5189
+ AVV_ERR_CALLBACK_NOT_FN: tt,
5190
+ AVV_ERR_PLUGIN_NOT_VALID: bu,
5191
+ AVV_ERR_ROOT_PLG_BOOTED: vu,
5192
+ AVV_ERR_READY_TIMEOUT: Su
5193
+ } = fi, wu = nu, mr = yu, He = pi("avvio"), _t = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
5194
+ function Au(t, e, r) {
5185
5195
  const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
5186
5196
  if (t[i])
5187
- throw new tr(i);
5197
+ throw new er(i);
5188
5198
  if (t[o])
5189
- throw new tr(o);
5199
+ throw new er(o);
5190
5200
  if (t[s])
5191
- throw new tr(s);
5201
+ throw new er(s);
5192
5202
  t[i] = function(d, c) {
5193
5203
  return r.use(d, c), this;
5194
- }, Object.defineProperty(t, "then", { get: yi.bind(r) }), t[_t] = !0, t[o] = function(d) {
5195
- return typeof d != "function" ? r._loadRegistered() : (r.after(nr(d, this)), this);
5204
+ }, Object.defineProperty(t, "then", { get: hi.bind(r) }), t[_t] = !0, t[o] = function(d) {
5205
+ return typeof d != "function" ? r._loadRegistered() : (r.after(rr(d, this)), this);
5196
5206
  }, t[s] = function(d) {
5197
5207
  if (d && typeof d != "function")
5198
- throw new et(s, typeof d);
5199
- return r.ready(d ? nr(d, this) : void 0);
5208
+ throw new tt(s, typeof d);
5209
+ return r.ready(d ? rr(d, this) : void 0);
5200
5210
  }, t[a] = function(d) {
5201
5211
  if (typeof d != "function")
5202
- throw new et(a, typeof d);
5203
- return r.onClose(_u(d, this)), this;
5212
+ throw new tt(a, typeof d);
5213
+ return r.onClose(ku(d, this)), this;
5204
5214
  }, t[u] = function(d) {
5205
5215
  if (d && typeof d != "function")
5206
- throw new et(u, typeof d);
5207
- return d ? (r.close(nr(d, this)), this) : r.close();
5216
+ throw new tt(u, typeof d);
5217
+ return d ? (r.close(rr(d, this)), this) : r.close();
5208
5218
  };
5209
5219
  }
5210
5220
  function Q(t, e, r) {
5211
5221
  if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof Q)) {
5212
5222
  const n = new Q(t, e, r);
5213
- return t && Eu(t, e, n), n;
5223
+ return t && Au(t, e, n), n;
5214
5224
  }
5215
- 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 Au(), this._readyQ = In(this, gi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5225
+ 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 wu(), this._readyQ = In(this, yi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5216
5226
  this.emit("start"), this._readyQ.drain = On;
5217
- }, this._closeQ = In(this, ku, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5227
+ }, this._closeQ = In(this, Tu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5218
5228
  this.emit("close"), this._closeQ.drain = On;
5219
- }, this._doStart = null, this._root = new mr(this, Iu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5229
+ }, this._doStart = null, this._root = new mr(this, Eu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5220
5230
  const s = this.pluginTree.start(null, i, o);
5221
5231
  this._root.once("loaded", (a, u, d) => {
5222
5232
  this.pluginTree.stop(s, d);
@@ -5236,19 +5246,19 @@ function Q(t, e, r) {
5236
5246
  this._readyQ.resume();
5237
5247
  });
5238
5248
  }
5239
- function Iu(t, e, r) {
5249
+ function Eu(t, e, r) {
5240
5250
  this._doStart = r, e.autostart && this.start();
5241
5251
  }
5242
- bu(Q, mu);
5252
+ mu(Q, gu);
5243
5253
  Q.prototype.start = function() {
5244
5254
  return this.started = !0, A.nextTick(this._doStart), this;
5245
5255
  };
5246
5256
  Q.prototype.override = function(t, e, r) {
5247
5257
  return t;
5248
5258
  };
5249
- function Ou(t) {
5259
+ function Iu(t) {
5250
5260
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
5251
- throw new vu(typeof t);
5261
+ throw new bu(typeof t);
5252
5262
  return t;
5253
5263
  }
5254
5264
  Q.prototype[_t] = !0;
@@ -5259,10 +5269,10 @@ Q.prototype._loadRegistered = function() {
5259
5269
  const t = this._current[0];
5260
5270
  return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5261
5271
  };
5262
- Object.defineProperty(Q.prototype, "then", { get: yi });
5272
+ Object.defineProperty(Q.prototype, "then", { get: hi });
5263
5273
  Q.prototype._addPlugin = function(t, e, r) {
5264
- if (t = Ou(t), e = e || {}, this.booted)
5265
- throw new Su();
5274
+ if (t = Iu(t), e = e || {}, this.booted)
5275
+ throw new vu();
5266
5276
  const n = this._current[0], i = new mr(this, t, e, r);
5267
5277
  if (i.once("start", (o, s, a) => {
5268
5278
  const u = this.pluginTree.start(n.name, s, a);
@@ -5280,7 +5290,7 @@ Q.prototype.after = function(t) {
5280
5290
  return this._loadRegistered();
5281
5291
  this._addPlugin(e.bind(this), {}, !0);
5282
5292
  function e(r, n, i) {
5283
- gi.call(this, t, i);
5293
+ yi.call(this, t, i);
5284
5294
  }
5285
5295
  return this;
5286
5296
  };
@@ -5297,7 +5307,7 @@ Q.prototype.close = function(t) {
5297
5307
  let e;
5298
5308
  if (t) {
5299
5309
  if (typeof t != "function")
5300
- throw new et("close", typeof t);
5310
+ throw new tt("close", typeof t);
5301
5311
  } else
5302
5312
  e = new Promise(function(r, n) {
5303
5313
  t = function(i) {
@@ -5313,7 +5323,7 @@ Q.prototype.close = function(t) {
5313
5323
  Q.prototype.ready = function(t) {
5314
5324
  if (t) {
5315
5325
  if (typeof t != "function")
5316
- throw new et("ready", typeof t);
5326
+ throw new tt("ready", typeof t);
5317
5327
  this._readyQ.push(t), queueMicrotask(this.start.bind(this));
5318
5328
  return;
5319
5329
  }
@@ -5333,18 +5343,18 @@ Q.prototype.toJSON = function() {
5333
5343
  };
5334
5344
  function On() {
5335
5345
  }
5336
- function yi() {
5346
+ function hi() {
5337
5347
  if (this.booted) {
5338
5348
  He("thenify returning null because we are already booted");
5339
5349
  return;
5340
5350
  }
5341
- if (this[rr]) {
5342
- this[rr] = !1;
5351
+ if (this[tr]) {
5352
+ this[tr] = !1;
5343
5353
  return;
5344
5354
  }
5345
- return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[rr] = !0, t(this._server)), e);
5355
+ return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[tr] = !0, t(this._server)), e);
5346
5356
  }
5347
- function gi(t, e) {
5357
+ function yi(t, e) {
5348
5358
  const r = this._server, n = this._error;
5349
5359
  let i;
5350
5360
  if (this._error = null, t.length === 0)
@@ -5357,14 +5367,14 @@ function gi(t, e) {
5357
5367
  };
5358
5368
  t.length === 2 ? t(n, o) : t(n, r, o);
5359
5369
  } else
5360
- Tu.call(this, t, n, r, e);
5370
+ Ou.call(this, t, n, r, e);
5361
5371
  }
5362
- function Tu(t, e, r, n) {
5372
+ function Ou(t, e, r, n) {
5363
5373
  const i = t.name;
5364
5374
  He("setting up ready timeout", i, this._timeout);
5365
5375
  let o = setTimeout(() => {
5366
5376
  He("timed out", i), o = null;
5367
- const a = new wu(i);
5377
+ const a = new Su(i);
5368
5378
  a.fn = t, this._error = a, n(a);
5369
5379
  }, this._timeout);
5370
5380
  t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
@@ -5372,7 +5382,7 @@ function Tu(t, e, r, n) {
5372
5382
  o && (clearTimeout(o), this._error = a, n(this._error));
5373
5383
  }
5374
5384
  }
5375
- function ku(t, e) {
5385
+ function Tu(t, e) {
5376
5386
  const r = this._server, n = t[this._isOnCloseHandlerKey];
5377
5387
  if (t.length === 0 || t.length === 1) {
5378
5388
  let i;
@@ -5382,7 +5392,7 @@ function ku(t, e) {
5382
5392
  )) : A.nextTick(e);
5383
5393
  } else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
5384
5394
  }
5385
- function _u(t, e) {
5395
+ function ku(t, e) {
5386
5396
  return r.bind(e);
5387
5397
  function r(n, i) {
5388
5398
  let o;
@@ -5393,7 +5403,7 @@ function _u(t, e) {
5393
5403
  }, i) : A.nextTick(i)) : t(this, i);
5394
5404
  }
5395
5405
  }
5396
- function nr(t, e) {
5406
+ function rr(t, e) {
5397
5407
  return r.bind(e);
5398
5408
  function r(n, i) {
5399
5409
  let o;
@@ -5412,8 +5422,8 @@ wr.exports.express = function(t) {
5412
5422
  }
5413
5423
  });
5414
5424
  };
5415
- var Cu = wr.exports;
5416
- const Lu = /* @__PURE__ */ is(Cu);
5425
+ var _u = wr.exports;
5426
+ const Cu = /* @__PURE__ */ ns(_u);
5417
5427
  (function() {
5418
5428
  if (window.requestAnimationFrame && window.cancelAnimationFrame)
5419
5429
  return;
@@ -5431,20 +5441,20 @@ const Lu = /* @__PURE__ */ is(Cu);
5431
5441
  }, window.cancelAnimationFrame = clearTimeout;
5432
5442
  }
5433
5443
  })();
5434
- function ec(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5435
- const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Lu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5436
- return s.use(Vo, {
5444
+ function Zu(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5445
+ const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Cu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5446
+ return s.use(Ro, {
5437
5447
  hideFriends: n.hideFriends,
5438
5448
  skipOnboarding: n.skipOnboarding,
5439
5449
  betPack: n.betPack,
5440
5450
  friendsTab: n.friendsTab,
5441
5451
  theme: n.theme,
5442
5452
  themeMode: n.themeMode
5443
- }), s.use(Co, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Fo, { videoPlayerController: n?.videoPlayerController }), s.use(Ro, {
5453
+ }), s.use(_o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(No, { videoPlayerController: n?.videoPlayerController }), s.use(Fo, {
5444
5454
  onContentActivate: n?.onContentActivate,
5445
5455
  withAd: n?.withAd,
5446
5456
  withAdNotification: n?.withAdNotification
5447
- }), s.use(Zi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(io), s.use(No), s.use(Ko), s.use(Ao), s.use(ns), s.after((a, u, d) => {
5457
+ }), s.use(Xi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(no), s.use(Po), s.use(zo), s.use(wo), s.use(rs), s.after((a, u, d) => {
5448
5458
  if (a)
5449
5459
  throw a;
5450
5460
  u.ready(), d();
@@ -5457,5 +5467,5 @@ function ec(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5457
5467
  }), s;
5458
5468
  }
5459
5469
  export {
5460
- ec as StreamLayer
5470
+ Zu as StreamLayer
5461
5471
  };