@streamlayer/react 0.33.1 → 0.33.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { jsxs as m, jsx as s, Fragment as k } from "react/jsx-runtime";
2
- import { s as o, r as C } from "./index4.js";
1
+ import { jsxs as p, jsx as s, Fragment as L } from "react/jsx-runtime";
2
+ import { s as o, r as w } from "./index4.js";
3
3
  import { useStore as _ } from "@nanostores/react";
4
- import { o as ke, r as me, w as We, u as we, A as Fe, O as Be, c as He, a as ce, n as Ge, f as Ze } from "./masters2.js";
5
- import { QuestionType as z, QuestionStatus as U, QuestionImages as B, PickHistoryStatus as K } from "@streamlayer/sdk-web-types";
6
- import { useState as E, useCallback as P, useEffect as he, useMemo as w, createElement as re, PureComponent as Ee, useRef as de, useTransition as Je } from "react";
7
- import { d as Le } from "./index3.js";
4
+ import { o as Ee, r as Ie, w as We, u as Le, A as Fe, O as Be, c as He, a as de, n as Ge, f as Ze } from "./masters2.js";
5
+ import { QuestionType as y, QuestionStatus as R, QuestionImages as B, PickHistoryStatus as X } from "@streamlayer/sdk-web-types";
6
+ import { useState as $, useCallback as q, useEffect as fe, useMemo as E, createElement as oe, PureComponent as $e, useRef as ue, useTransition as Je } from "react";
7
+ import { d as pe } from "./index3.js";
8
8
  import "react-countup";
9
9
  import { CountdownCircleTimer as Ke } from "react-countdown-circle-timer";
10
- import { E as q } from "./index2.js";
11
- import $e from "lodash.throttle";
10
+ import { E as P } from "./index2.js";
11
+ import Re from "lodash.throttle";
12
12
  import "@streamlayer/sdk-web-interfaces";
13
13
  import "@streamlayer/sdk-web-notifications";
14
14
  import "./useStreamLayerApp.js";
