@streamlayer/react 0.29.5 → 0.29.7
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/masters.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/{index-bee6e4ec.cjs → index-6e59a602.cjs} +1 -1
- package/lib/dist/{index-c9c374fc.js → index-fc427185.js} +1 -1
- package/lib/dist/index.d.ts +11 -0
- package/lib/dist/{masters-cbaf9f64.cjs → masters-67146dd2.cjs} +11 -11
- package/lib/dist/{masters-55ee878f.js → masters-bce7accd.js} +3939 -3823
- package/lib/dist/style.css +13 -0
- package/lib/es/masters.js +1 -1
- package/lib/{index-097ba5f5.cjs → index-6b781147.cjs} +1 -1
- package/lib/{index-aa64b1f2.js → index-9295c266.js} +1 -1
- package/lib/masters-440bed5b.cjs +1 -0
- package/lib/masters-915bbbeb.js +693 -0
- package/lib/style.css +1 -1
- package/package.json +7 -7
- package/lib/masters-541db712.cjs +0 -1
- package/lib/masters-e3fde211.js +0 -608
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
import { jsx as s, jsxs as r, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { f as O, S as H, a as J, b as X, p as Z } from "./index-0d23b24e.js";
|
|
3
|
+
import { lazy as ss, useMemo as Q, Suspense as es, useRef as as, useState as b, useEffect as T, useCallback as ns, useContext as ls } from "react";
|
|
4
|
+
import { FeatureType as V, QuestionType as u } from "@streamlayer/sdk-web-types";
|
|
5
|
+
import { useStore as I } from "@nanostores/react";
|
|
6
|
+
import { FeatureStatus as k } from "@streamlayer/sdk-web-interfaces";
|
|
7
|
+
import { s as a, C as m, c as ts } from "./index-616b0bcd.js";
|
|
8
|
+
import { NotificationType as C } from "@streamlayer/sdk-web-notifications";
|
|
9
|
+
const rs = ({ feature: e, sdk: n, children: l, className: t }) => {
|
|
10
|
+
const i = I(e.status), { slStreamId: c } = I(n.sdkStore);
|
|
11
|
+
return c != null && c.loading ? /* @__PURE__ */ s("div", { className: t, children: "event is loading..." }) : c != null && c.data ? i !== k.Ready ? /* @__PURE__ */ s("div", { className: t, children: "wait feature..." }) : l : /* @__PURE__ */ s("div", { className: t, children: "event is forbidden..." });
|
|
12
|
+
}, cs = ss(() => import("./index-9295c266.js")), is = ({
|
|
13
|
+
sdk: e,
|
|
14
|
+
feature: n,
|
|
15
|
+
className: l
|
|
16
|
+
}) => {
|
|
17
|
+
const t = Q(() => n && n.featureConfig.get().type === V.GAMES ? /* @__PURE__ */ s(rs, { className: l, sdk: e, feature: n, children: /* @__PURE__ */ s(cs, { className: l, gamification: n, sdk: e }) }) : null, [e, n, l]);
|
|
18
|
+
return /* @__PURE__ */ s(
|
|
19
|
+
es,
|
|
20
|
+
{
|
|
21
|
+
fallback: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
22
|
+
children: t
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
const os = /* @__PURE__ */ a("button")({
|
|
27
|
+
name: "e",
|
|
28
|
+
class: "enu64b2",
|
|
29
|
+
propsAsIs: !1
|
|
30
|
+
}), ds = /* @__PURE__ */ a("span")({
|
|
31
|
+
name: "t",
|
|
32
|
+
class: "tw2meku",
|
|
33
|
+
propsAsIs: !1
|
|
34
|
+
}), ps = /* @__PURE__ */ a("span")({
|
|
35
|
+
name: "a",
|
|
36
|
+
class: "aka8vam",
|
|
37
|
+
propsAsIs: !1
|
|
38
|
+
}), j = ({ disabled: e, active: n, onClick: l, label: t, icon: i }) => /* @__PURE__ */ s(os, { onClick: l, disabled: e, "data-selected": n, children: /* @__PURE__ */ r(_, { children: [
|
|
39
|
+
i && /* @__PURE__ */ s(ds, { children: i }),
|
|
40
|
+
/* @__PURE__ */ s(ps, { children: t })
|
|
41
|
+
] }) });
|
|
42
|
+
const us = () => m, ms = /* @__PURE__ */ a(us())({
|
|
43
|
+
name: "a",
|
|
44
|
+
class: "a10lggiw",
|
|
45
|
+
propsAsIs: !0
|
|
46
|
+
}), S = "channels", hs = (e) => {
|
|
47
|
+
var n;
|
|
48
|
+
return /* @__PURE__ */ s(j, {
|
|
49
|
+
...e,
|
|
50
|
+
id: "channels",
|
|
51
|
+
label: "Channels",
|
|
52
|
+
icon: /* @__PURE__ */ s(ms, {
|
|
53
|
+
name: "icon-btn-channels",
|
|
54
|
+
"data-selected": (n = e.active) == null ? void 0 : n.toString()
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const vs = () => m, fs = /* @__PURE__ */ a(vs())({
|
|
59
|
+
name: "d",
|
|
60
|
+
class: "d1x5s8ie",
|
|
61
|
+
propsAsIs: !0
|
|
62
|
+
}), v = "featuredGroups", Is = (e) => {
|
|
63
|
+
var n;
|
|
64
|
+
return /* @__PURE__ */ s(j, {
|
|
65
|
+
...e,
|
|
66
|
+
label: "FG+",
|
|
67
|
+
id: "featuredGroups",
|
|
68
|
+
icon: /* @__PURE__ */ s(fs, {
|
|
69
|
+
name: "icon-btn-feature-groups",
|
|
70
|
+
"data-selected": (n = e.active) == null ? void 0 : n.toString()
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const As = () => m, $s = /* @__PURE__ */ a(As())({
|
|
75
|
+
name: "n",
|
|
76
|
+
class: "ntav86o",
|
|
77
|
+
propsAsIs: !0
|
|
78
|
+
}), N = "leaderboard", ys = (e) => {
|
|
79
|
+
var n;
|
|
80
|
+
return /* @__PURE__ */ s(j, {
|
|
81
|
+
...e,
|
|
82
|
+
label: "Leader Board",
|
|
83
|
+
id: "leaderboard",
|
|
84
|
+
icon: /* @__PURE__ */ s($s, {
|
|
85
|
+
name: "icon-btn-leaderboard",
|
|
86
|
+
"data-selected": (n = e.active) == null ? void 0 : n.toString()
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
const gs = /* @__PURE__ */ a("div")({
|
|
91
|
+
name: "n",
|
|
92
|
+
class: "n1rlvhvz",
|
|
93
|
+
propsAsIs: !1
|
|
94
|
+
}), bs = ({
|
|
95
|
+
children: e,
|
|
96
|
+
className: n
|
|
97
|
+
}) => /* @__PURE__ */ s(gs, {
|
|
98
|
+
className: n,
|
|
99
|
+
children: e
|
|
100
|
+
});
|
|
101
|
+
const ks = () => bs, xs = /* @__PURE__ */ a(ks())({
|
|
102
|
+
name: "n",
|
|
103
|
+
class: "n9bnom",
|
|
104
|
+
propsAsIs: !0
|
|
105
|
+
}), _s = ({ activeOverlay: e, setActiveOverlay: n, sdkReady: l, className: t }) => /* @__PURE__ */ r(xs, { className: t, children: [
|
|
106
|
+
/* @__PURE__ */ s(hs, { active: e === S, onClick: () => n(S) }),
|
|
107
|
+
/* @__PURE__ */ s(
|
|
108
|
+
Is,
|
|
109
|
+
{
|
|
110
|
+
active: e === v,
|
|
111
|
+
disabled: !l,
|
|
112
|
+
onClick: () => {
|
|
113
|
+
n(v);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ s(
|
|
118
|
+
ys,
|
|
119
|
+
{
|
|
120
|
+
active: e === N,
|
|
121
|
+
onClick: () => n(N)
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] }), Ss = {
|
|
125
|
+
[u.TWEET]: { label: "Insight", iconName: "icon-insight" },
|
|
126
|
+
[u.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
|
|
127
|
+
[u.UNSET]: void 0,
|
|
128
|
+
[u.FACTOID]: { label: "Insight", iconName: "icon-insight" },
|
|
129
|
+
[u.POLL]: { label: "Poll", iconName: "icon-poll" },
|
|
130
|
+
[u.TRIVIA]: { label: "Trivia", iconName: "icon-trivia" },
|
|
131
|
+
[u.PREDICTION]: { label: "Prediction", iconName: "icon-prediction" }
|
|
132
|
+
};
|
|
133
|
+
const ws = /* @__PURE__ */ a("div")({
|
|
134
|
+
name: "i",
|
|
135
|
+
class: "i1bwjtdb",
|
|
136
|
+
propsAsIs: !1
|
|
137
|
+
}), Ns = /* @__PURE__ */ a("video")({
|
|
138
|
+
name: "e",
|
|
139
|
+
class: "enb7moc",
|
|
140
|
+
propsAsIs: !1
|
|
141
|
+
}), Cs = /* @__PURE__ */ a("img")({
|
|
142
|
+
name: "r",
|
|
143
|
+
class: "r1ws5lyh",
|
|
144
|
+
propsAsIs: !1
|
|
145
|
+
}), Es = /* @__PURE__ */ a("div")({
|
|
146
|
+
name: "s",
|
|
147
|
+
class: "soibf55",
|
|
148
|
+
propsAsIs: !1
|
|
149
|
+
}), Ts = ({ poster: e, source: n }) => {
|
|
150
|
+
const l = as(null), [t, i] = b(!1), [c, o] = b(!0);
|
|
151
|
+
return /* @__PURE__ */ r(ws, { onClick: () => {
|
|
152
|
+
const d = l == null ? void 0 : l.current;
|
|
153
|
+
d && i((f) => f ? (d.pause(), !1) : (d.play(), o(!1), !0));
|
|
154
|
+
}, children: [
|
|
155
|
+
/* @__PURE__ */ s(
|
|
156
|
+
Ns,
|
|
157
|
+
{
|
|
158
|
+
ref: l,
|
|
159
|
+
src: n,
|
|
160
|
+
onEnded: () => {
|
|
161
|
+
var d;
|
|
162
|
+
(d = l == null ? void 0 : l.current) == null || d.load(), i(!1), o(!0);
|
|
163
|
+
},
|
|
164
|
+
style: { visibility: c ? "hidden" : "visible" }
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ s(Cs, { src: e, style: { visibility: c ? "visible" : "hidden" } }),
|
|
168
|
+
/* @__PURE__ */ s(Es, { children: !t && /* @__PURE__ */ s(m, { name: "icon-play" }) })
|
|
169
|
+
] });
|
|
170
|
+
};
|
|
171
|
+
const js = /* @__PURE__ */ a("div")({
|
|
172
|
+
name: "r",
|
|
173
|
+
class: "rcr31jh",
|
|
174
|
+
propsAsIs: !1
|
|
175
|
+
}), Os = /* @__PURE__ */ a("div")({
|
|
176
|
+
name: "i",
|
|
177
|
+
class: "ihj4z8w",
|
|
178
|
+
propsAsIs: !1
|
|
179
|
+
}), Ls = /* @__PURE__ */ a("h3")({
|
|
180
|
+
name: "t",
|
|
181
|
+
class: "t1oks4sz",
|
|
182
|
+
propsAsIs: !1
|
|
183
|
+
}), Rs = /* @__PURE__ */ a("div")({
|
|
184
|
+
name: "n",
|
|
185
|
+
class: "n18s3mno",
|
|
186
|
+
propsAsIs: !1
|
|
187
|
+
}), zs = /* @__PURE__ */ a("button")({
|
|
188
|
+
name: "l",
|
|
189
|
+
class: "lc8mqwv",
|
|
190
|
+
propsAsIs: !1
|
|
191
|
+
}), Ps = ({
|
|
192
|
+
video: e,
|
|
193
|
+
heading: n,
|
|
194
|
+
body: l,
|
|
195
|
+
action: t
|
|
196
|
+
}) => /* @__PURE__ */ r(js, { children: [
|
|
197
|
+
(e == null ? void 0 : e.url) && /* @__PURE__ */ s(Ts, { source: e.url, poster: e.thumbnailUrl }),
|
|
198
|
+
/* @__PURE__ */ r(Os, { children: [
|
|
199
|
+
/* @__PURE__ */ s(Ls, { children: n }),
|
|
200
|
+
/* @__PURE__ */ s(Rs, { children: l }),
|
|
201
|
+
t && /* @__PURE__ */ s(zs, { onClick: t, children: "View Insight" })
|
|
202
|
+
] })
|
|
203
|
+
] });
|
|
204
|
+
const Fs = () => p, qs = () => p, Ds = () => p, Gs = () => p, Us = () => p, Ms = () => p, Ws = () => p, Ys = () => p, Bs = () => p, Qs = () => p, Vs = () => p, Ks = () => p, Hs = () => p, Js = () => p, $ = /* @__PURE__ */ a("div")({
|
|
205
|
+
name: "o",
|
|
206
|
+
class: "oeeit6",
|
|
207
|
+
propsAsIs: !1
|
|
208
|
+
}), p = /* @__PURE__ */ a("div")({
|
|
209
|
+
name: "e",
|
|
210
|
+
class: "e1v245rb",
|
|
211
|
+
propsAsIs: !1
|
|
212
|
+
}), Xs = /* @__PURE__ */ a(Fs())({
|
|
213
|
+
name: "n",
|
|
214
|
+
class: "neiocf7",
|
|
215
|
+
propsAsIs: !0
|
|
216
|
+
}), Zs = /* @__PURE__ */ a(qs())({
|
|
217
|
+
name: "t",
|
|
218
|
+
class: "t1vmkqme",
|
|
219
|
+
propsAsIs: !0
|
|
220
|
+
}), se = /* @__PURE__ */ a(Ds())({
|
|
221
|
+
name: "r",
|
|
222
|
+
class: "r1ln3ryw",
|
|
223
|
+
propsAsIs: !0
|
|
224
|
+
}), L = /* @__PURE__ */ a(Gs())({
|
|
225
|
+
name: "a",
|
|
226
|
+
class: "a1s6rgzs",
|
|
227
|
+
propsAsIs: !0
|
|
228
|
+
}), R = /* @__PURE__ */ a(Us())({
|
|
229
|
+
name: "h",
|
|
230
|
+
class: "h13kvn19",
|
|
231
|
+
propsAsIs: !0
|
|
232
|
+
}), z = /* @__PURE__ */ a(Ms())({
|
|
233
|
+
name: "d",
|
|
234
|
+
class: "dcrmlko",
|
|
235
|
+
propsAsIs: !0
|
|
236
|
+
}), P = /* @__PURE__ */ a(Ws())({
|
|
237
|
+
name: "m",
|
|
238
|
+
class: "m16755u3",
|
|
239
|
+
propsAsIs: !0
|
|
240
|
+
}), F = /* @__PURE__ */ a(Ys())({
|
|
241
|
+
name: "c",
|
|
242
|
+
class: "cdwashk",
|
|
243
|
+
propsAsIs: !0
|
|
244
|
+
}), q = /* @__PURE__ */ a(Bs())({
|
|
245
|
+
name: "w",
|
|
246
|
+
class: "w1lh1meo",
|
|
247
|
+
propsAsIs: !0
|
|
248
|
+
}), D = /* @__PURE__ */ a(Qs())({
|
|
249
|
+
name: "p",
|
|
250
|
+
class: "p1y0qeoo",
|
|
251
|
+
propsAsIs: !0
|
|
252
|
+
}), ee = /* @__PURE__ */ a(Vs())({
|
|
253
|
+
name: "L",
|
|
254
|
+
class: "l1wanjqa",
|
|
255
|
+
propsAsIs: !0
|
|
256
|
+
}), ae = /* @__PURE__ */ a(Ks())({
|
|
257
|
+
name: "l",
|
|
258
|
+
class: "l1aaziu",
|
|
259
|
+
propsAsIs: !0
|
|
260
|
+
}), ne = /* @__PURE__ */ a(Hs())({
|
|
261
|
+
name: "f",
|
|
262
|
+
class: "fwkppnn",
|
|
263
|
+
propsAsIs: !0
|
|
264
|
+
}), le = /* @__PURE__ */ a(Js())({
|
|
265
|
+
name: "u",
|
|
266
|
+
class: "uw10l4r",
|
|
267
|
+
propsAsIs: !0
|
|
268
|
+
}), te = ({ step: e, correct: n }) => /* @__PURE__ */ r(_, { children: [
|
|
269
|
+
/* @__PURE__ */ r($, { "data-active": e === 1, "data-first-screen": "true", children: [
|
|
270
|
+
/* @__PURE__ */ s(Xs, {}),
|
|
271
|
+
/* @__PURE__ */ s(Zs, {}),
|
|
272
|
+
/* @__PURE__ */ s(se, {})
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ r($, { "data-active": e === 2, children: [
|
|
275
|
+
/* @__PURE__ */ s(L, {}),
|
|
276
|
+
/* @__PURE__ */ s(R, {}),
|
|
277
|
+
/* @__PURE__ */ s(z, {})
|
|
278
|
+
] }),
|
|
279
|
+
/* @__PURE__ */ r($, { "data-active": e === 3, children: [
|
|
280
|
+
/* @__PURE__ */ s(L, {}),
|
|
281
|
+
/* @__PURE__ */ s(R, {}),
|
|
282
|
+
/* @__PURE__ */ s(z, {})
|
|
283
|
+
] }),
|
|
284
|
+
n ? /* @__PURE__ */ r(_, { children: [
|
|
285
|
+
/* @__PURE__ */ r($, { "data-active": e === 4, "data-correct": "false", children: [
|
|
286
|
+
/* @__PURE__ */ s(P, {}),
|
|
287
|
+
/* @__PURE__ */ s(F, {}),
|
|
288
|
+
/* @__PURE__ */ s(q, {}),
|
|
289
|
+
/* @__PURE__ */ s(D, {})
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ r($, { "data-active": e === 5, "data-correct": "false", "data-last-screen": "true", children: [
|
|
292
|
+
/* @__PURE__ */ s(P, {}),
|
|
293
|
+
/* @__PURE__ */ s(F, {}),
|
|
294
|
+
/* @__PURE__ */ s(q, {}),
|
|
295
|
+
/* @__PURE__ */ s(D, {})
|
|
296
|
+
] })
|
|
297
|
+
] }) : /* @__PURE__ */ r($, { "data-active": e === 4, "data-correct": "false", "data-last-screen": "true", children: [
|
|
298
|
+
/* @__PURE__ */ s(ee, {}),
|
|
299
|
+
/* @__PURE__ */ s(ae, {}),
|
|
300
|
+
/* @__PURE__ */ s(ne, {}),
|
|
301
|
+
/* @__PURE__ */ s(le, {})
|
|
302
|
+
] })
|
|
303
|
+
] });
|
|
304
|
+
const re = () => x, ce = () => m, ie = () => m, oe = /* @__PURE__ */ a("div")({
|
|
305
|
+
name: "c",
|
|
306
|
+
class: "c1iwvsrd",
|
|
307
|
+
propsAsIs: !1
|
|
308
|
+
}), de = /* @__PURE__ */ a("div")({
|
|
309
|
+
name: "s",
|
|
310
|
+
class: "s16ztc4y",
|
|
311
|
+
propsAsIs: !1
|
|
312
|
+
}), y = /* @__PURE__ */ a("div")({
|
|
313
|
+
name: "l",
|
|
314
|
+
class: "lpu10kq",
|
|
315
|
+
propsAsIs: !1
|
|
316
|
+
}), g = /* @__PURE__ */ a("div")({
|
|
317
|
+
name: "p",
|
|
318
|
+
class: "pv9ujcb",
|
|
319
|
+
propsAsIs: !1
|
|
320
|
+
}), x = /* @__PURE__ */ a("div")({
|
|
321
|
+
name: "o",
|
|
322
|
+
class: "ow7lyj4",
|
|
323
|
+
propsAsIs: !1
|
|
324
|
+
}), G = /* @__PURE__ */ a(re())({
|
|
325
|
+
name: "d",
|
|
326
|
+
class: "d1xtwn2m",
|
|
327
|
+
propsAsIs: !0
|
|
328
|
+
}), w = /* @__PURE__ */ a("div")({
|
|
329
|
+
name: "f",
|
|
330
|
+
class: "f1bvvudl",
|
|
331
|
+
propsAsIs: !1
|
|
332
|
+
}), E = /* @__PURE__ */ a(ce())({
|
|
333
|
+
name: "g",
|
|
334
|
+
class: "g56gji0",
|
|
335
|
+
propsAsIs: !0
|
|
336
|
+
}), U = /* @__PURE__ */ a("button")({
|
|
337
|
+
name: "x",
|
|
338
|
+
class: "x8gvwg8",
|
|
339
|
+
propsAsIs: !1
|
|
340
|
+
}), M = /* @__PURE__ */ a(ie())({
|
|
341
|
+
name: "u",
|
|
342
|
+
class: "uckrlxs",
|
|
343
|
+
propsAsIs: !0
|
|
344
|
+
}), pe = ({
|
|
345
|
+
close: e,
|
|
346
|
+
votedAnswer: n,
|
|
347
|
+
correct: l,
|
|
348
|
+
correctAnswerTitle: t
|
|
349
|
+
}) => {
|
|
350
|
+
const [i, c] = b(1);
|
|
351
|
+
return T(() => {
|
|
352
|
+
const o = setInterval(() => {
|
|
353
|
+
c((d) => l && d > 4 || !l && d > 3 ? d : ++d);
|
|
354
|
+
}, 6e3);
|
|
355
|
+
return () => clearInterval(o);
|
|
356
|
+
}, [l]), /* @__PURE__ */ r(oe, { "data-bg-color-white": i > 3, children: [
|
|
357
|
+
/* @__PURE__ */ s(te, { step: i, correct: l }),
|
|
358
|
+
/* @__PURE__ */ r(de, { "data-active-number": i, children: [
|
|
359
|
+
/* @__PURE__ */ r(y, { children: [
|
|
360
|
+
/* @__PURE__ */ s(g, { children: "Master" }),
|
|
361
|
+
/* @__PURE__ */ s(G, { children: "FEATURED GROUPS +" })
|
|
362
|
+
] }),
|
|
363
|
+
/* @__PURE__ */ r(y, { children: [
|
|
364
|
+
/* @__PURE__ */ s(g, { children: "Prediction results are in!" }),
|
|
365
|
+
/* @__PURE__ */ s(G, { children: "FEATURED GROUPS +" })
|
|
366
|
+
] }),
|
|
367
|
+
/* @__PURE__ */ r(y, { children: [
|
|
368
|
+
/* @__PURE__ */ s(g, { children: "Who holds the most birdies in golf?" }),
|
|
369
|
+
/* @__PURE__ */ r(x, { children: [
|
|
370
|
+
"Your Pick: ",
|
|
371
|
+
/* @__PURE__ */ s(w, { children: n == null ? void 0 : n.title })
|
|
372
|
+
] })
|
|
373
|
+
] }),
|
|
374
|
+
l ? /* @__PURE__ */ r(_, { children: [
|
|
375
|
+
/* @__PURE__ */ r(y, { "data-color-green": "true", children: [
|
|
376
|
+
/* @__PURE__ */ s(g, { children: "Congratulations! You answered correctly." }),
|
|
377
|
+
/* @__PURE__ */ r(x, { children: [
|
|
378
|
+
/* @__PURE__ */ s(E, { name: "selected" }),
|
|
379
|
+
"Your Pick: ",
|
|
380
|
+
/* @__PURE__ */ s(w, { children: n == null ? void 0 : n.title })
|
|
381
|
+
] })
|
|
382
|
+
] }),
|
|
383
|
+
/* @__PURE__ */ r(y, { "data-color-green": "true", children: [
|
|
384
|
+
/* @__PURE__ */ s(U, { onClick: e, children: /* @__PURE__ */ s(M, { name: "icon-cross" }) }),
|
|
385
|
+
/* @__PURE__ */ r(g, { children: [
|
|
386
|
+
"+",
|
|
387
|
+
n == null ? void 0 : n.points,
|
|
388
|
+
" points"
|
|
389
|
+
] }),
|
|
390
|
+
/* @__PURE__ */ r(x, { children: [
|
|
391
|
+
/* @__PURE__ */ s(E, { name: "selected" }),
|
|
392
|
+
"Your Pick: ",
|
|
393
|
+
/* @__PURE__ */ s(w, { children: n == null ? void 0 : n.title })
|
|
394
|
+
] })
|
|
395
|
+
] })
|
|
396
|
+
] }) : /* @__PURE__ */ r(y, { children: [
|
|
397
|
+
/* @__PURE__ */ s(U, { onClick: e, children: /* @__PURE__ */ s(M, { name: "icon-cross" }) }),
|
|
398
|
+
/* @__PURE__ */ r(g, { "data-incorrect": "true", children: [
|
|
399
|
+
"Better luck next time! Correct: ",
|
|
400
|
+
t,
|
|
401
|
+
"."
|
|
402
|
+
] }),
|
|
403
|
+
/* @__PURE__ */ r(x, { "data-incorrect": "true", children: [
|
|
404
|
+
/* @__PURE__ */ s(E, { name: "circleClose" }),
|
|
405
|
+
"Your Pick: ",
|
|
406
|
+
/* @__PURE__ */ s(w, { children: n == null ? void 0 : n.title })
|
|
407
|
+
] })
|
|
408
|
+
] })
|
|
409
|
+
] })
|
|
410
|
+
] });
|
|
411
|
+
};
|
|
412
|
+
const ue = () => m, me = () => m, he = /* @__PURE__ */ a("div")({
|
|
413
|
+
name: "p",
|
|
414
|
+
class: "p16oo5uk",
|
|
415
|
+
propsAsIs: !1
|
|
416
|
+
}), ve = /* @__PURE__ */ a("div")({
|
|
417
|
+
name: "a",
|
|
418
|
+
class: "a18c5k3h",
|
|
419
|
+
propsAsIs: !1
|
|
420
|
+
}), fe = /* @__PURE__ */ a(ue())({
|
|
421
|
+
name: "c",
|
|
422
|
+
class: "czv5t8k",
|
|
423
|
+
propsAsIs: !0
|
|
424
|
+
}), Ie = /* @__PURE__ */ a("div")({
|
|
425
|
+
name: "s",
|
|
426
|
+
class: "s1wp1emp",
|
|
427
|
+
propsAsIs: !1
|
|
428
|
+
}), Ae = /* @__PURE__ */ a(me())({
|
|
429
|
+
name: "l",
|
|
430
|
+
class: "l1nz0q6x",
|
|
431
|
+
propsAsIs: !0
|
|
432
|
+
}), $e = /* @__PURE__ */ a("span")({
|
|
433
|
+
name: "g",
|
|
434
|
+
class: "g1jhb9lu",
|
|
435
|
+
propsAsIs: !1
|
|
436
|
+
}), ye = /* @__PURE__ */ a("div")({
|
|
437
|
+
name: "d",
|
|
438
|
+
class: "ds6gfsv",
|
|
439
|
+
propsAsIs: !1
|
|
440
|
+
}), ge = /* @__PURE__ */ a("button")({
|
|
441
|
+
name: "x",
|
|
442
|
+
class: "xkzz16s",
|
|
443
|
+
propsAsIs: !1
|
|
444
|
+
});
|
|
445
|
+
const be = /* @__PURE__ */ a("div")({
|
|
446
|
+
name: "i",
|
|
447
|
+
class: "i1j5f618",
|
|
448
|
+
propsAsIs: !1
|
|
449
|
+
}), ke = /* @__PURE__ */ a("div")({
|
|
450
|
+
name: "n",
|
|
451
|
+
class: "n1fqaem9",
|
|
452
|
+
propsAsIs: !1
|
|
453
|
+
}), xe = /* @__PURE__ */ a("img")({
|
|
454
|
+
name: "o",
|
|
455
|
+
class: "o1jovu9m",
|
|
456
|
+
propsAsIs: !1
|
|
457
|
+
}), _e = /* @__PURE__ */ a("div")({
|
|
458
|
+
name: "a",
|
|
459
|
+
class: "a12ibiz8",
|
|
460
|
+
propsAsIs: !1
|
|
461
|
+
}), Se = /* @__PURE__ */ a("div")({
|
|
462
|
+
name: "r",
|
|
463
|
+
class: "r1r4eua",
|
|
464
|
+
propsAsIs: !1
|
|
465
|
+
}), we = /* @__PURE__ */ a("div")({
|
|
466
|
+
name: "l",
|
|
467
|
+
class: "l1ymr3ce",
|
|
468
|
+
propsAsIs: !1
|
|
469
|
+
}), Ne = ({ image: e, name: n, userName: l, verified: t }) => /* @__PURE__ */ r(be, { children: [
|
|
470
|
+
/* @__PURE__ */ s(ke, { children: /* @__PURE__ */ s(xe, { src: e }) }),
|
|
471
|
+
/* @__PURE__ */ r(_e, { children: [
|
|
472
|
+
/* @__PURE__ */ r(Se, { children: [
|
|
473
|
+
n,
|
|
474
|
+
" ",
|
|
475
|
+
t && /* @__PURE__ */ s(m, { name: "icon-twitter-verified" })
|
|
476
|
+
] }),
|
|
477
|
+
/* @__PURE__ */ s(we, { children: l })
|
|
478
|
+
] })
|
|
479
|
+
] });
|
|
480
|
+
const Ce = /* @__PURE__ */ a("div")({
|
|
481
|
+
name: "t",
|
|
482
|
+
class: "tfx5umz",
|
|
483
|
+
propsAsIs: !1
|
|
484
|
+
}), Ee = /* @__PURE__ */ a("button")({
|
|
485
|
+
name: "e",
|
|
486
|
+
class: "e1a1fcxr",
|
|
487
|
+
propsAsIs: !1
|
|
488
|
+
}), Te = /* @__PURE__ */ a("div")({
|
|
489
|
+
name: "i",
|
|
490
|
+
class: "i1iknwgy",
|
|
491
|
+
propsAsIs: !1
|
|
492
|
+
}), je = /* @__PURE__ */ a("img")({
|
|
493
|
+
name: "n",
|
|
494
|
+
class: "n1uc9lmn",
|
|
495
|
+
propsAsIs: !1
|
|
496
|
+
}), Oe = /* @__PURE__ */ a("div")({
|
|
497
|
+
name: "a",
|
|
498
|
+
class: "ae4b7qd",
|
|
499
|
+
propsAsIs: !1
|
|
500
|
+
}), Le = /* @__PURE__ */ a("div")({
|
|
501
|
+
name: "l",
|
|
502
|
+
class: "l1udpjlr",
|
|
503
|
+
propsAsIs: !1
|
|
504
|
+
}), Re = /* @__PURE__ */ a("blockquote")({
|
|
505
|
+
name: "d",
|
|
506
|
+
class: "d7ui2j0",
|
|
507
|
+
propsAsIs: !1
|
|
508
|
+
}), ze = ({
|
|
509
|
+
account: e,
|
|
510
|
+
body: n,
|
|
511
|
+
image: l,
|
|
512
|
+
title: t,
|
|
513
|
+
action: i
|
|
514
|
+
}) => /* @__PURE__ */ r(Ce, { children: [
|
|
515
|
+
/* @__PURE__ */ s(Le, { children: /* @__PURE__ */ s(Re, { children: t }) }),
|
|
516
|
+
/* @__PURE__ */ r(Oe, { children: [
|
|
517
|
+
/* @__PURE__ */ s(Ne, { ...e }),
|
|
518
|
+
/* @__PURE__ */ s(Te, { children: n }),
|
|
519
|
+
l && /* @__PURE__ */ s(je, { src: l })
|
|
520
|
+
] }),
|
|
521
|
+
i && /* @__PURE__ */ s(Ee, { onClick: i, children: "View Tweet" })
|
|
522
|
+
] }), W = ({
|
|
523
|
+
close: e,
|
|
524
|
+
action: n,
|
|
525
|
+
data: { questionType: l, question: t, insight: i, tweet: c }
|
|
526
|
+
}) => {
|
|
527
|
+
const o = Ss[l];
|
|
528
|
+
return o ? t != null && t.predictionResult ? /* @__PURE__ */ s(pe, { close: e, ...t }) : /* @__PURE__ */ r(he, { children: [
|
|
529
|
+
/* @__PURE__ */ s(ve, { onClick: e, children: /* @__PURE__ */ s(fe, { name: "icon-cross" }) }),
|
|
530
|
+
l !== u.TWEET && /* @__PURE__ */ r(Ie, { children: [
|
|
531
|
+
/* @__PURE__ */ s(Ae, { name: o.iconName }),
|
|
532
|
+
/* @__PURE__ */ s($e, { children: o.label })
|
|
533
|
+
] }),
|
|
534
|
+
l === u.FACTOID && /* @__PURE__ */ s(Ps, { ...i, action: n }),
|
|
535
|
+
l === u.TWEET && // ToDo: connect with real Api data
|
|
536
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
537
|
+
// @ts-ignore
|
|
538
|
+
/* @__PURE__ */ s(ze, { ...c, action: n }),
|
|
539
|
+
l !== u.FACTOID && l !== u.TWEET && /* @__PURE__ */ r(_, { children: [
|
|
540
|
+
/* @__PURE__ */ s(ye, { children: t == null ? void 0 : t.title }),
|
|
541
|
+
/* @__PURE__ */ s(ge, { onClick: n, children: "Answer" })
|
|
542
|
+
] })
|
|
543
|
+
] }) : null;
|
|
544
|
+
};
|
|
545
|
+
const Pe = /* @__PURE__ */ a("div")({
|
|
546
|
+
name: "s",
|
|
547
|
+
class: "s1aopxp8",
|
|
548
|
+
propsAsIs: !1
|
|
549
|
+
}), Fe = "c1t0h6s", qe = ({
|
|
550
|
+
children: e,
|
|
551
|
+
style: n,
|
|
552
|
+
className: l,
|
|
553
|
+
hiding: t
|
|
554
|
+
}) => /* @__PURE__ */ s(Pe, {
|
|
555
|
+
style: n,
|
|
556
|
+
className: ts(l, t && Fe),
|
|
557
|
+
children: e
|
|
558
|
+
});
|
|
559
|
+
const De = () => qe, Y = /* @__PURE__ */ a(De())({
|
|
560
|
+
name: "d",
|
|
561
|
+
class: "d1qqtt3e",
|
|
562
|
+
propsAsIs: !0
|
|
563
|
+
}), Ge = ({ sdk: e }) => {
|
|
564
|
+
const n = e.getNotificationsStore(), l = I(n), t = Q(() => {
|
|
565
|
+
if (!(l != null && l.size))
|
|
566
|
+
return null;
|
|
567
|
+
for (const i of l.values())
|
|
568
|
+
if (i.type === C.ONBOARDING)
|
|
569
|
+
return i;
|
|
570
|
+
return l.values().next().value;
|
|
571
|
+
}, [l]);
|
|
572
|
+
return (t == null ? void 0 : t.type) === C.QUESTION ? /* @__PURE__ */ s(Y, { hiding: t.hiding, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(W, { ...t }) }) }) : (t == null ? void 0 : t.type) === C.QUESTION_RESOLVED ? /* @__PURE__ */ s(Y, { hiding: t.hiding, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(W, { ...t }) }) }) : null;
|
|
573
|
+
};
|
|
574
|
+
const Ue = () => We, Me = /* @__PURE__ */ a("div")({
|
|
575
|
+
name: "i",
|
|
576
|
+
class: "idhrx8x",
|
|
577
|
+
propsAsIs: !1
|
|
578
|
+
}), B = /* @__PURE__ */ a("div")({
|
|
579
|
+
name: "r",
|
|
580
|
+
class: "r1k6v4ep",
|
|
581
|
+
propsAsIs: !1
|
|
582
|
+
}), We = /* @__PURE__ */ a("div")({
|
|
583
|
+
name: "n",
|
|
584
|
+
class: "n1v8kucd",
|
|
585
|
+
propsAsIs: !1
|
|
586
|
+
}), na = /* @__PURE__ */ a(Ue())({
|
|
587
|
+
name: "e",
|
|
588
|
+
class: "e16yw7z1",
|
|
589
|
+
propsAsIs: !0
|
|
590
|
+
}), Ye = (e) => {
|
|
591
|
+
const [n, l] = b(!1), t = I(e.status), { data: i } = I(e.getUserStore()), c = t === "ready", [o, d] = b(v), f = ns(
|
|
592
|
+
(h, A) => {
|
|
593
|
+
d(A), A === v ? (h && e.createEventSession(h), e.openFeature(V.GAMES)) : e.closeFeature();
|
|
594
|
+
},
|
|
595
|
+
[e]
|
|
596
|
+
);
|
|
597
|
+
return T(() => {
|
|
598
|
+
!c && o === v && (d(S), e.closeFeature());
|
|
599
|
+
}, [c, o, e]), {
|
|
600
|
+
sdkEnabled: n,
|
|
601
|
+
sdkReady: c,
|
|
602
|
+
activeOverlay: o,
|
|
603
|
+
activateAndLoadOverlay: f,
|
|
604
|
+
enableSdk: (h) => {
|
|
605
|
+
e.initializeApp().then(({ enabled: A, err: K }) => {
|
|
606
|
+
if (l(!0), K) {
|
|
607
|
+
f(h, S);
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
if (A) {
|
|
611
|
+
f(h, v);
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
},
|
|
616
|
+
disableSdk: () => {
|
|
617
|
+
l(!1), e.disableApp();
|
|
618
|
+
},
|
|
619
|
+
isLogged: !!i
|
|
620
|
+
};
|
|
621
|
+
}, Be = (e) => {
|
|
622
|
+
const n = I(e.getActiveFeature()), l = I(e.streamStore()), [t, i] = b(null);
|
|
623
|
+
return T(() => {
|
|
624
|
+
const c = e.getFeatures();
|
|
625
|
+
if (n)
|
|
626
|
+
for (const [o, d] of c)
|
|
627
|
+
o === n ? d.status.get() === k.Suspended && (d.enable(), i(d)) : d.status.get() === k.Ready && d.disable();
|
|
628
|
+
else {
|
|
629
|
+
for (const [, o] of c)
|
|
630
|
+
o.status.get() === k.Ready && o.disable();
|
|
631
|
+
i(null);
|
|
632
|
+
}
|
|
633
|
+
return () => {
|
|
634
|
+
for (const [, o] of c)
|
|
635
|
+
o.status.get() === k.Ready && o.disable();
|
|
636
|
+
};
|
|
637
|
+
}, [n, e, l]), [n, t];
|
|
638
|
+
}, Qe = ({ sdk: e, className: n }) => {
|
|
639
|
+
const [, l] = Be(e);
|
|
640
|
+
return /* @__PURE__ */ s(is, { className: n, feature: l, sdk: e });
|
|
641
|
+
}, Ve = ({ sdk: e, overlays: n, children: l }) => {
|
|
642
|
+
const { sdkEnabled: t, sdkReady: i, activeOverlay: c, activateAndLoadOverlay: o, enableSdk: d, disableSdk: f, isLogged: h } = Ye(e);
|
|
643
|
+
return /* @__PURE__ */ r(Me, { children: [
|
|
644
|
+
t && /* @__PURE__ */ s(
|
|
645
|
+
_s,
|
|
646
|
+
{
|
|
647
|
+
sdkReady: i,
|
|
648
|
+
activeOverlay: c,
|
|
649
|
+
className: O,
|
|
650
|
+
setActiveOverlay: (A) => o("", A)
|
|
651
|
+
}
|
|
652
|
+
),
|
|
653
|
+
t && /* @__PURE__ */ s(Ge, { sdk: e }),
|
|
654
|
+
/* @__PURE__ */ s(
|
|
655
|
+
B,
|
|
656
|
+
{
|
|
657
|
+
"data-nav": t.toString(),
|
|
658
|
+
style: { display: !t || c === S ? "block" : "none" },
|
|
659
|
+
children: l && l({ enableSdk: d, disableSdk: f })
|
|
660
|
+
}
|
|
661
|
+
),
|
|
662
|
+
/* @__PURE__ */ s(
|
|
663
|
+
B,
|
|
664
|
+
{
|
|
665
|
+
"data-nav": t.toString(),
|
|
666
|
+
style: { display: c === N ? "block" : "none" },
|
|
667
|
+
children: n && c === N && n[c]
|
|
668
|
+
}
|
|
669
|
+
),
|
|
670
|
+
h && t && c === v && /* @__PURE__ */ s(Qe, { className: O, sdk: e }),
|
|
671
|
+
!h && t && c === v && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
|
|
672
|
+
] });
|
|
673
|
+
}, la = ({
|
|
674
|
+
sdkKey: e,
|
|
675
|
+
plugins: n,
|
|
676
|
+
children: l,
|
|
677
|
+
production: t = !0
|
|
678
|
+
}) => /* @__PURE__ */ s(H, { sdkKey: e, plugins: n, production: t, autoEnable: !1, children: l }), ta = ({ children: e, overlays: n }) => {
|
|
679
|
+
const { sdk: l, status: t } = ls(J);
|
|
680
|
+
if (t === X.UNSET)
|
|
681
|
+
throw new Error("Wrap app in `StreamLayerProvider`");
|
|
682
|
+
return l ? /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(Z, { style: { height: "100%" }, children: /* @__PURE__ */ s(Ve, { sdk: l, overlays: n, children: e }) }) }) : e({});
|
|
683
|
+
};
|
|
684
|
+
export {
|
|
685
|
+
la as M,
|
|
686
|
+
ta as a,
|
|
687
|
+
na as e,
|
|
688
|
+
qe as f,
|
|
689
|
+
We as n,
|
|
690
|
+
Ss as o,
|
|
691
|
+
B as r,
|
|
692
|
+
Ts as w
|
|
693
|
+
};
|