@streamlayer/react 0.32.5 → 0.32.6

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,5 +1,5 @@
1
1
  import { jsxs as f, jsx as r, Fragment as R } from "react/jsx-runtime";
2
- import { s as a, n as j, Q as x, o as Se, a as L, b as P, d as ze, E as b, r as se, w as Ve, u as $, A as Fe, O as Be, P as V, c as ee, e as He, f as Ge } from "./masters.js";
2
+ import { s as a, n as j, Q as x, o as Se, a as L, b as P, d as ze, E as b, r as ie, w as Ve, u as $, A as Fe, O as Be, P as V, c as ee, e as He, f as Ge } from "./masters.js";
3
3
  import _, { useRef as w, useState as Q, useCallback as q, useEffect as xe, useLayoutEffect as Ze, useMemo as C, createElement as Z, PureComponent as Oe } from "react";
4
4
  const Je = /* @__PURE__ */ a("div")({
5
5
  name: "Container",
@@ -21,25 +21,25 @@ const Je = /* @__PURE__ */ a("div")({
21
21
  name: "CloseButton",
22
22
  class: "c1ao1jtv",
23
23
  propsAsIs: !1
24
- }), st = () => j, it = /* @__PURE__ */ a(st())({
24
+ }), it = () => j, st = /* @__PURE__ */ a(it())({
25
25
  name: "CloseIcon",
26
26
  class: "cvsl7l3",
27
27
  propsAsIs: !0
28
28
  }), je = ({ type: e, close: t, label: n }) => {
29
- const s = e ? Se[e] : { label: n, iconName: void 0 };
29
+ const i = e ? Se[e] : { label: n, iconName: void 0 };
30
30
  return /* @__PURE__ */ f(Je, { children: [
31
31
  /* @__PURE__ */ f(Ke, { children: [
32
- (s == null ? void 0 : s.iconName) && /* @__PURE__ */ r(
32
+ (i == null ? void 0 : i.iconName) && /* @__PURE__ */ r(
33
33
  et,
34
34
  {
35
35
  "data-type-trivia": e === x.TRIVIA,
36
36
  "data-type-poll": e === x.POLL,
37
- name: s.iconName
37
+ name: i.iconName
38
38
  }
39
39
  ),
40
- (s == null ? void 0 : s.label) && /* @__PURE__ */ r(tt, { children: s.label })
40
+ (i == null ? void 0 : i.label) && /* @__PURE__ */ r(tt, { children: i.label })
41
41
  ] }),
42
- /* @__PURE__ */ r(nt, { onClick: t, children: /* @__PURE__ */ r(it, { name: "icon-cross" }) })
42
+ /* @__PURE__ */ r(nt, { onClick: t, children: /* @__PURE__ */ r(st, { name: "icon-cross" }) })
43
43
  ] });
44
44
  }, ke = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), we = (e) => e ? e.toLocaleString("en-US") : "0", rt = (e) => e.toLocaleDateString("en-US", {
45
45
  weekday: "short",
@@ -150,8 +150,8 @@ const Je = /* @__PURE__ */ a("div")({
150
150
  avatar: e,
151
151
  name: t,
152
152
  points: n,
153
- friendsRank: s,
154
- rank: i,
153
+ friendsRank: i,
154
+ rank: s,
155
155
  streak: l,
156
156
  correct: c,
157
157
  incorrect: m,
@@ -184,8 +184,8 @@ const Je = /* @__PURE__ */ a("div")({
184
184
  ] }) }),
185
185
  /* @__PURE__ */ f(ft, { children: [
186
186
  /* @__PURE__ */ f(xt, { children: [
187
- /* @__PURE__ */ r(le, { indicator: s || 0, title: "Friends rank" }),
188
- /* @__PURE__ */ r(le, { indicator: i || 0, title: "Global rank" })
187
+ /* @__PURE__ */ r(le, { indicator: i || 0, title: "Friends rank" }),
188
+ /* @__PURE__ */ r(le, { indicator: s || 0, title: "Global rank" })
189
189
  ] }),
190
190
  /* @__PURE__ */ f(Ot, { children: [
191
191
  /* @__PURE__ */ r(F, { indicator: l || 0, title: "Win streak" }),
@@ -254,16 +254,16 @@ const Je = /* @__PURE__ */ a("div")({
254
254
  feedbackMessages: e,
255
255
  questionVotedCorrectly: t,
256
256
  questionVoted: n,
257
- questionType: s,
258
- hasCorrectAnswer: i,
257
+ questionType: i,
258
+ hasCorrectAnswer: s,
259
259
  questionStatus: l
260
260
  }) => {
261
- const c = n && (s === x.TRIVIA || s === x.PREDICTION);
262
- if (!c && l !== L.RESOLVED || l === L.RESOLVED && s === x.PREDICTION && !n)
261
+ const c = n && (i === x.TRIVIA || i === x.PREDICTION);
262
+ if (!c && l !== L.RESOLVED || l === L.RESOLVED && i === x.PREDICTION && !n)
263
263
  return null;
264
- const m = s === x.PREDICTION && !i, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
264
+ const m = i === x.PREDICTION && !s, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
265
265
  return /* @__PURE__ */ f(Pt, { "data-isPrediction": m, children: [
266
- l === L.RESOLVED && s === x.TRIVIA && !n && /* @__PURE__ */ f(R, { children: [
266
+ l === L.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ f(R, { children: [
267
267
  /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(j, { name: "questionExpired" }) }),
268
268
  /* @__PURE__ */ f("div", { children: [
269
269
  /* @__PURE__ */ r(de, { children: /* @__PURE__ */ r(J, { children: "Question Expired" }) }),
@@ -274,7 +274,7 @@ const Je = /* @__PURE__ */ a("div")({
274
274
  /* @__PURE__ */ r(qt, { name: "icon-prediction" }),
275
275
  /* @__PURE__ */ r(J, { children: "Stay tuned to see if your prediction was correct." })
276
276
  ] }),
277
- c && i && /* @__PURE__ */ f(R, { children: [
277
+ c && s && /* @__PURE__ */ f(R, { children: [
278
278
  /* @__PURE__ */ r(ce, { "data-feedbackType": u, children: /* @__PURE__ */ r(j, { name: u }) }),
279
279
  /* @__PURE__ */ r("div", { children: /* @__PURE__ */ f(de, { children: [
280
280
  /* @__PURE__ */ r(Yt, { "data-feedbackType": u, children: h == null ? void 0 : h.title }),
@@ -352,29 +352,29 @@ const Je = /* @__PURE__ */ a("div")({
352
352
  [P.ROUNDED]: (e) => /* @__PURE__ */ r(rn, { alt: "option-icon", src: e }),
353
353
  [P.NONE]: () => null,
354
354
  [P.UNSET]: () => null
355
- }, un = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: s, questionVoted: i }) => {
356
- if (e === x.POLL && s)
355
+ }, un = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: s }) => {
356
+ if (e === x.POLL && i)
357
357
  return "correct";
358
358
  if (e === x.PREDICTION) {
359
- if (t && i)
360
- return s ? n ? "correct" : "incorrect" : "unset";
361
- if (s)
359
+ if (t && s)
360
+ return i ? n ? "correct" : "incorrect" : "unset";
361
+ if (i)
362
362
  return "correct";
363
363
  }
364
- return e === x.TRIVIA && i && s ? n ? "correct" : "incorrect" : "unset";
364
+ return e === x.TRIVIA && s && i ? n ? "correct" : "incorrect" : "unset";
365
365
  }, pn = ({
366
366
  questionType: e,
367
367
  questionVoted: t,
368
368
  correct: n,
369
- hasCorrectAnswer: s,
370
- questionStatus: i
371
- }) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && s || i === L.RESOLVED && n : !1, mn = (e) => {
369
+ hasCorrectAnswer: i,
370
+ questionStatus: s
371
+ }) => e === x.TRIVIA ? t && n : e === x.PREDICTION ? t && n && i || s === L.RESOLVED && n : !1, mn = (e) => {
372
372
  var t;
373
373
  const {
374
374
  // option props
375
375
  id: n,
376
- icon: s,
377
- text: i,
376
+ icon: i,
377
+ text: s,
378
378
  percentageDecimal: l,
379
379
  // extra props
380
380
  onVote: c,
@@ -401,8 +401,8 @@ const Je = /* @__PURE__ */ a("div")({
401
401
  children: [
402
402
  /* @__PURE__ */ r(Jt, { "data-answerState": d, style: { width: `${g ? l : 0}%` } }),
403
403
  /* @__PURE__ */ f(Kt, { children: [
404
- s && h && ((t = ue[h]) == null ? void 0 : t.call(ue, s)),
405
- /* @__PURE__ */ r(on, { children: i }),
404
+ i && h && ((t = ue[h]) == null ? void 0 : t.call(ue, i)),
405
+ /* @__PURE__ */ r(on, { children: s }),
406
406
  g && /* @__PURE__ */ f(an, { children: [
407
407
  p && /* @__PURE__ */ r(dn, { name: "selected" }),
408
408
  /* @__PURE__ */ r(ln, { children: /* @__PURE__ */ r(ze, { value: l, suffix: "%" }) })
@@ -412,7 +412,7 @@ const Je = /* @__PURE__ */ a("div")({
412
412
  }
413
413
  );
414
414
  };
415
- var pe = typeof window > "u" ? xe : Ze, hn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: s = 0, onComplete: i, onUpdate: l }) => {
415
+ var pe = typeof window > "u" ? xe : Ze, hn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: i = 0, onComplete: s, onUpdate: l }) => {
416
416
  let [c, m] = Q(n), u = w(0), h = w(n), N = w(n * -1e3), M = w(null), v = w(null), T = w(null), D = (p) => {
417
417
  let I = p / 1e3;
418
418
  if (v.current === null) {
@@ -421,7 +421,7 @@ var pe = typeof window > "u" ? xe : Ze, hn = ({ isPlaying: e, duration: t, start
421
421
  }
422
422
  let g = I - v.current, S = u.current + g;
423
423
  v.current = I, u.current = S;
424
- let y = h.current + (s === 0 ? S : (S / s | 0) * s), z = h.current + S, A = typeof t == "number" && z >= t;
424
+ let y = h.current + (i === 0 ? S : (S / i | 0) * i), z = h.current + S, A = typeof t == "number" && z >= t;
425
425
  m(A ? t : y), A || (M.current = requestAnimationFrame(D));
426
426
  }, o = () => {
427
427
  M.current && cancelAnimationFrame(M.current), T.current && clearTimeout(T.current), v.current = null;
@@ -433,35 +433,35 @@ var pe = typeof window > "u" ? xe : Ze, hn = ({ isPlaying: e, duration: t, start
433
433
  return pe(() => {
434
434
  if (l == null || l(c), t && c >= t) {
435
435
  N.current += t * 1e3;
436
- let { shouldRepeat: p = !1, delay: I = 0, newStartAt: g } = (i == null ? void 0 : i(N.current / 1e3)) || {};
436
+ let { shouldRepeat: p = !1, delay: I = 0, newStartAt: g } = (s == null ? void 0 : s(N.current / 1e3)) || {};
437
437
  p && (T.current = setTimeout(() => d(g), I * 1e3));
438
438
  }
439
- }, [c, t]), pe(() => (e && (M.current = requestAnimationFrame(D)), o), [e, t, s]), { elapsedTime: c, reset: d };
439
+ }, [c, t]), pe(() => (e && (M.current = requestAnimationFrame(D)), o), [e, t, i]), { elapsedTime: c, reset: d };
440
440
  }, In = (e, t, n) => {
441
- let s = e / 2, i = t / 2, l = s - i, c = 2 * l, m = n === "clockwise" ? "1,0" : "0,1", u = 2 * Math.PI * l;
442
- return { path: `m ${s},${i} a ${l},${l} 0 ${m} 0,${c} a ${l},${l} 0 ${m} 0,-${c}`, pathLength: u };
443
- }, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, fn = (e) => ({ position: "relative", width: e, height: e }), gn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Le = (e, t, n, s, i) => {
444
- if (s === 0)
441
+ let i = e / 2, s = t / 2, l = i - s, c = 2 * l, m = n === "clockwise" ? "1,0" : "0,1", u = 2 * Math.PI * l;
442
+ return { path: `m ${i},${s} a ${l},${l} 0 ${m} 0,${c} a ${l},${l} 0 ${m} 0,-${c}`, pathLength: u };
443
+ }, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, fn = (e) => ({ position: "relative", width: e, height: e }), gn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Le = (e, t, n, i, s) => {
444
+ if (i === 0)
445
445
  return t;
446
- let l = (i ? s - e : e) / s;
446
+ let l = (s ? i - e : e) / i;
447
447
  return t + n * l;
448
448
  }, he = (e) => {
449
449
  var t, n;
450
- return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (s, i, l, c) => `#${i}${i}${l}${l}${c}${c}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((s) => parseInt(s, 16))) != null ? n : [];
450
+ return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, s, l, c) => `#${s}${s}${l}${l}${c}${c}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((i) => parseInt(i, 16))) != null ? n : [];
451
451
  }, vn = (e, t) => {
452
452
  var n;
453
- let { colors: s, colorsTime: i, isSmoothColorTransition: l = !0 } = e;
454
- if (typeof s == "string")
455
- return s;
456
- let c = (n = i == null ? void 0 : i.findIndex((v, T) => v >= t && t >= i[T + 1])) != null ? n : -1;
457
- if (!i || c === -1)
458
- return s[0];
453
+ let { colors: i, colorsTime: s, isSmoothColorTransition: l = !0 } = e;
454
+ if (typeof i == "string")
455
+ return i;
456
+ let c = (n = s == null ? void 0 : s.findIndex((v, T) => v >= t && t >= s[T + 1])) != null ? n : -1;
457
+ if (!s || c === -1)
458
+ return i[0];
459
459
  if (!l)
460
- return s[c];
461
- let m = i[c] - t, u = i[c] - i[c + 1], h = he(s[c]), N = he(s[c + 1]), M = !!e.isGrowing;
460
+ return i[c];
461
+ let m = s[c] - t, u = s[c] - s[c + 1], h = he(i[c]), N = he(i[c + 1]), M = !!e.isGrowing;
462
462
  return `rgb(${h.map((v, T) => Le(m, v, N[T] - v, u, M) | 0).join(",")})`;
463
463
  }, Mn = (e) => {
464
- let { duration: t, initialRemainingTime: n, updateInterval: s, size: i = 180, strokeWidth: l = 12, trailStrokeWidth: c, isPlaying: m = !1, isGrowing: u = !1, rotation: h = "clockwise", onComplete: N, onUpdate: M } = e, v = w(), T = Math.max(l, c ?? 0), { path: D, pathLength: o } = In(i, T, h), { elapsedTime: d } = hn({ isPlaying: m, duration: t, startAt: me(t, n), updateInterval: s, onUpdate: typeof M == "function" ? (I) => {
464
+ let { duration: t, initialRemainingTime: n, updateInterval: i, size: s = 180, strokeWidth: l = 12, trailStrokeWidth: c, isPlaying: m = !1, isGrowing: u = !1, rotation: h = "clockwise", onComplete: N, onUpdate: M } = e, v = w(), T = Math.max(l, c ?? 0), { path: D, pathLength: o } = In(s, T, h), { elapsedTime: d } = hn({ isPlaying: m, duration: t, startAt: me(t, n), updateInterval: i, onUpdate: typeof M == "function" ? (I) => {
465
465
  let g = Math.ceil(t - I);
466
466
  g !== v.current && (v.current = g, M(g));
467
467
  } : void 0, onComplete: typeof N == "function" ? (I) => {
@@ -470,10 +470,10 @@ var pe = typeof window > "u" ? xe : Ze, hn = ({ isPlaying: e, duration: t, start
470
470
  if (S)
471
471
  return { shouldRepeat: S, delay: y, newStartAt: me(t, z) };
472
472
  } : void 0 }), p = t - d;
473
- return { elapsedTime: d, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: h, size: i, stroke: vn(e, p), strokeDashoffset: Le(d, 0, o, t, u), strokeWidth: l };
473
+ return { elapsedTime: d, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: h, size: s, stroke: vn(e, p), strokeDashoffset: Le(d, 0, o, t, u), strokeWidth: l };
474
474
  }, $e = (e) => {
475
- let { children: t, strokeLinecap: n, trailColor: s, trailStrokeWidth: i } = e, { path: l, pathLength: c, stroke: m, strokeDashoffset: u, remainingTime: h, elapsedTime: N, size: M, strokeWidth: v } = Mn(e);
476
- return _.createElement("div", { style: fn(M) }, _.createElement("svg", { viewBox: `0 0 ${M} ${M}`, width: M, height: M, xmlns: "http://www.w3.org/2000/svg" }, _.createElement("path", { d: l, fill: "none", stroke: s ?? "#d9d9d9", strokeWidth: i ?? v }), _.createElement("path", { d: l, fill: "none", stroke: m, strokeLinecap: n ?? "round", strokeWidth: v, strokeDasharray: c, strokeDashoffset: u })), typeof t == "function" && _.createElement("div", { style: gn }, t({ remainingTime: h, elapsedTime: N, color: m })));
475
+ let { children: t, strokeLinecap: n, trailColor: i, trailStrokeWidth: s } = e, { path: l, pathLength: c, stroke: m, strokeDashoffset: u, remainingTime: h, elapsedTime: N, size: M, strokeWidth: v } = Mn(e);
476
+ return _.createElement("div", { style: fn(M) }, _.createElement("svg", { viewBox: `0 0 ${M} ${M}`, width: M, height: M, xmlns: "http://www.w3.org/2000/svg" }, _.createElement("path", { d: l, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: s ?? v }), _.createElement("path", { d: l, fill: "none", stroke: m, strokeLinecap: n ?? "round", strokeWidth: v, strokeDasharray: c, strokeDashoffset: u })), typeof t == "function" && _.createElement("div", { style: gn }, t({ remainingTime: h, elapsedTime: N, color: m })));
477
477
  };
478
478
  $e.displayName = "CountdownCircleTimer";
479
479
  const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRAY3], Nn = [10, 10, 1, 0], Tn = /* @__PURE__ */ a("div")({
@@ -485,15 +485,15 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
485
485
  duration: t = 30,
486
486
  onTimerExpired: n
487
487
  }) => {
488
- const [s, i] = Q(t > 10 ? An : Ie), l = ({
488
+ const [i, s] = Q(t > 10 ? An : Ie), l = ({
489
489
  remainingTime: u
490
490
  }) => /* @__PURE__ */ r(Tn, {
491
491
  children: u
492
492
  }), c = q(() => {
493
- n == null || n(), i(Dn);
494
- }, [n, i]), m = q((u) => {
495
- u === 10 && i(Ie);
496
- }, [i]);
493
+ n == null || n(), s(Dn);
494
+ }, [n, s]), m = q((u) => {
495
+ u === 10 && s(Ie);
496
+ }, [s]);
497
497
  return /* @__PURE__ */ r($e, {
498
498
  isPlaying: e,
499
499
  duration: t,
@@ -502,7 +502,7 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
502
502
  size: 32,
503
503
  strokeWidth: 2,
504
504
  trailStrokeWidth: 2,
505
- trailColor: s,
505
+ trailColor: i,
506
506
  onComplete: c,
507
507
  onUpdate: m,
508
508
  children: l
@@ -539,14 +539,14 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
539
539
  title: e,
540
540
  points: t,
541
541
  isPlayingTimer: n,
542
- isTimer: s,
543
- questionType: i,
542
+ isTimer: i,
543
+ questionType: s,
544
544
  timerDuration: l,
545
545
  onTimerExpired: c
546
546
  }) => /* @__PURE__ */ f(zn, { children: [
547
547
  /* @__PURE__ */ f(xn, { children: [
548
548
  e && /* @__PURE__ */ r(On, { children: e }),
549
- t !== void 0 && i !== x.POLL && /* @__PURE__ */ f(R, { children: [
549
+ t !== void 0 && s !== x.POLL && /* @__PURE__ */ f(R, { children: [
550
550
  /* @__PURE__ */ r(kn, { name: "icon-trophy" }),
551
551
  /* @__PURE__ */ f(wn, { children: [
552
552
  /* @__PURE__ */ r(Cn, { children: /* @__PURE__ */ r(ze, { value: t }) }),
@@ -554,10 +554,10 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
554
554
  ] })
555
555
  ] })
556
556
  ] }),
557
- s && /* @__PURE__ */ r(Sn, { isPlaying: n, onTimerExpired: c, duration: l })
558
- ] }), $n = ({ openedQuestion: e, isLoading: t, vote: n, close: s }) => {
559
- var i, l;
560
- const c = e.subject, m = e.type, u = (i = e.options) == null ? void 0 : i.options, [h, N] = Q(!1), [M, v] = Q(""), T = e == null ? void 0 : e.id, D = q(
557
+ i && /* @__PURE__ */ r(Sn, { isPlaying: n, onTimerExpired: c, duration: l })
558
+ ] }), $n = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
559
+ var s, l;
560
+ const c = e.subject, m = e.type, u = (s = e.options) == null ? void 0 : s.options, [h, N] = Q(!1), [M, v] = Q(""), T = e == null ? void 0 : e.id, D = q(
561
561
  async (A) => {
562
562
  if (T) {
563
563
  const O = A.currentTarget.value;
@@ -566,8 +566,8 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
566
566
  },
567
567
  [T, v, n]
568
568
  ), o = q(() => {
569
- N(!0), setTimeout(s, 3e3);
570
- }, [s]), d = C(
569
+ N(!0), setTimeout(i, 3e3);
570
+ }, [i]), d = C(
571
571
  () => e == null ? void 0 : e.answers.find((A) => A.youVoted === !0),
572
572
  [e]
573
573
  ), p = C(
@@ -597,7 +597,7 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
597
597
  if (!h)
598
598
  return d ? d.correct ? d.points : 0 : I == null ? void 0 : I.points;
599
599
  }, [h, d, I, e.status]), z = C(() => h ? "Time expired" : e.type === x.POLL ? "Time remaining" : d ? "You won" : "To win", [h, e.type, d]);
600
- return /* @__PURE__ */ r(se, { "data-question-header": "true", children: /* @__PURE__ */ r(Ft, { children: /* @__PURE__ */ f(Bt, { children: [
600
+ return /* @__PURE__ */ r(ie, { "data-question-header": "true", children: /* @__PURE__ */ r(Ft, { children: /* @__PURE__ */ f(Bt, { children: [
601
601
  S && /* @__PURE__ */ r(
602
602
  Vt,
603
603
  {
@@ -656,8 +656,8 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
656
656
  name: "Image",
657
657
  class: "i1gfjeu5",
658
658
  propsAsIs: !1
659
- }), Ee = ({ created: e, image: t, title: n, instantView: s }) => {
660
- const i = C(() => {
659
+ }), Ee = ({ created: e, image: t, title: n, instantView: i }) => {
660
+ const s = C(() => {
661
661
  if (e) {
662
662
  const c = new Date(e);
663
663
  if (at(c))
@@ -667,18 +667,18 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
667
667
  };
668
668
  }
669
669
  return null;
670
- }, [e]), l = (s == null ? void 0 : s.image) || t;
670
+ }, [e]), l = (i == null ? void 0 : i.image) || t;
671
671
  return /* @__PURE__ */ f(En, { children: [
672
- i && /* @__PURE__ */ f(Pn, { children: [
673
- i.date,
672
+ s && /* @__PURE__ */ f(Pn, { children: [
673
+ s.date,
674
674
  " · ",
675
- i.time
675
+ s.time
676
676
  ] }),
677
- (s == null ? void 0 : s.video) && /* @__PURE__ */ r(Ve, { source: s.video.url, poster: s.video.thumbnailUrl }),
678
- l && /* @__PURE__ */ r(_n, { src: l }),
677
+ (i == null ? void 0 : i.video) && /* @__PURE__ */ r(Ve, { source: i.video.url, poster: i.video.thumbnailUrl }),
678
+ l && !(i != null && i.video) && /* @__PURE__ */ r(_n, { src: l }),
679
679
  /* @__PURE__ */ f(Rn, { children: [
680
- /* @__PURE__ */ r(Qn, { children: (s == null ? void 0 : s.heading) || n }),
681
- /* @__PURE__ */ r(Un, { children: s == null ? void 0 : s.body })
680
+ /* @__PURE__ */ r(Qn, { children: (i == null ? void 0 : i.heading) || n }),
681
+ /* @__PURE__ */ r(Un, { children: i == null ? void 0 : i.body })
682
682
  ] })
683
683
  ] });
684
684
  }, qn = /* @__PURE__ */ a("div")({
@@ -713,32 +713,32 @@ const yn = [b.PRIMARY_GREEN1, b.SECONDARY_RED1, b.SECONDARY_RED1, b.NEUTRALS_GRA
713
713
  close: n
714
714
  }) => {
715
715
  const {
716
- loading: s,
717
- data: i
716
+ loading: i,
717
+ data: s
718
718
  } = e;
719
- return i ? /* @__PURE__ */ r($n, {
719
+ return s ? /* @__PURE__ */ r($n, {
720
720
  vote: t,
721
721
  close: n,
722
- openedQuestion: i,
723
- isLoading: !!s
722
+ openedQuestion: s,
723
+ isLoading: !!i
724
724
  }) : null;
725
725
  }, Hn = ({
726
726
  gamification: e
727
727
  }) => {
728
728
  var t;
729
- const n = $(e.openedQuestion.$store), s = $(e.openedQuestion.$extendedStore);
729
+ const n = $(e.openedQuestion.$store), i = $(e.openedQuestion.$extendedStore);
730
730
  if (!n)
731
731
  return null;
732
- const i = n.type;
732
+ const s = n.type;
733
733
  return /* @__PURE__ */ f(Vn, {
734
734
  children: [/* @__PURE__ */ r(je, {
735
735
  close: e.closeQuestion,
736
736
  type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
737
- }), i === "question" && /* @__PURE__ */ r(Bn, {
737
+ }), s === "question" && /* @__PURE__ */ r(Bn, {
738
738
  vote: e.submitAnswer,
739
739
  close: e.closeQuestion,
740
- extendedQuestion: s
741
- }), i !== "question" && /* @__PURE__ */ r(Fn, {
740
+ extendedQuestion: i
741
+ }), s !== "question" && /* @__PURE__ */ r(Fn, {
742
742
  openedQuestion: n
743
743
  }), /* @__PURE__ */ r($t, {
744
744
  sponsorLogo: ""
@@ -783,8 +783,8 @@ function te() {
783
783
  return te = Object.assign ? Object.assign.bind() : function(e) {
784
784
  for (var t = 1; t < arguments.length; t++) {
785
785
  var n = arguments[t];
786
- for (var s in n)
787
- Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]);
786
+ for (var i in n)
787
+ Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
788
788
  }
789
789
  return e;
790
790
  }, te.apply(this, arguments);
@@ -795,38 +795,38 @@ function ge(e) {
795
795
  return e;
796
796
  }
797
797
  function ne(e, t) {
798
- return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, i) {
799
- return s.__proto__ = i, s;
798
+ return ne = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
799
+ return i.__proto__ = s, i;
800
800
  }, ne(e, t);
801
801
  }
802
- function es(e, t) {
802
+ function ei(e, t) {
803
803
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ne(e, t);
804
804
  }
805
805
  var ve = Number.isNaN || function(t) {
806
806
  return typeof t == "number" && t !== t;
807
807
  };
808
- function ts(e, t) {
808
+ function ti(e, t) {
809
809
  return !!(e === t || ve(e) && ve(t));
810
810
  }
811
- function ns(e, t) {
811
+ function ni(e, t) {
812
812
  if (e.length !== t.length)
813
813
  return !1;
814
814
  for (var n = 0; n < e.length; n++)
815
- if (!ts(e[n], t[n]))
815
+ if (!ti(e[n], t[n]))
816
816
  return !1;
817
817
  return !0;
818
818
  }
819
819
  function K(e, t) {
820
- t === void 0 && (t = ns);
821
- var n, s = [], i, l = !1;
820
+ t === void 0 && (t = ni);
821
+ var n, i = [], s, l = !1;
822
822
  function c() {
823
823
  for (var m = [], u = 0; u < arguments.length; u++)
824
824
  m[u] = arguments[u];
825
- return l && n === this && t(m, s) || (i = e.apply(this, m), l = !0, n = this, s = m), i;
825
+ return l && n === this && t(m, i) || (s = e.apply(this, m), l = !0, n = this, i = m), s;
826
826
  }
827
827
  return c;
828
828
  }
829
- var ss = typeof performance == "object" && typeof performance.now == "function", Me = ss ? function() {
829
+ var ii = typeof performance == "object" && typeof performance.now == "function", Me = ii ? function() {
830
830
  return performance.now();
831
831
  } : function() {
832
832
  return Date.now();
@@ -834,15 +834,15 @@ var ss = typeof performance == "object" && typeof performance.now == "function",
834
834
  function ye(e) {
835
835
  cancelAnimationFrame(e.id);
836
836
  }
837
- function is(e, t) {
837
+ function si(e, t) {
838
838
  var n = Me();
839
- function s() {
840
- Me() - n >= t ? e.call(null) : i.id = requestAnimationFrame(s);
839
+ function i() {
840
+ Me() - n >= t ? e.call(null) : s.id = requestAnimationFrame(i);
841
841
  }
842
- var i = {
843
- id: requestAnimationFrame(s)
842
+ var s = {
843
+ id: requestAnimationFrame(i)
844
844
  };
845
- return i;
845
+ return s;
846
846
  }
847
847
  var X = -1;
848
848
  function Ne(e) {
@@ -857,18 +857,18 @@ function Te(e) {
857
857
  if (e === void 0 && (e = !1), E === null || e) {
858
858
  var t = document.createElement("div"), n = t.style;
859
859
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
860
- var s = document.createElement("div"), i = s.style;
861
- return i.width = "100px", i.height = "100px", t.appendChild(s), 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;
860
+ var i = document.createElement("div"), s = i.style;
861
+ return s.width = "100px", s.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;
862
862
  }
863
863
  return E;
864
864
  }
865
- var rs = 150, os = function(t, n) {
865
+ var ri = 150, oi = function(t, n) {
866
866
  return t;
867
867
  };
868
- function as(e) {
869
- var t, n = e.getItemOffset, s = e.getEstimatedTotalSize, i = e.getItemSize, l = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, u = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, N = e.validateProps;
868
+ function ai(e) {
869
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, s = e.getItemSize, l = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, u = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, N = e.validateProps;
870
870
  return t = /* @__PURE__ */ function(M) {
871
- es(v, M);
871
+ ei(v, M);
872
872
  function v(D) {
873
873
  var o;
874
874
  return o = M.call(this, D) || this, o._instanceProps = u(o.props, ge(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
@@ -895,7 +895,7 @@ function as(e) {
895
895
  if (y.hasOwnProperty(d))
896
896
  z = y[d];
897
897
  else {
898
- var A = n(o.props, d, o._instanceProps), O = i(o.props, d, o._instanceProps), k = I === "horizontal" || S === "horizontal", Y = I === "rtl", W = k ? A : 0;
898
+ var A = n(o.props, d, o._instanceProps), O = s(o.props, d, o._instanceProps), k = I === "horizontal" || S === "horizontal", Y = I === "rtl", W = k ? A : 0;
899
899
  y[d] = z = {
900
900
  position: "absolute",
901
901
  left: Y ? void 0 : W,
@@ -947,7 +947,7 @@ function as(e) {
947
947
  var p = o.props.outerRef;
948
948
  o._outerRef = d, typeof p == "function" ? p(d) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = d);
949
949
  }, o._resetIsScrollingDebounced = function() {
950
- o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = is(o._resetIsScrolling, rs);
950
+ o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = si(o._resetIsScrolling, ri);
951
951
  }, o._resetIsScrolling = function() {
952
952
  o._resetIsScrollingTimeoutId = null, o.setState({
953
953
  isScrolling: !1
@@ -957,7 +957,7 @@ function as(e) {
957
957
  }, o;
958
958
  }
959
959
  v.getDerivedStateFromProps = function(o, d) {
960
- return ls(o, d), N(o), null;
960
+ return li(o, d), N(o), null;
961
961
  };
962
962
  var T = v.prototype;
963
963
  return T.scrollTo = function(o) {
@@ -1012,17 +1012,17 @@ function as(e) {
1012
1012
  }, T.componentWillUnmount = function() {
1013
1013
  this._resetIsScrollingTimeoutId !== null && ye(this._resetIsScrollingTimeoutId);
1014
1014
  }, T.render = function() {
1015
- var o = this.props, d = o.children, p = o.className, I = o.direction, g = o.height, S = o.innerRef, y = o.innerElementType, z = o.innerTagName, A = o.itemCount, O = o.itemData, k = o.itemKey, Y = k === void 0 ? os : k, W = o.layout, Re = o.outerElementType, Qe = o.outerTagName, Ue = o.style, Pe = o.useIsScrolling, _e = o.width, ie = this.state.isScrolling, G = I === "horizontal" || W === "horizontal", qe = G ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), Ye = re[0], We = re[1], oe = [];
1015
+ var o = this.props, d = o.children, p = o.className, I = o.direction, g = o.height, S = o.innerRef, y = o.innerElementType, z = o.innerTagName, A = o.itemCount, O = o.itemData, k = o.itemKey, Y = k === void 0 ? oi : k, W = o.layout, Re = o.outerElementType, Qe = o.outerTagName, Ue = o.style, Pe = o.useIsScrolling, _e = o.width, se = this.state.isScrolling, G = I === "horizontal" || W === "horizontal", qe = G ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), Ye = re[0], We = re[1], oe = [];
1016
1016
  if (A > 0)
1017
1017
  for (var U = Ye; U <= We; U++)
1018
1018
  oe.push(Z(d, {
1019
1019
  data: O,
1020
1020
  key: Y(U, O),
1021
1021
  index: U,
1022
- isScrolling: Pe ? ie : void 0,
1022
+ isScrolling: Pe ? se : void 0,
1023
1023
  style: this._getItemStyle(U)
1024
1024
  }));
1025
- var ae = s(this.props, this._instanceProps);
1025
+ var ae = i(this.props, this._instanceProps);
1026
1026
  return Z(Re || Qe || "div", {
1027
1027
  className: p,
1028
1028
  onScroll: qe,
@@ -1041,7 +1041,7 @@ function as(e) {
1041
1041
  ref: S,
1042
1042
  style: {
1043
1043
  height: G ? "100%" : ae,
1044
- pointerEvents: ie ? "none" : void 0,
1044
+ pointerEvents: se ? "none" : void 0,
1045
1045
  width: G ? ae : "100%"
1046
1046
  }
1047
1047
  }));
@@ -1072,24 +1072,24 @@ function as(e) {
1072
1072
  useIsScrolling: !1
1073
1073
  }, t;
1074
1074
  }
1075
- var ls = function(t, n) {
1075
+ var li = function(t, n) {
1076
1076
  t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
1077
- }, cs = /* @__PURE__ */ as({
1077
+ }, ci = /* @__PURE__ */ ai({
1078
1078
  getItemOffset: function(t, n) {
1079
- var s = t.itemSize;
1080
- return n * s;
1079
+ var i = t.itemSize;
1080
+ return n * i;
1081
1081
  },
1082
1082
  getItemSize: function(t, n) {
1083
- var s = t.itemSize;
1084
- return s;
1083
+ var i = t.itemSize;
1084
+ return i;
1085
1085
  },
1086
1086
  getEstimatedTotalSize: function(t) {
1087
- var n = t.itemCount, s = t.itemSize;
1088
- return s * n;
1087
+ var n = t.itemCount, i = t.itemSize;
1088
+ return i * n;
1089
1089
  },
1090
- getOffsetForIndexAndAlignment: function(t, n, s, i, l, c) {
1090
+ getOffsetForIndexAndAlignment: function(t, n, i, s, l, c) {
1091
1091
  var m = t.direction, u = t.height, h = t.itemCount, N = t.itemSize, M = t.layout, v = t.width, T = m === "horizontal" || M === "horizontal", D = T ? v : u, o = Math.max(0, h * N - D), d = Math.min(o, n * N), p = Math.max(0, n * N - D + N + c);
1092
- switch (s === "smart" && (i >= p - D && i <= d + D ? s = "auto" : s = "center"), s) {
1092
+ switch (i === "smart" && (s >= p - D && s <= d + D ? i = "auto" : i = "center"), i) {
1093
1093
  case "start":
1094
1094
  return d;
1095
1095
  case "end":
@@ -1100,15 +1100,15 @@ var ls = function(t, n) {
1100
1100
  }
1101
1101
  case "auto":
1102
1102
  default:
1103
- return i >= p && i <= d ? i : i < p ? p : d;
1103
+ return s >= p && s <= d ? s : s < p ? p : d;
1104
1104
  }
1105
1105
  },
1106
1106
  getStartIndexForOffset: function(t, n) {
1107
- var s = t.itemCount, i = t.itemSize;
1108
- return Math.max(0, Math.min(s - 1, Math.floor(n / i)));
1107
+ var i = t.itemCount, s = t.itemSize;
1108
+ return Math.max(0, Math.min(i - 1, Math.floor(n / s)));
1109
1109
  },
1110
- getStopIndexForStartIndex: function(t, n, s) {
1111
- var i = t.direction, l = t.height, c = t.itemCount, m = t.itemSize, u = t.layout, h = t.width, N = i === "horizontal" || u === "horizontal", M = n * m, v = N ? h : l, T = Math.ceil((v + s - M) / m);
1110
+ getStopIndexForStartIndex: function(t, n, i) {
1111
+ var s = t.direction, l = t.height, c = t.itemCount, m = t.itemSize, u = t.layout, h = t.width, N = s === "horizontal" || u === "horizontal", M = n * m, v = N ? h : l, T = Math.ceil((v + i - M) / m);
1112
1112
  return Math.max(0, Math.min(
1113
1113
  c - 1,
1114
1114
  n + T - 1
@@ -1122,22 +1122,22 @@ var ls = function(t, n) {
1122
1122
  t.itemSize;
1123
1123
  }
1124
1124
  });
1125
- function ds(e) {
1126
- var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, s = e.startIndex, i = e.stopIndex;
1127
- return !(s > n || i < t);
1125
+ function di(e) {
1126
+ var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, s = e.stopIndex;
1127
+ return !(i > n || s < t);
1128
1128
  }
1129
- function us(e) {
1130
- for (var t = e.isItemLoaded, n = e.itemCount, s = e.minimumBatchSize, i = e.startIndex, l = e.stopIndex, c = [], m = null, u = null, h = i; h <= l; h++) {
1129
+ function ui(e) {
1130
+ for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, s = e.startIndex, l = e.stopIndex, c = [], m = null, u = null, h = s; h <= l; h++) {
1131
1131
  var N = t(h);
1132
1132
  N ? u !== null && (c.push(m, u), m = u = null) : (u = h, m === null && (m = h));
1133
1133
  }
1134
1134
  if (u !== null) {
1135
- for (var M = Math.min(Math.max(u, m + s - 1), n - 1), v = u + 1; v <= M && !t(v); v++)
1135
+ for (var M = Math.min(Math.max(u, m + i - 1), n - 1), v = u + 1; v <= M && !t(v); v++)
1136
1136
  u = v;
1137
1137
  c.push(m, u);
1138
1138
  }
1139
1139
  if (c.length)
1140
- for (; c[1] - c[0] + 1 < s && c[0] > 0; ) {
1140
+ for (; c[1] - c[0] + 1 < i && c[0] > 0; ) {
1141
1141
  var T = c[0] - 1;
1142
1142
  if (!t(T))
1143
1143
  c[0] = T;
@@ -1146,20 +1146,20 @@ function us(e) {
1146
1146
  }
1147
1147
  return c;
1148
1148
  }
1149
- var ps = function(e, t) {
1149
+ var pi = function(e, t) {
1150
1150
  if (!(e instanceof t))
1151
1151
  throw new TypeError("Cannot call a class as a function");
1152
- }, ms = function() {
1152
+ }, mi = function() {
1153
1153
  function e(t, n) {
1154
- for (var s = 0; s < n.length; s++) {
1155
- var i = n[s];
1156
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
1154
+ for (var i = 0; i < n.length; i++) {
1155
+ var s = n[i];
1156
+ s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(t, s.key, s);
1157
1157
  }
1158
1158
  }
1159
- return function(t, n, s) {
1160
- return n && e(t.prototype, n), s && e(t, s), t;
1159
+ return function(t, n, i) {
1160
+ return n && e(t.prototype, n), i && e(t, i), t;
1161
1161
  };
1162
- }(), hs = function(e, t) {
1162
+ }(), hi = function(e, t) {
1163
1163
  if (typeof t != "function" && t !== null)
1164
1164
  throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1165
1165
  e.prototype = Object.create(t && t.prototype, {
@@ -1174,25 +1174,25 @@ var ps = function(e, t) {
1174
1174
  if (!e)
1175
1175
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1176
1176
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
1177
- }, Is = function(e) {
1178
- hs(t, e);
1177
+ }, Ii = function(e) {
1178
+ hi(t, e);
1179
1179
  function t() {
1180
- var n, s, i, l;
1181
- ps(this, t);
1180
+ var n, i, s, l;
1181
+ pi(this, t);
1182
1182
  for (var c = arguments.length, m = Array(c), u = 0; u < c; u++)
1183
1183
  m[u] = arguments[u];
1184
- return l = (s = (i = Ae(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(h) {
1184
+ return l = (i = (s = Ae(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), s), s._lastRenderedStartIndex = -1, s._lastRenderedStopIndex = -1, s._memoizedUnloadedRanges = [], s._onItemsRendered = function(h) {
1185
1185
  var N = h.visibleStartIndex, M = h.visibleStopIndex;
1186
- i._lastRenderedStartIndex = N, i._lastRenderedStopIndex = M, i._ensureRowsLoaded(N, M);
1187
- }, i._setRef = function(h) {
1188
- i._listRef = h;
1189
- }, s), Ae(i, l);
1186
+ s._lastRenderedStartIndex = N, s._lastRenderedStopIndex = M, s._ensureRowsLoaded(N, M);
1187
+ }, s._setRef = function(h) {
1188
+ s._listRef = h;
1189
+ }, i), Ae(s, l);
1190
1190
  }
1191
- return ms(t, [{
1191
+ return mi(t, [{
1192
1192
  key: "resetloadMoreItemsCache",
1193
1193
  value: function() {
1194
- var s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1195
- this._memoizedUnloadedRanges = [], s && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1194
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
1195
+ this._memoizedUnloadedRanges = [], i && this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);
1196
1196
  }
1197
1197
  }, {
1198
1198
  key: "componentDidMount",
@@ -1201,21 +1201,21 @@ var ps = function(e, t) {
1201
1201
  }, {
1202
1202
  key: "render",
1203
1203
  value: function() {
1204
- var s = this.props.children;
1205
- return s({
1204
+ var i = this.props.children;
1205
+ return i({
1206
1206
  onItemsRendered: this._onItemsRendered,
1207
1207
  ref: this._setRef
1208
1208
  });
1209
1209
  }
1210
1210
  }, {
1211
1211
  key: "_ensureRowsLoaded",
1212
- value: function(s, i) {
1213
- var l = this.props, c = l.isItemLoaded, m = l.itemCount, u = l.minimumBatchSize, h = u === void 0 ? 10 : u, N = l.threshold, M = N === void 0 ? 15 : N, v = us({
1212
+ value: function(i, s) {
1213
+ var l = this.props, c = l.isItemLoaded, m = l.itemCount, u = l.minimumBatchSize, h = u === void 0 ? 10 : u, N = l.threshold, M = N === void 0 ? 15 : N, v = ui({
1214
1214
  isItemLoaded: c,
1215
1215
  itemCount: m,
1216
1216
  minimumBatchSize: h,
1217
- startIndex: Math.max(0, s - M),
1218
- stopIndex: Math.min(m - 1, i + M)
1217
+ startIndex: Math.max(0, i - M),
1218
+ stopIndex: Math.min(m - 1, s + M)
1219
1219
  });
1220
1220
  (this._memoizedUnloadedRanges.length !== v.length || this._memoizedUnloadedRanges.some(function(T, D) {
1221
1221
  return v[D] !== T;
@@ -1223,102 +1223,102 @@ var ps = function(e, t) {
1223
1223
  }
1224
1224
  }, {
1225
1225
  key: "_loadUnloadedRanges",
1226
- value: function(s) {
1227
- for (var i = this, l = this.props.loadMoreItems || this.props.loadMoreRows, c = function(h) {
1228
- var N = s[h], M = s[h + 1], v = l(N, M);
1226
+ value: function(i) {
1227
+ for (var s = this, l = this.props.loadMoreItems || this.props.loadMoreRows, c = function(h) {
1228
+ var N = i[h], M = i[h + 1], v = l(N, M);
1229
1229
  v != null && v.then(function() {
1230
- if (ds({
1231
- lastRenderedStartIndex: i._lastRenderedStartIndex,
1232
- lastRenderedStopIndex: i._lastRenderedStopIndex,
1230
+ if (di({
1231
+ lastRenderedStartIndex: s._lastRenderedStartIndex,
1232
+ lastRenderedStopIndex: s._lastRenderedStopIndex,
1233
1233
  startIndex: N,
1234
1234
  stopIndex: M
1235
1235
  })) {
1236
- if (i._listRef == null)
1236
+ if (s._listRef == null)
1237
1237
  return;
1238
- typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(N, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
1238
+ typeof s._listRef.resetAfterIndex == "function" ? s._listRef.resetAfterIndex(N, !0) : (typeof s._listRef._getItemStyleCache == "function" && s._listRef._getItemStyleCache(-1), s._listRef.forceUpdate());
1239
1239
  }
1240
1240
  });
1241
- }, m = 0; m < s.length; m += 2)
1241
+ }, m = 0; m < i.length; m += 2)
1242
1242
  c(m);
1243
1243
  }
1244
1244
  }]), t;
1245
1245
  }(Oe);
1246
- const fs = /* @__PURE__ */ a("div")({
1246
+ const fi = /* @__PURE__ */ a("div")({
1247
1247
  name: "Container",
1248
1248
  class: "culdu4a",
1249
1249
  propsAsIs: !1
1250
- }), gs = /* @__PURE__ */ a("div")({
1250
+ }), gi = /* @__PURE__ */ a("div")({
1251
1251
  name: "Position",
1252
1252
  class: "pwf8e69",
1253
1253
  propsAsIs: !1
1254
- }), vs = /* @__PURE__ */ a("img")({
1254
+ }), vi = /* @__PURE__ */ a("img")({
1255
1255
  name: "Avatar",
1256
1256
  class: "atf4yh4",
1257
1257
  propsAsIs: !1
1258
- }), Ms = /* @__PURE__ */ a("div")({
1258
+ }), Mi = /* @__PURE__ */ a("div")({
1259
1259
  name: "AvatarPlaceholder",
1260
1260
  class: "a1dg29ja",
1261
1261
  propsAsIs: !1
1262
- }), ys = /* @__PURE__ */ a("div")({
1262
+ }), yi = /* @__PURE__ */ a("div")({
1263
1263
  name: "Content",
1264
1264
  class: "c10a68rc",
1265
1265
  propsAsIs: !1
1266
- }), Ns = /* @__PURE__ */ a("div")({
1266
+ }), Ni = /* @__PURE__ */ a("div")({
1267
1267
  name: "NameContainer",
1268
1268
  class: "nc4kck5",
1269
1269
  propsAsIs: !1
1270
- }), Ts = /* @__PURE__ */ a("span")({
1270
+ }), Ti = /* @__PURE__ */ a("span")({
1271
1271
  name: "Name",
1272
1272
  class: "njsrqgr",
1273
1273
  propsAsIs: !1
1274
- }), As = () => j, Ds = /* @__PURE__ */ a(As())({
1274
+ }), Ai = () => j, Di = /* @__PURE__ */ a(Ai())({
1275
1275
  name: "CurrentUserBadge",
1276
1276
  class: "c17uc4zr",
1277
1277
  propsAsIs: !0
1278
- }), Ss = ({
1278
+ }), Si = ({
1279
1279
  rank: e,
1280
1280
  avatar: t,
1281
1281
  name: n,
1282
- points: s,
1283
- isCurrentUser: i,
1282
+ points: i,
1283
+ isCurrentUser: s,
1284
1284
  openItemDetail: l,
1285
1285
  style: c
1286
- }) => /* @__PURE__ */ f(fs, { onClick: l, style: c, children: [
1287
- /* @__PURE__ */ r(gs, { children: e || 0 }),
1288
- /* @__PURE__ */ f(ys, { children: [
1289
- t ? /* @__PURE__ */ r(vs, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ r(Ms, { children: ke(n || "") }),
1290
- /* @__PURE__ */ f(Ns, { children: [
1291
- /* @__PURE__ */ r(Ts, { children: n || "" }),
1292
- i && /* @__PURE__ */ r(Ds, { name: "icon-star" })
1286
+ }) => /* @__PURE__ */ f(fi, { onClick: l, style: c, children: [
1287
+ /* @__PURE__ */ r(gi, { children: e || 0 }),
1288
+ /* @__PURE__ */ f(yi, { children: [
1289
+ t ? /* @__PURE__ */ r(vi, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ r(Mi, { children: ke(n || "") }),
1290
+ /* @__PURE__ */ f(Ni, { children: [
1291
+ /* @__PURE__ */ r(Ti, { children: n || "" }),
1292
+ s && /* @__PURE__ */ r(Di, { name: "icon-star" })
1293
1293
  ] })
1294
1294
  ] }),
1295
- /* @__PURE__ */ r("div", { children: we(s) })
1296
- ] }), zs = /* @__PURE__ */ a("div")({
1295
+ /* @__PURE__ */ r("div", { children: we(i) })
1296
+ ] }), zi = /* @__PURE__ */ a("div")({
1297
1297
  name: "ScrollContainer",
1298
1298
  class: "s13d8sg6",
1299
1299
  propsAsIs: !1
1300
- }), xs = ({
1300
+ }), xi = ({
1301
1301
  items: e,
1302
1302
  currentUserId: t,
1303
1303
  openItemDetail: n,
1304
- fetchMore: s
1305
- }) => /* @__PURE__ */ r(Fe, { children: ({ width: i, height: l }) => /* @__PURE__ */ r(
1306
- Is,
1304
+ fetchMore: i
1305
+ }) => /* @__PURE__ */ r(Fe, { children: ({ width: s, height: l }) => /* @__PURE__ */ r(
1306
+ Ii,
1307
1307
  {
1308
1308
  isItemLoaded: (c) => c < e.length,
1309
1309
  itemCount: e.length + 1,
1310
- loadMoreItems: s,
1311
- children: ({ onItemsRendered: c, ref: m }) => /* @__PURE__ */ r(zs, { children: /* @__PURE__ */ r(
1312
- cs,
1310
+ loadMoreItems: i,
1311
+ children: ({ onItemsRendered: c, ref: m }) => /* @__PURE__ */ r(zi, { children: /* @__PURE__ */ r(
1312
+ ci,
1313
1313
  {
1314
1314
  itemSize: 56,
1315
1315
  onItemsRendered: c,
1316
1316
  ref: m,
1317
1317
  itemCount: e.length,
1318
- width: i,
1318
+ width: s,
1319
1319
  height: l,
1320
1320
  children: ({ index: u, style: h }) => /* @__PURE__ */ r(
1321
- Ss,
1321
+ Si,
1322
1322
  {
1323
1323
  style: { ...h, maxHeight: 48 },
1324
1324
  ...e[u],
@@ -1330,12 +1330,12 @@ const fs = /* @__PURE__ */ a("div")({
1330
1330
  }
1331
1331
  ) })
1332
1332
  }
1333
- ) }), Os = ({ deepLink: e }) => {
1334
- const { data: t } = $(e.$store), n = t == null ? void 0 : t.url, s = e.desktopLink;
1333
+ ) }), Oi = ({ deepLink: e }) => {
1334
+ const { data: t } = $(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
1335
1335
  return /* @__PURE__ */ r(
1336
1336
  Be,
1337
1337
  {
1338
- inviteLink: n || s,
1338
+ inviteLink: n || i,
1339
1339
  socialLinks: [
1340
1340
  {
1341
1341
  icon: "icon-facebook",
@@ -1352,133 +1352,133 @@ const fs = /* @__PURE__ */ a("div")({
1352
1352
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1353
1353
  }
1354
1354
  );
1355
- }, js = ({ gamification: e }) => {
1355
+ }, ji = ({ gamification: e }) => {
1356
1356
  const { data: t } = $(e.leaderboardList.$store);
1357
1357
  return t != null && t.length ? /* @__PURE__ */ r(
1358
- xs,
1358
+ xi,
1359
1359
  {
1360
1360
  fetchMore: e.leaderboardList.fetchMore,
1361
1361
  items: t,
1362
1362
  openItemDetail: e.openUser,
1363
1363
  currentUserId: e.currentUserId.get()
1364
1364
  }
1365
- ) : /* @__PURE__ */ r(Os, { deepLink: e.deepLink });
1366
- }, ks = /* @__PURE__ */ a("div")({
1365
+ ) : /* @__PURE__ */ r(Oi, { deepLink: e.deepLink });
1366
+ }, ki = /* @__PURE__ */ a("div")({
1367
1367
  name: "QuestionItem",
1368
1368
  class: "q1w97g3p",
1369
1369
  propsAsIs: !1
1370
- }), ws = /* @__PURE__ */ a("div")({
1370
+ }), wi = /* @__PURE__ */ a("div")({
1371
1371
  name: "QuestionCaption",
1372
1372
  class: "q2sl39u",
1373
1373
  propsAsIs: !1
1374
- }), Cs = /* @__PURE__ */ a("div")({
1374
+ }), Ci = /* @__PURE__ */ a("div")({
1375
1375
  name: "QuestionBody",
1376
1376
  class: "qd5h0uc",
1377
1377
  propsAsIs: !1
1378
- }), bs = /* @__PURE__ */ a("div")({
1378
+ }), bi = /* @__PURE__ */ a("div")({
1379
1379
  name: "QuestionAction",
1380
1380
  class: "q105uluy",
1381
1381
  propsAsIs: !1
1382
- }), Ls = () => j, B = /* @__PURE__ */ a(Ls())({
1382
+ }), Li = () => j, B = /* @__PURE__ */ a(Li())({
1383
1383
  name: "QuestionActionIcon",
1384
1384
  class: "q1fa0b9h",
1385
1385
  propsAsIs: !0
1386
- }), $s = () => j, Es = /* @__PURE__ */ a($s())({
1386
+ }), $i = () => j, Ei = /* @__PURE__ */ a($i())({
1387
1387
  name: "QuestionTypeIcon",
1388
1388
  class: "qxlt78s",
1389
1389
  propsAsIs: !0
1390
- }), Rs = /* @__PURE__ */ a("div")({
1390
+ }), Ri = /* @__PURE__ */ a("div")({
1391
1391
  name: "QuestionTypeLabel",
1392
1392
  class: "qmg0vkx",
1393
1393
  propsAsIs: !1
1394
- }), Qs = /* @__PURE__ */ a("div")({
1394
+ }), Qi = /* @__PURE__ */ a("div")({
1395
1395
  name: "QuestionContent",
1396
1396
  class: "q1uz5j1g",
1397
1397
  propsAsIs: !1
1398
- }), Us = /* @__PURE__ */ a("button")({
1398
+ }), Ui = /* @__PURE__ */ a("button")({
1399
1399
  name: "PlayButton",
1400
1400
  class: "p1pba9p1",
1401
1401
  propsAsIs: !1
1402
- }), Ps = {
1402
+ }), Pi = {
1403
1403
  [V.LOST]: /* @__PURE__ */ r(B, { name: "incorrectVoted" }),
1404
1404
  [V.WON]: /* @__PURE__ */ r(B, { name: "icon-check" }),
1405
1405
  [V.UNSET]: /* @__PURE__ */ r(B, { name: "icon-arrow" }),
1406
1406
  [V.DNP]: /* @__PURE__ */ r(B, { name: "icon-arrow" })
1407
- }, _s = ({
1407
+ }, _i = ({
1408
1408
  questionId: e,
1409
1409
  questionType: t,
1410
1410
  questionStatus: n,
1411
- subject: s,
1412
- openForVoting: i,
1411
+ subject: i,
1412
+ openForVoting: s,
1413
1413
  openQuestion: l,
1414
1414
  status: c
1415
1415
  }) => {
1416
- const m = Se[t], u = Ps[c];
1417
- return m ? /* @__PURE__ */ f(ks, { onClick: () => l == null ? void 0 : l(e), children: [
1418
- /* @__PURE__ */ f(Qs, { children: [
1419
- /* @__PURE__ */ f(ws, { children: [
1416
+ const m = Se[t], u = Pi[c];
1417
+ return m ? /* @__PURE__ */ f(ki, { onClick: () => l == null ? void 0 : l(e), children: [
1418
+ /* @__PURE__ */ f(Qi, { children: [
1419
+ /* @__PURE__ */ f(wi, { children: [
1420
1420
  /* @__PURE__ */ r(
1421
- Es,
1421
+ Ei,
1422
1422
  {
1423
1423
  "data-type-trivia": t === x.TRIVIA,
1424
1424
  "data-type-poll": t === x.POLL,
1425
1425
  name: m.iconName
1426
1426
  }
1427
1427
  ),
1428
- /* @__PURE__ */ f(Rs, { children: [
1428
+ /* @__PURE__ */ f(Ri, { children: [
1429
1429
  m.label,
1430
1430
  t === x.TRIVIA && n === L.RESOLVED && " • Expired"
1431
1431
  ] })
1432
1432
  ] }),
1433
- /* @__PURE__ */ r(Cs, { children: s || "" })
1433
+ /* @__PURE__ */ r(Ci, { children: i || "" })
1434
1434
  ] }),
1435
- /* @__PURE__ */ r(bs, { children: i ? /* @__PURE__ */ r(Us, { children: "Play" }) : u })
1435
+ /* @__PURE__ */ r(bi, { children: s ? /* @__PURE__ */ r(Ui, { children: "Play" }) : u })
1436
1436
  ] }) : null;
1437
- }, qs = /* @__PURE__ */ a("div")({
1437
+ }, qi = /* @__PURE__ */ a("div")({
1438
1438
  name: "Container",
1439
1439
  class: "cll3md7",
1440
1440
  propsAsIs: !1
1441
- }), Ys = /* @__PURE__ */ a("button")({
1441
+ }), Yi = /* @__PURE__ */ a("button")({
1442
1442
  name: "ActionBtn",
1443
1443
  class: "a10g1iik",
1444
1444
  propsAsIs: !1
1445
- }), Ws = ({
1445
+ }), Wi = ({
1446
1446
  openInsight: e,
1447
1447
  questionId: t,
1448
1448
  ...n
1449
- }) => /* @__PURE__ */ f(qs, { children: [
1449
+ }) => /* @__PURE__ */ f(qi, { children: [
1450
1450
  /* @__PURE__ */ r(Ee, { questionId: t, ...n }),
1451
- e && /* @__PURE__ */ r(Ys, { onClick: () => e(t), children: "View Insight" })
1452
- ] }), Vs = /* @__PURE__ */ a("div")({
1451
+ e && /* @__PURE__ */ r(Yi, { onClick: () => e(t), children: "View Insight" })
1452
+ ] }), Vi = /* @__PURE__ */ a("div")({
1453
1453
  name: "QuestionsContainer",
1454
1454
  class: "qvghv3l",
1455
1455
  propsAsIs: !1
1456
- }), Fs = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(Vs, { children: e == null ? void 0 : e.map((n) => {
1457
- var s, i;
1458
- if (n.type === "question" && ((s = n.attributes) == null ? void 0 : s.attributes.case) === "question") {
1456
+ }), Fi = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(Vi, { children: e == null ? void 0 : e.map((n) => {
1457
+ var i, s;
1458
+ if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1459
1459
  const l = n.attributes.attributes.value;
1460
- return /* @__PURE__ */ r(_s, { openQuestion: t, ...l }, l.questionId);
1460
+ return /* @__PURE__ */ r(_i, { openQuestion: t, ...l }, l.questionId);
1461
1461
  }
1462
- if (n.type === "insight" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "insight") {
1462
+ if (n.type === "insight" && ((s = n.attributes) == null ? void 0 : s.attributes.case) === "insight") {
1463
1463
  const l = n.attributes.attributes.value;
1464
- return /* @__PURE__ */ r(Ws, { openInsight: t, ...l }, l.questionId);
1464
+ return /* @__PURE__ */ r(Wi, { openInsight: t, ...l }, l.questionId);
1465
1465
  }
1466
1466
  return null;
1467
- }) }), Bs = ({ store: e, openQuestion: t }) => {
1467
+ }) }), Bi = ({ store: e, openQuestion: t }) => {
1468
1468
  const n = $(e);
1469
- return n != null && n.data ? /* @__PURE__ */ r(Fs, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
1470
- }, Hs = ({ userSummary: e }) => {
1469
+ return n != null && n.data ? /* @__PURE__ */ r(Fi, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
1470
+ }, Hi = ({ userSummary: e }) => {
1471
1471
  var t;
1472
- const [n, s] = Q(void 0);
1472
+ const [n, i] = Q(void 0);
1473
1473
  return xe(() => {
1474
- const i = e.subscribe((l) => {
1475
- l != null && l.data && s(l.data);
1474
+ const s = e.subscribe((l) => {
1475
+ l != null && l.data && i(l.data);
1476
1476
  });
1477
1477
  return () => {
1478
- i();
1478
+ s();
1479
1479
  };
1480
1480
  }, [e]), n != null && n.summary ? /* @__PURE__ */ r(Ce, { ...n.summary, successRate: (t = n.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ r("div", { children: "wait user..." });
1481
- }, Gs = ({
1481
+ }, Gi = ({
1482
1482
  gamification: e
1483
1483
  }) => {
1484
1484
  const [t, n] = Q(H.HOME);
@@ -1497,74 +1497,74 @@ const fs = /* @__PURE__ */ a("div")({
1497
1497
  activePage: t,
1498
1498
  toggleActivePage: n
1499
1499
  })
1500
- }), t === H.HOME && /* @__PURE__ */ f(se, {
1500
+ }), t === H.HOME && /* @__PURE__ */ f(ie, {
1501
1501
  children: [/* @__PURE__ */ r(ee, {
1502
1502
  style: {
1503
1503
  paddingTop: "12px"
1504
1504
  },
1505
- children: /* @__PURE__ */ r(Hs, {
1505
+ children: /* @__PURE__ */ r(Hi, {
1506
1506
  userSummary: e.userSummary
1507
1507
  })
1508
1508
  }), /* @__PURE__ */ r(He, {
1509
- children: /* @__PURE__ */ r(Bs, {
1509
+ children: /* @__PURE__ */ r(Bi, {
1510
1510
  openQuestion: e.openQuestion,
1511
1511
  store: e.feedList.getStore()
1512
1512
  })
1513
1513
  })]
1514
1514
  }), t === H.LEADERBOARD && /* @__PURE__ */ r("div", {
1515
1515
  className: "c1bp9dj2",
1516
- children: /* @__PURE__ */ r(js, {
1516
+ children: /* @__PURE__ */ r(ji, {
1517
1517
  gamification: e
1518
1518
  })
1519
1519
  })]
1520
1520
  });
1521
- }, Zs = () => Ge, De = /* @__PURE__ */ a(Zs())({
1521
+ }, Zi = () => Ge, De = /* @__PURE__ */ a(Zi())({
1522
1522
  name: "OpenedContainer",
1523
1523
  class: "oar61gl",
1524
1524
  propsAsIs: !0
1525
- }), Js = /* @__PURE__ */ a("div")({
1525
+ }), Ji = /* @__PURE__ */ a("div")({
1526
1526
  name: "UserContainer",
1527
1527
  class: "u14zaal4",
1528
1528
  propsAsIs: !1
1529
- }), Ks = ({
1529
+ }), Ki = ({
1530
1530
  correct: e,
1531
1531
  incorrect: t
1532
1532
  }) => {
1533
1533
  const n = e + t;
1534
1534
  return n === 0 ? 0 : Math.round(e / n * 100);
1535
- }, ni = ({
1535
+ }, ns = ({
1536
1536
  gamification: e,
1537
1537
  className: t
1538
1538
  }) => {
1539
- const n = $(e.openedQuestion.$store), s = $(e.openedUser);
1539
+ const n = $(e.openedQuestion.$store), i = $(e.openedUser);
1540
1540
  return /* @__PURE__ */ f(R, {
1541
1541
  children: [n && /* @__PURE__ */ r(De, {
1542
1542
  className: t,
1543
1543
  children: /* @__PURE__ */ r(Hn, {
1544
1544
  gamification: e
1545
1545
  })
1546
- }), s && /* @__PURE__ */ r(De, {
1546
+ }), i && /* @__PURE__ */ r(De, {
1547
1547
  className: t,
1548
- children: /* @__PURE__ */ f(Js, {
1548
+ children: /* @__PURE__ */ f(Ji, {
1549
1549
  children: [/* @__PURE__ */ r(je, {
1550
1550
  label: "Friend's Rank",
1551
1551
  close: e.closeUser
1552
1552
  }), /* @__PURE__ */ r(ee, {
1553
1553
  children: /* @__PURE__ */ r(Ce, {
1554
- ...s,
1555
- successRate: Ks(s)
1554
+ ...i,
1555
+ successRate: Ki(i)
1556
1556
  })
1557
1557
  })]
1558
1558
  })
1559
- }), /* @__PURE__ */ r(se, {
1559
+ }), /* @__PURE__ */ r(ie, {
1560
1560
  className: t,
1561
1561
  "data-nav": "true",
1562
- children: /* @__PURE__ */ r(Gs, {
1562
+ children: /* @__PURE__ */ r(Gi, {
1563
1563
  gamification: e
1564
1564
  })
1565
1565
  })]
1566
1566
  });
1567
1567
  };
1568
1568
  export {
1569
- ni as default
1569
+ ns as default
1570
1570
  };