@streamlayer/sdk-web 1.5.4 → 1.5.5

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.
Files changed (3) hide show
  1. package/lib/cjs/index.js +7 -7
  2. package/lib/es/index.js +1181 -1158
  3. package/package.json +11 -11
package/lib/es/index.js CHANGED
@@ -1,90 +1,90 @@
1
- import { pino as gi } from "pino";
2
- import { QuestionType as _, QuestionStatus as Y, NotificationEnabled as Dr, SilenceSetting as bi, PromotionType as Te } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
1
+ import { pino as bi } from "pino";
2
+ import { QuestionType as _, QuestionStatus as Y, PromotionType as re, NotificationEnabled as Rr, SilenceSetting as vi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
3
3
  import { PickHistoryStatus as ct } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
4
4
  import { SdkOverlayType as D } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
5
- import { InvitationCategory as Rr, InvitationFrom as Vr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
- import { computed as vi, map as Si, atom as Ct, batched as $r, onMount as gr } from "nanostores";
7
- import { nanoid as rr } from "nanoid";
8
- import { ConnectError as tt, Code as oe, createContextKey as Mr, createPromiseClient as Br, createContextValues as wi } from "@connectrpc/connect";
9
- import { createGrpcWebTransport as jr } from "@connectrpc/connect-web";
5
+ import { InvitationCategory as Vr, InvitationFrom as $r } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
6
+ import { computed as Si, map as wi, atom as Lt, batched as Mr, onMount as br } from "nanostores";
7
+ import { nanoid as nr } from "nanoid";
8
+ import { ConnectError as tt, Code as se, createContextKey as jr, createPromiseClient as Br, createContextValues as Ai } from "@connectrpc/connect";
9
+ import { createGrpcWebTransport as Ur } from "@connectrpc/connect-web";
10
10
  import { nanoquery as qr } from "@nanostores/query";
11
- import { Events as An } from "@streamlayer/sl-eslib/sports/events/events_connect";
11
+ import { Events as En } from "@streamlayer/sl-eslib/sports/events/events_connect";
12
12
  import { Client as nt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
13
- import { Users as br } from "@streamlayer/sl-eslib/users/users_connect";
13
+ import { Users as vr } from "@streamlayer/sl-eslib/users/users_connect";
14
14
  import { Feed as Z } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
15
15
  import { Leaderboard as In } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
16
  import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
17
- import { LinksClient as Ai } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
- import { Kind as Q, TopicSubType as we, TopicType as x, PollOpenedFrom as re, Category as z, ScreenOrientation as Ur } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
- import { AnalyticsService as En } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
- import { InteractionActionType as xr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
- import { NotificationKind as fe, NotificationType as Qr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
17
+ import { LinksClient as Ei } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
18
+ import { Kind as Q, TopicSubType as Ae, TopicType as x, PollOpenedFrom as ne, Category as z, ScreenOrientation as xr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
19
+ import { AnalyticsService as Tn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
20
+ import { InteractionActionType as Qr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
21
+ import { NotificationKind as pe, NotificationType as Gr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
22
22
  function Ii(t) {
23
23
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
24
24
  }
25
- var Tn = { exports: {} }, $ = Tn.exports = {}, se, ae;
26
- function nr() {
25
+ var On = { exports: {} }, $ = On.exports = {}, ae, ue;
26
+ function ir() {
27
27
  throw new Error("setTimeout has not been defined");
28
28
  }
29
- function ir() {
29
+ function or() {
30
30
  throw new Error("clearTimeout has not been defined");
31
31
  }
32
32
  (function() {
33
33
  try {
34
- typeof setTimeout == "function" ? se = setTimeout : se = nr;
34
+ typeof setTimeout == "function" ? ae = setTimeout : ae = ir;
35
35
  } catch {
36
- se = nr;
36
+ ae = ir;
37
37
  }
38
38
  try {
39
- typeof clearTimeout == "function" ? ae = clearTimeout : ae = ir;
39
+ typeof clearTimeout == "function" ? ue = clearTimeout : ue = or;
40
40
  } catch {
41
- ae = ir;
41
+ ue = or;
42
42
  }
43
43
  })();
44
- function On(t) {
45
- if (se === setTimeout)
44
+ function _n(t) {
45
+ if (ae === setTimeout)
46
46
  return setTimeout(t, 0);
47
- if ((se === nr || !se) && setTimeout)
48
- return se = setTimeout, setTimeout(t, 0);
47
+ if ((ae === ir || !ae) && setTimeout)
48
+ return ae = setTimeout, setTimeout(t, 0);
49
49
  try {
50
- return se(t, 0);
50
+ return ae(t, 0);
51
51
  } catch {
52
52
  try {
53
- return se.call(null, t, 0);
53
+ return ae.call(null, t, 0);
54
54
  } catch {
55
- return se.call(this, t, 0);
55
+ return ae.call(this, t, 0);
56
56
  }
57
57
  }
58
58
  }
59
- function Ei(t) {
60
- if (ae === clearTimeout)
59
+ function Ti(t) {
60
+ if (ue === clearTimeout)
61
61
  return clearTimeout(t);
62
- if ((ae === ir || !ae) && clearTimeout)
63
- return ae = clearTimeout, clearTimeout(t);
62
+ if ((ue === or || !ue) && clearTimeout)
63
+ return ue = clearTimeout, clearTimeout(t);
64
64
  try {
65
- return ae(t);
65
+ return ue(t);
66
66
  } catch {
67
67
  try {
68
- return ae.call(null, t);
68
+ return ue.call(null, t);
69
69
  } catch {
70
- return ae.call(this, t);
70
+ return ue.call(this, t);
71
71
  }
72
72
  }
73
73
  }
74
- var ge = [], xe = !1, _e, ft = -1;
75
- function Ti() {
76
- !xe || !_e || (xe = !1, _e.length ? ge = _e.concat(ge) : ft = -1, ge.length && _n());
74
+ var be = [], xe = !1, _e, pt = -1;
75
+ function Oi() {
76
+ !xe || !_e || (xe = !1, _e.length ? be = _e.concat(be) : pt = -1, be.length && Cn());
77
77
  }
78
- function _n() {
78
+ function Cn() {
79
79
  if (!xe) {
80
- var t = On(Ti);
80
+ var t = _n(Oi);
81
81
  xe = !0;
82
- for (var e = ge.length; e; ) {
83
- for (_e = ge, ge = []; ++ft < e; )
84
- _e && _e[ft].run();
85
- ft = -1, e = ge.length;
82
+ for (var e = be.length; e; ) {
83
+ for (_e = be, be = []; ++pt < e; )
84
+ _e && _e[pt].run();
85
+ pt = -1, e = be.length;
86
86
  }
87
- _e = null, xe = !1, Ei(t);
87
+ _e = null, xe = !1, Ti(t);
88
88
  }
89
89
  }
90
90
  $.nextTick = function(t) {
@@ -92,12 +92,12 @@ $.nextTick = function(t) {
92
92
  if (arguments.length > 1)
93
93
  for (var r = 1; r < arguments.length; r++)
94
94
  e[r - 1] = arguments[r];
95
- ge.push(new Cn(t, e)), ge.length === 1 && !xe && On(_n);
95
+ be.push(new Ln(t, e)), be.length === 1 && !xe && _n(Cn);
96
96
  };
97
- function Cn(t, e) {
97
+ function Ln(t, e) {
98
98
  this.fun = t, this.array = e;
99
99
  }
100
- Cn.prototype.run = function() {
100
+ Ln.prototype.run = function() {
101
101
  this.fun.apply(null, this.array);
102
102
  };
103
103
  $.title = "browser";
@@ -106,17 +106,17 @@ $.env = {};
106
106
  $.argv = [];
107
107
  $.version = "";
108
108
  $.versions = {};
109
- function be() {
109
+ function ve() {
110
110
  }
111
- $.on = be;
112
- $.addListener = be;
113
- $.once = be;
114
- $.off = be;
115
- $.removeListener = be;
116
- $.removeAllListeners = be;
117
- $.emit = be;
118
- $.prependListener = be;
119
- $.prependOnceListener = be;
111
+ $.on = ve;
112
+ $.addListener = ve;
113
+ $.once = ve;
114
+ $.off = ve;
115
+ $.removeListener = ve;
116
+ $.removeAllListeners = ve;
117
+ $.emit = ve;
118
+ $.prependListener = ve;
119
+ $.prependOnceListener = ve;
120
120
  $.listeners = function(t) {
121
121
  return [];
122
122
  };
@@ -132,8 +132,8 @@ $.chdir = function(t) {
132
132
  $.umask = function() {
133
133
  return 0;
134
134
  };
135
- var Oi = Tn.exports;
136
- const A = /* @__PURE__ */ Ii(Oi), _i = gi({
135
+ var _i = On.exports;
136
+ const A = /* @__PURE__ */ Ii(_i), Ci = bi({
137
137
  level: "trace",
138
138
  enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
139
139
  browser: {
@@ -141,23 +141,23 @@ const A = /* @__PURE__ */ Ii(Oi), _i = gi({
141
141
  console.log(t);
142
142
  }
143
143
  }
144
- }), ve = (t, e) => _i.child({ name: t }, e);
145
- class Ci extends Event {
144
+ }), Se = (t, e) => Ci.child({ name: t }, e);
145
+ class Li extends Event {
146
146
  slEventBus;
147
147
  constructor(e, r) {
148
148
  super(e), this.slEventBus = r;
149
149
  }
150
150
  }
151
- const Li = ve("event-bus");
152
- class ki {
151
+ const ki = Se("event-bus");
152
+ class Pi {
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 Ci(this.name, { ...r, type: e });
160
- Li.debug(n, "Emitting event"), window.dispatchEvent(n);
159
+ const n = new Li(this.name, { ...r, type: e });
160
+ ki.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,10 +173,10 @@ class ki {
173
173
  }), this.listeners.clear();
174
174
  };
175
175
  }
176
- class Pi {
176
+ class Ni {
177
177
  }
178
178
  window.slStore = /* @__PURE__ */ Object.create(null);
179
- class Lt {
179
+ class kt {
180
180
  /**
181
181
  * store instance (nanostores)
182
182
  */
@@ -192,23 +192,23 @@ class Lt {
192
192
  return this.store;
193
193
  }
194
194
  }
195
- const Ni = (t) => {
195
+ const Fi = (t) => {
196
196
  const e = Object.keys(t);
197
- return vi(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
197
+ return Si(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
198
198
  };
199
- class Ce extends Lt {
199
+ class Ce extends kt {
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 J = (t) => Si(t);
207
- var he;
206
+ const J = (t) => wi(t);
207
+ var ye;
208
208
  (function(t) {
209
209
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
210
- })(he || (he = {}));
211
- const Fi = {
210
+ })(ye || (ye = {}));
211
+ const Di = {
212
212
  [D.BETTING]: "betting",
213
213
  [D.GAMES]: "games",
214
214
  [D.PUBLIC_CHAT]: "publicChat",
@@ -218,7 +218,7 @@ var Xe;
218
218
  (function(t) {
219
219
  t.Ready = "ready", t.Suspended = "suspended";
220
220
  })(Xe || (Xe = {}));
221
- class Ln {
221
+ class kn {
222
222
  status;
223
223
  source;
224
224
  config;
@@ -226,7 +226,7 @@ class Ln {
226
226
  listeners = /* @__PURE__ */ new Set();
227
227
  settingsKey;
228
228
  constructor({ settings: e, ...r }, n) {
229
- this.settingsKey = Fi[r.type], this.status = Ct(Xe.Suspended), this.config = new Ce(J(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(J(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(J({}), `feature:settings:${this.settingsKey}`), this.source = n;
229
+ this.settingsKey = Di[r.type], this.status = Lt(Xe.Suspended), this.config = new Ce(J(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(J(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(J({}), `feature:settings:${this.settingsKey}`), this.source = n;
230
230
  }
231
231
  get featureConfig() {
232
232
  return this.config.getStore();
@@ -257,7 +257,7 @@ class Ln {
257
257
  }
258
258
  };
259
259
  update = (e, r) => {
260
- this.source === he.STREAM && r === he.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
260
+ this.source === ye.STREAM && r === ye.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
261
261
  };
262
262
  fireEvent(e) {
263
263
  for (const r of this.listeners.values())
@@ -268,7 +268,7 @@ class Ln {
268
268
  }
269
269
  }
270
270
  }
271
- class X extends Lt {
271
+ class X extends kt {
272
272
  getValue = () => this.getStore().get();
273
273
  getValues() {
274
274
  throw new Error("not implemented");
@@ -283,11 +283,11 @@ class X extends Lt {
283
283
  return this.getStore().get();
284
284
  }
285
285
  }
286
- const q = (t) => Ct(t);
287
- class ce extends Lt {
286
+ const U = (t) => Lt(t);
287
+ class le extends kt {
288
288
  atomStore;
289
289
  constructor(e, r, n) {
290
- super(e, `api:${r}`), this.atomStore = Ct(), n && e.subscribe((i) => {
290
+ super(e, `api:${r}`), this.atomStore = Lt(), n && e.subscribe((i) => {
291
291
  const o = this.atomStore.get(), s = n(i, o);
292
292
  o !== s && this.atomStore.set(s);
293
293
  });
@@ -315,10 +315,10 @@ class ce extends Lt {
315
315
  key = () => this.getStore().key;
316
316
  off = () => this.getStore().off();
317
317
  }
318
- const G = new ki();
319
- async function* Di(t, e) {
318
+ const G = new Pi();
319
+ async function* Ri(t, e) {
320
320
  for await (const r of e) {
321
- t.response.message = r, t.received_at = Date.now(), t.id = kn++;
321
+ t.response.message = r, t.received_at = Date.now(), t.id = Pn++;
322
322
  const n = {
323
323
  type: "__GRPC_DEVTOOLS_EXTENSION__",
324
324
  data: t
@@ -326,10 +326,10 @@ async function* Di(t, e) {
326
326
  window.postMessage(n), yield r;
327
327
  }
328
328
  }
329
- let kn = 0;
330
- const Ri = () => (t) => async (e) => {
329
+ let Pn = 0;
330
+ const Vi = () => (t) => async (e) => {
331
331
  const r = {
332
- id: kn++,
332
+ id: Pn++,
333
333
  name: e.url,
334
334
  stream: e.stream,
335
335
  sent_at: Date.now(),
@@ -356,7 +356,7 @@ const Ri = () => (t) => async (e) => {
356
356
  };
357
357
  return window.postMessage(i), {
358
358
  ...n,
359
- message: Di(r, n.message)
359
+ message: Ri(r, n.message)
360
360
  };
361
361
  } else {
362
362
  r.response.message = n.message, r.latency = r.received_at - r.sent_at;
@@ -380,7 +380,7 @@ const Ri = () => (t) => async (e) => {
380
380
  }
381
381
  };
382
382
  window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
383
- function Pn(t) {
383
+ function Nn(t) {
384
384
  return t instanceof DOMException && // everything except Firefox
385
385
  (t.code === 22 || // Firefox
386
386
  t.code === 1014 || // test name field too, because code might not be present
@@ -405,7 +405,7 @@ class He {
405
405
  try {
406
406
  this.storage.setItem(n, r);
407
407
  } catch (i) {
408
- Pn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
408
+ Nn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
409
409
  }
410
410
  };
411
411
  read = (...e) => {
@@ -420,7 +420,7 @@ var te;
420
420
  (function(t) {
421
421
  t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
422
422
  })(te || (te = {}));
423
- class Vi {
423
+ class $i {
424
424
  params;
425
425
  streamCancel;
426
426
  method;
@@ -444,7 +444,7 @@ class Vi {
444
444
  reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
445
445
  reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
446
446
  withStore: i.withStore ?? !1
447
- }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(q(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
447
+ }, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new X(U(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
448
448
  this.state.getValue("status") === te.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
449
449
  })), this.updateState(te.Ready);
450
450
  }
@@ -458,7 +458,7 @@ class Vi {
458
458
  window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
459
459
  ` + n);
460
460
  } catch (i) {
461
- Pn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
461
+ Nn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
462
462
  }
463
463
  };
464
464
  addListener = (e, r) => this.listeners.has(e) ? (this.addStateLog(`listener '${e}' not added, already exists`), () => {
@@ -479,7 +479,7 @@ class Vi {
479
479
  for await (const o of i)
480
480
  this.attempt = 0, this.onData(o);
481
481
  } catch (n) {
482
- n instanceof tt && n.code != oe.Canceled && this.onStreamError(n);
482
+ n instanceof tt && n.code != se.Canceled && this.onStreamError(n);
483
483
  }
484
484
  })(), this.updateState(te.Connected);
485
485
  };
@@ -519,7 +519,7 @@ class Vi {
519
519
  */
520
520
  onStreamError = (e) => {
521
521
  if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
522
- if (e instanceof tt && e.code !== oe.Canceled) {
522
+ if (e instanceof tt && e.code !== se.Canceled) {
523
523
  this.updateState(te.Failed), this.state.setValue("error", e), this.reconnect();
524
524
  return;
525
525
  }
@@ -527,41 +527,41 @@ class Vi {
527
527
  }
528
528
  };
529
529
  }
530
- const $i = /* @__PURE__ */ new Set([
531
- oe.Unknown,
532
- oe.Internal,
533
- oe.DeadlineExceeded,
534
- oe.ResourceExhausted,
535
- oe.FailedPrecondition,
536
- oe.Unavailable,
537
- oe.DataLoss
538
- ]), Gr = ve("grpc:retry"), Mi = (t) => async (e) => {
539
- const r = e.contextValues.get(or.retryAttempts), n = 300, i = e.contextValues.get(or.retryDelay);
530
+ const Mi = /* @__PURE__ */ new Set([
531
+ se.Unknown,
532
+ se.Internal,
533
+ se.DeadlineExceeded,
534
+ se.ResourceExhausted,
535
+ se.FailedPrecondition,
536
+ se.Unavailable,
537
+ se.DataLoss
538
+ ]), Kr = Se("grpc:retry"), ji = (t) => async (e) => {
539
+ const r = e.contextValues.get(sr.retryAttempts), n = 300, i = e.contextValues.get(sr.retryDelay);
540
540
  if (e.stream || r === 0)
541
541
  return t(e);
542
- Gr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
542
+ Kr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
543
543
  for (let o = 0; ; o++)
544
544
  try {
545
545
  return await t(e);
546
546
  } catch (s) {
547
- Gr.trace({ attempt: o, error: s }, "retry attempt");
547
+ Kr.trace({ attempt: o, error: s }, "retry attempt");
548
548
  const a = tt.from(s);
549
- if (o >= r || !(a instanceof tt) || !$i.has(a.code))
549
+ if (o >= r || !(a instanceof tt) || !Mi.has(a.code))
550
550
  throw s;
551
- const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
552
- await new Promise((c) => setTimeout(c, d));
551
+ const u = Math.min(i, Math.pow(2, o) * n), l = Math.round(u * (1 + Math.random()) / 2);
552
+ await new Promise((c) => setTimeout(c, l));
553
553
  }
554
- }, or = {
555
- retryAttempts: Mr(10, { description: "Number of attempts to retry" }),
556
- retryDelay: Mr(3e4, { description: "Max delay between retries in milliseconds" })
554
+ }, sr = {
555
+ retryAttempts: jr(10, { description: "Number of attempts to retry" }),
556
+ retryDelay: jr(3e4, { description: "Max delay between retries in milliseconds" })
557
557
  }, Bi = () => {
558
558
  const t = localStorage.getItem("sl-device-id");
559
559
  if (t)
560
560
  return t;
561
- const e = rr();
561
+ const e = nr();
562
562
  return localStorage.setItem("sl-device-id", e), e;
563
- }, ji = () => navigator.userAgentData?.platform || navigator.platform;
564
- class Kr {
563
+ }, Ui = () => navigator.userAgentData?.platform || navigator.platform;
564
+ class zr {
565
565
  toJsonOptions = {
566
566
  emitDefaultValues: !1,
567
567
  enumAsInteger: !0,
@@ -582,18 +582,18 @@ class Kr {
582
582
  constructor(e, r) {
583
583
  this.host = e, this.opts = r, this.$headers = new Ce(J({
584
584
  "sl-device-id": Bi(),
585
- "sl-device-os": ji()
585
+ "sl-device-os": Ui()
586
586
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
587
587
  const [n, i, o] = qr({
588
588
  dedupeTime: r?.dedupeTime,
589
589
  refetchInterval: r?.refetchInterval
590
590
  });
591
- this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport = jr({
591
+ this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport = Ur({
592
592
  baseUrl: e,
593
593
  defaultTimeoutMs: 1e4,
594
594
  interceptors: this.interceptors
595
595
  // useBinaryFormat: true,
596
- }), this.streamTransport = jr({
596
+ }), this.streamTransport = Ur({
597
597
  baseUrl: e,
598
598
  interceptors: this.interceptors
599
599
  // useBinaryFormat: true,
@@ -606,7 +606,7 @@ class Kr {
606
606
  const i = this.subscriptions.get(r);
607
607
  if (i)
608
608
  return i;
609
- const o = new Vi(this.$headers, e, r, n);
609
+ const o = new $i(this.$headers, e, r, n);
610
610
  return this.subscriptions.set(r, o), o;
611
611
  };
612
612
  removeSubscription = (e) => {
@@ -650,11 +650,11 @@ class Kr {
650
650
  o.charAt(0).toLowerCase() + o.slice(1),
651
651
  ...Array.isArray(r) ? r : [r]
652
652
  ], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
653
- return { client: i, createRequestOptions: (d) => {
654
- const c = wi();
655
- for (const f in d) {
656
- const p = or[f];
657
- c.set(p, d[f]);
653
+ return { client: i, createRequestOptions: (l) => {
654
+ const c = Ai();
655
+ for (const f in l) {
656
+ const p = sr[f];
657
+ c.set(p, l[f]);
658
658
  }
659
659
  return c;
660
660
  }, queryKey: s, queryKeyStr: a.join("") };
@@ -679,11 +679,11 @@ class Kr {
679
679
  n.header.set(o, i[o]);
680
680
  return r(n);
681
681
  };
682
- this.interceptors.push(e), this.interceptors.push(Ri()), this.opts?.retryable && this.interceptors.push(Mi);
682
+ this.interceptors.push(e), this.interceptors.push(Vi()), this.opts?.retryable && this.interceptors.push(ji);
683
683
  };
684
684
  }
685
685
  const qi = (t, e) => {
686
- const { client: r, queryKey: n } = e.createPromiseClient(An, {
686
+ const { client: r, queryKey: n } = e.createPromiseClient(En, {
687
687
  method: "retrieveEventId",
688
688
  params: [t]
689
689
  });
@@ -700,7 +700,7 @@ const qi = (t, e) => {
700
700
  }
701
701
  }
702
702
  });
703
- }, Ui = (t, e) => {
703
+ }, xi = (t, e) => {
704
704
  const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getStream", params: [t] });
705
705
  return e.nanoquery.createFetcherStore(n, {
706
706
  fetcher: async (i, o, s) => s ? (await r.getStream({
@@ -708,30 +708,30 @@ const qi = (t, e) => {
708
708
  // we are sure that id is a string
709
709
  })).data?.attributes : void 0
710
710
  });
711
- }, xi = (t, e) => {
712
- const { client: r, queryKey: n } = e.createPromiseClient(An, { method: "summary", params: [t] });
711
+ }, Qi = (t, e) => {
712
+ const { client: r, queryKey: n } = e.createPromiseClient(En, { method: "summary", params: [t] });
713
713
  return e.nanoquery.createFetcherStore(n, {
714
714
  fetcher: async (i, o, s) => s ? (await r.summary({
715
715
  id: s
716
716
  })).data?.attributes : void 0
717
717
  });
718
- }, Qi = (t, e) => {
719
- const { queryKey: r, client: n } = e.createPromiseClient(br, { method: "me", params: [t] });
718
+ }, Gi = (t, e) => {
719
+ const { queryKey: r, client: n } = e.createPromiseClient(vr, { method: "me", params: [t] });
720
720
  return e.nanoquery.createFetcherStore(r, {
721
721
  fetcher: async () => {
722
722
  const { data: i } = await n.me({});
723
723
  return { data: i };
724
724
  }
725
725
  });
726
- }, Gi = (t) => {
727
- const { client: e, createRequestOptions: r } = t.createPromiseClient(br, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
726
+ }, Ki = (t) => {
727
+ const { client: e, createRequestOptions: r } = t.createPromiseClient(vr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
728
728
  return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
729
- }, Ki = (t, e) => {
729
+ }, zi = (t, e) => {
730
730
  const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "get", params: [t] });
731
731
  return e.nanoquery.createFetcherStore(n, {
732
732
  fetcher: async () => (await r.get({})).data?.attributes
733
733
  });
734
- }, zi = (t, e) => {
734
+ }, Hi = (t, e) => {
735
735
  const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getOrganization", params: [t] });
736
736
  return e.nanoquery.createFetcherStore(n, {
737
737
  fetcher: async () => {
@@ -742,7 +742,7 @@ const qi = (t, e) => {
742
742
  } : void 0;
743
743
  }
744
744
  });
745
- }, Hi = (t, e) => {
745
+ }, Wi = (t, e) => {
746
746
  const { client: r, queryKey: n } = e.createPromiseClient(nt, {
747
747
  method: "getOrganizationAdvertising",
748
748
  params: [t]
@@ -750,61 +750,61 @@ const qi = (t, e) => {
750
750
  return e.nanoquery.createFetcherStore(n, {
751
751
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
752
752
  });
753
- }, Wi = (t, e, r) => {
754
- t.transport = new Kr(e.host, {
753
+ }, Yi = (t, e, r) => {
754
+ t.transport = new zr(e.host, {
755
755
  dedupeTime: 1e3 * 60 * 5,
756
756
  refetchInterval: 1e3 * 60 * 5,
757
757
  retryable: !0
758
- }), 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) => {
758
+ }), t.analyticsTransport = new zr(e.analyticsHost), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), t.transport.$headers.subscribe((n) => {
759
759
  t.analyticsTransport.$headers.getStore().set(n);
760
760
  }), t.sdk.onMount({ name: "transport" }, () => () => {
761
761
  t.transport.disconnect(), t.analyticsTransport.disconnect();
762
762
  }), r();
763
763
  };
764
- var pe;
764
+ var he;
765
765
  (function(t) {
766
766
  t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
767
- })(pe || (pe = {}));
768
- class je extends He {
767
+ })(he || (he = {}));
768
+ class Be extends He {
769
769
  constructor() {
770
770
  super("user");
771
771
  }
772
772
  // Schema
773
773
  setSchema = (e) => {
774
- this.write(pe.SCHEMA, e);
774
+ this.write(he.SCHEMA, e);
775
775
  };
776
- getSchema = () => this.read(pe.SCHEMA);
776
+ getSchema = () => this.read(he.SCHEMA);
777
777
  // Token
778
778
  setToken = (e) => {
779
- this.write(pe.TOKEN, e);
779
+ this.write(he.TOKEN, e);
780
780
  };
781
- getToken = () => this.read(pe.TOKEN);
781
+ getToken = () => this.read(he.TOKEN);
782
782
  // External Token
783
783
  setExternalToken = (e) => {
784
- this.write(pe.EXTERNAL_TOKEN, e);
784
+ this.write(he.EXTERNAL_TOKEN, e);
785
785
  };
786
- getExternalToken = () => this.read(pe.EXTERNAL_TOKEN);
786
+ getExternalToken = () => this.read(he.EXTERNAL_TOKEN);
787
787
  removeToken = () => {
788
- this.remove(pe.TOKEN);
788
+ this.remove(he.TOKEN);
789
789
  };
790
790
  }
791
- var ye;
791
+ var me;
792
792
  (function(t) {
793
793
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
794
- })(ye || (ye = {}));
795
- const Yi = (t) => {
796
- const e = new je(), r = new X(q(e.getExternalToken()), "userKey"), n = new X(q(e.getToken()), "userToken"), i = new ce(Qi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
794
+ })(me || (me = {}));
795
+ const Ji = (t) => {
796
+ const e = new Be(), r = new X(U(e.getExternalToken()), "userKey"), n = new X(U(e.getToken()), "userToken"), i = new le(Gi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
797
797
  if (!a)
798
- return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
799
- }), o = new ce(Ki(n.getStore(), t), "userSettings");
798
+ return s?.data?.id ? s.data.id : u === !1 ? void 0 : l;
799
+ }), o = new le(zi(n.getStore(), t), "userSettings");
800
800
  return {
801
801
  userKey: r,
802
802
  userToken: n,
803
803
  user: i,
804
804
  userSettings: o
805
805
  };
806
- }, Ji = (t) => {
807
- const e = new X(q(void 0), "providerStreamId"), r = new ce(qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new ce(Ui(r.getAtomStore(), t), "streamSettings"), i = new ce(xi(r.getAtomStore(), t), "streamSettings");
806
+ }, Xi = (t) => {
807
+ const e = new X(U(void 0), "providerStreamId"), r = new le(qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new le(xi(r.getAtomStore(), t), "streamSettings"), i = new le(Qi(r.getAtomStore(), t), "streamSettings");
808
808
  return r.getAtomStore().listen((o) => {
809
809
  (o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
810
810
  }), {
@@ -813,8 +813,8 @@ const Yi = (t) => {
813
813
  streamSettings: n,
814
814
  streamSummary: i
815
815
  };
816
- }, Xi = (t) => {
817
- const e = new X(q(void 0), "enabled"), r = new X(q(ye.DISABLED), "status"), n = new ce(zi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Hi(n.getAtomStore(), t), "organizationAdvertising"), o = Yi(t), s = Ji(t);
816
+ }, Zi = (t) => {
817
+ const e = new X(U(void 0), "enabled"), r = new X(U(me.DISABLED), "status"), n = new le(Hi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new le(Wi(n.getAtomStore(), t), "organizationAdvertising"), o = Ji(t), s = Xi(t);
818
818
  return {
819
819
  enabled: e,
820
820
  status: r,
@@ -830,10 +830,10 @@ const Yi = (t) => {
830
830
  organizationAdvertising: i
831
831
  };
832
832
  };
833
- class Zi extends Lt {
833
+ class eo extends kt {
834
834
  stores;
835
835
  constructor(e) {
836
- const r = Xi(e), n = Ni(r);
836
+ const r = Zi(e), n = Fi(r);
837
837
  super(n, "core"), this.stores = r;
838
838
  }
839
839
  getValue() {
@@ -854,18 +854,18 @@ class Zi extends Lt {
854
854
  };
855
855
  unsubscribe = () => this.getStore().off();
856
856
  }
857
- const eo = (t, e, r) => {
858
- t.store = new Zi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
857
+ const to = (t, e, r) => {
858
+ t.store = new eo(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
859
859
  t.store.unsubscribe();
860
860
  }, r();
861
- }, to = (t) => {
861
+ }, ro = (t) => {
862
862
  const { client: e } = t.createPromiseClient(In, { method: "list" });
863
863
  return (r) => e.list(r);
864
- }, Nn = (t) => {
864
+ }, Fn = (t) => {
865
865
  const { client: e } = t.createPromiseClient(In, { method: "summary" });
866
866
  return (r) => e.summary(r);
867
- }, ro = (t, e) => {
868
- const { client: r, queryKey: n } = e.createPromiseClient(br, {
867
+ }, no = (t, e) => {
868
+ const { client: r, queryKey: n } = e.createPromiseClient(vr, {
869
869
  method: "getFriends",
870
870
  params: [t]
871
871
  });
@@ -880,7 +880,7 @@ const eo = (t, e, r) => {
880
880
  }
881
881
  }
882
882
  });
883
- }, no = (t, e) => {
883
+ }, io = (t, e) => {
884
884
  const { client: r, queryKey: n } = e.createPromiseClient(Z, { method: "get", params: [t] });
885
885
  return e.nanoquery.createFetcherStore(n, {
886
886
  fetcher: async (i, o, s) => (await r.get({
@@ -889,7 +889,7 @@ const eo = (t, e, r) => {
889
889
  refetchInterval: 0,
890
890
  dedupeTime: 1e3 * 60 * 60
891
891
  });
892
- }, io = (t, e) => {
892
+ }, oo = (t, e) => {
893
893
  const { client: r, queryKey: n } = e.createPromiseClient(Z, { method: "syncQuestion", params: [t] });
894
894
  return e.nanoquery.createFetcherStore(n, {
895
895
  fetcher: async (i, o, s) => {
@@ -907,25 +907,25 @@ const eo = (t, e, r) => {
907
907
  // 10 minutes
908
908
  refetchInterval: 0
909
909
  });
910
- }, oo = async (t, e) => {
910
+ }, so = async (t, e) => {
911
911
  const { client: r } = e.createPromiseClient(Z, { method: "item", params: [t] });
912
912
  return (await r.item({
913
913
  id: t
914
914
  })).data;
915
- }, so = (t, e) => {
916
- const { client: r } = e.createStreamClient(Z), n = Ct({ eventId: t.get() || "", feedId: "" });
915
+ }, ao = (t, e) => {
916
+ const { client: r } = e.createStreamClient(Z), n = Lt({ eventId: t.get() || "", feedId: "" });
917
917
  return t.subscribe((o = "") => {
918
918
  n.set({ eventId: o, feedId: "" });
919
919
  }), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
920
- }, ao = (t, e) => {
920
+ }, uo = (t, e) => {
921
921
  const { client: r } = e.createStreamClient(Z);
922
922
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
923
- }, uo = async (t, e) => {
923
+ }, co = async (t, e) => {
924
924
  const { client: r } = e.createPromiseClient(Z, { method: "questionByUser", params: [t] });
925
925
  return (await r.questionByUser({
926
926
  questionId: t
927
927
  })).data?.attributes?.question;
928
- }, sr = (t, e) => {
928
+ }, ar = (t, e) => {
929
929
  const { client: r, queryKey: n } = e.createPromiseClient(Z, { method: "questionByUser", params: [t] });
930
930
  return e.nanoquery.createFetcherStore(n, {
931
931
  fetcher: async (i, o, s) => (await r.questionByUser({
@@ -933,7 +933,7 @@ const eo = (t, e, r) => {
933
933
  })).data?.attributes?.question,
934
934
  dedupeTime: 1e3 * 60 * 5
935
935
  });
936
- }, Fn = async (t, e) => {
936
+ }, Dn = async (t, e) => {
937
937
  if (!t)
938
938
  return;
939
939
  const { client: r } = e.createPromiseClient(Z, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
@@ -943,7 +943,7 @@ const eo = (t, e, r) => {
943
943
  return;
944
944
  const { options: i, notification: o, ...s } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
945
945
  return { id: s.id, question: s, promotion: a, notification: o };
946
- }, co = (t, e, r) => {
946
+ }, lo = (t, e, r) => {
947
947
  const { client: n, queryKey: i } = r.createPromiseClient(Z, {
948
948
  method: "list",
949
949
  params: [t, e]
@@ -959,7 +959,7 @@ const eo = (t, e, r) => {
959
959
  dedupeTime: 0,
960
960
  refetchInterval: 0
961
961
  });
962
- }, lo = (t, e) => {
962
+ }, fo = (t, e) => {
963
963
  const { client: r, queryKey: n } = e.createPromiseClient(Z, {
964
964
  method: "list",
965
965
  params: [t]
@@ -980,21 +980,21 @@ const eo = (t, e, r) => {
980
980
  }
981
981
  })).data?.[0];
982
982
  if (u.type === "promotion")
983
- return Fn(u.id, e);
983
+ return Dn(u.id, e);
984
984
  },
985
985
  dedupeTime: 0,
986
986
  refetchInterval: 0
987
987
  });
988
- }, fo = (t, e, r) => {
989
- const n = $r([e, r], () => {
988
+ }, po = (t, e, r) => {
989
+ const n = Mr([e, r], () => {
990
990
  const a = e.get();
991
991
  if (!a)
992
992
  return;
993
- const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
994
- return u ? (u.openedFrom = d, u) : a.question;
995
- }), i = $r(n, (a) => a && a.type === "question" ? a.id : void 0), o = sr(i, t);
993
+ const u = r.get().data?.find((c) => c.id === a?.questionId), l = a?.question?.openedFrom;
994
+ return u ? (u.openedFrom = l, u) : a.question;
995
+ }), i = Mr(n, (a) => a && a.type === "question" ? a.id : void 0), o = ar(i, t);
996
996
  return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
997
- const u = o.get().data, d = (c, f) => {
997
+ const u = o.get().data, l = (c, f) => {
998
998
  if (!c || !f)
999
999
  return c || f || [];
1000
1000
  const p = [];
@@ -1013,24 +1013,24 @@ const eo = (t, e, r) => {
1013
1013
  options: u?.options,
1014
1014
  subject: u?.subject,
1015
1015
  appearance: u?.appearance,
1016
- answers: d(u?.answers, a?.answers)
1016
+ answers: l(u?.answers, a?.answers)
1017
1017
  });
1018
1018
  } };
1019
1019
  };
1020
- var vt;
1020
+ var St;
1021
1021
  (function(t) {
1022
1022
  t.SHOWED = "showed";
1023
- })(vt || (vt = {}));
1024
- class po extends He {
1023
+ })(St || (St = {}));
1024
+ class ho extends He {
1025
1025
  constructor() {
1026
1026
  super("advertisement");
1027
1027
  }
1028
1028
  setShowed = (e) => {
1029
- this.write(vt.SHOWED, e, "true");
1029
+ this.write(St.SHOWED, e, "true");
1030
1030
  };
1031
- isViewed = (e) => this.read(vt.SHOWED, e);
1031
+ isViewed = (e) => this.read(St.SHOWED, e);
1032
1032
  }
1033
- const ho = (t) => {
1033
+ const yo = (t) => {
1034
1034
  const e = t.data?.attributes?.question;
1035
1035
  if ((t.data?.attributes?.feedItem?.type === "promotion" ? t.data.attributes.feedItem : void 0) === void 0 || !e)
1036
1036
  return;
@@ -1041,40 +1041,55 @@ const ho = (t) => {
1041
1041
  notification: i,
1042
1042
  promotion: s
1043
1043
  };
1044
- }, yo = (t, e, r) => {
1044
+ }, lt = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, mo = ({ gamOptions: t, gamBaseUrl: e }) => {
1045
+ const r = `${e}?`, n = [];
1046
+ for (const i in t) {
1047
+ const o = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), s = t[i];
1048
+ if (s)
1049
+ if (typeof s == "string")
1050
+ n.push(`${o}=${lt(s)}`);
1051
+ else if (Array.isArray(s))
1052
+ n.push(`${o}=${s.map(lt).join(",")}`);
1053
+ else {
1054
+ const a = Object.entries(s).map(([u, l]) => Array.isArray(l) ? `${u}=${l.map(lt).join(",")}` : typeof l == "string" ? `${u}=${lt(l)}` : `${u}=${l}`).join("&").replaceAll("=", "%3D").replaceAll("&", "%26").replaceAll(",", "%2C");
1055
+ n.push(`${o}=${a}`);
1056
+ }
1057
+ }
1058
+ return r + n.join("&");
1059
+ }, go = (t, e, r) => {
1045
1060
  let n = !1;
1046
- const i = r.transport, o = ve("advertisement"), s = new po(), a = J({}), u = lo(t, i), d = () => {
1061
+ const i = r.transport, o = Se("advertisement"), s = new ho(), a = J({}), u = fo(t, i), l = () => {
1047
1062
  a.setKey("hasNotification", !1);
1048
- const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type;
1049
- g && G.emit("advertisement", {
1063
+ const g = a.get(), b = g.data?.question.id, S = g.data?.promotion?.type;
1064
+ b && G.emit("advertisement", {
1050
1065
  action: "notification-opened",
1051
1066
  payload: {
1052
- id: g,
1067
+ id: b,
1053
1068
  type: S
1054
1069
  }
1055
1070
  });
1056
1071
  }, c = () => {
1057
- const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type, C = a.get()?.isOpened;
1058
- g && !C && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), G.emit("advertisement", {
1072
+ const g = a.get(), b = g.data?.question.id, S = g.data?.promotion?.type, C = a.get()?.isOpened;
1073
+ b && !C && (o.debug({ id: b }, "markAsViewed: %o"), s.setShowed(b), a.setKey("isOpened", !0), G.emit("advertisement", {
1059
1074
  action: "opened",
1060
1075
  payload: {
1061
- id: g,
1076
+ id: b,
1062
1077
  type: S
1063
1078
  }
1064
1079
  }));
1065
- }, f = (b, g) => {
1066
- g ? a.set({
1080
+ }, f = (g, b) => {
1081
+ b ? a.set({
1067
1082
  loading: !1,
1068
1083
  error: void 0,
1069
- data: g,
1070
- hasNotification: g?.notification?.enabled === Dr.NOTIFICATION_ENABLED,
1071
- close: () => p(g.question.id),
1072
- isViewed: !!s.isViewed(g.question.id)
1073
- }) : (a.setKey("loading", !0), Fn(b, i).then((S) => a.set({
1084
+ data: b,
1085
+ hasNotification: b?.notification?.enabled === Rr.NOTIFICATION_ENABLED,
1086
+ close: () => p(b.question.id),
1087
+ isViewed: !!s.isViewed(b.question.id)
1088
+ }) : (a.setKey("loading", !0), Dn(g, i).then((S) => a.set({
1074
1089
  loading: !1,
1075
1090
  error: void 0,
1076
1091
  data: S,
1077
- hasNotification: S?.notification?.enabled === Dr.NOTIFICATION_ENABLED,
1092
+ hasNotification: S?.notification?.enabled === Rr.NOTIFICATION_ENABLED,
1078
1093
  close: () => p(S?.question.id),
1079
1094
  isViewed: S && !!s.isViewed(S.question.id)
1080
1095
  })).catch((S) => a.set({
@@ -1083,53 +1098,57 @@ const ho = (t) => {
1083
1098
  data: void 0
1084
1099
  })));
1085
1100
  };
1086
- a.subscribe((b, g) => {
1087
- b.data && !b.isOpened && G.emit("advertisement", {
1101
+ a.subscribe((g, b) => {
1102
+ if (g.data?.promotion?.type === re.EXTERNAL_AD && !g?.externalAd && g.data.promotion.adCampaigns?.gamOptions && g.data.promotion.adCampaigns?.gamBaseUrl) {
1103
+ const S = mo(g.data.promotion.adCampaigns);
1104
+ a.setKey("externalAd", { type: "gam", url: S });
1105
+ }
1106
+ g.data?.promotion && !g.isOpened && G.emit("advertisement", {
1088
1107
  action: "received",
1089
- payload: {
1090
- id: b.data.question.id,
1091
- type: b.data?.promotion?.type,
1092
- hasNotification: !!b.hasNotification,
1093
- isViewed: !!s.isViewed(b.data.question.id)
1094
- },
1095
- skipAnalytics: b.data.question.id === g?.data?.question.id
1096
- }), !b?.data && g?.data && G.emit("advertisement", {
1097
- action: "closed",
1098
1108
  payload: {
1099
1109
  id: g.data.question.id,
1100
- type: g.data.promotion?.type,
1110
+ type: g.data.promotion.type,
1101
1111
  hasNotification: !!g.hasNotification,
1102
1112
  isViewed: !!s.isViewed(g.data.question.id)
1113
+ },
1114
+ skipAnalytics: g.data.question.id === b?.data?.question.id
1115
+ }), !g?.data && b?.data && G.emit("advertisement", {
1116
+ action: "closed",
1117
+ payload: {
1118
+ id: b.data.question.id,
1119
+ type: b.data.promotion?.type,
1120
+ hasNotification: !!b.hasNotification,
1121
+ isViewed: !!s.isViewed(b.data.question.id)
1103
1122
  }
1104
1123
  });
1105
1124
  });
1106
- const p = (b) => {
1107
- (!b || a.get()?.data?.question.id === b) && a.set({});
1125
+ const p = (g) => {
1126
+ (!g || a.get()?.data?.question.id === g) && a.set({});
1108
1127
  };
1109
1128
  return { connect: () => {
1110
- n || (n = !0, u.subscribe((b, g) => {
1111
- b.data && (!g?.data || b.data.id !== g.data.id) && f(b.data.question.id, b.data);
1112
- }), e.addListener("promotion", (b) => {
1113
- const g = ho(b);
1114
- if (g) {
1115
- if (g.question.status === Y.RESOLVED) {
1116
- p(g.question.id), o.debug({ promotion: g }, "resolved: %o");
1129
+ n || (n = !0, u.subscribe((g, b) => {
1130
+ g.data && (!b?.data || g.data.id !== b.data.id) && f(g.data.question.id, g.data);
1131
+ }), e.addListener("promotion", (g) => {
1132
+ const b = yo(g);
1133
+ if (b) {
1134
+ if (b.question.status === Y.RESOLVED) {
1135
+ p(b.question.id), o.debug({ promotion: b }, "resolved: %o");
1117
1136
  return;
1118
1137
  }
1119
- if (g.question.status === Y.ACTIVE) {
1120
- o.debug({ promotion: g }, "active: %o"), f(g.question.id, g);
1138
+ if (b.question.status === Y.ACTIVE) {
1139
+ o.debug({ promotion: b }, "active: %o"), f(b.question.id, b);
1121
1140
  return;
1122
1141
  }
1123
- o.debug({ promotion: g }, "skip: %o");
1142
+ o.debug({ promotion: b }, "skip: %o");
1124
1143
  }
1125
1144
  }));
1126
- }, hide: p, show: f, open: d, markAsViewed: c, $store: a };
1145
+ }, hide: p, show: f, open: l, markAsViewed: c, $store: a };
1127
1146
  };
1128
1147
  var Le;
1129
1148
  (function(t) {
1130
1149
  t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
1131
1150
  })(Le || (Le = {}));
1132
- class mo {
1151
+ class bo {
1133
1152
  /** sl event id */
1134
1153
  slStreamId;
1135
1154
  /** organization id */
@@ -1162,11 +1181,11 @@ class mo {
1162
1181
  transport;
1163
1182
  cancels = /* @__PURE__ */ new Set();
1164
1183
  constructor(e) {
1165
- 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 X(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(q(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(no(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(co(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = io(this.slStreamId, e.transport), this.openedQuestion = fo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1166
- this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = ao(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
1184
+ this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new X(U(void 0), "moderationId").getStore(), this.interactiveAllowed = new X(U(Le.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new X(U(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new le(io(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new le(lo(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = oo(this.slStreamId, e.transport), this.openedQuestion = po(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
1185
+ this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = uo(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
1167
1186
  this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
1168
1187
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1169
- })), this.feedSubscription = so(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1188
+ })), this.feedSubscription = ao(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1170
1189
  const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
1171
1190
  if (!(!i || i.type === _.PROMOTION)) {
1172
1191
  if (i.status === Y.RESOLVED) {
@@ -1209,7 +1228,7 @@ class mo {
1209
1228
  this.activeQuestionId.off();
1210
1229
  for (const r of this.cancels)
1211
1230
  r(), this.cancels.delete(r);
1212
- }), this.advertisement = yo(this.slStreamId, this.feedSubscription, e);
1231
+ }), this.advertisement = go(this.slStreamId, this.feedSubscription, e);
1213
1232
  }
1214
1233
  /**
1215
1234
  * Get id for notifications and link with current session
@@ -1239,7 +1258,7 @@ class mo {
1239
1258
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1240
1259
  };
1241
1260
  }
1242
- class go {
1261
+ class vo {
1243
1262
  notificationsList;
1244
1263
  store;
1245
1264
  timeouts;
@@ -1248,7 +1267,7 @@ class go {
1248
1267
  options;
1249
1268
  logger;
1250
1269
  constructor(e) {
1251
- 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.notificationsList = q(/* @__PURE__ */ new Map());
1270
+ this.options = e, this.logger = Se("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = U(/* @__PURE__ */ new Map());
1252
1271
  }
1253
1272
  addToQueue = (e) => {
1254
1273
  if (this.store.has(e.id)) {
@@ -1333,31 +1352,31 @@ class go {
1333
1352
  this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
1334
1353
  };
1335
1354
  }
1336
- var St;
1355
+ var wt;
1337
1356
  (function(t) {
1338
1357
  t.OPENED = "opened";
1339
- })(St || (St = {}));
1340
- class bo extends He {
1358
+ })(wt || (wt = {}));
1359
+ class So extends He {
1341
1360
  constructor() {
1342
1361
  super("notification");
1343
1362
  }
1344
1363
  setOpened = (e) => {
1345
- this.write(St.OPENED, e, "true");
1364
+ this.write(wt.OPENED, e, "true");
1346
1365
  };
1347
- isOpened = (e) => this.read(St.OPENED, e);
1366
+ isOpened = (e) => this.read(wt.OPENED, e);
1348
1367
  clearNotification = () => {
1349
1368
  this.clear();
1350
1369
  };
1351
1370
  }
1352
- var Ae;
1371
+ var Ee;
1353
1372
  (function(t) {
1354
1373
  t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
1355
- })(Ae || (Ae = {}));
1356
- class vo {
1374
+ })(Ee || (Ee = {}));
1375
+ class wo {
1357
1376
  queue;
1358
1377
  storage;
1359
1378
  constructor(e = {}) {
1360
- this.storage = new bo(), this.queue = new go({ concurrency: 1, animationDelay: 1600, ...e });
1379
+ this.storage = new So(), this.queue = new vo({ concurrency: 1, animationDelay: 1600, ...e });
1361
1380
  }
1362
1381
  isViewed = (e) => this.storage.isOpened(e);
1363
1382
  add = (e) => {
@@ -1385,7 +1404,7 @@ class vo {
1385
1404
  if (!e?.size)
1386
1405
  return null;
1387
1406
  for (const n of e.values())
1388
- if (n.type === Ae.ONBOARDING)
1407
+ if (n.type === Ee.ONBOARDING)
1389
1408
  return n;
1390
1409
  return e.values().next().value;
1391
1410
  };
@@ -1394,8 +1413,8 @@ class vo {
1394
1413
  this.storage.setOpened(e);
1395
1414
  };
1396
1415
  }
1397
- const So = (t, e, r) => {
1398
- t.notifications = new vo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1416
+ const Ao = (t, e, r) => {
1417
+ t.notifications = new wo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
1399
1418
  t.notifications.queue.drain();
1400
1419
  }), r();
1401
1420
  };
@@ -1403,22 +1422,22 @@ var rt;
1403
1422
  (function(t) {
1404
1423
  t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
1405
1424
  })(rt || (rt = {}));
1406
- const wo = async (t, e) => {
1425
+ const Eo = async (t, e) => {
1407
1426
  const { client: r, createRequestOptions: n } = t.createPromiseClient(Z, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
1408
1427
  try {
1409
1428
  return await r.submitAnswer({ data: e }, { contextValues: i });
1410
1429
  } catch (o) {
1411
- throw tt.from(o)?.code === oe.AlreadyExists ? new Error(rt.ALREADY_VOTED) : new Error(rt.UNKNOWN);
1430
+ throw tt.from(o)?.code === se.AlreadyExists ? new Error(rt.ALREADY_VOTED) : new Error(rt.UNKNOWN);
1412
1431
  }
1413
- }, Ao = (t, e) => {
1432
+ }, Io = (t, e) => {
1414
1433
  const { client: r, createRequestOptions: n } = t.createPromiseClient(Z, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
1415
1434
  return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
1416
1435
  };
1417
- var qe;
1436
+ var Ue;
1418
1437
  (function(t) {
1419
1438
  t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
1420
- })(qe || (qe = {}));
1421
- class Io extends He {
1439
+ })(Ue || (Ue = {}));
1440
+ class To extends He {
1422
1441
  constructor() {
1423
1442
  super("gamification-session", window.sessionStorage);
1424
1443
  }
@@ -1427,35 +1446,35 @@ class Io extends He {
1427
1446
  };
1428
1447
  readValue = (e) => this.read(...e);
1429
1448
  }
1430
- class Dn extends He {
1449
+ class Rn extends He {
1431
1450
  sessionStorage;
1432
1451
  constructor() {
1433
- super("gamification"), this.sessionStorage = new Io();
1452
+ super("gamification"), this.sessionStorage = new To();
1434
1453
  }
1435
1454
  saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
1436
- this.write(qe.ONBOARDING, n, e, r, i);
1455
+ this.write(Ue.ONBOARDING, n, e, r, i);
1437
1456
  };
1438
- getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(qe.ONBOARDING, n, e, r);
1457
+ getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(Ue.ONBOARDING, n, e, r);
1439
1458
  setOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
1440
- this.sessionStorage.writeValue([qe.ONBOARDING_IO, n, e, r], "1");
1459
+ this.sessionStorage.writeValue([Ue.ONBOARDING_IO, n, e, r], "1");
1441
1460
  };
1442
- getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([qe.ONBOARDING_IO, n, e, r]);
1461
+ getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Ue.ONBOARDING_IO, n, e, r]);
1443
1462
  }
1444
- const Eo = {
1463
+ const Oo = {
1445
1464
  pageSize: 10
1446
- }, To = (t, e, r, n, i) => {
1465
+ }, _o = (t, e, r, n, i) => {
1447
1466
  let o = 0;
1448
- const s = q({ pageSize: Eo.pageSize, page: 0 }), a = J({
1467
+ const s = U({ pageSize: Oo.pageSize, page: 0 }), a = J({
1449
1468
  data: [],
1450
1469
  key: Date.now(),
1451
1470
  hasMore: !0,
1452
1471
  loading: void 0,
1453
1472
  error: void 0
1454
- }), u = to(t), d = async () => {
1455
- const p = e.get(), v = n.getStore().get().data?.map((b) => b.slId) || [];
1473
+ }), u = ro(t), l = async () => {
1474
+ const p = e.get(), v = n.getStore().get().data?.map((g) => g.slId) || [];
1456
1475
  if (p && v?.length) {
1457
- const b = r.get();
1458
- b && v.push(b), a.setKey("loading", !0), a.setKey("data", []);
1476
+ const g = r.get();
1477
+ g && v.push(g), a.setKey("loading", !0), a.setKey("data", []);
1459
1478
  const S = await u({
1460
1479
  eventId: p,
1461
1480
  usersIds: v
@@ -1471,19 +1490,19 @@ const Eo = {
1471
1490
  }), S.meta && (o = Math.round(S.meta.count / S.meta.pageSize));
1472
1491
  }
1473
1492
  }, c = () => {
1474
- d();
1493
+ l();
1475
1494
  }, f = (p) => {
1476
- const v = s.get(), b = p || v.page + 1;
1477
- b <= o && s.set({ ...v, page: b });
1495
+ const v = s.get(), g = p || v.page + 1;
1496
+ g <= o && s.set({ ...v, page: g });
1478
1497
  };
1479
- return gr(a, () => {
1480
- const p = e.listen(d), v = n.listen(d);
1498
+ return br(a, () => {
1499
+ const p = e.listen(l), v = n.listen(l);
1481
1500
  return () => {
1482
1501
  p(), v();
1483
1502
  };
1484
1503
  }), { $store: a, fetchMore: f, invalidate: c };
1485
1504
  };
1486
- class Oo extends He {
1505
+ class Co extends He {
1487
1506
  get = this.read;
1488
1507
  set = this.write;
1489
1508
  del = this.remove;
@@ -1491,58 +1510,58 @@ class Oo extends He {
1491
1510
  super("deep-link-context", window.sessionStorage);
1492
1511
  }
1493
1512
  }
1494
- const zr = "sldl", kt = "sldl_uid", Rn = "sldl_eid", Vn = "sldl_e_eid", _o = /* @__PURE__ */ new Set([kt, Rn, Vn]), Hr = (t) => {
1513
+ const Hr = "sldl", Pt = "sldl_uid", Vn = "sldl_eid", $n = "sldl_e_eid", Lo = /* @__PURE__ */ new Set([Pt, Vn, $n]), Wr = (t) => {
1495
1514
  const e = {}, r = {};
1496
1515
  for (const [n, i] of t)
1497
- _o.has(n) ? e[n] = i : r[n] = i;
1516
+ Lo.has(n) ? e[n] = i : r[n] = i;
1498
1517
  return { result: e, remain: r };
1499
- }, Co = ({ hash: t, search: e }) => {
1500
- if (t && t.includes(zr)) {
1518
+ }, ko = ({ hash: t, search: e }) => {
1519
+ if (t && t.includes(Hr)) {
1501
1520
  const r = new URLSearchParams(t.substr(1));
1502
- return { hash: Hr(r) };
1521
+ return { hash: Wr(r) };
1503
1522
  }
1504
- if (e && e.includes(zr)) {
1523
+ if (e && e.includes(Hr)) {
1505
1524
  const r = new URLSearchParams(e);
1506
- return { search: Hr(r) };
1525
+ return { search: Wr(r) };
1507
1526
  }
1508
1527
  return null;
1509
- }, Wr = ve("deep_link"), ue = {
1528
+ }, Yr = Se("deep_link"), ce = {
1510
1529
  debug: (...t) => {
1511
- Wr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1530
+ Yr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1512
1531
  },
1513
1532
  trace: (...t) => {
1514
- Wr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1533
+ Yr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1515
1534
  }
1516
- }, Lo = (t, e) => {
1535
+ }, Po = (t, e) => {
1517
1536
  const { hash: r, search: n } = window.location;
1518
- if (ue.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1519
- const i = Co({ hash: r, search: n });
1520
- if (ue.debug(i, "parse deep link result"), i) {
1537
+ if (ce.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
1538
+ const i = ko({ hash: r, search: n });
1539
+ if (ce.debug(i, "parse deep link result"), i) {
1521
1540
  const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
1522
1541
  if (Object.keys(a).length !== 0) {
1523
1542
  t.setValue("data", a);
1524
- const d = Object.keys(u).length !== 0;
1543
+ const l = Object.keys(u).length !== 0;
1525
1544
  if (o) {
1526
1545
  let c = "";
1527
- d && (c = `#${new URLSearchParams(u).toString()}`, ue.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
1546
+ l && (c = `#${new URLSearchParams(u).toString()}`, ce.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
1528
1547
  }
1529
1548
  if (s) {
1530
1549
  let c = "";
1531
- d && (c = `?${new URLSearchParams(u).toString()}`, ue.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
1550
+ l && (c = `?${new URLSearchParams(u).toString()}`, ce.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
1532
1551
  }
1533
1552
  e(a);
1534
1553
  }
1535
1554
  }
1536
1555
  }
1537
1556
  t.setValue("parsed", !0);
1538
- }, ko = (t, e, r) => {
1539
- const n = new Oo(), i = n.get("sl-deep-link-store");
1557
+ }, No = (t, e, r) => {
1558
+ const n = new Co(), i = n.get("sl-deep-link-store");
1540
1559
  let o = {};
1541
1560
  if (i)
1542
1561
  try {
1543
1562
  o = JSON.parse(i);
1544
1563
  } catch (a) {
1545
- ue.debug(a);
1564
+ ce.debug(a);
1546
1565
  }
1547
1566
  t.deepLink = {
1548
1567
  $store: new Ce(J(o), "deep-link-context"),
@@ -1552,37 +1571,37 @@ const zr = "sldl", kt = "sldl_uid", Rn = "sldl_eid", Vn = "sldl_e_eid", _o = /*
1552
1571
  },
1553
1572
  // we are logged in with inviter id
1554
1573
  deepLinkUsed: (a) => {
1555
- ue.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
1574
+ ce.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
1556
1575
  },
1557
1576
  onDeepLinkHandlers: /* @__PURE__ */ new Set()
1558
1577
  }, t.sdk.getInviter = () => {
1559
1578
  const { data: a, used: u } = t.deepLink.getDeepLinkData();
1560
- return u ? a?.[kt] : void 0;
1579
+ return u ? a?.[Pt] : void 0;
1561
1580
  }, t.sdk.inviteDisplayed = () => {
1562
1581
  t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
1563
1582
  }, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
1564
- localStorage.getItem("SL_DEBUG") && ue.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
1583
+ localStorage.getItem("SL_DEBUG") && ce.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
1565
1584
  }, e.onDeepLinkHandled && t.sdk.addDeepLinkHandler(e.onDeepLinkHandled), t.sdk.removeDeepLinkHandler = (a) => {
1566
- ue.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
1585
+ ce.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
1567
1586
  };
1568
1587
  const s = (a) => {
1569
- t.deepLink.$store.setValue("handled", !0), ue.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
1588
+ t.deepLink.$store.setValue("handled", !0), ce.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
1570
1589
  for (const u of t.deepLink.onDeepLinkHandlers)
1571
1590
  try {
1572
- ue.trace("called handler"), u(a);
1573
- } catch (d) {
1574
- console.error(d);
1591
+ ce.trace("called handler"), u(a);
1592
+ } catch (l) {
1593
+ console.error(l);
1575
1594
  }
1576
1595
  };
1577
- Lo(t.deepLink.$store, s), r();
1578
- }, Po = ve("bypass");
1579
- class No extends Pi {
1596
+ Po(t.deepLink.$store, s), r();
1597
+ }, Fo = Se("bypass");
1598
+ class Do extends Ni {
1580
1599
  $coreStore;
1581
1600
  deepLink;
1582
1601
  transport;
1583
1602
  bypassLogin;
1584
1603
  constructor(e, r, n) {
1585
- super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Gi(this.transport), this.connect();
1604
+ super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Ki(this.transport), this.connect();
1586
1605
  }
1587
1606
  me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1588
1607
  /**
@@ -1593,8 +1612,8 @@ class No extends Pi {
1593
1612
  */
1594
1613
  login = async (e, r) => {
1595
1614
  this.$coreStore.getValues().userKey.setValue(r);
1596
- const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[kt];
1597
- Po.debug({ inviterKey: o }, "login with inviterKey");
1615
+ const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
1616
+ Fo.debug({ inviterKey: o }, "login with inviterKey");
1598
1617
  const s = await this.bypassLogin({
1599
1618
  schema: e,
1600
1619
  userKey: r,
@@ -1610,14 +1629,14 @@ class No extends Pi {
1610
1629
  * Logout user. Clears the all user data from the store.
1611
1630
  */
1612
1631
  logout = () => {
1613
- this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), new je().clear();
1632
+ this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), new Be().clear();
1614
1633
  };
1615
1634
  /**
1616
1635
  * Soft logout, only clears the StreamLayer user data from the store.
1617
1636
  * Does not clear the external token. And automatically tries to re-login by external token.
1618
1637
  */
1619
1638
  softLogout = () => {
1620
- const e = new je();
1639
+ const e = new Be();
1621
1640
  this.transport.setAuth("", ""), e.setToken(""), this.reLogin();
1622
1641
  };
1623
1642
  /**
@@ -1628,7 +1647,7 @@ class No extends Pi {
1628
1647
  * - If no one of the above is true, then logout.
1629
1648
  */
1630
1649
  reLogin = () => {
1631
- const e = new je(), r = e.getToken(), n = e.getExternalToken();
1650
+ const e = new Be(), r = e.getToken(), n = e.getExternalToken();
1632
1651
  if (this.$coreStore.getValues().userKey.setValue(n), r)
1633
1652
  return this.saveUser(r, ""), this.me().then((i) => {
1634
1653
  if (i?.id) {
@@ -1647,7 +1666,7 @@ class No extends Pi {
1647
1666
  * Write token to the Transport and UserStore
1648
1667
  */
1649
1668
  saveUser = (e, r) => {
1650
- this.transport.setAuth(e, r), this.$coreStore.getValues().userToken.setValue(e), new je().setToken(e);
1669
+ this.transport.setAuth(e, r), this.$coreStore.getValues().userToken.setValue(e), new Be().setToken(e);
1651
1670
  };
1652
1671
  /**
1653
1672
  * Add interceptor to the Transport to handle 401 and 403 errors.
@@ -1663,9 +1682,9 @@ class No extends Pi {
1663
1682
  });
1664
1683
  };
1665
1684
  }
1666
- const Je = new je(), Fo = (t, e, r) => {
1667
- t.auth = new No(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1668
- n === ye.READY && t.auth.reLogin();
1685
+ const Je = new Be(), Ro = (t, e, r) => {
1686
+ t.auth = new Do(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
1687
+ n === me.READY && t.auth.reLogin();
1669
1688
  }), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
1670
1689
  if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
1671
1690
  try {
@@ -1676,24 +1695,24 @@ const Je = new je(), Fo = (t, e, r) => {
1676
1695
  }, t.sdk.logout = () => {
1677
1696
  t.auth.logout(), Je.clear();
1678
1697
  }, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
1679
- }, Yr = ve("video_player"), lt = {
1698
+ }, Jr = Se("video_player"), dt = {
1680
1699
  debug: (...t) => {
1681
- Yr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1700
+ Jr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1682
1701
  },
1683
1702
  trace: (...t) => {
1684
- Yr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1703
+ Jr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
1685
1704
  }
1686
- }, Do = (t, e, r) => {
1705
+ }, Vo = (t, e, r) => {
1687
1706
  t.videoPlayer = {
1688
1707
  controllers: /* @__PURE__ */ new Set()
1689
1708
  }, t.sdk.addVideoPlayerController = (n) => {
1690
- lt.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
1709
+ dt.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
1691
1710
  }, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
1692
- lt.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
1711
+ dt.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
1693
1712
  }, t.sdk.controlVideoPlayer = (n) => {
1694
- lt.trace("controlling video player");
1713
+ dt.trace("controlling video player");
1695
1714
  for (const i of t.videoPlayer.controllers) {
1696
- lt.trace("calling video player controller");
1715
+ dt.trace("calling video player controller");
1697
1716
  try {
1698
1717
  i(n);
1699
1718
  } catch (o) {
@@ -1701,13 +1720,13 @@ const Je = new je(), Fo = (t, e, r) => {
1701
1720
  }
1702
1721
  }
1703
1722
  }, r();
1704
- }, Ro = {
1723
+ }, $o = {
1705
1724
  [_.FACTOID]: "insight",
1706
1725
  [_.POLL]: "poll",
1707
1726
  [_.TRIVIA]: "trivia",
1708
1727
  [_.PREDICTION]: "prediction",
1709
1728
  [_.TWEET]: "tweet"
1710
- }, Vo = (t, e, r) => {
1729
+ }, Mo = (t, e, r) => {
1711
1730
  t.sdk.uiState = J({}), t.ui = {
1712
1731
  enableAppNotification: function() {
1713
1732
  t.sdk.uiState.setKey("appNotification", !0);
@@ -1734,7 +1753,7 @@ const Je = new je(), Fo = (t, e, r) => {
1734
1753
  };
1735
1754
  t.onQuestionActivate = ({ questionType: i, ...o }) => {
1736
1755
  if (t.ui.onContentActivate) {
1737
- const s = o.type || i && Ro[i] || "question";
1756
+ const s = o.type || i && $o[i] || "question";
1738
1757
  t.ui.onContentActivate({ ...o, type: s });
1739
1758
  }
1740
1759
  }, t.sdk.onMount({ name: "ui" }, () => {
@@ -1749,10 +1768,11 @@ const Je = new je(), Fo = (t, e, r) => {
1749
1768
  break;
1750
1769
  }
1751
1770
  if (a.slEventBus?.type === "advertisement" && e.withAd) {
1752
- const u = a.slEventBus, { hasNotification: d, id: c, isViewed: f } = u.payload;
1771
+ const u = a.slEventBus, { hasNotification: l, id: c, isViewed: f, type: p } = u.payload;
1753
1772
  switch (u.action) {
1754
1773
  case "notification-opened":
1755
1774
  t.sdk.uiState.set({
1775
+ promotionExternalAd: p === re.EXTERNAL_AD,
1756
1776
  promotionBanner: !0,
1757
1777
  promotionNotification: !1,
1758
1778
  promotionOverlay: !0,
@@ -1763,35 +1783,38 @@ const Je = new je(), Fo = (t, e, r) => {
1763
1783
  if (t.sdk.closeFeature(), n({
1764
1784
  stage: "activate",
1765
1785
  id: c,
1766
- hasNotification: d,
1786
+ hasNotification: l,
1767
1787
  isViewed: f
1768
1788
  }), !e.withAdNotification) {
1769
1789
  t.sdk.uiState.set({
1770
1790
  promotionBanner: !0,
1771
1791
  promotionOverlay: !0,
1772
- promotionSidebar: !0
1792
+ promotionSidebar: !0,
1793
+ promotionExternalAd: p === re.EXTERNAL_AD
1773
1794
  });
1774
1795
  break;
1775
1796
  }
1776
- d ? t.sdk.uiState.set({
1797
+ l ? t.sdk.uiState.set({
1777
1798
  promotionNotification: !0
1778
1799
  }) : t.sdk.uiState.set({
1779
1800
  promotionBanner: !0,
1780
1801
  promotionOverlay: !0,
1781
- promotionSidebar: !0
1802
+ promotionSidebar: !0,
1803
+ promotionExternalAd: p === re.EXTERNAL_AD
1782
1804
  });
1783
1805
  break;
1784
1806
  case "closed":
1785
- t.sdk.uiState.set({
1807
+ console.log("closed", u.payload), t.sdk.uiState.set({
1786
1808
  ...t.sdk.uiState.get(),
1787
1809
  promotionNotification: !1,
1788
1810
  promotionBanner: !1,
1789
1811
  promotionOverlay: !1,
1812
+ promotionExternalAd: !1,
1790
1813
  promotionSidebar: !1
1791
1814
  }), n({
1792
1815
  stage: "deactivate",
1793
1816
  id: c,
1794
- hasNotification: d,
1817
+ hasNotification: l,
1795
1818
  isViewed: f
1796
1819
  });
1797
1820
  break;
@@ -1804,12 +1827,12 @@ const Je = new je(), Fo = (t, e, r) => {
1804
1827
  o(), s();
1805
1828
  };
1806
1829
  }), r();
1807
- }, $o = (t, e, r) => {
1830
+ }, jo = (t, e, r) => {
1808
1831
  const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1809
1832
  t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
1810
1833
  if (i.has(s)) {
1811
- const d = o.get(s);
1812
- d && d(), i.delete(s), o.delete(s);
1834
+ const l = o.get(s);
1835
+ l && l(), i.delete(s), o.delete(s);
1813
1836
  }
1814
1837
  i.set(s, { cb: u, clear: a }), t?.stores?.enabled?.get() === "on" && o.set(s, u());
1815
1838
  }, t.ready = () => {
@@ -1819,19 +1842,19 @@ const Je = new je(), Fo = (t, e, r) => {
1819
1842
  }, t.sdk.initializeApp = async (s) => {
1820
1843
  if (t.contextConfig = s, t.stores.enabled.get() === "on")
1821
1844
  return { enabled: !0 };
1822
- t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(ye.INITIALIZATION);
1845
+ t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(me.INITIALIZATION);
1823
1846
  try {
1824
1847
  const a = await t.stores.organizationSettings.getValue();
1825
- return a ? (t.stores.status.setValue(ye.READY), { enabled: !!a }) : (t.stores.status.setValue(ye.FAILED), { err: "failed" });
1848
+ return a ? (t.stores.status.setValue(me.READY), { enabled: !!a }) : (t.stores.status.setValue(me.FAILED), { err: "failed" });
1826
1849
  } catch (a) {
1827
- return t.stores.enabled.setValue(), t.stores.status.setValue(ye.FAILED), { err: `${a}` };
1850
+ return t.stores.enabled.setValue(), t.stores.status.setValue(me.FAILED), { err: `${a}` };
1828
1851
  }
1829
1852
  }, t.sdk.disableApp = () => {
1830
- t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(ye.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
1853
+ t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(me.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
1831
1854
  }, t.sdk.createEventSession = (s) => {
1832
1855
  t.stores.providerStreamId.setValue(s);
1833
1856
  }, r();
1834
- }, Mo = (t, e) => {
1857
+ }, Bo = (t, e) => {
1835
1858
  const { client: r, queryKey: n } = t.createPromiseClient(nt, {
1836
1859
  method: "generateDeepLink",
1837
1860
  params: e
@@ -1852,29 +1875,29 @@ const Je = new je(), Fo = (t, e, r) => {
1852
1875
  // 24 hours
1853
1876
  refetchInterval: 0
1854
1877
  });
1855
- }, Bo = (t, { web: e, mobile: r }) => {
1856
- const { client: n } = t.createPromiseClient(Ai, { method: "generate" });
1878
+ }, Uo = (t, { web: e, mobile: r }) => {
1879
+ const { client: n } = t.createPromiseClient(Ei, { method: "generate" });
1857
1880
  return n.generate({ web: e, mobile: r });
1858
- }, Jr = (t, e) => {
1881
+ }, Xr = (t, e) => {
1859
1882
  const r = new URLSearchParams(t);
1860
1883
  for (const [n, i] of Object.entries(e))
1861
1884
  r.append(n, i);
1862
1885
  return r.toString();
1863
- }, jo = (t, e, r, n) => {
1886
+ }, qo = (t, e, r, n) => {
1864
1887
  const i = J({});
1865
- return gr(i, () => Mo(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
1866
- const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", v = r.get() || "", b = {
1867
- [kt]: f,
1868
- [Rn]: p,
1869
- [Vn]: v
1888
+ return br(i, () => Bo(t, [e, r]).subscribe(async ({ data: a, error: u, loading: l }) => {
1889
+ const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", v = r.get() || "", g = {
1890
+ [Pt]: f,
1891
+ [Vn]: p,
1892
+ [$n]: v
1870
1893
  };
1871
- if (!d && c) {
1894
+ if (!l && c) {
1872
1895
  i.setKey("loading", !0);
1873
- let g = window.location.search, S = window.location.hash;
1874
- g && S || S ? g = `?${Jr(g, b)}` : S = `#${Jr("", b)}`;
1875
- const C = window.location.origin + window.location.pathname + g + S;
1896
+ let b = window.location.search, S = window.location.hash;
1897
+ b && S || S ? b = `?${Xr(b, g)}` : S = `#${Xr("", g)}`;
1898
+ const C = window.location.origin + window.location.pathname + b + S;
1876
1899
  try {
1877
- const R = await Bo(t, { web: C, mobile: c });
1900
+ const R = await Uo(t, { web: C, mobile: c });
1878
1901
  i.set({
1879
1902
  data: R.data?.link,
1880
1903
  loading: !1
@@ -1894,10 +1917,10 @@ var M;
1894
1917
  (function(t) {
1895
1918
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
1896
1919
  })(M || (M = {}));
1897
- const qo = (t, e, r, n) => {
1920
+ const xo = (t, e, r, n) => {
1898
1921
  const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
1899
1922
  i && r.add({
1900
- type: Ae.ONBOARDING,
1923
+ type: Ee.ONBOARDING,
1901
1924
  id: o,
1902
1925
  action: t.openFeature,
1903
1926
  close: () => {
@@ -1918,7 +1941,7 @@ const qo = (t, e, r, n) => {
1918
1941
  }
1919
1942
  }
1920
1943
  });
1921
- }, dt = (t, e, r, n, i, o) => {
1944
+ }, ft = (t, e, r, n, i, o) => {
1922
1945
  try {
1923
1946
  const s = e.userId.get();
1924
1947
  if (!s)
@@ -1933,38 +1956,38 @@ const qo = (t, e, r, n) => {
1933
1956
  p();
1934
1957
  return;
1935
1958
  }
1936
- const u = e.moderation.getStore().value?.data, d = r.featureSettings.get().inplayGame;
1937
- if (u === void 0 || d === void 0)
1959
+ const u = e.moderation.getStore().value?.data, l = r.featureSettings.get().inplayGame;
1960
+ if (u === void 0 || l === void 0)
1938
1961
  return;
1939
- const c = u?.options?.onboardingEnabled, f = d?.titleCard?.optIn;
1962
+ const c = u?.options?.onboardingEnabled, f = l?.titleCard?.optIn;
1940
1963
  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" }), { markAsViewed: !1 }));
1941
1964
  } catch (s) {
1942
1965
  console.error(s);
1943
1966
  }
1944
- }, Uo = (t, e, r, n) => {
1967
+ }, Qo = (t, e, r, n) => {
1945
1968
  let i = !1;
1946
- const o = new Dn(), s = q(M.Unset);
1947
- s.subscribe((d) => {
1948
- d !== M.Unset && (d === M.Optional || d === M.Required ? i === !1 && (qo(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), d === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1969
+ const o = new Rn(), s = U(M.Unset);
1970
+ s.subscribe((l) => {
1971
+ l !== M.Unset && (l === M.Optional || l === M.Required ? i === !1 && (xo(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), l === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
1949
1972
  userId: e.userId.get() || "",
1950
1973
  organizationId: e.organizationId.get() || "",
1951
1974
  eventId: e.slStreamId.get() || ""
1952
1975
  }));
1953
1976
  });
1954
1977
  const a = [];
1955
- return dt(s, e, t, n, o, a), s.get() !== M.Completed && (a.push(e.userId.listen((d) => {
1956
- d && dt(s, e, t, n, o, a);
1957
- })), a.push(e.moderation.listen((d) => {
1958
- d.data && dt(s, e, t, n, o, a);
1959
- })), a.push(t.featureSettings.listen((d) => {
1960
- d && dt(s, e, t, n, o, a);
1978
+ return ft(s, e, t, n, o, a), s.get() !== M.Completed && (a.push(e.userId.listen((l) => {
1979
+ l && ft(s, e, t, n, o, a);
1980
+ })), a.push(e.moderation.listen((l) => {
1981
+ l.data && ft(s, e, t, n, o, a);
1982
+ })), a.push(t.featureSettings.listen((l) => {
1983
+ l && ft(s, e, t, n, o, a);
1961
1984
  }))), { $store: s, submitInplay: async () => {
1962
- const d = e.slStreamId.get();
1963
- if (d) {
1964
- await Ao(r, d), s.set(M.Completed), o.saveOnboardingStatus({
1985
+ const l = e.slStreamId.get();
1986
+ if (l) {
1987
+ await Io(r, l), s.set(M.Completed), o.saveOnboardingStatus({
1965
1988
  organizationId: e.organizationId.get() || "",
1966
1989
  userId: e.userId.get() || "",
1967
- eventId: d
1990
+ eventId: l
1968
1991
  }, M.Completed), G.emit("poll", {
1969
1992
  action: "onboardingPassed",
1970
1993
  payload: {}
@@ -1973,35 +1996,35 @@ const qo = (t, e, r, n) => {
1973
1996
  n.close(c);
1974
1997
  }
1975
1998
  } };
1976
- }, xo = (t, e, r, n) => {
1977
- const i = J(void 0), o = Nn(n), s = async () => {
1978
- const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
1999
+ }, Go = (t, e, r, n) => {
2000
+ const i = J(void 0), o = Fn(n), s = async () => {
2001
+ const u = t.get(), l = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
1979
2002
  if (!c)
1980
2003
  return;
1981
2004
  const f = {
1982
2005
  eventId: u,
1983
- userId: d,
1984
- usersIds: [...c, d]
2006
+ userId: l,
2007
+ usersIds: [...c, l]
1985
2008
  }, p = await o(f);
1986
2009
  i.set(p.data?.attributes);
1987
2010
  }, a = () => {
1988
2011
  s();
1989
2012
  };
1990
- return gr(i, () => {
1991
- const u = t.listen(s), d = r.listen(s), c = e.listen(s);
2013
+ return br(i, () => {
2014
+ const u = t.listen(s), l = r.listen(s), c = e.listen(s);
1992
2015
  return () => {
1993
- u(), d(), c();
2016
+ u(), l(), c();
1994
2017
  };
1995
2018
  }), { $store: i, invalidate: a };
1996
- }, Qo = async (t, e, r, n, i) => {
1997
- const o = Nn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], d = {
2019
+ }, Ko = async (t, e, r, n, i) => {
2020
+ const o = Fn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], l = {
1998
2021
  eventId: s,
1999
2022
  userId: n,
2000
2023
  usersIds: [...u, a]
2001
2024
  };
2002
- return (await o(d)).data?.attributes?.summary;
2003
- }, Go = /* @__PURE__ */ new Set([_.POLL, _.PREDICTION, _.TRIVIA]);
2004
- class Ko extends Ln {
2025
+ return (await o(l)).data?.attributes?.summary;
2026
+ }, zo = /* @__PURE__ */ new Set([_.POLL, _.PREDICTION, _.TRIVIA]);
2027
+ class Ho extends kn {
2005
2028
  /** user statistics (leaderboard panel) */
2006
2029
  userSummary;
2007
2030
  /** feed list (pick history) */
@@ -2038,7 +2061,7 @@ class Ko extends Ln {
2038
2061
  cancels = /* @__PURE__ */ new Set();
2039
2062
  onQuestionActivate;
2040
2063
  constructor(e, r, n) {
2041
- super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Dn(), this.feedList = this.background.feedList, this.friends = new ce(ro(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.onboardingProcessed = q(!n.sdk.withAuth), this.leaderboardId = new X(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Uo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = jo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = xo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = To(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2064
+ super(e, r), this.background = new bo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Rn(), this.feedList = this.background.feedList, this.friends = new le(no(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = U(void 0), this.onboardingProcessed = U(!n.sdk.withAuth), this.leaderboardId = new X(U(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Qo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = qo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Go(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = _o(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
2042
2065
  o?.summary && i?.summary && this.leaderboardList.invalidate();
2043
2066
  })), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
2044
2067
  (o === void 0 || i !== M.Unset) && this.background.activeQuestionId.invalidate();
@@ -2067,27 +2090,27 @@ class Ko extends Ln {
2067
2090
  if (i === Y.RESOLVED && o === _.PREDICTION) {
2068
2091
  const u = this.background.getCurrentSessionId({
2069
2092
  prefix: `notification-id:${s}`
2070
- }), d = [...this.feedList.getValues().data || []], c = d.findIndex((K) => K.id === s), f = d[c];
2093
+ }), l = [...this.feedList.getValues().data || []], c = l.findIndex((K) => K.id === s), f = l[c];
2071
2094
  let p = f?.attributes?.attributes?.value?.answerId;
2072
- const v = sr(s, this.transport), b = v.subscribe(() => {
2095
+ const v = ar(s, this.transport), g = v.subscribe(() => {
2073
2096
  });
2074
2097
  await v.get().promise;
2075
- let g = v.get().data;
2076
- g || (g = await uo(s, this.transport)), b(), window.requestAnimationFrame(() => {
2098
+ let b = v.get().data;
2099
+ b || (b = await co(s, this.transport)), g(), window.requestAnimationFrame(() => {
2077
2100
  v.invalidate();
2078
- }), p || (p = g?.answers.find(({ youVoted: K }) => K)?.id);
2101
+ }), p || (p = b?.answers.find(({ youVoted: K }) => K)?.id);
2079
2102
  const S = a.find(({ correct: K }) => K), C = p ? a.find(({ id: K }) => K === p) : void 0, R = !!C?.correct;
2080
- if (f && d[c]?.attributes?.attributes.case === "question") {
2103
+ if (f && l[c]?.attributes?.attributes.case === "question") {
2081
2104
  try {
2082
- d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = R ? ct.WON : ct.LOST);
2105
+ l[c].attributes.attributes.value.answerId = p, l[c].attributes.attributes.value.openForVoting = !1, p && (l[c].attributes.attributes.value.status = R ? ct.WON : ct.LOST);
2083
2106
  } catch {
2084
2107
  }
2085
- this.feedList.getStore().mutate(d);
2108
+ this.feedList.getStore().mutate(l);
2086
2109
  }
2087
2110
  if (!C || !S)
2088
2111
  return;
2089
2112
  this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
2090
- type: Ae.QUESTION_RESOLVED,
2113
+ type: Ee.QUESTION_RESOLVED,
2091
2114
  action: () => this.openQuestion(r.id, n),
2092
2115
  close: () => this.closeQuestion(s),
2093
2116
  autoHideDuration: R ? 15e3 : 12e3,
@@ -2173,12 +2196,12 @@ class Ko extends Ln {
2173
2196
  this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
2174
2197
  };
2175
2198
  submitAnswer = async (e, r) => {
2176
- const n = sr(e, this.transport), i = n.subscribe(() => {
2199
+ const n = ar(e, this.transport), i = n.subscribe(() => {
2177
2200
  }), o = { ...n.get().data || {} }, s = () => {
2178
2201
  const a = this.feedList.getValues().data;
2179
2202
  if (!a)
2180
2203
  return;
2181
- const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
2204
+ const u = a.findIndex((f) => f.id === e), l = a[u], c = l?.attributes?.attributes.case === "question" && l.attributes.attributes.value;
2182
2205
  if (c) {
2183
2206
  G.emit("poll", {
2184
2207
  action: "voted",
@@ -2189,8 +2212,8 @@ class Ko extends Ln {
2189
2212
  });
2190
2213
  const f = n.get().data;
2191
2214
  if (i(), f) {
2192
- const p = f.answers.find((S) => S.correct === !0), v = f.answers.findIndex((S) => S.id === r), b = f.answers[v], g = f.answers.every(({ percentageDecimal: S }, C) => S === o?.answers[C].percentageDecimal);
2193
- a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = b?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ct.WON : ct.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, g && f.answers.forEach((S) => {
2215
+ const p = f.answers.find((S) => S.correct === !0), v = f.answers.findIndex((S) => S.id === r), g = f.answers[v], b = f.answers.every(({ percentageDecimal: S }, C) => S === o?.answers[C].percentageDecimal);
2216
+ a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = g?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ct.WON : ct.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, b && f.answers.forEach((S) => {
2194
2217
  S.percentageDecimal = 0;
2195
2218
  }), p?.id === r && (f.answers[v].pointsEarned = f.status === Y.RESOLVED ? 0 : p.points), n.mutate({ ...f });
2196
2219
  }
@@ -2200,7 +2223,7 @@ class Ko extends Ln {
2200
2223
  }
2201
2224
  };
2202
2225
  try {
2203
- await wo(this.transport, { questionId: e, answerId: r }), s();
2226
+ await Eo(this.transport, { questionId: e, answerId: r }), s();
2204
2227
  } catch (a) {
2205
2228
  if (a.message === rt.ALREADY_VOTED) {
2206
2229
  this.userSummary.invalidate();
@@ -2231,7 +2254,7 @@ class Ko extends Ln {
2231
2254
  }
2232
2255
  }), this.background.openQuestion(e, r);
2233
2256
  };
2234
- getFeedItem = (e) => oo(e, this.transport);
2257
+ getFeedItem = (e) => so(e, this.transport);
2235
2258
  isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
2236
2259
  closeQuestion = (e) => (e && this.onQuestionActivate({
2237
2260
  stage: "deactivate",
@@ -2253,7 +2276,7 @@ class Ko extends Ln {
2253
2276
  }
2254
2277
  const n = { ...r };
2255
2278
  try {
2256
- const i = await Qo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2279
+ const i = await Ko(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
2257
2280
  i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
2258
2281
  } catch (i) {
2259
2282
  console.error(i);
@@ -2271,10 +2294,10 @@ class Ko extends Ln {
2271
2294
  */
2272
2295
  showInApp = (e) => {
2273
2296
  const r = this.onboardingStatus.$store.get();
2274
- 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 !== bi.ON && e.data.question.status === Y.ACTIVE && !e.data.question.marketClosed) {
2275
- if (Go.has(e.data.question.type))
2297
+ 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 !== vi.ON && e.data.question.status === Y.ACTIVE && !e.data.question.marketClosed) {
2298
+ if (zo.has(e.data.question.type))
2276
2299
  this.isInteractiveAllowed && this.notifications.add({
2277
- type: Ae.QUESTION,
2300
+ type: Ee.QUESTION,
2278
2301
  action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
2279
2302
  close: () => this.closeQuestion(e.data?.question?.id),
2280
2303
  autoHideDuration: 1e3 * 60,
@@ -2308,7 +2331,7 @@ class Ko extends Ln {
2308
2331
  }
2309
2332
  };
2310
2333
  this.notifications.add({
2311
- type: Ae.QUESTION,
2334
+ type: Ee.QUESTION,
2312
2335
  action: () => this.openQuestion(e?.data?.question?.id, e?.data?.feedItem),
2313
2336
  close: () => this.closeQuestion(e?.data?.question?.id),
2314
2337
  autoHideDuration: 1e3 * 120,
@@ -2331,7 +2354,7 @@ class Ko extends Ln {
2331
2354
  tweetId: e.data.question.id
2332
2355
  };
2333
2356
  this.notifications.add({
2334
- type: Ae.QUESTION,
2357
+ type: Ee.QUESTION,
2335
2358
  action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
2336
2359
  close: () => this.closeQuestion(e.data?.question?.id),
2337
2360
  autoHideDuration: 1e3 * 120,
@@ -2347,16 +2370,16 @@ class Ko extends Ln {
2347
2370
  }
2348
2371
  };
2349
2372
  }
2350
- const zo = {
2373
+ const Wo = {
2351
2374
  [D.GAMES]: !0
2352
2375
  };
2353
- class Ho extends Ln {
2376
+ class Yo extends kn {
2354
2377
  constructor(e, r) {
2355
2378
  super(e, r);
2356
2379
  }
2357
2380
  }
2358
- const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo = (t, e, r) => {
2359
- t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(q(D.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) => {
2381
+ const Jo = (t, e, r) => t.type === D.GAMES ? new Ho(t, e, r) : new Yo(t, e), Xo = (t, e, r) => {
2382
+ t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new X(U(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new X(U(D.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) => {
2360
2383
  t.activeFeature.setValue(n);
2361
2384
  }, t.sdk.closeFeature = (n = !1) => {
2362
2385
  const i = t.activeFeature.getValue();
@@ -2365,9 +2388,9 @@ const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo
2365
2388
  const o = t.sdk.featuresList.getValue();
2366
2389
  o && o.delete(i), t.sdk.featuresList.setValue(o);
2367
2390
  }
2368
- }, t.initFeature = (n, i = he.ORGANIZATION) => {
2369
- if (n.type in zo && !t.features.has(n.type)) {
2370
- const o = Wo(n, i, t);
2391
+ }, t.initFeature = (n, i = ye.ORGANIZATION) => {
2392
+ if (n.type in Wo && !t.features.has(n.type)) {
2393
+ const o = Jo(n, i, t);
2371
2394
  t.features.set(n.type, o);
2372
2395
  let s = t.sdk.featuresList.getValue();
2373
2396
  s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
@@ -2382,12 +2405,12 @@ const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo
2382
2405
  const n = await t.stores.organizationSettings.getValue();
2383
2406
  t.features.clear(), t.sdk.featuresList.setValue(/* @__PURE__ */ new Set());
2384
2407
  for (const i of n?.overlays || [])
2385
- t.initFeature(i, he.ORGANIZATION);
2408
+ t.initFeature(i, ye.ORGANIZATION);
2386
2409
  }, t.stores.providerStreamId.listen((n) => {
2387
2410
  n || t.reinitializeFeatures();
2388
2411
  }), t.storeSubscribe = () => {
2389
2412
  const n = (o, s) => {
2390
- if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === he.ORGANIZATION))
2413
+ if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === ye.ORGANIZATION))
2391
2414
  for (const a of s.overlays)
2392
2415
  a.sdkEnable === !0 && (t.features.has(a.type) ? t.updateFeature(a, o) : t.initFeature(a, o));
2393
2416
  }, i = {
@@ -2403,7 +2426,7 @@ const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo
2403
2426
  organizationSettings: (o) => {
2404
2427
  if (o.data)
2405
2428
  try {
2406
- n(he.ORGANIZATION, o.data);
2429
+ n(ye.ORGANIZATION, o.data);
2407
2430
  } catch (s) {
2408
2431
  console.log(s);
2409
2432
  }
@@ -2411,7 +2434,7 @@ const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo
2411
2434
  streamSettings: (o) => {
2412
2435
  if (o.data)
2413
2436
  try {
2414
- n(he.STREAM, o.data);
2437
+ n(ye.STREAM, o.data);
2415
2438
  } catch (s) {
2416
2439
  console.log(s);
2417
2440
  }
@@ -2420,7 +2443,7 @@ const Wo = (t, e, r) => t.type === D.GAMES ? new Ko(t, e, r) : new Ho(t, e), Yo
2420
2443
  t.store.subscribe(i);
2421
2444
  }, r();
2422
2445
  };
2423
- class Jo {
2446
+ class Zo {
2424
2447
  analytics;
2425
2448
  constructor(e) {
2426
2449
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2441,8 +2464,8 @@ class Jo {
2441
2464
  ...this.analytics.commonStore.getValues(),
2442
2465
  kind: Q.INVITATION_ACCEPTED
2443
2466
  },
2444
- category: Rr.GAMES,
2445
- from: Vr.UNSET
2467
+ category: Vr.GAMES,
2468
+ from: $r.UNSET
2446
2469
  });
2447
2470
  };
2448
2471
  sent = ({ from: e }) => {
@@ -2451,12 +2474,12 @@ class Jo {
2451
2474
  ...this.analytics.commonStore.getValues(),
2452
2475
  kind: Q.INVITATION_SENT
2453
2476
  },
2454
- category: Rr.GAMES,
2455
- from: e || Vr.UNSET
2477
+ category: Vr.GAMES,
2478
+ from: e || $r.UNSET
2456
2479
  });
2457
2480
  };
2458
2481
  }
2459
- class Xo {
2482
+ class es {
2460
2483
  analytics;
2461
2484
  constructor(e) {
2462
2485
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2480,7 +2503,7 @@ class Xo {
2480
2503
  ...this.analytics.commonStore.getValues(),
2481
2504
  kind: Q.INTERACTIONS
2482
2505
  },
2483
- actionType: xr.TAP
2506
+ actionType: Qr.TAP
2484
2507
  });
2485
2508
  };
2486
2509
  scroll = () => {
@@ -2489,26 +2512,26 @@ class Xo {
2489
2512
  ...this.analytics.commonStore.getValues(),
2490
2513
  kind: Q.INTERACTIONS
2491
2514
  },
2492
- actionType: xr.SCROLL
2515
+ actionType: Qr.SCROLL
2493
2516
  });
2494
2517
  };
2495
2518
  }
2496
- const Zo = {
2497
- [Te.UNSET]: we.UNSET,
2498
- [Te.INGAME_IAB21]: we.PROMOTION_INGAME_IAB21,
2499
- [Te.INGAME_IAB11_LBAR]: we.PROMOTION_INGAME_IAB11_LBAR,
2500
- [Te.INGAME_IAB11]: we.PROMOTION_INGAME_IAB11,
2501
- [Te.INGAME_IAB21_LBAR]: we.PROMOTION_INGAME_IAB21_LBAR,
2502
- [Te.INGAME_IAB61]: we.PROMOTION_INGAME_IAB61,
2503
- [Te.EXTERNAL_AD]: we.PROMOTION_GAM
2519
+ const ts = {
2520
+ [re.UNSET]: Ae.UNSET,
2521
+ [re.INGAME_IAB21]: Ae.PROMOTION_INGAME_IAB21,
2522
+ [re.INGAME_IAB11_LBAR]: Ae.PROMOTION_INGAME_IAB11_LBAR,
2523
+ [re.INGAME_IAB11]: Ae.PROMOTION_INGAME_IAB11,
2524
+ [re.INGAME_IAB21_LBAR]: Ae.PROMOTION_INGAME_IAB21_LBAR,
2525
+ [re.INGAME_IAB61]: Ae.PROMOTION_INGAME_IAB61,
2526
+ [re.EXTERNAL_AD]: Ae.PROMOTION_GAM
2504
2527
  };
2505
- class es {
2528
+ class rs {
2506
2529
  analytics;
2507
2530
  constructor(e) {
2508
2531
  this.analytics = e, this.analytics.onConnect(() => {
2509
2532
  const r = (n) => {
2510
2533
  if (!n.slEventBus?.skipAnalytics && n.slEventBus?.type === "advertisement") {
2511
- const i = n.slEventBus.payload.type ? Zo[n.slEventBus.payload.type] : we.UNSET;
2534
+ const i = n.slEventBus.payload.type ? ts[n.slEventBus.payload.type] : Ae.UNSET;
2512
2535
  switch (n.slEventBus.action) {
2513
2536
  case "videoPlay":
2514
2537
  this.videoPlay(n.slEventBus.payload, { topicSubType: i });
@@ -2540,7 +2563,7 @@ class es {
2540
2563
  topicType: x.POLLS_PROMOTION,
2541
2564
  topicSubType: r
2542
2565
  },
2543
- pollOpenedFrom: re.UNSET
2566
+ pollOpenedFrom: ne.UNSET
2544
2567
  });
2545
2568
  };
2546
2569
  opened = ({ id: e }, { topicSubType: r }) => {
@@ -2552,7 +2575,7 @@ class es {
2552
2575
  topicType: x.POLLS_PROMOTION,
2553
2576
  topicSubType: r
2554
2577
  },
2555
- pollOpenedFrom: re.UNSET
2578
+ pollOpenedFrom: ne.UNSET
2556
2579
  });
2557
2580
  };
2558
2581
  videoPlay = ({ id: e }, { topicSubType: r }) => {
@@ -2564,7 +2587,7 @@ class es {
2564
2587
  topicType: x.POLLS_PROMOTION,
2565
2588
  topicSubType: r
2566
2589
  },
2567
- pollOpenedFrom: re.UNSET
2590
+ pollOpenedFrom: ne.UNSET
2568
2591
  });
2569
2592
  };
2570
2593
  buttonSelect = ({ id: e }, { topicSubType: r }) => {
@@ -2576,7 +2599,7 @@ class es {
2576
2599
  topicType: x.POLLS_PROMOTION,
2577
2600
  topicSubType: r
2578
2601
  },
2579
- pollOpenedFrom: re.UNSET
2602
+ pollOpenedFrom: ne.UNSET
2580
2603
  });
2581
2604
  };
2582
2605
  bannerSelect = ({ id: e }, { topicSubType: r }) => {
@@ -2588,7 +2611,7 @@ class es {
2588
2611
  topicType: x.POLLS_PROMOTION,
2589
2612
  topicSubType: r
2590
2613
  },
2591
- pollOpenedFrom: re.UNSET
2614
+ pollOpenedFrom: ne.UNSET
2592
2615
  });
2593
2616
  };
2594
2617
  }
@@ -2601,8 +2624,8 @@ const Ze = {
2601
2624
  [_.TRIVIA]: x.POLLS_TRIVIA,
2602
2625
  [_.TWEET]: x.POLLS_TWITTER
2603
2626
  };
2604
- _.UNSET + "", fe.UNSET, _.FACTOID + "", fe.POLLS, _.POLL + "", fe.POLLS, _.PREDICTION + "", fe.POLLS, _.PROMOTION + "", fe.POLLS, _.TRIVIA + "", fe.POLLS, _.TWEET + "", fe.POLLS;
2605
- const ts = {
2627
+ _.UNSET + "", pe.UNSET, _.FACTOID + "", pe.POLLS, _.POLL + "", pe.POLLS, _.PREDICTION + "", pe.POLLS, _.PROMOTION + "", pe.POLLS, _.TRIVIA + "", pe.POLLS, _.TWEET + "", pe.POLLS;
2628
+ const ns = {
2606
2629
  [D.UNSET]: z.UNSET,
2607
2630
  [D.INPLAY]: z.INPLAY,
2608
2631
  [D.MESSAGING]: z.MESSAGING,
@@ -2622,7 +2645,7 @@ const ts = {
2622
2645
  [D.HIGHLIGHTS]: z.HIGHLIGHTS,
2623
2646
  [D.PUBLIC_CHAT]: z.PUBLIC_CHAT
2624
2647
  };
2625
- class rs {
2648
+ class is {
2626
2649
  analytics;
2627
2650
  constructor(e) {
2628
2651
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2648,8 +2671,8 @@ class rs {
2648
2671
  topicId: e,
2649
2672
  topicType: r ? Ze[r] : x.UNSET
2650
2673
  },
2651
- notificationKind: fe.POLLS,
2652
- notificationType: Qr.IN_APP
2674
+ notificationKind: pe.POLLS,
2675
+ notificationType: Gr.IN_APP
2653
2676
  });
2654
2677
  };
2655
2678
  opened = ({ questionId: e, questionType: r }) => {
@@ -2660,12 +2683,12 @@ class rs {
2660
2683
  topicId: e,
2661
2684
  topicType: r ? Ze[r] : x.UNSET
2662
2685
  },
2663
- notificationKind: fe.POLLS,
2664
- notificationType: Qr.IN_APP
2686
+ notificationKind: pe.POLLS,
2687
+ notificationType: Gr.IN_APP
2665
2688
  });
2666
2689
  };
2667
2690
  }
2668
- class ns {
2691
+ class os {
2669
2692
  analytics;
2670
2693
  constructor(e) {
2671
2694
  this.analytics = e, this.analytics.onConnect(() => {
@@ -2701,7 +2724,7 @@ class ns {
2701
2724
  topicId: e,
2702
2725
  topicType: r ? Ze[r] : x.UNSET
2703
2726
  },
2704
- pollOpenedFrom: re.UNSET
2727
+ pollOpenedFrom: ne.UNSET
2705
2728
  });
2706
2729
  };
2707
2730
  // poll is opened from notification or list
@@ -2713,7 +2736,7 @@ class ns {
2713
2736
  topicId: e,
2714
2737
  topicType: r ? Ze[r] : x.UNSET
2715
2738
  },
2716
- pollOpenedFrom: n === "list" ? re.PICK_HISTORY : re.IN_APP
2739
+ pollOpenedFrom: n === "list" ? ne.PICK_HISTORY : ne.IN_APP
2717
2740
  });
2718
2741
  };
2719
2742
  // poll is voted
@@ -2725,7 +2748,7 @@ class ns {
2725
2748
  topicId: e,
2726
2749
  topicType: r ? Ze[r] : x.UNSET
2727
2750
  },
2728
- pollOpenedFrom: re.UNSET
2751
+ pollOpenedFrom: ne.UNSET
2729
2752
  });
2730
2753
  };
2731
2754
  // onboarding passed, user is now able to vote
@@ -2735,7 +2758,7 @@ class ns {
2735
2758
  ...this.analytics.commonStore.getValues(),
2736
2759
  kind: Q.GAMES_JOINED
2737
2760
  },
2738
- pollOpenedFrom: re.UNSET
2761
+ pollOpenedFrom: ne.UNSET
2739
2762
  });
2740
2763
  };
2741
2764
  // user clicked on link in poll and navigated to another page
@@ -2745,13 +2768,13 @@ class ns {
2745
2768
  ...this.analytics.commonStore.getValues(),
2746
2769
  kind: Q.POLLS_NAVIGATED
2747
2770
  },
2748
- pollOpenedFrom: re.UNSET
2771
+ pollOpenedFrom: ne.UNSET
2749
2772
  });
2750
2773
  };
2751
2774
  }
2752
- const is = ({ transport: t, $commonStore: e }) => {
2775
+ const ss = ({ transport: t, $commonStore: e }) => {
2753
2776
  let r;
2754
- const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(En, {
2777
+ const n = U(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(Tn, {
2755
2778
  method: "send",
2756
2779
  params: [n]
2757
2780
  }), a = t.nanoquery.createFetcherStore(s, {
@@ -2770,24 +2793,24 @@ const is = ({ transport: t, $commonStore: e }) => {
2770
2793
  }
2771
2794
  });
2772
2795
  } catch (v) {
2773
- me.error(v, "send heartbeat failed");
2796
+ ge.error(v, "send heartbeat failed");
2774
2797
  }
2775
2798
  return Date.now();
2776
2799
  },
2777
2800
  refetchInterval: i
2778
2801
  }), u = () => {
2779
- me.debug("mounted heartbeat"), r = a.subscribe(() => {
2802
+ ge.debug("mounted heartbeat"), r = a.subscribe(() => {
2780
2803
  });
2781
- }, d = () => {
2782
- me.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
2804
+ }, l = () => {
2805
+ ge.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
2783
2806
  }, c = () => {
2784
- me.debug("disabled heartbeat"), n.set(!1);
2807
+ ge.debug("disabled heartbeat"), n.set(!1);
2785
2808
  };
2786
- return { enable: d, disable: c, mount: u, unmount: () => {
2787
- me.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2809
+ return { enable: l, disable: c, mount: u, unmount: () => {
2810
+ ge.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
2788
2811
  } };
2789
- }, me = ve("analytics");
2790
- class os {
2812
+ }, ge = Se("analytics");
2813
+ class as {
2791
2814
  commonStore;
2792
2815
  notifications;
2793
2816
  polls;
@@ -2800,23 +2823,23 @@ class os {
2800
2823
  listenersCancels;
2801
2824
  connected = !1;
2802
2825
  constructor(e) {
2803
- this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ce(J({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = is({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new rs(this), this.polls = new ns(this), this.invitation = new Jo(this), this.interactions = new Xo(this), this.advertisement = new es(this);
2804
- const { client: r } = e.analyticsTransport.createPromiseClient(En, {
2826
+ this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ce(J({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ss({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new is(this), this.polls = new os(this), this.invitation = new Zo(this), this.interactions = new es(this), this.advertisement = new rs(this);
2827
+ const { client: r } = e.analyticsTransport.createPromiseClient(Tn, {
2805
2828
  method: "send"
2806
2829
  });
2807
2830
  this.analyticsClient = r;
2808
2831
  }
2809
2832
  connect = () => {
2810
- this.writeCommon("sessionId", rr()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, me.debug("analytics connected");
2833
+ this.writeCommon("sessionId", nr()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, ge.debug("analytics connected");
2811
2834
  };
2812
2835
  disconnect = () => {
2813
- this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, me.debug("analytics disconnected");
2836
+ this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, ge.debug("analytics disconnected");
2814
2837
  };
2815
2838
  write = (e, r) => {
2816
2839
  r && this.analyticsClient.unary({ message: { case: e, value: r } }).then(() => {
2817
- me.trace("send analytics success", e, r);
2840
+ ge.trace("send analytics success", e, r);
2818
2841
  }).catch((n) => {
2819
- me.error(n, "send analytics failed");
2842
+ ge.error(n, "send analytics failed");
2820
2843
  });
2821
2844
  };
2822
2845
  writeCommon = (e, r) => {
@@ -2830,10 +2853,10 @@ class os {
2830
2853
  this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
2831
2854
  this.writeCommon("eventId", r);
2832
2855
  })), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
2833
- r && this.writeCommon("category", ts[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", rr()) : this.writeCommon("overlaySessionId", "");
2856
+ r && this.writeCommon("category", ns[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", nr()) : this.writeCommon("overlaySessionId", "");
2834
2857
  })), this.onConnect(() => {
2835
2858
  const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
2836
- this.writeCommon("screenOrientation", i.matches ? Ur.PORTRAIT : Ur.LANDSCAPE);
2859
+ this.writeCommon("screenOrientation", i.matches ? xr.PORTRAIT : xr.LANDSCAPE);
2837
2860
  };
2838
2861
  return r.addEventListener("change", n), () => {
2839
2862
  r.removeEventListener("change", n);
@@ -2843,17 +2866,17 @@ class os {
2843
2866
  }));
2844
2867
  };
2845
2868
  }
2846
- const ss = (t, e, r) => {
2847
- t.analytics = new os(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
2869
+ const us = (t, e, r) => {
2870
+ t.analytics = new as(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
2848
2871
  t.analytics.disconnect();
2849
2872
  })), r();
2850
2873
  };
2851
- var vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2852
- function as(t) {
2874
+ var Sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2875
+ function cs(t) {
2853
2876
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
2854
2877
  }
2855
- var Sr = { exports: {} }, wr = { exports: {} };
2856
- function us(t) {
2878
+ var wr = { exports: {} }, Ar = { exports: {} };
2879
+ function ls(t) {
2857
2880
  var e = new t(), r = e;
2858
2881
  function n() {
2859
2882
  var o = e;
@@ -2867,12 +2890,12 @@ function us(t) {
2867
2890
  release: i
2868
2891
  };
2869
2892
  }
2870
- var cs = us, ls = cs;
2871
- function $n(t, e, r) {
2893
+ var ds = ls, fs = ds;
2894
+ function Mn(t, e, r) {
2872
2895
  if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
2873
2896
  throw new Error("fastqueue concurrency must be equal to or greater than 1");
2874
- var n = ls(ds), i = null, o = null, s = 0, a = null, u = {
2875
- push: g,
2897
+ var n = fs(ps), i = null, o = null, s = 0, a = null, u = {
2898
+ push: b,
2876
2899
  drain: W,
2877
2900
  saturated: W,
2878
2901
  pause: c,
@@ -2887,9 +2910,9 @@ function $n(t, e, r) {
2887
2910
  for (; i && s < r; )
2888
2911
  s++, C();
2889
2912
  },
2890
- running: d,
2913
+ running: l,
2891
2914
  resume: v,
2892
- idle: b,
2915
+ idle: g,
2893
2916
  length: f,
2894
2917
  getQueue: p,
2895
2918
  unshift: S,
@@ -2899,7 +2922,7 @@ function $n(t, e, r) {
2899
2922
  error: ee
2900
2923
  };
2901
2924
  return u;
2902
- function d() {
2925
+ function l() {
2903
2926
  return s;
2904
2927
  }
2905
2928
  function c() {
@@ -2925,10 +2948,10 @@ function $n(t, e, r) {
2925
2948
  s++, C();
2926
2949
  }
2927
2950
  }
2928
- function b() {
2951
+ function g() {
2929
2952
  return s === 0 && u.length() === 0;
2930
2953
  }
2931
- function g(P, V) {
2954
+ function b(P, V) {
2932
2955
  var T = n.get();
2933
2956
  T.context = t, T.release = C, T.value = P, T.callback = V || W, T.errorHandler = a, s >= r || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
2934
2957
  }
@@ -2953,7 +2976,7 @@ function $n(t, e, r) {
2953
2976
  }
2954
2977
  function W() {
2955
2978
  }
2956
- function ds() {
2979
+ function ps() {
2957
2980
  this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
2958
2981
  var t = this;
2959
2982
  this.worked = function(r, n) {
@@ -2961,40 +2984,40 @@ function ds() {
2961
2984
  t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
2962
2985
  };
2963
2986
  }
2964
- function fs(t, e, r) {
2987
+ function hs(t, e, r) {
2965
2988
  typeof t == "function" && (r = e, e = t, t = null);
2966
2989
  function n(c, f) {
2967
2990
  e.call(this, c).then(function(p) {
2968
2991
  f(null, p);
2969
2992
  }, f);
2970
2993
  }
2971
- var i = $n(t, n, r), o = i.push, s = i.unshift;
2972
- return i.push = a, i.unshift = u, i.drained = d, i;
2994
+ var i = Mn(t, n, r), o = i.push, s = i.unshift;
2995
+ return i.push = a, i.unshift = u, i.drained = l, i;
2973
2996
  function a(c) {
2974
2997
  var f = new Promise(function(p, v) {
2975
- o(c, function(b, g) {
2976
- if (b) {
2977
- v(b);
2998
+ o(c, function(g, b) {
2999
+ if (g) {
3000
+ v(g);
2978
3001
  return;
2979
3002
  }
2980
- p(g);
3003
+ p(b);
2981
3004
  });
2982
3005
  });
2983
3006
  return f.catch(W), f;
2984
3007
  }
2985
3008
  function u(c) {
2986
3009
  var f = new Promise(function(p, v) {
2987
- s(c, function(b, g) {
2988
- if (b) {
2989
- v(b);
3010
+ s(c, function(g, b) {
3011
+ if (g) {
3012
+ v(g);
2990
3013
  return;
2991
3014
  }
2992
- p(g);
3015
+ p(b);
2993
3016
  });
2994
3017
  });
2995
3018
  return f.catch(W), f;
2996
3019
  }
2997
- function d() {
3020
+ function l() {
2998
3021
  if (i.idle())
2999
3022
  return new Promise(function(p) {
3000
3023
  p();
@@ -3007,17 +3030,17 @@ function fs(t, e, r) {
3007
3030
  return f;
3008
3031
  }
3009
3032
  }
3010
- wr.exports = $n;
3011
- wr.exports.promise = fs;
3012
- var Mn = wr.exports, Ar = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, Xr = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
3033
+ Ar.exports = Mn;
3034
+ Ar.exports.promise = hs;
3035
+ var jn = Ar.exports, Er = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, Zr = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
3013
3036
  return Function.prototype.apply.call(e, r, n);
3014
- }, pt;
3015
- Qe && typeof Qe.ownKeys == "function" ? pt = Qe.ownKeys : Object.getOwnPropertySymbols ? pt = function(e) {
3037
+ }, ht;
3038
+ Qe && typeof Qe.ownKeys == "function" ? ht = Qe.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
3016
3039
  return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
3017
- } : pt = function(e) {
3040
+ } : ht = function(e) {
3018
3041
  return Object.getOwnPropertyNames(e);
3019
3042
  };
3020
- function ps(t) {
3043
+ function ys(t) {
3021
3044
  console && console.warn && console.warn(t);
3022
3045
  }
3023
3046
  var Bn = Number.isNaN || function(e) {
@@ -3026,26 +3049,26 @@ var Bn = Number.isNaN || function(e) {
3026
3049
  function N() {
3027
3050
  N.init.call(this);
3028
3051
  }
3029
- Ar.exports = N;
3030
- Ar.exports.once = gs;
3052
+ Er.exports = N;
3053
+ Er.exports.once = vs;
3031
3054
  N.EventEmitter = N;
3032
3055
  N.prototype._events = void 0;
3033
3056
  N.prototype._eventsCount = 0;
3034
3057
  N.prototype._maxListeners = void 0;
3035
- var Zr = 10;
3036
- function Pt(t) {
3058
+ var en = 10;
3059
+ function Nt(t) {
3037
3060
  if (typeof t != "function")
3038
3061
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
3039
3062
  }
3040
3063
  Object.defineProperty(N, "defaultMaxListeners", {
3041
3064
  enumerable: !0,
3042
3065
  get: function() {
3043
- return Zr;
3066
+ return en;
3044
3067
  },
3045
3068
  set: function(t) {
3046
3069
  if (typeof t != "number" || t < 0 || Bn(t))
3047
3070
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
3048
- Zr = t;
3071
+ en = t;
3049
3072
  }
3050
3073
  });
3051
3074
  N.init = function() {
@@ -3056,11 +3079,11 @@ N.prototype.setMaxListeners = function(e) {
3056
3079
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
3057
3080
  return this._maxListeners = e, this;
3058
3081
  };
3059
- function jn(t) {
3082
+ function Un(t) {
3060
3083
  return t._maxListeners === void 0 ? N.defaultMaxListeners : t._maxListeners;
3061
3084
  }
3062
3085
  N.prototype.getMaxListeners = function() {
3063
- return jn(this);
3086
+ return Un(this);
3064
3087
  };
3065
3088
  N.prototype.emit = function(e) {
3066
3089
  for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
@@ -3080,24 +3103,24 @@ N.prototype.emit = function(e) {
3080
3103
  if (u === void 0)
3081
3104
  return !1;
3082
3105
  if (typeof u == "function")
3083
- Xr(u, this, r);
3106
+ Zr(u, this, r);
3084
3107
  else
3085
- for (var d = u.length, c = Gn(u, d), n = 0; n < d; ++n)
3086
- Xr(c[n], this, r);
3108
+ for (var l = u.length, c = Kn(u, l), n = 0; n < l; ++n)
3109
+ Zr(c[n], this, r);
3087
3110
  return !0;
3088
3111
  };
3089
3112
  function qn(t, e, r, n) {
3090
3113
  var i, o, s;
3091
- if (Pt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
3114
+ if (Nt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
3092
3115
  "newListener",
3093
3116
  e,
3094
3117
  r.listener ? r.listener : r
3095
3118
  ), o = t._events), s = o[e]), s === void 0)
3096
3119
  s = o[e] = r, ++t._eventsCount;
3097
- else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = jn(t), i > 0 && s.length > i && !s.warned) {
3120
+ else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Un(t), i > 0 && s.length > i && !s.warned) {
3098
3121
  s.warned = !0;
3099
3122
  var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
3100
- a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, ps(a);
3123
+ a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, ys(a);
3101
3124
  }
3102
3125
  return t;
3103
3126
  }
@@ -3108,23 +3131,23 @@ N.prototype.on = N.prototype.addListener;
3108
3131
  N.prototype.prependListener = function(e, r) {
3109
3132
  return qn(this, e, r, !0);
3110
3133
  };
3111
- function hs() {
3134
+ function ms() {
3112
3135
  if (!this.fired)
3113
3136
  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);
3114
3137
  }
3115
- function Un(t, e, r) {
3116
- var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = hs.bind(n);
3138
+ function xn(t, e, r) {
3139
+ var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ms.bind(n);
3117
3140
  return i.listener = r, n.wrapFn = i, i;
3118
3141
  }
3119
3142
  N.prototype.once = function(e, r) {
3120
- return Pt(r), this.on(e, Un(this, e, r)), this;
3143
+ return Nt(r), this.on(e, xn(this, e, r)), this;
3121
3144
  };
3122
3145
  N.prototype.prependOnceListener = function(e, r) {
3123
- return Pt(r), this.prependListener(e, Un(this, e, r)), this;
3146
+ return Nt(r), this.prependListener(e, xn(this, e, r)), this;
3124
3147
  };
3125
3148
  N.prototype.removeListener = function(e, r) {
3126
3149
  var n, i, o, s, a;
3127
- if (Pt(r), i = this._events, i === void 0)
3150
+ if (Nt(r), i = this._events, i === void 0)
3128
3151
  return this;
3129
3152
  if (n = i[e], n === void 0)
3130
3153
  return this;
@@ -3138,7 +3161,7 @@ N.prototype.removeListener = function(e, r) {
3138
3161
  }
3139
3162
  if (o < 0)
3140
3163
  return this;
3141
- o === 0 ? n.shift() : ys(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
3164
+ o === 0 ? n.shift() : gs(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
3142
3165
  }
3143
3166
  return this;
3144
3167
  };
@@ -3162,24 +3185,24 @@ N.prototype.removeAllListeners = function(e) {
3162
3185
  this.removeListener(e, r[i]);
3163
3186
  return this;
3164
3187
  };
3165
- function xn(t, e, r) {
3188
+ function Qn(t, e, r) {
3166
3189
  var n = t._events;
3167
3190
  if (n === void 0)
3168
3191
  return [];
3169
3192
  var i = n[e];
3170
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? ms(i) : Gn(i, i.length);
3193
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? bs(i) : Kn(i, i.length);
3171
3194
  }
3172
3195
  N.prototype.listeners = function(e) {
3173
- return xn(this, e, !0);
3196
+ return Qn(this, e, !0);
3174
3197
  };
3175
3198
  N.prototype.rawListeners = function(e) {
3176
- return xn(this, e, !1);
3199
+ return Qn(this, e, !1);
3177
3200
  };
3178
3201
  N.listenerCount = function(t, e) {
3179
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : Qn.call(t, e);
3202
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : Gn.call(t, e);
3180
3203
  };
3181
- N.prototype.listenerCount = Qn;
3182
- function Qn(t) {
3204
+ N.prototype.listenerCount = Gn;
3205
+ function Gn(t) {
3183
3206
  var e = this._events;
3184
3207
  if (e !== void 0) {
3185
3208
  var r = e[t];
@@ -3191,24 +3214,24 @@ function Qn(t) {
3191
3214
  return 0;
3192
3215
  }
3193
3216
  N.prototype.eventNames = function() {
3194
- return this._eventsCount > 0 ? pt(this._events) : [];
3217
+ return this._eventsCount > 0 ? ht(this._events) : [];
3195
3218
  };
3196
- function Gn(t, e) {
3219
+ function Kn(t, e) {
3197
3220
  for (var r = new Array(e), n = 0; n < e; ++n)
3198
3221
  r[n] = t[n];
3199
3222
  return r;
3200
3223
  }
3201
- function ys(t, e) {
3224
+ function gs(t, e) {
3202
3225
  for (; e + 1 < t.length; e++)
3203
3226
  t[e] = t[e + 1];
3204
3227
  t.pop();
3205
3228
  }
3206
- function ms(t) {
3229
+ function bs(t) {
3207
3230
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
3208
3231
  e[r] = t[r].listener || t[r];
3209
3232
  return e;
3210
3233
  }
3211
- function gs(t, e) {
3234
+ function vs(t, e) {
3212
3235
  return new Promise(function(r, n) {
3213
3236
  function i(s) {
3214
3237
  t.removeListener(e, o), n(s);
@@ -3216,13 +3239,13 @@ function gs(t, e) {
3216
3239
  function o() {
3217
3240
  typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
3218
3241
  }
3219
- Kn(t, e, o, { once: !0 }), e !== "error" && bs(t, i, { once: !0 });
3242
+ zn(t, e, o, { once: !0 }), e !== "error" && Ss(t, i, { once: !0 });
3220
3243
  });
3221
3244
  }
3222
- function bs(t, e, r) {
3223
- typeof t.on == "function" && Kn(t, "error", e, r);
3245
+ function Ss(t, e, r) {
3246
+ typeof t.on == "function" && zn(t, "error", e, r);
3224
3247
  }
3225
- function Kn(t, e, r, n) {
3248
+ function zn(t, e, r, n) {
3226
3249
  if (typeof t.on == "function")
3227
3250
  n.once ? t.once(e, r) : t.on(e, r);
3228
3251
  else if (typeof t.addEventListener == "function")
@@ -3232,7 +3255,7 @@ function Kn(t, e, r, n) {
3232
3255
  else
3233
3256
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
3234
3257
  }
3235
- var zn = Ar.exports, Nt = {}, Hn = {}, Wn = function() {
3258
+ var Hn = Er.exports, Ft = {}, Wn = {}, Yn = function() {
3236
3259
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
3237
3260
  return !1;
3238
3261
  if (typeof Symbol.iterator == "symbol")
@@ -3255,56 +3278,56 @@ var zn = Ar.exports, Nt = {}, Hn = {}, Wn = function() {
3255
3278
  return !1;
3256
3279
  }
3257
3280
  return !0;
3258
- }, vs = Wn, Ft = function() {
3259
- return vs() && !!Symbol.toStringTag;
3260
- }, Ss = Error, ws = EvalError, As = RangeError, Is = ReferenceError, Yn = SyntaxError, Dt = TypeError, Es = URIError, en = typeof Symbol < "u" && Symbol, Ts = Wn, Os = function() {
3261
- return typeof en != "function" || typeof Symbol != "function" || typeof en("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ts();
3281
+ }, ws = Yn, Dt = function() {
3282
+ return ws() && !!Symbol.toStringTag;
3283
+ }, As = Error, Es = EvalError, Is = RangeError, Ts = ReferenceError, Jn = SyntaxError, Rt = TypeError, Os = URIError, tn = typeof Symbol < "u" && Symbol, _s = Yn, Cs = function() {
3284
+ return typeof tn != "function" || typeof Symbol != "function" || typeof tn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : _s();
3262
3285
  }, Bt = {
3263
3286
  __proto__: null,
3264
3287
  foo: {}
3265
- }, _s = Object, Cs = function() {
3266
- return { __proto__: Bt }.foo === Bt.foo && !(Bt instanceof _s);
3267
- }, Ls = "Function.prototype.bind called on incompatible ", ks = Object.prototype.toString, Ps = Math.max, Ns = "[object Function]", tn = function(e, r) {
3288
+ }, Ls = Object, ks = function() {
3289
+ return { __proto__: Bt }.foo === Bt.foo && !(Bt instanceof Ls);
3290
+ }, Ps = "Function.prototype.bind called on incompatible ", Ns = Object.prototype.toString, Fs = Math.max, Ds = "[object Function]", rn = function(e, r) {
3268
3291
  for (var n = [], i = 0; i < e.length; i += 1)
3269
3292
  n[i] = e[i];
3270
3293
  for (var o = 0; o < r.length; o += 1)
3271
3294
  n[o + e.length] = r[o];
3272
3295
  return n;
3273
- }, Fs = function(e, r) {
3296
+ }, Rs = function(e, r) {
3274
3297
  for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
3275
3298
  n[o] = e[i];
3276
3299
  return n;
3277
- }, Ds = function(t, e) {
3300
+ }, Vs = function(t, e) {
3278
3301
  for (var r = "", n = 0; n < t.length; n += 1)
3279
3302
  r += t[n], n + 1 < t.length && (r += e);
3280
3303
  return r;
3281
- }, Rs = function(e) {
3304
+ }, $s = function(e) {
3282
3305
  var r = this;
3283
- if (typeof r != "function" || ks.apply(r) !== Ns)
3284
- throw new TypeError(Ls + r);
3285
- for (var n = Fs(arguments, 1), i, o = function() {
3306
+ if (typeof r != "function" || Ns.apply(r) !== Ds)
3307
+ throw new TypeError(Ps + r);
3308
+ for (var n = Rs(arguments, 1), i, o = function() {
3286
3309
  if (this instanceof i) {
3287
3310
  var c = r.apply(
3288
3311
  this,
3289
- tn(n, arguments)
3312
+ rn(n, arguments)
3290
3313
  );
3291
3314
  return Object(c) === c ? c : this;
3292
3315
  }
3293
3316
  return r.apply(
3294
3317
  e,
3295
- tn(n, arguments)
3318
+ rn(n, arguments)
3296
3319
  );
3297
- }, s = Ps(0, r.length - n.length), a = [], u = 0; u < s; u++)
3320
+ }, s = Fs(0, r.length - n.length), a = [], u = 0; u < s; u++)
3298
3321
  a[u] = "$" + u;
3299
- if (i = Function("binder", "return function (" + Ds(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3300
- var d = function() {
3322
+ if (i = Function("binder", "return function (" + Vs(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
3323
+ var l = function() {
3301
3324
  };
3302
- d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
3325
+ l.prototype = r.prototype, i.prototype = new l(), l.prototype = null;
3303
3326
  }
3304
3327
  return i;
3305
- }, Vs = Rs, Ir = Function.prototype.bind || Vs, $s = Function.prototype.call, Ms = Object.prototype.hasOwnProperty, Bs = Ir, js = Bs.call($s, Ms), E, qs = Ss, Us = ws, xs = As, Qs = Is, Ke = Yn, Ge = Dt, Gs = Es, Jn = Function, jt = function(t) {
3328
+ }, Ms = $s, Ir = Function.prototype.bind || Ms, js = Function.prototype.call, Bs = Object.prototype.hasOwnProperty, Us = Ir, qs = Us.call(js, Bs), I, xs = As, Qs = Es, Gs = Is, Ks = Ts, Ke = Jn, Ge = Rt, zs = Os, Xn = Function, Ut = function(t) {
3306
3329
  try {
3307
- return Jn('"use strict"; return (' + t + ").constructor;")();
3330
+ return Xn('"use strict"; return (' + t + ").constructor;")();
3308
3331
  } catch {
3309
3332
  }
3310
3333
  }, ke = Object.getOwnPropertyDescriptor;
@@ -3316,7 +3339,7 @@ if (ke)
3316
3339
  }
3317
3340
  var qt = function() {
3318
3341
  throw new Ge();
3319
- }, Ks = ke ? function() {
3342
+ }, Hs = ke ? function() {
3320
3343
  try {
3321
3344
  return arguments.callee, qt;
3322
3345
  } catch {
@@ -3326,102 +3349,102 @@ var qt = function() {
3326
3349
  return qt;
3327
3350
  }
3328
3351
  }
3329
- }() : qt, $e = Os(), zs = Cs(), B = Object.getPrototypeOf || (zs ? function(t) {
3352
+ }() : qt, $e = Cs(), Ws = ks(), j = Object.getPrototypeOf || (Ws ? function(t) {
3330
3353
  return t.__proto__;
3331
- } : null), Be = {}, Hs = typeof Uint8Array > "u" || !B ? E : B(Uint8Array), Pe = {
3354
+ } : null), je = {}, Ys = typeof Uint8Array > "u" || !j ? I : j(Uint8Array), Pe = {
3332
3355
  __proto__: null,
3333
- "%AggregateError%": typeof AggregateError > "u" ? E : AggregateError,
3356
+ "%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
3334
3357
  "%Array%": Array,
3335
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? E : ArrayBuffer,
3336
- "%ArrayIteratorPrototype%": $e && B ? B([][Symbol.iterator]()) : E,
3337
- "%AsyncFromSyncIteratorPrototype%": E,
3338
- "%AsyncFunction%": Be,
3339
- "%AsyncGenerator%": Be,
3340
- "%AsyncGeneratorFunction%": Be,
3341
- "%AsyncIteratorPrototype%": Be,
3342
- "%Atomics%": typeof Atomics > "u" ? E : Atomics,
3343
- "%BigInt%": typeof BigInt > "u" ? E : BigInt,
3344
- "%BigInt64Array%": typeof BigInt64Array > "u" ? E : BigInt64Array,
3345
- "%BigUint64Array%": typeof BigUint64Array > "u" ? E : BigUint64Array,
3358
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? I : ArrayBuffer,
3359
+ "%ArrayIteratorPrototype%": $e && j ? j([][Symbol.iterator]()) : I,
3360
+ "%AsyncFromSyncIteratorPrototype%": I,
3361
+ "%AsyncFunction%": je,
3362
+ "%AsyncGenerator%": je,
3363
+ "%AsyncGeneratorFunction%": je,
3364
+ "%AsyncIteratorPrototype%": je,
3365
+ "%Atomics%": typeof Atomics > "u" ? I : Atomics,
3366
+ "%BigInt%": typeof BigInt > "u" ? I : BigInt,
3367
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? I : BigInt64Array,
3368
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? I : BigUint64Array,
3346
3369
  "%Boolean%": Boolean,
3347
- "%DataView%": typeof DataView > "u" ? E : DataView,
3370
+ "%DataView%": typeof DataView > "u" ? I : DataView,
3348
3371
  "%Date%": Date,
3349
3372
  "%decodeURI%": decodeURI,
3350
3373
  "%decodeURIComponent%": decodeURIComponent,
3351
3374
  "%encodeURI%": encodeURI,
3352
3375
  "%encodeURIComponent%": encodeURIComponent,
3353
- "%Error%": qs,
3376
+ "%Error%": xs,
3354
3377
  "%eval%": eval,
3355
3378
  // eslint-disable-line no-eval
3356
- "%EvalError%": Us,
3357
- "%Float32Array%": typeof Float32Array > "u" ? E : Float32Array,
3358
- "%Float64Array%": typeof Float64Array > "u" ? E : Float64Array,
3359
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? E : FinalizationRegistry,
3360
- "%Function%": Jn,
3361
- "%GeneratorFunction%": Be,
3362
- "%Int8Array%": typeof Int8Array > "u" ? E : Int8Array,
3363
- "%Int16Array%": typeof Int16Array > "u" ? E : Int16Array,
3364
- "%Int32Array%": typeof Int32Array > "u" ? E : Int32Array,
3379
+ "%EvalError%": Qs,
3380
+ "%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
3381
+ "%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
3382
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
3383
+ "%Function%": Xn,
3384
+ "%GeneratorFunction%": je,
3385
+ "%Int8Array%": typeof Int8Array > "u" ? I : Int8Array,
3386
+ "%Int16Array%": typeof Int16Array > "u" ? I : Int16Array,
3387
+ "%Int32Array%": typeof Int32Array > "u" ? I : Int32Array,
3365
3388
  "%isFinite%": isFinite,
3366
3389
  "%isNaN%": isNaN,
3367
- "%IteratorPrototype%": $e && B ? B(B([][Symbol.iterator]())) : E,
3368
- "%JSON%": typeof JSON == "object" ? JSON : E,
3369
- "%Map%": typeof Map > "u" ? E : Map,
3370
- "%MapIteratorPrototype%": typeof Map > "u" || !$e || !B ? E : B((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3390
+ "%IteratorPrototype%": $e && j ? j(j([][Symbol.iterator]())) : I,
3391
+ "%JSON%": typeof JSON == "object" ? JSON : I,
3392
+ "%Map%": typeof Map > "u" ? I : Map,
3393
+ "%MapIteratorPrototype%": typeof Map > "u" || !$e || !j ? I : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3371
3394
  "%Math%": Math,
3372
3395
  "%Number%": Number,
3373
3396
  "%Object%": Object,
3374
3397
  "%parseFloat%": parseFloat,
3375
3398
  "%parseInt%": parseInt,
3376
- "%Promise%": typeof Promise > "u" ? E : Promise,
3377
- "%Proxy%": typeof Proxy > "u" ? E : Proxy,
3378
- "%RangeError%": xs,
3379
- "%ReferenceError%": Qs,
3380
- "%Reflect%": typeof Reflect > "u" ? E : Reflect,
3399
+ "%Promise%": typeof Promise > "u" ? I : Promise,
3400
+ "%Proxy%": typeof Proxy > "u" ? I : Proxy,
3401
+ "%RangeError%": Gs,
3402
+ "%ReferenceError%": Ks,
3403
+ "%Reflect%": typeof Reflect > "u" ? I : Reflect,
3381
3404
  "%RegExp%": RegExp,
3382
- "%Set%": typeof Set > "u" ? E : Set,
3383
- "%SetIteratorPrototype%": typeof Set > "u" || !$e || !B ? E : B((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3384
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? E : SharedArrayBuffer,
3405
+ "%Set%": typeof Set > "u" ? I : Set,
3406
+ "%SetIteratorPrototype%": typeof Set > "u" || !$e || !j ? I : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3407
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? I : SharedArrayBuffer,
3385
3408
  "%String%": String,
3386
- "%StringIteratorPrototype%": $e && B ? B(""[Symbol.iterator]()) : E,
3387
- "%Symbol%": $e ? Symbol : E,
3409
+ "%StringIteratorPrototype%": $e && j ? j(""[Symbol.iterator]()) : I,
3410
+ "%Symbol%": $e ? Symbol : I,
3388
3411
  "%SyntaxError%": Ke,
3389
- "%ThrowTypeError%": Ks,
3390
- "%TypedArray%": Hs,
3412
+ "%ThrowTypeError%": Hs,
3413
+ "%TypedArray%": Ys,
3391
3414
  "%TypeError%": Ge,
3392
- "%Uint8Array%": typeof Uint8Array > "u" ? E : Uint8Array,
3393
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? E : Uint8ClampedArray,
3394
- "%Uint16Array%": typeof Uint16Array > "u" ? E : Uint16Array,
3395
- "%Uint32Array%": typeof Uint32Array > "u" ? E : Uint32Array,
3396
- "%URIError%": Gs,
3397
- "%WeakMap%": typeof WeakMap > "u" ? E : WeakMap,
3398
- "%WeakRef%": typeof WeakRef > "u" ? E : WeakRef,
3399
- "%WeakSet%": typeof WeakSet > "u" ? E : WeakSet
3415
+ "%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
3416
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
3417
+ "%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
3418
+ "%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
3419
+ "%URIError%": zs,
3420
+ "%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
3421
+ "%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
3422
+ "%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
3400
3423
  };
3401
- if (B)
3424
+ if (j)
3402
3425
  try {
3403
3426
  null.error;
3404
3427
  } catch (t) {
3405
- var Ws = B(B(t));
3406
- Pe["%Error.prototype%"] = Ws;
3428
+ var Js = j(j(t));
3429
+ Pe["%Error.prototype%"] = Js;
3407
3430
  }
3408
- var Ys = function t(e) {
3431
+ var Xs = function t(e) {
3409
3432
  var r;
3410
3433
  if (e === "%AsyncFunction%")
3411
- r = jt("async function () {}");
3434
+ r = Ut("async function () {}");
3412
3435
  else if (e === "%GeneratorFunction%")
3413
- r = jt("function* () {}");
3436
+ r = Ut("function* () {}");
3414
3437
  else if (e === "%AsyncGeneratorFunction%")
3415
- r = jt("async function* () {}");
3438
+ r = Ut("async function* () {}");
3416
3439
  else if (e === "%AsyncGenerator%") {
3417
3440
  var n = t("%AsyncGeneratorFunction%");
3418
3441
  n && (r = n.prototype);
3419
3442
  } else if (e === "%AsyncIteratorPrototype%") {
3420
3443
  var i = t("%AsyncGenerator%");
3421
- i && B && (r = B(i.prototype));
3444
+ i && j && (r = j(i.prototype));
3422
3445
  }
3423
3446
  return Pe[e] = r, r;
3424
- }, rn = {
3447
+ }, nn = {
3425
3448
  __proto__: null,
3426
3449
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
3427
3450
  "%ArrayPrototype%": ["Array", "prototype"],
@@ -3474,21 +3497,21 @@ var Ys = function t(e) {
3474
3497
  "%URIErrorPrototype%": ["URIError", "prototype"],
3475
3498
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3476
3499
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3477
- }, it = Ir, wt = js, Js = it.call(Function.call, Array.prototype.concat), Xs = it.call(Function.apply, Array.prototype.splice), nn = it.call(Function.call, String.prototype.replace), At = it.call(Function.call, String.prototype.slice), Zs = it.call(Function.call, RegExp.prototype.exec), ea = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ta = /\\(\\)?/g, ra = function(e) {
3478
- var r = At(e, 0, 1), n = At(e, -1);
3500
+ }, it = Ir, At = qs, Zs = it.call(Function.call, Array.prototype.concat), ea = it.call(Function.apply, Array.prototype.splice), on = it.call(Function.call, String.prototype.replace), Et = it.call(Function.call, String.prototype.slice), ta = it.call(Function.call, RegExp.prototype.exec), ra = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, na = /\\(\\)?/g, ia = function(e) {
3501
+ var r = Et(e, 0, 1), n = Et(e, -1);
3479
3502
  if (r === "%" && n !== "%")
3480
3503
  throw new Ke("invalid intrinsic syntax, expected closing `%`");
3481
3504
  if (n === "%" && r !== "%")
3482
3505
  throw new Ke("invalid intrinsic syntax, expected opening `%`");
3483
3506
  var i = [];
3484
- return nn(e, ea, function(o, s, a, u) {
3485
- i[i.length] = a ? nn(u, ta, "$1") : s || o;
3507
+ return on(e, ra, function(o, s, a, u) {
3508
+ i[i.length] = a ? on(u, na, "$1") : s || o;
3486
3509
  }), i;
3487
- }, na = function(e, r) {
3510
+ }, oa = function(e, r) {
3488
3511
  var n = e, i;
3489
- if (wt(rn, n) && (i = rn[n], n = "%" + i[0] + "%"), wt(Pe, n)) {
3512
+ if (At(nn, n) && (i = nn[n], n = "%" + i[0] + "%"), At(Pe, n)) {
3490
3513
  var o = Pe[n];
3491
- if (o === Be && (o = Ys(n)), typeof o > "u" && !r)
3514
+ if (o === je && (o = Xs(n)), typeof o > "u" && !r)
3492
3515
  throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
3493
3516
  return {
3494
3517
  alias: i,
@@ -3502,15 +3525,15 @@ var Ys = function t(e) {
3502
3525
  throw new Ge("intrinsic name must be a non-empty string");
3503
3526
  if (arguments.length > 1 && typeof r != "boolean")
3504
3527
  throw new Ge('"allowMissing" argument must be a boolean');
3505
- if (Zs(/^%?[^%]*%?$/, e) === null)
3528
+ if (ta(/^%?[^%]*%?$/, e) === null)
3506
3529
  throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3507
- var n = ra(e), i = n.length > 0 ? n[0] : "", o = na("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
3508
- d && (i = d[0], Xs(n, Js([0, 1], d)));
3530
+ var n = ia(e), i = n.length > 0 ? n[0] : "", o = oa("%" + i + "%", r), s = o.name, a = o.value, u = !1, l = o.alias;
3531
+ l && (i = l[0], ea(n, Zs([0, 1], l)));
3509
3532
  for (var c = 1, f = !0; c < n.length; c += 1) {
3510
- var p = n[c], v = At(p, 0, 1), b = At(p, -1);
3511
- if ((v === '"' || v === "'" || v === "`" || b === '"' || b === "'" || b === "`") && v !== b)
3533
+ var p = n[c], v = Et(p, 0, 1), g = Et(p, -1);
3534
+ if ((v === '"' || v === "'" || v === "`" || g === '"' || g === "'" || g === "`") && v !== g)
3512
3535
  throw new Ke("property names with quotes must have matching quotes");
3513
- if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", wt(Pe, s))
3536
+ if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", At(Pe, s))
3514
3537
  a = Pe[s];
3515
3538
  else if (a != null) {
3516
3539
  if (!(p in a)) {
@@ -3519,18 +3542,18 @@ var Ys = function t(e) {
3519
3542
  return;
3520
3543
  }
3521
3544
  if (ke && c + 1 >= n.length) {
3522
- var g = ke(a, p);
3523
- f = !!g, f && "get" in g && !("originalValue" in g.get) ? a = g.get : a = a[p];
3545
+ var b = ke(a, p);
3546
+ f = !!b, f && "get" in b && !("originalValue" in b.get) ? a = b.get : a = a[p];
3524
3547
  } else
3525
- f = wt(a, p), a = a[p];
3548
+ f = At(a, p), a = a[p];
3526
3549
  f && !u && (Pe[s] = a);
3527
3550
  }
3528
3551
  }
3529
3552
  return a;
3530
- }, Xn = { exports: {} }, Ut, on;
3531
- function Er() {
3532
- if (on) return Ut;
3533
- on = 1;
3553
+ }, Zn = { exports: {} }, xt, sn;
3554
+ function Tr() {
3555
+ if (sn) return xt;
3556
+ sn = 1;
3534
3557
  var t = ot, e = t("%Object.defineProperty%", !0) || !1;
3535
3558
  if (e)
3536
3559
  try {
@@ -3538,16 +3561,16 @@ function Er() {
3538
3561
  } catch {
3539
3562
  e = !1;
3540
3563
  }
3541
- return Ut = e, Ut;
3564
+ return xt = e, xt;
3542
3565
  }
3543
- var ia = ot, ht = ia("%Object.getOwnPropertyDescriptor%", !0);
3544
- if (ht)
3566
+ var sa = ot, yt = sa("%Object.getOwnPropertyDescriptor%", !0);
3567
+ if (yt)
3545
3568
  try {
3546
- ht([], "length");
3569
+ yt([], "length");
3547
3570
  } catch {
3548
- ht = null;
3571
+ yt = null;
3549
3572
  }
3550
- var Rt = ht, sn = Er(), oa = Yn, Me = Dt, an = Rt, sa = function(e, r, n) {
3573
+ var Vt = yt, an = Tr(), aa = Jn, Me = Rt, un = Vt, ua = function(e, r, n) {
3551
3574
  if (!e || typeof e != "object" && typeof e != "function")
3552
3575
  throw new Me("`obj` must be an object or a function`");
3553
3576
  if (typeof r != "string" && typeof r != "symbol")
@@ -3560,9 +3583,9 @@ var Rt = ht, sn = Er(), oa = Yn, Me = Dt, an = Rt, sa = function(e, r, n) {
3560
3583
  throw new Me("`nonConfigurable`, if provided, must be a boolean or null");
3561
3584
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
3562
3585
  throw new Me("`loose`, if provided, must be a boolean");
3563
- 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 = !!an && an(e, r);
3564
- if (sn)
3565
- sn(e, r, {
3586
+ 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 = !!un && un(e, r);
3587
+ if (an)
3588
+ an(e, r, {
3566
3589
  configurable: s === null && u ? u.configurable : !s,
3567
3590
  enumerable: i === null && u ? u.enumerable : !i,
3568
3591
  value: n,
@@ -3571,37 +3594,37 @@ var Rt = ht, sn = Er(), oa = Yn, Me = Dt, an = Rt, sa = function(e, r, n) {
3571
3594
  else if (a || !i && !o && !s)
3572
3595
  e[r] = n;
3573
3596
  else
3574
- throw new oa("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3575
- }, ar = Er(), Zn = function() {
3576
- return !!ar;
3597
+ throw new aa("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3598
+ }, ur = Tr(), ei = function() {
3599
+ return !!ur;
3577
3600
  };
3578
- Zn.hasArrayLengthDefineBug = function() {
3579
- if (!ar)
3601
+ ei.hasArrayLengthDefineBug = function() {
3602
+ if (!ur)
3580
3603
  return null;
3581
3604
  try {
3582
- return ar([], "length", { value: 1 }).length !== 1;
3605
+ return ur([], "length", { value: 1 }).length !== 1;
3583
3606
  } catch {
3584
3607
  return !0;
3585
3608
  }
3586
3609
  };
3587
- var aa = Zn, ua = ot, un = sa, ca = aa(), cn = Rt, ln = Dt, la = ua("%Math.floor%"), da = function(e, r) {
3610
+ var ca = ei, la = ot, cn = ua, da = ca(), ln = Vt, dn = Rt, fa = la("%Math.floor%"), pa = function(e, r) {
3588
3611
  if (typeof e != "function")
3589
- throw new ln("`fn` is not a function");
3590
- if (typeof r != "number" || r < 0 || r > 4294967295 || la(r) !== r)
3591
- throw new ln("`length` must be a positive 32-bit integer");
3612
+ throw new dn("`fn` is not a function");
3613
+ if (typeof r != "number" || r < 0 || r > 4294967295 || fa(r) !== r)
3614
+ throw new dn("`length` must be a positive 32-bit integer");
3592
3615
  var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
3593
- if ("length" in e && cn) {
3594
- var s = cn(e, "length");
3616
+ if ("length" in e && ln) {
3617
+ var s = ln(e, "length");
3595
3618
  s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
3596
3619
  }
3597
- return (i || o || !n) && (ca ? un(
3620
+ return (i || o || !n) && (da ? cn(
3598
3621
  /** @type {Parameters<define>[0]} */
3599
3622
  e,
3600
3623
  "length",
3601
3624
  r,
3602
3625
  !0,
3603
3626
  !0
3604
- ) : un(
3627
+ ) : cn(
3605
3628
  /** @type {Parameters<define>[0]} */
3606
3629
  e,
3607
3630
  "length",
@@ -3609,14 +3632,14 @@ var aa = Zn, ua = ot, un = sa, ca = aa(), cn = Rt, ln = Dt, la = ua("%Math.floor
3609
3632
  )), e;
3610
3633
  };
3611
3634
  (function(t) {
3612
- var e = Ir, r = ot, n = da, i = Dt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Er(), d = r("%Math.max%");
3635
+ var e = Ir, r = ot, n = pa, i = Rt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Tr(), l = r("%Math.max%");
3613
3636
  t.exports = function(p) {
3614
3637
  if (typeof p != "function")
3615
3638
  throw new i("a function is required");
3616
3639
  var v = a(e, s, arguments);
3617
3640
  return n(
3618
3641
  v,
3619
- 1 + d(0, p.length - (arguments.length - 1)),
3642
+ 1 + l(0, p.length - (arguments.length - 1)),
3620
3643
  !0
3621
3644
  );
3622
3645
  };
@@ -3624,122 +3647,122 @@ var aa = Zn, ua = ot, un = sa, ca = aa(), cn = Rt, ln = Dt, la = ua("%Math.floor
3624
3647
  return a(e, o, arguments);
3625
3648
  };
3626
3649
  u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
3627
- })(Xn);
3628
- var Tr = Xn.exports, ei = ot, ti = Tr, fa = ti(ei("String.prototype.indexOf")), Or = function(e, r) {
3629
- var n = ei(e, !!r);
3630
- return typeof n == "function" && fa(e, ".prototype.") > -1 ? ti(n) : n;
3631
- }, pa = Ft(), ha = Or, ur = ha("Object.prototype.toString"), Vt = function(e) {
3632
- return pa && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ur(e) === "[object Arguments]";
3633
- }, ri = function(e) {
3634
- return Vt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ur(e) !== "[object Array]" && ur(e.callee) === "[object Function]";
3635
- }, ya = function() {
3636
- return Vt(arguments);
3650
+ })(Zn);
3651
+ var Or = Zn.exports, ti = ot, ri = Or, ha = ri(ti("String.prototype.indexOf")), _r = function(e, r) {
3652
+ var n = ti(e, !!r);
3653
+ return typeof n == "function" && ha(e, ".prototype.") > -1 ? ri(n) : n;
3654
+ }, ya = Dt(), ma = _r, cr = ma("Object.prototype.toString"), $t = function(e) {
3655
+ return ya && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
3656
+ }, ni = function(e) {
3657
+ return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && cr(e) !== "[object Array]" && cr(e.callee) === "[object Function]";
3658
+ }, ga = function() {
3659
+ return $t(arguments);
3637
3660
  }();
3638
- Vt.isLegacyArguments = ri;
3639
- var ma = ya ? Vt : ri, ga = Object.prototype.toString, ba = Function.prototype.toString, va = /^\s*(?:function)?\*/, ni = Ft(), xt = Object.getPrototypeOf, Sa = function() {
3640
- if (!ni)
3661
+ $t.isLegacyArguments = ni;
3662
+ var ba = ga ? $t : ni, va = Object.prototype.toString, Sa = Function.prototype.toString, wa = /^\s*(?:function)?\*/, ii = Dt(), Qt = Object.getPrototypeOf, Aa = function() {
3663
+ if (!ii)
3641
3664
  return !1;
3642
3665
  try {
3643
3666
  return Function("return function*() {}")();
3644
3667
  } catch {
3645
3668
  }
3646
- }, Qt, wa = function(e) {
3669
+ }, Gt, Ea = function(e) {
3647
3670
  if (typeof e != "function")
3648
3671
  return !1;
3649
- if (va.test(ba.call(e)))
3672
+ if (wa.test(Sa.call(e)))
3650
3673
  return !0;
3651
- if (!ni) {
3652
- var r = ga.call(e);
3674
+ if (!ii) {
3675
+ var r = va.call(e);
3653
3676
  return r === "[object GeneratorFunction]";
3654
3677
  }
3655
- if (!xt)
3678
+ if (!Qt)
3656
3679
  return !1;
3657
- if (typeof Qt > "u") {
3658
- var n = Sa();
3659
- Qt = n ? xt(n) : !1;
3680
+ if (typeof Gt > "u") {
3681
+ var n = Aa();
3682
+ Gt = n ? Qt(n) : !1;
3660
3683
  }
3661
- return xt(e) === Qt;
3662
- }, ii = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, yt;
3663
- if (typeof Ue == "function" && typeof Object.defineProperty == "function")
3684
+ return Qt(e) === Gt;
3685
+ }, oi = Function.prototype.toString, qe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, lr, mt;
3686
+ if (typeof qe == "function" && typeof Object.defineProperty == "function")
3664
3687
  try {
3665
- cr = Object.defineProperty({}, "length", {
3688
+ lr = Object.defineProperty({}, "length", {
3666
3689
  get: function() {
3667
- throw yt;
3690
+ throw mt;
3668
3691
  }
3669
- }), yt = {}, Ue(function() {
3692
+ }), mt = {}, qe(function() {
3670
3693
  throw 42;
3671
- }, null, cr);
3694
+ }, null, lr);
3672
3695
  } catch (t) {
3673
- t !== yt && (Ue = null);
3696
+ t !== mt && (qe = null);
3674
3697
  }
3675
3698
  else
3676
- Ue = null;
3677
- var Aa = /^\s*class\b/, lr = function(e) {
3699
+ qe = null;
3700
+ var Ia = /^\s*class\b/, dr = function(e) {
3678
3701
  try {
3679
- var r = ii.call(e);
3680
- return Aa.test(r);
3702
+ var r = oi.call(e);
3703
+ return Ia.test(r);
3681
3704
  } catch {
3682
3705
  return !1;
3683
3706
  }
3684
- }, Gt = function(e) {
3707
+ }, Kt = function(e) {
3685
3708
  try {
3686
- return lr(e) ? !1 : (ii.call(e), !0);
3709
+ return dr(e) ? !1 : (oi.call(e), !0);
3687
3710
  } catch {
3688
3711
  return !1;
3689
3712
  }
3690
- }, mt = Object.prototype.toString, Ia = "[object Object]", Ea = "[object Function]", Ta = "[object GeneratorFunction]", Oa = "[object HTMLAllCollection]", _a = "[object HTML document.all class]", Ca = "[object HTMLCollection]", La = typeof Symbol == "function" && !!Symbol.toStringTag, ka = !(0 in [,]), dr = function() {
3713
+ }, gt = Object.prototype.toString, Ta = "[object Object]", Oa = "[object Function]", _a = "[object GeneratorFunction]", Ca = "[object HTMLAllCollection]", La = "[object HTML document.all class]", ka = "[object HTMLCollection]", Pa = typeof Symbol == "function" && !!Symbol.toStringTag, Na = !(0 in [,]), fr = function() {
3691
3714
  return !1;
3692
3715
  };
3693
3716
  if (typeof document == "object") {
3694
- var Pa = document.all;
3695
- mt.call(Pa) === mt.call(document.all) && (dr = function(e) {
3696
- if ((ka || !e) && (typeof e > "u" || typeof e == "object"))
3717
+ var Fa = document.all;
3718
+ gt.call(Fa) === gt.call(document.all) && (fr = function(e) {
3719
+ if ((Na || !e) && (typeof e > "u" || typeof e == "object"))
3697
3720
  try {
3698
- var r = mt.call(e);
3699
- return (r === Oa || r === _a || r === Ca || r === Ia) && e("") == null;
3721
+ var r = gt.call(e);
3722
+ return (r === Ca || r === La || r === ka || r === Ta) && e("") == null;
3700
3723
  } catch {
3701
3724
  }
3702
3725
  return !1;
3703
3726
  });
3704
3727
  }
3705
- var Na = Ue ? function(e) {
3706
- if (dr(e))
3728
+ var Da = qe ? function(e) {
3729
+ if (fr(e))
3707
3730
  return !0;
3708
3731
  if (!e || typeof e != "function" && typeof e != "object")
3709
3732
  return !1;
3710
3733
  try {
3711
- Ue(e, null, cr);
3734
+ qe(e, null, lr);
3712
3735
  } catch (r) {
3713
- if (r !== yt)
3736
+ if (r !== mt)
3714
3737
  return !1;
3715
3738
  }
3716
- return !lr(e) && Gt(e);
3739
+ return !dr(e) && Kt(e);
3717
3740
  } : function(e) {
3718
- if (dr(e))
3741
+ if (fr(e))
3719
3742
  return !0;
3720
3743
  if (!e || typeof e != "function" && typeof e != "object")
3721
3744
  return !1;
3722
- if (La)
3723
- return Gt(e);
3724
- if (lr(e))
3745
+ if (Pa)
3746
+ return Kt(e);
3747
+ if (dr(e))
3725
3748
  return !1;
3726
- var r = mt.call(e);
3727
- return r !== Ea && r !== Ta && !/^\[object HTML/.test(r) ? !1 : Gt(e);
3728
- }, Fa = Na, Da = Object.prototype.toString, oi = Object.prototype.hasOwnProperty, Ra = function(e, r, n) {
3749
+ var r = gt.call(e);
3750
+ return r !== Oa && r !== _a && !/^\[object HTML/.test(r) ? !1 : Kt(e);
3751
+ }, Ra = Da, Va = Object.prototype.toString, si = Object.prototype.hasOwnProperty, $a = function(e, r, n) {
3729
3752
  for (var i = 0, o = e.length; i < o; i++)
3730
- oi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3731
- }, Va = function(e, r, n) {
3753
+ si.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3754
+ }, Ma = function(e, r, n) {
3732
3755
  for (var i = 0, o = e.length; i < o; i++)
3733
3756
  n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
3734
- }, $a = function(e, r, n) {
3757
+ }, ja = function(e, r, n) {
3735
3758
  for (var i in e)
3736
- oi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3737
- }, Ma = function(e, r, n) {
3738
- if (!Fa(r))
3759
+ si.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
3760
+ }, Ba = function(e, r, n) {
3761
+ if (!Ra(r))
3739
3762
  throw new TypeError("iterator must be a function");
3740
3763
  var i;
3741
- arguments.length >= 3 && (i = n), Da.call(e) === "[object Array]" ? Ra(e, r, i) : typeof e == "string" ? Va(e, r, i) : $a(e, r, i);
3742
- }, si = Ma, Ba = [
3764
+ arguments.length >= 3 && (i = n), Va.call(e) === "[object Array]" ? $a(e, r, i) : typeof e == "string" ? Ma(e, r, i) : ja(e, r, i);
3765
+ }, ai = Ba, Ua = [
3743
3766
  "Float32Array",
3744
3767
  "Float64Array",
3745
3768
  "Int8Array",
@@ -3751,143 +3774,143 @@ var Na = Ue ? function(e) {
3751
3774
  "Uint32Array",
3752
3775
  "BigInt64Array",
3753
3776
  "BigUint64Array"
3754
- ], Kt = Ba, ja = typeof globalThis > "u" ? vr : globalThis, ai = function() {
3755
- for (var e = [], r = 0; r < Kt.length; r++)
3756
- typeof ja[Kt[r]] == "function" && (e[e.length] = Kt[r]);
3777
+ ], zt = Ua, qa = typeof globalThis > "u" ? Sr : globalThis, ui = function() {
3778
+ for (var e = [], r = 0; r < zt.length; r++)
3779
+ typeof qa[zt[r]] == "function" && (e[e.length] = zt[r]);
3757
3780
  return e;
3758
- }, It = si, qa = ai, dn = Tr, _r = Or, gt = Rt, Ua = _r("Object.prototype.toString"), ui = Ft(), fn = typeof globalThis > "u" ? vr : globalThis, fr = qa(), Cr = _r("String.prototype.slice"), zt = Object.getPrototypeOf, xa = _r("Array.prototype.indexOf", !0) || function(e, r) {
3781
+ }, It = ai, xa = ui, fn = Or, Cr = _r, bt = Vt, Qa = Cr("Object.prototype.toString"), ci = Dt(), pn = typeof globalThis > "u" ? Sr : globalThis, pr = xa(), Lr = Cr("String.prototype.slice"), Ht = Object.getPrototypeOf, Ga = Cr("Array.prototype.indexOf", !0) || function(e, r) {
3759
3782
  for (var n = 0; n < e.length; n += 1)
3760
3783
  if (e[n] === r)
3761
3784
  return n;
3762
3785
  return -1;
3763
- }, Et = { __proto__: null };
3764
- ui && gt && zt ? It(fr, function(t) {
3765
- var e = new fn[t]();
3786
+ }, Tt = { __proto__: null };
3787
+ ci && bt && Ht ? It(pr, function(t) {
3788
+ var e = new pn[t]();
3766
3789
  if (Symbol.toStringTag in e) {
3767
- var r = zt(e), n = gt(r, Symbol.toStringTag);
3790
+ var r = Ht(e), n = bt(r, Symbol.toStringTag);
3768
3791
  if (!n) {
3769
- var i = zt(r);
3770
- n = gt(i, Symbol.toStringTag);
3792
+ var i = Ht(r);
3793
+ n = bt(i, Symbol.toStringTag);
3771
3794
  }
3772
- Et["$" + t] = dn(n.get);
3795
+ Tt["$" + t] = fn(n.get);
3773
3796
  }
3774
- }) : It(fr, function(t) {
3775
- var e = new fn[t](), r = e.slice || e.set;
3776
- r && (Et["$" + t] = dn(r));
3797
+ }) : It(pr, function(t) {
3798
+ var e = new pn[t](), r = e.slice || e.set;
3799
+ r && (Tt["$" + t] = fn(r));
3777
3800
  });
3778
- var Qa = function(e) {
3801
+ var Ka = function(e) {
3779
3802
  var r = !1;
3780
- return It(Et, function(n, i) {
3803
+ return It(Tt, function(n, i) {
3781
3804
  if (!r)
3782
3805
  try {
3783
- "$" + n(e) === i && (r = Cr(i, 1));
3806
+ "$" + n(e) === i && (r = Lr(i, 1));
3784
3807
  } catch {
3785
3808
  }
3786
3809
  }), r;
3787
- }, Ga = function(e) {
3810
+ }, za = function(e) {
3788
3811
  var r = !1;
3789
- return It(Et, function(n, i) {
3812
+ return It(Tt, function(n, i) {
3790
3813
  if (!r)
3791
3814
  try {
3792
- n(e), r = Cr(i, 1);
3815
+ n(e), r = Lr(i, 1);
3793
3816
  } catch {
3794
3817
  }
3795
3818
  }), r;
3796
- }, Ka = function(e) {
3819
+ }, Ha = function(e) {
3797
3820
  if (!e || typeof e != "object")
3798
3821
  return !1;
3799
- if (!ui) {
3800
- var r = Cr(Ua(e), 8, -1);
3801
- return xa(fr, r) > -1 ? r : r !== "Object" ? !1 : Ga(e);
3822
+ if (!ci) {
3823
+ var r = Lr(Qa(e), 8, -1);
3824
+ return Ga(pr, r) > -1 ? r : r !== "Object" ? !1 : za(e);
3802
3825
  }
3803
- return gt ? Qa(e) : null;
3804
- }, Tt = si, za = ai, pn = Tr, Lr = Or, bt = Rt, Ha = Lr("Object.prototype.toString"), ci = Ft(), hn = typeof globalThis > "u" ? vr : globalThis, pr = za(), kr = Lr("String.prototype.slice"), Ht = Object.getPrototypeOf, Wa = Lr("Array.prototype.indexOf", !0) || function(e, r) {
3826
+ return bt ? Ka(e) : null;
3827
+ }, Ot = ai, Wa = ui, hn = Or, kr = _r, vt = Vt, Ya = kr("Object.prototype.toString"), li = Dt(), yn = typeof globalThis > "u" ? Sr : globalThis, hr = Wa(), Pr = kr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ja = kr("Array.prototype.indexOf", !0) || function(e, r) {
3805
3828
  for (var n = 0; n < e.length; n += 1)
3806
3829
  if (e[n] === r)
3807
3830
  return n;
3808
3831
  return -1;
3809
- }, Ot = { __proto__: null };
3810
- ci && bt && Ht ? Tt(pr, function(t) {
3811
- var e = new hn[t]();
3832
+ }, _t = { __proto__: null };
3833
+ li && vt && Wt ? Ot(hr, function(t) {
3834
+ var e = new yn[t]();
3812
3835
  if (Symbol.toStringTag in e) {
3813
- var r = Ht(e), n = bt(r, Symbol.toStringTag);
3836
+ var r = Wt(e), n = vt(r, Symbol.toStringTag);
3814
3837
  if (!n) {
3815
- var i = Ht(r);
3816
- n = bt(i, Symbol.toStringTag);
3838
+ var i = Wt(r);
3839
+ n = vt(i, Symbol.toStringTag);
3817
3840
  }
3818
- Ot["$" + t] = pn(n.get);
3841
+ _t["$" + t] = hn(n.get);
3819
3842
  }
3820
- }) : Tt(pr, function(t) {
3821
- var e = new hn[t](), r = e.slice || e.set;
3822
- r && (Ot["$" + t] = pn(r));
3843
+ }) : Ot(hr, function(t) {
3844
+ var e = new yn[t](), r = e.slice || e.set;
3845
+ r && (_t["$" + t] = hn(r));
3823
3846
  });
3824
- var Ya = function(e) {
3847
+ var Xa = function(e) {
3825
3848
  var r = !1;
3826
- return Tt(
3849
+ return Ot(
3827
3850
  // eslint-disable-next-line no-extra-parens
3828
3851
  /** @type {Record<`\$${TypedArrayName}`, Getter>} */
3829
3852
  /** @type {any} */
3830
- Ot,
3853
+ _t,
3831
3854
  /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
3832
3855
  function(n, i) {
3833
3856
  if (!r)
3834
3857
  try {
3835
- "$" + n(e) === i && (r = kr(i, 1));
3858
+ "$" + n(e) === i && (r = Pr(i, 1));
3836
3859
  } catch {
3837
3860
  }
3838
3861
  }
3839
3862
  ), r;
3840
- }, Ja = function(e) {
3863
+ }, Za = function(e) {
3841
3864
  var r = !1;
3842
- return Tt(
3865
+ return Ot(
3843
3866
  // eslint-disable-next-line no-extra-parens
3844
3867
  /** @type {Record<`\$${TypedArrayName}`, Getter>} */
3845
3868
  /** @type {any} */
3846
- Ot,
3869
+ _t,
3847
3870
  /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
3848
3871
  function(n, i) {
3849
3872
  if (!r)
3850
3873
  try {
3851
- n(e), r = kr(i, 1);
3874
+ n(e), r = Pr(i, 1);
3852
3875
  } catch {
3853
3876
  }
3854
3877
  }
3855
3878
  ), r;
3856
- }, Xa = function(e) {
3879
+ }, eu = function(e) {
3857
3880
  if (!e || typeof e != "object")
3858
3881
  return !1;
3859
- if (!ci) {
3860
- var r = kr(Ha(e), 8, -1);
3861
- return Wa(pr, r) > -1 ? r : r !== "Object" ? !1 : Ja(e);
3882
+ if (!li) {
3883
+ var r = Pr(Ya(e), 8, -1);
3884
+ return Ja(hr, r) > -1 ? r : r !== "Object" ? !1 : Za(e);
3862
3885
  }
3863
- return bt ? Ya(e) : null;
3864
- }, Za = Xa, eu = function(e) {
3865
- return !!Za(e);
3886
+ return vt ? Xa(e) : null;
3887
+ }, tu = eu, ru = function(e) {
3888
+ return !!tu(e);
3866
3889
  };
3867
3890
  (function(t) {
3868
- var e = ma, r = wa, n = Ka, i = eu;
3891
+ var e = ba, r = Ea, n = Ha, i = ru;
3869
3892
  function o(y) {
3870
3893
  return y.call.bind(y);
3871
3894
  }
3872
- var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), d = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), f = o(Boolean.prototype.valueOf);
3895
+ var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), l = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), f = o(Boolean.prototype.valueOf);
3873
3896
  if (s)
3874
3897
  var p = o(BigInt.prototype.valueOf);
3875
3898
  if (a)
3876
3899
  var v = o(Symbol.prototype.valueOf);
3877
- function b(y, mi) {
3900
+ function g(y, gi) {
3878
3901
  if (typeof y != "object")
3879
3902
  return !1;
3880
3903
  try {
3881
- return mi(y), !0;
3904
+ return gi(y), !0;
3882
3905
  } catch {
3883
3906
  return !1;
3884
3907
  }
3885
3908
  }
3886
3909
  t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
3887
- function g(y) {
3910
+ function b(y) {
3888
3911
  return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
3889
3912
  }
3890
- t.isPromise = g;
3913
+ t.isPromise = b;
3891
3914
  function S(y) {
3892
3915
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
3893
3916
  }
@@ -3920,14 +3943,14 @@ var Ya = function(e) {
3920
3943
  return n(y) === "Int32Array";
3921
3944
  }
3922
3945
  t.isInt32Array = T;
3923
- function ne(y) {
3946
+ function ie(y) {
3924
3947
  return n(y) === "Float32Array";
3925
3948
  }
3926
- t.isFloat32Array = ne;
3927
- function ie(y) {
3949
+ t.isFloat32Array = ie;
3950
+ function oe(y) {
3928
3951
  return n(y) === "Float64Array";
3929
3952
  }
3930
- t.isFloat64Array = ie;
3953
+ t.isFloat64Array = oe;
3931
3954
  function Ne(y) {
3932
3955
  return n(y) === "BigInt64Array";
3933
3956
  }
@@ -3936,38 +3959,38 @@ var Ya = function(e) {
3936
3959
  return n(y) === "BigUint64Array";
3937
3960
  }
3938
3961
  t.isBigUint64Array = Ie;
3939
- function le(y) {
3962
+ function de(y) {
3940
3963
  return u(y) === "[object Map]";
3941
3964
  }
3942
- le.working = typeof Map < "u" && le(/* @__PURE__ */ new Map());
3943
- function $t(y) {
3944
- return typeof Map > "u" ? !1 : le.working ? le(y) : y instanceof Map;
3965
+ de.working = typeof Map < "u" && de(/* @__PURE__ */ new Map());
3966
+ function Mt(y) {
3967
+ return typeof Map > "u" ? !1 : de.working ? de(y) : y instanceof Map;
3945
3968
  }
3946
- t.isMap = $t;
3947
- function Se(y) {
3969
+ t.isMap = Mt;
3970
+ function we(y) {
3948
3971
  return u(y) === "[object Set]";
3949
3972
  }
3950
- Se.working = typeof Set < "u" && Se(/* @__PURE__ */ new Set());
3973
+ we.working = typeof Set < "u" && we(/* @__PURE__ */ new Set());
3951
3974
  function Ye(y) {
3952
- return typeof Set > "u" ? !1 : Se.working ? Se(y) : y instanceof Set;
3975
+ return typeof Set > "u" ? !1 : we.working ? we(y) : y instanceof Set;
3953
3976
  }
3954
3977
  t.isSet = Ye;
3955
3978
  function Fe(y) {
3956
3979
  return u(y) === "[object WeakMap]";
3957
3980
  }
3958
3981
  Fe.working = typeof WeakMap < "u" && Fe(/* @__PURE__ */ new WeakMap());
3959
- function Mt(y) {
3982
+ function jt(y) {
3960
3983
  return typeof WeakMap > "u" ? !1 : Fe.working ? Fe(y) : y instanceof WeakMap;
3961
3984
  }
3962
- t.isWeakMap = Mt;
3985
+ t.isWeakMap = jt;
3963
3986
  function De(y) {
3964
3987
  return u(y) === "[object WeakSet]";
3965
3988
  }
3966
3989
  De.working = typeof WeakSet < "u" && De(/* @__PURE__ */ new WeakSet());
3967
- function de(y) {
3990
+ function fe(y) {
3968
3991
  return De(y);
3969
3992
  }
3970
- t.isWeakSet = de;
3993
+ t.isWeakSet = fe;
3971
3994
  function Re(y) {
3972
3995
  return u(y) === "[object ArrayBuffer]";
3973
3996
  }
@@ -3976,12 +3999,12 @@ var Ya = function(e) {
3976
3999
  return typeof ArrayBuffer > "u" ? !1 : Re.working ? Re(y) : y instanceof ArrayBuffer;
3977
4000
  }
3978
4001
  t.isArrayBuffer = st;
3979
- function l(y) {
4002
+ function d(y) {
3980
4003
  return u(y) === "[object DataView]";
3981
4004
  }
3982
- l.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && l(new DataView(new ArrayBuffer(1), 0, 1));
4005
+ d.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && d(new DataView(new ArrayBuffer(1), 0, 1));
3983
4006
  function h(y) {
3984
- return typeof DataView > "u" ? !1 : l.working ? l(y) : y instanceof DataView;
4007
+ return typeof DataView > "u" ? !1 : d.working ? d(y) : y instanceof DataView;
3985
4008
  }
3986
4009
  t.isDataView = h;
3987
4010
  var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
@@ -3996,10 +4019,10 @@ var Ya = function(e) {
3996
4019
  return u(y) === "[object AsyncFunction]";
3997
4020
  }
3998
4021
  t.isAsyncFunction = k;
3999
- function I(y) {
4022
+ function E(y) {
4000
4023
  return u(y) === "[object Map Iterator]";
4001
4024
  }
4002
- t.isMapIterator = I;
4025
+ t.isMapIterator = E;
4003
4026
  function O(y) {
4004
4027
  return u(y) === "[object Set Iterator]";
4005
4028
  }
@@ -4012,34 +4035,34 @@ var Ya = function(e) {
4012
4035
  return u(y) === "[object WebAssembly.Module]";
4013
4036
  }
4014
4037
  t.isWebAssemblyCompiledModule = H;
4015
- function Ee(y) {
4016
- return b(y, d);
4038
+ function Te(y) {
4039
+ return g(y, l);
4017
4040
  }
4018
- t.isNumberObject = Ee;
4041
+ t.isNumberObject = Te;
4019
4042
  function at(y) {
4020
- return b(y, c);
4043
+ return g(y, c);
4021
4044
  }
4022
4045
  t.isStringObject = at;
4023
4046
  function Ve(y) {
4024
- return b(y, f);
4047
+ return g(y, f);
4025
4048
  }
4026
4049
  t.isBooleanObject = Ve;
4027
4050
  function ut(y) {
4028
- return s && b(y, p);
4051
+ return s && g(y, p);
4029
4052
  }
4030
4053
  t.isBigIntObject = ut;
4031
- function Fr(y) {
4032
- return a && b(y, v);
4033
- }
4034
- t.isSymbolObject = Fr;
4035
- function hi(y) {
4036
- return Ee(y) || at(y) || Ve(y) || ut(y) || Fr(y);
4054
+ function Dr(y) {
4055
+ return a && g(y, v);
4037
4056
  }
4038
- t.isBoxedPrimitive = hi;
4057
+ t.isSymbolObject = Dr;
4039
4058
  function yi(y) {
4059
+ return Te(y) || at(y) || Ve(y) || ut(y) || Dr(y);
4060
+ }
4061
+ t.isBoxedPrimitive = yi;
4062
+ function mi(y) {
4040
4063
  return typeof Uint8Array < "u" && (st(y) || L(y));
4041
4064
  }
4042
- t.isAnyArrayBuffer = yi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4065
+ t.isAnyArrayBuffer = mi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
4043
4066
  Object.defineProperty(t, y, {
4044
4067
  enumerable: !1,
4045
4068
  value: function() {
@@ -4047,11 +4070,11 @@ var Ya = function(e) {
4047
4070
  }
4048
4071
  });
4049
4072
  });
4050
- })(Hn);
4051
- var tu = function(e) {
4073
+ })(Wn);
4074
+ var nu = function(e) {
4052
4075
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
4053
- }, hr = { exports: {} };
4054
- typeof Object.create == "function" ? hr.exports = function(e, r) {
4076
+ }, yr = { exports: {} };
4077
+ typeof Object.create == "function" ? yr.exports = function(e, r) {
4055
4078
  r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
4056
4079
  constructor: {
4057
4080
  value: e,
@@ -4060,7 +4083,7 @@ typeof Object.create == "function" ? hr.exports = function(e, r) {
4060
4083
  configurable: !0
4061
4084
  }
4062
4085
  }));
4063
- } : hr.exports = function(e, r) {
4086
+ } : yr.exports = function(e, r) {
4064
4087
  if (r) {
4065
4088
  e.super_ = r;
4066
4089
  var n = function() {
@@ -4068,20 +4091,20 @@ typeof Object.create == "function" ? hr.exports = function(e, r) {
4068
4091
  n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
4069
4092
  }
4070
4093
  };
4071
- var ru = hr.exports;
4094
+ var iu = yr.exports;
4072
4095
  (function(t) {
4073
4096
  var e = Object.getOwnPropertyDescriptors || function(h) {
4074
4097
  for (var m = Object.keys(h), w = {}, L = 0; L < m.length; L++)
4075
4098
  w[m[L]] = Object.getOwnPropertyDescriptor(h, m[L]);
4076
4099
  return w;
4077
4100
  }, r = /%[sdj%]/g;
4078
- t.format = function(l) {
4079
- if (!P(l)) {
4101
+ t.format = function(d) {
4102
+ if (!P(d)) {
4080
4103
  for (var h = [], m = 0; m < arguments.length; m++)
4081
4104
  h.push(s(arguments[m]));
4082
4105
  return h.join(" ");
4083
4106
  }
4084
- for (var m = 1, w = arguments, L = w.length, k = String(l).replace(r, function(O) {
4107
+ for (var m = 1, w = arguments, L = w.length, k = String(d).replace(r, function(O) {
4085
4108
  if (O === "%%") return "%";
4086
4109
  if (m >= L) return O;
4087
4110
  switch (O) {
@@ -4098,15 +4121,15 @@ var ru = hr.exports;
4098
4121
  default:
4099
4122
  return O;
4100
4123
  }
4101
- }), I = w[m]; m < L; I = w[++m])
4102
- R(I) || !ie(I) ? k += " " + I : k += " " + s(I);
4124
+ }), E = w[m]; m < L; E = w[++m])
4125
+ R(E) || !oe(E) ? k += " " + E : k += " " + s(E);
4103
4126
  return k;
4104
- }, t.deprecate = function(l, h) {
4127
+ }, t.deprecate = function(d, h) {
4105
4128
  if (typeof A < "u" && A.noDeprecation === !0)
4106
- return l;
4129
+ return d;
4107
4130
  if (typeof A > "u")
4108
4131
  return function() {
4109
- return t.deprecate(l, h).apply(this, arguments);
4132
+ return t.deprecate(d, h).apply(this, arguments);
4110
4133
  };
4111
4134
  var m = !1;
4112
4135
  function w() {
@@ -4115,7 +4138,7 @@ var ru = hr.exports;
4115
4138
  throw new Error(h);
4116
4139
  A.traceDeprecation ? console.trace(h) : console.error(h), m = !0;
4117
4140
  }
4118
- return l.apply(this, arguments);
4141
+ return d.apply(this, arguments);
4119
4142
  }
4120
4143
  return w;
4121
4144
  };
@@ -4124,25 +4147,25 @@ var ru = hr.exports;
4124
4147
  var o = A.env.NODE_DEBUG;
4125
4148
  o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
4126
4149
  }
4127
- t.debuglog = function(l) {
4128
- if (l = l.toUpperCase(), !n[l])
4129
- if (i.test(l)) {
4150
+ t.debuglog = function(d) {
4151
+ if (d = d.toUpperCase(), !n[d])
4152
+ if (i.test(d)) {
4130
4153
  var h = A.pid;
4131
- n[l] = function() {
4154
+ n[d] = function() {
4132
4155
  var m = t.format.apply(t, arguments);
4133
- console.error("%s %d: %s", l, h, m);
4156
+ console.error("%s %d: %s", d, h, m);
4134
4157
  };
4135
4158
  } else
4136
- n[l] = function() {
4159
+ n[d] = function() {
4137
4160
  };
4138
- return n[l];
4161
+ return n[d];
4139
4162
  };
4140
- function s(l, h) {
4163
+ function s(d, h) {
4141
4164
  var m = {
4142
4165
  seen: [],
4143
4166
  stylize: u
4144
4167
  };
4145
- return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), C(h) ? m.showHidden = h : h && t._extend(m, h), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, l, m.depth);
4168
+ return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), C(h) ? m.showHidden = h : h && t._extend(m, h), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, d, m.depth);
4146
4169
  }
4147
4170
  t.inspect = s, s.colors = {
4148
4171
  bold: [1, 22],
@@ -4169,89 +4192,89 @@ var ru = hr.exports;
4169
4192
  // "name": intentionally not styling
4170
4193
  regexp: "red"
4171
4194
  };
4172
- function a(l, h) {
4195
+ function a(d, h) {
4173
4196
  var m = s.styles[h];
4174
- return m ? "\x1B[" + s.colors[m][0] + "m" + l + "\x1B[" + s.colors[m][1] + "m" : l;
4197
+ return m ? "\x1B[" + s.colors[m][0] + "m" + d + "\x1B[" + s.colors[m][1] + "m" : d;
4175
4198
  }
4176
- function u(l, h) {
4177
- return l;
4199
+ function u(d, h) {
4200
+ return d;
4178
4201
  }
4179
- function d(l) {
4202
+ function l(d) {
4180
4203
  var h = {};
4181
- return l.forEach(function(m, w) {
4204
+ return d.forEach(function(m, w) {
4182
4205
  h[m] = !0;
4183
4206
  }), h;
4184
4207
  }
4185
- function c(l, h, m) {
4186
- if (l.customInspect && h && le(h.inspect) && // Filter out the util module, it's inspect function is special
4208
+ function c(d, h, m) {
4209
+ if (d.customInspect && h && de(h.inspect) && // Filter out the util module, it's inspect function is special
4187
4210
  h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
4188
4211
  !(h.constructor && h.constructor.prototype === h)) {
4189
- var w = h.inspect(m, l);
4190
- return P(w) || (w = c(l, w, m)), w;
4212
+ var w = h.inspect(m, d);
4213
+ return P(w) || (w = c(d, w, m)), w;
4191
4214
  }
4192
- var L = f(l, h);
4215
+ var L = f(d, h);
4193
4216
  if (L)
4194
4217
  return L;
4195
- var k = Object.keys(h), I = d(k);
4196
- if (l.showHidden && (k = Object.getOwnPropertyNames(h)), Ie(h) && (k.indexOf("message") >= 0 || k.indexOf("description") >= 0))
4218
+ var k = Object.keys(h), E = l(k);
4219
+ if (d.showHidden && (k = Object.getOwnPropertyNames(h)), Ie(h) && (k.indexOf("message") >= 0 || k.indexOf("description") >= 0))
4197
4220
  return p(h);
4198
4221
  if (k.length === 0) {
4199
- if (le(h)) {
4222
+ if (de(h)) {
4200
4223
  var O = h.name ? ": " + h.name : "";
4201
- return l.stylize("[Function" + O + "]", "special");
4224
+ return d.stylize("[Function" + O + "]", "special");
4202
4225
  }
4203
- if (ne(h))
4204
- return l.stylize(RegExp.prototype.toString.call(h), "regexp");
4226
+ if (ie(h))
4227
+ return d.stylize(RegExp.prototype.toString.call(h), "regexp");
4205
4228
  if (Ne(h))
4206
- return l.stylize(Date.prototype.toString.call(h), "date");
4229
+ return d.stylize(Date.prototype.toString.call(h), "date");
4207
4230
  if (Ie(h))
4208
4231
  return p(h);
4209
4232
  }
4210
- var F = "", H = !1, Ee = ["{", "}"];
4211
- if (S(h) && (H = !0, Ee = ["[", "]"]), le(h)) {
4233
+ var F = "", H = !1, Te = ["{", "}"];
4234
+ if (S(h) && (H = !0, Te = ["[", "]"]), de(h)) {
4212
4235
  var at = h.name ? ": " + h.name : "";
4213
4236
  F = " [Function" + at + "]";
4214
4237
  }
4215
- if (ne(h) && (F = " " + RegExp.prototype.toString.call(h)), Ne(h) && (F = " " + Date.prototype.toUTCString.call(h)), Ie(h) && (F = " " + p(h)), k.length === 0 && (!H || h.length == 0))
4216
- return Ee[0] + F + Ee[1];
4238
+ if (ie(h) && (F = " " + RegExp.prototype.toString.call(h)), Ne(h) && (F = " " + Date.prototype.toUTCString.call(h)), Ie(h) && (F = " " + p(h)), k.length === 0 && (!H || h.length == 0))
4239
+ return Te[0] + F + Te[1];
4217
4240
  if (m < 0)
4218
- return ne(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
4219
- l.seen.push(h);
4241
+ return ie(h) ? d.stylize(RegExp.prototype.toString.call(h), "regexp") : d.stylize("[Object]", "special");
4242
+ d.seen.push(h);
4220
4243
  var Ve;
4221
- return H ? Ve = v(l, h, m, I, k) : Ve = k.map(function(ut) {
4222
- return b(l, h, m, I, ut, H);
4223
- }), l.seen.pop(), g(Ve, F, Ee);
4244
+ return H ? Ve = v(d, h, m, E, k) : Ve = k.map(function(ut) {
4245
+ return g(d, h, m, E, ut, H);
4246
+ }), d.seen.pop(), b(Ve, F, Te);
4224
4247
  }
4225
- function f(l, h) {
4248
+ function f(d, h) {
4226
4249
  if (T(h))
4227
- return l.stylize("undefined", "undefined");
4250
+ return d.stylize("undefined", "undefined");
4228
4251
  if (P(h)) {
4229
4252
  var m = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
4230
- return l.stylize(m, "string");
4253
+ return d.stylize(m, "string");
4231
4254
  }
4232
4255
  if (ee(h))
4233
- return l.stylize("" + h, "number");
4256
+ return d.stylize("" + h, "number");
4234
4257
  if (C(h))
4235
- return l.stylize("" + h, "boolean");
4258
+ return d.stylize("" + h, "boolean");
4236
4259
  if (R(h))
4237
- return l.stylize("null", "null");
4260
+ return d.stylize("null", "null");
4238
4261
  }
4239
- function p(l) {
4240
- return "[" + Error.prototype.toString.call(l) + "]";
4262
+ function p(d) {
4263
+ return "[" + Error.prototype.toString.call(d) + "]";
4241
4264
  }
4242
- function v(l, h, m, w, L) {
4243
- for (var k = [], I = 0, O = h.length; I < O; ++I)
4244
- De(h, String(I)) ? k.push(b(
4245
- l,
4265
+ function v(d, h, m, w, L) {
4266
+ for (var k = [], E = 0, O = h.length; E < O; ++E)
4267
+ De(h, String(E)) ? k.push(g(
4268
+ d,
4246
4269
  h,
4247
4270
  m,
4248
4271
  w,
4249
- String(I),
4272
+ String(E),
4250
4273
  !0
4251
4274
  )) : k.push("");
4252
4275
  return L.forEach(function(F) {
4253
- F.match(/^\d+$/) || k.push(b(
4254
- l,
4276
+ F.match(/^\d+$/) || k.push(g(
4277
+ d,
4255
4278
  h,
4256
4279
  m,
4257
4280
  w,
@@ -4260,9 +4283,9 @@ var ru = hr.exports;
4260
4283
  ));
4261
4284
  }), k;
4262
4285
  }
4263
- function b(l, h, m, w, L, k) {
4264
- var I, O, F;
4265
- if (F = Object.getOwnPropertyDescriptor(h, L) || { value: h[L] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), De(w, L) || (I = "[" + L + "]"), O || (l.seen.indexOf(F.value) < 0 ? (R(m) ? O = c(l, F.value, null) : O = c(l, F.value, m - 1), O.indexOf(`
4286
+ function g(d, h, m, w, L, k) {
4287
+ var E, O, F;
4288
+ if (F = Object.getOwnPropertyDescriptor(h, L) || { value: h[L] }, F.get ? F.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : F.set && (O = d.stylize("[Setter]", "special")), De(w, L) || (E = "[" + L + "]"), O || (d.seen.indexOf(F.value) < 0 ? (R(m) ? O = c(d, F.value, null) : O = c(d, F.value, m - 1), O.indexOf(`
4266
4289
  `) > -1 && (k ? O = O.split(`
4267
4290
  `).map(function(H) {
4268
4291
  return " " + H;
@@ -4272,85 +4295,85 @@ var ru = hr.exports;
4272
4295
  `).map(function(H) {
4273
4296
  return " " + H;
4274
4297
  }).join(`
4275
- `))) : O = l.stylize("[Circular]", "special")), T(I)) {
4298
+ `))) : O = d.stylize("[Circular]", "special")), T(E)) {
4276
4299
  if (k && L.match(/^\d+$/))
4277
4300
  return O;
4278
- I = JSON.stringify("" + L), I.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (I = I.slice(1, -1), I = l.stylize(I, "name")) : (I = I.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), I = l.stylize(I, "string"));
4301
+ E = JSON.stringify("" + L), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E = d.stylize(E, "name")) : (E = E.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), E = d.stylize(E, "string"));
4279
4302
  }
4280
- return I + ": " + O;
4303
+ return E + ": " + O;
4281
4304
  }
4282
- function g(l, h, m) {
4283
- var w = l.reduce(function(L, k) {
4305
+ function b(d, h, m) {
4306
+ var w = d.reduce(function(L, k) {
4284
4307
  return k.indexOf(`
4285
4308
  `) >= 0, L + k.replace(/\u001b\[\d\d?m/g, "").length + 1;
4286
4309
  }, 0);
4287
4310
  return w > 60 ? m[0] + (h === "" ? "" : h + `
4288
- `) + " " + l.join(`,
4289
- `) + " " + m[1] : m[0] + h + " " + l.join(", ") + " " + m[1];
4311
+ `) + " " + d.join(`,
4312
+ `) + " " + m[1] : m[0] + h + " " + d.join(", ") + " " + m[1];
4290
4313
  }
4291
- t.types = Hn;
4292
- function S(l) {
4293
- return Array.isArray(l);
4314
+ t.types = Wn;
4315
+ function S(d) {
4316
+ return Array.isArray(d);
4294
4317
  }
4295
4318
  t.isArray = S;
4296
- function C(l) {
4297
- return typeof l == "boolean";
4319
+ function C(d) {
4320
+ return typeof d == "boolean";
4298
4321
  }
4299
4322
  t.isBoolean = C;
4300
- function R(l) {
4301
- return l === null;
4323
+ function R(d) {
4324
+ return d === null;
4302
4325
  }
4303
4326
  t.isNull = R;
4304
- function K(l) {
4305
- return l == null;
4327
+ function K(d) {
4328
+ return d == null;
4306
4329
  }
4307
4330
  t.isNullOrUndefined = K;
4308
- function ee(l) {
4309
- return typeof l == "number";
4331
+ function ee(d) {
4332
+ return typeof d == "number";
4310
4333
  }
4311
4334
  t.isNumber = ee;
4312
- function P(l) {
4313
- return typeof l == "string";
4335
+ function P(d) {
4336
+ return typeof d == "string";
4314
4337
  }
4315
4338
  t.isString = P;
4316
- function V(l) {
4317
- return typeof l == "symbol";
4339
+ function V(d) {
4340
+ return typeof d == "symbol";
4318
4341
  }
4319
4342
  t.isSymbol = V;
4320
- function T(l) {
4321
- return l === void 0;
4343
+ function T(d) {
4344
+ return d === void 0;
4322
4345
  }
4323
4346
  t.isUndefined = T;
4324
- function ne(l) {
4325
- return ie(l) && Se(l) === "[object RegExp]";
4347
+ function ie(d) {
4348
+ return oe(d) && we(d) === "[object RegExp]";
4326
4349
  }
4327
- t.isRegExp = ne, t.types.isRegExp = ne;
4328
- function ie(l) {
4329
- return typeof l == "object" && l !== null;
4350
+ t.isRegExp = ie, t.types.isRegExp = ie;
4351
+ function oe(d) {
4352
+ return typeof d == "object" && d !== null;
4330
4353
  }
4331
- t.isObject = ie;
4332
- function Ne(l) {
4333
- return ie(l) && Se(l) === "[object Date]";
4354
+ t.isObject = oe;
4355
+ function Ne(d) {
4356
+ return oe(d) && we(d) === "[object Date]";
4334
4357
  }
4335
4358
  t.isDate = Ne, t.types.isDate = Ne;
4336
- function Ie(l) {
4337
- return ie(l) && (Se(l) === "[object Error]" || l instanceof Error);
4359
+ function Ie(d) {
4360
+ return oe(d) && (we(d) === "[object Error]" || d instanceof Error);
4338
4361
  }
4339
4362
  t.isError = Ie, t.types.isNativeError = Ie;
4340
- function le(l) {
4341
- return typeof l == "function";
4363
+ function de(d) {
4364
+ return typeof d == "function";
4342
4365
  }
4343
- t.isFunction = le;
4344
- function $t(l) {
4345
- return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
4346
- typeof l > "u";
4366
+ t.isFunction = de;
4367
+ function Mt(d) {
4368
+ return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
4369
+ typeof d > "u";
4347
4370
  }
4348
- t.isPrimitive = $t, t.isBuffer = tu;
4349
- function Se(l) {
4350
- return Object.prototype.toString.call(l);
4371
+ t.isPrimitive = Mt, t.isBuffer = nu;
4372
+ function we(d) {
4373
+ return Object.prototype.toString.call(d);
4351
4374
  }
4352
- function Ye(l) {
4353
- return l < 10 ? "0" + l.toString(10) : l.toString(10);
4375
+ function Ye(d) {
4376
+ return d < 10 ? "0" + d.toString(10) : d.toString(10);
4354
4377
  }
4355
4378
  var Fe = [
4356
4379
  "Jan",
@@ -4366,34 +4389,34 @@ var ru = hr.exports;
4366
4389
  "Nov",
4367
4390
  "Dec"
4368
4391
  ];
4369
- function Mt() {
4370
- var l = /* @__PURE__ */ new Date(), h = [
4371
- Ye(l.getHours()),
4372
- Ye(l.getMinutes()),
4373
- Ye(l.getSeconds())
4392
+ function jt() {
4393
+ var d = /* @__PURE__ */ new Date(), h = [
4394
+ Ye(d.getHours()),
4395
+ Ye(d.getMinutes()),
4396
+ Ye(d.getSeconds())
4374
4397
  ].join(":");
4375
- return [l.getDate(), Fe[l.getMonth()], h].join(" ");
4398
+ return [d.getDate(), Fe[d.getMonth()], h].join(" ");
4376
4399
  }
4377
4400
  t.log = function() {
4378
- console.log("%s - %s", Mt(), t.format.apply(t, arguments));
4379
- }, t.inherits = ru, t._extend = function(l, h) {
4380
- if (!h || !ie(h)) return l;
4401
+ console.log("%s - %s", jt(), t.format.apply(t, arguments));
4402
+ }, t.inherits = iu, t._extend = function(d, h) {
4403
+ if (!h || !oe(h)) return d;
4381
4404
  for (var m = Object.keys(h), w = m.length; w--; )
4382
- l[m[w]] = h[m[w]];
4383
- return l;
4405
+ d[m[w]] = h[m[w]];
4406
+ return d;
4384
4407
  };
4385
- function De(l, h) {
4386
- return Object.prototype.hasOwnProperty.call(l, h);
4408
+ function De(d, h) {
4409
+ return Object.prototype.hasOwnProperty.call(d, h);
4387
4410
  }
4388
- var de = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
4411
+ var fe = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
4389
4412
  t.promisify = function(h) {
4390
4413
  if (typeof h != "function")
4391
4414
  throw new TypeError('The "original" argument must be of type Function');
4392
- if (de && h[de]) {
4393
- var m = h[de];
4415
+ if (fe && h[fe]) {
4416
+ var m = h[fe];
4394
4417
  if (typeof m != "function")
4395
4418
  throw new TypeError('The "util.promisify.custom" argument must be of type Function');
4396
- return Object.defineProperty(m, de, {
4419
+ return Object.defineProperty(m, fe, {
4397
4420
  value: m,
4398
4421
  enumerable: !1,
4399
4422
  writable: !1,
@@ -4403,19 +4426,19 @@ var ru = hr.exports;
4403
4426
  function m() {
4404
4427
  for (var w, L, k = new Promise(function(F, H) {
4405
4428
  w = F, L = H;
4406
- }), I = [], O = 0; O < arguments.length; O++)
4407
- I.push(arguments[O]);
4408
- I.push(function(F, H) {
4429
+ }), E = [], O = 0; O < arguments.length; O++)
4430
+ E.push(arguments[O]);
4431
+ E.push(function(F, H) {
4409
4432
  F ? L(F) : w(H);
4410
4433
  });
4411
4434
  try {
4412
- h.apply(this, I);
4435
+ h.apply(this, E);
4413
4436
  } catch (F) {
4414
4437
  L(F);
4415
4438
  }
4416
4439
  return k;
4417
4440
  }
4418
- return Object.setPrototypeOf(m, Object.getPrototypeOf(h)), de && Object.defineProperty(m, de, {
4441
+ return Object.setPrototypeOf(m, Object.getPrototypeOf(h)), fe && Object.defineProperty(m, fe, {
4419
4442
  value: m,
4420
4443
  enumerable: !1,
4421
4444
  writable: !1,
@@ -4424,16 +4447,16 @@ var ru = hr.exports;
4424
4447
  m,
4425
4448
  e(h)
4426
4449
  );
4427
- }, t.promisify.custom = de;
4428
- function Re(l, h) {
4429
- if (!l) {
4450
+ }, t.promisify.custom = fe;
4451
+ function Re(d, h) {
4452
+ if (!d) {
4430
4453
  var m = new Error("Promise was rejected with a falsy value");
4431
- m.reason = l, l = m;
4454
+ m.reason = d, d = m;
4432
4455
  }
4433
- return h(l);
4456
+ return h(d);
4434
4457
  }
4435
- function st(l) {
4436
- if (typeof l != "function")
4458
+ function st(d) {
4459
+ if (typeof d != "function")
4437
4460
  throw new TypeError('The "original" argument must be of type Function');
4438
4461
  function h() {
4439
4462
  for (var m = [], w = 0; w < arguments.length; w++)
@@ -4441,39 +4464,39 @@ var ru = hr.exports;
4441
4464
  var L = m.pop();
4442
4465
  if (typeof L != "function")
4443
4466
  throw new TypeError("The last argument must be of type Function");
4444
- var k = this, I = function() {
4467
+ var k = this, E = function() {
4445
4468
  return L.apply(k, arguments);
4446
4469
  };
4447
- l.apply(this, m).then(
4470
+ d.apply(this, m).then(
4448
4471
  function(O) {
4449
- A.nextTick(I.bind(null, null, O));
4472
+ A.nextTick(E.bind(null, null, O));
4450
4473
  },
4451
4474
  function(O) {
4452
- A.nextTick(Re.bind(null, O, I));
4475
+ A.nextTick(Re.bind(null, O, E));
4453
4476
  }
4454
4477
  );
4455
4478
  }
4456
- return Object.setPrototypeOf(h, Object.getPrototypeOf(l)), Object.defineProperties(
4479
+ return Object.setPrototypeOf(h, Object.getPrototypeOf(d)), Object.defineProperties(
4457
4480
  h,
4458
- e(l)
4481
+ e(d)
4459
4482
  ), h;
4460
4483
  }
4461
4484
  t.callbackify = st;
4462
- })(Nt);
4463
- const { inherits: nu, format: Wt } = Nt;
4485
+ })(Ft);
4486
+ const { inherits: ou, format: Yt } = Ft;
4464
4487
  function Oe(t, e, r = Error) {
4465
4488
  if (!t) throw new Error("Avvio error code must not be empty");
4466
4489
  if (!e) throw new Error("Avvio base error message must not be empty");
4467
4490
  function n(i, o, s) {
4468
4491
  if (!new.target)
4469
4492
  return new n(i, o, s);
4470
- Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Wt(e, i, o, s) : i && o ? this.message = Wt(e, i, o) : i ? this.message = Wt(e, i) : this.message = e;
4493
+ Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Yt(e, i, o, s) : i && o ? this.message = Yt(e, i, o) : i ? this.message = Yt(e, i) : this.message = e;
4471
4494
  }
4472
4495
  return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
4473
4496
  return `${this.name} [${this.code}]: ${this.message}`;
4474
- }, nu(n, r), n;
4497
+ }, ou(n, r), n;
4475
4498
  }
4476
- var li = {
4499
+ var di = {
4477
4500
  createError: Oe,
4478
4501
  AVV_ERR_EXPOSE_ALREADY_DEFINED: Oe(
4479
4502
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
@@ -4499,37 +4522,37 @@ var li = {
4499
4522
  "AVV_ERR_READY_TIMEOUT",
4500
4523
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
4501
4524
  )
4502
- }, iu = function t(e, r, n) {
4525
+ }, su = function t(e, r, n) {
4503
4526
  r === void 0 && (r = ""), n || (n = {});
4504
4527
  var i = function(u) {
4505
- var d = {
4528
+ var l = {
4506
4529
  "│": "|",
4507
4530
  "└": "`",
4508
4531
  "├": "+",
4509
4532
  "─": "-",
4510
4533
  "┬": "-"
4511
4534
  };
4512
- return n.unicode === !1 ? d[u] : u;
4535
+ return n.unicode === !1 ? l[u] : u;
4513
4536
  };
4514
4537
  typeof e == "string" && (e = { label: e });
4515
4538
  var o = e.nodes || [], s = (e.label || "").split(`
4516
4539
  `), a = `
4517
4540
  ` + r + (o.length ? i("│") : " ") + " ";
4518
4541
  return r + s.join(a) + `
4519
- ` + o.map(function(u, d) {
4520
- var c = d === o.length - 1, f = u.nodes && u.nodes.length, p = r + (c ? " " : i("│")) + " ";
4542
+ ` + o.map(function(u, l) {
4543
+ var c = l === o.length - 1, f = u.nodes && u.nodes.length, p = r + (c ? " " : i("│")) + " ";
4521
4544
  return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
4522
4545
  }).join("");
4523
4546
  };
4524
- const ou = iu, yn = Symbol("avvio.TimeTree.untrackNode"), Yt = Symbol("avvio.TimeTree.trackNode"), mn = Symbol("avvio.TimeTree.getParent"), gn = Symbol("avvio.TimeTree.getNode"), bn = Symbol("avvio.TimeTree.addNode");
4525
- let su = class {
4547
+ const au = su, mn = Symbol("avvio.TimeTree.untrackNode"), Jt = Symbol("avvio.TimeTree.trackNode"), gn = Symbol("avvio.TimeTree.getParent"), bn = Symbol("avvio.TimeTree.getNode"), vn = Symbol("avvio.TimeTree.addNode");
4548
+ let uu = class {
4526
4549
  constructor() {
4527
4550
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
4528
4551
  }
4529
- [Yt](e) {
4552
+ [Jt](e) {
4530
4553
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
4531
4554
  }
4532
- [yn](e) {
4555
+ [mn](e) {
4533
4556
  this.tableId.delete(e.id);
4534
4557
  const r = this.tableLabel.get(e.label);
4535
4558
  if (r.id) {
@@ -4538,53 +4561,53 @@ let su = class {
4538
4561
  }
4539
4562
  r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
4540
4563
  }
4541
- [mn](e) {
4564
+ [gn](e) {
4542
4565
  if (e === null)
4543
4566
  return this.root;
4544
4567
  const r = this.tableLabel.get(e);
4545
4568
  return r.id ? r : r[r.length - 1];
4546
4569
  }
4547
- [gn](e) {
4570
+ [bn](e) {
4548
4571
  return this.tableId.get(e);
4549
4572
  }
4550
- [bn](e, r, n) {
4573
+ [vn](e, r, n) {
4551
4574
  if (e === null)
4552
4575
  return this.root = {
4553
4576
  id: "root",
4554
4577
  label: r,
4555
4578
  start: n,
4556
4579
  nodes: []
4557
- }, this[Yt](this.root), this.root.id;
4558
- const o = this[mn](e), s = `${r}-${Math.random()}`, a = {
4580
+ }, this[Jt](this.root), this.root.id;
4581
+ const o = this[gn](e), s = `${r}-${Math.random()}`, a = {
4559
4582
  id: s,
4560
4583
  parent: e,
4561
4584
  start: n,
4562
4585
  label: r,
4563
4586
  nodes: []
4564
4587
  };
4565
- return o.nodes.push(a), this[Yt](a), s;
4588
+ return o.nodes.push(a), this[Jt](a), s;
4566
4589
  }
4567
4590
  start(e, r, n = Date.now()) {
4568
- return this[bn](e, r, n);
4591
+ return this[vn](e, r, n);
4569
4592
  }
4570
4593
  stop(e, r = Date.now()) {
4571
- const n = this[gn](e);
4572
- n && (n.stop = r, n.diff = n.stop - n.start || 0, this[yn](n));
4594
+ const n = this[bn](e);
4595
+ n && (n.stop = r, n.diff = n.stop - n.start || 0, this[mn](n));
4573
4596
  }
4574
4597
  toJSON() {
4575
4598
  return Object.assign({}, this.root);
4576
4599
  }
4577
4600
  prittyPrint() {
4578
4601
  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());
4579
- return ou(r);
4602
+ return au(r);
4580
4603
  }
4581
4604
  };
4582
- var au = su, Pr = { exports: {} }, yr = { exports: {} }, Jt, vn;
4583
- function uu() {
4584
- if (vn) return Jt;
4585
- vn = 1;
4605
+ var cu = uu, Nr = { exports: {} }, mr = { exports: {} }, Xt, Sn;
4606
+ function lu() {
4607
+ if (Sn) return Xt;
4608
+ Sn = 1;
4586
4609
  var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
4587
- Jt = function(c, f) {
4610
+ Xt = function(c, f) {
4588
4611
  f = f || {};
4589
4612
  var p = typeof c;
4590
4613
  if (p === "string" && c.length > 0)
@@ -4653,16 +4676,16 @@ function uu() {
4653
4676
  }
4654
4677
  function u(c) {
4655
4678
  var f = Math.abs(c);
4656
- return f >= n ? d(c, f, n, "day") : f >= r ? d(c, f, r, "hour") : f >= e ? d(c, f, e, "minute") : f >= t ? d(c, f, t, "second") : c + " ms";
4679
+ return f >= n ? l(c, f, n, "day") : f >= r ? l(c, f, r, "hour") : f >= e ? l(c, f, e, "minute") : f >= t ? l(c, f, t, "second") : c + " ms";
4657
4680
  }
4658
- function d(c, f, p, v) {
4659
- var b = f >= p * 1.5;
4660
- return Math.round(c / p) + " " + v + (b ? "s" : "");
4681
+ function l(c, f, p, v) {
4682
+ var g = f >= p * 1.5;
4683
+ return Math.round(c / p) + " " + v + (g ? "s" : "");
4661
4684
  }
4662
- return Jt;
4685
+ return Xt;
4663
4686
  }
4664
- function cu(t) {
4665
- r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = uu(), r.destroy = d, Object.keys(t).forEach((c) => {
4687
+ function du(t) {
4688
+ r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = lu(), r.destroy = l, Object.keys(t).forEach((c) => {
4666
4689
  r[c] = t[c];
4667
4690
  }), r.names = [], r.skips = [], r.formatters = {};
4668
4691
  function e(c) {
@@ -4673,33 +4696,33 @@ function cu(t) {
4673
4696
  }
4674
4697
  r.selectColor = e;
4675
4698
  function r(c) {
4676
- let f, p = null, v, b;
4677
- function g(...S) {
4678
- if (!g.enabled)
4699
+ let f, p = null, v, g;
4700
+ function b(...S) {
4701
+ if (!b.enabled)
4679
4702
  return;
4680
- const C = g, R = Number(/* @__PURE__ */ new Date()), K = R - (f || R);
4703
+ const C = b, R = Number(/* @__PURE__ */ new Date()), K = R - (f || R);
4681
4704
  C.diff = K, C.prev = f, C.curr = R, f = R, S[0] = r.coerce(S[0]), typeof S[0] != "string" && S.unshift("%O");
4682
4705
  let ee = 0;
4683
4706
  S[0] = S[0].replace(/%([a-zA-Z%])/g, (V, T) => {
4684
4707
  if (V === "%%")
4685
4708
  return "%";
4686
4709
  ee++;
4687
- const ne = r.formatters[T];
4688
- if (typeof ne == "function") {
4689
- const ie = S[ee];
4690
- V = ne.call(C, ie), S.splice(ee, 1), ee--;
4710
+ const ie = r.formatters[T];
4711
+ if (typeof ie == "function") {
4712
+ const oe = S[ee];
4713
+ V = ie.call(C, oe), S.splice(ee, 1), ee--;
4691
4714
  }
4692
4715
  return V;
4693
4716
  }), r.formatArgs.call(C, S), (C.log || r.log).apply(C, S);
4694
4717
  }
4695
- return g.namespace = c, g.useColors = r.useColors(), g.color = r.selectColor(c), g.extend = n, g.destroy = r.destroy, Object.defineProperty(g, "enabled", {
4718
+ return b.namespace = c, b.useColors = r.useColors(), b.color = r.selectColor(c), b.extend = n, b.destroy = r.destroy, Object.defineProperty(b, "enabled", {
4696
4719
  enumerable: !0,
4697
4720
  configurable: !1,
4698
- get: () => p !== null ? p : (v !== r.namespaces && (v = r.namespaces, b = r.enabled(c)), b),
4721
+ get: () => p !== null ? p : (v !== r.namespaces && (v = r.namespaces, g = r.enabled(c)), g),
4699
4722
  set: (S) => {
4700
4723
  p = S;
4701
4724
  }
4702
- }), typeof r.init == "function" && r.init(g), g;
4725
+ }), typeof r.init == "function" && r.init(b), b;
4703
4726
  }
4704
4727
  function n(c, f) {
4705
4728
  const p = r(this.namespace + (typeof f > "u" ? ":" : f) + c);
@@ -4737,12 +4760,12 @@ function cu(t) {
4737
4760
  function u(c) {
4738
4761
  return c instanceof Error ? c.stack || c.message : c;
4739
4762
  }
4740
- function d() {
4763
+ function l() {
4741
4764
  console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
4742
4765
  }
4743
4766
  return r.enable(r.load()), r;
4744
4767
  }
4745
- var lu = cu;
4768
+ var fu = du;
4746
4769
  (function(t, e) {
4747
4770
  e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
4748
4771
  let u = !1;
@@ -4837,12 +4860,12 @@ var lu = cu;
4837
4860
  function n(u) {
4838
4861
  if (u[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + u[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
4839
4862
  return;
4840
- const d = "color: " + this.color;
4841
- u.splice(1, 0, d, "color: inherit");
4863
+ const l = "color: " + this.color;
4864
+ u.splice(1, 0, l, "color: inherit");
4842
4865
  let c = 0, f = 0;
4843
4866
  u[0].replace(/%[a-zA-Z%]/g, (p) => {
4844
4867
  p !== "%%" && (c++, p === "%c" && (f = c));
4845
- }), u.splice(f, 0, d);
4868
+ }), u.splice(f, 0, l);
4846
4869
  }
4847
4870
  e.log = console.debug || console.log || (() => {
4848
4871
  });
@@ -4866,38 +4889,38 @@ var lu = cu;
4866
4889
  } catch {
4867
4890
  }
4868
4891
  }
4869
- t.exports = lu(e);
4892
+ t.exports = fu(e);
4870
4893
  const { formatters: a } = t.exports;
4871
4894
  a.j = function(u) {
4872
4895
  try {
4873
4896
  return JSON.stringify(u);
4874
- } catch (d) {
4875
- return "[UnexpectedJSONParseError]: " + d.message;
4897
+ } catch (l) {
4898
+ return "[UnexpectedJSONParseError]: " + l.message;
4876
4899
  }
4877
4900
  };
4878
- })(yr, yr.exports);
4879
- var di = yr.exports;
4880
- const du = Mn, fu = zn.EventEmitter, pu = Nt.inherits, j = di("avvio"), { AVV_ERR_READY_TIMEOUT: hu } = li, Xt = Symbol.for("plugin-meta");
4881
- function yu(t, e) {
4882
- 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(`
4901
+ })(mr, mr.exports);
4902
+ var fi = mr.exports;
4903
+ const pu = jn, hu = Hn.EventEmitter, yu = Ft.inherits, B = fi("avvio"), { AVV_ERR_READY_TIMEOUT: mu } = di, Zt = Symbol.for("plugin-meta");
4904
+ function gu(t, e) {
4905
+ return t[Zt] && t[Zt].name ? t[Zt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4883
4906
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
4884
4907
  }
4885
- function mu() {
4908
+ function bu() {
4886
4909
  const t = {};
4887
4910
  return t.promise = new Promise((e, r) => {
4888
4911
  t.resolve = e, t.reject = r;
4889
4912
  }), t;
4890
4913
  }
4891
4914
  function We(t, e, r, n, i) {
4892
- 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 = yu(e, r), this.isAfter = n, this.q = du(t, gu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4915
+ 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 = gu(e, r), this.isAfter = n, this.q = pu(t, vu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4893
4916
  }
4894
- pu(We, fu);
4917
+ yu(We, hu);
4895
4918
  We.prototype.exec = function(t, e) {
4896
4919
  const r = this.func;
4897
4920
  let n = !1;
4898
4921
  const i = this.name;
4899
4922
  if (this.parent._error && !this.isAfter) {
4900
- j("skipping loading of plugin as parent errored and it is not an after", i), A.nextTick(e);
4923
+ B("skipping loading of plugin as parent errored and it is not an after", i), A.nextTick(e);
4901
4924
  return;
4902
4925
  }
4903
4926
  if (this.isAfter)
@@ -4906,24 +4929,24 @@ We.prototype.exec = function(t, e) {
4906
4929
  try {
4907
4930
  this.server = this.parent.override(t, r, this.opts);
4908
4931
  } catch (u) {
4909
- return j("override errored", i), e(u);
4932
+ return B("override errored", i), e(u);
4910
4933
  }
4911
- this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, j("exec", i);
4934
+ this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, B("exec", i);
4912
4935
  let o;
4913
4936
  const s = (u) => {
4914
4937
  if (n) {
4915
- j("loading complete", i);
4938
+ B("loading complete", i);
4916
4939
  return;
4917
4940
  }
4918
- this._error = u, j(u ? "exec errored" : "exec completed", i), n = !0, o && clearTimeout(o), e(u);
4941
+ this._error = u, B(u ? "exec errored" : "exec completed", i), n = !0, o && clearTimeout(o), e(u);
4919
4942
  };
4920
- this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
4921
- j("timed out", i), o = null;
4922
- const u = new hu(i);
4943
+ this.timeout > 0 && (B("setting up timeout", i, this.timeout), o = setTimeout(function() {
4944
+ B("timed out", i), o = null;
4945
+ const u = new mu(i);
4923
4946
  u.fn = r, s(u);
4924
4947
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4925
4948
  const a = r(this.server, this.opts, s);
4926
- a && typeof a.then == "function" && (j("exec: resolving promise", i), a.then(
4949
+ a && typeof a.then == "function" && (B("exec: resolving promise", i), a.then(
4927
4950
  () => A.nextTick(s),
4928
4951
  (u) => A.nextTick(s, u)
4929
4952
  ));
@@ -4933,48 +4956,48 @@ We.prototype.loadedSoFar = function() {
4933
4956
  return Promise.resolve();
4934
4957
  const t = () => {
4935
4958
  this.server.after((r, n) => {
4936
- this._error = r, this.q.pause(), r ? (j("rejecting promise", this.name, r), this._promise.reject(r)) : (j("resolving promise", this.name), this._promise.resolve()), this._promise = null, A.nextTick(n, r);
4959
+ this._error = r, this.q.pause(), r ? (B("rejecting promise", this.name, r), this._promise.reject(r)) : (B("resolving promise", this.name), this._promise.resolve()), this._promise = null, A.nextTick(n, r);
4937
4960
  }), this.q.resume();
4938
4961
  };
4939
4962
  let e;
4940
- return this._promise ? e = Promise.resolve() : (this._promise = mu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4963
+ return this._promise ? e = Promise.resolve() : (this._promise = bu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4941
4964
  };
4942
4965
  We.prototype.enqueue = function(t, e) {
4943
- j("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
4966
+ B("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
4944
4967
  };
4945
4968
  We.prototype.finish = function(t, e) {
4946
- j("finish", this.name, t);
4969
+ B("finish", this.name, t);
4947
4970
  const r = () => {
4948
- this.loaded || (j("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
4971
+ this.loaded || (B("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
4949
4972
  };
4950
4973
  if (t) {
4951
4974
  this._promise && (this._promise.reject(t), this._promise = null), r();
4952
4975
  return;
4953
4976
  }
4954
4977
  const n = () => {
4955
- if (j("check", this.name, this.q.length(), this.q.running(), this._promise), this.q.length() === 0 && this.q.running() === 0)
4978
+ if (B("check", this.name, this.q.length(), this.q.running(), this._promise), this.q.length() === 0 && this.q.running() === 0)
4956
4979
  if (this._promise) {
4957
4980
  const i = () => {
4958
- j("wrap"), queueMicrotask(n);
4981
+ B("wrap"), queueMicrotask(n);
4959
4982
  };
4960
4983
  this._promise.resolve(), this._promise.promise.then(i, i), this._promise = null;
4961
4984
  } else
4962
4985
  r();
4963
4986
  else
4964
- j("delayed", this.name), this.q.drain = () => {
4965
- j("drain", this.name), this.q.drain = bu, queueMicrotask(n);
4987
+ B("delayed", this.name), this.q.drain = () => {
4988
+ B("drain", this.name), this.q.drain = Su, queueMicrotask(n);
4966
4989
  };
4967
4990
  };
4968
4991
  queueMicrotask(n), this.q.resume();
4969
4992
  };
4970
- function gu(t, e) {
4993
+ function vu(t, e) {
4971
4994
  const r = this;
4972
- A.nextTick(Nr.bind(r), t, e);
4995
+ A.nextTick(Fr.bind(r), t, e);
4973
4996
  }
4974
- function Nr(t, e) {
4997
+ function Fr(t, e) {
4975
4998
  if (typeof t.func.then == "function") {
4976
4999
  t.func.then((n) => {
4977
- typeof n.default == "function" && (n = n.default), t.func = n, Nr.call(this, t, e);
5000
+ typeof n.default == "function" && (n = n.default), t.func = n, Fr.call(this, t, e);
4978
5001
  }, e);
4979
5002
  return;
4980
5003
  }
@@ -4985,59 +5008,59 @@ function Nr(t, e) {
4985
5008
  });
4986
5009
  });
4987
5010
  }
4988
- function bu() {
5011
+ function Su() {
4989
5012
  }
4990
- Pr.exports = We;
4991
- Pr.exports.loadPlugin = Nr;
4992
- var vu = Pr.exports;
4993
- const Sn = Mn, Su = zn.EventEmitter, wu = Nt.inherits, {
4994
- AVV_ERR_EXPOSE_ALREADY_DEFINED: Zt,
5013
+ Nr.exports = We;
5014
+ Nr.exports.loadPlugin = Fr;
5015
+ var wu = Nr.exports;
5016
+ const wn = jn, Au = Hn.EventEmitter, Eu = Ft.inherits, {
5017
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
4995
5018
  AVV_ERR_CALLBACK_NOT_FN: et,
4996
- AVV_ERR_PLUGIN_NOT_VALID: Au,
4997
- AVV_ERR_ROOT_PLG_BOOTED: Iu,
4998
- AVV_ERR_READY_TIMEOUT: Eu
4999
- } = li, Tu = au, mr = vu, ze = di("avvio"), _t = Symbol("kAvvio"), er = Symbol("kThenifyDoNotWrap");
5000
- function Ou(t, e, r) {
5019
+ AVV_ERR_PLUGIN_NOT_VALID: Iu,
5020
+ AVV_ERR_ROOT_PLG_BOOTED: Tu,
5021
+ AVV_ERR_READY_TIMEOUT: Ou
5022
+ } = di, _u = cu, gr = wu, ze = fi("avvio"), Ct = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
5023
+ function Cu(t, e, r) {
5001
5024
  const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
5002
5025
  if (t[i])
5003
- throw new Zt(i);
5026
+ throw new er(i);
5004
5027
  if (t[o])
5005
- throw new Zt(o);
5028
+ throw new er(o);
5006
5029
  if (t[s])
5007
- throw new Zt(s);
5008
- t[i] = function(d, c) {
5009
- return r.use(d, c), this;
5010
- }, Object.defineProperty(t, "then", { get: fi.bind(r) }), t[_t] = !0, t[o] = function(d) {
5011
- return typeof d != "function" ? r._loadRegistered() : (r.after(tr(d, this)), this);
5012
- }, t[s] = function(d) {
5013
- if (d && typeof d != "function")
5014
- throw new et(s, typeof d);
5015
- return r.ready(d ? tr(d, this) : void 0);
5016
- }, t[a] = function(d) {
5017
- if (typeof d != "function")
5018
- throw new et(a, typeof d);
5019
- return r.onClose(Pu(d, this)), this;
5020
- }, t[u] = function(d) {
5021
- if (d && typeof d != "function")
5022
- throw new et(u, typeof d);
5023
- return d ? (r.close(tr(d, this)), this) : r.close();
5030
+ throw new er(s);
5031
+ t[i] = function(l, c) {
5032
+ return r.use(l, c), this;
5033
+ }, Object.defineProperty(t, "then", { get: pi.bind(r) }), t[Ct] = !0, t[o] = function(l) {
5034
+ return typeof l != "function" ? r._loadRegistered() : (r.after(rr(l, this)), this);
5035
+ }, t[s] = function(l) {
5036
+ if (l && typeof l != "function")
5037
+ throw new et(s, typeof l);
5038
+ return r.ready(l ? rr(l, this) : void 0);
5039
+ }, t[a] = function(l) {
5040
+ if (typeof l != "function")
5041
+ throw new et(a, typeof l);
5042
+ return r.onClose(Fu(l, this)), this;
5043
+ }, t[u] = function(l) {
5044
+ if (l && typeof l != "function")
5045
+ throw new et(u, typeof l);
5046
+ return l ? (r.close(rr(l, this)), this) : r.close();
5024
5047
  };
5025
5048
  }
5026
- function U(t, e, r) {
5027
- if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof U)) {
5028
- const n = new U(t, e, r);
5029
- return t && Ou(t, e, n), n;
5030
- }
5031
- 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 Tu(), this._readyQ = Sn(this, pi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5032
- this.emit("start"), this._readyQ.drain = wn;
5033
- }, this._closeQ = Sn(this, ku, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5034
- this.emit("close"), this._closeQ.drain = wn;
5035
- }, this._doStart = null, this._root = new mr(this, _u.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5049
+ function q(t, e, r) {
5050
+ if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof q)) {
5051
+ const n = new q(t, e, r);
5052
+ return t && Cu(t, e, n), n;
5053
+ }
5054
+ 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 _u(), this._readyQ = wn(this, hi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
5055
+ this.emit("start"), this._readyQ.drain = An;
5056
+ }, this._closeQ = wn(this, Nu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
5057
+ this.emit("close"), this._closeQ.drain = An;
5058
+ }, this._doStart = null, this._root = new gr(this, Lu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
5036
5059
  const s = this.pluginTree.start(null, i, o);
5037
- this._root.once("loaded", (a, u, d) => {
5038
- this.pluginTree.stop(s, d);
5060
+ this._root.once("loaded", (a, u, l) => {
5061
+ this.pluginTree.stop(s, l);
5039
5062
  });
5040
- }), mr.loadPlugin.call(this, this._root, (n) => {
5063
+ }), gr.loadPlugin.call(this, this._root, (n) => {
5041
5064
  ze("root plugin ready");
5042
5065
  try {
5043
5066
  this.emit("preReady"), this._root = null;
@@ -5052,37 +5075,37 @@ function U(t, e, r) {
5052
5075
  this._readyQ.resume();
5053
5076
  });
5054
5077
  }
5055
- function _u(t, e, r) {
5078
+ function Lu(t, e, r) {
5056
5079
  this._doStart = r, e.autostart && this.start();
5057
5080
  }
5058
- wu(U, Su);
5059
- U.prototype.start = function() {
5081
+ Eu(q, Au);
5082
+ q.prototype.start = function() {
5060
5083
  return this.started = !0, A.nextTick(this._doStart), this;
5061
5084
  };
5062
- U.prototype.override = function(t, e, r) {
5085
+ q.prototype.override = function(t, e, r) {
5063
5086
  return t;
5064
5087
  };
5065
- function Cu(t) {
5088
+ function ku(t) {
5066
5089
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
5067
- throw new Au(typeof t);
5090
+ throw new Iu(typeof t);
5068
5091
  return t;
5069
5092
  }
5070
- U.prototype[_t] = !0;
5071
- U.prototype.use = function(t, e) {
5093
+ q.prototype[Ct] = !0;
5094
+ q.prototype.use = function(t, e) {
5072
5095
  return this._lastUsed = this._addPlugin(t, e, !1), this;
5073
5096
  };
5074
- U.prototype._loadRegistered = function() {
5097
+ q.prototype._loadRegistered = function() {
5075
5098
  const t = this._current[0];
5076
5099
  return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
5077
5100
  };
5078
- Object.defineProperty(U.prototype, "then", { get: fi });
5079
- U.prototype._addPlugin = function(t, e, r) {
5080
- if (t = Cu(t), e = e || {}, this.booted)
5081
- throw new Iu();
5082
- const n = this._current[0], i = new mr(this, t, e, r);
5101
+ Object.defineProperty(q.prototype, "then", { get: pi });
5102
+ q.prototype._addPlugin = function(t, e, r) {
5103
+ if (t = ku(t), e = e || {}, this.booted)
5104
+ throw new Tu();
5105
+ const n = this._current[0], i = new gr(this, t, e, r);
5083
5106
  if (i.once("start", (o, s, a) => {
5084
5107
  const u = this.pluginTree.start(n.name, s, a);
5085
- i.once("loaded", (d, c, f) => {
5108
+ i.once("loaded", (l, c, f) => {
5086
5109
  this.pluginTree.stop(u, f);
5087
5110
  });
5088
5111
  }), n.loaded)
@@ -5091,16 +5114,16 @@ U.prototype._addPlugin = function(t, e, r) {
5091
5114
  o && (this._error = o);
5092
5115
  }), i;
5093
5116
  };
5094
- U.prototype.after = function(t) {
5117
+ q.prototype.after = function(t) {
5095
5118
  if (!t)
5096
5119
  return this._loadRegistered();
5097
5120
  this._addPlugin(e.bind(this), {}, !0);
5098
5121
  function e(r, n, i) {
5099
- pi.call(this, t, i);
5122
+ hi.call(this, t, i);
5100
5123
  }
5101
5124
  return this;
5102
5125
  };
5103
- U.prototype.onClose = function(t) {
5126
+ q.prototype.onClose = function(t) {
5104
5127
  if (typeof t != "function")
5105
5128
  throw new Error("not a function");
5106
5129
  t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
@@ -5109,7 +5132,7 @@ U.prototype.onClose = function(t) {
5109
5132
  }
5110
5133
  return this;
5111
5134
  };
5112
- U.prototype.close = function(t) {
5135
+ q.prototype.close = function(t) {
5113
5136
  let e;
5114
5137
  if (t) {
5115
5138
  if (typeof t != "function")
@@ -5126,7 +5149,7 @@ U.prototype.close = function(t) {
5126
5149
  this._error = null, this._closeQ.push(t), A.nextTick(this._closeQ.resume.bind(this._closeQ));
5127
5150
  }), e;
5128
5151
  };
5129
- U.prototype.ready = function(t) {
5152
+ q.prototype.ready = function(t) {
5130
5153
  if (t) {
5131
5154
  if (typeof t != "function")
5132
5155
  throw new et("ready", typeof t);
@@ -5141,46 +5164,46 @@ U.prototype.ready = function(t) {
5141
5164
  }
5142
5165
  });
5143
5166
  };
5144
- U.prototype.prettyPrint = function() {
5167
+ q.prototype.prettyPrint = function() {
5145
5168
  return this.pluginTree.prittyPrint();
5146
5169
  };
5147
- U.prototype.toJSON = function() {
5170
+ q.prototype.toJSON = function() {
5148
5171
  return this.pluginTree.toJSON();
5149
5172
  };
5150
- function wn() {
5173
+ function An() {
5151
5174
  }
5152
- function fi() {
5175
+ function pi() {
5153
5176
  if (this.booted) {
5154
5177
  ze("thenify returning null because we are already booted");
5155
5178
  return;
5156
5179
  }
5157
- if (this[er]) {
5158
- this[er] = !1;
5180
+ if (this[tr]) {
5181
+ this[tr] = !1;
5159
5182
  return;
5160
5183
  }
5161
- return ze("thenify"), (t, e) => this._loadRegistered().then(() => (this[er] = !0, t(this._server)), e);
5184
+ return ze("thenify"), (t, e) => this._loadRegistered().then(() => (this[tr] = !0, t(this._server)), e);
5162
5185
  }
5163
- function pi(t, e) {
5186
+ function hi(t, e) {
5164
5187
  const r = this._server, n = this._error;
5165
5188
  let i;
5166
5189
  if (this._error = null, t.length === 0)
5167
- this._error = n, i = t(), i && !i[_t] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
5190
+ this._error = n, i = t(), i && !i[Ct] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
5168
5191
  else if (t.length === 1)
5169
- i = t(n), i && !i[_t] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
5192
+ i = t(n), i && !i[Ct] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
5170
5193
  else if (this._timeout === 0) {
5171
5194
  const o = (s) => {
5172
5195
  this._error = s, e(this._error);
5173
5196
  };
5174
5197
  t.length === 2 ? t(n, o) : t(n, r, o);
5175
5198
  } else
5176
- Lu.call(this, t, n, r, e);
5199
+ Pu.call(this, t, n, r, e);
5177
5200
  }
5178
- function Lu(t, e, r, n) {
5201
+ function Pu(t, e, r, n) {
5179
5202
  const i = t.name;
5180
5203
  ze("setting up ready timeout", i, this._timeout);
5181
5204
  let o = setTimeout(() => {
5182
5205
  ze("timed out", i), o = null;
5183
- const a = new Eu(i);
5206
+ const a = new Ou(i);
5184
5207
  a.fn = t, this._error = a, n(a);
5185
5208
  }, this._timeout);
5186
5209
  t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
@@ -5188,7 +5211,7 @@ function Lu(t, e, r, n) {
5188
5211
  o && (clearTimeout(o), this._error = a, n(this._error));
5189
5212
  }
5190
5213
  }
5191
- function ku(t, e) {
5214
+ function Nu(t, e) {
5192
5215
  const r = this._server, n = t[this._isOnCloseHandlerKey];
5193
5216
  if (t.length === 0 || t.length === 1) {
5194
5217
  let i;
@@ -5198,7 +5221,7 @@ function ku(t, e) {
5198
5221
  )) : A.nextTick(e);
5199
5222
  } else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
5200
5223
  }
5201
- function Pu(t, e) {
5224
+ function Fu(t, e) {
5202
5225
  return r.bind(e);
5203
5226
  function r(n, i) {
5204
5227
  let o;
@@ -5209,7 +5232,7 @@ function Pu(t, e) {
5209
5232
  }, i) : A.nextTick(i)) : t(this, i);
5210
5233
  }
5211
5234
  }
5212
- function tr(t, e) {
5235
+ function rr(t, e) {
5213
5236
  return r.bind(e);
5214
5237
  function r(n, i) {
5215
5238
  let o;
@@ -5220,16 +5243,16 @@ function tr(t, e) {
5220
5243
  }, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
5221
5244
  }
5222
5245
  }
5223
- Sr.exports = U;
5224
- Sr.exports.express = function(t) {
5225
- return U(t, {
5246
+ wr.exports = q;
5247
+ wr.exports.express = function(t) {
5248
+ return q(t, {
5226
5249
  expose: {
5227
5250
  use: "load"
5228
5251
  }
5229
5252
  });
5230
5253
  };
5231
- var Nu = Sr.exports;
5232
- const Fu = /* @__PURE__ */ as(Nu);
5254
+ var Du = wr.exports;
5255
+ const Ru = /* @__PURE__ */ cs(Du);
5233
5256
  (function() {
5234
5257
  if (window.requestAnimationFrame && window.cancelAnimationFrame)
5235
5258
  return;
@@ -5247,24 +5270,24 @@ const Fu = /* @__PURE__ */ as(Nu);
5247
5270
  }, window.cancelAnimationFrame = clearTimeout;
5248
5271
  }
5249
5272
  })();
5250
- function nc(t, e = !0, r = !0, n) {
5251
- 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 = Fu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5252
- return s.use($o), s.use(ko, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Do, { videoPlayerController: n?.videoPlayerController }), s.use(Vo, {
5273
+ function oc(t, e = !0, r = !0, n) {
5274
+ 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 = Ru(/* @__PURE__ */ Object.create({}), { autostart: !1 });
5275
+ return s.use(jo), s.use(No, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Vo, { videoPlayerController: n?.videoPlayerController }), s.use(Mo, {
5253
5276
  onContentActivate: n?.onContentActivate,
5254
5277
  withAd: n?.withAd,
5255
5278
  withAdNotification: n?.withAdNotification
5256
- }), s.use(Wi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(eo), s.use(Fo), s.use(Yo), s.use(So), s.use(ss), s.after((a, u, d) => {
5279
+ }), s.use(Yi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(to), s.use(Ro), s.use(Xo), s.use(Ao), s.use(us), s.after((a, u, l) => {
5257
5280
  if (a)
5258
5281
  throw a;
5259
- u.ready(), d();
5260
- }), r && s.after(async (a, u, d) => {
5282
+ u.ready(), l();
5283
+ }), r && s.after(async (a, u, l) => {
5261
5284
  if (a)
5262
5285
  throw a;
5263
- await u.sdk.initializeApp(), d();
5286
+ await u.sdk.initializeApp(), l();
5264
5287
  }), s.onClose(() => {
5265
5288
  console.log("close");
5266
5289
  }), s;
5267
5290
  }
5268
5291
  export {
5269
- nc as StreamLayer
5292
+ oc as StreamLayer
5270
5293
  };