@streamlayer/sdk-web 0.33.3 → 0.33.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +7 -7
- package/lib/es/index.js +1096 -1038
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as D, QuestionStatus as ce, SilenceSetting as
|
|
3
|
-
import { PickHistoryStatus as
|
|
1
|
+
import { pino as ci } from "pino";
|
|
2
|
+
import { QuestionType as D, QuestionStatus as ce, SilenceSetting as li } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
+
import { PickHistoryStatus as st } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as N } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
|
-
import { InvitationCategory as
|
|
6
|
-
import { computed as
|
|
7
|
-
import { nanoid as
|
|
8
|
-
import { ConnectError as
|
|
9
|
-
import { createGrpcWebTransport as
|
|
10
|
-
import { nanoquery as
|
|
11
|
-
import { Events as
|
|
12
|
-
import { Client as
|
|
13
|
-
import { Users as
|
|
14
|
-
import { Feed as
|
|
15
|
-
import { Leaderboard as
|
|
5
|
+
import { InvitationCategory as Pr, InvitationFrom as Fr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
+
import { computed as di, map as fi, atom as It, batched as Nr, onMount as pr } from "nanostores";
|
|
7
|
+
import { nanoid as Zt } from "nanoid";
|
|
8
|
+
import { ConnectError as Xe, Code as ee, createContextKey as Dr, createPromiseClient as Rr, createContextValues as hi } from "@connectrpc/connect";
|
|
9
|
+
import { createGrpcWebTransport as $r } from "@connectrpc/connect-web";
|
|
10
|
+
import { nanoquery as Vr } from "@nanostores/query";
|
|
11
|
+
import { Events as pi } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
|
+
import { Client as et } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
|
+
import { Users as yr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
+
import { Feed as be } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
+
import { Leaderboard as vn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
18
|
-
import { Kind as H, TopicType as K, Category as Q, PollOpenedFrom as De, ScreenOrientation as
|
|
19
|
-
import { AnalyticsService as
|
|
20
|
-
import { InteractionActionType as
|
|
21
|
-
import { NotificationKind as ae, NotificationType as
|
|
22
|
-
function
|
|
17
|
+
import { LinksClient as yi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
import { Kind as H, TopicType as K, Category as Q, PollOpenedFrom as De, ScreenOrientation as jr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
|
+
import { AnalyticsService as bn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
|
+
import { InteractionActionType as Mr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
|
+
import { NotificationKind as ae, NotificationType as Ur } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
+
function gi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
function
|
|
25
|
+
var Sn = { exports: {} }, V = Sn.exports = {}, te, re;
|
|
26
|
+
function er() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function tr() {
|
|
30
30
|
throw new Error("clearTimeout has not been defined");
|
|
31
31
|
}
|
|
32
32
|
(function() {
|
|
33
33
|
try {
|
|
34
|
-
typeof setTimeout == "function" ? te = setTimeout : te =
|
|
34
|
+
typeof setTimeout == "function" ? te = setTimeout : te = er;
|
|
35
35
|
} catch {
|
|
36
|
-
te =
|
|
36
|
+
te = er;
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
typeof clearTimeout == "function" ? re = clearTimeout : re =
|
|
39
|
+
typeof clearTimeout == "function" ? re = clearTimeout : re = tr;
|
|
40
40
|
} catch {
|
|
41
|
-
re =
|
|
41
|
+
re = tr;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
|
-
function
|
|
44
|
+
function wn(t) {
|
|
45
45
|
if (te === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
|
-
if ((te ===
|
|
47
|
+
if ((te === er || !te) && setTimeout)
|
|
48
48
|
return te = setTimeout, setTimeout(t, 0);
|
|
49
49
|
try {
|
|
50
50
|
return te(t, 0);
|
|
@@ -56,10 +56,10 @@ function an(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function mi(t) {
|
|
60
60
|
if (re === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
|
-
if ((re ===
|
|
62
|
+
if ((re === tr || !re) && clearTimeout)
|
|
63
63
|
return re = clearTimeout, clearTimeout(t);
|
|
64
64
|
try {
|
|
65
65
|
return re(t);
|
|
@@ -71,69 +71,69 @@ function ii(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var he = [], xe = !1,
|
|
75
|
-
function
|
|
76
|
-
!xe || !
|
|
74
|
+
var he = [], xe = !1, Ie, ct = -1;
|
|
75
|
+
function vi() {
|
|
76
|
+
!xe || !Ie || (xe = !1, Ie.length ? he = Ie.concat(he) : ct = -1, he.length && An());
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function An() {
|
|
79
79
|
if (!xe) {
|
|
80
|
-
var t =
|
|
80
|
+
var t = wn(vi);
|
|
81
81
|
xe = !0;
|
|
82
82
|
for (var e = he.length; e; ) {
|
|
83
|
-
for (
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
for (Ie = he, he = []; ++ct < e; )
|
|
84
|
+
Ie && Ie[ct].run();
|
|
85
|
+
ct = -1, e = he.length;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
Ie = null, xe = !1, mi(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
V.nextTick = function(t) {
|
|
91
91
|
var e = new Array(arguments.length - 1);
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
94
94
|
e[r - 1] = arguments[r];
|
|
95
|
-
he.push(new
|
|
95
|
+
he.push(new En(t, e)), he.length === 1 && !xe && wn(An);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function En(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
En.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
V.title = "browser";
|
|
104
|
+
V.browser = !0;
|
|
105
|
+
V.env = {};
|
|
106
|
+
V.argv = [];
|
|
107
|
+
V.version = "";
|
|
108
|
+
V.versions = {};
|
|
109
109
|
function ge() {
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
V.on = ge;
|
|
112
|
+
V.addListener = ge;
|
|
113
|
+
V.once = ge;
|
|
114
|
+
V.off = ge;
|
|
115
|
+
V.removeListener = ge;
|
|
116
|
+
V.removeAllListeners = ge;
|
|
117
|
+
V.emit = ge;
|
|
118
|
+
V.prependListener = ge;
|
|
119
|
+
V.prependOnceListener = ge;
|
|
120
|
+
V.listeners = function(t) {
|
|
121
121
|
return [];
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
V.binding = function(t) {
|
|
124
124
|
throw new Error("process.binding is not supported");
|
|
125
125
|
};
|
|
126
|
-
|
|
126
|
+
V.cwd = function() {
|
|
127
127
|
return "/";
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
V.chdir = function(t) {
|
|
130
130
|
throw new Error("process.chdir is not supported");
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
V.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const
|
|
135
|
+
var bi = Sn.exports;
|
|
136
|
+
const w = /* @__PURE__ */ gi(bi), Si = ci({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const S = /* @__PURE__ */ ni(si), ai = Jn({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), Se = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), Se = (t, e) => Si.child({ name: t }, e);
|
|
145
|
+
class wi extends Event {
|
|
146
146
|
slEventBus;
|
|
147
147
|
constructor(e, r) {
|
|
148
148
|
super(e), this.slEventBus = r;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
151
|
+
const Ai = Se("event-bus");
|
|
152
|
+
class Ei {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
155
155
|
constructor(e = "sl-event-bus") {
|
|
156
156
|
this.name = e, this.listeners = /* @__PURE__ */ new Set();
|
|
157
157
|
}
|
|
158
158
|
emit = (e, r) => {
|
|
159
|
-
const n = new
|
|
160
|
-
|
|
159
|
+
const n = new wi(this.name, { ...r, type: e });
|
|
160
|
+
Ai.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,10 +173,10 @@ class li {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Ii {
|
|
177
177
|
}
|
|
178
178
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
179
|
-
class
|
|
179
|
+
class Tt {
|
|
180
180
|
/**
|
|
181
181
|
* store instance (nanostores)
|
|
182
182
|
*/
|
|
@@ -192,33 +192,33 @@ class It {
|
|
|
192
192
|
return this.store;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const Ti = (t) => {
|
|
196
196
|
const e = Object.keys(t);
|
|
197
|
-
return
|
|
197
|
+
return di(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
198
198
|
};
|
|
199
|
-
class Te extends
|
|
199
|
+
class Te extends Tt {
|
|
200
200
|
getValues = () => this.getStore().get();
|
|
201
201
|
getValue = (e) => this.getStore().get()[e];
|
|
202
202
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
203
203
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
204
204
|
unsubscribe = () => this.getStore().off();
|
|
205
205
|
}
|
|
206
|
-
const ie = (t) =>
|
|
206
|
+
const ie = (t) => fi(t);
|
|
207
207
|
var le;
|
|
208
208
|
(function(t) {
|
|
209
209
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
210
210
|
})(le || (le = {}));
|
|
211
|
-
const
|
|
211
|
+
const Oi = {
|
|
212
212
|
[N.BETTING]: "betting",
|
|
213
213
|
[N.GAMES]: "games",
|
|
214
214
|
[N.PUBLIC_CHAT]: "publicChat",
|
|
215
215
|
[N.TWITTER]: "twitter"
|
|
216
216
|
};
|
|
217
|
-
var
|
|
217
|
+
var We;
|
|
218
218
|
(function(t) {
|
|
219
219
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
220
|
-
})(
|
|
221
|
-
class
|
|
220
|
+
})(We || (We = {}));
|
|
221
|
+
class In {
|
|
222
222
|
status;
|
|
223
223
|
source;
|
|
224
224
|
config;
|
|
@@ -226,7 +226,7 @@ class ln {
|
|
|
226
226
|
listeners = /* @__PURE__ */ new Set();
|
|
227
227
|
settingsKey;
|
|
228
228
|
constructor({ settings: e, ...r }, n) {
|
|
229
|
-
this.settingsKey =
|
|
229
|
+
this.settingsKey = Oi[r.type], this.status = It(We.Suspended), this.config = new Te(ie(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Te(ie(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Te(ie({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
230
230
|
}
|
|
231
231
|
get featureConfig() {
|
|
232
232
|
return this.config.getStore();
|
|
@@ -238,10 +238,10 @@ class ln {
|
|
|
238
238
|
this.listeners.add(e);
|
|
239
239
|
}
|
|
240
240
|
enable = () => {
|
|
241
|
-
this.status.set(
|
|
241
|
+
this.status.set(We.Ready);
|
|
242
242
|
};
|
|
243
243
|
disable = () => {
|
|
244
|
-
this.status.set(
|
|
244
|
+
this.status.set(We.Suspended);
|
|
245
245
|
};
|
|
246
246
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
247
247
|
let n;
|
|
@@ -268,7 +268,7 @@ class ln {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
class W extends
|
|
271
|
+
class W extends Tt {
|
|
272
272
|
getValue = () => this.getStore().get();
|
|
273
273
|
getValues() {
|
|
274
274
|
throw new Error("not implemented");
|
|
@@ -283,11 +283,11 @@ class W extends It {
|
|
|
283
283
|
return this.getStore().get();
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const B = (t) =>
|
|
287
|
-
class ye extends
|
|
286
|
+
const B = (t) => It(t);
|
|
287
|
+
class ye extends Tt {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
290
|
-
super(e, `api:${r}`), this.atomStore =
|
|
290
|
+
super(e, `api:${r}`), this.atomStore = It(), n && e.subscribe((i) => {
|
|
291
291
|
const o = this.atomStore.get(), s = n(i, o);
|
|
292
292
|
o !== s && this.atomStore.set(s);
|
|
293
293
|
});
|
|
@@ -315,8 +315,8 @@ class ye extends It {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const pe = new
|
|
319
|
-
async function*
|
|
318
|
+
const pe = new Ei();
|
|
319
|
+
async function* Ci(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
321
|
t.response.message = r, t.received_at = Date.now();
|
|
322
322
|
const n = {
|
|
@@ -326,7 +326,7 @@ async function* pi(t, e) {
|
|
|
326
326
|
window.postMessage(n), yield r;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Li = () => (t) => async (e) => {
|
|
330
330
|
const r = {
|
|
331
331
|
name: e.url,
|
|
332
332
|
stream: e.stream,
|
|
@@ -350,7 +350,7 @@ const yi = () => (t) => async (e) => {
|
|
|
350
350
|
};
|
|
351
351
|
return window.postMessage(i), {
|
|
352
352
|
...n,
|
|
353
|
-
message:
|
|
353
|
+
message: Ci(r, n.message)
|
|
354
354
|
};
|
|
355
355
|
} else {
|
|
356
356
|
r.request.message = e.message, r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -378,7 +378,7 @@ var Y;
|
|
|
378
378
|
(function(t) {
|
|
379
379
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
380
380
|
})(Y || (Y = {}));
|
|
381
|
-
class
|
|
381
|
+
class _i {
|
|
382
382
|
params;
|
|
383
383
|
streamCancel;
|
|
384
384
|
method;
|
|
@@ -432,7 +432,7 @@ class gi {
|
|
|
432
432
|
for await (const o of i)
|
|
433
433
|
this.attempt = 0, this.onData(o);
|
|
434
434
|
} catch (n) {
|
|
435
|
-
n instanceof
|
|
435
|
+
n instanceof Xe && n.code != ee.Canceled && this.onStreamError(n);
|
|
436
436
|
}
|
|
437
437
|
})(), this.updateState(Y.Connected);
|
|
438
438
|
};
|
|
@@ -472,7 +472,7 @@ class gi {
|
|
|
472
472
|
*/
|
|
473
473
|
onStreamError = (e) => {
|
|
474
474
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
475
|
-
if (e instanceof
|
|
475
|
+
if (e instanceof Xe && e.code !== ee.Canceled) {
|
|
476
476
|
this.updateState(Y.Failed), this.state.setValue("error", e), this.reconnect();
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
@@ -480,7 +480,7 @@ class gi {
|
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
|
-
const
|
|
483
|
+
const ki = /* @__PURE__ */ new Set([
|
|
484
484
|
ee.Unknown,
|
|
485
485
|
ee.Internal,
|
|
486
486
|
ee.DeadlineExceeded,
|
|
@@ -488,33 +488,33 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
488
488
|
ee.FailedPrecondition,
|
|
489
489
|
ee.Unavailable,
|
|
490
490
|
ee.DataLoss
|
|
491
|
-
]),
|
|
492
|
-
const r = e.contextValues.get(
|
|
491
|
+
]), xr = Se("grpc:retry"), Pi = (t) => async (e) => {
|
|
492
|
+
const r = e.contextValues.get(rr.retryAttempts), n = 300, i = e.contextValues.get(rr.retryDelay);
|
|
493
493
|
if (e.stream || r === 0)
|
|
494
494
|
return t(e);
|
|
495
|
-
|
|
495
|
+
xr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
|
|
496
496
|
for (let o = 0; ; o++)
|
|
497
497
|
try {
|
|
498
498
|
return await t(e);
|
|
499
499
|
} catch (s) {
|
|
500
|
-
|
|
501
|
-
const a =
|
|
502
|
-
if (o >= r || !(a instanceof
|
|
500
|
+
xr.trace({ attempt: o, error: s }, "retry attempt");
|
|
501
|
+
const a = Xe.from(s);
|
|
502
|
+
if (o >= r || !(a instanceof Xe) || !ki.has(a.code))
|
|
503
503
|
throw s;
|
|
504
504
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
505
505
|
await new Promise((c) => setTimeout(c, d));
|
|
506
506
|
}
|
|
507
|
-
},
|
|
508
|
-
retryAttempts:
|
|
509
|
-
retryDelay:
|
|
510
|
-
},
|
|
507
|
+
}, rr = {
|
|
508
|
+
retryAttempts: Dr(10, { description: "Number of attempts to retry" }),
|
|
509
|
+
retryDelay: Dr(3e4, { description: "Max delay between retries in milliseconds" })
|
|
510
|
+
}, Fi = () => {
|
|
511
511
|
const t = localStorage.getItem("sl-device-id");
|
|
512
512
|
if (t)
|
|
513
513
|
return t;
|
|
514
|
-
const e =
|
|
514
|
+
const e = Zt();
|
|
515
515
|
return localStorage.setItem("sl-device-id", e), e;
|
|
516
|
-
},
|
|
517
|
-
class
|
|
516
|
+
}, Ni = () => navigator.userAgentData?.platform || navigator.platform;
|
|
517
|
+
class Br {
|
|
518
518
|
toJsonOptions = {
|
|
519
519
|
emitDefaultValues: !1,
|
|
520
520
|
enumAsInteger: !0,
|
|
@@ -534,19 +534,19 @@ class Pr {
|
|
|
534
534
|
opts;
|
|
535
535
|
constructor(e, r) {
|
|
536
536
|
this.host = e, this.opts = r, this.$headers = new Te(ie({
|
|
537
|
-
"sl-device-id":
|
|
538
|
-
"sl-device-os":
|
|
537
|
+
"sl-device-id": Fi(),
|
|
538
|
+
"sl-device-os": Ni()
|
|
539
539
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
540
|
-
const [n, i, o] =
|
|
540
|
+
const [n, i, o] = Vr({
|
|
541
541
|
dedupeTime: r?.dedupeTime,
|
|
542
542
|
refetchInterval: r?.refetchInterval
|
|
543
543
|
});
|
|
544
|
-
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport =
|
|
544
|
+
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport = $r({
|
|
545
545
|
baseUrl: e,
|
|
546
546
|
defaultTimeoutMs: 1e4,
|
|
547
547
|
interceptors: this.interceptors,
|
|
548
548
|
useBinaryFormat: !0
|
|
549
|
-
}), this.streamTransport =
|
|
549
|
+
}), this.streamTransport = $r({
|
|
550
550
|
baseUrl: e,
|
|
551
551
|
interceptors: this.interceptors,
|
|
552
552
|
useBinaryFormat: !0
|
|
@@ -559,7 +559,7 @@ class Pr {
|
|
|
559
559
|
const i = this.subscriptions.get(r);
|
|
560
560
|
if (i)
|
|
561
561
|
return i;
|
|
562
|
-
const o = new
|
|
562
|
+
const o = new _i(this.$headers, e, r, n);
|
|
563
563
|
return this.subscriptions.set(r, o), o;
|
|
564
564
|
};
|
|
565
565
|
removeSubscription = (e) => {
|
|
@@ -570,7 +570,7 @@ class Pr {
|
|
|
570
570
|
for (const [i, o] of this.subscriptions)
|
|
571
571
|
o.disconnect(), this.subscriptions.delete(i);
|
|
572
572
|
this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
|
|
573
|
-
const [e, r, n] =
|
|
573
|
+
const [e, r, n] = Vr({
|
|
574
574
|
dedupeTime: 1e3 * 60 * 5,
|
|
575
575
|
refetchInterval: 1e3 * 60 * 5
|
|
576
576
|
});
|
|
@@ -586,14 +586,14 @@ class Pr {
|
|
|
586
586
|
const r = e.typeName;
|
|
587
587
|
if (this.clients.has(r))
|
|
588
588
|
return this.clients.get(r);
|
|
589
|
-
const n =
|
|
589
|
+
const n = Rr(e, this.transport);
|
|
590
590
|
return this.clients.set(r, n), n;
|
|
591
591
|
};
|
|
592
592
|
getStreamClient = (e) => {
|
|
593
593
|
const r = `stream-${e.typeName}`;
|
|
594
594
|
if (this.clients.has(r))
|
|
595
595
|
return this.clients.get(r);
|
|
596
|
-
const n =
|
|
596
|
+
const n = Rr(e, this.streamTransport);
|
|
597
597
|
return this.clients.set(r, n), n;
|
|
598
598
|
};
|
|
599
599
|
// create unary client, used for query request
|
|
@@ -604,9 +604,9 @@ class Pr {
|
|
|
604
604
|
...Array.isArray(r) ? r : [r]
|
|
605
605
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
606
606
|
return { client: i, createRequestOptions: (d) => {
|
|
607
|
-
const c =
|
|
607
|
+
const c = hi();
|
|
608
608
|
for (const f in d) {
|
|
609
|
-
const p =
|
|
609
|
+
const p = rr[f];
|
|
610
610
|
c.set(p, d[f]);
|
|
611
611
|
}
|
|
612
612
|
return c;
|
|
@@ -632,11 +632,11 @@ class Pr {
|
|
|
632
632
|
n.header.set(o, i[o]);
|
|
633
633
|
return r(n);
|
|
634
634
|
};
|
|
635
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
635
|
+
this.interceptors.push(e), this.interceptors.push(Li()), this.opts?.retryable && this.interceptors.push(Pi);
|
|
636
636
|
};
|
|
637
637
|
}
|
|
638
|
-
const
|
|
639
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
638
|
+
const Di = (t, e) => {
|
|
639
|
+
const { client: r, queryKey: n } = e.createPromiseClient(pi, {
|
|
640
640
|
method: "retrieveEventId",
|
|
641
641
|
params: [t]
|
|
642
642
|
});
|
|
@@ -653,29 +653,29 @@ const wi = (t, e) => {
|
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
|
-
},
|
|
657
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
656
|
+
}, Ri = (t, e) => {
|
|
657
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "getStream", params: [t] });
|
|
658
658
|
return e.nanoquery.createFetcherStore(n, {
|
|
659
659
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
660
660
|
id: s
|
|
661
661
|
// we are sure that id is a string
|
|
662
662
|
})).data?.attributes : void 0
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
const { queryKey: r, client: n } = e.createPromiseClient(
|
|
664
|
+
}, $i = (t, e) => {
|
|
665
|
+
const { queryKey: r, client: n } = e.createPromiseClient(yr, { method: "me", params: [t] });
|
|
666
666
|
return e.nanoquery.createFetcherStore(r, {
|
|
667
667
|
fetcher: () => n.me({})
|
|
668
668
|
});
|
|
669
|
-
},
|
|
670
|
-
const { client: e, createRequestOptions: r } = t.createPromiseClient(
|
|
669
|
+
}, Vi = (t) => {
|
|
670
|
+
const { client: e, createRequestOptions: r } = t.createPromiseClient(yr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
671
671
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
672
|
-
},
|
|
673
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
672
|
+
}, ji = (t, e) => {
|
|
673
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "get", params: [t] });
|
|
674
674
|
return e.nanoquery.createFetcherStore(n, {
|
|
675
675
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
676
676
|
});
|
|
677
|
-
},
|
|
678
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
677
|
+
}, Mi = (t, e) => {
|
|
678
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "getOrganization", params: [t] });
|
|
679
679
|
return e.nanoquery.createFetcherStore(n, {
|
|
680
680
|
fetcher: async () => {
|
|
681
681
|
const i = await r.getOrganization({});
|
|
@@ -685,26 +685,26 @@ const wi = (t, e) => {
|
|
|
685
685
|
} : void 0;
|
|
686
686
|
}
|
|
687
687
|
});
|
|
688
|
-
},
|
|
689
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
688
|
+
}, Ui = (t, e) => {
|
|
689
|
+
const { client: r, queryKey: n } = e.createPromiseClient(et, {
|
|
690
690
|
method: "getOrganizationAdvertising",
|
|
691
691
|
params: [t]
|
|
692
692
|
});
|
|
693
693
|
return e.nanoquery.createFetcherStore(n, {
|
|
694
694
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
695
695
|
});
|
|
696
|
-
},
|
|
697
|
-
t.transport = new
|
|
696
|
+
}, xi = (t, e, r) => {
|
|
697
|
+
t.transport = new Br(e.host, {
|
|
698
698
|
dedupeTime: 1e3 * 60 * 5,
|
|
699
699
|
refetchInterval: 1e3 * 60 * 5,
|
|
700
700
|
retryable: !0
|
|
701
|
-
}), t.analyticsTransport = new
|
|
701
|
+
}), t.analyticsTransport = new Br(e.analyticsHost), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), t.transport.$headers.subscribe((n) => {
|
|
702
702
|
t.analyticsTransport.$headers.getStore().set(n);
|
|
703
|
-
}), t.sdk.onMount(() => () => {
|
|
703
|
+
}), t.sdk.onMount({ name: "transport" }, () => () => {
|
|
704
704
|
t.transport.disconnect(), t.analyticsTransport.disconnect();
|
|
705
705
|
}), r();
|
|
706
706
|
};
|
|
707
|
-
class
|
|
707
|
+
class Ot {
|
|
708
708
|
delimiter = ":";
|
|
709
709
|
prefix;
|
|
710
710
|
storage;
|
|
@@ -732,7 +732,7 @@ var ue;
|
|
|
732
732
|
(function(t) {
|
|
733
733
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
734
734
|
})(ue || (ue = {}));
|
|
735
|
-
class je extends
|
|
735
|
+
class je extends Ot {
|
|
736
736
|
constructor() {
|
|
737
737
|
super("user");
|
|
738
738
|
}
|
|
@@ -759,19 +759,19 @@ var de;
|
|
|
759
759
|
(function(t) {
|
|
760
760
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
761
761
|
})(de || (de = {}));
|
|
762
|
-
const
|
|
763
|
-
const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye(
|
|
762
|
+
const Bi = (t) => {
|
|
763
|
+
const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye($i(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
764
764
|
if (!a)
|
|
765
765
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
766
|
-
}), o = new ye(
|
|
766
|
+
}), o = new ye(ji(n.getStore(), t), "userSettings");
|
|
767
767
|
return {
|
|
768
768
|
userKey: r,
|
|
769
769
|
userToken: n,
|
|
770
770
|
user: i,
|
|
771
771
|
userSettings: o
|
|
772
772
|
};
|
|
773
|
-
},
|
|
774
|
-
const e = new W(B(void 0), "providerStreamId"), r = new ye(
|
|
773
|
+
}, qi = (t) => {
|
|
774
|
+
const e = new W(B(void 0), "providerStreamId"), r = new ye(Di(e.getStore(), t), "slStreamId", (i) => i?.data), n = new ye(Ri(r.getAtomStore(), t), "streamSettings");
|
|
775
775
|
return r.getAtomStore().listen((i) => {
|
|
776
776
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
777
777
|
}), {
|
|
@@ -779,8 +779,8 @@ const _i = (t) => {
|
|
|
779
779
|
slStreamId: r,
|
|
780
780
|
streamSettings: n
|
|
781
781
|
};
|
|
782
|
-
},
|
|
783
|
-
const e = new W(B(void 0), "enabled"), r = new W(B(de.DISABLED), "status"), n = new ye(
|
|
782
|
+
}, Qi = (t) => {
|
|
783
|
+
const e = new W(B(void 0), "enabled"), r = new W(B(de.DISABLED), "status"), n = new ye(Mi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ye(Ui(n.getAtomStore(), t), "organizationAdvertising"), o = Bi(t), s = qi(t);
|
|
784
784
|
return {
|
|
785
785
|
enabled: e,
|
|
786
786
|
status: r,
|
|
@@ -795,10 +795,10 @@ const _i = (t) => {
|
|
|
795
795
|
organizationAdvertising: i
|
|
796
796
|
};
|
|
797
797
|
};
|
|
798
|
-
class
|
|
798
|
+
class Gi extends Tt {
|
|
799
799
|
stores;
|
|
800
800
|
constructor(e) {
|
|
801
|
-
const r =
|
|
801
|
+
const r = Qi(e), n = Ti(r);
|
|
802
802
|
super(n, "core"), this.stores = r;
|
|
803
803
|
}
|
|
804
804
|
getValue() {
|
|
@@ -819,26 +819,26 @@ class Fi extends It {
|
|
|
819
819
|
};
|
|
820
820
|
unsubscribe = () => this.getStore().off();
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
t.store = new
|
|
822
|
+
const Ki = (t, e, r) => {
|
|
823
|
+
t.store = new Gi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
824
824
|
t.store.unsubscribe();
|
|
825
825
|
}, r();
|
|
826
|
-
},
|
|
827
|
-
const { client: e } = t.createPromiseClient(
|
|
826
|
+
}, zi = (t) => {
|
|
827
|
+
const { client: e } = t.createPromiseClient(vn, { method: "list" });
|
|
828
828
|
return (r) => e.list(r);
|
|
829
|
-
},
|
|
830
|
-
const { client: e } = t.createPromiseClient(
|
|
829
|
+
}, Tn = (t) => {
|
|
830
|
+
const { client: e } = t.createPromiseClient(vn, { method: "summary" });
|
|
831
831
|
return (r) => e.summary(r);
|
|
832
|
-
},
|
|
833
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
832
|
+
}, Hi = (t, e) => {
|
|
833
|
+
const { client: r, queryKey: n } = e.createPromiseClient(yr, {
|
|
834
834
|
method: "getFriends",
|
|
835
835
|
params: [t]
|
|
836
836
|
});
|
|
837
837
|
return e.nanoquery.createFetcherStore(n, {
|
|
838
838
|
fetcher: async (i, o, s) => s ? (await r.getFriends({})).data : []
|
|
839
839
|
});
|
|
840
|
-
},
|
|
841
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
840
|
+
}, Wi = (t, e) => {
|
|
841
|
+
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "get", params: [t] });
|
|
842
842
|
return e.nanoquery.createFetcherStore(n, {
|
|
843
843
|
fetcher: async (i, o, s) => (await r.get({
|
|
844
844
|
eventId: s
|
|
@@ -846,8 +846,8 @@ const Ni = (t, e, r) => {
|
|
|
846
846
|
refetchInterval: 0,
|
|
847
847
|
dedupeTime: 1e3 * 60 * 60
|
|
848
848
|
});
|
|
849
|
-
},
|
|
850
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
849
|
+
}, Ji = (t, e) => {
|
|
850
|
+
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "syncQuestion", params: [t] });
|
|
851
851
|
return e.nanoquery.createFetcherStore(n, {
|
|
852
852
|
fetcher: async (i, o, s) => s ? (await r.syncQuestion({
|
|
853
853
|
filter: {
|
|
@@ -858,24 +858,24 @@ const Ni = (t, e, r) => {
|
|
|
858
858
|
// 10 minutes
|
|
859
859
|
refetchInterval: 0
|
|
860
860
|
});
|
|
861
|
-
},
|
|
862
|
-
const { client: r } = e.createStreamClient(
|
|
861
|
+
}, Yi = (t, e) => {
|
|
862
|
+
const { client: r } = e.createStreamClient(be), n = It({ eventId: t.get() || "", feedId: "" });
|
|
863
863
|
return t.subscribe((o = "") => {
|
|
864
864
|
n.set({ eventId: o, feedId: "" });
|
|
865
865
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
866
|
-
},
|
|
867
|
-
const { client: r } = e.createStreamClient(
|
|
866
|
+
}, Xi = (t, e) => {
|
|
867
|
+
const { client: r } = e.createStreamClient(be);
|
|
868
868
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
869
|
-
},
|
|
870
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
869
|
+
}, nr = (t, e) => {
|
|
870
|
+
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "questionByUser", params: [t] });
|
|
871
871
|
return e.nanoquery.createFetcherStore(n, {
|
|
872
872
|
fetcher: async (i, o, s) => (await r.questionByUser({
|
|
873
873
|
questionId: s
|
|
874
874
|
})).data?.attributes?.question,
|
|
875
875
|
dedupeTime: 1e3 * 60 * 5
|
|
876
876
|
});
|
|
877
|
-
},
|
|
878
|
-
const { client: n, queryKey: i } = r.createPromiseClient(
|
|
877
|
+
}, Zi = (t, e, r) => {
|
|
878
|
+
const { client: n, queryKey: i } = r.createPromiseClient(be, {
|
|
879
879
|
method: "list",
|
|
880
880
|
params: [t, e]
|
|
881
881
|
});
|
|
@@ -890,14 +890,14 @@ const Ni = (t, e, r) => {
|
|
|
890
890
|
dedupeTime: 0,
|
|
891
891
|
refetchInterval: 0
|
|
892
892
|
});
|
|
893
|
-
},
|
|
894
|
-
const n =
|
|
893
|
+
}, eo = (t, e, r) => {
|
|
894
|
+
const n = Nr([e, r], () => {
|
|
895
895
|
const a = e.get();
|
|
896
896
|
if (!a)
|
|
897
897
|
return;
|
|
898
898
|
const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
|
|
899
899
|
return u ? (u.openedFrom = d, u) : a.question;
|
|
900
|
-
}), i =
|
|
900
|
+
}), i = Nr(n, (a) => a && a.type === "question" ? a.id : void 0), o = nr(i, t);
|
|
901
901
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
902
902
|
const u = o.get().data, d = (c, f) => {
|
|
903
903
|
if (!c || !f)
|
|
@@ -926,7 +926,7 @@ var Oe;
|
|
|
926
926
|
(function(t) {
|
|
927
927
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
928
928
|
})(Oe || (Oe = {}));
|
|
929
|
-
class
|
|
929
|
+
class to {
|
|
930
930
|
/** sl event id */
|
|
931
931
|
slStreamId;
|
|
932
932
|
/** organization id */
|
|
@@ -958,11 +958,11 @@ class Bi {
|
|
|
958
958
|
transport;
|
|
959
959
|
cancels = /* @__PURE__ */ new Set();
|
|
960
960
|
constructor(e) {
|
|
961
|
-
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new W(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new W(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new W(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ye(
|
|
962
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
961
|
+
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new W(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new W(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new W(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ye(Wi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ye(Zi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = Ji(this.slStreamId, e.transport), this.openedQuestion = eo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
962
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = Xi(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
963
963
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
964
964
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
965
|
-
})), this.feedSubscription =
|
|
965
|
+
})), this.feedSubscription = Yi(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
966
966
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
967
967
|
i && (n && i.status === ce.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes));
|
|
968
968
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -973,7 +973,7 @@ class Bi {
|
|
|
973
973
|
window.requestAnimationFrame(() => {
|
|
974
974
|
this.activeQuestionId.invalidate();
|
|
975
975
|
});
|
|
976
|
-
})), e.sdk.onMount(() => () => {
|
|
976
|
+
})), e.sdk.onMount({ name: "gamification-background" }, () => () => {
|
|
977
977
|
this.activeQuestionId.off();
|
|
978
978
|
for (const r of this.cancels)
|
|
979
979
|
r(), this.cancels.delete(r);
|
|
@@ -1007,7 +1007,7 @@ class Bi {
|
|
|
1007
1007
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1008
1008
|
};
|
|
1009
1009
|
}
|
|
1010
|
-
class
|
|
1010
|
+
class ro {
|
|
1011
1011
|
notificationsList;
|
|
1012
1012
|
store;
|
|
1013
1013
|
timeouts;
|
|
@@ -1030,7 +1030,7 @@ class qi {
|
|
|
1030
1030
|
r && r(...i), this.closeNotification(e.id);
|
|
1031
1031
|
},
|
|
1032
1032
|
action: (...i) => {
|
|
1033
|
-
n && n(...i), this.closeNotification(e.id);
|
|
1033
|
+
n && n(...i), this.closeNotification(e.id, { animateHiding: !1 });
|
|
1034
1034
|
}
|
|
1035
1035
|
}), this.waitingQueue.add(e.id), this.activeQueue.size === this.options.concurrency) {
|
|
1036
1036
|
const [i] = this.activeQueue;
|
|
@@ -1070,19 +1070,19 @@ class qi {
|
|
|
1070
1070
|
}, r.delay || 0);
|
|
1071
1071
|
this.timeouts.set(e, n), this.logger.debug({ notificationId: e }, "active queue tick completed"), this.tickWaitingQueue();
|
|
1072
1072
|
};
|
|
1073
|
-
closeNotification = (e) => {
|
|
1074
|
-
const
|
|
1075
|
-
if (
|
|
1076
|
-
|
|
1077
|
-
const
|
|
1078
|
-
const
|
|
1079
|
-
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1073
|
+
closeNotification = (e, { animateHiding: r = !0 } = {}) => {
|
|
1074
|
+
const n = new Map(this.notificationsList.get()), i = n.get(e);
|
|
1075
|
+
if (i) {
|
|
1076
|
+
i.hiding = !(this.waitingQueue.size >= this.options.concurrency) && r, this.notificationsList.set(n);
|
|
1077
|
+
const o = setTimeout(() => {
|
|
1078
|
+
const s = new Map(this.notificationsList.get());
|
|
1079
|
+
s.delete(e), this.notificationsList.set(s);
|
|
1080
|
+
const a = this.timeouts.get(e);
|
|
1081
|
+
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden");
|
|
1082
1082
|
}, this.options.animationDelay || 0);
|
|
1083
|
-
this.timeouts.set(e,
|
|
1083
|
+
this.timeouts.set(e, o);
|
|
1084
1084
|
}
|
|
1085
|
-
return this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding"),
|
|
1085
|
+
return this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding"), i;
|
|
1086
1086
|
};
|
|
1087
1087
|
drain = () => {
|
|
1088
1088
|
this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
|
|
@@ -1092,7 +1092,7 @@ var gt;
|
|
|
1092
1092
|
(function(t) {
|
|
1093
1093
|
t.OPENED = "opened";
|
|
1094
1094
|
})(gt || (gt = {}));
|
|
1095
|
-
class
|
|
1095
|
+
class no extends Ot {
|
|
1096
1096
|
constructor() {
|
|
1097
1097
|
super("notification");
|
|
1098
1098
|
}
|
|
@@ -1104,15 +1104,15 @@ class Qi extends Et {
|
|
|
1104
1104
|
this.clear();
|
|
1105
1105
|
};
|
|
1106
1106
|
}
|
|
1107
|
-
var
|
|
1107
|
+
var ve;
|
|
1108
1108
|
(function(t) {
|
|
1109
1109
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1110
|
-
})(
|
|
1111
|
-
class
|
|
1110
|
+
})(ve || (ve = {}));
|
|
1111
|
+
class io {
|
|
1112
1112
|
queue;
|
|
1113
1113
|
storage;
|
|
1114
1114
|
constructor(e = {}) {
|
|
1115
|
-
this.storage = new
|
|
1115
|
+
this.storage = new no(), this.queue = new ro({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1116
1116
|
}
|
|
1117
1117
|
add = (e) => {
|
|
1118
1118
|
if (!this.storage.isOpened(e.id)) {
|
|
@@ -1131,15 +1131,15 @@ class Gi {
|
|
|
1131
1131
|
this.queue.addToQueue(e);
|
|
1132
1132
|
}
|
|
1133
1133
|
};
|
|
1134
|
-
close = (e, r = !0) => {
|
|
1135
|
-
this.queue.closeNotification(e), r && this.markAsViewed(e);
|
|
1134
|
+
close = (e, { markAsViewed: r = !0, animateHiding: n } = {}) => {
|
|
1135
|
+
this.queue.closeNotification(e, { animateHiding: n }), r && this.markAsViewed(e);
|
|
1136
1136
|
};
|
|
1137
1137
|
getActiveNotification = () => {
|
|
1138
1138
|
const e = this.queue.notificationsList.get();
|
|
1139
1139
|
if (!e?.size)
|
|
1140
1140
|
return null;
|
|
1141
1141
|
for (const n of e.values())
|
|
1142
|
-
if (n.type ===
|
|
1142
|
+
if (n.type === ve.ONBOARDING)
|
|
1143
1143
|
return n;
|
|
1144
1144
|
return e.values().next().value;
|
|
1145
1145
|
};
|
|
@@ -1148,31 +1148,31 @@ class Gi {
|
|
|
1148
1148
|
this.storage.setOpened(e);
|
|
1149
1149
|
};
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1152
|
-
t.notifications = new
|
|
1151
|
+
const oo = (t, e, r) => {
|
|
1152
|
+
t.notifications = new io(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1153
1153
|
t.notifications.queue.drain();
|
|
1154
1154
|
}), r();
|
|
1155
1155
|
};
|
|
1156
|
-
var
|
|
1156
|
+
var Ze;
|
|
1157
1157
|
(function(t) {
|
|
1158
1158
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1159
|
-
})(
|
|
1160
|
-
const
|
|
1161
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1159
|
+
})(Ze || (Ze = {}));
|
|
1160
|
+
const so = async (t, e) => {
|
|
1161
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1162
1162
|
try {
|
|
1163
1163
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1164
1164
|
} catch (o) {
|
|
1165
|
-
throw
|
|
1165
|
+
throw Xe.from(o)?.code === ee.AlreadyExists ? new Error(Ze.ALREADY_VOTED) : new Error(Ze.UNKNOWN);
|
|
1166
1166
|
}
|
|
1167
|
-
},
|
|
1168
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1167
|
+
}, ao = (t, e) => {
|
|
1168
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1169
1169
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1170
1170
|
};
|
|
1171
1171
|
var Me;
|
|
1172
1172
|
(function(t) {
|
|
1173
1173
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1174
1174
|
})(Me || (Me = {}));
|
|
1175
|
-
class
|
|
1175
|
+
class On extends Ot {
|
|
1176
1176
|
constructor() {
|
|
1177
1177
|
super("gamification");
|
|
1178
1178
|
}
|
|
@@ -1189,49 +1189,49 @@ class fn extends Et {
|
|
|
1189
1189
|
return window.sessionStorage.getItem(i);
|
|
1190
1190
|
};
|
|
1191
1191
|
}
|
|
1192
|
-
const
|
|
1192
|
+
const uo = {
|
|
1193
1193
|
pageSize: 10
|
|
1194
|
-
},
|
|
1194
|
+
}, co = (t, e, r, n, i) => {
|
|
1195
1195
|
let o = 0;
|
|
1196
|
-
const s = B({ pageSize: i?.pageSize ||
|
|
1196
|
+
const s = B({ pageSize: i?.pageSize || uo.pageSize, page: 0 }), a = ie({
|
|
1197
1197
|
data: [],
|
|
1198
1198
|
key: Date.now(),
|
|
1199
1199
|
hasMore: !0,
|
|
1200
1200
|
loading: void 0,
|
|
1201
1201
|
error: void 0
|
|
1202
|
-
}), u =
|
|
1203
|
-
const p = e.get(), m = n.getStore().get().data?.map((
|
|
1202
|
+
}), u = zi(t), d = async () => {
|
|
1203
|
+
const p = e.get(), m = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1204
1204
|
if (p && m?.length) {
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1205
|
+
const v = r.get();
|
|
1206
|
+
v && m.push(v), a.setKey("loading", !0), a.setKey("data", []);
|
|
1207
|
+
const b = await u({
|
|
1208
1208
|
eventId: p,
|
|
1209
1209
|
usersIds: m
|
|
1210
1210
|
});
|
|
1211
1211
|
a.set({
|
|
1212
|
-
data:
|
|
1213
|
-
...
|
|
1214
|
-
friendsRank:
|
|
1212
|
+
data: b.data.map((_, $) => ({
|
|
1213
|
+
..._.attributes,
|
|
1214
|
+
friendsRank: $ + 1
|
|
1215
1215
|
})),
|
|
1216
1216
|
hasMore: !1,
|
|
1217
1217
|
key: Date.now(),
|
|
1218
1218
|
loading: !1
|
|
1219
|
-
}),
|
|
1219
|
+
}), b.meta && (o = Math.round(b.meta.count / b.meta.pageSize));
|
|
1220
1220
|
}
|
|
1221
1221
|
}, c = () => {
|
|
1222
1222
|
d();
|
|
1223
1223
|
}, f = (p) => {
|
|
1224
|
-
const m = s.get(),
|
|
1225
|
-
|
|
1224
|
+
const m = s.get(), v = p || m.page + 1;
|
|
1225
|
+
v <= o && s.set({ ...m, page: v });
|
|
1226
1226
|
};
|
|
1227
|
-
return
|
|
1227
|
+
return pr(a, () => {
|
|
1228
1228
|
const p = e.listen(d), m = n.listen(d);
|
|
1229
1229
|
return () => {
|
|
1230
1230
|
p(), m();
|
|
1231
1231
|
};
|
|
1232
1232
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1233
1233
|
};
|
|
1234
|
-
class
|
|
1234
|
+
class lo extends Ot {
|
|
1235
1235
|
get = this.read;
|
|
1236
1236
|
set = this.write;
|
|
1237
1237
|
del = this.remove;
|
|
@@ -1239,32 +1239,32 @@ class Yi extends Et {
|
|
|
1239
1239
|
super("deep-link-context", window.sessionStorage);
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
const
|
|
1242
|
+
const qr = "sldl", Ct = "sldl_uid", Cn = "sldl_eid", Ln = "sldl_e_eid", fo = /* @__PURE__ */ new Set([Ct, Cn, Ln]), Qr = (t) => {
|
|
1243
1243
|
const e = {}, r = {};
|
|
1244
1244
|
for (const [n, i] of t)
|
|
1245
|
-
|
|
1245
|
+
fo.has(n) ? e[n] = i : r[n] = i;
|
|
1246
1246
|
return { result: e, remain: r };
|
|
1247
|
-
},
|
|
1248
|
-
if (t && t.includes(
|
|
1247
|
+
}, ho = ({ hash: t, search: e }) => {
|
|
1248
|
+
if (t && t.includes(qr)) {
|
|
1249
1249
|
const r = new URLSearchParams(t.substr(1));
|
|
1250
|
-
return { hash:
|
|
1250
|
+
return { hash: Qr(r) };
|
|
1251
1251
|
}
|
|
1252
|
-
if (e && e.includes(
|
|
1252
|
+
if (e && e.includes(qr)) {
|
|
1253
1253
|
const r = new URLSearchParams(e);
|
|
1254
|
-
return { search:
|
|
1254
|
+
return { search: Qr(r) };
|
|
1255
1255
|
}
|
|
1256
1256
|
return null;
|
|
1257
|
-
},
|
|
1257
|
+
}, Gr = Se("deep_link"), ne = {
|
|
1258
1258
|
debug: (...t) => {
|
|
1259
|
-
|
|
1259
|
+
Gr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1260
1260
|
},
|
|
1261
1261
|
trace: (...t) => {
|
|
1262
|
-
|
|
1262
|
+
Gr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1263
1263
|
}
|
|
1264
|
-
},
|
|
1264
|
+
}, po = (t, e) => {
|
|
1265
1265
|
const { hash: r, search: n } = window.location;
|
|
1266
1266
|
if (ne.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1267
|
-
const i =
|
|
1267
|
+
const i = ho({ hash: r, search: n });
|
|
1268
1268
|
if (ne.debug(i, "parse deep link result"), i) {
|
|
1269
1269
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1270
1270
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1283,8 +1283,8 @@ const Fr = "sldl", Tt = "sldl_uid", hn = "sldl_eid", pn = "sldl_e_eid", Xi = /*
|
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
t.setValue("parsed", !0);
|
|
1286
|
-
},
|
|
1287
|
-
const n = new
|
|
1286
|
+
}, yo = (t, e, r) => {
|
|
1287
|
+
const n = new lo(), i = n.get("sl-deep-link-store");
|
|
1288
1288
|
let o = {};
|
|
1289
1289
|
if (i)
|
|
1290
1290
|
try {
|
|
@@ -1305,7 +1305,7 @@ const Fr = "sldl", Tt = "sldl_uid", hn = "sldl_eid", pn = "sldl_e_eid", Xi = /*
|
|
|
1305
1305
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1306
1306
|
}, t.sdk.getInviter = () => {
|
|
1307
1307
|
const { data: a, used: u } = t.deepLink.getDeepLinkData();
|
|
1308
|
-
return u ? a?.[
|
|
1308
|
+
return u ? a?.[Ct] : void 0;
|
|
1309
1309
|
}, t.sdk.inviteDisplayed = () => {
|
|
1310
1310
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1311
1311
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
@@ -1322,15 +1322,15 @@ const Fr = "sldl", Tt = "sldl_uid", hn = "sldl_eid", pn = "sldl_e_eid", Xi = /*
|
|
|
1322
1322
|
console.error(d);
|
|
1323
1323
|
}
|
|
1324
1324
|
};
|
|
1325
|
-
|
|
1326
|
-
},
|
|
1327
|
-
class
|
|
1325
|
+
po(t.deepLink.$store, s), r();
|
|
1326
|
+
}, go = Se("bypass");
|
|
1327
|
+
class mo extends Ii {
|
|
1328
1328
|
$coreStore;
|
|
1329
1329
|
deepLink;
|
|
1330
1330
|
transport;
|
|
1331
1331
|
bypassLogin;
|
|
1332
1332
|
constructor(e, r, n) {
|
|
1333
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1333
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Vi(this.transport), this.connect();
|
|
1334
1334
|
}
|
|
1335
1335
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1336
1336
|
/**
|
|
@@ -1341,8 +1341,8 @@ class no extends di {
|
|
|
1341
1341
|
*/
|
|
1342
1342
|
login = async (e, r) => {
|
|
1343
1343
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1344
|
-
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[
|
|
1345
|
-
|
|
1344
|
+
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Ct];
|
|
1345
|
+
go.debug({ inviterKey: o }, "login with inviterKey");
|
|
1346
1346
|
const s = await this.bypassLogin({
|
|
1347
1347
|
schema: e,
|
|
1348
1348
|
userKey: r,
|
|
@@ -1411,37 +1411,37 @@ class no extends di {
|
|
|
1411
1411
|
});
|
|
1412
1412
|
};
|
|
1413
1413
|
}
|
|
1414
|
-
const
|
|
1415
|
-
t.auth = new
|
|
1414
|
+
const He = new je(), vo = (t, e, r) => {
|
|
1415
|
+
t.auth = new mo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1416
1416
|
n === de.READY && t.auth.reLogin();
|
|
1417
1417
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1418
|
-
if (!(
|
|
1418
|
+
if (!(He.getSchema() === n && He.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
1419
1419
|
try {
|
|
1420
|
-
await t.auth.login(n, i),
|
|
1420
|
+
await t.auth.login(n, i), He.setSchema(n), He.setExternalToken(i);
|
|
1421
1421
|
} catch {
|
|
1422
1422
|
t.sdk.logout();
|
|
1423
1423
|
}
|
|
1424
1424
|
}, t.sdk.logout = () => {
|
|
1425
|
-
t.auth.logout(),
|
|
1425
|
+
t.auth.logout(), He.clear();
|
|
1426
1426
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1427
|
-
},
|
|
1427
|
+
}, Kr = Se("video_player"), at = {
|
|
1428
1428
|
debug: (...t) => {
|
|
1429
|
-
|
|
1429
|
+
Kr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1430
1430
|
},
|
|
1431
1431
|
trace: (...t) => {
|
|
1432
|
-
|
|
1432
|
+
Kr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1433
1433
|
}
|
|
1434
|
-
},
|
|
1434
|
+
}, bo = (t, e, r) => {
|
|
1435
1435
|
t.videoPlayer = {
|
|
1436
1436
|
controllers: /* @__PURE__ */ new Set()
|
|
1437
1437
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
1438
|
-
|
|
1438
|
+
at.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
|
|
1439
1439
|
}, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
|
|
1440
|
-
|
|
1440
|
+
at.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
|
|
1441
1441
|
}, t.sdk.controlVideoPlayer = (n) => {
|
|
1442
|
-
|
|
1442
|
+
at.trace("controlling video player");
|
|
1443
1443
|
for (const i of t.videoPlayer.controllers) {
|
|
1444
|
-
|
|
1444
|
+
at.trace("calling video player controller");
|
|
1445
1445
|
try {
|
|
1446
1446
|
i(n);
|
|
1447
1447
|
} catch (o) {
|
|
@@ -1449,13 +1449,17 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
1451
|
}, r();
|
|
1452
|
-
},
|
|
1453
|
-
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new
|
|
1454
|
-
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = (s) => {
|
|
1455
|
-
|
|
1452
|
+
}, So = (t, e, r) => {
|
|
1453
|
+
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1454
|
+
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1455
|
+
if (i.has(s)) {
|
|
1456
|
+
const d = o.get(s);
|
|
1457
|
+
d && d(), i.delete(s), o.delete(s);
|
|
1458
|
+
}
|
|
1459
|
+
i.set(s, { cb: u, clear: a }), t?.stores?.enabled?.get() === "on" && o.set(s, u());
|
|
1456
1460
|
}, t.ready = () => {
|
|
1457
1461
|
t.stores.enabled.subscribe((s) => {
|
|
1458
|
-
s === "on" && n.onMountedFired === !1 && (i.forEach((a) => o.
|
|
1462
|
+
s === "on" && n.onMountedFired === !1 && (i.forEach(({ cb: a }, u) => o.set(u, a())), n.onMountedFired = !0), s !== "on" && n.onMountedFired === !0 && (o.forEach((a) => a()), o.clear(), i.forEach(({ clear: a }, u) => a && i.delete(u)), n.onMountedFired = !1);
|
|
1459
1463
|
});
|
|
1460
1464
|
}, t.sdk.initializeApp = async (s) => {
|
|
1461
1465
|
if (t.contextConfig = s, t.stores.enabled.get() === "on")
|
|
@@ -1472,8 +1476,8 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1472
1476
|
}, t.sdk.createEventSession = (s) => {
|
|
1473
1477
|
t.stores.providerStreamId.setValue(s);
|
|
1474
1478
|
}, r();
|
|
1475
|
-
},
|
|
1476
|
-
const { client: r, queryKey: n } = t.createPromiseClient(
|
|
1479
|
+
}, wo = (t, e) => {
|
|
1480
|
+
const { client: r, queryKey: n } = t.createPromiseClient(et, {
|
|
1477
1481
|
method: "generateDeepLink",
|
|
1478
1482
|
params: e
|
|
1479
1483
|
});
|
|
@@ -1485,29 +1489,29 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1485
1489
|
// 24 hours
|
|
1486
1490
|
refetchInterval: 0
|
|
1487
1491
|
});
|
|
1488
|
-
},
|
|
1489
|
-
const { client: n } = t.createPromiseClient(
|
|
1492
|
+
}, Ao = (t, { web: e, mobile: r }) => {
|
|
1493
|
+
const { client: n } = t.createPromiseClient(yi, { method: "generate" });
|
|
1490
1494
|
return n.generate({ web: e, mobile: r });
|
|
1491
|
-
},
|
|
1495
|
+
}, zr = (t, e) => {
|
|
1492
1496
|
const r = new URLSearchParams(t);
|
|
1493
1497
|
for (const [n, i] of Object.entries(e))
|
|
1494
1498
|
r.append(n, i);
|
|
1495
1499
|
return r.toString();
|
|
1496
|
-
},
|
|
1500
|
+
}, Eo = (t, e, r, n) => {
|
|
1497
1501
|
const i = ie({});
|
|
1498
|
-
return
|
|
1499
|
-
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", m = r.get() || "",
|
|
1500
|
-
[
|
|
1501
|
-
[
|
|
1502
|
-
[
|
|
1502
|
+
return pr(i, () => wo(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
|
|
1503
|
+
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", m = r.get() || "", v = {
|
|
1504
|
+
[Ct]: f,
|
|
1505
|
+
[Cn]: p,
|
|
1506
|
+
[Ln]: m
|
|
1503
1507
|
};
|
|
1504
1508
|
if (!d && c) {
|
|
1505
1509
|
i.setKey("loading", !0);
|
|
1506
|
-
let
|
|
1507
|
-
|
|
1508
|
-
const
|
|
1510
|
+
let I = window.location.search, b = window.location.hash;
|
|
1511
|
+
I && b || b ? I = `?${zr(I, v)}` : b = `#${zr("", v)}`;
|
|
1512
|
+
const _ = window.location.origin + window.location.pathname + I + b, $ = await Ao(t, { web: _, mobile: c });
|
|
1509
1513
|
i.set({
|
|
1510
|
-
data:
|
|
1514
|
+
data: $.data?.link,
|
|
1511
1515
|
loading: !1
|
|
1512
1516
|
});
|
|
1513
1517
|
} else
|
|
@@ -1518,10 +1522,10 @@ var U;
|
|
|
1518
1522
|
(function(t) {
|
|
1519
1523
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1520
1524
|
})(U || (U = {}));
|
|
1521
|
-
const
|
|
1525
|
+
const Io = (t, e, r, n) => {
|
|
1522
1526
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1523
1527
|
i && r.add({
|
|
1524
|
-
type:
|
|
1528
|
+
type: ve.ONBOARDING,
|
|
1525
1529
|
id: o,
|
|
1526
1530
|
action: t.openFeature,
|
|
1527
1531
|
persistent: !0,
|
|
@@ -1539,7 +1543,7 @@ const lo = (t, e, r, n) => {
|
|
|
1539
1543
|
}
|
|
1540
1544
|
}
|
|
1541
1545
|
});
|
|
1542
|
-
},
|
|
1546
|
+
}, ut = (t, e, r, n, i, o) => {
|
|
1543
1547
|
try {
|
|
1544
1548
|
const s = e.userId.get();
|
|
1545
1549
|
if (!s)
|
|
@@ -1558,31 +1562,31 @@ const lo = (t, e, r, n) => {
|
|
|
1558
1562
|
if (u === void 0 || d === void 0)
|
|
1559
1563
|
return;
|
|
1560
1564
|
const c = u?.options?.onboardingEnabled, f = d?.titleCard?.optIn;
|
|
1561
|
-
c ? f ? t.set(U.Required) : t.set(U.Optional) : (f ? t.set(U.Unavailable) : t.set(U.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), !1));
|
|
1565
|
+
c ? f ? t.set(U.Required) : t.set(U.Optional) : (f ? t.set(U.Unavailable) : t.set(U.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
1562
1566
|
} catch (s) {
|
|
1563
1567
|
console.error(s);
|
|
1564
1568
|
}
|
|
1565
|
-
},
|
|
1569
|
+
}, To = (t, e, r, n) => {
|
|
1566
1570
|
let i = !1;
|
|
1567
|
-
const o = new
|
|
1571
|
+
const o = new On(), s = B(U.Unset);
|
|
1568
1572
|
s.subscribe((d) => {
|
|
1569
|
-
d !== U.Unset && ((d === U.Optional || d === U.Required) && i === !1 && (
|
|
1573
|
+
d !== U.Unset && ((d === U.Optional || d === U.Required) && i === !1 && (Io(t, e, n, o), i = !0), d === U.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1570
1574
|
userId: e.userId.get() || "",
|
|
1571
1575
|
organizationId: e.organizationId.get() || "",
|
|
1572
1576
|
eventId: e.slStreamId.get() || ""
|
|
1573
1577
|
}));
|
|
1574
1578
|
});
|
|
1575
1579
|
const a = [];
|
|
1576
|
-
return
|
|
1577
|
-
d &&
|
|
1580
|
+
return ut(s, e, t, n, o, a), s.get() !== U.Completed && (a.push(e.userId.listen((d) => {
|
|
1581
|
+
d && ut(s, e, t, n, o, a);
|
|
1578
1582
|
})), a.push(e.moderation.listen((d) => {
|
|
1579
|
-
d.data &&
|
|
1583
|
+
d.data && ut(s, e, t, n, o, a);
|
|
1580
1584
|
})), a.push(t.featureSettings.listen((d) => {
|
|
1581
|
-
d &&
|
|
1585
|
+
d && ut(s, e, t, n, o, a);
|
|
1582
1586
|
}))), { $store: s, submitInplay: async () => {
|
|
1583
1587
|
const d = e.slStreamId.get();
|
|
1584
1588
|
if (d) {
|
|
1585
|
-
await
|
|
1589
|
+
await ao(r, d), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1586
1590
|
organizationId: e.organizationId.get() || "",
|
|
1587
1591
|
userId: e.userId.get() || "",
|
|
1588
1592
|
eventId: d
|
|
@@ -1594,9 +1598,9 @@ const lo = (t, e, r, n) => {
|
|
|
1594
1598
|
n.close(c);
|
|
1595
1599
|
}
|
|
1596
1600
|
} };
|
|
1597
|
-
},
|
|
1598
|
-
const i = ie(void 0), o =
|
|
1599
|
-
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((
|
|
1601
|
+
}, Oo = (t, e, r, n) => {
|
|
1602
|
+
const i = ie(void 0), o = Tn(n), s = async () => {
|
|
1603
|
+
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
|
|
1600
1604
|
if (!c)
|
|
1601
1605
|
return;
|
|
1602
1606
|
const f = {
|
|
@@ -1608,21 +1612,21 @@ const lo = (t, e, r, n) => {
|
|
|
1608
1612
|
}, a = () => {
|
|
1609
1613
|
s();
|
|
1610
1614
|
};
|
|
1611
|
-
return
|
|
1615
|
+
return pr(i, () => {
|
|
1612
1616
|
const u = t.listen(s), d = r.listen(s), c = e.listen(s);
|
|
1613
1617
|
return () => {
|
|
1614
1618
|
u(), d(), c();
|
|
1615
1619
|
};
|
|
1616
1620
|
}), { $store: i, invalidate: a };
|
|
1617
|
-
},
|
|
1618
|
-
const o =
|
|
1621
|
+
}, Co = async (t, e, r, n, i) => {
|
|
1622
|
+
const o = Tn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
1619
1623
|
eventId: s,
|
|
1620
1624
|
userId: n,
|
|
1621
1625
|
usersIds: [...u, a]
|
|
1622
1626
|
};
|
|
1623
1627
|
return (await o(d)).data?.attributes?.summary;
|
|
1624
|
-
},
|
|
1625
|
-
class
|
|
1628
|
+
}, Lo = /* @__PURE__ */ new Set([D.POLL, D.PREDICTION, D.TRIVIA]);
|
|
1629
|
+
class _o extends In {
|
|
1626
1630
|
/** user statistics (leaderboard panel) */
|
|
1627
1631
|
userSummary;
|
|
1628
1632
|
/** feed list (pick history) */
|
|
@@ -1656,15 +1660,9 @@ class go extends ln {
|
|
|
1656
1660
|
submitAnswerTimeout;
|
|
1657
1661
|
cancels = /* @__PURE__ */ new Set();
|
|
1658
1662
|
constructor(e, r, n) {
|
|
1659
|
-
super(e, r), this.background = new
|
|
1663
|
+
super(e, r), this.background = new to(n), this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new On(), this.feedList = this.background.feedList, this.friends = new ye(Hi(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new W(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = To(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(N.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Eo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Oo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = co(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
1660
1664
|
o?.summary && i?.summary && !i.fromLeaderboard && this.leaderboardList.invalidate();
|
|
1661
|
-
})), this.cancels.add(this.
|
|
1662
|
-
const o = { ...this.userSummary.$store.get() || {} }, s = o?.summary?.userId;
|
|
1663
|
-
if (i.data.length && s) {
|
|
1664
|
-
const a = i.data.find((u) => u.userId === s)?.rank;
|
|
1665
|
-
a !== void 0 && o?.summary && (o.fromLeaderboard = !0, o.summary.friendsRank = a, this.userSummary.$store.set(o));
|
|
1666
|
-
}
|
|
1667
|
-
})), this.cancels.add(this.background.activeQuestionId.listen(this.showInApp)), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), n.sdk.onMount(() => () => {
|
|
1665
|
+
})), this.cancels.add(this.background.activeQuestionId.listen(this.showInApp)), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), n.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
|
|
1668
1666
|
for (const i of this.cancels)
|
|
1669
1667
|
i(), this.cancels.delete(i);
|
|
1670
1668
|
});
|
|
@@ -1689,41 +1687,41 @@ class go extends ln {
|
|
|
1689
1687
|
prefix: `notification-id:${s}`
|
|
1690
1688
|
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((q) => q.id === s), f = d[c];
|
|
1691
1689
|
let p = f?.attributes?.attributes?.value?.answerId;
|
|
1692
|
-
const m =
|
|
1690
|
+
const m = nr(s, this.transport), v = m.subscribe(() => {
|
|
1693
1691
|
});
|
|
1694
1692
|
await m.get().promise;
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1693
|
+
const I = m.get().data;
|
|
1694
|
+
v(), window.requestAnimationFrame(() => {
|
|
1697
1695
|
m.invalidate();
|
|
1698
|
-
}), p || (p =
|
|
1699
|
-
const
|
|
1696
|
+
}), p || (p = I?.answers.find(({ youVoted: q }) => q)?.id);
|
|
1697
|
+
const b = a.find(({ correct: q }) => q), _ = p ? a.find(({ id: q }) => q === p) : void 0, $ = !!_?.correct;
|
|
1700
1698
|
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
1701
1699
|
try {
|
|
1702
|
-
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status =
|
|
1700
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = $ ? st.WON : st.LOST);
|
|
1703
1701
|
} catch {
|
|
1704
1702
|
}
|
|
1705
1703
|
this.feedList.getStore().mutate(d);
|
|
1706
1704
|
}
|
|
1707
|
-
if (!
|
|
1705
|
+
if (!_ || !b)
|
|
1708
1706
|
return;
|
|
1709
1707
|
this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
|
|
1710
|
-
type:
|
|
1708
|
+
type: ve.QUESTION_RESOLVED,
|
|
1711
1709
|
action: () => this.openQuestion(r.id, n),
|
|
1712
1710
|
close: () => this.closeQuestion(s),
|
|
1713
|
-
autoHideDuration:
|
|
1711
|
+
autoHideDuration: $ ? 15e3 : 12e3,
|
|
1714
1712
|
id: u,
|
|
1715
1713
|
emitEvent: !1,
|
|
1716
1714
|
data: {
|
|
1717
1715
|
questionId: s,
|
|
1718
1716
|
questionType: D.PREDICTION,
|
|
1719
1717
|
question: {
|
|
1720
|
-
title:
|
|
1718
|
+
title: $ ? `Congratulations! You answered correctly! You won ${b.points} pts!` : `Better luck next time! Correct: ${b?.text}!`,
|
|
1721
1719
|
votedAnswer: {
|
|
1722
|
-
title:
|
|
1723
|
-
points:
|
|
1720
|
+
title: _?.text,
|
|
1721
|
+
points: _?.points
|
|
1724
1722
|
},
|
|
1725
|
-
correctAnswerTitle:
|
|
1726
|
-
correct:
|
|
1723
|
+
correctAnswerTitle: b?.text,
|
|
1724
|
+
correct: !!$,
|
|
1727
1725
|
predictionResult: i === ce.RESOLVED,
|
|
1728
1726
|
questionTitle: r?.subject
|
|
1729
1727
|
}
|
|
@@ -1793,26 +1791,26 @@ class go extends ln {
|
|
|
1793
1791
|
this.background.feedSubscription.removeListener("feed-subscription-prediction-close"), this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
1794
1792
|
};
|
|
1795
1793
|
submitAnswer = async (e, r) => {
|
|
1796
|
-
const n =
|
|
1797
|
-
|
|
1798
|
-
|
|
1794
|
+
const n = nr(e, this.transport), i = n.subscribe(() => {
|
|
1795
|
+
}), o = { ...n.get().data || {} }, s = () => {
|
|
1796
|
+
const a = this.feedList.getValues().data;
|
|
1797
|
+
if (!a)
|
|
1799
1798
|
return;
|
|
1800
|
-
const
|
|
1801
|
-
if (
|
|
1799
|
+
const u = a.findIndex((f) => f.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
|
|
1800
|
+
if (c) {
|
|
1802
1801
|
pe.emit("poll", {
|
|
1803
1802
|
action: "voted",
|
|
1804
1803
|
payload: {
|
|
1805
1804
|
questionId: e,
|
|
1806
|
-
questionType:
|
|
1805
|
+
questionType: c.questionType
|
|
1807
1806
|
}
|
|
1808
1807
|
});
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
o[s].attributes.attributes.value.answerId = r, o[s].attributes.attributes.value.openForVoting = !1, o[s].attributes.attributes.value.text = m?.text || "", f && (o[s].attributes.attributes.value.status = f.id === r ? at.WON : at.LOST), this.feedList.getStore().mutate([...o]), c.answers[p].correct = f?.id === r, c.answers[p].youVoted = !0, c.answers.forEach((b) => {
|
|
1808
|
+
const f = n.get().data;
|
|
1809
|
+
if (i(), f) {
|
|
1810
|
+
const p = f.answers.find((b) => b.correct === !0), m = f.answers.findIndex((b) => b.id === r), v = f.answers[m], I = f.answers.every(({ percentageDecimal: b }, _) => b === o?.answers[_].percentageDecimal);
|
|
1811
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? st.WON : st.LOST), this.feedList.getStore().mutate([...a]), f.answers[m].correct = p?.id === r, f.answers[m].youVoted = !0, I && f.answers.forEach((b) => {
|
|
1814
1812
|
b.percentageDecimal = 0;
|
|
1815
|
-
}),
|
|
1813
|
+
}), p?.id === r && (f.answers[m].pointsEarned = f.status === ce.RESOLVED ? 0 : p.points), n.mutate({ ...f });
|
|
1816
1814
|
}
|
|
1817
1815
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
1818
1816
|
this.userSummary.invalidate();
|
|
@@ -1820,15 +1818,15 @@ class go extends ln {
|
|
|
1820
1818
|
}
|
|
1821
1819
|
};
|
|
1822
1820
|
try {
|
|
1823
|
-
await
|
|
1824
|
-
} catch (
|
|
1825
|
-
if (
|
|
1821
|
+
await so(this.transport, { questionId: e, answerId: r }), s();
|
|
1822
|
+
} catch (a) {
|
|
1823
|
+
if (a.message === Ze.ALREADY_VOTED) {
|
|
1826
1824
|
this.userSummary.invalidate();
|
|
1827
|
-
const
|
|
1825
|
+
const u = n.subscribe(() => {
|
|
1828
1826
|
});
|
|
1829
|
-
n.invalidate(),
|
|
1827
|
+
n.invalidate(), u();
|
|
1830
1828
|
}
|
|
1831
|
-
throw
|
|
1829
|
+
throw a;
|
|
1832
1830
|
}
|
|
1833
1831
|
};
|
|
1834
1832
|
openQuestion = (e, r) => {
|
|
@@ -1838,7 +1836,9 @@ class go extends ln {
|
|
|
1838
1836
|
this.notifications.close(this.background.getCurrentSessionId({
|
|
1839
1837
|
prefix: "notification",
|
|
1840
1838
|
entity: e
|
|
1841
|
-
})
|
|
1839
|
+
}), {
|
|
1840
|
+
animateHiding: !1
|
|
1841
|
+
});
|
|
1842
1842
|
let n = r?.attributes?.type;
|
|
1843
1843
|
return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type), pe.emit("poll", {
|
|
1844
1844
|
action: "opened",
|
|
@@ -1862,7 +1862,7 @@ class go extends ln {
|
|
|
1862
1862
|
}
|
|
1863
1863
|
const n = { ...r };
|
|
1864
1864
|
try {
|
|
1865
|
-
const i = await
|
|
1865
|
+
const i = await Co(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
1866
1866
|
i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
|
|
1867
1867
|
} catch (i) {
|
|
1868
1868
|
console.error(i);
|
|
@@ -1880,10 +1880,10 @@ class go extends ln {
|
|
|
1880
1880
|
*/
|
|
1881
1881
|
showInApp = (e) => {
|
|
1882
1882
|
const r = this.onboardingStatus.$store.get();
|
|
1883
|
-
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !==
|
|
1884
|
-
if (
|
|
1883
|
+
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== li.ON && e.data.question.status === ce.ACTIVE && !e.data.question.marketClosed) {
|
|
1884
|
+
if (Lo.has(e.data.question.type))
|
|
1885
1885
|
this.isInteractiveAllowed && this.notifications.add({
|
|
1886
|
-
type:
|
|
1886
|
+
type: ve.QUESTION,
|
|
1887
1887
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
1888
1888
|
close: () => this.closeQuestion(e.data?.question?.id),
|
|
1889
1889
|
autoHideDuration: 1e3 * 60,
|
|
@@ -1917,7 +1917,7 @@ class go extends ln {
|
|
|
1917
1917
|
}
|
|
1918
1918
|
};
|
|
1919
1919
|
this.notifications.add({
|
|
1920
|
-
type:
|
|
1920
|
+
type: ve.QUESTION,
|
|
1921
1921
|
action: () => this.openQuestion(e?.data?.question?.id, e?.data?.feedItem),
|
|
1922
1922
|
close: () => this.closeQuestion(e?.data?.question?.id),
|
|
1923
1923
|
autoHideDuration: 1e3 * 120,
|
|
@@ -1940,7 +1940,7 @@ class go extends ln {
|
|
|
1940
1940
|
tweetId: e.data.question.id
|
|
1941
1941
|
};
|
|
1942
1942
|
this.notifications.add({
|
|
1943
|
-
type:
|
|
1943
|
+
type: ve.QUESTION,
|
|
1944
1944
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
1945
1945
|
close: () => this.closeQuestion(e.data?.question?.id),
|
|
1946
1946
|
autoHideDuration: 1e3 * 120,
|
|
@@ -1956,15 +1956,15 @@ class go extends ln {
|
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
1958
|
}
|
|
1959
|
-
const
|
|
1959
|
+
const ko = {
|
|
1960
1960
|
[N.GAMES]: !0
|
|
1961
1961
|
};
|
|
1962
|
-
class
|
|
1962
|
+
class Po extends In {
|
|
1963
1963
|
constructor(e, r) {
|
|
1964
1964
|
super(e, r);
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
|
-
const
|
|
1967
|
+
const Fo = (t, e, r) => t.type === N.GAMES ? new _o(t, e, r) : new Po(t, e), No = (t, e, r) => {
|
|
1968
1968
|
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new W(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new W(B(N.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
|
|
1969
1969
|
t.activeFeature.setValue(n);
|
|
1970
1970
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -1975,8 +1975,8 @@ const vo = (t, e, r) => t.type === N.GAMES ? new go(t, e, r) : new bo(t, e), So
|
|
|
1975
1975
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
1976
1976
|
}
|
|
1977
1977
|
}, t.initFeature = (n, i = le.ORGANIZATION) => {
|
|
1978
|
-
if (n.type in
|
|
1979
|
-
const o =
|
|
1978
|
+
if (n.type in ko && !t.features.has(n.type)) {
|
|
1979
|
+
const o = Fo(n, i, t);
|
|
1980
1980
|
t.features.set(n.type, o);
|
|
1981
1981
|
let s = t.sdk.featuresList.getValue();
|
|
1982
1982
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2029,7 +2029,7 @@ const vo = (t, e, r) => t.type === N.GAMES ? new go(t, e, r) : new bo(t, e), So
|
|
|
2029
2029
|
t.store.subscribe(i);
|
|
2030
2030
|
}, r();
|
|
2031
2031
|
};
|
|
2032
|
-
class
|
|
2032
|
+
class Do {
|
|
2033
2033
|
analytics;
|
|
2034
2034
|
constructor(e) {
|
|
2035
2035
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2050,8 +2050,8 @@ class wo {
|
|
|
2050
2050
|
...this.analytics.commonStore.getValues(),
|
|
2051
2051
|
kind: H.INVITATION_ACCEPTED
|
|
2052
2052
|
},
|
|
2053
|
-
category:
|
|
2054
|
-
from:
|
|
2053
|
+
category: Pr.GAMES,
|
|
2054
|
+
from: Fr.UNSET
|
|
2055
2055
|
});
|
|
2056
2056
|
};
|
|
2057
2057
|
sent = ({ from: e }) => {
|
|
@@ -2060,12 +2060,12 @@ class wo {
|
|
|
2060
2060
|
...this.analytics.commonStore.getValues(),
|
|
2061
2061
|
kind: H.INVITATION_SENT
|
|
2062
2062
|
},
|
|
2063
|
-
category:
|
|
2064
|
-
from: e ||
|
|
2063
|
+
category: Pr.GAMES,
|
|
2064
|
+
from: e || Fr.UNSET
|
|
2065
2065
|
});
|
|
2066
2066
|
};
|
|
2067
2067
|
}
|
|
2068
|
-
class
|
|
2068
|
+
class Ro {
|
|
2069
2069
|
analytics;
|
|
2070
2070
|
constructor(e) {
|
|
2071
2071
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2089,7 +2089,7 @@ class Ao {
|
|
|
2089
2089
|
...this.analytics.commonStore.getValues(),
|
|
2090
2090
|
kind: H.INTERACTIONS
|
|
2091
2091
|
},
|
|
2092
|
-
actionType:
|
|
2092
|
+
actionType: Mr.TAP
|
|
2093
2093
|
});
|
|
2094
2094
|
};
|
|
2095
2095
|
scroll = () => {
|
|
@@ -2098,11 +2098,11 @@ class Ao {
|
|
|
2098
2098
|
...this.analytics.commonStore.getValues(),
|
|
2099
2099
|
kind: H.INTERACTIONS
|
|
2100
2100
|
},
|
|
2101
|
-
actionType:
|
|
2101
|
+
actionType: Mr.SCROLL
|
|
2102
2102
|
});
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
|
-
const
|
|
2105
|
+
const Je = {
|
|
2106
2106
|
[D.UNSET]: K.UNSET,
|
|
2107
2107
|
[D.FACTOID]: K.POLLS_INSIGHT,
|
|
2108
2108
|
[D.POLL]: K.POLLS_POLL,
|
|
@@ -2112,7 +2112,7 @@ const Ye = {
|
|
|
2112
2112
|
[D.TWEET]: K.POLLS_TWITTER
|
|
2113
2113
|
};
|
|
2114
2114
|
D.UNSET + "", ae.UNSET, D.FACTOID + "", ae.POLLS, D.POLL + "", ae.POLLS, D.PREDICTION + "", ae.POLLS, D.PROMOTION + "", ae.POLLS, D.TRIVIA + "", ae.POLLS, D.TWEET + "", ae.POLLS;
|
|
2115
|
-
const
|
|
2115
|
+
const $o = {
|
|
2116
2116
|
[N.UNSET]: Q.UNSET,
|
|
2117
2117
|
[N.INPLAY]: Q.INPLAY,
|
|
2118
2118
|
[N.MESSAGING]: Q.MESSAGING,
|
|
@@ -2132,7 +2132,7 @@ const Io = {
|
|
|
2132
2132
|
[N.HIGHLIGHTS]: Q.HIGHLIGHTS,
|
|
2133
2133
|
[N.PUBLIC_CHAT]: Q.PUBLIC_CHAT
|
|
2134
2134
|
};
|
|
2135
|
-
class
|
|
2135
|
+
class Vo {
|
|
2136
2136
|
analytics;
|
|
2137
2137
|
constructor(e) {
|
|
2138
2138
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2156,10 +2156,10 @@ class Eo {
|
|
|
2156
2156
|
...this.analytics.commonStore.getValues(),
|
|
2157
2157
|
kind: H.NOTIFICATION_RECEIVED,
|
|
2158
2158
|
topicId: e,
|
|
2159
|
-
topicType: r ?
|
|
2159
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2160
2160
|
},
|
|
2161
2161
|
notificationKind: ae.POLLS,
|
|
2162
|
-
notificationType:
|
|
2162
|
+
notificationType: Ur.IN_APP
|
|
2163
2163
|
});
|
|
2164
2164
|
};
|
|
2165
2165
|
opened = ({ questionId: e, questionType: r }) => {
|
|
@@ -2168,14 +2168,14 @@ class Eo {
|
|
|
2168
2168
|
...this.analytics.commonStore.getValues(),
|
|
2169
2169
|
kind: H.NOTIFICATION_OPENED,
|
|
2170
2170
|
topicId: e,
|
|
2171
|
-
topicType: r ?
|
|
2171
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2172
2172
|
},
|
|
2173
2173
|
notificationKind: ae.POLLS,
|
|
2174
|
-
notificationType:
|
|
2174
|
+
notificationType: Ur.IN_APP
|
|
2175
2175
|
});
|
|
2176
2176
|
};
|
|
2177
2177
|
}
|
|
2178
|
-
class
|
|
2178
|
+
class jo {
|
|
2179
2179
|
analytics;
|
|
2180
2180
|
constructor(e) {
|
|
2181
2181
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2209,7 +2209,7 @@ class To {
|
|
|
2209
2209
|
...this.analytics.commonStore.getValues(),
|
|
2210
2210
|
kind: H.POLLS_RECEIVED,
|
|
2211
2211
|
topicId: e,
|
|
2212
|
-
topicType: r ?
|
|
2212
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2213
2213
|
},
|
|
2214
2214
|
pollOpenedFrom: De.UNSET
|
|
2215
2215
|
});
|
|
@@ -2221,7 +2221,7 @@ class To {
|
|
|
2221
2221
|
...this.analytics.commonStore.getValues(),
|
|
2222
2222
|
kind: H.POLLS_OPENED,
|
|
2223
2223
|
topicId: e,
|
|
2224
|
-
topicType: r ?
|
|
2224
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2225
2225
|
},
|
|
2226
2226
|
pollOpenedFrom: n === "list" ? De.PICK_HISTORY : De.IN_APP
|
|
2227
2227
|
});
|
|
@@ -2233,7 +2233,7 @@ class To {
|
|
|
2233
2233
|
...this.analytics.commonStore.getValues(),
|
|
2234
2234
|
kind: H.POLLS_VOTE,
|
|
2235
2235
|
topicId: e,
|
|
2236
|
-
topicType: r ?
|
|
2236
|
+
topicType: r ? Je[r] : K.UNSET
|
|
2237
2237
|
},
|
|
2238
2238
|
pollOpenedFrom: De.UNSET
|
|
2239
2239
|
});
|
|
@@ -2259,9 +2259,9 @@ class To {
|
|
|
2259
2259
|
});
|
|
2260
2260
|
};
|
|
2261
2261
|
}
|
|
2262
|
-
const
|
|
2262
|
+
const Mo = ({ transport: t, $commonStore: e }) => {
|
|
2263
2263
|
let r;
|
|
2264
|
-
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(
|
|
2264
|
+
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(bn, {
|
|
2265
2265
|
method: "send",
|
|
2266
2266
|
params: [n]
|
|
2267
2267
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -2297,7 +2297,7 @@ const Oo = ({ transport: t, $commonStore: e }) => {
|
|
|
2297
2297
|
fe.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2298
2298
|
} };
|
|
2299
2299
|
}, fe = Se("analytics");
|
|
2300
|
-
class
|
|
2300
|
+
class Uo {
|
|
2301
2301
|
commonStore;
|
|
2302
2302
|
notifications;
|
|
2303
2303
|
polls;
|
|
@@ -2309,14 +2309,14 @@ class Co {
|
|
|
2309
2309
|
listenersCancels;
|
|
2310
2310
|
connected = !1;
|
|
2311
2311
|
constructor(e) {
|
|
2312
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2313
|
-
const { client: r } = e.analyticsTransport.createPromiseClient(
|
|
2312
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = Mo({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Vo(this), this.polls = new jo(this), this.invitation = new Do(this), this.interactions = new Ro(this);
|
|
2313
|
+
const { client: r } = e.analyticsTransport.createPromiseClient(bn, {
|
|
2314
2314
|
method: "send"
|
|
2315
2315
|
});
|
|
2316
2316
|
this.analyticsClient = r;
|
|
2317
2317
|
}
|
|
2318
2318
|
connect = () => {
|
|
2319
|
-
this.writeCommon("sessionId",
|
|
2319
|
+
this.writeCommon("sessionId", Zt()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, fe.debug("analytics connected");
|
|
2320
2320
|
};
|
|
2321
2321
|
disconnect = () => {
|
|
2322
2322
|
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, fe.debug("analytics disconnected");
|
|
@@ -2339,10 +2339,10 @@ class Co {
|
|
|
2339
2339
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2340
2340
|
this.writeCommon("eventId", r);
|
|
2341
2341
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2342
|
-
r && this.writeCommon("category",
|
|
2342
|
+
r && this.writeCommon("category", $o[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Zt()) : this.writeCommon("overlaySessionId", "");
|
|
2343
2343
|
})), this.onConnect(() => {
|
|
2344
2344
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2345
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
2345
|
+
this.writeCommon("screenOrientation", i.matches ? jr.PORTRAIT : jr.LANDSCAPE);
|
|
2346
2346
|
};
|
|
2347
2347
|
return r.addEventListener("change", n), () => {
|
|
2348
2348
|
r.removeEventListener("change", n);
|
|
@@ -2352,17 +2352,17 @@ class Co {
|
|
|
2352
2352
|
}));
|
|
2353
2353
|
};
|
|
2354
2354
|
}
|
|
2355
|
-
const
|
|
2356
|
-
t.analytics = new
|
|
2355
|
+
const xo = (t, e, r) => {
|
|
2356
|
+
t.analytics = new Uo(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2357
2357
|
t.analytics.disconnect();
|
|
2358
2358
|
})), r();
|
|
2359
2359
|
};
|
|
2360
|
-
var
|
|
2361
|
-
function
|
|
2360
|
+
var gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2361
|
+
function Bo(t) {
|
|
2362
2362
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2363
2363
|
}
|
|
2364
|
-
var
|
|
2365
|
-
function
|
|
2364
|
+
var mr = { exports: {} }, vr = { exports: {} };
|
|
2365
|
+
function qo(t) {
|
|
2366
2366
|
var e = new t(), r = e;
|
|
2367
2367
|
function n() {
|
|
2368
2368
|
var o = e;
|
|
@@ -2376,12 +2376,12 @@ function ko(t) {
|
|
|
2376
2376
|
release: i
|
|
2377
2377
|
};
|
|
2378
2378
|
}
|
|
2379
|
-
var
|
|
2380
|
-
function
|
|
2379
|
+
var Qo = qo, Go = Qo;
|
|
2380
|
+
function _n(t, e, r) {
|
|
2381
2381
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2382
2382
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2383
|
-
var n =
|
|
2384
|
-
push:
|
|
2383
|
+
var n = Go(Ko), i = null, o = null, s = 0, a = null, u = {
|
|
2384
|
+
push: I,
|
|
2385
2385
|
drain: z,
|
|
2386
2386
|
saturated: z,
|
|
2387
2387
|
pause: c,
|
|
@@ -2389,12 +2389,12 @@ function gn(t, e, r) {
|
|
|
2389
2389
|
concurrency: r,
|
|
2390
2390
|
running: d,
|
|
2391
2391
|
resume: m,
|
|
2392
|
-
idle:
|
|
2392
|
+
idle: v,
|
|
2393
2393
|
length: f,
|
|
2394
2394
|
getQueue: p,
|
|
2395
|
-
unshift:
|
|
2395
|
+
unshift: b,
|
|
2396
2396
|
empty: z,
|
|
2397
|
-
kill:
|
|
2397
|
+
kill: $,
|
|
2398
2398
|
killAndDrain: q,
|
|
2399
2399
|
error: J
|
|
2400
2400
|
};
|
|
@@ -2406,51 +2406,51 @@ function gn(t, e, r) {
|
|
|
2406
2406
|
u.paused = !0;
|
|
2407
2407
|
}
|
|
2408
2408
|
function f() {
|
|
2409
|
-
for (var
|
|
2410
|
-
|
|
2409
|
+
for (var k = i, R = 0; k; )
|
|
2410
|
+
k = k.next, R++;
|
|
2411
2411
|
return R;
|
|
2412
2412
|
}
|
|
2413
2413
|
function p() {
|
|
2414
|
-
for (var
|
|
2415
|
-
R.push(
|
|
2414
|
+
for (var k = i, R = []; k; )
|
|
2415
|
+
R.push(k.value), k = k.next;
|
|
2416
2416
|
return R;
|
|
2417
2417
|
}
|
|
2418
2418
|
function m() {
|
|
2419
2419
|
if (u.paused) {
|
|
2420
2420
|
u.paused = !1;
|
|
2421
|
-
for (var
|
|
2422
|
-
s++,
|
|
2421
|
+
for (var k = 0; k < u.concurrency; k++)
|
|
2422
|
+
s++, _();
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function v() {
|
|
2426
2426
|
return s === 0 && u.length() === 0;
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2429
|
-
var
|
|
2430
|
-
|
|
2428
|
+
function I(k, R) {
|
|
2429
|
+
var T = n.get();
|
|
2430
|
+
T.context = t, T.release = _, T.value = k, T.callback = R || z, T.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2433
|
-
var
|
|
2434
|
-
|
|
2432
|
+
function b(k, R) {
|
|
2433
|
+
var T = n.get();
|
|
2434
|
+
T.context = t, T.release = _, T.value = k, T.callback = R || z, T.errorHandler = a, s === u.concurrency || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2437
|
-
|
|
2436
|
+
function _(k) {
|
|
2437
|
+
k && n.release(k);
|
|
2438
2438
|
var R = i;
|
|
2439
2439
|
R ? u.paused ? s-- : (o === i && (o = null), i = R.next, R.next = null, e.call(t, R.value, R.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
2440
2440
|
}
|
|
2441
|
-
function
|
|
2441
|
+
function $() {
|
|
2442
2442
|
i = null, o = null, u.drain = z;
|
|
2443
2443
|
}
|
|
2444
2444
|
function q() {
|
|
2445
2445
|
i = null, o = null, u.drain(), u.drain = z;
|
|
2446
2446
|
}
|
|
2447
|
-
function J(
|
|
2448
|
-
a =
|
|
2447
|
+
function J(k) {
|
|
2448
|
+
a = k;
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
2451
|
function z() {
|
|
2452
2452
|
}
|
|
2453
|
-
function
|
|
2453
|
+
function Ko() {
|
|
2454
2454
|
this.value = null, this.callback = z, this.next = null, this.release = z, this.context = null, this.errorHandler = null;
|
|
2455
2455
|
var t = this;
|
|
2456
2456
|
this.worked = function(r, n) {
|
|
@@ -2458,35 +2458,35 @@ function No() {
|
|
|
2458
2458
|
t.value = null, t.callback = z, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2459
2459
|
};
|
|
2460
2460
|
}
|
|
2461
|
-
function
|
|
2461
|
+
function zo(t, e, r) {
|
|
2462
2462
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2463
2463
|
function n(c, f) {
|
|
2464
2464
|
e.call(this, c).then(function(p) {
|
|
2465
2465
|
f(null, p);
|
|
2466
2466
|
}, f);
|
|
2467
2467
|
}
|
|
2468
|
-
var i =
|
|
2468
|
+
var i = _n(t, n, r), o = i.push, s = i.unshift;
|
|
2469
2469
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
2470
2470
|
function a(c) {
|
|
2471
2471
|
var f = new Promise(function(p, m) {
|
|
2472
|
-
o(c, function(
|
|
2473
|
-
if (
|
|
2474
|
-
m(
|
|
2472
|
+
o(c, function(v, I) {
|
|
2473
|
+
if (v) {
|
|
2474
|
+
m(v);
|
|
2475
2475
|
return;
|
|
2476
2476
|
}
|
|
2477
|
-
p(
|
|
2477
|
+
p(I);
|
|
2478
2478
|
});
|
|
2479
2479
|
});
|
|
2480
2480
|
return f.catch(z), f;
|
|
2481
2481
|
}
|
|
2482
2482
|
function u(c) {
|
|
2483
2483
|
var f = new Promise(function(p, m) {
|
|
2484
|
-
s(c, function(
|
|
2485
|
-
if (
|
|
2486
|
-
m(
|
|
2484
|
+
s(c, function(v, I) {
|
|
2485
|
+
if (v) {
|
|
2486
|
+
m(v);
|
|
2487
2487
|
return;
|
|
2488
2488
|
}
|
|
2489
|
-
p(
|
|
2489
|
+
p(I);
|
|
2490
2490
|
});
|
|
2491
2491
|
});
|
|
2492
2492
|
return f.catch(z), f;
|
|
@@ -2504,62 +2504,62 @@ function Do(t, e, r) {
|
|
|
2504
2504
|
return f;
|
|
2505
2505
|
}
|
|
2506
2506
|
}
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
var
|
|
2507
|
+
vr.exports = _n;
|
|
2508
|
+
vr.exports.promise = zo;
|
|
2509
|
+
var kn = vr.exports, br = { exports: {} }, Be = typeof Reflect == "object" ? Reflect : null, Hr = Be && typeof Be.apply == "function" ? Be.apply : function(e, r, n) {
|
|
2510
2510
|
return Function.prototype.apply.call(e, r, n);
|
|
2511
|
-
},
|
|
2512
|
-
Be && typeof Be.ownKeys == "function" ?
|
|
2511
|
+
}, lt;
|
|
2512
|
+
Be && typeof Be.ownKeys == "function" ? lt = Be.ownKeys : Object.getOwnPropertySymbols ? lt = function(e) {
|
|
2513
2513
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2514
|
-
} :
|
|
2514
|
+
} : lt = function(e) {
|
|
2515
2515
|
return Object.getOwnPropertyNames(e);
|
|
2516
2516
|
};
|
|
2517
|
-
function
|
|
2517
|
+
function Ho(t) {
|
|
2518
2518
|
console && console.warn && console.warn(t);
|
|
2519
2519
|
}
|
|
2520
|
-
var
|
|
2520
|
+
var Pn = Number.isNaN || function(e) {
|
|
2521
2521
|
return e !== e;
|
|
2522
2522
|
};
|
|
2523
|
-
function
|
|
2524
|
-
|
|
2523
|
+
function P() {
|
|
2524
|
+
P.init.call(this);
|
|
2525
2525
|
}
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
var
|
|
2533
|
-
function
|
|
2526
|
+
br.exports = P;
|
|
2527
|
+
br.exports.once = Xo;
|
|
2528
|
+
P.EventEmitter = P;
|
|
2529
|
+
P.prototype._events = void 0;
|
|
2530
|
+
P.prototype._eventsCount = 0;
|
|
2531
|
+
P.prototype._maxListeners = void 0;
|
|
2532
|
+
var Wr = 10;
|
|
2533
|
+
function Lt(t) {
|
|
2534
2534
|
if (typeof t != "function")
|
|
2535
2535
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
2536
2536
|
}
|
|
2537
|
-
Object.defineProperty(
|
|
2537
|
+
Object.defineProperty(P, "defaultMaxListeners", {
|
|
2538
2538
|
enumerable: !0,
|
|
2539
2539
|
get: function() {
|
|
2540
|
-
return
|
|
2540
|
+
return Wr;
|
|
2541
2541
|
},
|
|
2542
2542
|
set: function(t) {
|
|
2543
|
-
if (typeof t != "number" || t < 0 ||
|
|
2543
|
+
if (typeof t != "number" || t < 0 || Pn(t))
|
|
2544
2544
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2545
|
-
|
|
2545
|
+
Wr = t;
|
|
2546
2546
|
}
|
|
2547
2547
|
});
|
|
2548
|
-
|
|
2548
|
+
P.init = function() {
|
|
2549
2549
|
(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;
|
|
2550
2550
|
};
|
|
2551
|
-
|
|
2552
|
-
if (typeof e != "number" || e < 0 ||
|
|
2551
|
+
P.prototype.setMaxListeners = function(e) {
|
|
2552
|
+
if (typeof e != "number" || e < 0 || Pn(e))
|
|
2553
2553
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2554
2554
|
return this._maxListeners = e, this;
|
|
2555
2555
|
};
|
|
2556
|
-
function
|
|
2557
|
-
return t._maxListeners === void 0 ?
|
|
2556
|
+
function Fn(t) {
|
|
2557
|
+
return t._maxListeners === void 0 ? P.defaultMaxListeners : t._maxListeners;
|
|
2558
2558
|
}
|
|
2559
|
-
|
|
2560
|
-
return
|
|
2559
|
+
P.prototype.getMaxListeners = function() {
|
|
2560
|
+
return Fn(this);
|
|
2561
2561
|
};
|
|
2562
|
-
|
|
2562
|
+
P.prototype.emit = function(e) {
|
|
2563
2563
|
for (var r = [], n = 1; n < arguments.length; n++)
|
|
2564
2564
|
r.push(arguments[n]);
|
|
2565
2565
|
var i = e === "error", o = this._events;
|
|
@@ -2578,51 +2578,51 @@ k.prototype.emit = function(e) {
|
|
|
2578
2578
|
if (u === void 0)
|
|
2579
2579
|
return !1;
|
|
2580
2580
|
if (typeof u == "function")
|
|
2581
|
-
|
|
2581
|
+
Hr(u, this, r);
|
|
2582
2582
|
else
|
|
2583
|
-
for (var d = u.length, c =
|
|
2584
|
-
|
|
2583
|
+
for (var d = u.length, c = Vn(u, d), n = 0; n < d; ++n)
|
|
2584
|
+
Hr(c[n], this, r);
|
|
2585
2585
|
return !0;
|
|
2586
2586
|
};
|
|
2587
|
-
function
|
|
2587
|
+
function Nn(t, e, r, n) {
|
|
2588
2588
|
var i, o, s;
|
|
2589
|
-
if (
|
|
2589
|
+
if (Lt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
2590
2590
|
"newListener",
|
|
2591
2591
|
e,
|
|
2592
2592
|
r.listener ? r.listener : r
|
|
2593
2593
|
), o = t._events), s = o[e]), s === void 0)
|
|
2594
2594
|
s = o[e] = r, ++t._eventsCount;
|
|
2595
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
2595
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Fn(t), i > 0 && s.length > i && !s.warned) {
|
|
2596
2596
|
s.warned = !0;
|
|
2597
2597
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2598
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
2598
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, Ho(a);
|
|
2599
2599
|
}
|
|
2600
2600
|
return t;
|
|
2601
2601
|
}
|
|
2602
|
-
|
|
2603
|
-
return
|
|
2602
|
+
P.prototype.addListener = function(e, r) {
|
|
2603
|
+
return Nn(this, e, r, !1);
|
|
2604
2604
|
};
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
return
|
|
2605
|
+
P.prototype.on = P.prototype.addListener;
|
|
2606
|
+
P.prototype.prependListener = function(e, r) {
|
|
2607
|
+
return Nn(this, e, r, !0);
|
|
2608
2608
|
};
|
|
2609
|
-
function
|
|
2609
|
+
function Wo() {
|
|
2610
2610
|
if (!this.fired)
|
|
2611
2611
|
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);
|
|
2612
2612
|
}
|
|
2613
|
-
function
|
|
2614
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
2613
|
+
function Dn(t, e, r) {
|
|
2614
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Wo.bind(n);
|
|
2615
2615
|
return i.listener = r, n.wrapFn = i, i;
|
|
2616
2616
|
}
|
|
2617
|
-
|
|
2618
|
-
return
|
|
2617
|
+
P.prototype.once = function(e, r) {
|
|
2618
|
+
return Lt(r), this.on(e, Dn(this, e, r)), this;
|
|
2619
2619
|
};
|
|
2620
|
-
|
|
2621
|
-
return
|
|
2620
|
+
P.prototype.prependOnceListener = function(e, r) {
|
|
2621
|
+
return Lt(r), this.prependListener(e, Dn(this, e, r)), this;
|
|
2622
2622
|
};
|
|
2623
|
-
|
|
2623
|
+
P.prototype.removeListener = function(e, r) {
|
|
2624
2624
|
var n, i, o, s, a;
|
|
2625
|
-
if (
|
|
2625
|
+
if (Lt(r), i = this._events, i === void 0)
|
|
2626
2626
|
return this;
|
|
2627
2627
|
if (n = i[e], n === void 0)
|
|
2628
2628
|
return this;
|
|
@@ -2636,12 +2636,12 @@ k.prototype.removeListener = function(e, r) {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
if (o < 0)
|
|
2638
2638
|
return this;
|
|
2639
|
-
o === 0 ? n.shift() :
|
|
2639
|
+
o === 0 ? n.shift() : Jo(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
2640
2640
|
}
|
|
2641
2641
|
return this;
|
|
2642
2642
|
};
|
|
2643
|
-
|
|
2644
|
-
|
|
2643
|
+
P.prototype.off = P.prototype.removeListener;
|
|
2644
|
+
P.prototype.removeAllListeners = function(e) {
|
|
2645
2645
|
var r, n, i;
|
|
2646
2646
|
if (n = this._events, n === void 0)
|
|
2647
2647
|
return this;
|
|
@@ -2660,24 +2660,24 @@ k.prototype.removeAllListeners = function(e) {
|
|
|
2660
2660
|
this.removeListener(e, r[i]);
|
|
2661
2661
|
return this;
|
|
2662
2662
|
};
|
|
2663
|
-
function
|
|
2663
|
+
function Rn(t, e, r) {
|
|
2664
2664
|
var n = t._events;
|
|
2665
2665
|
if (n === void 0)
|
|
2666
2666
|
return [];
|
|
2667
2667
|
var i = n[e];
|
|
2668
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
2668
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Yo(i) : Vn(i, i.length);
|
|
2669
2669
|
}
|
|
2670
|
-
|
|
2671
|
-
return
|
|
2670
|
+
P.prototype.listeners = function(e) {
|
|
2671
|
+
return Rn(this, e, !0);
|
|
2672
2672
|
};
|
|
2673
|
-
|
|
2674
|
-
return
|
|
2673
|
+
P.prototype.rawListeners = function(e) {
|
|
2674
|
+
return Rn(this, e, !1);
|
|
2675
2675
|
};
|
|
2676
|
-
|
|
2677
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
2676
|
+
P.listenerCount = function(t, e) {
|
|
2677
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : $n.call(t, e);
|
|
2678
2678
|
};
|
|
2679
|
-
|
|
2680
|
-
function
|
|
2679
|
+
P.prototype.listenerCount = $n;
|
|
2680
|
+
function $n(t) {
|
|
2681
2681
|
var e = this._events;
|
|
2682
2682
|
if (e !== void 0) {
|
|
2683
2683
|
var r = e[t];
|
|
@@ -2688,25 +2688,25 @@ function In(t) {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
return 0;
|
|
2690
2690
|
}
|
|
2691
|
-
|
|
2692
|
-
return this._eventsCount > 0 ?
|
|
2691
|
+
P.prototype.eventNames = function() {
|
|
2692
|
+
return this._eventsCount > 0 ? lt(this._events) : [];
|
|
2693
2693
|
};
|
|
2694
|
-
function
|
|
2694
|
+
function Vn(t, e) {
|
|
2695
2695
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
2696
2696
|
r[n] = t[n];
|
|
2697
2697
|
return r;
|
|
2698
2698
|
}
|
|
2699
|
-
function
|
|
2699
|
+
function Jo(t, e) {
|
|
2700
2700
|
for (; e + 1 < t.length; e++)
|
|
2701
2701
|
t[e] = t[e + 1];
|
|
2702
2702
|
t.pop();
|
|
2703
2703
|
}
|
|
2704
|
-
function
|
|
2704
|
+
function Yo(t) {
|
|
2705
2705
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2706
2706
|
e[r] = t[r].listener || t[r];
|
|
2707
2707
|
return e;
|
|
2708
2708
|
}
|
|
2709
|
-
function
|
|
2709
|
+
function Xo(t, e) {
|
|
2710
2710
|
return new Promise(function(r, n) {
|
|
2711
2711
|
function i(s) {
|
|
2712
2712
|
t.removeListener(e, o), n(s);
|
|
@@ -2714,13 +2714,13 @@ function Mo(t, e) {
|
|
|
2714
2714
|
function o() {
|
|
2715
2715
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
2716
2716
|
}
|
|
2717
|
-
|
|
2717
|
+
jn(t, e, o, { once: !0 }), e !== "error" && Zo(t, i, { once: !0 });
|
|
2718
2718
|
});
|
|
2719
2719
|
}
|
|
2720
|
-
function
|
|
2721
|
-
typeof t.on == "function" &&
|
|
2720
|
+
function Zo(t, e, r) {
|
|
2721
|
+
typeof t.on == "function" && jn(t, "error", e, r);
|
|
2722
2722
|
}
|
|
2723
|
-
function
|
|
2723
|
+
function jn(t, e, r, n) {
|
|
2724
2724
|
if (typeof t.on == "function")
|
|
2725
2725
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
2726
2726
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2730,7 +2730,7 @@ function Tn(t, e, r, n) {
|
|
|
2730
2730
|
else
|
|
2731
2731
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2732
2732
|
}
|
|
2733
|
-
var
|
|
2733
|
+
var Mn = br.exports, _t = {}, Un = {}, xn = function() {
|
|
2734
2734
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2735
2735
|
return !1;
|
|
2736
2736
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2753,55 +2753,56 @@ var On = lr.exports, Ct = {}, Cn = {}, Ln = function() {
|
|
|
2753
2753
|
return !1;
|
|
2754
2754
|
}
|
|
2755
2755
|
return !0;
|
|
2756
|
-
},
|
|
2757
|
-
return
|
|
2758
|
-
},
|
|
2759
|
-
return typeof
|
|
2760
|
-
},
|
|
2756
|
+
}, es = xn, kt = function() {
|
|
2757
|
+
return es() && !!Symbol.toStringTag;
|
|
2758
|
+
}, ts = Error, rs = EvalError, ns = RangeError, is = ReferenceError, Bn = SyntaxError, Pt = TypeError, os = URIError, Jr = typeof Symbol < "u" && Symbol, ss = xn, as = function() {
|
|
2759
|
+
return typeof Jr != "function" || typeof Symbol != "function" || typeof Jr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ss();
|
|
2760
|
+
}, $t = {
|
|
2761
|
+
__proto__: null,
|
|
2761
2762
|
foo: {}
|
|
2762
|
-
},
|
|
2763
|
-
return { __proto__:
|
|
2764
|
-
},
|
|
2763
|
+
}, us = Object, cs = function() {
|
|
2764
|
+
return { __proto__: $t }.foo === $t.foo && !($t instanceof us);
|
|
2765
|
+
}, ls = "Function.prototype.bind called on incompatible ", ds = Object.prototype.toString, fs = Math.max, hs = "[object Function]", Yr = function(e, r) {
|
|
2765
2766
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
2766
2767
|
n[i] = e[i];
|
|
2767
2768
|
for (var o = 0; o < r.length; o += 1)
|
|
2768
2769
|
n[o + e.length] = r[o];
|
|
2769
2770
|
return n;
|
|
2770
|
-
},
|
|
2771
|
+
}, ps = function(e, r) {
|
|
2771
2772
|
for (var n = [], i = r || 0, o = 0; i < e.length; i += 1, o += 1)
|
|
2772
2773
|
n[o] = e[i];
|
|
2773
2774
|
return n;
|
|
2774
|
-
},
|
|
2775
|
+
}, ys = function(t, e) {
|
|
2775
2776
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
2776
2777
|
r += t[n], n + 1 < t.length && (r += e);
|
|
2777
2778
|
return r;
|
|
2778
|
-
},
|
|
2779
|
+
}, gs = function(e) {
|
|
2779
2780
|
var r = this;
|
|
2780
|
-
if (typeof r != "function" ||
|
|
2781
|
-
throw new TypeError(
|
|
2782
|
-
for (var n =
|
|
2781
|
+
if (typeof r != "function" || ds.apply(r) !== hs)
|
|
2782
|
+
throw new TypeError(ls + r);
|
|
2783
|
+
for (var n = ps(arguments, 1), i, o = function() {
|
|
2783
2784
|
if (this instanceof i) {
|
|
2784
2785
|
var c = r.apply(
|
|
2785
2786
|
this,
|
|
2786
|
-
|
|
2787
|
+
Yr(n, arguments)
|
|
2787
2788
|
);
|
|
2788
2789
|
return Object(c) === c ? c : this;
|
|
2789
2790
|
}
|
|
2790
2791
|
return r.apply(
|
|
2791
2792
|
e,
|
|
2792
|
-
|
|
2793
|
+
Yr(n, arguments)
|
|
2793
2794
|
);
|
|
2794
|
-
}, s =
|
|
2795
|
+
}, s = fs(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
2795
2796
|
a[u] = "$" + u;
|
|
2796
|
-
if (i = Function("binder", "return function (" +
|
|
2797
|
+
if (i = Function("binder", "return function (" + ys(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
2797
2798
|
var d = function() {
|
|
2798
2799
|
};
|
|
2799
2800
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
2800
2801
|
}
|
|
2801
2802
|
return i;
|
|
2802
|
-
},
|
|
2803
|
+
}, ms = gs, Sr = Function.prototype.bind || ms, vs = Function.prototype.call, bs = Object.prototype.hasOwnProperty, Ss = Sr, ws = Ss.call(vs, bs), E, As = ts, Es = rs, Is = ns, Ts = is, Qe = Bn, qe = Pt, Os = os, qn = Function, Vt = function(t) {
|
|
2803
2804
|
try {
|
|
2804
|
-
return
|
|
2805
|
+
return qn('"use strict"; return (' + t + ").constructor;")();
|
|
2805
2806
|
} catch {
|
|
2806
2807
|
}
|
|
2807
2808
|
}, Ce = Object.getOwnPropertyDescriptor;
|
|
@@ -2811,104 +2812,105 @@ if (Ce)
|
|
|
2811
2812
|
} catch {
|
|
2812
2813
|
Ce = null;
|
|
2813
2814
|
}
|
|
2814
|
-
var
|
|
2815
|
+
var jt = function() {
|
|
2815
2816
|
throw new qe();
|
|
2816
|
-
},
|
|
2817
|
+
}, Cs = Ce ? function() {
|
|
2817
2818
|
try {
|
|
2818
|
-
return arguments.callee,
|
|
2819
|
+
return arguments.callee, jt;
|
|
2819
2820
|
} catch {
|
|
2820
2821
|
try {
|
|
2821
2822
|
return Ce(arguments, "callee").get;
|
|
2822
2823
|
} catch {
|
|
2823
|
-
return
|
|
2824
|
+
return jt;
|
|
2824
2825
|
}
|
|
2825
2826
|
}
|
|
2826
|
-
}() :
|
|
2827
|
+
}() : jt, Re = as(), Ls = cs(), j = Object.getPrototypeOf || (Ls ? function(t) {
|
|
2827
2828
|
return t.__proto__;
|
|
2828
|
-
} : null),
|
|
2829
|
-
|
|
2829
|
+
} : null), Ve = {}, _s = typeof Uint8Array > "u" || !j ? E : j(Uint8Array), Le = {
|
|
2830
|
+
__proto__: null,
|
|
2831
|
+
"%AggregateError%": typeof AggregateError > "u" ? E : AggregateError,
|
|
2830
2832
|
"%Array%": Array,
|
|
2831
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
2832
|
-
"%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) :
|
|
2833
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
2834
|
-
"%AsyncFunction%":
|
|
2835
|
-
"%AsyncGenerator%":
|
|
2836
|
-
"%AsyncGeneratorFunction%":
|
|
2837
|
-
"%AsyncIteratorPrototype%":
|
|
2838
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
2839
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
2840
|
-
"%BigInt64Array%": typeof BigInt64Array > "u" ?
|
|
2841
|
-
"%BigUint64Array%": typeof BigUint64Array > "u" ?
|
|
2833
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? E : ArrayBuffer,
|
|
2834
|
+
"%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) : E,
|
|
2835
|
+
"%AsyncFromSyncIteratorPrototype%": E,
|
|
2836
|
+
"%AsyncFunction%": Ve,
|
|
2837
|
+
"%AsyncGenerator%": Ve,
|
|
2838
|
+
"%AsyncGeneratorFunction%": Ve,
|
|
2839
|
+
"%AsyncIteratorPrototype%": Ve,
|
|
2840
|
+
"%Atomics%": typeof Atomics > "u" ? E : Atomics,
|
|
2841
|
+
"%BigInt%": typeof BigInt > "u" ? E : BigInt,
|
|
2842
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? E : BigInt64Array,
|
|
2843
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? E : BigUint64Array,
|
|
2842
2844
|
"%Boolean%": Boolean,
|
|
2843
|
-
"%DataView%": typeof DataView > "u" ?
|
|
2845
|
+
"%DataView%": typeof DataView > "u" ? E : DataView,
|
|
2844
2846
|
"%Date%": Date,
|
|
2845
2847
|
"%decodeURI%": decodeURI,
|
|
2846
2848
|
"%decodeURIComponent%": decodeURIComponent,
|
|
2847
2849
|
"%encodeURI%": encodeURI,
|
|
2848
2850
|
"%encodeURIComponent%": encodeURIComponent,
|
|
2849
|
-
"%Error%":
|
|
2851
|
+
"%Error%": As,
|
|
2850
2852
|
"%eval%": eval,
|
|
2851
2853
|
// eslint-disable-line no-eval
|
|
2852
|
-
"%EvalError%":
|
|
2853
|
-
"%Float32Array%": typeof Float32Array > "u" ?
|
|
2854
|
-
"%Float64Array%": typeof Float64Array > "u" ?
|
|
2855
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ?
|
|
2856
|
-
"%Function%":
|
|
2857
|
-
"%GeneratorFunction%":
|
|
2858
|
-
"%Int8Array%": typeof Int8Array > "u" ?
|
|
2859
|
-
"%Int16Array%": typeof Int16Array > "u" ?
|
|
2860
|
-
"%Int32Array%": typeof Int32Array > "u" ?
|
|
2854
|
+
"%EvalError%": Es,
|
|
2855
|
+
"%Float32Array%": typeof Float32Array > "u" ? E : Float32Array,
|
|
2856
|
+
"%Float64Array%": typeof Float64Array > "u" ? E : Float64Array,
|
|
2857
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? E : FinalizationRegistry,
|
|
2858
|
+
"%Function%": qn,
|
|
2859
|
+
"%GeneratorFunction%": Ve,
|
|
2860
|
+
"%Int8Array%": typeof Int8Array > "u" ? E : Int8Array,
|
|
2861
|
+
"%Int16Array%": typeof Int16Array > "u" ? E : Int16Array,
|
|
2862
|
+
"%Int32Array%": typeof Int32Array > "u" ? E : Int32Array,
|
|
2861
2863
|
"%isFinite%": isFinite,
|
|
2862
2864
|
"%isNaN%": isNaN,
|
|
2863
|
-
"%IteratorPrototype%": Re && j ? j(j([][Symbol.iterator]())) :
|
|
2864
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
2865
|
-
"%Map%": typeof Map > "u" ?
|
|
2866
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !Re || !j ?
|
|
2865
|
+
"%IteratorPrototype%": Re && j ? j(j([][Symbol.iterator]())) : E,
|
|
2866
|
+
"%JSON%": typeof JSON == "object" ? JSON : E,
|
|
2867
|
+
"%Map%": typeof Map > "u" ? E : Map,
|
|
2868
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Re || !j ? E : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2867
2869
|
"%Math%": Math,
|
|
2868
2870
|
"%Number%": Number,
|
|
2869
2871
|
"%Object%": Object,
|
|
2870
2872
|
"%parseFloat%": parseFloat,
|
|
2871
2873
|
"%parseInt%": parseInt,
|
|
2872
|
-
"%Promise%": typeof Promise > "u" ?
|
|
2873
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
2874
|
-
"%RangeError%":
|
|
2875
|
-
"%ReferenceError%":
|
|
2876
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
2874
|
+
"%Promise%": typeof Promise > "u" ? E : Promise,
|
|
2875
|
+
"%Proxy%": typeof Proxy > "u" ? E : Proxy,
|
|
2876
|
+
"%RangeError%": Is,
|
|
2877
|
+
"%ReferenceError%": Ts,
|
|
2878
|
+
"%Reflect%": typeof Reflect > "u" ? E : Reflect,
|
|
2877
2879
|
"%RegExp%": RegExp,
|
|
2878
|
-
"%Set%": typeof Set > "u" ?
|
|
2879
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !Re || !j ?
|
|
2880
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
2880
|
+
"%Set%": typeof Set > "u" ? E : Set,
|
|
2881
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Re || !j ? E : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2882
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? E : SharedArrayBuffer,
|
|
2881
2883
|
"%String%": String,
|
|
2882
|
-
"%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) :
|
|
2883
|
-
"%Symbol%": Re ? Symbol :
|
|
2884
|
+
"%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : E,
|
|
2885
|
+
"%Symbol%": Re ? Symbol : E,
|
|
2884
2886
|
"%SyntaxError%": Qe,
|
|
2885
|
-
"%ThrowTypeError%":
|
|
2886
|
-
"%TypedArray%":
|
|
2887
|
+
"%ThrowTypeError%": Cs,
|
|
2888
|
+
"%TypedArray%": _s,
|
|
2887
2889
|
"%TypeError%": qe,
|
|
2888
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
2889
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
2890
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
2891
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
2892
|
-
"%URIError%":
|
|
2893
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
2894
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
2895
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
2890
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? E : Uint8Array,
|
|
2891
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? E : Uint8ClampedArray,
|
|
2892
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? E : Uint16Array,
|
|
2893
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? E : Uint32Array,
|
|
2894
|
+
"%URIError%": Os,
|
|
2895
|
+
"%WeakMap%": typeof WeakMap > "u" ? E : WeakMap,
|
|
2896
|
+
"%WeakRef%": typeof WeakRef > "u" ? E : WeakRef,
|
|
2897
|
+
"%WeakSet%": typeof WeakSet > "u" ? E : WeakSet
|
|
2896
2898
|
};
|
|
2897
2899
|
if (j)
|
|
2898
2900
|
try {
|
|
2899
2901
|
null.error;
|
|
2900
2902
|
} catch (t) {
|
|
2901
|
-
var
|
|
2902
|
-
Le["%Error.prototype%"] =
|
|
2903
|
+
var ks = j(j(t));
|
|
2904
|
+
Le["%Error.prototype%"] = ks;
|
|
2903
2905
|
}
|
|
2904
|
-
var
|
|
2906
|
+
var Ps = function t(e) {
|
|
2905
2907
|
var r;
|
|
2906
2908
|
if (e === "%AsyncFunction%")
|
|
2907
|
-
r =
|
|
2909
|
+
r = Vt("async function () {}");
|
|
2908
2910
|
else if (e === "%GeneratorFunction%")
|
|
2909
|
-
r =
|
|
2911
|
+
r = Vt("function* () {}");
|
|
2910
2912
|
else if (e === "%AsyncGeneratorFunction%")
|
|
2911
|
-
r =
|
|
2913
|
+
r = Vt("async function* () {}");
|
|
2912
2914
|
else if (e === "%AsyncGenerator%") {
|
|
2913
2915
|
var n = t("%AsyncGeneratorFunction%");
|
|
2914
2916
|
n && (r = n.prototype);
|
|
@@ -2917,7 +2919,8 @@ var us = function t(e) {
|
|
|
2917
2919
|
i && j && (r = j(i.prototype));
|
|
2918
2920
|
}
|
|
2919
2921
|
return Le[e] = r, r;
|
|
2920
|
-
},
|
|
2922
|
+
}, Xr = {
|
|
2923
|
+
__proto__: null,
|
|
2921
2924
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2922
2925
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
2923
2926
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -2969,21 +2972,21 @@ var us = function t(e) {
|
|
|
2969
2972
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2970
2973
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2971
2974
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2972
|
-
},
|
|
2973
|
-
var r =
|
|
2975
|
+
}, tt = Sr, mt = ws, Fs = tt.call(Function.call, Array.prototype.concat), Ns = tt.call(Function.apply, Array.prototype.splice), Zr = tt.call(Function.call, String.prototype.replace), vt = tt.call(Function.call, String.prototype.slice), Ds = tt.call(Function.call, RegExp.prototype.exec), Rs = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $s = /\\(\\)?/g, Vs = function(e) {
|
|
2976
|
+
var r = vt(e, 0, 1), n = vt(e, -1);
|
|
2974
2977
|
if (r === "%" && n !== "%")
|
|
2975
2978
|
throw new Qe("invalid intrinsic syntax, expected closing `%`");
|
|
2976
2979
|
if (n === "%" && r !== "%")
|
|
2977
2980
|
throw new Qe("invalid intrinsic syntax, expected opening `%`");
|
|
2978
2981
|
var i = [];
|
|
2979
|
-
return
|
|
2980
|
-
i[i.length] = a ?
|
|
2982
|
+
return Zr(e, Rs, function(o, s, a, u) {
|
|
2983
|
+
i[i.length] = a ? Zr(u, $s, "$1") : s || o;
|
|
2981
2984
|
}), i;
|
|
2982
|
-
},
|
|
2985
|
+
}, js = function(e, r) {
|
|
2983
2986
|
var n = e, i;
|
|
2984
|
-
if (mt(
|
|
2987
|
+
if (mt(Xr, n) && (i = Xr[n], n = "%" + i[0] + "%"), mt(Le, n)) {
|
|
2985
2988
|
var o = Le[n];
|
|
2986
|
-
if (o ===
|
|
2989
|
+
if (o === Ve && (o = Ps(n)), typeof o > "u" && !r)
|
|
2987
2990
|
throw new qe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2988
2991
|
return {
|
|
2989
2992
|
alias: i,
|
|
@@ -2992,18 +2995,18 @@ var us = function t(e) {
|
|
|
2992
2995
|
};
|
|
2993
2996
|
}
|
|
2994
2997
|
throw new Qe("intrinsic " + e + " does not exist!");
|
|
2995
|
-
},
|
|
2998
|
+
}, rt = function(e, r) {
|
|
2996
2999
|
if (typeof e != "string" || e.length === 0)
|
|
2997
3000
|
throw new qe("intrinsic name must be a non-empty string");
|
|
2998
3001
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
2999
3002
|
throw new qe('"allowMissing" argument must be a boolean');
|
|
3000
|
-
if (
|
|
3003
|
+
if (Ds(/^%?[^%]*%?$/, e) === null)
|
|
3001
3004
|
throw new Qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3002
|
-
var n =
|
|
3003
|
-
d && (i = d[0],
|
|
3005
|
+
var n = Vs(e), i = n.length > 0 ? n[0] : "", o = js("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
3006
|
+
d && (i = d[0], Ns(n, Fs([0, 1], d)));
|
|
3004
3007
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3005
|
-
var p = n[c], m =
|
|
3006
|
-
if ((m === '"' || m === "'" || m === "`" ||
|
|
3008
|
+
var p = n[c], m = vt(p, 0, 1), v = vt(p, -1);
|
|
3009
|
+
if ((m === '"' || m === "'" || m === "`" || v === '"' || v === "'" || v === "`") && m !== v)
|
|
3007
3010
|
throw new Qe("property names with quotes must have matching quotes");
|
|
3008
3011
|
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", mt(Le, s))
|
|
3009
3012
|
a = Le[s];
|
|
@@ -3014,62 +3017,51 @@ var us = function t(e) {
|
|
|
3014
3017
|
return;
|
|
3015
3018
|
}
|
|
3016
3019
|
if (Ce && c + 1 >= n.length) {
|
|
3017
|
-
var
|
|
3018
|
-
f = !!
|
|
3020
|
+
var I = Ce(a, p);
|
|
3021
|
+
f = !!I, f && "get" in I && !("originalValue" in I.get) ? a = I.get : a = a[p];
|
|
3019
3022
|
} else
|
|
3020
3023
|
f = mt(a, p), a = a[p];
|
|
3021
3024
|
f && !u && (Le[s] = a);
|
|
3022
3025
|
}
|
|
3023
3026
|
}
|
|
3024
3027
|
return a;
|
|
3025
|
-
},
|
|
3026
|
-
|
|
3028
|
+
}, Qn = { exports: {} }, Mt, en;
|
|
3029
|
+
function wr() {
|
|
3030
|
+
if (en)
|
|
3031
|
+
return Mt;
|
|
3032
|
+
en = 1;
|
|
3033
|
+
var t = rt, e = t("%Object.defineProperty%", !0) || !1;
|
|
3034
|
+
if (e)
|
|
3027
3035
|
try {
|
|
3028
|
-
|
|
3036
|
+
e({}, "a", { value: 1 });
|
|
3029
3037
|
} catch {
|
|
3030
|
-
|
|
3038
|
+
e = !1;
|
|
3031
3039
|
}
|
|
3032
|
-
return
|
|
3033
|
-
}
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
return null;
|
|
3037
|
-
try {
|
|
3038
|
-
return Jt([], "length", { value: 1 }).length !== 1;
|
|
3039
|
-
} catch {
|
|
3040
|
-
return !0;
|
|
3041
|
-
}
|
|
3042
|
-
};
|
|
3043
|
-
var Pn = Yt, ms = Ke, ft = ms("%Object.getOwnPropertyDescriptor%", !0);
|
|
3044
|
-
if (ft)
|
|
3045
|
-
try {
|
|
3046
|
-
ft([], "length");
|
|
3047
|
-
} catch {
|
|
3048
|
-
ft = null;
|
|
3049
|
-
}
|
|
3050
|
-
var hr = ft, bs = Pn(), pr = Ke, Xe = bs && pr("%Object.defineProperty%", !0);
|
|
3051
|
-
if (Xe)
|
|
3040
|
+
return Mt = e, Mt;
|
|
3041
|
+
}
|
|
3042
|
+
var Ms = rt, dt = Ms("%Object.getOwnPropertyDescriptor%", !0);
|
|
3043
|
+
if (dt)
|
|
3052
3044
|
try {
|
|
3053
|
-
|
|
3045
|
+
dt([], "length");
|
|
3054
3046
|
} catch {
|
|
3055
|
-
|
|
3047
|
+
dt = null;
|
|
3056
3048
|
}
|
|
3057
|
-
var
|
|
3049
|
+
var Ft = dt, tn = wr(), Us = Bn, $e = Pt, rn = Ft, xs = function(e, r, n) {
|
|
3058
3050
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3059
|
-
throw new
|
|
3051
|
+
throw new $e("`obj` must be an object or a function`");
|
|
3060
3052
|
if (typeof r != "string" && typeof r != "symbol")
|
|
3061
|
-
throw new
|
|
3053
|
+
throw new $e("`property` must be a string or a symbol`");
|
|
3062
3054
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
|
|
3063
|
-
throw new
|
|
3055
|
+
throw new $e("`nonEnumerable`, if provided, must be a boolean or null");
|
|
3064
3056
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
|
|
3065
|
-
throw new
|
|
3057
|
+
throw new $e("`nonWritable`, if provided, must be a boolean or null");
|
|
3066
3058
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
|
|
3067
|
-
throw new
|
|
3059
|
+
throw new $e("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3068
3060
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3069
|
-
throw new
|
|
3070
|
-
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!
|
|
3071
|
-
if (
|
|
3072
|
-
|
|
3061
|
+
throw new $e("`loose`, if provided, must be a boolean");
|
|
3062
|
+
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!rn && rn(e, r);
|
|
3063
|
+
if (tn)
|
|
3064
|
+
tn(e, r, {
|
|
3073
3065
|
configurable: s === null && u ? u.configurable : !s,
|
|
3074
3066
|
enumerable: i === null && u ? u.enumerable : !i,
|
|
3075
3067
|
value: n,
|
|
@@ -3078,25 +3070,37 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
|
|
|
3078
3070
|
else if (a || !i && !o && !s)
|
|
3079
3071
|
e[r] = n;
|
|
3080
3072
|
else
|
|
3081
|
-
throw new
|
|
3082
|
-
},
|
|
3073
|
+
throw new Us("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3074
|
+
}, ir = wr(), Gn = function() {
|
|
3075
|
+
return !!ir;
|
|
3076
|
+
};
|
|
3077
|
+
Gn.hasArrayLengthDefineBug = function() {
|
|
3078
|
+
if (!ir)
|
|
3079
|
+
return null;
|
|
3080
|
+
try {
|
|
3081
|
+
return ir([], "length", { value: 1 }).length !== 1;
|
|
3082
|
+
} catch {
|
|
3083
|
+
return !0;
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
var Bs = Gn, qs = rt, nn = xs, Qs = Bs(), on = Ft, sn = Pt, Gs = qs("%Math.floor%"), Ks = function(e, r) {
|
|
3083
3087
|
if (typeof e != "function")
|
|
3084
|
-
throw new
|
|
3085
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3086
|
-
throw new
|
|
3088
|
+
throw new sn("`fn` is not a function");
|
|
3089
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || Gs(r) !== r)
|
|
3090
|
+
throw new sn("`length` must be a positive 32-bit integer");
|
|
3087
3091
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3088
|
-
if ("length" in e &&
|
|
3089
|
-
var s =
|
|
3092
|
+
if ("length" in e && on) {
|
|
3093
|
+
var s = on(e, "length");
|
|
3090
3094
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3091
3095
|
}
|
|
3092
|
-
return (i || o || !n) && (
|
|
3096
|
+
return (i || o || !n) && (Qs ? nn(
|
|
3093
3097
|
/** @type {Parameters<define>[0]} */
|
|
3094
3098
|
e,
|
|
3095
3099
|
"length",
|
|
3096
3100
|
r,
|
|
3097
3101
|
!0,
|
|
3098
3102
|
!0
|
|
3099
|
-
) :
|
|
3103
|
+
) : nn(
|
|
3100
3104
|
/** @type {Parameters<define>[0]} */
|
|
3101
3105
|
e,
|
|
3102
3106
|
"length",
|
|
@@ -3104,13 +3108,7 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
|
|
|
3104
3108
|
)), e;
|
|
3105
3109
|
};
|
|
3106
3110
|
(function(t) {
|
|
3107
|
-
var e =
|
|
3108
|
-
if (u)
|
|
3109
|
-
try {
|
|
3110
|
-
u({}, "a", { value: 1 });
|
|
3111
|
-
} catch {
|
|
3112
|
-
u = null;
|
|
3113
|
-
}
|
|
3111
|
+
var e = Sr, r = rt, n = Ks, i = Pt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = wr(), d = r("%Math.max%");
|
|
3114
3112
|
t.exports = function(p) {
|
|
3115
3113
|
if (typeof p != "function")
|
|
3116
3114
|
throw new i("a function is required");
|
|
@@ -3125,188 +3123,248 @@ var vs = pr("%SyntaxError%"), Ve = pr("%TypeError%"), Qr = hr, Ss = function(e,
|
|
|
3125
3123
|
return a(e, o, arguments);
|
|
3126
3124
|
};
|
|
3127
3125
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3128
|
-
})(
|
|
3129
|
-
var
|
|
3130
|
-
var n =
|
|
3131
|
-
return typeof n == "function" &&
|
|
3132
|
-
},
|
|
3133
|
-
return
|
|
3134
|
-
},
|
|
3135
|
-
return
|
|
3136
|
-
},
|
|
3137
|
-
return
|
|
3126
|
+
})(Qn);
|
|
3127
|
+
var Ar = Qn.exports, Kn = rt, zn = Ar, zs = zn(Kn("String.prototype.indexOf")), Er = function(e, r) {
|
|
3128
|
+
var n = Kn(e, !!r);
|
|
3129
|
+
return typeof n == "function" && zs(e, ".prototype.") > -1 ? zn(n) : n;
|
|
3130
|
+
}, Hs = kt(), Ws = Er, or = Ws("Object.prototype.toString"), Nt = function(e) {
|
|
3131
|
+
return Hs && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : or(e) === "[object Arguments]";
|
|
3132
|
+
}, Hn = function(e) {
|
|
3133
|
+
return Nt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && or(e) !== "[object Array]" && or(e.callee) === "[object Function]";
|
|
3134
|
+
}, Js = function() {
|
|
3135
|
+
return Nt(arguments);
|
|
3138
3136
|
}();
|
|
3139
|
-
|
|
3140
|
-
var
|
|
3141
|
-
if (!
|
|
3137
|
+
Nt.isLegacyArguments = Hn;
|
|
3138
|
+
var Ys = Js ? Nt : Hn, Xs = Object.prototype.toString, Zs = Function.prototype.toString, ea = /^\s*(?:function)?\*/, Wn = kt(), Ut = Object.getPrototypeOf, ta = function() {
|
|
3139
|
+
if (!Wn)
|
|
3142
3140
|
return !1;
|
|
3143
3141
|
try {
|
|
3144
3142
|
return Function("return function*() {}")();
|
|
3145
3143
|
} catch {
|
|
3146
3144
|
}
|
|
3147
|
-
},
|
|
3145
|
+
}, xt, ra = function(e) {
|
|
3148
3146
|
if (typeof e != "function")
|
|
3149
3147
|
return !1;
|
|
3150
|
-
if (
|
|
3148
|
+
if (ea.test(Zs.call(e)))
|
|
3151
3149
|
return !0;
|
|
3152
|
-
if (!
|
|
3153
|
-
var r =
|
|
3150
|
+
if (!Wn) {
|
|
3151
|
+
var r = Xs.call(e);
|
|
3154
3152
|
return r === "[object GeneratorFunction]";
|
|
3155
3153
|
}
|
|
3156
|
-
if (!
|
|
3154
|
+
if (!Ut)
|
|
3157
3155
|
return !1;
|
|
3158
|
-
if (typeof
|
|
3159
|
-
var n =
|
|
3160
|
-
|
|
3156
|
+
if (typeof xt > "u") {
|
|
3157
|
+
var n = ta();
|
|
3158
|
+
xt = n ? Ut(n) : !1;
|
|
3161
3159
|
}
|
|
3162
|
-
return
|
|
3163
|
-
},
|
|
3160
|
+
return Ut(e) === xt;
|
|
3161
|
+
}, Jn = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, sr, ft;
|
|
3164
3162
|
if (typeof Ue == "function" && typeof Object.defineProperty == "function")
|
|
3165
3163
|
try {
|
|
3166
|
-
|
|
3164
|
+
sr = Object.defineProperty({}, "length", {
|
|
3167
3165
|
get: function() {
|
|
3168
|
-
throw
|
|
3166
|
+
throw ft;
|
|
3169
3167
|
}
|
|
3170
|
-
}),
|
|
3168
|
+
}), ft = {}, Ue(function() {
|
|
3171
3169
|
throw 42;
|
|
3172
|
-
}, null,
|
|
3170
|
+
}, null, sr);
|
|
3173
3171
|
} catch (t) {
|
|
3174
|
-
t !==
|
|
3172
|
+
t !== ft && (Ue = null);
|
|
3175
3173
|
}
|
|
3176
3174
|
else
|
|
3177
3175
|
Ue = null;
|
|
3178
|
-
var
|
|
3176
|
+
var na = /^\s*class\b/, ar = function(e) {
|
|
3179
3177
|
try {
|
|
3180
|
-
var r =
|
|
3181
|
-
return
|
|
3178
|
+
var r = Jn.call(e);
|
|
3179
|
+
return na.test(r);
|
|
3182
3180
|
} catch {
|
|
3183
3181
|
return !1;
|
|
3184
3182
|
}
|
|
3185
|
-
},
|
|
3183
|
+
}, Bt = function(e) {
|
|
3186
3184
|
try {
|
|
3187
|
-
return
|
|
3185
|
+
return ar(e) ? !1 : (Jn.call(e), !0);
|
|
3188
3186
|
} catch {
|
|
3189
3187
|
return !1;
|
|
3190
3188
|
}
|
|
3191
|
-
},
|
|
3189
|
+
}, ht = Object.prototype.toString, ia = "[object Object]", oa = "[object Function]", sa = "[object GeneratorFunction]", aa = "[object HTMLAllCollection]", ua = "[object HTML document.all class]", ca = "[object HTMLCollection]", la = typeof Symbol == "function" && !!Symbol.toStringTag, da = !(0 in [,]), ur = function() {
|
|
3192
3190
|
return !1;
|
|
3193
3191
|
};
|
|
3194
3192
|
if (typeof document == "object") {
|
|
3195
|
-
var
|
|
3196
|
-
|
|
3197
|
-
if ((
|
|
3193
|
+
var fa = document.all;
|
|
3194
|
+
ht.call(fa) === ht.call(document.all) && (ur = function(e) {
|
|
3195
|
+
if ((da || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3198
3196
|
try {
|
|
3199
|
-
var r =
|
|
3200
|
-
return (r ===
|
|
3197
|
+
var r = ht.call(e);
|
|
3198
|
+
return (r === aa || r === ua || r === ca || r === ia) && e("") == null;
|
|
3201
3199
|
} catch {
|
|
3202
3200
|
}
|
|
3203
3201
|
return !1;
|
|
3204
3202
|
});
|
|
3205
3203
|
}
|
|
3206
|
-
var
|
|
3207
|
-
if (
|
|
3204
|
+
var ha = Ue ? function(e) {
|
|
3205
|
+
if (ur(e))
|
|
3208
3206
|
return !0;
|
|
3209
3207
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3210
3208
|
return !1;
|
|
3211
3209
|
try {
|
|
3212
|
-
Ue(e, null,
|
|
3210
|
+
Ue(e, null, sr);
|
|
3213
3211
|
} catch (r) {
|
|
3214
|
-
if (r !==
|
|
3212
|
+
if (r !== ft)
|
|
3215
3213
|
return !1;
|
|
3216
3214
|
}
|
|
3217
|
-
return !
|
|
3215
|
+
return !ar(e) && Bt(e);
|
|
3218
3216
|
} : function(e) {
|
|
3219
|
-
if (
|
|
3217
|
+
if (ur(e))
|
|
3220
3218
|
return !0;
|
|
3221
3219
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3222
3220
|
return !1;
|
|
3223
|
-
if (
|
|
3224
|
-
return
|
|
3225
|
-
if (
|
|
3221
|
+
if (la)
|
|
3222
|
+
return Bt(e);
|
|
3223
|
+
if (ar(e))
|
|
3226
3224
|
return !1;
|
|
3227
|
-
var r =
|
|
3228
|
-
return r !==
|
|
3229
|
-
},
|
|
3225
|
+
var r = ht.call(e);
|
|
3226
|
+
return r !== oa && r !== sa && !/^\[object HTML/.test(r) ? !1 : Bt(e);
|
|
3227
|
+
}, pa = ha, ya = Object.prototype.toString, Yn = Object.prototype.hasOwnProperty, ga = function(e, r, n) {
|
|
3230
3228
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3231
|
-
|
|
3232
|
-
},
|
|
3229
|
+
Yn.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3230
|
+
}, ma = function(e, r, n) {
|
|
3233
3231
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3234
3232
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3235
|
-
},
|
|
3233
|
+
}, va = function(e, r, n) {
|
|
3236
3234
|
for (var i in e)
|
|
3237
|
-
|
|
3238
|
-
},
|
|
3239
|
-
if (!
|
|
3235
|
+
Yn.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3236
|
+
}, ba = function(e, r, n) {
|
|
3237
|
+
if (!pa(r))
|
|
3240
3238
|
throw new TypeError("iterator must be a function");
|
|
3241
3239
|
var i;
|
|
3242
|
-
arguments.length >= 3 && (i = n),
|
|
3243
|
-
},
|
|
3244
|
-
"BigInt64Array",
|
|
3245
|
-
"BigUint64Array",
|
|
3240
|
+
arguments.length >= 3 && (i = n), ya.call(e) === "[object Array]" ? ga(e, r, i) : typeof e == "string" ? ma(e, r, i) : va(e, r, i);
|
|
3241
|
+
}, Xn = ba, Sa = [
|
|
3246
3242
|
"Float32Array",
|
|
3247
3243
|
"Float64Array",
|
|
3244
|
+
"Int8Array",
|
|
3248
3245
|
"Int16Array",
|
|
3249
3246
|
"Int32Array",
|
|
3250
|
-
"
|
|
3247
|
+
"Uint8Array",
|
|
3248
|
+
"Uint8ClampedArray",
|
|
3251
3249
|
"Uint16Array",
|
|
3252
3250
|
"Uint32Array",
|
|
3253
|
-
"
|
|
3254
|
-
"
|
|
3255
|
-
],
|
|
3256
|
-
for (var e = [], r = 0; r <
|
|
3257
|
-
typeof
|
|
3251
|
+
"BigInt64Array",
|
|
3252
|
+
"BigUint64Array"
|
|
3253
|
+
], qt = Sa, wa = typeof globalThis > "u" ? gr : globalThis, Zn = function() {
|
|
3254
|
+
for (var e = [], r = 0; r < qt.length; r++)
|
|
3255
|
+
typeof wa[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3258
3256
|
return e;
|
|
3259
|
-
},
|
|
3257
|
+
}, bt = Xn, Aa = Zn, an = Ar, Ir = Er, pt = Ft, Ea = Ir("Object.prototype.toString"), ei = kt(), un = typeof globalThis > "u" ? gr : globalThis, cr = Aa(), Tr = Ir("String.prototype.slice"), Qt = Object.getPrototypeOf, Ia = Ir("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3260
3258
|
for (var n = 0; n < e.length; n += 1)
|
|
3261
3259
|
if (e[n] === r)
|
|
3262
3260
|
return n;
|
|
3263
3261
|
return -1;
|
|
3264
3262
|
}, St = { __proto__: null };
|
|
3265
|
-
|
|
3266
|
-
var e = new
|
|
3263
|
+
ei && pt && Qt ? bt(cr, function(t) {
|
|
3264
|
+
var e = new un[t]();
|
|
3267
3265
|
if (Symbol.toStringTag in e) {
|
|
3268
|
-
var r =
|
|
3266
|
+
var r = Qt(e), n = pt(r, Symbol.toStringTag);
|
|
3269
3267
|
if (!n) {
|
|
3270
|
-
var i =
|
|
3271
|
-
n =
|
|
3268
|
+
var i = Qt(r);
|
|
3269
|
+
n = pt(i, Symbol.toStringTag);
|
|
3272
3270
|
}
|
|
3273
|
-
St["$" + t] =
|
|
3271
|
+
St["$" + t] = an(n.get);
|
|
3274
3272
|
}
|
|
3275
|
-
}) :
|
|
3276
|
-
var e = new
|
|
3277
|
-
r && (St["$" + t] =
|
|
3273
|
+
}) : bt(cr, function(t) {
|
|
3274
|
+
var e = new un[t](), r = e.slice || e.set;
|
|
3275
|
+
r && (St["$" + t] = an(r));
|
|
3278
3276
|
});
|
|
3279
|
-
var
|
|
3277
|
+
var Ta = function(e) {
|
|
3280
3278
|
var r = !1;
|
|
3281
|
-
return
|
|
3279
|
+
return bt(St, function(n, i) {
|
|
3282
3280
|
if (!r)
|
|
3283
3281
|
try {
|
|
3284
|
-
"$" + n(e) === i && (r =
|
|
3282
|
+
"$" + n(e) === i && (r = Tr(i, 1));
|
|
3285
3283
|
} catch {
|
|
3286
3284
|
}
|
|
3287
3285
|
}), r;
|
|
3288
|
-
},
|
|
3286
|
+
}, Oa = function(e) {
|
|
3289
3287
|
var r = !1;
|
|
3290
|
-
return
|
|
3288
|
+
return bt(St, function(n, i) {
|
|
3291
3289
|
if (!r)
|
|
3292
3290
|
try {
|
|
3293
|
-
n(e), r =
|
|
3291
|
+
n(e), r = Tr(i, 1);
|
|
3294
3292
|
} catch {
|
|
3295
3293
|
}
|
|
3296
3294
|
}), r;
|
|
3297
|
-
},
|
|
3295
|
+
}, Ca = function(e) {
|
|
3296
|
+
if (!e || typeof e != "object")
|
|
3297
|
+
return !1;
|
|
3298
|
+
if (!ei) {
|
|
3299
|
+
var r = Tr(Ea(e), 8, -1);
|
|
3300
|
+
return Ia(cr, r) > -1 ? r : r !== "Object" ? !1 : Oa(e);
|
|
3301
|
+
}
|
|
3302
|
+
return pt ? Ta(e) : null;
|
|
3303
|
+
}, wt = Xn, La = Zn, cn = Ar, Or = Er, yt = Ft, _a = Or("Object.prototype.toString"), ti = kt(), ln = typeof globalThis > "u" ? gr : globalThis, lr = La(), Cr = Or("String.prototype.slice"), Gt = Object.getPrototypeOf, ka = Or("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3304
|
+
for (var n = 0; n < e.length; n += 1)
|
|
3305
|
+
if (e[n] === r)
|
|
3306
|
+
return n;
|
|
3307
|
+
return -1;
|
|
3308
|
+
}, At = { __proto__: null };
|
|
3309
|
+
ti && yt && Gt ? wt(lr, function(t) {
|
|
3310
|
+
var e = new ln[t]();
|
|
3311
|
+
if (Symbol.toStringTag in e) {
|
|
3312
|
+
var r = Gt(e), n = yt(r, Symbol.toStringTag);
|
|
3313
|
+
if (!n) {
|
|
3314
|
+
var i = Gt(r);
|
|
3315
|
+
n = yt(i, Symbol.toStringTag);
|
|
3316
|
+
}
|
|
3317
|
+
At["$" + t] = cn(n.get);
|
|
3318
|
+
}
|
|
3319
|
+
}) : wt(lr, function(t) {
|
|
3320
|
+
var e = new ln[t](), r = e.slice || e.set;
|
|
3321
|
+
r && (At["$" + t] = cn(r));
|
|
3322
|
+
});
|
|
3323
|
+
var Pa = function(e) {
|
|
3324
|
+
var r = !1;
|
|
3325
|
+
return wt(
|
|
3326
|
+
// eslint-disable-next-line no-extra-parens
|
|
3327
|
+
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3328
|
+
/** @type {any} */
|
|
3329
|
+
At,
|
|
3330
|
+
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3331
|
+
function(n, i) {
|
|
3332
|
+
if (!r)
|
|
3333
|
+
try {
|
|
3334
|
+
"$" + n(e) === i && (r = Cr(i, 1));
|
|
3335
|
+
} catch {
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
), r;
|
|
3339
|
+
}, Fa = function(e) {
|
|
3340
|
+
var r = !1;
|
|
3341
|
+
return wt(
|
|
3342
|
+
// eslint-disable-next-line no-extra-parens
|
|
3343
|
+
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3344
|
+
/** @type {any} */
|
|
3345
|
+
At,
|
|
3346
|
+
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3347
|
+
function(n, i) {
|
|
3348
|
+
if (!r)
|
|
3349
|
+
try {
|
|
3350
|
+
n(e), r = Cr(i, 1);
|
|
3351
|
+
} catch {
|
|
3352
|
+
}
|
|
3353
|
+
}
|
|
3354
|
+
), r;
|
|
3355
|
+
}, Na = function(e) {
|
|
3298
3356
|
if (!e || typeof e != "object")
|
|
3299
3357
|
return !1;
|
|
3300
|
-
if (!
|
|
3301
|
-
var r =
|
|
3302
|
-
return
|
|
3358
|
+
if (!ti) {
|
|
3359
|
+
var r = Cr(_a(e), 8, -1);
|
|
3360
|
+
return ka(lr, r) > -1 ? r : r !== "Object" ? !1 : Fa(e);
|
|
3303
3361
|
}
|
|
3304
|
-
return yt ?
|
|
3305
|
-
},
|
|
3306
|
-
return !!
|
|
3362
|
+
return yt ? Pa(e) : null;
|
|
3363
|
+
}, Da = Na, Ra = function(e) {
|
|
3364
|
+
return !!Da(e);
|
|
3307
3365
|
};
|
|
3308
3366
|
(function(t) {
|
|
3309
|
-
var e =
|
|
3367
|
+
var e = Ys, r = ra, n = Ca, i = Ra;
|
|
3310
3368
|
function o(y) {
|
|
3311
3369
|
return y.call.bind(y);
|
|
3312
3370
|
}
|
|
@@ -3315,32 +3373,32 @@ var na = function(e) {
|
|
|
3315
3373
|
var p = o(BigInt.prototype.valueOf);
|
|
3316
3374
|
if (a)
|
|
3317
3375
|
var m = o(Symbol.prototype.valueOf);
|
|
3318
|
-
function
|
|
3376
|
+
function v(y, ui) {
|
|
3319
3377
|
if (typeof y != "object")
|
|
3320
3378
|
return !1;
|
|
3321
3379
|
try {
|
|
3322
|
-
return
|
|
3380
|
+
return ui(y), !0;
|
|
3323
3381
|
} catch {
|
|
3324
3382
|
return !1;
|
|
3325
3383
|
}
|
|
3326
3384
|
}
|
|
3327
3385
|
t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
|
|
3328
|
-
function
|
|
3386
|
+
function I(y) {
|
|
3329
3387
|
return typeof Promise < "u" && y instanceof Promise || y !== null && typeof y == "object" && typeof y.then == "function" && typeof y.catch == "function";
|
|
3330
3388
|
}
|
|
3331
|
-
t.isPromise =
|
|
3332
|
-
function
|
|
3389
|
+
t.isPromise = I;
|
|
3390
|
+
function b(y) {
|
|
3333
3391
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
|
|
3334
3392
|
}
|
|
3335
|
-
t.isArrayBufferView =
|
|
3336
|
-
function
|
|
3393
|
+
t.isArrayBufferView = b;
|
|
3394
|
+
function _(y) {
|
|
3337
3395
|
return n(y) === "Uint8Array";
|
|
3338
3396
|
}
|
|
3339
|
-
t.isUint8Array =
|
|
3340
|
-
function
|
|
3397
|
+
t.isUint8Array = _;
|
|
3398
|
+
function $(y) {
|
|
3341
3399
|
return n(y) === "Uint8ClampedArray";
|
|
3342
3400
|
}
|
|
3343
|
-
t.isUint8ClampedArray =
|
|
3401
|
+
t.isUint8ClampedArray = $;
|
|
3344
3402
|
function q(y) {
|
|
3345
3403
|
return n(y) === "Uint16Array";
|
|
3346
3404
|
}
|
|
@@ -3349,18 +3407,18 @@ var na = function(e) {
|
|
|
3349
3407
|
return n(y) === "Uint32Array";
|
|
3350
3408
|
}
|
|
3351
3409
|
t.isUint32Array = J;
|
|
3352
|
-
function
|
|
3410
|
+
function k(y) {
|
|
3353
3411
|
return n(y) === "Int8Array";
|
|
3354
3412
|
}
|
|
3355
|
-
t.isInt8Array =
|
|
3413
|
+
t.isInt8Array = k;
|
|
3356
3414
|
function R(y) {
|
|
3357
3415
|
return n(y) === "Int16Array";
|
|
3358
3416
|
}
|
|
3359
3417
|
t.isInt16Array = R;
|
|
3360
|
-
function
|
|
3418
|
+
function T(y) {
|
|
3361
3419
|
return n(y) === "Int32Array";
|
|
3362
3420
|
}
|
|
3363
|
-
t.isInt32Array =
|
|
3421
|
+
t.isInt32Array = T;
|
|
3364
3422
|
function X(y) {
|
|
3365
3423
|
return n(y) === "Float32Array";
|
|
3366
3424
|
}
|
|
@@ -3381,26 +3439,26 @@ var na = function(e) {
|
|
|
3381
3439
|
return u(y) === "[object Map]";
|
|
3382
3440
|
}
|
|
3383
3441
|
oe.working = typeof Map < "u" && oe(/* @__PURE__ */ new Map());
|
|
3384
|
-
function
|
|
3442
|
+
function Dt(y) {
|
|
3385
3443
|
return typeof Map > "u" ? !1 : oe.working ? oe(y) : y instanceof Map;
|
|
3386
3444
|
}
|
|
3387
|
-
t.isMap =
|
|
3445
|
+
t.isMap = Dt;
|
|
3388
3446
|
function me(y) {
|
|
3389
3447
|
return u(y) === "[object Set]";
|
|
3390
3448
|
}
|
|
3391
3449
|
me.working = typeof Set < "u" && me(/* @__PURE__ */ new Set());
|
|
3392
|
-
function
|
|
3450
|
+
function ze(y) {
|
|
3393
3451
|
return typeof Set > "u" ? !1 : me.working ? me(y) : y instanceof Set;
|
|
3394
3452
|
}
|
|
3395
|
-
t.isSet =
|
|
3453
|
+
t.isSet = ze;
|
|
3396
3454
|
function ke(y) {
|
|
3397
3455
|
return u(y) === "[object WeakMap]";
|
|
3398
3456
|
}
|
|
3399
3457
|
ke.working = typeof WeakMap < "u" && ke(/* @__PURE__ */ new WeakMap());
|
|
3400
|
-
function
|
|
3458
|
+
function Rt(y) {
|
|
3401
3459
|
return typeof WeakMap > "u" ? !1 : ke.working ? ke(y) : y instanceof WeakMap;
|
|
3402
3460
|
}
|
|
3403
|
-
t.isWeakMap =
|
|
3461
|
+
t.isWeakMap = Rt;
|
|
3404
3462
|
function Pe(y) {
|
|
3405
3463
|
return u(y) === "[object WeakSet]";
|
|
3406
3464
|
}
|
|
@@ -3413,10 +3471,10 @@ var na = function(e) {
|
|
|
3413
3471
|
return u(y) === "[object ArrayBuffer]";
|
|
3414
3472
|
}
|
|
3415
3473
|
Fe.working = typeof ArrayBuffer < "u" && Fe(new ArrayBuffer());
|
|
3416
|
-
function
|
|
3474
|
+
function nt(y) {
|
|
3417
3475
|
return typeof ArrayBuffer > "u" ? !1 : Fe.working ? Fe(y) : y instanceof ArrayBuffer;
|
|
3418
3476
|
}
|
|
3419
|
-
t.isArrayBuffer =
|
|
3477
|
+
t.isArrayBuffer = nt;
|
|
3420
3478
|
function l(y) {
|
|
3421
3479
|
return u(y) === "[object DataView]";
|
|
3422
3480
|
}
|
|
@@ -3426,61 +3484,61 @@ var na = function(e) {
|
|
|
3426
3484
|
}
|
|
3427
3485
|
t.isDataView = h;
|
|
3428
3486
|
var g = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3429
|
-
function
|
|
3487
|
+
function S(y) {
|
|
3430
3488
|
return u(y) === "[object SharedArrayBuffer]";
|
|
3431
3489
|
}
|
|
3432
3490
|
function C(y) {
|
|
3433
|
-
return typeof g > "u" ? !1 : (typeof
|
|
3491
|
+
return typeof g > "u" ? !1 : (typeof S.working > "u" && (S.working = S(new g())), S.working ? S(y) : y instanceof g);
|
|
3434
3492
|
}
|
|
3435
3493
|
t.isSharedArrayBuffer = C;
|
|
3436
3494
|
function L(y) {
|
|
3437
3495
|
return u(y) === "[object AsyncFunction]";
|
|
3438
3496
|
}
|
|
3439
3497
|
t.isAsyncFunction = L;
|
|
3440
|
-
function
|
|
3498
|
+
function A(y) {
|
|
3441
3499
|
return u(y) === "[object Map Iterator]";
|
|
3442
3500
|
}
|
|
3443
|
-
t.isMapIterator =
|
|
3501
|
+
t.isMapIterator = A;
|
|
3444
3502
|
function O(y) {
|
|
3445
3503
|
return u(y) === "[object Set Iterator]";
|
|
3446
3504
|
}
|
|
3447
3505
|
t.isSetIterator = O;
|
|
3448
|
-
function
|
|
3506
|
+
function F(y) {
|
|
3449
3507
|
return u(y) === "[object Generator]";
|
|
3450
3508
|
}
|
|
3451
|
-
t.isGeneratorObject =
|
|
3509
|
+
t.isGeneratorObject = F;
|
|
3452
3510
|
function G(y) {
|
|
3453
3511
|
return u(y) === "[object WebAssembly.Module]";
|
|
3454
3512
|
}
|
|
3455
3513
|
t.isWebAssemblyCompiledModule = G;
|
|
3456
3514
|
function Ae(y) {
|
|
3457
|
-
return
|
|
3515
|
+
return v(y, d);
|
|
3458
3516
|
}
|
|
3459
3517
|
t.isNumberObject = Ae;
|
|
3460
|
-
function
|
|
3461
|
-
return
|
|
3518
|
+
function it(y) {
|
|
3519
|
+
return v(y, c);
|
|
3462
3520
|
}
|
|
3463
|
-
t.isStringObject =
|
|
3521
|
+
t.isStringObject = it;
|
|
3464
3522
|
function Ne(y) {
|
|
3465
|
-
return
|
|
3523
|
+
return v(y, f);
|
|
3466
3524
|
}
|
|
3467
3525
|
t.isBooleanObject = Ne;
|
|
3468
|
-
function
|
|
3469
|
-
return s &&
|
|
3526
|
+
function ot(y) {
|
|
3527
|
+
return s && v(y, p);
|
|
3470
3528
|
}
|
|
3471
|
-
t.isBigIntObject =
|
|
3472
|
-
function
|
|
3473
|
-
return a &&
|
|
3529
|
+
t.isBigIntObject = ot;
|
|
3530
|
+
function kr(y) {
|
|
3531
|
+
return a && v(y, m);
|
|
3474
3532
|
}
|
|
3475
|
-
t.isSymbolObject =
|
|
3476
|
-
function
|
|
3477
|
-
return Ae(y) ||
|
|
3533
|
+
t.isSymbolObject = kr;
|
|
3534
|
+
function si(y) {
|
|
3535
|
+
return Ae(y) || it(y) || Ne(y) || ot(y) || kr(y);
|
|
3478
3536
|
}
|
|
3479
|
-
t.isBoxedPrimitive =
|
|
3480
|
-
function
|
|
3481
|
-
return typeof Uint8Array < "u" && (
|
|
3537
|
+
t.isBoxedPrimitive = si;
|
|
3538
|
+
function ai(y) {
|
|
3539
|
+
return typeof Uint8Array < "u" && (nt(y) || C(y));
|
|
3482
3540
|
}
|
|
3483
|
-
t.isAnyArrayBuffer =
|
|
3541
|
+
t.isAnyArrayBuffer = ai, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
3484
3542
|
Object.defineProperty(t, y, {
|
|
3485
3543
|
enumerable: !1,
|
|
3486
3544
|
value: function() {
|
|
@@ -3488,11 +3546,11 @@ var na = function(e) {
|
|
|
3488
3546
|
}
|
|
3489
3547
|
});
|
|
3490
3548
|
});
|
|
3491
|
-
})(
|
|
3492
|
-
var
|
|
3549
|
+
})(Un);
|
|
3550
|
+
var $a = function(e) {
|
|
3493
3551
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3494
|
-
},
|
|
3495
|
-
typeof Object.create == "function" ?
|
|
3552
|
+
}, dr = { exports: {} };
|
|
3553
|
+
typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
3496
3554
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
3497
3555
|
constructor: {
|
|
3498
3556
|
value: e,
|
|
@@ -3501,7 +3559,7 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
|
|
|
3501
3559
|
configurable: !0
|
|
3502
3560
|
}
|
|
3503
3561
|
}));
|
|
3504
|
-
} :
|
|
3562
|
+
} : dr.exports = function(e, r) {
|
|
3505
3563
|
if (r) {
|
|
3506
3564
|
e.super_ = r;
|
|
3507
3565
|
var n = function() {
|
|
@@ -3509,68 +3567,68 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
|
|
|
3509
3567
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3510
3568
|
}
|
|
3511
3569
|
};
|
|
3512
|
-
var
|
|
3570
|
+
var Va = dr.exports;
|
|
3513
3571
|
(function(t) {
|
|
3514
3572
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
3515
|
-
for (var g = Object.keys(h),
|
|
3516
|
-
|
|
3517
|
-
return
|
|
3573
|
+
for (var g = Object.keys(h), S = {}, C = 0; C < g.length; C++)
|
|
3574
|
+
S[g[C]] = Object.getOwnPropertyDescriptor(h, g[C]);
|
|
3575
|
+
return S;
|
|
3518
3576
|
}, r = /%[sdj%]/g;
|
|
3519
3577
|
t.format = function(l) {
|
|
3520
|
-
if (!
|
|
3578
|
+
if (!k(l)) {
|
|
3521
3579
|
for (var h = [], g = 0; g < arguments.length; g++)
|
|
3522
3580
|
h.push(s(arguments[g]));
|
|
3523
3581
|
return h.join(" ");
|
|
3524
3582
|
}
|
|
3525
|
-
for (var g = 1,
|
|
3583
|
+
for (var g = 1, S = arguments, C = S.length, L = String(l).replace(r, function(O) {
|
|
3526
3584
|
if (O === "%%")
|
|
3527
3585
|
return "%";
|
|
3528
3586
|
if (g >= C)
|
|
3529
3587
|
return O;
|
|
3530
3588
|
switch (O) {
|
|
3531
3589
|
case "%s":
|
|
3532
|
-
return String(
|
|
3590
|
+
return String(S[g++]);
|
|
3533
3591
|
case "%d":
|
|
3534
|
-
return Number(
|
|
3592
|
+
return Number(S[g++]);
|
|
3535
3593
|
case "%j":
|
|
3536
3594
|
try {
|
|
3537
|
-
return JSON.stringify(
|
|
3595
|
+
return JSON.stringify(S[g++]);
|
|
3538
3596
|
} catch {
|
|
3539
3597
|
return "[Circular]";
|
|
3540
3598
|
}
|
|
3541
3599
|
default:
|
|
3542
3600
|
return O;
|
|
3543
3601
|
}
|
|
3544
|
-
}),
|
|
3545
|
-
|
|
3602
|
+
}), A = S[g]; g < C; A = S[++g])
|
|
3603
|
+
$(A) || !Z(A) ? L += " " + A : L += " " + s(A);
|
|
3546
3604
|
return L;
|
|
3547
3605
|
}, t.deprecate = function(l, h) {
|
|
3548
|
-
if (typeof
|
|
3606
|
+
if (typeof w < "u" && w.noDeprecation === !0)
|
|
3549
3607
|
return l;
|
|
3550
|
-
if (typeof
|
|
3608
|
+
if (typeof w > "u")
|
|
3551
3609
|
return function() {
|
|
3552
3610
|
return t.deprecate(l, h).apply(this, arguments);
|
|
3553
3611
|
};
|
|
3554
3612
|
var g = !1;
|
|
3555
|
-
function
|
|
3613
|
+
function S() {
|
|
3556
3614
|
if (!g) {
|
|
3557
|
-
if (
|
|
3615
|
+
if (w.throwDeprecation)
|
|
3558
3616
|
throw new Error(h);
|
|
3559
|
-
|
|
3617
|
+
w.traceDeprecation ? console.trace(h) : console.error(h), g = !0;
|
|
3560
3618
|
}
|
|
3561
3619
|
return l.apply(this, arguments);
|
|
3562
3620
|
}
|
|
3563
|
-
return
|
|
3621
|
+
return S;
|
|
3564
3622
|
};
|
|
3565
3623
|
var n = {}, i = /^$/;
|
|
3566
|
-
if (
|
|
3567
|
-
var o =
|
|
3624
|
+
if (w.env.NODE_DEBUG) {
|
|
3625
|
+
var o = w.env.NODE_DEBUG;
|
|
3568
3626
|
o = o.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = new RegExp("^" + o + "$", "i");
|
|
3569
3627
|
}
|
|
3570
3628
|
t.debuglog = function(l) {
|
|
3571
3629
|
if (l = l.toUpperCase(), !n[l])
|
|
3572
3630
|
if (i.test(l)) {
|
|
3573
|
-
var h =
|
|
3631
|
+
var h = w.pid;
|
|
3574
3632
|
n[l] = function() {
|
|
3575
3633
|
var g = t.format.apply(t, arguments);
|
|
3576
3634
|
console.error("%s %d: %s", l, h, g);
|
|
@@ -3585,7 +3643,7 @@ var ua = nr.exports;
|
|
|
3585
3643
|
seen: [],
|
|
3586
3644
|
stylize: u
|
|
3587
3645
|
};
|
|
3588
|
-
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]),
|
|
3646
|
+
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), _(h) ? g.showHidden = h : h && t._extend(g, h), T(g.showHidden) && (g.showHidden = !1), T(g.depth) && (g.depth = 2), T(g.colors) && (g.colors = !1), T(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = a), c(g, l, g.depth);
|
|
3589
3647
|
}
|
|
3590
3648
|
t.inspect = s, s.colors = {
|
|
3591
3649
|
bold: [1, 22],
|
|
@@ -3621,7 +3679,7 @@ var ua = nr.exports;
|
|
|
3621
3679
|
}
|
|
3622
3680
|
function d(l) {
|
|
3623
3681
|
var h = {};
|
|
3624
|
-
return l.forEach(function(g,
|
|
3682
|
+
return l.forEach(function(g, S) {
|
|
3625
3683
|
h[g] = !0;
|
|
3626
3684
|
}), h;
|
|
3627
3685
|
}
|
|
@@ -3629,13 +3687,13 @@ var ua = nr.exports;
|
|
|
3629
3687
|
if (l.customInspect && h && oe(h.inspect) && // Filter out the util module, it's inspect function is special
|
|
3630
3688
|
h.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3631
3689
|
!(h.constructor && h.constructor.prototype === h)) {
|
|
3632
|
-
var
|
|
3633
|
-
return
|
|
3690
|
+
var S = h.inspect(g, l);
|
|
3691
|
+
return k(S) || (S = c(l, S, g)), S;
|
|
3634
3692
|
}
|
|
3635
3693
|
var C = f(l, h);
|
|
3636
3694
|
if (C)
|
|
3637
3695
|
return C;
|
|
3638
|
-
var L = Object.keys(h),
|
|
3696
|
+
var L = Object.keys(h), A = d(L);
|
|
3639
3697
|
if (l.showHidden && (L = Object.getOwnPropertyNames(h)), we(h) && (L.indexOf("message") >= 0 || L.indexOf("description") >= 0))
|
|
3640
3698
|
return p(h);
|
|
3641
3699
|
if (L.length === 0) {
|
|
@@ -3650,62 +3708,62 @@ var ua = nr.exports;
|
|
|
3650
3708
|
if (we(h))
|
|
3651
3709
|
return p(h);
|
|
3652
3710
|
}
|
|
3653
|
-
var
|
|
3654
|
-
if (
|
|
3655
|
-
var
|
|
3656
|
-
|
|
3711
|
+
var F = "", G = !1, Ae = ["{", "}"];
|
|
3712
|
+
if (b(h) && (G = !0, Ae = ["[", "]"]), oe(h)) {
|
|
3713
|
+
var it = h.name ? ": " + h.name : "";
|
|
3714
|
+
F = " [Function" + it + "]";
|
|
3657
3715
|
}
|
|
3658
|
-
if (X(h) && (
|
|
3659
|
-
return Ae[0] +
|
|
3716
|
+
if (X(h) && (F = " " + RegExp.prototype.toString.call(h)), _e(h) && (F = " " + Date.prototype.toUTCString.call(h)), we(h) && (F = " " + p(h)), L.length === 0 && (!G || h.length == 0))
|
|
3717
|
+
return Ae[0] + F + Ae[1];
|
|
3660
3718
|
if (g < 0)
|
|
3661
3719
|
return X(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
3662
3720
|
l.seen.push(h);
|
|
3663
3721
|
var Ne;
|
|
3664
|
-
return G ? Ne = m(l, h, g,
|
|
3665
|
-
return
|
|
3666
|
-
}), l.seen.pop(),
|
|
3722
|
+
return G ? Ne = m(l, h, g, A, L) : Ne = L.map(function(ot) {
|
|
3723
|
+
return v(l, h, g, A, ot, G);
|
|
3724
|
+
}), l.seen.pop(), I(Ne, F, Ae);
|
|
3667
3725
|
}
|
|
3668
3726
|
function f(l, h) {
|
|
3669
|
-
if (
|
|
3727
|
+
if (T(h))
|
|
3670
3728
|
return l.stylize("undefined", "undefined");
|
|
3671
|
-
if (
|
|
3729
|
+
if (k(h)) {
|
|
3672
3730
|
var g = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3673
3731
|
return l.stylize(g, "string");
|
|
3674
3732
|
}
|
|
3675
3733
|
if (J(h))
|
|
3676
3734
|
return l.stylize("" + h, "number");
|
|
3677
|
-
if (
|
|
3735
|
+
if (_(h))
|
|
3678
3736
|
return l.stylize("" + h, "boolean");
|
|
3679
|
-
if (
|
|
3737
|
+
if ($(h))
|
|
3680
3738
|
return l.stylize("null", "null");
|
|
3681
3739
|
}
|
|
3682
3740
|
function p(l) {
|
|
3683
3741
|
return "[" + Error.prototype.toString.call(l) + "]";
|
|
3684
3742
|
}
|
|
3685
|
-
function m(l, h, g,
|
|
3686
|
-
for (var L = [],
|
|
3687
|
-
Pe(h, String(
|
|
3743
|
+
function m(l, h, g, S, C) {
|
|
3744
|
+
for (var L = [], A = 0, O = h.length; A < O; ++A)
|
|
3745
|
+
Pe(h, String(A)) ? L.push(v(
|
|
3688
3746
|
l,
|
|
3689
3747
|
h,
|
|
3690
3748
|
g,
|
|
3691
|
-
|
|
3692
|
-
String(
|
|
3749
|
+
S,
|
|
3750
|
+
String(A),
|
|
3693
3751
|
!0
|
|
3694
3752
|
)) : L.push("");
|
|
3695
|
-
return C.forEach(function(
|
|
3696
|
-
|
|
3753
|
+
return C.forEach(function(F) {
|
|
3754
|
+
F.match(/^\d+$/) || L.push(v(
|
|
3697
3755
|
l,
|
|
3698
3756
|
h,
|
|
3699
3757
|
g,
|
|
3700
|
-
|
|
3701
|
-
|
|
3758
|
+
S,
|
|
3759
|
+
F,
|
|
3702
3760
|
!0
|
|
3703
3761
|
));
|
|
3704
3762
|
}), L;
|
|
3705
3763
|
}
|
|
3706
|
-
function
|
|
3707
|
-
var
|
|
3708
|
-
if (
|
|
3764
|
+
function v(l, h, g, S, C, L) {
|
|
3765
|
+
var A, O, F;
|
|
3766
|
+
if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), Pe(S, C) || (A = "[" + C + "]"), O || (l.seen.indexOf(F.value) < 0 ? ($(g) ? O = c(l, F.value, null) : O = c(l, F.value, g - 1), O.indexOf(`
|
|
3709
3767
|
`) > -1 && (L ? O = O.split(`
|
|
3710
3768
|
`).map(function(G) {
|
|
3711
3769
|
return " " + G;
|
|
@@ -3715,35 +3773,35 @@ var ua = nr.exports;
|
|
|
3715
3773
|
`).map(function(G) {
|
|
3716
3774
|
return " " + G;
|
|
3717
3775
|
}).join(`
|
|
3718
|
-
`))) : O = l.stylize("[Circular]", "special")),
|
|
3776
|
+
`))) : O = l.stylize("[Circular]", "special")), T(A)) {
|
|
3719
3777
|
if (L && C.match(/^\d+$/))
|
|
3720
3778
|
return O;
|
|
3721
|
-
|
|
3779
|
+
A = JSON.stringify("" + C), A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (A = A.slice(1, -1), A = l.stylize(A, "name")) : (A = A.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), A = l.stylize(A, "string"));
|
|
3722
3780
|
}
|
|
3723
|
-
return
|
|
3781
|
+
return A + ": " + O;
|
|
3724
3782
|
}
|
|
3725
|
-
function
|
|
3726
|
-
var
|
|
3783
|
+
function I(l, h, g) {
|
|
3784
|
+
var S = l.reduce(function(C, L) {
|
|
3727
3785
|
return L.indexOf(`
|
|
3728
3786
|
`) >= 0, C + L.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3729
3787
|
}, 0);
|
|
3730
|
-
return
|
|
3788
|
+
return S > 60 ? g[0] + (h === "" ? "" : h + `
|
|
3731
3789
|
`) + " " + l.join(`,
|
|
3732
3790
|
`) + " " + g[1] : g[0] + h + " " + l.join(", ") + " " + g[1];
|
|
3733
3791
|
}
|
|
3734
|
-
t.types =
|
|
3735
|
-
function
|
|
3792
|
+
t.types = Un;
|
|
3793
|
+
function b(l) {
|
|
3736
3794
|
return Array.isArray(l);
|
|
3737
3795
|
}
|
|
3738
|
-
t.isArray =
|
|
3739
|
-
function
|
|
3796
|
+
t.isArray = b;
|
|
3797
|
+
function _(l) {
|
|
3740
3798
|
return typeof l == "boolean";
|
|
3741
3799
|
}
|
|
3742
|
-
t.isBoolean =
|
|
3743
|
-
function
|
|
3800
|
+
t.isBoolean = _;
|
|
3801
|
+
function $(l) {
|
|
3744
3802
|
return l === null;
|
|
3745
3803
|
}
|
|
3746
|
-
t.isNull =
|
|
3804
|
+
t.isNull = $;
|
|
3747
3805
|
function q(l) {
|
|
3748
3806
|
return l == null;
|
|
3749
3807
|
}
|
|
@@ -3752,18 +3810,18 @@ var ua = nr.exports;
|
|
|
3752
3810
|
return typeof l == "number";
|
|
3753
3811
|
}
|
|
3754
3812
|
t.isNumber = J;
|
|
3755
|
-
function
|
|
3813
|
+
function k(l) {
|
|
3756
3814
|
return typeof l == "string";
|
|
3757
3815
|
}
|
|
3758
|
-
t.isString =
|
|
3816
|
+
t.isString = k;
|
|
3759
3817
|
function R(l) {
|
|
3760
3818
|
return typeof l == "symbol";
|
|
3761
3819
|
}
|
|
3762
3820
|
t.isSymbol = R;
|
|
3763
|
-
function
|
|
3821
|
+
function T(l) {
|
|
3764
3822
|
return l === void 0;
|
|
3765
3823
|
}
|
|
3766
|
-
t.isUndefined =
|
|
3824
|
+
t.isUndefined = T;
|
|
3767
3825
|
function X(l) {
|
|
3768
3826
|
return Z(l) && me(l) === "[object RegExp]";
|
|
3769
3827
|
}
|
|
@@ -3784,15 +3842,15 @@ var ua = nr.exports;
|
|
|
3784
3842
|
return typeof l == "function";
|
|
3785
3843
|
}
|
|
3786
3844
|
t.isFunction = oe;
|
|
3787
|
-
function
|
|
3845
|
+
function Dt(l) {
|
|
3788
3846
|
return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
|
|
3789
3847
|
typeof l > "u";
|
|
3790
3848
|
}
|
|
3791
|
-
t.isPrimitive =
|
|
3849
|
+
t.isPrimitive = Dt, t.isBuffer = $a;
|
|
3792
3850
|
function me(l) {
|
|
3793
3851
|
return Object.prototype.toString.call(l);
|
|
3794
3852
|
}
|
|
3795
|
-
function
|
|
3853
|
+
function ze(l) {
|
|
3796
3854
|
return l < 10 ? "0" + l.toString(10) : l.toString(10);
|
|
3797
3855
|
}
|
|
3798
3856
|
var ke = [
|
|
@@ -3809,21 +3867,21 @@ var ua = nr.exports;
|
|
|
3809
3867
|
"Nov",
|
|
3810
3868
|
"Dec"
|
|
3811
3869
|
];
|
|
3812
|
-
function
|
|
3870
|
+
function Rt() {
|
|
3813
3871
|
var l = /* @__PURE__ */ new Date(), h = [
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3872
|
+
ze(l.getHours()),
|
|
3873
|
+
ze(l.getMinutes()),
|
|
3874
|
+
ze(l.getSeconds())
|
|
3817
3875
|
].join(":");
|
|
3818
3876
|
return [l.getDate(), ke[l.getMonth()], h].join(" ");
|
|
3819
3877
|
}
|
|
3820
3878
|
t.log = function() {
|
|
3821
|
-
console.log("%s - %s",
|
|
3822
|
-
}, t.inherits =
|
|
3879
|
+
console.log("%s - %s", Rt(), t.format.apply(t, arguments));
|
|
3880
|
+
}, t.inherits = Va, t._extend = function(l, h) {
|
|
3823
3881
|
if (!h || !Z(h))
|
|
3824
3882
|
return l;
|
|
3825
|
-
for (var g = Object.keys(h),
|
|
3826
|
-
l[g[
|
|
3883
|
+
for (var g = Object.keys(h), S = g.length; S--; )
|
|
3884
|
+
l[g[S]] = h[g[S]];
|
|
3827
3885
|
return l;
|
|
3828
3886
|
};
|
|
3829
3887
|
function Pe(l, h) {
|
|
@@ -3845,17 +3903,17 @@ var ua = nr.exports;
|
|
|
3845
3903
|
}), g;
|
|
3846
3904
|
}
|
|
3847
3905
|
function g() {
|
|
3848
|
-
for (var
|
|
3849
|
-
|
|
3850
|
-
}),
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3906
|
+
for (var S, C, L = new Promise(function(F, G) {
|
|
3907
|
+
S = F, C = G;
|
|
3908
|
+
}), A = [], O = 0; O < arguments.length; O++)
|
|
3909
|
+
A.push(arguments[O]);
|
|
3910
|
+
A.push(function(F, G) {
|
|
3911
|
+
F ? C(F) : S(G);
|
|
3854
3912
|
});
|
|
3855
3913
|
try {
|
|
3856
|
-
h.apply(this,
|
|
3857
|
-
} catch (
|
|
3858
|
-
C(
|
|
3914
|
+
h.apply(this, A);
|
|
3915
|
+
} catch (F) {
|
|
3916
|
+
C(F);
|
|
3859
3917
|
}
|
|
3860
3918
|
return L;
|
|
3861
3919
|
}
|
|
@@ -3876,24 +3934,24 @@ var ua = nr.exports;
|
|
|
3876
3934
|
}
|
|
3877
3935
|
return h(l);
|
|
3878
3936
|
}
|
|
3879
|
-
function
|
|
3937
|
+
function nt(l) {
|
|
3880
3938
|
if (typeof l != "function")
|
|
3881
3939
|
throw new TypeError('The "original" argument must be of type Function');
|
|
3882
3940
|
function h() {
|
|
3883
|
-
for (var g = [],
|
|
3884
|
-
g.push(arguments[
|
|
3941
|
+
for (var g = [], S = 0; S < arguments.length; S++)
|
|
3942
|
+
g.push(arguments[S]);
|
|
3885
3943
|
var C = g.pop();
|
|
3886
3944
|
if (typeof C != "function")
|
|
3887
3945
|
throw new TypeError("The last argument must be of type Function");
|
|
3888
|
-
var L = this,
|
|
3946
|
+
var L = this, A = function() {
|
|
3889
3947
|
return C.apply(L, arguments);
|
|
3890
3948
|
};
|
|
3891
3949
|
l.apply(this, g).then(
|
|
3892
3950
|
function(O) {
|
|
3893
|
-
|
|
3951
|
+
w.nextTick(A.bind(null, null, O));
|
|
3894
3952
|
},
|
|
3895
3953
|
function(O) {
|
|
3896
|
-
|
|
3954
|
+
w.nextTick(Fe.bind(null, O, A));
|
|
3897
3955
|
}
|
|
3898
3956
|
);
|
|
3899
3957
|
}
|
|
@@ -3902,10 +3960,10 @@ var ua = nr.exports;
|
|
|
3902
3960
|
e(l)
|
|
3903
3961
|
), h;
|
|
3904
3962
|
}
|
|
3905
|
-
t.callbackify =
|
|
3906
|
-
})(
|
|
3907
|
-
const { inherits:
|
|
3908
|
-
function
|
|
3963
|
+
t.callbackify = nt;
|
|
3964
|
+
})(_t);
|
|
3965
|
+
const { inherits: ja, format: Kt } = _t;
|
|
3966
|
+
function Ee(t, e, r = Error) {
|
|
3909
3967
|
if (!t)
|
|
3910
3968
|
throw new Error("Avvio error code must not be empty");
|
|
3911
3969
|
if (!e)
|
|
@@ -3913,39 +3971,39 @@ function Ie(t, e, r = Error) {
|
|
|
3913
3971
|
function n(i, o, s) {
|
|
3914
3972
|
if (!new.target)
|
|
3915
3973
|
return new n(i, o, s);
|
|
3916
|
-
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message =
|
|
3974
|
+
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = Kt(e, i, o, s) : i && o ? this.message = Kt(e, i, o) : i ? this.message = Kt(e, i) : this.message = e;
|
|
3917
3975
|
}
|
|
3918
3976
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
3919
3977
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
3920
|
-
},
|
|
3978
|
+
}, ja(n, r), n;
|
|
3921
3979
|
}
|
|
3922
|
-
var
|
|
3923
|
-
createError:
|
|
3924
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
3980
|
+
var ri = {
|
|
3981
|
+
createError: Ee,
|
|
3982
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ee(
|
|
3925
3983
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
3926
3984
|
"'%s' () is already defined, specify an expose option"
|
|
3927
3985
|
),
|
|
3928
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
3986
|
+
AVV_ERR_CALLBACK_NOT_FN: Ee(
|
|
3929
3987
|
"AVV_ERR_CALLBACK_NOT_FN",
|
|
3930
3988
|
"Callback for '%s' hook is not a function. Received: '%s'"
|
|
3931
3989
|
),
|
|
3932
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
3990
|
+
AVV_ERR_PLUGIN_NOT_VALID: Ee(
|
|
3933
3991
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
3934
3992
|
"Plugin must be a function or a promise. Received: '%s'"
|
|
3935
3993
|
),
|
|
3936
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
3994
|
+
AVV_ERR_ROOT_PLG_BOOTED: Ee(
|
|
3937
3995
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
3938
3996
|
"Root plugin has already booted"
|
|
3939
3997
|
),
|
|
3940
|
-
AVV_ERR_PARENT_PLG_LOADED:
|
|
3998
|
+
AVV_ERR_PARENT_PLG_LOADED: Ee(
|
|
3941
3999
|
"AVV_ERR_PARENT_PLG_LOADED",
|
|
3942
4000
|
"Impossible to load '%s' plugin because the parent '%s' was already loaded"
|
|
3943
4001
|
),
|
|
3944
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4002
|
+
AVV_ERR_READY_TIMEOUT: Ee(
|
|
3945
4003
|
"AVV_ERR_READY_TIMEOUT",
|
|
3946
4004
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
3947
4005
|
)
|
|
3948
|
-
},
|
|
4006
|
+
}, Ma = function t(e, r, n) {
|
|
3949
4007
|
r === void 0 && (r = ""), n || (n = {});
|
|
3950
4008
|
var i = function(u) {
|
|
3951
4009
|
var d = {
|
|
@@ -3967,15 +4025,15 @@ var qn = {
|
|
|
3967
4025
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
3968
4026
|
}).join("");
|
|
3969
4027
|
};
|
|
3970
|
-
const
|
|
3971
|
-
let
|
|
4028
|
+
const Ua = Ma, dn = Symbol("avvio.TimeTree.untrackNode"), zt = Symbol("avvio.TimeTree.trackNode"), fn = Symbol("avvio.TimeTree.getParent"), hn = Symbol("avvio.TimeTree.getNode"), pn = Symbol("avvio.TimeTree.addNode");
|
|
4029
|
+
let xa = class {
|
|
3972
4030
|
constructor() {
|
|
3973
4031
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
3974
4032
|
}
|
|
3975
|
-
[
|
|
4033
|
+
[zt](e) {
|
|
3976
4034
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
3977
4035
|
}
|
|
3978
|
-
[
|
|
4036
|
+
[dn](e) {
|
|
3979
4037
|
this.tableId.delete(e.id);
|
|
3980
4038
|
const r = this.tableLabel.get(e.label);
|
|
3981
4039
|
if (r.id) {
|
|
@@ -3984,54 +4042,54 @@ let fa = class {
|
|
|
3984
4042
|
}
|
|
3985
4043
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
3986
4044
|
}
|
|
3987
|
-
[
|
|
4045
|
+
[fn](e) {
|
|
3988
4046
|
if (e === null)
|
|
3989
4047
|
return this.root;
|
|
3990
4048
|
const r = this.tableLabel.get(e);
|
|
3991
4049
|
return r.id ? r : r[r.length - 1];
|
|
3992
4050
|
}
|
|
3993
|
-
[
|
|
4051
|
+
[hn](e) {
|
|
3994
4052
|
return this.tableId.get(e);
|
|
3995
4053
|
}
|
|
3996
|
-
[
|
|
4054
|
+
[pn](e, r, n) {
|
|
3997
4055
|
if (e === null)
|
|
3998
4056
|
return this.root = {
|
|
3999
4057
|
id: "root",
|
|
4000
4058
|
label: r,
|
|
4001
4059
|
start: n,
|
|
4002
4060
|
nodes: []
|
|
4003
|
-
}, this[
|
|
4004
|
-
const o = this[
|
|
4061
|
+
}, this[zt](this.root), this.root.id;
|
|
4062
|
+
const o = this[fn](e), s = `${r}-${Math.random()}`, a = {
|
|
4005
4063
|
id: s,
|
|
4006
4064
|
parent: e,
|
|
4007
4065
|
start: n,
|
|
4008
4066
|
label: r,
|
|
4009
4067
|
nodes: []
|
|
4010
4068
|
};
|
|
4011
|
-
return o.nodes.push(a), this[
|
|
4069
|
+
return o.nodes.push(a), this[zt](a), s;
|
|
4012
4070
|
}
|
|
4013
4071
|
start(e, r, n = Date.now()) {
|
|
4014
|
-
return this[
|
|
4072
|
+
return this[pn](e, r, n);
|
|
4015
4073
|
}
|
|
4016
4074
|
stop(e, r = Date.now()) {
|
|
4017
|
-
const n = this[
|
|
4018
|
-
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[
|
|
4075
|
+
const n = this[hn](e);
|
|
4076
|
+
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[dn](n));
|
|
4019
4077
|
}
|
|
4020
4078
|
toJSON() {
|
|
4021
4079
|
return Object.assign({}, this.root);
|
|
4022
4080
|
}
|
|
4023
4081
|
prittyPrint() {
|
|
4024
4082
|
const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
|
|
4025
|
-
return
|
|
4083
|
+
return Ua(r);
|
|
4026
4084
|
}
|
|
4027
4085
|
};
|
|
4028
|
-
var
|
|
4029
|
-
function
|
|
4030
|
-
if (
|
|
4031
|
-
return
|
|
4032
|
-
|
|
4086
|
+
var Ba = xa, Lr = { exports: {} }, fr = { exports: {} }, Ht, yn;
|
|
4087
|
+
function qa() {
|
|
4088
|
+
if (yn)
|
|
4089
|
+
return Ht;
|
|
4090
|
+
yn = 1;
|
|
4033
4091
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4034
|
-
|
|
4092
|
+
Ht = function(c, f) {
|
|
4035
4093
|
f = f || {};
|
|
4036
4094
|
var p = typeof c;
|
|
4037
4095
|
if (p === "string" && c.length > 0)
|
|
@@ -4103,13 +4161,13 @@ function pa() {
|
|
|
4103
4161
|
return f >= n ? d(c, f, n, "day") : f >= r ? d(c, f, r, "hour") : f >= e ? d(c, f, e, "minute") : f >= t ? d(c, f, t, "second") : c + " ms";
|
|
4104
4162
|
}
|
|
4105
4163
|
function d(c, f, p, m) {
|
|
4106
|
-
var
|
|
4107
|
-
return Math.round(c / p) + " " + m + (
|
|
4164
|
+
var v = f >= p * 1.5;
|
|
4165
|
+
return Math.round(c / p) + " " + m + (v ? "s" : "");
|
|
4108
4166
|
}
|
|
4109
|
-
return
|
|
4167
|
+
return Ht;
|
|
4110
4168
|
}
|
|
4111
|
-
function
|
|
4112
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4169
|
+
function Qa(t) {
|
|
4170
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = qa(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
4113
4171
|
r[c] = t[c];
|
|
4114
4172
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4115
4173
|
function e(c) {
|
|
@@ -4120,33 +4178,33 @@ function ya(t) {
|
|
|
4120
4178
|
}
|
|
4121
4179
|
r.selectColor = e;
|
|
4122
4180
|
function r(c) {
|
|
4123
|
-
let f, p = null, m,
|
|
4124
|
-
function
|
|
4125
|
-
if (!
|
|
4181
|
+
let f, p = null, m, v;
|
|
4182
|
+
function I(...b) {
|
|
4183
|
+
if (!I.enabled)
|
|
4126
4184
|
return;
|
|
4127
|
-
const
|
|
4128
|
-
|
|
4185
|
+
const _ = I, $ = Number(/* @__PURE__ */ new Date()), q = $ - (f || $);
|
|
4186
|
+
_.diff = q, _.prev = f, _.curr = $, f = $, b[0] = r.coerce(b[0]), typeof b[0] != "string" && b.unshift("%O");
|
|
4129
4187
|
let J = 0;
|
|
4130
|
-
|
|
4188
|
+
b[0] = b[0].replace(/%([a-zA-Z%])/g, (R, T) => {
|
|
4131
4189
|
if (R === "%%")
|
|
4132
4190
|
return "%";
|
|
4133
4191
|
J++;
|
|
4134
|
-
const X = r.formatters[
|
|
4192
|
+
const X = r.formatters[T];
|
|
4135
4193
|
if (typeof X == "function") {
|
|
4136
|
-
const Z =
|
|
4137
|
-
R = X.call(
|
|
4194
|
+
const Z = b[J];
|
|
4195
|
+
R = X.call(_, Z), b.splice(J, 1), J--;
|
|
4138
4196
|
}
|
|
4139
4197
|
return R;
|
|
4140
|
-
}), r.formatArgs.call(
|
|
4198
|
+
}), r.formatArgs.call(_, b), (_.log || r.log).apply(_, b);
|
|
4141
4199
|
}
|
|
4142
|
-
return
|
|
4200
|
+
return I.namespace = c, I.useColors = r.useColors(), I.color = r.selectColor(c), I.extend = n, I.destroy = r.destroy, Object.defineProperty(I, "enabled", {
|
|
4143
4201
|
enumerable: !0,
|
|
4144
4202
|
configurable: !1,
|
|
4145
|
-
get: () => p !== null ? p : (m !== r.namespaces && (m = r.namespaces,
|
|
4146
|
-
set: (
|
|
4147
|
-
p =
|
|
4203
|
+
get: () => p !== null ? p : (m !== r.namespaces && (m = r.namespaces, v = r.enabled(c)), v),
|
|
4204
|
+
set: (b) => {
|
|
4205
|
+
p = b;
|
|
4148
4206
|
}
|
|
4149
|
-
}), typeof r.init == "function" && r.init(
|
|
4207
|
+
}), typeof r.init == "function" && r.init(I), I;
|
|
4150
4208
|
}
|
|
4151
4209
|
function n(c, f) {
|
|
4152
4210
|
const p = r(this.namespace + (typeof f > "u" ? ":" : f) + c);
|
|
@@ -4189,7 +4247,7 @@ function ya(t) {
|
|
|
4189
4247
|
}
|
|
4190
4248
|
return r.enable(r.load()), r;
|
|
4191
4249
|
}
|
|
4192
|
-
var
|
|
4250
|
+
var Ga = Qa;
|
|
4193
4251
|
(function(t, e) {
|
|
4194
4252
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4195
4253
|
let u = !1;
|
|
@@ -4305,7 +4363,7 @@ var ga = ya;
|
|
|
4305
4363
|
u = e.storage.getItem("debug");
|
|
4306
4364
|
} catch {
|
|
4307
4365
|
}
|
|
4308
|
-
return !u && typeof
|
|
4366
|
+
return !u && typeof w < "u" && "env" in w && (u = w.env.DEBUG), u;
|
|
4309
4367
|
}
|
|
4310
4368
|
function s() {
|
|
4311
4369
|
try {
|
|
@@ -4313,7 +4371,7 @@ var ga = ya;
|
|
|
4313
4371
|
} catch {
|
|
4314
4372
|
}
|
|
4315
4373
|
}
|
|
4316
|
-
t.exports =
|
|
4374
|
+
t.exports = Ga(e);
|
|
4317
4375
|
const { formatters: a } = t.exports;
|
|
4318
4376
|
a.j = function(u) {
|
|
4319
4377
|
try {
|
|
@@ -4322,29 +4380,29 @@ var ga = ya;
|
|
|
4322
4380
|
return "[UnexpectedJSONParseError]: " + d.message;
|
|
4323
4381
|
}
|
|
4324
4382
|
};
|
|
4325
|
-
})(
|
|
4326
|
-
var
|
|
4327
|
-
const
|
|
4328
|
-
function
|
|
4329
|
-
return t[
|
|
4383
|
+
})(fr, fr.exports);
|
|
4384
|
+
var ni = fr.exports;
|
|
4385
|
+
const Ka = kn, za = Mn.EventEmitter, Ha = _t.inherits, M = ni("avvio"), { AVV_ERR_READY_TIMEOUT: Wa } = ri, Wt = Symbol.for("plugin-meta");
|
|
4386
|
+
function Ja(t, e) {
|
|
4387
|
+
return t[Wt] && t[Wt].name ? t[Wt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4330
4388
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4331
4389
|
}
|
|
4332
|
-
function
|
|
4390
|
+
function Ya() {
|
|
4333
4391
|
const t = {};
|
|
4334
4392
|
return t.promise = new Promise((e, r) => {
|
|
4335
4393
|
t.resolve = e, t.reject = r;
|
|
4336
4394
|
}), t;
|
|
4337
4395
|
}
|
|
4338
|
-
function
|
|
4339
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name =
|
|
4396
|
+
function Ke(t, e, r, n, i) {
|
|
4397
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = Ja(e, r), this.isAfter = n, this.q = Ka(t, Xa, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4340
4398
|
}
|
|
4341
|
-
|
|
4342
|
-
|
|
4399
|
+
Ha(Ke, za);
|
|
4400
|
+
Ke.prototype.exec = function(t, e) {
|
|
4343
4401
|
const r = this.func;
|
|
4344
4402
|
let n = !1;
|
|
4345
4403
|
const i = this.name;
|
|
4346
4404
|
if (this.parent._error && !this.isAfter) {
|
|
4347
|
-
M("skipping loading of plugin as parent errored and it is not an after", i),
|
|
4405
|
+
M("skipping loading of plugin as parent errored and it is not an after", i), w.nextTick(e);
|
|
4348
4406
|
return;
|
|
4349
4407
|
}
|
|
4350
4408
|
if (this.isAfter)
|
|
@@ -4366,30 +4424,30 @@ ze.prototype.exec = function(t, e) {
|
|
|
4366
4424
|
};
|
|
4367
4425
|
this.timeout > 0 && (M("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4368
4426
|
M("timed out", i), o = null;
|
|
4369
|
-
const u = new
|
|
4427
|
+
const u = new Wa(i);
|
|
4370
4428
|
u.fn = r, s(u);
|
|
4371
4429
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4372
4430
|
const a = r(this.server, this.opts, s);
|
|
4373
4431
|
a && typeof a.then == "function" && (M("exec: resolving promise", i), a.then(
|
|
4374
|
-
() =>
|
|
4375
|
-
(u) =>
|
|
4432
|
+
() => w.nextTick(s),
|
|
4433
|
+
(u) => w.nextTick(s, u)
|
|
4376
4434
|
));
|
|
4377
4435
|
};
|
|
4378
|
-
|
|
4436
|
+
Ke.prototype.loadedSoFar = function() {
|
|
4379
4437
|
if (this.loaded)
|
|
4380
4438
|
return Promise.resolve();
|
|
4381
4439
|
const t = () => {
|
|
4382
4440
|
this.server.after((r, n) => {
|
|
4383
|
-
this._error = r, this.q.pause(), r ? (M("rejecting promise", this.name, r), this._promise.reject(r)) : (M("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4441
|
+
this._error = r, this.q.pause(), r ? (M("rejecting promise", this.name, r), this._promise.reject(r)) : (M("resolving promise", this.name), this._promise.resolve()), this._promise = null, w.nextTick(n, r);
|
|
4384
4442
|
}), this.q.resume();
|
|
4385
4443
|
};
|
|
4386
4444
|
let e;
|
|
4387
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4445
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Ya(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4388
4446
|
};
|
|
4389
|
-
|
|
4447
|
+
Ke.prototype.enqueue = function(t, e) {
|
|
4390
4448
|
M("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4391
4449
|
};
|
|
4392
|
-
|
|
4450
|
+
Ke.prototype.finish = function(t, e) {
|
|
4393
4451
|
M("finish", this.name, t);
|
|
4394
4452
|
const r = () => {
|
|
4395
4453
|
this.loaded || (M("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4409,19 +4467,19 @@ ze.prototype.finish = function(t, e) {
|
|
|
4409
4467
|
r();
|
|
4410
4468
|
else
|
|
4411
4469
|
M("delayed", this.name), this.q.drain = () => {
|
|
4412
|
-
M("drain", this.name), this.q.drain =
|
|
4470
|
+
M("drain", this.name), this.q.drain = Za, queueMicrotask(n);
|
|
4413
4471
|
};
|
|
4414
4472
|
};
|
|
4415
4473
|
queueMicrotask(n), this.q.resume();
|
|
4416
4474
|
};
|
|
4417
|
-
function
|
|
4475
|
+
function Xa(t, e) {
|
|
4418
4476
|
const r = this;
|
|
4419
|
-
|
|
4477
|
+
w.nextTick(_r.bind(r), t, e);
|
|
4420
4478
|
}
|
|
4421
|
-
function
|
|
4479
|
+
function _r(t, e) {
|
|
4422
4480
|
if (typeof t.func.then == "function") {
|
|
4423
4481
|
t.func.then((n) => {
|
|
4424
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
4482
|
+
typeof n.default == "function" && (n = n.default), t.func = n, _r.call(this, t, e);
|
|
4425
4483
|
}, e);
|
|
4426
4484
|
return;
|
|
4427
4485
|
}
|
|
@@ -4432,59 +4490,59 @@ function br(t, e) {
|
|
|
4432
4490
|
});
|
|
4433
4491
|
});
|
|
4434
4492
|
}
|
|
4435
|
-
function
|
|
4493
|
+
function Za() {
|
|
4436
4494
|
}
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
var
|
|
4440
|
-
const
|
|
4441
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4442
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4443
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4444
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4445
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4446
|
-
} =
|
|
4447
|
-
function
|
|
4495
|
+
Lr.exports = Ke;
|
|
4496
|
+
Lr.exports.loadPlugin = _r;
|
|
4497
|
+
var eu = Lr.exports;
|
|
4498
|
+
const gn = kn, tu = Mn.EventEmitter, ru = _t.inherits, {
|
|
4499
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Jt,
|
|
4500
|
+
AVV_ERR_CALLBACK_NOT_FN: Ye,
|
|
4501
|
+
AVV_ERR_PLUGIN_NOT_VALID: nu,
|
|
4502
|
+
AVV_ERR_ROOT_PLG_BOOTED: iu,
|
|
4503
|
+
AVV_ERR_READY_TIMEOUT: ou
|
|
4504
|
+
} = ri, su = Ba, hr = eu, Ge = ni("avvio"), Et = Symbol("kAvvio"), Yt = Symbol("kThenifyDoNotWrap");
|
|
4505
|
+
function au(t, e, r) {
|
|
4448
4506
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4449
4507
|
if (t[i])
|
|
4450
|
-
throw new
|
|
4508
|
+
throw new Jt(i);
|
|
4451
4509
|
if (t[o])
|
|
4452
|
-
throw new
|
|
4510
|
+
throw new Jt(o);
|
|
4453
4511
|
if (t[s])
|
|
4454
|
-
throw new
|
|
4512
|
+
throw new Jt(s);
|
|
4455
4513
|
t[i] = function(d, c) {
|
|
4456
4514
|
return r.use(d, c), this;
|
|
4457
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4458
|
-
return typeof d != "function" ? r._loadRegistered() : (r.after(
|
|
4515
|
+
}, Object.defineProperty(t, "then", { get: ii.bind(r) }), t[Et] = !0, t[o] = function(d) {
|
|
4516
|
+
return typeof d != "function" ? r._loadRegistered() : (r.after(Xt(d, this)), this);
|
|
4459
4517
|
}, t[s] = function(d) {
|
|
4460
4518
|
if (d && typeof d != "function")
|
|
4461
|
-
throw new
|
|
4462
|
-
return r.ready(d ?
|
|
4519
|
+
throw new Ye(s, typeof d);
|
|
4520
|
+
return r.ready(d ? Xt(d, this) : void 0);
|
|
4463
4521
|
}, t[a] = function(d) {
|
|
4464
4522
|
if (typeof d != "function")
|
|
4465
|
-
throw new
|
|
4466
|
-
return r.onClose(
|
|
4523
|
+
throw new Ye(a, typeof d);
|
|
4524
|
+
return r.onClose(fu(d, this)), this;
|
|
4467
4525
|
}, t[u] = function(d) {
|
|
4468
4526
|
if (d && typeof d != "function")
|
|
4469
|
-
throw new
|
|
4470
|
-
return d ? (r.close(
|
|
4527
|
+
throw new Ye(u, typeof d);
|
|
4528
|
+
return d ? (r.close(Xt(d, this)), this) : r.close();
|
|
4471
4529
|
};
|
|
4472
4530
|
}
|
|
4473
4531
|
function x(t, e, r) {
|
|
4474
4532
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4475
4533
|
const n = new x(t, e, r);
|
|
4476
|
-
return t &&
|
|
4534
|
+
return t && au(t, e, n), n;
|
|
4477
4535
|
}
|
|
4478
|
-
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
|
|
4479
|
-
this.emit("start"), this._readyQ.drain =
|
|
4480
|
-
}, this._closeQ =
|
|
4481
|
-
this.emit("close"), this._closeQ.drain =
|
|
4482
|
-
}, this._doStart = null, this._root = new
|
|
4536
|
+
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 su(), this._readyQ = gn(this, oi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4537
|
+
this.emit("start"), this._readyQ.drain = mn;
|
|
4538
|
+
}, this._closeQ = gn(this, du, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4539
|
+
this.emit("close"), this._closeQ.drain = mn;
|
|
4540
|
+
}, this._doStart = null, this._root = new hr(this, uu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4483
4541
|
const s = this.pluginTree.start(null, i, o);
|
|
4484
4542
|
this._root.once("loaded", (a, u, d) => {
|
|
4485
4543
|
this.pluginTree.stop(s, d);
|
|
4486
4544
|
});
|
|
4487
|
-
}),
|
|
4545
|
+
}), hr.loadPlugin.call(this, this._root, (n) => {
|
|
4488
4546
|
Ge("root plugin ready");
|
|
4489
4547
|
try {
|
|
4490
4548
|
this.emit("preReady"), this._root = null;
|
|
@@ -4499,34 +4557,34 @@ function x(t, e, r) {
|
|
|
4499
4557
|
this._readyQ.resume();
|
|
4500
4558
|
});
|
|
4501
4559
|
}
|
|
4502
|
-
function
|
|
4560
|
+
function uu(t, e, r) {
|
|
4503
4561
|
this._doStart = r, e.autostart && this.start();
|
|
4504
4562
|
}
|
|
4505
|
-
|
|
4563
|
+
ru(x, tu);
|
|
4506
4564
|
x.prototype.start = function() {
|
|
4507
|
-
return this.started = !0,
|
|
4565
|
+
return this.started = !0, w.nextTick(this._doStart), this;
|
|
4508
4566
|
};
|
|
4509
4567
|
x.prototype.override = function(t, e, r) {
|
|
4510
4568
|
return t;
|
|
4511
4569
|
};
|
|
4512
|
-
function
|
|
4570
|
+
function cu(t) {
|
|
4513
4571
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4514
|
-
throw new
|
|
4572
|
+
throw new nu(typeof t);
|
|
4515
4573
|
return t;
|
|
4516
4574
|
}
|
|
4517
|
-
x.prototype[
|
|
4575
|
+
x.prototype[Et] = !0;
|
|
4518
4576
|
x.prototype.use = function(t, e) {
|
|
4519
4577
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
4520
4578
|
};
|
|
4521
4579
|
x.prototype._loadRegistered = function() {
|
|
4522
4580
|
const t = this._current[0];
|
|
4523
|
-
return !this.started && !this.booted &&
|
|
4581
|
+
return !this.started && !this.booted && w.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4524
4582
|
};
|
|
4525
|
-
Object.defineProperty(x.prototype, "then", { get:
|
|
4583
|
+
Object.defineProperty(x.prototype, "then", { get: ii });
|
|
4526
4584
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4527
|
-
if (t =
|
|
4528
|
-
throw new
|
|
4529
|
-
const n = this._current[0], i = new
|
|
4585
|
+
if (t = cu(t), e = e || {}, this.booted)
|
|
4586
|
+
throw new iu();
|
|
4587
|
+
const n = this._current[0], i = new hr(this, t, e, r);
|
|
4530
4588
|
if (i.once("start", (o, s, a) => {
|
|
4531
4589
|
const u = this.pluginTree.start(n.name, s, a);
|
|
4532
4590
|
i.once("loaded", (d, c, f) => {
|
|
@@ -4543,7 +4601,7 @@ x.prototype.after = function(t) {
|
|
|
4543
4601
|
return this._loadRegistered();
|
|
4544
4602
|
this._addPlugin(e.bind(this), {}, !0);
|
|
4545
4603
|
function e(r, n, i) {
|
|
4546
|
-
|
|
4604
|
+
oi.call(this, t, i);
|
|
4547
4605
|
}
|
|
4548
4606
|
return this;
|
|
4549
4607
|
};
|
|
@@ -4560,7 +4618,7 @@ x.prototype.close = function(t) {
|
|
|
4560
4618
|
let e;
|
|
4561
4619
|
if (t) {
|
|
4562
4620
|
if (typeof t != "function")
|
|
4563
|
-
throw new
|
|
4621
|
+
throw new Ye("close", typeof t);
|
|
4564
4622
|
} else
|
|
4565
4623
|
e = new Promise(function(r, n) {
|
|
4566
4624
|
t = function(i) {
|
|
@@ -4570,13 +4628,13 @@ x.prototype.close = function(t) {
|
|
|
4570
4628
|
};
|
|
4571
4629
|
});
|
|
4572
4630
|
return this.ready(() => {
|
|
4573
|
-
this._error = null, this._closeQ.push(t),
|
|
4631
|
+
this._error = null, this._closeQ.push(t), w.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4574
4632
|
}), e;
|
|
4575
4633
|
};
|
|
4576
4634
|
x.prototype.ready = function(t) {
|
|
4577
4635
|
if (t) {
|
|
4578
4636
|
if (typeof t != "function")
|
|
4579
|
-
throw new
|
|
4637
|
+
throw new Ye("ready", typeof t);
|
|
4580
4638
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
4581
4639
|
return;
|
|
4582
4640
|
}
|
|
@@ -4584,7 +4642,7 @@ x.prototype.ready = function(t) {
|
|
|
4584
4642
|
this._readyQ.push(i), this.start();
|
|
4585
4643
|
const n = this._current[0].server;
|
|
4586
4644
|
function i(o, s, a) {
|
|
4587
|
-
o ? r(o) : e(n),
|
|
4645
|
+
o ? r(o) : e(n), w.nextTick(a);
|
|
4588
4646
|
}
|
|
4589
4647
|
});
|
|
4590
4648
|
};
|
|
@@ -4594,40 +4652,40 @@ x.prototype.prettyPrint = function() {
|
|
|
4594
4652
|
x.prototype.toJSON = function() {
|
|
4595
4653
|
return this.pluginTree.toJSON();
|
|
4596
4654
|
};
|
|
4597
|
-
function
|
|
4655
|
+
function mn() {
|
|
4598
4656
|
}
|
|
4599
|
-
function
|
|
4657
|
+
function ii() {
|
|
4600
4658
|
if (this.booted) {
|
|
4601
4659
|
Ge("thenify returning null because we are already booted");
|
|
4602
4660
|
return;
|
|
4603
4661
|
}
|
|
4604
|
-
if (this[
|
|
4605
|
-
this[
|
|
4662
|
+
if (this[Yt]) {
|
|
4663
|
+
this[Yt] = !1;
|
|
4606
4664
|
return;
|
|
4607
4665
|
}
|
|
4608
|
-
return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
4666
|
+
return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[Yt] = !0, t(this._server)), e);
|
|
4609
4667
|
}
|
|
4610
|
-
function
|
|
4668
|
+
function oi(t, e) {
|
|
4611
4669
|
const r = this._server, n = this._error;
|
|
4612
4670
|
let i;
|
|
4613
4671
|
if (this._error = null, t.length === 0)
|
|
4614
|
-
this._error = n, i = t(), i && !i[
|
|
4672
|
+
this._error = n, i = t(), i && !i[Et] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
|
|
4615
4673
|
else if (t.length === 1)
|
|
4616
|
-
i = t(n), i && !i[
|
|
4674
|
+
i = t(n), i && !i[Et] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
|
|
4617
4675
|
else if (this._timeout === 0) {
|
|
4618
4676
|
const o = (s) => {
|
|
4619
4677
|
this._error = s, e(this._error);
|
|
4620
4678
|
};
|
|
4621
4679
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
4622
4680
|
} else
|
|
4623
|
-
|
|
4681
|
+
lu.call(this, t, n, r, e);
|
|
4624
4682
|
}
|
|
4625
|
-
function
|
|
4683
|
+
function lu(t, e, r, n) {
|
|
4626
4684
|
const i = t.name;
|
|
4627
4685
|
Ge("setting up ready timeout", i, this._timeout);
|
|
4628
4686
|
let o = setTimeout(() => {
|
|
4629
4687
|
Ge("timed out", i), o = null;
|
|
4630
|
-
const a = new
|
|
4688
|
+
const a = new ou(i);
|
|
4631
4689
|
a.fn = t, this._error = a, n(a);
|
|
4632
4690
|
}, this._timeout);
|
|
4633
4691
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -4635,49 +4693,49 @@ function Ra(t, e, r, n) {
|
|
|
4635
4693
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
4636
4694
|
}
|
|
4637
4695
|
}
|
|
4638
|
-
function
|
|
4696
|
+
function du(t, e) {
|
|
4639
4697
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
4640
4698
|
if (t.length === 0 || t.length === 1) {
|
|
4641
4699
|
let i;
|
|
4642
4700
|
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (Ge("resolving close/onClose promise"), i.then(
|
|
4643
|
-
() =>
|
|
4644
|
-
(o) =>
|
|
4645
|
-
)) :
|
|
4701
|
+
() => w.nextTick(e),
|
|
4702
|
+
(o) => w.nextTick(e, o)
|
|
4703
|
+
)) : w.nextTick(e);
|
|
4646
4704
|
} else
|
|
4647
4705
|
t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
4648
4706
|
}
|
|
4649
|
-
function
|
|
4707
|
+
function fu(t, e) {
|
|
4650
4708
|
return r.bind(e);
|
|
4651
4709
|
function r(n, i) {
|
|
4652
4710
|
let o;
|
|
4653
4711
|
t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
|
|
4654
|
-
|
|
4655
|
-
}, i) :
|
|
4656
|
-
|
|
4657
|
-
}, i) :
|
|
4712
|
+
w.nextTick(i);
|
|
4713
|
+
}, i) : w.nextTick(i)) : t.length === 1 ? (o = t(this), o && o.then ? o.then(function() {
|
|
4714
|
+
w.nextTick(i);
|
|
4715
|
+
}, i) : w.nextTick(i)) : t(this, i);
|
|
4658
4716
|
}
|
|
4659
4717
|
}
|
|
4660
|
-
function
|
|
4718
|
+
function Xt(t, e) {
|
|
4661
4719
|
return r.bind(e);
|
|
4662
4720
|
function r(n, i) {
|
|
4663
4721
|
let o;
|
|
4664
4722
|
t ? t.length === 0 ? (o = t(), o && o.then ? o.then(function() {
|
|
4665
|
-
|
|
4666
|
-
}, i) :
|
|
4667
|
-
|
|
4668
|
-
}, i) :
|
|
4723
|
+
w.nextTick(i, n);
|
|
4724
|
+
}, i) : w.nextTick(i, n)) : t.length === 1 ? (o = t(n), o && o.then ? o.then(function() {
|
|
4725
|
+
w.nextTick(i);
|
|
4726
|
+
}, i) : w.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : w.nextTick(i);
|
|
4669
4727
|
}
|
|
4670
4728
|
}
|
|
4671
|
-
|
|
4672
|
-
|
|
4729
|
+
mr.exports = x;
|
|
4730
|
+
mr.exports.express = function(t) {
|
|
4673
4731
|
return x(t, {
|
|
4674
4732
|
expose: {
|
|
4675
4733
|
use: "load"
|
|
4676
4734
|
}
|
|
4677
4735
|
});
|
|
4678
4736
|
};
|
|
4679
|
-
var
|
|
4680
|
-
const
|
|
4737
|
+
var hu = mr.exports;
|
|
4738
|
+
const pu = /* @__PURE__ */ Bo(hu);
|
|
4681
4739
|
(function() {
|
|
4682
4740
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
4683
4741
|
return;
|
|
@@ -4695,9 +4753,9 @@ const Ma = /* @__PURE__ */ _o(ja);
|
|
|
4695
4753
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
4696
4754
|
}
|
|
4697
4755
|
})();
|
|
4698
|
-
function
|
|
4699
|
-
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s =
|
|
4700
|
-
return s.use(
|
|
4756
|
+
function ju(t, e = !0, r = !0, n) {
|
|
4757
|
+
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = pu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4758
|
+
return s.use(So), s.use(yo, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(bo, { videoPlayerController: n?.videoPlayerController }), s.use(xi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Ki), s.use(vo), s.use(No), s.use(oo), s.use(xo), s.after((a, u, d) => {
|
|
4701
4759
|
if (a)
|
|
4702
4760
|
throw a;
|
|
4703
4761
|
u.ready(), d();
|
|
@@ -4710,5 +4768,5 @@ function cu(t, e = !0, r = !0, n) {
|
|
|
4710
4768
|
}), s;
|
|
4711
4769
|
}
|
|
4712
4770
|
export {
|
|
4713
|
-
|
|
4771
|
+
ju as StreamLayer
|
|
4714
4772
|
};
|