@streamlayer/react 0.32.3 → 0.32.4

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,13 +1,13 @@
1
- import { jsxs as m, jsx as s, Fragment as w } from "react/jsx-runtime";
2
- import { s as r, n as O } from "./index4.js";
3
- import { useStore as k } from "@nanostores/react";
1
+ import { jsxs as m, jsx as s, Fragment as $ } from "react/jsx-runtime";
2
+ import { s as r, n as j } from "./index4.js";
3
+ import { useStore as C } from "@nanostores/react";
4
4
  import { o as Ne, r as te, w as Re, A as Qe, O as Ue, a as K, n as _e, d as Pe } from "./masters2.js";
5
- import { QuestionType as z, QuestionStatus as L, QuestionImages as R, PickHistoryStatus as _ } from "@streamlayer/sdk-web-types";
6
- import { useState as V, useCallback as F, useMemo as Y, createElement as H, PureComponent as ye } from "react";
5
+ import { QuestionType as x, QuestionStatus as w, QuestionImages as Q, PickHistoryStatus as P } from "@streamlayer/sdk-web-types";
6
+ import { useState as V, useCallback as F, useMemo as L, createElement as H, PureComponent as ye } from "react";
7
7
  import { d as Ae } from "./index3.js";
8
8
  import "react-countup";
9
9
  import { CountdownCircleTimer as qe } from "react-countdown-circle-timer";
10
- import { E } from "./index2.js";
10
+ import { E as b } from "./index2.js";
11
11
  import "@streamlayer/sdk-web-interfaces";
12
12
  import "@streamlayer/sdk-web-notifications";
13
13
  import "./useStreamLayerApp.js";
@@ -20,7 +20,7 @@ const Ye = /* @__PURE__ */ r("div")({
20
20
  name: "QuestionTypeWrap",
21
21
  class: "qyktpt0",
22
22
  propsAsIs: !1
23
- }), Ve = () => O, Fe = /* @__PURE__ */ r(Ve())({
23
+ }), Ve = () => j, Fe = /* @__PURE__ */ r(Ve())({
24
24
  name: "QuestionTypeIcon",
25
25
  class: "q951jdx",
26
26
  propsAsIs: !0
@@ -32,7 +32,7 @@ const Ye = /* @__PURE__ */ r("div")({
32
32
  name: "CloseButton",
33
33
  class: "c1ao1jtv",
34
34
  propsAsIs: !1
35
- }), Ze = () => O, Ge = /* @__PURE__ */ r(Ze())({
35
+ }), Ge = () => j, Ze = /* @__PURE__ */ r(Ge())({
36
36
  name: "CloseIcon",
37
37
  class: "cvsl7l3",
38
38
  propsAsIs: !0
@@ -43,14 +43,14 @@ const Ye = /* @__PURE__ */ r("div")({
43
43
  (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
44
44
  Fe,
45
45
  {
46
- "data-type-trivia": e === z.TRIVIA,
47
- "data-type-poll": e === z.POLL,
46
+ "data-type-trivia": e === x.TRIVIA,
47
+ "data-type-poll": e === x.POLL,
48
48
  name: i.iconName
49
49
  }
50
50
  ),
51
51
  (i == null ? void 0 : i.label) && /* @__PURE__ */ s(Be, { children: i.label })
52
52
  ] }),
53
- /* @__PURE__ */ s(He, { onClick: t, children: /* @__PURE__ */ s(Ge, { name: "icon-cross" }) })
53
+ /* @__PURE__ */ s(He, { onClick: t, children: /* @__PURE__ */ s(Ze, { name: "icon-cross" }) })
54
54
  ] });
