@streamlayer/sdk-web 0.31.0 → 0.31.1
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 +8 -8
- package/lib/es/index.js +733 -718
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { QuestionType as fe, QuestionStatus as ft, SilenceSetting as
|
|
1
|
+
import { QuestionType as fe, QuestionStatus as ft, SilenceSetting as ni } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as Fe } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
|
-
import { computed as
|
|
4
|
+
import { computed as an, map as ii, atom as xt, onMount as un } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
7
|
import { ConnectError as xr, Code as kr, createPromiseClient as Br } from "@connectrpc/connect";
|
|
8
8
|
import { createGrpcWebTransport as Lr } from "@connectrpc/connect-web";
|
|
9
|
-
import { nanoquery as
|
|
10
|
-
import { Events as
|
|
9
|
+
import { nanoquery as Pr } from "@nanostores/query";
|
|
10
|
+
import { Events as oi } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
11
|
import { Client as pt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
|
-
import { Users as
|
|
13
|
-
import { pino as
|
|
12
|
+
import { Users as dr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
|
+
import { pino as si } from "pino";
|
|
14
14
|
import { Feed as _e } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
15
|
+
import { Leaderboard as cn } 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
|
-
function
|
|
17
|
+
import { LinksClient as ai } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
function ui(t) {
|
|
19
19
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
21
|
+
var ln = { exports: {} }, Y = ln.exports = {}, ye, ge;
|
|
22
|
+
function er() {
|
|
23
23
|
throw new Error("setTimeout has not been defined");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function tr() {
|
|
26
26
|
throw new Error("clearTimeout has not been defined");
|
|
27
27
|
}
|
|
28
28
|
(function() {
|
|
29
29
|
try {
|
|
30
|
-
typeof setTimeout == "function" ? ye = setTimeout : ye =
|
|
30
|
+
typeof setTimeout == "function" ? ye = setTimeout : ye = er;
|
|
31
31
|
} catch {
|
|
32
|
-
ye =
|
|
32
|
+
ye = er;
|
|
33
33
|
}
|
|
34
34
|
try {
|
|
35
|
-
typeof clearTimeout == "function" ? ge = clearTimeout : ge =
|
|
35
|
+
typeof clearTimeout == "function" ? ge = clearTimeout : ge = tr;
|
|
36
36
|
} catch {
|
|
37
|
-
ge =
|
|
37
|
+
ge = tr;
|
|
38
38
|
}
|
|
39
39
|
})();
|
|
40
|
-
function
|
|
40
|
+
function fn(t) {
|
|
41
41
|
if (ye === setTimeout)
|
|
42
42
|
return setTimeout(t, 0);
|
|
43
|
-
if ((ye ===
|
|
43
|
+
if ((ye === er || !ye) && setTimeout)
|
|
44
44
|
return ye = setTimeout, setTimeout(t, 0);
|
|
45
45
|
try {
|
|
46
46
|
return ye(t, 0);
|
|
@@ -52,10 +52,10 @@ function cn(t) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ci(t) {
|
|
56
56
|
if (ge === clearTimeout)
|
|
57
57
|
return clearTimeout(t);
|
|
58
|
-
if ((ge ===
|
|
58
|
+
if ((ge === tr || !ge) && clearTimeout)
|
|
59
59
|
return ge = clearTimeout, clearTimeout(t);
|
|
60
60
|
try {
|
|
61
61
|
return ge(t);
|
|
@@ -68,19 +68,19 @@ function si(t) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
var Oe = [], Ze = !1, Ue, wt = -1;
|
|
71
|
-
function
|
|
72
|
-
!Ze || !Ue || (Ze = !1, Ue.length ? Oe = Ue.concat(Oe) : wt = -1, Oe.length &&
|
|
71
|
+
function li() {
|
|
72
|
+
!Ze || !Ue || (Ze = !1, Ue.length ? Oe = Ue.concat(Oe) : wt = -1, Oe.length && dn());
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function dn() {
|
|
75
75
|
if (!Ze) {
|
|
76
|
-
var t =
|
|
76
|
+
var t = fn(li);
|
|
77
77
|
Ze = !0;
|
|
78
78
|
for (var e = Oe.length; e; ) {
|
|
79
79
|
for (Ue = Oe, Oe = []; ++wt < e; )
|
|
80
80
|
Ue && Ue[wt].run();
|
|
81
81
|
wt = -1, e = Oe.length;
|
|
82
82
|
}
|
|
83
|
-
Ue = null, Ze = !1,
|
|
83
|
+
Ue = null, Ze = !1, ci(t);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
Y.nextTick = function(t) {
|
|
@@ -88,12 +88,12 @@ Y.nextTick = function(t) {
|
|
|
88
88
|
if (arguments.length > 1)
|
|
89
89
|
for (var r = 1; r < arguments.length; r++)
|
|
90
90
|
e[r - 1] = arguments[r];
|
|
91
|
-
Oe.push(new
|
|
91
|
+
Oe.push(new hn(t, e)), Oe.length === 1 && !Ze && fn(dn);
|
|
92
92
|
};
|
|
93
|
-
function
|
|
93
|
+
function hn(t, e) {
|
|
94
94
|
this.fun = t, this.array = e;
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
hn.prototype.run = function() {
|
|
97
97
|
this.fun.apply(null, this.array);
|
|
98
98
|
};
|
|
99
99
|
Y.title = "browser";
|
|
@@ -128,12 +128,12 @@ Y.chdir = function(t) {
|
|
|
128
128
|
Y.umask = function() {
|
|
129
129
|
return 0;
|
|
130
130
|
};
|
|
131
|
-
var
|
|
132
|
-
const L = /* @__PURE__ */
|
|
133
|
-
class
|
|
131
|
+
var fi = ln.exports;
|
|
132
|
+
const L = /* @__PURE__ */ ui(fi);
|
|
133
|
+
class di {
|
|
134
134
|
}
|
|
135
135
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
136
|
-
class
|
|
136
|
+
class kt {
|
|
137
137
|
/**
|
|
138
138
|
* store instance (nanostores)
|
|
139
139
|
*/
|
|
@@ -149,23 +149,23 @@ class Bt {
|
|
|
149
149
|
return this.store;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const hi = (t) => {
|
|
153
153
|
const e = Object.keys(t);
|
|
154
|
-
return
|
|
154
|
+
return an(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((i, s) => [i, r[s]])));
|
|
155
155
|
};
|
|
156
|
-
class et extends
|
|
156
|
+
class et extends kt {
|
|
157
157
|
getValues = () => this.getStore().get();
|
|
158
158
|
getValue = (e) => this.getStore().get()[e];
|
|
159
159
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
160
160
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
161
161
|
unsubscribe = () => this.getStore().off();
|
|
162
162
|
}
|
|
163
|
-
const Te = (t) =>
|
|
163
|
+
const Te = (t) => ii(t);
|
|
164
164
|
var Ee;
|
|
165
165
|
(function(t) {
|
|
166
166
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
167
167
|
})(Ee || (Ee = {}));
|
|
168
|
-
const
|
|
168
|
+
const pi = {
|
|
169
169
|
[Fe.BETTING]: "betting",
|
|
170
170
|
[Fe.GAMES]: "games",
|
|
171
171
|
[Fe.PUBLIC_CHAT]: "publicChat",
|
|
@@ -175,7 +175,7 @@ var tt;
|
|
|
175
175
|
(function(t) {
|
|
176
176
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
177
177
|
})(tt || (tt = {}));
|
|
178
|
-
class
|
|
178
|
+
class pn {
|
|
179
179
|
status;
|
|
180
180
|
source;
|
|
181
181
|
config;
|
|
@@ -183,7 +183,7 @@ class dn {
|
|
|
183
183
|
listeners = /* @__PURE__ */ new Set();
|
|
184
184
|
settingsKey;
|
|
185
185
|
constructor({ settings: e, ...r }, i) {
|
|
186
|
-
this.settingsKey =
|
|
186
|
+
this.settingsKey = pi[r.type], this.status = xt(tt.Suspended), this.config = new et(Te(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new et(Te(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new et(Te({}), `feature:settings:${this.settingsKey}`), this.source = i;
|
|
187
187
|
}
|
|
188
188
|
get featureConfig() {
|
|
189
189
|
return this.config.getStore();
|
|
@@ -225,7 +225,7 @@ class dn {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
class se extends
|
|
228
|
+
class se extends kt {
|
|
229
229
|
getValue = () => this.getStore().get();
|
|
230
230
|
getValues() {
|
|
231
231
|
throw new Error("not implemented");
|
|
@@ -240,11 +240,11 @@ class se extends Bt {
|
|
|
240
240
|
return this.getStore().get();
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
const re = (t) =>
|
|
244
|
-
class de extends
|
|
243
|
+
const re = (t) => xt(t);
|
|
244
|
+
class de extends kt {
|
|
245
245
|
atomStore;
|
|
246
246
|
constructor(e, r, i) {
|
|
247
|
-
super(e, `api:${r}`), this.atomStore =
|
|
247
|
+
super(e, `api:${r}`), this.atomStore = xt(), i && e.subscribe((s) => {
|
|
248
248
|
const u = this.atomStore.get(), c = i(s, u);
|
|
249
249
|
u !== c && this.atomStore.set(c);
|
|
250
250
|
});
|
|
@@ -272,7 +272,7 @@ class de extends Bt {
|
|
|
272
272
|
key = () => this.getStore().key;
|
|
273
273
|
off = () => this.getStore().off();
|
|
274
274
|
}
|
|
275
|
-
async function*
|
|
275
|
+
async function* yi(t, e) {
|
|
276
276
|
for await (const r of e) {
|
|
277
277
|
t.response.message = r, t.received_at = Date.now();
|
|
278
278
|
const i = {
|
|
@@ -282,7 +282,7 @@ async function* di(t, e) {
|
|
|
282
282
|
window.postMessage(i), yield r;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const gi = () => (t) => async (e) => {
|
|
286
286
|
const r = {
|
|
287
287
|
name: e.url,
|
|
288
288
|
stream: e.stream,
|
|
@@ -306,7 +306,7 @@ const hi = () => (t) => async (e) => {
|
|
|
306
306
|
};
|
|
307
307
|
return window.postMessage(s), {
|
|
308
308
|
...i,
|
|
309
|
-
message:
|
|
309
|
+
message: yi(r, i.message)
|
|
310
310
|
};
|
|
311
311
|
} else {
|
|
312
312
|
r.request.message = e.message, r.response.message = i.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -334,7 +334,7 @@ var le;
|
|
|
334
334
|
(function(t) {
|
|
335
335
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
336
336
|
})(le || (le = {}));
|
|
337
|
-
class
|
|
337
|
+
class mi {
|
|
338
338
|
params;
|
|
339
339
|
streamCancel;
|
|
340
340
|
method;
|
|
@@ -435,7 +435,7 @@ class pi {
|
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
|
-
class
|
|
438
|
+
class wi {
|
|
439
439
|
toJsonOptions = {
|
|
440
440
|
emitDefaultValues: !1,
|
|
441
441
|
enumAsInteger: !0,
|
|
@@ -456,7 +456,7 @@ class yi {
|
|
|
456
456
|
this.host = e, this.$headers = new et(Te({
|
|
457
457
|
"sl-device-id": L?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
458
458
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
459
|
-
const [r, i, s] =
|
|
459
|
+
const [r, i, s] = Pr();
|
|
460
460
|
this.nanoquery = { createFetcherStore: r, createMutatorStore: i, utils: s }, this.transport = Lr({
|
|
461
461
|
baseUrl: e,
|
|
462
462
|
defaultTimeoutMs: 3e4,
|
|
@@ -475,7 +475,7 @@ class yi {
|
|
|
475
475
|
const s = this.subscriptions.get(r);
|
|
476
476
|
if (s)
|
|
477
477
|
return s;
|
|
478
|
-
const u = new
|
|
478
|
+
const u = new mi(this.$headers, e, r, i);
|
|
479
479
|
return this.subscriptions.set(r, u), u;
|
|
480
480
|
};
|
|
481
481
|
removeSubscription = (e) => {
|
|
@@ -483,8 +483,11 @@ class yi {
|
|
|
483
483
|
};
|
|
484
484
|
// cleanup subscriptions
|
|
485
485
|
disconnect = () => {
|
|
486
|
-
for (const [
|
|
487
|
-
|
|
486
|
+
for (const [s, u] of this.subscriptions)
|
|
487
|
+
u.disconnect(), this.subscriptions.delete(s);
|
|
488
|
+
this.clients.clear(), this.callbackClients.clear(), this.subscriptions.clear();
|
|
489
|
+
const [e, r, i] = Pr();
|
|
490
|
+
this.nanoquery = { createFetcherStore: e, createMutatorStore: r, utils: i };
|
|
488
491
|
};
|
|
489
492
|
registerInterceptor = (e) => {
|
|
490
493
|
this.interceptors.push(e);
|
|
@@ -535,11 +538,11 @@ class yi {
|
|
|
535
538
|
i.header.set(u, s[u]);
|
|
536
539
|
return r(i);
|
|
537
540
|
};
|
|
538
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
541
|
+
this.interceptors.push(e), this.interceptors.push(gi());
|
|
539
542
|
};
|
|
540
543
|
}
|
|
541
|
-
const
|
|
542
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
544
|
+
const bi = (t, e) => {
|
|
545
|
+
const { client: r, queryKey: i } = e.createPromiseClient(oi, {
|
|
543
546
|
method: "retrieveEventId",
|
|
544
547
|
params: [t]
|
|
545
548
|
});
|
|
@@ -556,7 +559,7 @@ const gi = (t, e) => {
|
|
|
556
559
|
}
|
|
557
560
|
}
|
|
558
561
|
});
|
|
559
|
-
},
|
|
562
|
+
}, vi = (t, e) => {
|
|
560
563
|
const { client: r, queryKey: i } = e.createPromiseClient(pt, { method: "getStream", params: [t] });
|
|
561
564
|
return e.nanoquery.createFetcherStore(i, {
|
|
562
565
|
fetcher: async (s, u, c) => c ? (await r.getStream({
|
|
@@ -564,23 +567,23 @@ const gi = (t, e) => {
|
|
|
564
567
|
// we are sure that id is a string
|
|
565
568
|
})).data?.attributes : void 0
|
|
566
569
|
});
|
|
567
|
-
},
|
|
568
|
-
const { queryKey: r, client: i } = e.createPromiseClient(
|
|
570
|
+
}, Si = (t, e) => {
|
|
571
|
+
const { queryKey: r, client: i } = e.createPromiseClient(dr, { method: "me", params: [t] });
|
|
569
572
|
return e.nanoquery.createFetcherStore(r, {
|
|
570
573
|
fetcher: () => i.me({})
|
|
571
574
|
});
|
|
572
|
-
},
|
|
573
|
-
const { client: e } = t.createPromiseClient(
|
|
575
|
+
}, Ai = (t) => {
|
|
576
|
+
const { client: e } = t.createPromiseClient(dr, { method: "bypassAuth" });
|
|
574
577
|
return async ({ userKey: r, schema: i, init: s, inviterKey: u }) => {
|
|
575
578
|
const c = await e.bypassAuth({ userKey: r, schema: i, init: s });
|
|
576
579
|
return c.meta && (c.meta.inviterKey = u), c;
|
|
577
580
|
};
|
|
578
|
-
},
|
|
581
|
+
}, Ei = (t, e) => {
|
|
579
582
|
const { client: r, queryKey: i } = e.createPromiseClient(pt, { method: "get", params: [t] });
|
|
580
583
|
return e.nanoquery.createFetcherStore(i, {
|
|
581
584
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
582
585
|
});
|
|
583
|
-
},
|
|
586
|
+
}, Ii = (t, e) => {
|
|
584
587
|
const { client: r, queryKey: i } = e.createPromiseClient(pt, { method: "getOrganization", params: [t] });
|
|
585
588
|
return e.nanoquery.createFetcherStore(i, {
|
|
586
589
|
fetcher: async () => {
|
|
@@ -591,7 +594,7 @@ const gi = (t, e) => {
|
|
|
591
594
|
} : void 0;
|
|
592
595
|
}
|
|
593
596
|
});
|
|
594
|
-
},
|
|
597
|
+
}, Fi = (t, e) => {
|
|
595
598
|
const { client: r, queryKey: i } = e.createPromiseClient(pt, {
|
|
596
599
|
method: "getOrganizationAdvertising",
|
|
597
600
|
params: [t]
|
|
@@ -599,10 +602,10 @@ const gi = (t, e) => {
|
|
|
599
602
|
return e.nanoquery.createFetcherStore(i, {
|
|
600
603
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
601
604
|
});
|
|
602
|
-
},
|
|
603
|
-
t.transport = new
|
|
605
|
+
}, Oi = (t, e, r) => {
|
|
606
|
+
t.transport = new wi(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), r();
|
|
604
607
|
};
|
|
605
|
-
class
|
|
608
|
+
class Bt {
|
|
606
609
|
delimiter = ":";
|
|
607
610
|
prefix;
|
|
608
611
|
storage;
|
|
@@ -630,7 +633,7 @@ var Ae;
|
|
|
630
633
|
(function(t) {
|
|
631
634
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
632
635
|
})(Ae || (Ae = {}));
|
|
633
|
-
class Je extends
|
|
636
|
+
class Je extends Bt {
|
|
634
637
|
constructor() {
|
|
635
638
|
super("user");
|
|
636
639
|
}
|
|
@@ -657,19 +660,19 @@ var Ie;
|
|
|
657
660
|
(function(t) {
|
|
658
661
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
659
662
|
})(Ie || (Ie = {}));
|
|
660
|
-
const
|
|
661
|
-
const e = new Je(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(
|
|
663
|
+
const Ti = (t) => {
|
|
664
|
+
const e = new Je(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(Si(i.getStore(), t), "user", ({ data: c, error: h, loading: p }, m) => {
|
|
662
665
|
if (!h)
|
|
663
666
|
return c?.data?.id ? c.data.id : p === !1 ? void 0 : m;
|
|
664
|
-
}), u = new de(
|
|
667
|
+
}), u = new de(Ei(i.getStore(), t), "userSettings");
|
|
665
668
|
return {
|
|
666
669
|
userKey: r,
|
|
667
670
|
userToken: i,
|
|
668
671
|
user: s,
|
|
669
672
|
userSettings: u
|
|
670
673
|
};
|
|
671
|
-
},
|
|
672
|
-
const e = new se(re(void 0), "providerStreamId"), r = new de(
|
|
674
|
+
}, _i = (t) => {
|
|
675
|
+
const e = new se(re(void 0), "providerStreamId"), r = new de(bi(e.getStore(), t), "slStreamId", (s) => s?.data), i = new de(vi(r.getAtomStore(), t), "streamSettings");
|
|
673
676
|
return r.getAtomStore().listen((s) => {
|
|
674
677
|
(s === "" || s === void 0) && i.getStore().mutate(void 0);
|
|
675
678
|
}), {
|
|
@@ -677,8 +680,8 @@ const Ii = (t) => {
|
|
|
677
680
|
slStreamId: r,
|
|
678
681
|
streamSettings: i
|
|
679
682
|
};
|
|
680
|
-
},
|
|
681
|
-
const e = new se(re(void 0), "enabled"), r = new se(re(Ie.DISABLED), "status"), i = new de(
|
|
683
|
+
}, Ci = (t) => {
|
|
684
|
+
const e = new se(re(void 0), "enabled"), r = new se(re(Ie.DISABLED), "status"), i = new de(Ii(e.getStore(), t), "organizationSettings", (h) => h?.data?.id), s = new de(Fi(i.getAtomStore(), t), "organizationAdvertising"), u = Ti(t), c = _i(t);
|
|
682
685
|
return {
|
|
683
686
|
enabled: e,
|
|
684
687
|
status: r,
|
|
@@ -693,10 +696,10 @@ const Ii = (t) => {
|
|
|
693
696
|
organizationAdvertising: s
|
|
694
697
|
};
|
|
695
698
|
};
|
|
696
|
-
class
|
|
699
|
+
class xi extends kt {
|
|
697
700
|
stores;
|
|
698
701
|
constructor(e) {
|
|
699
|
-
const r =
|
|
702
|
+
const r = Ci(e), i = hi(r);
|
|
700
703
|
super(i, "core"), this.stores = r;
|
|
701
704
|
}
|
|
702
705
|
getValue() {
|
|
@@ -717,13 +720,88 @@ class Ti extends Bt {
|
|
|
717
720
|
};
|
|
718
721
|
unsubscribe = () => this.getStore().off();
|
|
719
722
|
}
|
|
720
|
-
class
|
|
723
|
+
class ki extends Bt {
|
|
724
|
+
get = this.read;
|
|
725
|
+
set = this.write;
|
|
726
|
+
del = this.remove;
|
|
727
|
+
constructor() {
|
|
728
|
+
super("deep-link-context", window.sessionStorage);
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
const Rr = "sldl", hr = "sldl_uid", yn = "sldl_eid", gn = "sldl_e_eid", Bi = /* @__PURE__ */ new Set([hr, yn, gn]), Nr = (t) => {
|
|
732
|
+
const e = {};
|
|
733
|
+
for (const [r, i] of t)
|
|
734
|
+
Bi.has(r) && (e[r] = i);
|
|
735
|
+
return e;
|
|
736
|
+
}, Li = ({ hash: t, search: e }) => {
|
|
737
|
+
if (t && t.includes(Rr)) {
|
|
738
|
+
const r = new URLSearchParams(t.substr(1));
|
|
739
|
+
return Nr(r);
|
|
740
|
+
}
|
|
741
|
+
if (e && e.includes(Rr)) {
|
|
742
|
+
const r = new URLSearchParams(e);
|
|
743
|
+
return Nr(r);
|
|
744
|
+
}
|
|
745
|
+
return null;
|
|
746
|
+
}, Pi = (t) => {
|
|
747
|
+
const { hash: e, search: r, processed: i } = t.getValues();
|
|
748
|
+
if (console.log("get deep link data from", { hash: e, search: r, processed: i }), !i) {
|
|
749
|
+
const s = Li({ hash: e, search: r });
|
|
750
|
+
console.log("parse deep link result", s), s && t.setValue("data", s);
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
}, Ri = (t, e, r) => {
|
|
754
|
+
const i = new ki(), s = i.get("sl-deep-link-store");
|
|
755
|
+
let u = { processed: !1 };
|
|
756
|
+
if (s)
|
|
757
|
+
try {
|
|
758
|
+
u = JSON.parse(s);
|
|
759
|
+
} catch (h) {
|
|
760
|
+
console.log(h);
|
|
761
|
+
}
|
|
762
|
+
t.deepLink = {
|
|
763
|
+
$store: new et(Te(u), "deep-link-context"),
|
|
764
|
+
getDeepLinkData: () => {
|
|
765
|
+
const { data: h, processed: p } = t.deepLink.$store.getValues();
|
|
766
|
+
return p ? void 0 : h;
|
|
767
|
+
},
|
|
768
|
+
// we are logged in with inviter id
|
|
769
|
+
deepLinkUsed: (h) => {
|
|
770
|
+
t.deepLink.$store.setValue("processed", !0), i.set("sl-inviter-id", h), i.del("sl-location");
|
|
771
|
+
},
|
|
772
|
+
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
773
|
+
}, t.deepLink.$store.subscribe((h) => i.set("sl-deep-link-store", JSON.stringify(h))), t.sdk.getInviterId = () => i.get("sl-inviter-id"), t.sdk.onDeepLinkHandled = (h) => {
|
|
774
|
+
t.deepLink.onDeepLinkHandlers.add(h);
|
|
775
|
+
}, t.sdk.deepLinkHandled = () => {
|
|
776
|
+
i.del("sl-inviter-id"), t.deepLink.$store.setValue("processed", !0);
|
|
777
|
+
const { data: h } = t.deepLink.$store.getValues();
|
|
778
|
+
for (const p of t.deepLink.onDeepLinkHandlers)
|
|
779
|
+
try {
|
|
780
|
+
p(h);
|
|
781
|
+
} catch (m) {
|
|
782
|
+
console.error(m);
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
let c = i.get("sl-session-id");
|
|
786
|
+
if (c) {
|
|
787
|
+
const h = i.get("sl-location");
|
|
788
|
+
if (h) {
|
|
789
|
+
const p = JSON.parse(h);
|
|
790
|
+
t.deepLink.$store.getStore().set({ sessionId: c, hash: p.hash, search: p.search, processed: !1 });
|
|
791
|
+
}
|
|
792
|
+
} else {
|
|
793
|
+
const { hash: h, search: p } = window.location;
|
|
794
|
+
c = Date.now().toString(), i.set("sl-session-id", c), i.set("sl-location", JSON.stringify({ hash: h, search: p })), t.deepLink.$store.getStore().set({ sessionId: c, hash: h, search: p, processed: !1 });
|
|
795
|
+
}
|
|
796
|
+
Pi(t.deepLink.$store), r();
|
|
797
|
+
};
|
|
798
|
+
class Ni extends di {
|
|
721
799
|
$coreStore;
|
|
722
800
|
deepLink;
|
|
723
801
|
transport;
|
|
724
802
|
bypassLogin;
|
|
725
803
|
constructor(e, r, i) {
|
|
726
|
-
super(), this.$coreStore = e, this.deepLink = i, this.transport = r, this.bypassLogin =
|
|
804
|
+
super(), this.$coreStore = e, this.deepLink = i, this.transport = r, this.bypassLogin = Ai(this.transport), this.connect();
|
|
727
805
|
}
|
|
728
806
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
729
807
|
/**
|
|
@@ -734,7 +812,7 @@ class _i extends ci {
|
|
|
734
812
|
*/
|
|
735
813
|
login = async (e, r) => {
|
|
736
814
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
737
|
-
const i = this.deepLink.getDeepLinkData()?.
|
|
815
|
+
const i = this.deepLink.getDeepLinkData()?.[hr];
|
|
738
816
|
console.log("inviterKey", i);
|
|
739
817
|
const s = await this.bypassLogin({
|
|
740
818
|
schema: e,
|
|
@@ -804,8 +882,8 @@ class _i extends ci {
|
|
|
804
882
|
});
|
|
805
883
|
};
|
|
806
884
|
}
|
|
807
|
-
const lt = new Je(),
|
|
808
|
-
t.auth = new
|
|
885
|
+
const lt = new Je(), Di = (t, e, r) => {
|
|
886
|
+
t.auth = new Ni(t.store, t.transport, t.deepLink), t.stores.status.listen((i) => {
|
|
809
887
|
i === Ie.READY && t.auth.reLogin();
|
|
810
888
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (i, s) => {
|
|
811
889
|
if (!(lt.getSchema() === i && lt.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
@@ -817,79 +895,11 @@ const lt = new Je(), Ci = (t, e, r) => {
|
|
|
817
895
|
}, t.sdk.logout = () => {
|
|
818
896
|
t.auth.logout(), lt.clear();
|
|
819
897
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
820
|
-
},
|
|
821
|
-
t.store = new
|
|
898
|
+
}, $i = (t, e, r) => {
|
|
899
|
+
t.store = new xi(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(([i, s]) => [i, s.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
822
900
|
t.store.unsubscribe();
|
|
823
901
|
}, r();
|
|
824
|
-
}
|
|
825
|
-
class ki extends Lt {
|
|
826
|
-
get = this.read;
|
|
827
|
-
set = this.write;
|
|
828
|
-
del = this.remove;
|
|
829
|
-
constructor() {
|
|
830
|
-
super("deep-link-context", window.sessionStorage);
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
const Pr = "sldl", It = "sldl_uid", Rr = "sldl_eid", Bi = ({ hash: t, search: e }) => {
|
|
834
|
-
if (t && t.includes(Pr)) {
|
|
835
|
-
const r = new URLSearchParams(t.substr(1));
|
|
836
|
-
for (const [i, s] of r)
|
|
837
|
-
if (i === It)
|
|
838
|
-
return { friendId: s };
|
|
839
|
-
return null;
|
|
840
|
-
}
|
|
841
|
-
return e && e.includes(Pr) ? { friendId: new URLSearchParams(e)?.[It] } : null;
|
|
842
|
-
}, Li = (t) => {
|
|
843
|
-
const { hash: e, search: r, processed: i } = t.getValues();
|
|
844
|
-
if (console.log("get deep link data from", { hash: e, search: r, processed: i }), !i) {
|
|
845
|
-
const s = Bi({ hash: e, search: r });
|
|
846
|
-
console.log("parse deep link result", s), s && t.setValue("data", s);
|
|
847
|
-
return;
|
|
848
|
-
}
|
|
849
|
-
}, Pi = (t, e, r) => {
|
|
850
|
-
const i = new ki(), s = i.get("sl-deep-link-store");
|
|
851
|
-
let u = { processed: !1 };
|
|
852
|
-
if (s)
|
|
853
|
-
try {
|
|
854
|
-
u = JSON.parse(s);
|
|
855
|
-
} catch (h) {
|
|
856
|
-
console.log(h);
|
|
857
|
-
}
|
|
858
|
-
t.deepLink = {
|
|
859
|
-
$store: new et(Te(u), "deep-link-context"),
|
|
860
|
-
getDeepLinkData: () => {
|
|
861
|
-
const { data: h, processed: p } = t.deepLink.$store.getValues();
|
|
862
|
-
return p ? void 0 : h;
|
|
863
|
-
},
|
|
864
|
-
// we are logged in with inviter id
|
|
865
|
-
deepLinkUsed: (h) => {
|
|
866
|
-
t.deepLink.$store.setValue("processed", !0), i.set("sl-inviter-id", h), i.del("sl-location");
|
|
867
|
-
},
|
|
868
|
-
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
869
|
-
}, t.deepLink.$store.subscribe((h) => i.set("sl-deep-link-store", JSON.stringify(h))), t.sdk.getInviterId = () => i.get("sl-inviter-id"), t.sdk.onDeepLinkHandled = (h) => {
|
|
870
|
-
t.deepLink.onDeepLinkHandlers.add(h);
|
|
871
|
-
}, t.sdk.deepLinkHandled = () => {
|
|
872
|
-
i.del("sl-inviter-id"), t.deepLink.$store.setValue("processed", !0);
|
|
873
|
-
for (const h of t.deepLink.onDeepLinkHandlers)
|
|
874
|
-
try {
|
|
875
|
-
h();
|
|
876
|
-
} catch (p) {
|
|
877
|
-
console.error(p);
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
let c = i.get("sl-session-id");
|
|
881
|
-
if (c) {
|
|
882
|
-
const h = i.get("sl-location");
|
|
883
|
-
if (h) {
|
|
884
|
-
const p = JSON.parse(h);
|
|
885
|
-
t.deepLink.$store.getStore().set({ sessionId: c, hash: p.hash, search: p.search, processed: !1 });
|
|
886
|
-
}
|
|
887
|
-
} else {
|
|
888
|
-
const { hash: h, search: p } = window.location;
|
|
889
|
-
c = Date.now().toString(), i.set("sl-session-id", c), i.set("sl-location", JSON.stringify({ hash: h, search: p })), t.deepLink.$store.getStore().set({ sessionId: c, hash: h, search: p, processed: !1 });
|
|
890
|
-
}
|
|
891
|
-
Li(t.deepLink.$store), r();
|
|
892
|
-
}, Ri = (t, e, r) => {
|
|
902
|
+
}, Ui = (t, e, r) => {
|
|
893
903
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async (i) => {
|
|
894
904
|
if (t.contextConfig = i, t.stores.enabled.get() === "on")
|
|
895
905
|
return { enabled: !0 };
|
|
@@ -905,7 +915,7 @@ const Pr = "sldl", It = "sldl_uid", Rr = "sldl_eid", Bi = ({ hash: t, search: e
|
|
|
905
915
|
}, t.sdk.createEventSession = (i) => {
|
|
906
916
|
t.stores.providerStreamId.setValue(i);
|
|
907
917
|
}, r();
|
|
908
|
-
},
|
|
918
|
+
}, ji = si({
|
|
909
919
|
level: "trace",
|
|
910
920
|
enabled: !1,
|
|
911
921
|
browser: {
|
|
@@ -913,8 +923,8 @@ const Pr = "sldl", It = "sldl_uid", Rr = "sldl_eid", Bi = ({ hash: t, search: e
|
|
|
913
923
|
console.log(t);
|
|
914
924
|
}
|
|
915
925
|
}
|
|
916
|
-
}),
|
|
917
|
-
const { client: i, queryKey: s } = r.createPromiseClient(
|
|
926
|
+
}), mn = (t, e) => ji.child({ name: t }, e), Mi = (t, e, r) => {
|
|
927
|
+
const { client: i, queryKey: s } = r.createPromiseClient(cn, {
|
|
918
928
|
method: "summary",
|
|
919
929
|
params: [t, e]
|
|
920
930
|
});
|
|
@@ -924,25 +934,25 @@ const Pr = "sldl", It = "sldl_uid", Rr = "sldl_eid", Bi = ({ hash: t, search: e
|
|
|
924
934
|
userId: p
|
|
925
935
|
})).data?.attributes
|
|
926
936
|
});
|
|
927
|
-
},
|
|
928
|
-
const { client: e } = t.createPromiseClient(
|
|
937
|
+
}, Vi = (t) => {
|
|
938
|
+
const { client: e } = t.createPromiseClient(cn, { method: "list" });
|
|
929
939
|
return (r) => e.list(r);
|
|
930
|
-
},
|
|
931
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
940
|
+
}, qi = (t, e) => {
|
|
941
|
+
const { client: r, queryKey: i } = e.createPromiseClient(dr, {
|
|
932
942
|
method: "getFriends",
|
|
933
943
|
params: [t]
|
|
934
944
|
});
|
|
935
945
|
return e.nanoquery.createFetcherStore(i, {
|
|
936
946
|
fetcher: async (s, u, c) => c ? (await r.getFriends({})).data : []
|
|
937
947
|
});
|
|
938
|
-
},
|
|
948
|
+
}, Qi = (t, e) => {
|
|
939
949
|
const { client: r, queryKey: i } = e.createPromiseClient(_e, { method: "get", params: [t] });
|
|
940
950
|
return e.nanoquery.createFetcherStore(i, {
|
|
941
951
|
fetcher: async (s, u, c) => (await r.get({
|
|
942
952
|
eventId: c
|
|
943
953
|
})).data?.attributes
|
|
944
954
|
});
|
|
945
|
-
},
|
|
955
|
+
}, Gi = (t, e) => {
|
|
946
956
|
const { client: r, queryKey: i } = e.createPromiseClient(_e, { method: "syncQuestion", params: [t] });
|
|
947
957
|
return e.nanoquery.createFetcherStore(i, {
|
|
948
958
|
fetcher: async (s, u, c) => c ? (await r.syncQuestion({
|
|
@@ -951,20 +961,20 @@ const Pr = "sldl", It = "sldl_uid", Rr = "sldl_eid", Bi = ({ hash: t, search: e
|
|
|
951
961
|
}
|
|
952
962
|
})).data?.attributes : void 0
|
|
953
963
|
});
|
|
954
|
-
},
|
|
955
|
-
const { client: r } = e.createStreamClient(_e), i =
|
|
964
|
+
}, zi = (t, e) => {
|
|
965
|
+
const { client: r } = e.createStreamClient(_e), i = xt({ eventId: t.get() || "", feedId: "" });
|
|
956
966
|
return t.subscribe((u = "") => {
|
|
957
967
|
i.set({ eventId: u, feedId: "" });
|
|
958
968
|
}), e.addSubscription(r.subscription, i, { name: "feedSubscription" });
|
|
959
|
-
},
|
|
969
|
+
}, Ki = (t, e) => {
|
|
960
970
|
const { client: r } = e.createStreamClient(_e);
|
|
961
971
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
962
|
-
},
|
|
972
|
+
}, wn = async (t, e) => {
|
|
963
973
|
const { client: r } = e.createPromiseClient(_e, { method: "questionByUser", params: [t] });
|
|
964
974
|
return (await r.questionByUser({
|
|
965
975
|
questionId: t
|
|
966
976
|
})).data?.attributes?.question;
|
|
967
|
-
},
|
|
977
|
+
}, Wi = (t, e, r) => {
|
|
968
978
|
const { client: i, queryKey: s } = r.createPromiseClient(_e, {
|
|
969
979
|
method: "list",
|
|
970
980
|
params: [t, e]
|
|
@@ -979,16 +989,16 @@ const Pr = "sldl", It = "sldl_uid", Rr = "sldl_eid", Bi = ({ hash: t, search: e
|
|
|
979
989
|
})).data : []
|
|
980
990
|
});
|
|
981
991
|
};
|
|
982
|
-
var
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
var me = [], ie = [],
|
|
987
|
-
for (var ze = 0,
|
|
988
|
-
me[ze] =
|
|
992
|
+
var bn = {}, Lt = {};
|
|
993
|
+
Lt.byteLength = Yi;
|
|
994
|
+
Lt.toByteArray = Zi;
|
|
995
|
+
Lt.fromByteArray = ro;
|
|
996
|
+
var me = [], ie = [], Hi = typeof Uint8Array < "u" ? Uint8Array : Array, Ut = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
997
|
+
for (var ze = 0, Ji = Ut.length; ze < Ji; ++ze)
|
|
998
|
+
me[ze] = Ut[ze], ie[Ut.charCodeAt(ze)] = ze;
|
|
989
999
|
ie[45] = 62;
|
|
990
1000
|
ie[95] = 63;
|
|
991
|
-
function
|
|
1001
|
+
function vn(t) {
|
|
992
1002
|
var e = t.length;
|
|
993
1003
|
if (e % 4 > 0)
|
|
994
1004
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -997,30 +1007,30 @@ function gn(t) {
|
|
|
997
1007
|
var i = r === e ? 0 : 4 - r % 4;
|
|
998
1008
|
return [r, i];
|
|
999
1009
|
}
|
|
1000
|
-
function
|
|
1001
|
-
var e =
|
|
1010
|
+
function Yi(t) {
|
|
1011
|
+
var e = vn(t), r = e[0], i = e[1];
|
|
1002
1012
|
return (r + i) * 3 / 4 - i;
|
|
1003
1013
|
}
|
|
1004
|
-
function
|
|
1014
|
+
function Xi(t, e, r) {
|
|
1005
1015
|
return (e + r) * 3 / 4 - r;
|
|
1006
1016
|
}
|
|
1007
|
-
function
|
|
1008
|
-
var e, r =
|
|
1017
|
+
function Zi(t) {
|
|
1018
|
+
var e, r = vn(t), i = r[0], s = r[1], u = new Hi(Xi(t, i, s)), c = 0, h = s > 0 ? i - 4 : i, p;
|
|
1009
1019
|
for (p = 0; p < h; p += 4)
|
|
1010
1020
|
e = ie[t.charCodeAt(p)] << 18 | ie[t.charCodeAt(p + 1)] << 12 | ie[t.charCodeAt(p + 2)] << 6 | ie[t.charCodeAt(p + 3)], u[c++] = e >> 16 & 255, u[c++] = e >> 8 & 255, u[c++] = e & 255;
|
|
1011
1021
|
return s === 2 && (e = ie[t.charCodeAt(p)] << 2 | ie[t.charCodeAt(p + 1)] >> 4, u[c++] = e & 255), s === 1 && (e = ie[t.charCodeAt(p)] << 10 | ie[t.charCodeAt(p + 1)] << 4 | ie[t.charCodeAt(p + 2)] >> 2, u[c++] = e >> 8 & 255, u[c++] = e & 255), u;
|
|
1012
1022
|
}
|
|
1013
|
-
function
|
|
1023
|
+
function eo(t) {
|
|
1014
1024
|
return me[t >> 18 & 63] + me[t >> 12 & 63] + me[t >> 6 & 63] + me[t & 63];
|
|
1015
1025
|
}
|
|
1016
|
-
function
|
|
1026
|
+
function to(t, e, r) {
|
|
1017
1027
|
for (var i, s = [], u = e; u < r; u += 3)
|
|
1018
|
-
i = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(
|
|
1028
|
+
i = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(eo(i));
|
|
1019
1029
|
return s.join("");
|
|
1020
1030
|
}
|
|
1021
|
-
function
|
|
1031
|
+
function ro(t) {
|
|
1022
1032
|
for (var e, r = t.length, i = r % 3, s = [], u = 16383, c = 0, h = r - i; c < h; c += u)
|
|
1023
|
-
s.push(
|
|
1033
|
+
s.push(to(t, c, c + u > h ? h : c + u));
|
|
1024
1034
|
return i === 1 ? (e = t[r - 1], s.push(
|
|
1025
1035
|
me[e >> 2] + me[e << 4 & 63] + "=="
|
|
1026
1036
|
)) : i === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
@@ -1045,12 +1055,12 @@ pr.read = function(t, e, r, i, s) {
|
|
|
1045
1055
|
return (F ? -1 : 1) * c * Math.pow(2, u - i);
|
|
1046
1056
|
};
|
|
1047
1057
|
pr.write = function(t, e, r, i, s, u) {
|
|
1048
|
-
var c, h, p, m = u * 8 - s - 1, f = (1 << m) - 1, w = f >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = i ? 0 : u - 1,
|
|
1049
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (h = isNaN(e) ? 1 : 0, c = f) : (c = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -c)) < 1 && (c--, p *= 2), c + w >= 1 ? e += E / p : e += E * Math.pow(2, 1 - w), e * p >= 2 && (c++, p /= 2), c + w >= f ? (h = 0, c = f) : c + w >= 1 ? (h = (e * p - 1) * Math.pow(2, s), c = c + w) : (h = e * Math.pow(2, w - 1) * Math.pow(2, s), c = 0)); s >= 8; t[r + F] = h & 255, F +=
|
|
1058
|
+
var c, h, p, m = u * 8 - s - 1, f = (1 << m) - 1, w = f >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = i ? 0 : u - 1, _ = i ? 1 : -1, x = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
1059
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (h = isNaN(e) ? 1 : 0, c = f) : (c = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -c)) < 1 && (c--, p *= 2), c + w >= 1 ? e += E / p : e += E * Math.pow(2, 1 - w), e * p >= 2 && (c++, p /= 2), c + w >= f ? (h = 0, c = f) : c + w >= 1 ? (h = (e * p - 1) * Math.pow(2, s), c = c + w) : (h = e * Math.pow(2, w - 1) * Math.pow(2, s), c = 0)); s >= 8; t[r + F] = h & 255, F += _, h /= 256, s -= 8)
|
|
1050
1060
|
;
|
|
1051
|
-
for (c = c << s | h, m += s; m > 0; t[r + F] = c & 255, F +=
|
|
1061
|
+
for (c = c << s | h, m += s; m > 0; t[r + F] = c & 255, F += _, c /= 256, m -= 8)
|
|
1052
1062
|
;
|
|
1053
|
-
t[r + F -
|
|
1063
|
+
t[r + F - _] |= x * 128;
|
|
1054
1064
|
};
|
|
1055
1065
|
/*!
|
|
1056
1066
|
* The buffer module from node.js, for the browser.
|
|
@@ -1059,8 +1069,8 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1059
1069
|
* @license MIT
|
|
1060
1070
|
*/
|
|
1061
1071
|
(function(t) {
|
|
1062
|
-
const e =
|
|
1063
|
-
t.Buffer = f, t.SlowBuffer =
|
|
1072
|
+
const e = Lt, r = pr, i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1073
|
+
t.Buffer = f, t.SlowBuffer = C, t.INSPECT_MAX_BYTES = 50;
|
|
1064
1074
|
const s = 2147483647;
|
|
1065
1075
|
t.kMaxLength = s;
|
|
1066
1076
|
const { Uint8Array: u, ArrayBuffer: c, SharedArrayBuffer: h } = globalThis;
|
|
@@ -1102,7 +1112,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1102
1112
|
throw new TypeError(
|
|
1103
1113
|
'The "string" argument must be of type string. Received type number'
|
|
1104
1114
|
);
|
|
1105
|
-
return
|
|
1115
|
+
return _(a);
|
|
1106
1116
|
}
|
|
1107
1117
|
return w(a, n, o);
|
|
1108
1118
|
}
|
|
@@ -1149,13 +1159,13 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1149
1159
|
f.alloc = function(a, n, o) {
|
|
1150
1160
|
return F(a, n, o);
|
|
1151
1161
|
};
|
|
1152
|
-
function
|
|
1162
|
+
function _(a) {
|
|
1153
1163
|
return E(a), m(a < 0 ? 0 : P(a) | 0);
|
|
1154
1164
|
}
|
|
1155
1165
|
f.allocUnsafe = function(a) {
|
|
1156
|
-
return
|
|
1166
|
+
return _(a);
|
|
1157
1167
|
}, f.allocUnsafeSlow = function(a) {
|
|
1158
|
-
return
|
|
1168
|
+
return _(a);
|
|
1159
1169
|
};
|
|
1160
1170
|
function x(a, n) {
|
|
1161
1171
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !f.isEncoding(n))
|
|
@@ -1165,7 +1175,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1165
1175
|
const d = l.write(a, n);
|
|
1166
1176
|
return d !== o && (l = l.slice(0, d)), l;
|
|
1167
1177
|
}
|
|
1168
|
-
function
|
|
1178
|
+
function N(a) {
|
|
1169
1179
|
const n = a.length < 0 ? 0 : P(a.length) | 0, o = m(n);
|
|
1170
1180
|
for (let l = 0; l < n; l += 1)
|
|
1171
1181
|
o[l] = a[l] & 255;
|
|
@@ -1176,7 +1186,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1176
1186
|
const n = new u(a);
|
|
1177
1187
|
return T(n.buffer, n.byteOffset, n.byteLength);
|
|
1178
1188
|
}
|
|
1179
|
-
return
|
|
1189
|
+
return N(a);
|
|
1180
1190
|
}
|
|
1181
1191
|
function T(a, n, o) {
|
|
1182
1192
|
if (n < 0 || a.byteLength < n)
|
|
@@ -1192,16 +1202,16 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1192
1202
|
return o.length === 0 || a.copy(o, 0, 0, n), o;
|
|
1193
1203
|
}
|
|
1194
1204
|
if (a.length !== void 0)
|
|
1195
|
-
return typeof a.length != "number" ||
|
|
1205
|
+
return typeof a.length != "number" || $t(a.length) ? m(0) : N(a);
|
|
1196
1206
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
1197
|
-
return
|
|
1207
|
+
return N(a.data);
|
|
1198
1208
|
}
|
|
1199
1209
|
function P(a) {
|
|
1200
1210
|
if (a >= s)
|
|
1201
1211
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s.toString(16) + " bytes");
|
|
1202
1212
|
return a | 0;
|
|
1203
1213
|
}
|
|
1204
|
-
function
|
|
1214
|
+
function C(a) {
|
|
1205
1215
|
return +a != a && (a = 0), f.alloc(+a);
|
|
1206
1216
|
}
|
|
1207
1217
|
f.isBuffer = function(n) {
|
|
@@ -1383,19 +1393,19 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1383
1393
|
return 1;
|
|
1384
1394
|
if (o >>>= 0, l >>>= 0, d >>>= 0, y >>>= 0, this === n)
|
|
1385
1395
|
return 0;
|
|
1386
|
-
let b = y - d,
|
|
1387
|
-
const W = Math.min(b,
|
|
1396
|
+
let b = y - d, D = l - o;
|
|
1397
|
+
const W = Math.min(b, D), K = this.slice(d, y), H = n.slice(o, l);
|
|
1388
1398
|
for (let z = 0; z < W; ++z)
|
|
1389
1399
|
if (K[z] !== H[z]) {
|
|
1390
|
-
b = K[z],
|
|
1400
|
+
b = K[z], D = H[z];
|
|
1391
1401
|
break;
|
|
1392
1402
|
}
|
|
1393
|
-
return b <
|
|
1403
|
+
return b < D ? -1 : D < b ? 1 : 0;
|
|
1394
1404
|
};
|
|
1395
1405
|
function ne(a, n, o, l, d) {
|
|
1396
1406
|
if (a.length === 0)
|
|
1397
1407
|
return -1;
|
|
1398
|
-
if (typeof o == "string" ? (l = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o,
|
|
1408
|
+
if (typeof o == "string" ? (l = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o, $t(o) && (o = d ? 0 : a.length - 1), o < 0 && (o = a.length + o), o >= a.length) {
|
|
1399
1409
|
if (d)
|
|
1400
1410
|
return -1;
|
|
1401
1411
|
o = a.length - 1;
|
|
@@ -1411,11 +1421,11 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1411
1421
|
throw new TypeError("val must be string, number or Buffer");
|
|
1412
1422
|
}
|
|
1413
1423
|
function we(a, n, o, l, d) {
|
|
1414
|
-
let y = 1, b = a.length,
|
|
1424
|
+
let y = 1, b = a.length, D = n.length;
|
|
1415
1425
|
if (l !== void 0 && (l = String(l).toLowerCase(), l === "ucs2" || l === "ucs-2" || l === "utf16le" || l === "utf-16le")) {
|
|
1416
1426
|
if (a.length < 2 || n.length < 2)
|
|
1417
1427
|
return -1;
|
|
1418
|
-
y = 2, b /= 2,
|
|
1428
|
+
y = 2, b /= 2, D /= 2, o /= 2;
|
|
1419
1429
|
}
|
|
1420
1430
|
function W(H, z) {
|
|
1421
1431
|
return y === 1 ? H[z] : H.readUInt16BE(z * y);
|
|
@@ -1425,14 +1435,14 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1425
1435
|
let H = -1;
|
|
1426
1436
|
for (K = o; K < b; K++)
|
|
1427
1437
|
if (W(a, K) === W(n, H === -1 ? 0 : K - H)) {
|
|
1428
|
-
if (H === -1 && (H = K), K - H + 1 ===
|
|
1438
|
+
if (H === -1 && (H = K), K - H + 1 === D)
|
|
1429
1439
|
return H * y;
|
|
1430
1440
|
} else
|
|
1431
1441
|
H !== -1 && (K -= K - H), H = -1;
|
|
1432
1442
|
} else
|
|
1433
|
-
for (o +
|
|
1443
|
+
for (o + D > b && (o = b - D), K = o; K >= 0; K--) {
|
|
1434
1444
|
let H = !0;
|
|
1435
|
-
for (let z = 0; z <
|
|
1445
|
+
for (let z = 0; z < D; z++)
|
|
1436
1446
|
if (W(a, K + z) !== W(n, z)) {
|
|
1437
1447
|
H = !1;
|
|
1438
1448
|
break;
|
|
@@ -1457,10 +1467,10 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1457
1467
|
l > y / 2 && (l = y / 2);
|
|
1458
1468
|
let b;
|
|
1459
1469
|
for (b = 0; b < l; ++b) {
|
|
1460
|
-
const
|
|
1461
|
-
if (
|
|
1470
|
+
const D = parseInt(n.substr(b * 2, 2), 16);
|
|
1471
|
+
if ($t(D))
|
|
1462
1472
|
return b;
|
|
1463
|
-
a[o + b] =
|
|
1473
|
+
a[o + b] = D;
|
|
1464
1474
|
}
|
|
1465
1475
|
return b;
|
|
1466
1476
|
}
|
|
@@ -1474,7 +1484,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1474
1484
|
return gt(Cr(n), a, o, l);
|
|
1475
1485
|
}
|
|
1476
1486
|
function Pe(a, n, o, l) {
|
|
1477
|
-
return gt(
|
|
1487
|
+
return gt(ei(n, a.length - o), a, o, l);
|
|
1478
1488
|
}
|
|
1479
1489
|
f.prototype.write = function(n, o, l, d) {
|
|
1480
1490
|
if (o === void 0)
|
|
@@ -1530,10 +1540,10 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1530
1540
|
let d = n;
|
|
1531
1541
|
for (; d < o; ) {
|
|
1532
1542
|
const y = a[d];
|
|
1533
|
-
let b = null,
|
|
1534
|
-
if (d +
|
|
1543
|
+
let b = null, D = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
1544
|
+
if (d + D <= o) {
|
|
1535
1545
|
let W, K, H, z;
|
|
1536
|
-
switch (
|
|
1546
|
+
switch (D) {
|
|
1537
1547
|
case 1:
|
|
1538
1548
|
y < 128 && (b = y);
|
|
1539
1549
|
break;
|
|
@@ -1547,7 +1557,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1547
1557
|
W = a[d + 1], K = a[d + 2], H = a[d + 3], (W & 192) === 128 && (K & 192) === 128 && (H & 192) === 128 && (z = (y & 15) << 18 | (W & 63) << 12 | (K & 63) << 6 | H & 63, z > 65535 && z < 1114112 && (b = z));
|
|
1548
1558
|
}
|
|
1549
1559
|
}
|
|
1550
|
-
b === null ? (b = 65533,
|
|
1560
|
+
b === null ? (b = 65533, D = 1) : b > 65535 && (b -= 65536, l.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), l.push(b), d += D;
|
|
1551
1561
|
}
|
|
1552
1562
|
return ue(l);
|
|
1553
1563
|
}
|
|
@@ -1583,7 +1593,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1583
1593
|
(!n || n < 0) && (n = 0), (!o || o < 0 || o > l) && (o = l);
|
|
1584
1594
|
let d = "";
|
|
1585
1595
|
for (let y = n; y < o; ++y)
|
|
1586
|
-
d +=
|
|
1596
|
+
d += ti[a[y]];
|
|
1587
1597
|
return d;
|
|
1588
1598
|
}
|
|
1589
1599
|
function v(a, n, o) {
|
|
@@ -1697,8 +1707,8 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1697
1707
|
}
|
|
1698
1708
|
f.prototype.writeUintLE = f.prototype.writeUIntLE = function(n, o, l, d) {
|
|
1699
1709
|
if (n = +n, o = o >>> 0, l = l >>> 0, !d) {
|
|
1700
|
-
const
|
|
1701
|
-
O(this, n, o, l,
|
|
1710
|
+
const D = Math.pow(2, 8 * l) - 1;
|
|
1711
|
+
O(this, n, o, l, D, 0);
|
|
1702
1712
|
}
|
|
1703
1713
|
let y = 1, b = 0;
|
|
1704
1714
|
for (this[o] = n & 255; ++b < l && (y *= 256); )
|
|
@@ -1706,8 +1716,8 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1706
1716
|
return o + l;
|
|
1707
1717
|
}, f.prototype.writeUintBE = f.prototype.writeUIntBE = function(n, o, l, d) {
|
|
1708
1718
|
if (n = +n, o = o >>> 0, l = l >>> 0, !d) {
|
|
1709
|
-
const
|
|
1710
|
-
O(this, n, o, l,
|
|
1719
|
+
const D = Math.pow(2, 8 * l) - 1;
|
|
1720
|
+
O(this, n, o, l, D, 0);
|
|
1711
1721
|
}
|
|
1712
1722
|
let y = l - 1, b = 1;
|
|
1713
1723
|
for (this[o + y] = n & 255; --y >= 0 && (b *= 256); )
|
|
@@ -1747,18 +1757,18 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1747
1757
|
const W = Math.pow(2, 8 * l - 1);
|
|
1748
1758
|
O(this, n, o, l, W - 1, -W);
|
|
1749
1759
|
}
|
|
1750
|
-
let y = 0, b = 1,
|
|
1760
|
+
let y = 0, b = 1, D = 0;
|
|
1751
1761
|
for (this[o] = n & 255; ++y < l && (b *= 256); )
|
|
1752
|
-
n < 0 &&
|
|
1762
|
+
n < 0 && D === 0 && this[o + y - 1] !== 0 && (D = 1), this[o + y] = (n / b >> 0) - D & 255;
|
|
1753
1763
|
return o + l;
|
|
1754
1764
|
}, f.prototype.writeIntBE = function(n, o, l, d) {
|
|
1755
1765
|
if (n = +n, o = o >>> 0, !d) {
|
|
1756
1766
|
const W = Math.pow(2, 8 * l - 1);
|
|
1757
1767
|
O(this, n, o, l, W - 1, -W);
|
|
1758
1768
|
}
|
|
1759
|
-
let y = l - 1, b = 1,
|
|
1769
|
+
let y = l - 1, b = 1, D = 0;
|
|
1760
1770
|
for (this[o + y] = n & 255; --y >= 0 && (b *= 256); )
|
|
1761
|
-
n < 0 &&
|
|
1771
|
+
n < 0 && D === 0 && this[o + y + 1] !== 0 && (D = 1), this[o + y] = (n / b >> 0) - D & 255;
|
|
1762
1772
|
return o + l;
|
|
1763
1773
|
}, f.prototype.writeInt8 = function(n, o, l) {
|
|
1764
1774
|
return n = +n, o = o >>> 0, l || O(this, n, o, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[o] = n & 255, o + 1;
|
|
@@ -1836,11 +1846,11 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1836
1846
|
for (y = o; y < l; ++y)
|
|
1837
1847
|
this[y] = n;
|
|
1838
1848
|
else {
|
|
1839
|
-
const b = f.isBuffer(n) ? n : f.from(n, d),
|
|
1840
|
-
if (
|
|
1849
|
+
const b = f.isBuffer(n) ? n : f.from(n, d), D = b.length;
|
|
1850
|
+
if (D === 0)
|
|
1841
1851
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
1842
1852
|
for (y = 0; y < l - o; ++y)
|
|
1843
|
-
this[y + o] = b[y %
|
|
1853
|
+
this[y + o] = b[y % D];
|
|
1844
1854
|
}
|
|
1845
1855
|
return this;
|
|
1846
1856
|
};
|
|
@@ -1903,8 +1913,8 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1903
1913
|
function Ne(a, n, o, l, d, y) {
|
|
1904
1914
|
if (a > o || a < n) {
|
|
1905
1915
|
const b = typeof n == "bigint" ? "n" : "";
|
|
1906
|
-
let
|
|
1907
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ?
|
|
1916
|
+
let D;
|
|
1917
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? D = `>= 0${b} and < 2${b} ** ${(y + 1) * 8}${b}` : D = `>= -(2${b} ** ${(y + 1) * 8 - 1}${b}) and < 2 ** ${(y + 1) * 8 - 1}${b}` : D = `>= ${n}${b} and <= ${o}${b}`, new J.ERR_OUT_OF_RANGE("value", D, a);
|
|
1908
1918
|
}
|
|
1909
1919
|
Be(l, d, y);
|
|
1910
1920
|
}
|
|
@@ -1919,9 +1929,9 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1919
1929
|
a
|
|
1920
1930
|
);
|
|
1921
1931
|
}
|
|
1922
|
-
const
|
|
1932
|
+
const Dt = /[^+/0-9A-Za-z-_]/g;
|
|
1923
1933
|
function A(a) {
|
|
1924
|
-
if (a = a.split("=")[0], a = a.trim().replace(
|
|
1934
|
+
if (a = a.split("=")[0], a = a.trim().replace(Dt, ""), a.length < 2)
|
|
1925
1935
|
return "";
|
|
1926
1936
|
for (; a.length % 4 !== 0; )
|
|
1927
1937
|
a = a + "=";
|
|
@@ -1992,7 +2002,7 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
1992
2002
|
n.push(a.charCodeAt(o) & 255);
|
|
1993
2003
|
return n;
|
|
1994
2004
|
}
|
|
1995
|
-
function
|
|
2005
|
+
function ei(a, n) {
|
|
1996
2006
|
let o, l, d;
|
|
1997
2007
|
const y = [];
|
|
1998
2008
|
for (let b = 0; b < a.length && !((n -= 2) < 0); ++b)
|
|
@@ -2011,10 +2021,10 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
2011
2021
|
function pe(a, n) {
|
|
2012
2022
|
return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
|
|
2013
2023
|
}
|
|
2014
|
-
function
|
|
2024
|
+
function $t(a) {
|
|
2015
2025
|
return a !== a;
|
|
2016
2026
|
}
|
|
2017
|
-
const
|
|
2027
|
+
const ti = function() {
|
|
2018
2028
|
const a = "0123456789abcdef", n = new Array(256);
|
|
2019
2029
|
for (let o = 0; o < 16; ++o) {
|
|
2020
2030
|
const l = o * 16;
|
|
@@ -2024,19 +2034,19 @@ pr.write = function(t, e, r, i, s, u) {
|
|
|
2024
2034
|
return n;
|
|
2025
2035
|
}();
|
|
2026
2036
|
function Le(a) {
|
|
2027
|
-
return typeof BigInt > "u" ?
|
|
2037
|
+
return typeof BigInt > "u" ? ri : a;
|
|
2028
2038
|
}
|
|
2029
|
-
function
|
|
2039
|
+
function ri() {
|
|
2030
2040
|
throw new Error("BigInt not supported");
|
|
2031
2041
|
}
|
|
2032
|
-
})(
|
|
2033
|
-
const
|
|
2034
|
-
var
|
|
2035
|
-
function
|
|
2042
|
+
})(bn);
|
|
2043
|
+
const Dr = bn.Buffer;
|
|
2044
|
+
var Sn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2045
|
+
function no(t) {
|
|
2036
2046
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2037
2047
|
}
|
|
2038
2048
|
var yr = { exports: {} };
|
|
2039
|
-
const
|
|
2049
|
+
const io = Object.getPrototypeOf({});
|
|
2040
2050
|
function gr(t) {
|
|
2041
2051
|
function e(I) {
|
|
2042
2052
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
@@ -2050,28 +2060,28 @@ function gr(t) {
|
|
|
2050
2060
|
}
|
|
2051
2061
|
function i(I) {
|
|
2052
2062
|
const T = {};
|
|
2053
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
2063
|
+
if (p && Object.getPrototypeOf(I) !== io)
|
|
2054
2064
|
return p(I);
|
|
2055
2065
|
const j = h(I);
|
|
2056
|
-
let P,
|
|
2057
|
-
for (P = 0,
|
|
2066
|
+
let P, C, k;
|
|
2067
|
+
for (P = 0, C = j.length; P < C; ++P)
|
|
2058
2068
|
e(k = j[P]) && (T[k] = F(I[k]));
|
|
2059
2069
|
return T;
|
|
2060
2070
|
}
|
|
2061
2071
|
function s(I, T) {
|
|
2062
2072
|
const j = I.length, P = T.length;
|
|
2063
|
-
let
|
|
2073
|
+
let C = 0;
|
|
2064
2074
|
const k = new Array(j + P);
|
|
2065
|
-
for (
|
|
2066
|
-
k[
|
|
2067
|
-
for (
|
|
2068
|
-
k[
|
|
2075
|
+
for (C = 0; C < j; ++C)
|
|
2076
|
+
k[C] = F(I[C]);
|
|
2077
|
+
for (C = 0; C < P; ++C)
|
|
2078
|
+
k[C + j] = F(T[C]);
|
|
2069
2079
|
return k;
|
|
2070
2080
|
}
|
|
2071
2081
|
const u = Object.prototype.propertyIsEnumerable;
|
|
2072
2082
|
function c(I) {
|
|
2073
2083
|
const T = Object.keys(I), j = Object.getOwnPropertySymbols(I);
|
|
2074
|
-
for (let P = 0,
|
|
2084
|
+
for (let P = 0, C = j.length; P < C; ++P)
|
|
2075
2085
|
u.call(I, j[P]) && T.push(j[P]);
|
|
2076
2086
|
return T;
|
|
2077
2087
|
}
|
|
@@ -2082,25 +2092,25 @@ function gr(t) {
|
|
|
2082
2092
|
function f(I) {
|
|
2083
2093
|
return typeof I != "object" || I === null;
|
|
2084
2094
|
}
|
|
2085
|
-
const w = typeof
|
|
2095
|
+
const w = typeof Dr < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof Dr : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: x, getKeys: h, isMergeableObject: m }) : s;
|
|
2086
2096
|
function F(I) {
|
|
2087
2097
|
return m(I) ? Array.isArray(I) ? r(I) : i(I) : I;
|
|
2088
2098
|
}
|
|
2089
|
-
function
|
|
2090
|
-
const j = {}, P = h(I),
|
|
2099
|
+
function _(I, T) {
|
|
2100
|
+
const j = {}, P = h(I), C = h(T);
|
|
2091
2101
|
let k, B, q;
|
|
2092
2102
|
for (k = 0, B = P.length; k < B; ++k)
|
|
2093
|
-
e(q = P[k]) &&
|
|
2094
|
-
for (k = 0, B =
|
|
2095
|
-
e(q =
|
|
2103
|
+
e(q = P[k]) && C.indexOf(q) === -1 && (j[q] = F(I[q]));
|
|
2104
|
+
for (k = 0, B = C.length; k < B; ++k)
|
|
2105
|
+
e(q = C[k]) && (q in I && (P.indexOf(q) !== -1 && (j[q] = x(I[q], T[q])), !0) || // eslint-disable-line no-mixed-operators
|
|
2096
2106
|
(j[q] = F(T[q])));
|
|
2097
2107
|
return j;
|
|
2098
2108
|
}
|
|
2099
2109
|
function x(I, T) {
|
|
2100
2110
|
const j = Array.isArray(T), P = Array.isArray(I);
|
|
2101
|
-
return f(T) ? T : w(I) ? F(T) : j && P ? E(I, T) : j !== P ? F(T) :
|
|
2111
|
+
return f(T) ? T : w(I) ? F(T) : j && P ? E(I, T) : j !== P ? F(T) : _(I, T);
|
|
2102
2112
|
}
|
|
2103
|
-
function
|
|
2113
|
+
function N() {
|
|
2104
2114
|
switch (arguments.length) {
|
|
2105
2115
|
case 0:
|
|
2106
2116
|
return {};
|
|
@@ -2114,19 +2124,19 @@ function gr(t) {
|
|
|
2114
2124
|
I = x(I, arguments[T]);
|
|
2115
2125
|
return I;
|
|
2116
2126
|
}
|
|
2117
|
-
return t && t.all ?
|
|
2127
|
+
return t && t.all ? N : x;
|
|
2118
2128
|
}
|
|
2119
2129
|
yr.exports = gr;
|
|
2120
2130
|
yr.exports.default = gr;
|
|
2121
|
-
var
|
|
2122
|
-
const
|
|
2131
|
+
var oo = yr.exports.deepmerge = gr;
|
|
2132
|
+
const so = (t) => (e, r) => {
|
|
2123
2133
|
let i = 0;
|
|
2124
2134
|
const s = e.length, u = r.length, c = Math.max(s, u), h = new Array(c);
|
|
2125
2135
|
for (i = 0; i < c; ++i)
|
|
2126
2136
|
i < u ? h[i] = t.deepmerge(e[i], r[i]) : h[i] = t.clone(e[i]);
|
|
2127
2137
|
return h;
|
|
2128
|
-
},
|
|
2129
|
-
const i =
|
|
2138
|
+
}, ao = oo({ mergeArray: so }), uo = (t, e, r) => {
|
|
2139
|
+
const i = an([e, r], (c, h) => {
|
|
2130
2140
|
if (c) {
|
|
2131
2141
|
const p = h.data?.find((m) => m.id === c);
|
|
2132
2142
|
if (p)
|
|
@@ -2141,7 +2151,7 @@ const ro = (t) => (e, r) => {
|
|
|
2141
2151
|
return i.subscribe(async (c) => {
|
|
2142
2152
|
if (c && c.type === "question") {
|
|
2143
2153
|
s.setKey("loading", !0);
|
|
2144
|
-
const h = await
|
|
2154
|
+
const h = await wn(c.id, t);
|
|
2145
2155
|
s.set({ data: h, loading: !1 });
|
|
2146
2156
|
return;
|
|
2147
2157
|
}
|
|
@@ -2151,14 +2161,14 @@ const ro = (t) => (e, r) => {
|
|
|
2151
2161
|
if (h && c?.answers)
|
|
2152
2162
|
for (const p of c.answers)
|
|
2153
2163
|
p.youVoted !== !0 && delete p.youVoted;
|
|
2154
|
-
s.set({ data:
|
|
2164
|
+
s.set({ data: ao(h, c) });
|
|
2155
2165
|
} };
|
|
2156
2166
|
};
|
|
2157
2167
|
var Me;
|
|
2158
2168
|
(function(t) {
|
|
2159
2169
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
2160
2170
|
})(Me || (Me = {}));
|
|
2161
|
-
class
|
|
2171
|
+
class co {
|
|
2162
2172
|
/** sl event id */
|
|
2163
2173
|
slStreamId;
|
|
2164
2174
|
/** organization id */
|
|
@@ -2188,17 +2198,15 @@ class oo {
|
|
|
2188
2198
|
notifications;
|
|
2189
2199
|
log;
|
|
2190
2200
|
constructor(e) {
|
|
2191
|
-
this.log =
|
|
2192
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2201
|
+
this.log = mn("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new se(re(void 0), "moderationId").getStore(), this.interactiveAllowed = new se(re(Me.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new se(re(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new de(Qi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new de(Wi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new de(Gi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = uo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2202
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Ki(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
|
|
2193
2203
|
window.requestAnimationFrame(() => {
|
|
2194
2204
|
this.openedQuestion.updateExtendedQuestion(i.data?.attributes?.question);
|
|
2195
2205
|
});
|
|
2196
2206
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2197
|
-
}), this.feedSubscription =
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
i && i.mutate(r.data?.attributes);
|
|
2201
|
-
});
|
|
2207
|
+
}), this.feedSubscription = zi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2208
|
+
const i = this.activeQuestionId.getStore();
|
|
2209
|
+
i && i.mutate(r.data?.attributes);
|
|
2202
2210
|
}), this.feedSubscription.addListener("moderation update", (r) => {
|
|
2203
2211
|
window.requestAnimationFrame(() => {
|
|
2204
2212
|
r.data?.attributes?.question === void 0 && r.data?.attributes?.moderation && this.moderation.invalidate();
|
|
@@ -2237,7 +2245,7 @@ class oo {
|
|
|
2237
2245
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2238
2246
|
};
|
|
2239
2247
|
}
|
|
2240
|
-
class
|
|
2248
|
+
class lo {
|
|
2241
2249
|
notificationsList;
|
|
2242
2250
|
notifications;
|
|
2243
2251
|
store;
|
|
@@ -2247,7 +2255,7 @@ class so {
|
|
|
2247
2255
|
options;
|
|
2248
2256
|
logger;
|
|
2249
2257
|
constructor(e) {
|
|
2250
|
-
this.options = e, this.logger =
|
|
2258
|
+
this.options = e, this.logger = mn("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new se(re(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = this.notifications.getStore();
|
|
2251
2259
|
}
|
|
2252
2260
|
addToQueue = (e) => {
|
|
2253
2261
|
if (this.store.has(e.id)) {
|
|
@@ -2316,18 +2324,18 @@ class so {
|
|
|
2316
2324
|
this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding");
|
|
2317
2325
|
};
|
|
2318
2326
|
}
|
|
2319
|
-
var
|
|
2327
|
+
var It;
|
|
2320
2328
|
(function(t) {
|
|
2321
2329
|
t.OPENED = "opened";
|
|
2322
|
-
})(
|
|
2323
|
-
class
|
|
2330
|
+
})(It || (It = {}));
|
|
2331
|
+
class fo extends Bt {
|
|
2324
2332
|
constructor() {
|
|
2325
2333
|
super("notification");
|
|
2326
2334
|
}
|
|
2327
2335
|
setOpened = (e) => {
|
|
2328
|
-
this.write(
|
|
2336
|
+
this.write(It.OPENED, e, "true");
|
|
2329
2337
|
};
|
|
2330
|
-
isOpened = (e) => this.read(
|
|
2338
|
+
isOpened = (e) => this.read(It.OPENED, e);
|
|
2331
2339
|
clearNotification = () => {
|
|
2332
2340
|
this.clear();
|
|
2333
2341
|
};
|
|
@@ -2336,11 +2344,11 @@ var je;
|
|
|
2336
2344
|
(function(t) {
|
|
2337
2345
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2338
2346
|
})(je || (je = {}));
|
|
2339
|
-
class
|
|
2347
|
+
class ho {
|
|
2340
2348
|
queue;
|
|
2341
2349
|
storage;
|
|
2342
2350
|
constructor(e = {}) {
|
|
2343
|
-
this.storage = new
|
|
2351
|
+
this.storage = new fo(), this.queue = new lo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2344
2352
|
}
|
|
2345
2353
|
add = (e) => {
|
|
2346
2354
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2353,15 +2361,15 @@ class uo {
|
|
|
2353
2361
|
this.storage.setOpened(e);
|
|
2354
2362
|
};
|
|
2355
2363
|
}
|
|
2356
|
-
const
|
|
2357
|
-
t.notifications = new
|
|
2358
|
-
},
|
|
2364
|
+
const po = (t, e, r) => {
|
|
2365
|
+
t.notifications = new ho(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2366
|
+
}, yo = (t, e) => {
|
|
2359
2367
|
const { client: r } = t.createPromiseClient(_e, { method: "submitAnswer" });
|
|
2360
2368
|
return r.submitAnswer({ data: e });
|
|
2361
|
-
},
|
|
2369
|
+
}, go = (t, e) => {
|
|
2362
2370
|
const { client: r } = t.createPromiseClient(_e, { method: "submitInplay" });
|
|
2363
2371
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2364
|
-
},
|
|
2372
|
+
}, mo = (t, e) => {
|
|
2365
2373
|
const { client: r } = t.createPromiseClient(_e, { method: "skipQuestion" });
|
|
2366
2374
|
return r.skipQuestion({ data: { id: e } });
|
|
2367
2375
|
};
|
|
@@ -2369,7 +2377,7 @@ var Ye;
|
|
|
2369
2377
|
(function(t) {
|
|
2370
2378
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
2371
2379
|
})(Ye || (Ye = {}));
|
|
2372
|
-
class
|
|
2380
|
+
class An extends Bt {
|
|
2373
2381
|
constructor() {
|
|
2374
2382
|
super("gamification");
|
|
2375
2383
|
}
|
|
@@ -2386,47 +2394,47 @@ class wn extends Lt {
|
|
|
2386
2394
|
return window.sessionStorage.getItem(s);
|
|
2387
2395
|
};
|
|
2388
2396
|
}
|
|
2389
|
-
const
|
|
2397
|
+
const $r = {
|
|
2390
2398
|
pageSize: 10
|
|
2391
|
-
},
|
|
2399
|
+
}, wo = (t, e, r, i, s) => {
|
|
2392
2400
|
let u = 0;
|
|
2393
|
-
const c = re({ pageSize: s?.pageSize ||
|
|
2401
|
+
const c = re({ pageSize: s?.pageSize || $r.pageSize, page: 0 }), h = Te({
|
|
2394
2402
|
data: [],
|
|
2395
2403
|
key: Date.now(),
|
|
2396
2404
|
hasMore: !0,
|
|
2397
2405
|
loading: void 0,
|
|
2398
2406
|
error: void 0
|
|
2399
|
-
}), p =
|
|
2400
|
-
const E = e.get(), F = i.getStore().get().data?.map((
|
|
2407
|
+
}), p = Vi(t), m = async () => {
|
|
2408
|
+
const E = e.get(), F = i.getStore().get().data?.map((_) => _.slId) || [];
|
|
2401
2409
|
if (E && F?.length) {
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2410
|
+
const _ = r.get();
|
|
2411
|
+
_ && F.push(_), h.setKey("loading", !0), h.setKey("data", []);
|
|
2404
2412
|
const x = {
|
|
2405
2413
|
eventId: E,
|
|
2406
2414
|
usersIds: F,
|
|
2407
|
-
pagination: { page: 0, pageSize: s?.pageSize ||
|
|
2408
|
-
},
|
|
2415
|
+
pagination: { page: 0, pageSize: s?.pageSize || $r.pageSize }
|
|
2416
|
+
}, N = await p(x);
|
|
2409
2417
|
h.set({
|
|
2410
|
-
data:
|
|
2418
|
+
data: N.data.map((I) => I.attributes),
|
|
2411
2419
|
hasMore: !0,
|
|
2412
2420
|
key: Date.now(),
|
|
2413
2421
|
loading: !1
|
|
2414
|
-
}),
|
|
2422
|
+
}), N.meta && (u = Math.round(N.meta.count / N.meta.pageSize)), c.set(x.pagination);
|
|
2415
2423
|
}
|
|
2416
2424
|
}, f = () => {
|
|
2417
2425
|
m();
|
|
2418
2426
|
}, w = (E) => {
|
|
2419
|
-
const F = c.get(),
|
|
2420
|
-
|
|
2427
|
+
const F = c.get(), _ = E || F.page + 1;
|
|
2428
|
+
_ <= u && c.set({ ...F, page: _ });
|
|
2421
2429
|
};
|
|
2422
|
-
return
|
|
2423
|
-
const E = e.listen(m), F = i.listen(m),
|
|
2424
|
-
const
|
|
2425
|
-
if (x.page > 0 &&
|
|
2430
|
+
return un(h, () => {
|
|
2431
|
+
const E = e.listen(m), F = i.listen(m), _ = c.listen(async (x) => {
|
|
2432
|
+
const N = e.get();
|
|
2433
|
+
if (x.page > 0 && N)
|
|
2426
2434
|
if (x.page < u) {
|
|
2427
2435
|
h.setKey("loading", !0);
|
|
2428
2436
|
const T = await p({
|
|
2429
|
-
eventId:
|
|
2437
|
+
eventId: N,
|
|
2430
2438
|
pagination: x
|
|
2431
2439
|
}), j = h.get().data || [];
|
|
2432
2440
|
h.set({
|
|
@@ -2439,46 +2447,53 @@ const Dr = {
|
|
|
2439
2447
|
h.setKey("hasMore", !1);
|
|
2440
2448
|
});
|
|
2441
2449
|
return () => {
|
|
2442
|
-
E(), F(),
|
|
2450
|
+
E(), F(), _();
|
|
2443
2451
|
};
|
|
2444
2452
|
}), { $store: h, fetchMore: w, invalidate: f };
|
|
2445
|
-
},
|
|
2453
|
+
}, bo = (t, e) => {
|
|
2446
2454
|
const { client: r, queryKey: i } = t.createPromiseClient(pt, {
|
|
2447
2455
|
method: "generateDeepLink",
|
|
2448
2456
|
params: e
|
|
2449
2457
|
});
|
|
2450
2458
|
return t.nanoquery.createFetcherStore(i, {
|
|
2451
|
-
fetcher: async (s, u, c) => c ? (await r.generateDeepLink({
|
|
2459
|
+
fetcher: async (s, u, c, h) => c ? (await r.generateDeepLink({
|
|
2460
|
+
data: { gamification: !0, externalEventId: h, eventId: c }
|
|
2461
|
+
})).data?.attributes : {}
|
|
2452
2462
|
});
|
|
2453
|
-
},
|
|
2454
|
-
const { client: i } = t.createPromiseClient(
|
|
2463
|
+
}, vo = (t, { web: e, mobile: r }) => {
|
|
2464
|
+
const { client: i } = t.createPromiseClient(ai, { method: "generate" });
|
|
2455
2465
|
return i.generate({ web: e, mobile: r });
|
|
2456
|
-
},
|
|
2457
|
-
const
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2466
|
+
}, Ur = (t, e) => {
|
|
2467
|
+
const r = new URLSearchParams(t);
|
|
2468
|
+
for (const [i, s] of Object.entries(e))
|
|
2469
|
+
r.append(i, s);
|
|
2470
|
+
return r.toString();
|
|
2471
|
+
}, So = (t, e, r, i) => {
|
|
2472
|
+
const s = Te({});
|
|
2473
|
+
return un(s, () => bo(t, [e, r]).subscribe(async ({ data: h, error: p, loading: m }) => {
|
|
2474
|
+
const f = p ? "https://masters.com" : h?.url, w = i.get() || "", E = e.get() || "", F = r.get() || "", _ = {
|
|
2475
|
+
[hr]: w,
|
|
2476
|
+
[yn]: E,
|
|
2477
|
+
[gn]: F
|
|
2478
|
+
};
|
|
2479
|
+
if (!m && f) {
|
|
2480
|
+
s.setKey("loading", !0);
|
|
2481
|
+
let x = window.location.search, N = window.location.hash;
|
|
2482
|
+
x && N || N ? x = `?${Ur(x, _)}` : N = `#${Ur("", _)}`;
|
|
2483
|
+
const I = window.location.origin + window.location.pathname + x + N, T = await vo(t, { web: I, mobile: f });
|
|
2484
|
+
s.set({
|
|
2485
|
+
data: T.data?.link,
|
|
2471
2486
|
loading: !1
|
|
2472
2487
|
});
|
|
2473
2488
|
} else
|
|
2474
|
-
|
|
2475
|
-
})), { $store:
|
|
2489
|
+
s.setKey("loading", !0);
|
|
2490
|
+
})), { $store: s, fetch };
|
|
2476
2491
|
};
|
|
2477
2492
|
var ee;
|
|
2478
2493
|
(function(t) {
|
|
2479
2494
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2480
2495
|
})(ee || (ee = {}));
|
|
2481
|
-
const
|
|
2496
|
+
const Ao = (t, e, r, i) => {
|
|
2482
2497
|
const { inplayGame: s } = t.featureSettings.get(), u = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2483
2498
|
s && r.add({
|
|
2484
2499
|
type: je.ONBOARDING,
|
|
@@ -2521,11 +2536,11 @@ const wo = (t, e, r, i) => {
|
|
|
2521
2536
|
} catch (c) {
|
|
2522
2537
|
console.error(c);
|
|
2523
2538
|
}
|
|
2524
|
-
},
|
|
2539
|
+
}, Eo = (t, e, r, i) => {
|
|
2525
2540
|
let s = !1;
|
|
2526
|
-
const u = new
|
|
2541
|
+
const u = new An(), c = re(ee.Unset);
|
|
2527
2542
|
c.subscribe((m) => {
|
|
2528
|
-
m !== ee.Unset && ((m === ee.Optional || m === ee.Required) && s === !1 && (
|
|
2543
|
+
m !== ee.Unset && ((m === ee.Optional || m === ee.Required) && s === !1 && (Ao(t, e, i, u), s = !0), m === ee.Completed && e.activeQuestionId.invalidate(), u.setOnboardingInstantOpen({
|
|
2529
2544
|
userId: e.userId.get() || "",
|
|
2530
2545
|
organizationId: e.organizationId.get() || "",
|
|
2531
2546
|
eventId: e.slStreamId.get() || ""
|
|
@@ -2541,7 +2556,7 @@ const wo = (t, e, r, i) => {
|
|
|
2541
2556
|
}))), { $store: c, submitInplay: async () => {
|
|
2542
2557
|
const m = e.slStreamId.get();
|
|
2543
2558
|
if (m) {
|
|
2544
|
-
await
|
|
2559
|
+
await go(r, m), c.set(ee.Completed), u.saveOnboardingStatus({
|
|
2545
2560
|
organizationId: e.organizationId.get() || "",
|
|
2546
2561
|
userId: e.userId.get() || "",
|
|
2547
2562
|
eventId: m
|
|
@@ -2550,8 +2565,8 @@ const wo = (t, e, r, i) => {
|
|
|
2550
2565
|
i.close(f);
|
|
2551
2566
|
}
|
|
2552
2567
|
} };
|
|
2553
|
-
},
|
|
2554
|
-
class
|
|
2568
|
+
}, Io = /* @__PURE__ */ new Set([fe.POLL, fe.PREDICTION, fe.TRIVIA]);
|
|
2569
|
+
class Fo extends pn {
|
|
2555
2570
|
/** user statistics (leaderboard panel) */
|
|
2556
2571
|
userSummary;
|
|
2557
2572
|
/** feed list (pick history) */
|
|
@@ -2580,7 +2595,7 @@ class So extends dn {
|
|
|
2580
2595
|
/** Browser cache */
|
|
2581
2596
|
storage;
|
|
2582
2597
|
constructor(e, r, i) {
|
|
2583
|
-
super(e, r), this.background = new
|
|
2598
|
+
super(e, r), this.background = new co(i), this.storage = new An(), this.userSummary = new de(Mi(this.background.slStreamId, this.background.userId, i.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.friends = new de(qi(this.background.userId, i.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = re(void 0), this.leaderboardId = new se(re(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Eo(this, this.background, i.transport, i.notifications), this.notifications = i.notifications, this.transport = i.transport, this.closeFeature = () => i.sdk.closeFeature(!0), this.openFeature = () => i.sdk.openFeature(Fe.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = So(this.transport, this.background.slStreamId, i.stores.providerStreamId.getStore(), this.background.userId), this.leaderboardList = wo(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.status.subscribe((s) => {
|
|
2584
2599
|
s === tt.Ready ? this.connect(i.transport) : this.disconnect();
|
|
2585
2600
|
}), this.userSummary.listen((s) => {
|
|
2586
2601
|
this.leaderboardList.$store.lc !== 0 && s?.data?.summary && window.requestAnimationFrame(() => {
|
|
@@ -2605,7 +2620,7 @@ class So extends dn {
|
|
|
2605
2620
|
if (s === ft.RESOLVED && u === fe.PREDICTION) {
|
|
2606
2621
|
const h = this.background.getCurrentSessionId({
|
|
2607
2622
|
prefix: `notification-id:${c}`
|
|
2608
|
-
}), p = await
|
|
2623
|
+
}), p = await wn(c, e), m = p?.answers.find(({ correct: w }) => w), f = p?.answers.find(({ youVoted: w }) => w);
|
|
2609
2624
|
if (!f)
|
|
2610
2625
|
return;
|
|
2611
2626
|
this.notifications.add({
|
|
@@ -2641,10 +2656,10 @@ class So extends dn {
|
|
|
2641
2656
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2642
2657
|
};
|
|
2643
2658
|
submitAnswer = async (e, r) => {
|
|
2644
|
-
await
|
|
2659
|
+
await yo(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2645
2660
|
};
|
|
2646
2661
|
skipQuestion = async (e) => {
|
|
2647
|
-
await
|
|
2662
|
+
await mo(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2648
2663
|
};
|
|
2649
2664
|
openQuestion = (e) => (this.openFeature(), this.notifications.close(this.background.getCurrentSessionId({
|
|
2650
2665
|
prefix: "notification",
|
|
@@ -2666,8 +2681,8 @@ class So extends dn {
|
|
|
2666
2681
|
*/
|
|
2667
2682
|
showInApp = (e) => {
|
|
2668
2683
|
const r = this.onboardingStatus.$store.get();
|
|
2669
|
-
if (e && e.data && r && r !== ee.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !==
|
|
2670
|
-
if (
|
|
2684
|
+
if (e && e.data && r && r !== ee.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== ni.ON && e.data.question.status === ft.ACTIVE) {
|
|
2685
|
+
if (Io.has(e.data.question.type))
|
|
2671
2686
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2672
2687
|
type: je.QUESTION,
|
|
2673
2688
|
action: () => e.data?.question && this.openQuestion(e.data.question.id),
|
|
@@ -2688,6 +2703,7 @@ class So extends dn {
|
|
|
2688
2703
|
const i = e.data.question.options?.options.value, s = {
|
|
2689
2704
|
heading: e.data.question.notification.title,
|
|
2690
2705
|
body: e.data.question.notification.body,
|
|
2706
|
+
imageMode: e.data.question.notification.imageMode,
|
|
2691
2707
|
image: i?.image,
|
|
2692
2708
|
video: {
|
|
2693
2709
|
id: i?.video?.id || "",
|
|
@@ -2716,7 +2732,8 @@ class So extends dn {
|
|
|
2716
2732
|
body: e.data.question.notification?.body,
|
|
2717
2733
|
image: e.data.question.notification?.image,
|
|
2718
2734
|
account: i?.tweetMeta?.account || "",
|
|
2719
|
-
accountVerified: !!i?.tweetMeta?.accountVerified
|
|
2735
|
+
accountVerified: !!i?.tweetMeta?.accountVerified,
|
|
2736
|
+
tweet: i?.tweetMeta?.tweet
|
|
2720
2737
|
};
|
|
2721
2738
|
this.notifications.add({
|
|
2722
2739
|
type: je.QUESTION,
|
|
@@ -2733,25 +2750,23 @@ class So extends dn {
|
|
|
2733
2750
|
}
|
|
2734
2751
|
};
|
|
2735
2752
|
}
|
|
2736
|
-
const
|
|
2753
|
+
const Oo = {
|
|
2737
2754
|
[Fe.GAMES]: !0
|
|
2738
2755
|
};
|
|
2739
|
-
class
|
|
2756
|
+
class To extends pn {
|
|
2740
2757
|
constructor(e, r) {
|
|
2741
2758
|
super(e, r);
|
|
2742
2759
|
}
|
|
2743
2760
|
}
|
|
2744
|
-
const
|
|
2761
|
+
const _o = (t, e, r) => t.type === Fe.GAMES ? new Fo(t, e, r) : new To(t, e), Co = (t, e, r) => {
|
|
2745
2762
|
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new se(re(Fe.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (i) => t.features.get(i), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (i) => {
|
|
2746
2763
|
t.activeFeature.setValue(i);
|
|
2747
2764
|
}, t.sdk.closeFeature = (i = !1) => {
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
t.activeFeature.setValue(Fe.UNSET), s && t.features.delete(s);
|
|
2751
|
-
}
|
|
2765
|
+
const s = t.activeFeature.getValue();
|
|
2766
|
+
t.activeFeature.setValue(Fe.UNSET), i && s && t.features.delete(s);
|
|
2752
2767
|
}, t.initFeature = (i, s = Ee.ORGANIZATION) => {
|
|
2753
|
-
if (i.type in
|
|
2754
|
-
const u =
|
|
2768
|
+
if (i.type in Oo && !t.features.has(i.type)) {
|
|
2769
|
+
const u = _o(i, s, t);
|
|
2755
2770
|
t.features.set(i.type, u);
|
|
2756
2771
|
}
|
|
2757
2772
|
}, t.updateFeature = (i, s) => {
|
|
@@ -2801,7 +2816,7 @@ const Io = (t, e, r) => t.type === Fe.GAMES ? new So(t, e, r) : new Eo(t, e), Fo
|
|
|
2801
2816
|
}, r();
|
|
2802
2817
|
};
|
|
2803
2818
|
var mr = { exports: {} }, wr = { exports: {} };
|
|
2804
|
-
function
|
|
2819
|
+
function xo(t) {
|
|
2805
2820
|
var e = new t(), r = e;
|
|
2806
2821
|
function i() {
|
|
2807
2822
|
var u = e;
|
|
@@ -2815,11 +2830,11 @@ function Oo(t) {
|
|
|
2815
2830
|
release: s
|
|
2816
2831
|
};
|
|
2817
2832
|
}
|
|
2818
|
-
var
|
|
2819
|
-
function
|
|
2833
|
+
var ko = xo, Bo = ko;
|
|
2834
|
+
function En(t, e, r) {
|
|
2820
2835
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2821
2836
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2822
|
-
var i =
|
|
2837
|
+
var i = Bo(Lo), s = null, u = null, c = 0, h = null, p = {
|
|
2823
2838
|
push: x,
|
|
2824
2839
|
drain: oe,
|
|
2825
2840
|
saturated: oe,
|
|
@@ -2828,10 +2843,10 @@ function bn(t, e, r) {
|
|
|
2828
2843
|
concurrency: r,
|
|
2829
2844
|
running: m,
|
|
2830
2845
|
resume: F,
|
|
2831
|
-
idle:
|
|
2846
|
+
idle: _,
|
|
2832
2847
|
length: w,
|
|
2833
2848
|
getQueue: E,
|
|
2834
|
-
unshift:
|
|
2849
|
+
unshift: N,
|
|
2835
2850
|
empty: oe,
|
|
2836
2851
|
kill: T,
|
|
2837
2852
|
killAndDrain: j,
|
|
@@ -2845,35 +2860,35 @@ function bn(t, e, r) {
|
|
|
2845
2860
|
p.paused = !0;
|
|
2846
2861
|
}
|
|
2847
2862
|
function w() {
|
|
2848
|
-
for (var
|
|
2849
|
-
|
|
2863
|
+
for (var C = s, k = 0; C; )
|
|
2864
|
+
C = C.next, k++;
|
|
2850
2865
|
return k;
|
|
2851
2866
|
}
|
|
2852
2867
|
function E() {
|
|
2853
|
-
for (var
|
|
2854
|
-
k.push(
|
|
2868
|
+
for (var C = s, k = []; C; )
|
|
2869
|
+
k.push(C.value), C = C.next;
|
|
2855
2870
|
return k;
|
|
2856
2871
|
}
|
|
2857
2872
|
function F() {
|
|
2858
2873
|
if (p.paused) {
|
|
2859
2874
|
p.paused = !1;
|
|
2860
|
-
for (var
|
|
2875
|
+
for (var C = 0; C < p.concurrency; C++)
|
|
2861
2876
|
c++, I();
|
|
2862
2877
|
}
|
|
2863
2878
|
}
|
|
2864
|
-
function
|
|
2879
|
+
function _() {
|
|
2865
2880
|
return c === 0 && p.length() === 0;
|
|
2866
2881
|
}
|
|
2867
|
-
function x(
|
|
2882
|
+
function x(C, k) {
|
|
2868
2883
|
var B = i.get();
|
|
2869
|
-
B.context = t, B.release = I, B.value =
|
|
2884
|
+
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler = h, c === p.concurrency || p.paused ? u ? (u.next = B, u = B) : (s = B, u = B, p.saturated()) : (c++, e.call(t, B.value, B.worked));
|
|
2870
2885
|
}
|
|
2871
|
-
function
|
|
2886
|
+
function N(C, k) {
|
|
2872
2887
|
var B = i.get();
|
|
2873
|
-
B.context = t, B.release = I, B.value =
|
|
2888
|
+
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler = h, c === p.concurrency || p.paused ? s ? (B.next = s, s = B) : (s = B, u = B, p.saturated()) : (c++, e.call(t, B.value, B.worked));
|
|
2874
2889
|
}
|
|
2875
|
-
function I(
|
|
2876
|
-
|
|
2890
|
+
function I(C) {
|
|
2891
|
+
C && i.release(C);
|
|
2877
2892
|
var k = s;
|
|
2878
2893
|
k ? p.paused ? c-- : (u === s && (u = null), s = k.next, k.next = null, e.call(t, k.value, k.worked), u === null && p.empty()) : --c === 0 && p.drain();
|
|
2879
2894
|
}
|
|
@@ -2883,13 +2898,13 @@ function bn(t, e, r) {
|
|
|
2883
2898
|
function j() {
|
|
2884
2899
|
s = null, u = null, p.drain(), p.drain = oe;
|
|
2885
2900
|
}
|
|
2886
|
-
function P(
|
|
2887
|
-
h =
|
|
2901
|
+
function P(C) {
|
|
2902
|
+
h = C;
|
|
2888
2903
|
}
|
|
2889
2904
|
}
|
|
2890
2905
|
function oe() {
|
|
2891
2906
|
}
|
|
2892
|
-
function
|
|
2907
|
+
function Lo() {
|
|
2893
2908
|
this.value = null, this.callback = oe, this.next = null, this.release = oe, this.context = null, this.errorHandler = null;
|
|
2894
2909
|
var t = this;
|
|
2895
2910
|
this.worked = function(r, i) {
|
|
@@ -2897,20 +2912,20 @@ function Co() {
|
|
|
2897
2912
|
t.value = null, t.callback = oe, t.errorHandler && u(r, c), s.call(t.context, r, i), t.release(t);
|
|
2898
2913
|
};
|
|
2899
2914
|
}
|
|
2900
|
-
function
|
|
2915
|
+
function Po(t, e, r) {
|
|
2901
2916
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2902
2917
|
function i(f, w) {
|
|
2903
2918
|
e.call(this, f).then(function(E) {
|
|
2904
2919
|
w(null, E);
|
|
2905
2920
|
}, w);
|
|
2906
2921
|
}
|
|
2907
|
-
var s =
|
|
2922
|
+
var s = En(t, i, r), u = s.push, c = s.unshift;
|
|
2908
2923
|
return s.push = h, s.unshift = p, s.drained = m, s;
|
|
2909
2924
|
function h(f) {
|
|
2910
2925
|
var w = new Promise(function(E, F) {
|
|
2911
|
-
u(f, function(
|
|
2912
|
-
if (
|
|
2913
|
-
F(
|
|
2926
|
+
u(f, function(_, x) {
|
|
2927
|
+
if (_) {
|
|
2928
|
+
F(_);
|
|
2914
2929
|
return;
|
|
2915
2930
|
}
|
|
2916
2931
|
E(x);
|
|
@@ -2920,9 +2935,9 @@ function xo(t, e, r) {
|
|
|
2920
2935
|
}
|
|
2921
2936
|
function p(f) {
|
|
2922
2937
|
var w = new Promise(function(E, F) {
|
|
2923
|
-
c(f, function(
|
|
2924
|
-
if (
|
|
2925
|
-
F(
|
|
2938
|
+
c(f, function(_, x) {
|
|
2939
|
+
if (_) {
|
|
2940
|
+
F(_);
|
|
2926
2941
|
return;
|
|
2927
2942
|
}
|
|
2928
2943
|
E(x);
|
|
@@ -2943,9 +2958,9 @@ function xo(t, e, r) {
|
|
|
2943
2958
|
return w;
|
|
2944
2959
|
}
|
|
2945
2960
|
}
|
|
2946
|
-
wr.exports =
|
|
2947
|
-
wr.exports.promise =
|
|
2948
|
-
var
|
|
2961
|
+
wr.exports = En;
|
|
2962
|
+
wr.exports.promise = Po;
|
|
2963
|
+
var In = wr.exports, br = { exports: {} }, rt = typeof Reflect == "object" ? Reflect : null, jr = rt && typeof rt.apply == "function" ? rt.apply : function(e, r, i) {
|
|
2949
2964
|
return Function.prototype.apply.call(e, r, i);
|
|
2950
2965
|
}, bt;
|
|
2951
2966
|
rt && typeof rt.ownKeys == "function" ? bt = rt.ownKeys : Object.getOwnPropertySymbols ? bt = function(e) {
|
|
@@ -2953,50 +2968,50 @@ rt && typeof rt.ownKeys == "function" ? bt = rt.ownKeys : Object.getOwnPropertyS
|
|
|
2953
2968
|
} : bt = function(e) {
|
|
2954
2969
|
return Object.getOwnPropertyNames(e);
|
|
2955
2970
|
};
|
|
2956
|
-
function
|
|
2971
|
+
function Ro(t) {
|
|
2957
2972
|
console && console.warn && console.warn(t);
|
|
2958
2973
|
}
|
|
2959
|
-
var
|
|
2974
|
+
var Fn = Number.isNaN || function(e) {
|
|
2960
2975
|
return e !== e;
|
|
2961
2976
|
};
|
|
2962
2977
|
function G() {
|
|
2963
2978
|
G.init.call(this);
|
|
2964
2979
|
}
|
|
2965
2980
|
br.exports = G;
|
|
2966
|
-
br.exports.once =
|
|
2981
|
+
br.exports.once = Uo;
|
|
2967
2982
|
G.EventEmitter = G;
|
|
2968
2983
|
G.prototype._events = void 0;
|
|
2969
2984
|
G.prototype._eventsCount = 0;
|
|
2970
2985
|
G.prototype._maxListeners = void 0;
|
|
2971
|
-
var
|
|
2972
|
-
function
|
|
2986
|
+
var Mr = 10;
|
|
2987
|
+
function Pt(t) {
|
|
2973
2988
|
if (typeof t != "function")
|
|
2974
2989
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
2975
2990
|
}
|
|
2976
2991
|
Object.defineProperty(G, "defaultMaxListeners", {
|
|
2977
2992
|
enumerable: !0,
|
|
2978
2993
|
get: function() {
|
|
2979
|
-
return
|
|
2994
|
+
return Mr;
|
|
2980
2995
|
},
|
|
2981
2996
|
set: function(t) {
|
|
2982
|
-
if (typeof t != "number" || t < 0 ||
|
|
2997
|
+
if (typeof t != "number" || t < 0 || Fn(t))
|
|
2983
2998
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2984
|
-
|
|
2999
|
+
Mr = t;
|
|
2985
3000
|
}
|
|
2986
3001
|
});
|
|
2987
3002
|
G.init = function() {
|
|
2988
3003
|
(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;
|
|
2989
3004
|
};
|
|
2990
3005
|
G.prototype.setMaxListeners = function(e) {
|
|
2991
|
-
if (typeof e != "number" || e < 0 ||
|
|
3006
|
+
if (typeof e != "number" || e < 0 || Fn(e))
|
|
2992
3007
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2993
3008
|
return this._maxListeners = e, this;
|
|
2994
3009
|
};
|
|
2995
|
-
function
|
|
3010
|
+
function On(t) {
|
|
2996
3011
|
return t._maxListeners === void 0 ? G.defaultMaxListeners : t._maxListeners;
|
|
2997
3012
|
}
|
|
2998
3013
|
G.prototype.getMaxListeners = function() {
|
|
2999
|
-
return
|
|
3014
|
+
return On(this);
|
|
3000
3015
|
};
|
|
3001
3016
|
G.prototype.emit = function(e) {
|
|
3002
3017
|
for (var r = [], i = 1; i < arguments.length; i++)
|
|
@@ -3017,51 +3032,51 @@ G.prototype.emit = function(e) {
|
|
|
3017
3032
|
if (p === void 0)
|
|
3018
3033
|
return !1;
|
|
3019
3034
|
if (typeof p == "function")
|
|
3020
|
-
|
|
3035
|
+
jr(p, this, r);
|
|
3021
3036
|
else
|
|
3022
|
-
for (var m = p.length, f =
|
|
3023
|
-
|
|
3037
|
+
for (var m = p.length, f = kn(p, m), i = 0; i < m; ++i)
|
|
3038
|
+
jr(f[i], this, r);
|
|
3024
3039
|
return !0;
|
|
3025
3040
|
};
|
|
3026
|
-
function
|
|
3041
|
+
function Tn(t, e, r, i) {
|
|
3027
3042
|
var s, u, c;
|
|
3028
|
-
if (
|
|
3043
|
+
if (Pt(r), u = t._events, u === void 0 ? (u = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (u.newListener !== void 0 && (t.emit(
|
|
3029
3044
|
"newListener",
|
|
3030
3045
|
e,
|
|
3031
3046
|
r.listener ? r.listener : r
|
|
3032
3047
|
), u = t._events), c = u[e]), c === void 0)
|
|
3033
3048
|
c = u[e] = r, ++t._eventsCount;
|
|
3034
|
-
else if (typeof c == "function" ? c = u[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s =
|
|
3049
|
+
else if (typeof c == "function" ? c = u[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s = On(t), s > 0 && c.length > s && !c.warned) {
|
|
3035
3050
|
c.warned = !0;
|
|
3036
3051
|
var h = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3037
|
-
h.name = "MaxListenersExceededWarning", h.emitter = t, h.type = e, h.count = c.length,
|
|
3052
|
+
h.name = "MaxListenersExceededWarning", h.emitter = t, h.type = e, h.count = c.length, Ro(h);
|
|
3038
3053
|
}
|
|
3039
3054
|
return t;
|
|
3040
3055
|
}
|
|
3041
3056
|
G.prototype.addListener = function(e, r) {
|
|
3042
|
-
return
|
|
3057
|
+
return Tn(this, e, r, !1);
|
|
3043
3058
|
};
|
|
3044
3059
|
G.prototype.on = G.prototype.addListener;
|
|
3045
3060
|
G.prototype.prependListener = function(e, r) {
|
|
3046
|
-
return
|
|
3061
|
+
return Tn(this, e, r, !0);
|
|
3047
3062
|
};
|
|
3048
|
-
function
|
|
3063
|
+
function No() {
|
|
3049
3064
|
if (!this.fired)
|
|
3050
3065
|
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);
|
|
3051
3066
|
}
|
|
3052
|
-
function
|
|
3053
|
-
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
3067
|
+
function _n(t, e, r) {
|
|
3068
|
+
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = No.bind(i);
|
|
3054
3069
|
return s.listener = r, i.wrapFn = s, s;
|
|
3055
3070
|
}
|
|
3056
3071
|
G.prototype.once = function(e, r) {
|
|
3057
|
-
return
|
|
3072
|
+
return Pt(r), this.on(e, _n(this, e, r)), this;
|
|
3058
3073
|
};
|
|
3059
3074
|
G.prototype.prependOnceListener = function(e, r) {
|
|
3060
|
-
return
|
|
3075
|
+
return Pt(r), this.prependListener(e, _n(this, e, r)), this;
|
|
3061
3076
|
};
|
|
3062
3077
|
G.prototype.removeListener = function(e, r) {
|
|
3063
3078
|
var i, s, u, c, h;
|
|
3064
|
-
if (
|
|
3079
|
+
if (Pt(r), s = this._events, s === void 0)
|
|
3065
3080
|
return this;
|
|
3066
3081
|
if (i = s[e], i === void 0)
|
|
3067
3082
|
return this;
|
|
@@ -3075,7 +3090,7 @@ G.prototype.removeListener = function(e, r) {
|
|
|
3075
3090
|
}
|
|
3076
3091
|
if (u < 0)
|
|
3077
3092
|
return this;
|
|
3078
|
-
u === 0 ? i.shift() :
|
|
3093
|
+
u === 0 ? i.shift() : Do(i, u), i.length === 1 && (s[e] = i[0]), s.removeListener !== void 0 && this.emit("removeListener", e, h || r);
|
|
3079
3094
|
}
|
|
3080
3095
|
return this;
|
|
3081
3096
|
};
|
|
@@ -3099,24 +3114,24 @@ G.prototype.removeAllListeners = function(e) {
|
|
|
3099
3114
|
this.removeListener(e, r[s]);
|
|
3100
3115
|
return this;
|
|
3101
3116
|
};
|
|
3102
|
-
function
|
|
3117
|
+
function Cn(t, e, r) {
|
|
3103
3118
|
var i = t._events;
|
|
3104
3119
|
if (i === void 0)
|
|
3105
3120
|
return [];
|
|
3106
3121
|
var s = i[e];
|
|
3107
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
3122
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? $o(s) : kn(s, s.length);
|
|
3108
3123
|
}
|
|
3109
3124
|
G.prototype.listeners = function(e) {
|
|
3110
|
-
return
|
|
3125
|
+
return Cn(this, e, !0);
|
|
3111
3126
|
};
|
|
3112
3127
|
G.prototype.rawListeners = function(e) {
|
|
3113
|
-
return
|
|
3128
|
+
return Cn(this, e, !1);
|
|
3114
3129
|
};
|
|
3115
3130
|
G.listenerCount = function(t, e) {
|
|
3116
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
3131
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : xn.call(t, e);
|
|
3117
3132
|
};
|
|
3118
|
-
G.prototype.listenerCount =
|
|
3119
|
-
function
|
|
3133
|
+
G.prototype.listenerCount = xn;
|
|
3134
|
+
function xn(t) {
|
|
3120
3135
|
var e = this._events;
|
|
3121
3136
|
if (e !== void 0) {
|
|
3122
3137
|
var r = e[t];
|
|
@@ -3130,22 +3145,22 @@ function On(t) {
|
|
|
3130
3145
|
G.prototype.eventNames = function() {
|
|
3131
3146
|
return this._eventsCount > 0 ? bt(this._events) : [];
|
|
3132
3147
|
};
|
|
3133
|
-
function
|
|
3148
|
+
function kn(t, e) {
|
|
3134
3149
|
for (var r = new Array(e), i = 0; i < e; ++i)
|
|
3135
3150
|
r[i] = t[i];
|
|
3136
3151
|
return r;
|
|
3137
3152
|
}
|
|
3138
|
-
function
|
|
3153
|
+
function Do(t, e) {
|
|
3139
3154
|
for (; e + 1 < t.length; e++)
|
|
3140
3155
|
t[e] = t[e + 1];
|
|
3141
3156
|
t.pop();
|
|
3142
3157
|
}
|
|
3143
|
-
function
|
|
3158
|
+
function $o(t) {
|
|
3144
3159
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3145
3160
|
e[r] = t[r].listener || t[r];
|
|
3146
3161
|
return e;
|
|
3147
3162
|
}
|
|
3148
|
-
function
|
|
3163
|
+
function Uo(t, e) {
|
|
3149
3164
|
return new Promise(function(r, i) {
|
|
3150
3165
|
function s(c) {
|
|
3151
3166
|
t.removeListener(e, u), i(c);
|
|
@@ -3153,13 +3168,13 @@ function Ro(t, e) {
|
|
|
3153
3168
|
function u() {
|
|
3154
3169
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
3155
3170
|
}
|
|
3156
|
-
|
|
3171
|
+
Bn(t, e, u, { once: !0 }), e !== "error" && jo(t, s, { once: !0 });
|
|
3157
3172
|
});
|
|
3158
3173
|
}
|
|
3159
|
-
function
|
|
3160
|
-
typeof t.on == "function" &&
|
|
3174
|
+
function jo(t, e, r) {
|
|
3175
|
+
typeof t.on == "function" && Bn(t, "error", e, r);
|
|
3161
3176
|
}
|
|
3162
|
-
function
|
|
3177
|
+
function Bn(t, e, r, i) {
|
|
3163
3178
|
if (typeof t.on == "function")
|
|
3164
3179
|
i.once ? t.once(e, r) : t.on(e, r);
|
|
3165
3180
|
else if (typeof t.addEventListener == "function")
|
|
@@ -3169,7 +3184,7 @@ function _n(t, e, r, i) {
|
|
|
3169
3184
|
else
|
|
3170
3185
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3171
3186
|
}
|
|
3172
|
-
var
|
|
3187
|
+
var Ln = br.exports, Rt = {}, Pn = {}, Rn = function() {
|
|
3173
3188
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3174
3189
|
return !1;
|
|
3175
3190
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3192,55 +3207,55 @@ var Cn = br.exports, Nt = {}, xn = {}, kn = function() {
|
|
|
3192
3207
|
return !1;
|
|
3193
3208
|
}
|
|
3194
3209
|
return !0;
|
|
3195
|
-
},
|
|
3196
|
-
return
|
|
3197
|
-
},
|
|
3198
|
-
return typeof
|
|
3199
|
-
},
|
|
3210
|
+
}, Mo = Rn, vr = function() {
|
|
3211
|
+
return Mo() && !!Symbol.toStringTag;
|
|
3212
|
+
}, Vr = typeof Symbol < "u" && Symbol, Vo = Rn, qo = function() {
|
|
3213
|
+
return typeof Vr != "function" || typeof Symbol != "function" || typeof Vr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Vo();
|
|
3214
|
+
}, qr = {
|
|
3200
3215
|
foo: {}
|
|
3201
|
-
},
|
|
3202
|
-
return { __proto__:
|
|
3203
|
-
},
|
|
3216
|
+
}, Qo = Object, Go = function() {
|
|
3217
|
+
return { __proto__: qr }.foo === qr.foo && !({ __proto__: null } instanceof Qo);
|
|
3218
|
+
}, zo = "Function.prototype.bind called on incompatible ", Ko = Object.prototype.toString, Wo = Math.max, Ho = "[object Function]", Qr = function(e, r) {
|
|
3204
3219
|
for (var i = [], s = 0; s < e.length; s += 1)
|
|
3205
3220
|
i[s] = e[s];
|
|
3206
3221
|
for (var u = 0; u < r.length; u += 1)
|
|
3207
3222
|
i[u + e.length] = r[u];
|
|
3208
3223
|
return i;
|
|
3209
|
-
},
|
|
3224
|
+
}, Jo = function(e, r) {
|
|
3210
3225
|
for (var i = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
|
|
3211
3226
|
i[u] = e[s];
|
|
3212
3227
|
return i;
|
|
3213
|
-
},
|
|
3228
|
+
}, Yo = function(t, e) {
|
|
3214
3229
|
for (var r = "", i = 0; i < t.length; i += 1)
|
|
3215
3230
|
r += t[i], i + 1 < t.length && (r += e);
|
|
3216
3231
|
return r;
|
|
3217
|
-
},
|
|
3232
|
+
}, Xo = function(e) {
|
|
3218
3233
|
var r = this;
|
|
3219
|
-
if (typeof r != "function" ||
|
|
3220
|
-
throw new TypeError(
|
|
3221
|
-
for (var i =
|
|
3234
|
+
if (typeof r != "function" || Ko.apply(r) !== Ho)
|
|
3235
|
+
throw new TypeError(zo + r);
|
|
3236
|
+
for (var i = Jo(arguments, 1), s, u = function() {
|
|
3222
3237
|
if (this instanceof s) {
|
|
3223
3238
|
var f = r.apply(
|
|
3224
3239
|
this,
|
|
3225
|
-
|
|
3240
|
+
Qr(i, arguments)
|
|
3226
3241
|
);
|
|
3227
3242
|
return Object(f) === f ? f : this;
|
|
3228
3243
|
}
|
|
3229
3244
|
return r.apply(
|
|
3230
3245
|
e,
|
|
3231
|
-
|
|
3246
|
+
Qr(i, arguments)
|
|
3232
3247
|
);
|
|
3233
|
-
}, c =
|
|
3248
|
+
}, c = Wo(0, r.length - i.length), h = [], p = 0; p < c; p++)
|
|
3234
3249
|
h[p] = "$" + p;
|
|
3235
|
-
if (s = Function("binder", "return function (" +
|
|
3250
|
+
if (s = Function("binder", "return function (" + Yo(h, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
|
|
3236
3251
|
var m = function() {
|
|
3237
3252
|
};
|
|
3238
3253
|
m.prototype = r.prototype, s.prototype = new m(), m.prototype = null;
|
|
3239
3254
|
}
|
|
3240
3255
|
return s;
|
|
3241
|
-
},
|
|
3256
|
+
}, Zo = Xo, Sr = Function.prototype.bind || Zo, es = Function.prototype.call, ts = Object.prototype.hasOwnProperty, rs = Sr, ns = rs.call(es, ts), U, it = SyntaxError, Nn = Function, nt = TypeError, jt = function(t) {
|
|
3242
3257
|
try {
|
|
3243
|
-
return
|
|
3258
|
+
return Nn('"use strict"; return (' + t + ").constructor;")();
|
|
3244
3259
|
} catch {
|
|
3245
3260
|
}
|
|
3246
3261
|
}, Ve = Object.getOwnPropertyDescriptor;
|
|
@@ -3250,21 +3265,21 @@ if (Ve)
|
|
|
3250
3265
|
} catch {
|
|
3251
3266
|
Ve = null;
|
|
3252
3267
|
}
|
|
3253
|
-
var
|
|
3268
|
+
var Mt = function() {
|
|
3254
3269
|
throw new nt();
|
|
3255
|
-
},
|
|
3270
|
+
}, is = Ve ? function() {
|
|
3256
3271
|
try {
|
|
3257
|
-
return arguments.callee,
|
|
3272
|
+
return arguments.callee, Mt;
|
|
3258
3273
|
} catch {
|
|
3259
3274
|
try {
|
|
3260
3275
|
return Ve(arguments, "callee").get;
|
|
3261
3276
|
} catch {
|
|
3262
|
-
return
|
|
3277
|
+
return Mt;
|
|
3263
3278
|
}
|
|
3264
3279
|
}
|
|
3265
|
-
}() :
|
|
3280
|
+
}() : Mt, Ke = qo(), os = Go(), X = Object.getPrototypeOf || (os ? function(t) {
|
|
3266
3281
|
return t.__proto__;
|
|
3267
|
-
} : null), He = {},
|
|
3282
|
+
} : null), He = {}, ss = typeof Uint8Array > "u" || !X ? U : X(Uint8Array), qe = {
|
|
3268
3283
|
"%AggregateError%": typeof AggregateError > "u" ? U : AggregateError,
|
|
3269
3284
|
"%Array%": Array,
|
|
3270
3285
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? U : ArrayBuffer,
|
|
@@ -3292,7 +3307,7 @@ var Vt = function() {
|
|
|
3292
3307
|
"%Float32Array%": typeof Float32Array > "u" ? U : Float32Array,
|
|
3293
3308
|
"%Float64Array%": typeof Float64Array > "u" ? U : Float64Array,
|
|
3294
3309
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? U : FinalizationRegistry,
|
|
3295
|
-
"%Function%":
|
|
3310
|
+
"%Function%": Nn,
|
|
3296
3311
|
"%GeneratorFunction%": He,
|
|
3297
3312
|
"%Int8Array%": typeof Int8Array > "u" ? U : Int8Array,
|
|
3298
3313
|
"%Int16Array%": typeof Int16Array > "u" ? U : Int16Array,
|
|
@@ -3321,8 +3336,8 @@ var Vt = function() {
|
|
|
3321
3336
|
"%StringIteratorPrototype%": Ke && X ? X(""[Symbol.iterator]()) : U,
|
|
3322
3337
|
"%Symbol%": Ke ? Symbol : U,
|
|
3323
3338
|
"%SyntaxError%": it,
|
|
3324
|
-
"%ThrowTypeError%":
|
|
3325
|
-
"%TypedArray%":
|
|
3339
|
+
"%ThrowTypeError%": is,
|
|
3340
|
+
"%TypedArray%": ss,
|
|
3326
3341
|
"%TypeError%": nt,
|
|
3327
3342
|
"%Uint8Array%": typeof Uint8Array > "u" ? U : Uint8Array,
|
|
3328
3343
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? U : Uint8ClampedArray,
|
|
@@ -3337,17 +3352,17 @@ if (X)
|
|
|
3337
3352
|
try {
|
|
3338
3353
|
null.error;
|
|
3339
3354
|
} catch (t) {
|
|
3340
|
-
var
|
|
3341
|
-
qe["%Error.prototype%"] =
|
|
3355
|
+
var as = X(X(t));
|
|
3356
|
+
qe["%Error.prototype%"] = as;
|
|
3342
3357
|
}
|
|
3343
|
-
var
|
|
3358
|
+
var us = function t(e) {
|
|
3344
3359
|
var r;
|
|
3345
3360
|
if (e === "%AsyncFunction%")
|
|
3346
|
-
r =
|
|
3361
|
+
r = jt("async function () {}");
|
|
3347
3362
|
else if (e === "%GeneratorFunction%")
|
|
3348
|
-
r =
|
|
3363
|
+
r = jt("function* () {}");
|
|
3349
3364
|
else if (e === "%AsyncGeneratorFunction%")
|
|
3350
|
-
r =
|
|
3365
|
+
r = jt("async function* () {}");
|
|
3351
3366
|
else if (e === "%AsyncGenerator%") {
|
|
3352
3367
|
var i = t("%AsyncGeneratorFunction%");
|
|
3353
3368
|
i && (r = i.prototype);
|
|
@@ -3356,7 +3371,7 @@ var is = function t(e) {
|
|
|
3356
3371
|
s && X && (r = X(s.prototype));
|
|
3357
3372
|
}
|
|
3358
3373
|
return qe[e] = r, r;
|
|
3359
|
-
},
|
|
3374
|
+
}, Gr = {
|
|
3360
3375
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3361
3376
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
3362
3377
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -3408,21 +3423,21 @@ var is = function t(e) {
|
|
|
3408
3423
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3409
3424
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3410
3425
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3411
|
-
}, yt = Sr,
|
|
3412
|
-
var r =
|
|
3426
|
+
}, yt = Sr, Ft = ns, cs = yt.call(Function.call, Array.prototype.concat), ls = yt.call(Function.apply, Array.prototype.splice), zr = yt.call(Function.call, String.prototype.replace), Ot = yt.call(Function.call, String.prototype.slice), fs = yt.call(Function.call, RegExp.prototype.exec), ds = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, hs = /\\(\\)?/g, ps = function(e) {
|
|
3427
|
+
var r = Ot(e, 0, 1), i = Ot(e, -1);
|
|
3413
3428
|
if (r === "%" && i !== "%")
|
|
3414
3429
|
throw new it("invalid intrinsic syntax, expected closing `%`");
|
|
3415
3430
|
if (i === "%" && r !== "%")
|
|
3416
3431
|
throw new it("invalid intrinsic syntax, expected opening `%`");
|
|
3417
3432
|
var s = [];
|
|
3418
|
-
return
|
|
3419
|
-
s[s.length] = h ?
|
|
3433
|
+
return zr(e, ds, function(u, c, h, p) {
|
|
3434
|
+
s[s.length] = h ? zr(p, hs, "$1") : c || u;
|
|
3420
3435
|
}), s;
|
|
3421
|
-
},
|
|
3436
|
+
}, ys = function(e, r) {
|
|
3422
3437
|
var i = e, s;
|
|
3423
|
-
if (
|
|
3438
|
+
if (Ft(Gr, i) && (s = Gr[i], i = "%" + s[0] + "%"), Ft(qe, i)) {
|
|
3424
3439
|
var u = qe[i];
|
|
3425
|
-
if (u === He && (u =
|
|
3440
|
+
if (u === He && (u = us(i)), typeof u > "u" && !r)
|
|
3426
3441
|
throw new nt("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3427
3442
|
return {
|
|
3428
3443
|
alias: s,
|
|
@@ -3436,15 +3451,15 @@ var is = function t(e) {
|
|
|
3436
3451
|
throw new nt("intrinsic name must be a non-empty string");
|
|
3437
3452
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3438
3453
|
throw new nt('"allowMissing" argument must be a boolean');
|
|
3439
|
-
if (
|
|
3454
|
+
if (fs(/^%?[^%]*%?$/, e) === null)
|
|
3440
3455
|
throw new it("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3441
|
-
var i =
|
|
3442
|
-
m && (s = m[0],
|
|
3456
|
+
var i = ps(e), s = i.length > 0 ? i[0] : "", u = ys("%" + s + "%", r), c = u.name, h = u.value, p = !1, m = u.alias;
|
|
3457
|
+
m && (s = m[0], ls(i, cs([0, 1], m)));
|
|
3443
3458
|
for (var f = 1, w = !0; f < i.length; f += 1) {
|
|
3444
|
-
var E = i[f], F =
|
|
3445
|
-
if ((F === '"' || F === "'" || F === "`" ||
|
|
3459
|
+
var E = i[f], F = Ot(E, 0, 1), _ = Ot(E, -1);
|
|
3460
|
+
if ((F === '"' || F === "'" || F === "`" || _ === '"' || _ === "'" || _ === "`") && F !== _)
|
|
3446
3461
|
throw new it("property names with quotes must have matching quotes");
|
|
3447
|
-
if ((E === "constructor" || !w) && (p = !0), s += "." + E, c = "%" + s + "%",
|
|
3462
|
+
if ((E === "constructor" || !w) && (p = !0), s += "." + E, c = "%" + s + "%", Ft(qe, c))
|
|
3448
3463
|
h = qe[c];
|
|
3449
3464
|
else if (h != null) {
|
|
3450
3465
|
if (!(E in h)) {
|
|
@@ -3456,44 +3471,44 @@ var is = function t(e) {
|
|
|
3456
3471
|
var x = Ve(h, E);
|
|
3457
3472
|
w = !!x, w && "get" in x && !("originalValue" in x.get) ? h = x.get : h = h[E];
|
|
3458
3473
|
} else
|
|
3459
|
-
w =
|
|
3474
|
+
w = Ft(h, E), h = h[E];
|
|
3460
3475
|
w && !p && (qe[c] = h);
|
|
3461
3476
|
}
|
|
3462
3477
|
}
|
|
3463
3478
|
return h;
|
|
3464
|
-
},
|
|
3465
|
-
if (
|
|
3479
|
+
}, Dn = { exports: {} }, gs = st, rr = gs("%Object.defineProperty%", !0), nr = function() {
|
|
3480
|
+
if (rr)
|
|
3466
3481
|
try {
|
|
3467
|
-
return
|
|
3482
|
+
return rr({}, "a", { value: 1 }), !0;
|
|
3468
3483
|
} catch {
|
|
3469
3484
|
return !1;
|
|
3470
3485
|
}
|
|
3471
3486
|
return !1;
|
|
3472
3487
|
};
|
|
3473
|
-
|
|
3474
|
-
if (!
|
|
3488
|
+
nr.hasArrayLengthDefineBug = function() {
|
|
3489
|
+
if (!nr())
|
|
3475
3490
|
return null;
|
|
3476
3491
|
try {
|
|
3477
|
-
return
|
|
3492
|
+
return rr([], "length", { value: 1 }).length !== 1;
|
|
3478
3493
|
} catch {
|
|
3479
3494
|
return !0;
|
|
3480
3495
|
}
|
|
3481
3496
|
};
|
|
3482
|
-
var
|
|
3497
|
+
var $n = nr, ms = st, vt = ms("%Object.getOwnPropertyDescriptor%", !0);
|
|
3483
3498
|
if (vt)
|
|
3484
3499
|
try {
|
|
3485
3500
|
vt([], "length");
|
|
3486
3501
|
} catch {
|
|
3487
3502
|
vt = null;
|
|
3488
3503
|
}
|
|
3489
|
-
var Ar = vt,
|
|
3504
|
+
var Ar = vt, ws = $n(), Er = st, dt = ws && Er("%Object.defineProperty%", !0);
|
|
3490
3505
|
if (dt)
|
|
3491
3506
|
try {
|
|
3492
3507
|
dt({}, "a", { value: 1 });
|
|
3493
3508
|
} catch {
|
|
3494
3509
|
dt = !1;
|
|
3495
3510
|
}
|
|
3496
|
-
var
|
|
3511
|
+
var bs = Er("%SyntaxError%"), We = Er("%TypeError%"), Kr = Ar, vs = function(e, r, i) {
|
|
3497
3512
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3498
3513
|
throw new We("`obj` must be an object or a function`");
|
|
3499
3514
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3506,7 +3521,7 @@ var ys = Er("%SyntaxError%"), We = Er("%TypeError%"), Gr = Ar, gs = function(e,
|
|
|
3506
3521
|
throw new We("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3507
3522
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3508
3523
|
throw new We("`loose`, if provided, must be a boolean");
|
|
3509
|
-
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, c = arguments.length > 5 ? arguments[5] : null, h = arguments.length > 6 ? arguments[6] : !1, p = !!
|
|
3524
|
+
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, c = arguments.length > 5 ? arguments[5] : null, h = arguments.length > 6 ? arguments[6] : !1, p = !!Kr && Kr(e, r);
|
|
3510
3525
|
if (dt)
|
|
3511
3526
|
dt(e, r, {
|
|
3512
3527
|
configurable: c === null && p ? p.configurable : !c,
|
|
@@ -3517,25 +3532,25 @@ var ys = Er("%SyntaxError%"), We = Er("%TypeError%"), Gr = Ar, gs = function(e,
|
|
|
3517
3532
|
else if (h || !s && !u && !c)
|
|
3518
3533
|
e[r] = i;
|
|
3519
3534
|
else
|
|
3520
|
-
throw new
|
|
3521
|
-
},
|
|
3535
|
+
throw new bs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3536
|
+
}, Un = st, Wr = vs, Ss = $n(), Hr = Ar, Jr = Un("%TypeError%"), As = Un("%Math.floor%"), Es = function(e, r) {
|
|
3522
3537
|
if (typeof e != "function")
|
|
3523
|
-
throw new
|
|
3524
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3525
|
-
throw new
|
|
3538
|
+
throw new Jr("`fn` is not a function");
|
|
3539
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || As(r) !== r)
|
|
3540
|
+
throw new Jr("`length` must be a positive 32-bit integer");
|
|
3526
3541
|
var i = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3527
|
-
if ("length" in e &&
|
|
3528
|
-
var c =
|
|
3542
|
+
if ("length" in e && Hr) {
|
|
3543
|
+
var c = Hr(e, "length");
|
|
3529
3544
|
c && !c.configurable && (s = !1), c && !c.writable && (u = !1);
|
|
3530
3545
|
}
|
|
3531
|
-
return (s || u || !i) && (
|
|
3546
|
+
return (s || u || !i) && (Ss ? Wr(
|
|
3532
3547
|
/** @type {Parameters<define>[0]} */
|
|
3533
3548
|
e,
|
|
3534
3549
|
"length",
|
|
3535
3550
|
r,
|
|
3536
3551
|
!0,
|
|
3537
3552
|
!0
|
|
3538
|
-
) :
|
|
3553
|
+
) : Wr(
|
|
3539
3554
|
/** @type {Parameters<define>[0]} */
|
|
3540
3555
|
e,
|
|
3541
3556
|
"length",
|
|
@@ -3543,7 +3558,7 @@ var ys = Er("%SyntaxError%"), We = Er("%TypeError%"), Gr = Ar, gs = function(e,
|
|
|
3543
3558
|
)), e;
|
|
3544
3559
|
};
|
|
3545
3560
|
(function(t) {
|
|
3546
|
-
var e = Sr, r = st, i =
|
|
3561
|
+
var e = Sr, r = st, i = Es, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), c = r("%Function.prototype.call%"), h = r("%Reflect.apply%", !0) || e.call(c, u), p = r("%Object.defineProperty%", !0), m = r("%Math.max%");
|
|
3547
3562
|
if (p)
|
|
3548
3563
|
try {
|
|
3549
3564
|
p({}, "a", { value: 1 });
|
|
@@ -3564,122 +3579,122 @@ var ys = Er("%SyntaxError%"), We = Er("%TypeError%"), Gr = Ar, gs = function(e,
|
|
|
3564
3579
|
return h(e, u, arguments);
|
|
3565
3580
|
};
|
|
3566
3581
|
p ? p(t.exports, "apply", { value: f }) : t.exports.apply = f;
|
|
3567
|
-
})(
|
|
3568
|
-
var
|
|
3569
|
-
var i =
|
|
3570
|
-
return typeof i == "function" &&
|
|
3571
|
-
},
|
|
3572
|
-
return
|
|
3573
|
-
},
|
|
3574
|
-
return
|
|
3575
|
-
},
|
|
3576
|
-
return
|
|
3582
|
+
})(Dn);
|
|
3583
|
+
var jn = Dn.exports, Mn = st, Vn = jn, Is = Vn(Mn("String.prototype.indexOf")), qn = function(e, r) {
|
|
3584
|
+
var i = Mn(e, !!r);
|
|
3585
|
+
return typeof i == "function" && Is(e, ".prototype.") > -1 ? Vn(i) : i;
|
|
3586
|
+
}, Fs = vr(), Os = qn, ir = Os("Object.prototype.toString"), Nt = function(e) {
|
|
3587
|
+
return Fs && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ir(e) === "[object Arguments]";
|
|
3588
|
+
}, Qn = function(e) {
|
|
3589
|
+
return Nt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ir(e) !== "[object Array]" && ir(e.callee) === "[object Function]";
|
|
3590
|
+
}, Ts = function() {
|
|
3591
|
+
return Nt(arguments);
|
|
3577
3592
|
}();
|
|
3578
|
-
|
|
3579
|
-
var
|
|
3580
|
-
if (!
|
|
3593
|
+
Nt.isLegacyArguments = Qn;
|
|
3594
|
+
var _s = Ts ? Nt : Qn, Cs = Object.prototype.toString, xs = Function.prototype.toString, ks = /^\s*(?:function)?\*/, Gn = vr(), Vt = Object.getPrototypeOf, Bs = function() {
|
|
3595
|
+
if (!Gn)
|
|
3581
3596
|
return !1;
|
|
3582
3597
|
try {
|
|
3583
3598
|
return Function("return function*() {}")();
|
|
3584
3599
|
} catch {
|
|
3585
3600
|
}
|
|
3586
|
-
},
|
|
3601
|
+
}, qt, Ls = function(e) {
|
|
3587
3602
|
if (typeof e != "function")
|
|
3588
3603
|
return !1;
|
|
3589
|
-
if (
|
|
3604
|
+
if (ks.test(xs.call(e)))
|
|
3590
3605
|
return !0;
|
|
3591
|
-
if (!
|
|
3592
|
-
var r =
|
|
3606
|
+
if (!Gn) {
|
|
3607
|
+
var r = Cs.call(e);
|
|
3593
3608
|
return r === "[object GeneratorFunction]";
|
|
3594
3609
|
}
|
|
3595
|
-
if (!
|
|
3610
|
+
if (!Vt)
|
|
3596
3611
|
return !1;
|
|
3597
|
-
if (typeof
|
|
3598
|
-
var i =
|
|
3599
|
-
|
|
3612
|
+
if (typeof qt > "u") {
|
|
3613
|
+
var i = Bs();
|
|
3614
|
+
qt = i ? Vt(i) : !1;
|
|
3600
3615
|
}
|
|
3601
|
-
return
|
|
3602
|
-
},
|
|
3616
|
+
return Vt(e) === qt;
|
|
3617
|
+
}, zn = Function.prototype.toString, Xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, or, St;
|
|
3603
3618
|
if (typeof Xe == "function" && typeof Object.defineProperty == "function")
|
|
3604
3619
|
try {
|
|
3605
|
-
|
|
3620
|
+
or = Object.defineProperty({}, "length", {
|
|
3606
3621
|
get: function() {
|
|
3607
3622
|
throw St;
|
|
3608
3623
|
}
|
|
3609
3624
|
}), St = {}, Xe(function() {
|
|
3610
3625
|
throw 42;
|
|
3611
|
-
}, null,
|
|
3626
|
+
}, null, or);
|
|
3612
3627
|
} catch (t) {
|
|
3613
3628
|
t !== St && (Xe = null);
|
|
3614
3629
|
}
|
|
3615
3630
|
else
|
|
3616
3631
|
Xe = null;
|
|
3617
|
-
var
|
|
3632
|
+
var Ps = /^\s*class\b/, sr = function(e) {
|
|
3618
3633
|
try {
|
|
3619
|
-
var r =
|
|
3620
|
-
return
|
|
3634
|
+
var r = zn.call(e);
|
|
3635
|
+
return Ps.test(r);
|
|
3621
3636
|
} catch {
|
|
3622
3637
|
return !1;
|
|
3623
3638
|
}
|
|
3624
|
-
},
|
|
3639
|
+
}, Qt = function(e) {
|
|
3625
3640
|
try {
|
|
3626
|
-
return
|
|
3641
|
+
return sr(e) ? !1 : (zn.call(e), !0);
|
|
3627
3642
|
} catch {
|
|
3628
3643
|
return !1;
|
|
3629
3644
|
}
|
|
3630
|
-
}, At = Object.prototype.toString,
|
|
3645
|
+
}, At = Object.prototype.toString, Rs = "[object Object]", Ns = "[object Function]", Ds = "[object GeneratorFunction]", $s = "[object HTMLAllCollection]", Us = "[object HTML document.all class]", js = "[object HTMLCollection]", Ms = typeof Symbol == "function" && !!Symbol.toStringTag, Vs = !(0 in [,]), ar = function() {
|
|
3631
3646
|
return !1;
|
|
3632
3647
|
};
|
|
3633
3648
|
if (typeof document == "object") {
|
|
3634
|
-
var
|
|
3635
|
-
At.call(
|
|
3636
|
-
if ((
|
|
3649
|
+
var qs = document.all;
|
|
3650
|
+
At.call(qs) === At.call(document.all) && (ar = function(e) {
|
|
3651
|
+
if ((Vs || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3637
3652
|
try {
|
|
3638
3653
|
var r = At.call(e);
|
|
3639
|
-
return (r ===
|
|
3654
|
+
return (r === $s || r === Us || r === js || r === Rs) && e("") == null;
|
|
3640
3655
|
} catch {
|
|
3641
3656
|
}
|
|
3642
3657
|
return !1;
|
|
3643
3658
|
});
|
|
3644
3659
|
}
|
|
3645
|
-
var
|
|
3646
|
-
if (
|
|
3660
|
+
var Qs = Xe ? function(e) {
|
|
3661
|
+
if (ar(e))
|
|
3647
3662
|
return !0;
|
|
3648
3663
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3649
3664
|
return !1;
|
|
3650
3665
|
try {
|
|
3651
|
-
Xe(e, null,
|
|
3666
|
+
Xe(e, null, or);
|
|
3652
3667
|
} catch (r) {
|
|
3653
3668
|
if (r !== St)
|
|
3654
3669
|
return !1;
|
|
3655
3670
|
}
|
|
3656
|
-
return !
|
|
3671
|
+
return !sr(e) && Qt(e);
|
|
3657
3672
|
} : function(e) {
|
|
3658
|
-
if (
|
|
3673
|
+
if (ar(e))
|
|
3659
3674
|
return !0;
|
|
3660
3675
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3661
3676
|
return !1;
|
|
3662
|
-
if (
|
|
3663
|
-
return
|
|
3664
|
-
if (
|
|
3677
|
+
if (Ms)
|
|
3678
|
+
return Qt(e);
|
|
3679
|
+
if (sr(e))
|
|
3665
3680
|
return !1;
|
|
3666
3681
|
var r = At.call(e);
|
|
3667
|
-
return r !==
|
|
3668
|
-
},
|
|
3682
|
+
return r !== Ns && r !== Ds && !/^\[object HTML/.test(r) ? !1 : Qt(e);
|
|
3683
|
+
}, Gs = Qs, zs = Object.prototype.toString, Kn = Object.prototype.hasOwnProperty, Ks = function(e, r, i) {
|
|
3669
3684
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3670
|
-
|
|
3671
|
-
},
|
|
3685
|
+
Kn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3686
|
+
}, Ws = function(e, r, i) {
|
|
3672
3687
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3673
3688
|
i == null ? r(e.charAt(s), s, e) : r.call(i, e.charAt(s), s, e);
|
|
3674
|
-
},
|
|
3689
|
+
}, Hs = function(e, r, i) {
|
|
3675
3690
|
for (var s in e)
|
|
3676
|
-
|
|
3677
|
-
},
|
|
3678
|
-
if (!
|
|
3691
|
+
Kn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3692
|
+
}, Js = function(e, r, i) {
|
|
3693
|
+
if (!Gs(r))
|
|
3679
3694
|
throw new TypeError("iterator must be a function");
|
|
3680
3695
|
var s;
|
|
3681
|
-
arguments.length >= 3 && (s = i),
|
|
3682
|
-
},
|
|
3696
|
+
arguments.length >= 3 && (s = i), zs.call(e) === "[object Array]" ? Ks(e, r, s) : typeof e == "string" ? Ws(e, r, s) : Hs(e, r, s);
|
|
3697
|
+
}, Ys = Js, Gt = [
|
|
3683
3698
|
"BigInt64Array",
|
|
3684
3699
|
"BigUint64Array",
|
|
3685
3700
|
"Float32Array",
|
|
@@ -3691,61 +3706,61 @@ var js = Xe ? function(e) {
|
|
|
3691
3706
|
"Uint32Array",
|
|
3692
3707
|
"Uint8Array",
|
|
3693
3708
|
"Uint8ClampedArray"
|
|
3694
|
-
],
|
|
3695
|
-
for (var e = [], r = 0; r <
|
|
3696
|
-
typeof
|
|
3709
|
+
], Xs = typeof globalThis > "u" ? Sn : globalThis, Zs = function() {
|
|
3710
|
+
for (var e = [], r = 0; r < Gt.length; r++)
|
|
3711
|
+
typeof Xs[Gt[r]] == "function" && (e[e.length] = Gt[r]);
|
|
3697
3712
|
return e;
|
|
3698
|
-
},
|
|
3713
|
+
}, Tt = Ys, ea = Zs, Yr = jn, Ir = qn, Et = Ar, ta = Ir("Object.prototype.toString"), Wn = vr(), Xr = typeof globalThis > "u" ? Sn : globalThis, ur = ea(), Fr = Ir("String.prototype.slice"), zt = Object.getPrototypeOf, ra = Ir("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3699
3714
|
for (var i = 0; i < e.length; i += 1)
|
|
3700
3715
|
if (e[i] === r)
|
|
3701
3716
|
return i;
|
|
3702
3717
|
return -1;
|
|
3703
|
-
},
|
|
3704
|
-
|
|
3705
|
-
var e = new
|
|
3718
|
+
}, _t = { __proto__: null };
|
|
3719
|
+
Wn && Et && zt ? Tt(ur, function(t) {
|
|
3720
|
+
var e = new Xr[t]();
|
|
3706
3721
|
if (Symbol.toStringTag in e) {
|
|
3707
|
-
var r =
|
|
3722
|
+
var r = zt(e), i = Et(r, Symbol.toStringTag);
|
|
3708
3723
|
if (!i) {
|
|
3709
|
-
var s =
|
|
3724
|
+
var s = zt(r);
|
|
3710
3725
|
i = Et(s, Symbol.toStringTag);
|
|
3711
3726
|
}
|
|
3712
|
-
|
|
3727
|
+
_t["$" + t] = Yr(i.get);
|
|
3713
3728
|
}
|
|
3714
|
-
}) :
|
|
3715
|
-
var e = new
|
|
3716
|
-
r && (
|
|
3729
|
+
}) : Tt(ur, function(t) {
|
|
3730
|
+
var e = new Xr[t](), r = e.slice || e.set;
|
|
3731
|
+
r && (_t["$" + t] = Yr(r));
|
|
3717
3732
|
});
|
|
3718
|
-
var
|
|
3733
|
+
var na = function(e) {
|
|
3719
3734
|
var r = !1;
|
|
3720
|
-
return _t
|
|
3735
|
+
return Tt(_t, function(i, s) {
|
|
3721
3736
|
if (!r)
|
|
3722
3737
|
try {
|
|
3723
3738
|
"$" + i(e) === s && (r = Fr(s, 1));
|
|
3724
3739
|
} catch {
|
|
3725
3740
|
}
|
|
3726
3741
|
}), r;
|
|
3727
|
-
},
|
|
3742
|
+
}, ia = function(e) {
|
|
3728
3743
|
var r = !1;
|
|
3729
|
-
return _t
|
|
3744
|
+
return Tt(_t, function(i, s) {
|
|
3730
3745
|
if (!r)
|
|
3731
3746
|
try {
|
|
3732
3747
|
i(e), r = Fr(s, 1);
|
|
3733
3748
|
} catch {
|
|
3734
3749
|
}
|
|
3735
3750
|
}), r;
|
|
3736
|
-
},
|
|
3751
|
+
}, Hn = function(e) {
|
|
3737
3752
|
if (!e || typeof e != "object")
|
|
3738
3753
|
return !1;
|
|
3739
|
-
if (!
|
|
3740
|
-
var r = Fr(
|
|
3741
|
-
return
|
|
3754
|
+
if (!Wn) {
|
|
3755
|
+
var r = Fr(ta(e), 8, -1);
|
|
3756
|
+
return ra(ur, r) > -1 ? r : r !== "Object" ? !1 : ia(e);
|
|
3742
3757
|
}
|
|
3743
|
-
return Et ?
|
|
3744
|
-
},
|
|
3745
|
-
return !!
|
|
3758
|
+
return Et ? na(e) : null;
|
|
3759
|
+
}, oa = Hn, sa = function(e) {
|
|
3760
|
+
return !!oa(e);
|
|
3746
3761
|
};
|
|
3747
3762
|
(function(t) {
|
|
3748
|
-
var e =
|
|
3763
|
+
var e = _s, r = Ls, i = Hn, s = sa;
|
|
3749
3764
|
function u(A) {
|
|
3750
3765
|
return A.call.bind(A);
|
|
3751
3766
|
}
|
|
@@ -3754,7 +3769,7 @@ var Zs = function(e) {
|
|
|
3754
3769
|
var E = u(BigInt.prototype.valueOf);
|
|
3755
3770
|
if (h)
|
|
3756
3771
|
var F = u(Symbol.prototype.valueOf);
|
|
3757
|
-
function
|
|
3772
|
+
function _(A, ct) {
|
|
3758
3773
|
if (typeof A != "object")
|
|
3759
3774
|
return !1;
|
|
3760
3775
|
try {
|
|
@@ -3768,10 +3783,10 @@ var Zs = function(e) {
|
|
|
3768
3783
|
return typeof Promise < "u" && A instanceof Promise || A !== null && typeof A == "object" && typeof A.then == "function" && typeof A.catch == "function";
|
|
3769
3784
|
}
|
|
3770
3785
|
t.isPromise = x;
|
|
3771
|
-
function
|
|
3786
|
+
function N(A) {
|
|
3772
3787
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(A) : s(A) || v(A);
|
|
3773
3788
|
}
|
|
3774
|
-
t.isArrayBufferView =
|
|
3789
|
+
t.isArrayBufferView = N;
|
|
3775
3790
|
function I(A) {
|
|
3776
3791
|
return i(A) === "Uint8Array";
|
|
3777
3792
|
}
|
|
@@ -3788,10 +3803,10 @@ var Zs = function(e) {
|
|
|
3788
3803
|
return i(A) === "Uint32Array";
|
|
3789
3804
|
}
|
|
3790
3805
|
t.isUint32Array = P;
|
|
3791
|
-
function
|
|
3806
|
+
function C(A) {
|
|
3792
3807
|
return i(A) === "Int8Array";
|
|
3793
3808
|
}
|
|
3794
|
-
t.isInt8Array =
|
|
3809
|
+
t.isInt8Array = C;
|
|
3795
3810
|
function k(A) {
|
|
3796
3811
|
return i(A) === "Int16Array";
|
|
3797
3812
|
}
|
|
@@ -3893,33 +3908,33 @@ var Zs = function(e) {
|
|
|
3893
3908
|
}
|
|
3894
3909
|
t.isWebAssemblyCompiledModule = J;
|
|
3895
3910
|
function ce(A) {
|
|
3896
|
-
return
|
|
3911
|
+
return _(A, m);
|
|
3897
3912
|
}
|
|
3898
3913
|
t.isNumberObject = ce;
|
|
3899
3914
|
function Re(A) {
|
|
3900
|
-
return
|
|
3915
|
+
return _(A, f);
|
|
3901
3916
|
}
|
|
3902
3917
|
t.isStringObject = Re;
|
|
3903
3918
|
function Be(A) {
|
|
3904
|
-
return
|
|
3919
|
+
return _(A, w);
|
|
3905
3920
|
}
|
|
3906
3921
|
t.isBooleanObject = Be;
|
|
3907
3922
|
function Ne(A) {
|
|
3908
|
-
return c &&
|
|
3923
|
+
return c && _(A, E);
|
|
3909
3924
|
}
|
|
3910
3925
|
t.isBigIntObject = Ne;
|
|
3911
3926
|
function Se(A) {
|
|
3912
|
-
return h &&
|
|
3927
|
+
return h && _(A, F);
|
|
3913
3928
|
}
|
|
3914
3929
|
t.isSymbolObject = Se;
|
|
3915
3930
|
function De(A) {
|
|
3916
3931
|
return ce(A) || Re(A) || Be(A) || Ne(A) || Se(A);
|
|
3917
3932
|
}
|
|
3918
3933
|
t.isBoxedPrimitive = De;
|
|
3919
|
-
function
|
|
3934
|
+
function Dt(A) {
|
|
3920
3935
|
return typeof Uint8Array < "u" && (Ge(A) || M(A));
|
|
3921
3936
|
}
|
|
3922
|
-
t.isAnyArrayBuffer =
|
|
3937
|
+
t.isAnyArrayBuffer = Dt, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(A) {
|
|
3923
3938
|
Object.defineProperty(t, A, {
|
|
3924
3939
|
enumerable: !1,
|
|
3925
3940
|
value: function() {
|
|
@@ -3927,11 +3942,11 @@ var Zs = function(e) {
|
|
|
3927
3942
|
}
|
|
3928
3943
|
});
|
|
3929
3944
|
});
|
|
3930
|
-
})(
|
|
3931
|
-
var
|
|
3945
|
+
})(Pn);
|
|
3946
|
+
var aa = function(e) {
|
|
3932
3947
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3933
|
-
},
|
|
3934
|
-
typeof Object.create == "function" ?
|
|
3948
|
+
}, cr = { exports: {} };
|
|
3949
|
+
typeof Object.create == "function" ? cr.exports = function(e, r) {
|
|
3935
3950
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
3936
3951
|
constructor: {
|
|
3937
3952
|
value: e,
|
|
@@ -3940,7 +3955,7 @@ typeof Object.create == "function" ? lr.exports = function(e, r) {
|
|
|
3940
3955
|
configurable: !0
|
|
3941
3956
|
}
|
|
3942
3957
|
}));
|
|
3943
|
-
} :
|
|
3958
|
+
} : cr.exports = function(e, r) {
|
|
3944
3959
|
if (r) {
|
|
3945
3960
|
e.super_ = r;
|
|
3946
3961
|
var i = function() {
|
|
@@ -3948,7 +3963,7 @@ typeof Object.create == "function" ? lr.exports = function(e, r) {
|
|
|
3948
3963
|
i.prototype = r.prototype, e.prototype = new i(), e.prototype.constructor = e;
|
|
3949
3964
|
}
|
|
3950
3965
|
};
|
|
3951
|
-
var
|
|
3966
|
+
var ua = cr.exports;
|
|
3952
3967
|
(function(t) {
|
|
3953
3968
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
3954
3969
|
for (var S = Object.keys(v), O = {}, M = 0; M < S.length; M++)
|
|
@@ -3956,7 +3971,7 @@ var ia = lr.exports;
|
|
|
3956
3971
|
return O;
|
|
3957
3972
|
}, r = /%[sdj%]/g;
|
|
3958
3973
|
t.format = function(g) {
|
|
3959
|
-
if (!
|
|
3974
|
+
if (!C(g)) {
|
|
3960
3975
|
for (var v = [], S = 0; S < arguments.length; S++)
|
|
3961
3976
|
v.push(c(arguments[S]));
|
|
3962
3977
|
return v.join(" ");
|
|
@@ -4069,7 +4084,7 @@ var ia = lr.exports;
|
|
|
4069
4084
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4070
4085
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
4071
4086
|
var O = v.inspect(S, g);
|
|
4072
|
-
return
|
|
4087
|
+
return C(O) || (O = f(g, O, S)), O;
|
|
4073
4088
|
}
|
|
4074
4089
|
var M = w(g, v);
|
|
4075
4090
|
if (M)
|
|
@@ -4090,7 +4105,7 @@ var ia = lr.exports;
|
|
|
4090
4105
|
return E(v);
|
|
4091
4106
|
}
|
|
4092
4107
|
var Q = "", J = !1, ce = ["{", "}"];
|
|
4093
|
-
if (
|
|
4108
|
+
if (N(v) && (J = !0, ce = ["[", "]"]), ae(v)) {
|
|
4094
4109
|
var Re = v.name ? ": " + v.name : "";
|
|
4095
4110
|
Q = " [Function" + Re + "]";
|
|
4096
4111
|
}
|
|
@@ -4101,13 +4116,13 @@ var ia = lr.exports;
|
|
|
4101
4116
|
g.seen.push(v);
|
|
4102
4117
|
var Be;
|
|
4103
4118
|
return J ? Be = F(g, v, S, R, V) : Be = V.map(function(Ne) {
|
|
4104
|
-
return
|
|
4119
|
+
return _(g, v, S, R, Ne, J);
|
|
4105
4120
|
}), g.seen.pop(), x(Be, Q, ce);
|
|
4106
4121
|
}
|
|
4107
4122
|
function w(g, v) {
|
|
4108
4123
|
if (B(v))
|
|
4109
4124
|
return g.stylize("undefined", "undefined");
|
|
4110
|
-
if (
|
|
4125
|
+
if (C(v)) {
|
|
4111
4126
|
var S = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4112
4127
|
return g.stylize(S, "string");
|
|
4113
4128
|
}
|
|
@@ -4123,7 +4138,7 @@ var ia = lr.exports;
|
|
|
4123
4138
|
}
|
|
4124
4139
|
function F(g, v, S, O, M) {
|
|
4125
4140
|
for (var V = [], R = 0, $ = v.length; R < $; ++R)
|
|
4126
|
-
ve(v, String(R)) ? V.push(
|
|
4141
|
+
ve(v, String(R)) ? V.push(_(
|
|
4127
4142
|
g,
|
|
4128
4143
|
v,
|
|
4129
4144
|
S,
|
|
@@ -4132,7 +4147,7 @@ var ia = lr.exports;
|
|
|
4132
4147
|
!0
|
|
4133
4148
|
)) : V.push("");
|
|
4134
4149
|
return M.forEach(function(Q) {
|
|
4135
|
-
Q.match(/^\d+$/) || V.push(
|
|
4150
|
+
Q.match(/^\d+$/) || V.push(_(
|
|
4136
4151
|
g,
|
|
4137
4152
|
v,
|
|
4138
4153
|
S,
|
|
@@ -4142,7 +4157,7 @@ var ia = lr.exports;
|
|
|
4142
4157
|
));
|
|
4143
4158
|
}), V;
|
|
4144
4159
|
}
|
|
4145
|
-
function
|
|
4160
|
+
function _(g, v, S, O, M, V) {
|
|
4146
4161
|
var R, $, Q;
|
|
4147
4162
|
if (Q = Object.getOwnPropertyDescriptor(v, M) || { value: v[M] }, Q.get ? Q.set ? $ = g.stylize("[Getter/Setter]", "special") : $ = g.stylize("[Getter]", "special") : Q.set && ($ = g.stylize("[Setter]", "special")), ve(O, M) || (R = "[" + M + "]"), $ || (g.seen.indexOf(Q.value) < 0 ? (T(S) ? $ = f(g, Q.value, null) : $ = f(g, Q.value, S - 1), $.indexOf(`
|
|
4148
4163
|
`) > -1 && (V ? $ = $.split(`
|
|
@@ -4170,11 +4185,11 @@ var ia = lr.exports;
|
|
|
4170
4185
|
`) + " " + g.join(`,
|
|
4171
4186
|
`) + " " + S[1] : S[0] + v + " " + g.join(", ") + " " + S[1];
|
|
4172
4187
|
}
|
|
4173
|
-
t.types =
|
|
4174
|
-
function
|
|
4188
|
+
t.types = Pn;
|
|
4189
|
+
function N(g) {
|
|
4175
4190
|
return Array.isArray(g);
|
|
4176
4191
|
}
|
|
4177
|
-
t.isArray =
|
|
4192
|
+
t.isArray = N;
|
|
4178
4193
|
function I(g) {
|
|
4179
4194
|
return typeof g == "boolean";
|
|
4180
4195
|
}
|
|
@@ -4191,10 +4206,10 @@ var ia = lr.exports;
|
|
|
4191
4206
|
return typeof g == "number";
|
|
4192
4207
|
}
|
|
4193
4208
|
t.isNumber = P;
|
|
4194
|
-
function
|
|
4209
|
+
function C(g) {
|
|
4195
4210
|
return typeof g == "string";
|
|
4196
4211
|
}
|
|
4197
|
-
t.isString =
|
|
4212
|
+
t.isString = C;
|
|
4198
4213
|
function k(g) {
|
|
4199
4214
|
return typeof g == "symbol";
|
|
4200
4215
|
}
|
|
@@ -4227,7 +4242,7 @@ var ia = lr.exports;
|
|
|
4227
4242
|
return g === null || typeof g == "boolean" || typeof g == "number" || typeof g == "string" || typeof g == "symbol" || // ES6 symbol
|
|
4228
4243
|
typeof g > "u";
|
|
4229
4244
|
}
|
|
4230
|
-
t.isPrimitive = ut, t.isBuffer =
|
|
4245
|
+
t.isPrimitive = ut, t.isBuffer = aa;
|
|
4231
4246
|
function he(g) {
|
|
4232
4247
|
return Object.prototype.toString.call(g);
|
|
4233
4248
|
}
|
|
@@ -4258,7 +4273,7 @@ var ia = lr.exports;
|
|
|
4258
4273
|
}
|
|
4259
4274
|
t.log = function() {
|
|
4260
4275
|
console.log("%s - %s", Qe(), t.format.apply(t, arguments));
|
|
4261
|
-
}, t.inherits =
|
|
4276
|
+
}, t.inherits = ua, t._extend = function(g, v) {
|
|
4262
4277
|
if (!v || !ne(v))
|
|
4263
4278
|
return g;
|
|
4264
4279
|
for (var S = Object.keys(v), O = S.length; O--; )
|
|
@@ -4342,8 +4357,8 @@ var ia = lr.exports;
|
|
|
4342
4357
|
), v;
|
|
4343
4358
|
}
|
|
4344
4359
|
t.callbackify = Ge;
|
|
4345
|
-
})(
|
|
4346
|
-
const { inherits:
|
|
4360
|
+
})(Rt);
|
|
4361
|
+
const { inherits: ca, format: Kt } = Rt;
|
|
4347
4362
|
function $e(t, e, r = Error) {
|
|
4348
4363
|
if (!t)
|
|
4349
4364
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -4352,13 +4367,13 @@ function $e(t, e, r = Error) {
|
|
|
4352
4367
|
function i(s, u, c) {
|
|
4353
4368
|
if (!new.target)
|
|
4354
4369
|
return new i(s, u, c);
|
|
4355
|
-
Error.captureStackTrace(this, i), this.code = t, this.message = e, this.name = "AvvioError", s && u && c ? this.message =
|
|
4370
|
+
Error.captureStackTrace(this, i), this.code = t, this.message = e, this.name = "AvvioError", s && u && c ? this.message = Kt(e, s, u, c) : s && u ? this.message = Kt(e, s, u) : s ? this.message = Kt(e, s) : this.message = e;
|
|
4356
4371
|
}
|
|
4357
4372
|
return i.prototype[Symbol.toStringTag] = "Error", i.prototype.toString = function() {
|
|
4358
4373
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4359
|
-
},
|
|
4374
|
+
}, ca(i, r), i;
|
|
4360
4375
|
}
|
|
4361
|
-
var
|
|
4376
|
+
var Jn = {
|
|
4362
4377
|
createError: $e,
|
|
4363
4378
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: $e(
|
|
4364
4379
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -4384,7 +4399,7 @@ var zn = {
|
|
|
4384
4399
|
"AVV_ERR_READY_TIMEOUT",
|
|
4385
4400
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4386
4401
|
)
|
|
4387
|
-
},
|
|
4402
|
+
}, la = function t(e, r, i) {
|
|
4388
4403
|
r === void 0 && (r = ""), i || (i = {});
|
|
4389
4404
|
var s = function(p) {
|
|
4390
4405
|
var m = {
|
|
@@ -4406,15 +4421,15 @@ var zn = {
|
|
|
4406
4421
|
return r + s(f ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, i).slice(r.length + 2);
|
|
4407
4422
|
}).join("");
|
|
4408
4423
|
};
|
|
4409
|
-
const
|
|
4410
|
-
let
|
|
4424
|
+
const fa = la, Zr = Symbol("avvio.TimeTree.untrackNode"), Wt = Symbol("avvio.TimeTree.trackNode"), en = Symbol("avvio.TimeTree.getParent"), tn = Symbol("avvio.TimeTree.getNode"), rn = Symbol("avvio.TimeTree.addNode");
|
|
4425
|
+
let da = class {
|
|
4411
4426
|
constructor() {
|
|
4412
4427
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4413
4428
|
}
|
|
4414
|
-
[
|
|
4429
|
+
[Wt](e) {
|
|
4415
4430
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4416
4431
|
}
|
|
4417
|
-
[
|
|
4432
|
+
[Zr](e) {
|
|
4418
4433
|
this.tableId.delete(e.id);
|
|
4419
4434
|
const r = this.tableLabel.get(e.label);
|
|
4420
4435
|
if (r.id) {
|
|
@@ -4423,54 +4438,54 @@ let ua = class {
|
|
|
4423
4438
|
}
|
|
4424
4439
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
4425
4440
|
}
|
|
4426
|
-
[
|
|
4441
|
+
[en](e) {
|
|
4427
4442
|
if (e === null)
|
|
4428
4443
|
return this.root;
|
|
4429
4444
|
const r = this.tableLabel.get(e);
|
|
4430
4445
|
return r.id ? r : r[r.length - 1];
|
|
4431
4446
|
}
|
|
4432
|
-
[
|
|
4447
|
+
[tn](e) {
|
|
4433
4448
|
return this.tableId.get(e);
|
|
4434
4449
|
}
|
|
4435
|
-
[
|
|
4450
|
+
[rn](e, r, i) {
|
|
4436
4451
|
if (e === null)
|
|
4437
4452
|
return this.root = {
|
|
4438
4453
|
id: "root",
|
|
4439
4454
|
label: r,
|
|
4440
4455
|
start: i,
|
|
4441
4456
|
nodes: []
|
|
4442
|
-
}, this[
|
|
4443
|
-
const u = this[
|
|
4457
|
+
}, this[Wt](this.root), this.root.id;
|
|
4458
|
+
const u = this[en](e), c = `${r}-${Math.random()}`, h = {
|
|
4444
4459
|
id: c,
|
|
4445
4460
|
parent: e,
|
|
4446
4461
|
start: i,
|
|
4447
4462
|
label: r,
|
|
4448
4463
|
nodes: []
|
|
4449
4464
|
};
|
|
4450
|
-
return u.nodes.push(h), this[
|
|
4465
|
+
return u.nodes.push(h), this[Wt](h), c;
|
|
4451
4466
|
}
|
|
4452
4467
|
start(e, r, i = Date.now()) {
|
|
4453
|
-
return this[
|
|
4468
|
+
return this[rn](e, r, i);
|
|
4454
4469
|
}
|
|
4455
4470
|
stop(e, r = Date.now()) {
|
|
4456
|
-
const i = this[
|
|
4457
|
-
i && (i.stop = r, i.diff = i.stop - i.start || 0, this[
|
|
4471
|
+
const i = this[tn](e);
|
|
4472
|
+
i && (i.stop = r, i.diff = i.stop - i.start || 0, this[Zr](i));
|
|
4458
4473
|
}
|
|
4459
4474
|
toJSON() {
|
|
4460
4475
|
return Object.assign({}, this.root);
|
|
4461
4476
|
}
|
|
4462
4477
|
prittyPrint() {
|
|
4463
4478
|
const e = (i) => (i.label = `${i.label} ${i.diff} ms`, i.nodes.length > 0 && (i.nodes = i.nodes.map((s) => e(s))), i), r = e(this.toJSON());
|
|
4464
|
-
return
|
|
4479
|
+
return fa(r);
|
|
4465
4480
|
}
|
|
4466
4481
|
};
|
|
4467
|
-
var
|
|
4468
|
-
function
|
|
4469
|
-
if (
|
|
4470
|
-
return
|
|
4471
|
-
|
|
4482
|
+
var ha = da, Or = { exports: {} }, lr = { exports: {} }, Ht, nn;
|
|
4483
|
+
function pa() {
|
|
4484
|
+
if (nn)
|
|
4485
|
+
return Ht;
|
|
4486
|
+
nn = 1;
|
|
4472
4487
|
var t = 1e3, e = t * 60, r = e * 60, i = r * 24, s = i * 7, u = i * 365.25;
|
|
4473
|
-
|
|
4488
|
+
Ht = function(f, w) {
|
|
4474
4489
|
w = w || {};
|
|
4475
4490
|
var E = typeof f;
|
|
4476
4491
|
if (E === "string" && f.length > 0)
|
|
@@ -4542,13 +4557,13 @@ function la() {
|
|
|
4542
4557
|
return w >= i ? m(f, w, i, "day") : w >= r ? m(f, w, r, "hour") : w >= e ? m(f, w, e, "minute") : w >= t ? m(f, w, t, "second") : f + " ms";
|
|
4543
4558
|
}
|
|
4544
4559
|
function m(f, w, E, F) {
|
|
4545
|
-
var
|
|
4546
|
-
return Math.round(f / E) + " " + F + (
|
|
4560
|
+
var _ = w >= E * 1.5;
|
|
4561
|
+
return Math.round(f / E) + " " + F + (_ ? "s" : "");
|
|
4547
4562
|
}
|
|
4548
|
-
return
|
|
4563
|
+
return Ht;
|
|
4549
4564
|
}
|
|
4550
|
-
function
|
|
4551
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = c, r.humanize =
|
|
4565
|
+
function ya(t) {
|
|
4566
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = c, r.humanize = pa(), r.destroy = m, Object.keys(t).forEach((f) => {
|
|
4552
4567
|
r[f] = t[f];
|
|
4553
4568
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4554
4569
|
function e(f) {
|
|
@@ -4559,31 +4574,31 @@ function fa(t) {
|
|
|
4559
4574
|
}
|
|
4560
4575
|
r.selectColor = e;
|
|
4561
4576
|
function r(f) {
|
|
4562
|
-
let w, E = null, F,
|
|
4563
|
-
function x(...
|
|
4577
|
+
let w, E = null, F, _;
|
|
4578
|
+
function x(...N) {
|
|
4564
4579
|
if (!x.enabled)
|
|
4565
4580
|
return;
|
|
4566
4581
|
const I = x, T = Number(/* @__PURE__ */ new Date()), j = T - (w || T);
|
|
4567
|
-
I.diff = j, I.prev = w, I.curr = T, w = T,
|
|
4582
|
+
I.diff = j, I.prev = w, I.curr = T, w = T, N[0] = r.coerce(N[0]), typeof N[0] != "string" && N.unshift("%O");
|
|
4568
4583
|
let P = 0;
|
|
4569
|
-
|
|
4584
|
+
N[0] = N[0].replace(/%([a-zA-Z%])/g, (k, B) => {
|
|
4570
4585
|
if (k === "%%")
|
|
4571
4586
|
return "%";
|
|
4572
4587
|
P++;
|
|
4573
4588
|
const q = r.formatters[B];
|
|
4574
4589
|
if (typeof q == "function") {
|
|
4575
|
-
const ne =
|
|
4576
|
-
k = q.call(I, ne),
|
|
4590
|
+
const ne = N[P];
|
|
4591
|
+
k = q.call(I, ne), N.splice(P, 1), P--;
|
|
4577
4592
|
}
|
|
4578
4593
|
return k;
|
|
4579
|
-
}), r.formatArgs.call(I,
|
|
4594
|
+
}), r.formatArgs.call(I, N), (I.log || r.log).apply(I, N);
|
|
4580
4595
|
}
|
|
4581
4596
|
return x.namespace = f, x.useColors = r.useColors(), x.color = r.selectColor(f), x.extend = i, x.destroy = r.destroy, Object.defineProperty(x, "enabled", {
|
|
4582
4597
|
enumerable: !0,
|
|
4583
4598
|
configurable: !1,
|
|
4584
|
-
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces,
|
|
4585
|
-
set: (
|
|
4586
|
-
E =
|
|
4599
|
+
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, _ = r.enabled(f)), _),
|
|
4600
|
+
set: (N) => {
|
|
4601
|
+
E = N;
|
|
4587
4602
|
}
|
|
4588
4603
|
}), typeof r.init == "function" && r.init(x), x;
|
|
4589
4604
|
}
|
|
@@ -4628,7 +4643,7 @@ function fa(t) {
|
|
|
4628
4643
|
}
|
|
4629
4644
|
return r.enable(r.load()), r;
|
|
4630
4645
|
}
|
|
4631
|
-
var
|
|
4646
|
+
var ga = ya;
|
|
4632
4647
|
(function(t, e) {
|
|
4633
4648
|
e.formatArgs = i, e.save = s, e.load = u, e.useColors = r, e.storage = c(), e.destroy = /* @__PURE__ */ (() => {
|
|
4634
4649
|
let p = !1;
|
|
@@ -4752,7 +4767,7 @@ var da = fa;
|
|
|
4752
4767
|
} catch {
|
|
4753
4768
|
}
|
|
4754
4769
|
}
|
|
4755
|
-
t.exports =
|
|
4770
|
+
t.exports = ga(e);
|
|
4756
4771
|
const { formatters: h } = t.exports;
|
|
4757
4772
|
h.j = function(p) {
|
|
4758
4773
|
try {
|
|
@@ -4761,23 +4776,23 @@ var da = fa;
|
|
|
4761
4776
|
return "[UnexpectedJSONParseError]: " + m.message;
|
|
4762
4777
|
}
|
|
4763
4778
|
};
|
|
4764
|
-
})(
|
|
4765
|
-
var
|
|
4766
|
-
const
|
|
4767
|
-
function
|
|
4768
|
-
return t[
|
|
4779
|
+
})(lr, lr.exports);
|
|
4780
|
+
var Yn = lr.exports;
|
|
4781
|
+
const ma = In, wa = Ln.EventEmitter, ba = Rt.inherits, Z = Yn("avvio"), { AVV_ERR_READY_TIMEOUT: va } = Jn, Jt = Symbol.for("plugin-meta");
|
|
4782
|
+
function Sa(t, e) {
|
|
4783
|
+
return t[Jt] && t[Jt].name ? t[Jt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4769
4784
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4770
4785
|
}
|
|
4771
|
-
function
|
|
4786
|
+
function Aa() {
|
|
4772
4787
|
const t = {};
|
|
4773
4788
|
return t.promise = new Promise((e, r) => {
|
|
4774
4789
|
t.resolve = e, t.reject = r;
|
|
4775
4790
|
}), t;
|
|
4776
4791
|
}
|
|
4777
4792
|
function at(t, e, r, i, s) {
|
|
4778
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name =
|
|
4793
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = Sa(e, r), this.isAfter = i, this.q = ma(t, Ea, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4779
4794
|
}
|
|
4780
|
-
|
|
4795
|
+
ba(at, wa);
|
|
4781
4796
|
at.prototype.exec = function(t, e) {
|
|
4782
4797
|
const r = this.func;
|
|
4783
4798
|
let i = !1;
|
|
@@ -4805,7 +4820,7 @@ at.prototype.exec = function(t, e) {
|
|
|
4805
4820
|
};
|
|
4806
4821
|
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), u = setTimeout(function() {
|
|
4807
4822
|
Z("timed out", s), u = null;
|
|
4808
|
-
const p = new
|
|
4823
|
+
const p = new va(s);
|
|
4809
4824
|
p.fn = r, c(p);
|
|
4810
4825
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4811
4826
|
const h = r(this.server, this.opts, c);
|
|
@@ -4823,7 +4838,7 @@ at.prototype.loadedSoFar = function() {
|
|
|
4823
4838
|
}), this.q.resume();
|
|
4824
4839
|
};
|
|
4825
4840
|
let e;
|
|
4826
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4841
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Aa(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4827
4842
|
};
|
|
4828
4843
|
at.prototype.enqueue = function(t, e) {
|
|
4829
4844
|
Z("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4848,12 +4863,12 @@ at.prototype.finish = function(t, e) {
|
|
|
4848
4863
|
r();
|
|
4849
4864
|
else
|
|
4850
4865
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4851
|
-
Z("drain", this.name), this.q.drain =
|
|
4866
|
+
Z("drain", this.name), this.q.drain = Ia, queueMicrotask(i);
|
|
4852
4867
|
};
|
|
4853
4868
|
};
|
|
4854
4869
|
queueMicrotask(i), this.q.resume();
|
|
4855
4870
|
};
|
|
4856
|
-
function
|
|
4871
|
+
function Ea(t, e) {
|
|
4857
4872
|
const r = this;
|
|
4858
4873
|
L.nextTick(Tr.bind(r), t, e);
|
|
4859
4874
|
}
|
|
@@ -4871,59 +4886,59 @@ function Tr(t, e) {
|
|
|
4871
4886
|
});
|
|
4872
4887
|
});
|
|
4873
4888
|
}
|
|
4874
|
-
function
|
|
4889
|
+
function Ia() {
|
|
4875
4890
|
}
|
|
4876
4891
|
Or.exports = at;
|
|
4877
4892
|
Or.exports.loadPlugin = Tr;
|
|
4878
|
-
var
|
|
4879
|
-
const
|
|
4880
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4893
|
+
var Fa = Or.exports;
|
|
4894
|
+
const on = In, Oa = Ln.EventEmitter, Ta = Rt.inherits, {
|
|
4895
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Yt,
|
|
4881
4896
|
AVV_ERR_CALLBACK_NOT_FN: ht,
|
|
4882
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4883
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4884
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4885
|
-
} =
|
|
4886
|
-
function
|
|
4897
|
+
AVV_ERR_PLUGIN_NOT_VALID: _a,
|
|
4898
|
+
AVV_ERR_ROOT_PLG_BOOTED: Ca,
|
|
4899
|
+
AVV_ERR_READY_TIMEOUT: xa
|
|
4900
|
+
} = Jn, ka = ha, fr = Fa, ot = Yn("avvio"), Ct = Symbol("kAvvio"), Xt = Symbol("kThenifyDoNotWrap");
|
|
4901
|
+
function Ba(t, e, r) {
|
|
4887
4902
|
const i = e.expose || {}, s = i.use || "use", u = i.after || "after", c = i.ready || "ready", h = i.onClose || "onClose", p = i.close || "close";
|
|
4888
4903
|
if (t[s])
|
|
4889
|
-
throw new
|
|
4904
|
+
throw new Yt(s);
|
|
4890
4905
|
if (t[u])
|
|
4891
|
-
throw new
|
|
4906
|
+
throw new Yt(u);
|
|
4892
4907
|
if (t[c])
|
|
4893
|
-
throw new
|
|
4908
|
+
throw new Yt(c);
|
|
4894
4909
|
t[s] = function(m, f) {
|
|
4895
4910
|
return r.use(m, f), this;
|
|
4896
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4897
|
-
return typeof m != "function" ? r._loadRegistered() : (r.after(
|
|
4911
|
+
}, Object.defineProperty(t, "then", { get: Xn.bind(r) }), t[Ct] = !0, t[u] = function(m) {
|
|
4912
|
+
return typeof m != "function" ? r._loadRegistered() : (r.after(Zt(m, this)), this);
|
|
4898
4913
|
}, t[c] = function(m) {
|
|
4899
4914
|
if (m && typeof m != "function")
|
|
4900
4915
|
throw new ht(c, typeof m);
|
|
4901
|
-
return r.ready(m ?
|
|
4916
|
+
return r.ready(m ? Zt(m, this) : void 0);
|
|
4902
4917
|
}, t[h] = function(m) {
|
|
4903
4918
|
if (typeof m != "function")
|
|
4904
4919
|
throw new ht(h, typeof m);
|
|
4905
|
-
return r.onClose(
|
|
4920
|
+
return r.onClose(Da(m, this)), this;
|
|
4906
4921
|
}, t[p] = function(m) {
|
|
4907
4922
|
if (m && typeof m != "function")
|
|
4908
4923
|
throw new ht(p, typeof m);
|
|
4909
|
-
return m ? (r.close(
|
|
4924
|
+
return m ? (r.close(Zt(m, this)), this) : r.close();
|
|
4910
4925
|
};
|
|
4911
4926
|
}
|
|
4912
4927
|
function te(t, e, r) {
|
|
4913
4928
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof te)) {
|
|
4914
4929
|
const i = new te(t, e, r);
|
|
4915
|
-
return t &&
|
|
4930
|
+
return t && Ba(t, e, i), i;
|
|
4916
4931
|
}
|
|
4917
|
-
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
|
|
4918
|
-
this.emit("start"), this._readyQ.drain =
|
|
4919
|
-
}, this._closeQ =
|
|
4920
|
-
this.emit("close"), this._closeQ.drain =
|
|
4921
|
-
}, this._doStart = null, this._root = new
|
|
4932
|
+
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 ka(), this._readyQ = on(this, Zn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4933
|
+
this.emit("start"), this._readyQ.drain = sn;
|
|
4934
|
+
}, this._closeQ = on(this, Na, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4935
|
+
this.emit("close"), this._closeQ.drain = sn;
|
|
4936
|
+
}, this._doStart = null, this._root = new fr(this, La.bind(this), e, !1, 0), this._root.once("start", (i, s, u) => {
|
|
4922
4937
|
const c = this.pluginTree.start(null, s, u);
|
|
4923
4938
|
this._root.once("loaded", (h, p, m) => {
|
|
4924
4939
|
this.pluginTree.stop(c, m);
|
|
4925
4940
|
});
|
|
4926
|
-
}),
|
|
4941
|
+
}), fr.loadPlugin.call(this, this._root, (i) => {
|
|
4927
4942
|
ot("root plugin ready");
|
|
4928
4943
|
try {
|
|
4929
4944
|
this.emit("preReady"), this._root = null;
|
|
@@ -4938,22 +4953,22 @@ function te(t, e, r) {
|
|
|
4938
4953
|
this._readyQ.resume();
|
|
4939
4954
|
});
|
|
4940
4955
|
}
|
|
4941
|
-
function
|
|
4956
|
+
function La(t, e, r) {
|
|
4942
4957
|
this._doStart = r, e.autostart && this.start();
|
|
4943
4958
|
}
|
|
4944
|
-
|
|
4959
|
+
Ta(te, Oa);
|
|
4945
4960
|
te.prototype.start = function() {
|
|
4946
4961
|
return this.started = !0, L.nextTick(this._doStart), this;
|
|
4947
4962
|
};
|
|
4948
4963
|
te.prototype.override = function(t, e, r) {
|
|
4949
4964
|
return t;
|
|
4950
4965
|
};
|
|
4951
|
-
function
|
|
4966
|
+
function Pa(t) {
|
|
4952
4967
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4953
|
-
throw new
|
|
4968
|
+
throw new _a(typeof t);
|
|
4954
4969
|
return t;
|
|
4955
4970
|
}
|
|
4956
|
-
te.prototype[
|
|
4971
|
+
te.prototype[Ct] = !0;
|
|
4957
4972
|
te.prototype.use = function(t, e) {
|
|
4958
4973
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
4959
4974
|
};
|
|
@@ -4961,11 +4976,11 @@ te.prototype._loadRegistered = function() {
|
|
|
4961
4976
|
const t = this._current[0];
|
|
4962
4977
|
return !this.started && !this.booted && L.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4963
4978
|
};
|
|
4964
|
-
Object.defineProperty(te.prototype, "then", { get:
|
|
4979
|
+
Object.defineProperty(te.prototype, "then", { get: Xn });
|
|
4965
4980
|
te.prototype._addPlugin = function(t, e, r) {
|
|
4966
|
-
if (t =
|
|
4967
|
-
throw new
|
|
4968
|
-
const i = this._current[0], s = new
|
|
4981
|
+
if (t = Pa(t), e = e || {}, this.booted)
|
|
4982
|
+
throw new Ca();
|
|
4983
|
+
const i = this._current[0], s = new fr(this, t, e, r);
|
|
4969
4984
|
if (s.once("start", (u, c, h) => {
|
|
4970
4985
|
const p = this.pluginTree.start(i.name, c, h);
|
|
4971
4986
|
s.once("loaded", (m, f, w) => {
|
|
@@ -4982,7 +4997,7 @@ te.prototype.after = function(t) {
|
|
|
4982
4997
|
return this._loadRegistered();
|
|
4983
4998
|
this._addPlugin(e.bind(this), {}, !0);
|
|
4984
4999
|
function e(r, i, s) {
|
|
4985
|
-
|
|
5000
|
+
Zn.call(this, t, s);
|
|
4986
5001
|
}
|
|
4987
5002
|
return this;
|
|
4988
5003
|
};
|
|
@@ -5033,40 +5048,40 @@ te.prototype.prettyPrint = function() {
|
|
|
5033
5048
|
te.prototype.toJSON = function() {
|
|
5034
5049
|
return this.pluginTree.toJSON();
|
|
5035
5050
|
};
|
|
5036
|
-
function
|
|
5051
|
+
function sn() {
|
|
5037
5052
|
}
|
|
5038
|
-
function
|
|
5053
|
+
function Xn() {
|
|
5039
5054
|
if (this.booted) {
|
|
5040
5055
|
ot("thenify returning null because we are already booted");
|
|
5041
5056
|
return;
|
|
5042
5057
|
}
|
|
5043
|
-
if (this[
|
|
5044
|
-
this[
|
|
5058
|
+
if (this[Xt]) {
|
|
5059
|
+
this[Xt] = !1;
|
|
5045
5060
|
return;
|
|
5046
5061
|
}
|
|
5047
|
-
return ot("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
5062
|
+
return ot("thenify"), (t, e) => this._loadRegistered().then(() => (this[Xt] = !0, t(this._server)), e);
|
|
5048
5063
|
}
|
|
5049
|
-
function
|
|
5064
|
+
function Zn(t, e) {
|
|
5050
5065
|
const r = this._server, i = this._error;
|
|
5051
5066
|
let s;
|
|
5052
5067
|
if (this._error = null, t.length === 0)
|
|
5053
|
-
this._error = i, s = t(), s && !s[
|
|
5068
|
+
this._error = i, s = t(), s && !s[Ct] && typeof s.then == "function" ? s.then(() => L.nextTick(e), (u) => L.nextTick(e, u)) : L.nextTick(e);
|
|
5054
5069
|
else if (t.length === 1)
|
|
5055
|
-
s = t(i), s && !s[
|
|
5070
|
+
s = t(i), s && !s[Ct] && typeof s.then == "function" ? s.then(() => L.nextTick(e), (u) => L.nextTick(e, u)) : L.nextTick(e);
|
|
5056
5071
|
else if (this._timeout === 0) {
|
|
5057
5072
|
const u = (c) => {
|
|
5058
5073
|
this._error = c, e(this._error);
|
|
5059
5074
|
};
|
|
5060
5075
|
t.length === 2 ? t(i, u) : t(i, r, u);
|
|
5061
5076
|
} else
|
|
5062
|
-
|
|
5077
|
+
Ra.call(this, t, i, r, e);
|
|
5063
5078
|
}
|
|
5064
|
-
function
|
|
5079
|
+
function Ra(t, e, r, i) {
|
|
5065
5080
|
const s = t.name;
|
|
5066
5081
|
ot("setting up ready timeout", s, this._timeout);
|
|
5067
5082
|
let u = setTimeout(() => {
|
|
5068
5083
|
ot("timed out", s), u = null;
|
|
5069
|
-
const h = new
|
|
5084
|
+
const h = new xa(s);
|
|
5070
5085
|
h.fn = t, this._error = h, i(h);
|
|
5071
5086
|
}, this._timeout);
|
|
5072
5087
|
t.length === 2 ? t(e, c.bind(this)) : t(e, r, c.bind(this));
|
|
@@ -5074,7 +5089,7 @@ function ka(t, e, r, i) {
|
|
|
5074
5089
|
u && (clearTimeout(u), this._error = h, i(this._error));
|
|
5075
5090
|
}
|
|
5076
5091
|
}
|
|
5077
|
-
function
|
|
5092
|
+
function Na(t, e) {
|
|
5078
5093
|
const r = this._server, i = t[this._isOnCloseHandlerKey];
|
|
5079
5094
|
if (t.length === 0 || t.length === 1) {
|
|
5080
5095
|
let s;
|
|
@@ -5085,7 +5100,7 @@ function Ba(t, e) {
|
|
|
5085
5100
|
} else
|
|
5086
5101
|
t.length === 2 ? t(i ? r : this._error, e) : i ? t(r, e) : t(this._error, r, e);
|
|
5087
5102
|
}
|
|
5088
|
-
function
|
|
5103
|
+
function Da(t, e) {
|
|
5089
5104
|
return r.bind(e);
|
|
5090
5105
|
function r(i, s) {
|
|
5091
5106
|
let u;
|
|
@@ -5096,7 +5111,7 @@ function La(t, e) {
|
|
|
5096
5111
|
}, s) : L.nextTick(s)) : t(this, s);
|
|
5097
5112
|
}
|
|
5098
5113
|
}
|
|
5099
|
-
function
|
|
5114
|
+
function Zt(t, e) {
|
|
5100
5115
|
return r.bind(e);
|
|
5101
5116
|
function r(i, s) {
|
|
5102
5117
|
let u;
|
|
@@ -5115,8 +5130,8 @@ mr.exports.express = function(t) {
|
|
|
5115
5130
|
}
|
|
5116
5131
|
});
|
|
5117
5132
|
};
|
|
5118
|
-
var
|
|
5119
|
-
const
|
|
5133
|
+
var $a = mr.exports;
|
|
5134
|
+
const Ua = /* @__PURE__ */ no($a);
|
|
5120
5135
|
(function() {
|
|
5121
5136
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5122
5137
|
return;
|
|
@@ -5134,9 +5149,9 @@ const Ra = /* @__PURE__ */ Zi(Pa);
|
|
|
5134
5149
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5135
5150
|
}
|
|
5136
5151
|
})();
|
|
5137
|
-
function
|
|
5138
|
-
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", u =
|
|
5139
|
-
return u.use(
|
|
5152
|
+
function ou(t, e = !0, r = !0, i) {
|
|
5153
|
+
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", u = Ua(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5154
|
+
return u.use(Ui), u.use(Ri), u.use(Oi, { sdkKey: t, host: s, version: i?.version }), u.use($i), u.use(Di), u.use(Co), u.use(po), r && u.after(async (c, h, p) => {
|
|
5140
5155
|
if (c)
|
|
5141
5156
|
throw c;
|
|
5142
5157
|
await h.sdk.initializeApp(), p();
|
|
@@ -5145,5 +5160,5 @@ function tu(t, e = !0, r = !0, i) {
|
|
|
5145
5160
|
}), u;
|
|
5146
5161
|
}
|
|
5147
5162
|
export {
|
|
5148
|
-
|
|
5163
|
+
ou as StreamLayer
|
|
5149
5164
|
};
|