@streamlayer/sdk-web 1.10.2 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +6 -6
- package/lib/es/index.js +125 -110
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { NotificationKind as me, NotificationType as Hr } from "@streamlayer/sl-
|
|
|
22
22
|
function Li(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var Dn = { exports: {} }, M = Dn.exports = {}, de, le;
|
|
26
26
|
function sr() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
@@ -41,7 +41,7 @@ function ar() {
|
|
|
41
41
|
le = ar;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
|
-
function
|
|
44
|
+
function Fn(t) {
|
|
45
45
|
if (de === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
47
|
if ((de === sr || !de) && setTimeout)
|
|
@@ -72,12 +72,12 @@ function Ni(t) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
var we = [], Qe = !1, Pe, yt = -1;
|
|
75
|
-
function
|
|
75
|
+
function Di() {
|
|
76
76
|
!Qe || !Pe || (Qe = !1, Pe.length ? we = Pe.concat(we) : yt = -1, we.length && Rn());
|
|
77
77
|
}
|
|
78
78
|
function Rn() {
|
|
79
79
|
if (!Qe) {
|
|
80
|
-
var t =
|
|
80
|
+
var t = Fn(Di);
|
|
81
81
|
Qe = !0;
|
|
82
82
|
for (var e = we.length; e; ) {
|
|
83
83
|
for (Pe = we, we = []; ++yt < e; )
|
|
@@ -92,7 +92,7 @@ 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
|
-
we.push(new Vn(t, e)), we.length === 1 && !Qe &&
|
|
95
|
+
we.push(new Vn(t, e)), we.length === 1 && !Qe && Fn(Rn);
|
|
96
96
|
};
|
|
97
97
|
function Vn(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
@@ -132,8 +132,8 @@ M.chdir = function(t) {
|
|
|
132
132
|
M.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const E = /* @__PURE__ */ Li(
|
|
135
|
+
var Fi = Dn.exports;
|
|
136
|
+
const E = /* @__PURE__ */ Li(Fi), Ri = Ii({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -1004,7 +1004,10 @@ const uo = (t, e, r) => {
|
|
|
1004
1004
|
return i.nanoquery.createFetcherStore(s, {
|
|
1005
1005
|
fetcher: async (a, u, d, c, f) => {
|
|
1006
1006
|
if (!d || !c || !f)
|
|
1007
|
-
return
|
|
1007
|
+
return {
|
|
1008
|
+
timestamp: Date.now(),
|
|
1009
|
+
data: null
|
|
1010
|
+
};
|
|
1008
1011
|
const p = await o.betPack({
|
|
1009
1012
|
eventId: d,
|
|
1010
1013
|
types: [I.PREDICTION],
|
|
@@ -1015,23 +1018,29 @@ const uo = (t, e, r) => {
|
|
|
1015
1018
|
order: "asc"
|
|
1016
1019
|
}
|
|
1017
1020
|
});
|
|
1018
|
-
return !p.data || !p.data.length ?
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1021
|
+
return !p.data || !p.data.length ? {
|
|
1022
|
+
timestamp: Date.now(),
|
|
1023
|
+
data: null
|
|
1024
|
+
} : {
|
|
1025
|
+
timestamp: Date.now(),
|
|
1026
|
+
data: p.data?.reduce((v, w) => {
|
|
1027
|
+
const m = w?.attributes?.question;
|
|
1028
|
+
if (!m?.id)
|
|
1029
|
+
return v;
|
|
1030
|
+
const g = {
|
|
1031
|
+
eventId: d,
|
|
1032
|
+
userId: c,
|
|
1033
|
+
organizationId: f
|
|
1034
|
+
};
|
|
1035
|
+
return n.isBetPackQuestionReceived(g, m.id) || (B.emit("poll", {
|
|
1036
|
+
action: "received",
|
|
1037
|
+
payload: {
|
|
1038
|
+
questionId: m.id,
|
|
1039
|
+
questionType: m.type
|
|
1040
|
+
}
|
|
1041
|
+
}), n.saveBetPackQuestionReceived(g, m.id)), { ...v, [m.id]: m };
|
|
1042
|
+
}, {})
|
|
1043
|
+
};
|
|
1035
1044
|
},
|
|
1036
1045
|
dedupeTime: 0,
|
|
1037
1046
|
refetchInterval: 0
|
|
@@ -1110,12 +1119,12 @@ const Ao = (t) => {
|
|
|
1110
1119
|
}, Be = (t) => (t?.promotion?.type === q.INGAME_IAB11_LBAR || t?.promotion?.type === q.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, Io = (t, e, r) => {
|
|
1111
1120
|
let n = !1;
|
|
1112
1121
|
const i = r.transport, o = pe("advertisement"), s = new wo(), a = Z({}), u = bo(t, i), d = (m) => {
|
|
1113
|
-
const g = a.get(), S = g.data?.question.id,
|
|
1122
|
+
const g = a.get(), S = g.data?.question.id, D = g.data?.promotion?.type;
|
|
1114
1123
|
S && (B.emit("advertisement", {
|
|
1115
1124
|
action: "opened",
|
|
1116
1125
|
payload: {
|
|
1117
1126
|
id: S,
|
|
1118
|
-
type:
|
|
1127
|
+
type: D,
|
|
1119
1128
|
hasBanner: Be(g.data),
|
|
1120
1129
|
openedFrom: m?.fromNotification ? "notification" : "auto"
|
|
1121
1130
|
}
|
|
@@ -1123,13 +1132,13 @@ const Ao = (t) => {
|
|
|
1123
1132
|
action: "notification-opened",
|
|
1124
1133
|
payload: {
|
|
1125
1134
|
id: S,
|
|
1126
|
-
type:
|
|
1135
|
+
type: D,
|
|
1127
1136
|
hasBanner: Be(g.data)
|
|
1128
1137
|
}
|
|
1129
1138
|
})));
|
|
1130
1139
|
}, c = () => {
|
|
1131
|
-
const m = a.get(), g = m.data?.question.id, S = m.data?.promotion?.type,
|
|
1132
|
-
g && !
|
|
1140
|
+
const m = a.get(), g = m.data?.question.id, S = m.data?.promotion?.type, D = a.get()?.isOpened;
|
|
1141
|
+
g && !D && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), B.emit("advertisement", {
|
|
1133
1142
|
action: "viewed",
|
|
1134
1143
|
payload: {
|
|
1135
1144
|
id: g,
|
|
@@ -1152,7 +1161,7 @@ const Ao = (t) => {
|
|
|
1152
1161
|
data: S,
|
|
1153
1162
|
hasNotification: S?.notification?.enabled === Br.NOTIFICATION_ENABLED,
|
|
1154
1163
|
close: () => p(S?.question.id),
|
|
1155
|
-
togglePause: (
|
|
1164
|
+
togglePause: (D) => v(S?.question.id, D),
|
|
1156
1165
|
isViewed: S && !!s.isViewed(S.question.id)
|
|
1157
1166
|
})).catch((S) => a.set({
|
|
1158
1167
|
loading: !1,
|
|
@@ -1301,7 +1310,7 @@ class _o {
|
|
|
1301
1310
|
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.questionSubscription = mo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", async (i) => {
|
|
1302
1311
|
const o = i.data?.attributes?.question;
|
|
1303
1312
|
if (this.openedQuestion.updateExtendedQuestion(o), o?.type === I.PREDICTION && (o.status === G.ACTIVE || o.status === G.RESOLVED)) {
|
|
1304
|
-
const s = this.betPack.getValues().data || {};
|
|
1313
|
+
const s = this.betPack.getValues().data?.data || {};
|
|
1305
1314
|
if (s?.[o.id] || Object.keys(s).length < 5) {
|
|
1306
1315
|
const u = Ge(o.id, this.transport), d = u.subscribe(() => {
|
|
1307
1316
|
});
|
|
@@ -1310,8 +1319,11 @@ class _o {
|
|
|
1310
1319
|
c || (c = await cr(o.id, this.transport)), d(), window.requestAnimationFrame(() => {
|
|
1311
1320
|
u.invalidate();
|
|
1312
1321
|
}), this.betPack.getStore().mutate({
|
|
1313
|
-
|
|
1314
|
-
|
|
1322
|
+
timestamp: Date.now(),
|
|
1323
|
+
data: {
|
|
1324
|
+
...s,
|
|
1325
|
+
[o.id]: c
|
|
1326
|
+
}
|
|
1315
1327
|
});
|
|
1316
1328
|
}
|
|
1317
1329
|
}
|
|
@@ -1319,7 +1331,7 @@ class _o {
|
|
|
1319
1331
|
})), this.feedSubscription = yo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
|
|
1320
1332
|
const i = n.data?.attributes?.question;
|
|
1321
1333
|
if (i?.type === I.PREDICTION && (i.status === G.ACTIVE || i.status === G.RESOLVED)) {
|
|
1322
|
-
const o = this.betPack.getValues().data || {};
|
|
1334
|
+
const o = this.betPack.getValues().data?.data || {};
|
|
1323
1335
|
if (o?.[i.id] || Object.keys(o).length < 5) {
|
|
1324
1336
|
const a = Ge(i.id, this.transport), u = a.subscribe(() => {
|
|
1325
1337
|
});
|
|
@@ -1328,8 +1340,11 @@ class _o {
|
|
|
1328
1340
|
d || (d = await cr(i.id, this.transport)), u(), window.requestAnimationFrame(() => {
|
|
1329
1341
|
a.invalidate();
|
|
1330
1342
|
}), this.betPack.getStore().mutate({
|
|
1331
|
-
|
|
1332
|
-
|
|
1343
|
+
timestamp: Date.now(),
|
|
1344
|
+
data: {
|
|
1345
|
+
...o,
|
|
1346
|
+
[i.id]: d
|
|
1347
|
+
}
|
|
1333
1348
|
});
|
|
1334
1349
|
}
|
|
1335
1350
|
}
|
|
@@ -1580,7 +1595,7 @@ const Xr = async (t, e) => {
|
|
|
1580
1595
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1581
1596
|
}, No = {
|
|
1582
1597
|
pageSize: 10
|
|
1583
|
-
},
|
|
1598
|
+
}, Do = (t, e, r, n, i) => {
|
|
1584
1599
|
let o = 0;
|
|
1585
1600
|
const s = U({ pageSize: No.pageSize, page: 0 }), a = Z({
|
|
1586
1601
|
data: [],
|
|
@@ -1598,9 +1613,9 @@ const Xr = async (t, e) => {
|
|
|
1598
1613
|
usersIds: v
|
|
1599
1614
|
});
|
|
1600
1615
|
a.set({
|
|
1601
|
-
data: g.data.map((S,
|
|
1616
|
+
data: g.data.map((S, D) => ({
|
|
1602
1617
|
...S.attributes,
|
|
1603
|
-
friendsRank:
|
|
1618
|
+
friendsRank: D + 1
|
|
1604
1619
|
})),
|
|
1605
1620
|
hasMore: !1,
|
|
1606
1621
|
key: Date.now(),
|
|
@@ -1620,7 +1635,7 @@ const Xr = async (t, e) => {
|
|
|
1620
1635
|
};
|
|
1621
1636
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1622
1637
|
};
|
|
1623
|
-
class
|
|
1638
|
+
class Fo extends Je {
|
|
1624
1639
|
get = this.read;
|
|
1625
1640
|
set = this.write;
|
|
1626
1641
|
del = this.remove;
|
|
@@ -1628,7 +1643,7 @@ class Do extends Je {
|
|
|
1628
1643
|
super("deep-link-context", window.sessionStorage);
|
|
1629
1644
|
}
|
|
1630
1645
|
}
|
|
1631
|
-
const Zr = "sldl",
|
|
1646
|
+
const Zr = "sldl", Dt = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /* @__PURE__ */ new Set([Dt, jn, xn]), en = (t) => {
|
|
1632
1647
|
const e = {}, r = {};
|
|
1633
1648
|
for (const [n, i] of t)
|
|
1634
1649
|
Ro.has(n) ? e[n] = i : r[n] = i;
|
|
@@ -1673,7 +1688,7 @@ const Zr = "sldl", Ft = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /*
|
|
|
1673
1688
|
}
|
|
1674
1689
|
t.setValue("parsed", !0);
|
|
1675
1690
|
}, Bo = (t, e, r) => {
|
|
1676
|
-
const n = new
|
|
1691
|
+
const n = new Fo(), i = n.get("sl-deep-link-store");
|
|
1677
1692
|
let o = {};
|
|
1678
1693
|
if (i)
|
|
1679
1694
|
try {
|
|
@@ -1694,7 +1709,7 @@ const Zr = "sldl", Ft = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /*
|
|
|
1694
1709
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1695
1710
|
}, t.sdk.getInviter = () => {
|
|
1696
1711
|
const { data: a, used: u } = t.deepLink.getDeepLinkData();
|
|
1697
|
-
return u ? a?.[
|
|
1712
|
+
return u ? a?.[Dt] : void 0;
|
|
1698
1713
|
}, t.sdk.inviteDisplayed = () => {
|
|
1699
1714
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1700
1715
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
@@ -1730,7 +1745,7 @@ class Uo extends Mi {
|
|
|
1730
1745
|
*/
|
|
1731
1746
|
login = async (e, r) => {
|
|
1732
1747
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1733
|
-
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[
|
|
1748
|
+
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Dt];
|
|
1734
1749
|
Mo.debug({ inviterKey: o }, "login with inviterKey");
|
|
1735
1750
|
const s = await this.bypassLogin({
|
|
1736
1751
|
schema: e,
|
|
@@ -2039,7 +2054,7 @@ const et = new je(), qo = (t, e, r) => {
|
|
|
2039
2054
|
const i = Z({});
|
|
2040
2055
|
return wr(i, () => Ko(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
|
|
2041
2056
|
const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
|
|
2042
|
-
[
|
|
2057
|
+
[Dt]: c,
|
|
2043
2058
|
[jn]: f,
|
|
2044
2059
|
[xn]: p
|
|
2045
2060
|
};
|
|
@@ -2226,7 +2241,7 @@ class Xo extends $n {
|
|
|
2226
2241
|
constructor(e, r, n) {
|
|
2227
2242
|
if (super(e, r), this.background = new _o(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 = U(!n.sdk.withAuth), this.leaderboardId = new re(U(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(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Ho(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Yo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
|
|
2228
2243
|
this.friends = new se(lo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = U(void 0);
|
|
2229
|
-
const i = this.leaderboardList =
|
|
2244
|
+
const i = this.leaderboardList = Do(this.transport, this.background.slStreamId, this.background.userId, this.friends);
|
|
2230
2245
|
this.cancels.add(this.userSummary.$store.listen((o, s) => {
|
|
2231
2246
|
s?.summary && o?.summary && i.invalidate();
|
|
2232
2247
|
}));
|
|
@@ -2279,10 +2294,10 @@ class Xo extends $n {
|
|
|
2279
2294
|
m || (m = await cr(s, this.transport)), w(), window.requestAnimationFrame(() => {
|
|
2280
2295
|
v.invalidate();
|
|
2281
2296
|
}), p || (p = m?.answers.find(({ youVoted: H }) => H)?.id);
|
|
2282
|
-
const g = a.find(({ correct: H }) => H), S = p ? a.find(({ id: H }) => H === p) : void 0,
|
|
2297
|
+
const g = a.find(({ correct: H }) => H), S = p ? a.find(({ id: H }) => H === p) : void 0, D = !!S?.correct;
|
|
2283
2298
|
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
2284
2299
|
try {
|
|
2285
|
-
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status =
|
|
2300
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = D ? lt.WON : lt.LOST);
|
|
2286
2301
|
} catch {
|
|
2287
2302
|
}
|
|
2288
2303
|
this.feedList.getStore().mutate(d);
|
|
@@ -2293,20 +2308,20 @@ class Xo extends $n {
|
|
|
2293
2308
|
type: Ae.QUESTION_RESOLVED,
|
|
2294
2309
|
action: () => this.openQuestion(r.id, n),
|
|
2295
2310
|
close: () => this.closeQuestion(s),
|
|
2296
|
-
autoHideDuration:
|
|
2311
|
+
autoHideDuration: D ? 15e3 : 12e3,
|
|
2297
2312
|
id: u,
|
|
2298
2313
|
emitEvent: !1,
|
|
2299
2314
|
data: {
|
|
2300
2315
|
questionId: s,
|
|
2301
2316
|
questionType: I.PREDICTION,
|
|
2302
2317
|
question: {
|
|
2303
|
-
title:
|
|
2318
|
+
title: D ? `Congratulations! You answered correctly! You won ${g.points} pts!` : `Better luck next time! Correct: ${g?.text}!`,
|
|
2304
2319
|
votedAnswer: {
|
|
2305
2320
|
title: S?.text,
|
|
2306
2321
|
points: S?.points
|
|
2307
2322
|
},
|
|
2308
2323
|
correctAnswerTitle: g?.text,
|
|
2309
|
-
correct: !!
|
|
2324
|
+
correct: !!D,
|
|
2310
2325
|
predictionResult: i === G.RESOLVED,
|
|
2311
2326
|
questionTitle: r?.subject
|
|
2312
2327
|
}
|
|
@@ -2386,7 +2401,7 @@ class Xo extends $n {
|
|
|
2386
2401
|
}
|
|
2387
2402
|
throw o;
|
|
2388
2403
|
}
|
|
2389
|
-
const n = { ...this.betPack.getValues().data }, i = n?.[e];
|
|
2404
|
+
const n = { ...this.betPack.getValues().data?.data }, i = n?.[e];
|
|
2390
2405
|
i && (B.emit("poll", {
|
|
2391
2406
|
action: "voted",
|
|
2392
2407
|
payload: {
|
|
@@ -2396,7 +2411,7 @@ class Xo extends $n {
|
|
|
2396
2411
|
}), i.answers = i.answers.map((o) => o.id === r ? {
|
|
2397
2412
|
...o,
|
|
2398
2413
|
youVoted: !0
|
|
2399
|
-
} : o), this.betPack.getStore().mutate(n));
|
|
2414
|
+
} : o), this.betPack.getStore().mutate({ data: n, timestamp: Date.now() }));
|
|
2400
2415
|
};
|
|
2401
2416
|
submitAnswer = async (e, r) => {
|
|
2402
2417
|
const n = Ge(e, this.transport), i = n.subscribe(() => {
|
|
@@ -3201,7 +3216,7 @@ function Qn(t, e, r) {
|
|
|
3201
3216
|
getQueue: p,
|
|
3202
3217
|
unshift: g,
|
|
3203
3218
|
empty: te,
|
|
3204
|
-
kill:
|
|
3219
|
+
kill: D,
|
|
3205
3220
|
killAndDrain: H,
|
|
3206
3221
|
error: ne
|
|
3207
3222
|
};
|
|
@@ -3248,7 +3263,7 @@ function Qn(t, e, r) {
|
|
|
3248
3263
|
var V = i;
|
|
3249
3264
|
V && s <= r ? u.paused ? s-- : (o === i && (o = null), i = V.next, V.next = null, e.call(t, V.value, V.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
3250
3265
|
}
|
|
3251
|
-
function
|
|
3266
|
+
function D() {
|
|
3252
3267
|
i = null, o = null, u.drain = te;
|
|
3253
3268
|
}
|
|
3254
3269
|
function H() {
|
|
@@ -3340,7 +3355,7 @@ N.prototype._events = void 0;
|
|
|
3340
3355
|
N.prototype._eventsCount = 0;
|
|
3341
3356
|
N.prototype._maxListeners = void 0;
|
|
3342
3357
|
var un = 10;
|
|
3343
|
-
function
|
|
3358
|
+
function Ft(t) {
|
|
3344
3359
|
if (typeof t != "function")
|
|
3345
3360
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
3346
3361
|
}
|
|
@@ -3395,7 +3410,7 @@ N.prototype.emit = function(e) {
|
|
|
3395
3410
|
};
|
|
3396
3411
|
function Hn(t, e, r, n) {
|
|
3397
3412
|
var i, o, s;
|
|
3398
|
-
if (
|
|
3413
|
+
if (Ft(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3399
3414
|
"newListener",
|
|
3400
3415
|
e,
|
|
3401
3416
|
r.listener ? r.listener : r
|
|
@@ -3424,14 +3439,14 @@ function Wn(t, e, r) {
|
|
|
3424
3439
|
return i.listener = r, n.wrapFn = i, i;
|
|
3425
3440
|
}
|
|
3426
3441
|
N.prototype.once = function(e, r) {
|
|
3427
|
-
return
|
|
3442
|
+
return Ft(r), this.on(e, Wn(this, e, r)), this;
|
|
3428
3443
|
};
|
|
3429
3444
|
N.prototype.prependOnceListener = function(e, r) {
|
|
3430
|
-
return
|
|
3445
|
+
return Ft(r), this.prependListener(e, Wn(this, e, r)), this;
|
|
3431
3446
|
};
|
|
3432
3447
|
N.prototype.removeListener = function(e, r) {
|
|
3433
3448
|
var n, i, o, s, a;
|
|
3434
|
-
if (
|
|
3449
|
+
if (Ft(r), i = this._events, i === void 0)
|
|
3435
3450
|
return this;
|
|
3436
3451
|
if (n = i[e], n === void 0)
|
|
3437
3452
|
return this;
|
|
@@ -3569,8 +3584,8 @@ var ei = Tr.exports, Rt = {}, ti = {}, ri = function() {
|
|
|
3569
3584
|
}, jt = {
|
|
3570
3585
|
__proto__: null,
|
|
3571
3586
|
foo: {}
|
|
3572
|
-
},
|
|
3573
|
-
return { __proto__: jt }.foo === jt.foo && !(jt instanceof
|
|
3587
|
+
}, Ds = Object, Fs = function() {
|
|
3588
|
+
return { __proto__: jt }.foo === jt.foo && !(jt instanceof Ds);
|
|
3574
3589
|
}, Rs = "Function.prototype.bind called on incompatible ", Vs = Object.prototype.toString, $s = Math.max, Bs = "[object Function]", dn = function(e, r) {
|
|
3575
3590
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3576
3591
|
n[i] = e[i];
|
|
@@ -3633,7 +3648,7 @@ var Qt = function() {
|
|
|
3633
3648
|
return Qt;
|
|
3634
3649
|
}
|
|
3635
3650
|
}
|
|
3636
|
-
}() : Qt, Me = Ns(), Zs =
|
|
3651
|
+
}() : Qt, Me = Ns(), Zs = Fs(), j = Object.getPrototypeOf || (Zs ? function(t) {
|
|
3637
3652
|
return t.__proto__;
|
|
3638
3653
|
} : null), qe = {}, ea = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Ne = {
|
|
3639
3654
|
__proto__: null,
|
|
@@ -3994,7 +4009,7 @@ var ka = /^\s*class\b/, hr = function(e) {
|
|
|
3994
4009
|
} catch {
|
|
3995
4010
|
return !1;
|
|
3996
4011
|
}
|
|
3997
|
-
}, vt = Object.prototype.toString, Pa = "[object Object]", Ca = "[object Function]", La = "[object GeneratorFunction]", Na = "[object HTMLAllCollection]",
|
|
4012
|
+
}, vt = Object.prototype.toString, Pa = "[object Object]", Ca = "[object Function]", La = "[object GeneratorFunction]", Na = "[object HTMLAllCollection]", Da = "[object HTML document.all class]", Fa = "[object HTMLCollection]", Ra = typeof Symbol == "function" && !!Symbol.toStringTag, Va = !(0 in [,]), yr = function() {
|
|
3998
4013
|
return !1;
|
|
3999
4014
|
};
|
|
4000
4015
|
if (typeof document == "object") {
|
|
@@ -4003,7 +4018,7 @@ if (typeof document == "object") {
|
|
|
4003
4018
|
if ((Va || !e) && (typeof e > "u" || typeof e == "object"))
|
|
4004
4019
|
try {
|
|
4005
4020
|
var r = vt.call(e);
|
|
4006
|
-
return (r === Na || r ===
|
|
4021
|
+
return (r === Na || r === Da || r === Fa || r === Pa) && e("") == null;
|
|
4007
4022
|
} catch {
|
|
4008
4023
|
}
|
|
4009
4024
|
return !1;
|
|
@@ -4108,7 +4123,7 @@ var Ya = function(e) {
|
|
|
4108
4123
|
return Wa(mr, r) > -1 ? r : r !== "Object" ? !1 : Ja(e);
|
|
4109
4124
|
}
|
|
4110
4125
|
return St ? Ya(e) : null;
|
|
4111
|
-
}, kt = pi, Za = hi, wn = Pr,
|
|
4126
|
+
}, kt = pi, Za = hi, wn = Pr, Dr = Cr, wt = Bt, eu = Dr("Object.prototype.toString"), mi = Vt(), An = typeof globalThis > "u" ? Er : globalThis, gr = Za(), Fr = Dr("String.prototype.slice"), Jt = Object.getPrototypeOf, tu = Dr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4112
4127
|
for (var n = 0; n < e.length; n += 1)
|
|
4113
4128
|
if (e[n] === r)
|
|
4114
4129
|
return n;
|
|
@@ -4139,7 +4154,7 @@ var ru = function(e) {
|
|
|
4139
4154
|
function(n, i) {
|
|
4140
4155
|
if (!r)
|
|
4141
4156
|
try {
|
|
4142
|
-
"$" + n(e) === i && (r =
|
|
4157
|
+
"$" + n(e) === i && (r = Fr(i, 1));
|
|
4143
4158
|
} catch {
|
|
4144
4159
|
}
|
|
4145
4160
|
}
|
|
@@ -4155,7 +4170,7 @@ var ru = function(e) {
|
|
|
4155
4170
|
function(n, i) {
|
|
4156
4171
|
if (!r)
|
|
4157
4172
|
try {
|
|
4158
|
-
n(e), r =
|
|
4173
|
+
n(e), r = Fr(i, 1);
|
|
4159
4174
|
} catch {
|
|
4160
4175
|
}
|
|
4161
4176
|
}
|
|
@@ -4164,7 +4179,7 @@ var ru = function(e) {
|
|
|
4164
4179
|
if (!e || typeof e != "object")
|
|
4165
4180
|
return !1;
|
|
4166
4181
|
if (!mi) {
|
|
4167
|
-
var r =
|
|
4182
|
+
var r = Fr(eu(e), 8, -1);
|
|
4168
4183
|
return tu(gr, r) > -1 ? r : r !== "Object" ? !1 : nu(e);
|
|
4169
4184
|
}
|
|
4170
4185
|
return wt ? ru(e) : null;
|
|
@@ -4203,10 +4218,10 @@ var ru = function(e) {
|
|
|
4203
4218
|
return n(y) === "Uint8Array";
|
|
4204
4219
|
}
|
|
4205
4220
|
t.isUint8Array = S;
|
|
4206
|
-
function
|
|
4221
|
+
function D(y) {
|
|
4207
4222
|
return n(y) === "Uint8ClampedArray";
|
|
4208
4223
|
}
|
|
4209
|
-
t.isUint8ClampedArray =
|
|
4224
|
+
t.isUint8ClampedArray = D;
|
|
4210
4225
|
function H(y) {
|
|
4211
4226
|
return n(y) === "Uint16Array";
|
|
4212
4227
|
}
|
|
@@ -4235,10 +4250,10 @@ var ru = function(e) {
|
|
|
4235
4250
|
return n(y) === "Float64Array";
|
|
4236
4251
|
}
|
|
4237
4252
|
t.isFloat64Array = ue;
|
|
4238
|
-
function
|
|
4253
|
+
function De(y) {
|
|
4239
4254
|
return n(y) === "BigInt64Array";
|
|
4240
4255
|
}
|
|
4241
|
-
t.isBigInt64Array =
|
|
4256
|
+
t.isBigInt64Array = De;
|
|
4242
4257
|
function Te(y) {
|
|
4243
4258
|
return n(y) === "BigUint64Array";
|
|
4244
4259
|
}
|
|
@@ -4259,12 +4274,12 @@ var ru = function(e) {
|
|
|
4259
4274
|
return typeof Set > "u" ? !1 : Ie.working ? Ie(y) : y instanceof Set;
|
|
4260
4275
|
}
|
|
4261
4276
|
t.isSet = Ze;
|
|
4262
|
-
function
|
|
4277
|
+
function Fe(y) {
|
|
4263
4278
|
return u(y) === "[object WeakMap]";
|
|
4264
4279
|
}
|
|
4265
|
-
|
|
4280
|
+
Fe.working = typeof WeakMap < "u" && Fe(/* @__PURE__ */ new WeakMap());
|
|
4266
4281
|
function qt(y) {
|
|
4267
|
-
return typeof WeakMap > "u" ? !1 :
|
|
4282
|
+
return typeof WeakMap > "u" ? !1 : Fe.working ? Fe(y) : y instanceof WeakMap;
|
|
4268
4283
|
}
|
|
4269
4284
|
t.isWeakMap = qt;
|
|
4270
4285
|
function Re(y) {
|
|
@@ -4311,10 +4326,10 @@ var ru = function(e) {
|
|
|
4311
4326
|
return u(y) === "[object Set Iterator]";
|
|
4312
4327
|
}
|
|
4313
4328
|
t.isSetIterator = k;
|
|
4314
|
-
function
|
|
4329
|
+
function F(y) {
|
|
4315
4330
|
return u(y) === "[object Generator]";
|
|
4316
4331
|
}
|
|
4317
|
-
t.isGeneratorObject =
|
|
4332
|
+
t.isGeneratorObject = F;
|
|
4318
4333
|
function Y(y) {
|
|
4319
4334
|
return u(y) === "[object WebAssembly.Module]";
|
|
4320
4335
|
}
|
|
@@ -4406,7 +4421,7 @@ var uu = br.exports;
|
|
|
4406
4421
|
return k;
|
|
4407
4422
|
}
|
|
4408
4423
|
}), O = A[b]; b < P; O = A[++b])
|
|
4409
|
-
|
|
4424
|
+
D(O) || !ue(O) ? C += " " + O : C += " " + s(O);
|
|
4410
4425
|
return C;
|
|
4411
4426
|
}, t.deprecate = function(l, h) {
|
|
4412
4427
|
if (typeof E < "u" && E.noDeprecation === !0)
|
|
@@ -4509,25 +4524,25 @@ var uu = br.exports;
|
|
|
4509
4524
|
}
|
|
4510
4525
|
if (ae(h))
|
|
4511
4526
|
return l.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
4512
|
-
if (
|
|
4527
|
+
if (De(h))
|
|
4513
4528
|
return l.stylize(Date.prototype.toString.call(h), "date");
|
|
4514
4529
|
if (Te(h))
|
|
4515
4530
|
return p(h);
|
|
4516
4531
|
}
|
|
4517
|
-
var
|
|
4532
|
+
var F = "", Y = !1, _e = ["{", "}"];
|
|
4518
4533
|
if (g(h) && (Y = !0, _e = ["[", "]"]), he(h)) {
|
|
4519
4534
|
var ct = h.name ? ": " + h.name : "";
|
|
4520
|
-
|
|
4535
|
+
F = " [Function" + ct + "]";
|
|
4521
4536
|
}
|
|
4522
|
-
if (ae(h) && (
|
|
4523
|
-
return _e[0] +
|
|
4537
|
+
if (ae(h) && (F = " " + RegExp.prototype.toString.call(h)), De(h) && (F = " " + Date.prototype.toUTCString.call(h)), Te(h) && (F = " " + p(h)), C.length === 0 && (!Y || h.length == 0))
|
|
4538
|
+
return _e[0] + F + _e[1];
|
|
4524
4539
|
if (b < 0)
|
|
4525
4540
|
return ae(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
4526
4541
|
l.seen.push(h);
|
|
4527
4542
|
var $e;
|
|
4528
4543
|
return Y ? $e = v(l, h, b, O, C) : $e = C.map(function(dt) {
|
|
4529
4544
|
return w(l, h, b, O, dt, Y);
|
|
4530
|
-
}), l.seen.pop(), m($e,
|
|
4545
|
+
}), l.seen.pop(), m($e, F, _e);
|
|
4531
4546
|
}
|
|
4532
4547
|
function f(l, h) {
|
|
4533
4548
|
if (_(h))
|
|
@@ -4540,7 +4555,7 @@ var uu = br.exports;
|
|
|
4540
4555
|
return l.stylize("" + h, "number");
|
|
4541
4556
|
if (S(h))
|
|
4542
4557
|
return l.stylize("" + h, "boolean");
|
|
4543
|
-
if (
|
|
4558
|
+
if (D(h))
|
|
4544
4559
|
return l.stylize("null", "null");
|
|
4545
4560
|
}
|
|
4546
4561
|
function p(l) {
|
|
@@ -4556,20 +4571,20 @@ var uu = br.exports;
|
|
|
4556
4571
|
String(O),
|
|
4557
4572
|
!0
|
|
4558
4573
|
)) : C.push("");
|
|
4559
|
-
return P.forEach(function(
|
|
4560
|
-
|
|
4574
|
+
return P.forEach(function(F) {
|
|
4575
|
+
F.match(/^\d+$/) || C.push(w(
|
|
4561
4576
|
l,
|
|
4562
4577
|
h,
|
|
4563
4578
|
b,
|
|
4564
4579
|
A,
|
|
4565
|
-
|
|
4580
|
+
F,
|
|
4566
4581
|
!0
|
|
4567
4582
|
));
|
|
4568
4583
|
}), C;
|
|
4569
4584
|
}
|
|
4570
4585
|
function w(l, h, b, A, P, C) {
|
|
4571
|
-
var O, k,
|
|
4572
|
-
if (
|
|
4586
|
+
var O, k, F;
|
|
4587
|
+
if (F = Object.getOwnPropertyDescriptor(h, P) || { value: h[P] }, F.get ? F.set ? k = l.stylize("[Getter/Setter]", "special") : k = l.stylize("[Getter]", "special") : F.set && (k = l.stylize("[Setter]", "special")), Re(A, P) || (O = "[" + P + "]"), k || (l.seen.indexOf(F.value) < 0 ? (D(b) ? k = c(l, F.value, null) : k = c(l, F.value, b - 1), k.indexOf(`
|
|
4573
4588
|
`) > -1 && (C ? k = k.split(`
|
|
4574
4589
|
`).map(function(Y) {
|
|
4575
4590
|
return " " + Y;
|
|
@@ -4604,10 +4619,10 @@ var uu = br.exports;
|
|
|
4604
4619
|
return typeof l == "boolean";
|
|
4605
4620
|
}
|
|
4606
4621
|
t.isBoolean = S;
|
|
4607
|
-
function
|
|
4622
|
+
function D(l) {
|
|
4608
4623
|
return l === null;
|
|
4609
4624
|
}
|
|
4610
|
-
t.isNull =
|
|
4625
|
+
t.isNull = D;
|
|
4611
4626
|
function H(l) {
|
|
4612
4627
|
return l == null;
|
|
4613
4628
|
}
|
|
@@ -4636,10 +4651,10 @@ var uu = br.exports;
|
|
|
4636
4651
|
return typeof l == "object" && l !== null;
|
|
4637
4652
|
}
|
|
4638
4653
|
t.isObject = ue;
|
|
4639
|
-
function
|
|
4654
|
+
function De(l) {
|
|
4640
4655
|
return ue(l) && Ie(l) === "[object Date]";
|
|
4641
4656
|
}
|
|
4642
|
-
t.isDate =
|
|
4657
|
+
t.isDate = De, t.types.isDate = De;
|
|
4643
4658
|
function Te(l) {
|
|
4644
4659
|
return ue(l) && (Ie(l) === "[object Error]" || l instanceof Error);
|
|
4645
4660
|
}
|
|
@@ -4659,7 +4674,7 @@ var uu = br.exports;
|
|
|
4659
4674
|
function Ze(l) {
|
|
4660
4675
|
return l < 10 ? "0" + l.toString(10) : l.toString(10);
|
|
4661
4676
|
}
|
|
4662
|
-
var
|
|
4677
|
+
var Fe = [
|
|
4663
4678
|
"Jan",
|
|
4664
4679
|
"Feb",
|
|
4665
4680
|
"Mar",
|
|
@@ -4679,7 +4694,7 @@ var uu = br.exports;
|
|
|
4679
4694
|
Ze(l.getMinutes()),
|
|
4680
4695
|
Ze(l.getSeconds())
|
|
4681
4696
|
].join(":");
|
|
4682
|
-
return [l.getDate(),
|
|
4697
|
+
return [l.getDate(), Fe[l.getMonth()], h].join(" ");
|
|
4683
4698
|
}
|
|
4684
4699
|
t.log = function() {
|
|
4685
4700
|
console.log("%s - %s", qt(), t.format.apply(t, arguments));
|
|
@@ -4708,17 +4723,17 @@ var uu = br.exports;
|
|
|
4708
4723
|
}), b;
|
|
4709
4724
|
}
|
|
4710
4725
|
function b() {
|
|
4711
|
-
for (var A, P, C = new Promise(function(
|
|
4712
|
-
A =
|
|
4726
|
+
for (var A, P, C = new Promise(function(F, Y) {
|
|
4727
|
+
A = F, P = Y;
|
|
4713
4728
|
}), O = [], k = 0; k < arguments.length; k++)
|
|
4714
4729
|
O.push(arguments[k]);
|
|
4715
|
-
O.push(function(
|
|
4716
|
-
|
|
4730
|
+
O.push(function(F, Y) {
|
|
4731
|
+
F ? P(F) : A(Y);
|
|
4717
4732
|
});
|
|
4718
4733
|
try {
|
|
4719
4734
|
h.apply(this, O);
|
|
4720
|
-
} catch (
|
|
4721
|
-
P(
|
|
4735
|
+
} catch (F) {
|
|
4736
|
+
P(F);
|
|
4722
4737
|
}
|
|
4723
4738
|
return C;
|
|
4724
4739
|
}
|
|
@@ -4984,8 +4999,8 @@ function yu(t) {
|
|
|
4984
4999
|
function m(...g) {
|
|
4985
5000
|
if (!m.enabled)
|
|
4986
5001
|
return;
|
|
4987
|
-
const S = m,
|
|
4988
|
-
S.diff = H, S.prev = f, S.curr =
|
|
5002
|
+
const S = m, D = Number(/* @__PURE__ */ new Date()), H = D - (f || D);
|
|
5003
|
+
S.diff = H, S.prev = f, S.curr = D, f = D, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
4989
5004
|
let ne = 0;
|
|
4990
5005
|
g[0] = g[0].replace(/%([a-zA-Z%])/g, (V, _) => {
|
|
4991
5006
|
if (V === "%%")
|
|
@@ -5339,7 +5354,7 @@ function z(t, e, r) {
|
|
|
5339
5354
|
this.emit("start"), this._readyQ.drain = Pn;
|
|
5340
5355
|
}, this._closeQ = kn(this, Vu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5341
5356
|
this.emit("close"), this._closeQ.drain = Pn;
|
|
5342
|
-
}, this._doStart = null, this._root = new Sr(this,
|
|
5357
|
+
}, this._doStart = null, this._root = new Sr(this, Du.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5343
5358
|
const s = this.pluginTree.start(null, i, o);
|
|
5344
5359
|
this._root.once("loaded", (a, u, d) => {
|
|
5345
5360
|
this.pluginTree.stop(s, d);
|
|
@@ -5359,7 +5374,7 @@ function z(t, e, r) {
|
|
|
5359
5374
|
this._readyQ.resume();
|
|
5360
5375
|
});
|
|
5361
5376
|
}
|
|
5362
|
-
function
|
|
5377
|
+
function Du(t, e, r) {
|
|
5363
5378
|
this._doStart = r, e.autostart && this.start();
|
|
5364
5379
|
}
|
|
5365
5380
|
_u(z, Tu);
|
|
@@ -5369,7 +5384,7 @@ z.prototype.start = function() {
|
|
|
5369
5384
|
z.prototype.override = function(t, e, r) {
|
|
5370
5385
|
return t;
|
|
5371
5386
|
};
|
|
5372
|
-
function
|
|
5387
|
+
function Fu(t) {
|
|
5373
5388
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
5374
5389
|
throw new ku(typeof t);
|
|
5375
5390
|
return t;
|
|
@@ -5384,7 +5399,7 @@ z.prototype._loadRegistered = function() {
|
|
|
5384
5399
|
};
|
|
5385
5400
|
Object.defineProperty(z.prototype, "then", { get: vi });
|
|
5386
5401
|
z.prototype._addPlugin = function(t, e, r) {
|
|
5387
|
-
if (t =
|
|
5402
|
+
if (t = Fu(t), e = e || {}, this.booted)
|
|
5388
5403
|
throw new Pu();
|
|
5389
5404
|
const n = this._current[0], i = new Sr(this, t, e, r);
|
|
5390
5405
|
if (i.once("start", (o, s, a) => {
|