@streamlayer/react 0.31.0 → 0.31.2

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.
@@ -2,18 +2,18 @@ import { jsxs as p, jsx as s, Fragment as b } from "react/jsx-runtime";
2
2
  import { s as o, i as j } from "./index4.js";
3
3
  import { useStore as k } from "@nanostores/react";
4
4
  import { o as Ne, r as te, w as $e, A as Re, O as Qe, a as K, n as Ue, d as _e } from "./masters2.js";
5
- import { useState as R, useCallback as F, useMemo as W, createElement as H, PureComponent as Ae } from "react";
5
+ import { useState as R, useCallback as F, useMemo as W, createElement as H, PureComponent as ye } from "react";
6
6
  import { QuestionType as x, QuestionStatus as Q, QuestionImages as $, PickHistoryStatus as q } from "@streamlayer/sdk-web-types";
7
7
  import { m as qe } from "./index3.js";
8
8
  import "react-countup";
9
- import { CountdownCircleTimer as Ye } from "react-countdown-circle-timer";
9
+ import { CountdownCircleTimer as Pe } from "react-countdown-circle-timer";
10
10
  import { E } from "./index2.js";
11
11
  import "@streamlayer/sdk-web-interfaces";
12
12
  import "@streamlayer/sdk-web-notifications";
13
13
  import "@lottiefiles/react-lottie-player";
14
14
  import "./useStreamLayerApp.js";
15
15
  import "@streamlayer/sdk-web";
