@streamlayer/sdk-web 0.33.2 → 0.33.4

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
@@ -5,7 +5,7 @@ import { SdkOverlayType as N } from "@streamlayer/sl-eslib/sdkSettings/sdkSettin
5
5
  import { InvitationCategory as Sr, InvitationFrom as wr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
6
  import { computed as Xn, map as Zn, atom as At, batched as Ar, onMount as sr } from "nanostores";
7
7
  import { nanoid as Gt } from "nanoid";
8
- import { ConnectError as et, Code as ee, createContextKey as Ir, createPromiseClient as Er, createContextValues as ei } from "@connectrpc/connect";
8
+ import { ConnectError as et, Code as ee, createContextKey as Er, createPromiseClient as Ir, createContextValues as ei } from "@connectrpc/connect";
9
9
  import { createGrpcWebTransport as Tr } from "@connectrpc/connect-web";
10
10
  import { nanoquery as Or } from "@nanostores/query";
11
11
  import { Events as ti } from "@streamlayer/sl-eslib/sports/events/events_connect";
@@ -71,20 +71,20 @@ function ii(t) {
71
71
  }
72
72
  }
73
73
  }
74
- var he = [], xe = !1, Ee, lt = -1;
74
+ var he = [], xe = !1, Ie, lt = -1;
75
75
  function oi() {
76
- !xe || !Ee || (xe = !1, Ee.length ? he = Ee.concat(he) : lt = -1, he.length && un());
76
+ !xe || !Ie || (xe = !1, Ie.length ? he = Ie.concat(he) : lt = -1, he.length && un());
77
77
  }
78
78
  function un() {
79
79
  if (!xe) {
80
80
  var t = an(oi);
81
81
  xe = !0;
82
82
  for (var e = he.length; e; ) {
83
- for (Ee = he, he = []; ++lt < e; )
84
- Ee && Ee[lt].run();
83
+ for (Ie = he, he = []; ++lt < e; )
84
+ Ie && Ie[lt].run();
85
85
  lt = -1, e = he.length;
86
86
  }
87
- Ee = null, xe = !1, ii(t);
87
+ Ie = null, xe = !1, ii(t);
88
88
  }
89
89
  }
