@streamlayer/sdk-web 1.1.2 → 1.2.0
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 +7 -7
- package/lib/es/index.js +784 -737
- package/lib/index.d.ts +2 -1
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { pino as pi } from "pino";
|
|
2
|
-
import { QuestionType as F, QuestionStatus as
|
|
2
|
+
import { QuestionType as F, QuestionStatus as H, SilenceSetting as yi, PromotionType as Te } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
3
|
import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as D } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
5
|
import { InvitationCategory as Dr, InvitationFrom as Rr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
-
import { computed as gi, map as mi, atom as Ct, batched as
|
|
6
|
+
import { computed as gi, map as mi, atom as Ct, batched as Vr, onMount as nt } from "nanostores";
|
|
7
7
|
import { nanoid as nr } from "nanoid";
|
|
8
|
-
import { ConnectError as tt, Code as
|
|
8
|
+
import { ConnectError as tt, Code as oe, createContextKey as $r, createPromiseClient as Mr, createContextValues as vi } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as jr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Ur } from "@nanostores/query";
|
|
11
11
|
import { Events as bi } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as it } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as vr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
-
import { Feed as
|
|
14
|
+
import { Feed as re } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as wn } 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 Si } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
@@ -22,7 +22,7 @@ import { NotificationKind as he, NotificationType as qr } from "@streamlayer/sl-
|
|
|
22
22
|
function wi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var En = { exports: {} },
|
|
25
|
+
var En = { exports: {} }, $ = En.exports = {}, se, ae;
|
|
26
26
|
function ir() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
@@ -31,43 +31,43 @@ function or() {
|
|
|
31
31
|
}
|
|
32
32
|
(function() {
|
|
33
33
|
try {
|
|
34
|
-
typeof setTimeout == "function" ?
|
|
34
|
+
typeof setTimeout == "function" ? se = setTimeout : se = ir;
|
|
35
35
|
} catch {
|
|
36
|
-
|
|
36
|
+
se = ir;
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
typeof clearTimeout == "function" ?
|
|
39
|
+
typeof clearTimeout == "function" ? ae = clearTimeout : ae = or;
|
|
40
40
|
} catch {
|
|
41
|
-
|
|
41
|
+
ae = or;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
44
|
function In(t) {
|
|
45
|
-
if (
|
|
45
|
+
if (se === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
|
-
if ((
|
|
48
|
-
return
|
|
47
|
+
if ((se === ir || !se) && setTimeout)
|
|
48
|
+
return se = setTimeout, setTimeout(t, 0);
|
|
49
49
|
try {
|
|
50
|
-
return
|
|
50
|
+
return se(t, 0);
|
|
51
51
|
} catch {
|
|
52
52
|
try {
|
|
53
|
-
return
|
|
53
|
+
return se.call(null, t, 0);
|
|
54
54
|
} catch {
|
|
55
|
-
return
|
|
55
|
+
return se.call(this, t, 0);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function Ai(t) {
|
|
60
|
-
if (
|
|
60
|
+
if (ae === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
|
-
if ((
|
|
63
|
-
return
|
|
62
|
+
if ((ae === or || !ae) && clearTimeout)
|
|
63
|
+
return ae = clearTimeout, clearTimeout(t);
|
|
64
64
|
try {
|
|
65
|
-
return
|
|
65
|
+
return ae(t);
|
|
66
66
|
} catch {
|
|
67
67
|
try {
|
|
68
|
-
return
|
|
68
|
+
return ae.call(null, t);
|
|
69
69
|
} catch {
|
|
70
|
-
return
|
|
70
|
+
return ae.call(this, t);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -87,7 +87,7 @@ function Tn() {
|
|
|
87
87
|
_e = null, qe = !1, Ai(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
$.nextTick = function(t) {
|
|
91
91
|
var e = new Array(arguments.length - 1);
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
@@ -100,40 +100,40 @@ function On(t, e) {
|
|
|
100
100
|
On.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
$.title = "browser";
|
|
104
|
+
$.browser = !0;
|
|
105
|
+
$.env = {};
|
|
106
|
+
$.argv = [];
|
|
107
|
+
$.version = "";
|
|
108
|
+
$.versions = {};
|
|
109
109
|
function be() {
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
$.on = be;
|
|
112
|
+
$.addListener = be;
|
|
113
|
+
$.once = be;
|
|
114
|
+
$.off = be;
|
|
115
|
+
$.removeListener = be;
|
|
116
|
+
$.removeAllListeners = be;
|
|
117
|
+
$.emit = be;
|
|
118
|
+
$.prependListener = be;
|
|
119
|
+
$.prependOnceListener = be;
|
|
120
|
+
$.listeners = function(t) {
|
|
121
121
|
return [];
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
$.binding = function(t) {
|
|
124
124
|
throw new Error("process.binding is not supported");
|
|
125
125
|
};
|
|
126
|
-
|
|
126
|
+
$.cwd = function() {
|
|
127
127
|
return "/";
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
$.chdir = function(t) {
|
|
130
130
|
throw new Error("process.chdir is not supported");
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
$.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
135
|
var Ii = En.exports;
|
|
136
|
-
const
|
|
136
|
+
const A = /* @__PURE__ */ wi(Ii), Ti = pi({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -284,7 +284,7 @@ class Y extends kt {
|
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
const B = (t) => Ct(t);
|
|
287
|
-
class
|
|
287
|
+
class ce extends kt {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
290
290
|
super(e, `api:${r}`), this.atomStore = Ct(), n && e.subscribe((i) => {
|
|
@@ -479,7 +479,7 @@ class Di {
|
|
|
479
479
|
for await (const o of i)
|
|
480
480
|
this.attempt = 0, this.onData(o);
|
|
481
481
|
} catch (n) {
|
|
482
|
-
n instanceof tt && n.code !=
|
|
482
|
+
n instanceof tt && n.code != oe.Canceled && this.onStreamError(n);
|
|
483
483
|
}
|
|
484
484
|
})(), this.updateState(Z.Connected);
|
|
485
485
|
};
|
|
@@ -519,7 +519,7 @@ class Di {
|
|
|
519
519
|
*/
|
|
520
520
|
onStreamError = (e) => {
|
|
521
521
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
522
|
-
if (e instanceof tt && e.code !==
|
|
522
|
+
if (e instanceof tt && e.code !== oe.Canceled) {
|
|
523
523
|
this.updateState(Z.Failed), this.state.setValue("error", e), this.reconnect();
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
@@ -528,14 +528,14 @@ class Di {
|
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
530
|
const Ri = /* @__PURE__ */ new Set([
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
]), Qr = le("grpc:retry"),
|
|
531
|
+
oe.Unknown,
|
|
532
|
+
oe.Internal,
|
|
533
|
+
oe.DeadlineExceeded,
|
|
534
|
+
oe.ResourceExhausted,
|
|
535
|
+
oe.FailedPrecondition,
|
|
536
|
+
oe.Unavailable,
|
|
537
|
+
oe.DataLoss
|
|
538
|
+
]), Qr = le("grpc:retry"), Vi = (t) => async (e) => {
|
|
539
539
|
const r = e.contextValues.get(sr.retryAttempts), n = 300, i = e.contextValues.get(sr.retryDelay);
|
|
540
540
|
if (e.stream || r === 0)
|
|
541
541
|
return t(e);
|
|
@@ -552,9 +552,9 @@ const Ri = /* @__PURE__ */ new Set([
|
|
|
552
552
|
await new Promise((c) => setTimeout(c, f));
|
|
553
553
|
}
|
|
554
554
|
}, sr = {
|
|
555
|
-
retryAttempts:
|
|
556
|
-
retryDelay:
|
|
557
|
-
},
|
|
555
|
+
retryAttempts: $r(10, { description: "Number of attempts to retry" }),
|
|
556
|
+
retryDelay: $r(3e4, { description: "Max delay between retries in milliseconds" })
|
|
557
|
+
}, $i = () => {
|
|
558
558
|
const t = localStorage.getItem("sl-device-id");
|
|
559
559
|
if (t)
|
|
560
560
|
return t;
|
|
@@ -581,7 +581,7 @@ class Gr {
|
|
|
581
581
|
opts;
|
|
582
582
|
constructor(e, r) {
|
|
583
583
|
this.host = e, this.opts = r, this.$headers = new Le(te({
|
|
584
|
-
"sl-device-id":
|
|
584
|
+
"sl-device-id": $i(),
|
|
585
585
|
"sl-device-os": Mi()
|
|
586
586
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
587
587
|
const [n, i, o] = Ur({
|
|
@@ -652,9 +652,9 @@ class Gr {
|
|
|
652
652
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
653
653
|
return { client: i, createRequestOptions: (f) => {
|
|
654
654
|
const c = vi();
|
|
655
|
-
for (const
|
|
656
|
-
const
|
|
657
|
-
c.set(
|
|
655
|
+
for (const h in f) {
|
|
656
|
+
const l = sr[h];
|
|
657
|
+
c.set(l, f[h]);
|
|
658
658
|
}
|
|
659
659
|
return c;
|
|
660
660
|
}, queryKey: s, queryKeyStr: a.join("") };
|
|
@@ -679,7 +679,7 @@ class Gr {
|
|
|
679
679
|
n.header.set(o, i[o]);
|
|
680
680
|
return r(n);
|
|
681
681
|
};
|
|
682
|
-
this.interceptors.push(e), this.interceptors.push(Fi()), this.opts?.retryable && this.interceptors.push(
|
|
682
|
+
this.interceptors.push(e), this.interceptors.push(Fi()), this.opts?.retryable && this.interceptors.push(Vi);
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
685
|
const ji = (t, e) => {
|
|
@@ -786,10 +786,10 @@ var ge;
|
|
|
786
786
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
787
787
|
})(ge || (ge = {}));
|
|
788
788
|
const zi = (t) => {
|
|
789
|
-
const e = new Ue(), r = new Y(B(e.getExternalToken()), "userKey"), n = new Y(B(e.getToken()), "userToken"), i = new
|
|
789
|
+
const e = new Ue(), r = new Y(B(e.getExternalToken()), "userKey"), n = new Y(B(e.getToken()), "userToken"), i = new ce(Bi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, f) => {
|
|
790
790
|
if (!a)
|
|
791
791
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : f;
|
|
792
|
-
}), o = new
|
|
792
|
+
}), o = new ce(qi(n.getStore(), t), "userSettings");
|
|
793
793
|
return {
|
|
794
794
|
userKey: r,
|
|
795
795
|
userToken: n,
|
|
@@ -797,7 +797,7 @@ const zi = (t) => {
|
|
|
797
797
|
userSettings: o
|
|
798
798
|
};
|
|
799
799
|
}, Hi = (t) => {
|
|
800
|
-
const e = new Y(B(void 0), "providerStreamId"), r = new
|
|
800
|
+
const e = new Y(B(void 0), "providerStreamId"), r = new ce(ji(e.getStore(), t), "slStreamId", (i) => i?.data), n = new ce(Ui(r.getAtomStore(), t), "streamSettings");
|
|
801
801
|
return r.getAtomStore().listen((i) => {
|
|
802
802
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
803
803
|
}), {
|
|
@@ -806,7 +806,7 @@ const zi = (t) => {
|
|
|
806
806
|
streamSettings: n
|
|
807
807
|
};
|
|
808
808
|
}, Wi = (t) => {
|
|
809
|
-
const e = new Y(B(void 0), "enabled"), r = new Y(B(ge.DISABLED), "status"), n = new
|
|
809
|
+
const e = new Y(B(void 0), "enabled"), r = new Y(B(ge.DISABLED), "status"), n = new ce(Qi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ce(Gi(n.getAtomStore(), t), "organizationAdvertising"), o = zi(t), s = Hi(t);
|
|
810
810
|
return {
|
|
811
811
|
enabled: e,
|
|
812
812
|
status: r,
|
|
@@ -872,7 +872,7 @@ const Ji = (t, e, r) => {
|
|
|
872
872
|
}
|
|
873
873
|
});
|
|
874
874
|
}, eo = (t, e) => {
|
|
875
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
875
|
+
const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "get", params: [t] });
|
|
876
876
|
return e.nanoquery.createFetcherStore(n, {
|
|
877
877
|
fetcher: async (i, o, s) => (await r.get({
|
|
878
878
|
eventId: s
|
|
@@ -881,7 +881,7 @@ const Ji = (t, e, r) => {
|
|
|
881
881
|
dedupeTime: 1e3 * 60 * 60
|
|
882
882
|
});
|
|
883
883
|
}, to = (t, e) => {
|
|
884
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
884
|
+
const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "syncQuestion", params: [t] });
|
|
885
885
|
return e.nanoquery.createFetcherStore(n, {
|
|
886
886
|
fetcher: async (i, o, s) => s ? (await r.syncQuestion({
|
|
887
887
|
filter: {
|
|
@@ -892,31 +892,36 @@ const Ji = (t, e, r) => {
|
|
|
892
892
|
// 10 minutes
|
|
893
893
|
refetchInterval: 0
|
|
894
894
|
});
|
|
895
|
-
}, ro = (t, e) => {
|
|
896
|
-
const { client: r } = e.
|
|
895
|
+
}, ro = async (t, e) => {
|
|
896
|
+
const { client: r } = e.createPromiseClient(re, { method: "item", params: [t] });
|
|
897
|
+
return (await r.item({
|
|
898
|
+
id: t
|
|
899
|
+
})).data;
|
|
900
|
+
}, no = (t, e) => {
|
|
901
|
+
const { client: r } = e.createStreamClient(re), n = Ct({ eventId: t.get() || "", feedId: "" });
|
|
897
902
|
return t.subscribe((o = "") => {
|
|
898
903
|
n.set({ eventId: o, feedId: "" });
|
|
899
904
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
900
|
-
},
|
|
901
|
-
const { client: r } = e.createStreamClient(
|
|
905
|
+
}, io = (t, e) => {
|
|
906
|
+
const { client: r } = e.createStreamClient(re);
|
|
902
907
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
903
908
|
}, ar = (t, e) => {
|
|
904
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
909
|
+
const { client: r, queryKey: n } = e.createPromiseClient(re, { method: "questionByUser", params: [t] });
|
|
905
910
|
return e.nanoquery.createFetcherStore(n, {
|
|
906
911
|
fetcher: async (i, o, s) => (await r.questionByUser({
|
|
907
912
|
questionId: s
|
|
908
913
|
})).data?.attributes?.question,
|
|
909
914
|
dedupeTime: 1e3 * 60 * 5
|
|
910
915
|
});
|
|
911
|
-
},
|
|
916
|
+
}, oo = async (t, e) => {
|
|
912
917
|
if (!t)
|
|
913
918
|
return;
|
|
914
|
-
const { client: r } = e.createPromiseClient(
|
|
919
|
+
const { client: r } = e.createPromiseClient(re, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
|
|
915
920
|
id: t
|
|
916
921
|
});
|
|
917
922
|
return n.data?.attributes?.options?.options.case === "promotion" ? n.data?.attributes?.options?.options.value : void 0;
|
|
918
|
-
},
|
|
919
|
-
const { client: n, queryKey: i } = r.createPromiseClient(
|
|
923
|
+
}, so = (t, e, r) => {
|
|
924
|
+
const { client: n, queryKey: i } = r.createPromiseClient(re, {
|
|
920
925
|
method: "list",
|
|
921
926
|
params: [t, e]
|
|
922
927
|
});
|
|
@@ -925,14 +930,14 @@ const Ji = (t, e, r) => {
|
|
|
925
930
|
eventId: a,
|
|
926
931
|
filter: {
|
|
927
932
|
types: u === Ce.ALLOWED ? [] : [F.FACTOID, F.PROMOTION, F.TWEET],
|
|
928
|
-
statuses: [
|
|
933
|
+
statuses: [H.ACTIVE, H.RESOLVED]
|
|
929
934
|
}
|
|
930
935
|
})).data : [],
|
|
931
936
|
dedupeTime: 0,
|
|
932
937
|
refetchInterval: 0
|
|
933
938
|
});
|
|
934
|
-
},
|
|
935
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
939
|
+
}, ao = (t, e) => {
|
|
940
|
+
const { client: r, queryKey: n } = e.createPromiseClient(re, {
|
|
936
941
|
method: "list",
|
|
937
942
|
params: [t]
|
|
938
943
|
});
|
|
@@ -941,7 +946,7 @@ const Ji = (t, e, r) => {
|
|
|
941
946
|
eventId: s,
|
|
942
947
|
filter: {
|
|
943
948
|
types: [F.PROMOTION],
|
|
944
|
-
statuses: [
|
|
949
|
+
statuses: [H.ACTIVE]
|
|
945
950
|
}
|
|
946
951
|
})).data.map(({ attributes: u }) => {
|
|
947
952
|
if (!(!u || u.attributes.case !== "promotion"))
|
|
@@ -953,28 +958,28 @@ const Ji = (t, e, r) => {
|
|
|
953
958
|
dedupeTime: 0,
|
|
954
959
|
refetchInterval: 0
|
|
955
960
|
});
|
|
956
|
-
},
|
|
957
|
-
const n =
|
|
961
|
+
}, uo = (t, e, r) => {
|
|
962
|
+
const n = Vr([e, r], () => {
|
|
958
963
|
const a = e.get();
|
|
959
964
|
if (!a)
|
|
960
965
|
return;
|
|
961
966
|
const u = r.get().data?.find((c) => c.id === a?.questionId), f = a?.question?.openedFrom;
|
|
962
967
|
return u ? (u.openedFrom = f, u) : a.question;
|
|
963
|
-
}), i =
|
|
968
|
+
}), i = Vr(n, (a) => a && a.type === "question" ? a.id : void 0), o = ar(i, t);
|
|
964
969
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
965
|
-
const u = o.get().data, f = (c,
|
|
966
|
-
if (!c || !
|
|
967
|
-
return c ||
|
|
968
|
-
const
|
|
969
|
-
for (let
|
|
970
|
-
|
|
971
|
-
...c[
|
|
972
|
-
...
|
|
973
|
-
correct: c[
|
|
974
|
-
youVoted: c[
|
|
975
|
-
pointsEarned: c[
|
|
970
|
+
const u = o.get().data, f = (c, h) => {
|
|
971
|
+
if (!c || !h)
|
|
972
|
+
return c || h || [];
|
|
973
|
+
const l = [];
|
|
974
|
+
for (let g = 0; g < c.length; g++)
|
|
975
|
+
l.push({
|
|
976
|
+
...c[g],
|
|
977
|
+
...h[g],
|
|
978
|
+
correct: c[g].correct,
|
|
979
|
+
youVoted: c[g].youVoted,
|
|
980
|
+
pointsEarned: c[g].pointsEarned
|
|
976
981
|
});
|
|
977
|
-
return
|
|
982
|
+
return l;
|
|
978
983
|
};
|
|
979
984
|
o.mutate({
|
|
980
985
|
...a,
|
|
@@ -989,7 +994,7 @@ var St;
|
|
|
989
994
|
(function(t) {
|
|
990
995
|
t.SHOWED = "showed";
|
|
991
996
|
})(St || (St = {}));
|
|
992
|
-
class
|
|
997
|
+
class co extends He {
|
|
993
998
|
constructor() {
|
|
994
999
|
super("advertisement");
|
|
995
1000
|
}
|
|
@@ -998,7 +1003,7 @@ class uo extends He {
|
|
|
998
1003
|
};
|
|
999
1004
|
isShowed = (e) => this.read(St.SHOWED, e);
|
|
1000
1005
|
}
|
|
1001
|
-
class
|
|
1006
|
+
class lo {
|
|
1002
1007
|
advertisementList;
|
|
1003
1008
|
store;
|
|
1004
1009
|
timeouts;
|
|
@@ -1080,76 +1085,111 @@ class co {
|
|
|
1080
1085
|
this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.advertisementList.off(), this.advertisementList.set(/* @__PURE__ */ new Map());
|
|
1081
1086
|
};
|
|
1082
1087
|
}
|
|
1083
|
-
const
|
|
1084
|
-
const n = le("advertisement_queue"),
|
|
1088
|
+
const fo = (t, e, r) => {
|
|
1089
|
+
const n = r.transport, i = le("advertisement_queue"), o = new lo({ concurrency: 1, animationDelay: 1e3 }), s = new co(), a = new ce(ao(t, n), "gamification:promotionList"), u = (l, g) => {
|
|
1085
1090
|
J.emit("advertisement", {
|
|
1086
1091
|
action: "received",
|
|
1087
1092
|
payload: {
|
|
1088
1093
|
advertisementId: l,
|
|
1089
|
-
advertisementType:
|
|
1094
|
+
advertisementType: g?.type
|
|
1090
1095
|
}
|
|
1091
|
-
}),
|
|
1096
|
+
}), o.addToQueue({
|
|
1092
1097
|
id: l,
|
|
1093
1098
|
autoHideDuration: 1 / 0,
|
|
1094
1099
|
data: te({ loading: !1, error: void 0, data: void 0 }),
|
|
1100
|
+
close: () => c(l),
|
|
1095
1101
|
promise: async function() {
|
|
1096
1102
|
this.data.setKey("loading", !0);
|
|
1097
1103
|
try {
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1100
|
-
} catch (
|
|
1101
|
-
this.data.setKey("error",
|
|
1104
|
+
const v = g || await oo(l, n);
|
|
1105
|
+
v ? this.data.setKey("data", v) : this.data.setKey("error", new Error("No promotion found"));
|
|
1106
|
+
} catch (v) {
|
|
1107
|
+
this.data.setKey("error", v);
|
|
1102
1108
|
} finally {
|
|
1103
1109
|
this.data.setKey("loading", !1);
|
|
1104
1110
|
}
|
|
1105
1111
|
}
|
|
1106
1112
|
});
|
|
1107
|
-
}, u = (l) => {
|
|
1108
|
-
n.debug({ notificationId: l }, "markAsViewed: %o"), o.setShowed(l);
|
|
1109
1113
|
}, f = (l) => {
|
|
1110
|
-
i.
|
|
1114
|
+
i.debug({ notificationId: l }, "markAsViewed: %o"), s.setShowed(l);
|
|
1111
1115
|
}, c = (l) => {
|
|
1112
|
-
|
|
1113
|
-
|
|
1116
|
+
o.closeAdvertisement(l), f(l), r.sdk.onAdvertisementActivate({
|
|
1117
|
+
stage: "deactivate",
|
|
1118
|
+
id: l
|
|
1119
|
+
});
|
|
1120
|
+
}, h = (l) => {
|
|
1121
|
+
const g = o.advertisementList.get();
|
|
1122
|
+
if (!g?.size)
|
|
1114
1123
|
return null;
|
|
1115
|
-
const
|
|
1116
|
-
return !l &&
|
|
1124
|
+
const v = g.values().next().value, w = v.data.get();
|
|
1125
|
+
return !l && s.isShowed(v.id) ? (o.removeFromList(v.id), h(l)) : (!w.data && !w.error && !w.loading && v.promise(), J.emit("advertisement", {
|
|
1117
1126
|
action: "opened",
|
|
1118
1127
|
payload: {
|
|
1119
|
-
advertisementId:
|
|
1120
|
-
advertisementType:
|
|
1128
|
+
advertisementId: v.id,
|
|
1129
|
+
advertisementType: w.data?.type
|
|
1121
1130
|
}
|
|
1122
|
-
}),
|
|
1131
|
+
}), v);
|
|
1123
1132
|
};
|
|
1124
|
-
return
|
|
1125
|
-
|
|
1133
|
+
return a.subscribe((l) => {
|
|
1134
|
+
if (l.data) {
|
|
1135
|
+
const g = l.data[l.data.length - 1];
|
|
1136
|
+
g && r.sdk.onAdvertisementActivate({
|
|
1137
|
+
stage: "activate",
|
|
1138
|
+
id: g.id,
|
|
1139
|
+
isShowed: !!s.isShowed(g.id)
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
}), e.addListener("promotion cb", (l) => {
|
|
1143
|
+
const g = l.data?.attributes?.feedItem?.attributes?.attributes?.case === "promotion" ? l.data.attributes.feedItem.attributes : void 0, v = l.data?.attributes?.question?.options?.options.case === "promotion" ? l.data.attributes.question.options.options.value : void 0;
|
|
1144
|
+
if (g === void 0 || v === void 0) {
|
|
1145
|
+
i.debug("not promotion");
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
if (g.status === H.RESOLVED) {
|
|
1149
|
+
r.sdk.onAdvertisementActivate({
|
|
1150
|
+
stage: "deactivate",
|
|
1151
|
+
id: g.id
|
|
1152
|
+
}), i.debug({ feedItem: g }, "resolved: %o");
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1155
|
+
if (g.status === H.ACTIVE) {
|
|
1156
|
+
i.debug({ feedItem: g }, "active: %o"), r.sdk.onAdvertisementActivate({
|
|
1157
|
+
stage: "activate",
|
|
1158
|
+
id: g.id,
|
|
1159
|
+
isShowed: !!s.isShowed(g.id)
|
|
1160
|
+
});
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
i.debug({ feedItem: g }, "skip: %o");
|
|
1164
|
+
}), nt(o.advertisementList, () => {
|
|
1165
|
+
a.subscribe((l) => {
|
|
1126
1166
|
if (l.data) {
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1167
|
+
const g = l.data[l.data.length - 1];
|
|
1168
|
+
g && u(g.id);
|
|
1129
1169
|
}
|
|
1130
1170
|
}), e.addListener("promotion", (l) => {
|
|
1131
|
-
const
|
|
1132
|
-
if (
|
|
1133
|
-
|
|
1171
|
+
const g = l.data?.attributes?.feedItem?.attributes?.attributes?.case === "promotion" ? l.data.attributes.feedItem.attributes : void 0, v = l.data?.attributes?.question?.options?.options.case === "promotion" ? l.data.attributes.question.options.options.value : void 0;
|
|
1172
|
+
if (g === void 0 || v === void 0) {
|
|
1173
|
+
i.debug("not promotion");
|
|
1134
1174
|
return;
|
|
1135
1175
|
}
|
|
1136
|
-
if (
|
|
1137
|
-
|
|
1176
|
+
if (g.status === H.RESOLVED) {
|
|
1177
|
+
c(g.id), i.debug({ feedItem: g }, "resolved: %o");
|
|
1138
1178
|
return;
|
|
1139
1179
|
}
|
|
1140
|
-
if (
|
|
1141
|
-
|
|
1180
|
+
if (g.status === H.ACTIVE) {
|
|
1181
|
+
i.debug({ feedItem: g }, "active: %o"), u(g.id, v);
|
|
1142
1182
|
return;
|
|
1143
1183
|
}
|
|
1144
|
-
|
|
1184
|
+
i.debug({ feedItem: g }, "skip: %o");
|
|
1145
1185
|
});
|
|
1146
|
-
}), { hide:
|
|
1186
|
+
}), { hide: c, show: u, $list: o.advertisementList, getActiveAdvertisement: h };
|
|
1147
1187
|
};
|
|
1148
1188
|
var Ce;
|
|
1149
1189
|
(function(t) {
|
|
1150
1190
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1151
1191
|
})(Ce || (Ce = {}));
|
|
1152
|
-
class
|
|
1192
|
+
class ho {
|
|
1153
1193
|
/** sl event id */
|
|
1154
1194
|
slStreamId;
|
|
1155
1195
|
/** organization id */
|
|
@@ -1182,13 +1222,13 @@ class fo {
|
|
|
1182
1222
|
transport;
|
|
1183
1223
|
cancels = /* @__PURE__ */ new Set();
|
|
1184
1224
|
constructor(e) {
|
|
1185
|
-
this.transport = e.transport, this.log = le("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new Y(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new Y(B(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Y(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new
|
|
1186
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
1225
|
+
this.transport = e.transport, this.log = le("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new Y(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new Y(B(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new Y(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ce(eo(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ce(so(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = to(this.slStreamId, e.transport), this.openedQuestion = uo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
1226
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = io(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
1187
1227
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
1188
1228
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1189
|
-
})), this.feedSubscription =
|
|
1229
|
+
})), this.feedSubscription = no(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1190
1230
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
1191
|
-
!i || i.type === F.PROMOTION || n && i.status ===
|
|
1231
|
+
!i || i.type === F.PROMOTION || n && i.status === H.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes);
|
|
1192
1232
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
1193
1233
|
window.requestAnimationFrame(() => {
|
|
1194
1234
|
r.data?.attributes?.question === void 0 && r.data?.attributes?.moderation && this.moderation.invalidate();
|
|
@@ -1201,7 +1241,7 @@ class fo {
|
|
|
1201
1241
|
this.activeQuestionId.off();
|
|
1202
1242
|
for (const r of this.cancels)
|
|
1203
1243
|
r(), this.cancels.delete(r);
|
|
1204
|
-
}), this.advertisement =
|
|
1244
|
+
}), this.advertisement = fo(this.slStreamId, this.feedSubscription, e);
|
|
1205
1245
|
}
|
|
1206
1246
|
/**
|
|
1207
1247
|
* Get id for notifications and link with current session
|
|
@@ -1231,7 +1271,7 @@ class fo {
|
|
|
1231
1271
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1232
1272
|
};
|
|
1233
1273
|
}
|
|
1234
|
-
class
|
|
1274
|
+
class po {
|
|
1235
1275
|
notificationsList;
|
|
1236
1276
|
store;
|
|
1237
1277
|
timeouts;
|
|
@@ -1316,7 +1356,7 @@ var wt;
|
|
|
1316
1356
|
(function(t) {
|
|
1317
1357
|
t.OPENED = "opened";
|
|
1318
1358
|
})(wt || (wt = {}));
|
|
1319
|
-
class
|
|
1359
|
+
class yo extends He {
|
|
1320
1360
|
constructor() {
|
|
1321
1361
|
super("notification");
|
|
1322
1362
|
}
|
|
@@ -1332,11 +1372,11 @@ var Ae;
|
|
|
1332
1372
|
(function(t) {
|
|
1333
1373
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1334
1374
|
})(Ae || (Ae = {}));
|
|
1335
|
-
class
|
|
1375
|
+
class go {
|
|
1336
1376
|
queue;
|
|
1337
1377
|
storage;
|
|
1338
1378
|
constructor(e = {}) {
|
|
1339
|
-
this.storage = new
|
|
1379
|
+
this.storage = new yo(), this.queue = new po({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1340
1380
|
}
|
|
1341
1381
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1342
1382
|
add = (e) => {
|
|
@@ -1373,8 +1413,8 @@ class yo {
|
|
|
1373
1413
|
this.storage.setOpened(e);
|
|
1374
1414
|
};
|
|
1375
1415
|
}
|
|
1376
|
-
const
|
|
1377
|
-
t.notifications = new
|
|
1416
|
+
const mo = (t, e, r) => {
|
|
1417
|
+
t.notifications = new go(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1378
1418
|
t.notifications.queue.drain();
|
|
1379
1419
|
}), r();
|
|
1380
1420
|
};
|
|
@@ -1382,22 +1422,22 @@ var rt;
|
|
|
1382
1422
|
(function(t) {
|
|
1383
1423
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1384
1424
|
})(rt || (rt = {}));
|
|
1385
|
-
const
|
|
1386
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1425
|
+
const vo = async (t, e) => {
|
|
1426
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1387
1427
|
try {
|
|
1388
1428
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1389
1429
|
} catch (o) {
|
|
1390
|
-
throw tt.from(o)?.code ===
|
|
1430
|
+
throw tt.from(o)?.code === oe.AlreadyExists ? new Error(rt.ALREADY_VOTED) : new Error(rt.UNKNOWN);
|
|
1391
1431
|
}
|
|
1392
|
-
},
|
|
1393
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1432
|
+
}, bo = (t, e) => {
|
|
1433
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(re, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1394
1434
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1395
1435
|
};
|
|
1396
1436
|
var Be;
|
|
1397
1437
|
(function(t) {
|
|
1398
1438
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1399
1439
|
})(Be || (Be = {}));
|
|
1400
|
-
class
|
|
1440
|
+
class So extends He {
|
|
1401
1441
|
constructor() {
|
|
1402
1442
|
super("gamification-session", window.sessionStorage);
|
|
1403
1443
|
}
|
|
@@ -1409,7 +1449,7 @@ class bo extends He {
|
|
|
1409
1449
|
class Pn extends He {
|
|
1410
1450
|
sessionStorage;
|
|
1411
1451
|
constructor() {
|
|
1412
|
-
super("gamification"), this.sessionStorage = new
|
|
1452
|
+
super("gamification"), this.sessionStorage = new So();
|
|
1413
1453
|
}
|
|
1414
1454
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1415
1455
|
this.write(Be.ONBOARDING, n, e, r, i);
|
|
@@ -1420,24 +1460,24 @@ class Pn extends He {
|
|
|
1420
1460
|
};
|
|
1421
1461
|
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Be.ONBOARDING_IO, n, e, r]);
|
|
1422
1462
|
}
|
|
1423
|
-
const
|
|
1463
|
+
const wo = {
|
|
1424
1464
|
pageSize: 10
|
|
1425
|
-
},
|
|
1465
|
+
}, Ao = (t, e, r, n, i) => {
|
|
1426
1466
|
let o = 0;
|
|
1427
|
-
const s = B({ pageSize:
|
|
1467
|
+
const s = B({ pageSize: wo.pageSize, page: 0 }), a = te({
|
|
1428
1468
|
data: [],
|
|
1429
1469
|
key: Date.now(),
|
|
1430
1470
|
hasMore: !0,
|
|
1431
1471
|
loading: void 0,
|
|
1432
1472
|
error: void 0
|
|
1433
1473
|
}), u = Xi(t), f = async () => {
|
|
1434
|
-
const
|
|
1435
|
-
if (
|
|
1474
|
+
const l = e.get(), g = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1475
|
+
if (l && g?.length) {
|
|
1436
1476
|
const v = r.get();
|
|
1437
|
-
v &&
|
|
1477
|
+
v && g.push(v), a.setKey("loading", !0), a.setKey("data", []);
|
|
1438
1478
|
const b = await u({
|
|
1439
|
-
eventId:
|
|
1440
|
-
usersIds:
|
|
1479
|
+
eventId: l,
|
|
1480
|
+
usersIds: g
|
|
1441
1481
|
});
|
|
1442
1482
|
a.set({
|
|
1443
1483
|
data: b.data.map((L, R) => ({
|
|
@@ -1451,18 +1491,18 @@ const So = {
|
|
|
1451
1491
|
}
|
|
1452
1492
|
}, c = () => {
|
|
1453
1493
|
f();
|
|
1454
|
-
},
|
|
1455
|
-
const
|
|
1456
|
-
v <= o && s.set({ ...
|
|
1494
|
+
}, h = (l) => {
|
|
1495
|
+
const g = s.get(), v = l || g.page + 1;
|
|
1496
|
+
v <= o && s.set({ ...g, page: v });
|
|
1457
1497
|
};
|
|
1458
1498
|
return nt(a, () => {
|
|
1459
|
-
const
|
|
1499
|
+
const l = e.listen(f), g = n.listen(f);
|
|
1460
1500
|
return () => {
|
|
1461
|
-
|
|
1501
|
+
l(), g();
|
|
1462
1502
|
};
|
|
1463
|
-
}), { $store: a, fetchMore:
|
|
1503
|
+
}), { $store: a, fetchMore: h, invalidate: c };
|
|
1464
1504
|
};
|
|
1465
|
-
class
|
|
1505
|
+
class Eo extends He {
|
|
1466
1506
|
get = this.read;
|
|
1467
1507
|
set = this.write;
|
|
1468
1508
|
del = this.remove;
|
|
@@ -1470,12 +1510,12 @@ class Ao extends He {
|
|
|
1470
1510
|
super("deep-link-context", window.sessionStorage);
|
|
1471
1511
|
}
|
|
1472
1512
|
}
|
|
1473
|
-
const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid",
|
|
1513
|
+
const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Io = /* @__PURE__ */ new Set([Pt, Nn, Fn]), zr = (t) => {
|
|
1474
1514
|
const e = {}, r = {};
|
|
1475
1515
|
for (const [n, i] of t)
|
|
1476
|
-
|
|
1516
|
+
Io.has(n) ? e[n] = i : r[n] = i;
|
|
1477
1517
|
return { result: e, remain: r };
|
|
1478
|
-
},
|
|
1518
|
+
}, To = ({ hash: t, search: e }) => {
|
|
1479
1519
|
if (t && t.includes(Kr)) {
|
|
1480
1520
|
const r = new URLSearchParams(t.substr(1));
|
|
1481
1521
|
return { hash: zr(r) };
|
|
@@ -1485,43 +1525,43 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Eo = /*
|
|
|
1485
1525
|
return { search: zr(r) };
|
|
1486
1526
|
}
|
|
1487
1527
|
return null;
|
|
1488
|
-
}, Hr = le("deep_link"),
|
|
1528
|
+
}, Hr = le("deep_link"), ue = {
|
|
1489
1529
|
debug: (...t) => {
|
|
1490
1530
|
Hr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1491
1531
|
},
|
|
1492
1532
|
trace: (...t) => {
|
|
1493
1533
|
Hr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1494
1534
|
}
|
|
1495
|
-
},
|
|
1535
|
+
}, Oo = (t, e) => {
|
|
1496
1536
|
const { hash: r, search: n } = window.location;
|
|
1497
|
-
if (
|
|
1498
|
-
const i =
|
|
1499
|
-
if (
|
|
1537
|
+
if (ue.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1538
|
+
const i = To({ hash: r, search: n });
|
|
1539
|
+
if (ue.debug(i, "parse deep link result"), i) {
|
|
1500
1540
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1501
1541
|
if (Object.keys(a).length !== 0) {
|
|
1502
1542
|
t.setValue("data", a);
|
|
1503
1543
|
const f = Object.keys(u).length !== 0;
|
|
1504
1544
|
if (o) {
|
|
1505
1545
|
let c = "";
|
|
1506
|
-
f && (c = `#${new URLSearchParams(u).toString()}`,
|
|
1546
|
+
f && (c = `#${new URLSearchParams(u).toString()}`, ue.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
|
|
1507
1547
|
}
|
|
1508
1548
|
if (s) {
|
|
1509
1549
|
let c = "";
|
|
1510
|
-
f && (c = `?${new URLSearchParams(u).toString()}`,
|
|
1550
|
+
f && (c = `?${new URLSearchParams(u).toString()}`, ue.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
|
|
1511
1551
|
}
|
|
1512
1552
|
e(a);
|
|
1513
1553
|
}
|
|
1514
1554
|
}
|
|
1515
1555
|
}
|
|
1516
1556
|
t.setValue("parsed", !0);
|
|
1517
|
-
},
|
|
1518
|
-
const n = new
|
|
1557
|
+
}, _o = (t, e, r) => {
|
|
1558
|
+
const n = new Eo(), i = n.get("sl-deep-link-store");
|
|
1519
1559
|
let o = {};
|
|
1520
1560
|
if (i)
|
|
1521
1561
|
try {
|
|
1522
1562
|
o = JSON.parse(i);
|
|
1523
1563
|
} catch (a) {
|
|
1524
|
-
|
|
1564
|
+
ue.debug(a);
|
|
1525
1565
|
}
|
|
1526
1566
|
t.deepLink = {
|
|
1527
1567
|
$store: new Le(te(o), "deep-link-context"),
|
|
@@ -1531,7 +1571,7 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Eo = /*
|
|
|
1531
1571
|
},
|
|
1532
1572
|
// we are logged in with inviter id
|
|
1533
1573
|
deepLinkUsed: (a) => {
|
|
1534
|
-
|
|
1574
|
+
ue.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
|
|
1535
1575
|
},
|
|
1536
1576
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1537
1577
|
}, t.sdk.getInviter = () => {
|
|
@@ -1540,22 +1580,22 @@ const Kr = "sldl", Pt = "sldl_uid", Nn = "sldl_eid", Fn = "sldl_e_eid", Eo = /*
|
|
|
1540
1580
|
}, t.sdk.inviteDisplayed = () => {
|
|
1541
1581
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1542
1582
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
1543
|
-
localStorage.getItem("SL_DEBUG") &&
|
|
1583
|
+
localStorage.getItem("SL_DEBUG") && ue.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
|
|
1544
1584
|
}, e.onDeepLinkHandled && t.sdk.addDeepLinkHandler(e.onDeepLinkHandled), t.sdk.removeDeepLinkHandler = (a) => {
|
|
1545
|
-
|
|
1585
|
+
ue.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
|
|
1546
1586
|
};
|
|
1547
1587
|
const s = (a) => {
|
|
1548
|
-
t.deepLink.$store.setValue("handled", !0),
|
|
1588
|
+
t.deepLink.$store.setValue("handled", !0), ue.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
|
|
1549
1589
|
for (const u of t.deepLink.onDeepLinkHandlers)
|
|
1550
1590
|
try {
|
|
1551
|
-
|
|
1591
|
+
ue.trace("called handler"), u(a);
|
|
1552
1592
|
} catch (f) {
|
|
1553
1593
|
console.error(f);
|
|
1554
1594
|
}
|
|
1555
1595
|
};
|
|
1556
|
-
|
|
1557
|
-
},
|
|
1558
|
-
class
|
|
1596
|
+
Oo(t.deepLink.$store, s), r();
|
|
1597
|
+
}, Lo = le("bypass");
|
|
1598
|
+
class Co extends Ci {
|
|
1559
1599
|
$coreStore;
|
|
1560
1600
|
deepLink;
|
|
1561
1601
|
transport;
|
|
@@ -1573,7 +1613,7 @@ class Lo extends Ci {
|
|
|
1573
1613
|
login = async (e, r) => {
|
|
1574
1614
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1575
1615
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
|
|
1576
|
-
|
|
1616
|
+
Lo.debug({ inviterKey: o }, "login with inviterKey");
|
|
1577
1617
|
const s = await this.bypassLogin({
|
|
1578
1618
|
schema: e,
|
|
1579
1619
|
userKey: r,
|
|
@@ -1642,8 +1682,8 @@ class Lo extends Ci {
|
|
|
1642
1682
|
});
|
|
1643
1683
|
};
|
|
1644
1684
|
}
|
|
1645
|
-
const Je = new Ue(),
|
|
1646
|
-
t.auth = new
|
|
1685
|
+
const Je = new Ue(), ko = (t, e, r) => {
|
|
1686
|
+
t.auth = new Co(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1647
1687
|
n === ge.READY && t.auth.reLogin();
|
|
1648
1688
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1649
1689
|
if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1662,7 +1702,7 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1662
1702
|
trace: (...t) => {
|
|
1663
1703
|
Wr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1664
1704
|
}
|
|
1665
|
-
},
|
|
1705
|
+
}, Po = (t, e, r) => {
|
|
1666
1706
|
t.videoPlayer = {
|
|
1667
1707
|
controllers: /* @__PURE__ */ new Set()
|
|
1668
1708
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1680,7 +1720,13 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1680
1720
|
}
|
|
1681
1721
|
}
|
|
1682
1722
|
}, r();
|
|
1683
|
-
},
|
|
1723
|
+
}, No = (t, e, r) => {
|
|
1724
|
+
t.ui = {
|
|
1725
|
+
state: /* @__PURE__ */ new Set()
|
|
1726
|
+
}, e.onContentActivate && (t.ui.onContentActivate = e.onContentActivate), t.sdk.onAdvertisementActivate = (n) => {
|
|
1727
|
+
t.ui.onContentActivate && t.ui.onContentActivate({ ...n, type: "advertisement" });
|
|
1728
|
+
}, r();
|
|
1729
|
+
}, Fo = (t, e, r) => {
|
|
1684
1730
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1685
1731
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1686
1732
|
if (i.has(s)) {
|
|
@@ -1707,7 +1753,7 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1707
1753
|
}, t.sdk.createEventSession = (s) => {
|
|
1708
1754
|
t.stores.providerStreamId.setValue(s);
|
|
1709
1755
|
}, r();
|
|
1710
|
-
},
|
|
1756
|
+
}, Do = (t, e) => {
|
|
1711
1757
|
const { client: r, queryKey: n } = t.createPromiseClient(it, {
|
|
1712
1758
|
method: "generateDeepLink",
|
|
1713
1759
|
params: e
|
|
@@ -1728,7 +1774,7 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1728
1774
|
// 24 hours
|
|
1729
1775
|
refetchInterval: 0
|
|
1730
1776
|
});
|
|
1731
|
-
},
|
|
1777
|
+
}, Ro = (t, { web: e, mobile: r }) => {
|
|
1732
1778
|
const { client: n } = t.createPromiseClient(Si, { method: "generate" });
|
|
1733
1779
|
return n.generate({ web: e, mobile: r });
|
|
1734
1780
|
}, Yr = (t, e) => {
|
|
@@ -1736,21 +1782,21 @@ const Je = new Ue(), Co = (t, e, r) => {
|
|
|
1736
1782
|
for (const [n, i] of Object.entries(e))
|
|
1737
1783
|
r.append(n, i);
|
|
1738
1784
|
return r.toString();
|
|
1739
|
-
},
|
|
1785
|
+
}, Vo = (t, e, r, n) => {
|
|
1740
1786
|
const i = te({});
|
|
1741
|
-
return nt(i, () =>
|
|
1742
|
-
const c = u ? "https://masters.com" : a?.url,
|
|
1743
|
-
[Pt]:
|
|
1744
|
-
[Nn]:
|
|
1745
|
-
[Fn]:
|
|
1787
|
+
return nt(i, () => Do(t, [e, r]).subscribe(async ({ data: a, error: u, loading: f }) => {
|
|
1788
|
+
const c = u ? "https://masters.com" : a?.url, h = n.get() || "", l = e.get() || "", g = r.get() || "", v = {
|
|
1789
|
+
[Pt]: h,
|
|
1790
|
+
[Nn]: l,
|
|
1791
|
+
[Fn]: g
|
|
1746
1792
|
};
|
|
1747
1793
|
if (!f && c) {
|
|
1748
1794
|
i.setKey("loading", !0);
|
|
1749
|
-
let
|
|
1750
|
-
|
|
1751
|
-
const L = window.location.origin + window.location.pathname +
|
|
1795
|
+
let w = window.location.search, b = window.location.hash;
|
|
1796
|
+
w && b || b ? w = `?${Yr(w, v)}` : b = `#${Yr("", v)}`;
|
|
1797
|
+
const L = window.location.origin + window.location.pathname + w + b;
|
|
1752
1798
|
try {
|
|
1753
|
-
const R = await
|
|
1799
|
+
const R = await Ro(t, { web: L, mobile: c });
|
|
1754
1800
|
i.set({
|
|
1755
1801
|
data: R.data?.link,
|
|
1756
1802
|
loading: !1
|
|
@@ -1770,7 +1816,7 @@ var U;
|
|
|
1770
1816
|
(function(t) {
|
|
1771
1817
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1772
1818
|
})(U || (U = {}));
|
|
1773
|
-
const
|
|
1819
|
+
const $o = (t, e, r, n) => {
|
|
1774
1820
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1775
1821
|
i && r.add({
|
|
1776
1822
|
type: Ae.ONBOARDING,
|
|
@@ -1802,23 +1848,23 @@ const Ro = (t, e, r, n) => {
|
|
|
1802
1848
|
eventId: e.slStreamId.get() || ""
|
|
1803
1849
|
}) === U.Completed) {
|
|
1804
1850
|
t.set(U.Completed);
|
|
1805
|
-
for (const
|
|
1806
|
-
|
|
1851
|
+
for (const l of o)
|
|
1852
|
+
l();
|
|
1807
1853
|
return;
|
|
1808
1854
|
}
|
|
1809
1855
|
const u = e.moderation.getStore().value?.data, f = r.featureSettings.get().inplayGame;
|
|
1810
1856
|
if (u === void 0 || f === void 0)
|
|
1811
1857
|
return;
|
|
1812
|
-
const c = u?.options?.onboardingEnabled,
|
|
1813
|
-
c ?
|
|
1858
|
+
const c = u?.options?.onboardingEnabled, h = f?.titleCard?.optIn;
|
|
1859
|
+
c ? h ? t.set(U.Required) : t.set(U.Optional) : (h ? t.set(U.Unavailable) : t.set(U.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
1814
1860
|
} catch (s) {
|
|
1815
1861
|
console.error(s);
|
|
1816
1862
|
}
|
|
1817
|
-
},
|
|
1863
|
+
}, Mo = (t, e, r, n) => {
|
|
1818
1864
|
let i = !1;
|
|
1819
1865
|
const o = new Pn(), s = B(U.Unset);
|
|
1820
1866
|
s.subscribe((f) => {
|
|
1821
|
-
f !== U.Unset && ((f === U.Optional || f === U.Required) && i === !1 && (
|
|
1867
|
+
f !== U.Unset && ((f === U.Optional || f === U.Required) && i === !1 && ($o(t, e, n, o), i = !0), f === U.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1822
1868
|
userId: e.userId.get() || "",
|
|
1823
1869
|
organizationId: e.organizationId.get() || "",
|
|
1824
1870
|
eventId: e.slStreamId.get() || ""
|
|
@@ -1834,7 +1880,7 @@ const Ro = (t, e, r, n) => {
|
|
|
1834
1880
|
}))), { $store: s, submitInplay: async () => {
|
|
1835
1881
|
const f = e.slStreamId.get();
|
|
1836
1882
|
if (f) {
|
|
1837
|
-
await
|
|
1883
|
+
await bo(r, f), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1838
1884
|
organizationId: e.organizationId.get() || "",
|
|
1839
1885
|
userId: e.userId.get() || "",
|
|
1840
1886
|
eventId: f
|
|
@@ -1846,17 +1892,17 @@ const Ro = (t, e, r, n) => {
|
|
|
1846
1892
|
n.close(c);
|
|
1847
1893
|
}
|
|
1848
1894
|
} };
|
|
1849
|
-
},
|
|
1895
|
+
}, jo = (t, e, r, n) => {
|
|
1850
1896
|
const i = te(void 0), o = kn(n), s = async () => {
|
|
1851
|
-
const u = t.get(), f = e.get(), c = r.getStore().get().data?.map((
|
|
1897
|
+
const u = t.get(), f = e.get(), c = r.getStore().get().data?.map((g) => g.slId);
|
|
1852
1898
|
if (!c)
|
|
1853
1899
|
return;
|
|
1854
|
-
const
|
|
1900
|
+
const h = {
|
|
1855
1901
|
eventId: u,
|
|
1856
1902
|
userId: f,
|
|
1857
1903
|
usersIds: [...c, f]
|
|
1858
|
-
},
|
|
1859
|
-
i.set(
|
|
1904
|
+
}, l = await o(h);
|
|
1905
|
+
i.set(l.data?.attributes);
|
|
1860
1906
|
}, a = () => {
|
|
1861
1907
|
s();
|
|
1862
1908
|
};
|
|
@@ -1866,15 +1912,15 @@ const Ro = (t, e, r, n) => {
|
|
|
1866
1912
|
u(), f(), c();
|
|
1867
1913
|
};
|
|
1868
1914
|
}), { $store: i, invalidate: a };
|
|
1869
|
-
},
|
|
1870
|
-
const o = kn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((
|
|
1915
|
+
}, Uo = async (t, e, r, n, i) => {
|
|
1916
|
+
const o = kn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((l) => l.slId) || [], f = {
|
|
1871
1917
|
eventId: s,
|
|
1872
1918
|
userId: n,
|
|
1873
1919
|
usersIds: [...u, a]
|
|
1874
1920
|
};
|
|
1875
1921
|
return (await o(f)).data?.attributes?.summary;
|
|
1876
|
-
},
|
|
1877
|
-
class
|
|
1922
|
+
}, Bo = /* @__PURE__ */ new Set([F.POLL, F.PREDICTION, F.TRIVIA]);
|
|
1923
|
+
class xo extends _n {
|
|
1878
1924
|
/** user statistics (leaderboard panel) */
|
|
1879
1925
|
userSummary;
|
|
1880
1926
|
/** feed list (pick history) */
|
|
@@ -1909,7 +1955,7 @@ class Uo extends _n {
|
|
|
1909
1955
|
submitAnswerTimeout;
|
|
1910
1956
|
cancels = /* @__PURE__ */ new Set();
|
|
1911
1957
|
constructor(e, r, n) {
|
|
1912
|
-
super(e, r), this.background = new
|
|
1958
|
+
super(e, r), this.background = new ho(n), this.advertisement = this.background.advertisement, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Pn(), this.feedList = this.background.feedList, this.friends = new ce(Zi(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new Y(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Mo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(D.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Vo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = jo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Ao(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
1913
1959
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
1914
1960
|
})), 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)), nt(this.background.activeQuestionId, () => {
|
|
1915
1961
|
this.background.activeQuestionId.listen(this.showInApp);
|
|
@@ -1933,22 +1979,22 @@ class Uo extends _n {
|
|
|
1933
1979
|
if (!r || !n?.attributes)
|
|
1934
1980
|
return;
|
|
1935
1981
|
const { status: i, type: o, id: s, answers: a } = r;
|
|
1936
|
-
if (i ===
|
|
1982
|
+
if (i === H.RESOLVED && o === F.PREDICTION) {
|
|
1937
1983
|
const u = this.background.getCurrentSessionId({
|
|
1938
1984
|
prefix: `notification-id:${s}`
|
|
1939
|
-
}), f = [...this.feedList.getValues().data || []], c = f.findIndex((Q) => Q.id === s),
|
|
1940
|
-
let
|
|
1941
|
-
const
|
|
1985
|
+
}), f = [...this.feedList.getValues().data || []], c = f.findIndex((Q) => Q.id === s), h = f[c];
|
|
1986
|
+
let l = h?.attributes?.attributes?.value?.answerId;
|
|
1987
|
+
const g = ar(s, this.transport), v = g.subscribe(() => {
|
|
1942
1988
|
});
|
|
1943
|
-
await
|
|
1944
|
-
const
|
|
1989
|
+
await g.get().promise;
|
|
1990
|
+
const w = g.get().data;
|
|
1945
1991
|
v(), window.requestAnimationFrame(() => {
|
|
1946
|
-
|
|
1947
|
-
}),
|
|
1948
|
-
const b = a.find(({ correct: Q }) => Q), L =
|
|
1949
|
-
if (
|
|
1992
|
+
g.invalidate();
|
|
1993
|
+
}), l || (l = w?.answers.find(({ youVoted: Q }) => Q)?.id);
|
|
1994
|
+
const b = a.find(({ correct: Q }) => Q), L = l ? a.find(({ id: Q }) => Q === l) : void 0, R = !!L?.correct;
|
|
1995
|
+
if (h && f[c]?.attributes?.attributes.case === "question") {
|
|
1950
1996
|
try {
|
|
1951
|
-
f[c].attributes.attributes.value.answerId =
|
|
1997
|
+
f[c].attributes.attributes.value.answerId = l, f[c].attributes.attributes.value.openForVoting = !1, l && (f[c].attributes.attributes.value.status = R ? lt.WON : lt.LOST);
|
|
1952
1998
|
} catch {
|
|
1953
1999
|
}
|
|
1954
2000
|
this.feedList.getStore().mutate(f);
|
|
@@ -1973,7 +2019,7 @@ class Uo extends _n {
|
|
|
1973
2019
|
},
|
|
1974
2020
|
correctAnswerTitle: b?.text,
|
|
1975
2021
|
correct: !!R,
|
|
1976
|
-
predictionResult: i ===
|
|
2022
|
+
predictionResult: i === H.RESOLVED,
|
|
1977
2023
|
questionTitle: r?.subject
|
|
1978
2024
|
}
|
|
1979
2025
|
}
|
|
@@ -1981,7 +2027,7 @@ class Uo extends _n {
|
|
|
1981
2027
|
}
|
|
1982
2028
|
})), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
|
|
1983
2029
|
const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
|
|
1984
|
-
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !==
|
|
2030
|
+
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== H.ACTIVE && n.attributes.status !== H.RESOLVED)) {
|
|
1985
2031
|
if (i !== -1)
|
|
1986
2032
|
if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
|
|
1987
2033
|
const o = r[i];
|
|
@@ -2047,7 +2093,7 @@ class Uo extends _n {
|
|
|
2047
2093
|
const a = this.feedList.getValues().data;
|
|
2048
2094
|
if (!a)
|
|
2049
2095
|
return;
|
|
2050
|
-
const u = a.findIndex((
|
|
2096
|
+
const u = a.findIndex((h) => h.id === e), f = a[u], c = f?.attributes?.attributes.case === "question" && f.attributes.attributes.value;
|
|
2051
2097
|
if (c) {
|
|
2052
2098
|
J.emit("poll", {
|
|
2053
2099
|
action: "voted",
|
|
@@ -2056,12 +2102,12 @@ class Uo extends _n {
|
|
|
2056
2102
|
questionType: c.questionType
|
|
2057
2103
|
}
|
|
2058
2104
|
});
|
|
2059
|
-
const
|
|
2060
|
-
if (i(),
|
|
2061
|
-
const
|
|
2062
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "",
|
|
2105
|
+
const h = n.get().data;
|
|
2106
|
+
if (i(), h) {
|
|
2107
|
+
const l = h.answers.find((b) => b.correct === !0), g = h.answers.findIndex((b) => b.id === r), v = h.answers[g], w = h.answers.every(({ percentageDecimal: b }, L) => b === o?.answers[L].percentageDecimal);
|
|
2108
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "", l && (a[u].attributes.attributes.value.status = l.id === r ? lt.WON : lt.LOST), this.feedList.getStore().mutate([...a]), h.answers[g].correct = l?.id === r, h.answers[g].youVoted = !0, w && h.answers.forEach((b) => {
|
|
2063
2109
|
b.percentageDecimal = 0;
|
|
2064
|
-
}),
|
|
2110
|
+
}), l?.id === r && (h.answers[g].pointsEarned = h.status === H.RESOLVED ? 0 : l.points), n.mutate({ ...h });
|
|
2065
2111
|
}
|
|
2066
2112
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
2067
2113
|
this.userSummary.invalidate();
|
|
@@ -2069,7 +2115,7 @@ class Uo extends _n {
|
|
|
2069
2115
|
}
|
|
2070
2116
|
};
|
|
2071
2117
|
try {
|
|
2072
|
-
await
|
|
2118
|
+
await vo(this.transport, { questionId: e, answerId: r }), s();
|
|
2073
2119
|
} catch (a) {
|
|
2074
2120
|
if (a.message === rt.ALREADY_VOTED) {
|
|
2075
2121
|
this.userSummary.invalidate();
|
|
@@ -2100,6 +2146,7 @@ class Uo extends _n {
|
|
|
2100
2146
|
}
|
|
2101
2147
|
}), this.background.openQuestion(e, r);
|
|
2102
2148
|
};
|
|
2149
|
+
getFeedItem = (e) => ro(e, this.transport);
|
|
2103
2150
|
isOpenedQuestion = (e) => this.notifications.isViewed(e);
|
|
2104
2151
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
2105
2152
|
openUser = async (e) => {
|
|
@@ -2114,7 +2161,7 @@ class Uo extends _n {
|
|
|
2114
2161
|
}
|
|
2115
2162
|
const n = { ...r };
|
|
2116
2163
|
try {
|
|
2117
|
-
const i = await
|
|
2164
|
+
const i = await Uo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2118
2165
|
i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
|
|
2119
2166
|
} catch (i) {
|
|
2120
2167
|
console.error(i);
|
|
@@ -2132,8 +2179,8 @@ class Uo extends _n {
|
|
|
2132
2179
|
*/
|
|
2133
2180
|
showInApp = (e) => {
|
|
2134
2181
|
const r = this.onboardingStatus.$store.get();
|
|
2135
|
-
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== yi.ON && e.data.question.status ===
|
|
2136
|
-
if (
|
|
2182
|
+
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== yi.ON && e.data.question.status === H.ACTIVE && !e.data.question.marketClosed) {
|
|
2183
|
+
if (Bo.has(e.data.question.type))
|
|
2137
2184
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2138
2185
|
type: Ae.QUESTION,
|
|
2139
2186
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2208,15 +2255,15 @@ class Uo extends _n {
|
|
|
2208
2255
|
}
|
|
2209
2256
|
};
|
|
2210
2257
|
}
|
|
2211
|
-
const
|
|
2258
|
+
const qo = {
|
|
2212
2259
|
[D.GAMES]: !0
|
|
2213
2260
|
};
|
|
2214
|
-
class
|
|
2261
|
+
class Qo extends _n {
|
|
2215
2262
|
constructor(e, r) {
|
|
2216
2263
|
super(e, r);
|
|
2217
2264
|
}
|
|
2218
2265
|
}
|
|
2219
|
-
const
|
|
2266
|
+
const Go = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Qo(t, e), Ko = (t, e, r) => {
|
|
2220
2267
|
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new Y(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new Y(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) => {
|
|
2221
2268
|
t.activeFeature.setValue(n);
|
|
2222
2269
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -2227,8 +2274,8 @@ const qo = (t, e, r) => t.type === D.GAMES ? new Uo(t, e, r) : new xo(t, e), Qo
|
|
|
2227
2274
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2228
2275
|
}
|
|
2229
2276
|
}, t.initFeature = (n, i = ye.ORGANIZATION) => {
|
|
2230
|
-
if (n.type in
|
|
2231
|
-
const o =
|
|
2277
|
+
if (n.type in qo && !t.features.has(n.type)) {
|
|
2278
|
+
const o = Go(n, i, t);
|
|
2232
2279
|
t.features.set(n.type, o);
|
|
2233
2280
|
let s = t.sdk.featuresList.getValue();
|
|
2234
2281
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2281,7 +2328,7 @@ const qo = (t, e, r) => t.type === D.GAMES ? new Uo(t, e, r) : new xo(t, e), Qo
|
|
|
2281
2328
|
t.store.subscribe(i);
|
|
2282
2329
|
}, r();
|
|
2283
2330
|
};
|
|
2284
|
-
class
|
|
2331
|
+
class zo {
|
|
2285
2332
|
analytics;
|
|
2286
2333
|
constructor(e) {
|
|
2287
2334
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2317,7 +2364,7 @@ class Go {
|
|
|
2317
2364
|
});
|
|
2318
2365
|
};
|
|
2319
2366
|
}
|
|
2320
|
-
class
|
|
2367
|
+
class Ho {
|
|
2321
2368
|
analytics;
|
|
2322
2369
|
constructor(e) {
|
|
2323
2370
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2354,7 +2401,7 @@ class Ko {
|
|
|
2354
2401
|
});
|
|
2355
2402
|
};
|
|
2356
2403
|
}
|
|
2357
|
-
const
|
|
2404
|
+
const Wo = {
|
|
2358
2405
|
[Te.UNSET]: we.UNSET,
|
|
2359
2406
|
[Te.INGAME_IAB21]: we.PROMOTION_INGAME_IAB21,
|
|
2360
2407
|
[Te.INGAME_IAB11_LBAR]: we.PROMOTION_INGAME_IAB11_LBAR,
|
|
@@ -2363,13 +2410,13 @@ const zo = {
|
|
|
2363
2410
|
[Te.INGAME_IAB61]: we.PROMOTION_INGAME_IAB61,
|
|
2364
2411
|
[Te.EXTERNAL_AD]: we.PROMOTION_GAM
|
|
2365
2412
|
};
|
|
2366
|
-
class
|
|
2413
|
+
class Yo {
|
|
2367
2414
|
analytics;
|
|
2368
2415
|
constructor(e) {
|
|
2369
2416
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
2370
2417
|
const r = (n) => {
|
|
2371
2418
|
if (n.slEventBus?.type === "advertisement") {
|
|
2372
|
-
const i = n.slEventBus.payload.advertisementType ?
|
|
2419
|
+
const i = n.slEventBus.payload.advertisementType ? Wo[n.slEventBus.payload.advertisementType] : we.UNSET;
|
|
2373
2420
|
switch (n.slEventBus.action) {
|
|
2374
2421
|
case "videoPlay":
|
|
2375
2422
|
this.videoPlay(n.slEventBus.payload, { topicSubType: i });
|
|
@@ -2460,7 +2507,7 @@ const Ze = {
|
|
|
2460
2507
|
[F.TWEET]: z.POLLS_TWITTER
|
|
2461
2508
|
};
|
|
2462
2509
|
F.UNSET + "", he.UNSET, F.FACTOID + "", he.POLLS, F.POLL + "", he.POLLS, F.PREDICTION + "", he.POLLS, F.PROMOTION + "", he.POLLS, F.TRIVIA + "", he.POLLS, F.TWEET + "", he.POLLS;
|
|
2463
|
-
const
|
|
2510
|
+
const Jo = {
|
|
2464
2511
|
[D.UNSET]: G.UNSET,
|
|
2465
2512
|
[D.INPLAY]: G.INPLAY,
|
|
2466
2513
|
[D.MESSAGING]: G.MESSAGING,
|
|
@@ -2480,7 +2527,7 @@ const Wo = {
|
|
|
2480
2527
|
[D.HIGHLIGHTS]: G.HIGHLIGHTS,
|
|
2481
2528
|
[D.PUBLIC_CHAT]: G.PUBLIC_CHAT
|
|
2482
2529
|
};
|
|
2483
|
-
class
|
|
2530
|
+
class Xo {
|
|
2484
2531
|
analytics;
|
|
2485
2532
|
constructor(e) {
|
|
2486
2533
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2523,7 +2570,7 @@ class Yo {
|
|
|
2523
2570
|
});
|
|
2524
2571
|
};
|
|
2525
2572
|
}
|
|
2526
|
-
class
|
|
2573
|
+
class Zo {
|
|
2527
2574
|
analytics;
|
|
2528
2575
|
constructor(e) {
|
|
2529
2576
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2607,28 +2654,28 @@ class Jo {
|
|
|
2607
2654
|
});
|
|
2608
2655
|
};
|
|
2609
2656
|
}
|
|
2610
|
-
const
|
|
2657
|
+
const es = ({ transport: t, $commonStore: e }) => {
|
|
2611
2658
|
let r;
|
|
2612
2659
|
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(An, {
|
|
2613
2660
|
method: "send",
|
|
2614
2661
|
params: [n]
|
|
2615
2662
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
2616
2663
|
fetcher: async () => {
|
|
2617
|
-
const
|
|
2664
|
+
const l = e.getStore().get();
|
|
2618
2665
|
try {
|
|
2619
2666
|
await o.unary({
|
|
2620
2667
|
message: {
|
|
2621
2668
|
case: "heartbeat",
|
|
2622
2669
|
value: {
|
|
2623
2670
|
common: {
|
|
2624
|
-
...
|
|
2671
|
+
...l,
|
|
2625
2672
|
kind: q.SESSION_HEARTBEAT
|
|
2626
2673
|
}
|
|
2627
2674
|
}
|
|
2628
2675
|
}
|
|
2629
2676
|
});
|
|
2630
|
-
} catch (
|
|
2631
|
-
me.error(
|
|
2677
|
+
} catch (g) {
|
|
2678
|
+
me.error(g, "send heartbeat failed");
|
|
2632
2679
|
}
|
|
2633
2680
|
return Date.now();
|
|
2634
2681
|
},
|
|
@@ -2645,7 +2692,7 @@ const Xo = ({ transport: t, $commonStore: e }) => {
|
|
|
2645
2692
|
me.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2646
2693
|
} };
|
|
2647
2694
|
}, me = le("analytics");
|
|
2648
|
-
class
|
|
2695
|
+
class ts {
|
|
2649
2696
|
commonStore;
|
|
2650
2697
|
notifications;
|
|
2651
2698
|
polls;
|
|
@@ -2658,7 +2705,7 @@ class Zo {
|
|
|
2658
2705
|
listenersCancels;
|
|
2659
2706
|
connected = !1;
|
|
2660
2707
|
constructor(e) {
|
|
2661
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(te({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2708
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(te({}), "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 zo(this), this.interactions = new Ho(this), this.advertisement = new Yo(this);
|
|
2662
2709
|
const { client: r } = e.analyticsTransport.createPromiseClient(An, {
|
|
2663
2710
|
method: "send"
|
|
2664
2711
|
});
|
|
@@ -2688,7 +2735,7 @@ class Zo {
|
|
|
2688
2735
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2689
2736
|
this.writeCommon("eventId", r);
|
|
2690
2737
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2691
|
-
r && this.writeCommon("category",
|
|
2738
|
+
r && this.writeCommon("category", Jo[r]), r !== D.UNSET ? this.writeCommon("overlaySessionId", nr()) : this.writeCommon("overlaySessionId", "");
|
|
2692
2739
|
})), this.onConnect(() => {
|
|
2693
2740
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2694
2741
|
this.writeCommon("screenOrientation", i.matches ? Br.PORTRAIT : Br.LANDSCAPE);
|
|
@@ -2701,17 +2748,17 @@ class Zo {
|
|
|
2701
2748
|
}));
|
|
2702
2749
|
};
|
|
2703
2750
|
}
|
|
2704
|
-
const
|
|
2705
|
-
t.analytics = new
|
|
2751
|
+
const rs = (t, e, r) => {
|
|
2752
|
+
t.analytics = new ts(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2706
2753
|
t.analytics.disconnect();
|
|
2707
2754
|
})), r();
|
|
2708
2755
|
};
|
|
2709
2756
|
var br = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2710
|
-
function
|
|
2757
|
+
function ns(t) {
|
|
2711
2758
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2712
2759
|
}
|
|
2713
2760
|
var Sr = { exports: {} }, wr = { exports: {} };
|
|
2714
|
-
function
|
|
2761
|
+
function is(t) {
|
|
2715
2762
|
var e = new t(), r = e;
|
|
2716
2763
|
function n() {
|
|
2717
2764
|
var o = e;
|
|
@@ -2725,14 +2772,14 @@ function rs(t) {
|
|
|
2725
2772
|
release: i
|
|
2726
2773
|
};
|
|
2727
2774
|
}
|
|
2728
|
-
var
|
|
2775
|
+
var os = is, ss = os;
|
|
2729
2776
|
function Dn(t, e, r) {
|
|
2730
2777
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
2731
2778
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2732
|
-
var n =
|
|
2733
|
-
push:
|
|
2734
|
-
drain:
|
|
2735
|
-
saturated:
|
|
2779
|
+
var n = ss(as), i = null, o = null, s = 0, a = null, u = {
|
|
2780
|
+
push: w,
|
|
2781
|
+
drain: W,
|
|
2782
|
+
saturated: W,
|
|
2736
2783
|
pause: c,
|
|
2737
2784
|
paused: !1,
|
|
2738
2785
|
get concurrency() {
|
|
@@ -2746,12 +2793,12 @@ function Dn(t, e, r) {
|
|
|
2746
2793
|
s++, L();
|
|
2747
2794
|
},
|
|
2748
2795
|
running: f,
|
|
2749
|
-
resume:
|
|
2796
|
+
resume: g,
|
|
2750
2797
|
idle: v,
|
|
2751
|
-
length:
|
|
2752
|
-
getQueue:
|
|
2798
|
+
length: h,
|
|
2799
|
+
getQueue: l,
|
|
2753
2800
|
unshift: b,
|
|
2754
|
-
empty:
|
|
2801
|
+
empty: W,
|
|
2755
2802
|
kill: R,
|
|
2756
2803
|
killAndDrain: Q,
|
|
2757
2804
|
error: X
|
|
@@ -2763,17 +2810,17 @@ function Dn(t, e, r) {
|
|
|
2763
2810
|
function c() {
|
|
2764
2811
|
u.paused = !0;
|
|
2765
2812
|
}
|
|
2766
|
-
function l() {
|
|
2767
|
-
for (var k = i, $ = 0; k; )
|
|
2768
|
-
k = k.next, $++;
|
|
2769
|
-
return $;
|
|
2770
|
-
}
|
|
2771
2813
|
function h() {
|
|
2772
|
-
for (var k = i,
|
|
2773
|
-
|
|
2774
|
-
return
|
|
2814
|
+
for (var k = i, V = 0; k; )
|
|
2815
|
+
k = k.next, V++;
|
|
2816
|
+
return V;
|
|
2775
2817
|
}
|
|
2776
|
-
function
|
|
2818
|
+
function l() {
|
|
2819
|
+
for (var k = i, V = []; k; )
|
|
2820
|
+
V.push(k.value), k = k.next;
|
|
2821
|
+
return V;
|
|
2822
|
+
}
|
|
2823
|
+
function g() {
|
|
2777
2824
|
if (u.paused) {
|
|
2778
2825
|
if (u.paused = !1, i === null) {
|
|
2779
2826
|
s++, L();
|
|
@@ -2786,87 +2833,87 @@ function Dn(t, e, r) {
|
|
|
2786
2833
|
function v() {
|
|
2787
2834
|
return s === 0 && u.length() === 0;
|
|
2788
2835
|
}
|
|
2789
|
-
function
|
|
2836
|
+
function w(k, V) {
|
|
2790
2837
|
var T = n.get();
|
|
2791
|
-
T.context = t, T.release = L, T.value = k, T.callback =
|
|
2838
|
+
T.context = t, T.release = L, T.value = k, T.callback = V || W, T.errorHandler = a, s >= r || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2792
2839
|
}
|
|
2793
|
-
function b(k,
|
|
2840
|
+
function b(k, V) {
|
|
2794
2841
|
var T = n.get();
|
|
2795
|
-
T.context = t, T.release = L, T.value = k, T.callback =
|
|
2842
|
+
T.context = t, T.release = L, T.value = k, T.callback = V || W, T.errorHandler = a, s >= r || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2796
2843
|
}
|
|
2797
2844
|
function L(k) {
|
|
2798
2845
|
k && n.release(k);
|
|
2799
|
-
var
|
|
2800
|
-
|
|
2846
|
+
var V = i;
|
|
2847
|
+
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();
|
|
2801
2848
|
}
|
|
2802
2849
|
function R() {
|
|
2803
|
-
i = null, o = null, u.drain =
|
|
2850
|
+
i = null, o = null, u.drain = W;
|
|
2804
2851
|
}
|
|
2805
2852
|
function Q() {
|
|
2806
|
-
i = null, o = null, u.drain(), u.drain =
|
|
2853
|
+
i = null, o = null, u.drain(), u.drain = W;
|
|
2807
2854
|
}
|
|
2808
2855
|
function X(k) {
|
|
2809
2856
|
a = k;
|
|
2810
2857
|
}
|
|
2811
2858
|
}
|
|
2812
|
-
function
|
|
2859
|
+
function W() {
|
|
2813
2860
|
}
|
|
2814
|
-
function
|
|
2815
|
-
this.value = null, this.callback =
|
|
2861
|
+
function as() {
|
|
2862
|
+
this.value = null, this.callback = W, this.next = null, this.release = W, this.context = null, this.errorHandler = null;
|
|
2816
2863
|
var t = this;
|
|
2817
2864
|
this.worked = function(r, n) {
|
|
2818
2865
|
var i = t.callback, o = t.errorHandler, s = t.value;
|
|
2819
|
-
t.value = null, t.callback =
|
|
2866
|
+
t.value = null, t.callback = W, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2820
2867
|
};
|
|
2821
2868
|
}
|
|
2822
|
-
function
|
|
2869
|
+
function us(t, e, r) {
|
|
2823
2870
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2824
|
-
function n(c,
|
|
2825
|
-
e.call(this, c).then(function(
|
|
2826
|
-
|
|
2827
|
-
},
|
|
2871
|
+
function n(c, h) {
|
|
2872
|
+
e.call(this, c).then(function(l) {
|
|
2873
|
+
h(null, l);
|
|
2874
|
+
}, h);
|
|
2828
2875
|
}
|
|
2829
2876
|
var i = Dn(t, n, r), o = i.push, s = i.unshift;
|
|
2830
2877
|
return i.push = a, i.unshift = u, i.drained = f, i;
|
|
2831
2878
|
function a(c) {
|
|
2832
|
-
var
|
|
2833
|
-
o(c, function(v,
|
|
2879
|
+
var h = new Promise(function(l, g) {
|
|
2880
|
+
o(c, function(v, w) {
|
|
2834
2881
|
if (v) {
|
|
2835
|
-
|
|
2882
|
+
g(v);
|
|
2836
2883
|
return;
|
|
2837
2884
|
}
|
|
2838
|
-
|
|
2885
|
+
l(w);
|
|
2839
2886
|
});
|
|
2840
2887
|
});
|
|
2841
|
-
return
|
|
2888
|
+
return h.catch(W), h;
|
|
2842
2889
|
}
|
|
2843
2890
|
function u(c) {
|
|
2844
|
-
var
|
|
2845
|
-
s(c, function(v,
|
|
2891
|
+
var h = new Promise(function(l, g) {
|
|
2892
|
+
s(c, function(v, w) {
|
|
2846
2893
|
if (v) {
|
|
2847
|
-
|
|
2894
|
+
g(v);
|
|
2848
2895
|
return;
|
|
2849
2896
|
}
|
|
2850
|
-
|
|
2897
|
+
l(w);
|
|
2851
2898
|
});
|
|
2852
2899
|
});
|
|
2853
|
-
return
|
|
2900
|
+
return h.catch(W), h;
|
|
2854
2901
|
}
|
|
2855
2902
|
function f() {
|
|
2856
2903
|
if (i.idle())
|
|
2857
|
-
return new Promise(function(
|
|
2858
|
-
|
|
2904
|
+
return new Promise(function(l) {
|
|
2905
|
+
l();
|
|
2859
2906
|
});
|
|
2860
|
-
var c = i.drain,
|
|
2907
|
+
var c = i.drain, h = new Promise(function(l) {
|
|
2861
2908
|
i.drain = function() {
|
|
2862
|
-
c(),
|
|
2909
|
+
c(), l();
|
|
2863
2910
|
};
|
|
2864
2911
|
});
|
|
2865
|
-
return
|
|
2912
|
+
return h;
|
|
2866
2913
|
}
|
|
2867
2914
|
}
|
|
2868
2915
|
wr.exports = Dn;
|
|
2869
|
-
wr.exports.promise =
|
|
2916
|
+
wr.exports.promise = us;
|
|
2870
2917
|
var Rn = wr.exports, Ar = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, Jr = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
|
|
2871
2918
|
return Function.prototype.apply.call(e, r, n);
|
|
2872
2919
|
}, pt;
|
|
@@ -2875,17 +2922,17 @@ Qe && typeof Qe.ownKeys == "function" ? pt = Qe.ownKeys : Object.getOwnPropertyS
|
|
|
2875
2922
|
} : pt = function(e) {
|
|
2876
2923
|
return Object.getOwnPropertyNames(e);
|
|
2877
2924
|
};
|
|
2878
|
-
function
|
|
2925
|
+
function cs(t) {
|
|
2879
2926
|
console && console.warn && console.warn(t);
|
|
2880
2927
|
}
|
|
2881
|
-
var
|
|
2928
|
+
var Vn = Number.isNaN || function(e) {
|
|
2882
2929
|
return e !== e;
|
|
2883
2930
|
};
|
|
2884
2931
|
function P() {
|
|
2885
2932
|
P.init.call(this);
|
|
2886
2933
|
}
|
|
2887
2934
|
Ar.exports = P;
|
|
2888
|
-
Ar.exports.once =
|
|
2935
|
+
Ar.exports.once = hs;
|
|
2889
2936
|
P.EventEmitter = P;
|
|
2890
2937
|
P.prototype._events = void 0;
|
|
2891
2938
|
P.prototype._eventsCount = 0;
|
|
@@ -2901,7 +2948,7 @@ Object.defineProperty(P, "defaultMaxListeners", {
|
|
|
2901
2948
|
return Xr;
|
|
2902
2949
|
},
|
|
2903
2950
|
set: function(t) {
|
|
2904
|
-
if (typeof t != "number" || t < 0 ||
|
|
2951
|
+
if (typeof t != "number" || t < 0 || Vn(t))
|
|
2905
2952
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2906
2953
|
Xr = t;
|
|
2907
2954
|
}
|
|
@@ -2910,15 +2957,15 @@ P.init = function() {
|
|
|
2910
2957
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2911
2958
|
};
|
|
2912
2959
|
P.prototype.setMaxListeners = function(e) {
|
|
2913
|
-
if (typeof e != "number" || e < 0 ||
|
|
2960
|
+
if (typeof e != "number" || e < 0 || Vn(e))
|
|
2914
2961
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2915
2962
|
return this._maxListeners = e, this;
|
|
2916
2963
|
};
|
|
2917
|
-
function
|
|
2964
|
+
function $n(t) {
|
|
2918
2965
|
return t._maxListeners === void 0 ? P.defaultMaxListeners : t._maxListeners;
|
|
2919
2966
|
}
|
|
2920
2967
|
P.prototype.getMaxListeners = function() {
|
|
2921
|
-
return
|
|
2968
|
+
return $n(this);
|
|
2922
2969
|
};
|
|
2923
2970
|
P.prototype.emit = function(e) {
|
|
2924
2971
|
for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
|
|
@@ -2952,10 +2999,10 @@ function Mn(t, e, r, n) {
|
|
|
2952
2999
|
r.listener ? r.listener : r
|
|
2953
3000
|
), o = t._events), s = o[e]), s === void 0)
|
|
2954
3001
|
s = o[e] = r, ++t._eventsCount;
|
|
2955
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
3002
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = $n(t), i > 0 && s.length > i && !s.warned) {
|
|
2956
3003
|
s.warned = !0;
|
|
2957
3004
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2958
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
3005
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, cs(a);
|
|
2959
3006
|
}
|
|
2960
3007
|
return t;
|
|
2961
3008
|
}
|
|
@@ -2966,12 +3013,12 @@ P.prototype.on = P.prototype.addListener;
|
|
|
2966
3013
|
P.prototype.prependListener = function(e, r) {
|
|
2967
3014
|
return Mn(this, e, r, !0);
|
|
2968
3015
|
};
|
|
2969
|
-
function
|
|
3016
|
+
function ls() {
|
|
2970
3017
|
if (!this.fired)
|
|
2971
3018
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
2972
3019
|
}
|
|
2973
3020
|
function jn(t, e, r) {
|
|
2974
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
3021
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ls.bind(n);
|
|
2975
3022
|
return i.listener = r, n.wrapFn = i, i;
|
|
2976
3023
|
}
|
|
2977
3024
|
P.prototype.once = function(e, r) {
|
|
@@ -2996,7 +3043,7 @@ P.prototype.removeListener = function(e, r) {
|
|
|
2996
3043
|
}
|
|
2997
3044
|
if (o < 0)
|
|
2998
3045
|
return this;
|
|
2999
|
-
o === 0 ? n.shift() :
|
|
3046
|
+
o === 0 ? n.shift() : ds(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
3000
3047
|
}
|
|
3001
3048
|
return this;
|
|
3002
3049
|
};
|
|
@@ -3025,7 +3072,7 @@ function Un(t, e, r) {
|
|
|
3025
3072
|
if (n === void 0)
|
|
3026
3073
|
return [];
|
|
3027
3074
|
var i = n[e];
|
|
3028
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
3075
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? fs(i) : xn(i, i.length);
|
|
3029
3076
|
}
|
|
3030
3077
|
P.prototype.listeners = function(e) {
|
|
3031
3078
|
return Un(this, e, !0);
|
|
@@ -3056,17 +3103,17 @@ function xn(t, e) {
|
|
|
3056
3103
|
r[n] = t[n];
|
|
3057
3104
|
return r;
|
|
3058
3105
|
}
|
|
3059
|
-
function
|
|
3106
|
+
function ds(t, e) {
|
|
3060
3107
|
for (; e + 1 < t.length; e++)
|
|
3061
3108
|
t[e] = t[e + 1];
|
|
3062
3109
|
t.pop();
|
|
3063
3110
|
}
|
|
3064
|
-
function
|
|
3111
|
+
function fs(t) {
|
|
3065
3112
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3066
3113
|
e[r] = t[r].listener || t[r];
|
|
3067
3114
|
return e;
|
|
3068
3115
|
}
|
|
3069
|
-
function
|
|
3116
|
+
function hs(t, e) {
|
|
3070
3117
|
return new Promise(function(r, n) {
|
|
3071
3118
|
function i(s) {
|
|
3072
3119
|
t.removeListener(e, o), n(s);
|
|
@@ -3074,10 +3121,10 @@ function ds(t, e) {
|
|
|
3074
3121
|
function o() {
|
|
3075
3122
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3076
3123
|
}
|
|
3077
|
-
qn(t, e, o, { once: !0 }), e !== "error" &&
|
|
3124
|
+
qn(t, e, o, { once: !0 }), e !== "error" && ps(t, i, { once: !0 });
|
|
3078
3125
|
});
|
|
3079
3126
|
}
|
|
3080
|
-
function
|
|
3127
|
+
function ps(t, e, r) {
|
|
3081
3128
|
typeof t.on == "function" && qn(t, "error", e, r);
|
|
3082
3129
|
}
|
|
3083
3130
|
function qn(t, e, r, n) {
|
|
@@ -3113,34 +3160,34 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3113
3160
|
return !1;
|
|
3114
3161
|
}
|
|
3115
3162
|
return !0;
|
|
3116
|
-
},
|
|
3117
|
-
return
|
|
3118
|
-
},
|
|
3119
|
-
return typeof Zr != "function" || typeof Symbol != "function" || typeof Zr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3163
|
+
}, ys = Kn, Dt = function() {
|
|
3164
|
+
return ys() && !!Symbol.toStringTag;
|
|
3165
|
+
}, gs = Error, ms = EvalError, vs = RangeError, bs = ReferenceError, zn = SyntaxError, Rt = TypeError, Ss = URIError, Zr = typeof Symbol < "u" && Symbol, ws = Kn, As = function() {
|
|
3166
|
+
return typeof Zr != "function" || typeof Symbol != "function" || typeof Zr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ws();
|
|
3120
3167
|
}, Ut = {
|
|
3121
3168
|
__proto__: null,
|
|
3122
3169
|
foo: {}
|
|
3123
|
-
},
|
|
3124
|
-
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof
|
|
3125
|
-
},
|
|
3170
|
+
}, Es = Object, Is = function() {
|
|
3171
|
+
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof Es);
|
|
3172
|
+
}, Ts = "Function.prototype.bind called on incompatible ", Os = Object.prototype.toString, _s = Math.max, Ls = "[object Function]", en = function(e, r) {
|
|
3126
3173
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3127
3174
|
n[i] = e[i];
|
|
3128
3175
|
for (var o = 0; o < r.length; o += 1)
|
|
3129
3176
|
n[o + e.length] = r[o];
|
|
3130
3177
|
return n;
|
|
3131
|
-
},
|
|
3178
|
+
}, Cs = function(e, r) {
|
|
3132
3179
|
for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
|
|
3133
3180
|
n[o] = e[i];
|
|
3134
3181
|
return n;
|
|
3135
|
-
},
|
|
3182
|
+
}, ks = function(t, e) {
|
|
3136
3183
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
3137
3184
|
r += t[n], n + 1 < t.length && (r += e);
|
|
3138
3185
|
return r;
|
|
3139
|
-
},
|
|
3186
|
+
}, Ps = function(e) {
|
|
3140
3187
|
var r = this;
|
|
3141
|
-
if (typeof r != "function" ||
|
|
3142
|
-
throw new TypeError(
|
|
3143
|
-
for (var n =
|
|
3188
|
+
if (typeof r != "function" || Os.apply(r) !== Ls)
|
|
3189
|
+
throw new TypeError(Ts + r);
|
|
3190
|
+
for (var n = Cs(arguments, 1), i, o = function() {
|
|
3144
3191
|
if (this instanceof i) {
|
|
3145
3192
|
var c = r.apply(
|
|
3146
3193
|
this,
|
|
@@ -3152,15 +3199,15 @@ var Qn = Ar.exports, Ft = {}, Gn = {}, Kn = function() {
|
|
|
3152
3199
|
e,
|
|
3153
3200
|
en(n, arguments)
|
|
3154
3201
|
);
|
|
3155
|
-
}, s =
|
|
3202
|
+
}, s = _s(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3156
3203
|
a[u] = "$" + u;
|
|
3157
|
-
if (i = Function("binder", "return function (" +
|
|
3204
|
+
if (i = Function("binder", "return function (" + ks(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3158
3205
|
var f = function() {
|
|
3159
3206
|
};
|
|
3160
3207
|
f.prototype = r.prototype, i.prototype = new f(), f.prototype = null;
|
|
3161
3208
|
}
|
|
3162
3209
|
return i;
|
|
3163
|
-
},
|
|
3210
|
+
}, Ns = Ps, Er = Function.prototype.bind || Ns, Fs = Function.prototype.call, Ds = Object.prototype.hasOwnProperty, Rs = Er, Vs = Rs.call(Fs, Ds), I, $s = gs, Ms = ms, js = vs, Us = bs, Ke = zn, Ge = Rt, Bs = Ss, Hn = Function, Bt = function(t) {
|
|
3164
3211
|
try {
|
|
3165
3212
|
return Hn('"use strict"; return (' + t + ").constructor;")();
|
|
3166
3213
|
} catch {
|
|
@@ -3174,7 +3221,7 @@ if (ke)
|
|
|
3174
3221
|
}
|
|
3175
3222
|
var xt = function() {
|
|
3176
3223
|
throw new Ge();
|
|
3177
|
-
},
|
|
3224
|
+
}, xs = ke ? function() {
|
|
3178
3225
|
try {
|
|
3179
3226
|
return arguments.callee, xt;
|
|
3180
3227
|
} catch {
|
|
@@ -3184,86 +3231,86 @@ var xt = function() {
|
|
|
3184
3231
|
return xt;
|
|
3185
3232
|
}
|
|
3186
3233
|
}
|
|
3187
|
-
}() : xt,
|
|
3234
|
+
}() : xt, $e = As(), qs = Is(), M = Object.getPrototypeOf || (qs ? function(t) {
|
|
3188
3235
|
return t.__proto__;
|
|
3189
|
-
} : null), je = {},
|
|
3236
|
+
} : null), je = {}, Qs = typeof Uint8Array > "u" || !M ? I : M(Uint8Array), Pe = {
|
|
3190
3237
|
__proto__: null,
|
|
3191
|
-
"%AggregateError%": typeof AggregateError > "u" ?
|
|
3238
|
+
"%AggregateError%": typeof AggregateError > "u" ? I : AggregateError,
|
|
3192
3239
|
"%Array%": Array,
|
|
3193
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
3194
|
-
"%ArrayIteratorPrototype%":
|
|
3195
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
3240
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? I : ArrayBuffer,
|
|
3241
|
+
"%ArrayIteratorPrototype%": $e && M ? M([][Symbol.iterator]()) : I,
|
|
3242
|
+
"%AsyncFromSyncIteratorPrototype%": I,
|
|
3196
3243
|
"%AsyncFunction%": je,
|
|
3197
3244
|
"%AsyncGenerator%": je,
|
|
3198
3245
|
"%AsyncGeneratorFunction%": je,
|
|
3199
3246
|
"%AsyncIteratorPrototype%": je,
|
|
3200
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
3201
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
3202
|
-
"%BigInt64Array%": typeof BigInt64Array > "u" ?
|
|
3203
|
-
"%BigUint64Array%": typeof BigUint64Array > "u" ?
|
|
3247
|
+
"%Atomics%": typeof Atomics > "u" ? I : Atomics,
|
|
3248
|
+
"%BigInt%": typeof BigInt > "u" ? I : BigInt,
|
|
3249
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? I : BigInt64Array,
|
|
3250
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? I : BigUint64Array,
|
|
3204
3251
|
"%Boolean%": Boolean,
|
|
3205
|
-
"%DataView%": typeof DataView > "u" ?
|
|
3252
|
+
"%DataView%": typeof DataView > "u" ? I : DataView,
|
|
3206
3253
|
"%Date%": Date,
|
|
3207
3254
|
"%decodeURI%": decodeURI,
|
|
3208
3255
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3209
3256
|
"%encodeURI%": encodeURI,
|
|
3210
3257
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3211
|
-
"%Error%":
|
|
3258
|
+
"%Error%": $s,
|
|
3212
3259
|
"%eval%": eval,
|
|
3213
3260
|
// eslint-disable-line no-eval
|
|
3214
|
-
"%EvalError%":
|
|
3215
|
-
"%Float32Array%": typeof Float32Array > "u" ?
|
|
3216
|
-
"%Float64Array%": typeof Float64Array > "u" ?
|
|
3217
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ?
|
|
3261
|
+
"%EvalError%": Ms,
|
|
3262
|
+
"%Float32Array%": typeof Float32Array > "u" ? I : Float32Array,
|
|
3263
|
+
"%Float64Array%": typeof Float64Array > "u" ? I : Float64Array,
|
|
3264
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? I : FinalizationRegistry,
|
|
3218
3265
|
"%Function%": Hn,
|
|
3219
3266
|
"%GeneratorFunction%": je,
|
|
3220
|
-
"%Int8Array%": typeof Int8Array > "u" ?
|
|
3221
|
-
"%Int16Array%": typeof Int16Array > "u" ?
|
|
3222
|
-
"%Int32Array%": typeof Int32Array > "u" ?
|
|
3267
|
+
"%Int8Array%": typeof Int8Array > "u" ? I : Int8Array,
|
|
3268
|
+
"%Int16Array%": typeof Int16Array > "u" ? I : Int16Array,
|
|
3269
|
+
"%Int32Array%": typeof Int32Array > "u" ? I : Int32Array,
|
|
3223
3270
|
"%isFinite%": isFinite,
|
|
3224
3271
|
"%isNaN%": isNaN,
|
|
3225
|
-
"%IteratorPrototype%":
|
|
3226
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
3227
|
-
"%Map%": typeof Map > "u" ?
|
|
3228
|
-
"%MapIteratorPrototype%": typeof Map > "u" ||
|
|
3272
|
+
"%IteratorPrototype%": $e && M ? M(M([][Symbol.iterator]())) : I,
|
|
3273
|
+
"%JSON%": typeof JSON == "object" ? JSON : I,
|
|
3274
|
+
"%Map%": typeof Map > "u" ? I : Map,
|
|
3275
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !$e || !M ? I : M((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
3229
3276
|
"%Math%": Math,
|
|
3230
3277
|
"%Number%": Number,
|
|
3231
3278
|
"%Object%": Object,
|
|
3232
3279
|
"%parseFloat%": parseFloat,
|
|
3233
3280
|
"%parseInt%": parseInt,
|
|
3234
|
-
"%Promise%": typeof Promise > "u" ?
|
|
3235
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
3236
|
-
"%RangeError%":
|
|
3237
|
-
"%ReferenceError%":
|
|
3238
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
3281
|
+
"%Promise%": typeof Promise > "u" ? I : Promise,
|
|
3282
|
+
"%Proxy%": typeof Proxy > "u" ? I : Proxy,
|
|
3283
|
+
"%RangeError%": js,
|
|
3284
|
+
"%ReferenceError%": Us,
|
|
3285
|
+
"%Reflect%": typeof Reflect > "u" ? I : Reflect,
|
|
3239
3286
|
"%RegExp%": RegExp,
|
|
3240
|
-
"%Set%": typeof Set > "u" ?
|
|
3241
|
-
"%SetIteratorPrototype%": typeof Set > "u" ||
|
|
3242
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
3287
|
+
"%Set%": typeof Set > "u" ? I : Set,
|
|
3288
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !$e || !M ? I : M((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
3289
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? I : SharedArrayBuffer,
|
|
3243
3290
|
"%String%": String,
|
|
3244
|
-
"%StringIteratorPrototype%":
|
|
3245
|
-
"%Symbol%":
|
|
3291
|
+
"%StringIteratorPrototype%": $e && M ? M(""[Symbol.iterator]()) : I,
|
|
3292
|
+
"%Symbol%": $e ? Symbol : I,
|
|
3246
3293
|
"%SyntaxError%": Ke,
|
|
3247
|
-
"%ThrowTypeError%":
|
|
3248
|
-
"%TypedArray%":
|
|
3294
|
+
"%ThrowTypeError%": xs,
|
|
3295
|
+
"%TypedArray%": Qs,
|
|
3249
3296
|
"%TypeError%": Ge,
|
|
3250
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
3251
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
3252
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
3253
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
3254
|
-
"%URIError%":
|
|
3255
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
3256
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
3257
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
3297
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? I : Uint8Array,
|
|
3298
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? I : Uint8ClampedArray,
|
|
3299
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? I : Uint16Array,
|
|
3300
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? I : Uint32Array,
|
|
3301
|
+
"%URIError%": Bs,
|
|
3302
|
+
"%WeakMap%": typeof WeakMap > "u" ? I : WeakMap,
|
|
3303
|
+
"%WeakRef%": typeof WeakRef > "u" ? I : WeakRef,
|
|
3304
|
+
"%WeakSet%": typeof WeakSet > "u" ? I : WeakSet
|
|
3258
3305
|
};
|
|
3259
3306
|
if (M)
|
|
3260
3307
|
try {
|
|
3261
3308
|
null.error;
|
|
3262
3309
|
} catch (t) {
|
|
3263
|
-
var
|
|
3264
|
-
Pe["%Error.prototype%"] =
|
|
3310
|
+
var Gs = M(M(t));
|
|
3311
|
+
Pe["%Error.prototype%"] = Gs;
|
|
3265
3312
|
}
|
|
3266
|
-
var
|
|
3313
|
+
var Ks = function t(e) {
|
|
3267
3314
|
var r;
|
|
3268
3315
|
if (e === "%AsyncFunction%")
|
|
3269
3316
|
r = Bt("async function () {}");
|
|
@@ -3332,21 +3379,21 @@ var Qs = function t(e) {
|
|
|
3332
3379
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3333
3380
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3334
3381
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3335
|
-
}, ot = Er, At =
|
|
3382
|
+
}, ot = Er, At = Vs, zs = ot.call(Function.call, Array.prototype.concat), Hs = ot.call(Function.apply, Array.prototype.splice), rn = ot.call(Function.call, String.prototype.replace), Et = ot.call(Function.call, String.prototype.slice), Ws = ot.call(Function.call, RegExp.prototype.exec), Ys = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Js = /\\(\\)?/g, Xs = function(e) {
|
|
3336
3383
|
var r = Et(e, 0, 1), n = Et(e, -1);
|
|
3337
3384
|
if (r === "%" && n !== "%")
|
|
3338
3385
|
throw new Ke("invalid intrinsic syntax, expected closing `%`");
|
|
3339
3386
|
if (n === "%" && r !== "%")
|
|
3340
3387
|
throw new Ke("invalid intrinsic syntax, expected opening `%`");
|
|
3341
3388
|
var i = [];
|
|
3342
|
-
return rn(e,
|
|
3343
|
-
i[i.length] = a ? rn(u,
|
|
3389
|
+
return rn(e, Ys, function(o, s, a, u) {
|
|
3390
|
+
i[i.length] = a ? rn(u, Js, "$1") : s || o;
|
|
3344
3391
|
}), i;
|
|
3345
|
-
},
|
|
3392
|
+
}, Zs = function(e, r) {
|
|
3346
3393
|
var n = e, i;
|
|
3347
3394
|
if (At(tn, n) && (i = tn[n], n = "%" + i[0] + "%"), At(Pe, n)) {
|
|
3348
3395
|
var o = Pe[n];
|
|
3349
|
-
if (o === je && (o =
|
|
3396
|
+
if (o === je && (o = Ks(n)), typeof o > "u" && !r)
|
|
3350
3397
|
throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3351
3398
|
return {
|
|
3352
3399
|
alias: i,
|
|
@@ -3360,28 +3407,28 @@ var Qs = function t(e) {
|
|
|
3360
3407
|
throw new Ge("intrinsic name must be a non-empty string");
|
|
3361
3408
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3362
3409
|
throw new Ge('"allowMissing" argument must be a boolean');
|
|
3363
|
-
if (
|
|
3410
|
+
if (Ws(/^%?[^%]*%?$/, e) === null)
|
|
3364
3411
|
throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3365
|
-
var n =
|
|
3366
|
-
f && (i = f[0],
|
|
3367
|
-
for (var c = 1,
|
|
3368
|
-
var
|
|
3369
|
-
if ((
|
|
3412
|
+
var n = Xs(e), i = n.length > 0 ? n[0] : "", o = Zs("%" + i + "%", r), s = o.name, a = o.value, u = !1, f = o.alias;
|
|
3413
|
+
f && (i = f[0], Hs(n, zs([0, 1], f)));
|
|
3414
|
+
for (var c = 1, h = !0; c < n.length; c += 1) {
|
|
3415
|
+
var l = n[c], g = Et(l, 0, 1), v = Et(l, -1);
|
|
3416
|
+
if ((g === '"' || g === "'" || g === "`" || v === '"' || v === "'" || v === "`") && g !== v)
|
|
3370
3417
|
throw new Ke("property names with quotes must have matching quotes");
|
|
3371
|
-
if ((
|
|
3418
|
+
if ((l === "constructor" || !h) && (u = !0), i += "." + l, s = "%" + i + "%", At(Pe, s))
|
|
3372
3419
|
a = Pe[s];
|
|
3373
3420
|
else if (a != null) {
|
|
3374
|
-
if (!(
|
|
3421
|
+
if (!(l in a)) {
|
|
3375
3422
|
if (!r)
|
|
3376
3423
|
throw new Ge("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3377
3424
|
return;
|
|
3378
3425
|
}
|
|
3379
3426
|
if (ke && c + 1 >= n.length) {
|
|
3380
|
-
var
|
|
3381
|
-
|
|
3427
|
+
var w = ke(a, l);
|
|
3428
|
+
h = !!w, h && "get" in w && !("originalValue" in w.get) ? a = w.get : a = a[l];
|
|
3382
3429
|
} else
|
|
3383
|
-
|
|
3384
|
-
|
|
3430
|
+
h = At(a, l), a = a[l];
|
|
3431
|
+
h && !u && (Pe[s] = a);
|
|
3385
3432
|
}
|
|
3386
3433
|
}
|
|
3387
3434
|
return a;
|
|
@@ -3398,14 +3445,14 @@ function Ir() {
|
|
|
3398
3445
|
}
|
|
3399
3446
|
return qt = e, qt;
|
|
3400
3447
|
}
|
|
3401
|
-
var
|
|
3448
|
+
var ea = st, yt = ea("%Object.getOwnPropertyDescriptor%", !0);
|
|
3402
3449
|
if (yt)
|
|
3403
3450
|
try {
|
|
3404
3451
|
yt([], "length");
|
|
3405
3452
|
} catch {
|
|
3406
3453
|
yt = null;
|
|
3407
3454
|
}
|
|
3408
|
-
var
|
|
3455
|
+
var Vt = yt, on = Ir(), ta = zn, Me = Rt, sn = Vt, ra = function(e, r, n) {
|
|
3409
3456
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3410
3457
|
throw new Me("`obj` must be an object or a function`");
|
|
3411
3458
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3429,7 +3476,7 @@ var $t = yt, on = Ir(), Zs = zn, Me = Rt, sn = $t, ea = function(e, r, n) {
|
|
|
3429
3476
|
else if (a || !i && !o && !s)
|
|
3430
3477
|
e[r] = n;
|
|
3431
3478
|
else
|
|
3432
|
-
throw new
|
|
3479
|
+
throw new ta("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3433
3480
|
}, ur = Ir(), Yn = function() {
|
|
3434
3481
|
return !!ur;
|
|
3435
3482
|
};
|
|
@@ -3442,17 +3489,17 @@ Yn.hasArrayLengthDefineBug = function() {
|
|
|
3442
3489
|
return !0;
|
|
3443
3490
|
}
|
|
3444
3491
|
};
|
|
3445
|
-
var
|
|
3492
|
+
var na = Yn, ia = st, an = ra, oa = na(), un = Vt, cn = Rt, sa = ia("%Math.floor%"), aa = function(e, r) {
|
|
3446
3493
|
if (typeof e != "function")
|
|
3447
3494
|
throw new cn("`fn` is not a function");
|
|
3448
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3495
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || sa(r) !== r)
|
|
3449
3496
|
throw new cn("`length` must be a positive 32-bit integer");
|
|
3450
3497
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3451
3498
|
if ("length" in e && un) {
|
|
3452
3499
|
var s = un(e, "length");
|
|
3453
3500
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3454
3501
|
}
|
|
3455
|
-
return (i || o || !n) && (
|
|
3502
|
+
return (i || o || !n) && (oa ? an(
|
|
3456
3503
|
/** @type {Parameters<define>[0]} */
|
|
3457
3504
|
e,
|
|
3458
3505
|
"length",
|
|
@@ -3467,14 +3514,14 @@ var ta = Yn, ra = st, an = ea, na = ta(), un = $t, cn = Rt, ia = ra("%Math.floor
|
|
|
3467
3514
|
)), e;
|
|
3468
3515
|
};
|
|
3469
3516
|
(function(t) {
|
|
3470
|
-
var e = Er, r = st, n =
|
|
3471
|
-
t.exports = function(
|
|
3472
|
-
if (typeof
|
|
3517
|
+
var e = Er, r = st, 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(), f = r("%Math.max%");
|
|
3518
|
+
t.exports = function(l) {
|
|
3519
|
+
if (typeof l != "function")
|
|
3473
3520
|
throw new i("a function is required");
|
|
3474
|
-
var
|
|
3521
|
+
var g = a(e, s, arguments);
|
|
3475
3522
|
return n(
|
|
3476
|
-
|
|
3477
|
-
1 + f(0,
|
|
3523
|
+
g,
|
|
3524
|
+
1 + f(0, l.length - (arguments.length - 1)),
|
|
3478
3525
|
!0
|
|
3479
3526
|
);
|
|
3480
3527
|
};
|
|
@@ -3483,37 +3530,37 @@ var ta = Yn, ra = st, an = ea, na = ta(), un = $t, cn = Rt, ia = ra("%Math.floor
|
|
|
3483
3530
|
};
|
|
3484
3531
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3485
3532
|
})(Wn);
|
|
3486
|
-
var Tr = Wn.exports, Jn = st, Xn = Tr,
|
|
3533
|
+
var Tr = Wn.exports, Jn = st, Xn = Tr, ua = Xn(Jn("String.prototype.indexOf")), Or = function(e, r) {
|
|
3487
3534
|
var n = Jn(e, !!r);
|
|
3488
|
-
return typeof n == "function" &&
|
|
3489
|
-
},
|
|
3490
|
-
return
|
|
3535
|
+
return typeof n == "function" && ua(e, ".prototype.") > -1 ? Xn(n) : n;
|
|
3536
|
+
}, ca = Dt(), la = Or, cr = la("Object.prototype.toString"), $t = function(e) {
|
|
3537
|
+
return ca && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
|
|
3491
3538
|
}, Zn = function(e) {
|
|
3492
|
-
return
|
|
3493
|
-
},
|
|
3494
|
-
return
|
|
3539
|
+
return $t(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && cr(e) !== "[object Array]" && cr(e.callee) === "[object Function]";
|
|
3540
|
+
}, da = function() {
|
|
3541
|
+
return $t(arguments);
|
|
3495
3542
|
}();
|
|
3496
|
-
|
|
3497
|
-
var
|
|
3543
|
+
$t.isLegacyArguments = Zn;
|
|
3544
|
+
var fa = da ? $t : Zn, ha = Object.prototype.toString, pa = Function.prototype.toString, ya = /^\s*(?:function)?\*/, ei = Dt(), Qt = Object.getPrototypeOf, ga = function() {
|
|
3498
3545
|
if (!ei)
|
|
3499
3546
|
return !1;
|
|
3500
3547
|
try {
|
|
3501
3548
|
return Function("return function*() {}")();
|
|
3502
3549
|
} catch {
|
|
3503
3550
|
}
|
|
3504
|
-
}, Gt,
|
|
3551
|
+
}, Gt, ma = function(e) {
|
|
3505
3552
|
if (typeof e != "function")
|
|
3506
3553
|
return !1;
|
|
3507
|
-
if (
|
|
3554
|
+
if (ya.test(pa.call(e)))
|
|
3508
3555
|
return !0;
|
|
3509
3556
|
if (!ei) {
|
|
3510
|
-
var r =
|
|
3557
|
+
var r = ha.call(e);
|
|
3511
3558
|
return r === "[object GeneratorFunction]";
|
|
3512
3559
|
}
|
|
3513
3560
|
if (!Qt)
|
|
3514
3561
|
return !1;
|
|
3515
3562
|
if (typeof Gt > "u") {
|
|
3516
|
-
var n =
|
|
3563
|
+
var n = ga();
|
|
3517
3564
|
Gt = n ? Qt(n) : !1;
|
|
3518
3565
|
}
|
|
3519
3566
|
return Qt(e) === Gt;
|
|
@@ -3532,10 +3579,10 @@ if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
|
3532
3579
|
}
|
|
3533
3580
|
else
|
|
3534
3581
|
xe = null;
|
|
3535
|
-
var
|
|
3582
|
+
var va = /^\s*class\b/, dr = function(e) {
|
|
3536
3583
|
try {
|
|
3537
3584
|
var r = ti.call(e);
|
|
3538
|
-
return
|
|
3585
|
+
return va.test(r);
|
|
3539
3586
|
} catch {
|
|
3540
3587
|
return !1;
|
|
3541
3588
|
}
|
|
@@ -3545,22 +3592,22 @@ var ga = /^\s*class\b/, dr = function(e) {
|
|
|
3545
3592
|
} catch {
|
|
3546
3593
|
return !1;
|
|
3547
3594
|
}
|
|
3548
|
-
}, mt = Object.prototype.toString,
|
|
3595
|
+
}, mt = Object.prototype.toString, ba = "[object Object]", Sa = "[object Function]", wa = "[object GeneratorFunction]", Aa = "[object HTMLAllCollection]", Ea = "[object HTML document.all class]", Ia = "[object HTMLCollection]", Ta = typeof Symbol == "function" && !!Symbol.toStringTag, Oa = !(0 in [,]), fr = function() {
|
|
3549
3596
|
return !1;
|
|
3550
3597
|
};
|
|
3551
3598
|
if (typeof document == "object") {
|
|
3552
|
-
var
|
|
3553
|
-
mt.call(
|
|
3554
|
-
if ((
|
|
3599
|
+
var _a = document.all;
|
|
3600
|
+
mt.call(_a) === mt.call(document.all) && (fr = function(e) {
|
|
3601
|
+
if ((Oa || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3555
3602
|
try {
|
|
3556
3603
|
var r = mt.call(e);
|
|
3557
|
-
return (r ===
|
|
3604
|
+
return (r === Aa || r === Ea || r === Ia || r === ba) && e("") == null;
|
|
3558
3605
|
} catch {
|
|
3559
3606
|
}
|
|
3560
3607
|
return !1;
|
|
3561
3608
|
});
|
|
3562
3609
|
}
|
|
3563
|
-
var
|
|
3610
|
+
var La = xe ? function(e) {
|
|
3564
3611
|
if (fr(e))
|
|
3565
3612
|
return !0;
|
|
3566
3613
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3577,27 +3624,27 @@ var Oa = xe ? function(e) {
|
|
|
3577
3624
|
return !0;
|
|
3578
3625
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3579
3626
|
return !1;
|
|
3580
|
-
if (
|
|
3627
|
+
if (Ta)
|
|
3581
3628
|
return Kt(e);
|
|
3582
3629
|
if (dr(e))
|
|
3583
3630
|
return !1;
|
|
3584
3631
|
var r = mt.call(e);
|
|
3585
|
-
return r !==
|
|
3586
|
-
},
|
|
3632
|
+
return r !== Sa && r !== wa && !/^\[object HTML/.test(r) ? !1 : Kt(e);
|
|
3633
|
+
}, Ca = La, ka = Object.prototype.toString, ri = Object.prototype.hasOwnProperty, Pa = function(e, r, n) {
|
|
3587
3634
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3588
3635
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3589
|
-
},
|
|
3636
|
+
}, Na = function(e, r, n) {
|
|
3590
3637
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3591
3638
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3592
|
-
},
|
|
3639
|
+
}, Fa = function(e, r, n) {
|
|
3593
3640
|
for (var i in e)
|
|
3594
3641
|
ri.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3595
|
-
},
|
|
3596
|
-
if (!
|
|
3642
|
+
}, Da = function(e, r, n) {
|
|
3643
|
+
if (!Ca(r))
|
|
3597
3644
|
throw new TypeError("iterator must be a function");
|
|
3598
3645
|
var i;
|
|
3599
|
-
arguments.length >= 3 && (i = n),
|
|
3600
|
-
}, ni =
|
|
3646
|
+
arguments.length >= 3 && (i = n), ka.call(e) === "[object Array]" ? Pa(e, r, i) : typeof e == "string" ? Na(e, r, i) : Fa(e, r, i);
|
|
3647
|
+
}, ni = Da, Ra = [
|
|
3601
3648
|
"Float32Array",
|
|
3602
3649
|
"Float64Array",
|
|
3603
3650
|
"Int8Array",
|
|
@@ -3609,11 +3656,11 @@ var Oa = xe ? function(e) {
|
|
|
3609
3656
|
"Uint32Array",
|
|
3610
3657
|
"BigInt64Array",
|
|
3611
3658
|
"BigUint64Array"
|
|
3612
|
-
], zt =
|
|
3659
|
+
], zt = Ra, Va = typeof globalThis > "u" ? br : globalThis, ii = function() {
|
|
3613
3660
|
for (var e = [], r = 0; r < zt.length; r++)
|
|
3614
|
-
typeof
|
|
3661
|
+
typeof Va[zt[r]] == "function" && (e[e.length] = zt[r]);
|
|
3615
3662
|
return e;
|
|
3616
|
-
}, It = ni,
|
|
3663
|
+
}, It = ni, $a = ii, ln = Tr, _r = Or, vt = Vt, Ma = _r("Object.prototype.toString"), oi = Dt(), dn = typeof globalThis > "u" ? br : globalThis, hr = $a(), Lr = _r("String.prototype.slice"), Ht = Object.getPrototypeOf, ja = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3617
3664
|
for (var n = 0; n < e.length; n += 1)
|
|
3618
3665
|
if (e[n] === r)
|
|
3619
3666
|
return n;
|
|
@@ -3633,7 +3680,7 @@ oi && vt && Ht ? It(hr, function(t) {
|
|
|
3633
3680
|
var e = new dn[t](), r = e.slice || e.set;
|
|
3634
3681
|
r && (Tt["$" + t] = ln(r));
|
|
3635
3682
|
});
|
|
3636
|
-
var
|
|
3683
|
+
var Ua = function(e) {
|
|
3637
3684
|
var r = !1;
|
|
3638
3685
|
return It(Tt, function(n, i) {
|
|
3639
3686
|
if (!r)
|
|
@@ -3642,7 +3689,7 @@ var Ma = function(e) {
|
|
|
3642
3689
|
} catch {
|
|
3643
3690
|
}
|
|
3644
3691
|
}), r;
|
|
3645
|
-
},
|
|
3692
|
+
}, Ba = function(e) {
|
|
3646
3693
|
var r = !1;
|
|
3647
3694
|
return It(Tt, function(n, i) {
|
|
3648
3695
|
if (!r)
|
|
@@ -3651,15 +3698,15 @@ var Ma = function(e) {
|
|
|
3651
3698
|
} catch {
|
|
3652
3699
|
}
|
|
3653
3700
|
}), r;
|
|
3654
|
-
},
|
|
3701
|
+
}, xa = function(e) {
|
|
3655
3702
|
if (!e || typeof e != "object")
|
|
3656
3703
|
return !1;
|
|
3657
3704
|
if (!oi) {
|
|
3658
|
-
var r = Lr(
|
|
3659
|
-
return
|
|
3705
|
+
var r = Lr(Ma(e), 8, -1);
|
|
3706
|
+
return ja(hr, r) > -1 ? r : r !== "Object" ? !1 : Ba(e);
|
|
3660
3707
|
}
|
|
3661
|
-
return vt ?
|
|
3662
|
-
}, Ot = ni,
|
|
3708
|
+
return vt ? Ua(e) : null;
|
|
3709
|
+
}, Ot = ni, qa = ii, fn = Tr, Cr = Or, bt = Vt, Qa = Cr("Object.prototype.toString"), si = Dt(), hn = typeof globalThis > "u" ? br : globalThis, pr = qa(), kr = Cr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ga = Cr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3663
3710
|
for (var n = 0; n < e.length; n += 1)
|
|
3664
3711
|
if (e[n] === r)
|
|
3665
3712
|
return n;
|
|
@@ -3679,7 +3726,7 @@ si && bt && Wt ? Ot(pr, function(t) {
|
|
|
3679
3726
|
var e = new hn[t](), r = e.slice || e.set;
|
|
3680
3727
|
r && (_t["$" + t] = fn(r));
|
|
3681
3728
|
});
|
|
3682
|
-
var
|
|
3729
|
+
var Ka = function(e) {
|
|
3683
3730
|
var r = !1;
|
|
3684
3731
|
return Ot(
|
|
3685
3732
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3695,7 +3742,7 @@ var Qa = function(e) {
|
|
|
3695
3742
|
}
|
|
3696
3743
|
}
|
|
3697
3744
|
), r;
|
|
3698
|
-
},
|
|
3745
|
+
}, za = function(e) {
|
|
3699
3746
|
var r = !1;
|
|
3700
3747
|
return Ot(
|
|
3701
3748
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -3711,27 +3758,27 @@ var Qa = function(e) {
|
|
|
3711
3758
|
}
|
|
3712
3759
|
}
|
|
3713
3760
|
), r;
|
|
3714
|
-
},
|
|
3761
|
+
}, Ha = function(e) {
|
|
3715
3762
|
if (!e || typeof e != "object")
|
|
3716
3763
|
return !1;
|
|
3717
3764
|
if (!si) {
|
|
3718
|
-
var r = kr(
|
|
3719
|
-
return
|
|
3765
|
+
var r = kr(Qa(e), 8, -1);
|
|
3766
|
+
return Ga(pr, r) > -1 ? r : r !== "Object" ? !1 : za(e);
|
|
3720
3767
|
}
|
|
3721
|
-
return bt ?
|
|
3722
|
-
},
|
|
3723
|
-
return !!
|
|
3768
|
+
return bt ? Ka(e) : null;
|
|
3769
|
+
}, Wa = Ha, Ya = function(e) {
|
|
3770
|
+
return !!Wa(e);
|
|
3724
3771
|
};
|
|
3725
3772
|
(function(t) {
|
|
3726
|
-
var e =
|
|
3773
|
+
var e = fa, r = ma, n = xa, i = Ya;
|
|
3727
3774
|
function o(y) {
|
|
3728
3775
|
return y.call.bind(y);
|
|
3729
3776
|
}
|
|
3730
|
-
var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), f = o(Number.prototype.valueOf), c = o(String.prototype.valueOf),
|
|
3777
|
+
var s = typeof BigInt < "u", a = typeof Symbol < "u", u = o(Object.prototype.toString), f = o(Number.prototype.valueOf), c = o(String.prototype.valueOf), h = o(Boolean.prototype.valueOf);
|
|
3731
3778
|
if (s)
|
|
3732
|
-
var
|
|
3779
|
+
var l = o(BigInt.prototype.valueOf);
|
|
3733
3780
|
if (a)
|
|
3734
|
-
var
|
|
3781
|
+
var g = o(Symbol.prototype.valueOf);
|
|
3735
3782
|
function v(y, hi) {
|
|
3736
3783
|
if (typeof y != "object")
|
|
3737
3784
|
return !1;
|
|
@@ -3742,10 +3789,10 @@ var Qa = function(e) {
|
|
|
3742
3789
|
}
|
|
3743
3790
|
}
|
|
3744
3791
|
t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
|
|
3745
|
-
function
|
|
3792
|
+
function w(y) {
|
|
3746
3793
|
return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
|
|
3747
3794
|
}
|
|
3748
|
-
t.isPromise =
|
|
3795
|
+
t.isPromise = w;
|
|
3749
3796
|
function b(y) {
|
|
3750
3797
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || p(y);
|
|
3751
3798
|
}
|
|
@@ -3770,22 +3817,22 @@ var Qa = function(e) {
|
|
|
3770
3817
|
return n(y) === "Int8Array";
|
|
3771
3818
|
}
|
|
3772
3819
|
t.isInt8Array = k;
|
|
3773
|
-
function
|
|
3820
|
+
function V(y) {
|
|
3774
3821
|
return n(y) === "Int16Array";
|
|
3775
3822
|
}
|
|
3776
|
-
t.isInt16Array =
|
|
3823
|
+
t.isInt16Array = V;
|
|
3777
3824
|
function T(y) {
|
|
3778
3825
|
return n(y) === "Int32Array";
|
|
3779
3826
|
}
|
|
3780
3827
|
t.isInt32Array = T;
|
|
3781
|
-
function
|
|
3828
|
+
function ne(y) {
|
|
3782
3829
|
return n(y) === "Float32Array";
|
|
3783
3830
|
}
|
|
3784
|
-
t.isFloat32Array =
|
|
3785
|
-
function
|
|
3831
|
+
t.isFloat32Array = ne;
|
|
3832
|
+
function ie(y) {
|
|
3786
3833
|
return n(y) === "Float64Array";
|
|
3787
3834
|
}
|
|
3788
|
-
t.isFloat64Array =
|
|
3835
|
+
t.isFloat64Array = ie;
|
|
3789
3836
|
function Ne(y) {
|
|
3790
3837
|
return n(y) === "BigInt64Array";
|
|
3791
3838
|
}
|
|
@@ -3842,22 +3889,22 @@ var Qa = function(e) {
|
|
|
3842
3889
|
return typeof DataView > "u" ? !1 : d.working ? d(y) : y instanceof DataView;
|
|
3843
3890
|
}
|
|
3844
3891
|
t.isDataView = p;
|
|
3845
|
-
var
|
|
3892
|
+
var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3846
3893
|
function S(y) {
|
|
3847
3894
|
return u(y) === "[object SharedArrayBuffer]";
|
|
3848
3895
|
}
|
|
3849
3896
|
function _(y) {
|
|
3850
|
-
return typeof
|
|
3897
|
+
return typeof m > "u" ? !1 : (typeof S.working > "u" && (S.working = S(new m())), S.working ? S(y) : y instanceof m);
|
|
3851
3898
|
}
|
|
3852
3899
|
t.isSharedArrayBuffer = _;
|
|
3853
3900
|
function C(y) {
|
|
3854
3901
|
return u(y) === "[object AsyncFunction]";
|
|
3855
3902
|
}
|
|
3856
3903
|
t.isAsyncFunction = C;
|
|
3857
|
-
function
|
|
3904
|
+
function E(y) {
|
|
3858
3905
|
return u(y) === "[object Map Iterator]";
|
|
3859
3906
|
}
|
|
3860
|
-
t.isMapIterator =
|
|
3907
|
+
t.isMapIterator = E;
|
|
3861
3908
|
function O(y) {
|
|
3862
3909
|
return u(y) === "[object Set Iterator]";
|
|
3863
3910
|
}
|
|
@@ -3878,20 +3925,20 @@ var Qa = function(e) {
|
|
|
3878
3925
|
return v(y, c);
|
|
3879
3926
|
}
|
|
3880
3927
|
t.isStringObject = ut;
|
|
3881
|
-
function
|
|
3882
|
-
return v(y,
|
|
3928
|
+
function Ve(y) {
|
|
3929
|
+
return v(y, h);
|
|
3883
3930
|
}
|
|
3884
|
-
t.isBooleanObject =
|
|
3931
|
+
t.isBooleanObject = Ve;
|
|
3885
3932
|
function ct(y) {
|
|
3886
|
-
return s && v(y,
|
|
3933
|
+
return s && v(y, l);
|
|
3887
3934
|
}
|
|
3888
3935
|
t.isBigIntObject = ct;
|
|
3889
3936
|
function Fr(y) {
|
|
3890
|
-
return a && v(y,
|
|
3937
|
+
return a && v(y, g);
|
|
3891
3938
|
}
|
|
3892
3939
|
t.isSymbolObject = Fr;
|
|
3893
3940
|
function di(y) {
|
|
3894
|
-
return Ie(y) || ut(y) ||
|
|
3941
|
+
return Ie(y) || ut(y) || Ve(y) || ct(y) || Fr(y);
|
|
3895
3942
|
}
|
|
3896
3943
|
t.isBoxedPrimitive = di;
|
|
3897
3944
|
function fi(y) {
|
|
@@ -3906,7 +3953,7 @@ var Qa = function(e) {
|
|
|
3906
3953
|
});
|
|
3907
3954
|
});
|
|
3908
3955
|
})(Gn);
|
|
3909
|
-
var
|
|
3956
|
+
var Ja = function(e) {
|
|
3910
3957
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3911
3958
|
}, yr = { exports: {} };
|
|
3912
3959
|
typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
@@ -3926,69 +3973,69 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
3926
3973
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3927
3974
|
}
|
|
3928
3975
|
};
|
|
3929
|
-
var
|
|
3976
|
+
var Xa = yr.exports;
|
|
3930
3977
|
(function(t) {
|
|
3931
3978
|
var e = Object.getOwnPropertyDescriptors || function(p) {
|
|
3932
|
-
for (var
|
|
3933
|
-
S[
|
|
3979
|
+
for (var m = Object.keys(p), S = {}, _ = 0; _ < m.length; _++)
|
|
3980
|
+
S[m[_]] = Object.getOwnPropertyDescriptor(p, m[_]);
|
|
3934
3981
|
return S;
|
|
3935
3982
|
}, r = /%[sdj%]/g;
|
|
3936
3983
|
t.format = function(d) {
|
|
3937
3984
|
if (!k(d)) {
|
|
3938
|
-
for (var p = [],
|
|
3939
|
-
p.push(s(arguments[
|
|
3985
|
+
for (var p = [], m = 0; m < arguments.length; m++)
|
|
3986
|
+
p.push(s(arguments[m]));
|
|
3940
3987
|
return p.join(" ");
|
|
3941
3988
|
}
|
|
3942
|
-
for (var
|
|
3989
|
+
for (var m = 1, S = arguments, _ = S.length, C = String(d).replace(r, function(O) {
|
|
3943
3990
|
if (O === "%%") return "%";
|
|
3944
|
-
if (
|
|
3991
|
+
if (m >= _) return O;
|
|
3945
3992
|
switch (O) {
|
|
3946
3993
|
case "%s":
|
|
3947
|
-
return String(S[
|
|
3994
|
+
return String(S[m++]);
|
|
3948
3995
|
case "%d":
|
|
3949
|
-
return Number(S[
|
|
3996
|
+
return Number(S[m++]);
|
|
3950
3997
|
case "%j":
|
|
3951
3998
|
try {
|
|
3952
|
-
return JSON.stringify(S[
|
|
3999
|
+
return JSON.stringify(S[m++]);
|
|
3953
4000
|
} catch {
|
|
3954
4001
|
return "[Circular]";
|
|
3955
4002
|
}
|
|
3956
4003
|
default:
|
|
3957
4004
|
return O;
|
|
3958
4005
|
}
|
|
3959
|
-
}),
|
|
3960
|
-
R(
|
|
4006
|
+
}), E = S[m]; m < _; E = S[++m])
|
|
4007
|
+
R(E) || !ie(E) ? C += " " + E : C += " " + s(E);
|
|
3961
4008
|
return C;
|
|
3962
4009
|
}, t.deprecate = function(d, p) {
|
|
3963
|
-
if (typeof
|
|
4010
|
+
if (typeof A < "u" && A.noDeprecation === !0)
|
|
3964
4011
|
return d;
|
|
3965
|
-
if (typeof
|
|
4012
|
+
if (typeof A > "u")
|
|
3966
4013
|
return function() {
|
|
3967
4014
|
return t.deprecate(d, p).apply(this, arguments);
|
|
3968
4015
|
};
|
|
3969
|
-
var
|
|
4016
|
+
var m = !1;
|
|
3970
4017
|
function S() {
|
|
3971
|
-
if (!
|
|
3972
|
-
if (
|
|
4018
|
+
if (!m) {
|
|
4019
|
+
if (A.throwDeprecation)
|
|
3973
4020
|
throw new Error(p);
|
|
3974
|
-
|
|
4021
|
+
A.traceDeprecation ? console.trace(p) : console.error(p), m = !0;
|
|
3975
4022
|
}
|
|
3976
4023
|
return d.apply(this, arguments);
|
|
3977
4024
|
}
|
|
3978
4025
|
return S;
|
|
3979
4026
|
};
|
|
3980
4027
|
var n = {}, i = /^$/;
|
|
3981
|
-
if (
|
|
3982
|
-
var o =
|
|
4028
|
+
if (A.env.NODE_DEBUG) {
|
|
4029
|
+
var o = A.env.NODE_DEBUG;
|
|
3983
4030
|
o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
|
|
3984
4031
|
}
|
|
3985
4032
|
t.debuglog = function(d) {
|
|
3986
4033
|
if (d = d.toUpperCase(), !n[d])
|
|
3987
4034
|
if (i.test(d)) {
|
|
3988
|
-
var p =
|
|
4035
|
+
var p = A.pid;
|
|
3989
4036
|
n[d] = function() {
|
|
3990
|
-
var
|
|
3991
|
-
console.error("%s %d: %s", d, p,
|
|
4037
|
+
var m = t.format.apply(t, arguments);
|
|
4038
|
+
console.error("%s %d: %s", d, p, m);
|
|
3992
4039
|
};
|
|
3993
4040
|
} else
|
|
3994
4041
|
n[d] = function() {
|
|
@@ -3996,11 +4043,11 @@ var Ya = yr.exports;
|
|
|
3996
4043
|
return n[d];
|
|
3997
4044
|
};
|
|
3998
4045
|
function s(d, p) {
|
|
3999
|
-
var
|
|
4046
|
+
var m = {
|
|
4000
4047
|
seen: [],
|
|
4001
4048
|
stylize: u
|
|
4002
4049
|
};
|
|
4003
|
-
return arguments.length >= 3 && (
|
|
4050
|
+
return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), L(p) ? m.showHidden = p : p && t._extend(m, p), T(m.showHidden) && (m.showHidden = !1), T(m.depth) && (m.depth = 2), T(m.colors) && (m.colors = !1), T(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, d, m.depth);
|
|
4004
4051
|
}
|
|
4005
4052
|
t.inspect = s, s.colors = {
|
|
4006
4053
|
bold: [1, 22],
|
|
@@ -4028,64 +4075,64 @@ var Ya = yr.exports;
|
|
|
4028
4075
|
regexp: "red"
|
|
4029
4076
|
};
|
|
4030
4077
|
function a(d, p) {
|
|
4031
|
-
var
|
|
4032
|
-
return
|
|
4078
|
+
var m = s.styles[p];
|
|
4079
|
+
return m ? "\x1B[" + s.colors[m][0] + "m" + d + "\x1B[" + s.colors[m][1] + "m" : d;
|
|
4033
4080
|
}
|
|
4034
4081
|
function u(d, p) {
|
|
4035
4082
|
return d;
|
|
4036
4083
|
}
|
|
4037
4084
|
function f(d) {
|
|
4038
4085
|
var p = {};
|
|
4039
|
-
return d.forEach(function(
|
|
4040
|
-
p[
|
|
4086
|
+
return d.forEach(function(m, S) {
|
|
4087
|
+
p[m] = !0;
|
|
4041
4088
|
}), p;
|
|
4042
4089
|
}
|
|
4043
|
-
function c(d, p,
|
|
4090
|
+
function c(d, p, m) {
|
|
4044
4091
|
if (d.customInspect && p && de(p.inspect) && // Filter out the util module, it's inspect function is special
|
|
4045
4092
|
p.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4046
4093
|
!(p.constructor && p.constructor.prototype === p)) {
|
|
4047
|
-
var S = p.inspect(
|
|
4048
|
-
return k(S) || (S = c(d, S,
|
|
4094
|
+
var S = p.inspect(m, d);
|
|
4095
|
+
return k(S) || (S = c(d, S, m)), S;
|
|
4049
4096
|
}
|
|
4050
|
-
var _ =
|
|
4097
|
+
var _ = h(d, p);
|
|
4051
4098
|
if (_)
|
|
4052
4099
|
return _;
|
|
4053
|
-
var C = Object.keys(p),
|
|
4100
|
+
var C = Object.keys(p), E = f(C);
|
|
4054
4101
|
if (d.showHidden && (C = Object.getOwnPropertyNames(p)), Ee(p) && (C.indexOf("message") >= 0 || C.indexOf("description") >= 0))
|
|
4055
|
-
return
|
|
4102
|
+
return l(p);
|
|
4056
4103
|
if (C.length === 0) {
|
|
4057
4104
|
if (de(p)) {
|
|
4058
4105
|
var O = p.name ? ": " + p.name : "";
|
|
4059
4106
|
return d.stylize("[Function" + O + "]", "special");
|
|
4060
4107
|
}
|
|
4061
|
-
if (
|
|
4108
|
+
if (ne(p))
|
|
4062
4109
|
return d.stylize(RegExp.prototype.toString.call(p), "regexp");
|
|
4063
4110
|
if (Ne(p))
|
|
4064
4111
|
return d.stylize(Date.prototype.toString.call(p), "date");
|
|
4065
4112
|
if (Ee(p))
|
|
4066
|
-
return
|
|
4113
|
+
return l(p);
|
|
4067
4114
|
}
|
|
4068
4115
|
var N = "", K = !1, Ie = ["{", "}"];
|
|
4069
4116
|
if (b(p) && (K = !0, Ie = ["[", "]"]), de(p)) {
|
|
4070
4117
|
var ut = p.name ? ": " + p.name : "";
|
|
4071
4118
|
N = " [Function" + ut + "]";
|
|
4072
4119
|
}
|
|
4073
|
-
if (
|
|
4120
|
+
if (ne(p) && (N = " " + RegExp.prototype.toString.call(p)), Ne(p) && (N = " " + Date.prototype.toUTCString.call(p)), Ee(p) && (N = " " + l(p)), C.length === 0 && (!K || p.length == 0))
|
|
4074
4121
|
return Ie[0] + N + Ie[1];
|
|
4075
|
-
if (
|
|
4076
|
-
return
|
|
4122
|
+
if (m < 0)
|
|
4123
|
+
return ne(p) ? d.stylize(RegExp.prototype.toString.call(p), "regexp") : d.stylize("[Object]", "special");
|
|
4077
4124
|
d.seen.push(p);
|
|
4078
|
-
var
|
|
4079
|
-
return K ?
|
|
4080
|
-
return v(d, p,
|
|
4081
|
-
}), d.seen.pop(),
|
|
4125
|
+
var Ve;
|
|
4126
|
+
return K ? Ve = g(d, p, m, E, C) : Ve = C.map(function(ct) {
|
|
4127
|
+
return v(d, p, m, E, ct, K);
|
|
4128
|
+
}), d.seen.pop(), w(Ve, N, Ie);
|
|
4082
4129
|
}
|
|
4083
|
-
function
|
|
4130
|
+
function h(d, p) {
|
|
4084
4131
|
if (T(p))
|
|
4085
4132
|
return d.stylize("undefined", "undefined");
|
|
4086
4133
|
if (k(p)) {
|
|
4087
|
-
var
|
|
4088
|
-
return d.stylize(
|
|
4134
|
+
var m = "'" + JSON.stringify(p).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4135
|
+
return d.stylize(m, "string");
|
|
4089
4136
|
}
|
|
4090
4137
|
if (X(p))
|
|
4091
4138
|
return d.stylize("" + p, "number");
|
|
@@ -4094,33 +4141,33 @@ var Ya = yr.exports;
|
|
|
4094
4141
|
if (R(p))
|
|
4095
4142
|
return d.stylize("null", "null");
|
|
4096
4143
|
}
|
|
4097
|
-
function
|
|
4144
|
+
function l(d) {
|
|
4098
4145
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
4099
4146
|
}
|
|
4100
|
-
function
|
|
4101
|
-
for (var C = [],
|
|
4102
|
-
De(p, String(
|
|
4147
|
+
function g(d, p, m, S, _) {
|
|
4148
|
+
for (var C = [], E = 0, O = p.length; E < O; ++E)
|
|
4149
|
+
De(p, String(E)) ? C.push(v(
|
|
4103
4150
|
d,
|
|
4104
4151
|
p,
|
|
4105
|
-
|
|
4152
|
+
m,
|
|
4106
4153
|
S,
|
|
4107
|
-
String(
|
|
4154
|
+
String(E),
|
|
4108
4155
|
!0
|
|
4109
4156
|
)) : C.push("");
|
|
4110
4157
|
return _.forEach(function(N) {
|
|
4111
4158
|
N.match(/^\d+$/) || C.push(v(
|
|
4112
4159
|
d,
|
|
4113
4160
|
p,
|
|
4114
|
-
|
|
4161
|
+
m,
|
|
4115
4162
|
S,
|
|
4116
4163
|
N,
|
|
4117
4164
|
!0
|
|
4118
4165
|
));
|
|
4119
4166
|
}), C;
|
|
4120
4167
|
}
|
|
4121
|
-
function v(d, p,
|
|
4122
|
-
var
|
|
4123
|
-
if (N = Object.getOwnPropertyDescriptor(p, _) || { value: p[_] }, N.get ? N.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : N.set && (O = d.stylize("[Setter]", "special")), De(S, _) || (
|
|
4168
|
+
function v(d, p, m, S, _, C) {
|
|
4169
|
+
var E, O, N;
|
|
4170
|
+
if (N = Object.getOwnPropertyDescriptor(p, _) || { value: p[_] }, N.get ? N.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : N.set && (O = d.stylize("[Setter]", "special")), De(S, _) || (E = "[" + _ + "]"), O || (d.seen.indexOf(N.value) < 0 ? (R(m) ? O = c(d, N.value, null) : O = c(d, N.value, m - 1), O.indexOf(`
|
|
4124
4171
|
`) > -1 && (C ? O = O.split(`
|
|
4125
4172
|
`).map(function(K) {
|
|
4126
4173
|
return " " + K;
|
|
@@ -4130,21 +4177,21 @@ var Ya = yr.exports;
|
|
|
4130
4177
|
`).map(function(K) {
|
|
4131
4178
|
return " " + K;
|
|
4132
4179
|
}).join(`
|
|
4133
|
-
`))) : O = d.stylize("[Circular]", "special")), T(
|
|
4180
|
+
`))) : O = d.stylize("[Circular]", "special")), T(E)) {
|
|
4134
4181
|
if (C && _.match(/^\d+$/))
|
|
4135
4182
|
return O;
|
|
4136
|
-
|
|
4183
|
+
E = JSON.stringify("" + _), E.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (E = E.slice(1, -1), E = d.stylize(E, "name")) : (E = E.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), E = d.stylize(E, "string"));
|
|
4137
4184
|
}
|
|
4138
|
-
return
|
|
4185
|
+
return E + ": " + O;
|
|
4139
4186
|
}
|
|
4140
|
-
function
|
|
4187
|
+
function w(d, p, m) {
|
|
4141
4188
|
var S = d.reduce(function(_, C) {
|
|
4142
4189
|
return C.indexOf(`
|
|
4143
4190
|
`) >= 0, _ + C.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4144
4191
|
}, 0);
|
|
4145
|
-
return S > 60 ?
|
|
4192
|
+
return S > 60 ? m[0] + (p === "" ? "" : p + `
|
|
4146
4193
|
`) + " " + d.join(`,
|
|
4147
|
-
`) + " " +
|
|
4194
|
+
`) + " " + m[1] : m[0] + p + " " + d.join(", ") + " " + m[1];
|
|
4148
4195
|
}
|
|
4149
4196
|
t.types = Gn;
|
|
4150
4197
|
function b(d) {
|
|
@@ -4171,28 +4218,28 @@ var Ya = yr.exports;
|
|
|
4171
4218
|
return typeof d == "string";
|
|
4172
4219
|
}
|
|
4173
4220
|
t.isString = k;
|
|
4174
|
-
function
|
|
4221
|
+
function V(d) {
|
|
4175
4222
|
return typeof d == "symbol";
|
|
4176
4223
|
}
|
|
4177
|
-
t.isSymbol =
|
|
4224
|
+
t.isSymbol = V;
|
|
4178
4225
|
function T(d) {
|
|
4179
4226
|
return d === void 0;
|
|
4180
4227
|
}
|
|
4181
4228
|
t.isUndefined = T;
|
|
4182
|
-
function re(d) {
|
|
4183
|
-
return ne(d) && Se(d) === "[object RegExp]";
|
|
4184
|
-
}
|
|
4185
|
-
t.isRegExp = re, t.types.isRegExp = re;
|
|
4186
4229
|
function ne(d) {
|
|
4230
|
+
return ie(d) && Se(d) === "[object RegExp]";
|
|
4231
|
+
}
|
|
4232
|
+
t.isRegExp = ne, t.types.isRegExp = ne;
|
|
4233
|
+
function ie(d) {
|
|
4187
4234
|
return typeof d == "object" && d !== null;
|
|
4188
4235
|
}
|
|
4189
|
-
t.isObject =
|
|
4236
|
+
t.isObject = ie;
|
|
4190
4237
|
function Ne(d) {
|
|
4191
|
-
return
|
|
4238
|
+
return ie(d) && Se(d) === "[object Date]";
|
|
4192
4239
|
}
|
|
4193
4240
|
t.isDate = Ne, t.types.isDate = Ne;
|
|
4194
4241
|
function Ee(d) {
|
|
4195
|
-
return
|
|
4242
|
+
return ie(d) && (Se(d) === "[object Error]" || d instanceof Error);
|
|
4196
4243
|
}
|
|
4197
4244
|
t.isError = Ee, t.types.isNativeError = Ee;
|
|
4198
4245
|
function de(d) {
|
|
@@ -4203,7 +4250,7 @@ var Ya = yr.exports;
|
|
|
4203
4250
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
4204
4251
|
typeof d > "u";
|
|
4205
4252
|
}
|
|
4206
|
-
t.isPrimitive = Mt, t.isBuffer =
|
|
4253
|
+
t.isPrimitive = Mt, t.isBuffer = Ja;
|
|
4207
4254
|
function Se(d) {
|
|
4208
4255
|
return Object.prototype.toString.call(d);
|
|
4209
4256
|
}
|
|
@@ -4234,10 +4281,10 @@ var Ya = yr.exports;
|
|
|
4234
4281
|
}
|
|
4235
4282
|
t.log = function() {
|
|
4236
4283
|
console.log("%s - %s", jt(), t.format.apply(t, arguments));
|
|
4237
|
-
}, t.inherits =
|
|
4238
|
-
if (!p || !
|
|
4239
|
-
for (var
|
|
4240
|
-
d[
|
|
4284
|
+
}, t.inherits = Xa, t._extend = function(d, p) {
|
|
4285
|
+
if (!p || !ie(p)) return d;
|
|
4286
|
+
for (var m = Object.keys(p), S = m.length; S--; )
|
|
4287
|
+
d[m[S]] = p[m[S]];
|
|
4241
4288
|
return d;
|
|
4242
4289
|
};
|
|
4243
4290
|
function De(d, p) {
|
|
@@ -4248,45 +4295,45 @@ var Ya = yr.exports;
|
|
|
4248
4295
|
if (typeof p != "function")
|
|
4249
4296
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4250
4297
|
if (fe && p[fe]) {
|
|
4251
|
-
var
|
|
4252
|
-
if (typeof
|
|
4298
|
+
var m = p[fe];
|
|
4299
|
+
if (typeof m != "function")
|
|
4253
4300
|
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
4254
|
-
return Object.defineProperty(
|
|
4255
|
-
value:
|
|
4301
|
+
return Object.defineProperty(m, fe, {
|
|
4302
|
+
value: m,
|
|
4256
4303
|
enumerable: !1,
|
|
4257
4304
|
writable: !1,
|
|
4258
4305
|
configurable: !0
|
|
4259
|
-
}),
|
|
4306
|
+
}), m;
|
|
4260
4307
|
}
|
|
4261
|
-
function
|
|
4308
|
+
function m() {
|
|
4262
4309
|
for (var S, _, C = new Promise(function(N, K) {
|
|
4263
4310
|
S = N, _ = K;
|
|
4264
|
-
}),
|
|
4265
|
-
|
|
4266
|
-
|
|
4311
|
+
}), E = [], O = 0; O < arguments.length; O++)
|
|
4312
|
+
E.push(arguments[O]);
|
|
4313
|
+
E.push(function(N, K) {
|
|
4267
4314
|
N ? _(N) : S(K);
|
|
4268
4315
|
});
|
|
4269
4316
|
try {
|
|
4270
|
-
p.apply(this,
|
|
4317
|
+
p.apply(this, E);
|
|
4271
4318
|
} catch (N) {
|
|
4272
4319
|
_(N);
|
|
4273
4320
|
}
|
|
4274
4321
|
return C;
|
|
4275
4322
|
}
|
|
4276
|
-
return Object.setPrototypeOf(
|
|
4277
|
-
value:
|
|
4323
|
+
return Object.setPrototypeOf(m, Object.getPrototypeOf(p)), fe && Object.defineProperty(m, fe, {
|
|
4324
|
+
value: m,
|
|
4278
4325
|
enumerable: !1,
|
|
4279
4326
|
writable: !1,
|
|
4280
4327
|
configurable: !0
|
|
4281
4328
|
}), Object.defineProperties(
|
|
4282
|
-
|
|
4329
|
+
m,
|
|
4283
4330
|
e(p)
|
|
4284
4331
|
);
|
|
4285
4332
|
}, t.promisify.custom = fe;
|
|
4286
4333
|
function Re(d, p) {
|
|
4287
4334
|
if (!d) {
|
|
4288
|
-
var
|
|
4289
|
-
|
|
4335
|
+
var m = new Error("Promise was rejected with a falsy value");
|
|
4336
|
+
m.reason = d, d = m;
|
|
4290
4337
|
}
|
|
4291
4338
|
return p(d);
|
|
4292
4339
|
}
|
|
@@ -4294,20 +4341,20 @@ var Ya = yr.exports;
|
|
|
4294
4341
|
if (typeof d != "function")
|
|
4295
4342
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4296
4343
|
function p() {
|
|
4297
|
-
for (var
|
|
4298
|
-
|
|
4299
|
-
var _ =
|
|
4344
|
+
for (var m = [], S = 0; S < arguments.length; S++)
|
|
4345
|
+
m.push(arguments[S]);
|
|
4346
|
+
var _ = m.pop();
|
|
4300
4347
|
if (typeof _ != "function")
|
|
4301
4348
|
throw new TypeError("The last argument must be of type Function");
|
|
4302
|
-
var C = this,
|
|
4349
|
+
var C = this, E = function() {
|
|
4303
4350
|
return _.apply(C, arguments);
|
|
4304
4351
|
};
|
|
4305
|
-
d.apply(this,
|
|
4352
|
+
d.apply(this, m).then(
|
|
4306
4353
|
function(O) {
|
|
4307
|
-
|
|
4354
|
+
A.nextTick(E.bind(null, null, O));
|
|
4308
4355
|
},
|
|
4309
4356
|
function(O) {
|
|
4310
|
-
|
|
4357
|
+
A.nextTick(Re.bind(null, O, E));
|
|
4311
4358
|
}
|
|
4312
4359
|
);
|
|
4313
4360
|
}
|
|
@@ -4318,7 +4365,7 @@ var Ya = yr.exports;
|
|
|
4318
4365
|
}
|
|
4319
4366
|
t.callbackify = at;
|
|
4320
4367
|
})(Ft);
|
|
4321
|
-
const { inherits:
|
|
4368
|
+
const { inherits: Za, format: Yt } = Ft;
|
|
4322
4369
|
function Oe(t, e, r = Error) {
|
|
4323
4370
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4324
4371
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -4329,7 +4376,7 @@ function Oe(t, e, r = Error) {
|
|
|
4329
4376
|
}
|
|
4330
4377
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4331
4378
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4332
|
-
},
|
|
4379
|
+
}, Za(n, r), n;
|
|
4333
4380
|
}
|
|
4334
4381
|
var ai = {
|
|
4335
4382
|
createError: Oe,
|
|
@@ -4357,7 +4404,7 @@ var ai = {
|
|
|
4357
4404
|
"AVV_ERR_READY_TIMEOUT",
|
|
4358
4405
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4359
4406
|
)
|
|
4360
|
-
},
|
|
4407
|
+
}, eu = function t(e, r, n) {
|
|
4361
4408
|
r === void 0 && (r = ""), n || (n = {});
|
|
4362
4409
|
var i = function(u) {
|
|
4363
4410
|
var f = {
|
|
@@ -4375,12 +4422,12 @@ var ai = {
|
|
|
4375
4422
|
` + r + (o.length ? i("│") : " ") + " ";
|
|
4376
4423
|
return r + s.join(a) + `
|
|
4377
4424
|
` + o.map(function(u, f) {
|
|
4378
|
-
var c = f === o.length - 1,
|
|
4379
|
-
return r + i(c ? "└" : "├") + i("─") + i(
|
|
4425
|
+
var c = f === o.length - 1, h = u.nodes && u.nodes.length, l = r + (c ? " " : i("│")) + " ";
|
|
4426
|
+
return r + i(c ? "└" : "├") + i("─") + i(h ? "┬" : "─") + " " + t(u, l, n).slice(r.length + 2);
|
|
4380
4427
|
}).join("");
|
|
4381
4428
|
};
|
|
4382
|
-
const
|
|
4383
|
-
let
|
|
4429
|
+
const tu = eu, pn = Symbol("avvio.TimeTree.untrackNode"), Jt = Symbol("avvio.TimeTree.trackNode"), yn = Symbol("avvio.TimeTree.getParent"), gn = Symbol("avvio.TimeTree.getNode"), mn = Symbol("avvio.TimeTree.addNode");
|
|
4430
|
+
let ru = class {
|
|
4384
4431
|
constructor() {
|
|
4385
4432
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4386
4433
|
}
|
|
@@ -4434,71 +4481,71 @@ let eu = class {
|
|
|
4434
4481
|
}
|
|
4435
4482
|
prittyPrint() {
|
|
4436
4483
|
const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
|
|
4437
|
-
return
|
|
4484
|
+
return tu(r);
|
|
4438
4485
|
}
|
|
4439
4486
|
};
|
|
4440
|
-
var
|
|
4441
|
-
function
|
|
4487
|
+
var nu = ru, Pr = { exports: {} }, gr = { exports: {} }, Xt, vn;
|
|
4488
|
+
function iu() {
|
|
4442
4489
|
if (vn) return Xt;
|
|
4443
4490
|
vn = 1;
|
|
4444
4491
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4445
|
-
Xt = function(c,
|
|
4446
|
-
|
|
4447
|
-
var
|
|
4448
|
-
if (
|
|
4492
|
+
Xt = function(c, h) {
|
|
4493
|
+
h = h || {};
|
|
4494
|
+
var l = typeof c;
|
|
4495
|
+
if (l === "string" && c.length > 0)
|
|
4449
4496
|
return s(c);
|
|
4450
|
-
if (
|
|
4451
|
-
return
|
|
4497
|
+
if (l === "number" && isFinite(c))
|
|
4498
|
+
return h.long ? u(c) : a(c);
|
|
4452
4499
|
throw new Error(
|
|
4453
4500
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(c)
|
|
4454
4501
|
);
|
|
4455
4502
|
};
|
|
4456
4503
|
function s(c) {
|
|
4457
4504
|
if (c = String(c), !(c.length > 100)) {
|
|
4458
|
-
var
|
|
4505
|
+
var h = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
4459
4506
|
c
|
|
4460
4507
|
);
|
|
4461
|
-
if (
|
|
4462
|
-
var
|
|
4463
|
-
switch (
|
|
4508
|
+
if (h) {
|
|
4509
|
+
var l = parseFloat(h[1]), g = (h[2] || "ms").toLowerCase();
|
|
4510
|
+
switch (g) {
|
|
4464
4511
|
case "years":
|
|
4465
4512
|
case "year":
|
|
4466
4513
|
case "yrs":
|
|
4467
4514
|
case "yr":
|
|
4468
4515
|
case "y":
|
|
4469
|
-
return
|
|
4516
|
+
return l * o;
|
|
4470
4517
|
case "weeks":
|
|
4471
4518
|
case "week":
|
|
4472
4519
|
case "w":
|
|
4473
|
-
return
|
|
4520
|
+
return l * i;
|
|
4474
4521
|
case "days":
|
|
4475
4522
|
case "day":
|
|
4476
4523
|
case "d":
|
|
4477
|
-
return
|
|
4524
|
+
return l * n;
|
|
4478
4525
|
case "hours":
|
|
4479
4526
|
case "hour":
|
|
4480
4527
|
case "hrs":
|
|
4481
4528
|
case "hr":
|
|
4482
4529
|
case "h":
|
|
4483
|
-
return
|
|
4530
|
+
return l * r;
|
|
4484
4531
|
case "minutes":
|
|
4485
4532
|
case "minute":
|
|
4486
4533
|
case "mins":
|
|
4487
4534
|
case "min":
|
|
4488
4535
|
case "m":
|
|
4489
|
-
return
|
|
4536
|
+
return l * e;
|
|
4490
4537
|
case "seconds":
|
|
4491
4538
|
case "second":
|
|
4492
4539
|
case "secs":
|
|
4493
4540
|
case "sec":
|
|
4494
4541
|
case "s":
|
|
4495
|
-
return
|
|
4542
|
+
return l * t;
|
|
4496
4543
|
case "milliseconds":
|
|
4497
4544
|
case "millisecond":
|
|
4498
4545
|
case "msecs":
|
|
4499
4546
|
case "msec":
|
|
4500
4547
|
case "ms":
|
|
4501
|
-
return
|
|
4548
|
+
return l;
|
|
4502
4549
|
default:
|
|
4503
4550
|
return;
|
|
4504
4551
|
}
|
|
@@ -4506,86 +4553,86 @@ function ru() {
|
|
|
4506
4553
|
}
|
|
4507
4554
|
}
|
|
4508
4555
|
function a(c) {
|
|
4509
|
-
var
|
|
4510
|
-
return
|
|
4556
|
+
var h = Math.abs(c);
|
|
4557
|
+
return h >= n ? Math.round(c / n) + "d" : h >= r ? Math.round(c / r) + "h" : h >= e ? Math.round(c / e) + "m" : h >= t ? Math.round(c / t) + "s" : c + "ms";
|
|
4511
4558
|
}
|
|
4512
4559
|
function u(c) {
|
|
4513
|
-
var
|
|
4514
|
-
return
|
|
4560
|
+
var h = Math.abs(c);
|
|
4561
|
+
return h >= n ? f(c, h, n, "day") : h >= r ? f(c, h, r, "hour") : h >= e ? f(c, h, e, "minute") : h >= t ? f(c, h, t, "second") : c + " ms";
|
|
4515
4562
|
}
|
|
4516
|
-
function f(c,
|
|
4517
|
-
var v =
|
|
4518
|
-
return Math.round(c /
|
|
4563
|
+
function f(c, h, l, g) {
|
|
4564
|
+
var v = h >= l * 1.5;
|
|
4565
|
+
return Math.round(c / l) + " " + g + (v ? "s" : "");
|
|
4519
4566
|
}
|
|
4520
4567
|
return Xt;
|
|
4521
4568
|
}
|
|
4522
|
-
function
|
|
4523
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4569
|
+
function ou(t) {
|
|
4570
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = iu(), r.destroy = f, Object.keys(t).forEach((c) => {
|
|
4524
4571
|
r[c] = t[c];
|
|
4525
4572
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4526
4573
|
function e(c) {
|
|
4527
|
-
let
|
|
4528
|
-
for (let
|
|
4529
|
-
|
|
4530
|
-
return r.colors[Math.abs(
|
|
4574
|
+
let h = 0;
|
|
4575
|
+
for (let l = 0; l < c.length; l++)
|
|
4576
|
+
h = (h << 5) - h + c.charCodeAt(l), h |= 0;
|
|
4577
|
+
return r.colors[Math.abs(h) % r.colors.length];
|
|
4531
4578
|
}
|
|
4532
4579
|
r.selectColor = e;
|
|
4533
4580
|
function r(c) {
|
|
4534
|
-
let
|
|
4535
|
-
function
|
|
4536
|
-
if (!
|
|
4581
|
+
let h, l = null, g, v;
|
|
4582
|
+
function w(...b) {
|
|
4583
|
+
if (!w.enabled)
|
|
4537
4584
|
return;
|
|
4538
|
-
const L =
|
|
4539
|
-
L.diff = Q, L.prev =
|
|
4585
|
+
const L = w, R = Number(/* @__PURE__ */ new Date()), Q = R - (h || R);
|
|
4586
|
+
L.diff = Q, L.prev = h, L.curr = R, h = R, b[0] = r.coerce(b[0]), typeof b[0] != "string" && b.unshift("%O");
|
|
4540
4587
|
let X = 0;
|
|
4541
|
-
b[0] = b[0].replace(/%([a-zA-Z%])/g, (
|
|
4542
|
-
if (
|
|
4588
|
+
b[0] = b[0].replace(/%([a-zA-Z%])/g, (V, T) => {
|
|
4589
|
+
if (V === "%%")
|
|
4543
4590
|
return "%";
|
|
4544
4591
|
X++;
|
|
4545
|
-
const
|
|
4546
|
-
if (typeof
|
|
4547
|
-
const
|
|
4548
|
-
|
|
4592
|
+
const ne = r.formatters[T];
|
|
4593
|
+
if (typeof ne == "function") {
|
|
4594
|
+
const ie = b[X];
|
|
4595
|
+
V = ne.call(L, ie), b.splice(X, 1), X--;
|
|
4549
4596
|
}
|
|
4550
|
-
return
|
|
4597
|
+
return V;
|
|
4551
4598
|
}), r.formatArgs.call(L, b), (L.log || r.log).apply(L, b);
|
|
4552
4599
|
}
|
|
4553
|
-
return
|
|
4600
|
+
return w.namespace = c, w.useColors = r.useColors(), w.color = r.selectColor(c), w.extend = n, w.destroy = r.destroy, Object.defineProperty(w, "enabled", {
|
|
4554
4601
|
enumerable: !0,
|
|
4555
4602
|
configurable: !1,
|
|
4556
|
-
get: () =>
|
|
4603
|
+
get: () => l !== null ? l : (g !== r.namespaces && (g = r.namespaces, v = r.enabled(c)), v),
|
|
4557
4604
|
set: (b) => {
|
|
4558
|
-
|
|
4605
|
+
l = b;
|
|
4559
4606
|
}
|
|
4560
|
-
}), typeof r.init == "function" && r.init(
|
|
4607
|
+
}), typeof r.init == "function" && r.init(w), w;
|
|
4561
4608
|
}
|
|
4562
|
-
function n(c,
|
|
4563
|
-
const
|
|
4564
|
-
return
|
|
4609
|
+
function n(c, h) {
|
|
4610
|
+
const l = r(this.namespace + (typeof h > "u" ? ":" : h) + c);
|
|
4611
|
+
return l.log = this.log, l;
|
|
4565
4612
|
}
|
|
4566
4613
|
function i(c) {
|
|
4567
4614
|
r.save(c), r.namespaces = c, r.names = [], r.skips = [];
|
|
4568
|
-
let
|
|
4569
|
-
const
|
|
4570
|
-
for (
|
|
4571
|
-
h
|
|
4615
|
+
let h;
|
|
4616
|
+
const l = (typeof c == "string" ? c : "").split(/[\s,]+/), g = l.length;
|
|
4617
|
+
for (h = 0; h < g; h++)
|
|
4618
|
+
l[h] && (c = l[h].replace(/\*/g, ".*?"), c[0] === "-" ? r.skips.push(new RegExp("^" + c.slice(1) + "$")) : r.names.push(new RegExp("^" + c + "$")));
|
|
4572
4619
|
}
|
|
4573
4620
|
function o() {
|
|
4574
4621
|
const c = [
|
|
4575
4622
|
...r.names.map(a),
|
|
4576
|
-
...r.skips.map(a).map((
|
|
4623
|
+
...r.skips.map(a).map((h) => "-" + h)
|
|
4577
4624
|
].join(",");
|
|
4578
4625
|
return r.enable(""), c;
|
|
4579
4626
|
}
|
|
4580
4627
|
function s(c) {
|
|
4581
4628
|
if (c[c.length - 1] === "*")
|
|
4582
4629
|
return !0;
|
|
4583
|
-
let
|
|
4584
|
-
for (
|
|
4585
|
-
if (r.skips[
|
|
4630
|
+
let h, l;
|
|
4631
|
+
for (h = 0, l = r.skips.length; h < l; h++)
|
|
4632
|
+
if (r.skips[h].test(c))
|
|
4586
4633
|
return !1;
|
|
4587
|
-
for (
|
|
4588
|
-
if (r.names[
|
|
4634
|
+
for (h = 0, l = r.names.length; h < l; h++)
|
|
4635
|
+
if (r.names[h].test(c))
|
|
4589
4636
|
return !0;
|
|
4590
4637
|
return !1;
|
|
4591
4638
|
}
|
|
@@ -4600,7 +4647,7 @@ function nu(t) {
|
|
|
4600
4647
|
}
|
|
4601
4648
|
return r.enable(r.load()), r;
|
|
4602
4649
|
}
|
|
4603
|
-
var
|
|
4650
|
+
var su = ou;
|
|
4604
4651
|
(function(t, e) {
|
|
4605
4652
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4606
4653
|
let u = !1;
|
|
@@ -4697,10 +4744,10 @@ var iu = nu;
|
|
|
4697
4744
|
return;
|
|
4698
4745
|
const f = "color: " + this.color;
|
|
4699
4746
|
u.splice(1, 0, f, "color: inherit");
|
|
4700
|
-
let c = 0,
|
|
4701
|
-
u[0].replace(/%[a-zA-Z%]/g, (
|
|
4702
|
-
|
|
4703
|
-
}), u.splice(
|
|
4747
|
+
let c = 0, h = 0;
|
|
4748
|
+
u[0].replace(/%[a-zA-Z%]/g, (l) => {
|
|
4749
|
+
l !== "%%" && (c++, l === "%c" && (h = c));
|
|
4750
|
+
}), u.splice(h, 0, f);
|
|
4704
4751
|
}
|
|
4705
4752
|
e.log = console.debug || console.log || (() => {
|
|
4706
4753
|
});
|
|
@@ -4716,7 +4763,7 @@ var iu = nu;
|
|
|
4716
4763
|
u = e.storage.getItem("debug");
|
|
4717
4764
|
} catch {
|
|
4718
4765
|
}
|
|
4719
|
-
return !u && typeof
|
|
4766
|
+
return !u && typeof A < "u" && "env" in A && (u = A.env.DEBUG), u;
|
|
4720
4767
|
}
|
|
4721
4768
|
function s() {
|
|
4722
4769
|
try {
|
|
@@ -4724,7 +4771,7 @@ var iu = nu;
|
|
|
4724
4771
|
} catch {
|
|
4725
4772
|
}
|
|
4726
4773
|
}
|
|
4727
|
-
t.exports =
|
|
4774
|
+
t.exports = su(e);
|
|
4728
4775
|
const { formatters: a } = t.exports;
|
|
4729
4776
|
a.j = function(u) {
|
|
4730
4777
|
try {
|
|
@@ -4735,27 +4782,27 @@ var iu = nu;
|
|
|
4735
4782
|
};
|
|
4736
4783
|
})(gr, gr.exports);
|
|
4737
4784
|
var ui = gr.exports;
|
|
4738
|
-
const
|
|
4739
|
-
function
|
|
4785
|
+
const au = Rn, uu = Qn.EventEmitter, cu = Ft.inherits, j = ui("avvio"), { AVV_ERR_READY_TIMEOUT: lu } = ai, Zt = Symbol.for("plugin-meta");
|
|
4786
|
+
function du(t, e) {
|
|
4740
4787
|
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(`
|
|
4741
4788
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4742
4789
|
}
|
|
4743
|
-
function
|
|
4790
|
+
function fu() {
|
|
4744
4791
|
const t = {};
|
|
4745
4792
|
return t.promise = new Promise((e, r) => {
|
|
4746
4793
|
t.resolve = e, t.reject = r;
|
|
4747
4794
|
}), t;
|
|
4748
4795
|
}
|
|
4749
4796
|
function We(t, e, r, n, i) {
|
|
4750
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name =
|
|
4797
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = du(e, r), this.isAfter = n, this.q = au(t, hu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4751
4798
|
}
|
|
4752
|
-
|
|
4799
|
+
cu(We, uu);
|
|
4753
4800
|
We.prototype.exec = function(t, e) {
|
|
4754
4801
|
const r = this.func;
|
|
4755
4802
|
let n = !1;
|
|
4756
4803
|
const i = this.name;
|
|
4757
4804
|
if (this.parent._error && !this.isAfter) {
|
|
4758
|
-
j("skipping loading of plugin as parent errored and it is not an after", i),
|
|
4805
|
+
j("skipping loading of plugin as parent errored and it is not an after", i), A.nextTick(e);
|
|
4759
4806
|
return;
|
|
4760
4807
|
}
|
|
4761
4808
|
if (this.isAfter)
|
|
@@ -4777,13 +4824,13 @@ We.prototype.exec = function(t, e) {
|
|
|
4777
4824
|
};
|
|
4778
4825
|
this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4779
4826
|
j("timed out", i), o = null;
|
|
4780
|
-
const u = new
|
|
4827
|
+
const u = new lu(i);
|
|
4781
4828
|
u.fn = r, s(u);
|
|
4782
4829
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4783
4830
|
const a = r(this.server, this.opts, s);
|
|
4784
4831
|
a && typeof a.then == "function" && (j("exec: resolving promise", i), a.then(
|
|
4785
|
-
() =>
|
|
4786
|
-
(u) =>
|
|
4832
|
+
() => A.nextTick(s),
|
|
4833
|
+
(u) => A.nextTick(s, u)
|
|
4787
4834
|
));
|
|
4788
4835
|
};
|
|
4789
4836
|
We.prototype.loadedSoFar = function() {
|
|
@@ -4791,11 +4838,11 @@ We.prototype.loadedSoFar = function() {
|
|
|
4791
4838
|
return Promise.resolve();
|
|
4792
4839
|
const t = () => {
|
|
4793
4840
|
this.server.after((r, n) => {
|
|
4794
|
-
this._error = r, this.q.pause(), r ? (j("rejecting promise", this.name, r), this._promise.reject(r)) : (j("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4841
|
+
this._error = r, this.q.pause(), r ? (j("rejecting promise", this.name, r), this._promise.reject(r)) : (j("resolving promise", this.name), this._promise.resolve()), this._promise = null, A.nextTick(n, r);
|
|
4795
4842
|
}), this.q.resume();
|
|
4796
4843
|
};
|
|
4797
4844
|
let e;
|
|
4798
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4845
|
+
return this._promise ? e = Promise.resolve() : (this._promise = fu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4799
4846
|
};
|
|
4800
4847
|
We.prototype.enqueue = function(t, e) {
|
|
4801
4848
|
j("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4820,14 +4867,14 @@ We.prototype.finish = function(t, e) {
|
|
|
4820
4867
|
r();
|
|
4821
4868
|
else
|
|
4822
4869
|
j("delayed", this.name), this.q.drain = () => {
|
|
4823
|
-
j("drain", this.name), this.q.drain =
|
|
4870
|
+
j("drain", this.name), this.q.drain = pu, queueMicrotask(n);
|
|
4824
4871
|
};
|
|
4825
4872
|
};
|
|
4826
4873
|
queueMicrotask(n), this.q.resume();
|
|
4827
4874
|
};
|
|
4828
|
-
function
|
|
4875
|
+
function hu(t, e) {
|
|
4829
4876
|
const r = this;
|
|
4830
|
-
|
|
4877
|
+
A.nextTick(Nr.bind(r), t, e);
|
|
4831
4878
|
}
|
|
4832
4879
|
function Nr(t, e) {
|
|
4833
4880
|
if (typeof t.func.then == "function") {
|
|
@@ -4843,19 +4890,19 @@ function Nr(t, e) {
|
|
|
4843
4890
|
});
|
|
4844
4891
|
});
|
|
4845
4892
|
}
|
|
4846
|
-
function
|
|
4893
|
+
function pu() {
|
|
4847
4894
|
}
|
|
4848
4895
|
Pr.exports = We;
|
|
4849
4896
|
Pr.exports.loadPlugin = Nr;
|
|
4850
|
-
var
|
|
4851
|
-
const bn = Rn,
|
|
4897
|
+
var yu = Pr.exports;
|
|
4898
|
+
const bn = Rn, gu = Qn.EventEmitter, mu = Ft.inherits, {
|
|
4852
4899
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
4853
4900
|
AVV_ERR_CALLBACK_NOT_FN: et,
|
|
4854
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4855
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4856
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4857
|
-
} = ai,
|
|
4858
|
-
function
|
|
4901
|
+
AVV_ERR_PLUGIN_NOT_VALID: vu,
|
|
4902
|
+
AVV_ERR_ROOT_PLG_BOOTED: bu,
|
|
4903
|
+
AVV_ERR_READY_TIMEOUT: Su
|
|
4904
|
+
} = ai, wu = nu, mr = yu, ze = ui("avvio"), Lt = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
|
|
4905
|
+
function Au(t, e, r) {
|
|
4859
4906
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4860
4907
|
if (t[i])
|
|
4861
4908
|
throw new er(i);
|
|
@@ -4874,7 +4921,7 @@ function Su(t, e, r) {
|
|
|
4874
4921
|
}, t[a] = function(f) {
|
|
4875
4922
|
if (typeof f != "function")
|
|
4876
4923
|
throw new et(a, typeof f);
|
|
4877
|
-
return r.onClose(
|
|
4924
|
+
return r.onClose(_u(f, this)), this;
|
|
4878
4925
|
}, t[u] = function(f) {
|
|
4879
4926
|
if (f && typeof f != "function")
|
|
4880
4927
|
throw new et(u, typeof f);
|
|
@@ -4884,13 +4931,13 @@ function Su(t, e, r) {
|
|
|
4884
4931
|
function x(t, e, r) {
|
|
4885
4932
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4886
4933
|
const n = new x(t, e, r);
|
|
4887
|
-
return t &&
|
|
4934
|
+
return t && Au(t, e, n), n;
|
|
4888
4935
|
}
|
|
4889
|
-
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
|
|
4936
|
+
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 = bn(this, li, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4890
4937
|
this.emit("start"), this._readyQ.drain = Sn;
|
|
4891
|
-
}, this._closeQ = bn(this,
|
|
4938
|
+
}, this._closeQ = bn(this, Ou, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4892
4939
|
this.emit("close"), this._closeQ.drain = Sn;
|
|
4893
|
-
}, this._doStart = null, this._root = new mr(this,
|
|
4940
|
+
}, this._doStart = null, this._root = new mr(this, Eu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4894
4941
|
const s = this.pluginTree.start(null, i, o);
|
|
4895
4942
|
this._root.once("loaded", (a, u, f) => {
|
|
4896
4943
|
this.pluginTree.stop(s, f);
|
|
@@ -4910,19 +4957,19 @@ function x(t, e, r) {
|
|
|
4910
4957
|
this._readyQ.resume();
|
|
4911
4958
|
});
|
|
4912
4959
|
}
|
|
4913
|
-
function
|
|
4960
|
+
function Eu(t, e, r) {
|
|
4914
4961
|
this._doStart = r, e.autostart && this.start();
|
|
4915
4962
|
}
|
|
4916
|
-
|
|
4963
|
+
mu(x, gu);
|
|
4917
4964
|
x.prototype.start = function() {
|
|
4918
|
-
return this.started = !0,
|
|
4965
|
+
return this.started = !0, A.nextTick(this._doStart), this;
|
|
4919
4966
|
};
|
|
4920
4967
|
x.prototype.override = function(t, e, r) {
|
|
4921
4968
|
return t;
|
|
4922
4969
|
};
|
|
4923
|
-
function
|
|
4970
|
+
function Iu(t) {
|
|
4924
4971
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4925
|
-
throw new
|
|
4972
|
+
throw new vu(typeof t);
|
|
4926
4973
|
return t;
|
|
4927
4974
|
}
|
|
4928
4975
|
x.prototype[Lt] = !0;
|
|
@@ -4931,17 +4978,17 @@ x.prototype.use = function(t, e) {
|
|
|
4931
4978
|
};
|
|
4932
4979
|
x.prototype._loadRegistered = function() {
|
|
4933
4980
|
const t = this._current[0];
|
|
4934
|
-
return !this.started && !this.booted &&
|
|
4981
|
+
return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4935
4982
|
};
|
|
4936
4983
|
Object.defineProperty(x.prototype, "then", { get: ci });
|
|
4937
4984
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4938
|
-
if (t =
|
|
4939
|
-
throw new
|
|
4985
|
+
if (t = Iu(t), e = e || {}, this.booted)
|
|
4986
|
+
throw new bu();
|
|
4940
4987
|
const n = this._current[0], i = new mr(this, t, e, r);
|
|
4941
4988
|
if (i.once("start", (o, s, a) => {
|
|
4942
4989
|
const u = this.pluginTree.start(n.name, s, a);
|
|
4943
|
-
i.once("loaded", (f, c,
|
|
4944
|
-
this.pluginTree.stop(u,
|
|
4990
|
+
i.once("loaded", (f, c, h) => {
|
|
4991
|
+
this.pluginTree.stop(u, h);
|
|
4945
4992
|
});
|
|
4946
4993
|
}), n.loaded)
|
|
4947
4994
|
throw new Error(i.name, n.name);
|
|
@@ -4981,7 +5028,7 @@ x.prototype.close = function(t) {
|
|
|
4981
5028
|
};
|
|
4982
5029
|
});
|
|
4983
5030
|
return this.ready(() => {
|
|
4984
|
-
this._error = null, this._closeQ.push(t),
|
|
5031
|
+
this._error = null, this._closeQ.push(t), A.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4985
5032
|
}), e;
|
|
4986
5033
|
};
|
|
4987
5034
|
x.prototype.ready = function(t) {
|
|
@@ -4995,7 +5042,7 @@ x.prototype.ready = function(t) {
|
|
|
4995
5042
|
this._readyQ.push(i), this.start();
|
|
4996
5043
|
const n = this._current[0].server;
|
|
4997
5044
|
function i(o, s, a) {
|
|
4998
|
-
o ? r(o) : e(n),
|
|
5045
|
+
o ? r(o) : e(n), A.nextTick(a);
|
|
4999
5046
|
}
|
|
5000
5047
|
});
|
|
5001
5048
|
};
|
|
@@ -5022,23 +5069,23 @@ function li(t, e) {
|
|
|
5022
5069
|
const r = this._server, n = this._error;
|
|
5023
5070
|
let i;
|
|
5024
5071
|
if (this._error = null, t.length === 0)
|
|
5025
|
-
this._error = n, i = t(), i && !i[Lt] && typeof i.then == "function" ? i.then(() =>
|
|
5072
|
+
this._error = n, i = t(), i && !i[Lt] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
|
|
5026
5073
|
else if (t.length === 1)
|
|
5027
|
-
i = t(n), i && !i[Lt] && typeof i.then == "function" ? i.then(() =>
|
|
5074
|
+
i = t(n), i && !i[Lt] && typeof i.then == "function" ? i.then(() => A.nextTick(e), (o) => A.nextTick(e, o)) : A.nextTick(e);
|
|
5028
5075
|
else if (this._timeout === 0) {
|
|
5029
5076
|
const o = (s) => {
|
|
5030
5077
|
this._error = s, e(this._error);
|
|
5031
5078
|
};
|
|
5032
5079
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5033
5080
|
} else
|
|
5034
|
-
|
|
5081
|
+
Tu.call(this, t, n, r, e);
|
|
5035
5082
|
}
|
|
5036
|
-
function
|
|
5083
|
+
function Tu(t, e, r, n) {
|
|
5037
5084
|
const i = t.name;
|
|
5038
5085
|
ze("setting up ready timeout", i, this._timeout);
|
|
5039
5086
|
let o = setTimeout(() => {
|
|
5040
5087
|
ze("timed out", i), o = null;
|
|
5041
|
-
const a = new
|
|
5088
|
+
const a = new Su(i);
|
|
5042
5089
|
a.fn = t, this._error = a, n(a);
|
|
5043
5090
|
}, this._timeout);
|
|
5044
5091
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5046,25 +5093,25 @@ function Eu(t, e, r, n) {
|
|
|
5046
5093
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
5047
5094
|
}
|
|
5048
5095
|
}
|
|
5049
|
-
function
|
|
5096
|
+
function Ou(t, e) {
|
|
5050
5097
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5051
5098
|
if (t.length === 0 || t.length === 1) {
|
|
5052
5099
|
let i;
|
|
5053
5100
|
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (ze("resolving close/onClose promise"), i.then(
|
|
5054
|
-
() =>
|
|
5055
|
-
(o) =>
|
|
5056
|
-
)) :
|
|
5101
|
+
() => A.nextTick(e),
|
|
5102
|
+
(o) => A.nextTick(e, o)
|
|
5103
|
+
)) : A.nextTick(e);
|
|
5057
5104
|
} else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
5058
5105
|
}
|
|
5059
|
-
function
|
|
5106
|
+
function _u(t, e) {
|
|
5060
5107
|
return r.bind(e);
|
|
5061
5108
|
function r(n, i) {
|
|
5062
5109
|
let o;
|
|
5063
5110
|
t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
|
|
5064
|
-
|
|
5065
|
-
}, i) :
|
|
5066
|
-
|
|
5067
|
-
}, i) :
|
|
5111
|
+
A.nextTick(i);
|
|
5112
|
+
}, i) : A.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
|
|
5113
|
+
A.nextTick(i);
|
|
5114
|
+
}, i) : A.nextTick(i)) : t(this, i);
|
|
5068
5115
|
}
|
|
5069
5116
|
}
|
|
5070
5117
|
function rr(t, e) {
|
|
@@ -5072,10 +5119,10 @@ function rr(t, e) {
|
|
|
5072
5119
|
function r(n, i) {
|
|
5073
5120
|
let o;
|
|
5074
5121
|
t ? t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
|
|
5075
|
-
|
|
5076
|
-
}, i) :
|
|
5077
|
-
|
|
5078
|
-
}, i) :
|
|
5122
|
+
A.nextTick(i, n);
|
|
5123
|
+
}, i) : A.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
|
|
5124
|
+
A.nextTick(i);
|
|
5125
|
+
}, i) : A.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : A.nextTick(i);
|
|
5079
5126
|
}
|
|
5080
5127
|
}
|
|
5081
5128
|
Sr.exports = x;
|
|
@@ -5086,8 +5133,8 @@ Sr.exports.express = function(t) {
|
|
|
5086
5133
|
}
|
|
5087
5134
|
});
|
|
5088
5135
|
};
|
|
5089
|
-
var
|
|
5090
|
-
const
|
|
5136
|
+
var Lu = Sr.exports;
|
|
5137
|
+
const Cu = /* @__PURE__ */ ns(Lu);
|
|
5091
5138
|
(function() {
|
|
5092
5139
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5093
5140
|
return;
|
|
@@ -5105,9 +5152,9 @@ const _u = /* @__PURE__ */ ts(Ou);
|
|
|
5105
5152
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5106
5153
|
}
|
|
5107
5154
|
})();
|
|
5108
|
-
function
|
|
5109
|
-
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s =
|
|
5110
|
-
return s.use(
|
|
5155
|
+
function Zu(t, e = !0, r = !0, n) {
|
|
5156
|
+
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = Cu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5157
|
+
return s.use(Fo), s.use(_o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Po, { videoPlayerController: n?.videoPlayerController }), s.use(No, { onContentActivate: n?.onContentActivate }), s.use(Ki, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Ji), s.use(ko), s.use(Ko), s.use(mo), s.use(rs), s.after((a, u, f) => {
|
|
5111
5158
|
if (a)
|
|
5112
5159
|
throw a;
|
|
5113
5160
|
u.ready(), f();
|
|
@@ -5120,5 +5167,5 @@ function Ju(t, e = !0, r = !0, n) {
|
|
|
5120
5167
|
}), s;
|
|
5121
5168
|
}
|
|
5122
5169
|
export {
|
|
5123
|
-
|
|
5170
|
+
Zu as StreamLayer
|
|
5124
5171
|
};
|