@streamlayer/sdk-web 1.17.6 → 1.17.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import { pino as is } from "pino";
2
1
  import { QuestionType as N, QuestionStatus as Z, AdUnit as oe, PromotionType as F, NotificationEnabled as Kr, SilenceSetting as ss, NotificationUseContentTexts as zr, UseAsNotification as os, FactoidMediaMode as as } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
2
  import { Feed as re, PickHistoryStatus as vt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
3
  import { SdkOverlayType as q } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
@@ -132,31 +131,56 @@ H.umask = function() {
132
131
  return 0;
133
132
  };
134
133
  var bs = ni.exports;
135
- const k = /* @__PURE__ */ ms(bs), vs = is({
136
- level: "trace",
137
- enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
138
- browser: {
139
- write: (t) => {
140
- console.log(t);
134
+ const k = /* @__PURE__ */ ms(bs), vs = ["trace", "debug", "info", "warn", "error", "fatal"], As = {
135
+ trace: "debug",
136
+ debug: "debug",
137
+ info: "info",
138
+ warn: "warn",
139
+ error: "error",
140
+ fatal: "error"
141
+ }, Ss = typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG");
142
+ function ws(t, e) {
143
+ return Ss ? (...r) => {
144
+ if (r.length !== 0)
145
+ if (typeof r[0] == "string")
146
+ t(`[${e}]`, ...r);
147
+ else {
148
+ const [n, ...i] = r;
149
+ t(`[${e}]`, ...i, n);
150
+ }
151
+ } : () => {
152
+ };
153
+ }
154
+ function ai(t) {
155
+ const e = t.name || "app", r = {
156
+ level: "trace",
157
+ child(n, i) {
158
+ return ai({ ...t, ...n });
141
159
  }
160
+ };
161
+ for (const n of vs) {
162
+ const i = As[n], s = (...o) => console[i](...o);
163
+ r[n] = ws(s, e);
142
164
  }
143
- }), ne = (t, e) => vs.child({ name: t }, e);
144
- class As extends Event {
165
+ return r;
166
+ }
167
+ const Es = ai({}), ne = (t, e) => Es.child({ name: t }, e);
168
+ class Ts extends Event {
145
169
  slEventBus;
146
170
  constructor(e, r) {
147
171
  super(e), this.slEventBus = r;
148
172
  }
149
173
  }
150
- const Ss = ne("event-bus");
151
- class ws {
174
+ const Is = ne("event-bus");
175
+ class Os {
152
176
  name;
153
177
  listeners;
154
178
  constructor(e = "sl-event-bus") {
155
179
  this.name = e, this.listeners = /* @__PURE__ */ new Set();
156
180
  }
157
181
  emit = (e, r) => {
158
- const n = new As(this.name, { ...r, type: e });
159
- Ss.debug(n, "Emitting event"), window.dispatchEvent(n);
182
+ const n = new Ts(this.name, { ...r, type: e });
183
+ Is.debug(n, "Emitting event"), window.dispatchEvent(n);
160
184
  };
161
185
  listen(e) {
162
186
  return window.addEventListener(this.name, e), this.listeners.add(e), () => {
@@ -172,7 +196,7 @@ class ws {
172
196
  }), this.listeners.clear();
173
197
  };
174
198
  }
175
- class Es {
199
+ class ks {
176
200
  }
177
201
  var Ie;
178
202
  (function(t) {
@@ -195,7 +219,7 @@ class Mt {
195
219
  return this.store;
196
220
  }
197
221
  }
198
- const Ts = (t) => {
222
+ const Ns = (t) => {
199
223
  const e = Object.keys(t);
200
224
  return us(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
201
225
  };
@@ -211,7 +235,7 @@ var Se;
211
235
  (function(t) {
212
236
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
213
237
  })(Se || (Se = {}));
214
- const Is = {
238
+ const Ls = {
215
239
  [q.BETTING]: "betting",
216
240
  [q.GAMES]: "games",
217
241
  [q.PUBLIC_CHAT]: "publicChat",
@@ -221,7 +245,7 @@ var Le;
221
245
  (function(t) {
222
246
  t.Ready = "ready", t.Suspended = "suspended";
223
247
  })(Le || (Le = {}));
224
- const Os = /* @__PURE__ */ new Set([
248
+ const Cs = /* @__PURE__ */ new Set([
225
249
  "equals",
226
250
  "clone",
227
251
  "fromBinary",
@@ -232,7 +256,7 @@ const Os = /* @__PURE__ */ new Set([
232
256
  "toJsonString",
233
257
  "getType"
234
258
  ]);
235
- class ai {
259
+ class ui {
236
260
  status;
237
261
  listeners = /* @__PURE__ */ new Set();
238
262
  constructor() {
@@ -256,7 +280,7 @@ class ai {
256
280
  }
257
281
  }
258
282
  }
259
- class ui {
283
+ class ci {
260
284
  status;
261
285
  source;
262
286
  config;
@@ -264,7 +288,7 @@ class ui {
264
288
  listeners = /* @__PURE__ */ new Set();
265
289
  settingsKey;
266
290
  constructor({ settings: e, ...r }, n) {
267
- this.settingsKey = Is[r.type], this.status = pt(Le.Suspended), this.config = new De(te(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new De(te(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new De(te({}), `feature:settings:${this.settingsKey}`), this.source = n;
291
+ this.settingsKey = Ls[r.type], this.status = pt(Le.Suspended), this.config = new De(te(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new De(te(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new De(te({}), `feature:settings:${this.settingsKey}`), this.source = n;
268
292
  }
269
293
  get featureConfig() {
270
294
  return this.config.getStore();
@@ -290,7 +314,7 @@ class ui {
290
314
  if (i !== void 0) {
291
315
  let s;
292
316
  for (s in i)
293
- !Os.has(s) && i[s] && this.settings.setValue(s, i[s]);
317
+ !Cs.has(s) && i[s] && this.settings.setValue(s, i[s]);
294
318
  }
295
319
  }
296
320
  };
@@ -361,8 +385,8 @@ class ce extends Mt {
361
385
  key = () => this.getStore().key;
362
386
  off = () => this.getStore().off();
363
387
  }
364
- const B = new ws();
365
- async function* ks(t, e) {
388
+ const B = new Os();
389
+ async function* Rs(t, e) {
366
390
  for await (const r of e) {
367
391
  t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
368
392
  const n = {
@@ -372,7 +396,7 @@ async function* ks(t, e) {
372
396
  window.postMessage(n), yield r;
373
397
  }
374
398
  }
375
- const Ns = () => (t) => async (e) => {
399
+ const Ps = () => (t) => async (e) => {
376
400
  const r = {
377
401
  id: Date.now(),
378
402
  name: e.url,
@@ -410,7 +434,7 @@ const Ns = () => (t) => async (e) => {
410
434
  }
411
435
  return {
412
436
  ...n,
413
- message: ks(r, n.message)
437
+ message: Rs(r, n.message)
414
438
  };
415
439
  } else {
416
440
  r.response.message = n.message, r.latency = r.received_at - r.sent_at;
@@ -443,7 +467,7 @@ const Ns = () => (t) => async (e) => {
443
467
  }
444
468
  };
445
469
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
446
- function ci(t) {
470
+ function li(t) {
447
471
  return t instanceof DOMException && // everything except Firefox
448
472
  (t.code === 22 || // Firefox
449
473
  t.code === 1014 || // test name field too, because code might not be present
@@ -468,7 +492,7 @@ class it {
468
492
  try {
469
493
  this.storage.setItem(n, r);
470
494
  } catch (i) {
471
- ci(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
495
+ li(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
472
496
  }
473
497
  };
474
498
  read = (...e) => {
@@ -484,7 +508,7 @@ var ae;
484
508
  t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
485
509
  })(ae || (ae = {}));
486
510
  const an = ne("grpc:stream");
487
- class Ls {
511
+ class _s {
488
512
  params;
489
513
  streamCancel;
490
514
  method;
@@ -523,7 +547,7 @@ class Ls {
523
547
  window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
524
548
  ` + n);
525
549
  } catch (i) {
526
- ci(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
550
+ li(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
527
551
  }
528
552
  }
529
553
  };
@@ -593,7 +617,7 @@ class Ls {
593
617
  }
594
618
  };
595
619
  }
596
- const Cs = /* @__PURE__ */ new Set([
620
+ const Ds = /* @__PURE__ */ new Set([
597
621
  ue.Unknown,
598
622
  ue.Internal,
599
623
  ue.DeadlineExceeded,
@@ -601,7 +625,7 @@ const Cs = /* @__PURE__ */ new Set([
601
625
  ue.FailedPrecondition,
602
626
  ue.Unavailable,
603
627
  ue.DataLoss
604
- ]), un = ne("grpc:retry"), Rs = (t) => async (e) => {
628
+ ]), un = ne("grpc:retry"), Fs = (t) => async (e) => {
605
629
  const r = e.contextValues.get(gr.retryAttempts), n = 300, i = e.contextValues.get(gr.retryDelay);
606
630
  if (e.stream || r === 0)
607
631
  return t(e);
@@ -612,7 +636,7 @@ const Cs = /* @__PURE__ */ new Set([
612
636
  } catch (o) {
613
637
  un.trace({ attempt: s, error: o, url: e.url }, "retry attempt");
614
638
  const a = lt.from(o);
615
- if (s >= r || !(a instanceof lt) || !Cs.has(a.code))
639
+ if (s >= r || !(a instanceof lt) || !Ds.has(a.code))
616
640
  throw o;
617
641
  const u = Math.min(i, Math.pow(2, s) * n), c = Math.round(u * (1 + Math.random()) / 2);
618
642
  await new Promise((l) => setTimeout(l, c));
@@ -620,13 +644,13 @@ const Cs = /* @__PURE__ */ new Set([
620
644
  }, gr = {
621
645
  retryAttempts: Zr(10, { description: "Number of attempts to retry" }),
622
646
  retryDelay: Zr(3e4, { description: "Max delay between retries in milliseconds" })
623
- }, Ps = () => {
647
+ }, Us = () => {
624
648
  const t = localStorage.getItem("sl-device-id");
625
649
  if (t)
626
650
  return t;
627
651
  const e = Ke();
628
652
  return localStorage.setItem("sl-device-id", e), e;
629
- }, _s = () => navigator.userAgentData?.platform || navigator.platform, Ds = (t) => t ? "webOS" : navigator.userAgentData && navigator.userAgentData.mobile || "ontouchstart" in window || navigator.maxTouchPoints > 0 ? "mobile-web" : "desktop-web";
653
+ }, Vs = () => navigator.userAgentData?.platform || navigator.platform, xs = (t) => t ? "webOS" : navigator.userAgentData && navigator.userAgentData.mobile || "ontouchstart" in window || navigator.maxTouchPoints > 0 ? "mobile-web" : "desktop-web";
630
654
  class cn {
631
655
  toJsonOptions = {
632
656
  emitDefaultValues: !1,
@@ -649,9 +673,9 @@ class cn {
649
673
  opts;
650
674
  constructor(e, r) {
651
675
  this.host = e, this.opts = r, this.$headers = new De(te({
652
- "sl-device-id": Ps(),
653
- "sl-device-os": _s(),
654
- "sl-platform": Ds(r?.webOS)
676
+ "sl-device-id": Us(),
677
+ "sl-device-os": Vs(),
678
+ "sl-platform": xs(r?.webOS)
655
679
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map(), this.storeCache = /* @__PURE__ */ new Map();
656
680
  const [n, i, s] = rn({
657
681
  dedupeTime: r?.dedupeTime,
@@ -675,7 +699,7 @@ class cn {
675
699
  const i = this.subscriptions.get(r);
676
700
  if (i)
677
701
  return i;
678
- const s = new Ls(
702
+ const s = new _s(
679
703
  this.$headers,
680
704
  e,
681
705
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -755,10 +779,10 @@ class cn {
755
779
  n.header.set(s, i[s]);
756
780
  return r(n);
757
781
  };
758
- this.interceptors.push(e), window.localStorage.getItem("SL_GRPC_DEVTOOLS") === "true" ? this.interceptors.push(Ns()) : console.warn("SL GRPC DevTools is disabled. To enable, set SL_GRPC_DEVTOOLS to true in localStorage."), this.opts?.retryable && this.interceptors.push(Rs);
782
+ this.interceptors.push(e), window.localStorage.getItem("SL_GRPC_DEVTOOLS") === "true" ? this.interceptors.push(Ps()) : console.warn("SL GRPC DevTools is disabled. To enable, set SL_GRPC_DEVTOOLS to true in localStorage."), this.opts?.retryable && this.interceptors.push(Fs);
759
783
  };
760
784
  }
761
- const Fs = (t, e) => {
785
+ const Bs = (t, e) => {
762
786
  const { client: r, queryKey: n } = e.createPromiseClient(ei, {
763
787
  method: "retrieveEventId",
764
788
  params: [t]
@@ -776,7 +800,7 @@ const Fs = (t, e) => {
776
800
  }
777
801
  }
778
802
  });
779
- }, Us = (t, e) => {
803
+ }, Ms = (t, e) => {
780
804
  const { client: r, queryKey: n } = e.createPromiseClient(ft, { method: "getStream", params: [t] });
781
805
  return e.nanoquery.createFetcherStore(n, {
782
806
  fetcher: async (i, s, o) => o ? (await r.getStream({
@@ -784,14 +808,14 @@ const Fs = (t, e) => {
784
808
  // we are sure that id is a string
785
809
  })).data?.attributes : void 0
786
810
  });
787
- }, Vs = (t, e) => {
811
+ }, $s = (t, e) => {
788
812
  const { client: r, queryKey: n } = e.createPromiseClient(ei, { method: "summary", params: [t] });
789
813
  return e.nanoquery.createFetcherStore(n, {
790
814
  fetcher: async (i, s, o) => o ? (await r.summary({
791
815
  id: o
792
816
  })).data?.attributes : void 0
793
817
  });
794
- }, xs = (t, e) => {
818
+ }, qs = (t, e) => {
795
819
  const { queryKey: r, client: n } = e.createPromiseClient(Rr, { method: "me", params: [t] });
796
820
  return e.nanoquery.createFetcherStore(r, {
797
821
  fetcher: async () => {
@@ -801,15 +825,15 @@ const Fs = (t, e) => {
801
825
  return { data: s };
802
826
  }
803
827
  });
804
- }, Bs = (t) => {
828
+ }, js = (t) => {
805
829
  const { client: e, createRequestOptions: r } = t.createPromiseClient(Rr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
806
830
  return ({ userKey: i, schema: s, init: o, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: s, init: o, inviterKey: a }, { contextValues: n });
807
- }, Ms = (t, e) => {
831
+ }, Gs = (t, e) => {
808
832
  const { client: r, queryKey: n } = e.createPromiseClient(ft, { method: "get", params: [t] });
809
833
  return e.nanoquery.createFetcherStore(n, {
810
834
  fetcher: async () => (await r.get({})).data?.attributes
811
835
  });
812
- }, $s = (t, e) => {
836
+ }, Qs = (t, e) => {
813
837
  const { client: r, queryKey: n } = e.createPromiseClient(ft, { method: "getOrganization", params: [t] });
814
838
  return e.nanoquery.createFetcherStore(n, {
815
839
  fetcher: async () => {
@@ -820,7 +844,7 @@ const Fs = (t, e) => {
820
844
  } : void 0;
821
845
  }
822
846
  });
823
- }, qs = (t, e) => {
847
+ }, Ws = (t, e) => {
824
848
  const { client: r, queryKey: n } = e.createPromiseClient(ft, {
825
849
  method: "getOrganizationAdvertising",
826
850
  params: [t]
@@ -828,7 +852,7 @@ const Fs = (t, e) => {
828
852
  return e.nanoquery.createFetcherStore(n, {
829
853
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
830
854
  });
831
- }, js = (t, e, r) => {
855
+ }, Hs = (t, e, r) => {
832
856
  t.transport = new cn(e.host, {
833
857
  dedupeTime: 1e3 * 60 * 5,
834
858
  // 5 minutes
@@ -873,19 +897,19 @@ var we;
873
897
  (function(t) {
874
898
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
875
899
  })(we || (we = {}));
876
- const Gs = (t) => {
877
- const e = new ze(), r = new se(K(e.getExternalToken()), "userKey"), n = new se(K(e.getToken()), "userToken"), i = new ce(xs(n.getStore(), t), "user", ({ data: o, error: a, loading: u }, c) => {
900
+ const Ks = (t) => {
901
+ const e = new ze(), r = new se(K(e.getExternalToken()), "userKey"), n = new se(K(e.getToken()), "userToken"), i = new ce(qs(n.getStore(), t), "user", ({ data: o, error: a, loading: u }, c) => {
878
902
  if (!a)
879
903
  return o?.data?.id ? o.data.id : u === !1 ? void 0 : c;
880
- }), s = new ce(Ms(n.getStore(), t), "userSettings");
904
+ }), s = new ce(Gs(n.getStore(), t), "userSettings");
881
905
  return {
882
906
  userKey: r,
883
907
  userToken: n,
884
908
  user: i,
885
909
  userSettings: s
886
910
  };
887
- }, Qs = (t) => {
888
- const e = new se(K(void 0), "providerStreamId"), r = new ce(Fs(e.getStore(), t), "slStreamId", (s) => s?.data), n = new ce(Us(r.getAtomStore(), t), "streamSettings"), i = new ce(Vs(r.getAtomStore(), t), "streamSettings");
911
+ }, zs = (t) => {
912
+ const e = new se(K(void 0), "providerStreamId"), r = new ce(Bs(e.getStore(), t), "slStreamId", (s) => s?.data), n = new ce(Ms(r.getAtomStore(), t), "streamSettings"), i = new ce($s(r.getAtomStore(), t), "streamSettings");
889
913
  return r.getAtomStore().listen((s) => {
890
914
  (s === "" || s === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
891
915
  }), {
@@ -894,8 +918,8 @@ const Gs = (t) => {
894
918
  streamSettings: n,
895
919
  streamSummary: i
896
920
  };
897
- }, Ws = (t) => {
898
- const e = new se(K(void 0), "enabled"), r = new se(K(we.DISABLED), "status"), n = new ce($s(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(qs(n.getAtomStore(), t), "organizationAdvertising"), s = Gs(t), o = Qs(t);
921
+ }, Ys = (t) => {
922
+ const e = new se(K(void 0), "enabled"), r = new se(K(we.DISABLED), "status"), n = new ce(Qs(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Ws(n.getAtomStore(), t), "organizationAdvertising"), s = Ks(t), o = zs(t);
899
923
  return {
900
924
  enabled: e,
901
925
  status: r,
@@ -911,10 +935,10 @@ const Gs = (t) => {
911
935
  organizationAdvertising: i
912
936
  };
913
937
  };
914
- class Hs extends Mt {
938
+ class Xs extends Mt {
915
939
  stores;
916
940
  constructor(e) {
917
- const r = Ws(e), n = Ts(r);
941
+ const r = Ys(e), n = Ns(r);
918
942
  super(n, "core"), this.stores = r;
919
943
  }
920
944
  getValue() {
@@ -935,17 +959,17 @@ class Hs extends Mt {
935
959
  };
936
960
  unsubscribe = () => this.getStore().off();
937
961
  }
938
- const Ks = (t, e, r) => {
939
- t.store = new Hs(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 = () => {
962
+ const Js = (t, e, r) => {
963
+ t.store = new Xs(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 = () => {
940
964
  t.store.unsubscribe();
941
965
  }, r();
942
- }, zs = (t) => {
966
+ }, Zs = (t) => {
943
967
  const { client: e } = t.createPromiseClient(ti, { method: "list" });
944
968
  return (r) => e.list(r);
945
- }, li = (t) => {
969
+ }, di = (t) => {
946
970
  const { client: e } = t.createPromiseClient(ti, { method: "summary" });
947
971
  return (r) => e.summary(r);
948
- }, Ys = (t, e) => {
972
+ }, eo = (t, e) => {
949
973
  const { client: r, queryKey: n } = e.createPromiseClient(Rr, {
950
974
  method: "getFriends",
951
975
  params: [t]
@@ -961,7 +985,7 @@ const Ks = (t, e, r) => {
961
985
  }
962
986
  }
963
987
  });
964
- }, Xs = (t, e) => {
988
+ }, to = (t, e) => {
965
989
  const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "get", params: [t] });
966
990
  return e.nanoquery.createFetcherStore(n, {
967
991
  fetcher: async (i, s, o) => (await r.get({
@@ -970,7 +994,7 @@ const Ks = (t, e, r) => {
970
994
  revalidateInterval: 0,
971
995
  dedupeTime: 1e3 * 60 * 60
972
996
  });
973
- }, Js = (t, e, r) => {
997
+ }, ro = (t, e, r) => {
974
998
  const { client: n, queryKey: i } = r.createPromiseClient(re, {
975
999
  method: "syncQuestion",
976
1000
  params: [t, e ? "true" : ""]
@@ -991,20 +1015,20 @@ const Ks = (t, e, r) => {
991
1015
  // 10 minutes
992
1016
  revalidateInterval: 0
993
1017
  });
994
- }, Zs = async (t, e) => {
1018
+ }, no = async (t, e) => {
995
1019
  const { client: r } = e.createPromiseClient(re, { method: "item", params: [t] });
996
1020
  return (await r.item({
997
1021
  id: t
998
1022
  })).data;
999
- }, eo = (t, e) => {
1023
+ }, io = (t, e) => {
1000
1024
  const { client: r } = e.createStreamClient(re), n = pt({ eventId: t.get() || "", feedId: "" });
1001
1025
  return t.subscribe((s = "") => {
1002
1026
  n.set({ eventId: s, feedId: "" });
1003
1027
  }), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
1004
- }, to = (t, e) => {
1028
+ }, so = (t, e) => {
1005
1029
  const { client: r } = e.createStreamClient(re);
1006
1030
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
1007
- }, di = async (t, e) => {
1031
+ }, pi = async (t, e) => {
1008
1032
  const { client: r } = e.createPromiseClient(re, { method: "questionByUser", params: [t] });
1009
1033
  return (await r.questionByUser({
1010
1034
  questionId: t
@@ -1027,7 +1051,7 @@ const Ks = (t, e, r) => {
1027
1051
  });
1028
1052
  return e.storeCache.set(s, o), o;
1029
1053
  }
1030
- }, pi = async (t, e) => {
1054
+ }, fi = async (t, e) => {
1031
1055
  if (!t)
1032
1056
  return;
1033
1057
  const { client: r } = e.createPromiseClient(re, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
@@ -1037,7 +1061,7 @@ const Ks = (t, e, r) => {
1037
1061
  return;
1038
1062
  const { options: i, notification: s, ...o } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
1039
1063
  return { id: o.id, question: o, promotion: a, notification: s };
1040
- }, ro = (t, e, r, n, i, s, o) => {
1064
+ }, oo = (t, e, r, n, i, s, o) => {
1041
1065
  const { client: a, queryKey: u } = o.createPromiseClient(re, {
1042
1066
  method: "list",
1043
1067
  params: [t, e, s ? "true" : ""]
@@ -1071,7 +1095,7 @@ const Ks = (t, e, r) => {
1071
1095
  dedupeTime: 1 / 0,
1072
1096
  revalidateInterval: 0
1073
1097
  });
1074
- }, no = (t, e) => {
1098
+ }, ao = (t, e) => {
1075
1099
  const { client: r, queryKey: n } = e.createPromiseClient(re, {
1076
1100
  method: "list",
1077
1101
  params: [t]
@@ -1092,12 +1116,12 @@ const Ks = (t, e, r) => {
1092
1116
  }
1093
1117
  })).data?.[0];
1094
1118
  if (u.type === "promotion")
1095
- return pi(u.id, e);
1119
+ return fi(u.id, e);
1096
1120
  },
1097
1121
  dedupeTime: 1 / 0,
1098
1122
  revalidateInterval: 0
1099
1123
  });
1100
- }, io = (t, e, r, n, i) => {
1124
+ }, uo = (t, e, r, n, i) => {
1101
1125
  const { client: s, queryKey: o } = i.createPromiseClient(re, {
1102
1126
  method: "betPack",
1103
1127
  params: [t, e, r]
@@ -1147,7 +1171,7 @@ const Ks = (t, e, r) => {
1147
1171
  dedupeTime: 1 / 0,
1148
1172
  revalidateInterval: 0
1149
1173
  });
1150
- }, so = (t, e, r) => {
1174
+ }, co = (t, e, r) => {
1151
1175
  const n = Jr([e, r], () => {
1152
1176
  const a = e.get();
1153
1177
  if (!a)
@@ -1183,7 +1207,7 @@ var Ye;
1183
1207
  (function(t) {
1184
1208
  t.SHOWED = "showed", t.EVENT = "ev";
1185
1209
  })(Ye || (Ye = {}));
1186
- class oo extends it {
1210
+ class lo extends it {
1187
1211
  constructor() {
1188
1212
  super("advertisement");
1189
1213
  }
@@ -1196,7 +1220,7 @@ class oo extends it {
1196
1220
  };
1197
1221
  isEventFired = (e, r) => this.read(Ye.EVENT, r, e) === "true";
1198
1222
  }
1199
- const ao = (t) => {
1223
+ const po = (t) => {
1200
1224
  const e = t.data?.attributes?.question;
1201
1225
  if ((t.data?.attributes?.feedItem?.type === "promotion" ? t.data.attributes.feedItem : void 0) === void 0 || !e)
1202
1226
  return;
@@ -1207,7 +1231,7 @@ const ao = (t) => {
1207
1231
  notification: i,
1208
1232
  promotion: o
1209
1233
  };
1210
- }, At = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, uo = ({ gamOptions: t, gamBaseUrl: e }) => {
1234
+ }, At = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, fo = ({ gamOptions: t, gamBaseUrl: e }) => {
1211
1235
  const r = `${e}?`, n = [];
1212
1236
  for (const i in t) {
1213
1237
  const s = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), o = t[i];
@@ -1222,11 +1246,11 @@ const ao = (t) => {
1222
1246
  }
1223
1247
  }
1224
1248
  return r + n.join("&");
1225
- }, je = (t) => (t?.promotion?.type === F.INGAME_IAB11_LBAR || t?.promotion?.type === F.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, co = (t, e, r) => {
1249
+ }, je = (t) => (t?.promotion?.type === F.INGAME_IAB11_LBAR || t?.promotion?.type === F.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, ho = (t, e, r) => {
1226
1250
  let n = !1;
1227
- const i = r.transport, s = ne("advertisement"), o = new oo(), a = (S, E) => {
1251
+ const i = r.transport, s = ne("advertisement"), o = new lo(), a = (S, E) => {
1228
1252
  o.fireEvent(S, E);
1229
- }, u = (S, E) => o.isEventFired(S, E), c = te({}), l = no(t, i), d = (S) => {
1253
+ }, u = (S, E) => o.isEventFired(S, E), c = te({}), l = ao(t, i), d = (S) => {
1230
1254
  const E = c.get(), L = E.data?.question.id, I = E.data?.promotion?.type;
1231
1255
  if (!L)
1232
1256
  return;
@@ -1268,7 +1292,7 @@ const ao = (t) => {
1268
1292
  isViewed: !!o.isViewed(E.question.id),
1269
1293
  fireEvent: (L) => a(S, L),
1270
1294
  isEventFired: (L) => u(S, L)
1271
- }) : (c.setKey("loading", !0), pi(S, i).then((L) => c.set({
1295
+ }) : (c.setKey("loading", !0), fi(S, i).then((L) => c.set({
1272
1296
  loading: !1,
1273
1297
  error: void 0,
1274
1298
  data: L,
@@ -1291,7 +1315,7 @@ const ao = (t) => {
1291
1315
  c.subscribe((S, E) => {
1292
1316
  if (!(S.data?.id === E?.data?.id && S.isPaused !== E?.isPaused)) {
1293
1317
  if (S.data?.promotion?.type === F.EXTERNAL_AD && !S?.externalAd && S.data.promotion.adCampaigns?.desktopWebSettings) {
1294
- const L = uo(S.data.promotion.adCampaigns.desktopWebSettings);
1318
+ const L = fo(S.data.promotion.adCampaigns.desktopWebSettings);
1295
1319
  c.setKey("externalAd", { type: "gam", url: L });
1296
1320
  }
1297
1321
  S.data?.promotion && !S.isOpened && (B.emit("advertisement", {
@@ -1336,7 +1360,7 @@ const ao = (t) => {
1336
1360
  n || (n = !0, l.subscribe((S, E) => {
1337
1361
  S.data && (!E?.data || S.data.id !== E.data.id) && m(S.data.question.id, S.data);
1338
1362
  }), e.addListener("promotion", (S) => {
1339
- const E = ao(S);
1363
+ const E = po(S);
1340
1364
  if (E) {
1341
1365
  if (E.question.status === Z.RESOLVED) {
1342
1366
  b(E.question.id), s.debug({ promotion: E }, "resolved: %o");
@@ -1355,7 +1379,7 @@ var pe;
1355
1379
  (function(t) {
1356
1380
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.QUESTION_RECEIVED = "q-received", t.QUESTION_OPENED = "q-opened";
1357
1381
  })(pe || (pe = {}));
1358
- class lo extends it {
1382
+ class mo extends it {
1359
1383
  constructor() {
1360
1384
  super("gamification-session", window.sessionStorage);
1361
1385
  }
@@ -1364,10 +1388,10 @@ class lo extends it {
1364
1388
  };
1365
1389
  readValue = (e) => this.read(...e);
1366
1390
  }
1367
- class po extends it {
1391
+ class go extends it {
1368
1392
  sessionStorage;
1369
1393
  constructor() {
1370
- super("gamification"), this.sessionStorage = new lo();
1394
+ super("gamification"), this.sessionStorage = new mo();
1371
1395
  }
1372
1396
  saveQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => {
1373
1397
  this.write(pe.QUESTION_RECEIVED, n, e, r, i, "1");
@@ -1390,7 +1414,7 @@ var Ne;
1390
1414
  (function(t) {
1391
1415
  t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
1392
1416
  })(Ne || (Ne = {}));
1393
- class fo {
1417
+ class yo {
1394
1418
  /** sl event id */
1395
1419
  slStreamId;
1396
1420
  /** organization id */
@@ -1425,10 +1449,10 @@ class fo {
1425
1449
  transport;
1426
1450
  cancels = /* @__PURE__ */ new Set();
1427
1451
  constructor(e) {
1428
- this.transport = e.transport, this.log = ne("gamification-background"), this.storage = new po(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new se(K(void 0), "moderationId").getStore(), this.interactiveAllowed = new se(K(Ne.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new se(K(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(Xs(this.slStreamId, e.transport), "gamification:moderation");
1452
+ this.transport = e.transport, this.log = ne("gamification-background"), this.storage = new go(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new se(K(void 0), "moderationId").getStore(), this.interactiveAllowed = new se(K(Ne.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new se(K(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(to(this.slStreamId, e.transport), "gamification:moderation");
1429
1453
  const r = !!e.sdk.options.get().betPack;
1430
- this.feedList = new ce(ro(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new ce(io(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = Js(this.slStreamId, r, e.transport), this.openedQuestion = so(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
1431
- this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription = to(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
1454
+ this.feedList = new ce(oo(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new ce(uo(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = ro(this.slStreamId, r, e.transport), this.openedQuestion = co(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
1455
+ this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription = so(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
1432
1456
  const s = i.data?.attributes?.question;
1433
1457
  if (this.openedQuestion.updateExtendedQuestion(s), this.betPack && s?.type === N.PREDICTION && (s.status === Z.ACTIVE || s.status === Z.RESOLVED)) {
1434
1458
  const o = this.betPack.getValues().data?.data || {}, a = o?.[s.id];
@@ -1459,7 +1483,7 @@ class fo {
1459
1483
  }
1460
1484
  }
1461
1485
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1462
- })), this.feedSubscription = eo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
1486
+ })), this.feedSubscription = io(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
1463
1487
  const i = n.data?.attributes?.question;
1464
1488
  if (this.betPack && i?.type === N.PREDICTION && (i.status === Z.ACTIVE || i.status === Z.RESOLVED)) {
1465
1489
  const s = this.betPack.getValues().data?.data || {}, o = s?.[i.id];
@@ -1478,7 +1502,7 @@ class fo {
1478
1502
  }
1479
1503
  });
1480
1504
  else if (!o && Object.keys(s).length < 5) {
1481
- const a = await di(i.id, this.transport);
1505
+ const a = await pi(i.id, this.transport);
1482
1506
  this.betPack.getStore().mutate({
1483
1507
  timestamp: Date.now(),
1484
1508
  data: {
@@ -1531,7 +1555,7 @@ class fo {
1531
1555
  this.activeQuestionId.off();
1532
1556
  for (const n of this.cancels)
1533
1557
  n(), this.cancels.delete(n);
1534
- }), r || (this.advertisement = co(this.slStreamId, this.feedSubscription, e));
1558
+ }), r || (this.advertisement = ho(this.slStreamId, this.feedSubscription, e));
1535
1559
  }
1536
1560
  /**
1537
1561
  * Get id for notifications and link with current session
@@ -1561,7 +1585,7 @@ class fo {
1561
1585
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1562
1586
  };
1563
1587
  }
1564
- class ho {
1588
+ class bo {
1565
1589
  notificationsList;
1566
1590
  store;
1567
1591
  timeouts;
@@ -1666,7 +1690,7 @@ var Pt;
1666
1690
  (function(t) {
1667
1691
  t.OPENED = "opened";
1668
1692
  })(Pt || (Pt = {}));
1669
- class mo extends it {
1693
+ class vo extends it {
1670
1694
  constructor() {
1671
1695
  super("notification");
1672
1696
  }
@@ -1678,11 +1702,11 @@ class mo extends it {
1678
1702
  this.clear();
1679
1703
  };
1680
1704
  }
1681
- class go {
1705
+ class Ao {
1682
1706
  queue;
1683
1707
  storage;
1684
1708
  constructor(e = {}) {
1685
- this.storage = new mo(), this.queue = new ho({ concurrency: 1, animationDelay: 1600, ...e });
1709
+ this.storage = new vo(), this.queue = new bo({ concurrency: 1, animationDelay: 1600, ...e });
1686
1710
  }
1687
1711
  isViewed = (e) => this.storage.isOpened(e);
1688
1712
  add = (e) => {
@@ -1723,8 +1747,8 @@ class go {
1723
1747
  this.storage.setOpened(e);
1724
1748
  };
1725
1749
  }
1726
- const yo = (t, e, r) => {
1727
- t.notifications = new go(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1750
+ const So = (t, e, r) => {
1751
+ t.notifications = new Ao(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1728
1752
  t.notifications.queue.drain();
1729
1753
  }), r();
1730
1754
  };
@@ -1739,20 +1763,20 @@ const ln = async (t, e) => {
1739
1763
  } catch (s) {
1740
1764
  throw lt.from(s)?.code === ue.AlreadyExists ? new Error(tt.ALREADY_VOTED) : new Error(tt.UNKNOWN);
1741
1765
  }
1742
- }, fi = (t, e) => {
1766
+ }, hi = (t, e) => {
1743
1767
  const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1744
1768
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1745
- }, bo = {
1769
+ }, wo = {
1746
1770
  pageSize: 10
1747
- }, vo = (t, e, r, n, i) => {
1771
+ }, Eo = (t, e, r, n, i) => {
1748
1772
  let s = 0;
1749
- const o = K({ pageSize: bo.pageSize, page: 0 }), a = te({
1773
+ const o = K({ pageSize: wo.pageSize, page: 0 }), a = te({
1750
1774
  data: [],
1751
1775
  key: Date.now(),
1752
1776
  hasMore: !0,
1753
1777
  loading: void 0,
1754
1778
  error: void 0
1755
- }), u = zs(t), c = async () => {
1779
+ }), u = Zs(t), c = async () => {
1756
1780
  const p = e.get(), m = n?.getStore().get().data?.map((b) => b.slId) || [];
1757
1781
  if (p && m?.length) {
1758
1782
  const b = r.get();
@@ -1785,7 +1809,7 @@ const ln = async (t, e) => {
1785
1809
  };
1786
1810
  }), { $store: a, fetchMore: d, invalidate: l };
1787
1811
  };
1788
- class Ao extends it {
1812
+ class To extends it {
1789
1813
  get = this.read;
1790
1814
  set = this.write;
1791
1815
  del = this.remove;
@@ -1793,12 +1817,12 @@ class Ao extends it {
1793
1817
  super("deep-link-context", window.sessionStorage);
1794
1818
  }
1795
1819
  }
1796
- const dn = "sldl", $t = "sldl_uid", hi = "sldl_eid", mi = "sldl_e_eid", So = /* @__PURE__ */ new Set([$t, hi, mi]), pn = (t) => {
1820
+ const dn = "sldl", $t = "sldl_uid", mi = "sldl_eid", gi = "sldl_e_eid", Io = /* @__PURE__ */ new Set([$t, mi, gi]), pn = (t) => {
1797
1821
  const e = {}, r = {};
1798
1822
  for (const [n, i] of t)
1799
- So.has(n) ? e[n] = i : r[n] = i;
1823
+ Io.has(n) ? e[n] = i : r[n] = i;
1800
1824
  return { result: e, remain: r };
1801
- }, wo = ({ hash: t, search: e }) => {
1825
+ }, Oo = ({ hash: t, search: e }) => {
1802
1826
  if (t && t.includes(dn)) {
1803
1827
  const r = new URLSearchParams(t.substr(1));
1804
1828
  return { hash: pn(r) };
@@ -1815,10 +1839,10 @@ const dn = "sldl", $t = "sldl_uid", hi = "sldl_eid", mi = "sldl_e_eid", So = /*
1815
1839
  trace: (...t) => {
1816
1840
  fn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1817
1841
  }
1818
- }, Eo = (t, e) => {
1842
+ }, ko = (t, e) => {
1819
1843
  const { hash: r, search: n } = window.location;
1820
1844
  if (me.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1821
- const i = wo({ hash: r, search: n });
1845
+ const i = Oo({ hash: r, search: n });
1822
1846
  if (me.debug(i, "parse deep link result"), i) {
1823
1847
  const { hash: s, search: o } = i, { result: a, remain: u } = s || o;
1824
1848
  if (Object.keys(a).length !== 0) {
@@ -1837,8 +1861,8 @@ const dn = "sldl", $t = "sldl_uid", hi = "sldl_eid", mi = "sldl_e_eid", So = /*
1837
1861
  }
1838
1862
  }
1839
1863
  t.setValue("parsed", !0);
1840
- }, To = (t, e, r) => {
1841
- const n = new Ao(), i = n.get("sl-deep-link-store");
1864
+ }, No = (t, e, r) => {
1865
+ const n = new To(), i = n.get("sl-deep-link-store");
1842
1866
  let s = {};
1843
1867
  if (i)
1844
1868
  try {
@@ -1876,15 +1900,15 @@ const dn = "sldl", $t = "sldl_uid", hi = "sldl_eid", mi = "sldl_e_eid", So = /*
1876
1900
  console.error(c);
1877
1901
  }
1878
1902
  };
1879
- Eo(t.deepLink.$store, o), r();
1880
- }, Io = ne("bypass");
1881
- class Oo extends Es {
1903
+ ko(t.deepLink.$store, o), r();
1904
+ }, Lo = ne("bypass");
1905
+ class Co extends ks {
1882
1906
  $coreStore;
1883
1907
  deepLink;
1884
1908
  transport;
1885
1909
  bypassLogin;
1886
1910
  constructor(e, r, n) {
1887
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Bs(this.transport), this.connect();
1911
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = js(this.transport), this.connect();
1888
1912
  }
1889
1913
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1890
1914
  /**
@@ -1896,7 +1920,7 @@ class Oo extends Es {
1896
1920
  login = async (e, r) => {
1897
1921
  this.$coreStore.getValues().userKey.setValue(r);
1898
1922
  const { used: n, data: i } = this.deepLink.getDeepLinkData(), s = n ? "" : i?.[$t];
1899
- Io.debug({ inviterKey: s }, "login with inviterKey");
1923
+ Lo.debug({ inviterKey: s }, "login with inviterKey");
1900
1924
  const o = await this.bypassLogin({
1901
1925
  schema: e,
1902
1926
  userKey: r,
@@ -1966,8 +1990,8 @@ class Oo extends Es {
1966
1990
  });
1967
1991
  };
1968
1992
  }
1969
- const at = new ze(), ko = (t, e, r) => {
1970
- t.auth = new Oo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1993
+ const at = new ze(), Ro = (t, e, r) => {
1994
+ t.auth = new Co(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1971
1995
  n === we.READY && t.auth.reLogin();
1972
1996
  }), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
1973
1997
  if (!(at.getSchema() === n && at.getExternalToken() === i && t.transport.getHeader("authorization")))
@@ -1986,7 +2010,7 @@ const at = new ze(), ko = (t, e, r) => {
1986
2010
  trace: (...t) => {
1987
2011
  hn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1988
2012
  }
1989
- }, No = (t, e, r) => {
2013
+ }, Po = (t, e, r) => {
1990
2014
  t.videoPlayer = {
1991
2015
  controllers: /* @__PURE__ */ new Set()
1992
2016
  }, t.sdk.addVideoPlayerController = (n) => {
@@ -2004,13 +2028,13 @@ const at = new ze(), ko = (t, e, r) => {
2004
2028
  }
2005
2029
  }
2006
2030
  }, r();
2007
- }, Lo = {
2031
+ }, _o = {
2008
2032
  [N.FACTOID]: "insight",
2009
2033
  [N.POLL]: "poll",
2010
2034
  [N.TRIVIA]: "trivia",
2011
2035
  [N.PREDICTION]: "prediction",
2012
2036
  [N.TWEET]: "tweet"
2013
- }, Ge = (t) => t === F.INGAME_IAB11 || t === F.INGAME_IAB21 || t === F.NFL_SHOP_OVERLAY || t === F.SHOP_OVERLAY, Co = (t, e, r) => {
2037
+ }, Ge = (t) => t === F.INGAME_IAB11 || t === F.INGAME_IAB21 || t === F.NFL_SHOP_OVERLAY || t === F.SHOP_OVERLAY, Do = (t, e, r) => {
2014
2038
  t.sdk.uiState = te({}), t.ui = {
2015
2039
  enableAppNotification: function() {
2016
2040
  t.sdk.uiState.setKey("appNotification", !0);
@@ -2067,7 +2091,7 @@ const at = new ze(), ko = (t, e, r) => {
2067
2091
  };
2068
2092
  t.onQuestionActivate = ({ questionType: i, ...s }) => {
2069
2093
  if (t.ui.enableAppNotification(), t.ui.onContentActivate) {
2070
- const o = s.type || i && Lo[i] || "question";
2094
+ const o = s.type || i && _o[i] || "question";
2071
2095
  t.ui.onContentActivate({ ...s, type: o });
2072
2096
  }
2073
2097
  }, t.sdk.onMount({ name: "ui" }, () => {
@@ -2200,7 +2224,7 @@ const at = new ze(), ko = (t, e, r) => {
2200
2224
  s(), o();
2201
2225
  };
2202
2226
  }), r();
2203
- }, Ro = (t, e, r) => {
2227
+ }, Fo = (t, e, r) => {
2204
2228
  const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
2205
2229
  t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = te(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: o, clear: a }, u) => {
2206
2230
  if (i.has(o)) {
@@ -2226,7 +2250,7 @@ const at = new ze(), ko = (t, e, r) => {
2226
2250
  }, t.sdk.createEventSession = (o, a) => {
2227
2251
  a ? t.stores.slStreamId.getStore().set({ loading: !1, data: o }) : t.stores.providerStreamId.setValue(o);
2228
2252
  }, r();
2229
- }, Po = (t, e) => {
2253
+ }, Uo = (t, e) => {
2230
2254
  const { client: r, queryKey: n } = t.createPromiseClient(ft, {
2231
2255
  method: "generateDeepLink",
2232
2256
  params: e
@@ -2247,7 +2271,7 @@ const at = new ze(), ko = (t, e, r) => {
2247
2271
  // 24 hours
2248
2272
  revalidateInterval: 0
2249
2273
  });
2250
- }, _o = (t, { web: e, mobile: r }) => {
2274
+ }, Vo = (t, { web: e, mobile: r }) => {
2251
2275
  const { client: n } = t.createPromiseClient(ps, { method: "generate" });
2252
2276
  return n.generate({ web: e, mobile: r });
2253
2277
  }, mn = (t, e) => {
@@ -2255,13 +2279,13 @@ const at = new ze(), ko = (t, e, r) => {
2255
2279
  for (const [n, i] of Object.entries(e))
2256
2280
  r.append(n, i);
2257
2281
  return r.toString();
2258
- }, Do = (t, e, r, n) => {
2282
+ }, xo = (t, e, r, n) => {
2259
2283
  const i = te({});
2260
- return Cr(i, () => Po(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
2284
+ return Cr(i, () => Uo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
2261
2285
  const c = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, l = n.get() || "", d = e.get() || "", p = r.get() || "", m = {
2262
2286
  [$t]: l,
2263
- [hi]: d,
2264
- [mi]: p
2287
+ [mi]: d,
2288
+ [gi]: p
2265
2289
  };
2266
2290
  if (!u && c) {
2267
2291
  i.setKey("loading", !0);
@@ -2269,7 +2293,7 @@ const at = new ze(), ko = (t, e, r) => {
2269
2293
  b && g || g ? b = `?${mn(b, m)}` : g = `#${mn("", m)}`;
2270
2294
  const w = window.location.origin + window.location.pathname + b + g;
2271
2295
  try {
2272
- const T = await _o(t, { web: w, mobile: c });
2296
+ const T = await Vo(t, { web: w, mobile: c });
2273
2297
  i.set({
2274
2298
  data: T.data?.link,
2275
2299
  loading: !1
@@ -2289,7 +2313,7 @@ var W;
2289
2313
  (function(t) {
2290
2314
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
2291
2315
  })(W || (W = {}));
2292
- const Fo = (t, e, r, n) => {
2316
+ const Bo = (t, e, r, n) => {
2293
2317
  const { inplayGame: i } = t.featureSettings.get(), s = e.getCurrentSessionId({ prefix: "onboarding" });
2294
2318
  i && r.add({
2295
2319
  type: Ie.ONBOARDING,
@@ -2340,7 +2364,7 @@ const Fo = (t, e, r, n) => {
2340
2364
  organizationId: c,
2341
2365
  userId: u,
2342
2366
  eventId: l
2343
- }, W.Completed), fi(o, l));
2367
+ }, W.Completed), hi(o, l));
2344
2368
  return;
2345
2369
  }
2346
2370
  const p = e.moderation.getStore().value?.data, m = r.featureSettings.get().inplayGame;
@@ -2355,7 +2379,7 @@ const Fo = (t, e, r, n) => {
2355
2379
  let s = !!i?.skipOnboarding;
2356
2380
  const o = e.storage, a = K(W.Unset);
2357
2381
  a.subscribe((l) => {
2358
- l !== W.Unset && (l === W.Optional || l === W.Required ? s === !1 && (Fo(t, e, n, o), s = !0) : t.onboardingProcessed.set(!0), l === W.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
2382
+ l !== W.Unset && (l === W.Optional || l === W.Required ? s === !1 && (Bo(t, e, n, o), s = !0) : t.onboardingProcessed.set(!0), l === W.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
2359
2383
  userId: e.userId.get() || "",
2360
2384
  organizationId: e.organizationId.get() || "",
2361
2385
  eventId: e.slStreamId.get() || ""
@@ -2371,7 +2395,7 @@ const Fo = (t, e, r, n) => {
2371
2395
  }))), wt(a, e, t, n, o, u, r, i), { $store: a, submitInplay: async () => {
2372
2396
  const l = e.slStreamId.get();
2373
2397
  if (l) {
2374
- await fi(r, l), a.set(W.Completed), o.saveOnboardingStatus({
2398
+ await hi(r, l), a.set(W.Completed), o.saveOnboardingStatus({
2375
2399
  organizationId: e.organizationId.get() || "",
2376
2400
  userId: e.userId.get() || "",
2377
2401
  eventId: l
@@ -2383,8 +2407,8 @@ const Fo = (t, e, r, n) => {
2383
2407
  n.close(d);
2384
2408
  }
2385
2409
  } };
2386
- }, Uo = (t, e, r, n) => {
2387
- const i = te(void 0), s = li(n), o = async () => {
2410
+ }, Mo = (t, e, r, n) => {
2411
+ const i = te(void 0), s = di(n), o = async () => {
2388
2412
  const u = t.get(), c = e.get(), l = r ? r.getStore().get().data?.map((m) => m.slId) : [];
2389
2413
  if (!l || !u || !c)
2390
2414
  return;
@@ -2405,8 +2429,8 @@ const Fo = (t, e, r, n) => {
2405
2429
  u(), c?.(), l();
2406
2430
  };
2407
2431
  }), { $store: i, invalidate: a };
2408
- }, Vo = async (t, e, r, n, i) => {
2409
- const s = li(i), o = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], c = {
2432
+ }, $o = async (t, e, r, n, i) => {
2433
+ const s = di(i), o = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], c = {
2410
2434
  eventId: o,
2411
2435
  userId: n,
2412
2436
  leaderboardId: "",
@@ -2414,7 +2438,7 @@ const Fo = (t, e, r, n) => {
2414
2438
  };
2415
2439
  return (await s(c)).data?.attributes?.summary;
2416
2440
  }, yn = /* @__PURE__ */ new Set([N.POLL, N.PREDICTION, N.TRIVIA]);
2417
- class xo extends ui {
2441
+ class qo extends ci {
2418
2442
  /** user statistics (leaderboard panel) */
2419
2443
  userSummary;
2420
2444
  /** feed list (pick history) */
@@ -2455,9 +2479,9 @@ class xo extends ui {
2455
2479
  cancels = /* @__PURE__ */ new Set();
2456
2480
  onQuestionActivate;
2457
2481
  constructor(e, r, n) {
2458
- if (super(e, r), this.background = new fo(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 = K(!n.sdk.withAuth), this.leaderboardId = new se(K(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(q.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Do(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Uo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
2459
- this.friends = new ce(Ys(this.background.userId, n.transport), "gamification:friends"), this.openedUser = K(void 0);
2460
- const i = this.leaderboardList = vo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
2482
+ if (super(e, r), this.background = new yo(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 = K(!n.sdk.withAuth), this.leaderboardId = new se(K(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(q.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = xo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Mo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
2483
+ this.friends = new ce(eo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = K(void 0);
2484
+ const i = this.leaderboardList = Eo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
2461
2485
  this.cancels.add(this.userSummary.$store.listen((s, o) => {
2462
2486
  o?.summary && s?.summary && i.invalidate();
2463
2487
  }));
@@ -2507,7 +2531,7 @@ class xo extends ui {
2507
2531
  });
2508
2532
  await m.fetch();
2509
2533
  let g = m.get().data;
2510
- g || (g = await di(o, this.transport), m.mutate(g)), b(), window.requestAnimationFrame(() => {
2534
+ g || (g = await pi(o, this.transport), m.mutate(g)), b(), window.requestAnimationFrame(() => {
2511
2535
  m.invalidate();
2512
2536
  }), p || (p = g?.answers.find(({ youVoted: E }) => E)?.id);
2513
2537
  const w = a.find(({ correct: E }) => E), T = p ? a.find(({ id: E }) => E === p) : void 0, S = !!T?.correct;
@@ -2731,7 +2755,7 @@ class xo extends ui {
2731
2755
  openedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom
2732
2756
  } : void 0);
2733
2757
  };
2734
- getFeedItem = (e) => Zs(e, this.transport);
2758
+ getFeedItem = (e) => no(e, this.transport);
2735
2759
  isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
2736
2760
  closeQuestion = (e) => (e && (this.onQuestionActivate({
2737
2761
  stage: "deactivate",
@@ -2760,7 +2784,7 @@ class xo extends ui {
2760
2784
  }
2761
2785
  const n = { ...r };
2762
2786
  try {
2763
- const i = await Vo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2787
+ const i = await $o(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2764
2788
  i?.inTop !== void 0 && (this.leaderboardList?.$store.setKey("data", this.leaderboardList.$store.get().data?.map((s) => (s.userId === e && (s.inTop = i.inTop), s))), n.inTop = i.inTop);
2765
2789
  } catch (i) {
2766
2790
  console.error(i);
@@ -2893,15 +2917,15 @@ class xo extends ui {
2893
2917
  }
2894
2918
  };
2895
2919
  }
2896
- const Bo = {
2920
+ const jo = {
2897
2921
  [q.GAMES]: !0
2898
2922
  };
2899
- class Mo extends ui {
2923
+ class Go extends ci {
2900
2924
  constructor(e, r) {
2901
2925
  super(e, r);
2902
2926
  }
2903
2927
  }
2904
- const $o = (t, e, r) => t.type === q.GAMES ? new xo(t, e, r) : new Mo(t, e), qo = (t, e, r) => {
2928
+ const Qo = (t, e, r) => t.type === q.GAMES ? new qo(t, e, r) : new Go(t, e), Wo = (t, e, r) => {
2905
2929
  t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new se(K(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new se(K(q.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) => {
2906
2930
  t.sdk.initializeApp().then(() => {
2907
2931
  t.activeFeature.setValue(n);
@@ -2914,8 +2938,8 @@ const $o = (t, e, r) => t.type === q.GAMES ? new xo(t, e, r) : new Mo(t, e), qo
2914
2938
  s && s.delete(i), t.sdk.featuresList.setValue(s);
2915
2939
  }
2916
2940
  }, t.initFeature = (n, i = Se.ORGANIZATION) => {
2917
- if (n.type in Bo && !t.features.has(n.type)) {
2918
- const s = $o(n, i, t);
2941
+ if (n.type in jo && !t.features.has(n.type)) {
2942
+ const s = Qo(n, i, t);
2919
2943
  t.features.set(n.type, s);
2920
2944
  let o = t.sdk.featuresList.getValue();
2921
2945
  o ? o.add(n.type) : o = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(o));
@@ -2967,7 +2991,7 @@ const $o = (t, e, r) => t.type === q.GAMES ? new xo(t, e, r) : new Mo(t, e), qo
2967
2991
  };
2968
2992
  t.store.subscribe(i);
2969
2993
  }, r();
2970
- }, jo = (t, e, r) => {
2994
+ }, Ho = (t, e, r) => {
2971
2995
  const { client: n, queryKey: i } = r.createPromiseClient(fs, {
2972
2996
  method: "getMarketWithSeries",
2973
2997
  params: [t, e]
@@ -2985,15 +3009,15 @@ const $o = (t, e, r) => t.type === q.GAMES ? new xo(t, e, r) : new Mo(t, e), qo
2985
3009
  }
2986
3010
  }
2987
3011
  });
2988
- }, Go = (t) => {
3012
+ }, Ko = (t) => {
2989
3013
  const e = t.stores.slStreamId.getAtomStore(), r = t.stores.user.getAtomStore();
2990
- return jo(e, r, t.transport);
3014
+ return Ho(e, r, t.transport);
2991
3015
  };
2992
- class Qo extends ai {
3016
+ class zo extends ui {
2993
3017
  marketWithSeries;
2994
3018
  log;
2995
3019
  constructor(e) {
2996
- super(), this.log = ne("polymarket"), this.marketWithSeries = Go(e);
3020
+ super(), this.log = ne("polymarket"), this.marketWithSeries = Ko(e);
2997
3021
  }
2998
3022
  connect = () => {
2999
3023
  this.log.debug("connect");
@@ -3002,8 +3026,8 @@ class Qo extends ai {
3002
3026
  this.marketWithSeries.off(), this.log.debug("disconnect");
3003
3027
  };
3004
3028
  }
3005
- const Wo = (t, e, r) => {
3006
- t.sdk.polymarket = new Qo(t), t.sdk.onMount({ name: "polymarket" }, () => (t.sdk.polymarket.connect(), () => {
3029
+ const Yo = (t, e, r) => {
3030
+ t.sdk.polymarket = new zo(t), t.sdk.onMount({ name: "polymarket" }, () => (t.sdk.polymarket.connect(), () => {
3007
3031
  t.sdk.polymarket.disconnect();
3008
3032
  })), r();
3009
3033
  };
@@ -3011,22 +3035,22 @@ function Pr() {
3011
3035
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3012
3036
  return { id: t.id || null, adId: t.adId || null, sequence: t.sequence || null, apiFramework: t.apiFramework || null, universalAdIds: [], creativeExtensions: [] };
3013
3037
  }
3014
- const Ho = ["ADCATEGORIES", "ADCOUNT", "ADPLAYHEAD", "ADSERVINGID", "ADTYPE", "APIFRAMEWORKS", "APPBUNDLE", "ASSETURI", "BLOCKEDADCATEGORIES", "BREAKMAXADLENGTH", "BREAKMAXADS", "BREAKMAXDURATION", "BREAKMINADLENGTH", "BREAKMINDURATION", "BREAKPOSITION", "CLICKPOS", "CLICKTYPE", "CLIENTUA", "CONTENTID", "CONTENTPLAYHEAD", "CONTENTURI", "DEVICEIP", "DEVICEUA", "DOMAIN", "EXTENSIONS", "GDPRCONSENT", "IFA", "IFATYPE", "INVENTORYSTATE", "LATLONG", "LIMITADTRACKING", "MEDIAMIME", "MEDIAPLAYHEAD", "OMIDPARTNER", "PAGEURL", "PLACEMENTTYPE", "PLAYERCAPABILITIES", "PLAYERSIZE", "PLAYERSTATE", "PODSEQUENCE", "REGULATIONS", "SERVERSIDE", "SERVERUA", "TRANSACTIONID", "UNIVERSALADID", "VASTVERSIONS", "VERIFICATIONVENDORS"];
3038
+ const Xo = ["ADCATEGORIES", "ADCOUNT", "ADPLAYHEAD", "ADSERVINGID", "ADTYPE", "APIFRAMEWORKS", "APPBUNDLE", "ASSETURI", "BLOCKEDADCATEGORIES", "BREAKMAXADLENGTH", "BREAKMAXADS", "BREAKMAXDURATION", "BREAKMINADLENGTH", "BREAKMINDURATION", "BREAKPOSITION", "CLICKPOS", "CLICKTYPE", "CLIENTUA", "CONTENTID", "CONTENTPLAYHEAD", "CONTENTURI", "DEVICEIP", "DEVICEUA", "DOMAIN", "EXTENSIONS", "GDPRCONSENT", "IFA", "IFATYPE", "INVENTORYSTATE", "LATLONG", "LIMITADTRACKING", "MEDIAMIME", "MEDIAPLAYHEAD", "OMIDPARTNER", "PAGEURL", "PLACEMENTTYPE", "PLAYERCAPABILITIES", "PLAYERSIZE", "PLAYERSTATE", "PODSEQUENCE", "REGULATIONS", "SERVERSIDE", "SERVERUA", "TRANSACTIONID", "UNIVERSALADID", "VASTVERSIONS", "VERIFICATIONVENDORS"];
3015
3039
  function bn(t) {
3016
3040
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3017
- const n = [], i = yi(t);
3018
- !e.ERRORCODE || r.isCustomCode || /^[0-9]{3}$/.test(e.ERRORCODE) || (e.ERRORCODE = 900), e.CACHEBUSTING = Ai(Math.round(1e8 * Math.random())), e.TIMESTAMP = (/* @__PURE__ */ new Date()).toISOString(), e.RANDOM = e.random = e.CACHEBUSTING;
3019
- for (const s in e) e[s] = vi(e[s]);
3041
+ const n = [], i = bi(t);
3042
+ !e.ERRORCODE || r.isCustomCode || /^[0-9]{3}$/.test(e.ERRORCODE) || (e.ERRORCODE = 900), e.CACHEBUSTING = Si(Math.round(1e8 * Math.random())), e.TIMESTAMP = (/* @__PURE__ */ new Date()).toISOString(), e.RANDOM = e.random = e.CACHEBUSTING;
3043
+ for (const s in e) e[s] = Ai(e[s]);
3020
3044
  for (const s in i) {
3021
3045
  const o = i[s];
3022
- typeof o == "string" && n.push(gi(o, e));
3046
+ typeof o == "string" && n.push(yi(o, e));
3023
3047
  }
3024
3048
  return n;
3025
3049
  }
3026
- function gi(t, e) {
3050
+ function yi(t, e) {
3027
3051
  const r = (t = vn(t, e)).match(/[^[\]]+(?=])/g);
3028
3052
  if (!r) return t;
3029
- let n = r.filter((i) => Ho.indexOf(i) > -1);
3053
+ let n = r.filter((i) => Xo.indexOf(i) > -1);
3030
3054
  return n.length === 0 ? t : (n = n.reduce((i, s) => (i[s] = -1, i), {}), vn(t, n));
3031
3055
  }
3032
3056
  function vn(t, e) {
@@ -3037,27 +3061,27 @@ function vn(t, e) {
3037
3061
  }
3038
3062
  return r;
3039
3063
  }
3040
- function yi(t) {
3064
+ function bi(t) {
3041
3065
  return Array.isArray(t) ? t.map((e) => e && e.hasOwnProperty("url") ? e.url : e) : t;
3042
3066
  }
3043
3067
  function An(t) {
3044
3068
  return /^(https?:\/\/|\/\/)/.test(t);
3045
3069
  }
3046
3070
  function Sn(t, e) {
3047
- for (let r = 0; r < e.length; r++) if (bi(e[r], t)) return !0;
3071
+ for (let r = 0; r < e.length; r++) if (vi(e[r], t)) return !0;
3048
3072
  return !1;
3049
3073
  }
3050
- function bi(t, e) {
3074
+ function vi(t, e) {
3051
3075
  if (t && e) {
3052
3076
  const r = Object.getOwnPropertyNames(t), n = Object.getOwnPropertyNames(e);
3053
3077
  return r.length === n.length && t.id === e.id && t.url === e.url;
3054
3078
  }
3055
3079
  return !1;
3056
3080
  }
3057
- function vi(t) {
3081
+ function Ai(t) {
3058
3082
  return encodeURIComponent(t).replace(/[!'()*]/g, (e) => "%".concat(e.charCodeAt(0).toString(16)));
3059
3083
  }
3060
- function Ai(t) {
3084
+ function Si(t) {
3061
3085
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
3062
3086
  return t.toString().padStart(e, "0");
3063
3087
  }
@@ -3065,12 +3089,12 @@ const Ve = { track: function(t, e, r) {
3065
3089
  bn(t, e, r).forEach((n) => {
3066
3090
  typeof window < "u" && window !== null && (new Image().src = n);
3067
3091
  });
3068
- }, resolveURLTemplates: bn, extractURLsFromTemplates: yi, filterUrlTemplates: function(t) {
3092
+ }, resolveURLTemplates: bn, extractURLsFromTemplates: bi, filterUrlTemplates: function(t) {
3069
3093
  return t.reduce((e, r) => {
3070
3094
  const n = r.url || r;
3071
3095
  return An(n) ? e.validUrls.push(n) : e.invalidUrls.push(n), e;
3072
3096
  }, { validUrls: [], invalidUrls: [] });
3073
- }, containsTemplateObject: Sn, isTemplateObjectEqual: bi, encodeURIComponentRFC3986: vi, replaceUrlMacros: gi, isNumeric: function(t) {
3097
+ }, containsTemplateObject: Sn, isTemplateObjectEqual: vi, encodeURIComponentRFC3986: Ai, replaceUrlMacros: yi, isNumeric: function(t) {
3074
3098
  return !isNaN(parseFloat(t)) && isFinite(t);
3075
3099
  }, flatten: function t(e) {
3076
3100
  return e.reduce((r, n) => r.concat(Array.isArray(n) ? t(n) : n), []);
@@ -3080,7 +3104,7 @@ const Ve = { track: function(t, e, r) {
3080
3104
  return r.concat(n).reduce((i, s) => (Sn(s, i) || i.push(s), i), []);
3081
3105
  }, isValidTimeValue: function(t) {
3082
3106
  return Number.isFinite(t) && t >= -2;
3083
- }, addLeadingZeros: Ai, isValidUrl: An, isBrowserEnvironment: function() {
3107
+ }, addLeadingZeros: Si, isValidUrl: An, isBrowserEnvironment: function() {
3084
3108
  return typeof window < "u";
3085
3109
  }, formatMacrosValues: function(t) {
3086
3110
  return typeof t != "object" ? t : JSON.stringify(t);
@@ -3088,7 +3112,7 @@ const Ve = { track: function(t, e, r) {
3088
3112
  function wn(t) {
3089
3113
  return ["true", "TRUE", "True", "1"].includes(t);
3090
3114
  }
3091
- function Ko(t) {
3115
+ function Jo(t) {
3092
3116
  if (t == null) return -1;
3093
3117
  if (Ve.isNumeric(t)) return parseInt(t);
3094
3118
  const e = t.split(":");
@@ -3121,7 +3145,7 @@ const f = { childByName: function(t, e) {
3121
3145
  n && r.setAttribute(t, n);
3122
3146
  }, parseAttributes: function(t) {
3123
3147
  return Array.from(t.attributes).reduce((e, r) => (e[r.nodeName] = r.nodeValue, e), {});
3124
- }, parseDuration: Ko, getStandAloneAds: function() {
3148
+ }, parseDuration: Jo, getStandAloneAds: function() {
3125
3149
  return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).filter((t) => !parseInt(t.sequence, 10));
3126
3150
  }, getSortedAdPods: function() {
3127
3151
  return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).filter((t) => parseInt(t.sequence, 10)).sort((t, e) => t.sequence - e.sequence);
@@ -3159,7 +3183,7 @@ const f = { childByName: function(t, e) {
3159
3183
  a.length && (t.creatives = t.creatives.concat(a));
3160
3184
  }
3161
3185
  } };
3162
- function zo(t, e) {
3186
+ function Zo(t, e) {
3163
3187
  const r = function() {
3164
3188
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3165
3189
  const { id: i, adId: s, sequence: o, apiFramework: a } = Pr(n);
@@ -3189,7 +3213,7 @@ function zo(t, e) {
3189
3213
  return o && (i.adParameters = { value: f.parseNodeText(o), xmlEncoded: o.getAttribute("xmlEncoded") || null }), i;
3190
3214
  }), r;
3191
3215
  }
3192
- function Yo(t, e) {
3216
+ function ea(t, e) {
3193
3217
  let r;
3194
3218
  const n = function() {
3195
3219
  let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -3293,7 +3317,7 @@ function Yo(t, e) {
3293
3317
  }(u));
3294
3318
  }), n;
3295
3319
  }
3296
- function Xo(t, e) {
3320
+ function ta(t, e) {
3297
3321
  const r = function() {
3298
3322
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3299
3323
  const { id: i, adId: s, sequence: o, apiFramework: a } = Pr(n);
@@ -3322,11 +3346,11 @@ function Xo(t, e) {
3322
3346
  function En(t) {
3323
3347
  const e = [];
3324
3348
  return t.forEach((r) => {
3325
- const n = Si(r);
3349
+ const n = wi(r);
3326
3350
  n && e.push(n);
3327
3351
  }), e;
3328
3352
  }
3329
- function Si(t) {
3353
+ function wi(t) {
3330
3354
  if (t.nodeName === "#comment") return null;
3331
3355
  const e = { name: null, value: null, attributes: {}, children: [] }, r = t.attributes, n = t.childNodes;
3332
3356
  if (e.name = t.nodeName, t.attributes) {
@@ -3336,7 +3360,7 @@ function Si(t) {
3336
3360
  }
3337
3361
  }
3338
3362
  for (const s in n) if (n.hasOwnProperty(s)) {
3339
- const o = Si(n[s]);
3363
+ const o = wi(n[s]);
3340
3364
  o && e.children.push(o);
3341
3365
  }
3342
3366
  if (e.children.length === 0 || e.children.length === 1 && ["#cdata-section", "#text"].indexOf(e.children[0].name) >= 0) {
@@ -3346,7 +3370,7 @@ function Si(t) {
3346
3370
  return (i = e).value === null && Object.keys(i.attributes).length === 0 && i.children.length === 0 ? null : e;
3347
3371
  var i;
3348
3372
  }
3349
- function Jo(t) {
3373
+ function ra(t) {
3350
3374
  return t.getAttribute("AdID") || t.getAttribute("adID") || t.getAttribute("adId") || null;
3351
3375
  }
3352
3376
  const It = { Wrapper: { subElements: ["VASTAdTagURI", "Impression"] }, BlockedAdCategories: { attributes: ["authority"] }, InLine: { subElements: ["AdSystem", "AdTitle", "Impression", "AdServingId", "Creatives"] }, Category: { attributes: ["authority"] }, Pricing: { attributes: ["model", "currency"] }, Verification: { oneOfinLineResources: ["JavaScriptResource", "ExecutableResource"], attributes: ["vendor"] }, UniversalAdId: { attributes: ["idRegistry"] }, JavaScriptResource: { attributes: ["apiFramework", "browserOptional"] }, ExecutableResource: { attributes: ["apiFramework", "type"] }, Tracking: { attributes: ["event"] }, Creatives: { subElements: ["Creative"] }, Creative: { subElements: ["UniversalAdId"] }, Linear: { subElements: ["MediaFiles", "Duration"] }, MediaFiles: { subElements: ["MediaFile"] }, MediaFile: { attributes: ["delivery", "type", "width", "height"] }, Mezzanine: { attributes: ["delivery", "type", "width", "height"] }, NonLinear: { oneOfinLineResources: ["StaticResource", "IFrameResource", "HTMLResource"], attributes: ["width", "height"] }, Companion: { oneOfinLineResources: ["StaticResource", "IFrameResource", "HTMLResource"], attributes: ["width", "height"] }, StaticResource: { attributes: ["creativeType"] }, Icons: { subElements: ["Icon"] }, Icon: { oneOfinLineResources: ["StaticResource", "IFrameResource", "HTMLResource"] } };
@@ -3372,32 +3396,32 @@ function dt(t, e) {
3372
3396
  let { name: r, parentName: n, attributes: i, subElements: s, oneOfResources: o } = t, a = "Element '".concat(r, "'");
3373
3397
  a += i ? " missing required attribute(s) '".concat(i.join(", "), "' ") : s ? " missing required sub element(s) '".concat(s.join(", "), "' ") : o ? " must provide one of the following '".concat(o.join(", "), "' ") : " is empty", e("VAST-warning", { message: a, parentElement: n, specVersion: 4.1 });
3374
3398
  }
3375
- const Zo = { verifyRequiredValues: function t(e, r, n) {
3399
+ const na = { verifyRequiredValues: function t(e, r, n) {
3376
3400
  if (e && e.nodeName) if (e.nodeName === "InLine" && (n = !0), Tn(e, r), On(e)) {
3377
3401
  In(e, r, n);
3378
3402
  for (let i = 0; i < e.children.length; i++) t(e.children[i], r, n);
3379
3403
  } else f.parseNodeText(e).length === 0 && dt({ name: e.nodeName, parentName: e.parentNode.nodeName }, r);
3380
3404
  }, hasSubElements: On, emitMissingValueWarning: dt, verifyRequiredAttributes: Tn, verifyRequiredSubElements: In };
3381
- function ea(t, e) {
3405
+ function ia(t, e) {
3382
3406
  let { allowMultipleAds: r, followAdditionalWrappers: n } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3383
3407
  const i = Array.from(t.childNodes).filter((s) => {
3384
3408
  const o = s.nodeName.toLowerCase();
3385
3409
  return o === "inline" || n !== !1 && o === "wrapper";
3386
3410
  });
3387
3411
  for (const s of i) {
3388
- if (f.copyNodeAttribute("id", t, s), f.copyNodeAttribute("sequence", t, s), f.copyNodeAttribute("adType", t, s), s.nodeName === "Wrapper") return { ad: ra(s, e), type: "WRAPPER" };
3389
- if (s.nodeName === "InLine") return { ad: ta(s, e, { allowMultipleAds: r }), type: "INLINE" };
3412
+ if (f.copyNodeAttribute("id", t, s), f.copyNodeAttribute("sequence", t, s), f.copyNodeAttribute("adType", t, s), s.nodeName === "Wrapper") return { ad: oa(s, e), type: "WRAPPER" };
3413
+ if (s.nodeName === "InLine") return { ad: sa(s, e, { allowMultipleAds: r }), type: "INLINE" };
3390
3414
  const o = s.nodeName.toLowerCase();
3391
3415
  e("VAST-warning", { message: "<".concat(s.nodeName, o === "inline" ? "> must be written <InLine>" : "> must be written <Wrapper>"), wrongNode: s });
3392
3416
  }
3393
3417
  }
3394
- function ta(t, e) {
3418
+ function sa(t, e) {
3395
3419
  let { allowMultipleAds: r } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3396
- return r === !1 && t.getAttribute("sequence") ? null : wi(t, e);
3420
+ return r === !1 && t.getAttribute("sequence") ? null : Ei(t, e);
3397
3421
  }
3398
- function wi(t, e) {
3422
+ function Ei(t, e) {
3399
3423
  let r = [];
3400
- e && Zo.verifyRequiredValues(t, e);
3424
+ e && na.verifyRequiredValues(t, e);
3401
3425
  const n = Array.from(t.childNodes), i = function() {
3402
3426
  let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3403
3427
  return { id: s.id || null, sequence: s.sequence || null, adType: s.adType || null, adServingId: null, categories: [], expires: null, viewableImpression: [], system: null, title: null, description: null, advertiser: null, pricing: null, survey: null, errorURLTemplates: [], impressionURLTemplates: [], creatives: [], extensions: [], adVerifications: [], blockedAdCategories: [], followAdditionalWrappers: !0, allowMultipleAds: !1, fallbackOnNoAd: null };
@@ -3414,7 +3438,7 @@ function wi(t, e) {
3414
3438
  i.creatives = function(o) {
3415
3439
  const a = [];
3416
3440
  return o.forEach((u) => {
3417
- const c = { id: u.getAttribute("id") || null, adId: Jo(u), sequence: u.getAttribute("sequence") || null, apiFramework: u.getAttribute("apiFramework") || null }, l = [];
3441
+ const c = { id: u.getAttribute("id") || null, adId: ra(u), sequence: u.getAttribute("sequence") || null, apiFramework: u.getAttribute("apiFramework") || null }, l = [];
3418
3442
  let d;
3419
3443
  f.childrenByName(u, "UniversalAdId").forEach((m) => {
3420
3444
  const b = { idRegistry: m.getAttribute("idRegistry") || "unknown", value: f.parseNodeText(m) };
@@ -3427,13 +3451,13 @@ function wi(t, e) {
3427
3451
  let g;
3428
3452
  switch (b.nodeName) {
3429
3453
  case "Linear":
3430
- g = Yo(b, c);
3454
+ g = ea(b, c);
3431
3455
  break;
3432
3456
  case "NonLinearAds":
3433
- g = Xo(b, c);
3457
+ g = ta(b, c);
3434
3458
  break;
3435
3459
  case "CompanionAds":
3436
- g = zo(b, c);
3460
+ g = Zo(b, c);
3437
3461
  }
3438
3462
  g && (l && (g.universalAdIds = l), d && (g.creativeExtensions = d), a.push(g));
3439
3463
  }
@@ -3492,8 +3516,8 @@ function wi(t, e) {
3492
3516
  }
3493
3517
  }), r.length && (i.adVerifications = i.adVerifications.concat(r)), i;
3494
3518
  }
3495
- function ra(t, e) {
3496
- const r = wi(t, e), n = t.getAttribute("followAdditionalWrappers"), i = t.getAttribute("allowMultipleAds"), s = t.getAttribute("fallbackOnNoAd");
3519
+ function oa(t, e) {
3520
+ const r = Ei(t, e), n = t.getAttribute("followAdditionalWrappers"), i = t.getAttribute("allowMultipleAds"), s = t.getAttribute("fallbackOnNoAd");
3497
3521
  r.followAdditionalWrappers = !n || f.parseBoolean(n), r.allowMultipleAds = !!i && f.parseBoolean(i), r.fallbackOnNoAd = s ? f.parseBoolean(s) : null;
3498
3522
  let o = f.childByName(t, "VASTAdTagURI");
3499
3523
  if (o ? r.nextWrapperURL = f.parseNodeText(o) : (o = f.childByName(t, "VASTAdTagURL"), o && (r.nextWrapperURL = f.parseNodeText(f.childByName(o, "URL")))), r.creatives.forEach((a) => {
@@ -3537,7 +3561,7 @@ function kn(t) {
3537
3561
  }), e.push(n);
3538
3562
  }), e;
3539
3563
  }
3540
- class na {
3564
+ class aa {
3541
3565
  constructor() {
3542
3566
  this._handlers = [];
3543
3567
  }
@@ -3579,17 +3603,17 @@ class na {
3579
3603
  }
3580
3604
  }
3581
3605
  let Nn = 0, yr = 0;
3582
- const Ei = (t, e) => {
3606
+ const Ti = (t, e) => {
3583
3607
  !t || !e || t <= 0 || e <= 0 || (yr = (yr * Nn + 8 * t / e) / ++Nn);
3584
- }, ia = { ERRORCODE: 900, extensions: [] }, Ln = "VAST response version not supported";
3585
- class sa extends na {
3608
+ }, ua = { ERRORCODE: 900, extensions: [] }, Ln = "VAST response version not supported";
3609
+ class ca extends aa {
3586
3610
  constructor() {
3587
3611
  let { fetcher: e } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3588
3612
  super(), this.maxWrapperDepth = null, this.rootErrorURLTemplates = [], this.errorURLTemplates = [], this.remainingAds = [], this.parsingOptions = {}, this.fetcher = e || null, this.keepFailedAdPod = !1;
3589
3613
  }
3590
3614
  trackVastError(e, r) {
3591
3615
  for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), s = 2; s < n; s++) i[s - 2] = arguments[s];
3592
- this.emit("VAST-error", Object.assign({}, ia, r, ...i)), Ve.track(e, r);
3616
+ this.emit("VAST-error", Object.assign({}, ua, r, ...i)), Ve.track(e, r);
3593
3617
  }
3594
3618
  getErrorURLTemplates() {
3595
3619
  return this.rootErrorURLTemplates.concat(this.errorURLTemplates);
@@ -3599,7 +3623,7 @@ class sa extends na {
3599
3623
  }
3600
3624
  initParsingStatus() {
3601
3625
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3602
- this.maxWrapperDepth = e.wrapperLimit || 10, this.parsingOptions = { allowMultipleAds: e.allowMultipleAds }, this.keepFailedAdPod = e.keepFailedAdPod || !1, this.rootURL = "", this.resetParsingStatus(), Ei(e.byteLength, e.requestDuration);
3626
+ this.maxWrapperDepth = e.wrapperLimit || 10, this.parsingOptions = { allowMultipleAds: e.allowMultipleAds }, this.keepFailedAdPod = e.keepFailedAdPod || !1, this.rootURL = "", this.resetParsingStatus(), Ti(e.byteLength, e.requestDuration);
3603
3627
  }
3604
3628
  resetParsingStatus() {
3605
3629
  this.errorURLTemplates = [], this.rootErrorURLTemplates = [], this.vastVersion = null;
@@ -3638,7 +3662,7 @@ class sa extends na {
3638
3662
  } else if (m.nodeName === "Ad") {
3639
3663
  if (this.vastVersion && parseFloat(this.vastVersion) < 3) o = !0;
3640
3664
  else if (o === !1 && c.length > 1) break;
3641
- const b = ea(m, this.emit.bind(this), { allowMultipleAds: o, followAdditionalWrappers: a });
3665
+ const b = ia(m, this.emit.bind(this), { allowMultipleAds: o, followAdditionalWrappers: a });
3642
3666
  b.ad ? (c.push(b.ad), this.emit("VAST-ad-parsed", { type: b.type, url: i, wrapperDepth: s, adIndex: c.length - 1, vastVersion: d })) : this.trackVastError(this.getErrorURLTemplates(), { ERRORCODE: 101 });
3643
3667
  }
3644
3668
  }
@@ -3697,7 +3721,7 @@ class sa extends na {
3697
3721
  }
3698
3722
  }
3699
3723
  let be = null;
3700
- const oa = { data: {}, length: 0, getItem(t) {
3724
+ const la = { data: {}, length: 0, getItem(t) {
3701
3725
  return this.data[t];
3702
3726
  }, setItem(t, e) {
3703
3727
  this.data[t] = e, this.length = Object.keys(this.data).length;
@@ -3706,7 +3730,7 @@ const oa = { data: {}, length: 0, getItem(t) {
3706
3730
  }, clear() {
3707
3731
  this.data = {}, this.length = 0;
3708
3732
  } };
3709
- class aa {
3733
+ class da {
3710
3734
  constructor() {
3711
3735
  this.storage = this.initStorage();
3712
3736
  }
@@ -3717,7 +3741,7 @@ class aa {
3717
3741
  } catch {
3718
3742
  be = null;
3719
3743
  }
3720
- return be && !this.isStorageDisabled(be) || (be = oa, be.clear()), be;
3744
+ return be && !this.isStorageDisabled(be) || (be = la, be.clear()), be;
3721
3745
  }
3722
3746
  isStorageDisabled(e) {
3723
3747
  const r = "__VASTStorage__";
@@ -3741,7 +3765,7 @@ class aa {
3741
3765
  return this.storage.clear();
3742
3766
  }
3743
3767
  }
3744
- const br = 12e4, ua = { get: async function(t, e) {
3768
+ const br = 12e4, pa = { get: async function(t, e) {
3745
3769
  try {
3746
3770
  const r = new AbortController(), n = setTimeout(() => {
3747
3771
  throw r.abort(), new Error("URLHandler: Request timed out after ".concat(e.timeout || br, " ms (408)"));
@@ -3759,13 +3783,13 @@ const br = 12e4, ua = { get: async function(t, e) {
3759
3783
  return { error: r, statusCode: r.name === "AbortError" ? 408 : null };
3760
3784
  }
3761
3785
  } };
3762
- class ca {
3786
+ class fa {
3763
3787
  constructor() {
3764
3788
  this.URLTemplateFilters = [];
3765
3789
  }
3766
3790
  setOptions() {
3767
3791
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3768
- this.urlHandler = e.urlHandler || e.urlhandler || ua, this.fetchingOptions = { ...e.fetchOptions, timeout: e.timeout || br, withCredentials: !!e.withCredentials };
3792
+ this.urlHandler = e.urlHandler || e.urlhandler || pa, this.fetchingOptions = { ...e.fetchOptions, timeout: e.timeout || br, withCredentials: !!e.withCredentials };
3769
3793
  }
3770
3794
  addURLTemplateFilter(e) {
3771
3795
  typeof e == "function" && this.URLTemplateFilters.push(e);
@@ -3787,14 +3811,14 @@ class ca {
3787
3811
  n = p(n);
3788
3812
  }), s("VAST-resolving", { url: n, previousUrl: a, wrapperDepth: o, maxWrapperDepth: i, timeout: this.fetchingOptions.timeout, wrapperAd: u });
3789
3813
  const l = await this.urlHandler.get(n, this.fetchingOptions), d = Math.round(Date.now() - c);
3790
- if (s("VAST-resolved", { url: n, previousUrl: a, wrapperDepth: o, error: l?.error || null, duration: d, statusCode: l?.statusCode || null, ...l?.details }), Ei(l == null || (r = l.details) === null || r === void 0 ? void 0 : r.byteLength, d), l.error) throw new Error(l.error);
3814
+ if (s("VAST-resolved", { url: n, previousUrl: a, wrapperDepth: o, error: l?.error || null, duration: d, statusCode: l?.statusCode || null, ...l?.details }), Ti(l == null || (r = l.details) === null || r === void 0 ? void 0 : r.byteLength, d), l.error) throw new Error(l.error);
3791
3815
  return l.xml;
3792
3816
  }
3793
3817
  }
3794
- class la {
3818
+ class ha {
3795
3819
  constructor() {
3796
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : new aa();
3797
- this.cappingFreeLunch = e, this.cappingMinimumTimeInterval = r, this.fetcher = new ca(), this.vastParser = new sa({ fetcher: this.fetcher }), this.storage = n, this.lastSuccessfulAd === void 0 && (this.lastSuccessfulAd = 0), this.totalCalls === void 0 && (this.totalCalls = 0), this.totalCallsTimeout === void 0 && (this.totalCallsTimeout = 0);
3820
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : new da();
3821
+ this.cappingFreeLunch = e, this.cappingMinimumTimeInterval = r, this.fetcher = new fa(), this.vastParser = new ca({ fetcher: this.fetcher }), this.storage = n, this.lastSuccessfulAd === void 0 && (this.lastSuccessfulAd = 0), this.totalCalls === void 0 && (this.totalCalls = 0), this.totalCallsTimeout === void 0 && (this.totalCallsTimeout = 0);
3798
3822
  }
3799
3823
  addURLTemplateFilter(e) {
3800
3824
  this.fetcher.addURLTemplateFilter(e);
@@ -3854,10 +3878,10 @@ class la {
3854
3878
  });
3855
3879
  }
3856
3880
  }
3857
- const da = new la(), Yt = ne("ui:gam-static"), Cn = (t) => new Promise((e, r) => {
3881
+ const ma = new ha(), Yt = ne("ui:gam-static"), Cn = (t) => new Promise((e, r) => {
3858
3882
  const n = new Image();
3859
3883
  n.onload = () => e(t), n.onerror = () => r(), n.src = t;
3860
- }), pa = (t) => (e, r, n) => t.transport.nanoquery.createFetcherStore([e, r], {
3884
+ }), ga = (t) => (e, r, n) => t.transport.nanoquery.createFetcherStore([e, r], {
3861
3885
  dedupeTime: n.prefetch ? n.refetchInterval : 1 / 0,
3862
3886
  revalidateInterval: n.refetchInterval > 0 ? n.refetchInterval : 0,
3863
3887
  fetcher: async (i) => {
@@ -3868,7 +3892,7 @@ const da = new la(), Yt = ne("ui:gam-static"), Cn = (t) => new Promise((e, r) =>
3868
3892
  payload: {}
3869
3893
  });
3870
3894
  try {
3871
- const o = (await da.get(i)).ads.find((a) => a.creatives.length > 0);
3895
+ const o = (await ma.get(i)).ads.find((a) => a.creatives.length > 0);
3872
3896
  if (o) {
3873
3897
  const a = o.id || "";
3874
3898
  Yt.debug(o, "validAd");
@@ -3918,14 +3942,14 @@ const da = new la(), Yt = ne("ui:gam-static"), Cn = (t) => new Promise((e, r) =>
3918
3942
  }
3919
3943
  }
3920
3944
  });
3921
- class fa extends ai {
3945
+ class ya extends ui {
3922
3946
  getExternalPauseAd;
3923
3947
  externalPauseAdStores = /* @__PURE__ */ new Map();
3924
3948
  externalPauseAdEnabled = /* @__PURE__ */ new Map();
3925
3949
  log;
3926
3950
  constructor(e) {
3927
3951
  super(), this.log = ne("advertisement");
3928
- const r = pa(e);
3952
+ const r = ga(e);
3929
3953
  this.getExternalPauseAd = (n, i) => {
3930
3954
  if (this.externalPauseAdStores.has(n)) {
3931
3955
  const a = this.externalPauseAdEnabled.get(n), u = this.externalPauseAdStores.get(n), c = a.get() === !1 && i.$enabled === !0;
@@ -3948,12 +3972,12 @@ class fa extends ai {
3948
3972
  }), this.externalPauseAdEnabled.clear(), this.externalPauseAdStores.clear();
3949
3973
  };
3950
3974
  }
3951
- const ha = (t, e, r) => {
3952
- t.sdk.advertisement = new fa(t), t.sdk.onMount({ name: "advertisement" }, () => (t.sdk.advertisement.connect(), () => {
3975
+ const ba = (t, e, r) => {
3976
+ t.sdk.advertisement = new ya(t), t.sdk.onMount({ name: "advertisement" }, () => (t.sdk.advertisement.connect(), () => {
3953
3977
  t.sdk.advertisement.disconnect();
3954
3978
  })), r();
3955
3979
  };
3956
- class ma {
3980
+ class va {
3957
3981
  analytics;
3958
3982
  constructor(e) {
3959
3983
  this.analytics = e, this.analytics.onConnect(() => {
@@ -3989,7 +4013,7 @@ class ma {
3989
4013
  });
3990
4014
  };
3991
4015
  }
3992
- class ga {
4016
+ class Aa {
3993
4017
  analytics;
3994
4018
  constructor(e) {
3995
4019
  this.analytics = e, this.analytics.onConnect(() => {
@@ -4026,7 +4050,7 @@ class ga {
4026
4050
  });
4027
4051
  };
4028
4052
  }
4029
- const ya = {
4053
+ const Sa = {
4030
4054
  [F.UNSET]: G.UNSET,
4031
4055
  [F.INGAME_IAB21]: G.PROMOTION_INGAME_IAB21,
4032
4056
  [F.INGAME_IAB21_SIDEBAR]: G.PROMOTION_INGAME_IAB21,
@@ -4050,12 +4074,12 @@ const ya = {
4050
4074
  [F.STANDARD]: G.UNSET,
4051
4075
  [F.SHOP]: G.UNSET,
4052
4076
  [F.NFL_SHOP]: G.UNSET
4053
- }, vr = (t) => t ? ya[t] : G.UNSET, ba = {
4077
+ }, vr = (t) => t ? Sa[t] : G.UNSET, wa = {
4054
4078
  25: _.AD_VIDEO_Q25,
4055
4079
  50: _.AD_VIDEO_Q50,
4056
4080
  75: _.AD_VIDEO_Q75
4057
4081
  };
4058
- class va {
4082
+ class Ea {
4059
4083
  analytics;
4060
4084
  constructor(e) {
4061
4085
  this.analytics = e, this.analytics.onConnect(() => {
@@ -4259,7 +4283,7 @@ class va {
4259
4283
  common: {
4260
4284
  ...this.analytics.commonStore.getValues(),
4261
4285
  topicId: e,
4262
- kind: ba[r],
4286
+ kind: wa[r],
4263
4287
  topicType: V.POLLS_PROMOTION,
4264
4288
  topicSubType: n
4265
4289
  },
@@ -4361,7 +4385,7 @@ const ut = {
4361
4385
  [N.TWEET]: V.POLLS_TWITTER
4362
4386
  };
4363
4387
  N.UNSET + "", ve.UNSET, N.FACTOID + "", ve.POLLS, N.POLL + "", ve.POLLS, N.PREDICTION + "", ve.POLLS, N.PROMOTION + "", ve.POLLS, N.TRIVIA + "", ve.POLLS, N.TWEET + "", ve.POLLS;
4364
- const Aa = {
4388
+ const Ta = {
4365
4389
  [q.UNSET]: z.UNSET,
4366
4390
  [q.INPLAY]: z.INPLAY,
4367
4391
  [q.MESSAGING]: z.MESSAGING,
@@ -4381,7 +4405,7 @@ const Aa = {
4381
4405
  [q.HIGHLIGHTS]: z.HIGHLIGHTS,
4382
4406
  [q.PUBLIC_CHAT]: z.PUBLIC_CHAT
4383
4407
  };
4384
- class Sa {
4408
+ class Ia {
4385
4409
  analytics;
4386
4410
  constructor(e) {
4387
4411
  this.analytics = e, this.analytics.onConnect(() => {
@@ -4443,7 +4467,7 @@ class Sa {
4443
4467
  });
4444
4468
  };
4445
4469
  }
4446
- class wa {
4470
+ class Oa {
4447
4471
  analytics;
4448
4472
  constructor(e) {
4449
4473
  this.analytics = e, this.analytics.onConnect(() => {
@@ -4527,7 +4551,7 @@ class wa {
4527
4551
  });
4528
4552
  };
4529
4553
  }
4530
- const Ea = ({ transport: t, $commonStore: e }) => {
4554
+ const ka = ({ transport: t, $commonStore: e }) => {
4531
4555
  let r;
4532
4556
  const n = K(!1), i = 3e4, { client: s, queryKey: o } = t.createPromiseClient(ri, {
4533
4557
  method: "send",
@@ -4565,7 +4589,7 @@ const Ea = ({ transport: t, $commonStore: e }) => {
4565
4589
  Ee.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, l();
4566
4590
  } };
4567
4591
  }, Ee = ne("analytics");
4568
- class Ta {
4592
+ class Na {
4569
4593
  commonStore;
4570
4594
  notifications;
4571
4595
  polls;
@@ -4578,7 +4602,7 @@ class Ta {
4578
4602
  listenersCancels;
4579
4603
  connected = !1;
4580
4604
  constructor(e) {
4581
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new De(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = Ea({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Sa(this), this.polls = new wa(this), this.invitation = new ma(this), this.interactions = new ga(this), this.advertisement = new va(this);
4605
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new De(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ka({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Ia(this), this.polls = new Oa(this), this.invitation = new va(this), this.interactions = new Aa(this), this.advertisement = new Ea(this);
4582
4606
  const { client: r } = e.analyticsTransport.createPromiseClient(ri, {
4583
4607
  method: "send"
4584
4608
  });
@@ -4608,7 +4632,7 @@ class Ta {
4608
4632
  this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
4609
4633
  this.writeCommon("eventId", r);
4610
4634
  })), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
4611
- r && this.writeCommon("category", Aa[r]), r !== q.UNSET ? this.writeCommon("overlaySessionId", Ke()) : this.writeCommon("overlaySessionId", "");
4635
+ r && this.writeCommon("category", Ta[r]), r !== q.UNSET ? this.writeCommon("overlaySessionId", Ke()) : this.writeCommon("overlaySessionId", "");
4612
4636
  })), this.onConnect(() => {
4613
4637
  const r = (n) => {
4614
4638
  if (!n.slEventBus)
@@ -4631,19 +4655,19 @@ class Ta {
4631
4655
  }));
4632
4656
  };
4633
4657
  }
4634
- const Ia = (t, e, r) => {
4635
- t.analytics = new Ta(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
4658
+ const La = (t, e, r) => {
4659
+ t.analytics = new Na(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
4636
4660
  n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId", Ke());
4637
4661
  }, () => {
4638
4662
  t.analytics.disconnect();
4639
4663
  })), r();
4640
4664
  };
4641
4665
  var _r = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4642
- function Oa(t) {
4666
+ function Ca(t) {
4643
4667
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
4644
4668
  }
4645
4669
  var Dr = { exports: {} }, Fr = { exports: {} };
4646
- function ka(t) {
4670
+ function Ra(t) {
4647
4671
  var e = new t(), r = e;
4648
4672
  function n() {
4649
4673
  var s = e;
@@ -4657,11 +4681,11 @@ function ka(t) {
4657
4681
  release: i
4658
4682
  };
4659
4683
  }
4660
- var Na = ka, La = Na;
4661
- function Ti(t, e, r) {
4684
+ var Pa = Ra, _a = Pa;
4685
+ function Ii(t, e, r) {
4662
4686
  if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
4663
4687
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
4664
- var n = La(Ca), i = null, s = null, o = 0, a = null, u = {
4688
+ var n = _a(Da), i = null, s = null, o = 0, a = null, u = {
4665
4689
  push: g,
4666
4690
  drain: ie,
4667
4691
  saturated: ie,
@@ -4743,7 +4767,7 @@ function Ti(t, e, r) {
4743
4767
  }
4744
4768
  function ie() {
4745
4769
  }
4746
- function Ca() {
4770
+ function Da() {
4747
4771
  this.value = null, this.callback = ie, this.next = null, this.release = ie, this.context = null, this.errorHandler = null;
4748
4772
  var t = this;
4749
4773
  this.worked = function(r, n) {
@@ -4751,14 +4775,14 @@ function Ca() {
4751
4775
  t.value = null, t.callback = ie, t.errorHandler && s(r, o), i.call(t.context, r, n), t.release(t);
4752
4776
  };
4753
4777
  }
4754
- function Ra(t, e, r) {
4778
+ function Fa(t, e, r) {
4755
4779
  typeof t == "function" && (r = e, e = t, t = null);
4756
4780
  function n(l, d) {
4757
4781
  e.call(this, l).then(function(p) {
4758
4782
  d(null, p);
4759
4783
  }, d);
4760
4784
  }
4761
- var i = Ti(t, n, r), s = i.push, o = i.unshift;
4785
+ var i = Ii(t, n, r), s = i.push, o = i.unshift;
4762
4786
  return i.push = a, i.unshift = u, i.drained = c, i;
4763
4787
  function a(l) {
4764
4788
  var d = new Promise(function(p, m) {
@@ -4797,9 +4821,9 @@ function Ra(t, e, r) {
4797
4821
  return d;
4798
4822
  }
4799
4823
  }
4800
- Fr.exports = Ti;
4801
- Fr.exports.promise = Ra;
4802
- var Ii = Fr.exports, Ur = { exports: {} }, Ze = typeof Reflect == "object" ? Reflect : null, Rn = Ze && typeof Ze.apply == "function" ? Ze.apply : function(e, r, n) {
4824
+ Fr.exports = Ii;
4825
+ Fr.exports.promise = Fa;
4826
+ var Oi = Fr.exports, Ur = { exports: {} }, Ze = typeof Reflect == "object" ? Reflect : null, Rn = Ze && typeof Ze.apply == "function" ? Ze.apply : function(e, r, n) {
4803
4827
  return Function.prototype.apply.call(e, r, n);
4804
4828
  }, Ot;
4805
4829
  Ze && typeof Ze.ownKeys == "function" ? Ot = Ze.ownKeys : Object.getOwnPropertySymbols ? Ot = function(e) {
@@ -4807,17 +4831,17 @@ Ze && typeof Ze.ownKeys == "function" ? Ot = Ze.ownKeys : Object.getOwnPropertyS
4807
4831
  } : Ot = function(e) {
4808
4832
  return Object.getOwnPropertyNames(e);
4809
4833
  };
4810
- function Pa(t) {
4834
+ function Ua(t) {
4811
4835
  console && console.warn && console.warn(t);
4812
4836
  }
4813
- var Oi = Number.isNaN || function(e) {
4837
+ var ki = Number.isNaN || function(e) {
4814
4838
  return e !== e;
4815
4839
  };
4816
4840
  function M() {
4817
4841
  M.init.call(this);
4818
4842
  }
4819
4843
  Ur.exports = M;
4820
- Ur.exports.once = Ua;
4844
+ Ur.exports.once = Ma;
4821
4845
  M.EventEmitter = M;
4822
4846
  M.prototype._events = void 0;
4823
4847
  M.prototype._eventsCount = 0;
@@ -4833,7 +4857,7 @@ Object.defineProperty(M, "defaultMaxListeners", {
4833
4857
  return Pn;
4834
4858
  },
4835
4859
  set: function(t) {
4836
- if (typeof t != "number" || t < 0 || Oi(t))
4860
+ if (typeof t != "number" || t < 0 || ki(t))
4837
4861
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
4838
4862
  Pn = t;
4839
4863
  }
@@ -4842,15 +4866,15 @@ M.init = function() {
4842
4866
  (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;
4843
4867
  };
4844
4868
  M.prototype.setMaxListeners = function(e) {
4845
- if (typeof e != "number" || e < 0 || Oi(e))
4869
+ if (typeof e != "number" || e < 0 || ki(e))
4846
4870
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
4847
4871
  return this._maxListeners = e, this;
4848
4872
  };
4849
- function ki(t) {
4873
+ function Ni(t) {
4850
4874
  return t._maxListeners === void 0 ? M.defaultMaxListeners : t._maxListeners;
4851
4875
  }
4852
4876
  M.prototype.getMaxListeners = function() {
4853
- return ki(this);
4877
+ return Ni(this);
4854
4878
  };
4855
4879
  M.prototype.emit = function(e) {
4856
4880
  for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
@@ -4872,11 +4896,11 @@ M.prototype.emit = function(e) {
4872
4896
  if (typeof u == "function")
4873
4897
  Rn(u, this, r);
4874
4898
  else
4875
- for (var c = u.length, l = Pi(u, c), n = 0; n < c; ++n)
4899
+ for (var c = u.length, l = _i(u, c), n = 0; n < c; ++n)
4876
4900
  Rn(l[n], this, r);
4877
4901
  return !0;
4878
4902
  };
4879
- function Ni(t, e, r, n) {
4903
+ function Li(t, e, r, n) {
4880
4904
  var i, s, o;
4881
4905
  if (qt(r), s = t._events, s === void 0 ? (s = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (s.newListener !== void 0 && (t.emit(
4882
4906
  "newListener",
@@ -4884,33 +4908,33 @@ function Ni(t, e, r, n) {
4884
4908
  r.listener ? r.listener : r
4885
4909
  ), s = t._events), o = s[e]), o === void 0)
4886
4910
  o = s[e] = r, ++t._eventsCount;
4887
- else if (typeof o == "function" ? o = s[e] = n ? [r, o] : [o, r] : n ? o.unshift(r) : o.push(r), i = ki(t), i > 0 && o.length > i && !o.warned) {
4911
+ else if (typeof o == "function" ? o = s[e] = n ? [r, o] : [o, r] : n ? o.unshift(r) : o.push(r), i = Ni(t), i > 0 && o.length > i && !o.warned) {
4888
4912
  o.warned = !0;
4889
4913
  var a = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
4890
- a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = o.length, Pa(a);
4914
+ a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = o.length, Ua(a);
4891
4915
  }
4892
4916
  return t;
4893
4917
  }
4894
4918
  M.prototype.addListener = function(e, r) {
4895
- return Ni(this, e, r, !1);
4919
+ return Li(this, e, r, !1);
4896
4920
  };
4897
4921
  M.prototype.on = M.prototype.addListener;
4898
4922
  M.prototype.prependListener = function(e, r) {
4899
- return Ni(this, e, r, !0);
4923
+ return Li(this, e, r, !0);
4900
4924
  };
4901
- function _a() {
4925
+ function Va() {
4902
4926
  if (!this.fired)
4903
4927
  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);
4904
4928
  }
4905
- function Li(t, e, r) {
4906
- var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = _a.bind(n);
4929
+ function Ci(t, e, r) {
4930
+ var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Va.bind(n);
4907
4931
  return i.listener = r, n.wrapFn = i, i;
4908
4932
  }
4909
4933
  M.prototype.once = function(e, r) {
4910
- return qt(r), this.on(e, Li(this, e, r)), this;
4934
+ return qt(r), this.on(e, Ci(this, e, r)), this;
4911
4935
  };
4912
4936
  M.prototype.prependOnceListener = function(e, r) {
4913
- return qt(r), this.prependListener(e, Li(this, e, r)), this;
4937
+ return qt(r), this.prependListener(e, Ci(this, e, r)), this;
4914
4938
  };
4915
4939
  M.prototype.removeListener = function(e, r) {
4916
4940
  var n, i, s, o, a;
@@ -4928,7 +4952,7 @@ M.prototype.removeListener = function(e, r) {
4928
4952
  }
4929
4953
  if (s < 0)
4930
4954
  return this;
4931
- s === 0 ? n.shift() : Da(n, s), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
4955
+ s === 0 ? n.shift() : xa(n, s), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
4932
4956
  }
4933
4957
  return this;
4934
4958
  };
@@ -4952,24 +4976,24 @@ M.prototype.removeAllListeners = function(e) {
4952
4976
  this.removeListener(e, r[i]);
4953
4977
  return this;
4954
4978
  };
4955
- function Ci(t, e, r) {
4979
+ function Ri(t, e, r) {
4956
4980
  var n = t._events;
4957
4981
  if (n === void 0)
4958
4982
  return [];
4959
4983
  var i = n[e];
4960
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Fa(i) : Pi(i, i.length);
4984
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Ba(i) : _i(i, i.length);
4961
4985
  }
4962
4986
  M.prototype.listeners = function(e) {
4963
- return Ci(this, e, !0);
4987
+ return Ri(this, e, !0);
4964
4988
  };
4965
4989
  M.prototype.rawListeners = function(e) {
4966
- return Ci(this, e, !1);
4990
+ return Ri(this, e, !1);
4967
4991
  };
4968
4992
  M.listenerCount = function(t, e) {
4969
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : Ri.call(t, e);
4993
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : Pi.call(t, e);
4970
4994
  };
4971
- M.prototype.listenerCount = Ri;
4972
- function Ri(t) {
4995
+ M.prototype.listenerCount = Pi;
4996
+ function Pi(t) {
4973
4997
  var e = this._events;
4974
4998
  if (e !== void 0) {
4975
4999
  var r = e[t];
@@ -4983,22 +5007,22 @@ function Ri(t) {
4983
5007
  M.prototype.eventNames = function() {
4984
5008
  return this._eventsCount > 0 ? Ot(this._events) : [];
4985
5009
  };
4986
- function Pi(t, e) {
5010
+ function _i(t, e) {
4987
5011
  for (var r = new Array(e), n = 0; n < e; ++n)
4988
5012
  r[n] = t[n];
4989
5013
  return r;
4990
5014
  }
4991
- function Da(t, e) {
5015
+ function xa(t, e) {
4992
5016
  for (; e + 1 < t.length; e++)
4993
5017
  t[e] = t[e + 1];
4994
5018
  t.pop();
4995
5019
  }
4996
- function Fa(t) {
5020
+ function Ba(t) {
4997
5021
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
4998
5022
  e[r] = t[r].listener || t[r];
4999
5023
  return e;
5000
5024
  }
5001
- function Ua(t, e) {
5025
+ function Ma(t, e) {
5002
5026
  return new Promise(function(r, n) {
5003
5027
  function i(o) {
5004
5028
  t.removeListener(e, s), n(o);
@@ -5006,13 +5030,13 @@ function Ua(t, e) {
5006
5030
  function s() {
5007
5031
  typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
5008
5032
  }
5009
- _i(t, e, s, { once: !0 }), e !== "error" && Va(t, i, { once: !0 });
5033
+ Di(t, e, s, { once: !0 }), e !== "error" && $a(t, i, { once: !0 });
5010
5034
  });
5011
5035
  }
5012
- function Va(t, e, r) {
5013
- typeof t.on == "function" && _i(t, "error", e, r);
5036
+ function $a(t, e, r) {
5037
+ typeof t.on == "function" && Di(t, "error", e, r);
5014
5038
  }
5015
- function _i(t, e, r, n) {
5039
+ function Di(t, e, r, n) {
5016
5040
  if (typeof t.on == "function")
5017
5041
  n.once ? t.once(e, r) : t.on(e, r);
5018
5042
  else if (typeof t.addEventListener == "function")
@@ -5022,7 +5046,7 @@ function _i(t, e, r, n) {
5022
5046
  else
5023
5047
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
5024
5048
  }
5025
- var Di = Ur.exports, jt = {}, Fi = {}, Ui = function() {
5049
+ var Fi = Ur.exports, jt = {}, Ui = {}, Vi = function() {
5026
5050
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
5027
5051
  return !1;
5028
5052
  if (typeof Symbol.iterator == "symbol")
@@ -5045,34 +5069,34 @@ var Di = Ur.exports, jt = {}, Fi = {}, Ui = function() {
5045
5069
  return !1;
5046
5070
  }
5047
5071
  return !0;
5048
- }, xa = Ui, Gt = function() {
5049
- return xa() && !!Symbol.toStringTag;
5050
- }, Ba = Error, Ma = EvalError, $a = RangeError, qa = ReferenceError, Vi = SyntaxError, Qt = TypeError, ja = URIError, _n = typeof Symbol < "u" && Symbol, Ga = Ui, Qa = function() {
5051
- return typeof _n != "function" || typeof Symbol != "function" || typeof _n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ga();
5072
+ }, qa = Vi, Gt = function() {
5073
+ return qa() && !!Symbol.toStringTag;
5074
+ }, ja = Error, Ga = EvalError, Qa = RangeError, Wa = ReferenceError, xi = SyntaxError, Qt = TypeError, Ha = URIError, _n = typeof Symbol < "u" && Symbol, Ka = Vi, za = function() {
5075
+ return typeof _n != "function" || typeof Symbol != "function" || typeof _n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ka();
5052
5076
  }, Xt = {
5053
5077
  __proto__: null,
5054
5078
  foo: {}
5055
- }, Wa = Object, Ha = function() {
5056
- return { __proto__: Xt }.foo === Xt.foo && !(Xt instanceof Wa);
5057
- }, Ka = "Function.prototype.bind called on incompatible ", za = Object.prototype.toString, Ya = Math.max, Xa = "[object Function]", Dn = function(e, r) {
5079
+ }, Ya = Object, Xa = function() {
5080
+ return { __proto__: Xt }.foo === Xt.foo && !(Xt instanceof Ya);
5081
+ }, Ja = "Function.prototype.bind called on incompatible ", Za = Object.prototype.toString, eu = Math.max, tu = "[object Function]", Dn = function(e, r) {
5058
5082
  for (var n = [], i = 0; i < e.length; i += 1)
5059
5083
  n[i] = e[i];
5060
5084
  for (var s = 0; s < r.length; s += 1)
5061
5085
  n[s + e.length] = r[s];
5062
5086
  return n;
5063
- }, Ja = function(e, r) {
5087
+ }, ru = function(e, r) {
5064
5088
  for (var n = [], i = r, s = 0; i < e.length; i += 1, s += 1)
5065
5089
  n[s] = e[i];
5066
5090
  return n;
5067
- }, Za = function(t, e) {
5091
+ }, nu = function(t, e) {
5068
5092
  for (var r = "", n = 0; n < t.length; n += 1)
5069
5093
  r += t[n], n + 1 < t.length && (r += e);
5070
5094
  return r;
5071
- }, eu = function(e) {
5095
+ }, iu = function(e) {
5072
5096
  var r = this;
5073
- if (typeof r != "function" || za.apply(r) !== Xa)
5074
- throw new TypeError(Ka + r);
5075
- for (var n = Ja(arguments, 1), i, s = function() {
5097
+ if (typeof r != "function" || Za.apply(r) !== tu)
5098
+ throw new TypeError(Ja + r);
5099
+ for (var n = ru(arguments, 1), i, s = function() {
5076
5100
  if (this instanceof i) {
5077
5101
  var l = r.apply(
5078
5102
  this,
@@ -5084,17 +5108,17 @@ var Di = Ur.exports, jt = {}, Fi = {}, Ui = function() {
5084
5108
  e,
5085
5109
  Dn(n, arguments)
5086
5110
  );
5087
- }, o = Ya(0, r.length - n.length), a = [], u = 0; u < o; u++)
5111
+ }, o = eu(0, r.length - n.length), a = [], u = 0; u < o; u++)
5088
5112
  a[u] = "$" + u;
5089
- if (i = Function("binder", "return function (" + Za(a, ",") + "){ return binder.apply(this,arguments); }")(s), r.prototype) {
5113
+ if (i = Function("binder", "return function (" + nu(a, ",") + "){ return binder.apply(this,arguments); }")(s), r.prototype) {
5090
5114
  var c = function() {
5091
5115
  };
5092
5116
  c.prototype = r.prototype, i.prototype = new c(), c.prototype = null;
5093
5117
  }
5094
5118
  return i;
5095
- }, tu = eu, Vr = Function.prototype.bind || tu, ru = Function.prototype.call, nu = Object.prototype.hasOwnProperty, iu = Vr, su = iu.call(ru, nu), R, ou = Ba, au = Ma, uu = $a, cu = qa, rt = Vi, et = Qt, lu = ja, xi = Function, Jt = function(t) {
5119
+ }, su = iu, Vr = Function.prototype.bind || su, ou = Function.prototype.call, au = Object.prototype.hasOwnProperty, uu = Vr, cu = uu.call(ou, au), R, lu = ja, du = Ga, pu = Qa, fu = Wa, rt = xi, et = Qt, hu = Ha, Bi = Function, Jt = function(t) {
5096
5120
  try {
5097
- return xi('"use strict"; return (' + t + ").constructor;")();
5121
+ return Bi('"use strict"; return (' + t + ").constructor;")();
5098
5122
  } catch {
5099
5123
  }
5100
5124
  }, Fe = Object.getOwnPropertyDescriptor;
@@ -5106,7 +5130,7 @@ if (Fe)
5106
5130
  }
5107
5131
  var Zt = function() {
5108
5132
  throw new et();
5109
- }, du = Fe ? function() {
5133
+ }, mu = Fe ? function() {
5110
5134
  try {
5111
5135
  return arguments.callee, Zt;
5112
5136
  } catch {
@@ -5116,9 +5140,9 @@ var Zt = function() {
5116
5140
  return Zt;
5117
5141
  }
5118
5142
  }
5119
- }() : Zt, Qe = Qa(), pu = Ha(), Y = Object.getPrototypeOf || (pu ? function(t) {
5143
+ }() : Zt, Qe = za(), gu = Xa(), Y = Object.getPrototypeOf || (gu ? function(t) {
5120
5144
  return t.__proto__;
5121
- } : null), He = {}, fu = typeof Uint8Array > "u" || !Y ? R : Y(Uint8Array), Ue = {
5145
+ } : null), He = {}, yu = typeof Uint8Array > "u" || !Y ? R : Y(Uint8Array), Ue = {
5122
5146
  __proto__: null,
5123
5147
  "%AggregateError%": typeof AggregateError > "u" ? R : AggregateError,
5124
5148
  "%Array%": Array,
@@ -5140,14 +5164,14 @@ var Zt = function() {
5140
5164
  "%decodeURIComponent%": decodeURIComponent,
5141
5165
  "%encodeURI%": encodeURI,
5142
5166
  "%encodeURIComponent%": encodeURIComponent,
5143
- "%Error%": ou,
5167
+ "%Error%": lu,
5144
5168
  "%eval%": eval,
5145
5169
  // eslint-disable-line no-eval
5146
- "%EvalError%": au,
5170
+ "%EvalError%": du,
5147
5171
  "%Float32Array%": typeof Float32Array > "u" ? R : Float32Array,
5148
5172
  "%Float64Array%": typeof Float64Array > "u" ? R : Float64Array,
5149
5173
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? R : FinalizationRegistry,
5150
- "%Function%": xi,
5174
+ "%Function%": Bi,
5151
5175
  "%GeneratorFunction%": He,
5152
5176
  "%Int8Array%": typeof Int8Array > "u" ? R : Int8Array,
5153
5177
  "%Int16Array%": typeof Int16Array > "u" ? R : Int16Array,
@@ -5165,8 +5189,8 @@ var Zt = function() {
5165
5189
  "%parseInt%": parseInt,
5166
5190
  "%Promise%": typeof Promise > "u" ? R : Promise,
5167
5191
  "%Proxy%": typeof Proxy > "u" ? R : Proxy,
5168
- "%RangeError%": uu,
5169
- "%ReferenceError%": cu,
5192
+ "%RangeError%": pu,
5193
+ "%ReferenceError%": fu,
5170
5194
  "%Reflect%": typeof Reflect > "u" ? R : Reflect,
5171
5195
  "%RegExp%": RegExp,
5172
5196
  "%Set%": typeof Set > "u" ? R : Set,
@@ -5176,14 +5200,14 @@ var Zt = function() {
5176
5200
  "%StringIteratorPrototype%": Qe && Y ? Y(""[Symbol.iterator]()) : R,
5177
5201
  "%Symbol%": Qe ? Symbol : R,
5178
5202
  "%SyntaxError%": rt,
5179
- "%ThrowTypeError%": du,
5180
- "%TypedArray%": fu,
5203
+ "%ThrowTypeError%": mu,
5204
+ "%TypedArray%": yu,
5181
5205
  "%TypeError%": et,
5182
5206
  "%Uint8Array%": typeof Uint8Array > "u" ? R : Uint8Array,
5183
5207
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? R : Uint8ClampedArray,
5184
5208
  "%Uint16Array%": typeof Uint16Array > "u" ? R : Uint16Array,
5185
5209
  "%Uint32Array%": typeof Uint32Array > "u" ? R : Uint32Array,
5186
- "%URIError%": lu,
5210
+ "%URIError%": hu,
5187
5211
  "%WeakMap%": typeof WeakMap > "u" ? R : WeakMap,
5188
5212
  "%WeakRef%": typeof WeakRef > "u" ? R : WeakRef,
5189
5213
  "%WeakSet%": typeof WeakSet > "u" ? R : WeakSet
@@ -5192,10 +5216,10 @@ if (Y)
5192
5216
  try {
5193
5217
  null.error;
5194
5218
  } catch (t) {
5195
- var hu = Y(Y(t));
5196
- Ue["%Error.prototype%"] = hu;
5219
+ var bu = Y(Y(t));
5220
+ Ue["%Error.prototype%"] = bu;
5197
5221
  }
5198
- var mu = function t(e) {
5222
+ var vu = function t(e) {
5199
5223
  var r;
5200
5224
  if (e === "%AsyncFunction%")
5201
5225
  r = Jt("async function () {}");
@@ -5264,21 +5288,21 @@ var mu = function t(e) {
5264
5288
  "%URIErrorPrototype%": ["URIError", "prototype"],
5265
5289
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
5266
5290
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
5267
- }, ht = Vr, _t = su, gu = ht.call(Function.call, Array.prototype.concat), yu = ht.call(Function.apply, Array.prototype.splice), Un = ht.call(Function.call, String.prototype.replace), Dt = ht.call(Function.call, String.prototype.slice), bu = ht.call(Function.call, RegExp.prototype.exec), vu = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Au = /\\(\\)?/g, Su = function(e) {
5291
+ }, ht = Vr, _t = cu, Au = ht.call(Function.call, Array.prototype.concat), Su = ht.call(Function.apply, Array.prototype.splice), Un = ht.call(Function.call, String.prototype.replace), Dt = ht.call(Function.call, String.prototype.slice), wu = ht.call(Function.call, RegExp.prototype.exec), Eu = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Tu = /\\(\\)?/g, Iu = function(e) {
5268
5292
  var r = Dt(e, 0, 1), n = Dt(e, -1);
5269
5293
  if (r === "%" && n !== "%")
5270
5294
  throw new rt("invalid intrinsic syntax, expected closing `%`");
5271
5295
  if (n === "%" && r !== "%")
5272
5296
  throw new rt("invalid intrinsic syntax, expected opening `%`");
5273
5297
  var i = [];
5274
- return Un(e, vu, function(s, o, a, u) {
5275
- i[i.length] = a ? Un(u, Au, "$1") : o || s;
5298
+ return Un(e, Eu, function(s, o, a, u) {
5299
+ i[i.length] = a ? Un(u, Tu, "$1") : o || s;
5276
5300
  }), i;
5277
- }, wu = function(e, r) {
5301
+ }, Ou = function(e, r) {
5278
5302
  var n = e, i;
5279
5303
  if (_t(Fn, n) && (i = Fn[n], n = "%" + i[0] + "%"), _t(Ue, n)) {
5280
5304
  var s = Ue[n];
5281
- if (s === He && (s = mu(n)), typeof s > "u" && !r)
5305
+ if (s === He && (s = vu(n)), typeof s > "u" && !r)
5282
5306
  throw new et("intrinsic " + e + " exists, but is not available. Please file an issue!");
5283
5307
  return {
5284
5308
  alias: i,
@@ -5292,10 +5316,10 @@ var mu = function t(e) {
5292
5316
  throw new et("intrinsic name must be a non-empty string");
5293
5317
  if (arguments.length > 1 && typeof r != "boolean")
5294
5318
  throw new et('"allowMissing" argument must be a boolean');
5295
- if (bu(/^%?[^%]*%?$/, e) === null)
5319
+ if (wu(/^%?[^%]*%?$/, e) === null)
5296
5320
  throw new rt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
5297
- var n = Su(e), i = n.length > 0 ? n[0] : "", s = wu("%" + i + "%", r), o = s.name, a = s.value, u = !1, c = s.alias;
5298
- c && (i = c[0], yu(n, gu([0, 1], c)));
5321
+ var n = Iu(e), i = n.length > 0 ? n[0] : "", s = Ou("%" + i + "%", r), o = s.name, a = s.value, u = !1, c = s.alias;
5322
+ c && (i = c[0], Su(n, Au([0, 1], c)));
5299
5323
  for (var l = 1, d = !0; l < n.length; l += 1) {
5300
5324
  var p = n[l], m = Dt(p, 0, 1), b = Dt(p, -1);
5301
5325
  if ((m === '"' || m === "'" || m === "`" || b === '"' || b === "'" || b === "`") && m !== b)
@@ -5317,7 +5341,7 @@ var mu = function t(e) {
5317
5341
  }
5318
5342
  }
5319
5343
  return a;
5320
- }, Bi = { exports: {} }, er, Vn;
5344
+ }, Mi = { exports: {} }, er, Vn;
5321
5345
  function xr() {
5322
5346
  if (Vn) return er;
5323
5347
  Vn = 1;
@@ -5330,14 +5354,14 @@ function xr() {
5330
5354
  }
5331
5355
  return er = e, er;
5332
5356
  }
5333
- var Eu = mt, kt = Eu("%Object.getOwnPropertyDescriptor%", !0);
5357
+ var ku = mt, kt = ku("%Object.getOwnPropertyDescriptor%", !0);
5334
5358
  if (kt)
5335
5359
  try {
5336
5360
  kt([], "length");
5337
5361
  } catch {
5338
5362
  kt = null;
5339
5363
  }
5340
- var Wt = kt, xn = xr(), Tu = Vi, We = Qt, Bn = Wt, Iu = function(e, r, n) {
5364
+ var Wt = kt, xn = xr(), Nu = xi, We = Qt, Bn = Wt, Lu = function(e, r, n) {
5341
5365
  if (!e || typeof e != "object" && typeof e != "function")
5342
5366
  throw new We("`obj` must be an object or a function`");
5343
5367
  if (typeof r != "string" && typeof r != "symbol")
@@ -5361,11 +5385,11 @@ var Wt = kt, xn = xr(), Tu = Vi, We = Qt, Bn = Wt, Iu = function(e, r, n) {
5361
5385
  else if (a || !i && !s && !o)
5362
5386
  e[r] = n;
5363
5387
  else
5364
- throw new Tu("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
5365
- }, Ar = xr(), Mi = function() {
5388
+ throw new Nu("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
5389
+ }, Ar = xr(), $i = function() {
5366
5390
  return !!Ar;
5367
5391
  };
5368
- Mi.hasArrayLengthDefineBug = function() {
5392
+ $i.hasArrayLengthDefineBug = function() {
5369
5393
  if (!Ar)
5370
5394
  return null;
5371
5395
  try {
@@ -5374,17 +5398,17 @@ Mi.hasArrayLengthDefineBug = function() {
5374
5398
  return !0;
5375
5399
  }
5376
5400
  };
5377
- var Ou = Mi, ku = mt, Mn = Iu, Nu = Ou(), $n = Wt, qn = Qt, Lu = ku("%Math.floor%"), Cu = function(e, r) {
5401
+ var Cu = $i, Ru = mt, Mn = Lu, Pu = Cu(), $n = Wt, qn = Qt, _u = Ru("%Math.floor%"), Du = function(e, r) {
5378
5402
  if (typeof e != "function")
5379
5403
  throw new qn("`fn` is not a function");
5380
- if (typeof r != "number" || r < 0 || r > 4294967295 || Lu(r) !== r)
5404
+ if (typeof r != "number" || r < 0 || r > 4294967295 || _u(r) !== r)
5381
5405
  throw new qn("`length` must be a positive 32-bit integer");
5382
5406
  var n = arguments.length > 2 && !!arguments[2], i = !0, s = !0;
5383
5407
  if ("length" in e && $n) {
5384
5408
  var o = $n(e, "length");
5385
5409
  o && !o.configurable && (i = !1), o && !o.writable && (s = !1);
5386
5410
  }
5387
- return (i || s || !n) && (Nu ? Mn(
5411
+ return (i || s || !n) && (Pu ? Mn(
5388
5412
  /** @type {Parameters<define>[0]} */
5389
5413
  e,
5390
5414
  "length",
@@ -5399,7 +5423,7 @@ var Ou = Mi, ku = mt, Mn = Iu, Nu = Ou(), $n = Wt, qn = Qt, Lu = ku("%Math.floor
5399
5423
  )), e;
5400
5424
  };
5401
5425
  (function(t) {
5402
- var e = Vr, r = mt, n = Cu, i = Qt, s = r("%Function.prototype.apply%"), o = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(o, s), u = xr(), c = r("%Math.max%");
5426
+ var e = Vr, r = mt, n = Du, i = Qt, s = r("%Function.prototype.apply%"), o = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(o, s), u = xr(), c = r("%Math.max%");
5403
5427
  t.exports = function(p) {
5404
5428
  if (typeof p != "function")
5405
5429
  throw new i("a function is required");
@@ -5414,42 +5438,42 @@ var Ou = Mi, ku = mt, Mn = Iu, Nu = Ou(), $n = Wt, qn = Qt, Lu = ku("%Math.floor
5414
5438
  return a(e, s, arguments);
5415
5439
  };
5416
5440
  u ? u(t.exports, "apply", { value: l }) : t.exports.apply = l;
5417
- })(Bi);
5418
- var Br = Bi.exports, $i = mt, qi = Br, Ru = qi($i("String.prototype.indexOf")), Mr = function(e, r) {
5419
- var n = $i(e, !!r);
5420
- return typeof n == "function" && Ru(e, ".prototype.") > -1 ? qi(n) : n;
5421
- }, Pu = Gt(), _u = Mr, Sr = _u("Object.prototype.toString"), Ht = function(e) {
5422
- return Pu && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : Sr(e) === "[object Arguments]";
5423
- }, ji = function(e) {
5441
+ })(Mi);
5442
+ var Br = Mi.exports, qi = mt, ji = Br, Fu = ji(qi("String.prototype.indexOf")), Mr = function(e, r) {
5443
+ var n = qi(e, !!r);
5444
+ return typeof n == "function" && Fu(e, ".prototype.") > -1 ? ji(n) : n;
5445
+ }, Uu = Gt(), Vu = Mr, Sr = Vu("Object.prototype.toString"), Ht = function(e) {
5446
+ return Uu && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : Sr(e) === "[object Arguments]";
5447
+ }, Gi = function(e) {
5424
5448
  return Ht(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && Sr(e) !== "[object Array]" && Sr(e.callee) === "[object Function]";
5425
- }, Du = function() {
5449
+ }, xu = function() {
5426
5450
  return Ht(arguments);
5427
5451
  }();
5428
- Ht.isLegacyArguments = ji;
5429
- var Fu = Du ? Ht : ji, Uu = Object.prototype.toString, Vu = Function.prototype.toString, xu = /^\s*(?:function)?\*/, Gi = Gt(), tr = Object.getPrototypeOf, Bu = function() {
5430
- if (!Gi)
5452
+ Ht.isLegacyArguments = Gi;
5453
+ var Bu = xu ? Ht : Gi, Mu = Object.prototype.toString, $u = Function.prototype.toString, qu = /^\s*(?:function)?\*/, Qi = Gt(), tr = Object.getPrototypeOf, ju = function() {
5454
+ if (!Qi)
5431
5455
  return !1;
5432
5456
  try {
5433
5457
  return Function("return function*() {}")();
5434
5458
  } catch {
5435
5459
  }
5436
- }, rr, Mu = function(e) {
5460
+ }, rr, Gu = function(e) {
5437
5461
  if (typeof e != "function")
5438
5462
  return !1;
5439
- if (xu.test(Vu.call(e)))
5463
+ if (qu.test($u.call(e)))
5440
5464
  return !0;
5441
- if (!Gi) {
5442
- var r = Uu.call(e);
5465
+ if (!Qi) {
5466
+ var r = Mu.call(e);
5443
5467
  return r === "[object GeneratorFunction]";
5444
5468
  }
5445
5469
  if (!tr)
5446
5470
  return !1;
5447
5471
  if (typeof rr > "u") {
5448
- var n = Bu();
5472
+ var n = ju();
5449
5473
  rr = n ? tr(n) : !1;
5450
5474
  }
5451
5475
  return tr(e) === rr;
5452
- }, Qi = Function.prototype.toString, Xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, wr, Nt;
5476
+ }, Wi = Function.prototype.toString, Xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, wr, Nt;
5453
5477
  if (typeof Xe == "function" && typeof Object.defineProperty == "function")
5454
5478
  try {
5455
5479
  wr = Object.defineProperty({}, "length", {
@@ -5464,35 +5488,35 @@ if (typeof Xe == "function" && typeof Object.defineProperty == "function")
5464
5488
  }
5465
5489
  else
5466
5490
  Xe = null;
5467
- var $u = /^\s*class\b/, Er = function(e) {
5491
+ var Qu = /^\s*class\b/, Er = function(e) {
5468
5492
  try {
5469
- var r = Qi.call(e);
5470
- return $u.test(r);
5493
+ var r = Wi.call(e);
5494
+ return Qu.test(r);
5471
5495
  } catch {
5472
5496
  return !1;
5473
5497
  }
5474
5498
  }, nr = function(e) {
5475
5499
  try {
5476
- return Er(e) ? !1 : (Qi.call(e), !0);
5500
+ return Er(e) ? !1 : (Wi.call(e), !0);
5477
5501
  } catch {
5478
5502
  return !1;
5479
5503
  }
5480
- }, Lt = Object.prototype.toString, qu = "[object Object]", ju = "[object Function]", Gu = "[object GeneratorFunction]", Qu = "[object HTMLAllCollection]", Wu = "[object HTML document.all class]", Hu = "[object HTMLCollection]", Ku = typeof Symbol == "function" && !!Symbol.toStringTag, zu = !(0 in [,]), Tr = function() {
5504
+ }, Lt = Object.prototype.toString, Wu = "[object Object]", Hu = "[object Function]", Ku = "[object GeneratorFunction]", zu = "[object HTMLAllCollection]", Yu = "[object HTML document.all class]", Xu = "[object HTMLCollection]", Ju = typeof Symbol == "function" && !!Symbol.toStringTag, Zu = !(0 in [,]), Tr = function() {
5481
5505
  return !1;
5482
5506
  };
5483
5507
  if (typeof document == "object") {
5484
- var Yu = document.all;
5485
- Lt.call(Yu) === Lt.call(document.all) && (Tr = function(e) {
5486
- if ((zu || !e) && (typeof e > "u" || typeof e == "object"))
5508
+ var ec = document.all;
5509
+ Lt.call(ec) === Lt.call(document.all) && (Tr = function(e) {
5510
+ if ((Zu || !e) && (typeof e > "u" || typeof e == "object"))
5487
5511
  try {
5488
5512
  var r = Lt.call(e);
5489
- return (r === Qu || r === Wu || r === Hu || r === qu) && e("") == null;
5513
+ return (r === zu || r === Yu || r === Xu || r === Wu) && e("") == null;
5490
5514
  } catch {
5491
5515
  }
5492
5516
  return !1;
5493
5517
  });
5494
5518
  }
5495
- var Xu = Xe ? function(e) {
5519
+ var tc = Xe ? function(e) {
5496
5520
  if (Tr(e))
5497
5521
  return !0;
5498
5522
  if (!e || typeof e != "function" && typeof e != "object")
@@ -5509,27 +5533,27 @@ var Xu = Xe ? function(e) {
5509
5533
  return !0;
5510
5534
  if (!e || typeof e != "function" && typeof e != "object")
5511
5535
  return !1;
5512
- if (Ku)
5536
+ if (Ju)
5513
5537
  return nr(e);
5514
5538
  if (Er(e))
5515
5539
  return !1;
5516
5540
  var r = Lt.call(e);
5517
- return r !== ju && r !== Gu && !/^\[object HTML/.test(r) ? !1 : nr(e);
5518
- }, Ju = Xu, Zu = Object.prototype.toString, Wi = Object.prototype.hasOwnProperty, ec = function(e, r, n) {
5541
+ return r !== Hu && r !== Ku && !/^\[object HTML/.test(r) ? !1 : nr(e);
5542
+ }, rc = tc, nc = Object.prototype.toString, Hi = Object.prototype.hasOwnProperty, ic = function(e, r, n) {
5519
5543
  for (var i = 0, s = e.length; i < s; i++)
5520
- Wi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
5521
- }, tc = function(e, r, n) {
5544
+ Hi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
5545
+ }, sc = function(e, r, n) {
5522
5546
  for (var i = 0, s = e.length; i < s; i++)
5523
5547
  n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
5524
- }, rc = function(e, r, n) {
5548
+ }, oc = function(e, r, n) {
5525
5549
  for (var i in e)
5526
- Wi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
5527
- }, nc = function(e, r, n) {
5528
- if (!Ju(r))
5550
+ Hi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
5551
+ }, ac = function(e, r, n) {
5552
+ if (!rc(r))
5529
5553
  throw new TypeError("iterator must be a function");
5530
5554
  var i;
5531
- arguments.length >= 3 && (i = n), Zu.call(e) === "[object Array]" ? ec(e, r, i) : typeof e == "string" ? tc(e, r, i) : rc(e, r, i);
5532
- }, Hi = nc, ic = [
5555
+ arguments.length >= 3 && (i = n), nc.call(e) === "[object Array]" ? ic(e, r, i) : typeof e == "string" ? sc(e, r, i) : oc(e, r, i);
5556
+ }, Ki = ac, uc = [
5533
5557
  "Float32Array",
5534
5558
  "Float64Array",
5535
5559
  "Int8Array",
@@ -5541,17 +5565,17 @@ var Xu = Xe ? function(e) {
5541
5565
  "Uint32Array",
5542
5566
  "BigInt64Array",
5543
5567
  "BigUint64Array"
5544
- ], ir = ic, sc = typeof globalThis > "u" ? _r : globalThis, Ki = function() {
5568
+ ], ir = uc, cc = typeof globalThis > "u" ? _r : globalThis, zi = function() {
5545
5569
  for (var e = [], r = 0; r < ir.length; r++)
5546
- typeof sc[ir[r]] == "function" && (e[e.length] = ir[r]);
5570
+ typeof cc[ir[r]] == "function" && (e[e.length] = ir[r]);
5547
5571
  return e;
5548
- }, Ft = Hi, oc = Ki, jn = Br, $r = Mr, Ct = Wt, ac = $r("Object.prototype.toString"), zi = Gt(), Gn = typeof globalThis > "u" ? _r : globalThis, Ir = oc(), qr = $r("String.prototype.slice"), sr = Object.getPrototypeOf, uc = $r("Array.prototype.indexOf", !0) || function(e, r) {
5572
+ }, Ft = Ki, lc = zi, jn = Br, $r = Mr, Ct = Wt, dc = $r("Object.prototype.toString"), Yi = Gt(), Gn = typeof globalThis > "u" ? _r : globalThis, Ir = lc(), qr = $r("String.prototype.slice"), sr = Object.getPrototypeOf, pc = $r("Array.prototype.indexOf", !0) || function(e, r) {
5549
5573
  for (var n = 0; n < e.length; n += 1)
5550
5574
  if (e[n] === r)
5551
5575
  return n;
5552
5576
  return -1;
5553
5577
  }, Ut = { __proto__: null };
5554
- zi && Ct && sr ? Ft(Ir, function(t) {
5578
+ Yi && Ct && sr ? Ft(Ir, function(t) {
5555
5579
  var e = new Gn[t]();
5556
5580
  if (Symbol.toStringTag in e) {
5557
5581
  var r = sr(e), n = Ct(r, Symbol.toStringTag);
@@ -5565,7 +5589,7 @@ zi && Ct && sr ? Ft(Ir, function(t) {
5565
5589
  var e = new Gn[t](), r = e.slice || e.set;
5566
5590
  r && (Ut["$" + t] = jn(r));
5567
5591
  });
5568
- var cc = function(e) {
5592
+ var fc = function(e) {
5569
5593
  var r = !1;
5570
5594
  return Ft(Ut, function(n, i) {
5571
5595
  if (!r)
@@ -5574,7 +5598,7 @@ var cc = function(e) {
5574
5598
  } catch {
5575
5599
  }
5576
5600
  }), r;
5577
- }, lc = function(e) {
5601
+ }, hc = function(e) {
5578
5602
  var r = !1;
5579
5603
  return Ft(Ut, function(n, i) {
5580
5604
  if (!r)
@@ -5583,21 +5607,21 @@ var cc = function(e) {
5583
5607
  } catch {
5584
5608
  }
5585
5609
  }), r;
5586
- }, dc = function(e) {
5610
+ }, mc = function(e) {
5587
5611
  if (!e || typeof e != "object")
5588
5612
  return !1;
5589
- if (!zi) {
5590
- var r = qr(ac(e), 8, -1);
5591
- return uc(Ir, r) > -1 ? r : r !== "Object" ? !1 : lc(e);
5613
+ if (!Yi) {
5614
+ var r = qr(dc(e), 8, -1);
5615
+ return pc(Ir, r) > -1 ? r : r !== "Object" ? !1 : hc(e);
5592
5616
  }
5593
- return Ct ? cc(e) : null;
5594
- }, Vt = Hi, pc = Ki, Qn = Br, jr = Mr, Rt = Wt, fc = jr("Object.prototype.toString"), Yi = Gt(), Wn = typeof globalThis > "u" ? _r : globalThis, Or = pc(), Gr = jr("String.prototype.slice"), or = Object.getPrototypeOf, hc = jr("Array.prototype.indexOf", !0) || function(e, r) {
5617
+ return Ct ? fc(e) : null;
5618
+ }, Vt = Ki, gc = zi, Qn = Br, jr = Mr, Rt = Wt, yc = jr("Object.prototype.toString"), Xi = Gt(), Wn = typeof globalThis > "u" ? _r : globalThis, Or = gc(), Gr = jr("String.prototype.slice"), or = Object.getPrototypeOf, bc = jr("Array.prototype.indexOf", !0) || function(e, r) {
5595
5619
  for (var n = 0; n < e.length; n += 1)
5596
5620
  if (e[n] === r)
5597
5621
  return n;
5598
5622
  return -1;
5599
5623
  }, xt = { __proto__: null };
5600
- Yi && Rt && or ? Vt(Or, function(t) {
5624
+ Xi && Rt && or ? Vt(Or, function(t) {
5601
5625
  var e = new Wn[t]();
5602
5626
  if (Symbol.toStringTag in e) {
5603
5627
  var r = or(e), n = Rt(r, Symbol.toStringTag);
@@ -5611,7 +5635,7 @@ Yi && Rt && or ? Vt(Or, function(t) {
5611
5635
  var e = new Wn[t](), r = e.slice || e.set;
5612
5636
  r && (xt["$" + t] = Qn(r));
5613
5637
  });
5614
- var mc = function(e) {
5638
+ var vc = function(e) {
5615
5639
  var r = !1;
5616
5640
  return Vt(
5617
5641
  // eslint-disable-next-line no-extra-parens
@@ -5627,7 +5651,7 @@ var mc = function(e) {
5627
5651
  }
5628
5652
  }
5629
5653
  ), r;
5630
- }, gc = function(e) {
5654
+ }, Ac = function(e) {
5631
5655
  var r = !1;
5632
5656
  return Vt(
5633
5657
  // eslint-disable-next-line no-extra-parens
@@ -5643,19 +5667,19 @@ var mc = function(e) {
5643
5667
  }
5644
5668
  }
5645
5669
  ), r;
5646
- }, yc = function(e) {
5670
+ }, Sc = function(e) {
5647
5671
  if (!e || typeof e != "object")
5648
5672
  return !1;
5649
- if (!Yi) {
5650
- var r = Gr(fc(e), 8, -1);
5651
- return hc(Or, r) > -1 ? r : r !== "Object" ? !1 : gc(e);
5673
+ if (!Xi) {
5674
+ var r = Gr(yc(e), 8, -1);
5675
+ return bc(Or, r) > -1 ? r : r !== "Object" ? !1 : Ac(e);
5652
5676
  }
5653
- return Rt ? mc(e) : null;
5654
- }, bc = yc, vc = function(e) {
5655
- return !!bc(e);
5677
+ return Rt ? vc(e) : null;
5678
+ }, wc = Sc, Ec = function(e) {
5679
+ return !!wc(e);
5656
5680
  };
5657
5681
  (function(t) {
5658
- var e = Fu, r = Mu, n = dc, i = vc;
5682
+ var e = Bu, r = Gu, n = mc, i = Ec;
5659
5683
  function s(v) {
5660
5684
  return v.call.bind(v);
5661
5685
  }
@@ -5664,11 +5688,11 @@ var mc = function(e) {
5664
5688
  var p = s(BigInt.prototype.valueOf);
5665
5689
  if (a)
5666
5690
  var m = s(Symbol.prototype.valueOf);
5667
- function b(v, ns) {
5691
+ function b(v, is) {
5668
5692
  if (typeof v != "object")
5669
5693
  return !1;
5670
5694
  try {
5671
- return ns(v), !0;
5695
+ return is(v), !0;
5672
5696
  } catch {
5673
5697
  return !1;
5674
5698
  }
@@ -5822,14 +5846,14 @@ var mc = function(e) {
5822
5846
  return a && b(v, m);
5823
5847
  }
5824
5848
  t.isSymbolObject = Hr;
5825
- function ts(v) {
5849
+ function rs(v) {
5826
5850
  return Re(v) || yt(v) || qe(v) || bt(v) || Hr(v);
5827
5851
  }
5828
- t.isBoxedPrimitive = ts;
5829
- function rs(v) {
5852
+ t.isBoxedPrimitive = rs;
5853
+ function ns(v) {
5830
5854
  return typeof Uint8Array < "u" && (gt(v) || U(v));
5831
5855
  }
5832
- t.isAnyArrayBuffer = rs, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(v) {
5856
+ t.isAnyArrayBuffer = ns, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(v) {
5833
5857
  Object.defineProperty(t, v, {
5834
5858
  enumerable: !1,
5835
5859
  value: function() {
@@ -5837,8 +5861,8 @@ var mc = function(e) {
5837
5861
  }
5838
5862
  });
5839
5863
  });
5840
- })(Fi);
5841
- var Ac = function(e) {
5864
+ })(Ui);
5865
+ var Tc = function(e) {
5842
5866
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
5843
5867
  }, kr = { exports: {} };
5844
5868
  typeof Object.create == "function" ? kr.exports = function(e, r) {
@@ -5858,7 +5882,7 @@ typeof Object.create == "function" ? kr.exports = function(e, r) {
5858
5882
  n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
5859
5883
  }
5860
5884
  };
5861
- var Sc = kr.exports;
5885
+ var Ic = kr.exports;
5862
5886
  (function(t) {
5863
5887
  var e = Object.getOwnPropertyDescriptors || function(y) {
5864
5888
  for (var A = Object.keys(y), O = {}, U = 0; U < A.length; U++)
@@ -6078,7 +6102,7 @@ var Sc = kr.exports;
6078
6102
  `) + " " + h.join(`,
6079
6103
  `) + " " + A[1] : A[0] + y + " " + h.join(", ") + " " + A[1];
6080
6104
  }
6081
- t.types = Fi;
6105
+ t.types = Ui;
6082
6106
  function w(h) {
6083
6107
  return Array.isArray(h);
6084
6108
  }
@@ -6135,7 +6159,7 @@ var Sc = kr.exports;
6135
6159
  return h === null || typeof h == "boolean" || typeof h == "number" || typeof h == "string" || typeof h == "symbol" || // ES6 symbol
6136
6160
  typeof h > "u";
6137
6161
  }
6138
- t.isPrimitive = Kt, t.isBuffer = Ac;
6162
+ t.isPrimitive = Kt, t.isBuffer = Tc;
6139
6163
  function ke(h) {
6140
6164
  return Object.prototype.toString.call(h);
6141
6165
  }
@@ -6166,7 +6190,7 @@ var Sc = kr.exports;
6166
6190
  }
6167
6191
  t.log = function() {
6168
6192
  console.log("%s - %s", zt(), t.format.apply(t, arguments));
6169
- }, t.inherits = Sc, t._extend = function(h, y) {
6193
+ }, t.inherits = Ic, t._extend = function(h, y) {
6170
6194
  if (!y || !de(y)) return h;
6171
6195
  for (var A = Object.keys(y), O = A.length; O--; )
6172
6196
  h[A[O]] = y[A[O]];
@@ -6250,7 +6274,7 @@ var Sc = kr.exports;
6250
6274
  }
6251
6275
  t.callbackify = gt;
6252
6276
  })(jt);
6253
- const { inherits: wc, format: ar } = jt;
6277
+ const { inherits: Oc, format: ar } = jt;
6254
6278
  function Pe(t, e, r = Error) {
6255
6279
  if (!t) throw new Error("Avvio error code must not be empty");
6256
6280
  if (!e) throw new Error("Avvio base error message must not be empty");
@@ -6261,9 +6285,9 @@ function Pe(t, e, r = Error) {
6261
6285
  }
6262
6286
  return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
6263
6287
  return `${this.name} [${this.code}]: ${this.message}`;
6264
- }, wc(n, r), n;
6288
+ }, Oc(n, r), n;
6265
6289
  }
6266
- var Xi = {
6290
+ var Ji = {
6267
6291
  createError: Pe,
6268
6292
  AVV_ERR_EXPOSE_ALREADY_DEFINED: Pe(
6269
6293
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
@@ -6289,7 +6313,7 @@ var Xi = {
6289
6313
  "AVV_ERR_READY_TIMEOUT",
6290
6314
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
6291
6315
  )
6292
- }, Ec = function t(e, r, n) {
6316
+ }, kc = function t(e, r, n) {
6293
6317
  r === void 0 && (r = ""), n || (n = {});
6294
6318
  var i = function(u) {
6295
6319
  var c = {
@@ -6311,8 +6335,8 @@ var Xi = {
6311
6335
  return r + i(l ? "└" : "├") + i("─") + i(d ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
6312
6336
  }).join("");
6313
6337
  };
6314
- const Tc = Ec, Hn = Symbol("avvio.TimeTree.untrackNode"), ur = Symbol("avvio.TimeTree.trackNode"), Kn = Symbol("avvio.TimeTree.getParent"), zn = Symbol("avvio.TimeTree.getNode"), Yn = Symbol("avvio.TimeTree.addNode");
6315
- let Ic = class {
6338
+ const Nc = kc, Hn = Symbol("avvio.TimeTree.untrackNode"), ur = Symbol("avvio.TimeTree.trackNode"), Kn = Symbol("avvio.TimeTree.getParent"), zn = Symbol("avvio.TimeTree.getNode"), Yn = Symbol("avvio.TimeTree.addNode");
6339
+ let Lc = class {
6316
6340
  constructor() {
6317
6341
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
6318
6342
  }
@@ -6366,11 +6390,11 @@ let Ic = class {
6366
6390
  }
6367
6391
  prittyPrint() {
6368
6392
  const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
6369
- return Tc(r);
6393
+ return Nc(r);
6370
6394
  }
6371
6395
  };
6372
- var Oc = Ic, Qr = { exports: {} }, Nr = { exports: {} }, cr, Xn;
6373
- function kc() {
6396
+ var Cc = Lc, Qr = { exports: {} }, Nr = { exports: {} }, cr, Xn;
6397
+ function Rc() {
6374
6398
  if (Xn) return cr;
6375
6399
  Xn = 1;
6376
6400
  var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, s = n * 365.25;
@@ -6451,8 +6475,8 @@ function kc() {
6451
6475
  }
6452
6476
  return cr;
6453
6477
  }
6454
- function Nc(t) {
6455
- r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = a, r.humanize = kc(), r.destroy = c, Object.keys(t).forEach((l) => {
6478
+ function Pc(t) {
6479
+ r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = a, r.humanize = Rc(), r.destroy = c, Object.keys(t).forEach((l) => {
6456
6480
  r[l] = t[l];
6457
6481
  }), r.names = [], r.skips = [], r.formatters = {};
6458
6482
  function e(l) {
@@ -6538,7 +6562,7 @@ function Nc(t) {
6538
6562
  }
6539
6563
  return r.enable(r.load()), r;
6540
6564
  }
6541
- var Lc = Nc;
6565
+ var _c = Pc;
6542
6566
  (function(t, e) {
6543
6567
  e.formatArgs = n, e.save = i, e.load = s, e.useColors = r, e.storage = o(), e.destroy = /* @__PURE__ */ (() => {
6544
6568
  let u = !1;
@@ -6667,7 +6691,7 @@ var Lc = Nc;
6667
6691
  } catch {
6668
6692
  }
6669
6693
  }
6670
- t.exports = Lc(e);
6694
+ t.exports = _c(e);
6671
6695
  const { formatters: a } = t.exports;
6672
6696
  a.j = function(u) {
6673
6697
  try {
@@ -6677,22 +6701,22 @@ var Lc = Nc;
6677
6701
  }
6678
6702
  };
6679
6703
  })(Nr, Nr.exports);
6680
- var Ji = Nr.exports;
6681
- const Cc = Ii, Rc = Di.EventEmitter, Pc = jt.inherits, X = Ji("avvio"), { AVV_ERR_READY_TIMEOUT: _c } = Xi, lr = Symbol.for("plugin-meta");
6682
- function Dc(t, e) {
6704
+ var Zi = Nr.exports;
6705
+ const Dc = Oi, Fc = Fi.EventEmitter, Uc = jt.inherits, X = Zi("avvio"), { AVV_ERR_READY_TIMEOUT: Vc } = Ji, lr = Symbol.for("plugin-meta");
6706
+ function xc(t, e) {
6683
6707
  return t[lr] && t[lr].name ? t[lr].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
6684
6708
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
6685
6709
  }
6686
- function Fc() {
6710
+ function Bc() {
6687
6711
  const t = {};
6688
6712
  return t.promise = new Promise((e, r) => {
6689
6713
  t.resolve = e, t.reject = r;
6690
6714
  }), t;
6691
6715
  }
6692
6716
  function st(t, e, r, n, i) {
6693
- this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = Dc(e, r), this.isAfter = n, this.q = Cc(t, Uc, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
6717
+ this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = xc(e, r), this.isAfter = n, this.q = Dc(t, Mc, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
6694
6718
  }
6695
- Pc(st, Rc);
6719
+ Uc(st, Fc);
6696
6720
  st.prototype.exec = function(t, e) {
6697
6721
  const r = this.func;
6698
6722
  let n = !1;
@@ -6720,7 +6744,7 @@ st.prototype.exec = function(t, e) {
6720
6744
  };
6721
6745
  this.timeout > 0 && (X("setting up timeout", i, this.timeout), s = setTimeout(function() {
6722
6746
  X("timed out", i), s = null;
6723
- const u = new _c(i);
6747
+ const u = new Vc(i);
6724
6748
  u.fn = r, o(u);
6725
6749
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
6726
6750
  const a = r(this.server, this.opts, o);
@@ -6738,7 +6762,7 @@ st.prototype.loadedSoFar = function() {
6738
6762
  }), this.q.resume();
6739
6763
  };
6740
6764
  let e;
6741
- return this._promise ? e = Promise.resolve() : (this._promise = Fc(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
6765
+ return this._promise ? e = Promise.resolve() : (this._promise = Bc(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
6742
6766
  };
6743
6767
  st.prototype.enqueue = function(t, e) {
6744
6768
  X("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
@@ -6763,12 +6787,12 @@ st.prototype.finish = function(t, e) {
6763
6787
  r();
6764
6788
  else
6765
6789
  X("delayed", this.name), this.q.drain = () => {
6766
- X("drain", this.name), this.q.drain = Vc, queueMicrotask(n);
6790
+ X("drain", this.name), this.q.drain = $c, queueMicrotask(n);
6767
6791
  };
6768
6792
  };
6769
6793
  queueMicrotask(n), this.q.resume();
6770
6794
  };
6771
- function Uc(t, e) {
6795
+ function Mc(t, e) {
6772
6796
  const r = this;
6773
6797
  k.nextTick(Wr.bind(r), t, e);
6774
6798
  }
@@ -6786,19 +6810,19 @@ function Wr(t, e) {
6786
6810
  });
6787
6811
  });
6788
6812
  }
6789
- function Vc() {
6813
+ function $c() {
6790
6814
  }
6791
6815
  Qr.exports = st;
6792
6816
  Qr.exports.loadPlugin = Wr;
6793
- var xc = Qr.exports;
6794
- const Jn = Ii, Bc = Di.EventEmitter, Mc = jt.inherits, {
6817
+ var qc = Qr.exports;
6818
+ const Jn = Oi, jc = Fi.EventEmitter, Gc = jt.inherits, {
6795
6819
  AVV_ERR_EXPOSE_ALREADY_DEFINED: dr,
6796
6820
  AVV_ERR_CALLBACK_NOT_FN: ct,
6797
- AVV_ERR_PLUGIN_NOT_VALID: $c,
6798
- AVV_ERR_ROOT_PLG_BOOTED: qc,
6799
- AVV_ERR_READY_TIMEOUT: jc
6800
- } = Xi, Gc = Oc, Lr = xc, nt = Ji("avvio"), Bt = Symbol("kAvvio"), pr = Symbol("kThenifyDoNotWrap");
6801
- function Qc(t, e, r) {
6821
+ AVV_ERR_PLUGIN_NOT_VALID: Qc,
6822
+ AVV_ERR_ROOT_PLG_BOOTED: Wc,
6823
+ AVV_ERR_READY_TIMEOUT: Hc
6824
+ } = Ji, Kc = Cc, Lr = qc, nt = Zi("avvio"), Bt = Symbol("kAvvio"), pr = Symbol("kThenifyDoNotWrap");
6825
+ function zc(t, e, r) {
6802
6826
  const n = e.expose || {}, i = n.use || "use", s = n.after || "after", o = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
6803
6827
  if (t[i])
6804
6828
  throw new dr(i);
@@ -6808,7 +6832,7 @@ function Qc(t, e, r) {
6808
6832
  throw new dr(o);
6809
6833
  t[i] = function(c, l) {
6810
6834
  return r.use(c, l), this;
6811
- }, Object.defineProperty(t, "then", { get: Zi.bind(r) }), t[Bt] = !0, t[s] = function(c) {
6835
+ }, Object.defineProperty(t, "then", { get: es.bind(r) }), t[Bt] = !0, t[s] = function(c) {
6812
6836
  return typeof c != "function" ? r._loadRegistered() : (r.after(fr(c, this)), this);
6813
6837
  }, t[o] = function(c) {
6814
6838
  if (c && typeof c != "function")
@@ -6817,7 +6841,7 @@ function Qc(t, e, r) {
6817
6841
  }, t[a] = function(c) {
6818
6842
  if (typeof c != "function")
6819
6843
  throw new ct(a, typeof c);
6820
- return r.onClose(Yc(c, this)), this;
6844
+ return r.onClose(el(c, this)), this;
6821
6845
  }, t[u] = function(c) {
6822
6846
  if (c && typeof c != "function")
6823
6847
  throw new ct(u, typeof c);
@@ -6827,13 +6851,13 @@ function Qc(t, e, r) {
6827
6851
  function J(t, e, r) {
6828
6852
  if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof J)) {
6829
6853
  const n = new J(t, e, r);
6830
- return t && Qc(t, e, n), n;
6854
+ return t && zc(t, e, n), n;
6831
6855
  }
6832
- 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 Gc(), this._readyQ = Jn(this, es, 1), this._readyQ.pause(), this._readyQ.drain = () => {
6856
+ 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 Kc(), this._readyQ = Jn(this, ts, 1), this._readyQ.pause(), this._readyQ.drain = () => {
6833
6857
  this.emit("start"), this._readyQ.drain = Zn;
6834
- }, this._closeQ = Jn(this, zc, 1), this._closeQ.pause(), this._closeQ.drain = () => {
6858
+ }, this._closeQ = Jn(this, Zc, 1), this._closeQ.pause(), this._closeQ.drain = () => {
6835
6859
  this.emit("close"), this._closeQ.drain = Zn;
6836
- }, this._doStart = null, this._root = new Lr(this, Wc.bind(this), e, !1, 0), this._root.once("start", (n, i, s) => {
6860
+ }, this._doStart = null, this._root = new Lr(this, Yc.bind(this), e, !1, 0), this._root.once("start", (n, i, s) => {
6837
6861
  const o = this.pluginTree.start(null, i, s);
6838
6862
  this._root.once("loaded", (a, u, c) => {
6839
6863
  this.pluginTree.stop(o, c);
@@ -6853,19 +6877,19 @@ function J(t, e, r) {
6853
6877
  this._readyQ.resume();
6854
6878
  });
6855
6879
  }
6856
- function Wc(t, e, r) {
6880
+ function Yc(t, e, r) {
6857
6881
  this._doStart = r, e.autostart && this.start();
6858
6882
  }
6859
- Mc(J, Bc);
6883
+ Gc(J, jc);
6860
6884
  J.prototype.start = function() {
6861
6885
  return this.started = !0, k.nextTick(this._doStart), this;
6862
6886
  };
6863
6887
  J.prototype.override = function(t, e, r) {
6864
6888
  return t;
6865
6889
  };
6866
- function Hc(t) {
6890
+ function Xc(t) {
6867
6891
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
6868
- throw new $c(typeof t);
6892
+ throw new Qc(typeof t);
6869
6893
  return t;
6870
6894
  }
6871
6895
  J.prototype[Bt] = !0;
@@ -6876,10 +6900,10 @@ J.prototype._loadRegistered = function() {
6876
6900
  const t = this._current[0];
6877
6901
  return !this.started && !this.booted && k.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
6878
6902
  };
6879
- Object.defineProperty(J.prototype, "then", { get: Zi });
6903
+ Object.defineProperty(J.prototype, "then", { get: es });
6880
6904
  J.prototype._addPlugin = function(t, e, r) {
6881
- if (t = Hc(t), e = e || {}, this.booted)
6882
- throw new qc();
6905
+ if (t = Xc(t), e = e || {}, this.booted)
6906
+ throw new Wc();
6883
6907
  const n = this._current[0], i = new Lr(this, t, e, r);
6884
6908
  if (i.once("start", (s, o, a) => {
6885
6909
  const u = this.pluginTree.start(n.name, o, a);
@@ -6897,7 +6921,7 @@ J.prototype.after = function(t) {
6897
6921
  return this._loadRegistered();
6898
6922
  this._addPlugin(e.bind(this), {}, !0);
6899
6923
  function e(r, n, i) {
6900
- es.call(this, t, i);
6924
+ ts.call(this, t, i);
6901
6925
  }
6902
6926
  return this;
6903
6927
  };
@@ -6950,7 +6974,7 @@ J.prototype.toJSON = function() {
6950
6974
  };
6951
6975
  function Zn() {
6952
6976
  }
6953
- function Zi() {
6977
+ function es() {
6954
6978
  if (this.booted) {
6955
6979
  nt("thenify returning null because we are already booted");
6956
6980
  return;
@@ -6961,7 +6985,7 @@ function Zi() {
6961
6985
  }
6962
6986
  return nt("thenify"), (t, e) => this._loadRegistered().then(() => (this[pr] = !0, t(this._server)), e);
6963
6987
  }
6964
- function es(t, e) {
6988
+ function ts(t, e) {
6965
6989
  const r = this._server, n = this._error;
6966
6990
  let i;
6967
6991
  if (this._error = null, t.length === 0)
@@ -6974,14 +6998,14 @@ function es(t, e) {
6974
6998
  };
6975
6999
  t.length === 2 ? t(n, s) : t(n, r, s);
6976
7000
  } else
6977
- Kc.call(this, t, n, r, e);
7001
+ Jc.call(this, t, n, r, e);
6978
7002
  }
6979
- function Kc(t, e, r, n) {
7003
+ function Jc(t, e, r, n) {
6980
7004
  const i = t.name;
6981
7005
  nt("setting up ready timeout", i, this._timeout);
6982
7006
  let s = setTimeout(() => {
6983
7007
  nt("timed out", i), s = null;
6984
- const a = new jc(i);
7008
+ const a = new Hc(i);
6985
7009
  a.fn = t, this._error = a, n(a);
6986
7010
  }, this._timeout);
6987
7011
  t.length === 2 ? t(e, o.bind(this)) : t(e, r, o.bind(this));
@@ -6989,7 +7013,7 @@ function Kc(t, e, r, n) {
6989
7013
  s && (clearTimeout(s), this._error = a, n(this._error));
6990
7014
  }
6991
7015
  }
6992
- function zc(t, e) {
7016
+ function Zc(t, e) {
6993
7017
  const r = this._server, n = t[this._isOnCloseHandlerKey];
6994
7018
  if (t.length === 0 || t.length === 1) {
6995
7019
  let i;
@@ -6999,7 +7023,7 @@ function zc(t, e) {
6999
7023
  )) : k.nextTick(e);
7000
7024
  } else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
7001
7025
  }
7002
- function Yc(t, e) {
7026
+ function el(t, e) {
7003
7027
  return r.bind(e);
7004
7028
  function r(n, i) {
7005
7029
  let s;
@@ -7029,8 +7053,8 @@ Dr.exports.express = function(t) {
7029
7053
  }
7030
7054
  });
7031
7055
  };
7032
- var Xc = Dr.exports;
7033
- const Jc = /* @__PURE__ */ Oa(Xc);
7056
+ var tl = Dr.exports;
7057
+ const rl = /* @__PURE__ */ Ca(tl);
7034
7058
  (function() {
7035
7059
  if (window.requestAnimationFrame && window.cancelAnimationFrame)
7036
7060
  return;
@@ -7048,20 +7072,20 @@ const Jc = /* @__PURE__ */ Oa(Xc);
7048
7072
  }, window.cancelAnimationFrame = clearTimeout;
7049
7073
  }
7050
7074
  })();
7051
- function Sl(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
7052
- const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", s = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", o = Jc(/* @__PURE__ */ Object.create({}), { autostart: !1 });
7053
- return o.use(Ro, {
7075
+ function Tl(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
7076
+ const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", s = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", o = rl(/* @__PURE__ */ Object.create({}), { autostart: !1 });
7077
+ return o.use(Fo, {
7054
7078
  hideFriends: n.hideFriends,
7055
7079
  skipOnboarding: n.skipOnboarding,
7056
7080
  betPack: n.betPack,
7057
7081
  friendsTab: n.friendsTab,
7058
7082
  theme: n.theme,
7059
7083
  themeMode: n.themeMode
7060
- }), o.use(To, { onDeepLinkHandled: n?.onDeepLinkHandled }), o.use(No, { videoPlayerController: n?.videoPlayerController }), o.use(Co, {
7084
+ }), o.use(No, { onDeepLinkHandled: n?.onDeepLinkHandled }), o.use(Po, { videoPlayerController: n?.videoPlayerController }), o.use(Do, {
7061
7085
  onContentActivate: n?.onContentActivate,
7062
7086
  withAd: n?.withAd,
7063
7087
  withAdNotification: n?.withAdNotification
7064
- }), o.use(js, { sdkKey: t, host: i, analyticsHost: s, version: n?.version, webOS: n?.webOS }), o.use(Ks), o.use(ko), o.use(qo), o.use(yo), o.use(Ia), o.use(Wo), o.use(ha), o.after((a, u, c) => {
7088
+ }), o.use(Hs, { sdkKey: t, host: i, analyticsHost: s, version: n?.version, webOS: n?.webOS }), o.use(Js), o.use(Ro), o.use(Wo), o.use(So), o.use(La), o.use(Yo), o.use(ba), o.after((a, u, c) => {
7065
7089
  if (a)
7066
7090
  throw a;
7067
7091
  u.ready(), c();
@@ -7074,5 +7098,5 @@ function Sl(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
7074
7098
  }), o;
7075
7099
  }
7076
7100
  export {
7077
- Sl as StreamLayer
7101
+ Tl as StreamLayer
7078
7102
  };