90
90
  $.nextTick = function(t) {
@@ -133,7 +133,7 @@ $.umask = function() {
133
133
  return 0;
134
134
  };
135
135
  var si = sn.exports;
136
- const S = /* @__PURE__ */ ni(si), ai = Jn({
136
+ const w = /* @__PURE__ */ ni(si), ai = Jn({
137
137
  level: "trace",
138
138
  enabled: !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -176,7 +176,7 @@ class li {
176
176
  class di {
177
177
  }
178
178
  window.slStore = /* @__PURE__ */ Object.create(null);
179
- class It {
179
+ class Et {
180
180
  /**
181
181
  * store instance (nanostores)
182
182
  */
@@ -196,7 +196,7 @@ const fi = (t) => {
196
196
  const e = Object.keys(t);
197
197
  return Xn(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
198
198
  };
199
- class Te extends It {
199
+ class Te extends Et {
200
200
  getValues = () => this.getStore().get();
201
201
  getValue = (e) => this.getStore().get()[e];
202
202
  setValue = (e, r) => this.getStore().setKey(e, r);
@@ -268,7 +268,7 @@ class ln {
268
268
  }
269
269
  }
270
270
  }
271
- class W extends It {
271
+ class W extends Et {
272
272
  getValue = () => this.getStore().get();
273
273
  getValues() {
274
274
  throw new Error("not implemented");
@@ -284,7 +284,7 @@ class W extends It {
284
284
  }
285
285
  }
286
286
  const B = (t) => At(t);
287
- class ye extends It {
287
+ class ye extends Et {
288
288
  atomStore;
289
289
  constructor(e, r, n) {
290
290
  super(e, `api:${r}`), this.atomStore = At(), n && e.subscribe((i) => {
@@ -505,8 +505,8 @@ const mi = /* @__PURE__ */ new Set([
505
505
  await new Promise((c) => setTimeout(c, d));
506
506
  }
507
507
  }, Ht = {
508
- retryAttempts: Ir(5, { description: "Number of attempts to retry" }),
509
- retryDelay: Ir(3e4, { description: "Max delay between retries in milliseconds" })
508
+ retryAttempts: Er(10, { description: "Number of attempts to retry" }),
509
+ retryDelay: Er(3e4, { description: "Max delay between retries in milliseconds" })
510
510
  }, vi = () => {
511
511
  const t = localStorage.getItem("sl-device-id");
512
512
  if (t)
@@ -586,14 +586,14 @@ class Pr {
586
586
  const r = e.typeName;
587
587
  if (this.clients.has(r))
588
588
  return this.clients.get(r);
589
- const n = Er(e, this.transport);
589
+ const n = Ir(e, this.transport);
590
590
  return this.clients.set(r, n), n;
591
591
  };
592
592
  getStreamClient = (e) => {
593
593
  const r = `stream-${e.typeName}`;
594
594
  if (this.clients.has(r))
595
595
  return this.clients.get(r);
596
- const n = Er(e, this.streamTransport);
596
+ const n = Ir(e, this.streamTransport);
597
597
  return this.clients.set(r, n), n;
598
598
  };
599
599
  // create unary client, used for query request
@@ -661,12 +661,12 @@ const wi = (t, e) => {
661
661
  // we are sure that id is a string
662
662
  })).data?.attributes : void 0
663
663
  });
664
- }, Ii = (t, e) => {
664
+ }, Ei = (t, e) => {
665
665
  const { queryKey: r, client: n } = e.createPromiseClient(ar, { method: "me", params: [t] });
666
666
  return e.nanoquery.createFetcherStore(r, {
667
667
  fetcher: () => n.me({})
668
668
  });
669
- }, Ei = (t) => {
669
+ }, Ii = (t) => {
670
670
  const { client: e, createRequestOptions: r } = t.createPromiseClient(ar, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
671
671
  return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
672
672
  }, Ti = (t, e) => {
@@ -700,11 +700,11 @@ const wi = (t, e) => {
700
700
  retryable: !0
701
701
  }), t.analyticsTransport = new Pr(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) => {
702
702
  t.analyticsTransport.$headers.getStore().set(n);
703
- }), t.sdk.onMount(() => () => {
703
+ }), t.sdk.onMount({ name: "transport" }, () => () => {
704
704
  t.transport.disconnect(), t.analyticsTransport.disconnect();
705
705
  }), r();
706
706
  };
707
- class Et {
707
+ class It {
708
708
  delimiter = ":";
709
709
  prefix;
710
710
  storage;
@@ -732,7 +732,7 @@ var ue;
732
732
  (function(t) {
733
733
  t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
734
734
  })(ue || (ue = {}));
735
- class je extends Et {
735
+ class je extends It {
736
736
  constructor() {
737
737
  super("user");
738
738
  }
@@ -760,7 +760,7 @@ var de;
760
760
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
761
761
  })(de || (de = {}));
762
762
  const _i = (t) => {
763
- const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye(Ii(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
763
+ const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye(Ei(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
764
764
  if (!a)
765
765
  return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
766
766
  }), o = new ye(Ti(n.getStore(), t), "userSettings");
@@ -795,7 +795,7 @@ const _i = (t) => {
795
795
  organizationAdvertising: i
796
796
  };
797
797
  };
798
- class Fi extends It {
798
+ class Fi extends Et {
799
799
  stores;
800
800
  constructor(e) {
801
801
  const r = Pi(e), n = fi(r);
@@ -973,7 +973,7 @@ class Bi {
973
973
  window.requestAnimationFrame(() => {
974
974
  this.activeQuestionId.invalidate();
975
975
  });
976
- })), e.sdk.onMount(() => () => {
976
+ })), e.sdk.onMount({ name: "gamification-background" }, () => () => {
977
977
  this.activeQuestionId.off();
978
978
  for (const r of this.cancels)
979
979
  r(), this.cancels.delete(r);
@@ -1030,7 +1030,7 @@ class qi {
1030
1030
  r && r(...i), this.closeNotification(e.id);
1031
1031
  },
1032
1032
  action: (...i) => {
1033
- n && n(...i), this.closeNotification(e.id);
1033
+ n && n(...i), this.closeNotification(e.id, { animateHiding: !1 });
1034
1034
  }
1035
1035
  }), this.waitingQueue.add(e.id), this.activeQueue.size === this.options.concurrency) {
1036
1036
  const [i] = this.activeQueue;
@@ -1070,19 +1070,19 @@ class qi {
1070
1070
  }, r.delay || 0);
1071
1071
  this.timeouts.set(e, n), this.logger.debug({ notificationId: e }, "active queue tick completed"), this.tickWaitingQueue();
1072
1072
  };
1073
- closeNotification = (e) => {
1074
- const r = new Map(this.notificationsList.get()), n = r.get(e);
1075
- if (n) {
1076
- n.hiding = !(this.waitingQueue.size >= this.options.concurrency), this.notificationsList.set(r);
1077
- const i = setTimeout(() => {
1078
- const o = new Map(this.notificationsList.get());
1079
- o.delete(e), this.notificationsList.set(o);
1080
- const s = this.timeouts.get(e);
1081
- s !== void 0 && (clearTimeout(s), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden");
1073
+ closeNotification = (e, { animateHiding: r = !0 } = {}) => {
1074
+ const n = new Map(this.notificationsList.get()), i = n.get(e);
1075
+ if (i) {
1076
+ i.hiding = !(this.waitingQueue.size >= this.options.concurrency) && r, this.notificationsList.set(n);
1077
+ const o = setTimeout(() => {
1078
+ const s = new Map(this.notificationsList.get());
1079
+ s.delete(e), this.notificationsList.set(s);
1080
+ const a = this.timeouts.get(e);
1081
+ a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden");
1082
1082
  }, this.options.animationDelay || 0);
1083
- this.timeouts.set(e, i);
1083
+ this.timeouts.set(e, o);
1084
1084
  }
1085
- return this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding"), n;
1085
+ return this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding"), i;
1086
1086
  };
1087
1087
  drain = () => {
1088
1088
  this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
@@ -1092,7 +1092,7 @@ var gt;
1092
1092
  (function(t) {
1093
1093
  t.OPENED = "opened";
1094
1094
  })(gt || (gt = {}));
1095
- class Qi extends Et {
1095
+ class Qi extends It {
1096
1096
  constructor() {
1097
1097
  super("notification");
1098
1098
  }
@@ -1131,8 +1131,8 @@ class Gi {
1131
1131
  this.queue.addToQueue(e);
1132
1132
  }
1133
1133
  };
1134
- close = (e, r = !0) => {
1135
- this.queue.closeNotification(e), r && this.markAsViewed(e);
1134
+ close = (e, { markAsViewed: r = !0, animateHiding: n } = {}) => {
1135
+ this.queue.closeNotification(e, { animateHiding: n }), r && this.markAsViewed(e);
1136
1136
  };
1137
1137
  getActiveNotification = () => {
1138
1138
  const e = this.queue.notificationsList.get();
@@ -1149,7 +1149,7 @@ class Gi {
1149
1149
  };
1150
1150
  }
1151
1151
  const Ki = (t, e, r) => {
1152
- t.notifications = new Gi(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount(() => () => {
1152
+ t.notifications = new Gi(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1153
1153
  t.notifications.queue.drain();
1154
1154
  }), r();
1155
1155
  };
@@ -1172,7 +1172,7 @@ var Me;
1172
1172
  (function(t) {
1173
1173
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
1174
1174
  })(Me || (Me = {}));
1175
- class fn extends Et {
1175
+ class fn extends It {
1176
1176
  constructor() {
1177
1177
  super("gamification");
1178
1178
  }
@@ -1204,19 +1204,19 @@ const Wi = {
1204
1204
  if (p && m?.length) {
1205
1205
  const b = r.get();
1206
1206
  b && m.push(b), a.setKey("loading", !0), a.setKey("data", []);
1207
- const E = await u({
1207
+ const v = await u({
1208
1208
  eventId: p,
1209
1209
  usersIds: m
1210
1210
  });
1211
1211
  a.set({
1212
- data: E.data.map((F, V) => ({
1213
- ...F.attributes,
1214
- rank: V + 1
1212
+ data: v.data.map((_, V) => ({
1213
+ ..._.attributes,
1214
+ friendsRank: V + 1
1215
1215
  })),
1216
1216
  hasMore: !1,
1217
1217
  key: Date.now(),
1218
1218
  loading: !1
1219
- }), E.meta && (o = Math.round(E.meta.count / E.meta.pageSize));
1219
+ }), v.meta && (o = Math.round(v.meta.count / v.meta.pageSize));
1220
1220
  }
1221
1221
  }, c = () => {
1222
1222
  d();
@@ -1231,7 +1231,7 @@ const Wi = {
1231
1231
  };
1232
1232
  }), { $store: a, fetchMore: f, invalidate: c };
1233
1233
  };
1234
- class Yi extends Et {
1234
+ class Yi extends It {
1235
1235
  get = this.read;
1236
1236
  set = this.write;
1237
1237
  del = this.remove;
@@ -1330,7 +1330,7 @@ class no extends di {
1330
1330
  transport;
1331
1331
  bypassLogin;
1332
1332
  constructor(e, r, n) {
1333
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Ei(this.transport), this.connect();
1333
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Ii(this.transport), this.connect();
1334
1334
  }
1335
1335
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1336
1336
  /**
@@ -1450,12 +1450,16 @@ const We = new je(), io = (t, e, r) => {
1450
1450
  }
1451
1451
  }, r();
1452
1452
  }, so = (t, e, r) => {
1453
- const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
1454
- t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = (s) => {
1455
- i.has(s) || (i.add(s), t?.stores?.enabled?.get() === "on" && o.add(s()));
1453
+ const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1454
+ t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
1455
+ if (i.has(s)) {
1456
+ const d = o.get(s);
1457
+ d && d(), i.delete(s), o.delete(s);
1458
+ }
1459
+ i.set(s, { cb: u, clear: a }), t?.stores?.enabled?.get() === "on" && o.set(s, u());
1456
1460
  }, t.ready = () => {
1457
1461
  t.stores.enabled.subscribe((s) => {
1458
- s === "on" && n.onMountedFired === !1 && (i.forEach((a) => o.add(a())), n.onMountedFired = !0), s !== "on" && n.onMountedFired === !0 && (o.forEach((a) => a()), o.clear(), n.onMountedFired = !1);
1462
+ s === "on" && n.onMountedFired === !1 && (i.forEach(({ cb: a }, u) => o.set(u, a())), n.onMountedFired = !0), s !== "on" && n.onMountedFired === !0 && (o.forEach((a) => a()), o.clear(), i.forEach(({ clear: a }, u) => a && i.delete(u)), n.onMountedFired = !1);
1459
1463
  });
1460
1464
  }, t.sdk.initializeApp = async (s) => {
1461
1465
  if (t.contextConfig = s, t.stores.enabled.get() === "on")
@@ -1503,9 +1507,9 @@ const We = new je(), io = (t, e, r) => {
1503
1507
  };
1504
1508
  if (!d && c) {
1505
1509
  i.setKey("loading", !0);
1506
- let T = window.location.search, E = window.location.hash;
1507
- T && E || E ? T = `?${Vr(T, b)}` : E = `#${Vr("", b)}`;
1508
- const F = window.location.origin + window.location.pathname + T + E, V = await uo(t, { web: F, mobile: c });
1510
+ let I = window.location.search, v = window.location.hash;
1511
+ I && v || v ? I = `?${Vr(I, b)}` : v = `#${Vr("", b)}`;
1512
+ const _ = window.location.origin + window.location.pathname + I + v, V = await uo(t, { web: _, mobile: c });
1509
1513
  i.set({
1510
1514
  data: V.data?.link,
1511
1515
  loading: !1
@@ -1558,7 +1562,7 @@ const lo = (t, e, r, n) => {
1558
1562
  if (u === void 0 || d === void 0)
1559
1563
  return;
1560
1564
  const c = u?.options?.onboardingEnabled, f = d?.titleCard?.optIn;
1561
- c ? f ? t.set(U.Required) : t.set(U.Optional) : (f ? t.set(U.Unavailable) : t.set(U.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), !1));
1565
+ c ? f ? t.set(U.Required) : t.set(U.Optional) : (f ? t.set(U.Unavailable) : t.set(U.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
1562
1566
  } catch (s) {
1563
1567
  console.error(s);
1564
1568
  }
@@ -1664,7 +1668,7 @@ class go extends ln {
1664
1668
  const a = i.data.find((u) => u.userId === s)?.rank;
1665
1669
  a !== void 0 && o?.summary && (o.fromLeaderboard = !0, o.summary.friendsRank = a, this.userSummary.$store.set(o));
1666
1670
  }
1667
- })), this.cancels.add(this.background.activeQuestionId.listen(this.showInApp)), 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)), n.sdk.onMount(() => () => {
1671
+ })), this.cancels.add(this.background.activeQuestionId.listen(this.showInApp)), 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)), n.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
1668
1672
  for (const i of this.cancels)
1669
1673
  i(), this.cancels.delete(i);
1670
1674
  });
@@ -1692,11 +1696,11 @@ class go extends ln {
1692
1696
  const m = Wt(s, this.transport), b = m.subscribe(() => {
1693
1697
  });
1694
1698
  await m.get().promise;
1695
- const T = m.get().data;
1699
+ const I = m.get().data;
1696
1700
  b(), window.requestAnimationFrame(() => {
1697
1701
  m.invalidate();
1698
- }), p || (p = T?.answers.find(({ youVoted: q }) => q)?.id);
1699
- const E = a.find(({ correct: q }) => q), F = p ? a.find(({ id: q }) => q === p) : void 0, V = !!F?.correct;
1702
+ }), p || (p = I?.answers.find(({ youVoted: q }) => q)?.id);
1703
+ const v = a.find(({ correct: q }) => q), _ = p ? a.find(({ id: q }) => q === p) : void 0, V = !!_?.correct;
1700
1704
  if (f && d[c]?.attributes?.attributes.case === "question") {
1701
1705
  try {
1702
1706
  d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = V ? at.WON : at.LOST);
@@ -1704,7 +1708,7 @@ class go extends ln {
1704
1708
  }
1705
1709
  this.feedList.getStore().mutate(d);
1706
1710
  }
1707
- if (!F || !E)
1711
+ if (!_ || !v)
1708
1712
  return;
1709
1713
  this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
1710
1714
  type: be.QUESTION_RESOLVED,
@@ -1717,12 +1721,12 @@ class go extends ln {
1717
1721
  questionId: s,
1718
1722
  questionType: D.PREDICTION,
1719
1723
  question: {
1720
- title: V ? `Congratulations! You answered correctly! You won ${E.points} pts!` : `Better luck next time! Correct: ${E?.text}!`,
1724
+ title: V ? `Congratulations! You answered correctly! You won ${v.points} pts!` : `Better luck next time! Correct: ${v?.text}!`,
1721
1725
  votedAnswer: {
1722
- title: F?.text,
1723
- points: F?.points
1726
+ title: _?.text,
1727
+ points: _?.points
1724
1728
  },
1725
- correctAnswerTitle: E?.text,
1729
+ correctAnswerTitle: v?.text,
1726
1730
  correct: !!V,
1727
1731
  predictionResult: i === ce.RESOLVED,
1728
1732
  questionTitle: r?.subject
@@ -1793,26 +1797,26 @@ class go extends ln {
1793
1797
  this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
1794
1798
  };
1795
1799
  submitAnswer = async (e, r) => {
1796
- const n = Wt(e, this.transport), i = () => {
1797
- const o = this.feedList.getValues().data;
1798
- if (!o)
1800
+ const n = Wt(e, this.transport), i = n.subscribe(() => {
1801
+ }), o = { ...n.get().data || {} }, s = () => {
1802
+ const a = this.feedList.getValues().data;
1803
+ if (!a)
1799
1804
  return;
1800
- const s = o.findIndex((d) => d.id === e), a = o[s], u = a?.attributes?.attributes.case === "question" && a.attributes.attributes.value;
1801
- if (u) {
1805
+ const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
1806
+ if (c) {
1802
1807
  pe.emit("poll", {
1803
1808
  action: "voted",
1804
1809
  payload: {
1805
1810
  questionId: e,
1806
- questionType: u.questionType
1811
+ questionType: c.questionType
1807
1812
  }
1808
1813
  });
1809
- const d = n.subscribe(() => {
1810
- }), c = n.get().data;
1811
- if (d(), c) {
1812
- const f = c.answers.find((b) => b.correct === !0), p = c.answers.findIndex((b) => b.id === r), m = c.answers[p];
1813
- o[s].attributes.attributes.value.answerId = r, o[s].attributes.attributes.value.openForVoting = !1, o[s].attributes.attributes.value.text = m?.text || "", f && (o[s].attributes.attributes.value.status = f.id === r ? at.WON : at.LOST), this.feedList.getStore().mutate([...o]), c.answers[p].correct = f?.id === r, c.answers[p].youVoted = !0, c.answers.forEach((b) => {
1814
- b.percentageDecimal = 0;
1815
- }), f?.id === r && (c.answers[p].pointsEarned = c.status === ce.RESOLVED ? 0 : f.points), n.mutate({ ...c });
1814
+ const f = n.get().data;
1815
+ if (i(), f) {
1816
+ const p = f.answers.find((v) => v.correct === !0), m = f.answers.findIndex((v) => v.id === r), b = f.answers[m], I = f.answers.every(({ percentageDecimal: v }, _) => v === o?.answers[_].percentageDecimal);
1817
+ a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = b?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? at.WON : at.LOST), this.feedList.getStore().mutate([...a]), f.answers[m].correct = p?.id === r, f.answers[m].youVoted = !0, I && f.answers.forEach((v) => {
1818
+ v.percentageDecimal = 0;
1819
+ }), p?.id === r && (f.answers[m].pointsEarned = f.status === ce.RESOLVED ? 0 : p.points), n.mutate({ ...f });
1816
1820
  }
1817
1821
  this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
1818
1822
  this.userSummary.invalidate();
@@ -1820,15 +1824,15 @@ class go extends ln {
1820
1824
  }
1821
1825
  };
1822
1826
  try {
1823
- await zi(this.transport, { questionId: e, answerId: r }), i();
1824
- } catch (o) {
1825
- if (o.message === tt.ALREADY_VOTED) {
1827
+ await zi(this.transport, { questionId: e, answerId: r }), s();
1828
+ } catch (a) {
1829
+ if (a.message === tt.ALREADY_VOTED) {
1826
1830
  this.userSummary.invalidate();
1827
- const s = n.subscribe(() => {
1831
+ const u = n.subscribe(() => {
1828
1832
  });
1829
- n.invalidate(), s();
1833
+ n.invalidate(), u();
1830
1834
  }
1831
- throw o;
1835
+ throw a;
1832
1836
  }
1833
1837
  };
1834
1838
  openQuestion = (e, r) => {
@@ -1838,7 +1842,9 @@ class go extends ln {
1838
1842
  this.notifications.close(this.background.getCurrentSessionId({
1839
1843
  prefix: "notification",
1840
1844
  entity: e
1841
- }));
1845
+ }), {
1846
+ animateHiding: !1
1847
+ });
1842
1848
  let n = r?.attributes?.type;
1843
1849
  return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type), pe.emit("poll", {
1844
1850
  action: "opened",
@@ -2112,7 +2118,7 @@ const Ye = {
2112
2118
  [D.TWEET]: K.POLLS_TWITTER
2113
2119
  };
2114
2120
  D.UNSET + "", ae.UNSET, D.FACTOID + "", ae.POLLS, D.POLL + "", ae.POLLS, D.PREDICTION + "", ae.POLLS, D.PROMOTION + "", ae.POLLS, D.TRIVIA + "", ae.POLLS, D.TWEET + "", ae.POLLS;
2115
- const Io = {
2121
+ const Eo = {
2116
2122
  [N.UNSET]: Q.UNSET,
2117
2123
  [N.INPLAY]: Q.INPLAY,
2118
2124
  [N.MESSAGING]: Q.MESSAGING,
@@ -2132,7 +2138,7 @@ const Io = {
2132
2138
  [N.HIGHLIGHTS]: Q.HIGHLIGHTS,
2133
2139
  [N.PUBLIC_CHAT]: Q.PUBLIC_CHAT
2134
2140
  };
2135
- class Eo {
2141
+ class Io {
2136
2142
  analytics;
2137
2143
  constructor(e) {
2138
2144
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2309,7 +2315,7 @@ class Co {
2309
2315
  listenersCancels;
2310
2316
  connected = !1;
2311
2317
  constructor(e) {
2312
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = Oo({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Eo(this), this.polls = new To(this), this.invitation = new wo(this), this.interactions = new Ao(this);
2318
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = Oo({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Io(this), this.polls = new To(this), this.invitation = new wo(this), this.interactions = new Ao(this);
2313
2319
  const { client: r } = e.analyticsTransport.createPromiseClient(on, {
2314
2320
  method: "send"
2315
2321
  });
@@ -2339,7 +2345,7 @@ class Co {
2339
2345
  this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
2340
2346
  this.writeCommon("eventId", r);
2341
2347
  })), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
2342
- r && this.writeCommon("category", Io[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Gt()) : this.writeCommon("overlaySessionId", "");
2348
+ r && this.writeCommon("category", Eo[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Gt()) : this.writeCommon("overlaySessionId", "");
2343
2349
  })), this.onConnect(() => {
2344
2350
  const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
2345
2351
  this.writeCommon("screenOrientation", i.matches ? Cr.PORTRAIT : Cr.LANDSCAPE);
@@ -2353,7 +2359,7 @@ class Co {
2353
2359
  };
2354
2360
  }
2355
2361
  const Lo = (t, e, r) => {
2356
- t.analytics = new Co(t), t.sdk.onMount(() => (t.analytics.connect(), () => {
2362
+ t.analytics = new Co(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
2357
2363
  t.analytics.disconnect();
2358
2364
  })), r();
2359
2365
  };
@@ -2381,7 +2387,7 @@ function gn(t, e, r) {
2381
2387
  if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
2382
2388
  throw new Error("fastqueue concurrency must be greater than 1");
2383
2389
  var n = Fo(No), i = null, o = null, s = 0, a = null, u = {
2384
- push: T,
2390
+ push: I,
2385
2391
  drain: z,
2386
2392
  saturated: z,
2387
2393
  pause: c,
@@ -2392,7 +2398,7 @@ function gn(t, e, r) {
2392
2398
  idle: b,
2393
2399
  length: f,
2394
2400
  getQueue: p,
2395
- unshift: E,
2401
+ unshift: v,
2396
2402
  empty: z,
2397
2403
  kill: V,
2398
2404
  killAndDrain: q,
@@ -2406,35 +2412,35 @@ function gn(t, e, r) {
2406
2412
  u.paused = !0;
2407
2413
  }
2408
2414
  function f() {
2409
- for (var _ = i, R = 0; _; )
2410
- _ = _.next, R++;
2415
+ for (var k = i, R = 0; k; )
2416
+ k = k.next, R++;
2411
2417
  return R;
2412
2418
  }
2413
2419
  function p() {
2414
- for (var _ = i, R = []; _; )
2415
- R.push(_.value), _ = _.next;
2420
+ for (var k = i, R = []; k; )
2421
+ R.push(k.value), k = k.next;
2416
2422
  return R;
2417
2423
  }
2418
2424
  function m() {
2419
2425
  if (u.paused) {
2420
2426
  u.paused = !1;
2421
- for (var _ = 0; _ < u.concurrency; _++)
2422
- s++, F();
2427
+ for (var k = 0; k < u.concurrency; k++)
2428
+ s++, _();
2423
2429
  }
2424
2430
  }
2425
2431
  function b() {
2426
2432
  return s === 0 && u.length() === 0;
2427
2433
  }
2428
- function T(_, R) {
2429
- var I = n.get();
2430
- I.context = t, I.release = F, I.value = _, I.callback = R || z, I.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = I, o = I) : (i = I, o = I, u.saturated()) : (s++, e.call(t, I.value, I.worked));
2434
+ function I(k, R) {
2435
+ var T = n.get();
2436
+ T.context = t, T.release = _, T.value = k, T.callback = R || z, T.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
2431
2437
  }
2432
- function E(_, R) {
2433
- var I = n.get();
2434
- I.context = t, I.release = F, I.value = _, I.callback = R || z, I.errorHandler = a, s === u.concurrency || u.paused ? i ? (I.next = i, i = I) : (i = I, o = I, u.saturated()) : (s++, e.call(t, I.value, I.worked));
2438
+ function v(k, R) {
2439
+ var T = n.get();
2440
+ T.context = t, T.release = _, T.value = k, T.callback = R || z, T.errorHandler = a, s === u.concurrency || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
2435
2441
  }
2436
- function F(_) {
2437
- _ && n.release(_);
2442
+ function _(k) {
2443
+ k && n.release(k);
2438
2444
  var R = i;
2439
2445
  R ? u.paused ? s-- : (o === i && (o = null), i = R.next, R.next = null, e.call(t, R.value, R.worked), o === null && u.empty()) : --s === 0 && u.drain();
2440
2446
  }
@@ -2444,8 +2450,8 @@ function gn(t, e, r) {
2444
2450
  function q() {
2445
2451
  i = null, o = null, u.drain(), u.drain = z;
2446
2452
  }
2447
- function J(_) {
2448
- a = _;
2453
+ function J(k) {
2454
+ a = k;
2449
2455
  }
2450
2456
  }
2451
2457
  function z() {
@@ -2469,24 +2475,24 @@ function Do(t, e, r) {
2469
2475
  return i.push = a, i.unshift = u, i.drained = d, i;
2470
2476
  function a(c) {
2471
2477
  var f = new Promise(function(p, m) {
2472
- o(c, function(b, T) {
2478
+ o(c, function(b, I) {
2473
2479
  if (b) {
2474
2480
  m(b);
2475
2481
  return;
2476
2482
  }
2477
- p(T);
2483
+ p(I);
2478
2484
  });
2479
2485
  });
2480
2486
  return f.catch(z), f;
2481
2487
  }
2482
2488
  function u(c) {
2483
2489
  var f = new Promise(function(p, m) {
2484
- s(c, function(b, T) {
2490
+ s(c, function(b, I) {
2485
2491
  if (b) {
2486
2492
  m(b);
2487
2493
  return;
2488
2494
  }
2489
- p(T);
2495
+ p(I);
2490
2496
  });
2491
2497
  });
2492
2498
  return f.catch(z), f;
@@ -2520,21 +2526,21 @@ function Ro(t) {
2520
2526
  var bn = Number.isNaN || function(e) {
2521
2527
  return e !== e;
2522
2528
  };
2523
- function k() {
2524
- k.init.call(this);
2529
+ function P() {
2530
+ P.init.call(this);
2525
2531
  }
2526
- lr.exports = k;
2532
+ lr.exports = P;
2527
2533
  lr.exports.once = Mo;
2528
- k.EventEmitter = k;
2529
- k.prototype._events = void 0;
2530
- k.prototype._eventsCount = 0;
2531
- k.prototype._maxListeners = void 0;
2534
+ P.EventEmitter = P;
2535
+ P.prototype._events = void 0;
2536
+ P.prototype._eventsCount = 0;
2537
+ P.prototype._maxListeners = void 0;
2532
2538
  var jr = 10;
2533
2539
  function Ot(t) {
2534
2540
  if (typeof t != "function")
2535
2541
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
2536
2542
  }
2537
- Object.defineProperty(k, "defaultMaxListeners", {
2543
+ Object.defineProperty(P, "defaultMaxListeners", {
2538
2544
  enumerable: !0,
2539
2545
  get: function() {
2540
2546
  return jr;
@@ -2545,21 +2551,21 @@ Object.defineProperty(k, "defaultMaxListeners", {
2545
2551
  jr = t;
2546
2552
  }
2547
2553
  });
2548
- k.init = function() {
2554
+ P.init = function() {
2549
2555
  (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;
2550
2556
  };
2551
- k.prototype.setMaxListeners = function(e) {
2557
+ P.prototype.setMaxListeners = function(e) {
2552
2558
  if (typeof e != "number" || e < 0 || bn(e))
2553
2559
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
2554
2560
  return this._maxListeners = e, this;
2555
2561
  };
2556
2562
  function vn(t) {
2557
- return t._maxListeners === void 0 ? k.defaultMaxListeners : t._maxListeners;
2563
+ return t._maxListeners === void 0 ? P.defaultMaxListeners : t._maxListeners;
2558
2564
  }
2559
- k.prototype.getMaxListeners = function() {
2565
+ P.prototype.getMaxListeners = function() {
2560
2566
  return vn(this);
2561
2567
  };
2562
- k.prototype.emit = function(e) {
2568
+ P.prototype.emit = function(e) {
2563
2569
  for (var r = [], n = 1; n < arguments.length; n++)
2564
2570
  r.push(arguments[n]);
2565
2571
  var i = e === "error", o = this._events;
@@ -2580,7 +2586,7 @@ k.prototype.emit = function(e) {
2580
2586
  if (typeof u == "function")
2581
2587
  $r(u, this, r);
2582
2588
  else
2583
- for (var d = u.length, c = En(u, d), n = 0; n < d; ++n)
2589
+ for (var d = u.length, c = In(u, d), n = 0; n < d; ++n)
2584
2590
  $r(c[n], this, r);
2585
2591
  return !0;
2586
2592
  };
@@ -2599,11 +2605,11 @@ function Sn(t, e, r, n) {
2599
2605
  }
2600
2606
  return t;
2601
2607
  }
2602
- k.prototype.addListener = function(e, r) {
2608
+ P.prototype.addListener = function(e, r) {
2603
2609
  return Sn(this, e, r, !1);
2604
2610
  };
2605
- k.prototype.on = k.prototype.addListener;
2606
- k.prototype.prependListener = function(e, r) {
2611
+ P.prototype.on = P.prototype.addListener;
2612
+ P.prototype.prependListener = function(e, r) {
2607
2613
  return Sn(this, e, r, !0);
2608
2614
  };
2609
2615
  function Vo() {
@@ -2614,13 +2620,13 @@ function wn(t, e, r) {
2614
2620
  var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Vo.bind(n);
2615
2621
  return i.listener = r, n.wrapFn = i, i;
2616
2622
  }
2617
- k.prototype.once = function(e, r) {
2623
+ P.prototype.once = function(e, r) {
2618
2624
  return Ot(r), this.on(e, wn(this, e, r)), this;
2619
2625
  };
2620
- k.prototype.prependOnceListener = function(e, r) {
2626
+ P.prototype.prependOnceListener = function(e, r) {
2621
2627
  return Ot(r), this.prependListener(e, wn(this, e, r)), this;
2622
2628
  };
2623
- k.prototype.removeListener = function(e, r) {
2629
+ P.prototype.removeListener = function(e, r) {
2624
2630
  var n, i, o, s, a;
2625
2631
  if (Ot(r), i = this._events, i === void 0)
2626
2632
  return this;
@@ -2640,8 +2646,8 @@ k.prototype.removeListener = function(e, r) {
2640
2646
  }
2641
2647
  return this;
2642
2648
  };
2643
- k.prototype.off = k.prototype.removeListener;
2644
- k.prototype.removeAllListeners = function(e) {
2649
+ P.prototype.off = P.prototype.removeListener;
2650
+ P.prototype.removeAllListeners = function(e) {
2645
2651
  var r, n, i;
2646
2652
  if (n = this._events, n === void 0)
2647
2653
  return this;
@@ -2665,19 +2671,19 @@ function An(t, e, r) {
2665
2671
  if (n === void 0)
2666
2672
  return [];
2667
2673
  var i = n[e];
2668
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? jo(i) : En(i, i.length);
2674
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? jo(i) : In(i, i.length);
2669
2675
  }
2670
- k.prototype.listeners = function(e) {
2676
+ P.prototype.listeners = function(e) {
2671
2677
  return An(this, e, !0);
2672
2678
  };
2673
- k.prototype.rawListeners = function(e) {
2679
+ P.prototype.rawListeners = function(e) {
2674
2680
  return An(this, e, !1);
2675
2681
  };
2676
- k.listenerCount = function(t, e) {
2677
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : In.call(t, e);
2682
+ P.listenerCount = function(t, e) {
2683
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : En.call(t, e);
2678
2684
  };
2679
- k.prototype.listenerCount = In;
2680
- function In(t) {
2685
+ P.prototype.listenerCount = En;
2686
+ function En(t) {
2681
2687
  var e = this._events;
2682
2688
  if (e !== void 0) {
2683
2689
  var r = e[t];
@@ -2688,10 +2694,10 @@ function In(t) {
2688
2694
  }
2689
2695
  return 0;
2690
2696
  }
2691
- k.prototype.eventNames = function() {
2697
+ P.prototype.eventNames = function() {
2692
2698
  return this._eventsCount > 0 ? dt(this._events) : [];
2693
2699
  };
2694
- function En(t, e) {
2700
+ function In(t, e) {
2695
2701
  for (var r = new Array(e), n = 0; n < e; ++n)
2696
2702
  r[n] = t[n];
2697
2703
  return r;
@@ -2799,7 +2805,7 @@ var On = lr.exports, Ct = {}, Cn = {}, Ln = function() {
2799
2805
  d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
2800
2806
  }
2801
2807
  return i;
2802
- }, Zo = Xo, fr = Function.prototype.bind || Zo, es = Function.prototype.call, ts = Object.prototype.hasOwnProperty, rs = fr, ns = rs.call(es, ts), A, Qe = SyntaxError, _n = Function, qe = TypeError, Pt = function(t) {
2808
+ }, Zo = Xo, fr = Function.prototype.bind || Zo, es = Function.prototype.call, ts = Object.prototype.hasOwnProperty, rs = fr, ns = rs.call(es, ts), E, Qe = SyntaxError, _n = Function, qe = TypeError, Pt = function(t) {
2803
2809
  try {
2804
2810
  return _n('"use strict"; return (' + t + ").constructor;")();
2805
2811
  } catch {
@@ -2825,22 +2831,22 @@ var Ft = function() {
2825
2831
  }
2826
2832
  }() : Ft, Re = qo(), os = Go(), j = Object.getPrototypeOf || (os ? function(t) {
2827
2833
  return t.__proto__;
2828
- } : null), $e = {}, ss = typeof Uint8Array > "u" || !j ? A : j(Uint8Array), Le = {
2829
- "%AggregateError%": typeof AggregateError > "u" ? A : AggregateError,
2834
+ } : null), $e = {}, ss = typeof Uint8Array > "u" || !j ? E : j(Uint8Array), Le = {
2835
+ "%AggregateError%": typeof AggregateError > "u" ? E : AggregateError,
2830
2836
  "%Array%": Array,
2831
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? A : ArrayBuffer,
2832
- "%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) : A,
2833
- "%AsyncFromSyncIteratorPrototype%": A,
2837
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? E : ArrayBuffer,
2838
+ "%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) : E,
2839
+ "%AsyncFromSyncIteratorPrototype%": E,
2834
2840
  "%AsyncFunction%": $e,
2835
2841
  "%AsyncGenerator%": $e,
2836
2842
  "%AsyncGeneratorFunction%": $e,
2837
2843
  "%AsyncIteratorPrototype%": $e,
2838
- "%Atomics%": typeof Atomics > "u" ? A : Atomics,
2839
- "%BigInt%": typeof BigInt > "u" ? A : BigInt,
2840
- "%BigInt64Array%": typeof BigInt64Array > "u" ? A : BigInt64Array,
2841
- "%BigUint64Array%": typeof BigUint64Array > "u" ? A : BigUint64Array,
2844
+ "%Atomics%": typeof Atomics > "u" ? E : Atomics,
2845
+ "%BigInt%": typeof BigInt > "u" ? E : BigInt,
2846
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? E : BigInt64Array,
2847
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? E : BigUint64Array,
2842
2848
  "%Boolean%": Boolean,
2843
- "%DataView%": typeof DataView > "u" ? A : DataView,
2849
+ "%DataView%": typeof DataView > "u" ? E : DataView,
2844
2850
  "%Date%": Date,
2845
2851
  "%decodeURI%": decodeURI,
2846
2852
  "%decodeURIComponent%": decodeURIComponent,
@@ -2850,49 +2856,49 @@ var Ft = function() {
2850
2856
  "%eval%": eval,
2851
2857
  // eslint-disable-line no-eval
2852
2858
  "%EvalError%": EvalError,
2853
- "%Float32Array%": typeof Float32Array > "u" ? A : Float32Array,
2854
- "%Float64Array%": typeof Float64Array > "u" ? A : Float64Array,
2855
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? A : FinalizationRegistry,
2859
+ "%Float32Array%": typeof Float32Array > "u" ? E : Float32Array,
2860
+ "%Float64Array%": typeof Float64Array > "u" ? E : Float64Array,
2861
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? E : FinalizationRegistry,
2856
2862
  "%Function%": _n,
2857
2863
  "%GeneratorFunction%": $e,
2858
- "%Int8Array%": typeof Int8Array > "u" ? A : Int8Array,
2859
- "%Int16Array%": typeof Int16Array > "u" ? A : Int16Array,
2860
- "%Int32Array%": typeof Int32Array > "u" ? A : Int32Array,
2864
+ "%Int8Array%": typeof Int8Array > "u" ? E : Int8Array,
2865
+ "%Int16Array%": typeof Int16Array > "u" ? E : Int16Array,
2866
+ "%Int32Array%": typeof Int32Array > "u" ? E : Int32Array,
2861
2867
  "%isFinite%": isFinite,
2862
2868
  "%isNaN%": isNaN,
2863
- "%IteratorPrototype%": Re && j ? j(j([][Symbol.iterator]())) : A,
2864
- "%JSON%": typeof JSON == "object" ? JSON : A,
2865
- "%Map%": typeof Map > "u" ? A : Map,
2866
- "%MapIteratorPrototype%": typeof Map > "u" || !Re || !j ? A : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
2869
+ "%IteratorPrototype%": Re && j ? j(j([][Symbol.iterator]())) : E,
2870
+ "%JSON%": typeof JSON == "object" ? JSON : E,
2871
+ "%Map%": typeof Map > "u" ? E : Map,
2872
+ "%MapIteratorPrototype%": typeof Map > "u" || !Re || !j ? E : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
2867
2873
  "%Math%": Math,
2868
2874
  "%Number%": Number,
2869
2875
  "%Object%": Object,
2870
2876
  "%parseFloat%": parseFloat,
2871
2877
  "%parseInt%": parseInt,
2872
- "%Promise%": typeof Promise > "u" ? A : Promise,
2873
- "%Proxy%": typeof Proxy > "u" ? A : Proxy,
2878
+ "%Promise%": typeof Promise > "u" ? E : Promise,
2879
+ "%Proxy%": typeof Proxy > "u" ? E : Proxy,
2874
2880
  "%RangeError%": RangeError,
2875
2881
  "%ReferenceError%": ReferenceError,
2876
- "%Reflect%": typeof Reflect > "u" ? A : Reflect,
2882
+ "%Reflect%": typeof Reflect > "u" ? E : Reflect,
2877
2883
  "%RegExp%": RegExp,
2878
- "%Set%": typeof Set > "u" ? A : Set,
2879
- "%SetIteratorPrototype%": typeof Set > "u" || !Re || !j ? A : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
2880
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? A : SharedArrayBuffer,
2884
+ "%Set%": typeof Set > "u" ? E : Set,
2885
+ "%SetIteratorPrototype%": typeof Set > "u" || !Re || !j ? E : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
2886
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? E : SharedArrayBuffer,
2881
2887
  "%String%": String,
2882
- "%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : A,
2883
- "%Symbol%": Re ? Symbol : A,
2888
+ "%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : E,
2889
+ "%Symbol%": Re ? Symbol : E,
2884
2890
  "%SyntaxError%": Qe,
2885
2891
  "%ThrowTypeError%": is,
2886
2892
  "%TypedArray%": ss,
2887
2893
  "%TypeError%": qe,
2888
- "%Uint8Array%": typeof Uint8Array > "u" ? A : Uint8Array,
2889
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? A : Uint8ClampedArray,
2890
- "%Uint16Array%": typeof Uint16Array > "u" ? A : Uint16Array,
2891
- "%Uint32Array%": typeof Uint32Array > "u" ? A : Uint32Array,
2894
+ "%Uint8Array%": typeof Uint8Array > "u" ? E : Uint8Array,
2895
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? E : Uint8ClampedArray,
2896
+ "%Uint16Array%": typeof Uint16Array > "u" ? E : Uint16Array,
2897
+ "%Uint32Array%": typeof Uint32Array > "u" ? E : Uint32Array,
2892
2898
  "%URIError%": URIError,
2893
- "%WeakMap%": typeof WeakMap > "u" ? A : WeakMap,
2894
- "%WeakRef%": typeof WeakRef > "u" ? A : WeakRef,
2895
- "%WeakSet%": typeof WeakSet > "u" ? A : WeakSet
2899
+ "%WeakMap%": typeof WeakMap > "u" ? E : WeakMap,
2900
+ "%WeakRef%": typeof WeakRef > "u" ? E : WeakRef,
2901
+ "%WeakSet%": typeof WeakSet > "u" ? E : WeakSet
2896
2902
  };
2897
2903
  if (j)
2898
2904
  try {
@@ -3014,8 +3020,8 @@ var us = function t(e) {
3014
3020
  return;
3015
3021
  }
3016
3022
  if (Ce && c + 1 >= n.length) {
3017
- var T = Ce(a, p);
3018
- f = !!T, f && "get" in T && !("originalValue" in T.get) ? a = T.get : a = a[p];
3023
+ var I = Ce(a, p);
3024
+ f = !!I, f && "get" in I && !("originalValue" in I.get) ? a = I.get : a = a[p];
3019
3025
  } else
3020
3026
  f = mt(a, p), a = a[p];
3021
3027
  f && !u && (Le[s] = a);
@@ -3079,7 +3085,7 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
3079
3085
  e[r] = n;
3080
3086
  else
3081
3087
  throw new vs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3082
- }, Fn = Ke, Gr = Ss, ws = Pn(), Kr = hr, zr = Fn("%TypeError%"), As = Fn("%Math.floor%"), Is = function(e, r) {
3088
+ }, Fn = Ke, Gr = Ss, ws = Pn(), Kr = hr, zr = Fn("%TypeError%"), As = Fn("%Math.floor%"), Es = function(e, r) {
3083
3089
  if (typeof e != "function")
3084
3090
  throw new zr("`fn` is not a function");
3085
3091
  if (typeof r != "number" || r < 0 || r > 4294967295 || As(r) !== r)
@@ -3104,7 +3110,7 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
3104
3110
  )), e;
3105
3111
  };
3106
3112
  (function(t) {
3107
- var e = fr, r = Ke, n = Is, i = r("%TypeError%"), o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = r("%Object.defineProperty%", !0), d = r("%Math.max%");
3113
+ var e = fr, r = Ke, n = Es, i = r("%TypeError%"), o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = r("%Object.defineProperty%", !0), d = r("%Math.max%");
3108
3114
  if (u)
3109
3115
  try {
3110
3116
  u({}, "a", { value: 1 });
@@ -3126,9 +3132,9 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
3126
3132
  };
3127
3133
  u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
3128
3134
  })(kn);
3129
- var Nn = kn.exports, Dn = Ke, Rn = Nn, Es = Rn(Dn("String.prototype.indexOf")), Vn = function(e, r) {
3135
+ var Nn = kn.exports, Dn = Ke, Rn = Nn, Is = Rn(Dn("String.prototype.indexOf")), Vn = function(e, r) {
3130
3136
  var n = Dn(e, !!r);
3131
- return typeof n == "function" && Es(e, ".prototype.") > -1 ? Rn(n) : n;
3137
+ return typeof n == "function" && Is(e, ".prototype.") > -1 ? Rn(n) : n;
3132
3138
  }, Ts = dr(), Os = Vn, Xt = Os("Object.prototype.toString"), Lt = function(e) {
3133
3139
  return Ts && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : Xt(e) === "[object Arguments]";
3134
3140
  }, $n = function(e) {
@@ -3325,18 +3331,18 @@ var na = function(e) {
3325
3331
  }
3326
3332
  }
3327
3333
  t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
3328
- function T(y) {
3334
+ function I(y) {
3329
3335
  return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
3330
3336
  }
3331
- t.isPromise = T;
3332
- function E(y) {
3337
+ t.isPromise = I;
3338
+ function v(y) {
3333
3339
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
3334
3340
  }
3335
- t.isArrayBufferView = E;
3336
- function F(y) {
3341
+ t.isArrayBufferView = v;
3342
+ function _(y) {
3337
3343
  return n(y) === "Uint8Array";
3338
3344
  }
3339
- t.isUint8Array = F;
3345
+ t.isUint8Array = _;
3340
3346
  function V(y) {
3341
3347
  return n(y) === "Uint8ClampedArray";
3342
3348
  }
@@ -3349,18 +3355,18 @@ var na = function(e) {
3349
3355
  return n(y) === "Uint32Array";
3350
3356
  }
3351
3357
  t.isUint32Array = J;
3352
- function _(y) {
3358
+ function k(y) {
3353
3359
  return n(y) === "Int8Array";
3354
3360
  }
3355
- t.isInt8Array = _;
3361
+ t.isInt8Array = k;
3356
3362
  function R(y) {
3357
3363
  return n(y) === "Int16Array";
3358
3364
  }
3359
3365
  t.isInt16Array = R;
3360
- function I(y) {
3366
+ function T(y) {
3361
3367
  return n(y) === "Int32Array";
3362
3368
  }
3363
- t.isInt32Array = I;
3369
+ t.isInt32Array = T;
3364
3370
  function X(y) {
3365
3371
  return n(y) === "Float32Array";
3366
3372
  }
@@ -3426,29 +3432,29 @@ var na = function(e) {
3426
3432
  }
3427
3433
  t.isDataView = h;
3428
3434
  var g = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
3429
- function v(y) {
3435
+ function S(y) {
3430
3436
  return u(y) === "[object SharedArrayBuffer]";
3431
3437
  }
3432
3438
  function C(y) {
3433
- return typeof g > "u" ? !1 : (typeof v.working > "u" && (v.working = v(new g())), v.working ? v(y) : y instanceof g);
3439
+ return typeof g > "u" ? !1 : (typeof S.working > "u" && (S.working = S(new g())), S.working ? S(y) : y instanceof g);
3434
3440
  }
3435
3441
  t.isSharedArrayBuffer = C;
3436
3442
  function L(y) {
3437
3443
  return u(y) === "[object AsyncFunction]";
3438
3444
  }
3439
3445
  t.isAsyncFunction = L;
3440
- function w(y) {
3446
+ function A(y) {
3441
3447
  return u(y) === "[object Map Iterator]";
3442
3448
  }
3443
- t.isMapIterator = w;
3449
+ t.isMapIterator = A;
3444
3450
  function O(y) {
3445
3451
  return u(y) === "[object Set Iterator]";
3446
3452
  }
3447
3453
  t.isSetIterator = O;
3448
- function P(y) {
3454
+ function F(y) {
3449
3455
  return u(y) === "[object Generator]";
3450
3456
  }
3451
- t.isGeneratorObject = P;
3457
+ t.isGeneratorObject = F;
3452
3458
  function G(y) {
3453
3459
  return u(y) === "[object WebAssembly.Module]";
3454
3460
  }
@@ -3512,65 +3518,65 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
3512
3518
  var ua = nr.exports;
3513
3519
  (function(t) {
3514
3520
  var e = Object.getOwnPropertyDescriptors || function(h) {
3515
- for (var g = Object.keys(h), v = {}, C = 0; C < g.length; C++)
3516
- v[g[C]] = Object.getOwnPropertyDescriptor(h, g[C]);
3517
- return v;
3521
+ for (var g = Object.keys(h), S = {}, C = 0; C < g.length; C++)
3522
+ S[g[C]] = Object.getOwnPropertyDescriptor(h, g[C]);
3523
+ return S;
3518
3524
  }, r = /%[sdj%]/g;
3519
3525
  t.format = function(l) {
3520
- if (!_(l)) {
3526
+ if (!k(l)) {
3521
3527
  for (var h = [], g = 0; g < arguments.length; g++)
3522
3528
  h.push(s(arguments[g]));
3523
3529
  return h.join(" ");
3524
3530
  }
3525
- for (var g = 1, v = arguments, C = v.length, L = String(l).replace(r, function(O) {
3531
+ for (var g = 1, S = arguments, C = S.length, L = String(l).replace(r, function(O) {
3526
3532
  if (O === "%%")
3527
3533
  return "%";
3528
3534
  if (g >= C)
3529
3535
  return O;
3530
3536
  switch (O) {
3531
3537
  case "%s":
3532
- return String(v[g++]);
3538
+ return String(S[g++]);
3533
3539
  case "%d":
3534
- return Number(v[g++]);
3540
+ return Number(S[g++]);
3535
3541
  case "%j":
3536
3542
  try {
3537
- return JSON.stringify(v[g++]);
3543
+ return JSON.stringify(S[g++]);
3538
3544
  } catch {
3539
3545
  return "[Circular]";
3540
3546
  }
3541
3547
  default:
3542
3548
  return O;
3543
3549
  }
3544
- }), w = v[g]; g < C; w = v[++g])
3545
- V(w) || !Z(w) ? L += " " + w : L += " " + s(w);
3550
+ }), A = S[g]; g < C; A = S[++g])
3551
+ V(A) || !Z(A) ? L += " " + A : L += " " + s(A);
3546
3552
  return L;
3547
3553
  }, t.deprecate = function(l, h) {
3548
- if (typeof S < "u" && S.noDeprecation === !0)
3554
+ if (typeof w < "u" && w.noDeprecation === !0)
3549
3555
  return l;
3550
- if (typeof S > "u")
3556
+ if (typeof w > "u")
3551
3557
  return function() {
3552
3558
  return t.deprecate(l, h).apply(this, arguments);
3553
3559
  };
3554
3560
  var g = !1;
3555
- function v() {
3561
+ function S() {
3556
3562
  if (!g) {
3557
- if (S.throwDeprecation)
3563
+ if (w.throwDeprecation)
3558
3564
  throw new Error(h);
3559
- S.traceDeprecation ? console.trace(h) : console.error(h), g = !0;
3565
+ w.traceDeprecation ? console.trace(h) : console.error(h), g = !0;
3560
3566
  }
3561
3567
  return l.apply(this, arguments);
3562
3568
  }
3563
- return v;
3569
+ return S;
3564
3570
  };
3565
3571
  var n = {}, i = /^$/;
3566
- if (S.env.NODE_DEBUG) {
3567
- var o = S.env.NODE_DEBUG;
3572
+ if (w.env.NODE_DEBUG) {
3573
+ var o = w.env.NODE_DEBUG;
3568
3574
  o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
3569
3575
  }
3570
3576
  t.debuglog = function(l) {
3571
3577
  if (l = l.toUpperCase(), !n[l])
3572
3578
  if (i.test(l)) {
3573
- var h = S.pid;
3579
+ var h = w.pid;
3574
3580
  n[l] = function() {
3575
3581
  var g = t.format.apply(t, arguments);
3576
3582
  console.error("%s %d: %s", l, h, g);
@@ -3585,7 +3591,7 @@ var ua = nr.exports;
3585
3591
  seen: [],
3586
3592
  stylize: u
3587
3593
  };
3588
- return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), F(h) ? g.showHidden = h : h && t._extend(g, h), I(g.showHidden) && (g.showHidden = !1), I(g.depth) && (g.depth = 2), I(g.colors) && (g.colors = !1), I(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = a), c(g, l, g.depth);
3594
+ return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), _(h) ? g.showHidden = h : h && t._extend(g, h), T(g.showHidden) && (g.showHidden = !1), T(g.depth) && (g.depth = 2), T(g.colors) && (g.colors = !1), T(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = a), c(g, l, g.depth);
3589
3595
  }
3590
3596
  t.inspect = s, s.colors = {
3591
3597
  bold: [1, 22],
@@ -3621,7 +3627,7 @@ var ua = nr.exports;
3621
3627
  }
3622
3628
  function d(l) {
3623
3629
  var h = {};
3624
- return l.forEach(function(g, v) {
3630
+ return l.forEach(function(g, S) {
3625
3631
  h[g] = !0;
3626
3632
  }), h;
3627
3633
  }
@@ -3629,13 +3635,13 @@ var ua = nr.exports;
3629
3635
  if (l.customInspect && h && oe(h.inspect) && // Filter out the util module, it's inspect function is special
3630
3636
  h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
3631
3637
  !(h.constructor && h.constructor.prototype === h)) {
3632
- var v = h.inspect(g, l);
3633
- return _(v) || (v = c(l, v, g)), v;
3638
+ var S = h.inspect(g, l);
3639
+ return k(S) || (S = c(l, S, g)), S;
3634
3640
  }
3635
3641
  var C = f(l, h);
3636
3642
  if (C)
3637
3643
  return C;
3638
- var L = Object.keys(h), w = d(L);
3644
+ var L = Object.keys(h), A = d(L);
3639
3645
  if (l.showHidden && (L = Object.getOwnPropertyNames(h)), we(h) && (L.indexOf("message") >= 0 || L.indexOf("description") >= 0))
3640
3646
  return p(h);
3641
3647
  if (L.length === 0) {
@@ -3650,31 +3656,31 @@ var ua = nr.exports;
3650
3656
  if (we(h))
3651
3657
  return p(h);
3652
3658
  }
3653
- var P = "", G = !1, Ae = ["{", "}"];
3654
- if (E(h) && (G = !0, Ae = ["[", "]"]), oe(h)) {
3659
+ var F = "", G = !1, Ae = ["{", "}"];
3660
+ if (v(h) && (G = !0, Ae = ["[", "]"]), oe(h)) {
3655
3661
  var ot = h.name ? ": " + h.name : "";
3656
- P = " [Function" + ot + "]";
3662
+ F = " [Function" + ot + "]";
3657
3663
  }
3658
- if (X(h) && (P = " " + RegExp.prototype.toString.call(h)), _e(h) && (P = " " + Date.prototype.toUTCString.call(h)), we(h) && (P = " " + p(h)), L.length === 0 && (!G || h.length == 0))
3659
- return Ae[0] + P + Ae[1];
3664
+ if (X(h) && (F = " " + RegExp.prototype.toString.call(h)), _e(h) && (F = " " + Date.prototype.toUTCString.call(h)), we(h) && (F = " " + p(h)), L.length === 0 && (!G || h.length == 0))
3665
+ return Ae[0] + F + Ae[1];
3660
3666
  if (g < 0)
3661
3667
  return X(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
3662
3668
  l.seen.push(h);
3663
3669
  var Ne;
3664
- return G ? Ne = m(l, h, g, w, L) : Ne = L.map(function(st) {
3665
- return b(l, h, g, w, st, G);
3666
- }), l.seen.pop(), T(Ne, P, Ae);
3670
+ return G ? Ne = m(l, h, g, A, L) : Ne = L.map(function(st) {
3671
+ return b(l, h, g, A, st, G);
3672
+ }), l.seen.pop(), I(Ne, F, Ae);
3667
3673
  }
3668
3674
  function f(l, h) {
3669
- if (I(h))
3675
+ if (T(h))
3670
3676
  return l.stylize("undefined", "undefined");
3671
- if (_(h)) {
3677
+ if (k(h)) {
3672
3678
  var g = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
3673
3679
  return l.stylize(g, "string");
3674
3680
  }
3675
3681
  if (J(h))
3676
3682
  return l.stylize("" + h, "number");
3677
- if (F(h))
3683
+ if (_(h))
3678
3684
  return l.stylize("" + h, "boolean");
3679
3685
  if (V(h))
3680
3686
  return l.stylize("null", "null");
@@ -3682,30 +3688,30 @@ var ua = nr.exports;
3682
3688
  function p(l) {
3683
3689
  return "[" + Error.prototype.toString.call(l) + "]";
3684
3690
  }
3685
- function m(l, h, g, v, C) {
3686
- for (var L = [], w = 0, O = h.length; w < O; ++w)
3687
- Pe(h, String(w)) ? L.push(b(
3691
+ function m(l, h, g, S, C) {
3692
+ for (var L = [], A = 0, O = h.length; A < O; ++A)
3693
+ Pe(h, String(A)) ? L.push(b(
3688
3694
  l,
3689
3695
  h,
3690
3696
  g,
3691
- v,
3692
- String(w),
3697
+ S,
3698
+ String(A),
3693
3699
  !0
3694
3700
  )) : L.push("");
3695
- return C.forEach(function(P) {
3696
- P.match(/^\d+$/) || L.push(b(
3701
+ return C.forEach(function(F) {
3702
+ F.match(/^\d+$/) || L.push(b(
3697
3703
  l,
3698
3704
  h,
3699
3705
  g,
3700
- v,
3701
- P,
3706
+ S,
3707
+ F,
3702
3708
  !0
3703
3709
  ));
3704
3710
  }), L;
3705
3711
  }
3706
- function b(l, h, g, v, C, L) {
3707
- var w, O, P;
3708
- if (P = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, P.get ? P.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : P.set && (O = l.stylize("[Setter]", "special")), Pe(v, C) || (w = "[" + C + "]"), O || (l.seen.indexOf(P.value) < 0 ? (V(g) ? O = c(l, P.value, null) : O = c(l, P.value, g - 1), O.indexOf(`
3712
+ function b(l, h, g, S, C, L) {
3713
+ var A, O, F;
3714
+ if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), Pe(S, C) || (A = "[" + C + "]"), O || (l.seen.indexOf(F.value) < 0 ? (V(g) ? O = c(l, F.value, null) : O = c(l, F.value, g - 1), O.indexOf(`
3709
3715
  `) > -1 && (L ? O = O.split(`
3710
3716
  `).map(function(G) {
3711
3717
  return " " + G;
@@ -3715,31 +3721,31 @@ var ua = nr.exports;
3715
3721
  `).map(function(G) {
3716
3722
  return " " + G;
3717
3723
  }).join(`
3718
- `))) : O = l.stylize("[Circular]", "special")), I(w)) {
3724
+ `))) : O = l.stylize("[Circular]", "special")), T(A)) {
3719
3725
  if (L && C.match(/^\d+$/))
3720
3726
  return O;
3721
- w = JSON.stringify("" + C), w.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (w = w.slice(1, -1), w = l.stylize(w, "name")) : (w = w.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), w = l.stylize(w, "string"));
3727
+ A = JSON.stringify("" + C), A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (A = A.slice(1, -1), A = l.stylize(A, "name")) : (A = A.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), A = l.stylize(A, "string"));
3722
3728
  }
3723
- return w + ": " + O;
3729
+ return A + ": " + O;
3724
3730
  }
3725
- function T(l, h, g) {
3726
- var v = l.reduce(function(C, L) {
3731
+ function I(l, h, g) {
3732
+ var S = l.reduce(function(C, L) {
3727
3733
  return L.indexOf(`
3728
3734
  `) >= 0, C + L.replace(/\u001b\[\d\d?m/g, "").length + 1;
3729
3735
  }, 0);
3730
- return v > 60 ? g[0] + (h === "" ? "" : h + `
3736
+ return S > 60 ? g[0] + (h === "" ? "" : h + `
3731
3737
  `) + " " + l.join(`,
3732
3738
  `) + " " + g[1] : g[0] + h + " " + l.join(", ") + " " + g[1];
3733
3739
  }
3734
3740
  t.types = Cn;
3735
- function E(l) {
3741
+ function v(l) {
3736
3742
  return Array.isArray(l);
3737
3743
  }
3738
- t.isArray = E;
3739
- function F(l) {
3744
+ t.isArray = v;
3745
+ function _(l) {
3740
3746
  return typeof l == "boolean";
3741
3747
  }
3742
- t.isBoolean = F;
3748
+ t.isBoolean = _;
3743
3749
  function V(l) {
3744
3750
  return l === null;
3745
3751
  }
@@ -3752,18 +3758,18 @@ var ua = nr.exports;
3752
3758
  return typeof l == "number";
3753
3759
  }
3754
3760
  t.isNumber = J;
3755
- function _(l) {
3761
+ function k(l) {
3756
3762
  return typeof l == "string";
3757
3763
  }
3758
- t.isString = _;
3764
+ t.isString = k;
3759
3765
  function R(l) {
3760
3766
  return typeof l == "symbol";
3761
3767
  }
3762
3768
  t.isSymbol = R;
3763
- function I(l) {
3769
+ function T(l) {
3764
3770
  return l === void 0;
3765
3771
  }
3766
- t.isUndefined = I;
3772
+ t.isUndefined = T;
3767
3773
  function X(l) {
3768
3774
  return Z(l) && me(l) === "[object RegExp]";
3769
3775
  }
@@ -3822,8 +3828,8 @@ var ua = nr.exports;
3822
3828
  }, t.inherits = ua, t._extend = function(l, h) {
3823
3829
  if (!h || !Z(h))
3824
3830
  return l;
3825
- for (var g = Object.keys(h), v = g.length; v--; )
3826
- l[g[v]] = h[g[v]];
3831
+ for (var g = Object.keys(h), S = g.length; S--; )
3832
+ l[g[S]] = h[g[S]];
3827
3833
  return l;
3828
3834
  };
3829
3835
  function Pe(l, h) {
@@ -3845,17 +3851,17 @@ var ua = nr.exports;
3845
3851
  }), g;
3846
3852
  }
3847
3853
  function g() {
3848
- for (var v, C, L = new Promise(function(P, G) {
3849
- v = P, C = G;
3850
- }), w = [], O = 0; O < arguments.length; O++)
3851
- w.push(arguments[O]);
3852
- w.push(function(P, G) {
3853
- P ? C(P) : v(G);
3854
+ for (var S, C, L = new Promise(function(F, G) {
3855
+ S = F, C = G;
3856
+ }), A = [], O = 0; O < arguments.length; O++)
3857
+ A.push(arguments[O]);
3858
+ A.push(function(F, G) {
3859
+ F ? C(F) : S(G);
3854
3860
  });
3855
3861
  try {
3856
- h.apply(this, w);
3857
- } catch (P) {
3858
- C(P);
3862
+ h.apply(this, A);
3863
+ } catch (F) {
3864
+ C(F);
3859
3865
  }
3860
3866
  return L;
3861
3867
  }
@@ -3880,20 +3886,20 @@ var ua = nr.exports;
3880
3886
  if (typeof l != "function")
3881
3887
  throw new TypeError('The "original" argument must be of type Function');
3882
3888
  function h() {
3883
- for (var g = [], v = 0; v < arguments.length; v++)
3884
- g.push(arguments[v]);
3889
+ for (var g = [], S = 0; S < arguments.length; S++)
3890
+ g.push(arguments[S]);
3885
3891
  var C = g.pop();
3886
3892
  if (typeof C != "function")
3887
3893
  throw new TypeError("The last argument must be of type Function");
3888
- var L = this, w = function() {
3894
+ var L = this, A = function() {
3889
3895
  return C.apply(L, arguments);
3890
3896
  };
3891
3897
  l.apply(this, g).then(
3892
3898
  function(O) {
3893
- S.nextTick(w.bind(null, null, O));
3899
+ w.nextTick(A.bind(null, null, O));
3894
3900
  },
3895
3901
  function(O) {
3896
- S.nextTick(Fe.bind(null, O, w));
3902
+ w.nextTick(Fe.bind(null, O, A));
3897
3903
  }
3898
3904
  );
3899
3905
  }
@@ -3905,7 +3911,7 @@ var ua = nr.exports;
3905
3911
  t.callbackify = it;
3906
3912
  })(Ct);
3907
3913
  const { inherits: ca, format: jt } = Ct;
3908
- function Ie(t, e, r = Error) {
3914
+ function Ee(t, e, r = Error) {
3909
3915
  if (!t)
3910
3916
  throw new Error("Avvio error code must not be empty");
3911
3917
  if (!e)
@@ -3920,28 +3926,28 @@ function Ie(t, e, r = Error) {
3920
3926
  }, ca(n, r), n;
3921
3927
  }
3922
3928
  var qn = {
3923
- createError: Ie,
3924
- AVV_ERR_EXPOSE_ALREADY_DEFINED: Ie(
3929
+ createError: Ee,
3930
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: Ee(
3925
3931
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
3926
3932
  "'%s' () is already defined, specify an expose option"
3927
3933
  ),
3928
- AVV_ERR_CALLBACK_NOT_FN: Ie(
3934
+ AVV_ERR_CALLBACK_NOT_FN: Ee(
3929
3935
  "AVV_ERR_CALLBACK_NOT_FN",
3930
3936
  "Callback for '%s' hook is not a function. Received: '%s'"
3931
3937
  ),
3932
- AVV_ERR_PLUGIN_NOT_VALID: Ie(
3938
+ AVV_ERR_PLUGIN_NOT_VALID: Ee(
3933
3939
  "AVV_ERR_PLUGIN_NOT_VALID",
3934
3940
  "Plugin must be a function or a promise. Received: '%s'"
3935
3941
  ),
3936
- AVV_ERR_ROOT_PLG_BOOTED: Ie(
3942
+ AVV_ERR_ROOT_PLG_BOOTED: Ee(
3937
3943
  "AVV_ERR_PLUGIN_NOT_VALID",
3938
3944
  "Root plugin has already booted"
3939
3945
  ),
3940
- AVV_ERR_PARENT_PLG_LOADED: Ie(
3946
+ AVV_ERR_PARENT_PLG_LOADED: Ee(
3941
3947
  "AVV_ERR_PARENT_PLG_LOADED",
3942
3948
  "Impossible to load '%s' plugin because the parent '%s' was already loaded"
3943
3949
  ),
3944
- AVV_ERR_READY_TIMEOUT: Ie(
3950
+ AVV_ERR_READY_TIMEOUT: Ee(
3945
3951
  "AVV_ERR_READY_TIMEOUT",
3946
3952
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
3947
3953
  )
@@ -4121,32 +4127,32 @@ function ya(t) {
4121
4127
  r.selectColor = e;
4122
4128
  function r(c) {
4123
4129
  let f, p = null, m, b;
4124
- function T(...E) {
4125
- if (!T.enabled)
4130
+ function I(...v) {
4131
+ if (!I.enabled)
4126
4132
  return;
4127
- const F = T, V = Number(/* @__PURE__ */ new Date()), q = V - (f || V);
4128
- F.diff = q, F.prev = f, F.curr = V, f = V, E[0] = r.coerce(E[0]), typeof E[0] != "string" && E.unshift("%O");
4133
+ const _ = I, V = Number(/* @__PURE__ */ new Date()), q = V - (f || V);
4134
+ _.diff = q, _.prev = f, _.curr = V, f = V, v[0] = r.coerce(v[0]), typeof v[0] != "string" && v.unshift("%O");
4129
4135
  let J = 0;
4130
- E[0] = E[0].replace(/%([a-zA-Z%])/g, (R, I) => {
4136
+ v[0] = v[0].replace(/%([a-zA-Z%])/g, (R, T) => {
4131
4137
  if (R === "%%")
4132
4138
  return "%";
4133
4139
  J++;
4134
- const X = r.formatters[I];
4140
+ const X = r.formatters[T];
4135
4141
  if (typeof X == "function") {
4136
- const Z = E[J];
4137
- R = X.call(F, Z), E.splice(J, 1), J--;
4142
+ const Z = v[J];
4143
+ R = X.call(_, Z), v.splice(J, 1), J--;
4138
4144
  }
4139
4145
  return R;
4140
- }), r.formatArgs.call(F, E), (F.log || r.log).apply(F, E);
4146
+ }), r.formatArgs.call(_, v), (_.log || r.log).apply(_, v);
4141
4147
  }
4142
- return T.namespace = c, T.useColors = r.useColors(), T.color = r.selectColor(c), T.extend = n, T.destroy = r.destroy, Object.defineProperty(T, "enabled", {
4148
+ return I.namespace = c, I.useColors = r.useColors(), I.color = r.selectColor(c), I.extend = n, I.destroy = r.destroy, Object.defineProperty(I, "enabled", {
4143
4149
  enumerable: !0,
4144
4150
  configurable: !1,
4145
4151
  get: () => p !== null ? p : (m !== r.namespaces && (m = r.namespaces, b = r.enabled(c)), b),
4146
- set: (E) => {
4147
- p = E;
4152
+ set: (v) => {
4153
+ p = v;
4148
4154
  }
4149
- }), typeof r.init == "function" && r.init(T), T;
4155
+ }), typeof r.init == "function" && r.init(I), I;
4150
4156
  }
4151
4157
  function n(c, f) {
4152
4158
  const p = r(this.namespace + (typeof f > "u" ? ":" : f) + c);
@@ -4305,7 +4311,7 @@ var ga = ya;
4305
4311
  u = e.storage.getItem("debug");
4306
4312
  } catch {
4307
4313
  }
4308
- return !u && typeof S < "u" && "env" in S && (u = S.env.DEBUG), u;
4314
+ return !u && typeof w < "u" && "env" in w && (u = w.env.DEBUG), u;
4309
4315
  }
4310
4316
  function s() {
4311
4317
  try {
@@ -4336,7 +4342,7 @@ function Aa() {
4336
4342
  }), t;
4337
4343
  }
4338
4344
  function ze(t, e, r, n, i) {
4339
- 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 = wa(e, r), this.isAfter = n, this.q = ma(t, Ia, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4345
+ 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 = wa(e, r), this.isAfter = n, this.q = ma(t, Ea, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4340
4346
  }
4341
4347
  va(ze, ba);
4342
4348
  ze.prototype.exec = function(t, e) {
@@ -4344,7 +4350,7 @@ ze.prototype.exec = function(t, e) {
4344
4350
  let n = !1;
4345
4351
  const i = this.name;
4346
4352
  if (this.parent._error && !this.isAfter) {
4347
- M("skipping loading of plugin as parent errored and it is not an after", i), S.nextTick(e);
4353
+ M("skipping loading of plugin as parent errored and it is not an after", i), w.nextTick(e);
4348
4354
  return;
4349
4355
  }
4350
4356
  if (this.isAfter)
@@ -4371,8 +4377,8 @@ ze.prototype.exec = function(t, e) {
4371
4377
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4372
4378
  const a = r(this.server, this.opts, s);
4373
4379
  a && typeof a.then == "function" && (M("exec: resolving promise", i), a.then(
4374
- () => S.nextTick(s),
4375
- (u) => S.nextTick(s, u)
4380
+ () => w.nextTick(s),
4381
+ (u) => w.nextTick(s, u)
4376
4382
  ));
4377
4383
  };
4378
4384
  ze.prototype.loadedSoFar = function() {
@@ -4380,7 +4386,7 @@ ze.prototype.loadedSoFar = function() {
4380
4386
  return Promise.resolve();
4381
4387
  const t = () => {
4382
4388
  this.server.after((r, n) => {
4383
- this._error = r, this.q.pause(), r ? (M("rejecting promise", this.name, r), this._promise.reject(r)) : (M("resolving promise", this.name), this._promise.resolve()), this._promise = null, S.nextTick(n, r);
4389
+ this._error = r, this.q.pause(), r ? (M("rejecting promise", this.name, r), this._promise.reject(r)) : (M("resolving promise", this.name), this._promise.resolve()), this._promise = null, w.nextTick(n, r);
4384
4390
  }), this.q.resume();
4385
4391
  };
4386
4392
  let e;
@@ -4409,14 +4415,14 @@ ze.prototype.finish = function(t, e) {
4409
4415
  r();
4410
4416
  else
4411
4417
  M("delayed", this.name), this.q.drain = () => {
4412
- M("drain", this.name), this.q.drain = Ea, queueMicrotask(n);
4418
+ M("drain", this.name), this.q.drain = Ia, queueMicrotask(n);
4413
4419
  };
4414
4420
  };
4415
4421
  queueMicrotask(n), this.q.resume();
4416
4422
  };
4417
- function Ia(t, e) {
4423
+ function Ea(t, e) {
4418
4424
  const r = this;
4419
- S.nextTick(br.bind(r), t, e);
4425
+ w.nextTick(br.bind(r), t, e);
4420
4426
  }
4421
4427
  function br(t, e) {
4422
4428
  if (typeof t.func.then == "function") {
@@ -4432,7 +4438,7 @@ function br(t, e) {
4432
4438
  });
4433
4439
  });
4434
4440
  }
4435
- function Ea() {
4441
+ function Ia() {
4436
4442
  }
4437
4443
  mr.exports = ze;
4438
4444
  mr.exports.loadPlugin = br;
@@ -4504,7 +4510,7 @@ function Na(t, e, r) {
4504
4510
  }
4505
4511
  Ca(x, Oa);
4506
4512
  x.prototype.start = function() {
4507
- return this.started = !0, S.nextTick(this._doStart), this;
4513
+ return this.started = !0, w.nextTick(this._doStart), this;
4508
4514
  };
4509
4515
  x.prototype.override = function(t, e, r) {
4510
4516
  return t;
@@ -4520,7 +4526,7 @@ x.prototype.use = function(t, e) {
4520
4526
  };
4521
4527
  x.prototype._loadRegistered = function() {
4522
4528
  const t = this._current[0];
4523
- return !this.started && !this.booted && S.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4529
+ return !this.started && !this.booted && w.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4524
4530
  };
4525
4531
  Object.defineProperty(x.prototype, "then", { get: Gn });
4526
4532
  x.prototype._addPlugin = function(t, e, r) {
@@ -4570,7 +4576,7 @@ x.prototype.close = function(t) {
4570
4576
  };
4571
4577
  });
4572
4578
  return this.ready(() => {
4573
- this._error = null, this._closeQ.push(t), S.nextTick(this._closeQ.resume.bind(this._closeQ));
4579
+ this._error = null, this._closeQ.push(t), w.nextTick(this._closeQ.resume.bind(this._closeQ));
4574
4580
  }), e;
4575
4581
  };
4576
4582
  x.prototype.ready = function(t) {
@@ -4584,7 +4590,7 @@ x.prototype.ready = function(t) {
4584
4590
  this._readyQ.push(i), this.start();
4585
4591
  const n = this._current[0].server;
4586
4592
  function i(o, s, a) {
4587
- o ? r(o) : e(n), S.nextTick(a);
4593
+ o ? r(o) : e(n), w.nextTick(a);
4588
4594
  }
4589
4595
  });
4590
4596
  };
@@ -4611,9 +4617,9 @@ function Kn(t, e) {
4611
4617
  const r = this._server, n = this._error;
4612
4618
  let i;
4613
4619
  if (this._error = null, t.length === 0)
4614
- this._error = n, i = t(), i && !i[wt] && typeof i.then == "function" ? i.then(() => S.nextTick(e), (o) => S.nextTick(e, o)) : S.nextTick(e);
4620
+ this._error = n, i = t(), i && !i[wt] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
4615
4621
  else if (t.length === 1)
4616
- i = t(n), i && !i[wt] && typeof i.then == "function" ? i.then(() => S.nextTick(e), (o) => S.nextTick(e, o)) : S.nextTick(e);
4622
+ i = t(n), i && !i[wt] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
4617
4623
  else if (this._timeout === 0) {
4618
4624
  const o = (s) => {
4619
4625
  this._error = s, e(this._error);
@@ -4640,9 +4646,9 @@ function Va(t, e) {
4640
4646
  if (t.length === 0 || t.length === 1) {
4641
4647
  let i;
4642
4648
  n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (Ge("resolving close/onClose promise"), i.then(
4643
- () => S.nextTick(e),
4644
- (o) => S.nextTick(e, o)
4645
- )) : S.nextTick(e);
4649
+ () => w.nextTick(e),
4650
+ (o) => w.nextTick(e, o)
4651
+ )) : w.nextTick(e);
4646
4652
  } else
4647
4653
  t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
4648
4654
  }
@@ -4651,10 +4657,10 @@ function $a(t, e) {
4651
4657
  function r(n, i) {
4652
4658
  let o;
4653
4659
  t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
4654
- S.nextTick(i);
4655
- }, i) : S.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
4656
- S.nextTick(i);
4657
- }, i) : S.nextTick(i)) : t(this, i);
4660
+ w.nextTick(i);
4661
+ }, i) : w.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
4662
+ w.nextTick(i);
4663
+ }, i) : w.nextTick(i)) : t(this, i);
4658
4664
  }
4659
4665
  }
4660
4666
  function Qt(t, e) {
@@ -4662,10 +4668,10 @@ function Qt(t, e) {
4662
4668
  function r(n, i) {
4663
4669
  let o;
4664
4670
  t ? t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
4665
- S.nextTick(i, n);
4666
- }, i) : S.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
4667
- S.nextTick(i);
4668
- }, i) : S.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : S.nextTick(i);
4671
+ w.nextTick(i, n);
4672
+ }, i) : w.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
4673
+ w.nextTick(i);
4674
+ }, i) : w.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : w.nextTick(i);
4669
4675
  }
4670
4676
  }
4671
4677
  ur.exports = x;