@streamlayer/sdk-web 0.32.0 → 0.32.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 +722 -719
- package/package.json +6 -6
package/lib/es/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { QuestionType as fe, QuestionStatus as dt, SilenceSetting as oi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
|
-
import { SdkOverlayType as
|
|
4
|
-
import { computed as ln, map as si, atom as
|
|
3
|
+
import { SdkOverlayType as Oe } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
|
+
import { computed as ln, map as si, atom as Lt, onMount as fn } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
7
|
import { nanoid as ai } from "nanoid";
|
|
8
|
-
import { ConnectError as
|
|
9
|
-
import { createGrpcWebTransport as
|
|
8
|
+
import { ConnectError as Lr, Code as Pr, createPromiseClient as Rr } from "@connectrpc/connect";
|
|
9
|
+
import { createGrpcWebTransport as Dr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Nr } from "@nanostores/query";
|
|
11
11
|
import { Events as ui } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as yt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
|
-
import { Users as
|
|
13
|
+
import { Users as gr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { pino as ci } from "pino";
|
|
15
|
-
import { Feed as
|
|
15
|
+
import { Feed as Ce } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
16
16
|
import { Leaderboard as dn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
17
17
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
18
18
|
import { LinksClient as li } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
@@ -20,28 +20,28 @@ function fi(t) {
|
|
|
20
20
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
21
21
|
}
|
|
22
22
|
var hn = { exports: {} }, Y = hn.exports = {}, ye, ge;
|
|
23
|
-
function
|
|
23
|
+
function ir() {
|
|
24
24
|
throw new Error("setTimeout has not been defined");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function or() {
|
|
27
27
|
throw new Error("clearTimeout has not been defined");
|
|
28
28
|
}
|
|
29
29
|
(function() {
|
|
30
30
|
try {
|
|
31
|
-
typeof setTimeout == "function" ? ye = setTimeout : ye =
|
|
31
|
+
typeof setTimeout == "function" ? ye = setTimeout : ye = ir;
|
|
32
32
|
} catch {
|
|
33
|
-
ye =
|
|
33
|
+
ye = ir;
|
|
34
34
|
}
|
|
35
35
|
try {
|
|
36
|
-
typeof clearTimeout == "function" ? ge = clearTimeout : ge =
|
|
36
|
+
typeof clearTimeout == "function" ? ge = clearTimeout : ge = or;
|
|
37
37
|
} catch {
|
|
38
|
-
ge =
|
|
38
|
+
ge = or;
|
|
39
39
|
}
|
|
40
40
|
})();
|
|
41
41
|
function pn(t) {
|
|
42
42
|
if (ye === setTimeout)
|
|
43
43
|
return setTimeout(t, 0);
|
|
44
|
-
if ((ye ===
|
|
44
|
+
if ((ye === ir || !ye) && setTimeout)
|
|
45
45
|
return ye = setTimeout, setTimeout(t, 0);
|
|
46
46
|
try {
|
|
47
47
|
return ye(t, 0);
|
|
@@ -56,7 +56,7 @@ function pn(t) {
|
|
|
56
56
|
function di(t) {
|
|
57
57
|
if (ge === clearTimeout)
|
|
58
58
|
return clearTimeout(t);
|
|
59
|
-
if ((ge ===
|
|
59
|
+
if ((ge === or || !ge) && clearTimeout)
|
|
60
60
|
return ge = clearTimeout, clearTimeout(t);
|
|
61
61
|
try {
|
|
62
62
|
return ge(t);
|
|
@@ -68,20 +68,20 @@ function di(t) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
var
|
|
71
|
+
var _e = [], et = !1, je, St = -1;
|
|
72
72
|
function hi() {
|
|
73
|
-
!et || !
|
|
73
|
+
!et || !je || (et = !1, je.length ? _e = je.concat(_e) : St = -1, _e.length && yn());
|
|
74
74
|
}
|
|
75
75
|
function yn() {
|
|
76
76
|
if (!et) {
|
|
77
77
|
var t = pn(hi);
|
|
78
78
|
et = !0;
|
|
79
|
-
for (var e =
|
|
80
|
-
for (
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
for (var e = _e.length; e; ) {
|
|
80
|
+
for (je = _e, _e = []; ++St < e; )
|
|
81
|
+
je && je[St].run();
|
|
82
|
+
St = -1, e = _e.length;
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
je = null, et = !1, di(t);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
Y.nextTick = function(t) {
|
|
@@ -89,7 +89,7 @@ Y.nextTick = function(t) {
|
|
|
89
89
|
if (arguments.length > 1)
|
|
90
90
|
for (var r = 1; r < arguments.length; r++)
|
|
91
91
|
e[r - 1] = arguments[r];
|
|
92
|
-
|
|
92
|
+
_e.push(new gn(t, e)), _e.length === 1 && !et && pn(yn);
|
|
93
93
|
};
|
|
94
94
|
function gn(t, e) {
|
|
95
95
|
this.fun = t, this.array = e;
|
|
@@ -103,17 +103,17 @@ Y.env = {};
|
|
|
103
103
|
Y.argv = [];
|
|
104
104
|
Y.version = "";
|
|
105
105
|
Y.versions = {};
|
|
106
|
-
function
|
|
106
|
+
function xe() {
|
|
107
107
|
}
|
|
108
|
-
Y.on =
|
|
109
|
-
Y.addListener =
|
|
110
|
-
Y.once =
|
|
111
|
-
Y.off =
|
|
112
|
-
Y.removeListener =
|
|
113
|
-
Y.removeAllListeners =
|
|
114
|
-
Y.emit =
|
|
115
|
-
Y.prependListener =
|
|
116
|
-
Y.prependOnceListener =
|
|
108
|
+
Y.on = xe;
|
|
109
|
+
Y.addListener = xe;
|
|
110
|
+
Y.once = xe;
|
|
111
|
+
Y.off = xe;
|
|
112
|
+
Y.removeListener = xe;
|
|
113
|
+
Y.removeAllListeners = xe;
|
|
114
|
+
Y.emit = xe;
|
|
115
|
+
Y.prependListener = xe;
|
|
116
|
+
Y.prependOnceListener = xe;
|
|
117
117
|
Y.listeners = function(t) {
|
|
118
118
|
return [];
|
|
119
119
|
};
|
|
@@ -134,7 +134,7 @@ const P = /* @__PURE__ */ fi(pi);
|
|
|
134
134
|
class yi {
|
|
135
135
|
}
|
|
136
136
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
137
|
-
class
|
|
137
|
+
class Pt {
|
|
138
138
|
/**
|
|
139
139
|
* store instance (nanostores)
|
|
140
140
|
*/
|
|
@@ -154,7 +154,7 @@ const gi = (t) => {
|
|
|
154
154
|
const e = Object.keys(t);
|
|
155
155
|
return ln(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((i, s) => [i, r[s]])));
|
|
156
156
|
};
|
|
157
|
-
class tt extends
|
|
157
|
+
class tt extends Pt {
|
|
158
158
|
getValues = () => this.getStore().get();
|
|
159
159
|
getValue = (e) => this.getStore().get()[e];
|
|
160
160
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
@@ -162,15 +162,15 @@ class tt extends Bt {
|
|
|
162
162
|
unsubscribe = () => this.getStore().off();
|
|
163
163
|
}
|
|
164
164
|
const Te = (t) => si(t);
|
|
165
|
-
var
|
|
165
|
+
var Ie;
|
|
166
166
|
(function(t) {
|
|
167
167
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
168
|
-
})(
|
|
168
|
+
})(Ie || (Ie = {}));
|
|
169
169
|
const mi = {
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
173
|
-
[
|
|
170
|
+
[Oe.BETTING]: "betting",
|
|
171
|
+
[Oe.GAMES]: "games",
|
|
172
|
+
[Oe.PUBLIC_CHAT]: "publicChat",
|
|
173
|
+
[Oe.TWITTER]: "twitter"
|
|
174
174
|
};
|
|
175
175
|
var rt;
|
|
176
176
|
(function(t) {
|
|
@@ -184,7 +184,7 @@ class mn {
|
|
|
184
184
|
listeners = /* @__PURE__ */ new Set();
|
|
185
185
|
settingsKey;
|
|
186
186
|
constructor({ settings: e, ...r }, i) {
|
|
187
|
-
this.settingsKey = mi[r.type], this.status =
|
|
187
|
+
this.settingsKey = mi[r.type], this.status = Lt(rt.Suspended), this.config = new tt(Te(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new tt(Te(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new tt(Te({}), `feature:settings:${this.settingsKey}`), this.source = i;
|
|
188
188
|
}
|
|
189
189
|
get featureConfig() {
|
|
190
190
|
return this.config.getStore();
|
|
@@ -215,7 +215,7 @@ class mn {
|
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
update = (e, r) => {
|
|
218
|
-
this.source ===
|
|
218
|
+
this.source === Ie.STREAM && r === Ie.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
|
|
219
219
|
};
|
|
220
220
|
fireEvent(e) {
|
|
221
221
|
for (const r of this.listeners.values())
|
|
@@ -226,7 +226,7 @@ class mn {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
class se extends
|
|
229
|
+
class se extends Pt {
|
|
230
230
|
getValue = () => this.getStore().get();
|
|
231
231
|
getValues() {
|
|
232
232
|
throw new Error("not implemented");
|
|
@@ -241,11 +241,11 @@ class se extends Bt {
|
|
|
241
241
|
return this.getStore().get();
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
const re = (t) =>
|
|
245
|
-
class de extends
|
|
244
|
+
const re = (t) => Lt(t);
|
|
245
|
+
class de extends Pt {
|
|
246
246
|
atomStore;
|
|
247
247
|
constructor(e, r, i) {
|
|
248
|
-
super(e, `api:${r}`), this.atomStore =
|
|
248
|
+
super(e, `api:${r}`), this.atomStore = Lt(), i && e.subscribe((s) => {
|
|
249
249
|
const a = this.atomStore.get(), c = i(s, a);
|
|
250
250
|
a !== c && this.atomStore.set(c);
|
|
251
251
|
});
|
|
@@ -388,7 +388,7 @@ class vi {
|
|
|
388
388
|
for await (const a of s)
|
|
389
389
|
this.attempt = 0, this.onData(a);
|
|
390
390
|
} catch (i) {
|
|
391
|
-
i instanceof
|
|
391
|
+
i instanceof Lr && i.code != Pr.Canceled && this.onStreamError(i);
|
|
392
392
|
}
|
|
393
393
|
})(), this.updateState(le.Connected);
|
|
394
394
|
};
|
|
@@ -428,7 +428,7 @@ class vi {
|
|
|
428
428
|
*/
|
|
429
429
|
onStreamError = (e) => {
|
|
430
430
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
431
|
-
if (e instanceof
|
|
431
|
+
if (e instanceof Lr && e.code !== Pr.Canceled) {
|
|
432
432
|
this.updateState(le.Failed), this.state.setValue("error", e), this.reconnect();
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
@@ -465,12 +465,12 @@ class Ai {
|
|
|
465
465
|
"sl-device-id": Si()
|
|
466
466
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
467
467
|
const [r, i, s] = Nr();
|
|
468
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: i, utils: s }, this.transport =
|
|
468
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: i, utils: s }, this.transport = Dr({
|
|
469
469
|
baseUrl: e,
|
|
470
470
|
defaultTimeoutMs: 3e4,
|
|
471
471
|
interceptors: this.interceptors,
|
|
472
472
|
useBinaryFormat: !0
|
|
473
|
-
}), this.streamTransport =
|
|
473
|
+
}), this.streamTransport = Dr({
|
|
474
474
|
baseUrl: e,
|
|
475
475
|
interceptors: this.interceptors,
|
|
476
476
|
useBinaryFormat: !0
|
|
@@ -507,14 +507,14 @@ class Ai {
|
|
|
507
507
|
const r = e.typeName;
|
|
508
508
|
if (this.clients.has(r))
|
|
509
509
|
return this.clients.get(r);
|
|
510
|
-
const i =
|
|
510
|
+
const i = Rr(e, this.transport);
|
|
511
511
|
return this.clients.set(r, i), i;
|
|
512
512
|
};
|
|
513
513
|
getStreamClient = (e) => {
|
|
514
514
|
const r = `stream-${e.typeName}`;
|
|
515
515
|
if (this.clients.has(r))
|
|
516
516
|
return this.clients.get(r);
|
|
517
|
-
const i =
|
|
517
|
+
const i = Rr(e, this.streamTransport);
|
|
518
518
|
return this.clients.set(r, i), i;
|
|
519
519
|
};
|
|
520
520
|
// create unary client, used for query request
|
|
@@ -576,22 +576,22 @@ const Ei = (t, e) => {
|
|
|
576
576
|
})).data?.attributes : void 0
|
|
577
577
|
});
|
|
578
578
|
}, Fi = (t, e) => {
|
|
579
|
-
const { queryKey: r, client: i } = e.createPromiseClient(
|
|
579
|
+
const { queryKey: r, client: i } = e.createPromiseClient(gr, { method: "me", params: [t] });
|
|
580
580
|
return e.nanoquery.createFetcherStore(r, {
|
|
581
581
|
fetcher: () => i.me({})
|
|
582
582
|
});
|
|
583
583
|
}, Oi = (t) => {
|
|
584
|
-
const { client: e } = t.createPromiseClient(
|
|
584
|
+
const { client: e } = t.createPromiseClient(gr, { method: "bypassAuth" });
|
|
585
585
|
return async ({ userKey: r, schema: i, init: s, inviterKey: a }) => {
|
|
586
586
|
const c = await e.bypassAuth({ userKey: r, schema: i, init: s });
|
|
587
587
|
return c.meta && (c.meta.inviterKey = a), c;
|
|
588
588
|
};
|
|
589
|
-
},
|
|
589
|
+
}, _i = (t, e) => {
|
|
590
590
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "get", params: [t] });
|
|
591
591
|
return e.nanoquery.createFetcherStore(i, {
|
|
592
592
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
593
593
|
});
|
|
594
|
-
},
|
|
594
|
+
}, Ti = (t, e) => {
|
|
595
595
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "getOrganization", params: [t] });
|
|
596
596
|
return e.nanoquery.createFetcherStore(i, {
|
|
597
597
|
fetcher: async () => {
|
|
@@ -613,7 +613,7 @@ const Ei = (t, e) => {
|
|
|
613
613
|
}, xi = (t, e, r) => {
|
|
614
614
|
t.transport = new Ai(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), r();
|
|
615
615
|
};
|
|
616
|
-
class
|
|
616
|
+
class Rt {
|
|
617
617
|
delimiter = ":";
|
|
618
618
|
prefix;
|
|
619
619
|
storage;
|
|
@@ -637,42 +637,42 @@ class Lt {
|
|
|
637
637
|
this.storage.removeItem(this.generateKey(e));
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
var
|
|
640
|
+
var Ee;
|
|
641
641
|
(function(t) {
|
|
642
642
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
643
|
-
})(
|
|
644
|
-
class Ye extends
|
|
643
|
+
})(Ee || (Ee = {}));
|
|
644
|
+
class Ye extends Rt {
|
|
645
645
|
constructor() {
|
|
646
646
|
super("user");
|
|
647
647
|
}
|
|
648
648
|
// Schema
|
|
649
649
|
setSchema = (e) => {
|
|
650
|
-
this.write(
|
|
650
|
+
this.write(Ee.SCHEMA, e);
|
|
651
651
|
};
|
|
652
|
-
getSchema = () => this.read(
|
|
652
|
+
getSchema = () => this.read(Ee.SCHEMA);
|
|
653
653
|
// Token
|
|
654
654
|
setToken = (e) => {
|
|
655
|
-
this.write(
|
|
655
|
+
this.write(Ee.TOKEN, e);
|
|
656
656
|
};
|
|
657
|
-
getToken = () => this.read(
|
|
657
|
+
getToken = () => this.read(Ee.TOKEN);
|
|
658
658
|
// External Token
|
|
659
659
|
setExternalToken = (e) => {
|
|
660
|
-
this.write(
|
|
660
|
+
this.write(Ee.EXTERNAL_TOKEN, e);
|
|
661
661
|
};
|
|
662
|
-
getExternalToken = () => this.read(
|
|
662
|
+
getExternalToken = () => this.read(Ee.EXTERNAL_TOKEN);
|
|
663
663
|
removeToken = () => {
|
|
664
|
-
this.remove(
|
|
664
|
+
this.remove(Ee.TOKEN);
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
var
|
|
667
|
+
var Fe;
|
|
668
668
|
(function(t) {
|
|
669
669
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
670
|
-
})(
|
|
670
|
+
})(Fe || (Fe = {}));
|
|
671
671
|
const ki = (t) => {
|
|
672
672
|
const e = new Ye(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(Fi(i.getStore(), t), "user", ({ data: c, error: d, loading: p }, m) => {
|
|
673
673
|
if (!d)
|
|
674
674
|
return c?.data?.id ? c.data.id : p === !1 ? void 0 : m;
|
|
675
|
-
}), a = new de(
|
|
675
|
+
}), a = new de(_i(i.getStore(), t), "userSettings");
|
|
676
676
|
return {
|
|
677
677
|
userKey: r,
|
|
678
678
|
userToken: i,
|
|
@@ -689,7 +689,7 @@ const ki = (t) => {
|
|
|
689
689
|
streamSettings: i
|
|
690
690
|
};
|
|
691
691
|
}, Li = (t) => {
|
|
692
|
-
const e = new se(re(void 0), "enabled"), r = new se(re(
|
|
692
|
+
const e = new se(re(void 0), "enabled"), r = new se(re(Fe.DISABLED), "status"), i = new de(Ti(e.getStore(), t), "organizationSettings", (d) => d?.data?.id), s = new de(Ci(i.getAtomStore(), t), "organizationAdvertising"), a = ki(t), c = Bi(t);
|
|
693
693
|
return {
|
|
694
694
|
enabled: e,
|
|
695
695
|
status: r,
|
|
@@ -704,7 +704,7 @@ const ki = (t) => {
|
|
|
704
704
|
organizationAdvertising: s
|
|
705
705
|
};
|
|
706
706
|
};
|
|
707
|
-
class Pi extends
|
|
707
|
+
class Pi extends Pt {
|
|
708
708
|
stores;
|
|
709
709
|
constructor(e) {
|
|
710
710
|
const r = Li(e), i = gi(r);
|
|
@@ -736,8 +736,8 @@ const Ri = ci({
|
|
|
736
736
|
console.log(t);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
}),
|
|
740
|
-
class
|
|
739
|
+
}), gt = (t, e) => Ri.child({ name: t }, e);
|
|
740
|
+
class Di extends Rt {
|
|
741
741
|
get = this.read;
|
|
742
742
|
set = this.write;
|
|
743
743
|
del = this.remove;
|
|
@@ -745,37 +745,37 @@ class Ni extends Lt {
|
|
|
745
745
|
super("deep-link-context", window.sessionStorage);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
const
|
|
748
|
+
const $r = "sldl", Dt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Ni = /* @__PURE__ */ new Set([Dt, wn, bn]), Ur = (t) => {
|
|
749
749
|
const e = {}, r = {};
|
|
750
750
|
for (const [i, s] of t)
|
|
751
|
-
|
|
751
|
+
Ni.has(i) ? e[i] = s : r[i] = s;
|
|
752
752
|
return { result: e, remain: r };
|
|
753
753
|
}, $i = ({ hash: t, search: e }) => {
|
|
754
|
-
if (t && t.includes(
|
|
754
|
+
if (t && t.includes($r)) {
|
|
755
755
|
const r = new URLSearchParams(t.substr(1));
|
|
756
|
-
return { hash:
|
|
756
|
+
return { hash: Ur(r) };
|
|
757
757
|
}
|
|
758
|
-
if (e && e.includes(
|
|
758
|
+
if (e && e.includes($r)) {
|
|
759
759
|
const r = new URLSearchParams(e);
|
|
760
|
-
return { search:
|
|
760
|
+
return { search: Ur(r) };
|
|
761
761
|
}
|
|
762
762
|
return null;
|
|
763
|
-
},
|
|
763
|
+
}, me = gt("deep_link"), Ui = (t, e) => {
|
|
764
764
|
const { hash: r, search: i } = window.location;
|
|
765
|
-
if (
|
|
765
|
+
if (me.debug({ hash: r, search: i }, "get deep link data from"), r || i) {
|
|
766
766
|
const s = $i({ hash: r, search: i });
|
|
767
|
-
if (
|
|
767
|
+
if (me.debug(s, "parse deep link result"), s) {
|
|
768
768
|
const { hash: a, search: c } = s, { result: d, remain: p } = a || c;
|
|
769
769
|
if (Object.keys(d).length !== 0) {
|
|
770
770
|
t.setValue("data", d);
|
|
771
771
|
const m = Object.keys(p).length !== 0;
|
|
772
772
|
if (a) {
|
|
773
773
|
let l = "";
|
|
774
|
-
m && (l = `#${new URLSearchParams(p).toString()}`,
|
|
774
|
+
m && (l = `#${new URLSearchParams(p).toString()}`, me.debug({ updatedHash: l }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + l);
|
|
775
775
|
}
|
|
776
776
|
if (c) {
|
|
777
777
|
let l = "";
|
|
778
|
-
m && (l = `?${new URLSearchParams(p).toString()}`,
|
|
778
|
+
m && (l = `?${new URLSearchParams(p).toString()}`, me.debug({ updatedSearch: l }, "update search")), window.history.replaceState(null, "", window.location.pathname + l + window.location.hash);
|
|
779
779
|
}
|
|
780
780
|
e(d);
|
|
781
781
|
}
|
|
@@ -783,13 +783,13 @@ const Dr = "sldl", Rt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Di = /*
|
|
|
783
783
|
}
|
|
784
784
|
t.setValue("parsed", !0);
|
|
785
785
|
}, ji = (t, e, r) => {
|
|
786
|
-
const i = new
|
|
786
|
+
const i = new Di(), s = i.get("sl-deep-link-store");
|
|
787
787
|
let a = {};
|
|
788
788
|
if (s)
|
|
789
789
|
try {
|
|
790
790
|
a = JSON.parse(s);
|
|
791
791
|
} catch (d) {
|
|
792
|
-
|
|
792
|
+
me.debug(d);
|
|
793
793
|
}
|
|
794
794
|
t.deepLink = {
|
|
795
795
|
$store: new tt(Te(a), "deep-link-context"),
|
|
@@ -799,31 +799,31 @@ const Dr = "sldl", Rt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Di = /*
|
|
|
799
799
|
},
|
|
800
800
|
// we are logged in with inviter id
|
|
801
801
|
deepLinkUsed: (d) => {
|
|
802
|
-
|
|
802
|
+
me.debug(`logged in with inviterId: ${d}`), t.deepLink.$store.setValue("used", !0);
|
|
803
803
|
},
|
|
804
804
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
805
805
|
}, t.sdk.getInviter = () => {
|
|
806
806
|
const { data: d, used: p } = t.deepLink.getDeepLinkData();
|
|
807
|
-
return p ? d?.[
|
|
807
|
+
return p ? d?.[Dt] : void 0;
|
|
808
808
|
}, t.sdk.inviteDisplayed = () => {
|
|
809
809
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), i.del("sl-deep-link-store");
|
|
810
810
|
}, t.deepLink.$store.subscribe((d) => i.set("sl-deep-link-store", JSON.stringify(d))), t.sdk.addDeepLinkHandler = (d) => {
|
|
811
|
-
t.deepLink.onDeepLinkHandlers.add(d);
|
|
811
|
+
me.trace("add deep link handler"), t.deepLink.onDeepLinkHandlers.add(d);
|
|
812
812
|
}, t.sdk.removeDeepLinkHandler = (d) => {
|
|
813
|
-
t.deepLink.onDeepLinkHandlers.delete(d);
|
|
813
|
+
me.trace("remove deep link handler"), t.deepLink.onDeepLinkHandlers.delete(d);
|
|
814
814
|
};
|
|
815
815
|
const c = (d) => {
|
|
816
|
-
t.deepLink.$store.setValue("handled", !0);
|
|
816
|
+
t.deepLink.$store.setValue("handled", !0), me.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
|
|
817
817
|
for (const p of t.deepLink.onDeepLinkHandlers)
|
|
818
818
|
try {
|
|
819
|
-
|
|
819
|
+
me.trace("called handler"), p(d);
|
|
820
820
|
} catch (m) {
|
|
821
821
|
console.error(m);
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
Ui(t.deepLink.$store, c), r();
|
|
825
|
-
},
|
|
826
|
-
class
|
|
825
|
+
}, Mi = gt("bypass");
|
|
826
|
+
class Vi extends yi {
|
|
827
827
|
$coreStore;
|
|
828
828
|
deepLink;
|
|
829
829
|
transport;
|
|
@@ -840,8 +840,8 @@ class Mi extends yi {
|
|
|
840
840
|
*/
|
|
841
841
|
login = async (e, r) => {
|
|
842
842
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
843
|
-
const { used: i, data: s } = this.deepLink.getDeepLinkData(), a = i ? "" : s?.[
|
|
844
|
-
|
|
843
|
+
const { used: i, data: s } = this.deepLink.getDeepLinkData(), a = i ? "" : s?.[Dt];
|
|
844
|
+
Mi.debug({ inviterKey: a }, "login with inviterKey");
|
|
845
845
|
const c = await this.bypassLogin({
|
|
846
846
|
schema: e,
|
|
847
847
|
userKey: r,
|
|
@@ -850,7 +850,7 @@ class Mi extends yi {
|
|
|
850
850
|
}), d = c.meta?.jwt, p = c.data?.id;
|
|
851
851
|
if (!d || !p)
|
|
852
852
|
throw new Error("internal: token missing");
|
|
853
|
-
return
|
|
853
|
+
return c.meta?.inviterKey && this.deepLink.deepLinkUsed(c.meta.inviterKey), this.$coreStore.getValues().user.getStore().mutate(c), this.saveUser(d, p), d;
|
|
854
854
|
};
|
|
855
855
|
isAuthenticated = () => this.me();
|
|
856
856
|
/**
|
|
@@ -910,9 +910,9 @@ class Mi extends yi {
|
|
|
910
910
|
});
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
const ft = new Ye(),
|
|
914
|
-
t.auth = new
|
|
915
|
-
i ===
|
|
913
|
+
const ft = new Ye(), qi = (t, e, r) => {
|
|
914
|
+
t.auth = new Vi(t.store, t.transport, t.deepLink), t.stores.status.listen((i) => {
|
|
915
|
+
i === Fe.READY && t.auth.reLogin();
|
|
916
916
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (i, s) => {
|
|
917
917
|
if (!(ft.getSchema() === i && ft.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
918
918
|
try {
|
|
@@ -923,42 +923,45 @@ const ft = new Ye(), Vi = (t, e, r) => {
|
|
|
923
923
|
}, t.sdk.logout = () => {
|
|
924
924
|
t.auth.logout(), ft.clear();
|
|
925
925
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
926
|
-
},
|
|
926
|
+
}, Qi = (t, e, r) => {
|
|
927
927
|
t.store = new Pi(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 = () => {
|
|
928
928
|
t.store.unsubscribe();
|
|
929
929
|
}, r();
|
|
930
|
-
},
|
|
930
|
+
}, bt = gt("video_player"), Gi = (t, e, r) => {
|
|
931
931
|
t.videoPlayer = {
|
|
932
932
|
controllers: /* @__PURE__ */ new Set()
|
|
933
933
|
}, t.sdk.addVideoPlayerController = (i) => {
|
|
934
|
-
t.videoPlayer.controllers.add(i);
|
|
934
|
+
bt.trace("adding video player controller"), t.videoPlayer.controllers.add(i);
|
|
935
935
|
}, t.sdk.removeVideoPlayerController = (i) => {
|
|
936
|
-
t.videoPlayer.controllers.delete(i);
|
|
936
|
+
bt.trace("removing video player controller"), t.videoPlayer.controllers.delete(i);
|
|
937
937
|
}, t.sdk.controlVideoPlayer = (i) => {
|
|
938
|
-
|
|
938
|
+
bt.trace("controlling video player");
|
|
939
|
+
for (const s of t.videoPlayer.controllers) {
|
|
940
|
+
bt.trace("calling video player controller");
|
|
939
941
|
try {
|
|
940
942
|
s(i);
|
|
941
943
|
} catch (a) {
|
|
942
944
|
console.error(a);
|
|
943
945
|
}
|
|
946
|
+
}
|
|
944
947
|
}, r();
|
|
945
|
-
},
|
|
948
|
+
}, zi = (t, e, r) => {
|
|
946
949
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async (i) => {
|
|
947
950
|
if (t.contextConfig = i, t.stores.enabled.get() === "on")
|
|
948
951
|
return { enabled: !0 };
|
|
949
|
-
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(
|
|
952
|
+
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Fe.INITIALIZATION);
|
|
950
953
|
try {
|
|
951
954
|
const s = await t.stores.organizationSettings.getValue();
|
|
952
|
-
return s ? (t.stores.status.setValue(
|
|
955
|
+
return s ? (t.stores.status.setValue(Fe.READY), { enabled: !!s }) : (t.stores.status.setValue(Fe.FAILED), { err: "failed" });
|
|
953
956
|
} catch (s) {
|
|
954
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
957
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(Fe.FAILED), { err: `${s}` };
|
|
955
958
|
}
|
|
956
959
|
}, t.sdk.disableApp = () => {
|
|
957
|
-
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
960
|
+
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Fe.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
|
|
958
961
|
}, t.sdk.createEventSession = (i) => {
|
|
959
962
|
t.stores.providerStreamId.setValue(i);
|
|
960
963
|
}, r();
|
|
961
|
-
},
|
|
964
|
+
}, Ki = (t, e, r) => {
|
|
962
965
|
const { client: i, queryKey: s } = r.createPromiseClient(dn, {
|
|
963
966
|
method: "summary",
|
|
964
967
|
params: [t, e]
|
|
@@ -969,26 +972,26 @@ const ft = new Ye(), Vi = (t, e, r) => {
|
|
|
969
972
|
userId: p
|
|
970
973
|
})).data?.attributes
|
|
971
974
|
});
|
|
972
|
-
},
|
|
975
|
+
}, Wi = (t) => {
|
|
973
976
|
const { client: e } = t.createPromiseClient(dn, { method: "list" });
|
|
974
977
|
return (r) => e.list(r);
|
|
975
|
-
},
|
|
976
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
978
|
+
}, Hi = (t, e) => {
|
|
979
|
+
const { client: r, queryKey: i } = e.createPromiseClient(gr, {
|
|
977
980
|
method: "getFriends",
|
|
978
981
|
params: [t]
|
|
979
982
|
});
|
|
980
983
|
return e.nanoquery.createFetcherStore(i, {
|
|
981
984
|
fetcher: async (s, a, c) => c ? (await r.getFriends({})).data : []
|
|
982
985
|
});
|
|
983
|
-
},
|
|
984
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
986
|
+
}, Ji = (t, e) => {
|
|
987
|
+
const { client: r, queryKey: i } = e.createPromiseClient(Ce, { method: "get", params: [t] });
|
|
985
988
|
return e.nanoquery.createFetcherStore(i, {
|
|
986
989
|
fetcher: async (s, a, c) => (await r.get({
|
|
987
990
|
eventId: c
|
|
988
991
|
})).data?.attributes
|
|
989
992
|
});
|
|
990
|
-
},
|
|
991
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
993
|
+
}, Yi = (t, e) => {
|
|
994
|
+
const { client: r, queryKey: i } = e.createPromiseClient(Ce, { method: "syncQuestion", params: [t] });
|
|
992
995
|
return e.nanoquery.createFetcherStore(i, {
|
|
993
996
|
fetcher: async (s, a, c) => c ? (await r.syncQuestion({
|
|
994
997
|
filter: {
|
|
@@ -996,21 +999,21 @@ const ft = new Ye(), Vi = (t, e, r) => {
|
|
|
996
999
|
}
|
|
997
1000
|
})).data?.attributes : void 0
|
|
998
1001
|
});
|
|
999
|
-
},
|
|
1000
|
-
const { client: r } = e.createStreamClient(
|
|
1002
|
+
}, Xi = (t, e) => {
|
|
1003
|
+
const { client: r } = e.createStreamClient(Ce), i = Lt({ eventId: t.get() || "", feedId: "" });
|
|
1001
1004
|
return t.subscribe((a = "") => {
|
|
1002
1005
|
i.set({ eventId: a, feedId: "" });
|
|
1003
1006
|
}), e.addSubscription(r.subscription, i, { name: "feedSubscription" });
|
|
1004
|
-
},
|
|
1005
|
-
const { client: r } = e.createStreamClient(
|
|
1007
|
+
}, Zi = (t, e) => {
|
|
1008
|
+
const { client: r } = e.createStreamClient(Ce);
|
|
1006
1009
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1007
1010
|
}, vn = async (t, e) => {
|
|
1008
|
-
const { client: r } = e.createPromiseClient(
|
|
1011
|
+
const { client: r } = e.createPromiseClient(Ce, { method: "questionByUser", params: [t] });
|
|
1009
1012
|
return (await r.questionByUser({
|
|
1010
1013
|
questionId: t
|
|
1011
1014
|
})).data?.attributes?.question;
|
|
1012
|
-
},
|
|
1013
|
-
const { client: i, queryKey: s } = r.createPromiseClient(
|
|
1015
|
+
}, eo = (t, e, r) => {
|
|
1016
|
+
const { client: i, queryKey: s } = r.createPromiseClient(Ce, {
|
|
1014
1017
|
method: "list",
|
|
1015
1018
|
params: [t, e]
|
|
1016
1019
|
});
|
|
@@ -1025,12 +1028,12 @@ const ft = new Ye(), Vi = (t, e, r) => {
|
|
|
1025
1028
|
});
|
|
1026
1029
|
};
|
|
1027
1030
|
var Sn = {}, Nt = {};
|
|
1028
|
-
Nt.byteLength =
|
|
1029
|
-
Nt.toByteArray =
|
|
1030
|
-
Nt.fromByteArray =
|
|
1031
|
-
var
|
|
1032
|
-
for (var Ke = 0,
|
|
1033
|
-
|
|
1031
|
+
Nt.byteLength = no;
|
|
1032
|
+
Nt.toByteArray = oo;
|
|
1033
|
+
Nt.fromByteArray = uo;
|
|
1034
|
+
var we = [], ie = [], to = typeof Uint8Array < "u" ? Uint8Array : Array, qt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1035
|
+
for (var Ke = 0, ro = qt.length; Ke < ro; ++Ke)
|
|
1036
|
+
we[Ke] = qt[Ke], ie[qt.charCodeAt(Ke)] = Ke;
|
|
1034
1037
|
ie[45] = 62;
|
|
1035
1038
|
ie[95] = 63;
|
|
1036
1039
|
function An(t) {
|
|
@@ -1042,39 +1045,39 @@ function An(t) {
|
|
|
1042
1045
|
var i = r === e ? 0 : 4 - r % 4;
|
|
1043
1046
|
return [r, i];
|
|
1044
1047
|
}
|
|
1045
|
-
function
|
|
1048
|
+
function no(t) {
|
|
1046
1049
|
var e = An(t), r = e[0], i = e[1];
|
|
1047
1050
|
return (r + i) * 3 / 4 - i;
|
|
1048
1051
|
}
|
|
1049
|
-
function
|
|
1052
|
+
function io(t, e, r) {
|
|
1050
1053
|
return (e + r) * 3 / 4 - r;
|
|
1051
1054
|
}
|
|
1052
|
-
function
|
|
1053
|
-
var e, r = An(t), i = r[0], s = r[1], a = new
|
|
1055
|
+
function oo(t) {
|
|
1056
|
+
var e, r = An(t), i = r[0], s = r[1], a = new to(io(t, i, s)), c = 0, d = s > 0 ? i - 4 : i, p;
|
|
1054
1057
|
for (p = 0; p < d; p += 4)
|
|
1055
1058
|
e = ie[t.charCodeAt(p)] << 18 | ie[t.charCodeAt(p + 1)] << 12 | ie[t.charCodeAt(p + 2)] << 6 | ie[t.charCodeAt(p + 3)], a[c++] = e >> 16 & 255, a[c++] = e >> 8 & 255, a[c++] = e & 255;
|
|
1056
1059
|
return s === 2 && (e = ie[t.charCodeAt(p)] << 2 | ie[t.charCodeAt(p + 1)] >> 4, a[c++] = e & 255), s === 1 && (e = ie[t.charCodeAt(p)] << 10 | ie[t.charCodeAt(p + 1)] << 4 | ie[t.charCodeAt(p + 2)] >> 2, a[c++] = e >> 8 & 255, a[c++] = e & 255), a;
|
|
1057
1060
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1061
|
+
function so(t) {
|
|
1062
|
+
return we[t >> 18 & 63] + we[t >> 12 & 63] + we[t >> 6 & 63] + we[t & 63];
|
|
1060
1063
|
}
|
|
1061
|
-
function
|
|
1064
|
+
function ao(t, e, r) {
|
|
1062
1065
|
for (var i, s = [], a = e; a < r; a += 3)
|
|
1063
|
-
i = (t[a] << 16 & 16711680) + (t[a + 1] << 8 & 65280) + (t[a + 2] & 255), s.push(
|
|
1066
|
+
i = (t[a] << 16 & 16711680) + (t[a + 1] << 8 & 65280) + (t[a + 2] & 255), s.push(so(i));
|
|
1064
1067
|
return s.join("");
|
|
1065
1068
|
}
|
|
1066
|
-
function
|
|
1069
|
+
function uo(t) {
|
|
1067
1070
|
for (var e, r = t.length, i = r % 3, s = [], a = 16383, c = 0, d = r - i; c < d; c += a)
|
|
1068
|
-
s.push(
|
|
1071
|
+
s.push(ao(t, c, c + a > d ? d : c + a));
|
|
1069
1072
|
return i === 1 ? (e = t[r - 1], s.push(
|
|
1070
|
-
|
|
1073
|
+
we[e >> 2] + we[e << 4 & 63] + "=="
|
|
1071
1074
|
)) : i === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
1072
|
-
|
|
1075
|
+
we[e >> 10] + we[e >> 4 & 63] + we[e << 2 & 63] + "="
|
|
1073
1076
|
)), s.join("");
|
|
1074
1077
|
}
|
|
1075
|
-
var
|
|
1078
|
+
var mr = {};
|
|
1076
1079
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1077
|
-
|
|
1080
|
+
mr.read = function(t, e, r, i, s) {
|
|
1078
1081
|
var a, c, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, l = -7, w = r ? s - 1 : 0, E = r ? -1 : 1, F = t[e + w];
|
|
1079
1082
|
for (w += E, a = F & (1 << -l) - 1, F >>= -l, l += d; l > 0; a = a * 256 + t[e + w], w += E, l -= 8)
|
|
1080
1083
|
;
|
|
@@ -1089,13 +1092,13 @@ gr.read = function(t, e, r, i, s) {
|
|
|
1089
1092
|
}
|
|
1090
1093
|
return (F ? -1 : 1) * c * Math.pow(2, a - i);
|
|
1091
1094
|
};
|
|
1092
|
-
|
|
1093
|
-
var c, d, p, m = a * 8 - s - 1, l = (1 << m) - 1, w = l >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = i ? 0 : a - 1,
|
|
1094
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (d = isNaN(e) ? 1 : 0, c = l) : (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 >= l ? (d = 0, c = l) : c + w >= 1 ? (d = (e * p - 1) * Math.pow(2, s), c = c + w) : (d = e * Math.pow(2, w - 1) * Math.pow(2, s), c = 0)); s >= 8; t[r + F] = d & 255, F +=
|
|
1095
|
+
mr.write = function(t, e, r, i, s, a) {
|
|
1096
|
+
var c, d, p, m = a * 8 - s - 1, l = (1 << m) - 1, w = l >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = i ? 0 : a - 1, T = i ? 1 : -1, x = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
1097
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (d = isNaN(e) ? 1 : 0, c = l) : (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 >= l ? (d = 0, c = l) : c + w >= 1 ? (d = (e * p - 1) * Math.pow(2, s), c = c + w) : (d = e * Math.pow(2, w - 1) * Math.pow(2, s), c = 0)); s >= 8; t[r + F] = d & 255, F += T, d /= 256, s -= 8)
|
|
1095
1098
|
;
|
|
1096
|
-
for (c = c << s | d, m += s; m > 0; t[r + F] = c & 255, F +=
|
|
1099
|
+
for (c = c << s | d, m += s; m > 0; t[r + F] = c & 255, F += T, c /= 256, m -= 8)
|
|
1097
1100
|
;
|
|
1098
|
-
t[r + F -
|
|
1101
|
+
t[r + F - T] |= x * 128;
|
|
1099
1102
|
};
|
|
1100
1103
|
/*!
|
|
1101
1104
|
* The buffer module from node.js, for the browser.
|
|
@@ -1104,7 +1107,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1104
1107
|
* @license MIT
|
|
1105
1108
|
*/
|
|
1106
1109
|
(function(t) {
|
|
1107
|
-
const e = Nt, r =
|
|
1110
|
+
const e = Nt, r = mr, i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1108
1111
|
t.Buffer = l, t.SlowBuffer = C, t.INSPECT_MAX_BYTES = 50;
|
|
1109
1112
|
const s = 2147483647;
|
|
1110
1113
|
t.kMaxLength = s;
|
|
@@ -1147,7 +1150,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1147
1150
|
throw new TypeError(
|
|
1148
1151
|
'The "string" argument must be of type string. Received type number'
|
|
1149
1152
|
);
|
|
1150
|
-
return
|
|
1153
|
+
return T(u);
|
|
1151
1154
|
}
|
|
1152
1155
|
return w(u, n, o);
|
|
1153
1156
|
}
|
|
@@ -1162,7 +1165,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1162
1165
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof u
|
|
1163
1166
|
);
|
|
1164
1167
|
if (pe(u, c) || u && pe(u.buffer, c) || typeof d < "u" && (pe(u, d) || u && pe(u.buffer, d)))
|
|
1165
|
-
return
|
|
1168
|
+
return _(u, n, o);
|
|
1166
1169
|
if (typeof u == "number")
|
|
1167
1170
|
throw new TypeError(
|
|
1168
1171
|
'The "value" argument must not be of type number. Received type number'
|
|
@@ -1194,13 +1197,13 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1194
1197
|
l.alloc = function(u, n, o) {
|
|
1195
1198
|
return F(u, n, o);
|
|
1196
1199
|
};
|
|
1197
|
-
function
|
|
1200
|
+
function T(u) {
|
|
1198
1201
|
return E(u), m(u < 0 ? 0 : L(u) | 0);
|
|
1199
1202
|
}
|
|
1200
1203
|
l.allocUnsafe = function(u) {
|
|
1201
|
-
return
|
|
1204
|
+
return T(u);
|
|
1202
1205
|
}, l.allocUnsafeSlow = function(u) {
|
|
1203
|
-
return
|
|
1206
|
+
return T(u);
|
|
1204
1207
|
};
|
|
1205
1208
|
function x(u, n) {
|
|
1206
1209
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !l.isEncoding(n))
|
|
@@ -1210,7 +1213,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1210
1213
|
const h = f.write(u, n);
|
|
1211
1214
|
return h !== o && (f = f.slice(0, h)), f;
|
|
1212
1215
|
}
|
|
1213
|
-
function
|
|
1216
|
+
function D(u) {
|
|
1214
1217
|
const n = u.length < 0 ? 0 : L(u.length) | 0, o = m(n);
|
|
1215
1218
|
for (let f = 0; f < n; f += 1)
|
|
1216
1219
|
o[f] = u[f] & 255;
|
|
@@ -1219,11 +1222,11 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1219
1222
|
function I(u) {
|
|
1220
1223
|
if (pe(u, a)) {
|
|
1221
1224
|
const n = new a(u);
|
|
1222
|
-
return
|
|
1225
|
+
return _(n.buffer, n.byteOffset, n.byteLength);
|
|
1223
1226
|
}
|
|
1224
|
-
return
|
|
1227
|
+
return D(u);
|
|
1225
1228
|
}
|
|
1226
|
-
function
|
|
1229
|
+
function _(u, n, o) {
|
|
1227
1230
|
if (n < 0 || u.byteLength < n)
|
|
1228
1231
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
1229
1232
|
if (u.byteLength < n + (o || 0))
|
|
@@ -1237,9 +1240,9 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1237
1240
|
return o.length === 0 || u.copy(o, 0, 0, n), o;
|
|
1238
1241
|
}
|
|
1239
1242
|
if (u.length !== void 0)
|
|
1240
|
-
return typeof u.length != "number" ||
|
|
1243
|
+
return typeof u.length != "number" || Vt(u.length) ? m(0) : D(u);
|
|
1241
1244
|
if (u.type === "Buffer" && Array.isArray(u.data))
|
|
1242
|
-
return
|
|
1245
|
+
return D(u.data);
|
|
1243
1246
|
}
|
|
1244
1247
|
function L(u) {
|
|
1245
1248
|
if (u >= s)
|
|
@@ -1339,7 +1342,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1339
1342
|
case "hex":
|
|
1340
1343
|
return o >>> 1;
|
|
1341
1344
|
case "base64":
|
|
1342
|
-
return
|
|
1345
|
+
return Br(u).length;
|
|
1343
1346
|
default:
|
|
1344
1347
|
if (h)
|
|
1345
1348
|
return f ? -1 : lt(u).length;
|
|
@@ -1359,12 +1362,12 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1359
1362
|
case "utf-8":
|
|
1360
1363
|
return Ge(this, n, o);
|
|
1361
1364
|
case "ascii":
|
|
1362
|
-
return
|
|
1365
|
+
return Be(this, n, o);
|
|
1363
1366
|
case "latin1":
|
|
1364
1367
|
case "binary":
|
|
1365
1368
|
return ze(this, n, o);
|
|
1366
1369
|
case "base64":
|
|
1367
|
-
return
|
|
1370
|
+
return ke(this, n, o);
|
|
1368
1371
|
case "ucs2":
|
|
1369
1372
|
case "ucs-2":
|
|
1370
1373
|
case "utf16le":
|
|
@@ -1428,19 +1431,19 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1428
1431
|
return 1;
|
|
1429
1432
|
if (o >>>= 0, f >>>= 0, h >>>= 0, y >>>= 0, this === n)
|
|
1430
1433
|
return 0;
|
|
1431
|
-
let b = y - h,
|
|
1432
|
-
const W = Math.min(b,
|
|
1434
|
+
let b = y - h, N = f - o;
|
|
1435
|
+
const W = Math.min(b, N), K = this.slice(h, y), H = n.slice(o, f);
|
|
1433
1436
|
for (let z = 0; z < W; ++z)
|
|
1434
1437
|
if (K[z] !== H[z]) {
|
|
1435
|
-
b = K[z],
|
|
1438
|
+
b = K[z], N = H[z];
|
|
1436
1439
|
break;
|
|
1437
1440
|
}
|
|
1438
|
-
return b <
|
|
1441
|
+
return b < N ? -1 : N < b ? 1 : 0;
|
|
1439
1442
|
};
|
|
1440
1443
|
function ne(u, n, o, f, h) {
|
|
1441
1444
|
if (u.length === 0)
|
|
1442
1445
|
return -1;
|
|
1443
|
-
if (typeof o == "string" ? (f = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o,
|
|
1446
|
+
if (typeof o == "string" ? (f = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o, Vt(o) && (o = h ? 0 : u.length - 1), o < 0 && (o = u.length + o), o >= u.length) {
|
|
1444
1447
|
if (h)
|
|
1445
1448
|
return -1;
|
|
1446
1449
|
o = u.length - 1;
|
|
@@ -1450,17 +1453,17 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1450
1453
|
else
|
|
1451
1454
|
return -1;
|
|
1452
1455
|
if (typeof n == "string" && (n = l.from(n, f)), l.isBuffer(n))
|
|
1453
|
-
return n.length === 0 ? -1 :
|
|
1456
|
+
return n.length === 0 ? -1 : be(u, n, o, f, h);
|
|
1454
1457
|
if (typeof n == "number")
|
|
1455
|
-
return n = n & 255, typeof a.prototype.indexOf == "function" ? h ? a.prototype.indexOf.call(u, n, o) : a.prototype.lastIndexOf.call(u, n, o) :
|
|
1458
|
+
return n = n & 255, typeof a.prototype.indexOf == "function" ? h ? a.prototype.indexOf.call(u, n, o) : a.prototype.lastIndexOf.call(u, n, o) : be(u, [n], o, f, h);
|
|
1456
1459
|
throw new TypeError("val must be string, number or Buffer");
|
|
1457
1460
|
}
|
|
1458
|
-
function
|
|
1459
|
-
let y = 1, b = u.length,
|
|
1461
|
+
function be(u, n, o, f, h) {
|
|
1462
|
+
let y = 1, b = u.length, N = n.length;
|
|
1460
1463
|
if (f !== void 0 && (f = String(f).toLowerCase(), f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le")) {
|
|
1461
1464
|
if (u.length < 2 || n.length < 2)
|
|
1462
1465
|
return -1;
|
|
1463
|
-
y = 2, b /= 2,
|
|
1466
|
+
y = 2, b /= 2, N /= 2, o /= 2;
|
|
1464
1467
|
}
|
|
1465
1468
|
function W(H, z) {
|
|
1466
1469
|
return y === 1 ? H[z] : H.readUInt16BE(z * y);
|
|
@@ -1470,14 +1473,14 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1470
1473
|
let H = -1;
|
|
1471
1474
|
for (K = o; K < b; K++)
|
|
1472
1475
|
if (W(u, K) === W(n, H === -1 ? 0 : K - H)) {
|
|
1473
|
-
if (H === -1 && (H = K), K - H + 1 ===
|
|
1476
|
+
if (H === -1 && (H = K), K - H + 1 === N)
|
|
1474
1477
|
return H * y;
|
|
1475
1478
|
} else
|
|
1476
1479
|
H !== -1 && (K -= K - H), H = -1;
|
|
1477
1480
|
} else
|
|
1478
|
-
for (o +
|
|
1481
|
+
for (o + N > b && (o = b - N), K = o; K >= 0; K--) {
|
|
1479
1482
|
let H = !0;
|
|
1480
|
-
for (let z = 0; z <
|
|
1483
|
+
for (let z = 0; z < N; z++)
|
|
1481
1484
|
if (W(u, K + z) !== W(n, z)) {
|
|
1482
1485
|
H = !1;
|
|
1483
1486
|
break;
|
|
@@ -1494,7 +1497,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1494
1497
|
}, l.prototype.lastIndexOf = function(n, o, f) {
|
|
1495
1498
|
return ne(this, n, o, f, !1);
|
|
1496
1499
|
};
|
|
1497
|
-
function
|
|
1500
|
+
function ve(u, n, o, f) {
|
|
1498
1501
|
o = Number(o) || 0;
|
|
1499
1502
|
const h = u.length - o;
|
|
1500
1503
|
f ? (f = Number(f), f > h && (f = h)) : f = h;
|
|
@@ -1502,24 +1505,24 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1502
1505
|
f > y / 2 && (f = y / 2);
|
|
1503
1506
|
let b;
|
|
1504
1507
|
for (b = 0; b < f; ++b) {
|
|
1505
|
-
const
|
|
1506
|
-
if (
|
|
1508
|
+
const N = parseInt(n.substr(b * 2, 2), 16);
|
|
1509
|
+
if (Vt(N))
|
|
1507
1510
|
return b;
|
|
1508
|
-
u[o + b] =
|
|
1511
|
+
u[o + b] = N;
|
|
1509
1512
|
}
|
|
1510
1513
|
return b;
|
|
1511
1514
|
}
|
|
1512
1515
|
function ae(u, n, o, f) {
|
|
1513
|
-
return
|
|
1516
|
+
return wt(lt(n, u.length - o), u, o, f);
|
|
1514
1517
|
}
|
|
1515
1518
|
function ct(u, n, o, f) {
|
|
1516
|
-
return
|
|
1519
|
+
return wt(kr(n), u, o, f);
|
|
1517
1520
|
}
|
|
1518
1521
|
function he(u, n, o, f) {
|
|
1519
|
-
return
|
|
1522
|
+
return wt(Br(n), u, o, f);
|
|
1520
1523
|
}
|
|
1521
|
-
function
|
|
1522
|
-
return
|
|
1524
|
+
function Re(u, n, o, f) {
|
|
1525
|
+
return wt(ri(n, u.length - o), u, o, f);
|
|
1523
1526
|
}
|
|
1524
1527
|
l.prototype.write = function(n, o, f, h) {
|
|
1525
1528
|
if (o === void 0)
|
|
@@ -1540,7 +1543,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1540
1543
|
for (; ; )
|
|
1541
1544
|
switch (h) {
|
|
1542
1545
|
case "hex":
|
|
1543
|
-
return
|
|
1546
|
+
return ve(this, n, o, f);
|
|
1544
1547
|
case "utf8":
|
|
1545
1548
|
case "utf-8":
|
|
1546
1549
|
return ae(this, n, o, f);
|
|
@@ -1554,7 +1557,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1554
1557
|
case "ucs-2":
|
|
1555
1558
|
case "utf16le":
|
|
1556
1559
|
case "utf-16le":
|
|
1557
|
-
return
|
|
1560
|
+
return Re(this, n, o, f);
|
|
1558
1561
|
default:
|
|
1559
1562
|
if (b)
|
|
1560
1563
|
throw new TypeError("Unknown encoding: " + h);
|
|
@@ -1566,7 +1569,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1566
1569
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1567
1570
|
};
|
|
1568
1571
|
};
|
|
1569
|
-
function
|
|
1572
|
+
function ke(u, n, o) {
|
|
1570
1573
|
return n === 0 && o === u.length ? e.fromByteArray(u) : e.fromByteArray(u.slice(n, o));
|
|
1571
1574
|
}
|
|
1572
1575
|
function Ge(u, n, o) {
|
|
@@ -1575,10 +1578,10 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1575
1578
|
let h = n;
|
|
1576
1579
|
for (; h < o; ) {
|
|
1577
1580
|
const y = u[h];
|
|
1578
|
-
let b = null,
|
|
1579
|
-
if (h +
|
|
1581
|
+
let b = null, N = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
1582
|
+
if (h + N <= o) {
|
|
1580
1583
|
let W, K, H, z;
|
|
1581
|
-
switch (
|
|
1584
|
+
switch (N) {
|
|
1582
1585
|
case 1:
|
|
1583
1586
|
y < 128 && (b = y);
|
|
1584
1587
|
break;
|
|
@@ -1592,24 +1595,24 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1592
1595
|
W = u[h + 1], K = u[h + 2], H = u[h + 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));
|
|
1593
1596
|
}
|
|
1594
1597
|
}
|
|
1595
|
-
b === null ? (b = 65533,
|
|
1598
|
+
b === null ? (b = 65533, N = 1) : b > 65535 && (b -= 65536, f.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), f.push(b), h += N;
|
|
1596
1599
|
}
|
|
1597
1600
|
return ue(f);
|
|
1598
1601
|
}
|
|
1599
|
-
const
|
|
1602
|
+
const Se = 4096;
|
|
1600
1603
|
function ue(u) {
|
|
1601
1604
|
const n = u.length;
|
|
1602
|
-
if (n <=
|
|
1605
|
+
if (n <= Se)
|
|
1603
1606
|
return String.fromCharCode.apply(String, u);
|
|
1604
1607
|
let o = "", f = 0;
|
|
1605
1608
|
for (; f < n; )
|
|
1606
1609
|
o += String.fromCharCode.apply(
|
|
1607
1610
|
String,
|
|
1608
|
-
u.slice(f, f +=
|
|
1611
|
+
u.slice(f, f += Se)
|
|
1609
1612
|
);
|
|
1610
1613
|
return o;
|
|
1611
1614
|
}
|
|
1612
|
-
function
|
|
1615
|
+
function Be(u, n, o) {
|
|
1613
1616
|
let f = "";
|
|
1614
1617
|
o = Math.min(u.length, o);
|
|
1615
1618
|
for (let h = n; h < o; ++h)
|
|
@@ -1672,16 +1675,16 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1672
1675
|
return n = n >>> 0, o || S(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
|
|
1673
1676
|
}, l.prototype.readUint32BE = l.prototype.readUInt32BE = function(n, o) {
|
|
1674
1677
|
return n = n >>> 0, o || S(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
|
|
1675
|
-
}, l.prototype.readBigUInt64LE =
|
|
1676
|
-
n = n >>> 0,
|
|
1678
|
+
}, l.prototype.readBigUInt64LE = Pe(function(n) {
|
|
1679
|
+
n = n >>> 0, Ae(n, "offset");
|
|
1677
1680
|
const o = this[n], f = this[n + 7];
|
|
1678
|
-
(o === void 0 || f === void 0) &&
|
|
1681
|
+
(o === void 0 || f === void 0) && $e(n, this.length - 8);
|
|
1679
1682
|
const h = o + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + f * 2 ** 24;
|
|
1680
1683
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
1681
|
-
}), l.prototype.readBigUInt64BE =
|
|
1682
|
-
n = n >>> 0,
|
|
1684
|
+
}), l.prototype.readBigUInt64BE = Pe(function(n) {
|
|
1685
|
+
n = n >>> 0, Ae(n, "offset");
|
|
1683
1686
|
const o = this[n], f = this[n + 7];
|
|
1684
|
-
(o === void 0 || f === void 0) &&
|
|
1687
|
+
(o === void 0 || f === void 0) && $e(n, this.length - 8);
|
|
1685
1688
|
const h = o * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f;
|
|
1686
1689
|
return (BigInt(h) << BigInt(32)) + BigInt(y);
|
|
1687
1690
|
}), l.prototype.readIntLE = function(n, o, f) {
|
|
@@ -1710,16 +1713,16 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1710
1713
|
return n = n >>> 0, o || S(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
|
|
1711
1714
|
}, l.prototype.readInt32BE = function(n, o) {
|
|
1712
1715
|
return n = n >>> 0, o || S(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
|
|
1713
|
-
}, l.prototype.readBigInt64LE =
|
|
1714
|
-
n = n >>> 0,
|
|
1716
|
+
}, l.prototype.readBigInt64LE = Pe(function(n) {
|
|
1717
|
+
n = n >>> 0, Ae(n, "offset");
|
|
1715
1718
|
const o = this[n], f = this[n + 7];
|
|
1716
|
-
(o === void 0 || f === void 0) &&
|
|
1719
|
+
(o === void 0 || f === void 0) && $e(n, this.length - 8);
|
|
1717
1720
|
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (f << 24);
|
|
1718
1721
|
return (BigInt(h) << BigInt(32)) + BigInt(o + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
1719
|
-
}), l.prototype.readBigInt64BE =
|
|
1720
|
-
n = n >>> 0,
|
|
1722
|
+
}), l.prototype.readBigInt64BE = Pe(function(n) {
|
|
1723
|
+
n = n >>> 0, Ae(n, "offset");
|
|
1721
1724
|
const o = this[n], f = this[n + 7];
|
|
1722
|
-
(o === void 0 || f === void 0) &&
|
|
1725
|
+
(o === void 0 || f === void 0) && $e(n, this.length - 8);
|
|
1723
1726
|
const h = (o << 24) + // Overflow
|
|
1724
1727
|
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
|
|
1725
1728
|
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f);
|
|
@@ -1742,8 +1745,8 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1742
1745
|
}
|
|
1743
1746
|
l.prototype.writeUintLE = l.prototype.writeUIntLE = function(n, o, f, h) {
|
|
1744
1747
|
if (n = +n, o = o >>> 0, f = f >>> 0, !h) {
|
|
1745
|
-
const
|
|
1746
|
-
O(this, n, o, f,
|
|
1748
|
+
const N = Math.pow(2, 8 * f) - 1;
|
|
1749
|
+
O(this, n, o, f, N, 0);
|
|
1747
1750
|
}
|
|
1748
1751
|
let y = 1, b = 0;
|
|
1749
1752
|
for (this[o] = n & 255; ++b < f && (y *= 256); )
|
|
@@ -1751,8 +1754,8 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1751
1754
|
return o + f;
|
|
1752
1755
|
}, l.prototype.writeUintBE = l.prototype.writeUIntBE = function(n, o, f, h) {
|
|
1753
1756
|
if (n = +n, o = o >>> 0, f = f >>> 0, !h) {
|
|
1754
|
-
const
|
|
1755
|
-
O(this, n, o, f,
|
|
1757
|
+
const N = Math.pow(2, 8 * f) - 1;
|
|
1758
|
+
O(this, n, o, f, N, 0);
|
|
1756
1759
|
}
|
|
1757
1760
|
let y = f - 1, b = 1;
|
|
1758
1761
|
for (this[o + y] = n & 255; --y >= 0 && (b *= 256); )
|
|
@@ -1783,27 +1786,27 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1783
1786
|
let b = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
1784
1787
|
return u[o + 3] = b, b = b >> 8, u[o + 2] = b, b = b >> 8, u[o + 1] = b, b = b >> 8, u[o] = b, o + 8;
|
|
1785
1788
|
}
|
|
1786
|
-
l.prototype.writeBigUInt64LE =
|
|
1789
|
+
l.prototype.writeBigUInt64LE = Pe(function(n, o = 0) {
|
|
1787
1790
|
return M(this, n, o, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1788
|
-
}), l.prototype.writeBigUInt64BE =
|
|
1791
|
+
}), l.prototype.writeBigUInt64BE = Pe(function(n, o = 0) {
|
|
1789
1792
|
return V(this, n, o, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1790
1793
|
}), l.prototype.writeIntLE = function(n, o, f, h) {
|
|
1791
1794
|
if (n = +n, o = o >>> 0, !h) {
|
|
1792
1795
|
const W = Math.pow(2, 8 * f - 1);
|
|
1793
1796
|
O(this, n, o, f, W - 1, -W);
|
|
1794
1797
|
}
|
|
1795
|
-
let y = 0, b = 1,
|
|
1798
|
+
let y = 0, b = 1, N = 0;
|
|
1796
1799
|
for (this[o] = n & 255; ++y < f && (b *= 256); )
|
|
1797
|
-
n < 0 &&
|
|
1800
|
+
n < 0 && N === 0 && this[o + y - 1] !== 0 && (N = 1), this[o + y] = (n / b >> 0) - N & 255;
|
|
1798
1801
|
return o + f;
|
|
1799
1802
|
}, l.prototype.writeIntBE = function(n, o, f, h) {
|
|
1800
1803
|
if (n = +n, o = o >>> 0, !h) {
|
|
1801
1804
|
const W = Math.pow(2, 8 * f - 1);
|
|
1802
1805
|
O(this, n, o, f, W - 1, -W);
|
|
1803
1806
|
}
|
|
1804
|
-
let y = f - 1, b = 1,
|
|
1807
|
+
let y = f - 1, b = 1, N = 0;
|
|
1805
1808
|
for (this[o + y] = n & 255; --y >= 0 && (b *= 256); )
|
|
1806
|
-
n < 0 &&
|
|
1809
|
+
n < 0 && N === 0 && this[o + y + 1] !== 0 && (N = 1), this[o + y] = (n / b >> 0) - N & 255;
|
|
1807
1810
|
return o + f;
|
|
1808
1811
|
}, l.prototype.writeInt8 = function(n, o, f) {
|
|
1809
1812
|
return n = +n, o = o >>> 0, f || O(this, n, o, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[o] = n & 255, o + 1;
|
|
@@ -1815,9 +1818,9 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1815
1818
|
return n = +n, o = o >>> 0, f || O(this, n, o, 4, 2147483647, -2147483648), this[o] = n & 255, this[o + 1] = n >>> 8, this[o + 2] = n >>> 16, this[o + 3] = n >>> 24, o + 4;
|
|
1816
1819
|
}, l.prototype.writeInt32BE = function(n, o, f) {
|
|
1817
1820
|
return n = +n, o = o >>> 0, f || O(this, n, o, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[o] = n >>> 24, this[o + 1] = n >>> 16, this[o + 2] = n >>> 8, this[o + 3] = n & 255, o + 4;
|
|
1818
|
-
}, l.prototype.writeBigInt64LE =
|
|
1821
|
+
}, l.prototype.writeBigInt64LE = Pe(function(n, o = 0) {
|
|
1819
1822
|
return M(this, n, o, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1820
|
-
}), l.prototype.writeBigInt64BE =
|
|
1823
|
+
}), l.prototype.writeBigInt64BE = Pe(function(n, o = 0) {
|
|
1821
1824
|
return V(this, n, o, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1822
1825
|
});
|
|
1823
1826
|
function R(u, n, o, f, h, y) {
|
|
@@ -1881,11 +1884,11 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1881
1884
|
for (y = o; y < f; ++y)
|
|
1882
1885
|
this[y] = n;
|
|
1883
1886
|
else {
|
|
1884
|
-
const b = l.isBuffer(n) ? n : l.from(n, h),
|
|
1885
|
-
if (
|
|
1887
|
+
const b = l.isBuffer(n) ? n : l.from(n, h), N = b.length;
|
|
1888
|
+
if (N === 0)
|
|
1886
1889
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
1887
1890
|
for (y = 0; y < f - o; ++y)
|
|
1888
|
-
this[y + o] = b[y %
|
|
1891
|
+
this[y + o] = b[y % N];
|
|
1889
1892
|
}
|
|
1890
1893
|
return this;
|
|
1891
1894
|
};
|
|
@@ -1931,42 +1934,42 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
1931
1934
|
"ERR_OUT_OF_RANGE",
|
|
1932
1935
|
function(u, n, o) {
|
|
1933
1936
|
let f = `The value of "${u}" is out of range.`, h = o;
|
|
1934
|
-
return Number.isInteger(o) && Math.abs(o) > 2 ** 32 ? h =
|
|
1937
|
+
return Number.isInteger(o) && Math.abs(o) > 2 ** 32 ? h = De(String(o)) : typeof o == "bigint" && (h = String(o), (o > BigInt(2) ** BigInt(32) || o < -(BigInt(2) ** BigInt(32))) && (h = De(h)), h += "n"), f += ` It must be ${n}. Received ${h}`, f;
|
|
1935
1938
|
},
|
|
1936
1939
|
RangeError
|
|
1937
1940
|
);
|
|
1938
|
-
function
|
|
1941
|
+
function De(u) {
|
|
1939
1942
|
let n = "", o = u.length;
|
|
1940
1943
|
const f = u[0] === "-" ? 1 : 0;
|
|
1941
1944
|
for (; o >= f + 4; o -= 3)
|
|
1942
1945
|
n = `_${u.slice(o - 3, o)}${n}`;
|
|
1943
1946
|
return `${u.slice(0, o)}${n}`;
|
|
1944
1947
|
}
|
|
1945
|
-
function
|
|
1946
|
-
|
|
1948
|
+
function Le(u, n, o) {
|
|
1949
|
+
Ae(n, "offset"), (u[n] === void 0 || u[n + o] === void 0) && $e(n, u.length - (o + 1));
|
|
1947
1950
|
}
|
|
1948
1951
|
function Ne(u, n, o, f, h, y) {
|
|
1949
1952
|
if (u > o || u < n) {
|
|
1950
1953
|
const b = typeof n == "bigint" ? "n" : "";
|
|
1951
|
-
let
|
|
1952
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ?
|
|
1954
|
+
let N;
|
|
1955
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? N = `>= 0${b} and < 2${b} ** ${(y + 1) * 8}${b}` : N = `>= -(2${b} ** ${(y + 1) * 8 - 1}${b}) and < 2 ** ${(y + 1) * 8 - 1}${b}` : N = `>= ${n}${b} and <= ${o}${b}`, new J.ERR_OUT_OF_RANGE("value", N, u);
|
|
1953
1956
|
}
|
|
1954
|
-
|
|
1957
|
+
Le(f, h, y);
|
|
1955
1958
|
}
|
|
1956
|
-
function
|
|
1959
|
+
function Ae(u, n) {
|
|
1957
1960
|
if (typeof u != "number")
|
|
1958
1961
|
throw new J.ERR_INVALID_ARG_TYPE(n, "number", u);
|
|
1959
1962
|
}
|
|
1960
|
-
function
|
|
1961
|
-
throw Math.floor(u) !== u ? (
|
|
1963
|
+
function $e(u, n, o) {
|
|
1964
|
+
throw Math.floor(u) !== u ? (Ae(u, o), new J.ERR_OUT_OF_RANGE(o || "offset", "an integer", u)) : n < 0 ? new J.ERR_BUFFER_OUT_OF_BOUNDS() : new J.ERR_OUT_OF_RANGE(
|
|
1962
1965
|
o || "offset",
|
|
1963
1966
|
`>= ${o ? 1 : 0} and <= ${n}`,
|
|
1964
1967
|
u
|
|
1965
1968
|
);
|
|
1966
1969
|
}
|
|
1967
|
-
const
|
|
1970
|
+
const Mt = /[^+/0-9A-Za-z-_]/g;
|
|
1968
1971
|
function A(u) {
|
|
1969
|
-
if (u = u.split("=")[0], u = u.trim().replace(
|
|
1972
|
+
if (u = u.split("=")[0], u = u.trim().replace(Mt, ""), u.length < 2)
|
|
1970
1973
|
return "";
|
|
1971
1974
|
for (; u.length % 4 !== 0; )
|
|
1972
1975
|
u = u + "=";
|
|
@@ -2031,7 +2034,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
2031
2034
|
}
|
|
2032
2035
|
return y;
|
|
2033
2036
|
}
|
|
2034
|
-
function
|
|
2037
|
+
function kr(u) {
|
|
2035
2038
|
const n = [];
|
|
2036
2039
|
for (let o = 0; o < u.length; ++o)
|
|
2037
2040
|
n.push(u.charCodeAt(o) & 255);
|
|
@@ -2044,10 +2047,10 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
2044
2047
|
o = u.charCodeAt(b), f = o >> 8, h = o % 256, y.push(h), y.push(f);
|
|
2045
2048
|
return y;
|
|
2046
2049
|
}
|
|
2047
|
-
function
|
|
2050
|
+
function Br(u) {
|
|
2048
2051
|
return e.toByteArray(A(u));
|
|
2049
2052
|
}
|
|
2050
|
-
function
|
|
2053
|
+
function wt(u, n, o, f) {
|
|
2051
2054
|
let h;
|
|
2052
2055
|
for (h = 0; h < f && !(h + o >= n.length || h >= u.length); ++h)
|
|
2053
2056
|
n[h + o] = u[h];
|
|
@@ -2056,7 +2059,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
2056
2059
|
function pe(u, n) {
|
|
2057
2060
|
return u instanceof n || u != null && u.constructor != null && u.constructor.name != null && u.constructor.name === n.name;
|
|
2058
2061
|
}
|
|
2059
|
-
function
|
|
2062
|
+
function Vt(u) {
|
|
2060
2063
|
return u !== u;
|
|
2061
2064
|
}
|
|
2062
2065
|
const ni = function() {
|
|
@@ -2068,7 +2071,7 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
2068
2071
|
}
|
|
2069
2072
|
return n;
|
|
2070
2073
|
}();
|
|
2071
|
-
function
|
|
2074
|
+
function Pe(u) {
|
|
2072
2075
|
return typeof BigInt > "u" ? ii : u;
|
|
2073
2076
|
}
|
|
2074
2077
|
function ii() {
|
|
@@ -2077,48 +2080,48 @@ gr.write = function(t, e, r, i, s, a) {
|
|
|
2077
2080
|
})(Sn);
|
|
2078
2081
|
const jr = Sn.Buffer;
|
|
2079
2082
|
var En = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2080
|
-
function
|
|
2083
|
+
function co(t) {
|
|
2081
2084
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2082
2085
|
}
|
|
2083
|
-
var
|
|
2084
|
-
const
|
|
2085
|
-
function
|
|
2086
|
+
var wr = { exports: {} };
|
|
2087
|
+
const lo = Object.getPrototypeOf({});
|
|
2088
|
+
function br(t) {
|
|
2086
2089
|
function e(I) {
|
|
2087
2090
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
2088
2091
|
}
|
|
2089
2092
|
function r(I) {
|
|
2090
|
-
let
|
|
2093
|
+
let _ = 0;
|
|
2091
2094
|
const j = I.length, L = new Array(j);
|
|
2092
|
-
for (
|
|
2093
|
-
L[
|
|
2095
|
+
for (_ = 0; _ < j; ++_)
|
|
2096
|
+
L[_] = F(I[_]);
|
|
2094
2097
|
return L;
|
|
2095
2098
|
}
|
|
2096
2099
|
function i(I) {
|
|
2097
|
-
const
|
|
2098
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
2100
|
+
const _ = {};
|
|
2101
|
+
if (p && Object.getPrototypeOf(I) !== lo)
|
|
2099
2102
|
return p(I);
|
|
2100
2103
|
const j = d(I);
|
|
2101
2104
|
let L, C, k;
|
|
2102
2105
|
for (L = 0, C = j.length; L < C; ++L)
|
|
2103
|
-
e(k = j[L]) && (
|
|
2104
|
-
return
|
|
2106
|
+
e(k = j[L]) && (_[k] = F(I[k]));
|
|
2107
|
+
return _;
|
|
2105
2108
|
}
|
|
2106
|
-
function s(I,
|
|
2107
|
-
const j = I.length, L =
|
|
2109
|
+
function s(I, _) {
|
|
2110
|
+
const j = I.length, L = _.length;
|
|
2108
2111
|
let C = 0;
|
|
2109
2112
|
const k = new Array(j + L);
|
|
2110
2113
|
for (C = 0; C < j; ++C)
|
|
2111
2114
|
k[C] = F(I[C]);
|
|
2112
2115
|
for (C = 0; C < L; ++C)
|
|
2113
|
-
k[C + j] = F(
|
|
2116
|
+
k[C + j] = F(_[C]);
|
|
2114
2117
|
return k;
|
|
2115
2118
|
}
|
|
2116
2119
|
const a = Object.prototype.propertyIsEnumerable;
|
|
2117
2120
|
function c(I) {
|
|
2118
|
-
const
|
|
2121
|
+
const _ = Object.keys(I), j = Object.getOwnPropertySymbols(I);
|
|
2119
2122
|
for (let L = 0, C = j.length; L < C; ++L)
|
|
2120
|
-
a.call(I, j[L]) &&
|
|
2121
|
-
return
|
|
2123
|
+
a.call(I, j[L]) && _.push(j[L]);
|
|
2124
|
+
return _;
|
|
2122
2125
|
}
|
|
2123
2126
|
const d = t && t.symbols ? c : Object.keys, p = typeof t?.cloneProtoObject == "function" ? t.cloneProtoObject : void 0;
|
|
2124
2127
|
function m(I) {
|
|
@@ -2131,21 +2134,21 @@ function wr(t) {
|
|
|
2131
2134
|
function F(I) {
|
|
2132
2135
|
return m(I) ? Array.isArray(I) ? r(I) : i(I) : I;
|
|
2133
2136
|
}
|
|
2134
|
-
function
|
|
2135
|
-
const j = {}, L = d(I), C = d(
|
|
2137
|
+
function T(I, _) {
|
|
2138
|
+
const j = {}, L = d(I), C = d(_);
|
|
2136
2139
|
let k, B, q;
|
|
2137
2140
|
for (k = 0, B = L.length; k < B; ++k)
|
|
2138
2141
|
e(q = L[k]) && C.indexOf(q) === -1 && (j[q] = F(I[q]));
|
|
2139
2142
|
for (k = 0, B = C.length; k < B; ++k)
|
|
2140
|
-
e(q = C[k]) && (q in I && (L.indexOf(q) !== -1 && (j[q] = x(I[q],
|
|
2141
|
-
(j[q] = F(
|
|
2143
|
+
e(q = C[k]) && (q in I && (L.indexOf(q) !== -1 && (j[q] = x(I[q], _[q])), !0) || // eslint-disable-line no-mixed-operators
|
|
2144
|
+
(j[q] = F(_[q])));
|
|
2142
2145
|
return j;
|
|
2143
2146
|
}
|
|
2144
|
-
function x(I,
|
|
2145
|
-
const j = Array.isArray(
|
|
2146
|
-
return l(
|
|
2147
|
+
function x(I, _) {
|
|
2148
|
+
const j = Array.isArray(_), L = Array.isArray(I);
|
|
2149
|
+
return l(_) ? _ : w(I) ? F(_) : j && L ? E(I, _) : j !== L ? F(_) : T(I, _);
|
|
2147
2150
|
}
|
|
2148
|
-
function
|
|
2151
|
+
function D() {
|
|
2149
2152
|
switch (arguments.length) {
|
|
2150
2153
|
case 0:
|
|
2151
2154
|
return {};
|
|
@@ -2155,22 +2158,22 @@ function wr(t) {
|
|
|
2155
2158
|
return x(arguments[0], arguments[1]);
|
|
2156
2159
|
}
|
|
2157
2160
|
let I;
|
|
2158
|
-
for (let
|
|
2159
|
-
I = x(I, arguments[
|
|
2161
|
+
for (let _ = 0, j = arguments.length; _ < j; ++_)
|
|
2162
|
+
I = x(I, arguments[_]);
|
|
2160
2163
|
return I;
|
|
2161
2164
|
}
|
|
2162
|
-
return t && t.all ?
|
|
2165
|
+
return t && t.all ? D : x;
|
|
2163
2166
|
}
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
var
|
|
2167
|
-
const
|
|
2167
|
+
wr.exports = br;
|
|
2168
|
+
wr.exports.default = br;
|
|
2169
|
+
var fo = wr.exports.deepmerge = br;
|
|
2170
|
+
const ho = (t) => (e, r) => {
|
|
2168
2171
|
let i = 0;
|
|
2169
2172
|
const s = e.length, a = r.length, c = Math.max(s, a), d = new Array(c);
|
|
2170
2173
|
for (i = 0; i < c; ++i)
|
|
2171
2174
|
i < a ? d[i] = t.deepmerge(e[i], r[i]) : d[i] = t.clone(e[i]);
|
|
2172
2175
|
return d;
|
|
2173
|
-
},
|
|
2176
|
+
}, po = fo({ mergeArray: ho }), yo = (t, e, r) => {
|
|
2174
2177
|
const i = ln([e, r], (c, d) => {
|
|
2175
2178
|
if (c) {
|
|
2176
2179
|
const p = d.data?.find((m) => m.id === c);
|
|
@@ -2196,14 +2199,14 @@ const fo = (t) => (e, r) => {
|
|
|
2196
2199
|
if (d && c?.answers)
|
|
2197
2200
|
for (const p of c.answers)
|
|
2198
2201
|
p.youVoted !== !0 && delete p.youVoted;
|
|
2199
|
-
s.set({ data:
|
|
2202
|
+
s.set({ data: po(d, c) });
|
|
2200
2203
|
} };
|
|
2201
2204
|
};
|
|
2202
2205
|
var Ve;
|
|
2203
2206
|
(function(t) {
|
|
2204
2207
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
2205
2208
|
})(Ve || (Ve = {}));
|
|
2206
|
-
class
|
|
2209
|
+
class go {
|
|
2207
2210
|
/** sl event id */
|
|
2208
2211
|
slStreamId;
|
|
2209
2212
|
/** organization id */
|
|
@@ -2233,13 +2236,13 @@ class yo {
|
|
|
2233
2236
|
notifications;
|
|
2234
2237
|
log;
|
|
2235
2238
|
constructor(e) {
|
|
2236
|
-
this.log =
|
|
2237
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2239
|
+
this.log = gt("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(Ve.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new se(re(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new de(Ji(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new de(eo(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new de(Yi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = yo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2240
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Zi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
|
|
2238
2241
|
window.requestAnimationFrame(() => {
|
|
2239
2242
|
this.openedQuestion.updateExtendedQuestion(i.data?.attributes?.question);
|
|
2240
2243
|
});
|
|
2241
2244
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2242
|
-
}), this.feedSubscription =
|
|
2245
|
+
}), this.feedSubscription = Xi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2243
2246
|
const i = this.activeQuestionId.getStore();
|
|
2244
2247
|
i && i.mutate(r.data?.attributes);
|
|
2245
2248
|
}), this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -2280,7 +2283,7 @@ class yo {
|
|
|
2280
2283
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2281
2284
|
};
|
|
2282
2285
|
}
|
|
2283
|
-
class
|
|
2286
|
+
class mo {
|
|
2284
2287
|
notificationsList;
|
|
2285
2288
|
notifications;
|
|
2286
2289
|
store;
|
|
@@ -2290,7 +2293,7 @@ class go {
|
|
|
2290
2293
|
options;
|
|
2291
2294
|
logger;
|
|
2292
2295
|
constructor(e) {
|
|
2293
|
-
this.options = e, this.logger =
|
|
2296
|
+
this.options = e, this.logger = gt("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();
|
|
2294
2297
|
}
|
|
2295
2298
|
addToQueue = (e) => {
|
|
2296
2299
|
if (this.store.has(e.id)) {
|
|
@@ -2359,18 +2362,18 @@ class go {
|
|
|
2359
2362
|
this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding");
|
|
2360
2363
|
};
|
|
2361
2364
|
}
|
|
2362
|
-
var
|
|
2365
|
+
var _t;
|
|
2363
2366
|
(function(t) {
|
|
2364
2367
|
t.OPENED = "opened";
|
|
2365
|
-
})(
|
|
2366
|
-
class
|
|
2368
|
+
})(_t || (_t = {}));
|
|
2369
|
+
class wo extends Rt {
|
|
2367
2370
|
constructor() {
|
|
2368
2371
|
super("notification");
|
|
2369
2372
|
}
|
|
2370
2373
|
setOpened = (e) => {
|
|
2371
|
-
this.write(
|
|
2374
|
+
this.write(_t.OPENED, e, "true");
|
|
2372
2375
|
};
|
|
2373
|
-
isOpened = (e) => this.read(
|
|
2376
|
+
isOpened = (e) => this.read(_t.OPENED, e);
|
|
2374
2377
|
clearNotification = () => {
|
|
2375
2378
|
this.clear();
|
|
2376
2379
|
};
|
|
@@ -2379,11 +2382,11 @@ var Me;
|
|
|
2379
2382
|
(function(t) {
|
|
2380
2383
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2381
2384
|
})(Me || (Me = {}));
|
|
2382
|
-
class
|
|
2385
|
+
class bo {
|
|
2383
2386
|
queue;
|
|
2384
2387
|
storage;
|
|
2385
2388
|
constructor(e = {}) {
|
|
2386
|
-
this.storage = new
|
|
2389
|
+
this.storage = new wo(), this.queue = new mo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2387
2390
|
}
|
|
2388
2391
|
add = (e) => {
|
|
2389
2392
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2396,23 +2399,23 @@ class wo {
|
|
|
2396
2399
|
this.storage.setOpened(e);
|
|
2397
2400
|
};
|
|
2398
2401
|
}
|
|
2399
|
-
const
|
|
2400
|
-
t.notifications = new
|
|
2401
|
-
}, vo = (t, e) => {
|
|
2402
|
-
const { client: r } = t.createPromiseClient(_e, { method: "submitAnswer" });
|
|
2403
|
-
return r.submitAnswer({ data: e });
|
|
2402
|
+
const vo = (t, e, r) => {
|
|
2403
|
+
t.notifications = new bo(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2404
2404
|
}, So = (t, e) => {
|
|
2405
|
-
const { client: r } = t.createPromiseClient(
|
|
2406
|
-
return r.
|
|
2405
|
+
const { client: r } = t.createPromiseClient(Ce, { method: "submitAnswer" });
|
|
2406
|
+
return r.submitAnswer({ data: e });
|
|
2407
2407
|
}, Ao = (t, e) => {
|
|
2408
|
-
const { client: r } = t.createPromiseClient(
|
|
2408
|
+
const { client: r } = t.createPromiseClient(Ce, { method: "submitInplay" });
|
|
2409
|
+
return r.submitInplay({ data: { eventId: +e } });
|
|
2410
|
+
}, Eo = (t, e) => {
|
|
2411
|
+
const { client: r } = t.createPromiseClient(Ce, { method: "skipQuestion" });
|
|
2409
2412
|
return r.skipQuestion({ data: { id: e } });
|
|
2410
2413
|
};
|
|
2411
2414
|
var Xe;
|
|
2412
2415
|
(function(t) {
|
|
2413
2416
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
2414
2417
|
})(Xe || (Xe = {}));
|
|
2415
|
-
class In extends
|
|
2418
|
+
class In extends Rt {
|
|
2416
2419
|
constructor() {
|
|
2417
2420
|
super("gamification");
|
|
2418
2421
|
}
|
|
@@ -2431,7 +2434,7 @@ class In extends Lt {
|
|
|
2431
2434
|
}
|
|
2432
2435
|
const Mr = {
|
|
2433
2436
|
pageSize: 10
|
|
2434
|
-
},
|
|
2437
|
+
}, Io = (t, e, r, i, s) => {
|
|
2435
2438
|
let a = 0;
|
|
2436
2439
|
const c = re({ pageSize: s?.pageSize || Mr.pageSize, page: 0 }), d = Te({
|
|
2437
2440
|
data: [],
|
|
@@ -2439,41 +2442,41 @@ const Mr = {
|
|
|
2439
2442
|
hasMore: !0,
|
|
2440
2443
|
loading: void 0,
|
|
2441
2444
|
error: void 0
|
|
2442
|
-
}), p =
|
|
2443
|
-
const E = e.get(), F = i.getStore().get().data?.map((
|
|
2445
|
+
}), p = Wi(t), m = async () => {
|
|
2446
|
+
const E = e.get(), F = i.getStore().get().data?.map((T) => T.slId) || [];
|
|
2444
2447
|
if (E && F?.length) {
|
|
2445
|
-
const
|
|
2446
|
-
|
|
2448
|
+
const T = r.get();
|
|
2449
|
+
T && F.push(T), d.setKey("loading", !0), d.setKey("data", []);
|
|
2447
2450
|
const x = {
|
|
2448
2451
|
eventId: E,
|
|
2449
2452
|
usersIds: F,
|
|
2450
2453
|
pagination: { page: 0, pageSize: s?.pageSize || Mr.pageSize }
|
|
2451
|
-
},
|
|
2454
|
+
}, D = await p(x);
|
|
2452
2455
|
d.set({
|
|
2453
|
-
data:
|
|
2456
|
+
data: D.data.map((I) => I.attributes),
|
|
2454
2457
|
hasMore: !0,
|
|
2455
2458
|
key: Date.now(),
|
|
2456
2459
|
loading: !1
|
|
2457
|
-
}),
|
|
2460
|
+
}), D.meta && (a = Math.round(D.meta.count / D.meta.pageSize)), c.set(x.pagination);
|
|
2458
2461
|
}
|
|
2459
2462
|
}, l = () => {
|
|
2460
2463
|
m();
|
|
2461
2464
|
}, w = (E) => {
|
|
2462
|
-
const F = c.get(),
|
|
2463
|
-
|
|
2465
|
+
const F = c.get(), T = E || F.page + 1;
|
|
2466
|
+
T <= a && c.set({ ...F, page: T });
|
|
2464
2467
|
};
|
|
2465
2468
|
return fn(d, () => {
|
|
2466
|
-
const E = e.listen(m), F = i.listen(m),
|
|
2467
|
-
const
|
|
2468
|
-
if (x.page > 0 &&
|
|
2469
|
+
const E = e.listen(m), F = i.listen(m), T = c.listen(async (x) => {
|
|
2470
|
+
const D = e.get();
|
|
2471
|
+
if (x.page > 0 && D)
|
|
2469
2472
|
if (x.page < a) {
|
|
2470
2473
|
d.setKey("loading", !0);
|
|
2471
|
-
const
|
|
2472
|
-
eventId:
|
|
2474
|
+
const _ = await p({
|
|
2475
|
+
eventId: D,
|
|
2473
2476
|
pagination: x
|
|
2474
2477
|
}), j = d.get().data || [];
|
|
2475
2478
|
d.set({
|
|
2476
|
-
data: [...j, ...
|
|
2479
|
+
data: [...j, ..._.data.map((L) => L.attributes)],
|
|
2477
2480
|
key: d.get().key,
|
|
2478
2481
|
loading: !1,
|
|
2479
2482
|
hasMore: !0
|
|
@@ -2482,10 +2485,10 @@ const Mr = {
|
|
|
2482
2485
|
d.setKey("hasMore", !1);
|
|
2483
2486
|
});
|
|
2484
2487
|
return () => {
|
|
2485
|
-
E(), F(),
|
|
2488
|
+
E(), F(), T();
|
|
2486
2489
|
};
|
|
2487
2490
|
}), { $store: d, fetchMore: w, invalidate: l };
|
|
2488
|
-
},
|
|
2491
|
+
}, Fo = (t, e) => {
|
|
2489
2492
|
const { client: r, queryKey: i } = t.createPromiseClient(yt, {
|
|
2490
2493
|
method: "generateDeepLink",
|
|
2491
2494
|
params: e
|
|
@@ -2495,7 +2498,7 @@ const Mr = {
|
|
|
2495
2498
|
data: { gamification: !0, externalEventId: d, eventId: c }
|
|
2496
2499
|
})).data?.attributes : {}
|
|
2497
2500
|
});
|
|
2498
|
-
},
|
|
2501
|
+
}, Oo = (t, { web: e, mobile: r }) => {
|
|
2499
2502
|
const { client: i } = t.createPromiseClient(li, { method: "generate" });
|
|
2500
2503
|
return i.generate({ web: e, mobile: r });
|
|
2501
2504
|
}, Vr = (t, e) => {
|
|
@@ -2503,21 +2506,21 @@ const Mr = {
|
|
|
2503
2506
|
for (const [i, s] of Object.entries(e))
|
|
2504
2507
|
r.append(i, s);
|
|
2505
2508
|
return r.toString();
|
|
2506
|
-
},
|
|
2509
|
+
}, _o = (t, e, r, i) => {
|
|
2507
2510
|
const s = Te({});
|
|
2508
|
-
return fn(s, () =>
|
|
2509
|
-
const l = p ? "https://masters.com" : d?.url, w = i.get() || "", E = e.get() || "", F = r.get() || "",
|
|
2510
|
-
[
|
|
2511
|
+
return fn(s, () => Fo(t, [e, r]).subscribe(async ({ data: d, error: p, loading: m }) => {
|
|
2512
|
+
const l = p ? "https://masters.com" : d?.url, w = i.get() || "", E = e.get() || "", F = r.get() || "", T = {
|
|
2513
|
+
[Dt]: w,
|
|
2511
2514
|
[wn]: E,
|
|
2512
2515
|
[bn]: F
|
|
2513
2516
|
};
|
|
2514
2517
|
if (!m && l) {
|
|
2515
2518
|
s.setKey("loading", !0);
|
|
2516
|
-
let x = window.location.search,
|
|
2517
|
-
x &&
|
|
2518
|
-
const I = window.location.origin + window.location.pathname + x +
|
|
2519
|
+
let x = window.location.search, D = window.location.hash;
|
|
2520
|
+
x && D || D ? x = `?${Vr(x, T)}` : D = `#${Vr("", T)}`;
|
|
2521
|
+
const I = window.location.origin + window.location.pathname + x + D, _ = await Oo(t, { web: I, mobile: l });
|
|
2519
2522
|
s.set({
|
|
2520
|
-
data:
|
|
2523
|
+
data: _.data?.link,
|
|
2521
2524
|
loading: !1
|
|
2522
2525
|
});
|
|
2523
2526
|
} else
|
|
@@ -2548,7 +2551,7 @@ const To = (t, e, r, i) => {
|
|
|
2548
2551
|
}
|
|
2549
2552
|
}
|
|
2550
2553
|
});
|
|
2551
|
-
},
|
|
2554
|
+
}, vt = (t, e, r, i, s, a) => {
|
|
2552
2555
|
try {
|
|
2553
2556
|
const c = e.userId.get();
|
|
2554
2557
|
if (!c)
|
|
@@ -2571,7 +2574,7 @@ const To = (t, e, r, i) => {
|
|
|
2571
2574
|
} catch (c) {
|
|
2572
2575
|
console.error(c);
|
|
2573
2576
|
}
|
|
2574
|
-
},
|
|
2577
|
+
}, Co = (t, e, r, i) => {
|
|
2575
2578
|
let s = !1;
|
|
2576
2579
|
const a = new In(), c = re(ee.Unset);
|
|
2577
2580
|
c.subscribe((m) => {
|
|
@@ -2582,16 +2585,16 @@ const To = (t, e, r, i) => {
|
|
|
2582
2585
|
}));
|
|
2583
2586
|
});
|
|
2584
2587
|
const d = [];
|
|
2585
|
-
return
|
|
2586
|
-
m &&
|
|
2588
|
+
return vt(c, e, t, i, a, d), c.get() !== ee.Completed && (d.push(e.userId.listen((m) => {
|
|
2589
|
+
m && vt(c, e, t, i, a, d);
|
|
2587
2590
|
})), d.push(e.moderation.listen((m) => {
|
|
2588
|
-
m.data &&
|
|
2591
|
+
m.data && vt(c, e, t, i, a, d);
|
|
2589
2592
|
})), d.push(t.featureSettings.listen((m) => {
|
|
2590
|
-
m &&
|
|
2593
|
+
m && vt(c, e, t, i, a, d);
|
|
2591
2594
|
}))), { $store: c, submitInplay: async () => {
|
|
2592
2595
|
const m = e.slStreamId.get();
|
|
2593
2596
|
if (m) {
|
|
2594
|
-
await
|
|
2597
|
+
await Ao(r, m), c.set(ee.Completed), a.saveOnboardingStatus({
|
|
2595
2598
|
organizationId: e.organizationId.get() || "",
|
|
2596
2599
|
userId: e.userId.get() || "",
|
|
2597
2600
|
eventId: m
|
|
@@ -2600,8 +2603,8 @@ const To = (t, e, r, i) => {
|
|
|
2600
2603
|
i.close(l);
|
|
2601
2604
|
}
|
|
2602
2605
|
} };
|
|
2603
|
-
},
|
|
2604
|
-
class
|
|
2606
|
+
}, xo = /* @__PURE__ */ new Set([fe.POLL, fe.PREDICTION, fe.TRIVIA]);
|
|
2607
|
+
class ko extends mn {
|
|
2605
2608
|
/** user statistics (leaderboard panel) */
|
|
2606
2609
|
userSummary;
|
|
2607
2610
|
/** feed list (pick history) */
|
|
@@ -2630,7 +2633,7 @@ class xo extends mn {
|
|
|
2630
2633
|
/** Browser cache */
|
|
2631
2634
|
storage;
|
|
2632
2635
|
constructor(e, r, i) {
|
|
2633
|
-
super(e, r), this.background = new
|
|
2636
|
+
super(e, r), this.background = new go(i), this.storage = new In(), this.userSummary = new de(Ki(this.background.slStreamId, this.background.userId, i.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.friends = new de(Hi(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 = Co(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(Oe.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = _o(this.transport, this.background.slStreamId, i.stores.providerStreamId.getStore(), this.background.userId), this.leaderboardList = Io(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.status.subscribe((s) => {
|
|
2634
2637
|
s === rt.Ready ? this.connect(i.transport) : this.disconnect();
|
|
2635
2638
|
}), this.userSummary.listen((s) => {
|
|
2636
2639
|
this.leaderboardList.$store.lc !== 0 && s?.data?.summary && window.requestAnimationFrame(() => {
|
|
@@ -2691,10 +2694,10 @@ class xo extends mn {
|
|
|
2691
2694
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2692
2695
|
};
|
|
2693
2696
|
submitAnswer = async (e, r) => {
|
|
2694
|
-
await
|
|
2697
|
+
await So(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2695
2698
|
};
|
|
2696
2699
|
skipQuestion = async (e) => {
|
|
2697
|
-
await
|
|
2700
|
+
await Eo(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2698
2701
|
};
|
|
2699
2702
|
openQuestion = (e) => (this.openFeature(), this.notifications.close(this.background.getCurrentSessionId({
|
|
2700
2703
|
prefix: "notification",
|
|
@@ -2717,7 +2720,7 @@ class xo extends mn {
|
|
|
2717
2720
|
showInApp = (e) => {
|
|
2718
2721
|
const r = this.onboardingStatus.$store.get();
|
|
2719
2722
|
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 !== oi.ON && e.data.question.status === dt.ACTIVE) {
|
|
2720
|
-
if (
|
|
2723
|
+
if (xo.has(e.data.question.type))
|
|
2721
2724
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2722
2725
|
type: Me.QUESTION,
|
|
2723
2726
|
action: () => {
|
|
@@ -2740,7 +2743,7 @@ class xo extends mn {
|
|
|
2740
2743
|
const i = e.data.question.options?.options.value, s = {
|
|
2741
2744
|
heading: e.data.question.notification.title,
|
|
2742
2745
|
body: e.data.question.notification.body,
|
|
2743
|
-
imageMode: e.data.question.
|
|
2746
|
+
imageMode: e.data.question.appearance?.images,
|
|
2744
2747
|
image: i?.image,
|
|
2745
2748
|
video: {
|
|
2746
2749
|
id: i?.video?.id || "",
|
|
@@ -2791,23 +2794,23 @@ class xo extends mn {
|
|
|
2791
2794
|
}
|
|
2792
2795
|
};
|
|
2793
2796
|
}
|
|
2794
|
-
const
|
|
2795
|
-
[
|
|
2797
|
+
const Bo = {
|
|
2798
|
+
[Oe.GAMES]: !0
|
|
2796
2799
|
};
|
|
2797
|
-
class
|
|
2800
|
+
class Lo extends mn {
|
|
2798
2801
|
constructor(e, r) {
|
|
2799
2802
|
super(e, r);
|
|
2800
2803
|
}
|
|
2801
2804
|
}
|
|
2802
|
-
const
|
|
2803
|
-
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new se(re(
|
|
2805
|
+
const Po = (t, e, r) => t.type === Oe.GAMES ? new ko(t, e, r) : new Lo(t, e), Ro = (t, e, r) => {
|
|
2806
|
+
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new se(re(Oe.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) => {
|
|
2804
2807
|
t.activeFeature.setValue(i);
|
|
2805
2808
|
}, t.sdk.closeFeature = (i = !1) => {
|
|
2806
2809
|
const s = t.activeFeature.getValue();
|
|
2807
|
-
t.activeFeature.setValue(
|
|
2808
|
-
}, t.initFeature = (i, s =
|
|
2809
|
-
if (i.type in
|
|
2810
|
-
const a =
|
|
2810
|
+
t.activeFeature.setValue(Oe.UNSET), i && s && t.features.delete(s);
|
|
2811
|
+
}, t.initFeature = (i, s = Ie.ORGANIZATION) => {
|
|
2812
|
+
if (i.type in Bo && !t.features.has(i.type)) {
|
|
2813
|
+
const a = Po(i, s, t);
|
|
2811
2814
|
t.features.set(i.type, a);
|
|
2812
2815
|
}
|
|
2813
2816
|
}, t.updateFeature = (i, s) => {
|
|
@@ -2818,12 +2821,12 @@ const Lo = (t, e, r) => t.type === Fe.GAMES ? new xo(t, e, r) : new Bo(t, e), Po
|
|
|
2818
2821
|
const i = await t.stores.organizationSettings.getValue();
|
|
2819
2822
|
t.features.clear();
|
|
2820
2823
|
for (const s of i?.overlays || [])
|
|
2821
|
-
t.initFeature(s,
|
|
2824
|
+
t.initFeature(s, Ie.ORGANIZATION);
|
|
2822
2825
|
}, t.stores.providerStreamId.listen((i) => {
|
|
2823
2826
|
i || t.reinitializeFeatures();
|
|
2824
2827
|
}), t.storeSubscribe = () => {
|
|
2825
2828
|
const i = (a, c) => {
|
|
2826
|
-
if (c?.overlays && !(t.contextConfig?.skipOrganizationSettings && a ===
|
|
2829
|
+
if (c?.overlays && !(t.contextConfig?.skipOrganizationSettings && a === Ie.ORGANIZATION))
|
|
2827
2830
|
for (const d of c.overlays)
|
|
2828
2831
|
d.sdkEnable === !0 && (t.features.has(d.type) ? t.updateFeature(d, a) : t.initFeature(d, a));
|
|
2829
2832
|
}, s = {
|
|
@@ -2839,7 +2842,7 @@ const Lo = (t, e, r) => t.type === Fe.GAMES ? new xo(t, e, r) : new Bo(t, e), Po
|
|
|
2839
2842
|
organizationSettings: (a) => {
|
|
2840
2843
|
if (a.data)
|
|
2841
2844
|
try {
|
|
2842
|
-
i(
|
|
2845
|
+
i(Ie.ORGANIZATION, a.data);
|
|
2843
2846
|
} catch (c) {
|
|
2844
2847
|
console.log(c);
|
|
2845
2848
|
}
|
|
@@ -2847,7 +2850,7 @@ const Lo = (t, e, r) => t.type === Fe.GAMES ? new xo(t, e, r) : new Bo(t, e), Po
|
|
|
2847
2850
|
streamSettings: (a) => {
|
|
2848
2851
|
if (a.data)
|
|
2849
2852
|
try {
|
|
2850
|
-
i(
|
|
2853
|
+
i(Ie.STREAM, a.data);
|
|
2851
2854
|
} catch (c) {
|
|
2852
2855
|
console.log(c);
|
|
2853
2856
|
}
|
|
@@ -2856,8 +2859,8 @@ const Lo = (t, e, r) => t.type === Fe.GAMES ? new xo(t, e, r) : new Bo(t, e), Po
|
|
|
2856
2859
|
t.store.subscribe(s);
|
|
2857
2860
|
}, r();
|
|
2858
2861
|
};
|
|
2859
|
-
var
|
|
2860
|
-
function
|
|
2862
|
+
var vr = { exports: {} }, Sr = { exports: {} };
|
|
2863
|
+
function Do(t) {
|
|
2861
2864
|
var e = new t(), r = e;
|
|
2862
2865
|
function i() {
|
|
2863
2866
|
var a = e;
|
|
@@ -2871,11 +2874,11 @@ function Ro(t) {
|
|
|
2871
2874
|
release: s
|
|
2872
2875
|
};
|
|
2873
2876
|
}
|
|
2874
|
-
var No =
|
|
2877
|
+
var No = Do, $o = No;
|
|
2875
2878
|
function Fn(t, e, r) {
|
|
2876
2879
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2877
2880
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2878
|
-
var i =
|
|
2881
|
+
var i = $o(Uo), s = null, a = null, c = 0, d = null, p = {
|
|
2879
2882
|
push: x,
|
|
2880
2883
|
drain: oe,
|
|
2881
2884
|
saturated: oe,
|
|
@@ -2884,12 +2887,12 @@ function Fn(t, e, r) {
|
|
|
2884
2887
|
concurrency: r,
|
|
2885
2888
|
running: m,
|
|
2886
2889
|
resume: F,
|
|
2887
|
-
idle:
|
|
2890
|
+
idle: T,
|
|
2888
2891
|
length: w,
|
|
2889
2892
|
getQueue: E,
|
|
2890
|
-
unshift:
|
|
2893
|
+
unshift: D,
|
|
2891
2894
|
empty: oe,
|
|
2892
|
-
kill:
|
|
2895
|
+
kill: _,
|
|
2893
2896
|
killAndDrain: j,
|
|
2894
2897
|
error: L
|
|
2895
2898
|
};
|
|
@@ -2917,14 +2920,14 @@ function Fn(t, e, r) {
|
|
|
2917
2920
|
c++, I();
|
|
2918
2921
|
}
|
|
2919
2922
|
}
|
|
2920
|
-
function
|
|
2923
|
+
function T() {
|
|
2921
2924
|
return c === 0 && p.length() === 0;
|
|
2922
2925
|
}
|
|
2923
2926
|
function x(C, k) {
|
|
2924
2927
|
var B = i.get();
|
|
2925
2928
|
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler = d, c === p.concurrency || p.paused ? a ? (a.next = B, a = B) : (s = B, a = B, p.saturated()) : (c++, e.call(t, B.value, B.worked));
|
|
2926
2929
|
}
|
|
2927
|
-
function
|
|
2930
|
+
function D(C, k) {
|
|
2928
2931
|
var B = i.get();
|
|
2929
2932
|
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler = d, c === p.concurrency || p.paused ? s ? (B.next = s, s = B) : (s = B, a = B, p.saturated()) : (c++, e.call(t, B.value, B.worked));
|
|
2930
2933
|
}
|
|
@@ -2933,7 +2936,7 @@ function Fn(t, e, r) {
|
|
|
2933
2936
|
var k = s;
|
|
2934
2937
|
k ? p.paused ? c-- : (a === s && (a = null), s = k.next, k.next = null, e.call(t, k.value, k.worked), a === null && p.empty()) : --c === 0 && p.drain();
|
|
2935
2938
|
}
|
|
2936
|
-
function
|
|
2939
|
+
function _() {
|
|
2937
2940
|
s = null, a = null, p.drain = oe;
|
|
2938
2941
|
}
|
|
2939
2942
|
function j() {
|
|
@@ -2945,7 +2948,7 @@ function Fn(t, e, r) {
|
|
|
2945
2948
|
}
|
|
2946
2949
|
function oe() {
|
|
2947
2950
|
}
|
|
2948
|
-
function
|
|
2951
|
+
function Uo() {
|
|
2949
2952
|
this.value = null, this.callback = oe, this.next = null, this.release = oe, this.context = null, this.errorHandler = null;
|
|
2950
2953
|
var t = this;
|
|
2951
2954
|
this.worked = function(r, i) {
|
|
@@ -2953,7 +2956,7 @@ function $o() {
|
|
|
2953
2956
|
t.value = null, t.callback = oe, t.errorHandler && a(r, c), s.call(t.context, r, i), t.release(t);
|
|
2954
2957
|
};
|
|
2955
2958
|
}
|
|
2956
|
-
function
|
|
2959
|
+
function jo(t, e, r) {
|
|
2957
2960
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2958
2961
|
function i(l, w) {
|
|
2959
2962
|
e.call(this, l).then(function(E) {
|
|
@@ -2964,9 +2967,9 @@ function Uo(t, e, r) {
|
|
|
2964
2967
|
return s.push = d, s.unshift = p, s.drained = m, s;
|
|
2965
2968
|
function d(l) {
|
|
2966
2969
|
var w = new Promise(function(E, F) {
|
|
2967
|
-
a(l, function(
|
|
2968
|
-
if (
|
|
2969
|
-
F(
|
|
2970
|
+
a(l, function(T, x) {
|
|
2971
|
+
if (T) {
|
|
2972
|
+
F(T);
|
|
2970
2973
|
return;
|
|
2971
2974
|
}
|
|
2972
2975
|
E(x);
|
|
@@ -2976,9 +2979,9 @@ function Uo(t, e, r) {
|
|
|
2976
2979
|
}
|
|
2977
2980
|
function p(l) {
|
|
2978
2981
|
var w = new Promise(function(E, F) {
|
|
2979
|
-
c(l, function(
|
|
2980
|
-
if (
|
|
2981
|
-
F(
|
|
2982
|
+
c(l, function(T, x) {
|
|
2983
|
+
if (T) {
|
|
2984
|
+
F(T);
|
|
2982
2985
|
return;
|
|
2983
2986
|
}
|
|
2984
2987
|
E(x);
|
|
@@ -2999,33 +3002,33 @@ function Uo(t, e, r) {
|
|
|
2999
3002
|
return w;
|
|
3000
3003
|
}
|
|
3001
3004
|
}
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
var On =
|
|
3005
|
+
Sr.exports = Fn;
|
|
3006
|
+
Sr.exports.promise = jo;
|
|
3007
|
+
var On = Sr.exports, Ar = { exports: {} }, nt = typeof Reflect == "object" ? Reflect : null, qr = nt && typeof nt.apply == "function" ? nt.apply : function(e, r, i) {
|
|
3005
3008
|
return Function.prototype.apply.call(e, r, i);
|
|
3006
|
-
},
|
|
3007
|
-
nt && typeof nt.ownKeys == "function" ?
|
|
3009
|
+
}, At;
|
|
3010
|
+
nt && typeof nt.ownKeys == "function" ? At = nt.ownKeys : Object.getOwnPropertySymbols ? At = function(e) {
|
|
3008
3011
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
3009
|
-
} :
|
|
3012
|
+
} : At = function(e) {
|
|
3010
3013
|
return Object.getOwnPropertyNames(e);
|
|
3011
3014
|
};
|
|
3012
|
-
function
|
|
3015
|
+
function Mo(t) {
|
|
3013
3016
|
console && console.warn && console.warn(t);
|
|
3014
3017
|
}
|
|
3015
|
-
var
|
|
3018
|
+
var _n = Number.isNaN || function(e) {
|
|
3016
3019
|
return e !== e;
|
|
3017
3020
|
};
|
|
3018
3021
|
function G() {
|
|
3019
3022
|
G.init.call(this);
|
|
3020
3023
|
}
|
|
3021
|
-
|
|
3022
|
-
|
|
3024
|
+
Ar.exports = G;
|
|
3025
|
+
Ar.exports.once = Go;
|
|
3023
3026
|
G.EventEmitter = G;
|
|
3024
3027
|
G.prototype._events = void 0;
|
|
3025
3028
|
G.prototype._eventsCount = 0;
|
|
3026
3029
|
G.prototype._maxListeners = void 0;
|
|
3027
3030
|
var Qr = 10;
|
|
3028
|
-
function
|
|
3031
|
+
function $t(t) {
|
|
3029
3032
|
if (typeof t != "function")
|
|
3030
3033
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
3031
3034
|
}
|
|
@@ -3035,7 +3038,7 @@ Object.defineProperty(G, "defaultMaxListeners", {
|
|
|
3035
3038
|
return Qr;
|
|
3036
3039
|
},
|
|
3037
3040
|
set: function(t) {
|
|
3038
|
-
if (typeof t != "number" || t < 0 ||
|
|
3041
|
+
if (typeof t != "number" || t < 0 || _n(t))
|
|
3039
3042
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3040
3043
|
Qr = t;
|
|
3041
3044
|
}
|
|
@@ -3044,15 +3047,15 @@ G.init = function() {
|
|
|
3044
3047
|
(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;
|
|
3045
3048
|
};
|
|
3046
3049
|
G.prototype.setMaxListeners = function(e) {
|
|
3047
|
-
if (typeof e != "number" || e < 0 ||
|
|
3050
|
+
if (typeof e != "number" || e < 0 || _n(e))
|
|
3048
3051
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3049
3052
|
return this._maxListeners = e, this;
|
|
3050
3053
|
};
|
|
3051
|
-
function
|
|
3054
|
+
function Tn(t) {
|
|
3052
3055
|
return t._maxListeners === void 0 ? G.defaultMaxListeners : t._maxListeners;
|
|
3053
3056
|
}
|
|
3054
3057
|
G.prototype.getMaxListeners = function() {
|
|
3055
|
-
return
|
|
3058
|
+
return Tn(this);
|
|
3056
3059
|
};
|
|
3057
3060
|
G.prototype.emit = function(e) {
|
|
3058
3061
|
for (var r = [], i = 1; i < arguments.length; i++)
|
|
@@ -3081,16 +3084,16 @@ G.prototype.emit = function(e) {
|
|
|
3081
3084
|
};
|
|
3082
3085
|
function Cn(t, e, r, i) {
|
|
3083
3086
|
var s, a, c;
|
|
3084
|
-
if (
|
|
3087
|
+
if ($t(r), a = t._events, a === void 0 ? (a = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (a.newListener !== void 0 && (t.emit(
|
|
3085
3088
|
"newListener",
|
|
3086
3089
|
e,
|
|
3087
3090
|
r.listener ? r.listener : r
|
|
3088
3091
|
), a = t._events), c = a[e]), c === void 0)
|
|
3089
3092
|
c = a[e] = r, ++t._eventsCount;
|
|
3090
|
-
else if (typeof c == "function" ? c = a[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s =
|
|
3093
|
+
else if (typeof c == "function" ? c = a[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s = Tn(t), s > 0 && c.length > s && !c.warned) {
|
|
3091
3094
|
c.warned = !0;
|
|
3092
3095
|
var d = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3093
|
-
d.name = "MaxListenersExceededWarning", d.emitter = t, d.type = e, d.count = c.length,
|
|
3096
|
+
d.name = "MaxListenersExceededWarning", d.emitter = t, d.type = e, d.count = c.length, Mo(d);
|
|
3094
3097
|
}
|
|
3095
3098
|
return t;
|
|
3096
3099
|
}
|
|
@@ -3101,23 +3104,23 @@ G.prototype.on = G.prototype.addListener;
|
|
|
3101
3104
|
G.prototype.prependListener = function(e, r) {
|
|
3102
3105
|
return Cn(this, e, r, !0);
|
|
3103
3106
|
};
|
|
3104
|
-
function
|
|
3107
|
+
function Vo() {
|
|
3105
3108
|
if (!this.fired)
|
|
3106
3109
|
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);
|
|
3107
3110
|
}
|
|
3108
3111
|
function xn(t, e, r) {
|
|
3109
|
-
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
3112
|
+
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = Vo.bind(i);
|
|
3110
3113
|
return s.listener = r, i.wrapFn = s, s;
|
|
3111
3114
|
}
|
|
3112
3115
|
G.prototype.once = function(e, r) {
|
|
3113
|
-
return
|
|
3116
|
+
return $t(r), this.on(e, xn(this, e, r)), this;
|
|
3114
3117
|
};
|
|
3115
3118
|
G.prototype.prependOnceListener = function(e, r) {
|
|
3116
|
-
return
|
|
3119
|
+
return $t(r), this.prependListener(e, xn(this, e, r)), this;
|
|
3117
3120
|
};
|
|
3118
3121
|
G.prototype.removeListener = function(e, r) {
|
|
3119
3122
|
var i, s, a, c, d;
|
|
3120
|
-
if (
|
|
3123
|
+
if ($t(r), s = this._events, s === void 0)
|
|
3121
3124
|
return this;
|
|
3122
3125
|
if (i = s[e], i === void 0)
|
|
3123
3126
|
return this;
|
|
@@ -3131,7 +3134,7 @@ G.prototype.removeListener = function(e, r) {
|
|
|
3131
3134
|
}
|
|
3132
3135
|
if (a < 0)
|
|
3133
3136
|
return this;
|
|
3134
|
-
a === 0 ? i.shift() :
|
|
3137
|
+
a === 0 ? i.shift() : qo(i, a), i.length === 1 && (s[e] = i[0]), s.removeListener !== void 0 && this.emit("removeListener", e, d || r);
|
|
3135
3138
|
}
|
|
3136
3139
|
return this;
|
|
3137
3140
|
};
|
|
@@ -3160,7 +3163,7 @@ function kn(t, e, r) {
|
|
|
3160
3163
|
if (i === void 0)
|
|
3161
3164
|
return [];
|
|
3162
3165
|
var s = i[e];
|
|
3163
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
3166
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? Qo(s) : Ln(s, s.length);
|
|
3164
3167
|
}
|
|
3165
3168
|
G.prototype.listeners = function(e) {
|
|
3166
3169
|
return kn(this, e, !0);
|
|
@@ -3184,24 +3187,24 @@ function Bn(t) {
|
|
|
3184
3187
|
return 0;
|
|
3185
3188
|
}
|
|
3186
3189
|
G.prototype.eventNames = function() {
|
|
3187
|
-
return this._eventsCount > 0 ?
|
|
3190
|
+
return this._eventsCount > 0 ? At(this._events) : [];
|
|
3188
3191
|
};
|
|
3189
3192
|
function Ln(t, e) {
|
|
3190
3193
|
for (var r = new Array(e), i = 0; i < e; ++i)
|
|
3191
3194
|
r[i] = t[i];
|
|
3192
3195
|
return r;
|
|
3193
3196
|
}
|
|
3194
|
-
function
|
|
3197
|
+
function qo(t, e) {
|
|
3195
3198
|
for (; e + 1 < t.length; e++)
|
|
3196
3199
|
t[e] = t[e + 1];
|
|
3197
3200
|
t.pop();
|
|
3198
3201
|
}
|
|
3199
|
-
function
|
|
3202
|
+
function Qo(t) {
|
|
3200
3203
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3201
3204
|
e[r] = t[r].listener || t[r];
|
|
3202
3205
|
return e;
|
|
3203
3206
|
}
|
|
3204
|
-
function
|
|
3207
|
+
function Go(t, e) {
|
|
3205
3208
|
return new Promise(function(r, i) {
|
|
3206
3209
|
function s(c) {
|
|
3207
3210
|
t.removeListener(e, a), i(c);
|
|
@@ -3209,10 +3212,10 @@ function Qo(t, e) {
|
|
|
3209
3212
|
function a() {
|
|
3210
3213
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
3211
3214
|
}
|
|
3212
|
-
Pn(t, e, a, { once: !0 }), e !== "error" &&
|
|
3215
|
+
Pn(t, e, a, { once: !0 }), e !== "error" && zo(t, s, { once: !0 });
|
|
3213
3216
|
});
|
|
3214
3217
|
}
|
|
3215
|
-
function
|
|
3218
|
+
function zo(t, e, r) {
|
|
3216
3219
|
typeof t.on == "function" && Pn(t, "error", e, r);
|
|
3217
3220
|
}
|
|
3218
3221
|
function Pn(t, e, r, i) {
|
|
@@ -3225,7 +3228,7 @@ function Pn(t, e, r, i) {
|
|
|
3225
3228
|
else
|
|
3226
3229
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3227
3230
|
}
|
|
3228
|
-
var Rn =
|
|
3231
|
+
var Rn = Ar.exports, Ut = {}, Dn = {}, Nn = function() {
|
|
3229
3232
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3230
3233
|
return !1;
|
|
3231
3234
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3248,33 +3251,33 @@ var Rn = Sr.exports, $t = {}, Nn = {}, Dn = function() {
|
|
|
3248
3251
|
return !1;
|
|
3249
3252
|
}
|
|
3250
3253
|
return !0;
|
|
3251
|
-
},
|
|
3252
|
-
return
|
|
3253
|
-
}, Gr = typeof Symbol < "u" && Symbol,
|
|
3254
|
-
return typeof Gr != "function" || typeof Symbol != "function" || typeof Gr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3254
|
+
}, Ko = Nn, Er = function() {
|
|
3255
|
+
return Ko() && !!Symbol.toStringTag;
|
|
3256
|
+
}, Gr = typeof Symbol < "u" && Symbol, Wo = Nn, Ho = function() {
|
|
3257
|
+
return typeof Gr != "function" || typeof Symbol != "function" || typeof Gr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Wo();
|
|
3255
3258
|
}, zr = {
|
|
3256
3259
|
foo: {}
|
|
3257
|
-
},
|
|
3258
|
-
return { __proto__: zr }.foo === zr.foo && !({ __proto__: null } instanceof
|
|
3259
|
-
},
|
|
3260
|
+
}, Jo = Object, Yo = function() {
|
|
3261
|
+
return { __proto__: zr }.foo === zr.foo && !({ __proto__: null } instanceof Jo);
|
|
3262
|
+
}, Xo = "Function.prototype.bind called on incompatible ", Zo = Object.prototype.toString, es = Math.max, ts = "[object Function]", Kr = function(e, r) {
|
|
3260
3263
|
for (var i = [], s = 0; s < e.length; s += 1)
|
|
3261
3264
|
i[s] = e[s];
|
|
3262
3265
|
for (var a = 0; a < r.length; a += 1)
|
|
3263
3266
|
i[a + e.length] = r[a];
|
|
3264
3267
|
return i;
|
|
3265
|
-
},
|
|
3268
|
+
}, rs = function(e, r) {
|
|
3266
3269
|
for (var i = [], s = r || 0, a = 0; s < e.length; s += 1, a += 1)
|
|
3267
3270
|
i[a] = e[s];
|
|
3268
3271
|
return i;
|
|
3269
|
-
},
|
|
3272
|
+
}, ns = function(t, e) {
|
|
3270
3273
|
for (var r = "", i = 0; i < t.length; i += 1)
|
|
3271
3274
|
r += t[i], i + 1 < t.length && (r += e);
|
|
3272
3275
|
return r;
|
|
3273
|
-
},
|
|
3276
|
+
}, is = function(e) {
|
|
3274
3277
|
var r = this;
|
|
3275
|
-
if (typeof r != "function" ||
|
|
3276
|
-
throw new TypeError(
|
|
3277
|
-
for (var i =
|
|
3278
|
+
if (typeof r != "function" || Zo.apply(r) !== ts)
|
|
3279
|
+
throw new TypeError(Xo + r);
|
|
3280
|
+
for (var i = rs(arguments, 1), s, a = function() {
|
|
3278
3281
|
if (this instanceof s) {
|
|
3279
3282
|
var l = r.apply(
|
|
3280
3283
|
this,
|
|
@@ -3286,15 +3289,15 @@ var Rn = Sr.exports, $t = {}, Nn = {}, Dn = function() {
|
|
|
3286
3289
|
e,
|
|
3287
3290
|
Kr(i, arguments)
|
|
3288
3291
|
);
|
|
3289
|
-
}, c =
|
|
3292
|
+
}, c = es(0, r.length - i.length), d = [], p = 0; p < c; p++)
|
|
3290
3293
|
d[p] = "$" + p;
|
|
3291
|
-
if (s = Function("binder", "return function (" +
|
|
3294
|
+
if (s = Function("binder", "return function (" + ns(d, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) {
|
|
3292
3295
|
var m = function() {
|
|
3293
3296
|
};
|
|
3294
3297
|
m.prototype = r.prototype, s.prototype = new m(), m.prototype = null;
|
|
3295
3298
|
}
|
|
3296
3299
|
return s;
|
|
3297
|
-
},
|
|
3300
|
+
}, os = is, Ir = Function.prototype.bind || os, ss = Function.prototype.call, as = Object.prototype.hasOwnProperty, us = Ir, cs = us.call(ss, as), U, ot = SyntaxError, $n = Function, it = TypeError, Qt = function(t) {
|
|
3298
3301
|
try {
|
|
3299
3302
|
return $n('"use strict"; return (' + t + ").constructor;")();
|
|
3300
3303
|
} catch {
|
|
@@ -3306,21 +3309,21 @@ if (qe)
|
|
|
3306
3309
|
} catch {
|
|
3307
3310
|
qe = null;
|
|
3308
3311
|
}
|
|
3309
|
-
var
|
|
3312
|
+
var Gt = function() {
|
|
3310
3313
|
throw new it();
|
|
3311
|
-
},
|
|
3314
|
+
}, ls = qe ? function() {
|
|
3312
3315
|
try {
|
|
3313
|
-
return arguments.callee,
|
|
3316
|
+
return arguments.callee, Gt;
|
|
3314
3317
|
} catch {
|
|
3315
3318
|
try {
|
|
3316
3319
|
return qe(arguments, "callee").get;
|
|
3317
3320
|
} catch {
|
|
3318
|
-
return
|
|
3321
|
+
return Gt;
|
|
3319
3322
|
}
|
|
3320
3323
|
}
|
|
3321
|
-
}() :
|
|
3324
|
+
}() : Gt, We = Ho(), fs = Yo(), X = Object.getPrototypeOf || (fs ? function(t) {
|
|
3322
3325
|
return t.__proto__;
|
|
3323
|
-
} : null), Je = {},
|
|
3326
|
+
} : null), Je = {}, ds = typeof Uint8Array > "u" || !X ? U : X(Uint8Array), Qe = {
|
|
3324
3327
|
"%AggregateError%": typeof AggregateError > "u" ? U : AggregateError,
|
|
3325
3328
|
"%Array%": Array,
|
|
3326
3329
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? U : ArrayBuffer,
|
|
@@ -3377,8 +3380,8 @@ var Qt = function() {
|
|
|
3377
3380
|
"%StringIteratorPrototype%": We && X ? X(""[Symbol.iterator]()) : U,
|
|
3378
3381
|
"%Symbol%": We ? Symbol : U,
|
|
3379
3382
|
"%SyntaxError%": ot,
|
|
3380
|
-
"%ThrowTypeError%":
|
|
3381
|
-
"%TypedArray%":
|
|
3383
|
+
"%ThrowTypeError%": ls,
|
|
3384
|
+
"%TypedArray%": ds,
|
|
3382
3385
|
"%TypeError%": it,
|
|
3383
3386
|
"%Uint8Array%": typeof Uint8Array > "u" ? U : Uint8Array,
|
|
3384
3387
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? U : Uint8ClampedArray,
|
|
@@ -3393,17 +3396,17 @@ if (X)
|
|
|
3393
3396
|
try {
|
|
3394
3397
|
null.error;
|
|
3395
3398
|
} catch (t) {
|
|
3396
|
-
var
|
|
3397
|
-
Qe["%Error.prototype%"] =
|
|
3399
|
+
var hs = X(X(t));
|
|
3400
|
+
Qe["%Error.prototype%"] = hs;
|
|
3398
3401
|
}
|
|
3399
|
-
var
|
|
3402
|
+
var ps = function t(e) {
|
|
3400
3403
|
var r;
|
|
3401
3404
|
if (e === "%AsyncFunction%")
|
|
3402
|
-
r =
|
|
3405
|
+
r = Qt("async function () {}");
|
|
3403
3406
|
else if (e === "%GeneratorFunction%")
|
|
3404
|
-
r =
|
|
3407
|
+
r = Qt("function* () {}");
|
|
3405
3408
|
else if (e === "%AsyncGeneratorFunction%")
|
|
3406
|
-
r =
|
|
3409
|
+
r = Qt("async function* () {}");
|
|
3407
3410
|
else if (e === "%AsyncGenerator%") {
|
|
3408
3411
|
var i = t("%AsyncGeneratorFunction%");
|
|
3409
3412
|
i && (r = i.prototype);
|
|
@@ -3464,21 +3467,21 @@ var hs = function t(e) {
|
|
|
3464
3467
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3465
3468
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3466
3469
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3467
|
-
},
|
|
3468
|
-
var r =
|
|
3470
|
+
}, mt = Ir, Tt = cs, ys = mt.call(Function.call, Array.prototype.concat), gs = mt.call(Function.apply, Array.prototype.splice), Hr = mt.call(Function.call, String.prototype.replace), Ct = mt.call(Function.call, String.prototype.slice), ms = mt.call(Function.call, RegExp.prototype.exec), ws = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, bs = /\\(\\)?/g, vs = function(e) {
|
|
3471
|
+
var r = Ct(e, 0, 1), i = Ct(e, -1);
|
|
3469
3472
|
if (r === "%" && i !== "%")
|
|
3470
3473
|
throw new ot("invalid intrinsic syntax, expected closing `%`");
|
|
3471
3474
|
if (i === "%" && r !== "%")
|
|
3472
3475
|
throw new ot("invalid intrinsic syntax, expected opening `%`");
|
|
3473
3476
|
var s = [];
|
|
3474
|
-
return Hr(e,
|
|
3475
|
-
s[s.length] = d ? Hr(p,
|
|
3477
|
+
return Hr(e, ws, function(a, c, d, p) {
|
|
3478
|
+
s[s.length] = d ? Hr(p, bs, "$1") : c || a;
|
|
3476
3479
|
}), s;
|
|
3477
|
-
},
|
|
3480
|
+
}, Ss = function(e, r) {
|
|
3478
3481
|
var i = e, s;
|
|
3479
|
-
if (
|
|
3482
|
+
if (Tt(Wr, i) && (s = Wr[i], i = "%" + s[0] + "%"), Tt(Qe, i)) {
|
|
3480
3483
|
var a = Qe[i];
|
|
3481
|
-
if (a === Je && (a =
|
|
3484
|
+
if (a === Je && (a = ps(i)), typeof a > "u" && !r)
|
|
3482
3485
|
throw new it("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3483
3486
|
return {
|
|
3484
3487
|
alias: s,
|
|
@@ -3492,15 +3495,15 @@ var hs = function t(e) {
|
|
|
3492
3495
|
throw new it("intrinsic name must be a non-empty string");
|
|
3493
3496
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3494
3497
|
throw new it('"allowMissing" argument must be a boolean');
|
|
3495
|
-
if (
|
|
3498
|
+
if (ms(/^%?[^%]*%?$/, e) === null)
|
|
3496
3499
|
throw new ot("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3497
|
-
var i =
|
|
3498
|
-
m && (s = m[0],
|
|
3500
|
+
var i = vs(e), s = i.length > 0 ? i[0] : "", a = Ss("%" + s + "%", r), c = a.name, d = a.value, p = !1, m = a.alias;
|
|
3501
|
+
m && (s = m[0], gs(i, ys([0, 1], m)));
|
|
3499
3502
|
for (var l = 1, w = !0; l < i.length; l += 1) {
|
|
3500
|
-
var E = i[l], F =
|
|
3501
|
-
if ((F === '"' || F === "'" || F === "`" ||
|
|
3503
|
+
var E = i[l], F = Ct(E, 0, 1), T = Ct(E, -1);
|
|
3504
|
+
if ((F === '"' || F === "'" || F === "`" || T === '"' || T === "'" || T === "`") && F !== T)
|
|
3502
3505
|
throw new ot("property names with quotes must have matching quotes");
|
|
3503
|
-
if ((E === "constructor" || !w) && (p = !0), s += "." + E, c = "%" + s + "%",
|
|
3506
|
+
if ((E === "constructor" || !w) && (p = !0), s += "." + E, c = "%" + s + "%", Tt(Qe, c))
|
|
3504
3507
|
d = Qe[c];
|
|
3505
3508
|
else if (d != null) {
|
|
3506
3509
|
if (!(E in d)) {
|
|
@@ -3512,44 +3515,44 @@ var hs = function t(e) {
|
|
|
3512
3515
|
var x = qe(d, E);
|
|
3513
3516
|
w = !!x, w && "get" in x && !("originalValue" in x.get) ? d = x.get : d = d[E];
|
|
3514
3517
|
} else
|
|
3515
|
-
w =
|
|
3518
|
+
w = Tt(d, E), d = d[E];
|
|
3516
3519
|
w && !p && (Qe[c] = d);
|
|
3517
3520
|
}
|
|
3518
3521
|
}
|
|
3519
3522
|
return d;
|
|
3520
|
-
}, Un = { exports: {} },
|
|
3521
|
-
if (
|
|
3523
|
+
}, Un = { exports: {} }, As = at, sr = As("%Object.defineProperty%", !0), ar = function() {
|
|
3524
|
+
if (sr)
|
|
3522
3525
|
try {
|
|
3523
|
-
return
|
|
3526
|
+
return sr({}, "a", { value: 1 }), !0;
|
|
3524
3527
|
} catch {
|
|
3525
3528
|
return !1;
|
|
3526
3529
|
}
|
|
3527
3530
|
return !1;
|
|
3528
3531
|
};
|
|
3529
|
-
|
|
3530
|
-
if (!
|
|
3532
|
+
ar.hasArrayLengthDefineBug = function() {
|
|
3533
|
+
if (!ar())
|
|
3531
3534
|
return null;
|
|
3532
3535
|
try {
|
|
3533
|
-
return
|
|
3536
|
+
return sr([], "length", { value: 1 }).length !== 1;
|
|
3534
3537
|
} catch {
|
|
3535
3538
|
return !0;
|
|
3536
3539
|
}
|
|
3537
3540
|
};
|
|
3538
|
-
var jn =
|
|
3539
|
-
if (
|
|
3541
|
+
var jn = ar, Es = at, Et = Es("%Object.getOwnPropertyDescriptor%", !0);
|
|
3542
|
+
if (Et)
|
|
3540
3543
|
try {
|
|
3541
|
-
|
|
3544
|
+
Et([], "length");
|
|
3542
3545
|
} catch {
|
|
3543
|
-
|
|
3546
|
+
Et = null;
|
|
3544
3547
|
}
|
|
3545
|
-
var
|
|
3548
|
+
var Fr = Et, Is = jn(), Or = at, ht = Is && Or("%Object.defineProperty%", !0);
|
|
3546
3549
|
if (ht)
|
|
3547
3550
|
try {
|
|
3548
3551
|
ht({}, "a", { value: 1 });
|
|
3549
3552
|
} catch {
|
|
3550
3553
|
ht = !1;
|
|
3551
3554
|
}
|
|
3552
|
-
var
|
|
3555
|
+
var Fs = Or("%SyntaxError%"), He = Or("%TypeError%"), Jr = Fr, Os = function(e, r, i) {
|
|
3553
3556
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3554
3557
|
throw new He("`obj` must be an object or a function`");
|
|
3555
3558
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3573,8 +3576,8 @@ var Is = Fr("%SyntaxError%"), He = Fr("%TypeError%"), Jr = Ir, Fs = function(e,
|
|
|
3573
3576
|
else if (d || !s && !a && !c)
|
|
3574
3577
|
e[r] = i;
|
|
3575
3578
|
else
|
|
3576
|
-
throw new
|
|
3577
|
-
}, Mn = at, Yr =
|
|
3579
|
+
throw new Fs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3580
|
+
}, Mn = at, Yr = Os, _s = jn(), Xr = Fr, Zr = Mn("%TypeError%"), Ts = Mn("%Math.floor%"), Cs = function(e, r) {
|
|
3578
3581
|
if (typeof e != "function")
|
|
3579
3582
|
throw new Zr("`fn` is not a function");
|
|
3580
3583
|
if (typeof r != "number" || r < 0 || r > 4294967295 || Ts(r) !== r)
|
|
@@ -3584,7 +3587,7 @@ var Is = Fr("%SyntaxError%"), He = Fr("%TypeError%"), Jr = Ir, Fs = function(e,
|
|
|
3584
3587
|
var c = Xr(e, "length");
|
|
3585
3588
|
c && !c.configurable && (s = !1), c && !c.writable && (a = !1);
|
|
3586
3589
|
}
|
|
3587
|
-
return (s || a || !i) && (
|
|
3590
|
+
return (s || a || !i) && (_s ? Yr(
|
|
3588
3591
|
/** @type {Parameters<define>[0]} */
|
|
3589
3592
|
e,
|
|
3590
3593
|
"length",
|
|
@@ -3599,7 +3602,7 @@ var Is = Fr("%SyntaxError%"), He = Fr("%TypeError%"), Jr = Ir, Fs = function(e,
|
|
|
3599
3602
|
)), e;
|
|
3600
3603
|
};
|
|
3601
3604
|
(function(t) {
|
|
3602
|
-
var e =
|
|
3605
|
+
var e = Ir, r = at, i = Cs, s = r("%TypeError%"), a = r("%Function.prototype.apply%"), c = r("%Function.prototype.call%"), d = r("%Reflect.apply%", !0) || e.call(c, a), p = r("%Object.defineProperty%", !0), m = r("%Math.max%");
|
|
3603
3606
|
if (p)
|
|
3604
3607
|
try {
|
|
3605
3608
|
p({}, "a", { value: 1 });
|
|
@@ -3621,121 +3624,121 @@ var Is = Fr("%SyntaxError%"), He = Fr("%TypeError%"), Jr = Ir, Fs = function(e,
|
|
|
3621
3624
|
};
|
|
3622
3625
|
p ? p(t.exports, "apply", { value: l }) : t.exports.apply = l;
|
|
3623
3626
|
})(Un);
|
|
3624
|
-
var Vn = Un.exports, qn = at, Qn = Vn,
|
|
3627
|
+
var Vn = Un.exports, qn = at, Qn = Vn, xs = Qn(qn("String.prototype.indexOf")), Gn = function(e, r) {
|
|
3625
3628
|
var i = qn(e, !!r);
|
|
3626
|
-
return typeof i == "function" &&
|
|
3627
|
-
},
|
|
3628
|
-
return
|
|
3629
|
+
return typeof i == "function" && xs(e, ".prototype.") > -1 ? Qn(i) : i;
|
|
3630
|
+
}, ks = Er(), Bs = Gn, ur = Bs("Object.prototype.toString"), jt = function(e) {
|
|
3631
|
+
return ks && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ur(e) === "[object Arguments]";
|
|
3629
3632
|
}, zn = function(e) {
|
|
3630
|
-
return
|
|
3631
|
-
},
|
|
3632
|
-
return
|
|
3633
|
+
return jt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ur(e) !== "[object Array]" && ur(e.callee) === "[object Function]";
|
|
3634
|
+
}, Ls = function() {
|
|
3635
|
+
return jt(arguments);
|
|
3633
3636
|
}();
|
|
3634
|
-
|
|
3635
|
-
var
|
|
3637
|
+
jt.isLegacyArguments = zn;
|
|
3638
|
+
var Ps = Ls ? jt : zn, Rs = Object.prototype.toString, Ds = Function.prototype.toString, Ns = /^\s*(?:function)?\*/, Kn = Er(), zt = Object.getPrototypeOf, $s = function() {
|
|
3636
3639
|
if (!Kn)
|
|
3637
3640
|
return !1;
|
|
3638
3641
|
try {
|
|
3639
3642
|
return Function("return function*() {}")();
|
|
3640
3643
|
} catch {
|
|
3641
3644
|
}
|
|
3642
|
-
},
|
|
3645
|
+
}, Kt, Us = function(e) {
|
|
3643
3646
|
if (typeof e != "function")
|
|
3644
3647
|
return !1;
|
|
3645
|
-
if (Ns.test(
|
|
3648
|
+
if (Ns.test(Ds.call(e)))
|
|
3646
3649
|
return !0;
|
|
3647
3650
|
if (!Kn) {
|
|
3648
|
-
var r =
|
|
3651
|
+
var r = Rs.call(e);
|
|
3649
3652
|
return r === "[object GeneratorFunction]";
|
|
3650
3653
|
}
|
|
3651
|
-
if (!
|
|
3654
|
+
if (!zt)
|
|
3652
3655
|
return !1;
|
|
3653
|
-
if (typeof
|
|
3654
|
-
var i =
|
|
3655
|
-
|
|
3656
|
+
if (typeof Kt > "u") {
|
|
3657
|
+
var i = $s();
|
|
3658
|
+
Kt = i ? zt(i) : !1;
|
|
3656
3659
|
}
|
|
3657
|
-
return
|
|
3658
|
-
}, Wn = Function.prototype.toString, Ze = typeof Reflect == "object" && Reflect !== null && Reflect.apply,
|
|
3660
|
+
return zt(e) === Kt;
|
|
3661
|
+
}, Wn = Function.prototype.toString, Ze = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, It;
|
|
3659
3662
|
if (typeof Ze == "function" && typeof Object.defineProperty == "function")
|
|
3660
3663
|
try {
|
|
3661
|
-
|
|
3664
|
+
cr = Object.defineProperty({}, "length", {
|
|
3662
3665
|
get: function() {
|
|
3663
|
-
throw
|
|
3666
|
+
throw It;
|
|
3664
3667
|
}
|
|
3665
|
-
}),
|
|
3668
|
+
}), It = {}, Ze(function() {
|
|
3666
3669
|
throw 42;
|
|
3667
|
-
}, null,
|
|
3670
|
+
}, null, cr);
|
|
3668
3671
|
} catch (t) {
|
|
3669
|
-
t !==
|
|
3672
|
+
t !== It && (Ze = null);
|
|
3670
3673
|
}
|
|
3671
3674
|
else
|
|
3672
3675
|
Ze = null;
|
|
3673
|
-
var
|
|
3676
|
+
var js = /^\s*class\b/, lr = function(e) {
|
|
3674
3677
|
try {
|
|
3675
3678
|
var r = Wn.call(e);
|
|
3676
|
-
return
|
|
3679
|
+
return js.test(r);
|
|
3677
3680
|
} catch {
|
|
3678
3681
|
return !1;
|
|
3679
3682
|
}
|
|
3680
|
-
},
|
|
3683
|
+
}, Wt = function(e) {
|
|
3681
3684
|
try {
|
|
3682
|
-
return
|
|
3685
|
+
return lr(e) ? !1 : (Wn.call(e), !0);
|
|
3683
3686
|
} catch {
|
|
3684
3687
|
return !1;
|
|
3685
3688
|
}
|
|
3686
|
-
},
|
|
3689
|
+
}, Ft = Object.prototype.toString, Ms = "[object Object]", Vs = "[object Function]", qs = "[object GeneratorFunction]", Qs = "[object HTMLAllCollection]", Gs = "[object HTML document.all class]", zs = "[object HTMLCollection]", Ks = typeof Symbol == "function" && !!Symbol.toStringTag, Ws = !(0 in [,]), fr = function() {
|
|
3687
3690
|
return !1;
|
|
3688
3691
|
};
|
|
3689
3692
|
if (typeof document == "object") {
|
|
3690
|
-
var
|
|
3691
|
-
|
|
3692
|
-
if ((
|
|
3693
|
+
var Hs = document.all;
|
|
3694
|
+
Ft.call(Hs) === Ft.call(document.all) && (fr = function(e) {
|
|
3695
|
+
if ((Ws || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3693
3696
|
try {
|
|
3694
|
-
var r =
|
|
3695
|
-
return (r ===
|
|
3697
|
+
var r = Ft.call(e);
|
|
3698
|
+
return (r === Qs || r === Gs || r === zs || r === Ms) && e("") == null;
|
|
3696
3699
|
} catch {
|
|
3697
3700
|
}
|
|
3698
3701
|
return !1;
|
|
3699
3702
|
});
|
|
3700
3703
|
}
|
|
3701
|
-
var
|
|
3702
|
-
if (
|
|
3704
|
+
var Js = Ze ? function(e) {
|
|
3705
|
+
if (fr(e))
|
|
3703
3706
|
return !0;
|
|
3704
3707
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3705
3708
|
return !1;
|
|
3706
3709
|
try {
|
|
3707
|
-
Ze(e, null,
|
|
3710
|
+
Ze(e, null, cr);
|
|
3708
3711
|
} catch (r) {
|
|
3709
|
-
if (r !==
|
|
3712
|
+
if (r !== It)
|
|
3710
3713
|
return !1;
|
|
3711
3714
|
}
|
|
3712
|
-
return !
|
|
3715
|
+
return !lr(e) && Wt(e);
|
|
3713
3716
|
} : function(e) {
|
|
3714
|
-
if (
|
|
3717
|
+
if (fr(e))
|
|
3715
3718
|
return !0;
|
|
3716
3719
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3717
3720
|
return !1;
|
|
3718
|
-
if (
|
|
3719
|
-
return
|
|
3720
|
-
if (
|
|
3721
|
+
if (Ks)
|
|
3722
|
+
return Wt(e);
|
|
3723
|
+
if (lr(e))
|
|
3721
3724
|
return !1;
|
|
3722
|
-
var r =
|
|
3723
|
-
return r !==
|
|
3724
|
-
},
|
|
3725
|
+
var r = Ft.call(e);
|
|
3726
|
+
return r !== Vs && r !== qs && !/^\[object HTML/.test(r) ? !1 : Wt(e);
|
|
3727
|
+
}, Ys = Js, Xs = Object.prototype.toString, Hn = Object.prototype.hasOwnProperty, Zs = function(e, r, i) {
|
|
3725
3728
|
for (var s = 0, a = e.length; s < a; s++)
|
|
3726
3729
|
Hn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3727
|
-
},
|
|
3730
|
+
}, ea = function(e, r, i) {
|
|
3728
3731
|
for (var s = 0, a = e.length; s < a; s++)
|
|
3729
3732
|
i == null ? r(e.charAt(s), s, e) : r.call(i, e.charAt(s), s, e);
|
|
3730
|
-
},
|
|
3733
|
+
}, ta = function(e, r, i) {
|
|
3731
3734
|
for (var s in e)
|
|
3732
3735
|
Hn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3733
|
-
},
|
|
3734
|
-
if (!
|
|
3736
|
+
}, ra = function(e, r, i) {
|
|
3737
|
+
if (!Ys(r))
|
|
3735
3738
|
throw new TypeError("iterator must be a function");
|
|
3736
3739
|
var s;
|
|
3737
|
-
arguments.length >= 3 && (s = i),
|
|
3738
|
-
},
|
|
3740
|
+
arguments.length >= 3 && (s = i), Xs.call(e) === "[object Array]" ? Zs(e, r, s) : typeof e == "string" ? ea(e, r, s) : ta(e, r, s);
|
|
3741
|
+
}, na = ra, Ht = [
|
|
3739
3742
|
"BigInt64Array",
|
|
3740
3743
|
"BigUint64Array",
|
|
3741
3744
|
"Float32Array",
|
|
@@ -3747,42 +3750,42 @@ var Hs = Ze ? function(e) {
|
|
|
3747
3750
|
"Uint32Array",
|
|
3748
3751
|
"Uint8Array",
|
|
3749
3752
|
"Uint8ClampedArray"
|
|
3750
|
-
],
|
|
3751
|
-
for (var e = [], r = 0; r <
|
|
3752
|
-
typeof
|
|
3753
|
+
], ia = typeof globalThis > "u" ? En : globalThis, oa = function() {
|
|
3754
|
+
for (var e = [], r = 0; r < Ht.length; r++)
|
|
3755
|
+
typeof ia[Ht[r]] == "function" && (e[e.length] = Ht[r]);
|
|
3753
3756
|
return e;
|
|
3754
|
-
},
|
|
3757
|
+
}, xt = na, sa = oa, en = Vn, _r = Gn, Ot = Fr, aa = _r("Object.prototype.toString"), Jn = Er(), tn = typeof globalThis > "u" ? En : globalThis, dr = sa(), Tr = _r("String.prototype.slice"), Jt = Object.getPrototypeOf, ua = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3755
3758
|
for (var i = 0; i < e.length; i += 1)
|
|
3756
3759
|
if (e[i] === r)
|
|
3757
3760
|
return i;
|
|
3758
3761
|
return -1;
|
|
3759
|
-
},
|
|
3760
|
-
Jn &&
|
|
3762
|
+
}, kt = { __proto__: null };
|
|
3763
|
+
Jn && Ot && Jt ? xt(dr, function(t) {
|
|
3761
3764
|
var e = new tn[t]();
|
|
3762
3765
|
if (Symbol.toStringTag in e) {
|
|
3763
|
-
var r =
|
|
3766
|
+
var r = Jt(e), i = Ot(r, Symbol.toStringTag);
|
|
3764
3767
|
if (!i) {
|
|
3765
|
-
var s =
|
|
3766
|
-
i =
|
|
3768
|
+
var s = Jt(r);
|
|
3769
|
+
i = Ot(s, Symbol.toStringTag);
|
|
3767
3770
|
}
|
|
3768
|
-
|
|
3771
|
+
kt["$" + t] = en(i.get);
|
|
3769
3772
|
}
|
|
3770
|
-
}) :
|
|
3773
|
+
}) : xt(dr, function(t) {
|
|
3771
3774
|
var e = new tn[t](), r = e.slice || e.set;
|
|
3772
|
-
r && (
|
|
3775
|
+
r && (kt["$" + t] = en(r));
|
|
3773
3776
|
});
|
|
3774
|
-
var
|
|
3777
|
+
var ca = function(e) {
|
|
3775
3778
|
var r = !1;
|
|
3776
|
-
return
|
|
3779
|
+
return xt(kt, function(i, s) {
|
|
3777
3780
|
if (!r)
|
|
3778
3781
|
try {
|
|
3779
3782
|
"$" + i(e) === s && (r = Tr(s, 1));
|
|
3780
3783
|
} catch {
|
|
3781
3784
|
}
|
|
3782
3785
|
}), r;
|
|
3783
|
-
},
|
|
3786
|
+
}, la = function(e) {
|
|
3784
3787
|
var r = !1;
|
|
3785
|
-
return
|
|
3788
|
+
return xt(kt, function(i, s) {
|
|
3786
3789
|
if (!r)
|
|
3787
3790
|
try {
|
|
3788
3791
|
i(e), r = Tr(s, 1);
|
|
@@ -3793,15 +3796,15 @@ var ua = function(e) {
|
|
|
3793
3796
|
if (!e || typeof e != "object")
|
|
3794
3797
|
return !1;
|
|
3795
3798
|
if (!Jn) {
|
|
3796
|
-
var r = Tr(
|
|
3797
|
-
return
|
|
3799
|
+
var r = Tr(aa(e), 8, -1);
|
|
3800
|
+
return ua(dr, r) > -1 ? r : r !== "Object" ? !1 : la(e);
|
|
3798
3801
|
}
|
|
3799
|
-
return
|
|
3800
|
-
},
|
|
3801
|
-
return !!
|
|
3802
|
+
return Ot ? ca(e) : null;
|
|
3803
|
+
}, fa = Yn, da = function(e) {
|
|
3804
|
+
return !!fa(e);
|
|
3802
3805
|
};
|
|
3803
3806
|
(function(t) {
|
|
3804
|
-
var e =
|
|
3807
|
+
var e = Ps, r = Us, i = Yn, s = da;
|
|
3805
3808
|
function a(A) {
|
|
3806
3809
|
return A.call.bind(A);
|
|
3807
3810
|
}
|
|
@@ -3810,7 +3813,7 @@ var ua = function(e) {
|
|
|
3810
3813
|
var E = a(BigInt.prototype.valueOf);
|
|
3811
3814
|
if (d)
|
|
3812
3815
|
var F = a(Symbol.prototype.valueOf);
|
|
3813
|
-
function
|
|
3816
|
+
function T(A, lt) {
|
|
3814
3817
|
if (typeof A != "object")
|
|
3815
3818
|
return !1;
|
|
3816
3819
|
try {
|
|
@@ -3824,18 +3827,18 @@ var ua = function(e) {
|
|
|
3824
3827
|
return typeof Promise < "u" && A instanceof Promise || A !== null && typeof A == "object" && typeof A.then == "function" && typeof A.catch == "function";
|
|
3825
3828
|
}
|
|
3826
3829
|
t.isPromise = x;
|
|
3827
|
-
function
|
|
3830
|
+
function D(A) {
|
|
3828
3831
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(A) : s(A) || v(A);
|
|
3829
3832
|
}
|
|
3830
|
-
t.isArrayBufferView =
|
|
3833
|
+
t.isArrayBufferView = D;
|
|
3831
3834
|
function I(A) {
|
|
3832
3835
|
return i(A) === "Uint8Array";
|
|
3833
3836
|
}
|
|
3834
3837
|
t.isUint8Array = I;
|
|
3835
|
-
function
|
|
3838
|
+
function _(A) {
|
|
3836
3839
|
return i(A) === "Uint8ClampedArray";
|
|
3837
3840
|
}
|
|
3838
|
-
t.isUint8ClampedArray =
|
|
3841
|
+
t.isUint8ClampedArray = _;
|
|
3839
3842
|
function j(A) {
|
|
3840
3843
|
return i(A) === "Uint16Array";
|
|
3841
3844
|
}
|
|
@@ -3864,14 +3867,14 @@ var ua = function(e) {
|
|
|
3864
3867
|
return i(A) === "Float64Array";
|
|
3865
3868
|
}
|
|
3866
3869
|
t.isFloat64Array = ne;
|
|
3867
|
-
function
|
|
3870
|
+
function be(A) {
|
|
3868
3871
|
return i(A) === "BigInt64Array";
|
|
3869
3872
|
}
|
|
3870
|
-
t.isBigInt64Array =
|
|
3871
|
-
function
|
|
3873
|
+
t.isBigInt64Array = be;
|
|
3874
|
+
function ve(A) {
|
|
3872
3875
|
return i(A) === "BigUint64Array";
|
|
3873
3876
|
}
|
|
3874
|
-
t.isBigUint64Array =
|
|
3877
|
+
t.isBigUint64Array = ve;
|
|
3875
3878
|
function ae(A) {
|
|
3876
3879
|
return p(A) === "[object Map]";
|
|
3877
3880
|
}
|
|
@@ -3884,32 +3887,32 @@ var ua = function(e) {
|
|
|
3884
3887
|
return p(A) === "[object Set]";
|
|
3885
3888
|
}
|
|
3886
3889
|
he.working = typeof Set < "u" && he(/* @__PURE__ */ new Set());
|
|
3887
|
-
function
|
|
3890
|
+
function Re(A) {
|
|
3888
3891
|
return typeof Set > "u" ? !1 : he.working ? he(A) : A instanceof Set;
|
|
3889
3892
|
}
|
|
3890
|
-
t.isSet =
|
|
3891
|
-
function
|
|
3893
|
+
t.isSet = Re;
|
|
3894
|
+
function ke(A) {
|
|
3892
3895
|
return p(A) === "[object WeakMap]";
|
|
3893
3896
|
}
|
|
3894
|
-
|
|
3897
|
+
ke.working = typeof WeakMap < "u" && ke(/* @__PURE__ */ new WeakMap());
|
|
3895
3898
|
function Ge(A) {
|
|
3896
|
-
return typeof WeakMap > "u" ? !1 :
|
|
3899
|
+
return typeof WeakMap > "u" ? !1 : ke.working ? ke(A) : A instanceof WeakMap;
|
|
3897
3900
|
}
|
|
3898
3901
|
t.isWeakMap = Ge;
|
|
3899
|
-
function
|
|
3902
|
+
function Se(A) {
|
|
3900
3903
|
return p(A) === "[object WeakSet]";
|
|
3901
3904
|
}
|
|
3902
|
-
|
|
3905
|
+
Se.working = typeof WeakSet < "u" && Se(/* @__PURE__ */ new WeakSet());
|
|
3903
3906
|
function ue(A) {
|
|
3904
|
-
return
|
|
3907
|
+
return Se(A);
|
|
3905
3908
|
}
|
|
3906
3909
|
t.isWeakSet = ue;
|
|
3907
|
-
function
|
|
3910
|
+
function Be(A) {
|
|
3908
3911
|
return p(A) === "[object ArrayBuffer]";
|
|
3909
3912
|
}
|
|
3910
|
-
|
|
3913
|
+
Be.working = typeof ArrayBuffer < "u" && Be(new ArrayBuffer());
|
|
3911
3914
|
function ze(A) {
|
|
3912
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
3915
|
+
return typeof ArrayBuffer > "u" ? !1 : Be.working ? Be(A) : A instanceof ArrayBuffer;
|
|
3913
3916
|
}
|
|
3914
3917
|
t.isArrayBuffer = ze;
|
|
3915
3918
|
function g(A) {
|
|
@@ -3949,33 +3952,33 @@ var ua = function(e) {
|
|
|
3949
3952
|
}
|
|
3950
3953
|
t.isWebAssemblyCompiledModule = J;
|
|
3951
3954
|
function ce(A) {
|
|
3952
|
-
return
|
|
3955
|
+
return T(A, m);
|
|
3953
3956
|
}
|
|
3954
3957
|
t.isNumberObject = ce;
|
|
3955
|
-
function
|
|
3956
|
-
return
|
|
3958
|
+
function De(A) {
|
|
3959
|
+
return T(A, l);
|
|
3957
3960
|
}
|
|
3958
|
-
t.isStringObject =
|
|
3959
|
-
function
|
|
3960
|
-
return
|
|
3961
|
+
t.isStringObject = De;
|
|
3962
|
+
function Le(A) {
|
|
3963
|
+
return T(A, w);
|
|
3961
3964
|
}
|
|
3962
|
-
t.isBooleanObject =
|
|
3965
|
+
t.isBooleanObject = Le;
|
|
3963
3966
|
function Ne(A) {
|
|
3964
|
-
return c &&
|
|
3967
|
+
return c && T(A, E);
|
|
3965
3968
|
}
|
|
3966
3969
|
t.isBigIntObject = Ne;
|
|
3967
|
-
function
|
|
3968
|
-
return d &&
|
|
3970
|
+
function Ae(A) {
|
|
3971
|
+
return d && T(A, F);
|
|
3969
3972
|
}
|
|
3970
|
-
t.isSymbolObject =
|
|
3971
|
-
function
|
|
3972
|
-
return ce(A) ||
|
|
3973
|
+
t.isSymbolObject = Ae;
|
|
3974
|
+
function $e(A) {
|
|
3975
|
+
return ce(A) || De(A) || Le(A) || Ne(A) || Ae(A);
|
|
3973
3976
|
}
|
|
3974
|
-
t.isBoxedPrimitive =
|
|
3975
|
-
function
|
|
3977
|
+
t.isBoxedPrimitive = $e;
|
|
3978
|
+
function Mt(A) {
|
|
3976
3979
|
return typeof Uint8Array < "u" && (ze(A) || M(A));
|
|
3977
3980
|
}
|
|
3978
|
-
t.isAnyArrayBuffer =
|
|
3981
|
+
t.isAnyArrayBuffer = Mt, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(A) {
|
|
3979
3982
|
Object.defineProperty(t, A, {
|
|
3980
3983
|
enumerable: !1,
|
|
3981
3984
|
value: function() {
|
|
@@ -3983,11 +3986,11 @@ var ua = function(e) {
|
|
|
3983
3986
|
}
|
|
3984
3987
|
});
|
|
3985
3988
|
});
|
|
3986
|
-
})(
|
|
3987
|
-
var
|
|
3989
|
+
})(Dn);
|
|
3990
|
+
var ha = function(e) {
|
|
3988
3991
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3989
|
-
},
|
|
3990
|
-
typeof Object.create == "function" ?
|
|
3992
|
+
}, hr = { exports: {} };
|
|
3993
|
+
typeof Object.create == "function" ? hr.exports = function(e, r) {
|
|
3991
3994
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
3992
3995
|
constructor: {
|
|
3993
3996
|
value: e,
|
|
@@ -3996,7 +3999,7 @@ typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
|
3996
3999
|
configurable: !0
|
|
3997
4000
|
}
|
|
3998
4001
|
}));
|
|
3999
|
-
} :
|
|
4002
|
+
} : hr.exports = function(e, r) {
|
|
4000
4003
|
if (r) {
|
|
4001
4004
|
e.super_ = r;
|
|
4002
4005
|
var i = function() {
|
|
@@ -4004,7 +4007,7 @@ typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
|
4004
4007
|
i.prototype = r.prototype, e.prototype = new i(), e.prototype.constructor = e;
|
|
4005
4008
|
}
|
|
4006
4009
|
};
|
|
4007
|
-
var
|
|
4010
|
+
var pa = hr.exports;
|
|
4008
4011
|
(function(t) {
|
|
4009
4012
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
4010
4013
|
for (var S = Object.keys(v), O = {}, M = 0; M < S.length; M++)
|
|
@@ -4037,7 +4040,7 @@ var ha = dr.exports;
|
|
|
4037
4040
|
return $;
|
|
4038
4041
|
}
|
|
4039
4042
|
}), R = O[S]; S < M; R = O[++S])
|
|
4040
|
-
|
|
4043
|
+
_(R) || !ne(R) ? V += " " + R : V += " " + c(R);
|
|
4041
4044
|
return V;
|
|
4042
4045
|
}, t.deprecate = function(g, v) {
|
|
4043
4046
|
if (typeof P < "u" && P.noDeprecation === !0)
|
|
@@ -4131,7 +4134,7 @@ var ha = dr.exports;
|
|
|
4131
4134
|
if (M)
|
|
4132
4135
|
return M;
|
|
4133
4136
|
var V = Object.keys(v), R = m(V);
|
|
4134
|
-
if (g.showHidden && (V = Object.getOwnPropertyNames(v)),
|
|
4137
|
+
if (g.showHidden && (V = Object.getOwnPropertyNames(v)), ve(v) && (V.indexOf("message") >= 0 || V.indexOf("description") >= 0))
|
|
4135
4138
|
return E(v);
|
|
4136
4139
|
if (V.length === 0) {
|
|
4137
4140
|
if (ae(v)) {
|
|
@@ -4140,25 +4143,25 @@ var ha = dr.exports;
|
|
|
4140
4143
|
}
|
|
4141
4144
|
if (q(v))
|
|
4142
4145
|
return g.stylize(RegExp.prototype.toString.call(v), "regexp");
|
|
4143
|
-
if (we(v))
|
|
4144
|
-
return g.stylize(Date.prototype.toString.call(v), "date");
|
|
4145
4146
|
if (be(v))
|
|
4147
|
+
return g.stylize(Date.prototype.toString.call(v), "date");
|
|
4148
|
+
if (ve(v))
|
|
4146
4149
|
return E(v);
|
|
4147
4150
|
}
|
|
4148
4151
|
var Q = "", J = !1, ce = ["{", "}"];
|
|
4149
|
-
if (
|
|
4150
|
-
var
|
|
4151
|
-
Q = " [Function" +
|
|
4152
|
+
if (D(v) && (J = !0, ce = ["[", "]"]), ae(v)) {
|
|
4153
|
+
var De = v.name ? ": " + v.name : "";
|
|
4154
|
+
Q = " [Function" + De + "]";
|
|
4152
4155
|
}
|
|
4153
|
-
if (q(v) && (Q = " " + RegExp.prototype.toString.call(v)),
|
|
4156
|
+
if (q(v) && (Q = " " + RegExp.prototype.toString.call(v)), be(v) && (Q = " " + Date.prototype.toUTCString.call(v)), ve(v) && (Q = " " + E(v)), V.length === 0 && (!J || v.length == 0))
|
|
4154
4157
|
return ce[0] + Q + ce[1];
|
|
4155
4158
|
if (S < 0)
|
|
4156
4159
|
return q(v) ? g.stylize(RegExp.prototype.toString.call(v), "regexp") : g.stylize("[Object]", "special");
|
|
4157
4160
|
g.seen.push(v);
|
|
4158
|
-
var
|
|
4159
|
-
return J ?
|
|
4160
|
-
return
|
|
4161
|
-
}), g.seen.pop(), x(
|
|
4161
|
+
var Le;
|
|
4162
|
+
return J ? Le = F(g, v, S, R, V) : Le = V.map(function(Ne) {
|
|
4163
|
+
return T(g, v, S, R, Ne, J);
|
|
4164
|
+
}), g.seen.pop(), x(Le, Q, ce);
|
|
4162
4165
|
}
|
|
4163
4166
|
function w(g, v) {
|
|
4164
4167
|
if (B(v))
|
|
@@ -4171,7 +4174,7 @@ var ha = dr.exports;
|
|
|
4171
4174
|
return g.stylize("" + v, "number");
|
|
4172
4175
|
if (I(v))
|
|
4173
4176
|
return g.stylize("" + v, "boolean");
|
|
4174
|
-
if (
|
|
4177
|
+
if (_(v))
|
|
4175
4178
|
return g.stylize("null", "null");
|
|
4176
4179
|
}
|
|
4177
4180
|
function E(g) {
|
|
@@ -4179,7 +4182,7 @@ var ha = dr.exports;
|
|
|
4179
4182
|
}
|
|
4180
4183
|
function F(g, v, S, O, M) {
|
|
4181
4184
|
for (var V = [], R = 0, $ = v.length; R < $; ++R)
|
|
4182
|
-
|
|
4185
|
+
Se(v, String(R)) ? V.push(T(
|
|
4183
4186
|
g,
|
|
4184
4187
|
v,
|
|
4185
4188
|
S,
|
|
@@ -4188,7 +4191,7 @@ var ha = dr.exports;
|
|
|
4188
4191
|
!0
|
|
4189
4192
|
)) : V.push("");
|
|
4190
4193
|
return M.forEach(function(Q) {
|
|
4191
|
-
Q.match(/^\d+$/) || V.push(
|
|
4194
|
+
Q.match(/^\d+$/) || V.push(T(
|
|
4192
4195
|
g,
|
|
4193
4196
|
v,
|
|
4194
4197
|
S,
|
|
@@ -4198,9 +4201,9 @@ var ha = dr.exports;
|
|
|
4198
4201
|
));
|
|
4199
4202
|
}), V;
|
|
4200
4203
|
}
|
|
4201
|
-
function
|
|
4204
|
+
function T(g, v, S, O, M, V) {
|
|
4202
4205
|
var R, $, Q;
|
|
4203
|
-
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")),
|
|
4206
|
+
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")), Se(O, M) || (R = "[" + M + "]"), $ || (g.seen.indexOf(Q.value) < 0 ? (_(S) ? $ = l(g, Q.value, null) : $ = l(g, Q.value, S - 1), $.indexOf(`
|
|
4204
4207
|
`) > -1 && (V ? $ = $.split(`
|
|
4205
4208
|
`).map(function(J) {
|
|
4206
4209
|
return " " + J;
|
|
@@ -4226,19 +4229,19 @@ var ha = dr.exports;
|
|
|
4226
4229
|
`) + " " + g.join(`,
|
|
4227
4230
|
`) + " " + S[1] : S[0] + v + " " + g.join(", ") + " " + S[1];
|
|
4228
4231
|
}
|
|
4229
|
-
t.types =
|
|
4230
|
-
function
|
|
4232
|
+
t.types = Dn;
|
|
4233
|
+
function D(g) {
|
|
4231
4234
|
return Array.isArray(g);
|
|
4232
4235
|
}
|
|
4233
|
-
t.isArray =
|
|
4236
|
+
t.isArray = D;
|
|
4234
4237
|
function I(g) {
|
|
4235
4238
|
return typeof g == "boolean";
|
|
4236
4239
|
}
|
|
4237
4240
|
t.isBoolean = I;
|
|
4238
|
-
function
|
|
4241
|
+
function _(g) {
|
|
4239
4242
|
return g === null;
|
|
4240
4243
|
}
|
|
4241
|
-
t.isNull =
|
|
4244
|
+
t.isNull = _;
|
|
4242
4245
|
function j(g) {
|
|
4243
4246
|
return g == null;
|
|
4244
4247
|
}
|
|
@@ -4267,14 +4270,14 @@ var ha = dr.exports;
|
|
|
4267
4270
|
return typeof g == "object" && g !== null;
|
|
4268
4271
|
}
|
|
4269
4272
|
t.isObject = ne;
|
|
4270
|
-
function
|
|
4273
|
+
function be(g) {
|
|
4271
4274
|
return ne(g) && he(g) === "[object Date]";
|
|
4272
4275
|
}
|
|
4273
|
-
t.isDate =
|
|
4274
|
-
function
|
|
4276
|
+
t.isDate = be, t.types.isDate = be;
|
|
4277
|
+
function ve(g) {
|
|
4275
4278
|
return ne(g) && (he(g) === "[object Error]" || g instanceof Error);
|
|
4276
4279
|
}
|
|
4277
|
-
t.isError =
|
|
4280
|
+
t.isError = ve, t.types.isNativeError = ve;
|
|
4278
4281
|
function ae(g) {
|
|
4279
4282
|
return typeof g == "function";
|
|
4280
4283
|
}
|
|
@@ -4283,14 +4286,14 @@ var ha = dr.exports;
|
|
|
4283
4286
|
return g === null || typeof g == "boolean" || typeof g == "number" || typeof g == "string" || typeof g == "symbol" || // ES6 symbol
|
|
4284
4287
|
typeof g > "u";
|
|
4285
4288
|
}
|
|
4286
|
-
t.isPrimitive = ct, t.isBuffer =
|
|
4289
|
+
t.isPrimitive = ct, t.isBuffer = ha;
|
|
4287
4290
|
function he(g) {
|
|
4288
4291
|
return Object.prototype.toString.call(g);
|
|
4289
4292
|
}
|
|
4290
|
-
function
|
|
4293
|
+
function Re(g) {
|
|
4291
4294
|
return g < 10 ? "0" + g.toString(10) : g.toString(10);
|
|
4292
4295
|
}
|
|
4293
|
-
var
|
|
4296
|
+
var ke = [
|
|
4294
4297
|
"Jan",
|
|
4295
4298
|
"Feb",
|
|
4296
4299
|
"Mar",
|
|
@@ -4306,22 +4309,22 @@ var ha = dr.exports;
|
|
|
4306
4309
|
];
|
|
4307
4310
|
function Ge() {
|
|
4308
4311
|
var g = /* @__PURE__ */ new Date(), v = [
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
+
Re(g.getHours()),
|
|
4313
|
+
Re(g.getMinutes()),
|
|
4314
|
+
Re(g.getSeconds())
|
|
4312
4315
|
].join(":");
|
|
4313
|
-
return [g.getDate(),
|
|
4316
|
+
return [g.getDate(), ke[g.getMonth()], v].join(" ");
|
|
4314
4317
|
}
|
|
4315
4318
|
t.log = function() {
|
|
4316
4319
|
console.log("%s - %s", Ge(), t.format.apply(t, arguments));
|
|
4317
|
-
}, t.inherits =
|
|
4320
|
+
}, t.inherits = pa, t._extend = function(g, v) {
|
|
4318
4321
|
if (!v || !ne(v))
|
|
4319
4322
|
return g;
|
|
4320
4323
|
for (var S = Object.keys(v), O = S.length; O--; )
|
|
4321
4324
|
g[S[O]] = v[S[O]];
|
|
4322
4325
|
return g;
|
|
4323
4326
|
};
|
|
4324
|
-
function
|
|
4327
|
+
function Se(g, v) {
|
|
4325
4328
|
return Object.prototype.hasOwnProperty.call(g, v);
|
|
4326
4329
|
}
|
|
4327
4330
|
var ue = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
@@ -4364,7 +4367,7 @@ var ha = dr.exports;
|
|
|
4364
4367
|
e(v)
|
|
4365
4368
|
);
|
|
4366
4369
|
}, t.promisify.custom = ue;
|
|
4367
|
-
function
|
|
4370
|
+
function Be(g, v) {
|
|
4368
4371
|
if (!g) {
|
|
4369
4372
|
var S = new Error("Promise was rejected with a falsy value");
|
|
4370
4373
|
S.reason = g, g = S;
|
|
@@ -4388,7 +4391,7 @@ var ha = dr.exports;
|
|
|
4388
4391
|
P.nextTick(R.bind(null, null, $));
|
|
4389
4392
|
},
|
|
4390
4393
|
function($) {
|
|
4391
|
-
P.nextTick(
|
|
4394
|
+
P.nextTick(Be.bind(null, $, R));
|
|
4392
4395
|
}
|
|
4393
4396
|
);
|
|
4394
4397
|
}
|
|
@@ -4398,9 +4401,9 @@ var ha = dr.exports;
|
|
|
4398
4401
|
), v;
|
|
4399
4402
|
}
|
|
4400
4403
|
t.callbackify = ze;
|
|
4401
|
-
})(
|
|
4402
|
-
const { inherits:
|
|
4403
|
-
function
|
|
4404
|
+
})(Ut);
|
|
4405
|
+
const { inherits: ya, format: Yt } = Ut;
|
|
4406
|
+
function Ue(t, e, r = Error) {
|
|
4404
4407
|
if (!t)
|
|
4405
4408
|
throw new Error("Avvio error code must not be empty");
|
|
4406
4409
|
if (!e)
|
|
@@ -4408,39 +4411,39 @@ function $e(t, e, r = Error) {
|
|
|
4408
4411
|
function i(s, a, c) {
|
|
4409
4412
|
if (!new.target)
|
|
4410
4413
|
return new i(s, a, c);
|
|
4411
|
-
Error.captureStackTrace(this, i), this.code = t, this.message = e, this.name = "AvvioError", s && a && c ? this.message =
|
|
4414
|
+
Error.captureStackTrace(this, i), this.code = t, this.message = e, this.name = "AvvioError", s && a && c ? this.message = Yt(e, s, a, c) : s && a ? this.message = Yt(e, s, a) : s ? this.message = Yt(e, s) : this.message = e;
|
|
4412
4415
|
}
|
|
4413
4416
|
return i.prototype[Symbol.toStringTag] = "Error", i.prototype.toString = function() {
|
|
4414
4417
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4415
|
-
},
|
|
4418
|
+
}, ya(i, r), i;
|
|
4416
4419
|
}
|
|
4417
4420
|
var Xn = {
|
|
4418
|
-
createError:
|
|
4419
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4421
|
+
createError: Ue,
|
|
4422
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ue(
|
|
4420
4423
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
4421
4424
|
"'%s' () is already defined, specify an expose option"
|
|
4422
4425
|
),
|
|
4423
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4426
|
+
AVV_ERR_CALLBACK_NOT_FN: Ue(
|
|
4424
4427
|
"AVV_ERR_CALLBACK_NOT_FN",
|
|
4425
4428
|
"Callback for '%s' hook is not a function. Received: '%s'"
|
|
4426
4429
|
),
|
|
4427
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4430
|
+
AVV_ERR_PLUGIN_NOT_VALID: Ue(
|
|
4428
4431
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
4429
4432
|
"Plugin must be a function or a promise. Received: '%s'"
|
|
4430
4433
|
),
|
|
4431
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4434
|
+
AVV_ERR_ROOT_PLG_BOOTED: Ue(
|
|
4432
4435
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
4433
4436
|
"Root plugin has already booted"
|
|
4434
4437
|
),
|
|
4435
|
-
AVV_ERR_PARENT_PLG_LOADED:
|
|
4438
|
+
AVV_ERR_PARENT_PLG_LOADED: Ue(
|
|
4436
4439
|
"AVV_ERR_PARENT_PLG_LOADED",
|
|
4437
4440
|
"Impossible to load '%s' plugin because the parent '%s' was already loaded"
|
|
4438
4441
|
),
|
|
4439
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4442
|
+
AVV_ERR_READY_TIMEOUT: Ue(
|
|
4440
4443
|
"AVV_ERR_READY_TIMEOUT",
|
|
4441
4444
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4442
4445
|
)
|
|
4443
|
-
},
|
|
4446
|
+
}, ga = function t(e, r, i) {
|
|
4444
4447
|
r === void 0 && (r = ""), i || (i = {});
|
|
4445
4448
|
var s = function(p) {
|
|
4446
4449
|
var m = {
|
|
@@ -4462,12 +4465,12 @@ var Xn = {
|
|
|
4462
4465
|
return r + s(l ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, i).slice(r.length + 2);
|
|
4463
4466
|
}).join("");
|
|
4464
4467
|
};
|
|
4465
|
-
const
|
|
4466
|
-
let
|
|
4468
|
+
const ma = ga, rn = Symbol("avvio.TimeTree.untrackNode"), Xt = Symbol("avvio.TimeTree.trackNode"), nn = Symbol("avvio.TimeTree.getParent"), on = Symbol("avvio.TimeTree.getNode"), sn = Symbol("avvio.TimeTree.addNode");
|
|
4469
|
+
let wa = class {
|
|
4467
4470
|
constructor() {
|
|
4468
4471
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4469
4472
|
}
|
|
4470
|
-
[
|
|
4473
|
+
[Xt](e) {
|
|
4471
4474
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4472
4475
|
}
|
|
4473
4476
|
[rn](e) {
|
|
@@ -4495,7 +4498,7 @@ let ma = class {
|
|
|
4495
4498
|
label: r,
|
|
4496
4499
|
start: i,
|
|
4497
4500
|
nodes: []
|
|
4498
|
-
}, this[
|
|
4501
|
+
}, this[Xt](this.root), this.root.id;
|
|
4499
4502
|
const a = this[nn](e), c = `${r}-${Math.random()}`, d = {
|
|
4500
4503
|
id: c,
|
|
4501
4504
|
parent: e,
|
|
@@ -4503,7 +4506,7 @@ let ma = class {
|
|
|
4503
4506
|
label: r,
|
|
4504
4507
|
nodes: []
|
|
4505
4508
|
};
|
|
4506
|
-
return a.nodes.push(d), this[
|
|
4509
|
+
return a.nodes.push(d), this[Xt](d), c;
|
|
4507
4510
|
}
|
|
4508
4511
|
start(e, r, i = Date.now()) {
|
|
4509
4512
|
return this[sn](e, r, i);
|
|
@@ -4517,16 +4520,16 @@ let ma = class {
|
|
|
4517
4520
|
}
|
|
4518
4521
|
prittyPrint() {
|
|
4519
4522
|
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());
|
|
4520
|
-
return
|
|
4523
|
+
return ma(r);
|
|
4521
4524
|
}
|
|
4522
4525
|
};
|
|
4523
|
-
var
|
|
4524
|
-
function
|
|
4526
|
+
var ba = wa, Cr = { exports: {} }, pr = { exports: {} }, Zt, an;
|
|
4527
|
+
function va() {
|
|
4525
4528
|
if (an)
|
|
4526
|
-
return
|
|
4529
|
+
return Zt;
|
|
4527
4530
|
an = 1;
|
|
4528
4531
|
var t = 1e3, e = t * 60, r = e * 60, i = r * 24, s = i * 7, a = i * 365.25;
|
|
4529
|
-
|
|
4532
|
+
Zt = function(l, w) {
|
|
4530
4533
|
w = w || {};
|
|
4531
4534
|
var E = typeof l;
|
|
4532
4535
|
if (E === "string" && l.length > 0)
|
|
@@ -4598,13 +4601,13 @@ function ba() {
|
|
|
4598
4601
|
return w >= i ? m(l, w, i, "day") : w >= r ? m(l, w, r, "hour") : w >= e ? m(l, w, e, "minute") : w >= t ? m(l, w, t, "second") : l + " ms";
|
|
4599
4602
|
}
|
|
4600
4603
|
function m(l, w, E, F) {
|
|
4601
|
-
var
|
|
4602
|
-
return Math.round(l / E) + " " + F + (
|
|
4604
|
+
var T = w >= E * 1.5;
|
|
4605
|
+
return Math.round(l / E) + " " + F + (T ? "s" : "");
|
|
4603
4606
|
}
|
|
4604
|
-
return
|
|
4607
|
+
return Zt;
|
|
4605
4608
|
}
|
|
4606
|
-
function
|
|
4607
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = a, r.enable = s, r.enabled = c, r.humanize =
|
|
4609
|
+
function Sa(t) {
|
|
4610
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = a, r.enable = s, r.enabled = c, r.humanize = va(), r.destroy = m, Object.keys(t).forEach((l) => {
|
|
4608
4611
|
r[l] = t[l];
|
|
4609
4612
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4610
4613
|
function e(l) {
|
|
@@ -4615,31 +4618,31 @@ function va(t) {
|
|
|
4615
4618
|
}
|
|
4616
4619
|
r.selectColor = e;
|
|
4617
4620
|
function r(l) {
|
|
4618
|
-
let w, E = null, F,
|
|
4619
|
-
function x(...
|
|
4621
|
+
let w, E = null, F, T;
|
|
4622
|
+
function x(...D) {
|
|
4620
4623
|
if (!x.enabled)
|
|
4621
4624
|
return;
|
|
4622
|
-
const I = x,
|
|
4623
|
-
I.diff = j, I.prev = w, I.curr =
|
|
4625
|
+
const I = x, _ = Number(/* @__PURE__ */ new Date()), j = _ - (w || _);
|
|
4626
|
+
I.diff = j, I.prev = w, I.curr = _, w = _, D[0] = r.coerce(D[0]), typeof D[0] != "string" && D.unshift("%O");
|
|
4624
4627
|
let L = 0;
|
|
4625
|
-
|
|
4628
|
+
D[0] = D[0].replace(/%([a-zA-Z%])/g, (k, B) => {
|
|
4626
4629
|
if (k === "%%")
|
|
4627
4630
|
return "%";
|
|
4628
4631
|
L++;
|
|
4629
4632
|
const q = r.formatters[B];
|
|
4630
4633
|
if (typeof q == "function") {
|
|
4631
|
-
const ne =
|
|
4632
|
-
k = q.call(I, ne),
|
|
4634
|
+
const ne = D[L];
|
|
4635
|
+
k = q.call(I, ne), D.splice(L, 1), L--;
|
|
4633
4636
|
}
|
|
4634
4637
|
return k;
|
|
4635
|
-
}), r.formatArgs.call(I,
|
|
4638
|
+
}), r.formatArgs.call(I, D), (I.log || r.log).apply(I, D);
|
|
4636
4639
|
}
|
|
4637
4640
|
return x.namespace = l, x.useColors = r.useColors(), x.color = r.selectColor(l), x.extend = i, x.destroy = r.destroy, Object.defineProperty(x, "enabled", {
|
|
4638
4641
|
enumerable: !0,
|
|
4639
4642
|
configurable: !1,
|
|
4640
|
-
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces,
|
|
4641
|
-
set: (
|
|
4642
|
-
E =
|
|
4643
|
+
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, T = r.enabled(l)), T),
|
|
4644
|
+
set: (D) => {
|
|
4645
|
+
E = D;
|
|
4643
4646
|
}
|
|
4644
4647
|
}), typeof r.init == "function" && r.init(x), x;
|
|
4645
4648
|
}
|
|
@@ -4684,7 +4687,7 @@ function va(t) {
|
|
|
4684
4687
|
}
|
|
4685
4688
|
return r.enable(r.load()), r;
|
|
4686
4689
|
}
|
|
4687
|
-
var
|
|
4690
|
+
var Aa = Sa;
|
|
4688
4691
|
(function(t, e) {
|
|
4689
4692
|
e.formatArgs = i, e.save = s, e.load = a, e.useColors = r, e.storage = c(), e.destroy = /* @__PURE__ */ (() => {
|
|
4690
4693
|
let p = !1;
|
|
@@ -4808,7 +4811,7 @@ var Sa = va;
|
|
|
4808
4811
|
} catch {
|
|
4809
4812
|
}
|
|
4810
4813
|
}
|
|
4811
|
-
t.exports =
|
|
4814
|
+
t.exports = Aa(e);
|
|
4812
4815
|
const { formatters: d } = t.exports;
|
|
4813
4816
|
d.j = function(p) {
|
|
4814
4817
|
try {
|
|
@@ -4817,11 +4820,11 @@ var Sa = va;
|
|
|
4817
4820
|
return "[UnexpectedJSONParseError]: " + m.message;
|
|
4818
4821
|
}
|
|
4819
4822
|
};
|
|
4820
|
-
})(
|
|
4821
|
-
var Zn =
|
|
4822
|
-
const
|
|
4823
|
-
function
|
|
4824
|
-
return t[
|
|
4823
|
+
})(pr, pr.exports);
|
|
4824
|
+
var Zn = pr.exports;
|
|
4825
|
+
const Ea = On, Ia = Rn.EventEmitter, Fa = Ut.inherits, Z = Zn("avvio"), { AVV_ERR_READY_TIMEOUT: Oa } = Xn, er = Symbol.for("plugin-meta");
|
|
4826
|
+
function _a(t, e) {
|
|
4827
|
+
return t[er] && t[er].name ? t[er].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4825
4828
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4826
4829
|
}
|
|
4827
4830
|
function Ta() {
|
|
@@ -4831,9 +4834,9 @@ function Ta() {
|
|
|
4831
4834
|
}), t;
|
|
4832
4835
|
}
|
|
4833
4836
|
function ut(t, e, r, i, s) {
|
|
4834
|
-
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 =
|
|
4837
|
+
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 = _a(e, r), this.isAfter = i, this.q = Ea(t, Ca, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4835
4838
|
}
|
|
4836
|
-
|
|
4839
|
+
Fa(ut, Ia);
|
|
4837
4840
|
ut.prototype.exec = function(t, e) {
|
|
4838
4841
|
const r = this.func;
|
|
4839
4842
|
let i = !1;
|
|
@@ -4861,7 +4864,7 @@ ut.prototype.exec = function(t, e) {
|
|
|
4861
4864
|
};
|
|
4862
4865
|
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), a = setTimeout(function() {
|
|
4863
4866
|
Z("timed out", s), a = null;
|
|
4864
|
-
const p = new
|
|
4867
|
+
const p = new Oa(s);
|
|
4865
4868
|
p.fn = r, c(p);
|
|
4866
4869
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4867
4870
|
const d = r(this.server, this.opts, c);
|
|
@@ -4904,19 +4907,19 @@ ut.prototype.finish = function(t, e) {
|
|
|
4904
4907
|
r();
|
|
4905
4908
|
else
|
|
4906
4909
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4907
|
-
Z("drain", this.name), this.q.drain =
|
|
4910
|
+
Z("drain", this.name), this.q.drain = xa, queueMicrotask(i);
|
|
4908
4911
|
};
|
|
4909
4912
|
};
|
|
4910
4913
|
queueMicrotask(i), this.q.resume();
|
|
4911
4914
|
};
|
|
4912
|
-
function
|
|
4915
|
+
function Ca(t, e) {
|
|
4913
4916
|
const r = this;
|
|
4914
|
-
P.nextTick(
|
|
4917
|
+
P.nextTick(xr.bind(r), t, e);
|
|
4915
4918
|
}
|
|
4916
|
-
function
|
|
4919
|
+
function xr(t, e) {
|
|
4917
4920
|
if (typeof t.func.then == "function") {
|
|
4918
4921
|
t.func.then((i) => {
|
|
4919
|
-
typeof i.default == "function" && (i = i.default), t.func = i,
|
|
4922
|
+
typeof i.default == "function" && (i = i.default), t.func = i, xr.call(this, t, e);
|
|
4920
4923
|
}, e);
|
|
4921
4924
|
return;
|
|
4922
4925
|
}
|
|
@@ -4927,59 +4930,59 @@ function Cr(t, e) {
|
|
|
4927
4930
|
});
|
|
4928
4931
|
});
|
|
4929
4932
|
}
|
|
4930
|
-
function
|
|
4933
|
+
function xa() {
|
|
4931
4934
|
}
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
var
|
|
4935
|
-
const un = On,
|
|
4936
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4935
|
+
Cr.exports = ut;
|
|
4936
|
+
Cr.exports.loadPlugin = xr;
|
|
4937
|
+
var ka = Cr.exports;
|
|
4938
|
+
const un = On, Ba = Rn.EventEmitter, La = Ut.inherits, {
|
|
4939
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: tr,
|
|
4937
4940
|
AVV_ERR_CALLBACK_NOT_FN: pt,
|
|
4938
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4939
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4940
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4941
|
-
} = Xn, Na =
|
|
4942
|
-
function
|
|
4941
|
+
AVV_ERR_PLUGIN_NOT_VALID: Pa,
|
|
4942
|
+
AVV_ERR_ROOT_PLG_BOOTED: Ra,
|
|
4943
|
+
AVV_ERR_READY_TIMEOUT: Da
|
|
4944
|
+
} = Xn, Na = ba, yr = ka, st = Zn("avvio"), Bt = Symbol("kAvvio"), rr = Symbol("kThenifyDoNotWrap");
|
|
4945
|
+
function $a(t, e, r) {
|
|
4943
4946
|
const i = e.expose || {}, s = i.use || "use", a = i.after || "after", c = i.ready || "ready", d = i.onClose || "onClose", p = i.close || "close";
|
|
4944
4947
|
if (t[s])
|
|
4945
|
-
throw new
|
|
4948
|
+
throw new tr(s);
|
|
4946
4949
|
if (t[a])
|
|
4947
|
-
throw new
|
|
4950
|
+
throw new tr(a);
|
|
4948
4951
|
if (t[c])
|
|
4949
|
-
throw new
|
|
4952
|
+
throw new tr(c);
|
|
4950
4953
|
t[s] = function(m, l) {
|
|
4951
4954
|
return r.use(m, l), this;
|
|
4952
|
-
}, Object.defineProperty(t, "then", { get: ei.bind(r) }), t[
|
|
4953
|
-
return typeof m != "function" ? r._loadRegistered() : (r.after(
|
|
4955
|
+
}, Object.defineProperty(t, "then", { get: ei.bind(r) }), t[Bt] = !0, t[a] = function(m) {
|
|
4956
|
+
return typeof m != "function" ? r._loadRegistered() : (r.after(nr(m, this)), this);
|
|
4954
4957
|
}, t[c] = function(m) {
|
|
4955
4958
|
if (m && typeof m != "function")
|
|
4956
4959
|
throw new pt(c, typeof m);
|
|
4957
|
-
return r.ready(m ?
|
|
4960
|
+
return r.ready(m ? nr(m, this) : void 0);
|
|
4958
4961
|
}, t[d] = function(m) {
|
|
4959
4962
|
if (typeof m != "function")
|
|
4960
4963
|
throw new pt(d, typeof m);
|
|
4961
|
-
return r.onClose(
|
|
4964
|
+
return r.onClose(qa(m, this)), this;
|
|
4962
4965
|
}, t[p] = function(m) {
|
|
4963
4966
|
if (m && typeof m != "function")
|
|
4964
4967
|
throw new pt(p, typeof m);
|
|
4965
|
-
return m ? (r.close(
|
|
4968
|
+
return m ? (r.close(nr(m, this)), this) : r.close();
|
|
4966
4969
|
};
|
|
4967
4970
|
}
|
|
4968
4971
|
function te(t, e, r) {
|
|
4969
4972
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof te)) {
|
|
4970
4973
|
const i = new te(t, e, r);
|
|
4971
|
-
return t &&
|
|
4974
|
+
return t && $a(t, e, i), i;
|
|
4972
4975
|
}
|
|
4973
4976
|
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 Na(), this._readyQ = un(this, ti, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4974
4977
|
this.emit("start"), this._readyQ.drain = cn;
|
|
4975
|
-
}, this._closeQ = un(this,
|
|
4978
|
+
}, this._closeQ = un(this, Va, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4976
4979
|
this.emit("close"), this._closeQ.drain = cn;
|
|
4977
|
-
}, this._doStart = null, this._root = new
|
|
4980
|
+
}, this._doStart = null, this._root = new yr(this, Ua.bind(this), e, !1, 0), this._root.once("start", (i, s, a) => {
|
|
4978
4981
|
const c = this.pluginTree.start(null, s, a);
|
|
4979
4982
|
this._root.once("loaded", (d, p, m) => {
|
|
4980
4983
|
this.pluginTree.stop(c, m);
|
|
4981
4984
|
});
|
|
4982
|
-
}),
|
|
4985
|
+
}), yr.loadPlugin.call(this, this._root, (i) => {
|
|
4983
4986
|
st("root plugin ready");
|
|
4984
4987
|
try {
|
|
4985
4988
|
this.emit("preReady"), this._root = null;
|
|
@@ -4994,22 +4997,22 @@ function te(t, e, r) {
|
|
|
4994
4997
|
this._readyQ.resume();
|
|
4995
4998
|
});
|
|
4996
4999
|
}
|
|
4997
|
-
function
|
|
5000
|
+
function Ua(t, e, r) {
|
|
4998
5001
|
this._doStart = r, e.autostart && this.start();
|
|
4999
5002
|
}
|
|
5000
|
-
|
|
5003
|
+
La(te, Ba);
|
|
5001
5004
|
te.prototype.start = function() {
|
|
5002
5005
|
return this.started = !0, P.nextTick(this._doStart), this;
|
|
5003
5006
|
};
|
|
5004
5007
|
te.prototype.override = function(t, e, r) {
|
|
5005
5008
|
return t;
|
|
5006
5009
|
};
|
|
5007
|
-
function
|
|
5010
|
+
function ja(t) {
|
|
5008
5011
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
5009
|
-
throw new
|
|
5012
|
+
throw new Pa(typeof t);
|
|
5010
5013
|
return t;
|
|
5011
5014
|
}
|
|
5012
|
-
te.prototype[
|
|
5015
|
+
te.prototype[Bt] = !0;
|
|
5013
5016
|
te.prototype.use = function(t, e) {
|
|
5014
5017
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5015
5018
|
};
|
|
@@ -5019,9 +5022,9 @@ te.prototype._loadRegistered = function() {
|
|
|
5019
5022
|
};
|
|
5020
5023
|
Object.defineProperty(te.prototype, "then", { get: ei });
|
|
5021
5024
|
te.prototype._addPlugin = function(t, e, r) {
|
|
5022
|
-
if (t =
|
|
5023
|
-
throw new
|
|
5024
|
-
const i = this._current[0], s = new
|
|
5025
|
+
if (t = ja(t), e = e || {}, this.booted)
|
|
5026
|
+
throw new Ra();
|
|
5027
|
+
const i = this._current[0], s = new yr(this, t, e, r);
|
|
5025
5028
|
if (s.once("start", (a, c, d) => {
|
|
5026
5029
|
const p = this.pluginTree.start(i.name, c, d);
|
|
5027
5030
|
s.once("loaded", (m, l, w) => {
|
|
@@ -5096,33 +5099,33 @@ function ei() {
|
|
|
5096
5099
|
st("thenify returning null because we are already booted");
|
|
5097
5100
|
return;
|
|
5098
5101
|
}
|
|
5099
|
-
if (this[
|
|
5100
|
-
this[
|
|
5102
|
+
if (this[rr]) {
|
|
5103
|
+
this[rr] = !1;
|
|
5101
5104
|
return;
|
|
5102
5105
|
}
|
|
5103
|
-
return st("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
5106
|
+
return st("thenify"), (t, e) => this._loadRegistered().then(() => (this[rr] = !0, t(this._server)), e);
|
|
5104
5107
|
}
|
|
5105
5108
|
function ti(t, e) {
|
|
5106
5109
|
const r = this._server, i = this._error;
|
|
5107
5110
|
let s;
|
|
5108
5111
|
if (this._error = null, t.length === 0)
|
|
5109
|
-
this._error = i, s = t(), s && !s[
|
|
5112
|
+
this._error = i, s = t(), s && !s[Bt] && typeof s.then == "function" ? s.then(() => P.nextTick(e), (a) => P.nextTick(e, a)) : P.nextTick(e);
|
|
5110
5113
|
else if (t.length === 1)
|
|
5111
|
-
s = t(i), s && !s[
|
|
5114
|
+
s = t(i), s && !s[Bt] && typeof s.then == "function" ? s.then(() => P.nextTick(e), (a) => P.nextTick(e, a)) : P.nextTick(e);
|
|
5112
5115
|
else if (this._timeout === 0) {
|
|
5113
5116
|
const a = (c) => {
|
|
5114
5117
|
this._error = c, e(this._error);
|
|
5115
5118
|
};
|
|
5116
5119
|
t.length === 2 ? t(i, a) : t(i, r, a);
|
|
5117
5120
|
} else
|
|
5118
|
-
|
|
5121
|
+
Ma.call(this, t, i, r, e);
|
|
5119
5122
|
}
|
|
5120
|
-
function
|
|
5123
|
+
function Ma(t, e, r, i) {
|
|
5121
5124
|
const s = t.name;
|
|
5122
5125
|
st("setting up ready timeout", s, this._timeout);
|
|
5123
5126
|
let a = setTimeout(() => {
|
|
5124
5127
|
st("timed out", s), a = null;
|
|
5125
|
-
const d = new
|
|
5128
|
+
const d = new Da(s);
|
|
5126
5129
|
d.fn = t, this._error = d, i(d);
|
|
5127
5130
|
}, this._timeout);
|
|
5128
5131
|
t.length === 2 ? t(e, c.bind(this)) : t(e, r, c.bind(this));
|
|
@@ -5130,7 +5133,7 @@ function ja(t, e, r, i) {
|
|
|
5130
5133
|
a && (clearTimeout(a), this._error = d, i(this._error));
|
|
5131
5134
|
}
|
|
5132
5135
|
}
|
|
5133
|
-
function
|
|
5136
|
+
function Va(t, e) {
|
|
5134
5137
|
const r = this._server, i = t[this._isOnCloseHandlerKey];
|
|
5135
5138
|
if (t.length === 0 || t.length === 1) {
|
|
5136
5139
|
let s;
|
|
@@ -5141,7 +5144,7 @@ function Ma(t, e) {
|
|
|
5141
5144
|
} else
|
|
5142
5145
|
t.length === 2 ? t(i ? r : this._error, e) : i ? t(r, e) : t(this._error, r, e);
|
|
5143
5146
|
}
|
|
5144
|
-
function
|
|
5147
|
+
function qa(t, e) {
|
|
5145
5148
|
return r.bind(e);
|
|
5146
5149
|
function r(i, s) {
|
|
5147
5150
|
let a;
|
|
@@ -5152,7 +5155,7 @@ function Va(t, e) {
|
|
|
5152
5155
|
}, s) : P.nextTick(s)) : t(this, s);
|
|
5153
5156
|
}
|
|
5154
5157
|
}
|
|
5155
|
-
function
|
|
5158
|
+
function nr(t, e) {
|
|
5156
5159
|
return r.bind(e);
|
|
5157
5160
|
function r(i, s) {
|
|
5158
5161
|
let a;
|
|
@@ -5163,16 +5166,16 @@ function rr(t, e) {
|
|
|
5163
5166
|
}, s) : P.nextTick(s)) : t.length === 2 ? t(i, s) : t(i, this, s) : P.nextTick(s);
|
|
5164
5167
|
}
|
|
5165
5168
|
}
|
|
5166
|
-
|
|
5167
|
-
|
|
5169
|
+
vr.exports = te;
|
|
5170
|
+
vr.exports.express = function(t) {
|
|
5168
5171
|
return te(t, {
|
|
5169
5172
|
expose: {
|
|
5170
5173
|
use: "load"
|
|
5171
5174
|
}
|
|
5172
5175
|
});
|
|
5173
5176
|
};
|
|
5174
|
-
var
|
|
5175
|
-
const
|
|
5177
|
+
var Qa = vr.exports;
|
|
5178
|
+
const Ga = /* @__PURE__ */ co(Qa);
|
|
5176
5179
|
(function() {
|
|
5177
5180
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5178
5181
|
return;
|
|
@@ -5190,9 +5193,9 @@ const Qa = /* @__PURE__ */ uo(qa);
|
|
|
5190
5193
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5191
5194
|
}
|
|
5192
5195
|
})();
|
|
5193
|
-
function
|
|
5194
|
-
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", a =
|
|
5195
|
-
return a.use(
|
|
5196
|
+
function du(t, e = !0, r = !0, i) {
|
|
5197
|
+
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", a = Ga(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5198
|
+
return a.use(zi), a.use(ji), a.use(Gi), a.use(xi, { sdkKey: t, host: s, version: i?.version }), a.use(Qi), a.use(qi), a.use(Ro), a.use(vo), r && a.after(async (c, d, p) => {
|
|
5196
5199
|
if (c)
|
|
5197
5200
|
throw c;
|
|
5198
5201
|
await d.sdk.initializeApp(), p();
|
|
@@ -5201,5 +5204,5 @@ function fu(t, e = !0, r = !0, i) {
|
|
|
5201
5204
|
}), a;
|
|
5202
5205
|
}
|
|
5203
5206
|
export {
|
|
5204
|
-
|
|
5207
|
+
du as StreamLayer
|
|
5205
5208
|
};
|