@streamlayer/sdk-web 1.10.13 → 1.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +415 -420
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { pino as vi } from "pino";
|
|
2
2
|
import { QuestionType as E, QuestionStatus as W, PromotionType as H, SilenceSetting as Si, UseAsNotification as wi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
-
import { PickHistoryStatus as
|
|
4
|
-
import { SdkOverlayType as
|
|
5
|
-
import { InvitationCategory as
|
|
6
|
-
import { computed as Ai, map as Ei, atom as Ct, batched as
|
|
3
|
+
import { PickHistoryStatus as ct } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
|
+
import { SdkOverlayType as D } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
|
+
import { InvitationCategory as Dr, InvitationFrom as Rr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
+
import { computed as Ai, map as Ei, atom as Ct, batched as Vr, onMount as mr } from "nanostores";
|
|
7
7
|
import { v4 as St } from "uuid";
|
|
8
|
-
import { ConnectError as
|
|
9
|
-
import { createGrpcWebTransport as
|
|
10
|
-
import { nanoquery as
|
|
11
|
-
import { Events as
|
|
12
|
-
import { Client as
|
|
13
|
-
import { Users as
|
|
8
|
+
import { ConnectError as tt, Code as ie, createContextKey as $r, createClient as Mr, createContextValues as Ii } from "@connectrpc/connect";
|
|
9
|
+
import { createGrpcWebTransport as Br } from "@connectrpc/connect-web";
|
|
10
|
+
import { nanoquery as Ur } from "@nanostores/query";
|
|
11
|
+
import { Events as On } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
|
+
import { Client as rt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
|
+
import { Users as br } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { Feed as se } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
15
|
+
import { Leaderboard as Tn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
17
|
import { LinksClient as Oi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
-
import { Kind as
|
|
19
|
-
import { AnalyticsService as
|
|
18
|
+
import { Kind as x, TopicSubType as J, TopicType as q, PollOpenedFrom as X, Category as z, ScreenOrientation as jr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
|
+
import { AnalyticsService as kn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
20
|
import { InteractionActionType as qr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
|
-
import { NotificationKind as ye, NotificationType as
|
|
21
|
+
import { NotificationKind as ye, NotificationType as xr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
22
|
function Ti(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var _n = { exports: {} }, M = _n.exports = {}, le, de;
|
|
26
26
|
function nr() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
@@ -41,7 +41,7 @@ function ir() {
|
|
|
41
41
|
de = ir;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
|
-
function
|
|
44
|
+
function Cn(t) {
|
|
45
45
|
if (le === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
47
|
if ((le === nr || !le) && setTimeout)
|
|
@@ -71,20 +71,20 @@ function ki(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var Se = [],
|
|
74
|
+
var Se = [], xe = !1, Ce, ft = -1;
|
|
75
75
|
function _i() {
|
|
76
|
-
!
|
|
76
|
+
!xe || !Ce || (xe = !1, Ce.length ? Se = Ce.concat(Se) : ft = -1, Se.length && Ln());
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
if (!
|
|
80
|
-
var t =
|
|
81
|
-
|
|
78
|
+
function Ln() {
|
|
79
|
+
if (!xe) {
|
|
80
|
+
var t = Cn(_i);
|
|
81
|
+
xe = !0;
|
|
82
82
|
for (var e = Se.length; e; ) {
|
|
83
|
-
for (Ce = Se, Se = []; ++
|
|
84
|
-
Ce && Ce[
|
|
85
|
-
|
|
83
|
+
for (Ce = Se, Se = []; ++ft < e; )
|
|
84
|
+
Ce && Ce[ft].run();
|
|
85
|
+
ft = -1, e = Se.length;
|
|
86
86
|
}
|
|
87
|
-
Ce = null,
|
|
87
|
+
Ce = null, xe = !1, ki(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
M.nextTick = function(t) {
|
|
@@ -92,12 +92,12 @@ M.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
|
-
Se.push(new
|
|
95
|
+
Se.push(new Pn(t, e)), Se.length === 1 && !xe && Cn(Ln);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function Pn(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
Pn.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
103
|
M.title = "browser";
|
|
@@ -132,7 +132,7 @@ M.chdir = function(t) {
|
|
|
132
132
|
M.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var Ci =
|
|
135
|
+
var Ci = _n.exports;
|
|
136
136
|
const A = /* @__PURE__ */ Ti(Ci), Li = vi({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
@@ -149,7 +149,7 @@ class Pi extends Event {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
const Ni = Ee("event-bus");
|
|
152
|
-
class
|
|
152
|
+
class Fi {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
155
155
|
constructor(e = "sl-event-bus") {
|
|
@@ -173,7 +173,7 @@ class Di {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Di {
|
|
177
177
|
}
|
|
178
178
|
var we;
|
|
179
179
|
(function(t) {
|
|
@@ -213,16 +213,16 @@ var me;
|
|
|
213
213
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
214
214
|
})(me || (me = {}));
|
|
215
215
|
const Vi = {
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
[
|
|
216
|
+
[D.BETTING]: "betting",
|
|
217
|
+
[D.GAMES]: "games",
|
|
218
|
+
[D.PUBLIC_CHAT]: "publicChat",
|
|
219
|
+
[D.TWITTER]: "twitter"
|
|
220
220
|
};
|
|
221
|
-
var
|
|
221
|
+
var Xe;
|
|
222
222
|
(function(t) {
|
|
223
223
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
224
|
-
})(
|
|
225
|
-
class
|
|
224
|
+
})(Xe || (Xe = {}));
|
|
225
|
+
class Nn {
|
|
226
226
|
status;
|
|
227
227
|
source;
|
|
228
228
|
config;
|
|
@@ -230,7 +230,7 @@ class Dn {
|
|
|
230
230
|
listeners = /* @__PURE__ */ new Set();
|
|
231
231
|
settingsKey;
|
|
232
232
|
constructor({ settings: e, ...r }, n) {
|
|
233
|
-
this.settingsKey = Vi[r.type], this.status = Ct(
|
|
233
|
+
this.settingsKey = Vi[r.type], this.status = Ct(Xe.Suspended), this.config = new Le(ee(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(ee(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(ee({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
234
234
|
}
|
|
235
235
|
get featureConfig() {
|
|
236
236
|
return this.config.getStore();
|
|
@@ -242,10 +242,10 @@ class Dn {
|
|
|
242
242
|
this.listeners.add(e);
|
|
243
243
|
}
|
|
244
244
|
enable = () => {
|
|
245
|
-
this.status.set(
|
|
245
|
+
this.status.set(Xe.Ready);
|
|
246
246
|
};
|
|
247
247
|
disable = () => {
|
|
248
|
-
this.status.set(
|
|
248
|
+
this.status.set(Xe.Suspended);
|
|
249
249
|
};
|
|
250
250
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
251
251
|
let n;
|
|
@@ -319,7 +319,7 @@ class oe extends Lt {
|
|
|
319
319
|
key = () => this.getStore().key;
|
|
320
320
|
off = () => this.getStore().off();
|
|
321
321
|
}
|
|
322
|
-
const K = new
|
|
322
|
+
const K = new Fi();
|
|
323
323
|
async function* $i(t, e) {
|
|
324
324
|
for await (const r of e) {
|
|
325
325
|
t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
|
|
@@ -391,7 +391,7 @@ function Fn(t) {
|
|
|
391
391
|
t.name === "QuotaExceededError" || // Firefox
|
|
392
392
|
t.name === "NS_ERROR_DOM_QUOTA_REACHED");
|
|
393
393
|
}
|
|
394
|
-
class
|
|
394
|
+
class nt {
|
|
395
395
|
delimiter = ":";
|
|
396
396
|
prefix;
|
|
397
397
|
storage;
|
|
@@ -423,7 +423,7 @@ var ne;
|
|
|
423
423
|
(function(t) {
|
|
424
424
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
425
425
|
})(ne || (ne = {}));
|
|
426
|
-
const
|
|
426
|
+
const Qr = Ee("grpc:stream");
|
|
427
427
|
class Bi {
|
|
428
428
|
params;
|
|
429
429
|
streamCancel;
|
|
@@ -458,7 +458,7 @@ class Bi {
|
|
|
458
458
|
addStateLog = (e) => {
|
|
459
459
|
const r = this.state.getStore().get().log, n = `${this.options.name} ${(/* @__PURE__ */ new Date()).toISOString()}: ${e}`;
|
|
460
460
|
if (r.push(n), this.state.setValue("log", r), localStorage.getItem("SL_DEBUG")) {
|
|
461
|
-
e.startsWith("received data") ?
|
|
461
|
+
e.startsWith("received data") ? Qr.trace({ name: this.options.name, attempt: this.attempt }, "received data") : Qr.trace({ name: this.options.name, attempt: this.attempt }, e);
|
|
462
462
|
try {
|
|
463
463
|
window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
|
|
464
464
|
` + n);
|
|
@@ -485,7 +485,7 @@ class Bi {
|
|
|
485
485
|
for await (const o of i)
|
|
486
486
|
this.attempt = 0, this.onData(o);
|
|
487
487
|
} catch (n) {
|
|
488
|
-
n instanceof
|
|
488
|
+
n instanceof tt && n.code != ie.Canceled && this.onStreamError(n);
|
|
489
489
|
}
|
|
490
490
|
})(), this.updateState(ne.Connected);
|
|
491
491
|
};
|
|
@@ -525,7 +525,7 @@ class Bi {
|
|
|
525
525
|
*/
|
|
526
526
|
onStreamError = (e) => {
|
|
527
527
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
528
|
-
if (e instanceof
|
|
528
|
+
if (e instanceof tt && e.code !== ie.Canceled) {
|
|
529
529
|
this.updateState(ne.Failed), this.state.setValue("error", e), e.code === ie.Unknown && e.cause === "missing trailer" && (this.attempt = 0), this.reconnect();
|
|
530
530
|
return;
|
|
531
531
|
}
|
|
@@ -541,33 +541,33 @@ const Ui = /* @__PURE__ */ new Set([
|
|
|
541
541
|
ie.FailedPrecondition,
|
|
542
542
|
ie.Unavailable,
|
|
543
543
|
ie.DataLoss
|
|
544
|
-
]),
|
|
544
|
+
]), Gr = Ee("grpc:retry"), ji = (t) => async (e) => {
|
|
545
545
|
const r = e.contextValues.get(or.retryAttempts), n = 300, i = e.contextValues.get(or.retryDelay);
|
|
546
546
|
if (e.stream || r === 0)
|
|
547
547
|
return t(e);
|
|
548
|
-
|
|
548
|
+
Gr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
|
|
549
549
|
for (let o = 0; ; o++)
|
|
550
550
|
try {
|
|
551
551
|
return await t(e);
|
|
552
552
|
} catch (s) {
|
|
553
|
-
|
|
554
|
-
const a =
|
|
555
|
-
if (o >= r || !(a instanceof
|
|
553
|
+
Gr.trace({ attempt: o, error: s, url: e.url }, "retry attempt");
|
|
554
|
+
const a = tt.from(s);
|
|
555
|
+
if (o >= r || !(a instanceof tt) || !Ui.has(a.code))
|
|
556
556
|
throw s;
|
|
557
557
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
558
558
|
await new Promise((c) => setTimeout(c, d));
|
|
559
559
|
}
|
|
560
560
|
}, or = {
|
|
561
|
-
retryAttempts:
|
|
562
|
-
retryDelay:
|
|
563
|
-
},
|
|
561
|
+
retryAttempts: $r(10, { description: "Number of attempts to retry" }),
|
|
562
|
+
retryDelay: $r(3e4, { description: "Max delay between retries in milliseconds" })
|
|
563
|
+
}, qi = () => {
|
|
564
564
|
const t = localStorage.getItem("sl-device-id");
|
|
565
565
|
if (t)
|
|
566
566
|
return t;
|
|
567
567
|
const e = St();
|
|
568
568
|
return localStorage.setItem("sl-device-id", e), e;
|
|
569
|
-
},
|
|
570
|
-
class
|
|
569
|
+
}, xi = () => navigator.userAgentData?.platform || navigator.platform;
|
|
570
|
+
class zr {
|
|
571
571
|
toJsonOptions = {
|
|
572
572
|
emitDefaultValues: !1,
|
|
573
573
|
enumAsInteger: !0,
|
|
@@ -589,19 +589,19 @@ class Kr {
|
|
|
589
589
|
opts;
|
|
590
590
|
constructor(e, r) {
|
|
591
591
|
this.host = e, this.opts = r, this.$headers = new Le(ee({
|
|
592
|
-
"sl-device-id":
|
|
593
|
-
"sl-device-os":
|
|
592
|
+
"sl-device-id": qi(),
|
|
593
|
+
"sl-device-os": xi()
|
|
594
594
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map(), this.storeCache = /* @__PURE__ */ new Map();
|
|
595
|
-
const [n, i, o] =
|
|
595
|
+
const [n, i, o] = Ur({
|
|
596
596
|
dedupeTime: r?.dedupeTime,
|
|
597
597
|
refetchInterval: r?.refetchInterval
|
|
598
598
|
});
|
|
599
|
-
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport =
|
|
599
|
+
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport = Br({
|
|
600
600
|
baseUrl: e,
|
|
601
601
|
defaultTimeoutMs: 1e4,
|
|
602
602
|
interceptors: this.interceptors
|
|
603
603
|
// useBinaryFormat: true,
|
|
604
|
-
}), this.streamTransport =
|
|
604
|
+
}), this.streamTransport = Br({
|
|
605
605
|
baseUrl: e,
|
|
606
606
|
interceptors: this.interceptors
|
|
607
607
|
// useBinaryFormat: true,
|
|
@@ -625,7 +625,7 @@ class Kr {
|
|
|
625
625
|
for (const [i, o] of this.subscriptions)
|
|
626
626
|
o.disconnect(), this.subscriptions.delete(i);
|
|
627
627
|
this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
|
|
628
|
-
const [e, r, n] =
|
|
628
|
+
const [e, r, n] = Ur({
|
|
629
629
|
dedupeTime: this.opts?.dedupeTime,
|
|
630
630
|
refetchInterval: this.opts?.refetchInterval
|
|
631
631
|
});
|
|
@@ -641,14 +641,14 @@ class Kr {
|
|
|
641
641
|
const r = e.typeName;
|
|
642
642
|
if (this.clients.has(r))
|
|
643
643
|
return this.clients.get(r);
|
|
644
|
-
const n =
|
|
644
|
+
const n = Mr(e, this.transport);
|
|
645
645
|
return this.clients.set(r, n), n;
|
|
646
646
|
};
|
|
647
647
|
getStreamClient = (e) => {
|
|
648
648
|
const r = `stream-${e.typeName}`;
|
|
649
649
|
if (this.clients.has(r))
|
|
650
650
|
return this.clients.get(r);
|
|
651
|
-
const n =
|
|
651
|
+
const n = Mr(e, this.streamTransport);
|
|
652
652
|
return this.clients.set(r, n), n;
|
|
653
653
|
};
|
|
654
654
|
// create unary client, used for query request
|
|
@@ -691,7 +691,7 @@ class Kr {
|
|
|
691
691
|
};
|
|
692
692
|
}
|
|
693
693
|
const Qi = (t, e) => {
|
|
694
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
694
|
+
const { client: r, queryKey: n } = e.createPromiseClient(On, {
|
|
695
695
|
method: "retrieveEventId",
|
|
696
696
|
params: [t]
|
|
697
697
|
});
|
|
@@ -709,7 +709,7 @@ const Qi = (t, e) => {
|
|
|
709
709
|
}
|
|
710
710
|
});
|
|
711
711
|
}, Gi = (t, e) => {
|
|
712
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
712
|
+
const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getStream", params: [t] });
|
|
713
713
|
return e.nanoquery.createFetcherStore(n, {
|
|
714
714
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
715
715
|
id: s
|
|
@@ -717,14 +717,14 @@ const Qi = (t, e) => {
|
|
|
717
717
|
})).data?.attributes : void 0
|
|
718
718
|
});
|
|
719
719
|
}, zi = (t, e) => {
|
|
720
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
720
|
+
const { client: r, queryKey: n } = e.createPromiseClient(On, { method: "summary", params: [t] });
|
|
721
721
|
return e.nanoquery.createFetcherStore(n, {
|
|
722
722
|
fetcher: async (i, o, s) => s ? (await r.summary({
|
|
723
723
|
id: s
|
|
724
724
|
})).data?.attributes : void 0
|
|
725
725
|
});
|
|
726
726
|
}, Ki = (t, e) => {
|
|
727
|
-
const { queryKey: r, client: n } = e.createPromiseClient(
|
|
727
|
+
const { queryKey: r, client: n } = e.createPromiseClient(br, { method: "me", params: [t] });
|
|
728
728
|
return e.nanoquery.createFetcherStore(r, {
|
|
729
729
|
fetcher: async () => {
|
|
730
730
|
if (!e.getHeader("authorization"))
|
|
@@ -734,15 +734,15 @@ const Qi = (t, e) => {
|
|
|
734
734
|
}
|
|
735
735
|
});
|
|
736
736
|
}, Hi = (t) => {
|
|
737
|
-
const { client: e, createRequestOptions: r } = t.createPromiseClient(
|
|
737
|
+
const { client: e, createRequestOptions: r } = t.createPromiseClient(br, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
738
738
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
739
739
|
}, Wi = (t, e) => {
|
|
740
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
740
|
+
const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "get", params: [t] });
|
|
741
741
|
return e.nanoquery.createFetcherStore(n, {
|
|
742
742
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
743
743
|
});
|
|
744
744
|
}, Yi = (t, e) => {
|
|
745
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
745
|
+
const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getOrganization", params: [t] });
|
|
746
746
|
return e.nanoquery.createFetcherStore(n, {
|
|
747
747
|
fetcher: async () => {
|
|
748
748
|
const i = await r.getOrganization({});
|
|
@@ -753,7 +753,7 @@ const Qi = (t, e) => {
|
|
|
753
753
|
}
|
|
754
754
|
});
|
|
755
755
|
}, Ji = (t, e) => {
|
|
756
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
756
|
+
const { client: r, queryKey: n } = e.createPromiseClient(rt, {
|
|
757
757
|
method: "getOrganizationAdvertising",
|
|
758
758
|
params: [t]
|
|
759
759
|
});
|
|
@@ -761,11 +761,11 @@ const Qi = (t, e) => {
|
|
|
761
761
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
762
762
|
});
|
|
763
763
|
}, Xi = (t, e, r) => {
|
|
764
|
-
t.transport = new
|
|
764
|
+
t.transport = new zr(e.host, {
|
|
765
765
|
dedupeTime: 1e3 * 60 * 5,
|
|
766
766
|
refetchInterval: 1e3 * 60 * 5,
|
|
767
767
|
retryable: !0
|
|
768
|
-
}), t.analyticsTransport = new
|
|
768
|
+
}), 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) => {
|
|
769
769
|
t.analyticsTransport.$headers.getStore().set(n);
|
|
770
770
|
}), t.sdk.onMount({ name: "transport" }, () => () => {
|
|
771
771
|
t.transport.disconnect(), t.analyticsTransport.disconnect();
|
|
@@ -775,7 +775,7 @@ var ge;
|
|
|
775
775
|
(function(t) {
|
|
776
776
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
777
777
|
})(ge || (ge = {}));
|
|
778
|
-
class je extends
|
|
778
|
+
class je extends nt {
|
|
779
779
|
constructor() {
|
|
780
780
|
super("user");
|
|
781
781
|
}
|
|
@@ -869,13 +869,13 @@ const no = (t, e, r) => {
|
|
|
869
869
|
t.store.unsubscribe();
|
|
870
870
|
}, r();
|
|
871
871
|
}, io = (t) => {
|
|
872
|
-
const { client: e } = t.createPromiseClient(
|
|
872
|
+
const { client: e } = t.createPromiseClient(Tn, { method: "list" });
|
|
873
873
|
return (r) => e.list(r);
|
|
874
|
-
},
|
|
875
|
-
const { client: e } = t.createPromiseClient(
|
|
874
|
+
}, Dn = (t) => {
|
|
875
|
+
const { client: e } = t.createPromiseClient(Tn, { method: "summary" });
|
|
876
876
|
return (r) => e.summary(r);
|
|
877
877
|
}, oo = (t, e) => {
|
|
878
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
878
|
+
const { client: r, queryKey: n } = e.createPromiseClient(br, {
|
|
879
879
|
method: "getFriends",
|
|
880
880
|
params: [t]
|
|
881
881
|
});
|
|
@@ -933,12 +933,12 @@ const no = (t, e, r) => {
|
|
|
933
933
|
}, lo = (t, e) => {
|
|
934
934
|
const { client: r } = e.createStreamClient(se);
|
|
935
935
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
936
|
-
},
|
|
936
|
+
}, Rn = async (t, e) => {
|
|
937
937
|
const { client: r } = e.createPromiseClient(se, { method: "questionByUser", params: [t] });
|
|
938
938
|
return (await r.questionByUser({
|
|
939
939
|
questionId: t
|
|
940
940
|
})).data?.attributes?.question;
|
|
941
|
-
},
|
|
941
|
+
}, pt = (t, e) => {
|
|
942
942
|
const { client: r, queryKey: n, queryKeyStr: i } = e.createPromiseClient(se, {
|
|
943
943
|
method: "questionByUser",
|
|
944
944
|
params: [t]
|
|
@@ -1039,13 +1039,13 @@ const no = (t, e, r) => {
|
|
|
1039
1039
|
refetchInterval: 1 / 0
|
|
1040
1040
|
});
|
|
1041
1041
|
}, ho = (t, e, r) => {
|
|
1042
|
-
const n =
|
|
1042
|
+
const n = Vr([e, r], () => {
|
|
1043
1043
|
const a = e.get();
|
|
1044
1044
|
if (!a)
|
|
1045
1045
|
return;
|
|
1046
1046
|
const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
|
|
1047
1047
|
return u ? (u.openedFrom = d, u) : a.question;
|
|
1048
|
-
}), i =
|
|
1048
|
+
}), i = Vr(n, (a) => a && a.type === "question" ? a.id : void 0), o = pt(i, t);
|
|
1049
1049
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
1050
1050
|
const u = o.get().data, d = (c, l) => {
|
|
1051
1051
|
if (!c || !l)
|
|
@@ -1074,7 +1074,7 @@ var ce;
|
|
|
1074
1074
|
(function(t) {
|
|
1075
1075
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.QUESTION_RECEIVED = "q-received", t.QUESTION_OPENED = "q-opened";
|
|
1076
1076
|
})(ce || (ce = {}));
|
|
1077
|
-
class yo extends
|
|
1077
|
+
class yo extends nt {
|
|
1078
1078
|
constructor() {
|
|
1079
1079
|
super("gamification-session", window.sessionStorage);
|
|
1080
1080
|
}
|
|
@@ -1083,7 +1083,7 @@ class yo extends it {
|
|
|
1083
1083
|
};
|
|
1084
1084
|
readValue = (e) => this.read(...e);
|
|
1085
1085
|
}
|
|
1086
|
-
class go extends
|
|
1086
|
+
class go extends nt {
|
|
1087
1087
|
sessionStorage;
|
|
1088
1088
|
constructor() {
|
|
1089
1089
|
super("gamification"), this.sessionStorage = new yo();
|
|
@@ -1197,7 +1197,7 @@ class mo {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
});
|
|
1199
1199
|
else if (!s && Object.keys(o).length < 5) {
|
|
1200
|
-
const a = await
|
|
1200
|
+
const a = await Rn(i.id, this.transport);
|
|
1201
1201
|
this.betPack.getStore().mutate({
|
|
1202
1202
|
timestamp: Date.now(),
|
|
1203
1203
|
data: {
|
|
@@ -1380,7 +1380,7 @@ var wt;
|
|
|
1380
1380
|
(function(t) {
|
|
1381
1381
|
t.OPENED = "opened";
|
|
1382
1382
|
})(wt || (wt = {}));
|
|
1383
|
-
class vo extends
|
|
1383
|
+
class vo extends nt {
|
|
1384
1384
|
constructor() {
|
|
1385
1385
|
super("notification");
|
|
1386
1386
|
}
|
|
@@ -1442,12 +1442,12 @@ var ze;
|
|
|
1442
1442
|
(function(t) {
|
|
1443
1443
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1444
1444
|
})(ze || (ze = {}));
|
|
1445
|
-
const
|
|
1445
|
+
const Kr = async (t, e) => {
|
|
1446
1446
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(se, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1447
1447
|
try {
|
|
1448
1448
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1449
1449
|
} catch (o) {
|
|
1450
|
-
throw
|
|
1450
|
+
throw tt.from(o)?.code === ie.AlreadyExists ? new Error(ze.ALREADY_VOTED) : new Error(ze.UNKNOWN);
|
|
1451
1451
|
}
|
|
1452
1452
|
}, Vn = (t, e) => {
|
|
1453
1453
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(se, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
@@ -1487,14 +1487,14 @@ const Hr = async (t, e) => {
|
|
|
1487
1487
|
const b = s.get(), S = p || b.page + 1;
|
|
1488
1488
|
S <= o && s.set({ ...b, page: S });
|
|
1489
1489
|
};
|
|
1490
|
-
return
|
|
1490
|
+
return mr(a, () => {
|
|
1491
1491
|
const p = e.listen(d), b = n?.listen(d);
|
|
1492
1492
|
return () => {
|
|
1493
1493
|
p(), b?.();
|
|
1494
1494
|
};
|
|
1495
1495
|
}), { $store: a, fetchMore: l, invalidate: c };
|
|
1496
1496
|
};
|
|
1497
|
-
class Io extends
|
|
1497
|
+
class Io extends nt {
|
|
1498
1498
|
get = this.read;
|
|
1499
1499
|
set = this.write;
|
|
1500
1500
|
del = this.remove;
|
|
@@ -1502,27 +1502,27 @@ class Io extends it {
|
|
|
1502
1502
|
super("deep-link-context", window.sessionStorage);
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
|
-
const
|
|
1505
|
+
const Hr = "sldl", Pt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", Oo = /* @__PURE__ */ new Set([Pt, $n, Mn]), Wr = (t) => {
|
|
1506
1506
|
const e = {}, r = {};
|
|
1507
1507
|
for (const [n, i] of t)
|
|
1508
1508
|
Oo.has(n) ? e[n] = i : r[n] = i;
|
|
1509
1509
|
return { result: e, remain: r };
|
|
1510
1510
|
}, To = ({ hash: t, search: e }) => {
|
|
1511
|
-
if (t && t.includes(
|
|
1511
|
+
if (t && t.includes(Hr)) {
|
|
1512
1512
|
const r = new URLSearchParams(t.substr(1));
|
|
1513
|
-
return { hash:
|
|
1513
|
+
return { hash: Wr(r) };
|
|
1514
1514
|
}
|
|
1515
|
-
if (e && e.includes(
|
|
1515
|
+
if (e && e.includes(Hr)) {
|
|
1516
1516
|
const r = new URLSearchParams(e);
|
|
1517
|
-
return { search:
|
|
1517
|
+
return { search: Wr(r) };
|
|
1518
1518
|
}
|
|
1519
1519
|
return null;
|
|
1520
|
-
},
|
|
1520
|
+
}, Yr = Ee("deep_link"), fe = {
|
|
1521
1521
|
debug: (...t) => {
|
|
1522
|
-
|
|
1522
|
+
Yr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1523
1523
|
},
|
|
1524
1524
|
trace: (...t) => {
|
|
1525
|
-
|
|
1525
|
+
Yr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1526
1526
|
}
|
|
1527
1527
|
}, ko = (t, e) => {
|
|
1528
1528
|
const { hash: r, search: n } = window.location;
|
|
@@ -1587,7 +1587,7 @@ const Wr = "sldl", Pt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", Oo = /*
|
|
|
1587
1587
|
};
|
|
1588
1588
|
ko(t.deepLink.$store, s), r();
|
|
1589
1589
|
}, Co = Ee("bypass");
|
|
1590
|
-
class Lo extends
|
|
1590
|
+
class Lo extends Di {
|
|
1591
1591
|
$coreStore;
|
|
1592
1592
|
deepLink;
|
|
1593
1593
|
transport;
|
|
@@ -1688,24 +1688,24 @@ const Je = new je(), Po = (t, e, r) => {
|
|
|
1688
1688
|
}, t.sdk.logout = () => {
|
|
1689
1689
|
t.auth.logout(), Je.clear();
|
|
1690
1690
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1691
|
-
},
|
|
1691
|
+
}, Jr = Ee("video_player"), lt = {
|
|
1692
1692
|
debug: (...t) => {
|
|
1693
|
-
|
|
1693
|
+
Jr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1694
1694
|
},
|
|
1695
1695
|
trace: (...t) => {
|
|
1696
|
-
|
|
1696
|
+
Jr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1697
1697
|
}
|
|
1698
1698
|
}, No = (t, e, r) => {
|
|
1699
1699
|
t.videoPlayer = {
|
|
1700
1700
|
controllers: /* @__PURE__ */ new Set()
|
|
1701
1701
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
1702
|
-
|
|
1702
|
+
lt.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
|
|
1703
1703
|
}, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
|
|
1704
|
-
|
|
1704
|
+
lt.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
|
|
1705
1705
|
}, t.sdk.controlVideoPlayer = (n) => {
|
|
1706
|
-
|
|
1706
|
+
lt.trace("controlling video player");
|
|
1707
1707
|
for (const i of t.videoPlayer.controllers) {
|
|
1708
|
-
|
|
1708
|
+
lt.trace("calling video player controller");
|
|
1709
1709
|
try {
|
|
1710
1710
|
i(n);
|
|
1711
1711
|
} catch (o) {
|
|
@@ -1713,13 +1713,13 @@ const Je = new je(), Po = (t, e, r) => {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
1715
|
}, r();
|
|
1716
|
-
},
|
|
1716
|
+
}, Fo = {
|
|
1717
1717
|
[E.FACTOID]: "insight",
|
|
1718
1718
|
[E.POLL]: "poll",
|
|
1719
1719
|
[E.TRIVIA]: "trivia",
|
|
1720
1720
|
[E.PREDICTION]: "prediction",
|
|
1721
1721
|
[E.TWEET]: "tweet"
|
|
1722
|
-
},
|
|
1722
|
+
}, Do = (t, e, r) => {
|
|
1723
1723
|
t.sdk.uiState = ee({}), t.ui = {
|
|
1724
1724
|
enableAppNotification: function() {
|
|
1725
1725
|
t.sdk.uiState.setKey("appNotification", !0);
|
|
@@ -1753,7 +1753,7 @@ const Je = new je(), Po = (t, e, r) => {
|
|
|
1753
1753
|
};
|
|
1754
1754
|
t.onQuestionActivate = ({ questionType: i, ...o }) => {
|
|
1755
1755
|
if (t.ui.onContentActivate) {
|
|
1756
|
-
const s = o.type || i &&
|
|
1756
|
+
const s = o.type || i && Fo[i] || "question";
|
|
1757
1757
|
t.ui.enableAppNotification(), t.ui.onContentActivate({ ...o, type: s });
|
|
1758
1758
|
}
|
|
1759
1759
|
}, t.sdk.onMount({ name: "ui" }, () => {
|
|
@@ -1881,7 +1881,7 @@ const Je = new je(), Po = (t, e, r) => {
|
|
|
1881
1881
|
a ? t.stores.slStreamId.getStore().set({ loading: !1, data: s }) : t.stores.providerStreamId.setValue(s);
|
|
1882
1882
|
}, r();
|
|
1883
1883
|
}, Vo = (t, e) => {
|
|
1884
|
-
const { client: r, queryKey: n } = t.createPromiseClient(
|
|
1884
|
+
const { client: r, queryKey: n } = t.createPromiseClient(rt, {
|
|
1885
1885
|
method: "generateDeepLink",
|
|
1886
1886
|
params: e
|
|
1887
1887
|
});
|
|
@@ -1904,14 +1904,14 @@ const Je = new je(), Po = (t, e, r) => {
|
|
|
1904
1904
|
}, $o = (t, { web: e, mobile: r }) => {
|
|
1905
1905
|
const { client: n } = t.createPromiseClient(Oi, { method: "generate" });
|
|
1906
1906
|
return n.generate({ web: e, mobile: r });
|
|
1907
|
-
},
|
|
1907
|
+
}, Xr = (t, e) => {
|
|
1908
1908
|
const r = new URLSearchParams(t);
|
|
1909
1909
|
for (const [n, i] of Object.entries(e))
|
|
1910
1910
|
r.append(n, i);
|
|
1911
1911
|
return r.toString();
|
|
1912
1912
|
}, Mo = (t, e, r, n) => {
|
|
1913
1913
|
const i = ee({});
|
|
1914
|
-
return
|
|
1914
|
+
return mr(i, () => Vo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
|
|
1915
1915
|
const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", l = e.get() || "", p = r.get() || "", b = {
|
|
1916
1916
|
[Pt]: c,
|
|
1917
1917
|
[$n]: l,
|
|
@@ -1920,7 +1920,7 @@ const Je = new je(), Po = (t, e, r) => {
|
|
|
1920
1920
|
if (!u && d) {
|
|
1921
1921
|
i.setKey("loading", !0);
|
|
1922
1922
|
let S = window.location.search, m = window.location.hash;
|
|
1923
|
-
S && m || m ? S = `?${
|
|
1923
|
+
S && m || m ? S = `?${Xr(S, b)}` : m = `#${Xr("", b)}`;
|
|
1924
1924
|
const v = window.location.origin + window.location.pathname + S + m;
|
|
1925
1925
|
try {
|
|
1926
1926
|
const k = await $o(t, { web: v, mobile: d });
|
|
@@ -1967,7 +1967,7 @@ const Bo = (t, e, r, n) => {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
1969
|
});
|
|
1970
|
-
},
|
|
1970
|
+
}, dt = (t, e, r, n, i, o, s, a) => {
|
|
1971
1971
|
try {
|
|
1972
1972
|
const u = e.userId.get(), d = e.organizationId.get(), c = e.slStreamId.get();
|
|
1973
1973
|
if (!u || !d || !c)
|
|
@@ -1996,7 +1996,7 @@ const Bo = (t, e, r, n) => {
|
|
|
1996
1996
|
} catch (u) {
|
|
1997
1997
|
console.error(u);
|
|
1998
1998
|
}
|
|
1999
|
-
},
|
|
1999
|
+
}, Zr = (t, e, r, n, i) => {
|
|
2000
2000
|
let o = !!i?.skipOnboarding;
|
|
2001
2001
|
const s = e.storage, a = B($.Unset);
|
|
2002
2002
|
a.subscribe((c) => {
|
|
@@ -2008,12 +2008,12 @@ const Bo = (t, e, r, n) => {
|
|
|
2008
2008
|
});
|
|
2009
2009
|
const u = [];
|
|
2010
2010
|
return a.get() !== $.Completed && (u.push(e.userId.listen((c) => {
|
|
2011
|
-
c &&
|
|
2011
|
+
c && dt(a, e, t, n, s, u, r, i);
|
|
2012
2012
|
})), u.push(e.moderation.listen((c) => {
|
|
2013
|
-
c.data &&
|
|
2013
|
+
c.data && dt(a, e, t, n, s, u, r, i);
|
|
2014
2014
|
})), u.push(t.featureSettings.listen((c) => {
|
|
2015
|
-
c &&
|
|
2016
|
-
}))),
|
|
2015
|
+
c && dt(a, e, t, n, s, u, r, i);
|
|
2016
|
+
}))), dt(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
|
|
2017
2017
|
const c = e.slStreamId.get();
|
|
2018
2018
|
if (c) {
|
|
2019
2019
|
await Vn(r, c), a.set($.Completed), s.saveOnboardingStatus({
|
|
@@ -2029,7 +2029,7 @@ const Bo = (t, e, r, n) => {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
} };
|
|
2031
2031
|
}, Uo = (t, e, r, n) => {
|
|
2032
|
-
const i = ee(void 0), o =
|
|
2032
|
+
const i = ee(void 0), o = Dn(n), s = async () => {
|
|
2033
2033
|
const u = t.get(), d = e.get(), c = r ? r.getStore().get().data?.map((b) => b.slId) : [];
|
|
2034
2034
|
if (!c || !u || !d)
|
|
2035
2035
|
return;
|
|
@@ -2042,7 +2042,7 @@ const Bo = (t, e, r, n) => {
|
|
|
2042
2042
|
}, a = () => {
|
|
2043
2043
|
s();
|
|
2044
2044
|
};
|
|
2045
|
-
return
|
|
2045
|
+
return mr(i, () => {
|
|
2046
2046
|
a();
|
|
2047
2047
|
const u = t.listen(s), d = r?.listen(s), c = e.listen(s);
|
|
2048
2048
|
return () => {
|
|
@@ -2050,14 +2050,14 @@ const Bo = (t, e, r, n) => {
|
|
|
2050
2050
|
};
|
|
2051
2051
|
}), { $store: i, invalidate: a };
|
|
2052
2052
|
}, jo = async (t, e, r, n, i) => {
|
|
2053
|
-
const o =
|
|
2053
|
+
const o = Dn(i), s = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
2054
2054
|
eventId: s,
|
|
2055
2055
|
userId: n,
|
|
2056
2056
|
usersIds: [...u, a]
|
|
2057
2057
|
};
|
|
2058
2058
|
return (await o(d)).data?.attributes?.summary;
|
|
2059
|
-
},
|
|
2060
|
-
class
|
|
2059
|
+
}, en = /* @__PURE__ */ new Set([E.POLL, E.PREDICTION, E.TRIVIA]);
|
|
2060
|
+
class qo extends Nn {
|
|
2061
2061
|
/** user statistics (leaderboard panel) */
|
|
2062
2062
|
userSummary;
|
|
2063
2063
|
/** feed list (pick history) */
|
|
@@ -2098,16 +2098,16 @@ class xo extends Dn {
|
|
|
2098
2098
|
cancels = /* @__PURE__ */ new Set();
|
|
2099
2099
|
onQuestionActivate;
|
|
2100
2100
|
constructor(e, r, n) {
|
|
2101
|
-
if (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 = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = B(!n.sdk.withAuth), this.leaderboardId = new te(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(
|
|
2101
|
+
if (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 = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = B(!n.sdk.withAuth), this.leaderboardId = new te(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Mo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Uo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
|
|
2102
2102
|
this.friends = new oe(oo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = B(void 0);
|
|
2103
2103
|
const i = this.leaderboardList = Eo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
|
|
2104
2104
|
this.cancels.add(this.userSummary.$store.listen((o, s) => {
|
|
2105
2105
|
s?.summary && o?.summary && i.invalidate();
|
|
2106
2106
|
}));
|
|
2107
2107
|
}
|
|
2108
|
-
this.connect(), this.skipOnboarding = !!n.sdk.options.get().skipOnboarding, this.onboardingStatus =
|
|
2108
|
+
this.connect(), this.skipOnboarding = !!n.sdk.options.get().skipOnboarding, this.onboardingStatus = Zr(this, this.background, n.transport, n.notifications, {
|
|
2109
2109
|
skipOnboarding: n.sdk.options.get().skipOnboarding
|
|
2110
|
-
}), n.sdk.options.get().skipOnboarding || (this.onboardingStatus =
|
|
2110
|
+
}), n.sdk.options.get().skipOnboarding || (this.onboardingStatus = Zr(this, this.background, n.transport, n.notifications, {
|
|
2111
2111
|
skipOnboarding: n.sdk.options.get().skipOnboarding
|
|
2112
2112
|
})), 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) => {
|
|
2113
2113
|
(o === void 0 || i !== $.Unset) && this.background.activeQuestionId.invalidate();
|
|
@@ -2146,17 +2146,17 @@ class xo extends Dn {
|
|
|
2146
2146
|
prefix: `notification-id:${s}`
|
|
2147
2147
|
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((G) => G.id === s), l = d[c];
|
|
2148
2148
|
let p = l?.attributes?.attributes?.value?.answerId;
|
|
2149
|
-
const b =
|
|
2149
|
+
const b = pt(s, this.transport), S = b.subscribe(() => {
|
|
2150
2150
|
});
|
|
2151
2151
|
await b.get().promise;
|
|
2152
2152
|
let m = b.get().data;
|
|
2153
|
-
m || (m = await
|
|
2153
|
+
m || (m = await Rn(s, this.transport), b.mutate(m)), S(), window.requestAnimationFrame(() => {
|
|
2154
2154
|
b.invalidate();
|
|
2155
2155
|
}), p || (p = m?.answers.find(({ youVoted: G }) => G)?.id);
|
|
2156
2156
|
const v = a.find(({ correct: G }) => G), k = p ? a.find(({ id: G }) => G === p) : void 0, V = !!k?.correct;
|
|
2157
2157
|
if (l && d[c]?.attributes?.attributes.case === "question") {
|
|
2158
2158
|
try {
|
|
2159
|
-
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = V ?
|
|
2159
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = V ? ct.WON : ct.LOST);
|
|
2160
2160
|
} catch {
|
|
2161
2161
|
}
|
|
2162
2162
|
this.feedList.getStore().mutate(d);
|
|
@@ -2189,7 +2189,7 @@ class xo extends Dn {
|
|
|
2189
2189
|
}
|
|
2190
2190
|
})), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
|
|
2191
2191
|
const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
|
|
2192
|
-
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== W.ACTIVE && n.attributes.status !== W.RESOLVED) && !(!this.isInteractiveAllowed &&
|
|
2192
|
+
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== W.ACTIVE && n.attributes.status !== W.RESOLVED) && !(!this.isInteractiveAllowed && en.has(n.attributes.type))) {
|
|
2193
2193
|
if (i !== -1)
|
|
2194
2194
|
if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
|
|
2195
2195
|
const o = r[i];
|
|
@@ -2257,10 +2257,10 @@ class xo extends Dn {
|
|
|
2257
2257
|
if (!this.betPack)
|
|
2258
2258
|
return;
|
|
2259
2259
|
try {
|
|
2260
|
-
await
|
|
2260
|
+
await Kr(this.transport, { questionId: e, answerId: r });
|
|
2261
2261
|
} catch (o) {
|
|
2262
2262
|
if (o.message === ze.ALREADY_VOTED) {
|
|
2263
|
-
const s =
|
|
2263
|
+
const s = pt(e, this.transport), a = s.subscribe(() => {
|
|
2264
2264
|
});
|
|
2265
2265
|
s.invalidate(), a();
|
|
2266
2266
|
}
|
|
@@ -2279,7 +2279,7 @@ class xo extends Dn {
|
|
|
2279
2279
|
} : o), this.betPack.getStore().mutate({ data: n, timestamp: Date.now() }));
|
|
2280
2280
|
};
|
|
2281
2281
|
submitAnswer = async (e, r) => {
|
|
2282
|
-
const n =
|
|
2282
|
+
const n = pt(e, this.transport), i = n.subscribe(() => {
|
|
2283
2283
|
}), o = { ...n.get().data || {} }, s = () => {
|
|
2284
2284
|
const a = this.feedList.getValues().data;
|
|
2285
2285
|
if (!a)
|
|
@@ -2296,7 +2296,7 @@ class xo extends Dn {
|
|
|
2296
2296
|
const l = n.get().data;
|
|
2297
2297
|
if (i(), l) {
|
|
2298
2298
|
const p = l.answers.find((v) => v.correct === !0), b = l.answers.findIndex((v) => v.id === r), S = l.answers[b], m = l.answers.every(({ percentageDecimal: v }, k) => v === o?.answers[k].percentageDecimal);
|
|
2299
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = S?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ?
|
|
2299
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = S?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ct.WON : ct.LOST), this.feedList.getStore().mutate([...a]), l.answers[b].correct = p?.id === r, l.answers[b].youVoted = !0, m && l.answers.forEach((v) => {
|
|
2300
2300
|
v.percentageDecimal = 0;
|
|
2301
2301
|
}), p?.id === r && (l.answers[b].pointsEarned = l.status === W.RESOLVED ? 0 : p.points), n.mutate({ ...l });
|
|
2302
2302
|
}
|
|
@@ -2306,7 +2306,7 @@ class xo extends Dn {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
};
|
|
2308
2308
|
try {
|
|
2309
|
-
await
|
|
2309
|
+
await Kr(this.transport, { questionId: e, answerId: r }), s();
|
|
2310
2310
|
} catch (a) {
|
|
2311
2311
|
if (a.message === ze.ALREADY_VOTED) {
|
|
2312
2312
|
this.userSummary.invalidate();
|
|
@@ -2329,12 +2329,7 @@ class xo extends Dn {
|
|
|
2329
2329
|
animateHiding: !1
|
|
2330
2330
|
});
|
|
2331
2331
|
let i = r?.attributes?.type;
|
|
2332
|
-
|
|
2333
|
-
const s = Xe(e, this.transport);
|
|
2334
|
-
sr(e, this.transport).then((a) => {
|
|
2335
|
-
s.mutate(a);
|
|
2336
|
-
});
|
|
2337
|
-
}
|
|
2332
|
+
!i && !n && (i = (this.feedList.getStore().value?.data || []).find((a) => a.id === e)?.attributes?.type);
|
|
2338
2333
|
const o = {
|
|
2339
2334
|
eventId: this.background.slStreamId.get() || "",
|
|
2340
2335
|
userId: this.background.userId.get() || "",
|
|
@@ -2395,7 +2390,7 @@ class xo extends Dn {
|
|
|
2395
2390
|
showInApp = (e) => {
|
|
2396
2391
|
const r = this.onboardingStatus.$store.get();
|
|
2397
2392
|
if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Si.ON && e.data.question.status === W.ACTIVE && !e.data.question.marketClosed) {
|
|
2398
|
-
if (
|
|
2393
|
+
if (en.has(e.data.question.type))
|
|
2399
2394
|
this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
|
|
2400
2395
|
type: we.QUESTION,
|
|
2401
2396
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2498,28 +2493,28 @@ class xo extends Dn {
|
|
|
2498
2493
|
}
|
|
2499
2494
|
};
|
|
2500
2495
|
}
|
|
2501
|
-
const
|
|
2502
|
-
[
|
|
2496
|
+
const xo = {
|
|
2497
|
+
[D.GAMES]: !0
|
|
2503
2498
|
};
|
|
2504
|
-
class Qo extends
|
|
2499
|
+
class Qo extends Nn {
|
|
2505
2500
|
constructor(e, r) {
|
|
2506
2501
|
super(e, r);
|
|
2507
2502
|
}
|
|
2508
2503
|
}
|
|
2509
|
-
const Go = (t, e, r) => t.type ===
|
|
2510
|
-
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new te(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new te(B(
|
|
2504
|
+
const Go = (t, e, r) => t.type === D.GAMES ? new qo(t, e, r) : new Qo(t, e), zo = (t, e, r) => {
|
|
2505
|
+
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new te(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new te(B(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) => {
|
|
2511
2506
|
t.sdk.initializeApp().then(() => {
|
|
2512
2507
|
t.activeFeature.setValue(n);
|
|
2513
2508
|
});
|
|
2514
2509
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
2515
2510
|
const i = t.activeFeature.getValue();
|
|
2516
|
-
if (t.activeFeature.setValue(
|
|
2511
|
+
if (t.activeFeature.setValue(D.UNSET), n && i) {
|
|
2517
2512
|
t.features.delete(i);
|
|
2518
2513
|
const o = t.sdk.featuresList.getValue();
|
|
2519
2514
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2520
2515
|
}
|
|
2521
2516
|
}, t.initFeature = (n, i = me.ORGANIZATION) => {
|
|
2522
|
-
if (n.type in
|
|
2517
|
+
if (n.type in xo && !t.features.has(n.type)) {
|
|
2523
2518
|
const o = Go(n, i, t);
|
|
2524
2519
|
t.features.set(n.type, o);
|
|
2525
2520
|
let s = t.sdk.featuresList.getValue();
|
|
@@ -2592,20 +2587,20 @@ class Ko {
|
|
|
2592
2587
|
this.analytics.write("invitation", {
|
|
2593
2588
|
common: {
|
|
2594
2589
|
...this.analytics.commonStore.getValues(),
|
|
2595
|
-
kind:
|
|
2590
|
+
kind: x.INVITATION_ACCEPTED
|
|
2596
2591
|
},
|
|
2597
|
-
category:
|
|
2598
|
-
from:
|
|
2592
|
+
category: Dr.GAMES,
|
|
2593
|
+
from: Rr.UNSET
|
|
2599
2594
|
});
|
|
2600
2595
|
};
|
|
2601
2596
|
sent = ({ from: e }) => {
|
|
2602
2597
|
this.analytics.write("invitation", {
|
|
2603
2598
|
common: {
|
|
2604
2599
|
...this.analytics.commonStore.getValues(),
|
|
2605
|
-
kind:
|
|
2600
|
+
kind: x.INVITATION_SENT
|
|
2606
2601
|
},
|
|
2607
|
-
category:
|
|
2608
|
-
from: e ||
|
|
2602
|
+
category: Dr.GAMES,
|
|
2603
|
+
from: e || Rr.UNSET
|
|
2609
2604
|
});
|
|
2610
2605
|
};
|
|
2611
2606
|
}
|
|
@@ -2631,7 +2626,7 @@ class Ho {
|
|
|
2631
2626
|
this.analytics.write("interactions", {
|
|
2632
2627
|
common: {
|
|
2633
2628
|
...this.analytics.commonStore.getValues(),
|
|
2634
|
-
kind:
|
|
2629
|
+
kind: x.INTERACTIONS
|
|
2635
2630
|
},
|
|
2636
2631
|
actionType: qr.TAP
|
|
2637
2632
|
});
|
|
@@ -2640,7 +2635,7 @@ class Ho {
|
|
|
2640
2635
|
this.analytics.write("interactions", {
|
|
2641
2636
|
common: {
|
|
2642
2637
|
...this.analytics.commonStore.getValues(),
|
|
2643
|
-
kind:
|
|
2638
|
+
kind: x.INTERACTIONS
|
|
2644
2639
|
},
|
|
2645
2640
|
actionType: qr.SCROLL
|
|
2646
2641
|
});
|
|
@@ -2659,14 +2654,14 @@ const Wo = {
|
|
|
2659
2654
|
[H.SHOP_LBAR]: J.PROMOTION_SHOP_LBAR,
|
|
2660
2655
|
[H.SHOP_OVERLAY]: J.PROMOTION_SHOP_OVERLAY,
|
|
2661
2656
|
[H.SHOP_SIDEBAR]: J.PROMOTION_SHOP_SIDEBAR
|
|
2662
|
-
},
|
|
2657
|
+
}, sr = (t) => t ? Wo[t] : J.UNSET;
|
|
2663
2658
|
class Yo {
|
|
2664
2659
|
analytics;
|
|
2665
2660
|
constructor(e) {
|
|
2666
2661
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
2667
2662
|
const r = (n) => {
|
|
2668
2663
|
if (!n.slEventBus?.skipAnalytics && n.slEventBus?.type === "advertisement") {
|
|
2669
|
-
const i =
|
|
2664
|
+
const i = sr(n.slEventBus.payload.type);
|
|
2670
2665
|
switch (n.slEventBus.action) {
|
|
2671
2666
|
case "videoPlay":
|
|
2672
2667
|
this.videoPlay(n.slEventBus.payload, { topicSubType: i });
|
|
@@ -2696,9 +2691,9 @@ class Yo {
|
|
|
2696
2691
|
this.analytics.write("games", {
|
|
2697
2692
|
common: {
|
|
2698
2693
|
...this.analytics.commonStore.getValues(),
|
|
2699
|
-
kind:
|
|
2694
|
+
kind: x.POLLS_RECEIVED,
|
|
2700
2695
|
topicId: e,
|
|
2701
|
-
topicType:
|
|
2696
|
+
topicType: q.POLLS_PROMOTION,
|
|
2702
2697
|
topicSubType: r
|
|
2703
2698
|
},
|
|
2704
2699
|
pollOpenedFrom: X.UNSET
|
|
@@ -2708,9 +2703,9 @@ class Yo {
|
|
|
2708
2703
|
this.analytics.write("games", {
|
|
2709
2704
|
common: {
|
|
2710
2705
|
...this.analytics.commonStore.getValues(),
|
|
2711
|
-
kind:
|
|
2706
|
+
kind: x.POLLS_OPENED,
|
|
2712
2707
|
topicId: e,
|
|
2713
|
-
topicType:
|
|
2708
|
+
topicType: q.POLLS_PROMOTION,
|
|
2714
2709
|
topicSubType: n
|
|
2715
2710
|
},
|
|
2716
2711
|
pollOpenedFrom: r === "notification" ? X.IN_APP : X.UNSET
|
|
@@ -2720,9 +2715,9 @@ class Yo {
|
|
|
2720
2715
|
this.analytics.write("games", {
|
|
2721
2716
|
common: {
|
|
2722
2717
|
...this.analytics.commonStore.getValues(),
|
|
2723
|
-
kind:
|
|
2718
|
+
kind: x.POLLS_OPENED,
|
|
2724
2719
|
topicId: e,
|
|
2725
|
-
topicType:
|
|
2720
|
+
topicType: q.POLLS_PROMOTION,
|
|
2726
2721
|
topicSubType: r
|
|
2727
2722
|
},
|
|
2728
2723
|
pollOpenedFrom: X.UNSET
|
|
@@ -2733,8 +2728,8 @@ class Yo {
|
|
|
2733
2728
|
common: {
|
|
2734
2729
|
...this.analytics.commonStore.getValues(),
|
|
2735
2730
|
topicId: e,
|
|
2736
|
-
kind:
|
|
2737
|
-
topicType:
|
|
2731
|
+
kind: x.AD_VIDEO_PLAYED,
|
|
2732
|
+
topicType: q.POLLS_PROMOTION,
|
|
2738
2733
|
topicSubType: r
|
|
2739
2734
|
},
|
|
2740
2735
|
pollOpenedFrom: X.UNSET
|
|
@@ -2745,8 +2740,8 @@ class Yo {
|
|
|
2745
2740
|
common: {
|
|
2746
2741
|
...this.analytics.commonStore.getValues(),
|
|
2747
2742
|
topicId: e,
|
|
2748
|
-
kind:
|
|
2749
|
-
topicType:
|
|
2743
|
+
kind: x.AD_BUTTON_NAVIGATED,
|
|
2744
|
+
topicType: q.POLLS_PROMOTION,
|
|
2750
2745
|
topicSubType: r
|
|
2751
2746
|
},
|
|
2752
2747
|
pollOpenedFrom: X.UNSET
|
|
@@ -2757,43 +2752,43 @@ class Yo {
|
|
|
2757
2752
|
common: {
|
|
2758
2753
|
...this.analytics.commonStore.getValues(),
|
|
2759
2754
|
topicId: e,
|
|
2760
|
-
kind:
|
|
2761
|
-
topicType:
|
|
2755
|
+
kind: x.AD_BANNER_NAVIGATED,
|
|
2756
|
+
topicType: q.POLLS_PROMOTION,
|
|
2762
2757
|
topicSubType: r
|
|
2763
2758
|
},
|
|
2764
2759
|
pollOpenedFrom: X.UNSET
|
|
2765
2760
|
});
|
|
2766
2761
|
};
|
|
2767
2762
|
}
|
|
2768
|
-
const
|
|
2769
|
-
[E.UNSET]:
|
|
2770
|
-
[E.FACTOID]:
|
|
2771
|
-
[E.POLL]:
|
|
2772
|
-
[E.PREDICTION]:
|
|
2773
|
-
[E.PROMOTION]:
|
|
2774
|
-
[E.TRIVIA]:
|
|
2775
|
-
[E.TWEET]:
|
|
2763
|
+
const Ze = {
|
|
2764
|
+
[E.UNSET]: q.UNSET,
|
|
2765
|
+
[E.FACTOID]: q.POLLS_INSIGHT,
|
|
2766
|
+
[E.POLL]: q.POLLS_POLL,
|
|
2767
|
+
[E.PREDICTION]: q.POLLS_PREDICTION,
|
|
2768
|
+
[E.PROMOTION]: q.POLLS_PROMOTION,
|
|
2769
|
+
[E.TRIVIA]: q.POLLS_TRIVIA,
|
|
2770
|
+
[E.TWEET]: q.POLLS_TWITTER
|
|
2776
2771
|
};
|
|
2777
2772
|
E.UNSET + "", ye.UNSET, E.FACTOID + "", ye.POLLS, E.POLL + "", ye.POLLS, E.PREDICTION + "", ye.POLLS, E.PROMOTION + "", ye.POLLS, E.TRIVIA + "", ye.POLLS, E.TWEET + "", ye.POLLS;
|
|
2778
2773
|
const Jo = {
|
|
2779
|
-
[
|
|
2780
|
-
[
|
|
2781
|
-
[
|
|
2782
|
-
[
|
|
2783
|
-
[
|
|
2784
|
-
[
|
|
2785
|
-
[
|
|
2786
|
-
[
|
|
2787
|
-
[
|
|
2788
|
-
[
|
|
2789
|
-
[
|
|
2790
|
-
[
|
|
2791
|
-
[
|
|
2774
|
+
[D.UNSET]: z.UNSET,
|
|
2775
|
+
[D.INPLAY]: z.INPLAY,
|
|
2776
|
+
[D.MESSAGING]: z.MESSAGING,
|
|
2777
|
+
[D.STATISTICS]: z.STATS,
|
|
2778
|
+
[D.BETTING]: z.BETTING,
|
|
2779
|
+
[D.TWITTER]: z.TWITTER,
|
|
2780
|
+
[D.MERCHANDISE]: z.MERCHANDISE,
|
|
2781
|
+
[D.CONTESTS]: z.CONTESTS,
|
|
2782
|
+
[D.VOICE_CHAT]: z.CALLING,
|
|
2783
|
+
[D.TICKETS]: z.TICKETS,
|
|
2784
|
+
[D.WHOIS_WATCHING]: z.WHOISWATCHING,
|
|
2785
|
+
[D.PROFILE]: z.PROFILE,
|
|
2786
|
+
[D.GAMES]: z.POLLS,
|
|
2792
2787
|
// ??
|
|
2793
|
-
[
|
|
2788
|
+
[D.GOLF_STATISTICS]: z.STATS,
|
|
2794
2789
|
// ??
|
|
2795
|
-
[
|
|
2796
|
-
[
|
|
2790
|
+
[D.HIGHLIGHTS]: z.HIGHLIGHTS,
|
|
2791
|
+
[D.PUBLIC_CHAT]: z.PUBLIC_CHAT
|
|
2797
2792
|
};
|
|
2798
2793
|
class Xo {
|
|
2799
2794
|
analytics;
|
|
@@ -2815,14 +2810,14 @@ class Xo {
|
|
|
2815
2810
|
this.received({
|
|
2816
2811
|
questionId: n.slEventBus.payload.id,
|
|
2817
2812
|
questionType: E.PROMOTION,
|
|
2818
|
-
topicSubType:
|
|
2813
|
+
topicSubType: sr(n.slEventBus.payload.type)
|
|
2819
2814
|
});
|
|
2820
2815
|
break;
|
|
2821
2816
|
case "notification-opened":
|
|
2822
2817
|
this.opened({
|
|
2823
2818
|
questionId: n.slEventBus.payload.id,
|
|
2824
2819
|
questionType: E.PROMOTION,
|
|
2825
|
-
topicSubType:
|
|
2820
|
+
topicSubType: sr(n.slEventBus.payload.type)
|
|
2826
2821
|
});
|
|
2827
2822
|
break;
|
|
2828
2823
|
}
|
|
@@ -2834,26 +2829,26 @@ class Xo {
|
|
|
2834
2829
|
this.analytics.write("notification", {
|
|
2835
2830
|
common: {
|
|
2836
2831
|
...this.analytics.commonStore.getValues(),
|
|
2837
|
-
kind:
|
|
2832
|
+
kind: x.NOTIFICATION_RECEIVED,
|
|
2838
2833
|
topicId: e,
|
|
2839
|
-
topicType: r ?
|
|
2834
|
+
topicType: r ? Ze[r] : q.UNSET,
|
|
2840
2835
|
topicSubType: n
|
|
2841
2836
|
},
|
|
2842
2837
|
notificationKind: ye.POLLS,
|
|
2843
|
-
notificationType:
|
|
2838
|
+
notificationType: xr.IN_APP
|
|
2844
2839
|
});
|
|
2845
2840
|
};
|
|
2846
2841
|
opened = ({ questionId: e, questionType: r, topicSubType: n }) => {
|
|
2847
2842
|
this.analytics.write("notification", {
|
|
2848
2843
|
common: {
|
|
2849
2844
|
...this.analytics.commonStore.getValues(),
|
|
2850
|
-
kind:
|
|
2845
|
+
kind: x.NOTIFICATION_OPENED,
|
|
2851
2846
|
topicId: e,
|
|
2852
|
-
topicType: r ?
|
|
2847
|
+
topicType: r ? Ze[r] : q.UNSET,
|
|
2853
2848
|
topicSubType: n
|
|
2854
2849
|
},
|
|
2855
2850
|
notificationKind: ye.POLLS,
|
|
2856
|
-
notificationType:
|
|
2851
|
+
notificationType: xr.IN_APP
|
|
2857
2852
|
});
|
|
2858
2853
|
};
|
|
2859
2854
|
}
|
|
@@ -2889,9 +2884,9 @@ class Zo {
|
|
|
2889
2884
|
this.analytics.write("games", {
|
|
2890
2885
|
common: {
|
|
2891
2886
|
...this.analytics.commonStore.getValues(),
|
|
2892
|
-
kind:
|
|
2887
|
+
kind: x.POLLS_RECEIVED,
|
|
2893
2888
|
topicId: e,
|
|
2894
|
-
topicType: r ?
|
|
2889
|
+
topicType: r ? Ze[r] : q.UNSET
|
|
2895
2890
|
},
|
|
2896
2891
|
pollOpenedFrom: X.UNSET
|
|
2897
2892
|
});
|
|
@@ -2901,9 +2896,9 @@ class Zo {
|
|
|
2901
2896
|
this.analytics.write("games", {
|
|
2902
2897
|
common: {
|
|
2903
2898
|
...this.analytics.commonStore.getValues(),
|
|
2904
|
-
kind:
|
|
2899
|
+
kind: x.POLLS_OPENED,
|
|
2905
2900
|
topicId: e,
|
|
2906
|
-
topicType: r ?
|
|
2901
|
+
topicType: r ? Ze[r] : q.UNSET
|
|
2907
2902
|
},
|
|
2908
2903
|
pollOpenedFrom: n === "list" ? X.PICK_HISTORY : X.IN_APP
|
|
2909
2904
|
});
|
|
@@ -2913,9 +2908,9 @@ class Zo {
|
|
|
2913
2908
|
this.analytics.write("games", {
|
|
2914
2909
|
common: {
|
|
2915
2910
|
...this.analytics.commonStore.getValues(),
|
|
2916
|
-
kind:
|
|
2911
|
+
kind: x.POLLS_VOTE,
|
|
2917
2912
|
topicId: e,
|
|
2918
|
-
topicType: r ?
|
|
2913
|
+
topicType: r ? Ze[r] : q.UNSET
|
|
2919
2914
|
},
|
|
2920
2915
|
pollOpenedFrom: X.UNSET
|
|
2921
2916
|
});
|
|
@@ -2925,7 +2920,7 @@ class Zo {
|
|
|
2925
2920
|
this.analytics.write("games", {
|
|
2926
2921
|
common: {
|
|
2927
2922
|
...this.analytics.commonStore.getValues(),
|
|
2928
|
-
kind:
|
|
2923
|
+
kind: x.GAMES_JOINED
|
|
2929
2924
|
},
|
|
2930
2925
|
pollOpenedFrom: X.UNSET
|
|
2931
2926
|
});
|
|
@@ -2935,7 +2930,7 @@ class Zo {
|
|
|
2935
2930
|
this.analytics.write("games", {
|
|
2936
2931
|
common: {
|
|
2937
2932
|
...this.analytics.commonStore.getValues(),
|
|
2938
|
-
kind:
|
|
2933
|
+
kind: x.POLLS_NAVIGATED
|
|
2939
2934
|
},
|
|
2940
2935
|
pollOpenedFrom: X.UNSET
|
|
2941
2936
|
});
|
|
@@ -2943,7 +2938,7 @@ class Zo {
|
|
|
2943
2938
|
}
|
|
2944
2939
|
const es = ({ transport: t, $commonStore: e }) => {
|
|
2945
2940
|
let r;
|
|
2946
|
-
const n = B(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(
|
|
2941
|
+
const n = B(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(kn, {
|
|
2947
2942
|
method: "send",
|
|
2948
2943
|
params: [n]
|
|
2949
2944
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -2956,7 +2951,7 @@ const es = ({ transport: t, $commonStore: e }) => {
|
|
|
2956
2951
|
value: {
|
|
2957
2952
|
common: {
|
|
2958
2953
|
...p,
|
|
2959
|
-
kind:
|
|
2954
|
+
kind: x.SESSION_HEARTBEAT
|
|
2960
2955
|
}
|
|
2961
2956
|
}
|
|
2962
2957
|
}
|
|
@@ -2993,7 +2988,7 @@ class ts {
|
|
|
2993
2988
|
connected = !1;
|
|
2994
2989
|
constructor(e) {
|
|
2995
2990
|
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(ee({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = es({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Xo(this), this.polls = new Zo(this), this.invitation = new Ko(this), this.interactions = new Ho(this), this.advertisement = new Yo(this);
|
|
2996
|
-
const { client: r } = e.analyticsTransport.createPromiseClient(
|
|
2991
|
+
const { client: r } = e.analyticsTransport.createPromiseClient(kn, {
|
|
2997
2992
|
method: "send"
|
|
2998
2993
|
});
|
|
2999
2994
|
this.analyticsClient = r;
|
|
@@ -3022,10 +3017,10 @@ class ts {
|
|
|
3022
3017
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
3023
3018
|
this.writeCommon("eventId", r);
|
|
3024
3019
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
3025
|
-
r && this.writeCommon("category", Jo[r]), r !==
|
|
3020
|
+
r && this.writeCommon("category", Jo[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", St()) : this.writeCommon("overlaySessionId", "");
|
|
3026
3021
|
})), this.onConnect(() => {
|
|
3027
3022
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
3028
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
3023
|
+
this.writeCommon("screenOrientation", i.matches ? jr.PORTRAIT : jr.LANDSCAPE);
|
|
3029
3024
|
};
|
|
3030
3025
|
return r.addEventListener("change", n), () => {
|
|
3031
3026
|
r.removeEventListener("change", n);
|
|
@@ -3042,11 +3037,11 @@ const rs = (t, e, r) => {
|
|
|
3042
3037
|
t.analytics.disconnect();
|
|
3043
3038
|
})), r();
|
|
3044
3039
|
};
|
|
3045
|
-
var
|
|
3040
|
+
var vr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3046
3041
|
function ns(t) {
|
|
3047
3042
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3048
3043
|
}
|
|
3049
|
-
var
|
|
3044
|
+
var Sr = { exports: {} }, wr = { exports: {} };
|
|
3050
3045
|
function is(t) {
|
|
3051
3046
|
var e = new t(), r = e;
|
|
3052
3047
|
function n() {
|
|
@@ -3201,9 +3196,9 @@ function us(t, e, r) {
|
|
|
3201
3196
|
return l;
|
|
3202
3197
|
}
|
|
3203
3198
|
}
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
var Un =
|
|
3199
|
+
wr.exports = Bn;
|
|
3200
|
+
wr.exports.promise = us;
|
|
3201
|
+
var Un = wr.exports, Ar = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, tn = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
|
|
3207
3202
|
return Function.prototype.apply.call(e, r, n);
|
|
3208
3203
|
}, ht;
|
|
3209
3204
|
Qe && typeof Qe.ownKeys == "function" ? ht = Qe.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
|
|
@@ -3220,13 +3215,13 @@ var jn = Number.isNaN || function(e) {
|
|
|
3220
3215
|
function N() {
|
|
3221
3216
|
N.init.call(this);
|
|
3222
3217
|
}
|
|
3223
|
-
|
|
3224
|
-
|
|
3218
|
+
Ar.exports = N;
|
|
3219
|
+
Ar.exports.once = ps;
|
|
3225
3220
|
N.EventEmitter = N;
|
|
3226
3221
|
N.prototype._events = void 0;
|
|
3227
3222
|
N.prototype._eventsCount = 0;
|
|
3228
3223
|
N.prototype._maxListeners = void 0;
|
|
3229
|
-
var
|
|
3224
|
+
var rn = 10;
|
|
3230
3225
|
function Nt(t) {
|
|
3231
3226
|
if (typeof t != "function")
|
|
3232
3227
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
@@ -3234,12 +3229,12 @@ function Nt(t) {
|
|
|
3234
3229
|
Object.defineProperty(N, "defaultMaxListeners", {
|
|
3235
3230
|
enumerable: !0,
|
|
3236
3231
|
get: function() {
|
|
3237
|
-
return
|
|
3232
|
+
return rn;
|
|
3238
3233
|
},
|
|
3239
3234
|
set: function(t) {
|
|
3240
3235
|
if (typeof t != "number" || t < 0 || jn(t))
|
|
3241
3236
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3242
|
-
|
|
3237
|
+
rn = t;
|
|
3243
3238
|
}
|
|
3244
3239
|
});
|
|
3245
3240
|
N.init = function() {
|
|
@@ -3250,11 +3245,11 @@ N.prototype.setMaxListeners = function(e) {
|
|
|
3250
3245
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3251
3246
|
return this._maxListeners = e, this;
|
|
3252
3247
|
};
|
|
3253
|
-
function
|
|
3248
|
+
function qn(t) {
|
|
3254
3249
|
return t._maxListeners === void 0 ? N.defaultMaxListeners : t._maxListeners;
|
|
3255
3250
|
}
|
|
3256
3251
|
N.prototype.getMaxListeners = function() {
|
|
3257
|
-
return
|
|
3252
|
+
return qn(this);
|
|
3258
3253
|
};
|
|
3259
3254
|
N.prototype.emit = function(e) {
|
|
3260
3255
|
for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
|
|
@@ -3274,13 +3269,13 @@ N.prototype.emit = function(e) {
|
|
|
3274
3269
|
if (u === void 0)
|
|
3275
3270
|
return !1;
|
|
3276
3271
|
if (typeof u == "function")
|
|
3277
|
-
|
|
3272
|
+
tn(u, this, r);
|
|
3278
3273
|
else
|
|
3279
3274
|
for (var d = u.length, c = Kn(u, d), n = 0; n < d; ++n)
|
|
3280
|
-
|
|
3275
|
+
tn(c[n], this, r);
|
|
3281
3276
|
return !0;
|
|
3282
3277
|
};
|
|
3283
|
-
function
|
|
3278
|
+
function xn(t, e, r, n) {
|
|
3284
3279
|
var i, o, s;
|
|
3285
3280
|
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(
|
|
3286
3281
|
"newListener",
|
|
@@ -3288,7 +3283,7 @@ function qn(t, e, r, n) {
|
|
|
3288
3283
|
r.listener ? r.listener : r
|
|
3289
3284
|
), o = t._events), s = o[e]), s === void 0)
|
|
3290
3285
|
s = o[e] = r, ++t._eventsCount;
|
|
3291
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
3286
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = qn(t), i > 0 && s.length > i && !s.warned) {
|
|
3292
3287
|
s.warned = !0;
|
|
3293
3288
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3294
3289
|
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, cs(a);
|
|
@@ -3296,11 +3291,11 @@ function qn(t, e, r, n) {
|
|
|
3296
3291
|
return t;
|
|
3297
3292
|
}
|
|
3298
3293
|
N.prototype.addListener = function(e, r) {
|
|
3299
|
-
return
|
|
3294
|
+
return xn(this, e, r, !1);
|
|
3300
3295
|
};
|
|
3301
3296
|
N.prototype.on = N.prototype.addListener;
|
|
3302
3297
|
N.prototype.prependListener = function(e, r) {
|
|
3303
|
-
return
|
|
3298
|
+
return xn(this, e, r, !0);
|
|
3304
3299
|
};
|
|
3305
3300
|
function ls() {
|
|
3306
3301
|
if (!this.fired)
|
|
@@ -3426,7 +3421,7 @@ function Hn(t, e, r, n) {
|
|
|
3426
3421
|
else
|
|
3427
3422
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3428
3423
|
}
|
|
3429
|
-
var Wn =
|
|
3424
|
+
var Wn = Ar.exports, Ft = {}, Yn = {}, Jn = function() {
|
|
3430
3425
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3431
3426
|
return !1;
|
|
3432
3427
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3449,16 +3444,16 @@ var Wn = Er.exports, Dt = {}, Yn = {}, Jn = function() {
|
|
|
3449
3444
|
return !1;
|
|
3450
3445
|
}
|
|
3451
3446
|
return !0;
|
|
3452
|
-
}, ys = Jn,
|
|
3447
|
+
}, ys = Jn, Dt = function() {
|
|
3453
3448
|
return ys() && !!Symbol.toStringTag;
|
|
3454
|
-
}, gs = Error, ms = EvalError, bs = RangeError, vs = ReferenceError, Xn = SyntaxError, Rt = TypeError, Ss = URIError,
|
|
3455
|
-
return typeof
|
|
3449
|
+
}, gs = Error, ms = EvalError, bs = RangeError, vs = ReferenceError, Xn = SyntaxError, Rt = TypeError, Ss = URIError, nn = typeof Symbol < "u" && Symbol, ws = Jn, As = function() {
|
|
3450
|
+
return typeof nn != "function" || typeof Symbol != "function" || typeof nn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ws();
|
|
3456
3451
|
}, Ut = {
|
|
3457
3452
|
__proto__: null,
|
|
3458
3453
|
foo: {}
|
|
3459
3454
|
}, Es = Object, Is = function() {
|
|
3460
3455
|
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof Es);
|
|
3461
|
-
}, Os = "Function.prototype.bind called on incompatible ", Ts = Object.prototype.toString, ks = Math.max, _s = "[object Function]",
|
|
3456
|
+
}, Os = "Function.prototype.bind called on incompatible ", Ts = Object.prototype.toString, ks = Math.max, _s = "[object Function]", on = function(e, r) {
|
|
3462
3457
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3463
3458
|
n[i] = e[i];
|
|
3464
3459
|
for (var o = 0; o < r.length; o += 1)
|
|
@@ -3480,13 +3475,13 @@ var Wn = Er.exports, Dt = {}, Yn = {}, Jn = function() {
|
|
|
3480
3475
|
if (this instanceof i) {
|
|
3481
3476
|
var c = r.apply(
|
|
3482
3477
|
this,
|
|
3483
|
-
|
|
3478
|
+
on(n, arguments)
|
|
3484
3479
|
);
|
|
3485
3480
|
return Object(c) === c ? c : this;
|
|
3486
3481
|
}
|
|
3487
3482
|
return r.apply(
|
|
3488
3483
|
e,
|
|
3489
|
-
|
|
3484
|
+
on(n, arguments)
|
|
3490
3485
|
);
|
|
3491
3486
|
}, s = ks(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3492
3487
|
a[u] = "$" + u;
|
|
@@ -3496,7 +3491,7 @@ var Wn = Er.exports, Dt = {}, Yn = {}, Jn = function() {
|
|
|
3496
3491
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3497
3492
|
}
|
|
3498
3493
|
return i;
|
|
3499
|
-
}, Ns = Ps,
|
|
3494
|
+
}, Ns = Ps, Er = Function.prototype.bind || Ns, Fs = Function.prototype.call, Ds = Object.prototype.hasOwnProperty, Rs = Er, Vs = Rs.call(Fs, Ds), O, $s = gs, Ms = ms, Bs = bs, Us = vs, Ke = Xn, Ge = Rt, js = Ss, Zn = Function, jt = function(t) {
|
|
3500
3495
|
try {
|
|
3501
3496
|
return Zn('"use strict"; return (' + t + ").constructor;")();
|
|
3502
3497
|
} catch {
|
|
@@ -3508,19 +3503,19 @@ if (Pe)
|
|
|
3508
3503
|
} catch {
|
|
3509
3504
|
Pe = null;
|
|
3510
3505
|
}
|
|
3511
|
-
var
|
|
3506
|
+
var qt = function() {
|
|
3512
3507
|
throw new Ge();
|
|
3513
|
-
},
|
|
3508
|
+
}, qs = Pe ? function() {
|
|
3514
3509
|
try {
|
|
3515
|
-
return arguments.callee,
|
|
3510
|
+
return arguments.callee, qt;
|
|
3516
3511
|
} catch {
|
|
3517
3512
|
try {
|
|
3518
3513
|
return Pe(arguments, "callee").get;
|
|
3519
3514
|
} catch {
|
|
3520
|
-
return
|
|
3515
|
+
return qt;
|
|
3521
3516
|
}
|
|
3522
3517
|
}
|
|
3523
|
-
}() :
|
|
3518
|
+
}() : qt, Me = As(), xs = Is(), U = Object.getPrototypeOf || (xs ? function(t) {
|
|
3524
3519
|
return t.__proto__;
|
|
3525
3520
|
} : null), Ue = {}, Qs = typeof Uint8Array > "u" || !U ? O : U(Uint8Array), Ne = {
|
|
3526
3521
|
__proto__: null,
|
|
@@ -3580,7 +3575,7 @@ var xt = function() {
|
|
|
3580
3575
|
"%StringIteratorPrototype%": Me && U ? U(""[Symbol.iterator]()) : O,
|
|
3581
3576
|
"%Symbol%": Me ? Symbol : O,
|
|
3582
3577
|
"%SyntaxError%": Ke,
|
|
3583
|
-
"%ThrowTypeError%":
|
|
3578
|
+
"%ThrowTypeError%": qs,
|
|
3584
3579
|
"%TypedArray%": Qs,
|
|
3585
3580
|
"%TypeError%": Ge,
|
|
3586
3581
|
"%Uint8Array%": typeof Uint8Array > "u" ? O : Uint8Array,
|
|
@@ -3615,7 +3610,7 @@ var zs = function t(e) {
|
|
|
3615
3610
|
i && U && (r = U(i.prototype));
|
|
3616
3611
|
}
|
|
3617
3612
|
return Ne[e] = r, r;
|
|
3618
|
-
},
|
|
3613
|
+
}, sn = {
|
|
3619
3614
|
__proto__: null,
|
|
3620
3615
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3621
3616
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -3668,19 +3663,19 @@ var zs = function t(e) {
|
|
|
3668
3663
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3669
3664
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3670
3665
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3671
|
-
},
|
|
3666
|
+
}, it = Er, At = Vs, Ks = it.call(Function.call, Array.prototype.concat), Hs = it.call(Function.apply, Array.prototype.splice), an = it.call(Function.call, String.prototype.replace), Et = it.call(Function.call, String.prototype.slice), Ws = it.call(Function.call, RegExp.prototype.exec), Ys = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Js = /\\(\\)?/g, Xs = function(e) {
|
|
3672
3667
|
var r = Et(e, 0, 1), n = Et(e, -1);
|
|
3673
3668
|
if (r === "%" && n !== "%")
|
|
3674
3669
|
throw new Ke("invalid intrinsic syntax, expected closing `%`");
|
|
3675
3670
|
if (n === "%" && r !== "%")
|
|
3676
3671
|
throw new Ke("invalid intrinsic syntax, expected opening `%`");
|
|
3677
3672
|
var i = [];
|
|
3678
|
-
return
|
|
3679
|
-
i[i.length] = a ?
|
|
3673
|
+
return an(e, Ys, function(o, s, a, u) {
|
|
3674
|
+
i[i.length] = a ? an(u, Js, "$1") : s || o;
|
|
3680
3675
|
}), i;
|
|
3681
3676
|
}, Zs = function(e, r) {
|
|
3682
3677
|
var n = e, i;
|
|
3683
|
-
if (At(
|
|
3678
|
+
if (At(sn, n) && (i = sn[n], n = "%" + i[0] + "%"), At(Ne, n)) {
|
|
3684
3679
|
var o = Ne[n];
|
|
3685
3680
|
if (o === Ue && (o = zs(n)), typeof o > "u" && !r)
|
|
3686
3681
|
throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
@@ -3691,7 +3686,7 @@ var zs = function t(e) {
|
|
|
3691
3686
|
};
|
|
3692
3687
|
}
|
|
3693
3688
|
throw new Ke("intrinsic " + e + " does not exist!");
|
|
3694
|
-
},
|
|
3689
|
+
}, ot = function(e, r) {
|
|
3695
3690
|
if (typeof e != "string" || e.length === 0)
|
|
3696
3691
|
throw new Ge("intrinsic name must be a non-empty string");
|
|
3697
3692
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
@@ -3721,27 +3716,27 @@ var zs = function t(e) {
|
|
|
3721
3716
|
}
|
|
3722
3717
|
}
|
|
3723
3718
|
return a;
|
|
3724
|
-
}, ei = { exports: {} },
|
|
3725
|
-
function
|
|
3726
|
-
if (
|
|
3727
|
-
|
|
3728
|
-
var t =
|
|
3719
|
+
}, ei = { exports: {} }, xt, un;
|
|
3720
|
+
function Ir() {
|
|
3721
|
+
if (un) return xt;
|
|
3722
|
+
un = 1;
|
|
3723
|
+
var t = ot, e = t("%Object.defineProperty%", !0) || !1;
|
|
3729
3724
|
if (e)
|
|
3730
3725
|
try {
|
|
3731
3726
|
e({}, "a", { value: 1 });
|
|
3732
3727
|
} catch {
|
|
3733
3728
|
e = !1;
|
|
3734
3729
|
}
|
|
3735
|
-
return
|
|
3730
|
+
return xt = e, xt;
|
|
3736
3731
|
}
|
|
3737
|
-
var ea =
|
|
3732
|
+
var ea = ot, yt = ea("%Object.getOwnPropertyDescriptor%", !0);
|
|
3738
3733
|
if (yt)
|
|
3739
3734
|
try {
|
|
3740
3735
|
yt([], "length");
|
|
3741
3736
|
} catch {
|
|
3742
3737
|
yt = null;
|
|
3743
3738
|
}
|
|
3744
|
-
var Vt = yt,
|
|
3739
|
+
var Vt = yt, cn = Ir(), ta = Xn, Be = Rt, ln = Vt, ra = function(e, r, n) {
|
|
3745
3740
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3746
3741
|
throw new Be("`obj` must be an object or a function`");
|
|
3747
3742
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3754,9 +3749,9 @@ var Vt = yt, ln = Or(), ta = Xn, Be = Rt, dn = Vt, ra = function(e, r, n) {
|
|
|
3754
3749
|
throw new Be("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3755
3750
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3756
3751
|
throw new Be("`loose`, if provided, must be a boolean");
|
|
3757
|
-
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 = !!
|
|
3758
|
-
if (
|
|
3759
|
-
|
|
3752
|
+
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!ln && ln(e, r);
|
|
3753
|
+
if (cn)
|
|
3754
|
+
cn(e, r, {
|
|
3760
3755
|
configurable: s === null && u ? u.configurable : !s,
|
|
3761
3756
|
enumerable: i === null && u ? u.enumerable : !i,
|
|
3762
3757
|
value: n,
|
|
@@ -3766,36 +3761,36 @@ var Vt = yt, ln = Or(), ta = Xn, Be = Rt, dn = Vt, ra = function(e, r, n) {
|
|
|
3766
3761
|
e[r] = n;
|
|
3767
3762
|
else
|
|
3768
3763
|
throw new ta("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3769
|
-
},
|
|
3770
|
-
return !!
|
|
3764
|
+
}, ar = Ir(), ti = function() {
|
|
3765
|
+
return !!ar;
|
|
3771
3766
|
};
|
|
3772
3767
|
ti.hasArrayLengthDefineBug = function() {
|
|
3773
|
-
if (!
|
|
3768
|
+
if (!ar)
|
|
3774
3769
|
return null;
|
|
3775
3770
|
try {
|
|
3776
|
-
return
|
|
3771
|
+
return ar([], "length", { value: 1 }).length !== 1;
|
|
3777
3772
|
} catch {
|
|
3778
3773
|
return !0;
|
|
3779
3774
|
}
|
|
3780
3775
|
};
|
|
3781
|
-
var na = ti, ia =
|
|
3776
|
+
var na = ti, ia = ot, dn = ra, oa = na(), fn = Vt, pn = Rt, sa = ia("%Math.floor%"), aa = function(e, r) {
|
|
3782
3777
|
if (typeof e != "function")
|
|
3783
|
-
throw new
|
|
3778
|
+
throw new pn("`fn` is not a function");
|
|
3784
3779
|
if (typeof r != "number" || r < 0 || r > 4294967295 || sa(r) !== r)
|
|
3785
|
-
throw new
|
|
3780
|
+
throw new pn("`length` must be a positive 32-bit integer");
|
|
3786
3781
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3787
|
-
if ("length" in e &&
|
|
3788
|
-
var s =
|
|
3782
|
+
if ("length" in e && fn) {
|
|
3783
|
+
var s = fn(e, "length");
|
|
3789
3784
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3790
3785
|
}
|
|
3791
|
-
return (i || o || !n) && (oa ?
|
|
3786
|
+
return (i || o || !n) && (oa ? dn(
|
|
3792
3787
|
/** @type {Parameters<define>[0]} */
|
|
3793
3788
|
e,
|
|
3794
3789
|
"length",
|
|
3795
3790
|
r,
|
|
3796
3791
|
!0,
|
|
3797
3792
|
!0
|
|
3798
|
-
) :
|
|
3793
|
+
) : dn(
|
|
3799
3794
|
/** @type {Parameters<define>[0]} */
|
|
3800
3795
|
e,
|
|
3801
3796
|
"length",
|
|
@@ -3803,7 +3798,7 @@ var na = ti, ia = st, fn = ra, oa = na(), pn = Vt, hn = Rt, sa = ia("%Math.floor
|
|
|
3803
3798
|
)), e;
|
|
3804
3799
|
};
|
|
3805
3800
|
(function(t) {
|
|
3806
|
-
var e =
|
|
3801
|
+
var e = Er, r = ot, n = aa, i = Rt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Ir(), d = r("%Math.max%");
|
|
3807
3802
|
t.exports = function(p) {
|
|
3808
3803
|
if (typeof p != "function")
|
|
3809
3804
|
throw new i("a function is required");
|
|
@@ -3819,18 +3814,18 @@ var na = ti, ia = st, fn = ra, oa = na(), pn = Vt, hn = Rt, sa = ia("%Math.floor
|
|
|
3819
3814
|
};
|
|
3820
3815
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3821
3816
|
})(ei);
|
|
3822
|
-
var
|
|
3817
|
+
var Or = ei.exports, ri = ot, ni = Or, ua = ni(ri("String.prototype.indexOf")), Tr = function(e, r) {
|
|
3823
3818
|
var n = ri(e, !!r);
|
|
3824
3819
|
return typeof n == "function" && ua(e, ".prototype.") > -1 ? ni(n) : n;
|
|
3825
|
-
}, ca =
|
|
3826
|
-
return ca && e && typeof e == "object" && Symbol.toStringTag in e ? !1 :
|
|
3820
|
+
}, ca = Dt(), la = Tr, ur = la("Object.prototype.toString"), $t = function(e) {
|
|
3821
|
+
return ca && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ur(e) === "[object Arguments]";
|
|
3827
3822
|
}, ii = function(e) {
|
|
3828
|
-
return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 &&
|
|
3823
|
+
return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ur(e) !== "[object Array]" && ur(e.callee) === "[object Function]";
|
|
3829
3824
|
}, da = function() {
|
|
3830
3825
|
return $t(arguments);
|
|
3831
3826
|
}();
|
|
3832
3827
|
$t.isLegacyArguments = ii;
|
|
3833
|
-
var fa = da ? $t : ii, pa = Object.prototype.toString, ha = Function.prototype.toString, ya = /^\s*(?:function)?\*/, oi =
|
|
3828
|
+
var fa = da ? $t : ii, pa = Object.prototype.toString, ha = Function.prototype.toString, ya = /^\s*(?:function)?\*/, oi = Dt(), Qt = Object.getPrototypeOf, ga = function() {
|
|
3834
3829
|
if (!oi)
|
|
3835
3830
|
return !1;
|
|
3836
3831
|
try {
|
|
@@ -3853,22 +3848,22 @@ var fa = da ? $t : ii, pa = Object.prototype.toString, ha = Function.prototype.t
|
|
|
3853
3848
|
Gt = n ? Qt(n) : !1;
|
|
3854
3849
|
}
|
|
3855
3850
|
return Qt(e) === Gt;
|
|
3856
|
-
}, si = Function.prototype.toString,
|
|
3857
|
-
if (typeof
|
|
3851
|
+
}, si = Function.prototype.toString, qe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, gt;
|
|
3852
|
+
if (typeof qe == "function" && typeof Object.defineProperty == "function")
|
|
3858
3853
|
try {
|
|
3859
|
-
|
|
3854
|
+
cr = Object.defineProperty({}, "length", {
|
|
3860
3855
|
get: function() {
|
|
3861
3856
|
throw gt;
|
|
3862
3857
|
}
|
|
3863
|
-
}), gt = {},
|
|
3858
|
+
}), gt = {}, qe(function() {
|
|
3864
3859
|
throw 42;
|
|
3865
|
-
}, null,
|
|
3860
|
+
}, null, cr);
|
|
3866
3861
|
} catch (t) {
|
|
3867
|
-
t !== gt && (
|
|
3862
|
+
t !== gt && (qe = null);
|
|
3868
3863
|
}
|
|
3869
3864
|
else
|
|
3870
|
-
|
|
3871
|
-
var ba = /^\s*class\b/,
|
|
3865
|
+
qe = null;
|
|
3866
|
+
var ba = /^\s*class\b/, lr = function(e) {
|
|
3872
3867
|
try {
|
|
3873
3868
|
var r = si.call(e);
|
|
3874
3869
|
return ba.test(r);
|
|
@@ -3877,16 +3872,16 @@ var ba = /^\s*class\b/, dr = function(e) {
|
|
|
3877
3872
|
}
|
|
3878
3873
|
}, zt = function(e) {
|
|
3879
3874
|
try {
|
|
3880
|
-
return
|
|
3875
|
+
return lr(e) ? !1 : (si.call(e), !0);
|
|
3881
3876
|
} catch {
|
|
3882
3877
|
return !1;
|
|
3883
3878
|
}
|
|
3884
|
-
}, mt = Object.prototype.toString, va = "[object Object]", Sa = "[object Function]", wa = "[object GeneratorFunction]", Aa = "[object HTMLAllCollection]", Ea = "[object HTML document.all class]", Ia = "[object HTMLCollection]", Oa = typeof Symbol == "function" && !!Symbol.toStringTag, Ta = !(0 in [,]),
|
|
3879
|
+
}, mt = Object.prototype.toString, va = "[object Object]", Sa = "[object Function]", wa = "[object GeneratorFunction]", Aa = "[object HTMLAllCollection]", Ea = "[object HTML document.all class]", Ia = "[object HTMLCollection]", Oa = typeof Symbol == "function" && !!Symbol.toStringTag, Ta = !(0 in [,]), dr = function() {
|
|
3885
3880
|
return !1;
|
|
3886
3881
|
};
|
|
3887
3882
|
if (typeof document == "object") {
|
|
3888
3883
|
var ka = document.all;
|
|
3889
|
-
mt.call(ka) === mt.call(document.all) && (
|
|
3884
|
+
mt.call(ka) === mt.call(document.all) && (dr = function(e) {
|
|
3890
3885
|
if ((Ta || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3891
3886
|
try {
|
|
3892
3887
|
var r = mt.call(e);
|
|
@@ -3896,26 +3891,26 @@ if (typeof document == "object") {
|
|
|
3896
3891
|
return !1;
|
|
3897
3892
|
});
|
|
3898
3893
|
}
|
|
3899
|
-
var _a =
|
|
3900
|
-
if (
|
|
3894
|
+
var _a = qe ? function(e) {
|
|
3895
|
+
if (dr(e))
|
|
3901
3896
|
return !0;
|
|
3902
3897
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3903
3898
|
return !1;
|
|
3904
3899
|
try {
|
|
3905
|
-
|
|
3900
|
+
qe(e, null, cr);
|
|
3906
3901
|
} catch (r) {
|
|
3907
3902
|
if (r !== gt)
|
|
3908
3903
|
return !1;
|
|
3909
3904
|
}
|
|
3910
|
-
return !
|
|
3905
|
+
return !lr(e) && zt(e);
|
|
3911
3906
|
} : function(e) {
|
|
3912
|
-
if (
|
|
3907
|
+
if (dr(e))
|
|
3913
3908
|
return !0;
|
|
3914
3909
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3915
3910
|
return !1;
|
|
3916
3911
|
if (Oa)
|
|
3917
3912
|
return zt(e);
|
|
3918
|
-
if (
|
|
3913
|
+
if (lr(e))
|
|
3919
3914
|
return !1;
|
|
3920
3915
|
var r = mt.call(e);
|
|
3921
3916
|
return r !== Sa && r !== wa && !/^\[object HTML/.test(r) ? !1 : zt(e);
|
|
@@ -3925,15 +3920,15 @@ var _a = xe ? function(e) {
|
|
|
3925
3920
|
}, Na = function(e, r, n) {
|
|
3926
3921
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3927
3922
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3928
|
-
},
|
|
3923
|
+
}, Fa = function(e, r, n) {
|
|
3929
3924
|
for (var i in e)
|
|
3930
3925
|
ai.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3931
|
-
},
|
|
3926
|
+
}, Da = function(e, r, n) {
|
|
3932
3927
|
if (!Ca(r))
|
|
3933
3928
|
throw new TypeError("iterator must be a function");
|
|
3934
3929
|
var i;
|
|
3935
|
-
arguments.length >= 3 && (i = n), La.call(e) === "[object Array]" ? Pa(e, r, i) : typeof e == "string" ? Na(e, r, i) :
|
|
3936
|
-
}, ui =
|
|
3930
|
+
arguments.length >= 3 && (i = n), La.call(e) === "[object Array]" ? Pa(e, r, i) : typeof e == "string" ? Na(e, r, i) : Fa(e, r, i);
|
|
3931
|
+
}, ui = Da, Ra = [
|
|
3937
3932
|
"Float32Array",
|
|
3938
3933
|
"Float64Array",
|
|
3939
3934
|
"Int8Array",
|
|
@@ -3945,36 +3940,36 @@ var _a = xe ? function(e) {
|
|
|
3945
3940
|
"Uint32Array",
|
|
3946
3941
|
"BigInt64Array",
|
|
3947
3942
|
"BigUint64Array"
|
|
3948
|
-
], Kt = Ra, Va = typeof globalThis > "u" ?
|
|
3943
|
+
], Kt = Ra, Va = typeof globalThis > "u" ? vr : globalThis, ci = function() {
|
|
3949
3944
|
for (var e = [], r = 0; r < Kt.length; r++)
|
|
3950
3945
|
typeof Va[Kt[r]] == "function" && (e[e.length] = Kt[r]);
|
|
3951
3946
|
return e;
|
|
3952
|
-
}, It = ui, $a = ci,
|
|
3947
|
+
}, It = ui, $a = ci, hn = Or, kr = Tr, bt = Vt, Ma = kr("Object.prototype.toString"), li = Dt(), yn = typeof globalThis > "u" ? vr : globalThis, fr = $a(), _r = kr("String.prototype.slice"), Ht = Object.getPrototypeOf, Ba = kr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3953
3948
|
for (var n = 0; n < e.length; n += 1)
|
|
3954
3949
|
if (e[n] === r)
|
|
3955
3950
|
return n;
|
|
3956
3951
|
return -1;
|
|
3957
3952
|
}, Ot = { __proto__: null };
|
|
3958
|
-
li && bt && Ht ? It(
|
|
3959
|
-
var e = new
|
|
3953
|
+
li && bt && Ht ? It(fr, function(t) {
|
|
3954
|
+
var e = new yn[t]();
|
|
3960
3955
|
if (Symbol.toStringTag in e) {
|
|
3961
3956
|
var r = Ht(e), n = bt(r, Symbol.toStringTag);
|
|
3962
3957
|
if (!n) {
|
|
3963
3958
|
var i = Ht(r);
|
|
3964
3959
|
n = bt(i, Symbol.toStringTag);
|
|
3965
3960
|
}
|
|
3966
|
-
Ot["$" + t] =
|
|
3961
|
+
Ot["$" + t] = hn(n.get);
|
|
3967
3962
|
}
|
|
3968
|
-
}) : It(
|
|
3969
|
-
var e = new
|
|
3970
|
-
r && (Ot["$" + t] =
|
|
3963
|
+
}) : It(fr, function(t) {
|
|
3964
|
+
var e = new yn[t](), r = e.slice || e.set;
|
|
3965
|
+
r && (Ot["$" + t] = hn(r));
|
|
3971
3966
|
});
|
|
3972
3967
|
var Ua = function(e) {
|
|
3973
3968
|
var r = !1;
|
|
3974
3969
|
return It(Ot, function(n, i) {
|
|
3975
3970
|
if (!r)
|
|
3976
3971
|
try {
|
|
3977
|
-
"$" + n(e) === i && (r =
|
|
3972
|
+
"$" + n(e) === i && (r = _r(i, 1));
|
|
3978
3973
|
} catch {
|
|
3979
3974
|
}
|
|
3980
3975
|
}), r;
|
|
@@ -3983,37 +3978,37 @@ var Ua = function(e) {
|
|
|
3983
3978
|
return It(Ot, function(n, i) {
|
|
3984
3979
|
if (!r)
|
|
3985
3980
|
try {
|
|
3986
|
-
n(e), r =
|
|
3981
|
+
n(e), r = _r(i, 1);
|
|
3987
3982
|
} catch {
|
|
3988
3983
|
}
|
|
3989
3984
|
}), r;
|
|
3990
|
-
},
|
|
3985
|
+
}, qa = function(e) {
|
|
3991
3986
|
if (!e || typeof e != "object")
|
|
3992
3987
|
return !1;
|
|
3993
3988
|
if (!li) {
|
|
3994
|
-
var r =
|
|
3995
|
-
return Ba(
|
|
3989
|
+
var r = _r(Ma(e), 8, -1);
|
|
3990
|
+
return Ba(fr, r) > -1 ? r : r !== "Object" ? !1 : ja(e);
|
|
3996
3991
|
}
|
|
3997
3992
|
return bt ? Ua(e) : null;
|
|
3998
|
-
}, Tt = ui,
|
|
3993
|
+
}, Tt = ui, xa = ci, gn = Or, Cr = Tr, vt = Vt, Qa = Cr("Object.prototype.toString"), di = Dt(), mn = typeof globalThis > "u" ? vr : globalThis, pr = xa(), Lr = Cr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ga = Cr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3999
3994
|
for (var n = 0; n < e.length; n += 1)
|
|
4000
3995
|
if (e[n] === r)
|
|
4001
3996
|
return n;
|
|
4002
3997
|
return -1;
|
|
4003
3998
|
}, kt = { __proto__: null };
|
|
4004
|
-
di && vt && Wt ? Tt(
|
|
4005
|
-
var e = new
|
|
3999
|
+
di && vt && Wt ? Tt(pr, function(t) {
|
|
4000
|
+
var e = new mn[t]();
|
|
4006
4001
|
if (Symbol.toStringTag in e) {
|
|
4007
4002
|
var r = Wt(e), n = vt(r, Symbol.toStringTag);
|
|
4008
4003
|
if (!n) {
|
|
4009
4004
|
var i = Wt(r);
|
|
4010
4005
|
n = vt(i, Symbol.toStringTag);
|
|
4011
4006
|
}
|
|
4012
|
-
kt["$" + t] =
|
|
4007
|
+
kt["$" + t] = gn(n.get);
|
|
4013
4008
|
}
|
|
4014
|
-
}) : Tt(
|
|
4015
|
-
var e = new
|
|
4016
|
-
r && (kt["$" + t] =
|
|
4009
|
+
}) : Tt(pr, function(t) {
|
|
4010
|
+
var e = new mn[t](), r = e.slice || e.set;
|
|
4011
|
+
r && (kt["$" + t] = gn(r));
|
|
4017
4012
|
});
|
|
4018
4013
|
var za = function(e) {
|
|
4019
4014
|
var r = !1;
|
|
@@ -4026,7 +4021,7 @@ var za = function(e) {
|
|
|
4026
4021
|
function(n, i) {
|
|
4027
4022
|
if (!r)
|
|
4028
4023
|
try {
|
|
4029
|
-
"$" + n(e) === i && (r =
|
|
4024
|
+
"$" + n(e) === i && (r = Lr(i, 1));
|
|
4030
4025
|
} catch {
|
|
4031
4026
|
}
|
|
4032
4027
|
}
|
|
@@ -4042,7 +4037,7 @@ var za = function(e) {
|
|
|
4042
4037
|
function(n, i) {
|
|
4043
4038
|
if (!r)
|
|
4044
4039
|
try {
|
|
4045
|
-
n(e), r =
|
|
4040
|
+
n(e), r = Lr(i, 1);
|
|
4046
4041
|
} catch {
|
|
4047
4042
|
}
|
|
4048
4043
|
}
|
|
@@ -4051,15 +4046,15 @@ var za = function(e) {
|
|
|
4051
4046
|
if (!e || typeof e != "object")
|
|
4052
4047
|
return !1;
|
|
4053
4048
|
if (!di) {
|
|
4054
|
-
var r =
|
|
4055
|
-
return Ga(
|
|
4049
|
+
var r = Lr(Qa(e), 8, -1);
|
|
4050
|
+
return Ga(pr, r) > -1 ? r : r !== "Object" ? !1 : Ka(e);
|
|
4056
4051
|
}
|
|
4057
4052
|
return vt ? za(e) : null;
|
|
4058
4053
|
}, Wa = Ha, Ya = function(e) {
|
|
4059
4054
|
return !!Wa(e);
|
|
4060
4055
|
};
|
|
4061
4056
|
(function(t) {
|
|
4062
|
-
var e = fa, r = ma, n =
|
|
4057
|
+
var e = fa, r = ma, n = qa, i = Ya;
|
|
4063
4058
|
function o(y) {
|
|
4064
4059
|
return y.call.bind(y);
|
|
4065
4060
|
}
|
|
@@ -4122,10 +4117,10 @@ var za = function(e) {
|
|
|
4122
4117
|
return n(y) === "Float64Array";
|
|
4123
4118
|
}
|
|
4124
4119
|
t.isFloat64Array = ue;
|
|
4125
|
-
function
|
|
4120
|
+
function Fe(y) {
|
|
4126
4121
|
return n(y) === "BigInt64Array";
|
|
4127
4122
|
}
|
|
4128
|
-
t.isBigInt64Array =
|
|
4123
|
+
t.isBigInt64Array = Fe;
|
|
4129
4124
|
function Te(y) {
|
|
4130
4125
|
return n(y) === "BigUint64Array";
|
|
4131
4126
|
}
|
|
@@ -4146,12 +4141,12 @@ var za = function(e) {
|
|
|
4146
4141
|
return typeof Set > "u" ? !1 : Ie.working ? Ie(y) : y instanceof Set;
|
|
4147
4142
|
}
|
|
4148
4143
|
t.isSet = Ye;
|
|
4149
|
-
function
|
|
4144
|
+
function De(y) {
|
|
4150
4145
|
return u(y) === "[object WeakMap]";
|
|
4151
4146
|
}
|
|
4152
|
-
|
|
4147
|
+
De.working = typeof WeakMap < "u" && De(/* @__PURE__ */ new WeakMap());
|
|
4153
4148
|
function Bt(y) {
|
|
4154
|
-
return typeof WeakMap > "u" ? !1 :
|
|
4149
|
+
return typeof WeakMap > "u" ? !1 : De.working ? De(y) : y instanceof WeakMap;
|
|
4155
4150
|
}
|
|
4156
4151
|
t.isWeakMap = Bt;
|
|
4157
4152
|
function Re(y) {
|
|
@@ -4166,10 +4161,10 @@ var za = function(e) {
|
|
|
4166
4161
|
return u(y) === "[object ArrayBuffer]";
|
|
4167
4162
|
}
|
|
4168
4163
|
Ve.working = typeof ArrayBuffer < "u" && Ve(new ArrayBuffer());
|
|
4169
|
-
function
|
|
4164
|
+
function st(y) {
|
|
4170
4165
|
return typeof ArrayBuffer > "u" ? !1 : Ve.working ? Ve(y) : y instanceof ArrayBuffer;
|
|
4171
4166
|
}
|
|
4172
|
-
t.isArrayBuffer =
|
|
4167
|
+
t.isArrayBuffer = st;
|
|
4173
4168
|
function f(y) {
|
|
4174
4169
|
return u(y) === "[object DataView]";
|
|
4175
4170
|
}
|
|
@@ -4198,10 +4193,10 @@ var za = function(e) {
|
|
|
4198
4193
|
return u(y) === "[object Set Iterator]";
|
|
4199
4194
|
}
|
|
4200
4195
|
t.isSetIterator = _;
|
|
4201
|
-
function
|
|
4196
|
+
function F(y) {
|
|
4202
4197
|
return u(y) === "[object Generator]";
|
|
4203
4198
|
}
|
|
4204
|
-
t.isGeneratorObject =
|
|
4199
|
+
t.isGeneratorObject = F;
|
|
4205
4200
|
function Y(y) {
|
|
4206
4201
|
return u(y) === "[object WebAssembly.Module]";
|
|
4207
4202
|
}
|
|
@@ -4210,28 +4205,28 @@ var za = function(e) {
|
|
|
4210
4205
|
return S(y, d);
|
|
4211
4206
|
}
|
|
4212
4207
|
t.isNumberObject = ke;
|
|
4213
|
-
function
|
|
4208
|
+
function at(y) {
|
|
4214
4209
|
return S(y, c);
|
|
4215
4210
|
}
|
|
4216
|
-
t.isStringObject =
|
|
4211
|
+
t.isStringObject = at;
|
|
4217
4212
|
function $e(y) {
|
|
4218
4213
|
return S(y, l);
|
|
4219
4214
|
}
|
|
4220
4215
|
t.isBooleanObject = $e;
|
|
4221
|
-
function
|
|
4216
|
+
function ut(y) {
|
|
4222
4217
|
return s && S(y, p);
|
|
4223
4218
|
}
|
|
4224
|
-
t.isBigIntObject =
|
|
4219
|
+
t.isBigIntObject = ut;
|
|
4225
4220
|
function Fr(y) {
|
|
4226
4221
|
return a && S(y, b);
|
|
4227
4222
|
}
|
|
4228
4223
|
t.isSymbolObject = Fr;
|
|
4229
4224
|
function gi(y) {
|
|
4230
|
-
return ke(y) ||
|
|
4225
|
+
return ke(y) || at(y) || $e(y) || ut(y) || Fr(y);
|
|
4231
4226
|
}
|
|
4232
4227
|
t.isBoxedPrimitive = gi;
|
|
4233
4228
|
function mi(y) {
|
|
4234
|
-
return typeof Uint8Array < "u" && (
|
|
4229
|
+
return typeof Uint8Array < "u" && (st(y) || C(y));
|
|
4235
4230
|
}
|
|
4236
4231
|
t.isAnyArrayBuffer = mi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4237
4232
|
Object.defineProperty(t, y, {
|
|
@@ -4244,8 +4239,8 @@ var za = function(e) {
|
|
|
4244
4239
|
})(Yn);
|
|
4245
4240
|
var Ja = function(e) {
|
|
4246
4241
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
4247
|
-
},
|
|
4248
|
-
typeof Object.create == "function" ?
|
|
4242
|
+
}, hr = { exports: {} };
|
|
4243
|
+
typeof Object.create == "function" ? hr.exports = function(e, r) {
|
|
4249
4244
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
4250
4245
|
constructor: {
|
|
4251
4246
|
value: e,
|
|
@@ -4254,7 +4249,7 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
4254
4249
|
configurable: !0
|
|
4255
4250
|
}
|
|
4256
4251
|
}));
|
|
4257
|
-
} :
|
|
4252
|
+
} : hr.exports = function(e, r) {
|
|
4258
4253
|
if (r) {
|
|
4259
4254
|
e.super_ = r;
|
|
4260
4255
|
var n = function() {
|
|
@@ -4262,7 +4257,7 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
4262
4257
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
4263
4258
|
}
|
|
4264
4259
|
};
|
|
4265
|
-
var Xa =
|
|
4260
|
+
var Xa = hr.exports;
|
|
4266
4261
|
(function(t) {
|
|
4267
4262
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
4268
4263
|
for (var g = Object.keys(h), w = {}, C = 0; C < g.length; C++)
|
|
@@ -4396,25 +4391,25 @@ var Xa = yr.exports;
|
|
|
4396
4391
|
}
|
|
4397
4392
|
if (ae(h))
|
|
4398
4393
|
return f.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
4399
|
-
if (
|
|
4394
|
+
if (Fe(h))
|
|
4400
4395
|
return f.stylize(Date.prototype.toString.call(h), "date");
|
|
4401
4396
|
if (Te(h))
|
|
4402
4397
|
return p(h);
|
|
4403
4398
|
}
|
|
4404
|
-
var
|
|
4399
|
+
var F = "", Y = !1, ke = ["{", "}"];
|
|
4405
4400
|
if (v(h) && (Y = !0, ke = ["[", "]"]), pe(h)) {
|
|
4406
|
-
var
|
|
4407
|
-
|
|
4401
|
+
var at = h.name ? ": " + h.name : "";
|
|
4402
|
+
F = " [Function" + at + "]";
|
|
4408
4403
|
}
|
|
4409
|
-
if (ae(h) && (
|
|
4410
|
-
return ke[0] +
|
|
4404
|
+
if (ae(h) && (F = " " + RegExp.prototype.toString.call(h)), Fe(h) && (F = " " + Date.prototype.toUTCString.call(h)), Te(h) && (F = " " + p(h)), L.length === 0 && (!Y || h.length == 0))
|
|
4405
|
+
return ke[0] + F + ke[1];
|
|
4411
4406
|
if (g < 0)
|
|
4412
4407
|
return ae(h) ? f.stylize(RegExp.prototype.toString.call(h), "regexp") : f.stylize("[Object]", "special");
|
|
4413
4408
|
f.seen.push(h);
|
|
4414
4409
|
var $e;
|
|
4415
|
-
return Y ? $e = b(f, h, g, I, L) : $e = L.map(function(
|
|
4416
|
-
return S(f, h, g, I,
|
|
4417
|
-
}), f.seen.pop(), m($e,
|
|
4410
|
+
return Y ? $e = b(f, h, g, I, L) : $e = L.map(function(ut) {
|
|
4411
|
+
return S(f, h, g, I, ut, Y);
|
|
4412
|
+
}), f.seen.pop(), m($e, F, ke);
|
|
4418
4413
|
}
|
|
4419
4414
|
function l(f, h) {
|
|
4420
4415
|
if (T(h))
|
|
@@ -4443,20 +4438,20 @@ var Xa = yr.exports;
|
|
|
4443
4438
|
String(I),
|
|
4444
4439
|
!0
|
|
4445
4440
|
)) : L.push("");
|
|
4446
|
-
return C.forEach(function(
|
|
4447
|
-
|
|
4441
|
+
return C.forEach(function(F) {
|
|
4442
|
+
F.match(/^\d+$/) || L.push(S(
|
|
4448
4443
|
f,
|
|
4449
4444
|
h,
|
|
4450
4445
|
g,
|
|
4451
4446
|
w,
|
|
4452
|
-
|
|
4447
|
+
F,
|
|
4453
4448
|
!0
|
|
4454
4449
|
));
|
|
4455
4450
|
}), L;
|
|
4456
4451
|
}
|
|
4457
4452
|
function S(f, h, g, w, C, L) {
|
|
4458
|
-
var I, _,
|
|
4459
|
-
if (
|
|
4453
|
+
var I, _, F;
|
|
4454
|
+
if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? _ = f.stylize("[Getter/Setter]", "special") : _ = f.stylize("[Getter]", "special") : F.set && (_ = f.stylize("[Setter]", "special")), Re(w, C) || (I = "[" + C + "]"), _ || (f.seen.indexOf(F.value) < 0 ? (V(g) ? _ = c(f, F.value, null) : _ = c(f, F.value, g - 1), _.indexOf(`
|
|
4460
4455
|
`) > -1 && (L ? _ = _.split(`
|
|
4461
4456
|
`).map(function(Y) {
|
|
4462
4457
|
return " " + Y;
|
|
@@ -4523,10 +4518,10 @@ var Xa = yr.exports;
|
|
|
4523
4518
|
return typeof f == "object" && f !== null;
|
|
4524
4519
|
}
|
|
4525
4520
|
t.isObject = ue;
|
|
4526
|
-
function
|
|
4521
|
+
function Fe(f) {
|
|
4527
4522
|
return ue(f) && Ie(f) === "[object Date]";
|
|
4528
4523
|
}
|
|
4529
|
-
t.isDate =
|
|
4524
|
+
t.isDate = Fe, t.types.isDate = Fe;
|
|
4530
4525
|
function Te(f) {
|
|
4531
4526
|
return ue(f) && (Ie(f) === "[object Error]" || f instanceof Error);
|
|
4532
4527
|
}
|
|
@@ -4546,7 +4541,7 @@ var Xa = yr.exports;
|
|
|
4546
4541
|
function Ye(f) {
|
|
4547
4542
|
return f < 10 ? "0" + f.toString(10) : f.toString(10);
|
|
4548
4543
|
}
|
|
4549
|
-
var
|
|
4544
|
+
var De = [
|
|
4550
4545
|
"Jan",
|
|
4551
4546
|
"Feb",
|
|
4552
4547
|
"Mar",
|
|
@@ -4566,7 +4561,7 @@ var Xa = yr.exports;
|
|
|
4566
4561
|
Ye(f.getMinutes()),
|
|
4567
4562
|
Ye(f.getSeconds())
|
|
4568
4563
|
].join(":");
|
|
4569
|
-
return [f.getDate(),
|
|
4564
|
+
return [f.getDate(), De[f.getMonth()], h].join(" ");
|
|
4570
4565
|
}
|
|
4571
4566
|
t.log = function() {
|
|
4572
4567
|
console.log("%s - %s", Bt(), t.format.apply(t, arguments));
|
|
@@ -4595,17 +4590,17 @@ var Xa = yr.exports;
|
|
|
4595
4590
|
}), g;
|
|
4596
4591
|
}
|
|
4597
4592
|
function g() {
|
|
4598
|
-
for (var w, C, L = new Promise(function(
|
|
4599
|
-
w =
|
|
4593
|
+
for (var w, C, L = new Promise(function(F, Y) {
|
|
4594
|
+
w = F, C = Y;
|
|
4600
4595
|
}), I = [], _ = 0; _ < arguments.length; _++)
|
|
4601
4596
|
I.push(arguments[_]);
|
|
4602
|
-
I.push(function(
|
|
4603
|
-
|
|
4597
|
+
I.push(function(F, Y) {
|
|
4598
|
+
F ? C(F) : w(Y);
|
|
4604
4599
|
});
|
|
4605
4600
|
try {
|
|
4606
4601
|
h.apply(this, I);
|
|
4607
|
-
} catch (
|
|
4608
|
-
C(
|
|
4602
|
+
} catch (F) {
|
|
4603
|
+
C(F);
|
|
4609
4604
|
}
|
|
4610
4605
|
return L;
|
|
4611
4606
|
}
|
|
@@ -4626,7 +4621,7 @@ var Xa = yr.exports;
|
|
|
4626
4621
|
}
|
|
4627
4622
|
return h(f);
|
|
4628
4623
|
}
|
|
4629
|
-
function
|
|
4624
|
+
function st(f) {
|
|
4630
4625
|
if (typeof f != "function")
|
|
4631
4626
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4632
4627
|
function h() {
|
|
@@ -4652,9 +4647,9 @@ var Xa = yr.exports;
|
|
|
4652
4647
|
e(f)
|
|
4653
4648
|
), h;
|
|
4654
4649
|
}
|
|
4655
|
-
t.callbackify =
|
|
4656
|
-
})(
|
|
4657
|
-
const { inherits: Za, format: Yt } =
|
|
4650
|
+
t.callbackify = st;
|
|
4651
|
+
})(Ft);
|
|
4652
|
+
const { inherits: Za, format: Yt } = Ft;
|
|
4658
4653
|
function _e(t, e, r = Error) {
|
|
4659
4654
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4660
4655
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -4715,7 +4710,7 @@ var fi = {
|
|
|
4715
4710
|
return r + i(c ? "└" : "├") + i("─") + i(l ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4716
4711
|
}).join("");
|
|
4717
4712
|
};
|
|
4718
|
-
const tu = eu,
|
|
4713
|
+
const tu = eu, bn = Symbol("avvio.TimeTree.untrackNode"), Jt = Symbol("avvio.TimeTree.trackNode"), vn = Symbol("avvio.TimeTree.getParent"), Sn = Symbol("avvio.TimeTree.getNode"), wn = Symbol("avvio.TimeTree.addNode");
|
|
4719
4714
|
let ru = class {
|
|
4720
4715
|
constructor() {
|
|
4721
4716
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
@@ -4723,7 +4718,7 @@ let ru = class {
|
|
|
4723
4718
|
[Jt](e) {
|
|
4724
4719
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4725
4720
|
}
|
|
4726
|
-
[
|
|
4721
|
+
[bn](e) {
|
|
4727
4722
|
this.tableId.delete(e.id);
|
|
4728
4723
|
const r = this.tableLabel.get(e.label);
|
|
4729
4724
|
if (r.id) {
|
|
@@ -4732,16 +4727,16 @@ let ru = class {
|
|
|
4732
4727
|
}
|
|
4733
4728
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
4734
4729
|
}
|
|
4735
|
-
[
|
|
4730
|
+
[vn](e) {
|
|
4736
4731
|
if (e === null)
|
|
4737
4732
|
return this.root;
|
|
4738
4733
|
const r = this.tableLabel.get(e);
|
|
4739
4734
|
return r.id ? r : r[r.length - 1];
|
|
4740
4735
|
}
|
|
4741
|
-
[
|
|
4736
|
+
[Sn](e) {
|
|
4742
4737
|
return this.tableId.get(e);
|
|
4743
4738
|
}
|
|
4744
|
-
[
|
|
4739
|
+
[wn](e, r, n) {
|
|
4745
4740
|
if (e === null)
|
|
4746
4741
|
return this.root = {
|
|
4747
4742
|
id: "root",
|
|
@@ -4749,7 +4744,7 @@ let ru = class {
|
|
|
4749
4744
|
start: n,
|
|
4750
4745
|
nodes: []
|
|
4751
4746
|
}, this[Jt](this.root), this.root.id;
|
|
4752
|
-
const o = this[
|
|
4747
|
+
const o = this[vn](e), s = `${r}-${Math.random()}`, a = {
|
|
4753
4748
|
id: s,
|
|
4754
4749
|
parent: e,
|
|
4755
4750
|
start: n,
|
|
@@ -4759,11 +4754,11 @@ let ru = class {
|
|
|
4759
4754
|
return o.nodes.push(a), this[Jt](a), s;
|
|
4760
4755
|
}
|
|
4761
4756
|
start(e, r, n = Date.now()) {
|
|
4762
|
-
return this[
|
|
4757
|
+
return this[wn](e, r, n);
|
|
4763
4758
|
}
|
|
4764
4759
|
stop(e, r = Date.now()) {
|
|
4765
|
-
const n = this[
|
|
4766
|
-
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[
|
|
4760
|
+
const n = this[Sn](e);
|
|
4761
|
+
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[bn](n));
|
|
4767
4762
|
}
|
|
4768
4763
|
toJSON() {
|
|
4769
4764
|
return Object.assign({}, this.root);
|
|
@@ -4773,10 +4768,10 @@ let ru = class {
|
|
|
4773
4768
|
return tu(r);
|
|
4774
4769
|
}
|
|
4775
4770
|
};
|
|
4776
|
-
var nu = ru,
|
|
4771
|
+
var nu = ru, Pr = { exports: {} }, yr = { exports: {} }, Xt, An;
|
|
4777
4772
|
function iu() {
|
|
4778
|
-
if (
|
|
4779
|
-
|
|
4773
|
+
if (An) return Xt;
|
|
4774
|
+
An = 1;
|
|
4780
4775
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4781
4776
|
Xt = function(c, l) {
|
|
4782
4777
|
l = l || {};
|
|
@@ -5069,9 +5064,9 @@ var su = ou;
|
|
|
5069
5064
|
return "[UnexpectedJSONParseError]: " + d.message;
|
|
5070
5065
|
}
|
|
5071
5066
|
};
|
|
5072
|
-
})(
|
|
5073
|
-
var pi =
|
|
5074
|
-
const au = Un, uu = Wn.EventEmitter, cu =
|
|
5067
|
+
})(yr, yr.exports);
|
|
5068
|
+
var pi = yr.exports;
|
|
5069
|
+
const au = Un, uu = Wn.EventEmitter, cu = Ft.inherits, j = pi("avvio"), { AVV_ERR_READY_TIMEOUT: lu } = fi, Zt = Symbol.for("plugin-meta");
|
|
5075
5070
|
function du(t, e) {
|
|
5076
5071
|
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(`
|
|
5077
5072
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
@@ -5163,12 +5158,12 @@ We.prototype.finish = function(t, e) {
|
|
|
5163
5158
|
};
|
|
5164
5159
|
function pu(t, e) {
|
|
5165
5160
|
const r = this;
|
|
5166
|
-
A.nextTick(
|
|
5161
|
+
A.nextTick(Nr.bind(r), t, e);
|
|
5167
5162
|
}
|
|
5168
|
-
function
|
|
5163
|
+
function Nr(t, e) {
|
|
5169
5164
|
if (typeof t.func.then == "function") {
|
|
5170
5165
|
t.func.then((n) => {
|
|
5171
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
5166
|
+
typeof n.default == "function" && (n = n.default), t.func = n, Nr.call(this, t, e);
|
|
5172
5167
|
}, e);
|
|
5173
5168
|
return;
|
|
5174
5169
|
}
|
|
@@ -5181,16 +5176,16 @@ function Dr(t, e) {
|
|
|
5181
5176
|
}
|
|
5182
5177
|
function hu() {
|
|
5183
5178
|
}
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
var yu =
|
|
5187
|
-
const
|
|
5179
|
+
Pr.exports = We;
|
|
5180
|
+
Pr.exports.loadPlugin = Nr;
|
|
5181
|
+
var yu = Pr.exports;
|
|
5182
|
+
const En = Un, gu = Wn.EventEmitter, mu = Ft.inherits, {
|
|
5188
5183
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
5189
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
5184
|
+
AVV_ERR_CALLBACK_NOT_FN: et,
|
|
5190
5185
|
AVV_ERR_PLUGIN_NOT_VALID: bu,
|
|
5191
5186
|
AVV_ERR_ROOT_PLG_BOOTED: vu,
|
|
5192
5187
|
AVV_ERR_READY_TIMEOUT: Su
|
|
5193
|
-
} = fi, wu = nu,
|
|
5188
|
+
} = fi, wu = nu, gr = yu, He = pi("avvio"), _t = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
|
|
5194
5189
|
function Au(t, e, r) {
|
|
5195
5190
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
5196
5191
|
if (t[i])
|
|
@@ -5205,15 +5200,15 @@ function Au(t, e, r) {
|
|
|
5205
5200
|
return typeof d != "function" ? r._loadRegistered() : (r.after(rr(d, this)), this);
|
|
5206
5201
|
}, t[s] = function(d) {
|
|
5207
5202
|
if (d && typeof d != "function")
|
|
5208
|
-
throw new
|
|
5203
|
+
throw new et(s, typeof d);
|
|
5209
5204
|
return r.ready(d ? rr(d, this) : void 0);
|
|
5210
5205
|
}, t[a] = function(d) {
|
|
5211
5206
|
if (typeof d != "function")
|
|
5212
|
-
throw new
|
|
5207
|
+
throw new et(a, typeof d);
|
|
5213
5208
|
return r.onClose(ku(d, this)), this;
|
|
5214
5209
|
}, t[u] = function(d) {
|
|
5215
5210
|
if (d && typeof d != "function")
|
|
5216
|
-
throw new
|
|
5211
|
+
throw new et(u, typeof d);
|
|
5217
5212
|
return d ? (r.close(rr(d, this)), this) : r.close();
|
|
5218
5213
|
};
|
|
5219
5214
|
}
|
|
@@ -5222,16 +5217,16 @@ function Q(t, e, r) {
|
|
|
5222
5217
|
const n = new Q(t, e, r);
|
|
5223
5218
|
return t && Au(t, e, n), n;
|
|
5224
5219
|
}
|
|
5225
|
-
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 wu(), this._readyQ =
|
|
5226
|
-
this.emit("start"), this._readyQ.drain =
|
|
5227
|
-
}, this._closeQ =
|
|
5228
|
-
this.emit("close"), this._closeQ.drain =
|
|
5229
|
-
}, this._doStart = null, this._root = new
|
|
5220
|
+
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 wu(), this._readyQ = En(this, yi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
5221
|
+
this.emit("start"), this._readyQ.drain = In;
|
|
5222
|
+
}, this._closeQ = En(this, Tu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5223
|
+
this.emit("close"), this._closeQ.drain = In;
|
|
5224
|
+
}, this._doStart = null, this._root = new gr(this, Eu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5230
5225
|
const s = this.pluginTree.start(null, i, o);
|
|
5231
5226
|
this._root.once("loaded", (a, u, d) => {
|
|
5232
5227
|
this.pluginTree.stop(s, d);
|
|
5233
5228
|
});
|
|
5234
|
-
}),
|
|
5229
|
+
}), gr.loadPlugin.call(this, this._root, (n) => {
|
|
5235
5230
|
He("root plugin ready");
|
|
5236
5231
|
try {
|
|
5237
5232
|
this.emit("preReady"), this._root = null;
|
|
@@ -5273,7 +5268,7 @@ Object.defineProperty(Q.prototype, "then", { get: hi });
|
|
|
5273
5268
|
Q.prototype._addPlugin = function(t, e, r) {
|
|
5274
5269
|
if (t = Iu(t), e = e || {}, this.booted)
|
|
5275
5270
|
throw new vu();
|
|
5276
|
-
const n = this._current[0], i = new
|
|
5271
|
+
const n = this._current[0], i = new gr(this, t, e, r);
|
|
5277
5272
|
if (i.once("start", (o, s, a) => {
|
|
5278
5273
|
const u = this.pluginTree.start(n.name, s, a);
|
|
5279
5274
|
i.once("loaded", (d, c, l) => {
|
|
@@ -5307,7 +5302,7 @@ Q.prototype.close = function(t) {
|
|
|
5307
5302
|
let e;
|
|
5308
5303
|
if (t) {
|
|
5309
5304
|
if (typeof t != "function")
|
|
5310
|
-
throw new
|
|
5305
|
+
throw new et("close", typeof t);
|
|
5311
5306
|
} else
|
|
5312
5307
|
e = new Promise(function(r, n) {
|
|
5313
5308
|
t = function(i) {
|
|
@@ -5323,7 +5318,7 @@ Q.prototype.close = function(t) {
|
|
|
5323
5318
|
Q.prototype.ready = function(t) {
|
|
5324
5319
|
if (t) {
|
|
5325
5320
|
if (typeof t != "function")
|
|
5326
|
-
throw new
|
|
5321
|
+
throw new et("ready", typeof t);
|
|
5327
5322
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
5328
5323
|
return;
|
|
5329
5324
|
}
|
|
@@ -5341,7 +5336,7 @@ Q.prototype.prettyPrint = function() {
|
|
|
5341
5336
|
Q.prototype.toJSON = function() {
|
|
5342
5337
|
return this.pluginTree.toJSON();
|
|
5343
5338
|
};
|
|
5344
|
-
function
|
|
5339
|
+
function In() {
|
|
5345
5340
|
}
|
|
5346
5341
|
function hi() {
|
|
5347
5342
|
if (this.booted) {
|
|
@@ -5414,15 +5409,15 @@ function rr(t, e) {
|
|
|
5414
5409
|
}, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
|
|
5415
5410
|
}
|
|
5416
5411
|
}
|
|
5417
|
-
|
|
5418
|
-
|
|
5412
|
+
Sr.exports = Q;
|
|
5413
|
+
Sr.exports.express = function(t) {
|
|
5419
5414
|
return Q(t, {
|
|
5420
5415
|
expose: {
|
|
5421
5416
|
use: "load"
|
|
5422
5417
|
}
|
|
5423
5418
|
});
|
|
5424
5419
|
};
|
|
5425
|
-
var _u =
|
|
5420
|
+
var _u = Sr.exports;
|
|
5426
5421
|
const Cu = /* @__PURE__ */ ns(_u);
|
|
5427
5422
|
(function() {
|
|
5428
5423
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
@@ -5450,7 +5445,7 @@ function Zu(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
|
5450
5445
|
friendsTab: n.friendsTab,
|
|
5451
5446
|
theme: n.theme,
|
|
5452
5447
|
themeMode: n.themeMode
|
|
5453
|
-
}), s.use(_o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(No, { videoPlayerController: n?.videoPlayerController }), s.use(
|
|
5448
|
+
}), s.use(_o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(No, { videoPlayerController: n?.videoPlayerController }), s.use(Do, {
|
|
5454
5449
|
onContentActivate: n?.onContentActivate,
|
|
5455
5450
|
withAd: n?.withAd,
|
|
5456
5451
|
withAdNotification: n?.withAdNotification
|