@streamlayer/sdk-web 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +306 -304
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as I, QuestionStatus as G, PromotionType as q, NotificationEnabled as Br, SilenceSetting as
|
|
1
|
+
import { pino as Ii } from "pino";
|
|
2
|
+
import { QuestionType as I, QuestionStatus as G, PromotionType as q, NotificationEnabled as Br, SilenceSetting as Oi, UseAsNotification as Ti } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
3
|
import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as R } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
5
|
import { InvitationCategory as Mr, InvitationFrom as Ur } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
-
import { computed as
|
|
6
|
+
import { computed as _i, map as ki, atom as Lt, batched as qr, onMount as wr } from "nanostores";
|
|
7
7
|
import { v4 as or } from "uuid";
|
|
8
|
-
import { ConnectError as it, Code as oe, createContextKey as jr, createClient as xr, createContextValues as
|
|
8
|
+
import { ConnectError as it, Code as oe, createContextKey as jr, createClient as xr, createContextValues as Pi } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as Qr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Gr } from "@nanostores/query";
|
|
11
|
-
import { Events as
|
|
11
|
+
import { Events as Cn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as ot } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as Ar } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { Feed as ee } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
15
|
+
import { Leaderboard as Ln } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
17
|
+
import { LinksClient as Ci } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
18
|
import { Kind as K, TopicSubType as J, TopicType as Q, PollOpenedFrom as X, Category as W, ScreenOrientation as Kr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
|
-
import { AnalyticsService as
|
|
19
|
+
import { AnalyticsService as Nn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
20
|
import { InteractionActionType as zr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
21
|
import { NotificationKind as me, NotificationType as Hr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
-
function
|
|
22
|
+
function Li(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var Fn = { exports: {} }, M = Fn.exports = {}, de, le;
|
|
26
26
|
function sr() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
@@ -41,7 +41,7 @@ function ar() {
|
|
|
41
41
|
le = ar;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
|
-
function
|
|
44
|
+
function Dn(t) {
|
|
45
45
|
if (de === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
47
|
if ((de === sr || !de) && setTimeout)
|
|
@@ -56,7 +56,7 @@ function Fn(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Ni(t) {
|
|
60
60
|
if (le === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
62
|
if ((le === ar || !le) && clearTimeout)
|
|
@@ -72,19 +72,19 @@ function Li(t) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
var we = [], Qe = !1, Pe, yt = -1;
|
|
75
|
-
function
|
|
76
|
-
!Qe || !Pe || (Qe = !1, Pe.length ? we = Pe.concat(we) : yt = -1, we.length &&
|
|
75
|
+
function Fi() {
|
|
76
|
+
!Qe || !Pe || (Qe = !1, Pe.length ? we = Pe.concat(we) : yt = -1, we.length && Rn());
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Rn() {
|
|
79
79
|
if (!Qe) {
|
|
80
|
-
var t =
|
|
80
|
+
var t = Dn(Fi);
|
|
81
81
|
Qe = !0;
|
|
82
82
|
for (var e = we.length; e; ) {
|
|
83
83
|
for (Pe = we, we = []; ++yt < e; )
|
|
84
84
|
Pe && Pe[yt].run();
|
|
85
85
|
yt = -1, e = we.length;
|
|
86
86
|
}
|
|
87
|
-
Pe = null, Qe = !1,
|
|
87
|
+
Pe = null, Qe = !1, Ni(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
M.nextTick = function(t) {
|
|
@@ -92,12 +92,12 @@ M.nextTick = function(t) {
|
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
94
94
|
e[r - 1] = arguments[r];
|
|
95
|
-
we.push(new
|
|
95
|
+
we.push(new Vn(t, e)), we.length === 1 && !Qe && Dn(Rn);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function Vn(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
Vn.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
103
|
M.title = "browser";
|
|
@@ -132,8 +132,8 @@ M.chdir = function(t) {
|
|
|
132
132
|
M.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const E = /* @__PURE__ */
|
|
135
|
+
var Di = Fn.exports;
|
|
136
|
+
const E = /* @__PURE__ */ Li(Di), Ri = Ii({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const E = /* @__PURE__ */ Ci(Fi), Di = Ei({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), pe = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), pe = (t, e) => Ri.child({ name: t }, e);
|
|
145
|
+
class Vi 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 $i = pe("event-bus");
|
|
152
|
+
class Bi {
|
|
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 Vi(this.name, { ...r, type: e });
|
|
160
|
+
$i.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,7 +173,7 @@ class $i {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Mi {
|
|
177
177
|
}
|
|
178
178
|
var Ae;
|
|
179
179
|
(function(t) {
|
|
@@ -196,9 +196,9 @@ class Nt {
|
|
|
196
196
|
return this.store;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const Ui = (t) => {
|
|
200
200
|
const e = Object.keys(t);
|
|
201
|
-
return
|
|
201
|
+
return _i(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
202
202
|
};
|
|
203
203
|
class Ce extends Nt {
|
|
204
204
|
getValues = () => this.getStore().get();
|
|
@@ -207,12 +207,12 @@ class Ce extends Nt {
|
|
|
207
207
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
208
208
|
unsubscribe = () => this.getStore().off();
|
|
209
209
|
}
|
|
210
|
-
const Z = (t) =>
|
|
210
|
+
const Z = (t) => ki(t);
|
|
211
211
|
var be;
|
|
212
212
|
(function(t) {
|
|
213
213
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
214
214
|
})(be || (be = {}));
|
|
215
|
-
const
|
|
215
|
+
const qi = {
|
|
216
216
|
[R.BETTING]: "betting",
|
|
217
217
|
[R.GAMES]: "games",
|
|
218
218
|
[R.PUBLIC_CHAT]: "publicChat",
|
|
@@ -222,7 +222,7 @@ var tt;
|
|
|
222
222
|
(function(t) {
|
|
223
223
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
224
224
|
})(tt || (tt = {}));
|
|
225
|
-
class
|
|
225
|
+
class $n {
|
|
226
226
|
status;
|
|
227
227
|
source;
|
|
228
228
|
config;
|
|
@@ -230,7 +230,7 @@ class Vn {
|
|
|
230
230
|
listeners = /* @__PURE__ */ new Set();
|
|
231
231
|
settingsKey;
|
|
232
232
|
constructor({ settings: e, ...r }, n) {
|
|
233
|
-
this.settingsKey =
|
|
233
|
+
this.settingsKey = qi[r.type], this.status = Lt(tt.Suspended), this.config = new Ce(Z(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ce(Z(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ce(Z({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
234
234
|
}
|
|
235
235
|
get featureConfig() {
|
|
236
236
|
return this.config.getStore();
|
|
@@ -319,8 +319,8 @@ class se extends Nt {
|
|
|
319
319
|
key = () => this.getStore().key;
|
|
320
320
|
off = () => this.getStore().off();
|
|
321
321
|
}
|
|
322
|
-
const B = new
|
|
323
|
-
async function*
|
|
322
|
+
const B = new Bi();
|
|
323
|
+
async function* ji(t, e) {
|
|
324
324
|
for await (const r of e) {
|
|
325
325
|
t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
|
|
326
326
|
const n = {
|
|
@@ -330,7 +330,7 @@ async function* qi(t, e) {
|
|
|
330
330
|
window.postMessage(n), yield r;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const xi = () => (t) => async (e) => {
|
|
334
334
|
const r = {
|
|
335
335
|
id: Date.now(),
|
|
336
336
|
name: e.url,
|
|
@@ -359,7 +359,7 @@ const ji = () => (t) => async (e) => {
|
|
|
359
359
|
};
|
|
360
360
|
return window.postMessage(i), {
|
|
361
361
|
...n,
|
|
362
|
-
message:
|
|
362
|
+
message: ji(r, n.message)
|
|
363
363
|
};
|
|
364
364
|
} else {
|
|
365
365
|
r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -383,7 +383,7 @@ const ji = () => (t) => async (e) => {
|
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
386
|
-
function
|
|
386
|
+
function Bn(t) {
|
|
387
387
|
return t instanceof DOMException && // everything except Firefox
|
|
388
388
|
(t.code === 22 || // Firefox
|
|
389
389
|
t.code === 1014 || // test name field too, because code might not be present
|
|
@@ -408,7 +408,7 @@ class Je {
|
|
|
408
408
|
try {
|
|
409
409
|
this.storage.setItem(n, r);
|
|
410
410
|
} catch (i) {
|
|
411
|
-
|
|
411
|
+
Bn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
414
|
read = (...e) => {
|
|
@@ -424,7 +424,7 @@ var ie;
|
|
|
424
424
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
425
425
|
})(ie || (ie = {}));
|
|
426
426
|
const Wr = pe("grpc:stream");
|
|
427
|
-
class
|
|
427
|
+
class Qi {
|
|
428
428
|
params;
|
|
429
429
|
streamCancel;
|
|
430
430
|
method;
|
|
@@ -463,7 +463,7 @@ class xi {
|
|
|
463
463
|
window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
|
|
464
464
|
` + n);
|
|
465
465
|
} catch (i) {
|
|
466
|
-
|
|
466
|
+
Bn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
};
|
|
@@ -533,7 +533,7 @@ class xi {
|
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const Gi = /* @__PURE__ */ new Set([
|
|
537
537
|
oe.Unknown,
|
|
538
538
|
oe.Internal,
|
|
539
539
|
oe.DeadlineExceeded,
|
|
@@ -541,7 +541,7 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
541
541
|
oe.FailedPrecondition,
|
|
542
542
|
oe.Unavailable,
|
|
543
543
|
oe.DataLoss
|
|
544
|
-
]), Yr = pe("grpc:retry"),
|
|
544
|
+
]), Yr = pe("grpc:retry"), Ki = (t) => async (e) => {
|
|
545
545
|
const r = e.contextValues.get(ur.retryAttempts), n = 300, i = e.contextValues.get(ur.retryDelay);
|
|
546
546
|
if (e.stream || r === 0)
|
|
547
547
|
return t(e);
|
|
@@ -552,7 +552,7 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
552
552
|
} catch (s) {
|
|
553
553
|
Yr.trace({ attempt: o, error: s, url: e.url }, "retry attempt");
|
|
554
554
|
const a = it.from(s);
|
|
555
|
-
if (o >= r || !(a instanceof it) || !
|
|
555
|
+
if (o >= r || !(a instanceof it) || !Gi.has(a.code))
|
|
556
556
|
throw s;
|
|
557
557
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
558
558
|
await new Promise((c) => setTimeout(c, d));
|
|
@@ -560,13 +560,13 @@ const Qi = /* @__PURE__ */ new Set([
|
|
|
560
560
|
}, ur = {
|
|
561
561
|
retryAttempts: jr(10, { description: "Number of attempts to retry" }),
|
|
562
562
|
retryDelay: jr(3e4, { description: "Max delay between retries in milliseconds" })
|
|
563
|
-
},
|
|
563
|
+
}, zi = () => {
|
|
564
564
|
const t = localStorage.getItem("sl-device-id");
|
|
565
565
|
if (t)
|
|
566
566
|
return t;
|
|
567
567
|
const e = or();
|
|
568
568
|
return localStorage.setItem("sl-device-id", e), e;
|
|
569
|
-
},
|
|
569
|
+
}, Hi = () => navigator.userAgentData?.platform || navigator.platform;
|
|
570
570
|
class Jr {
|
|
571
571
|
toJsonOptions = {
|
|
572
572
|
emitDefaultValues: !1,
|
|
@@ -587,8 +587,8 @@ class Jr {
|
|
|
587
587
|
opts;
|
|
588
588
|
constructor(e, r) {
|
|
589
589
|
this.host = e, this.opts = r, this.$headers = new Ce(Z({
|
|
590
|
-
"sl-device-id":
|
|
591
|
-
"sl-device-os":
|
|
590
|
+
"sl-device-id": zi(),
|
|
591
|
+
"sl-device-os": Hi()
|
|
592
592
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
593
593
|
const [n, i, o] = Gr({
|
|
594
594
|
dedupeTime: r?.dedupeTime,
|
|
@@ -612,7 +612,7 @@ class Jr {
|
|
|
612
612
|
const i = this.subscriptions.get(r);
|
|
613
613
|
if (i)
|
|
614
614
|
return i;
|
|
615
|
-
const o = new
|
|
615
|
+
const o = new Qi(this.$headers, e, r, n);
|
|
616
616
|
return this.subscriptions.set(r, o), o;
|
|
617
617
|
};
|
|
618
618
|
removeSubscription = (e) => {
|
|
@@ -657,7 +657,7 @@ class Jr {
|
|
|
657
657
|
...Array.isArray(r) ? r : [r]
|
|
658
658
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
659
659
|
return { client: i, createRequestOptions: (d) => {
|
|
660
|
-
const c =
|
|
660
|
+
const c = Pi();
|
|
661
661
|
for (const f in d) {
|
|
662
662
|
const p = ur[f];
|
|
663
663
|
c.set(p, d[f]);
|
|
@@ -685,11 +685,11 @@ class Jr {
|
|
|
685
685
|
n.header.set(o, i[o]);
|
|
686
686
|
return r(n);
|
|
687
687
|
};
|
|
688
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
688
|
+
this.interceptors.push(e), this.interceptors.push(xi()), this.opts?.retryable && this.interceptors.push(Ki);
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
|
-
const
|
|
692
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
691
|
+
const Wi = (t, e) => {
|
|
692
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Cn, {
|
|
693
693
|
method: "retrieveEventId",
|
|
694
694
|
params: [t]
|
|
695
695
|
});
|
|
@@ -706,7 +706,7 @@ const Hi = (t, e) => {
|
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
});
|
|
709
|
-
},
|
|
709
|
+
}, Yi = (t, e) => {
|
|
710
710
|
const { client: r, queryKey: n } = e.createPromiseClient(ot, { method: "getStream", params: [t] });
|
|
711
711
|
return e.nanoquery.createFetcherStore(n, {
|
|
712
712
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
@@ -714,30 +714,32 @@ const Hi = (t, e) => {
|
|
|
714
714
|
// we are sure that id is a string
|
|
715
715
|
})).data?.attributes : void 0
|
|
716
716
|
});
|
|
717
|
-
},
|
|
718
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
717
|
+
}, Ji = (t, e) => {
|
|
718
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Cn, { method: "summary", params: [t] });
|
|
719
719
|
return e.nanoquery.createFetcherStore(n, {
|
|
720
720
|
fetcher: async (i, o, s) => s ? (await r.summary({
|
|
721
721
|
id: s
|
|
722
722
|
})).data?.attributes : void 0
|
|
723
723
|
});
|
|
724
|
-
},
|
|
724
|
+
}, Xi = (t, e) => {
|
|
725
725
|
const { queryKey: r, client: n } = e.createPromiseClient(Ar, { method: "me", params: [t] });
|
|
726
726
|
return e.nanoquery.createFetcherStore(r, {
|
|
727
727
|
fetcher: async () => {
|
|
728
|
-
|
|
729
|
-
|
|
728
|
+
if (!e.getHeader("authorization"))
|
|
729
|
+
return { data: void 0 };
|
|
730
|
+
const { data: o } = await n.me({});
|
|
731
|
+
return { data: o };
|
|
730
732
|
}
|
|
731
733
|
});
|
|
732
|
-
},
|
|
734
|
+
}, Zi = (t) => {
|
|
733
735
|
const { client: e, createRequestOptions: r } = t.createPromiseClient(Ar, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
734
736
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
735
|
-
},
|
|
737
|
+
}, eo = (t, e) => {
|
|
736
738
|
const { client: r, queryKey: n } = e.createPromiseClient(ot, { method: "get", params: [t] });
|
|
737
739
|
return e.nanoquery.createFetcherStore(n, {
|
|
738
740
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
739
741
|
});
|
|
740
|
-
},
|
|
742
|
+
}, to = (t, e) => {
|
|
741
743
|
const { client: r, queryKey: n } = e.createPromiseClient(ot, { method: "getOrganization", params: [t] });
|
|
742
744
|
return e.nanoquery.createFetcherStore(n, {
|
|
743
745
|
fetcher: async () => {
|
|
@@ -748,7 +750,7 @@ const Hi = (t, e) => {
|
|
|
748
750
|
} : void 0;
|
|
749
751
|
}
|
|
750
752
|
});
|
|
751
|
-
},
|
|
753
|
+
}, ro = (t, e) => {
|
|
752
754
|
const { client: r, queryKey: n } = e.createPromiseClient(ot, {
|
|
753
755
|
method: "getOrganizationAdvertising",
|
|
754
756
|
params: [t]
|
|
@@ -756,7 +758,7 @@ const Hi = (t, e) => {
|
|
|
756
758
|
return e.nanoquery.createFetcherStore(n, {
|
|
757
759
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
758
760
|
});
|
|
759
|
-
},
|
|
761
|
+
}, no = (t, e, r) => {
|
|
760
762
|
t.transport = new Jr(e.host, {
|
|
761
763
|
dedupeTime: 1e3 * 60 * 5,
|
|
762
764
|
refetchInterval: 1e3 * 60 * 5,
|
|
@@ -798,19 +800,19 @@ var ve;
|
|
|
798
800
|
(function(t) {
|
|
799
801
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
800
802
|
})(ve || (ve = {}));
|
|
801
|
-
const
|
|
802
|
-
const e = new je(), r = new re(U(e.getExternalToken()), "userKey"), n = new re(U(e.getToken()), "userToken"), i = new se(
|
|
803
|
+
const io = (t) => {
|
|
804
|
+
const e = new je(), r = new re(U(e.getExternalToken()), "userKey"), n = new re(U(e.getToken()), "userToken"), i = new se(Xi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
803
805
|
if (!a)
|
|
804
806
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
805
|
-
}), o = new se(
|
|
807
|
+
}), o = new se(eo(n.getStore(), t), "userSettings");
|
|
806
808
|
return {
|
|
807
809
|
userKey: r,
|
|
808
810
|
userToken: n,
|
|
809
811
|
user: i,
|
|
810
812
|
userSettings: o
|
|
811
813
|
};
|
|
812
|
-
},
|
|
813
|
-
const e = new re(U(void 0), "providerStreamId"), r = new se(
|
|
814
|
+
}, oo = (t) => {
|
|
815
|
+
const e = new re(U(void 0), "providerStreamId"), r = new se(Wi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new se(Yi(r.getAtomStore(), t), "streamSettings"), i = new se(Ji(r.getAtomStore(), t), "streamSettings");
|
|
814
816
|
return r.getAtomStore().listen((o) => {
|
|
815
817
|
(o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
|
|
816
818
|
}), {
|
|
@@ -819,8 +821,8 @@ const no = (t) => {
|
|
|
819
821
|
streamSettings: n,
|
|
820
822
|
streamSummary: i
|
|
821
823
|
};
|
|
822
|
-
},
|
|
823
|
-
const e = new re(U(void 0), "enabled"), r = new re(U(ve.DISABLED), "status"), n = new se(
|
|
824
|
+
}, so = (t) => {
|
|
825
|
+
const e = new re(U(void 0), "enabled"), r = new re(U(ve.DISABLED), "status"), n = new se(to(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new se(ro(n.getAtomStore(), t), "organizationAdvertising"), o = io(t), s = oo(t);
|
|
824
826
|
return {
|
|
825
827
|
enabled: e,
|
|
826
828
|
status: r,
|
|
@@ -836,10 +838,10 @@ const no = (t) => {
|
|
|
836
838
|
organizationAdvertising: i
|
|
837
839
|
};
|
|
838
840
|
};
|
|
839
|
-
class
|
|
841
|
+
class ao extends Nt {
|
|
840
842
|
stores;
|
|
841
843
|
constructor(e) {
|
|
842
|
-
const r =
|
|
844
|
+
const r = so(e), n = Ui(r);
|
|
843
845
|
super(n, "core"), this.stores = r;
|
|
844
846
|
}
|
|
845
847
|
getValue() {
|
|
@@ -860,17 +862,17 @@ class so extends Nt {
|
|
|
860
862
|
};
|
|
861
863
|
unsubscribe = () => this.getStore().off();
|
|
862
864
|
}
|
|
863
|
-
const
|
|
864
|
-
t.store = new
|
|
865
|
+
const uo = (t, e, r) => {
|
|
866
|
+
t.store = new ao(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
|
|
865
867
|
t.store.unsubscribe();
|
|
866
868
|
}, r();
|
|
867
|
-
},
|
|
868
|
-
const { client: e } = t.createPromiseClient(
|
|
869
|
+
}, co = (t) => {
|
|
870
|
+
const { client: e } = t.createPromiseClient(Ln, { method: "list" });
|
|
869
871
|
return (r) => e.list(r);
|
|
870
|
-
},
|
|
871
|
-
const { client: e } = t.createPromiseClient(
|
|
872
|
+
}, Mn = (t) => {
|
|
873
|
+
const { client: e } = t.createPromiseClient(Ln, { method: "summary" });
|
|
872
874
|
return (r) => e.summary(r);
|
|
873
|
-
},
|
|
875
|
+
}, lo = (t, e) => {
|
|
874
876
|
const { client: r, queryKey: n } = e.createPromiseClient(Ar, {
|
|
875
877
|
method: "getFriends",
|
|
876
878
|
params: [t]
|
|
@@ -886,7 +888,7 @@ const ao = (t, e, r) => {
|
|
|
886
888
|
}
|
|
887
889
|
}
|
|
888
890
|
});
|
|
889
|
-
},
|
|
891
|
+
}, fo = (t, e) => {
|
|
890
892
|
const { client: r, queryKey: n } = e.createPromiseClient(ee, { method: "get", params: [t] });
|
|
891
893
|
return e.nanoquery.createFetcherStore(n, {
|
|
892
894
|
fetcher: async (i, o, s) => (await r.get({
|
|
@@ -895,7 +897,7 @@ const ao = (t, e, r) => {
|
|
|
895
897
|
refetchInterval: 0,
|
|
896
898
|
dedupeTime: 1e3 * 60 * 60
|
|
897
899
|
});
|
|
898
|
-
},
|
|
900
|
+
}, po = (t, e, r) => {
|
|
899
901
|
const { client: n, queryKey: i } = r.createPromiseClient(ee, {
|
|
900
902
|
method: "syncQuestion",
|
|
901
903
|
params: [t, e ? "true" : ""]
|
|
@@ -916,17 +918,17 @@ const ao = (t, e, r) => {
|
|
|
916
918
|
// 10 minutes
|
|
917
919
|
refetchInterval: 0
|
|
918
920
|
});
|
|
919
|
-
},
|
|
921
|
+
}, ho = async (t, e) => {
|
|
920
922
|
const { client: r } = e.createPromiseClient(ee, { method: "item", params: [t] });
|
|
921
923
|
return (await r.item({
|
|
922
924
|
id: t
|
|
923
925
|
})).data;
|
|
924
|
-
},
|
|
926
|
+
}, yo = (t, e) => {
|
|
925
927
|
const { client: r } = e.createStreamClient(ee), n = Lt({ eventId: t.get() || "", feedId: "" });
|
|
926
928
|
return t.subscribe((o = "") => {
|
|
927
929
|
n.set({ eventId: o, feedId: "" });
|
|
928
930
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
929
|
-
},
|
|
931
|
+
}, mo = (t, e) => {
|
|
930
932
|
const { client: r } = e.createStreamClient(ee);
|
|
931
933
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
932
934
|
}, cr = async (t, e) => {
|
|
@@ -942,7 +944,7 @@ const ao = (t, e, r) => {
|
|
|
942
944
|
})).data?.attributes?.question,
|
|
943
945
|
dedupeTime: 1e3 * 60 * 5
|
|
944
946
|
});
|
|
945
|
-
},
|
|
947
|
+
}, Un = async (t, e) => {
|
|
946
948
|
if (!t)
|
|
947
949
|
return;
|
|
948
950
|
const { client: r } = e.createPromiseClient(ee, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
|
|
@@ -952,7 +954,7 @@ const ao = (t, e, r) => {
|
|
|
952
954
|
return;
|
|
953
955
|
const { options: i, notification: o, ...s } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
|
|
954
956
|
return { id: s.id, question: s, promotion: a, notification: o };
|
|
955
|
-
},
|
|
957
|
+
}, go = (t, e, r, n) => {
|
|
956
958
|
const { client: i, queryKey: o } = n.createPromiseClient(ee, {
|
|
957
959
|
method: "list",
|
|
958
960
|
params: [t, e, r ? "true" : ""]
|
|
@@ -968,7 +970,7 @@ const ao = (t, e, r) => {
|
|
|
968
970
|
dedupeTime: 0,
|
|
969
971
|
refetchInterval: 0
|
|
970
972
|
});
|
|
971
|
-
},
|
|
973
|
+
}, bo = (t, e) => {
|
|
972
974
|
const { client: r, queryKey: n } = e.createPromiseClient(ee, {
|
|
973
975
|
method: "list",
|
|
974
976
|
params: [t]
|
|
@@ -989,12 +991,12 @@ const ao = (t, e, r) => {
|
|
|
989
991
|
}
|
|
990
992
|
})).data?.[0];
|
|
991
993
|
if (u.type === "promotion")
|
|
992
|
-
return
|
|
994
|
+
return Un(u.id, e);
|
|
993
995
|
},
|
|
994
996
|
dedupeTime: 0,
|
|
995
997
|
refetchInterval: 0
|
|
996
998
|
});
|
|
997
|
-
},
|
|
999
|
+
}, vo = (t, e, r, n, i) => {
|
|
998
1000
|
const { client: o, queryKey: s } = i.createPromiseClient(ee, {
|
|
999
1001
|
method: "betPack",
|
|
1000
1002
|
params: [t, e, r]
|
|
@@ -1034,7 +1036,7 @@ const ao = (t, e, r) => {
|
|
|
1034
1036
|
dedupeTime: 0,
|
|
1035
1037
|
refetchInterval: 0
|
|
1036
1038
|
});
|
|
1037
|
-
},
|
|
1039
|
+
}, So = (t, e, r) => {
|
|
1038
1040
|
const n = qr([e, r], () => {
|
|
1039
1041
|
const a = e.get();
|
|
1040
1042
|
if (!a)
|
|
@@ -1070,7 +1072,7 @@ var At;
|
|
|
1070
1072
|
(function(t) {
|
|
1071
1073
|
t.SHOWED = "showed";
|
|
1072
1074
|
})(At || (At = {}));
|
|
1073
|
-
class
|
|
1075
|
+
class wo extends Je {
|
|
1074
1076
|
constructor() {
|
|
1075
1077
|
super("advertisement");
|
|
1076
1078
|
}
|
|
@@ -1079,7 +1081,7 @@ class So extends Je {
|
|
|
1079
1081
|
};
|
|
1080
1082
|
isViewed = (e) => this.read(At.SHOWED, e);
|
|
1081
1083
|
}
|
|
1082
|
-
const
|
|
1084
|
+
const Ao = (t) => {
|
|
1083
1085
|
const e = t.data?.attributes?.question;
|
|
1084
1086
|
if ((t.data?.attributes?.feedItem?.type === "promotion" ? t.data.attributes.feedItem : void 0) === void 0 || !e)
|
|
1085
1087
|
return;
|
|
@@ -1090,7 +1092,7 @@ const wo = (t) => {
|
|
|
1090
1092
|
notification: i,
|
|
1091
1093
|
promotion: s
|
|
1092
1094
|
};
|
|
1093
|
-
}, ft = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t,
|
|
1095
|
+
}, ft = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, Eo = ({ gamOptions: t, gamBaseUrl: e }) => {
|
|
1094
1096
|
const r = `${e}?`, n = [];
|
|
1095
1097
|
for (const i in t) {
|
|
1096
1098
|
const o = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), s = t[i];
|
|
@@ -1105,9 +1107,9 @@ const wo = (t) => {
|
|
|
1105
1107
|
}
|
|
1106
1108
|
}
|
|
1107
1109
|
return r + n.join("&");
|
|
1108
|
-
}, Be = (t) => (t?.promotion?.type === q.INGAME_IAB11_LBAR || t?.promotion?.type === q.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl,
|
|
1110
|
+
}, Be = (t) => (t?.promotion?.type === q.INGAME_IAB11_LBAR || t?.promotion?.type === q.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, Io = (t, e, r) => {
|
|
1109
1111
|
let n = !1;
|
|
1110
|
-
const i = r.transport, o = pe("advertisement"), s = new
|
|
1112
|
+
const i = r.transport, o = pe("advertisement"), s = new wo(), a = Z({}), u = bo(t, i), d = (m) => {
|
|
1111
1113
|
const g = a.get(), S = g.data?.question.id, F = g.data?.promotion?.type;
|
|
1112
1114
|
S && (B.emit("advertisement", {
|
|
1113
1115
|
action: "opened",
|
|
@@ -1144,7 +1146,7 @@ const wo = (t) => {
|
|
|
1144
1146
|
close: () => p(g.question.id),
|
|
1145
1147
|
togglePause: (S) => v(g.question.id, S),
|
|
1146
1148
|
isViewed: !!s.isViewed(g.question.id)
|
|
1147
|
-
}) : (a.setKey("loading", !0),
|
|
1149
|
+
}) : (a.setKey("loading", !0), Un(m, i).then((S) => a.set({
|
|
1148
1150
|
loading: !1,
|
|
1149
1151
|
error: void 0,
|
|
1150
1152
|
data: S,
|
|
@@ -1161,7 +1163,7 @@ const wo = (t) => {
|
|
|
1161
1163
|
a.subscribe((m, g) => {
|
|
1162
1164
|
if (!(m.data?.id === g?.data?.id && m.isPaused !== g?.isPaused)) {
|
|
1163
1165
|
if (m.data?.promotion?.type === q.EXTERNAL_AD && !m?.externalAd && m.data.promotion.adCampaigns?.gamOptions && m.data.promotion.adCampaigns?.gamBaseUrl) {
|
|
1164
|
-
const S =
|
|
1166
|
+
const S = Eo(m.data.promotion.adCampaigns);
|
|
1165
1167
|
a.setKey("externalAd", { type: "gam", url: S });
|
|
1166
1168
|
}
|
|
1167
1169
|
m.data?.promotion && !m.isOpened && (B.emit("advertisement", {
|
|
@@ -1204,7 +1206,7 @@ const wo = (t) => {
|
|
|
1204
1206
|
n || (n = !0, u.subscribe((m, g) => {
|
|
1205
1207
|
m.data && (!g?.data || m.data.id !== g.data.id) && f(m.data.question.id, m.data);
|
|
1206
1208
|
}), e.addListener("promotion", (m) => {
|
|
1207
|
-
const g =
|
|
1209
|
+
const g = Ao(m);
|
|
1208
1210
|
if (g) {
|
|
1209
1211
|
if (g.question.status === G.RESOLVED) {
|
|
1210
1212
|
p(g.question.id), o.debug({ promotion: g }, "resolved: %o");
|
|
@@ -1223,7 +1225,7 @@ var ce;
|
|
|
1223
1225
|
(function(t) {
|
|
1224
1226
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.BET_PACK_ITEM_RECEIVED = "bp-item-received", t.QUESTION_OPENED = "q-opened";
|
|
1225
1227
|
})(ce || (ce = {}));
|
|
1226
|
-
class
|
|
1228
|
+
class Oo extends Je {
|
|
1227
1229
|
constructor() {
|
|
1228
1230
|
super("gamification-session", window.sessionStorage);
|
|
1229
1231
|
}
|
|
@@ -1232,10 +1234,10 @@ class Io extends Je {
|
|
|
1232
1234
|
};
|
|
1233
1235
|
readValue = (e) => this.read(...e);
|
|
1234
1236
|
}
|
|
1235
|
-
class
|
|
1237
|
+
class To extends Je {
|
|
1236
1238
|
sessionStorage;
|
|
1237
1239
|
constructor() {
|
|
1238
|
-
super("gamification"), this.sessionStorage = new
|
|
1240
|
+
super("gamification"), this.sessionStorage = new Oo();
|
|
1239
1241
|
}
|
|
1240
1242
|
saveBetPackQuestionReceived = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1241
1243
|
this.write(ce.BET_PACK_ITEM_RECEIVED, n, e, r, i);
|
|
@@ -1258,7 +1260,7 @@ var Oe;
|
|
|
1258
1260
|
(function(t) {
|
|
1259
1261
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1260
1262
|
})(Oe || (Oe = {}));
|
|
1261
|
-
class
|
|
1263
|
+
class _o {
|
|
1262
1264
|
/** sl event id */
|
|
1263
1265
|
slStreamId;
|
|
1264
1266
|
/** organization id */
|
|
@@ -1293,10 +1295,10 @@ class To {
|
|
|
1293
1295
|
transport;
|
|
1294
1296
|
cancels = /* @__PURE__ */ new Set();
|
|
1295
1297
|
constructor(e) {
|
|
1296
|
-
this.transport = e.transport, this.log = pe("gamification-background"), this.storage = new
|
|
1298
|
+
this.transport = e.transport, this.log = pe("gamification-background"), this.storage = new To(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new re(U(void 0), "moderationId").getStore(), this.interactiveAllowed = new re(U(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new re(U(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new se(fo(this.slStreamId, e.transport), "gamification:moderation");
|
|
1297
1299
|
const r = !!e.sdk.options.get().betPack;
|
|
1298
|
-
this.feedList = new se(
|
|
1299
|
-
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.questionSubscription =
|
|
1300
|
+
this.feedList = new se(go(this.slStreamId, this.interactiveAllowed, r, e.transport), "gamification:feedList"), this.betPack = new se(vo(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = po(this.slStreamId, r, e.transport), this.openedQuestion = So(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
|
|
1301
|
+
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.questionSubscription = mo(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", async (i) => {
|
|
1300
1302
|
const o = i.data?.attributes?.question;
|
|
1301
1303
|
if (this.openedQuestion.updateExtendedQuestion(o), o?.type === I.PREDICTION && (o.status === G.ACTIVE || o.status === G.RESOLVED)) {
|
|
1302
1304
|
const s = this.betPack.getValues().data || {};
|
|
@@ -1314,7 +1316,7 @@ class To {
|
|
|
1314
1316
|
}
|
|
1315
1317
|
}
|
|
1316
1318
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1317
|
-
})), this.feedSubscription =
|
|
1319
|
+
})), this.feedSubscription = yo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
|
|
1318
1320
|
const i = n.data?.attributes?.question;
|
|
1319
1321
|
if (i?.type === I.PREDICTION && (i.status === G.ACTIVE || i.status === G.RESOLVED)) {
|
|
1320
1322
|
const o = this.betPack.getValues().data || {};
|
|
@@ -1374,7 +1376,7 @@ class To {
|
|
|
1374
1376
|
this.activeQuestionId.off();
|
|
1375
1377
|
for (const n of this.cancels)
|
|
1376
1378
|
n(), this.cancels.delete(n);
|
|
1377
|
-
}), r || (this.advertisement =
|
|
1379
|
+
}), r || (this.advertisement = Io(this.slStreamId, this.feedSubscription, e));
|
|
1378
1380
|
}
|
|
1379
1381
|
/**
|
|
1380
1382
|
* Get id for notifications and link with current session
|
|
@@ -1404,7 +1406,7 @@ class To {
|
|
|
1404
1406
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1405
1407
|
};
|
|
1406
1408
|
}
|
|
1407
|
-
class
|
|
1409
|
+
class ko {
|
|
1408
1410
|
notificationsList;
|
|
1409
1411
|
store;
|
|
1410
1412
|
timeouts;
|
|
@@ -1504,7 +1506,7 @@ var Et;
|
|
|
1504
1506
|
(function(t) {
|
|
1505
1507
|
t.OPENED = "opened";
|
|
1506
1508
|
})(Et || (Et = {}));
|
|
1507
|
-
class
|
|
1509
|
+
class Po extends Je {
|
|
1508
1510
|
constructor() {
|
|
1509
1511
|
super("notification");
|
|
1510
1512
|
}
|
|
@@ -1516,11 +1518,11 @@ class ko extends Je {
|
|
|
1516
1518
|
this.clear();
|
|
1517
1519
|
};
|
|
1518
1520
|
}
|
|
1519
|
-
class
|
|
1521
|
+
class Co {
|
|
1520
1522
|
queue;
|
|
1521
1523
|
storage;
|
|
1522
1524
|
constructor(e = {}) {
|
|
1523
|
-
this.storage = new
|
|
1525
|
+
this.storage = new Po(), this.queue = new ko({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1524
1526
|
}
|
|
1525
1527
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1526
1528
|
add = (e) => {
|
|
@@ -1557,8 +1559,8 @@ class Po {
|
|
|
1557
1559
|
this.storage.setOpened(e);
|
|
1558
1560
|
};
|
|
1559
1561
|
}
|
|
1560
|
-
const
|
|
1561
|
-
t.notifications = new
|
|
1562
|
+
const Lo = (t, e, r) => {
|
|
1563
|
+
t.notifications = new Co(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1562
1564
|
t.notifications.queue.drain();
|
|
1563
1565
|
}), r();
|
|
1564
1566
|
};
|
|
@@ -1573,20 +1575,20 @@ const Xr = async (t, e) => {
|
|
|
1573
1575
|
} catch (o) {
|
|
1574
1576
|
throw it.from(o)?.code === oe.AlreadyExists ? new Error(He.ALREADY_VOTED) : new Error(He.UNKNOWN);
|
|
1575
1577
|
}
|
|
1576
|
-
},
|
|
1578
|
+
}, qn = (t, e) => {
|
|
1577
1579
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(ee, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1578
1580
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1579
|
-
},
|
|
1581
|
+
}, No = {
|
|
1580
1582
|
pageSize: 10
|
|
1581
|
-
},
|
|
1583
|
+
}, Fo = (t, e, r, n, i) => {
|
|
1582
1584
|
let o = 0;
|
|
1583
|
-
const s = U({ pageSize:
|
|
1585
|
+
const s = U({ pageSize: No.pageSize, page: 0 }), a = Z({
|
|
1584
1586
|
data: [],
|
|
1585
1587
|
key: Date.now(),
|
|
1586
1588
|
hasMore: !0,
|
|
1587
1589
|
loading: void 0,
|
|
1588
1590
|
error: void 0
|
|
1589
|
-
}), u =
|
|
1591
|
+
}), u = co(t), d = async () => {
|
|
1590
1592
|
const p = e.get(), v = n?.getStore().get().data?.map((w) => w.slId) || [];
|
|
1591
1593
|
if (p && v?.length) {
|
|
1592
1594
|
const w = r.get();
|
|
@@ -1618,7 +1620,7 @@ const Xr = async (t, e) => {
|
|
|
1618
1620
|
};
|
|
1619
1621
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1620
1622
|
};
|
|
1621
|
-
class
|
|
1623
|
+
class Do extends Je {
|
|
1622
1624
|
get = this.read;
|
|
1623
1625
|
set = this.write;
|
|
1624
1626
|
del = this.remove;
|
|
@@ -1626,12 +1628,12 @@ class Fo extends Je {
|
|
|
1626
1628
|
super("deep-link-context", window.sessionStorage);
|
|
1627
1629
|
}
|
|
1628
1630
|
}
|
|
1629
|
-
const Zr = "sldl", Ft = "sldl_uid",
|
|
1631
|
+
const Zr = "sldl", Ft = "sldl_uid", jn = "sldl_eid", xn = "sldl_e_eid", Ro = /* @__PURE__ */ new Set([Ft, jn, xn]), en = (t) => {
|
|
1630
1632
|
const e = {}, r = {};
|
|
1631
1633
|
for (const [n, i] of t)
|
|
1632
|
-
|
|
1634
|
+
Ro.has(n) ? e[n] = i : r[n] = i;
|
|
1633
1635
|
return { result: e, remain: r };
|
|
1634
|
-
},
|
|
1636
|
+
}, Vo = ({ hash: t, search: e }) => {
|
|
1635
1637
|
if (t && t.includes(Zr)) {
|
|
1636
1638
|
const r = new URLSearchParams(t.substr(1));
|
|
1637
1639
|
return { hash: en(r) };
|
|
@@ -1648,10 +1650,10 @@ const Zr = "sldl", Ft = "sldl_uid", qn = "sldl_eid", jn = "sldl_e_eid", Do = /*
|
|
|
1648
1650
|
trace: (...t) => {
|
|
1649
1651
|
tn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1650
1652
|
}
|
|
1651
|
-
},
|
|
1653
|
+
}, $o = (t, e) => {
|
|
1652
1654
|
const { hash: r, search: n } = window.location;
|
|
1653
1655
|
if (fe.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1654
|
-
const i =
|
|
1656
|
+
const i = Vo({ hash: r, search: n });
|
|
1655
1657
|
if (fe.debug(i, "parse deep link result"), i) {
|
|
1656
1658
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1657
1659
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1670,8 +1672,8 @@ const Zr = "sldl", Ft = "sldl_uid", qn = "sldl_eid", jn = "sldl_e_eid", Do = /*
|
|
|
1670
1672
|
}
|
|
1671
1673
|
}
|
|
1672
1674
|
t.setValue("parsed", !0);
|
|
1673
|
-
},
|
|
1674
|
-
const n = new
|
|
1675
|
+
}, Bo = (t, e, r) => {
|
|
1676
|
+
const n = new Do(), i = n.get("sl-deep-link-store");
|
|
1675
1677
|
let o = {};
|
|
1676
1678
|
if (i)
|
|
1677
1679
|
try {
|
|
@@ -1709,15 +1711,15 @@ const Zr = "sldl", Ft = "sldl_uid", qn = "sldl_eid", jn = "sldl_e_eid", Do = /*
|
|
|
1709
1711
|
console.error(d);
|
|
1710
1712
|
}
|
|
1711
1713
|
};
|
|
1712
|
-
|
|
1713
|
-
},
|
|
1714
|
-
class
|
|
1714
|
+
$o(t.deepLink.$store, s), r();
|
|
1715
|
+
}, Mo = pe("bypass");
|
|
1716
|
+
class Uo extends Mi {
|
|
1715
1717
|
$coreStore;
|
|
1716
1718
|
deepLink;
|
|
1717
1719
|
transport;
|
|
1718
1720
|
bypassLogin;
|
|
1719
1721
|
constructor(e, r, n) {
|
|
1720
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1722
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Zi(this.transport), this.connect();
|
|
1721
1723
|
}
|
|
1722
1724
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1723
1725
|
/**
|
|
@@ -1729,7 +1731,7 @@ class Mo extends Bi {
|
|
|
1729
1731
|
login = async (e, r) => {
|
|
1730
1732
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1731
1733
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Ft];
|
|
1732
|
-
|
|
1734
|
+
Mo.debug({ inviterKey: o }, "login with inviterKey");
|
|
1733
1735
|
const s = await this.bypassLogin({
|
|
1734
1736
|
schema: e,
|
|
1735
1737
|
userKey: r,
|
|
@@ -1799,8 +1801,8 @@ class Mo extends Bi {
|
|
|
1799
1801
|
});
|
|
1800
1802
|
};
|
|
1801
1803
|
}
|
|
1802
|
-
const et = new je(),
|
|
1803
|
-
t.auth = new
|
|
1804
|
+
const et = new je(), qo = (t, e, r) => {
|
|
1805
|
+
t.auth = new Uo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1804
1806
|
n === ve.READY && t.auth.reLogin();
|
|
1805
1807
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1806
1808
|
if (!(et.getSchema() === n && et.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1819,7 +1821,7 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
1819
1821
|
trace: (...t) => {
|
|
1820
1822
|
rn.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1821
1823
|
}
|
|
1822
|
-
},
|
|
1824
|
+
}, jo = (t, e, r) => {
|
|
1823
1825
|
t.videoPlayer = {
|
|
1824
1826
|
controllers: /* @__PURE__ */ new Set()
|
|
1825
1827
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1837,13 +1839,13 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
1837
1839
|
}
|
|
1838
1840
|
}
|
|
1839
1841
|
}, r();
|
|
1840
|
-
},
|
|
1842
|
+
}, xo = {
|
|
1841
1843
|
[I.FACTOID]: "insight",
|
|
1842
1844
|
[I.POLL]: "poll",
|
|
1843
1845
|
[I.TRIVIA]: "trivia",
|
|
1844
1846
|
[I.PREDICTION]: "prediction",
|
|
1845
1847
|
[I.TWEET]: "tweet"
|
|
1846
|
-
},
|
|
1848
|
+
}, Qo = (t, e, r) => {
|
|
1847
1849
|
t.sdk.uiState = Z({}), t.ui = {
|
|
1848
1850
|
enableAppNotification: function() {
|
|
1849
1851
|
t.sdk.uiState.setKey("appNotification", !0);
|
|
@@ -1877,7 +1879,7 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
1877
1879
|
};
|
|
1878
1880
|
t.onQuestionActivate = ({ questionType: i, ...o }) => {
|
|
1879
1881
|
if (t.ui.onContentActivate) {
|
|
1880
|
-
const s = o.type || i &&
|
|
1882
|
+
const s = o.type || i && xo[i] || "question";
|
|
1881
1883
|
t.ui.enableAppNotification(), t.ui.onContentActivate({ ...o, type: s });
|
|
1882
1884
|
}
|
|
1883
1885
|
}, t.sdk.onMount({ name: "ui" }, () => {
|
|
@@ -1977,7 +1979,7 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
1977
1979
|
o(), s();
|
|
1978
1980
|
};
|
|
1979
1981
|
}), r();
|
|
1980
|
-
},
|
|
1982
|
+
}, Go = (t, e, r) => {
|
|
1981
1983
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1982
1984
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = Z(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1983
1985
|
if (i.has(s)) {
|
|
@@ -2004,7 +2006,7 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
2004
2006
|
}, t.sdk.createEventSession = (s) => {
|
|
2005
2007
|
t.stores.providerStreamId.setValue(s);
|
|
2006
2008
|
}, r();
|
|
2007
|
-
},
|
|
2009
|
+
}, Ko = (t, e) => {
|
|
2008
2010
|
const { client: r, queryKey: n } = t.createPromiseClient(ot, {
|
|
2009
2011
|
method: "generateDeepLink",
|
|
2010
2012
|
params: e
|
|
@@ -2025,21 +2027,21 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
2025
2027
|
// 24 hours
|
|
2026
2028
|
refetchInterval: 0
|
|
2027
2029
|
});
|
|
2028
|
-
},
|
|
2029
|
-
const { client: n } = t.createPromiseClient(
|
|
2030
|
+
}, zo = (t, { web: e, mobile: r }) => {
|
|
2031
|
+
const { client: n } = t.createPromiseClient(Ci, { method: "generate" });
|
|
2030
2032
|
return n.generate({ web: e, mobile: r });
|
|
2031
2033
|
}, nn = (t, e) => {
|
|
2032
2034
|
const r = new URLSearchParams(t);
|
|
2033
2035
|
for (const [n, i] of Object.entries(e))
|
|
2034
2036
|
r.append(n, i);
|
|
2035
2037
|
return r.toString();
|
|
2036
|
-
},
|
|
2038
|
+
}, Ho = (t, e, r, n) => {
|
|
2037
2039
|
const i = Z({});
|
|
2038
|
-
return wr(i, () =>
|
|
2040
|
+
return wr(i, () => Ko(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
|
|
2039
2041
|
const d = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
|
|
2040
2042
|
[Ft]: c,
|
|
2041
|
-
[
|
|
2042
|
-
[
|
|
2043
|
+
[jn]: f,
|
|
2044
|
+
[xn]: p
|
|
2043
2045
|
};
|
|
2044
2046
|
if (!u && d) {
|
|
2045
2047
|
i.setKey("loading", !0);
|
|
@@ -2047,7 +2049,7 @@ const et = new je(), Uo = (t, e, r) => {
|
|
|
2047
2049
|
w && m || m ? w = `?${nn(w, v)}` : m = `#${nn("", v)}`;
|
|
2048
2050
|
const g = window.location.origin + window.location.pathname + w + m;
|
|
2049
2051
|
try {
|
|
2050
|
-
const S = await
|
|
2052
|
+
const S = await zo(t, { web: g, mobile: d });
|
|
2051
2053
|
i.set({
|
|
2052
2054
|
data: S.data?.link,
|
|
2053
2055
|
loading: !1
|
|
@@ -2067,7 +2069,7 @@ var $;
|
|
|
2067
2069
|
(function(t) {
|
|
2068
2070
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2069
2071
|
})($ || ($ = {}));
|
|
2070
|
-
const
|
|
2072
|
+
const Wo = (t, e, r, n) => {
|
|
2071
2073
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2072
2074
|
i && r.add({
|
|
2073
2075
|
type: Ae.ONBOARDING,
|
|
@@ -2109,7 +2111,7 @@ const Ho = (t, e, r, n) => {
|
|
|
2109
2111
|
organizationId: d,
|
|
2110
2112
|
userId: u,
|
|
2111
2113
|
eventId: c
|
|
2112
|
-
}, $.Completed),
|
|
2114
|
+
}, $.Completed), qn(s, c));
|
|
2113
2115
|
return;
|
|
2114
2116
|
}
|
|
2115
2117
|
const p = e.moderation.getStore().value?.data, v = r.featureSettings.get().inplayGame;
|
|
@@ -2124,7 +2126,7 @@ const Ho = (t, e, r, n) => {
|
|
|
2124
2126
|
let o = !!i?.skipOnboarding;
|
|
2125
2127
|
const s = e.storage, a = U($.Unset);
|
|
2126
2128
|
a.subscribe((c) => {
|
|
2127
|
-
c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (
|
|
2129
|
+
c !== $.Unset && (c === $.Optional || c === $.Required ? o === !1 && (Wo(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === $.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
|
|
2128
2130
|
userId: e.userId.get() || "",
|
|
2129
2131
|
organizationId: e.organizationId.get() || "",
|
|
2130
2132
|
eventId: e.slStreamId.get() || ""
|
|
@@ -2140,7 +2142,7 @@ const Ho = (t, e, r, n) => {
|
|
|
2140
2142
|
}))), ht(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
|
|
2141
2143
|
const c = e.slStreamId.get();
|
|
2142
2144
|
if (c) {
|
|
2143
|
-
await
|
|
2145
|
+
await qn(r, c), a.set($.Completed), s.saveOnboardingStatus({
|
|
2144
2146
|
organizationId: e.organizationId.get() || "",
|
|
2145
2147
|
userId: e.userId.get() || "",
|
|
2146
2148
|
eventId: c
|
|
@@ -2152,8 +2154,8 @@ const Ho = (t, e, r, n) => {
|
|
|
2152
2154
|
n.close(f);
|
|
2153
2155
|
}
|
|
2154
2156
|
} };
|
|
2155
|
-
},
|
|
2156
|
-
const i = Z(void 0), o =
|
|
2157
|
+
}, Yo = (t, e, r, n) => {
|
|
2158
|
+
const i = Z(void 0), o = Mn(n), s = async () => {
|
|
2157
2159
|
const u = t.get(), d = e.get(), c = r ? r.getStore().get().data?.map((v) => v.slId) : [];
|
|
2158
2160
|
if (!c || !u || !d)
|
|
2159
2161
|
return;
|
|
@@ -2173,15 +2175,15 @@ const Ho = (t, e, r, n) => {
|
|
|
2173
2175
|
u(), d?.(), c();
|
|
2174
2176
|
};
|
|
2175
2177
|
}), { $store: i, invalidate: a };
|
|
2176
|
-
},
|
|
2177
|
-
const o =
|
|
2178
|
+
}, Jo = async (t, e, r, n, i) => {
|
|
2179
|
+
const o = Mn(i), s = t.get(), a = e.get(), u = r?.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
2178
2180
|
eventId: s,
|
|
2179
2181
|
userId: n,
|
|
2180
2182
|
usersIds: [...u, a]
|
|
2181
2183
|
};
|
|
2182
2184
|
return (await o(d)).data?.attributes?.summary;
|
|
2183
|
-
},
|
|
2184
|
-
class Xo extends
|
|
2185
|
+
}, sn = /* @__PURE__ */ new Set([I.POLL, I.PREDICTION, I.TRIVIA]);
|
|
2186
|
+
class Xo extends $n {
|
|
2185
2187
|
/** user statistics (leaderboard panel) */
|
|
2186
2188
|
userSummary;
|
|
2187
2189
|
/** feed list (pick history) */
|
|
@@ -2222,9 +2224,9 @@ class Xo extends Vn {
|
|
|
2222
2224
|
cancels = /* @__PURE__ */ new Set();
|
|
2223
2225
|
onQuestionActivate;
|
|
2224
2226
|
constructor(e, r, n) {
|
|
2225
|
-
if (super(e, r), this.background = new
|
|
2226
|
-
this.friends = new se(
|
|
2227
|
-
const i = this.leaderboardList =
|
|
2227
|
+
if (super(e, r), this.background = new _o(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = U(!n.sdk.withAuth), this.leaderboardId = new re(U(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Ho(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = Yo(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
|
|
2228
|
+
this.friends = new se(lo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = U(void 0);
|
|
2229
|
+
const i = this.leaderboardList = Fo(this.transport, this.background.slStreamId, this.background.userId, this.friends);
|
|
2228
2230
|
this.cancels.add(this.userSummary.$store.listen((o, s) => {
|
|
2229
2231
|
s?.summary && o?.summary && i.invalidate();
|
|
2230
2232
|
}));
|
|
@@ -2313,7 +2315,7 @@ class Xo extends Vn {
|
|
|
2313
2315
|
}
|
|
2314
2316
|
})), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
|
|
2315
2317
|
const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
|
|
2316
|
-
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== G.ACTIVE && n.attributes.status !== G.RESOLVED)) {
|
|
2318
|
+
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== G.ACTIVE && n.attributes.status !== G.RESOLVED) && !(!this.isInteractiveAllowed && sn.has(n.attributes.type))) {
|
|
2317
2319
|
if (i !== -1)
|
|
2318
2320
|
if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
|
|
2319
2321
|
const o = r[i];
|
|
@@ -2465,7 +2467,7 @@ class Xo extends Vn {
|
|
|
2465
2467
|
openedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom
|
|
2466
2468
|
} : void 0);
|
|
2467
2469
|
};
|
|
2468
|
-
getFeedItem = (e) =>
|
|
2470
|
+
getFeedItem = (e) => ho(e, this.transport);
|
|
2469
2471
|
isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
|
|
2470
2472
|
closeQuestion = (e) => (e && this.onQuestionActivate({
|
|
2471
2473
|
stage: "deactivate",
|
|
@@ -2489,7 +2491,7 @@ class Xo extends Vn {
|
|
|
2489
2491
|
}
|
|
2490
2492
|
const n = { ...r };
|
|
2491
2493
|
try {
|
|
2492
|
-
const i = await
|
|
2494
|
+
const i = await Jo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2493
2495
|
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);
|
|
2494
2496
|
} catch (i) {
|
|
2495
2497
|
console.error(i);
|
|
@@ -2507,8 +2509,8 @@ class Xo extends Vn {
|
|
|
2507
2509
|
*/
|
|
2508
2510
|
showInApp = (e) => {
|
|
2509
2511
|
const r = this.onboardingStatus.$store.get();
|
|
2510
|
-
if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !==
|
|
2511
|
-
if (
|
|
2512
|
+
if (e && e.data && r && r !== $.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Oi.ON && e.data.question.status === G.ACTIVE && !e.data.question.marketClosed) {
|
|
2513
|
+
if (sn.has(e.data.question.type))
|
|
2512
2514
|
this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
|
|
2513
2515
|
type: Ae.QUESTION,
|
|
2514
2516
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2560,7 +2562,7 @@ class Xo extends Vn {
|
|
|
2560
2562
|
questionType: e.data.question.type,
|
|
2561
2563
|
insight: s,
|
|
2562
2564
|
inApp: {
|
|
2563
|
-
useMediaFromContent: n?.useAsNotification ===
|
|
2565
|
+
useMediaFromContent: n?.useAsNotification === Ti.ENABLED,
|
|
2564
2566
|
notification: e.data.question.notification,
|
|
2565
2567
|
appearance: e.data.question.appearance,
|
|
2566
2568
|
sponsorship: e.data.question.sponsorship
|
|
@@ -2614,7 +2616,7 @@ class Xo extends Vn {
|
|
|
2614
2616
|
const Zo = {
|
|
2615
2617
|
[R.GAMES]: !0
|
|
2616
2618
|
};
|
|
2617
|
-
class es extends
|
|
2619
|
+
class es extends $n {
|
|
2618
2620
|
constructor(e, r) {
|
|
2619
2621
|
super(e, r);
|
|
2620
2622
|
}
|
|
@@ -3056,7 +3058,7 @@ class cs {
|
|
|
3056
3058
|
}
|
|
3057
3059
|
const ds = ({ transport: t, $commonStore: e }) => {
|
|
3058
3060
|
let r;
|
|
3059
|
-
const n = U(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(
|
|
3061
|
+
const n = U(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(Nn, {
|
|
3060
3062
|
method: "send",
|
|
3061
3063
|
params: [n]
|
|
3062
3064
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -3106,7 +3108,7 @@ class ls {
|
|
|
3106
3108
|
connected = !1;
|
|
3107
3109
|
constructor(e) {
|
|
3108
3110
|
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Ce(Z({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = ds({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new us(this), this.polls = new cs(this), this.invitation = new ns(this), this.interactions = new is(this), this.advertisement = new ss(this);
|
|
3109
|
-
const { client: r } = e.analyticsTransport.createPromiseClient(
|
|
3111
|
+
const { client: r } = e.analyticsTransport.createPromiseClient(Nn, {
|
|
3110
3112
|
method: "send"
|
|
3111
3113
|
});
|
|
3112
3114
|
this.analyticsClient = r;
|
|
@@ -3173,7 +3175,7 @@ function hs(t) {
|
|
|
3173
3175
|
};
|
|
3174
3176
|
}
|
|
3175
3177
|
var ys = hs, ms = ys;
|
|
3176
|
-
function
|
|
3178
|
+
function Qn(t, e, r) {
|
|
3177
3179
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
3178
3180
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
3179
3181
|
var n = ms(gs), i = null, o = null, s = 0, a = null, u = {
|
|
@@ -3273,7 +3275,7 @@ function bs(t, e, r) {
|
|
|
3273
3275
|
f(null, p);
|
|
3274
3276
|
}, f);
|
|
3275
3277
|
}
|
|
3276
|
-
var i =
|
|
3278
|
+
var i = Qn(t, n, r), o = i.push, s = i.unshift;
|
|
3277
3279
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
3278
3280
|
function a(c) {
|
|
3279
3281
|
var f = new Promise(function(p, v) {
|
|
@@ -3312,9 +3314,9 @@ function bs(t, e, r) {
|
|
|
3312
3314
|
return f;
|
|
3313
3315
|
}
|
|
3314
3316
|
}
|
|
3315
|
-
Or.exports =
|
|
3317
|
+
Or.exports = Qn;
|
|
3316
3318
|
Or.exports.promise = bs;
|
|
3317
|
-
var
|
|
3319
|
+
var Gn = Or.exports, Tr = { exports: {} }, Ke = typeof Reflect == "object" ? Reflect : null, an = Ke && typeof Ke.apply == "function" ? Ke.apply : function(e, r, n) {
|
|
3318
3320
|
return Function.prototype.apply.call(e, r, n);
|
|
3319
3321
|
}, mt;
|
|
3320
3322
|
Ke && typeof Ke.ownKeys == "function" ? mt = Ke.ownKeys : Object.getOwnPropertySymbols ? mt = function(e) {
|
|
@@ -3325,7 +3327,7 @@ Ke && typeof Ke.ownKeys == "function" ? mt = Ke.ownKeys : Object.getOwnPropertyS
|
|
|
3325
3327
|
function vs(t) {
|
|
3326
3328
|
console && console.warn && console.warn(t);
|
|
3327
3329
|
}
|
|
3328
|
-
var
|
|
3330
|
+
var Kn = Number.isNaN || function(e) {
|
|
3329
3331
|
return e !== e;
|
|
3330
3332
|
};
|
|
3331
3333
|
function N() {
|
|
@@ -3337,7 +3339,7 @@ N.EventEmitter = N;
|
|
|
3337
3339
|
N.prototype._events = void 0;
|
|
3338
3340
|
N.prototype._eventsCount = 0;
|
|
3339
3341
|
N.prototype._maxListeners = void 0;
|
|
3340
|
-
var
|
|
3342
|
+
var un = 10;
|
|
3341
3343
|
function Dt(t) {
|
|
3342
3344
|
if (typeof t != "function")
|
|
3343
3345
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
@@ -3345,27 +3347,27 @@ function Dt(t) {
|
|
|
3345
3347
|
Object.defineProperty(N, "defaultMaxListeners", {
|
|
3346
3348
|
enumerable: !0,
|
|
3347
3349
|
get: function() {
|
|
3348
|
-
return
|
|
3350
|
+
return un;
|
|
3349
3351
|
},
|
|
3350
3352
|
set: function(t) {
|
|
3351
|
-
if (typeof t != "number" || t < 0 ||
|
|
3353
|
+
if (typeof t != "number" || t < 0 || Kn(t))
|
|
3352
3354
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3353
|
-
|
|
3355
|
+
un = t;
|
|
3354
3356
|
}
|
|
3355
3357
|
});
|
|
3356
3358
|
N.init = function() {
|
|
3357
3359
|
(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;
|
|
3358
3360
|
};
|
|
3359
3361
|
N.prototype.setMaxListeners = function(e) {
|
|
3360
|
-
if (typeof e != "number" || e < 0 ||
|
|
3362
|
+
if (typeof e != "number" || e < 0 || Kn(e))
|
|
3361
3363
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3362
3364
|
return this._maxListeners = e, this;
|
|
3363
3365
|
};
|
|
3364
|
-
function
|
|
3366
|
+
function zn(t) {
|
|
3365
3367
|
return t._maxListeners === void 0 ? N.defaultMaxListeners : t._maxListeners;
|
|
3366
3368
|
}
|
|
3367
3369
|
N.prototype.getMaxListeners = function() {
|
|
3368
|
-
return
|
|
3370
|
+
return zn(this);
|
|
3369
3371
|
};
|
|
3370
3372
|
N.prototype.emit = function(e) {
|
|
3371
3373
|
for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
|
|
@@ -3385,13 +3387,13 @@ N.prototype.emit = function(e) {
|
|
|
3385
3387
|
if (u === void 0)
|
|
3386
3388
|
return !1;
|
|
3387
3389
|
if (typeof u == "function")
|
|
3388
|
-
|
|
3390
|
+
an(u, this, r);
|
|
3389
3391
|
else
|
|
3390
|
-
for (var d = u.length, c =
|
|
3391
|
-
|
|
3392
|
+
for (var d = u.length, c = Xn(u, d), n = 0; n < d; ++n)
|
|
3393
|
+
an(c[n], this, r);
|
|
3392
3394
|
return !0;
|
|
3393
3395
|
};
|
|
3394
|
-
function
|
|
3396
|
+
function Hn(t, e, r, n) {
|
|
3395
3397
|
var i, o, s;
|
|
3396
3398
|
if (Dt(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3397
3399
|
"newListener",
|
|
@@ -3399,7 +3401,7 @@ function zn(t, e, r, n) {
|
|
|
3399
3401
|
r.listener ? r.listener : r
|
|
3400
3402
|
), o = t._events), s = o[e]), s === void 0)
|
|
3401
3403
|
s = o[e] = r, ++t._eventsCount;
|
|
3402
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
3404
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = zn(t), i > 0 && s.length > i && !s.warned) {
|
|
3403
3405
|
s.warned = !0;
|
|
3404
3406
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3405
3407
|
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, vs(a);
|
|
@@ -3407,25 +3409,25 @@ function zn(t, e, r, n) {
|
|
|
3407
3409
|
return t;
|
|
3408
3410
|
}
|
|
3409
3411
|
N.prototype.addListener = function(e, r) {
|
|
3410
|
-
return
|
|
3412
|
+
return Hn(this, e, r, !1);
|
|
3411
3413
|
};
|
|
3412
3414
|
N.prototype.on = N.prototype.addListener;
|
|
3413
3415
|
N.prototype.prependListener = function(e, r) {
|
|
3414
|
-
return
|
|
3416
|
+
return Hn(this, e, r, !0);
|
|
3415
3417
|
};
|
|
3416
3418
|
function Ss() {
|
|
3417
3419
|
if (!this.fired)
|
|
3418
3420
|
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);
|
|
3419
3421
|
}
|
|
3420
|
-
function
|
|
3422
|
+
function Wn(t, e, r) {
|
|
3421
3423
|
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Ss.bind(n);
|
|
3422
3424
|
return i.listener = r, n.wrapFn = i, i;
|
|
3423
3425
|
}
|
|
3424
3426
|
N.prototype.once = function(e, r) {
|
|
3425
|
-
return Dt(r), this.on(e,
|
|
3427
|
+
return Dt(r), this.on(e, Wn(this, e, r)), this;
|
|
3426
3428
|
};
|
|
3427
3429
|
N.prototype.prependOnceListener = function(e, r) {
|
|
3428
|
-
return Dt(r), this.prependListener(e,
|
|
3430
|
+
return Dt(r), this.prependListener(e, Wn(this, e, r)), this;
|
|
3429
3431
|
};
|
|
3430
3432
|
N.prototype.removeListener = function(e, r) {
|
|
3431
3433
|
var n, i, o, s, a;
|
|
@@ -3467,24 +3469,24 @@ N.prototype.removeAllListeners = function(e) {
|
|
|
3467
3469
|
this.removeListener(e, r[i]);
|
|
3468
3470
|
return this;
|
|
3469
3471
|
};
|
|
3470
|
-
function
|
|
3472
|
+
function Yn(t, e, r) {
|
|
3471
3473
|
var n = t._events;
|
|
3472
3474
|
if (n === void 0)
|
|
3473
3475
|
return [];
|
|
3474
3476
|
var i = n[e];
|
|
3475
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? As(i) :
|
|
3477
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? As(i) : Xn(i, i.length);
|
|
3476
3478
|
}
|
|
3477
3479
|
N.prototype.listeners = function(e) {
|
|
3478
|
-
return
|
|
3480
|
+
return Yn(this, e, !0);
|
|
3479
3481
|
};
|
|
3480
3482
|
N.prototype.rawListeners = function(e) {
|
|
3481
|
-
return
|
|
3483
|
+
return Yn(this, e, !1);
|
|
3482
3484
|
};
|
|
3483
3485
|
N.listenerCount = function(t, e) {
|
|
3484
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
3486
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Jn.call(t, e);
|
|
3485
3487
|
};
|
|
3486
|
-
N.prototype.listenerCount =
|
|
3487
|
-
function
|
|
3488
|
+
N.prototype.listenerCount = Jn;
|
|
3489
|
+
function Jn(t) {
|
|
3488
3490
|
var e = this._events;
|
|
3489
3491
|
if (e !== void 0) {
|
|
3490
3492
|
var r = e[t];
|
|
@@ -3498,7 +3500,7 @@ function Yn(t) {
|
|
|
3498
3500
|
N.prototype.eventNames = function() {
|
|
3499
3501
|
return this._eventsCount > 0 ? mt(this._events) : [];
|
|
3500
3502
|
};
|
|
3501
|
-
function
|
|
3503
|
+
function Xn(t, e) {
|
|
3502
3504
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
3503
3505
|
r[n] = t[n];
|
|
3504
3506
|
return r;
|
|
@@ -3521,13 +3523,13 @@ function Es(t, e) {
|
|
|
3521
3523
|
function o() {
|
|
3522
3524
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3523
3525
|
}
|
|
3524
|
-
|
|
3526
|
+
Zn(t, e, o, { once: !0 }), e !== "error" && Is(t, i, { once: !0 });
|
|
3525
3527
|
});
|
|
3526
3528
|
}
|
|
3527
3529
|
function Is(t, e, r) {
|
|
3528
|
-
typeof t.on == "function" &&
|
|
3530
|
+
typeof t.on == "function" && Zn(t, "error", e, r);
|
|
3529
3531
|
}
|
|
3530
|
-
function
|
|
3532
|
+
function Zn(t, e, r, n) {
|
|
3531
3533
|
if (typeof t.on == "function")
|
|
3532
3534
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
3533
3535
|
else if (typeof t.addEventListener == "function")
|
|
@@ -3537,7 +3539,7 @@ function Xn(t, e, r, n) {
|
|
|
3537
3539
|
else
|
|
3538
3540
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3539
3541
|
}
|
|
3540
|
-
var
|
|
3542
|
+
var ei = Tr.exports, Rt = {}, ti = {}, ri = function() {
|
|
3541
3543
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3542
3544
|
return !1;
|
|
3543
3545
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3560,16 +3562,16 @@ var Zn = Tr.exports, Rt = {}, ei = {}, ti = function() {
|
|
|
3560
3562
|
return !1;
|
|
3561
3563
|
}
|
|
3562
3564
|
return !0;
|
|
3563
|
-
}, Os =
|
|
3565
|
+
}, Os = ri, Vt = function() {
|
|
3564
3566
|
return Os() && !!Symbol.toStringTag;
|
|
3565
|
-
}, Ts = Error, _s = EvalError, ks = RangeError, Ps = ReferenceError,
|
|
3566
|
-
return typeof
|
|
3567
|
+
}, Ts = Error, _s = EvalError, ks = RangeError, Ps = ReferenceError, ni = SyntaxError, $t = TypeError, Cs = URIError, cn = typeof Symbol < "u" && Symbol, Ls = ri, Ns = function() {
|
|
3568
|
+
return typeof cn != "function" || typeof Symbol != "function" || typeof cn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ls();
|
|
3567
3569
|
}, jt = {
|
|
3568
3570
|
__proto__: null,
|
|
3569
3571
|
foo: {}
|
|
3570
3572
|
}, Fs = Object, Ds = function() {
|
|
3571
3573
|
return { __proto__: jt }.foo === jt.foo && !(jt instanceof Fs);
|
|
3572
|
-
}, Rs = "Function.prototype.bind called on incompatible ", Vs = Object.prototype.toString, $s = Math.max, Bs = "[object Function]",
|
|
3574
|
+
}, Rs = "Function.prototype.bind called on incompatible ", Vs = Object.prototype.toString, $s = Math.max, Bs = "[object Function]", dn = function(e, r) {
|
|
3573
3575
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3574
3576
|
n[i] = e[i];
|
|
3575
3577
|
for (var o = 0; o < r.length; o += 1)
|
|
@@ -3591,13 +3593,13 @@ var Zn = Tr.exports, Rt = {}, ei = {}, ti = function() {
|
|
|
3591
3593
|
if (this instanceof i) {
|
|
3592
3594
|
var c = r.apply(
|
|
3593
3595
|
this,
|
|
3594
|
-
|
|
3596
|
+
dn(n, arguments)
|
|
3595
3597
|
);
|
|
3596
3598
|
return Object(c) === c ? c : this;
|
|
3597
3599
|
}
|
|
3598
3600
|
return r.apply(
|
|
3599
3601
|
e,
|
|
3600
|
-
|
|
3602
|
+
dn(n, arguments)
|
|
3601
3603
|
);
|
|
3602
3604
|
}, s = $s(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3603
3605
|
a[u] = "$" + u;
|
|
@@ -3607,9 +3609,9 @@ var Zn = Tr.exports, Rt = {}, ei = {}, ti = function() {
|
|
|
3607
3609
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3608
3610
|
}
|
|
3609
3611
|
return i;
|
|
3610
|
-
}, js = qs, _r = Function.prototype.bind || js, xs = Function.prototype.call, Qs = Object.prototype.hasOwnProperty, Gs = _r, Ks = Gs.call(xs, Qs), T, zs = Ts, Hs = _s, Ws = ks, Ys = Ps, We =
|
|
3612
|
+
}, js = qs, _r = Function.prototype.bind || js, xs = Function.prototype.call, Qs = Object.prototype.hasOwnProperty, Gs = _r, Ks = Gs.call(xs, Qs), T, zs = Ts, Hs = _s, Ws = ks, Ys = Ps, We = ni, ze = $t, Js = Cs, ii = Function, xt = function(t) {
|
|
3611
3613
|
try {
|
|
3612
|
-
return
|
|
3614
|
+
return ii('"use strict"; return (' + t + ").constructor;")();
|
|
3613
3615
|
} catch {
|
|
3614
3616
|
}
|
|
3615
3617
|
}, Le = Object.getOwnPropertyDescriptor;
|
|
@@ -3662,7 +3664,7 @@ var Qt = function() {
|
|
|
3662
3664
|
"%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
|
|
3663
3665
|
"%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
|
|
3664
3666
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
|
|
3665
|
-
"%Function%":
|
|
3667
|
+
"%Function%": ii,
|
|
3666
3668
|
"%GeneratorFunction%": qe,
|
|
3667
3669
|
"%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
|
|
3668
3670
|
"%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
|
|
@@ -3726,7 +3728,7 @@ var ra = function t(e) {
|
|
|
3726
3728
|
i && j && (r = j(i.prototype));
|
|
3727
3729
|
}
|
|
3728
3730
|
return Ne[e] = r, r;
|
|
3729
|
-
},
|
|
3731
|
+
}, ln = {
|
|
3730
3732
|
__proto__: null,
|
|
3731
3733
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3732
3734
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -3779,19 +3781,19 @@ var ra = function t(e) {
|
|
|
3779
3781
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3780
3782
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3781
3783
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3782
|
-
}, st = _r, It = Ks, na = st.call(Function.call, Array.prototype.concat), ia = st.call(Function.apply, Array.prototype.splice),
|
|
3784
|
+
}, st = _r, It = Ks, na = st.call(Function.call, Array.prototype.concat), ia = st.call(Function.apply, Array.prototype.splice), fn = st.call(Function.call, String.prototype.replace), Ot = st.call(Function.call, String.prototype.slice), oa = st.call(Function.call, RegExp.prototype.exec), sa = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, aa = /\\(\\)?/g, ua = function(e) {
|
|
3783
3785
|
var r = Ot(e, 0, 1), n = Ot(e, -1);
|
|
3784
3786
|
if (r === "%" && n !== "%")
|
|
3785
3787
|
throw new We("invalid intrinsic syntax, expected closing `%`");
|
|
3786
3788
|
if (n === "%" && r !== "%")
|
|
3787
3789
|
throw new We("invalid intrinsic syntax, expected opening `%`");
|
|
3788
3790
|
var i = [];
|
|
3789
|
-
return
|
|
3790
|
-
i[i.length] = a ?
|
|
3791
|
+
return fn(e, sa, function(o, s, a, u) {
|
|
3792
|
+
i[i.length] = a ? fn(u, aa, "$1") : s || o;
|
|
3791
3793
|
}), i;
|
|
3792
3794
|
}, ca = function(e, r) {
|
|
3793
3795
|
var n = e, i;
|
|
3794
|
-
if (It(
|
|
3796
|
+
if (It(ln, n) && (i = ln[n], n = "%" + i[0] + "%"), It(Ne, n)) {
|
|
3795
3797
|
var o = Ne[n];
|
|
3796
3798
|
if (o === qe && (o = ra(n)), typeof o > "u" && !r)
|
|
3797
3799
|
throw new ze("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
@@ -3832,10 +3834,10 @@ var ra = function t(e) {
|
|
|
3832
3834
|
}
|
|
3833
3835
|
}
|
|
3834
3836
|
return a;
|
|
3835
|
-
},
|
|
3837
|
+
}, oi = { exports: {} }, Gt, pn;
|
|
3836
3838
|
function kr() {
|
|
3837
|
-
if (
|
|
3838
|
-
|
|
3839
|
+
if (pn) return Gt;
|
|
3840
|
+
pn = 1;
|
|
3839
3841
|
var t = at, e = t("%Object.defineProperty%", !0) || !1;
|
|
3840
3842
|
if (e)
|
|
3841
3843
|
try {
|
|
@@ -3852,7 +3854,7 @@ if (gt)
|
|
|
3852
3854
|
} catch {
|
|
3853
3855
|
gt = null;
|
|
3854
3856
|
}
|
|
3855
|
-
var Bt = gt,
|
|
3857
|
+
var Bt = gt, hn = kr(), la = ni, Ue = $t, yn = Bt, fa = function(e, r, n) {
|
|
3856
3858
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3857
3859
|
throw new Ue("`obj` must be an object or a function`");
|
|
3858
3860
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3865,9 +3867,9 @@ var Bt = gt, pn = kr(), la = ri, Ue = $t, hn = Bt, fa = function(e, r, n) {
|
|
|
3865
3867
|
throw new Ue("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3866
3868
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3867
3869
|
throw new Ue("`loose`, if provided, must be a boolean");
|
|
3868
|
-
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 = !!
|
|
3869
|
-
if (
|
|
3870
|
-
|
|
3870
|
+
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 = !!yn && yn(e, r);
|
|
3871
|
+
if (hn)
|
|
3872
|
+
hn(e, r, {
|
|
3871
3873
|
configurable: s === null && u ? u.configurable : !s,
|
|
3872
3874
|
enumerable: i === null && u ? u.enumerable : !i,
|
|
3873
3875
|
value: n,
|
|
@@ -3877,10 +3879,10 @@ var Bt = gt, pn = kr(), la = ri, Ue = $t, hn = Bt, fa = function(e, r, n) {
|
|
|
3877
3879
|
e[r] = n;
|
|
3878
3880
|
else
|
|
3879
3881
|
throw new la("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3880
|
-
}, lr = kr(),
|
|
3882
|
+
}, lr = kr(), si = function() {
|
|
3881
3883
|
return !!lr;
|
|
3882
3884
|
};
|
|
3883
|
-
|
|
3885
|
+
si.hasArrayLengthDefineBug = function() {
|
|
3884
3886
|
if (!lr)
|
|
3885
3887
|
return null;
|
|
3886
3888
|
try {
|
|
@@ -3889,24 +3891,24 @@ oi.hasArrayLengthDefineBug = function() {
|
|
|
3889
3891
|
return !0;
|
|
3890
3892
|
}
|
|
3891
3893
|
};
|
|
3892
|
-
var pa =
|
|
3894
|
+
var pa = si, ha = at, mn = fa, ya = pa(), gn = Bt, bn = $t, ma = ha("%Math.floor%"), ga = function(e, r) {
|
|
3893
3895
|
if (typeof e != "function")
|
|
3894
|
-
throw new
|
|
3896
|
+
throw new bn("`fn` is not a function");
|
|
3895
3897
|
if (typeof r != "number" || r < 0 || r > 4294967295 || ma(r) !== r)
|
|
3896
|
-
throw new
|
|
3898
|
+
throw new bn("`length` must be a positive 32-bit integer");
|
|
3897
3899
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3898
|
-
if ("length" in e &&
|
|
3899
|
-
var s =
|
|
3900
|
+
if ("length" in e && gn) {
|
|
3901
|
+
var s = gn(e, "length");
|
|
3900
3902
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3901
3903
|
}
|
|
3902
|
-
return (i || o || !n) && (ya ?
|
|
3904
|
+
return (i || o || !n) && (ya ? mn(
|
|
3903
3905
|
/** @type {Parameters<define>[0]} */
|
|
3904
3906
|
e,
|
|
3905
3907
|
"length",
|
|
3906
3908
|
r,
|
|
3907
3909
|
!0,
|
|
3908
3910
|
!0
|
|
3909
|
-
) :
|
|
3911
|
+
) : mn(
|
|
3910
3912
|
/** @type {Parameters<define>[0]} */
|
|
3911
3913
|
e,
|
|
3912
3914
|
"length",
|
|
@@ -3929,20 +3931,20 @@ var pa = oi, ha = at, yn = fa, ya = pa(), mn = Bt, gn = $t, ma = ha("%Math.floor
|
|
|
3929
3931
|
return a(e, o, arguments);
|
|
3930
3932
|
};
|
|
3931
3933
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3932
|
-
})(
|
|
3933
|
-
var Pr =
|
|
3934
|
-
var n =
|
|
3935
|
-
return typeof n == "function" && ba(e, ".prototype.") > -1 ?
|
|
3934
|
+
})(oi);
|
|
3935
|
+
var Pr = oi.exports, ai = at, ui = Pr, ba = ui(ai("String.prototype.indexOf")), Cr = function(e, r) {
|
|
3936
|
+
var n = ai(e, !!r);
|
|
3937
|
+
return typeof n == "function" && ba(e, ".prototype.") > -1 ? ui(n) : n;
|
|
3936
3938
|
}, va = Vt(), Sa = Cr, fr = Sa("Object.prototype.toString"), Mt = function(e) {
|
|
3937
3939
|
return va && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : fr(e) === "[object Arguments]";
|
|
3938
|
-
},
|
|
3940
|
+
}, ci = function(e) {
|
|
3939
3941
|
return Mt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && fr(e) !== "[object Array]" && fr(e.callee) === "[object Function]";
|
|
3940
3942
|
}, wa = function() {
|
|
3941
3943
|
return Mt(arguments);
|
|
3942
3944
|
}();
|
|
3943
|
-
Mt.isLegacyArguments =
|
|
3944
|
-
var Aa = wa ? Mt :
|
|
3945
|
-
if (!
|
|
3945
|
+
Mt.isLegacyArguments = ci;
|
|
3946
|
+
var Aa = wa ? Mt : ci, Ea = Object.prototype.toString, Ia = Function.prototype.toString, Oa = /^\s*(?:function)?\*/, di = Vt(), Kt = Object.getPrototypeOf, Ta = function() {
|
|
3947
|
+
if (!di)
|
|
3946
3948
|
return !1;
|
|
3947
3949
|
try {
|
|
3948
3950
|
return Function("return function*() {}")();
|
|
@@ -3953,7 +3955,7 @@ var Aa = wa ? Mt : ui, Ea = Object.prototype.toString, Ia = Function.prototype.t
|
|
|
3953
3955
|
return !1;
|
|
3954
3956
|
if (Oa.test(Ia.call(e)))
|
|
3955
3957
|
return !0;
|
|
3956
|
-
if (!
|
|
3958
|
+
if (!di) {
|
|
3957
3959
|
var r = Ea.call(e);
|
|
3958
3960
|
return r === "[object GeneratorFunction]";
|
|
3959
3961
|
}
|
|
@@ -3964,7 +3966,7 @@ var Aa = wa ? Mt : ui, Ea = Object.prototype.toString, Ia = Function.prototype.t
|
|
|
3964
3966
|
zt = n ? Kt(n) : !1;
|
|
3965
3967
|
}
|
|
3966
3968
|
return Kt(e) === zt;
|
|
3967
|
-
},
|
|
3969
|
+
}, li = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, pr, bt;
|
|
3968
3970
|
if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
3969
3971
|
try {
|
|
3970
3972
|
pr = Object.defineProperty({}, "length", {
|
|
@@ -3981,14 +3983,14 @@ else
|
|
|
3981
3983
|
xe = null;
|
|
3982
3984
|
var ka = /^\s*class\b/, hr = function(e) {
|
|
3983
3985
|
try {
|
|
3984
|
-
var r =
|
|
3986
|
+
var r = li.call(e);
|
|
3985
3987
|
return ka.test(r);
|
|
3986
3988
|
} catch {
|
|
3987
3989
|
return !1;
|
|
3988
3990
|
}
|
|
3989
3991
|
}, Ht = function(e) {
|
|
3990
3992
|
try {
|
|
3991
|
-
return hr(e) ? !1 : (
|
|
3993
|
+
return hr(e) ? !1 : (li.call(e), !0);
|
|
3992
3994
|
} catch {
|
|
3993
3995
|
return !1;
|
|
3994
3996
|
}
|
|
@@ -4030,21 +4032,21 @@ var Ba = xe ? function(e) {
|
|
|
4030
4032
|
return !1;
|
|
4031
4033
|
var r = vt.call(e);
|
|
4032
4034
|
return r !== Ca && r !== La && !/^\[object HTML/.test(r) ? !1 : Ht(e);
|
|
4033
|
-
}, Ma = Ba, Ua = Object.prototype.toString,
|
|
4035
|
+
}, Ma = Ba, Ua = Object.prototype.toString, fi = Object.prototype.hasOwnProperty, qa = function(e, r, n) {
|
|
4034
4036
|
for (var i = 0, o = e.length; i < o; i++)
|
|
4035
|
-
|
|
4037
|
+
fi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
4036
4038
|
}, ja = function(e, r, n) {
|
|
4037
4039
|
for (var i = 0, o = e.length; i < o; i++)
|
|
4038
4040
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
4039
4041
|
}, xa = function(e, r, n) {
|
|
4040
4042
|
for (var i in e)
|
|
4041
|
-
|
|
4043
|
+
fi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
4042
4044
|
}, Qa = function(e, r, n) {
|
|
4043
4045
|
if (!Ma(r))
|
|
4044
4046
|
throw new TypeError("iterator must be a function");
|
|
4045
4047
|
var i;
|
|
4046
4048
|
arguments.length >= 3 && (i = n), Ua.call(e) === "[object Array]" ? qa(e, r, i) : typeof e == "string" ? ja(e, r, i) : xa(e, r, i);
|
|
4047
|
-
},
|
|
4049
|
+
}, pi = Qa, Ga = [
|
|
4048
4050
|
"Float32Array",
|
|
4049
4051
|
"Float64Array",
|
|
4050
4052
|
"Int8Array",
|
|
@@ -4056,29 +4058,29 @@ var Ba = xe ? function(e) {
|
|
|
4056
4058
|
"Uint32Array",
|
|
4057
4059
|
"BigInt64Array",
|
|
4058
4060
|
"BigUint64Array"
|
|
4059
|
-
], Wt = Ga, Ka = typeof globalThis > "u" ? Er : globalThis,
|
|
4061
|
+
], Wt = Ga, Ka = typeof globalThis > "u" ? Er : globalThis, hi = function() {
|
|
4060
4062
|
for (var e = [], r = 0; r < Wt.length; r++)
|
|
4061
4063
|
typeof Ka[Wt[r]] == "function" && (e[e.length] = Wt[r]);
|
|
4062
4064
|
return e;
|
|
4063
|
-
}, Tt =
|
|
4065
|
+
}, Tt = pi, za = hi, vn = Pr, Lr = Cr, St = Bt, Ha = Lr("Object.prototype.toString"), yi = Vt(), Sn = typeof globalThis > "u" ? Er : globalThis, mr = za(), Nr = Lr("String.prototype.slice"), Yt = Object.getPrototypeOf, Wa = Lr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4064
4066
|
for (var n = 0; n < e.length; n += 1)
|
|
4065
4067
|
if (e[n] === r)
|
|
4066
4068
|
return n;
|
|
4067
4069
|
return -1;
|
|
4068
4070
|
}, _t = { __proto__: null };
|
|
4069
|
-
|
|
4070
|
-
var e = new
|
|
4071
|
+
yi && St && Yt ? Tt(mr, function(t) {
|
|
4072
|
+
var e = new Sn[t]();
|
|
4071
4073
|
if (Symbol.toStringTag in e) {
|
|
4072
4074
|
var r = Yt(e), n = St(r, Symbol.toStringTag);
|
|
4073
4075
|
if (!n) {
|
|
4074
4076
|
var i = Yt(r);
|
|
4075
4077
|
n = St(i, Symbol.toStringTag);
|
|
4076
4078
|
}
|
|
4077
|
-
_t["$" + t] =
|
|
4079
|
+
_t["$" + t] = vn(n.get);
|
|
4078
4080
|
}
|
|
4079
4081
|
}) : Tt(mr, function(t) {
|
|
4080
|
-
var e = new
|
|
4081
|
-
r && (_t["$" + t] =
|
|
4082
|
+
var e = new Sn[t](), r = e.slice || e.set;
|
|
4083
|
+
r && (_t["$" + t] = vn(r));
|
|
4082
4084
|
});
|
|
4083
4085
|
var Ya = function(e) {
|
|
4084
4086
|
var r = !1;
|
|
@@ -4101,30 +4103,30 @@ var Ya = function(e) {
|
|
|
4101
4103
|
}, Xa = function(e) {
|
|
4102
4104
|
if (!e || typeof e != "object")
|
|
4103
4105
|
return !1;
|
|
4104
|
-
if (!
|
|
4106
|
+
if (!yi) {
|
|
4105
4107
|
var r = Nr(Ha(e), 8, -1);
|
|
4106
4108
|
return Wa(mr, r) > -1 ? r : r !== "Object" ? !1 : Ja(e);
|
|
4107
4109
|
}
|
|
4108
4110
|
return St ? Ya(e) : null;
|
|
4109
|
-
}, kt =
|
|
4111
|
+
}, kt = pi, Za = hi, wn = Pr, Fr = Cr, wt = Bt, eu = Fr("Object.prototype.toString"), mi = Vt(), An = typeof globalThis > "u" ? Er : globalThis, gr = Za(), Dr = Fr("String.prototype.slice"), Jt = Object.getPrototypeOf, tu = Fr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4110
4112
|
for (var n = 0; n < e.length; n += 1)
|
|
4111
4113
|
if (e[n] === r)
|
|
4112
4114
|
return n;
|
|
4113
4115
|
return -1;
|
|
4114
4116
|
}, Pt = { __proto__: null };
|
|
4115
|
-
|
|
4116
|
-
var e = new
|
|
4117
|
+
mi && wt && Jt ? kt(gr, function(t) {
|
|
4118
|
+
var e = new An[t]();
|
|
4117
4119
|
if (Symbol.toStringTag in e) {
|
|
4118
4120
|
var r = Jt(e), n = wt(r, Symbol.toStringTag);
|
|
4119
4121
|
if (!n) {
|
|
4120
4122
|
var i = Jt(r);
|
|
4121
4123
|
n = wt(i, Symbol.toStringTag);
|
|
4122
4124
|
}
|
|
4123
|
-
Pt["$" + t] =
|
|
4125
|
+
Pt["$" + t] = wn(n.get);
|
|
4124
4126
|
}
|
|
4125
4127
|
}) : kt(gr, function(t) {
|
|
4126
|
-
var e = new
|
|
4127
|
-
r && (Pt["$" + t] =
|
|
4128
|
+
var e = new An[t](), r = e.slice || e.set;
|
|
4129
|
+
r && (Pt["$" + t] = wn(r));
|
|
4128
4130
|
});
|
|
4129
4131
|
var ru = function(e) {
|
|
4130
4132
|
var r = !1;
|
|
@@ -4161,7 +4163,7 @@ var ru = function(e) {
|
|
|
4161
4163
|
}, iu = function(e) {
|
|
4162
4164
|
if (!e || typeof e != "object")
|
|
4163
4165
|
return !1;
|
|
4164
|
-
if (!
|
|
4166
|
+
if (!mi) {
|
|
4165
4167
|
var r = Dr(eu(e), 8, -1);
|
|
4166
4168
|
return tu(gr, r) > -1 ? r : r !== "Object" ? !1 : nu(e);
|
|
4167
4169
|
}
|
|
@@ -4179,11 +4181,11 @@ var ru = function(e) {
|
|
|
4179
4181
|
var p = o(BigInt.prototype.valueOf);
|
|
4180
4182
|
if (a)
|
|
4181
4183
|
var v = o(Symbol.prototype.valueOf);
|
|
4182
|
-
function w(y,
|
|
4184
|
+
function w(y, Ei) {
|
|
4183
4185
|
if (typeof y != "object")
|
|
4184
4186
|
return !1;
|
|
4185
4187
|
try {
|
|
4186
|
-
return
|
|
4188
|
+
return Ei(y), !0;
|
|
4187
4189
|
} catch {
|
|
4188
4190
|
return !1;
|
|
4189
4191
|
}
|
|
@@ -4337,14 +4339,14 @@ var ru = function(e) {
|
|
|
4337
4339
|
return a && w(y, v);
|
|
4338
4340
|
}
|
|
4339
4341
|
t.isSymbolObject = $r;
|
|
4340
|
-
function
|
|
4342
|
+
function wi(y) {
|
|
4341
4343
|
return _e(y) || ct(y) || $e(y) || dt(y) || $r(y);
|
|
4342
4344
|
}
|
|
4343
|
-
t.isBoxedPrimitive =
|
|
4344
|
-
function
|
|
4345
|
+
t.isBoxedPrimitive = wi;
|
|
4346
|
+
function Ai(y) {
|
|
4345
4347
|
return typeof Uint8Array < "u" && (ut(y) || P(y));
|
|
4346
4348
|
}
|
|
4347
|
-
t.isAnyArrayBuffer =
|
|
4349
|
+
t.isAnyArrayBuffer = Ai, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4348
4350
|
Object.defineProperty(t, y, {
|
|
4349
4351
|
enumerable: !1,
|
|
4350
4352
|
value: function() {
|
|
@@ -4352,7 +4354,7 @@ var ru = function(e) {
|
|
|
4352
4354
|
}
|
|
4353
4355
|
});
|
|
4354
4356
|
});
|
|
4355
|
-
})(
|
|
4357
|
+
})(ti);
|
|
4356
4358
|
var au = function(e) {
|
|
4357
4359
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
4358
4360
|
}, br = { exports: {} };
|
|
@@ -4593,7 +4595,7 @@ var uu = br.exports;
|
|
|
4593
4595
|
`) + " " + l.join(`,
|
|
4594
4596
|
`) + " " + b[1] : b[0] + h + " " + l.join(", ") + " " + b[1];
|
|
4595
4597
|
}
|
|
4596
|
-
t.types =
|
|
4598
|
+
t.types = ti;
|
|
4597
4599
|
function g(l) {
|
|
4598
4600
|
return Array.isArray(l);
|
|
4599
4601
|
}
|
|
@@ -4778,7 +4780,7 @@ function ke(t, e, r = Error) {
|
|
|
4778
4780
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4779
4781
|
}, cu(n, r), n;
|
|
4780
4782
|
}
|
|
4781
|
-
var
|
|
4783
|
+
var gi = {
|
|
4782
4784
|
createError: ke,
|
|
4783
4785
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: ke(
|
|
4784
4786
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -4826,7 +4828,7 @@ var mi = {
|
|
|
4826
4828
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4827
4829
|
}).join("");
|
|
4828
4830
|
};
|
|
4829
|
-
const lu = du,
|
|
4831
|
+
const lu = du, En = Symbol("avvio.TimeTree.untrackNode"), Zt = Symbol("avvio.TimeTree.trackNode"), In = Symbol("avvio.TimeTree.getParent"), On = Symbol("avvio.TimeTree.getNode"), Tn = Symbol("avvio.TimeTree.addNode");
|
|
4830
4832
|
let fu = class {
|
|
4831
4833
|
constructor() {
|
|
4832
4834
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
@@ -4834,7 +4836,7 @@ let fu = class {
|
|
|
4834
4836
|
[Zt](e) {
|
|
4835
4837
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4836
4838
|
}
|
|
4837
|
-
[
|
|
4839
|
+
[En](e) {
|
|
4838
4840
|
this.tableId.delete(e.id);
|
|
4839
4841
|
const r = this.tableLabel.get(e.label);
|
|
4840
4842
|
if (r.id) {
|
|
@@ -4843,16 +4845,16 @@ let fu = class {
|
|
|
4843
4845
|
}
|
|
4844
4846
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
4845
4847
|
}
|
|
4846
|
-
[
|
|
4848
|
+
[In](e) {
|
|
4847
4849
|
if (e === null)
|
|
4848
4850
|
return this.root;
|
|
4849
4851
|
const r = this.tableLabel.get(e);
|
|
4850
4852
|
return r.id ? r : r[r.length - 1];
|
|
4851
4853
|
}
|
|
4852
|
-
[
|
|
4854
|
+
[On](e) {
|
|
4853
4855
|
return this.tableId.get(e);
|
|
4854
4856
|
}
|
|
4855
|
-
[
|
|
4857
|
+
[Tn](e, r, n) {
|
|
4856
4858
|
if (e === null)
|
|
4857
4859
|
return this.root = {
|
|
4858
4860
|
id: "root",
|
|
@@ -4860,7 +4862,7 @@ let fu = class {
|
|
|
4860
4862
|
start: n,
|
|
4861
4863
|
nodes: []
|
|
4862
4864
|
}, this[Zt](this.root), this.root.id;
|
|
4863
|
-
const o = this[
|
|
4865
|
+
const o = this[In](e), s = `${r}-${Math.random()}`, a = {
|
|
4864
4866
|
id: s,
|
|
4865
4867
|
parent: e,
|
|
4866
4868
|
start: n,
|
|
@@ -4870,11 +4872,11 @@ let fu = class {
|
|
|
4870
4872
|
return o.nodes.push(a), this[Zt](a), s;
|
|
4871
4873
|
}
|
|
4872
4874
|
start(e, r, n = Date.now()) {
|
|
4873
|
-
return this[
|
|
4875
|
+
return this[Tn](e, r, n);
|
|
4874
4876
|
}
|
|
4875
4877
|
stop(e, r = Date.now()) {
|
|
4876
|
-
const n = this[
|
|
4877
|
-
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[
|
|
4878
|
+
const n = this[On](e);
|
|
4879
|
+
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[En](n));
|
|
4878
4880
|
}
|
|
4879
4881
|
toJSON() {
|
|
4880
4882
|
return Object.assign({}, this.root);
|
|
@@ -4884,10 +4886,10 @@ let fu = class {
|
|
|
4884
4886
|
return lu(r);
|
|
4885
4887
|
}
|
|
4886
4888
|
};
|
|
4887
|
-
var pu = fu, Rr = { exports: {} }, vr = { exports: {} }, er,
|
|
4889
|
+
var pu = fu, Rr = { exports: {} }, vr = { exports: {} }, er, _n;
|
|
4888
4890
|
function hu() {
|
|
4889
|
-
if (
|
|
4890
|
-
|
|
4891
|
+
if (_n) return er;
|
|
4892
|
+
_n = 1;
|
|
4891
4893
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4892
4894
|
er = function(c, f) {
|
|
4893
4895
|
f = f || {};
|
|
@@ -5181,8 +5183,8 @@ var mu = yu;
|
|
|
5181
5183
|
}
|
|
5182
5184
|
};
|
|
5183
5185
|
})(vr, vr.exports);
|
|
5184
|
-
var
|
|
5185
|
-
const gu =
|
|
5186
|
+
var bi = vr.exports;
|
|
5187
|
+
const gu = Gn, bu = ei.EventEmitter, vu = Rt.inherits, x = bi("avvio"), { AVV_ERR_READY_TIMEOUT: Su } = gi, tr = Symbol.for("plugin-meta");
|
|
5186
5188
|
function wu(t, e) {
|
|
5187
5189
|
return t[tr] && t[tr].name ? t[tr].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
5188
5190
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
@@ -5295,13 +5297,13 @@ function Iu() {
|
|
|
5295
5297
|
Rr.exports = Xe;
|
|
5296
5298
|
Rr.exports.loadPlugin = Vr;
|
|
5297
5299
|
var Ou = Rr.exports;
|
|
5298
|
-
const
|
|
5300
|
+
const kn = Gn, Tu = ei.EventEmitter, _u = Rt.inherits, {
|
|
5299
5301
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: rr,
|
|
5300
5302
|
AVV_ERR_CALLBACK_NOT_FN: nt,
|
|
5301
5303
|
AVV_ERR_PLUGIN_NOT_VALID: ku,
|
|
5302
5304
|
AVV_ERR_ROOT_PLG_BOOTED: Pu,
|
|
5303
5305
|
AVV_ERR_READY_TIMEOUT: Cu
|
|
5304
|
-
} =
|
|
5306
|
+
} = gi, Lu = pu, Sr = Ou, Ye = bi("avvio"), Ct = Symbol("kAvvio"), nr = Symbol("kThenifyDoNotWrap");
|
|
5305
5307
|
function Nu(t, e, r) {
|
|
5306
5308
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
5307
5309
|
if (t[i])
|
|
@@ -5312,7 +5314,7 @@ function Nu(t, e, r) {
|
|
|
5312
5314
|
throw new rr(s);
|
|
5313
5315
|
t[i] = function(d, c) {
|
|
5314
5316
|
return r.use(d, c), this;
|
|
5315
|
-
}, Object.defineProperty(t, "then", { get:
|
|
5317
|
+
}, Object.defineProperty(t, "then", { get: vi.bind(r) }), t[Ct] = !0, t[o] = function(d) {
|
|
5316
5318
|
return typeof d != "function" ? r._loadRegistered() : (r.after(ir(d, this)), this);
|
|
5317
5319
|
}, t[s] = function(d) {
|
|
5318
5320
|
if (d && typeof d != "function")
|
|
@@ -5333,10 +5335,10 @@ function z(t, e, r) {
|
|
|
5333
5335
|
const n = new z(t, e, r);
|
|
5334
5336
|
return t && Nu(t, e, n), n;
|
|
5335
5337
|
}
|
|
5336
|
-
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 Lu(), this._readyQ =
|
|
5337
|
-
this.emit("start"), this._readyQ.drain =
|
|
5338
|
-
}, this._closeQ =
|
|
5339
|
-
this.emit("close"), this._closeQ.drain =
|
|
5338
|
+
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 Lu(), this._readyQ = kn(this, Si, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
5339
|
+
this.emit("start"), this._readyQ.drain = Pn;
|
|
5340
|
+
}, this._closeQ = kn(this, Vu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5341
|
+
this.emit("close"), this._closeQ.drain = Pn;
|
|
5340
5342
|
}, this._doStart = null, this._root = new Sr(this, Fu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5341
5343
|
const s = this.pluginTree.start(null, i, o);
|
|
5342
5344
|
this._root.once("loaded", (a, u, d) => {
|
|
@@ -5380,7 +5382,7 @@ z.prototype._loadRegistered = function() {
|
|
|
5380
5382
|
const t = this._current[0];
|
|
5381
5383
|
return !this.started && !this.booted && E.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
5382
5384
|
};
|
|
5383
|
-
Object.defineProperty(z.prototype, "then", { get:
|
|
5385
|
+
Object.defineProperty(z.prototype, "then", { get: vi });
|
|
5384
5386
|
z.prototype._addPlugin = function(t, e, r) {
|
|
5385
5387
|
if (t = Du(t), e = e || {}, this.booted)
|
|
5386
5388
|
throw new Pu();
|
|
@@ -5401,7 +5403,7 @@ z.prototype.after = function(t) {
|
|
|
5401
5403
|
return this._loadRegistered();
|
|
5402
5404
|
this._addPlugin(e.bind(this), {}, !0);
|
|
5403
5405
|
function e(r, n, i) {
|
|
5404
|
-
|
|
5406
|
+
Si.call(this, t, i);
|
|
5405
5407
|
}
|
|
5406
5408
|
return this;
|
|
5407
5409
|
};
|
|
@@ -5452,9 +5454,9 @@ z.prototype.prettyPrint = function() {
|
|
|
5452
5454
|
z.prototype.toJSON = function() {
|
|
5453
5455
|
return this.pluginTree.toJSON();
|
|
5454
5456
|
};
|
|
5455
|
-
function
|
|
5457
|
+
function Pn() {
|
|
5456
5458
|
}
|
|
5457
|
-
function
|
|
5459
|
+
function vi() {
|
|
5458
5460
|
if (this.booted) {
|
|
5459
5461
|
Ye("thenify returning null because we are already booted");
|
|
5460
5462
|
return;
|
|
@@ -5465,7 +5467,7 @@ function bi() {
|
|
|
5465
5467
|
}
|
|
5466
5468
|
return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[nr] = !0, t(this._server)), e);
|
|
5467
5469
|
}
|
|
5468
|
-
function
|
|
5470
|
+
function Si(t, e) {
|
|
5469
5471
|
const r = this._server, n = this._error;
|
|
5470
5472
|
let i;
|
|
5471
5473
|
if (this._error = null, t.length === 0)
|
|
@@ -5554,18 +5556,18 @@ const Mu = /* @__PURE__ */ ps(Bu);
|
|
|
5554
5556
|
})();
|
|
5555
5557
|
function cc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
5556
5558
|
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 = Mu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5557
|
-
return s.use(
|
|
5559
|
+
return s.use(Go, {
|
|
5558
5560
|
hideFriends: n.hideFriends,
|
|
5559
5561
|
skipOnboarding: n.skipOnboarding,
|
|
5560
5562
|
betPack: n.betPack,
|
|
5561
5563
|
friendsTab: n.friendsTab,
|
|
5562
5564
|
theme: n.theme,
|
|
5563
5565
|
themeMode: n.themeMode
|
|
5564
|
-
}), s.use(
|
|
5566
|
+
}), s.use(Bo, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(jo, { videoPlayerController: n?.videoPlayerController }), s.use(Qo, {
|
|
5565
5567
|
onContentActivate: n?.onContentActivate,
|
|
5566
5568
|
withAd: n?.withAd,
|
|
5567
5569
|
withAdNotification: n?.withAdNotification
|
|
5568
|
-
}), s.use(
|
|
5570
|
+
}), s.use(no, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(uo), s.use(qo), s.use(rs), s.use(Lo), s.use(fs), s.after((a, u, d) => {
|
|
5569
5571
|
if (a)
|
|
5570
5572
|
throw a;
|
|
5571
5573
|
u.ready(), d();
|