@@ -21,7 +21,7 @@ const Xe = /* @__PURE__ */ o("div")({
21
21
  name: "QuestionTypeWrap",
22
22
  class: "qyktpt0",
23
23
  propsAsIs: !1
24
- }), tt = () => C, nt = /* @__PURE__ */ o(tt())({
24
+ }), tt = () => w, nt = /* @__PURE__ */ o(tt())({
25
25
  name: "QuestionTypeIcon",
26
26
  class: "q951jdx",
27
27
  propsAsIs: !0
@@ -33,19 +33,19 @@ const Xe = /* @__PURE__ */ o("div")({
33
33
  name: "CloseButton",
34
34
  class: "c1ao1jtv",
35
35
  propsAsIs: !1
36
- }), rt = () => C, ot = /* @__PURE__ */ o(rt())({
36
+ }), rt = () => w, ot = /* @__PURE__ */ o(rt())({
37
37
  name: "CloseIcon",
38
38
  class: "cvsl7l3",
39
39
  propsAsIs: !0
40
- }), Re = ({ type: e, close: t, label: n }) => {
41
- const i = e ? ke[e] : { label: n, iconName: void 0 };
42
- return /* @__PURE__ */ m(Xe, { children: [
43
- /* @__PURE__ */ m(et, { children: [
40
+ }), Qe = ({ type: e, close: t, label: n }) => {
41
+ const i = e ? Ee[e] : { label: n, iconName: void 0 };
42
+ return /* @__PURE__ */ p(Xe, { children: [
43
+ /* @__PURE__ */ p(et, { children: [
44
44
  (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
45
45
  nt,
46
46
  {
47
- "data-type-trivia": e === z.TRIVIA,
48
- "data-type-poll": e === z.POLL,
47
+ "data-type-trivia": e === y.TRIVIA,
48
+ "data-type-poll": e === y.POLL,
49
49
  name: i.iconName
50
50
  }
51
51
  ),
@@ -53,14 +53,14 @@ const Xe = /* @__PURE__ */ o("div")({
53
53
  ] }),
54
54
  /* @__PURE__ */ s(it, { onClick: t, children: /* @__PURE__ */ s(ot, { name: "icon-cross" }) })
55
55
  ] });
56
- }, Qe = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Ue = (e) => e ? e.toLocaleString("en-US") : "0", Ie = (e) => e.toLocaleDateString("en-US", {
56
+ }, Ue = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Pe = (e) => e ? e.toLocaleString("en-US") : "0", ge = (e) => e.toLocaleDateString("en-US", {
57
57
  weekday: "short",
58
58
  month: "short",
59
59
  day: "numeric"
60
- }), fe = (e) => e.toLocaleTimeString("en-US", {
60
+ }), ve = (e) => e.toLocaleTimeString("en-US", {
61
61
  hour: "2-digit",
62
62
  minute: "2-digit"
63
- }), ge = (e) => !isNaN(e.getTime()), at = /* @__PURE__ */ o("div")({
63
+ }), Me = (e) => !isNaN(e.getTime()), at = /* @__PURE__ */ o("div")({
64
64
  name: "Container",
65
65
  class: "c1zy8a",
66
66
  propsAsIs: !1
@@ -72,7 +72,7 @@ const Xe = /* @__PURE__ */ o("div")({
72
72
  name: "Indicator",
73
73
  class: "i1fbnvpb",
74
74
  propsAsIs: !1
75
- }), Ae = ({ indicator: e, title: t }) => /* @__PURE__ */ m(at, { children: [
75
+ }), Ae = ({ indicator: e, title: t }) => /* @__PURE__ */ p(at, { children: [
76
76
  /* @__PURE__ */ s(lt, { children: t }),
77
77
  /* @__PURE__ */ s(ct, { children: e })
78
78
  ] }), dt = /* @__PURE__ */ o("div")({
@@ -87,7 +87,7 @@ const Xe = /* @__PURE__ */ o("div")({
87
87
  name: "Title",
88
88
  class: "t8s05oq",
89
89
  propsAsIs: !1
90
- }), X = ({ indicator: e, title: t }) => /* @__PURE__ */ m(dt, { children: [
90
+ }), ee = ({ indicator: e, title: t }) => /* @__PURE__ */ p(dt, { children: [
91
91
  /* @__PURE__ */ s(ut, { children: e }),
92
92
  /* @__PURE__ */ s(pt, { children: t })
93
93
  ] }), mt = /* @__PURE__ */ o("div")({
@@ -118,7 +118,7 @@ const Xe = /* @__PURE__ */ o("div")({
118
118
  name: "UserName",
119
119
  class: "u1q6roj0",
120
120
  propsAsIs: !1
121
- }), At = /* @__PURE__ */ o("div")({
121
+ }), Tt = /* @__PURE__ */ o("div")({
122
122
  name: "UserRating",
123
123
  class: "ui0m425",
124
124
  propsAsIs: !1
@@ -126,7 +126,7 @@ const Xe = /* @__PURE__ */ o("div")({
126
126
  name: "TrophyIcon",
127
127
  class: "t1el3mrn",
128
128
  propsAsIs: !1
129
- }), Tt = /* @__PURE__ */ o("div")({
129
+ }), At = /* @__PURE__ */ o("div")({
130
130
  name: "Rts",
131
131
  class: "r2vgnxv",
132
132
  propsAsIs: !1
@@ -164,58 +164,58 @@ const Xe = /* @__PURE__ */ o("div")({
164
164
  points: n,
165
165
  friendsRank: i,
166
166
  rank: r,
167
- streak: d,
168
- correct: p,
167
+ streak: c,
168
+ correct: m,
169
169
  incorrect: l,
170
- inTop: c,
170
+ inTop: d,
171
171
  successRate: I
172
- }) => /* @__PURE__ */ m(mt, { children: [
173
- /* @__PURE__ */ s(ht, { children: /* @__PURE__ */ m(ft, { children: [
174
- /* @__PURE__ */ m(bt, { children: [
172
+ }) => /* @__PURE__ */ p(mt, { children: [
173
+ /* @__PURE__ */ s(ht, { children: /* @__PURE__ */ p(ft, { children: [
174
+ /* @__PURE__ */ p(bt, { children: [
175
175
  e && /* @__PURE__ */ s(gt, { alt: "avatar", src: e }),
176
- !e && /* @__PURE__ */ s(Ot, { children: Qe(t || "") })
176
+ !e && /* @__PURE__ */ s(Ot, { children: Ue(t || "") })
177
177
  ] }),
178
- /* @__PURE__ */ m(vt, { children: [
178
+ /* @__PURE__ */ p(vt, { children: [
179
179
  /* @__PURE__ */ s(Mt, { children: t }),
180
- /* @__PURE__ */ m(At, { children: [
181
- /* @__PURE__ */ m(Tt, { children: [
180
+ /* @__PURE__ */ p(Tt, { children: [
181
+ /* @__PURE__ */ p(At, { children: [
182
182
  /* @__PURE__ */ s(Nt, { alt: "rank-icon", src: Ct }),
183
- /* @__PURE__ */ m(yt, { children: [
184
- Ue(n),
183
+ /* @__PURE__ */ p(yt, { children: [
184
+ Pe(n),
185
185
  /* @__PURE__ */ s(Dt, { children: "PTS" })
186
186
  ] })
187
187
  ] }),
188
188
  /* @__PURE__ */ s(St, {}),
189
- /* @__PURE__ */ m("div", { children: [
189
+ /* @__PURE__ */ p("div", { children: [
190
190
  "TOP ",
191
- c || 0,
191
+ d || 0,
192
192
  "%"
193
193
  ] })
194
194
  ] })
195
195
  ] })
196
196
  ] }) }),
197
- /* @__PURE__ */ m(It, { children: [
198
- /* @__PURE__ */ m(zt, { children: [
197
+ /* @__PURE__ */ p(It, { children: [
198
+ /* @__PURE__ */ p(zt, { children: [
199
199
  /* @__PURE__ */ s(Ae, { indicator: i || 0, title: "Friends rank" }),
200
200
  /* @__PURE__ */ s(Ae, { indicator: r || 0, title: "Global rank" })
201
201
  ] }),
202
- /* @__PURE__ */ m(xt, { children: [
203
- /* @__PURE__ */ s(X, { indicator: d || 0, title: "Win streak" }),
204
- /* @__PURE__ */ s(X, { indicator: p || 0, title: "Correct" }),
205
- /* @__PURE__ */ s(X, { indicator: l || 0, title: "Incorrect" }),
206
- /* @__PURE__ */ s(X, { indicator: `${I || 0}%`, title: "Succ. rate" })
202
+ /* @__PURE__ */ p(xt, { children: [
203
+ /* @__PURE__ */ s(ee, { indicator: c || 0, title: "Win streak" }),
204
+ /* @__PURE__ */ s(ee, { indicator: m || 0, title: "Correct" }),
205
+ /* @__PURE__ */ s(ee, { indicator: l || 0, title: "Incorrect" }),
206
+ /* @__PURE__ */ s(ee, { indicator: `${I || 0}%`, title: "Succ. rate" })
207
207
  ] })
208
208
  ] })
209
209
  ] }), jt = /* @__PURE__ */ o("div")({
210
210
  name: "SponsorLogoWrap",
211
211
  class: "s8p5v5z",
212
212
  propsAsIs: !1
213
- }), kt = () => C, wt = /* @__PURE__ */ o(kt())({
213
+ }), wt = () => w, kt = /* @__PURE__ */ o(wt())({
214
214
  name: "SponsorLogo",
215
215
  class: "s755yti",
216
216
  propsAsIs: !0
217
217
  }), Et = () => /* @__PURE__ */ s(jt, {
218
- children: /* @__PURE__ */ s(wt, {
218
+ children: /* @__PURE__ */ s(kt, {
219
219
  name: "mastersLogo"
220
220
  })
221
221
  }), Lt = /* @__PURE__ */ o("div")({
@@ -230,15 +230,15 @@ const Xe = /* @__PURE__ */ o("div")({
230
230
  name: "Description",
231
231
  class: "dlaj9xp",
232
232
  propsAsIs: !1
233
- }), Qt = ({ title: e, description: t }) => /* @__PURE__ */ m(Lt, { children: [
234
- /* @__PURE__ */ s(C, { name: "icon-check-circle" }),
233
+ }), Qt = ({ title: e, description: t }) => /* @__PURE__ */ p(Lt, { children: [
234
+ /* @__PURE__ */ s(w, { name: "icon-check-circle" }),
235
235
  /* @__PURE__ */ s($t, { children: e }),
236
236
  /* @__PURE__ */ s(Rt, { children: t })
237
237
  ] }), Ut = /* @__PURE__ */ o("div")({
238
238
  name: "Container",
239
239
  class: "c16sbdnm",
240
240
  propsAsIs: !1
241
- }), qt = () => C, Pt = /* @__PURE__ */ o(qt())({
241
+ }), Pt = () => w, qt = /* @__PURE__ */ o(Pt())({
242
242
  name: "IconPrediction",
243
243
  class: "ibhorgl",
244
244
  propsAsIs: !0
@@ -246,7 +246,7 @@ const Xe = /* @__PURE__ */ o("div")({
246
246
  name: "FeedbackIconWrap",
247
247
  class: "f1g20ja7",
248
248
  propsAsIs: !1
249
- }), ee = /* @__PURE__ */ o("div")({
249
+ }), te = /* @__PURE__ */ o("div")({
250
250
  name: "FeedbackHeader",
251
251
  class: "f455ozj",
252
252
  propsAsIs: !1
@@ -258,7 +258,7 @@ const Xe = /* @__PURE__ */ o("div")({
258
258
  name: "FeedbackDescription",
259
259
  class: "fzfk69z",
260
260
  propsAsIs: !1
261
- }), oe = /* @__PURE__ */ o("div")({
261
+ }), ae = /* @__PURE__ */ o("div")({
262
262
  name: "FeedbackText",
263
263
  class: "fx87qaj",
264
264
  propsAsIs: !1
@@ -268,53 +268,53 @@ const Xe = /* @__PURE__ */ o("div")({
268
268
  questionVoted: n,
269
269
  questionType: i,
270
270
  hasCorrectAnswer: r,
271
- questionStatus: d,
272
- showExpiredNotification: p,
271
+ questionStatus: c,
272
+ showExpiredNotification: m,
273
273
  showClosedNotificationTrivia: l,
274
- votedInCurrentRender: c,
274
+ votedInCurrentRender: d,
275
275
  votedAfterQuestionClosed: I,
276
- enteredAnActiveQuestion: M,
276
+ enteredAnActiveQuestion: g,
277
277
  marketClosed: S
278
278
  }) => {
279
- const g = n && (i === z.TRIVIA || i === z.PREDICTION) && c && d !== U.RESOLVED, N = i === z.PREDICTION && !r, y = S && i === z.PREDICTION && !n && !M || i === z.PREDICTION && I && c && M, a = g && N, h = g && r, u = i === z.PREDICTION && n && c && r, f = n && i === z.POLL && c;
280
- if (!p && !l && !a && !h && !y && !f && !u)
279
+ const v = n && (i === y.TRIVIA || i === y.PREDICTION) && d && c !== R.RESOLVED, N = i === y.PREDICTION && !r, z = S && i === y.PREDICTION && !n && !g || i === y.PREDICTION && I && d && g, a = v && N, h = v && r, u = i === y.PREDICTION && n && d && r, f = n && i === y.POLL && d;
280
+ if (!m && !l && !a && !h && !z && !f && !u)
281
281
  return null;
282
- const v = t ? "correct" : "incorrect", T = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
283
- return /* @__PURE__ */ m(Ut, { "data-isPrediction": N, children: [
284
- p && /* @__PURE__ */ m(k, { children: [
285
- /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
286
- /* @__PURE__ */ m("div", { children: [
287
- /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(Y, { children: "Question Expired" }) }),
288
- /* @__PURE__ */ s(oe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
282
+ const M = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
283
+ return /* @__PURE__ */ p(Ut, { "data-isPrediction": N, children: [
284
+ m && /* @__PURE__ */ p(L, { children: [
285
+ /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
286
+ /* @__PURE__ */ p("div", { children: [
287
+ /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Expired" }) }),
288
+ /* @__PURE__ */ s(ae, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
289
289
  ] })
290
290
  ] }),
291
- l && /* @__PURE__ */ m(k, { children: [
292
- /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
293
- /* @__PURE__ */ m("div", { children: [
294
- /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
295
- /* @__PURE__ */ s(oe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
291
+ l && /* @__PURE__ */ p(L, { children: [
292
+ /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
293
+ /* @__PURE__ */ p("div", { children: [
294
+ /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
295
+ /* @__PURE__ */ s(ae, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
296
296
  ] })
297
297
  ] }),
298
- y && /* @__PURE__ */ m(k, { children: [
299
- /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
300
- /* @__PURE__ */ m("div", { children: [
301
- /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
302
- /* @__PURE__ */ s(oe, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
298
+ z && /* @__PURE__ */ p(L, { children: [
299
+ /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(w, { name: "questionExpired" }) }),
300
+ /* @__PURE__ */ p("div", { children: [
301
+ /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(Y, { children: "Question Closed" }) }),
302
+ /* @__PURE__ */ s(ae, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
303
303
  ] })
304
304
  ] }),
305
- a && /* @__PURE__ */ m(k, { children: [
306
- /* @__PURE__ */ s(Pt, { name: "icon-prediction" }),
305
+ a && /* @__PURE__ */ p(L, { children: [
306
+ /* @__PURE__ */ s(qt, { name: "icon-prediction" }),
307
307
  /* @__PURE__ */ s(Y, { children: "Stay tuned to see if your prediction was correct." })
308
308
  ] }),
309
- f && /* @__PURE__ */ m(k, { children: [
310
- /* @__PURE__ */ s(H, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(C, { name: "correct" }) }),
309
+ f && /* @__PURE__ */ p(L, { children: [
310
+ /* @__PURE__ */ s(H, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(w, { name: "correct" }) }),
311
311
  /* @__PURE__ */ s(Y, { children: "That's for answering. Please stay tuned for the next question." })
312
312
  ] }),
313
- (h || u) && /* @__PURE__ */ m(k, { children: [
314
- /* @__PURE__ */ s(H, { "data-feedbackType": v, children: /* @__PURE__ */ s(C, { name: v }) }),
315
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ m(ee, { children: [
316
- /* @__PURE__ */ s(_t, { "data-feedbackType": v, children: T == null ? void 0 : T.title }),
317
- /* @__PURE__ */ s(Y, { children: T == null ? void 0 : T.description })
313
+ (h || u) && /* @__PURE__ */ p(L, { children: [
314
+ /* @__PURE__ */ s(H, { "data-feedbackType": M, children: /* @__PURE__ */ s(w, { name: M }) }),
315
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(te, { children: [
316
+ /* @__PURE__ */ s(_t, { "data-feedbackType": M, children: D == null ? void 0 : D.title }),
317
+ /* @__PURE__ */ s(Y, { children: D == null ? void 0 : D.description })
318
318
  ] }) })
319
319
  ] })
320
320
  ] });
@@ -354,15 +354,15 @@ const Xe = /* @__PURE__ */ o("div")({
354
354
  name: "IconWrap",
355
355
  class: "i19tpfua",
356
356
  propsAsIs: !1
357
- }), Pe = /* @__PURE__ */ o("img")({
357
+ }), _e = /* @__PURE__ */ o("img")({
358
358
  name: "Icon",
359
359
  class: "i1tubmma",
360
360
  propsAsIs: !1
361
- }), Xt = () => Pe, en = /* @__PURE__ */ o(Xt())({
361
+ }), Xt = () => _e, en = /* @__PURE__ */ o(Xt())({
362
362
  name: "IconDefault",
363
363
  class: "i1grrgwj",
364
364
  propsAsIs: !0
365
- }), tn = () => Pe, nn = /* @__PURE__ */ o(tn())({
365
+ }), tn = () => _e, nn = /* @__PURE__ */ o(tn())({
366
366
  name: "IconCircle",
367
367
  class: "ibemyq8",
368
368
  propsAsIs: !0
@@ -375,247 +375,265 @@ const Xe = /* @__PURE__ */ o("div")({
375
375
  class: "i116q4vq",
376
376
  propsAsIs: !1
377
377
  }), on = /* @__PURE__ */ o("span")({
378
- name: "Percentage",
378
+ name: "Pts",
379
379
  class: "p17ajcu2",
380
380
  propsAsIs: !1
381
- }), an = () => C, ln = /* @__PURE__ */ o(an())({
381
+ }), an = /* @__PURE__ */ o("span")({
382
+ name: "Percentage",
383
+ class: "pu9kmlb",
384
+ propsAsIs: !1
385
+ }), ln = () => w, cn = /* @__PURE__ */ o(ln())({
382
386
  name: "CheckIcon",
383
- class: "cu9kmlb",
387
+ class: "c1j2j0s0",
384
388
  propsAsIs: !0
385
- }), Ne = {
389
+ }), ye = {
386
390
  [B.CENTERED]: (e) => /* @__PURE__ */ s(en, { alt: "option-icon", src: e }),
387
391
  [B.TRANSPARENT]: (e) => /* @__PURE__ */ s(Jt, { children: /* @__PURE__ */ s(Kt, { style: { backgroundImage: `url(${e})` } }) }),
388
392
  [B.ROUNDED]: (e) => /* @__PURE__ */ s(nn, { alt: "option-icon", src: e }),
389
393
  [B.NONE]: () => null,
390
394
  [B.UNSET]: () => null
391
- }, cn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
392
- if (e === z.POLL && i)
395
+ }, dn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
396
+ if (e === y.POLL && i)
393
397
  return "correct";
394
- if (e === z.PREDICTION) {
398
+ if (e === y.PREDICTION) {
395
399
  if (t && r)
396
400
  return i ? n ? "correct" : "incorrect" : "unset";
397
401
  if (i)
398
402
  return "correct";
399
403
  }
400
- return e === z.TRIVIA && r && i ? n ? "correct" : "incorrect" : "unset";
401
- }, dn = ({
404
+ return e === y.TRIVIA && r && i ? n ? "correct" : "incorrect" : "unset";
405
+ }, un = ({
402
406
  questionType: e,
403
407
  questionVoted: t,
404
408
  correct: n,
405
409
  hasCorrectAnswer: i,
406
410
  questionStatus: r
407
- }) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || r === U.RESOLVED && n : !1, un = (e) => {
411
+ }) => e === y.TRIVIA ? t && n : e === y.PREDICTION ? t && n && i || r === R.RESOLVED && n : !1, pn = (e) => {
408
412
  var t;
409
413
  const {
410
414
  // option props
411
415
  id: n,
412
416
  icon: i,
413
417
  text: r,
414
- percentageDecimal: d,
418
+ percentageDecimal: c,
419
+ points: m,
415
420
  // extra props
416
- onVote: p,
417
- markThatVoted: l,
418
- youSelected: c,
419
- questionVoted: I,
420
- // ToDo: Figure out why imageMode is not in the response, and delete default value
421
- imageMode: M,
422
- answerTimeExpired: S,
423
- questionStatus: g,
424
- isLoading: N,
425
- questionType: y,
426
- correct: a,
427
- hasCorrectAnswer: h,
428
- votedAfterQuestionClosed: u,
429
- enteredAnActiveQuestion: f,
430
- marketClosed: v
431
- } = e, T = cn(e), A = dn({ questionType: y, questionVoted: I, correct: a, hasCorrectAnswer: h, questionStatus: g }), D = v && y === z.PREDICTION, O = I || D;
432
- return /* @__PURE__ */ m(
421
+ onVote: l,
422
+ markThatVoted: d,
423
+ youSelected: I,
424
+ questionVoted: g,
425
+ imageMode: S,
426
+ answerTimeExpired: v,
427
+ questionStatus: N,
428
+ isLoading: z,
429
+ questionType: a,
430
+ correct: h,
431
+ hasCorrectAnswer: u,
432
+ votedAfterQuestionClosed: f,
433
+ enteredAnActiveQuestion: M,
434
+ marketClosed: D
435
+ } = e, T = dn(e), x = un({ questionType: a, questionVoted: g, correct: h, hasCorrectAnswer: u, questionStatus: N }), O = D && a === y.PREDICTION, k = g || O, A = a === y.PREDICTION && !g && N !== R.RESOLVED;
436
+ return /* @__PURE__ */ p(
433
437
  Ht,
434
438
  {
435
439
  value: n,
436
- "data-selected": c,
440
+ "data-selected": I,
437
441
  "data-answerState": T,
438
- disabled: I || N || S || D && !f || D && f && u,
439
- "data-isNotChecked": I && !c && T !== "incorrect",
440
- onClick: (j) => {
441
- l(
442
- y === z.PREDICTION ? v : g === U.RESOLVED
443
- ), p(j);
442
+ disabled: g || z || v || O && !M || O && M && f,
443
+ "data-isNotChecked": g && !I && T !== "incorrect",
444
+ onClick: (b) => {
445
+ d(
446
+ a === y.PREDICTION ? D : N === R.RESOLVED
447
+ ), l(b);
444
448
  },
445
449
  children: [
446
- /* @__PURE__ */ s(Gt, { "data-answerState": T, style: { width: `${O ? d : 0}%` } }),
447
- /* @__PURE__ */ m(Zt, { children: [
448
- i && M && ((t = Ne[M]) == null ? void 0 : t.call(Ne, i)),
450
+ /* @__PURE__ */ s(Gt, { "data-answerState": T, style: { width: `${k ? c : 0}%` } }),
451
+ /* @__PURE__ */ p(Zt, { children: [
452
+ i && S && ((t = ye[S]) == null ? void 0 : t.call(ye, i)),
449
453
  /* @__PURE__ */ s(sn, { children: r }),
450
- O && /* @__PURE__ */ m(rn, { children: [
451
- A && /* @__PURE__ */ s(ln, { name: "selected" }),
452
- /* @__PURE__ */ s(on, { children: /* @__PURE__ */ s(Le, { value: d, suffix: "%" }) })
454
+ A && /* @__PURE__ */ p("div", { children: [
455
+ /* @__PURE__ */ s(pe, { value: m }),
456
+ /* @__PURE__ */ s(on, { children: "pts" })
457
+ ] }),
458
+ k && /* @__PURE__ */ p(rn, { children: [
459
+ x && /* @__PURE__ */ s(cn, { name: "selected" }),
460
+ /* @__PURE__ */ s(an, { children: /* @__PURE__ */ s(pe, { value: c, suffix: "%" }) })
453
461
  ] })
454
462
  ] })
455
463
  ]
456
464
  }
457
465
  );
458
- }, pn = [q.PRIMARY_GREEN1, q.SECONDARY_RED1, q.SECONDARY_RED1, q.NEUTRALS_GRAY3], mn = [10, 10, 1, 0], hn = /* @__PURE__ */ o("div")({
466
+ }, mn = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], hn = [10, 10, 1, 0], In = /* @__PURE__ */ o("div")({
459
467
  name: "RemainingTime",
460
468
  class: "r165427",
461
469
  propsAsIs: !1
462
- }), In = q.SECONDARY_GREEN6, Te = q.SECONDARY_RED3, fn = q.NEUTRALS_GRAY3, gn = ({
470
+ }), fn = P.SECONDARY_GREEN6, De = P.SECONDARY_RED3, gn = P.NEUTRALS_GRAY3, vn = ({
463
471
  isPlaying: e = !0,
464
472
  duration: t = 30,
465
473
  onTimerExpired: n
466
474
  }) => {
467
- const [i, r] = E(t > 10 ? In : Te), d = ({
468
- remainingTime: c
469
- }) => /* @__PURE__ */ s(hn, {
470
- children: c
471
- }), p = P(() => {
472
- n == null || n(), r(fn);
473
- }, [n, r]), l = P((c) => {
474
- c === 10 && r(Te);
475
+ const [i, r] = $(t > 10 ? fn : De), c = ({
476
+ remainingTime: d
477
+ }) => /* @__PURE__ */ s(In, {
478
+ children: d
479
+ }), m = q(() => {
480
+ n == null || n(), r(gn);
481
+ }, [n, r]), l = q((d) => {
482
+ d === 10 && r(De);
475
483
  }, [r]);
476
484
  return /* @__PURE__ */ s(Ke, {
477
485
  isPlaying: e,
478
486
  duration: t,
479
- colors: pn,
480
- colorsTime: mn,
487
+ colors: mn,
488
+ colorsTime: hn,
481
489
  size: 32,
482
490
  strokeWidth: 2,
483
491
  trailStrokeWidth: 2,
484
492
  trailColor: i,
485
- onComplete: p,
493
+ onComplete: m,
486
494
  onUpdate: l,
487
- children: d
495
+ children: c
488
496
  });
489
- }, vn = /* @__PURE__ */ o("div")({
497
+ }, Mn = /* @__PURE__ */ o("div")({
490
498
  name: "WinBarContainer",
491
499
  class: "wie6cqo",
492
500
  propsAsIs: !1
493
- }), Mn = /* @__PURE__ */ o("div")({
501
+ }), Tn = /* @__PURE__ */ o("div")({
494
502
  name: "Content",
495
503
  class: "cgizw4u",
496
504
  propsAsIs: !1
497
- }), An = /* @__PURE__ */ o("div")({
505
+ }), Nn = /* @__PURE__ */ o("div")({
498
506
  name: "Title",
499
507
  class: "t1l3ucjp",
500
508
  propsAsIs: !1
501
- }), Nn = () => C, Tn = /* @__PURE__ */ o(Nn())({
509
+ }), An = () => w, yn = /* @__PURE__ */ o(An())({
502
510
  name: "WinIcon",
503
511
  class: "wx7j799",
504
512
  propsAsIs: !0
505
- }), yn = /* @__PURE__ */ o("div")({
513
+ }), Dn = /* @__PURE__ */ o("div")({
506
514
  name: "Points",
507
515
  class: "p4lwuj0",
508
516
  propsAsIs: !1
509
- }), Dn = /* @__PURE__ */ o("span")({
517
+ }), Sn = /* @__PURE__ */ o("span")({
510
518
  name: "PointsCount",
511
519
  class: "po9i64o",
512
520
  propsAsIs: !1
513
- }), Sn = /* @__PURE__ */ o("span")({
521
+ }), zn = /* @__PURE__ */ o("span")({
514
522
  name: "PointsUnits",
515
523
  class: "pe5g05h",
516
524
  propsAsIs: !1
517
- }), zn = ({
525
+ }), xn = ({
518
526
  title: e,
519
527
  points: t,
520
528
  isPlayingTimer: n,
521
529
  isTimer: i,
522
530
  questionType: r,
523
- timerDuration: d,
524
- onTimerExpired: p
525
- }) => /* @__PURE__ */ m(vn, { children: [
526
- /* @__PURE__ */ m(Mn, { children: [
527
- e && /* @__PURE__ */ s(An, { children: e }),
528
- t !== void 0 && r !== z.POLL && /* @__PURE__ */ m(k, { children: [
529
- /* @__PURE__ */ s(Tn, { name: "icon-trophy" }),
530
- /* @__PURE__ */ m(yn, { children: [
531
- /* @__PURE__ */ s(Dn, { children: /* @__PURE__ */ s(Le, { value: t }) }),
532
- /* @__PURE__ */ s(Sn, { children: "PTS" })
531
+ timerDuration: c,
532
+ onTimerExpired: m
533
+ }) => /* @__PURE__ */ p(Mn, { "data-centeredItems": r === y.PREDICTION, children: [
534
+ /* @__PURE__ */ p(Tn, { children: [
535
+ e && /* @__PURE__ */ s(Nn, { children: e }),
536
+ t !== void 0 && r !== y.POLL && /* @__PURE__ */ p(L, { children: [
537
+ /* @__PURE__ */ s(yn, { name: "icon-trophy" }),
538
+ /* @__PURE__ */ p(Dn, { children: [
539
+ /* @__PURE__ */ s(Sn, { children: /* @__PURE__ */ s(pe, { value: t }) }),
540
+ /* @__PURE__ */ s(zn, { children: "PTS" })
533
541
  ] })
534
542
  ] })
535
543
  ] }),
536
- i && /* @__PURE__ */ s(gn, { isPlaying: n, onTimerExpired: p, duration: d })
537
- ] }), xn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
538
- var r, d;
539
- const p = e.subject, l = e.type, c = e.status, I = (r = e.options) == null ? void 0 : r.options, M = e.marketClosed, [S, g] = E(!1), [N, y] = E(!1), [a, h] = E(!0), [u, f] = E(!1), [v, T] = E(""), A = e == null ? void 0 : e.id;
540
- he(() => {
541
- l === z.PREDICTION ? M && h(!1) : c === U.RESOLVED && h(!1);
544
+ i && r !== y.PREDICTION && /* @__PURE__ */ s(vn, { isPlaying: n, onTimerExpired: m, duration: c })
545
+ ] }), On = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
546
+ var r, c;
547
+ const m = e.subject, l = e.type, d = e.status, I = (r = e.options) == null ? void 0 : r.options, g = e.marketClosed, [S, v] = $(!1), [N, z] = $(!1), [a, h] = $(!0), [u, f] = $(!1), [M, D] = $(""), T = e == null ? void 0 : e.id;
548
+ fe(() => {
549
+ l === y.PREDICTION ? g && h(!1) : d === R.RESOLVED && h(!1);
542
550
  }, []);
543
- const D = P((b) => {
544
- y(b), g(!0);
545
- }, []), O = P(
546
- async (b) => {
547
- if (A) {
548
- const Q = b.currentTarget.value;
549
- T(Q), await n(A, Q);
551
+ const x = q((C) => {
552
+ z(C), v(!0);
553
+ }, []), O = q(
554
+ async (C) => {
555
+ if (T) {
556
+ const U = C.currentTarget.value;
557
+ D(U), await n(T, U);
550
558
  }
551
559
  },
552
- [A, T, n]
553
- ), j = P(() => {
560
+ [T, D, n]
561
+ ), k = q(() => {
554
562
  f(!0), setTimeout(i, 3e3);
555
- }, [i]), x = w(
556
- () => e == null ? void 0 : e.answers.find((b) => b.youVoted === !0),
563
+ }, [i]), A = E(
564
+ () => e == null ? void 0 : e.answers.find((C) => C.youVoted === !0),
557
565
  [e]
558
- ), L = w(
559
- () => !!(e != null && e.answers.find((b) => b.correct === !0)),
566
+ ), b = E(
567
+ () => !!(e != null && e.answers.find((C) => C.correct === !0)),
560
568
  [e]
561
- ), $ = w(
562
- () => e == null ? void 0 : e.answers.find((b) => b.correct === !0),
569
+ ), j = E(
570
+ () => e == null ? void 0 : e.answers.find((C) => C.correct === !0),
563
571
  [e]
564
- ), ne = w(() => e ? e.answers.map((b) => {
565
- var Q;
572
+ ), se = E(() => e ? e.answers.map((C) => {
573
+ var U;
566
574
  return {
567
- ...b,
568
- questionVoted: !!x,
569
- youSelected: v === b.id,
575
+ ...C,
576
+ questionVoted: !!A,
577
+ youSelected: M === C.id,
570
578
  isLoading: t,
571
- hasCorrectAnswer: L,
579
+ hasCorrectAnswer: b,
572
580
  questionType: e.type,
573
581
  answerTimeExpired: u,
574
- questionStatus: c,
575
- imageMode: (Q = e.appearance) == null ? void 0 : Q.images,
582
+ questionStatus: d,
583
+ imageMode: (U = e.appearance) == null ? void 0 : U.images,
576
584
  onVote: O
577
585
  };
578
586
  }) : [], [
579
- L,
587
+ b,
580
588
  u,
581
589
  t,
582
590
  e,
583
- x,
584
- c,
591
+ A,
592
+ d,
585
593
  O,
586
- v
587
- ]), se = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, R = c === U.RESOLVED && l === z.TRIVIA && !x && !a, Z = l === z.TRIVIA && N && S && a, ie = w(() => {
588
- if (!(R || u))
589
- return c === U.RESOLVED ? 0 : x ? x.correct ? x.points : 0 : $ == null ? void 0 : $.points;
590
- }, [u, x, $, c, R]), J = w(() => R || u ? "Time expired" : e.type === z.POLL ? "Time remaining" : x ? "You won" : "To win", [u, e.type, x, R]), W = x || R || Z || l === z.TRIVIA && c === U.RESOLVED && a;
591
- return /* @__PURE__ */ s(me, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ m(Wt, { children: [
594
+ M
595
+ ]), ie = I && (I.case === "trivia" || I.case === "prediction") ? I.value : void 0, Q = d === R.RESOLVED && l === y.TRIVIA && !A && !a, Z = l === y.TRIVIA && N && S && a, J = E(() => l === y.PREDICTION ? !!(A && !b || A && b && j != null && j.youVoted) : !0, [l, A, b, j]), K = E(() => {
596
+ if (l === y.PREDICTION && A && (!b || b && j != null && j.youVoted))
597
+ return A.points;
598
+ if (!(Q || u))
599
+ return d === R.RESOLVED ? 0 : A ? A.correct ? A.points : 0 : j == null ? void 0 : j.points;
600
+ }, [
601
+ u,
602
+ A,
603
+ j,
604
+ d,
605
+ Q,
606
+ l,
607
+ b
608
+ ]), W = E(() => l === y.PREDICTION && A ? b ? b && j != null && j.youVoted ? "You won" : "" : "To win" : Q || u ? "Time expired" : l === y.POLL ? "Time remaining" : A ? "You won" : "To win", [u, l, A, Q, b, j]), re = A || Q || Z || l === y.TRIVIA && d === R.RESOLVED && a;
609
+ return /* @__PURE__ */ s(Ie, { "data-question-header": "true", children: /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ p(Wt, { children: [
592
610
  /* @__PURE__ */ s(
593
611
  Yt,
594
612
  {
595
- feedbackMessages: se,
596
- questionVoted: !!x,
597
- questionVotedCorrectly: x == null ? void 0 : x.correct,
613
+ feedbackMessages: ie,
614
+ questionVoted: !!A,
615
+ questionVotedCorrectly: A == null ? void 0 : A.correct,
598
616
  questionType: l,
599
- hasCorrectAnswer: L,
600
- questionStatus: c,
601
- showExpiredNotification: R,
617
+ hasCorrectAnswer: b,
618
+ questionStatus: d,
619
+ showExpiredNotification: Q,
602
620
  showClosedNotificationTrivia: Z,
603
621
  votedInCurrentRender: S,
604
622
  votedAfterQuestionClosed: N,
605
623
  enteredAnActiveQuestion: a,
606
- marketClosed: M
624
+ marketClosed: g
607
625
  }
608
626
  ),
609
- e.type !== z.PREDICTION && /* @__PURE__ */ s(
610
- zn,
627
+ J && /* @__PURE__ */ s(
628
+ xn,
611
629
  {
612
- title: J,
613
- points: ie,
614
- onTimerExpired: j,
630
+ title: W,
631
+ points: K,
632
+ onTimerExpired: k,
615
633
  questionType: e.type,
616
634
  isTimer: !t,
617
- isPlayingTimer: !x,
618
- timerDuration: W ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
635
+ isPlayingTimer: !A,
636
+ timerDuration: re ? 0 : Number(((c = e == null ? void 0 : e.appearance) == null ? void 0 : c.autoHideInterval) || "30")
619
637
  }
620
638
  ),
621
639
  u ? /* @__PURE__ */ s(
@@ -624,34 +642,34 @@ const Xe = /* @__PURE__ */ o("div")({
624
642
  title: "More to come...",
625
643
  description: "Watch for additional enhanced stream interactive experience."
626
644
  }
627
- ) : /* @__PURE__ */ m(k, { children: [
628
- /* @__PURE__ */ s(Ft, { "data-isPrediction": e.type === z.PREDICTION, children: p }),
629
- /* @__PURE__ */ s(Bt, { children: ne.map((b) => /* @__PURE__ */ s(
630
- un,
645
+ ) : /* @__PURE__ */ p(L, { children: [
646
+ /* @__PURE__ */ s(Ft, { "data-withoutWinBar": !J, children: m }),
647
+ /* @__PURE__ */ s(Bt, { children: se.map((C) => /* @__PURE__ */ s(
648
+ pn,
631
649
  {
632
- ...b,
633
- markThatVoted: D,
650
+ ...C,
651
+ markThatVoted: x,
634
652
  votedAfterQuestionClosed: N,
635
653
  enteredAnActiveQuestion: a,
636
- marketClosed: M
654
+ marketClosed: g
637
655
  },
638
- b.id
656
+ C.id
639
657
  )) })
640
658
  ] })
641
659
  ] }) }) });
642
- }, On = /* @__PURE__ */ o("div")({
660
+ }, bn = /* @__PURE__ */ o("div")({
643
661
  name: "Container",
644
662
  class: "cgn5uen",
645
663
  propsAsIs: !1
646
- }), bn = /* @__PURE__ */ o("div")({
664
+ }), Cn = /* @__PURE__ */ o("div")({
647
665
  name: "Content",
648
666
  class: "c1px8nt6",
649
667
  propsAsIs: !1
650
- }), Cn = /* @__PURE__ */ o("h3")({
668
+ }), jn = /* @__PURE__ */ o("h3")({
651
669
  name: "Title",
652
670
  class: "t5et2jt",
653
671
  propsAsIs: !1
654
- }), jn = /* @__PURE__ */ o("div")({
672
+ }), wn = /* @__PURE__ */ o("div")({
655
673
  name: "Description",
656
674
  class: "d1i2kpk2",
657
675
  propsAsIs: !1
@@ -659,104 +677,104 @@ const Xe = /* @__PURE__ */ o("div")({
659
677
  name: "DateWrap",
660
678
  class: "dd3lh3p",
661
679
  propsAsIs: !1
662
- }), wn = /* @__PURE__ */ o("img")({
680
+ }), En = /* @__PURE__ */ o("img")({
663
681
  name: "Image",
664
682
  class: "i1gfjeu5",
665
683
  propsAsIs: !1
666
- }), _e = ({
684
+ }), Ye = ({
667
685
  created: e,
668
686
  image: t,
669
687
  title: n,
670
688
  isPickHistory: i,
671
689
  instantView: r
672
690
  }) => {
673
- const d = w(() => {
691
+ const c = E(() => {
674
692
  if (e) {
675
693
  const l = new Date(e);
676
- if (ge(l))
694
+ if (Me(l))
677
695
  return {
678
- date: Ie(l),
679
- time: fe(l)
696
+ date: ge(l),
697
+ time: ve(l)
680
698
  };
681
699
  }
682
700
  return null;
683
- }, [e]), p = (r == null ? void 0 : r.image) || t;
684
- return /* @__PURE__ */ m(On, { children: [
685
- d && /* @__PURE__ */ m(kn, { children: [
686
- d.date,
701
+ }, [e]), m = (r == null ? void 0 : r.image) || t;
702
+ return /* @__PURE__ */ p(bn, { children: [
703
+ c && /* @__PURE__ */ p(kn, { children: [
704
+ c.date,
687
705
  " · ",
688
- d.time
706
+ c.time
689
707
  ] }),
690
708
  (r == null ? void 0 : r.video) && /* @__PURE__ */ s(We, { source: r.video.url, poster: r.video.thumbnailUrl }),
691
- p && !(r != null && r.video) && /* @__PURE__ */ s(wn, { src: p }),
692
- /* @__PURE__ */ m(bn, { children: [
693
- /* @__PURE__ */ s(Cn, { children: i ? n : r == null ? void 0 : r.heading }),
694
- !i && /* @__PURE__ */ s(jn, { children: r == null ? void 0 : r.body })
709
+ m && !(r != null && r.video) && /* @__PURE__ */ s(En, { src: m }),
710
+ /* @__PURE__ */ p(Cn, { children: [
711
+ /* @__PURE__ */ s(jn, { children: i ? n : r == null ? void 0 : r.heading }),
712
+ !i && /* @__PURE__ */ s(wn, { children: r == null ? void 0 : r.body })
695
713
  ] })
696
714
  ] });
697
- }, En = /* @__PURE__ */ o("div")({
715
+ }, Ln = /* @__PURE__ */ o("div")({
698
716
  name: "Container",
699
717
  class: "c1euiow",
700
718
  propsAsIs: !1
701
- }), Ln = /* @__PURE__ */ o("a")({
719
+ }), $n = /* @__PURE__ */ o("a")({
702
720
  name: "WebLinkBtn",
703
721
  class: "w19zie3h",
704
722
  propsAsIs: !1
705
- }), $n = ({ instantView: e, ...t }) => /* @__PURE__ */ m(En, { children: [
706
- /* @__PURE__ */ s(_e, { instantView: e, ...t }),
707
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ m(Ln, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
723
+ }), Rn = ({ instantView: e, ...t }) => /* @__PURE__ */ p(Ln, { children: [
724
+ /* @__PURE__ */ s(Ye, { instantView: e, ...t }),
725
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ p($n, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
708
726
  e == null ? void 0 : e.webLink.label,
709
- /* @__PURE__ */ s(C, { name: "icon-external-link" })
727
+ /* @__PURE__ */ s(w, { name: "icon-external-link" })
710
728
  ] })
711
- ] }), Rn = /* @__PURE__ */ o("div")({
729
+ ] }), Qn = /* @__PURE__ */ o("div")({
712
730
  name: "Container",
713
731
  class: "c1dcxmvf",
714
732
  propsAsIs: !1
715
- }), Qn = /* @__PURE__ */ o("div")({
733
+ }), Un = /* @__PURE__ */ o("div")({
716
734
  name: "DateTime",
717
735
  class: "db4q22c",
718
736
  propsAsIs: !1
719
- }), Un = /* @__PURE__ */ o("blockquote")({
737
+ }), Pn = /* @__PURE__ */ o("blockquote")({
720
738
  name: "Quote",
721
739
  class: "q111mmic",
722
740
  propsAsIs: !1
723
741
  }), qn = ({ created: e, ...t }) => {
724
- const n = w(() => {
742
+ const n = E(() => {
725
743
  if (e) {
726
744
  const i = new Date(e);
727
- if (ge(i))
745
+ if (Me(i))
728
746
  return {
729
- date: Ie(i),
730
- time: fe(i)
747
+ date: ge(i),
748
+ time: ve(i)
731
749
  };
732
750
  }
733
751
  return null;
734
752
  }, [e]);
735
- return /* @__PURE__ */ m(Rn, { children: [
736
- n && /* @__PURE__ */ m(Qn, { children: [
753
+ return /* @__PURE__ */ p(Qn, { children: [
754
+ n && /* @__PURE__ */ p(Un, { children: [
737
755
  n.date,
738
756
  " · ",
739
757
  n.time
740
758
  ] }),
741
- t.title && /* @__PURE__ */ s(Un, { children: t.title }),
742
- /* @__PURE__ */ s(we, { ...t })
759
+ t.title && /* @__PURE__ */ s(Pn, { children: t.title }),
760
+ /* @__PURE__ */ s(Le, { ...t })
743
761
  ] });
744
- }, Pn = /* @__PURE__ */ o("div")({
762
+ }, _n = /* @__PURE__ */ o("div")({
745
763
  name: "QuestionContainer",
746
764
  class: "qdri6g3",
747
765
  propsAsIs: !1
748
- }), _n = ({
766
+ }), Yn = ({
749
767
  openedQuestion: e
750
768
  }) => {
751
769
  var t, n;
752
- return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s($n, {
770
+ return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(Rn, {
753
771
  created: e.attributes.created,
754
772
  ...e.attributes.attributes.value
755
773
  }) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(qn, {
756
774
  created: e.attributes.created,
757
775
  ...e.attributes.attributes.value
758
776
  }) : null;
759
- }, Yn = ({
777
+ }, Vn = ({
760
778
  extendedQuestion: e,
761
779
  vote: t,
762
780
  close: n
@@ -765,13 +783,13 @@ const Xe = /* @__PURE__ */ o("div")({
765
783
  loading: i,
766
784
  data: r
767
785
  } = e;
768
- return r ? /* @__PURE__ */ s(xn, {
786
+ return r ? /* @__PURE__ */ s(On, {
769
787
  vote: t,
770
788
  close: n,
771
789
  openedQuestion: r,
772
790
  isLoading: !!i
773
791
  }) : null;
774
- }, Vn = ({
792
+ }, Wn = ({
775
793
  gamification: e
776
794
  }) => {
777
795
  var t;
@@ -779,45 +797,45 @@ const Xe = /* @__PURE__ */ o("div")({
779
797
  if (!n)
780
798
  return null;
781
799
  const r = n.type;
782
- return /* @__PURE__ */ m(Pn, {
783
- children: [/* @__PURE__ */ s(Re, {
800
+ return /* @__PURE__ */ p(_n, {
801
+ children: [/* @__PURE__ */ s(Qe, {
784
802
  close: e.closeQuestion,
785
- type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
786
- }), r === "question" && /* @__PURE__ */ s(Yn, {
803
+ type: ((t = n.attributes) == null ? void 0 : t.type) || y.UNSET
804
+ }), r === "question" && /* @__PURE__ */ s(Vn, {
787
805
  vote: e.submitAnswer,
788
806
  close: e.closeQuestion,
789
807
  extendedQuestion: i
790
- }), r !== "question" && /* @__PURE__ */ s(_n, {
808
+ }), r !== "question" && /* @__PURE__ */ s(Yn, {
791
809
  openedQuestion: n
792
810
  }), /* @__PURE__ */ s(Et, {
793
811
  sponsorLogo: ""
794
812
  })]
795
813
  });
796
- }, Wn = /* @__PURE__ */ o("div")({
814
+ }, Fn = /* @__PURE__ */ o("div")({
797
815
  name: "Container",
798
816
  class: "c115qtkr",
799
817
  propsAsIs: !1
800
- }), Fn = /* @__PURE__ */ o("div")({
818
+ }), Bn = /* @__PURE__ */ o("div")({
801
819
  name: "STabs",
802
820
  class: "sxnslc8",
803
821
  propsAsIs: !1
804
- }), Bn = /* @__PURE__ */ o("button")({
822
+ }), Hn = /* @__PURE__ */ o("button")({
805
823
  name: "Button",
806
824
  class: "b1umzux0",
807
825
  propsAsIs: !1
808
- }), Hn = /* @__PURE__ */ o("span")({
826
+ }), Gn = /* @__PURE__ */ o("span")({
809
827
  name: "Title",
810
828
  class: "tspsaas",
811
829
  propsAsIs: !1
812
830
  });
813
831
  var G = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(G || {});
814
- const ye = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Bn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Hn, { children: e }) }), Gn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Wn, { children: /* @__PURE__ */ m(Fn, { "data-position": e === "home" ? "left" : "right", children: [
815
- /* @__PURE__ */ s(ye, { title: "Home", active: e === "home", onClick: () => t(
832
+ const Se = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Hn, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(Gn, { children: e }) }), Zn = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Fn, { children: /* @__PURE__ */ p(Bn, { "data-position": e === "home" ? "left" : "right", children: [
833
+ /* @__PURE__ */ s(Se, { title: "Home", active: e === "home", onClick: () => t(
816
834
  "home"
817
835
  /* HOME */
818
836
  ) }),
819
837
  /* @__PURE__ */ s(
820
- ye,
838
+ Se,
821
839
  {
822
840
  title: "Friends",
823
841
  active: e === "leaderboard",
@@ -828,81 +846,81 @@ const ye = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(Bn, { onCl
828
846
  }
829
847
  )
830
848
  ] }) });
831
- function ue() {
832
- return ue = Object.assign ? Object.assign.bind() : function(e) {
849
+ function me() {
850
+ return me = Object.assign ? Object.assign.bind() : function(e) {
833
851
  for (var t = 1; t < arguments.length; t++) {
834
852
  var n = arguments[t];
835
853
  for (var i in n)
836
854
  Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
837
855
  }
838
856
  return e;
839
- }, ue.apply(this, arguments);
857
+ }, me.apply(this, arguments);
840
858
  }
841
- function De(e) {
859
+ function ze(e) {
842
860
  if (e === void 0)
843
861
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
844
862
  return e;
845
863
  }
846
- function pe(e, t) {
847
- return pe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
864
+ function he(e, t) {
865
+ return he = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
848
866
  return i.__proto__ = r, i;
849
- }, pe(e, t);
867
+ }, he(e, t);
850
868
  }
851
- function Zn(e, t) {
852
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, pe(e, t);
869
+ function Jn(e, t) {
870
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, he(e, t);
853
871
  }
854
- var Se = Number.isNaN || function(t) {
872
+ var xe = Number.isNaN || function(t) {
855
873
  return typeof t == "number" && t !== t;
856
874
  };
857
- function Jn(e, t) {
858
- return !!(e === t || Se(e) && Se(t));
859
- }
860
875
  function Kn(e, t) {
876
+ return !!(e === t || xe(e) && xe(t));
877
+ }
878
+ function Xn(e, t) {
861
879
  if (e.length !== t.length)
862
880
  return !1;
863
881
  for (var n = 0; n < e.length; n++)
864
- if (!Jn(e[n], t[n]))
882
+ if (!Kn(e[n], t[n]))
865
883
  return !1;
866
884
  return !0;
867
885
  }
868
- function ae(e, t) {
869
- t === void 0 && (t = Kn);
870
- var n, i = [], r, d = !1;
871
- function p() {
872
- for (var l = [], c = 0; c < arguments.length; c++)
873
- l[c] = arguments[c];
874
- return d && n === this && t(l, i) || (r = e.apply(this, l), d = !0, n = this, i = l), r;
886
+ function le(e, t) {
887
+ t === void 0 && (t = Xn);
888
+ var n, i = [], r, c = !1;
889
+ function m() {
890
+ for (var l = [], d = 0; d < arguments.length; d++)
891
+ l[d] = arguments[d];
892
+ return c && n === this && t(l, i) || (r = e.apply(this, l), c = !0, n = this, i = l), r;
875
893
  }
876
- return p;
894
+ return m;
877
895
  }
878
- var Xn = typeof performance == "object" && typeof performance.now == "function", ze = Xn ? function() {
896
+ var es = typeof performance == "object" && typeof performance.now == "function", Oe = es ? function() {
879
897
  return performance.now();
880
898
  } : function() {
881
899
  return Date.now();
882
900
  };
883
- function xe(e) {
901
+ function be(e) {
884
902
  cancelAnimationFrame(e.id);
885
903
  }
886
- function es(e, t) {
887
- var n = ze();
904
+ function ts(e, t) {
905
+ var n = Oe();
888
906
  function i() {
889
- ze() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
907
+ Oe() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
890
908
  }
891
909
  var r = {
892
910
  id: requestAnimationFrame(i)
893
911
  };
894
912
  return r;
895
913
  }
896
- var le = -1;
897
- function Oe(e) {
898
- if (e === void 0 && (e = !1), le === -1 || e) {
914
+ var ce = -1;
915
+ function Ce(e) {
916
+ if (e === void 0 && (e = !1), ce === -1 || e) {
899
917
  var t = document.createElement("div"), n = t.style;
900
- n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), le = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
918
+ n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), ce = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
901
919
  }
902
- return le;
920
+ return ce;
903
921
  }
904
922
  var V = null;
905
- function be(e) {
923
+ function je(e) {
906
924
  if (e === void 0 && (e = !1), V === null || e) {
907
925
  var t = document.createElement("div"), n = t.style;
908
926
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
@@ -911,84 +929,84 @@ function be(e) {
911
929
  }
912
930
  return V;
913
931
  }
914
- var ts = 150, ns = function(t, n) {
932
+ var ns = 150, ss = function(t, n) {
915
933
  return t;
916
934
  };
917
- function ss(e) {
918
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, d = e.getOffsetForIndexAndAlignment, p = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, c = e.initInstanceProps, I = e.shouldResetStyleCacheOnItemSizeChange, M = e.validateProps;
935
+ function is(e) {
936
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, c = e.getOffsetForIndexAndAlignment, m = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, d = e.initInstanceProps, I = e.shouldResetStyleCacheOnItemSizeChange, g = e.validateProps;
919
937
  return t = /* @__PURE__ */ function(S) {
920
- Zn(g, S);
921
- function g(y) {
938
+ Jn(v, S);
939
+ function v(z) {
922
940
  var a;
923
- return a = S.call(this, y) || this, a._instanceProps = c(a.props, De(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
924
- instance: De(a),
941
+ return a = S.call(this, z) || this, a._instanceProps = d(a.props, ze(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
942
+ instance: ze(a),
925
943
  isScrolling: !1,
926
944
  scrollDirection: "forward",
927
945
  scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
928
946
  scrollUpdateWasRequested: !1
929
- }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = ae(function(h, u, f, v) {
947
+ }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = le(function(h, u, f, M) {
930
948
  return a.props.onItemsRendered({
931
949
  overscanStartIndex: h,
932
950
  overscanStopIndex: u,
933
951
  visibleStartIndex: f,
934
- visibleStopIndex: v
952
+ visibleStopIndex: M
935
953
  });
936
- }), a._callOnScroll = void 0, a._callOnScroll = ae(function(h, u, f) {
954
+ }), a._callOnScroll = void 0, a._callOnScroll = le(function(h, u, f) {
937
955
  return a.props.onScroll({
938
956
  scrollDirection: h,
939
957
  scrollOffset: u,
940
958
  scrollUpdateWasRequested: f
941
959
  });
942
960
  }), a._getItemStyle = void 0, a._getItemStyle = function(h) {
943
- var u = a.props, f = u.direction, v = u.itemSize, T = u.layout, A = a._getItemStyleCache(I && v, I && T, I && f), D;
944
- if (A.hasOwnProperty(h))
945
- D = A[h];
961
+ var u = a.props, f = u.direction, M = u.itemSize, D = u.layout, T = a._getItemStyleCache(I && M, I && D, I && f), x;
962
+ if (T.hasOwnProperty(h))
963
+ x = T[h];
946
964
  else {
947
- var O = n(a.props, h, a._instanceProps), j = r(a.props, h, a._instanceProps), x = f === "horizontal" || T === "horizontal", L = f === "rtl", $ = x ? O : 0;
948
- A[h] = D = {
965
+ var O = n(a.props, h, a._instanceProps), k = r(a.props, h, a._instanceProps), A = f === "horizontal" || D === "horizontal", b = f === "rtl", j = A ? O : 0;
966
+ T[h] = x = {
949
967
  position: "absolute",
950
- left: L ? void 0 : $,
951
- right: L ? $ : void 0,
952
- top: x ? 0 : O,
953
- height: x ? "100%" : j,
954
- width: x ? j : "100%"
968
+ left: b ? void 0 : j,
969
+ right: b ? j : void 0,
970
+ top: A ? 0 : O,
971
+ height: A ? "100%" : k,
972
+ width: A ? k : "100%"
955
973
  };
956
974
  }
957
- return D;
958
- }, a._getItemStyleCache = void 0, a._getItemStyleCache = ae(function(h, u, f) {
975
+ return x;
976
+ }, a._getItemStyleCache = void 0, a._getItemStyleCache = le(function(h, u, f) {
959
977
  return {};
960
978
  }), a._onScrollHorizontal = function(h) {
961
- var u = h.currentTarget, f = u.clientWidth, v = u.scrollLeft, T = u.scrollWidth;
962
- a.setState(function(A) {
963
- if (A.scrollOffset === v)
979
+ var u = h.currentTarget, f = u.clientWidth, M = u.scrollLeft, D = u.scrollWidth;
980
+ a.setState(function(T) {
981
+ if (T.scrollOffset === M)
964
982
  return null;
965
- var D = a.props.direction, O = v;
966
- if (D === "rtl")
967
- switch (be()) {
983
+ var x = a.props.direction, O = M;
984
+ if (x === "rtl")
985
+ switch (je()) {
968
986
  case "negative":
969
- O = -v;
987
+ O = -M;
970
988
  break;
971
989
  case "positive-descending":
972
- O = T - f - v;
990
+ O = D - f - M;
973
991
  break;
974
992
  }
975
- return O = Math.max(0, Math.min(O, T - f)), {
993
+ return O = Math.max(0, Math.min(O, D - f)), {
976
994
  isScrolling: !0,
977
- scrollDirection: A.scrollOffset < v ? "forward" : "backward",
995
+ scrollDirection: T.scrollOffset < M ? "forward" : "backward",
978
996
  scrollOffset: O,
979
997
  scrollUpdateWasRequested: !1
980
998
  };
981
999
  }, a._resetIsScrollingDebounced);
982
1000
  }, a._onScrollVertical = function(h) {
983
- var u = h.currentTarget, f = u.clientHeight, v = u.scrollHeight, T = u.scrollTop;
984
- a.setState(function(A) {
985
- if (A.scrollOffset === T)
1001
+ var u = h.currentTarget, f = u.clientHeight, M = u.scrollHeight, D = u.scrollTop;
1002
+ a.setState(function(T) {
1003
+ if (T.scrollOffset === D)
986
1004
  return null;
987
- var D = Math.max(0, Math.min(T, v - f));
1005
+ var x = Math.max(0, Math.min(D, M - f));
988
1006
  return {
989
1007
  isScrolling: !0,
990
- scrollDirection: A.scrollOffset < D ? "forward" : "backward",
991
- scrollOffset: D,
1008
+ scrollDirection: T.scrollOffset < x ? "forward" : "backward",
1009
+ scrollOffset: x,
992
1010
  scrollUpdateWasRequested: !1
993
1011
  };
994
1012
  }, a._resetIsScrollingDebounced);
@@ -996,7 +1014,7 @@ function ss(e) {
996
1014
  var u = a.props.outerRef;
997
1015
  a._outerRef = h, typeof u == "function" ? u(h) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = h);
998
1016
  }, a._resetIsScrollingDebounced = function() {
999
- a._resetIsScrollingTimeoutId !== null && xe(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = es(a._resetIsScrolling, ts);
1017
+ a._resetIsScrollingTimeoutId !== null && be(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = ts(a._resetIsScrolling, ns);
1000
1018
  }, a._resetIsScrolling = function() {
1001
1019
  a._resetIsScrollingTimeoutId = null, a.setState({
1002
1020
  isScrolling: !1
@@ -1005,10 +1023,10 @@ function ss(e) {
1005
1023
  });
1006
1024
  }, a;
1007
1025
  }
1008
- g.getDerivedStateFromProps = function(a, h) {
1009
- return is(a, h), M(a), null;
1026
+ v.getDerivedStateFromProps = function(a, h) {
1027
+ return rs(a, h), g(a), null;
1010
1028
  };
1011
- var N = g.prototype;
1029
+ var N = v.prototype;
1012
1030
  return N.scrollTo = function(a) {
1013
1031
  a = Math.max(0, a), this.setState(function(h) {
1014
1032
  return h.scrollOffset === a ? null : {
@@ -1019,101 +1037,101 @@ function ss(e) {
1019
1037
  }, this._resetIsScrollingDebounced);
1020
1038
  }, N.scrollToItem = function(a, h) {
1021
1039
  h === void 0 && (h = "auto");
1022
- var u = this.props, f = u.itemCount, v = u.layout, T = this.state.scrollOffset;
1040
+ var u = this.props, f = u.itemCount, M = u.layout, D = this.state.scrollOffset;
1023
1041
  a = Math.max(0, Math.min(a, f - 1));
1024
- var A = 0;
1042
+ var T = 0;
1025
1043
  if (this._outerRef) {
1026
- var D = this._outerRef;
1027
- v === "vertical" ? A = D.scrollWidth > D.clientWidth ? Oe() : 0 : A = D.scrollHeight > D.clientHeight ? Oe() : 0;
1044
+ var x = this._outerRef;
1045
+ M === "vertical" ? T = x.scrollWidth > x.clientWidth ? Ce() : 0 : T = x.scrollHeight > x.clientHeight ? Ce() : 0;
1028
1046
  }
1029
- this.scrollTo(d(this.props, a, h, T, this._instanceProps, A));
1047
+ this.scrollTo(c(this.props, a, h, D, this._instanceProps, T));
1030
1048
  }, N.componentDidMount = function() {
1031
1049
  var a = this.props, h = a.direction, u = a.initialScrollOffset, f = a.layout;
1032
1050
  if (typeof u == "number" && this._outerRef != null) {
1033
- var v = this._outerRef;
1034
- h === "horizontal" || f === "horizontal" ? v.scrollLeft = u : v.scrollTop = u;
1051
+ var M = this._outerRef;
1052
+ h === "horizontal" || f === "horizontal" ? M.scrollLeft = u : M.scrollTop = u;
1035
1053
  }
1036
1054
  this._callPropsCallbacks();
1037
1055
  }, N.componentDidUpdate = function() {
1038
- var a = this.props, h = a.direction, u = a.layout, f = this.state, v = f.scrollOffset, T = f.scrollUpdateWasRequested;
1039
- if (T && this._outerRef != null) {
1040
- var A = this._outerRef;
1056
+ var a = this.props, h = a.direction, u = a.layout, f = this.state, M = f.scrollOffset, D = f.scrollUpdateWasRequested;
1057
+ if (D && this._outerRef != null) {
1058
+ var T = this._outerRef;
1041
1059
  if (h === "horizontal" || u === "horizontal")
1042
1060
  if (h === "rtl")
1043
- switch (be()) {
1061
+ switch (je()) {
1044
1062
  case "negative":
1045
- A.scrollLeft = -v;
1063
+ T.scrollLeft = -M;
1046
1064
  break;
1047
1065
  case "positive-ascending":
1048
- A.scrollLeft = v;
1066
+ T.scrollLeft = M;
1049
1067
  break;
1050
1068
  default:
1051
- var D = A.clientWidth, O = A.scrollWidth;
1052
- A.scrollLeft = O - D - v;
1069
+ var x = T.clientWidth, O = T.scrollWidth;
1070
+ T.scrollLeft = O - x - M;
1053
1071
  break;
1054
1072
  }
1055
1073
  else
1056
- A.scrollLeft = v;
1074
+ T.scrollLeft = M;
1057
1075
  else
1058
- A.scrollTop = v;
1076
+ T.scrollTop = M;
1059
1077
  }
1060
1078
  this._callPropsCallbacks();
1061
1079
  }, N.componentWillUnmount = function() {
1062
- this._resetIsScrollingTimeoutId !== null && xe(this._resetIsScrollingTimeoutId);
1080
+ this._resetIsScrollingTimeoutId !== null && be(this._resetIsScrollingTimeoutId);
1063
1081
  }, N.render = function() {
1064
- var a = this.props, h = a.children, u = a.className, f = a.direction, v = a.height, T = a.innerRef, A = a.innerElementType, D = a.innerTagName, O = a.itemCount, j = a.itemData, x = a.itemKey, L = x === void 0 ? ns : x, $ = a.layout, ne = a.outerElementType, se = a.outerTagName, R = a.style, Z = a.useIsScrolling, ie = a.width, J = this.state.isScrolling, W = f === "horizontal" || $ === "horizontal", b = W ? this._onScrollHorizontal : this._onScrollVertical, Q = this._getRangeToRender(), Ye = Q[0], Ve = Q[1], ve = [];
1082
+ var a = this.props, h = a.children, u = a.className, f = a.direction, M = a.height, D = a.innerRef, T = a.innerElementType, x = a.innerTagName, O = a.itemCount, k = a.itemData, A = a.itemKey, b = A === void 0 ? ss : A, j = a.layout, se = a.outerElementType, ie = a.outerTagName, Q = a.style, Z = a.useIsScrolling, J = a.width, K = this.state.isScrolling, W = f === "horizontal" || j === "horizontal", re = W ? this._onScrollHorizontal : this._onScrollVertical, C = this._getRangeToRender(), U = C[0], Ve = C[1], Te = [];
1065
1083
  if (O > 0)
1066
- for (var F = Ye; F <= Ve; F++)
1067
- ve.push(re(h, {
1068
- data: j,
1069
- key: L(F, j),
1084
+ for (var F = U; F <= Ve; F++)
1085
+ Te.push(oe(h, {
1086
+ data: k,
1087
+ key: b(F, k),
1070
1088
  index: F,
1071
- isScrolling: Z ? J : void 0,
1089
+ isScrolling: Z ? K : void 0,
1072
1090
  style: this._getItemStyle(F)
1073
1091
  }));
1074
- var Me = i(this.props, this._instanceProps);
1075
- return re(ne || se || "div", {
1092
+ var Ne = i(this.props, this._instanceProps);
1093
+ return oe(se || ie || "div", {
1076
1094
  className: u,
1077
- onScroll: b,
1095
+ onScroll: re,
1078
1096
  ref: this._outerRefSetter,
1079
- style: ue({
1097
+ style: me({
1080
1098
  position: "relative",
1081
- height: v,
1082
- width: ie,
1099
+ height: M,
1100
+ width: J,
1083
1101
  overflow: "auto",
1084
1102
  WebkitOverflowScrolling: "touch",
1085
1103
  willChange: "transform",
1086
1104
  direction: f
1087
- }, R)
1088
- }, re(A || D || "div", {
1089
- children: ve,
1090
- ref: T,
1105
+ }, Q)
1106
+ }, oe(T || x || "div", {
1107
+ children: Te,
1108
+ ref: D,
1091
1109
  style: {
1092
- height: W ? "100%" : Me,
1093
- pointerEvents: J ? "none" : void 0,
1094
- width: W ? Me : "100%"
1110
+ height: W ? "100%" : Ne,
1111
+ pointerEvents: K ? "none" : void 0,
1112
+ width: W ? Ne : "100%"
1095
1113
  }
1096
1114
  }));
1097
1115
  }, N._callPropsCallbacks = function() {
1098
1116
  if (typeof this.props.onItemsRendered == "function") {
1099
1117
  var a = this.props.itemCount;
1100
1118
  if (a > 0) {
1101
- var h = this._getRangeToRender(), u = h[0], f = h[1], v = h[2], T = h[3];
1102
- this._callOnItemsRendered(u, f, v, T);
1119
+ var h = this._getRangeToRender(), u = h[0], f = h[1], M = h[2], D = h[3];
1120
+ this._callOnItemsRendered(u, f, M, D);
1103
1121
  }
1104
1122
  }
1105
1123
  if (typeof this.props.onScroll == "function") {
1106
- var A = this.state, D = A.scrollDirection, O = A.scrollOffset, j = A.scrollUpdateWasRequested;
1107
- this._callOnScroll(D, O, j);
1124
+ var T = this.state, x = T.scrollDirection, O = T.scrollOffset, k = T.scrollUpdateWasRequested;
1125
+ this._callOnScroll(x, O, k);
1108
1126
  }
1109
1127
  }, N._getRangeToRender = function() {
1110
- var a = this.props, h = a.itemCount, u = a.overscanCount, f = this.state, v = f.isScrolling, T = f.scrollDirection, A = f.scrollOffset;
1128
+ var a = this.props, h = a.itemCount, u = a.overscanCount, f = this.state, M = f.isScrolling, D = f.scrollDirection, T = f.scrollOffset;
1111
1129
  if (h === 0)
1112
1130
  return [0, 0, 0, 0];
1113
- var D = p(this.props, A, this._instanceProps), O = l(this.props, D, A, this._instanceProps), j = !v || T === "backward" ? Math.max(1, u) : 1, x = !v || T === "forward" ? Math.max(1, u) : 1;
1114
- return [Math.max(0, D - j), Math.max(0, Math.min(h - 1, O + x)), D, O];
1115
- }, g;
1116
- }(Ee), t.defaultProps = {
1131
+ var x = m(this.props, T, this._instanceProps), O = l(this.props, x, T, this._instanceProps), k = !M || D === "backward" ? Math.max(1, u) : 1, A = !M || D === "forward" ? Math.max(1, u) : 1;
1132
+ return [Math.max(0, x - k), Math.max(0, Math.min(h - 1, O + A)), x, O];
1133
+ }, v;
1134
+ }($e), t.defaultProps = {
1117
1135
  direction: "ltr",
1118
1136
  itemData: void 0,
1119
1137
  layout: "vertical",
@@ -1121,9 +1139,9 @@ function ss(e) {
1121
1139
  useIsScrolling: !1
1122
1140
  }, t;
1123
1141
  }
1124
- var is = function(t, n) {
1142
+ var rs = function(t, n) {
1125
1143
  t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
1126
- }, rs = /* @__PURE__ */ ss({
1144
+ }, os = /* @__PURE__ */ is({
1127
1145
  getItemOffset: function(t, n) {
1128
1146
  var i = t.itemSize;
1129
1147
  return n * i;
@@ -1136,16 +1154,16 @@ var is = function(t, n) {
1136
1154
  var n = t.itemCount, i = t.itemSize;
1137
1155
  return i * n;
1138
1156
  },
1139
- getOffsetForIndexAndAlignment: function(t, n, i, r, d, p) {
1140
- var l = t.direction, c = t.height, I = t.itemCount, M = t.itemSize, S = t.layout, g = t.width, N = l === "horizontal" || S === "horizontal", y = N ? g : c, a = Math.max(0, I * M - y), h = Math.min(a, n * M), u = Math.max(0, n * M - y + M + p);
1141
- switch (i === "smart" && (r >= u - y && r <= h + y ? i = "auto" : i = "center"), i) {
1157
+ getOffsetForIndexAndAlignment: function(t, n, i, r, c, m) {
1158
+ var l = t.direction, d = t.height, I = t.itemCount, g = t.itemSize, S = t.layout, v = t.width, N = l === "horizontal" || S === "horizontal", z = N ? v : d, a = Math.max(0, I * g - z), h = Math.min(a, n * g), u = Math.max(0, n * g - z + g + m);
1159
+ switch (i === "smart" && (r >= u - z && r <= h + z ? i = "auto" : i = "center"), i) {
1142
1160
  case "start":
1143
1161
  return h;
1144
1162
  case "end":
1145
1163
  return u;
1146
1164
  case "center": {
1147
1165
  var f = Math.round(u + (h - u) / 2);
1148
- return f < Math.ceil(y / 2) ? 0 : f > a + Math.floor(y / 2) ? a : f;
1166
+ return f < Math.ceil(z / 2) ? 0 : f > a + Math.floor(z / 2) ? a : f;
1149
1167
  }
1150
1168
  case "auto":
1151
1169
  default:
@@ -1157,9 +1175,9 @@ var is = function(t, n) {
1157
1175
  return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
1158
1176
  },
1159
1177
  getStopIndexForStartIndex: function(t, n, i) {
1160
- var r = t.direction, d = t.height, p = t.itemCount, l = t.itemSize, c = t.layout, I = t.width, M = r === "horizontal" || c === "horizontal", S = n * l, g = M ? I : d, N = Math.ceil((g + i - S) / l);
1178
+ var r = t.direction, c = t.height, m = t.itemCount, l = t.itemSize, d = t.layout, I = t.width, g = r === "horizontal" || d === "horizontal", S = n * l, v = g ? I : c, N = Math.ceil((v + i - S) / l);
1161
1179
  return Math.max(0, Math.min(
1162
- p - 1,
1180
+ m - 1,
1163
1181
  n + N - 1
1164
1182
  // -1 is because stop index is inclusive
1165
1183
  ));
@@ -1171,34 +1189,34 @@ var is = function(t, n) {
1171
1189
  t.itemSize;
1172
1190
  }
1173
1191
  });
1174
- function os(e) {
1192
+ function as(e) {
1175
1193
  var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
1176
1194
  return !(i > n || r < t);
1177
1195
  }
1178
- function as(e) {
1179
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, d = e.stopIndex, p = [], l = null, c = null, I = r; I <= d; I++) {
1180
- var M = t(I);
1181
- M ? c !== null && (p.push(l, c), l = c = null) : (c = I, l === null && (l = I));
1196
+ function ls(e) {
1197
+ for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, c = e.stopIndex, m = [], l = null, d = null, I = r; I <= c; I++) {
1198
+ var g = t(I);
1199
+ g ? d !== null && (m.push(l, d), l = d = null) : (d = I, l === null && (l = I));
1182
1200
  }
1183
- if (c !== null) {
1184
- for (var S = Math.min(Math.max(c, l + i - 1), n - 1), g = c + 1; g <= S && !t(g); g++)
1185
- c = g;
1186
- p.push(l, c);
1201
+ if (d !== null) {
1202
+ for (var S = Math.min(Math.max(d, l + i - 1), n - 1), v = d + 1; v <= S && !t(v); v++)
1203
+ d = v;
1204
+ m.push(l, d);
1187
1205
  }
1188
- if (p.length)
1189
- for (; p[1] - p[0] + 1 < i && p[0] > 0; ) {
1190
- var N = p[0] - 1;
1206
+ if (m.length)
1207
+ for (; m[1] - m[0] + 1 < i && m[0] > 0; ) {
1208
+ var N = m[0] - 1;
1191
1209
  if (!t(N))
1192
- p[0] = N;
1210
+ m[0] = N;
1193
1211
  else
1194
1212
  break;
1195
1213
  }
1196
- return p;
1214
+ return m;
1197
1215
  }
1198
- var ls = function(e, t) {
1216
+ var cs = function(e, t) {
1199
1217
  if (!(e instanceof t))
1200
1218
  throw new TypeError("Cannot call a class as a function");
1201
- }, cs = function() {
1219
+ }, ds = function() {
1202
1220
  function e(t, n) {
1203
1221
  for (var i = 0; i < n.length; i++) {
1204
1222
  var r = n[i];
@@ -1208,7 +1226,7 @@ var ls = function(e, t) {
1208
1226
  return function(t, n, i) {
1209
1227
  return n && e(t.prototype, n), i && e(t, i), t;
1210
1228
  };
1211
- }(), ds = function(e, t) {
1229
+ }(), us = function(e, t) {
1212
1230
  if (typeof t != "function" && t !== null)
1213
1231
  throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1214
1232
  e.prototype = Object.create(t && t.prototype, {
@@ -1219,25 +1237,25 @@ var ls = function(e, t) {
1219
1237
  configurable: !0
1220
1238
  }
1221
1239
  }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1222
- }, Ce = function(e, t) {
1240
+ }, we = function(e, t) {
1223
1241
  if (!e)
1224
1242
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1225
1243
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
1226
- }, us = function(e) {
1227
- ds(t, e);
1244
+ }, ps = function(e) {
1245
+ us(t, e);
1228
1246
  function t() {
1229
- var n, i, r, d;
1230
- ls(this, t);
1231
- for (var p = arguments.length, l = Array(p), c = 0; c < p; c++)
1232
- l[c] = arguments[c];
1233
- return d = (i = (r = Ce(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(I) {
1234
- var M = I.visibleStartIndex, S = I.visibleStopIndex;
1235
- r._lastRenderedStartIndex = M, r._lastRenderedStopIndex = S, r._ensureRowsLoaded(M, S);
1247
+ var n, i, r, c;
1248
+ cs(this, t);
1249
+ for (var m = arguments.length, l = Array(m), d = 0; d < m; d++)
1250
+ l[d] = arguments[d];
1251
+ return c = (i = (r = we(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(I) {
1252
+ var g = I.visibleStartIndex, S = I.visibleStopIndex;
1253
+ r._lastRenderedStartIndex = g, r._lastRenderedStopIndex = S, r._ensureRowsLoaded(g, S);
1236
1254
  }, r._setRef = function(I) {
1237
1255
  r._listRef = I;
1238
- }, i), Ce(r, d);
1256
+ }, i), we(r, c);
1239
1257
  }
1240
- return cs(t, [{
1258
+ return ds(t, [{
1241
1259
  key: "resetloadMoreItemsCache",
1242
1260
  value: function() {
1243
1261
  var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
@@ -1259,119 +1277,119 @@ var ls = function(e, t) {
1259
1277
  }, {
1260
1278
  key: "_ensureRowsLoaded",
1261
1279
  value: function(i, r) {
1262
- var d = this.props, p = d.isItemLoaded, l = d.itemCount, c = d.minimumBatchSize, I = c === void 0 ? 10 : c, M = d.threshold, S = M === void 0 ? 15 : M, g = as({
1263
- isItemLoaded: p,
1280
+ var c = this.props, m = c.isItemLoaded, l = c.itemCount, d = c.minimumBatchSize, I = d === void 0 ? 10 : d, g = c.threshold, S = g === void 0 ? 15 : g, v = ls({
1281
+ isItemLoaded: m,
1264
1282
  itemCount: l,
1265
1283
  minimumBatchSize: I,
1266
1284
  startIndex: Math.max(0, i - S),
1267
1285
  stopIndex: Math.min(l - 1, r + S)
1268
1286
  });
1269
- (this._memoizedUnloadedRanges.length !== g.length || this._memoizedUnloadedRanges.some(function(N, y) {
1270
- return g[y] !== N;
1271
- })) && (this._memoizedUnloadedRanges = g, this._loadUnloadedRanges(g));
1287
+ (this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(N, z) {
1288
+ return v[z] !== N;
1289
+ })) && (this._memoizedUnloadedRanges = v, this._loadUnloadedRanges(v));
1272
1290
  }
1273
1291
  }, {
1274
1292
  key: "_loadUnloadedRanges",
1275
1293
  value: function(i) {
1276
- for (var r = this, d = this.props.loadMoreItems || this.props.loadMoreRows, p = function(I) {
1277
- var M = i[I], S = i[I + 1], g = d(M, S);
1278
- g != null && g.then(function() {
1279
- if (os({
1294
+ for (var r = this, c = this.props.loadMoreItems || this.props.loadMoreRows, m = function(I) {
1295
+ var g = i[I], S = i[I + 1], v = c(g, S);
1296
+ v != null && v.then(function() {
1297
+ if (as({
1280
1298
  lastRenderedStartIndex: r._lastRenderedStartIndex,
1281
1299
  lastRenderedStopIndex: r._lastRenderedStopIndex,
1282
- startIndex: M,
1300
+ startIndex: g,
1283
1301
  stopIndex: S
1284
1302
  })) {
1285
1303
  if (r._listRef == null)
1286
1304
  return;
1287
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(M, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1305
+ typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(g, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1288
1306
  }
1289
1307
  });
1290
1308
  }, l = 0; l < i.length; l += 2)
1291
- p(l);
1309
+ m(l);
1292
1310
  }
1293
1311
  }]), t;
1294
- }(Ee);
1295
- const ps = /* @__PURE__ */ o("div")({
1312
+ }($e);
1313
+ const ms = /* @__PURE__ */ o("div")({
1296
1314
  name: "Container",
1297
1315
  class: "culdu4a",
1298
1316
  propsAsIs: !1
1299
- }), ms = /* @__PURE__ */ o("div")({
1317
+ }), hs = /* @__PURE__ */ o("div")({
1300
1318
  name: "Position",
1301
1319
  class: "pwf8e69",
1302
1320
  propsAsIs: !1
1303
- }), hs = /* @__PURE__ */ o("img")({
1321
+ }), Is = /* @__PURE__ */ o("img")({
1304
1322
  name: "Avatar",
1305
1323
  class: "atf4yh4",
1306
1324
  propsAsIs: !1
1307
- }), Is = /* @__PURE__ */ o("div")({
1325
+ }), fs = /* @__PURE__ */ o("div")({
1308
1326
  name: "AvatarPlaceholder",
1309
1327
  class: "a1dg29ja",
1310
1328
  propsAsIs: !1
1311
- }), fs = /* @__PURE__ */ o("div")({
1329
+ }), gs = /* @__PURE__ */ o("div")({
1312
1330
  name: "Content",
1313
1331
  class: "c10a68rc",
1314
1332
  propsAsIs: !1
1315
- }), gs = /* @__PURE__ */ o("div")({
1333
+ }), vs = /* @__PURE__ */ o("div")({
1316
1334
  name: "NameContainer",
1317
1335
  class: "nc4kck5",
1318
1336
  propsAsIs: !1
1319
- }), vs = /* @__PURE__ */ o("span")({
1337
+ }), Ms = /* @__PURE__ */ o("span")({
1320
1338
  name: "Name",
1321
1339
  class: "njsrqgr",
1322
1340
  propsAsIs: !1
1323
- }), Ms = () => C, As = /* @__PURE__ */ o(Ms())({
1341
+ }), Ts = () => w, Ns = /* @__PURE__ */ o(Ts())({
1324
1342
  name: "CurrentUserBadge",
1325
1343
  class: "c17uc4zr",
1326
1344
  propsAsIs: !0
1327
- }), Ns = ({
1345
+ }), As = ({
1328
1346
  rank: e,
1329
1347
  avatar: t,
1330
1348
  name: n,
1331
1349
  points: i,
1332
1350
  isCurrentUser: r,
1333
- openItemDetail: d,
1334
- style: p
1335
- }) => /* @__PURE__ */ m(ps, { onClick: d, style: p, children: [
1336
- /* @__PURE__ */ s(ms, { children: e || 0 }),
1337
- /* @__PURE__ */ m(fs, { children: [
1338
- t ? /* @__PURE__ */ s(hs, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Is, { children: Qe(n || "") }),
1339
- /* @__PURE__ */ m(gs, { children: [
1340
- /* @__PURE__ */ s(vs, { children: n || "" }),
1341
- r && /* @__PURE__ */ s(As, { name: "icon-star" })
1351
+ openItemDetail: c,
1352
+ style: m
1353
+ }) => /* @__PURE__ */ p(ms, { onClick: c, style: m, children: [
1354
+ /* @__PURE__ */ s(hs, { children: e || 0 }),
1355
+ /* @__PURE__ */ p(gs, { children: [
1356
+ t ? /* @__PURE__ */ s(Is, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(fs, { children: Ue(n || "") }),
1357
+ /* @__PURE__ */ p(vs, { children: [
1358
+ /* @__PURE__ */ s(Ms, { children: n || "" }),
1359
+ r && /* @__PURE__ */ s(Ns, { name: "icon-star" })
1342
1360
  ] })
1343
1361
  ] }),
1344
- /* @__PURE__ */ s("div", { children: Ue(i) })
1345
- ] }), Ts = /* @__PURE__ */ o("div")({
1362
+ /* @__PURE__ */ s("div", { children: Pe(i) })
1363
+ ] }), ys = /* @__PURE__ */ o("div")({
1346
1364
  name: "ScrollContainer",
1347
1365
  class: "s13d8sg6",
1348
1366
  propsAsIs: !1
1349
- }), ys = ({
1367
+ }), Ds = ({
1350
1368
  items: e,
1351
1369
  currentUserId: t,
1352
1370
  openItemDetail: n,
1353
1371
  fetchMore: i,
1354
1372
  onScroll: r
1355
- }) => /* @__PURE__ */ s(Fe, { children: ({ width: d, height: p }) => /* @__PURE__ */ s(
1356
- us,
1373
+ }) => /* @__PURE__ */ s(Fe, { children: ({ width: c, height: m }) => /* @__PURE__ */ s(
1374
+ ps,
1357
1375
  {
1358
1376
  isItemLoaded: (l) => l < e.length,
1359
1377
  itemCount: e.length + 1,
1360
1378
  loadMoreItems: i,
1361
- children: ({ onItemsRendered: l, ref: c }) => /* @__PURE__ */ s(Ts, { children: /* @__PURE__ */ s(
1362
- rs,
1379
+ children: ({ onItemsRendered: l, ref: d }) => /* @__PURE__ */ s(ys, { children: /* @__PURE__ */ s(
1380
+ os,
1363
1381
  {
1364
1382
  itemSize: 56,
1365
1383
  onScroll: r,
1366
1384
  onItemsRendered: l,
1367
- ref: c,
1385
+ ref: d,
1368
1386
  itemCount: e.length,
1369
- width: d,
1370
- height: p,
1371
- children: ({ index: I, style: M }) => /* @__PURE__ */ s(
1372
- Ns,
1387
+ width: c,
1388
+ height: m,
1389
+ children: ({ index: I, style: g }) => /* @__PURE__ */ s(
1390
+ As,
1373
1391
  {
1374
- style: { ...M, maxHeight: 48 },
1392
+ style: { ...g, maxHeight: 48 },
1375
1393
  ...e[I],
1376
1394
  openItemDetail: () => n(e[I].userId),
1377
1395
  isCurrentUser: !!t && t === e[I].userId
@@ -1381,7 +1399,7 @@ const ps = /* @__PURE__ */ o("div")({
1381
1399
  }
1382
1400
  ) })
1383
1401
  }
1384
- ) }), Ds = ({ deepLink: e }) => {
1402
+ ) }), Ss = ({ deepLink: e }) => {
1385
1403
  const { data: t } = _(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
1386
1404
  return /* @__PURE__ */ s(
1387
1405
  Be,
@@ -1403,15 +1421,15 @@ const ps = /* @__PURE__ */ o("div")({
1403
1421
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1404
1422
  }
1405
1423
  );
1406
- }, Ss = ({ gamification: e, hideTabs: t }) => {
1407
- const { data: n } = _(e.leaderboardList.$store), i = de(0), r = P(
1408
- $e((d) => {
1409
- Math.abs(i.current - d.scrollOffset) < 112 || (i.current = d.scrollOffset, t(d.scrollOffset !== 0 && d.scrollDirection === "forward"));
1424
+ }, zs = ({ gamification: e, hideTabs: t }) => {
1425
+ const { data: n } = _(e.leaderboardList.$store), i = ue(0), r = q(
1426
+ Re((c) => {
1427
+ Math.abs(i.current - c.scrollOffset) < 112 || (i.current = c.scrollOffset, t(c.scrollOffset !== 0 && c.scrollDirection === "forward"));
1410
1428
  }, 200),
1411
1429
  [t]
1412
1430
  );
1413
1431
  return n != null && n.length ? /* @__PURE__ */ s(
1414
- ys,
1432
+ Ds,
1415
1433
  {
1416
1434
  fetchMore: e.leaderboardList.fetchMore,
1417
1435
  items: n,
@@ -1419,83 +1437,83 @@ const ps = /* @__PURE__ */ o("div")({
1419
1437
  openItemDetail: e.openUser,
1420
1438
  currentUserId: e.currentUserId.get()
1421
1439
  }
1422
- ) : /* @__PURE__ */ s(Ds, { deepLink: e.deepLink });
1423
- }, zs = /* @__PURE__ */ o("div")({
1440
+ ) : /* @__PURE__ */ s(Ss, { deepLink: e.deepLink });
1441
+ }, xs = /* @__PURE__ */ o("div")({
1424
1442
  name: "QuestionItem",
1425
1443
  class: "q1w97g3p",
1426
1444
  propsAsIs: !1
1427
- }), xs = /* @__PURE__ */ o("div")({
1445
+ }), Os = /* @__PURE__ */ o("div")({
1428
1446
  name: "QuestionCaption",
1429
1447
  class: "q2sl39u",
1430
1448
  propsAsIs: !1
1431
- }), Os = /* @__PURE__ */ o("div")({
1449
+ }), bs = /* @__PURE__ */ o("div")({
1432
1450
  name: "QuestionBody",
1433
1451
  class: "qd5h0uc",
1434
1452
  propsAsIs: !1
1435
- }), bs = /* @__PURE__ */ o("div")({
1453
+ }), Cs = /* @__PURE__ */ o("div")({
1436
1454
  name: "QuestionAction",
1437
1455
  class: "q105uluy",
1438
1456
  propsAsIs: !1
1439
- }), Cs = () => C, te = /* @__PURE__ */ o(Cs())({
1457
+ }), js = () => w, ne = /* @__PURE__ */ o(js())({
1440
1458
  name: "QuestionActionIcon",
1441
1459
  class: "q1fa0b9h",
1442
1460
  propsAsIs: !0
1443
- }), js = () => C, ks = /* @__PURE__ */ o(js())({
1461
+ }), ws = () => w, ks = /* @__PURE__ */ o(ws())({
1444
1462
  name: "QuestionTypeIcon",
1445
1463
  class: "qxlt78s",
1446
1464
  propsAsIs: !0
1447
- }), ws = /* @__PURE__ */ o("div")({
1465
+ }), Es = /* @__PURE__ */ o("div")({
1448
1466
  name: "QuestionTypeLabel",
1449
1467
  class: "qmg0vkx",
1450
1468
  propsAsIs: !1
1451
- }), Es = /* @__PURE__ */ o("div")({
1469
+ }), Ls = /* @__PURE__ */ o("div")({
1452
1470
  name: "QuestionContent",
1453
1471
  class: "q1uz5j1g",
1454
1472
  propsAsIs: !1
1455
- }), Ls = /* @__PURE__ */ o("button")({
1473
+ }), $s = /* @__PURE__ */ o("button")({
1456
1474
  name: "PlayButton",
1457
1475
  class: "p1pba9p1",
1458
1476
  propsAsIs: !1
1459
- }), $s = {
1460
- [K.LOST]: /* @__PURE__ */ s(te, { name: "incorrectVoted" }),
1461
- [K.WON]: /* @__PURE__ */ s(te, { name: "icon-check" }),
1462
- [K.UNSET]: /* @__PURE__ */ s(te, { name: "icon-arrow" }),
1463
- [K.DNP]: /* @__PURE__ */ s(te, { name: "icon-arrow" })
1464
- }, Rs = ({
1477
+ }), Rs = {
1478
+ [X.LOST]: /* @__PURE__ */ s(ne, { name: "incorrectVoted" }),
1479
+ [X.WON]: /* @__PURE__ */ s(ne, { name: "icon-check" }),
1480
+ [X.UNSET]: /* @__PURE__ */ s(ne, { name: "icon-arrow" }),
1481
+ [X.DNP]: /* @__PURE__ */ s(ne, { name: "icon-arrow" })
1482
+ }, Qs = ({
1465
1483
  questionId: e,
1466
1484
  questionType: t,
1467
1485
  questionStatus: n,
1468
1486
  subject: i,
1469
1487
  openForVoting: r,
1470
- openQuestion: d,
1471
- status: p
1488
+ openQuestion: c,
1489
+ status: m
1472
1490
  }) => {
1473
- const l = ke[t], c = $s[p];
1474
- return l ? /* @__PURE__ */ m(zs, { onClick: () => d == null ? void 0 : d(e), children: [
1475
- /* @__PURE__ */ m(Es, { children: [
1476
- /* @__PURE__ */ m(xs, { children: [
1491
+ const l = Ee[t], d = Rs[m];
1492
+ return l ? /* @__PURE__ */ p(xs, { onClick: () => c == null ? void 0 : c(e), children: [
1493
+ /* @__PURE__ */ p(Ls, { children: [
1494
+ /* @__PURE__ */ p(Os, { children: [
1477
1495
  /* @__PURE__ */ s(
1478
1496
  ks,
1479
1497
  {
1480
- "data-type-trivia": t === z.TRIVIA,
1481
- "data-type-poll": t === z.POLL,
1498
+ "data-type-trivia": t === y.TRIVIA,
1499
+ "data-type-poll": t === y.POLL,
1482
1500
  name: l.iconName
1483
1501
  }
1484
1502
  ),
1485
- /* @__PURE__ */ m(ws, { children: [
1503
+ /* @__PURE__ */ p(Es, { children: [
1486
1504
  l.label,
1487
- t === z.TRIVIA && n === U.RESOLVED && " • Expired"
1505
+ t === y.TRIVIA && n === R.RESOLVED && " • Expired"
1488
1506
  ] })
1489
1507
  ] }),
1490
- /* @__PURE__ */ s(Os, { children: i || "" })
1508
+ /* @__PURE__ */ s(bs, { children: i || "" })
1491
1509
  ] }),
1492
- /* @__PURE__ */ s(bs, { children: r ? /* @__PURE__ */ s(Ls, { children: "Play" }) : c })
1510
+ /* @__PURE__ */ s(Cs, { children: r ? /* @__PURE__ */ s($s, { children: "Play" }) : d })
1493
1511
  ] }) : null;
1494
- }, Qs = /* @__PURE__ */ o("div")({
1512
+ }, Us = /* @__PURE__ */ o("div")({
1495
1513
  name: "Container",
1496
1514
  class: "cll3md7",
1497
1515
  propsAsIs: !1
1498
- }), Us = /* @__PURE__ */ o("button")({
1516
+ }), Ps = /* @__PURE__ */ o("button")({
1499
1517
  name: "ActionBtn",
1500
1518
  class: "a10g1iik",
1501
1519
  propsAsIs: !1
@@ -1503,200 +1521,200 @@ const ps = /* @__PURE__ */ o("div")({
1503
1521
  openInsight: e,
1504
1522
  questionId: t,
1505
1523
  ...n
1506
- }) => /* @__PURE__ */ m(Qs, { children: [
1507
- /* @__PURE__ */ s(_e, { questionId: t, ...n, isPickHistory: !0 }),
1508
- e && /* @__PURE__ */ s(Us, { onClick: () => e(t), children: "View Insight" })
1509
- ] }), Ps = /* @__PURE__ */ o("div")({
1524
+ }) => /* @__PURE__ */ p(Us, { children: [
1525
+ /* @__PURE__ */ s(Ye, { questionId: t, ...n, isPickHistory: !0 }),
1526
+ e && /* @__PURE__ */ s(Ps, { onClick: () => e(t), children: "View Insight" })
1527
+ ] }), _s = /* @__PURE__ */ o("div")({
1510
1528
  name: "Container",
1511
1529
  class: "cl56x6b",
1512
1530
  propsAsIs: !1
1513
- }), _s = () => He, Ys = /* @__PURE__ */ o(_s())({
1531
+ }), Ys = () => He, Vs = /* @__PURE__ */ o(Ys())({
1514
1532
  name: "ActionButton",
1515
1533
  class: "a11pzf92",
1516
1534
  propsAsIs: !0
1517
- }), Vs = /* @__PURE__ */ o("div")({
1535
+ }), Ws = /* @__PURE__ */ o("div")({
1518
1536
  name: "DateTime",
1519
1537
  class: "d1hbaleq",
1520
1538
  propsAsIs: !1
1521
- }), Ws = /* @__PURE__ */ o("blockquote")({
1539
+ }), Fs = /* @__PURE__ */ o("blockquote")({
1522
1540
  name: "Quote",
1523
1541
  class: "qvvgqjm",
1524
1542
  propsAsIs: !1
1525
- }), Fs = ({
1543
+ }), Bs = ({
1526
1544
  openTweet: e,
1527
1545
  created: t,
1528
1546
  ...n
1529
1547
  }) => {
1530
- const i = w(() => {
1548
+ const i = E(() => {
1531
1549
  if (t) {
1532
1550
  const r = new Date(t);
1533
- if (ge(r))
1551
+ if (Me(r))
1534
1552
  return {
1535
- date: Ie(r),
1536
- time: fe(r)
1553
+ date: ge(r),
1554
+ time: ve(r)
1537
1555
  };
1538
1556
  }
1539
1557
  return null;
1540
1558
  }, [t]);
1541
- return /* @__PURE__ */ m(Ps, { children: [
1542
- i && /* @__PURE__ */ m(Vs, { children: [
1559
+ return /* @__PURE__ */ p(_s, { children: [
1560
+ i && /* @__PURE__ */ p(Ws, { children: [
1543
1561
  i.date,
1544
1562
  " · ",
1545
1563
  i.time
1546
1564
  ] }),
1547
- n.title && /* @__PURE__ */ s(Ws, { children: n.title }),
1548
- /* @__PURE__ */ s(we, { ...n }),
1549
- e && /* @__PURE__ */ s(Ys, { onClick: () => e(n.tweetId), children: "View Insight" })
1565
+ n.title && /* @__PURE__ */ s(Fs, { children: n.title }),
1566
+ /* @__PURE__ */ s(Le, { ...n }),
1567
+ e && /* @__PURE__ */ s(Vs, { onClick: () => e(n.tweetId), children: "View Insight" })
1550
1568
  ] });
1551
- }, Bs = /* @__PURE__ */ o("div")({
1569
+ }, Hs = /* @__PURE__ */ o("div")({
1552
1570
  name: "QuestionsContainer",
1553
1571
  class: "qvghv3l",
1554
1572
  propsAsIs: !1
1555
- }), Hs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Bs, { children: e == null ? void 0 : e.map((n) => {
1556
- var i, r, d;
1573
+ }), Gs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Hs, { children: e == null ? void 0 : e.map((n) => {
1574
+ var i, r, c;
1557
1575
  if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1558
- const p = n.attributes.attributes.value;
1559
- return /* @__PURE__ */ s(Rs, { openQuestion: t, ...p }, p.questionId);
1576
+ const m = n.attributes.attributes.value;
1577
+ return /* @__PURE__ */ s(Qs, { openQuestion: t, ...m }, m.questionId);
1560
1578
  }
1561
1579
  if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1562
- const p = n.attributes.attributes.value, l = n.attributes.created;
1563
- return /* @__PURE__ */ s(qs, { openInsight: t, ...p, created: l }, p.questionId);
1580
+ const m = n.attributes.attributes.value, l = n.attributes.created;
1581
+ return /* @__PURE__ */ s(qs, { openInsight: t, ...m, created: l }, m.questionId);
1564
1582
  }
1565
- if (n.type === "tweet" && ((d = n.attributes) == null ? void 0 : d.attributes.case) === "tweet") {
1566
- const p = n.attributes.attributes.value, l = n.attributes.id, c = n.attributes.created;
1567
- return /* @__PURE__ */ s(Fs, { openTweet: t, ...p, tweetId: l, created: c }, l);
1583
+ if (n.type === "tweet" && ((c = n.attributes) == null ? void 0 : c.attributes.case) === "tweet") {
1584
+ const m = n.attributes.attributes.value, l = n.attributes.id, d = n.attributes.created;
1585
+ return /* @__PURE__ */ s(Bs, { openTweet: t, ...m, tweetId: l, created: d }, l);
1568
1586
  }
1569
1587
  return null;
1570
- }) }), Gs = ({ store: e, openQuestion: t }) => {
1588
+ }) }), Zs = ({ store: e, openQuestion: t }) => {
1571
1589
  const n = _(e);
1572
- return n != null && n.data ? /* @__PURE__ */ s(Hs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1573
- }, Zs = ({ userSummary: e }) => {
1590
+ return n != null && n.data ? /* @__PURE__ */ s(Gs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1591
+ }, Js = ({ userSummary: e }) => {
1574
1592
  var t;
1575
- const [n, i] = E(void 0);
1576
- return he(() => {
1577
- const r = e.subscribe((d) => {
1578
- d != null && d.data && i(d.data);
1593
+ const [n, i] = $(void 0);
1594
+ return fe(() => {
1595
+ const r = e.subscribe((c) => {
1596
+ c != null && c.data && i(c.data);
1579
1597
  });
1580
1598
  return () => {
1581
1599
  r();
1582
1600
  };
1583
1601
  }, [e]), n != null && n.summary ? /* @__PURE__ */ s(qe, { ...n.summary, successRate: (t = n.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1584
- }, Js = ({
1602
+ }, Ks = ({
1585
1603
  gamification: e
1586
1604
  }) => {
1587
- const [t, n] = E(!1), [i, r] = E(G.HOME), d = de(null), p = de(0), [l, c] = Je(), I = (g) => {
1588
- c(() => r(g));
1589
- }, M = (g) => {
1590
- c(() => n(g));
1591
- }, S = P($e(() => {
1592
- const g = d.current;
1593
- if (!g)
1605
+ const [t, n] = $(!1), [i, r] = $(G.HOME), c = ue(null), m = ue(0), [l, d] = Je(), I = (v) => {
1606
+ d(() => r(v));
1607
+ }, g = (v) => {
1608
+ d(() => n(v));
1609
+ }, S = q(Re(() => {
1610
+ const v = c.current;
1611
+ if (!v)
1594
1612
  return;
1595
1613
  const {
1596
1614
  scrollTop: N
1597
- } = g;
1615
+ } = v;
1598
1616
  if (N === 0) {
1599
- p.current = 0, M(!1);
1617
+ m.current = 0, g(!1);
1600
1618
  return;
1601
1619
  }
1602
- if (Math.abs(p.current - N) < 112)
1620
+ if (Math.abs(m.current - N) < 112)
1603
1621
  return;
1604
- const y = p.current < N ? "forward" : "backward";
1605
- p.current = N, M(y === "forward");
1622
+ const z = m.current < N ? "forward" : "backward";
1623
+ m.current = N, g(z === "forward");
1606
1624
  }, 200), []);
1607
- return he(() => {
1608
- const g = d.current;
1609
- return g ? (i === G.HOME && g.addEventListener("scroll", S), () => {
1610
- g.removeEventListener("scroll", S);
1625
+ return fe(() => {
1626
+ const v = c.current;
1627
+ return v ? (i === G.HOME && v.addEventListener("scroll", S), () => {
1628
+ v.removeEventListener("scroll", S);
1611
1629
  }) : () => {
1612
1630
  };
1613
- }, [i, S]), /* @__PURE__ */ m("div", {
1631
+ }, [i, S]), /* @__PURE__ */ p("div", {
1614
1632
  style: {
1615
1633
  height: "100%",
1616
1634
  display: "flex",
1617
1635
  flexDirection: "column",
1618
1636
  overflow: "hidden"
1619
1637
  },
1620
- children: [l, /* @__PURE__ */ s(ce, {
1638
+ children: [l, /* @__PURE__ */ s(de, {
1621
1639
  style: {
1622
1640
  paddingBottom: "4px",
1623
1641
  transition: "margin-top 0.2s ease-in-out",
1624
1642
  marginTop: t ? "-56px" : "0px"
1625
1643
  },
1626
- children: /* @__PURE__ */ s(Gn, {
1644
+ children: /* @__PURE__ */ s(Zn, {
1627
1645
  activePage: i,
1628
1646
  toggleActivePage: I
1629
1647
  })
1630
- }), i === G.HOME && /* @__PURE__ */ m(me, {
1631
- ref: d,
1632
- children: [/* @__PURE__ */ s(ce, {
1648
+ }), i === G.HOME && /* @__PURE__ */ p(Ie, {
1649
+ ref: c,
1650
+ children: [/* @__PURE__ */ s(de, {
1633
1651
  style: {
1634
1652
  paddingTop: "12px"
1635
1653
  },
1636
- children: /* @__PURE__ */ s(Zs, {
1654
+ children: /* @__PURE__ */ s(Js, {
1637
1655
  userSummary: e.userSummary
1638
1656
  })
1639
1657
  }), /* @__PURE__ */ s(Ge, {
1640
- children: /* @__PURE__ */ s(Gs, {
1658
+ children: /* @__PURE__ */ s(Zs, {
1641
1659
  openQuestion: e.openQuestion,
1642
1660
  store: e.feedList.getStore()
1643
1661
  })
1644
1662
  })]
1645
1663
  }), i === G.LEADERBOARD && /* @__PURE__ */ s("div", {
1646
1664
  className: "c1bp9dj2",
1647
- children: /* @__PURE__ */ s(Ss, {
1665
+ children: /* @__PURE__ */ s(zs, {
1648
1666
  gamification: e,
1649
- hideTabs: M
1667
+ hideTabs: g
1650
1668
  })
1651
1669
  })]
1652
1670
  });
1653
- }, Ks = () => Ze, je = /* @__PURE__ */ o(Ks())({
1671
+ }, Xs = () => Ze, ke = /* @__PURE__ */ o(Xs())({
1654
1672
  name: "OpenedContainer",
1655
1673
  class: "oar61gl",
1656
1674
  propsAsIs: !0
1657
- }), Xs = /* @__PURE__ */ o("div")({
1675
+ }), ei = /* @__PURE__ */ o("div")({
1658
1676
  name: "UserContainer",
1659
1677
  class: "u14zaal4",
1660
1678
  propsAsIs: !1
1661
- }), ei = ({
1679
+ }), ti = ({
1662
1680
  correct: e,
1663
1681
  incorrect: t
1664
1682
  }) => {
1665
1683
  const n = e + t;
1666
1684
  return n === 0 ? 0 : Math.round(e / n * 100);
1667
- }, fi = ({
1685
+ }, gi = ({
1668
1686
  gamification: e,
1669
1687
  className: t
1670
1688
  }) => {
1671
1689
  const n = _(e.openedQuestion.$store), i = _(e.openedUser);
1672
- return /* @__PURE__ */ m(k, {
1673
- children: [n && /* @__PURE__ */ s(je, {
1690
+ return /* @__PURE__ */ p(L, {
1691
+ children: [n && /* @__PURE__ */ s(ke, {
1674
1692
  className: t,
1675
- children: /* @__PURE__ */ s(Vn, {
1693
+ children: /* @__PURE__ */ s(Wn, {
1676
1694
  gamification: e
1677
1695
  })
1678
- }), i && /* @__PURE__ */ s(je, {
1696
+ }), i && /* @__PURE__ */ s(ke, {
1679
1697
  className: t,
1680
- children: /* @__PURE__ */ m(Xs, {
1681
- children: [/* @__PURE__ */ s(Re, {
1698
+ children: /* @__PURE__ */ p(ei, {
1699
+ children: [/* @__PURE__ */ s(Qe, {
1682
1700
  label: "Friend's Rank",
1683
1701
  close: e.closeUser
1684
- }), /* @__PURE__ */ s(ce, {
1702
+ }), /* @__PURE__ */ s(de, {
1685
1703
  children: /* @__PURE__ */ s(qe, {
1686
1704
  ...i,
1687
- successRate: ei(i)
1705
+ successRate: ti(i)
1688
1706
  })
1689
1707
  })]
1690
1708
  })
1691
- }), /* @__PURE__ */ s(me, {
1709
+ }), /* @__PURE__ */ s(Ie, {
1692
1710
  className: t,
1693
1711
  "data-nav": "true",
1694
- children: /* @__PURE__ */ s(Js, {
1712
+ children: /* @__PURE__ */ s(Ks, {
1695
1713
  gamification: e
1696
1714
  })
1697
1715
  })]
1698
1716
  });
1699
1717
  };
1700
1718
  export {
1701
- fi as default
1719
+ gi as default
1702
1720
  };