@streamlayer/sdk-web 1.6.5 → 1.6.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,28 +1,28 @@
1
- import { pino as Si } from "pino";
2
- import { QuestionType as _, QuestionStatus as Z, PromotionType as W, NotificationEnabled as $r, SilenceSetting as wi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
1
+ import { pino as wi } from "pino";
2
+ import { QuestionType as _, QuestionStatus as Z, PromotionType as W, NotificationEnabled as $r, SilenceSetting as Ai } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
3
  import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
4
  import { SdkOverlayType as R } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
5
5
  import { InvitationCategory as Br, InvitationFrom as Mr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
- import { computed as Ai, map as Ei, atom as kt, batched as qr, onMount as Sr } from "nanostores";
6
+ import { computed as Ei, map as Ii, atom as kt, batched as qr, onMount as Sr } from "nanostores";
7
7
  import { nanoid as ir } from "nanoid";
8
- import { ConnectError as rt, Code as se, createContextKey as jr, createPromiseClient as Ur, createContextValues as Ii } from "@connectrpc/connect";
8
+ import { ConnectError as rt, Code as se, createContextKey as jr, createClient as Ur, createContextValues as Ti } from "@connectrpc/connect";
9
9
  import { createGrpcWebTransport as xr } from "@connectrpc/connect-web";
10
10
  import { nanoquery as Qr } from "@nanostores/query";
11
- import { Events as Tn } from "@streamlayer/sl-eslib/sports/events/events_connect";
11
+ import { Events as On } from "@streamlayer/sl-eslib/sports/events/events_connect";
12
12
  import { Client as it } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
13
13
  import { Users as wr } from "@streamlayer/sl-eslib/users/users_connect";
14
14
  import { Feed as te } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
15
- import { Leaderboard as On } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
15
+ import { Leaderboard as _n } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
16
  import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
17
- import { LinksClient as Ti } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
17
+ import { LinksClient as Oi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
18
  import { Kind as Q, TopicSubType as Ae, TopicType as x, PollOpenedFrom as Y, Category as z, ScreenOrientation as Gr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
- import { AnalyticsService as _n } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
19
+ import { AnalyticsService as Ln } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
20
  import { InteractionActionType as Kr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
- import { NotificationKind as pe, NotificationType as zr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
- function Oi(t) {
21
+ import { NotificationKind as he, NotificationType as zr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
+ function _i(t) {
23
23
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
24
24
  }
25
- var Ln = { exports: {} }, $ = Ln.exports = {}, ae, ue;
25
+ var Cn = { exports: {} }, $ = Cn.exports = {}, ae, ue;
26
26
  function or() {
27
27
  throw new Error("setTimeout has not been defined");
28
28
  }
@@ -41,7 +41,7 @@ function sr() {
41
41
  ue = sr;
42
42
  }
43
43
  })();
44
- function Cn(t) {
44
+ function kn(t) {
45
45
  if (ae === setTimeout)
46
46
  return setTimeout(t, 0);
47
47
  if ((ae === or || !ae) && setTimeout)
@@ -56,7 +56,7 @@ function Cn(t) {
56
56
  }
57
57
  }
58
58
  }
59
- function _i(t) {
59
+ function Li(t) {
60
60
  if (ue === clearTimeout)
61
61
  return clearTimeout(t);
62
62
  if ((ue === sr || !ue) && clearTimeout)
@@ -71,20 +71,20 @@ function _i(t) {
71
71
  }
72
72
  }
73
73
  }
74
- var be = [], Qe = !1, _e, ht = -1;
75
- function Li() {
76
- !Qe || !_e || (Qe = !1, _e.length ? be = _e.concat(be) : ht = -1, be.length && kn());
74
+ var ve = [], Qe = !1, _e, ht = -1;
75
+ function Ci() {
76
+ !Qe || !_e || (Qe = !1, _e.length ? ve = _e.concat(ve) : ht = -1, ve.length && Pn());
77
77
  }
78
- function kn() {
78
+ function Pn() {
79
79
  if (!Qe) {
80
- var t = Cn(Li);
80
+ var t = kn(Ci);
81
81
  Qe = !0;
82
- for (var e = be.length; e; ) {
83
- for (_e = be, be = []; ++ht < e; )
82
+ for (var e = ve.length; e; ) {
83
+ for (_e = ve, ve = []; ++ht < e; )
84
84
  _e && _e[ht].run();
85
- ht = -1, e = be.length;
85
+ ht = -1, e = ve.length;
86
86
  }
87
- _e = null, Qe = !1, _i(t);
87
+ _e = null, Qe = !1, Li(t);
88
88
  }
89
89
  }
90
90
  $.nextTick = function(t) {
@@ -92,12 +92,12 @@ $.nextTick = function(t) {
92
92
  if (arguments.length > 1)
93
93
  for (var r = 1; r < arguments.length; r++)
94
94
  e[r - 1] = arguments[r];
95
- be.push(new Pn(t, e)), be.length === 1 && !Qe && Cn(kn);
95
+ ve.push(new Nn(t, e)), ve.length === 1 && !Qe && kn(Pn);
96
96
  };
97
- function Pn(t, e) {
97
+ function Nn(t, e) {
98
98
  this.fun = t, this.array = e;
99
99
  }
100
- Pn.prototype.run = function() {
100
+ Nn.prototype.run = function() {
101
101
  this.fun.apply(null, this.array);
102
102
  };
103
103
  $.title = "browser";
@@ -106,17 +106,17 @@ $.env = {};
106
106
  $.argv = [];
107
107
  $.version = "";
108
108
  $.versions = {};
109
- function ve() {
109
+ function Se() {
110
110
  }
111
- $.on = ve;
112
- $.addListener = ve;
113
- $.once = ve;
114
- $.off = ve;
115
- $.removeListener = ve;
116
- $.removeAllListeners = ve;
117
- $.emit = ve;
118
- $.prependListener = ve;
119
- $.prependOnceListener = ve;
111
+ $.on = Se;
112
+ $.addListener = Se;
113
+ $.once = Se;
114
+ $.off = Se;
115
+ $.removeListener = Se;
116
+ $.removeAllListeners = Se;
117
+ $.emit = Se;
118
+ $.prependListener = Se;
119
+ $.prependOnceListener = Se;
120
120
  $.listeners = function(t) {
121
121
  return [];
122
122
  };
@@ -132,8 +132,8 @@ $.chdir = function(t) {
132
132
  $.umask = function() {
133
133
  return 0;
134
134
  };
135
- var Ci = Ln.exports;
136
- const E = /* @__PURE__ */ Oi(Ci), ki = Si({
135
+ var ki = Cn.exports;
136
+ const E = /* @__PURE__ */ _i(ki), Pi = wi({
137
137
  level: "trace",
138
138
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -141,23 +141,23 @@ const E = /* @__PURE__ */ Oi(Ci), ki = Si({
141
141
  console.log(t);
142
142
  }
143
143
  }
144
- }), Se = (t, e) => ki.child({ name: t }, e);
145
- class Pi extends Event {
144
+ }), de = (t, e) => Pi.child({ name: t }, e);
145
+ class Ni extends Event {
146
146
  slEventBus;
147
147
  constructor(e, r) {
148
148
  super(e), this.slEventBus = r;
149
149
  }
150
150
  }
151
- const Ni = Se("event-bus");
152
- class Fi {
151
+ const Fi = de("event-bus");
152
+ class Di {
153
153
  name;
154
154
  listeners;
155
155
  constructor(e = "sl-event-bus") {
156
156
  this.name = e, this.listeners = /* @__PURE__ */ new Set();
157
157
  }
158
158
  emit = (e, r) => {
159
- const n = new Pi(this.name, { ...r, type: e });
160
- Ni.debug(n, "Emitting event"), window.dispatchEvent(n);
159
+ const n = new Ni(this.name, { ...r, type: e });
160
+ Fi.debug(n, "Emitting event"), window.dispatchEvent(n);
161
161
  };
162
162
  listen(e) {
163
163
  return window.addEventListener(this.name, e), this.listeners.add(e), () => {
@@ -173,7 +173,7 @@ class Fi {
173
173
  }), this.listeners.clear();
174
174
  };
175
175
  }
176
- class Di {
176
+ class Ri {
177
177
  }
178
178
  window.slStore = /* @__PURE__ */ Object.create(null);
179
179
  class Pt {
@@ -192,9 +192,9 @@ class Pt {
192
192
  return this.store;
193
193
  }
194
194
  }
195
- const Ri = (t) => {
195
+ const Vi = (t) => {
196
196
  const e = Object.keys(t);
197
- return Ai(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
197
+ return Ei(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
198
198
  };
199
199
  class Le extends Pt {
200
200
  getValues = () => this.getStore().get();
@@ -203,12 +203,12 @@ class Le extends Pt {
203
203
  subscribe = (...e) => this.getStore().subscribe(...e);
204
204
  unsubscribe = () => this.getStore().off();
205
205
  }
206
- const J = (t) => Ei(t);
207
- var ye;
206
+ const J = (t) => Ii(t);
207
+ var me;
208
208
  (function(t) {
209
209
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
210
- })(ye || (ye = {}));
211
- const Vi = {
210
+ })(me || (me = {}));
211
+ const $i = {
212
212
  [R.BETTING]: "betting",
213
213
  [R.GAMES]: "games",
214
214
  [R.PUBLIC_CHAT]: "publicChat",
@@ -218,7 +218,7 @@ var Ze;
218
218
  (function(t) {
219
219
  t.Ready = "ready", t.Suspended = "suspended";
220
220
  })(Ze || (Ze = {}));
221
- class Nn {
221
+ class Fn {
222
222
  status;
223
223
  source;
224
224
  config;
@@ -226,7 +226,7 @@ class Nn {
226
226
  listeners = /* @__PURE__ */ new Set();
227
227
  settingsKey;
228
228
  constructor({ settings: e, ...r }, n) {
229
- this.settingsKey = Vi[r.type], this.status = kt(Ze.Suspended), this.config = new Le(J(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(J(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(J({}), `feature:settings:${this.settingsKey}`), this.source = n;
229
+ this.settingsKey = $i[r.type], this.status = kt(Ze.Suspended), this.config = new Le(J(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(J(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(J({}), `feature:settings:${this.settingsKey}`), this.source = n;
230
230
  }
231
231
  get featureConfig() {
232
232
  return this.config.getStore();
@@ -257,7 +257,7 @@ class Nn {
257
257
  }
258
258
  };
259
259
  update = (e, r) => {
260
- this.source === ye.STREAM && r === ye.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
260
+ this.source === me.STREAM && r === me.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
261
261
  };
262
262
  fireEvent(e) {
263
263
  for (const r of this.listeners.values())
@@ -315,10 +315,10 @@ class le extends Pt {
315
315
  key = () => this.getStore().key;
316
316
  off = () => this.getStore().off();
317
317
  }
318
- const M = new Fi();
319
- async function* $i(t, e) {
318
+ const M = new Di();
319
+ async function* Bi(t, e) {
320
320
  for await (const r of e) {
321
- t.response.message = r, t.received_at = Date.now(), t.id = Fn++;
321
+ t.response.message = r, t.received_at = Date.now(), t.id = Dn++;
322
322
  const n = {
323
323
  type: "__GRPC_DEVTOOLS_EXTENSION__",
324
324
  data: t
@@ -326,10 +326,10 @@ async function* $i(t, e) {
326
326
  window.postMessage(n), yield r;
327
327
  }
328
328
  }
329
- let Fn = 0;
330
- const Bi = () => (t) => async (e) => {
329
+ let Dn = 0;
330
+ const Mi = () => (t) => async (e) => {
331
331
  const r = {
332
- id: Fn++,
332
+ id: Dn++,
333
333
  name: e.url,
334
334
  stream: e.stream,
335
335
  sent_at: Date.now(),
@@ -356,7 +356,7 @@ const Bi = () => (t) => async (e) => {
356
356
  };
357
357
  return window.postMessage(i), {
358
358
  ...n,
359
- message: $i(r, n.message)
359
+ message: Bi(r, n.message)
360
360
  };
361
361
  } else {
362
362
  r.response.message = n.message, r.latency = r.received_at - r.sent_at;
@@ -380,7 +380,7 @@ const Bi = () => (t) => async (e) => {
380
380
  }
381
381
  };
382
382
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
383
- function Dn(t) {
383
+ function Rn(t) {
384
384
  return t instanceof DOMException && // everything except Firefox
385
385
  (t.code === 22 || // Firefox
386
386
  t.code === 1014 || // test name field too, because code might not be present
@@ -405,7 +405,7 @@ class We {
405
405
  try {
406
406
  this.storage.setItem(n, r);
407
407
  } catch (i) {
408
- Dn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
408
+ Rn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
409
409
  }
410
410
  };
411
411
  read = (...e) => {
@@ -420,7 +420,8 @@ var ne;
420
420
  (function(t) {
421
421
  t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
422
422
  })(ne || (ne = {}));
423
- class Mi {
423
+ const Hr = de("grpc:stream");
424
+ class qi {
424
425
  params;
425
426
  streamCancel;
426
427
  method;
@@ -453,13 +454,15 @@ class Mi {
453
454
  };
454
455
  addStateLog = (e) => {
455
456
  const r = this.state.getStore().get().log, n = `${this.options.name} ${(/* @__PURE__ */ new Date()).toISOString()}: ${e}`;
456
- if (r.push(n), this.state.setValue("log", r), localStorage.getItem("SL_DEBUG"))
457
+ if (r.push(n), this.state.setValue("log", r), localStorage.getItem("SL_DEBUG")) {
458
+ e.startsWith("received data") ? Hr.trace({ name: this.options.name, attempt: this.attempt }, "received data") : Hr.trace({ name: this.options.name, attempt: this.attempt }, e);
457
459
  try {
458
460
  window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
459
461
  ` + n);
460
462
  } catch (i) {
461
- Dn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
463
+ Rn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
462
464
  }
465
+ }
463
466
  };
464
467
  addListener = (e, r) => this.listeners.has(e) ? (this.addStateLog(`listener '${e}' not added, already exists`), () => {
465
468
  }) : (this.listeners.set(e, r), this.addStateLog(`listener '${e}' added`), () => this.removeListener(e));
@@ -527,7 +530,7 @@ class Mi {
527
530
  }
528
531
  };
529
532
  }
530
- const qi = /* @__PURE__ */ new Set([
533
+ const ji = /* @__PURE__ */ new Set([
531
534
  se.Unknown,
532
535
  se.Internal,
533
536
  se.DeadlineExceeded,
@@ -535,18 +538,18 @@ const qi = /* @__PURE__ */ new Set([
535
538
  se.FailedPrecondition,
536
539
  se.Unavailable,
537
540
  se.DataLoss
538
- ]), Hr = Se("grpc:retry"), ji = (t) => async (e) => {
541
+ ]), Wr = de("grpc:retry"), Ui = (t) => async (e) => {
539
542
  const r = e.contextValues.get(ar.retryAttempts), n = 300, i = e.contextValues.get(ar.retryDelay);
540
543
  if (e.stream || r === 0)
541
544
  return t(e);
542
- Hr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
545
+ Wr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
543
546
  for (let o = 0; ; o++)
544
547
  try {
545
548
  return await t(e);
546
549
  } catch (s) {
547
- Hr.trace({ attempt: o, error: s }, "retry attempt");
550
+ Wr.trace({ attempt: o, error: s }, "retry attempt");
548
551
  const a = rt.from(s);
549
- if (o >= r || !(a instanceof rt) || !qi.has(a.code))
552
+ if (o >= r || !(a instanceof rt) || !ji.has(a.code))
550
553
  throw s;
551
554
  const u = Math.min(i, Math.pow(2, o) * n), l = Math.round(u * (1 + Math.random()) / 2);
552
555
  await new Promise((c) => setTimeout(c, l));
@@ -554,14 +557,14 @@ const qi = /* @__PURE__ */ new Set([
554
557
  }, ar = {
555
558
  retryAttempts: jr(10, { description: "Number of attempts to retry" }),
556
559
  retryDelay: jr(3e4, { description: "Max delay between retries in milliseconds" })
557
- }, Ui = () => {
560
+ }, xi = () => {
558
561
  const t = localStorage.getItem("sl-device-id");
559
562
  if (t)
560
563
  return t;
561
564
  const e = ir();
562
565
  return localStorage.setItem("sl-device-id", e), e;
563
- }, xi = () => navigator.userAgentData?.platform || navigator.platform;
564
- class Wr {
566
+ }, Qi = () => navigator.userAgentData?.platform || navigator.platform;
567
+ class Yr {
565
568
  toJsonOptions = {
566
569
  emitDefaultValues: !1,
567
570
  enumAsInteger: !0,
@@ -581,8 +584,8 @@ class Wr {
581
584
  opts;
582
585
  constructor(e, r) {
583
586
  this.host = e, this.opts = r, this.$headers = new Le(J({
584
- "sl-device-id": Ui(),
585
- "sl-device-os": xi()
587
+ "sl-device-id": xi(),
588
+ "sl-device-os": Qi()
586
589
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
587
590
  const [n, i, o] = Qr({
588
591
  dedupeTime: r?.dedupeTime,
@@ -606,7 +609,7 @@ class Wr {
606
609
  const i = this.subscriptions.get(r);
607
610
  if (i)
608
611
  return i;
609
- const o = new Mi(this.$headers, e, r, n);
612
+ const o = new qi(this.$headers, e, r, n);
610
613
  return this.subscriptions.set(r, o), o;
611
614
  };
612
615
  removeSubscription = (e) => {
@@ -651,7 +654,7 @@ class Wr {
651
654
  ...Array.isArray(r) ? r : [r]
652
655
  ], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
653
656
  return { client: i, createRequestOptions: (l) => {
654
- const c = Ii();
657
+ const c = Ti();
655
658
  for (const f in l) {
656
659
  const p = ar[f];
657
660
  c.set(p, l[f]);
@@ -679,11 +682,11 @@ class Wr {
679
682
  n.header.set(o, i[o]);
680
683
  return r(n);
681
684
  };
682
- this.interceptors.push(e), this.interceptors.push(Bi()), this.opts?.retryable && this.interceptors.push(ji);
685
+ this.interceptors.push(e), this.interceptors.push(Mi()), this.opts?.retryable && this.interceptors.push(Ui);
683
686
  };
684
687
  }
685
- const Qi = (t, e) => {
686
- const { client: r, queryKey: n } = e.createPromiseClient(Tn, {
688
+ const Gi = (t, e) => {
689
+ const { client: r, queryKey: n } = e.createPromiseClient(On, {
687
690
  method: "retrieveEventId",
688
691
  params: [t]
689
692
  });
@@ -700,7 +703,7 @@ const Qi = (t, e) => {
700
703
  }
701
704
  }
702
705
  });
703
- }, Gi = (t, e) => {
706
+ }, Ki = (t, e) => {
704
707
  const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "getStream", params: [t] });
705
708
  return e.nanoquery.createFetcherStore(n, {
706
709
  fetcher: async (i, o, s) => s ? (await r.getStream({
@@ -708,14 +711,14 @@ const Qi = (t, e) => {
708
711
  // we are sure that id is a string
709
712
  })).data?.attributes : void 0
710
713
  });
711
- }, Ki = (t, e) => {
712
- const { client: r, queryKey: n } = e.createPromiseClient(Tn, { method: "summary", params: [t] });
714
+ }, zi = (t, e) => {
715
+ const { client: r, queryKey: n } = e.createPromiseClient(On, { method: "summary", params: [t] });
713
716
  return e.nanoquery.createFetcherStore(n, {
714
717
  fetcher: async (i, o, s) => s ? (await r.summary({
715
718
  id: s
716
719
  })).data?.attributes : void 0
717
720
  });
718
- }, zi = (t, e) => {
721
+ }, Hi = (t, e) => {
719
722
  const { queryKey: r, client: n } = e.createPromiseClient(wr, { method: "me", params: [t] });
720
723
  return e.nanoquery.createFetcherStore(r, {
721
724
  fetcher: async () => {
@@ -723,15 +726,15 @@ const Qi = (t, e) => {
723
726
  return { data: i };
724
727
  }
725
728
  });
726
- }, Hi = (t) => {
729
+ }, Wi = (t) => {
727
730
  const { client: e, createRequestOptions: r } = t.createPromiseClient(wr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
728
731
  return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
729
- }, Wi = (t, e) => {
732
+ }, Yi = (t, e) => {
730
733
  const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "get", params: [t] });
731
734
  return e.nanoquery.createFetcherStore(n, {
732
735
  fetcher: async () => (await r.get({})).data?.attributes
733
736
  });
734
- }, Yi = (t, e) => {
737
+ }, Ji = (t, e) => {
735
738
  const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "getOrganization", params: [t] });
736
739
  return e.nanoquery.createFetcherStore(n, {
737
740
  fetcher: async () => {
@@ -742,7 +745,7 @@ const Qi = (t, e) => {
742
745
  } : void 0;
743
746
  }
744
747
  });
745
- }, Ji = (t, e) => {
748
+ }, Xi = (t, e) => {
746
749
  const { client: r, queryKey: n } = e.createPromiseClient(it, {
747
750
  method: "getOrganizationAdvertising",
748
751
  params: [t]
@@ -750,61 +753,61 @@ const Qi = (t, e) => {
750
753
  return e.nanoquery.createFetcherStore(n, {
751
754
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
752
755
  });
753
- }, Xi = (t, e, r) => {
754
- t.transport = new Wr(e.host, {
756
+ }, Zi = (t, e, r) => {
757
+ t.transport = new Yr(e.host, {
755
758
  dedupeTime: 1e3 * 60 * 5,
756
759
  refetchInterval: 1e3 * 60 * 5,
757
760
  retryable: !0
758
- }), t.analyticsTransport = new Wr(e.analyticsHost), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), t.transport.$headers.subscribe((n) => {
761
+ }), t.analyticsTransport = new Yr(e.analyticsHost), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), t.transport.$headers.subscribe((n) => {
759
762
  t.analyticsTransport.$headers.getStore().set(n);
760
763
  }), t.sdk.onMount({ name: "transport" }, () => () => {
761
764
  t.transport.disconnect(), t.analyticsTransport.disconnect();
762
765
  }), r();
763
766
  };
764
- var he;
767
+ var ye;
765
768
  (function(t) {
766
769
  t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
767
- })(he || (he = {}));
770
+ })(ye || (ye = {}));
768
771
  class je extends We {
769
772
  constructor() {
770
773
  super("user");
771
774
  }
772
775
  // Schema
773
776
  setSchema = (e) => {
774
- this.write(he.SCHEMA, e);
777
+ this.write(ye.SCHEMA, e);
775
778
  };
776
- getSchema = () => this.read(he.SCHEMA);
779
+ getSchema = () => this.read(ye.SCHEMA);
777
780
  // Token
778
781
  setToken = (e) => {
779
- this.write(he.TOKEN, e);
782
+ this.write(ye.TOKEN, e);
780
783
  };
781
- getToken = () => this.read(he.TOKEN);
784
+ getToken = () => this.read(ye.TOKEN);
782
785
  // External Token
783
786
  setExternalToken = (e) => {
784
- this.write(he.EXTERNAL_TOKEN, e);
787
+ this.write(ye.EXTERNAL_TOKEN, e);
785
788
  };
786
- getExternalToken = () => this.read(he.EXTERNAL_TOKEN);
789
+ getExternalToken = () => this.read(ye.EXTERNAL_TOKEN);
787
790
  removeToken = () => {
788
- this.remove(he.TOKEN);
791
+ this.remove(ye.TOKEN);
789
792
  };
790
793
  }
791
- var me;
794
+ var ge;
792
795
  (function(t) {
793
796
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
794
- })(me || (me = {}));
795
- const Zi = (t) => {
796
- const e = new je(), r = new ee(q(e.getExternalToken()), "userKey"), n = new ee(q(e.getToken()), "userToken"), i = new le(zi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
797
+ })(ge || (ge = {}));
798
+ const eo = (t) => {
799
+ const e = new je(), r = new ee(q(e.getExternalToken()), "userKey"), n = new ee(q(e.getToken()), "userToken"), i = new le(Hi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
797
800
  if (!a)
798
801
  return s?.data?.id ? s.data.id : u === !1 ? void 0 : l;
799
- }), o = new le(Wi(n.getStore(), t), "userSettings");
802
+ }), o = new le(Yi(n.getStore(), t), "userSettings");
800
803
  return {
801
804
  userKey: r,
802
805
  userToken: n,
803
806
  user: i,
804
807
  userSettings: o
805
808
  };
806
- }, eo = (t) => {
807
- const e = new ee(q(void 0), "providerStreamId"), r = new le(Qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new le(Gi(r.getAtomStore(), t), "streamSettings"), i = new le(Ki(r.getAtomStore(), t), "streamSettings");
809
+ }, to = (t) => {
810
+ const e = new ee(q(void 0), "providerStreamId"), r = new le(Gi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new le(Ki(r.getAtomStore(), t), "streamSettings"), i = new le(zi(r.getAtomStore(), t), "streamSettings");
808
811
  return r.getAtomStore().listen((o) => {
809
812
  (o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
810
813
  }), {
@@ -813,8 +816,8 @@ const Zi = (t) => {
813
816
  streamSettings: n,
814
817
  streamSummary: i
815
818
  };
816
- }, to = (t) => {
817
- const e = new ee(q(void 0), "enabled"), r = new ee(q(me.DISABLED), "status"), n = new le(Yi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new le(Ji(n.getAtomStore(), t), "organizationAdvertising"), o = Zi(t), s = eo(t);
819
+ }, ro = (t) => {
820
+ const e = new ee(q(void 0), "enabled"), r = new ee(q(ge.DISABLED), "status"), n = new le(Ji(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new le(Xi(n.getAtomStore(), t), "organizationAdvertising"), o = eo(t), s = to(t);
818
821
  return {
819
822
  enabled: e,
820
823
  status: r,
@@ -830,10 +833,10 @@ const Zi = (t) => {
830
833
  organizationAdvertising: i
831
834
  };
832
835
  };
833
- class ro extends Pt {
836
+ class no extends Pt {
834
837
  stores;
835
838
  constructor(e) {
836
- const r = to(e), n = Ri(r);
839
+ const r = ro(e), n = Vi(r);
837
840
  super(n, "core"), this.stores = r;
838
841
  }
839
842
  getValue() {
@@ -854,17 +857,17 @@ class ro extends Pt {
854
857
  };
855
858
  unsubscribe = () => this.getStore().off();
856
859
  }
857
- const no = (t, e, r) => {
858
- t.store = new ro(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
860
+ const io = (t, e, r) => {
861
+ t.store = new no(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
859
862
  t.store.unsubscribe();
860
863
  }, r();
861
- }, io = (t) => {
862
- const { client: e } = t.createPromiseClient(On, { method: "list" });
864
+ }, oo = (t) => {
865
+ const { client: e } = t.createPromiseClient(_n, { method: "list" });
863
866
  return (r) => e.list(r);
864
- }, Rn = (t) => {
865
- const { client: e } = t.createPromiseClient(On, { method: "summary" });
867
+ }, Vn = (t) => {
868
+ const { client: e } = t.createPromiseClient(_n, { method: "summary" });
866
869
  return (r) => e.summary(r);
867
- }, oo = (t, e) => {
870
+ }, so = (t, e) => {
868
871
  const { client: r, queryKey: n } = e.createPromiseClient(wr, {
869
872
  method: "getFriends",
870
873
  params: [t]
@@ -880,7 +883,7 @@ const no = (t, e, r) => {
880
883
  }
881
884
  }
882
885
  });
883
- }, so = (t, e) => {
886
+ }, ao = (t, e) => {
884
887
  const { client: r, queryKey: n } = e.createPromiseClient(te, { method: "get", params: [t] });
885
888
  return e.nanoquery.createFetcherStore(n, {
886
889
  fetcher: async (i, o, s) => (await r.get({
@@ -889,7 +892,7 @@ const no = (t, e, r) => {
889
892
  refetchInterval: 0,
890
893
  dedupeTime: 1e3 * 60 * 60
891
894
  });
892
- }, ao = (t, e) => {
895
+ }, uo = (t, e) => {
893
896
  const { client: r, queryKey: n } = e.createPromiseClient(te, { method: "syncQuestion", params: [t] });
894
897
  return e.nanoquery.createFetcherStore(n, {
895
898
  fetcher: async (i, o, s) => {
@@ -907,20 +910,20 @@ const no = (t, e, r) => {
907
910
  // 10 minutes
908
911
  refetchInterval: 0
909
912
  });
910
- }, uo = async (t, e) => {
913
+ }, co = async (t, e) => {
911
914
  const { client: r } = e.createPromiseClient(te, { method: "item", params: [t] });
912
915
  return (await r.item({
913
916
  id: t
914
917
  })).data;
915
- }, co = (t, e) => {
918
+ }, lo = (t, e) => {
916
919
  const { client: r } = e.createStreamClient(te), n = kt({ eventId: t.get() || "", feedId: "" });
917
920
  return t.subscribe((o = "") => {
918
921
  n.set({ eventId: o, feedId: "" });
919
922
  }), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
920
- }, lo = (t, e) => {
923
+ }, fo = (t, e) => {
921
924
  const { client: r } = e.createStreamClient(te);
922
925
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
923
- }, fo = async (t, e) => {
926
+ }, po = async (t, e) => {
924
927
  const { client: r } = e.createPromiseClient(te, { method: "questionByUser", params: [t] });
925
928
  return (await r.questionByUser({
926
929
  questionId: t
@@ -933,7 +936,7 @@ const no = (t, e, r) => {
933
936
  })).data?.attributes?.question,
934
937
  dedupeTime: 1e3 * 60 * 5
935
938
  });
936
- }, Vn = async (t, e) => {
939
+ }, $n = async (t, e) => {
937
940
  if (!t)
938
941
  return;
939
942
  const { client: r } = e.createPromiseClient(te, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
@@ -943,7 +946,7 @@ const no = (t, e, r) => {
943
946
  return;
944
947
  const { options: i, notification: o, ...s } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
945
948
  return { id: s.id, question: s, promotion: a, notification: o };
946
- }, po = (t, e, r) => {
949
+ }, ho = (t, e, r) => {
947
950
  const { client: n, queryKey: i } = r.createPromiseClient(te, {
948
951
  method: "list",
949
952
  params: [t, e]
@@ -959,7 +962,7 @@ const no = (t, e, r) => {
959
962
  dedupeTime: 0,
960
963
  refetchInterval: 0
961
964
  });
962
- }, ho = (t, e) => {
965
+ }, yo = (t, e) => {
963
966
  const { client: r, queryKey: n } = e.createPromiseClient(te, {
964
967
  method: "list",
965
968
  params: [t]
@@ -980,12 +983,12 @@ const no = (t, e, r) => {
980
983
  }
981
984
  })).data?.[0];
982
985
  if (u.type === "promotion")
983
- return Vn(u.id, e);
986
+ return $n(u.id, e);
984
987
  },
985
988
  dedupeTime: 0,
986
989
  refetchInterval: 0
987
990
  });
988
- }, yo = (t, e, r) => {
991
+ }, mo = (t, e, r) => {
989
992
  const n = qr([e, r], () => {
990
993
  const a = e.get();
991
994
  if (!a)
@@ -1021,7 +1024,7 @@ var wt;
1021
1024
  (function(t) {
1022
1025
  t.SHOWED = "showed";
1023
1026
  })(wt || (wt = {}));
1024
- class mo extends We {
1027
+ class go extends We {
1025
1028
  constructor() {
1026
1029
  super("advertisement");
1027
1030
  }
@@ -1030,7 +1033,7 @@ class mo extends We {
1030
1033
  };
1031
1034
  isViewed = (e) => this.read(wt.SHOWED, e);
1032
1035
  }
1033
- const go = (t) => {
1036
+ const bo = (t) => {
1034
1037
  const e = t.data?.attributes?.question;
1035
1038
  if ((t.data?.attributes?.feedItem?.type === "promotion" ? t.data.attributes.feedItem : void 0) === void 0 || !e)
1036
1039
  return;
@@ -1041,7 +1044,7 @@ const go = (t) => {
1041
1044
  notification: i,
1042
1045
  promotion: s
1043
1046
  };
1044
- }, dt = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, bo = ({ gamOptions: t, gamBaseUrl: e }) => {
1047
+ }, dt = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, vo = ({ gamOptions: t, gamBaseUrl: e }) => {
1045
1048
  const r = `${e}?`, n = [];
1046
1049
  for (const i in t) {
1047
1050
  const o = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), s = t[i];
@@ -1056,9 +1059,9 @@ const go = (t) => {
1056
1059
  }
1057
1060
  }
1058
1061
  return r + n.join("&");
1059
- }, $e = (t) => (t?.promotion?.type === W.INGAME_IAB11_LBAR || t?.promotion?.type === W.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, vo = (t, e, r) => {
1062
+ }, $e = (t) => (t?.promotion?.type === W.INGAME_IAB11_LBAR || t?.promotion?.type === W.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, So = (t, e, r) => {
1060
1063
  let n = !1;
1061
- const i = r.transport, o = Se("advertisement"), s = new mo(), a = J({}), u = ho(t, i), l = (b) => {
1064
+ const i = r.transport, o = de("advertisement"), s = new go(), a = J({}), u = yo(t, i), l = (b) => {
1062
1065
  if (b?.fromNotification) {
1063
1066
  a.setKey("hasNotification", !1);
1064
1067
  const g = a.get(), S = g.data?.question.id, F = g.data?.promotion?.type;
@@ -1098,7 +1101,7 @@ const go = (t) => {
1098
1101
  close: () => p(g.question.id),
1099
1102
  togglePause: (S) => v(g.question.id, S),
1100
1103
  isViewed: !!s.isViewed(g.question.id)
1101
- }) : (a.setKey("loading", !0), Vn(b, i).then((S) => a.set({
1104
+ }) : (a.setKey("loading", !0), $n(b, i).then((S) => a.set({
1102
1105
  loading: !1,
1103
1106
  error: void 0,
1104
1107
  data: S,
@@ -1115,7 +1118,7 @@ const go = (t) => {
1115
1118
  a.subscribe((b, g) => {
1116
1119
  if (!(b.data?.id === g?.data?.id && b.isPaused !== g?.isPaused)) {
1117
1120
  if (b.data?.promotion?.type === W.EXTERNAL_AD && !b?.externalAd && b.data.promotion.adCampaigns?.gamOptions && b.data.promotion.adCampaigns?.gamBaseUrl) {
1118
- const S = bo(b.data.promotion.adCampaigns);
1121
+ const S = vo(b.data.promotion.adCampaigns);
1119
1122
  a.setKey("externalAd", { type: "gam", url: S });
1120
1123
  }
1121
1124
  b.data?.promotion && !b.isOpened && (M.emit("advertisement", {
@@ -1158,7 +1161,7 @@ const go = (t) => {
1158
1161
  n || (n = !0, u.subscribe((b, g) => {
1159
1162
  b.data && (!g?.data || b.data.id !== g.data.id) && f(b.data.question.id, b.data);
1160
1163
  }), e.addListener("promotion", (b) => {
1161
- const g = go(b);
1164
+ const g = bo(b);
1162
1165
  if (g) {
1163
1166
  if (g.question.status === Z.RESOLVED) {
1164
1167
  p(g.question.id), o.debug({ promotion: g }, "resolved: %o");
@@ -1177,7 +1180,7 @@ var Ce;
1177
1180
  (function(t) {
1178
1181
  t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
1179
1182
  })(Ce || (Ce = {}));
1180
- class So {
1183
+ class wo {
1181
1184
  /** sl event id */
1182
1185
  slStreamId;
1183
1186
  /** organization id */
@@ -1210,11 +1213,11 @@ class So {
1210
1213
  transport;
1211
1214
  cancels = /* @__PURE__ */ new Set();
1212
1215
  constructor(e) {
1213
- this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ee(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new ee(q(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new ee(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new le(so(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new le(po(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = ao(this.slStreamId, e.transport), this.openedQuestion = yo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1214
- this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = lo(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
1216
+ this.transport = e.transport, this.log = de("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ee(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new ee(q(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new ee(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new le(ao(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new le(ho(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = uo(this.slStreamId, e.transport), this.openedQuestion = mo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1217
+ this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = fo(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
1215
1218
  this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
1216
1219
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1217
- })), this.feedSubscription = co(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1220
+ })), this.feedSubscription = lo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1218
1221
  const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
1219
1222
  if (!(!i || i.type === _.PROMOTION)) {
1220
1223
  if (i.status === Z.RESOLVED) {
@@ -1257,7 +1260,7 @@ class So {
1257
1260
  this.activeQuestionId.off();
1258
1261
  for (const r of this.cancels)
1259
1262
  r(), this.cancels.delete(r);
1260
- }), this.advertisement = vo(this.slStreamId, this.feedSubscription, e);
1263
+ }), this.advertisement = So(this.slStreamId, this.feedSubscription, e);
1261
1264
  }
1262
1265
  /**
1263
1266
  * Get id for notifications and link with current session
@@ -1287,7 +1290,7 @@ class So {
1287
1290
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1288
1291
  };
1289
1292
  }
1290
- class wo {
1293
+ class Ao {
1291
1294
  notificationsList;
1292
1295
  store;
1293
1296
  timeouts;
@@ -1296,7 +1299,7 @@ class wo {
1296
1299
  options;
1297
1300
  logger;
1298
1301
  constructor(e) {
1299
- this.options = e, this.logger = Se("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = q(/* @__PURE__ */ new Map());
1302
+ this.options = e, this.logger = de("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = q(/* @__PURE__ */ new Map());
1300
1303
  }
1301
1304
  addToQueue = (e) => {
1302
1305
  if (this.store.has(e.id)) {
@@ -1385,7 +1388,7 @@ var At;
1385
1388
  (function(t) {
1386
1389
  t.OPENED = "opened";
1387
1390
  })(At || (At = {}));
1388
- class Ao extends We {
1391
+ class Eo extends We {
1389
1392
  constructor() {
1390
1393
  super("notification");
1391
1394
  }
@@ -1401,11 +1404,11 @@ var Ee;
1401
1404
  (function(t) {
1402
1405
  t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
1403
1406
  })(Ee || (Ee = {}));
1404
- class Eo {
1407
+ class Io {
1405
1408
  queue;
1406
1409
  storage;
1407
1410
  constructor(e = {}) {
1408
- this.storage = new Ao(), this.queue = new wo({ concurrency: 1, animationDelay: 1600, ...e });
1411
+ this.storage = new Eo(), this.queue = new Ao({ concurrency: 1, animationDelay: 1600, ...e });
1409
1412
  }
1410
1413
  isViewed = (e) => this.storage.isOpened(e);
1411
1414
  add = (e) => {
@@ -1442,8 +1445,8 @@ class Eo {
1442
1445
  this.storage.setOpened(e);
1443
1446
  };
1444
1447
  }
1445
- const Io = (t, e, r) => {
1446
- t.notifications = new Eo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1448
+ const To = (t, e, r) => {
1449
+ t.notifications = new Io(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1447
1450
  t.notifications.queue.drain();
1448
1451
  }), r();
1449
1452
  };
@@ -1451,14 +1454,14 @@ var nt;
1451
1454
  (function(t) {
1452
1455
  t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
1453
1456
  })(nt || (nt = {}));
1454
- const To = async (t, e) => {
1457
+ const Oo = async (t, e) => {
1455
1458
  const { client: r, createRequestOptions: n } = t.createPromiseClient(te, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
1456
1459
  try {
1457
1460
  return await r.submitAnswer({ data: e }, { contextValues: i });
1458
1461
  } catch (o) {
1459
1462
  throw rt.from(o)?.code === se.AlreadyExists ? new Error(nt.ALREADY_VOTED) : new Error(nt.UNKNOWN);
1460
1463
  }
1461
- }, Oo = (t, e) => {
1464
+ }, _o = (t, e) => {
1462
1465
  const { client: r, createRequestOptions: n } = t.createPromiseClient(te, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1463
1466
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1464
1467
  };
@@ -1466,7 +1469,7 @@ var Ue;
1466
1469
  (function(t) {
1467
1470
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
1468
1471
  })(Ue || (Ue = {}));
1469
- class _o extends We {
1472
+ class Lo extends We {
1470
1473
  constructor() {
1471
1474
  super("gamification-session", window.sessionStorage);
1472
1475
  }
@@ -1475,10 +1478,10 @@ class _o extends We {
1475
1478
  };
1476
1479
  readValue = (e) => this.read(...e);
1477
1480
  }
1478
- class $n extends We {
1481
+ class Bn extends We {
1479
1482
  sessionStorage;
1480
1483
  constructor() {
1481
- super("gamification"), this.sessionStorage = new _o();
1484
+ super("gamification"), this.sessionStorage = new Lo();
1482
1485
  }
1483
1486
  saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
1484
1487
  this.write(Ue.ONBOARDING, n, e, r, i);
@@ -1489,17 +1492,17 @@ class $n extends We {
1489
1492
  };
1490
1493
  getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Ue.ONBOARDING_IO, n, e, r]);
1491
1494
  }
1492
- const Lo = {
1495
+ const Co = {
1493
1496
  pageSize: 10
1494
- }, Co = (t, e, r, n, i) => {
1497
+ }, ko = (t, e, r, n, i) => {
1495
1498
  let o = 0;
1496
- const s = q({ pageSize: Lo.pageSize, page: 0 }), a = J({
1499
+ const s = q({ pageSize: Co.pageSize, page: 0 }), a = J({
1497
1500
  data: [],
1498
1501
  key: Date.now(),
1499
1502
  hasMore: !0,
1500
1503
  loading: void 0,
1501
1504
  error: void 0
1502
- }), u = io(t), l = async () => {
1505
+ }), u = oo(t), l = async () => {
1503
1506
  const p = e.get(), v = n.getStore().get().data?.map((w) => w.slId) || [];
1504
1507
  if (p && v?.length) {
1505
1508
  const w = r.get();
@@ -1531,7 +1534,7 @@ const Lo = {
1531
1534
  };
1532
1535
  }), { $store: a, fetchMore: f, invalidate: c };
1533
1536
  };
1534
- class ko extends We {
1537
+ class Po extends We {
1535
1538
  get = this.read;
1536
1539
  set = this.write;
1537
1540
  del = this.remove;
@@ -1539,32 +1542,32 @@ class ko extends We {
1539
1542
  super("deep-link-context", window.sessionStorage);
1540
1543
  }
1541
1544
  }
1542
- const Yr = "sldl", Nt = "sldl_uid", Bn = "sldl_eid", Mn = "sldl_e_eid", Po = /* @__PURE__ */ new Set([Nt, Bn, Mn]), Jr = (t) => {
1545
+ const Jr = "sldl", Nt = "sldl_uid", Mn = "sldl_eid", qn = "sldl_e_eid", No = /* @__PURE__ */ new Set([Nt, Mn, qn]), Xr = (t) => {
1543
1546
  const e = {}, r = {};
1544
1547
  for (const [n, i] of t)
1545
- Po.has(n) ? e[n] = i : r[n] = i;
1548
+ No.has(n) ? e[n] = i : r[n] = i;
1546
1549
  return { result: e, remain: r };
1547
- }, No = ({ hash: t, search: e }) => {
1548
- if (t && t.includes(Yr)) {
1550
+ }, Fo = ({ hash: t, search: e }) => {
1551
+ if (t && t.includes(Jr)) {
1549
1552
  const r = new URLSearchParams(t.substr(1));
1550
- return { hash: Jr(r) };
1553
+ return { hash: Xr(r) };
1551
1554
  }
1552
- if (e && e.includes(Yr)) {
1555
+ if (e && e.includes(Jr)) {
1553
1556
  const r = new URLSearchParams(e);
1554
- return { search: Jr(r) };
1557
+ return { search: Xr(r) };
1555
1558
  }
1556
1559
  return null;
1557
- }, Xr = Se("deep_link"), ce = {
1560
+ }, Zr = de("deep_link"), ce = {
1558
1561
  debug: (...t) => {
1559
- Xr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1562
+ Zr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1560
1563
  },
1561
1564
  trace: (...t) => {
1562
- Xr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1565
+ Zr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1563
1566
  }
1564
- }, Fo = (t, e) => {
1567
+ }, Do = (t, e) => {
1565
1568
  const { hash: r, search: n } = window.location;
1566
1569
  if (ce.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1567
- const i = No({ hash: r, search: n });
1570
+ const i = Fo({ hash: r, search: n });
1568
1571
  if (ce.debug(i, "parse deep link result"), i) {
1569
1572
  const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
1570
1573
  if (Object.keys(a).length !== 0) {
@@ -1583,8 +1586,8 @@ const Yr = "sldl", Nt = "sldl_uid", Bn = "sldl_eid", Mn = "sldl_e_eid", Po = /*
1583
1586
  }
1584
1587
  }
1585
1588
  t.setValue("parsed", !0);
1586
- }, Do = (t, e, r) => {
1587
- const n = new ko(), i = n.get("sl-deep-link-store");
1589
+ }, Ro = (t, e, r) => {
1590
+ const n = new Po(), i = n.get("sl-deep-link-store");
1588
1591
  let o = {};
1589
1592
  if (i)
1590
1593
  try {
@@ -1622,15 +1625,15 @@ const Yr = "sldl", Nt = "sldl_uid", Bn = "sldl_eid", Mn = "sldl_e_eid", Po = /*
1622
1625
  console.error(l);
1623
1626
  }
1624
1627
  };
1625
- Fo(t.deepLink.$store, s), r();
1626
- }, Ro = Se("bypass");
1627
- class Vo extends Di {
1628
+ Do(t.deepLink.$store, s), r();
1629
+ }, Vo = de("bypass");
1630
+ class $o extends Ri {
1628
1631
  $coreStore;
1629
1632
  deepLink;
1630
1633
  transport;
1631
1634
  bypassLogin;
1632
1635
  constructor(e, r, n) {
1633
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Hi(this.transport), this.connect();
1636
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Wi(this.transport), this.connect();
1634
1637
  }
1635
1638
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1636
1639
  /**
@@ -1642,7 +1645,7 @@ class Vo extends Di {
1642
1645
  login = async (e, r) => {
1643
1646
  this.$coreStore.getValues().userKey.setValue(r);
1644
1647
  const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Nt];
1645
- Ro.debug({ inviterKey: o }, "login with inviterKey");
1648
+ Vo.debug({ inviterKey: o }, "login with inviterKey");
1646
1649
  const s = await this.bypassLogin({
1647
1650
  schema: e,
1648
1651
  userKey: r,
@@ -1711,9 +1714,9 @@ class Vo extends Di {
1711
1714
  });
1712
1715
  };
1713
1716
  }
1714
- const Xe = new je(), $o = (t, e, r) => {
1715
- t.auth = new Vo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1716
- n === me.READY && t.auth.reLogin();
1717
+ const Xe = new je(), Bo = (t, e, r) => {
1718
+ t.auth = new $o(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1719
+ n === ge.READY && t.auth.reLogin();
1717
1720
  }), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
1718
1721
  if (!(Xe.getSchema() === n && Xe.getExternalToken() === i && t.transport.getHeader("authorization")))
1719
1722
  try {
@@ -1724,14 +1727,14 @@ const Xe = new je(), $o = (t, e, r) => {
1724
1727
  }, t.sdk.logout = () => {
1725
1728
  t.auth.logout(), Xe.clear();
1726
1729
  }, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
1727
- }, Zr = Se("video_player"), ft = {
1730
+ }, en = de("video_player"), ft = {
1728
1731
  debug: (...t) => {
1729
- Zr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1732
+ en.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1730
1733
  },
1731
1734
  trace: (...t) => {
1732
- Zr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1735
+ en.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1733
1736
  }
1734
- }, Bo = (t, e, r) => {
1737
+ }, Mo = (t, e, r) => {
1735
1738
  t.videoPlayer = {
1736
1739
  controllers: /* @__PURE__ */ new Set()
1737
1740
  }, t.sdk.addVideoPlayerController = (n) => {
@@ -1749,13 +1752,13 @@ const Xe = new je(), $o = (t, e, r) => {
1749
1752
  }
1750
1753
  }
1751
1754
  }, r();
1752
- }, Mo = {
1755
+ }, qo = {
1753
1756
  [_.FACTOID]: "insight",
1754
1757
  [_.POLL]: "poll",
1755
1758
  [_.TRIVIA]: "trivia",
1756
1759
  [_.PREDICTION]: "prediction",
1757
1760
  [_.TWEET]: "tweet"
1758
- }, qo = (t, e, r) => {
1761
+ }, jo = (t, e, r) => {
1759
1762
  t.sdk.uiState = J({}), t.ui = {
1760
1763
  enableAppNotification: function() {
1761
1764
  t.sdk.uiState.setKey("appNotification", !0);
@@ -1782,7 +1785,7 @@ const Xe = new je(), $o = (t, e, r) => {
1782
1785
  };
1783
1786
  t.onQuestionActivate = ({ questionType: i, ...o }) => {
1784
1787
  if (t.ui.onContentActivate) {
1785
- const s = o.type || i && Mo[i] || "question";
1788
+ const s = o.type || i && qo[i] || "question";
1786
1789
  t.ui.onContentActivate({ ...o, type: s });
1787
1790
  }
1788
1791
  }, t.sdk.onMount({ name: "ui" }, () => {
@@ -1858,7 +1861,7 @@ const Xe = new je(), $o = (t, e, r) => {
1858
1861
  o(), s();
1859
1862
  };
1860
1863
  }), r();
1861
- }, jo = (t, e, r) => {
1864
+ }, Uo = (t, e, r) => {
1862
1865
  const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1863
1866
  t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = J(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
1864
1867
  if (i.has(s)) {
@@ -1873,19 +1876,19 @@ const Xe = new je(), $o = (t, e, r) => {
1873
1876
  }, t.sdk.initializeApp = async (s) => {
1874
1877
  if (t.contextConfig = s, t.stores.enabled.get() === "on")
1875
1878
  return { enabled: !0 };
1876
- t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(me.INITIALIZATION);
1879
+ t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(ge.INITIALIZATION);
1877
1880
  try {
1878
1881
  const a = await t.stores.organizationSettings.getValue();
1879
- return a ? (t.stores.status.setValue(me.READY), { enabled: !!a }) : (t.stores.status.setValue(me.FAILED), { err: "failed" });
1882
+ return a ? (t.stores.status.setValue(ge.READY), { enabled: !!a }) : (t.stores.status.setValue(ge.FAILED), { err: "failed" });
1880
1883
  } catch (a) {
1881
- return t.stores.enabled.setValue(), t.stores.status.setValue(me.FAILED), { err: `${a}` };
1884
+ return t.stores.enabled.setValue(), t.stores.status.setValue(ge.FAILED), { err: `${a}` };
1882
1885
  }
1883
1886
  }, t.sdk.disableApp = () => {
1884
- t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(me.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
1887
+ t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(ge.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
1885
1888
  }, t.sdk.createEventSession = (s) => {
1886
1889
  t.stores.providerStreamId.setValue(s);
1887
1890
  }, r();
1888
- }, Uo = (t, e) => {
1891
+ }, xo = (t, e) => {
1889
1892
  const { client: r, queryKey: n } = t.createPromiseClient(it, {
1890
1893
  method: "generateDeepLink",
1891
1894
  params: e
@@ -1906,29 +1909,29 @@ const Xe = new je(), $o = (t, e, r) => {
1906
1909
  // 24 hours
1907
1910
  refetchInterval: 0
1908
1911
  });
1909
- }, xo = (t, { web: e, mobile: r }) => {
1910
- const { client: n } = t.createPromiseClient(Ti, { method: "generate" });
1912
+ }, Qo = (t, { web: e, mobile: r }) => {
1913
+ const { client: n } = t.createPromiseClient(Oi, { method: "generate" });
1911
1914
  return n.generate({ web: e, mobile: r });
1912
- }, en = (t, e) => {
1915
+ }, tn = (t, e) => {
1913
1916
  const r = new URLSearchParams(t);
1914
1917
  for (const [n, i] of Object.entries(e))
1915
1918
  r.append(n, i);
1916
1919
  return r.toString();
1917
- }, Qo = (t, e, r, n) => {
1920
+ }, Go = (t, e, r, n) => {
1918
1921
  const i = J({});
1919
- return Sr(i, () => Uo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
1922
+ return Sr(i, () => xo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
1920
1923
  const l = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
1921
1924
  [Nt]: c,
1922
- [Bn]: f,
1923
- [Mn]: p
1925
+ [Mn]: f,
1926
+ [qn]: p
1924
1927
  };
1925
1928
  if (!u && l) {
1926
1929
  i.setKey("loading", !0);
1927
1930
  let w = window.location.search, b = window.location.hash;
1928
- w && b || b ? w = `?${en(w, v)}` : b = `#${en("", v)}`;
1931
+ w && b || b ? w = `?${tn(w, v)}` : b = `#${tn("", v)}`;
1929
1932
  const g = window.location.origin + window.location.pathname + w + b;
1930
1933
  try {
1931
- const S = await xo(t, { web: g, mobile: l });
1934
+ const S = await Qo(t, { web: g, mobile: l });
1932
1935
  i.set({
1933
1936
  data: S.data?.link,
1934
1937
  loading: !1
@@ -1948,7 +1951,7 @@ var B;
1948
1951
  (function(t) {
1949
1952
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
1950
1953
  })(B || (B = {}));
1951
- const Go = (t, e, r, n) => {
1954
+ const Ko = (t, e, r, n) => {
1952
1955
  const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
1953
1956
  i && r.add({
1954
1957
  type: Ee.ONBOARDING,
@@ -1995,11 +1998,11 @@ const Go = (t, e, r, n) => {
1995
1998
  } catch (s) {
1996
1999
  console.error(s);
1997
2000
  }
1998
- }, Ko = (t, e, r, n) => {
2001
+ }, zo = (t, e, r, n) => {
1999
2002
  let i = !1;
2000
- const o = new $n(), s = q(B.Unset);
2003
+ const o = new Bn(), s = q(B.Unset);
2001
2004
  s.subscribe((l) => {
2002
- l !== B.Unset && (l === B.Optional || l === B.Required ? i === !1 && (Go(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), l === B.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
2005
+ l !== B.Unset && (l === B.Optional || l === B.Required ? i === !1 && (Ko(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), l === B.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
2003
2006
  userId: e.userId.get() || "",
2004
2007
  organizationId: e.organizationId.get() || "",
2005
2008
  eventId: e.slStreamId.get() || ""
@@ -2015,7 +2018,7 @@ const Go = (t, e, r, n) => {
2015
2018
  }))), { $store: s, submitInplay: async () => {
2016
2019
  const l = e.slStreamId.get();
2017
2020
  if (l) {
2018
- await Oo(r, l), s.set(B.Completed), o.saveOnboardingStatus({
2021
+ await _o(r, l), s.set(B.Completed), o.saveOnboardingStatus({
2019
2022
  organizationId: e.organizationId.get() || "",
2020
2023
  userId: e.userId.get() || "",
2021
2024
  eventId: l
@@ -2027,8 +2030,8 @@ const Go = (t, e, r, n) => {
2027
2030
  n.close(c);
2028
2031
  }
2029
2032
  } };
2030
- }, zo = (t, e, r, n) => {
2031
- const i = J(void 0), o = Rn(n), s = async () => {
2033
+ }, Ho = (t, e, r, n) => {
2034
+ const i = J(void 0), o = Vn(n), s = async () => {
2032
2035
  const u = t.get(), l = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
2033
2036
  if (!c)
2034
2037
  return;
@@ -2047,15 +2050,15 @@ const Go = (t, e, r, n) => {
2047
2050
  u(), l(), c();
2048
2051
  };
2049
2052
  }), { $store: i, invalidate: a };
2050
- }, Ho = async (t, e, r, n, i) => {
2051
- const o = Rn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], l = {
2053
+ }, Wo = async (t, e, r, n, i) => {
2054
+ const o = Vn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], l = {
2052
2055
  eventId: s,
2053
2056
  userId: n,
2054
2057
  usersIds: [...u, a]
2055
2058
  };
2056
2059
  return (await o(l)).data?.attributes?.summary;
2057
- }, Wo = /* @__PURE__ */ new Set([_.POLL, _.PREDICTION, _.TRIVIA]);
2058
- class Yo extends Nn {
2060
+ }, Yo = /* @__PURE__ */ new Set([_.POLL, _.PREDICTION, _.TRIVIA]);
2061
+ class Jo extends Fn {
2059
2062
  /** user statistics (leaderboard panel) */
2060
2063
  userSummary;
2061
2064
  /** feed list (pick history) */
@@ -2093,7 +2096,7 @@ class Yo extends Nn {
2093
2096
  cancels = /* @__PURE__ */ new Set();
2094
2097
  onQuestionActivate;
2095
2098
  constructor(e, r, n) {
2096
- super(e, r), this.background = new So(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 = new $n(), this.feedList = this.background.feedList, this.friends = new le(oo(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.onboardingProcessed = q(!n.sdk.withAuth), this.leaderboardId = new ee(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Ko(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Qo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = zo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Co(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2099
+ super(e, r), this.background = new wo(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 = new Bn(), this.feedList = this.background.feedList, this.friends = new le(so(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.onboardingProcessed = q(!n.sdk.withAuth), this.leaderboardId = new ee(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = zo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Go(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Ho(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = ko(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2097
2100
  o?.summary && i?.summary && this.leaderboardList.invalidate();
2098
2101
  })), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
2099
2102
  (o === void 0 || i !== B.Unset) && this.background.activeQuestionId.invalidate();
@@ -2132,7 +2135,7 @@ class Yo extends Nn {
2132
2135
  });
2133
2136
  await v.get().promise;
2134
2137
  let b = v.get().data;
2135
- b || (b = await fo(s, this.transport)), w(), window.requestAnimationFrame(() => {
2138
+ b || (b = await po(s, this.transport)), w(), window.requestAnimationFrame(() => {
2136
2139
  v.invalidate();
2137
2140
  }), p || (p = b?.answers.find(({ youVoted: K }) => K)?.id);
2138
2141
  const g = a.find(({ correct: K }) => K), S = p ? a.find(({ id: K }) => K === p) : void 0, F = !!S?.correct;
@@ -2259,7 +2262,7 @@ class Yo extends Nn {
2259
2262
  }
2260
2263
  };
2261
2264
  try {
2262
- await To(this.transport, { questionId: e, answerId: r }), s();
2265
+ await Oo(this.transport, { questionId: e, answerId: r }), s();
2263
2266
  } catch (a) {
2264
2267
  if (a.message === nt.ALREADY_VOTED) {
2265
2268
  this.userSummary.invalidate();
@@ -2290,7 +2293,7 @@ class Yo extends Nn {
2290
2293
  }
2291
2294
  }), this.background.openQuestion(e, r);
2292
2295
  };
2293
- getFeedItem = (e) => uo(e, this.transport);
2296
+ getFeedItem = (e) => co(e, this.transport);
2294
2297
  isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
2295
2298
  closeQuestion = (e) => (e && this.onQuestionActivate({
2296
2299
  stage: "deactivate",
@@ -2312,7 +2315,7 @@ class Yo extends Nn {
2312
2315
  }
2313
2316
  const n = { ...r };
2314
2317
  try {
2315
- const i = await Ho(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2318
+ const i = await Wo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2316
2319
  i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
2317
2320
  } catch (i) {
2318
2321
  console.error(i);
@@ -2330,8 +2333,8 @@ class Yo extends Nn {
2330
2333
  */
2331
2334
  showInApp = (e) => {
2332
2335
  const r = this.onboardingStatus.$store.get();
2333
- if (e && e.data && r && r !== B.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== wi.ON && e.data.question.status === Z.ACTIVE && !e.data.question.marketClosed) {
2334
- if (Wo.has(e.data.question.type))
2336
+ if (e && e.data && r && r !== B.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Ai.ON && e.data.question.status === Z.ACTIVE && !e.data.question.marketClosed) {
2337
+ if (Yo.has(e.data.question.type))
2335
2338
  this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
2336
2339
  type: Ee.QUESTION,
2337
2340
  action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
@@ -2406,15 +2409,15 @@ class Yo extends Nn {
2406
2409
  }
2407
2410
  };
2408
2411
  }
2409
- const Jo = {
2412
+ const Xo = {
2410
2413
  [R.GAMES]: !0
2411
2414
  };
2412
- class Xo extends Nn {
2415
+ class Zo extends Fn {
2413
2416
  constructor(e, r) {
2414
2417
  super(e, r);
2415
2418
  }
2416
2419
  }
2417
- const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es = (t, e, r) => {
2420
+ const es = (t, e, r) => t.type === R.GAMES ? new Jo(t, e, r) : new Zo(t, e), ts = (t, e, r) => {
2418
2421
  t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new ee(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new ee(q(R.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
2419
2422
  t.activeFeature.setValue(n);
2420
2423
  }, t.sdk.closeFeature = (n = !1) => {
@@ -2424,9 +2427,9 @@ const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es
2424
2427
  const o = t.sdk.featuresList.getValue();
2425
2428
  o && o.delete(i), t.sdk.featuresList.setValue(o);
2426
2429
  }
2427
- }, t.initFeature = (n, i = ye.ORGANIZATION) => {
2428
- if (n.type in Jo && !t.features.has(n.type)) {
2429
- const o = Zo(n, i, t);
2430
+ }, t.initFeature = (n, i = me.ORGANIZATION) => {
2431
+ if (n.type in Xo && !t.features.has(n.type)) {
2432
+ const o = es(n, i, t);
2430
2433
  t.features.set(n.type, o);
2431
2434
  let s = t.sdk.featuresList.getValue();
2432
2435
  s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
@@ -2441,12 +2444,12 @@ const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es
2441
2444
  const n = await t.stores.organizationSettings.getValue();
2442
2445
  t.features.clear(), t.sdk.featuresList.setValue(/* @__PURE__ */ new Set());
2443
2446
  for (const i of n?.overlays || [])
2444
- t.initFeature(i, ye.ORGANIZATION);
2447
+ t.initFeature(i, me.ORGANIZATION);
2445
2448
  }, t.stores.providerStreamId.listen((n) => {
2446
2449
  n || t.reinitializeFeatures();
2447
2450
  }), t.storeSubscribe = () => {
2448
2451
  const n = (o, s) => {
2449
- if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === ye.ORGANIZATION))
2452
+ if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === me.ORGANIZATION))
2450
2453
  for (const a of s.overlays)
2451
2454
  a.sdkEnable === !0 && (t.features.has(a.type) ? t.updateFeature(a, o) : t.initFeature(a, o));
2452
2455
  }, i = {
@@ -2462,7 +2465,7 @@ const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es
2462
2465
  organizationSettings: (o) => {
2463
2466
  if (o.data)
2464
2467
  try {
2465
- n(ye.ORGANIZATION, o.data);
2468
+ n(me.ORGANIZATION, o.data);
2466
2469
  } catch (s) {
2467
2470
  console.log(s);
2468
2471
  }
@@ -2470,7 +2473,7 @@ const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es
2470
2473
  streamSettings: (o) => {
2471
2474
  if (o.data)
2472
2475
  try {
2473
- n(ye.STREAM, o.data);
2476
+ n(me.STREAM, o.data);
2474
2477
  } catch (s) {
2475
2478
  console.log(s);
2476
2479
  }
@@ -2479,7 +2482,7 @@ const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es
2479
2482
  t.store.subscribe(i);
2480
2483
  }, r();
2481
2484
  };
2482
- class ts {
2485
+ class rs {
2483
2486
  analytics;
2484
2487
  constructor(e) {
2485
2488
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2515,7 +2518,7 @@ class ts {
2515
2518
  });
2516
2519
  };
2517
2520
  }
2518
- class rs {
2521
+ class ns {
2519
2522
  analytics;
2520
2523
  constructor(e) {
2521
2524
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2552,7 +2555,7 @@ class rs {
2552
2555
  });
2553
2556
  };
2554
2557
  }
2555
- const ns = {
2558
+ const is = {
2556
2559
  [W.UNSET]: Ae.UNSET,
2557
2560
  [W.INGAME_IAB21]: Ae.PROMOTION_INGAME_IAB21,
2558
2561
  [W.INGAME_IAB11_LBAR]: Ae.PROMOTION_INGAME_IAB11_LBAR,
@@ -2560,8 +2563,8 @@ const ns = {
2560
2563
  [W.INGAME_IAB21_LBAR]: Ae.PROMOTION_INGAME_IAB21_LBAR,
2561
2564
  [W.INGAME_IAB61]: Ae.PROMOTION_INGAME_IAB61,
2562
2565
  [W.EXTERNAL_AD]: Ae.PROMOTION_GAM
2563
- }, cr = (t) => t ? ns[t] : Ae.UNSET;
2564
- class is {
2566
+ }, cr = (t) => t ? is[t] : Ae.UNSET;
2567
+ class os {
2565
2568
  analytics;
2566
2569
  constructor(e) {
2567
2570
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2675,8 +2678,8 @@ const et = {
2675
2678
  [_.TRIVIA]: x.POLLS_TRIVIA,
2676
2679
  [_.TWEET]: x.POLLS_TWITTER
2677
2680
  };
2678
- _.UNSET + "", pe.UNSET, _.FACTOID + "", pe.POLLS, _.POLL + "", pe.POLLS, _.PREDICTION + "", pe.POLLS, _.PROMOTION + "", pe.POLLS, _.TRIVIA + "", pe.POLLS, _.TWEET + "", pe.POLLS;
2679
- const os = {
2681
+ _.UNSET + "", he.UNSET, _.FACTOID + "", he.POLLS, _.POLL + "", he.POLLS, _.PREDICTION + "", he.POLLS, _.PROMOTION + "", he.POLLS, _.TRIVIA + "", he.POLLS, _.TWEET + "", he.POLLS;
2682
+ const ss = {
2680
2683
  [R.UNSET]: z.UNSET,
2681
2684
  [R.INPLAY]: z.INPLAY,
2682
2685
  [R.MESSAGING]: z.MESSAGING,
@@ -2696,7 +2699,7 @@ const os = {
2696
2699
  [R.HIGHLIGHTS]: z.HIGHLIGHTS,
2697
2700
  [R.PUBLIC_CHAT]: z.PUBLIC_CHAT
2698
2701
  };
2699
- class ss {
2702
+ class as {
2700
2703
  analytics;
2701
2704
  constructor(e) {
2702
2705
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2740,7 +2743,7 @@ class ss {
2740
2743
  topicType: r ? et[r] : x.UNSET,
2741
2744
  topicSubType: n
2742
2745
  },
2743
- notificationKind: pe.POLLS,
2746
+ notificationKind: he.POLLS,
2744
2747
  notificationType: zr.IN_APP
2745
2748
  });
2746
2749
  };
@@ -2753,12 +2756,12 @@ class ss {
2753
2756
  topicType: r ? et[r] : x.UNSET,
2754
2757
  topicSubType: n
2755
2758
  },
2756
- notificationKind: pe.POLLS,
2759
+ notificationKind: he.POLLS,
2757
2760
  notificationType: zr.IN_APP
2758
2761
  });
2759
2762
  };
2760
2763
  }
2761
- class as {
2764
+ class us {
2762
2765
  analytics;
2763
2766
  constructor(e) {
2764
2767
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2842,9 +2845,9 @@ class as {
2842
2845
  });
2843
2846
  };
2844
2847
  }
2845
- const us = ({ transport: t, $commonStore: e }) => {
2848
+ const cs = ({ transport: t, $commonStore: e }) => {
2846
2849
  let r;
2847
- const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(_n, {
2850
+ const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(Ln, {
2848
2851
  method: "send",
2849
2852
  params: [n]
2850
2853
  }), a = t.nanoquery.createFetcherStore(s, {
@@ -2863,24 +2866,24 @@ const us = ({ transport: t, $commonStore: e }) => {
2863
2866
  }
2864
2867
  });
2865
2868
  } catch (v) {
2866
- ge.error(v, "send heartbeat failed");
2869
+ be.error(v, "send heartbeat failed");
2867
2870
  }
2868
2871
  return Date.now();
2869
2872
  },
2870
2873
  refetchInterval: i
2871
2874
  }), u = () => {
2872
- ge.debug("mounted heartbeat"), r = a.subscribe(() => {
2875
+ be.debug("mounted heartbeat"), r = a.subscribe(() => {
2873
2876
  });
2874
2877
  }, l = () => {
2875
- ge.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
2878
+ be.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
2876
2879
  }, c = () => {
2877
- ge.debug("disabled heartbeat"), n.set(!1);
2880
+ be.debug("disabled heartbeat"), n.set(!1);
2878
2881
  };
2879
2882
  return { enable: l, disable: c, mount: u, unmount: () => {
2880
- ge.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2883
+ be.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2881
2884
  } };
2882
- }, ge = Se("analytics");
2883
- class cs {
2885
+ }, be = de("analytics");
2886
+ class ls {
2884
2887
  commonStore;
2885
2888
  notifications;
2886
2889
  polls;
@@ -2893,23 +2896,23 @@ class cs {
2893
2896
  listenersCancels;
2894
2897
  connected = !1;
2895
2898
  constructor(e) {
2896
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(J({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = us({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new ss(this), this.polls = new as(this), this.invitation = new ts(this), this.interactions = new rs(this), this.advertisement = new is(this);
2897
- const { client: r } = e.analyticsTransport.createPromiseClient(_n, {
2899
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(J({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = cs({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new as(this), this.polls = new us(this), this.invitation = new rs(this), this.interactions = new ns(this), this.advertisement = new os(this);
2900
+ const { client: r } = e.analyticsTransport.createPromiseClient(Ln, {
2898
2901
  method: "send"
2899
2902
  });
2900
2903
  this.analyticsClient = r;
2901
2904
  }
2902
2905
  connect = () => {
2903
- this.writeCommon("sessionId", ir()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, ge.debug("analytics connected");
2906
+ this.writeCommon("sessionId", ir()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, be.debug("analytics connected");
2904
2907
  };
2905
2908
  disconnect = () => {
2906
- this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, ge.debug("analytics disconnected");
2909
+ this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, be.debug("analytics disconnected");
2907
2910
  };
2908
2911
  write = (e, r) => {
2909
2912
  r && this.analyticsClient.unary({ message: { case: e, value: r } }).then(() => {
2910
- ge.trace("send analytics success", e, r);
2913
+ be.trace("send analytics success", e, r);
2911
2914
  }).catch((n) => {
2912
- ge.error(n, "send analytics failed");
2915
+ be.error(n, "send analytics failed");
2913
2916
  });
2914
2917
  };
2915
2918
  writeCommon = (e, r) => {
@@ -2923,7 +2926,7 @@ class cs {
2923
2926
  this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
2924
2927
  this.writeCommon("eventId", r);
2925
2928
  })), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
2926
- r && this.writeCommon("category", os[r]), r !== R.UNSET ? this.writeCommon("overlaySessionId", ir()) : this.writeCommon("overlaySessionId", "");
2929
+ r && this.writeCommon("category", ss[r]), r !== R.UNSET ? this.writeCommon("overlaySessionId", ir()) : this.writeCommon("overlaySessionId", "");
2927
2930
  })), this.onConnect(() => {
2928
2931
  const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
2929
2932
  this.writeCommon("screenOrientation", i.matches ? Gr.PORTRAIT : Gr.LANDSCAPE);
@@ -2936,17 +2939,17 @@ class cs {
2936
2939
  }));
2937
2940
  };
2938
2941
  }
2939
- const ls = (t, e, r) => {
2940
- t.analytics = new cs(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
2942
+ const ds = (t, e, r) => {
2943
+ t.analytics = new ls(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
2941
2944
  t.analytics.disconnect();
2942
2945
  })), r();
2943
2946
  };
2944
2947
  var Ar = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2945
- function ds(t) {
2948
+ function fs(t) {
2946
2949
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
2947
2950
  }
2948
2951
  var Er = { exports: {} }, Ir = { exports: {} };
2949
- function fs(t) {
2952
+ function ps(t) {
2950
2953
  var e = new t(), r = e;
2951
2954
  function n() {
2952
2955
  var o = e;
@@ -2960,11 +2963,11 @@ function fs(t) {
2960
2963
  release: i
2961
2964
  };
2962
2965
  }
2963
- var ps = fs, hs = ps;
2964
- function qn(t, e, r) {
2966
+ var hs = ps, ys = hs;
2967
+ function jn(t, e, r) {
2965
2968
  if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
2966
2969
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
2967
- var n = hs(ys), i = null, o = null, s = 0, a = null, u = {
2970
+ var n = ys(ms), i = null, o = null, s = 0, a = null, u = {
2968
2971
  push: b,
2969
2972
  drain: X,
2970
2973
  saturated: X,
@@ -3046,7 +3049,7 @@ function qn(t, e, r) {
3046
3049
  }
3047
3050
  function X() {
3048
3051
  }
3049
- function ys() {
3052
+ function ms() {
3050
3053
  this.value = null, this.callback = X, this.next = null, this.release = X, this.context = null, this.errorHandler = null;
3051
3054
  var t = this;
3052
3055
  this.worked = function(r, n) {
@@ -3054,14 +3057,14 @@ function ys() {
3054
3057
  t.value = null, t.callback = X, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
3055
3058
  };
3056
3059
  }
3057
- function ms(t, e, r) {
3060
+ function gs(t, e, r) {
3058
3061
  typeof t == "function" && (r = e, e = t, t = null);
3059
3062
  function n(c, f) {
3060
3063
  e.call(this, c).then(function(p) {
3061
3064
  f(null, p);
3062
3065
  }, f);
3063
3066
  }
3064
- var i = qn(t, n, r), o = i.push, s = i.unshift;
3067
+ var i = jn(t, n, r), o = i.push, s = i.unshift;
3065
3068
  return i.push = a, i.unshift = u, i.drained = l, i;
3066
3069
  function a(c) {
3067
3070
  var f = new Promise(function(p, v) {
@@ -3100,9 +3103,9 @@ function ms(t, e, r) {
3100
3103
  return f;
3101
3104
  }
3102
3105
  }
3103
- Ir.exports = qn;
3104
- Ir.exports.promise = ms;
3105
- var jn = Ir.exports, Tr = { exports: {} }, Ge = typeof Reflect == "object" ? Reflect : null, tn = Ge && typeof Ge.apply == "function" ? Ge.apply : function(e, r, n) {
3106
+ Ir.exports = jn;
3107
+ Ir.exports.promise = gs;
3108
+ var Un = Ir.exports, Tr = { exports: {} }, Ge = typeof Reflect == "object" ? Reflect : null, rn = Ge && typeof Ge.apply == "function" ? Ge.apply : function(e, r, n) {
3106
3109
  return Function.prototype.apply.call(e, r, n);
3107
3110
  }, yt;
3108
3111
  Ge && typeof Ge.ownKeys == "function" ? yt = Ge.ownKeys : Object.getOwnPropertySymbols ? yt = function(e) {
@@ -3110,22 +3113,22 @@ Ge && typeof Ge.ownKeys == "function" ? yt = Ge.ownKeys : Object.getOwnPropertyS
3110
3113
  } : yt = function(e) {
3111
3114
  return Object.getOwnPropertyNames(e);
3112
3115
  };
3113
- function gs(t) {
3116
+ function bs(t) {
3114
3117
  console && console.warn && console.warn(t);
3115
3118
  }
3116
- var Un = Number.isNaN || function(e) {
3119
+ var xn = Number.isNaN || function(e) {
3117
3120
  return e !== e;
3118
3121
  };
3119
3122
  function N() {
3120
3123
  N.init.call(this);
3121
3124
  }
3122
3125
  Tr.exports = N;
3123
- Tr.exports.once = ws;
3126
+ Tr.exports.once = As;
3124
3127
  N.EventEmitter = N;
3125
3128
  N.prototype._events = void 0;
3126
3129
  N.prototype._eventsCount = 0;
3127
3130
  N.prototype._maxListeners = void 0;
3128
- var rn = 10;
3131
+ var nn = 10;
3129
3132
  function Ft(t) {
3130
3133
  if (typeof t != "function")
3131
3134
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
@@ -3133,27 +3136,27 @@ function Ft(t) {
3133
3136
  Object.defineProperty(N, "defaultMaxListeners", {
3134
3137
  enumerable: !0,
3135
3138
  get: function() {
3136
- return rn;
3139
+ return nn;
3137
3140
  },
3138
3141
  set: function(t) {
3139
- if (typeof t != "number" || t < 0 || Un(t))
3142
+ if (typeof t != "number" || t < 0 || xn(t))
3140
3143
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
3141
- rn = t;
3144
+ nn = t;
3142
3145
  }
3143
3146
  });
3144
3147
  N.init = function() {
3145
3148
  (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;
3146
3149
  };
3147
3150
  N.prototype.setMaxListeners = function(e) {
3148
- if (typeof e != "number" || e < 0 || Un(e))
3151
+ if (typeof e != "number" || e < 0 || xn(e))
3149
3152
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
3150
3153
  return this._maxListeners = e, this;
3151
3154
  };
3152
- function xn(t) {
3155
+ function Qn(t) {
3153
3156
  return t._maxListeners === void 0 ? N.defaultMaxListeners : t._maxListeners;
3154
3157
  }
3155
3158
  N.prototype.getMaxListeners = function() {
3156
- return xn(this);
3159
+ return Qn(this);
3157
3160
  };
3158
3161
  N.prototype.emit = function(e) {
3159
3162
  for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
@@ -3173,13 +3176,13 @@ N.prototype.emit = function(e) {
3173
3176
  if (u === void 0)
3174
3177
  return !1;
3175
3178
  if (typeof u == "function")
3176
- tn(u, this, r);
3179
+ rn(u, this, r);
3177
3180
  else
3178
- for (var l = u.length, c = Hn(u, l), n = 0; n < l; ++n)
3179
- tn(c[n], this, r);
3181
+ for (var l = u.length, c = Wn(u, l), n = 0; n < l; ++n)
3182
+ rn(c[n], this, r);
3180
3183
  return !0;
3181
3184
  };
3182
- function Qn(t, e, r, n) {
3185
+ function Gn(t, e, r, n) {
3183
3186
  var i, o, s;
3184
3187
  if (Ft(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
3185
3188
  "newListener",
@@ -3187,33 +3190,33 @@ function Qn(t, e, r, n) {
3187
3190
  r.listener ? r.listener : r
3188
3191
  ), o = t._events), s = o[e]), s === void 0)
3189
3192
  s = o[e] = r, ++t._eventsCount;
3190
- else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = xn(t), i > 0 && s.length > i && !s.warned) {
3193
+ else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Qn(t), i > 0 && s.length > i && !s.warned) {
3191
3194
  s.warned = !0;
3192
3195
  var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3193
- a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, gs(a);
3196
+ a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, bs(a);
3194
3197
  }
3195
3198
  return t;
3196
3199
  }
3197
3200
  N.prototype.addListener = function(e, r) {
3198
- return Qn(this, e, r, !1);
3201
+ return Gn(this, e, r, !1);
3199
3202
  };
3200
3203
  N.prototype.on = N.prototype.addListener;
3201
3204
  N.prototype.prependListener = function(e, r) {
3202
- return Qn(this, e, r, !0);
3205
+ return Gn(this, e, r, !0);
3203
3206
  };
3204
- function bs() {
3207
+ function vs() {
3205
3208
  if (!this.fired)
3206
3209
  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);
3207
3210
  }
3208
- function Gn(t, e, r) {
3209
- var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = bs.bind(n);
3211
+ function Kn(t, e, r) {
3212
+ var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = vs.bind(n);
3210
3213
  return i.listener = r, n.wrapFn = i, i;
3211
3214
  }
3212
3215
  N.prototype.once = function(e, r) {
3213
- return Ft(r), this.on(e, Gn(this, e, r)), this;
3216
+ return Ft(r), this.on(e, Kn(this, e, r)), this;
3214
3217
  };
3215
3218
  N.prototype.prependOnceListener = function(e, r) {
3216
- return Ft(r), this.prependListener(e, Gn(this, e, r)), this;
3219
+ return Ft(r), this.prependListener(e, Kn(this, e, r)), this;
3217
3220
  };
3218
3221
  N.prototype.removeListener = function(e, r) {
3219
3222
  var n, i, o, s, a;
@@ -3231,7 +3234,7 @@ N.prototype.removeListener = function(e, r) {
3231
3234
  }
3232
3235
  if (o < 0)
3233
3236
  return this;
3234
- o === 0 ? n.shift() : vs(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
3237
+ o === 0 ? n.shift() : Ss(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
3235
3238
  }
3236
3239
  return this;
3237
3240
  };
@@ -3255,24 +3258,24 @@ N.prototype.removeAllListeners = function(e) {
3255
3258
  this.removeListener(e, r[i]);
3256
3259
  return this;
3257
3260
  };
3258
- function Kn(t, e, r) {
3261
+ function zn(t, e, r) {
3259
3262
  var n = t._events;
3260
3263
  if (n === void 0)
3261
3264
  return [];
3262
3265
  var i = n[e];
3263
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Ss(i) : Hn(i, i.length);
3266
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? ws(i) : Wn(i, i.length);
3264
3267
  }
3265
3268
  N.prototype.listeners = function(e) {
3266
- return Kn(this, e, !0);
3269
+ return zn(this, e, !0);
3267
3270
  };
3268
3271
  N.prototype.rawListeners = function(e) {
3269
- return Kn(this, e, !1);
3272
+ return zn(this, e, !1);
3270
3273
  };
3271
3274
  N.listenerCount = function(t, e) {
3272
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : zn.call(t, e);
3275
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : Hn.call(t, e);
3273
3276
  };
3274
- N.prototype.listenerCount = zn;
3275
- function zn(t) {
3277
+ N.prototype.listenerCount = Hn;
3278
+ function Hn(t) {
3276
3279
  var e = this._events;
3277
3280
  if (e !== void 0) {
3278
3281
  var r = e[t];
@@ -3286,22 +3289,22 @@ function zn(t) {
3286
3289
  N.prototype.eventNames = function() {
3287
3290
  return this._eventsCount > 0 ? yt(this._events) : [];
3288
3291
  };
3289
- function Hn(t, e) {
3292
+ function Wn(t, e) {
3290
3293
  for (var r = new Array(e), n = 0; n < e; ++n)
3291
3294
  r[n] = t[n];
3292
3295
  return r;
3293
3296
  }
3294
- function vs(t, e) {
3297
+ function Ss(t, e) {
3295
3298
  for (; e + 1 < t.length; e++)
3296
3299
  t[e] = t[e + 1];
3297
3300
  t.pop();
3298
3301
  }
3299
- function Ss(t) {
3302
+ function ws(t) {
3300
3303
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
3301
3304
  e[r] = t[r].listener || t[r];
3302
3305
  return e;
3303
3306
  }
3304
- function ws(t, e) {
3307
+ function As(t, e) {
3305
3308
  return new Promise(function(r, n) {
3306
3309
  function i(s) {
3307
3310
  t.removeListener(e, o), n(s);
@@ -3309,13 +3312,13 @@ function ws(t, e) {
3309
3312
  function o() {
3310
3313
  typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
3311
3314
  }
3312
- Wn(t, e, o, { once: !0 }), e !== "error" && As(t, i, { once: !0 });
3315
+ Yn(t, e, o, { once: !0 }), e !== "error" && Es(t, i, { once: !0 });
3313
3316
  });
3314
3317
  }
3315
- function As(t, e, r) {
3316
- typeof t.on == "function" && Wn(t, "error", e, r);
3318
+ function Es(t, e, r) {
3319
+ typeof t.on == "function" && Yn(t, "error", e, r);
3317
3320
  }
3318
- function Wn(t, e, r, n) {
3321
+ function Yn(t, e, r, n) {
3319
3322
  if (typeof t.on == "function")
3320
3323
  n.once ? t.once(e, r) : t.on(e, r);
3321
3324
  else if (typeof t.addEventListener == "function")
@@ -3325,7 +3328,7 @@ function Wn(t, e, r, n) {
3325
3328
  else
3326
3329
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
3327
3330
  }
3328
- var Yn = Tr.exports, Dt = {}, Jn = {}, Xn = function() {
3331
+ var Jn = Tr.exports, Dt = {}, Xn = {}, Zn = function() {
3329
3332
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
3330
3333
  return !1;
3331
3334
  if (typeof Symbol.iterator == "symbol")
@@ -3348,56 +3351,56 @@ var Yn = Tr.exports, Dt = {}, Jn = {}, Xn = function() {
3348
3351
  return !1;
3349
3352
  }
3350
3353
  return !0;
3351
- }, Es = Xn, Rt = function() {
3352
- return Es() && !!Symbol.toStringTag;
3353
- }, Is = Error, Ts = EvalError, Os = RangeError, _s = ReferenceError, Zn = SyntaxError, Vt = TypeError, Ls = URIError, nn = typeof Symbol < "u" && Symbol, Cs = Xn, ks = function() {
3354
- return typeof nn != "function" || typeof Symbol != "function" || typeof nn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Cs();
3354
+ }, Is = Zn, Rt = function() {
3355
+ return Is() && !!Symbol.toStringTag;
3356
+ }, Ts = Error, Os = EvalError, _s = RangeError, Ls = ReferenceError, ei = SyntaxError, Vt = TypeError, Cs = URIError, on = typeof Symbol < "u" && Symbol, ks = Zn, Ps = function() {
3357
+ return typeof on != "function" || typeof Symbol != "function" || typeof on("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ks();
3355
3358
  }, jt = {
3356
3359
  __proto__: null,
3357
3360
  foo: {}
3358
- }, Ps = Object, Ns = function() {
3359
- return { __proto__: jt }.foo === jt.foo && !(jt instanceof Ps);
3360
- }, Fs = "Function.prototype.bind called on incompatible ", Ds = Object.prototype.toString, Rs = Math.max, Vs = "[object Function]", on = function(e, r) {
3361
+ }, Ns = Object, Fs = function() {
3362
+ return { __proto__: jt }.foo === jt.foo && !(jt instanceof Ns);
3363
+ }, Ds = "Function.prototype.bind called on incompatible ", Rs = Object.prototype.toString, Vs = Math.max, $s = "[object Function]", sn = function(e, r) {
3361
3364
  for (var n = [], i = 0; i < e.length; i += 1)
3362
3365
  n[i] = e[i];
3363
3366
  for (var o = 0; o < r.length; o += 1)
3364
3367
  n[o + e.length] = r[o];
3365
3368
  return n;
3366
- }, $s = function(e, r) {
3369
+ }, Bs = function(e, r) {
3367
3370
  for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
3368
3371
  n[o] = e[i];
3369
3372
  return n;
3370
- }, Bs = function(t, e) {
3373
+ }, Ms = function(t, e) {
3371
3374
  for (var r = "", n = 0; n < t.length; n += 1)
3372
3375
  r += t[n], n + 1 < t.length && (r += e);
3373
3376
  return r;
3374
- }, Ms = function(e) {
3377
+ }, qs = function(e) {
3375
3378
  var r = this;
3376
- if (typeof r != "function" || Ds.apply(r) !== Vs)
3377
- throw new TypeError(Fs + r);
3378
- for (var n = $s(arguments, 1), i, o = function() {
3379
+ if (typeof r != "function" || Rs.apply(r) !== $s)
3380
+ throw new TypeError(Ds + r);
3381
+ for (var n = Bs(arguments, 1), i, o = function() {
3379
3382
  if (this instanceof i) {
3380
3383
  var c = r.apply(
3381
3384
  this,
3382
- on(n, arguments)
3385
+ sn(n, arguments)
3383
3386
  );
3384
3387
  return Object(c) === c ? c : this;
3385
3388
  }
3386
3389
  return r.apply(
3387
3390
  e,
3388
- on(n, arguments)
3391
+ sn(n, arguments)
3389
3392
  );
3390
- }, s = Rs(0, r.length - n.length), a = [], u = 0; u < s; u++)
3393
+ }, s = Vs(0, r.length - n.length), a = [], u = 0; u < s; u++)
3391
3394
  a[u] = "$" + u;
3392
- if (i = Function("binder", "return function (" + Bs(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3395
+ if (i = Function("binder", "return function (" + Ms(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3393
3396
  var l = function() {
3394
3397
  };
3395
3398
  l.prototype = r.prototype, i.prototype = new l(), l.prototype = null;
3396
3399
  }
3397
3400
  return i;
3398
- }, qs = Ms, Or = Function.prototype.bind || qs, js = Function.prototype.call, Us = Object.prototype.hasOwnProperty, xs = Or, Qs = xs.call(js, Us), T, Gs = Is, Ks = Ts, zs = Os, Hs = _s, ze = Zn, Ke = Vt, Ws = Ls, ei = Function, Ut = function(t) {
3401
+ }, js = qs, Or = Function.prototype.bind || js, Us = Function.prototype.call, xs = Object.prototype.hasOwnProperty, Qs = Or, Gs = Qs.call(Us, xs), T, Ks = Ts, zs = Os, Hs = _s, Ws = Ls, ze = ei, Ke = Vt, Ys = Cs, ti = Function, Ut = function(t) {
3399
3402
  try {
3400
- return ei('"use strict"; return (' + t + ").constructor;")();
3403
+ return ti('"use strict"; return (' + t + ").constructor;")();
3401
3404
  } catch {
3402
3405
  }
3403
3406
  }, ke = Object.getOwnPropertyDescriptor;
@@ -3409,7 +3412,7 @@ if (ke)
3409
3412
  }
3410
3413
  var xt = function() {
3411
3414
  throw new Ke();
3412
- }, Ys = ke ? function() {
3415
+ }, Js = ke ? function() {
3413
3416
  try {
3414
3417
  return arguments.callee, xt;
3415
3418
  } catch {
@@ -3419,9 +3422,9 @@ var xt = function() {
3419
3422
  return xt;
3420
3423
  }
3421
3424
  }
3422
- }() : xt, Be = ks(), Js = Ns(), j = Object.getPrototypeOf || (Js ? function(t) {
3425
+ }() : xt, Be = Ps(), Xs = Fs(), j = Object.getPrototypeOf || (Xs ? function(t) {
3423
3426
  return t.__proto__;
3424
- } : null), qe = {}, Xs = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Pe = {
3427
+ } : null), qe = {}, Zs = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Pe = {
3425
3428
  __proto__: null,
3426
3429
  "%AggregateError%": typeof AggregateError > "u" ? T : AggregateError,
3427
3430
  "%Array%": Array,
@@ -3443,14 +3446,14 @@ var xt = function() {
3443
3446
  "%decodeURIComponent%": decodeURIComponent,
3444
3447
  "%encodeURI%": encodeURI,
3445
3448
  "%encodeURIComponent%": encodeURIComponent,
3446
- "%Error%": Gs,
3449
+ "%Error%": Ks,
3447
3450
  "%eval%": eval,
3448
3451
  // eslint-disable-line no-eval
3449
- "%EvalError%": Ks,
3452
+ "%EvalError%": zs,
3450
3453
  "%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
3451
3454
  "%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
3452
3455
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
3453
- "%Function%": ei,
3456
+ "%Function%": ti,
3454
3457
  "%GeneratorFunction%": qe,
3455
3458
  "%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
3456
3459
  "%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
@@ -3468,8 +3471,8 @@ var xt = function() {
3468
3471
  "%parseInt%": parseInt,
3469
3472
  "%Promise%": typeof Promise > "u" ? T : Promise,
3470
3473
  "%Proxy%": typeof Proxy > "u" ? T : Proxy,
3471
- "%RangeError%": zs,
3472
- "%ReferenceError%": Hs,
3474
+ "%RangeError%": Hs,
3475
+ "%ReferenceError%": Ws,
3473
3476
  "%Reflect%": typeof Reflect > "u" ? T : Reflect,
3474
3477
  "%RegExp%": RegExp,
3475
3478
  "%Set%": typeof Set > "u" ? T : Set,
@@ -3479,14 +3482,14 @@ var xt = function() {
3479
3482
  "%StringIteratorPrototype%": Be && j ? j(""[Symbol.iterator]()) : T,
3480
3483
  "%Symbol%": Be ? Symbol : T,
3481
3484
  "%SyntaxError%": ze,
3482
- "%ThrowTypeError%": Ys,
3483
- "%TypedArray%": Xs,
3485
+ "%ThrowTypeError%": Js,
3486
+ "%TypedArray%": Zs,
3484
3487
  "%TypeError%": Ke,
3485
3488
  "%Uint8Array%": typeof Uint8Array > "u" ? T : Uint8Array,
3486
3489
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? T : Uint8ClampedArray,
3487
3490
  "%Uint16Array%": typeof Uint16Array > "u" ? T : Uint16Array,
3488
3491
  "%Uint32Array%": typeof Uint32Array > "u" ? T : Uint32Array,
3489
- "%URIError%": Ws,
3492
+ "%URIError%": Ys,
3490
3493
  "%WeakMap%": typeof WeakMap > "u" ? T : WeakMap,
3491
3494
  "%WeakRef%": typeof WeakRef > "u" ? T : WeakRef,
3492
3495
  "%WeakSet%": typeof WeakSet > "u" ? T : WeakSet
@@ -3495,10 +3498,10 @@ if (j)
3495
3498
  try {
3496
3499
  null.error;
3497
3500
  } catch (t) {
3498
- var Zs = j(j(t));
3499
- Pe["%Error.prototype%"] = Zs;
3501
+ var ea = j(j(t));
3502
+ Pe["%Error.prototype%"] = ea;
3500
3503
  }
3501
- var ea = function t(e) {
3504
+ var ta = function t(e) {
3502
3505
  var r;
3503
3506
  if (e === "%AsyncFunction%")
3504
3507
  r = Ut("async function () {}");
@@ -3514,7 +3517,7 @@ var ea = function t(e) {
3514
3517
  i && j && (r = j(i.prototype));
3515
3518
  }
3516
3519
  return Pe[e] = r, r;
3517
- }, sn = {
3520
+ }, an = {
3518
3521
  __proto__: null,
3519
3522
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
3520
3523
  "%ArrayPrototype%": ["Array", "prototype"],
@@ -3567,21 +3570,21 @@ var ea = function t(e) {
3567
3570
  "%URIErrorPrototype%": ["URIError", "prototype"],
3568
3571
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3569
3572
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3570
- }, ot = Or, Et = Qs, ta = ot.call(Function.call, Array.prototype.concat), ra = ot.call(Function.apply, Array.prototype.splice), an = ot.call(Function.call, String.prototype.replace), It = ot.call(Function.call, String.prototype.slice), na = ot.call(Function.call, RegExp.prototype.exec), ia = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, oa = /\\(\\)?/g, sa = function(e) {
3573
+ }, ot = Or, Et = Gs, ra = ot.call(Function.call, Array.prototype.concat), na = ot.call(Function.apply, Array.prototype.splice), un = ot.call(Function.call, String.prototype.replace), It = ot.call(Function.call, String.prototype.slice), ia = ot.call(Function.call, RegExp.prototype.exec), oa = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, sa = /\\(\\)?/g, aa = function(e) {
3571
3574
  var r = It(e, 0, 1), n = It(e, -1);
3572
3575
  if (r === "%" && n !== "%")
3573
3576
  throw new ze("invalid intrinsic syntax, expected closing `%`");
3574
3577
  if (n === "%" && r !== "%")
3575
3578
  throw new ze("invalid intrinsic syntax, expected opening `%`");
3576
3579
  var i = [];
3577
- return an(e, ia, function(o, s, a, u) {
3578
- i[i.length] = a ? an(u, oa, "$1") : s || o;
3580
+ return un(e, oa, function(o, s, a, u) {
3581
+ i[i.length] = a ? un(u, sa, "$1") : s || o;
3579
3582
  }), i;
3580
- }, aa = function(e, r) {
3583
+ }, ua = function(e, r) {
3581
3584
  var n = e, i;
3582
- if (Et(sn, n) && (i = sn[n], n = "%" + i[0] + "%"), Et(Pe, n)) {
3585
+ if (Et(an, n) && (i = an[n], n = "%" + i[0] + "%"), Et(Pe, n)) {
3583
3586
  var o = Pe[n];
3584
- if (o === qe && (o = ea(n)), typeof o > "u" && !r)
3587
+ if (o === qe && (o = ta(n)), typeof o > "u" && !r)
3585
3588
  throw new Ke("intrinsic " + e + " exists, but is not available. Please file an issue!");
3586
3589
  return {
3587
3590
  alias: i,
@@ -3595,10 +3598,10 @@ var ea = function t(e) {
3595
3598
  throw new Ke("intrinsic name must be a non-empty string");
3596
3599
  if (arguments.length > 1 && typeof r != "boolean")
3597
3600
  throw new Ke('"allowMissing" argument must be a boolean');
3598
- if (na(/^%?[^%]*%?$/, e) === null)
3601
+ if (ia(/^%?[^%]*%?$/, e) === null)
3599
3602
  throw new ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3600
- var n = sa(e), i = n.length > 0 ? n[0] : "", o = aa("%" + i + "%", r), s = o.name, a = o.value, u = !1, l = o.alias;
3601
- l && (i = l[0], ra(n, ta([0, 1], l)));
3603
+ var n = aa(e), i = n.length > 0 ? n[0] : "", o = ua("%" + i + "%", r), s = o.name, a = o.value, u = !1, l = o.alias;
3604
+ l && (i = l[0], na(n, ra([0, 1], l)));
3602
3605
  for (var c = 1, f = !0; c < n.length; c += 1) {
3603
3606
  var p = n[c], v = It(p, 0, 1), w = It(p, -1);
3604
3607
  if ((v === '"' || v === "'" || v === "`" || w === '"' || w === "'" || w === "`") && v !== w)
@@ -3620,10 +3623,10 @@ var ea = function t(e) {
3620
3623
  }
3621
3624
  }
3622
3625
  return a;
3623
- }, ti = { exports: {} }, Qt, un;
3626
+ }, ri = { exports: {} }, Qt, cn;
3624
3627
  function _r() {
3625
- if (un) return Qt;
3626
- un = 1;
3628
+ if (cn) return Qt;
3629
+ cn = 1;
3627
3630
  var t = st, e = t("%Object.defineProperty%", !0) || !1;
3628
3631
  if (e)
3629
3632
  try {
@@ -3633,14 +3636,14 @@ function _r() {
3633
3636
  }
3634
3637
  return Qt = e, Qt;
3635
3638
  }
3636
- var ua = st, mt = ua("%Object.getOwnPropertyDescriptor%", !0);
3639
+ var ca = st, mt = ca("%Object.getOwnPropertyDescriptor%", !0);
3637
3640
  if (mt)
3638
3641
  try {
3639
3642
  mt([], "length");
3640
3643
  } catch {
3641
3644
  mt = null;
3642
3645
  }
3643
- var $t = mt, cn = _r(), ca = Zn, Me = Vt, ln = $t, la = function(e, r, n) {
3646
+ var $t = mt, ln = _r(), la = ei, Me = Vt, dn = $t, da = function(e, r, n) {
3644
3647
  if (!e || typeof e != "object" && typeof e != "function")
3645
3648
  throw new Me("`obj` must be an object or a function`");
3646
3649
  if (typeof r != "string" && typeof r != "symbol")
@@ -3653,9 +3656,9 @@ var $t = mt, cn = _r(), ca = Zn, Me = Vt, ln = $t, la = function(e, r, n) {
3653
3656
  throw new Me("`nonConfigurable`, if provided, must be a boolean or null");
3654
3657
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
3655
3658
  throw new Me("`loose`, if provided, must be a boolean");
3656
- var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!ln && ln(e, r);
3657
- if (cn)
3658
- cn(e, r, {
3659
+ var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!dn && dn(e, r);
3660
+ if (ln)
3661
+ ln(e, r, {
3659
3662
  configurable: s === null && u ? u.configurable : !s,
3660
3663
  enumerable: i === null && u ? u.enumerable : !i,
3661
3664
  value: n,
@@ -3664,11 +3667,11 @@ var $t = mt, cn = _r(), ca = Zn, Me = Vt, ln = $t, la = function(e, r, n) {
3664
3667
  else if (a || !i && !o && !s)
3665
3668
  e[r] = n;
3666
3669
  else
3667
- throw new ca("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3668
- }, lr = _r(), ri = function() {
3670
+ throw new la("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3671
+ }, lr = _r(), ni = function() {
3669
3672
  return !!lr;
3670
3673
  };
3671
- ri.hasArrayLengthDefineBug = function() {
3674
+ ni.hasArrayLengthDefineBug = function() {
3672
3675
  if (!lr)
3673
3676
  return null;
3674
3677
  try {
@@ -3677,24 +3680,24 @@ ri.hasArrayLengthDefineBug = function() {
3677
3680
  return !0;
3678
3681
  }
3679
3682
  };
3680
- var da = ri, fa = st, dn = la, pa = da(), fn = $t, pn = Vt, ha = fa("%Math.floor%"), ya = function(e, r) {
3683
+ var fa = ni, pa = st, fn = da, ha = fa(), pn = $t, hn = Vt, ya = pa("%Math.floor%"), ma = function(e, r) {
3681
3684
  if (typeof e != "function")
3682
- throw new pn("`fn` is not a function");
3683
- if (typeof r != "number" || r < 0 || r > 4294967295 || ha(r) !== r)
3684
- throw new pn("`length` must be a positive 32-bit integer");
3685
+ throw new hn("`fn` is not a function");
3686
+ if (typeof r != "number" || r < 0 || r > 4294967295 || ya(r) !== r)
3687
+ throw new hn("`length` must be a positive 32-bit integer");
3685
3688
  var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
3686
- if ("length" in e && fn) {
3687
- var s = fn(e, "length");
3689
+ if ("length" in e && pn) {
3690
+ var s = pn(e, "length");
3688
3691
  s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
3689
3692
  }
3690
- return (i || o || !n) && (pa ? dn(
3693
+ return (i || o || !n) && (ha ? fn(
3691
3694
  /** @type {Parameters<define>[0]} */
3692
3695
  e,
3693
3696
  "length",
3694
3697
  r,
3695
3698
  !0,
3696
3699
  !0
3697
- ) : dn(
3700
+ ) : fn(
3698
3701
  /** @type {Parameters<define>[0]} */
3699
3702
  e,
3700
3703
  "length",
@@ -3702,7 +3705,7 @@ var da = ri, fa = st, dn = la, pa = da(), fn = $t, pn = Vt, ha = fa("%Math.floor
3702
3705
  )), e;
3703
3706
  };
3704
3707
  (function(t) {
3705
- var e = Or, r = st, n = ya, i = Vt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = _r(), l = r("%Math.max%");
3708
+ var e = Or, r = st, n = ma, i = Vt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = _r(), l = r("%Math.max%");
3706
3709
  t.exports = function(p) {
3707
3710
  if (typeof p != "function")
3708
3711
  throw new i("a function is required");
@@ -3717,42 +3720,42 @@ var da = ri, fa = st, dn = la, pa = da(), fn = $t, pn = Vt, ha = fa("%Math.floor
3717
3720
  return a(e, o, arguments);
3718
3721
  };
3719
3722
  u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
3720
- })(ti);
3721
- var Lr = ti.exports, ni = st, ii = Lr, ma = ii(ni("String.prototype.indexOf")), Cr = function(e, r) {
3722
- var n = ni(e, !!r);
3723
- return typeof n == "function" && ma(e, ".prototype.") > -1 ? ii(n) : n;
3724
- }, ga = Rt(), ba = Cr, dr = ba("Object.prototype.toString"), Bt = function(e) {
3725
- return ga && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : dr(e) === "[object Arguments]";
3726
- }, oi = function(e) {
3723
+ })(ri);
3724
+ var Lr = ri.exports, ii = st, oi = Lr, ga = oi(ii("String.prototype.indexOf")), Cr = function(e, r) {
3725
+ var n = ii(e, !!r);
3726
+ return typeof n == "function" && ga(e, ".prototype.") > -1 ? oi(n) : n;
3727
+ }, ba = Rt(), va = Cr, dr = va("Object.prototype.toString"), Bt = function(e) {
3728
+ return ba && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : dr(e) === "[object Arguments]";
3729
+ }, si = function(e) {
3727
3730
  return Bt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && dr(e) !== "[object Array]" && dr(e.callee) === "[object Function]";
3728
- }, va = function() {
3731
+ }, Sa = function() {
3729
3732
  return Bt(arguments);
3730
3733
  }();
3731
- Bt.isLegacyArguments = oi;
3732
- var Sa = va ? Bt : oi, wa = Object.prototype.toString, Aa = Function.prototype.toString, Ea = /^\s*(?:function)?\*/, si = Rt(), Gt = Object.getPrototypeOf, Ia = function() {
3733
- if (!si)
3734
+ Bt.isLegacyArguments = si;
3735
+ var wa = Sa ? Bt : si, Aa = Object.prototype.toString, Ea = Function.prototype.toString, Ia = /^\s*(?:function)?\*/, ai = Rt(), Gt = Object.getPrototypeOf, Ta = function() {
3736
+ if (!ai)
3734
3737
  return !1;
3735
3738
  try {
3736
3739
  return Function("return function*() {}")();
3737
3740
  } catch {
3738
3741
  }
3739
- }, Kt, Ta = function(e) {
3742
+ }, Kt, Oa = function(e) {
3740
3743
  if (typeof e != "function")
3741
3744
  return !1;
3742
- if (Ea.test(Aa.call(e)))
3745
+ if (Ia.test(Ea.call(e)))
3743
3746
  return !0;
3744
- if (!si) {
3745
- var r = wa.call(e);
3747
+ if (!ai) {
3748
+ var r = Aa.call(e);
3746
3749
  return r === "[object GeneratorFunction]";
3747
3750
  }
3748
3751
  if (!Gt)
3749
3752
  return !1;
3750
3753
  if (typeof Kt > "u") {
3751
- var n = Ia();
3754
+ var n = Ta();
3752
3755
  Kt = n ? Gt(n) : !1;
3753
3756
  }
3754
3757
  return Gt(e) === Kt;
3755
- }, ai = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, fr, gt;
3758
+ }, ui = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, fr, gt;
3756
3759
  if (typeof xe == "function" && typeof Object.defineProperty == "function")
3757
3760
  try {
3758
3761
  fr = Object.defineProperty({}, "length", {
@@ -3767,35 +3770,35 @@ if (typeof xe == "function" && typeof Object.defineProperty == "function")
3767
3770
  }
3768
3771
  else
3769
3772
  xe = null;
3770
- var Oa = /^\s*class\b/, pr = function(e) {
3773
+ var _a = /^\s*class\b/, pr = function(e) {
3771
3774
  try {
3772
- var r = ai.call(e);
3773
- return Oa.test(r);
3775
+ var r = ui.call(e);
3776
+ return _a.test(r);
3774
3777
  } catch {
3775
3778
  return !1;
3776
3779
  }
3777
3780
  }, zt = function(e) {
3778
3781
  try {
3779
- return pr(e) ? !1 : (ai.call(e), !0);
3782
+ return pr(e) ? !1 : (ui.call(e), !0);
3780
3783
  } catch {
3781
3784
  return !1;
3782
3785
  }
3783
- }, bt = Object.prototype.toString, _a = "[object Object]", La = "[object Function]", Ca = "[object GeneratorFunction]", ka = "[object HTMLAllCollection]", Pa = "[object HTML document.all class]", Na = "[object HTMLCollection]", Fa = typeof Symbol == "function" && !!Symbol.toStringTag, Da = !(0 in [,]), hr = function() {
3786
+ }, bt = Object.prototype.toString, La = "[object Object]", Ca = "[object Function]", ka = "[object GeneratorFunction]", Pa = "[object HTMLAllCollection]", Na = "[object HTML document.all class]", Fa = "[object HTMLCollection]", Da = typeof Symbol == "function" && !!Symbol.toStringTag, Ra = !(0 in [,]), hr = function() {
3784
3787
  return !1;
3785
3788
  };
3786
3789
  if (typeof document == "object") {
3787
- var Ra = document.all;
3788
- bt.call(Ra) === bt.call(document.all) && (hr = function(e) {
3789
- if ((Da || !e) && (typeof e > "u" || typeof e == "object"))
3790
+ var Va = document.all;
3791
+ bt.call(Va) === bt.call(document.all) && (hr = function(e) {
3792
+ if ((Ra || !e) && (typeof e > "u" || typeof e == "object"))
3790
3793
  try {
3791
3794
  var r = bt.call(e);
3792
- return (r === ka || r === Pa || r === Na || r === _a) && e("") == null;
3795
+ return (r === Pa || r === Na || r === Fa || r === La) && e("") == null;
3793
3796
  } catch {
3794
3797
  }
3795
3798
  return !1;
3796
3799
  });
3797
3800
  }
3798
- var Va = xe ? function(e) {
3801
+ var $a = xe ? function(e) {
3799
3802
  if (hr(e))
3800
3803
  return !0;
3801
3804
  if (!e || typeof e != "function" && typeof e != "object")
@@ -3812,27 +3815,27 @@ var Va = xe ? function(e) {
3812
3815
  return !0;
3813
3816
  if (!e || typeof e != "function" && typeof e != "object")
3814
3817
  return !1;
3815
- if (Fa)
3818
+ if (Da)
3816
3819
  return zt(e);
3817
3820
  if (pr(e))
3818
3821
  return !1;
3819
3822
  var r = bt.call(e);
3820
- return r !== La && r !== Ca && !/^\[object HTML/.test(r) ? !1 : zt(e);
3821
- }, $a = Va, Ba = Object.prototype.toString, ui = Object.prototype.hasOwnProperty, Ma = function(e, r, n) {
3823
+ return r !== Ca && r !== ka && !/^\[object HTML/.test(r) ? !1 : zt(e);
3824
+ }, Ba = $a, Ma = Object.prototype.toString, ci = Object.prototype.hasOwnProperty, qa = function(e, r, n) {
3822
3825
  for (var i = 0, o = e.length; i < o; i++)
3823
- ui.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3824
- }, qa = function(e, r, n) {
3826
+ ci.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3827
+ }, ja = function(e, r, n) {
3825
3828
  for (var i = 0, o = e.length; i < o; i++)
3826
3829
  n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
3827
- }, ja = function(e, r, n) {
3828
- for (var i in e)
3829
- ui.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3830
3830
  }, Ua = function(e, r, n) {
3831
- if (!$a(r))
3831
+ for (var i in e)
3832
+ ci.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3833
+ }, xa = function(e, r, n) {
3834
+ if (!Ba(r))
3832
3835
  throw new TypeError("iterator must be a function");
3833
3836
  var i;
3834
- arguments.length >= 3 && (i = n), Ba.call(e) === "[object Array]" ? Ma(e, r, i) : typeof e == "string" ? qa(e, r, i) : ja(e, r, i);
3835
- }, ci = Ua, xa = [
3837
+ arguments.length >= 3 && (i = n), Ma.call(e) === "[object Array]" ? qa(e, r, i) : typeof e == "string" ? ja(e, r, i) : Ua(e, r, i);
3838
+ }, li = xa, Qa = [
3836
3839
  "Float32Array",
3837
3840
  "Float64Array",
3838
3841
  "Int8Array",
@@ -3844,31 +3847,31 @@ var Va = xe ? function(e) {
3844
3847
  "Uint32Array",
3845
3848
  "BigInt64Array",
3846
3849
  "BigUint64Array"
3847
- ], Ht = xa, Qa = typeof globalThis > "u" ? Ar : globalThis, li = function() {
3850
+ ], Ht = Qa, Ga = typeof globalThis > "u" ? Ar : globalThis, di = function() {
3848
3851
  for (var e = [], r = 0; r < Ht.length; r++)
3849
- typeof Qa[Ht[r]] == "function" && (e[e.length] = Ht[r]);
3852
+ typeof Ga[Ht[r]] == "function" && (e[e.length] = Ht[r]);
3850
3853
  return e;
3851
- }, Tt = ci, Ga = li, hn = Lr, kr = Cr, vt = $t, Ka = kr("Object.prototype.toString"), di = Rt(), yn = typeof globalThis > "u" ? Ar : globalThis, yr = Ga(), Pr = kr("String.prototype.slice"), Wt = Object.getPrototypeOf, za = kr("Array.prototype.indexOf", !0) || function(e, r) {
3854
+ }, Tt = li, Ka = di, yn = Lr, kr = Cr, vt = $t, za = kr("Object.prototype.toString"), fi = Rt(), mn = typeof globalThis > "u" ? Ar : globalThis, yr = Ka(), Pr = kr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ha = kr("Array.prototype.indexOf", !0) || function(e, r) {
3852
3855
  for (var n = 0; n < e.length; n += 1)
3853
3856
  if (e[n] === r)
3854
3857
  return n;
3855
3858
  return -1;
3856
3859
  }, Ot = { __proto__: null };
3857
- di && vt && Wt ? Tt(yr, function(t) {
3858
- var e = new yn[t]();
3860
+ fi && vt && Wt ? Tt(yr, function(t) {
3861
+ var e = new mn[t]();
3859
3862
  if (Symbol.toStringTag in e) {
3860
3863
  var r = Wt(e), n = vt(r, Symbol.toStringTag);
3861
3864
  if (!n) {
3862
3865
  var i = Wt(r);
3863
3866
  n = vt(i, Symbol.toStringTag);
3864
3867
  }
3865
- Ot["$" + t] = hn(n.get);
3868
+ Ot["$" + t] = yn(n.get);
3866
3869
  }
3867
3870
  }) : Tt(yr, function(t) {
3868
- var e = new yn[t](), r = e.slice || e.set;
3869
- r && (Ot["$" + t] = hn(r));
3871
+ var e = new mn[t](), r = e.slice || e.set;
3872
+ r && (Ot["$" + t] = yn(r));
3870
3873
  });
3871
- var Ha = function(e) {
3874
+ var Wa = function(e) {
3872
3875
  var r = !1;
3873
3876
  return Tt(Ot, function(n, i) {
3874
3877
  if (!r)
@@ -3877,7 +3880,7 @@ var Ha = function(e) {
3877
3880
  } catch {
3878
3881
  }
3879
3882
  }), r;
3880
- }, Wa = function(e) {
3883
+ }, Ya = function(e) {
3881
3884
  var r = !1;
3882
3885
  return Tt(Ot, function(n, i) {
3883
3886
  if (!r)
@@ -3886,35 +3889,35 @@ var Ha = function(e) {
3886
3889
  } catch {
3887
3890
  }
3888
3891
  }), r;
3889
- }, Ya = function(e) {
3892
+ }, Ja = function(e) {
3890
3893
  if (!e || typeof e != "object")
3891
3894
  return !1;
3892
- if (!di) {
3893
- var r = Pr(Ka(e), 8, -1);
3894
- return za(yr, r) > -1 ? r : r !== "Object" ? !1 : Wa(e);
3895
+ if (!fi) {
3896
+ var r = Pr(za(e), 8, -1);
3897
+ return Ha(yr, r) > -1 ? r : r !== "Object" ? !1 : Ya(e);
3895
3898
  }
3896
- return vt ? Ha(e) : null;
3897
- }, _t = ci, Ja = li, mn = Lr, Nr = Cr, St = $t, Xa = Nr("Object.prototype.toString"), fi = Rt(), gn = typeof globalThis > "u" ? Ar : globalThis, mr = Ja(), Fr = Nr("String.prototype.slice"), Yt = Object.getPrototypeOf, Za = Nr("Array.prototype.indexOf", !0) || function(e, r) {
3899
+ return vt ? Wa(e) : null;
3900
+ }, _t = li, Xa = di, gn = Lr, Nr = Cr, St = $t, Za = Nr("Object.prototype.toString"), pi = Rt(), bn = typeof globalThis > "u" ? Ar : globalThis, mr = Xa(), Fr = Nr("String.prototype.slice"), Yt = Object.getPrototypeOf, eu = Nr("Array.prototype.indexOf", !0) || function(e, r) {
3898
3901
  for (var n = 0; n < e.length; n += 1)
3899
3902
  if (e[n] === r)
3900
3903
  return n;
3901
3904
  return -1;
3902
3905
  }, Lt = { __proto__: null };
3903
- fi && St && Yt ? _t(mr, function(t) {
3904
- var e = new gn[t]();
3906
+ pi && St && Yt ? _t(mr, function(t) {
3907
+ var e = new bn[t]();
3905
3908
  if (Symbol.toStringTag in e) {
3906
3909
  var r = Yt(e), n = St(r, Symbol.toStringTag);
3907
3910
  if (!n) {
3908
3911
  var i = Yt(r);
3909
3912
  n = St(i, Symbol.toStringTag);
3910
3913
  }
3911
- Lt["$" + t] = mn(n.get);
3914
+ Lt["$" + t] = gn(n.get);
3912
3915
  }
3913
3916
  }) : _t(mr, function(t) {
3914
- var e = new gn[t](), r = e.slice || e.set;
3915
- r && (Lt["$" + t] = mn(r));
3917
+ var e = new bn[t](), r = e.slice || e.set;
3918
+ r && (Lt["$" + t] = gn(r));
3916
3919
  });
3917
- var eu = function(e) {
3920
+ var tu = function(e) {
3918
3921
  var r = !1;
3919
3922
  return _t(
3920
3923
  // eslint-disable-next-line no-extra-parens
@@ -3930,7 +3933,7 @@ var eu = function(e) {
3930
3933
  }
3931
3934
  }
3932
3935
  ), r;
3933
- }, tu = function(e) {
3936
+ }, ru = function(e) {
3934
3937
  var r = !1;
3935
3938
  return _t(
3936
3939
  // eslint-disable-next-line no-extra-parens
@@ -3946,19 +3949,19 @@ var eu = function(e) {
3946
3949
  }
3947
3950
  }
3948
3951
  ), r;
3949
- }, ru = function(e) {
3952
+ }, nu = function(e) {
3950
3953
  if (!e || typeof e != "object")
3951
3954
  return !1;
3952
- if (!fi) {
3953
- var r = Fr(Xa(e), 8, -1);
3954
- return Za(mr, r) > -1 ? r : r !== "Object" ? !1 : tu(e);
3955
+ if (!pi) {
3956
+ var r = Fr(Za(e), 8, -1);
3957
+ return eu(mr, r) > -1 ? r : r !== "Object" ? !1 : ru(e);
3955
3958
  }
3956
- return St ? eu(e) : null;
3957
- }, nu = ru, iu = function(e) {
3958
- return !!nu(e);
3959
+ return St ? tu(e) : null;
3960
+ }, iu = nu, ou = function(e) {
3961
+ return !!iu(e);
3959
3962
  };
3960
3963
  (function(t) {
3961
- var e = Sa, r = Ta, n = Ya, i = iu;
3964
+ var e = wa, r = Oa, n = Ja, i = ou;
3962
3965
  function o(y) {
3963
3966
  return y.call.bind(y);
3964
3967
  }
@@ -3967,11 +3970,11 @@ var eu = function(e) {
3967
3970
  var p = o(BigInt.prototype.valueOf);
3968
3971
  if (a)
3969
3972
  var v = o(Symbol.prototype.valueOf);
3970
- function w(y, vi) {
3973
+ function w(y, Si) {
3971
3974
  if (typeof y != "object")
3972
3975
  return !1;
3973
3976
  try {
3974
- return vi(y), !0;
3977
+ return Si(y), !0;
3975
3978
  } catch {
3976
3979
  return !1;
3977
3980
  }
@@ -4029,12 +4032,12 @@ var eu = function(e) {
4029
4032
  return n(y) === "BigUint64Array";
4030
4033
  }
4031
4034
  t.isBigUint64Array = Ie;
4032
- function de(y) {
4035
+ function fe(y) {
4033
4036
  return u(y) === "[object Map]";
4034
4037
  }
4035
- de.working = typeof Map < "u" && de(/* @__PURE__ */ new Map());
4038
+ fe.working = typeof Map < "u" && fe(/* @__PURE__ */ new Map());
4036
4039
  function Mt(y) {
4037
- return typeof Map > "u" ? !1 : de.working ? de(y) : y instanceof Map;
4040
+ return typeof Map > "u" ? !1 : fe.working ? fe(y) : y instanceof Map;
4038
4041
  }
4039
4042
  t.isMap = Mt;
4040
4043
  function we(y) {
@@ -4057,10 +4060,10 @@ var eu = function(e) {
4057
4060
  return u(y) === "[object WeakSet]";
4058
4061
  }
4059
4062
  De.working = typeof WeakSet < "u" && De(/* @__PURE__ */ new WeakSet());
4060
- function fe(y) {
4063
+ function pe(y) {
4061
4064
  return De(y);
4062
4065
  }
4063
- t.isWeakSet = fe;
4066
+ t.isWeakSet = pe;
4064
4067
  function Re(y) {
4065
4068
  return u(y) === "[object ArrayBuffer]";
4066
4069
  }
@@ -4125,14 +4128,14 @@ var eu = function(e) {
4125
4128
  return a && w(y, v);
4126
4129
  }
4127
4130
  t.isSymbolObject = Vr;
4128
- function gi(y) {
4131
+ function bi(y) {
4129
4132
  return Te(y) || ut(y) || Ve(y) || ct(y) || Vr(y);
4130
4133
  }
4131
- t.isBoxedPrimitive = gi;
4132
- function bi(y) {
4134
+ t.isBoxedPrimitive = bi;
4135
+ function vi(y) {
4133
4136
  return typeof Uint8Array < "u" && (at(y) || C(y));
4134
4137
  }
4135
- t.isAnyArrayBuffer = bi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4138
+ t.isAnyArrayBuffer = vi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4136
4139
  Object.defineProperty(t, y, {
4137
4140
  enumerable: !1,
4138
4141
  value: function() {
@@ -4140,8 +4143,8 @@ var eu = function(e) {
4140
4143
  }
4141
4144
  });
4142
4145
  });
4143
- })(Jn);
4144
- var ou = function(e) {
4146
+ })(Xn);
4147
+ var su = function(e) {
4145
4148
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
4146
4149
  }, gr = { exports: {} };
4147
4150
  typeof Object.create == "function" ? gr.exports = function(e, r) {
@@ -4161,7 +4164,7 @@ typeof Object.create == "function" ? gr.exports = function(e, r) {
4161
4164
  n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
4162
4165
  }
4163
4166
  };
4164
- var su = gr.exports;
4167
+ var au = gr.exports;
4165
4168
  (function(t) {
4166
4169
  var e = Object.getOwnPropertyDescriptors || function(h) {
4167
4170
  for (var m = Object.keys(h), A = {}, C = 0; C < m.length; C++)
@@ -4276,7 +4279,7 @@ var su = gr.exports;
4276
4279
  }), h;
4277
4280
  }
4278
4281
  function c(d, h, m) {
4279
- if (d.customInspect && h && de(h.inspect) && // Filter out the util module, it's inspect function is special
4282
+ if (d.customInspect && h && fe(h.inspect) && // Filter out the util module, it's inspect function is special
4280
4283
  h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
4281
4284
  !(h.constructor && h.constructor.prototype === h)) {
4282
4285
  var A = h.inspect(m, d);
@@ -4289,7 +4292,7 @@ var su = gr.exports;
4289
4292
  if (d.showHidden && (k = Object.getOwnPropertyNames(h)), Ie(h) && (k.indexOf("message") >= 0 || k.indexOf("description") >= 0))
4290
4293
  return p(h);
4291
4294
  if (k.length === 0) {
4292
- if (de(h)) {
4295
+ if (fe(h)) {
4293
4296
  var L = h.name ? ": " + h.name : "";
4294
4297
  return d.stylize("[Function" + L + "]", "special");
4295
4298
  }
@@ -4301,7 +4304,7 @@ var su = gr.exports;
4301
4304
  return p(h);
4302
4305
  }
4303
4306
  var D = "", H = !1, Te = ["{", "}"];
4304
- if (g(h) && (H = !0, Te = ["[", "]"]), de(h)) {
4307
+ if (g(h) && (H = !0, Te = ["[", "]"]), fe(h)) {
4305
4308
  var ut = h.name ? ": " + h.name : "";
4306
4309
  D = " [Function" + ut + "]";
4307
4310
  }
@@ -4381,7 +4384,7 @@ var su = gr.exports;
4381
4384
  `) + " " + d.join(`,
4382
4385
  `) + " " + m[1] : m[0] + h + " " + d.join(", ") + " " + m[1];
4383
4386
  }
4384
- t.types = Jn;
4387
+ t.types = Xn;
4385
4388
  function g(d) {
4386
4389
  return Array.isArray(d);
4387
4390
  }
@@ -4430,15 +4433,15 @@ var su = gr.exports;
4430
4433
  return oe(d) && (we(d) === "[object Error]" || d instanceof Error);
4431
4434
  }
4432
4435
  t.isError = Ie, t.types.isNativeError = Ie;
4433
- function de(d) {
4436
+ function fe(d) {
4434
4437
  return typeof d == "function";
4435
4438
  }
4436
- t.isFunction = de;
4439
+ t.isFunction = fe;
4437
4440
  function Mt(d) {
4438
4441
  return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
4439
4442
  typeof d > "u";
4440
4443
  }
4441
- t.isPrimitive = Mt, t.isBuffer = ou;
4444
+ t.isPrimitive = Mt, t.isBuffer = su;
4442
4445
  function we(d) {
4443
4446
  return Object.prototype.toString.call(d);
4444
4447
  }
@@ -4469,7 +4472,7 @@ var su = gr.exports;
4469
4472
  }
4470
4473
  t.log = function() {
4471
4474
  console.log("%s - %s", qt(), t.format.apply(t, arguments));
4472
- }, t.inherits = su, t._extend = function(d, h) {
4475
+ }, t.inherits = au, t._extend = function(d, h) {
4473
4476
  if (!h || !oe(h)) return d;
4474
4477
  for (var m = Object.keys(h), A = m.length; A--; )
4475
4478
  d[m[A]] = h[m[A]];
@@ -4478,15 +4481,15 @@ var su = gr.exports;
4478
4481
  function De(d, h) {
4479
4482
  return Object.prototype.hasOwnProperty.call(d, h);
4480
4483
  }
4481
- var fe = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
4484
+ var pe = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
4482
4485
  t.promisify = function(h) {
4483
4486
  if (typeof h != "function")
4484
4487
  throw new TypeError('The "original" argument must be of type Function');
4485
- if (fe && h[fe]) {
4486
- var m = h[fe];
4488
+ if (pe && h[pe]) {
4489
+ var m = h[pe];
4487
4490
  if (typeof m != "function")
4488
4491
  throw new TypeError('The "util.promisify.custom" argument must be of type Function');
4489
- return Object.defineProperty(m, fe, {
4492
+ return Object.defineProperty(m, pe, {
4490
4493
  value: m,
4491
4494
  enumerable: !1,
4492
4495
  writable: !1,
@@ -4508,7 +4511,7 @@ var su = gr.exports;
4508
4511
  }
4509
4512
  return k;
4510
4513
  }
4511
- return Object.setPrototypeOf(m, Object.getPrototypeOf(h)), fe && Object.defineProperty(m, fe, {
4514
+ return Object.setPrototypeOf(m, Object.getPrototypeOf(h)), pe && Object.defineProperty(m, pe, {
4512
4515
  value: m,
4513
4516
  enumerable: !1,
4514
4517
  writable: !1,
@@ -4517,7 +4520,7 @@ var su = gr.exports;
4517
4520
  m,
4518
4521
  e(h)
4519
4522
  );
4520
- }, t.promisify.custom = fe;
4523
+ }, t.promisify.custom = pe;
4521
4524
  function Re(d, h) {
4522
4525
  if (!d) {
4523
4526
  var m = new Error("Promise was rejected with a falsy value");
@@ -4553,7 +4556,7 @@ var su = gr.exports;
4553
4556
  }
4554
4557
  t.callbackify = at;
4555
4558
  })(Dt);
4556
- const { inherits: au, format: Jt } = Dt;
4559
+ const { inherits: uu, format: Jt } = Dt;
4557
4560
  function Oe(t, e, r = Error) {
4558
4561
  if (!t) throw new Error("Avvio error code must not be empty");
4559
4562
  if (!e) throw new Error("Avvio base error message must not be empty");
@@ -4564,9 +4567,9 @@ function Oe(t, e, r = Error) {
4564
4567
  }
4565
4568
  return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
4566
4569
  return `${this.name} [${this.code}]: ${this.message}`;
4567
- }, au(n, r), n;
4570
+ }, uu(n, r), n;
4568
4571
  }
4569
- var pi = {
4572
+ var hi = {
4570
4573
  createError: Oe,
4571
4574
  AVV_ERR_EXPOSE_ALREADY_DEFINED: Oe(
4572
4575
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
@@ -4592,7 +4595,7 @@ var pi = {
4592
4595
  "AVV_ERR_READY_TIMEOUT",
4593
4596
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
4594
4597
  )
4595
- }, uu = function t(e, r, n) {
4598
+ }, cu = function t(e, r, n) {
4596
4599
  r === void 0 && (r = ""), n || (n = {});
4597
4600
  var i = function(u) {
4598
4601
  var l = {
@@ -4614,15 +4617,15 @@ var pi = {
4614
4617
  return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
4615
4618
  }).join("");
4616
4619
  };
4617
- const cu = uu, bn = Symbol("avvio.TimeTree.untrackNode"), Xt = Symbol("avvio.TimeTree.trackNode"), vn = Symbol("avvio.TimeTree.getParent"), Sn = Symbol("avvio.TimeTree.getNode"), wn = Symbol("avvio.TimeTree.addNode");
4618
- let lu = class {
4620
+ const lu = cu, vn = Symbol("avvio.TimeTree.untrackNode"), Xt = Symbol("avvio.TimeTree.trackNode"), Sn = Symbol("avvio.TimeTree.getParent"), wn = Symbol("avvio.TimeTree.getNode"), An = Symbol("avvio.TimeTree.addNode");
4621
+ let du = class {
4619
4622
  constructor() {
4620
4623
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
4621
4624
  }
4622
4625
  [Xt](e) {
4623
4626
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
4624
4627
  }
4625
- [bn](e) {
4628
+ [vn](e) {
4626
4629
  this.tableId.delete(e.id);
4627
4630
  const r = this.tableLabel.get(e.label);
4628
4631
  if (r.id) {
@@ -4631,16 +4634,16 @@ let lu = class {
4631
4634
  }
4632
4635
  r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
4633
4636
  }
4634
- [vn](e) {
4637
+ [Sn](e) {
4635
4638
  if (e === null)
4636
4639
  return this.root;
4637
4640
  const r = this.tableLabel.get(e);
4638
4641
  return r.id ? r : r[r.length - 1];
4639
4642
  }
4640
- [Sn](e) {
4643
+ [wn](e) {
4641
4644
  return this.tableId.get(e);
4642
4645
  }
4643
- [wn](e, r, n) {
4646
+ [An](e, r, n) {
4644
4647
  if (e === null)
4645
4648
  return this.root = {
4646
4649
  id: "root",
@@ -4648,7 +4651,7 @@ let lu = class {
4648
4651
  start: n,
4649
4652
  nodes: []
4650
4653
  }, this[Xt](this.root), this.root.id;
4651
- const o = this[vn](e), s = `${r}-${Math.random()}`, a = {
4654
+ const o = this[Sn](e), s = `${r}-${Math.random()}`, a = {
4652
4655
  id: s,
4653
4656
  parent: e,
4654
4657
  start: n,
@@ -4658,24 +4661,24 @@ let lu = class {
4658
4661
  return o.nodes.push(a), this[Xt](a), s;
4659
4662
  }
4660
4663
  start(e, r, n = Date.now()) {
4661
- return this[wn](e, r, n);
4664
+ return this[An](e, r, n);
4662
4665
  }
4663
4666
  stop(e, r = Date.now()) {
4664
- const n = this[Sn](e);
4665
- n && (n.stop = r, n.diff = n.stop - n.start || 0, this[bn](n));
4667
+ const n = this[wn](e);
4668
+ n && (n.stop = r, n.diff = n.stop - n.start || 0, this[vn](n));
4666
4669
  }
4667
4670
  toJSON() {
4668
4671
  return Object.assign({}, this.root);
4669
4672
  }
4670
4673
  prittyPrint() {
4671
4674
  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());
4672
- return cu(r);
4675
+ return lu(r);
4673
4676
  }
4674
4677
  };
4675
- var du = lu, Dr = { exports: {} }, br = { exports: {} }, Zt, An;
4676
- function fu() {
4677
- if (An) return Zt;
4678
- An = 1;
4678
+ var fu = du, Dr = { exports: {} }, br = { exports: {} }, Zt, En;
4679
+ function pu() {
4680
+ if (En) return Zt;
4681
+ En = 1;
4679
4682
  var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
4680
4683
  Zt = function(c, f) {
4681
4684
  f = f || {};
@@ -4754,8 +4757,8 @@ function fu() {
4754
4757
  }
4755
4758
  return Zt;
4756
4759
  }
4757
- function pu(t) {
4758
- r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = fu(), r.destroy = l, Object.keys(t).forEach((c) => {
4760
+ function hu(t) {
4761
+ r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = pu(), r.destroy = l, Object.keys(t).forEach((c) => {
4759
4762
  r[c] = t[c];
4760
4763
  }), r.names = [], r.skips = [], r.formatters = {};
4761
4764
  function e(c) {
@@ -4835,7 +4838,7 @@ function pu(t) {
4835
4838
  }
4836
4839
  return r.enable(r.load()), r;
4837
4840
  }
4838
- var hu = pu;
4841
+ var yu = hu;
4839
4842
  (function(t, e) {
4840
4843
  e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
4841
4844
  let u = !1;
@@ -4959,7 +4962,7 @@ var hu = pu;
4959
4962
  } catch {
4960
4963
  }
4961
4964
  }
4962
- t.exports = hu(e);
4965
+ t.exports = yu(e);
4963
4966
  const { formatters: a } = t.exports;
4964
4967
  a.j = function(u) {
4965
4968
  try {
@@ -4969,22 +4972,22 @@ var hu = pu;
4969
4972
  }
4970
4973
  };
4971
4974
  })(br, br.exports);
4972
- var hi = br.exports;
4973
- const yu = jn, mu = Yn.EventEmitter, gu = Dt.inherits, U = hi("avvio"), { AVV_ERR_READY_TIMEOUT: bu } = pi, er = Symbol.for("plugin-meta");
4974
- function vu(t, e) {
4975
+ var yi = br.exports;
4976
+ const mu = Un, gu = Jn.EventEmitter, bu = Dt.inherits, U = yi("avvio"), { AVV_ERR_READY_TIMEOUT: vu } = hi, er = Symbol.for("plugin-meta");
4977
+ function Su(t, e) {
4975
4978
  return t[er] && t[er].name ? t[er].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4976
4979
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
4977
4980
  }
4978
- function Su() {
4981
+ function wu() {
4979
4982
  const t = {};
4980
4983
  return t.promise = new Promise((e, r) => {
4981
4984
  t.resolve = e, t.reject = r;
4982
4985
  }), t;
4983
4986
  }
4984
4987
  function Ye(t, e, r, n, i) {
4985
- 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 = vu(e, r), this.isAfter = n, this.q = yu(t, wu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4988
+ 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 = Su(e, r), this.isAfter = n, this.q = mu(t, Au, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4986
4989
  }
4987
- gu(Ye, mu);
4990
+ bu(Ye, gu);
4988
4991
  Ye.prototype.exec = function(t, e) {
4989
4992
  const r = this.func;
4990
4993
  let n = !1;
@@ -5012,7 +5015,7 @@ Ye.prototype.exec = function(t, e) {
5012
5015
  };
5013
5016
  this.timeout > 0 && (U("setting up timeout", i, this.timeout), o = setTimeout(function() {
5014
5017
  U("timed out", i), o = null;
5015
- const u = new bu(i);
5018
+ const u = new vu(i);
5016
5019
  u.fn = r, s(u);
5017
5020
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
5018
5021
  const a = r(this.server, this.opts, s);
@@ -5030,7 +5033,7 @@ Ye.prototype.loadedSoFar = function() {
5030
5033
  }), this.q.resume();
5031
5034
  };
5032
5035
  let e;
5033
- return this._promise ? e = Promise.resolve() : (this._promise = Su(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
5036
+ return this._promise ? e = Promise.resolve() : (this._promise = wu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
5034
5037
  };
5035
5038
  Ye.prototype.enqueue = function(t, e) {
5036
5039
  U("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
@@ -5055,12 +5058,12 @@ Ye.prototype.finish = function(t, e) {
5055
5058
  r();
5056
5059
  else
5057
5060
  U("delayed", this.name), this.q.drain = () => {
5058
- U("drain", this.name), this.q.drain = Au, queueMicrotask(n);
5061
+ U("drain", this.name), this.q.drain = Eu, queueMicrotask(n);
5059
5062
  };
5060
5063
  };
5061
5064
  queueMicrotask(n), this.q.resume();
5062
5065
  };
5063
- function wu(t, e) {
5066
+ function Au(t, e) {
5064
5067
  const r = this;
5065
5068
  E.nextTick(Rr.bind(r), t, e);
5066
5069
  }
@@ -5078,19 +5081,19 @@ function Rr(t, e) {
5078
5081
  });
5079
5082
  });
5080
5083
  }
5081
- function Au() {
5084
+ function Eu() {
5082
5085
  }
5083
5086
  Dr.exports = Ye;
5084
5087
  Dr.exports.loadPlugin = Rr;
5085
- var Eu = Dr.exports;
5086
- const En = jn, Iu = Yn.EventEmitter, Tu = Dt.inherits, {
5088
+ var Iu = Dr.exports;
5089
+ const In = Un, Tu = Jn.EventEmitter, Ou = Dt.inherits, {
5087
5090
  AVV_ERR_EXPOSE_ALREADY_DEFINED: tr,
5088
5091
  AVV_ERR_CALLBACK_NOT_FN: tt,
5089
- AVV_ERR_PLUGIN_NOT_VALID: Ou,
5090
- AVV_ERR_ROOT_PLG_BOOTED: _u,
5091
- AVV_ERR_READY_TIMEOUT: Lu
5092
- } = pi, Cu = du, vr = Eu, He = hi("avvio"), Ct = Symbol("kAvvio"), rr = Symbol("kThenifyDoNotWrap");
5093
- function ku(t, e, r) {
5092
+ AVV_ERR_PLUGIN_NOT_VALID: _u,
5093
+ AVV_ERR_ROOT_PLG_BOOTED: Lu,
5094
+ AVV_ERR_READY_TIMEOUT: Cu
5095
+ } = hi, ku = fu, vr = Iu, He = yi("avvio"), Ct = Symbol("kAvvio"), rr = Symbol("kThenifyDoNotWrap");
5096
+ function Pu(t, e, r) {
5094
5097
  const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
5095
5098
  if (t[i])
5096
5099
  throw new tr(i);
@@ -5100,7 +5103,7 @@ function ku(t, e, r) {
5100
5103
  throw new tr(s);
5101
5104
  t[i] = function(l, c) {
5102
5105
  return r.use(l, c), this;
5103
- }, Object.defineProperty(t, "then", { get: yi.bind(r) }), t[Ct] = !0, t[o] = function(l) {
5106
+ }, Object.defineProperty(t, "then", { get: mi.bind(r) }), t[Ct] = !0, t[o] = function(l) {
5104
5107
  return typeof l != "function" ? r._loadRegistered() : (r.after(nr(l, this)), this);
5105
5108
  }, t[s] = function(l) {
5106
5109
  if (l && typeof l != "function")
@@ -5109,7 +5112,7 @@ function ku(t, e, r) {
5109
5112
  }, t[a] = function(l) {
5110
5113
  if (typeof l != "function")
5111
5114
  throw new tt(a, typeof l);
5112
- return r.onClose(Ru(l, this)), this;
5115
+ return r.onClose(Vu(l, this)), this;
5113
5116
  }, t[u] = function(l) {
5114
5117
  if (l && typeof l != "function")
5115
5118
  throw new tt(u, typeof l);
@@ -5119,13 +5122,13 @@ function ku(t, e, r) {
5119
5122
  function G(t, e, r) {
5120
5123
  if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof G)) {
5121
5124
  const n = new G(t, e, r);
5122
- return t && ku(t, e, n), n;
5125
+ return t && Pu(t, e, n), n;
5123
5126
  }
5124
- 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 Cu(), this._readyQ = En(this, mi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5125
- this.emit("start"), this._readyQ.drain = In;
5126
- }, this._closeQ = En(this, Du, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5127
- this.emit("close"), this._closeQ.drain = In;
5128
- }, this._doStart = null, this._root = new vr(this, Pu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5127
+ 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 ku(), this._readyQ = In(this, gi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5128
+ this.emit("start"), this._readyQ.drain = Tn;
5129
+ }, this._closeQ = In(this, Ru, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5130
+ this.emit("close"), this._closeQ.drain = Tn;
5131
+ }, this._doStart = null, this._root = new vr(this, Nu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5129
5132
  const s = this.pluginTree.start(null, i, o);
5130
5133
  this._root.once("loaded", (a, u, l) => {
5131
5134
  this.pluginTree.stop(s, l);
@@ -5145,19 +5148,19 @@ function G(t, e, r) {
5145
5148
  this._readyQ.resume();
5146
5149
  });
5147
5150
  }
5148
- function Pu(t, e, r) {
5151
+ function Nu(t, e, r) {
5149
5152
  this._doStart = r, e.autostart && this.start();
5150
5153
  }
5151
- Tu(G, Iu);
5154
+ Ou(G, Tu);
5152
5155
  G.prototype.start = function() {
5153
5156
  return this.started = !0, E.nextTick(this._doStart), this;
5154
5157
  };
5155
5158
  G.prototype.override = function(t, e, r) {
5156
5159
  return t;
5157
5160
  };
5158
- function Nu(t) {
5161
+ function Fu(t) {
5159
5162
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
5160
- throw new Ou(typeof t);
5163
+ throw new _u(typeof t);
5161
5164
  return t;
5162
5165
  }
5163
5166
  G.prototype[Ct] = !0;
@@ -5168,10 +5171,10 @@ G.prototype._loadRegistered = function() {
5168
5171
  const t = this._current[0];
5169
5172
  return !this.started && !this.booted && E.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5170
5173
  };
5171
- Object.defineProperty(G.prototype, "then", { get: yi });
5174
+ Object.defineProperty(G.prototype, "then", { get: mi });
5172
5175
  G.prototype._addPlugin = function(t, e, r) {
5173
- if (t = Nu(t), e = e || {}, this.booted)
5174
- throw new _u();
5176
+ if (t = Fu(t), e = e || {}, this.booted)
5177
+ throw new Lu();
5175
5178
  const n = this._current[0], i = new vr(this, t, e, r);
5176
5179
  if (i.once("start", (o, s, a) => {
5177
5180
  const u = this.pluginTree.start(n.name, s, a);
@@ -5189,7 +5192,7 @@ G.prototype.after = function(t) {
5189
5192
  return this._loadRegistered();
5190
5193
  this._addPlugin(e.bind(this), {}, !0);
5191
5194
  function e(r, n, i) {
5192
- mi.call(this, t, i);
5195
+ gi.call(this, t, i);
5193
5196
  }
5194
5197
  return this;
5195
5198
  };
@@ -5240,9 +5243,9 @@ G.prototype.prettyPrint = function() {
5240
5243
  G.prototype.toJSON = function() {
5241
5244
  return this.pluginTree.toJSON();
5242
5245
  };
5243
- function In() {
5246
+ function Tn() {
5244
5247
  }
5245
- function yi() {
5248
+ function mi() {
5246
5249
  if (this.booted) {
5247
5250
  He("thenify returning null because we are already booted");
5248
5251
  return;
@@ -5253,7 +5256,7 @@ function yi() {
5253
5256
  }
5254
5257
  return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[rr] = !0, t(this._server)), e);
5255
5258
  }
5256
- function mi(t, e) {
5259
+ function gi(t, e) {
5257
5260
  const r = this._server, n = this._error;
5258
5261
  let i;
5259
5262
  if (this._error = null, t.length === 0)
@@ -5266,14 +5269,14 @@ function mi(t, e) {
5266
5269
  };
5267
5270
  t.length === 2 ? t(n, o) : t(n, r, o);
5268
5271
  } else
5269
- Fu.call(this, t, n, r, e);
5272
+ Du.call(this, t, n, r, e);
5270
5273
  }
5271
- function Fu(t, e, r, n) {
5274
+ function Du(t, e, r, n) {
5272
5275
  const i = t.name;
5273
5276
  He("setting up ready timeout", i, this._timeout);
5274
5277
  let o = setTimeout(() => {
5275
5278
  He("timed out", i), o = null;
5276
- const a = new Lu(i);
5279
+ const a = new Cu(i);
5277
5280
  a.fn = t, this._error = a, n(a);
5278
5281
  }, this._timeout);
5279
5282
  t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
@@ -5281,7 +5284,7 @@ function Fu(t, e, r, n) {
5281
5284
  o && (clearTimeout(o), this._error = a, n(this._error));
5282
5285
  }
5283
5286
  }
5284
- function Du(t, e) {
5287
+ function Ru(t, e) {
5285
5288
  const r = this._server, n = t[this._isOnCloseHandlerKey];
5286
5289
  if (t.length === 0 || t.length === 1) {
5287
5290
  let i;
@@ -5291,7 +5294,7 @@ function Du(t, e) {
5291
5294
  )) : E.nextTick(e);
5292
5295
  } else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
5293
5296
  }
5294
- function Ru(t, e) {
5297
+ function Vu(t, e) {
5295
5298
  return r.bind(e);
5296
5299
  function r(n, i) {
5297
5300
  let o;
@@ -5321,8 +5324,8 @@ Er.exports.express = function(t) {
5321
5324
  }
5322
5325
  });
5323
5326
  };
5324
- var Vu = Er.exports;
5325
- const $u = /* @__PURE__ */ ds(Vu);
5327
+ var $u = Er.exports;
5328
+ const Bu = /* @__PURE__ */ fs($u);
5326
5329
  (function() {
5327
5330
  if (window.requestAnimationFrame && window.cancelAnimationFrame)
5328
5331
  return;
@@ -5340,13 +5343,13 @@ const $u = /* @__PURE__ */ ds(Vu);
5340
5343
  }, window.cancelAnimationFrame = clearTimeout;
5341
5344
  }
5342
5345
  })();
5343
- function ac(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5344
- const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = $u(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5345
- return s.use(jo, { friendsTab: n.friendsTab }), s.use(Do, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Bo, { videoPlayerController: n?.videoPlayerController }), s.use(qo, {
5346
+ function uc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5347
+ const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Bu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5348
+ return s.use(Uo, { friendsTab: n.friendsTab }), s.use(Ro, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Mo, { videoPlayerController: n?.videoPlayerController }), s.use(jo, {
5346
5349
  onContentActivate: n?.onContentActivate,
5347
5350
  withAd: n?.withAd,
5348
5351
  withAdNotification: n?.withAdNotification
5349
- }), s.use(Xi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(no), s.use($o), s.use(es), s.use(Io), s.use(ls), s.after((a, u, l) => {
5352
+ }), s.use(Zi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(io), s.use(Bo), s.use(ts), s.use(To), s.use(ds), s.after((a, u, l) => {
5350
5353
  if (a)
5351
5354
  throw a;
5352
5355
  u.ready(), l();
@@ -5359,5 +5362,5 @@ function ac(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
5359
5362
  }), s;
5360
5363
  }
5361
5364
  export {
5362
- ac as StreamLayer
5365
+ uc as StreamLayer
5363
5366
  };