@streamlayer/react 0.34.7 → 0.34.8
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 +36 -36
- package/lib/dist/es/gamification-feature.js +324 -300
- package/lib/dist/es/masters.js +1055 -1054
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +417 -393
- package/lib/style.css +1 -1
- package/package.json +8 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as r, jsx as s, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { s as
|
|
2
|
+
import { s as t, c as T } from "./index4.js";
|
|
3
3
|
import { useStore as Q } from "@nanostores/react";
|
|
4
|
-
import { o as Ie, r as Ee, w as ve, j as pe, O as Oe, c as Le, a as
|
|
5
|
-
import { QuestionType as M, QuestionStatus as C, QuestionImages as q, PickHistoryStatus as
|
|
6
|
-
import { useState as L, useCallback as
|
|
4
|
+
import { o as Ie, r as Ee, w as ve, j as pe, O as Oe, c as Le, a as G, n as Ce, P as ae, x as ke } from "./masters2.js";
|
|
5
|
+
import { QuestionType as M, QuestionStatus as C, QuestionImages as q, PickHistoryStatus as W } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { useState as L, useCallback as V, useEffect as ee, useMemo as v, PureComponent as Se, useTransition as fe } from "react";
|
|
7
7
|
import { d as K } from "./index3.js";
|
|
8
8
|
import "react-countup";
|
|
9
9
|
import { CountdownCircleTimer as we } from "react-countdown-circle-timer";
|
|
@@ -14,32 +14,32 @@ import "@streamlayer/sdk-web-notifications";
|
|
|
14
14
|
import "lodash.throttle";
|
|
15
15
|
import "./useStreamLayerApp.js";
|
|
16
16
|
import "@streamlayer/sdk-web";
|
|
17
|
-
const be = /* @__PURE__ */
|
|
17
|
+
const be = /* @__PURE__ */ t("div")({
|
|
18
18
|
name: "Container",
|
|
19
19
|
class: "c1vwopgc",
|
|
20
20
|
propsAsIs: !1
|
|
21
|
-
}), $e = /* @__PURE__ */
|
|
21
|
+
}), $e = /* @__PURE__ */ t("div")({
|
|
22
22
|
name: "QuestionTypeWrap",
|
|
23
23
|
class: "qyktpt0",
|
|
24
24
|
propsAsIs: !1
|
|
25
|
-
}), Ye = () => T, Ue = /* @__PURE__ */
|
|
25
|
+
}), Ye = () => T, Ue = /* @__PURE__ */ t(Ye())({
|
|
26
26
|
name: "QuestionTypeIcon",
|
|
27
27
|
class: "q951jdx",
|
|
28
28
|
propsAsIs: !0
|
|
29
|
-
}), Re = /* @__PURE__ */
|
|
29
|
+
}), Re = /* @__PURE__ */ t("span")({
|
|
30
30
|
name: "QuestionTypeTitle",
|
|
31
31
|
class: "qss5f0e",
|
|
32
32
|
propsAsIs: !1
|
|
33
|
-
}), qe = /* @__PURE__ */
|
|
33
|
+
}), qe = /* @__PURE__ */ t("button")({
|
|
34
34
|
name: "CloseButton",
|
|
35
35
|
class: "c1ao1jtv",
|
|
36
36
|
propsAsIs: !1
|
|
37
|
-
}), Pe = () => T, Ve = /* @__PURE__ */
|
|
37
|
+
}), Pe = () => T, Ve = /* @__PURE__ */ t(Pe())({
|
|
38
38
|
name: "CloseIcon",
|
|
39
39
|
class: "cvsl7l3",
|
|
40
40
|
propsAsIs: !0
|
|
41
|
-
}), Ne = ({ type: e, close: n, label:
|
|
42
|
-
const a = e ? Ie[e] : { label:
|
|
41
|
+
}), Ne = ({ type: e, close: n, label: i }) => {
|
|
42
|
+
const a = e ? Ie[e] : { label: i, iconName: void 0 };
|
|
43
43
|
return /* @__PURE__ */ r(be, { children: [
|
|
44
44
|
/* @__PURE__ */ r($e, { children: [
|
|
45
45
|
(a == null ? void 0 : a.iconName) && /* @__PURE__ */ s(
|
|
@@ -61,114 +61,114 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
61
61
|
}), ne = (e) => e.toLocaleTimeString("en-US", {
|
|
62
62
|
hour: "2-digit",
|
|
63
63
|
minute: "2-digit"
|
|
64
|
-
}), te = (e) => !isNaN(e.getTime()), _e = /* @__PURE__ */
|
|
64
|
+
}), te = (e) => !isNaN(e.getTime()), _e = /* @__PURE__ */ t("div")({
|
|
65
65
|
name: "Container",
|
|
66
66
|
class: "c1zy8a",
|
|
67
67
|
propsAsIs: !1
|
|
68
|
-
}), We = /* @__PURE__ */
|
|
68
|
+
}), We = /* @__PURE__ */ t("div")({
|
|
69
69
|
name: "Title",
|
|
70
70
|
class: "t1vih9p5",
|
|
71
71
|
propsAsIs: !1
|
|
72
|
-
}), Be = /* @__PURE__ */
|
|
72
|
+
}), Be = /* @__PURE__ */ t("div")({
|
|
73
73
|
name: "Indicator",
|
|
74
74
|
class: "i1fbnvpb",
|
|
75
75
|
propsAsIs: !1
|
|
76
76
|
}), re = ({ indicator: e, title: n }) => /* @__PURE__ */ r(_e, { children: [
|
|
77
77
|
/* @__PURE__ */ s(We, { children: n }),
|
|
78
78
|
/* @__PURE__ */ s(Be, { children: e })
|
|
79
|
-
] }), Ze = /* @__PURE__ */
|
|
79
|
+
] }), Ze = /* @__PURE__ */ t("div")({
|
|
80
80
|
name: "Container",
|
|
81
81
|
class: "ctmhwyc",
|
|
82
82
|
propsAsIs: !1
|
|
83
|
-
}), Fe = /* @__PURE__ */
|
|
83
|
+
}), Fe = /* @__PURE__ */ t("div")({
|
|
84
84
|
name: "Indicator",
|
|
85
85
|
class: "i1jri200",
|
|
86
86
|
propsAsIs: !1
|
|
87
|
-
}), Ge = /* @__PURE__ */
|
|
87
|
+
}), Ge = /* @__PURE__ */ t("div")({
|
|
88
88
|
name: "Title",
|
|
89
89
|
class: "t8s05oq",
|
|
90
90
|
propsAsIs: !1
|
|
91
|
-
}),
|
|
91
|
+
}), B = ({ indicator: e, title: n }) => /* @__PURE__ */ r(Ze, { children: [
|
|
92
92
|
/* @__PURE__ */ s(Fe, { children: e }),
|
|
93
93
|
/* @__PURE__ */ s(Ge, { children: n })
|
|
94
|
-
] }), He = /* @__PURE__ */
|
|
94
|
+
] }), He = /* @__PURE__ */ t("div")({
|
|
95
95
|
name: "Container",
|
|
96
96
|
class: "c1yrpn9o",
|
|
97
97
|
propsAsIs: !1
|
|
98
|
-
}), Je = /* @__PURE__ */
|
|
98
|
+
}), Je = /* @__PURE__ */ t("div")({
|
|
99
99
|
name: "TopInfo",
|
|
100
100
|
class: "t17fwahh",
|
|
101
101
|
propsAsIs: !1
|
|
102
|
-
}), Xe = /* @__PURE__ */
|
|
102
|
+
}), Xe = /* @__PURE__ */ t("div")({
|
|
103
103
|
name: "BottomInfo",
|
|
104
104
|
class: "by6w7e9",
|
|
105
105
|
propsAsIs: !1
|
|
106
|
-
}), Ke = /* @__PURE__ */
|
|
106
|
+
}), Ke = /* @__PURE__ */ t("div")({
|
|
107
107
|
name: "User",
|
|
108
108
|
class: "u1g7arbm",
|
|
109
109
|
propsAsIs: !1
|
|
110
|
-
}), es = /* @__PURE__ */
|
|
110
|
+
}), es = /* @__PURE__ */ t("img")({
|
|
111
111
|
name: "Avatar",
|
|
112
112
|
class: "a1ldeata",
|
|
113
113
|
propsAsIs: !1
|
|
114
|
-
}), ss = /* @__PURE__ */
|
|
114
|
+
}), ss = /* @__PURE__ */ t("div")({
|
|
115
115
|
name: "UserInfo",
|
|
116
116
|
class: "u10d4koz",
|
|
117
117
|
propsAsIs: !1
|
|
118
|
-
}), ns = /* @__PURE__ */
|
|
118
|
+
}), ns = /* @__PURE__ */ t("div")({
|
|
119
119
|
name: "UserName",
|
|
120
120
|
class: "u1q6roj0",
|
|
121
121
|
propsAsIs: !1
|
|
122
|
-
}), ts = /* @__PURE__ */
|
|
122
|
+
}), ts = /* @__PURE__ */ t("div")({
|
|
123
123
|
name: "UserRating",
|
|
124
124
|
class: "ui0m425",
|
|
125
125
|
propsAsIs: !1
|
|
126
|
-
}), is = /* @__PURE__ */
|
|
126
|
+
}), is = /* @__PURE__ */ t("img")({
|
|
127
127
|
name: "TrophyIcon",
|
|
128
128
|
class: "t1el3mrn",
|
|
129
129
|
propsAsIs: !1
|
|
130
|
-
}), os = /* @__PURE__ */
|
|
130
|
+
}), os = /* @__PURE__ */ t("div")({
|
|
131
131
|
name: "Rts",
|
|
132
132
|
class: "r2vgnxv",
|
|
133
133
|
propsAsIs: !1
|
|
134
|
-
}), as = /* @__PURE__ */
|
|
134
|
+
}), as = /* @__PURE__ */ t("div")({
|
|
135
135
|
name: "RtsIndicator",
|
|
136
136
|
class: "roqn06j",
|
|
137
137
|
propsAsIs: !1
|
|
138
|
-
}), rs = /* @__PURE__ */
|
|
138
|
+
}), rs = /* @__PURE__ */ t("div")({
|
|
139
139
|
name: "RtsLabel",
|
|
140
140
|
class: "r15adx7c",
|
|
141
141
|
propsAsIs: !1
|
|
142
|
-
}), cs = /* @__PURE__ */
|
|
142
|
+
}), cs = /* @__PURE__ */ t("div")({
|
|
143
143
|
name: "Divider",
|
|
144
144
|
class: "dv59lta",
|
|
145
145
|
propsAsIs: !1
|
|
146
|
-
}), ls = /* @__PURE__ */
|
|
146
|
+
}), ls = /* @__PURE__ */ t("div")({
|
|
147
147
|
name: "Ranks",
|
|
148
148
|
class: "r55lotb",
|
|
149
149
|
propsAsIs: !1
|
|
150
|
-
}), ds = /* @__PURE__ */
|
|
150
|
+
}), ds = /* @__PURE__ */ t("div")({
|
|
151
151
|
name: "Statistics",
|
|
152
152
|
class: "s1knfgqt",
|
|
153
153
|
propsAsIs: !1
|
|
154
|
-
}), us = /* @__PURE__ */
|
|
154
|
+
}), us = /* @__PURE__ */ t("div")({
|
|
155
155
|
name: "AvatarPlaceholder",
|
|
156
156
|
class: "a1mqo824",
|
|
157
157
|
propsAsIs: !1
|
|
158
|
-
}), Ms = /* @__PURE__ */
|
|
158
|
+
}), Ms = /* @__PURE__ */ t("button")({
|
|
159
159
|
name: "UserAccountBtn",
|
|
160
160
|
class: "uxareh6",
|
|
161
161
|
propsAsIs: !1
|
|
162
162
|
}), Is = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMT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Ny4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Te = ({
|
|
163
163
|
avatar: e,
|
|
164
164
|
name: n,
|
|
165
|
-
points:
|
|
165
|
+
points: i,
|
|
166
166
|
friendsRank: a,
|
|
167
167
|
rank: o,
|
|
168
|
-
streak:
|
|
168
|
+
streak: d,
|
|
169
169
|
correct: c,
|
|
170
170
|
incorrect: l,
|
|
171
|
-
inTop:
|
|
171
|
+
inTop: u,
|
|
172
172
|
successRate: I
|
|
173
173
|
}) => /* @__PURE__ */ r(He, { children: [
|
|
174
174
|
/* @__PURE__ */ s(Je, { children: /* @__PURE__ */ r(Ke, { children: [
|
|
@@ -182,14 +182,14 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
182
182
|
/* @__PURE__ */ r(os, { children: [
|
|
183
183
|
/* @__PURE__ */ s(is, { alt: "rank-icon", src: Is }),
|
|
184
184
|
/* @__PURE__ */ r(as, { children: [
|
|
185
|
-
me(
|
|
185
|
+
me(i),
|
|
186
186
|
/* @__PURE__ */ s(rs, { children: "PTS" })
|
|
187
187
|
] })
|
|
188
188
|
] }),
|
|
189
189
|
/* @__PURE__ */ s(cs, {}),
|
|
190
190
|
/* @__PURE__ */ r("div", { children: [
|
|
191
191
|
"TOP ",
|
|
192
|
-
|
|
192
|
+
u || 0,
|
|
193
193
|
"%"
|
|
194
194
|
] })
|
|
195
195
|
] })
|
|
@@ -201,17 +201,17 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
201
201
|
/* @__PURE__ */ s(re, { indicator: o || 0, title: "Global rank" })
|
|
202
202
|
] }),
|
|
203
203
|
/* @__PURE__ */ r(ds, { children: [
|
|
204
|
-
/* @__PURE__ */ s(
|
|
205
|
-
/* @__PURE__ */ s(
|
|
206
|
-
/* @__PURE__ */ s(
|
|
207
|
-
/* @__PURE__ */ s(
|
|
204
|
+
/* @__PURE__ */ s(B, { indicator: d || 0, title: "Win streak" }),
|
|
205
|
+
/* @__PURE__ */ s(B, { indicator: c || 0, title: "Correct" }),
|
|
206
|
+
/* @__PURE__ */ s(B, { indicator: l || 0, title: "Incorrect" }),
|
|
207
|
+
/* @__PURE__ */ s(B, { indicator: `${I || 0}%`, title: "Succ. rate" })
|
|
208
208
|
] })
|
|
209
209
|
] })
|
|
210
|
-
] }), ps = /* @__PURE__ */
|
|
210
|
+
] }), ps = /* @__PURE__ */ t("div")({
|
|
211
211
|
name: "SponsorLogoWrap",
|
|
212
212
|
class: "s8p5v5z",
|
|
213
213
|
propsAsIs: !1
|
|
214
|
-
}), Ns = () => T, Ds = /* @__PURE__ */
|
|
214
|
+
}), Ns = () => T, Ds = /* @__PURE__ */ t(Ns())({
|
|
215
215
|
name: "SponsorLogo",
|
|
216
216
|
class: "s755yti",
|
|
217
217
|
propsAsIs: !0
|
|
@@ -219,15 +219,15 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
219
219
|
children: /* @__PURE__ */ s(Ds, {
|
|
220
220
|
name: "mastersLogo"
|
|
221
221
|
})
|
|
222
|
-
}), Ts = /* @__PURE__ */
|
|
222
|
+
}), Ts = /* @__PURE__ */ t("div")({
|
|
223
223
|
name: "Container",
|
|
224
224
|
class: "c38csyt",
|
|
225
225
|
propsAsIs: !1
|
|
226
|
-
}), As = /* @__PURE__ */
|
|
226
|
+
}), As = /* @__PURE__ */ t("div")({
|
|
227
227
|
name: "Title",
|
|
228
228
|
class: "ty221rx",
|
|
229
229
|
propsAsIs: !1
|
|
230
|
-
}), gs = /* @__PURE__ */
|
|
230
|
+
}), gs = /* @__PURE__ */ t("div")({
|
|
231
231
|
name: "Description",
|
|
232
232
|
class: "dlaj9xp",
|
|
233
233
|
propsAsIs: !1
|
|
@@ -235,155 +235,155 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
235
235
|
/* @__PURE__ */ s(T, { name: "icon-check-circle" }),
|
|
236
236
|
/* @__PURE__ */ s(As, { children: e }),
|
|
237
237
|
/* @__PURE__ */ s(gs, { children: n })
|
|
238
|
-
] }),
|
|
238
|
+
] }), ys = /* @__PURE__ */ t("div")({
|
|
239
239
|
name: "Container",
|
|
240
240
|
class: "c16sbdnm",
|
|
241
241
|
propsAsIs: !1
|
|
242
|
-
}),
|
|
242
|
+
}), hs = () => T, xs = /* @__PURE__ */ t(hs())({
|
|
243
243
|
name: "IconPrediction",
|
|
244
244
|
class: "ibhorgl",
|
|
245
245
|
propsAsIs: !0
|
|
246
|
-
}), P = /* @__PURE__ */
|
|
246
|
+
}), P = /* @__PURE__ */ t("div")({
|
|
247
247
|
name: "FeedbackIconWrap",
|
|
248
248
|
class: "f1g20ja7",
|
|
249
249
|
propsAsIs: !1
|
|
250
|
-
}),
|
|
250
|
+
}), Z = /* @__PURE__ */ t("div")({
|
|
251
251
|
name: "FeedbackHeader",
|
|
252
252
|
class: "f455ozj",
|
|
253
253
|
propsAsIs: !1
|
|
254
|
-
}), zs = /* @__PURE__ */
|
|
254
|
+
}), zs = /* @__PURE__ */ t("span")({
|
|
255
255
|
name: "FeedbackTitle",
|
|
256
256
|
class: "f1913njx",
|
|
257
257
|
propsAsIs: !1
|
|
258
|
-
}), U = /* @__PURE__ */
|
|
258
|
+
}), U = /* @__PURE__ */ t("span")({
|
|
259
259
|
name: "FeedbackDescription",
|
|
260
260
|
class: "fzfk69z",
|
|
261
261
|
propsAsIs: !1
|
|
262
|
-
}), X = /* @__PURE__ */
|
|
262
|
+
}), X = /* @__PURE__ */ t("div")({
|
|
263
263
|
name: "FeedbackText",
|
|
264
264
|
class: "fx87qaj",
|
|
265
265
|
propsAsIs: !1
|
|
266
266
|
}), Es = ({
|
|
267
267
|
feedbackMessages: e,
|
|
268
268
|
questionVotedCorrectly: n,
|
|
269
|
-
questionVoted:
|
|
269
|
+
questionVoted: i,
|
|
270
270
|
questionType: a,
|
|
271
271
|
hasCorrectAnswer: o,
|
|
272
|
-
questionStatus:
|
|
272
|
+
questionStatus: d,
|
|
273
273
|
showExpiredNotification: c,
|
|
274
274
|
showClosedNotificationTrivia: l,
|
|
275
|
-
votedInCurrentRender:
|
|
275
|
+
votedInCurrentRender: u,
|
|
276
276
|
votedAfterQuestionClosed: I,
|
|
277
277
|
enteredAnActiveQuestion: p,
|
|
278
278
|
marketClosed: N
|
|
279
279
|
}) => {
|
|
280
|
-
const m =
|
|
281
|
-
if (!c && !l && !
|
|
280
|
+
const m = i && (a === M.TRIVIA || a === M.PREDICTION) && u && d !== C.RESOLVED, A = a === M.PREDICTION && !o, k = N && a === M.PREDICTION && !i && !p || a === M.PREDICTION && I && u && p, y = m && A, S = m && o, h = a === M.PREDICTION && i && u && o, b = i && a === M.POLL && u;
|
|
281
|
+
if (!c && !l && !y && !S && !k && !b && !h)
|
|
282
282
|
return null;
|
|
283
283
|
const O = n ? "correct" : "incorrect", E = n ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
|
|
284
|
-
return /* @__PURE__ */ r(
|
|
284
|
+
return /* @__PURE__ */ r(ys, { "data-isPrediction": A, children: [
|
|
285
285
|
c && /* @__PURE__ */ r(z, { children: [
|
|
286
286
|
/* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(T, { name: "questionExpired" }) }),
|
|
287
287
|
/* @__PURE__ */ r("div", { children: [
|
|
288
|
-
/* @__PURE__ */ s(
|
|
288
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(U, { children: "Question Expired" }) }),
|
|
289
289
|
/* @__PURE__ */ s(X, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
290
290
|
] })
|
|
291
291
|
] }),
|
|
292
292
|
l && /* @__PURE__ */ r(z, { children: [
|
|
293
293
|
/* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(T, { name: "questionExpired" }) }),
|
|
294
294
|
/* @__PURE__ */ r("div", { children: [
|
|
295
|
-
/* @__PURE__ */ s(
|
|
295
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(U, { children: "Question Closed" }) }),
|
|
296
296
|
/* @__PURE__ */ s(X, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
|
|
297
297
|
] })
|
|
298
298
|
] }),
|
|
299
299
|
k && /* @__PURE__ */ r(z, { children: [
|
|
300
300
|
/* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(T, { name: "questionExpired" }) }),
|
|
301
301
|
/* @__PURE__ */ r("div", { children: [
|
|
302
|
-
/* @__PURE__ */ s(
|
|
302
|
+
/* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(U, { children: "Question Closed" }) }),
|
|
303
303
|
/* @__PURE__ */ s(X, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
|
|
304
304
|
] })
|
|
305
305
|
] }),
|
|
306
|
-
|
|
307
|
-
/* @__PURE__ */ s(
|
|
306
|
+
y && /* @__PURE__ */ r(z, { children: [
|
|
307
|
+
/* @__PURE__ */ s(xs, { name: "icon-prediction" }),
|
|
308
308
|
/* @__PURE__ */ s(U, { children: "Stay tuned to see if your prediction was correct." })
|
|
309
309
|
] }),
|
|
310
310
|
b && /* @__PURE__ */ r(z, { children: [
|
|
311
311
|
/* @__PURE__ */ s(P, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(T, { name: "correct" }) }),
|
|
312
312
|
/* @__PURE__ */ s(U, { children: "That's for answering. Please stay tuned for the next question." })
|
|
313
313
|
] }),
|
|
314
|
-
(S ||
|
|
314
|
+
(S || h) && /* @__PURE__ */ r(z, { children: [
|
|
315
315
|
/* @__PURE__ */ s(P, { "data-feedbackType": O, children: /* @__PURE__ */ s(T, { name: O }) }),
|
|
316
|
-
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ r(
|
|
316
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ r(Z, { children: [
|
|
317
317
|
/* @__PURE__ */ s(zs, { "data-feedbackType": O, children: E == null ? void 0 : E.title }),
|
|
318
318
|
/* @__PURE__ */ s(U, { children: E == null ? void 0 : E.description })
|
|
319
319
|
] }) })
|
|
320
320
|
] })
|
|
321
321
|
] });
|
|
322
|
-
}, vs = /* @__PURE__ */
|
|
322
|
+
}, vs = /* @__PURE__ */ t("div")({
|
|
323
323
|
name: "Container",
|
|
324
324
|
class: "c14ielyq",
|
|
325
325
|
propsAsIs: !1
|
|
326
|
-
}), Os = /* @__PURE__ */
|
|
326
|
+
}), Os = /* @__PURE__ */ t("div")({
|
|
327
327
|
name: "Content",
|
|
328
328
|
class: "c1tlqx57",
|
|
329
329
|
propsAsIs: !1
|
|
330
|
-
}), Ls = /* @__PURE__ */
|
|
330
|
+
}), Ls = /* @__PURE__ */ t("div")({
|
|
331
331
|
name: "Title",
|
|
332
332
|
class: "t1hq58md",
|
|
333
333
|
propsAsIs: !1
|
|
334
|
-
}), Cs = /* @__PURE__ */
|
|
334
|
+
}), Cs = /* @__PURE__ */ t("div")({
|
|
335
335
|
name: "Options",
|
|
336
336
|
class: "o1c8nxcx",
|
|
337
337
|
propsAsIs: !1
|
|
338
|
-
}), ks = /* @__PURE__ */
|
|
338
|
+
}), ks = /* @__PURE__ */ t("button")({
|
|
339
339
|
name: "ButtonContainer",
|
|
340
340
|
class: "b1b6dl8t",
|
|
341
341
|
propsAsIs: !1
|
|
342
|
-
}), Ss = /* @__PURE__ */
|
|
342
|
+
}), Ss = /* @__PURE__ */ t("div")({
|
|
343
343
|
name: "ButtonPct",
|
|
344
344
|
class: "b4iik8i",
|
|
345
345
|
propsAsIs: !1
|
|
346
|
-
}), fs = /* @__PURE__ */
|
|
346
|
+
}), fs = /* @__PURE__ */ t("span")({
|
|
347
347
|
name: "ButtonBody",
|
|
348
348
|
class: "b1gq1lnf",
|
|
349
349
|
propsAsIs: !1
|
|
350
|
-
}), ws = /* @__PURE__ */
|
|
350
|
+
}), ws = /* @__PURE__ */ t("div")({
|
|
351
351
|
name: "IconContainer",
|
|
352
352
|
class: "i1j65z51",
|
|
353
353
|
propsAsIs: !1
|
|
354
|
-
}), Qs = /* @__PURE__ */
|
|
354
|
+
}), Qs = /* @__PURE__ */ t("div")({
|
|
355
355
|
name: "IconWrap",
|
|
356
356
|
class: "i19tpfua",
|
|
357
357
|
propsAsIs: !1
|
|
358
|
-
}), Ae = /* @__PURE__ */
|
|
358
|
+
}), Ae = /* @__PURE__ */ t("img")({
|
|
359
359
|
name: "Icon",
|
|
360
360
|
class: "i1tubmma",
|
|
361
361
|
propsAsIs: !1
|
|
362
|
-
}), bs = () => Ae, $s = /* @__PURE__ */
|
|
362
|
+
}), bs = () => Ae, $s = /* @__PURE__ */ t(bs())({
|
|
363
363
|
name: "IconDefault",
|
|
364
364
|
class: "i1grrgwj",
|
|
365
365
|
propsAsIs: !0
|
|
366
|
-
}), Ys = () => Ae, Us = /* @__PURE__ */
|
|
366
|
+
}), Ys = () => Ae, Us = /* @__PURE__ */ t(Ys())({
|
|
367
367
|
name: "IconCircle",
|
|
368
368
|
class: "ibemyq8",
|
|
369
369
|
propsAsIs: !0
|
|
370
|
-
}), Rs = /* @__PURE__ */
|
|
370
|
+
}), Rs = /* @__PURE__ */ t("span")({
|
|
371
371
|
name: "Title",
|
|
372
372
|
class: "t1dceht",
|
|
373
373
|
propsAsIs: !1
|
|
374
|
-
}), qs = /* @__PURE__ */
|
|
374
|
+
}), qs = /* @__PURE__ */ t("span")({
|
|
375
375
|
name: "Indicators",
|
|
376
376
|
class: "i116q4vq",
|
|
377
377
|
propsAsIs: !1
|
|
378
|
-
}), Ps = /* @__PURE__ */
|
|
378
|
+
}), Ps = /* @__PURE__ */ t("span")({
|
|
379
379
|
name: "Pts",
|
|
380
380
|
class: "p17ajcu2",
|
|
381
381
|
propsAsIs: !1
|
|
382
|
-
}), Vs = /* @__PURE__ */
|
|
382
|
+
}), Vs = /* @__PURE__ */ t("span")({
|
|
383
383
|
name: "Percentage",
|
|
384
384
|
class: "pu9kmlb",
|
|
385
385
|
propsAsIs: !1
|
|
386
|
-
}), _s = () => T, Ws = /* @__PURE__ */
|
|
386
|
+
}), _s = () => T, Ws = /* @__PURE__ */ t(_s())({
|
|
387
387
|
name: "CheckIcon",
|
|
388
388
|
class: "c1j2j0s0",
|
|
389
389
|
propsAsIs: !0
|
|
@@ -393,62 +393,62 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
393
393
|
[q.ROUNDED]: (e) => /* @__PURE__ */ s(Us, { alt: "option-icon", src: e }),
|
|
394
394
|
[q.NONE]: () => null,
|
|
395
395
|
[q.UNSET]: () => null
|
|
396
|
-
}, Bs = ({ questionType: e, hasCorrectAnswer: n, correct:
|
|
396
|
+
}, Bs = ({ questionType: e, hasCorrectAnswer: n, correct: i, youVoted: a, questionVoted: o }) => {
|
|
397
397
|
if (e === M.POLL && a)
|
|
398
398
|
return "correct";
|
|
399
399
|
if (e === M.PREDICTION) {
|
|
400
400
|
if (n && o)
|
|
401
|
-
return a ?
|
|
401
|
+
return a ? i ? "correct" : "incorrect" : "unset";
|
|
402
402
|
if (a)
|
|
403
403
|
return "correct";
|
|
404
404
|
}
|
|
405
|
-
return e === M.TRIVIA && o && a ?
|
|
405
|
+
return e === M.TRIVIA && o && a ? i ? "correct" : "incorrect" : "unset";
|
|
406
406
|
}, Zs = ({
|
|
407
407
|
questionType: e,
|
|
408
408
|
questionVoted: n,
|
|
409
|
-
correct:
|
|
409
|
+
correct: i,
|
|
410
410
|
hasCorrectAnswer: a,
|
|
411
411
|
questionStatus: o
|
|
412
|
-
}) => e === M.TRIVIA ? n &&
|
|
412
|
+
}) => e === M.TRIVIA ? n && i : e === M.PREDICTION ? n && i && a || o === C.RESOLVED && i : !1, Fs = (e) => {
|
|
413
413
|
var n;
|
|
414
414
|
const {
|
|
415
415
|
// option props
|
|
416
|
-
id:
|
|
416
|
+
id: i,
|
|
417
417
|
icon: a,
|
|
418
418
|
text: o,
|
|
419
|
-
percentageDecimal:
|
|
419
|
+
percentageDecimal: d,
|
|
420
420
|
points: c,
|
|
421
421
|
// extra props
|
|
422
422
|
onVote: l,
|
|
423
|
-
markThatVoted:
|
|
423
|
+
markThatVoted: u,
|
|
424
424
|
youSelected: I,
|
|
425
425
|
questionVoted: p,
|
|
426
426
|
imageMode: N,
|
|
427
427
|
answerTimeExpired: m,
|
|
428
428
|
questionStatus: A,
|
|
429
429
|
isLoading: k,
|
|
430
|
-
questionType:
|
|
430
|
+
questionType: y,
|
|
431
431
|
correct: S,
|
|
432
|
-
hasCorrectAnswer:
|
|
432
|
+
hasCorrectAnswer: h,
|
|
433
433
|
votedAfterQuestionClosed: b,
|
|
434
434
|
enteredAnActiveQuestion: O,
|
|
435
435
|
marketClosed: E
|
|
436
|
-
} = e, f = Bs(e), J = Zs({ questionType:
|
|
436
|
+
} = e, f = Bs(e), J = Zs({ questionType: y, questionVoted: p, correct: S, hasCorrectAnswer: h, questionStatus: A }), $ = E && y === M.PREDICTION, _ = p || $, D = y === M.PREDICTION && !p && A !== C.RESOLVED;
|
|
437
437
|
return /* @__PURE__ */ r(
|
|
438
438
|
ks,
|
|
439
439
|
{
|
|
440
|
-
value:
|
|
440
|
+
value: i,
|
|
441
441
|
"data-selected": I,
|
|
442
442
|
"data-answer-state": f,
|
|
443
443
|
disabled: p || k || m || $ && !O || $ && O && b,
|
|
444
444
|
"data-is-not-checked": p && !I && f !== "incorrect",
|
|
445
445
|
onClick: (j) => {
|
|
446
|
-
|
|
447
|
-
|
|
446
|
+
u(
|
|
447
|
+
y === M.PREDICTION ? E : A === C.RESOLVED
|
|
448
448
|
), l(j);
|
|
449
449
|
},
|
|
450
450
|
children: [
|
|
451
|
-
/* @__PURE__ */ s(Ss, { "data-answer-state": f, style: { width: `${
|
|
451
|
+
/* @__PURE__ */ s(Ss, { "data-answer-state": f, style: { width: `${_ ? d : 0}%` } }),
|
|
452
452
|
/* @__PURE__ */ r(fs, { children: [
|
|
453
453
|
a && N && ((n = ce[N]) == null ? void 0 : n.call(ce, a)),
|
|
454
454
|
/* @__PURE__ */ s(Rs, { children: o }),
|
|
@@ -456,31 +456,31 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
456
456
|
/* @__PURE__ */ s(K, { value: c }),
|
|
457
457
|
/* @__PURE__ */ s(Ps, { children: "pts" })
|
|
458
458
|
] }),
|
|
459
|
-
|
|
459
|
+
_ && /* @__PURE__ */ r(qs, { children: [
|
|
460
460
|
J && /* @__PURE__ */ s(Ws, { name: "selected" }),
|
|
461
|
-
/* @__PURE__ */ s(Vs, { children: /* @__PURE__ */ s(K, { value:
|
|
461
|
+
/* @__PURE__ */ s(Vs, { children: /* @__PURE__ */ s(K, { value: d, suffix: "%" }) })
|
|
462
462
|
] })
|
|
463
463
|
] })
|
|
464
464
|
]
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
|
-
}, Gs = [w.PRIMARY_GREEN1, w.SECONDARY_RED1, w.SECONDARY_RED1, w.NEUTRALS_GRAY3], Hs = [10, 10, 1, 0], Js = /* @__PURE__ */
|
|
467
|
+
}, Gs = [w.PRIMARY_GREEN1, w.SECONDARY_RED1, w.SECONDARY_RED1, w.NEUTRALS_GRAY3], Hs = [10, 10, 1, 0], Js = /* @__PURE__ */ t("div")({
|
|
468
468
|
name: "RemainingTime",
|
|
469
469
|
class: "r165427",
|
|
470
470
|
propsAsIs: !1
|
|
471
471
|
}), Xs = w.SECONDARY_GREEN6, le = w.SECONDARY_RED3, Ks = w.NEUTRALS_GRAY3, en = ({
|
|
472
472
|
isPlaying: e = !0,
|
|
473
473
|
duration: n = 30,
|
|
474
|
-
onTimerExpired:
|
|
474
|
+
onTimerExpired: i
|
|
475
475
|
}) => {
|
|
476
|
-
const [a, o] = L(n > 10 ? Xs : le),
|
|
477
|
-
remainingTime:
|
|
476
|
+
const [a, o] = L(n > 10 ? Xs : le), d = ({
|
|
477
|
+
remainingTime: u
|
|
478
478
|
}) => /* @__PURE__ */ s(Js, {
|
|
479
|
-
children:
|
|
480
|
-
}), c =
|
|
481
|
-
|
|
482
|
-
}, [
|
|
483
|
-
|
|
479
|
+
children: u
|
|
480
|
+
}), c = V(() => {
|
|
481
|
+
i == null || i(), o(Ks);
|
|
482
|
+
}, [i, o]), l = V((u) => {
|
|
483
|
+
u === 10 && o(le);
|
|
484
484
|
}, [o]);
|
|
485
485
|
return /* @__PURE__ */ s(we, {
|
|
486
486
|
isPlaying: e,
|
|
@@ -493,43 +493,43 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
493
493
|
trailColor: a,
|
|
494
494
|
onComplete: c,
|
|
495
495
|
onUpdate: l,
|
|
496
|
-
children:
|
|
496
|
+
children: d
|
|
497
497
|
});
|
|
498
|
-
}, sn = /* @__PURE__ */
|
|
498
|
+
}, sn = /* @__PURE__ */ t("div")({
|
|
499
499
|
name: "WinBarContainer",
|
|
500
500
|
class: "wie6cqo",
|
|
501
501
|
propsAsIs: !1
|
|
502
|
-
}), nn = /* @__PURE__ */
|
|
502
|
+
}), nn = /* @__PURE__ */ t("div")({
|
|
503
503
|
name: "Content",
|
|
504
504
|
class: "cgizw4u",
|
|
505
505
|
propsAsIs: !1
|
|
506
|
-
}), tn = /* @__PURE__ */
|
|
506
|
+
}), tn = /* @__PURE__ */ t("div")({
|
|
507
507
|
name: "Title",
|
|
508
508
|
class: "t1l3ucjp",
|
|
509
509
|
propsAsIs: !1
|
|
510
|
-
}), on = () => T, an = /* @__PURE__ */
|
|
510
|
+
}), on = () => T, an = /* @__PURE__ */ t(on())({
|
|
511
511
|
name: "WinIcon",
|
|
512
512
|
class: "wx7j799",
|
|
513
513
|
propsAsIs: !0
|
|
514
|
-
}), rn = /* @__PURE__ */
|
|
514
|
+
}), rn = /* @__PURE__ */ t("div")({
|
|
515
515
|
name: "Points",
|
|
516
516
|
class: "p4lwuj0",
|
|
517
517
|
propsAsIs: !1
|
|
518
|
-
}), cn = /* @__PURE__ */
|
|
518
|
+
}), cn = /* @__PURE__ */ t("span")({
|
|
519
519
|
name: "PointsCount",
|
|
520
520
|
class: "po9i64o",
|
|
521
521
|
propsAsIs: !1
|
|
522
|
-
}), ln = /* @__PURE__ */
|
|
522
|
+
}), ln = /* @__PURE__ */ t("span")({
|
|
523
523
|
name: "PointsUnits",
|
|
524
524
|
class: "pe5g05h",
|
|
525
525
|
propsAsIs: !1
|
|
526
526
|
}), dn = ({
|
|
527
527
|
title: e,
|
|
528
528
|
points: n,
|
|
529
|
-
isPlayingTimer:
|
|
529
|
+
isPlayingTimer: i,
|
|
530
530
|
isTimer: a,
|
|
531
531
|
questionType: o,
|
|
532
|
-
timerDuration:
|
|
532
|
+
timerDuration: d,
|
|
533
533
|
onTimerExpired: c
|
|
534
534
|
}) => /* @__PURE__ */ r(sn, { style: { justifyContent: o === M.PREDICTION ? "center" : "space-between" }, children: [
|
|
535
535
|
/* @__PURE__ */ r(nn, { children: [
|
|
@@ -542,24 +542,24 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
542
542
|
] })
|
|
543
543
|
] })
|
|
544
544
|
] }),
|
|
545
|
-
a && o !== M.PREDICTION && /* @__PURE__ */ s(en, { isPlaying:
|
|
546
|
-
] }), un = ({ openedQuestion: e, isLoading: n, vote:
|
|
547
|
-
var o,
|
|
548
|
-
const c = e.subject, l = e.type,
|
|
545
|
+
a && o !== M.PREDICTION && /* @__PURE__ */ s(en, { isPlaying: i, onTimerExpired: c, duration: d })
|
|
546
|
+
] }), un = ({ openedQuestion: e, isLoading: n, vote: i, close: a }) => {
|
|
547
|
+
var o, d;
|
|
548
|
+
const c = e.subject, l = e.type, u = e.status, I = (o = e.options) == null ? void 0 : o.options, p = e.marketClosed, [N, m] = L(!1), [A, k] = L(!1), [y, S] = L(!0), [h, b] = L(!1), [O, E] = L(""), f = e == null ? void 0 : e.id;
|
|
549
549
|
ee(() => {
|
|
550
|
-
l === M.PREDICTION ? p && S(!1) :
|
|
550
|
+
l === M.PREDICTION ? p && S(!1) : u === C.RESOLVED && S(!1);
|
|
551
551
|
}, []);
|
|
552
|
-
const J =
|
|
552
|
+
const J = V((g) => {
|
|
553
553
|
k(g), m(!0);
|
|
554
|
-
}, []), $ =
|
|
554
|
+
}, []), $ = V(
|
|
555
555
|
async (g) => {
|
|
556
556
|
if (f) {
|
|
557
557
|
const R = g.currentTarget.value;
|
|
558
|
-
E(R), await
|
|
558
|
+
E(R), await i(f, R);
|
|
559
559
|
}
|
|
560
560
|
},
|
|
561
|
-
[f, E,
|
|
562
|
-
),
|
|
561
|
+
[f, E, i]
|
|
562
|
+
), _ = V(() => {
|
|
563
563
|
b(!0), setTimeout(a, 3e3);
|
|
564
564
|
}, [a]), D = v(
|
|
565
565
|
() => e == null ? void 0 : e.answers.find((g) => g.youVoted === !0),
|
|
@@ -567,7 +567,7 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
567
567
|
), j = v(
|
|
568
568
|
() => !!(e != null && e.answers.find((g) => g.correct === !0)),
|
|
569
569
|
[e]
|
|
570
|
-
),
|
|
570
|
+
), x = v(
|
|
571
571
|
() => e == null ? void 0 : e.answers.find((g) => g.correct === !0),
|
|
572
572
|
[e]
|
|
573
573
|
), je = v(() => e ? e.answers.map((g) => {
|
|
@@ -579,65 +579,65 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
579
579
|
isLoading: n,
|
|
580
580
|
hasCorrectAnswer: j,
|
|
581
581
|
questionType: e.type,
|
|
582
|
-
answerTimeExpired:
|
|
583
|
-
questionStatus:
|
|
582
|
+
answerTimeExpired: h,
|
|
583
|
+
questionStatus: u,
|
|
584
584
|
imageMode: (R = e.appearance) == null ? void 0 : R.images,
|
|
585
585
|
onVote: $
|
|
586
586
|
};
|
|
587
587
|
}) : [], [
|
|
588
588
|
j,
|
|
589
|
-
|
|
589
|
+
h,
|
|
590
590
|
n,
|
|
591
591
|
e,
|
|
592
592
|
D,
|
|
593
|
-
|
|
593
|
+
u,
|
|
594
594
|
$,
|
|
595
595
|
O
|
|
596
|
-
]),
|
|
597
|
-
if (l === M.PREDICTION && D && (!j || j &&
|
|
596
|
+
]), ye = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, Y = u === C.RESOLVED && l === M.TRIVIA && !D && !y, ie = l === M.TRIVIA && A && N && y, oe = v(() => l === M.PREDICTION ? !!(D && !j || D && j && x != null && x.youVoted) : !0, [l, D, j, x]), he = v(() => {
|
|
597
|
+
if (l === M.PREDICTION && D && (!j || j && x != null && x.youVoted))
|
|
598
598
|
return D.points;
|
|
599
|
-
if (!(Y ||
|
|
600
|
-
return
|
|
599
|
+
if (!(Y || h))
|
|
600
|
+
return u === C.RESOLVED ? 0 : D ? D.correct ? D.points : 0 : x == null ? void 0 : x.points;
|
|
601
601
|
}, [
|
|
602
|
-
y,
|
|
603
|
-
D,
|
|
604
602
|
h,
|
|
605
|
-
|
|
603
|
+
D,
|
|
604
|
+
x,
|
|
605
|
+
u,
|
|
606
606
|
Y,
|
|
607
607
|
l,
|
|
608
608
|
j
|
|
609
|
-
]),
|
|
609
|
+
]), xe = v(() => l === M.PREDICTION && D ? j ? j && x != null && x.youVoted ? "You won" : "" : "To win" : Y || h ? "Time expired" : l === M.POLL ? "Time remaining" : D ? "You won" : "To win", [h, l, D, Y, j, x]), ze = D || Y || ie || l === M.TRIVIA && u === C.RESOLVED && y;
|
|
610
610
|
return /* @__PURE__ */ s(Ee, { "data-question-header": "true", children: /* @__PURE__ */ s(vs, { children: /* @__PURE__ */ r(Os, { children: [
|
|
611
611
|
/* @__PURE__ */ s(
|
|
612
612
|
Es,
|
|
613
613
|
{
|
|
614
|
-
feedbackMessages:
|
|
614
|
+
feedbackMessages: ye,
|
|
615
615
|
questionVoted: !!D,
|
|
616
616
|
questionVotedCorrectly: D == null ? void 0 : D.correct,
|
|
617
617
|
questionType: l,
|
|
618
618
|
hasCorrectAnswer: j,
|
|
619
|
-
questionStatus:
|
|
619
|
+
questionStatus: u,
|
|
620
620
|
showExpiredNotification: Y,
|
|
621
621
|
showClosedNotificationTrivia: ie,
|
|
622
622
|
votedInCurrentRender: N,
|
|
623
623
|
votedAfterQuestionClosed: A,
|
|
624
|
-
enteredAnActiveQuestion:
|
|
624
|
+
enteredAnActiveQuestion: y,
|
|
625
625
|
marketClosed: p
|
|
626
626
|
}
|
|
627
627
|
),
|
|
628
628
|
oe && /* @__PURE__ */ s(
|
|
629
629
|
dn,
|
|
630
630
|
{
|
|
631
|
-
title:
|
|
632
|
-
points:
|
|
633
|
-
onTimerExpired:
|
|
631
|
+
title: xe,
|
|
632
|
+
points: he,
|
|
633
|
+
onTimerExpired: _,
|
|
634
634
|
questionType: e.type,
|
|
635
635
|
isTimer: !n,
|
|
636
636
|
isPlayingTimer: !D,
|
|
637
|
-
timerDuration: ze ? 0 : Number(((
|
|
637
|
+
timerDuration: ze ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
|
|
638
638
|
}
|
|
639
639
|
),
|
|
640
|
-
|
|
640
|
+
h ? /* @__PURE__ */ s(
|
|
641
641
|
js,
|
|
642
642
|
{
|
|
643
643
|
title: "More to come...",
|
|
@@ -651,52 +651,52 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
651
651
|
...g,
|
|
652
652
|
markThatVoted: J,
|
|
653
653
|
votedAfterQuestionClosed: A,
|
|
654
|
-
enteredAnActiveQuestion:
|
|
654
|
+
enteredAnActiveQuestion: y,
|
|
655
655
|
marketClosed: p
|
|
656
656
|
},
|
|
657
657
|
g.id
|
|
658
658
|
)) })
|
|
659
659
|
] })
|
|
660
660
|
] }) }) });
|
|
661
|
-
}, Mn = /* @__PURE__ */
|
|
661
|
+
}, Mn = /* @__PURE__ */ t("div")({
|
|
662
662
|
name: "Container",
|
|
663
663
|
class: "cgn5uen",
|
|
664
664
|
propsAsIs: !1
|
|
665
|
-
}), In = /* @__PURE__ */
|
|
665
|
+
}), In = /* @__PURE__ */ t("div")({
|
|
666
666
|
name: "Content",
|
|
667
667
|
class: "c1px8nt6",
|
|
668
668
|
propsAsIs: !1
|
|
669
|
-
}), pn = /* @__PURE__ */
|
|
669
|
+
}), pn = /* @__PURE__ */ t("h3")({
|
|
670
670
|
name: "Title",
|
|
671
671
|
class: "t5et2jt",
|
|
672
672
|
propsAsIs: !1
|
|
673
|
-
}), Nn = /* @__PURE__ */
|
|
673
|
+
}), Nn = /* @__PURE__ */ t("div")({
|
|
674
674
|
name: "Description",
|
|
675
675
|
class: "d1i2kpk2",
|
|
676
676
|
propsAsIs: !1
|
|
677
|
-
}), Dn = /* @__PURE__ */
|
|
677
|
+
}), Dn = /* @__PURE__ */ t("div")({
|
|
678
678
|
name: "DateWrap",
|
|
679
679
|
class: "dd3lh3p",
|
|
680
680
|
propsAsIs: !1
|
|
681
|
-
}), mn = /* @__PURE__ */
|
|
681
|
+
}), mn = /* @__PURE__ */ t("img")({
|
|
682
682
|
name: "Image",
|
|
683
683
|
class: "i1gfjeu5",
|
|
684
684
|
propsAsIs: !1
|
|
685
685
|
}), ge = ({
|
|
686
686
|
created: e,
|
|
687
687
|
image: n,
|
|
688
|
-
title:
|
|
688
|
+
title: i,
|
|
689
689
|
isPickHistory: a,
|
|
690
690
|
instantView: o,
|
|
691
|
-
notification:
|
|
691
|
+
notification: d
|
|
692
692
|
}) => {
|
|
693
693
|
const c = v(() => {
|
|
694
694
|
if (e) {
|
|
695
|
-
const
|
|
696
|
-
if (te(
|
|
695
|
+
const u = new Date(e);
|
|
696
|
+
if (te(u))
|
|
697
697
|
return {
|
|
698
|
-
date: se(
|
|
699
|
-
time: ne(
|
|
698
|
+
date: se(u),
|
|
699
|
+
time: ne(u)
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
702
|
return null;
|
|
@@ -710,15 +710,15 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
710
710
|
(o == null ? void 0 : o.video) && /* @__PURE__ */ s(ve, { source: o.video.url, poster: o.video.thumbnailUrl }),
|
|
711
711
|
l && !(o != null && o.video) && /* @__PURE__ */ s(mn, { src: l }),
|
|
712
712
|
/* @__PURE__ */ r(In, { children: [
|
|
713
|
-
/* @__PURE__ */ s(pn, { children: a ?
|
|
714
|
-
/* @__PURE__ */ s(Nn, { children: a ?
|
|
713
|
+
/* @__PURE__ */ s(pn, { children: a ? i : o == null ? void 0 : o.heading }),
|
|
714
|
+
/* @__PURE__ */ s(Nn, { children: a ? d == null ? void 0 : d.body : o == null ? void 0 : o.body })
|
|
715
715
|
] })
|
|
716
716
|
] });
|
|
717
|
-
}, Tn = /* @__PURE__ */
|
|
717
|
+
}, Tn = /* @__PURE__ */ t("div")({
|
|
718
718
|
name: "Container",
|
|
719
719
|
class: "c1euiow",
|
|
720
720
|
propsAsIs: !1
|
|
721
|
-
}), An = /* @__PURE__ */
|
|
721
|
+
}), An = /* @__PURE__ */ t("a")({
|
|
722
722
|
name: "WebLinkBtn",
|
|
723
723
|
class: "w19zie3h",
|
|
724
724
|
propsAsIs: !1
|
|
@@ -728,20 +728,20 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
728
728
|
e == null ? void 0 : e.webLink.label,
|
|
729
729
|
/* @__PURE__ */ s(T, { name: "icon-external-link" })
|
|
730
730
|
] })
|
|
731
|
-
] }), jn = /* @__PURE__ */
|
|
731
|
+
] }), jn = /* @__PURE__ */ t("div")({
|
|
732
732
|
name: "Container",
|
|
733
733
|
class: "c1dcxmvf",
|
|
734
734
|
propsAsIs: !1
|
|
735
|
-
}),
|
|
735
|
+
}), yn = /* @__PURE__ */ t("div")({
|
|
736
736
|
name: "DateTime",
|
|
737
737
|
class: "db4q22c",
|
|
738
738
|
propsAsIs: !1
|
|
739
|
-
}),
|
|
739
|
+
}), hn = /* @__PURE__ */ t("blockquote")({
|
|
740
740
|
name: "Quote",
|
|
741
741
|
class: "q111mmic",
|
|
742
742
|
propsAsIs: !1
|
|
743
|
-
}),
|
|
744
|
-
const
|
|
743
|
+
}), xn = ({ created: e, ...n }) => {
|
|
744
|
+
const i = v(() => {
|
|
745
745
|
if (e) {
|
|
746
746
|
const a = new Date(e);
|
|
747
747
|
if (te(a))
|
|
@@ -753,33 +753,33 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
753
753
|
return null;
|
|
754
754
|
}, [e]);
|
|
755
755
|
return /* @__PURE__ */ r(jn, { children: [
|
|
756
|
-
|
|
757
|
-
|
|
756
|
+
i && /* @__PURE__ */ r(yn, { children: [
|
|
757
|
+
i.date,
|
|
758
758
|
" · ",
|
|
759
|
-
|
|
759
|
+
i.time
|
|
760
760
|
] }),
|
|
761
|
-
n.title && /* @__PURE__ */ s(
|
|
761
|
+
n.title && /* @__PURE__ */ s(hn, { children: n.title }),
|
|
762
762
|
/* @__PURE__ */ s(pe, { ...n })
|
|
763
763
|
] });
|
|
764
|
-
}, zn = /* @__PURE__ */
|
|
764
|
+
}, zn = /* @__PURE__ */ t("div")({
|
|
765
765
|
name: "QuestionContainer",
|
|
766
766
|
class: "qdri6g3",
|
|
767
767
|
propsAsIs: !1
|
|
768
768
|
}), En = ({
|
|
769
769
|
openedQuestion: e
|
|
770
770
|
}) => {
|
|
771
|
-
var n,
|
|
771
|
+
var n, i;
|
|
772
772
|
return ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ s(gn, {
|
|
773
773
|
created: e.attributes.created,
|
|
774
774
|
...e.attributes.attributes.value
|
|
775
|
-
}) : ((
|
|
775
|
+
}) : ((i = e == null ? void 0 : e.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ s(xn, {
|
|
776
776
|
created: e.attributes.created,
|
|
777
777
|
...e.attributes.attributes.value
|
|
778
778
|
}) : null;
|
|
779
779
|
}, vn = ({
|
|
780
780
|
extendedQuestion: e,
|
|
781
781
|
vote: n,
|
|
782
|
-
close:
|
|
782
|
+
close: i
|
|
783
783
|
}) => {
|
|
784
784
|
const {
|
|
785
785
|
loading: a,
|
|
@@ -787,7 +787,7 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
787
787
|
} = e;
|
|
788
788
|
return o ? /* @__PURE__ */ s(un, {
|
|
789
789
|
vote: n,
|
|
790
|
-
close:
|
|
790
|
+
close: i,
|
|
791
791
|
openedQuestion: o,
|
|
792
792
|
isLoading: !!a
|
|
793
793
|
}) : null;
|
|
@@ -795,74 +795,43 @@ const be = /* @__PURE__ */ i("div")({
|
|
|
795
795
|
gamification: e
|
|
796
796
|
}) => {
|
|
797
797
|
var n;
|
|
798
|
-
const
|
|
799
|
-
if (!
|
|
798
|
+
const i = Q(e.openedQuestion.$store), a = Q(e.openedQuestion.$extendedStore);
|
|
799
|
+
if (!i)
|
|
800
800
|
return null;
|
|
801
|
-
const o =
|
|
801
|
+
const o = i.type;
|
|
802
802
|
return /* @__PURE__ */ r(zn, {
|
|
803
803
|
children: [/* @__PURE__ */ s(Ne, {
|
|
804
804
|
close: e.closeQuestion,
|
|
805
|
-
type: ((n =
|
|
805
|
+
type: ((n = i.attributes) == null ? void 0 : n.type) || M.UNSET
|
|
806
806
|
}), o === "question" && /* @__PURE__ */ s(vn, {
|
|
807
807
|
vote: e.submitAnswer,
|
|
808
808
|
close: e.closeQuestion,
|
|
809
809
|
extendedQuestion: a
|
|
810
810
|
}), o !== "question" && /* @__PURE__ */ s(En, {
|
|
811
|
-
openedQuestion:
|
|
811
|
+
openedQuestion: i
|
|
812
812
|
}), /* @__PURE__ */ s(ms, {
|
|
813
813
|
sponsorLogo: ""
|
|
814
814
|
})]
|
|
815
815
|
});
|
|
816
|
-
}, Ln = /* @__PURE__ */
|
|
817
|
-
name: "Container",
|
|
818
|
-
class: "c1ux29ft",
|
|
819
|
-
propsAsIs: !1
|
|
820
|
-
}), Cn = /* @__PURE__ */ i("img")({
|
|
821
|
-
name: "FriendsIcon",
|
|
822
|
-
class: "f10ncfg2",
|
|
823
|
-
propsAsIs: !1
|
|
824
|
-
}), kn = /* @__PURE__ */ i("div")({
|
|
825
|
-
name: "Content",
|
|
826
|
-
class: "c1yc07bd",
|
|
827
|
-
propsAsIs: !1
|
|
828
|
-
}), Sn = /* @__PURE__ */ i("div")({
|
|
829
|
-
name: "Title",
|
|
830
|
-
class: "tj6cq7w",
|
|
831
|
-
propsAsIs: !1
|
|
832
|
-
}), fn = /* @__PURE__ */ i("div")({
|
|
833
|
-
name: "Description",
|
|
834
|
-
class: "d1ag78xo",
|
|
835
|
-
propsAsIs: !1
|
|
836
|
-
}), wn = () => T, Qn = /* @__PURE__ */ i(wn())({
|
|
837
|
-
name: "ArrowInviteIcon",
|
|
838
|
-
class: "awohrz6",
|
|
839
|
-
propsAsIs: !0
|
|
840
|
-
}), bn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiByeD0iMTYiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0xMC40NjE1IDEyLjY4NzVDOS40NDIzMSAxMi42ODc1IDguNjE1MzggMTMuNDY2NSA4LjYxNTM4IDE0LjQyNjZDOC42MTUzOCAxNS4zODY4IDkuNDQyMzEgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThDMTEuNDgwOCAxNi4xNjU4IDEyLjMwNzcgMTUuMzg2OCAxMi4zMDc3IDE0LjQyNjZDMTIuMzA3NyAxMy40NjY1IDExLjQ4MDggMTIuNjg3NSAxMC40NjE1IDEyLjY4NzVaTTEwLjQ2MTUgMTYuMTY1OEM5LjEwODE3IDE2LjE2NTggOCAxNy4yMDk3IDggMTguNDg0NlYxOS43NTI3QzggMTkuNzUyNyA4LjYxNTM4IDIwLjIyMzcgMTAuNDYxNSAyMC4yMjM3QzEyLjMwNzcgMjAuMjIzNyAxMi45MjMxIDE5Ljc1MjcgMTIuOTIzMSAxOS43NTI3VjE4LjQ4NDZDMTIuOTIzMSAxNy4yMDk3IDExLjgxNDkgMTYuMTY1OCAxMC40NjE1IDE2LjE2NThaTTIxLjUzODUgMTIuNjg3NUMyMC41MTkyIDEyLjY4NzUgMTkuNjkyMyAxMy40NjY1IDE5LjY5MjMgMTQuNDI2NkMxOS42OTIzIDE1LjM4NjggMjAuNTE5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DEzLjIzNzIgMTkuMjAxMiAxMi43NDUxQzE5LjAwNSAxMi42ODI3IDE4LjgwNjIgMTIuNjg3NSAxOC42MSAxMi42ODc1WiIgZmlsbD0iIzEwN0Q1NyIvPgo8L3N2Zz4K", $n = ({ title: e, description: n, onClick: t }) => /* @__PURE__ */ r(Ln, { onClick: t, children: [
|
|
841
|
-
/* @__PURE__ */ s(Cn, { alt: "friends-icon", src: bn }),
|
|
842
|
-
/* @__PURE__ */ r(kn, { children: [
|
|
843
|
-
/* @__PURE__ */ s(Sn, { children: e }),
|
|
844
|
-
/* @__PURE__ */ s(fn, { children: n })
|
|
845
|
-
] }),
|
|
846
|
-
/* @__PURE__ */ s(Qn, { name: "icon-copy" })
|
|
847
|
-
] }), Yn = /* @__PURE__ */ i("div")({
|
|
816
|
+
}, Ln = /* @__PURE__ */ t("div")({
|
|
848
817
|
name: "Container",
|
|
849
818
|
class: "c115qtkr",
|
|
850
819
|
propsAsIs: !1
|
|
851
|
-
}),
|
|
820
|
+
}), Cn = /* @__PURE__ */ t("div")({
|
|
852
821
|
name: "STabs",
|
|
853
822
|
class: "sxnslc8",
|
|
854
823
|
propsAsIs: !1
|
|
855
|
-
}),
|
|
824
|
+
}), kn = /* @__PURE__ */ t("button")({
|
|
856
825
|
name: "Button",
|
|
857
826
|
class: "b1umzux0",
|
|
858
827
|
propsAsIs: !1
|
|
859
|
-
}),
|
|
828
|
+
}), Sn = /* @__PURE__ */ t("span")({
|
|
860
829
|
name: "Title",
|
|
861
830
|
class: "tspsaas",
|
|
862
831
|
propsAsIs: !1
|
|
863
832
|
});
|
|
864
833
|
var H = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(H || {});
|
|
865
|
-
const de = ({ title: e, active: n, onClick:
|
|
834
|
+
const de = ({ title: e, active: n, onClick: i }) => /* @__PURE__ */ s(kn, { onClick: i, "data-selected": n, children: /* @__PURE__ */ s(Sn, { children: e }) }), fn = ({ activePage: e = "home", toggleActivePage: n }) => /* @__PURE__ */ s(Ln, { children: /* @__PURE__ */ r(Cn, { "data-position": e === "home" ? "left" : "right", children: [
|
|
866
835
|
/* @__PURE__ */ s(de, { title: "Home", active: e === "home", onClick: () => n(
|
|
867
836
|
"home"
|
|
868
837
|
/* HOME */
|
|
@@ -878,20 +847,51 @@ const de = ({ title: e, active: n, onClick: t }) => /* @__PURE__ */ s(Rn, { onCl
|
|
|
878
847
|
)
|
|
879
848
|
}
|
|
880
849
|
)
|
|
881
|
-
] }) })
|
|
850
|
+
] }) }), wn = /* @__PURE__ */ t("div")({
|
|
851
|
+
name: "Container",
|
|
852
|
+
class: "c1ux29ft",
|
|
853
|
+
propsAsIs: !1
|
|
854
|
+
}), Qn = /* @__PURE__ */ t("img")({
|
|
855
|
+
name: "FriendsIcon",
|
|
856
|
+
class: "f10ncfg2",
|
|
857
|
+
propsAsIs: !1
|
|
858
|
+
}), bn = /* @__PURE__ */ t("div")({
|
|
859
|
+
name: "Content",
|
|
860
|
+
class: "c1yc07bd",
|
|
861
|
+
propsAsIs: !1
|
|
862
|
+
}), $n = /* @__PURE__ */ t("div")({
|
|
863
|
+
name: "Title",
|
|
864
|
+
class: "tj6cq7w",
|
|
865
|
+
propsAsIs: !1
|
|
866
|
+
}), Yn = /* @__PURE__ */ t("div")({
|
|
867
|
+
name: "Description",
|
|
868
|
+
class: "d1ag78xo",
|
|
869
|
+
propsAsIs: !1
|
|
870
|
+
}), Un = () => T, Rn = /* @__PURE__ */ t(Un())({
|
|
871
|
+
name: "ArrowInviteIcon",
|
|
872
|
+
class: "awohrz6",
|
|
873
|
+
propsAsIs: !0
|
|
874
|
+
}), qn = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjMyIiBoZWlnaHQ9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xOTIgMTMuMjM3MiAxMy4zOTA4IDEzLjg1NDIgMTMuMzkwOCAxNC41MzEyQzEzLjM5MDggMTQuNzc2MSAxMy4zMjk2IDE1LjAxNjEgMTMuMzI5NiAxNS4yNjFDMTMuODUyMSAxNC41MjQgMTQuNjk1NiAxNC4wMzkxIDE1LjY3NDIgMTMuOTE2NkMxNS4yMTggMTMuMTc5NiAxNC4zNjk0IDEyLjY4NzUgMTMuMzkwOCAxMi42ODc1Wk0xOC42MSA5QzE3LjUyOTUgOSAxNi42NTI4IDkuODI1ODQgMTYuNjUyOCAxMC44NDM3QzE2LjY1MjggMTEuODYxNiAxNy41Mjk1IDEyLjY4NzUgMTguNjEgMTIuNjg3NUMxOS42OTA1IDEyLjY4NzUgMjAuNTY3MiAxMS44NjE2IDIwLjU2NzIgMTAuODQzN0MyMC41NjcyIDkuODI1ODQgMTkuNjkwNSA5IDE4LjYxIDlaTTE4LjYxIDEyLjY4NzVDMTcuNjMxNCAxMi42ODc1IDE2Ljc4MjggMTMuMTc5NiAxNi4zMjY2IDEzLjkxNjZDMTcuMzA1MiAxNC4wMzkxIDE4LjE0ODcgMTQuNTI0IDE4LjY3MTIgMTUuMjYxQzE4LjY3MTIgMTUuMDE2MSAxOC42MSAxNC43NzYxIDE4LjYxIDE0LjUzMTJDMTguNjEgMTMuODU0MiAxOC44MDg4IDEzLjIzNzIgMTkuMjAxMiAxMi43NDUxQzE5LjAwNSAxMi42ODI3IDE4LjgwNjIgMTIuNjg3NSAxOC42MSAxMi42ODc1WiIgZmlsbD0iIzEwN0Q1NyIvPgo8L3N2Zz4K", Pn = ({ title: e, description: n, onClick: i, className: a }) => /* @__PURE__ */ r(wn, { onClick: i, className: a, children: [
|
|
875
|
+
/* @__PURE__ */ s(Qn, { alt: "friends-icon", src: qn }),
|
|
876
|
+
/* @__PURE__ */ r(bn, { children: [
|
|
877
|
+
/* @__PURE__ */ s($n, { children: e }),
|
|
878
|
+
/* @__PURE__ */ s(Yn, { children: n })
|
|
879
|
+
] }),
|
|
880
|
+
/* @__PURE__ */ s(Rn, { name: "icon-copy" })
|
|
881
|
+
] });
|
|
882
882
|
function Vn(e) {
|
|
883
|
-
var n = e.lastRenderedStartIndex,
|
|
884
|
-
return !(a >
|
|
883
|
+
var n = e.lastRenderedStartIndex, i = e.lastRenderedStopIndex, a = e.startIndex, o = e.stopIndex;
|
|
884
|
+
return !(a > i || o < n);
|
|
885
885
|
}
|
|
886
886
|
function _n(e) {
|
|
887
|
-
for (var n = e.isItemLoaded,
|
|
887
|
+
for (var n = e.isItemLoaded, i = e.itemCount, a = e.minimumBatchSize, o = e.startIndex, d = e.stopIndex, c = [], l = null, u = null, I = o; I <= d; I++) {
|
|
888
888
|
var p = n(I);
|
|
889
|
-
p ?
|
|
889
|
+
p ? u !== null && (c.push(l, u), l = u = null) : (u = I, l === null && (l = I));
|
|
890
890
|
}
|
|
891
|
-
if (
|
|
892
|
-
for (var N = Math.min(Math.max(
|
|
893
|
-
|
|
894
|
-
c.push(l,
|
|
891
|
+
if (u !== null) {
|
|
892
|
+
for (var N = Math.min(Math.max(u, l + a - 1), i - 1), m = u + 1; m <= N && !n(m); m++)
|
|
893
|
+
u = m;
|
|
894
|
+
c.push(l, u);
|
|
895
895
|
}
|
|
896
896
|
if (c.length)
|
|
897
897
|
for (; c[1] - c[0] + 1 < a && c[0] > 0; ) {
|
|
@@ -907,14 +907,14 @@ var Wn = function(e, n) {
|
|
|
907
907
|
if (!(e instanceof n))
|
|
908
908
|
throw new TypeError("Cannot call a class as a function");
|
|
909
909
|
}, Bn = function() {
|
|
910
|
-
function e(n,
|
|
911
|
-
for (var a = 0; a <
|
|
912
|
-
var o =
|
|
910
|
+
function e(n, i) {
|
|
911
|
+
for (var a = 0; a < i.length; a++) {
|
|
912
|
+
var o = i[a];
|
|
913
913
|
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(n, o.key, o);
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
|
-
return function(n,
|
|
917
|
-
return
|
|
916
|
+
return function(n, i, a) {
|
|
917
|
+
return i && e(n.prototype, i), a && e(n, a), n;
|
|
918
918
|
};
|
|
919
919
|
}(), Zn = function(e, n) {
|
|
920
920
|
if (typeof n != "function" && n !== null)
|
|
@@ -935,16 +935,16 @@ var Wn = function(e, n) {
|
|
|
935
935
|
(function(e) {
|
|
936
936
|
Zn(n, e);
|
|
937
937
|
function n() {
|
|
938
|
-
var
|
|
938
|
+
var i, a, o, d;
|
|
939
939
|
Wn(this, n);
|
|
940
|
-
for (var c = arguments.length, l = Array(c),
|
|
941
|
-
l[
|
|
942
|
-
return
|
|
940
|
+
for (var c = arguments.length, l = Array(c), u = 0; u < c; u++)
|
|
941
|
+
l[u] = arguments[u];
|
|
942
|
+
return d = (a = (o = ue(this, (i = n.__proto__ || Object.getPrototypeOf(n)).call.apply(i, [this].concat(l))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(I) {
|
|
943
943
|
var p = I.visibleStartIndex, N = I.visibleStopIndex;
|
|
944
944
|
o._lastRenderedStartIndex = p, o._lastRenderedStopIndex = N, o._ensureRowsLoaded(p, N);
|
|
945
945
|
}, o._setRef = function(I) {
|
|
946
946
|
o._listRef = I;
|
|
947
|
-
}, a), ue(o,
|
|
947
|
+
}, a), ue(o, d);
|
|
948
948
|
}
|
|
949
949
|
return Bn(n, [{
|
|
950
950
|
key: "resetloadMoreItemsCache",
|
|
@@ -968,7 +968,7 @@ var Wn = function(e, n) {
|
|
|
968
968
|
}, {
|
|
969
969
|
key: "_ensureRowsLoaded",
|
|
970
970
|
value: function(a, o) {
|
|
971
|
-
var
|
|
971
|
+
var d = this.props, c = d.isItemLoaded, l = d.itemCount, u = d.minimumBatchSize, I = u === void 0 ? 10 : u, p = d.threshold, N = p === void 0 ? 15 : p, m = _n({
|
|
972
972
|
isItemLoaded: c,
|
|
973
973
|
itemCount: l,
|
|
974
974
|
minimumBatchSize: I,
|
|
@@ -982,8 +982,8 @@ var Wn = function(e, n) {
|
|
|
982
982
|
}, {
|
|
983
983
|
key: "_loadUnloadedRanges",
|
|
984
984
|
value: function(a) {
|
|
985
|
-
for (var o = this,
|
|
986
|
-
var p = a[I], N = a[I + 1], m =
|
|
985
|
+
for (var o = this, d = this.props.loadMoreItems || this.props.loadMoreRows, c = function(I) {
|
|
986
|
+
var p = a[I], N = a[I + 1], m = d(p, N);
|
|
987
987
|
m != null && m.then(function() {
|
|
988
988
|
if (Vn({
|
|
989
989
|
lastRenderedStartIndex: o._lastRenderedStartIndex,
|
|
@@ -1001,222 +1001,249 @@ var Wn = function(e, n) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
}]), n;
|
|
1003
1003
|
})(Se);
|
|
1004
|
-
const Fn = /* @__PURE__ */
|
|
1004
|
+
const Fn = /* @__PURE__ */ t("div")({
|
|
1005
1005
|
name: "Container",
|
|
1006
1006
|
class: "culdu4a",
|
|
1007
1007
|
propsAsIs: !1
|
|
1008
|
-
}), Gn = /* @__PURE__ */
|
|
1008
|
+
}), Gn = /* @__PURE__ */ t("div")({
|
|
1009
1009
|
name: "Position",
|
|
1010
1010
|
class: "pwf8e69",
|
|
1011
1011
|
propsAsIs: !1
|
|
1012
|
-
}), Hn = /* @__PURE__ */
|
|
1012
|
+
}), Hn = /* @__PURE__ */ t("img")({
|
|
1013
1013
|
name: "Avatar",
|
|
1014
1014
|
class: "atf4yh4",
|
|
1015
1015
|
propsAsIs: !1
|
|
1016
|
-
}), Jn = /* @__PURE__ */
|
|
1016
|
+
}), Jn = /* @__PURE__ */ t("div")({
|
|
1017
1017
|
name: "AvatarPlaceholder",
|
|
1018
1018
|
class: "a1dg29ja",
|
|
1019
1019
|
propsAsIs: !1
|
|
1020
|
-
}), Xn = /* @__PURE__ */
|
|
1020
|
+
}), Xn = /* @__PURE__ */ t("div")({
|
|
1021
1021
|
name: "Content",
|
|
1022
1022
|
class: "c10a68rc",
|
|
1023
1023
|
propsAsIs: !1
|
|
1024
|
-
}), Kn = /* @__PURE__ */
|
|
1024
|
+
}), Kn = /* @__PURE__ */ t("div")({
|
|
1025
1025
|
name: "NameContainer",
|
|
1026
1026
|
class: "nc4kck5",
|
|
1027
1027
|
propsAsIs: !1
|
|
1028
|
-
}), et = /* @__PURE__ */
|
|
1028
|
+
}), et = /* @__PURE__ */ t("span")({
|
|
1029
1029
|
name: "Name",
|
|
1030
1030
|
class: "njsrqgr",
|
|
1031
1031
|
propsAsIs: !1
|
|
1032
|
-
}), st = () => T, nt = /* @__PURE__ */
|
|
1032
|
+
}), st = () => T, nt = /* @__PURE__ */ t(st())({
|
|
1033
1033
|
name: "CurrentUserBadge",
|
|
1034
1034
|
class: "c17uc4zr",
|
|
1035
1035
|
propsAsIs: !0
|
|
1036
1036
|
}), tt = ({
|
|
1037
1037
|
rank: e,
|
|
1038
1038
|
avatar: n,
|
|
1039
|
-
name:
|
|
1039
|
+
name: i,
|
|
1040
1040
|
points: a,
|
|
1041
1041
|
isCurrentUser: o,
|
|
1042
|
-
openItemDetail:
|
|
1042
|
+
openItemDetail: d,
|
|
1043
1043
|
style: c
|
|
1044
|
-
}) => /* @__PURE__ */ r(Fn, { onClick:
|
|
1044
|
+
}) => /* @__PURE__ */ r(Fn, { onClick: d, style: c, children: [
|
|
1045
1045
|
/* @__PURE__ */ s(Gn, { children: e || 0 }),
|
|
1046
1046
|
/* @__PURE__ */ r(Xn, { children: [
|
|
1047
|
-
n ? /* @__PURE__ */ s(Hn, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(Jn, { children: De(
|
|
1047
|
+
n ? /* @__PURE__ */ s(Hn, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(Jn, { children: De(i || "") }),
|
|
1048
1048
|
/* @__PURE__ */ r(Kn, { children: [
|
|
1049
|
-
/* @__PURE__ */ s(et, { children:
|
|
1049
|
+
/* @__PURE__ */ s(et, { children: i || "" }),
|
|
1050
1050
|
o && /* @__PURE__ */ s(nt, { name: "icon-star" })
|
|
1051
1051
|
] })
|
|
1052
1052
|
] }),
|
|
1053
1053
|
/* @__PURE__ */ s("div", { children: me(a) })
|
|
1054
|
-
] }), it = /* @__PURE__ */
|
|
1054
|
+
] }), it = /* @__PURE__ */ t("div")({
|
|
1055
1055
|
name: "Container",
|
|
1056
1056
|
class: "c16btbfp",
|
|
1057
1057
|
propsAsIs: !1
|
|
1058
1058
|
}), ot = ({
|
|
1059
1059
|
items: e,
|
|
1060
1060
|
currentUserId: n,
|
|
1061
|
-
openItemDetail:
|
|
1061
|
+
openItemDetail: i,
|
|
1062
1062
|
fetchMore: a,
|
|
1063
1063
|
scrollNode: o,
|
|
1064
|
-
hasMore:
|
|
1064
|
+
hasMore: d
|
|
1065
1065
|
}) => /* @__PURE__ */ s(Qe, {
|
|
1066
1066
|
loadMore: a,
|
|
1067
1067
|
initialLoad: !1,
|
|
1068
|
-
hasMore:
|
|
1068
|
+
hasMore: d,
|
|
1069
1069
|
useWindow: !1,
|
|
1070
1070
|
getScrollParent: () => o.current,
|
|
1071
1071
|
children: /* @__PURE__ */ s(it, {
|
|
1072
1072
|
children: e.map((c) => /* @__PURE__ */ s(tt, {
|
|
1073
1073
|
...c,
|
|
1074
|
-
openItemDetail: () =>
|
|
1074
|
+
openItemDetail: () => i(c.userId),
|
|
1075
1075
|
isCurrentUser: !!n && n === c.userId
|
|
1076
1076
|
}, c.userId))
|
|
1077
1077
|
})
|
|
1078
|
-
}), at = ({ deepLink: e }) =>
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1078
|
+
}), at = ({ deepLink: e }) => /* @__PURE__ */ s(
|
|
1079
|
+
Oe,
|
|
1080
|
+
{
|
|
1081
|
+
inviteLink: e,
|
|
1082
|
+
socialLinks: [
|
|
1083
|
+
{
|
|
1084
|
+
icon: "icon-facebook",
|
|
1085
|
+
link: "https://www.facebook.com/TheMasters",
|
|
1086
|
+
label: "Facebook"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
icon: "icon-twitter",
|
|
1090
|
+
link: "https://twitter.com/@TheMasters",
|
|
1091
|
+
label: "X"
|
|
1092
|
+
}
|
|
1093
|
+
],
|
|
1094
|
+
inviteCardTitle: "It’s More Fun With Friends",
|
|
1095
|
+
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
1096
|
+
}
|
|
1097
|
+
), rt = /* @__PURE__ */ t("div")({
|
|
1098
|
+
name: "InviteLinkContainer",
|
|
1099
|
+
class: "i1chxfpe",
|
|
1100
|
+
propsAsIs: !1
|
|
1101
|
+
}), ct = ({
|
|
1102
|
+
gamification: e,
|
|
1103
|
+
scrollNode: n,
|
|
1104
|
+
scrollStore: i
|
|
1105
|
+
}) => {
|
|
1106
|
+
const {
|
|
1107
|
+
data: a,
|
|
1108
|
+
hasMore: o
|
|
1109
|
+
} = Q(e.leaderboardList.$store), {
|
|
1110
|
+
data: d
|
|
1111
|
+
} = Q(e.deepLink.$store);
|
|
1112
|
+
if (!(a != null && a.length))
|
|
1113
|
+
return /* @__PURE__ */ s(at, {
|
|
1114
|
+
deepLink: d
|
|
1115
|
+
});
|
|
1116
|
+
const c = async () => {
|
|
1117
|
+
if (d)
|
|
1118
|
+
try {
|
|
1119
|
+
await navigator.clipboard.writeText(d);
|
|
1120
|
+
} catch (l) {
|
|
1121
|
+
console.error("Unable to copy to clipboard", l);
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
return /* @__PURE__ */ r(z, {
|
|
1125
|
+
children: [/* @__PURE__ */ s(ot, {
|
|
1105
1126
|
items: a,
|
|
1106
1127
|
scrollNode: n,
|
|
1107
|
-
scrollStore:
|
|
1128
|
+
scrollStore: i,
|
|
1108
1129
|
fetchMore: e.leaderboardList.fetchMore,
|
|
1109
1130
|
hasMore: o,
|
|
1110
1131
|
openItemDetail: e.openUser,
|
|
1111
1132
|
currentUserId: e.currentUserId.get()
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1133
|
+
}), d && /* @__PURE__ */ s(rt, {
|
|
1134
|
+
children: /* @__PURE__ */ s(Pn, {
|
|
1135
|
+
onClick: c,
|
|
1136
|
+
title: "Invite Friends",
|
|
1137
|
+
description: "Challenge them now!"
|
|
1138
|
+
})
|
|
1139
|
+
})]
|
|
1140
|
+
});
|
|
1141
|
+
}, lt = /* @__PURE__ */ t("div")({
|
|
1115
1142
|
name: "QuestionItem",
|
|
1116
1143
|
class: "q1w97g3p",
|
|
1117
1144
|
propsAsIs: !1
|
|
1118
|
-
}),
|
|
1145
|
+
}), dt = /* @__PURE__ */ t("div")({
|
|
1119
1146
|
name: "QuestionCaption",
|
|
1120
1147
|
class: "q2sl39u",
|
|
1121
1148
|
propsAsIs: !1
|
|
1122
|
-
}),
|
|
1149
|
+
}), ut = /* @__PURE__ */ t("div")({
|
|
1123
1150
|
name: "QuestionBody",
|
|
1124
1151
|
class: "qd5h0uc",
|
|
1125
1152
|
propsAsIs: !1
|
|
1126
|
-
}),
|
|
1153
|
+
}), Mt = /* @__PURE__ */ t("div")({
|
|
1127
1154
|
name: "QuestionAction",
|
|
1128
1155
|
class: "q105uluy",
|
|
1129
1156
|
propsAsIs: !1
|
|
1130
|
-
}),
|
|
1157
|
+
}), It = () => T, F = /* @__PURE__ */ t(It())({
|
|
1131
1158
|
name: "QuestionActionIcon",
|
|
1132
1159
|
class: "q1fa0b9h",
|
|
1133
1160
|
propsAsIs: !0
|
|
1134
|
-
}),
|
|
1161
|
+
}), pt = () => T, Nt = /* @__PURE__ */ t(pt())({
|
|
1135
1162
|
name: "QuestionTypeIcon",
|
|
1136
1163
|
class: "qxlt78s",
|
|
1137
1164
|
propsAsIs: !0
|
|
1138
|
-
}),
|
|
1165
|
+
}), Dt = /* @__PURE__ */ t("div")({
|
|
1139
1166
|
name: "QuestionTypeLabel",
|
|
1140
1167
|
class: "qmg0vkx",
|
|
1141
1168
|
propsAsIs: !1
|
|
1142
|
-
}),
|
|
1169
|
+
}), mt = /* @__PURE__ */ t("div")({
|
|
1143
1170
|
name: "QuestionContent",
|
|
1144
1171
|
class: "q1uz5j1g",
|
|
1145
1172
|
propsAsIs: !1
|
|
1146
|
-
}),
|
|
1173
|
+
}), Tt = /* @__PURE__ */ t("button")({
|
|
1147
1174
|
name: "PlayButton",
|
|
1148
1175
|
class: "p1pba9p1",
|
|
1149
1176
|
propsAsIs: !1
|
|
1150
|
-
}),
|
|
1151
|
-
[
|
|
1152
|
-
[
|
|
1153
|
-
[
|
|
1154
|
-
[
|
|
1155
|
-
},
|
|
1177
|
+
}), At = {
|
|
1178
|
+
[W.LOST]: /* @__PURE__ */ s(F, { name: "incorrectVoted" }),
|
|
1179
|
+
[W.WON]: /* @__PURE__ */ s(F, { name: "icon-check" }),
|
|
1180
|
+
[W.UNSET]: /* @__PURE__ */ s(F, { name: "icon-arrow" }),
|
|
1181
|
+
[W.DNP]: /* @__PURE__ */ s(F, { name: "icon-arrow" })
|
|
1182
|
+
}, gt = ({
|
|
1156
1183
|
questionId: e,
|
|
1157
1184
|
questionType: n,
|
|
1158
|
-
questionStatus:
|
|
1185
|
+
questionStatus: i,
|
|
1159
1186
|
subject: a,
|
|
1160
1187
|
openForVoting: o,
|
|
1161
|
-
openQuestion:
|
|
1188
|
+
openQuestion: d,
|
|
1162
1189
|
status: c
|
|
1163
1190
|
}) => {
|
|
1164
|
-
const l = Ie[n],
|
|
1165
|
-
return l ? /* @__PURE__ */ r(
|
|
1166
|
-
/* @__PURE__ */ r(
|
|
1167
|
-
/* @__PURE__ */ r(
|
|
1191
|
+
const l = Ie[n], u = At[c];
|
|
1192
|
+
return l ? /* @__PURE__ */ r(lt, { onClick: () => d == null ? void 0 : d(e), children: [
|
|
1193
|
+
/* @__PURE__ */ r(mt, { children: [
|
|
1194
|
+
/* @__PURE__ */ r(dt, { children: [
|
|
1168
1195
|
/* @__PURE__ */ s(
|
|
1169
|
-
|
|
1196
|
+
Nt,
|
|
1170
1197
|
{
|
|
1171
1198
|
"data-type-trivia": n === M.TRIVIA,
|
|
1172
1199
|
"data-type-poll": n === M.POLL,
|
|
1173
1200
|
name: l.iconName
|
|
1174
1201
|
}
|
|
1175
1202
|
),
|
|
1176
|
-
/* @__PURE__ */ r(
|
|
1203
|
+
/* @__PURE__ */ r(Dt, { children: [
|
|
1177
1204
|
l.label,
|
|
1178
|
-
n === M.TRIVIA &&
|
|
1205
|
+
n === M.TRIVIA && i === C.RESOLVED && " • Expired"
|
|
1179
1206
|
] })
|
|
1180
1207
|
] }),
|
|
1181
|
-
/* @__PURE__ */ s(
|
|
1208
|
+
/* @__PURE__ */ s(ut, { children: a || "" })
|
|
1182
1209
|
] }),
|
|
1183
|
-
/* @__PURE__ */ s(
|
|
1210
|
+
/* @__PURE__ */ s(Mt, { children: o ? /* @__PURE__ */ s(Tt, { children: "Play" }) : u })
|
|
1184
1211
|
] }) : null;
|
|
1185
|
-
},
|
|
1212
|
+
}, jt = /* @__PURE__ */ t("div")({
|
|
1186
1213
|
name: "Container",
|
|
1187
1214
|
class: "cll3md7",
|
|
1188
1215
|
propsAsIs: !1
|
|
1189
|
-
}),
|
|
1216
|
+
}), yt = /* @__PURE__ */ t("button")({
|
|
1190
1217
|
name: "ActionBtn",
|
|
1191
1218
|
class: "a10g1iik",
|
|
1192
1219
|
propsAsIs: !1
|
|
1193
|
-
}),
|
|
1220
|
+
}), ht = ({
|
|
1194
1221
|
openInsight: e,
|
|
1195
1222
|
questionId: n,
|
|
1196
|
-
...
|
|
1197
|
-
}) => /* @__PURE__ */ r(
|
|
1198
|
-
/* @__PURE__ */ s(ge, { questionId: n, ...
|
|
1199
|
-
e && /* @__PURE__ */ s(
|
|
1200
|
-
] }),
|
|
1223
|
+
...i
|
|
1224
|
+
}) => /* @__PURE__ */ r(jt, { children: [
|
|
1225
|
+
/* @__PURE__ */ s(ge, { questionId: n, ...i, isPickHistory: !0 }),
|
|
1226
|
+
e && /* @__PURE__ */ s(yt, { onClick: () => e(n), children: "View Insight" })
|
|
1227
|
+
] }), xt = /* @__PURE__ */ t("div")({
|
|
1201
1228
|
name: "Container",
|
|
1202
1229
|
class: "cl56x6b",
|
|
1203
1230
|
propsAsIs: !1
|
|
1204
|
-
}),
|
|
1231
|
+
}), zt = () => Le, Et = /* @__PURE__ */ t(zt())({
|
|
1205
1232
|
name: "ActionButton",
|
|
1206
1233
|
class: "a11pzf92",
|
|
1207
1234
|
propsAsIs: !0
|
|
1208
|
-
}),
|
|
1235
|
+
}), vt = /* @__PURE__ */ t("div")({
|
|
1209
1236
|
name: "DateTime",
|
|
1210
1237
|
class: "d1hbaleq",
|
|
1211
1238
|
propsAsIs: !1
|
|
1212
|
-
}),
|
|
1239
|
+
}), Ot = /* @__PURE__ */ t("blockquote")({
|
|
1213
1240
|
name: "Quote",
|
|
1214
1241
|
class: "qvvgqjm",
|
|
1215
1242
|
propsAsIs: !1
|
|
1216
|
-
}),
|
|
1243
|
+
}), Lt = ({
|
|
1217
1244
|
openTweet: e,
|
|
1218
1245
|
created: n,
|
|
1219
|
-
...
|
|
1246
|
+
...i
|
|
1220
1247
|
}) => {
|
|
1221
1248
|
const a = v(() => {
|
|
1222
1249
|
if (n) {
|
|
@@ -1229,64 +1256,64 @@ const Fn = /* @__PURE__ */ i("div")({
|
|
|
1229
1256
|
}
|
|
1230
1257
|
return null;
|
|
1231
1258
|
}, [n]);
|
|
1232
|
-
return /* @__PURE__ */ r(
|
|
1233
|
-
a && /* @__PURE__ */ r(
|
|
1259
|
+
return /* @__PURE__ */ r(xt, { children: [
|
|
1260
|
+
a && /* @__PURE__ */ r(vt, { children: [
|
|
1234
1261
|
a.date,
|
|
1235
1262
|
" · ",
|
|
1236
1263
|
a.time
|
|
1237
1264
|
] }),
|
|
1238
|
-
|
|
1239
|
-
/* @__PURE__ */ s(pe, { ...
|
|
1240
|
-
e && /* @__PURE__ */ s(
|
|
1265
|
+
i.title && /* @__PURE__ */ s(Ot, { children: i.title }),
|
|
1266
|
+
/* @__PURE__ */ s(pe, { ...i }),
|
|
1267
|
+
e && /* @__PURE__ */ s(Et, { onClick: () => e(i.tweetId), children: "View Insight" })
|
|
1241
1268
|
] });
|
|
1242
|
-
},
|
|
1269
|
+
}, Ct = /* @__PURE__ */ t("div")({
|
|
1243
1270
|
name: "QuestionsContainer",
|
|
1244
1271
|
class: "qvghv3l",
|
|
1245
1272
|
propsAsIs: !1
|
|
1246
|
-
}),
|
|
1247
|
-
var a, o,
|
|
1248
|
-
if (
|
|
1249
|
-
const c =
|
|
1250
|
-
return /* @__PURE__ */ s(
|
|
1273
|
+
}), kt = ({ questions: e, openQuestion: n }) => /* @__PURE__ */ s(Ct, { children: e == null ? void 0 : e.map((i) => {
|
|
1274
|
+
var a, o, d;
|
|
1275
|
+
if (i.type === "question" && ((a = i.attributes) == null ? void 0 : a.attributes.case) === "question") {
|
|
1276
|
+
const c = i.attributes.attributes.value;
|
|
1277
|
+
return /* @__PURE__ */ s(gt, { openQuestion: n, ...c }, c.questionId);
|
|
1251
1278
|
}
|
|
1252
|
-
if (
|
|
1253
|
-
const c =
|
|
1254
|
-
return /* @__PURE__ */ s(
|
|
1279
|
+
if (i.type === "insight" && ((o = i.attributes) == null ? void 0 : o.attributes.case) === "insight") {
|
|
1280
|
+
const c = i.attributes.attributes.value, l = i.attributes.created;
|
|
1281
|
+
return /* @__PURE__ */ s(ht, { openInsight: n, ...c, created: l }, c.questionId);
|
|
1255
1282
|
}
|
|
1256
|
-
if (
|
|
1257
|
-
const c =
|
|
1258
|
-
return /* @__PURE__ */ s(
|
|
1283
|
+
if (i.type === "tweet" && ((d = i.attributes) == null ? void 0 : d.attributes.case) === "tweet") {
|
|
1284
|
+
const c = i.attributes.attributes.value, l = i.attributes.id, u = i.attributes.created;
|
|
1285
|
+
return /* @__PURE__ */ s(Lt, { openTweet: n, ...c, tweetId: l, created: u }, l);
|
|
1259
1286
|
}
|
|
1260
1287
|
return null;
|
|
1261
|
-
}) }),
|
|
1262
|
-
const
|
|
1263
|
-
return
|
|
1264
|
-
},
|
|
1288
|
+
}) }), St = ({ store: e, openQuestion: n }) => {
|
|
1289
|
+
const i = Q(e);
|
|
1290
|
+
return i != null && i.data ? /* @__PURE__ */ s(kt, { openQuestion: n, questions: i.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
|
|
1291
|
+
}, ft = ({ userSummary: e }) => {
|
|
1265
1292
|
var n;
|
|
1266
|
-
const [
|
|
1293
|
+
const [i, a] = L(void 0);
|
|
1267
1294
|
return ee(() => {
|
|
1268
|
-
const o = e.subscribe((
|
|
1269
|
-
|
|
1295
|
+
const o = e.subscribe((d) => {
|
|
1296
|
+
d != null && d.data && a(d.data);
|
|
1270
1297
|
});
|
|
1271
1298
|
return () => {
|
|
1272
1299
|
o();
|
|
1273
1300
|
};
|
|
1274
|
-
}, [e]),
|
|
1275
|
-
},
|
|
1276
|
-
const [o,
|
|
1277
|
-
|
|
1301
|
+
}, [e]), i != null && i.summary ? /* @__PURE__ */ s(Te, { ...i.summary, successRate: (n = i.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
|
|
1302
|
+
}, wt = ({ gamification: e, className: n, scrollStore: i, scrollNode: a }) => {
|
|
1303
|
+
const [o, d] = L(!1), [c, l] = L(H.HOME), [, u] = fe(), I = (N) => {
|
|
1304
|
+
u(() => l(N));
|
|
1278
1305
|
}, p = (N) => {
|
|
1279
|
-
|
|
1306
|
+
u(() => d(N));
|
|
1280
1307
|
};
|
|
1281
|
-
return ee(() =>
|
|
1308
|
+
return ee(() => i.listen((N) => {
|
|
1282
1309
|
if (N.scrollPosition === 0) {
|
|
1283
|
-
p(!1),
|
|
1310
|
+
p(!1), i.setKey("tabsShown", !1);
|
|
1284
1311
|
return;
|
|
1285
1312
|
}
|
|
1286
|
-
p(N.scrollDirection === "forward"),
|
|
1287
|
-
}), [
|
|
1313
|
+
p(N.scrollDirection === "forward"), i.setKey("tabsShown", N.scrollDirection !== "forward");
|
|
1314
|
+
}), [i]), /* @__PURE__ */ r("div", { className: n, children: [
|
|
1288
1315
|
/* @__PURE__ */ s(
|
|
1289
|
-
|
|
1316
|
+
G,
|
|
1290
1317
|
{
|
|
1291
1318
|
style: {
|
|
1292
1319
|
paddingBottom: "8px",
|
|
@@ -1294,67 +1321,64 @@ const Fn = /* @__PURE__ */ i("div")({
|
|
|
1294
1321
|
transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
|
|
1295
1322
|
top: o ? "-60px" : "0px"
|
|
1296
1323
|
},
|
|
1297
|
-
children: /* @__PURE__ */ s(
|
|
1324
|
+
children: /* @__PURE__ */ s(fn, { activePage: c, toggleActivePage: I })
|
|
1298
1325
|
}
|
|
1299
1326
|
),
|
|
1300
1327
|
c === H.HOME && /* @__PURE__ */ r(z, { children: [
|
|
1301
|
-
/* @__PURE__ */ s(
|
|
1302
|
-
/* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ s(
|
|
1328
|
+
/* @__PURE__ */ s(G, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(ft, { userSummary: e.userSummary }) }),
|
|
1329
|
+
/* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ s(St, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
1303
1330
|
] }),
|
|
1304
|
-
c === H.LEADERBOARD && /* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */ s(V, { style: { paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ s(rt, { scrollStore: t, scrollNode: a, gamification: e }) }),
|
|
1306
|
-
/* @__PURE__ */ s(V, { style: { position: "sticky", bottom: "0", paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ s($n, { title: "Invite Friends", description: "Challenge them now!" }) })
|
|
1307
|
-
] })
|
|
1331
|
+
c === H.LEADERBOARD && /* @__PURE__ */ s(G, { style: { paddingTop: "8px", paddingBottom: "8px" }, children: /* @__PURE__ */ s(ct, { scrollStore: i, scrollNode: a, gamification: e }) })
|
|
1308
1332
|
] });
|
|
1309
|
-
},
|
|
1333
|
+
}, Qt = () => ke, Me = /* @__PURE__ */ t(Qt())({
|
|
1310
1334
|
name: "OpenedContainer",
|
|
1311
1335
|
class: "oar61gl",
|
|
1312
1336
|
propsAsIs: !0
|
|
1313
|
-
}),
|
|
1337
|
+
}), bt = /* @__PURE__ */ t("div")({
|
|
1314
1338
|
name: "UserContainer",
|
|
1315
1339
|
class: "u14zaal4",
|
|
1316
1340
|
propsAsIs: !1
|
|
1317
|
-
}),
|
|
1341
|
+
}), $t = ({
|
|
1318
1342
|
correct: e,
|
|
1319
1343
|
incorrect: n
|
|
1320
1344
|
}) => {
|
|
1321
|
-
const
|
|
1322
|
-
return
|
|
1323
|
-
},
|
|
1345
|
+
const i = e + n;
|
|
1346
|
+
return i === 0 ? 0 : Math.round(e / i * 100);
|
|
1347
|
+
}, ei = ({
|
|
1324
1348
|
gamification: e,
|
|
1325
1349
|
scrollStore: n,
|
|
1326
|
-
className:
|
|
1350
|
+
className: i,
|
|
1327
1351
|
appNode: a,
|
|
1328
1352
|
scrollNode: o
|
|
1329
1353
|
}) => {
|
|
1330
|
-
const
|
|
1354
|
+
const d = Q(e.openedQuestion.$store), c = Q(e.openedUser);
|
|
1331
1355
|
return /* @__PURE__ */ r(z, {
|
|
1332
|
-
children: [
|
|
1333
|
-
className:
|
|
1356
|
+
children: [d && a.current && ae.createPortal(/* @__PURE__ */ s(Me, {
|
|
1357
|
+
className: i,
|
|
1334
1358
|
children: /* @__PURE__ */ s(On, {
|
|
1335
1359
|
gamification: e
|
|
1336
1360
|
})
|
|
1337
1361
|
}), a.current), c && a.current && ae.createPortal(/* @__PURE__ */ s(Me, {
|
|
1338
|
-
className:
|
|
1339
|
-
children: /* @__PURE__ */ r(
|
|
1362
|
+
className: i,
|
|
1363
|
+
children: /* @__PURE__ */ r(bt, {
|
|
1340
1364
|
children: [/* @__PURE__ */ s(Ne, {
|
|
1341
1365
|
label: "Friend's Rank",
|
|
1342
1366
|
close: e.closeUser
|
|
1343
|
-
}), /* @__PURE__ */ s(
|
|
1367
|
+
}), /* @__PURE__ */ s(G, {
|
|
1344
1368
|
children: /* @__PURE__ */ s(Te, {
|
|
1345
1369
|
...c,
|
|
1346
|
-
successRate:
|
|
1370
|
+
successRate: $t(c)
|
|
1347
1371
|
})
|
|
1348
1372
|
})]
|
|
1349
1373
|
})
|
|
1350
|
-
}), a.current), /* @__PURE__ */ s(
|
|
1374
|
+
}), a.current), /* @__PURE__ */ s(wt, {
|
|
1351
1375
|
scrollStore: n,
|
|
1352
1376
|
scrollNode: o,
|
|
1353
|
-
className:
|
|
1377
|
+
className: i,
|
|
1354
1378
|
gamification: e
|
|
1355
1379
|
})]
|
|
1356
1380
|
});
|
|
1357
1381
|
};
|
|
1358
1382
|
export {
|
|
1359
|
-
|
|
1383
|
+
ei as default
|
|
1360
1384
|
};
|