@streamlayer/sdk-web 1.10.12 → 1.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +548 -540
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as E, QuestionStatus as W, PromotionType as H, SilenceSetting as
|
|
1
|
+
import { pino as vi } from "pino";
|
|
2
|
+
import { QuestionType as E, QuestionStatus as W, PromotionType as H, SilenceSetting as Si, UseAsNotification as wi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
3
|
import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
|
-
import { SdkOverlayType as
|
|
4
|
+
import { SdkOverlayType as F } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
5
|
import { InvitationCategory as Rr, InvitationFrom as Vr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
-
import { computed as
|
|
6
|
+
import { computed as Ai, map as Ei, atom as Ct, batched as $r, onMount as br } from "nanostores";
|
|
7
7
|
import { v4 as St } from "uuid";
|
|
8
|
-
import { ConnectError as rt, Code as ie, createContextKey as Mr, createClient as Br, createContextValues as
|
|
8
|
+
import { ConnectError as rt, Code as ie, createContextKey as Mr, createClient as Br, createContextValues as Ii } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as Ur } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as jr } from "@nanostores/query";
|
|
11
11
|
import { Events as Tn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
@@ -14,37 +14,37 @@ import { Users as vr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
|
14
14
|
import { Feed as se } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as kn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
18
|
-
import { Kind as
|
|
17
|
+
import { LinksClient as Oi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
import { Kind as q, TopicSubType as J, TopicType as x, PollOpenedFrom as X, Category as z, ScreenOrientation as xr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
19
|
import { AnalyticsService as _n } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
|
-
import { InteractionActionType as
|
|
20
|
+
import { InteractionActionType as qr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
21
|
import { NotificationKind as ye, NotificationType as Qr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
-
function
|
|
22
|
+
function Ti(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
25
|
var Cn = { exports: {} }, M = Cn.exports = {}, le, de;
|
|
26
|
-
function
|
|
26
|
+
function nr() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function ir() {
|
|
30
30
|
throw new Error("clearTimeout has not been defined");
|
|
31
31
|
}
|
|
32
32
|
(function() {
|
|
33
33
|
try {
|
|
34
|
-
typeof setTimeout == "function" ? le = setTimeout : le =
|
|
34
|
+
typeof setTimeout == "function" ? le = setTimeout : le = nr;
|
|
35
35
|
} catch {
|
|
36
|
-
le =
|
|
36
|
+
le = nr;
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
typeof clearTimeout == "function" ? de = clearTimeout : de =
|
|
39
|
+
typeof clearTimeout == "function" ? de = clearTimeout : de = ir;
|
|
40
40
|
} catch {
|
|
41
|
-
de =
|
|
41
|
+
de = ir;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
44
|
function Ln(t) {
|
|
45
45
|
if (le === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
|
-
if ((le ===
|
|
47
|
+
if ((le === nr || !le) && setTimeout)
|
|
48
48
|
return le = setTimeout, setTimeout(t, 0);
|
|
49
49
|
try {
|
|
50
50
|
return le(t, 0);
|
|
@@ -56,10 +56,10 @@ function Ln(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ki(t) {
|
|
60
60
|
if (de === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
|
-
if ((de ===
|
|
62
|
+
if ((de === ir || !de) && clearTimeout)
|
|
63
63
|
return de = clearTimeout, clearTimeout(t);
|
|
64
64
|
try {
|
|
65
65
|
return de(t);
|
|
@@ -71,20 +71,20 @@ function _i(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var Se = [],
|
|
75
|
-
function
|
|
76
|
-
!
|
|
74
|
+
var Se = [], qe = !1, Ce, pt = -1;
|
|
75
|
+
function _i() {
|
|
76
|
+
!qe || !Ce || (qe = !1, Ce.length ? Se = Ce.concat(Se) : pt = -1, Se.length && Pn());
|
|
77
77
|
}
|
|
78
78
|
function Pn() {
|
|
79
|
-
if (!
|
|
80
|
-
var t = Ln(
|
|
81
|
-
|
|
79
|
+
if (!qe) {
|
|
80
|
+
var t = Ln(_i);
|
|
81
|
+
qe = !0;
|
|
82
82
|
for (var e = Se.length; e; ) {
|
|
83
83
|
for (Ce = Se, Se = []; ++pt < e; )
|
|
84
84
|
Ce && Ce[pt].run();
|
|
85
85
|
pt = -1, e = Se.length;
|
|
86
86
|
}
|
|
87
|
-
Ce = null,
|
|
87
|
+
Ce = null, qe = !1, ki(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
M.nextTick = function(t) {
|
|
@@ -92,7 +92,7 @@ M.nextTick = function(t) {
|
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
94
94
|
e[r - 1] = arguments[r];
|
|
95
|
-
Se.push(new Nn(t, e)), Se.length === 1 && !
|
|
95
|
+
Se.push(new Nn(t, e)), Se.length === 1 && !qe && Ln(Pn);
|
|
96
96
|
};
|
|
97
97
|
function Nn(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
@@ -132,8 +132,8 @@ M.chdir = function(t) {
|
|
|
132
132
|
M.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const A = /* @__PURE__ */
|
|
135
|
+
var Ci = Cn.exports;
|
|
136
|
+
const A = /* @__PURE__ */ Ti(Ci), Li = vi({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,14 +141,14 @@ const A = /* @__PURE__ */ ki(Li), Pi = Si({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), Ee = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), Ee = (t, e) => Li.child({ name: t }, e);
|
|
145
|
+
class Pi extends Event {
|
|
146
146
|
slEventBus;
|
|
147
147
|
constructor(e, r) {
|
|
148
148
|
super(e), this.slEventBus = r;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const
|
|
151
|
+
const Ni = Ee("event-bus");
|
|
152
152
|
class Di {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
@@ -156,8 +156,8 @@ class Di {
|
|
|
156
156
|
this.name = e, this.listeners = /* @__PURE__ */ new Set();
|
|
157
157
|
}
|
|
158
158
|
emit = (e, r) => {
|
|
159
|
-
const n = new
|
|
160
|
-
|
|
159
|
+
const n = new Pi(this.name, { ...r, type: e });
|
|
160
|
+
Ni.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,7 +173,7 @@ class Di {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Fi {
|
|
177
177
|
}
|
|
178
178
|
var we;
|
|
179
179
|
(function(t) {
|
|
@@ -196,9 +196,9 @@ class Lt {
|
|
|
196
196
|
return this.store;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const Ri = (t) => {
|
|
200
200
|
const e = Object.keys(t);
|
|
201
|
-
return
|
|
201
|
+
return Ai(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
202
202
|
};
|
|
203
203
|
class Le extends Lt {
|
|
204
204
|
getValues = () => this.getStore().get();
|
|
@@ -207,22 +207,22 @@ class Le extends Lt {
|
|
|
207
207
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
208
208
|
unsubscribe = () => this.getStore().off();
|
|
209
209
|
}
|
|
210
|
-
const ee = (t) =>
|
|
210
|
+
const ee = (t) => Ei(t);
|
|
211
211
|
var me;
|
|
212
212
|
(function(t) {
|
|
213
213
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
214
214
|
})(me || (me = {}));
|
|
215
|
-
const
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
[
|
|
215
|
+
const Vi = {
|
|
216
|
+
[F.BETTING]: "betting",
|
|
217
|
+
[F.GAMES]: "games",
|
|
218
|
+
[F.PUBLIC_CHAT]: "publicChat",
|
|
219
|
+
[F.TWITTER]: "twitter"
|
|
220
220
|
};
|
|
221
221
|
var Ze;
|
|
222
222
|
(function(t) {
|
|
223
223
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
224
224
|
})(Ze || (Ze = {}));
|
|
225
|
-
class
|
|
225
|
+
class Dn {
|
|
226
226
|
status;
|
|
227
227
|
source;
|
|
228
228
|
config;
|
|
@@ -230,7 +230,7 @@ class Fn {
|
|
|
230
230
|
listeners = /* @__PURE__ */ new Set();
|
|
231
231
|
settingsKey;
|
|
232
232
|
constructor({ settings: e, ...r }, n) {
|
|
233
|
-
this.settingsKey =
|
|
233
|
+
this.settingsKey = Vi[r.type], this.status = Ct(Ze.Suspended), this.config = new Le(ee(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(ee(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(ee({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
234
234
|
}
|
|
235
235
|
get featureConfig() {
|
|
236
236
|
return this.config.getStore();
|
|
@@ -320,7 +320,7 @@ class oe extends Lt {
|
|
|
320
320
|
off = () => this.getStore().off();
|
|
321
321
|
}
|
|
322
322
|
const K = new Di();
|
|
323
|
-
async function*
|
|
323
|
+
async function* $i(t, e) {
|
|
324
324
|
for await (const r of e) {
|
|
325
325
|
t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
|
|
326
326
|
const n = {
|
|
@@ -330,7 +330,7 @@ async function* Mi(t, e) {
|
|
|
330
330
|
window.postMessage(n), yield r;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const Mi = () => (t) => async (e) => {
|
|
334
334
|
const r = {
|
|
335
335
|
id: Date.now(),
|
|
336
336
|
name: e.url,
|
|
@@ -359,7 +359,7 @@ const Bi = () => (t) => async (e) => {
|
|
|
359
359
|
};
|
|
360
360
|
return window.postMessage(i), {
|
|
361
361
|
...n,
|
|
362
|
-
message:
|
|
362
|
+
message: $i(r, n.message)
|
|
363
363
|
};
|
|
364
364
|
} else {
|
|
365
365
|
r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -383,7 +383,7 @@ const Bi = () => (t) => async (e) => {
|
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
386
|
-
function
|
|
386
|
+
function Fn(t) {
|
|
387
387
|
return t instanceof DOMException && // everything except Firefox
|
|
388
388
|
(t.code === 22 || // Firefox
|
|
389
389
|
t.code === 1014 || // test name field too, because code might not be present
|
|
@@ -408,7 +408,7 @@ class it {
|
|
|
408
408
|
try {
|
|
409
409
|
this.storage.setItem(n, r);
|
|
410
410
|
} catch (i) {
|
|
411
|
-
|
|
411
|
+
Fn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
read = (...e) => {
|
|
@@ -424,7 +424,7 @@ var ne;
|
|
|
424
424
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
425
425
|
})(ne || (ne = {}));
|
|
426
426
|
const Gr = Ee("grpc:stream");
|
|
427
|
-
class
|
|
427
|
+
class Bi {
|
|
428
428
|
params;
|
|
429
429
|
streamCancel;
|
|
430
430
|
method;
|
|
@@ -463,7 +463,7 @@ class Ui {
|
|
|
463
463
|
window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
|
|
464
464
|
` + n);
|
|
465
465
|
} catch (i) {
|
|
466
|
-
|
|
466
|
+
Fn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
};
|
|
@@ -533,7 +533,7 @@ class Ui {
|
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const Ui = /* @__PURE__ */ new Set([
|
|
537
537
|
ie.Unknown,
|
|
538
538
|
ie.Internal,
|
|
539
539
|
ie.DeadlineExceeded,
|
|
@@ -541,8 +541,8 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
541
541
|
ie.FailedPrecondition,
|
|
542
542
|
ie.Unavailable,
|
|
543
543
|
ie.DataLoss
|
|
544
|
-
]), zr = Ee("grpc:retry"),
|
|
545
|
-
const r = e.contextValues.get(
|
|
544
|
+
]), zr = Ee("grpc:retry"), ji = (t) => async (e) => {
|
|
545
|
+
const r = e.contextValues.get(or.retryAttempts), n = 300, i = e.contextValues.get(or.retryDelay);
|
|
546
546
|
if (e.stream || r === 0)
|
|
547
547
|
return t(e);
|
|
548
548
|
zr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
|
|
@@ -552,12 +552,12 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
552
552
|
} catch (s) {
|
|
553
553
|
zr.trace({ attempt: o, error: s, url: e.url }, "retry attempt");
|
|
554
554
|
const a = rt.from(s);
|
|
555
|
-
if (o >= r || !(a instanceof rt) || !
|
|
555
|
+
if (o >= r || !(a instanceof rt) || !Ui.has(a.code))
|
|
556
556
|
throw s;
|
|
557
557
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
558
558
|
await new Promise((c) => setTimeout(c, d));
|
|
559
559
|
}
|
|
560
|
-
},
|
|
560
|
+
}, or = {
|
|
561
561
|
retryAttempts: Mr(10, { description: "Number of attempts to retry" }),
|
|
562
562
|
retryDelay: Mr(3e4, { description: "Max delay between retries in milliseconds" })
|
|
563
563
|
}, xi = () => {
|
|
@@ -566,7 +566,7 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
566
566
|
return t;
|
|
567
567
|
const e = St();
|
|
568
568
|
return localStorage.setItem("sl-device-id", e), e;
|
|
569
|
-
},
|
|
569
|
+
}, qi = () => navigator.userAgentData?.platform || navigator.platform;
|
|
570
570
|
class Kr {
|
|
571
571
|
toJsonOptions = {
|
|
572
572
|
emitDefaultValues: !1,
|
|
@@ -580,6 +580,8 @@ class Kr {
|
|
|
580
580
|
nanoquery;
|
|
581
581
|
host;
|
|
582
582
|
$headers;
|
|
583
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
584
|
+
storeCache;
|
|
583
585
|
interceptors = [];
|
|
584
586
|
clients;
|
|
585
587
|
streamClients;
|
|
@@ -588,8 +590,8 @@ class Kr {
|
|
|
588
590
|
constructor(e, r) {
|
|
589
591
|
this.host = e, this.opts = r, this.$headers = new Le(ee({
|
|
590
592
|
"sl-device-id": xi(),
|
|
591
|
-
"sl-device-os":
|
|
592
|
-
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
593
|
+
"sl-device-os": qi()
|
|
594
|
+
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map(), this.storeCache = /* @__PURE__ */ new Map();
|
|
593
595
|
const [n, i, o] = jr({
|
|
594
596
|
dedupeTime: r?.dedupeTime,
|
|
595
597
|
refetchInterval: r?.refetchInterval
|
|
@@ -612,7 +614,7 @@ class Kr {
|
|
|
612
614
|
const i = this.subscriptions.get(r);
|
|
613
615
|
if (i)
|
|
614
616
|
return i;
|
|
615
|
-
const o = new
|
|
617
|
+
const o = new Bi(this.$headers, e, r, n);
|
|
616
618
|
return this.subscriptions.set(r, o), o;
|
|
617
619
|
};
|
|
618
620
|
removeSubscription = (e) => {
|
|
@@ -657,9 +659,9 @@ class Kr {
|
|
|
657
659
|
...Array.isArray(r) ? r : [r]
|
|
658
660
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
659
661
|
return { client: i, createRequestOptions: (d) => {
|
|
660
|
-
const c =
|
|
662
|
+
const c = Ii();
|
|
661
663
|
for (const l in d) {
|
|
662
|
-
const p =
|
|
664
|
+
const p = or[l];
|
|
663
665
|
c.set(p, d[l]);
|
|
664
666
|
}
|
|
665
667
|
return c;
|
|
@@ -685,10 +687,10 @@ class Kr {
|
|
|
685
687
|
n.header.set(o, i[o]);
|
|
686
688
|
return r(n);
|
|
687
689
|
};
|
|
688
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
690
|
+
this.interceptors.push(e), this.interceptors.push(Mi()), this.opts?.retryable && this.interceptors.push(ji);
|
|
689
691
|
};
|
|
690
692
|
}
|
|
691
|
-
const
|
|
693
|
+
const Qi = (t, e) => {
|
|
692
694
|
const { client: r, queryKey: n } = e.createPromiseClient(Tn, {
|
|
693
695
|
method: "retrieveEventId",
|
|
694
696
|
params: [t]
|
|
@@ -706,7 +708,7 @@ const Gi = (t, e) => {
|
|
|
706
708
|
}
|
|
707
709
|
}
|
|
708
710
|
});
|
|
709
|
-
},
|
|
711
|
+
}, Gi = (t, e) => {
|
|
710
712
|
const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getStream", params: [t] });
|
|
711
713
|
return e.nanoquery.createFetcherStore(n, {
|
|
712
714
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
@@ -714,14 +716,14 @@ const Gi = (t, e) => {
|
|
|
714
716
|
// we are sure that id is a string
|
|
715
717
|
})).data?.attributes : void 0
|
|
716
718
|
});
|
|
717
|
-
},
|
|
719
|
+
}, zi = (t, e) => {
|
|
718
720
|
const { client: r, queryKey: n } = e.createPromiseClient(Tn, { method: "summary", params: [t] });
|
|
719
721
|
return e.nanoquery.createFetcherStore(n, {
|
|
720
722
|
fetcher: async (i, o, s) => s ? (await r.summary({
|
|
721
723
|
id: s
|
|
722
724
|
})).data?.attributes : void 0
|
|
723
725
|
});
|
|
724
|
-
},
|
|
726
|
+
}, Ki = (t, e) => {
|
|
725
727
|
const { queryKey: r, client: n } = e.createPromiseClient(vr, { method: "me", params: [t] });
|
|
726
728
|
return e.nanoquery.createFetcherStore(r, {
|
|
727
729
|
fetcher: async () => {
|
|
@@ -731,15 +733,15 @@ const Gi = (t, e) => {
|
|
|
731
733
|
return { data: o };
|
|
732
734
|
}
|
|
733
735
|
});
|
|
734
|
-
},
|
|
736
|
+
}, Hi = (t) => {
|
|
735
737
|
const { client: e, createRequestOptions: r } = t.createPromiseClient(vr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
736
738
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
737
|
-
},
|
|
739
|
+
}, Wi = (t, e) => {
|
|
738
740
|
const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "get", params: [t] });
|
|
739
741
|
return e.nanoquery.createFetcherStore(n, {
|
|
740
742
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
741
743
|
});
|
|
742
|
-
},
|
|
744
|
+
}, Yi = (t, e) => {
|
|
743
745
|
const { client: r, queryKey: n } = e.createPromiseClient(nt, { method: "getOrganization", params: [t] });
|
|
744
746
|
return e.nanoquery.createFetcherStore(n, {
|
|
745
747
|
fetcher: async () => {
|
|
@@ -750,7 +752,7 @@ const Gi = (t, e) => {
|
|
|
750
752
|
} : void 0;
|
|
751
753
|
}
|
|
752
754
|
});
|
|
753
|
-
},
|
|
755
|
+
}, Ji = (t, e) => {
|
|
754
756
|
const { client: r, queryKey: n } = e.createPromiseClient(nt, {
|
|
755
757
|
method: "getOrganizationAdvertising",
|
|
756
758
|
params: [t]
|
|
@@ -758,7 +760,7 @@ const Gi = (t, e) => {
|
|
|
758
760
|
return e.nanoquery.createFetcherStore(n, {
|
|
759
761
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
760
762
|
});
|
|
761
|
-
},
|
|
763
|
+
}, Xi = (t, e, r) => {
|
|
762
764
|
t.transport = new Kr(e.host, {
|
|
763
765
|
dedupeTime: 1e3 * 60 * 5,
|
|
764
766
|
refetchInterval: 1e3 * 60 * 5,
|
|
@@ -800,19 +802,19 @@ var be;
|
|
|
800
802
|
(function(t) {
|
|
801
803
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
802
804
|
})(be || (be = {}));
|
|
803
|
-
const
|
|
804
|
-
const e = new je(), r = new te(B(e.getExternalToken()), "userKey"), n = new te(B(e.getToken()), "userToken"), i = new oe(
|
|
805
|
+
const Zi = (t) => {
|
|
806
|
+
const e = new je(), r = new te(B(e.getExternalToken()), "userKey"), n = new te(B(e.getToken()), "userToken"), i = new oe(Ki(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
805
807
|
if (!a)
|
|
806
808
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
807
|
-
}), o = new oe(
|
|
809
|
+
}), o = new oe(Wi(n.getStore(), t), "userSettings");
|
|
808
810
|
return {
|
|
809
811
|
userKey: r,
|
|
810
812
|
userToken: n,
|
|
811
813
|
user: i,
|
|
812
814
|
userSettings: o
|
|
813
815
|
};
|
|
814
|
-
},
|
|
815
|
-
const e = new te(B(void 0), "providerStreamId"), r = new oe(
|
|
816
|
+
}, eo = (t) => {
|
|
817
|
+
const e = new te(B(void 0), "providerStreamId"), r = new oe(Qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new oe(Gi(r.getAtomStore(), t), "streamSettings"), i = new oe(zi(r.getAtomStore(), t), "streamSettings");
|
|
816
818
|
return r.getAtomStore().listen((o) => {
|
|
817
819
|
(o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
|
|
818
820
|
}), {
|
|
@@ -821,8 +823,8 @@ const eo = (t) => {
|
|
|
821
823
|
streamSettings: n,
|
|
822
824
|
streamSummary: i
|
|
823
825
|
};
|
|
824
|
-
},
|
|
825
|
-
const e = new te(B(void 0), "enabled"), r = new te(B(be.DISABLED), "status"), n = new oe(
|
|
826
|
+
}, to = (t) => {
|
|
827
|
+
const e = new te(B(void 0), "enabled"), r = new te(B(be.DISABLED), "status"), n = new oe(Yi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new oe(Ji(n.getAtomStore(), t), "organizationAdvertising"), o = Zi(t), s = eo(t);
|
|
826
828
|
return {
|
|
827
829
|
enabled: e,
|
|
828
830
|
status: r,
|
|
@@ -838,10 +840,10 @@ const eo = (t) => {
|
|
|
838
840
|
organizationAdvertising: i
|
|
839
841
|
};
|
|
840
842
|
};
|
|
841
|
-
class
|
|
843
|
+
class ro extends Lt {
|
|
842
844
|
stores;
|
|
843
845
|
constructor(e) {
|
|
844
|
-
const r =
|
|
846
|
+
const r = to(e), n = Ri(r);
|
|
845
847
|
super(n, "core"), this.stores = r;
|
|
846
848
|
}
|
|
847
849
|
getValue() {
|
|
@@ -862,17 +864,17 @@ class no extends Lt {
|
|
|
862
864
|
};
|
|
863
865
|
unsubscribe = () => this.getStore().off();
|
|
864
866
|
}
|
|
865
|
-
const
|
|
866
|
-
t.store = new
|
|
867
|
+
const no = (t, e, r) => {
|
|
868
|
+
t.store = new ro(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
|
|
867
869
|
t.store.unsubscribe();
|
|
868
870
|
}, r();
|
|
869
|
-
},
|
|
871
|
+
}, io = (t) => {
|
|
870
872
|
const { client: e } = t.createPromiseClient(kn, { method: "list" });
|
|
871
873
|
return (r) => e.list(r);
|
|
872
874
|
}, Rn = (t) => {
|
|
873
875
|
const { client: e } = t.createPromiseClient(kn, { method: "summary" });
|
|
874
876
|
return (r) => e.summary(r);
|
|
875
|
-
},
|
|
877
|
+
}, oo = (t, e) => {
|
|
876
878
|
const { client: r, queryKey: n } = e.createPromiseClient(vr, {
|
|
877
879
|
method: "getFriends",
|
|
878
880
|
params: [t]
|
|
@@ -888,7 +890,7 @@ const io = (t, e, r) => {
|
|
|
888
890
|
}
|
|
889
891
|
}
|
|
890
892
|
});
|
|
891
|
-
},
|
|
893
|
+
}, so = (t, e) => {
|
|
892
894
|
const { client: r, queryKey: n } = e.createPromiseClient(se, { method: "get", params: [t] });
|
|
893
895
|
return e.nanoquery.createFetcherStore(n, {
|
|
894
896
|
fetcher: async (i, o, s) => (await r.get({
|
|
@@ -897,7 +899,7 @@ const io = (t, e, r) => {
|
|
|
897
899
|
refetchInterval: 1 / 0,
|
|
898
900
|
dedupeTime: 1e3 * 60 * 60
|
|
899
901
|
});
|
|
900
|
-
},
|
|
902
|
+
}, ao = (t, e, r) => {
|
|
901
903
|
const { client: n, queryKey: i } = r.createPromiseClient(se, {
|
|
902
904
|
method: "syncQuestion",
|
|
903
905
|
params: [t, e ? "true" : ""]
|
|
@@ -918,42 +920,43 @@ const io = (t, e, r) => {
|
|
|
918
920
|
// 10 minutes
|
|
919
921
|
refetchInterval: 1 / 0
|
|
920
922
|
});
|
|
921
|
-
},
|
|
923
|
+
}, uo = async (t, e) => {
|
|
922
924
|
const { client: r } = e.createPromiseClient(se, { method: "item", params: [t] });
|
|
923
925
|
return (await r.item({
|
|
924
926
|
id: t
|
|
925
927
|
})).data;
|
|
926
|
-
},
|
|
928
|
+
}, co = (t, e) => {
|
|
927
929
|
const { client: r } = e.createStreamClient(se), n = Ct({ eventId: t.get() || "", feedId: "" });
|
|
928
930
|
return t.subscribe((o = "") => {
|
|
929
931
|
n.set({ eventId: o, feedId: "" });
|
|
930
932
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
931
|
-
},
|
|
933
|
+
}, lo = (t, e) => {
|
|
932
934
|
const { client: r } = e.createStreamClient(se);
|
|
933
935
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
934
|
-
},
|
|
936
|
+
}, sr = async (t, e) => {
|
|
935
937
|
const { client: r } = e.createPromiseClient(se, { method: "questionByUser", params: [t] });
|
|
936
938
|
return (await r.questionByUser({
|
|
937
939
|
questionId: t
|
|
938
940
|
})).data?.attributes?.question;
|
|
939
|
-
},
|
|
941
|
+
}, Xe = (t, e) => {
|
|
940
942
|
const { client: r, queryKey: n, queryKeyStr: i } = e.createPromiseClient(se, {
|
|
941
943
|
method: "questionByUser",
|
|
942
944
|
params: [t]
|
|
943
945
|
});
|
|
944
|
-
|
|
945
|
-
|
|
946
|
+
let o = i;
|
|
947
|
+
if (typeof t != "object" ? o += t : o += "atom", e.storeCache.has(o))
|
|
948
|
+
return e.storeCache.get(o);
|
|
946
949
|
{
|
|
947
|
-
const
|
|
948
|
-
fetcher: async (
|
|
949
|
-
questionId:
|
|
950
|
+
const s = e.nanoquery.createFetcherStore(n, {
|
|
951
|
+
fetcher: async (a, u, d) => (await r.questionByUser({
|
|
952
|
+
questionId: d
|
|
950
953
|
})).data?.attributes?.question,
|
|
951
954
|
dedupeTime: 1 / 0,
|
|
952
955
|
refetchInterval: 1 / 0
|
|
953
956
|
});
|
|
954
|
-
return
|
|
957
|
+
return e.storeCache.set(o, s), s;
|
|
955
958
|
}
|
|
956
|
-
},
|
|
959
|
+
}, fo = (t, e, r, n, i, o, s) => {
|
|
957
960
|
const { client: a, queryKey: u } = s.createPromiseClient(se, {
|
|
958
961
|
method: "list",
|
|
959
962
|
params: [t, e, o ? "true" : ""]
|
|
@@ -986,7 +989,7 @@ const io = (t, e, r) => {
|
|
|
986
989
|
dedupeTime: 1 / 0,
|
|
987
990
|
refetchInterval: 1 / 0
|
|
988
991
|
});
|
|
989
|
-
},
|
|
992
|
+
}, po = (t, e, r, n, i) => {
|
|
990
993
|
const { client: o, queryKey: s } = i.createPromiseClient(se, {
|
|
991
994
|
method: "betPack",
|
|
992
995
|
params: [t, e, r]
|
|
@@ -1035,7 +1038,7 @@ const io = (t, e, r) => {
|
|
|
1035
1038
|
dedupeTime: 1 / 0,
|
|
1036
1039
|
refetchInterval: 1 / 0
|
|
1037
1040
|
});
|
|
1038
|
-
},
|
|
1041
|
+
}, ho = (t, e, r) => {
|
|
1039
1042
|
const n = $r([e, r], () => {
|
|
1040
1043
|
const a = e.get();
|
|
1041
1044
|
if (!a)
|
|
@@ -1071,7 +1074,7 @@ var ce;
|
|
|
1071
1074
|
(function(t) {
|
|
1072
1075
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.QUESTION_RECEIVED = "q-received", t.QUESTION_OPENED = "q-opened";
|
|
1073
1076
|
})(ce || (ce = {}));
|
|
1074
|
-
class
|
|
1077
|
+
class yo extends it {
|
|
1075
1078
|
constructor() {
|
|
1076
1079
|
super("gamification-session", window.sessionStorage);
|
|
1077
1080
|
}
|
|
@@ -1080,10 +1083,10 @@ class go extends it {
|
|
|
1080
1083
|
};
|
|
1081
1084
|
readValue = (e) => this.read(...e);
|
|
1082
1085
|
}
|
|
1083
|
-
class
|
|
1086
|
+
class go extends it {
|
|
1084
1087
|
sessionStorage;
|
|
1085
1088
|
constructor() {
|
|
1086
|
-
super("gamification"), this.sessionStorage = new
|
|
1089
|
+
super("gamification"), this.sessionStorage = new yo();
|
|
1087
1090
|
}
|
|
1088
1091
|
saveQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1089
1092
|
this.write(ce.QUESTION_RECEIVED, n, e, r, i, "1");
|
|
@@ -1106,7 +1109,7 @@ var Oe;
|
|
|
1106
1109
|
(function(t) {
|
|
1107
1110
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1108
1111
|
})(Oe || (Oe = {}));
|
|
1109
|
-
class
|
|
1112
|
+
class mo {
|
|
1110
1113
|
/** sl event id */
|
|
1111
1114
|
slStreamId;
|
|
1112
1115
|
/** organization id */
|
|
@@ -1141,10 +1144,10 @@ class bo {
|
|
|
1141
1144
|
transport;
|
|
1142
1145
|
cancels = /* @__PURE__ */ new Set();
|
|
1143
1146
|
constructor(e) {
|
|
1144
|
-
this.transport = e.transport, this.log = Ee("gamification-background"), this.storage = new
|
|
1147
|
+
this.transport = e.transport, this.log = Ee("gamification-background"), this.storage = new go(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new te(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new te(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new te(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new oe(so(this.slStreamId, e.transport), "gamification:moderation");
|
|
1145
1148
|
const r = !!e.sdk.options.get().betPack;
|
|
1146
|
-
this.feedList = new oe(
|
|
1147
|
-
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription =
|
|
1149
|
+
this.feedList = new oe(fo(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new oe(po(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = ao(this.slStreamId, r, e.transport), this.openedQuestion = ho(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
|
|
1150
|
+
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription = lo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
|
|
1148
1151
|
const o = i.data?.attributes?.question;
|
|
1149
1152
|
if (this.openedQuestion.updateExtendedQuestion(o), this.betPack && o?.type === E.PREDICTION && (o.status === W.ACTIVE || o.status === W.RESOLVED)) {
|
|
1150
1153
|
const s = this.betPack.getValues().data?.data || {}, a = s?.[o.id];
|
|
@@ -1175,7 +1178,7 @@ class bo {
|
|
|
1175
1178
|
}
|
|
1176
1179
|
}
|
|
1177
1180
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1178
|
-
})), this.feedSubscription =
|
|
1181
|
+
})), this.feedSubscription = co(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
|
|
1179
1182
|
const i = n.data?.attributes?.question;
|
|
1180
1183
|
if (this.betPack && i?.type === E.PREDICTION && (i.status === W.ACTIVE || i.status === W.RESOLVED)) {
|
|
1181
1184
|
const o = this.betPack.getValues().data?.data || {}, s = o?.[i.id];
|
|
@@ -1194,7 +1197,7 @@ class bo {
|
|
|
1194
1197
|
}
|
|
1195
1198
|
});
|
|
1196
1199
|
else if (!s && Object.keys(o).length < 5) {
|
|
1197
|
-
const a = await
|
|
1200
|
+
const a = await sr(i.id, this.transport);
|
|
1198
1201
|
this.betPack.getStore().mutate({
|
|
1199
1202
|
timestamp: Date.now(),
|
|
1200
1203
|
data: {
|
|
@@ -1277,7 +1280,7 @@ class bo {
|
|
|
1277
1280
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1278
1281
|
};
|
|
1279
1282
|
}
|
|
1280
|
-
class
|
|
1283
|
+
class bo {
|
|
1281
1284
|
notificationsList;
|
|
1282
1285
|
store;
|
|
1283
1286
|
timeouts;
|
|
@@ -1377,7 +1380,7 @@ var wt;
|
|
|
1377
1380
|
(function(t) {
|
|
1378
1381
|
t.OPENED = "opened";
|
|
1379
1382
|
})(wt || (wt = {}));
|
|
1380
|
-
class
|
|
1383
|
+
class vo extends it {
|
|
1381
1384
|
constructor() {
|
|
1382
1385
|
super("notification");
|
|
1383
1386
|
}
|
|
@@ -1389,11 +1392,11 @@ class So extends it {
|
|
|
1389
1392
|
this.clear();
|
|
1390
1393
|
};
|
|
1391
1394
|
}
|
|
1392
|
-
class
|
|
1395
|
+
class So {
|
|
1393
1396
|
queue;
|
|
1394
1397
|
storage;
|
|
1395
1398
|
constructor(e = {}) {
|
|
1396
|
-
this.storage = new
|
|
1399
|
+
this.storage = new vo(), this.queue = new bo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1397
1400
|
}
|
|
1398
1401
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1399
1402
|
add = (e) => {
|
|
@@ -1430,8 +1433,8 @@ class wo {
|
|
|
1430
1433
|
this.storage.setOpened(e);
|
|
1431
1434
|
};
|
|
1432
1435
|
}
|
|
1433
|
-
const
|
|
1434
|
-
t.notifications = new
|
|
1436
|
+
const wo = (t, e, r) => {
|
|
1437
|
+
t.notifications = new So(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1435
1438
|
t.notifications.queue.drain();
|
|
1436
1439
|
}), r();
|
|
1437
1440
|
};
|
|
@@ -1446,20 +1449,20 @@ const Hr = async (t, e) => {
|
|
|
1446
1449
|
} catch (o) {
|
|
1447
1450
|
throw rt.from(o)?.code === ie.AlreadyExists ? new Error(ze.ALREADY_VOTED) : new Error(ze.UNKNOWN);
|
|
1448
1451
|
}
|
|
1449
|
-
},
|
|
1452
|
+
}, Vn = (t, e) => {
|
|
1450
1453
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(se, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1451
1454
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1452
|
-
},
|
|
1455
|
+
}, Ao = {
|
|
1453
1456
|
pageSize: 10
|
|
1454
|
-
},
|
|
1457
|
+
}, Eo = (t, e, r, n, i) => {
|
|
1455
1458
|
let o = 0;
|
|
1456
|
-
const s = B({ pageSize:
|
|
1459
|
+
const s = B({ pageSize: Ao.pageSize, page: 0 }), a = ee({
|
|
1457
1460
|
data: [],
|
|
1458
1461
|
key: Date.now(),
|
|
1459
1462
|
hasMore: !0,
|
|
1460
1463
|
loading: void 0,
|
|
1461
1464
|
error: void 0
|
|
1462
|
-
}), u =
|
|
1465
|
+
}), u = io(t), d = async () => {
|
|
1463
1466
|
const p = e.get(), b = n?.getStore().get().data?.map((S) => S.slId) || [];
|
|
1464
1467
|
if (p && b?.length) {
|
|
1465
1468
|
const S = r.get();
|
|
@@ -1491,7 +1494,7 @@ const Hr = async (t, e) => {
|
|
|
1491
1494
|
};
|
|
1492
1495
|
}), { $store: a, fetchMore: l, invalidate: c };
|
|
1493
1496
|
};
|
|
1494
|
-
class
|
|
1497
|
+
class Io extends it {
|
|
1495
1498
|
get = this.read;
|
|
1496
1499
|
set = this.write;
|
|
1497
1500
|
del = this.remove;
|
|
@@ -1499,12 +1502,12 @@ class Oo extends it {
|
|
|
1499
1502
|
super("deep-link-context", window.sessionStorage);
|
|
1500
1503
|
}
|
|
1501
1504
|
}
|
|
1502
|
-
const Wr = "sldl", Pt = "sldl_uid",
|
|
1505
|
+
const Wr = "sldl", Pt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", Oo = /* @__PURE__ */ new Set([Pt, $n, Mn]), Yr = (t) => {
|
|
1503
1506
|
const e = {}, r = {};
|
|
1504
1507
|
for (const [n, i] of t)
|
|
1505
|
-
|
|
1508
|
+
Oo.has(n) ? e[n] = i : r[n] = i;
|
|
1506
1509
|
return { result: e, remain: r };
|
|
1507
|
-
},
|
|
1510
|
+
}, To = ({ hash: t, search: e }) => {
|
|
1508
1511
|
if (t && t.includes(Wr)) {
|
|
1509
1512
|
const r = new URLSearchParams(t.substr(1));
|
|
1510
1513
|
return { hash: Yr(r) };
|
|
@@ -1521,10 +1524,10 @@ const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /*
|
|
|
1521
1524
|
trace: (...t) => {
|
|
1522
1525
|
Jr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1523
1526
|
}
|
|
1524
|
-
},
|
|
1527
|
+
}, ko = (t, e) => {
|
|
1525
1528
|
const { hash: r, search: n } = window.location;
|
|
1526
1529
|
if (fe.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1527
|
-
const i =
|
|
1530
|
+
const i = To({ hash: r, search: n });
|
|
1528
1531
|
if (fe.debug(i, "parse deep link result"), i) {
|
|
1529
1532
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1530
1533
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1543,8 +1546,8 @@ const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /*
|
|
|
1543
1546
|
}
|
|
1544
1547
|
}
|
|
1545
1548
|
t.setValue("parsed", !0);
|
|
1546
|
-
},
|
|
1547
|
-
const n = new
|
|
1549
|
+
}, _o = (t, e, r) => {
|
|
1550
|
+
const n = new Io(), i = n.get("sl-deep-link-store");
|
|
1548
1551
|
let o = {};
|
|
1549
1552
|
if (i)
|
|
1550
1553
|
try {
|
|
@@ -1582,15 +1585,15 @@ const Wr = "sldl", Pt = "sldl_uid", Mn = "sldl_eid", Bn = "sldl_e_eid", To = /*
|
|
|
1582
1585
|
console.error(d);
|
|
1583
1586
|
}
|
|
1584
1587
|
};
|
|
1585
|
-
|
|
1586
|
-
},
|
|
1587
|
-
class
|
|
1588
|
+
ko(t.deepLink.$store, s), r();
|
|
1589
|
+
}, Co = Ee("bypass");
|
|
1590
|
+
class Lo extends Fi {
|
|
1588
1591
|
$coreStore;
|
|
1589
1592
|
deepLink;
|
|
1590
1593
|
transport;
|
|
1591
1594
|
bypassLogin;
|
|
1592
1595
|
constructor(e, r, n) {
|
|
1593
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1596
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Hi(this.transport), this.connect();
|
|
1594
1597
|
}
|
|
1595
1598
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1596
1599
|
/**
|
|
@@ -1602,7 +1605,7 @@ class Po extends Ri {
|
|
|
1602
1605
|
login = async (e, r) => {
|
|
1603
1606
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1604
1607
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Pt];
|
|
1605
|
-
|
|
1608
|
+
Co.debug({ inviterKey: o }, "login with inviterKey");
|
|
1606
1609
|
const s = await this.bypassLogin({
|
|
1607
1610
|
schema: e,
|
|
1608
1611
|
userKey: r,
|
|
@@ -1672,8 +1675,8 @@ class Po extends Ri {
|
|
|
1672
1675
|
});
|
|
1673
1676
|
};
|
|
1674
1677
|
}
|
|
1675
|
-
const Je = new je(),
|
|
1676
|
-
t.auth = new
|
|
1678
|
+
const Je = new je(), Po = (t, e, r) => {
|
|
1679
|
+
t.auth = new Lo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1677
1680
|
n === be.READY && t.auth.reLogin();
|
|
1678
1681
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1679
1682
|
if (!(Je.getSchema() === n && Je.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1692,7 +1695,7 @@ const Je = new je(), No = (t, e, r) => {
|
|
|
1692
1695
|
trace: (...t) => {
|
|
1693
1696
|
Xr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1694
1697
|
}
|
|
1695
|
-
},
|
|
1698
|
+
}, No = (t, e, r) => {
|
|
1696
1699
|
t.videoPlayer = {
|
|
1697
1700
|
controllers: /* @__PURE__ */ new Set()
|
|
1698
1701
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1716,7 +1719,7 @@ const Je = new je(), No = (t, e, r) => {
|
|
|
1716
1719
|
[E.TRIVIA]: "trivia",
|
|
1717
1720
|
[E.PREDICTION]: "prediction",
|
|
1718
1721
|
[E.TWEET]: "tweet"
|
|
1719
|
-
},
|
|
1722
|
+
}, Fo = (t, e, r) => {
|
|
1720
1723
|
t.sdk.uiState = ee({}), t.ui = {
|
|
1721
1724
|
enableAppNotification: function() {
|
|
1722
1725
|
t.sdk.uiState.setKey("appNotification", !0);
|
|
@@ -1850,7 +1853,7 @@ const Je = new je(), No = (t, e, r) => {
|
|
|
1850
1853
|
o(), s();
|
|
1851
1854
|
};
|
|
1852
1855
|
}), r();
|
|
1853
|
-
},
|
|
1856
|
+
}, Ro = (t, e, r) => {
|
|
1854
1857
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1855
1858
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = ee(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1856
1859
|
if (i.has(s)) {
|
|
@@ -1877,7 +1880,7 @@ const Je = new je(), No = (t, e, r) => {
|
|
|
1877
1880
|
}, t.sdk.createEventSession = (s, a) => {
|
|
1878
1881
|
a ? t.stores.slStreamId.getStore().set({ loading: !1, data: s }) : t.stores.providerStreamId.setValue(s);
|
|
1879
1882
|
}, r();
|
|
1880
|
-
},
|
|
1883
|
+
}, Vo = (t, e) => {
|
|
1881
1884
|
const { client: r, queryKey: n } = t.createPromiseClient(nt, {
|
|
1882
1885
|
method: "generateDeepLink",
|
|
1883
1886
|
params: e
|
|
@@ -1898,21 +1901,21 @@ const Je = new je(), No = (t, e, r) => {
|
|
|
1898
1901
|
// 24 hours
|
|
1899
1902
|
refetchInterval: 1 / 0
|
|
1900
1903
|
});
|
|
1901
|
-
},
|
|
1902
|
-
const { client: n } = t.createPromiseClient(
|
|
1904
|
+
}, $o = (t, { web: e, mobile: r }) => {
|
|
1905
|
+
const { client: n } = t.createPromiseClient(Oi, { method: "generate" });
|
|
1903
1906
|
return n.generate({ web: e, mobile: r });
|
|
1904
1907
|
}, Zr = (t, e) => {
|
|
1905
1908
|
const r = new URLSearchParams(t);
|
|
1906
1909
|
for (const [n, i] of Object.entries(e))
|
|
1907
1910
|
r.append(n, i);
|
|
1908
1911
|
return r.toString();
|
|
1909
|
-
},
|
|
1912
|
+
}, Mo = (t, e, r, n) => {
|
|
1910
1913
|
const i = ee({});
|
|
1911
|
-
return br(i, () =>
|
|
1914
|
+
return br(i, () => Vo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
|
|
1912
1915
|
const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", l = e.get() || "", p = r.get() || "", b = {
|
|
1913
1916
|
[Pt]: c,
|
|
1914
|
-
[
|
|
1915
|
-
[
|
|
1917
|
+
[$n]: l,
|
|
1918
|
+
[Mn]: p
|
|
1916
1919
|
};
|
|
1917
1920
|
if (!u && d) {
|
|
1918
1921
|
i.setKey("loading", !0);
|
|
@@ -1920,7 +1923,7 @@ const Je = new je(), No = (t, e, r) => {
|
|
|
1920
1923
|
S && m || m ? S = `?${Zr(S, b)}` : m = `#${Zr("", b)}`;
|
|
1921
1924
|
const v = window.location.origin + window.location.pathname + S + m;
|
|
1922
1925
|
try {
|
|
1923
|
-
const k = await
|
|
1926
|
+
const k = await $o(t, { web: v, mobile: d });
|
|
1924
1927
|
i.set({
|
|
1925
1928
|
data: k.data?.link,
|
|
1926
1929
|
loading: !1
|
|
@@ -1940,7 +1943,7 @@ var $;
|
|
|
1940
1943
|
(function(t) {
|
|
1941
1944
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1942
1945
|
})($ || ($ = {}));
|
|
1943
|
-
const
|
|
1946
|
+
const Bo = (t, e, r, n) => {
|
|
1944
1947
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1945
1948
|
i && r.add({
|
|
1946
1949
|
type: we.ONBOARDING,
|
|
@@ -1982,7 +1985,7 @@ const Uo = (t, e, r, n) => {
|
|
|
1982
1985
|
organizationId: d,
|
|
1983
1986
|
userId: u,
|
|
1984
1987
|
eventId: c
|
|
1985
|
-
}, $.Completed),
|
|
1988
|
+
}, $.Completed), Vn(s, c));
|
|
1986
1989
|
return;
|
|
1987
1990
|
}
|
|
1988
1991
|
const p = e.moderation.getStore().value?.data, b = r.featureSettings.get().inplayGame;
|
|
@@ -1997,7 +2000,7 @@ const Uo = (t, e, r, n) => {
|
|
|
1997
2000
|
let o = !!i?.skipOnboarding;
|
|
1998
2001
|
const s = e.storage, a = B($.Unset);
|
|
1999
2002
|
a.subscribe((c) => {
|
|
2000
|
-
c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (
|
|
2003
|
+
c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (Bo(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === $.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
|
|
2001
2004
|
userId: e.userId.get() || "",
|
|
2002
2005
|
organizationId: e.organizationId.get() || "",
|
|
2003
2006
|
eventId: e.slStreamId.get() || ""
|
|
@@ -2013,7 +2016,7 @@ const Uo = (t, e, r, n) => {
|
|
|
2013
2016
|
}))), ft(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
|
|
2014
2017
|
const c = e.slStreamId.get();
|
|
2015
2018
|
if (c) {
|
|
2016
|
-
await
|
|
2019
|
+
await Vn(r, c), a.set($.Completed), s.saveOnboardingStatus({
|
|
2017
2020
|
organizationId: e.organizationId.get() || "",
|
|
2018
2021
|
userId: e.userId.get() || "",
|
|
2019
2022
|
eventId: c
|
|
@@ -2025,7 +2028,7 @@ const Uo = (t, e, r, n) => {
|
|
|
2025
2028
|
n.close(l);
|
|
2026
2029
|
}
|
|
2027
2030
|
} };
|
|
2028
|
-
},
|
|
2031
|
+
}, Uo = (t, e, r, n) => {
|
|
2029
2032
|
const i = ee(void 0), o = Rn(n), s = async () => {
|
|
2030
2033
|
const u = t.get(), d = e.get(), c = r ? r.getStore().get().data?.map((b) => b.slId) : [];
|
|
2031
2034
|
if (!c || !u || !d)
|
|
@@ -2046,7 +2049,7 @@ const Uo = (t, e, r, n) => {
|
|
|
2046
2049
|
u(), d?.(), c();
|
|
2047
2050
|
};
|
|
2048
2051
|
}), { $store: i, invalidate: a };
|
|
2049
|
-
},
|
|
2052
|
+
}, jo = async (t, e, r, n, i) => {
|
|
2050
2053
|
const o = Rn(i), s = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
2051
2054
|
eventId: s,
|
|
2052
2055
|
userId: n,
|
|
@@ -2054,7 +2057,7 @@ const Uo = (t, e, r, n) => {
|
|
|
2054
2057
|
};
|
|
2055
2058
|
return (await o(d)).data?.attributes?.summary;
|
|
2056
2059
|
}, tn = /* @__PURE__ */ new Set([E.POLL, E.PREDICTION, E.TRIVIA]);
|
|
2057
|
-
class xo extends
|
|
2060
|
+
class xo extends Dn {
|
|
2058
2061
|
/** user statistics (leaderboard panel) */
|
|
2059
2062
|
userSummary;
|
|
2060
2063
|
/** feed list (pick history) */
|
|
@@ -2095,9 +2098,9 @@ class xo extends Fn {
|
|
|
2095
2098
|
cancels = /* @__PURE__ */ new Set();
|
|
2096
2099
|
onQuestionActivate;
|
|
2097
2100
|
constructor(e, r, n) {
|
|
2098
|
-
if (super(e, r), this.background = new
|
|
2099
|
-
this.friends = new oe(
|
|
2100
|
-
const i = this.leaderboardList =
|
|
2101
|
+
if (super(e, r), this.background = new mo(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = B(!n.sdk.withAuth), this.leaderboardId = new te(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(F.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Mo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Uo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
|
|
2102
|
+
this.friends = new oe(oo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = B(void 0);
|
|
2103
|
+
const i = this.leaderboardList = Eo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
|
|
2101
2104
|
this.cancels.add(this.userSummary.$store.listen((o, s) => {
|
|
2102
2105
|
s?.summary && o?.summary && i.invalidate();
|
|
2103
2106
|
}));
|
|
@@ -2147,7 +2150,7 @@ class xo extends Fn {
|
|
|
2147
2150
|
});
|
|
2148
2151
|
await b.get().promise;
|
|
2149
2152
|
let m = b.get().data;
|
|
2150
|
-
m || (m = await
|
|
2153
|
+
m || (m = await sr(s, this.transport), b.mutate(m)), S(), window.requestAnimationFrame(() => {
|
|
2151
2154
|
b.invalidate();
|
|
2152
2155
|
}), p || (p = m?.answers.find(({ youVoted: G }) => G)?.id);
|
|
2153
2156
|
const v = a.find(({ correct: G }) => G), k = p ? a.find(({ id: G }) => G === p) : void 0, V = !!k?.correct;
|
|
@@ -2319,14 +2322,19 @@ class xo extends Fn {
|
|
|
2319
2322
|
return () => {
|
|
2320
2323
|
};
|
|
2321
2324
|
const n = r?.openedFrom === "bet-pack";
|
|
2322
|
-
|
|
2325
|
+
this.notifications.close(this.background.getCurrentSessionId({
|
|
2323
2326
|
prefix: "notification",
|
|
2324
2327
|
entity: e
|
|
2325
2328
|
}), {
|
|
2326
2329
|
animateHiding: !1
|
|
2327
2330
|
});
|
|
2328
2331
|
let i = r?.attributes?.type;
|
|
2329
|
-
!i && !n && (i = (this.feedList.getStore().value?.data || []).find((a) => a.id === e)?.attributes?.type)
|
|
2332
|
+
if (!i && !n && (i = (this.feedList.getStore().value?.data || []).find((a) => a.id === e)?.attributes?.type), !n && (i === E.POLL || i === E.TRIVIA || i === E.PREDICTION)) {
|
|
2333
|
+
const s = Xe(e, this.transport);
|
|
2334
|
+
sr(e, this.transport).then((a) => {
|
|
2335
|
+
s.mutate(a);
|
|
2336
|
+
});
|
|
2337
|
+
}
|
|
2330
2338
|
const o = {
|
|
2331
2339
|
eventId: this.background.slStreamId.get() || "",
|
|
2332
2340
|
userId: this.background.userId.get() || "",
|
|
@@ -2344,7 +2352,7 @@ class xo extends Fn {
|
|
|
2344
2352
|
openedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom
|
|
2345
2353
|
} : void 0);
|
|
2346
2354
|
};
|
|
2347
|
-
getFeedItem = (e) =>
|
|
2355
|
+
getFeedItem = (e) => uo(e, this.transport);
|
|
2348
2356
|
isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
|
|
2349
2357
|
closeQuestion = (e) => (e && this.onQuestionActivate({
|
|
2350
2358
|
stage: "deactivate",
|
|
@@ -2368,7 +2376,7 @@ class xo extends Fn {
|
|
|
2368
2376
|
}
|
|
2369
2377
|
const n = { ...r };
|
|
2370
2378
|
try {
|
|
2371
|
-
const i = await
|
|
2379
|
+
const i = await jo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2372
2380
|
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);
|
|
2373
2381
|
} catch (i) {
|
|
2374
2382
|
console.error(i);
|
|
@@ -2386,7 +2394,7 @@ class xo extends Fn {
|
|
|
2386
2394
|
*/
|
|
2387
2395
|
showInApp = (e) => {
|
|
2388
2396
|
const r = this.onboardingStatus.$store.get();
|
|
2389
|
-
if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !==
|
|
2397
|
+
if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Si.ON && e.data.question.status === W.ACTIVE && !e.data.question.marketClosed) {
|
|
2390
2398
|
if (tn.has(e.data.question.type))
|
|
2391
2399
|
this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
|
|
2392
2400
|
type: we.QUESTION,
|
|
@@ -2439,7 +2447,7 @@ class xo extends Fn {
|
|
|
2439
2447
|
questionType: e.data.question.type,
|
|
2440
2448
|
insight: s,
|
|
2441
2449
|
inApp: {
|
|
2442
|
-
useMediaFromContent: n?.useAsNotification ===
|
|
2450
|
+
useMediaFromContent: n?.useAsNotification === wi.ENABLED,
|
|
2443
2451
|
notification: e.data.question.notification,
|
|
2444
2452
|
appearance: e.data.question.appearance,
|
|
2445
2453
|
sponsorship: e.data.question.sponsorship
|
|
@@ -2490,29 +2498,29 @@ class xo extends Fn {
|
|
|
2490
2498
|
}
|
|
2491
2499
|
};
|
|
2492
2500
|
}
|
|
2493
|
-
const
|
|
2494
|
-
[
|
|
2501
|
+
const qo = {
|
|
2502
|
+
[F.GAMES]: !0
|
|
2495
2503
|
};
|
|
2496
|
-
class
|
|
2504
|
+
class Qo extends Dn {
|
|
2497
2505
|
constructor(e, r) {
|
|
2498
2506
|
super(e, r);
|
|
2499
2507
|
}
|
|
2500
2508
|
}
|
|
2501
|
-
const
|
|
2502
|
-
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new te(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new te(B(
|
|
2509
|
+
const Go = (t, e, r) => t.type === F.GAMES ? new xo(t, e, r) : new Qo(t, e), zo = (t, e, r) => {
|
|
2510
|
+
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new te(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new te(B(F.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) => {
|
|
2503
2511
|
t.sdk.initializeApp().then(() => {
|
|
2504
2512
|
t.activeFeature.setValue(n);
|
|
2505
2513
|
});
|
|
2506
2514
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
2507
2515
|
const i = t.activeFeature.getValue();
|
|
2508
|
-
if (t.activeFeature.setValue(
|
|
2516
|
+
if (t.activeFeature.setValue(F.UNSET), n && i) {
|
|
2509
2517
|
t.features.delete(i);
|
|
2510
2518
|
const o = t.sdk.featuresList.getValue();
|
|
2511
2519
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2512
2520
|
}
|
|
2513
2521
|
}, t.initFeature = (n, i = me.ORGANIZATION) => {
|
|
2514
|
-
if (n.type in
|
|
2515
|
-
const o =
|
|
2522
|
+
if (n.type in qo && !t.features.has(n.type)) {
|
|
2523
|
+
const o = Go(n, i, t);
|
|
2516
2524
|
t.features.set(n.type, o);
|
|
2517
2525
|
let s = t.sdk.featuresList.getValue();
|
|
2518
2526
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2565,7 +2573,7 @@ const zo = (t, e, r) => t.type === D.GAMES ? new xo(t, e, r) : new Go(t, e), Ko
|
|
|
2565
2573
|
t.store.subscribe(i);
|
|
2566
2574
|
}, r();
|
|
2567
2575
|
};
|
|
2568
|
-
class
|
|
2576
|
+
class Ko {
|
|
2569
2577
|
analytics;
|
|
2570
2578
|
constructor(e) {
|
|
2571
2579
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2584,7 +2592,7 @@ class Ho {
|
|
|
2584
2592
|
this.analytics.write("invitation", {
|
|
2585
2593
|
common: {
|
|
2586
2594
|
...this.analytics.commonStore.getValues(),
|
|
2587
|
-
kind:
|
|
2595
|
+
kind: q.INVITATION_ACCEPTED
|
|
2588
2596
|
},
|
|
2589
2597
|
category: Rr.GAMES,
|
|
2590
2598
|
from: Vr.UNSET
|
|
@@ -2594,14 +2602,14 @@ class Ho {
|
|
|
2594
2602
|
this.analytics.write("invitation", {
|
|
2595
2603
|
common: {
|
|
2596
2604
|
...this.analytics.commonStore.getValues(),
|
|
2597
|
-
kind:
|
|
2605
|
+
kind: q.INVITATION_SENT
|
|
2598
2606
|
},
|
|
2599
2607
|
category: Rr.GAMES,
|
|
2600
2608
|
from: e || Vr.UNSET
|
|
2601
2609
|
});
|
|
2602
2610
|
};
|
|
2603
2611
|
}
|
|
2604
|
-
class
|
|
2612
|
+
class Ho {
|
|
2605
2613
|
analytics;
|
|
2606
2614
|
constructor(e) {
|
|
2607
2615
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2623,22 +2631,22 @@ class Wo {
|
|
|
2623
2631
|
this.analytics.write("interactions", {
|
|
2624
2632
|
common: {
|
|
2625
2633
|
...this.analytics.commonStore.getValues(),
|
|
2626
|
-
kind:
|
|
2634
|
+
kind: q.INTERACTIONS
|
|
2627
2635
|
},
|
|
2628
|
-
actionType:
|
|
2636
|
+
actionType: qr.TAP
|
|
2629
2637
|
});
|
|
2630
2638
|
};
|
|
2631
2639
|
scroll = () => {
|
|
2632
2640
|
this.analytics.write("interactions", {
|
|
2633
2641
|
common: {
|
|
2634
2642
|
...this.analytics.commonStore.getValues(),
|
|
2635
|
-
kind:
|
|
2643
|
+
kind: q.INTERACTIONS
|
|
2636
2644
|
},
|
|
2637
|
-
actionType:
|
|
2645
|
+
actionType: qr.SCROLL
|
|
2638
2646
|
});
|
|
2639
2647
|
};
|
|
2640
2648
|
}
|
|
2641
|
-
const
|
|
2649
|
+
const Wo = {
|
|
2642
2650
|
[H.UNSET]: J.UNSET,
|
|
2643
2651
|
[H.INGAME_IAB21]: J.PROMOTION_INGAME_IAB21,
|
|
2644
2652
|
[H.INGAME_IAB11_LBAR]: J.PROMOTION_INGAME_IAB11_LBAR,
|
|
@@ -2651,8 +2659,8 @@ const Yo = {
|
|
|
2651
2659
|
[H.SHOP_LBAR]: J.PROMOTION_SHOP_LBAR,
|
|
2652
2660
|
[H.SHOP_OVERLAY]: J.PROMOTION_SHOP_OVERLAY,
|
|
2653
2661
|
[H.SHOP_SIDEBAR]: J.PROMOTION_SHOP_SIDEBAR
|
|
2654
|
-
}, ar = (t) => t ?
|
|
2655
|
-
class
|
|
2662
|
+
}, ar = (t) => t ? Wo[t] : J.UNSET;
|
|
2663
|
+
class Yo {
|
|
2656
2664
|
analytics;
|
|
2657
2665
|
constructor(e) {
|
|
2658
2666
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2688,9 +2696,9 @@ class Jo {
|
|
|
2688
2696
|
this.analytics.write("games", {
|
|
2689
2697
|
common: {
|
|
2690
2698
|
...this.analytics.commonStore.getValues(),
|
|
2691
|
-
kind:
|
|
2699
|
+
kind: q.POLLS_RECEIVED,
|
|
2692
2700
|
topicId: e,
|
|
2693
|
-
topicType:
|
|
2701
|
+
topicType: x.POLLS_PROMOTION,
|
|
2694
2702
|
topicSubType: r
|
|
2695
2703
|
},
|
|
2696
2704
|
pollOpenedFrom: X.UNSET
|
|
@@ -2700,9 +2708,9 @@ class Jo {
|
|
|
2700
2708
|
this.analytics.write("games", {
|
|
2701
2709
|
common: {
|
|
2702
2710
|
...this.analytics.commonStore.getValues(),
|
|
2703
|
-
kind:
|
|
2711
|
+
kind: q.POLLS_OPENED,
|
|
2704
2712
|
topicId: e,
|
|
2705
|
-
topicType:
|
|
2713
|
+
topicType: x.POLLS_PROMOTION,
|
|
2706
2714
|
topicSubType: n
|
|
2707
2715
|
},
|
|
2708
2716
|
pollOpenedFrom: r === "notification" ? X.IN_APP : X.UNSET
|
|
@@ -2712,9 +2720,9 @@ class Jo {
|
|
|
2712
2720
|
this.analytics.write("games", {
|
|
2713
2721
|
common: {
|
|
2714
2722
|
...this.analytics.commonStore.getValues(),
|
|
2715
|
-
kind:
|
|
2723
|
+
kind: q.POLLS_OPENED,
|
|
2716
2724
|
topicId: e,
|
|
2717
|
-
topicType:
|
|
2725
|
+
topicType: x.POLLS_PROMOTION,
|
|
2718
2726
|
topicSubType: r
|
|
2719
2727
|
},
|
|
2720
2728
|
pollOpenedFrom: X.UNSET
|
|
@@ -2725,8 +2733,8 @@ class Jo {
|
|
|
2725
2733
|
common: {
|
|
2726
2734
|
...this.analytics.commonStore.getValues(),
|
|
2727
2735
|
topicId: e,
|
|
2728
|
-
kind:
|
|
2729
|
-
topicType:
|
|
2736
|
+
kind: q.AD_VIDEO_PLAYED,
|
|
2737
|
+
topicType: x.POLLS_PROMOTION,
|
|
2730
2738
|
topicSubType: r
|
|
2731
2739
|
},
|
|
2732
2740
|
pollOpenedFrom: X.UNSET
|
|
@@ -2737,8 +2745,8 @@ class Jo {
|
|
|
2737
2745
|
common: {
|
|
2738
2746
|
...this.analytics.commonStore.getValues(),
|
|
2739
2747
|
topicId: e,
|
|
2740
|
-
kind:
|
|
2741
|
-
topicType:
|
|
2748
|
+
kind: q.AD_BUTTON_NAVIGATED,
|
|
2749
|
+
topicType: x.POLLS_PROMOTION,
|
|
2742
2750
|
topicSubType: r
|
|
2743
2751
|
},
|
|
2744
2752
|
pollOpenedFrom: X.UNSET
|
|
@@ -2749,8 +2757,8 @@ class Jo {
|
|
|
2749
2757
|
common: {
|
|
2750
2758
|
...this.analytics.commonStore.getValues(),
|
|
2751
2759
|
topicId: e,
|
|
2752
|
-
kind:
|
|
2753
|
-
topicType:
|
|
2760
|
+
kind: q.AD_BANNER_NAVIGATED,
|
|
2761
|
+
topicType: x.POLLS_PROMOTION,
|
|
2754
2762
|
topicSubType: r
|
|
2755
2763
|
},
|
|
2756
2764
|
pollOpenedFrom: X.UNSET
|
|
@@ -2758,36 +2766,36 @@ class Jo {
|
|
|
2758
2766
|
};
|
|
2759
2767
|
}
|
|
2760
2768
|
const et = {
|
|
2761
|
-
[E.UNSET]:
|
|
2762
|
-
[E.FACTOID]:
|
|
2763
|
-
[E.POLL]:
|
|
2764
|
-
[E.PREDICTION]:
|
|
2765
|
-
[E.PROMOTION]:
|
|
2766
|
-
[E.TRIVIA]:
|
|
2767
|
-
[E.TWEET]:
|
|
2769
|
+
[E.UNSET]: x.UNSET,
|
|
2770
|
+
[E.FACTOID]: x.POLLS_INSIGHT,
|
|
2771
|
+
[E.POLL]: x.POLLS_POLL,
|
|
2772
|
+
[E.PREDICTION]: x.POLLS_PREDICTION,
|
|
2773
|
+
[E.PROMOTION]: x.POLLS_PROMOTION,
|
|
2774
|
+
[E.TRIVIA]: x.POLLS_TRIVIA,
|
|
2775
|
+
[E.TWEET]: x.POLLS_TWITTER
|
|
2768
2776
|
};
|
|
2769
2777
|
E.UNSET + "", ye.UNSET, E.FACTOID + "", ye.POLLS, E.POLL + "", ye.POLLS, E.PREDICTION + "", ye.POLLS, E.PROMOTION + "", ye.POLLS, E.TRIVIA + "", ye.POLLS, E.TWEET + "", ye.POLLS;
|
|
2770
|
-
const
|
|
2771
|
-
[
|
|
2772
|
-
[
|
|
2773
|
-
[
|
|
2774
|
-
[
|
|
2775
|
-
[
|
|
2776
|
-
[
|
|
2777
|
-
[
|
|
2778
|
-
[
|
|
2779
|
-
[
|
|
2780
|
-
[
|
|
2781
|
-
[
|
|
2782
|
-
[
|
|
2783
|
-
[
|
|
2778
|
+
const Jo = {
|
|
2779
|
+
[F.UNSET]: z.UNSET,
|
|
2780
|
+
[F.INPLAY]: z.INPLAY,
|
|
2781
|
+
[F.MESSAGING]: z.MESSAGING,
|
|
2782
|
+
[F.STATISTICS]: z.STATS,
|
|
2783
|
+
[F.BETTING]: z.BETTING,
|
|
2784
|
+
[F.TWITTER]: z.TWITTER,
|
|
2785
|
+
[F.MERCHANDISE]: z.MERCHANDISE,
|
|
2786
|
+
[F.CONTESTS]: z.CONTESTS,
|
|
2787
|
+
[F.VOICE_CHAT]: z.CALLING,
|
|
2788
|
+
[F.TICKETS]: z.TICKETS,
|
|
2789
|
+
[F.WHOIS_WATCHING]: z.WHOISWATCHING,
|
|
2790
|
+
[F.PROFILE]: z.PROFILE,
|
|
2791
|
+
[F.GAMES]: z.POLLS,
|
|
2784
2792
|
// ??
|
|
2785
|
-
[
|
|
2793
|
+
[F.GOLF_STATISTICS]: z.STATS,
|
|
2786
2794
|
// ??
|
|
2787
|
-
[
|
|
2788
|
-
[
|
|
2795
|
+
[F.HIGHLIGHTS]: z.HIGHLIGHTS,
|
|
2796
|
+
[F.PUBLIC_CHAT]: z.PUBLIC_CHAT
|
|
2789
2797
|
};
|
|
2790
|
-
class
|
|
2798
|
+
class Xo {
|
|
2791
2799
|
analytics;
|
|
2792
2800
|
constructor(e) {
|
|
2793
2801
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2826,9 +2834,9 @@ class Zo {
|
|
|
2826
2834
|
this.analytics.write("notification", {
|
|
2827
2835
|
common: {
|
|
2828
2836
|
...this.analytics.commonStore.getValues(),
|
|
2829
|
-
kind:
|
|
2837
|
+
kind: q.NOTIFICATION_RECEIVED,
|
|
2830
2838
|
topicId: e,
|
|
2831
|
-
topicType: r ? et[r] :
|
|
2839
|
+
topicType: r ? et[r] : x.UNSET,
|
|
2832
2840
|
topicSubType: n
|
|
2833
2841
|
},
|
|
2834
2842
|
notificationKind: ye.POLLS,
|
|
@@ -2839,9 +2847,9 @@ class Zo {
|
|
|
2839
2847
|
this.analytics.write("notification", {
|
|
2840
2848
|
common: {
|
|
2841
2849
|
...this.analytics.commonStore.getValues(),
|
|
2842
|
-
kind:
|
|
2850
|
+
kind: q.NOTIFICATION_OPENED,
|
|
2843
2851
|
topicId: e,
|
|
2844
|
-
topicType: r ? et[r] :
|
|
2852
|
+
topicType: r ? et[r] : x.UNSET,
|
|
2845
2853
|
topicSubType: n
|
|
2846
2854
|
},
|
|
2847
2855
|
notificationKind: ye.POLLS,
|
|
@@ -2849,7 +2857,7 @@ class Zo {
|
|
|
2849
2857
|
});
|
|
2850
2858
|
};
|
|
2851
2859
|
}
|
|
2852
|
-
class
|
|
2860
|
+
class Zo {
|
|
2853
2861
|
analytics;
|
|
2854
2862
|
constructor(e) {
|
|
2855
2863
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2881,9 +2889,9 @@ class es {
|
|
|
2881
2889
|
this.analytics.write("games", {
|
|
2882
2890
|
common: {
|
|
2883
2891
|
...this.analytics.commonStore.getValues(),
|
|
2884
|
-
kind:
|
|
2892
|
+
kind: q.POLLS_RECEIVED,
|
|
2885
2893
|
topicId: e,
|
|
2886
|
-
topicType: r ? et[r] :
|
|
2894
|
+
topicType: r ? et[r] : x.UNSET
|
|
2887
2895
|
},
|
|
2888
2896
|
pollOpenedFrom: X.UNSET
|
|
2889
2897
|
});
|
|
@@ -2893,9 +2901,9 @@ class es {
|
|
|
2893
2901
|
this.analytics.write("games", {
|
|
2894
2902
|
common: {
|
|
2895
2903
|
...this.analytics.commonStore.getValues(),
|
|
2896
|
-
kind:
|
|
2904
|
+
kind: q.POLLS_OPENED,
|
|
2897
2905
|
topicId: e,
|
|
2898
|
-
topicType: r ? et[r] :
|
|
2906
|
+
topicType: r ? et[r] : x.UNSET
|
|
2899
2907
|
},
|
|
2900
2908
|
pollOpenedFrom: n === "list" ? X.PICK_HISTORY : X.IN_APP
|
|
2901
2909
|
});
|
|
@@ -2905,9 +2913,9 @@ class es {
|
|
|
2905
2913
|
this.analytics.write("games", {
|
|
2906
2914
|
common: {
|
|
2907
2915
|
...this.analytics.commonStore.getValues(),
|
|
2908
|
-
kind:
|
|
2916
|
+
kind: q.POLLS_VOTE,
|
|
2909
2917
|
topicId: e,
|
|
2910
|
-
topicType: r ? et[r] :
|
|
2918
|
+
topicType: r ? et[r] : x.UNSET
|
|
2911
2919
|
},
|
|
2912
2920
|
pollOpenedFrom: X.UNSET
|
|
2913
2921
|
});
|
|
@@ -2917,7 +2925,7 @@ class es {
|
|
|
2917
2925
|
this.analytics.write("games", {
|
|
2918
2926
|
common: {
|
|
2919
2927
|
...this.analytics.commonStore.getValues(),
|
|
2920
|
-
kind:
|
|
2928
|
+
kind: q.GAMES_JOINED
|
|
2921
2929
|
},
|
|
2922
2930
|
pollOpenedFrom: X.UNSET
|
|
2923
2931
|
});
|
|
@@ -2927,13 +2935,13 @@ class es {
|
|
|
2927
2935
|
this.analytics.write("games", {
|
|
2928
2936
|
common: {
|
|
2929
2937
|
...this.analytics.commonStore.getValues(),
|
|
2930
|
-
kind:
|
|
2938
|
+
kind: q.POLLS_NAVIGATED
|
|
2931
2939
|
},
|
|
2932
2940
|
pollOpenedFrom: X.UNSET
|
|
2933
2941
|
});
|
|
2934
2942
|
};
|
|
2935
2943
|
}
|
|
2936
|
-
const
|
|
2944
|
+
const es = ({ transport: t, $commonStore: e }) => {
|
|
2937
2945
|
let r;
|
|
2938
2946
|
const n = B(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(_n, {
|
|
2939
2947
|
method: "send",
|
|
@@ -2948,7 +2956,7 @@ const ts = ({ transport: t, $commonStore: e }) => {
|
|
|
2948
2956
|
value: {
|
|
2949
2957
|
common: {
|
|
2950
2958
|
...p,
|
|
2951
|
-
kind:
|
|
2959
|
+
kind: q.SESSION_HEARTBEAT
|
|
2952
2960
|
}
|
|
2953
2961
|
}
|
|
2954
2962
|
}
|
|
@@ -2971,7 +2979,7 @@ const ts = ({ transport: t, $commonStore: e }) => {
|
|
|
2971
2979
|
ve.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2972
2980
|
} };
|
|
2973
2981
|
}, ve = Ee("analytics");
|
|
2974
|
-
class
|
|
2982
|
+
class ts {
|
|
2975
2983
|
commonStore;
|
|
2976
2984
|
notifications;
|
|
2977
2985
|
polls;
|
|
@@ -2984,7 +2992,7 @@ class rs {
|
|
|
2984
2992
|
listenersCancels;
|
|
2985
2993
|
connected = !1;
|
|
2986
2994
|
constructor(e) {
|
|
2987
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(ee({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2995
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(ee({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = es({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Xo(this), this.polls = new Zo(this), this.invitation = new Ko(this), this.interactions = new Ho(this), this.advertisement = new Yo(this);
|
|
2988
2996
|
const { client: r } = e.analyticsTransport.createPromiseClient(_n, {
|
|
2989
2997
|
method: "send"
|
|
2990
2998
|
});
|
|
@@ -3014,10 +3022,10 @@ class rs {
|
|
|
3014
3022
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
3015
3023
|
this.writeCommon("eventId", r);
|
|
3016
3024
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
3017
|
-
r && this.writeCommon("category",
|
|
3025
|
+
r && this.writeCommon("category", Jo[r]), r !== F.UNSET ? this.writeCommon("overlaySessionId", St()) : this.writeCommon("overlaySessionId", "");
|
|
3018
3026
|
})), this.onConnect(() => {
|
|
3019
3027
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
3020
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
3028
|
+
this.writeCommon("screenOrientation", i.matches ? xr.PORTRAIT : xr.LANDSCAPE);
|
|
3021
3029
|
};
|
|
3022
3030
|
return r.addEventListener("change", n), () => {
|
|
3023
3031
|
r.removeEventListener("change", n);
|
|
@@ -3027,19 +3035,19 @@ class rs {
|
|
|
3027
3035
|
}));
|
|
3028
3036
|
};
|
|
3029
3037
|
}
|
|
3030
|
-
const
|
|
3031
|
-
t.analytics = new
|
|
3038
|
+
const rs = (t, e, r) => {
|
|
3039
|
+
t.analytics = new ts(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
|
|
3032
3040
|
n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId", St());
|
|
3033
3041
|
}, () => {
|
|
3034
3042
|
t.analytics.disconnect();
|
|
3035
3043
|
})), r();
|
|
3036
3044
|
};
|
|
3037
3045
|
var Sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3038
|
-
function
|
|
3046
|
+
function ns(t) {
|
|
3039
3047
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3040
3048
|
}
|
|
3041
3049
|
var wr = { exports: {} }, Ar = { exports: {} };
|
|
3042
|
-
function
|
|
3050
|
+
function is(t) {
|
|
3043
3051
|
var e = new t(), r = e;
|
|
3044
3052
|
function n() {
|
|
3045
3053
|
var o = e;
|
|
@@ -3053,11 +3061,11 @@ function os(t) {
|
|
|
3053
3061
|
release: i
|
|
3054
3062
|
};
|
|
3055
3063
|
}
|
|
3056
|
-
var
|
|
3057
|
-
function
|
|
3064
|
+
var os = is, ss = os;
|
|
3065
|
+
function Bn(t, e, r) {
|
|
3058
3066
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
3059
3067
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
3060
|
-
var n = as
|
|
3068
|
+
var n = ss(as), i = null, o = null, s = 0, a = null, u = {
|
|
3061
3069
|
push: m,
|
|
3062
3070
|
drain: Z,
|
|
3063
3071
|
saturated: Z,
|
|
@@ -3139,7 +3147,7 @@ function Un(t, e, r) {
|
|
|
3139
3147
|
}
|
|
3140
3148
|
function Z() {
|
|
3141
3149
|
}
|
|
3142
|
-
function
|
|
3150
|
+
function as() {
|
|
3143
3151
|
this.value = null, this.callback = Z, this.next = null, this.release = Z, this.context = null, this.errorHandler = null;
|
|
3144
3152
|
var t = this;
|
|
3145
3153
|
this.worked = function(r, n) {
|
|
@@ -3147,14 +3155,14 @@ function us() {
|
|
|
3147
3155
|
t.value = null, t.callback = Z, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
3148
3156
|
};
|
|
3149
3157
|
}
|
|
3150
|
-
function
|
|
3158
|
+
function us(t, e, r) {
|
|
3151
3159
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
3152
3160
|
function n(c, l) {
|
|
3153
3161
|
e.call(this, c).then(function(p) {
|
|
3154
3162
|
l(null, p);
|
|
3155
3163
|
}, l);
|
|
3156
3164
|
}
|
|
3157
|
-
var i =
|
|
3165
|
+
var i = Bn(t, n, r), o = i.push, s = i.unshift;
|
|
3158
3166
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
3159
3167
|
function a(c) {
|
|
3160
3168
|
var l = new Promise(function(p, b) {
|
|
@@ -3193,9 +3201,9 @@ function cs(t, e, r) {
|
|
|
3193
3201
|
return l;
|
|
3194
3202
|
}
|
|
3195
3203
|
}
|
|
3196
|
-
Ar.exports =
|
|
3197
|
-
Ar.exports.promise =
|
|
3198
|
-
var
|
|
3204
|
+
Ar.exports = Bn;
|
|
3205
|
+
Ar.exports.promise = us;
|
|
3206
|
+
var Un = Ar.exports, Er = { exports: {} }, Qe = typeof Reflect == "object" ? Reflect : null, rn = Qe && typeof Qe.apply == "function" ? Qe.apply : function(e, r, n) {
|
|
3199
3207
|
return Function.prototype.apply.call(e, r, n);
|
|
3200
3208
|
}, ht;
|
|
3201
3209
|
Qe && typeof Qe.ownKeys == "function" ? ht = Qe.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
|
|
@@ -3203,17 +3211,17 @@ Qe && typeof Qe.ownKeys == "function" ? ht = Qe.ownKeys : Object.getOwnPropertyS
|
|
|
3203
3211
|
} : ht = function(e) {
|
|
3204
3212
|
return Object.getOwnPropertyNames(e);
|
|
3205
3213
|
};
|
|
3206
|
-
function
|
|
3214
|
+
function cs(t) {
|
|
3207
3215
|
console && console.warn && console.warn(t);
|
|
3208
3216
|
}
|
|
3209
|
-
var
|
|
3217
|
+
var jn = Number.isNaN || function(e) {
|
|
3210
3218
|
return e !== e;
|
|
3211
3219
|
};
|
|
3212
3220
|
function N() {
|
|
3213
3221
|
N.init.call(this);
|
|
3214
3222
|
}
|
|
3215
3223
|
Er.exports = N;
|
|
3216
|
-
Er.exports.once =
|
|
3224
|
+
Er.exports.once = ps;
|
|
3217
3225
|
N.EventEmitter = N;
|
|
3218
3226
|
N.prototype._events = void 0;
|
|
3219
3227
|
N.prototype._eventsCount = 0;
|
|
@@ -3229,7 +3237,7 @@ Object.defineProperty(N, "defaultMaxListeners", {
|
|
|
3229
3237
|
return nn;
|
|
3230
3238
|
},
|
|
3231
3239
|
set: function(t) {
|
|
3232
|
-
if (typeof t != "number" || t < 0 ||
|
|
3240
|
+
if (typeof t != "number" || t < 0 || jn(t))
|
|
3233
3241
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3234
3242
|
nn = t;
|
|
3235
3243
|
}
|
|
@@ -3238,7 +3246,7 @@ N.init = function() {
|
|
|
3238
3246
|
(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;
|
|
3239
3247
|
};
|
|
3240
3248
|
N.prototype.setMaxListeners = function(e) {
|
|
3241
|
-
if (typeof e != "number" || e < 0 ||
|
|
3249
|
+
if (typeof e != "number" || e < 0 || jn(e))
|
|
3242
3250
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3243
3251
|
return this._maxListeners = e, this;
|
|
3244
3252
|
};
|
|
@@ -3268,11 +3276,11 @@ N.prototype.emit = function(e) {
|
|
|
3268
3276
|
if (typeof u == "function")
|
|
3269
3277
|
rn(u, this, r);
|
|
3270
3278
|
else
|
|
3271
|
-
for (var d = u.length, c =
|
|
3279
|
+
for (var d = u.length, c = Kn(u, d), n = 0; n < d; ++n)
|
|
3272
3280
|
rn(c[n], this, r);
|
|
3273
3281
|
return !0;
|
|
3274
3282
|
};
|
|
3275
|
-
function
|
|
3283
|
+
function qn(t, e, r, n) {
|
|
3276
3284
|
var i, o, s;
|
|
3277
3285
|
if (Nt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3278
3286
|
"newListener",
|
|
@@ -3283,30 +3291,30 @@ function Qn(t, e, r, n) {
|
|
|
3283
3291
|
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = xn(t), i > 0 && s.length > i && !s.warned) {
|
|
3284
3292
|
s.warned = !0;
|
|
3285
3293
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3286
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
3294
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, cs(a);
|
|
3287
3295
|
}
|
|
3288
3296
|
return t;
|
|
3289
3297
|
}
|
|
3290
3298
|
N.prototype.addListener = function(e, r) {
|
|
3291
|
-
return
|
|
3299
|
+
return qn(this, e, r, !1);
|
|
3292
3300
|
};
|
|
3293
3301
|
N.prototype.on = N.prototype.addListener;
|
|
3294
3302
|
N.prototype.prependListener = function(e, r) {
|
|
3295
|
-
return
|
|
3303
|
+
return qn(this, e, r, !0);
|
|
3296
3304
|
};
|
|
3297
|
-
function
|
|
3305
|
+
function ls() {
|
|
3298
3306
|
if (!this.fired)
|
|
3299
3307
|
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);
|
|
3300
3308
|
}
|
|
3301
|
-
function
|
|
3302
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
3309
|
+
function Qn(t, e, r) {
|
|
3310
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = ls.bind(n);
|
|
3303
3311
|
return i.listener = r, n.wrapFn = i, i;
|
|
3304
3312
|
}
|
|
3305
3313
|
N.prototype.once = function(e, r) {
|
|
3306
|
-
return Nt(r), this.on(e,
|
|
3314
|
+
return Nt(r), this.on(e, Qn(this, e, r)), this;
|
|
3307
3315
|
};
|
|
3308
3316
|
N.prototype.prependOnceListener = function(e, r) {
|
|
3309
|
-
return Nt(r), this.prependListener(e,
|
|
3317
|
+
return Nt(r), this.prependListener(e, Qn(this, e, r)), this;
|
|
3310
3318
|
};
|
|
3311
3319
|
N.prototype.removeListener = function(e, r) {
|
|
3312
3320
|
var n, i, o, s, a;
|
|
@@ -3324,7 +3332,7 @@ N.prototype.removeListener = function(e, r) {
|
|
|
3324
3332
|
}
|
|
3325
3333
|
if (o < 0)
|
|
3326
3334
|
return this;
|
|
3327
|
-
o === 0 ? n.shift() :
|
|
3335
|
+
o === 0 ? n.shift() : ds(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
3328
3336
|
}
|
|
3329
3337
|
return this;
|
|
3330
3338
|
};
|
|
@@ -3348,24 +3356,24 @@ N.prototype.removeAllListeners = function(e) {
|
|
|
3348
3356
|
this.removeListener(e, r[i]);
|
|
3349
3357
|
return this;
|
|
3350
3358
|
};
|
|
3351
|
-
function
|
|
3359
|
+
function Gn(t, e, r) {
|
|
3352
3360
|
var n = t._events;
|
|
3353
3361
|
if (n === void 0)
|
|
3354
3362
|
return [];
|
|
3355
3363
|
var i = n[e];
|
|
3356
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
3364
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? fs(i) : Kn(i, i.length);
|
|
3357
3365
|
}
|
|
3358
3366
|
N.prototype.listeners = function(e) {
|
|
3359
|
-
return
|
|
3367
|
+
return Gn(this, e, !0);
|
|
3360
3368
|
};
|
|
3361
3369
|
N.prototype.rawListeners = function(e) {
|
|
3362
|
-
return
|
|
3370
|
+
return Gn(this, e, !1);
|
|
3363
3371
|
};
|
|
3364
3372
|
N.listenerCount = function(t, e) {
|
|
3365
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
3373
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : zn.call(t, e);
|
|
3366
3374
|
};
|
|
3367
|
-
N.prototype.listenerCount =
|
|
3368
|
-
function
|
|
3375
|
+
N.prototype.listenerCount = zn;
|
|
3376
|
+
function zn(t) {
|
|
3369
3377
|
var e = this._events;
|
|
3370
3378
|
if (e !== void 0) {
|
|
3371
3379
|
var r = e[t];
|
|
@@ -3379,22 +3387,22 @@ function Kn(t) {
|
|
|
3379
3387
|
N.prototype.eventNames = function() {
|
|
3380
3388
|
return this._eventsCount > 0 ? ht(this._events) : [];
|
|
3381
3389
|
};
|
|
3382
|
-
function
|
|
3390
|
+
function Kn(t, e) {
|
|
3383
3391
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
3384
3392
|
r[n] = t[n];
|
|
3385
3393
|
return r;
|
|
3386
3394
|
}
|
|
3387
|
-
function
|
|
3395
|
+
function ds(t, e) {
|
|
3388
3396
|
for (; e + 1 < t.length; e++)
|
|
3389
3397
|
t[e] = t[e + 1];
|
|
3390
3398
|
t.pop();
|
|
3391
3399
|
}
|
|
3392
|
-
function
|
|
3400
|
+
function fs(t) {
|
|
3393
3401
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3394
3402
|
e[r] = t[r].listener || t[r];
|
|
3395
3403
|
return e;
|
|
3396
3404
|
}
|
|
3397
|
-
function
|
|
3405
|
+
function ps(t, e) {
|
|
3398
3406
|
return new Promise(function(r, n) {
|
|
3399
3407
|
function i(s) {
|
|
3400
3408
|
t.removeListener(e, o), n(s);
|
|
@@ -3402,13 +3410,13 @@ function hs(t, e) {
|
|
|
3402
3410
|
function o() {
|
|
3403
3411
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3404
3412
|
}
|
|
3405
|
-
|
|
3413
|
+
Hn(t, e, o, { once: !0 }), e !== "error" && hs(t, i, { once: !0 });
|
|
3406
3414
|
});
|
|
3407
3415
|
}
|
|
3408
|
-
function
|
|
3409
|
-
typeof t.on == "function" &&
|
|
3416
|
+
function hs(t, e, r) {
|
|
3417
|
+
typeof t.on == "function" && Hn(t, "error", e, r);
|
|
3410
3418
|
}
|
|
3411
|
-
function
|
|
3419
|
+
function Hn(t, e, r, n) {
|
|
3412
3420
|
if (typeof t.on == "function")
|
|
3413
3421
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
3414
3422
|
else if (typeof t.addEventListener == "function")
|
|
@@ -3418,7 +3426,7 @@ function Wn(t, e, r, n) {
|
|
|
3418
3426
|
else
|
|
3419
3427
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3420
3428
|
}
|
|
3421
|
-
var
|
|
3429
|
+
var Wn = Er.exports, Dt = {}, Yn = {}, Jn = function() {
|
|
3422
3430
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3423
3431
|
return !1;
|
|
3424
3432
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3441,34 +3449,34 @@ var Yn = Er.exports, Ft = {}, Jn = {}, Xn = function() {
|
|
|
3441
3449
|
return !1;
|
|
3442
3450
|
}
|
|
3443
3451
|
return !0;
|
|
3444
|
-
},
|
|
3445
|
-
return
|
|
3446
|
-
},
|
|
3447
|
-
return typeof on != "function" || typeof Symbol != "function" || typeof on("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3448
|
-
},
|
|
3452
|
+
}, ys = Jn, Ft = function() {
|
|
3453
|
+
return ys() && !!Symbol.toStringTag;
|
|
3454
|
+
}, gs = Error, ms = EvalError, bs = RangeError, vs = ReferenceError, Xn = SyntaxError, Rt = TypeError, Ss = URIError, on = typeof Symbol < "u" && Symbol, ws = Jn, As = function() {
|
|
3455
|
+
return typeof on != "function" || typeof Symbol != "function" || typeof on("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ws();
|
|
3456
|
+
}, Ut = {
|
|
3449
3457
|
__proto__: null,
|
|
3450
3458
|
foo: {}
|
|
3451
|
-
},
|
|
3452
|
-
return { __proto__:
|
|
3453
|
-
},
|
|
3459
|
+
}, Es = Object, Is = function() {
|
|
3460
|
+
return { __proto__: Ut }.foo === Ut.foo && !(Ut instanceof Es);
|
|
3461
|
+
}, Os = "Function.prototype.bind called on incompatible ", Ts = Object.prototype.toString, ks = Math.max, _s = "[object Function]", sn = function(e, r) {
|
|
3454
3462
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3455
3463
|
n[i] = e[i];
|
|
3456
3464
|
for (var o = 0; o < r.length; o += 1)
|
|
3457
3465
|
n[o + e.length] = r[o];
|
|
3458
3466
|
return n;
|
|
3459
|
-
},
|
|
3467
|
+
}, Cs = function(e, r) {
|
|
3460
3468
|
for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
|
|
3461
3469
|
n[o] = e[i];
|
|
3462
3470
|
return n;
|
|
3463
|
-
},
|
|
3471
|
+
}, Ls = function(t, e) {
|
|
3464
3472
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
3465
3473
|
r += t[n], n + 1 < t.length && (r += e);
|
|
3466
3474
|
return r;
|
|
3467
|
-
},
|
|
3475
|
+
}, Ps = function(e) {
|
|
3468
3476
|
var r = this;
|
|
3469
|
-
if (typeof r != "function" ||
|
|
3470
|
-
throw new TypeError(
|
|
3471
|
-
for (var n =
|
|
3477
|
+
if (typeof r != "function" || Ts.apply(r) !== _s)
|
|
3478
|
+
throw new TypeError(Os + r);
|
|
3479
|
+
for (var n = Cs(arguments, 1), i, o = function() {
|
|
3472
3480
|
if (this instanceof i) {
|
|
3473
3481
|
var c = r.apply(
|
|
3474
3482
|
this,
|
|
@@ -3480,17 +3488,17 @@ var Yn = Er.exports, Ft = {}, Jn = {}, Xn = function() {
|
|
|
3480
3488
|
e,
|
|
3481
3489
|
sn(n, arguments)
|
|
3482
3490
|
);
|
|
3483
|
-
}, s =
|
|
3491
|
+
}, s = ks(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3484
3492
|
a[u] = "$" + u;
|
|
3485
|
-
if (i = Function("binder", "return function (" +
|
|
3493
|
+
if (i = Function("binder", "return function (" + Ls(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3486
3494
|
var d = function() {
|
|
3487
3495
|
};
|
|
3488
3496
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3489
3497
|
}
|
|
3490
3498
|
return i;
|
|
3491
|
-
},
|
|
3499
|
+
}, Ns = Ps, Ir = Function.prototype.bind || Ns, Ds = Function.prototype.call, Fs = Object.prototype.hasOwnProperty, Rs = Ir, Vs = Rs.call(Ds, Fs), O, $s = gs, Ms = ms, Bs = bs, Us = vs, Ke = Xn, Ge = Rt, js = Ss, Zn = Function, jt = function(t) {
|
|
3492
3500
|
try {
|
|
3493
|
-
return
|
|
3501
|
+
return Zn('"use strict"; return (' + t + ").constructor;")();
|
|
3494
3502
|
} catch {
|
|
3495
3503
|
}
|
|
3496
3504
|
}, Pe = Object.getOwnPropertyDescriptor;
|
|
@@ -3512,9 +3520,9 @@ var xt = function() {
|
|
|
3512
3520
|
return xt;
|
|
3513
3521
|
}
|
|
3514
3522
|
}
|
|
3515
|
-
}() : xt, Me =
|
|
3523
|
+
}() : xt, Me = As(), qs = Is(), U = Object.getPrototypeOf || (qs ? function(t) {
|
|
3516
3524
|
return t.__proto__;
|
|
3517
|
-
} : null), Ue = {},
|
|
3525
|
+
} : null), Ue = {}, Qs = typeof Uint8Array > "u" || !U ? O : U(Uint8Array), Ne = {
|
|
3518
3526
|
__proto__: null,
|
|
3519
3527
|
"%AggregateError%": typeof AggregateError > "u" ? O : AggregateError,
|
|
3520
3528
|
"%Array%": Array,
|
|
@@ -3536,14 +3544,14 @@ var xt = function() {
|
|
|
3536
3544
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3537
3545
|
"%encodeURI%": encodeURI,
|
|
3538
3546
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3539
|
-
"%Error%":
|
|
3547
|
+
"%Error%": $s,
|
|
3540
3548
|
"%eval%": eval,
|
|
3541
3549
|
// eslint-disable-line no-eval
|
|
3542
|
-
"%EvalError%":
|
|
3550
|
+
"%EvalError%": Ms,
|
|
3543
3551
|
"%Float32Array%": typeof Float32Array > "u" ? O : Float32Array,
|
|
3544
3552
|
"%Float64Array%": typeof Float64Array > "u" ? O : Float64Array,
|
|
3545
3553
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? O : FinalizationRegistry,
|
|
3546
|
-
"%Function%":
|
|
3554
|
+
"%Function%": Zn,
|
|
3547
3555
|
"%GeneratorFunction%": Ue,
|
|
3548
3556
|
"%Int8Array%": typeof Int8Array > "u" ? O : Int8Array,
|
|
3549
3557
|
"%Int16Array%": typeof Int16Array > "u" ? O : Int16Array,
|
|
@@ -3561,8 +3569,8 @@ var xt = function() {
|
|
|
3561
3569
|
"%parseInt%": parseInt,
|
|
3562
3570
|
"%Promise%": typeof Promise > "u" ? O : Promise,
|
|
3563
3571
|
"%Proxy%": typeof Proxy > "u" ? O : Proxy,
|
|
3564
|
-
"%RangeError%":
|
|
3565
|
-
"%ReferenceError%":
|
|
3572
|
+
"%RangeError%": Bs,
|
|
3573
|
+
"%ReferenceError%": Us,
|
|
3566
3574
|
"%Reflect%": typeof Reflect > "u" ? O : Reflect,
|
|
3567
3575
|
"%RegExp%": RegExp,
|
|
3568
3576
|
"%Set%": typeof Set > "u" ? O : Set,
|
|
@@ -3573,13 +3581,13 @@ var xt = function() {
|
|
|
3573
3581
|
"%Symbol%": Me ? Symbol : O,
|
|
3574
3582
|
"%SyntaxError%": Ke,
|
|
3575
3583
|
"%ThrowTypeError%": xs,
|
|
3576
|
-
"%TypedArray%":
|
|
3584
|
+
"%TypedArray%": Qs,
|
|
3577
3585
|
"%TypeError%": Ge,
|
|
3578
3586
|
"%Uint8Array%": typeof Uint8Array > "u" ? O : Uint8Array,
|
|
3579
3587
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? O : Uint8ClampedArray,
|
|
3580
3588
|
"%Uint16Array%": typeof Uint16Array > "u" ? O : Uint16Array,
|
|
3581
3589
|
"%Uint32Array%": typeof Uint32Array > "u" ? O : Uint32Array,
|
|
3582
|
-
"%URIError%":
|
|
3590
|
+
"%URIError%": js,
|
|
3583
3591
|
"%WeakMap%": typeof WeakMap > "u" ? O : WeakMap,
|
|
3584
3592
|
"%WeakRef%": typeof WeakRef > "u" ? O : WeakRef,
|
|
3585
3593
|
"%WeakSet%": typeof WeakSet > "u" ? O : WeakSet
|
|
@@ -3588,17 +3596,17 @@ if (U)
|
|
|
3588
3596
|
try {
|
|
3589
3597
|
null.error;
|
|
3590
3598
|
} catch (t) {
|
|
3591
|
-
var
|
|
3592
|
-
Ne["%Error.prototype%"] =
|
|
3599
|
+
var Gs = U(U(t));
|
|
3600
|
+
Ne["%Error.prototype%"] = Gs;
|
|
3593
3601
|
}
|
|
3594
|
-
var
|
|
3602
|
+
var zs = function t(e) {
|
|
3595
3603
|
var r;
|
|
3596
3604
|
if (e === "%AsyncFunction%")
|
|
3597
|
-
r =
|
|
3605
|
+
r = jt("async function () {}");
|
|
3598
3606
|
else if (e === "%GeneratorFunction%")
|
|
3599
|
-
r =
|
|
3607
|
+
r = jt("function* () {}");
|
|
3600
3608
|
else if (e === "%AsyncGeneratorFunction%")
|
|
3601
|
-
r =
|
|
3609
|
+
r = jt("async function* () {}");
|
|
3602
3610
|
else if (e === "%AsyncGenerator%") {
|
|
3603
3611
|
var n = t("%AsyncGeneratorFunction%");
|
|
3604
3612
|
n && (r = n.prototype);
|
|
@@ -3660,21 +3668,21 @@ var Ks = function t(e) {
|
|
|
3660
3668
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3661
3669
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3662
3670
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3663
|
-
}, ot = Ir, At =
|
|
3671
|
+
}, ot = Ir, At = Vs, Ks = ot.call(Function.call, Array.prototype.concat), Hs = ot.call(Function.apply, Array.prototype.splice), un = 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) {
|
|
3664
3672
|
var r = Et(e, 0, 1), n = Et(e, -1);
|
|
3665
3673
|
if (r === "%" && n !== "%")
|
|
3666
3674
|
throw new Ke("invalid intrinsic syntax, expected closing `%`");
|
|
3667
3675
|
if (n === "%" && r !== "%")
|
|
3668
3676
|
throw new Ke("invalid intrinsic syntax, expected opening `%`");
|
|
3669
3677
|
var i = [];
|
|
3670
|
-
return un(e,
|
|
3671
|
-
i[i.length] = a ? un(u,
|
|
3678
|
+
return un(e, Ys, function(o, s, a, u) {
|
|
3679
|
+
i[i.length] = a ? un(u, Js, "$1") : s || o;
|
|
3672
3680
|
}), i;
|
|
3673
|
-
},
|
|
3681
|
+
}, Zs = function(e, r) {
|
|
3674
3682
|
var n = e, i;
|
|
3675
3683
|
if (At(an, n) && (i = an[n], n = "%" + i[0] + "%"), At(Ne, n)) {
|
|
3676
3684
|
var o = Ne[n];
|
|
3677
|
-
if (o === Ue && (o =
|
|
3685
|
+
if (o === Ue && (o = zs(n)), typeof o > "u" && !r)
|
|
3678
3686
|
throw new Ge("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3679
3687
|
return {
|
|
3680
3688
|
alias: i,
|
|
@@ -3688,10 +3696,10 @@ var Ks = function t(e) {
|
|
|
3688
3696
|
throw new Ge("intrinsic name must be a non-empty string");
|
|
3689
3697
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3690
3698
|
throw new Ge('"allowMissing" argument must be a boolean');
|
|
3691
|
-
if (
|
|
3699
|
+
if (Ws(/^%?[^%]*%?$/, e) === null)
|
|
3692
3700
|
throw new Ke("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3693
|
-
var n =
|
|
3694
|
-
d && (i = d[0],
|
|
3701
|
+
var n = Xs(e), i = n.length > 0 ? n[0] : "", o = Zs("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
3702
|
+
d && (i = d[0], Hs(n, Ks([0, 1], d)));
|
|
3695
3703
|
for (var c = 1, l = !0; c < n.length; c += 1) {
|
|
3696
3704
|
var p = n[c], b = Et(p, 0, 1), S = Et(p, -1);
|
|
3697
3705
|
if ((b === '"' || b === "'" || b === "`" || S === '"' || S === "'" || S === "`") && b !== S)
|
|
@@ -3713,9 +3721,9 @@ var Ks = function t(e) {
|
|
|
3713
3721
|
}
|
|
3714
3722
|
}
|
|
3715
3723
|
return a;
|
|
3716
|
-
},
|
|
3724
|
+
}, ei = { exports: {} }, qt, cn;
|
|
3717
3725
|
function Or() {
|
|
3718
|
-
if (cn) return
|
|
3726
|
+
if (cn) return qt;
|
|
3719
3727
|
cn = 1;
|
|
3720
3728
|
var t = st, e = t("%Object.defineProperty%", !0) || !1;
|
|
3721
3729
|
if (e)
|
|
@@ -3724,16 +3732,16 @@ function Or() {
|
|
|
3724
3732
|
} catch {
|
|
3725
3733
|
e = !1;
|
|
3726
3734
|
}
|
|
3727
|
-
return
|
|
3735
|
+
return qt = e, qt;
|
|
3728
3736
|
}
|
|
3729
|
-
var
|
|
3737
|
+
var ea = st, yt = ea("%Object.getOwnPropertyDescriptor%", !0);
|
|
3730
3738
|
if (yt)
|
|
3731
3739
|
try {
|
|
3732
3740
|
yt([], "length");
|
|
3733
3741
|
} catch {
|
|
3734
3742
|
yt = null;
|
|
3735
3743
|
}
|
|
3736
|
-
var Vt = yt, ln = Or(),
|
|
3744
|
+
var Vt = yt, ln = Or(), ta = Xn, Be = Rt, dn = Vt, ra = function(e, r, n) {
|
|
3737
3745
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3738
3746
|
throw new Be("`obj` must be an object or a function`");
|
|
3739
3747
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3757,11 +3765,11 @@ var Vt = yt, ln = Or(), ra = Zn, Be = Rt, dn = Vt, na = function(e, r, n) {
|
|
|
3757
3765
|
else if (a || !i && !o && !s)
|
|
3758
3766
|
e[r] = n;
|
|
3759
3767
|
else
|
|
3760
|
-
throw new
|
|
3761
|
-
}, ur = Or(),
|
|
3768
|
+
throw new ta("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3769
|
+
}, ur = Or(), ti = function() {
|
|
3762
3770
|
return !!ur;
|
|
3763
3771
|
};
|
|
3764
|
-
|
|
3772
|
+
ti.hasArrayLengthDefineBug = function() {
|
|
3765
3773
|
if (!ur)
|
|
3766
3774
|
return null;
|
|
3767
3775
|
try {
|
|
@@ -3770,17 +3778,17 @@ ri.hasArrayLengthDefineBug = function() {
|
|
|
3770
3778
|
return !0;
|
|
3771
3779
|
}
|
|
3772
3780
|
};
|
|
3773
|
-
var
|
|
3781
|
+
var na = ti, ia = st, fn = ra, oa = na(), pn = Vt, hn = Rt, sa = ia("%Math.floor%"), aa = function(e, r) {
|
|
3774
3782
|
if (typeof e != "function")
|
|
3775
3783
|
throw new hn("`fn` is not a function");
|
|
3776
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3784
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || sa(r) !== r)
|
|
3777
3785
|
throw new hn("`length` must be a positive 32-bit integer");
|
|
3778
3786
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3779
3787
|
if ("length" in e && pn) {
|
|
3780
3788
|
var s = pn(e, "length");
|
|
3781
3789
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3782
3790
|
}
|
|
3783
|
-
return (i || o || !n) && (
|
|
3791
|
+
return (i || o || !n) && (oa ? fn(
|
|
3784
3792
|
/** @type {Parameters<define>[0]} */
|
|
3785
3793
|
e,
|
|
3786
3794
|
"length",
|
|
@@ -3795,7 +3803,7 @@ var ia = ri, oa = st, fn = na, sa = ia(), pn = Vt, hn = Rt, aa = oa("%Math.floor
|
|
|
3795
3803
|
)), e;
|
|
3796
3804
|
};
|
|
3797
3805
|
(function(t) {
|
|
3798
|
-
var e = Ir, r = st, n =
|
|
3806
|
+
var e = Ir, 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 = Or(), d = r("%Math.max%");
|
|
3799
3807
|
t.exports = function(p) {
|
|
3800
3808
|
if (typeof p != "function")
|
|
3801
3809
|
throw new i("a function is required");
|
|
@@ -3810,122 +3818,122 @@ var ia = ri, oa = st, fn = na, sa = ia(), pn = Vt, hn = Rt, aa = oa("%Math.floor
|
|
|
3810
3818
|
return a(e, o, arguments);
|
|
3811
3819
|
};
|
|
3812
3820
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3813
|
-
})(
|
|
3814
|
-
var Tr =
|
|
3815
|
-
var n =
|
|
3816
|
-
return typeof n == "function" &&
|
|
3817
|
-
},
|
|
3818
|
-
return
|
|
3819
|
-
},
|
|
3821
|
+
})(ei);
|
|
3822
|
+
var Tr = ei.exports, ri = st, ni = Tr, ua = ni(ri("String.prototype.indexOf")), kr = function(e, r) {
|
|
3823
|
+
var n = ri(e, !!r);
|
|
3824
|
+
return typeof n == "function" && ua(e, ".prototype.") > -1 ? ni(n) : n;
|
|
3825
|
+
}, ca = Ft(), la = kr, cr = la("Object.prototype.toString"), $t = function(e) {
|
|
3826
|
+
return ca && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : cr(e) === "[object Arguments]";
|
|
3827
|
+
}, ii = function(e) {
|
|
3820
3828
|
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]";
|
|
3821
|
-
},
|
|
3829
|
+
}, da = function() {
|
|
3822
3830
|
return $t(arguments);
|
|
3823
3831
|
}();
|
|
3824
|
-
$t.isLegacyArguments =
|
|
3825
|
-
var
|
|
3826
|
-
if (!
|
|
3832
|
+
$t.isLegacyArguments = ii;
|
|
3833
|
+
var fa = da ? $t : ii, pa = Object.prototype.toString, ha = Function.prototype.toString, ya = /^\s*(?:function)?\*/, oi = Ft(), Qt = Object.getPrototypeOf, ga = function() {
|
|
3834
|
+
if (!oi)
|
|
3827
3835
|
return !1;
|
|
3828
3836
|
try {
|
|
3829
3837
|
return Function("return function*() {}")();
|
|
3830
3838
|
} catch {
|
|
3831
3839
|
}
|
|
3832
|
-
},
|
|
3840
|
+
}, Gt, ma = function(e) {
|
|
3833
3841
|
if (typeof e != "function")
|
|
3834
3842
|
return !1;
|
|
3835
|
-
if (
|
|
3843
|
+
if (ya.test(ha.call(e)))
|
|
3836
3844
|
return !0;
|
|
3837
|
-
if (!
|
|
3838
|
-
var r =
|
|
3845
|
+
if (!oi) {
|
|
3846
|
+
var r = pa.call(e);
|
|
3839
3847
|
return r === "[object GeneratorFunction]";
|
|
3840
3848
|
}
|
|
3841
|
-
if (!
|
|
3849
|
+
if (!Qt)
|
|
3842
3850
|
return !1;
|
|
3843
|
-
if (typeof
|
|
3844
|
-
var n =
|
|
3845
|
-
|
|
3851
|
+
if (typeof Gt > "u") {
|
|
3852
|
+
var n = ga();
|
|
3853
|
+
Gt = n ? Qt(n) : !1;
|
|
3846
3854
|
}
|
|
3847
|
-
return
|
|
3848
|
-
},
|
|
3849
|
-
if (typeof
|
|
3855
|
+
return Qt(e) === Gt;
|
|
3856
|
+
}, si = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, lr, gt;
|
|
3857
|
+
if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
3850
3858
|
try {
|
|
3851
3859
|
lr = Object.defineProperty({}, "length", {
|
|
3852
3860
|
get: function() {
|
|
3853
3861
|
throw gt;
|
|
3854
3862
|
}
|
|
3855
|
-
}), gt = {},
|
|
3863
|
+
}), gt = {}, xe(function() {
|
|
3856
3864
|
throw 42;
|
|
3857
3865
|
}, null, lr);
|
|
3858
3866
|
} catch (t) {
|
|
3859
|
-
t !== gt && (
|
|
3867
|
+
t !== gt && (xe = null);
|
|
3860
3868
|
}
|
|
3861
3869
|
else
|
|
3862
|
-
|
|
3863
|
-
var
|
|
3870
|
+
xe = null;
|
|
3871
|
+
var ba = /^\s*class\b/, dr = function(e) {
|
|
3864
3872
|
try {
|
|
3865
|
-
var r =
|
|
3866
|
-
return
|
|
3873
|
+
var r = si.call(e);
|
|
3874
|
+
return ba.test(r);
|
|
3867
3875
|
} catch {
|
|
3868
3876
|
return !1;
|
|
3869
3877
|
}
|
|
3870
|
-
},
|
|
3878
|
+
}, zt = function(e) {
|
|
3871
3879
|
try {
|
|
3872
|
-
return dr(e) ? !1 : (
|
|
3880
|
+
return dr(e) ? !1 : (si.call(e), !0);
|
|
3873
3881
|
} catch {
|
|
3874
3882
|
return !1;
|
|
3875
3883
|
}
|
|
3876
|
-
}, mt = Object.prototype.toString,
|
|
3884
|
+
}, mt = Object.prototype.toString, va = "[object Object]", Sa = "[object Function]", wa = "[object GeneratorFunction]", Aa = "[object HTMLAllCollection]", Ea = "[object HTML document.all class]", Ia = "[object HTMLCollection]", Oa = typeof Symbol == "function" && !!Symbol.toStringTag, Ta = !(0 in [,]), fr = function() {
|
|
3877
3885
|
return !1;
|
|
3878
3886
|
};
|
|
3879
3887
|
if (typeof document == "object") {
|
|
3880
|
-
var
|
|
3881
|
-
mt.call(
|
|
3882
|
-
if ((
|
|
3888
|
+
var ka = document.all;
|
|
3889
|
+
mt.call(ka) === mt.call(document.all) && (fr = function(e) {
|
|
3890
|
+
if ((Ta || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3883
3891
|
try {
|
|
3884
3892
|
var r = mt.call(e);
|
|
3885
|
-
return (r ===
|
|
3893
|
+
return (r === Aa || r === Ea || r === Ia || r === va) && e("") == null;
|
|
3886
3894
|
} catch {
|
|
3887
3895
|
}
|
|
3888
3896
|
return !1;
|
|
3889
3897
|
});
|
|
3890
3898
|
}
|
|
3891
|
-
var
|
|
3899
|
+
var _a = xe ? function(e) {
|
|
3892
3900
|
if (fr(e))
|
|
3893
3901
|
return !0;
|
|
3894
3902
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3895
3903
|
return !1;
|
|
3896
3904
|
try {
|
|
3897
|
-
|
|
3905
|
+
xe(e, null, lr);
|
|
3898
3906
|
} catch (r) {
|
|
3899
3907
|
if (r !== gt)
|
|
3900
3908
|
return !1;
|
|
3901
3909
|
}
|
|
3902
|
-
return !dr(e) &&
|
|
3910
|
+
return !dr(e) && zt(e);
|
|
3903
3911
|
} : function(e) {
|
|
3904
3912
|
if (fr(e))
|
|
3905
3913
|
return !0;
|
|
3906
3914
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3907
3915
|
return !1;
|
|
3908
|
-
if (
|
|
3909
|
-
return
|
|
3916
|
+
if (Oa)
|
|
3917
|
+
return zt(e);
|
|
3910
3918
|
if (dr(e))
|
|
3911
3919
|
return !1;
|
|
3912
3920
|
var r = mt.call(e);
|
|
3913
|
-
return r !==
|
|
3914
|
-
},
|
|
3921
|
+
return r !== Sa && r !== wa && !/^\[object HTML/.test(r) ? !1 : zt(e);
|
|
3922
|
+
}, Ca = _a, La = Object.prototype.toString, ai = Object.prototype.hasOwnProperty, Pa = function(e, r, n) {
|
|
3915
3923
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3916
|
-
|
|
3917
|
-
},
|
|
3924
|
+
ai.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3925
|
+
}, Na = function(e, r, n) {
|
|
3918
3926
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3919
3927
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3920
3928
|
}, Da = function(e, r, n) {
|
|
3921
3929
|
for (var i in e)
|
|
3922
|
-
|
|
3923
|
-
},
|
|
3924
|
-
if (!
|
|
3930
|
+
ai.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3931
|
+
}, Fa = function(e, r, n) {
|
|
3932
|
+
if (!Ca(r))
|
|
3925
3933
|
throw new TypeError("iterator must be a function");
|
|
3926
3934
|
var i;
|
|
3927
|
-
arguments.length >= 3 && (i = n),
|
|
3928
|
-
},
|
|
3935
|
+
arguments.length >= 3 && (i = n), La.call(e) === "[object Array]" ? Pa(e, r, i) : typeof e == "string" ? Na(e, r, i) : Da(e, r, i);
|
|
3936
|
+
}, ui = Fa, Ra = [
|
|
3929
3937
|
"Float32Array",
|
|
3930
3938
|
"Float64Array",
|
|
3931
3939
|
"Int8Array",
|
|
@@ -3937,22 +3945,22 @@ var Ca = qe ? function(e) {
|
|
|
3937
3945
|
"Uint32Array",
|
|
3938
3946
|
"BigInt64Array",
|
|
3939
3947
|
"BigUint64Array"
|
|
3940
|
-
],
|
|
3941
|
-
for (var e = [], r = 0; r <
|
|
3942
|
-
typeof
|
|
3948
|
+
], Kt = Ra, Va = typeof globalThis > "u" ? Sr : globalThis, ci = function() {
|
|
3949
|
+
for (var e = [], r = 0; r < Kt.length; r++)
|
|
3950
|
+
typeof Va[Kt[r]] == "function" && (e[e.length] = Kt[r]);
|
|
3943
3951
|
return e;
|
|
3944
|
-
}, It =
|
|
3952
|
+
}, It = ui, $a = ci, yn = Tr, _r = kr, bt = Vt, Ma = _r("Object.prototype.toString"), li = Ft(), gn = typeof globalThis > "u" ? Sr : globalThis, pr = $a(), Cr = _r("String.prototype.slice"), Ht = Object.getPrototypeOf, Ba = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3945
3953
|
for (var n = 0; n < e.length; n += 1)
|
|
3946
3954
|
if (e[n] === r)
|
|
3947
3955
|
return n;
|
|
3948
3956
|
return -1;
|
|
3949
3957
|
}, Ot = { __proto__: null };
|
|
3950
|
-
|
|
3958
|
+
li && bt && Ht ? It(pr, function(t) {
|
|
3951
3959
|
var e = new gn[t]();
|
|
3952
3960
|
if (Symbol.toStringTag in e) {
|
|
3953
|
-
var r =
|
|
3961
|
+
var r = Ht(e), n = bt(r, Symbol.toStringTag);
|
|
3954
3962
|
if (!n) {
|
|
3955
|
-
var i =
|
|
3963
|
+
var i = Ht(r);
|
|
3956
3964
|
n = bt(i, Symbol.toStringTag);
|
|
3957
3965
|
}
|
|
3958
3966
|
Ot["$" + t] = yn(n.get);
|
|
@@ -3961,7 +3969,7 @@ di && bt && Wt ? It(pr, function(t) {
|
|
|
3961
3969
|
var e = new gn[t](), r = e.slice || e.set;
|
|
3962
3970
|
r && (Ot["$" + t] = yn(r));
|
|
3963
3971
|
});
|
|
3964
|
-
var
|
|
3972
|
+
var Ua = function(e) {
|
|
3965
3973
|
var r = !1;
|
|
3966
3974
|
return It(Ot, function(n, i) {
|
|
3967
3975
|
if (!r)
|
|
@@ -3970,7 +3978,7 @@ var ja = function(e) {
|
|
|
3970
3978
|
} catch {
|
|
3971
3979
|
}
|
|
3972
3980
|
}), r;
|
|
3973
|
-
},
|
|
3981
|
+
}, ja = function(e) {
|
|
3974
3982
|
var r = !1;
|
|
3975
3983
|
return It(Ot, function(n, i) {
|
|
3976
3984
|
if (!r)
|
|
@@ -3982,23 +3990,23 @@ var ja = function(e) {
|
|
|
3982
3990
|
}, xa = function(e) {
|
|
3983
3991
|
if (!e || typeof e != "object")
|
|
3984
3992
|
return !1;
|
|
3985
|
-
if (!
|
|
3986
|
-
var r = Cr(
|
|
3987
|
-
return
|
|
3993
|
+
if (!li) {
|
|
3994
|
+
var r = Cr(Ma(e), 8, -1);
|
|
3995
|
+
return Ba(pr, r) > -1 ? r : r !== "Object" ? !1 : ja(e);
|
|
3988
3996
|
}
|
|
3989
|
-
return bt ?
|
|
3990
|
-
}, Tt =
|
|
3997
|
+
return bt ? Ua(e) : null;
|
|
3998
|
+
}, Tt = ui, qa = ci, mn = Tr, Lr = kr, vt = Vt, Qa = Lr("Object.prototype.toString"), di = Ft(), bn = typeof globalThis > "u" ? Sr : globalThis, hr = qa(), Pr = Lr("String.prototype.slice"), Wt = Object.getPrototypeOf, Ga = Lr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3991
3999
|
for (var n = 0; n < e.length; n += 1)
|
|
3992
4000
|
if (e[n] === r)
|
|
3993
4001
|
return n;
|
|
3994
4002
|
return -1;
|
|
3995
4003
|
}, kt = { __proto__: null };
|
|
3996
|
-
|
|
4004
|
+
di && vt && Wt ? Tt(hr, function(t) {
|
|
3997
4005
|
var e = new bn[t]();
|
|
3998
4006
|
if (Symbol.toStringTag in e) {
|
|
3999
|
-
var r =
|
|
4007
|
+
var r = Wt(e), n = vt(r, Symbol.toStringTag);
|
|
4000
4008
|
if (!n) {
|
|
4001
|
-
var i =
|
|
4009
|
+
var i = Wt(r);
|
|
4002
4010
|
n = vt(i, Symbol.toStringTag);
|
|
4003
4011
|
}
|
|
4004
4012
|
kt["$" + t] = mn(n.get);
|
|
@@ -4007,7 +4015,7 @@ fi && vt && Yt ? Tt(hr, function(t) {
|
|
|
4007
4015
|
var e = new bn[t](), r = e.slice || e.set;
|
|
4008
4016
|
r && (kt["$" + t] = mn(r));
|
|
4009
4017
|
});
|
|
4010
|
-
var
|
|
4018
|
+
var za = function(e) {
|
|
4011
4019
|
var r = !1;
|
|
4012
4020
|
return Tt(
|
|
4013
4021
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -4023,7 +4031,7 @@ var Ka = function(e) {
|
|
|
4023
4031
|
}
|
|
4024
4032
|
}
|
|
4025
4033
|
), r;
|
|
4026
|
-
},
|
|
4034
|
+
}, Ka = function(e) {
|
|
4027
4035
|
var r = !1;
|
|
4028
4036
|
return Tt(
|
|
4029
4037
|
// eslint-disable-next-line no-extra-parens
|
|
@@ -4039,19 +4047,19 @@ var Ka = function(e) {
|
|
|
4039
4047
|
}
|
|
4040
4048
|
}
|
|
4041
4049
|
), r;
|
|
4042
|
-
},
|
|
4050
|
+
}, Ha = function(e) {
|
|
4043
4051
|
if (!e || typeof e != "object")
|
|
4044
4052
|
return !1;
|
|
4045
|
-
if (!
|
|
4046
|
-
var r = Pr(
|
|
4047
|
-
return
|
|
4053
|
+
if (!di) {
|
|
4054
|
+
var r = Pr(Qa(e), 8, -1);
|
|
4055
|
+
return Ga(hr, r) > -1 ? r : r !== "Object" ? !1 : Ka(e);
|
|
4048
4056
|
}
|
|
4049
|
-
return vt ?
|
|
4050
|
-
},
|
|
4051
|
-
return !!
|
|
4057
|
+
return vt ? za(e) : null;
|
|
4058
|
+
}, Wa = Ha, Ya = function(e) {
|
|
4059
|
+
return !!Wa(e);
|
|
4052
4060
|
};
|
|
4053
4061
|
(function(t) {
|
|
4054
|
-
var e =
|
|
4062
|
+
var e = fa, r = ma, n = xa, i = Ya;
|
|
4055
4063
|
function o(y) {
|
|
4056
4064
|
return y.call.bind(y);
|
|
4057
4065
|
}
|
|
@@ -4060,11 +4068,11 @@ var Ka = function(e) {
|
|
|
4060
4068
|
var p = o(BigInt.prototype.valueOf);
|
|
4061
4069
|
if (a)
|
|
4062
4070
|
var b = o(Symbol.prototype.valueOf);
|
|
4063
|
-
function S(y,
|
|
4071
|
+
function S(y, bi) {
|
|
4064
4072
|
if (typeof y != "object")
|
|
4065
4073
|
return !1;
|
|
4066
4074
|
try {
|
|
4067
|
-
return
|
|
4075
|
+
return bi(y), !0;
|
|
4068
4076
|
} catch {
|
|
4069
4077
|
return !1;
|
|
4070
4078
|
}
|
|
@@ -4114,10 +4122,10 @@ var Ka = function(e) {
|
|
|
4114
4122
|
return n(y) === "Float64Array";
|
|
4115
4123
|
}
|
|
4116
4124
|
t.isFloat64Array = ue;
|
|
4117
|
-
function
|
|
4125
|
+
function De(y) {
|
|
4118
4126
|
return n(y) === "BigInt64Array";
|
|
4119
4127
|
}
|
|
4120
|
-
t.isBigInt64Array =
|
|
4128
|
+
t.isBigInt64Array = De;
|
|
4121
4129
|
function Te(y) {
|
|
4122
4130
|
return n(y) === "BigUint64Array";
|
|
4123
4131
|
}
|
|
@@ -4138,12 +4146,12 @@ var Ka = function(e) {
|
|
|
4138
4146
|
return typeof Set > "u" ? !1 : Ie.working ? Ie(y) : y instanceof Set;
|
|
4139
4147
|
}
|
|
4140
4148
|
t.isSet = Ye;
|
|
4141
|
-
function
|
|
4149
|
+
function Fe(y) {
|
|
4142
4150
|
return u(y) === "[object WeakMap]";
|
|
4143
4151
|
}
|
|
4144
|
-
|
|
4152
|
+
Fe.working = typeof WeakMap < "u" && Fe(/* @__PURE__ */ new WeakMap());
|
|
4145
4153
|
function Bt(y) {
|
|
4146
|
-
return typeof WeakMap > "u" ? !1 :
|
|
4154
|
+
return typeof WeakMap > "u" ? !1 : Fe.working ? Fe(y) : y instanceof WeakMap;
|
|
4147
4155
|
}
|
|
4148
4156
|
t.isWeakMap = Bt;
|
|
4149
4157
|
function Re(y) {
|
|
@@ -4190,10 +4198,10 @@ var Ka = function(e) {
|
|
|
4190
4198
|
return u(y) === "[object Set Iterator]";
|
|
4191
4199
|
}
|
|
4192
4200
|
t.isSetIterator = _;
|
|
4193
|
-
function
|
|
4201
|
+
function D(y) {
|
|
4194
4202
|
return u(y) === "[object Generator]";
|
|
4195
4203
|
}
|
|
4196
|
-
t.isGeneratorObject =
|
|
4204
|
+
t.isGeneratorObject = D;
|
|
4197
4205
|
function Y(y) {
|
|
4198
4206
|
return u(y) === "[object WebAssembly.Module]";
|
|
4199
4207
|
}
|
|
@@ -4214,18 +4222,18 @@ var Ka = function(e) {
|
|
|
4214
4222
|
return s && S(y, p);
|
|
4215
4223
|
}
|
|
4216
4224
|
t.isBigIntObject = ct;
|
|
4217
|
-
function
|
|
4225
|
+
function Fr(y) {
|
|
4218
4226
|
return a && S(y, b);
|
|
4219
4227
|
}
|
|
4220
|
-
t.isSymbolObject =
|
|
4221
|
-
function
|
|
4222
|
-
return ke(y) || ut(y) || $e(y) || ct(y) ||
|
|
4228
|
+
t.isSymbolObject = Fr;
|
|
4229
|
+
function gi(y) {
|
|
4230
|
+
return ke(y) || ut(y) || $e(y) || ct(y) || Fr(y);
|
|
4223
4231
|
}
|
|
4224
|
-
t.isBoxedPrimitive =
|
|
4225
|
-
function
|
|
4232
|
+
t.isBoxedPrimitive = gi;
|
|
4233
|
+
function mi(y) {
|
|
4226
4234
|
return typeof Uint8Array < "u" && (at(y) || C(y));
|
|
4227
4235
|
}
|
|
4228
|
-
t.isAnyArrayBuffer =
|
|
4236
|
+
t.isAnyArrayBuffer = mi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4229
4237
|
Object.defineProperty(t, y, {
|
|
4230
4238
|
enumerable: !1,
|
|
4231
4239
|
value: function() {
|
|
@@ -4233,8 +4241,8 @@ var Ka = function(e) {
|
|
|
4233
4241
|
}
|
|
4234
4242
|
});
|
|
4235
4243
|
});
|
|
4236
|
-
})(
|
|
4237
|
-
var
|
|
4244
|
+
})(Yn);
|
|
4245
|
+
var Ja = function(e) {
|
|
4238
4246
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
4239
4247
|
}, yr = { exports: {} };
|
|
4240
4248
|
typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
@@ -4254,7 +4262,7 @@ typeof Object.create == "function" ? yr.exports = function(e, r) {
|
|
|
4254
4262
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
4255
4263
|
}
|
|
4256
4264
|
};
|
|
4257
|
-
var
|
|
4265
|
+
var Xa = yr.exports;
|
|
4258
4266
|
(function(t) {
|
|
4259
4267
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
4260
4268
|
for (var g = Object.keys(h), w = {}, C = 0; C < g.length; C++)
|
|
@@ -4388,25 +4396,25 @@ var Za = yr.exports;
|
|
|
4388
4396
|
}
|
|
4389
4397
|
if (ae(h))
|
|
4390
4398
|
return f.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
4391
|
-
if (
|
|
4399
|
+
if (De(h))
|
|
4392
4400
|
return f.stylize(Date.prototype.toString.call(h), "date");
|
|
4393
4401
|
if (Te(h))
|
|
4394
4402
|
return p(h);
|
|
4395
4403
|
}
|
|
4396
|
-
var
|
|
4404
|
+
var D = "", Y = !1, ke = ["{", "}"];
|
|
4397
4405
|
if (v(h) && (Y = !0, ke = ["[", "]"]), pe(h)) {
|
|
4398
4406
|
var ut = h.name ? ": " + h.name : "";
|
|
4399
|
-
|
|
4407
|
+
D = " [Function" + ut + "]";
|
|
4400
4408
|
}
|
|
4401
|
-
if (ae(h) && (
|
|
4402
|
-
return ke[0] +
|
|
4409
|
+
if (ae(h) && (D = " " + RegExp.prototype.toString.call(h)), De(h) && (D = " " + Date.prototype.toUTCString.call(h)), Te(h) && (D = " " + p(h)), L.length === 0 && (!Y || h.length == 0))
|
|
4410
|
+
return ke[0] + D + ke[1];
|
|
4403
4411
|
if (g < 0)
|
|
4404
4412
|
return ae(h) ? f.stylize(RegExp.prototype.toString.call(h), "regexp") : f.stylize("[Object]", "special");
|
|
4405
4413
|
f.seen.push(h);
|
|
4406
4414
|
var $e;
|
|
4407
4415
|
return Y ? $e = b(f, h, g, I, L) : $e = L.map(function(ct) {
|
|
4408
4416
|
return S(f, h, g, I, ct, Y);
|
|
4409
|
-
}), f.seen.pop(), m($e,
|
|
4417
|
+
}), f.seen.pop(), m($e, D, ke);
|
|
4410
4418
|
}
|
|
4411
4419
|
function l(f, h) {
|
|
4412
4420
|
if (T(h))
|
|
@@ -4435,20 +4443,20 @@ var Za = yr.exports;
|
|
|
4435
4443
|
String(I),
|
|
4436
4444
|
!0
|
|
4437
4445
|
)) : L.push("");
|
|
4438
|
-
return C.forEach(function(
|
|
4439
|
-
|
|
4446
|
+
return C.forEach(function(D) {
|
|
4447
|
+
D.match(/^\d+$/) || L.push(S(
|
|
4440
4448
|
f,
|
|
4441
4449
|
h,
|
|
4442
4450
|
g,
|
|
4443
4451
|
w,
|
|
4444
|
-
|
|
4452
|
+
D,
|
|
4445
4453
|
!0
|
|
4446
4454
|
));
|
|
4447
4455
|
}), L;
|
|
4448
4456
|
}
|
|
4449
4457
|
function S(f, h, g, w, C, L) {
|
|
4450
|
-
var I, _,
|
|
4451
|
-
if (
|
|
4458
|
+
var I, _, D;
|
|
4459
|
+
if (D = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, D.get ? D.set ? _ = f.stylize("[Getter/Setter]", "special") : _ = f.stylize("[Getter]", "special") : D.set && (_ = f.stylize("[Setter]", "special")), Re(w, C) || (I = "[" + C + "]"), _ || (f.seen.indexOf(D.value) < 0 ? (V(g) ? _ = c(f, D.value, null) : _ = c(f, D.value, g - 1), _.indexOf(`
|
|
4452
4460
|
`) > -1 && (L ? _ = _.split(`
|
|
4453
4461
|
`).map(function(Y) {
|
|
4454
4462
|
return " " + Y;
|
|
@@ -4474,7 +4482,7 @@ var Za = yr.exports;
|
|
|
4474
4482
|
`) + " " + f.join(`,
|
|
4475
4483
|
`) + " " + g[1] : g[0] + h + " " + f.join(", ") + " " + g[1];
|
|
4476
4484
|
}
|
|
4477
|
-
t.types =
|
|
4485
|
+
t.types = Yn;
|
|
4478
4486
|
function v(f) {
|
|
4479
4487
|
return Array.isArray(f);
|
|
4480
4488
|
}
|
|
@@ -4515,10 +4523,10 @@ var Za = yr.exports;
|
|
|
4515
4523
|
return typeof f == "object" && f !== null;
|
|
4516
4524
|
}
|
|
4517
4525
|
t.isObject = ue;
|
|
4518
|
-
function
|
|
4526
|
+
function De(f) {
|
|
4519
4527
|
return ue(f) && Ie(f) === "[object Date]";
|
|
4520
4528
|
}
|
|
4521
|
-
t.isDate =
|
|
4529
|
+
t.isDate = De, t.types.isDate = De;
|
|
4522
4530
|
function Te(f) {
|
|
4523
4531
|
return ue(f) && (Ie(f) === "[object Error]" || f instanceof Error);
|
|
4524
4532
|
}
|
|
@@ -4531,14 +4539,14 @@ var Za = yr.exports;
|
|
|
4531
4539
|
return f === null || typeof f == "boolean" || typeof f == "number" || typeof f == "string" || typeof f == "symbol" || // ES6 symbol
|
|
4532
4540
|
typeof f > "u";
|
|
4533
4541
|
}
|
|
4534
|
-
t.isPrimitive = Mt, t.isBuffer =
|
|
4542
|
+
t.isPrimitive = Mt, t.isBuffer = Ja;
|
|
4535
4543
|
function Ie(f) {
|
|
4536
4544
|
return Object.prototype.toString.call(f);
|
|
4537
4545
|
}
|
|
4538
4546
|
function Ye(f) {
|
|
4539
4547
|
return f < 10 ? "0" + f.toString(10) : f.toString(10);
|
|
4540
4548
|
}
|
|
4541
|
-
var
|
|
4549
|
+
var Fe = [
|
|
4542
4550
|
"Jan",
|
|
4543
4551
|
"Feb",
|
|
4544
4552
|
"Mar",
|
|
@@ -4558,11 +4566,11 @@ var Za = yr.exports;
|
|
|
4558
4566
|
Ye(f.getMinutes()),
|
|
4559
4567
|
Ye(f.getSeconds())
|
|
4560
4568
|
].join(":");
|
|
4561
|
-
return [f.getDate(),
|
|
4569
|
+
return [f.getDate(), Fe[f.getMonth()], h].join(" ");
|
|
4562
4570
|
}
|
|
4563
4571
|
t.log = function() {
|
|
4564
4572
|
console.log("%s - %s", Bt(), t.format.apply(t, arguments));
|
|
4565
|
-
}, t.inherits =
|
|
4573
|
+
}, t.inherits = Xa, t._extend = function(f, h) {
|
|
4566
4574
|
if (!h || !ue(h)) return f;
|
|
4567
4575
|
for (var g = Object.keys(h), w = g.length; w--; )
|
|
4568
4576
|
f[g[w]] = h[g[w]];
|
|
@@ -4587,17 +4595,17 @@ var Za = yr.exports;
|
|
|
4587
4595
|
}), g;
|
|
4588
4596
|
}
|
|
4589
4597
|
function g() {
|
|
4590
|
-
for (var w, C, L = new Promise(function(
|
|
4591
|
-
w =
|
|
4598
|
+
for (var w, C, L = new Promise(function(D, Y) {
|
|
4599
|
+
w = D, C = Y;
|
|
4592
4600
|
}), I = [], _ = 0; _ < arguments.length; _++)
|
|
4593
4601
|
I.push(arguments[_]);
|
|
4594
|
-
I.push(function(
|
|
4595
|
-
|
|
4602
|
+
I.push(function(D, Y) {
|
|
4603
|
+
D ? C(D) : w(Y);
|
|
4596
4604
|
});
|
|
4597
4605
|
try {
|
|
4598
4606
|
h.apply(this, I);
|
|
4599
|
-
} catch (
|
|
4600
|
-
C(
|
|
4607
|
+
} catch (D) {
|
|
4608
|
+
C(D);
|
|
4601
4609
|
}
|
|
4602
4610
|
return L;
|
|
4603
4611
|
}
|
|
@@ -4645,21 +4653,21 @@ var Za = yr.exports;
|
|
|
4645
4653
|
), h;
|
|
4646
4654
|
}
|
|
4647
4655
|
t.callbackify = at;
|
|
4648
|
-
})(
|
|
4649
|
-
const { inherits:
|
|
4656
|
+
})(Dt);
|
|
4657
|
+
const { inherits: Za, format: Yt } = Dt;
|
|
4650
4658
|
function _e(t, e, r = Error) {
|
|
4651
4659
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4652
4660
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
4653
4661
|
function n(i, o, s) {
|
|
4654
4662
|
if (!new.target)
|
|
4655
4663
|
return new n(i, o, s);
|
|
4656
|
-
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message =
|
|
4664
|
+
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Yt(e, i, o, s) : i && o ? this.message = Yt(e, i, o) : i ? this.message = Yt(e, i) : this.message = e;
|
|
4657
4665
|
}
|
|
4658
4666
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4659
4667
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4660
|
-
},
|
|
4668
|
+
}, Za(n, r), n;
|
|
4661
4669
|
}
|
|
4662
|
-
var
|
|
4670
|
+
var fi = {
|
|
4663
4671
|
createError: _e,
|
|
4664
4672
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: _e(
|
|
4665
4673
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -4685,7 +4693,7 @@ var pi = {
|
|
|
4685
4693
|
"AVV_ERR_READY_TIMEOUT",
|
|
4686
4694
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4687
4695
|
)
|
|
4688
|
-
},
|
|
4696
|
+
}, eu = function t(e, r, n) {
|
|
4689
4697
|
r === void 0 && (r = ""), n || (n = {});
|
|
4690
4698
|
var i = function(u) {
|
|
4691
4699
|
var d = {
|
|
@@ -4707,12 +4715,12 @@ var pi = {
|
|
|
4707
4715
|
return r + i(c ? "└" : "├") + i("─") + i(l ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4708
4716
|
}).join("");
|
|
4709
4717
|
};
|
|
4710
|
-
const
|
|
4711
|
-
let
|
|
4718
|
+
const tu = eu, vn = Symbol("avvio.TimeTree.untrackNode"), Jt = Symbol("avvio.TimeTree.trackNode"), Sn = Symbol("avvio.TimeTree.getParent"), wn = Symbol("avvio.TimeTree.getNode"), An = Symbol("avvio.TimeTree.addNode");
|
|
4719
|
+
let ru = class {
|
|
4712
4720
|
constructor() {
|
|
4713
4721
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4714
4722
|
}
|
|
4715
|
-
[
|
|
4723
|
+
[Jt](e) {
|
|
4716
4724
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4717
4725
|
}
|
|
4718
4726
|
[vn](e) {
|
|
@@ -4740,7 +4748,7 @@ let nu = class {
|
|
|
4740
4748
|
label: r,
|
|
4741
4749
|
start: n,
|
|
4742
4750
|
nodes: []
|
|
4743
|
-
}, this[
|
|
4751
|
+
}, this[Jt](this.root), this.root.id;
|
|
4744
4752
|
const o = this[Sn](e), s = `${r}-${Math.random()}`, a = {
|
|
4745
4753
|
id: s,
|
|
4746
4754
|
parent: e,
|
|
@@ -4748,7 +4756,7 @@ let nu = class {
|
|
|
4748
4756
|
label: r,
|
|
4749
4757
|
nodes: []
|
|
4750
4758
|
};
|
|
4751
|
-
return o.nodes.push(a), this[
|
|
4759
|
+
return o.nodes.push(a), this[Jt](a), s;
|
|
4752
4760
|
}
|
|
4753
4761
|
start(e, r, n = Date.now()) {
|
|
4754
4762
|
return this[An](e, r, n);
|
|
@@ -4762,15 +4770,15 @@ let nu = class {
|
|
|
4762
4770
|
}
|
|
4763
4771
|
prittyPrint() {
|
|
4764
4772
|
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());
|
|
4765
|
-
return
|
|
4773
|
+
return tu(r);
|
|
4766
4774
|
}
|
|
4767
4775
|
};
|
|
4768
|
-
var
|
|
4769
|
-
function
|
|
4770
|
-
if (En) return
|
|
4776
|
+
var nu = ru, Nr = { exports: {} }, gr = { exports: {} }, Xt, En;
|
|
4777
|
+
function iu() {
|
|
4778
|
+
if (En) return Xt;
|
|
4771
4779
|
En = 1;
|
|
4772
4780
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4773
|
-
|
|
4781
|
+
Xt = function(c, l) {
|
|
4774
4782
|
l = l || {};
|
|
4775
4783
|
var p = typeof c;
|
|
4776
4784
|
if (p === "string" && c.length > 0)
|
|
@@ -4845,10 +4853,10 @@ function ou() {
|
|
|
4845
4853
|
var S = l >= p * 1.5;
|
|
4846
4854
|
return Math.round(c / p) + " " + b + (S ? "s" : "");
|
|
4847
4855
|
}
|
|
4848
|
-
return
|
|
4856
|
+
return Xt;
|
|
4849
4857
|
}
|
|
4850
|
-
function
|
|
4851
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4858
|
+
function ou(t) {
|
|
4859
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = iu(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
4852
4860
|
r[c] = t[c];
|
|
4853
4861
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4854
4862
|
function e(c) {
|
|
@@ -4928,7 +4936,7 @@ function su(t) {
|
|
|
4928
4936
|
}
|
|
4929
4937
|
return r.enable(r.load()), r;
|
|
4930
4938
|
}
|
|
4931
|
-
var
|
|
4939
|
+
var su = ou;
|
|
4932
4940
|
(function(t, e) {
|
|
4933
4941
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4934
4942
|
let u = !1;
|
|
@@ -5052,7 +5060,7 @@ var au = su;
|
|
|
5052
5060
|
} catch {
|
|
5053
5061
|
}
|
|
5054
5062
|
}
|
|
5055
|
-
t.exports =
|
|
5063
|
+
t.exports = su(e);
|
|
5056
5064
|
const { formatters: a } = t.exports;
|
|
5057
5065
|
a.j = function(u) {
|
|
5058
5066
|
try {
|
|
@@ -5062,22 +5070,22 @@ var au = su;
|
|
|
5062
5070
|
}
|
|
5063
5071
|
};
|
|
5064
5072
|
})(gr, gr.exports);
|
|
5065
|
-
var
|
|
5066
|
-
const
|
|
5067
|
-
function
|
|
5068
|
-
return t[
|
|
5073
|
+
var pi = gr.exports;
|
|
5074
|
+
const au = Un, uu = Wn.EventEmitter, cu = Dt.inherits, j = pi("avvio"), { AVV_ERR_READY_TIMEOUT: lu } = fi, Zt = Symbol.for("plugin-meta");
|
|
5075
|
+
function du(t, e) {
|
|
5076
|
+
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(`
|
|
5069
5077
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
5070
5078
|
}
|
|
5071
|
-
function
|
|
5079
|
+
function fu() {
|
|
5072
5080
|
const t = {};
|
|
5073
5081
|
return t.promise = new Promise((e, r) => {
|
|
5074
5082
|
t.resolve = e, t.reject = r;
|
|
5075
5083
|
}), t;
|
|
5076
5084
|
}
|
|
5077
5085
|
function We(t, e, r, n, i) {
|
|
5078
|
-
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 =
|
|
5086
|
+
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, pu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
5079
5087
|
}
|
|
5080
|
-
|
|
5088
|
+
cu(We, uu);
|
|
5081
5089
|
We.prototype.exec = function(t, e) {
|
|
5082
5090
|
const r = this.func;
|
|
5083
5091
|
let n = !1;
|
|
@@ -5105,7 +5113,7 @@ We.prototype.exec = function(t, e) {
|
|
|
5105
5113
|
};
|
|
5106
5114
|
this.timeout > 0 && (j("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
5107
5115
|
j("timed out", i), o = null;
|
|
5108
|
-
const u = new
|
|
5116
|
+
const u = new lu(i);
|
|
5109
5117
|
u.fn = r, s(u);
|
|
5110
5118
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
5111
5119
|
const a = r(this.server, this.opts, s);
|
|
@@ -5123,7 +5131,7 @@ We.prototype.loadedSoFar = function() {
|
|
|
5123
5131
|
}), this.q.resume();
|
|
5124
5132
|
};
|
|
5125
5133
|
let e;
|
|
5126
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
5134
|
+
return this._promise ? e = Promise.resolve() : (this._promise = fu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
5127
5135
|
};
|
|
5128
5136
|
We.prototype.enqueue = function(t, e) {
|
|
5129
5137
|
j("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -5148,19 +5156,19 @@ We.prototype.finish = function(t, e) {
|
|
|
5148
5156
|
r();
|
|
5149
5157
|
else
|
|
5150
5158
|
j("delayed", this.name), this.q.drain = () => {
|
|
5151
|
-
j("drain", this.name), this.q.drain =
|
|
5159
|
+
j("drain", this.name), this.q.drain = hu, queueMicrotask(n);
|
|
5152
5160
|
};
|
|
5153
5161
|
};
|
|
5154
5162
|
queueMicrotask(n), this.q.resume();
|
|
5155
5163
|
};
|
|
5156
|
-
function
|
|
5164
|
+
function pu(t, e) {
|
|
5157
5165
|
const r = this;
|
|
5158
|
-
A.nextTick(
|
|
5166
|
+
A.nextTick(Dr.bind(r), t, e);
|
|
5159
5167
|
}
|
|
5160
|
-
function
|
|
5168
|
+
function Dr(t, e) {
|
|
5161
5169
|
if (typeof t.func.then == "function") {
|
|
5162
5170
|
t.func.then((n) => {
|
|
5163
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
5171
|
+
typeof n.default == "function" && (n = n.default), t.func = n, Dr.call(this, t, e);
|
|
5164
5172
|
}, e);
|
|
5165
5173
|
return;
|
|
5166
5174
|
}
|
|
@@ -5171,54 +5179,54 @@ function Fr(t, e) {
|
|
|
5171
5179
|
});
|
|
5172
5180
|
});
|
|
5173
5181
|
}
|
|
5174
|
-
function
|
|
5182
|
+
function hu() {
|
|
5175
5183
|
}
|
|
5176
5184
|
Nr.exports = We;
|
|
5177
|
-
Nr.exports.loadPlugin =
|
|
5178
|
-
var
|
|
5179
|
-
const In =
|
|
5180
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
5185
|
+
Nr.exports.loadPlugin = Dr;
|
|
5186
|
+
var yu = Nr.exports;
|
|
5187
|
+
const In = Un, gu = Wn.EventEmitter, mu = Dt.inherits, {
|
|
5188
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
5181
5189
|
AVV_ERR_CALLBACK_NOT_FN: tt,
|
|
5182
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
5183
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
5184
|
-
AVV_ERR_READY_TIMEOUT:
|
|
5185
|
-
} =
|
|
5186
|
-
function
|
|
5190
|
+
AVV_ERR_PLUGIN_NOT_VALID: bu,
|
|
5191
|
+
AVV_ERR_ROOT_PLG_BOOTED: vu,
|
|
5192
|
+
AVV_ERR_READY_TIMEOUT: Su
|
|
5193
|
+
} = fi, wu = nu, mr = yu, He = pi("avvio"), _t = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
|
|
5194
|
+
function Au(t, e, r) {
|
|
5187
5195
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
5188
5196
|
if (t[i])
|
|
5189
|
-
throw new
|
|
5197
|
+
throw new er(i);
|
|
5190
5198
|
if (t[o])
|
|
5191
|
-
throw new
|
|
5199
|
+
throw new er(o);
|
|
5192
5200
|
if (t[s])
|
|
5193
|
-
throw new
|
|
5201
|
+
throw new er(s);
|
|
5194
5202
|
t[i] = function(d, c) {
|
|
5195
5203
|
return r.use(d, c), this;
|
|
5196
|
-
}, Object.defineProperty(t, "then", { get:
|
|
5197
|
-
return typeof d != "function" ? r._loadRegistered() : (r.after(
|
|
5204
|
+
}, Object.defineProperty(t, "then", { get: hi.bind(r) }), t[_t] = !0, t[o] = function(d) {
|
|
5205
|
+
return typeof d != "function" ? r._loadRegistered() : (r.after(rr(d, this)), this);
|
|
5198
5206
|
}, t[s] = function(d) {
|
|
5199
5207
|
if (d && typeof d != "function")
|
|
5200
5208
|
throw new tt(s, typeof d);
|
|
5201
|
-
return r.ready(d ?
|
|
5209
|
+
return r.ready(d ? rr(d, this) : void 0);
|
|
5202
5210
|
}, t[a] = function(d) {
|
|
5203
5211
|
if (typeof d != "function")
|
|
5204
5212
|
throw new tt(a, typeof d);
|
|
5205
|
-
return r.onClose(
|
|
5213
|
+
return r.onClose(ku(d, this)), this;
|
|
5206
5214
|
}, t[u] = function(d) {
|
|
5207
5215
|
if (d && typeof d != "function")
|
|
5208
5216
|
throw new tt(u, typeof d);
|
|
5209
|
-
return d ? (r.close(
|
|
5217
|
+
return d ? (r.close(rr(d, this)), this) : r.close();
|
|
5210
5218
|
};
|
|
5211
5219
|
}
|
|
5212
5220
|
function Q(t, e, r) {
|
|
5213
5221
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof Q)) {
|
|
5214
5222
|
const n = new Q(t, e, r);
|
|
5215
|
-
return t &&
|
|
5223
|
+
return t && Au(t, e, n), n;
|
|
5216
5224
|
}
|
|
5217
|
-
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
|
|
5225
|
+
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new wu(), this._readyQ = In(this, yi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
5218
5226
|
this.emit("start"), this._readyQ.drain = On;
|
|
5219
|
-
}, this._closeQ = In(this,
|
|
5227
|
+
}, this._closeQ = In(this, Tu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5220
5228
|
this.emit("close"), this._closeQ.drain = On;
|
|
5221
|
-
}, this._doStart = null, this._root = new mr(this,
|
|
5229
|
+
}, this._doStart = null, this._root = new mr(this, Eu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5222
5230
|
const s = this.pluginTree.start(null, i, o);
|
|
5223
5231
|
this._root.once("loaded", (a, u, d) => {
|
|
5224
5232
|
this.pluginTree.stop(s, d);
|
|
@@ -5238,19 +5246,19 @@ function Q(t, e, r) {
|
|
|
5238
5246
|
this._readyQ.resume();
|
|
5239
5247
|
});
|
|
5240
5248
|
}
|
|
5241
|
-
function
|
|
5249
|
+
function Eu(t, e, r) {
|
|
5242
5250
|
this._doStart = r, e.autostart && this.start();
|
|
5243
5251
|
}
|
|
5244
|
-
|
|
5252
|
+
mu(Q, gu);
|
|
5245
5253
|
Q.prototype.start = function() {
|
|
5246
5254
|
return this.started = !0, A.nextTick(this._doStart), this;
|
|
5247
5255
|
};
|
|
5248
5256
|
Q.prototype.override = function(t, e, r) {
|
|
5249
5257
|
return t;
|
|
5250
5258
|
};
|
|
5251
|
-
function
|
|
5259
|
+
function Iu(t) {
|
|
5252
5260
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
5253
|
-
throw new
|
|
5261
|
+
throw new bu(typeof t);
|
|
5254
5262
|
return t;
|
|
5255
5263
|
}
|
|
5256
5264
|
Q.prototype[_t] = !0;
|
|
@@ -5261,10 +5269,10 @@ Q.prototype._loadRegistered = function() {
|
|
|
5261
5269
|
const t = this._current[0];
|
|
5262
5270
|
return !this.started && !this.booted && A.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
5263
5271
|
};
|
|
5264
|
-
Object.defineProperty(Q.prototype, "then", { get:
|
|
5272
|
+
Object.defineProperty(Q.prototype, "then", { get: hi });
|
|
5265
5273
|
Q.prototype._addPlugin = function(t, e, r) {
|
|
5266
|
-
if (t =
|
|
5267
|
-
throw new
|
|
5274
|
+
if (t = Iu(t), e = e || {}, this.booted)
|
|
5275
|
+
throw new vu();
|
|
5268
5276
|
const n = this._current[0], i = new mr(this, t, e, r);
|
|
5269
5277
|
if (i.once("start", (o, s, a) => {
|
|
5270
5278
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -5282,7 +5290,7 @@ Q.prototype.after = function(t) {
|
|
|
5282
5290
|
return this._loadRegistered();
|
|
5283
5291
|
this._addPlugin(e.bind(this), {}, !0);
|
|
5284
5292
|
function e(r, n, i) {
|
|
5285
|
-
|
|
5293
|
+
yi.call(this, t, i);
|
|
5286
5294
|
}
|
|
5287
5295
|
return this;
|
|
5288
5296
|
};
|
|
@@ -5335,18 +5343,18 @@ Q.prototype.toJSON = function() {
|
|
|
5335
5343
|
};
|
|
5336
5344
|
function On() {
|
|
5337
5345
|
}
|
|
5338
|
-
function
|
|
5346
|
+
function hi() {
|
|
5339
5347
|
if (this.booted) {
|
|
5340
5348
|
He("thenify returning null because we are already booted");
|
|
5341
5349
|
return;
|
|
5342
5350
|
}
|
|
5343
|
-
if (this[
|
|
5344
|
-
this[
|
|
5351
|
+
if (this[tr]) {
|
|
5352
|
+
this[tr] = !1;
|
|
5345
5353
|
return;
|
|
5346
5354
|
}
|
|
5347
|
-
return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
5355
|
+
return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[tr] = !0, t(this._server)), e);
|
|
5348
5356
|
}
|
|
5349
|
-
function
|
|
5357
|
+
function yi(t, e) {
|
|
5350
5358
|
const r = this._server, n = this._error;
|
|
5351
5359
|
let i;
|
|
5352
5360
|
if (this._error = null, t.length === 0)
|
|
@@ -5359,14 +5367,14 @@ function gi(t, e) {
|
|
|
5359
5367
|
};
|
|
5360
5368
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5361
5369
|
} else
|
|
5362
|
-
|
|
5370
|
+
Ou.call(this, t, n, r, e);
|
|
5363
5371
|
}
|
|
5364
|
-
function
|
|
5372
|
+
function Ou(t, e, r, n) {
|
|
5365
5373
|
const i = t.name;
|
|
5366
5374
|
He("setting up ready timeout", i, this._timeout);
|
|
5367
5375
|
let o = setTimeout(() => {
|
|
5368
5376
|
He("timed out", i), o = null;
|
|
5369
|
-
const a = new
|
|
5377
|
+
const a = new Su(i);
|
|
5370
5378
|
a.fn = t, this._error = a, n(a);
|
|
5371
5379
|
}, this._timeout);
|
|
5372
5380
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5374,7 +5382,7 @@ function Tu(t, e, r, n) {
|
|
|
5374
5382
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
5375
5383
|
}
|
|
5376
5384
|
}
|
|
5377
|
-
function
|
|
5385
|
+
function Tu(t, e) {
|
|
5378
5386
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5379
5387
|
if (t.length === 0 || t.length === 1) {
|
|
5380
5388
|
let i;
|
|
@@ -5384,7 +5392,7 @@ function ku(t, e) {
|
|
|
5384
5392
|
)) : A.nextTick(e);
|
|
5385
5393
|
} else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
5386
5394
|
}
|
|
5387
|
-
function
|
|
5395
|
+
function ku(t, e) {
|
|
5388
5396
|
return r.bind(e);
|
|
5389
5397
|
function r(n, i) {
|
|
5390
5398
|
let o;
|
|
@@ -5395,7 +5403,7 @@ function _u(t, e) {
|
|
|
5395
5403
|
}, i) : A.nextTick(i)) : t(this, i);
|
|
5396
5404
|
}
|
|
5397
5405
|
}
|
|
5398
|
-
function
|
|
5406
|
+
function rr(t, e) {
|
|
5399
5407
|
return r.bind(e);
|
|
5400
5408
|
function r(n, i) {
|
|
5401
5409
|
let o;
|
|
@@ -5414,8 +5422,8 @@ wr.exports.express = function(t) {
|
|
|
5414
5422
|
}
|
|
5415
5423
|
});
|
|
5416
5424
|
};
|
|
5417
|
-
var
|
|
5418
|
-
const
|
|
5425
|
+
var _u = wr.exports;
|
|
5426
|
+
const Cu = /* @__PURE__ */ ns(_u);
|
|
5419
5427
|
(function() {
|
|
5420
5428
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5421
5429
|
return;
|
|
@@ -5433,20 +5441,20 @@ const Lu = /* @__PURE__ */ is(Cu);
|
|
|
5433
5441
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5434
5442
|
}
|
|
5435
5443
|
})();
|
|
5436
|
-
function
|
|
5437
|
-
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 =
|
|
5438
|
-
return s.use(
|
|
5444
|
+
function Zu(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
5445
|
+
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 });
|
|
5446
|
+
return s.use(Ro, {
|
|
5439
5447
|
hideFriends: n.hideFriends,
|
|
5440
5448
|
skipOnboarding: n.skipOnboarding,
|
|
5441
5449
|
betPack: n.betPack,
|
|
5442
5450
|
friendsTab: n.friendsTab,
|
|
5443
5451
|
theme: n.theme,
|
|
5444
5452
|
themeMode: n.themeMode
|
|
5445
|
-
}), s.use(
|
|
5453
|
+
}), s.use(_o, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(No, { videoPlayerController: n?.videoPlayerController }), s.use(Fo, {
|
|
5446
5454
|
onContentActivate: n?.onContentActivate,
|
|
5447
5455
|
withAd: n?.withAd,
|
|
5448
5456
|
withAdNotification: n?.withAdNotification
|
|
5449
|
-
}), s.use(
|
|
5457
|
+
}), s.use(Xi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(no), s.use(Po), s.use(zo), s.use(wo), s.use(rs), s.after((a, u, d) => {
|
|
5450
5458
|
if (a)
|
|
5451
5459
|
throw a;
|
|
5452
5460
|
u.ready(), d();
|
|
@@ -5459,5 +5467,5 @@ function ec(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
|
5459
5467
|
}), s;
|
|
5460
5468
|
}
|
|
5461
5469
|
export {
|
|
5462
|
-
|
|
5470
|
+
Zu as StreamLayer
|
|
5463
5471
|
};
|