@streamlayer/react 0.34.2 → 0.34.3
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/gamification-feature.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +70 -69
- package/lib/dist/es/gamification-feature.js +291 -291
- package/lib/dist/es/masters.js +20447 -18634
- package/lib/dist/index.d.ts +10 -2
- package/lib/es/gamification-feature.js +33 -33
- package/package.json +8 -8
|
@@ -2,150 +2,150 @@ var Pe = Object.defineProperty;
|
|
|
2
2
|
var Ue = (e, t, s) => t in e ? Pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
3
|
var se = (e, t, s) => (Ue(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
4
|
import { jsxs as u, jsx as n, Fragment as b } from "react/jsx-runtime";
|
|
5
|
-
import { s as
|
|
5
|
+
import { s as r, c as k, Q as M, o as Ne, a as $, b as B, d as ie, E as P, r as qe, w as Ye, u as Ae, e as U, g as Ve, O as We, P as G, f as _e, h as X, n as Be, i as ue, x as Fe } from "./masters.js";
|
|
6
6
|
import V, { useRef as Q, useState as z, useCallback as W, useEffect as te, useLayoutEffect as He, useMemo as C, PureComponent as Ge, Component as Ze, useTransition as Je } from "react";
|
|
7
|
-
const Ke = /* @__PURE__ */
|
|
7
|
+
const Ke = /* @__PURE__ */ r("div")({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c1vwopgc",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}), Xe = /* @__PURE__ */
|
|
11
|
+
}), Xe = /* @__PURE__ */ r("div")({
|
|
12
12
|
name: "QuestionTypeWrap",
|
|
13
13
|
class: "qyktpt0",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}), et = () => k, tt = /* @__PURE__ */
|
|
15
|
+
}), et = () => k, tt = /* @__PURE__ */ r(et())({
|
|
16
16
|
name: "QuestionTypeIcon",
|
|
17
17
|
class: "q951jdx",
|
|
18
18
|
propsAsIs: !0
|
|
19
|
-
}), st = /* @__PURE__ */
|
|
19
|
+
}), st = /* @__PURE__ */ r("span")({
|
|
20
20
|
name: "QuestionTypeTitle",
|
|
21
21
|
class: "qss5f0e",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}), nt = /* @__PURE__ */
|
|
23
|
+
}), nt = /* @__PURE__ */ r("button")({
|
|
24
24
|
name: "CloseButton",
|
|
25
25
|
class: "c1ao1jtv",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}), it = () => k,
|
|
27
|
+
}), it = () => k, ot = /* @__PURE__ */ r(it())({
|
|
28
28
|
name: "CloseIcon",
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
31
31
|
}), ye = ({ type: e, close: t, label: s }) => {
|
|
32
|
-
const
|
|
32
|
+
const o = e ? Ne[e] : { label: s, iconName: void 0 };
|
|
33
33
|
return /* @__PURE__ */ u(Ke, { children: [
|
|
34
34
|
/* @__PURE__ */ u(Xe, { children: [
|
|
35
|
-
(
|
|
35
|
+
(o == null ? void 0 : o.iconName) && /* @__PURE__ */ n(
|
|
36
36
|
tt,
|
|
37
37
|
{
|
|
38
38
|
"data-type-trivia": e === M.TRIVIA,
|
|
39
39
|
"data-type-poll": e === M.POLL,
|
|
40
|
-
name:
|
|
40
|
+
name: o.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
(
|
|
43
|
+
(o == null ? void 0 : o.label) && /* @__PURE__ */ n(st, { children: o.label })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */ n(nt, { onClick: t, children: /* @__PURE__ */ n(
|
|
45
|
+
/* @__PURE__ */ n(nt, { onClick: t, children: /* @__PURE__ */ n(ot, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
|
-
}, De = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Le = (e) => e ? e.toLocaleString("en-US") : "0",
|
|
47
|
+
}, De = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Le = (e) => e ? e.toLocaleString("en-US") : "0", re = (e) => e.toLocaleDateString("en-US", {
|
|
48
48
|
weekday: "short",
|
|
49
49
|
month: "short",
|
|
50
50
|
day: "numeric"
|
|
51
51
|
}), ae = (e) => e.toLocaleTimeString("en-US", {
|
|
52
52
|
hour: "2-digit",
|
|
53
53
|
minute: "2-digit"
|
|
54
|
-
}), le = (e) => !isNaN(e.getTime()),
|
|
54
|
+
}), le = (e) => !isNaN(e.getTime()), rt = /* @__PURE__ */ r("div")({
|
|
55
55
|
name: "Container",
|
|
56
56
|
class: "c1zy8a",
|
|
57
57
|
propsAsIs: !1
|
|
58
|
-
}), at = /* @__PURE__ */
|
|
58
|
+
}), at = /* @__PURE__ */ r("div")({
|
|
59
59
|
name: "Title",
|
|
60
60
|
class: "t1vih9p5",
|
|
61
61
|
propsAsIs: !1
|
|
62
|
-
}), lt = /* @__PURE__ */
|
|
62
|
+
}), lt = /* @__PURE__ */ r("div")({
|
|
63
63
|
name: "Indicator",
|
|
64
64
|
class: "i1fbnvpb",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}), pe = ({ indicator: e, title: t }) => /* @__PURE__ */ u(
|
|
66
|
+
}), pe = ({ indicator: e, title: t }) => /* @__PURE__ */ u(rt, { children: [
|
|
67
67
|
/* @__PURE__ */ n(at, { children: t }),
|
|
68
68
|
/* @__PURE__ */ n(lt, { children: e })
|
|
69
|
-
] }), ct = /* @__PURE__ */
|
|
69
|
+
] }), ct = /* @__PURE__ */ r("div")({
|
|
70
70
|
name: "Container",
|
|
71
71
|
class: "ctmhwyc",
|
|
72
72
|
propsAsIs: !1
|
|
73
|
-
}), dt = /* @__PURE__ */
|
|
73
|
+
}), dt = /* @__PURE__ */ r("div")({
|
|
74
74
|
name: "Indicator",
|
|
75
75
|
class: "i1jri200",
|
|
76
76
|
propsAsIs: !1
|
|
77
|
-
}), ut = /* @__PURE__ */
|
|
77
|
+
}), ut = /* @__PURE__ */ r("div")({
|
|
78
78
|
name: "Title",
|
|
79
79
|
class: "t8s05oq",
|
|
80
80
|
propsAsIs: !1
|
|
81
81
|
}), Z = ({ indicator: e, title: t }) => /* @__PURE__ */ u(ct, { children: [
|
|
82
82
|
/* @__PURE__ */ n(dt, { children: e }),
|
|
83
83
|
/* @__PURE__ */ n(ut, { children: t })
|
|
84
|
-
] }), pt = /* @__PURE__ */
|
|
84
|
+
] }), pt = /* @__PURE__ */ r("div")({
|
|
85
85
|
name: "Container",
|
|
86
86
|
class: "c1yrpn9o",
|
|
87
87
|
propsAsIs: !1
|
|
88
|
-
}), ht = /* @__PURE__ */
|
|
88
|
+
}), ht = /* @__PURE__ */ r("div")({
|
|
89
89
|
name: "TopInfo",
|
|
90
90
|
class: "t17fwahh",
|
|
91
91
|
propsAsIs: !1
|
|
92
|
-
}), mt = /* @__PURE__ */
|
|
92
|
+
}), mt = /* @__PURE__ */ r("div")({
|
|
93
93
|
name: "BottomInfo",
|
|
94
94
|
class: "by6w7e9",
|
|
95
95
|
propsAsIs: !1
|
|
96
|
-
}), It = /* @__PURE__ */
|
|
96
|
+
}), It = /* @__PURE__ */ r("div")({
|
|
97
97
|
name: "User",
|
|
98
98
|
class: "u1g7arbm",
|
|
99
99
|
propsAsIs: !1
|
|
100
|
-
}), Mt = /* @__PURE__ */
|
|
100
|
+
}), Mt = /* @__PURE__ */ r("img")({
|
|
101
101
|
name: "Avatar",
|
|
102
102
|
class: "a1ldeata",
|
|
103
103
|
propsAsIs: !1
|
|
104
|
-
}), gt = /* @__PURE__ */
|
|
104
|
+
}), gt = /* @__PURE__ */ r("div")({
|
|
105
105
|
name: "UserInfo",
|
|
106
106
|
class: "u10d4koz",
|
|
107
107
|
propsAsIs: !1
|
|
108
|
-
}), vt = /* @__PURE__ */
|
|
108
|
+
}), vt = /* @__PURE__ */ r("div")({
|
|
109
109
|
name: "UserName",
|
|
110
110
|
class: "u1q6roj0",
|
|
111
111
|
propsAsIs: !1
|
|
112
|
-
}), ft = /* @__PURE__ */
|
|
112
|
+
}), ft = /* @__PURE__ */ r("div")({
|
|
113
113
|
name: "UserRating",
|
|
114
114
|
class: "ui0m425",
|
|
115
115
|
propsAsIs: !1
|
|
116
|
-
}), Tt = /* @__PURE__ */
|
|
116
|
+
}), Tt = /* @__PURE__ */ r("img")({
|
|
117
117
|
name: "TrophyIcon",
|
|
118
118
|
class: "t1el3mrn",
|
|
119
119
|
propsAsIs: !1
|
|
120
|
-
}), Nt = /* @__PURE__ */
|
|
120
|
+
}), Nt = /* @__PURE__ */ r("div")({
|
|
121
121
|
name: "Rts",
|
|
122
122
|
class: "r2vgnxv",
|
|
123
123
|
propsAsIs: !1
|
|
124
|
-
}), At = /* @__PURE__ */
|
|
124
|
+
}), At = /* @__PURE__ */ r("div")({
|
|
125
125
|
name: "RtsIndicator",
|
|
126
126
|
class: "roqn06j",
|
|
127
127
|
propsAsIs: !1
|
|
128
|
-
}), yt = /* @__PURE__ */
|
|
128
|
+
}), yt = /* @__PURE__ */ r("div")({
|
|
129
129
|
name: "RtsLabel",
|
|
130
130
|
class: "r15adx7c",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}), Dt = /* @__PURE__ */
|
|
132
|
+
}), Dt = /* @__PURE__ */ r("div")({
|
|
133
133
|
name: "Divider",
|
|
134
134
|
class: "dv59lta",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}), Lt = /* @__PURE__ */
|
|
136
|
+
}), Lt = /* @__PURE__ */ r("div")({
|
|
137
137
|
name: "Ranks",
|
|
138
138
|
class: "r55lotb",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}), kt = /* @__PURE__ */
|
|
140
|
+
}), kt = /* @__PURE__ */ r("div")({
|
|
141
141
|
name: "Statistics",
|
|
142
142
|
class: "s1knfgqt",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}), xt = /* @__PURE__ */
|
|
144
|
+
}), xt = /* @__PURE__ */ r("div")({
|
|
145
145
|
name: "AvatarPlaceholder",
|
|
146
146
|
class: "a1mqo824",
|
|
147
147
|
propsAsIs: !1
|
|
148
|
-
}), wt = /* @__PURE__ */
|
|
148
|
+
}), wt = /* @__PURE__ */ r("button")({
|
|
149
149
|
name: "UserAccountBtn",
|
|
150
150
|
class: "uxareh6",
|
|
151
151
|
propsAsIs: !1
|
|
@@ -153,8 +153,8 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
153
153
|
avatar: e,
|
|
154
154
|
name: t,
|
|
155
155
|
points: s,
|
|
156
|
-
friendsRank:
|
|
157
|
-
rank:
|
|
156
|
+
friendsRank: o,
|
|
157
|
+
rank: i,
|
|
158
158
|
streak: l,
|
|
159
159
|
correct: a,
|
|
160
160
|
incorrect: c,
|
|
@@ -187,8 +187,8 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
187
187
|
] }) }),
|
|
188
188
|
/* @__PURE__ */ u(mt, { children: [
|
|
189
189
|
/* @__PURE__ */ u(Lt, { children: [
|
|
190
|
-
/* @__PURE__ */ n(pe, { indicator:
|
|
191
|
-
/* @__PURE__ */ n(pe, { indicator:
|
|
190
|
+
/* @__PURE__ */ n(pe, { indicator: o || 0, title: "Friends rank" }),
|
|
191
|
+
/* @__PURE__ */ n(pe, { indicator: i || 0, title: "Global rank" })
|
|
192
192
|
] }),
|
|
193
193
|
/* @__PURE__ */ u(kt, { children: [
|
|
194
194
|
/* @__PURE__ */ n(Z, { indicator: l || 0, title: "Win streak" }),
|
|
@@ -197,11 +197,11 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
197
197
|
/* @__PURE__ */ n(Z, { indicator: `${h || 0}%`, title: "Succ. rate" })
|
|
198
198
|
] })
|
|
199
199
|
] })
|
|
200
|
-
] }), St = /* @__PURE__ */
|
|
200
|
+
] }), St = /* @__PURE__ */ r("div")({
|
|
201
201
|
name: "SponsorLogoWrap",
|
|
202
202
|
class: "s8p5v5z",
|
|
203
203
|
propsAsIs: !1
|
|
204
|
-
}), jt = () => k, Ct = /* @__PURE__ */
|
|
204
|
+
}), jt = () => k, Ct = /* @__PURE__ */ r(jt())({
|
|
205
205
|
name: "SponsorLogo",
|
|
206
206
|
class: "s755yti",
|
|
207
207
|
propsAsIs: !0
|
|
@@ -209,15 +209,15 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
209
209
|
children: /* @__PURE__ */ n(Ct, {
|
|
210
210
|
name: "mastersLogo"
|
|
211
211
|
})
|
|
212
|
-
}), zt = /* @__PURE__ */
|
|
212
|
+
}), zt = /* @__PURE__ */ r("div")({
|
|
213
213
|
name: "Container",
|
|
214
214
|
class: "c38csyt",
|
|
215
215
|
propsAsIs: !1
|
|
216
|
-
}), Ot = /* @__PURE__ */
|
|
216
|
+
}), Ot = /* @__PURE__ */ r("div")({
|
|
217
217
|
name: "Title",
|
|
218
218
|
class: "ty221rx",
|
|
219
219
|
propsAsIs: !1
|
|
220
|
-
}), $t = /* @__PURE__ */
|
|
220
|
+
}), $t = /* @__PURE__ */ r("div")({
|
|
221
221
|
name: "Description",
|
|
222
222
|
class: "dlaj9xp",
|
|
223
223
|
propsAsIs: !1
|
|
@@ -225,31 +225,31 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
225
225
|
/* @__PURE__ */ n(k, { name: "icon-check-circle" }),
|
|
226
226
|
/* @__PURE__ */ n(Ot, { children: e }),
|
|
227
227
|
/* @__PURE__ */ n($t, { children: t })
|
|
228
|
-
] }), Qt = /* @__PURE__ */
|
|
228
|
+
] }), Qt = /* @__PURE__ */ r("div")({
|
|
229
229
|
name: "Container",
|
|
230
230
|
class: "c16sbdnm",
|
|
231
231
|
propsAsIs: !1
|
|
232
|
-
}), Pt = () => k, Ut = /* @__PURE__ */
|
|
232
|
+
}), Pt = () => k, Ut = /* @__PURE__ */ r(Pt())({
|
|
233
233
|
name: "IconPrediction",
|
|
234
234
|
class: "ibhorgl",
|
|
235
235
|
propsAsIs: !0
|
|
236
|
-
}), F = /* @__PURE__ */
|
|
236
|
+
}), F = /* @__PURE__ */ r("div")({
|
|
237
237
|
name: "FeedbackIconWrap",
|
|
238
238
|
class: "f1g20ja7",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}), J = /* @__PURE__ */
|
|
240
|
+
}), J = /* @__PURE__ */ r("div")({
|
|
241
241
|
name: "FeedbackHeader",
|
|
242
242
|
class: "f455ozj",
|
|
243
243
|
propsAsIs: !1
|
|
244
|
-
}), qt = /* @__PURE__ */
|
|
244
|
+
}), qt = /* @__PURE__ */ r("span")({
|
|
245
245
|
name: "FeedbackTitle",
|
|
246
246
|
class: "f1913njx",
|
|
247
247
|
propsAsIs: !1
|
|
248
|
-
}), Y = /* @__PURE__ */
|
|
248
|
+
}), Y = /* @__PURE__ */ r("span")({
|
|
249
249
|
name: "FeedbackDescription",
|
|
250
250
|
class: "fzfk69z",
|
|
251
251
|
propsAsIs: !1
|
|
252
|
-
}), ne = /* @__PURE__ */
|
|
252
|
+
}), ne = /* @__PURE__ */ r("div")({
|
|
253
253
|
name: "FeedbackText",
|
|
254
254
|
class: "fx87qaj",
|
|
255
255
|
propsAsIs: !1
|
|
@@ -257,8 +257,8 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
257
257
|
feedbackMessages: e,
|
|
258
258
|
questionVotedCorrectly: t,
|
|
259
259
|
questionVoted: s,
|
|
260
|
-
questionType:
|
|
261
|
-
hasCorrectAnswer:
|
|
260
|
+
questionType: o,
|
|
261
|
+
hasCorrectAnswer: i,
|
|
262
262
|
questionStatus: l,
|
|
263
263
|
showExpiredNotification: a,
|
|
264
264
|
showClosedNotificationTrivia: c,
|
|
@@ -267,7 +267,7 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
267
267
|
enteredAnActiveQuestion: m,
|
|
268
268
|
marketClosed: p
|
|
269
269
|
}) => {
|
|
270
|
-
const I = s && (
|
|
270
|
+
const I = s && (o === M.TRIVIA || o === M.PREDICTION) && d && l !== $.RESOLVED, g = o === M.PREDICTION && !i, L = p && o === M.PREDICTION && !s && !m || o === M.PREDICTION && h && d && m, f = I && g, N = I && i, v = o === M.PREDICTION && s && d && i, y = s && o === M.POLL && d;
|
|
271
271
|
if (!a && !c && !f && !N && !L && !y && !v)
|
|
272
272
|
return null;
|
|
273
273
|
const A = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
@@ -309,71 +309,71 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
309
309
|
] }) })
|
|
310
310
|
] })
|
|
311
311
|
] });
|
|
312
|
-
}, Vt = /* @__PURE__ */
|
|
312
|
+
}, Vt = /* @__PURE__ */ r("div")({
|
|
313
313
|
name: "Container",
|
|
314
314
|
class: "c14ielyq",
|
|
315
315
|
propsAsIs: !1
|
|
316
|
-
}), Wt = /* @__PURE__ */
|
|
316
|
+
}), Wt = /* @__PURE__ */ r("div")({
|
|
317
317
|
name: "Content",
|
|
318
318
|
class: "c1tlqx57",
|
|
319
319
|
propsAsIs: !1
|
|
320
|
-
}), _t = /* @__PURE__ */
|
|
320
|
+
}), _t = /* @__PURE__ */ r("div")({
|
|
321
321
|
name: "Title",
|
|
322
322
|
class: "t1hq58md",
|
|
323
323
|
propsAsIs: !1
|
|
324
|
-
}), Bt = /* @__PURE__ */
|
|
324
|
+
}), Bt = /* @__PURE__ */ r("div")({
|
|
325
325
|
name: "Options",
|
|
326
326
|
class: "o1c8nxcx",
|
|
327
327
|
propsAsIs: !1
|
|
328
|
-
}), Ft = /* @__PURE__ */
|
|
328
|
+
}), Ft = /* @__PURE__ */ r("button")({
|
|
329
329
|
name: "ButtonContainer",
|
|
330
330
|
class: "b1b6dl8t",
|
|
331
331
|
propsAsIs: !1
|
|
332
|
-
}), Ht = /* @__PURE__ */
|
|
332
|
+
}), Ht = /* @__PURE__ */ r("div")({
|
|
333
333
|
name: "ButtonPct",
|
|
334
334
|
class: "b4iik8i",
|
|
335
335
|
propsAsIs: !1
|
|
336
|
-
}), Gt = /* @__PURE__ */
|
|
336
|
+
}), Gt = /* @__PURE__ */ r("span")({
|
|
337
337
|
name: "ButtonBody",
|
|
338
338
|
class: "b1gq1lnf",
|
|
339
339
|
propsAsIs: !1
|
|
340
|
-
}), Zt = /* @__PURE__ */
|
|
340
|
+
}), Zt = /* @__PURE__ */ r("div")({
|
|
341
341
|
name: "IconContainer",
|
|
342
342
|
class: "i1j65z51",
|
|
343
343
|
propsAsIs: !1
|
|
344
|
-
}), Jt = /* @__PURE__ */
|
|
344
|
+
}), Jt = /* @__PURE__ */ r("div")({
|
|
345
345
|
name: "IconWrap",
|
|
346
346
|
class: "i19tpfua",
|
|
347
347
|
propsAsIs: !1
|
|
348
|
-
}), xe = /* @__PURE__ */
|
|
348
|
+
}), xe = /* @__PURE__ */ r("img")({
|
|
349
349
|
name: "Icon",
|
|
350
350
|
class: "i1tubmma",
|
|
351
351
|
propsAsIs: !1
|
|
352
|
-
}), Kt = () => xe, Xt = /* @__PURE__ */
|
|
352
|
+
}), Kt = () => xe, Xt = /* @__PURE__ */ r(Kt())({
|
|
353
353
|
name: "IconDefault",
|
|
354
354
|
class: "i1grrgwj",
|
|
355
355
|
propsAsIs: !0
|
|
356
|
-
}), es = () => xe, ts = /* @__PURE__ */
|
|
356
|
+
}), es = () => xe, ts = /* @__PURE__ */ r(es())({
|
|
357
357
|
name: "IconCircle",
|
|
358
358
|
class: "ibemyq8",
|
|
359
359
|
propsAsIs: !0
|
|
360
|
-
}), ss = /* @__PURE__ */
|
|
360
|
+
}), ss = /* @__PURE__ */ r("span")({
|
|
361
361
|
name: "Title",
|
|
362
362
|
class: "t1dceht",
|
|
363
363
|
propsAsIs: !1
|
|
364
|
-
}), ns = /* @__PURE__ */
|
|
364
|
+
}), ns = /* @__PURE__ */ r("span")({
|
|
365
365
|
name: "Indicators",
|
|
366
366
|
class: "i116q4vq",
|
|
367
367
|
propsAsIs: !1
|
|
368
|
-
}), is = /* @__PURE__ */
|
|
368
|
+
}), is = /* @__PURE__ */ r("span")({
|
|
369
369
|
name: "Pts",
|
|
370
370
|
class: "p17ajcu2",
|
|
371
371
|
propsAsIs: !1
|
|
372
|
-
}),
|
|
372
|
+
}), os = /* @__PURE__ */ r("span")({
|
|
373
373
|
name: "Percentage",
|
|
374
374
|
class: "pu9kmlb",
|
|
375
375
|
propsAsIs: !1
|
|
376
|
-
}),
|
|
376
|
+
}), rs = () => k, as = /* @__PURE__ */ r(rs())({
|
|
377
377
|
name: "CheckIcon",
|
|
378
378
|
class: "c1j2j0s0",
|
|
379
379
|
propsAsIs: !0
|
|
@@ -383,29 +383,29 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
383
383
|
[B.ROUNDED]: (e) => /* @__PURE__ */ n(ts, { alt: "option-icon", src: e }),
|
|
384
384
|
[B.NONE]: () => null,
|
|
385
385
|
[B.UNSET]: () => null
|
|
386
|
-
}, ls = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted:
|
|
387
|
-
if (e === M.POLL &&
|
|
386
|
+
}, ls = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: o, questionVoted: i }) => {
|
|
387
|
+
if (e === M.POLL && o)
|
|
388
388
|
return "correct";
|
|
389
389
|
if (e === M.PREDICTION) {
|
|
390
|
-
if (t &&
|
|
391
|
-
return
|
|
392
|
-
if (
|
|
390
|
+
if (t && i)
|
|
391
|
+
return o ? s ? "correct" : "incorrect" : "unset";
|
|
392
|
+
if (o)
|
|
393
393
|
return "correct";
|
|
394
394
|
}
|
|
395
|
-
return e === M.TRIVIA &&
|
|
395
|
+
return e === M.TRIVIA && i && o ? s ? "correct" : "incorrect" : "unset";
|
|
396
396
|
}, cs = ({
|
|
397
397
|
questionType: e,
|
|
398
398
|
questionVoted: t,
|
|
399
399
|
correct: s,
|
|
400
|
-
hasCorrectAnswer:
|
|
401
|
-
questionStatus:
|
|
402
|
-
}) => e === M.TRIVIA ? t && s : e === M.PREDICTION ? t && s &&
|
|
400
|
+
hasCorrectAnswer: o,
|
|
401
|
+
questionStatus: i
|
|
402
|
+
}) => e === M.TRIVIA ? t && s : e === M.PREDICTION ? t && s && o || i === $.RESOLVED && s : !1, ds = (e) => {
|
|
403
403
|
var t;
|
|
404
404
|
const {
|
|
405
405
|
// option props
|
|
406
406
|
id: s,
|
|
407
|
-
icon:
|
|
408
|
-
text:
|
|
407
|
+
icon: o,
|
|
408
|
+
text: i,
|
|
409
409
|
percentageDecimal: l,
|
|
410
410
|
points: a,
|
|
411
411
|
// extra props
|
|
@@ -440,22 +440,22 @@ const Ke = /* @__PURE__ */ o("div")({
|
|
|
440
440
|
children: [
|
|
441
441
|
/* @__PURE__ */ n(Ht, { "data-answer-state": S, style: { width: `${H ? l : 0}%` } }),
|
|
442
442
|
/* @__PURE__ */ u(Gt, { children: [
|
|
443
|
-
|
|
444
|
-
/* @__PURE__ */ n(ss, { children:
|
|
443
|
+
o && p && ((t = he[p]) == null ? void 0 : t.call(he, o)),
|
|
444
|
+
/* @__PURE__ */ n(ss, { children: i }),
|
|
445
445
|
T && /* @__PURE__ */ u("div", { children: [
|
|
446
446
|
/* @__PURE__ */ n(ie, { value: a }),
|
|
447
447
|
/* @__PURE__ */ n(is, { children: "pts" })
|
|
448
448
|
] }),
|
|
449
449
|
H && /* @__PURE__ */ u(ns, { children: [
|
|
450
450
|
R && /* @__PURE__ */ n(as, { name: "selected" }),
|
|
451
|
-
/* @__PURE__ */ n(
|
|
451
|
+
/* @__PURE__ */ n(os, { children: /* @__PURE__ */ n(ie, { value: l, suffix: "%" }) })
|
|
452
452
|
] })
|
|
453
453
|
] })
|
|
454
454
|
]
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
};
|
|
458
|
-
var me = typeof window > "u" ? te : He, us = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval:
|
|
458
|
+
var me = typeof window > "u" ? te : He, us = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: o = 0, onComplete: i, onUpdate: l }) => {
|
|
459
459
|
let [a, c] = z(s), d = Q(0), h = Q(s), m = Q(s * -1e3), p = Q(null), I = Q(null), g = Q(null), L = (v) => {
|
|
460
460
|
let y = v / 1e3;
|
|
461
461
|
if (I.current === null) {
|
|
@@ -464,7 +464,7 @@ var me = typeof window > "u" ? te : He, us = ({ isPlaying: e, duration: t, start
|
|
|
464
464
|
}
|
|
465
465
|
let A = y - I.current, D = d.current + A;
|
|
466
466
|
I.current = y, d.current = D;
|
|
467
|
-
let S = h.current + (
|
|
467
|
+
let S = h.current + (o === 0 ? D : (D / o | 0) * o), R = h.current + D, O = typeof t == "number" && R >= t;
|
|
468
468
|
c(O ? t : S), O || (p.current = requestAnimationFrame(L));
|
|
469
469
|
}, f = () => {
|
|
470
470
|
p.current && cancelAnimationFrame(p.current), g.current && clearTimeout(g.current), I.current = null;
|
|
@@ -476,35 +476,35 @@ var me = typeof window > "u" ? te : He, us = ({ isPlaying: e, duration: t, start
|
|
|
476
476
|
return me(() => {
|
|
477
477
|
if (l == null || l(a), t && a >= t) {
|
|
478
478
|
m.current += t * 1e3;
|
|
479
|
-
let { shouldRepeat: v = !1, delay: y = 0, newStartAt: A } = (
|
|
479
|
+
let { shouldRepeat: v = !1, delay: y = 0, newStartAt: A } = (i == null ? void 0 : i(m.current / 1e3)) || {};
|
|
480
480
|
v && (g.current = setTimeout(() => N(A), y * 1e3));
|
|
481
481
|
}
|
|
482
|
-
}, [a, t]), me(() => (e && (p.current = requestAnimationFrame(L)), f), [e, t,
|
|
482
|
+
}, [a, t]), me(() => (e && (p.current = requestAnimationFrame(L)), f), [e, t, o]), { elapsedTime: a, reset: N };
|
|
483
483
|
}, ps = (e, t, s) => {
|
|
484
|
-
let
|
|
485
|
-
return { path: `m ${
|
|
486
|
-
}, Ie = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, hs = (e) => ({ position: "relative", width: e, height: e }), ms = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, we = (e, t, s,
|
|
487
|
-
if (
|
|
484
|
+
let o = e / 2, i = t / 2, l = o - i, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
|
|
485
|
+
return { path: `m ${o},${i} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
|
|
486
|
+
}, Ie = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, hs = (e) => ({ position: "relative", width: e, height: e }), ms = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, we = (e, t, s, o, i) => {
|
|
487
|
+
if (o === 0)
|
|
488
488
|
return t;
|
|
489
|
-
let l = (
|
|
489
|
+
let l = (i ? o - e : e) / o;
|
|
490
490
|
return t + s * l;
|
|
491
491
|
}, Me = (e) => {
|
|
492
492
|
var t, s;
|
|
493
|
-
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (
|
|
493
|
+
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (o, i, l, a) => `#${i}${i}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((o) => parseInt(o, 16))) != null ? s : [];
|
|
494
494
|
}, Is = (e, t) => {
|
|
495
495
|
var s;
|
|
496
|
-
let { colors:
|
|
497
|
-
if (typeof
|
|
498
|
-
return
|
|
499
|
-
let a = (s =
|
|
500
|
-
if (!
|
|
501
|
-
return
|
|
496
|
+
let { colors: o, colorsTime: i, isSmoothColorTransition: l = !0 } = e;
|
|
497
|
+
if (typeof o == "string")
|
|
498
|
+
return o;
|
|
499
|
+
let a = (s = i == null ? void 0 : i.findIndex((I, g) => I >= t && t >= i[g + 1])) != null ? s : -1;
|
|
500
|
+
if (!i || a === -1)
|
|
501
|
+
return o[0];
|
|
502
502
|
if (!l)
|
|
503
|
-
return
|
|
504
|
-
let c =
|
|
503
|
+
return o[a];
|
|
504
|
+
let c = i[a] - t, d = i[a] - i[a + 1], h = Me(o[a]), m = Me(o[a + 1]), p = !!e.isGrowing;
|
|
505
505
|
return `rgb(${h.map((I, g) => we(c, I, m[g] - I, d, p) | 0).join(",")})`;
|
|
506
506
|
}, Ms = (e) => {
|
|
507
|
-
let { duration: t, initialRemainingTime: s, updateInterval:
|
|
507
|
+
let { duration: t, initialRemainingTime: s, updateInterval: o, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: h = "clockwise", onComplete: m, onUpdate: p } = e, I = Q(), g = Math.max(l, a ?? 0), { path: L, pathLength: f } = ps(i, g, h), { elapsedTime: N } = us({ isPlaying: c, duration: t, startAt: Ie(t, s), updateInterval: o, onUpdate: typeof p == "function" ? (y) => {
|
|
508
508
|
let A = Math.ceil(t - y);
|
|
509
509
|
A !== I.current && (I.current = A, p(A));
|
|
510
510
|
} : void 0, onComplete: typeof m == "function" ? (y) => {
|
|
@@ -513,13 +513,13 @@ var me = typeof window > "u" ? te : He, us = ({ isPlaying: e, duration: t, start
|
|
|
513
513
|
if (D)
|
|
514
514
|
return { shouldRepeat: D, delay: S, newStartAt: Ie(t, R) };
|
|
515
515
|
} : void 0 }), v = t - N;
|
|
516
|
-
return { elapsedTime: N, path: L, pathLength: f, remainingTime: Math.ceil(v), rotation: h, size:
|
|
516
|
+
return { elapsedTime: N, path: L, pathLength: f, remainingTime: Math.ceil(v), rotation: h, size: i, stroke: Is(e, v), strokeDashoffset: we(N, 0, f, t, d), strokeWidth: l };
|
|
517
517
|
}, Ee = (e) => {
|
|
518
|
-
let { children: t, strokeLinecap: s, trailColor:
|
|
519
|
-
return V.createElement("div", { style: hs(p) }, V.createElement("svg", { viewBox: `0 0 ${p} ${p}`, width: p, height: p, xmlns: "http://www.w3.org/2000/svg" }, V.createElement("path", { d: l, fill: "none", stroke:
|
|
518
|
+
let { children: t, strokeLinecap: s, trailColor: o, trailStrokeWidth: i } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: h, elapsedTime: m, size: p, strokeWidth: I } = Ms(e);
|
|
519
|
+
return V.createElement("div", { style: hs(p) }, V.createElement("svg", { viewBox: `0 0 ${p} ${p}`, width: p, height: p, xmlns: "http://www.w3.org/2000/svg" }, V.createElement("path", { d: l, fill: "none", stroke: o ?? "#d9d9d9", strokeWidth: i ?? I }), V.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: I, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && V.createElement("div", { style: ms }, t({ remainingTime: h, elapsedTime: m, color: c })));
|
|
520
520
|
};
|
|
521
521
|
Ee.displayName = "CountdownCircleTimer";
|
|
522
|
-
const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], vs = [10, 10, 1, 0], fs = /* @__PURE__ */
|
|
522
|
+
const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], vs = [10, 10, 1, 0], fs = /* @__PURE__ */ r("div")({
|
|
523
523
|
name: "RemainingTime",
|
|
524
524
|
class: "r165427",
|
|
525
525
|
propsAsIs: !1
|
|
@@ -528,15 +528,15 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
528
528
|
duration: t = 30,
|
|
529
529
|
onTimerExpired: s
|
|
530
530
|
}) => {
|
|
531
|
-
const [
|
|
531
|
+
const [o, i] = z(t > 10 ? Ts : ge), l = ({
|
|
532
532
|
remainingTime: d
|
|
533
533
|
}) => /* @__PURE__ */ n(fs, {
|
|
534
534
|
children: d
|
|
535
535
|
}), a = W(() => {
|
|
536
|
-
s == null || s(),
|
|
537
|
-
}, [s,
|
|
538
|
-
d === 10 &&
|
|
539
|
-
}, [
|
|
536
|
+
s == null || s(), i(Ns);
|
|
537
|
+
}, [s, i]), c = W((d) => {
|
|
538
|
+
d === 10 && i(ge);
|
|
539
|
+
}, [i]);
|
|
540
540
|
return /* @__PURE__ */ n(Ee, {
|
|
541
541
|
isPlaying: e,
|
|
542
542
|
duration: t,
|
|
@@ -545,36 +545,36 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
545
545
|
size: 32,
|
|
546
546
|
strokeWidth: 2,
|
|
547
547
|
trailStrokeWidth: 2,
|
|
548
|
-
trailColor:
|
|
548
|
+
trailColor: o,
|
|
549
549
|
onComplete: a,
|
|
550
550
|
onUpdate: c,
|
|
551
551
|
children: l
|
|
552
552
|
});
|
|
553
|
-
}, ys = /* @__PURE__ */
|
|
553
|
+
}, ys = /* @__PURE__ */ r("div")({
|
|
554
554
|
name: "WinBarContainer",
|
|
555
555
|
class: "wie6cqo",
|
|
556
556
|
propsAsIs: !1
|
|
557
|
-
}), Ds = /* @__PURE__ */
|
|
557
|
+
}), Ds = /* @__PURE__ */ r("div")({
|
|
558
558
|
name: "Content",
|
|
559
559
|
class: "cgizw4u",
|
|
560
560
|
propsAsIs: !1
|
|
561
|
-
}), Ls = /* @__PURE__ */
|
|
561
|
+
}), Ls = /* @__PURE__ */ r("div")({
|
|
562
562
|
name: "Title",
|
|
563
563
|
class: "t1l3ucjp",
|
|
564
564
|
propsAsIs: !1
|
|
565
|
-
}), ks = () => k, xs = /* @__PURE__ */
|
|
565
|
+
}), ks = () => k, xs = /* @__PURE__ */ r(ks())({
|
|
566
566
|
name: "WinIcon",
|
|
567
567
|
class: "wx7j799",
|
|
568
568
|
propsAsIs: !0
|
|
569
|
-
}), ws = /* @__PURE__ */
|
|
569
|
+
}), ws = /* @__PURE__ */ r("div")({
|
|
570
570
|
name: "Points",
|
|
571
571
|
class: "p4lwuj0",
|
|
572
572
|
propsAsIs: !1
|
|
573
|
-
}), Es = /* @__PURE__ */
|
|
573
|
+
}), Es = /* @__PURE__ */ r("span")({
|
|
574
574
|
name: "PointsCount",
|
|
575
575
|
class: "po9i64o",
|
|
576
576
|
propsAsIs: !1
|
|
577
|
-
}), Ss = /* @__PURE__ */
|
|
577
|
+
}), Ss = /* @__PURE__ */ r("span")({
|
|
578
578
|
name: "PointsUnits",
|
|
579
579
|
class: "pe5g05h",
|
|
580
580
|
propsAsIs: !1
|
|
@@ -582,14 +582,14 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
582
582
|
title: e,
|
|
583
583
|
points: t,
|
|
584
584
|
isPlayingTimer: s,
|
|
585
|
-
isTimer:
|
|
586
|
-
questionType:
|
|
585
|
+
isTimer: o,
|
|
586
|
+
questionType: i,
|
|
587
587
|
timerDuration: l,
|
|
588
588
|
onTimerExpired: a
|
|
589
|
-
}) => /* @__PURE__ */ u(ys, { style: { justifyContent:
|
|
589
|
+
}) => /* @__PURE__ */ u(ys, { style: { justifyContent: i === M.PREDICTION ? "center" : "space-between" }, children: [
|
|
590
590
|
/* @__PURE__ */ u(Ds, { children: [
|
|
591
591
|
e && /* @__PURE__ */ n(Ls, { children: e }),
|
|
592
|
-
t !== void 0 &&
|
|
592
|
+
t !== void 0 && i !== M.POLL && /* @__PURE__ */ u(b, { children: [
|
|
593
593
|
/* @__PURE__ */ n(xs, { name: "icon-trophy" }),
|
|
594
594
|
/* @__PURE__ */ u(ws, { children: [
|
|
595
595
|
/* @__PURE__ */ n(Es, { children: /* @__PURE__ */ n(ie, { value: t }) }),
|
|
@@ -597,10 +597,10 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
597
597
|
] })
|
|
598
598
|
] })
|
|
599
599
|
] }),
|
|
600
|
-
|
|
601
|
-
] }), Cs = ({ openedQuestion: e, isLoading: t, vote: s, close:
|
|
602
|
-
var
|
|
603
|
-
const a = e.subject, c = e.type, d = e.status, h = (
|
|
600
|
+
o && i !== M.PREDICTION && /* @__PURE__ */ n(As, { isPlaying: s, onTimerExpired: a, duration: l })
|
|
601
|
+
] }), Cs = ({ openedQuestion: e, isLoading: t, vote: s, close: o }) => {
|
|
602
|
+
var i, l;
|
|
603
|
+
const a = e.subject, c = e.type, d = e.status, h = (i = e.options) == null ? void 0 : i.options, m = e.marketClosed, [p, I] = z(!1), [g, L] = z(!1), [f, N] = z(!0), [v, y] = z(!1), [A, D] = z(""), S = e == null ? void 0 : e.id;
|
|
604
604
|
te(() => {
|
|
605
605
|
c === M.PREDICTION ? m && N(!1) : d === $.RESOLVED && N(!1);
|
|
606
606
|
}, []);
|
|
@@ -615,8 +615,8 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
615
615
|
},
|
|
616
616
|
[S, D, s]
|
|
617
617
|
), H = W(() => {
|
|
618
|
-
y(!0), setTimeout(
|
|
619
|
-
}, [
|
|
618
|
+
y(!0), setTimeout(o, 3e3);
|
|
619
|
+
}, [o]), T = C(
|
|
620
620
|
() => e == null ? void 0 : e.answers.find((x) => x.youVoted === !0),
|
|
621
621
|
[e]
|
|
622
622
|
), w = C(
|
|
@@ -713,27 +713,27 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
713
713
|
)) })
|
|
714
714
|
] })
|
|
715
715
|
] }) }) });
|
|
716
|
-
}, bs = /* @__PURE__ */
|
|
716
|
+
}, bs = /* @__PURE__ */ r("div")({
|
|
717
717
|
name: "Container",
|
|
718
718
|
class: "cgn5uen",
|
|
719
719
|
propsAsIs: !1
|
|
720
|
-
}), zs = /* @__PURE__ */
|
|
720
|
+
}), zs = /* @__PURE__ */ r("div")({
|
|
721
721
|
name: "Content",
|
|
722
722
|
class: "c1px8nt6",
|
|
723
723
|
propsAsIs: !1
|
|
724
|
-
}), Os = /* @__PURE__ */
|
|
724
|
+
}), Os = /* @__PURE__ */ r("h3")({
|
|
725
725
|
name: "Title",
|
|
726
726
|
class: "t5et2jt",
|
|
727
727
|
propsAsIs: !1
|
|
728
|
-
}), $s = /* @__PURE__ */
|
|
728
|
+
}), $s = /* @__PURE__ */ r("div")({
|
|
729
729
|
name: "Description",
|
|
730
730
|
class: "d1i2kpk2",
|
|
731
731
|
propsAsIs: !1
|
|
732
|
-
}), Rs = /* @__PURE__ */
|
|
732
|
+
}), Rs = /* @__PURE__ */ r("div")({
|
|
733
733
|
name: "DateWrap",
|
|
734
734
|
class: "dd3lh3p",
|
|
735
735
|
propsAsIs: !1
|
|
736
|
-
}), Qs = /* @__PURE__ */
|
|
736
|
+
}), Qs = /* @__PURE__ */ r("img")({
|
|
737
737
|
name: "Image",
|
|
738
738
|
class: "i1gfjeu5",
|
|
739
739
|
propsAsIs: !1
|
|
@@ -741,8 +741,8 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
741
741
|
created: e,
|
|
742
742
|
image: t,
|
|
743
743
|
title: s,
|
|
744
|
-
isPickHistory:
|
|
745
|
-
instantView:
|
|
744
|
+
isPickHistory: o,
|
|
745
|
+
instantView: i,
|
|
746
746
|
notification: l
|
|
747
747
|
}) => {
|
|
748
748
|
const a = C(() => {
|
|
@@ -750,30 +750,30 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
750
750
|
const d = new Date(e);
|
|
751
751
|
if (le(d))
|
|
752
752
|
return {
|
|
753
|
-
date:
|
|
753
|
+
date: re(d),
|
|
754
754
|
time: ae(d)
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
757
|
return null;
|
|
758
|
-
}, [e]), c = (
|
|
758
|
+
}, [e]), c = (i == null ? void 0 : i.image) || t;
|
|
759
759
|
return /* @__PURE__ */ u(bs, { children: [
|
|
760
760
|
a && /* @__PURE__ */ u(Rs, { children: [
|
|
761
761
|
a.date,
|
|
762
762
|
" · ",
|
|
763
763
|
a.time
|
|
764
764
|
] }),
|
|
765
|
-
(
|
|
766
|
-
c && !(
|
|
765
|
+
(i == null ? void 0 : i.video) && /* @__PURE__ */ n(Ye, { source: i.video.url, poster: i.video.thumbnailUrl }),
|
|
766
|
+
c && !(i != null && i.video) && /* @__PURE__ */ n(Qs, { src: c }),
|
|
767
767
|
/* @__PURE__ */ u(zs, { children: [
|
|
768
|
-
/* @__PURE__ */ n(Os, { children:
|
|
769
|
-
/* @__PURE__ */ n($s, { children:
|
|
768
|
+
/* @__PURE__ */ n(Os, { children: o ? s : i == null ? void 0 : i.heading }),
|
|
769
|
+
/* @__PURE__ */ n($s, { children: o ? l == null ? void 0 : l.body : i == null ? void 0 : i.body })
|
|
770
770
|
] })
|
|
771
771
|
] });
|
|
772
|
-
}, Ps = /* @__PURE__ */
|
|
772
|
+
}, Ps = /* @__PURE__ */ r("div")({
|
|
773
773
|
name: "Container",
|
|
774
774
|
class: "c1euiow",
|
|
775
775
|
propsAsIs: !1
|
|
776
|
-
}), Us = /* @__PURE__ */
|
|
776
|
+
}), Us = /* @__PURE__ */ r("a")({
|
|
777
777
|
name: "WebLinkBtn",
|
|
778
778
|
class: "w19zie3h",
|
|
779
779
|
propsAsIs: !1
|
|
@@ -783,26 +783,26 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
783
783
|
e == null ? void 0 : e.webLink.label,
|
|
784
784
|
/* @__PURE__ */ n(k, { name: "icon-external-link" })
|
|
785
785
|
] })
|
|
786
|
-
] }), Ys = /* @__PURE__ */
|
|
786
|
+
] }), Ys = /* @__PURE__ */ r("div")({
|
|
787
787
|
name: "Container",
|
|
788
788
|
class: "c1dcxmvf",
|
|
789
789
|
propsAsIs: !1
|
|
790
|
-
}), Vs = /* @__PURE__ */
|
|
790
|
+
}), Vs = /* @__PURE__ */ r("div")({
|
|
791
791
|
name: "DateTime",
|
|
792
792
|
class: "db4q22c",
|
|
793
793
|
propsAsIs: !1
|
|
794
|
-
}), Ws = /* @__PURE__ */
|
|
794
|
+
}), Ws = /* @__PURE__ */ r("blockquote")({
|
|
795
795
|
name: "Quote",
|
|
796
796
|
class: "q111mmic",
|
|
797
797
|
propsAsIs: !1
|
|
798
798
|
}), _s = ({ created: e, ...t }) => {
|
|
799
799
|
const s = C(() => {
|
|
800
800
|
if (e) {
|
|
801
|
-
const
|
|
802
|
-
if (le(
|
|
801
|
+
const o = new Date(e);
|
|
802
|
+
if (le(o))
|
|
803
803
|
return {
|
|
804
|
-
date:
|
|
805
|
-
time: ae(
|
|
804
|
+
date: re(o),
|
|
805
|
+
time: ae(o)
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
808
|
return null;
|
|
@@ -816,7 +816,7 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
816
816
|
t.title && /* @__PURE__ */ n(Ws, { children: t.title }),
|
|
817
817
|
/* @__PURE__ */ n(Ae, { ...t })
|
|
818
818
|
] });
|
|
819
|
-
}, Bs = /* @__PURE__ */
|
|
819
|
+
}, Bs = /* @__PURE__ */ r("div")({
|
|
820
820
|
name: "QuestionContainer",
|
|
821
821
|
class: "qdri6g3",
|
|
822
822
|
propsAsIs: !1
|
|
@@ -837,50 +837,50 @@ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRA
|
|
|
837
837
|
close: s
|
|
838
838
|
}) => {
|
|
839
839
|
const {
|
|
840
|
-
loading:
|
|
841
|
-
data:
|
|
840
|
+
loading: o,
|
|
841
|
+
data: i
|
|
842
842
|
} = e;
|
|
843
|
-
return
|
|
843
|
+
return i ? /* @__PURE__ */ n(Cs, {
|
|
844
844
|
vote: t,
|
|
845
845
|
close: s,
|
|
846
|
-
openedQuestion:
|
|
847
|
-
isLoading: !!
|
|
846
|
+
openedQuestion: i,
|
|
847
|
+
isLoading: !!o
|
|
848
848
|
}) : null;
|
|
849
849
|
}, Gs = ({
|
|
850
850
|
gamification: e
|
|
851
851
|
}) => {
|
|
852
852
|
var t;
|
|
853
|
-
const s = U(e.openedQuestion.$store),
|
|
853
|
+
const s = U(e.openedQuestion.$store), o = U(e.openedQuestion.$extendedStore);
|
|
854
854
|
if (!s)
|
|
855
855
|
return null;
|
|
856
|
-
const
|
|
856
|
+
const i = s.type;
|
|
857
857
|
return /* @__PURE__ */ u(Bs, {
|
|
858
858
|
children: [/* @__PURE__ */ n(ye, {
|
|
859
859
|
close: e.closeQuestion,
|
|
860
860
|
type: ((t = s.attributes) == null ? void 0 : t.type) || M.UNSET
|
|
861
|
-
}),
|
|
861
|
+
}), i === "question" && /* @__PURE__ */ n(Hs, {
|
|
862
862
|
vote: e.submitAnswer,
|
|
863
863
|
close: e.closeQuestion,
|
|
864
|
-
extendedQuestion:
|
|
865
|
-
}),
|
|
864
|
+
extendedQuestion: o
|
|
865
|
+
}), i !== "question" && /* @__PURE__ */ n(Fs, {
|
|
866
866
|
openedQuestion: s
|
|
867
867
|
}), /* @__PURE__ */ n(bt, {
|
|
868
868
|
sponsorLogo: ""
|
|
869
869
|
})]
|
|
870
870
|
});
|
|
871
|
-
}, Zs = /* @__PURE__ */
|
|
871
|
+
}, Zs = /* @__PURE__ */ r("div")({
|
|
872
872
|
name: "Container",
|
|
873
873
|
class: "c115qtkr",
|
|
874
874
|
propsAsIs: !1
|
|
875
|
-
}), Js = /* @__PURE__ */
|
|
875
|
+
}), Js = /* @__PURE__ */ r("div")({
|
|
876
876
|
name: "STabs",
|
|
877
877
|
class: "sxnslc8",
|
|
878
878
|
propsAsIs: !1
|
|
879
|
-
}), Ks = /* @__PURE__ */
|
|
879
|
+
}), Ks = /* @__PURE__ */ r("button")({
|
|
880
880
|
name: "Button",
|
|
881
881
|
class: "b1umzux0",
|
|
882
882
|
propsAsIs: !1
|
|
883
|
-
}), Xs = /* @__PURE__ */
|
|
883
|
+
}), Xs = /* @__PURE__ */ r("span")({
|
|
884
884
|
name: "Title",
|
|
885
885
|
class: "tspsaas",
|
|
886
886
|
propsAsIs: !1
|
|
@@ -904,21 +904,21 @@ const ve = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(Ks, { onCl
|
|
|
904
904
|
)
|
|
905
905
|
] }) });
|
|
906
906
|
function tn(e) {
|
|
907
|
-
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex,
|
|
908
|
-
return !(
|
|
907
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, o = e.startIndex, i = e.stopIndex;
|
|
908
|
+
return !(o > s || i < t);
|
|
909
909
|
}
|
|
910
910
|
function sn(e) {
|
|
911
|
-
for (var t = e.isItemLoaded, s = e.itemCount,
|
|
911
|
+
for (var t = e.isItemLoaded, s = e.itemCount, o = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, h = i; h <= l; h++) {
|
|
912
912
|
var m = t(h);
|
|
913
913
|
m ? d !== null && (a.push(c, d), c = d = null) : (d = h, c === null && (c = h));
|
|
914
914
|
}
|
|
915
915
|
if (d !== null) {
|
|
916
|
-
for (var p = Math.min(Math.max(d, c +
|
|
916
|
+
for (var p = Math.min(Math.max(d, c + o - 1), s - 1), I = d + 1; I <= p && !t(I); I++)
|
|
917
917
|
d = I;
|
|
918
918
|
a.push(c, d);
|
|
919
919
|
}
|
|
920
920
|
if (a.length)
|
|
921
|
-
for (; a[1] - a[0] + 1 <
|
|
921
|
+
for (; a[1] - a[0] + 1 < o && a[0] > 0; ) {
|
|
922
922
|
var g = a[0] - 1;
|
|
923
923
|
if (!t(g))
|
|
924
924
|
a[0] = g;
|
|
@@ -930,17 +930,17 @@ function sn(e) {
|
|
|
930
930
|
var nn = function(e, t) {
|
|
931
931
|
if (!(e instanceof t))
|
|
932
932
|
throw new TypeError("Cannot call a class as a function");
|
|
933
|
-
},
|
|
933
|
+
}, on = function() {
|
|
934
934
|
function e(t, s) {
|
|
935
|
-
for (var
|
|
936
|
-
var
|
|
937
|
-
|
|
935
|
+
for (var o = 0; o < s.length; o++) {
|
|
936
|
+
var i = s[o];
|
|
937
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
-
return function(t, s,
|
|
941
|
-
return s && e(t.prototype, s),
|
|
940
|
+
return function(t, s, o) {
|
|
941
|
+
return s && e(t.prototype, s), o && e(t, o), t;
|
|
942
942
|
};
|
|
943
|
-
}(),
|
|
943
|
+
}(), rn = function(e, t) {
|
|
944
944
|
if (typeof t != "function" && t !== null)
|
|
945
945
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
946
946
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -957,24 +957,24 @@ var nn = function(e, t) {
|
|
|
957
957
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
958
958
|
};
|
|
959
959
|
(function(e) {
|
|
960
|
-
|
|
960
|
+
rn(t, e);
|
|
961
961
|
function t() {
|
|
962
|
-
var s,
|
|
962
|
+
var s, o, i, l;
|
|
963
963
|
nn(this, t);
|
|
964
964
|
for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
|
|
965
965
|
c[d] = arguments[d];
|
|
966
|
-
return l = (
|
|
966
|
+
return l = (o = (i = fe(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(h) {
|
|
967
967
|
var m = h.visibleStartIndex, p = h.visibleStopIndex;
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
|
|
971
|
-
},
|
|
968
|
+
i._lastRenderedStartIndex = m, i._lastRenderedStopIndex = p, i._ensureRowsLoaded(m, p);
|
|
969
|
+
}, i._setRef = function(h) {
|
|
970
|
+
i._listRef = h;
|
|
971
|
+
}, o), fe(i, l);
|
|
972
972
|
}
|
|
973
|
-
return
|
|
973
|
+
return on(t, [{
|
|
974
974
|
key: "resetloadMoreItemsCache",
|
|
975
975
|
value: function() {
|
|
976
|
-
var
|
|
977
|
-
this._memoizedUnloadedRanges = [],
|
|
976
|
+
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
977
|
+
this._memoizedUnloadedRanges = [], o && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
|
|
978
978
|
}
|
|
979
979
|
}, {
|
|
980
980
|
key: "componentDidMount",
|
|
@@ -983,21 +983,21 @@ var nn = function(e, t) {
|
|
|
983
983
|
}, {
|
|
984
984
|
key: "render",
|
|
985
985
|
value: function() {
|
|
986
|
-
var
|
|
987
|
-
return
|
|
986
|
+
var o = this.props.children;
|
|
987
|
+
return o({
|
|
988
988
|
onItemsRendered: this._onItemsRendered,
|
|
989
989
|
ref: this._setRef
|
|
990
990
|
});
|
|
991
991
|
}
|
|
992
992
|
}, {
|
|
993
993
|
key: "_ensureRowsLoaded",
|
|
994
|
-
value: function(
|
|
994
|
+
value: function(o, i) {
|
|
995
995
|
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, h = d === void 0 ? 10 : d, m = l.threshold, p = m === void 0 ? 15 : m, I = sn({
|
|
996
996
|
isItemLoaded: a,
|
|
997
997
|
itemCount: c,
|
|
998
998
|
minimumBatchSize: h,
|
|
999
|
-
startIndex: Math.max(0,
|
|
1000
|
-
stopIndex: Math.min(c - 1,
|
|
999
|
+
startIndex: Math.max(0, o - p),
|
|
1000
|
+
stopIndex: Math.min(c - 1, i + p)
|
|
1001
1001
|
});
|
|
1002
1002
|
(this._memoizedUnloadedRanges.length !== I.length || this._memoizedUnloadedRanges.some(function(g, L) {
|
|
1003
1003
|
return I[L] !== g;
|
|
@@ -1005,55 +1005,55 @@ var nn = function(e, t) {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
}, {
|
|
1007
1007
|
key: "_loadUnloadedRanges",
|
|
1008
|
-
value: function(
|
|
1009
|
-
for (var
|
|
1010
|
-
var m =
|
|
1008
|
+
value: function(o) {
|
|
1009
|
+
for (var i = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(h) {
|
|
1010
|
+
var m = o[h], p = o[h + 1], I = l(m, p);
|
|
1011
1011
|
I != null && I.then(function() {
|
|
1012
1012
|
if (tn({
|
|
1013
|
-
lastRenderedStartIndex:
|
|
1014
|
-
lastRenderedStopIndex:
|
|
1013
|
+
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1014
|
+
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1015
1015
|
startIndex: m,
|
|
1016
1016
|
stopIndex: p
|
|
1017
1017
|
})) {
|
|
1018
|
-
if (
|
|
1018
|
+
if (i._listRef == null)
|
|
1019
1019
|
return;
|
|
1020
|
-
typeof
|
|
1020
|
+
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(m, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
|
|
1021
1021
|
}
|
|
1022
1022
|
});
|
|
1023
|
-
}, c = 0; c <
|
|
1023
|
+
}, c = 0; c < o.length; c += 2)
|
|
1024
1024
|
a(c);
|
|
1025
1025
|
}
|
|
1026
1026
|
}]), t;
|
|
1027
1027
|
})(Ge);
|
|
1028
|
-
const an = /* @__PURE__ */
|
|
1028
|
+
const an = /* @__PURE__ */ r("div")({
|
|
1029
1029
|
name: "Container",
|
|
1030
1030
|
class: "culdu4a",
|
|
1031
1031
|
propsAsIs: !1
|
|
1032
|
-
}), ln = /* @__PURE__ */
|
|
1032
|
+
}), ln = /* @__PURE__ */ r("div")({
|
|
1033
1033
|
name: "Position",
|
|
1034
1034
|
class: "pwf8e69",
|
|
1035
1035
|
propsAsIs: !1
|
|
1036
|
-
}), cn = /* @__PURE__ */
|
|
1036
|
+
}), cn = /* @__PURE__ */ r("img")({
|
|
1037
1037
|
name: "Avatar",
|
|
1038
1038
|
class: "atf4yh4",
|
|
1039
1039
|
propsAsIs: !1
|
|
1040
|
-
}), dn = /* @__PURE__ */
|
|
1040
|
+
}), dn = /* @__PURE__ */ r("div")({
|
|
1041
1041
|
name: "AvatarPlaceholder",
|
|
1042
1042
|
class: "a1dg29ja",
|
|
1043
1043
|
propsAsIs: !1
|
|
1044
|
-
}), un = /* @__PURE__ */
|
|
1044
|
+
}), un = /* @__PURE__ */ r("div")({
|
|
1045
1045
|
name: "Content",
|
|
1046
1046
|
class: "c10a68rc",
|
|
1047
1047
|
propsAsIs: !1
|
|
1048
|
-
}), pn = /* @__PURE__ */
|
|
1048
|
+
}), pn = /* @__PURE__ */ r("div")({
|
|
1049
1049
|
name: "NameContainer",
|
|
1050
1050
|
class: "nc4kck5",
|
|
1051
1051
|
propsAsIs: !1
|
|
1052
|
-
}), hn = /* @__PURE__ */
|
|
1052
|
+
}), hn = /* @__PURE__ */ r("span")({
|
|
1053
1053
|
name: "Name",
|
|
1054
1054
|
class: "njsrqgr",
|
|
1055
1055
|
propsAsIs: !1
|
|
1056
|
-
}), mn = () => k, In = /* @__PURE__ */
|
|
1056
|
+
}), mn = () => k, In = /* @__PURE__ */ r(mn())({
|
|
1057
1057
|
name: "CurrentUserBadge",
|
|
1058
1058
|
class: "c17uc4zr",
|
|
1059
1059
|
propsAsIs: !0
|
|
@@ -1065,7 +1065,7 @@ function be() {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
be.resetWarningCache = Ce;
|
|
1067
1067
|
var fn = function() {
|
|
1068
|
-
function e(
|
|
1068
|
+
function e(o, i, l, a, c, d) {
|
|
1069
1069
|
if (d !== vn) {
|
|
1070
1070
|
var h = new Error(
|
|
1071
1071
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -1105,7 +1105,7 @@ var fn = function() {
|
|
|
1105
1105
|
je.exports = fn();
|
|
1106
1106
|
var Tn = je.exports;
|
|
1107
1107
|
const E = /* @__PURE__ */ Ve(Tn);
|
|
1108
|
-
class
|
|
1108
|
+
class oe extends Ze {
|
|
1109
1109
|
constructor(t) {
|
|
1110
1110
|
super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
|
|
1111
1111
|
}
|
|
@@ -1198,14 +1198,14 @@ class re extends Ze {
|
|
|
1198
1198
|
t.deltaY === 1 && !this.isPassiveSupported() && t.preventDefault();
|
|
1199
1199
|
}
|
|
1200
1200
|
scrollListener() {
|
|
1201
|
-
const t = this.scrollComponent, s = window,
|
|
1202
|
-
let
|
|
1201
|
+
const t = this.scrollComponent, s = window, o = this.getParentElement(t);
|
|
1202
|
+
let i;
|
|
1203
1203
|
if (this.props.useWindow) {
|
|
1204
1204
|
const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
|
|
1205
|
-
this.props.isReverse ?
|
|
1205
|
+
this.props.isReverse ? i = a : i = this.calculateOffset(t, a);
|
|
1206
1206
|
} else
|
|
1207
|
-
this.props.isReverse ?
|
|
1208
|
-
|
|
1207
|
+
this.props.isReverse ? i = o.scrollTop : i = t.scrollHeight - o.scrollTop - o.clientHeight;
|
|
1208
|
+
i < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = o.scrollHeight, this.beforeScrollTop = o.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
|
|
1209
1209
|
}
|
|
1210
1210
|
calculateOffset(t, s) {
|
|
1211
1211
|
return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
|
|
@@ -1216,8 +1216,8 @@ class re extends Ze {
|
|
|
1216
1216
|
render() {
|
|
1217
1217
|
const t = this.filterProps(this.props), {
|
|
1218
1218
|
children: s,
|
|
1219
|
-
element:
|
|
1220
|
-
hasMore:
|
|
1219
|
+
element: o,
|
|
1220
|
+
hasMore: i,
|
|
1221
1221
|
initialLoad: l,
|
|
1222
1222
|
isReverse: a,
|
|
1223
1223
|
loader: c,
|
|
@@ -1234,10 +1234,10 @@ class re extends Ze {
|
|
|
1234
1234
|
this.scrollComponent = v, m && m(v);
|
|
1235
1235
|
};
|
|
1236
1236
|
const N = [s];
|
|
1237
|
-
return
|
|
1237
|
+
return i && (c ? a ? N.unshift(c) : N.push(c) : this.defaultLoader && (a ? N.unshift(this.defaultLoader) : N.push(this.defaultLoader))), V.createElement(o, f, N);
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
se(
|
|
1240
|
+
se(oe, "propTypes", {
|
|
1241
1241
|
children: E.node.isRequired,
|
|
1242
1242
|
element: E.node,
|
|
1243
1243
|
hasMore: E.bool,
|
|
@@ -1251,7 +1251,7 @@ se(re, "propTypes", {
|
|
|
1251
1251
|
threshold: E.number,
|
|
1252
1252
|
useCapture: E.bool,
|
|
1253
1253
|
useWindow: E.bool
|
|
1254
|
-
}), se(
|
|
1254
|
+
}), se(oe, "defaultProps", {
|
|
1255
1255
|
element: "div",
|
|
1256
1256
|
hasMore: !1,
|
|
1257
1257
|
initialLoad: !0,
|
|
@@ -1268,8 +1268,8 @@ const Nn = ({
|
|
|
1268
1268
|
rank: e,
|
|
1269
1269
|
avatar: t,
|
|
1270
1270
|
name: s,
|
|
1271
|
-
points:
|
|
1272
|
-
isCurrentUser:
|
|
1271
|
+
points: o,
|
|
1272
|
+
isCurrentUser: i,
|
|
1273
1273
|
openItemDetail: l,
|
|
1274
1274
|
style: a
|
|
1275
1275
|
}) => /* @__PURE__ */ u(an, { onClick: l, style: a, children: [
|
|
@@ -1278,11 +1278,11 @@ const Nn = ({
|
|
|
1278
1278
|
t ? /* @__PURE__ */ n(cn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(dn, { children: De(s || "") }),
|
|
1279
1279
|
/* @__PURE__ */ u(pn, { children: [
|
|
1280
1280
|
/* @__PURE__ */ n(hn, { children: s || "" }),
|
|
1281
|
-
|
|
1281
|
+
i && /* @__PURE__ */ n(In, { name: "icon-star" })
|
|
1282
1282
|
] })
|
|
1283
1283
|
] }),
|
|
1284
|
-
/* @__PURE__ */ n("div", { children: Le(
|
|
1285
|
-
] }), An = /* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ n("div", { children: Le(o) })
|
|
1285
|
+
] }), An = /* @__PURE__ */ r("div")({
|
|
1286
1286
|
name: "Container",
|
|
1287
1287
|
class: "c16btbfp",
|
|
1288
1288
|
propsAsIs: !1
|
|
@@ -1290,15 +1290,15 @@ const Nn = ({
|
|
|
1290
1290
|
items: e,
|
|
1291
1291
|
currentUserId: t,
|
|
1292
1292
|
openItemDetail: s,
|
|
1293
|
-
fetchMore:
|
|
1294
|
-
scrollNode:
|
|
1293
|
+
fetchMore: o,
|
|
1294
|
+
scrollNode: i,
|
|
1295
1295
|
hasMore: l
|
|
1296
|
-
}) => /* @__PURE__ */ n(
|
|
1297
|
-
loadMore:
|
|
1296
|
+
}) => /* @__PURE__ */ n(oe, {
|
|
1297
|
+
loadMore: o,
|
|
1298
1298
|
initialLoad: !1,
|
|
1299
1299
|
hasMore: l,
|
|
1300
1300
|
useWindow: !1,
|
|
1301
|
-
getScrollParent: () =>
|
|
1301
|
+
getScrollParent: () => i.current,
|
|
1302
1302
|
children: /* @__PURE__ */ n(An, {
|
|
1303
1303
|
children: e.map((a) => /* @__PURE__ */ n(Nn, {
|
|
1304
1304
|
...a,
|
|
@@ -1307,11 +1307,11 @@ const Nn = ({
|
|
|
1307
1307
|
}, a.userId))
|
|
1308
1308
|
})
|
|
1309
1309
|
}), Dn = ({ deepLink: e }) => {
|
|
1310
|
-
const { data: t } = U(e.$store)
|
|
1310
|
+
const { data: t } = U(e.$store);
|
|
1311
1311
|
return /* @__PURE__ */ n(
|
|
1312
1312
|
We,
|
|
1313
1313
|
{
|
|
1314
|
-
inviteLink:
|
|
1314
|
+
inviteLink: t,
|
|
1315
1315
|
socialLinks: [
|
|
1316
1316
|
{
|
|
1317
1317
|
icon: "icon-facebook",
|
|
@@ -1329,52 +1329,52 @@ const Nn = ({
|
|
|
1329
1329
|
}
|
|
1330
1330
|
);
|
|
1331
1331
|
}, Ln = ({ gamification: e, scrollNode: t, scrollStore: s }) => {
|
|
1332
|
-
const { data:
|
|
1333
|
-
return
|
|
1332
|
+
const { data: o, hasMore: i } = U(e.leaderboardList.$store);
|
|
1333
|
+
return o != null && o.length ? /* @__PURE__ */ n(
|
|
1334
1334
|
yn,
|
|
1335
1335
|
{
|
|
1336
|
-
items:
|
|
1336
|
+
items: o,
|
|
1337
1337
|
scrollNode: t,
|
|
1338
1338
|
scrollStore: s,
|
|
1339
1339
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1340
|
-
hasMore:
|
|
1340
|
+
hasMore: i,
|
|
1341
1341
|
openItemDetail: e.openUser,
|
|
1342
1342
|
currentUserId: e.currentUserId.get()
|
|
1343
1343
|
}
|
|
1344
1344
|
) : /* @__PURE__ */ n(Dn, { deepLink: e.deepLink });
|
|
1345
|
-
}, kn = /* @__PURE__ */
|
|
1345
|
+
}, kn = /* @__PURE__ */ r("div")({
|
|
1346
1346
|
name: "QuestionItem",
|
|
1347
1347
|
class: "q1w97g3p",
|
|
1348
1348
|
propsAsIs: !1
|
|
1349
|
-
}), xn = /* @__PURE__ */
|
|
1349
|
+
}), xn = /* @__PURE__ */ r("div")({
|
|
1350
1350
|
name: "QuestionCaption",
|
|
1351
1351
|
class: "q2sl39u",
|
|
1352
1352
|
propsAsIs: !1
|
|
1353
|
-
}), wn = /* @__PURE__ */
|
|
1353
|
+
}), wn = /* @__PURE__ */ r("div")({
|
|
1354
1354
|
name: "QuestionBody",
|
|
1355
1355
|
class: "qd5h0uc",
|
|
1356
1356
|
propsAsIs: !1
|
|
1357
|
-
}), En = /* @__PURE__ */
|
|
1357
|
+
}), En = /* @__PURE__ */ r("div")({
|
|
1358
1358
|
name: "QuestionAction",
|
|
1359
1359
|
class: "q105uluy",
|
|
1360
1360
|
propsAsIs: !1
|
|
1361
|
-
}), Sn = () => k, K = /* @__PURE__ */
|
|
1361
|
+
}), Sn = () => k, K = /* @__PURE__ */ r(Sn())({
|
|
1362
1362
|
name: "QuestionActionIcon",
|
|
1363
1363
|
class: "q1fa0b9h",
|
|
1364
1364
|
propsAsIs: !0
|
|
1365
|
-
}), jn = () => k, Cn = /* @__PURE__ */
|
|
1365
|
+
}), jn = () => k, Cn = /* @__PURE__ */ r(jn())({
|
|
1366
1366
|
name: "QuestionTypeIcon",
|
|
1367
1367
|
class: "qxlt78s",
|
|
1368
1368
|
propsAsIs: !0
|
|
1369
|
-
}), bn = /* @__PURE__ */
|
|
1369
|
+
}), bn = /* @__PURE__ */ r("div")({
|
|
1370
1370
|
name: "QuestionTypeLabel",
|
|
1371
1371
|
class: "qmg0vkx",
|
|
1372
1372
|
propsAsIs: !1
|
|
1373
|
-
}), zn = /* @__PURE__ */
|
|
1373
|
+
}), zn = /* @__PURE__ */ r("div")({
|
|
1374
1374
|
name: "QuestionContent",
|
|
1375
1375
|
class: "q1uz5j1g",
|
|
1376
1376
|
propsAsIs: !1
|
|
1377
|
-
}), On = /* @__PURE__ */
|
|
1377
|
+
}), On = /* @__PURE__ */ r("button")({
|
|
1378
1378
|
name: "PlayButton",
|
|
1379
1379
|
class: "p1pba9p1",
|
|
1380
1380
|
propsAsIs: !1
|
|
@@ -1387,8 +1387,8 @@ const Nn = ({
|
|
|
1387
1387
|
questionId: e,
|
|
1388
1388
|
questionType: t,
|
|
1389
1389
|
questionStatus: s,
|
|
1390
|
-
subject:
|
|
1391
|
-
openForVoting:
|
|
1390
|
+
subject: o,
|
|
1391
|
+
openForVoting: i,
|
|
1392
1392
|
openQuestion: l,
|
|
1393
1393
|
status: a
|
|
1394
1394
|
}) => {
|
|
@@ -1409,15 +1409,15 @@ const Nn = ({
|
|
|
1409
1409
|
t === M.TRIVIA && s === $.RESOLVED && " • Expired"
|
|
1410
1410
|
] })
|
|
1411
1411
|
] }),
|
|
1412
|
-
/* @__PURE__ */ n(wn, { children:
|
|
1412
|
+
/* @__PURE__ */ n(wn, { children: o || "" })
|
|
1413
1413
|
] }),
|
|
1414
|
-
/* @__PURE__ */ n(En, { children:
|
|
1414
|
+
/* @__PURE__ */ n(En, { children: i ? /* @__PURE__ */ n(On, { children: "Play" }) : d })
|
|
1415
1415
|
] }) : null;
|
|
1416
|
-
}, Qn = /* @__PURE__ */
|
|
1416
|
+
}, Qn = /* @__PURE__ */ r("div")({
|
|
1417
1417
|
name: "Container",
|
|
1418
1418
|
class: "cll3md7",
|
|
1419
1419
|
propsAsIs: !1
|
|
1420
|
-
}), Pn = /* @__PURE__ */
|
|
1420
|
+
}), Pn = /* @__PURE__ */ r("button")({
|
|
1421
1421
|
name: "ActionBtn",
|
|
1422
1422
|
class: "a10g1iik",
|
|
1423
1423
|
propsAsIs: !1
|
|
@@ -1428,19 +1428,19 @@ const Nn = ({
|
|
|
1428
1428
|
}) => /* @__PURE__ */ u(Qn, { children: [
|
|
1429
1429
|
/* @__PURE__ */ n(Se, { questionId: t, ...s, isPickHistory: !0 }),
|
|
1430
1430
|
e && /* @__PURE__ */ n(Pn, { onClick: () => e(t), children: "View Insight" })
|
|
1431
|
-
] }), qn = /* @__PURE__ */
|
|
1431
|
+
] }), qn = /* @__PURE__ */ r("div")({
|
|
1432
1432
|
name: "Container",
|
|
1433
1433
|
class: "cl56x6b",
|
|
1434
1434
|
propsAsIs: !1
|
|
1435
|
-
}), Yn = () => _e, Vn = /* @__PURE__ */
|
|
1435
|
+
}), Yn = () => _e, Vn = /* @__PURE__ */ r(Yn())({
|
|
1436
1436
|
name: "ActionButton",
|
|
1437
1437
|
class: "a11pzf92",
|
|
1438
1438
|
propsAsIs: !0
|
|
1439
|
-
}), Wn = /* @__PURE__ */
|
|
1439
|
+
}), Wn = /* @__PURE__ */ r("div")({
|
|
1440
1440
|
name: "DateTime",
|
|
1441
1441
|
class: "d1hbaleq",
|
|
1442
1442
|
propsAsIs: !1
|
|
1443
|
-
}), _n = /* @__PURE__ */
|
|
1443
|
+
}), _n = /* @__PURE__ */ r("blockquote")({
|
|
1444
1444
|
name: "Quote",
|
|
1445
1445
|
class: "qvvgqjm",
|
|
1446
1446
|
propsAsIs: !1
|
|
@@ -1449,38 +1449,38 @@ const Nn = ({
|
|
|
1449
1449
|
created: t,
|
|
1450
1450
|
...s
|
|
1451
1451
|
}) => {
|
|
1452
|
-
const
|
|
1452
|
+
const o = C(() => {
|
|
1453
1453
|
if (t) {
|
|
1454
|
-
const
|
|
1455
|
-
if (le(
|
|
1454
|
+
const i = new Date(t);
|
|
1455
|
+
if (le(i))
|
|
1456
1456
|
return {
|
|
1457
|
-
date:
|
|
1458
|
-
time: ae(
|
|
1457
|
+
date: re(i),
|
|
1458
|
+
time: ae(i)
|
|
1459
1459
|
};
|
|
1460
1460
|
}
|
|
1461
1461
|
return null;
|
|
1462
1462
|
}, [t]);
|
|
1463
1463
|
return /* @__PURE__ */ u(qn, { children: [
|
|
1464
|
-
|
|
1465
|
-
|
|
1464
|
+
o && /* @__PURE__ */ u(Wn, { children: [
|
|
1465
|
+
o.date,
|
|
1466
1466
|
" · ",
|
|
1467
|
-
|
|
1467
|
+
o.time
|
|
1468
1468
|
] }),
|
|
1469
1469
|
s.title && /* @__PURE__ */ n(_n, { children: s.title }),
|
|
1470
1470
|
/* @__PURE__ */ n(Ae, { ...s }),
|
|
1471
1471
|
e && /* @__PURE__ */ n(Vn, { onClick: () => e(s.tweetId), children: "View Insight" })
|
|
1472
1472
|
] });
|
|
1473
|
-
}, Fn = /* @__PURE__ */
|
|
1473
|
+
}, Fn = /* @__PURE__ */ r("div")({
|
|
1474
1474
|
name: "QuestionsContainer",
|
|
1475
1475
|
class: "qvghv3l",
|
|
1476
1476
|
propsAsIs: !1
|
|
1477
1477
|
}), Hn = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(Fn, { children: e == null ? void 0 : e.map((s) => {
|
|
1478
|
-
var
|
|
1479
|
-
if (s.type === "question" && ((
|
|
1478
|
+
var o, i, l;
|
|
1479
|
+
if (s.type === "question" && ((o = s.attributes) == null ? void 0 : o.attributes.case) === "question") {
|
|
1480
1480
|
const a = s.attributes.attributes.value;
|
|
1481
1481
|
return /* @__PURE__ */ n(Rn, { openQuestion: t, ...a }, a.questionId);
|
|
1482
1482
|
}
|
|
1483
|
-
if (s.type === "insight" && ((
|
|
1483
|
+
if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1484
1484
|
const a = s.attributes.attributes.value, c = s.attributes.created;
|
|
1485
1485
|
return /* @__PURE__ */ n(Un, { openInsight: t, ...a, created: c }, a.questionId);
|
|
1486
1486
|
}
|
|
@@ -1494,17 +1494,17 @@ const Nn = ({
|
|
|
1494
1494
|
return s != null && s.data ? /* @__PURE__ */ n(Hn, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
|
|
1495
1495
|
}, Zn = ({ userSummary: e }) => {
|
|
1496
1496
|
var t;
|
|
1497
|
-
const [s,
|
|
1497
|
+
const [s, o] = z(void 0);
|
|
1498
1498
|
return te(() => {
|
|
1499
|
-
const
|
|
1500
|
-
l != null && l.data &&
|
|
1499
|
+
const i = e.subscribe((l) => {
|
|
1500
|
+
l != null && l.data && o(l.data);
|
|
1501
1501
|
});
|
|
1502
1502
|
return () => {
|
|
1503
|
-
|
|
1503
|
+
i();
|
|
1504
1504
|
};
|
|
1505
1505
|
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(ke, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
|
|
1506
|
-
}, Jn = ({ gamification: e, className: t, scrollStore: s, scrollNode:
|
|
1507
|
-
const [
|
|
1506
|
+
}, Jn = ({ gamification: e, className: t, scrollStore: s, scrollNode: o }) => {
|
|
1507
|
+
const [i, l] = z(!1), [a, c] = z(ee.HOME), [, d] = Je(), h = (p) => {
|
|
1508
1508
|
d(() => c(p));
|
|
1509
1509
|
}, m = (p) => {
|
|
1510
1510
|
d(() => l(p));
|
|
@@ -1523,7 +1523,7 @@ const Nn = ({
|
|
|
1523
1523
|
paddingBottom: "8px",
|
|
1524
1524
|
position: "sticky",
|
|
1525
1525
|
transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
|
|
1526
|
-
top:
|
|
1526
|
+
top: i ? "-60px" : "0px"
|
|
1527
1527
|
},
|
|
1528
1528
|
children: /* @__PURE__ */ n(en, { activePage: a, toggleActivePage: h })
|
|
1529
1529
|
}
|
|
@@ -1532,13 +1532,13 @@ const Nn = ({
|
|
|
1532
1532
|
/* @__PURE__ */ n(X, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Zn, { userSummary: e.userSummary }) }),
|
|
1533
1533
|
/* @__PURE__ */ n(Be, { children: /* @__PURE__ */ n(Gn, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1534
1534
|
] }),
|
|
1535
|
-
a === ee.LEADERBOARD && /* @__PURE__ */ n(X, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Ln, { scrollStore: s, scrollNode:
|
|
1535
|
+
a === ee.LEADERBOARD && /* @__PURE__ */ n(X, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Ln, { scrollStore: s, scrollNode: o, gamification: e }) })
|
|
1536
1536
|
] });
|
|
1537
|
-
}, Kn = () => Fe, Te = /* @__PURE__ */
|
|
1537
|
+
}, Kn = () => Fe, Te = /* @__PURE__ */ r(Kn())({
|
|
1538
1538
|
name: "OpenedContainer",
|
|
1539
1539
|
class: "oar61gl",
|
|
1540
1540
|
propsAsIs: !0
|
|
1541
|
-
}), Xn = /* @__PURE__ */
|
|
1541
|
+
}), Xn = /* @__PURE__ */ r("div")({
|
|
1542
1542
|
name: "UserContainer",
|
|
1543
1543
|
class: "u14zaal4",
|
|
1544
1544
|
propsAsIs: !1
|
|
@@ -1548,21 +1548,21 @@ const Nn = ({
|
|
|
1548
1548
|
}) => {
|
|
1549
1549
|
const s = e + t;
|
|
1550
1550
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
1551
|
-
},
|
|
1551
|
+
}, oi = ({
|
|
1552
1552
|
gamification: e,
|
|
1553
1553
|
scrollStore: t,
|
|
1554
1554
|
className: s,
|
|
1555
|
-
appNode:
|
|
1556
|
-
scrollNode:
|
|
1555
|
+
appNode: o,
|
|
1556
|
+
scrollNode: i
|
|
1557
1557
|
}) => {
|
|
1558
1558
|
const l = U(e.openedQuestion.$store), a = U(e.openedUser);
|
|
1559
1559
|
return /* @__PURE__ */ u(b, {
|
|
1560
|
-
children: [l &&
|
|
1560
|
+
children: [l && o.current && ue.createPortal(/* @__PURE__ */ n(Te, {
|
|
1561
1561
|
className: s,
|
|
1562
1562
|
children: /* @__PURE__ */ n(Gs, {
|
|
1563
1563
|
gamification: e
|
|
1564
1564
|
})
|
|
1565
|
-
}),
|
|
1565
|
+
}), o.current), a && o.current && ue.createPortal(/* @__PURE__ */ n(Te, {
|
|
1566
1566
|
className: s,
|
|
1567
1567
|
children: /* @__PURE__ */ u(Xn, {
|
|
1568
1568
|
children: [/* @__PURE__ */ n(ye, {
|
|
@@ -1575,14 +1575,14 @@ const Nn = ({
|
|
|
1575
1575
|
})
|
|
1576
1576
|
})]
|
|
1577
1577
|
})
|
|
1578
|
-
}),
|
|
1578
|
+
}), o.current), /* @__PURE__ */ n(Jn, {
|
|
1579
1579
|
scrollStore: t,
|
|
1580
|
-
scrollNode:
|
|
1580
|
+
scrollNode: i,
|
|
1581
1581
|
className: s,
|
|
1582
1582
|
gamification: e
|
|
1583
1583
|
})]
|
|
1584
1584
|
});
|
|
1585
1585
|
};
|
|
1586
1586
|
export {
|
|
1587
|
-
|
|
1587
|
+
oi as default
|
|
1588
1588
|
};
|