55
55
  }, De = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Se = (e) => e ? e.toLocaleString("en-US") : "0", Je = (e) => e.toLocaleDateString("en-US", {
56
56
  weekday: "short",
@@ -86,7 +86,7 @@ const Ye = /* @__PURE__ */ r("div")({
86
86
  name: "Title",
87
87
  class: "t8s05oq",
88
88
  propsAsIs: !1
89
- }), P = ({ indicator: e, title: t }) => /* @__PURE__ */ m(st, { children: [
89
+ }), q = ({ indicator: e, title: t }) => /* @__PURE__ */ m(st, { children: [
90
90
  /* @__PURE__ */ s(it, { children: e }),
91
91
  /* @__PURE__ */ s(ot, { children: t })
92
92
  ] }), rt = /* @__PURE__ */ r("div")({
@@ -199,17 +199,17 @@ const Ye = /* @__PURE__ */ r("div")({
199
199
  /* @__PURE__ */ s(re, { indicator: o || 0, title: "Global rank" })
200
200
  ] }),
201
201
  /* @__PURE__ */ m(Nt, { children: [
202
- /* @__PURE__ */ s(P, { indicator: u || 0, title: "Win streak" }),
203
- /* @__PURE__ */ s(P, { indicator: p || 0, title: "Correct" }),
204
- /* @__PURE__ */ s(P, { indicator: I || 0, title: "Incorrect" }),
205
- /* @__PURE__ */ s(P, { indicator: `${h || 0}%`, title: "Succ. rate" })
202
+ /* @__PURE__ */ s(q, { indicator: u || 0, title: "Win streak" }),
203
+ /* @__PURE__ */ s(q, { indicator: p || 0, title: "Correct" }),
204
+ /* @__PURE__ */ s(q, { indicator: I || 0, title: "Incorrect" }),
205
+ /* @__PURE__ */ s(q, { indicator: `${h || 0}%`, title: "Succ. rate" })
206
206
  ] })
207
207
  ] })
208
208
  ] }), Dt = /* @__PURE__ */ r("div")({
209
209
  name: "SponsorLogoWrap",
210
210
  class: "s8p5v5z",
211
211
  propsAsIs: !1
212
- }), St = () => O, zt = /* @__PURE__ */ r(St())({
212
+ }), St = () => j, zt = /* @__PURE__ */ r(St())({
213
213
  name: "SponsorLogo",
214
214
  class: "s755yti",
215
215
  propsAsIs: !0
@@ -225,19 +225,19 @@ const Ye = /* @__PURE__ */ r("div")({
225
225
  name: "Title",
226
226
  class: "ty221rx",
227
227
  propsAsIs: !1
228
- }), Ct = /* @__PURE__ */ r("div")({
228
+ }), kt = /* @__PURE__ */ r("div")({
229
229
  name: "Description",
230
230
  class: "dlaj9xp",
231
231
  propsAsIs: !1
232
- }), kt = ({ title: e, description: t }) => /* @__PURE__ */ m(Ot, { children: [
233
- /* @__PURE__ */ s(O, { name: "icon-check-circle" }),
232
+ }), Ct = ({ title: e, description: t }) => /* @__PURE__ */ m(Ot, { children: [
233
+ /* @__PURE__ */ s(j, { name: "icon-check-circle" }),
234
234
  /* @__PURE__ */ s(jt, { children: e }),
235
- /* @__PURE__ */ s(Ct, { children: t })
236
- ] }), bt = /* @__PURE__ */ r("div")({
235
+ /* @__PURE__ */ s(kt, { children: t })
236
+ ] }), Lt = /* @__PURE__ */ r("div")({
237
237
  name: "Container",
238
238
  class: "c16sbdnm",
239
239
  propsAsIs: !1
240
- }), wt = () => O, Lt = /* @__PURE__ */ r(wt())({
240
+ }), bt = () => j, wt = /* @__PURE__ */ r(bt())({
241
241
  name: "IconPrediction",
242
242
  class: "ibhorgl",
243
243
  propsAsIs: !0
@@ -253,7 +253,7 @@ const Ye = /* @__PURE__ */ r("div")({
253
253
  name: "FeedbackTitle",
254
254
  class: "f1913njx",
255
255
  propsAsIs: !1
256
- }), Z = /* @__PURE__ */ r("span")({
256
+ }), G = /* @__PURE__ */ r("span")({
257
257
  name: "FeedbackDescription",
258
258
  class: "fzfk69z",
259
259
  propsAsIs: !1
@@ -269,27 +269,27 @@ const Ye = /* @__PURE__ */ r("div")({
269
269
  hasCorrectAnswer: o,
270
270
  questionStatus: u
271
271
  }) => {
272
- const p = n && (i === z.TRIVIA || i === z.PREDICTION);
273
- if (!p && u !== L.RESOLVED || u === L.RESOLVED && i === z.PREDICTION && !n)
272
+ const p = n && (i === x.TRIVIA || i === x.PREDICTION);
273
+ if (!p && u !== w.RESOLVED || u === w.RESOLVED && i === x.PREDICTION && !n)
274
274
  return null;
275
- const I = i === z.PREDICTION && !o, c = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
276
- return /* @__PURE__ */ m(bt, { "data-isPrediction": I, children: [
277
- u === L.RESOLVED && i === z.TRIVIA && !n && /* @__PURE__ */ m(w, { children: [
278
- /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(O, { name: "questionExpired" }) }),
275
+ const I = i === x.PREDICTION && !o, c = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
276
+ return /* @__PURE__ */ m(Lt, { "data-isPrediction": I, children: [
277
+ u === w.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ m($, { children: [
278
+ /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
279
279
  /* @__PURE__ */ m("div", { children: [
280
- /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
280
+ /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(G, { children: "Question Expired" }) }),
281
281
  /* @__PURE__ */ s($t, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
282
282
  ] })
283
283
  ] }),
284
- p && I && /* @__PURE__ */ m(w, { children: [
285
- /* @__PURE__ */ s(Lt, { name: "icon-prediction" }),
286
- /* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
284
+ p && I && /* @__PURE__ */ m($, { children: [
285
+ /* @__PURE__ */ s(wt, { name: "icon-prediction" }),
286
+ /* @__PURE__ */ s(G, { children: "Stay tuned to see if your prediction was correct." })
287
287
  ] }),
288
- p && o && /* @__PURE__ */ m(w, { children: [
289
- /* @__PURE__ */ s(ae, { "data-feedbackType": c, children: /* @__PURE__ */ s(O, { name: c }) }),
288
+ p && o && /* @__PURE__ */ m($, { children: [
289
+ /* @__PURE__ */ s(ae, { "data-feedbackType": c, children: /* @__PURE__ */ s(j, { name: c }) }),
290
290
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ m(le, { children: [
291
291
  /* @__PURE__ */ s(Et, { "data-feedbackType": c, children: h == null ? void 0 : h.title }),
292
- /* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
292
+ /* @__PURE__ */ s(G, { children: h == null ? void 0 : h.description })
293
293
  ] }) })
294
294
  ] })
295
295
  ] });
@@ -337,7 +337,7 @@ const Ye = /* @__PURE__ */ r("div")({
337
337
  name: "IconDefault",
338
338
  class: "i1grrgwj",
339
339
  propsAsIs: !0
340
- }), Zt = () => xe, Gt = /* @__PURE__ */ r(Zt())({
340
+ }), Gt = () => xe, Zt = /* @__PURE__ */ r(Gt())({
341
341
  name: "IconCircle",
342
342
  class: "ibemyq8",
343
343
  propsAsIs: !0
@@ -353,33 +353,33 @@ const Ye = /* @__PURE__ */ r("div")({
353
353
  name: "Percentage",
354
354
  class: "p17ajcu2",
355
355
  propsAsIs: !1
356
- }), en = () => O, tn = /* @__PURE__ */ r(en())({
356
+ }), en = () => j, tn = /* @__PURE__ */ r(en())({
357
357
  name: "CheckIcon",
358
358
  class: "cu9kmlb",
359
359
  propsAsIs: !0
360
360
  }), ce = {
361
- [R.CENTERED]: (e) => /* @__PURE__ */ s(Ht, { alt: "option-icon", src: e }),
362
- [R.TRANSPARENT]: (e) => /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ s(Ft, { style: { backgroundImage: `url(${e})` } }) }),
363
- [R.ROUNDED]: (e) => /* @__PURE__ */ s(Gt, { alt: "option-icon", src: e }),
364
- [R.NONE]: () => null,
365
- [R.UNSET]: () => null
361
+ [Q.CENTERED]: (e) => /* @__PURE__ */ s(Ht, { alt: "option-icon", src: e }),
362
+ [Q.TRANSPARENT]: (e) => /* @__PURE__ */ s(Vt, { children: /* @__PURE__ */ s(Ft, { style: { backgroundImage: `url(${e})` } }) }),
363
+ [Q.ROUNDED]: (e) => /* @__PURE__ */ s(Zt, { alt: "option-icon", src: e }),
364
+ [Q.NONE]: () => null,
365
+ [Q.UNSET]: () => null
366
366
  }, nn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: o }) => {
367
- if (e === z.POLL && i)
367
+ if (e === x.POLL && i)
368
368
  return "correct";
369
- if (e === z.PREDICTION) {
369
+ if (e === x.PREDICTION) {
370
370
  if (t && o)
371
371
  return i ? n ? "correct" : "incorrect" : "unset";
372
372
  if (i)
373
373
  return "correct";
374
374
  }
375
- return e === z.TRIVIA && o && i ? n ? "correct" : "incorrect" : "unset";
375
+ return e === x.TRIVIA && o && i ? n ? "correct" : "incorrect" : "unset";
376
376
  }, sn = ({
377
377
  questionType: e,
378
378
  questionVoted: t,
379
379
  correct: n,
380
380
  hasCorrectAnswer: i,
381
381
  questionStatus: o
382
- }) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || o === L.RESOLVED && n : !1, on = (e) => {
382
+ }) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || o === w.RESOLVED && n : !1, on = (e) => {
383
383
  var t;
384
384
  const {
385
385
  // option props
@@ -393,28 +393,28 @@ const Ye = /* @__PURE__ */ r("div")({
393
393
  questionVoted: c,
394
394
  // ToDo: Figure out why imageMode is not in the response, and delete default value
395
395
  imageMode: h,
396
- answerTimeExpired: y,
397
- questionStatus: D,
396
+ answerTimeExpired: A,
397
+ questionStatus: S,
398
398
  isLoading: N,
399
- questionType: A,
400
- correct: T,
399
+ questionType: T,
400
+ correct: D,
401
401
  hasCorrectAnswer: a
402
- } = e, l = nn(e), d = sn({ questionType: A, questionVoted: c, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = D === L.RESOLVED && A === z.PREDICTION, M = c || g;
402
+ } = e, l = nn(e), d = sn({ questionType: T, questionVoted: c, correct: D, hasCorrectAnswer: a, questionStatus: S }), g = S === w.RESOLVED && T === x.PREDICTION, f = c || g;
403
403
  return /* @__PURE__ */ m(
404
404
  qt,
405
405
  {
406
406
  value: n,
407
407
  "data-selected": I,
408
408
  "data-answerState": l,
409
- disabled: c || N || y || g,
409
+ disabled: c || N || A || g,
410
410
  "data-isNotChecked": c && !I && l !== "incorrect",
411
411
  onClick: p,
412
412
  children: [
413
- /* @__PURE__ */ s(Yt, { "data-answerState": l, style: { width: `${M ? u : 0}%` } }),
413
+ /* @__PURE__ */ s(Yt, { "data-answerState": l, style: { width: `${f ? u : 0}%` } }),
414
414
  /* @__PURE__ */ m(Wt, { children: [
415
415
  i && h && ((t = ce[h]) == null ? void 0 : t.call(ce, i)),
416
416
  /* @__PURE__ */ s(Jt, { children: o }),
417
- M && /* @__PURE__ */ m(Kt, { children: [
417
+ f && /* @__PURE__ */ m(Kt, { children: [
418
418
  d && /* @__PURE__ */ s(tn, { name: "selected" }),
419
419
  /* @__PURE__ */ s(Xt, { children: /* @__PURE__ */ s(Ae, { value: u, suffix: "%" }) })
420
420
  ] })
@@ -422,11 +422,11 @@ const Ye = /* @__PURE__ */ r("div")({
422
422
  ]
423
423
  }
424
424
  );
425
- }, rn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], an = [10, 10, 0], ln = /* @__PURE__ */ r("div")({
425
+ }, rn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRAY3], an = [10, 10, 1, 0], ln = /* @__PURE__ */ r("div")({
426
426
  name: "RemainingTime",
427
427
  class: "r165427",
428
428
  propsAsIs: !1
429
- }), cn = E.SECONDARY_GREEN6, de = E.SECONDARY_RED3, dn = E.NEUTRALS_GRAY3, un = ({
429
+ }), cn = b.SECONDARY_GREEN6, de = b.SECONDARY_RED3, dn = b.NEUTRALS_GRAY3, un = ({
430
430
  isPlaying: e = !0,
431
431
  duration: t = 30,
432
432
  onTimerExpired: n
@@ -465,7 +465,7 @@ const Ye = /* @__PURE__ */ r("div")({
465
465
  name: "Title",
466
466
  class: "t1l3ucjp",
467
467
  propsAsIs: !1
468
- }), hn = () => O, gn = /* @__PURE__ */ r(hn())({
468
+ }), hn = () => j, gn = /* @__PURE__ */ r(hn())({
469
469
  name: "WinIcon",
470
470
  class: "wx7j799",
471
471
  propsAsIs: !0
@@ -492,7 +492,7 @@ const Ye = /* @__PURE__ */ r("div")({
492
492
  }) => /* @__PURE__ */ m(pn, { children: [
493
493
  /* @__PURE__ */ m(mn, { children: [
494
494
  e && /* @__PURE__ */ s(In, { children: e }),
495
- t !== void 0 && o !== z.POLL && /* @__PURE__ */ m(w, { children: [
495
+ t !== void 0 && o !== x.POLL && /* @__PURE__ */ m($, { children: [
496
496
  /* @__PURE__ */ s(gn, { name: "icon-trophy" }),
497
497
  /* @__PURE__ */ m(fn, { children: [
498
498
  /* @__PURE__ */ s(Mn, { children: /* @__PURE__ */ s(Ae, { value: t }) }),
@@ -503,43 +503,51 @@ const Ye = /* @__PURE__ */ r("div")({
503
503
  i && /* @__PURE__ */ s(un, { isPlaying: n, onTimerExpired: p, duration: u })
504
504
  ] }), yn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
505
505
  var o, u;
506
- const p = e.subject, I = e.type, c = (o = e.options) == null ? void 0 : o.options, [h, y] = V(!1), [D, N] = V(""), A = e == null ? void 0 : e.id, T = F(
506
+ const p = e.subject, I = e.type, c = (o = e.options) == null ? void 0 : o.options, [h, A] = V(!1), [S, N] = V(""), T = e == null ? void 0 : e.id, D = F(
507
507
  async (v) => {
508
- if (A) {
509
- const f = v.currentTarget.value;
510
- N(f), await n(A, f);
508
+ if (T) {
509
+ const O = v.currentTarget.value;
510
+ N(O), await n(T, O);
511
511
  }
512
512
  },
513
- [A, N, n]
513
+ [T, N, n]
514
514
  ), a = F(() => {
515
- y(!0), setTimeout(i, 3e3);
516
- }, [i]), l = Y(
515
+ A(!0), setTimeout(i, 3e3);
516
+ }, [i]), l = L(
517
517
  () => e == null ? void 0 : e.answers.find((v) => v.youVoted === !0),
518
518
  [e]
519
- ), d = Y(
519
+ ), d = L(
520
520
  () => !!(e != null && e.answers.find((v) => v.correct === !0)),
521
521
  [e]
522
- ), g = Y(() => e ? e.answers.map((v) => {
523
- var f;
522
+ ), g = L(
523
+ () => e == null ? void 0 : e.answers.find((v) => v.correct === !0),
524
+ [e]
525
+ ), f = L(() => e ? e.answers.map((v) => {
526
+ var O;
524
527
  return {
525
528
  ...v,
526
529
  questionVoted: !!l,
527
- youSelected: D === v.id,
530
+ youSelected: S === v.id,
528
531
  isLoading: t,
529
532
  hasCorrectAnswer: d,
530
533
  questionType: e.type,
531
534
  answerTimeExpired: h,
532
535
  questionStatus: e.status,
533
- imageMode: (f = e.appearance) == null ? void 0 : f.images,
536
+ imageMode: (O = e.appearance) == null ? void 0 : O.images,
534
537
  // ToDo: Figure out why imageMode is not in the response
535
- onVote: T
538
+ onVote: D
536
539
  };
537
- }) : [], [d, h, t, e, l, T, D]), M = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0;
540
+ }) : [], [d, h, t, e, l, D, S]), z = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0, M = L(() => {
541
+ if (e.status === w.RESOLVED)
542
+ return 0;
543
+ if (!h)
544
+ return l ? l.correct ? l.points : 0 : g == null ? void 0 : g.points;
545
+ }, [h, l, g, e.status]), y = L(() => h ? "Time expired" : e.type === x.POLL ? "Time remaining" : l ? "You won" : "To win", [h, e.type, l]);
538
546
  return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Qt, { children: /* @__PURE__ */ m(Ut, { children: [
539
- M && /* @__PURE__ */ s(
547
+ z && /* @__PURE__ */ s(
540
548
  Rt,
541
549
  {
542
- feedbackMessages: M,
550
+ feedbackMessages: z,
543
551
  questionVoted: !!l,
544
552
  questionVotedCorrectly: l == null ? void 0 : l.correct,
545
553
  questionType: I,
@@ -547,11 +555,11 @@ const Ye = /* @__PURE__ */ r("div")({
547
555
  questionStatus: e.status
548
556
  }
549
557
  ),
550
- e.type !== z.PREDICTION && /* @__PURE__ */ s(
558
+ e.type !== x.PREDICTION && /* @__PURE__ */ s(
551
559
  Nn,
552
560
  {
553
- title: h ? "Time expired" : e.type === z.POLL ? "Time remaining" : "To win",
554
- points: h ? void 0 : l != null && l.correct ? l == null ? void 0 : l.points : 0,
561
+ title: y,
562
+ points: M,
555
563
  onTimerExpired: a,
556
564
  questionType: e.type,
557
565
  isTimer: !t,
@@ -560,14 +568,14 @@ const Ye = /* @__PURE__ */ r("div")({
560
568
  }
561
569
  ),
562
570
  h ? /* @__PURE__ */ s(
563
- kt,
571
+ Ct,
564
572
  {
565
573
  title: "More to come...",
566
574
  description: "Watch for additional enhanced stream interactive experience."
567
575
  }
568
- ) : /* @__PURE__ */ m(w, { children: [
569
- /* @__PURE__ */ s(_t, { "data-isPrediction": e.type === z.PREDICTION, children: p }),
570
- /* @__PURE__ */ s(Pt, { children: g.map((v) => /* @__PURE__ */ s(on, { ...v }, v.id)) })
576
+ ) : /* @__PURE__ */ m($, { children: [
577
+ /* @__PURE__ */ s(_t, { "data-isPrediction": e.type === x.PREDICTION, children: p }),
578
+ /* @__PURE__ */ s(Pt, { children: f.map((v) => /* @__PURE__ */ s(on, { ...v }, v.id)) })
571
579
  ] })
572
580
  ] }) }) });
573
581
  }, An = /* @__PURE__ */ r("div")({
@@ -595,7 +603,7 @@ const Ye = /* @__PURE__ */ r("div")({
595
603
  class: "i1gfjeu5",
596
604
  propsAsIs: !1
597
605
  }), Oe = ({ created: e, image: t, title: n, instantView: i }) => {
598
- const o = Y(() => {
606
+ const o = L(() => {
599
607
  if (e) {
600
608
  const p = new Date(e);
601
609
  if (Xe(p))
@@ -627,25 +635,25 @@ const Ye = /* @__PURE__ */ r("div")({
627
635
  name: "WebLinkBtn",
628
636
  class: "w19zie3h",
629
637
  propsAsIs: !1
630
- }), Cn = ({ instantView: e, ...t }) => /* @__PURE__ */ m(On, { children: [
638
+ }), kn = ({ instantView: e, ...t }) => /* @__PURE__ */ m(On, { children: [
631
639
  /* @__PURE__ */ s(Oe, { instantView: e, ...t }),
632
640
  (e == null ? void 0 : e.webLink) && /* @__PURE__ */ m(jn, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
633
641
  "Explore more of the Masters History",
634
- /* @__PURE__ */ s(O, { name: "icon-external-link" })
642
+ /* @__PURE__ */ s(j, { name: "icon-external-link" })
635
643
  ] })
636
- ] }), kn = /* @__PURE__ */ r("div")({
644
+ ] }), Cn = /* @__PURE__ */ r("div")({
637
645
  name: "QuestionContainer",
638
646
  class: "qdri6g3",
639
647
  propsAsIs: !1
640
- }), bn = ({
648
+ }), Ln = ({
641
649
  openedQuestion: e
642
650
  }) => {
643
651
  var t;
644
- return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(Cn, {
652
+ return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(kn, {
645
653
  created: e.attributes.created,
646
654
  ...e.attributes.attributes.value
647
655
  }) : null;
648
- }, wn = ({
656
+ }, bn = ({
649
657
  extendedQuestion: e,
650
658
  vote: t,
651
659
  close: n
@@ -660,23 +668,23 @@ const Ye = /* @__PURE__ */ r("div")({
660
668
  openedQuestion: o,
661
669
  isLoading: !!i
662
670
  }) : null;
663
- }, Ln = ({
671
+ }, wn = ({
664
672
  gamification: e
665
673
  }) => {
666
674
  var t;
667
- const n = k(e.openedQuestion.$store), i = k(e.openedQuestion.$extendedStore);
675
+ const n = C(e.openedQuestion.$store), i = C(e.openedQuestion.$extendedStore);
668
676
  if (!n)
669
677
  return null;
670
678
  const o = n.type;
671
- return /* @__PURE__ */ m(kn, {
679
+ return /* @__PURE__ */ m(Cn, {
672
680
  children: [/* @__PURE__ */ s(Te, {
673
681
  close: e.closeQuestion,
674
- type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
675
- }), o === "question" && /* @__PURE__ */ s(wn, {
682
+ type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
683
+ }), o === "question" && /* @__PURE__ */ s(bn, {
676
684
  vote: e.submitAnswer,
677
685
  close: e.closeQuestion,
678
686
  extendedQuestion: i
679
- }), o !== "question" && /* @__PURE__ */ s(bn, {
687
+ }), o !== "question" && /* @__PURE__ */ s(Ln, {
680
688
  openedQuestion: n
681
689
  }), /* @__PURE__ */ s(xt, {
682
690
  sponsorLogo: ""
@@ -754,7 +762,7 @@ function qn(e, t) {
754
762
  return !1;
755
763
  return !0;
756
764
  }
757
- function G(e, t) {
765
+ function Z(e, t) {
758
766
  t === void 0 && (t = qn);
759
767
  var n, i = [], o, u = !1;
760
768
  function p() {
@@ -790,94 +798,94 @@ function ge(e) {
790
798
  }
791
799
  return J;
792
800
  }
793
- var b = null;
801
+ var E = null;
794
802
  function fe(e) {
795
- if (e === void 0 && (e = !1), b === null || e) {
803
+ if (e === void 0 && (e = !1), E === null || e) {
796
804
  var t = document.createElement("div"), n = t.style;
797
805
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
798
806
  var i = document.createElement("div"), o = i.style;
799
- return o.width = "100px", o.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? b = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? b = "negative" : b = "positive-ascending"), document.body.removeChild(t), b;
807
+ return o.width = "100px", o.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? E = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? E = "negative" : E = "positive-ascending"), document.body.removeChild(t), E;
800
808
  }
801
- return b;
809
+ return E;
802
810
  }
803
811
  var Vn = 150, Fn = function(t, n) {
804
812
  return t;
805
813
  };
806
814
  function Bn(e) {
807
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, o = e.getItemSize, u = e.getOffsetForIndexAndAlignment, p = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, c = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, y = e.validateProps;
808
- return t = /* @__PURE__ */ function(D) {
809
- _n(N, D);
810
- function N(T) {
815
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, o = e.getItemSize, u = e.getOffsetForIndexAndAlignment, p = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, c = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, A = e.validateProps;
816
+ return t = /* @__PURE__ */ function(S) {
817
+ _n(N, S);
818
+ function N(D) {
811
819
  var a;
812
- return a = D.call(this, T) || this, a._instanceProps = c(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
820
+ return a = S.call(this, D) || this, a._instanceProps = c(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
813
821
  instance: pe(a),
814
822
  isScrolling: !1,
815
823
  scrollDirection: "forward",
816
824
  scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
817
825
  scrollUpdateWasRequested: !1
818
- }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = G(function(l, d, g, M) {
826
+ }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = Z(function(l, d, g, f) {
819
827
  return a.props.onItemsRendered({
820
828
  overscanStartIndex: l,
821
829
  overscanStopIndex: d,
822
830
  visibleStartIndex: g,
823
- visibleStopIndex: M
831
+ visibleStopIndex: f
824
832
  });
825
- }), a._callOnScroll = void 0, a._callOnScroll = G(function(l, d, g) {
833
+ }), a._callOnScroll = void 0, a._callOnScroll = Z(function(l, d, g) {
826
834
  return a.props.onScroll({
827
835
  scrollDirection: l,
828
836
  scrollOffset: d,
829
837
  scrollUpdateWasRequested: g
830
838
  });
831
839
  }), a._getItemStyle = void 0, a._getItemStyle = function(l) {
832
- var d = a.props, g = d.direction, M = d.itemSize, v = d.layout, f = a._getItemStyleCache(h && M, h && v, h && g), S;
833
- if (f.hasOwnProperty(l))
834
- S = f[l];
840
+ var d = a.props, g = d.direction, f = d.itemSize, z = d.layout, M = a._getItemStyleCache(h && f, h && z, h && g), y;
841
+ if (M.hasOwnProperty(l))
842
+ y = M[l];
835
843
  else {
836
- var x = n(a.props, l, a._instanceProps), j = o(a.props, l, a._instanceProps), C = g === "horizontal" || v === "horizontal", Q = g === "rtl", U = C ? x : 0;
837
- f[l] = S = {
844
+ var v = n(a.props, l, a._instanceProps), O = o(a.props, l, a._instanceProps), k = g === "horizontal" || z === "horizontal", U = g === "rtl", _ = k ? v : 0;
845
+ M[l] = y = {
838
846
  position: "absolute",
839
- left: Q ? void 0 : U,
840
- right: Q ? U : void 0,
841
- top: C ? 0 : x,
842
- height: C ? "100%" : j,
843
- width: C ? j : "100%"
847
+ left: U ? void 0 : _,
848
+ right: U ? _ : void 0,
849
+ top: k ? 0 : v,
850
+ height: k ? "100%" : O,
851
+ width: k ? O : "100%"
844
852
  };
845
853
  }
846
- return S;
847
- }, a._getItemStyleCache = void 0, a._getItemStyleCache = G(function(l, d, g) {
854
+ return y;
855
+ }, a._getItemStyleCache = void 0, a._getItemStyleCache = Z(function(l, d, g) {
848
856
  return {};
849
857
  }), a._onScrollHorizontal = function(l) {
850
- var d = l.currentTarget, g = d.clientWidth, M = d.scrollLeft, v = d.scrollWidth;
851
- a.setState(function(f) {
852
- if (f.scrollOffset === M)
858
+ var d = l.currentTarget, g = d.clientWidth, f = d.scrollLeft, z = d.scrollWidth;
859
+ a.setState(function(M) {
860
+ if (M.scrollOffset === f)
853
861
  return null;
854
- var S = a.props.direction, x = M;
855
- if (S === "rtl")
862
+ var y = a.props.direction, v = f;
863
+ if (y === "rtl")
856
864
  switch (fe()) {
857
865
  case "negative":
858
- x = -M;
866
+ v = -f;
859
867
  break;
860
868
  case "positive-descending":
861
- x = v - g - M;
869
+ v = z - g - f;
862
870
  break;
863
871
  }
864
- return x = Math.max(0, Math.min(x, v - g)), {
872
+ return v = Math.max(0, Math.min(v, z - g)), {
865
873
  isScrolling: !0,
866
- scrollDirection: f.scrollOffset < M ? "forward" : "backward",
867
- scrollOffset: x,
874
+ scrollDirection: M.scrollOffset < f ? "forward" : "backward",
875
+ scrollOffset: v,
868
876
  scrollUpdateWasRequested: !1
869
877
  };
870
878
  }, a._resetIsScrollingDebounced);
871
879
  }, a._onScrollVertical = function(l) {
872
- var d = l.currentTarget, g = d.clientHeight, M = d.scrollHeight, v = d.scrollTop;
873
- a.setState(function(f) {
874
- if (f.scrollOffset === v)
880
+ var d = l.currentTarget, g = d.clientHeight, f = d.scrollHeight, z = d.scrollTop;
881
+ a.setState(function(M) {
882
+ if (M.scrollOffset === z)
875
883
  return null;
876
- var S = Math.max(0, Math.min(v, M - g));
884
+ var y = Math.max(0, Math.min(z, f - g));
877
885
  return {
878
886
  isScrolling: !0,
879
- scrollDirection: f.scrollOffset < S ? "forward" : "backward",
880
- scrollOffset: S,
887
+ scrollDirection: M.scrollOffset < y ? "forward" : "backward",
888
+ scrollOffset: y,
881
889
  scrollUpdateWasRequested: !1
882
890
  };
883
891
  }, a._resetIsScrollingDebounced);
@@ -895,10 +903,10 @@ function Bn(e) {
895
903
  }, a;
896
904
  }
897
905
  N.getDerivedStateFromProps = function(a, l) {
898
- return Hn(a, l), y(a), null;
906
+ return Hn(a, l), A(a), null;
899
907
  };
900
- var A = N.prototype;
901
- return A.scrollTo = function(a) {
908
+ var T = N.prototype;
909
+ return T.scrollTo = function(a) {
902
910
  a = Math.max(0, a), this.setState(function(l) {
903
911
  return l.scrollOffset === a ? null : {
904
912
  scrollDirection: l.scrollOffset < a ? "forward" : "backward",
@@ -906,101 +914,101 @@ function Bn(e) {
906
914
  scrollUpdateWasRequested: !0
907
915
  };
908
916
  }, this._resetIsScrollingDebounced);
909
- }, A.scrollToItem = function(a, l) {
917
+ }, T.scrollToItem = function(a, l) {
910
918
  l === void 0 && (l = "auto");
911
- var d = this.props, g = d.itemCount, M = d.layout, v = this.state.scrollOffset;
919
+ var d = this.props, g = d.itemCount, f = d.layout, z = this.state.scrollOffset;
912
920
  a = Math.max(0, Math.min(a, g - 1));
913
- var f = 0;
921
+ var M = 0;
914
922
  if (this._outerRef) {
915
- var S = this._outerRef;
916
- M === "vertical" ? f = S.scrollWidth > S.clientWidth ? ge() : 0 : f = S.scrollHeight > S.clientHeight ? ge() : 0;
923
+ var y = this._outerRef;
924
+ f === "vertical" ? M = y.scrollWidth > y.clientWidth ? ge() : 0 : M = y.scrollHeight > y.clientHeight ? ge() : 0;
917
925
  }
918
- this.scrollTo(u(this.props, a, l, v, this._instanceProps, f));
919
- }, A.componentDidMount = function() {
926
+ this.scrollTo(u(this.props, a, l, z, this._instanceProps, M));
927
+ }, T.componentDidMount = function() {
920
928
  var a = this.props, l = a.direction, d = a.initialScrollOffset, g = a.layout;
921
929
  if (typeof d == "number" && this._outerRef != null) {
922
- var M = this._outerRef;
923
- l === "horizontal" || g === "horizontal" ? M.scrollLeft = d : M.scrollTop = d;
930
+ var f = this._outerRef;
931
+ l === "horizontal" || g === "horizontal" ? f.scrollLeft = d : f.scrollTop = d;
924
932
  }
925
933
  this._callPropsCallbacks();
926
- }, A.componentDidUpdate = function() {
927
- var a = this.props, l = a.direction, d = a.layout, g = this.state, M = g.scrollOffset, v = g.scrollUpdateWasRequested;
928
- if (v && this._outerRef != null) {
929
- var f = this._outerRef;
934
+ }, T.componentDidUpdate = function() {
935
+ var a = this.props, l = a.direction, d = a.layout, g = this.state, f = g.scrollOffset, z = g.scrollUpdateWasRequested;
936
+ if (z && this._outerRef != null) {
937
+ var M = this._outerRef;
930
938
  if (l === "horizontal" || d === "horizontal")
931
939
  if (l === "rtl")
932
940
  switch (fe()) {
933
941
  case "negative":
934
- f.scrollLeft = -M;
942
+ M.scrollLeft = -f;
935
943
  break;
936
944
  case "positive-ascending":
937
- f.scrollLeft = M;
945
+ M.scrollLeft = f;
938
946
  break;
939
947
  default:
940
- var S = f.clientWidth, x = f.scrollWidth;
941
- f.scrollLeft = x - S - M;
948
+ var y = M.clientWidth, v = M.scrollWidth;
949
+ M.scrollLeft = v - y - f;
942
950
  break;
943
951
  }
944
952
  else
945
- f.scrollLeft = M;
953
+ M.scrollLeft = f;
946
954
  else
947
- f.scrollTop = M;
955
+ M.scrollTop = f;
948
956
  }
949
957
  this._callPropsCallbacks();
950
- }, A.componentWillUnmount = function() {
958
+ }, T.componentWillUnmount = function() {
951
959
  this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
952
- }, A.render = function() {
953
- var a = this.props, l = a.children, d = a.className, g = a.direction, M = a.height, v = a.innerRef, f = a.innerElementType, S = a.innerTagName, x = a.itemCount, j = a.itemData, C = a.itemKey, Q = C === void 0 ? Fn : C, U = a.layout, je = a.outerElementType, Ce = a.outerTagName, ke = a.style, be = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || U === "horizontal", Le = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], $e = se[1], ie = [];
954
- if (x > 0)
955
- for (var $ = Ee; $ <= $e; $++)
960
+ }, T.render = function() {
961
+ var a = this.props, l = a.children, d = a.className, g = a.direction, f = a.height, z = a.innerRef, M = a.innerElementType, y = a.innerTagName, v = a.itemCount, O = a.itemData, k = a.itemKey, U = k === void 0 ? Fn : k, _ = a.layout, je = a.outerElementType, ke = a.outerTagName, Ce = a.style, Le = a.useIsScrolling, be = a.width, ne = this.state.isScrolling, B = g === "horizontal" || _ === "horizontal", we = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], $e = se[1], ie = [];
962
+ if (v > 0)
963
+ for (var R = Ee; R <= $e; R++)
956
964
  ie.push(H(l, {
957
- data: j,
958
- key: Q($, j),
959
- index: $,
960
- isScrolling: be ? ne : void 0,
961
- style: this._getItemStyle($)
965
+ data: O,
966
+ key: U(R, O),
967
+ index: R,
968
+ isScrolling: Le ? ne : void 0,
969
+ style: this._getItemStyle(R)
962
970
  }));
963
971
  var oe = i(this.props, this._instanceProps);
964
- return H(je || Ce || "div", {
972
+ return H(je || ke || "div", {
965
973
  className: d,
966
- onScroll: Le,
974
+ onScroll: we,
967
975
  ref: this._outerRefSetter,
968
976
  style: X({
969
977
  position: "relative",
970
- height: M,
971
- width: we,
978
+ height: f,
979
+ width: be,
972
980
  overflow: "auto",
973
981
  WebkitOverflowScrolling: "touch",
974
982
  willChange: "transform",
975
983
  direction: g
976
- }, ke)
977
- }, H(f || S || "div", {
984
+ }, Ce)
985
+ }, H(M || y || "div", {
978
986
  children: ie,
979
- ref: v,
987
+ ref: z,
980
988
  style: {
981
989
  height: B ? "100%" : oe,
982
990
  pointerEvents: ne ? "none" : void 0,
983
991
  width: B ? oe : "100%"
984
992
  }
985
993
  }));
986
- }, A._callPropsCallbacks = function() {
994
+ }, T._callPropsCallbacks = function() {
987
995
  if (typeof this.props.onItemsRendered == "function") {
988
996
  var a = this.props.itemCount;
989
997
  if (a > 0) {
990
- var l = this._getRangeToRender(), d = l[0], g = l[1], M = l[2], v = l[3];
991
- this._callOnItemsRendered(d, g, M, v);
998
+ var l = this._getRangeToRender(), d = l[0], g = l[1], f = l[2], z = l[3];
999
+ this._callOnItemsRendered(d, g, f, z);
992
1000
  }
993
1001
  }
994
1002
  if (typeof this.props.onScroll == "function") {
995
- var f = this.state, S = f.scrollDirection, x = f.scrollOffset, j = f.scrollUpdateWasRequested;
996
- this._callOnScroll(S, x, j);
1003
+ var M = this.state, y = M.scrollDirection, v = M.scrollOffset, O = M.scrollUpdateWasRequested;
1004
+ this._callOnScroll(y, v, O);
997
1005
  }
998
- }, A._getRangeToRender = function() {
999
- var a = this.props, l = a.itemCount, d = a.overscanCount, g = this.state, M = g.isScrolling, v = g.scrollDirection, f = g.scrollOffset;
1006
+ }, T._getRangeToRender = function() {
1007
+ var a = this.props, l = a.itemCount, d = a.overscanCount, g = this.state, f = g.isScrolling, z = g.scrollDirection, M = g.scrollOffset;
1000
1008
  if (l === 0)
1001
1009
  return [0, 0, 0, 0];
1002
- var S = p(this.props, f, this._instanceProps), x = I(this.props, S, f, this._instanceProps), j = !M || v === "backward" ? Math.max(1, d) : 1, C = !M || v === "forward" ? Math.max(1, d) : 1;
1003
- return [Math.max(0, S - j), Math.max(0, Math.min(l - 1, x + C)), S, x];
1010
+ var y = p(this.props, M, this._instanceProps), v = I(this.props, y, M, this._instanceProps), O = !f || z === "backward" ? Math.max(1, d) : 1, k = !f || z === "forward" ? Math.max(1, d) : 1;
1011
+ return [Math.max(0, y - O), Math.max(0, Math.min(l - 1, v + k)), y, v];
1004
1012
  }, N;
1005
1013
  }(ye), t.defaultProps = {
1006
1014
  direction: "ltr",
@@ -1012,7 +1020,7 @@ function Bn(e) {
1012
1020
  }
1013
1021
  var Hn = function(t, n) {
1014
1022
  t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
1015
- }, Zn = /* @__PURE__ */ Bn({
1023
+ }, Gn = /* @__PURE__ */ Bn({
1016
1024
  getItemOffset: function(t, n) {
1017
1025
  var i = t.itemSize;
1018
1026
  return n * i;
@@ -1026,15 +1034,15 @@ var Hn = function(t, n) {
1026
1034
  return i * n;
1027
1035
  },
1028
1036
  getOffsetForIndexAndAlignment: function(t, n, i, o, u, p) {
1029
- var I = t.direction, c = t.height, h = t.itemCount, y = t.itemSize, D = t.layout, N = t.width, A = I === "horizontal" || D === "horizontal", T = A ? N : c, a = Math.max(0, h * y - T), l = Math.min(a, n * y), d = Math.max(0, n * y - T + y + p);
1030
- switch (i === "smart" && (o >= d - T && o <= l + T ? i = "auto" : i = "center"), i) {
1037
+ var I = t.direction, c = t.height, h = t.itemCount, A = t.itemSize, S = t.layout, N = t.width, T = I === "horizontal" || S === "horizontal", D = T ? N : c, a = Math.max(0, h * A - D), l = Math.min(a, n * A), d = Math.max(0, n * A - D + A + p);
1038
+ switch (i === "smart" && (o >= d - D && o <= l + D ? i = "auto" : i = "center"), i) {
1031
1039
  case "start":
1032
1040
  return l;
1033
1041
  case "end":
1034
1042
  return d;
1035
1043
  case "center": {
1036
1044
  var g = Math.round(d + (l - d) / 2);
1037
- return g < Math.ceil(T / 2) ? 0 : g > a + Math.floor(T / 2) ? a : g;
1045
+ return g < Math.ceil(D / 2) ? 0 : g > a + Math.floor(D / 2) ? a : g;
1038
1046
  }
1039
1047
  case "auto":
1040
1048
  default:
@@ -1046,10 +1054,10 @@ var Hn = function(t, n) {
1046
1054
  return Math.max(0, Math.min(i - 1, Math.floor(n / o)));
1047
1055
  },
1048
1056
  getStopIndexForStartIndex: function(t, n, i) {
1049
- var o = t.direction, u = t.height, p = t.itemCount, I = t.itemSize, c = t.layout, h = t.width, y = o === "horizontal" || c === "horizontal", D = n * I, N = y ? h : u, A = Math.ceil((N + i - D) / I);
1057
+ var o = t.direction, u = t.height, p = t.itemCount, I = t.itemSize, c = t.layout, h = t.width, A = o === "horizontal" || c === "horizontal", S = n * I, N = A ? h : u, T = Math.ceil((N + i - S) / I);
1050
1058
  return Math.max(0, Math.min(
1051
1059
  p - 1,
1052
- n + A - 1
1060
+ n + T - 1
1053
1061
  // -1 is because stop index is inclusive
1054
1062
  ));
1055
1063
  },
@@ -1060,25 +1068,25 @@ var Hn = function(t, n) {
1060
1068
  t.itemSize;
1061
1069
  }
1062
1070
  });
1063
- function Gn(e) {
1071
+ function Zn(e) {
1064
1072
  var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, o = e.stopIndex;
1065
1073
  return !(i > n || o < t);
1066
1074
  }
1067
1075
  function Jn(e) {
1068
1076
  for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, o = e.startIndex, u = e.stopIndex, p = [], I = null, c = null, h = o; h <= u; h++) {
1069
- var y = t(h);
1070
- y ? c !== null && (p.push(I, c), I = c = null) : (c = h, I === null && (I = h));
1077
+ var A = t(h);
1078
+ A ? c !== null && (p.push(I, c), I = c = null) : (c = h, I === null && (I = h));
1071
1079
  }
1072
1080
  if (c !== null) {
1073
- for (var D = Math.min(Math.max(c, I + i - 1), n - 1), N = c + 1; N <= D && !t(N); N++)
1081
+ for (var S = Math.min(Math.max(c, I + i - 1), n - 1), N = c + 1; N <= S && !t(N); N++)
1074
1082
  c = N;
1075
1083
  p.push(I, c);
1076
1084
  }
1077
1085
  if (p.length)
1078
1086
  for (; p[1] - p[0] + 1 < i && p[0] > 0; ) {
1079
- var A = p[0] - 1;
1080
- if (!t(A))
1081
- p[0] = A;
1087
+ var T = p[0] - 1;
1088
+ if (!t(T))
1089
+ p[0] = T;
1082
1090
  else
1083
1091
  break;
1084
1092
  }
@@ -1120,8 +1128,8 @@ var Kn = function(e, t) {
1120
1128
  for (var p = arguments.length, I = Array(p), c = 0; c < p; c++)
1121
1129
  I[c] = arguments[c];
1122
1130
  return u = (i = (o = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(I))), o), o._lastRenderedStartIndex = -1, o._lastRenderedStopIndex = -1, o._memoizedUnloadedRanges = [], o._onItemsRendered = function(h) {
1123
- var y = h.visibleStartIndex, D = h.visibleStopIndex;
1124
- o._lastRenderedStartIndex = y, o._lastRenderedStopIndex = D, o._ensureRowsLoaded(y, D);
1131
+ var A = h.visibleStartIndex, S = h.visibleStopIndex;
1132
+ o._lastRenderedStartIndex = A, o._lastRenderedStopIndex = S, o._ensureRowsLoaded(A, S);
1125
1133
  }, o._setRef = function(h) {
1126
1134
  o._listRef = h;
1127
1135
  }, i), Me(o, u);
@@ -1148,32 +1156,32 @@ var Kn = function(e, t) {
1148
1156
  }, {
1149
1157
  key: "_ensureRowsLoaded",
1150
1158
  value: function(i, o) {
1151
- var u = this.props, p = u.isItemLoaded, I = u.itemCount, c = u.minimumBatchSize, h = c === void 0 ? 10 : c, y = u.threshold, D = y === void 0 ? 15 : y, N = Jn({
1159
+ var u = this.props, p = u.isItemLoaded, I = u.itemCount, c = u.minimumBatchSize, h = c === void 0 ? 10 : c, A = u.threshold, S = A === void 0 ? 15 : A, N = Jn({
1152
1160
  isItemLoaded: p,
1153
1161
  itemCount: I,
1154
1162
  minimumBatchSize: h,
1155
- startIndex: Math.max(0, i - D),
1156
- stopIndex: Math.min(I - 1, o + D)
1163
+ startIndex: Math.max(0, i - S),
1164
+ stopIndex: Math.min(I - 1, o + S)
1157
1165
  });
1158
- (this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(A, T) {
1159
- return N[T] !== A;
1166
+ (this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(T, D) {
1167
+ return N[D] !== T;
1160
1168
  })) && (this._memoizedUnloadedRanges = N, this._loadUnloadedRanges(N));
1161
1169
  }
1162
1170
  }, {
1163
1171
  key: "_loadUnloadedRanges",
1164
1172
  value: function(i) {
1165
1173
  for (var o = this, u = this.props.loadMoreItems || this.props.loadMoreRows, p = function(h) {
1166
- var y = i[h], D = i[h + 1], N = u(y, D);
1174
+ var A = i[h], S = i[h + 1], N = u(A, S);
1167
1175
  N != null && N.then(function() {
1168
- if (Gn({
1176
+ if (Zn({
1169
1177
  lastRenderedStartIndex: o._lastRenderedStartIndex,
1170
1178
  lastRenderedStopIndex: o._lastRenderedStopIndex,
1171
- startIndex: y,
1172
- stopIndex: D
1179
+ startIndex: A,
1180
+ stopIndex: S
1173
1181
  })) {
1174
1182
  if (o._listRef == null)
1175
1183
  return;
1176
- typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(y, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
1184
+ typeof o._listRef.resetAfterIndex == "function" ? o._listRef.resetAfterIndex(A, !0) : (typeof o._listRef._getItemStyleCache == "function" && o._listRef._getItemStyleCache(-1), o._listRef.forceUpdate());
1177
1185
  }
1178
1186
  });
1179
1187
  }, I = 0; I < i.length; I += 2)
@@ -1209,7 +1217,7 @@ const ns = /* @__PURE__ */ r("div")({
1209
1217
  name: "Name",
1210
1218
  class: "njsrqgr",
1211
1219
  propsAsIs: !1
1212
- }), cs = () => O, ds = /* @__PURE__ */ r(cs())({
1220
+ }), cs = () => j, ds = /* @__PURE__ */ r(cs())({
1213
1221
  name: "CurrentUserBadge",
1214
1222
  class: "c17uc4zr",
1215
1223
  propsAsIs: !0
@@ -1247,7 +1255,7 @@ const ns = /* @__PURE__ */ r("div")({
1247
1255
  itemCount: e.length + 1,
1248
1256
  loadMoreItems: i,
1249
1257
  children: ({ onItemsRendered: p, ref: I }) => /* @__PURE__ */ s(ps, { children: /* @__PURE__ */ s(
1250
- Zn,
1258
+ Gn,
1251
1259
  {
1252
1260
  itemSize: 56,
1253
1261
  onItemsRendered: p,
@@ -1269,7 +1277,7 @@ const ns = /* @__PURE__ */ r("div")({
1269
1277
  ) })
1270
1278
  }
1271
1279
  ) }), Is = ({ deepLink: e }) => {
1272
- const { data: t } = k(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
1280
+ const { data: t } = C(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
1273
1281
  return /* @__PURE__ */ s(
1274
1282
  Ue,
1275
1283
  {
@@ -1291,7 +1299,7 @@ const ns = /* @__PURE__ */ r("div")({
1291
1299
  }
1292
1300
  );
1293
1301
  }, hs = ({ gamification: e }) => {
1294
- const { data: t } = k(e.leaderboardList.$store);
1302
+ const { data: t } = C(e.leaderboardList.$store);
1295
1303
  return t != null && t.length ? /* @__PURE__ */ s(
1296
1304
  ms,
1297
1305
  {
@@ -1317,11 +1325,11 @@ const ns = /* @__PURE__ */ r("div")({
1317
1325
  name: "QuestionAction",
1318
1326
  class: "q105uluy",
1319
1327
  propsAsIs: !1
1320
- }), Ns = () => O, q = /* @__PURE__ */ r(Ns())({
1328
+ }), Ns = () => j, Y = /* @__PURE__ */ r(Ns())({
1321
1329
  name: "QuestionActionIcon",
1322
1330
  class: "q1fa0b9h",
1323
1331
  propsAsIs: !0
1324
- }), ys = () => O, As = /* @__PURE__ */ r(ys())({
1332
+ }), ys = () => j, As = /* @__PURE__ */ r(ys())({
1325
1333
  name: "QuestionTypeIcon",
1326
1334
  class: "qxlt78s",
1327
1335
  propsAsIs: !0
@@ -1338,10 +1346,10 @@ const ns = /* @__PURE__ */ r("div")({
1338
1346
  class: "p1pba9p1",
1339
1347
  propsAsIs: !1
1340
1348
  }), zs = {
1341
- [_.LOST]: /* @__PURE__ */ s(q, { name: "incorrectVoted" }),
1342
- [_.WON]: /* @__PURE__ */ s(q, { name: "icon-check" }),
1343
- [_.UNSET]: /* @__PURE__ */ s(q, { name: "icon-arrow" }),
1344
- [_.DNP]: /* @__PURE__ */ s(q, { name: "icon-arrow" })
1349
+ [P.LOST]: /* @__PURE__ */ s(Y, { name: "incorrectVoted" }),
1350
+ [P.WON]: /* @__PURE__ */ s(Y, { name: "icon-check" }),
1351
+ [P.UNSET]: /* @__PURE__ */ s(Y, { name: "icon-arrow" }),
1352
+ [P.DNP]: /* @__PURE__ */ s(Y, { name: "icon-arrow" })
1345
1353
  }, xs = ({
1346
1354
  questionId: e,
1347
1355
  questionType: t,
@@ -1358,14 +1366,14 @@ const ns = /* @__PURE__ */ r("div")({
1358
1366
  /* @__PURE__ */ s(
1359
1367
  As,
1360
1368
  {
1361
- "data-type-trivia": t === z.TRIVIA,
1362
- "data-type-poll": t === z.POLL,
1369
+ "data-type-trivia": t === x.TRIVIA,
1370
+ "data-type-poll": t === x.POLL,
1363
1371
  name: I.iconName
1364
1372
  }
1365
1373
  ),
1366
1374
  /* @__PURE__ */ m(Ts, { children: [
1367
1375
  I.label,
1368
- t === z.TRIVIA && n === L.RESOLVED && " • Expired"
1376
+ t === x.TRIVIA && n === w.RESOLVED && " • Expired"
1369
1377
  ] })
1370
1378
  ] }),
1371
1379
  /* @__PURE__ */ s(Ms, { children: i || "" })
@@ -1380,18 +1388,18 @@ const ns = /* @__PURE__ */ r("div")({
1380
1388
  name: "ActionBtn",
1381
1389
  class: "a10g1iik",
1382
1390
  propsAsIs: !1
1383
- }), Cs = ({
1391
+ }), ks = ({
1384
1392
  openInsight: e,
1385
1393
  questionId: t,
1386
1394
  ...n
1387
1395
  }) => /* @__PURE__ */ m(Os, { children: [
1388
1396
  /* @__PURE__ */ s(Oe, { questionId: t, ...n }),
1389
1397
  e && /* @__PURE__ */ s(js, { onClick: () => e(t), children: "View Insight" })
1390
- ] }), ks = /* @__PURE__ */ r("div")({
1398
+ ] }), Cs = /* @__PURE__ */ r("div")({
1391
1399
  name: "QuestionsContainer",
1392
1400
  class: "qvghv3l",
1393
1401
  propsAsIs: !1
1394
- }), bs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(ks, { children: e == null ? void 0 : e.map((n) => {
1402
+ }), Ls = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(Cs, { children: e == null ? void 0 : e.map((n) => {
1395
1403
  var i, o;
1396
1404
  if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1397
1405
  const u = n.attributes.attributes.value;
@@ -1399,15 +1407,15 @@ const ns = /* @__PURE__ */ r("div")({
1399
1407
  }
1400
1408
  if (n.type === "insight" && ((o = n.attributes) == null ? void 0 : o.attributes.case) === "insight") {
1401
1409
  const u = n.attributes.attributes.value;
1402
- return /* @__PURE__ */ s(Cs, { openInsight: t, ...u }, u.questionId);
1410
+ return /* @__PURE__ */ s(ks, { openInsight: t, ...u }, u.questionId);
1403
1411
  }
1404
1412
  return null;
1405
- }) }), ws = ({ store: e, openQuestion: t }) => {
1406
- const n = k(e);
1407
- return n != null && n.data ? /* @__PURE__ */ s(bs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1408
- }, Ls = ({ userSummary: e }) => {
1413
+ }) }), bs = ({ store: e, openQuestion: t }) => {
1414
+ const n = C(e);
1415
+ return n != null && n.data ? /* @__PURE__ */ s(Ls, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1416
+ }, ws = ({ userSummary: e }) => {
1409
1417
  var t, n;
1410
- const i = k(e.getStore());
1418
+ const i = C(e.getStore());
1411
1419
  return (t = i.data) != null && t.summary ? /* @__PURE__ */ s(ze, { ...i.data.summary, successRate: (n = i.data.percentage) == null ? void 0 : n.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1412
1420
  }, Es = ({
1413
1421
  gamification: e
@@ -1433,11 +1441,11 @@ const ns = /* @__PURE__ */ r("div")({
1433
1441
  style: {
1434
1442
  paddingTop: "12px"
1435
1443
  },
1436
- children: /* @__PURE__ */ s(Ls, {
1444
+ children: /* @__PURE__ */ s(ws, {
1437
1445
  userSummary: e.userSummary
1438
1446
  })
1439
1447
  }), /* @__PURE__ */ s(_e, {
1440
- children: /* @__PURE__ */ s(ws, {
1448
+ children: /* @__PURE__ */ s(bs, {
1441
1449
  openQuestion: e.openQuestion,
1442
1450
  store: e.feedList.getStore()
1443
1451
  })
@@ -1467,11 +1475,11 @@ const ns = /* @__PURE__ */ r("div")({
1467
1475
  gamification: e,
1468
1476
  className: t
1469
1477
  }) => {
1470
- const n = k(e.openedQuestion.$store), i = k(e.openedUser);
1471
- return /* @__PURE__ */ m(w, {
1478
+ const n = C(e.openedQuestion.$store), i = C(e.openedUser);
1479
+ return /* @__PURE__ */ m($, {
1472
1480
  children: [n && /* @__PURE__ */ s(ve, {
1473
1481
  className: t,
1474
- children: /* @__PURE__ */ s(Ln, {
1482
+ children: /* @__PURE__ */ s(wn, {
1475
1483
  gamification: e
1476
1484
  })
1477
1485
  }), i && /* @__PURE__ */ s(ve, {