@streamlayer/sdk-web 0.33.0 → 0.33.1

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,139 +1,139 @@
1
- import { pino as Jn } from "pino";
2
- import { QuestionType as D, QuestionStatus as $e, SilenceSetting as Yn } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
1
+ import { pino as Wn } from "pino";
2
+ import { QuestionType as D, QuestionStatus as Ee, SilenceSetting as Jn } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
3
  import { PickHistoryStatus as at } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
4
  import { SdkOverlayType as N } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
5
- import { InvitationCategory as vr, InvitationFrom as Sr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
- import { computed as Xn, map as Zn, atom as At, batched as wr, onMount as nn } from "nanostores";
5
+ import { InvitationCategory as Sr, InvitationFrom as wr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
+ import { computed as Yn, map as Xn, 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 te, createContextKey as Ar, createPromiseClient as Er, createContextValues as ei } from "@connectrpc/connect";
9
- import { createGrpcWebTransport as Ir } from "@connectrpc/connect-web";
10
- import { nanoquery as Tr } from "@nanostores/query";
11
- import { Events as ti } from "@streamlayer/sl-eslib/sports/events/events_connect";
8
+ import { ConnectError as et, Code as ee, createContextKey as Er, createPromiseClient as Ir, createContextValues as Zn } from "@connectrpc/connect";
9
+ import { createGrpcWebTransport as Tr } from "@connectrpc/connect-web";
10
+ import { nanoquery as Or } from "@nanostores/query";
11
+ import { Events as ei } from "@streamlayer/sl-eslib/sports/events/events_connect";
12
12
  import { Client as rt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
13
- import { Users as sr } from "@streamlayer/sl-eslib/users/users_connect";
13
+ import { Users as ar } from "@streamlayer/sl-eslib/users/users_connect";
14
14
  import { Feed as be } 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 nn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
16
  import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
17
- import { LinksClient as ri } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
- import { Kind as J, TopicType as H, Category as Q, PollOpenedFrom as Ne, ScreenOrientation as Or } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
- import { AnalyticsService as sn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
- import { InteractionActionType as Cr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
- import { NotificationKind as ae, NotificationType as _r } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
- function ni(t) {
17
+ import { LinksClient as ti } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
+ import { Kind as W, TopicType as K, Category as Q, PollOpenedFrom as De, ScreenOrientation as Cr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
+ import { AnalyticsService as on } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
+ import { InteractionActionType as Lr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
+ import { NotificationKind as ue, NotificationType as _r } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
+ function ri(t) {
23
23
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
24
24
  }
25
- var an = { exports: {} }, $ = an.exports = {}, re, ne;
26
- function Kt() {
25
+ var sn = { exports: {} }, V = sn.exports = {}, te, re;
26
+ function zt() {
27
27
  throw new Error("setTimeout has not been defined");
28
28
  }
29
- function zt() {
29
+ function Kt() {
30
30
  throw new Error("clearTimeout has not been defined");
31
31
  }
32
32
  (function() {
33
33
  try {
34
- typeof setTimeout == "function" ? re = setTimeout : re = Kt;
34
+ typeof setTimeout == "function" ? te = setTimeout : te = zt;
35
35
  } catch {
36
- re = Kt;
36
+ te = zt;
37
37
  }
38
38
  try {
39
- typeof clearTimeout == "function" ? ne = clearTimeout : ne = zt;
39
+ typeof clearTimeout == "function" ? re = clearTimeout : re = Kt;
40
40
  } catch {
41
- ne = zt;
41
+ re = Kt;
42
42
  }
43
43
  })();
44
- function un(t) {
45
- if (re === setTimeout)
44
+ function an(t) {
45
+ if (te === setTimeout)
46
46
  return setTimeout(t, 0);
47
- if ((re === Kt || !re) && setTimeout)
48
- return re = setTimeout, setTimeout(t, 0);
47
+ if ((te === zt || !te) && setTimeout)
48
+ return te = setTimeout, setTimeout(t, 0);
49
49
  try {
50
- return re(t, 0);
50
+ return te(t, 0);
51
51
  } catch {
52
52
  try {
53
- return re.call(null, t, 0);
53
+ return te.call(null, t, 0);
54
54
  } catch {
55
- return re.call(this, t, 0);
55
+ return te.call(this, t, 0);
56
56
  }
57
57
  }
58
58
  }
59
- function ii(t) {
60
- if (ne === clearTimeout)
59
+ function ni(t) {
60
+ if (re === clearTimeout)
61
61
  return clearTimeout(t);
62
- if ((ne === zt || !ne) && clearTimeout)
63
- return ne = clearTimeout, clearTimeout(t);
62
+ if ((re === Kt || !re) && clearTimeout)
63
+ return re = clearTimeout, clearTimeout(t);
64
64
  try {
65
- return ne(t);
65
+ return re(t);
66
66
  } catch {
67
67
  try {
68
- return ne.call(null, t);
68
+ return re.call(null, t);
69
69
  } catch {
70
- return ne.call(this, t);
70
+ return re.call(this, t);
71
71
  }
72
72
  }
73
73
  }
74
- var fe = [], xe = !1, Ee, lt = -1;
75
- function oi() {
76
- !xe || !Ee || (xe = !1, Ee.length ? fe = Ee.concat(fe) : lt = -1, fe.length && cn());
74
+ var pe = [], xe = !1, Ie, lt = -1;
75
+ function ii() {
76
+ !xe || !Ie || (xe = !1, Ie.length ? pe = Ie.concat(pe) : lt = -1, pe.length && un());
77
77
  }
78
- function cn() {
78
+ function un() {
79
79
  if (!xe) {
80
- var t = un(oi);
80
+ var t = an(ii);
81
81
  xe = !0;
82
- for (var e = fe.length; e; ) {
83
- for (Ee = fe, fe = []; ++lt < e; )
84
- Ee && Ee[lt].run();
85
- lt = -1, e = fe.length;
82
+ for (var e = pe.length; e; ) {
83
+ for (Ie = pe, pe = []; ++lt < e; )
84
+ Ie && Ie[lt].run();
85
+ lt = -1, e = pe.length;
86
86
  }
87
- Ee = null, xe = !1, ii(t);
87
+ Ie = null, xe = !1, ni(t);
88
88
  }
89
89
  }
90
- $.nextTick = function(t) {
90
+ V.nextTick = function(t) {
91
91
  var e = new Array(arguments.length - 1);
92
92
  if (arguments.length > 1)
93
93
  for (var r = 1; r < arguments.length; r++)
94
94
  e[r - 1] = arguments[r];
95
- fe.push(new ln(t, e)), fe.length === 1 && !xe && un(cn);
95
+ pe.push(new cn(t, e)), pe.length === 1 && !xe && an(un);
96
96
  };
97
- function ln(t, e) {
97
+ function cn(t, e) {
98
98
  this.fun = t, this.array = e;
99
99
  }
100
- ln.prototype.run = function() {
100
+ cn.prototype.run = function() {
101
101
  this.fun.apply(null, this.array);
102
102
  };
103
- $.title = "browser";
104
- $.browser = !0;
105
- $.env = {};
106
- $.argv = [];
107
- $.version = "";
108
- $.versions = {};
103
+ V.title = "browser";
104
+ V.browser = !0;
105
+ V.env = {};
106
+ V.argv = [];
107
+ V.version = "";
108
+ V.versions = {};
109
109
  function ye() {
110
110
  }
111
- $.on = ye;
112
- $.addListener = ye;
113
- $.once = ye;
114
- $.off = ye;
115
- $.removeListener = ye;
116
- $.removeAllListeners = ye;
117
- $.emit = ye;
118
- $.prependListener = ye;
119
- $.prependOnceListener = ye;
120
- $.listeners = function(t) {
111
+ V.on = ye;
112
+ V.addListener = ye;
113
+ V.once = ye;
114
+ V.off = ye;
115
+ V.removeListener = ye;
116
+ V.removeAllListeners = ye;
117
+ V.emit = ye;
118
+ V.prependListener = ye;
119
+ V.prependOnceListener = ye;
120
+ V.listeners = function(t) {
121
121
  return [];
122
122
  };
123
- $.binding = function(t) {
123
+ V.binding = function(t) {
124
124
  throw new Error("process.binding is not supported");
125
125
  };
126
- $.cwd = function() {
126
+ V.cwd = function() {
127
127
  return "/";
128
128
  };
129
- $.chdir = function(t) {
129
+ V.chdir = function(t) {
130
130
  throw new Error("process.chdir is not supported");
131
131
  };
132
- $.umask = function() {
132
+ V.umask = function() {
133
133
  return 0;
134
134
  };
135
- var si = an.exports;
136
- const S = /* @__PURE__ */ ni(si), ai = Jn({
135
+ var oi = sn.exports;
136
+ const S = /* @__PURE__ */ ri(oi), si = Wn({
137
137
  level: "trace",
138
138
  enabled: !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -141,23 +141,23 @@ const S = /* @__PURE__ */ ni(si), ai = Jn({
141
141
  console.log(t);
142
142
  }
143
143
  }
144
- }), ve = (t, e) => ai.child({ name: t }, e);
145
- class ui extends Event {
144
+ }), ve = (t, e) => si.child({ name: t }, e);
145
+ class ai extends Event {
146
146
  slEventBus;
147
147
  constructor(e, r) {
148
148
  super(e), this.slEventBus = r;
149
149
  }
150
150
  }
151
- const ci = ve("event-bus");
152
- class li {
151
+ const ui = ve("event-bus");
152
+ class ci {
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 ui(this.name, { ...r, type: e });
160
- ci.debug(n, "Emitting event"), window.dispatchEvent(n);
159
+ const n = new ai(this.name, { ...r, type: e });
160
+ ui.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 li {
173
173
  }), this.listeners.clear();
174
174
  };
175
175
  }
176
- class di {
176
+ class li {
177
177
  }
178
178
  window.slStore = /* @__PURE__ */ Object.create(null);
179
179
  class Et {
@@ -192,23 +192,23 @@ class Et {
192
192
  return this.store;
193
193
  }
194
194
  }
195
- const fi = (t) => {
195
+ const di = (t) => {
196
196
  const e = Object.keys(t);
197
- return Xn(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
197
+ return Yn(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
198
198
  };
199
- class Ie extends Et {
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);
203
203
  subscribe = (...e) => this.getStore().subscribe(...e);
204
204
  unsubscribe = () => this.getStore().off();
205
205
  }
206
- const pe = (t) => Zn(t);
207
- var ce;
206
+ const ie = (t) => Xn(t);
207
+ var le;
208
208
  (function(t) {
209
209
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
210
- })(ce || (ce = {}));
211
- const pi = {
210
+ })(le || (le = {}));
211
+ const fi = {
212
212
  [N.BETTING]: "betting",
213
213
  [N.GAMES]: "games",
214
214
  [N.PUBLIC_CHAT]: "publicChat",
@@ -218,7 +218,7 @@ var Je;
218
218
  (function(t) {
219
219
  t.Ready = "ready", t.Suspended = "suspended";
220
220
  })(Je || (Je = {}));
221
- class dn {
221
+ class ln {
222
222
  status;
223
223
  source;
224
224
  config;
@@ -226,7 +226,7 @@ class dn {
226
226
  listeners = /* @__PURE__ */ new Set();
227
227
  settingsKey;
228
228
  constructor({ settings: e, ...r }, n) {
229
- this.settingsKey = pi[r.type], this.status = At(Je.Suspended), this.config = new Ie(pe(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ie(pe(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ie(pe({}), `feature:settings:${this.settingsKey}`), this.source = n;
229
+ this.settingsKey = fi[r.type], this.status = At(Je.Suspended), this.config = new Te(ie(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Te(ie(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Te(ie({}), `feature:settings:${this.settingsKey}`), this.source = n;
230
230
  }
231
231
  get featureConfig() {
232
232
  return this.config.getStore();
@@ -257,7 +257,7 @@ class dn {
257
257
  }
258
258
  };
259
259
  update = (e, r) => {
260
- this.source === ce.STREAM && r === ce.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
260
+ this.source === le.STREAM && r === le.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
261
261
  };
262
262
  fireEvent(e) {
263
263
  for (const r of this.listeners.values())
@@ -283,8 +283,8 @@ class z extends Et {
283
283
  return this.getStore().get();
284
284
  }
285
285
  }
286
- const q = (t) => At(t);
287
- class X extends Et {
286
+ const B = (t) => At(t);
287
+ class oe extends Et {
288
288
  atomStore;
289
289
  constructor(e, r, n) {
290
290
  super(e, `api:${r}`), this.atomStore = At(), n && e.subscribe((i) => {
@@ -315,8 +315,8 @@ class X extends Et {
315
315
  key = () => this.getStore().key;
316
316
  off = () => this.getStore().off();
317
317
  }
318
- const he = new li();
319
- async function* hi(t, e) {
318
+ const he = new ci();
319
+ async function* pi(t, e) {
320
320
  for await (const r of e) {
321
321
  t.response.message = r, t.received_at = Date.now();
322
322
  const n = {
@@ -326,7 +326,7 @@ async function* hi(t, e) {
326
326
  window.postMessage(n), yield r;
327
327
  }
328
328
  }
329
- const yi = () => (t) => async (e) => {
329
+ const hi = () => (t) => async (e) => {
330
330
  const r = {
331
331
  name: e.url,
332
332
  stream: e.stream,
@@ -350,7 +350,7 @@ const yi = () => (t) => async (e) => {
350
350
  };
351
351
  return window.postMessage(i), {
352
352
  ...n,
353
- message: hi(r, n.message)
353
+ message: pi(r, n.message)
354
354
  };
355
355
  } else {
356
356
  r.request.message = e.message, r.response.message = n.message, r.latency = r.received_at - r.sent_at;
@@ -378,7 +378,7 @@ var Y;
378
378
  (function(t) {
379
379
  t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
380
380
  })(Y || (Y = {}));
381
- class gi {
381
+ class yi {
382
382
  params;
383
383
  streamCancel;
384
384
  method;
@@ -396,13 +396,13 @@ class gi {
396
396
  ts: /* @__PURE__ */ new Date(),
397
397
  log: []
398
398
  };
399
- this.state = new Ie(pe(o), `subscription:${i.name}:state`), this.options = {
399
+ this.state = new Te(ie(o), `subscription:${i.name}:state`), this.options = {
400
400
  ...i,
401
401
  reconnectDelay: i.reconnectDelay ?? 1e3,
402
402
  reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
403
403
  reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
404
404
  withStore: i.withStore ?? !1
405
- }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new z(q(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
405
+ }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new z(B(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
406
406
  this.state.getValue("status") === Y.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
407
407
  })), this.updateState(Y.Ready);
408
408
  }
@@ -431,7 +431,7 @@ class gi {
431
431
  for await (const o of i)
432
432
  this.attempt = 0, this.onData(o);
433
433
  } catch (n) {
434
- n instanceof et && n.code != te.Canceled && this.onStreamError(n);
434
+ n instanceof et && n.code != ee.Canceled && this.onStreamError(n);
435
435
  }
436
436
  })(), this.updateState(Y.Connected);
437
437
  };
@@ -471,7 +471,7 @@ class gi {
471
471
  */
472
472
  onStreamError = (e) => {
473
473
  if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
474
- if (e instanceof et && e.code !== te.Canceled) {
474
+ if (e instanceof et && e.code !== ee.Canceled) {
475
475
  this.updateState(Y.Failed), this.state.setValue("error", e), this.reconnect();
476
476
  return;
477
477
  }
@@ -479,41 +479,41 @@ class gi {
479
479
  }
480
480
  };
481
481
  }
482
- const mi = /* @__PURE__ */ new Set([
483
- te.Unknown,
484
- te.Internal,
485
- te.DeadlineExceeded,
486
- te.ResourceExhausted,
487
- te.FailedPrecondition,
488
- te.Unavailable,
489
- te.DataLoss
490
- ]), Lr = ve("grpc:retry"), bi = (t) => async (e) => {
482
+ const gi = /* @__PURE__ */ new Set([
483
+ ee.Unknown,
484
+ ee.Internal,
485
+ ee.DeadlineExceeded,
486
+ ee.ResourceExhausted,
487
+ ee.FailedPrecondition,
488
+ ee.Unavailable,
489
+ ee.DataLoss
490
+ ]), kr = ve("grpc:retry"), mi = (t) => async (e) => {
491
491
  const r = e.contextValues.get(Ht.retryAttempts), n = 300, i = e.contextValues.get(Ht.retryDelay);
492
492
  if (e.stream || r === 0)
493
493
  return t(e);
494
- Lr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
494
+ kr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
495
495
  for (let o = 0; ; o++)
496
496
  try {
497
497
  return await t(e);
498
498
  } catch (s) {
499
- Lr.trace({ attempt: o, error: s }, "retry attempt");
499
+ kr.trace({ attempt: o, error: s }, "retry attempt");
500
500
  const a = et.from(s);
501
- if (o >= r || !(a instanceof et) || !mi.has(a.code))
501
+ if (o >= r || !(a instanceof et) || !gi.has(a.code))
502
502
  throw s;
503
503
  const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
504
504
  await new Promise((c) => setTimeout(c, d));
505
505
  }
506
506
  }, Ht = {
507
- retryAttempts: Ar(5, { description: "Number of attempts to retry" }),
508
- retryDelay: Ar(3e4, { description: "Max delay between retries in milliseconds" })
509
- }, vi = () => {
507
+ retryAttempts: Er(5, { description: "Number of attempts to retry" }),
508
+ retryDelay: Er(3e4, { description: "Max delay between retries in milliseconds" })
509
+ }, bi = () => {
510
510
  const t = localStorage.getItem("sl-device-id");
511
511
  if (t)
512
512
  return t;
513
513
  const e = Gt();
514
514
  return localStorage.setItem("sl-device-id", e), e;
515
- }, Si = () => navigator.userAgentData?.platform || navigator.platform;
516
- class kr {
515
+ }, vi = () => navigator.userAgentData?.platform || navigator.platform;
516
+ class Pr {
517
517
  toJsonOptions = {
518
518
  emitDefaultValues: !1,
519
519
  enumAsInteger: !0,
@@ -531,20 +531,20 @@ class kr {
531
531
  streamClients;
532
532
  subscriptions;
533
533
  constructor(e) {
534
- this.host = e, this.$headers = new Ie(pe({
535
- "sl-device-id": vi(),
536
- "sl-device-os": Si()
534
+ this.host = e, this.$headers = new Te(ie({
535
+ "sl-device-id": bi(),
536
+ "sl-device-os": vi()
537
537
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
538
- const [r, n, i] = Tr({
538
+ const [r, n, i] = Or({
539
539
  dedupeTime: 1e3 * 60 * 5,
540
540
  refetchInterval: 1e3 * 60 * 5
541
541
  });
542
- this.nanoquery = { createFetcherStore: r, createMutatorStore: n, utils: i }, this.transport = Ir({
542
+ this.nanoquery = { createFetcherStore: r, createMutatorStore: n, utils: i }, this.transport = Tr({
543
543
  baseUrl: e,
544
544
  defaultTimeoutMs: 1e4,
545
545
  interceptors: this.interceptors,
546
546
  useBinaryFormat: !0
547
- }), this.streamTransport = Ir({
547
+ }), this.streamTransport = Tr({
548
548
  baseUrl: e,
549
549
  interceptors: this.interceptors,
550
550
  useBinaryFormat: !0
@@ -557,7 +557,7 @@ class kr {
557
557
  const i = this.subscriptions.get(r);
558
558
  if (i)
559
559
  return i;
560
- const o = new gi(this.$headers, e, r, n);
560
+ const o = new yi(this.$headers, e, r, n);
561
561
  return this.subscriptions.set(r, o), o;
562
562
  };
563
563
  removeSubscription = (e) => {
@@ -568,7 +568,7 @@ class kr {
568
568
  for (const [i, o] of this.subscriptions)
569
569
  o.disconnect(), this.subscriptions.delete(i);
570
570
  this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
571
- const [e, r, n] = Tr();
571
+ const [e, r, n] = Or();
572
572
  this.nanoquery = { createFetcherStore: e, createMutatorStore: r, utils: n };
573
573
  };
574
574
  registerInterceptor = (e) => {
@@ -581,14 +581,14 @@ class kr {
581
581
  const r = e.typeName;
582
582
  if (this.clients.has(r))
583
583
  return this.clients.get(r);
584
- const n = Er(e, this.transport);
584
+ const n = Ir(e, this.transport);
585
585
  return this.clients.set(r, n), n;
586
586
  };
587
587
  getStreamClient = (e) => {
588
588
  const r = `stream-${e.typeName}`;
589
589
  if (this.clients.has(r))
590
590
  return this.clients.get(r);
591
- const n = Er(e, this.streamTransport);
591
+ const n = Ir(e, this.streamTransport);
592
592
  return this.clients.set(r, n), n;
593
593
  };
594
594
  // create unary client, used for query request
@@ -599,7 +599,7 @@ class kr {
599
599
  ...Array.isArray(r) ? r : [r]
600
600
  ], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
601
601
  return { client: i, createRequestOptions: (d) => {
602
- const c = ei();
602
+ const c = Zn();
603
603
  for (const f in d) {
604
604
  const y = Ht[f];
605
605
  c.set(y, d[f]);
@@ -627,11 +627,11 @@ class kr {
627
627
  n.header.set(o, i[o]);
628
628
  return r(n);
629
629
  };
630
- this.interceptors.push(e), this.interceptors.push(yi()), this.interceptors.push(bi);
630
+ this.interceptors.push(e), this.interceptors.push(hi()), this.interceptors.push(mi);
631
631
  };
632
632
  }
633
- const wi = (t, e) => {
634
- const { client: r, queryKey: n } = e.createPromiseClient(ti, {
633
+ const Si = (t, e) => {
634
+ const { client: r, queryKey: n } = e.createPromiseClient(ei, {
635
635
  method: "retrieveEventId",
636
636
  params: [t]
637
637
  });
@@ -648,7 +648,7 @@ const wi = (t, e) => {
648
648
  }
649
649
  }
650
650
  });
651
- }, Ai = (t, e) => {
651
+ }, wi = (t, e) => {
652
652
  const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getStream", params: [t] });
653
653
  return e.nanoquery.createFetcherStore(n, {
654
654
  fetcher: async (i, o, s) => s ? (await r.getStream({
@@ -656,23 +656,20 @@ const wi = (t, e) => {
656
656
  // we are sure that id is a string
657
657
  })).data?.attributes : void 0
658
658
  });
659
- }, Ei = (t, e) => {
660
- const { queryKey: r, client: n } = e.createPromiseClient(sr, { method: "me", params: [t] });
659
+ }, Ai = (t, e) => {
660
+ const { queryKey: r, client: n } = e.createPromiseClient(ar, { method: "me", params: [t] });
661
661
  return e.nanoquery.createFetcherStore(r, {
662
662
  fetcher: () => n.me({})
663
663
  });
664
- }, Ii = (t) => {
665
- const { client: e, createRequestOptions: r } = t.createPromiseClient(sr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
666
- return async ({ userKey: i, schema: o, init: s, inviterKey: a }) => {
667
- const u = await e.bypassAuth({ userKey: i, schema: o, init: s }, { contextValues: n });
668
- return u.meta && (u.meta.inviterKey = a), u;
669
- };
670
- }, Ti = (t, e) => {
664
+ }, Ei = (t) => {
665
+ const { client: e, createRequestOptions: r } = t.createPromiseClient(ar, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
666
+ return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
667
+ }, Ii = (t, e) => {
671
668
  const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "get", params: [t] });
672
669
  return e.nanoquery.createFetcherStore(n, {
673
670
  fetcher: async () => (await r.get({})).data?.attributes
674
671
  });
675
- }, Oi = (t, e) => {
672
+ }, Ti = (t, e) => {
676
673
  const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getOrganization", params: [t] });
677
674
  return e.nanoquery.createFetcherStore(n, {
678
675
  fetcher: async () => {
@@ -683,7 +680,7 @@ const wi = (t, e) => {
683
680
  } : void 0;
684
681
  }
685
682
  });
686
- }, Ci = (t, e) => {
683
+ }, Oi = (t, e) => {
687
684
  const { client: r, queryKey: n } = e.createPromiseClient(rt, {
688
685
  method: "getOrganizationAdvertising",
689
686
  params: [t]
@@ -691,8 +688,8 @@ const wi = (t, e) => {
691
688
  return e.nanoquery.createFetcherStore(n, {
692
689
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
693
690
  });
694
- }, _i = (t, e, r) => {
695
- t.transport = new kr(e.host), t.analyticsTransport = new kr(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) => {
691
+ }, Ci = (t, e, r) => {
692
+ t.transport = new Pr(e.host), 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) => {
696
693
  t.analyticsTransport.$headers.getStore().set(n);
697
694
  }), t.sdk.onMount(() => () => {
698
695
  t.transport.disconnect(), t.analyticsTransport.disconnect();
@@ -722,50 +719,50 @@ class It {
722
719
  this.storage.removeItem(this.generateKey(e));
723
720
  };
724
721
  }
725
- var ue;
722
+ var ce;
726
723
  (function(t) {
727
724
  t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
728
- })(ue || (ue = {}));
725
+ })(ce || (ce = {}));
729
726
  class je extends It {
730
727
  constructor() {
731
728
  super("user");
732
729
  }
733
730
  // Schema
734
731
  setSchema = (e) => {
735
- this.write(ue.SCHEMA, e);
732
+ this.write(ce.SCHEMA, e);
736
733
  };
737
- getSchema = () => this.read(ue.SCHEMA);
734
+ getSchema = () => this.read(ce.SCHEMA);
738
735
  // Token
739
736
  setToken = (e) => {
740
- this.write(ue.TOKEN, e);
737
+ this.write(ce.TOKEN, e);
741
738
  };
742
- getToken = () => this.read(ue.TOKEN);
739
+ getToken = () => this.read(ce.TOKEN);
743
740
  // External Token
744
741
  setExternalToken = (e) => {
745
- this.write(ue.EXTERNAL_TOKEN, e);
742
+ this.write(ce.EXTERNAL_TOKEN, e);
746
743
  };
747
- getExternalToken = () => this.read(ue.EXTERNAL_TOKEN);
744
+ getExternalToken = () => this.read(ce.EXTERNAL_TOKEN);
748
745
  removeToken = () => {
749
- this.remove(ue.TOKEN);
746
+ this.remove(ce.TOKEN);
750
747
  };
751
748
  }
752
- var le;
749
+ var de;
753
750
  (function(t) {
754
751
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
755
- })(le || (le = {}));
752
+ })(de || (de = {}));
756
753
  const Li = (t) => {
757
- const e = new je(), r = new z(q(e.getExternalToken()), "userKey"), n = new z(q(e.getToken()), "userToken"), i = new X(Ei(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
754
+ const e = new je(), r = new z(B(e.getExternalToken()), "userKey"), n = new z(B(e.getToken()), "userToken"), i = new oe(Ai(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
758
755
  if (!a)
759
756
  return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
760
- }), o = new X(Ti(n.getStore(), t), "userSettings");
757
+ }), o = new oe(Ii(n.getStore(), t), "userSettings");
761
758
  return {
762
759
  userKey: r,
763
760
  userToken: n,
764
761
  user: i,
765
762
  userSettings: o
766
763
  };
767
- }, ki = (t) => {
768
- const e = new z(q(void 0), "providerStreamId"), r = new X(wi(e.getStore(), t), "slStreamId", (i) => i?.data), n = new X(Ai(r.getAtomStore(), t), "streamSettings");
764
+ }, _i = (t) => {
765
+ const e = new z(B(void 0), "providerStreamId"), r = new oe(Si(e.getStore(), t), "slStreamId", (i) => i?.data), n = new oe(wi(r.getAtomStore(), t), "streamSettings");
769
766
  return r.getAtomStore().listen((i) => {
770
767
  (i === "" || i === void 0) && n.getStore().mutate(void 0);
771
768
  }), {
@@ -773,8 +770,8 @@ const Li = (t) => {
773
770
  slStreamId: r,
774
771
  streamSettings: n
775
772
  };
776
- }, Pi = (t) => {
777
- const e = new z(q(void 0), "enabled"), r = new z(q(le.DISABLED), "status"), n = new X(Oi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new X(Ci(n.getAtomStore(), t), "organizationAdvertising"), o = Li(t), s = ki(t);
773
+ }, ki = (t) => {
774
+ const e = new z(B(void 0), "enabled"), r = new z(B(de.DISABLED), "status"), n = new oe(Ti(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new oe(Oi(n.getAtomStore(), t), "organizationAdvertising"), o = Li(t), s = _i(t);
778
775
  return {
779
776
  enabled: e,
780
777
  status: r,
@@ -789,10 +786,10 @@ const Li = (t) => {
789
786
  organizationAdvertising: i
790
787
  };
791
788
  };
792
- class Fi extends Et {
789
+ class Pi extends Et {
793
790
  stores;
794
791
  constructor(e) {
795
- const r = Pi(e), n = fi(r);
792
+ const r = ki(e), n = di(r);
796
793
  super(n, "core"), this.stores = r;
797
794
  }
798
795
  getValue() {
@@ -813,33 +810,25 @@ class Fi extends Et {
813
810
  };
814
811
  unsubscribe = () => this.getStore().off();
815
812
  }
816
- const Ni = (t, e, r) => {
817
- t.store = new Fi(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.storeUnsubscribe = () => {
813
+ const Fi = (t, e, r) => {
814
+ t.store = new Pi(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.storeUnsubscribe = () => {
818
815
  t.store.unsubscribe();
819
816
  }, r();
820
- }, Di = (t, e, r) => {
821
- const { client: n, queryKey: i } = r.createPromiseClient(on, {
822
- method: "summary",
823
- params: [t, e]
824
- });
825
- return r.nanoquery.createFetcherStore(i, {
826
- fetcher: async (o, s, a, u) => (await n.summary({
827
- eventId: a,
828
- userId: u
829
- })).data?.attributes
830
- });
831
- }, Ri = (t) => {
832
- const { client: e } = t.createPromiseClient(on, { method: "list" });
817
+ }, Ni = (t) => {
818
+ const { client: e } = t.createPromiseClient(nn, { method: "list" });
833
819
  return (r) => e.list(r);
834
- }, Vi = (t, e) => {
835
- const { client: r, queryKey: n } = e.createPromiseClient(sr, {
820
+ }, Di = (t) => {
821
+ const { client: e } = t.createPromiseClient(nn, { method: "summary" });
822
+ return (r) => e.summary(r);
823
+ }, Ri = (t, e) => {
824
+ const { client: r, queryKey: n } = e.createPromiseClient(ar, {
836
825
  method: "getFriends",
837
826
  params: [t]
838
827
  });
839
828
  return e.nanoquery.createFetcherStore(n, {
840
829
  fetcher: async (i, o, s) => s ? (await r.getFriends({})).data : []
841
830
  });
842
- }, $i = (t, e) => {
831
+ }, Vi = (t, e) => {
843
832
  const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "get", params: [t] });
844
833
  return e.nanoquery.createFetcherStore(n, {
845
834
  fetcher: async (i, o, s) => (await r.get({
@@ -848,7 +837,7 @@ const Ni = (t, e, r) => {
848
837
  refetchInterval: 0,
849
838
  dedupeTime: 1e3 * 60 * 60
850
839
  });
851
- }, ji = (t, e) => {
840
+ }, $i = (t, e) => {
852
841
  const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "syncQuestion", params: [t] });
853
842
  return e.nanoquery.createFetcherStore(n, {
854
843
  fetcher: async (i, o, s) => s ? (await r.syncQuestion({
@@ -860,7 +849,7 @@ const Ni = (t, e, r) => {
860
849
  // 10 minutes
861
850
  refetchInterval: 0
862
851
  });
863
- }, Mi = (t, e) => {
852
+ }, ji = (t, e) => {
864
853
  const { client: r } = e.createStreamClient(be), n = At({ eventId: t.get() || "", feedId: "" });
865
854
  return t.subscribe((o = "") => {
866
855
  n.set({ eventId: o, feedId: "" });
@@ -876,7 +865,7 @@ const Ni = (t, e, r) => {
876
865
  })).data?.attributes?.question,
877
866
  dedupeTime: 1e3 * 60 * 5
878
867
  });
879
- }, xi = (t, e, r) => {
868
+ }, Mi = (t, e, r) => {
880
869
  const { client: n, queryKey: i } = r.createPromiseClient(be, {
881
870
  method: "list",
882
871
  params: [t, e]
@@ -885,21 +874,21 @@ const Ni = (t, e, r) => {
885
874
  fetcher: async (o, s, a, u) => a ? (await n.list({
886
875
  eventId: a,
887
876
  filter: {
888
- types: u === Te.ALLOWED ? [] : [D.FACTOID, D.PROMOTION, D.TWEET],
889
- statuses: [$e.ACTIVE, $e.RESOLVED]
877
+ types: u === Oe.ALLOWED ? [] : [D.FACTOID, D.PROMOTION, D.TWEET],
878
+ statuses: [Ee.ACTIVE, Ee.RESOLVED]
890
879
  }
891
880
  })).data : [],
892
881
  dedupeTime: 0,
893
882
  refetchInterval: 0
894
883
  });
895
- }, Bi = (t, e, r) => {
896
- const n = wr([e, r], () => {
884
+ }, xi = (t, e, r) => {
885
+ const n = Ar([e, r], () => {
897
886
  const a = e.get();
898
887
  if (!a)
899
888
  return;
900
889
  const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
901
890
  return u ? (u.openedFrom = d, u) : a.question;
902
- }), i = wr(n, (a) => a && a.type === "question" ? a.id : void 0), o = Wt(i, t);
891
+ }), i = Ar(n, (a) => a && a.type === "question" ? a.id : void 0), o = Wt(i, t);
903
892
  return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
904
893
  const u = o.get().data, d = (c, f) => {
905
894
  if (!c || !f)
@@ -917,15 +906,18 @@ const Ni = (t, e, r) => {
917
906
  };
918
907
  o.mutate({
919
908
  ...a,
909
+ options: u?.options,
910
+ subject: u?.subject,
911
+ appearance: u?.appearance,
920
912
  answers: d(u?.answers, a?.answers)
921
913
  });
922
914
  } };
923
915
  };
924
- var Te;
916
+ var Oe;
925
917
  (function(t) {
926
918
  t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
927
- })(Te || (Te = {}));
928
- class qi {
919
+ })(Oe || (Oe = {}));
920
+ class Bi {
929
921
  /** sl event id */
930
922
  slStreamId;
931
923
  /** organization id */
@@ -956,13 +948,13 @@ class qi {
956
948
  log;
957
949
  transport;
958
950
  constructor(e) {
959
- this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new z(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new z(q(Te.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new z(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new X($i(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new X(xi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new X(ji(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Bi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
951
+ this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new z(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new z(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new z(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new oe(Vi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new oe(Mi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new oe($i(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = xi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
960
952
  this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = Ui(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
961
953
  this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
962
954
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
963
- }), this.feedSubscription = Mi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
964
- const n = this.activeQuestionId.getStore();
965
- n && n.mutate(r.data?.attributes);
955
+ }), this.feedSubscription = ji(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
956
+ const n = this.activeQuestionId.store, i = n.get().data?.question?.id, o = r.data?.attributes?.question;
957
+ o && (i && o.status === Ee.RESOLVED && o.id !== i || n && n.mutate(r.data?.attributes));
966
958
  }), this.feedSubscription.addListener("moderation update", (r) => {
967
959
  window.requestAnimationFrame(() => {
968
960
  r.data?.attributes?.question === void 0 && r.data?.attributes?.moderation && this.moderation.invalidate();
@@ -1001,7 +993,7 @@ class qi {
1001
993
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1002
994
  };
1003
995
  }
1004
- class Qi {
996
+ class qi {
1005
997
  notificationsList;
1006
998
  notifications;
1007
999
  store;
@@ -1011,7 +1003,7 @@ class Qi {
1011
1003
  options;
1012
1004
  logger;
1013
1005
  constructor(e) {
1014
- this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new z(q(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = this.notifications.getStore();
1006
+ this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new z(B(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = this.notifications.getStore();
1015
1007
  }
1016
1008
  addToQueue = (e) => {
1017
1009
  if (this.store.has(e.id)) {
@@ -1084,7 +1076,7 @@ var gt;
1084
1076
  (function(t) {
1085
1077
  t.OPENED = "opened";
1086
1078
  })(gt || (gt = {}));
1087
- class Gi extends It {
1079
+ class Qi extends It {
1088
1080
  constructor() {
1089
1081
  super("notification");
1090
1082
  }
@@ -1100,11 +1092,11 @@ var me;
1100
1092
  (function(t) {
1101
1093
  t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
1102
1094
  })(me || (me = {}));
1103
- class Ki {
1095
+ class Gi {
1104
1096
  queue;
1105
1097
  storage;
1106
1098
  constructor(e = {}) {
1107
- this.storage = new Gi(), this.queue = new Qi({ concurrency: 1, animationDelay: 1600, ...e });
1099
+ this.storage = new Qi(), this.queue = new qi({ concurrency: 1, animationDelay: 1600, ...e });
1108
1100
  }
1109
1101
  add = (e) => {
1110
1102
  if (!this.storage.isOpened(e.id)) {
@@ -1141,70 +1133,69 @@ class Ki {
1141
1133
  };
1142
1134
  }
1143
1135
  const zi = (t, e, r) => {
1144
- t.notifications = new Ki(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), r();
1136
+ t.notifications = new Gi(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), r();
1145
1137
  };
1146
1138
  var tt;
1147
1139
  (function(t) {
1148
1140
  t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
1149
1141
  })(tt || (tt = {}));
1150
- const Hi = async (t, e) => {
1142
+ const Ki = async (t, e) => {
1151
1143
  const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
1152
1144
  try {
1153
1145
  return await r.submitAnswer({ data: e }, { contextValues: i });
1154
1146
  } catch (o) {
1155
- throw et.from(o)?.code === te.AlreadyExists ? new Error(tt.ALREADY_VOTED) : new Error(tt.UNKNOWN);
1147
+ throw et.from(o)?.code === ee.AlreadyExists ? new Error(tt.ALREADY_VOTED) : new Error(tt.UNKNOWN);
1156
1148
  }
1157
- }, Wi = (t, e) => {
1149
+ }, Hi = (t, e) => {
1158
1150
  const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1159
1151
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1160
1152
  };
1161
- var Me;
1153
+ var Ue;
1162
1154
  (function(t) {
1163
1155
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
1164
- })(Me || (Me = {}));
1165
- class fn extends It {
1156
+ })(Ue || (Ue = {}));
1157
+ class dn extends It {
1166
1158
  constructor() {
1167
1159
  super("gamification");
1168
1160
  }
1169
1161
  saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
1170
- this.write(Me.ONBOARDING, n, e, r, i);
1162
+ this.write(Ue.ONBOARDING, n, e, r, i);
1171
1163
  };
1172
- getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(Me.ONBOARDING, n, e, r);
1164
+ getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(Ue.ONBOARDING, n, e, r);
1173
1165
  setOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
1174
- const i = this.generateKey([Me.ONBOARDING_IO, n, e, r]);
1166
+ const i = this.generateKey([Ue.ONBOARDING_IO, n, e, r]);
1175
1167
  window.sessionStorage.setItem(i, "1");
1176
1168
  };
1177
1169
  getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
1178
- const i = this.generateKey([Me.ONBOARDING_IO, n, e, r]);
1170
+ const i = this.generateKey([Ue.ONBOARDING_IO, n, e, r]);
1179
1171
  return window.sessionStorage.getItem(i);
1180
1172
  };
1181
1173
  }
1182
- const Pr = {
1174
+ const Wi = {
1183
1175
  pageSize: 10
1184
1176
  }, Ji = (t, e, r, n, i) => {
1185
1177
  let o = 0;
1186
- const s = q({ pageSize: i?.pageSize || Pr.pageSize, page: 0 }), a = pe({
1178
+ const s = B({ pageSize: i?.pageSize || Wi.pageSize, page: 0 }), a = ie({
1187
1179
  data: [],
1188
1180
  key: Date.now(),
1189
1181
  hasMore: !0,
1190
1182
  loading: void 0,
1191
1183
  error: void 0
1192
- }), u = Ri(t), d = async () => {
1184
+ }), u = Ni(t), d = async () => {
1193
1185
  const y = e.get(), m = n.getStore().get().data?.map((b) => b.slId) || [];
1194
1186
  if (y && m?.length) {
1195
1187
  const b = r.get();
1196
1188
  b && m.push(b), a.setKey("loading", !0), a.setKey("data", []);
1197
- const w = {
1189
+ const I = await u({
1198
1190
  eventId: y,
1199
- usersIds: m,
1200
- pagination: { page: 0, pageSize: i?.pageSize || Pr.pageSize }
1201
- }, A = await u(w);
1191
+ usersIds: m
1192
+ });
1202
1193
  a.set({
1203
- data: A.data.map((P) => P.attributes),
1204
- hasMore: !0,
1194
+ data: I.data.map((F) => F.attributes),
1195
+ hasMore: !1,
1205
1196
  key: Date.now(),
1206
1197
  loading: !1
1207
- }), A.meta && (o = Math.round(A.meta.count / A.meta.pageSize)), s.set(w.pagination);
1198
+ }), I.meta && (o = Math.round(I.meta.count / I.meta.pageSize));
1208
1199
  }
1209
1200
  }, c = () => {
1210
1201
  d();
@@ -1212,27 +1203,10 @@ const Pr = {
1212
1203
  const m = s.get(), b = y || m.page + 1;
1213
1204
  b <= o && s.set({ ...m, page: b });
1214
1205
  };
1215
- return nn(a, () => {
1216
- const y = e.listen(d), m = n.listen(d), b = s.listen(async (w) => {
1217
- const A = e.get();
1218
- if (w.page > 0 && A)
1219
- if (w.page < o) {
1220
- a.setKey("loading", !0);
1221
- const V = await u({
1222
- eventId: A,
1223
- pagination: w
1224
- }), j = a.get().data || [];
1225
- a.set({
1226
- data: [...j, ...V.data.map((K) => K.attributes)],
1227
- key: a.get().key,
1228
- loading: !1,
1229
- hasMore: !0
1230
- });
1231
- } else
1232
- a.setKey("hasMore", !1);
1233
- });
1206
+ return sr(a, () => {
1207
+ const y = e.listen(d), m = n.listen(d);
1234
1208
  return () => {
1235
- y(), m(), b();
1209
+ y(), m();
1236
1210
  };
1237
1211
  }), { $store: a, fetchMore: f, invalidate: c };
1238
1212
  };
@@ -1244,7 +1218,7 @@ class Yi extends It {
1244
1218
  super("deep-link-context", window.sessionStorage);
1245
1219
  }
1246
1220
  }
1247
- const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /* @__PURE__ */ new Set([Tt, pn, hn]), Nr = (t) => {
1221
+ const Fr = "sldl", Tt = "sldl_uid", fn = "sldl_eid", pn = "sldl_e_eid", Xi = /* @__PURE__ */ new Set([Tt, fn, pn]), Nr = (t) => {
1248
1222
  const e = {}, r = {};
1249
1223
  for (const [n, i] of t)
1250
1224
  Xi.has(n) ? e[n] = i : r[n] = i;
@@ -1259,7 +1233,7 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
1259
1233
  return { search: Nr(r) };
1260
1234
  }
1261
1235
  return null;
1262
- }, Dr = ve("deep_link"), ie = {
1236
+ }, Dr = ve("deep_link"), ne = {
1263
1237
  debug: (...t) => {
1264
1238
  Dr.debug(...t), console.log(...t);
1265
1239
  },
@@ -1268,20 +1242,20 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
1268
1242
  }
1269
1243
  }, eo = (t, e) => {
1270
1244
  const { hash: r, search: n } = window.location;
1271
- if (ie.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1245
+ if (ne.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1272
1246
  const i = Zi({ hash: r, search: n });
1273
- if (ie.debug(i, "parse deep link result"), i) {
1247
+ if (ne.debug(i, "parse deep link result"), i) {
1274
1248
  const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
1275
1249
  if (Object.keys(a).length !== 0) {
1276
1250
  t.setValue("data", a);
1277
1251
  const d = Object.keys(u).length !== 0;
1278
1252
  if (o) {
1279
1253
  let c = "";
1280
- d && (c = `#${new URLSearchParams(u).toString()}`, ie.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
1254
+ d && (c = `#${new URLSearchParams(u).toString()}`, ne.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
1281
1255
  }
1282
1256
  if (s) {
1283
1257
  let c = "";
1284
- d && (c = `?${new URLSearchParams(u).toString()}`, ie.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
1258
+ d && (c = `?${new URLSearchParams(u).toString()}`, ne.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
1285
1259
  }
1286
1260
  e(a);
1287
1261
  }
@@ -1295,17 +1269,17 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
1295
1269
  try {
1296
1270
  o = JSON.parse(i);
1297
1271
  } catch (a) {
1298
- ie.debug(a);
1272
+ ne.debug(a);
1299
1273
  }
1300
1274
  t.deepLink = {
1301
- $store: new Ie(pe(o), "deep-link-context"),
1275
+ $store: new Te(ie(o), "deep-link-context"),
1302
1276
  getDeepLinkData: () => {
1303
1277
  const { data: a, used: u } = t.deepLink.$store.getValues();
1304
1278
  return { data: a, used: u };
1305
1279
  },
1306
1280
  // we are logged in with inviter id
1307
1281
  deepLinkUsed: (a) => {
1308
- ie.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
1282
+ ne.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
1309
1283
  },
1310
1284
  onDeepLinkHandlers: /* @__PURE__ */ new Set()
1311
1285
  }, t.sdk.getInviter = () => {
@@ -1314,28 +1288,28 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
1314
1288
  }, t.sdk.inviteDisplayed = () => {
1315
1289
  t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
1316
1290
  }, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
1317
- ie.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
1291
+ ne.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
1318
1292
  }, e.onDeepLinkHandled && t.sdk.addDeepLinkHandler(e.onDeepLinkHandled), t.sdk.removeDeepLinkHandler = (a) => {
1319
- ie.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
1293
+ ne.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
1320
1294
  };
1321
1295
  const s = (a) => {
1322
- t.deepLink.$store.setValue("handled", !0), ie.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
1296
+ t.deepLink.$store.setValue("handled", !0), ne.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
1323
1297
  for (const u of t.deepLink.onDeepLinkHandlers)
1324
1298
  try {
1325
- ie.trace("called handler"), u(a);
1299
+ ne.trace("called handler"), u(a);
1326
1300
  } catch (d) {
1327
1301
  console.error(d);
1328
1302
  }
1329
1303
  };
1330
1304
  eo(t.deepLink.$store, s), r();
1331
1305
  }, ro = ve("bypass");
1332
- class no extends di {
1306
+ class no extends li {
1333
1307
  $coreStore;
1334
1308
  deepLink;
1335
1309
  transport;
1336
1310
  bypassLogin;
1337
1311
  constructor(e, r, n) {
1338
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Ii(this.transport), this.connect();
1312
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Ei(this.transport), this.connect();
1339
1313
  }
1340
1314
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1341
1315
  /**
@@ -1418,7 +1392,7 @@ class no extends di {
1418
1392
  }
1419
1393
  const We = new je(), io = (t, e, r) => {
1420
1394
  t.auth = new no(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1421
- n === le.READY && t.auth.reLogin();
1395
+ n === de.READY && t.auth.reLogin();
1422
1396
  }), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
1423
1397
  if (!(We.getSchema() === n && We.getExternalToken() === i && t.transport.getHeader("authorization")))
1424
1398
  try {
@@ -1465,15 +1439,15 @@ const We = new je(), io = (t, e, r) => {
1465
1439
  }, t.sdk.initializeApp = async (o) => {
1466
1440
  if (t.contextConfig = o, t.stores.enabled.get() === "on")
1467
1441
  return { enabled: !0 };
1468
- t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(le.INITIALIZATION);
1442
+ t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(de.INITIALIZATION);
1469
1443
  try {
1470
1444
  const s = await t.stores.organizationSettings.getValue();
1471
- return s ? (t.stores.status.setValue(le.READY), { enabled: !!s }) : (t.stores.status.setValue(le.FAILED), { err: "failed" });
1445
+ return s ? (t.stores.status.setValue(de.READY), { enabled: !!s }) : (t.stores.status.setValue(de.FAILED), { err: "failed" });
1472
1446
  } catch (s) {
1473
- return t.stores.enabled.setValue(), t.stores.status.setValue(le.FAILED), { err: `${s}` };
1447
+ return t.stores.enabled.setValue(), t.stores.status.setValue(de.FAILED), { err: `${s}` };
1474
1448
  }
1475
1449
  }, t.sdk.disableApp = () => {
1476
- t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(le.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
1450
+ t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(de.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
1477
1451
  }, t.sdk.createEventSession = (o) => {
1478
1452
  t.stores.providerStreamId.setValue(o);
1479
1453
  }, r();
@@ -1491,7 +1465,7 @@ const We = new je(), io = (t, e, r) => {
1491
1465
  refetchInterval: 0
1492
1466
  });
1493
1467
  }, uo = (t, { web: e, mobile: r }) => {
1494
- const { client: n } = t.createPromiseClient(ri, { method: "generate" });
1468
+ const { client: n } = t.createPromiseClient(ti, { method: "generate" });
1495
1469
  return n.generate({ web: e, mobile: r });
1496
1470
  }, Vr = (t, e) => {
1497
1471
  const r = new URLSearchParams(t);
@@ -1499,30 +1473,30 @@ const We = new je(), io = (t, e, r) => {
1499
1473
  r.append(n, i);
1500
1474
  return r.toString();
1501
1475
  }, co = (t, e, r, n) => {
1502
- const i = pe({});
1503
- return nn(i, () => ao(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
1476
+ const i = ie({});
1477
+ return sr(i, () => ao(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
1504
1478
  const c = u ? "https://masters.com" : a?.url, f = n.get() || "", y = e.get() || "", m = r.get() || "", b = {
1505
1479
  [Tt]: f,
1506
- [pn]: y,
1507
- [hn]: m
1480
+ [fn]: y,
1481
+ [pn]: m
1508
1482
  };
1509
1483
  if (!d && c) {
1510
1484
  i.setKey("loading", !0);
1511
- let w = window.location.search, A = window.location.hash;
1512
- w && A || A ? w = `?${Vr(w, b)}` : A = `#${Vr("", b)}`;
1513
- const P = window.location.origin + window.location.pathname + w + A, V = await uo(t, { web: P, mobile: c });
1485
+ let T = window.location.search, I = window.location.hash;
1486
+ T && I || I ? T = `?${Vr(T, b)}` : I = `#${Vr("", b)}`;
1487
+ const F = window.location.origin + window.location.pathname + T + I, $ = await uo(t, { web: F, mobile: c });
1514
1488
  i.set({
1515
- data: V.data?.link,
1489
+ data: $.data?.link,
1516
1490
  loading: !1
1517
1491
  });
1518
1492
  } else
1519
1493
  i.setKey("loading", !0);
1520
1494
  })), { $store: i, fetch };
1521
1495
  };
1522
- var x;
1496
+ var M;
1523
1497
  (function(t) {
1524
1498
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
1525
- })(x || (x = {}));
1499
+ })(M || (M = {}));
1526
1500
  const lo = (t, e, r, n) => {
1527
1501
  const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
1528
1502
  i && r.add({
@@ -1553,8 +1527,8 @@ const lo = (t, e, r, n) => {
1553
1527
  userId: s,
1554
1528
  organizationId: e.organizationId.get() || "",
1555
1529
  eventId: e.slStreamId.get() || ""
1556
- }) === x.Completed) {
1557
- t.set(x.Completed);
1530
+ }) === M.Completed) {
1531
+ t.set(M.Completed);
1558
1532
  for (const y of o)
1559
1533
  y();
1560
1534
  return;
@@ -1563,22 +1537,22 @@ const lo = (t, e, r, n) => {
1563
1537
  if (u === void 0 || d === void 0)
1564
1538
  return;
1565
1539
  const c = u?.options?.onboardingEnabled, f = d?.titleCard?.optIn;
1566
- c ? f ? t.set(x.Required) : t.set(x.Optional) : (f ? t.set(x.Unavailable) : t.set(x.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), !1));
1540
+ c ? f ? t.set(M.Required) : t.set(M.Optional) : (f ? t.set(M.Unavailable) : t.set(M.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), !1));
1567
1541
  } catch (s) {
1568
1542
  console.error(s);
1569
1543
  }
1570
1544
  }, fo = (t, e, r, n) => {
1571
1545
  let i = !1;
1572
- const o = new fn(), s = q(x.Unset);
1546
+ const o = new dn(), s = B(M.Unset);
1573
1547
  s.subscribe((d) => {
1574
- d !== x.Unset && ((d === x.Optional || d === x.Required) && i === !1 && (lo(t, e, n, o), i = !0), d === x.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1548
+ d !== M.Unset && ((d === M.Optional || d === M.Required) && i === !1 && (lo(t, e, n, o), i = !0), d === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1575
1549
  userId: e.userId.get() || "",
1576
1550
  organizationId: e.organizationId.get() || "",
1577
1551
  eventId: e.slStreamId.get() || ""
1578
1552
  }));
1579
1553
  });
1580
1554
  const a = [];
1581
- return ct(s, e, t, n, o, a), s.get() !== x.Completed && (a.push(e.userId.listen((d) => {
1555
+ return ct(s, e, t, n, o, a), s.get() !== M.Completed && (a.push(e.userId.listen((d) => {
1582
1556
  d && ct(s, e, t, n, o, a);
1583
1557
  })), a.push(e.moderation.listen((d) => {
1584
1558
  d.data && ct(s, e, t, n, o, a);
@@ -1587,11 +1561,11 @@ const lo = (t, e, r, n) => {
1587
1561
  }))), { $store: s, submitInplay: async () => {
1588
1562
  const d = e.slStreamId.get();
1589
1563
  if (d) {
1590
- await Wi(r, d), s.set(x.Completed), o.saveOnboardingStatus({
1564
+ await Hi(r, d), s.set(M.Completed), o.saveOnboardingStatus({
1591
1565
  organizationId: e.organizationId.get() || "",
1592
1566
  userId: e.userId.get() || "",
1593
1567
  eventId: d
1594
- }, x.Completed), he.emit("poll", {
1568
+ }, M.Completed), he.emit("poll", {
1595
1569
  action: "onboardingPassed",
1596
1570
  payload: {}
1597
1571
  });
@@ -1599,8 +1573,25 @@ const lo = (t, e, r, n) => {
1599
1573
  n.close(c);
1600
1574
  }
1601
1575
  } };
1602
- }, po = /* @__PURE__ */ new Set([D.POLL, D.PREDICTION, D.TRIVIA]);
1603
- class ho extends dn {
1576
+ }, po = (t, e, r, n) => {
1577
+ const i = ie(void 0), o = Di(n), s = async () => {
1578
+ const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((m) => m.slId) || [], f = {
1579
+ eventId: u,
1580
+ userId: d,
1581
+ usersIds: [...c, d]
1582
+ }, y = await o(f);
1583
+ i.set(y.data?.attributes);
1584
+ }, a = () => {
1585
+ s();
1586
+ };
1587
+ return sr(i, () => {
1588
+ const u = t.listen(s), d = r.listen(s), c = e.listen(s);
1589
+ return () => {
1590
+ u(), d(), c();
1591
+ };
1592
+ }), { $store: i, invalidate: a };
1593
+ }, ho = /* @__PURE__ */ new Set([D.POLL, D.PREDICTION, D.TRIVIA]);
1594
+ class yo extends ln {
1604
1595
  /** user statistics (leaderboard panel) */
1605
1596
  userSummary;
1606
1597
  /** feed list (pick history) */
@@ -1633,16 +1624,16 @@ class ho extends dn {
1633
1624
  storage;
1634
1625
  submitAnswerTimeout;
1635
1626
  constructor(e, r, n) {
1636
- super(e, r), this.background = new qi(n), this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new fn(), this.userSummary = new X(Di(this.background.slStreamId, this.background.userId, n.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.friends = new X(Vi(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.leaderboardId = new z(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = fo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(N.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = co(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.leaderboardList = Ji(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.userSummary.listen((i) => {
1637
- this.leaderboardList.$store.lc !== 0 && i?.data?.summary && this.leaderboardList.invalidate();
1627
+ super(e, r), this.background = new Bi(n), this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new dn(), this.feedList = this.background.feedList, this.friends = new oe(Ri(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new z(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = fo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(N.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = co(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = po(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Ji(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.userSummary.$store.listen((i) => {
1628
+ this.leaderboardList.$store.lc !== 0 && i?.summary && this.leaderboardList.invalidate();
1638
1629
  }), this.background.activeQuestionId.listen(this.showInApp), this.onboardingStatus.$store.listen(this.checkInteractiveFlag), this.background.moderation.getStore().listen(this.checkInteractiveFlag), this.settings.subscribe(this.checkInteractiveFlag);
1639
1630
  }
1640
1631
  get isInteractiveAllowed() {
1641
- return this.background.interactiveAllowed.get() === Te.ALLOWED;
1632
+ return this.background.interactiveAllowed.get() === Oe.ALLOWED;
1642
1633
  }
1643
1634
  checkInteractiveFlag = () => {
1644
- const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === x.Completed, o = !r || i || n !== !0;
1645
- this.background.interactiveAllowed.set(o ? Te.ALLOWED : Te.DISALLOWED);
1635
+ const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === M.Completed, o = !r || i || n !== !0;
1636
+ this.background.interactiveAllowed.set(o ? Oe.ALLOWED : Oe.DISALLOWED);
1646
1637
  };
1647
1638
  connect = () => {
1648
1639
  this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (e) => {
@@ -1652,47 +1643,47 @@ class ho extends dn {
1652
1643
  if (!r || !n?.attributes)
1653
1644
  return;
1654
1645
  const { status: i, type: o, id: s, answers: a } = r;
1655
- if (i === $e.RESOLVED && o === D.PREDICTION) {
1646
+ if (i === Ee.RESOLVED && o === D.PREDICTION) {
1656
1647
  const u = this.background.getCurrentSessionId({
1657
1648
  prefix: `notification-id:${s}`
1658
- }), d = [...this.feedList.getValues().data || []], c = d.findIndex((j) => j.id === s), f = d[c];
1649
+ }), d = [...this.feedList.getValues().data || []], c = d.findIndex((q) => q.id === s), f = d[c];
1659
1650
  let y = f?.attributes?.attributes?.value?.answerId;
1660
1651
  const m = Wt(s, this.transport), b = m.subscribe(() => {
1661
1652
  });
1662
1653
  await m.get().promise;
1663
- const w = m.get().data;
1654
+ const T = m.get().data;
1664
1655
  b(), window.requestAnimationFrame(() => {
1665
1656
  m.invalidate();
1666
- }), y || (y = w?.answers.find(({ youVoted: j }) => j)?.id);
1667
- const A = a.find(({ correct: j }) => j), P = y ? a.find(({ id: j }) => j === y) : void 0, V = !!P?.correct;
1657
+ }), y || (y = T?.answers.find(({ youVoted: q }) => q)?.id);
1658
+ const I = a.find(({ correct: q }) => q), F = y ? a.find(({ id: q }) => q === y) : void 0, $ = !!F?.correct;
1668
1659
  if (f && d[c]?.attributes?.attributes.case === "question") {
1669
1660
  try {
1670
- d[c].attributes.attributes.value.answerId = y, d[c].attributes.attributes.value.openForVoting = !1, y && (d[c].attributes.attributes.value.status = V ? at.WON : at.LOST);
1661
+ d[c].attributes.attributes.value.answerId = y, d[c].attributes.attributes.value.openForVoting = !1, y && (d[c].attributes.attributes.value.status = $ ? at.WON : at.LOST);
1671
1662
  } catch {
1672
1663
  }
1673
1664
  this.feedList.getStore().mutate(d);
1674
1665
  }
1675
- if (!P || !A)
1666
+ if (!F || !I)
1676
1667
  return;
1677
1668
  this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
1678
1669
  type: me.QUESTION_RESOLVED,
1679
1670
  action: () => this.openQuestion(r.id, n),
1680
1671
  close: () => this.closeQuestion(s),
1681
- autoHideDuration: V ? 15e3 : 12e3,
1672
+ autoHideDuration: $ ? 15e3 : 12e3,
1682
1673
  id: u,
1683
1674
  emitEvent: !1,
1684
1675
  data: {
1685
1676
  questionId: s,
1686
1677
  questionType: D.PREDICTION,
1687
1678
  question: {
1688
- title: V ? `Congratulations! You answered correctly! You won ${A.points} pts!` : `Better luck next time! Correct: ${A?.text}!`,
1679
+ title: $ ? `Congratulations! You answered correctly! You won ${I.points} pts!` : `Better luck next time! Correct: ${I?.text}!`,
1689
1680
  votedAnswer: {
1690
- title: P?.text,
1691
- points: P?.points
1681
+ title: F?.text,
1682
+ points: F?.points
1692
1683
  },
1693
- correctAnswerTitle: A?.text,
1694
- correct: !!V,
1695
- predictionResult: i === $e.RESOLVED,
1684
+ correctAnswerTitle: I?.text,
1685
+ correct: !!$,
1686
+ predictionResult: i === Ee.RESOLVED,
1696
1687
  questionTitle: r?.subject
1697
1688
  }
1698
1689
  }
@@ -1728,8 +1719,24 @@ class ho extends dn {
1728
1719
  }
1729
1720
  }
1730
1721
  });
1731
- } else
1732
- r[i] = n;
1722
+ } else {
1723
+ const o = r[i];
1724
+ o.attributes && n.attributes && (r[i] = {
1725
+ ...r[i],
1726
+ attributes: {
1727
+ ...o.attributes,
1728
+ attributes: {
1729
+ ...o.attributes.attributes,
1730
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1731
+ // @ts-ignore
1732
+ value: {
1733
+ ...o.attributes.attributes.value,
1734
+ ...n.attributes.attributes.value
1735
+ }
1736
+ }
1737
+ }
1738
+ });
1739
+ }
1733
1740
  i === -1 && (r.unshift(n), he.emit("poll", {
1734
1741
  action: "received",
1735
1742
  payload: {
@@ -1762,7 +1769,9 @@ class ho extends dn {
1762
1769
  }), c = n.get().data;
1763
1770
  if (d(), c) {
1764
1771
  const f = c.answers.find((b) => b.correct === !0), y = c.answers.findIndex((b) => b.id === r), m = c.answers[y];
1765
- 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[y].correct = f?.id === r, c.answers[y].youVoted = !0, f?.id === r && (c.answers[y].pointsEarned = c.status === $e.RESOLVED ? 0 : f.points), n.mutate({ ...c });
1772
+ 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[y].correct = f?.id === r, c.answers[y].youVoted = !0, c.answers.forEach((b) => {
1773
+ b.percentageDecimal = 0;
1774
+ }), f?.id === r && (c.answers[y].pointsEarned = c.status === Ee.RESOLVED ? 0 : f.points), n.mutate({ ...c });
1766
1775
  }
1767
1776
  this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
1768
1777
  this.userSummary.invalidate();
@@ -1770,7 +1779,7 @@ class ho extends dn {
1770
1779
  }
1771
1780
  };
1772
1781
  try {
1773
- await Hi(this.transport, { questionId: e, answerId: r }), i();
1782
+ await Ki(this.transport, { questionId: e, answerId: r }), i();
1774
1783
  } catch (o) {
1775
1784
  if (o.message === tt.ALREADY_VOTED) {
1776
1785
  this.userSummary.invalidate();
@@ -1812,8 +1821,8 @@ class ho extends dn {
1812
1821
  */
1813
1822
  showInApp = (e) => {
1814
1823
  const r = this.onboardingStatus.$store.get();
1815
- if (e && e.data && r && r !== x.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Yn.ON && e.data.question.status === $e.ACTIVE && !e.data.question.marketClosed) {
1816
- if (po.has(e.data.question.type))
1824
+ if (e && e.data && r && r !== M.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Jn.ON && e.data.question.status === Ee.ACTIVE && !e.data.question.marketClosed) {
1825
+ if (ho.has(e.data.question.type))
1817
1826
  this.isInteractiveAllowed && this.notifications.add({
1818
1827
  type: me.QUESTION,
1819
1828
  action: () => e.data?.question && this.openQuestion(e.data.question.id, e.data.feedItem),
@@ -1836,7 +1845,7 @@ class ho extends dn {
1836
1845
  const n = e.data.question.options?.options.value, i = {
1837
1846
  heading: e.data.question.notification.title,
1838
1847
  body: e.data.question.notification.body,
1839
- imageMode: n.imageMode,
1848
+ imageMode: n?.imageMode,
1840
1849
  image: n?.image,
1841
1850
  video: {
1842
1851
  id: n?.video?.id || "",
@@ -1888,16 +1897,16 @@ class ho extends dn {
1888
1897
  }
1889
1898
  };
1890
1899
  }
1891
- const yo = {
1900
+ const go = {
1892
1901
  [N.GAMES]: !0
1893
1902
  };
1894
- class go extends dn {
1903
+ class mo extends ln {
1895
1904
  constructor(e, r) {
1896
1905
  super(e, r);
1897
1906
  }
1898
1907
  }
1899
- const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo = (t, e, r) => {
1900
- t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new z(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new z(q(N.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) => {
1908
+ const bo = (t, e, r) => t.type === N.GAMES ? new yo(t, e, r) : new mo(t, e), vo = (t, e, r) => {
1909
+ t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new z(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new z(B(N.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) => {
1901
1910
  t.activeFeature.setValue(n);
1902
1911
  }, t.sdk.closeFeature = (n = !1) => {
1903
1912
  const i = t.activeFeature.getValue();
@@ -1906,9 +1915,9 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
1906
1915
  const o = t.sdk.featuresList.getValue();
1907
1916
  o && o.delete(i), t.sdk.featuresList.setValue(o);
1908
1917
  }
1909
- }, t.initFeature = (n, i = ce.ORGANIZATION) => {
1910
- if (n.type in yo && !t.features.has(n.type)) {
1911
- const o = mo(n, i, t);
1918
+ }, t.initFeature = (n, i = le.ORGANIZATION) => {
1919
+ if (n.type in go && !t.features.has(n.type)) {
1920
+ const o = bo(n, i, t);
1912
1921
  t.features.set(n.type, o);
1913
1922
  let s = t.sdk.featuresList.getValue();
1914
1923
  s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
@@ -1923,12 +1932,12 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
1923
1932
  const n = await t.stores.organizationSettings.getValue();
1924
1933
  t.features.clear(), t.sdk.featuresList.setValue(/* @__PURE__ */ new Set());
1925
1934
  for (const i of n?.overlays || [])
1926
- t.initFeature(i, ce.ORGANIZATION);
1935
+ t.initFeature(i, le.ORGANIZATION);
1927
1936
  }, t.stores.providerStreamId.listen((n) => {
1928
1937
  n || t.reinitializeFeatures();
1929
1938
  }), t.storeSubscribe = () => {
1930
1939
  const n = (o, s) => {
1931
- if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === ce.ORGANIZATION))
1940
+ if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === le.ORGANIZATION))
1932
1941
  for (const a of s.overlays)
1933
1942
  a.sdkEnable === !0 && (t.features.has(a.type) ? t.updateFeature(a, o) : t.initFeature(a, o));
1934
1943
  }, i = {
@@ -1944,7 +1953,7 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
1944
1953
  organizationSettings: (o) => {
1945
1954
  if (o.data)
1946
1955
  try {
1947
- n(ce.ORGANIZATION, o.data);
1956
+ n(le.ORGANIZATION, o.data);
1948
1957
  } catch (s) {
1949
1958
  console.log(s);
1950
1959
  }
@@ -1952,7 +1961,7 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
1952
1961
  streamSettings: (o) => {
1953
1962
  if (o.data)
1954
1963
  try {
1955
- n(ce.STREAM, o.data);
1964
+ n(le.STREAM, o.data);
1956
1965
  } catch (s) {
1957
1966
  console.log(s);
1958
1967
  }
@@ -1961,7 +1970,7 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
1961
1970
  t.store.subscribe(i);
1962
1971
  }, r();
1963
1972
  };
1964
- class vo {
1973
+ class So {
1965
1974
  analytics;
1966
1975
  constructor(e) {
1967
1976
  this.analytics = e, this.analytics.onConnect(() => {
@@ -1980,24 +1989,24 @@ class vo {
1980
1989
  this.analytics.write("invitation", {
1981
1990
  common: {
1982
1991
  ...this.analytics.commonStore.getValues(),
1983
- kind: J.INVITATION_ACCEPTED
1992
+ kind: W.INVITATION_ACCEPTED
1984
1993
  },
1985
- category: vr.GAMES,
1986
- from: Sr.UNSET
1994
+ category: Sr.GAMES,
1995
+ from: wr.UNSET
1987
1996
  });
1988
1997
  };
1989
1998
  sent = ({ from: e }) => {
1990
1999
  this.analytics.write("invitation", {
1991
2000
  common: {
1992
2001
  ...this.analytics.commonStore.getValues(),
1993
- kind: J.INVITATION_SENT
2002
+ kind: W.INVITATION_SENT
1994
2003
  },
1995
- category: vr.GAMES,
1996
- from: e || Sr.UNSET
2004
+ category: Sr.GAMES,
2005
+ from: e || wr.UNSET
1997
2006
  });
1998
2007
  };
1999
2008
  }
2000
- class So {
2009
+ class wo {
2001
2010
  analytics;
2002
2011
  constructor(e) {
2003
2012
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2019,32 +2028,32 @@ class So {
2019
2028
  this.analytics.write("interactions", {
2020
2029
  common: {
2021
2030
  ...this.analytics.commonStore.getValues(),
2022
- kind: J.INTERACTIONS
2031
+ kind: W.INTERACTIONS
2023
2032
  },
2024
- actionType: Cr.TAP
2033
+ actionType: Lr.TAP
2025
2034
  });
2026
2035
  };
2027
2036
  scroll = () => {
2028
2037
  this.analytics.write("interactions", {
2029
2038
  common: {
2030
2039
  ...this.analytics.commonStore.getValues(),
2031
- kind: J.INTERACTIONS
2040
+ kind: W.INTERACTIONS
2032
2041
  },
2033
- actionType: Cr.SCROLL
2042
+ actionType: Lr.SCROLL
2034
2043
  });
2035
2044
  };
2036
2045
  }
2037
2046
  const Ye = {
2038
- [D.UNSET]: H.UNSET,
2039
- [D.FACTOID]: H.POLLS_INSIGHT,
2040
- [D.POLL]: H.POLLS_POLL,
2041
- [D.PREDICTION]: H.POLLS_PREDICTION,
2042
- [D.PROMOTION]: H.POLLS_PROMOTION,
2043
- [D.TRIVIA]: H.POLLS_TRIVIA,
2044
- [D.TWEET]: H.POLLS_TWITTER
2047
+ [D.UNSET]: K.UNSET,
2048
+ [D.FACTOID]: K.POLLS_INSIGHT,
2049
+ [D.POLL]: K.POLLS_POLL,
2050
+ [D.PREDICTION]: K.POLLS_PREDICTION,
2051
+ [D.PROMOTION]: K.POLLS_PROMOTION,
2052
+ [D.TRIVIA]: K.POLLS_TRIVIA,
2053
+ [D.TWEET]: K.POLLS_TWITTER
2045
2054
  };
2046
- 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;
2047
- const wo = {
2055
+ D.UNSET + "", ue.UNSET, D.FACTOID + "", ue.POLLS, D.POLL + "", ue.POLLS, D.PREDICTION + "", ue.POLLS, D.PROMOTION + "", ue.POLLS, D.TRIVIA + "", ue.POLLS, D.TWEET + "", ue.POLLS;
2056
+ const Ao = {
2048
2057
  [N.UNSET]: Q.UNSET,
2049
2058
  [N.INPLAY]: Q.INPLAY,
2050
2059
  [N.MESSAGING]: Q.MESSAGING,
@@ -2064,7 +2073,7 @@ const wo = {
2064
2073
  [N.HIGHLIGHTS]: Q.HIGHLIGHTS,
2065
2074
  [N.PUBLIC_CHAT]: Q.PUBLIC_CHAT
2066
2075
  };
2067
- class Ao {
2076
+ class Eo {
2068
2077
  analytics;
2069
2078
  constructor(e) {
2070
2079
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2086,11 +2095,11 @@ class Ao {
2086
2095
  this.analytics.write("notification", {
2087
2096
  common: {
2088
2097
  ...this.analytics.commonStore.getValues(),
2089
- kind: J.NOTIFICATION_RECEIVED,
2098
+ kind: W.NOTIFICATION_RECEIVED,
2090
2099
  topicId: e,
2091
- topicType: r ? Ye[r] : H.UNSET
2100
+ topicType: r ? Ye[r] : K.UNSET
2092
2101
  },
2093
- notificationKind: ae.POLLS,
2102
+ notificationKind: ue.POLLS,
2094
2103
  notificationType: _r.IN_APP
2095
2104
  });
2096
2105
  };
@@ -2098,16 +2107,16 @@ class Ao {
2098
2107
  this.analytics.write("notification", {
2099
2108
  common: {
2100
2109
  ...this.analytics.commonStore.getValues(),
2101
- kind: J.NOTIFICATION_OPENED,
2110
+ kind: W.NOTIFICATION_OPENED,
2102
2111
  topicId: e,
2103
- topicType: r ? Ye[r] : H.UNSET
2112
+ topicType: r ? Ye[r] : K.UNSET
2104
2113
  },
2105
- notificationKind: ae.POLLS,
2114
+ notificationKind: ue.POLLS,
2106
2115
  notificationType: _r.IN_APP
2107
2116
  });
2108
2117
  };
2109
2118
  }
2110
- class Eo {
2119
+ class Io {
2111
2120
  analytics;
2112
2121
  constructor(e) {
2113
2122
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2139,11 +2148,11 @@ class Eo {
2139
2148
  this.analytics.write("games", {
2140
2149
  common: {
2141
2150
  ...this.analytics.commonStore.getValues(),
2142
- kind: J.POLLS_RECEIVED,
2151
+ kind: W.POLLS_RECEIVED,
2143
2152
  topicId: e,
2144
- topicType: r ? Ye[r] : H.UNSET
2153
+ topicType: r ? Ye[r] : K.UNSET
2145
2154
  },
2146
- pollOpenedFrom: Ne.UNSET
2155
+ pollOpenedFrom: De.UNSET
2147
2156
  });
2148
2157
  };
2149
2158
  // poll is opened from notification or list
@@ -2151,11 +2160,11 @@ class Eo {
2151
2160
  this.analytics.write("games", {
2152
2161
  common: {
2153
2162
  ...this.analytics.commonStore.getValues(),
2154
- kind: J.POLLS_OPENED,
2163
+ kind: W.POLLS_OPENED,
2155
2164
  topicId: e,
2156
- topicType: r ? Ye[r] : H.UNSET
2165
+ topicType: r ? Ye[r] : K.UNSET
2157
2166
  },
2158
- pollOpenedFrom: n === "list" ? Ne.PICK_HISTORY : Ne.IN_APP
2167
+ pollOpenedFrom: n === "list" ? De.PICK_HISTORY : De.IN_APP
2159
2168
  });
2160
2169
  };
2161
2170
  // poll is voted
@@ -2163,11 +2172,11 @@ class Eo {
2163
2172
  this.analytics.write("games", {
2164
2173
  common: {
2165
2174
  ...this.analytics.commonStore.getValues(),
2166
- kind: J.POLLS_VOTE,
2175
+ kind: W.POLLS_VOTE,
2167
2176
  topicId: e,
2168
- topicType: r ? Ye[r] : H.UNSET
2177
+ topicType: r ? Ye[r] : K.UNSET
2169
2178
  },
2170
- pollOpenedFrom: Ne.UNSET
2179
+ pollOpenedFrom: De.UNSET
2171
2180
  });
2172
2181
  };
2173
2182
  // onboarding passed, user is now able to vote
@@ -2175,9 +2184,9 @@ class Eo {
2175
2184
  this.analytics.write("games", {
2176
2185
  common: {
2177
2186
  ...this.analytics.commonStore.getValues(),
2178
- kind: J.GAMES_JOINED
2187
+ kind: W.GAMES_JOINED
2179
2188
  },
2180
- pollOpenedFrom: Ne.UNSET
2189
+ pollOpenedFrom: De.UNSET
2181
2190
  });
2182
2191
  };
2183
2192
  // user clicked on link in poll and navigated to another page
@@ -2185,15 +2194,15 @@ class Eo {
2185
2194
  this.analytics.write("games", {
2186
2195
  common: {
2187
2196
  ...this.analytics.commonStore.getValues(),
2188
- kind: J.POLLS_NAVIGATED
2197
+ kind: W.POLLS_NAVIGATED
2189
2198
  },
2190
- pollOpenedFrom: Ne.UNSET
2199
+ pollOpenedFrom: De.UNSET
2191
2200
  });
2192
2201
  };
2193
2202
  }
2194
- const Io = ({ transport: t, $commonStore: e }) => {
2203
+ const To = ({ transport: t, $commonStore: e }) => {
2195
2204
  let r;
2196
- const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(sn, {
2205
+ const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(on, {
2197
2206
  method: "send",
2198
2207
  params: [n]
2199
2208
  }), a = t.nanoquery.createFetcherStore(s, {
@@ -2206,30 +2215,30 @@ const Io = ({ transport: t, $commonStore: e }) => {
2206
2215
  value: {
2207
2216
  common: {
2208
2217
  ...y,
2209
- kind: J.SESSION_HEARTBEAT
2218
+ kind: W.SESSION_HEARTBEAT
2210
2219
  }
2211
2220
  }
2212
2221
  }
2213
2222
  });
2214
2223
  } catch (m) {
2215
- de.error(m, "send heartbeat failed");
2224
+ fe.error(m, "send heartbeat failed");
2216
2225
  }
2217
2226
  return Date.now();
2218
2227
  },
2219
2228
  refetchInterval: i
2220
2229
  }), u = () => {
2221
- de.debug("mounted heartbeat"), r = a.subscribe(() => {
2230
+ fe.debug("mounted heartbeat"), r = a.subscribe(() => {
2222
2231
  });
2223
2232
  }, d = () => {
2224
- de.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
2233
+ fe.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
2225
2234
  }, c = () => {
2226
- de.debug("disabled heartbeat"), n.set(!1);
2235
+ fe.debug("disabled heartbeat"), n.set(!1);
2227
2236
  };
2228
2237
  return { enable: d, disable: c, mount: u, unmount: () => {
2229
- de.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2238
+ fe.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2230
2239
  } };
2231
- }, de = ve("analytics");
2232
- class To {
2240
+ }, fe = ve("analytics");
2241
+ class Oo {
2233
2242
  commonStore;
2234
2243
  notifications;
2235
2244
  polls;
@@ -2241,23 +2250,23 @@ class To {
2241
2250
  listenersCancels;
2242
2251
  connected = !1;
2243
2252
  constructor(e) {
2244
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ie(pe({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = Io({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Ao(this), this.polls = new Eo(this), this.invitation = new vo(this), this.interactions = new So(this);
2245
- const { client: r } = e.analyticsTransport.createPromiseClient(sn, {
2253
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = To({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Eo(this), this.polls = new Io(this), this.invitation = new So(this), this.interactions = new wo(this);
2254
+ const { client: r } = e.analyticsTransport.createPromiseClient(on, {
2246
2255
  method: "send"
2247
2256
  });
2248
2257
  this.analyticsClient = r;
2249
2258
  }
2250
2259
  connect = () => {
2251
- this.writeCommon("sessionId", Gt()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, de.debug("analytics connected");
2260
+ this.writeCommon("sessionId", Gt()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, fe.debug("analytics connected");
2252
2261
  };
2253
2262
  disconnect = () => {
2254
- this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, de.debug("analytics disconnected");
2263
+ this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, fe.debug("analytics disconnected");
2255
2264
  };
2256
2265
  write = (e, r) => {
2257
2266
  r && this.analyticsClient.unary({ message: { case: e, value: r } }).then(() => {
2258
- de.trace("send analytics success", e, r);
2267
+ fe.trace("send analytics success", e, r);
2259
2268
  }).catch((n) => {
2260
- de.error(n, "send analytics failed");
2269
+ fe.error(n, "send analytics failed");
2261
2270
  });
2262
2271
  };
2263
2272
  writeCommon = (e, r) => {
@@ -2271,10 +2280,10 @@ class To {
2271
2280
  this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
2272
2281
  this.writeCommon("eventId", r);
2273
2282
  })), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
2274
- r && this.writeCommon("category", wo[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Gt()) : this.writeCommon("overlaySessionId", "");
2283
+ r && this.writeCommon("category", Ao[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Gt()) : this.writeCommon("overlaySessionId", "");
2275
2284
  })), this.onConnect(() => {
2276
2285
  const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
2277
- this.writeCommon("screenOrientation", i.matches ? Or.PORTRAIT : Or.LANDSCAPE);
2286
+ this.writeCommon("screenOrientation", i.matches ? Cr.PORTRAIT : Cr.LANDSCAPE);
2278
2287
  };
2279
2288
  return r.addEventListener("change", n), () => {
2280
2289
  r.removeEventListener("change", n);
@@ -2284,16 +2293,16 @@ class To {
2284
2293
  }));
2285
2294
  };
2286
2295
  }
2287
- const Oo = (t, e, r) => {
2288
- t.analytics = new To(t), t.sdk.onMount(() => (t.analytics.connect(), () => {
2296
+ const Co = (t, e, r) => {
2297
+ t.analytics = new Oo(t), t.sdk.onMount(() => (t.analytics.connect(), () => {
2289
2298
  t.analytics.disconnect();
2290
2299
  })), r();
2291
2300
  };
2292
- var yn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2293
- function Co(t) {
2301
+ var hn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2302
+ function Lo(t) {
2294
2303
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
2295
2304
  }
2296
- var ar = { exports: {} }, ur = { exports: {} };
2305
+ var ur = { exports: {} }, cr = { exports: {} };
2297
2306
  function _o(t) {
2298
2307
  var e = new t(), r = e;
2299
2308
  function n() {
@@ -2308,14 +2317,14 @@ function _o(t) {
2308
2317
  release: i
2309
2318
  };
2310
2319
  }
2311
- var Lo = _o, ko = Lo;
2312
- function gn(t, e, r) {
2320
+ var ko = _o, Po = ko;
2321
+ function yn(t, e, r) {
2313
2322
  if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
2314
2323
  throw new Error("fastqueue concurrency must be greater than 1");
2315
- var n = ko(Po), i = null, o = null, s = 0, a = null, u = {
2316
- push: w,
2317
- drain: W,
2318
- saturated: W,
2324
+ var n = Po(Fo), i = null, o = null, s = 0, a = null, u = {
2325
+ push: T,
2326
+ drain: H,
2327
+ saturated: H,
2319
2328
  pause: c,
2320
2329
  paused: !1,
2321
2330
  concurrency: r,
@@ -2324,11 +2333,11 @@ function gn(t, e, r) {
2324
2333
  idle: b,
2325
2334
  length: f,
2326
2335
  getQueue: y,
2327
- unshift: A,
2328
- empty: W,
2329
- kill: V,
2330
- killAndDrain: j,
2331
- error: K
2336
+ unshift: I,
2337
+ empty: H,
2338
+ kill: $,
2339
+ killAndDrain: q,
2340
+ error: J
2332
2341
  };
2333
2342
  return u;
2334
2343
  function d() {
@@ -2338,90 +2347,90 @@ function gn(t, e, r) {
2338
2347
  u.paused = !0;
2339
2348
  }
2340
2349
  function f() {
2341
- for (var L = i, R = 0; L; )
2342
- L = L.next, R++;
2350
+ for (var _ = i, R = 0; _; )
2351
+ _ = _.next, R++;
2343
2352
  return R;
2344
2353
  }
2345
2354
  function y() {
2346
- for (var L = i, R = []; L; )
2347
- R.push(L.value), L = L.next;
2355
+ for (var _ = i, R = []; _; )
2356
+ R.push(_.value), _ = _.next;
2348
2357
  return R;
2349
2358
  }
2350
2359
  function m() {
2351
2360
  if (u.paused) {
2352
2361
  u.paused = !1;
2353
- for (var L = 0; L < u.concurrency; L++)
2354
- s++, P();
2362
+ for (var _ = 0; _ < u.concurrency; _++)
2363
+ s++, F();
2355
2364
  }
2356
2365
  }
2357
2366
  function b() {
2358
2367
  return s === 0 && u.length() === 0;
2359
2368
  }
2360
- function w(L, R) {
2361
- var T = n.get();
2362
- T.context = t, T.release = P, T.value = L, T.callback = R || W, 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));
2369
+ function T(_, R) {
2370
+ var E = n.get();
2371
+ E.context = t, E.release = F, E.value = _, E.callback = R || H, E.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = E, o = E) : (i = E, o = E, u.saturated()) : (s++, e.call(t, E.value, E.worked));
2363
2372
  }
2364
- function A(L, R) {
2365
- var T = n.get();
2366
- T.context = t, T.release = P, T.value = L, T.callback = R || W, 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));
2373
+ function I(_, R) {
2374
+ var E = n.get();
2375
+ E.context = t, E.release = F, E.value = _, E.callback = R || H, E.errorHandler = a, s === u.concurrency || u.paused ? i ? (E.next = i, i = E) : (i = E, o = E, u.saturated()) : (s++, e.call(t, E.value, E.worked));
2367
2376
  }
2368
- function P(L) {
2369
- L && n.release(L);
2377
+ function F(_) {
2378
+ _ && n.release(_);
2370
2379
  var R = i;
2371
2380
  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();
2372
2381
  }
2373
- function V() {
2374
- i = null, o = null, u.drain = W;
2382
+ function $() {
2383
+ i = null, o = null, u.drain = H;
2375
2384
  }
2376
- function j() {
2377
- i = null, o = null, u.drain(), u.drain = W;
2385
+ function q() {
2386
+ i = null, o = null, u.drain(), u.drain = H;
2378
2387
  }
2379
- function K(L) {
2380
- a = L;
2388
+ function J(_) {
2389
+ a = _;
2381
2390
  }
2382
2391
  }
2383
- function W() {
2392
+ function H() {
2384
2393
  }
2385
- function Po() {
2386
- this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
2394
+ function Fo() {
2395
+ this.value = null, this.callback = H, this.next = null, this.release = H, this.context = null, this.errorHandler = null;
2387
2396
  var t = this;
2388
2397
  this.worked = function(r, n) {
2389
2398
  var i = t.callback, o = t.errorHandler, s = t.value;
2390
- t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
2399
+ t.value = null, t.callback = H, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
2391
2400
  };
2392
2401
  }
2393
- function Fo(t, e, r) {
2402
+ function No(t, e, r) {
2394
2403
  typeof t == "function" && (r = e, e = t, t = null);
2395
2404
  function n(c, f) {
2396
2405
  e.call(this, c).then(function(y) {
2397
2406
  f(null, y);
2398
2407
  }, f);
2399
2408
  }
2400
- var i = gn(t, n, r), o = i.push, s = i.unshift;
2409
+ var i = yn(t, n, r), o = i.push, s = i.unshift;
2401
2410
  return i.push = a, i.unshift = u, i.drained = d, i;
2402
2411
  function a(c) {
2403
2412
  var f = new Promise(function(y, m) {
2404
- o(c, function(b, w) {
2413
+ o(c, function(b, T) {
2405
2414
  if (b) {
2406
2415
  m(b);
2407
2416
  return;
2408
2417
  }
2409
- y(w);
2418
+ y(T);
2410
2419
  });
2411
2420
  });
2412
- return f.catch(W), f;
2421
+ return f.catch(H), f;
2413
2422
  }
2414
2423
  function u(c) {
2415
2424
  var f = new Promise(function(y, m) {
2416
- s(c, function(b, w) {
2425
+ s(c, function(b, T) {
2417
2426
  if (b) {
2418
2427
  m(b);
2419
2428
  return;
2420
2429
  }
2421
- y(w);
2430
+ y(T);
2422
2431
  });
2423
2432
  });
2424
- return f.catch(W), f;
2433
+ return f.catch(H), f;
2425
2434
  }
2426
2435
  function d() {
2427
2436
  if (i.idle())
@@ -2436,9 +2445,9 @@ function Fo(t, e, r) {
2436
2445
  return f;
2437
2446
  }
2438
2447
  }
2439
- ur.exports = gn;
2440
- ur.exports.promise = Fo;
2441
- var mn = ur.exports, cr = { exports: {} }, Be = typeof Reflect == "object" ? Reflect : null, $r = Be && typeof Be.apply == "function" ? Be.apply : function(e, r, n) {
2448
+ cr.exports = yn;
2449
+ cr.exports.promise = No;
2450
+ var gn = cr.exports, lr = { exports: {} }, Be = typeof Reflect == "object" ? Reflect : null, $r = Be && typeof Be.apply == "function" ? Be.apply : function(e, r, n) {
2442
2451
  return Function.prototype.apply.call(e, r, n);
2443
2452
  }, dt;
2444
2453
  Be && typeof Be.ownKeys == "function" ? dt = Be.ownKeys : Object.getOwnPropertySymbols ? dt = function(e) {
@@ -2446,17 +2455,17 @@ Be && typeof Be.ownKeys == "function" ? dt = Be.ownKeys : Object.getOwnPropertyS
2446
2455
  } : dt = function(e) {
2447
2456
  return Object.getOwnPropertyNames(e);
2448
2457
  };
2449
- function No(t) {
2458
+ function Do(t) {
2450
2459
  console && console.warn && console.warn(t);
2451
2460
  }
2452
- var bn = Number.isNaN || function(e) {
2461
+ var mn = Number.isNaN || function(e) {
2453
2462
  return e !== e;
2454
2463
  };
2455
2464
  function k() {
2456
2465
  k.init.call(this);
2457
2466
  }
2458
- cr.exports = k;
2459
- cr.exports.once = $o;
2467
+ lr.exports = k;
2468
+ lr.exports.once = jo;
2460
2469
  k.EventEmitter = k;
2461
2470
  k.prototype._events = void 0;
2462
2471
  k.prototype._eventsCount = 0;
@@ -2472,7 +2481,7 @@ Object.defineProperty(k, "defaultMaxListeners", {
2472
2481
  return jr;
2473
2482
  },
2474
2483
  set: function(t) {
2475
- if (typeof t != "number" || t < 0 || bn(t))
2484
+ if (typeof t != "number" || t < 0 || mn(t))
2476
2485
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
2477
2486
  jr = t;
2478
2487
  }
@@ -2481,15 +2490,15 @@ k.init = function() {
2481
2490
  (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;
2482
2491
  };
2483
2492
  k.prototype.setMaxListeners = function(e) {
2484
- if (typeof e != "number" || e < 0 || bn(e))
2493
+ if (typeof e != "number" || e < 0 || mn(e))
2485
2494
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
2486
2495
  return this._maxListeners = e, this;
2487
2496
  };
2488
- function vn(t) {
2497
+ function bn(t) {
2489
2498
  return t._maxListeners === void 0 ? k.defaultMaxListeners : t._maxListeners;
2490
2499
  }
2491
2500
  k.prototype.getMaxListeners = function() {
2492
- return vn(this);
2501
+ return bn(this);
2493
2502
  };
2494
2503
  k.prototype.emit = function(e) {
2495
2504
  for (var r = [], n = 1; n < arguments.length; n++)
@@ -2512,11 +2521,11 @@ k.prototype.emit = function(e) {
2512
2521
  if (typeof u == "function")
2513
2522
  $r(u, this, r);
2514
2523
  else
2515
- for (var d = u.length, c = In(u, d), n = 0; n < d; ++n)
2524
+ for (var d = u.length, c = En(u, d), n = 0; n < d; ++n)
2516
2525
  $r(c[n], this, r);
2517
2526
  return !0;
2518
2527
  };
2519
- function Sn(t, e, r, n) {
2528
+ function vn(t, e, r, n) {
2520
2529
  var i, o, s;
2521
2530
  if (Ot(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
2522
2531
  "newListener",
@@ -2524,33 +2533,33 @@ function Sn(t, e, r, n) {
2524
2533
  r.listener ? r.listener : r
2525
2534
  ), o = t._events), s = o[e]), s === void 0)
2526
2535
  s = o[e] = r, ++t._eventsCount;
2527
- else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = vn(t), i > 0 && s.length > i && !s.warned) {
2536
+ else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = bn(t), i > 0 && s.length > i && !s.warned) {
2528
2537
  s.warned = !0;
2529
2538
  var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2530
- a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, No(a);
2539
+ a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, Do(a);
2531
2540
  }
2532
2541
  return t;
2533
2542
  }
2534
2543
  k.prototype.addListener = function(e, r) {
2535
- return Sn(this, e, r, !1);
2544
+ return vn(this, e, r, !1);
2536
2545
  };
2537
2546
  k.prototype.on = k.prototype.addListener;
2538
2547
  k.prototype.prependListener = function(e, r) {
2539
- return Sn(this, e, r, !0);
2548
+ return vn(this, e, r, !0);
2540
2549
  };
2541
- function Do() {
2550
+ function Ro() {
2542
2551
  if (!this.fired)
2543
2552
  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);
2544
2553
  }
2545
- function wn(t, e, r) {
2546
- var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Do.bind(n);
2554
+ function Sn(t, e, r) {
2555
+ var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Ro.bind(n);
2547
2556
  return i.listener = r, n.wrapFn = i, i;
2548
2557
  }
2549
2558
  k.prototype.once = function(e, r) {
2550
- return Ot(r), this.on(e, wn(this, e, r)), this;
2559
+ return Ot(r), this.on(e, Sn(this, e, r)), this;
2551
2560
  };
2552
2561
  k.prototype.prependOnceListener = function(e, r) {
2553
- return Ot(r), this.prependListener(e, wn(this, e, r)), this;
2562
+ return Ot(r), this.prependListener(e, Sn(this, e, r)), this;
2554
2563
  };
2555
2564
  k.prototype.removeListener = function(e, r) {
2556
2565
  var n, i, o, s, a;
@@ -2568,7 +2577,7 @@ k.prototype.removeListener = function(e, r) {
2568
2577
  }
2569
2578
  if (o < 0)
2570
2579
  return this;
2571
- o === 0 ? n.shift() : Ro(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
2580
+ o === 0 ? n.shift() : Vo(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
2572
2581
  }
2573
2582
  return this;
2574
2583
  };
@@ -2592,24 +2601,24 @@ k.prototype.removeAllListeners = function(e) {
2592
2601
  this.removeListener(e, r[i]);
2593
2602
  return this;
2594
2603
  };
2595
- function An(t, e, r) {
2604
+ function wn(t, e, r) {
2596
2605
  var n = t._events;
2597
2606
  if (n === void 0)
2598
2607
  return [];
2599
2608
  var i = n[e];
2600
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Vo(i) : In(i, i.length);
2609
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? $o(i) : En(i, i.length);
2601
2610
  }
2602
2611
  k.prototype.listeners = function(e) {
2603
- return An(this, e, !0);
2612
+ return wn(this, e, !0);
2604
2613
  };
2605
2614
  k.prototype.rawListeners = function(e) {
2606
- return An(this, e, !1);
2615
+ return wn(this, e, !1);
2607
2616
  };
2608
2617
  k.listenerCount = function(t, e) {
2609
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : En.call(t, e);
2618
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : An.call(t, e);
2610
2619
  };
2611
- k.prototype.listenerCount = En;
2612
- function En(t) {
2620
+ k.prototype.listenerCount = An;
2621
+ function An(t) {
2613
2622
  var e = this._events;
2614
2623
  if (e !== void 0) {
2615
2624
  var r = e[t];
@@ -2623,22 +2632,22 @@ function En(t) {
2623
2632
  k.prototype.eventNames = function() {
2624
2633
  return this._eventsCount > 0 ? dt(this._events) : [];
2625
2634
  };
2626
- function In(t, e) {
2635
+ function En(t, e) {
2627
2636
  for (var r = new Array(e), n = 0; n < e; ++n)
2628
2637
  r[n] = t[n];
2629
2638
  return r;
2630
2639
  }
2631
- function Ro(t, e) {
2640
+ function Vo(t, e) {
2632
2641
  for (; e + 1 < t.length; e++)
2633
2642
  t[e] = t[e + 1];
2634
2643
  t.pop();
2635
2644
  }
2636
- function Vo(t) {
2645
+ function $o(t) {
2637
2646
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
2638
2647
  e[r] = t[r].listener || t[r];
2639
2648
  return e;
2640
2649
  }
2641
- function $o(t, e) {
2650
+ function jo(t, e) {
2642
2651
  return new Promise(function(r, n) {
2643
2652
  function i(s) {
2644
2653
  t.removeListener(e, o), n(s);
@@ -2646,13 +2655,13 @@ function $o(t, e) {
2646
2655
  function o() {
2647
2656
  typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
2648
2657
  }
2649
- Tn(t, e, o, { once: !0 }), e !== "error" && jo(t, i, { once: !0 });
2658
+ In(t, e, o, { once: !0 }), e !== "error" && Uo(t, i, { once: !0 });
2650
2659
  });
2651
2660
  }
2652
- function jo(t, e, r) {
2653
- typeof t.on == "function" && Tn(t, "error", e, r);
2661
+ function Uo(t, e, r) {
2662
+ typeof t.on == "function" && In(t, "error", e, r);
2654
2663
  }
2655
- function Tn(t, e, r, n) {
2664
+ function In(t, e, r, n) {
2656
2665
  if (typeof t.on == "function")
2657
2666
  n.once ? t.once(e, r) : t.on(e, r);
2658
2667
  else if (typeof t.addEventListener == "function")
@@ -2662,7 +2671,7 @@ function Tn(t, e, r, n) {
2662
2671
  else
2663
2672
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
2664
2673
  }
2665
- var On = cr.exports, Ct = {}, Cn = {}, _n = function() {
2674
+ var Tn = lr.exports, Ct = {}, On = {}, Cn = function() {
2666
2675
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
2667
2676
  return !1;
2668
2677
  if (typeof Symbol.iterator == "symbol")
@@ -2685,33 +2694,33 @@ var On = cr.exports, Ct = {}, Cn = {}, _n = function() {
2685
2694
  return !1;
2686
2695
  }
2687
2696
  return !0;
2688
- }, Mo = _n, lr = function() {
2697
+ }, Mo = Cn, dr = function() {
2689
2698
  return Mo() && !!Symbol.toStringTag;
2690
- }, Mr = typeof Symbol < "u" && Symbol, Uo = _n, xo = function() {
2691
- return typeof Mr != "function" || typeof Symbol != "function" || typeof Mr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Uo();
2692
- }, Ur = {
2699
+ }, Ur = typeof Symbol < "u" && Symbol, xo = Cn, Bo = function() {
2700
+ return typeof Ur != "function" || typeof Symbol != "function" || typeof Ur("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : xo();
2701
+ }, Mr = {
2693
2702
  foo: {}
2694
- }, Bo = Object, qo = function() {
2695
- return { __proto__: Ur }.foo === Ur.foo && !({ __proto__: null } instanceof Bo);
2696
- }, Qo = "Function.prototype.bind called on incompatible ", Go = Object.prototype.toString, Ko = Math.max, zo = "[object Function]", xr = function(e, r) {
2703
+ }, qo = Object, Qo = function() {
2704
+ return { __proto__: Mr }.foo === Mr.foo && !({ __proto__: null } instanceof qo);
2705
+ }, Go = "Function.prototype.bind called on incompatible ", zo = Object.prototype.toString, Ko = Math.max, Ho = "[object Function]", xr = function(e, r) {
2697
2706
  for (var n = [], i = 0; i < e.length; i += 1)
2698
2707
  n[i] = e[i];
2699
2708
  for (var o = 0; o < r.length; o += 1)
2700
2709
  n[o + e.length] = r[o];
2701
2710
  return n;
2702
- }, Ho = function(e, r) {
2711
+ }, Wo = function(e, r) {
2703
2712
  for (var n = [], i = r || 0, o = 0; i < e.length; i += 1, o += 1)
2704
2713
  n[o] = e[i];
2705
2714
  return n;
2706
- }, Wo = function(t, e) {
2715
+ }, Jo = function(t, e) {
2707
2716
  for (var r = "", n = 0; n < t.length; n += 1)
2708
2717
  r += t[n], n + 1 < t.length && (r += e);
2709
2718
  return r;
2710
- }, Jo = function(e) {
2719
+ }, Yo = function(e) {
2711
2720
  var r = this;
2712
- if (typeof r != "function" || Go.apply(r) !== zo)
2713
- throw new TypeError(Qo + r);
2714
- for (var n = Ho(arguments, 1), i, o = function() {
2721
+ if (typeof r != "function" || zo.apply(r) !== Ho)
2722
+ throw new TypeError(Go + r);
2723
+ for (var n = Wo(arguments, 1), i, o = function() {
2715
2724
  if (this instanceof i) {
2716
2725
  var c = r.apply(
2717
2726
  this,
@@ -2725,54 +2734,54 @@ var On = cr.exports, Ct = {}, Cn = {}, _n = function() {
2725
2734
  );
2726
2735
  }, s = Ko(0, r.length - n.length), a = [], u = 0; u < s; u++)
2727
2736
  a[u] = "$" + u;
2728
- if (i = Function("binder", "return function (" + Wo(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
2737
+ if (i = Function("binder", "return function (" + Jo(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
2729
2738
  var d = function() {
2730
2739
  };
2731
2740
  d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
2732
2741
  }
2733
2742
  return i;
2734
- }, Yo = Jo, dr = Function.prototype.bind || Yo, Xo = Function.prototype.call, Zo = Object.prototype.hasOwnProperty, es = dr, ts = es.call(Xo, Zo), I, Qe = SyntaxError, Ln = Function, qe = TypeError, Pt = function(t) {
2743
+ }, Xo = Yo, fr = Function.prototype.bind || Xo, Zo = Function.prototype.call, es = Object.prototype.hasOwnProperty, ts = fr, rs = ts.call(Zo, es), A, Qe = SyntaxError, Ln = Function, qe = TypeError, Pt = function(t) {
2735
2744
  try {
2736
2745
  return Ln('"use strict"; return (' + t + ").constructor;")();
2737
2746
  } catch {
2738
2747
  }
2739
- }, Oe = Object.getOwnPropertyDescriptor;
2740
- if (Oe)
2748
+ }, Ce = Object.getOwnPropertyDescriptor;
2749
+ if (Ce)
2741
2750
  try {
2742
- Oe({}, "");
2751
+ Ce({}, "");
2743
2752
  } catch {
2744
- Oe = null;
2753
+ Ce = null;
2745
2754
  }
2746
2755
  var Ft = function() {
2747
2756
  throw new qe();
2748
- }, rs = Oe ? function() {
2757
+ }, ns = Ce ? function() {
2749
2758
  try {
2750
2759
  return arguments.callee, Ft;
2751
2760
  } catch {
2752
2761
  try {
2753
- return Oe(arguments, "callee").get;
2762
+ return Ce(arguments, "callee").get;
2754
2763
  } catch {
2755
2764
  return Ft;
2756
2765
  }
2757
2766
  }
2758
- }() : Ft, De = xo(), ns = qo(), M = Object.getPrototypeOf || (ns ? function(t) {
2767
+ }() : Ft, Re = Bo(), is = Qo(), j = Object.getPrototypeOf || (is ? function(t) {
2759
2768
  return t.__proto__;
2760
- } : null), Ve = {}, is = typeof Uint8Array > "u" || !M ? I : M(Uint8Array), Ce = {
2761
- "%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
2769
+ } : null), $e = {}, os = typeof Uint8Array > "u" || !j ? A : j(Uint8Array), Le = {
2770
+ "%AggregateError%": typeof AggregateError > "u" ? A : AggregateError,
2762
2771
  "%Array%": Array,
2763
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? I : ArrayBuffer,
2764
- "%ArrayIteratorPrototype%": De && M ? M([][Symbol.iterator]()) : I,
2765
- "%AsyncFromSyncIteratorPrototype%": I,
2766
- "%AsyncFunction%": Ve,
2767
- "%AsyncGenerator%": Ve,
2768
- "%AsyncGeneratorFunction%": Ve,
2769
- "%AsyncIteratorPrototype%": Ve,
2770
- "%Atomics%": typeof Atomics > "u" ? I : Atomics,
2771
- "%BigInt%": typeof BigInt > "u" ? I : BigInt,
2772
- "%BigInt64Array%": typeof BigInt64Array > "u" ? I : BigInt64Array,
2773
- "%BigUint64Array%": typeof BigUint64Array > "u" ? I : BigUint64Array,
2772
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? A : ArrayBuffer,
2773
+ "%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) : A,
2774
+ "%AsyncFromSyncIteratorPrototype%": A,
2775
+ "%AsyncFunction%": $e,
2776
+ "%AsyncGenerator%": $e,
2777
+ "%AsyncGeneratorFunction%": $e,
2778
+ "%AsyncIteratorPrototype%": $e,
2779
+ "%Atomics%": typeof Atomics > "u" ? A : Atomics,
2780
+ "%BigInt%": typeof BigInt > "u" ? A : BigInt,
2781
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? A : BigInt64Array,
2782
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? A : BigUint64Array,
2774
2783
  "%Boolean%": Boolean,
2775
- "%DataView%": typeof DataView > "u" ? I : DataView,
2784
+ "%DataView%": typeof DataView > "u" ? A : DataView,
2776
2785
  "%Date%": Date,
2777
2786
  "%decodeURI%": decodeURI,
2778
2787
  "%decodeURIComponent%": decodeURIComponent,
@@ -2782,58 +2791,58 @@ var Ft = function() {
2782
2791
  "%eval%": eval,
2783
2792
  // eslint-disable-line no-eval
2784
2793
  "%EvalError%": EvalError,
2785
- "%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
2786
- "%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
2787
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
2794
+ "%Float32Array%": typeof Float32Array > "u" ? A : Float32Array,
2795
+ "%Float64Array%": typeof Float64Array > "u" ? A : Float64Array,
2796
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? A : FinalizationRegistry,
2788
2797
  "%Function%": Ln,
2789
- "%GeneratorFunction%": Ve,
2790
- "%Int8Array%": typeof Int8Array > "u" ? I : Int8Array,
2791
- "%Int16Array%": typeof Int16Array > "u" ? I : Int16Array,
2792
- "%Int32Array%": typeof Int32Array > "u" ? I : Int32Array,
2798
+ "%GeneratorFunction%": $e,
2799
+ "%Int8Array%": typeof Int8Array > "u" ? A : Int8Array,
2800
+ "%Int16Array%": typeof Int16Array > "u" ? A : Int16Array,
2801
+ "%Int32Array%": typeof Int32Array > "u" ? A : Int32Array,
2793
2802
  "%isFinite%": isFinite,
2794
2803
  "%isNaN%": isNaN,
2795
- "%IteratorPrototype%": De && M ? M(M([][Symbol.iterator]())) : I,
2796
- "%JSON%": typeof JSON == "object" ? JSON : I,
2797
- "%Map%": typeof Map > "u" ? I : Map,
2798
- "%MapIteratorPrototype%": typeof Map > "u" || !De || !M ? I : M((/* @__PURE__ */ new Map())[Symbol.iterator]()),
2804
+ "%IteratorPrototype%": Re && j ? j(j([][Symbol.iterator]())) : A,
2805
+ "%JSON%": typeof JSON == "object" ? JSON : A,
2806
+ "%Map%": typeof Map > "u" ? A : Map,
2807
+ "%MapIteratorPrototype%": typeof Map > "u" || !Re || !j ? A : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
2799
2808
  "%Math%": Math,
2800
2809
  "%Number%": Number,
2801
2810
  "%Object%": Object,
2802
2811
  "%parseFloat%": parseFloat,
2803
2812
  "%parseInt%": parseInt,
2804
- "%Promise%": typeof Promise > "u" ? I : Promise,
2805
- "%Proxy%": typeof Proxy > "u" ? I : Proxy,
2813
+ "%Promise%": typeof Promise > "u" ? A : Promise,
2814
+ "%Proxy%": typeof Proxy > "u" ? A : Proxy,
2806
2815
  "%RangeError%": RangeError,
2807
2816
  "%ReferenceError%": ReferenceError,
2808
- "%Reflect%": typeof Reflect > "u" ? I : Reflect,
2817
+ "%Reflect%": typeof Reflect > "u" ? A : Reflect,
2809
2818
  "%RegExp%": RegExp,
2810
- "%Set%": typeof Set > "u" ? I : Set,
2811
- "%SetIteratorPrototype%": typeof Set > "u" || !De || !M ? I : M((/* @__PURE__ */ new Set())[Symbol.iterator]()),
2812
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? I : SharedArrayBuffer,
2819
+ "%Set%": typeof Set > "u" ? A : Set,
2820
+ "%SetIteratorPrototype%": typeof Set > "u" || !Re || !j ? A : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
2821
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? A : SharedArrayBuffer,
2813
2822
  "%String%": String,
2814
- "%StringIteratorPrototype%": De && M ? M(""[Symbol.iterator]()) : I,
2815
- "%Symbol%": De ? Symbol : I,
2823
+ "%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : A,
2824
+ "%Symbol%": Re ? Symbol : A,
2816
2825
  "%SyntaxError%": Qe,
2817
- "%ThrowTypeError%": rs,
2818
- "%TypedArray%": is,
2826
+ "%ThrowTypeError%": ns,
2827
+ "%TypedArray%": os,
2819
2828
  "%TypeError%": qe,
2820
- "%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
2821
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
2822
- "%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
2823
- "%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
2829
+ "%Uint8Array%": typeof Uint8Array > "u" ? A : Uint8Array,
2830
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? A : Uint8ClampedArray,
2831
+ "%Uint16Array%": typeof Uint16Array > "u" ? A : Uint16Array,
2832
+ "%Uint32Array%": typeof Uint32Array > "u" ? A : Uint32Array,
2824
2833
  "%URIError%": URIError,
2825
- "%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
2826
- "%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
2827
- "%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
2834
+ "%WeakMap%": typeof WeakMap > "u" ? A : WeakMap,
2835
+ "%WeakRef%": typeof WeakRef > "u" ? A : WeakRef,
2836
+ "%WeakSet%": typeof WeakSet > "u" ? A : WeakSet
2828
2837
  };
2829
- if (M)
2838
+ if (j)
2830
2839
  try {
2831
2840
  null.error;
2832
2841
  } catch (t) {
2833
- var os = M(M(t));
2834
- Ce["%Error.prototype%"] = os;
2842
+ var ss = j(j(t));
2843
+ Le["%Error.prototype%"] = ss;
2835
2844
  }
2836
- var ss = function t(e) {
2845
+ var as = function t(e) {
2837
2846
  var r;
2838
2847
  if (e === "%AsyncFunction%")
2839
2848
  r = Pt("async function () {}");
@@ -2846,9 +2855,9 @@ var ss = function t(e) {
2846
2855
  n && (r = n.prototype);
2847
2856
  } else if (e === "%AsyncIteratorPrototype%") {
2848
2857
  var i = t("%AsyncGenerator%");
2849
- i && M && (r = M(i.prototype));
2858
+ i && j && (r = j(i.prototype));
2850
2859
  }
2851
- return Ce[e] = r, r;
2860
+ return Le[e] = r, r;
2852
2861
  }, Br = {
2853
2862
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
2854
2863
  "%ArrayPrototype%": ["Array", "prototype"],
@@ -2901,21 +2910,21 @@ var ss = function t(e) {
2901
2910
  "%URIErrorPrototype%": ["URIError", "prototype"],
2902
2911
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2903
2912
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2904
- }, nt = dr, mt = ts, as = nt.call(Function.call, Array.prototype.concat), us = nt.call(Function.apply, Array.prototype.splice), qr = nt.call(Function.call, String.prototype.replace), bt = nt.call(Function.call, String.prototype.slice), cs = nt.call(Function.call, RegExp.prototype.exec), ls = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ds = /\\(\\)?/g, fs = function(e) {
2913
+ }, nt = fr, mt = rs, us = nt.call(Function.call, Array.prototype.concat), cs = nt.call(Function.apply, Array.prototype.splice), qr = nt.call(Function.call, String.prototype.replace), bt = nt.call(Function.call, String.prototype.slice), ls = nt.call(Function.call, RegExp.prototype.exec), ds = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, fs = /\\(\\)?/g, ps = function(e) {
2905
2914
  var r = bt(e, 0, 1), n = bt(e, -1);
2906
2915
  if (r === "%" && n !== "%")
2907
2916
  throw new Qe("invalid intrinsic syntax, expected closing `%`");
2908
2917
  if (n === "%" && r !== "%")
2909
2918
  throw new Qe("invalid intrinsic syntax, expected opening `%`");
2910
2919
  var i = [];
2911
- return qr(e, ls, function(o, s, a, u) {
2912
- i[i.length] = a ? qr(u, ds, "$1") : s || o;
2920
+ return qr(e, ds, function(o, s, a, u) {
2921
+ i[i.length] = a ? qr(u, fs, "$1") : s || o;
2913
2922
  }), i;
2914
- }, ps = function(e, r) {
2923
+ }, hs = function(e, r) {
2915
2924
  var n = e, i;
2916
- if (mt(Br, n) && (i = Br[n], n = "%" + i[0] + "%"), mt(Ce, n)) {
2917
- var o = Ce[n];
2918
- if (o === Ve && (o = ss(n)), typeof o > "u" && !r)
2925
+ if (mt(Br, n) && (i = Br[n], n = "%" + i[0] + "%"), mt(Le, n)) {
2926
+ var o = Le[n];
2927
+ if (o === $e && (o = as(n)), typeof o > "u" && !r)
2919
2928
  throw new qe("intrinsic " + e + " exists, but is not available. Please file an issue!");
2920
2929
  return {
2921
2930
  alias: i,
@@ -2924,37 +2933,37 @@ var ss = function t(e) {
2924
2933
  };
2925
2934
  }
2926
2935
  throw new Qe("intrinsic " + e + " does not exist!");
2927
- }, Ke = function(e, r) {
2936
+ }, ze = function(e, r) {
2928
2937
  if (typeof e != "string" || e.length === 0)
2929
2938
  throw new qe("intrinsic name must be a non-empty string");
2930
2939
  if (arguments.length > 1 && typeof r != "boolean")
2931
2940
  throw new qe('"allowMissing" argument must be a boolean');
2932
- if (cs(/^%?[^%]*%?$/, e) === null)
2941
+ if (ls(/^%?[^%]*%?$/, e) === null)
2933
2942
  throw new Qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2934
- var n = fs(e), i = n.length > 0 ? n[0] : "", o = ps("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
2935
- d && (i = d[0], us(n, as([0, 1], d)));
2943
+ var n = ps(e), i = n.length > 0 ? n[0] : "", o = hs("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
2944
+ d && (i = d[0], cs(n, us([0, 1], d)));
2936
2945
  for (var c = 1, f = !0; c < n.length; c += 1) {
2937
2946
  var y = n[c], m = bt(y, 0, 1), b = bt(y, -1);
2938
2947
  if ((m === '"' || m === "'" || m === "`" || b === '"' || b === "'" || b === "`") && m !== b)
2939
2948
  throw new Qe("property names with quotes must have matching quotes");
2940
- if ((y === "constructor" || !f) && (u = !0), i += "." + y, s = "%" + i + "%", mt(Ce, s))
2941
- a = Ce[s];
2949
+ if ((y === "constructor" || !f) && (u = !0), i += "." + y, s = "%" + i + "%", mt(Le, s))
2950
+ a = Le[s];
2942
2951
  else if (a != null) {
2943
2952
  if (!(y in a)) {
2944
2953
  if (!r)
2945
2954
  throw new qe("base intrinsic for " + e + " exists, but the property is not available.");
2946
2955
  return;
2947
2956
  }
2948
- if (Oe && c + 1 >= n.length) {
2949
- var w = Oe(a, y);
2950
- f = !!w, f && "get" in w && !("originalValue" in w.get) ? a = w.get : a = a[y];
2957
+ if (Ce && c + 1 >= n.length) {
2958
+ var T = Ce(a, y);
2959
+ f = !!T, f && "get" in T && !("originalValue" in T.get) ? a = T.get : a = a[y];
2951
2960
  } else
2952
2961
  f = mt(a, y), a = a[y];
2953
- f && !u && (Ce[s] = a);
2962
+ f && !u && (Le[s] = a);
2954
2963
  }
2955
2964
  }
2956
2965
  return a;
2957
- }, kn = { exports: {} }, hs = Ke, Jt = hs("%Object.defineProperty%", !0), Yt = function() {
2966
+ }, _n = { exports: {} }, ys = ze, Jt = ys("%Object.defineProperty%", !0), Yt = function() {
2958
2967
  if (Jt)
2959
2968
  try {
2960
2969
  return Jt({}, "a", { value: 1 }), !0;
@@ -2972,33 +2981,33 @@ Yt.hasArrayLengthDefineBug = function() {
2972
2981
  return !0;
2973
2982
  }
2974
2983
  };
2975
- var Pn = Yt, ys = Ke, ft = ys("%Object.getOwnPropertyDescriptor%", !0);
2984
+ var kn = Yt, gs = ze, ft = gs("%Object.getOwnPropertyDescriptor%", !0);
2976
2985
  if (ft)
2977
2986
  try {
2978
2987
  ft([], "length");
2979
2988
  } catch {
2980
2989
  ft = null;
2981
2990
  }
2982
- var fr = ft, gs = Pn(), pr = Ke, Xe = gs && pr("%Object.defineProperty%", !0);
2991
+ var pr = ft, ms = kn(), hr = ze, Xe = ms && hr("%Object.defineProperty%", !0);
2983
2992
  if (Xe)
2984
2993
  try {
2985
2994
  Xe({}, "a", { value: 1 });
2986
2995
  } catch {
2987
2996
  Xe = !1;
2988
2997
  }
2989
- var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e, r, n) {
2998
+ var bs = hr("%SyntaxError%"), Ve = hr("%TypeError%"), Qr = pr, vs = function(e, r, n) {
2990
2999
  if (!e || typeof e != "object" && typeof e != "function")
2991
- throw new Re("`obj` must be an object or a function`");
3000
+ throw new Ve("`obj` must be an object or a function`");
2992
3001
  if (typeof r != "string" && typeof r != "symbol")
2993
- throw new Re("`property` must be a string or a symbol`");
3002
+ throw new Ve("`property` must be a string or a symbol`");
2994
3003
  if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
2995
- throw new Re("`nonEnumerable`, if provided, must be a boolean or null");
3004
+ throw new Ve("`nonEnumerable`, if provided, must be a boolean or null");
2996
3005
  if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
2997
- throw new Re("`nonWritable`, if provided, must be a boolean or null");
3006
+ throw new Ve("`nonWritable`, if provided, must be a boolean or null");
2998
3007
  if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
2999
- throw new Re("`nonConfigurable`, if provided, must be a boolean or null");
3008
+ throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");
3000
3009
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
3001
- throw new Re("`loose`, if provided, must be a boolean");
3010
+ throw new Ve("`loose`, if provided, must be a boolean");
3002
3011
  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 = !!Qr && Qr(e, r);
3003
3012
  if (Xe)
3004
3013
  Xe(e, r, {
@@ -3010,18 +3019,18 @@ var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e,
3010
3019
  else if (a || !i && !o && !s)
3011
3020
  e[r] = n;
3012
3021
  else
3013
- throw new ms("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3014
- }, Fn = Ke, Gr = bs, vs = Pn(), Kr = fr, zr = Fn("%TypeError%"), Ss = Fn("%Math.floor%"), ws = function(e, r) {
3022
+ throw new bs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3023
+ }, Pn = ze, Gr = vs, Ss = kn(), zr = pr, Kr = Pn("%TypeError%"), ws = Pn("%Math.floor%"), As = function(e, r) {
3015
3024
  if (typeof e != "function")
3016
- throw new zr("`fn` is not a function");
3017
- if (typeof r != "number" || r < 0 || r > 4294967295 || Ss(r) !== r)
3018
- throw new zr("`length` must be a positive 32-bit integer");
3025
+ throw new Kr("`fn` is not a function");
3026
+ if (typeof r != "number" || r < 0 || r > 4294967295 || ws(r) !== r)
3027
+ throw new Kr("`length` must be a positive 32-bit integer");
3019
3028
  var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
3020
- if ("length" in e && Kr) {
3021
- var s = Kr(e, "length");
3029
+ if ("length" in e && zr) {
3030
+ var s = zr(e, "length");
3022
3031
  s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
3023
3032
  }
3024
- return (i || o || !n) && (vs ? Gr(
3033
+ return (i || o || !n) && (Ss ? Gr(
3025
3034
  /** @type {Parameters<define>[0]} */
3026
3035
  e,
3027
3036
  "length",
@@ -3036,7 +3045,7 @@ var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e,
3036
3045
  )), e;
3037
3046
  };
3038
3047
  (function(t) {
3039
- var e = dr, r = Ke, n = ws, 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%");
3048
+ var e = fr, r = ze, n = As, 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%");
3040
3049
  if (u)
3041
3050
  try {
3042
3051
  u({}, "a", { value: 1 });
@@ -3057,91 +3066,91 @@ var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e,
3057
3066
  return a(e, o, arguments);
3058
3067
  };
3059
3068
  u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
3060
- })(kn);
3061
- var Nn = kn.exports, Dn = Ke, Rn = Nn, As = Rn(Dn("String.prototype.indexOf")), Vn = function(e, r) {
3062
- var n = Dn(e, !!r);
3063
- return typeof n == "function" && As(e, ".prototype.") > -1 ? Rn(n) : n;
3064
- }, Es = lr(), Is = Vn, Xt = Is("Object.prototype.toString"), _t = function(e) {
3065
- return Es && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : Xt(e) === "[object Arguments]";
3066
- }, $n = function(e) {
3067
- return _t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && Xt(e) !== "[object Array]" && Xt(e.callee) === "[object Function]";
3068
- }, Ts = function() {
3069
- return _t(arguments);
3069
+ })(_n);
3070
+ var Fn = _n.exports, Nn = ze, Dn = Fn, Es = Dn(Nn("String.prototype.indexOf")), Rn = function(e, r) {
3071
+ var n = Nn(e, !!r);
3072
+ return typeof n == "function" && Es(e, ".prototype.") > -1 ? Dn(n) : n;
3073
+ }, Is = dr(), Ts = Rn, Xt = Ts("Object.prototype.toString"), Lt = function(e) {
3074
+ return Is && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : Xt(e) === "[object Arguments]";
3075
+ }, Vn = function(e) {
3076
+ return Lt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && Xt(e) !== "[object Array]" && Xt(e.callee) === "[object Function]";
3077
+ }, Os = function() {
3078
+ return Lt(arguments);
3070
3079
  }();
3071
- _t.isLegacyArguments = $n;
3072
- var Os = Ts ? _t : $n, Cs = Object.prototype.toString, _s = Function.prototype.toString, Ls = /^\s*(?:function)?\*/, jn = lr(), Nt = Object.getPrototypeOf, ks = function() {
3073
- if (!jn)
3080
+ Lt.isLegacyArguments = Vn;
3081
+ var Cs = Os ? Lt : Vn, Ls = Object.prototype.toString, _s = Function.prototype.toString, ks = /^\s*(?:function)?\*/, $n = dr(), Nt = Object.getPrototypeOf, Ps = function() {
3082
+ if (!$n)
3074
3083
  return !1;
3075
3084
  try {
3076
3085
  return Function("return function*() {}")();
3077
3086
  } catch {
3078
3087
  }
3079
- }, Dt, Ps = function(e) {
3088
+ }, Dt, Fs = function(e) {
3080
3089
  if (typeof e != "function")
3081
3090
  return !1;
3082
- if (Ls.test(_s.call(e)))
3091
+ if (ks.test(_s.call(e)))
3083
3092
  return !0;
3084
- if (!jn) {
3085
- var r = Cs.call(e);
3093
+ if (!$n) {
3094
+ var r = Ls.call(e);
3086
3095
  return r === "[object GeneratorFunction]";
3087
3096
  }
3088
3097
  if (!Nt)
3089
3098
  return !1;
3090
3099
  if (typeof Dt > "u") {
3091
- var n = ks();
3100
+ var n = Ps();
3092
3101
  Dt = n ? Nt(n) : !1;
3093
3102
  }
3094
3103
  return Nt(e) === Dt;
3095
- }, Mn = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, Zt, pt;
3096
- if (typeof Ue == "function" && typeof Object.defineProperty == "function")
3104
+ }, jn = Function.prototype.toString, Me = typeof Reflect == "object" && Reflect !== null && Reflect.apply, Zt, pt;
3105
+ if (typeof Me == "function" && typeof Object.defineProperty == "function")
3097
3106
  try {
3098
3107
  Zt = Object.defineProperty({}, "length", {
3099
3108
  get: function() {
3100
3109
  throw pt;
3101
3110
  }
3102
- }), pt = {}, Ue(function() {
3111
+ }), pt = {}, Me(function() {
3103
3112
  throw 42;
3104
3113
  }, null, Zt);
3105
3114
  } catch (t) {
3106
- t !== pt && (Ue = null);
3115
+ t !== pt && (Me = null);
3107
3116
  }
3108
3117
  else
3109
- Ue = null;
3110
- var Fs = /^\s*class\b/, er = function(e) {
3118
+ Me = null;
3119
+ var Ns = /^\s*class\b/, er = function(e) {
3111
3120
  try {
3112
- var r = Mn.call(e);
3113
- return Fs.test(r);
3121
+ var r = jn.call(e);
3122
+ return Ns.test(r);
3114
3123
  } catch {
3115
3124
  return !1;
3116
3125
  }
3117
3126
  }, Rt = function(e) {
3118
3127
  try {
3119
- return er(e) ? !1 : (Mn.call(e), !0);
3128
+ return er(e) ? !1 : (jn.call(e), !0);
3120
3129
  } catch {
3121
3130
  return !1;
3122
3131
  }
3123
- }, ht = Object.prototype.toString, Ns = "[object Object]", Ds = "[object Function]", Rs = "[object GeneratorFunction]", Vs = "[object HTMLAllCollection]", $s = "[object HTML document.all class]", js = "[object HTMLCollection]", Ms = typeof Symbol == "function" && !!Symbol.toStringTag, Us = !(0 in [,]), tr = function() {
3132
+ }, ht = Object.prototype.toString, Ds = "[object Object]", Rs = "[object Function]", Vs = "[object GeneratorFunction]", $s = "[object HTMLAllCollection]", js = "[object HTML document.all class]", Us = "[object HTMLCollection]", Ms = typeof Symbol == "function" && !!Symbol.toStringTag, xs = !(0 in [,]), tr = function() {
3124
3133
  return !1;
3125
3134
  };
3126
3135
  if (typeof document == "object") {
3127
- var xs = document.all;
3128
- ht.call(xs) === ht.call(document.all) && (tr = function(e) {
3129
- if ((Us || !e) && (typeof e > "u" || typeof e == "object"))
3136
+ var Bs = document.all;
3137
+ ht.call(Bs) === ht.call(document.all) && (tr = function(e) {
3138
+ if ((xs || !e) && (typeof e > "u" || typeof e == "object"))
3130
3139
  try {
3131
3140
  var r = ht.call(e);
3132
- return (r === Vs || r === $s || r === js || r === Ns) && e("") == null;
3141
+ return (r === $s || r === js || r === Us || r === Ds) && e("") == null;
3133
3142
  } catch {
3134
3143
  }
3135
3144
  return !1;
3136
3145
  });
3137
3146
  }
3138
- var Bs = Ue ? function(e) {
3147
+ var qs = Me ? function(e) {
3139
3148
  if (tr(e))
3140
3149
  return !0;
3141
3150
  if (!e || typeof e != "function" && typeof e != "object")
3142
3151
  return !1;
3143
3152
  try {
3144
- Ue(e, null, Zt);
3153
+ Me(e, null, Zt);
3145
3154
  } catch (r) {
3146
3155
  if (r !== pt)
3147
3156
  return !1;
@@ -3157,22 +3166,22 @@ var Bs = Ue ? function(e) {
3157
3166
  if (er(e))
3158
3167
  return !1;
3159
3168
  var r = ht.call(e);
3160
- return r !== Ds && r !== Rs && !/^\[object HTML/.test(r) ? !1 : Rt(e);
3161
- }, qs = Bs, Qs = Object.prototype.toString, Un = Object.prototype.hasOwnProperty, Gs = function(e, r, n) {
3169
+ return r !== Rs && r !== Vs && !/^\[object HTML/.test(r) ? !1 : Rt(e);
3170
+ }, Qs = qs, Gs = Object.prototype.toString, Un = Object.prototype.hasOwnProperty, zs = function(e, r, n) {
3162
3171
  for (var i = 0, o = e.length; i < o; i++)
3163
3172
  Un.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3164
3173
  }, Ks = function(e, r, n) {
3165
3174
  for (var i = 0, o = e.length; i < o; i++)
3166
3175
  n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
3167
- }, zs = function(e, r, n) {
3176
+ }, Hs = function(e, r, n) {
3168
3177
  for (var i in e)
3169
3178
  Un.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3170
- }, Hs = function(e, r, n) {
3171
- if (!qs(r))
3179
+ }, Ws = function(e, r, n) {
3180
+ if (!Qs(r))
3172
3181
  throw new TypeError("iterator must be a function");
3173
3182
  var i;
3174
- arguments.length >= 3 && (i = n), Qs.call(e) === "[object Array]" ? Gs(e, r, i) : typeof e == "string" ? Ks(e, r, i) : zs(e, r, i);
3175
- }, Ws = Hs, Vt = [
3183
+ arguments.length >= 3 && (i = n), Gs.call(e) === "[object Array]" ? zs(e, r, i) : typeof e == "string" ? Ks(e, r, i) : Hs(e, r, i);
3184
+ }, Js = Ws, Vt = [
3176
3185
  "BigInt64Array",
3177
3186
  "BigUint64Array",
3178
3187
  "Float32Array",
@@ -3184,17 +3193,17 @@ var Bs = Ue ? function(e) {
3184
3193
  "Uint32Array",
3185
3194
  "Uint8Array",
3186
3195
  "Uint8ClampedArray"
3187
- ], Js = typeof globalThis > "u" ? yn : globalThis, Ys = function() {
3196
+ ], Ys = typeof globalThis > "u" ? hn : globalThis, Xs = function() {
3188
3197
  for (var e = [], r = 0; r < Vt.length; r++)
3189
- typeof Js[Vt[r]] == "function" && (e[e.length] = Vt[r]);
3198
+ typeof Ys[Vt[r]] == "function" && (e[e.length] = Vt[r]);
3190
3199
  return e;
3191
- }, vt = Ws, Xs = Ys, Hr = Nn, hr = Vn, yt = fr, Zs = hr("Object.prototype.toString"), xn = lr(), Wr = typeof globalThis > "u" ? yn : globalThis, rr = Xs(), yr = hr("String.prototype.slice"), $t = Object.getPrototypeOf, ea = hr("Array.prototype.indexOf", !0) || function(e, r) {
3200
+ }, vt = Js, Zs = Xs, Hr = Fn, yr = Rn, yt = pr, ea = yr("Object.prototype.toString"), Mn = dr(), Wr = typeof globalThis > "u" ? hn : globalThis, rr = Zs(), gr = yr("String.prototype.slice"), $t = Object.getPrototypeOf, ta = yr("Array.prototype.indexOf", !0) || function(e, r) {
3192
3201
  for (var n = 0; n < e.length; n += 1)
3193
3202
  if (e[n] === r)
3194
3203
  return n;
3195
3204
  return -1;
3196
3205
  }, St = { __proto__: null };
3197
- xn && yt && $t ? vt(rr, function(t) {
3206
+ Mn && yt && $t ? vt(rr, function(t) {
3198
3207
  var e = new Wr[t]();
3199
3208
  if (Symbol.toStringTag in e) {
3200
3209
  var r = $t(e), n = yt(r, Symbol.toStringTag);
@@ -3208,37 +3217,37 @@ xn && yt && $t ? vt(rr, function(t) {
3208
3217
  var e = new Wr[t](), r = e.slice || e.set;
3209
3218
  r && (St["$" + t] = Hr(r));
3210
3219
  });
3211
- var ta = function(e) {
3220
+ var ra = function(e) {
3212
3221
  var r = !1;
3213
3222
  return vt(St, function(n, i) {
3214
3223
  if (!r)
3215
3224
  try {
3216
- "$" + n(e) === i && (r = yr(i, 1));
3225
+ "$" + n(e) === i && (r = gr(i, 1));
3217
3226
  } catch {
3218
3227
  }
3219
3228
  }), r;
3220
- }, ra = function(e) {
3229
+ }, na = function(e) {
3221
3230
  var r = !1;
3222
3231
  return vt(St, function(n, i) {
3223
3232
  if (!r)
3224
3233
  try {
3225
- n(e), r = yr(i, 1);
3234
+ n(e), r = gr(i, 1);
3226
3235
  } catch {
3227
3236
  }
3228
3237
  }), r;
3229
- }, Bn = function(e) {
3238
+ }, xn = function(e) {
3230
3239
  if (!e || typeof e != "object")
3231
3240
  return !1;
3232
- if (!xn) {
3233
- var r = yr(Zs(e), 8, -1);
3234
- return ea(rr, r) > -1 ? r : r !== "Object" ? !1 : ra(e);
3241
+ if (!Mn) {
3242
+ var r = gr(ea(e), 8, -1);
3243
+ return ta(rr, r) > -1 ? r : r !== "Object" ? !1 : na(e);
3235
3244
  }
3236
- return yt ? ta(e) : null;
3237
- }, na = Bn, ia = function(e) {
3238
- return !!na(e);
3245
+ return yt ? ra(e) : null;
3246
+ }, ia = xn, oa = function(e) {
3247
+ return !!ia(e);
3239
3248
  };
3240
3249
  (function(t) {
3241
- var e = Os, r = Ps, n = Bn, i = ia;
3250
+ var e = Cs, r = Fs, n = xn, i = oa;
3242
3251
  function o(h) {
3243
3252
  return h.call.bind(h);
3244
3253
  }
@@ -3247,60 +3256,60 @@ var ta = function(e) {
3247
3256
  var y = o(BigInt.prototype.valueOf);
3248
3257
  if (a)
3249
3258
  var m = o(Symbol.prototype.valueOf);
3250
- function b(h, Wn) {
3259
+ function b(h, Hn) {
3251
3260
  if (typeof h != "object")
3252
3261
  return !1;
3253
3262
  try {
3254
- return Wn(h), !0;
3263
+ return Hn(h), !0;
3255
3264
  } catch {
3256
3265
  return !1;
3257
3266
  }
3258
3267
  }
3259
3268
  t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
3260
- function w(h) {
3269
+ function T(h) {
3261
3270
  return typeof Promise < "u" && h instanceof Promise || h !== null && typeof h == "object" && typeof h.then == "function" && typeof h.catch == "function";
3262
3271
  }
3263
- t.isPromise = w;
3264
- function A(h) {
3272
+ t.isPromise = T;
3273
+ function I(h) {
3265
3274
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(h) : i(h) || p(h);
3266
3275
  }
3267
- t.isArrayBufferView = A;
3268
- function P(h) {
3276
+ t.isArrayBufferView = I;
3277
+ function F(h) {
3269
3278
  return n(h) === "Uint8Array";
3270
3279
  }
3271
- t.isUint8Array = P;
3272
- function V(h) {
3280
+ t.isUint8Array = F;
3281
+ function $(h) {
3273
3282
  return n(h) === "Uint8ClampedArray";
3274
3283
  }
3275
- t.isUint8ClampedArray = V;
3276
- function j(h) {
3284
+ t.isUint8ClampedArray = $;
3285
+ function q(h) {
3277
3286
  return n(h) === "Uint16Array";
3278
3287
  }
3279
- t.isUint16Array = j;
3280
- function K(h) {
3288
+ t.isUint16Array = q;
3289
+ function J(h) {
3281
3290
  return n(h) === "Uint32Array";
3282
3291
  }
3283
- t.isUint32Array = K;
3284
- function L(h) {
3292
+ t.isUint32Array = J;
3293
+ function _(h) {
3285
3294
  return n(h) === "Int8Array";
3286
3295
  }
3287
- t.isInt8Array = L;
3296
+ t.isInt8Array = _;
3288
3297
  function R(h) {
3289
3298
  return n(h) === "Int16Array";
3290
3299
  }
3291
3300
  t.isInt16Array = R;
3292
- function T(h) {
3301
+ function E(h) {
3293
3302
  return n(h) === "Int32Array";
3294
3303
  }
3295
- t.isInt32Array = T;
3296
- function Z(h) {
3304
+ t.isInt32Array = E;
3305
+ function X(h) {
3297
3306
  return n(h) === "Float32Array";
3298
3307
  }
3299
- t.isFloat32Array = Z;
3300
- function ee(h) {
3308
+ t.isFloat32Array = X;
3309
+ function Z(h) {
3301
3310
  return n(h) === "Float64Array";
3302
3311
  }
3303
- t.isFloat64Array = ee;
3312
+ t.isFloat64Array = Z;
3304
3313
  function _e(h) {
3305
3314
  return n(h) === "BigInt64Array";
3306
3315
  }
@@ -3309,14 +3318,14 @@ var ta = function(e) {
3309
3318
  return n(h) === "BigUint64Array";
3310
3319
  }
3311
3320
  t.isBigUint64Array = Se;
3312
- function oe(h) {
3321
+ function se(h) {
3313
3322
  return u(h) === "[object Map]";
3314
3323
  }
3315
- oe.working = typeof Map < "u" && oe(/* @__PURE__ */ new Map());
3316
- function Lt(h) {
3317
- return typeof Map > "u" ? !1 : oe.working ? oe(h) : h instanceof Map;
3324
+ se.working = typeof Map < "u" && se(/* @__PURE__ */ new Map());
3325
+ function _t(h) {
3326
+ return typeof Map > "u" ? !1 : se.working ? se(h) : h instanceof Map;
3318
3327
  }
3319
- t.isMap = Lt;
3328
+ t.isMap = _t;
3320
3329
  function ge(h) {
3321
3330
  return u(h) === "[object Set]";
3322
3331
  }
@@ -3325,28 +3334,28 @@ var ta = function(e) {
3325
3334
  return typeof Set > "u" ? !1 : ge.working ? ge(h) : h instanceof Set;
3326
3335
  }
3327
3336
  t.isSet = He;
3328
- function Le(h) {
3337
+ function ke(h) {
3329
3338
  return u(h) === "[object WeakMap]";
3330
3339
  }
3331
- Le.working = typeof WeakMap < "u" && Le(/* @__PURE__ */ new WeakMap());
3340
+ ke.working = typeof WeakMap < "u" && ke(/* @__PURE__ */ new WeakMap());
3332
3341
  function kt(h) {
3333
- return typeof WeakMap > "u" ? !1 : Le.working ? Le(h) : h instanceof WeakMap;
3342
+ return typeof WeakMap > "u" ? !1 : ke.working ? ke(h) : h instanceof WeakMap;
3334
3343
  }
3335
3344
  t.isWeakMap = kt;
3336
- function ke(h) {
3345
+ function Pe(h) {
3337
3346
  return u(h) === "[object WeakSet]";
3338
3347
  }
3339
- ke.working = typeof WeakSet < "u" && ke(/* @__PURE__ */ new WeakSet());
3340
- function se(h) {
3341
- return ke(h);
3348
+ Pe.working = typeof WeakSet < "u" && Pe(/* @__PURE__ */ new WeakSet());
3349
+ function ae(h) {
3350
+ return Pe(h);
3342
3351
  }
3343
- t.isWeakSet = se;
3344
- function Pe(h) {
3352
+ t.isWeakSet = ae;
3353
+ function Fe(h) {
3345
3354
  return u(h) === "[object ArrayBuffer]";
3346
3355
  }
3347
- Pe.working = typeof ArrayBuffer < "u" && Pe(new ArrayBuffer());
3356
+ Fe.working = typeof ArrayBuffer < "u" && Fe(new ArrayBuffer());
3348
3357
  function it(h) {
3349
- return typeof ArrayBuffer > "u" ? !1 : Pe.working ? Pe(h) : h instanceof ArrayBuffer;
3358
+ return typeof ArrayBuffer > "u" ? !1 : Fe.working ? Fe(h) : h instanceof ArrayBuffer;
3350
3359
  }
3351
3360
  t.isArrayBuffer = it;
3352
3361
  function l(h) {
@@ -3365,22 +3374,22 @@ var ta = function(e) {
3365
3374
  return typeof g > "u" ? !1 : (typeof v.working > "u" && (v.working = v(new g())), v.working ? v(h) : h instanceof g);
3366
3375
  }
3367
3376
  t.isSharedArrayBuffer = C;
3368
- function _(h) {
3377
+ function L(h) {
3369
3378
  return u(h) === "[object AsyncFunction]";
3370
3379
  }
3371
- t.isAsyncFunction = _;
3372
- function E(h) {
3380
+ t.isAsyncFunction = L;
3381
+ function w(h) {
3373
3382
  return u(h) === "[object Map Iterator]";
3374
3383
  }
3375
- t.isMapIterator = E;
3384
+ t.isMapIterator = w;
3376
3385
  function O(h) {
3377
3386
  return u(h) === "[object Set Iterator]";
3378
3387
  }
3379
3388
  t.isSetIterator = O;
3380
- function F(h) {
3389
+ function P(h) {
3381
3390
  return u(h) === "[object Generator]";
3382
3391
  }
3383
- t.isGeneratorObject = F;
3392
+ t.isGeneratorObject = P;
3384
3393
  function G(h) {
3385
3394
  return u(h) === "[object WebAssembly.Module]";
3386
3395
  }
@@ -3393,26 +3402,26 @@ var ta = function(e) {
3393
3402
  return b(h, c);
3394
3403
  }
3395
3404
  t.isStringObject = ot;
3396
- function Fe(h) {
3405
+ function Ne(h) {
3397
3406
  return b(h, f);
3398
3407
  }
3399
- t.isBooleanObject = Fe;
3408
+ t.isBooleanObject = Ne;
3400
3409
  function st(h) {
3401
3410
  return s && b(h, y);
3402
3411
  }
3403
3412
  t.isBigIntObject = st;
3404
- function br(h) {
3413
+ function vr(h) {
3405
3414
  return a && b(h, m);
3406
3415
  }
3407
- t.isSymbolObject = br;
3416
+ t.isSymbolObject = vr;
3408
3417
  function zn(h) {
3409
- return we(h) || ot(h) || Fe(h) || st(h) || br(h);
3418
+ return we(h) || ot(h) || Ne(h) || st(h) || vr(h);
3410
3419
  }
3411
3420
  t.isBoxedPrimitive = zn;
3412
- function Hn(h) {
3421
+ function Kn(h) {
3413
3422
  return typeof Uint8Array < "u" && (it(h) || C(h));
3414
3423
  }
3415
- t.isAnyArrayBuffer = Hn, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(h) {
3424
+ t.isAnyArrayBuffer = Kn, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(h) {
3416
3425
  Object.defineProperty(t, h, {
3417
3426
  enumerable: !1,
3418
3427
  value: function() {
@@ -3420,8 +3429,8 @@ var ta = function(e) {
3420
3429
  }
3421
3430
  });
3422
3431
  });
3423
- })(Cn);
3424
- var oa = function(e) {
3432
+ })(On);
3433
+ var sa = function(e) {
3425
3434
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
3426
3435
  }, nr = { exports: {} };
3427
3436
  typeof Object.create == "function" ? nr.exports = function(e, r) {
@@ -3441,7 +3450,7 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
3441
3450
  n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
3442
3451
  }
3443
3452
  };
3444
- var sa = nr.exports;
3453
+ var aa = nr.exports;
3445
3454
  (function(t) {
3446
3455
  var e = Object.getOwnPropertyDescriptors || function(p) {
3447
3456
  for (var g = Object.keys(p), v = {}, C = 0; C < g.length; C++)
@@ -3449,12 +3458,12 @@ var sa = nr.exports;
3449
3458
  return v;
3450
3459
  }, r = /%[sdj%]/g;
3451
3460
  t.format = function(l) {
3452
- if (!L(l)) {
3461
+ if (!_(l)) {
3453
3462
  for (var p = [], g = 0; g < arguments.length; g++)
3454
3463
  p.push(s(arguments[g]));
3455
3464
  return p.join(" ");
3456
3465
  }
3457
- for (var g = 1, v = arguments, C = v.length, _ = String(l).replace(r, function(O) {
3466
+ for (var g = 1, v = arguments, C = v.length, L = String(l).replace(r, function(O) {
3458
3467
  if (O === "%%")
3459
3468
  return "%";
3460
3469
  if (g >= C)
@@ -3473,9 +3482,9 @@ var sa = nr.exports;
3473
3482
  default:
3474
3483
  return O;
3475
3484
  }
3476
- }), E = v[g]; g < C; E = v[++g])
3477
- V(E) || !ee(E) ? _ += " " + E : _ += " " + s(E);
3478
- return _;
3485
+ }), w = v[g]; g < C; w = v[++g])
3486
+ $(w) || !Z(w) ? L += " " + w : L += " " + s(w);
3487
+ return L;
3479
3488
  }, t.deprecate = function(l, p) {
3480
3489
  if (typeof S < "u" && S.noDeprecation === !0)
3481
3490
  return l;
@@ -3517,7 +3526,7 @@ var sa = nr.exports;
3517
3526
  seen: [],
3518
3527
  stylize: u
3519
3528
  };
3520
- return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), P(p) ? g.showHidden = p : p && t._extend(g, p), 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);
3529
+ return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), F(p) ? g.showHidden = p : p && t._extend(g, p), E(g.showHidden) && (g.showHidden = !1), E(g.depth) && (g.depth = 2), E(g.colors) && (g.colors = !1), E(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = a), c(g, l, g.depth);
3521
3530
  }
3522
3531
  t.inspect = s, s.colors = {
3523
3532
  bold: [1, 22],
@@ -3558,87 +3567,87 @@ var sa = nr.exports;
3558
3567
  }), p;
3559
3568
  }
3560
3569
  function c(l, p, g) {
3561
- if (l.customInspect && p && oe(p.inspect) && // Filter out the util module, it's inspect function is special
3570
+ if (l.customInspect && p && se(p.inspect) && // Filter out the util module, it's inspect function is special
3562
3571
  p.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
3563
3572
  !(p.constructor && p.constructor.prototype === p)) {
3564
3573
  var v = p.inspect(g, l);
3565
- return L(v) || (v = c(l, v, g)), v;
3574
+ return _(v) || (v = c(l, v, g)), v;
3566
3575
  }
3567
3576
  var C = f(l, p);
3568
3577
  if (C)
3569
3578
  return C;
3570
- var _ = Object.keys(p), E = d(_);
3571
- if (l.showHidden && (_ = Object.getOwnPropertyNames(p)), Se(p) && (_.indexOf("message") >= 0 || _.indexOf("description") >= 0))
3579
+ var L = Object.keys(p), w = d(L);
3580
+ if (l.showHidden && (L = Object.getOwnPropertyNames(p)), Se(p) && (L.indexOf("message") >= 0 || L.indexOf("description") >= 0))
3572
3581
  return y(p);
3573
- if (_.length === 0) {
3574
- if (oe(p)) {
3582
+ if (L.length === 0) {
3583
+ if (se(p)) {
3575
3584
  var O = p.name ? ": " + p.name : "";
3576
3585
  return l.stylize("[Function" + O + "]", "special");
3577
3586
  }
3578
- if (Z(p))
3587
+ if (X(p))
3579
3588
  return l.stylize(RegExp.prototype.toString.call(p), "regexp");
3580
3589
  if (_e(p))
3581
3590
  return l.stylize(Date.prototype.toString.call(p), "date");
3582
3591
  if (Se(p))
3583
3592
  return y(p);
3584
3593
  }
3585
- var F = "", G = !1, we = ["{", "}"];
3586
- if (A(p) && (G = !0, we = ["[", "]"]), oe(p)) {
3594
+ var P = "", G = !1, we = ["{", "}"];
3595
+ if (I(p) && (G = !0, we = ["[", "]"]), se(p)) {
3587
3596
  var ot = p.name ? ": " + p.name : "";
3588
- F = " [Function" + ot + "]";
3597
+ P = " [Function" + ot + "]";
3589
3598
  }
3590
- if (Z(p) && (F = " " + RegExp.prototype.toString.call(p)), _e(p) && (F = " " + Date.prototype.toUTCString.call(p)), Se(p) && (F = " " + y(p)), _.length === 0 && (!G || p.length == 0))
3591
- return we[0] + F + we[1];
3599
+ if (X(p) && (P = " " + RegExp.prototype.toString.call(p)), _e(p) && (P = " " + Date.prototype.toUTCString.call(p)), Se(p) && (P = " " + y(p)), L.length === 0 && (!G || p.length == 0))
3600
+ return we[0] + P + we[1];
3592
3601
  if (g < 0)
3593
- return Z(p) ? l.stylize(RegExp.prototype.toString.call(p), "regexp") : l.stylize("[Object]", "special");
3602
+ return X(p) ? l.stylize(RegExp.prototype.toString.call(p), "regexp") : l.stylize("[Object]", "special");
3594
3603
  l.seen.push(p);
3595
- var Fe;
3596
- return G ? Fe = m(l, p, g, E, _) : Fe = _.map(function(st) {
3597
- return b(l, p, g, E, st, G);
3598
- }), l.seen.pop(), w(Fe, F, we);
3604
+ var Ne;
3605
+ return G ? Ne = m(l, p, g, w, L) : Ne = L.map(function(st) {
3606
+ return b(l, p, g, w, st, G);
3607
+ }), l.seen.pop(), T(Ne, P, we);
3599
3608
  }
3600
3609
  function f(l, p) {
3601
- if (T(p))
3610
+ if (E(p))
3602
3611
  return l.stylize("undefined", "undefined");
3603
- if (L(p)) {
3612
+ if (_(p)) {
3604
3613
  var g = "'" + JSON.stringify(p).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
3605
3614
  return l.stylize(g, "string");
3606
3615
  }
3607
- if (K(p))
3616
+ if (J(p))
3608
3617
  return l.stylize("" + p, "number");
3609
- if (P(p))
3618
+ if (F(p))
3610
3619
  return l.stylize("" + p, "boolean");
3611
- if (V(p))
3620
+ if ($(p))
3612
3621
  return l.stylize("null", "null");
3613
3622
  }
3614
3623
  function y(l) {
3615
3624
  return "[" + Error.prototype.toString.call(l) + "]";
3616
3625
  }
3617
3626
  function m(l, p, g, v, C) {
3618
- for (var _ = [], E = 0, O = p.length; E < O; ++E)
3619
- ke(p, String(E)) ? _.push(b(
3627
+ for (var L = [], w = 0, O = p.length; w < O; ++w)
3628
+ Pe(p, String(w)) ? L.push(b(
3620
3629
  l,
3621
3630
  p,
3622
3631
  g,
3623
3632
  v,
3624
- String(E),
3633
+ String(w),
3625
3634
  !0
3626
- )) : _.push("");
3627
- return C.forEach(function(F) {
3628
- F.match(/^\d+$/) || _.push(b(
3635
+ )) : L.push("");
3636
+ return C.forEach(function(P) {
3637
+ P.match(/^\d+$/) || L.push(b(
3629
3638
  l,
3630
3639
  p,
3631
3640
  g,
3632
3641
  v,
3633
- F,
3642
+ P,
3634
3643
  !0
3635
3644
  ));
3636
- }), _;
3645
+ }), L;
3637
3646
  }
3638
- function b(l, p, g, v, C, _) {
3639
- var E, O, F;
3640
- if (F = Object.getOwnPropertyDescriptor(p, C) || { value: p[C] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), ke(v, C) || (E = "[" + 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(`
3641
- `) > -1 && (_ ? O = O.split(`
3647
+ function b(l, p, g, v, C, L) {
3648
+ var w, O, P;
3649
+ if (P = Object.getOwnPropertyDescriptor(p, C) || { value: p[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 ? ($(g) ? O = c(l, P.value, null) : O = c(l, P.value, g - 1), O.indexOf(`
3650
+ `) > -1 && (L ? O = O.split(`
3642
3651
  `).map(function(G) {
3643
3652
  return " " + G;
3644
3653
  }).join(`
@@ -3647,87 +3656,87 @@ var sa = nr.exports;
3647
3656
  `).map(function(G) {
3648
3657
  return " " + G;
3649
3658
  }).join(`
3650
- `))) : O = l.stylize("[Circular]", "special")), T(E)) {
3651
- if (_ && C.match(/^\d+$/))
3659
+ `))) : O = l.stylize("[Circular]", "special")), E(w)) {
3660
+ if (L && C.match(/^\d+$/))
3652
3661
  return O;
3653
- E = JSON.stringify("" + C), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E = l.stylize(E, "name")) : (E = E.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), E = l.stylize(E, "string"));
3662
+ 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"));
3654
3663
  }
3655
- return E + ": " + O;
3664
+ return w + ": " + O;
3656
3665
  }
3657
- function w(l, p, g) {
3658
- var v = l.reduce(function(C, _) {
3659
- return _.indexOf(`
3660
- `) >= 0, C + _.replace(/\u001b\[\d\d?m/g, "").length + 1;
3666
+ function T(l, p, g) {
3667
+ var v = l.reduce(function(C, L) {
3668
+ return L.indexOf(`
3669
+ `) >= 0, C + L.replace(/\u001b\[\d\d?m/g, "").length + 1;
3661
3670
  }, 0);
3662
3671
  return v > 60 ? g[0] + (p === "" ? "" : p + `
3663
3672
  `) + " " + l.join(`,
3664
3673
  `) + " " + g[1] : g[0] + p + " " + l.join(", ") + " " + g[1];
3665
3674
  }
3666
- t.types = Cn;
3667
- function A(l) {
3675
+ t.types = On;
3676
+ function I(l) {
3668
3677
  return Array.isArray(l);
3669
3678
  }
3670
- t.isArray = A;
3671
- function P(l) {
3679
+ t.isArray = I;
3680
+ function F(l) {
3672
3681
  return typeof l == "boolean";
3673
3682
  }
3674
- t.isBoolean = P;
3675
- function V(l) {
3683
+ t.isBoolean = F;
3684
+ function $(l) {
3676
3685
  return l === null;
3677
3686
  }
3678
- t.isNull = V;
3679
- function j(l) {
3687
+ t.isNull = $;
3688
+ function q(l) {
3680
3689
  return l == null;
3681
3690
  }
3682
- t.isNullOrUndefined = j;
3683
- function K(l) {
3691
+ t.isNullOrUndefined = q;
3692
+ function J(l) {
3684
3693
  return typeof l == "number";
3685
3694
  }
3686
- t.isNumber = K;
3687
- function L(l) {
3695
+ t.isNumber = J;
3696
+ function _(l) {
3688
3697
  return typeof l == "string";
3689
3698
  }
3690
- t.isString = L;
3699
+ t.isString = _;
3691
3700
  function R(l) {
3692
3701
  return typeof l == "symbol";
3693
3702
  }
3694
3703
  t.isSymbol = R;
3695
- function T(l) {
3704
+ function E(l) {
3696
3705
  return l === void 0;
3697
3706
  }
3698
- t.isUndefined = T;
3699
- function Z(l) {
3700
- return ee(l) && ge(l) === "[object RegExp]";
3707
+ t.isUndefined = E;
3708
+ function X(l) {
3709
+ return Z(l) && ge(l) === "[object RegExp]";
3701
3710
  }
3702
- t.isRegExp = Z, t.types.isRegExp = Z;
3703
- function ee(l) {
3711
+ t.isRegExp = X, t.types.isRegExp = X;
3712
+ function Z(l) {
3704
3713
  return typeof l == "object" && l !== null;
3705
3714
  }
3706
- t.isObject = ee;
3715
+ t.isObject = Z;
3707
3716
  function _e(l) {
3708
- return ee(l) && ge(l) === "[object Date]";
3717
+ return Z(l) && ge(l) === "[object Date]";
3709
3718
  }
3710
3719
  t.isDate = _e, t.types.isDate = _e;
3711
3720
  function Se(l) {
3712
- return ee(l) && (ge(l) === "[object Error]" || l instanceof Error);
3721
+ return Z(l) && (ge(l) === "[object Error]" || l instanceof Error);
3713
3722
  }
3714
3723
  t.isError = Se, t.types.isNativeError = Se;
3715
- function oe(l) {
3724
+ function se(l) {
3716
3725
  return typeof l == "function";
3717
3726
  }
3718
- t.isFunction = oe;
3719
- function Lt(l) {
3727
+ t.isFunction = se;
3728
+ function _t(l) {
3720
3729
  return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
3721
3730
  typeof l > "u";
3722
3731
  }
3723
- t.isPrimitive = Lt, t.isBuffer = oa;
3732
+ t.isPrimitive = _t, t.isBuffer = sa;
3724
3733
  function ge(l) {
3725
3734
  return Object.prototype.toString.call(l);
3726
3735
  }
3727
3736
  function He(l) {
3728
3737
  return l < 10 ? "0" + l.toString(10) : l.toString(10);
3729
3738
  }
3730
- var Le = [
3739
+ var ke = [
3731
3740
  "Jan",
3732
3741
  "Feb",
3733
3742
  "Mar",
@@ -3747,29 +3756,29 @@ var sa = nr.exports;
3747
3756
  He(l.getMinutes()),
3748
3757
  He(l.getSeconds())
3749
3758
  ].join(":");
3750
- return [l.getDate(), Le[l.getMonth()], p].join(" ");
3759
+ return [l.getDate(), ke[l.getMonth()], p].join(" ");
3751
3760
  }
3752
3761
  t.log = function() {
3753
3762
  console.log("%s - %s", kt(), t.format.apply(t, arguments));
3754
- }, t.inherits = sa, t._extend = function(l, p) {
3755
- if (!p || !ee(p))
3763
+ }, t.inherits = aa, t._extend = function(l, p) {
3764
+ if (!p || !Z(p))
3756
3765
  return l;
3757
3766
  for (var g = Object.keys(p), v = g.length; v--; )
3758
3767
  l[g[v]] = p[g[v]];
3759
3768
  return l;
3760
3769
  };
3761
- function ke(l, p) {
3770
+ function Pe(l, p) {
3762
3771
  return Object.prototype.hasOwnProperty.call(l, p);
3763
3772
  }
3764
- var se = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
3773
+ var ae = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
3765
3774
  t.promisify = function(p) {
3766
3775
  if (typeof p != "function")
3767
3776
  throw new TypeError('The "original" argument must be of type Function');
3768
- if (se && p[se]) {
3769
- var g = p[se];
3777
+ if (ae && p[ae]) {
3778
+ var g = p[ae];
3770
3779
  if (typeof g != "function")
3771
3780
  throw new TypeError('The "util.promisify.custom" argument must be of type Function');
3772
- return Object.defineProperty(g, se, {
3781
+ return Object.defineProperty(g, ae, {
3773
3782
  value: g,
3774
3783
  enumerable: !1,
3775
3784
  writable: !1,
@@ -3777,21 +3786,21 @@ var sa = nr.exports;
3777
3786
  }), g;
3778
3787
  }
3779
3788
  function g() {
3780
- for (var v, C, _ = new Promise(function(F, G) {
3781
- v = F, C = G;
3782
- }), E = [], O = 0; O < arguments.length; O++)
3783
- E.push(arguments[O]);
3784
- E.push(function(F, G) {
3785
- F ? C(F) : v(G);
3789
+ for (var v, C, L = new Promise(function(P, G) {
3790
+ v = P, C = G;
3791
+ }), w = [], O = 0; O < arguments.length; O++)
3792
+ w.push(arguments[O]);
3793
+ w.push(function(P, G) {
3794
+ P ? C(P) : v(G);
3786
3795
  });
3787
3796
  try {
3788
- p.apply(this, E);
3789
- } catch (F) {
3790
- C(F);
3797
+ p.apply(this, w);
3798
+ } catch (P) {
3799
+ C(P);
3791
3800
  }
3792
- return _;
3801
+ return L;
3793
3802
  }
3794
- return Object.setPrototypeOf(g, Object.getPrototypeOf(p)), se && Object.defineProperty(g, se, {
3803
+ return Object.setPrototypeOf(g, Object.getPrototypeOf(p)), ae && Object.defineProperty(g, ae, {
3795
3804
  value: g,
3796
3805
  enumerable: !1,
3797
3806
  writable: !1,
@@ -3800,8 +3809,8 @@ var sa = nr.exports;
3800
3809
  g,
3801
3810
  e(p)
3802
3811
  );
3803
- }, t.promisify.custom = se;
3804
- function Pe(l, p) {
3812
+ }, t.promisify.custom = ae;
3813
+ function Fe(l, p) {
3805
3814
  if (!l) {
3806
3815
  var g = new Error("Promise was rejected with a falsy value");
3807
3816
  g.reason = l, l = g;
@@ -3817,15 +3826,15 @@ var sa = nr.exports;
3817
3826
  var C = g.pop();
3818
3827
  if (typeof C != "function")
3819
3828
  throw new TypeError("The last argument must be of type Function");
3820
- var _ = this, E = function() {
3821
- return C.apply(_, arguments);
3829
+ var L = this, w = function() {
3830
+ return C.apply(L, arguments);
3822
3831
  };
3823
3832
  l.apply(this, g).then(
3824
3833
  function(O) {
3825
- S.nextTick(E.bind(null, null, O));
3834
+ S.nextTick(w.bind(null, null, O));
3826
3835
  },
3827
3836
  function(O) {
3828
- S.nextTick(Pe.bind(null, O, E));
3837
+ S.nextTick(Fe.bind(null, O, w));
3829
3838
  }
3830
3839
  );
3831
3840
  }
@@ -3836,7 +3845,7 @@ var sa = nr.exports;
3836
3845
  }
3837
3846
  t.callbackify = it;
3838
3847
  })(Ct);
3839
- const { inherits: aa, format: jt } = Ct;
3848
+ const { inherits: ua, format: jt } = Ct;
3840
3849
  function Ae(t, e, r = Error) {
3841
3850
  if (!t)
3842
3851
  throw new Error("Avvio error code must not be empty");
@@ -3849,9 +3858,9 @@ function Ae(t, e, r = Error) {
3849
3858
  }
3850
3859
  return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
3851
3860
  return `${this.name} [${this.code}]: ${this.message}`;
3852
- }, aa(n, r), n;
3861
+ }, ua(n, r), n;
3853
3862
  }
3854
- var qn = {
3863
+ var Bn = {
3855
3864
  createError: Ae,
3856
3865
  AVV_ERR_EXPOSE_ALREADY_DEFINED: Ae(
3857
3866
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
@@ -3877,7 +3886,7 @@ var qn = {
3877
3886
  "AVV_ERR_READY_TIMEOUT",
3878
3887
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
3879
3888
  )
3880
- }, ua = function t(e, r, n) {
3889
+ }, ca = function t(e, r, n) {
3881
3890
  r === void 0 && (r = ""), n || (n = {});
3882
3891
  var i = function(u) {
3883
3892
  var d = {
@@ -3899,12 +3908,12 @@ var qn = {
3899
3908
  return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, y, n).slice(r.length + 2);
3900
3909
  }).join("");
3901
3910
  };
3902
- const ca = ua, Jr = Symbol("avvio.TimeTree.untrackNode"), Mt = Symbol("avvio.TimeTree.trackNode"), Yr = Symbol("avvio.TimeTree.getParent"), Xr = Symbol("avvio.TimeTree.getNode"), Zr = Symbol("avvio.TimeTree.addNode");
3903
- let la = class {
3911
+ const la = ca, Jr = Symbol("avvio.TimeTree.untrackNode"), Ut = Symbol("avvio.TimeTree.trackNode"), Yr = Symbol("avvio.TimeTree.getParent"), Xr = Symbol("avvio.TimeTree.getNode"), Zr = Symbol("avvio.TimeTree.addNode");
3912
+ let da = class {
3904
3913
  constructor() {
3905
3914
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
3906
3915
  }
3907
- [Mt](e) {
3916
+ [Ut](e) {
3908
3917
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
3909
3918
  }
3910
3919
  [Jr](e) {
@@ -3932,7 +3941,7 @@ let la = class {
3932
3941
  label: r,
3933
3942
  start: n,
3934
3943
  nodes: []
3935
- }, this[Mt](this.root), this.root.id;
3944
+ }, this[Ut](this.root), this.root.id;
3936
3945
  const o = this[Yr](e), s = `${r}-${Math.random()}`, a = {
3937
3946
  id: s,
3938
3947
  parent: e,
@@ -3940,7 +3949,7 @@ let la = class {
3940
3949
  label: r,
3941
3950
  nodes: []
3942
3951
  };
3943
- return o.nodes.push(a), this[Mt](a), s;
3952
+ return o.nodes.push(a), this[Ut](a), s;
3944
3953
  }
3945
3954
  start(e, r, n = Date.now()) {
3946
3955
  return this[Zr](e, r, n);
@@ -3954,16 +3963,16 @@ let la = class {
3954
3963
  }
3955
3964
  prittyPrint() {
3956
3965
  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());
3957
- return ca(r);
3966
+ return la(r);
3958
3967
  }
3959
3968
  };
3960
- var da = la, gr = { exports: {} }, ir = { exports: {} }, Ut, en;
3961
- function fa() {
3969
+ var fa = da, mr = { exports: {} }, ir = { exports: {} }, Mt, en;
3970
+ function pa() {
3962
3971
  if (en)
3963
- return Ut;
3972
+ return Mt;
3964
3973
  en = 1;
3965
3974
  var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
3966
- Ut = function(c, f) {
3975
+ Mt = function(c, f) {
3967
3976
  f = f || {};
3968
3977
  var y = typeof c;
3969
3978
  if (y === "string" && c.length > 0)
@@ -4038,10 +4047,10 @@ function fa() {
4038
4047
  var b = f >= y * 1.5;
4039
4048
  return Math.round(c / y) + " " + m + (b ? "s" : "");
4040
4049
  }
4041
- return Ut;
4050
+ return Mt;
4042
4051
  }
4043
- function pa(t) {
4044
- r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = fa(), r.destroy = d, Object.keys(t).forEach((c) => {
4052
+ function ha(t) {
4053
+ r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = pa(), r.destroy = d, Object.keys(t).forEach((c) => {
4045
4054
  r[c] = t[c];
4046
4055
  }), r.names = [], r.skips = [], r.formatters = {};
4047
4056
  function e(c) {
@@ -4053,32 +4062,32 @@ function pa(t) {
4053
4062
  r.selectColor = e;
4054
4063
  function r(c) {
4055
4064
  let f, y = null, m, b;
4056
- function w(...A) {
4057
- if (!w.enabled)
4065
+ function T(...I) {
4066
+ if (!T.enabled)
4058
4067
  return;
4059
- const P = w, V = Number(/* @__PURE__ */ new Date()), j = V - (f || V);
4060
- P.diff = j, P.prev = f, P.curr = V, f = V, A[0] = r.coerce(A[0]), typeof A[0] != "string" && A.unshift("%O");
4061
- let K = 0;
4062
- A[0] = A[0].replace(/%([a-zA-Z%])/g, (R, T) => {
4068
+ const F = T, $ = Number(/* @__PURE__ */ new Date()), q = $ - (f || $);
4069
+ F.diff = q, F.prev = f, F.curr = $, f = $, I[0] = r.coerce(I[0]), typeof I[0] != "string" && I.unshift("%O");
4070
+ let J = 0;
4071
+ I[0] = I[0].replace(/%([a-zA-Z%])/g, (R, E) => {
4063
4072
  if (R === "%%")
4064
4073
  return "%";
4065
- K++;
4066
- const Z = r.formatters[T];
4067
- if (typeof Z == "function") {
4068
- const ee = A[K];
4069
- R = Z.call(P, ee), A.splice(K, 1), K--;
4074
+ J++;
4075
+ const X = r.formatters[E];
4076
+ if (typeof X == "function") {
4077
+ const Z = I[J];
4078
+ R = X.call(F, Z), I.splice(J, 1), J--;
4070
4079
  }
4071
4080
  return R;
4072
- }), r.formatArgs.call(P, A), (P.log || r.log).apply(P, A);
4081
+ }), r.formatArgs.call(F, I), (F.log || r.log).apply(F, I);
4073
4082
  }
4074
- return w.namespace = c, w.useColors = r.useColors(), w.color = r.selectColor(c), w.extend = n, w.destroy = r.destroy, Object.defineProperty(w, "enabled", {
4083
+ return T.namespace = c, T.useColors = r.useColors(), T.color = r.selectColor(c), T.extend = n, T.destroy = r.destroy, Object.defineProperty(T, "enabled", {
4075
4084
  enumerable: !0,
4076
4085
  configurable: !1,
4077
4086
  get: () => y !== null ? y : (m !== r.namespaces && (m = r.namespaces, b = r.enabled(c)), b),
4078
- set: (A) => {
4079
- y = A;
4087
+ set: (I) => {
4088
+ y = I;
4080
4089
  }
4081
- }), typeof r.init == "function" && r.init(w), w;
4090
+ }), typeof r.init == "function" && r.init(T), T;
4082
4091
  }
4083
4092
  function n(c, f) {
4084
4093
  const y = r(this.namespace + (typeof f > "u" ? ":" : f) + c);
@@ -4121,7 +4130,7 @@ function pa(t) {
4121
4130
  }
4122
4131
  return r.enable(r.load()), r;
4123
4132
  }
4124
- var ha = pa;
4133
+ var ya = ha;
4125
4134
  (function(t, e) {
4126
4135
  e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
4127
4136
  let u = !1;
@@ -4245,7 +4254,7 @@ var ha = pa;
4245
4254
  } catch {
4246
4255
  }
4247
4256
  }
4248
- t.exports = ha(e);
4257
+ t.exports = ya(e);
4249
4258
  const { formatters: a } = t.exports;
4250
4259
  a.j = function(u) {
4251
4260
  try {
@@ -4255,23 +4264,23 @@ var ha = pa;
4255
4264
  }
4256
4265
  };
4257
4266
  })(ir, ir.exports);
4258
- var Qn = ir.exports;
4259
- const ya = mn, ga = On.EventEmitter, ma = Ct.inherits, U = Qn("avvio"), { AVV_ERR_READY_TIMEOUT: ba } = qn, xt = Symbol.for("plugin-meta");
4260
- function va(t, e) {
4267
+ var qn = ir.exports;
4268
+ const ga = gn, ma = Tn.EventEmitter, ba = Ct.inherits, U = qn("avvio"), { AVV_ERR_READY_TIMEOUT: va } = Bn, xt = Symbol.for("plugin-meta");
4269
+ function Sa(t, e) {
4261
4270
  return t[xt] && t[xt].name ? t[xt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4262
4271
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
4263
4272
  }
4264
- function Sa() {
4273
+ function wa() {
4265
4274
  const t = {};
4266
4275
  return t.promise = new Promise((e, r) => {
4267
4276
  t.resolve = e, t.reject = r;
4268
4277
  }), t;
4269
4278
  }
4270
- function ze(t, e, r, n, i) {
4271
- 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 = va(e, r), this.isAfter = n, this.q = ya(t, wa, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4279
+ function Ke(t, e, r, n, i) {
4280
+ 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 = Sa(e, r), this.isAfter = n, this.q = ga(t, Aa, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4272
4281
  }
4273
- ma(ze, ga);
4274
- ze.prototype.exec = function(t, e) {
4282
+ ba(Ke, ma);
4283
+ Ke.prototype.exec = function(t, e) {
4275
4284
  const r = this.func;
4276
4285
  let n = !1;
4277
4286
  const i = this.name;
@@ -4298,7 +4307,7 @@ ze.prototype.exec = function(t, e) {
4298
4307
  };
4299
4308
  this.timeout > 0 && (U("setting up timeout", i, this.timeout), o = setTimeout(function() {
4300
4309
  U("timed out", i), o = null;
4301
- const u = new ba(i);
4310
+ const u = new va(i);
4302
4311
  u.fn = r, s(u);
4303
4312
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4304
4313
  const a = r(this.server, this.opts, s);
@@ -4307,7 +4316,7 @@ ze.prototype.exec = function(t, e) {
4307
4316
  (u) => S.nextTick(s, u)
4308
4317
  ));
4309
4318
  };
4310
- ze.prototype.loadedSoFar = function() {
4319
+ Ke.prototype.loadedSoFar = function() {
4311
4320
  if (this.loaded)
4312
4321
  return Promise.resolve();
4313
4322
  const t = () => {
@@ -4316,12 +4325,12 @@ ze.prototype.loadedSoFar = function() {
4316
4325
  }), this.q.resume();
4317
4326
  };
4318
4327
  let e;
4319
- return this._promise ? e = Promise.resolve() : (this._promise = Sa(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4328
+ return this._promise ? e = Promise.resolve() : (this._promise = wa(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4320
4329
  };
4321
- ze.prototype.enqueue = function(t, e) {
4330
+ Ke.prototype.enqueue = function(t, e) {
4322
4331
  U("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
4323
4332
  };
4324
- ze.prototype.finish = function(t, e) {
4333
+ Ke.prototype.finish = function(t, e) {
4325
4334
  U("finish", this.name, t);
4326
4335
  const r = () => {
4327
4336
  this.loaded || (U("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
@@ -4341,19 +4350,19 @@ ze.prototype.finish = function(t, e) {
4341
4350
  r();
4342
4351
  else
4343
4352
  U("delayed", this.name), this.q.drain = () => {
4344
- U("drain", this.name), this.q.drain = Aa, queueMicrotask(n);
4353
+ U("drain", this.name), this.q.drain = Ea, queueMicrotask(n);
4345
4354
  };
4346
4355
  };
4347
4356
  queueMicrotask(n), this.q.resume();
4348
4357
  };
4349
- function wa(t, e) {
4358
+ function Aa(t, e) {
4350
4359
  const r = this;
4351
- S.nextTick(mr.bind(r), t, e);
4360
+ S.nextTick(br.bind(r), t, e);
4352
4361
  }
4353
- function mr(t, e) {
4362
+ function br(t, e) {
4354
4363
  if (typeof t.func.then == "function") {
4355
4364
  t.func.then((n) => {
4356
- typeof n.default == "function" && (n = n.default), t.func = n, mr.call(this, t, e);
4365
+ typeof n.default == "function" && (n = n.default), t.func = n, br.call(this, t, e);
4357
4366
  }, e);
4358
4367
  return;
4359
4368
  }
@@ -4364,19 +4373,19 @@ function mr(t, e) {
4364
4373
  });
4365
4374
  });
4366
4375
  }
4367
- function Aa() {
4376
+ function Ea() {
4368
4377
  }
4369
- gr.exports = ze;
4370
- gr.exports.loadPlugin = mr;
4371
- var Ea = gr.exports;
4372
- const tn = mn, Ia = On.EventEmitter, Ta = Ct.inherits, {
4378
+ mr.exports = Ke;
4379
+ mr.exports.loadPlugin = br;
4380
+ var Ia = mr.exports;
4381
+ const tn = gn, Ta = Tn.EventEmitter, Oa = Ct.inherits, {
4373
4382
  AVV_ERR_EXPOSE_ALREADY_DEFINED: Bt,
4374
4383
  AVV_ERR_CALLBACK_NOT_FN: Ze,
4375
- AVV_ERR_PLUGIN_NOT_VALID: Oa,
4376
- AVV_ERR_ROOT_PLG_BOOTED: Ca,
4384
+ AVV_ERR_PLUGIN_NOT_VALID: Ca,
4385
+ AVV_ERR_ROOT_PLG_BOOTED: La,
4377
4386
  AVV_ERR_READY_TIMEOUT: _a
4378
- } = qn, La = da, or = Ea, Ge = Qn("avvio"), wt = Symbol("kAvvio"), qt = Symbol("kThenifyDoNotWrap");
4379
- function ka(t, e, r) {
4387
+ } = Bn, ka = fa, or = Ia, Ge = qn("avvio"), wt = Symbol("kAvvio"), qt = Symbol("kThenifyDoNotWrap");
4388
+ function Pa(t, e, r) {
4380
4389
  const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
4381
4390
  if (t[i])
4382
4391
  throw new Bt(i);
@@ -4386,7 +4395,7 @@ function ka(t, e, r) {
4386
4395
  throw new Bt(s);
4387
4396
  t[i] = function(d, c) {
4388
4397
  return r.use(d, c), this;
4389
- }, Object.defineProperty(t, "then", { get: Gn.bind(r) }), t[wt] = !0, t[o] = function(d) {
4398
+ }, Object.defineProperty(t, "then", { get: Qn.bind(r) }), t[wt] = !0, t[o] = function(d) {
4390
4399
  return typeof d != "function" ? r._loadRegistered() : (r.after(Qt(d, this)), this);
4391
4400
  }, t[s] = function(d) {
4392
4401
  if (d && typeof d != "function")
@@ -4395,23 +4404,23 @@ function ka(t, e, r) {
4395
4404
  }, t[a] = function(d) {
4396
4405
  if (typeof d != "function")
4397
4406
  throw new Ze(a, typeof d);
4398
- return r.onClose(Ra(d, this)), this;
4407
+ return r.onClose(Va(d, this)), this;
4399
4408
  }, t[u] = function(d) {
4400
4409
  if (d && typeof d != "function")
4401
4410
  throw new Ze(u, typeof d);
4402
4411
  return d ? (r.close(Qt(d, this)), this) : r.close();
4403
4412
  };
4404
4413
  }
4405
- function B(t, e, r) {
4406
- if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof B)) {
4407
- const n = new B(t, e, r);
4408
- return t && ka(t, e, n), n;
4414
+ function x(t, e, r) {
4415
+ if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
4416
+ const n = new x(t, e, r);
4417
+ return t && Pa(t, e, n), n;
4409
4418
  }
4410
- 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 La(), this._readyQ = tn(this, Kn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
4419
+ 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 ka(), this._readyQ = tn(this, Gn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
4411
4420
  this.emit("start"), this._readyQ.drain = rn;
4412
- }, this._closeQ = tn(this, Da, 1), this._closeQ.pause(), this._closeQ.drain = () => {
4421
+ }, this._closeQ = tn(this, Ra, 1), this._closeQ.pause(), this._closeQ.drain = () => {
4413
4422
  this.emit("close"), this._closeQ.drain = rn;
4414
- }, this._doStart = null, this._root = new or(this, Pa.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
4423
+ }, this._doStart = null, this._root = new or(this, Fa.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
4415
4424
  const s = this.pluginTree.start(null, i, o);
4416
4425
  this._root.once("loaded", (a, u, d) => {
4417
4426
  this.pluginTree.stop(s, d);
@@ -4431,33 +4440,33 @@ function B(t, e, r) {
4431
4440
  this._readyQ.resume();
4432
4441
  });
4433
4442
  }
4434
- function Pa(t, e, r) {
4443
+ function Fa(t, e, r) {
4435
4444
  this._doStart = r, e.autostart && this.start();
4436
4445
  }
4437
- Ta(B, Ia);
4438
- B.prototype.start = function() {
4446
+ Oa(x, Ta);
4447
+ x.prototype.start = function() {
4439
4448
  return this.started = !0, S.nextTick(this._doStart), this;
4440
4449
  };
4441
- B.prototype.override = function(t, e, r) {
4450
+ x.prototype.override = function(t, e, r) {
4442
4451
  return t;
4443
4452
  };
4444
- function Fa(t) {
4453
+ function Na(t) {
4445
4454
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
4446
- throw new Oa(typeof t);
4455
+ throw new Ca(typeof t);
4447
4456
  return t;
4448
4457
  }
4449
- B.prototype[wt] = !0;
4450
- B.prototype.use = function(t, e) {
4458
+ x.prototype[wt] = !0;
4459
+ x.prototype.use = function(t, e) {
4451
4460
  return this._lastUsed = this._addPlugin(t, e, !1), this;
4452
4461
  };
4453
- B.prototype._loadRegistered = function() {
4462
+ x.prototype._loadRegistered = function() {
4454
4463
  const t = this._current[0];
4455
4464
  return !this.started && !this.booted && S.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4456
4465
  };
4457
- Object.defineProperty(B.prototype, "then", { get: Gn });
4458
- B.prototype._addPlugin = function(t, e, r) {
4459
- if (t = Fa(t), e = e || {}, this.booted)
4460
- throw new Ca();
4466
+ Object.defineProperty(x.prototype, "then", { get: Qn });
4467
+ x.prototype._addPlugin = function(t, e, r) {
4468
+ if (t = Na(t), e = e || {}, this.booted)
4469
+ throw new La();
4461
4470
  const n = this._current[0], i = new or(this, t, e, r);
4462
4471
  if (i.once("start", (o, s, a) => {
4463
4472
  const u = this.pluginTree.start(n.name, s, a);
@@ -4470,16 +4479,16 @@ B.prototype._addPlugin = function(t, e, r) {
4470
4479
  o && (this._error = o);
4471
4480
  }), i;
4472
4481
  };
4473
- B.prototype.after = function(t) {
4482
+ x.prototype.after = function(t) {
4474
4483
  if (!t)
4475
4484
  return this._loadRegistered();
4476
4485
  this._addPlugin(e.bind(this), {}, !0);
4477
4486
  function e(r, n, i) {
4478
- Kn.call(this, t, i);
4487
+ Gn.call(this, t, i);
4479
4488
  }
4480
4489
  return this;
4481
4490
  };
4482
- B.prototype.onClose = function(t) {
4491
+ x.prototype.onClose = function(t) {
4483
4492
  if (typeof t != "function")
4484
4493
  throw new Error("not a function");
4485
4494
  t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
@@ -4488,7 +4497,7 @@ B.prototype.onClose = function(t) {
4488
4497
  }
4489
4498
  return this;
4490
4499
  };
4491
- B.prototype.close = function(t) {
4500
+ x.prototype.close = function(t) {
4492
4501
  let e;
4493
4502
  if (t) {
4494
4503
  if (typeof t != "function")
@@ -4505,7 +4514,7 @@ B.prototype.close = function(t) {
4505
4514
  this._error = null, this._closeQ.push(t), S.nextTick(this._closeQ.resume.bind(this._closeQ));
4506
4515
  }), e;
4507
4516
  };
4508
- B.prototype.ready = function(t) {
4517
+ x.prototype.ready = function(t) {
4509
4518
  if (t) {
4510
4519
  if (typeof t != "function")
4511
4520
  throw new Ze("ready", typeof t);
@@ -4520,15 +4529,15 @@ B.prototype.ready = function(t) {
4520
4529
  }
4521
4530
  });
4522
4531
  };
4523
- B.prototype.prettyPrint = function() {
4532
+ x.prototype.prettyPrint = function() {
4524
4533
  return this.pluginTree.prittyPrint();
4525
4534
  };
4526
- B.prototype.toJSON = function() {
4535
+ x.prototype.toJSON = function() {
4527
4536
  return this.pluginTree.toJSON();
4528
4537
  };
4529
4538
  function rn() {
4530
4539
  }
4531
- function Gn() {
4540
+ function Qn() {
4532
4541
  if (this.booted) {
4533
4542
  Ge("thenify returning null because we are already booted");
4534
4543
  return;
@@ -4539,7 +4548,7 @@ function Gn() {
4539
4548
  }
4540
4549
  return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[qt] = !0, t(this._server)), e);
4541
4550
  }
4542
- function Kn(t, e) {
4551
+ function Gn(t, e) {
4543
4552
  const r = this._server, n = this._error;
4544
4553
  let i;
4545
4554
  if (this._error = null, t.length === 0)
@@ -4552,9 +4561,9 @@ function Kn(t, e) {
4552
4561
  };
4553
4562
  t.length === 2 ? t(n, o) : t(n, r, o);
4554
4563
  } else
4555
- Na.call(this, t, n, r, e);
4564
+ Da.call(this, t, n, r, e);
4556
4565
  }
4557
- function Na(t, e, r, n) {
4566
+ function Da(t, e, r, n) {
4558
4567
  const i = t.name;
4559
4568
  Ge("setting up ready timeout", i, this._timeout);
4560
4569
  let o = setTimeout(() => {
@@ -4567,7 +4576,7 @@ function Na(t, e, r, n) {
4567
4576
  o && (clearTimeout(o), this._error = a, n(this._error));
4568
4577
  }
4569
4578
  }
4570
- function Da(t, e) {
4579
+ function Ra(t, e) {
4571
4580
  const r = this._server, n = t[this._isOnCloseHandlerKey];
4572
4581
  if (t.length === 0 || t.length === 1) {
4573
4582
  let i;
@@ -4578,7 +4587,7 @@ function Da(t, e) {
4578
4587
  } else
4579
4588
  t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
4580
4589
  }
4581
- function Ra(t, e) {
4590
+ function Va(t, e) {
4582
4591
  return r.bind(e);
4583
4592
  function r(n, i) {
4584
4593
  let o;
@@ -4600,16 +4609,16 @@ function Qt(t, e) {
4600
4609
  }, i) : S.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : S.nextTick(i);
4601
4610
  }
4602
4611
  }
4603
- ar.exports = B;
4604
- ar.exports.express = function(t) {
4605
- return B(t, {
4612
+ ur.exports = x;
4613
+ ur.exports.express = function(t) {
4614
+ return x(t, {
4606
4615
  expose: {
4607
4616
  use: "load"
4608
4617
  }
4609
4618
  });
4610
4619
  };
4611
- var Va = ar.exports;
4612
- const $a = /* @__PURE__ */ Co(Va);
4620
+ var $a = ur.exports;
4621
+ const ja = /* @__PURE__ */ Lo($a);
4613
4622
  (function() {
4614
4623
  if (window.requestAnimationFrame && window.cancelAnimationFrame)
4615
4624
  return;
@@ -4627,10 +4636,10 @@ const $a = /* @__PURE__ */ Co(Va);
4627
4636
  }, window.cancelAnimationFrame = clearTimeout;
4628
4637
  }
4629
4638
  })();
4630
- function au(t, e = !0, r = !0, n) {
4639
+ function uu(t, e = !0, r = !0, n) {
4631
4640
  console.log("start sdk");
4632
- 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 = $a(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4633
- return s.use(so), s.use(to, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(oo, { videoPlayerController: n?.videoPlayerController }), s.use(_i, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Ni), s.use(io), s.use(bo), s.use(zi), s.use(Oo), s.after((a, u, d) => {
4641
+ 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 = ja(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4642
+ return s.use(so), s.use(to, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(oo, { videoPlayerController: n?.videoPlayerController }), s.use(Ci, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Fi), s.use(io), s.use(vo), s.use(zi), s.use(Co), s.after((a, u, d) => {
4634
4643
  if (a)
4635
4644
  throw a;
4636
4645
  u.ready(), d();
@@ -4643,5 +4652,5 @@ function au(t, e = !0, r = !0, n) {
4643
4652
  }), s;
4644
4653
  }
4645
4654
  export {
4646
- au as StreamLayer
4655
+ uu as StreamLayer
4647
4656
  };