@streamlayer/react 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/app.js +1 -0
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +4 -0
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +6 -0
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -0
- package/lib/dist/cjs/index.js +1 -0
- package/lib/dist/cjs/masters.js +297 -1
- package/lib/dist/{index-bcabe854.js → es/gamification-feature.js} +522 -523
- package/lib/dist/es/index.js +9 -0
- package/lib/dist/es/masters.js +26797 -7
- package/lib/dist/index.d.ts +6 -5
- package/lib/dist/style.css +1 -1
- package/lib/{app-c53bb384.js → es/app.js} +1 -1
- package/lib/es/auth.js +2 -2
- package/lib/{index-e26b3493.js → es/gamification-feature.js} +542 -543
- package/lib/es/index.js +2 -2
- package/lib/{index-89366251.js → es/index2.js} +12 -12
- package/lib/es/masters.js +3 -3
- package/lib/es/masters2.js +2433 -0
- package/lib/es/points.js +45 -36
- package/lib/style.css +1 -1
- package/package.json +10 -10
- package/lib/app-36051bbe.cjs +0 -1
- package/lib/dist/index-f504e8d3.cjs +0 -1
- package/lib/dist/masters-3c9c6ffe.js +0 -26765
- package/lib/dist/masters-fe5f1486.cjs +0 -297
- package/lib/index-af5c5738.cjs +0 -1
- package/lib/index-dd93a61a.cjs +0 -4
- package/lib/masters-bf25c11c.js +0 -2415
- package/lib/masters-f135002d.cjs +0 -6
- /package/lib/{common-f34b9d88.cjs → cjs/common.js} +0 -0
- /package/lib/{index-565f26fb.cjs → cjs/index3.js} +0 -0
- /package/lib/{common-2d2a3ba3.js → es/common.js} +0 -0
- /package/lib/{index-15f61ac8.js → es/index3.js} +0 -0
|
@@ -0,0 +1,2433 @@
|
|
|
1
|
+
import { jsx as c, jsxs as I, Fragment as me } from "react/jsx-runtime";
|
|
2
|
+
import { d as Ke, S as Mt, a as qt, b as jt, s as Gt } from "./index2.js";
|
|
3
|
+
import { lazy as Wt, useMemo as Ne, Suspense as Ht, useRef as dt, useState as K, useEffect as he, Component as Yt, createElement as Vt, useCallback as pt, useContext as Qt } from "react";
|
|
4
|
+
import { FeatureType as Re, QuestionType as q } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { useStore as ee } from "@nanostores/react";
|
|
6
|
+
import { FeatureStatus as pe } from "@streamlayer/sdk-web-interfaces";
|
|
7
|
+
import { s as h, i as z, c as Kt } from "./index3.js";
|
|
8
|
+
import { NotificationType as ye } from "@streamlayer/sdk-web-notifications";
|
|
9
|
+
import { Player as Xt } from "@lottiefiles/react-lottie-player";
|
|
10
|
+
const Jt = ({ feature: s, sdk: o, children: l, className: d }) => {
|
|
11
|
+
const m = ee(s.status), g = ee(o.sdkStore.slStreamId);
|
|
12
|
+
return g != null && g.loading ? /* @__PURE__ */ c("div", { className: d, children: "event is loading..." }) : g != null && g.data ? m !== pe.Ready ? /* @__PURE__ */ c("div", { className: d, children: "wait feature..." }) : l : /* @__PURE__ */ c("div", { className: d, children: "event is forbidden..." });
|
|
13
|
+
}, Zt = Wt(() => import("./gamification-feature.js")), er = ({
|
|
14
|
+
sdk: s,
|
|
15
|
+
feature: o,
|
|
16
|
+
className: l
|
|
17
|
+
}) => {
|
|
18
|
+
const d = Ne(() => o && o.featureConfig.get().type === Re.GAMES ? /* @__PURE__ */ c(Jt, { className: l, sdk: s, feature: o, children: /* @__PURE__ */ c(Zt, { className: l, gamification: o, sdk: s }) }) : null, [s, o, l]);
|
|
19
|
+
return /* @__PURE__ */ c(
|
|
20
|
+
Ht,
|
|
21
|
+
{
|
|
22
|
+
fallback: /* @__PURE__ */ c("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
23
|
+
children: d
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}, tr = /* @__PURE__ */ h("button")({
|
|
27
|
+
name: "SButton",
|
|
28
|
+
class: "sxxa0c",
|
|
29
|
+
propsAsIs: !1
|
|
30
|
+
}), rr = /* @__PURE__ */ h("span")({
|
|
31
|
+
name: "ButtonIcon",
|
|
32
|
+
class: "b193dcyu",
|
|
33
|
+
propsAsIs: !1
|
|
34
|
+
}), ir = /* @__PURE__ */ h("span")({
|
|
35
|
+
name: "ButtonLabel",
|
|
36
|
+
class: "b40tuix",
|
|
37
|
+
propsAsIs: !1
|
|
38
|
+
}), Ue = ({ disabled: s, active: o, onClick: l, label: d, icon: m }) => /* @__PURE__ */ c(tr, { onClick: l, disabled: s, "data-selected": o, children: /* @__PURE__ */ I(me, { children: [
|
|
39
|
+
m && /* @__PURE__ */ c(rr, { children: m }),
|
|
40
|
+
/* @__PURE__ */ c(ir, { children: d })
|
|
41
|
+
] }) }), nr = () => z, sr = /* @__PURE__ */ h(nr())({
|
|
42
|
+
name: "ButtonIcon",
|
|
43
|
+
class: "b1whzxvd",
|
|
44
|
+
propsAsIs: !0
|
|
45
|
+
}), ce = "channels", or = (s) => {
|
|
46
|
+
var o;
|
|
47
|
+
return /* @__PURE__ */ c(Ue, {
|
|
48
|
+
...s,
|
|
49
|
+
id: "channels",
|
|
50
|
+
label: "Channels",
|
|
51
|
+
icon: /* @__PURE__ */ c(sr, {
|
|
52
|
+
name: "icon-btn-channels",
|
|
53
|
+
"data-selected": (o = s.active) == null ? void 0 : o.toString()
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
}, ar = () => z, lr = /* @__PURE__ */ h(ar())({
|
|
57
|
+
name: "ButtonIcon",
|
|
58
|
+
class: "b11des7c",
|
|
59
|
+
propsAsIs: !0
|
|
60
|
+
}), Z = "featuredGroups", cr = (s) => {
|
|
61
|
+
var o;
|
|
62
|
+
return /* @__PURE__ */ c(Ue, {
|
|
63
|
+
...s,
|
|
64
|
+
label: "FG+",
|
|
65
|
+
id: "featuredGroups",
|
|
66
|
+
icon: /* @__PURE__ */ c(lr, {
|
|
67
|
+
name: "icon-btn-feature-groups",
|
|
68
|
+
"data-selected": (o = s.active) == null ? void 0 : o.toString()
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}, ur = () => z, hr = /* @__PURE__ */ h(ur())({
|
|
72
|
+
name: "ButtonIcon",
|
|
73
|
+
class: "b180jd7l",
|
|
74
|
+
propsAsIs: !0
|
|
75
|
+
}), xe = "leaderboard", dr = (s) => {
|
|
76
|
+
var o;
|
|
77
|
+
return /* @__PURE__ */ c(Ue, {
|
|
78
|
+
...s,
|
|
79
|
+
label: "Leader Board",
|
|
80
|
+
id: "leaderboard",
|
|
81
|
+
icon: /* @__PURE__ */ c(hr, {
|
|
82
|
+
name: "icon-btn-leaderboard",
|
|
83
|
+
"data-selected": (o = s.active) == null ? void 0 : o.toString()
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
}, pr = /* @__PURE__ */ h("div")({
|
|
87
|
+
name: "Buttons",
|
|
88
|
+
class: "b6tbwuy",
|
|
89
|
+
propsAsIs: !1
|
|
90
|
+
}), fr = ({
|
|
91
|
+
children: s,
|
|
92
|
+
className: o
|
|
93
|
+
}) => /* @__PURE__ */ c(pr, {
|
|
94
|
+
className: o,
|
|
95
|
+
children: s
|
|
96
|
+
}), mr = () => fr, gr = /* @__PURE__ */ h(mr())({
|
|
97
|
+
name: "Navigation",
|
|
98
|
+
class: "n19lpak2",
|
|
99
|
+
propsAsIs: !0
|
|
100
|
+
}), yr = ({ activeOverlay: s, setActiveOverlay: o, sdkReady: l, className: d }) => /* @__PURE__ */ I(gr, { className: d, children: [
|
|
101
|
+
/* @__PURE__ */ c(or, { active: s === ce, onClick: () => o(ce) }),
|
|
102
|
+
/* @__PURE__ */ c(
|
|
103
|
+
cr,
|
|
104
|
+
{
|
|
105
|
+
active: s === Z,
|
|
106
|
+
disabled: !l,
|
|
107
|
+
onClick: () => {
|
|
108
|
+
o(Z);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ c(
|
|
113
|
+
dr,
|
|
114
|
+
{
|
|
115
|
+
active: s === xe,
|
|
116
|
+
onClick: () => o(xe)
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }), wr = {
|
|
120
|
+
[q.TWEET]: { label: "Insight", iconName: "icon-insight" },
|
|
121
|
+
[q.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
|
|
122
|
+
[q.UNSET]: void 0,
|
|
123
|
+
[q.FACTOID]: { label: "Insight", iconName: "icon-insight" },
|
|
124
|
+
[q.POLL]: { label: "Poll", iconName: "icon-poll" },
|
|
125
|
+
[q.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
|
|
126
|
+
[q.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
|
|
127
|
+
}, Ir = /* @__PURE__ */ h("div")({
|
|
128
|
+
name: "Container",
|
|
129
|
+
class: "c1bgb86j",
|
|
130
|
+
propsAsIs: !1
|
|
131
|
+
}), xr = /* @__PURE__ */ h("video")({
|
|
132
|
+
name: "Player",
|
|
133
|
+
class: "p6703cq",
|
|
134
|
+
propsAsIs: !1
|
|
135
|
+
}), Ar = /* @__PURE__ */ h("img")({
|
|
136
|
+
name: "Poster",
|
|
137
|
+
class: "p12ow7zo",
|
|
138
|
+
propsAsIs: !1
|
|
139
|
+
}), br = /* @__PURE__ */ h("div")({
|
|
140
|
+
name: "Control",
|
|
141
|
+
class: "cdpal9o",
|
|
142
|
+
propsAsIs: !1
|
|
143
|
+
}), Er = ({ poster: s, source: o }) => {
|
|
144
|
+
const l = dt(null), [d, m] = K(!1), [g, f] = K(!0);
|
|
145
|
+
return /* @__PURE__ */ I(Ir, { onClick: () => {
|
|
146
|
+
const n = l == null ? void 0 : l.current;
|
|
147
|
+
n && m((w) => w ? (n.pause(), !1) : (n.play(), f(!1), !0));
|
|
148
|
+
}, children: [
|
|
149
|
+
/* @__PURE__ */ c(
|
|
150
|
+
xr,
|
|
151
|
+
{
|
|
152
|
+
ref: l,
|
|
153
|
+
src: o,
|
|
154
|
+
onEnded: () => {
|
|
155
|
+
var n;
|
|
156
|
+
(n = l == null ? void 0 : l.current) == null || n.load(), m(!1), f(!0);
|
|
157
|
+
},
|
|
158
|
+
style: { visibility: g ? "hidden" : "visible" }
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ c(Ar, { src: s, style: { visibility: g ? "visible" : "hidden" } }),
|
|
162
|
+
/* @__PURE__ */ c(br, { children: !d && /* @__PURE__ */ c(z, { name: "icon-play" }) })
|
|
163
|
+
] });
|
|
164
|
+
}, Br = /* @__PURE__ */ h("div")({
|
|
165
|
+
name: "InsightContainer",
|
|
166
|
+
class: "i1pqqgpo",
|
|
167
|
+
propsAsIs: !1
|
|
168
|
+
}), vr = /* @__PURE__ */ h("div")({
|
|
169
|
+
name: "InsightContent",
|
|
170
|
+
class: "igj7luu",
|
|
171
|
+
propsAsIs: !1
|
|
172
|
+
}), _r = /* @__PURE__ */ h("h3")({
|
|
173
|
+
name: "Title",
|
|
174
|
+
class: "t1qne9g6",
|
|
175
|
+
propsAsIs: !1
|
|
176
|
+
}), Cr = /* @__PURE__ */ h("div")({
|
|
177
|
+
name: "Description",
|
|
178
|
+
class: "dtpr98r",
|
|
179
|
+
propsAsIs: !1
|
|
180
|
+
}), Tr = /* @__PURE__ */ h("button")({
|
|
181
|
+
name: "ActionBtn",
|
|
182
|
+
class: "a17iaqp8",
|
|
183
|
+
propsAsIs: !1
|
|
184
|
+
}), Fr = ({
|
|
185
|
+
video: s,
|
|
186
|
+
heading: o,
|
|
187
|
+
body: l,
|
|
188
|
+
action: d
|
|
189
|
+
}) => /* @__PURE__ */ I(Br, { children: [
|
|
190
|
+
(s == null ? void 0 : s.url) && /* @__PURE__ */ c(Er, { source: s.url, poster: s.thumbnailUrl }),
|
|
191
|
+
/* @__PURE__ */ I(vr, { children: [
|
|
192
|
+
/* @__PURE__ */ c(_r, { children: o }),
|
|
193
|
+
/* @__PURE__ */ c(Cr, { children: l }),
|
|
194
|
+
d && /* @__PURE__ */ c(Tr, { onClick: d, children: "View Insight" })
|
|
195
|
+
] })
|
|
196
|
+
] }), ne = /* @__PURE__ */ h("div")({
|
|
197
|
+
name: "BGWrap",
|
|
198
|
+
class: "b1dqe0sz",
|
|
199
|
+
propsAsIs: !1
|
|
200
|
+
}), D = /* @__PURE__ */ h("div")({
|
|
201
|
+
name: "BGLineBase",
|
|
202
|
+
class: "b1v6w7ni",
|
|
203
|
+
propsAsIs: !1
|
|
204
|
+
}), $r = () => D, kr = /* @__PURE__ */ h($r())({
|
|
205
|
+
name: "BGOneLineOne",
|
|
206
|
+
class: "b2nqb1p",
|
|
207
|
+
propsAsIs: !0
|
|
208
|
+
}), Sr = () => D, Lr = /* @__PURE__ */ h(Sr())({
|
|
209
|
+
name: "BGOneLineTwo",
|
|
210
|
+
class: "b1xxgmbk",
|
|
211
|
+
propsAsIs: !0
|
|
212
|
+
}), Nr = () => D, Rr = /* @__PURE__ */ h(Nr())({
|
|
213
|
+
name: "BGOneLineThree",
|
|
214
|
+
class: "b63lwcb",
|
|
215
|
+
propsAsIs: !0
|
|
216
|
+
}), Ur = () => D, Xe = /* @__PURE__ */ h(Ur())({
|
|
217
|
+
name: "BGTwoLineOne",
|
|
218
|
+
class: "b2iah4",
|
|
219
|
+
propsAsIs: !0
|
|
220
|
+
}), zr = () => D, Je = /* @__PURE__ */ h(zr())({
|
|
221
|
+
name: "BGTwoLineTwo",
|
|
222
|
+
class: "b1xezvf6",
|
|
223
|
+
propsAsIs: !0
|
|
224
|
+
}), Or = () => D, Ze = /* @__PURE__ */ h(Or())({
|
|
225
|
+
name: "BGTwoLineThree",
|
|
226
|
+
class: "b1jz1hg0",
|
|
227
|
+
propsAsIs: !0
|
|
228
|
+
}), Dr = () => D, et = /* @__PURE__ */ h(Dr())({
|
|
229
|
+
name: "BGThreeLineOne",
|
|
230
|
+
class: "b18ho1tk",
|
|
231
|
+
propsAsIs: !0
|
|
232
|
+
}), Pr = () => D, tt = /* @__PURE__ */ h(Pr())({
|
|
233
|
+
name: "BGThreeLineTwo",
|
|
234
|
+
class: "b14uvjfm",
|
|
235
|
+
propsAsIs: !0
|
|
236
|
+
}), Mr = () => D, rt = /* @__PURE__ */ h(Mr())({
|
|
237
|
+
name: "BGThreeLineThree",
|
|
238
|
+
class: "b11c3ns7",
|
|
239
|
+
propsAsIs: !0
|
|
240
|
+
}), qr = () => D, it = /* @__PURE__ */ h(qr())({
|
|
241
|
+
name: "BGThreeLineFour",
|
|
242
|
+
class: "b1bqhhet",
|
|
243
|
+
propsAsIs: !0
|
|
244
|
+
}), jr = () => D, Gr = /* @__PURE__ */ h(jr())({
|
|
245
|
+
name: "BGFourLineOne",
|
|
246
|
+
class: "b1xyzi7o",
|
|
247
|
+
propsAsIs: !0
|
|
248
|
+
}), Wr = () => D, Hr = /* @__PURE__ */ h(Wr())({
|
|
249
|
+
name: "BGFourLineTwo",
|
|
250
|
+
class: "byo0rup",
|
|
251
|
+
propsAsIs: !0
|
|
252
|
+
}), Yr = () => D, Vr = /* @__PURE__ */ h(Yr())({
|
|
253
|
+
name: "BGFourLineThree",
|
|
254
|
+
class: "b1oyiqgv",
|
|
255
|
+
propsAsIs: !0
|
|
256
|
+
}), Qr = () => D, Kr = /* @__PURE__ */ h(Qr())({
|
|
257
|
+
name: "BGFourLineFour",
|
|
258
|
+
class: "bx3ddqw",
|
|
259
|
+
propsAsIs: !0
|
|
260
|
+
}), Xr = ({ step: s, correct: o }) => /* @__PURE__ */ I(me, { children: [
|
|
261
|
+
/* @__PURE__ */ I(ne, { "data-active": s === 1, "data-first-screen": "true", children: [
|
|
262
|
+
/* @__PURE__ */ c(kr, {}),
|
|
263
|
+
/* @__PURE__ */ c(Lr, {}),
|
|
264
|
+
/* @__PURE__ */ c(Rr, {})
|
|
265
|
+
] }),
|
|
266
|
+
/* @__PURE__ */ I(ne, { "data-active": s === 2, children: [
|
|
267
|
+
/* @__PURE__ */ c(Xe, {}),
|
|
268
|
+
/* @__PURE__ */ c(Je, {}),
|
|
269
|
+
/* @__PURE__ */ c(Ze, {})
|
|
270
|
+
] }),
|
|
271
|
+
/* @__PURE__ */ I(ne, { "data-active": s === 3, children: [
|
|
272
|
+
/* @__PURE__ */ c(Xe, {}),
|
|
273
|
+
/* @__PURE__ */ c(Je, {}),
|
|
274
|
+
/* @__PURE__ */ c(Ze, {})
|
|
275
|
+
] }),
|
|
276
|
+
o ? /* @__PURE__ */ I(me, { children: [
|
|
277
|
+
/* @__PURE__ */ I(ne, { "data-active": s === 4, "data-correct": "false", children: [
|
|
278
|
+
/* @__PURE__ */ c(et, {}),
|
|
279
|
+
/* @__PURE__ */ c(tt, {}),
|
|
280
|
+
/* @__PURE__ */ c(rt, {}),
|
|
281
|
+
/* @__PURE__ */ c(it, {})
|
|
282
|
+
] }),
|
|
283
|
+
/* @__PURE__ */ I(ne, { "data-active": s === 5, "data-correct": "false", "data-last-screen": "true", children: [
|
|
284
|
+
/* @__PURE__ */ c(et, {}),
|
|
285
|
+
/* @__PURE__ */ c(tt, {}),
|
|
286
|
+
/* @__PURE__ */ c(rt, {}),
|
|
287
|
+
/* @__PURE__ */ c(it, {})
|
|
288
|
+
] })
|
|
289
|
+
] }) : /* @__PURE__ */ I(ne, { "data-active": s === 4, "data-correct": "false", "data-last-screen": "true", children: [
|
|
290
|
+
/* @__PURE__ */ c(Gr, {}),
|
|
291
|
+
/* @__PURE__ */ c(Hr, {}),
|
|
292
|
+
/* @__PURE__ */ c(Vr, {}),
|
|
293
|
+
/* @__PURE__ */ c(Kr, {})
|
|
294
|
+
] })
|
|
295
|
+
] }), Jr = /* @__PURE__ */ h("div")({
|
|
296
|
+
name: "Container",
|
|
297
|
+
class: "c10131zw",
|
|
298
|
+
propsAsIs: !1
|
|
299
|
+
}), Zr = /* @__PURE__ */ h("div")({
|
|
300
|
+
name: "AnimateContent",
|
|
301
|
+
class: "ar6k2eo",
|
|
302
|
+
propsAsIs: !1
|
|
303
|
+
}), se = /* @__PURE__ */ h("div")({
|
|
304
|
+
name: "Content",
|
|
305
|
+
class: "c1hwoq9l",
|
|
306
|
+
propsAsIs: !1
|
|
307
|
+
}), oe = /* @__PURE__ */ h("div")({
|
|
308
|
+
name: "Title",
|
|
309
|
+
class: "t4ujo4g",
|
|
310
|
+
propsAsIs: !1
|
|
311
|
+
}), fe = /* @__PURE__ */ h("div")({
|
|
312
|
+
name: "Subtitle",
|
|
313
|
+
class: "s1pjil1h",
|
|
314
|
+
propsAsIs: !1
|
|
315
|
+
}), ei = () => fe, nt = /* @__PURE__ */ h(ei())({
|
|
316
|
+
name: "SubtitleFG",
|
|
317
|
+
class: "s1iorwr9",
|
|
318
|
+
propsAsIs: !0
|
|
319
|
+
}), we = /* @__PURE__ */ h("div")({
|
|
320
|
+
name: "AnswerText",
|
|
321
|
+
class: "a51sv9d",
|
|
322
|
+
propsAsIs: !1
|
|
323
|
+
}), ti = () => z, ve = /* @__PURE__ */ h(ti())({
|
|
324
|
+
name: "FeedbackIcon",
|
|
325
|
+
class: "f1lbk2ye",
|
|
326
|
+
propsAsIs: !0
|
|
327
|
+
}), st = /* @__PURE__ */ h("button")({
|
|
328
|
+
name: "CloseButton",
|
|
329
|
+
class: "crcvk3t",
|
|
330
|
+
propsAsIs: !1
|
|
331
|
+
}), ri = () => z, ot = /* @__PURE__ */ h(ri())({
|
|
332
|
+
name: "CloseIcon",
|
|
333
|
+
class: "c33p82r",
|
|
334
|
+
propsAsIs: !0
|
|
335
|
+
}), ii = ({
|
|
336
|
+
close: s,
|
|
337
|
+
votedAnswer: o,
|
|
338
|
+
correct: l,
|
|
339
|
+
correctAnswerTitle: d
|
|
340
|
+
}) => {
|
|
341
|
+
const [m, g] = K(1);
|
|
342
|
+
return he(() => {
|
|
343
|
+
const f = setInterval(() => {
|
|
344
|
+
g((n) => l && n > 4 || !l && n > 3 ? n : ++n);
|
|
345
|
+
}, 6e3);
|
|
346
|
+
return () => clearInterval(f);
|
|
347
|
+
}, [l]), /* @__PURE__ */ I(Jr, { "data-bg-color-white": m > 3, children: [
|
|
348
|
+
/* @__PURE__ */ c(Xr, { step: m, correct: l }),
|
|
349
|
+
/* @__PURE__ */ I(Zr, { "data-active-number": m, children: [
|
|
350
|
+
/* @__PURE__ */ I(se, { children: [
|
|
351
|
+
/* @__PURE__ */ c(oe, { children: "Master" }),
|
|
352
|
+
/* @__PURE__ */ c(nt, { children: "FEATURED GROUPS +" })
|
|
353
|
+
] }),
|
|
354
|
+
/* @__PURE__ */ I(se, { children: [
|
|
355
|
+
/* @__PURE__ */ c(oe, { children: "Prediction results are in!" }),
|
|
356
|
+
/* @__PURE__ */ c(nt, { children: "FEATURED GROUPS +" })
|
|
357
|
+
] }),
|
|
358
|
+
/* @__PURE__ */ I(se, { children: [
|
|
359
|
+
/* @__PURE__ */ c(oe, { children: "Who holds the most birdies in golf?" }),
|
|
360
|
+
/* @__PURE__ */ I(fe, { children: [
|
|
361
|
+
"Your Pick: ",
|
|
362
|
+
/* @__PURE__ */ c(we, { children: o == null ? void 0 : o.title })
|
|
363
|
+
] })
|
|
364
|
+
] }),
|
|
365
|
+
l ? /* @__PURE__ */ I(me, { children: [
|
|
366
|
+
/* @__PURE__ */ I(se, { "data-color-green": "true", children: [
|
|
367
|
+
/* @__PURE__ */ c(oe, { children: "Congratulations! You answered correctly." }),
|
|
368
|
+
/* @__PURE__ */ I(fe, { children: [
|
|
369
|
+
/* @__PURE__ */ c(ve, { name: "selected" }),
|
|
370
|
+
"Your Pick: ",
|
|
371
|
+
/* @__PURE__ */ c(we, { children: o == null ? void 0 : o.title })
|
|
372
|
+
] })
|
|
373
|
+
] }),
|
|
374
|
+
/* @__PURE__ */ I(se, { "data-color-green": "true", children: [
|
|
375
|
+
/* @__PURE__ */ c(st, { onClick: s, children: /* @__PURE__ */ c(ot, { name: "icon-cross" }) }),
|
|
376
|
+
/* @__PURE__ */ I(oe, { children: [
|
|
377
|
+
"+",
|
|
378
|
+
o == null ? void 0 : o.points,
|
|
379
|
+
" points"
|
|
380
|
+
] }),
|
|
381
|
+
/* @__PURE__ */ I(fe, { children: [
|
|
382
|
+
/* @__PURE__ */ c(ve, { name: "selected" }),
|
|
383
|
+
"Your Pick: ",
|
|
384
|
+
/* @__PURE__ */ c(we, { children: o == null ? void 0 : o.title })
|
|
385
|
+
] })
|
|
386
|
+
] })
|
|
387
|
+
] }) : /* @__PURE__ */ I(se, { children: [
|
|
388
|
+
/* @__PURE__ */ c(st, { onClick: s, children: /* @__PURE__ */ c(ot, { name: "icon-cross" }) }),
|
|
389
|
+
/* @__PURE__ */ I(oe, { "data-incorrect": "true", children: [
|
|
390
|
+
"Better luck next time! Correct: ",
|
|
391
|
+
d,
|
|
392
|
+
"."
|
|
393
|
+
] }),
|
|
394
|
+
/* @__PURE__ */ I(fe, { "data-incorrect": "true", children: [
|
|
395
|
+
/* @__PURE__ */ c(ve, { name: "circleClose" }),
|
|
396
|
+
"Your Pick: ",
|
|
397
|
+
/* @__PURE__ */ c(we, { children: o == null ? void 0 : o.title })
|
|
398
|
+
] })
|
|
399
|
+
] })
|
|
400
|
+
] })
|
|
401
|
+
] });
|
|
402
|
+
}, ni = /* @__PURE__ */ h("div")({
|
|
403
|
+
name: "Container",
|
|
404
|
+
class: "c1eptrjd",
|
|
405
|
+
propsAsIs: !1
|
|
406
|
+
}), si = /* @__PURE__ */ h("div")({
|
|
407
|
+
name: "CloseIconWrap",
|
|
408
|
+
class: "crylm65",
|
|
409
|
+
propsAsIs: !1
|
|
410
|
+
}), oi = () => z, ai = /* @__PURE__ */ h(oi())({
|
|
411
|
+
name: "CloseIcon",
|
|
412
|
+
class: "c9mrcz7",
|
|
413
|
+
propsAsIs: !0
|
|
414
|
+
}), li = /* @__PURE__ */ h("div")({
|
|
415
|
+
name: "Header",
|
|
416
|
+
class: "hw3lzv4",
|
|
417
|
+
propsAsIs: !1
|
|
418
|
+
}), ci = () => z, ui = /* @__PURE__ */ h(ci())({
|
|
419
|
+
name: "TypeIcon",
|
|
420
|
+
class: "t1rrb3kf",
|
|
421
|
+
propsAsIs: !0
|
|
422
|
+
}), hi = /* @__PURE__ */ h("span")({
|
|
423
|
+
name: "TypeName",
|
|
424
|
+
class: "t1ydnjov",
|
|
425
|
+
propsAsIs: !1
|
|
426
|
+
}), di = /* @__PURE__ */ h("div")({
|
|
427
|
+
name: "Question",
|
|
428
|
+
class: "qlf90cl",
|
|
429
|
+
propsAsIs: !1
|
|
430
|
+
}), pi = /* @__PURE__ */ h("button")({
|
|
431
|
+
name: "AnswerButton",
|
|
432
|
+
class: "a1e0nhcl",
|
|
433
|
+
propsAsIs: !1
|
|
434
|
+
}), fi = /* @__PURE__ */ h("div")({
|
|
435
|
+
name: "Container",
|
|
436
|
+
class: "cjq447q",
|
|
437
|
+
propsAsIs: !1
|
|
438
|
+
}), mi = /* @__PURE__ */ h("div")({
|
|
439
|
+
name: "ImageContainer",
|
|
440
|
+
class: "i14egogb",
|
|
441
|
+
propsAsIs: !1
|
|
442
|
+
}), gi = /* @__PURE__ */ h("img")({
|
|
443
|
+
name: "Image",
|
|
444
|
+
class: "i2g9g4l",
|
|
445
|
+
propsAsIs: !1
|
|
446
|
+
}), yi = /* @__PURE__ */ h("div")({
|
|
447
|
+
name: "Details",
|
|
448
|
+
class: "d1c454nm",
|
|
449
|
+
propsAsIs: !1
|
|
450
|
+
}), wi = /* @__PURE__ */ h("div")({
|
|
451
|
+
name: "Name",
|
|
452
|
+
class: "n11nigc3",
|
|
453
|
+
propsAsIs: !1
|
|
454
|
+
}), Ii = /* @__PURE__ */ h("div")({
|
|
455
|
+
name: "UserName",
|
|
456
|
+
class: "urxa4k8",
|
|
457
|
+
propsAsIs: !1
|
|
458
|
+
}), xi = ({ image: s, name: o, userName: l, verified: d }) => /* @__PURE__ */ I(fi, { children: [
|
|
459
|
+
/* @__PURE__ */ c(mi, { children: /* @__PURE__ */ c(gi, { src: s }) }),
|
|
460
|
+
/* @__PURE__ */ I(yi, { children: [
|
|
461
|
+
/* @__PURE__ */ I(wi, { children: [
|
|
462
|
+
o,
|
|
463
|
+
" ",
|
|
464
|
+
d && /* @__PURE__ */ c(z, { name: "icon-twitter-verified" })
|
|
465
|
+
] }),
|
|
466
|
+
/* @__PURE__ */ c(Ii, { children: l })
|
|
467
|
+
] })
|
|
468
|
+
] }), Ai = /* @__PURE__ */ h("div")({
|
|
469
|
+
name: "Container",
|
|
470
|
+
class: "c1t4f0x4",
|
|
471
|
+
propsAsIs: !1
|
|
472
|
+
}), bi = /* @__PURE__ */ h("button")({
|
|
473
|
+
name: "ActionBtn",
|
|
474
|
+
class: "a16w1nl6",
|
|
475
|
+
propsAsIs: !1
|
|
476
|
+
}), Ei = /* @__PURE__ */ h("div")({
|
|
477
|
+
name: "Body",
|
|
478
|
+
class: "b14u54rf",
|
|
479
|
+
propsAsIs: !1
|
|
480
|
+
}), Bi = /* @__PURE__ */ h("img")({
|
|
481
|
+
name: "Image",
|
|
482
|
+
class: "i1hxm6zo",
|
|
483
|
+
propsAsIs: !1
|
|
484
|
+
}), vi = /* @__PURE__ */ h("div")({
|
|
485
|
+
name: "Details",
|
|
486
|
+
class: "d1s19yop",
|
|
487
|
+
propsAsIs: !1
|
|
488
|
+
}), _i = /* @__PURE__ */ h("div")({
|
|
489
|
+
name: "QuoteWrap",
|
|
490
|
+
class: "q1qyx94r",
|
|
491
|
+
propsAsIs: !1
|
|
492
|
+
}), Ci = /* @__PURE__ */ h("blockquote")({
|
|
493
|
+
name: "Quote",
|
|
494
|
+
class: "qs97clu",
|
|
495
|
+
propsAsIs: !1
|
|
496
|
+
}), Ti = ({
|
|
497
|
+
account: s,
|
|
498
|
+
body: o,
|
|
499
|
+
image: l,
|
|
500
|
+
title: d,
|
|
501
|
+
action: m
|
|
502
|
+
}) => /* @__PURE__ */ I(Ai, { children: [
|
|
503
|
+
/* @__PURE__ */ c(_i, { children: /* @__PURE__ */ c(Ci, { children: d }) }),
|
|
504
|
+
/* @__PURE__ */ I(vi, { children: [
|
|
505
|
+
/* @__PURE__ */ c(xi, { ...s }),
|
|
506
|
+
/* @__PURE__ */ c(Ei, { children: o }),
|
|
507
|
+
l && /* @__PURE__ */ c(Bi, { src: l })
|
|
508
|
+
] }),
|
|
509
|
+
m && /* @__PURE__ */ c(bi, { onClick: m, children: "View Tweet" })
|
|
510
|
+
] }), at = ({
|
|
511
|
+
close: s,
|
|
512
|
+
action: o,
|
|
513
|
+
data: { questionType: l, question: d, insight: m, tweet: g }
|
|
514
|
+
}) => {
|
|
515
|
+
const f = wr[l];
|
|
516
|
+
return f ? d != null && d.predictionResult ? /* @__PURE__ */ c(ii, { close: s, ...d }) : /* @__PURE__ */ I(ni, { children: [
|
|
517
|
+
/* @__PURE__ */ c(si, { onClick: s, children: /* @__PURE__ */ c(ai, { name: "icon-cross" }) }),
|
|
518
|
+
l !== q.TWEET && /* @__PURE__ */ I(li, { children: [
|
|
519
|
+
/* @__PURE__ */ c(ui, { name: f.iconName }),
|
|
520
|
+
/* @__PURE__ */ c(hi, { children: f.label })
|
|
521
|
+
] }),
|
|
522
|
+
l === q.FACTOID && /* @__PURE__ */ c(Fr, { ...m, action: o }),
|
|
523
|
+
l === q.TWEET && // ToDo: connect with real Api data
|
|
524
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
525
|
+
// @ts-ignore
|
|
526
|
+
/* @__PURE__ */ c(Ti, { ...g, action: o }),
|
|
527
|
+
l !== q.FACTOID && l !== q.TWEET && /* @__PURE__ */ I(me, { children: [
|
|
528
|
+
/* @__PURE__ */ c(di, { children: d == null ? void 0 : d.title }),
|
|
529
|
+
/* @__PURE__ */ c(pi, { onClick: o, children: "Answer" })
|
|
530
|
+
] })
|
|
531
|
+
] }) : null;
|
|
532
|
+
};
|
|
533
|
+
var ft = {}, mt = {}, Ae = {};
|
|
534
|
+
Ae.byteLength = ki;
|
|
535
|
+
Ae.toByteArray = Li;
|
|
536
|
+
Ae.fromByteArray = Ui;
|
|
537
|
+
var Y = [], M = [], Fi = typeof Uint8Array < "u" ? Uint8Array : Array, _e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
538
|
+
for (var ae = 0, $i = _e.length; ae < $i; ++ae)
|
|
539
|
+
Y[ae] = _e[ae], M[_e.charCodeAt(ae)] = ae;
|
|
540
|
+
M["-".charCodeAt(0)] = 62;
|
|
541
|
+
M["_".charCodeAt(0)] = 63;
|
|
542
|
+
function gt(s) {
|
|
543
|
+
var o = s.length;
|
|
544
|
+
if (o % 4 > 0)
|
|
545
|
+
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
546
|
+
var l = s.indexOf("=");
|
|
547
|
+
l === -1 && (l = o);
|
|
548
|
+
var d = l === o ? 0 : 4 - l % 4;
|
|
549
|
+
return [l, d];
|
|
550
|
+
}
|
|
551
|
+
function ki(s) {
|
|
552
|
+
var o = gt(s), l = o[0], d = o[1];
|
|
553
|
+
return (l + d) * 3 / 4 - d;
|
|
554
|
+
}
|
|
555
|
+
function Si(s, o, l) {
|
|
556
|
+
return (o + l) * 3 / 4 - l;
|
|
557
|
+
}
|
|
558
|
+
function Li(s) {
|
|
559
|
+
var o, l = gt(s), d = l[0], m = l[1], g = new Fi(Si(s, d, m)), f = 0, n = m > 0 ? d - 4 : d, w;
|
|
560
|
+
for (w = 0; w < n; w += 4)
|
|
561
|
+
o = M[s.charCodeAt(w)] << 18 | M[s.charCodeAt(w + 1)] << 12 | M[s.charCodeAt(w + 2)] << 6 | M[s.charCodeAt(w + 3)], g[f++] = o >> 16 & 255, g[f++] = o >> 8 & 255, g[f++] = o & 255;
|
|
562
|
+
return m === 2 && (o = M[s.charCodeAt(w)] << 2 | M[s.charCodeAt(w + 1)] >> 4, g[f++] = o & 255), m === 1 && (o = M[s.charCodeAt(w)] << 10 | M[s.charCodeAt(w + 1)] << 4 | M[s.charCodeAt(w + 2)] >> 2, g[f++] = o >> 8 & 255, g[f++] = o & 255), g;
|
|
563
|
+
}
|
|
564
|
+
function Ni(s) {
|
|
565
|
+
return Y[s >> 18 & 63] + Y[s >> 12 & 63] + Y[s >> 6 & 63] + Y[s & 63];
|
|
566
|
+
}
|
|
567
|
+
function Ri(s, o, l) {
|
|
568
|
+
for (var d, m = [], g = o; g < l; g += 3)
|
|
569
|
+
d = (s[g] << 16 & 16711680) + (s[g + 1] << 8 & 65280) + (s[g + 2] & 255), m.push(Ni(d));
|
|
570
|
+
return m.join("");
|
|
571
|
+
}
|
|
572
|
+
function Ui(s) {
|
|
573
|
+
for (var o, l = s.length, d = l % 3, m = [], g = 16383, f = 0, n = l - d; f < n; f += g)
|
|
574
|
+
m.push(Ri(s, f, f + g > n ? n : f + g));
|
|
575
|
+
return d === 1 ? (o = s[l - 1], m.push(
|
|
576
|
+
Y[o >> 2] + Y[o << 4 & 63] + "=="
|
|
577
|
+
)) : d === 2 && (o = (s[l - 2] << 8) + s[l - 1], m.push(
|
|
578
|
+
Y[o >> 10] + Y[o >> 4 & 63] + Y[o << 2 & 63] + "="
|
|
579
|
+
)), m.join("");
|
|
580
|
+
}
|
|
581
|
+
var ze = {};
|
|
582
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
583
|
+
ze.read = function(s, o, l, d, m) {
|
|
584
|
+
var g, f, n = m * 8 - d - 1, w = (1 << n) - 1, v = w >> 1, E = -7, C = l ? m - 1 : 0, y = l ? -1 : 1, x = s[o + C];
|
|
585
|
+
for (C += y, g = x & (1 << -E) - 1, x >>= -E, E += n; E > 0; g = g * 256 + s[o + C], C += y, E -= 8)
|
|
586
|
+
;
|
|
587
|
+
for (f = g & (1 << -E) - 1, g >>= -E, E += d; E > 0; f = f * 256 + s[o + C], C += y, E -= 8)
|
|
588
|
+
;
|
|
589
|
+
if (g === 0)
|
|
590
|
+
g = 1 - v;
|
|
591
|
+
else {
|
|
592
|
+
if (g === w)
|
|
593
|
+
return f ? NaN : (x ? -1 : 1) * (1 / 0);
|
|
594
|
+
f = f + Math.pow(2, d), g = g - v;
|
|
595
|
+
}
|
|
596
|
+
return (x ? -1 : 1) * f * Math.pow(2, g - d);
|
|
597
|
+
};
|
|
598
|
+
ze.write = function(s, o, l, d, m, g) {
|
|
599
|
+
var f, n, w, v = g * 8 - m - 1, E = (1 << v) - 1, C = E >> 1, y = m === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, x = d ? 0 : g - 1, A = d ? 1 : -1, B = o < 0 || o === 0 && 1 / o < 0 ? 1 : 0;
|
|
600
|
+
for (o = Math.abs(o), isNaN(o) || o === 1 / 0 ? (n = isNaN(o) ? 1 : 0, f = E) : (f = Math.floor(Math.log(o) / Math.LN2), o * (w = Math.pow(2, -f)) < 1 && (f--, w *= 2), f + C >= 1 ? o += y / w : o += y * Math.pow(2, 1 - C), o * w >= 2 && (f++, w /= 2), f + C >= E ? (n = 0, f = E) : f + C >= 1 ? (n = (o * w - 1) * Math.pow(2, m), f = f + C) : (n = o * Math.pow(2, C - 1) * Math.pow(2, m), f = 0)); m >= 8; s[l + x] = n & 255, x += A, n /= 256, m -= 8)
|
|
601
|
+
;
|
|
602
|
+
for (f = f << m | n, v += m; v > 0; s[l + x] = f & 255, x += A, f /= 256, v -= 8)
|
|
603
|
+
;
|
|
604
|
+
s[l + x - A] |= B * 128;
|
|
605
|
+
};
|
|
606
|
+
/*!
|
|
607
|
+
* The buffer module from node.js, for the browser.
|
|
608
|
+
*
|
|
609
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
610
|
+
* @license MIT
|
|
611
|
+
*/
|
|
612
|
+
(function(s) {
|
|
613
|
+
const o = Ae, l = ze, d = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
614
|
+
s.Buffer = n, s.SlowBuffer = F, s.INSPECT_MAX_BYTES = 50;
|
|
615
|
+
const m = 2147483647;
|
|
616
|
+
s.kMaxLength = m, n.TYPED_ARRAY_SUPPORT = g(), !n.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
617
|
+
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
618
|
+
);
|
|
619
|
+
function g() {
|
|
620
|
+
try {
|
|
621
|
+
const r = new Uint8Array(1), e = { foo: function() {
|
|
622
|
+
return 42;
|
|
623
|
+
} };
|
|
624
|
+
return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(r, e), r.foo() === 42;
|
|
625
|
+
} catch {
|
|
626
|
+
return !1;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
Object.defineProperty(n.prototype, "parent", {
|
|
630
|
+
enumerable: !0,
|
|
631
|
+
get: function() {
|
|
632
|
+
if (n.isBuffer(this))
|
|
633
|
+
return this.buffer;
|
|
634
|
+
}
|
|
635
|
+
}), Object.defineProperty(n.prototype, "offset", {
|
|
636
|
+
enumerable: !0,
|
|
637
|
+
get: function() {
|
|
638
|
+
if (n.isBuffer(this))
|
|
639
|
+
return this.byteOffset;
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
function f(r) {
|
|
643
|
+
if (r > m)
|
|
644
|
+
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
645
|
+
const e = new Uint8Array(r);
|
|
646
|
+
return Object.setPrototypeOf(e, n.prototype), e;
|
|
647
|
+
}
|
|
648
|
+
function n(r, e, t) {
|
|
649
|
+
if (typeof r == "number") {
|
|
650
|
+
if (typeof e == "string")
|
|
651
|
+
throw new TypeError(
|
|
652
|
+
'The "string" argument must be of type string. Received type number'
|
|
653
|
+
);
|
|
654
|
+
return C(r);
|
|
655
|
+
}
|
|
656
|
+
return w(r, e, t);
|
|
657
|
+
}
|
|
658
|
+
n.poolSize = 8192;
|
|
659
|
+
function w(r, e, t) {
|
|
660
|
+
if (typeof r == "string")
|
|
661
|
+
return y(r, e);
|
|
662
|
+
if (ArrayBuffer.isView(r))
|
|
663
|
+
return A(r);
|
|
664
|
+
if (r == null)
|
|
665
|
+
throw new TypeError(
|
|
666
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
|
|
667
|
+
);
|
|
668
|
+
if (G(r, ArrayBuffer) || r && G(r.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (G(r, SharedArrayBuffer) || r && G(r.buffer, SharedArrayBuffer)))
|
|
669
|
+
return B(r, e, t);
|
|
670
|
+
if (typeof r == "number")
|
|
671
|
+
throw new TypeError(
|
|
672
|
+
'The "value" argument must not be of type number. Received type number'
|
|
673
|
+
);
|
|
674
|
+
const i = r.valueOf && r.valueOf();
|
|
675
|
+
if (i != null && i !== r)
|
|
676
|
+
return n.from(i, e, t);
|
|
677
|
+
const a = N(r);
|
|
678
|
+
if (a)
|
|
679
|
+
return a;
|
|
680
|
+
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof r[Symbol.toPrimitive] == "function")
|
|
681
|
+
return n.from(r[Symbol.toPrimitive]("string"), e, t);
|
|
682
|
+
throw new TypeError(
|
|
683
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
n.from = function(r, e, t) {
|
|
687
|
+
return w(r, e, t);
|
|
688
|
+
}, Object.setPrototypeOf(n.prototype, Uint8Array.prototype), Object.setPrototypeOf(n, Uint8Array);
|
|
689
|
+
function v(r) {
|
|
690
|
+
if (typeof r != "number")
|
|
691
|
+
throw new TypeError('"size" argument must be of type number');
|
|
692
|
+
if (r < 0)
|
|
693
|
+
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
694
|
+
}
|
|
695
|
+
function E(r, e, t) {
|
|
696
|
+
return v(r), r <= 0 ? f(r) : e !== void 0 ? typeof t == "string" ? f(r).fill(e, t) : f(r).fill(e) : f(r);
|
|
697
|
+
}
|
|
698
|
+
n.alloc = function(r, e, t) {
|
|
699
|
+
return E(r, e, t);
|
|
700
|
+
};
|
|
701
|
+
function C(r) {
|
|
702
|
+
return v(r), f(r < 0 ? 0 : _(r) | 0);
|
|
703
|
+
}
|
|
704
|
+
n.allocUnsafe = function(r) {
|
|
705
|
+
return C(r);
|
|
706
|
+
}, n.allocUnsafeSlow = function(r) {
|
|
707
|
+
return C(r);
|
|
708
|
+
};
|
|
709
|
+
function y(r, e) {
|
|
710
|
+
if ((typeof e != "string" || e === "") && (e = "utf8"), !n.isEncoding(e))
|
|
711
|
+
throw new TypeError("Unknown encoding: " + e);
|
|
712
|
+
const t = U(r, e) | 0;
|
|
713
|
+
let i = f(t);
|
|
714
|
+
const a = i.write(r, e);
|
|
715
|
+
return a !== t && (i = i.slice(0, a)), i;
|
|
716
|
+
}
|
|
717
|
+
function x(r) {
|
|
718
|
+
const e = r.length < 0 ? 0 : _(r.length) | 0, t = f(e);
|
|
719
|
+
for (let i = 0; i < e; i += 1)
|
|
720
|
+
t[i] = r[i] & 255;
|
|
721
|
+
return t;
|
|
722
|
+
}
|
|
723
|
+
function A(r) {
|
|
724
|
+
if (G(r, Uint8Array)) {
|
|
725
|
+
const e = new Uint8Array(r);
|
|
726
|
+
return B(e.buffer, e.byteOffset, e.byteLength);
|
|
727
|
+
}
|
|
728
|
+
return x(r);
|
|
729
|
+
}
|
|
730
|
+
function B(r, e, t) {
|
|
731
|
+
if (e < 0 || r.byteLength < e)
|
|
732
|
+
throw new RangeError('"offset" is outside of buffer bounds');
|
|
733
|
+
if (r.byteLength < e + (t || 0))
|
|
734
|
+
throw new RangeError('"length" is outside of buffer bounds');
|
|
735
|
+
let i;
|
|
736
|
+
return e === void 0 && t === void 0 ? i = new Uint8Array(r) : t === void 0 ? i = new Uint8Array(r, e) : i = new Uint8Array(r, e, t), Object.setPrototypeOf(i, n.prototype), i;
|
|
737
|
+
}
|
|
738
|
+
function N(r) {
|
|
739
|
+
if (n.isBuffer(r)) {
|
|
740
|
+
const e = _(r.length) | 0, t = f(e);
|
|
741
|
+
return t.length === 0 || r.copy(t, 0, 0, e), t;
|
|
742
|
+
}
|
|
743
|
+
if (r.length !== void 0)
|
|
744
|
+
return typeof r.length != "number" || Be(r.length) ? f(0) : x(r);
|
|
745
|
+
if (r.type === "Buffer" && Array.isArray(r.data))
|
|
746
|
+
return x(r.data);
|
|
747
|
+
}
|
|
748
|
+
function _(r) {
|
|
749
|
+
if (r >= m)
|
|
750
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + m.toString(16) + " bytes");
|
|
751
|
+
return r | 0;
|
|
752
|
+
}
|
|
753
|
+
function F(r) {
|
|
754
|
+
return +r != r && (r = 0), n.alloc(+r);
|
|
755
|
+
}
|
|
756
|
+
n.isBuffer = function(e) {
|
|
757
|
+
return e != null && e._isBuffer === !0 && e !== n.prototype;
|
|
758
|
+
}, n.compare = function(e, t) {
|
|
759
|
+
if (G(e, Uint8Array) && (e = n.from(e, e.offset, e.byteLength)), G(t, Uint8Array) && (t = n.from(t, t.offset, t.byteLength)), !n.isBuffer(e) || !n.isBuffer(t))
|
|
760
|
+
throw new TypeError(
|
|
761
|
+
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
762
|
+
);
|
|
763
|
+
if (e === t)
|
|
764
|
+
return 0;
|
|
765
|
+
let i = e.length, a = t.length;
|
|
766
|
+
for (let u = 0, p = Math.min(i, a); u < p; ++u)
|
|
767
|
+
if (e[u] !== t[u]) {
|
|
768
|
+
i = e[u], a = t[u];
|
|
769
|
+
break;
|
|
770
|
+
}
|
|
771
|
+
return i < a ? -1 : a < i ? 1 : 0;
|
|
772
|
+
}, n.isEncoding = function(e) {
|
|
773
|
+
switch (String(e).toLowerCase()) {
|
|
774
|
+
case "hex":
|
|
775
|
+
case "utf8":
|
|
776
|
+
case "utf-8":
|
|
777
|
+
case "ascii":
|
|
778
|
+
case "latin1":
|
|
779
|
+
case "binary":
|
|
780
|
+
case "base64":
|
|
781
|
+
case "ucs2":
|
|
782
|
+
case "ucs-2":
|
|
783
|
+
case "utf16le":
|
|
784
|
+
case "utf-16le":
|
|
785
|
+
return !0;
|
|
786
|
+
default:
|
|
787
|
+
return !1;
|
|
788
|
+
}
|
|
789
|
+
}, n.concat = function(e, t) {
|
|
790
|
+
if (!Array.isArray(e))
|
|
791
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
792
|
+
if (e.length === 0)
|
|
793
|
+
return n.alloc(0);
|
|
794
|
+
let i;
|
|
795
|
+
if (t === void 0)
|
|
796
|
+
for (t = 0, i = 0; i < e.length; ++i)
|
|
797
|
+
t += e[i].length;
|
|
798
|
+
const a = n.allocUnsafe(t);
|
|
799
|
+
let u = 0;
|
|
800
|
+
for (i = 0; i < e.length; ++i) {
|
|
801
|
+
let p = e[i];
|
|
802
|
+
if (G(p, Uint8Array))
|
|
803
|
+
u + p.length > a.length ? (n.isBuffer(p) || (p = n.from(p)), p.copy(a, u)) : Uint8Array.prototype.set.call(
|
|
804
|
+
a,
|
|
805
|
+
p,
|
|
806
|
+
u
|
|
807
|
+
);
|
|
808
|
+
else if (n.isBuffer(p))
|
|
809
|
+
p.copy(a, u);
|
|
810
|
+
else
|
|
811
|
+
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
812
|
+
u += p.length;
|
|
813
|
+
}
|
|
814
|
+
return a;
|
|
815
|
+
};
|
|
816
|
+
function U(r, e) {
|
|
817
|
+
if (n.isBuffer(r))
|
|
818
|
+
return r.length;
|
|
819
|
+
if (ArrayBuffer.isView(r) || G(r, ArrayBuffer))
|
|
820
|
+
return r.byteLength;
|
|
821
|
+
if (typeof r != "string")
|
|
822
|
+
throw new TypeError(
|
|
823
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof r
|
|
824
|
+
);
|
|
825
|
+
const t = r.length, i = arguments.length > 2 && arguments[2] === !0;
|
|
826
|
+
if (!i && t === 0)
|
|
827
|
+
return 0;
|
|
828
|
+
let a = !1;
|
|
829
|
+
for (; ; )
|
|
830
|
+
switch (e) {
|
|
831
|
+
case "ascii":
|
|
832
|
+
case "latin1":
|
|
833
|
+
case "binary":
|
|
834
|
+
return t;
|
|
835
|
+
case "utf8":
|
|
836
|
+
case "utf-8":
|
|
837
|
+
return Ee(r).length;
|
|
838
|
+
case "ucs2":
|
|
839
|
+
case "ucs-2":
|
|
840
|
+
case "utf16le":
|
|
841
|
+
case "utf-16le":
|
|
842
|
+
return t * 2;
|
|
843
|
+
case "hex":
|
|
844
|
+
return t >>> 1;
|
|
845
|
+
case "base64":
|
|
846
|
+
return Qe(r).length;
|
|
847
|
+
default:
|
|
848
|
+
if (a)
|
|
849
|
+
return i ? -1 : Ee(r).length;
|
|
850
|
+
e = ("" + e).toLowerCase(), a = !0;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
n.byteLength = U;
|
|
854
|
+
function V(r, e, t) {
|
|
855
|
+
let i = !1;
|
|
856
|
+
if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, e >>>= 0, t <= e))
|
|
857
|
+
return "";
|
|
858
|
+
for (r || (r = "utf8"); ; )
|
|
859
|
+
switch (r) {
|
|
860
|
+
case "hex":
|
|
861
|
+
return St(this, e, t);
|
|
862
|
+
case "utf8":
|
|
863
|
+
case "utf-8":
|
|
864
|
+
return Pe(this, e, t);
|
|
865
|
+
case "ascii":
|
|
866
|
+
return $t(this, e, t);
|
|
867
|
+
case "latin1":
|
|
868
|
+
case "binary":
|
|
869
|
+
return kt(this, e, t);
|
|
870
|
+
case "base64":
|
|
871
|
+
return Tt(this, e, t);
|
|
872
|
+
case "ucs2":
|
|
873
|
+
case "ucs-2":
|
|
874
|
+
case "utf16le":
|
|
875
|
+
case "utf-16le":
|
|
876
|
+
return Lt(this, e, t);
|
|
877
|
+
default:
|
|
878
|
+
if (i)
|
|
879
|
+
throw new TypeError("Unknown encoding: " + r);
|
|
880
|
+
r = (r + "").toLowerCase(), i = !0;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
n.prototype._isBuffer = !0;
|
|
884
|
+
function P(r, e, t) {
|
|
885
|
+
const i = r[e];
|
|
886
|
+
r[e] = r[t], r[t] = i;
|
|
887
|
+
}
|
|
888
|
+
n.prototype.swap16 = function() {
|
|
889
|
+
const e = this.length;
|
|
890
|
+
if (e % 2 !== 0)
|
|
891
|
+
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
892
|
+
for (let t = 0; t < e; t += 2)
|
|
893
|
+
P(this, t, t + 1);
|
|
894
|
+
return this;
|
|
895
|
+
}, n.prototype.swap32 = function() {
|
|
896
|
+
const e = this.length;
|
|
897
|
+
if (e % 4 !== 0)
|
|
898
|
+
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
899
|
+
for (let t = 0; t < e; t += 4)
|
|
900
|
+
P(this, t, t + 3), P(this, t + 1, t + 2);
|
|
901
|
+
return this;
|
|
902
|
+
}, n.prototype.swap64 = function() {
|
|
903
|
+
const e = this.length;
|
|
904
|
+
if (e % 8 !== 0)
|
|
905
|
+
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
906
|
+
for (let t = 0; t < e; t += 8)
|
|
907
|
+
P(this, t, t + 7), P(this, t + 1, t + 6), P(this, t + 2, t + 5), P(this, t + 3, t + 4);
|
|
908
|
+
return this;
|
|
909
|
+
}, n.prototype.toString = function() {
|
|
910
|
+
const e = this.length;
|
|
911
|
+
return e === 0 ? "" : arguments.length === 0 ? Pe(this, 0, e) : V.apply(this, arguments);
|
|
912
|
+
}, n.prototype.toLocaleString = n.prototype.toString, n.prototype.equals = function(e) {
|
|
913
|
+
if (!n.isBuffer(e))
|
|
914
|
+
throw new TypeError("Argument must be a Buffer");
|
|
915
|
+
return this === e ? !0 : n.compare(this, e) === 0;
|
|
916
|
+
}, n.prototype.inspect = function() {
|
|
917
|
+
let e = "";
|
|
918
|
+
const t = s.INSPECT_MAX_BYTES;
|
|
919
|
+
return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
|
|
920
|
+
}, d && (n.prototype[d] = n.prototype.inspect), n.prototype.compare = function(e, t, i, a, u) {
|
|
921
|
+
if (G(e, Uint8Array) && (e = n.from(e, e.offset, e.byteLength)), !n.isBuffer(e))
|
|
922
|
+
throw new TypeError(
|
|
923
|
+
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e
|
|
924
|
+
);
|
|
925
|
+
if (t === void 0 && (t = 0), i === void 0 && (i = e ? e.length : 0), a === void 0 && (a = 0), u === void 0 && (u = this.length), t < 0 || i > e.length || a < 0 || u > this.length)
|
|
926
|
+
throw new RangeError("out of range index");
|
|
927
|
+
if (a >= u && t >= i)
|
|
928
|
+
return 0;
|
|
929
|
+
if (a >= u)
|
|
930
|
+
return -1;
|
|
931
|
+
if (t >= i)
|
|
932
|
+
return 1;
|
|
933
|
+
if (t >>>= 0, i >>>= 0, a >>>= 0, u >>>= 0, this === e)
|
|
934
|
+
return 0;
|
|
935
|
+
let p = u - a, b = i - t;
|
|
936
|
+
const k = Math.min(p, b), $ = this.slice(a, u), S = e.slice(t, i);
|
|
937
|
+
for (let T = 0; T < k; ++T)
|
|
938
|
+
if ($[T] !== S[T]) {
|
|
939
|
+
p = $[T], b = S[T];
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
return p < b ? -1 : b < p ? 1 : 0;
|
|
943
|
+
};
|
|
944
|
+
function Oe(r, e, t, i, a) {
|
|
945
|
+
if (r.length === 0)
|
|
946
|
+
return -1;
|
|
947
|
+
if (typeof t == "string" ? (i = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, Be(t) && (t = a ? 0 : r.length - 1), t < 0 && (t = r.length + t), t >= r.length) {
|
|
948
|
+
if (a)
|
|
949
|
+
return -1;
|
|
950
|
+
t = r.length - 1;
|
|
951
|
+
} else if (t < 0)
|
|
952
|
+
if (a)
|
|
953
|
+
t = 0;
|
|
954
|
+
else
|
|
955
|
+
return -1;
|
|
956
|
+
if (typeof e == "string" && (e = n.from(e, i)), n.isBuffer(e))
|
|
957
|
+
return e.length === 0 ? -1 : De(r, e, t, i, a);
|
|
958
|
+
if (typeof e == "number")
|
|
959
|
+
return e = e & 255, typeof Uint8Array.prototype.indexOf == "function" ? a ? Uint8Array.prototype.indexOf.call(r, e, t) : Uint8Array.prototype.lastIndexOf.call(r, e, t) : De(r, [e], t, i, a);
|
|
960
|
+
throw new TypeError("val must be string, number or Buffer");
|
|
961
|
+
}
|
|
962
|
+
function De(r, e, t, i, a) {
|
|
963
|
+
let u = 1, p = r.length, b = e.length;
|
|
964
|
+
if (i !== void 0 && (i = String(i).toLowerCase(), i === "ucs2" || i === "ucs-2" || i === "utf16le" || i === "utf-16le")) {
|
|
965
|
+
if (r.length < 2 || e.length < 2)
|
|
966
|
+
return -1;
|
|
967
|
+
u = 2, p /= 2, b /= 2, t /= 2;
|
|
968
|
+
}
|
|
969
|
+
function k(S, T) {
|
|
970
|
+
return u === 1 ? S[T] : S.readUInt16BE(T * u);
|
|
971
|
+
}
|
|
972
|
+
let $;
|
|
973
|
+
if (a) {
|
|
974
|
+
let S = -1;
|
|
975
|
+
for ($ = t; $ < p; $++)
|
|
976
|
+
if (k(r, $) === k(e, S === -1 ? 0 : $ - S)) {
|
|
977
|
+
if (S === -1 && (S = $), $ - S + 1 === b)
|
|
978
|
+
return S * u;
|
|
979
|
+
} else
|
|
980
|
+
S !== -1 && ($ -= $ - S), S = -1;
|
|
981
|
+
} else
|
|
982
|
+
for (t + b > p && (t = p - b), $ = t; $ >= 0; $--) {
|
|
983
|
+
let S = !0;
|
|
984
|
+
for (let T = 0; T < b; T++)
|
|
985
|
+
if (k(r, $ + T) !== k(e, T)) {
|
|
986
|
+
S = !1;
|
|
987
|
+
break;
|
|
988
|
+
}
|
|
989
|
+
if (S)
|
|
990
|
+
return $;
|
|
991
|
+
}
|
|
992
|
+
return -1;
|
|
993
|
+
}
|
|
994
|
+
n.prototype.includes = function(e, t, i) {
|
|
995
|
+
return this.indexOf(e, t, i) !== -1;
|
|
996
|
+
}, n.prototype.indexOf = function(e, t, i) {
|
|
997
|
+
return Oe(this, e, t, i, !0);
|
|
998
|
+
}, n.prototype.lastIndexOf = function(e, t, i) {
|
|
999
|
+
return Oe(this, e, t, i, !1);
|
|
1000
|
+
};
|
|
1001
|
+
function Et(r, e, t, i) {
|
|
1002
|
+
t = Number(t) || 0;
|
|
1003
|
+
const a = r.length - t;
|
|
1004
|
+
i ? (i = Number(i), i > a && (i = a)) : i = a;
|
|
1005
|
+
const u = e.length;
|
|
1006
|
+
i > u / 2 && (i = u / 2);
|
|
1007
|
+
let p;
|
|
1008
|
+
for (p = 0; p < i; ++p) {
|
|
1009
|
+
const b = parseInt(e.substr(p * 2, 2), 16);
|
|
1010
|
+
if (Be(b))
|
|
1011
|
+
return p;
|
|
1012
|
+
r[t + p] = b;
|
|
1013
|
+
}
|
|
1014
|
+
return p;
|
|
1015
|
+
}
|
|
1016
|
+
function Bt(r, e, t, i) {
|
|
1017
|
+
return ge(Ee(e, r.length - t), r, t, i);
|
|
1018
|
+
}
|
|
1019
|
+
function vt(r, e, t, i) {
|
|
1020
|
+
return ge(zt(e), r, t, i);
|
|
1021
|
+
}
|
|
1022
|
+
function _t(r, e, t, i) {
|
|
1023
|
+
return ge(Qe(e), r, t, i);
|
|
1024
|
+
}
|
|
1025
|
+
function Ct(r, e, t, i) {
|
|
1026
|
+
return ge(Ot(e, r.length - t), r, t, i);
|
|
1027
|
+
}
|
|
1028
|
+
n.prototype.write = function(e, t, i, a) {
|
|
1029
|
+
if (t === void 0)
|
|
1030
|
+
a = "utf8", i = this.length, t = 0;
|
|
1031
|
+
else if (i === void 0 && typeof t == "string")
|
|
1032
|
+
a = t, i = this.length, t = 0;
|
|
1033
|
+
else if (isFinite(t))
|
|
1034
|
+
t = t >>> 0, isFinite(i) ? (i = i >>> 0, a === void 0 && (a = "utf8")) : (a = i, i = void 0);
|
|
1035
|
+
else
|
|
1036
|
+
throw new Error(
|
|
1037
|
+
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
1038
|
+
);
|
|
1039
|
+
const u = this.length - t;
|
|
1040
|
+
if ((i === void 0 || i > u) && (i = u), e.length > 0 && (i < 0 || t < 0) || t > this.length)
|
|
1041
|
+
throw new RangeError("Attempt to write outside buffer bounds");
|
|
1042
|
+
a || (a = "utf8");
|
|
1043
|
+
let p = !1;
|
|
1044
|
+
for (; ; )
|
|
1045
|
+
switch (a) {
|
|
1046
|
+
case "hex":
|
|
1047
|
+
return Et(this, e, t, i);
|
|
1048
|
+
case "utf8":
|
|
1049
|
+
case "utf-8":
|
|
1050
|
+
return Bt(this, e, t, i);
|
|
1051
|
+
case "ascii":
|
|
1052
|
+
case "latin1":
|
|
1053
|
+
case "binary":
|
|
1054
|
+
return vt(this, e, t, i);
|
|
1055
|
+
case "base64":
|
|
1056
|
+
return _t(this, e, t, i);
|
|
1057
|
+
case "ucs2":
|
|
1058
|
+
case "ucs-2":
|
|
1059
|
+
case "utf16le":
|
|
1060
|
+
case "utf-16le":
|
|
1061
|
+
return Ct(this, e, t, i);
|
|
1062
|
+
default:
|
|
1063
|
+
if (p)
|
|
1064
|
+
throw new TypeError("Unknown encoding: " + a);
|
|
1065
|
+
a = ("" + a).toLowerCase(), p = !0;
|
|
1066
|
+
}
|
|
1067
|
+
}, n.prototype.toJSON = function() {
|
|
1068
|
+
return {
|
|
1069
|
+
type: "Buffer",
|
|
1070
|
+
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1071
|
+
};
|
|
1072
|
+
};
|
|
1073
|
+
function Tt(r, e, t) {
|
|
1074
|
+
return e === 0 && t === r.length ? o.fromByteArray(r) : o.fromByteArray(r.slice(e, t));
|
|
1075
|
+
}
|
|
1076
|
+
function Pe(r, e, t) {
|
|
1077
|
+
t = Math.min(r.length, t);
|
|
1078
|
+
const i = [];
|
|
1079
|
+
let a = e;
|
|
1080
|
+
for (; a < t; ) {
|
|
1081
|
+
const u = r[a];
|
|
1082
|
+
let p = null, b = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
|
|
1083
|
+
if (a + b <= t) {
|
|
1084
|
+
let k, $, S, T;
|
|
1085
|
+
switch (b) {
|
|
1086
|
+
case 1:
|
|
1087
|
+
u < 128 && (p = u);
|
|
1088
|
+
break;
|
|
1089
|
+
case 2:
|
|
1090
|
+
k = r[a + 1], (k & 192) === 128 && (T = (u & 31) << 6 | k & 63, T > 127 && (p = T));
|
|
1091
|
+
break;
|
|
1092
|
+
case 3:
|
|
1093
|
+
k = r[a + 1], $ = r[a + 2], (k & 192) === 128 && ($ & 192) === 128 && (T = (u & 15) << 12 | (k & 63) << 6 | $ & 63, T > 2047 && (T < 55296 || T > 57343) && (p = T));
|
|
1094
|
+
break;
|
|
1095
|
+
case 4:
|
|
1096
|
+
k = r[a + 1], $ = r[a + 2], S = r[a + 3], (k & 192) === 128 && ($ & 192) === 128 && (S & 192) === 128 && (T = (u & 15) << 18 | (k & 63) << 12 | ($ & 63) << 6 | S & 63, T > 65535 && T < 1114112 && (p = T));
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
p === null ? (p = 65533, b = 1) : p > 65535 && (p -= 65536, i.push(p >>> 10 & 1023 | 55296), p = 56320 | p & 1023), i.push(p), a += b;
|
|
1100
|
+
}
|
|
1101
|
+
return Ft(i);
|
|
1102
|
+
}
|
|
1103
|
+
const Me = 4096;
|
|
1104
|
+
function Ft(r) {
|
|
1105
|
+
const e = r.length;
|
|
1106
|
+
if (e <= Me)
|
|
1107
|
+
return String.fromCharCode.apply(String, r);
|
|
1108
|
+
let t = "", i = 0;
|
|
1109
|
+
for (; i < e; )
|
|
1110
|
+
t += String.fromCharCode.apply(
|
|
1111
|
+
String,
|
|
1112
|
+
r.slice(i, i += Me)
|
|
1113
|
+
);
|
|
1114
|
+
return t;
|
|
1115
|
+
}
|
|
1116
|
+
function $t(r, e, t) {
|
|
1117
|
+
let i = "";
|
|
1118
|
+
t = Math.min(r.length, t);
|
|
1119
|
+
for (let a = e; a < t; ++a)
|
|
1120
|
+
i += String.fromCharCode(r[a] & 127);
|
|
1121
|
+
return i;
|
|
1122
|
+
}
|
|
1123
|
+
function kt(r, e, t) {
|
|
1124
|
+
let i = "";
|
|
1125
|
+
t = Math.min(r.length, t);
|
|
1126
|
+
for (let a = e; a < t; ++a)
|
|
1127
|
+
i += String.fromCharCode(r[a]);
|
|
1128
|
+
return i;
|
|
1129
|
+
}
|
|
1130
|
+
function St(r, e, t) {
|
|
1131
|
+
const i = r.length;
|
|
1132
|
+
(!e || e < 0) && (e = 0), (!t || t < 0 || t > i) && (t = i);
|
|
1133
|
+
let a = "";
|
|
1134
|
+
for (let u = e; u < t; ++u)
|
|
1135
|
+
a += Dt[r[u]];
|
|
1136
|
+
return a;
|
|
1137
|
+
}
|
|
1138
|
+
function Lt(r, e, t) {
|
|
1139
|
+
const i = r.slice(e, t);
|
|
1140
|
+
let a = "";
|
|
1141
|
+
for (let u = 0; u < i.length - 1; u += 2)
|
|
1142
|
+
a += String.fromCharCode(i[u] + i[u + 1] * 256);
|
|
1143
|
+
return a;
|
|
1144
|
+
}
|
|
1145
|
+
n.prototype.slice = function(e, t) {
|
|
1146
|
+
const i = this.length;
|
|
1147
|
+
e = ~~e, t = t === void 0 ? i : ~~t, e < 0 ? (e += i, e < 0 && (e = 0)) : e > i && (e = i), t < 0 ? (t += i, t < 0 && (t = 0)) : t > i && (t = i), t < e && (t = e);
|
|
1148
|
+
const a = this.subarray(e, t);
|
|
1149
|
+
return Object.setPrototypeOf(a, n.prototype), a;
|
|
1150
|
+
};
|
|
1151
|
+
function R(r, e, t) {
|
|
1152
|
+
if (r % 1 !== 0 || r < 0)
|
|
1153
|
+
throw new RangeError("offset is not uint");
|
|
1154
|
+
if (r + e > t)
|
|
1155
|
+
throw new RangeError("Trying to access beyond buffer length");
|
|
1156
|
+
}
|
|
1157
|
+
n.prototype.readUintLE = n.prototype.readUIntLE = function(e, t, i) {
|
|
1158
|
+
e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
|
|
1159
|
+
let a = this[e], u = 1, p = 0;
|
|
1160
|
+
for (; ++p < t && (u *= 256); )
|
|
1161
|
+
a += this[e + p] * u;
|
|
1162
|
+
return a;
|
|
1163
|
+
}, n.prototype.readUintBE = n.prototype.readUIntBE = function(e, t, i) {
|
|
1164
|
+
e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
|
|
1165
|
+
let a = this[e + --t], u = 1;
|
|
1166
|
+
for (; t > 0 && (u *= 256); )
|
|
1167
|
+
a += this[e + --t] * u;
|
|
1168
|
+
return a;
|
|
1169
|
+
}, n.prototype.readUint8 = n.prototype.readUInt8 = function(e, t) {
|
|
1170
|
+
return e = e >>> 0, t || R(e, 1, this.length), this[e];
|
|
1171
|
+
}, n.prototype.readUint16LE = n.prototype.readUInt16LE = function(e, t) {
|
|
1172
|
+
return e = e >>> 0, t || R(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
1173
|
+
}, n.prototype.readUint16BE = n.prototype.readUInt16BE = function(e, t) {
|
|
1174
|
+
return e = e >>> 0, t || R(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
1175
|
+
}, n.prototype.readUint32LE = n.prototype.readUInt32LE = function(e, t) {
|
|
1176
|
+
return e = e >>> 0, t || R(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
1177
|
+
}, n.prototype.readUint32BE = n.prototype.readUInt32BE = function(e, t) {
|
|
1178
|
+
return e = e >>> 0, t || R(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
1179
|
+
}, n.prototype.readBigUInt64LE = J(function(e) {
|
|
1180
|
+
e = e >>> 0, ie(e, "offset");
|
|
1181
|
+
const t = this[e], i = this[e + 7];
|
|
1182
|
+
(t === void 0 || i === void 0) && de(e, this.length - 8);
|
|
1183
|
+
const a = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, u = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + i * 2 ** 24;
|
|
1184
|
+
return BigInt(a) + (BigInt(u) << BigInt(32));
|
|
1185
|
+
}), n.prototype.readBigUInt64BE = J(function(e) {
|
|
1186
|
+
e = e >>> 0, ie(e, "offset");
|
|
1187
|
+
const t = this[e], i = this[e + 7];
|
|
1188
|
+
(t === void 0 || i === void 0) && de(e, this.length - 8);
|
|
1189
|
+
const a = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], u = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + i;
|
|
1190
|
+
return (BigInt(a) << BigInt(32)) + BigInt(u);
|
|
1191
|
+
}), n.prototype.readIntLE = function(e, t, i) {
|
|
1192
|
+
e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
|
|
1193
|
+
let a = this[e], u = 1, p = 0;
|
|
1194
|
+
for (; ++p < t && (u *= 256); )
|
|
1195
|
+
a += this[e + p] * u;
|
|
1196
|
+
return u *= 128, a >= u && (a -= Math.pow(2, 8 * t)), a;
|
|
1197
|
+
}, n.prototype.readIntBE = function(e, t, i) {
|
|
1198
|
+
e = e >>> 0, t = t >>> 0, i || R(e, t, this.length);
|
|
1199
|
+
let a = t, u = 1, p = this[e + --a];
|
|
1200
|
+
for (; a > 0 && (u *= 256); )
|
|
1201
|
+
p += this[e + --a] * u;
|
|
1202
|
+
return u *= 128, p >= u && (p -= Math.pow(2, 8 * t)), p;
|
|
1203
|
+
}, n.prototype.readInt8 = function(e, t) {
|
|
1204
|
+
return e = e >>> 0, t || R(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
1205
|
+
}, n.prototype.readInt16LE = function(e, t) {
|
|
1206
|
+
e = e >>> 0, t || R(e, 2, this.length);
|
|
1207
|
+
const i = this[e] | this[e + 1] << 8;
|
|
1208
|
+
return i & 32768 ? i | 4294901760 : i;
|
|
1209
|
+
}, n.prototype.readInt16BE = function(e, t) {
|
|
1210
|
+
e = e >>> 0, t || R(e, 2, this.length);
|
|
1211
|
+
const i = this[e + 1] | this[e] << 8;
|
|
1212
|
+
return i & 32768 ? i | 4294901760 : i;
|
|
1213
|
+
}, n.prototype.readInt32LE = function(e, t) {
|
|
1214
|
+
return e = e >>> 0, t || R(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
1215
|
+
}, n.prototype.readInt32BE = function(e, t) {
|
|
1216
|
+
return e = e >>> 0, t || R(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
1217
|
+
}, n.prototype.readBigInt64LE = J(function(e) {
|
|
1218
|
+
e = e >>> 0, ie(e, "offset");
|
|
1219
|
+
const t = this[e], i = this[e + 7];
|
|
1220
|
+
(t === void 0 || i === void 0) && de(e, this.length - 8);
|
|
1221
|
+
const a = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (i << 24);
|
|
1222
|
+
return (BigInt(a) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
1223
|
+
}), n.prototype.readBigInt64BE = J(function(e) {
|
|
1224
|
+
e = e >>> 0, ie(e, "offset");
|
|
1225
|
+
const t = this[e], i = this[e + 7];
|
|
1226
|
+
(t === void 0 || i === void 0) && de(e, this.length - 8);
|
|
1227
|
+
const a = (t << 24) + // Overflow
|
|
1228
|
+
this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
1229
|
+
return (BigInt(a) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + i);
|
|
1230
|
+
}), n.prototype.readFloatLE = function(e, t) {
|
|
1231
|
+
return e = e >>> 0, t || R(e, 4, this.length), l.read(this, e, !0, 23, 4);
|
|
1232
|
+
}, n.prototype.readFloatBE = function(e, t) {
|
|
1233
|
+
return e = e >>> 0, t || R(e, 4, this.length), l.read(this, e, !1, 23, 4);
|
|
1234
|
+
}, n.prototype.readDoubleLE = function(e, t) {
|
|
1235
|
+
return e = e >>> 0, t || R(e, 8, this.length), l.read(this, e, !0, 52, 8);
|
|
1236
|
+
}, n.prototype.readDoubleBE = function(e, t) {
|
|
1237
|
+
return e = e >>> 0, t || R(e, 8, this.length), l.read(this, e, !1, 52, 8);
|
|
1238
|
+
};
|
|
1239
|
+
function O(r, e, t, i, a, u) {
|
|
1240
|
+
if (!n.isBuffer(r))
|
|
1241
|
+
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1242
|
+
if (e > a || e < u)
|
|
1243
|
+
throw new RangeError('"value" argument is out of bounds');
|
|
1244
|
+
if (t + i > r.length)
|
|
1245
|
+
throw new RangeError("Index out of range");
|
|
1246
|
+
}
|
|
1247
|
+
n.prototype.writeUintLE = n.prototype.writeUIntLE = function(e, t, i, a) {
|
|
1248
|
+
if (e = +e, t = t >>> 0, i = i >>> 0, !a) {
|
|
1249
|
+
const b = Math.pow(2, 8 * i) - 1;
|
|
1250
|
+
O(this, e, t, i, b, 0);
|
|
1251
|
+
}
|
|
1252
|
+
let u = 1, p = 0;
|
|
1253
|
+
for (this[t] = e & 255; ++p < i && (u *= 256); )
|
|
1254
|
+
this[t + p] = e / u & 255;
|
|
1255
|
+
return t + i;
|
|
1256
|
+
}, n.prototype.writeUintBE = n.prototype.writeUIntBE = function(e, t, i, a) {
|
|
1257
|
+
if (e = +e, t = t >>> 0, i = i >>> 0, !a) {
|
|
1258
|
+
const b = Math.pow(2, 8 * i) - 1;
|
|
1259
|
+
O(this, e, t, i, b, 0);
|
|
1260
|
+
}
|
|
1261
|
+
let u = i - 1, p = 1;
|
|
1262
|
+
for (this[t + u] = e & 255; --u >= 0 && (p *= 256); )
|
|
1263
|
+
this[t + u] = e / p & 255;
|
|
1264
|
+
return t + i;
|
|
1265
|
+
}, n.prototype.writeUint8 = n.prototype.writeUInt8 = function(e, t, i) {
|
|
1266
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
|
|
1267
|
+
}, n.prototype.writeUint16LE = n.prototype.writeUInt16LE = function(e, t, i) {
|
|
1268
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
1269
|
+
}, n.prototype.writeUint16BE = n.prototype.writeUInt16BE = function(e, t, i) {
|
|
1270
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
1271
|
+
}, n.prototype.writeUint32LE = n.prototype.writeUInt32LE = function(e, t, i) {
|
|
1272
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
|
|
1273
|
+
}, n.prototype.writeUint32BE = n.prototype.writeUInt32BE = function(e, t, i) {
|
|
1274
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
1275
|
+
};
|
|
1276
|
+
function qe(r, e, t, i, a) {
|
|
1277
|
+
Ve(e, i, a, r, t, 7);
|
|
1278
|
+
let u = Number(e & BigInt(4294967295));
|
|
1279
|
+
r[t++] = u, u = u >> 8, r[t++] = u, u = u >> 8, r[t++] = u, u = u >> 8, r[t++] = u;
|
|
1280
|
+
let p = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
1281
|
+
return r[t++] = p, p = p >> 8, r[t++] = p, p = p >> 8, r[t++] = p, p = p >> 8, r[t++] = p, t;
|
|
1282
|
+
}
|
|
1283
|
+
function je(r, e, t, i, a) {
|
|
1284
|
+
Ve(e, i, a, r, t, 7);
|
|
1285
|
+
let u = Number(e & BigInt(4294967295));
|
|
1286
|
+
r[t + 7] = u, u = u >> 8, r[t + 6] = u, u = u >> 8, r[t + 5] = u, u = u >> 8, r[t + 4] = u;
|
|
1287
|
+
let p = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
1288
|
+
return r[t + 3] = p, p = p >> 8, r[t + 2] = p, p = p >> 8, r[t + 1] = p, p = p >> 8, r[t] = p, t + 8;
|
|
1289
|
+
}
|
|
1290
|
+
n.prototype.writeBigUInt64LE = J(function(e, t = 0) {
|
|
1291
|
+
return qe(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1292
|
+
}), n.prototype.writeBigUInt64BE = J(function(e, t = 0) {
|
|
1293
|
+
return je(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1294
|
+
}), n.prototype.writeIntLE = function(e, t, i, a) {
|
|
1295
|
+
if (e = +e, t = t >>> 0, !a) {
|
|
1296
|
+
const k = Math.pow(2, 8 * i - 1);
|
|
1297
|
+
O(this, e, t, i, k - 1, -k);
|
|
1298
|
+
}
|
|
1299
|
+
let u = 0, p = 1, b = 0;
|
|
1300
|
+
for (this[t] = e & 255; ++u < i && (p *= 256); )
|
|
1301
|
+
e < 0 && b === 0 && this[t + u - 1] !== 0 && (b = 1), this[t + u] = (e / p >> 0) - b & 255;
|
|
1302
|
+
return t + i;
|
|
1303
|
+
}, n.prototype.writeIntBE = function(e, t, i, a) {
|
|
1304
|
+
if (e = +e, t = t >>> 0, !a) {
|
|
1305
|
+
const k = Math.pow(2, 8 * i - 1);
|
|
1306
|
+
O(this, e, t, i, k - 1, -k);
|
|
1307
|
+
}
|
|
1308
|
+
let u = i - 1, p = 1, b = 0;
|
|
1309
|
+
for (this[t + u] = e & 255; --u >= 0 && (p *= 256); )
|
|
1310
|
+
e < 0 && b === 0 && this[t + u + 1] !== 0 && (b = 1), this[t + u] = (e / p >> 0) - b & 255;
|
|
1311
|
+
return t + i;
|
|
1312
|
+
}, n.prototype.writeInt8 = function(e, t, i) {
|
|
1313
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
|
|
1314
|
+
}, n.prototype.writeInt16LE = function(e, t, i) {
|
|
1315
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
1316
|
+
}, n.prototype.writeInt16BE = function(e, t, i) {
|
|
1317
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
1318
|
+
}, n.prototype.writeInt32LE = function(e, t, i) {
|
|
1319
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
1320
|
+
}, n.prototype.writeInt32BE = function(e, t, i) {
|
|
1321
|
+
return e = +e, t = t >>> 0, i || O(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
1322
|
+
}, n.prototype.writeBigInt64LE = J(function(e, t = 0) {
|
|
1323
|
+
return qe(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1324
|
+
}), n.prototype.writeBigInt64BE = J(function(e, t = 0) {
|
|
1325
|
+
return je(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1326
|
+
});
|
|
1327
|
+
function Ge(r, e, t, i, a, u) {
|
|
1328
|
+
if (t + i > r.length)
|
|
1329
|
+
throw new RangeError("Index out of range");
|
|
1330
|
+
if (t < 0)
|
|
1331
|
+
throw new RangeError("Index out of range");
|
|
1332
|
+
}
|
|
1333
|
+
function We(r, e, t, i, a) {
|
|
1334
|
+
return e = +e, t = t >>> 0, a || Ge(r, e, t, 4), l.write(r, e, t, i, 23, 4), t + 4;
|
|
1335
|
+
}
|
|
1336
|
+
n.prototype.writeFloatLE = function(e, t, i) {
|
|
1337
|
+
return We(this, e, t, !0, i);
|
|
1338
|
+
}, n.prototype.writeFloatBE = function(e, t, i) {
|
|
1339
|
+
return We(this, e, t, !1, i);
|
|
1340
|
+
};
|
|
1341
|
+
function He(r, e, t, i, a) {
|
|
1342
|
+
return e = +e, t = t >>> 0, a || Ge(r, e, t, 8), l.write(r, e, t, i, 52, 8), t + 8;
|
|
1343
|
+
}
|
|
1344
|
+
n.prototype.writeDoubleLE = function(e, t, i) {
|
|
1345
|
+
return He(this, e, t, !0, i);
|
|
1346
|
+
}, n.prototype.writeDoubleBE = function(e, t, i) {
|
|
1347
|
+
return He(this, e, t, !1, i);
|
|
1348
|
+
}, n.prototype.copy = function(e, t, i, a) {
|
|
1349
|
+
if (!n.isBuffer(e))
|
|
1350
|
+
throw new TypeError("argument should be a Buffer");
|
|
1351
|
+
if (i || (i = 0), !a && a !== 0 && (a = this.length), t >= e.length && (t = e.length), t || (t = 0), a > 0 && a < i && (a = i), a === i || e.length === 0 || this.length === 0)
|
|
1352
|
+
return 0;
|
|
1353
|
+
if (t < 0)
|
|
1354
|
+
throw new RangeError("targetStart out of bounds");
|
|
1355
|
+
if (i < 0 || i >= this.length)
|
|
1356
|
+
throw new RangeError("Index out of range");
|
|
1357
|
+
if (a < 0)
|
|
1358
|
+
throw new RangeError("sourceEnd out of bounds");
|
|
1359
|
+
a > this.length && (a = this.length), e.length - t < a - i && (a = e.length - t + i);
|
|
1360
|
+
const u = a - i;
|
|
1361
|
+
return this === e && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(t, i, a) : Uint8Array.prototype.set.call(
|
|
1362
|
+
e,
|
|
1363
|
+
this.subarray(i, a),
|
|
1364
|
+
t
|
|
1365
|
+
), u;
|
|
1366
|
+
}, n.prototype.fill = function(e, t, i, a) {
|
|
1367
|
+
if (typeof e == "string") {
|
|
1368
|
+
if (typeof t == "string" ? (a = t, t = 0, i = this.length) : typeof i == "string" && (a = i, i = this.length), a !== void 0 && typeof a != "string")
|
|
1369
|
+
throw new TypeError("encoding must be a string");
|
|
1370
|
+
if (typeof a == "string" && !n.isEncoding(a))
|
|
1371
|
+
throw new TypeError("Unknown encoding: " + a);
|
|
1372
|
+
if (e.length === 1) {
|
|
1373
|
+
const p = e.charCodeAt(0);
|
|
1374
|
+
(a === "utf8" && p < 128 || a === "latin1") && (e = p);
|
|
1375
|
+
}
|
|
1376
|
+
} else
|
|
1377
|
+
typeof e == "number" ? e = e & 255 : typeof e == "boolean" && (e = Number(e));
|
|
1378
|
+
if (t < 0 || this.length < t || this.length < i)
|
|
1379
|
+
throw new RangeError("Out of range index");
|
|
1380
|
+
if (i <= t)
|
|
1381
|
+
return this;
|
|
1382
|
+
t = t >>> 0, i = i === void 0 ? this.length : i >>> 0, e || (e = 0);
|
|
1383
|
+
let u;
|
|
1384
|
+
if (typeof e == "number")
|
|
1385
|
+
for (u = t; u < i; ++u)
|
|
1386
|
+
this[u] = e;
|
|
1387
|
+
else {
|
|
1388
|
+
const p = n.isBuffer(e) ? e : n.from(e, a), b = p.length;
|
|
1389
|
+
if (b === 0)
|
|
1390
|
+
throw new TypeError('The value "' + e + '" is invalid for argument "value"');
|
|
1391
|
+
for (u = 0; u < i - t; ++u)
|
|
1392
|
+
this[u + t] = p[u % b];
|
|
1393
|
+
}
|
|
1394
|
+
return this;
|
|
1395
|
+
};
|
|
1396
|
+
const re = {};
|
|
1397
|
+
function be(r, e, t) {
|
|
1398
|
+
re[r] = class extends t {
|
|
1399
|
+
constructor() {
|
|
1400
|
+
super(), Object.defineProperty(this, "message", {
|
|
1401
|
+
value: e.apply(this, arguments),
|
|
1402
|
+
writable: !0,
|
|
1403
|
+
configurable: !0
|
|
1404
|
+
}), this.name = `${this.name} [${r}]`, this.stack, delete this.name;
|
|
1405
|
+
}
|
|
1406
|
+
get code() {
|
|
1407
|
+
return r;
|
|
1408
|
+
}
|
|
1409
|
+
set code(a) {
|
|
1410
|
+
Object.defineProperty(this, "code", {
|
|
1411
|
+
configurable: !0,
|
|
1412
|
+
enumerable: !0,
|
|
1413
|
+
value: a,
|
|
1414
|
+
writable: !0
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
toString() {
|
|
1418
|
+
return `${this.name} [${r}]: ${this.message}`;
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
be(
|
|
1423
|
+
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
1424
|
+
function(r) {
|
|
1425
|
+
return r ? `${r} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
1426
|
+
},
|
|
1427
|
+
RangeError
|
|
1428
|
+
), be(
|
|
1429
|
+
"ERR_INVALID_ARG_TYPE",
|
|
1430
|
+
function(r, e) {
|
|
1431
|
+
return `The "${r}" argument must be of type number. Received type ${typeof e}`;
|
|
1432
|
+
},
|
|
1433
|
+
TypeError
|
|
1434
|
+
), be(
|
|
1435
|
+
"ERR_OUT_OF_RANGE",
|
|
1436
|
+
function(r, e, t) {
|
|
1437
|
+
let i = `The value of "${r}" is out of range.`, a = t;
|
|
1438
|
+
return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? a = Ye(String(t)) : typeof t == "bigint" && (a = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (a = Ye(a)), a += "n"), i += ` It must be ${e}. Received ${a}`, i;
|
|
1439
|
+
},
|
|
1440
|
+
RangeError
|
|
1441
|
+
);
|
|
1442
|
+
function Ye(r) {
|
|
1443
|
+
let e = "", t = r.length;
|
|
1444
|
+
const i = r[0] === "-" ? 1 : 0;
|
|
1445
|
+
for (; t >= i + 4; t -= 3)
|
|
1446
|
+
e = `_${r.slice(t - 3, t)}${e}`;
|
|
1447
|
+
return `${r.slice(0, t)}${e}`;
|
|
1448
|
+
}
|
|
1449
|
+
function Nt(r, e, t) {
|
|
1450
|
+
ie(e, "offset"), (r[e] === void 0 || r[e + t] === void 0) && de(e, r.length - (t + 1));
|
|
1451
|
+
}
|
|
1452
|
+
function Ve(r, e, t, i, a, u) {
|
|
1453
|
+
if (r > t || r < e) {
|
|
1454
|
+
const p = typeof e == "bigint" ? "n" : "";
|
|
1455
|
+
let b;
|
|
1456
|
+
throw u > 3 ? e === 0 || e === BigInt(0) ? b = `>= 0${p} and < 2${p} ** ${(u + 1) * 8}${p}` : b = `>= -(2${p} ** ${(u + 1) * 8 - 1}${p}) and < 2 ** ${(u + 1) * 8 - 1}${p}` : b = `>= ${e}${p} and <= ${t}${p}`, new re.ERR_OUT_OF_RANGE("value", b, r);
|
|
1457
|
+
}
|
|
1458
|
+
Nt(i, a, u);
|
|
1459
|
+
}
|
|
1460
|
+
function ie(r, e) {
|
|
1461
|
+
if (typeof r != "number")
|
|
1462
|
+
throw new re.ERR_INVALID_ARG_TYPE(e, "number", r);
|
|
1463
|
+
}
|
|
1464
|
+
function de(r, e, t) {
|
|
1465
|
+
throw Math.floor(r) !== r ? (ie(r, t), new re.ERR_OUT_OF_RANGE(t || "offset", "an integer", r)) : e < 0 ? new re.ERR_BUFFER_OUT_OF_BOUNDS() : new re.ERR_OUT_OF_RANGE(
|
|
1466
|
+
t || "offset",
|
|
1467
|
+
`>= ${t ? 1 : 0} and <= ${e}`,
|
|
1468
|
+
r
|
|
1469
|
+
);
|
|
1470
|
+
}
|
|
1471
|
+
const Rt = /[^+/0-9A-Za-z-_]/g;
|
|
1472
|
+
function Ut(r) {
|
|
1473
|
+
if (r = r.split("=")[0], r = r.trim().replace(Rt, ""), r.length < 2)
|
|
1474
|
+
return "";
|
|
1475
|
+
for (; r.length % 4 !== 0; )
|
|
1476
|
+
r = r + "=";
|
|
1477
|
+
return r;
|
|
1478
|
+
}
|
|
1479
|
+
function Ee(r, e) {
|
|
1480
|
+
e = e || 1 / 0;
|
|
1481
|
+
let t;
|
|
1482
|
+
const i = r.length;
|
|
1483
|
+
let a = null;
|
|
1484
|
+
const u = [];
|
|
1485
|
+
for (let p = 0; p < i; ++p) {
|
|
1486
|
+
if (t = r.charCodeAt(p), t > 55295 && t < 57344) {
|
|
1487
|
+
if (!a) {
|
|
1488
|
+
if (t > 56319) {
|
|
1489
|
+
(e -= 3) > -1 && u.push(239, 191, 189);
|
|
1490
|
+
continue;
|
|
1491
|
+
} else if (p + 1 === i) {
|
|
1492
|
+
(e -= 3) > -1 && u.push(239, 191, 189);
|
|
1493
|
+
continue;
|
|
1494
|
+
}
|
|
1495
|
+
a = t;
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
if (t < 56320) {
|
|
1499
|
+
(e -= 3) > -1 && u.push(239, 191, 189), a = t;
|
|
1500
|
+
continue;
|
|
1501
|
+
}
|
|
1502
|
+
t = (a - 55296 << 10 | t - 56320) + 65536;
|
|
1503
|
+
} else
|
|
1504
|
+
a && (e -= 3) > -1 && u.push(239, 191, 189);
|
|
1505
|
+
if (a = null, t < 128) {
|
|
1506
|
+
if ((e -= 1) < 0)
|
|
1507
|
+
break;
|
|
1508
|
+
u.push(t);
|
|
1509
|
+
} else if (t < 2048) {
|
|
1510
|
+
if ((e -= 2) < 0)
|
|
1511
|
+
break;
|
|
1512
|
+
u.push(
|
|
1513
|
+
t >> 6 | 192,
|
|
1514
|
+
t & 63 | 128
|
|
1515
|
+
);
|
|
1516
|
+
} else if (t < 65536) {
|
|
1517
|
+
if ((e -= 3) < 0)
|
|
1518
|
+
break;
|
|
1519
|
+
u.push(
|
|
1520
|
+
t >> 12 | 224,
|
|
1521
|
+
t >> 6 & 63 | 128,
|
|
1522
|
+
t & 63 | 128
|
|
1523
|
+
);
|
|
1524
|
+
} else if (t < 1114112) {
|
|
1525
|
+
if ((e -= 4) < 0)
|
|
1526
|
+
break;
|
|
1527
|
+
u.push(
|
|
1528
|
+
t >> 18 | 240,
|
|
1529
|
+
t >> 12 & 63 | 128,
|
|
1530
|
+
t >> 6 & 63 | 128,
|
|
1531
|
+
t & 63 | 128
|
|
1532
|
+
);
|
|
1533
|
+
} else
|
|
1534
|
+
throw new Error("Invalid code point");
|
|
1535
|
+
}
|
|
1536
|
+
return u;
|
|
1537
|
+
}
|
|
1538
|
+
function zt(r) {
|
|
1539
|
+
const e = [];
|
|
1540
|
+
for (let t = 0; t < r.length; ++t)
|
|
1541
|
+
e.push(r.charCodeAt(t) & 255);
|
|
1542
|
+
return e;
|
|
1543
|
+
}
|
|
1544
|
+
function Ot(r, e) {
|
|
1545
|
+
let t, i, a;
|
|
1546
|
+
const u = [];
|
|
1547
|
+
for (let p = 0; p < r.length && !((e -= 2) < 0); ++p)
|
|
1548
|
+
t = r.charCodeAt(p), i = t >> 8, a = t % 256, u.push(a), u.push(i);
|
|
1549
|
+
return u;
|
|
1550
|
+
}
|
|
1551
|
+
function Qe(r) {
|
|
1552
|
+
return o.toByteArray(Ut(r));
|
|
1553
|
+
}
|
|
1554
|
+
function ge(r, e, t, i) {
|
|
1555
|
+
let a;
|
|
1556
|
+
for (a = 0; a < i && !(a + t >= e.length || a >= r.length); ++a)
|
|
1557
|
+
e[a + t] = r[a];
|
|
1558
|
+
return a;
|
|
1559
|
+
}
|
|
1560
|
+
function G(r, e) {
|
|
1561
|
+
return r instanceof e || r != null && r.constructor != null && r.constructor.name != null && r.constructor.name === e.name;
|
|
1562
|
+
}
|
|
1563
|
+
function Be(r) {
|
|
1564
|
+
return r !== r;
|
|
1565
|
+
}
|
|
1566
|
+
const Dt = function() {
|
|
1567
|
+
const r = "0123456789abcdef", e = new Array(256);
|
|
1568
|
+
for (let t = 0; t < 16; ++t) {
|
|
1569
|
+
const i = t * 16;
|
|
1570
|
+
for (let a = 0; a < 16; ++a)
|
|
1571
|
+
e[i + a] = r[t] + r[a];
|
|
1572
|
+
}
|
|
1573
|
+
return e;
|
|
1574
|
+
}();
|
|
1575
|
+
function J(r) {
|
|
1576
|
+
return typeof BigInt > "u" ? Pt : r;
|
|
1577
|
+
}
|
|
1578
|
+
function Pt() {
|
|
1579
|
+
throw new Error("BigInt not supported");
|
|
1580
|
+
}
|
|
1581
|
+
})(mt);
|
|
1582
|
+
var yt = { exports: {} }, L = yt.exports = {}, W, H;
|
|
1583
|
+
function $e() {
|
|
1584
|
+
throw new Error("setTimeout has not been defined");
|
|
1585
|
+
}
|
|
1586
|
+
function ke() {
|
|
1587
|
+
throw new Error("clearTimeout has not been defined");
|
|
1588
|
+
}
|
|
1589
|
+
(function() {
|
|
1590
|
+
try {
|
|
1591
|
+
typeof setTimeout == "function" ? W = setTimeout : W = $e;
|
|
1592
|
+
} catch {
|
|
1593
|
+
W = $e;
|
|
1594
|
+
}
|
|
1595
|
+
try {
|
|
1596
|
+
typeof clearTimeout == "function" ? H = clearTimeout : H = ke;
|
|
1597
|
+
} catch {
|
|
1598
|
+
H = ke;
|
|
1599
|
+
}
|
|
1600
|
+
})();
|
|
1601
|
+
function wt(s) {
|
|
1602
|
+
if (W === setTimeout)
|
|
1603
|
+
return setTimeout(s, 0);
|
|
1604
|
+
if ((W === $e || !W) && setTimeout)
|
|
1605
|
+
return W = setTimeout, setTimeout(s, 0);
|
|
1606
|
+
try {
|
|
1607
|
+
return W(s, 0);
|
|
1608
|
+
} catch {
|
|
1609
|
+
try {
|
|
1610
|
+
return W.call(null, s, 0);
|
|
1611
|
+
} catch {
|
|
1612
|
+
return W.call(this, s, 0);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
function zi(s) {
|
|
1617
|
+
if (H === clearTimeout)
|
|
1618
|
+
return clearTimeout(s);
|
|
1619
|
+
if ((H === ke || !H) && clearTimeout)
|
|
1620
|
+
return H = clearTimeout, clearTimeout(s);
|
|
1621
|
+
try {
|
|
1622
|
+
return H(s);
|
|
1623
|
+
} catch {
|
|
1624
|
+
try {
|
|
1625
|
+
return H.call(null, s);
|
|
1626
|
+
} catch {
|
|
1627
|
+
return H.call(this, s);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
var Q = [], ue = !1, te, Ie = -1;
|
|
1632
|
+
function Oi() {
|
|
1633
|
+
!ue || !te || (ue = !1, te.length ? Q = te.concat(Q) : Ie = -1, Q.length && It());
|
|
1634
|
+
}
|
|
1635
|
+
function It() {
|
|
1636
|
+
if (!ue) {
|
|
1637
|
+
var s = wt(Oi);
|
|
1638
|
+
ue = !0;
|
|
1639
|
+
for (var o = Q.length; o; ) {
|
|
1640
|
+
for (te = Q, Q = []; ++Ie < o; )
|
|
1641
|
+
te && te[Ie].run();
|
|
1642
|
+
Ie = -1, o = Q.length;
|
|
1643
|
+
}
|
|
1644
|
+
te = null, ue = !1, zi(s);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
L.nextTick = function(s) {
|
|
1648
|
+
var o = new Array(arguments.length - 1);
|
|
1649
|
+
if (arguments.length > 1)
|
|
1650
|
+
for (var l = 1; l < arguments.length; l++)
|
|
1651
|
+
o[l - 1] = arguments[l];
|
|
1652
|
+
Q.push(new xt(s, o)), Q.length === 1 && !ue && wt(It);
|
|
1653
|
+
};
|
|
1654
|
+
function xt(s, o) {
|
|
1655
|
+
this.fun = s, this.array = o;
|
|
1656
|
+
}
|
|
1657
|
+
xt.prototype.run = function() {
|
|
1658
|
+
this.fun.apply(null, this.array);
|
|
1659
|
+
};
|
|
1660
|
+
L.title = "browser";
|
|
1661
|
+
L.browser = !0;
|
|
1662
|
+
L.env = {};
|
|
1663
|
+
L.argv = [];
|
|
1664
|
+
L.version = "";
|
|
1665
|
+
L.versions = {};
|
|
1666
|
+
function X() {
|
|
1667
|
+
}
|
|
1668
|
+
L.on = X;
|
|
1669
|
+
L.addListener = X;
|
|
1670
|
+
L.once = X;
|
|
1671
|
+
L.off = X;
|
|
1672
|
+
L.removeListener = X;
|
|
1673
|
+
L.removeAllListeners = X;
|
|
1674
|
+
L.emit = X;
|
|
1675
|
+
L.prependListener = X;
|
|
1676
|
+
L.prependOnceListener = X;
|
|
1677
|
+
L.listeners = function(s) {
|
|
1678
|
+
return [];
|
|
1679
|
+
};
|
|
1680
|
+
L.binding = function(s) {
|
|
1681
|
+
throw new Error("process.binding is not supported");
|
|
1682
|
+
};
|
|
1683
|
+
L.cwd = function() {
|
|
1684
|
+
return "/";
|
|
1685
|
+
};
|
|
1686
|
+
L.chdir = function(s) {
|
|
1687
|
+
throw new Error("process.chdir is not supported");
|
|
1688
|
+
};
|
|
1689
|
+
L.umask = function() {
|
|
1690
|
+
return 0;
|
|
1691
|
+
};
|
|
1692
|
+
var Di = yt.exports;
|
|
1693
|
+
(function(s) {
|
|
1694
|
+
Object.defineProperty(s, Symbol.toStringTag, { value: "Module" });
|
|
1695
|
+
const o = mt, l = Di, d = (f) => f && f.__esModule ? f : { default: f }, m = d(l), g = globalThis || void 0 || self;
|
|
1696
|
+
Object.defineProperty(s, "Buffer", { enumerable: !0, get: () => o.Buffer }), Object.defineProperty(s, "process", { enumerable: !0, get: () => m.default }), s.global = g;
|
|
1697
|
+
})(ft);
|
|
1698
|
+
let j;
|
|
1699
|
+
typeof window < "u" ? j = window : typeof self < "u" ? j = self : j = ft.global;
|
|
1700
|
+
let Se = null, Le = null;
|
|
1701
|
+
const lt = 20, Ce = j.clearTimeout, ct = j.setTimeout, Te = j.cancelAnimationFrame || j.mozCancelAnimationFrame || j.webkitCancelAnimationFrame, ut = j.requestAnimationFrame || j.mozRequestAnimationFrame || j.webkitRequestAnimationFrame;
|
|
1702
|
+
Te == null || ut == null ? (Se = Ce, Le = function(o) {
|
|
1703
|
+
return ct(o, lt);
|
|
1704
|
+
}) : (Se = function([o, l]) {
|
|
1705
|
+
Te(o), Ce(l);
|
|
1706
|
+
}, Le = function(o) {
|
|
1707
|
+
const l = ut(function() {
|
|
1708
|
+
Ce(d), o();
|
|
1709
|
+
}), d = ct(function() {
|
|
1710
|
+
Te(l), o();
|
|
1711
|
+
}, lt);
|
|
1712
|
+
return [l, d];
|
|
1713
|
+
});
|
|
1714
|
+
function Pi(s) {
|
|
1715
|
+
let o, l, d, m, g, f, n;
|
|
1716
|
+
const w = typeof document < "u" && document.attachEvent;
|
|
1717
|
+
if (!w) {
|
|
1718
|
+
f = function(_) {
|
|
1719
|
+
const F = _.__resizeTriggers__, U = F.firstElementChild, V = F.lastElementChild, P = U.firstElementChild;
|
|
1720
|
+
V.scrollLeft = V.scrollWidth, V.scrollTop = V.scrollHeight, P.style.width = U.offsetWidth + 1 + "px", P.style.height = U.offsetHeight + 1 + "px", U.scrollLeft = U.scrollWidth, U.scrollTop = U.scrollHeight;
|
|
1721
|
+
}, g = function(_) {
|
|
1722
|
+
return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
|
|
1723
|
+
}, n = function(_) {
|
|
1724
|
+
if (_.target.className && typeof _.target.className.indexOf == "function" && _.target.className.indexOf("contract-trigger") < 0 && _.target.className.indexOf("expand-trigger") < 0)
|
|
1725
|
+
return;
|
|
1726
|
+
const F = this;
|
|
1727
|
+
f(this), this.__resizeRAF__ && Se(this.__resizeRAF__), this.__resizeRAF__ = Le(function() {
|
|
1728
|
+
g(F) && (F.__resizeLast__.width = F.offsetWidth, F.__resizeLast__.height = F.offsetHeight, F.__resizeListeners__.forEach(function(P) {
|
|
1729
|
+
P.call(F, _);
|
|
1730
|
+
}));
|
|
1731
|
+
});
|
|
1732
|
+
};
|
|
1733
|
+
let y = !1, x = "";
|
|
1734
|
+
d = "animationstart";
|
|
1735
|
+
const A = "Webkit Moz O ms".split(" ");
|
|
1736
|
+
let B = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), N = "";
|
|
1737
|
+
{
|
|
1738
|
+
const _ = document.createElement("fakeelement");
|
|
1739
|
+
if (_.style.animationName !== void 0 && (y = !0), y === !1) {
|
|
1740
|
+
for (let F = 0; F < A.length; F++)
|
|
1741
|
+
if (_.style[A[F] + "AnimationName"] !== void 0) {
|
|
1742
|
+
N = A[F], x = "-" + N.toLowerCase() + "-", d = B[F], y = !0;
|
|
1743
|
+
break;
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
l = "resizeanim", o = "@" + x + "keyframes " + l + " { from { opacity: 0; } to { opacity: 0; } } ", m = x + "animation: 1ms " + l + "; ";
|
|
1748
|
+
}
|
|
1749
|
+
const v = function(y) {
|
|
1750
|
+
if (!y.getElementById("detectElementResize")) {
|
|
1751
|
+
const x = (o || "") + ".resize-triggers { " + (m || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', A = y.head || y.getElementsByTagName("head")[0], B = y.createElement("style");
|
|
1752
|
+
B.id = "detectElementResize", B.type = "text/css", s != null && B.setAttribute("nonce", s), B.styleSheet ? B.styleSheet.cssText = x : B.appendChild(y.createTextNode(x)), A.appendChild(B);
|
|
1753
|
+
}
|
|
1754
|
+
};
|
|
1755
|
+
return {
|
|
1756
|
+
addResizeListener: function(y, x) {
|
|
1757
|
+
if (w)
|
|
1758
|
+
y.attachEvent("onresize", x);
|
|
1759
|
+
else {
|
|
1760
|
+
if (!y.__resizeTriggers__) {
|
|
1761
|
+
const A = y.ownerDocument, B = j.getComputedStyle(y);
|
|
1762
|
+
B && B.position === "static" && (y.style.position = "relative"), v(A), y.__resizeLast__ = {}, y.__resizeListeners__ = [], (y.__resizeTriggers__ = A.createElement("div")).className = "resize-triggers";
|
|
1763
|
+
const N = A.createElement("div");
|
|
1764
|
+
N.className = "expand-trigger", N.appendChild(A.createElement("div"));
|
|
1765
|
+
const _ = A.createElement("div");
|
|
1766
|
+
_.className = "contract-trigger", y.__resizeTriggers__.appendChild(N), y.__resizeTriggers__.appendChild(_), y.appendChild(y.__resizeTriggers__), f(y), y.addEventListener("scroll", n, !0), d && (y.__resizeTriggers__.__animationListener__ = function(U) {
|
|
1767
|
+
U.animationName === l && f(y);
|
|
1768
|
+
}, y.__resizeTriggers__.addEventListener(d, y.__resizeTriggers__.__animationListener__));
|
|
1769
|
+
}
|
|
1770
|
+
y.__resizeListeners__.push(x);
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
removeResizeListener: function(y, x) {
|
|
1774
|
+
if (w)
|
|
1775
|
+
y.detachEvent("onresize", x);
|
|
1776
|
+
else if (y.__resizeListeners__.splice(y.__resizeListeners__.indexOf(x), 1), !y.__resizeListeners__.length) {
|
|
1777
|
+
y.removeEventListener("scroll", n, !0), y.__resizeTriggers__.__animationListener__ && (y.__resizeTriggers__.removeEventListener(d, y.__resizeTriggers__.__animationListener__), y.__resizeTriggers__.__animationListener__ = null);
|
|
1778
|
+
try {
|
|
1779
|
+
y.__resizeTriggers__ = !y.removeChild(y.__resizeTriggers__);
|
|
1780
|
+
} catch {
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
1786
|
+
class At extends Yt {
|
|
1787
|
+
constructor(...o) {
|
|
1788
|
+
super(...o), this.state = {
|
|
1789
|
+
height: this.props.defaultHeight || 0,
|
|
1790
|
+
scaledHeight: this.props.defaultHeight || 0,
|
|
1791
|
+
scaledWidth: this.props.defaultWidth || 0,
|
|
1792
|
+
width: this.props.defaultWidth || 0
|
|
1793
|
+
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1794
|
+
this._timeoutId = null;
|
|
1795
|
+
const {
|
|
1796
|
+
disableHeight: l,
|
|
1797
|
+
disableWidth: d,
|
|
1798
|
+
onResize: m
|
|
1799
|
+
} = this.props;
|
|
1800
|
+
if (this._parentNode) {
|
|
1801
|
+
var g, f, n, w;
|
|
1802
|
+
const v = window.getComputedStyle(this._parentNode) || {}, E = parseFloat((g = v.paddingLeft) !== null && g !== void 0 ? g : "0"), C = parseFloat((f = v.paddingRight) !== null && f !== void 0 ? f : "0"), y = parseFloat((n = v.paddingTop) !== null && n !== void 0 ? n : "0"), x = parseFloat((w = v.paddingBottom) !== null && w !== void 0 ? w : "0"), A = this._parentNode.getBoundingClientRect(), B = A.height - y - x, N = A.width - E - C, _ = this._parentNode.offsetHeight - y - x, F = this._parentNode.offsetWidth - E - C;
|
|
1803
|
+
(!l && (this.state.height !== _ || this.state.scaledHeight !== B) || !d && (this.state.width !== F || this.state.scaledWidth !== N)) && (this.setState({
|
|
1804
|
+
height: _,
|
|
1805
|
+
width: F,
|
|
1806
|
+
scaledHeight: B,
|
|
1807
|
+
scaledWidth: N
|
|
1808
|
+
}), typeof m == "function" && m({
|
|
1809
|
+
height: _,
|
|
1810
|
+
scaledHeight: B,
|
|
1811
|
+
scaledWidth: N,
|
|
1812
|
+
width: F
|
|
1813
|
+
}));
|
|
1814
|
+
}
|
|
1815
|
+
}, this._setRef = (l) => {
|
|
1816
|
+
this._autoSizer = l;
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
componentDidMount() {
|
|
1820
|
+
const {
|
|
1821
|
+
nonce: o
|
|
1822
|
+
} = this.props;
|
|
1823
|
+
this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._parentNode != null && (typeof ResizeObserver < "u" ? (this._resizeObserver = new ResizeObserver(() => {
|
|
1824
|
+
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1825
|
+
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = Pi(o), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
|
|
1826
|
+
}
|
|
1827
|
+
componentWillUnmount() {
|
|
1828
|
+
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && (this._resizeObserver.observe(this._parentNode), this._resizeObserver.disconnect()));
|
|
1829
|
+
}
|
|
1830
|
+
render() {
|
|
1831
|
+
const {
|
|
1832
|
+
children: o,
|
|
1833
|
+
defaultHeight: l,
|
|
1834
|
+
defaultWidth: d,
|
|
1835
|
+
disableHeight: m = !1,
|
|
1836
|
+
disableWidth: g = !1,
|
|
1837
|
+
nonce: f,
|
|
1838
|
+
onResize: n,
|
|
1839
|
+
style: w = {},
|
|
1840
|
+
tagName: v = "div",
|
|
1841
|
+
...E
|
|
1842
|
+
} = this.props, {
|
|
1843
|
+
height: C,
|
|
1844
|
+
scaledHeight: y,
|
|
1845
|
+
scaledWidth: x,
|
|
1846
|
+
width: A
|
|
1847
|
+
} = this.state, B = {
|
|
1848
|
+
overflow: "visible"
|
|
1849
|
+
}, N = {};
|
|
1850
|
+
let _ = !1;
|
|
1851
|
+
return m || (C === 0 && (_ = !0), B.height = 0, N.height = C, N.scaledHeight = y), g || (A === 0 && (_ = !0), B.width = 0, N.width = A, N.scaledWidth = x), Vt(v, {
|
|
1852
|
+
ref: this._setRef,
|
|
1853
|
+
style: {
|
|
1854
|
+
...B,
|
|
1855
|
+
...w
|
|
1856
|
+
},
|
|
1857
|
+
...E
|
|
1858
|
+
}, !_ && o(N));
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
const Mi = ({
|
|
1862
|
+
src: s,
|
|
1863
|
+
className: o,
|
|
1864
|
+
style: l
|
|
1865
|
+
}) => /* @__PURE__ */ c(At, { className: o, style: l, children: ({ height: d, width: m }) => /* @__PURE__ */ c(
|
|
1866
|
+
Xt,
|
|
1867
|
+
{
|
|
1868
|
+
autoplay: !0,
|
|
1869
|
+
loop: !1,
|
|
1870
|
+
controls: !1,
|
|
1871
|
+
src: `https://url-proxy.streamlayer.io?${s}`,
|
|
1872
|
+
style: { height: d, width: m }
|
|
1873
|
+
}
|
|
1874
|
+
) }), qi = /* @__PURE__ */ h("div")({
|
|
1875
|
+
name: "Container",
|
|
1876
|
+
class: "c1htq1lb",
|
|
1877
|
+
propsAsIs: !1
|
|
1878
|
+
}), ji = /* @__PURE__ */ h("div")({
|
|
1879
|
+
name: "Content",
|
|
1880
|
+
class: "cjyzpp7",
|
|
1881
|
+
propsAsIs: !1
|
|
1882
|
+
}), Gi = /* @__PURE__ */ h("div")({
|
|
1883
|
+
name: "Graphic",
|
|
1884
|
+
class: "g16mldgz",
|
|
1885
|
+
propsAsIs: !1
|
|
1886
|
+
}), Wi = /* @__PURE__ */ h("div")({
|
|
1887
|
+
name: "Headline",
|
|
1888
|
+
class: "h69js65",
|
|
1889
|
+
propsAsIs: !1
|
|
1890
|
+
}), Hi = /* @__PURE__ */ h("div")({
|
|
1891
|
+
name: "StepsContainer",
|
|
1892
|
+
class: "smm7qmo",
|
|
1893
|
+
propsAsIs: !1
|
|
1894
|
+
}), Yi = /* @__PURE__ */ h("span")({
|
|
1895
|
+
name: "StepIndicator",
|
|
1896
|
+
class: "s17knuw2",
|
|
1897
|
+
propsAsIs: !1
|
|
1898
|
+
}), Vi = ({
|
|
1899
|
+
graphicSrc: s,
|
|
1900
|
+
headline: o,
|
|
1901
|
+
stepsCount: l,
|
|
1902
|
+
currentStep: d
|
|
1903
|
+
}) => /* @__PURE__ */ I(qi, { children: [
|
|
1904
|
+
/* @__PURE__ */ I(ji, { children: [
|
|
1905
|
+
/* @__PURE__ */ c(Gi, { children: /* @__PURE__ */ c(Mi, { src: s }) }),
|
|
1906
|
+
o && /* @__PURE__ */ c(Wi, { children: o })
|
|
1907
|
+
] }),
|
|
1908
|
+
/* @__PURE__ */ c(Hi, { children: Array.from({ length: l }).map((m, g) => /* @__PURE__ */ c(Yi, { "data-active": d === g }, g)) })
|
|
1909
|
+
] }), Qi = /* @__PURE__ */ h("div")({
|
|
1910
|
+
name: "Container",
|
|
1911
|
+
class: "c1itm4k7",
|
|
1912
|
+
propsAsIs: !1
|
|
1913
|
+
}), Ki = /* @__PURE__ */ h("div")({
|
|
1914
|
+
name: "IconContainer",
|
|
1915
|
+
class: "i1w4fsni",
|
|
1916
|
+
propsAsIs: !1
|
|
1917
|
+
}), Xi = () => z, Ji = /* @__PURE__ */ h(Xi())({
|
|
1918
|
+
name: "InviteGameIcon",
|
|
1919
|
+
class: "i19m85r1",
|
|
1920
|
+
propsAsIs: !0
|
|
1921
|
+
}), Zi = /* @__PURE__ */ h("div")({
|
|
1922
|
+
name: "Content",
|
|
1923
|
+
class: "c1mbu204",
|
|
1924
|
+
propsAsIs: !1
|
|
1925
|
+
}), en = /* @__PURE__ */ h("div")({
|
|
1926
|
+
name: "Heading",
|
|
1927
|
+
class: "h1amdqtv",
|
|
1928
|
+
propsAsIs: !1
|
|
1929
|
+
}), tn = /* @__PURE__ */ h("div")({
|
|
1930
|
+
name: "Subtext",
|
|
1931
|
+
class: "s1lhlj9j",
|
|
1932
|
+
propsAsIs: !1
|
|
1933
|
+
}), rn = /* @__PURE__ */ h("div")({
|
|
1934
|
+
name: "LinkContainer",
|
|
1935
|
+
class: "l1wot35e",
|
|
1936
|
+
propsAsIs: !1
|
|
1937
|
+
}), nn = /* @__PURE__ */ h("div")({
|
|
1938
|
+
name: "LinkInfo",
|
|
1939
|
+
class: "l1jdw39q",
|
|
1940
|
+
propsAsIs: !1
|
|
1941
|
+
}), sn = /* @__PURE__ */ h("span")({
|
|
1942
|
+
name: "LinkTitle",
|
|
1943
|
+
class: "l1cr5mk",
|
|
1944
|
+
propsAsIs: !1
|
|
1945
|
+
}), on = /* @__PURE__ */ h("span")({
|
|
1946
|
+
name: "LinkAddress",
|
|
1947
|
+
class: "lvi87q4",
|
|
1948
|
+
propsAsIs: !1
|
|
1949
|
+
}), an = () => z, ln = /* @__PURE__ */ h(an())({
|
|
1950
|
+
name: "LinkIcon",
|
|
1951
|
+
class: "l1pqlvw3",
|
|
1952
|
+
propsAsIs: !0
|
|
1953
|
+
}), cn = /* @__PURE__ */ h("div")({
|
|
1954
|
+
name: "SocialLinksContainer",
|
|
1955
|
+
class: "s1n7kzeh",
|
|
1956
|
+
propsAsIs: !1
|
|
1957
|
+
}), un = /* @__PURE__ */ h("a")({
|
|
1958
|
+
name: "SocialLink",
|
|
1959
|
+
class: "s2m9o9y",
|
|
1960
|
+
propsAsIs: !1
|
|
1961
|
+
}), hn = /* @__PURE__ */ h("span")({
|
|
1962
|
+
name: "SocialLinkLabel",
|
|
1963
|
+
class: "sewjbbn",
|
|
1964
|
+
propsAsIs: !1
|
|
1965
|
+
}), dn = ({
|
|
1966
|
+
inviteLink: s,
|
|
1967
|
+
socialLinks: o,
|
|
1968
|
+
inviteCardTitle: l,
|
|
1969
|
+
inviteCardSubtext: d,
|
|
1970
|
+
primaryColor: m,
|
|
1971
|
+
className: g
|
|
1972
|
+
}) => /* @__PURE__ */ I(Qi, { className: g, children: [
|
|
1973
|
+
/* @__PURE__ */ c(Ki, { style: { backgroundColor: m }, children: /* @__PURE__ */ c(Ji, { name: "invite-game-icon" }) }),
|
|
1974
|
+
/* @__PURE__ */ I(Zi, { children: [
|
|
1975
|
+
/* @__PURE__ */ c(en, { children: l || "" }),
|
|
1976
|
+
/* @__PURE__ */ c(tn, { children: d || "" })
|
|
1977
|
+
] }),
|
|
1978
|
+
s && /* @__PURE__ */ I(rn, { onClick: async () => {
|
|
1979
|
+
if (s)
|
|
1980
|
+
try {
|
|
1981
|
+
await navigator.clipboard.writeText(s);
|
|
1982
|
+
} catch (f) {
|
|
1983
|
+
console.error("Unable to copy to clipboard", f);
|
|
1984
|
+
}
|
|
1985
|
+
}, children: [
|
|
1986
|
+
/* @__PURE__ */ I(nn, { children: [
|
|
1987
|
+
/* @__PURE__ */ c(sn, { children: "Invite link" }),
|
|
1988
|
+
/* @__PURE__ */ c(on, { children: s })
|
|
1989
|
+
] }),
|
|
1990
|
+
/* @__PURE__ */ c(ln, { name: "icon-copy" })
|
|
1991
|
+
] }),
|
|
1992
|
+
o && o.length > 0 && /* @__PURE__ */ c(cn, { children: o.map(({ icon: f, link: n, label: w }) => /* @__PURE__ */ I(un, { href: n, target: "_blank", children: [
|
|
1993
|
+
/* @__PURE__ */ c(z, { name: f }),
|
|
1994
|
+
/* @__PURE__ */ c(hn, { children: w })
|
|
1995
|
+
] }, n)) })
|
|
1996
|
+
] }), pn = /* @__PURE__ */ h("div")({
|
|
1997
|
+
name: "Container",
|
|
1998
|
+
class: "cm0bev",
|
|
1999
|
+
propsAsIs: !1
|
|
2000
|
+
}), fn = /* @__PURE__ */ h("div")({
|
|
2001
|
+
name: "Content",
|
|
2002
|
+
class: "ce7x737",
|
|
2003
|
+
propsAsIs: !1
|
|
2004
|
+
}), mn = /* @__PURE__ */ h("div")({
|
|
2005
|
+
name: "Title",
|
|
2006
|
+
class: "tc2tor6",
|
|
2007
|
+
propsAsIs: !1
|
|
2008
|
+
}), gn = /* @__PURE__ */ h("div")({
|
|
2009
|
+
name: "RulesList",
|
|
2010
|
+
class: "r1k5klql",
|
|
2011
|
+
propsAsIs: !1
|
|
2012
|
+
}), yn = /* @__PURE__ */ h("div")({
|
|
2013
|
+
name: "RulesItem",
|
|
2014
|
+
class: "r1tf3ft2",
|
|
2015
|
+
propsAsIs: !1
|
|
2016
|
+
}), wn = /* @__PURE__ */ h("div")({
|
|
2017
|
+
name: "RuleIcon",
|
|
2018
|
+
class: "rwpvg1k",
|
|
2019
|
+
propsAsIs: !1
|
|
2020
|
+
}), In = /* @__PURE__ */ h("div")({
|
|
2021
|
+
name: "RuleText",
|
|
2022
|
+
class: "rbxiag0",
|
|
2023
|
+
propsAsIs: !1
|
|
2024
|
+
}), xn = /* @__PURE__ */ h("button")({
|
|
2025
|
+
name: "TermsButton",
|
|
2026
|
+
class: "t6cyrry",
|
|
2027
|
+
propsAsIs: !1
|
|
2028
|
+
}), An = ({ rules: s, rulesTitle: o, primaryColor: l }) => /* @__PURE__ */ I(pn, { children: [
|
|
2029
|
+
/* @__PURE__ */ I(fn, { children: [
|
|
2030
|
+
/* @__PURE__ */ c(mn, { children: o }),
|
|
2031
|
+
/* @__PURE__ */ c(gn, { children: s == null ? void 0 : s.map(({ label: d, icon: m }, g) => /* @__PURE__ */ I(yn, { children: [
|
|
2032
|
+
m && /* @__PURE__ */ c(wn, { style: { backgroundColor: l }, children: /* @__PURE__ */ c(z, { name: m, "data-icon": m }) }),
|
|
2033
|
+
/* @__PURE__ */ c(In, { children: d })
|
|
2034
|
+
] }, g)) })
|
|
2035
|
+
] }),
|
|
2036
|
+
/* @__PURE__ */ c(xn, { children: "See Terms and Conditions" })
|
|
2037
|
+
] }), bn = /* @__PURE__ */ h("button")({
|
|
2038
|
+
name: "SButton",
|
|
2039
|
+
class: "s1nve60q",
|
|
2040
|
+
propsAsIs: !1
|
|
2041
|
+
}), En = /* @__PURE__ */ h("span")({
|
|
2042
|
+
name: "ButtonLabel",
|
|
2043
|
+
class: "b1xoswwx",
|
|
2044
|
+
propsAsIs: !1
|
|
2045
|
+
}), Bn = ({ disabled: s, variant: o = "primary", onClick: l, children: d, ...m }) => /* @__PURE__ */ c(bn, { onClick: l, disabled: s, "data-variant": o, ...m, children: /* @__PURE__ */ c(En, { children: d }) }), vn = /* @__PURE__ */ h("div")({
|
|
2046
|
+
name: "Container",
|
|
2047
|
+
class: "c18uddbs",
|
|
2048
|
+
propsAsIs: !1
|
|
2049
|
+
}), _n = /* @__PURE__ */ h("div")({
|
|
2050
|
+
name: "Content",
|
|
2051
|
+
class: "cvcfjf6",
|
|
2052
|
+
propsAsIs: !1
|
|
2053
|
+
}), Cn = /* @__PURE__ */ h("div")({
|
|
2054
|
+
name: "OnboardingHeader",
|
|
2055
|
+
class: "o1ie27lw",
|
|
2056
|
+
propsAsIs: !1
|
|
2057
|
+
}), Tn = /* @__PURE__ */ h("button")({
|
|
2058
|
+
name: "CloseBtn",
|
|
2059
|
+
class: "c15cjkwi",
|
|
2060
|
+
propsAsIs: !1
|
|
2061
|
+
}), Fn = () => z, $n = /* @__PURE__ */ h(Fn())({
|
|
2062
|
+
name: "IconClose",
|
|
2063
|
+
class: "i1mavjt2",
|
|
2064
|
+
propsAsIs: !0
|
|
2065
|
+
}), kn = /* @__PURE__ */ h("div")({
|
|
2066
|
+
name: "OnboardingFooter",
|
|
2067
|
+
class: "o1x0dyzv",
|
|
2068
|
+
propsAsIs: !1
|
|
2069
|
+
}), Sn = () => Bn, Ln = /* @__PURE__ */ h(Sn())({
|
|
2070
|
+
name: "OnboardingActionBtn",
|
|
2071
|
+
class: "o1jfi9c3",
|
|
2072
|
+
propsAsIs: !0
|
|
2073
|
+
}), le = {
|
|
2074
|
+
steps: !1,
|
|
2075
|
+
rules: !1,
|
|
2076
|
+
inviteCard: !1
|
|
2077
|
+
}, Nn = ({
|
|
2078
|
+
gamification: s,
|
|
2079
|
+
steps: o,
|
|
2080
|
+
rules: l,
|
|
2081
|
+
rulesBtnLabel: d,
|
|
2082
|
+
rulesTitle: m,
|
|
2083
|
+
primaryColor: g,
|
|
2084
|
+
inviteLink: f,
|
|
2085
|
+
socialLinks: n,
|
|
2086
|
+
inviteCardTitle: w,
|
|
2087
|
+
inviteCardSubtext: v,
|
|
2088
|
+
inviteCardBtnLabel: E,
|
|
2089
|
+
onClose: C
|
|
2090
|
+
}) => {
|
|
2091
|
+
const [y, x] = K(0), [A, B] = K(le);
|
|
2092
|
+
he(() => {
|
|
2093
|
+
o != null && o.length ? B({ ...le, steps: !0 }) : l != null && l.length ? B({ ...le, rules: !0 }) : B({ ...le, inviteCard: !0 });
|
|
2094
|
+
}, []);
|
|
2095
|
+
const N = Ne(() => A.steps && y === 0 ? "Continue" : A.rules ? d || "Got it" : A.inviteCard ? E || "Play Now" : "Next", [A, y, d, E]), _ = pt(() => {
|
|
2096
|
+
o != null && o.length && y < o.length - 1 ? x((U) => ++U) : l != null && l.length && A.steps ? B({ ...le, rules: !0 }) : A.rules && B({ ...le, inviteCard: !0 });
|
|
2097
|
+
}, [y, o == null ? void 0 : o.length, l == null ? void 0 : l.length, A, x, B]), F = async () => {
|
|
2098
|
+
await s.onboardingStatus.submitInplay();
|
|
2099
|
+
};
|
|
2100
|
+
return /* @__PURE__ */ c(At, { children: ({ width: U, height: V }) => /* @__PURE__ */ I(vn, { style: { width: U, height: V }, children: [
|
|
2101
|
+
/* @__PURE__ */ c(Cn, { children: /* @__PURE__ */ c(Tn, { onClick: C, children: /* @__PURE__ */ c($n, { name: "icon-close-btn-gray" }) }) }),
|
|
2102
|
+
/* @__PURE__ */ I(_n, { children: [
|
|
2103
|
+
A.steps && (o == null ? void 0 : o.length) && /* @__PURE__ */ c(Vi, { stepsCount: o.length, currentStep: y, ...o[y] }),
|
|
2104
|
+
A.rules && /* @__PURE__ */ c(An, { rules: l, rulesTitle: m, primaryColor: g }),
|
|
2105
|
+
A.inviteCard && /* @__PURE__ */ c(
|
|
2106
|
+
dn,
|
|
2107
|
+
{
|
|
2108
|
+
inviteLink: f,
|
|
2109
|
+
inviteCardTitle: w,
|
|
2110
|
+
inviteCardSubtext: v,
|
|
2111
|
+
primaryColor: g,
|
|
2112
|
+
socialLinks: n
|
|
2113
|
+
}
|
|
2114
|
+
)
|
|
2115
|
+
] }),
|
|
2116
|
+
/* @__PURE__ */ c(kn, { children: /* @__PURE__ */ c(Ln, { onClick: A.inviteCard ? F : _, children: N }) })
|
|
2117
|
+
] }) });
|
|
2118
|
+
}, Rn = /* @__PURE__ */ h("div")({
|
|
2119
|
+
name: "Container",
|
|
2120
|
+
class: "c1pgyo67",
|
|
2121
|
+
propsAsIs: !1
|
|
2122
|
+
}), Un = "hx17qu6", bt = ({
|
|
2123
|
+
children: s,
|
|
2124
|
+
style: o,
|
|
2125
|
+
className: l,
|
|
2126
|
+
hiding: d
|
|
2127
|
+
}) => /* @__PURE__ */ c(Rn, {
|
|
2128
|
+
style: o,
|
|
2129
|
+
className: Kt(l, d && Un),
|
|
2130
|
+
children: s
|
|
2131
|
+
}), zn = /* @__PURE__ */ h("div")({
|
|
2132
|
+
name: "Container",
|
|
2133
|
+
class: "cocfo2g",
|
|
2134
|
+
propsAsIs: !1
|
|
2135
|
+
}), On = /* @__PURE__ */ h("div")({
|
|
2136
|
+
name: "CloseIconWrap",
|
|
2137
|
+
class: "c1pdhxdk",
|
|
2138
|
+
propsAsIs: !1
|
|
2139
|
+
}), Dn = () => z, Pn = /* @__PURE__ */ h(Dn())({
|
|
2140
|
+
name: "CloseIcon",
|
|
2141
|
+
class: "c1funj3r",
|
|
2142
|
+
propsAsIs: !0
|
|
2143
|
+
}), Mn = /* @__PURE__ */ h("div")({
|
|
2144
|
+
name: "Title",
|
|
2145
|
+
class: "t1okg06y",
|
|
2146
|
+
propsAsIs: !1
|
|
2147
|
+
}), qn = /* @__PURE__ */ h("img")({
|
|
2148
|
+
name: "SponsorLogo",
|
|
2149
|
+
class: "sb1n923",
|
|
2150
|
+
propsAsIs: !1
|
|
2151
|
+
}), jn = /* @__PURE__ */ h("div")({
|
|
2152
|
+
name: "PresentsTitle",
|
|
2153
|
+
class: "p1stllxd",
|
|
2154
|
+
propsAsIs: !1
|
|
2155
|
+
}), Gn = /* @__PURE__ */ h("div")({
|
|
2156
|
+
name: "Subtitle",
|
|
2157
|
+
class: "s13kvdzw",
|
|
2158
|
+
propsAsIs: !1
|
|
2159
|
+
}), Wn = /* @__PURE__ */ h("div")({
|
|
2160
|
+
name: "Description",
|
|
2161
|
+
class: "dfvmv3t",
|
|
2162
|
+
propsAsIs: !1
|
|
2163
|
+
}), Hn = /* @__PURE__ */ h("button")({
|
|
2164
|
+
name: "ActionButton",
|
|
2165
|
+
class: "ay8e3j9",
|
|
2166
|
+
propsAsIs: !1
|
|
2167
|
+
}), Yn = ({ close: s, action: o, onboarding: l }) => {
|
|
2168
|
+
var d, m, g, f, n, w, v, E;
|
|
2169
|
+
return /* @__PURE__ */ I(zn, { children: [
|
|
2170
|
+
/* @__PURE__ */ c(On, { onClick: s, children: /* @__PURE__ */ c(Pn, { name: "icon-cross" }) }),
|
|
2171
|
+
((m = (d = l == null ? void 0 : l.titleCard) == null ? void 0 : d.media) == null ? void 0 : m.sponsorLogo) && /* @__PURE__ */ I(Mn, { children: [
|
|
2172
|
+
/* @__PURE__ */ c(qn, { alt: "sponsor-logo", src: (f = (g = l == null ? void 0 : l.titleCard) == null ? void 0 : g.media) == null ? void 0 : f.sponsorLogo }),
|
|
2173
|
+
/* @__PURE__ */ c(jn, { children: "PRESENTS" })
|
|
2174
|
+
] }),
|
|
2175
|
+
((n = l == null ? void 0 : l.titleCard) == null ? void 0 : n.title) && /* @__PURE__ */ c(Gn, { children: (w = l == null ? void 0 : l.titleCard) == null ? void 0 : w.title }),
|
|
2176
|
+
((v = l == null ? void 0 : l.titleCard) == null ? void 0 : v.subtitle) && /* @__PURE__ */ c(Wn, { children: (E = l == null ? void 0 : l.titleCard) == null ? void 0 : E.subtitle }),
|
|
2177
|
+
/* @__PURE__ */ c(Hn, { onClick: o, children: "Play Now" })
|
|
2178
|
+
] });
|
|
2179
|
+
}, Vn = () => bt, Qn = /* @__PURE__ */ h(Vn())({
|
|
2180
|
+
name: "OnboardingContainer",
|
|
2181
|
+
class: "o9squag",
|
|
2182
|
+
propsAsIs: !0
|
|
2183
|
+
}), Kn = ({
|
|
2184
|
+
hiding: s,
|
|
2185
|
+
deepLink: o,
|
|
2186
|
+
onboardingOpts: l,
|
|
2187
|
+
setOpened: d,
|
|
2188
|
+
notification: m,
|
|
2189
|
+
gamification: g
|
|
2190
|
+
}) => {
|
|
2191
|
+
var f, n, w, v, E, C;
|
|
2192
|
+
const {
|
|
2193
|
+
data: y
|
|
2194
|
+
} = ee(o.$store);
|
|
2195
|
+
return /* @__PURE__ */ c(Qn, {
|
|
2196
|
+
hiding: s,
|
|
2197
|
+
children: /* @__PURE__ */ c(Nn, {
|
|
2198
|
+
rules: [{
|
|
2199
|
+
label: "Answer as many questions as you like.",
|
|
2200
|
+
icon: "icon-btn-feature-groups"
|
|
2201
|
+
}, {
|
|
2202
|
+
label: "Win points for each correct trivia or prediction answer.",
|
|
2203
|
+
icon: "icon-thumb-up"
|
|
2204
|
+
}, {
|
|
2205
|
+
label: "Top the leader board and best your friends.",
|
|
2206
|
+
icon: "icon-trophy"
|
|
2207
|
+
}],
|
|
2208
|
+
rulesBtnLabel: (f = l.rules) == null ? void 0 : f.buttonLabel,
|
|
2209
|
+
rulesTitle: (n = l.rules) == null ? void 0 : n.heading,
|
|
2210
|
+
steps: [{
|
|
2211
|
+
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_01.json",
|
|
2212
|
+
headline: "Welcome to the Featured Groups +"
|
|
2213
|
+
}, {
|
|
2214
|
+
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_02.json",
|
|
2215
|
+
headline: "Get real-time insights"
|
|
2216
|
+
}, {
|
|
2217
|
+
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_03.json",
|
|
2218
|
+
headline: "Predictions, trivia & polls synced to match play"
|
|
2219
|
+
}, {
|
|
2220
|
+
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_04.json",
|
|
2221
|
+
headline: "Win points for every answer you get right"
|
|
2222
|
+
}, {
|
|
2223
|
+
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_05.json",
|
|
2224
|
+
headline: "Compete against friends on the leaderboard"
|
|
2225
|
+
}],
|
|
2226
|
+
primaryColor: (w = l.inviteCard) == null ? void 0 : w.iconColor,
|
|
2227
|
+
inviteLink: y == null ? void 0 : y.url,
|
|
2228
|
+
inviteCardTitle: (v = l.inviteCard) == null ? void 0 : v.heading,
|
|
2229
|
+
inviteCardSubtext: (E = l.inviteCard) == null ? void 0 : E.subtext,
|
|
2230
|
+
inviteCardBtnLabel: (C = l.inviteCard) == null ? void 0 : C.buttonLabel,
|
|
2231
|
+
onClose: () => {
|
|
2232
|
+
var x;
|
|
2233
|
+
d(!1), (x = m.close) == null || x.call(m);
|
|
2234
|
+
},
|
|
2235
|
+
socialLinks: [{
|
|
2236
|
+
icon: "icon-facebook",
|
|
2237
|
+
link: "https://www.facebook.com/TheMasters",
|
|
2238
|
+
label: "Facebook"
|
|
2239
|
+
}, {
|
|
2240
|
+
icon: "icon-twitter",
|
|
2241
|
+
link: "https://twitter.com/@TheMasters",
|
|
2242
|
+
label: "X"
|
|
2243
|
+
}],
|
|
2244
|
+
gamification: g
|
|
2245
|
+
})
|
|
2246
|
+
});
|
|
2247
|
+
}, Xn = ({
|
|
2248
|
+
sdk: s,
|
|
2249
|
+
hiding: o,
|
|
2250
|
+
notification: l,
|
|
2251
|
+
NotificationContainer: d
|
|
2252
|
+
}) => {
|
|
2253
|
+
const [m, g] = K(!1), f = s.getFeature(Re.GAMES), n = l.data.onboarding;
|
|
2254
|
+
return m && f && n ? /* @__PURE__ */ c(Kn, {
|
|
2255
|
+
notification: l,
|
|
2256
|
+
setOpened: g,
|
|
2257
|
+
gamification: f,
|
|
2258
|
+
onboardingOpts: n,
|
|
2259
|
+
deepLink: f.deepLink
|
|
2260
|
+
}) : /* @__PURE__ */ c(d, {
|
|
2261
|
+
hiding: o,
|
|
2262
|
+
children: /* @__PURE__ */ c("div", {
|
|
2263
|
+
children: /* @__PURE__ */ c(Yn, {
|
|
2264
|
+
close: l.close,
|
|
2265
|
+
action: () => g(!0),
|
|
2266
|
+
onboarding: n
|
|
2267
|
+
})
|
|
2268
|
+
})
|
|
2269
|
+
});
|
|
2270
|
+
}, Jn = () => bt, Fe = /* @__PURE__ */ h(Jn())({
|
|
2271
|
+
name: "Container",
|
|
2272
|
+
class: "ctckejh",
|
|
2273
|
+
propsAsIs: !0
|
|
2274
|
+
}), Zn = ({ sdk: s }) => {
|
|
2275
|
+
const o = s.getNotificationsStore(), l = ee(o), d = Ne(() => {
|
|
2276
|
+
if (!(l != null && l.size))
|
|
2277
|
+
return null;
|
|
2278
|
+
for (const m of l.values())
|
|
2279
|
+
if (m.type === ye.ONBOARDING)
|
|
2280
|
+
return m;
|
|
2281
|
+
return l.values().next().value;
|
|
2282
|
+
}, [l]);
|
|
2283
|
+
return (d == null ? void 0 : d.type) === ye.QUESTION ? /* @__PURE__ */ c(Fe, { hiding: d.hiding, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(at, { ...d }) }) }) : (d == null ? void 0 : d.type) === ye.QUESTION_RESOLVED ? /* @__PURE__ */ c(Fe, { hiding: d.hiding, children: /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(at, { ...d }) }) }) : (d == null ? void 0 : d.type) === ye.ONBOARDING ? /* @__PURE__ */ c(
|
|
2284
|
+
Xn,
|
|
2285
|
+
{
|
|
2286
|
+
NotificationContainer: Fe,
|
|
2287
|
+
sdk: s,
|
|
2288
|
+
notification: d,
|
|
2289
|
+
hiding: d.hiding
|
|
2290
|
+
}
|
|
2291
|
+
) : null;
|
|
2292
|
+
}, es = /* @__PURE__ */ h("div")({
|
|
2293
|
+
name: "SDKContainer",
|
|
2294
|
+
class: "stu11h7",
|
|
2295
|
+
propsAsIs: !1
|
|
2296
|
+
}), ht = /* @__PURE__ */ h("div")({
|
|
2297
|
+
name: "SDKScrollContainer",
|
|
2298
|
+
class: "s1ucohr1",
|
|
2299
|
+
propsAsIs: !1
|
|
2300
|
+
}), ts = /* @__PURE__ */ h("div")({
|
|
2301
|
+
name: "SDKContentContainer",
|
|
2302
|
+
class: "s1el4wvm",
|
|
2303
|
+
propsAsIs: !1
|
|
2304
|
+
}), rs = () => ts, ys = /* @__PURE__ */ h(rs())({
|
|
2305
|
+
name: "SDKWhiteContainer",
|
|
2306
|
+
class: "s1oe3036",
|
|
2307
|
+
propsAsIs: !0
|
|
2308
|
+
}), is = (s) => {
|
|
2309
|
+
const o = dt(""), [l, d] = K(!1), m = ee(s.status), g = ee(s.userId()), f = m === "ready", [n, w] = K(Z), v = pt(
|
|
2310
|
+
(y, x) => {
|
|
2311
|
+
w(x), x === Z ? (y && s.createEventSession(y), s.openFeature(Re.GAMES)) : s.closeFeature();
|
|
2312
|
+
},
|
|
2313
|
+
[s]
|
|
2314
|
+
);
|
|
2315
|
+
he(() => {
|
|
2316
|
+
!f && n === Z && (w(ce), s.closeFeature());
|
|
2317
|
+
}, [f, n, s]);
|
|
2318
|
+
const E = (y) => {
|
|
2319
|
+
o.current = y, s.initializeApp().then(({ enabled: x, err: A }) => {
|
|
2320
|
+
if (d(!0), A) {
|
|
2321
|
+
v(y, ce);
|
|
2322
|
+
return;
|
|
2323
|
+
}
|
|
2324
|
+
if (x) {
|
|
2325
|
+
s.isUserAuthorized().then((B) => {
|
|
2326
|
+
if (B) {
|
|
2327
|
+
v(y, Z);
|
|
2328
|
+
return;
|
|
2329
|
+
} else
|
|
2330
|
+
s.disableApp();
|
|
2331
|
+
});
|
|
2332
|
+
return;
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
}, C = () => {
|
|
2336
|
+
d(!1), s.disableApp();
|
|
2337
|
+
};
|
|
2338
|
+
return he(() => {
|
|
2339
|
+
if (!g) {
|
|
2340
|
+
f && n === Z && (w(ce), s.disableApp());
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
g && o.current && l && s.initializeApp().then(() => {
|
|
2344
|
+
s.createEventSession(o.current);
|
|
2345
|
+
});
|
|
2346
|
+
}, [g]), {
|
|
2347
|
+
sdkEnabled: l,
|
|
2348
|
+
sdkReady: f,
|
|
2349
|
+
activeOverlay: n,
|
|
2350
|
+
activateAndLoadOverlay: v,
|
|
2351
|
+
enableSdk: E,
|
|
2352
|
+
disableSdk: C,
|
|
2353
|
+
isLogged: !!g
|
|
2354
|
+
};
|
|
2355
|
+
}, ns = (s) => {
|
|
2356
|
+
const o = ee(s.getActiveFeature()), l = ee(s.streamStore()), [d, m] = K(null);
|
|
2357
|
+
return he(() => {
|
|
2358
|
+
const g = s.getFeatures();
|
|
2359
|
+
if (o)
|
|
2360
|
+
for (const [f, n] of g)
|
|
2361
|
+
f === o ? n.status.get() === pe.Suspended && (n.enable(), m(n)) : n.status.get() === pe.Ready && n.disable();
|
|
2362
|
+
else {
|
|
2363
|
+
for (const [, f] of g)
|
|
2364
|
+
f.status.get() === pe.Ready && f.disable();
|
|
2365
|
+
m(null);
|
|
2366
|
+
}
|
|
2367
|
+
return () => {
|
|
2368
|
+
for (const [, f] of g)
|
|
2369
|
+
f.status.get() === pe.Ready && f.disable();
|
|
2370
|
+
};
|
|
2371
|
+
}, [o, s, l]), [o, d];
|
|
2372
|
+
}, ss = ({ sdk: s, className: o }) => {
|
|
2373
|
+
const [, l] = ns(s);
|
|
2374
|
+
return /* @__PURE__ */ c(er, { className: o, feature: l, sdk: s });
|
|
2375
|
+
}, os = ({ sdk: s, overlays: o, children: l }) => {
|
|
2376
|
+
const { sdkEnabled: d, sdkReady: m, activeOverlay: g, activateAndLoadOverlay: f, enableSdk: n, disableSdk: w, isLogged: v } = is(s);
|
|
2377
|
+
return he(() => {
|
|
2378
|
+
import("./gamification-feature.js");
|
|
2379
|
+
}, []), /* @__PURE__ */ I(es, { children: [
|
|
2380
|
+
d && /* @__PURE__ */ c(
|
|
2381
|
+
yr,
|
|
2382
|
+
{
|
|
2383
|
+
sdkReady: m,
|
|
2384
|
+
activeOverlay: g,
|
|
2385
|
+
className: Ke,
|
|
2386
|
+
setActiveOverlay: (E) => f("", E)
|
|
2387
|
+
}
|
|
2388
|
+
),
|
|
2389
|
+
m && /* @__PURE__ */ c(Zn, { sdk: s }),
|
|
2390
|
+
/* @__PURE__ */ c(
|
|
2391
|
+
ht,
|
|
2392
|
+
{
|
|
2393
|
+
"data-nav": d.toString(),
|
|
2394
|
+
style: { display: !d || g === ce ? "block" : "none" },
|
|
2395
|
+
children: l && l({ enableSdk: n, disableSdk: w })
|
|
2396
|
+
}
|
|
2397
|
+
),
|
|
2398
|
+
/* @__PURE__ */ c(
|
|
2399
|
+
ht,
|
|
2400
|
+
{
|
|
2401
|
+
"data-nav": d.toString(),
|
|
2402
|
+
style: { display: g === xe ? "block" : "none" },
|
|
2403
|
+
children: o && g === xe && o[g]
|
|
2404
|
+
}
|
|
2405
|
+
),
|
|
2406
|
+
m && g === Z && /* @__PURE__ */ c(ss, { className: Ke, sdk: s }),
|
|
2407
|
+
!v && /* @__PURE__ */ c("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
|
|
2408
|
+
] });
|
|
2409
|
+
};
|
|
2410
|
+
const ws = ({
|
|
2411
|
+
sdkKey: s,
|
|
2412
|
+
plugins: o,
|
|
2413
|
+
children: l,
|
|
2414
|
+
production: d = !0
|
|
2415
|
+
}) => /* @__PURE__ */ c(Mt, { sdkKey: s, plugins: o, production: d, autoEnable: !1, children: l }), Is = ({ children: s, overlays: o }) => {
|
|
2416
|
+
const { sdk: l, status: d } = Qt(qt);
|
|
2417
|
+
if (d === jt.UNSET)
|
|
2418
|
+
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
2419
|
+
return l ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ c(Gt, { style: { height: "100%" }, children: /* @__PURE__ */ c(os, { sdk: l, overlays: o, children: s }) }) }) : s({});
|
|
2420
|
+
};
|
|
2421
|
+
export {
|
|
2422
|
+
At as A,
|
|
2423
|
+
ws as M,
|
|
2424
|
+
dn as O,
|
|
2425
|
+
ys as a,
|
|
2426
|
+
Is as b,
|
|
2427
|
+
Bn as c,
|
|
2428
|
+
bt as d,
|
|
2429
|
+
ts as n,
|
|
2430
|
+
wr as o,
|
|
2431
|
+
ht as r,
|
|
2432
|
+
Er as w
|
|
2433
|
+
};
|