16
- const Pe = /* @__PURE__ */ o("div")({
16
+ const Ye = /* @__PURE__ */ o("div")({
17
17
  name: "Container",
18
18
  class: "c1vwopgc",
19
19
  propsAsIs: !1
@@ -37,9 +37,9 @@ const Pe = /* @__PURE__ */ o("div")({
37
37
  name: "CloseIcon",
38
38
  class: "cvsl7l3",
39
39
  propsAsIs: !0
40
- }), ye = ({ type: e, close: t, label: n }) => {
40
+ }), Ae = ({ type: e, close: t, label: n }) => {
41
41
  const i = e ? Ne[e] : { label: n, iconName: void 0 };
42
- return /* @__PURE__ */ p(Pe, { children: [
42
+ return /* @__PURE__ */ p(Ye, { children: [
43
43
  /* @__PURE__ */ p(We, { children: [
44
44
  (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(Fe, { name: i.iconName }),
45
45
  (i == null ? void 0 : i.label) && /* @__PURE__ */ s(Be, { children: i.label })
@@ -80,7 +80,7 @@ const Pe = /* @__PURE__ */ o("div")({
80
80
  name: "Title",
81
81
  class: "t8s05oq",
82
82
  propsAsIs: !1
83
- }), Y = ({ indicator: e, title: t }) => /* @__PURE__ */ p(st, { children: [
83
+ }), P = ({ indicator: e, title: t }) => /* @__PURE__ */ p(st, { children: [
84
84
  /* @__PURE__ */ s(it, { children: e }),
85
85
  /* @__PURE__ */ s(rt, { children: t })
86
86
  ] }), ot = /* @__PURE__ */ o("div")({
@@ -123,11 +123,11 @@ const Pe = /* @__PURE__ */ o("div")({
123
123
  name: "Rts",
124
124
  class: "r2vgnxv",
125
125
  propsAsIs: !1
126
- }), ft = /* @__PURE__ */ o("div")({
126
+ }), gt = /* @__PURE__ */ o("div")({
127
127
  name: "RtsIndicator",
128
128
  class: "roqn06j",
129
129
  propsAsIs: !1
130
- }), gt = /* @__PURE__ */ o("div")({
130
+ }), ft = /* @__PURE__ */ o("div")({
131
131
  name: "RtsLabel",
132
132
  class: "r15adx7c",
133
133
  propsAsIs: !1
@@ -143,11 +143,11 @@ const Pe = /* @__PURE__ */ o("div")({
143
143
  name: "Statistics",
144
144
  class: "s1knfgqt",
145
145
  propsAsIs: !1
146
- }), At = /* @__PURE__ */ o("div")({
146
+ }), yt = /* @__PURE__ */ o("div")({
147
147
  name: "AvatarPlaceholder",
148
148
  class: "a1mqo824",
149
149
  propsAsIs: !1
150
- }), yt = /* @__PURE__ */ o("button")({
150
+ }), At = /* @__PURE__ */ o("button")({
151
151
  name: "UserAccountBtn",
152
152
  class: "uxareh6",
153
153
  propsAsIs: !1
@@ -157,31 +157,31 @@ const Pe = /* @__PURE__ */ o("div")({
157
157
  points: n,
158
158
  friendsRank: i,
159
159
  rank: r,
160
- streak: I,
161
- correct: u,
162
- incorrect: m,
163
- inTop: d,
160
+ streak: m,
161
+ correct: c,
162
+ incorrect: I,
163
+ inTop: u,
164
164
  successRate: h
165
165
  }) => /* @__PURE__ */ p(ot, { children: [
166
166
  /* @__PURE__ */ s(at, { children: /* @__PURE__ */ p(ct, { children: [
167
- /* @__PURE__ */ p(yt, { children: [
167
+ /* @__PURE__ */ p(At, { children: [
168
168
  e && /* @__PURE__ */ s(dt, { alt: "avatar", src: e }),
169
- !e && /* @__PURE__ */ s(At, { children: Te(t || "") })
169
+ !e && /* @__PURE__ */ s(yt, { children: Te(t || "") })
170
170
  ] }),
171
171
  /* @__PURE__ */ p(ut, { children: [
172
172
  /* @__PURE__ */ s(pt, { children: t }),
173
173
  /* @__PURE__ */ p(mt, { children: [
174
174
  /* @__PURE__ */ p(ht, { children: [
175
175
  /* @__PURE__ */ s(It, { alt: "rank-icon", src: Tt }),
176
- /* @__PURE__ */ p(ft, { children: [
176
+ /* @__PURE__ */ p(gt, { children: [
177
177
  De(n),
178
- /* @__PURE__ */ s(gt, { children: "PTS" })
178
+ /* @__PURE__ */ s(ft, { children: "PTS" })
179
179
  ] })
180
180
  ] }),
181
181
  /* @__PURE__ */ s(Mt, {}),
182
182
  /* @__PURE__ */ p("div", { children: [
183
183
  "TOP ",
184
- d || 0,
184
+ u || 0,
185
185
  "%"
186
186
  ] })
187
187
  ] })
@@ -193,10 +193,10 @@ const Pe = /* @__PURE__ */ o("div")({
193
193
  /* @__PURE__ */ s(oe, { indicator: r || 0, title: "Global rank" })
194
194
  ] }),
195
195
  /* @__PURE__ */ p(Nt, { children: [
196
- /* @__PURE__ */ s(Y, { indicator: I || 0, title: "Win streak" }),
197
- /* @__PURE__ */ s(Y, { indicator: u || 0, title: "Correct" }),
198
- /* @__PURE__ */ s(Y, { indicator: m || 0, title: "Incorrect" }),
199
- /* @__PURE__ */ s(Y, { indicator: `${h || 0}%`, title: "Succ. rate" })
196
+ /* @__PURE__ */ s(P, { indicator: m || 0, title: "Win streak" }),
197
+ /* @__PURE__ */ s(P, { indicator: c || 0, title: "Correct" }),
198
+ /* @__PURE__ */ s(P, { indicator: I || 0, title: "Incorrect" }),
199
+ /* @__PURE__ */ s(P, { indicator: `${h || 0}%`, title: "Succ. rate" })
200
200
  ] })
201
201
  ] })
202
202
  ] }), Dt = /* @__PURE__ */ o("div")({
@@ -249,28 +249,28 @@ const Pe = /* @__PURE__ */ o("div")({
249
249
  questionVoted: n,
250
250
  questionType: i,
251
251
  hasCorrectAnswer: r,
252
- questionStatus: I
252
+ questionStatus: m
253
253
  }) => {
254
- const u = n && (i === x.TRIVIA || i === x.PREDICTION);
255
- if (!u && I !== Q.RESOLVED)
254
+ const c = n && (i === x.TRIVIA || i === x.PREDICTION);
255
+ if (!c && m !== Q.RESOLVED)
256
256
  return null;
257
- const m = i === x.PREDICTION && !r, d = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
258
- return /* @__PURE__ */ p(jt, { "data-isPrediction": m, children: [
259
- I === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ p(b, { children: [
257
+ const I = i === x.PREDICTION && !r, u = t ? "correct" : "incorrect", h = t ? e.correctFeedback : e.incorrectFeedback;
258
+ return /* @__PURE__ */ p(jt, { "data-isPrediction": I, children: [
259
+ m === Q.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ p(b, { children: [
260
260
  /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(j, { name: "questionExpired" }) }),
261
261
  /* @__PURE__ */ p("div", { children: [
262
262
  /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Z, { children: "Question Expired" }) }),
263
263
  /* @__PURE__ */ s(wt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
264
264
  ] })
265
265
  ] }),
266
- u && m && /* @__PURE__ */ p(b, { children: [
266
+ c && I && /* @__PURE__ */ p(b, { children: [
267
267
  /* @__PURE__ */ s(Ct, { name: "icon-prediction" }),
268
268
  /* @__PURE__ */ s(Z, { children: "Stay tuned to see if your prediction was correct." })
269
269
  ] }),
270
- u && r && /* @__PURE__ */ p(b, { children: [
271
- /* @__PURE__ */ s(ae, { "data-feedbackType": d, children: /* @__PURE__ */ s(j, { name: d }) }),
270
+ c && r && /* @__PURE__ */ p(b, { children: [
271
+ /* @__PURE__ */ s(ae, { "data-feedbackType": u, children: /* @__PURE__ */ s(j, { name: u }) }),
272
272
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(le, { children: [
273
- /* @__PURE__ */ s(kt, { "data-feedbackType": d, children: h == null ? void 0 : h.title }),
273
+ /* @__PURE__ */ s(kt, { "data-feedbackType": u, children: h == null ? void 0 : h.title }),
274
274
  /* @__PURE__ */ s(Z, { children: h == null ? void 0 : h.description })
275
275
  ] }) })
276
276
  ] })
@@ -307,7 +307,7 @@ const Pe = /* @__PURE__ */ o("div")({
307
307
  name: "IconContainer",
308
308
  class: "i1j65z51",
309
309
  propsAsIs: !1
310
- }), Yt = /* @__PURE__ */ o("div")({
310
+ }), Pt = /* @__PURE__ */ o("div")({
311
311
  name: "IconWrap",
312
312
  class: "i19tpfua",
313
313
  propsAsIs: !1
@@ -315,7 +315,7 @@ const Pe = /* @__PURE__ */ o("div")({
315
315
  name: "Icon",
316
316
  class: "i1tubmma",
317
317
  propsAsIs: !1
318
- }), Pt = () => ze, Wt = /* @__PURE__ */ o(Pt())({
318
+ }), Yt = () => ze, Wt = /* @__PURE__ */ o(Yt())({
319
319
  name: "IconDefault",
320
320
  class: "i1grrgwj",
321
321
  propsAsIs: !0
@@ -341,7 +341,7 @@ const Pe = /* @__PURE__ */ o("div")({
341
341
  propsAsIs: !0
342
342
  }), ce = {
343
343
  [$.CENTERED]: (e) => /* @__PURE__ */ s(Wt, { alt: "option-icon", src: e }),
344
- [$.TRANSPARENT]: (e) => /* @__PURE__ */ s(qt, { children: /* @__PURE__ */ s(Yt, { style: { backgroundImage: `url(${e})` } }) }),
344
+ [$.TRANSPARENT]: (e) => /* @__PURE__ */ s(qt, { children: /* @__PURE__ */ s(Pt, { style: { backgroundImage: `url(${e})` } }) }),
345
345
  [$.ROUNDED]: (e) => /* @__PURE__ */ s(Ft, { alt: "option-icon", src: e }),
346
346
  [$.NONE]: () => null,
347
347
  [$.UNSET]: () => null
@@ -368,36 +368,36 @@ const Pe = /* @__PURE__ */ o("div")({
368
368
  id: n,
369
369
  icon: i,
370
370
  text: r,
371
- percentageDecimal: I,
371
+ percentageDecimal: m,
372
372
  // extra props
373
- onVote: u,
374
- youSelected: m,
375
- questionVoted: d,
373
+ onVote: c,
374
+ youSelected: I,
375
+ questionVoted: u,
376
376
  // ToDo: Figure out why imageMode is not in the response, and delete default value
377
377
  imageMode: h,
378
- answerTimeExpired: A,
378
+ answerTimeExpired: y,
379
379
  questionStatus: D,
380
380
  isLoading: N,
381
- questionType: y,
381
+ questionType: A,
382
382
  correct: T,
383
383
  hasCorrectAnswer: a
384
- } = e, l = Kt(e), c = Xt({ questionType: y, questionVoted: d, correct: T, hasCorrectAnswer: a, questionStatus: D }), f = d || D === Q.RESOLVED && y === x.PREDICTION;
384
+ } = e, l = Kt(e), d = Xt({ questionType: A, questionVoted: u, correct: T, hasCorrectAnswer: a, questionStatus: D }), g = u || D === Q.RESOLVED && A === x.PREDICTION;
385
385
  return /* @__PURE__ */ p(
386
386
  Qt,
387
387
  {
388
388
  value: n,
389
- "data-selected": m,
389
+ "data-selected": I,
390
390
  "data-answerState": l,
391
- disabled: d || N || A,
392
- onClick: u,
391
+ disabled: u || N || y,
392
+ onClick: c,
393
393
  children: [
394
- f && /* @__PURE__ */ s(Ut, { "data-answerState": l, style: { width: `${I}%` } }),
394
+ g && /* @__PURE__ */ s(Ut, { "data-answerState": l, style: { width: `${m}%` } }),
395
395
  /* @__PURE__ */ p(_t, { children: [
396
396
  i && h && ((t = ce[h]) == null ? void 0 : t.call(ce, i)),
397
397
  /* @__PURE__ */ s(Bt, { children: r }),
398
- f && /* @__PURE__ */ p(Ht, { children: [
399
- c && /* @__PURE__ */ s(Jt, { name: "selected" }),
400
- /* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(qe, { value: I, suffix: "%" }) })
398
+ g && /* @__PURE__ */ p(Ht, { children: [
399
+ d && /* @__PURE__ */ s(Jt, { name: "selected" }),
400
+ /* @__PURE__ */ s(Zt, { children: /* @__PURE__ */ s(qe, { value: m, suffix: "%" }) })
401
401
  ] })
402
402
  ] })
403
403
  ]
@@ -412,16 +412,16 @@ const Pe = /* @__PURE__ */ o("div")({
412
412
  duration: t = 30,
413
413
  onTimerExpired: n
414
414
  }) => {
415
- const [i, r] = R(t > 10 ? rn : de), I = ({
416
- remainingTime: d
415
+ const [i, r] = R(t > 10 ? rn : de), m = ({
416
+ remainingTime: u
417
417
  }) => /* @__PURE__ */ s(sn, {
418
- children: d
419
- }), u = F(() => {
418
+ children: u
419
+ }), c = F(() => {
420
420
  n == null || n(), r(on);
421
- }, [n, r]), m = F((d) => {
422
- d === 10 && r(de);
421
+ }, [n, r]), I = F((u) => {
422
+ u === 10 && r(de);
423
423
  }, [r]);
424
- return /* @__PURE__ */ s(Ye, {
424
+ return /* @__PURE__ */ s(Pe, {
425
425
  isPlaying: e,
426
426
  duration: t,
427
427
  colors: tn,
@@ -430,9 +430,9 @@ const Pe = /* @__PURE__ */ o("div")({
430
430
  strokeWidth: 2,
431
431
  trailStrokeWidth: 2,
432
432
  trailColor: i,
433
- onComplete: u,
434
- onUpdate: m,
435
- children: I
433
+ onComplete: c,
434
+ onUpdate: I,
435
+ children: m
436
436
  });
437
437
  }, ln = /* @__PURE__ */ o("div")({
438
438
  name: "WinBarContainer",
@@ -462,10 +462,18 @@ const Pe = /* @__PURE__ */ o("div")({
462
462
  name: "PointsUnits",
463
463
  class: "pe5g05h",
464
464
  propsAsIs: !1
465
- }), fn = ({ title: e, points: t, isPlayingTimer: n, isTimer: i, onTimerExpired: r }) => /* @__PURE__ */ p(ln, { children: [
465
+ }), gn = ({
466
+ title: e,
467
+ points: t,
468
+ isPlayingTimer: n,
469
+ isTimer: i,
470
+ questionType: r,
471
+ timerDuration: m,
472
+ onTimerExpired: c
473
+ }) => /* @__PURE__ */ p(ln, { children: [
466
474
  /* @__PURE__ */ p(cn, { children: [
467
475
  e && /* @__PURE__ */ s(dn, { children: e }),
468
- t !== void 0 && /* @__PURE__ */ p(b, { children: [
476
+ t !== void 0 && r !== x.POLL && /* @__PURE__ */ p(b, { children: [
469
477
  /* @__PURE__ */ s(pn, { name: "icon-trophy" }),
470
478
  /* @__PURE__ */ p(mn, { children: [
471
479
  /* @__PURE__ */ s(In, { children: t }),
@@ -473,41 +481,41 @@ const Pe = /* @__PURE__ */ o("div")({
473
481
  ] })
474
482
  ] })
475
483
  ] }),
476
- i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired: r })
477
- ] }), gn = ({ openedQuestion: e, vote: t, close: n }) => {
484
+ i && /* @__PURE__ */ s(an, { isPlaying: n, onTimerExpired: c, duration: m })
485
+ ] }), fn = ({ openedQuestion: e, vote: t, close: n }) => {
478
486
  var i;
479
- const r = e.subject, I = e.type, u = (i = e.options) == null ? void 0 : i.options, [m, d] = R(!1), [h, A] = R(!1), [D, N] = R(""), y = e == null ? void 0 : e.id, T = F(
487
+ const r = e.subject, m = e.type, c = (i = e.options) == null ? void 0 : i.options, [I, u] = R(!1), [h, y] = R(!1), [D, N] = R(""), A = e == null ? void 0 : e.id, T = F(
480
488
  async (v) => {
481
- if (y) {
482
- const g = v.currentTarget.value;
483
- N(g), A(!0), await t(y, g), A(!1);
489
+ if (A) {
490
+ const f = v.currentTarget.value;
491
+ N(f), y(!0), await t(A, f), y(!1);
484
492
  }
485
493
  },
486
- [y, N, t]
494
+ [A, N, t]
487
495
  ), a = F(() => {
488
- d(!0), setTimeout(n, 3e3);
496
+ u(!0), setTimeout(n, 3e3);
489
497
  }, [n]), l = W(
490
498
  () => e == null ? void 0 : e.answers.find((v) => v.youVoted === !0),
491
499
  [e]
492
- ), c = W(
500
+ ), d = W(
493
501
  () => !!(e != null && e.answers.find((v) => v.correct === !0)),
494
502
  [e]
495
- ), f = W(() => e ? e.answers.map((v) => {
496
- var g;
503
+ ), g = W(() => e ? e.answers.map((v) => {
504
+ var f;
497
505
  return {
498
506
  ...v,
499
507
  questionVoted: !!l,
500
508
  youSelected: D === v.id,
501
509
  isLoading: h,
502
- hasCorrectAnswer: c,
510
+ hasCorrectAnswer: d,
503
511
  questionType: e.type,
504
- answerTimeExpired: m,
512
+ answerTimeExpired: I,
505
513
  questionStatus: e.status,
506
- imageMode: (g = e.appearance) == null ? void 0 : g.images,
514
+ imageMode: (f = e.appearance) == null ? void 0 : f.images,
507
515
  // ToDo: Figure out why imageMode is not in the response
508
516
  onVote: T
509
517
  };
510
- }) : [], [c, m, h, e, l, T, D]), M = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0;
518
+ }) : [], [d, I, h, e, l, T, D]), M = c && (c.case === "trivia" || c.case === "prediction") ? c.value : void 0;
511
519
  return /* @__PURE__ */ s(te, { "data-question-header": "true", children: /* @__PURE__ */ s(Et, { children: /* @__PURE__ */ p(Lt, { children: [
512
520
  M && /* @__PURE__ */ s(
513
521
  bt,
@@ -515,21 +523,24 @@ const Pe = /* @__PURE__ */ o("div")({
515
523
  feedbackMessages: M,
516
524
  questionVoted: !!l,
517
525
  questionVotedCorrectly: l == null ? void 0 : l.correct,
518
- questionType: I,
519
- hasCorrectAnswer: c,
526
+ questionType: m,
527
+ hasCorrectAnswer: d,
520
528
  questionStatus: e.status
521
529
  }
522
530
  ),
523
531
  e.type !== x.PREDICTION && /* @__PURE__ */ s(
524
- fn,
532
+ gn,
525
533
  {
526
- title: m ? "Time expired" : "To win",
527
- points: m ? void 0 : 100,
534
+ title: I ? "Time expired" : e.type === x.POLL ? "Time remaining" : "To win",
535
+ points: I ? void 0 : 100,
528
536
  onTimerExpired: a,
529
- isTimer: !0
537
+ questionType: e.type,
538
+ isTimer: !0,
539
+ isPlayingTimer: !l,
540
+ timerDuration: l ? 0 : 30
530
541
  }
531
542
  ),
532
- m ? /* @__PURE__ */ s(
543
+ I ? /* @__PURE__ */ s(
533
544
  xt,
534
545
  {
535
546
  title: "More to come...",
@@ -537,7 +548,7 @@ const Pe = /* @__PURE__ */ o("div")({
537
548
  }
538
549
  ) : /* @__PURE__ */ p(b, { children: [
539
550
  /* @__PURE__ */ s($t, { "data-isPrediction": e.type === x.PREDICTION, children: r }),
540
- /* @__PURE__ */ s(Rt, { children: f.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
551
+ /* @__PURE__ */ s(Rt, { children: g.map((v) => /* @__PURE__ */ s(en, { ...v }, v.id)) })
541
552
  ] })
542
553
  ] }) }) });
543
554
  }, Mn = /* @__PURE__ */ o("div")({
@@ -552,11 +563,11 @@ const Pe = /* @__PURE__ */ o("div")({
552
563
  name: "Title",
553
564
  class: "t5et2jt",
554
565
  propsAsIs: !1
555
- }), An = /* @__PURE__ */ o("div")({
566
+ }), yn = /* @__PURE__ */ o("div")({
556
567
  name: "Description",
557
568
  class: "d1i2kpk2",
558
569
  propsAsIs: !1
559
- }), yn = /* @__PURE__ */ o("div")({
570
+ }), An = /* @__PURE__ */ o("div")({
560
571
  name: "DateWrap",
561
572
  class: "dd3lh3p",
562
573
  propsAsIs: !1
@@ -567,26 +578,26 @@ const Pe = /* @__PURE__ */ o("div")({
567
578
  }), xe = ({ created: e, image: t, title: n, instantView: i }) => {
568
579
  const r = W(() => {
569
580
  if (e) {
570
- const u = new Date(e);
571
- if (Xe(u))
581
+ const c = new Date(e);
582
+ if (Xe(c))
572
583
  return {
573
- date: Je(u),
574
- time: Ke(u)
584
+ date: Je(c),
585
+ time: Ke(c)
575
586
  };
576
587
  }
577
588
  return null;
578
- }, [e]), I = (i == null ? void 0 : i.image) || t;
589
+ }, [e]), m = (i == null ? void 0 : i.image) || t;
579
590
  return /* @__PURE__ */ p(Mn, { children: [
580
- r && /* @__PURE__ */ p(yn, { children: [
591
+ r && /* @__PURE__ */ p(An, { children: [
581
592
  r.date,
582
593
  " · ",
583
594
  r.time
584
595
  ] }),
585
596
  (i == null ? void 0 : i.video) && /* @__PURE__ */ s($e, { source: i.video.url, poster: i.video.thumbnailUrl }),
586
- I && /* @__PURE__ */ s(Tn, { src: I }),
597
+ m && /* @__PURE__ */ s(Tn, { src: m }),
587
598
  /* @__PURE__ */ p(vn, { children: [
588
599
  /* @__PURE__ */ s(Nn, { children: (i == null ? void 0 : i.heading) || n }),
589
- /* @__PURE__ */ s(An, { children: i == null ? void 0 : i.body })
600
+ /* @__PURE__ */ s(yn, { children: i == null ? void 0 : i.body })
590
601
  ] })
591
602
  ] });
592
603
  }, Dn = /* @__PURE__ */ o("div")({
@@ -624,7 +635,7 @@ const Pe = /* @__PURE__ */ o("div")({
624
635
  loading: i,
625
636
  data: r
626
637
  } = e;
627
- return !i && r ? /* @__PURE__ */ s(gn, {
638
+ return !i && r ? /* @__PURE__ */ s(fn, {
628
639
  vote: t,
629
640
  close: n,
630
641
  openedQuestion: r
@@ -638,7 +649,7 @@ const Pe = /* @__PURE__ */ o("div")({
638
649
  return null;
639
650
  const r = n.type;
640
651
  return /* @__PURE__ */ p(xn, {
641
- children: [/* @__PURE__ */ s(ye, {
652
+ children: [/* @__PURE__ */ s(Ae, {
642
653
  close: e.closeQuestion,
643
654
  type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
644
655
  }), r === "question" && /* @__PURE__ */ s(On, {
@@ -723,13 +734,13 @@ function Qn(e, t) {
723
734
  }
724
735
  function G(e, t) {
725
736
  t === void 0 && (t = Qn);
726
- var n, i = [], r, I = !1;
727
- function u() {
728
- for (var m = [], d = 0; d < arguments.length; d++)
729
- m[d] = arguments[d];
730
- return I && n === this && t(m, i) || (r = e.apply(this, m), I = !0, n = this, i = m), r;
737
+ var n, i = [], r, m = !1;
738
+ function c() {
739
+ for (var I = [], u = 0; u < arguments.length; u++)
740
+ I[u] = arguments[u];
741
+ return m && n === this && t(I, i) || (r = e.apply(this, I), m = !0, n = this, i = I), r;
731
742
  }
732
- return u;
743
+ return c;
733
744
  }
734
745
  var Un = typeof performance == "object" && typeof performance.now == "function", Ie = Un ? function() {
735
746
  return performance.now();
@@ -750,7 +761,7 @@ function _n(e, t) {
750
761
  return r;
751
762
  }
752
763
  var J = -1;
753
- function fe(e) {
764
+ function ge(e) {
754
765
  if (e === void 0 && (e = !1), J === -1 || e) {
755
766
  var t = document.createElement("div"), n = t.style;
756
767
  n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), J = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
@@ -758,7 +769,7 @@ function fe(e) {
758
769
  return J;
759
770
  }
760
771
  var w = null;
761
- function ge(e) {
772
+ function fe(e) {
762
773
  if (e === void 0 && (e = !1), w === null || e) {
763
774
  var t = document.createElement("div"), n = t.style;
764
775
  n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
@@ -767,41 +778,41 @@ function ge(e) {
767
778
  }
768
779
  return w;
769
780
  }
770
- var qn = 150, Yn = function(t, n) {
781
+ var qn = 150, Pn = function(t, n) {
771
782
  return t;
772
783
  };
773
- function Pn(e) {
774
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, I = e.getOffsetForIndexAndAlignment, u = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, d = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, A = e.validateProps;
784
+ function Yn(e) {
785
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, m = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, I = e.getStopIndexForStartIndex, u = e.initInstanceProps, h = e.shouldResetStyleCacheOnItemSizeChange, y = e.validateProps;
775
786
  return t = /* @__PURE__ */ function(D) {
776
787
  $n(N, D);
777
788
  function N(T) {
778
789
  var a;
779
- return a = D.call(this, T) || this, a._instanceProps = d(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
790
+ return a = D.call(this, T) || this, a._instanceProps = u(a.props, pe(a)), a._outerRef = void 0, a._resetIsScrollingTimeoutId = null, a.state = {
780
791
  instance: pe(a),
781
792
  isScrolling: !1,
782
793
  scrollDirection: "forward",
783
794
  scrollOffset: typeof a.props.initialScrollOffset == "number" ? a.props.initialScrollOffset : 0,
784
795
  scrollUpdateWasRequested: !1
785
- }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = G(function(l, c, f, M) {
796
+ }, a._callOnItemsRendered = void 0, a._callOnItemsRendered = G(function(l, d, g, M) {
786
797
  return a.props.onItemsRendered({
787
798
  overscanStartIndex: l,
788
- overscanStopIndex: c,
789
- visibleStartIndex: f,
799
+ overscanStopIndex: d,
800
+ visibleStartIndex: g,
790
801
  visibleStopIndex: M
791
802
  });
792
- }), a._callOnScroll = void 0, a._callOnScroll = G(function(l, c, f) {
803
+ }), a._callOnScroll = void 0, a._callOnScroll = G(function(l, d, g) {
793
804
  return a.props.onScroll({
794
805
  scrollDirection: l,
795
- scrollOffset: c,
796
- scrollUpdateWasRequested: f
806
+ scrollOffset: d,
807
+ scrollUpdateWasRequested: g
797
808
  });
798
809
  }), a._getItemStyle = void 0, a._getItemStyle = function(l) {
799
- var c = a.props, f = c.direction, M = c.itemSize, v = c.layout, g = a._getItemStyleCache(h && M, h && v, h && f), S;
800
- if (g.hasOwnProperty(l))
801
- S = g[l];
810
+ var d = a.props, g = d.direction, M = d.itemSize, v = d.layout, f = a._getItemStyleCache(h && M, h && v, h && g), S;
811
+ if (f.hasOwnProperty(l))
812
+ S = f[l];
802
813
  else {
803
- var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), C = f === "horizontal" || v === "horizontal", U = f === "rtl", _ = C ? z : 0;
804
- g[l] = S = {
814
+ var z = n(a.props, l, a._instanceProps), O = r(a.props, l, a._instanceProps), C = g === "horizontal" || v === "horizontal", U = g === "rtl", _ = C ? z : 0;
815
+ f[l] = S = {
805
816
  position: "absolute",
806
817
  left: U ? void 0 : _,
807
818
  right: U ? _ : void 0,
@@ -811,46 +822,46 @@ function Pn(e) {
811
822
  };
812
823
  }
813
824
  return S;
814
- }, a._getItemStyleCache = void 0, a._getItemStyleCache = G(function(l, c, f) {
825
+ }, a._getItemStyleCache = void 0, a._getItemStyleCache = G(function(l, d, g) {
815
826
  return {};
816
827
  }), a._onScrollHorizontal = function(l) {
817
- var c = l.currentTarget, f = c.clientWidth, M = c.scrollLeft, v = c.scrollWidth;
818
- a.setState(function(g) {
819
- if (g.scrollOffset === M)
828
+ var d = l.currentTarget, g = d.clientWidth, M = d.scrollLeft, v = d.scrollWidth;
829
+ a.setState(function(f) {
830
+ if (f.scrollOffset === M)
820
831
  return null;
821
832
  var S = a.props.direction, z = M;
822
833
  if (S === "rtl")
823
- switch (ge()) {
834
+ switch (fe()) {
824
835
  case "negative":
825
836
  z = -M;
826
837
  break;
827
838
  case "positive-descending":
828
- z = v - f - M;
839
+ z = v - g - M;
829
840
  break;
830
841
  }
831
- return z = Math.max(0, Math.min(z, v - f)), {
842
+ return z = Math.max(0, Math.min(z, v - g)), {
832
843
  isScrolling: !0,
833
- scrollDirection: g.scrollOffset < M ? "forward" : "backward",
844
+ scrollDirection: f.scrollOffset < M ? "forward" : "backward",
834
845
  scrollOffset: z,
835
846
  scrollUpdateWasRequested: !1
836
847
  };
837
848
  }, a._resetIsScrollingDebounced);
838
849
  }, a._onScrollVertical = function(l) {
839
- var c = l.currentTarget, f = c.clientHeight, M = c.scrollHeight, v = c.scrollTop;
840
- a.setState(function(g) {
841
- if (g.scrollOffset === v)
850
+ var d = l.currentTarget, g = d.clientHeight, M = d.scrollHeight, v = d.scrollTop;
851
+ a.setState(function(f) {
852
+ if (f.scrollOffset === v)
842
853
  return null;
843
- var S = Math.max(0, Math.min(v, M - f));
854
+ var S = Math.max(0, Math.min(v, M - g));
844
855
  return {
845
856
  isScrolling: !0,
846
- scrollDirection: g.scrollOffset < S ? "forward" : "backward",
857
+ scrollDirection: f.scrollOffset < S ? "forward" : "backward",
847
858
  scrollOffset: S,
848
859
  scrollUpdateWasRequested: !1
849
860
  };
850
861
  }, a._resetIsScrollingDebounced);
851
862
  }, a._outerRefSetter = function(l) {
852
- var c = a.props.outerRef;
853
- a._outerRef = l, typeof c == "function" ? c(l) : c != null && typeof c == "object" && c.hasOwnProperty("current") && (c.current = l);
863
+ var d = a.props.outerRef;
864
+ a._outerRef = l, typeof d == "function" ? d(l) : d != null && typeof d == "object" && d.hasOwnProperty("current") && (d.current = l);
854
865
  }, a._resetIsScrollingDebounced = function() {
855
866
  a._resetIsScrollingTimeoutId !== null && he(a._resetIsScrollingTimeoutId), a._resetIsScrollingTimeoutId = _n(a._resetIsScrolling, qn);
856
867
  }, a._resetIsScrolling = function() {
@@ -862,10 +873,10 @@ function Pn(e) {
862
873
  }, a;
863
874
  }
864
875
  N.getDerivedStateFromProps = function(a, l) {
865
- return Wn(a, l), A(a), null;
876
+ return Wn(a, l), y(a), null;
866
877
  };
867
- var y = N.prototype;
868
- return y.scrollTo = function(a) {
878
+ var A = N.prototype;
879
+ return A.scrollTo = function(a) {
869
880
  a = Math.max(0, a), this.setState(function(l) {
870
881
  return l.scrollOffset === a ? null : {
871
882
  scrollDirection: l.scrollOffset < a ? "forward" : "backward",
@@ -873,51 +884,51 @@ function Pn(e) {
873
884
  scrollUpdateWasRequested: !0
874
885
  };
875
886
  }, this._resetIsScrollingDebounced);
876
- }, y.scrollToItem = function(a, l) {
887
+ }, A.scrollToItem = function(a, l) {
877
888
  l === void 0 && (l = "auto");
878
- var c = this.props, f = c.itemCount, M = c.layout, v = this.state.scrollOffset;
879
- a = Math.max(0, Math.min(a, f - 1));
880
- var g = 0;
889
+ var d = this.props, g = d.itemCount, M = d.layout, v = this.state.scrollOffset;
890
+ a = Math.max(0, Math.min(a, g - 1));
891
+ var f = 0;
881
892
  if (this._outerRef) {
882
893
  var S = this._outerRef;
883
- M === "vertical" ? g = S.scrollWidth > S.clientWidth ? fe() : 0 : g = S.scrollHeight > S.clientHeight ? fe() : 0;
894
+ M === "vertical" ? f = S.scrollWidth > S.clientWidth ? ge() : 0 : f = S.scrollHeight > S.clientHeight ? ge() : 0;
884
895
  }
885
- this.scrollTo(I(this.props, a, l, v, this._instanceProps, g));
886
- }, y.componentDidMount = function() {
887
- var a = this.props, l = a.direction, c = a.initialScrollOffset, f = a.layout;
888
- if (typeof c == "number" && this._outerRef != null) {
896
+ this.scrollTo(m(this.props, a, l, v, this._instanceProps, f));
897
+ }, A.componentDidMount = function() {
898
+ var a = this.props, l = a.direction, d = a.initialScrollOffset, g = a.layout;
899
+ if (typeof d == "number" && this._outerRef != null) {
889
900
  var M = this._outerRef;
890
- l === "horizontal" || f === "horizontal" ? M.scrollLeft = c : M.scrollTop = c;
901
+ l === "horizontal" || g === "horizontal" ? M.scrollLeft = d : M.scrollTop = d;
891
902
  }
892
903
  this._callPropsCallbacks();
893
- }, y.componentDidUpdate = function() {
894
- var a = this.props, l = a.direction, c = a.layout, f = this.state, M = f.scrollOffset, v = f.scrollUpdateWasRequested;
904
+ }, A.componentDidUpdate = function() {
905
+ var a = this.props, l = a.direction, d = a.layout, g = this.state, M = g.scrollOffset, v = g.scrollUpdateWasRequested;
895
906
  if (v && this._outerRef != null) {
896
- var g = this._outerRef;
897
- if (l === "horizontal" || c === "horizontal")
907
+ var f = this._outerRef;
908
+ if (l === "horizontal" || d === "horizontal")
898
909
  if (l === "rtl")
899
- switch (ge()) {
910
+ switch (fe()) {
900
911
  case "negative":
901
- g.scrollLeft = -M;
912
+ f.scrollLeft = -M;
902
913
  break;
903
914
  case "positive-ascending":
904
- g.scrollLeft = M;
915
+ f.scrollLeft = M;
905
916
  break;
906
917
  default:
907
- var S = g.clientWidth, z = g.scrollWidth;
908
- g.scrollLeft = z - S - M;
918
+ var S = f.clientWidth, z = f.scrollWidth;
919
+ f.scrollLeft = z - S - M;
909
920
  break;
910
921
  }
911
922
  else
912
- g.scrollLeft = M;
923
+ f.scrollLeft = M;
913
924
  else
914
- g.scrollTop = M;
925
+ f.scrollTop = M;
915
926
  }
916
927
  this._callPropsCallbacks();
917
- }, y.componentWillUnmount = function() {
928
+ }, A.componentWillUnmount = function() {
918
929
  this._resetIsScrollingTimeoutId !== null && he(this._resetIsScrollingTimeoutId);
919
- }, y.render = function() {
920
- var a = this.props, l = a.children, c = a.className, f = a.direction, M = a.height, v = a.innerRef, g = a.innerElementType, S = a.innerTagName, z = a.itemCount, O = a.itemData, C = a.itemKey, U = C === void 0 ? Yn : C, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = f === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
930
+ }, A.render = function() {
931
+ 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, z = a.itemCount, O = a.itemData, C = a.itemKey, U = C === void 0 ? Pn : C, _ = a.layout, je = a.outerElementType, Oe = a.outerTagName, Ce = a.style, ke = a.useIsScrolling, we = a.width, ne = this.state.isScrolling, B = g === "horizontal" || _ === "horizontal", be = B ? this._onScrollHorizontal : this._onScrollVertical, se = this._getRangeToRender(), Ee = se[0], Le = se[1], ie = [];
921
932
  if (z > 0)
922
933
  for (var L = Ee; L <= Le; L++)
923
934
  ie.push(H(l, {
@@ -929,7 +940,7 @@ function Pn(e) {
929
940
  }));
930
941
  var re = i(this.props, this._instanceProps);
931
942
  return H(je || Oe || "div", {
932
- className: c,
943
+ className: d,
933
944
  onScroll: be,
934
945
  ref: this._outerRefSetter,
935
946
  style: X({
@@ -939,9 +950,9 @@ function Pn(e) {
939
950
  overflow: "auto",
940
951
  WebkitOverflowScrolling: "touch",
941
952
  willChange: "transform",
942
- direction: f
953
+ direction: g
943
954
  }, Ce)
944
- }, H(g || S || "div", {
955
+ }, H(f || S || "div", {
945
956
  children: ie,
946
957
  ref: v,
947
958
  style: {
@@ -950,26 +961,26 @@ function Pn(e) {
950
961
  width: B ? re : "100%"
951
962
  }
952
963
  }));
953
- }, y._callPropsCallbacks = function() {
964
+ }, A._callPropsCallbacks = function() {
954
965
  if (typeof this.props.onItemsRendered == "function") {
955
966
  var a = this.props.itemCount;
956
967
  if (a > 0) {
957
- var l = this._getRangeToRender(), c = l[0], f = l[1], M = l[2], v = l[3];
958
- this._callOnItemsRendered(c, f, M, v);
968
+ var l = this._getRangeToRender(), d = l[0], g = l[1], M = l[2], v = l[3];
969
+ this._callOnItemsRendered(d, g, M, v);
959
970
  }
960
971
  }
961
972
  if (typeof this.props.onScroll == "function") {
962
- var g = this.state, S = g.scrollDirection, z = g.scrollOffset, O = g.scrollUpdateWasRequested;
973
+ var f = this.state, S = f.scrollDirection, z = f.scrollOffset, O = f.scrollUpdateWasRequested;
963
974
  this._callOnScroll(S, z, O);
964
975
  }
965
- }, y._getRangeToRender = function() {
966
- var a = this.props, l = a.itemCount, c = a.overscanCount, f = this.state, M = f.isScrolling, v = f.scrollDirection, g = f.scrollOffset;
976
+ }, A._getRangeToRender = function() {
977
+ var a = this.props, l = a.itemCount, d = a.overscanCount, g = this.state, M = g.isScrolling, v = g.scrollDirection, f = g.scrollOffset;
967
978
  if (l === 0)
968
979
  return [0, 0, 0, 0];
969
- var S = u(this.props, g, this._instanceProps), z = m(this.props, S, g, this._instanceProps), O = !M || v === "backward" ? Math.max(1, c) : 1, C = !M || v === "forward" ? Math.max(1, c) : 1;
980
+ var S = c(this.props, f, this._instanceProps), z = I(this.props, S, f, this._instanceProps), O = !M || v === "backward" ? Math.max(1, d) : 1, C = !M || v === "forward" ? Math.max(1, d) : 1;
970
981
  return [Math.max(0, S - O), Math.max(0, Math.min(l - 1, z + C)), S, z];
971
982
  }, N;
972
- }(Ae), t.defaultProps = {
983
+ }(ye), t.defaultProps = {
973
984
  direction: "ltr",
974
985
  itemData: void 0,
975
986
  layout: "vertical",
@@ -979,7 +990,7 @@ function Pn(e) {
979
990
  }
980
991
  var Wn = function(t, n) {
981
992
  t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
982
- }, Vn = /* @__PURE__ */ Pn({
993
+ }, Vn = /* @__PURE__ */ Yn({
983
994
  getItemOffset: function(t, n) {
984
995
  var i = t.itemSize;
985
996
  return n * i;
@@ -992,20 +1003,20 @@ var Wn = function(t, n) {
992
1003
  var n = t.itemCount, i = t.itemSize;
993
1004
  return i * n;
994
1005
  },
995
- getOffsetForIndexAndAlignment: function(t, n, i, r, I, u) {
996
- var m = t.direction, d = t.height, h = t.itemCount, A = t.itemSize, D = t.layout, N = t.width, y = m === "horizontal" || D === "horizontal", T = y ? N : d, a = Math.max(0, h * A - T), l = Math.min(a, n * A), c = Math.max(0, n * A - T + A + u);
997
- switch (i === "smart" && (r >= c - T && r <= l + T ? i = "auto" : i = "center"), i) {
1006
+ getOffsetForIndexAndAlignment: function(t, n, i, r, m, c) {
1007
+ var I = t.direction, u = t.height, h = t.itemCount, y = t.itemSize, D = t.layout, N = t.width, A = I === "horizontal" || D === "horizontal", T = A ? N : u, a = Math.max(0, h * y - T), l = Math.min(a, n * y), d = Math.max(0, n * y - T + y + c);
1008
+ switch (i === "smart" && (r >= d - T && r <= l + T ? i = "auto" : i = "center"), i) {
998
1009
  case "start":
999
1010
  return l;
1000
1011
  case "end":
1001
- return c;
1012
+ return d;
1002
1013
  case "center": {
1003
- var f = Math.round(c + (l - c) / 2);
1004
- return f < Math.ceil(T / 2) ? 0 : f > a + Math.floor(T / 2) ? a : f;
1014
+ var g = Math.round(d + (l - d) / 2);
1015
+ return g < Math.ceil(T / 2) ? 0 : g > a + Math.floor(T / 2) ? a : g;
1005
1016
  }
1006
1017
  case "auto":
1007
1018
  default:
1008
- return r >= c && r <= l ? r : r < c ? c : l;
1019
+ return r >= d && r <= l ? r : r < d ? d : l;
1009
1020
  }
1010
1021
  },
1011
1022
  getStartIndexForOffset: function(t, n) {
@@ -1013,10 +1024,10 @@ var Wn = function(t, n) {
1013
1024
  return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
1014
1025
  },
1015
1026
  getStopIndexForStartIndex: function(t, n, i) {
1016
- var r = t.direction, I = t.height, u = t.itemCount, m = t.itemSize, d = t.layout, h = t.width, A = r === "horizontal" || d === "horizontal", D = n * m, N = A ? h : I, y = Math.ceil((N + i - D) / m);
1027
+ var r = t.direction, m = t.height, c = t.itemCount, I = t.itemSize, u = t.layout, h = t.width, y = r === "horizontal" || u === "horizontal", D = n * I, N = y ? h : m, A = Math.ceil((N + i - D) / I);
1017
1028
  return Math.max(0, Math.min(
1018
- u - 1,
1019
- n + y - 1
1029
+ c - 1,
1030
+ n + A - 1
1020
1031
  // -1 is because stop index is inclusive
1021
1032
  ));
1022
1033
  },
@@ -1032,24 +1043,24 @@ function Fn(e) {
1032
1043
  return !(i > n || r < t);
1033
1044
  }
1034
1045
  function Bn(e) {
1035
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, I = e.stopIndex, u = [], m = null, d = null, h = r; h <= I; h++) {
1036
- var A = t(h);
1037
- A ? d !== null && (u.push(m, d), m = d = null) : (d = h, m === null && (m = h));
1046
+ for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, m = e.stopIndex, c = [], I = null, u = null, h = r; h <= m; h++) {
1047
+ var y = t(h);
1048
+ y ? u !== null && (c.push(I, u), I = u = null) : (u = h, I === null && (I = h));
1038
1049
  }
1039
- if (d !== null) {
1040
- for (var D = Math.min(Math.max(d, m + i - 1), n - 1), N = d + 1; N <= D && !t(N); N++)
1041
- d = N;
1042
- u.push(m, d);
1050
+ if (u !== null) {
1051
+ for (var D = Math.min(Math.max(u, I + i - 1), n - 1), N = u + 1; N <= D && !t(N); N++)
1052
+ u = N;
1053
+ c.push(I, u);
1043
1054
  }
1044
- if (u.length)
1045
- for (; u[1] - u[0] + 1 < i && u[0] > 0; ) {
1046
- var y = u[0] - 1;
1047
- if (!t(y))
1048
- u[0] = y;
1055
+ if (c.length)
1056
+ for (; c[1] - c[0] + 1 < i && c[0] > 0; ) {
1057
+ var A = c[0] - 1;
1058
+ if (!t(A))
1059
+ c[0] = A;
1049
1060
  else
1050
1061
  break;
1051
1062
  }
1052
- return u;
1063
+ return c;
1053
1064
  }
1054
1065
  var Hn = function(e, t) {
1055
1066
  if (!(e instanceof t))
@@ -1082,16 +1093,16 @@ var Hn = function(e, t) {
1082
1093
  }, Jn = function(e) {
1083
1094
  Gn(t, e);
1084
1095
  function t() {
1085
- var n, i, r, I;
1096
+ var n, i, r, m;
1086
1097
  Hn(this, t);
1087
- for (var u = arguments.length, m = Array(u), d = 0; d < u; d++)
1088
- m[d] = arguments[d];
1089
- return I = (i = (r = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(m))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(h) {
1090
- var A = h.visibleStartIndex, D = h.visibleStopIndex;
1091
- r._lastRenderedStartIndex = A, r._lastRenderedStopIndex = D, r._ensureRowsLoaded(A, D);
1098
+ for (var c = arguments.length, I = Array(c), u = 0; u < c; u++)
1099
+ I[u] = arguments[u];
1100
+ return m = (i = (r = Me(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(I))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(h) {
1101
+ var y = h.visibleStartIndex, D = h.visibleStopIndex;
1102
+ r._lastRenderedStartIndex = y, r._lastRenderedStopIndex = D, r._ensureRowsLoaded(y, D);
1092
1103
  }, r._setRef = function(h) {
1093
1104
  r._listRef = h;
1094
- }, i), Me(r, I);
1105
+ }, i), Me(r, m);
1095
1106
  }
1096
1107
  return Zn(t, [{
1097
1108
  key: "resetloadMoreItemsCache",
@@ -1115,39 +1126,39 @@ var Hn = function(e, t) {
1115
1126
  }, {
1116
1127
  key: "_ensureRowsLoaded",
1117
1128
  value: function(i, r) {
1118
- var I = this.props, u = I.isItemLoaded, m = I.itemCount, d = I.minimumBatchSize, h = d === void 0 ? 10 : d, A = I.threshold, D = A === void 0 ? 15 : A, N = Bn({
1119
- isItemLoaded: u,
1120
- itemCount: m,
1129
+ var m = this.props, c = m.isItemLoaded, I = m.itemCount, u = m.minimumBatchSize, h = u === void 0 ? 10 : u, y = m.threshold, D = y === void 0 ? 15 : y, N = Bn({
1130
+ isItemLoaded: c,
1131
+ itemCount: I,
1121
1132
  minimumBatchSize: h,
1122
1133
  startIndex: Math.max(0, i - D),
1123
- stopIndex: Math.min(m - 1, r + D)
1134
+ stopIndex: Math.min(I - 1, r + D)
1124
1135
  });
1125
- (this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(y, T) {
1126
- return N[T] !== y;
1136
+ (this._memoizedUnloadedRanges.length !== N.length || this._memoizedUnloadedRanges.some(function(A, T) {
1137
+ return N[T] !== A;
1127
1138
  })) && (this._memoizedUnloadedRanges = N, this._loadUnloadedRanges(N));
1128
1139
  }
1129
1140
  }, {
1130
1141
  key: "_loadUnloadedRanges",
1131
1142
  value: function(i) {
1132
- for (var r = this, I = this.props.loadMoreItems || this.props.loadMoreRows, u = function(h) {
1133
- var A = i[h], D = i[h + 1], N = I(A, D);
1143
+ for (var r = this, m = this.props.loadMoreItems || this.props.loadMoreRows, c = function(h) {
1144
+ var y = i[h], D = i[h + 1], N = m(y, D);
1134
1145
  N != null && N.then(function() {
1135
1146
  if (Fn({
1136
1147
  lastRenderedStartIndex: r._lastRenderedStartIndex,
1137
1148
  lastRenderedStopIndex: r._lastRenderedStopIndex,
1138
- startIndex: A,
1149
+ startIndex: y,
1139
1150
  stopIndex: D
1140
1151
  })) {
1141
1152
  if (r._listRef == null)
1142
1153
  return;
1143
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(A, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1154
+ typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(y, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1144
1155
  }
1145
1156
  });
1146
- }, m = 0; m < i.length; m += 2)
1147
- u(m);
1157
+ }, I = 0; I < i.length; I += 2)
1158
+ c(I);
1148
1159
  }
1149
1160
  }]), t;
1150
- }(Ae);
1161
+ }(ye);
1151
1162
  const Kn = /* @__PURE__ */ o("div")({
1152
1163
  name: "Container",
1153
1164
  class: "culdu4a",
@@ -1186,9 +1197,9 @@ const Kn = /* @__PURE__ */ o("div")({
1186
1197
  name: n,
1187
1198
  points: i,
1188
1199
  isCurrentUser: r,
1189
- openItemDetail: I,
1190
- style: u
1191
- }) => /* @__PURE__ */ p(Kn, { onClick: I, style: u, children: [
1200
+ openItemDetail: m,
1201
+ style: c
1202
+ }) => /* @__PURE__ */ p(Kn, { onClick: m, style: c, children: [
1192
1203
  /* @__PURE__ */ s(Xn, { children: e || 0 }),
1193
1204
  /* @__PURE__ */ p(ns, { children: [
1194
1205
  t ? /* @__PURE__ */ s(es, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(ts, { children: Te(n || "") }),
@@ -1207,30 +1218,30 @@ const Kn = /* @__PURE__ */ o("div")({
1207
1218
  currentUserId: t,
1208
1219
  openItemDetail: n,
1209
1220
  fetchMore: i
1210
- }) => /* @__PURE__ */ s(Re, { children: ({ width: r, height: I }) => /* @__PURE__ */ s(
1221
+ }) => /* @__PURE__ */ s(Re, { children: ({ width: r, height: m }) => /* @__PURE__ */ s(
1211
1222
  Jn,
1212
1223
  {
1213
- isItemLoaded: (u) => u < e.length,
1224
+ isItemLoaded: (c) => c < e.length,
1214
1225
  itemCount: e.length + 1,
1215
1226
  loadMoreItems: i,
1216
- children: ({ onItemsRendered: u, ref: m }) => /* @__PURE__ */ s(ls, { children: /* @__PURE__ */ s(
1227
+ children: ({ onItemsRendered: c, ref: I }) => /* @__PURE__ */ s(ls, { children: /* @__PURE__ */ s(
1217
1228
  Vn,
1218
1229
  {
1219
1230
  itemSize: 56,
1220
- onItemsRendered: u,
1221
- ref: m,
1231
+ onItemsRendered: c,
1232
+ ref: I,
1222
1233
  itemCount: e.length,
1223
1234
  width: r,
1224
- height: I,
1225
- children: ({ index: d, style: h }) => /* @__PURE__ */ s(
1235
+ height: m,
1236
+ children: ({ index: u, style: h }) => /* @__PURE__ */ s(
1226
1237
  as,
1227
1238
  {
1228
1239
  style: { ...h, maxHeight: 48 },
1229
- ...e[d],
1230
- openItemDetail: () => n(e[d].userId),
1231
- isCurrentUser: !!t && t === e[d].userId
1240
+ ...e[u],
1241
+ openItemDetail: () => n(e[u].userId),
1242
+ isCurrentUser: !!t && t === e[u].userId
1232
1243
  },
1233
- e[d].userId
1244
+ e[u].userId
1234
1245
  )
1235
1246
  }
1236
1247
  ) })
@@ -1284,11 +1295,11 @@ const Kn = /* @__PURE__ */ o("div")({
1284
1295
  name: "QuestionAction",
1285
1296
  class: "q105uluy",
1286
1297
  propsAsIs: !1
1287
- }), fs = () => j, P = /* @__PURE__ */ o(fs())({
1298
+ }), gs = () => j, Y = /* @__PURE__ */ o(gs())({
1288
1299
  name: "QuestionActionIcon",
1289
1300
  class: "q1fa0b9h",
1290
1301
  propsAsIs: !0
1291
- }), gs = () => j, Ms = /* @__PURE__ */ o(gs())({
1302
+ }), fs = () => j, Ms = /* @__PURE__ */ o(fs())({
1292
1303
  name: "QuestionTypeIcon",
1293
1304
  class: "qxlt78s",
1294
1305
  propsAsIs: !0
@@ -1300,37 +1311,37 @@ const Kn = /* @__PURE__ */ o("div")({
1300
1311
  name: "QuestionContent",
1301
1312
  class: "q1uz5j1g",
1302
1313
  propsAsIs: !1
1303
- }), As = /* @__PURE__ */ o("button")({
1314
+ }), ys = /* @__PURE__ */ o("button")({
1304
1315
  name: "PlayButton",
1305
1316
  class: "p1pba9p1",
1306
1317
  propsAsIs: !1
1307
- }), ys = {
1308
- [q.LOST]: /* @__PURE__ */ s(P, { name: "icon-cross" }),
1309
- [q.WON]: /* @__PURE__ */ s(P, { name: "icon-check" }),
1310
- [q.UNSET]: /* @__PURE__ */ s(P, { name: "icon-arrow" }),
1311
- [q.DNP]: /* @__PURE__ */ s(P, { name: "icon-arrow" })
1318
+ }), As = {
1319
+ [q.LOST]: /* @__PURE__ */ s(Y, { name: "icon-cross" }),
1320
+ [q.WON]: /* @__PURE__ */ s(Y, { name: "icon-check" }),
1321
+ [q.UNSET]: /* @__PURE__ */ s(Y, { name: "icon-arrow" }),
1322
+ [q.DNP]: /* @__PURE__ */ s(Y, { name: "icon-arrow" })
1312
1323
  }, Ts = ({
1313
1324
  questionId: e,
1314
1325
  questionType: t,
1315
1326
  questionStatus: n,
1316
1327
  subject: i,
1317
1328
  openForVoting: r,
1318
- openQuestion: I,
1319
- status: u
1329
+ openQuestion: m,
1330
+ status: c
1320
1331
  }) => {
1321
- const m = Ne[t], d = ys[u];
1322
- return m ? /* @__PURE__ */ p(ps, { onClick: () => I == null ? void 0 : I(e), children: [
1332
+ const I = Ne[t], u = As[c];
1333
+ return I ? /* @__PURE__ */ p(ps, { onClick: () => m == null ? void 0 : m(e), children: [
1323
1334
  /* @__PURE__ */ p(Ns, { children: [
1324
1335
  /* @__PURE__ */ p(ms, { children: [
1325
- /* @__PURE__ */ s(Ms, { name: m.iconName }),
1336
+ /* @__PURE__ */ s(Ms, { name: I.iconName }),
1326
1337
  /* @__PURE__ */ p(vs, { children: [
1327
- m.label,
1338
+ I.label,
1328
1339
  t === x.TRIVIA && n === Q.RESOLVED && " • Expired"
1329
1340
  ] })
1330
1341
  ] }),
1331
1342
  /* @__PURE__ */ s(Is, { children: i || "" })
1332
1343
  ] }),
1333
- /* @__PURE__ */ s(hs, { children: r ? /* @__PURE__ */ s(As, { children: "Play" }) : d })
1344
+ /* @__PURE__ */ s(hs, { children: r ? /* @__PURE__ */ s(ys, { children: "Play" }) : u })
1334
1345
  ] }) : null;
1335
1346
  }, Ds = /* @__PURE__ */ o("div")({
1336
1347
  name: "Container",
@@ -1354,12 +1365,12 @@ const Kn = /* @__PURE__ */ o("div")({
1354
1365
  }), js = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(xs, { children: e == null ? void 0 : e.map((n) => {
1355
1366
  var i, r;
1356
1367
  if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1357
- const I = n.attributes.attributes.value;
1358
- return /* @__PURE__ */ s(Ts, { openQuestion: t, ...I }, I.questionId);
1368
+ const m = n.attributes.attributes.value;
1369
+ return /* @__PURE__ */ s(Ts, { openQuestion: t, ...m }, m.questionId);
1359
1370
  }
1360
1371
  if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1361
- const I = n.attributes.attributes.value;
1362
- return /* @__PURE__ */ s(zs, { openInsight: t, ...I }, I.questionId);
1372
+ const m = n.attributes.attributes.value;
1373
+ return /* @__PURE__ */ s(zs, { openInsight: t, ...m }, m.questionId);
1363
1374
  }
1364
1375
  return null;
1365
1376
  }) }), Os = ({ store: e, openQuestion: t }) => {
@@ -1437,7 +1448,7 @@ const Kn = /* @__PURE__ */ o("div")({
1437
1448
  }), i && /* @__PURE__ */ s(ve, {
1438
1449
  className: t,
1439
1450
  children: /* @__PURE__ */ p(bs, {
1440
- children: [/* @__PURE__ */ s(ye, {
1451
+ children: [/* @__PURE__ */ s(Ae, {
1441
1452
  label: "Friend's Rank",
1442
1453
  close: e.closeUser
1443
1454
  }), /* @__PURE__ */ s(K, {