@streamlayer/react 0.34.11 → 0.34.13
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/cjs/masters2.js +52 -52
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +62 -62
- package/lib/dist/es/gamification-feature.js +440 -443
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +14713 -14691
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +434 -437
- package/lib/es/masters.js +3 -3
- package/lib/es/masters2.js +11222 -11199
- package/lib/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,182 +1,182 @@
|
|
|
1
1
|
var Ue = Object.defineProperty;
|
|
2
2
|
var Ye = (e, t, s) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
-
var
|
|
3
|
+
var te = (e, t, s) => (Ye(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
4
|
import { jsxs as u, jsx as n, Fragment as S } from "react/jsx-runtime";
|
|
5
|
-
import { s as
|
|
6
|
-
import V, { useRef as R, useState as w, useCallback as W, useEffect as
|
|
7
|
-
const
|
|
5
|
+
import { s as o, c as f, Q as N, o as Te, a as $, b as B, d as ne, E as U, i as Pe, w as qe, j as Ae, u as Y, g as Ve, O as We, P as H, e as _e, p as Be, C as Fe, n as je, f as Ze, l as He, h as de, x as Ge } from "./masters.js";
|
|
6
|
+
import V, { useRef as R, useState as w, useCallback as W, useEffect as ee, useLayoutEffect as Je, useMemo as k, PureComponent as Xe, Component as Ke, useTransition as et } from "react";
|
|
7
|
+
const tt = /* @__PURE__ */ o("div")({
|
|
8
8
|
name: "Container",
|
|
9
9
|
class: "c1vwopgc",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), st = /* @__PURE__ */ o("div")({
|
|
12
12
|
name: "QuestionTypeWrap",
|
|
13
13
|
class: "qyktpt0",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), nt = () => f, it = /* @__PURE__ */ o(nt())({
|
|
16
16
|
name: "QuestionTypeIcon",
|
|
17
17
|
class: "q951jdx",
|
|
18
18
|
propsAsIs: !0
|
|
19
|
-
}),
|
|
19
|
+
}), rt = /* @__PURE__ */ o("span")({
|
|
20
20
|
name: "QuestionTypeTitle",
|
|
21
21
|
class: "qss5f0e",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
23
|
+
}), ot = /* @__PURE__ */ o("button")({
|
|
24
24
|
name: "CloseButton",
|
|
25
25
|
class: "c1ao1jtv",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}),
|
|
27
|
+
}), at = () => f, lt = /* @__PURE__ */ o(at())({
|
|
28
28
|
name: "CloseIcon",
|
|
29
29
|
class: "cvsl7l3",
|
|
30
30
|
propsAsIs: !0
|
|
31
31
|
}), ye = ({ type: e, close: t, label: s }) => {
|
|
32
|
-
const i = e ?
|
|
33
|
-
return /* @__PURE__ */ u(
|
|
34
|
-
/* @__PURE__ */ u(
|
|
32
|
+
const i = e ? Te[e] : { label: s, iconName: void 0 };
|
|
33
|
+
return /* @__PURE__ */ u(tt, { children: [
|
|
34
|
+
/* @__PURE__ */ u(st, { children: [
|
|
35
35
|
(i == null ? void 0 : i.iconName) && /* @__PURE__ */ n(
|
|
36
|
-
|
|
36
|
+
it,
|
|
37
37
|
{
|
|
38
38
|
"data-type-trivia": e === N.TRIVIA,
|
|
39
39
|
"data-type-poll": e === N.POLL,
|
|
40
40
|
name: i.iconName
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
(i == null ? void 0 : i.label) && /* @__PURE__ */ n(
|
|
43
|
+
(i == null ? void 0 : i.label) && /* @__PURE__ */ n(rt, { children: i.label })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */ n(
|
|
45
|
+
/* @__PURE__ */ n(ot, { onClick: t, children: /* @__PURE__ */ n(lt, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
|
-
}, ve = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(),
|
|
47
|
+
}, ve = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), fe = (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
|
+
}), oe = (e) => e.toLocaleTimeString("en-US", {
|
|
52
52
|
hour: "2-digit",
|
|
53
53
|
minute: "2-digit"
|
|
54
|
-
}),
|
|
54
|
+
}), ae = (e) => !isNaN(e.getTime()), ct = /* @__PURE__ */ o("div")({
|
|
55
55
|
name: "Container",
|
|
56
56
|
class: "c1zy8a",
|
|
57
57
|
propsAsIs: !1
|
|
58
|
-
}),
|
|
58
|
+
}), dt = /* @__PURE__ */ o("div")({
|
|
59
59
|
name: "Title",
|
|
60
60
|
class: "t1vih9p5",
|
|
61
61
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
62
|
+
}), ut = /* @__PURE__ */ o("div")({
|
|
63
63
|
name: "Indicator",
|
|
64
64
|
class: "i1fbnvpb",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */ n(
|
|
68
|
-
/* @__PURE__ */ n(
|
|
69
|
-
] }),
|
|
66
|
+
}), ue = ({ indicator: e, title: t }) => /* @__PURE__ */ u(ct, { children: [
|
|
67
|
+
/* @__PURE__ */ n(dt, { children: t }),
|
|
68
|
+
/* @__PURE__ */ n(ut, { children: e })
|
|
69
|
+
] }), pt = /* @__PURE__ */ o("div")({
|
|
70
70
|
name: "Container",
|
|
71
71
|
class: "ctmhwyc",
|
|
72
72
|
propsAsIs: !1
|
|
73
|
-
}),
|
|
73
|
+
}), Mt = /* @__PURE__ */ o("div")({
|
|
74
74
|
name: "Indicator",
|
|
75
75
|
class: "i1jri200",
|
|
76
76
|
propsAsIs: !1
|
|
77
|
-
}),
|
|
77
|
+
}), It = /* @__PURE__ */ o("div")({
|
|
78
78
|
name: "Title",
|
|
79
79
|
class: "t8s05oq",
|
|
80
80
|
propsAsIs: !1
|
|
81
|
-
}), G = ({ indicator: e, title: t }) => /* @__PURE__ */ u(
|
|
82
|
-
/* @__PURE__ */ n(
|
|
83
|
-
/* @__PURE__ */ n(
|
|
84
|
-
] }),
|
|
81
|
+
}), G = ({ indicator: e, title: t }) => /* @__PURE__ */ u(pt, { children: [
|
|
82
|
+
/* @__PURE__ */ n(Mt, { children: e }),
|
|
83
|
+
/* @__PURE__ */ n(It, { children: t })
|
|
84
|
+
] }), ht = /* @__PURE__ */ o("div")({
|
|
85
85
|
name: "Container",
|
|
86
86
|
class: "c1yrpn9o",
|
|
87
87
|
propsAsIs: !1
|
|
88
|
-
}),
|
|
88
|
+
}), Nt = /* @__PURE__ */ o("div")({
|
|
89
89
|
name: "TopInfo",
|
|
90
90
|
class: "t17fwahh",
|
|
91
91
|
propsAsIs: !1
|
|
92
|
-
}),
|
|
92
|
+
}), mt = /* @__PURE__ */ o("div")({
|
|
93
93
|
name: "BottomInfo",
|
|
94
94
|
class: "by6w7e9",
|
|
95
95
|
propsAsIs: !1
|
|
96
|
-
}),
|
|
96
|
+
}), gt = /* @__PURE__ */ o("div")({
|
|
97
97
|
name: "User",
|
|
98
98
|
class: "u1g7arbm",
|
|
99
99
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
100
|
+
}), Dt = /* @__PURE__ */ o("img")({
|
|
101
101
|
name: "Avatar",
|
|
102
102
|
class: "a1ldeata",
|
|
103
103
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
104
|
+
}), Tt = /* @__PURE__ */ o("div")({
|
|
105
105
|
name: "UserInfo",
|
|
106
106
|
class: "u10d4koz",
|
|
107
107
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
108
|
+
}), At = /* @__PURE__ */ o("div")({
|
|
109
109
|
name: "UserName",
|
|
110
110
|
class: "u1q6roj0",
|
|
111
111
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
112
|
+
}), jt = /* @__PURE__ */ o("div")({
|
|
113
113
|
name: "UserRating",
|
|
114
114
|
class: "ui0m425",
|
|
115
115
|
propsAsIs: !1
|
|
116
|
-
}),
|
|
116
|
+
}), yt = /* @__PURE__ */ o("img")({
|
|
117
117
|
name: "TrophyIcon",
|
|
118
118
|
class: "t1el3mrn",
|
|
119
119
|
propsAsIs: !1
|
|
120
|
-
}),
|
|
120
|
+
}), vt = /* @__PURE__ */ o("div")({
|
|
121
121
|
name: "Rts",
|
|
122
122
|
class: "r2vgnxv",
|
|
123
123
|
propsAsIs: !1
|
|
124
|
-
}),
|
|
124
|
+
}), ft = /* @__PURE__ */ o("div")({
|
|
125
125
|
name: "RtsIndicator",
|
|
126
126
|
class: "roqn06j",
|
|
127
127
|
propsAsIs: !1
|
|
128
|
-
}),
|
|
128
|
+
}), xt = /* @__PURE__ */ o("div")({
|
|
129
129
|
name: "RtsLabel",
|
|
130
130
|
class: "r15adx7c",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}),
|
|
132
|
+
}), Et = /* @__PURE__ */ o("div")({
|
|
133
133
|
name: "Divider",
|
|
134
134
|
class: "dv59lta",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}),
|
|
136
|
+
}), Lt = /* @__PURE__ */ o("div")({
|
|
137
137
|
name: "Ranks",
|
|
138
138
|
class: "r55lotb",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}),
|
|
140
|
+
}), zt = /* @__PURE__ */ o("div")({
|
|
141
141
|
name: "Statistics",
|
|
142
142
|
class: "s1knfgqt",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}),
|
|
144
|
+
}), Ot = /* @__PURE__ */ o("div")({
|
|
145
145
|
name: "AvatarPlaceholder",
|
|
146
146
|
class: "a1mqo824",
|
|
147
147
|
propsAs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NzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", xe = ({
|
|
153
153
|
avatar: e,
|
|
154
154
|
name: t,
|
|
155
155
|
points: s,
|
|
156
156
|
friendsRank: i,
|
|
157
|
-
rank:
|
|
157
|
+
rank: r,
|
|
158
158
|
streak: l,
|
|
159
159
|
correct: a,
|
|
160
160
|
incorrect: c,
|
|
161
161
|
inTop: d,
|
|
162
162
|
successRate: M
|
|
163
|
-
}) => /* @__PURE__ */ u(
|
|
164
|
-
/* @__PURE__ */ n(
|
|
165
|
-
/* @__PURE__ */ u(
|
|
166
|
-
e && /* @__PURE__ */ n(
|
|
167
|
-
!e && /* @__PURE__ */ n(
|
|
163
|
+
}) => /* @__PURE__ */ u(ht, { children: [
|
|
164
|
+
/* @__PURE__ */ n(Nt, { children: /* @__PURE__ */ u(gt, { children: [
|
|
165
|
+
/* @__PURE__ */ u(Ct, { children: [
|
|
166
|
+
e && /* @__PURE__ */ n(Dt, { alt: "avatar", src: e }),
|
|
167
|
+
!e && /* @__PURE__ */ n(Ot, { children: ve(t || "") })
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */ u(
|
|
170
|
-
/* @__PURE__ */ n(
|
|
171
|
-
/* @__PURE__ */ u(
|
|
172
|
-
/* @__PURE__ */ u(
|
|
173
|
-
/* @__PURE__ */ n(
|
|
174
|
-
/* @__PURE__ */ u(
|
|
175
|
-
|
|
176
|
-
/* @__PURE__ */ n(
|
|
169
|
+
/* @__PURE__ */ u(Tt, { children: [
|
|
170
|
+
/* @__PURE__ */ n(At, { children: t }),
|
|
171
|
+
/* @__PURE__ */ u(jt, { children: [
|
|
172
|
+
/* @__PURE__ */ u(vt, { children: [
|
|
173
|
+
/* @__PURE__ */ n(yt, { alt: "rank-icon", src: St }),
|
|
174
|
+
/* @__PURE__ */ u(ft, { children: [
|
|
175
|
+
fe(s),
|
|
176
|
+
/* @__PURE__ */ n(xt, { children: "PTS" })
|
|
177
177
|
] })
|
|
178
178
|
] }),
|
|
179
|
-
/* @__PURE__ */ n(
|
|
179
|
+
/* @__PURE__ */ n(Et, {}),
|
|
180
180
|
/* @__PURE__ */ u("div", { children: [
|
|
181
181
|
"TOP ",
|
|
182
182
|
d || 0,
|
|
@@ -185,80 +185,80 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
185
185
|
] })
|
|
186
186
|
] })
|
|
187
187
|
] }) }),
|
|
188
|
-
/* @__PURE__ */ u(
|
|
189
|
-
/* @__PURE__ */ u(
|
|
190
|
-
/* @__PURE__ */ n(
|
|
191
|
-
/* @__PURE__ */ n(
|
|
188
|
+
/* @__PURE__ */ u(mt, { children: [
|
|
189
|
+
/* @__PURE__ */ u(Lt, { children: [
|
|
190
|
+
/* @__PURE__ */ n(ue, { indicator: i || 0, title: "Friends rank" }),
|
|
191
|
+
/* @__PURE__ */ n(ue, { indicator: r || 0, title: "Global rank" })
|
|
192
192
|
] }),
|
|
193
|
-
/* @__PURE__ */ u(
|
|
193
|
+
/* @__PURE__ */ u(zt, { children: [
|
|
194
194
|
/* @__PURE__ */ n(G, { indicator: l || 0, title: "Win streak" }),
|
|
195
195
|
/* @__PURE__ */ n(G, { indicator: a || 0, title: "Correct" }),
|
|
196
196
|
/* @__PURE__ */ n(G, { indicator: c || 0, title: "Incorrect" }),
|
|
197
197
|
/* @__PURE__ */ n(G, { indicator: `${M || 0}%`, title: "Succ. rate" })
|
|
198
198
|
] })
|
|
199
199
|
] })
|
|
200
|
-
] }),
|
|
200
|
+
] }), kt = /* @__PURE__ */ o("div")({
|
|
201
201
|
name: "SponsorLogoWrap",
|
|
202
202
|
class: "s8p5v5z",
|
|
203
203
|
propsAsIs: !1
|
|
204
|
-
}),
|
|
204
|
+
}), wt = () => f, bt = /* @__PURE__ */ o(wt())({
|
|
205
205
|
name: "SponsorLogo",
|
|
206
206
|
class: "s755yti",
|
|
207
207
|
propsAsIs: !0
|
|
208
|
-
}),
|
|
209
|
-
children: /* @__PURE__ */ n(
|
|
208
|
+
}), $t = () => /* @__PURE__ */ n(kt, {
|
|
209
|
+
children: /* @__PURE__ */ n(bt, {
|
|
210
210
|
name: "mastersLogo"
|
|
211
211
|
})
|
|
212
|
-
}),
|
|
212
|
+
}), Qt = /* @__PURE__ */ o("div")({
|
|
213
213
|
name: "Container",
|
|
214
214
|
class: "c38csyt",
|
|
215
215
|
propsAsIs: !1
|
|
216
|
-
}),
|
|
216
|
+
}), Rt = /* @__PURE__ */ o("div")({
|
|
217
217
|
name: "Title",
|
|
218
218
|
class: "ty221rx",
|
|
219
219
|
propsAsIs: !1
|
|
220
|
-
}),
|
|
220
|
+
}), Ut = /* @__PURE__ */ o("div")({
|
|
221
221
|
name: "Description",
|
|
222
222
|
class: "dlaj9xp",
|
|
223
223
|
propsAsIs: !1
|
|
224
|
-
}),
|
|
225
|
-
/* @__PURE__ */ n(
|
|
226
|
-
/* @__PURE__ */ n(
|
|
227
|
-
/* @__PURE__ */ n(
|
|
228
|
-
] }),
|
|
224
|
+
}), Yt = ({ title: e, description: t }) => /* @__PURE__ */ u(Qt, { children: [
|
|
225
|
+
/* @__PURE__ */ n(f, { name: "icon-check-circle" }),
|
|
226
|
+
/* @__PURE__ */ n(Rt, { children: e }),
|
|
227
|
+
/* @__PURE__ */ n(Ut, { children: t })
|
|
228
|
+
] }), Pt = /* @__PURE__ */ o("div")({
|
|
229
229
|
name: "Container",
|
|
230
230
|
class: "c16sbdnm",
|
|
231
231
|
propsAsIs: !1
|
|
232
|
-
}),
|
|
232
|
+
}), qt = () => f, Vt = /* @__PURE__ */ o(qt())({
|
|
233
233
|
name: "IconPrediction",
|
|
234
234
|
class: "ibhorgl",
|
|
235
235
|
propsAsIs: !0
|
|
236
|
-
}), F = /* @__PURE__ */
|
|
236
|
+
}), F = /* @__PURE__ */ o("div")({
|
|
237
237
|
name: "FeedbackIconWrap",
|
|
238
238
|
class: "f1g20ja7",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}), J = /* @__PURE__ */
|
|
240
|
+
}), J = /* @__PURE__ */ o("div")({
|
|
241
241
|
name: "FeedbackHeader",
|
|
242
242
|
class: "f455ozj",
|
|
243
243
|
propsAsIs: !1
|
|
244
|
-
}),
|
|
244
|
+
}), Wt = /* @__PURE__ */ o("span")({
|
|
245
245
|
name: "FeedbackTitle",
|
|
246
246
|
class: "f1913njx",
|
|
247
247
|
propsAsIs: !1
|
|
248
|
-
}), q = /* @__PURE__ */
|
|
248
|
+
}), q = /* @__PURE__ */ o("span")({
|
|
249
249
|
name: "FeedbackDescription",
|
|
250
250
|
class: "fzfk69z",
|
|
251
251
|
propsAsIs: !1
|
|
252
|
-
}),
|
|
252
|
+
}), se = /* @__PURE__ */ o("div")({
|
|
253
253
|
name: "FeedbackText",
|
|
254
254
|
class: "fx87qaj",
|
|
255
255
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
256
|
+
}), _t = ({
|
|
257
257
|
feedbackMessages: e,
|
|
258
258
|
questionVotedCorrectly: t,
|
|
259
259
|
questionVoted: s,
|
|
260
260
|
questionType: i,
|
|
261
|
-
hasCorrectAnswer:
|
|
261
|
+
hasCorrectAnswer: r,
|
|
262
262
|
questionStatus: l,
|
|
263
263
|
showExpiredNotification: a,
|
|
264
264
|
showClosedNotificationTrivia: c,
|
|
@@ -267,145 +267,145 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
267
267
|
enteredAnActiveQuestion: I,
|
|
268
268
|
marketClosed: p
|
|
269
269
|
}) => {
|
|
270
|
-
const h = s && (i === N.TRIVIA || i === N.PREDICTION) && d && l !== $.RESOLVED, m = i === N.PREDICTION && !
|
|
271
|
-
if (!a && !c && !D && !A && !
|
|
270
|
+
const h = s && (i === N.TRIVIA || i === N.PREDICTION) && d && l !== $.RESOLVED, m = i === N.PREDICTION && !r, x = p && i === N.PREDICTION && !s && !I || i === N.PREDICTION && M && d && I, D = h && m, A = h && r, g = i === N.PREDICTION && s && d && r, y = s && i === N.POLL && d;
|
|
271
|
+
if (!a && !c && !D && !A && !x && !y && !g)
|
|
272
272
|
return null;
|
|
273
273
|
const j = t ? "correct" : "incorrect", v = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
274
|
-
return /* @__PURE__ */ u(
|
|
274
|
+
return /* @__PURE__ */ u(Pt, { "data-isPrediction": m, children: [
|
|
275
275
|
a && /* @__PURE__ */ u(S, { children: [
|
|
276
|
-
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
|
|
276
|
+
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(f, { name: "questionExpired" }) }),
|
|
277
277
|
/* @__PURE__ */ u("div", { children: [
|
|
278
278
|
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(q, { children: "Question Expired" }) }),
|
|
279
|
-
/* @__PURE__ */ n(
|
|
279
|
+
/* @__PURE__ */ n(se, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
280
280
|
] })
|
|
281
281
|
] }),
|
|
282
282
|
c && /* @__PURE__ */ u(S, { children: [
|
|
283
|
-
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
|
|
283
|
+
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(f, { name: "questionExpired" }) }),
|
|
284
284
|
/* @__PURE__ */ u("div", { children: [
|
|
285
285
|
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(q, { children: "Question Closed" }) }),
|
|
286
|
-
/* @__PURE__ */ n(
|
|
286
|
+
/* @__PURE__ */ n(se, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
287
287
|
] })
|
|
288
288
|
] }),
|
|
289
|
-
|
|
290
|
-
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
|
|
289
|
+
x && /* @__PURE__ */ u(S, { children: [
|
|
290
|
+
/* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(f, { name: "questionExpired" }) }),
|
|
291
291
|
/* @__PURE__ */ u("div", { children: [
|
|
292
292
|
/* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(q, { children: "Question Closed" }) }),
|
|
293
|
-
/* @__PURE__ */ n(
|
|
293
|
+
/* @__PURE__ */ n(se, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
294
294
|
] })
|
|
295
295
|
] }),
|
|
296
296
|
D && /* @__PURE__ */ u(S, { children: [
|
|
297
|
-
/* @__PURE__ */ n(
|
|
297
|
+
/* @__PURE__ */ n(Vt, { name: "icon-prediction" }),
|
|
298
298
|
/* @__PURE__ */ n(q, { children: "Stay tuned to see if your prediction was correct." })
|
|
299
299
|
] }),
|
|
300
300
|
y && /* @__PURE__ */ u(S, { children: [
|
|
301
|
-
/* @__PURE__ */ n(F, { "data-feedbackType": "correct", children: /* @__PURE__ */ n(
|
|
301
|
+
/* @__PURE__ */ n(F, { "data-feedbackType": "correct", children: /* @__PURE__ */ n(f, { name: "correct" }) }),
|
|
302
302
|
/* @__PURE__ */ n(q, { children: "That's for answering. Please stay tuned for the next question." })
|
|
303
303
|
] }),
|
|
304
304
|
(A || g) && /* @__PURE__ */ u(S, { children: [
|
|
305
|
-
/* @__PURE__ */ n(F, { "data-feedbackType": j, children: /* @__PURE__ */ n(
|
|
305
|
+
/* @__PURE__ */ n(F, { "data-feedbackType": j, children: /* @__PURE__ */ n(f, { name: j }) }),
|
|
306
306
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(J, { children: [
|
|
307
|
-
/* @__PURE__ */ n(
|
|
307
|
+
/* @__PURE__ */ n(Wt, { "data-feedbackType": j, children: v == null ? void 0 : v.title }),
|
|
308
308
|
/* @__PURE__ */ n(q, { children: v == null ? void 0 : v.description })
|
|
309
309
|
] }) })
|
|
310
310
|
] })
|
|
311
311
|
] });
|
|
312
|
-
},
|
|
312
|
+
}, Bt = /* @__PURE__ */ o("div")({
|
|
313
313
|
name: "Container",
|
|
314
314
|
class: "c14ielyq",
|
|
315
315
|
propsAsIs: !1
|
|
316
|
-
}),
|
|
316
|
+
}), Ft = /* @__PURE__ */ o("div")({
|
|
317
317
|
name: "Content",
|
|
318
318
|
class: "c1tlqx57",
|
|
319
319
|
propsAsIs: !1
|
|
320
|
-
}),
|
|
320
|
+
}), Zt = /* @__PURE__ */ o("div")({
|
|
321
321
|
name: "Title",
|
|
322
322
|
class: "t1hq58md",
|
|
323
323
|
propsAsIs: !1
|
|
324
|
-
}),
|
|
324
|
+
}), Ht = /* @__PURE__ */ o("div")({
|
|
325
325
|
name: "Options",
|
|
326
326
|
class: "o1c8nxcx",
|
|
327
327
|
propsAsIs: !1
|
|
328
|
-
}),
|
|
328
|
+
}), Gt = /* @__PURE__ */ o("button")({
|
|
329
329
|
name: "ButtonContainer",
|
|
330
330
|
class: "b1b6dl8t",
|
|
331
331
|
propsAsIs: !1
|
|
332
|
-
}),
|
|
332
|
+
}), Jt = /* @__PURE__ */ o("div")({
|
|
333
333
|
name: "ButtonPct",
|
|
334
334
|
class: "b4iik8i",
|
|
335
335
|
propsAsIs: !1
|
|
336
|
-
}),
|
|
336
|
+
}), Xt = /* @__PURE__ */ o("span")({
|
|
337
337
|
name: "ButtonBody",
|
|
338
338
|
class: "b1gq1lnf",
|
|
339
339
|
propsAsIs: !1
|
|
340
|
-
}),
|
|
340
|
+
}), Kt = /* @__PURE__ */ o("div")({
|
|
341
341
|
name: "IconContainer",
|
|
342
342
|
class: "i1j65z51",
|
|
343
343
|
propsAsIs: !1
|
|
344
|
-
}),
|
|
344
|
+
}), es = /* @__PURE__ */ o("div")({
|
|
345
345
|
name: "IconWrap",
|
|
346
346
|
class: "i19tpfua",
|
|
347
347
|
propsAsIs: !1
|
|
348
|
-
}), Ee = /* @__PURE__ */
|
|
348
|
+
}), Ee = /* @__PURE__ */ o("img")({
|
|
349
349
|
name: "Icon",
|
|
350
350
|
class: "i1tubmma",
|
|
351
351
|
propsAsIs: !1
|
|
352
|
-
}),
|
|
352
|
+
}), ts = () => Ee, ss = /* @__PURE__ */ o(ts())({
|
|
353
353
|
name: "IconDefault",
|
|
354
354
|
class: "i1grrgwj",
|
|
355
355
|
propsAsIs: !0
|
|
356
|
-
}),
|
|
356
|
+
}), ns = () => Ee, is = /* @__PURE__ */ o(ns())({
|
|
357
357
|
name: "IconCircle",
|
|
358
358
|
class: "ibemyq8",
|
|
359
359
|
propsAsIs: !0
|
|
360
|
-
}),
|
|
360
|
+
}), rs = /* @__PURE__ */ o("span")({
|
|
361
361
|
name: "Title",
|
|
362
362
|
class: "t1dceht",
|
|
363
363
|
propsAsIs: !1
|
|
364
|
-
}),
|
|
364
|
+
}), os = /* @__PURE__ */ o("span")({
|
|
365
365
|
name: "Indicators",
|
|
366
366
|
class: "i116q4vq",
|
|
367
367
|
propsAsIs: !1
|
|
368
|
-
}),
|
|
368
|
+
}), as = /* @__PURE__ */ o("span")({
|
|
369
369
|
name: "Pts",
|
|
370
370
|
class: "p17ajcu2",
|
|
371
371
|
propsAsIs: !1
|
|
372
|
-
}),
|
|
372
|
+
}), ls = /* @__PURE__ */ o("span")({
|
|
373
373
|
name: "Percentage",
|
|
374
374
|
class: "pu9kmlb",
|
|
375
375
|
propsAsIs: !1
|
|
376
|
-
}),
|
|
376
|
+
}), cs = () => f, ds = /* @__PURE__ */ o(cs())({
|
|
377
377
|
name: "CheckIcon",
|
|
378
378
|
class: "c1j2j0s0",
|
|
379
379
|
propsAsIs: !0
|
|
380
|
-
}),
|
|
381
|
-
[B.CENTERED]: (e) => /* @__PURE__ */ n(
|
|
382
|
-
[B.TRANSPARENT]: (e) => /* @__PURE__ */ n(
|
|
383
|
-
[B.ROUNDED]: (e) => /* @__PURE__ */ n(
|
|
380
|
+
}), pe = {
|
|
381
|
+
[B.CENTERED]: (e) => /* @__PURE__ */ n(ss, { alt: "option-icon", src: e }),
|
|
382
|
+
[B.TRANSPARENT]: (e) => /* @__PURE__ */ n(Kt, { children: /* @__PURE__ */ n(es, { style: { backgroundImage: `url(${e})` } }) }),
|
|
383
|
+
[B.ROUNDED]: (e) => /* @__PURE__ */ n(is, { alt: "option-icon", src: e }),
|
|
384
384
|
[B.NONE]: () => null,
|
|
385
385
|
[B.UNSET]: () => null
|
|
386
|
-
},
|
|
386
|
+
}, us = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: i, questionVoted: r }) => {
|
|
387
387
|
if (e === N.POLL && i)
|
|
388
388
|
return "correct";
|
|
389
389
|
if (e === N.PREDICTION) {
|
|
390
|
-
if (t &&
|
|
390
|
+
if (t && r)
|
|
391
391
|
return i ? s ? "correct" : "incorrect" : "unset";
|
|
392
392
|
if (i)
|
|
393
393
|
return "correct";
|
|
394
394
|
}
|
|
395
|
-
return e === N.TRIVIA &&
|
|
396
|
-
},
|
|
395
|
+
return e === N.TRIVIA && r && i ? s ? "correct" : "incorrect" : "unset";
|
|
396
|
+
}, ps = ({
|
|
397
397
|
questionType: e,
|
|
398
398
|
questionVoted: t,
|
|
399
399
|
correct: s,
|
|
400
400
|
hasCorrectAnswer: i,
|
|
401
|
-
questionStatus:
|
|
402
|
-
}) => e === N.TRIVIA ? t && s : e === N.PREDICTION ? t && s && i ||
|
|
401
|
+
questionStatus: r
|
|
402
|
+
}) => e === N.TRIVIA ? t && s : e === N.PREDICTION ? t && s && i || r === $.RESOLVED && s : !1, Ms = (e) => {
|
|
403
403
|
var t;
|
|
404
404
|
const {
|
|
405
405
|
// option props
|
|
406
406
|
id: s,
|
|
407
407
|
icon: i,
|
|
408
|
-
text:
|
|
408
|
+
text: r,
|
|
409
409
|
percentageDecimal: l,
|
|
410
410
|
points: a,
|
|
411
411
|
// extra props
|
|
@@ -416,21 +416,21 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
416
416
|
imageMode: p,
|
|
417
417
|
answerTimeExpired: h,
|
|
418
418
|
questionStatus: m,
|
|
419
|
-
isLoading:
|
|
419
|
+
isLoading: x,
|
|
420
420
|
questionType: D,
|
|
421
421
|
correct: A,
|
|
422
422
|
hasCorrectAnswer: g,
|
|
423
423
|
votedAfterQuestionClosed: y,
|
|
424
424
|
enteredAnActiveQuestion: j,
|
|
425
425
|
marketClosed: v
|
|
426
|
-
} = e, O =
|
|
426
|
+
} = e, O = us(e), Q = ps({ questionType: D, questionVoted: I, correct: A, hasCorrectAnswer: g, questionStatus: m }), b = v && D === N.PREDICTION, Z = I || b, T = D === N.PREDICTION && !I && m !== $.RESOLVED;
|
|
427
427
|
return /* @__PURE__ */ u(
|
|
428
|
-
|
|
428
|
+
Gt,
|
|
429
429
|
{
|
|
430
430
|
value: s,
|
|
431
431
|
"data-selected": M,
|
|
432
432
|
"data-answer-state": O,
|
|
433
|
-
disabled: I ||
|
|
433
|
+
disabled: I || x || h || b && !j || b && j && y,
|
|
434
434
|
"data-is-not-checked": I && !M && O !== "incorrect",
|
|
435
435
|
onClick: (L) => {
|
|
436
436
|
d(
|
|
@@ -438,110 +438,110 @@ const Xe = /* @__PURE__ */ r("div")({
|
|
|
438
438
|
), c(L);
|
|
439
439
|
},
|
|
440
440
|
children: [
|
|
441
|
-
/* @__PURE__ */ n(
|
|
442
|
-
/* @__PURE__ */ u(
|
|
443
|
-
i && p && ((t =
|
|
444
|
-
/* @__PURE__ */ n(
|
|
441
|
+
/* @__PURE__ */ n(Jt, { "data-answer-state": O, style: { width: `${Z ? l : 0}%` } }),
|
|
442
|
+
/* @__PURE__ */ u(Xt, { children: [
|
|
443
|
+
i && p && ((t = pe[p]) == null ? void 0 : t.call(pe, i)),
|
|
444
|
+
/* @__PURE__ */ n(rs, { children: r }),
|
|
445
445
|
T && /* @__PURE__ */ u("div", { children: [
|
|
446
|
-
/* @__PURE__ */ n(
|
|
447
|
-
/* @__PURE__ */ n(
|
|
446
|
+
/* @__PURE__ */ n(ne, { value: a }),
|
|
447
|
+
/* @__PURE__ */ n(as, { children: "pts" })
|
|
448
448
|
] }),
|
|
449
|
-
Z && /* @__PURE__ */ u(
|
|
450
|
-
Q && /* @__PURE__ */ n(
|
|
451
|
-
/* @__PURE__ */ n(
|
|
449
|
+
Z && /* @__PURE__ */ u(os, { children: [
|
|
450
|
+
Q && /* @__PURE__ */ n(ds, { name: "selected" }),
|
|
451
|
+
/* @__PURE__ */ n(ls, { children: /* @__PURE__ */ n(ne, { value: l, suffix: "%" }) })
|
|
452
452
|
] })
|
|
453
453
|
] })
|
|
454
454
|
]
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
};
|
|
458
|
-
var
|
|
459
|
-
let [a, c] = w(s), d = R(0), M = R(s), I = R(s * -1e3), p = R(null), h = R(null), m = R(null),
|
|
458
|
+
var Me = typeof window > "u" ? ee : Je, Is = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: i = 0, onComplete: r, onUpdate: l }) => {
|
|
459
|
+
let [a, c] = w(s), d = R(0), M = R(s), I = R(s * -1e3), p = R(null), h = R(null), m = R(null), x = (g) => {
|
|
460
460
|
let y = g / 1e3;
|
|
461
461
|
if (h.current === null) {
|
|
462
|
-
h.current = y, p.current = requestAnimationFrame(
|
|
462
|
+
h.current = y, p.current = requestAnimationFrame(x);
|
|
463
463
|
return;
|
|
464
464
|
}
|
|
465
465
|
let j = y - h.current, v = d.current + j;
|
|
466
466
|
h.current = y, d.current = v;
|
|
467
467
|
let O = M.current + (i === 0 ? v : (v / i | 0) * i), Q = M.current + v, b = typeof t == "number" && Q >= t;
|
|
468
|
-
c(b ? t : O), b || (p.current = requestAnimationFrame(
|
|
468
|
+
c(b ? t : O), b || (p.current = requestAnimationFrame(x));
|
|
469
469
|
}, D = () => {
|
|
470
470
|
p.current && cancelAnimationFrame(p.current), m.current && clearTimeout(m.current), h.current = null;
|
|
471
471
|
}, A = W((g) => {
|
|
472
472
|
D(), d.current = 0;
|
|
473
473
|
let y = typeof g == "number" ? g : s;
|
|
474
|
-
M.current = y, c(y), e && (p.current = requestAnimationFrame(
|
|
474
|
+
M.current = y, c(y), e && (p.current = requestAnimationFrame(x));
|
|
475
475
|
}, [e, s]);
|
|
476
|
-
return
|
|
476
|
+
return Me(() => {
|
|
477
477
|
if (l == null || l(a), t && a >= t) {
|
|
478
478
|
I.current += t * 1e3;
|
|
479
|
-
let { shouldRepeat: g = !1, delay: y = 0, newStartAt: j } = (
|
|
479
|
+
let { shouldRepeat: g = !1, delay: y = 0, newStartAt: j } = (r == null ? void 0 : r(I.current / 1e3)) || {};
|
|
480
480
|
g && (m.current = setTimeout(() => A(j), y * 1e3));
|
|
481
481
|
}
|
|
482
|
-
}, [a, t]),
|
|
483
|
-
},
|
|
484
|
-
let i = e / 2,
|
|
485
|
-
return { path: `m ${i},${
|
|
486
|
-
},
|
|
482
|
+
}, [a, t]), Me(() => (e && (p.current = requestAnimationFrame(x)), D), [e, t, i]), { elapsedTime: a, reset: A };
|
|
483
|
+
}, hs = (e, t, s) => {
|
|
484
|
+
let i = e / 2, r = t / 2, l = i - r, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
|
|
485
|
+
return { path: `m ${i},${r} 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, Ns = (e) => ({ position: "relative", width: e, height: e }), ms = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Le = (e, t, s, i, r) => {
|
|
487
487
|
if (i === 0)
|
|
488
488
|
return t;
|
|
489
|
-
let l = (
|
|
489
|
+
let l = (r ? i - e : e) / i;
|
|
490
490
|
return t + s * l;
|
|
491
|
-
},
|
|
491
|
+
}, he = (e) => {
|
|
492
492
|
var t, s;
|
|
493
|
-
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i,
|
|
494
|
-
},
|
|
493
|
+
return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, r, l, a) => `#${r}${r}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((i) => parseInt(i, 16))) != null ? s : [];
|
|
494
|
+
}, gs = (e, t) => {
|
|
495
495
|
var s;
|
|
496
|
-
let { colors: i, colorsTime:
|
|
496
|
+
let { colors: i, colorsTime: r, isSmoothColorTransition: l = !0 } = e;
|
|
497
497
|
if (typeof i == "string")
|
|
498
498
|
return i;
|
|
499
|
-
let a = (s =
|
|
500
|
-
if (!
|
|
499
|
+
let a = (s = r == null ? void 0 : r.findIndex((h, m) => h >= t && t >= r[m + 1])) != null ? s : -1;
|
|
500
|
+
if (!r || a === -1)
|
|
501
501
|
return i[0];
|
|
502
502
|
if (!l)
|
|
503
503
|
return i[a];
|
|
504
|
-
let c =
|
|
504
|
+
let c = r[a] - t, d = r[a] - r[a + 1], M = he(i[a]), I = he(i[a + 1]), p = !!e.isGrowing;
|
|
505
505
|
return `rgb(${M.map((h, m) => Le(c, h, I[m] - h, d, p) | 0).join(",")})`;
|
|
506
|
-
},
|
|
507
|
-
let { duration: t, initialRemainingTime: s, updateInterval: i, size:
|
|
506
|
+
}, Ds = (e) => {
|
|
507
|
+
let { duration: t, initialRemainingTime: s, updateInterval: i, size: r = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: M = "clockwise", onComplete: I, onUpdate: p } = e, h = R(), m = Math.max(l, a ?? 0), { path: x, pathLength: D } = hs(r, m, M), { elapsedTime: A } = Is({ isPlaying: c, duration: t, startAt: Ie(t, s), updateInterval: i, onUpdate: typeof p == "function" ? (y) => {
|
|
508
508
|
let j = Math.ceil(t - y);
|
|
509
509
|
j !== h.current && (h.current = j, p(j));
|
|
510
510
|
} : void 0, onComplete: typeof I == "function" ? (y) => {
|
|
511
511
|
var j;
|
|
512
512
|
let { shouldRepeat: v, delay: O, newInitialRemainingTime: Q } = (j = I(y)) != null ? j : {};
|
|
513
513
|
if (v)
|
|
514
|
-
return { shouldRepeat: v, delay: O, newStartAt:
|
|
514
|
+
return { shouldRepeat: v, delay: O, newStartAt: Ie(t, Q) };
|
|
515
515
|
} : void 0 }), g = t - A;
|
|
516
|
-
return { elapsedTime: A, path:
|
|
516
|
+
return { elapsedTime: A, path: x, pathLength: D, remainingTime: Math.ceil(g), rotation: M, size: r, stroke: gs(e, g), strokeDashoffset: Le(A, 0, D, t, d), strokeWidth: l };
|
|
517
517
|
}, ze = (e) => {
|
|
518
|
-
let { children: t, strokeLinecap: s, trailColor: i, trailStrokeWidth:
|
|
519
|
-
return V.createElement("div", { style:
|
|
518
|
+
let { children: t, strokeLinecap: s, trailColor: i, trailStrokeWidth: r } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: M, elapsedTime: I, size: p, strokeWidth: h } = Ds(e);
|
|
519
|
+
return V.createElement("div", { style: Ns(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: i ?? "#d9d9d9", strokeWidth: r ?? h }), V.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: h, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && V.createElement("div", { style: ms }, t({ remainingTime: M, elapsedTime: I, color: c })));
|
|
520
520
|
};
|
|
521
521
|
ze.displayName = "CountdownCircleTimer";
|
|
522
|
-
const
|
|
522
|
+
const Ts = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRAY3], As = [10, 10, 1, 0], js = /* @__PURE__ */ o("div")({
|
|
523
523
|
name: "RemainingTime",
|
|
524
524
|
class: "r165427",
|
|
525
525
|
propsAsIs: !1
|
|
526
|
-
}),
|
|
526
|
+
}), ys = U.SECONDARY_GREEN6, Ne = U.SECONDARY_RED3, vs = U.NEUTRALS_GRAY3, fs = ({
|
|
527
527
|
isPlaying: e = !0,
|
|
528
528
|
duration: t = 30,
|
|
529
529
|
onTimerExpired: s
|
|
530
530
|
}) => {
|
|
531
|
-
const [i,
|
|
531
|
+
const [i, r] = w(t > 10 ? ys : Ne), l = ({
|
|
532
532
|
remainingTime: d
|
|
533
|
-
}) => /* @__PURE__ */ n(
|
|
533
|
+
}) => /* @__PURE__ */ n(js, {
|
|
534
534
|
children: d
|
|
535
535
|
}), a = W(() => {
|
|
536
|
-
s == null || s(),
|
|
537
|
-
}, [s,
|
|
538
|
-
d === 10 &&
|
|
539
|
-
}, [
|
|
536
|
+
s == null || s(), r(vs);
|
|
537
|
+
}, [s, r]), c = W((d) => {
|
|
538
|
+
d === 10 && r(Ne);
|
|
539
|
+
}, [r]);
|
|
540
540
|
return /* @__PURE__ */ n(ze, {
|
|
541
541
|
isPlaying: e,
|
|
542
542
|
duration: t,
|
|
543
|
-
colors:
|
|
544
|
-
colorsTime:
|
|
543
|
+
colors: Ts,
|
|
544
|
+
colorsTime: As,
|
|
545
545
|
size: 32,
|
|
546
546
|
strokeWidth: 2,
|
|
547
547
|
trailStrokeWidth: 2,
|
|
@@ -550,62 +550,62 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
550
550
|
onUpdate: c,
|
|
551
551
|
children: l
|
|
552
552
|
});
|
|
553
|
-
},
|
|
553
|
+
}, xs = /* @__PURE__ */ o("div")({
|
|
554
554
|
name: "WinBarContainer",
|
|
555
555
|
class: "wie6cqo",
|
|
556
556
|
propsAsIs: !1
|
|
557
|
-
}),
|
|
557
|
+
}), Es = /* @__PURE__ */ o("div")({
|
|
558
558
|
name: "Content",
|
|
559
559
|
class: "cgizw4u",
|
|
560
560
|
propsAsIs: !1
|
|
561
|
-
}),
|
|
561
|
+
}), Ls = /* @__PURE__ */ o("div")({
|
|
562
562
|
name: "Title",
|
|
563
563
|
class: "t1l3ucjp",
|
|
564
564
|
propsAsIs: !1
|
|
565
|
-
}),
|
|
565
|
+
}), zs = () => f, Os = /* @__PURE__ */ o(zs())({
|
|
566
566
|
name: "WinIcon",
|
|
567
567
|
class: "wx7j799",
|
|
568
568
|
propsAsIs: !0
|
|
569
|
-
}),
|
|
569
|
+
}), Cs = /* @__PURE__ */ o("div")({
|
|
570
570
|
name: "Points",
|
|
571
571
|
class: "p4lwuj0",
|
|
572
572
|
propsAsIs: !1
|
|
573
|
-
}),
|
|
573
|
+
}), Ss = /* @__PURE__ */ o("span")({
|
|
574
574
|
name: "PointsCount",
|
|
575
575
|
class: "po9i64o",
|
|
576
576
|
propsAsIs: !1
|
|
577
|
-
}),
|
|
577
|
+
}), ks = /* @__PURE__ */ o("span")({
|
|
578
578
|
name: "PointsUnits",
|
|
579
579
|
class: "pe5g05h",
|
|
580
580
|
propsAsIs: !1
|
|
581
|
-
}),
|
|
581
|
+
}), ws = ({
|
|
582
582
|
title: e,
|
|
583
583
|
points: t,
|
|
584
584
|
isPlayingTimer: s,
|
|
585
585
|
isTimer: i,
|
|
586
|
-
questionType:
|
|
586
|
+
questionType: r,
|
|
587
587
|
timerDuration: l,
|
|
588
588
|
onTimerExpired: a
|
|
589
|
-
}) => /* @__PURE__ */ u(
|
|
590
|
-
/* @__PURE__ */ u(
|
|
591
|
-
e && /* @__PURE__ */ n(
|
|
592
|
-
t !== void 0 &&
|
|
593
|
-
/* @__PURE__ */ n(
|
|
594
|
-
/* @__PURE__ */ u(
|
|
595
|
-
/* @__PURE__ */ n(
|
|
596
|
-
/* @__PURE__ */ n(
|
|
589
|
+
}) => /* @__PURE__ */ u(xs, { style: { justifyContent: r === N.PREDICTION ? "center" : "space-between" }, children: [
|
|
590
|
+
/* @__PURE__ */ u(Es, { children: [
|
|
591
|
+
e && /* @__PURE__ */ n(Ls, { children: e }),
|
|
592
|
+
t !== void 0 && r !== N.POLL && /* @__PURE__ */ u(S, { children: [
|
|
593
|
+
/* @__PURE__ */ n(Os, { name: "icon-trophy" }),
|
|
594
|
+
/* @__PURE__ */ u(Cs, { children: [
|
|
595
|
+
/* @__PURE__ */ n(Ss, { children: /* @__PURE__ */ n(ne, { value: t }) }),
|
|
596
|
+
/* @__PURE__ */ n(ks, { children: "PTS" })
|
|
597
597
|
] })
|
|
598
598
|
] })
|
|
599
599
|
] }),
|
|
600
|
-
i &&
|
|
601
|
-
] }),
|
|
602
|
-
var
|
|
603
|
-
const a = e.subject, c = e.type, d = e.status, M = (
|
|
604
|
-
|
|
600
|
+
i && r !== N.PREDICTION && /* @__PURE__ */ n(fs, { isPlaying: s, onTimerExpired: a, duration: l })
|
|
601
|
+
] }), bs = ({ openedQuestion: e, isLoading: t, vote: s, close: i }) => {
|
|
602
|
+
var r, l;
|
|
603
|
+
const a = e.subject, c = e.type, d = e.status, M = (r = e.options) == null ? void 0 : r.options, I = e.marketClosed, [p, h] = w(!1), [m, x] = w(!1), [D, A] = w(!0), [g, y] = w(!1), [j, v] = w(""), O = e == null ? void 0 : e.id;
|
|
604
|
+
ee(() => {
|
|
605
605
|
c === N.PREDICTION ? I && A(!1) : d === $.RESOLVED && A(!1);
|
|
606
606
|
}, []);
|
|
607
607
|
const Q = W((E) => {
|
|
608
|
-
|
|
608
|
+
x(E), h(!0);
|
|
609
609
|
}, []), b = W(
|
|
610
610
|
async (E) => {
|
|
611
611
|
if (O) {
|
|
@@ -648,7 +648,7 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
648
648
|
d,
|
|
649
649
|
b,
|
|
650
650
|
j
|
|
651
|
-
]), be = M && (M.case === "trivia" || M.case === "prediction") ? M.value : void 0, P = d === $.RESOLVED && c === N.TRIVIA && !T && !D,
|
|
651
|
+
]), be = M && (M.case === "trivia" || M.case === "prediction") ? M.value : void 0, P = d === $.RESOLVED && c === N.TRIVIA && !T && !D, le = c === N.TRIVIA && m && p && D, ce = k(() => c === N.PREDICTION ? !!(T && !L || T && L && C != null && C.youVoted) : !0, [c, T, L, C]), $e = k(() => {
|
|
652
652
|
if (c === N.PREDICTION && T && (!L || L && C != null && C.youVoted))
|
|
653
653
|
return T.points;
|
|
654
654
|
if (!(P || g))
|
|
@@ -661,10 +661,10 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
661
661
|
P,
|
|
662
662
|
c,
|
|
663
663
|
L
|
|
664
|
-
]), Qe = k(() => c === N.PREDICTION && T ? L ? L && C != null && C.youVoted ? "You won" : "" : "To win" : P || g ? "Time expired" : c === N.POLL ? "Time remaining" : T ? "You won" : "To win", [g, c, T, P, L, C]), Re = T || P ||
|
|
665
|
-
return /* @__PURE__ */ n(Pe, { "data-question-header": "true", children: /* @__PURE__ */ n(
|
|
664
|
+
]), Qe = k(() => c === N.PREDICTION && T ? L ? L && C != null && C.youVoted ? "You won" : "" : "To win" : P || g ? "Time expired" : c === N.POLL ? "Time remaining" : T ? "You won" : "To win", [g, c, T, P, L, C]), Re = T || P || le || c === N.TRIVIA && d === $.RESOLVED && D;
|
|
665
|
+
return /* @__PURE__ */ n(Pe, { "data-question-header": "true", children: /* @__PURE__ */ n(Bt, { children: /* @__PURE__ */ u(Ft, { children: [
|
|
666
666
|
/* @__PURE__ */ n(
|
|
667
|
-
|
|
667
|
+
_t,
|
|
668
668
|
{
|
|
669
669
|
feedbackMessages: be,
|
|
670
670
|
questionVoted: !!T,
|
|
@@ -673,15 +673,15 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
673
673
|
hasCorrectAnswer: L,
|
|
674
674
|
questionStatus: d,
|
|
675
675
|
showExpiredNotification: P,
|
|
676
|
-
showClosedNotificationTrivia:
|
|
676
|
+
showClosedNotificationTrivia: le,
|
|
677
677
|
votedInCurrentRender: p,
|
|
678
678
|
votedAfterQuestionClosed: m,
|
|
679
679
|
enteredAnActiveQuestion: D,
|
|
680
680
|
marketClosed: I
|
|
681
681
|
}
|
|
682
682
|
),
|
|
683
|
-
|
|
684
|
-
|
|
683
|
+
ce && /* @__PURE__ */ n(
|
|
684
|
+
ws,
|
|
685
685
|
{
|
|
686
686
|
title: Qe,
|
|
687
687
|
points: $e,
|
|
@@ -693,15 +693,15 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
693
693
|
}
|
|
694
694
|
),
|
|
695
695
|
g ? /* @__PURE__ */ n(
|
|
696
|
-
|
|
696
|
+
Yt,
|
|
697
697
|
{
|
|
698
698
|
title: "More to come...",
|
|
699
699
|
description: "Watch for additional enhanced stream interactive experience."
|
|
700
700
|
}
|
|
701
701
|
) : /* @__PURE__ */ u(S, { children: [
|
|
702
|
-
/* @__PURE__ */ n(
|
|
703
|
-
/* @__PURE__ */ n(
|
|
704
|
-
|
|
702
|
+
/* @__PURE__ */ n(Zt, { style: ce ? {} : { marginTop: 0 }, children: a }),
|
|
703
|
+
/* @__PURE__ */ n(Ht, { children: we.map((E) => /* @__PURE__ */ n(
|
|
704
|
+
Ms,
|
|
705
705
|
{
|
|
706
706
|
...E,
|
|
707
707
|
markThatVoted: Q,
|
|
@@ -713,27 +713,27 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
713
713
|
)) })
|
|
714
714
|
] })
|
|
715
715
|
] }) }) });
|
|
716
|
-
},
|
|
716
|
+
}, $s = /* @__PURE__ */ o("div")({
|
|
717
717
|
name: "Container",
|
|
718
718
|
class: "cgn5uen",
|
|
719
719
|
propsAsIs: !1
|
|
720
|
-
}),
|
|
720
|
+
}), Qs = /* @__PURE__ */ o("div")({
|
|
721
721
|
name: "Content",
|
|
722
722
|
class: "c1px8nt6",
|
|
723
723
|
propsAsIs: !1
|
|
724
|
-
}),
|
|
724
|
+
}), Rs = /* @__PURE__ */ o("h3")({
|
|
725
725
|
name: "Title",
|
|
726
726
|
class: "t5et2jt",
|
|
727
727
|
propsAsIs: !1
|
|
728
|
-
}),
|
|
728
|
+
}), Us = /* @__PURE__ */ o("div")({
|
|
729
729
|
name: "Description",
|
|
730
730
|
class: "d1i2kpk2",
|
|
731
731
|
propsAsIs: !1
|
|
732
|
-
}),
|
|
732
|
+
}), Ys = /* @__PURE__ */ o("div")({
|
|
733
733
|
name: "DateWrap",
|
|
734
734
|
class: "dd3lh3p",
|
|
735
735
|
propsAsIs: !1
|
|
736
|
-
}),
|
|
736
|
+
}), Ps = /* @__PURE__ */ o("img")({
|
|
737
737
|
name: "Image",
|
|
738
738
|
class: "i1gfjeu5",
|
|
739
739
|
propsAsIs: !1
|
|
@@ -742,157 +742,157 @@ const ms = [U.PRIMARY_GREEN1, U.SECONDARY_RED1, U.SECONDARY_RED1, U.NEUTRALS_GRA
|
|
|
742
742
|
image: t,
|
|
743
743
|
title: s,
|
|
744
744
|
isPickHistory: i,
|
|
745
|
-
instantView:
|
|
745
|
+
instantView: r,
|
|
746
746
|
notification: l
|
|
747
747
|
}) => {
|
|
748
748
|
const a = k(() => {
|
|
749
749
|
if (e) {
|
|
750
750
|
const d = new Date(e);
|
|
751
|
-
if (
|
|
751
|
+
if (ae(d))
|
|
752
752
|
return {
|
|
753
753
|
date: re(d),
|
|
754
|
-
time:
|
|
754
|
+
time: oe(d)
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
757
|
return null;
|
|
758
|
-
}, [e]), c = (
|
|
759
|
-
return /* @__PURE__ */ u(
|
|
760
|
-
a && /* @__PURE__ */ u(
|
|
758
|
+
}, [e]), c = (r == null ? void 0 : r.image) || t;
|
|
759
|
+
return /* @__PURE__ */ u($s, { children: [
|
|
760
|
+
a && /* @__PURE__ */ u(Ys, { children: [
|
|
761
761
|
a.date,
|
|
762
762
|
" · ",
|
|
763
763
|
a.time
|
|
764
764
|
] }),
|
|
765
|
-
(
|
|
766
|
-
c && !(
|
|
767
|
-
/* @__PURE__ */ u(
|
|
768
|
-
/* @__PURE__ */ n(
|
|
769
|
-
/* @__PURE__ */ n(
|
|
765
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ n(qe, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
766
|
+
c && !(r != null && r.video) && /* @__PURE__ */ n(Ps, { src: c }),
|
|
767
|
+
/* @__PURE__ */ u(Qs, { children: [
|
|
768
|
+
/* @__PURE__ */ n(Rs, { children: i ? s : r == null ? void 0 : r.heading }),
|
|
769
|
+
/* @__PURE__ */ n(Us, { children: i ? l == null ? void 0 : l.body : r == null ? void 0 : r.body })
|
|
770
770
|
] })
|
|
771
771
|
] });
|
|
772
|
-
},
|
|
772
|
+
}, qs = /* @__PURE__ */ o("div")({
|
|
773
773
|
name: "Container",
|
|
774
774
|
class: "c1euiow",
|
|
775
775
|
propsAsIs: !1
|
|
776
|
-
}),
|
|
776
|
+
}), Vs = /* @__PURE__ */ o("a")({
|
|
777
777
|
name: "WebLinkBtn",
|
|
778
778
|
class: "w19zie3h",
|
|
779
779
|
propsAsIs: !1
|
|
780
|
-
}),
|
|
780
|
+
}), Ws = ({ instantView: e, ...t }) => /* @__PURE__ */ u(qs, { children: [
|
|
781
781
|
/* @__PURE__ */ n(Oe, { instantView: e, ...t }),
|
|
782
|
-
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ u(
|
|
782
|
+
(e == null ? void 0 : e.webLink) && /* @__PURE__ */ u(Vs, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
|
|
783
783
|
e == null ? void 0 : e.webLink.label,
|
|
784
|
-
/* @__PURE__ */ n(
|
|
784
|
+
/* @__PURE__ */ n(f, { name: "icon-external-link" })
|
|
785
785
|
] })
|
|
786
|
-
] }),
|
|
786
|
+
] }), _s = /* @__PURE__ */ o("div")({
|
|
787
787
|
name: "Container",
|
|
788
788
|
class: "c1dcxmvf",
|
|
789
789
|
propsAsIs: !1
|
|
790
|
-
}),
|
|
790
|
+
}), Bs = /* @__PURE__ */ o("div")({
|
|
791
791
|
name: "DateTime",
|
|
792
792
|
class: "db4q22c",
|
|
793
793
|
propsAsIs: !1
|
|
794
|
-
}),
|
|
794
|
+
}), Fs = /* @__PURE__ */ o("blockquote")({
|
|
795
795
|
name: "Quote",
|
|
796
796
|
class: "q111mmic",
|
|
797
797
|
propsAsIs: !1
|
|
798
|
-
}),
|
|
798
|
+
}), Zs = ({ created: e, ...t }) => {
|
|
799
799
|
const s = k(() => {
|
|
800
800
|
if (e) {
|
|
801
801
|
const i = new Date(e);
|
|
802
|
-
if (
|
|
802
|
+
if (ae(i))
|
|
803
803
|
return {
|
|
804
804
|
date: re(i),
|
|
805
|
-
time:
|
|
805
|
+
time: oe(i)
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
808
|
return null;
|
|
809
809
|
}, [e]);
|
|
810
|
-
return /* @__PURE__ */ u(
|
|
811
|
-
s && /* @__PURE__ */ u(
|
|
810
|
+
return /* @__PURE__ */ u(_s, { children: [
|
|
811
|
+
s && /* @__PURE__ */ u(Bs, { children: [
|
|
812
812
|
s.date,
|
|
813
813
|
" · ",
|
|
814
814
|
s.time
|
|
815
815
|
] }),
|
|
816
|
-
t.title && /* @__PURE__ */ n(
|
|
817
|
-
/* @__PURE__ */ n(
|
|
816
|
+
t.title && /* @__PURE__ */ n(Fs, { children: t.title }),
|
|
817
|
+
/* @__PURE__ */ n(Ae, { ...t })
|
|
818
818
|
] });
|
|
819
|
-
},
|
|
819
|
+
}, Hs = /* @__PURE__ */ o("div")({
|
|
820
820
|
name: "QuestionContainer",
|
|
821
821
|
class: "qdri6g3",
|
|
822
822
|
propsAsIs: !1
|
|
823
|
-
}),
|
|
823
|
+
}), Gs = ({
|
|
824
824
|
openedQuestion: e
|
|
825
825
|
}) => {
|
|
826
826
|
var t, s;
|
|
827
|
-
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(
|
|
827
|
+
return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(Ws, {
|
|
828
828
|
created: e.attributes.created,
|
|
829
829
|
...e.attributes.attributes.value
|
|
830
|
-
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(
|
|
830
|
+
}) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(Zs, {
|
|
831
831
|
created: e.attributes.created,
|
|
832
832
|
...e.attributes.attributes.value
|
|
833
833
|
}) : null;
|
|
834
|
-
},
|
|
834
|
+
}, Js = ({
|
|
835
835
|
extendedQuestion: e,
|
|
836
836
|
vote: t,
|
|
837
837
|
close: s
|
|
838
838
|
}) => {
|
|
839
839
|
const {
|
|
840
840
|
loading: i,
|
|
841
|
-
data:
|
|
841
|
+
data: r
|
|
842
842
|
} = e;
|
|
843
|
-
return
|
|
843
|
+
return r ? /* @__PURE__ */ n(bs, {
|
|
844
844
|
vote: t,
|
|
845
845
|
close: s,
|
|
846
|
-
openedQuestion:
|
|
846
|
+
openedQuestion: r,
|
|
847
847
|
isLoading: !!i
|
|
848
848
|
}) : null;
|
|
849
|
-
},
|
|
849
|
+
}, Xs = ({
|
|
850
850
|
gamification: e
|
|
851
851
|
}) => {
|
|
852
852
|
var t;
|
|
853
853
|
const s = Y(e.openedQuestion.$store), i = Y(e.openedQuestion.$extendedStore);
|
|
854
854
|
if (!s)
|
|
855
855
|
return null;
|
|
856
|
-
const
|
|
857
|
-
return /* @__PURE__ */ u(
|
|
856
|
+
const r = s.type;
|
|
857
|
+
return /* @__PURE__ */ u(Hs, {
|
|
858
858
|
children: [/* @__PURE__ */ n(ye, {
|
|
859
859
|
close: e.closeQuestion,
|
|
860
860
|
type: ((t = s.attributes) == null ? void 0 : t.type) || N.UNSET
|
|
861
|
-
}),
|
|
861
|
+
}), r === "question" && /* @__PURE__ */ n(Js, {
|
|
862
862
|
vote: e.submitAnswer,
|
|
863
863
|
close: e.closeQuestion,
|
|
864
864
|
extendedQuestion: i
|
|
865
|
-
}),
|
|
865
|
+
}), r !== "question" && /* @__PURE__ */ n(Gs, {
|
|
866
866
|
openedQuestion: s
|
|
867
|
-
}), /* @__PURE__ */ n(
|
|
867
|
+
}), /* @__PURE__ */ n($t, {
|
|
868
868
|
sponsorLogo: ""
|
|
869
869
|
})]
|
|
870
870
|
});
|
|
871
|
-
},
|
|
871
|
+
}, Ks = /* @__PURE__ */ o("div")({
|
|
872
872
|
name: "Container",
|
|
873
873
|
class: "c115qtkr",
|
|
874
874
|
propsAsIs: !1
|
|
875
|
-
}),
|
|
875
|
+
}), en = /* @__PURE__ */ o("div")({
|
|
876
876
|
name: "STabs",
|
|
877
877
|
class: "sxnslc8",
|
|
878
878
|
propsAsIs: !1
|
|
879
|
-
}),
|
|
879
|
+
}), tn = /* @__PURE__ */ o("button")({
|
|
880
880
|
name: "Button",
|
|
881
881
|
class: "b1umzux0",
|
|
882
882
|
propsAsIs: !1
|
|
883
|
-
}),
|
|
883
|
+
}), sn = /* @__PURE__ */ o("span")({
|
|
884
884
|
name: "Title",
|
|
885
885
|
class: "tspsaas",
|
|
886
886
|
propsAsIs: !1
|
|
887
887
|
});
|
|
888
|
-
var
|
|
889
|
-
const
|
|
890
|
-
/* @__PURE__ */ n(
|
|
888
|
+
var K = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(K || {});
|
|
889
|
+
const me = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(tn, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(sn, { children: e }) }), nn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(Ks, { children: /* @__PURE__ */ u(en, { "data-position": e === "home" ? "left" : "right", children: [
|
|
890
|
+
/* @__PURE__ */ n(me, { title: "Home", active: e === "home", onClick: () => t(
|
|
891
891
|
"home"
|
|
892
892
|
/* HOME */
|
|
893
893
|
) }),
|
|
894
894
|
/* @__PURE__ */ n(
|
|
895
|
-
|
|
895
|
+
me,
|
|
896
896
|
{
|
|
897
897
|
title: "Friends",
|
|
898
898
|
active: e === "leaderboard",
|
|
@@ -902,44 +902,44 @@ const ge = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(Xs, { onCl
|
|
|
902
902
|
)
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
|
-
] }) }),
|
|
905
|
+
] }) }), rn = /* @__PURE__ */ o("div")({
|
|
906
906
|
name: "Container",
|
|
907
907
|
class: "c1ux29ft",
|
|
908
908
|
propsAsIs: !1
|
|
909
|
-
}),
|
|
909
|
+
}), on = /* @__PURE__ */ o("img")({
|
|
910
910
|
name: "FriendsIcon",
|
|
911
911
|
class: "f10ncfg2",
|
|
912
912
|
propsAsIs: !1
|
|
913
|
-
}),
|
|
913
|
+
}), an = /* @__PURE__ */ o("div")({
|
|
914
914
|
name: "Content",
|
|
915
915
|
class: "c1yc07bd",
|
|
916
916
|
propsAsIs: !1
|
|
917
|
-
}),
|
|
917
|
+
}), ln = /* @__PURE__ */ o("div")({
|
|
918
918
|
name: "Title",
|
|
919
919
|
class: "tj6cq7w",
|
|
920
920
|
propsAsIs: !1
|
|
921
|
-
}),
|
|
921
|
+
}), cn = /* @__PURE__ */ o("div")({
|
|
922
922
|
name: "Description",
|
|
923
923
|
class: "d1ag78xo",
|
|
924
924
|
propsAsIs: !1
|
|
925
|
-
}),
|
|
925
|
+
}), dn = () => f, un = /* @__PURE__ */ o(dn())({
|
|
926
926
|
name: "ArrowInviteIcon",
|
|
927
927
|
class: "awohrz6",
|
|
928
928
|
propsAsIs: !0
|
|
929
|
-
}),
|
|
930
|
-
/* @__PURE__ */ n(
|
|
931
|
-
/* @__PURE__ */ u(
|
|
932
|
-
/* @__PURE__ */ n(
|
|
933
|
-
/* @__PURE__ */ n(
|
|
929
|
+
}), pn = "data:image/svg+xml;base64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n, { onClick: s, className: i, children: [
|
|
930
|
+
/* @__PURE__ */ n(on, { alt: "friends-icon", src: pn }),
|
|
931
|
+
/* @__PURE__ */ u(an, { children: [
|
|
932
|
+
/* @__PURE__ */ n(ln, { children: e }),
|
|
933
|
+
/* @__PURE__ */ n(cn, { children: t })
|
|
934
934
|
] }),
|
|
935
|
-
/* @__PURE__ */ n(
|
|
935
|
+
/* @__PURE__ */ n(un, { name: "icon-copy" })
|
|
936
936
|
] });
|
|
937
|
-
function
|
|
938
|
-
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, i = e.startIndex,
|
|
939
|
-
return !(i > s ||
|
|
937
|
+
function In(e) {
|
|
938
|
+
var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
|
|
939
|
+
return !(i > s || r < t);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
for (var t = e.isItemLoaded, s = e.itemCount, i = e.minimumBatchSize,
|
|
941
|
+
function hn(e) {
|
|
942
|
+
for (var t = e.isItemLoaded, s = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, M = r; M <= l; M++) {
|
|
943
943
|
var I = t(M);
|
|
944
944
|
I ? d !== null && (a.push(c, d), c = d = null) : (d = M, c === null && (c = M));
|
|
945
945
|
}
|
|
@@ -958,20 +958,20 @@ function pn(e) {
|
|
|
958
958
|
}
|
|
959
959
|
return a;
|
|
960
960
|
}
|
|
961
|
-
var
|
|
961
|
+
var Nn = function(e, t) {
|
|
962
962
|
if (!(e instanceof t))
|
|
963
963
|
throw new TypeError("Cannot call a class as a function");
|
|
964
|
-
},
|
|
964
|
+
}, mn = function() {
|
|
965
965
|
function e(t, s) {
|
|
966
966
|
for (var i = 0; i < s.length; i++) {
|
|
967
|
-
var
|
|
968
|
-
|
|
967
|
+
var r = s[i];
|
|
968
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
return function(t, s, i) {
|
|
972
972
|
return s && e(t.prototype, s), i && e(t, i), t;
|
|
973
973
|
};
|
|
974
|
-
}(),
|
|
974
|
+
}(), gn = function(e, t) {
|
|
975
975
|
if (typeof t != "function" && t !== null)
|
|
976
976
|
throw new TypeError("Super expression must either be null or a function, not " + typeof t);
|
|
977
977
|
e.prototype = Object.create(t && t.prototype, {
|
|
@@ -982,26 +982,26 @@ var Mn = function(e, t) {
|
|
|
982
982
|
configurable: !0
|
|
983
983
|
}
|
|
984
984
|
}), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
|
|
985
|
-
},
|
|
985
|
+
}, ge = function(e, t) {
|
|
986
986
|
if (!e)
|
|
987
987
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
988
988
|
return t && (typeof t == "object" || typeof t == "function") ? t : e;
|
|
989
989
|
};
|
|
990
990
|
(function(e) {
|
|
991
|
-
|
|
991
|
+
gn(t, e);
|
|
992
992
|
function t() {
|
|
993
|
-
var s, i,
|
|
994
|
-
|
|
993
|
+
var s, i, r, l;
|
|
994
|
+
Nn(this, t);
|
|
995
995
|
for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
|
|
996
996
|
c[d] = arguments[d];
|
|
997
|
-
return l = (i = (
|
|
997
|
+
return l = (i = (r = ge(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(M) {
|
|
998
998
|
var I = M.visibleStartIndex, p = M.visibleStopIndex;
|
|
999
|
-
|
|
1000
|
-
},
|
|
1001
|
-
|
|
1002
|
-
}, i),
|
|
999
|
+
r._lastRenderedStartIndex = I, r._lastRenderedStopIndex = p, r._ensureRowsLoaded(I, p);
|
|
1000
|
+
}, r._setRef = function(M) {
|
|
1001
|
+
r._listRef = M;
|
|
1002
|
+
}, i), ge(r, l);
|
|
1003
1003
|
}
|
|
1004
|
-
return
|
|
1004
|
+
return mn(t, [{
|
|
1005
1005
|
key: "resetloadMoreItemsCache",
|
|
1006
1006
|
value: function() {
|
|
1007
1007
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1022,82 +1022,82 @@ var Mn = function(e, t) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
}, {
|
|
1024
1024
|
key: "_ensureRowsLoaded",
|
|
1025
|
-
value: function(i,
|
|
1026
|
-
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, M = d === void 0 ? 10 : d, I = l.threshold, p = I === void 0 ? 15 : I, h =
|
|
1025
|
+
value: function(i, r) {
|
|
1026
|
+
var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, M = d === void 0 ? 10 : d, I = l.threshold, p = I === void 0 ? 15 : I, h = hn({
|
|
1027
1027
|
isItemLoaded: a,
|
|
1028
1028
|
itemCount: c,
|
|
1029
1029
|
minimumBatchSize: M,
|
|
1030
1030
|
startIndex: Math.max(0, i - p),
|
|
1031
|
-
stopIndex: Math.min(c - 1,
|
|
1031
|
+
stopIndex: Math.min(c - 1, r + p)
|
|
1032
1032
|
});
|
|
1033
|
-
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(m,
|
|
1034
|
-
return h[
|
|
1033
|
+
(this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(m, x) {
|
|
1034
|
+
return h[x] !== m;
|
|
1035
1035
|
})) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
|
|
1036
1036
|
}
|
|
1037
1037
|
}, {
|
|
1038
1038
|
key: "_loadUnloadedRanges",
|
|
1039
1039
|
value: function(i) {
|
|
1040
|
-
for (var
|
|
1040
|
+
for (var r = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(M) {
|
|
1041
1041
|
var I = i[M], p = i[M + 1], h = l(I, p);
|
|
1042
1042
|
h != null && h.then(function() {
|
|
1043
|
-
if (
|
|
1044
|
-
lastRenderedStartIndex:
|
|
1045
|
-
lastRenderedStopIndex:
|
|
1043
|
+
if (In({
|
|
1044
|
+
lastRenderedStartIndex: r._lastRenderedStartIndex,
|
|
1045
|
+
lastRenderedStopIndex: r._lastRenderedStopIndex,
|
|
1046
1046
|
startIndex: I,
|
|
1047
1047
|
stopIndex: p
|
|
1048
1048
|
})) {
|
|
1049
|
-
if (
|
|
1049
|
+
if (r._listRef == null)
|
|
1050
1050
|
return;
|
|
1051
|
-
typeof
|
|
1051
|
+
typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(I, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
|
|
1052
1052
|
}
|
|
1053
1053
|
});
|
|
1054
1054
|
}, c = 0; c < i.length; c += 2)
|
|
1055
1055
|
a(c);
|
|
1056
1056
|
}
|
|
1057
1057
|
}]), t;
|
|
1058
|
-
})(
|
|
1059
|
-
const
|
|
1058
|
+
})(Xe);
|
|
1059
|
+
const Dn = /* @__PURE__ */ o("div")({
|
|
1060
1060
|
name: "Container",
|
|
1061
1061
|
class: "culdu4a",
|
|
1062
1062
|
propsAsIs: !1
|
|
1063
|
-
}),
|
|
1063
|
+
}), Tn = /* @__PURE__ */ o("div")({
|
|
1064
1064
|
name: "Position",
|
|
1065
1065
|
class: "pwf8e69",
|
|
1066
1066
|
propsAsIs: !1
|
|
1067
|
-
}),
|
|
1067
|
+
}), An = /* @__PURE__ */ o("img")({
|
|
1068
1068
|
name: "Avatar",
|
|
1069
1069
|
class: "atf4yh4",
|
|
1070
1070
|
propsAsIs: !1
|
|
1071
|
-
}),
|
|
1071
|
+
}), jn = /* @__PURE__ */ o("div")({
|
|
1072
1072
|
name: "AvatarPlaceholder",
|
|
1073
1073
|
class: "a1dg29ja",
|
|
1074
1074
|
propsAsIs: !1
|
|
1075
|
-
}),
|
|
1075
|
+
}), yn = /* @__PURE__ */ o("div")({
|
|
1076
1076
|
name: "Content",
|
|
1077
1077
|
class: "c10a68rc",
|
|
1078
1078
|
propsAsIs: !1
|
|
1079
|
-
}),
|
|
1079
|
+
}), vn = /* @__PURE__ */ o("div")({
|
|
1080
1080
|
name: "NameContainer",
|
|
1081
1081
|
class: "nc4kck5",
|
|
1082
1082
|
propsAsIs: !1
|
|
1083
|
-
}),
|
|
1083
|
+
}), fn = /* @__PURE__ */ o("span")({
|
|
1084
1084
|
name: "Name",
|
|
1085
1085
|
class: "njsrqgr",
|
|
1086
1086
|
propsAsIs: !1
|
|
1087
|
-
}),
|
|
1087
|
+
}), xn = () => f, En = /* @__PURE__ */ o(xn())({
|
|
1088
1088
|
name: "CurrentUserBadge",
|
|
1089
1089
|
class: "c17uc4zr",
|
|
1090
1090
|
propsAsIs: !0
|
|
1091
1091
|
});
|
|
1092
|
-
var Ce = { exports: {} },
|
|
1092
|
+
var Ce = { exports: {} }, Ln = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", zn = Ln, On = zn;
|
|
1093
1093
|
function Se() {
|
|
1094
1094
|
}
|
|
1095
1095
|
function ke() {
|
|
1096
1096
|
}
|
|
1097
1097
|
ke.resetWarningCache = Se;
|
|
1098
|
-
var
|
|
1099
|
-
function e(i,
|
|
1100
|
-
if (d !==
|
|
1098
|
+
var Cn = function() {
|
|
1099
|
+
function e(i, r, l, a, c, d) {
|
|
1100
|
+
if (d !== On) {
|
|
1101
1101
|
var M = new Error(
|
|
1102
1102
|
"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"
|
|
1103
1103
|
);
|
|
@@ -1133,10 +1133,10 @@ var Ln = function() {
|
|
|
1133
1133
|
};
|
|
1134
1134
|
return s.PropTypes = s, s;
|
|
1135
1135
|
};
|
|
1136
|
-
Ce.exports =
|
|
1137
|
-
var
|
|
1138
|
-
const z = /* @__PURE__ */ Ve(
|
|
1139
|
-
class
|
|
1136
|
+
Ce.exports = Cn();
|
|
1137
|
+
var Sn = Ce.exports;
|
|
1138
|
+
const z = /* @__PURE__ */ Ve(Sn);
|
|
1139
|
+
class ie extends Ke {
|
|
1140
1140
|
constructor(t) {
|
|
1141
1141
|
super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
|
|
1142
1142
|
}
|
|
@@ -1230,13 +1230,13 @@ class oe extends Ge {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
scrollListener() {
|
|
1232
1232
|
const t = this.scrollComponent, s = window, i = this.getParentElement(t);
|
|
1233
|
-
let
|
|
1233
|
+
let r;
|
|
1234
1234
|
if (this.props.useWindow) {
|
|
1235
1235
|
const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
|
|
1236
|
-
this.props.isReverse ?
|
|
1236
|
+
this.props.isReverse ? r = a : r = this.calculateOffset(t, a);
|
|
1237
1237
|
} else
|
|
1238
|
-
this.props.isReverse ?
|
|
1239
|
-
|
|
1238
|
+
this.props.isReverse ? r = i.scrollTop : r = t.scrollHeight - i.scrollTop - i.clientHeight;
|
|
1239
|
+
r < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = i.scrollHeight, this.beforeScrollTop = i.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
|
|
1240
1240
|
}
|
|
1241
1241
|
calculateOffset(t, s) {
|
|
1242
1242
|
return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
|
|
@@ -1248,7 +1248,7 @@ class oe extends Ge {
|
|
|
1248
1248
|
const t = this.filterProps(this.props), {
|
|
1249
1249
|
children: s,
|
|
1250
1250
|
element: i,
|
|
1251
|
-
hasMore:
|
|
1251
|
+
hasMore: r,
|
|
1252
1252
|
initialLoad: l,
|
|
1253
1253
|
isReverse: a,
|
|
1254
1254
|
loader: c,
|
|
@@ -1258,17 +1258,17 @@ class oe extends Ge {
|
|
|
1258
1258
|
threshold: p,
|
|
1259
1259
|
useCapture: h,
|
|
1260
1260
|
useWindow: m,
|
|
1261
|
-
getScrollParent:
|
|
1261
|
+
getScrollParent: x,
|
|
1262
1262
|
...D
|
|
1263
1263
|
} = t;
|
|
1264
1264
|
D.ref = (g) => {
|
|
1265
1265
|
this.scrollComponent = g, I && I(g);
|
|
1266
1266
|
};
|
|
1267
1267
|
const A = [s];
|
|
1268
|
-
return
|
|
1268
|
+
return r && (c ? a ? A.unshift(c) : A.push(c) : this.defaultLoader && (a ? A.unshift(this.defaultLoader) : A.push(this.defaultLoader))), V.createElement(i, D, A);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
|
|
1271
|
+
te(ie, "propTypes", {
|
|
1272
1272
|
children: z.node.isRequired,
|
|
1273
1273
|
element: z.node,
|
|
1274
1274
|
hasMore: z.bool,
|
|
@@ -1282,7 +1282,7 @@ se(oe, "propTypes", {
|
|
|
1282
1282
|
threshold: z.number,
|
|
1283
1283
|
useCapture: z.bool,
|
|
1284
1284
|
useWindow: z.bool
|
|
1285
|
-
}),
|
|
1285
|
+
}), te(ie, "defaultProps", {
|
|
1286
1286
|
element: "div",
|
|
1287
1287
|
hasMore: !1,
|
|
1288
1288
|
initialLoad: !0,
|
|
@@ -1295,49 +1295,49 @@ se(oe, "propTypes", {
|
|
|
1295
1295
|
loader: null,
|
|
1296
1296
|
getScrollParent: null
|
|
1297
1297
|
});
|
|
1298
|
-
const
|
|
1298
|
+
const kn = ({
|
|
1299
1299
|
rank: e,
|
|
1300
1300
|
avatar: t,
|
|
1301
1301
|
name: s,
|
|
1302
1302
|
points: i,
|
|
1303
|
-
isCurrentUser:
|
|
1303
|
+
isCurrentUser: r,
|
|
1304
1304
|
openItemDetail: l,
|
|
1305
1305
|
style: a
|
|
1306
|
-
}) => /* @__PURE__ */ u(
|
|
1307
|
-
/* @__PURE__ */ n(
|
|
1308
|
-
/* @__PURE__ */ u(
|
|
1309
|
-
t ? /* @__PURE__ */ n(
|
|
1310
|
-
/* @__PURE__ */ u(
|
|
1311
|
-
/* @__PURE__ */ n(
|
|
1312
|
-
|
|
1306
|
+
}) => /* @__PURE__ */ u(Dn, { onClick: l, style: a, children: [
|
|
1307
|
+
/* @__PURE__ */ n(Tn, { children: e || 0 }),
|
|
1308
|
+
/* @__PURE__ */ u(yn, { children: [
|
|
1309
|
+
t ? /* @__PURE__ */ n(An, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(jn, { children: ve(s || "") }),
|
|
1310
|
+
/* @__PURE__ */ u(vn, { children: [
|
|
1311
|
+
/* @__PURE__ */ n(fn, { children: s || "" }),
|
|
1312
|
+
r && /* @__PURE__ */ n(En, { name: "icon-star" })
|
|
1313
1313
|
] })
|
|
1314
1314
|
] }),
|
|
1315
|
-
/* @__PURE__ */ n("div", { children:
|
|
1316
|
-
] }),
|
|
1315
|
+
/* @__PURE__ */ n("div", { children: fe(i) })
|
|
1316
|
+
] }), wn = /* @__PURE__ */ o("div")({
|
|
1317
1317
|
name: "Container",
|
|
1318
1318
|
class: "c16btbfp",
|
|
1319
1319
|
propsAsIs: !1
|
|
1320
|
-
}),
|
|
1320
|
+
}), bn = ({
|
|
1321
1321
|
items: e,
|
|
1322
1322
|
currentUserId: t,
|
|
1323
1323
|
openItemDetail: s,
|
|
1324
1324
|
fetchMore: i,
|
|
1325
|
-
scrollNode:
|
|
1325
|
+
scrollNode: r,
|
|
1326
1326
|
hasMore: l
|
|
1327
|
-
}) => /* @__PURE__ */ n(
|
|
1327
|
+
}) => /* @__PURE__ */ n(ie, {
|
|
1328
1328
|
loadMore: i,
|
|
1329
1329
|
initialLoad: !1,
|
|
1330
1330
|
hasMore: l,
|
|
1331
1331
|
useWindow: !1,
|
|
1332
|
-
getScrollParent: () =>
|
|
1333
|
-
children: /* @__PURE__ */ n(
|
|
1334
|
-
children: e.map((a) => /* @__PURE__ */ n(
|
|
1332
|
+
getScrollParent: () => r.current,
|
|
1333
|
+
children: /* @__PURE__ */ n(wn, {
|
|
1334
|
+
children: e.map((a) => /* @__PURE__ */ n(kn, {
|
|
1335
1335
|
...a,
|
|
1336
1336
|
openItemDetail: () => s(a.userId),
|
|
1337
1337
|
isCurrentUser: !!t && t === a.userId
|
|
1338
1338
|
}, a.userId))
|
|
1339
1339
|
})
|
|
1340
|
-
}),
|
|
1340
|
+
}), $n = ({ deepLink: e }) => /* @__PURE__ */ n(
|
|
1341
1341
|
We,
|
|
1342
1342
|
{
|
|
1343
1343
|
inviteLink: e,
|
|
@@ -1356,23 +1356,23 @@ const On = ({
|
|
|
1356
1356
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
1357
1357
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1358
1358
|
}
|
|
1359
|
-
),
|
|
1359
|
+
), Qn = /* @__PURE__ */ o("div")({
|
|
1360
1360
|
name: "InviteLinkContainer",
|
|
1361
1361
|
class: "i1chxfpe",
|
|
1362
1362
|
propsAsIs: !1
|
|
1363
|
-
}),
|
|
1363
|
+
}), Rn = ({
|
|
1364
1364
|
gamification: e,
|
|
1365
1365
|
scrollNode: t,
|
|
1366
1366
|
scrollStore: s
|
|
1367
1367
|
}) => {
|
|
1368
1368
|
const {
|
|
1369
1369
|
data: i,
|
|
1370
|
-
hasMore:
|
|
1370
|
+
hasMore: r
|
|
1371
1371
|
} = Y(e.leaderboardList.$store), {
|
|
1372
1372
|
data: l
|
|
1373
1373
|
} = Y(e.deepLink.$store);
|
|
1374
1374
|
if (!(i != null && i.length))
|
|
1375
|
-
return /* @__PURE__ */ n(
|
|
1375
|
+
return /* @__PURE__ */ n($n, {
|
|
1376
1376
|
deepLink: l
|
|
1377
1377
|
});
|
|
1378
1378
|
const a = async () => {
|
|
@@ -1384,263 +1384,260 @@ const On = ({
|
|
|
1384
1384
|
}
|
|
1385
1385
|
};
|
|
1386
1386
|
return /* @__PURE__ */ u(S, {
|
|
1387
|
-
children: [/* @__PURE__ */ n(
|
|
1387
|
+
children: [/* @__PURE__ */ n(bn, {
|
|
1388
1388
|
items: i,
|
|
1389
1389
|
scrollNode: t,
|
|
1390
1390
|
scrollStore: s,
|
|
1391
1391
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1392
|
-
hasMore:
|
|
1392
|
+
hasMore: r,
|
|
1393
1393
|
openItemDetail: e.openUser,
|
|
1394
1394
|
currentUserId: e.currentUserId.get()
|
|
1395
|
-
}), l && /* @__PURE__ */ n(
|
|
1396
|
-
children: /* @__PURE__ */ n(
|
|
1395
|
+
}), l && /* @__PURE__ */ n(Qn, {
|
|
1396
|
+
children: /* @__PURE__ */ n(Mn, {
|
|
1397
1397
|
onClick: a,
|
|
1398
1398
|
title: "Invite Friends",
|
|
1399
1399
|
description: "Challenge them now!"
|
|
1400
1400
|
})
|
|
1401
1401
|
})]
|
|
1402
1402
|
});
|
|
1403
|
-
},
|
|
1403
|
+
}, Un = /* @__PURE__ */ o("div")({
|
|
1404
1404
|
name: "QuestionItem",
|
|
1405
1405
|
class: "q1w97g3p",
|
|
1406
1406
|
propsAsIs: !1
|
|
1407
|
-
}),
|
|
1407
|
+
}), Yn = /* @__PURE__ */ o("div")({
|
|
1408
1408
|
name: "QuestionCaption",
|
|
1409
1409
|
class: "q2sl39u",
|
|
1410
1410
|
propsAsIs: !1
|
|
1411
|
-
}),
|
|
1411
|
+
}), Pn = /* @__PURE__ */ o("div")({
|
|
1412
1412
|
name: "QuestionBody",
|
|
1413
1413
|
class: "qd5h0uc",
|
|
1414
1414
|
propsAsIs: !1
|
|
1415
|
-
}),
|
|
1415
|
+
}), qn = /* @__PURE__ */ o("div")({
|
|
1416
1416
|
name: "QuestionAction",
|
|
1417
1417
|
class: "q105uluy",
|
|
1418
1418
|
propsAsIs: !1
|
|
1419
|
-
}),
|
|
1419
|
+
}), Vn = () => f, X = /* @__PURE__ */ o(Vn())({
|
|
1420
1420
|
name: "QuestionActionIcon",
|
|
1421
1421
|
class: "q1fa0b9h",
|
|
1422
1422
|
propsAsIs: !0
|
|
1423
|
-
}),
|
|
1423
|
+
}), Wn = () => f, _n = /* @__PURE__ */ o(Wn())({
|
|
1424
1424
|
name: "QuestionTypeIcon",
|
|
1425
1425
|
class: "qxlt78s",
|
|
1426
1426
|
propsAsIs: !0
|
|
1427
|
-
}),
|
|
1427
|
+
}), Bn = /* @__PURE__ */ o("div")({
|
|
1428
1428
|
name: "QuestionTypeLabel",
|
|
1429
1429
|
class: "qmg0vkx",
|
|
1430
1430
|
propsAsIs: !1
|
|
1431
|
-
}),
|
|
1431
|
+
}), Fn = /* @__PURE__ */ o("div")({
|
|
1432
1432
|
name: "QuestionContent",
|
|
1433
1433
|
class: "q1uz5j1g",
|
|
1434
1434
|
propsAsIs: !1
|
|
1435
|
-
}),
|
|
1435
|
+
}), Zn = /* @__PURE__ */ o("button")({
|
|
1436
1436
|
name: "PlayButton",
|
|
1437
1437
|
class: "p1pba9p1",
|
|
1438
1438
|
propsAsIs: !1
|
|
1439
|
-
}),
|
|
1439
|
+
}), Hn = {
|
|
1440
1440
|
[H.LOST]: /* @__PURE__ */ n(X, { name: "incorrectVoted" }),
|
|
1441
1441
|
[H.WON]: /* @__PURE__ */ n(X, { name: "icon-check" }),
|
|
1442
1442
|
[H.UNSET]: /* @__PURE__ */ n(X, { name: "icon-arrow" }),
|
|
1443
1443
|
[H.DNP]: /* @__PURE__ */ n(X, { name: "icon-arrow" })
|
|
1444
|
-
},
|
|
1444
|
+
}, Gn = ({
|
|
1445
1445
|
questionId: e,
|
|
1446
1446
|
questionType: t,
|
|
1447
1447
|
questionStatus: s,
|
|
1448
1448
|
subject: i,
|
|
1449
|
-
openForVoting:
|
|
1449
|
+
openForVoting: r,
|
|
1450
1450
|
openQuestion: l,
|
|
1451
1451
|
status: a
|
|
1452
1452
|
}) => {
|
|
1453
|
-
const c =
|
|
1454
|
-
return c ? /* @__PURE__ */ u(
|
|
1455
|
-
/* @__PURE__ */ u(
|
|
1456
|
-
/* @__PURE__ */ u(
|
|
1453
|
+
const c = Te[t], d = Hn[a];
|
|
1454
|
+
return c ? /* @__PURE__ */ u(Un, { onClick: () => l == null ? void 0 : l(e), children: [
|
|
1455
|
+
/* @__PURE__ */ u(Fn, { children: [
|
|
1456
|
+
/* @__PURE__ */ u(Yn, { children: [
|
|
1457
1457
|
/* @__PURE__ */ n(
|
|
1458
|
-
|
|
1458
|
+
_n,
|
|
1459
1459
|
{
|
|
1460
1460
|
"data-type-trivia": t === N.TRIVIA,
|
|
1461
1461
|
"data-type-poll": t === N.POLL,
|
|
1462
1462
|
name: c.iconName
|
|
1463
1463
|
}
|
|
1464
1464
|
),
|
|
1465
|
-
/* @__PURE__ */ u(
|
|
1465
|
+
/* @__PURE__ */ u(Bn, { children: [
|
|
1466
1466
|
c.label,
|
|
1467
1467
|
t === N.TRIVIA && s === $.RESOLVED && " • Expired"
|
|
1468
1468
|
] })
|
|
1469
1469
|
] }),
|
|
1470
|
-
/* @__PURE__ */ n(
|
|
1470
|
+
/* @__PURE__ */ n(Pn, { children: i || "" })
|
|
1471
1471
|
] }),
|
|
1472
|
-
/* @__PURE__ */ n(
|
|
1472
|
+
/* @__PURE__ */ n(qn, { children: r ? /* @__PURE__ */ n(Zn, { children: "Play" }) : d })
|
|
1473
1473
|
] }) : null;
|
|
1474
|
-
},
|
|
1474
|
+
}, Jn = /* @__PURE__ */ o("div")({
|
|
1475
1475
|
name: "Container",
|
|
1476
1476
|
class: "cll3md7",
|
|
1477
1477
|
propsAsIs: !1
|
|
1478
|
-
}),
|
|
1478
|
+
}), Xn = /* @__PURE__ */ o("button")({
|
|
1479
1479
|
name: "ActionBtn",
|
|
1480
1480
|
class: "a10g1iik",
|
|
1481
1481
|
propsAsIs: !1
|
|
1482
|
-
}),
|
|
1482
|
+
}), Kn = ({
|
|
1483
1483
|
openInsight: e,
|
|
1484
1484
|
questionId: t,
|
|
1485
1485
|
...s
|
|
1486
|
-
}) => /* @__PURE__ */ u(
|
|
1486
|
+
}) => /* @__PURE__ */ u(Jn, { children: [
|
|
1487
1487
|
/* @__PURE__ */ n(Oe, { questionId: t, ...s, isPickHistory: !0 }),
|
|
1488
|
-
e && /* @__PURE__ */ n(
|
|
1489
|
-
] }),
|
|
1488
|
+
e && /* @__PURE__ */ n(Xn, { onClick: () => e(t), children: "View Insight" })
|
|
1489
|
+
] }), ei = /* @__PURE__ */ o("div")({
|
|
1490
1490
|
name: "Container",
|
|
1491
1491
|
class: "cl56x6b",
|
|
1492
1492
|
propsAsIs: !1
|
|
1493
|
-
}),
|
|
1493
|
+
}), ti = () => _e, si = /* @__PURE__ */ o(ti())({
|
|
1494
1494
|
name: "ActionButton",
|
|
1495
1495
|
class: "a11pzf92",
|
|
1496
1496
|
propsAsIs: !0
|
|
1497
|
-
}),
|
|
1497
|
+
}), ni = /* @__PURE__ */ o("div")({
|
|
1498
1498
|
name: "DateTime",
|
|
1499
1499
|
class: "d1hbaleq",
|
|
1500
1500
|
propsAsIs: !1
|
|
1501
|
-
}),
|
|
1501
|
+
}), ii = /* @__PURE__ */ o("blockquote")({
|
|
1502
1502
|
name: "Quote",
|
|
1503
1503
|
class: "qvvgqjm",
|
|
1504
1504
|
propsAsIs: !1
|
|
1505
|
-
}),
|
|
1505
|
+
}), ri = ({
|
|
1506
1506
|
openTweet: e,
|
|
1507
1507
|
created: t,
|
|
1508
1508
|
...s
|
|
1509
1509
|
}) => {
|
|
1510
1510
|
const i = k(() => {
|
|
1511
1511
|
if (t) {
|
|
1512
|
-
const
|
|
1513
|
-
if (
|
|
1512
|
+
const r = new Date(t);
|
|
1513
|
+
if (ae(r))
|
|
1514
1514
|
return {
|
|
1515
|
-
date: re(
|
|
1516
|
-
time:
|
|
1515
|
+
date: re(r),
|
|
1516
|
+
time: oe(r)
|
|
1517
1517
|
};
|
|
1518
1518
|
}
|
|
1519
1519
|
return null;
|
|
1520
1520
|
}, [t]);
|
|
1521
|
-
return /* @__PURE__ */ u(
|
|
1522
|
-
i && /* @__PURE__ */ u(
|
|
1521
|
+
return /* @__PURE__ */ u(ei, { children: [
|
|
1522
|
+
i && /* @__PURE__ */ u(ni, { children: [
|
|
1523
1523
|
i.date,
|
|
1524
1524
|
" · ",
|
|
1525
1525
|
i.time
|
|
1526
1526
|
] }),
|
|
1527
|
-
s.title && /* @__PURE__ */ n(
|
|
1528
|
-
/* @__PURE__ */ n(
|
|
1529
|
-
e && /* @__PURE__ */ n(
|
|
1527
|
+
s.title && /* @__PURE__ */ n(ii, { children: s.title }),
|
|
1528
|
+
/* @__PURE__ */ n(Ae, { ...s }),
|
|
1529
|
+
e && /* @__PURE__ */ n(si, { onClick: () => e(s.tweetId), children: "View Insight" })
|
|
1530
1530
|
] });
|
|
1531
|
-
},
|
|
1531
|
+
}, oi = /* @__PURE__ */ o("div")({
|
|
1532
1532
|
name: "QuestionsContainer",
|
|
1533
1533
|
class: "qvghv3l",
|
|
1534
1534
|
propsAsIs: !1
|
|
1535
|
-
}),
|
|
1536
|
-
var i,
|
|
1535
|
+
}), ai = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(oi, { children: e == null ? void 0 : e.map((s) => {
|
|
1536
|
+
var i, r, l;
|
|
1537
1537
|
if (s.type === "question" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "question") {
|
|
1538
1538
|
const a = s.attributes.attributes.value;
|
|
1539
|
-
return /* @__PURE__ */ n(
|
|
1539
|
+
return /* @__PURE__ */ n(Gn, { openQuestion: t, ...a }, a.questionId);
|
|
1540
1540
|
}
|
|
1541
|
-
if (s.type === "insight" && ((
|
|
1541
|
+
if (s.type === "insight" && ((r = s.attributes) == null ? void 0 : r.attributes.case) === "insight") {
|
|
1542
1542
|
const a = s.attributes.attributes.value, c = s.attributes.created;
|
|
1543
|
-
return /* @__PURE__ */ n(
|
|
1543
|
+
return /* @__PURE__ */ n(Kn, { openInsight: t, ...a, created: c }, a.questionId);
|
|
1544
1544
|
}
|
|
1545
1545
|
if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
|
|
1546
1546
|
const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
|
|
1547
|
-
return /* @__PURE__ */ n(
|
|
1547
|
+
return /* @__PURE__ */ n(ri, { openTweet: t, ...a, tweetId: c, created: d }, c);
|
|
1548
1548
|
}
|
|
1549
1549
|
return null;
|
|
1550
|
-
}) }),
|
|
1550
|
+
}) }), li = ({ store: e, openQuestion: t }) => {
|
|
1551
1551
|
const s = Y(e);
|
|
1552
|
-
return s != null && s.data ? /* @__PURE__ */ n(
|
|
1553
|
-
},
|
|
1552
|
+
return s != null && s.data ? /* @__PURE__ */ n(ai, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
|
|
1553
|
+
}, ci = ({ userSummary: e }) => {
|
|
1554
1554
|
var t;
|
|
1555
1555
|
const [s, i] = w(void 0);
|
|
1556
|
-
return
|
|
1557
|
-
const
|
|
1556
|
+
return ee(() => {
|
|
1557
|
+
const r = e.subscribe((l) => {
|
|
1558
1558
|
l != null && l.data && i(l.data);
|
|
1559
1559
|
});
|
|
1560
1560
|
return () => {
|
|
1561
|
-
|
|
1561
|
+
r();
|
|
1562
1562
|
};
|
|
1563
|
-
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(
|
|
1564
|
-
},
|
|
1565
|
-
const [
|
|
1563
|
+
}, [e]), s != null && s.summary ? /* @__PURE__ */ n(xe, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
|
|
1564
|
+
}, di = ({ gamification: e, className: t, scrollStore: s, scrollNode: i }) => {
|
|
1565
|
+
const [r, l] = w(!1), [a, c] = w(K.HOME), [, d] = et(), M = (p) => {
|
|
1566
1566
|
d(() => c(p));
|
|
1567
1567
|
}, I = (p) => {
|
|
1568
1568
|
d(() => l(p));
|
|
1569
1569
|
};
|
|
1570
|
-
return
|
|
1570
|
+
return ee(() => s.listen((p) => {
|
|
1571
1571
|
if (p.scrollPosition === 0) {
|
|
1572
1572
|
I(!1), s.setKey("tabsShown", !1);
|
|
1573
1573
|
return;
|
|
1574
1574
|
}
|
|
1575
1575
|
I(p.scrollDirection === "forward"), s.setKey("tabsShown", p.scrollDirection !== "forward");
|
|
1576
|
-
}), [s]), /* @__PURE__ */ u(
|
|
1576
|
+
}), [s]), /* @__PURE__ */ u(Be, { className: t, children: [
|
|
1577
1577
|
/* @__PURE__ */ n(
|
|
1578
|
-
|
|
1578
|
+
Fe,
|
|
1579
1579
|
{
|
|
1580
1580
|
style: {
|
|
1581
|
-
|
|
1582
|
-
position: "sticky",
|
|
1583
|
-
transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
|
|
1584
|
-
top: o ? "-60px" : "0px"
|
|
1581
|
+
top: r ? "-60px" : "0px"
|
|
1585
1582
|
},
|
|
1586
|
-
children: /* @__PURE__ */ n(
|
|
1583
|
+
children: /* @__PURE__ */ n(nn, { activePage: a, toggleActivePage: M })
|
|
1587
1584
|
}
|
|
1588
1585
|
),
|
|
1589
|
-
a ===
|
|
1590
|
-
/* @__PURE__ */ n(
|
|
1591
|
-
/* @__PURE__ */ n(
|
|
1586
|
+
a === K.HOME && /* @__PURE__ */ u(S, { children: [
|
|
1587
|
+
/* @__PURE__ */ n(je, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(ci, { userSummary: e.userSummary }) }),
|
|
1588
|
+
/* @__PURE__ */ n(Ze, { style: { flex: 1 }, children: /* @__PURE__ */ n(li, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1592
1589
|
] }),
|
|
1593
|
-
a ===
|
|
1590
|
+
a === K.LEADERBOARD && /* @__PURE__ */ n(He, { children: /* @__PURE__ */ n(Rn, { scrollStore: s, scrollNode: i, gamification: e }) })
|
|
1594
1591
|
] });
|
|
1595
|
-
},
|
|
1592
|
+
}, ui = () => Ge, De = /* @__PURE__ */ o(ui())({
|
|
1596
1593
|
name: "OpenedContainer",
|
|
1597
1594
|
class: "oar61gl",
|
|
1598
1595
|
propsAsIs: !0
|
|
1599
|
-
}),
|
|
1596
|
+
}), pi = /* @__PURE__ */ o("div")({
|
|
1600
1597
|
name: "UserContainer",
|
|
1601
1598
|
class: "u14zaal4",
|
|
1602
1599
|
propsAsIs: !1
|
|
1603
|
-
}),
|
|
1600
|
+
}), Mi = ({
|
|
1604
1601
|
correct: e,
|
|
1605
1602
|
incorrect: t
|
|
1606
1603
|
}) => {
|
|
1607
1604
|
const s = e + t;
|
|
1608
1605
|
return s === 0 ? 0 : Math.round(e / s * 100);
|
|
1609
|
-
},
|
|
1606
|
+
}, gi = ({
|
|
1610
1607
|
gamification: e,
|
|
1611
1608
|
scrollStore: t,
|
|
1612
1609
|
className: s,
|
|
1613
1610
|
appNode: i,
|
|
1614
|
-
scrollNode:
|
|
1611
|
+
scrollNode: r
|
|
1615
1612
|
}) => {
|
|
1616
1613
|
const l = Y(e.openedQuestion.$store), a = Y(e.openedUser);
|
|
1617
1614
|
return /* @__PURE__ */ u(S, {
|
|
1618
|
-
children: [l && i.current &&
|
|
1615
|
+
children: [l && i.current && de.createPortal(/* @__PURE__ */ n(De, {
|
|
1619
1616
|
className: s,
|
|
1620
|
-
children: /* @__PURE__ */ n(
|
|
1617
|
+
children: /* @__PURE__ */ n(Xs, {
|
|
1621
1618
|
gamification: e
|
|
1622
1619
|
})
|
|
1623
|
-
}), i.current), a && i.current &&
|
|
1620
|
+
}), i.current), a && i.current && de.createPortal(/* @__PURE__ */ n(De, {
|
|
1624
1621
|
className: s,
|
|
1625
|
-
children: /* @__PURE__ */ u(
|
|
1622
|
+
children: /* @__PURE__ */ u(pi, {
|
|
1626
1623
|
children: [/* @__PURE__ */ n(ye, {
|
|
1627
1624
|
label: "Friend's Rank",
|
|
1628
1625
|
close: e.closeUser
|
|
1629
|
-
}), /* @__PURE__ */ n(
|
|
1630
|
-
children: /* @__PURE__ */ n(
|
|
1626
|
+
}), /* @__PURE__ */ n(je, {
|
|
1627
|
+
children: /* @__PURE__ */ n(xe, {
|
|
1631
1628
|
...a,
|
|
1632
|
-
successRate:
|
|
1629
|
+
successRate: Mi(a)
|
|
1633
1630
|
})
|
|
1634
1631
|
})]
|
|
1635
1632
|
})
|
|
1636
|
-
}), i.current), /* @__PURE__ */ n(
|
|
1633
|
+
}), i.current), /* @__PURE__ */ n(di, {
|
|
1637
1634
|
scrollStore: t,
|
|
1638
|
-
scrollNode:
|
|
1635
|
+
scrollNode: r,
|
|
1639
1636
|
className: s,
|
|
1640
1637
|
gamification: e
|
|
1641
1638
|
})]
|
|
1642
1639
|
});
|
|
1643
1640
|
};
|
|
1644
1641
|
export {
|
|
1645
|
-
|
|
1642
|
+
gi as default
|
|
1646
1643
|
};
|