@streamlayer/sdk-web 1.9.0 → 1.10.0

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,28 +1,28 @@
1
- import { pino as wi } from "pino";
2
- import { QuestionType as I, QuestionStatus as Y, PromotionType as U, NotificationEnabled as Br, SilenceSetting as Ai, UseAsNotification as Ei } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
1
+ import { pino as Ei } from "pino";
2
+ import { QuestionType as I, QuestionStatus as G, PromotionType as q, NotificationEnabled as Br, SilenceSetting as Ii, UseAsNotification as Oi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
3
  import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
4
  import { SdkOverlayType as R } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
5
- import { InvitationCategory as Mr, InvitationFrom as qr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
- import { computed as Ii, map as Oi, atom as Lt, batched as Ur, onMount as wr } from "nanostores";
7
- import { nanoid as or } from "nanoid";
8
- import { ConnectError as rt, Code as oe, createContextKey as jr, createClient as xr, createContextValues as Ti } from "@connectrpc/connect";
5
+ import { InvitationCategory as Mr, InvitationFrom as Ur } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
+ import { computed as Ti, map as _i, atom as Lt, batched as qr, onMount as wr } from "nanostores";
7
+ import { v4 as or } from "uuid";
8
+ import { ConnectError as rt, Code as oe, createContextKey as jr, createClient as xr, createContextValues as ki } from "@connectrpc/connect";
9
9
  import { createGrpcWebTransport as Qr } from "@connectrpc/connect-web";
10
10
  import { nanoquery as Gr } from "@nanostores/query";
11
- import { Events as _n } from "@streamlayer/sl-eslib/sports/events/events_connect";
11
+ import { Events as Pn } from "@streamlayer/sl-eslib/sports/events/events_connect";
12
12
  import { Client as ot } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
13
13
  import { Users as Ar } from "@streamlayer/sl-eslib/users/users_connect";
14
14
  import { Feed as ee } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
15
- import { Leaderboard as kn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
15
+ import { Leaderboard as Cn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
16
  import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
17
- import { LinksClient as _i } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
- import { Kind as G, TopicSubType as J, TopicType as Q, PollOpenedFrom as X, Category as H, ScreenOrientation as Kr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
- import { AnalyticsService as Cn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
17
+ import { LinksClient as Pi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
+ import { Kind as K, TopicSubType as J, TopicType as Q, PollOpenedFrom as X, Category as W, ScreenOrientation as Kr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
+ import { AnalyticsService as Ln } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
20
  import { InteractionActionType as zr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
21
  import { NotificationKind as me, NotificationType as Hr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
- function ki(t) {
22
+ function Ci(t) {
23
23
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
24
24
  }
25
- var Pn = { exports: {} }, M = Pn.exports = {}, de, le;
25
+ var Nn = { exports: {} }, M = Nn.exports = {}, de, le;
26
26
  function sr() {
27
27
  throw new Error("setTimeout has not been defined");
28
28
  }
@@ -41,7 +41,7 @@ function ar() {
41
41
  le = ar;
42
42
  }
43
43
  })();
44
- function Ln(t) {
44
+ function Fn(t) {
45
45
  if (de === setTimeout)
46
46
  return setTimeout(t, 0);
47
47
  if ((de === sr || !de) && setTimeout)
@@ -56,7 +56,7 @@ function Ln(t) {
56
56
  }
57
57
  }
58
58
  }
59
- function Ci(t) {
59
+ function Li(t) {
60
60
  if (le === clearTimeout)
61
61
  return clearTimeout(t);
62
62
  if ((le === ar || !le) && clearTimeout)
@@ -71,20 +71,20 @@ function Ci(t) {
71
71
  }
72
72
  }
73
73
  }
74
- var we = [], Qe = !1, ke, yt = -1;
75
- function Pi() {
76
- !Qe || !ke || (Qe = !1, ke.length ? we = ke.concat(we) : yt = -1, we.length && Nn());
74
+ var we = [], Qe = !1, Pe, yt = -1;
75
+ function Ni() {
76
+ !Qe || !Pe || (Qe = !1, Pe.length ? we = Pe.concat(we) : yt = -1, we.length && Dn());
77
77
  }
78
- function Nn() {
78
+ function Dn() {
79
79
  if (!Qe) {
80
- var t = Ln(Pi);
80
+ var t = Fn(Ni);
81
81
  Qe = !0;
82
82
  for (var e = we.length; e; ) {
83
- for (ke = we, we = []; ++yt < e; )
84
- ke && ke[yt].run();
83
+ for (Pe = we, we = []; ++yt < e; )
84
+ Pe && Pe[yt].run();
85
85
  yt = -1, e = we.length;
86
86
  }
87
- ke = null, Qe = !1, Ci(t);
87
+ Pe = null, Qe = !1, Li(t);
88
88
  }
89
89
  }
90
90
  M.nextTick = function(t) {
@@ -92,12 +92,12 @@ 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
- we.push(new Fn(t, e)), we.length === 1 && !Qe && Ln(Nn);
95
+ we.push(new Rn(t, e)), we.length === 1 && !Qe && Fn(Dn);
96
96
  };
97
- function Fn(t, e) {
97
+ function Rn(t, e) {
98
98
  this.fun = t, this.array = e;
99
99
  }
100
- Fn.prototype.run = function() {
100
+ Rn.prototype.run = function() {
101
101
  this.fun.apply(null, this.array);
102
102
  };
103
103
  M.title = "browser";
@@ -132,8 +132,8 @@ M.chdir = function(t) {
132
132
  M.umask = function() {
133
133
  return 0;
134
134
  };
135
- var Li = Pn.exports;
136
- const E = /* @__PURE__ */ ki(Li), Ni = wi({
135
+ var Fi = Nn.exports;
136
+ const E = /* @__PURE__ */ Ci(Fi), Di = Ei({
137
137
  level: "trace",
138
138
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -141,23 +141,23 @@ const E = /* @__PURE__ */ ki(Li), Ni = wi({
141
141
  console.log(t);
142
142
  }
143
143
  }
144
- }), pe = (t, e) => Ni.child({ name: t }, e);
145
- class Fi extends Event {
144
+ }), pe = (t, e) => Di.child({ name: t }, e);
145
+ class Ri extends Event {
146
146
  slEventBus;
147
147
  constructor(e, r) {
148
148
  super(e), this.slEventBus = r;
149
149
  }
150
150
  }
151
- const Di = pe("event-bus");
152
- class Ri {
151
+ const Vi = pe("event-bus");
152
+ class $i {
153
153
  name;
154
154
  listeners;
155
155
  constructor(e = "sl-event-bus") {
156
156
  this.name = e, this.listeners = /* @__PURE__ */ new Set();
157
157
  }
158
158
  emit = (e, r) => {
159
- const n = new Fi(this.name, { ...r, type: e });
160
- Di.debug(n, "Emitting event"), window.dispatchEvent(n);
159
+ const n = new Ri(this.name, { ...r, type: e });
160
+ Vi.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 Ri {
173
173
  }), this.listeners.clear();
174
174
  };
175
175
  }
176
- class Vi {
176
+ class Bi {
177
177
  }
178
178
  var Ae;
179
179
  (function(t) {
@@ -196,9 +196,9 @@ class Nt {
196
196
  return this.store;
197
197
  }
198
198
  }
199
- const $i = (t) => {
199
+ const Mi = (t) => {
200
200
  const e = Object.keys(t);
201
- return Ii(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
201
+ return Ti(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
202
202
  };
203
203
  class Ce extends Nt {
204
204
  getValues = () => this.getStore().get();
@@ -207,12 +207,12 @@ class Ce extends Nt {
207
207
  subscribe = (...e) => this.getStore().subscribe(...e);
208
208
  unsubscribe = () => this.getStore().off();
209
209
  }
210
- const Z = (t) => Oi(t);
210
+ const Z = (t) => _i(t);
211
211
  var be;
212
212
  (function(t) {
213
213
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
214
214
  })(be || (be = {}));
215
- const Bi = {
215
+ const Ui = {
216
216
  [R.BETTING]: "betting",
217
217
  [R.GAMES]: "games",
218
218
  [R.PUBLIC_CHAT]: "publicChat",
@@ -222,7 +222,7 @@ var Ze;
222
222
  (function(t) {
223
223
  t.Ready = "ready", t.Suspended = "suspended";
224
224
  })(Ze || (Ze = {}));
225
- class Dn {
225
+ class Vn {
226
226
  status;
227
227
  source;
228
228
  config;
@@ -230,7 +230,7 @@ class Dn {
230
230
  listeners = /* @__PURE__ */ new Set();
231
231
  settingsKey;
232
232
  constructor({ settings: e, ...r }, n) {
233
- this.settingsKey = Bi[r.type], this.status = Lt(Ze.Suspended), this.config = new Ce(Z(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(Z(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(Z({}), `feature:settings:${this.settingsKey}`), this.source = n;
233
+ this.settingsKey = Ui[r.type], this.status = Lt(Ze.Suspended), this.config = new Ce(Z(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(Z(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(Z({}), `feature:settings:${this.settingsKey}`), this.source = n;
234
234
  }
235
235
  get featureConfig() {
236
236
  return this.config.getStore();
@@ -287,7 +287,7 @@ class re extends Nt {
287
287
  return this.getStore().get();
288
288
  }
289
289
  }
290
- const q = (t) => Lt(t);
290
+ const U = (t) => Lt(t);
291
291
  class se extends Nt {
292
292
  atomStore;
293
293
  constructor(e, r, n) {
@@ -319,8 +319,8 @@ class se extends Nt {
319
319
  key = () => this.getStore().key;
320
320
  off = () => this.getStore().off();
321
321
  }
322
- const B = new Ri();
323
- async function* Mi(t, e) {
322
+ const B = new $i();
323
+ async function* qi(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 qi = () => (t) => async (e) => {
333
+ const ji = () => (t) => async (e) => {
334
334
  const r = {
335
335
  id: Date.now(),
336
336
  name: e.url,
@@ -359,7 +359,7 @@ const qi = () => (t) => async (e) => {
359
359
  };
360
360
  return window.postMessage(i), {
361
361
  ...n,
362
- message: Mi(r, n.message)
362
+ message: qi(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 qi = () => (t) => async (e) => {
383
383
  }
384
384
  };
385
385
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
386
- function Rn(t) {
386
+ function $n(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
@@ -408,7 +408,7 @@ class We {
408
408
  try {
409
409
  this.storage.setItem(n, r);
410
410
  } catch (i) {
411
- Rn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
411
+ $n(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 ie;
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
  })(ie || (ie = {}));
426
426
  const Wr = pe("grpc:stream");
427
- class Ui {
427
+ class xi {
428
428
  params;
429
429
  streamCancel;
430
430
  method;
@@ -448,7 +448,7 @@ class Ui {
448
448
  reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
449
449
  reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
450
450
  withStore: i.withStore ?? !1
451
- }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new re(q(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
451
+ }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new re(U(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
452
452
  this.state.getValue("status") === ie.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
453
453
  })), this.updateState(ie.Ready);
454
454
  }
@@ -463,7 +463,7 @@ class Ui {
463
463
  window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
464
464
  ` + n);
465
465
  } catch (i) {
466
- Rn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
466
+ $n(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
467
467
  }
468
468
  }
469
469
  };
@@ -533,7 +533,7 @@ class Ui {
533
533
  }
534
534
  };
535
535
  }
536
- const ji = /* @__PURE__ */ new Set([
536
+ const Qi = /* @__PURE__ */ new Set([
537
537
  oe.Unknown,
538
538
  oe.Internal,
539
539
  oe.DeadlineExceeded,
@@ -541,7 +541,7 @@ const ji = /* @__PURE__ */ new Set([
541
541
  oe.FailedPrecondition,
542
542
  oe.Unavailable,
543
543
  oe.DataLoss
544
- ]), Yr = pe("grpc:retry"), xi = (t) => async (e) => {
544
+ ]), Yr = pe("grpc:retry"), Gi = (t) => async (e) => {
545
545
  const r = e.contextValues.get(ur.retryAttempts), n = 300, i = e.contextValues.get(ur.retryDelay);
546
546
  if (e.stream || r === 0)
547
547
  return t(e);
@@ -550,23 +550,23 @@ const ji = /* @__PURE__ */ new Set([
550
550
  try {
551
551
  return await t(e);
552
552
  } catch (s) {
553
- Yr.trace({ attempt: o, error: s }, "retry attempt");
553
+ Yr.trace({ attempt: o, error: s, url: e.url }, "retry attempt");
554
554
  const a = rt.from(s);
555
- if (o >= r || !(a instanceof rt) || !ji.has(a.code))
555
+ if (o >= r || !(a instanceof rt) || !Qi.has(a.code))
556
556
  throw s;
557
- const u = Math.min(i, Math.pow(2, o) * n), l = Math.round(u * (1 + Math.random()) / 2);
558
- await new Promise((c) => setTimeout(c, l));
557
+ const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
558
+ await new Promise((c) => setTimeout(c, d));
559
559
  }
560
560
  }, ur = {
561
561
  retryAttempts: jr(10, { description: "Number of attempts to retry" }),
562
562
  retryDelay: jr(3e4, { description: "Max delay between retries in milliseconds" })
563
- }, Qi = () => {
563
+ }, Ki = () => {
564
564
  const t = localStorage.getItem("sl-device-id");
565
565
  if (t)
566
566
  return t;
567
567
  const e = or();
568
568
  return localStorage.setItem("sl-device-id", e), e;
569
- }, Gi = () => navigator.userAgentData?.platform || navigator.platform;
569
+ }, zi = () => navigator.userAgentData?.platform || navigator.platform;
570
570
  class Jr {
571
571
  toJsonOptions = {
572
572
  emitDefaultValues: !1,
@@ -587,8 +587,8 @@ class Jr {
587
587
  opts;
588
588
  constructor(e, r) {
589
589
  this.host = e, this.opts = r, this.$headers = new Ce(Z({
590
- "sl-device-id": Qi(),
591
- "sl-device-os": Gi()
590
+ "sl-device-id": Ki(),
591
+ "sl-device-os": zi()
592
592
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
593
593
  const [n, i, o] = Gr({
594
594
  dedupeTime: r?.dedupeTime,
@@ -612,7 +612,7 @@ class Jr {
612
612
  const i = this.subscriptions.get(r);
613
613
  if (i)
614
614
  return i;
615
- const o = new Ui(this.$headers, e, r, n);
615
+ const o = new xi(this.$headers, e, r, n);
616
616
  return this.subscriptions.set(r, o), o;
617
617
  };
618
618
  removeSubscription = (e) => {
@@ -656,11 +656,11 @@ class Jr {
656
656
  o.charAt(0).toLowerCase() + o.slice(1),
657
657
  ...Array.isArray(r) ? r : [r]
658
658
  ], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
659
- return { client: i, createRequestOptions: (l) => {
660
- const c = Ti();
661
- for (const f in l) {
659
+ return { client: i, createRequestOptions: (d) => {
660
+ const c = ki();
661
+ for (const f in d) {
662
662
  const p = ur[f];
663
- c.set(p, l[f]);
663
+ c.set(p, d[f]);
664
664
  }
665
665
  return c;
666
666
  }, queryKey: s, queryKeyStr: a.join("") };
@@ -685,11 +685,11 @@ class Jr {
685
685
  n.header.set(o, i[o]);
686
686
  return r(n);
687
687
  };
688
- this.interceptors.push(e), this.interceptors.push(qi()), this.opts?.retryable && this.interceptors.push(xi);
688
+ this.interceptors.push(e), this.interceptors.push(ji()), this.opts?.retryable && this.interceptors.push(Gi);
689
689
  };
690
690
  }
691
- const Ki = (t, e) => {
692
- const { client: r, queryKey: n } = e.createPromiseClient(_n, {
691
+ const Hi = (t, e) => {
692
+ const { client: r, queryKey: n } = e.createPromiseClient(Pn, {
693
693
  method: "retrieveEventId",
694
694
  params: [t]
695
695
  });
@@ -706,7 +706,7 @@ const Ki = (t, e) => {
706
706
  }
707
707
  }
708
708
  });
709
- }, zi = (t, e) => {
709
+ }, Wi = (t, e) => {
710
710
  const { client: r, queryKey: n } = e.createPromiseClient(ot, { method: "getStream", params: [t] });
711
711
  return e.nanoquery.createFetcherStore(n, {
712
712
  fetcher: async (i, o, s) => s ? (await r.getStream({
@@ -714,14 +714,14 @@ const Ki = (t, e) => {
714
714
  // we are sure that id is a string
715
715
  })).data?.attributes : void 0
716
716
  });
717
- }, Hi = (t, e) => {
718
- const { client: r, queryKey: n } = e.createPromiseClient(_n, { method: "summary", params: [t] });
717
+ }, Yi = (t, e) => {
718
+ const { client: r, queryKey: n } = e.createPromiseClient(Pn, { method: "summary", params: [t] });
719
719
  return e.nanoquery.createFetcherStore(n, {
720
720
  fetcher: async (i, o, s) => s ? (await r.summary({
721
721
  id: s
722
722
  })).data?.attributes : void 0
723
723
  });
724
- }, Wi = (t, e) => {
724
+ }, Ji = (t, e) => {
725
725
  const { queryKey: r, client: n } = e.createPromiseClient(Ar, { method: "me", params: [t] });
726
726
  return e.nanoquery.createFetcherStore(r, {
727
727
  fetcher: async () => {
@@ -729,15 +729,15 @@ const Ki = (t, e) => {
729
729
  return { data: i };
730
730
  }
731
731
  });
732
- }, Yi = (t) => {
732
+ }, Xi = (t) => {
733
733
  const { client: e, createRequestOptions: r } = t.createPromiseClient(Ar, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
734
734
  return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
735
- }, Ji = (t, e) => {
735
+ }, Zi = (t, e) => {
736
736
  const { client: r, queryKey: n } = e.createPromiseClient(ot, { method: "get", params: [t] });
737
737
  return e.nanoquery.createFetcherStore(n, {
738
738
  fetcher: async () => (await r.get({})).data?.attributes
739
739
  });
740
- }, Xi = (t, e) => {
740
+ }, eo = (t, e) => {
741
741
  const { client: r, queryKey: n } = e.createPromiseClient(ot, { method: "getOrganization", params: [t] });
742
742
  return e.nanoquery.createFetcherStore(n, {
743
743
  fetcher: async () => {
@@ -748,7 +748,7 @@ const Ki = (t, e) => {
748
748
  } : void 0;
749
749
  }
750
750
  });
751
- }, Zi = (t, e) => {
751
+ }, to = (t, e) => {
752
752
  const { client: r, queryKey: n } = e.createPromiseClient(ot, {
753
753
  method: "getOrganizationAdvertising",
754
754
  params: [t]
@@ -756,7 +756,7 @@ const Ki = (t, e) => {
756
756
  return e.nanoquery.createFetcherStore(n, {
757
757
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
758
758
  });
759
- }, eo = (t, e, r) => {
759
+ }, ro = (t, e, r) => {
760
760
  t.transport = new Jr(e.host, {
761
761
  dedupeTime: 1e3 * 60 * 5,
762
762
  refetchInterval: 1e3 * 60 * 5,
@@ -798,19 +798,19 @@ var ve;
798
798
  (function(t) {
799
799
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
800
800
  })(ve || (ve = {}));
801
- const to = (t) => {
802
- const e = new je(), r = new re(q(e.getExternalToken()), "userKey"), n = new re(q(e.getToken()), "userToken"), i = new se(Wi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
801
+ const no = (t) => {
802
+ const e = new je(), r = new re(U(e.getExternalToken()), "userKey"), n = new re(U(e.getToken()), "userToken"), i = new se(Ji(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
803
803
  if (!a)
804
- return s?.data?.id ? s.data.id : u === !1 ? void 0 : l;
805
- }), o = new se(Ji(n.getStore(), t), "userSettings");
804
+ return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
805
+ }), o = new se(Zi(n.getStore(), t), "userSettings");
806
806
  return {
807
807
  userKey: r,
808
808
  userToken: n,
809
809
  user: i,
810
810
  userSettings: o
811
811
  };
812
- }, ro = (t) => {
813
- const e = new re(q(void 0), "providerStreamId"), r = new se(Ki(e.getStore(), t), "slStreamId", (o) => o?.data), n = new se(zi(r.getAtomStore(), t), "streamSettings"), i = new se(Hi(r.getAtomStore(), t), "streamSettings");
812
+ }, io = (t) => {
813
+ const e = new re(U(void 0), "providerStreamId"), r = new se(Hi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new se(Wi(r.getAtomStore(), t), "streamSettings"), i = new se(Yi(r.getAtomStore(), t), "streamSettings");
814
814
  return r.getAtomStore().listen((o) => {
815
815
  (o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
816
816
  }), {
@@ -819,8 +819,8 @@ const to = (t) => {
819
819
  streamSettings: n,
820
820
  streamSummary: i
821
821
  };
822
- }, no = (t) => {
823
- const e = new re(q(void 0), "enabled"), r = new re(q(ve.DISABLED), "status"), n = new se(Xi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new se(Zi(n.getAtomStore(), t), "organizationAdvertising"), o = to(t), s = ro(t);
822
+ }, oo = (t) => {
823
+ const e = new re(U(void 0), "enabled"), r = new re(U(ve.DISABLED), "status"), n = new se(eo(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new se(to(n.getAtomStore(), t), "organizationAdvertising"), o = no(t), s = io(t);
824
824
  return {
825
825
  enabled: e,
826
826
  status: r,
@@ -836,10 +836,10 @@ const to = (t) => {
836
836
  organizationAdvertising: i
837
837
  };
838
838
  };
839
- class io extends Nt {
839
+ class so extends Nt {
840
840
  stores;
841
841
  constructor(e) {
842
- const r = no(e), n = $i(r);
842
+ const r = oo(e), n = Mi(r);
843
843
  super(n, "core"), this.stores = r;
844
844
  }
845
845
  getValue() {
@@ -860,17 +860,17 @@ class io extends Nt {
860
860
  };
861
861
  unsubscribe = () => this.getStore().off();
862
862
  }
863
- const oo = (t, e, r) => {
864
- t.store = new io(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 = () => {
863
+ const ao = (t, e, r) => {
864
+ t.store = new so(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 = () => {
865
865
  t.store.unsubscribe();
866
866
  }, r();
867
- }, so = (t) => {
868
- const { client: e } = t.createPromiseClient(kn, { method: "list" });
867
+ }, uo = (t) => {
868
+ const { client: e } = t.createPromiseClient(Cn, { method: "list" });
869
869
  return (r) => e.list(r);
870
- }, Vn = (t) => {
871
- const { client: e } = t.createPromiseClient(kn, { method: "summary" });
870
+ }, Bn = (t) => {
871
+ const { client: e } = t.createPromiseClient(Cn, { method: "summary" });
872
872
  return (r) => e.summary(r);
873
- }, ao = (t, e) => {
873
+ }, co = (t, e) => {
874
874
  const { client: r, queryKey: n } = e.createPromiseClient(Ar, {
875
875
  method: "getFriends",
876
876
  params: [t]
@@ -886,7 +886,7 @@ const oo = (t, e, r) => {
886
886
  }
887
887
  }
888
888
  });
889
- }, uo = (t, e) => {
889
+ }, lo = (t, e) => {
890
890
  const { client: r, queryKey: n } = e.createPromiseClient(ee, { method: "get", params: [t] });
891
891
  return e.nanoquery.createFetcherStore(n, {
892
892
  fetcher: async (i, o, s) => (await r.get({
@@ -895,35 +895,38 @@ const oo = (t, e, r) => {
895
895
  refetchInterval: 0,
896
896
  dedupeTime: 1e3 * 60 * 60
897
897
  });
898
- }, co = (t, e) => {
899
- const { client: r, queryKey: n } = e.createPromiseClient(ee, { method: "syncQuestion", params: [t] });
900
- return e.nanoquery.createFetcherStore(n, {
901
- fetcher: async (i, o, s) => {
902
- if (!s)
898
+ }, fo = (t, e, r) => {
899
+ const { client: n, queryKey: i } = r.createPromiseClient(ee, {
900
+ method: "syncQuestion",
901
+ params: [t, e ? "true" : ""]
902
+ });
903
+ return r.nanoquery.createFetcherStore(i, {
904
+ fetcher: async (o, s, a, u) => {
905
+ if (!a || u)
903
906
  return;
904
- const a = await r.syncQuestion({
907
+ const d = await n.syncQuestion({
905
908
  filter: {
906
- eventId: s
909
+ eventId: a
907
910
  }
908
911
  });
909
- if (a.data?.attributes?.question?.type !== I.PROMOTION)
910
- return a.data?.attributes;
912
+ if (d.data?.attributes?.question?.type !== I.PROMOTION)
913
+ return d.data?.attributes;
911
914
  },
912
915
  dedupeTime: 1e3 * 60 * 10,
913
916
  // 10 minutes
914
917
  refetchInterval: 0
915
918
  });
916
- }, lo = async (t, e) => {
919
+ }, po = async (t, e) => {
917
920
  const { client: r } = e.createPromiseClient(ee, { method: "item", params: [t] });
918
921
  return (await r.item({
919
922
  id: t
920
923
  })).data;
921
- }, fo = (t, e) => {
924
+ }, ho = (t, e) => {
922
925
  const { client: r } = e.createStreamClient(ee), n = Lt({ eventId: t.get() || "", feedId: "" });
923
926
  return t.subscribe((o = "") => {
924
927
  n.set({ eventId: o, feedId: "" });
925
928
  }), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
926
- }, po = (t, e) => {
929
+ }, yo = (t, e) => {
927
930
  const { client: r } = e.createStreamClient(ee);
928
931
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
929
932
  }, cr = async (t, e) => {
@@ -939,7 +942,7 @@ const oo = (t, e, r) => {
939
942
  })).data?.attributes?.question,
940
943
  dedupeTime: 1e3 * 60 * 5
941
944
  });
942
- }, $n = async (t, e) => {
945
+ }, Mn = async (t, e) => {
943
946
  if (!t)
944
947
  return;
945
948
  const { client: r } = e.createPromiseClient(ee, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
@@ -949,23 +952,23 @@ const oo = (t, e, r) => {
949
952
  return;
950
953
  const { options: i, notification: o, ...s } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
951
954
  return { id: s.id, question: s, promotion: a, notification: o };
952
- }, ho = (t, e, r) => {
953
- const { client: n, queryKey: i } = r.createPromiseClient(ee, {
955
+ }, mo = (t, e, r, n) => {
956
+ const { client: i, queryKey: o } = n.createPromiseClient(ee, {
954
957
  method: "list",
955
- params: [t, e]
958
+ params: [t, e, r ? "true" : ""]
956
959
  });
957
- return r.nanoquery.createFetcherStore(i, {
958
- fetcher: async (o, s, a, u) => a ? (await n.list({
959
- eventId: a,
960
+ return n.nanoquery.createFetcherStore(o, {
961
+ fetcher: async (s, a, u, d, c) => !u || c ? [] : (await i.list({
962
+ eventId: u,
960
963
  filter: {
961
- types: u === Pe.ALLOWED ? [] : [I.FACTOID, I.PROMOTION, I.TWEET],
962
- statuses: [Y.ACTIVE, Y.RESOLVED]
964
+ types: d === Oe.ALLOWED ? [] : [I.FACTOID, I.PROMOTION, I.TWEET],
965
+ statuses: [G.ACTIVE, G.RESOLVED]
963
966
  }
964
- })).data : [],
967
+ })).data,
965
968
  dedupeTime: 0,
966
969
  refetchInterval: 0
967
970
  });
968
- }, yo = (t, e) => {
971
+ }, go = (t, e) => {
969
972
  const { client: r, queryKey: n } = e.createPromiseClient(ee, {
970
973
  method: "list",
971
974
  params: [t]
@@ -978,7 +981,7 @@ const oo = (t, e, r) => {
978
981
  eventId: s,
979
982
  filter: {
980
983
  types: [I.PROMOTION],
981
- statuses: [Y.ACTIVE]
984
+ statuses: [G.ACTIVE]
982
985
  },
983
986
  pagination: {
984
987
  page: 0,
@@ -986,24 +989,24 @@ const oo = (t, e, r) => {
986
989
  }
987
990
  })).data?.[0];
988
991
  if (u.type === "promotion")
989
- return $n(u.id, e);
992
+ return Mn(u.id, e);
990
993
  },
991
994
  dedupeTime: 0,
992
995
  refetchInterval: 0
993
996
  });
994
- }, mo = (t, e, r, n, i) => {
997
+ }, bo = (t, e, r, n, i) => {
995
998
  const { client: o, queryKey: s } = i.createPromiseClient(ee, {
996
999
  method: "betPack",
997
1000
  params: [t, e, r]
998
1001
  });
999
1002
  return i.nanoquery.createFetcherStore(s, {
1000
- fetcher: async (a, u, l, c, f) => {
1001
- if (!l || !c || !f)
1003
+ fetcher: async (a, u, d, c, f) => {
1004
+ if (!d || !c || !f)
1002
1005
  return null;
1003
1006
  const p = await o.betPack({
1004
- eventId: l,
1007
+ eventId: d,
1005
1008
  types: [I.PREDICTION],
1006
- statuses: [Y.ACTIVE, Y.RESOLVED],
1009
+ statuses: [G.ACTIVE, G.RESOLVED],
1007
1010
  limit: 5,
1008
1011
  sort: {
1009
1012
  field: "activated_at",
@@ -1015,7 +1018,7 @@ const oo = (t, e, r) => {
1015
1018
  if (!m?.id)
1016
1019
  return v;
1017
1020
  const g = {
1018
- eventId: l,
1021
+ eventId: d,
1019
1022
  userId: c,
1020
1023
  organizationId: f
1021
1024
  };
@@ -1031,16 +1034,16 @@ const oo = (t, e, r) => {
1031
1034
  dedupeTime: 0,
1032
1035
  refetchInterval: 0
1033
1036
  });
1034
- }, go = (t, e, r) => {
1035
- const n = Ur([e, r], () => {
1037
+ }, vo = (t, e, r) => {
1038
+ const n = qr([e, r], () => {
1036
1039
  const a = e.get();
1037
1040
  if (!a)
1038
1041
  return;
1039
- const u = r.get().data?.find((c) => c.id === a?.questionId), l = a?.question?.openedFrom;
1040
- return u ? (u.openedFrom = l, u) : a.question;
1041
- }), i = Ur(n, (a) => a && a.type === "question" ? a.id : void 0), o = nt(i, t);
1042
+ const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
1043
+ return u ? (u.openedFrom = d, u) : a.question;
1044
+ }), i = qr(n, (a) => a && a.type === "question" ? a.id : void 0), o = nt(i, t);
1042
1045
  return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
1043
- const u = o.get().data, l = (c, f) => {
1046
+ const u = o.get().data, d = (c, f) => {
1044
1047
  if (!c || !f)
1045
1048
  return c || f || [];
1046
1049
  const p = [];
@@ -1059,7 +1062,7 @@ const oo = (t, e, r) => {
1059
1062
  options: u?.options,
1060
1063
  subject: u?.subject,
1061
1064
  appearance: u?.appearance,
1062
- answers: l(u?.answers, a?.answers)
1065
+ answers: d(u?.answers, a?.answers)
1063
1066
  });
1064
1067
  } };
1065
1068
  };
@@ -1067,7 +1070,7 @@ var At;
1067
1070
  (function(t) {
1068
1071
  t.SHOWED = "showed";
1069
1072
  })(At || (At = {}));
1070
- class bo extends We {
1073
+ class So extends We {
1071
1074
  constructor() {
1072
1075
  super("advertisement");
1073
1076
  }
@@ -1076,7 +1079,7 @@ class bo extends We {
1076
1079
  };
1077
1080
  isViewed = (e) => this.read(At.SHOWED, e);
1078
1081
  }
1079
- const vo = (t) => {
1082
+ const wo = (t) => {
1080
1083
  const e = t.data?.attributes?.question;
1081
1084
  if ((t.data?.attributes?.feedItem?.type === "promotion" ? t.data.attributes.feedItem : void 0) === void 0 || !e)
1082
1085
  return;
@@ -1087,7 +1090,7 @@ const vo = (t) => {
1087
1090
  notification: i,
1088
1091
  promotion: s
1089
1092
  };
1090
- }, ft = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, So = ({ gamOptions: t, gamBaseUrl: e }) => {
1093
+ }, ft = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, Ao = ({ gamOptions: t, gamBaseUrl: e }) => {
1091
1094
  const r = `${e}?`, n = [];
1092
1095
  for (const i in t) {
1093
1096
  const o = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), s = t[i];
@@ -1097,14 +1100,14 @@ const vo = (t) => {
1097
1100
  else if (Array.isArray(s))
1098
1101
  n.push(`${o}=${s.map(ft).join(",")}`);
1099
1102
  else {
1100
- const a = Object.entries(s).map(([u, l]) => Array.isArray(l) ? `${u}=${l.map(ft).join(",")}` : typeof l == "string" ? `${u}=${ft(l)}` : `${u}=${l}`).join("&").replaceAll("=", "%3D").replaceAll("&", "%26").replaceAll(",", "%2C");
1103
+ const a = Object.entries(s).map(([u, d]) => Array.isArray(d) ? `${u}=${d.map(ft).join(",")}` : typeof d == "string" ? `${u}=${ft(d)}` : `${u}=${d}`).join("&").replaceAll("=", "%3D").replaceAll("&", "%26").replaceAll(",", "%2C");
1101
1104
  n.push(`${o}=${a}`);
1102
1105
  }
1103
1106
  }
1104
1107
  return r + n.join("&");
1105
- }, Be = (t) => (t?.promotion?.type === U.INGAME_IAB11_LBAR || t?.promotion?.type === U.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, wo = (t, e, r) => {
1108
+ }, Be = (t) => (t?.promotion?.type === q.INGAME_IAB11_LBAR || t?.promotion?.type === q.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, Eo = (t, e, r) => {
1106
1109
  let n = !1;
1107
- const i = r.transport, o = pe("advertisement"), s = new bo(), a = Z({}), u = yo(t, i), l = (m) => {
1110
+ const i = r.transport, o = pe("advertisement"), s = new So(), a = Z({}), u = go(t, i), d = (m) => {
1108
1111
  const g = a.get(), S = g.data?.question.id, F = g.data?.promotion?.type;
1109
1112
  S && (B.emit("advertisement", {
1110
1113
  action: "opened",
@@ -1141,7 +1144,7 @@ const vo = (t) => {
1141
1144
  close: () => p(g.question.id),
1142
1145
  togglePause: (S) => v(g.question.id, S),
1143
1146
  isViewed: !!s.isViewed(g.question.id)
1144
- }) : (a.setKey("loading", !0), $n(m, i).then((S) => a.set({
1147
+ }) : (a.setKey("loading", !0), Mn(m, i).then((S) => a.set({
1145
1148
  loading: !1,
1146
1149
  error: void 0,
1147
1150
  data: S,
@@ -1157,8 +1160,8 @@ const vo = (t) => {
1157
1160
  };
1158
1161
  a.subscribe((m, g) => {
1159
1162
  if (!(m.data?.id === g?.data?.id && m.isPaused !== g?.isPaused)) {
1160
- if (m.data?.promotion?.type === U.EXTERNAL_AD && !m?.externalAd && m.data.promotion.adCampaigns?.gamOptions && m.data.promotion.adCampaigns?.gamBaseUrl) {
1161
- const S = So(m.data.promotion.adCampaigns);
1163
+ if (m.data?.promotion?.type === q.EXTERNAL_AD && !m?.externalAd && m.data.promotion.adCampaigns?.gamOptions && m.data.promotion.adCampaigns?.gamBaseUrl) {
1164
+ const S = Ao(m.data.promotion.adCampaigns);
1162
1165
  a.setKey("externalAd", { type: "gam", url: S });
1163
1166
  }
1164
1167
  m.data?.promotion && !m.isOpened && (B.emit("advertisement", {
@@ -1201,26 +1204,26 @@ const vo = (t) => {
1201
1204
  n || (n = !0, u.subscribe((m, g) => {
1202
1205
  m.data && (!g?.data || m.data.id !== g.data.id) && f(m.data.question.id, m.data);
1203
1206
  }), e.addListener("promotion", (m) => {
1204
- const g = vo(m);
1207
+ const g = wo(m);
1205
1208
  if (g) {
1206
- if (g.question.status === Y.RESOLVED) {
1209
+ if (g.question.status === G.RESOLVED) {
1207
1210
  p(g.question.id), o.debug({ promotion: g }, "resolved: %o");
1208
1211
  return;
1209
1212
  }
1210
- if (g.question.status === Y.ACTIVE) {
1213
+ if (g.question.status === G.ACTIVE) {
1211
1214
  o.debug({ promotion: g }, "active: %o"), f(g.question.id, g);
1212
1215
  return;
1213
1216
  }
1214
1217
  o.debug({ promotion: g }, "skip: %o");
1215
1218
  }
1216
1219
  }));
1217
- }, hide: p, show: f, open: l, markAsViewed: c, $store: a };
1220
+ }, hide: p, show: f, open: d, markAsViewed: c, $store: a };
1218
1221
  };
1219
1222
  var ce;
1220
1223
  (function(t) {
1221
1224
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.BET_PACK_ITEM_RECEIVED = "bp-item-received", t.QUESTION_OPENED = "q-opened";
1222
1225
  })(ce || (ce = {}));
1223
- class Ao extends We {
1226
+ class Io extends We {
1224
1227
  constructor() {
1225
1228
  super("gamification-session", window.sessionStorage);
1226
1229
  }
@@ -1229,10 +1232,10 @@ class Ao extends We {
1229
1232
  };
1230
1233
  readValue = (e) => this.read(...e);
1231
1234
  }
1232
- class Eo extends We {
1235
+ class Oo extends We {
1233
1236
  sessionStorage;
1234
1237
  constructor() {
1235
- super("gamification"), this.sessionStorage = new Ao();
1238
+ super("gamification"), this.sessionStorage = new Io();
1236
1239
  }
1237
1240
  saveBetPackQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => {
1238
1241
  this.write(ce.BET_PACK_ITEM_RECEIVED, n, e, r, i);
@@ -1251,11 +1254,11 @@ class Eo extends We {
1251
1254
  };
1252
1255
  getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([ce.ONBOARDING_IO, n, e, r]);
1253
1256
  }
1254
- var Pe;
1257
+ var Oe;
1255
1258
  (function(t) {
1256
1259
  t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
1257
- })(Pe || (Pe = {}));
1258
- class Io {
1260
+ })(Oe || (Oe = {}));
1261
+ class To {
1259
1262
  /** sl event id */
1260
1263
  slStreamId;
1261
1264
  /** organization id */
@@ -1290,76 +1293,78 @@ class Io {
1290
1293
  transport;
1291
1294
  cancels = /* @__PURE__ */ new Set();
1292
1295
  constructor(e) {
1293
- this.transport = e.transport, this.log = pe("gamification-background"), this.storage = new Eo(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new re(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new re(q(Pe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new re(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new se(uo(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new se(ho(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.betPack = new se(mo(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = co(this.slStreamId, e.transport), this.openedQuestion = go(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1294
- this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = po(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", async (n) => {
1295
- const i = n.data?.attributes?.question;
1296
- if (this.openedQuestion.updateExtendedQuestion(i), i?.type === I.PREDICTION) {
1297
- const o = this.betPack.getValues().data || {};
1298
- if (o?.[i.id] || Object.keys(o).length < 5) {
1299
- const a = nt(i.id, this.transport), u = a.subscribe(() => {
1296
+ this.transport = e.transport, this.log = pe("gamification-background"), this.storage = new Oo(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new re(U(void 0), "moderationId").getStore(), this.interactiveAllowed = new re(U(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new re(U(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new se(lo(this.slStreamId, e.transport), "gamification:moderation");
1297
+ const r = !!e.sdk.options.get().betPack;
1298
+ this.feedList = new se(mo(this.slStreamId, this.interactiveAllowed, r, e.transport), "gamification:feedList"), this.betPack = new se(bo(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = fo(this.slStreamId, r, e.transport), this.openedQuestion = vo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
1299
+ this.log.debug({ item: n }, "received question"), n?.questionId ? (this.questionSubscription = yo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", async (i) => {
1300
+ const o = i.data?.attributes?.question;
1301
+ if (this.openedQuestion.updateExtendedQuestion(o), o?.type === I.PREDICTION && (o.status === G.ACTIVE || o.status === G.RESOLVED)) {
1302
+ const s = this.betPack.getValues().data || {};
1303
+ if (s?.[o.id] || Object.keys(s).length < 5) {
1304
+ const u = nt(o.id, this.transport), d = u.subscribe(() => {
1300
1305
  });
1301
- await a.get().promise;
1302
- const l = await cr(i.id, this.transport);
1303
- u(), window.requestAnimationFrame(() => {
1304
- a.invalidate();
1306
+ await u.get().promise;
1307
+ let c = u.get().data;
1308
+ c || (c = await cr(o.id, this.transport)), d(), window.requestAnimationFrame(() => {
1309
+ u.invalidate();
1305
1310
  }), this.betPack.getStore().mutate({
1306
- ...o,
1307
- [i.id]: l
1311
+ ...s,
1312
+ [o.id]: c
1308
1313
  });
1309
1314
  }
1310
1315
  }
1311
1316
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1312
- })), this.feedSubscription = fo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (r) => {
1313
- const n = r.data?.attributes?.question;
1314
- if (n?.type === I.PREDICTION) {
1315
- const i = this.betPack.getValues().data || {};
1316
- if (i?.[n.id] || Object.keys(i).length < 5) {
1317
- const s = nt(n.id, this.transport), a = s.subscribe(() => {
1317
+ })), this.feedSubscription = ho(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
1318
+ const i = n.data?.attributes?.question;
1319
+ if (i?.type === I.PREDICTION && (i.status === G.ACTIVE || i.status === G.RESOLVED)) {
1320
+ const o = this.betPack.getValues().data || {};
1321
+ if (o?.[i.id] || Object.keys(o).length < 5) {
1322
+ const a = nt(i.id, this.transport), u = a.subscribe(() => {
1318
1323
  });
1319
- await s.get().promise;
1320
- let u = s.get().data;
1321
- u || (u = await cr(n.id, this.transport)), a(), window.requestAnimationFrame(() => {
1322
- s.invalidate();
1324
+ await a.get().promise;
1325
+ let d = a.get().data;
1326
+ d || (d = await cr(i.id, this.transport)), u(), window.requestAnimationFrame(() => {
1327
+ a.invalidate();
1323
1328
  }), this.betPack.getStore().mutate({
1324
- ...i,
1325
- [n.id]: u
1329
+ ...o,
1330
+ [i.id]: d
1326
1331
  });
1327
1332
  }
1328
1333
  }
1329
- })), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1330
- const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
1331
- if (!(!i || i.type === I.PROMOTION)) {
1332
- if (i.status === Y.RESOLVED) {
1333
- n === i.id && this.activeQuestionId.mutate(void 0);
1334
+ })), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (n) => {
1335
+ const i = this.activeQuestionId.get().data?.question?.id, o = n.data?.attributes?.question;
1336
+ if (!(!o || o.type === I.PROMOTION)) {
1337
+ if (o.status === G.RESOLVED) {
1338
+ i === o.id && this.activeQuestionId.mutate(void 0);
1334
1339
  return;
1335
1340
  }
1336
1341
  window.requestAnimationFrame(() => {
1337
- this.activeQuestionId.mutate(r.data?.attributes);
1342
+ this.activeQuestionId.mutate(n.data?.attributes);
1338
1343
  });
1339
1344
  }
1340
- })), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
1345
+ })), this.cancels.add(this.feedSubscription.addListener("moderation update", (n) => {
1341
1346
  window.requestAnimationFrame(() => {
1342
- r.data?.attributes?.question === void 0 && r.data?.attributes?.moderation && this.moderation.invalidate();
1347
+ n.data?.attributes?.question === void 0 && n.data?.attributes?.moderation && this.moderation.invalidate();
1343
1348
  });
1344
- })), this.cancels.add(this.activeQuestionId.subscribe((r, n) => {
1345
- r.data?.feedItem && r.data?.feedItem?.id !== n?.data?.feedItem?.id && e.onQuestionActivate({
1349
+ })), this.cancels.add(this.activeQuestionId.subscribe((n, i) => {
1350
+ n.data?.feedItem && n.data?.feedItem?.id !== i?.data?.feedItem?.id && e.onQuestionActivate({
1346
1351
  stage: "activate",
1347
- id: r.data.feedItem.id,
1352
+ id: n.data.feedItem.id,
1348
1353
  isViewed: !!this.notifications.isViewed(this.getCurrentSessionId({
1349
1354
  prefix: "notification",
1350
- entity: r.data.feedItem.id
1355
+ entity: n.data.feedItem.id
1351
1356
  })),
1352
1357
  hasNotification: !0,
1353
- type: r.data.feedItem.type
1354
- }), !r.data?.feedItem && n?.data?.feedItem && e.onQuestionActivate({
1358
+ type: n.data.feedItem.type
1359
+ }), !n.data?.feedItem && i?.data?.feedItem && e.onQuestionActivate({
1355
1360
  stage: "deactivate",
1356
- id: n.data.feedItem.id,
1361
+ id: i.data.feedItem.id,
1357
1362
  isViewed: !!this.notifications.isViewed(this.getCurrentSessionId({
1358
1363
  prefix: "notification",
1359
- entity: n.data.feedItem.id
1364
+ entity: i.data.feedItem.id
1360
1365
  })),
1361
1366
  hasNotification: !0,
1362
- type: n.data.feedItem.type
1367
+ type: i.data.feedItem.type
1363
1368
  });
1364
1369
  })), this.feedSubscription.connect(), this.cancels.add(this.interactiveAllowed.listen(() => {
1365
1370
  window.requestAnimationFrame(() => {
@@ -1367,9 +1372,9 @@ class Io {
1367
1372
  });
1368
1373
  })), e.sdk.onMount({ name: "gamification-background" }, () => () => {
1369
1374
  this.activeQuestionId.off();
1370
- for (const r of this.cancels)
1371
- r(), this.cancels.delete(r);
1372
- }), this.advertisement = wo(this.slStreamId, this.feedSubscription, e);
1375
+ for (const n of this.cancels)
1376
+ n(), this.cancels.delete(n);
1377
+ }), r || (this.advertisement = Eo(this.slStreamId, this.feedSubscription, e));
1373
1378
  }
1374
1379
  /**
1375
1380
  * Get id for notifications and link with current session
@@ -1399,7 +1404,7 @@ class Io {
1399
1404
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1400
1405
  };
1401
1406
  }
1402
- class Oo {
1407
+ class _o {
1403
1408
  notificationsList;
1404
1409
  store;
1405
1410
  timeouts;
@@ -1408,7 +1413,7 @@ class Oo {
1408
1413
  options;
1409
1414
  logger;
1410
1415
  constructor(e) {
1411
- this.options = e, this.logger = pe("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = q(/* @__PURE__ */ new Map());
1416
+ this.options = e, this.logger = pe("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = U(/* @__PURE__ */ new Map());
1412
1417
  }
1413
1418
  addToQueue = (e) => {
1414
1419
  if (this.store.has(e.id)) {
@@ -1499,7 +1504,7 @@ var Et;
1499
1504
  (function(t) {
1500
1505
  t.OPENED = "opened";
1501
1506
  })(Et || (Et = {}));
1502
- class To extends We {
1507
+ class ko extends We {
1503
1508
  constructor() {
1504
1509
  super("notification");
1505
1510
  }
@@ -1511,11 +1516,11 @@ class To extends We {
1511
1516
  this.clear();
1512
1517
  };
1513
1518
  }
1514
- class _o {
1519
+ class Po {
1515
1520
  queue;
1516
1521
  storage;
1517
1522
  constructor(e = {}) {
1518
- this.storage = new To(), this.queue = new Oo({ concurrency: 1, animationDelay: 1600, ...e });
1523
+ this.storage = new ko(), this.queue = new _o({ concurrency: 1, animationDelay: 1600, ...e });
1519
1524
  }
1520
1525
  isViewed = (e) => this.storage.isOpened(e);
1521
1526
  add = (e) => {
@@ -1552,8 +1557,8 @@ class _o {
1552
1557
  this.storage.setOpened(e);
1553
1558
  };
1554
1559
  }
1555
- const ko = (t, e, r) => {
1556
- t.notifications = new _o(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1560
+ const Co = (t, e, r) => {
1561
+ t.notifications = new Po(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1557
1562
  t.notifications.queue.drain();
1558
1563
  }), r();
1559
1564
  };
@@ -1561,27 +1566,27 @@ var it;
1561
1566
  (function(t) {
1562
1567
  t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
1563
1568
  })(it || (it = {}));
1564
- const Co = async (t, e) => {
1569
+ const Xr = async (t, e) => {
1565
1570
  const { client: r, createRequestOptions: n } = t.createPromiseClient(ee, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
1566
1571
  try {
1567
1572
  return await r.submitAnswer({ data: e }, { contextValues: i });
1568
1573
  } catch (o) {
1569
1574
  throw rt.from(o)?.code === oe.AlreadyExists ? new Error(it.ALREADY_VOTED) : new Error(it.UNKNOWN);
1570
1575
  }
1571
- }, Bn = (t, e) => {
1576
+ }, Un = (t, e) => {
1572
1577
  const { client: r, createRequestOptions: n } = t.createPromiseClient(ee, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1573
1578
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1574
- }, Po = {
1579
+ }, Lo = {
1575
1580
  pageSize: 10
1576
- }, Lo = (t, e, r, n, i) => {
1581
+ }, No = (t, e, r, n, i) => {
1577
1582
  let o = 0;
1578
- const s = q({ pageSize: Po.pageSize, page: 0 }), a = Z({
1583
+ const s = U({ pageSize: Lo.pageSize, page: 0 }), a = Z({
1579
1584
  data: [],
1580
1585
  key: Date.now(),
1581
1586
  hasMore: !0,
1582
1587
  loading: void 0,
1583
1588
  error: void 0
1584
- }), u = so(t), l = async () => {
1589
+ }), u = uo(t), d = async () => {
1585
1590
  const p = e.get(), v = n?.getStore().get().data?.map((w) => w.slId) || [];
1586
1591
  if (p && v?.length) {
1587
1592
  const w = r.get();
@@ -1601,19 +1606,19 @@ const Co = async (t, e) => {
1601
1606
  }), g.meta && (o = Math.round(g.meta.count / g.meta.pageSize));
1602
1607
  }
1603
1608
  }, c = () => {
1604
- l();
1609
+ d();
1605
1610
  }, f = (p) => {
1606
1611
  const v = s.get(), w = p || v.page + 1;
1607
1612
  w <= o && s.set({ ...v, page: w });
1608
1613
  };
1609
1614
  return wr(a, () => {
1610
- const p = e.listen(l), v = n?.listen(l);
1615
+ const p = e.listen(d), v = n?.listen(d);
1611
1616
  return () => {
1612
1617
  p(), v?.();
1613
1618
  };
1614
1619
  }), { $store: a, fetchMore: f, invalidate: c };
1615
1620
  };
1616
- class No extends We {
1621
+ class Fo extends We {
1617
1622
  get = this.read;
1618
1623
  set = this.write;
1619
1624
  del = this.remove;
@@ -1621,52 +1626,52 @@ class No extends We {
1621
1626
  super("deep-link-context", window.sessionStorage);
1622
1627
  }
1623
1628
  }
1624
- const Xr = "sldl", Ft = "sldl_uid", Mn = "sldl_eid", qn = "sldl_e_eid", Fo = /* @__PURE__ */ new Set([Ft, Mn, qn]), Zr = (t) => {
1629
+ const Zr = "sldl", Ft = "sldl_uid", qn = "sldl_eid", jn = "sldl_e_eid", Do = /* @__PURE__ */ new Set([Ft, qn, jn]), en = (t) => {
1625
1630
  const e = {}, r = {};
1626
1631
  for (const [n, i] of t)
1627
- Fo.has(n) ? e[n] = i : r[n] = i;
1632
+ Do.has(n) ? e[n] = i : r[n] = i;
1628
1633
  return { result: e, remain: r };
1629
- }, Do = ({ hash: t, search: e }) => {
1630
- if (t && t.includes(Xr)) {
1634
+ }, Ro = ({ hash: t, search: e }) => {
1635
+ if (t && t.includes(Zr)) {
1631
1636
  const r = new URLSearchParams(t.substr(1));
1632
- return { hash: Zr(r) };
1637
+ return { hash: en(r) };
1633
1638
  }
1634
- if (e && e.includes(Xr)) {
1639
+ if (e && e.includes(Zr)) {
1635
1640
  const r = new URLSearchParams(e);
1636
- return { search: Zr(r) };
1641
+ return { search: en(r) };
1637
1642
  }
1638
1643
  return null;
1639
- }, en = pe("deep_link"), fe = {
1644
+ }, tn = pe("deep_link"), fe = {
1640
1645
  debug: (...t) => {
1641
- en.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1646
+ tn.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1642
1647
  },
1643
1648
  trace: (...t) => {
1644
- en.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1649
+ tn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1645
1650
  }
1646
- }, Ro = (t, e) => {
1651
+ }, Vo = (t, e) => {
1647
1652
  const { hash: r, search: n } = window.location;
1648
1653
  if (fe.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1649
- const i = Do({ hash: r, search: n });
1654
+ const i = Ro({ hash: r, search: n });
1650
1655
  if (fe.debug(i, "parse deep link result"), i) {
1651
1656
  const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
1652
1657
  if (Object.keys(a).length !== 0) {
1653
1658
  t.setValue("data", a);
1654
- const l = Object.keys(u).length !== 0;
1659
+ const d = Object.keys(u).length !== 0;
1655
1660
  if (o) {
1656
1661
  let c = "";
1657
- l && (c = `#${new URLSearchParams(u).toString()}`, fe.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
1662
+ d && (c = `#${new URLSearchParams(u).toString()}`, fe.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
1658
1663
  }
1659
1664
  if (s) {
1660
1665
  let c = "";
1661
- l && (c = `?${new URLSearchParams(u).toString()}`, fe.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
1666
+ d && (c = `?${new URLSearchParams(u).toString()}`, fe.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
1662
1667
  }
1663
1668
  e(a);
1664
1669
  }
1665
1670
  }
1666
1671
  }
1667
1672
  t.setValue("parsed", !0);
1668
- }, Vo = (t, e, r) => {
1669
- const n = new No(), i = n.get("sl-deep-link-store");
1673
+ }, $o = (t, e, r) => {
1674
+ const n = new Fo(), i = n.get("sl-deep-link-store");
1670
1675
  let o = {};
1671
1676
  if (i)
1672
1677
  try {
@@ -1700,19 +1705,19 @@ const Xr = "sldl", Ft = "sldl_uid", Mn = "sldl_eid", qn = "sldl_e_eid", Fo = /*
1700
1705
  for (const u of t.deepLink.onDeepLinkHandlers)
1701
1706
  try {
1702
1707
  fe.trace("called handler"), u(a);
1703
- } catch (l) {
1704
- console.error(l);
1708
+ } catch (d) {
1709
+ console.error(d);
1705
1710
  }
1706
1711
  };
1707
- Ro(t.deepLink.$store, s), r();
1708
- }, $o = pe("bypass");
1709
- class Bo extends Vi {
1712
+ Vo(t.deepLink.$store, s), r();
1713
+ }, Bo = pe("bypass");
1714
+ class Mo extends Bi {
1710
1715
  $coreStore;
1711
1716
  deepLink;
1712
1717
  transport;
1713
1718
  bypassLogin;
1714
1719
  constructor(e, r, n) {
1715
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Yi(this.transport), this.connect();
1720
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Xi(this.transport), this.connect();
1716
1721
  }
1717
1722
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1718
1723
  /**
@@ -1724,7 +1729,7 @@ class Bo extends Vi {
1724
1729
  login = async (e, r) => {
1725
1730
  this.$coreStore.getValues().userKey.setValue(r);
1726
1731
  const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Ft];
1727
- $o.debug({ inviterKey: o }, "login with inviterKey");
1732
+ Bo.debug({ inviterKey: o }, "login with inviterKey");
1728
1733
  const s = await this.bypassLogin({
1729
1734
  schema: e,
1730
1735
  userKey: r,
@@ -1794,8 +1799,8 @@ class Bo extends Vi {
1794
1799
  });
1795
1800
  };
1796
1801
  }
1797
- const Xe = new je(), Mo = (t, e, r) => {
1798
- t.auth = new Bo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1802
+ const Xe = new je(), Uo = (t, e, r) => {
1803
+ t.auth = new Mo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1799
1804
  n === ve.READY && t.auth.reLogin();
1800
1805
  }), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
1801
1806
  if (!(Xe.getSchema() === n && Xe.getExternalToken() === i && t.transport.getHeader("authorization")))
@@ -1807,12 +1812,12 @@ const Xe = new je(), Mo = (t, e, r) => {
1807
1812
  }, t.sdk.logout = () => {
1808
1813
  t.auth.logout(), Xe.clear();
1809
1814
  }, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
1810
- }, tn = pe("video_player"), pt = {
1815
+ }, rn = pe("video_player"), pt = {
1811
1816
  debug: (...t) => {
1812
- tn.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1817
+ rn.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1813
1818
  },
1814
1819
  trace: (...t) => {
1815
- tn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1820
+ rn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1816
1821
  }
1817
1822
  }, qo = (t, e, r) => {
1818
1823
  t.videoPlayer = {
@@ -1832,13 +1837,13 @@ const Xe = new je(), Mo = (t, e, r) => {
1832
1837
  }
1833
1838
  }
1834
1839
  }, r();
1835
- }, Uo = {
1840
+ }, jo = {
1836
1841
  [I.FACTOID]: "insight",
1837
1842
  [I.POLL]: "poll",
1838
1843
  [I.TRIVIA]: "trivia",
1839
1844
  [I.PREDICTION]: "prediction",
1840
1845
  [I.TWEET]: "tweet"
1841
- }, jo = (t, e, r) => {
1846
+ }, xo = (t, e, r) => {
1842
1847
  t.sdk.uiState = Z({}), t.ui = {
1843
1848
  enableAppNotification: function() {
1844
1849
  t.sdk.uiState.setKey("appNotification", !0);
@@ -1872,11 +1877,20 @@ const Xe = new je(), Mo = (t, e, r) => {
1872
1877
  };
1873
1878
  t.onQuestionActivate = ({ questionType: i, ...o }) => {
1874
1879
  if (t.ui.onContentActivate) {
1875
- const s = o.type || i && Uo[i] || "question";
1876
- t.ui.onContentActivate({ ...o, type: s });
1880
+ const s = o.type || i && jo[i] || "question";
1881
+ t.ui.enableAppNotification(), t.ui.onContentActivate({ ...o, type: s });
1877
1882
  }
1878
1883
  }, t.sdk.onMount({ name: "ui" }, () => {
1879
1884
  const i = (a) => {
1885
+ if (a.slEventBus?.type === "app")
1886
+ switch (a.slEventBus.action) {
1887
+ case "open":
1888
+ t.ui.enableApp();
1889
+ break;
1890
+ case "close":
1891
+ t.ui.disableApp();
1892
+ break;
1893
+ }
1880
1894
  if (a.slEventBus?.type === "notification") {
1881
1895
  const u = a.slEventBus.action;
1882
1896
  if (a.slEventBus.payload.type === Ae.ONBOARDING)
@@ -1899,11 +1913,11 @@ const Xe = new je(), Mo = (t, e, r) => {
1899
1913
  }
1900
1914
  }
1901
1915
  if (a.slEventBus?.type === "advertisement" && e.withAd) {
1902
- const u = a.slEventBus, { hasNotification: l, hasBanner: c, id: f, isViewed: p, type: v } = u.payload;
1916
+ const u = a.slEventBus, { hasNotification: d, hasBanner: c, id: f, isViewed: p, type: v } = u.payload;
1903
1917
  switch (u.action) {
1904
1918
  case "notification-opened":
1905
1919
  t.sdk.uiState.set({
1906
- promotionExternalAd: v === U.EXTERNAL_AD,
1920
+ promotionExternalAd: v === q.EXTERNAL_AD,
1907
1921
  promotionBanner: c,
1908
1922
  promotionNotification: !1,
1909
1923
  promotionOverlay: !0,
@@ -1914,7 +1928,7 @@ const Xe = new je(), Mo = (t, e, r) => {
1914
1928
  if (t.sdk.closeFeature(), n({
1915
1929
  stage: "activate",
1916
1930
  id: f,
1917
- hasNotification: l,
1931
+ hasNotification: d,
1918
1932
  hasBanner: c,
1919
1933
  isViewed: p
1920
1934
  }), !e.withAdNotification) {
@@ -1923,11 +1937,11 @@ const Xe = new je(), Mo = (t, e, r) => {
1923
1937
  onboardingNotification: t.sdk.uiState.get().onboardingNotification,
1924
1938
  promotionOverlay: !0,
1925
1939
  promotionSidebar: !0,
1926
- promotionExternalAd: v === U.EXTERNAL_AD
1940
+ promotionExternalAd: v === q.EXTERNAL_AD
1927
1941
  });
1928
1942
  break;
1929
1943
  }
1930
- l ? t.sdk.uiState.set({
1944
+ d ? t.sdk.uiState.set({
1931
1945
  onboardingNotification: t.sdk.uiState.get().onboardingNotification,
1932
1946
  promotionNotification: !0
1933
1947
  }) : t.sdk.uiState.set({
@@ -1935,7 +1949,7 @@ const Xe = new je(), Mo = (t, e, r) => {
1935
1949
  promotionBanner: c,
1936
1950
  promotionOverlay: !0,
1937
1951
  promotionSidebar: !0,
1938
- promotionExternalAd: v === U.EXTERNAL_AD
1952
+ promotionExternalAd: v === q.EXTERNAL_AD
1939
1953
  });
1940
1954
  break;
1941
1955
  case "closed":
@@ -1949,7 +1963,7 @@ const Xe = new je(), Mo = (t, e, r) => {
1949
1963
  }), n({
1950
1964
  stage: "deactivate",
1951
1965
  id: f,
1952
- hasNotification: l,
1966
+ hasNotification: d,
1953
1967
  hasBanner: c,
1954
1968
  isViewed: p
1955
1969
  });
@@ -1963,12 +1977,12 @@ const Xe = new je(), Mo = (t, e, r) => {
1963
1977
  o(), s();
1964
1978
  };
1965
1979
  }), r();
1966
- }, xo = (t, e, r) => {
1980
+ }, Qo = (t, e, r) => {
1967
1981
  const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1968
1982
  t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = Z(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
1969
1983
  if (i.has(s)) {
1970
- const l = o.get(s);
1971
- l && l(), i.delete(s), o.delete(s);
1984
+ const d = o.get(s);
1985
+ d && d(), i.delete(s), o.delete(s);
1972
1986
  }
1973
1987
  i.set(s, { cb: u, clear: a }), t?.stores?.enabled?.get() === "on" && o.set(s, u());
1974
1988
  }, t.ready = () => {
@@ -1990,7 +2004,7 @@ const Xe = new je(), Mo = (t, e, r) => {
1990
2004
  }, t.sdk.createEventSession = (s) => {
1991
2005
  t.stores.providerStreamId.setValue(s);
1992
2006
  }, r();
1993
- }, Qo = (t, e) => {
2007
+ }, Go = (t, e) => {
1994
2008
  const { client: r, queryKey: n } = t.createPromiseClient(ot, {
1995
2009
  method: "generateDeepLink",
1996
2010
  params: e
@@ -2011,29 +2025,29 @@ const Xe = new je(), Mo = (t, e, r) => {
2011
2025
  // 24 hours
2012
2026
  refetchInterval: 0
2013
2027
  });
2014
- }, Go = (t, { web: e, mobile: r }) => {
2015
- const { client: n } = t.createPromiseClient(_i, { method: "generate" });
2028
+ }, Ko = (t, { web: e, mobile: r }) => {
2029
+ const { client: n } = t.createPromiseClient(Pi, { method: "generate" });
2016
2030
  return n.generate({ web: e, mobile: r });
2017
- }, rn = (t, e) => {
2031
+ }, nn = (t, e) => {
2018
2032
  const r = new URLSearchParams(t);
2019
2033
  for (const [n, i] of Object.entries(e))
2020
2034
  r.append(n, i);
2021
2035
  return r.toString();
2022
- }, Ko = (t, e, r, n) => {
2036
+ }, zo = (t, e, r, n) => {
2023
2037
  const i = Z({});
2024
- return wr(i, () => Qo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
2025
- const l = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
2038
+ return wr(i, () => Go(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
2039
+ const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
2026
2040
  [Ft]: c,
2027
- [Mn]: f,
2028
- [qn]: p
2041
+ [qn]: f,
2042
+ [jn]: p
2029
2043
  };
2030
- if (!u && l) {
2044
+ if (!u && d) {
2031
2045
  i.setKey("loading", !0);
2032
2046
  let w = window.location.search, m = window.location.hash;
2033
- w && m || m ? w = `?${rn(w, v)}` : m = `#${rn("", v)}`;
2047
+ w && m || m ? w = `?${nn(w, v)}` : m = `#${nn("", v)}`;
2034
2048
  const g = window.location.origin + window.location.pathname + w + m;
2035
2049
  try {
2036
- const S = await Go(t, { web: g, mobile: l });
2050
+ const S = await Ko(t, { web: g, mobile: d });
2037
2051
  i.set({
2038
2052
  data: S.data?.link,
2039
2053
  loading: !1
@@ -2053,7 +2067,7 @@ var $;
2053
2067
  (function(t) {
2054
2068
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
2055
2069
  })($ || ($ = {}));
2056
- const zo = (t, e, r, n) => {
2070
+ const Ho = (t, e, r, n) => {
2057
2071
  const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
2058
2072
  i && r.add({
2059
2073
  type: Ae.ONBOARDING,
@@ -2079,12 +2093,12 @@ const zo = (t, e, r, n) => {
2079
2093
  });
2080
2094
  }, ht = (t, e, r, n, i, o, s, a) => {
2081
2095
  try {
2082
- const u = e.userId.get(), l = e.organizationId.get(), c = e.slStreamId.get();
2083
- if (!u || !l || !c)
2096
+ const u = e.userId.get(), d = e.organizationId.get(), c = e.slStreamId.get();
2097
+ if (!u || !d || !c)
2084
2098
  return;
2085
2099
  const f = i.getOnboardingStatus({
2086
2100
  userId: u,
2087
- organizationId: l,
2101
+ organizationId: d,
2088
2102
  eventId: c
2089
2103
  });
2090
2104
  if (f === $.Completed || a?.skipOnboarding) {
@@ -2092,10 +2106,10 @@ const zo = (t, e, r, n) => {
2092
2106
  for (const g of o)
2093
2107
  g();
2094
2108
  a?.skipOnboarding && f !== $.Completed && (i.saveOnboardingStatus({
2095
- organizationId: l,
2109
+ organizationId: d,
2096
2110
  userId: u,
2097
2111
  eventId: c
2098
- }, $.Completed), Bn(s, e.slStreamId.get() || ""));
2112
+ }, $.Completed), Un(s, c));
2099
2113
  return;
2100
2114
  }
2101
2115
  const p = e.moderation.getStore().value?.data, v = r.featureSettings.get().inplayGame;
@@ -2106,11 +2120,11 @@ const zo = (t, e, r, n) => {
2106
2120
  } catch (u) {
2107
2121
  console.error(u);
2108
2122
  }
2109
- }, Ho = (t, e, r, n, i) => {
2123
+ }, on = (t, e, r, n, i) => {
2110
2124
  let o = !!i?.skipOnboarding;
2111
- const s = e.storage, a = q($.Unset);
2125
+ const s = e.storage, a = U($.Unset);
2112
2126
  a.subscribe((c) => {
2113
- c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (zo(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === $.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
2127
+ c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (Ho(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === $.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
2114
2128
  userId: e.userId.get() || "",
2115
2129
  organizationId: e.organizationId.get() || "",
2116
2130
  eventId: e.slStreamId.get() || ""
@@ -2126,7 +2140,7 @@ const zo = (t, e, r, n) => {
2126
2140
  }))), ht(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
2127
2141
  const c = e.slStreamId.get();
2128
2142
  if (c) {
2129
- await Bn(r, c), a.set($.Completed), s.saveOnboardingStatus({
2143
+ await Un(r, c), a.set($.Completed), s.saveOnboardingStatus({
2130
2144
  organizationId: e.organizationId.get() || "",
2131
2145
  userId: e.userId.get() || "",
2132
2146
  eventId: c
@@ -2139,14 +2153,14 @@ const zo = (t, e, r, n) => {
2139
2153
  }
2140
2154
  } };
2141
2155
  }, Wo = (t, e, r, n) => {
2142
- const i = Z(void 0), o = Vn(n), s = async () => {
2143
- const u = t.get(), l = e.get(), c = r ? r.getStore().get().data?.map((v) => v.slId) : [];
2144
- if (!c)
2156
+ const i = Z(void 0), o = Bn(n), s = async () => {
2157
+ const u = t.get(), d = e.get(), c = r ? r.getStore().get().data?.map((v) => v.slId) : [];
2158
+ if (!c || !u || !d)
2145
2159
  return;
2146
2160
  const f = {
2147
2161
  eventId: u,
2148
- userId: l,
2149
- usersIds: [...c, l]
2162
+ userId: d,
2163
+ usersIds: [...c, d]
2150
2164
  }, p = await o(f);
2151
2165
  i.set(p.data?.attributes);
2152
2166
  }, a = () => {
@@ -2154,20 +2168,20 @@ const zo = (t, e, r, n) => {
2154
2168
  };
2155
2169
  return wr(i, () => {
2156
2170
  a();
2157
- const u = t.listen(s), l = r?.listen(s), c = e.listen(s);
2171
+ const u = t.listen(s), d = r?.listen(s), c = e.listen(s);
2158
2172
  return () => {
2159
- u(), l?.(), c();
2173
+ u(), d?.(), c();
2160
2174
  };
2161
2175
  }), { $store: i, invalidate: a };
2162
2176
  }, Yo = async (t, e, r, n, i) => {
2163
- const o = Vn(i), s = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], l = {
2177
+ const o = Bn(i), s = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], d = {
2164
2178
  eventId: s,
2165
2179
  userId: n,
2166
2180
  usersIds: [...u, a]
2167
2181
  };
2168
- return (await o(l)).data?.attributes?.summary;
2182
+ return (await o(d)).data?.attributes?.summary;
2169
2183
  }, Jo = /* @__PURE__ */ new Set([I.POLL, I.PREDICTION, I.TRIVIA]);
2170
- class Xo extends Dn {
2184
+ class Xo extends Vn {
2171
2185
  /** user statistics (leaderboard panel) */
2172
2186
  userSummary;
2173
2187
  /** feed list (pick history) */
@@ -2197,6 +2211,7 @@ class Xo extends Dn {
2197
2211
  advertisement;
2198
2212
  onboardingProcessed;
2199
2213
  friendsTabEnabled;
2214
+ skipOnboarding;
2200
2215
  notifications;
2201
2216
  transport;
2202
2217
  /** gamification background class, handle subscriptions and notifications for closed overlay */
@@ -2207,18 +2222,20 @@ class Xo extends Dn {
2207
2222
  cancels = /* @__PURE__ */ new Set();
2208
2223
  onQuestionActivate;
2209
2224
  constructor(e, r, n) {
2210
- if (super(e, r), this.background = new Io(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 = q(!n.sdk.withAuth), this.leaderboardId = new re(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Ho(this, this.background, n.transport, n.notifications, {
2211
- skipOnboarding: n.sdk.options.get().skipOnboarding
2212
- }), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Ko(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Wo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
2213
- this.friends = new se(ao(this.background.userId, n.transport), "gamification:friends"), this.openedUser = q(void 0);
2214
- const i = this.leaderboardList = Lo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
2225
+ if (super(e, r), this.background = new To(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 = U(!n.sdk.withAuth), this.leaderboardId = new re(U(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(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = zo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Wo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
2226
+ this.friends = new se(co(this.background.userId, n.transport), "gamification:friends"), this.openedUser = U(void 0);
2227
+ const i = this.leaderboardList = No(this.transport, this.background.slStreamId, this.background.userId, this.friends);
2215
2228
  this.cancels.add(this.userSummary.$store.listen((o, s) => {
2216
2229
  s?.summary && o?.summary && i.invalidate();
2217
2230
  }));
2218
2231
  }
2219
- this.connect(), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
2232
+ this.connect(), this.skipOnboarding = !!n.sdk.options.get().skipOnboarding, this.onboardingStatus = on(this, this.background, n.transport, n.notifications, {
2233
+ skipOnboarding: n.sdk.options.get().skipOnboarding
2234
+ }), n.sdk.options.get().skipOnboarding || (this.onboardingStatus = on(this, this.background, n.transport, n.notifications, {
2235
+ skipOnboarding: n.sdk.options.get().skipOnboarding
2236
+ })), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
2220
2237
  (o === void 0 || i !== $.Unset) && this.background.activeQuestionId.invalidate();
2221
- })), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = q(!1), this.cancels.add(n.sdk.options.subscribe((i) => {
2238
+ })), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = U(!1), this.cancels.add(n.sdk.options.subscribe((i) => {
2222
2239
  i.friendsTab === "disabled" ? this.friendsTabEnabled.set(!1) : i.friendsTab === "enabled" && this.friendsTabEnabled.set(!0);
2223
2240
  })), this.cancels.add(this.settings.subscribe((i) => {
2224
2241
  n.sdk.options.get().friendsTab === "activatedGame" && this.friendsTabEnabled.set(!!i.inplayGame?.titleCard?.optIn);
@@ -2228,15 +2245,19 @@ class Xo extends Dn {
2228
2245
  });
2229
2246
  }
2230
2247
  get isInteractiveAllowed() {
2231
- return this.background.interactiveAllowed.get() === Pe.ALLOWED;
2248
+ return this.background.interactiveAllowed.get() === Oe.ALLOWED;
2232
2249
  }
2233
2250
  checkInteractiveFlag = () => {
2234
- const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === $.Completed, o = !r || i || n !== !0;
2235
- this.background.interactiveAllowed.set(o ? Pe.ALLOWED : Pe.DISALLOWED);
2251
+ if (this.skipOnboarding)
2252
+ this.background.interactiveAllowed.set(Oe.ALLOWED);
2253
+ else {
2254
+ const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === $.Completed, o = !r || i || n !== !0;
2255
+ this.background.interactiveAllowed.set(o ? Oe.ALLOWED : Oe.DISALLOWED);
2256
+ }
2236
2257
  };
2237
2258
  connect = () => {
2238
2259
  this.onboardingProcessed.subscribe((e) => {
2239
- e && this.advertisement.connect();
2260
+ e && this.advertisement && this.advertisement.connect();
2240
2261
  }), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (e) => {
2241
2262
  if (!this.isInteractiveAllowed)
2242
2263
  return;
@@ -2244,10 +2265,10 @@ class Xo extends Dn {
2244
2265
  if (!r || !n?.attributes)
2245
2266
  return;
2246
2267
  const { status: i, type: o, id: s, answers: a } = r;
2247
- if (i === Y.RESOLVED && o === I.PREDICTION) {
2268
+ if (i === G.RESOLVED && o === I.PREDICTION) {
2248
2269
  const u = this.background.getCurrentSessionId({
2249
2270
  prefix: `notification-id:${s}`
2250
- }), l = [...this.feedList.getValues().data || []], c = l.findIndex((z) => z.id === s), f = l[c];
2271
+ }), d = [...this.feedList.getValues().data || []], c = d.findIndex((H) => H.id === s), f = d[c];
2251
2272
  let p = f?.attributes?.attributes?.value?.answerId;
2252
2273
  const v = nt(s, this.transport), w = v.subscribe(() => {
2253
2274
  });
@@ -2255,14 +2276,14 @@ class Xo extends Dn {
2255
2276
  let m = v.get().data;
2256
2277
  m || (m = await cr(s, this.transport)), w(), window.requestAnimationFrame(() => {
2257
2278
  v.invalidate();
2258
- }), p || (p = m?.answers.find(({ youVoted: z }) => z)?.id);
2259
- const g = a.find(({ correct: z }) => z), S = p ? a.find(({ id: z }) => z === p) : void 0, F = !!S?.correct;
2260
- if (f && l[c]?.attributes?.attributes.case === "question") {
2279
+ }), p || (p = m?.answers.find(({ youVoted: H }) => H)?.id);
2280
+ const g = a.find(({ correct: H }) => H), S = p ? a.find(({ id: H }) => H === p) : void 0, F = !!S?.correct;
2281
+ if (f && d[c]?.attributes?.attributes.case === "question") {
2261
2282
  try {
2262
- l[c].attributes.attributes.value.answerId = p, l[c].attributes.attributes.value.openForVoting = !1, p && (l[c].attributes.attributes.value.status = F ? lt.WON : lt.LOST);
2283
+ d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = F ? lt.WON : lt.LOST);
2263
2284
  } catch {
2264
2285
  }
2265
- this.feedList.getStore().mutate(l);
2286
+ this.feedList.getStore().mutate(d);
2266
2287
  }
2267
2288
  if (!S || !g)
2268
2289
  return;
@@ -2284,7 +2305,7 @@ class Xo extends Dn {
2284
2305
  },
2285
2306
  correctAnswerTitle: g?.text,
2286
2307
  correct: !!F,
2287
- predictionResult: i === Y.RESOLVED,
2308
+ predictionResult: i === G.RESOLVED,
2288
2309
  questionTitle: r?.subject
2289
2310
  }
2290
2311
  }
@@ -2292,7 +2313,7 @@ class Xo extends Dn {
2292
2313
  }
2293
2314
  })), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
2294
2315
  const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
2295
- if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== Y.ACTIVE && n.attributes.status !== Y.RESOLVED)) {
2316
+ if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== G.ACTIVE && n.attributes.status !== G.RESOLVED)) {
2296
2317
  if (i !== -1)
2297
2318
  if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
2298
2319
  const o = r[i];
@@ -2353,15 +2374,18 @@ class Xo extends Dn {
2353
2374
  this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
2354
2375
  };
2355
2376
  betPackVote = async (e, r) => {
2356
- await this.submitAnswer(e, r);
2357
- const i = { ...this.betPack.getValues().data }?.[e];
2358
- i && B.emit("poll", {
2377
+ await Xr(this.transport, { questionId: e, answerId: r });
2378
+ const n = { ...this.betPack.getValues().data }, i = n?.[e];
2379
+ i && (B.emit("poll", {
2359
2380
  action: "voted",
2360
2381
  payload: {
2361
2382
  questionId: e,
2362
2383
  questionType: i.type
2363
2384
  }
2364
- });
2385
+ }), i.answers = i.answers.map((o) => o.id === r ? {
2386
+ ...o,
2387
+ youVoted: !0
2388
+ } : o), this.betPack.getStore().mutate(n));
2365
2389
  };
2366
2390
  submitAnswer = async (e, r) => {
2367
2391
  const n = nt(e, this.transport), i = n.subscribe(() => {
@@ -2369,7 +2393,7 @@ class Xo extends Dn {
2369
2393
  const a = this.feedList.getValues().data;
2370
2394
  if (!a)
2371
2395
  return;
2372
- const u = a.findIndex((f) => f.id === e), l = a[u], c = l?.attributes?.attributes.case === "question" && l.attributes.attributes.value;
2396
+ const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
2373
2397
  if (c) {
2374
2398
  B.emit("poll", {
2375
2399
  action: "voted",
@@ -2383,7 +2407,7 @@ class Xo extends Dn {
2383
2407
  const p = f.answers.find((g) => g.correct === !0), v = f.answers.findIndex((g) => g.id === r), w = f.answers[v], m = f.answers.every(({ percentageDecimal: g }, S) => g === o?.answers[S].percentageDecimal);
2384
2408
  a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = w?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? lt.WON : lt.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, m && f.answers.forEach((g) => {
2385
2409
  g.percentageDecimal = 0;
2386
- }), p?.id === r && (f.answers[v].pointsEarned = f.status === Y.RESOLVED ? 0 : p.points), n.mutate({ ...f });
2410
+ }), p?.id === r && (f.answers[v].pointsEarned = f.status === G.RESOLVED ? 0 : p.points), n.mutate({ ...f });
2387
2411
  }
2388
2412
  this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
2389
2413
  this.userSummary.invalidate();
@@ -2391,7 +2415,7 @@ class Xo extends Dn {
2391
2415
  }
2392
2416
  };
2393
2417
  try {
2394
- await Co(this.transport, { questionId: e, answerId: r }), s();
2418
+ await Xr(this.transport, { questionId: e, answerId: r }), s();
2395
2419
  } catch (a) {
2396
2420
  if (a.message === it.ALREADY_VOTED) {
2397
2421
  this.userSummary.invalidate();
@@ -2406,29 +2430,33 @@ class Xo extends Dn {
2406
2430
  if (!e)
2407
2431
  return () => {
2408
2432
  };
2409
- this.notifications.close(this.background.getCurrentSessionId({
2433
+ const n = r?.openedFrom === "bet-pack";
2434
+ n && this.notifications.close(this.background.getCurrentSessionId({
2410
2435
  prefix: "notification",
2411
2436
  entity: e
2412
2437
  }), {
2413
2438
  animateHiding: !1
2414
2439
  });
2415
- let n = r?.attributes?.type;
2416
- n || (n = (this.feedList.getStore().value?.data || []).find((s) => s.id === e)?.attributes?.type);
2417
- const i = {
2440
+ let i = r?.attributes?.type;
2441
+ !i && !n && (i = (this.feedList.getStore().value?.data || []).find((a) => a.id === e)?.attributes?.type);
2442
+ const o = {
2418
2443
  eventId: this.background.slStreamId.get() || "",
2419
2444
  userId: this.background.userId.get() || "",
2420
2445
  organizationId: this.background.organizationId.get() || ""
2421
2446
  };
2422
- return this.storage.isQuestionOpened(i, e) || (B.emit("poll", {
2447
+ return this.storage.isQuestionOpened(o, e) || (B.emit("poll", {
2423
2448
  action: "opened",
2424
2449
  payload: {
2425
2450
  questionId: e,
2426
- questionType: n,
2427
- questionOpenedFrom: r?.openedFrom
2451
+ questionType: i,
2452
+ questionOpenedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom
2428
2453
  }
2429
- }), this.storage.saveQuestionOpened(i, e)), this.openFeature(), this.background.openQuestion(e, r);
2454
+ }), this.storage.saveQuestionOpened(o, e)), n || this.openFeature(), this.background.openQuestion(e, r ? {
2455
+ ...r,
2456
+ openedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom
2457
+ } : void 0);
2430
2458
  };
2431
- getFeedItem = (e) => lo(e, this.transport);
2459
+ getFeedItem = (e) => po(e, this.transport);
2432
2460
  isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
2433
2461
  closeQuestion = (e) => (e && this.onQuestionActivate({
2434
2462
  stage: "deactivate",
@@ -2470,7 +2498,7 @@ class Xo extends Dn {
2470
2498
  */
2471
2499
  showInApp = (e) => {
2472
2500
  const r = this.onboardingStatus.$store.get();
2473
- if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Ai.ON && e.data.question.status === Y.ACTIVE && !e.data.question.marketClosed) {
2501
+ if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Ii.ON && e.data.question.status === G.ACTIVE && !e.data.question.marketClosed) {
2474
2502
  if (Jo.has(e.data.question.type))
2475
2503
  this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
2476
2504
  type: Ae.QUESTION,
@@ -2523,7 +2551,7 @@ class Xo extends Dn {
2523
2551
  questionType: e.data.question.type,
2524
2552
  insight: s,
2525
2553
  inApp: {
2526
- useMediaFromContent: n.useAsNotification === Ei.ENABLED,
2554
+ useMediaFromContent: n?.useAsNotification === Oi.ENABLED,
2527
2555
  notification: e.data.question.notification,
2528
2556
  appearance: e.data.question.appearance,
2529
2557
  sponsorship: e.data.question.sponsorship
@@ -2577,14 +2605,16 @@ class Xo extends Dn {
2577
2605
  const Zo = {
2578
2606
  [R.GAMES]: !0
2579
2607
  };
2580
- class es extends Dn {
2608
+ class es extends Vn {
2581
2609
  constructor(e, r) {
2582
2610
  super(e, r);
2583
2611
  }
2584
2612
  }
2585
2613
  const ts = (t, e, r) => t.type === R.GAMES ? new Xo(t, e, r) : new es(t, e), rs = (t, e, r) => {
2586
- t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new re(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new re(q(R.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) => {
2587
- t.activeFeature.setValue(n);
2614
+ t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new re(U(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new re(U(R.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) => {
2615
+ t.sdk.initializeApp().then(() => {
2616
+ t.activeFeature.setValue(n);
2617
+ });
2588
2618
  }, t.sdk.closeFeature = (n = !1) => {
2589
2619
  const i = t.activeFeature.getValue();
2590
2620
  if (t.activeFeature.setValue(R.UNSET), n && i) {
@@ -2666,20 +2696,20 @@ class ns {
2666
2696
  this.analytics.write("invitation", {
2667
2697
  common: {
2668
2698
  ...this.analytics.commonStore.getValues(),
2669
- kind: G.INVITATION_ACCEPTED
2699
+ kind: K.INVITATION_ACCEPTED
2670
2700
  },
2671
2701
  category: Mr.GAMES,
2672
- from: qr.UNSET
2702
+ from: Ur.UNSET
2673
2703
  });
2674
2704
  };
2675
2705
  sent = ({ from: e }) => {
2676
2706
  this.analytics.write("invitation", {
2677
2707
  common: {
2678
2708
  ...this.analytics.commonStore.getValues(),
2679
- kind: G.INVITATION_SENT
2709
+ kind: K.INVITATION_SENT
2680
2710
  },
2681
2711
  category: Mr.GAMES,
2682
- from: e || qr.UNSET
2712
+ from: e || Ur.UNSET
2683
2713
  });
2684
2714
  };
2685
2715
  }
@@ -2705,7 +2735,7 @@ class is {
2705
2735
  this.analytics.write("interactions", {
2706
2736
  common: {
2707
2737
  ...this.analytics.commonStore.getValues(),
2708
- kind: G.INTERACTIONS
2738
+ kind: K.INTERACTIONS
2709
2739
  },
2710
2740
  actionType: zr.TAP
2711
2741
  });
@@ -2714,25 +2744,25 @@ class is {
2714
2744
  this.analytics.write("interactions", {
2715
2745
  common: {
2716
2746
  ...this.analytics.commonStore.getValues(),
2717
- kind: G.INTERACTIONS
2747
+ kind: K.INTERACTIONS
2718
2748
  },
2719
2749
  actionType: zr.SCROLL
2720
2750
  });
2721
2751
  };
2722
2752
  }
2723
2753
  const os = {
2724
- [U.UNSET]: J.UNSET,
2725
- [U.INGAME_IAB21]: J.PROMOTION_INGAME_IAB21,
2726
- [U.INGAME_IAB11_LBAR]: J.PROMOTION_INGAME_IAB11_LBAR,
2727
- [U.INGAME_IAB11]: J.PROMOTION_INGAME_IAB11,
2728
- [U.INGAME_IAB21_LBAR]: J.PROMOTION_INGAME_IAB21_LBAR,
2729
- [U.INGAME_IAB61]: J.PROMOTION_INGAME_IAB61,
2730
- [U.EXTERNAL_AD]: J.PROMOTION_GAM,
2731
- [U.VIDEO_SIDE_BY_SIDE]: J.PROMOTION_VIDEO_SIDE_BY_SIDE,
2732
- [U.PICTURE_IN_PICTURE]: J.PROMOTION_PICTURE_IN_PICTURE,
2733
- [U.SHOP_LBAR]: J.PROMOTION_SHOP_LBAR,
2734
- [U.SHOP_OVERLAY]: J.PROMOTION_SHOP_OVERLAY,
2735
- [U.SHOP_SIDEBAR]: J.PROMOTION_SHOP_SIDEBAR
2754
+ [q.UNSET]: J.UNSET,
2755
+ [q.INGAME_IAB21]: J.PROMOTION_INGAME_IAB21,
2756
+ [q.INGAME_IAB11_LBAR]: J.PROMOTION_INGAME_IAB11_LBAR,
2757
+ [q.INGAME_IAB11]: J.PROMOTION_INGAME_IAB11,
2758
+ [q.INGAME_IAB21_LBAR]: J.PROMOTION_INGAME_IAB21_LBAR,
2759
+ [q.INGAME_IAB61]: J.PROMOTION_INGAME_IAB61,
2760
+ [q.EXTERNAL_AD]: J.PROMOTION_GAM,
2761
+ [q.VIDEO_SIDE_BY_SIDE]: J.PROMOTION_VIDEO_SIDE_BY_SIDE,
2762
+ [q.PICTURE_IN_PICTURE]: J.PROMOTION_PICTURE_IN_PICTURE,
2763
+ [q.SHOP_LBAR]: J.PROMOTION_SHOP_LBAR,
2764
+ [q.SHOP_OVERLAY]: J.PROMOTION_SHOP_OVERLAY,
2765
+ [q.SHOP_SIDEBAR]: J.PROMOTION_SHOP_SIDEBAR
2736
2766
  }, dr = (t) => t ? os[t] : J.UNSET;
2737
2767
  class ss {
2738
2768
  analytics;
@@ -2770,7 +2800,7 @@ class ss {
2770
2800
  this.analytics.write("games", {
2771
2801
  common: {
2772
2802
  ...this.analytics.commonStore.getValues(),
2773
- kind: G.POLLS_RECEIVED,
2803
+ kind: K.POLLS_RECEIVED,
2774
2804
  topicId: e,
2775
2805
  topicType: Q.POLLS_PROMOTION,
2776
2806
  topicSubType: r
@@ -2782,7 +2812,7 @@ class ss {
2782
2812
  this.analytics.write("games", {
2783
2813
  common: {
2784
2814
  ...this.analytics.commonStore.getValues(),
2785
- kind: G.POLLS_OPENED,
2815
+ kind: K.POLLS_OPENED,
2786
2816
  topicId: e,
2787
2817
  topicType: Q.POLLS_PROMOTION,
2788
2818
  topicSubType: n
@@ -2794,7 +2824,7 @@ class ss {
2794
2824
  this.analytics.write("games", {
2795
2825
  common: {
2796
2826
  ...this.analytics.commonStore.getValues(),
2797
- kind: G.POLLS_OPENED,
2827
+ kind: K.POLLS_OPENED,
2798
2828
  topicId: e,
2799
2829
  topicType: Q.POLLS_PROMOTION,
2800
2830
  topicSubType: r
@@ -2807,7 +2837,7 @@ class ss {
2807
2837
  common: {
2808
2838
  ...this.analytics.commonStore.getValues(),
2809
2839
  topicId: e,
2810
- kind: G.AD_VIDEO_PLAYED,
2840
+ kind: K.AD_VIDEO_PLAYED,
2811
2841
  topicType: Q.POLLS_PROMOTION,
2812
2842
  topicSubType: r
2813
2843
  },
@@ -2819,7 +2849,7 @@ class ss {
2819
2849
  common: {
2820
2850
  ...this.analytics.commonStore.getValues(),
2821
2851
  topicId: e,
2822
- kind: G.AD_BUTTON_NAVIGATED,
2852
+ kind: K.AD_BUTTON_NAVIGATED,
2823
2853
  topicType: Q.POLLS_PROMOTION,
2824
2854
  topicSubType: r
2825
2855
  },
@@ -2831,7 +2861,7 @@ class ss {
2831
2861
  common: {
2832
2862
  ...this.analytics.commonStore.getValues(),
2833
2863
  topicId: e,
2834
- kind: G.AD_BANNER_NAVIGATED,
2864
+ kind: K.AD_BANNER_NAVIGATED,
2835
2865
  topicType: Q.POLLS_PROMOTION,
2836
2866
  topicSubType: r
2837
2867
  },
@@ -2850,24 +2880,24 @@ const et = {
2850
2880
  };
2851
2881
  I.UNSET + "", me.UNSET, I.FACTOID + "", me.POLLS, I.POLL + "", me.POLLS, I.PREDICTION + "", me.POLLS, I.PROMOTION + "", me.POLLS, I.TRIVIA + "", me.POLLS, I.TWEET + "", me.POLLS;
2852
2882
  const as = {
2853
- [R.UNSET]: H.UNSET,
2854
- [R.INPLAY]: H.INPLAY,
2855
- [R.MESSAGING]: H.MESSAGING,
2856
- [R.STATISTICS]: H.STATS,
2857
- [R.BETTING]: H.BETTING,
2858
- [R.TWITTER]: H.TWITTER,
2859
- [R.MERCHANDISE]: H.MERCHANDISE,
2860
- [R.CONTESTS]: H.CONTESTS,
2861
- [R.VOICE_CHAT]: H.CALLING,
2862
- [R.TICKETS]: H.TICKETS,
2863
- [R.WHOIS_WATCHING]: H.WHOISWATCHING,
2864
- [R.PROFILE]: H.PROFILE,
2865
- [R.GAMES]: H.POLLS,
2883
+ [R.UNSET]: W.UNSET,
2884
+ [R.INPLAY]: W.INPLAY,
2885
+ [R.MESSAGING]: W.MESSAGING,
2886
+ [R.STATISTICS]: W.STATS,
2887
+ [R.BETTING]: W.BETTING,
2888
+ [R.TWITTER]: W.TWITTER,
2889
+ [R.MERCHANDISE]: W.MERCHANDISE,
2890
+ [R.CONTESTS]: W.CONTESTS,
2891
+ [R.VOICE_CHAT]: W.CALLING,
2892
+ [R.TICKETS]: W.TICKETS,
2893
+ [R.WHOIS_WATCHING]: W.WHOISWATCHING,
2894
+ [R.PROFILE]: W.PROFILE,
2895
+ [R.GAMES]: W.POLLS,
2866
2896
  // ??
2867
- [R.GOLF_STATISTICS]: H.STATS,
2897
+ [R.GOLF_STATISTICS]: W.STATS,
2868
2898
  // ??
2869
- [R.HIGHLIGHTS]: H.HIGHLIGHTS,
2870
- [R.PUBLIC_CHAT]: H.PUBLIC_CHAT
2899
+ [R.HIGHLIGHTS]: W.HIGHLIGHTS,
2900
+ [R.PUBLIC_CHAT]: W.PUBLIC_CHAT
2871
2901
  };
2872
2902
  class us {
2873
2903
  analytics;
@@ -2908,7 +2938,7 @@ class us {
2908
2938
  this.analytics.write("notification", {
2909
2939
  common: {
2910
2940
  ...this.analytics.commonStore.getValues(),
2911
- kind: G.NOTIFICATION_RECEIVED,
2941
+ kind: K.NOTIFICATION_RECEIVED,
2912
2942
  topicId: e,
2913
2943
  topicType: r ? et[r] : Q.UNSET,
2914
2944
  topicSubType: n
@@ -2921,7 +2951,7 @@ class us {
2921
2951
  this.analytics.write("notification", {
2922
2952
  common: {
2923
2953
  ...this.analytics.commonStore.getValues(),
2924
- kind: G.NOTIFICATION_OPENED,
2954
+ kind: K.NOTIFICATION_OPENED,
2925
2955
  topicId: e,
2926
2956
  topicType: r ? et[r] : Q.UNSET,
2927
2957
  topicSubType: n
@@ -2963,7 +2993,7 @@ class cs {
2963
2993
  this.analytics.write("games", {
2964
2994
  common: {
2965
2995
  ...this.analytics.commonStore.getValues(),
2966
- kind: G.POLLS_RECEIVED,
2996
+ kind: K.POLLS_RECEIVED,
2967
2997
  topicId: e,
2968
2998
  topicType: r ? et[r] : Q.UNSET
2969
2999
  },
@@ -2975,7 +3005,7 @@ class cs {
2975
3005
  this.analytics.write("games", {
2976
3006
  common: {
2977
3007
  ...this.analytics.commonStore.getValues(),
2978
- kind: G.POLLS_OPENED,
3008
+ kind: K.POLLS_OPENED,
2979
3009
  topicId: e,
2980
3010
  topicType: r ? et[r] : Q.UNSET
2981
3011
  },
@@ -2987,7 +3017,7 @@ class cs {
2987
3017
  this.analytics.write("games", {
2988
3018
  common: {
2989
3019
  ...this.analytics.commonStore.getValues(),
2990
- kind: G.POLLS_VOTE,
3020
+ kind: K.POLLS_VOTE,
2991
3021
  topicId: e,
2992
3022
  topicType: r ? et[r] : Q.UNSET
2993
3023
  },
@@ -2999,7 +3029,7 @@ class cs {
2999
3029
  this.analytics.write("games", {
3000
3030
  common: {
3001
3031
  ...this.analytics.commonStore.getValues(),
3002
- kind: G.GAMES_JOINED
3032
+ kind: K.GAMES_JOINED
3003
3033
  },
3004
3034
  pollOpenedFrom: X.UNSET
3005
3035
  });
@@ -3009,7 +3039,7 @@ class cs {
3009
3039
  this.analytics.write("games", {
3010
3040
  common: {
3011
3041
  ...this.analytics.commonStore.getValues(),
3012
- kind: G.POLLS_NAVIGATED
3042
+ kind: K.POLLS_NAVIGATED
3013
3043
  },
3014
3044
  pollOpenedFrom: X.UNSET
3015
3045
  });
@@ -3017,7 +3047,7 @@ class cs {
3017
3047
  }
3018
3048
  const ds = ({ transport: t, $commonStore: e }) => {
3019
3049
  let r;
3020
- const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(Cn, {
3050
+ const n = U(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(Ln, {
3021
3051
  method: "send",
3022
3052
  params: [n]
3023
3053
  }), a = t.nanoquery.createFetcherStore(s, {
@@ -3030,7 +3060,7 @@ const ds = ({ transport: t, $commonStore: e }) => {
3030
3060
  value: {
3031
3061
  common: {
3032
3062
  ...p,
3033
- kind: G.SESSION_HEARTBEAT
3063
+ kind: K.SESSION_HEARTBEAT
3034
3064
  }
3035
3065
  }
3036
3066
  }
@@ -3044,12 +3074,12 @@ const ds = ({ transport: t, $commonStore: e }) => {
3044
3074
  }), u = () => {
3045
3075
  Se.debug("mounted heartbeat"), r = a.subscribe(() => {
3046
3076
  });
3047
- }, l = () => {
3077
+ }, d = () => {
3048
3078
  Se.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
3049
3079
  }, c = () => {
3050
3080
  Se.debug("disabled heartbeat"), n.set(!1);
3051
3081
  };
3052
- return { enable: l, disable: c, mount: u, unmount: () => {
3082
+ return { enable: d, disable: c, mount: u, unmount: () => {
3053
3083
  Se.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
3054
3084
  } };
3055
3085
  }, Se = pe("analytics");
@@ -3067,7 +3097,7 @@ class ls {
3067
3097
  connected = !1;
3068
3098
  constructor(e) {
3069
3099
  this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ce(Z({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ds({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new us(this), this.polls = new cs(this), this.invitation = new ns(this), this.interactions = new is(this), this.advertisement = new ss(this);
3070
- const { client: r } = e.analyticsTransport.createPromiseClient(Cn, {
3100
+ const { client: r } = e.analyticsTransport.createPromiseClient(Ln, {
3071
3101
  method: "send"
3072
3102
  });
3073
3103
  this.analyticsClient = r;
@@ -3134,7 +3164,7 @@ function hs(t) {
3134
3164
  };
3135
3165
  }
3136
3166
  var ys = hs, ms = ys;
3137
- function Un(t, e, r) {
3167
+ function xn(t, e, r) {
3138
3168
  if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
3139
3169
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
3140
3170
  var n = ms(gs), i = null, o = null, s = 0, a = null, u = {
@@ -3153,7 +3183,7 @@ function Un(t, e, r) {
3153
3183
  for (; i && s < r; )
3154
3184
  s++, S();
3155
3185
  },
3156
- running: l,
3186
+ running: d,
3157
3187
  resume: v,
3158
3188
  idle: w,
3159
3189
  length: f,
@@ -3161,11 +3191,11 @@ function Un(t, e, r) {
3161
3191
  unshift: g,
3162
3192
  empty: te,
3163
3193
  kill: F,
3164
- killAndDrain: z,
3194
+ killAndDrain: H,
3165
3195
  error: ne
3166
3196
  };
3167
3197
  return u;
3168
- function l() {
3198
+ function d() {
3169
3199
  return s;
3170
3200
  }
3171
3201
  function c() {
@@ -3210,7 +3240,7 @@ function Un(t, e, r) {
3210
3240
  function F() {
3211
3241
  i = null, o = null, u.drain = te;
3212
3242
  }
3213
- function z() {
3243
+ function H() {
3214
3244
  i = null, o = null, u.drain(), u.drain = te;
3215
3245
  }
3216
3246
  function ne(L) {
@@ -3234,8 +3264,8 @@ function bs(t, e, r) {
3234
3264
  f(null, p);
3235
3265
  }, f);
3236
3266
  }
3237
- var i = Un(t, n, r), o = i.push, s = i.unshift;
3238
- return i.push = a, i.unshift = u, i.drained = l, i;
3267
+ var i = xn(t, n, r), o = i.push, s = i.unshift;
3268
+ return i.push = a, i.unshift = u, i.drained = d, i;
3239
3269
  function a(c) {
3240
3270
  var f = new Promise(function(p, v) {
3241
3271
  o(c, function(w, m) {
@@ -3260,7 +3290,7 @@ function bs(t, e, r) {
3260
3290
  });
3261
3291
  return f.catch(te), f;
3262
3292
  }
3263
- function l() {
3293
+ function d() {
3264
3294
  if (i.idle())
3265
3295
  return new Promise(function(p) {
3266
3296
  p();
@@ -3273,9 +3303,9 @@ function bs(t, e, r) {
3273
3303
  return f;
3274
3304
  }
3275
3305
  }
3276
- Or.exports = Un;
3306
+ Or.exports = xn;
3277
3307
  Or.exports.promise = bs;
3278
- var jn = Or.exports, Tr = { exports: {} }, Ge = typeof Reflect == "object" ? Reflect : null, nn = Ge && typeof Ge.apply == "function" ? Ge.apply : function(e, r, n) {
3308
+ var Qn = Or.exports, Tr = { exports: {} }, Ge = typeof Reflect == "object" ? Reflect : null, sn = Ge && typeof Ge.apply == "function" ? Ge.apply : function(e, r, n) {
3279
3309
  return Function.prototype.apply.call(e, r, n);
3280
3310
  }, mt;
3281
3311
  Ge && typeof Ge.ownKeys == "function" ? mt = Ge.ownKeys : Object.getOwnPropertySymbols ? mt = function(e) {
@@ -3286,7 +3316,7 @@ Ge && typeof Ge.ownKeys == "function" ? mt = Ge.ownKeys : Object.getOwnPropertyS
3286
3316
  function vs(t) {
3287
3317
  console && console.warn && console.warn(t);
3288
3318
  }
3289
- var xn = Number.isNaN || function(e) {
3319
+ var Gn = Number.isNaN || function(e) {
3290
3320
  return e !== e;
3291
3321
  };
3292
3322
  function N() {
@@ -3298,7 +3328,7 @@ N.EventEmitter = N;
3298
3328
  N.prototype._events = void 0;
3299
3329
  N.prototype._eventsCount = 0;
3300
3330
  N.prototype._maxListeners = void 0;
3301
- var on = 10;
3331
+ var an = 10;
3302
3332
  function Dt(t) {
3303
3333
  if (typeof t != "function")
3304
3334
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
@@ -3306,27 +3336,27 @@ function Dt(t) {
3306
3336
  Object.defineProperty(N, "defaultMaxListeners", {
3307
3337
  enumerable: !0,
3308
3338
  get: function() {
3309
- return on;
3339
+ return an;
3310
3340
  },
3311
3341
  set: function(t) {
3312
- if (typeof t != "number" || t < 0 || xn(t))
3342
+ if (typeof t != "number" || t < 0 || Gn(t))
3313
3343
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
3314
- on = t;
3344
+ an = t;
3315
3345
  }
3316
3346
  });
3317
3347
  N.init = function() {
3318
3348
  (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;
3319
3349
  };
3320
3350
  N.prototype.setMaxListeners = function(e) {
3321
- if (typeof e != "number" || e < 0 || xn(e))
3351
+ if (typeof e != "number" || e < 0 || Gn(e))
3322
3352
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
3323
3353
  return this._maxListeners = e, this;
3324
3354
  };
3325
- function Qn(t) {
3355
+ function Kn(t) {
3326
3356
  return t._maxListeners === void 0 ? N.defaultMaxListeners : t._maxListeners;
3327
3357
  }
3328
3358
  N.prototype.getMaxListeners = function() {
3329
- return Qn(this);
3359
+ return Kn(this);
3330
3360
  };
3331
3361
  N.prototype.emit = function(e) {
3332
3362
  for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
@@ -3346,13 +3376,13 @@ N.prototype.emit = function(e) {
3346
3376
  if (u === void 0)
3347
3377
  return !1;
3348
3378
  if (typeof u == "function")
3349
- nn(u, this, r);
3379
+ sn(u, this, r);
3350
3380
  else
3351
- for (var l = u.length, c = Wn(u, l), n = 0; n < l; ++n)
3352
- nn(c[n], this, r);
3381
+ for (var d = u.length, c = Jn(u, d), n = 0; n < d; ++n)
3382
+ sn(c[n], this, r);
3353
3383
  return !0;
3354
3384
  };
3355
- function Gn(t, e, r, n) {
3385
+ function zn(t, e, r, n) {
3356
3386
  var i, o, s;
3357
3387
  if (Dt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
3358
3388
  "newListener",
@@ -3360,7 +3390,7 @@ function Gn(t, e, r, n) {
3360
3390
  r.listener ? r.listener : r
3361
3391
  ), o = t._events), s = o[e]), s === void 0)
3362
3392
  s = o[e] = r, ++t._eventsCount;
3363
- else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Qn(t), i > 0 && s.length > i && !s.warned) {
3393
+ else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Kn(t), i > 0 && s.length > i && !s.warned) {
3364
3394
  s.warned = !0;
3365
3395
  var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3366
3396
  a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, vs(a);
@@ -3368,25 +3398,25 @@ function Gn(t, e, r, n) {
3368
3398
  return t;
3369
3399
  }
3370
3400
  N.prototype.addListener = function(e, r) {
3371
- return Gn(this, e, r, !1);
3401
+ return zn(this, e, r, !1);
3372
3402
  };
3373
3403
  N.prototype.on = N.prototype.addListener;
3374
3404
  N.prototype.prependListener = function(e, r) {
3375
- return Gn(this, e, r, !0);
3405
+ return zn(this, e, r, !0);
3376
3406
  };
3377
3407
  function Ss() {
3378
3408
  if (!this.fired)
3379
3409
  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);
3380
3410
  }
3381
- function Kn(t, e, r) {
3411
+ function Hn(t, e, r) {
3382
3412
  var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Ss.bind(n);
3383
3413
  return i.listener = r, n.wrapFn = i, i;
3384
3414
  }
3385
3415
  N.prototype.once = function(e, r) {
3386
- return Dt(r), this.on(e, Kn(this, e, r)), this;
3416
+ return Dt(r), this.on(e, Hn(this, e, r)), this;
3387
3417
  };
3388
3418
  N.prototype.prependOnceListener = function(e, r) {
3389
- return Dt(r), this.prependListener(e, Kn(this, e, r)), this;
3419
+ return Dt(r), this.prependListener(e, Hn(this, e, r)), this;
3390
3420
  };
3391
3421
  N.prototype.removeListener = function(e, r) {
3392
3422
  var n, i, o, s, a;
@@ -3428,24 +3458,24 @@ N.prototype.removeAllListeners = function(e) {
3428
3458
  this.removeListener(e, r[i]);
3429
3459
  return this;
3430
3460
  };
3431
- function zn(t, e, r) {
3461
+ function Wn(t, e, r) {
3432
3462
  var n = t._events;
3433
3463
  if (n === void 0)
3434
3464
  return [];
3435
3465
  var i = n[e];
3436
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? As(i) : Wn(i, i.length);
3466
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? As(i) : Jn(i, i.length);
3437
3467
  }
3438
3468
  N.prototype.listeners = function(e) {
3439
- return zn(this, e, !0);
3469
+ return Wn(this, e, !0);
3440
3470
  };
3441
3471
  N.prototype.rawListeners = function(e) {
3442
- return zn(this, e, !1);
3472
+ return Wn(this, e, !1);
3443
3473
  };
3444
3474
  N.listenerCount = function(t, e) {
3445
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : Hn.call(t, e);
3475
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : Yn.call(t, e);
3446
3476
  };
3447
- N.prototype.listenerCount = Hn;
3448
- function Hn(t) {
3477
+ N.prototype.listenerCount = Yn;
3478
+ function Yn(t) {
3449
3479
  var e = this._events;
3450
3480
  if (e !== void 0) {
3451
3481
  var r = e[t];
@@ -3459,7 +3489,7 @@ function Hn(t) {
3459
3489
  N.prototype.eventNames = function() {
3460
3490
  return this._eventsCount > 0 ? mt(this._events) : [];
3461
3491
  };
3462
- function Wn(t, e) {
3492
+ function Jn(t, e) {
3463
3493
  for (var r = new Array(e), n = 0; n < e; ++n)
3464
3494
  r[n] = t[n];
3465
3495
  return r;
@@ -3482,13 +3512,13 @@ function Es(t, e) {
3482
3512
  function o() {
3483
3513
  typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
3484
3514
  }
3485
- Yn(t, e, o, { once: !0 }), e !== "error" && Is(t, i, { once: !0 });
3515
+ Xn(t, e, o, { once: !0 }), e !== "error" && Is(t, i, { once: !0 });
3486
3516
  });
3487
3517
  }
3488
3518
  function Is(t, e, r) {
3489
- typeof t.on == "function" && Yn(t, "error", e, r);
3519
+ typeof t.on == "function" && Xn(t, "error", e, r);
3490
3520
  }
3491
- function Yn(t, e, r, n) {
3521
+ function Xn(t, e, r, n) {
3492
3522
  if (typeof t.on == "function")
3493
3523
  n.once ? t.once(e, r) : t.on(e, r);
3494
3524
  else if (typeof t.addEventListener == "function")
@@ -3498,7 +3528,7 @@ function Yn(t, e, r, n) {
3498
3528
  else
3499
3529
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
3500
3530
  }
3501
- var Jn = Tr.exports, Rt = {}, Xn = {}, Zn = function() {
3531
+ var Zn = Tr.exports, Rt = {}, ei = {}, ti = function() {
3502
3532
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
3503
3533
  return !1;
3504
3534
  if (typeof Symbol.iterator == "symbol")
@@ -3521,16 +3551,16 @@ var Jn = Tr.exports, Rt = {}, Xn = {}, Zn = function() {
3521
3551
  return !1;
3522
3552
  }
3523
3553
  return !0;
3524
- }, Os = Zn, Vt = function() {
3554
+ }, Os = ti, Vt = function() {
3525
3555
  return Os() && !!Symbol.toStringTag;
3526
- }, Ts = Error, _s = EvalError, ks = RangeError, Cs = ReferenceError, ei = SyntaxError, $t = TypeError, Ps = URIError, sn = typeof Symbol < "u" && Symbol, Ls = Zn, Ns = function() {
3527
- return typeof sn != "function" || typeof Symbol != "function" || typeof sn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ls();
3556
+ }, Ts = Error, _s = EvalError, ks = RangeError, Ps = ReferenceError, ri = SyntaxError, $t = TypeError, Cs = URIError, un = typeof Symbol < "u" && Symbol, Ls = ti, Ns = function() {
3557
+ return typeof un != "function" || typeof Symbol != "function" || typeof un("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ls();
3528
3558
  }, jt = {
3529
3559
  __proto__: null,
3530
3560
  foo: {}
3531
3561
  }, Fs = Object, Ds = function() {
3532
3562
  return { __proto__: jt }.foo === jt.foo && !(jt instanceof Fs);
3533
- }, Rs = "Function.prototype.bind called on incompatible ", Vs = Object.prototype.toString, $s = Math.max, Bs = "[object Function]", an = function(e, r) {
3563
+ }, Rs = "Function.prototype.bind called on incompatible ", Vs = Object.prototype.toString, $s = Math.max, Bs = "[object Function]", cn = function(e, r) {
3534
3564
  for (var n = [], i = 0; i < e.length; i += 1)
3535
3565
  n[i] = e[i];
3536
3566
  for (var o = 0; o < r.length; o += 1)
@@ -3540,11 +3570,11 @@ var Jn = Tr.exports, Rt = {}, Xn = {}, Zn = function() {
3540
3570
  for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
3541
3571
  n[o] = e[i];
3542
3572
  return n;
3543
- }, qs = function(t, e) {
3573
+ }, Us = function(t, e) {
3544
3574
  for (var r = "", n = 0; n < t.length; n += 1)
3545
3575
  r += t[n], n + 1 < t.length && (r += e);
3546
3576
  return r;
3547
- }, Us = function(e) {
3577
+ }, qs = function(e) {
3548
3578
  var r = this;
3549
3579
  if (typeof r != "function" || Vs.apply(r) !== Bs)
3550
3580
  throw new TypeError(Rs + r);
@@ -3552,25 +3582,25 @@ var Jn = Tr.exports, Rt = {}, Xn = {}, Zn = function() {
3552
3582
  if (this instanceof i) {
3553
3583
  var c = r.apply(
3554
3584
  this,
3555
- an(n, arguments)
3585
+ cn(n, arguments)
3556
3586
  );
3557
3587
  return Object(c) === c ? c : this;
3558
3588
  }
3559
3589
  return r.apply(
3560
3590
  e,
3561
- an(n, arguments)
3591
+ cn(n, arguments)
3562
3592
  );
3563
3593
  }, s = $s(0, r.length - n.length), a = [], u = 0; u < s; u++)
3564
3594
  a[u] = "$" + u;
3565
- if (i = Function("binder", "return function (" + qs(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3566
- var l = function() {
3595
+ if (i = Function("binder", "return function (" + Us(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3596
+ var d = function() {
3567
3597
  };
3568
- l.prototype = r.prototype, i.prototype = new l(), l.prototype = null;
3598
+ d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
3569
3599
  }
3570
3600
  return i;
3571
- }, js = Us, _r = Function.prototype.bind || js, xs = Function.prototype.call, Qs = Object.prototype.hasOwnProperty, Gs = _r, Ks = Gs.call(xs, Qs), T, zs = Ts, Hs = _s, Ws = ks, Ys = Cs, ze = ei, Ke = $t, Js = Ps, ti = Function, xt = function(t) {
3601
+ }, js = qs, _r = Function.prototype.bind || js, xs = Function.prototype.call, Qs = Object.prototype.hasOwnProperty, Gs = _r, Ks = Gs.call(xs, Qs), T, zs = Ts, Hs = _s, Ws = ks, Ys = Ps, ze = ri, Ke = $t, Js = Cs, ni = Function, xt = function(t) {
3572
3602
  try {
3573
- return ti('"use strict"; return (' + t + ").constructor;")();
3603
+ return ni('"use strict"; return (' + t + ").constructor;")();
3574
3604
  } catch {
3575
3605
  }
3576
3606
  }, Le = Object.getOwnPropertyDescriptor;
@@ -3594,17 +3624,17 @@ var Qt = function() {
3594
3624
  }
3595
3625
  }() : Qt, Me = Ns(), Zs = Ds(), j = Object.getPrototypeOf || (Zs ? function(t) {
3596
3626
  return t.__proto__;
3597
- } : null), Ue = {}, ea = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Ne = {
3627
+ } : null), qe = {}, ea = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Ne = {
3598
3628
  __proto__: null,
3599
3629
  "%AggregateError%": typeof AggregateError > "u" ? T : AggregateError,
3600
3630
  "%Array%": Array,
3601
3631
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? T : ArrayBuffer,
3602
3632
  "%ArrayIteratorPrototype%": Me && j ? j([][Symbol.iterator]()) : T,
3603
3633
  "%AsyncFromSyncIteratorPrototype%": T,
3604
- "%AsyncFunction%": Ue,
3605
- "%AsyncGenerator%": Ue,
3606
- "%AsyncGeneratorFunction%": Ue,
3607
- "%AsyncIteratorPrototype%": Ue,
3634
+ "%AsyncFunction%": qe,
3635
+ "%AsyncGenerator%": qe,
3636
+ "%AsyncGeneratorFunction%": qe,
3637
+ "%AsyncIteratorPrototype%": qe,
3608
3638
  "%Atomics%": typeof Atomics > "u" ? T : Atomics,
3609
3639
  "%BigInt%": typeof BigInt > "u" ? T : BigInt,
3610
3640
  "%BigInt64Array%": typeof BigInt64Array > "u" ? T : BigInt64Array,
@@ -3623,8 +3653,8 @@ var Qt = function() {
3623
3653
  "%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
3624
3654
  "%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
3625
3655
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
3626
- "%Function%": ti,
3627
- "%GeneratorFunction%": Ue,
3656
+ "%Function%": ni,
3657
+ "%GeneratorFunction%": qe,
3628
3658
  "%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
3629
3659
  "%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
3630
3660
  "%Int32Array%": typeof Int32Array > "u" ? T : Int32Array,
@@ -3687,7 +3717,7 @@ var ra = function t(e) {
3687
3717
  i && j && (r = j(i.prototype));
3688
3718
  }
3689
3719
  return Ne[e] = r, r;
3690
- }, un = {
3720
+ }, dn = {
3691
3721
  __proto__: null,
3692
3722
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
3693
3723
  "%ArrayPrototype%": ["Array", "prototype"],
@@ -3740,21 +3770,21 @@ var ra = function t(e) {
3740
3770
  "%URIErrorPrototype%": ["URIError", "prototype"],
3741
3771
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3742
3772
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3743
- }, st = _r, It = Ks, na = st.call(Function.call, Array.prototype.concat), ia = st.call(Function.apply, Array.prototype.splice), cn = st.call(Function.call, String.prototype.replace), Ot = st.call(Function.call, String.prototype.slice), oa = st.call(Function.call, RegExp.prototype.exec), sa = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, aa = /\\(\\)?/g, ua = function(e) {
3773
+ }, st = _r, It = Ks, na = st.call(Function.call, Array.prototype.concat), ia = st.call(Function.apply, Array.prototype.splice), ln = st.call(Function.call, String.prototype.replace), Ot = st.call(Function.call, String.prototype.slice), oa = st.call(Function.call, RegExp.prototype.exec), sa = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, aa = /\\(\\)?/g, ua = function(e) {
3744
3774
  var r = Ot(e, 0, 1), n = Ot(e, -1);
3745
3775
  if (r === "%" && n !== "%")
3746
3776
  throw new ze("invalid intrinsic syntax, expected closing `%`");
3747
3777
  if (n === "%" && r !== "%")
3748
3778
  throw new ze("invalid intrinsic syntax, expected opening `%`");
3749
3779
  var i = [];
3750
- return cn(e, sa, function(o, s, a, u) {
3751
- i[i.length] = a ? cn(u, aa, "$1") : s || o;
3780
+ return ln(e, sa, function(o, s, a, u) {
3781
+ i[i.length] = a ? ln(u, aa, "$1") : s || o;
3752
3782
  }), i;
3753
3783
  }, ca = function(e, r) {
3754
3784
  var n = e, i;
3755
- if (It(un, n) && (i = un[n], n = "%" + i[0] + "%"), It(Ne, n)) {
3785
+ if (It(dn, n) && (i = dn[n], n = "%" + i[0] + "%"), It(Ne, n)) {
3756
3786
  var o = Ne[n];
3757
- if (o === Ue && (o = ra(n)), typeof o > "u" && !r)
3787
+ if (o === qe && (o = ra(n)), typeof o > "u" && !r)
3758
3788
  throw new Ke("intrinsic " + e + " exists, but is not available. Please file an issue!");
3759
3789
  return {
3760
3790
  alias: i,
@@ -3770,8 +3800,8 @@ var ra = function t(e) {
3770
3800
  throw new Ke('"allowMissing" argument must be a boolean');
3771
3801
  if (oa(/^%?[^%]*%?$/, e) === null)
3772
3802
  throw new ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3773
- var n = ua(e), i = n.length > 0 ? n[0] : "", o = ca("%" + i + "%", r), s = o.name, a = o.value, u = !1, l = o.alias;
3774
- l && (i = l[0], ia(n, na([0, 1], l)));
3803
+ var n = ua(e), i = n.length > 0 ? n[0] : "", o = ca("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
3804
+ d && (i = d[0], ia(n, na([0, 1], d)));
3775
3805
  for (var c = 1, f = !0; c < n.length; c += 1) {
3776
3806
  var p = n[c], v = Ot(p, 0, 1), w = Ot(p, -1);
3777
3807
  if ((v === '"' || v === "'" || v === "`" || w === '"' || w === "'" || w === "`") && v !== w)
@@ -3793,10 +3823,10 @@ var ra = function t(e) {
3793
3823
  }
3794
3824
  }
3795
3825
  return a;
3796
- }, ri = { exports: {} }, Gt, dn;
3826
+ }, ii = { exports: {} }, Gt, fn;
3797
3827
  function kr() {
3798
- if (dn) return Gt;
3799
- dn = 1;
3828
+ if (fn) return Gt;
3829
+ fn = 1;
3800
3830
  var t = at, e = t("%Object.defineProperty%", !0) || !1;
3801
3831
  if (e)
3802
3832
  try {
@@ -3813,22 +3843,22 @@ if (gt)
3813
3843
  } catch {
3814
3844
  gt = null;
3815
3845
  }
3816
- var Bt = gt, ln = kr(), la = ei, qe = $t, fn = Bt, fa = function(e, r, n) {
3846
+ var Bt = gt, pn = kr(), la = ri, Ue = $t, hn = Bt, fa = function(e, r, n) {
3817
3847
  if (!e || typeof e != "object" && typeof e != "function")
3818
- throw new qe("`obj` must be an object or a function`");
3848
+ throw new Ue("`obj` must be an object or a function`");
3819
3849
  if (typeof r != "string" && typeof r != "symbol")
3820
- throw new qe("`property` must be a string or a symbol`");
3850
+ throw new Ue("`property` must be a string or a symbol`");
3821
3851
  if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
3822
- throw new qe("`nonEnumerable`, if provided, must be a boolean or null");
3852
+ throw new Ue("`nonEnumerable`, if provided, must be a boolean or null");
3823
3853
  if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
3824
- throw new qe("`nonWritable`, if provided, must be a boolean or null");
3854
+ throw new Ue("`nonWritable`, if provided, must be a boolean or null");
3825
3855
  if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
3826
- throw new qe("`nonConfigurable`, if provided, must be a boolean or null");
3856
+ throw new Ue("`nonConfigurable`, if provided, must be a boolean or null");
3827
3857
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
3828
- throw new qe("`loose`, if provided, must be a boolean");
3829
- var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!fn && fn(e, r);
3830
- if (ln)
3831
- ln(e, r, {
3858
+ throw new Ue("`loose`, if provided, must be a boolean");
3859
+ var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!hn && hn(e, r);
3860
+ if (pn)
3861
+ pn(e, r, {
3832
3862
  configurable: s === null && u ? u.configurable : !s,
3833
3863
  enumerable: i === null && u ? u.enumerable : !i,
3834
3864
  value: n,
@@ -3838,10 +3868,10 @@ var Bt = gt, ln = kr(), la = ei, qe = $t, fn = Bt, fa = function(e, r, n) {
3838
3868
  e[r] = n;
3839
3869
  else
3840
3870
  throw new la("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3841
- }, lr = kr(), ni = function() {
3871
+ }, lr = kr(), oi = function() {
3842
3872
  return !!lr;
3843
3873
  };
3844
- ni.hasArrayLengthDefineBug = function() {
3874
+ oi.hasArrayLengthDefineBug = function() {
3845
3875
  if (!lr)
3846
3876
  return null;
3847
3877
  try {
@@ -3850,24 +3880,24 @@ ni.hasArrayLengthDefineBug = function() {
3850
3880
  return !0;
3851
3881
  }
3852
3882
  };
3853
- var pa = ni, ha = at, pn = fa, ya = pa(), hn = Bt, yn = $t, ma = ha("%Math.floor%"), ga = function(e, r) {
3883
+ var pa = oi, ha = at, yn = fa, ya = pa(), mn = Bt, gn = $t, ma = ha("%Math.floor%"), ga = function(e, r) {
3854
3884
  if (typeof e != "function")
3855
- throw new yn("`fn` is not a function");
3885
+ throw new gn("`fn` is not a function");
3856
3886
  if (typeof r != "number" || r < 0 || r > 4294967295 || ma(r) !== r)
3857
- throw new yn("`length` must be a positive 32-bit integer");
3887
+ throw new gn("`length` must be a positive 32-bit integer");
3858
3888
  var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
3859
- if ("length" in e && hn) {
3860
- var s = hn(e, "length");
3889
+ if ("length" in e && mn) {
3890
+ var s = mn(e, "length");
3861
3891
  s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
3862
3892
  }
3863
- return (i || o || !n) && (ya ? pn(
3893
+ return (i || o || !n) && (ya ? yn(
3864
3894
  /** @type {Parameters<define>[0]} */
3865
3895
  e,
3866
3896
  "length",
3867
3897
  r,
3868
3898
  !0,
3869
3899
  !0
3870
- ) : pn(
3900
+ ) : yn(
3871
3901
  /** @type {Parameters<define>[0]} */
3872
3902
  e,
3873
3903
  "length",
@@ -3875,14 +3905,14 @@ var pa = ni, ha = at, pn = fa, ya = pa(), hn = Bt, yn = $t, ma = ha("%Math.floor
3875
3905
  )), e;
3876
3906
  };
3877
3907
  (function(t) {
3878
- var e = _r, r = at, n = ga, i = $t, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = kr(), l = r("%Math.max%");
3908
+ var e = _r, r = at, n = ga, i = $t, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = kr(), d = r("%Math.max%");
3879
3909
  t.exports = function(p) {
3880
3910
  if (typeof p != "function")
3881
3911
  throw new i("a function is required");
3882
3912
  var v = a(e, s, arguments);
3883
3913
  return n(
3884
3914
  v,
3885
- 1 + l(0, p.length - (arguments.length - 1)),
3915
+ 1 + d(0, p.length - (arguments.length - 1)),
3886
3916
  !0
3887
3917
  );
3888
3918
  };
@@ -3890,20 +3920,20 @@ var pa = ni, ha = at, pn = fa, ya = pa(), hn = Bt, yn = $t, ma = ha("%Math.floor
3890
3920
  return a(e, o, arguments);
3891
3921
  };
3892
3922
  u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
3893
- })(ri);
3894
- var Cr = ri.exports, ii = at, oi = Cr, ba = oi(ii("String.prototype.indexOf")), Pr = function(e, r) {
3895
- var n = ii(e, !!r);
3896
- return typeof n == "function" && ba(e, ".prototype.") > -1 ? oi(n) : n;
3897
- }, va = Vt(), Sa = Pr, fr = Sa("Object.prototype.toString"), Mt = function(e) {
3923
+ })(ii);
3924
+ var Pr = ii.exports, si = at, ai = Pr, ba = ai(si("String.prototype.indexOf")), Cr = function(e, r) {
3925
+ var n = si(e, !!r);
3926
+ return typeof n == "function" && ba(e, ".prototype.") > -1 ? ai(n) : n;
3927
+ }, va = Vt(), Sa = Cr, fr = Sa("Object.prototype.toString"), Mt = function(e) {
3898
3928
  return va && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : fr(e) === "[object Arguments]";
3899
- }, si = function(e) {
3929
+ }, ui = function(e) {
3900
3930
  return Mt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && fr(e) !== "[object Array]" && fr(e.callee) === "[object Function]";
3901
3931
  }, wa = function() {
3902
3932
  return Mt(arguments);
3903
3933
  }();
3904
- Mt.isLegacyArguments = si;
3905
- var Aa = wa ? Mt : si, Ea = Object.prototype.toString, Ia = Function.prototype.toString, Oa = /^\s*(?:function)?\*/, ai = Vt(), Kt = Object.getPrototypeOf, Ta = function() {
3906
- if (!ai)
3934
+ Mt.isLegacyArguments = ui;
3935
+ var Aa = wa ? Mt : ui, Ea = Object.prototype.toString, Ia = Function.prototype.toString, Oa = /^\s*(?:function)?\*/, ci = Vt(), Kt = Object.getPrototypeOf, Ta = function() {
3936
+ if (!ci)
3907
3937
  return !1;
3908
3938
  try {
3909
3939
  return Function("return function*() {}")();
@@ -3914,7 +3944,7 @@ var Aa = wa ? Mt : si, Ea = Object.prototype.toString, Ia = Function.prototype.t
3914
3944
  return !1;
3915
3945
  if (Oa.test(Ia.call(e)))
3916
3946
  return !0;
3917
- if (!ai) {
3947
+ if (!ci) {
3918
3948
  var r = Ea.call(e);
3919
3949
  return r === "[object GeneratorFunction]";
3920
3950
  }
@@ -3925,7 +3955,7 @@ var Aa = wa ? Mt : si, Ea = Object.prototype.toString, Ia = Function.prototype.t
3925
3955
  zt = n ? Kt(n) : !1;
3926
3956
  }
3927
3957
  return Kt(e) === zt;
3928
- }, ui = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, pr, bt;
3958
+ }, di = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, pr, bt;
3929
3959
  if (typeof xe == "function" && typeof Object.defineProperty == "function")
3930
3960
  try {
3931
3961
  pr = Object.defineProperty({}, "length", {
@@ -3942,18 +3972,18 @@ else
3942
3972
  xe = null;
3943
3973
  var ka = /^\s*class\b/, hr = function(e) {
3944
3974
  try {
3945
- var r = ui.call(e);
3975
+ var r = di.call(e);
3946
3976
  return ka.test(r);
3947
3977
  } catch {
3948
3978
  return !1;
3949
3979
  }
3950
3980
  }, Ht = function(e) {
3951
3981
  try {
3952
- return hr(e) ? !1 : (ui.call(e), !0);
3982
+ return hr(e) ? !1 : (di.call(e), !0);
3953
3983
  } catch {
3954
3984
  return !1;
3955
3985
  }
3956
- }, vt = Object.prototype.toString, Ca = "[object Object]", Pa = "[object Function]", La = "[object GeneratorFunction]", Na = "[object HTMLAllCollection]", Fa = "[object HTML document.all class]", Da = "[object HTMLCollection]", Ra = typeof Symbol == "function" && !!Symbol.toStringTag, Va = !(0 in [,]), yr = function() {
3986
+ }, vt = Object.prototype.toString, Pa = "[object Object]", Ca = "[object Function]", La = "[object GeneratorFunction]", Na = "[object HTMLAllCollection]", Fa = "[object HTML document.all class]", Da = "[object HTMLCollection]", Ra = typeof Symbol == "function" && !!Symbol.toStringTag, Va = !(0 in [,]), yr = function() {
3957
3987
  return !1;
3958
3988
  };
3959
3989
  if (typeof document == "object") {
@@ -3962,7 +3992,7 @@ if (typeof document == "object") {
3962
3992
  if ((Va || !e) && (typeof e > "u" || typeof e == "object"))
3963
3993
  try {
3964
3994
  var r = vt.call(e);
3965
- return (r === Na || r === Fa || r === Da || r === Ca) && e("") == null;
3995
+ return (r === Na || r === Fa || r === Da || r === Pa) && e("") == null;
3966
3996
  } catch {
3967
3997
  }
3968
3998
  return !1;
@@ -3990,22 +4020,22 @@ var Ba = xe ? function(e) {
3990
4020
  if (hr(e))
3991
4021
  return !1;
3992
4022
  var r = vt.call(e);
3993
- return r !== Pa && r !== La && !/^\[object HTML/.test(r) ? !1 : Ht(e);
3994
- }, Ma = Ba, qa = Object.prototype.toString, ci = Object.prototype.hasOwnProperty, Ua = function(e, r, n) {
4023
+ return r !== Ca && r !== La && !/^\[object HTML/.test(r) ? !1 : Ht(e);
4024
+ }, Ma = Ba, Ua = Object.prototype.toString, li = Object.prototype.hasOwnProperty, qa = function(e, r, n) {
3995
4025
  for (var i = 0, o = e.length; i < o; i++)
3996
- ci.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
4026
+ li.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3997
4027
  }, ja = function(e, r, n) {
3998
4028
  for (var i = 0, o = e.length; i < o; i++)
3999
4029
  n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
4000
4030
  }, xa = function(e, r, n) {
4001
4031
  for (var i in e)
4002
- ci.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
4032
+ li.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
4003
4033
  }, Qa = function(e, r, n) {
4004
4034
  if (!Ma(r))
4005
4035
  throw new TypeError("iterator must be a function");
4006
4036
  var i;
4007
- arguments.length >= 3 && (i = n), qa.call(e) === "[object Array]" ? Ua(e, r, i) : typeof e == "string" ? ja(e, r, i) : xa(e, r, i);
4008
- }, di = Qa, Ga = [
4037
+ arguments.length >= 3 && (i = n), Ua.call(e) === "[object Array]" ? qa(e, r, i) : typeof e == "string" ? ja(e, r, i) : xa(e, r, i);
4038
+ }, fi = Qa, Ga = [
4009
4039
  "Float32Array",
4010
4040
  "Float64Array",
4011
4041
  "Int8Array",
@@ -4017,29 +4047,29 @@ var Ba = xe ? function(e) {
4017
4047
  "Uint32Array",
4018
4048
  "BigInt64Array",
4019
4049
  "BigUint64Array"
4020
- ], Wt = Ga, Ka = typeof globalThis > "u" ? Er : globalThis, li = function() {
4050
+ ], Wt = Ga, Ka = typeof globalThis > "u" ? Er : globalThis, pi = function() {
4021
4051
  for (var e = [], r = 0; r < Wt.length; r++)
4022
4052
  typeof Ka[Wt[r]] == "function" && (e[e.length] = Wt[r]);
4023
4053
  return e;
4024
- }, Tt = di, za = li, mn = Cr, Lr = Pr, St = Bt, Ha = Lr("Object.prototype.toString"), fi = Vt(), gn = typeof globalThis > "u" ? Er : globalThis, mr = za(), Nr = Lr("String.prototype.slice"), Yt = Object.getPrototypeOf, Wa = Lr("Array.prototype.indexOf", !0) || function(e, r) {
4054
+ }, Tt = fi, za = pi, bn = Pr, Lr = Cr, St = Bt, Ha = Lr("Object.prototype.toString"), hi = Vt(), vn = typeof globalThis > "u" ? Er : globalThis, mr = za(), Nr = Lr("String.prototype.slice"), Yt = Object.getPrototypeOf, Wa = Lr("Array.prototype.indexOf", !0) || function(e, r) {
4025
4055
  for (var n = 0; n < e.length; n += 1)
4026
4056
  if (e[n] === r)
4027
4057
  return n;
4028
4058
  return -1;
4029
4059
  }, _t = { __proto__: null };
4030
- fi && St && Yt ? Tt(mr, function(t) {
4031
- var e = new gn[t]();
4060
+ hi && St && Yt ? Tt(mr, function(t) {
4061
+ var e = new vn[t]();
4032
4062
  if (Symbol.toStringTag in e) {
4033
4063
  var r = Yt(e), n = St(r, Symbol.toStringTag);
4034
4064
  if (!n) {
4035
4065
  var i = Yt(r);
4036
4066
  n = St(i, Symbol.toStringTag);
4037
4067
  }
4038
- _t["$" + t] = mn(n.get);
4068
+ _t["$" + t] = bn(n.get);
4039
4069
  }
4040
4070
  }) : Tt(mr, function(t) {
4041
- var e = new gn[t](), r = e.slice || e.set;
4042
- r && (_t["$" + t] = mn(r));
4071
+ var e = new vn[t](), r = e.slice || e.set;
4072
+ r && (_t["$" + t] = bn(r));
4043
4073
  });
4044
4074
  var Ya = function(e) {
4045
4075
  var r = !1;
@@ -4062,30 +4092,30 @@ var Ya = function(e) {
4062
4092
  }, Xa = function(e) {
4063
4093
  if (!e || typeof e != "object")
4064
4094
  return !1;
4065
- if (!fi) {
4095
+ if (!hi) {
4066
4096
  var r = Nr(Ha(e), 8, -1);
4067
4097
  return Wa(mr, r) > -1 ? r : r !== "Object" ? !1 : Ja(e);
4068
4098
  }
4069
4099
  return St ? Ya(e) : null;
4070
- }, kt = di, Za = li, bn = Cr, Fr = Pr, wt = Bt, eu = Fr("Object.prototype.toString"), pi = Vt(), vn = typeof globalThis > "u" ? Er : globalThis, gr = Za(), Dr = Fr("String.prototype.slice"), Jt = Object.getPrototypeOf, tu = Fr("Array.prototype.indexOf", !0) || function(e, r) {
4100
+ }, kt = fi, Za = pi, Sn = Pr, Fr = Cr, wt = Bt, eu = Fr("Object.prototype.toString"), yi = Vt(), wn = typeof globalThis > "u" ? Er : globalThis, gr = Za(), Dr = Fr("String.prototype.slice"), Jt = Object.getPrototypeOf, tu = Fr("Array.prototype.indexOf", !0) || function(e, r) {
4071
4101
  for (var n = 0; n < e.length; n += 1)
4072
4102
  if (e[n] === r)
4073
4103
  return n;
4074
4104
  return -1;
4075
- }, Ct = { __proto__: null };
4076
- pi && wt && Jt ? kt(gr, function(t) {
4077
- var e = new vn[t]();
4105
+ }, Pt = { __proto__: null };
4106
+ yi && wt && Jt ? kt(gr, function(t) {
4107
+ var e = new wn[t]();
4078
4108
  if (Symbol.toStringTag in e) {
4079
4109
  var r = Jt(e), n = wt(r, Symbol.toStringTag);
4080
4110
  if (!n) {
4081
4111
  var i = Jt(r);
4082
4112
  n = wt(i, Symbol.toStringTag);
4083
4113
  }
4084
- Ct["$" + t] = bn(n.get);
4114
+ Pt["$" + t] = Sn(n.get);
4085
4115
  }
4086
4116
  }) : kt(gr, function(t) {
4087
- var e = new vn[t](), r = e.slice || e.set;
4088
- r && (Ct["$" + t] = bn(r));
4117
+ var e = new wn[t](), r = e.slice || e.set;
4118
+ r && (Pt["$" + t] = Sn(r));
4089
4119
  });
4090
4120
  var ru = function(e) {
4091
4121
  var r = !1;
@@ -4093,7 +4123,7 @@ var ru = function(e) {
4093
4123
  // eslint-disable-next-line no-extra-parens
4094
4124
  /** @type {Record<`\$${TypedArrayName}`, Getter>} */
4095
4125
  /** @type {any} */
4096
- Ct,
4126
+ Pt,
4097
4127
  /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
4098
4128
  function(n, i) {
4099
4129
  if (!r)
@@ -4109,7 +4139,7 @@ var ru = function(e) {
4109
4139
  // eslint-disable-next-line no-extra-parens
4110
4140
  /** @type {Record<`\$${TypedArrayName}`, Getter>} */
4111
4141
  /** @type {any} */
4112
- Ct,
4142
+ Pt,
4113
4143
  /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
4114
4144
  function(n, i) {
4115
4145
  if (!r)
@@ -4122,7 +4152,7 @@ var ru = function(e) {
4122
4152
  }, iu = function(e) {
4123
4153
  if (!e || typeof e != "object")
4124
4154
  return !1;
4125
- if (!pi) {
4155
+ if (!yi) {
4126
4156
  var r = Dr(eu(e), 8, -1);
4127
4157
  return tu(gr, r) > -1 ? r : r !== "Object" ? !1 : nu(e);
4128
4158
  }
@@ -4135,16 +4165,16 @@ var ru = function(e) {
4135
4165
  function o(y) {
4136
4166
  return y.call.bind(y);
4137
4167
  }
4138
- var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), l = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), f = o(Boolean.prototype.valueOf);
4168
+ var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), d = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), f = o(Boolean.prototype.valueOf);
4139
4169
  if (s)
4140
4170
  var p = o(BigInt.prototype.valueOf);
4141
4171
  if (a)
4142
4172
  var v = o(Symbol.prototype.valueOf);
4143
- function w(y, Si) {
4173
+ function w(y, Ai) {
4144
4174
  if (typeof y != "object")
4145
4175
  return !1;
4146
4176
  try {
4147
- return Si(y), !0;
4177
+ return Ai(y), !0;
4148
4178
  } catch {
4149
4179
  return !1;
4150
4180
  }
@@ -4166,10 +4196,10 @@ var ru = function(e) {
4166
4196
  return n(y) === "Uint8ClampedArray";
4167
4197
  }
4168
4198
  t.isUint8ClampedArray = F;
4169
- function z(y) {
4199
+ function H(y) {
4170
4200
  return n(y) === "Uint16Array";
4171
4201
  }
4172
- t.isUint16Array = z;
4202
+ t.isUint16Array = H;
4173
4203
  function ne(y) {
4174
4204
  return n(y) === "Uint32Array";
4175
4205
  }
@@ -4198,18 +4228,18 @@ var ru = function(e) {
4198
4228
  return n(y) === "BigInt64Array";
4199
4229
  }
4200
4230
  t.isBigInt64Array = Fe;
4201
- function Oe(y) {
4231
+ function Te(y) {
4202
4232
  return n(y) === "BigUint64Array";
4203
4233
  }
4204
- t.isBigUint64Array = Oe;
4234
+ t.isBigUint64Array = Te;
4205
4235
  function he(y) {
4206
4236
  return u(y) === "[object Map]";
4207
4237
  }
4208
4238
  he.working = typeof Map < "u" && he(/* @__PURE__ */ new Map());
4209
- function qt(y) {
4239
+ function Ut(y) {
4210
4240
  return typeof Map > "u" ? !1 : he.working ? he(y) : y instanceof Map;
4211
4241
  }
4212
- t.isMap = qt;
4242
+ t.isMap = Ut;
4213
4243
  function Ie(y) {
4214
4244
  return u(y) === "[object Set]";
4215
4245
  }
@@ -4222,10 +4252,10 @@ var ru = function(e) {
4222
4252
  return u(y) === "[object WeakMap]";
4223
4253
  }
4224
4254
  De.working = typeof WeakMap < "u" && De(/* @__PURE__ */ new WeakMap());
4225
- function Ut(y) {
4255
+ function qt(y) {
4226
4256
  return typeof WeakMap > "u" ? !1 : De.working ? De(y) : y instanceof WeakMap;
4227
4257
  }
4228
- t.isWeakMap = Ut;
4258
+ t.isWeakMap = qt;
4229
4259
  function Re(y) {
4230
4260
  return u(y) === "[object WeakSet]";
4231
4261
  }
@@ -4242,26 +4272,26 @@ var ru = function(e) {
4242
4272
  return typeof ArrayBuffer > "u" ? !1 : Ve.working ? Ve(y) : y instanceof ArrayBuffer;
4243
4273
  }
4244
4274
  t.isArrayBuffer = ut;
4245
- function d(y) {
4275
+ function l(y) {
4246
4276
  return u(y) === "[object DataView]";
4247
4277
  }
4248
- d.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && d(new DataView(new ArrayBuffer(1), 0, 1));
4278
+ l.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && l(new DataView(new ArrayBuffer(1), 0, 1));
4249
4279
  function h(y) {
4250
- return typeof DataView > "u" ? !1 : d.working ? d(y) : y instanceof DataView;
4280
+ return typeof DataView > "u" ? !1 : l.working ? l(y) : y instanceof DataView;
4251
4281
  }
4252
4282
  t.isDataView = h;
4253
4283
  var b = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
4254
4284
  function A(y) {
4255
4285
  return u(y) === "[object SharedArrayBuffer]";
4256
4286
  }
4257
- function C(y) {
4287
+ function P(y) {
4258
4288
  return typeof b > "u" ? !1 : (typeof A.working > "u" && (A.working = A(new b())), A.working ? A(y) : y instanceof b);
4259
4289
  }
4260
- t.isSharedArrayBuffer = C;
4261
- function P(y) {
4290
+ t.isSharedArrayBuffer = P;
4291
+ function C(y) {
4262
4292
  return u(y) === "[object AsyncFunction]";
4263
4293
  }
4264
- t.isAsyncFunction = P;
4294
+ t.isAsyncFunction = C;
4265
4295
  function O(y) {
4266
4296
  return u(y) === "[object Map Iterator]";
4267
4297
  }
@@ -4274,14 +4304,14 @@ var ru = function(e) {
4274
4304
  return u(y) === "[object Generator]";
4275
4305
  }
4276
4306
  t.isGeneratorObject = D;
4277
- function W(y) {
4307
+ function Y(y) {
4278
4308
  return u(y) === "[object WebAssembly.Module]";
4279
4309
  }
4280
- t.isWebAssemblyCompiledModule = W;
4281
- function Te(y) {
4282
- return w(y, l);
4310
+ t.isWebAssemblyCompiledModule = Y;
4311
+ function _e(y) {
4312
+ return w(y, d);
4283
4313
  }
4284
- t.isNumberObject = Te;
4314
+ t.isNumberObject = _e;
4285
4315
  function ct(y) {
4286
4316
  return w(y, c);
4287
4317
  }
@@ -4298,14 +4328,14 @@ var ru = function(e) {
4298
4328
  return a && w(y, v);
4299
4329
  }
4300
4330
  t.isSymbolObject = $r;
4301
- function bi(y) {
4302
- return Te(y) || ct(y) || $e(y) || dt(y) || $r(y);
4331
+ function Si(y) {
4332
+ return _e(y) || ct(y) || $e(y) || dt(y) || $r(y);
4303
4333
  }
4304
- t.isBoxedPrimitive = bi;
4305
- function vi(y) {
4306
- return typeof Uint8Array < "u" && (ut(y) || C(y));
4334
+ t.isBoxedPrimitive = Si;
4335
+ function wi(y) {
4336
+ return typeof Uint8Array < "u" && (ut(y) || P(y));
4307
4337
  }
4308
- t.isAnyArrayBuffer = vi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4338
+ t.isAnyArrayBuffer = wi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4309
4339
  Object.defineProperty(t, y, {
4310
4340
  enumerable: !1,
4311
4341
  value: function() {
@@ -4313,7 +4343,7 @@ var ru = function(e) {
4313
4343
  }
4314
4344
  });
4315
4345
  });
4316
- })(Xn);
4346
+ })(ei);
4317
4347
  var au = function(e) {
4318
4348
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
4319
4349
  }, br = { exports: {} };
@@ -4337,19 +4367,19 @@ typeof Object.create == "function" ? br.exports = function(e, r) {
4337
4367
  var uu = br.exports;
4338
4368
  (function(t) {
4339
4369
  var e = Object.getOwnPropertyDescriptors || function(h) {
4340
- for (var b = Object.keys(h), A = {}, C = 0; C < b.length; C++)
4341
- A[b[C]] = Object.getOwnPropertyDescriptor(h, b[C]);
4370
+ for (var b = Object.keys(h), A = {}, P = 0; P < b.length; P++)
4371
+ A[b[P]] = Object.getOwnPropertyDescriptor(h, b[P]);
4342
4372
  return A;
4343
4373
  }, r = /%[sdj%]/g;
4344
- t.format = function(d) {
4345
- if (!L(d)) {
4374
+ t.format = function(l) {
4375
+ if (!L(l)) {
4346
4376
  for (var h = [], b = 0; b < arguments.length; b++)
4347
4377
  h.push(s(arguments[b]));
4348
4378
  return h.join(" ");
4349
4379
  }
4350
- for (var b = 1, A = arguments, C = A.length, P = String(d).replace(r, function(k) {
4380
+ for (var b = 1, A = arguments, P = A.length, C = String(l).replace(r, function(k) {
4351
4381
  if (k === "%%") return "%";
4352
- if (b >= C) return k;
4382
+ if (b >= P) return k;
4353
4383
  switch (k) {
4354
4384
  case "%s":
4355
4385
  return String(A[b++]);
@@ -4364,15 +4394,15 @@ var uu = br.exports;
4364
4394
  default:
4365
4395
  return k;
4366
4396
  }
4367
- }), O = A[b]; b < C; O = A[++b])
4368
- F(O) || !ue(O) ? P += " " + O : P += " " + s(O);
4369
- return P;
4370
- }, t.deprecate = function(d, h) {
4397
+ }), O = A[b]; b < P; O = A[++b])
4398
+ F(O) || !ue(O) ? C += " " + O : C += " " + s(O);
4399
+ return C;
4400
+ }, t.deprecate = function(l, h) {
4371
4401
  if (typeof E < "u" && E.noDeprecation === !0)
4372
- return d;
4402
+ return l;
4373
4403
  if (typeof E > "u")
4374
4404
  return function() {
4375
- return t.deprecate(d, h).apply(this, arguments);
4405
+ return t.deprecate(l, h).apply(this, arguments);
4376
4406
  };
4377
4407
  var b = !1;
4378
4408
  function A() {
@@ -4381,7 +4411,7 @@ var uu = br.exports;
4381
4411
  throw new Error(h);
4382
4412
  E.traceDeprecation ? console.trace(h) : console.error(h), b = !0;
4383
4413
  }
4384
- return d.apply(this, arguments);
4414
+ return l.apply(this, arguments);
4385
4415
  }
4386
4416
  return A;
4387
4417
  };
@@ -4390,25 +4420,25 @@ var uu = br.exports;
4390
4420
  var o = E.env.NODE_DEBUG;
4391
4421
  o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
4392
4422
  }
4393
- t.debuglog = function(d) {
4394
- if (d = d.toUpperCase(), !n[d])
4395
- if (i.test(d)) {
4423
+ t.debuglog = function(l) {
4424
+ if (l = l.toUpperCase(), !n[l])
4425
+ if (i.test(l)) {
4396
4426
  var h = E.pid;
4397
- n[d] = function() {
4427
+ n[l] = function() {
4398
4428
  var b = t.format.apply(t, arguments);
4399
- console.error("%s %d: %s", d, h, b);
4429
+ console.error("%s %d: %s", l, h, b);
4400
4430
  };
4401
4431
  } else
4402
- n[d] = function() {
4432
+ n[l] = function() {
4403
4433
  };
4404
- return n[d];
4434
+ return n[l];
4405
4435
  };
4406
- function s(d, h) {
4436
+ function s(l, h) {
4407
4437
  var b = {
4408
4438
  seen: [],
4409
4439
  stylize: u
4410
4440
  };
4411
- return arguments.length >= 3 && (b.depth = arguments[2]), arguments.length >= 4 && (b.colors = arguments[3]), S(h) ? b.showHidden = h : h && t._extend(b, h), _(b.showHidden) && (b.showHidden = !1), _(b.depth) && (b.depth = 2), _(b.colors) && (b.colors = !1), _(b.customInspect) && (b.customInspect = !0), b.colors && (b.stylize = a), c(b, d, b.depth);
4441
+ return arguments.length >= 3 && (b.depth = arguments[2]), arguments.length >= 4 && (b.colors = arguments[3]), S(h) ? b.showHidden = h : h && t._extend(b, h), _(b.showHidden) && (b.showHidden = !1), _(b.depth) && (b.depth = 2), _(b.colors) && (b.colors = !1), _(b.customInspect) && (b.customInspect = !0), b.colors && (b.stylize = a), c(b, l, b.depth);
4412
4442
  }
4413
4443
  t.inspect = s, s.colors = {
4414
4444
  bold: [1, 22],
@@ -4435,188 +4465,188 @@ var uu = br.exports;
4435
4465
  // "name": intentionally not styling
4436
4466
  regexp: "red"
4437
4467
  };
4438
- function a(d, h) {
4468
+ function a(l, h) {
4439
4469
  var b = s.styles[h];
4440
- return b ? "\x1B[" + s.colors[b][0] + "m" + d + "\x1B[" + s.colors[b][1] + "m" : d;
4470
+ return b ? "\x1B[" + s.colors[b][0] + "m" + l + "\x1B[" + s.colors[b][1] + "m" : l;
4441
4471
  }
4442
- function u(d, h) {
4443
- return d;
4472
+ function u(l, h) {
4473
+ return l;
4444
4474
  }
4445
- function l(d) {
4475
+ function d(l) {
4446
4476
  var h = {};
4447
- return d.forEach(function(b, A) {
4477
+ return l.forEach(function(b, A) {
4448
4478
  h[b] = !0;
4449
4479
  }), h;
4450
4480
  }
4451
- function c(d, h, b) {
4452
- if (d.customInspect && h && he(h.inspect) && // Filter out the util module, it's inspect function is special
4481
+ function c(l, h, b) {
4482
+ if (l.customInspect && h && he(h.inspect) && // Filter out the util module, it's inspect function is special
4453
4483
  h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
4454
4484
  !(h.constructor && h.constructor.prototype === h)) {
4455
- var A = h.inspect(b, d);
4456
- return L(A) || (A = c(d, A, b)), A;
4485
+ var A = h.inspect(b, l);
4486
+ return L(A) || (A = c(l, A, b)), A;
4457
4487
  }
4458
- var C = f(d, h);
4459
- if (C)
4460
- return C;
4461
- var P = Object.keys(h), O = l(P);
4462
- if (d.showHidden && (P = Object.getOwnPropertyNames(h)), Oe(h) && (P.indexOf("message") >= 0 || P.indexOf("description") >= 0))
4488
+ var P = f(l, h);
4489
+ if (P)
4490
+ return P;
4491
+ var C = Object.keys(h), O = d(C);
4492
+ if (l.showHidden && (C = Object.getOwnPropertyNames(h)), Te(h) && (C.indexOf("message") >= 0 || C.indexOf("description") >= 0))
4463
4493
  return p(h);
4464
- if (P.length === 0) {
4494
+ if (C.length === 0) {
4465
4495
  if (he(h)) {
4466
4496
  var k = h.name ? ": " + h.name : "";
4467
- return d.stylize("[Function" + k + "]", "special");
4497
+ return l.stylize("[Function" + k + "]", "special");
4468
4498
  }
4469
4499
  if (ae(h))
4470
- return d.stylize(RegExp.prototype.toString.call(h), "regexp");
4500
+ return l.stylize(RegExp.prototype.toString.call(h), "regexp");
4471
4501
  if (Fe(h))
4472
- return d.stylize(Date.prototype.toString.call(h), "date");
4473
- if (Oe(h))
4502
+ return l.stylize(Date.prototype.toString.call(h), "date");
4503
+ if (Te(h))
4474
4504
  return p(h);
4475
4505
  }
4476
- var D = "", W = !1, Te = ["{", "}"];
4477
- if (g(h) && (W = !0, Te = ["[", "]"]), he(h)) {
4506
+ var D = "", Y = !1, _e = ["{", "}"];
4507
+ if (g(h) && (Y = !0, _e = ["[", "]"]), he(h)) {
4478
4508
  var ct = h.name ? ": " + h.name : "";
4479
4509
  D = " [Function" + ct + "]";
4480
4510
  }
4481
- if (ae(h) && (D = " " + RegExp.prototype.toString.call(h)), Fe(h) && (D = " " + Date.prototype.toUTCString.call(h)), Oe(h) && (D = " " + p(h)), P.length === 0 && (!W || h.length == 0))
4482
- return Te[0] + D + Te[1];
4511
+ if (ae(h) && (D = " " + RegExp.prototype.toString.call(h)), Fe(h) && (D = " " + Date.prototype.toUTCString.call(h)), Te(h) && (D = " " + p(h)), C.length === 0 && (!Y || h.length == 0))
4512
+ return _e[0] + D + _e[1];
4483
4513
  if (b < 0)
4484
- return ae(h) ? d.stylize(RegExp.prototype.toString.call(h), "regexp") : d.stylize("[Object]", "special");
4485
- d.seen.push(h);
4514
+ return ae(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
4515
+ l.seen.push(h);
4486
4516
  var $e;
4487
- return W ? $e = v(d, h, b, O, P) : $e = P.map(function(dt) {
4488
- return w(d, h, b, O, dt, W);
4489
- }), d.seen.pop(), m($e, D, Te);
4517
+ return Y ? $e = v(l, h, b, O, C) : $e = C.map(function(dt) {
4518
+ return w(l, h, b, O, dt, Y);
4519
+ }), l.seen.pop(), m($e, D, _e);
4490
4520
  }
4491
- function f(d, h) {
4521
+ function f(l, h) {
4492
4522
  if (_(h))
4493
- return d.stylize("undefined", "undefined");
4523
+ return l.stylize("undefined", "undefined");
4494
4524
  if (L(h)) {
4495
4525
  var b = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
4496
- return d.stylize(b, "string");
4526
+ return l.stylize(b, "string");
4497
4527
  }
4498
4528
  if (ne(h))
4499
- return d.stylize("" + h, "number");
4529
+ return l.stylize("" + h, "number");
4500
4530
  if (S(h))
4501
- return d.stylize("" + h, "boolean");
4531
+ return l.stylize("" + h, "boolean");
4502
4532
  if (F(h))
4503
- return d.stylize("null", "null");
4533
+ return l.stylize("null", "null");
4504
4534
  }
4505
- function p(d) {
4506
- return "[" + Error.prototype.toString.call(d) + "]";
4535
+ function p(l) {
4536
+ return "[" + Error.prototype.toString.call(l) + "]";
4507
4537
  }
4508
- function v(d, h, b, A, C) {
4509
- for (var P = [], O = 0, k = h.length; O < k; ++O)
4510
- Re(h, String(O)) ? P.push(w(
4511
- d,
4538
+ function v(l, h, b, A, P) {
4539
+ for (var C = [], O = 0, k = h.length; O < k; ++O)
4540
+ Re(h, String(O)) ? C.push(w(
4541
+ l,
4512
4542
  h,
4513
4543
  b,
4514
4544
  A,
4515
4545
  String(O),
4516
4546
  !0
4517
- )) : P.push("");
4518
- return C.forEach(function(D) {
4519
- D.match(/^\d+$/) || P.push(w(
4520
- d,
4547
+ )) : C.push("");
4548
+ return P.forEach(function(D) {
4549
+ D.match(/^\d+$/) || C.push(w(
4550
+ l,
4521
4551
  h,
4522
4552
  b,
4523
4553
  A,
4524
4554
  D,
4525
4555
  !0
4526
4556
  ));
4527
- }), P;
4557
+ }), C;
4528
4558
  }
4529
- function w(d, h, b, A, C, P) {
4559
+ function w(l, h, b, A, P, C) {
4530
4560
  var O, k, D;
4531
- if (D = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, D.get ? D.set ? k = d.stylize("[Getter/Setter]", "special") : k = d.stylize("[Getter]", "special") : D.set && (k = d.stylize("[Setter]", "special")), Re(A, C) || (O = "[" + C + "]"), k || (d.seen.indexOf(D.value) < 0 ? (F(b) ? k = c(d, D.value, null) : k = c(d, D.value, b - 1), k.indexOf(`
4532
- `) > -1 && (P ? k = k.split(`
4533
- `).map(function(W) {
4534
- return " " + W;
4561
+ if (D = Object.getOwnPropertyDescriptor(h, P) || { value: h[P] }, D.get ? D.set ? k = l.stylize("[Getter/Setter]", "special") : k = l.stylize("[Getter]", "special") : D.set && (k = l.stylize("[Setter]", "special")), Re(A, P) || (O = "[" + P + "]"), k || (l.seen.indexOf(D.value) < 0 ? (F(b) ? k = c(l, D.value, null) : k = c(l, D.value, b - 1), k.indexOf(`
4562
+ `) > -1 && (C ? k = k.split(`
4563
+ `).map(function(Y) {
4564
+ return " " + Y;
4535
4565
  }).join(`
4536
4566
  `).slice(2) : k = `
4537
4567
  ` + k.split(`
4538
- `).map(function(W) {
4539
- return " " + W;
4568
+ `).map(function(Y) {
4569
+ return " " + Y;
4540
4570
  }).join(`
4541
- `))) : k = d.stylize("[Circular]", "special")), _(O)) {
4542
- if (P && C.match(/^\d+$/))
4571
+ `))) : k = l.stylize("[Circular]", "special")), _(O)) {
4572
+ if (C && P.match(/^\d+$/))
4543
4573
  return k;
4544
- O = JSON.stringify("" + C), O.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (O = O.slice(1, -1), O = d.stylize(O, "name")) : (O = O.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), O = d.stylize(O, "string"));
4574
+ O = JSON.stringify("" + P), O.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (O = O.slice(1, -1), O = l.stylize(O, "name")) : (O = O.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), O = l.stylize(O, "string"));
4545
4575
  }
4546
4576
  return O + ": " + k;
4547
4577
  }
4548
- function m(d, h, b) {
4549
- var A = d.reduce(function(C, P) {
4550
- return P.indexOf(`
4551
- `) >= 0, C + P.replace(/\u001b\[\d\d?m/g, "").length + 1;
4578
+ function m(l, h, b) {
4579
+ var A = l.reduce(function(P, C) {
4580
+ return C.indexOf(`
4581
+ `) >= 0, P + C.replace(/\u001b\[\d\d?m/g, "").length + 1;
4552
4582
  }, 0);
4553
4583
  return A > 60 ? b[0] + (h === "" ? "" : h + `
4554
- `) + " " + d.join(`,
4555
- `) + " " + b[1] : b[0] + h + " " + d.join(", ") + " " + b[1];
4584
+ `) + " " + l.join(`,
4585
+ `) + " " + b[1] : b[0] + h + " " + l.join(", ") + " " + b[1];
4556
4586
  }
4557
- t.types = Xn;
4558
- function g(d) {
4559
- return Array.isArray(d);
4587
+ t.types = ei;
4588
+ function g(l) {
4589
+ return Array.isArray(l);
4560
4590
  }
4561
4591
  t.isArray = g;
4562
- function S(d) {
4563
- return typeof d == "boolean";
4592
+ function S(l) {
4593
+ return typeof l == "boolean";
4564
4594
  }
4565
4595
  t.isBoolean = S;
4566
- function F(d) {
4567
- return d === null;
4596
+ function F(l) {
4597
+ return l === null;
4568
4598
  }
4569
4599
  t.isNull = F;
4570
- function z(d) {
4571
- return d == null;
4600
+ function H(l) {
4601
+ return l == null;
4572
4602
  }
4573
- t.isNullOrUndefined = z;
4574
- function ne(d) {
4575
- return typeof d == "number";
4603
+ t.isNullOrUndefined = H;
4604
+ function ne(l) {
4605
+ return typeof l == "number";
4576
4606
  }
4577
4607
  t.isNumber = ne;
4578
- function L(d) {
4579
- return typeof d == "string";
4608
+ function L(l) {
4609
+ return typeof l == "string";
4580
4610
  }
4581
4611
  t.isString = L;
4582
- function V(d) {
4583
- return typeof d == "symbol";
4612
+ function V(l) {
4613
+ return typeof l == "symbol";
4584
4614
  }
4585
4615
  t.isSymbol = V;
4586
- function _(d) {
4587
- return d === void 0;
4616
+ function _(l) {
4617
+ return l === void 0;
4588
4618
  }
4589
4619
  t.isUndefined = _;
4590
- function ae(d) {
4591
- return ue(d) && Ie(d) === "[object RegExp]";
4620
+ function ae(l) {
4621
+ return ue(l) && Ie(l) === "[object RegExp]";
4592
4622
  }
4593
4623
  t.isRegExp = ae, t.types.isRegExp = ae;
4594
- function ue(d) {
4595
- return typeof d == "object" && d !== null;
4624
+ function ue(l) {
4625
+ return typeof l == "object" && l !== null;
4596
4626
  }
4597
4627
  t.isObject = ue;
4598
- function Fe(d) {
4599
- return ue(d) && Ie(d) === "[object Date]";
4628
+ function Fe(l) {
4629
+ return ue(l) && Ie(l) === "[object Date]";
4600
4630
  }
4601
4631
  t.isDate = Fe, t.types.isDate = Fe;
4602
- function Oe(d) {
4603
- return ue(d) && (Ie(d) === "[object Error]" || d instanceof Error);
4632
+ function Te(l) {
4633
+ return ue(l) && (Ie(l) === "[object Error]" || l instanceof Error);
4604
4634
  }
4605
- t.isError = Oe, t.types.isNativeError = Oe;
4606
- function he(d) {
4607
- return typeof d == "function";
4635
+ t.isError = Te, t.types.isNativeError = Te;
4636
+ function he(l) {
4637
+ return typeof l == "function";
4608
4638
  }
4609
4639
  t.isFunction = he;
4610
- function qt(d) {
4611
- return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
4612
- typeof d > "u";
4640
+ function Ut(l) {
4641
+ return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
4642
+ typeof l > "u";
4613
4643
  }
4614
- t.isPrimitive = qt, t.isBuffer = au;
4615
- function Ie(d) {
4616
- return Object.prototype.toString.call(d);
4644
+ t.isPrimitive = Ut, t.isBuffer = au;
4645
+ function Ie(l) {
4646
+ return Object.prototype.toString.call(l);
4617
4647
  }
4618
- function Je(d) {
4619
- return d < 10 ? "0" + d.toString(10) : d.toString(10);
4648
+ function Je(l) {
4649
+ return l < 10 ? "0" + l.toString(10) : l.toString(10);
4620
4650
  }
4621
4651
  var De = [
4622
4652
  "Jan",
@@ -4632,24 +4662,24 @@ var uu = br.exports;
4632
4662
  "Nov",
4633
4663
  "Dec"
4634
4664
  ];
4635
- function Ut() {
4636
- var d = /* @__PURE__ */ new Date(), h = [
4637
- Je(d.getHours()),
4638
- Je(d.getMinutes()),
4639
- Je(d.getSeconds())
4665
+ function qt() {
4666
+ var l = /* @__PURE__ */ new Date(), h = [
4667
+ Je(l.getHours()),
4668
+ Je(l.getMinutes()),
4669
+ Je(l.getSeconds())
4640
4670
  ].join(":");
4641
- return [d.getDate(), De[d.getMonth()], h].join(" ");
4671
+ return [l.getDate(), De[l.getMonth()], h].join(" ");
4642
4672
  }
4643
4673
  t.log = function() {
4644
- console.log("%s - %s", Ut(), t.format.apply(t, arguments));
4645
- }, t.inherits = uu, t._extend = function(d, h) {
4646
- if (!h || !ue(h)) return d;
4674
+ console.log("%s - %s", qt(), t.format.apply(t, arguments));
4675
+ }, t.inherits = uu, t._extend = function(l, h) {
4676
+ if (!h || !ue(h)) return l;
4647
4677
  for (var b = Object.keys(h), A = b.length; A--; )
4648
- d[b[A]] = h[b[A]];
4649
- return d;
4678
+ l[b[A]] = h[b[A]];
4679
+ return l;
4650
4680
  };
4651
- function Re(d, h) {
4652
- return Object.prototype.hasOwnProperty.call(d, h);
4681
+ function Re(l, h) {
4682
+ return Object.prototype.hasOwnProperty.call(l, h);
4653
4683
  }
4654
4684
  var ye = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
4655
4685
  t.promisify = function(h) {
@@ -4667,19 +4697,19 @@ var uu = br.exports;
4667
4697
  }), b;
4668
4698
  }
4669
4699
  function b() {
4670
- for (var A, C, P = new Promise(function(D, W) {
4671
- A = D, C = W;
4700
+ for (var A, P, C = new Promise(function(D, Y) {
4701
+ A = D, P = Y;
4672
4702
  }), O = [], k = 0; k < arguments.length; k++)
4673
4703
  O.push(arguments[k]);
4674
- O.push(function(D, W) {
4675
- D ? C(D) : A(W);
4704
+ O.push(function(D, Y) {
4705
+ D ? P(D) : A(Y);
4676
4706
  });
4677
4707
  try {
4678
4708
  h.apply(this, O);
4679
4709
  } catch (D) {
4680
- C(D);
4710
+ P(D);
4681
4711
  }
4682
- return P;
4712
+ return C;
4683
4713
  }
4684
4714
  return Object.setPrototypeOf(b, Object.getPrototypeOf(h)), ye && Object.defineProperty(b, ye, {
4685
4715
  value: b,
@@ -4691,26 +4721,26 @@ var uu = br.exports;
4691
4721
  e(h)
4692
4722
  );
4693
4723
  }, t.promisify.custom = ye;
4694
- function Ve(d, h) {
4695
- if (!d) {
4724
+ function Ve(l, h) {
4725
+ if (!l) {
4696
4726
  var b = new Error("Promise was rejected with a falsy value");
4697
- b.reason = d, d = b;
4727
+ b.reason = l, l = b;
4698
4728
  }
4699
- return h(d);
4729
+ return h(l);
4700
4730
  }
4701
- function ut(d) {
4702
- if (typeof d != "function")
4731
+ function ut(l) {
4732
+ if (typeof l != "function")
4703
4733
  throw new TypeError('The "original" argument must be of type Function');
4704
4734
  function h() {
4705
4735
  for (var b = [], A = 0; A < arguments.length; A++)
4706
4736
  b.push(arguments[A]);
4707
- var C = b.pop();
4708
- if (typeof C != "function")
4737
+ var P = b.pop();
4738
+ if (typeof P != "function")
4709
4739
  throw new TypeError("The last argument must be of type Function");
4710
- var P = this, O = function() {
4711
- return C.apply(P, arguments);
4740
+ var C = this, O = function() {
4741
+ return P.apply(C, arguments);
4712
4742
  };
4713
- d.apply(this, b).then(
4743
+ l.apply(this, b).then(
4714
4744
  function(k) {
4715
4745
  E.nextTick(O.bind(null, null, k));
4716
4746
  },
@@ -4719,15 +4749,15 @@ var uu = br.exports;
4719
4749
  }
4720
4750
  );
4721
4751
  }
4722
- return Object.setPrototypeOf(h, Object.getPrototypeOf(d)), Object.defineProperties(
4752
+ return Object.setPrototypeOf(h, Object.getPrototypeOf(l)), Object.defineProperties(
4723
4753
  h,
4724
- e(d)
4754
+ e(l)
4725
4755
  ), h;
4726
4756
  }
4727
4757
  t.callbackify = ut;
4728
4758
  })(Rt);
4729
4759
  const { inherits: cu, format: Xt } = Rt;
4730
- function _e(t, e, r = Error) {
4760
+ function ke(t, e, r = Error) {
4731
4761
  if (!t) throw new Error("Avvio error code must not be empty");
4732
4762
  if (!e) throw new Error("Avvio base error message must not be empty");
4733
4763
  function n(i, o, s) {
@@ -4739,55 +4769,55 @@ function _e(t, e, r = Error) {
4739
4769
  return `${this.name} [${this.code}]: ${this.message}`;
4740
4770
  }, cu(n, r), n;
4741
4771
  }
4742
- var hi = {
4743
- createError: _e,
4744
- AVV_ERR_EXPOSE_ALREADY_DEFINED: _e(
4772
+ var mi = {
4773
+ createError: ke,
4774
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: ke(
4745
4775
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
4746
4776
  "'%s' () is already defined, specify an expose option"
4747
4777
  ),
4748
- AVV_ERR_CALLBACK_NOT_FN: _e(
4778
+ AVV_ERR_CALLBACK_NOT_FN: ke(
4749
4779
  "AVV_ERR_CALLBACK_NOT_FN",
4750
4780
  "Callback for '%s' hook is not a function. Received: '%s'"
4751
4781
  ),
4752
- AVV_ERR_PLUGIN_NOT_VALID: _e(
4782
+ AVV_ERR_PLUGIN_NOT_VALID: ke(
4753
4783
  "AVV_ERR_PLUGIN_NOT_VALID",
4754
4784
  "Plugin must be a function or a promise. Received: '%s'"
4755
4785
  ),
4756
- AVV_ERR_ROOT_PLG_BOOTED: _e(
4786
+ AVV_ERR_ROOT_PLG_BOOTED: ke(
4757
4787
  "AVV_ERR_PLUGIN_NOT_VALID",
4758
4788
  "Root plugin has already booted"
4759
4789
  ),
4760
- AVV_ERR_PARENT_PLG_LOADED: _e(
4790
+ AVV_ERR_PARENT_PLG_LOADED: ke(
4761
4791
  "AVV_ERR_PARENT_PLG_LOADED",
4762
4792
  "Impossible to load '%s' plugin because the parent '%s' was already loaded"
4763
4793
  ),
4764
- AVV_ERR_READY_TIMEOUT: _e(
4794
+ AVV_ERR_READY_TIMEOUT: ke(
4765
4795
  "AVV_ERR_READY_TIMEOUT",
4766
4796
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
4767
4797
  )
4768
4798
  }, du = function t(e, r, n) {
4769
4799
  r === void 0 && (r = ""), n || (n = {});
4770
4800
  var i = function(u) {
4771
- var l = {
4801
+ var d = {
4772
4802
  "│": "|",
4773
4803
  "└": "`",
4774
4804
  "├": "+",
4775
4805
  "─": "-",
4776
4806
  "┬": "-"
4777
4807
  };
4778
- return n.unicode === !1 ? l[u] : u;
4808
+ return n.unicode === !1 ? d[u] : u;
4779
4809
  };
4780
4810
  typeof e == "string" && (e = { label: e });
4781
4811
  var o = e.nodes || [], s = (e.label || "").split(`
4782
4812
  `), a = `
4783
4813
  ` + r + (o.length ? i("│") : " ") + " ";
4784
4814
  return r + s.join(a) + `
4785
- ` + o.map(function(u, l) {
4786
- var c = l === o.length - 1, f = u.nodes && u.nodes.length, p = r + (c ? " " : i("│")) + " ";
4815
+ ` + o.map(function(u, d) {
4816
+ var c = d === o.length - 1, f = u.nodes && u.nodes.length, p = r + (c ? " " : i("│")) + " ";
4787
4817
  return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
4788
4818
  }).join("");
4789
4819
  };
4790
- const lu = du, Sn = Symbol("avvio.TimeTree.untrackNode"), Zt = Symbol("avvio.TimeTree.trackNode"), wn = Symbol("avvio.TimeTree.getParent"), An = Symbol("avvio.TimeTree.getNode"), En = Symbol("avvio.TimeTree.addNode");
4820
+ const lu = du, An = Symbol("avvio.TimeTree.untrackNode"), Zt = Symbol("avvio.TimeTree.trackNode"), En = Symbol("avvio.TimeTree.getParent"), In = Symbol("avvio.TimeTree.getNode"), On = Symbol("avvio.TimeTree.addNode");
4791
4821
  let fu = class {
4792
4822
  constructor() {
4793
4823
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
@@ -4795,7 +4825,7 @@ let fu = class {
4795
4825
  [Zt](e) {
4796
4826
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
4797
4827
  }
4798
- [Sn](e) {
4828
+ [An](e) {
4799
4829
  this.tableId.delete(e.id);
4800
4830
  const r = this.tableLabel.get(e.label);
4801
4831
  if (r.id) {
@@ -4804,16 +4834,16 @@ let fu = class {
4804
4834
  }
4805
4835
  r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
4806
4836
  }
4807
- [wn](e) {
4837
+ [En](e) {
4808
4838
  if (e === null)
4809
4839
  return this.root;
4810
4840
  const r = this.tableLabel.get(e);
4811
4841
  return r.id ? r : r[r.length - 1];
4812
4842
  }
4813
- [An](e) {
4843
+ [In](e) {
4814
4844
  return this.tableId.get(e);
4815
4845
  }
4816
- [En](e, r, n) {
4846
+ [On](e, r, n) {
4817
4847
  if (e === null)
4818
4848
  return this.root = {
4819
4849
  id: "root",
@@ -4821,7 +4851,7 @@ let fu = class {
4821
4851
  start: n,
4822
4852
  nodes: []
4823
4853
  }, this[Zt](this.root), this.root.id;
4824
- const o = this[wn](e), s = `${r}-${Math.random()}`, a = {
4854
+ const o = this[En](e), s = `${r}-${Math.random()}`, a = {
4825
4855
  id: s,
4826
4856
  parent: e,
4827
4857
  start: n,
@@ -4831,11 +4861,11 @@ let fu = class {
4831
4861
  return o.nodes.push(a), this[Zt](a), s;
4832
4862
  }
4833
4863
  start(e, r, n = Date.now()) {
4834
- return this[En](e, r, n);
4864
+ return this[On](e, r, n);
4835
4865
  }
4836
4866
  stop(e, r = Date.now()) {
4837
- const n = this[An](e);
4838
- n && (n.stop = r, n.diff = n.stop - n.start || 0, this[Sn](n));
4867
+ const n = this[In](e);
4868
+ n && (n.stop = r, n.diff = n.stop - n.start || 0, this[An](n));
4839
4869
  }
4840
4870
  toJSON() {
4841
4871
  return Object.assign({}, this.root);
@@ -4845,10 +4875,10 @@ let fu = class {
4845
4875
  return lu(r);
4846
4876
  }
4847
4877
  };
4848
- var pu = fu, Rr = { exports: {} }, vr = { exports: {} }, er, In;
4878
+ var pu = fu, Rr = { exports: {} }, vr = { exports: {} }, er, Tn;
4849
4879
  function hu() {
4850
- if (In) return er;
4851
- In = 1;
4880
+ if (Tn) return er;
4881
+ Tn = 1;
4852
4882
  var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
4853
4883
  er = function(c, f) {
4854
4884
  f = f || {};
@@ -4919,16 +4949,16 @@ function hu() {
4919
4949
  }
4920
4950
  function u(c) {
4921
4951
  var f = Math.abs(c);
4922
- return f >= n ? l(c, f, n, "day") : f >= r ? l(c, f, r, "hour") : f >= e ? l(c, f, e, "minute") : f >= t ? l(c, f, t, "second") : c + " ms";
4952
+ return f >= n ? d(c, f, n, "day") : f >= r ? d(c, f, r, "hour") : f >= e ? d(c, f, e, "minute") : f >= t ? d(c, f, t, "second") : c + " ms";
4923
4953
  }
4924
- function l(c, f, p, v) {
4954
+ function d(c, f, p, v) {
4925
4955
  var w = f >= p * 1.5;
4926
4956
  return Math.round(c / p) + " " + v + (w ? "s" : "");
4927
4957
  }
4928
4958
  return er;
4929
4959
  }
4930
4960
  function yu(t) {
4931
- r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = hu(), r.destroy = l, Object.keys(t).forEach((c) => {
4961
+ r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = hu(), r.destroy = d, Object.keys(t).forEach((c) => {
4932
4962
  r[c] = t[c];
4933
4963
  }), r.names = [], r.skips = [], r.formatters = {};
4934
4964
  function e(c) {
@@ -4943,8 +4973,8 @@ function yu(t) {
4943
4973
  function m(...g) {
4944
4974
  if (!m.enabled)
4945
4975
  return;
4946
- const S = m, F = Number(/* @__PURE__ */ new Date()), z = F - (f || F);
4947
- S.diff = z, S.prev = f, S.curr = F, f = F, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
4976
+ const S = m, F = Number(/* @__PURE__ */ new Date()), H = F - (f || F);
4977
+ S.diff = H, S.prev = f, S.curr = F, f = F, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
4948
4978
  let ne = 0;
4949
4979
  g[0] = g[0].replace(/%([a-zA-Z%])/g, (V, _) => {
4950
4980
  if (V === "%%")
@@ -5003,7 +5033,7 @@ function yu(t) {
5003
5033
  function u(c) {
5004
5034
  return c instanceof Error ? c.stack || c.message : c;
5005
5035
  }
5006
- function l() {
5036
+ function d() {
5007
5037
  console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
5008
5038
  }
5009
5039
  return r.enable(r.load()), r;
@@ -5103,12 +5133,12 @@ var mu = yu;
5103
5133
  function n(u) {
5104
5134
  if (u[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + u[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
5105
5135
  return;
5106
- const l = "color: " + this.color;
5107
- u.splice(1, 0, l, "color: inherit");
5136
+ const d = "color: " + this.color;
5137
+ u.splice(1, 0, d, "color: inherit");
5108
5138
  let c = 0, f = 0;
5109
5139
  u[0].replace(/%[a-zA-Z%]/g, (p) => {
5110
5140
  p !== "%%" && (c++, p === "%c" && (f = c));
5111
- }), u.splice(f, 0, l);
5141
+ }), u.splice(f, 0, d);
5112
5142
  }
5113
5143
  e.log = console.debug || console.log || (() => {
5114
5144
  });
@@ -5137,13 +5167,13 @@ var mu = yu;
5137
5167
  a.j = function(u) {
5138
5168
  try {
5139
5169
  return JSON.stringify(u);
5140
- } catch (l) {
5141
- return "[UnexpectedJSONParseError]: " + l.message;
5170
+ } catch (d) {
5171
+ return "[UnexpectedJSONParseError]: " + d.message;
5142
5172
  }
5143
5173
  };
5144
5174
  })(vr, vr.exports);
5145
- var yi = vr.exports;
5146
- const gu = jn, bu = Jn.EventEmitter, vu = Rt.inherits, x = yi("avvio"), { AVV_ERR_READY_TIMEOUT: Su } = hi, tr = Symbol.for("plugin-meta");
5175
+ var gi = vr.exports;
5176
+ const gu = Qn, bu = Zn.EventEmitter, vu = Rt.inherits, x = gi("avvio"), { AVV_ERR_READY_TIMEOUT: Su } = mi, tr = Symbol.for("plugin-meta");
5147
5177
  function wu(t, e) {
5148
5178
  return t[tr] && t[tr].name ? t[tr].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
5149
5179
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
@@ -5256,13 +5286,13 @@ function Iu() {
5256
5286
  Rr.exports = Ye;
5257
5287
  Rr.exports.loadPlugin = Vr;
5258
5288
  var Ou = Rr.exports;
5259
- const On = jn, Tu = Jn.EventEmitter, _u = Rt.inherits, {
5289
+ const _n = Qn, Tu = Zn.EventEmitter, _u = Rt.inherits, {
5260
5290
  AVV_ERR_EXPOSE_ALREADY_DEFINED: rr,
5261
5291
  AVV_ERR_CALLBACK_NOT_FN: tt,
5262
5292
  AVV_ERR_PLUGIN_NOT_VALID: ku,
5263
- AVV_ERR_ROOT_PLG_BOOTED: Cu,
5264
- AVV_ERR_READY_TIMEOUT: Pu
5265
- } = hi, Lu = pu, Sr = Ou, He = yi("avvio"), Pt = Symbol("kAvvio"), nr = Symbol("kThenifyDoNotWrap");
5293
+ AVV_ERR_ROOT_PLG_BOOTED: Pu,
5294
+ AVV_ERR_READY_TIMEOUT: Cu
5295
+ } = mi, Lu = pu, Sr = Ou, He = gi("avvio"), Ct = Symbol("kAvvio"), nr = Symbol("kThenifyDoNotWrap");
5266
5296
  function Nu(t, e, r) {
5267
5297
  const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
5268
5298
  if (t[i])
@@ -5271,37 +5301,37 @@ function Nu(t, e, r) {
5271
5301
  throw new rr(o);
5272
5302
  if (t[s])
5273
5303
  throw new rr(s);
5274
- t[i] = function(l, c) {
5275
- return r.use(l, c), this;
5276
- }, Object.defineProperty(t, "then", { get: mi.bind(r) }), t[Pt] = !0, t[o] = function(l) {
5277
- return typeof l != "function" ? r._loadRegistered() : (r.after(ir(l, this)), this);
5278
- }, t[s] = function(l) {
5279
- if (l && typeof l != "function")
5280
- throw new tt(s, typeof l);
5281
- return r.ready(l ? ir(l, this) : void 0);
5282
- }, t[a] = function(l) {
5283
- if (typeof l != "function")
5284
- throw new tt(a, typeof l);
5285
- return r.onClose($u(l, this)), this;
5286
- }, t[u] = function(l) {
5287
- if (l && typeof l != "function")
5288
- throw new tt(u, typeof l);
5289
- return l ? (r.close(ir(l, this)), this) : r.close();
5304
+ t[i] = function(d, c) {
5305
+ return r.use(d, c), this;
5306
+ }, Object.defineProperty(t, "then", { get: bi.bind(r) }), t[Ct] = !0, t[o] = function(d) {
5307
+ return typeof d != "function" ? r._loadRegistered() : (r.after(ir(d, this)), this);
5308
+ }, t[s] = function(d) {
5309
+ if (d && typeof d != "function")
5310
+ throw new tt(s, typeof d);
5311
+ return r.ready(d ? ir(d, this) : void 0);
5312
+ }, t[a] = function(d) {
5313
+ if (typeof d != "function")
5314
+ throw new tt(a, typeof d);
5315
+ return r.onClose($u(d, this)), this;
5316
+ }, t[u] = function(d) {
5317
+ if (d && typeof d != "function")
5318
+ throw new tt(u, typeof d);
5319
+ return d ? (r.close(ir(d, this)), this) : r.close();
5290
5320
  };
5291
5321
  }
5292
- function K(t, e, r) {
5293
- if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof K)) {
5294
- const n = new K(t, e, r);
5322
+ function z(t, e, r) {
5323
+ if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof z)) {
5324
+ const n = new z(t, e, r);
5295
5325
  return t && Nu(t, e, n), n;
5296
5326
  }
5297
- 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 Lu(), this._readyQ = On(this, gi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5298
- this.emit("start"), this._readyQ.drain = Tn;
5299
- }, this._closeQ = On(this, Vu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5300
- this.emit("close"), this._closeQ.drain = Tn;
5327
+ 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 Lu(), this._readyQ = _n(this, vi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5328
+ this.emit("start"), this._readyQ.drain = kn;
5329
+ }, this._closeQ = _n(this, Vu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5330
+ this.emit("close"), this._closeQ.drain = kn;
5301
5331
  }, this._doStart = null, this._root = new Sr(this, Fu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5302
5332
  const s = this.pluginTree.start(null, i, o);
5303
- this._root.once("loaded", (a, u, l) => {
5304
- this.pluginTree.stop(s, l);
5333
+ this._root.once("loaded", (a, u, d) => {
5334
+ this.pluginTree.stop(s, d);
5305
5335
  });
5306
5336
  }), Sr.loadPlugin.call(this, this._root, (n) => {
5307
5337
  He("root plugin ready");
@@ -5321,11 +5351,11 @@ function K(t, e, r) {
5321
5351
  function Fu(t, e, r) {
5322
5352
  this._doStart = r, e.autostart && this.start();
5323
5353
  }
5324
- _u(K, Tu);
5325
- K.prototype.start = function() {
5354
+ _u(z, Tu);
5355
+ z.prototype.start = function() {
5326
5356
  return this.started = !0, E.nextTick(this._doStart), this;
5327
5357
  };
5328
- K.prototype.override = function(t, e, r) {
5358
+ z.prototype.override = function(t, e, r) {
5329
5359
  return t;
5330
5360
  };
5331
5361
  function Du(t) {
@@ -5333,22 +5363,22 @@ function Du(t) {
5333
5363
  throw new ku(typeof t);
5334
5364
  return t;
5335
5365
  }
5336
- K.prototype[Pt] = !0;
5337
- K.prototype.use = function(t, e) {
5366
+ z.prototype[Ct] = !0;
5367
+ z.prototype.use = function(t, e) {
5338
5368
  return this._lastUsed = this._addPlugin(t, e, !1), this;
5339
5369
  };
5340
- K.prototype._loadRegistered = function() {
5370
+ z.prototype._loadRegistered = function() {
5341
5371
  const t = this._current[0];
5342
5372
  return !this.started && !this.booted && E.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5343
5373
  };
5344
- Object.defineProperty(K.prototype, "then", { get: mi });
5345
- K.prototype._addPlugin = function(t, e, r) {
5374
+ Object.defineProperty(z.prototype, "then", { get: bi });
5375
+ z.prototype._addPlugin = function(t, e, r) {
5346
5376
  if (t = Du(t), e = e || {}, this.booted)
5347
- throw new Cu();
5377
+ throw new Pu();
5348
5378
  const n = this._current[0], i = new Sr(this, t, e, r);
5349
5379
  if (i.once("start", (o, s, a) => {
5350
5380
  const u = this.pluginTree.start(n.name, s, a);
5351
- i.once("loaded", (l, c, f) => {
5381
+ i.once("loaded", (d, c, f) => {
5352
5382
  this.pluginTree.stop(u, f);
5353
5383
  });
5354
5384
  }), n.loaded)
@@ -5357,16 +5387,16 @@ K.prototype._addPlugin = function(t, e, r) {
5357
5387
  o && (this._error = o);
5358
5388
  }), i;
5359
5389
  };
5360
- K.prototype.after = function(t) {
5390
+ z.prototype.after = function(t) {
5361
5391
  if (!t)
5362
5392
  return this._loadRegistered();
5363
5393
  this._addPlugin(e.bind(this), {}, !0);
5364
5394
  function e(r, n, i) {
5365
- gi.call(this, t, i);
5395
+ vi.call(this, t, i);
5366
5396
  }
5367
5397
  return this;
5368
5398
  };
5369
- K.prototype.onClose = function(t) {
5399
+ z.prototype.onClose = function(t) {
5370
5400
  if (typeof t != "function")
5371
5401
  throw new Error("not a function");
5372
5402
  t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
@@ -5375,7 +5405,7 @@ K.prototype.onClose = function(t) {
5375
5405
  }
5376
5406
  return this;
5377
5407
  };
5378
- K.prototype.close = function(t) {
5408
+ z.prototype.close = function(t) {
5379
5409
  let e;
5380
5410
  if (t) {
5381
5411
  if (typeof t != "function")
@@ -5392,7 +5422,7 @@ K.prototype.close = function(t) {
5392
5422
  this._error = null, this._closeQ.push(t), E.nextTick(this._closeQ.resume.bind(this._closeQ));
5393
5423
  }), e;
5394
5424
  };
5395
- K.prototype.ready = function(t) {
5425
+ z.prototype.ready = function(t) {
5396
5426
  if (t) {
5397
5427
  if (typeof t != "function")
5398
5428
  throw new tt("ready", typeof t);
@@ -5407,15 +5437,15 @@ K.prototype.ready = function(t) {
5407
5437
  }
5408
5438
  });
5409
5439
  };
5410
- K.prototype.prettyPrint = function() {
5440
+ z.prototype.prettyPrint = function() {
5411
5441
  return this.pluginTree.prittyPrint();
5412
5442
  };
5413
- K.prototype.toJSON = function() {
5443
+ z.prototype.toJSON = function() {
5414
5444
  return this.pluginTree.toJSON();
5415
5445
  };
5416
- function Tn() {
5446
+ function kn() {
5417
5447
  }
5418
- function mi() {
5448
+ function bi() {
5419
5449
  if (this.booted) {
5420
5450
  He("thenify returning null because we are already booted");
5421
5451
  return;
@@ -5426,13 +5456,13 @@ function mi() {
5426
5456
  }
5427
5457
  return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[nr] = !0, t(this._server)), e);
5428
5458
  }
5429
- function gi(t, e) {
5459
+ function vi(t, e) {
5430
5460
  const r = this._server, n = this._error;
5431
5461
  let i;
5432
5462
  if (this._error = null, t.length === 0)
5433
- this._error = n, i = t(), i && !i[Pt] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
5463
+ this._error = n, i = t(), i && !i[Ct] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
5434
5464
  else if (t.length === 1)
5435
- i = t(n), i && !i[Pt] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
5465
+ i = t(n), i && !i[Ct] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
5436
5466
  else if (this._timeout === 0) {
5437
5467
  const o = (s) => {
5438
5468
  this._error = s, e(this._error);
@@ -5446,7 +5476,7 @@ function Ru(t, e, r, n) {
5446
5476
  He("setting up ready timeout", i, this._timeout);
5447
5477
  let o = setTimeout(() => {
5448
5478
  He("timed out", i), o = null;
5449
- const a = new Pu(i);
5479
+ const a = new Cu(i);
5450
5480
  a.fn = t, this._error = a, n(a);
5451
5481
  }, this._timeout);
5452
5482
  t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
@@ -5486,9 +5516,9 @@ function ir(t, e) {
5486
5516
  }, i) : E.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : E.nextTick(i);
5487
5517
  }
5488
5518
  }
5489
- Ir.exports = K;
5519
+ Ir.exports = z;
5490
5520
  Ir.exports.express = function(t) {
5491
- return K(t, {
5521
+ return z(t, {
5492
5522
  expose: {
5493
5523
  use: "load"
5494
5524
  }
@@ -5515,24 +5545,25 @@ const Mu = /* @__PURE__ */ ps(Bu);
5515
5545
  })();
5516
5546
  function cc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5517
5547
  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 = Mu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5518
- return s.use(xo, {
5548
+ return s.use(Qo, {
5519
5549
  hideFriends: n.hideFriends,
5520
5550
  skipOnboarding: n.skipOnboarding,
5551
+ betPack: n.betPack,
5521
5552
  friendsTab: n.friendsTab,
5522
5553
  theme: n.theme,
5523
5554
  themeMode: n.themeMode
5524
- }), s.use(Vo, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(qo, { videoPlayerController: n?.videoPlayerController }), s.use(jo, {
5555
+ }), s.use($o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(qo, { videoPlayerController: n?.videoPlayerController }), s.use(xo, {
5525
5556
  onContentActivate: n?.onContentActivate,
5526
5557
  withAd: n?.withAd,
5527
5558
  withAdNotification: n?.withAdNotification
5528
- }), s.use(eo, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(oo), s.use(Mo), s.use(rs), s.use(ko), s.use(fs), s.after((a, u, l) => {
5559
+ }), s.use(ro, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(ao), s.use(Uo), s.use(rs), s.use(Co), s.use(fs), s.after((a, u, d) => {
5529
5560
  if (a)
5530
5561
  throw a;
5531
- u.ready(), l();
5532
- }), r && s.after(async (a, u, l) => {
5562
+ u.ready(), d();
5563
+ }), r && s.after(async (a, u, d) => {
5533
5564
  if (a)
5534
5565
  throw a;
5535
- await u.sdk.initializeApp(), l();
5566
+ await u.sdk.initializeApp(), d();
5536
5567
  }), s.onClose(() => {
5537
5568
  console.log("close");
5538
5569
  }), s;