@streamlayer/react 0.31.0 → 0.31.1

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,6 +1,6 @@
1
1
  import { jsxs as I, jsx as r, Fragment as $ } from "react/jsx-runtime";
2
2
  import { s as a, i as j, o as Se, Q as x, a as _, b as Q, m as Ye, E, r as ie, w as We, u as w, A as Fe, O as Ve, P as W, c as ee, n as Be, d as He } from "./masters.js";
3
- import U, { useRef as C, useState as L, useCallback as q, useEffect as Ge, useLayoutEffect as Ze, useMemo as B, createElement as Z, PureComponent as ze } from "react";
3
+ import U, { useRef as C, useState as L, useCallback as P, useEffect as Ge, useLayoutEffect as Ze, useMemo as B, createElement as Z, PureComponent as ze } from "react";
4
4
  const Je = /* @__PURE__ */ a("div")({
5
5
  name: "Container",
6
6
  class: "c1vwopgc",
@@ -148,7 +148,7 @@ const Je = /* @__PURE__ */ a("div")({
148
148
  streak: c,
149
149
  correct: l,
150
150
  incorrect: m,
151
- inTop: d,
151
+ inTop: u,
152
152
  successRate: f
153
153
  }) => /* @__PURE__ */ I(ht, { children: [
154
154
  /* @__PURE__ */ r(It, { children: /* @__PURE__ */ I(gt, { children: [
@@ -169,7 +169,7 @@ const Je = /* @__PURE__ */ a("div")({
169
169
  /* @__PURE__ */ r(zt, {}),
170
170
  /* @__PURE__ */ I("div", { children: [
171
171
  "TOP ",
172
- d || 0,
172
+ u || 0,
173
173
  "%"
174
174
  ] })
175
175
  ] })
@@ -231,7 +231,7 @@ const Je = /* @__PURE__ */ a("div")({
231
231
  name: "FeedbackText",
232
232
  class: "fx87qaj",
233
233
  propsAsIs: !1
234
- }), qt = ({
234
+ }), Pt = ({
235
235
  feedbackMessages: e,
236
236
  questionVotedCorrectly: t,
237
237
  questionVoted: n,
@@ -242,7 +242,7 @@ const Je = /* @__PURE__ */ a("div")({
242
242
  const l = n && (i === x.TRIVIA || i === x.PREDICTION);
243
243
  if (!l && c !== _.RESOLVED)
244
244
  return null;
245
- const m = i === x.PREDICTION && !s, d = t ? "correct" : "incorrect", f = t ? e.correctFeedback : e.incorrectFeedback;
245
+ const m = i === x.PREDICTION && !s, u = t ? "correct" : "incorrect", f = t ? e.correctFeedback : e.incorrectFeedback;
246
246
  return /* @__PURE__ */ I(Lt, { "data-isPrediction": m, children: [
247
247
  c === _.RESOLVED && i === x.TRIVIA && !n && /* @__PURE__ */ I($, { children: [
248
248
  /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r(j, { name: "questionExpired" }) }),
@@ -256,14 +256,14 @@ const Je = /* @__PURE__ */ a("div")({
256
256
  /* @__PURE__ */ r(J, { children: "Stay tuned to see if your prediction was correct." })
257
257
  ] }),
258
258
  l && s && /* @__PURE__ */ I($, { children: [
259
- /* @__PURE__ */ r(ce, { "data-feedbackType": d, children: /* @__PURE__ */ r(j, { name: d }) }),
259
+ /* @__PURE__ */ r(ce, { "data-feedbackType": u, children: /* @__PURE__ */ r(j, { name: u }) }),
260
260
  /* @__PURE__ */ r("div", { children: /* @__PURE__ */ I(de, { children: [
261
- /* @__PURE__ */ r(Ut, { "data-feedbackType": d, children: f == null ? void 0 : f.title }),
261
+ /* @__PURE__ */ r(Ut, { "data-feedbackType": u, children: f == null ? void 0 : f.title }),
262
262
  /* @__PURE__ */ r(J, { children: f == null ? void 0 : f.description })
263
263
  ] }) })
264
264
  ] })
265
265
  ] });
266
- }, Pt = /* @__PURE__ */ a("div")({
266
+ }, qt = /* @__PURE__ */ a("div")({
267
267
  name: "Container",
268
268
  class: "c14ielyq",
269
269
  propsAsIs: !1
@@ -360,7 +360,7 @@ const Je = /* @__PURE__ */ a("div")({
360
360
  // extra props
361
361
  onVote: l,
362
362
  youSelected: m,
363
- questionVoted: d,
363
+ questionVoted: u,
364
364
  // ToDo: Figure out why imageMode is not in the response, and delete default value
365
365
  imageMode: f,
366
366
  answerTimeExpired: A,
@@ -369,17 +369,17 @@ const Je = /* @__PURE__ */ a("div")({
369
369
  questionType: T,
370
370
  correct: D,
371
371
  hasCorrectAnswer: o
372
- } = e, u = an(e), p = ln({ questionType: T, questionVoted: d, correct: D, hasCorrectAnswer: o, questionStatus: v }), h = d || v === _.RESOLVED && T === x.PREDICTION;
372
+ } = e, d = an(e), p = ln({ questionType: T, questionVoted: u, correct: D, hasCorrectAnswer: o, questionStatus: v }), h = u || v === _.RESOLVED && T === x.PREDICTION;
373
373
  return /* @__PURE__ */ I(
374
374
  Vt,
375
375
  {
376
376
  value: n,
377
377
  "data-selected": m,
378
- "data-answerState": u,
379
- disabled: d || g || A,
378
+ "data-answerState": d,
379
+ disabled: u || g || A,
380
380
  onClick: l,
381
381
  children: [
382
- h && /* @__PURE__ */ r(Bt, { "data-answerState": u, style: { width: `${c}%` } }),
382
+ h && /* @__PURE__ */ r(Bt, { "data-answerState": d, style: { width: `${c}%` } }),
383
383
  /* @__PURE__ */ I(Ht, { children: [
384
384
  i && f && ((t = ue[f]) == null ? void 0 : t.call(ue, i)),
385
385
  /* @__PURE__ */ r(tn, { children: s }),
@@ -393,20 +393,20 @@ const Je = /* @__PURE__ */ a("div")({
393
393
  );
394
394
  };
395
395
  var pe = typeof window > "u" ? Ge : Ze, dn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: i = 0, onComplete: s, onUpdate: c }) => {
396
- let [l, m] = L(n), d = C(0), f = C(n), A = C(n * -1e3), v = C(null), g = C(null), T = C(null), D = (p) => {
396
+ let [l, m] = L(n), u = C(0), f = C(n), A = C(n * -1e3), v = C(null), g = C(null), T = C(null), D = (p) => {
397
397
  let h = p / 1e3;
398
398
  if (g.current === null) {
399
399
  g.current = h, v.current = requestAnimationFrame(D);
400
400
  return;
401
401
  }
402
- let M = h - g.current, N = d.current + M;
403
- g.current = h, d.current = N;
402
+ let M = h - g.current, N = u.current + M;
403
+ g.current = h, u.current = N;
404
404
  let y = f.current + (i === 0 ? N : (N / i | 0) * i), S = f.current + N, z = typeof t == "number" && S >= t;
405
405
  m(z ? t : y), z || (v.current = requestAnimationFrame(D));
406
406
  }, o = () => {
407
407
  v.current && cancelAnimationFrame(v.current), T.current && clearTimeout(T.current), g.current = null;
408
- }, u = q((p) => {
409
- o(), d.current = 0;
408
+ }, d = P((p) => {
409
+ o(), u.current = 0;
410
410
  let h = typeof p == "number" ? p : n;
411
411
  f.current = h, m(h), e && (v.current = requestAnimationFrame(D));
412
412
  }, [e, n]);
@@ -414,12 +414,12 @@ var pe = typeof window > "u" ? Ge : Ze, dn = ({ isPlaying: e, duration: t, start
414
414
  if (c == null || c(l), t && l >= t) {
415
415
  A.current += t * 1e3;
416
416
  let { shouldRepeat: p = !1, delay: h = 0, newStartAt: M } = (s == null ? void 0 : s(A.current / 1e3)) || {};
417
- p && (T.current = setTimeout(() => u(M), h * 1e3));
417
+ p && (T.current = setTimeout(() => d(M), h * 1e3));
418
418
  }
419
- }, [l, t]), pe(() => (e && (v.current = requestAnimationFrame(D)), o), [e, t, i]), { elapsedTime: l, reset: u };
419
+ }, [l, t]), pe(() => (e && (v.current = requestAnimationFrame(D)), o), [e, t, i]), { elapsedTime: l, reset: d };
420
420
  }, un = (e, t, n) => {
421
- let i = e / 2, s = t / 2, c = i - s, l = 2 * c, m = n === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * c;
422
- return { path: `m ${i},${s} a ${c},${c} 0 ${m} 0,${l} a ${c},${c} 0 ${m} 0,-${l}`, pathLength: d };
421
+ let i = e / 2, s = t / 2, c = i - s, l = 2 * c, m = n === "clockwise" ? "1,0" : "0,1", u = 2 * Math.PI * c;
422
+ return { path: `m ${i},${s} a ${c},${c} 0 ${m} 0,${l} a ${c},${c} 0 ${m} 0,-${l}`, pathLength: u };
423
423
  }, me = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, pn = (e) => ({ position: "relative", width: e, height: e }), mn = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Ce = (e, t, n, i, s) => {
424
424
  if (i === 0)
425
425
  return t;
@@ -438,10 +438,10 @@ var pe = typeof window > "u" ? Ge : Ze, dn = ({ isPlaying: e, duration: t, start
438
438
  return i[0];
439
439
  if (!c)
440
440
  return i[l];
441
- let m = s[l] - t, d = s[l] - s[l + 1], f = he(i[l]), A = he(i[l + 1]), v = !!e.isGrowing;
442
- return `rgb(${f.map((g, T) => Ce(m, g, A[T] - g, d, v) | 0).join(",")})`;
441
+ let m = s[l] - t, u = s[l] - s[l + 1], f = he(i[l]), A = he(i[l + 1]), v = !!e.isGrowing;
442
+ return `rgb(${f.map((g, T) => Ce(m, g, A[T] - g, u, v) | 0).join(",")})`;
443
443
  }, In = (e) => {
444
- let { duration: t, initialRemainingTime: n, updateInterval: i, size: s = 180, strokeWidth: c = 12, trailStrokeWidth: l, isPlaying: m = !1, isGrowing: d = !1, rotation: f = "clockwise", onComplete: A, onUpdate: v } = e, g = C(), T = Math.max(c, l ?? 0), { path: D, pathLength: o } = un(s, T, f), { elapsedTime: u } = dn({ isPlaying: m, duration: t, startAt: me(t, n), updateInterval: i, onUpdate: typeof v == "function" ? (h) => {
444
+ let { duration: t, initialRemainingTime: n, updateInterval: i, size: s = 180, strokeWidth: c = 12, trailStrokeWidth: l, isPlaying: m = !1, isGrowing: u = !1, rotation: f = "clockwise", onComplete: A, onUpdate: v } = e, g = C(), T = Math.max(c, l ?? 0), { path: D, pathLength: o } = un(s, T, f), { elapsedTime: d } = dn({ isPlaying: m, duration: t, startAt: me(t, n), updateInterval: i, onUpdate: typeof v == "function" ? (h) => {
445
445
  let M = Math.ceil(t - h);
446
446
  M !== g.current && (g.current = M, v(M));
447
447
  } : void 0, onComplete: typeof A == "function" ? (h) => {
@@ -449,11 +449,11 @@ var pe = typeof window > "u" ? Ge : Ze, dn = ({ isPlaying: e, duration: t, start
449
449
  let { shouldRepeat: N, delay: y, newInitialRemainingTime: S } = (M = A(h)) != null ? M : {};
450
450
  if (N)
451
451
  return { shouldRepeat: N, delay: y, newStartAt: me(t, S) };
452
- } : void 0 }), p = t - u;
453
- return { elapsedTime: u, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size: s, stroke: hn(e, p), strokeDashoffset: Ce(u, 0, o, t, d), strokeWidth: c };
452
+ } : void 0 }), p = t - d;
453
+ return { elapsedTime: d, path: D, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size: s, stroke: hn(e, p), strokeDashoffset: Ce(d, 0, o, t, u), strokeWidth: c };
454
454
  }, be = (e) => {
455
- let { children: t, strokeLinecap: n, trailColor: i, trailStrokeWidth: s } = e, { path: c, pathLength: l, stroke: m, strokeDashoffset: d, remainingTime: f, elapsedTime: A, size: v, strokeWidth: g } = In(e);
456
- return U.createElement("div", { style: pn(v) }, U.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: c, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: s ?? g }), U.createElement("path", { d: c, fill: "none", stroke: m, strokeLinecap: n ?? "round", strokeWidth: g, strokeDasharray: l, strokeDashoffset: d })), typeof t == "function" && U.createElement("div", { style: mn }, t({ remainingTime: f, elapsedTime: A, color: m })));
455
+ let { children: t, strokeLinecap: n, trailColor: i, trailStrokeWidth: s } = e, { path: c, pathLength: l, stroke: m, strokeDashoffset: u, remainingTime: f, elapsedTime: A, size: v, strokeWidth: g } = In(e);
456
+ return U.createElement("div", { style: pn(v) }, U.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: c, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: s ?? g }), U.createElement("path", { d: c, fill: "none", stroke: m, strokeLinecap: n ?? "round", strokeWidth: g, strokeDasharray: l, strokeDashoffset: u })), typeof t == "function" && U.createElement("div", { style: mn }, t({ remainingTime: f, elapsedTime: A, color: m })));
457
457
  };
458
458
  be.displayName = "CountdownCircleTimer";
459
459
  const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10, 0], Mn = /* @__PURE__ */ a("div")({
@@ -466,13 +466,13 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
466
466
  onTimerExpired: n
467
467
  }) => {
468
468
  const [i, s] = L(t > 10 ? vn : Ie), c = ({
469
- remainingTime: d
469
+ remainingTime: u
470
470
  }) => /* @__PURE__ */ r(Mn, {
471
- children: d
472
- }), l = q(() => {
471
+ children: u
472
+ }), l = P(() => {
473
473
  n == null || n(), s(yn);
474
- }, [n, s]), m = q((d) => {
475
- d === 10 && s(Ie);
474
+ }, [n, s]), m = P((u) => {
475
+ u === 10 && s(Ie);
476
476
  }, [s]);
477
477
  return /* @__PURE__ */ r(be, {
478
478
  isPlaying: e,
@@ -515,7 +515,14 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
515
515
  name: "PointsUnits",
516
516
  class: "pe5g05h",
517
517
  propsAsIs: !1
518
- }), On = ({ title: e, points: t, isPlayingTimer: n, isTimer: i, onTimerExpired: s }) => /* @__PURE__ */ I(An, { children: [
518
+ }), On = ({
519
+ title: e,
520
+ points: t,
521
+ isPlayingTimer: n,
522
+ isTimer: i,
523
+ timerDuration: s,
524
+ onTimerExpired: c
525
+ }) => /* @__PURE__ */ I(An, { children: [
519
526
  /* @__PURE__ */ I(Tn, { children: [
520
527
  e && /* @__PURE__ */ r(Dn, { children: e }),
521
528
  t !== void 0 && /* @__PURE__ */ I($, { children: [
@@ -526,10 +533,10 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
526
533
  ] })
527
534
  ] })
528
535
  ] }),
529
- i && /* @__PURE__ */ r(Nn, { isPlaying: n, onTimerExpired: s })
536
+ i && /* @__PURE__ */ r(Nn, { isPlaying: n, onTimerExpired: c, duration: s })
530
537
  ] }), wn = ({ openedQuestion: e, vote: t, close: n }) => {
531
538
  var i;
532
- const s = e.subject, c = e.type, l = (i = e.options) == null ? void 0 : i.options, [m, d] = L(!1), [f, A] = L(!1), [v, g] = L(""), T = e == null ? void 0 : e.id, D = q(
539
+ const s = e.subject, c = e.type, l = (i = e.options) == null ? void 0 : i.options, [m, u] = L(!1), [f, A] = L(!1), [v, g] = L(""), T = e == null ? void 0 : e.id, D = P(
533
540
  async (N) => {
534
541
  if (T) {
535
542
  const y = N.currentTarget.value;
@@ -537,9 +544,9 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
537
544
  }
538
545
  },
539
546
  [T, g, t]
540
- ), o = q(() => {
541
- d(!0), setTimeout(n, 3e3);
542
- }, [n]), u = B(
547
+ ), o = P(() => {
548
+ u(!0), setTimeout(n, 3e3);
549
+ }, [n]), d = B(
543
550
  () => e == null ? void 0 : e.answers.find((N) => N.youVoted === !0),
544
551
  [e]
545
552
  ), p = B(
@@ -549,7 +556,7 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
549
556
  var y;
550
557
  return {
551
558
  ...N,
552
- questionVoted: !!u,
559
+ questionVoted: !!d,
553
560
  youSelected: v === N.id,
554
561
  isLoading: f,
555
562
  hasCorrectAnswer: p,
@@ -560,14 +567,14 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
560
567
  // ToDo: Figure out why imageMode is not in the response
561
568
  onVote: D
562
569
  };
563
- }) : [], [p, m, f, e, u, D, v]), M = l && (l.case === "trivia" || l.case === "prediction") ? l.value : void 0;
564
- return /* @__PURE__ */ r(ie, { "data-question-header": "true", children: /* @__PURE__ */ r(Pt, { children: /* @__PURE__ */ I(Yt, { children: [
570
+ }) : [], [p, m, f, e, d, D, v]), M = l && (l.case === "trivia" || l.case === "prediction") ? l.value : void 0;
571
+ return /* @__PURE__ */ r(ie, { "data-question-header": "true", children: /* @__PURE__ */ r(qt, { children: /* @__PURE__ */ I(Yt, { children: [
565
572
  M && /* @__PURE__ */ r(
566
- qt,
573
+ Pt,
567
574
  {
568
575
  feedbackMessages: M,
569
- questionVoted: !!u,
570
- questionVotedCorrectly: u == null ? void 0 : u.correct,
576
+ questionVoted: !!d,
577
+ questionVotedCorrectly: d == null ? void 0 : d.correct,
571
578
  questionType: c,
572
579
  hasCorrectAnswer: p,
573
580
  questionStatus: e.status
@@ -579,7 +586,9 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
579
586
  title: m ? "Time expired" : "To win",
580
587
  points: m ? void 0 : 100,
581
588
  onTimerExpired: o,
582
- isTimer: !0
589
+ isTimer: !0,
590
+ isPlayingTimer: !d,
591
+ timerDuration: d ? 0 : 30
583
592
  }
584
593
  ),
585
594
  m ? /* @__PURE__ */ r(
@@ -656,11 +665,11 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
656
665
  "Explore more of the Masters History",
657
666
  /* @__PURE__ */ r(j, { name: "icon-external-link" })
658
667
  ] })
659
- ] }), qn = /* @__PURE__ */ a("div")({
668
+ ] }), Pn = /* @__PURE__ */ a("div")({
660
669
  name: "QuestionContainer",
661
670
  class: "qdri6g3",
662
671
  propsAsIs: !1
663
- }), Pn = ({
672
+ }), qn = ({
664
673
  openedQuestion: e
665
674
  }) => {
666
675
  var t;
@@ -690,7 +699,7 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
690
699
  if (!n)
691
700
  return null;
692
701
  const s = n.type;
693
- return /* @__PURE__ */ I(qn, {
702
+ return /* @__PURE__ */ I(Pn, {
694
703
  children: [/* @__PURE__ */ r(xe, {
695
704
  close: e.closeQuestion,
696
705
  type: ((t = n.attributes) == null ? void 0 : t.type) || x.UNSET
@@ -698,7 +707,7 @@ const fn = [E.PRIMARY_GREEN1, E.SECONDARY_RED1, E.SECONDARY_RED1], gn = [10, 10,
698
707
  vote: e.submitAnswer,
699
708
  close: e.closeQuestion,
700
709
  extendedQuestion: i
701
- }), s !== "question" && /* @__PURE__ */ r(Pn, {
710
+ }), s !== "question" && /* @__PURE__ */ r(qn, {
702
711
  openedQuestion: n
703
712
  })]
704
713
  });
@@ -778,8 +787,8 @@ function K(e, t) {
778
787
  t === void 0 && (t = Kn);
779
788
  var n, i = [], s, c = !1;
780
789
  function l() {
781
- for (var m = [], d = 0; d < arguments.length; d++)
782
- m[d] = arguments[d];
790
+ for (var m = [], u = 0; u < arguments.length; u++)
791
+ m[u] = arguments[u];
783
792
  return c && n === this && t(m, i) || (s = e.apply(this, m), c = !0, n = this, i = m), s;
784
793
  }
785
794
  return l;
@@ -824,50 +833,50 @@ var ti = 150, ni = function(t, n) {
824
833
  return t;
825
834
  };
826
835
  function ii(e) {
827
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, s = e.getItemSize, c = e.getOffsetForIndexAndAlignment, l = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, d = e.initInstanceProps, f = e.shouldResetStyleCacheOnItemSizeChange, A = e.validateProps;
836
+ var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, s = e.getItemSize, c = e.getOffsetForIndexAndAlignment, l = e.getStartIndexForOffset, m = e.getStopIndexForStartIndex, u = e.initInstanceProps, f = e.shouldResetStyleCacheOnItemSizeChange, A = e.validateProps;
828
837
  return t = /* @__PURE__ */ function(v) {
829
838
  Zn(g, v);
830
839
  function g(D) {
831
840
  var o;
832
- return o = v.call(this, D) || this, o._instanceProps = d(o.props, ge(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
841
+ return o = v.call(this, D) || this, o._instanceProps = u(o.props, ge(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
833
842
  instance: ge(o),
834
843
  isScrolling: !1,
835
844
  scrollDirection: "forward",
836
845
  scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
837
846
  scrollUpdateWasRequested: !1
838
- }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = K(function(u, p, h, M) {
847
+ }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = K(function(d, p, h, M) {
839
848
  return o.props.onItemsRendered({
840
- overscanStartIndex: u,
849
+ overscanStartIndex: d,
841
850
  overscanStopIndex: p,
842
851
  visibleStartIndex: h,
843
852
  visibleStopIndex: M
844
853
  });
845
- }), o._callOnScroll = void 0, o._callOnScroll = K(function(u, p, h) {
854
+ }), o._callOnScroll = void 0, o._callOnScroll = K(function(d, p, h) {
846
855
  return o.props.onScroll({
847
- scrollDirection: u,
856
+ scrollDirection: d,
848
857
  scrollOffset: p,
849
858
  scrollUpdateWasRequested: h
850
859
  });
851
- }), o._getItemStyle = void 0, o._getItemStyle = function(u) {
860
+ }), o._getItemStyle = void 0, o._getItemStyle = function(d) {
852
861
  var p = o.props, h = p.direction, M = p.itemSize, N = p.layout, y = o._getItemStyleCache(f && M, f && N, f && h), S;
853
- if (y.hasOwnProperty(u))
854
- S = y[u];
862
+ if (y.hasOwnProperty(d))
863
+ S = y[d];
855
864
  else {
856
- var z = n(o.props, u, o._instanceProps), k = s(o.props, u, o._instanceProps), O = h === "horizontal" || N === "horizontal", P = h === "rtl", Y = O ? z : 0;
857
- y[u] = S = {
865
+ var z = n(o.props, d, o._instanceProps), k = s(o.props, d, o._instanceProps), O = h === "horizontal" || N === "horizontal", q = h === "rtl", Y = O ? z : 0;
866
+ y[d] = S = {
858
867
  position: "absolute",
859
- left: P ? void 0 : Y,
860
- right: P ? Y : void 0,
868
+ left: q ? void 0 : Y,
869
+ right: q ? Y : void 0,
861
870
  top: O ? 0 : z,
862
871
  height: O ? "100%" : k,
863
872
  width: O ? k : "100%"
864
873
  };
865
874
  }
866
875
  return S;
867
- }, o._getItemStyleCache = void 0, o._getItemStyleCache = K(function(u, p, h) {
876
+ }, o._getItemStyleCache = void 0, o._getItemStyleCache = K(function(d, p, h) {
868
877
  return {};
869
- }), o._onScrollHorizontal = function(u) {
870
- var p = u.currentTarget, h = p.clientWidth, M = p.scrollLeft, N = p.scrollWidth;
878
+ }), o._onScrollHorizontal = function(d) {
879
+ var p = d.currentTarget, h = p.clientWidth, M = p.scrollLeft, N = p.scrollWidth;
871
880
  o.setState(function(y) {
872
881
  if (y.scrollOffset === M)
873
882
  return null;
@@ -888,8 +897,8 @@ function ii(e) {
888
897
  scrollUpdateWasRequested: !1
889
898
  };
890
899
  }, o._resetIsScrollingDebounced);
891
- }, o._onScrollVertical = function(u) {
892
- var p = u.currentTarget, h = p.clientHeight, M = p.scrollHeight, N = p.scrollTop;
900
+ }, o._onScrollVertical = function(d) {
901
+ var p = d.currentTarget, h = p.clientHeight, M = p.scrollHeight, N = p.scrollTop;
893
902
  o.setState(function(y) {
894
903
  if (y.scrollOffset === N)
895
904
  return null;
@@ -901,9 +910,9 @@ function ii(e) {
901
910
  scrollUpdateWasRequested: !1
902
911
  };
903
912
  }, o._resetIsScrollingDebounced);
904
- }, o._outerRefSetter = function(u) {
913
+ }, o._outerRefSetter = function(d) {
905
914
  var p = o.props.outerRef;
906
- o._outerRef = u, typeof p == "function" ? p(u) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = u);
915
+ o._outerRef = d, typeof p == "function" ? p(d) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = d);
907
916
  }, o._resetIsScrollingDebounced = function() {
908
917
  o._resetIsScrollingTimeoutId !== null && ye(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = ei(o._resetIsScrolling, ti);
909
918
  }, o._resetIsScrolling = function() {
@@ -914,20 +923,20 @@ function ii(e) {
914
923
  });
915
924
  }, o;
916
925
  }
917
- g.getDerivedStateFromProps = function(o, u) {
918
- return si(o, u), A(o), null;
926
+ g.getDerivedStateFromProps = function(o, d) {
927
+ return si(o, d), A(o), null;
919
928
  };
920
929
  var T = g.prototype;
921
930
  return T.scrollTo = function(o) {
922
- o = Math.max(0, o), this.setState(function(u) {
923
- return u.scrollOffset === o ? null : {
924
- scrollDirection: u.scrollOffset < o ? "forward" : "backward",
931
+ o = Math.max(0, o), this.setState(function(d) {
932
+ return d.scrollOffset === o ? null : {
933
+ scrollDirection: d.scrollOffset < o ? "forward" : "backward",
925
934
  scrollOffset: o,
926
935
  scrollUpdateWasRequested: !0
927
936
  };
928
937
  }, this._resetIsScrollingDebounced);
929
- }, T.scrollToItem = function(o, u) {
930
- u === void 0 && (u = "auto");
938
+ }, T.scrollToItem = function(o, d) {
939
+ d === void 0 && (d = "auto");
931
940
  var p = this.props, h = p.itemCount, M = p.layout, N = this.state.scrollOffset;
932
941
  o = Math.max(0, Math.min(o, h - 1));
933
942
  var y = 0;
@@ -935,20 +944,20 @@ function ii(e) {
935
944
  var S = this._outerRef;
936
945
  M === "vertical" ? y = S.scrollWidth > S.clientWidth ? Ne() : 0 : y = S.scrollHeight > S.clientHeight ? Ne() : 0;
937
946
  }
938
- this.scrollTo(c(this.props, o, u, N, this._instanceProps, y));
947
+ this.scrollTo(c(this.props, o, d, N, this._instanceProps, y));
939
948
  }, T.componentDidMount = function() {
940
- var o = this.props, u = o.direction, p = o.initialScrollOffset, h = o.layout;
949
+ var o = this.props, d = o.direction, p = o.initialScrollOffset, h = o.layout;
941
950
  if (typeof p == "number" && this._outerRef != null) {
942
951
  var M = this._outerRef;
943
- u === "horizontal" || h === "horizontal" ? M.scrollLeft = p : M.scrollTop = p;
952
+ d === "horizontal" || h === "horizontal" ? M.scrollLeft = p : M.scrollTop = p;
944
953
  }
945
954
  this._callPropsCallbacks();
946
955
  }, T.componentDidUpdate = function() {
947
- var o = this.props, u = o.direction, p = o.layout, h = this.state, M = h.scrollOffset, N = h.scrollUpdateWasRequested;
956
+ var o = this.props, d = o.direction, p = o.layout, h = this.state, M = h.scrollOffset, N = h.scrollUpdateWasRequested;
948
957
  if (N && this._outerRef != null) {
949
958
  var y = this._outerRef;
950
- if (u === "horizontal" || p === "horizontal")
951
- if (u === "rtl")
959
+ if (d === "horizontal" || p === "horizontal")
960
+ if (d === "rtl")
952
961
  switch (Ae()) {
953
962
  case "negative":
954
963
  y.scrollLeft = -M;
@@ -970,12 +979,12 @@ function ii(e) {
970
979
  }, T.componentWillUnmount = function() {
971
980
  this._resetIsScrollingTimeoutId !== null && ye(this._resetIsScrollingTimeoutId);
972
981
  }, T.render = function() {
973
- var o = this.props, u = o.children, p = o.className, h = o.direction, M = o.height, N = o.innerRef, y = o.innerElementType, S = o.innerTagName, z = o.itemCount, k = o.itemData, O = o.itemKey, P = O === void 0 ? ni : O, Y = o.layout, Ee = o.outerElementType, Le = o.outerTagName, Re = o.style, Qe = o.useIsScrolling, Ue = o.width, se = this.state.isScrolling, G = h === "horizontal" || Y === "horizontal", _e = G ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), qe = re[0], Pe = re[1], oe = [];
982
+ var o = this.props, d = o.children, p = o.className, h = o.direction, M = o.height, N = o.innerRef, y = o.innerElementType, S = o.innerTagName, z = o.itemCount, k = o.itemData, O = o.itemKey, q = O === void 0 ? ni : O, Y = o.layout, Ee = o.outerElementType, Le = o.outerTagName, Re = o.style, Qe = o.useIsScrolling, Ue = o.width, se = this.state.isScrolling, G = h === "horizontal" || Y === "horizontal", _e = G ? this._onScrollHorizontal : this._onScrollVertical, re = this._getRangeToRender(), Pe = re[0], qe = re[1], oe = [];
974
983
  if (z > 0)
975
- for (var R = qe; R <= Pe; R++)
976
- oe.push(Z(u, {
984
+ for (var R = Pe; R <= qe; R++)
985
+ oe.push(Z(d, {
977
986
  data: k,
978
- key: P(R, k),
987
+ key: q(R, k),
979
988
  index: R,
980
989
  isScrolling: Qe ? se : void 0,
981
990
  style: this._getItemStyle(R)
@@ -1007,7 +1016,7 @@ function ii(e) {
1007
1016
  if (typeof this.props.onItemsRendered == "function") {
1008
1017
  var o = this.props.itemCount;
1009
1018
  if (o > 0) {
1010
- var u = this._getRangeToRender(), p = u[0], h = u[1], M = u[2], N = u[3];
1019
+ var d = this._getRangeToRender(), p = d[0], h = d[1], M = d[2], N = d[3];
1011
1020
  this._callOnItemsRendered(p, h, M, N);
1012
1021
  }
1013
1022
  }
@@ -1016,11 +1025,11 @@ function ii(e) {
1016
1025
  this._callOnScroll(S, z, k);
1017
1026
  }
1018
1027
  }, T._getRangeToRender = function() {
1019
- var o = this.props, u = o.itemCount, p = o.overscanCount, h = this.state, M = h.isScrolling, N = h.scrollDirection, y = h.scrollOffset;
1020
- if (u === 0)
1028
+ var o = this.props, d = o.itemCount, p = o.overscanCount, h = this.state, M = h.isScrolling, N = h.scrollDirection, y = h.scrollOffset;
1029
+ if (d === 0)
1021
1030
  return [0, 0, 0, 0];
1022
1031
  var S = l(this.props, y, this._instanceProps), z = m(this.props, S, y, this._instanceProps), k = !M || N === "backward" ? Math.max(1, p) : 1, O = !M || N === "forward" ? Math.max(1, p) : 1;
1023
- return [Math.max(0, S - k), Math.max(0, Math.min(u - 1, z + O)), S, z];
1032
+ return [Math.max(0, S - k), Math.max(0, Math.min(d - 1, z + O)), S, z];
1024
1033
  }, g;
1025
1034
  }(ze), t.defaultProps = {
1026
1035
  direction: "ltr",
@@ -1046,19 +1055,19 @@ var si = function(t, n) {
1046
1055
  return i * n;
1047
1056
  },
1048
1057
  getOffsetForIndexAndAlignment: function(t, n, i, s, c, l) {
1049
- var m = t.direction, d = t.height, f = t.itemCount, A = t.itemSize, v = t.layout, g = t.width, T = m === "horizontal" || v === "horizontal", D = T ? g : d, o = Math.max(0, f * A - D), u = Math.min(o, n * A), p = Math.max(0, n * A - D + A + l);
1050
- switch (i === "smart" && (s >= p - D && s <= u + D ? i = "auto" : i = "center"), i) {
1058
+ var m = t.direction, u = t.height, f = t.itemCount, A = t.itemSize, v = t.layout, g = t.width, T = m === "horizontal" || v === "horizontal", D = T ? g : u, o = Math.max(0, f * A - D), d = Math.min(o, n * A), p = Math.max(0, n * A - D + A + l);
1059
+ switch (i === "smart" && (s >= p - D && s <= d + D ? i = "auto" : i = "center"), i) {
1051
1060
  case "start":
1052
- return u;
1061
+ return d;
1053
1062
  case "end":
1054
1063
  return p;
1055
1064
  case "center": {
1056
- var h = Math.round(p + (u - p) / 2);
1065
+ var h = Math.round(p + (d - p) / 2);
1057
1066
  return h < Math.ceil(D / 2) ? 0 : h > o + Math.floor(D / 2) ? o : h;
1058
1067
  }
1059
1068
  case "auto":
1060
1069
  default:
1061
- return s >= p && s <= u ? s : s < p ? p : u;
1070
+ return s >= p && s <= d ? s : s < p ? p : d;
1062
1071
  }
1063
1072
  },
1064
1073
  getStartIndexForOffset: function(t, n) {
@@ -1066,7 +1075,7 @@ var si = function(t, n) {
1066
1075
  return Math.max(0, Math.min(i - 1, Math.floor(n / s)));
1067
1076
  },
1068
1077
  getStopIndexForStartIndex: function(t, n, i) {
1069
- var s = t.direction, c = t.height, l = t.itemCount, m = t.itemSize, d = t.layout, f = t.width, A = s === "horizontal" || d === "horizontal", v = n * m, g = A ? f : c, T = Math.ceil((g + i - v) / m);
1078
+ var s = t.direction, c = t.height, l = t.itemCount, m = t.itemSize, u = t.layout, f = t.width, A = s === "horizontal" || u === "horizontal", v = n * m, g = A ? f : c, T = Math.ceil((g + i - v) / m);
1070
1079
  return Math.max(0, Math.min(
1071
1080
  l - 1,
1072
1081
  n + T - 1
@@ -1085,14 +1094,14 @@ function oi(e) {
1085
1094
  return !(i > n || s < t);
1086
1095
  }
1087
1096
  function ai(e) {
1088
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, s = e.startIndex, c = e.stopIndex, l = [], m = null, d = null, f = s; f <= c; f++) {
1097
+ for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, s = e.startIndex, c = e.stopIndex, l = [], m = null, u = null, f = s; f <= c; f++) {
1089
1098
  var A = t(f);
1090
- A ? d !== null && (l.push(m, d), m = d = null) : (d = f, m === null && (m = f));
1099
+ A ? u !== null && (l.push(m, u), m = u = null) : (u = f, m === null && (m = f));
1091
1100
  }
1092
- if (d !== null) {
1093
- for (var v = Math.min(Math.max(d, m + i - 1), n - 1), g = d + 1; g <= v && !t(g); g++)
1094
- d = g;
1095
- l.push(m, d);
1101
+ if (u !== null) {
1102
+ for (var v = Math.min(Math.max(u, m + i - 1), n - 1), g = u + 1; g <= v && !t(g); g++)
1103
+ u = g;
1104
+ l.push(m, u);
1096
1105
  }
1097
1106
  if (l.length)
1098
1107
  for (; l[1] - l[0] + 1 < i && l[0] > 0; ) {
@@ -1137,8 +1146,8 @@ var li = function(e, t) {
1137
1146
  function t() {
1138
1147
  var n, i, s, c;
1139
1148
  li(this, t);
1140
- for (var l = arguments.length, m = Array(l), d = 0; d < l; d++)
1141
- m[d] = arguments[d];
1149
+ for (var l = arguments.length, m = Array(l), u = 0; u < l; u++)
1150
+ m[u] = arguments[u];
1142
1151
  return c = (i = (s = Te(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(f) {
1143
1152
  var A = f.visibleStartIndex, v = f.visibleStopIndex;
1144
1153
  s._lastRenderedStartIndex = A, s._lastRenderedStopIndex = v, s._ensureRowsLoaded(A, v);
@@ -1168,7 +1177,7 @@ var li = function(e, t) {
1168
1177
  }, {
1169
1178
  key: "_ensureRowsLoaded",
1170
1179
  value: function(i, s) {
1171
- var c = this.props, l = c.isItemLoaded, m = c.itemCount, d = c.minimumBatchSize, f = d === void 0 ? 10 : d, A = c.threshold, v = A === void 0 ? 15 : A, g = ai({
1180
+ var c = this.props, l = c.isItemLoaded, m = c.itemCount, u = c.minimumBatchSize, f = u === void 0 ? 10 : u, A = c.threshold, v = A === void 0 ? 15 : A, g = ai({
1172
1181
  isItemLoaded: l,
1173
1182
  itemCount: m,
1174
1183
  minimumBatchSize: f,
@@ -1275,15 +1284,15 @@ const pi = /* @__PURE__ */ a("div")({
1275
1284
  itemCount: e.length,
1276
1285
  width: s,
1277
1286
  height: c,
1278
- children: ({ index: d, style: f }) => /* @__PURE__ */ r(
1287
+ children: ({ index: u, style: f }) => /* @__PURE__ */ r(
1279
1288
  Ni,
1280
1289
  {
1281
1290
  style: { ...f, maxHeight: 48 },
1282
- ...e[d],
1283
- openItemDetail: () => n(e[d].userId),
1284
- isCurrentUser: !!t && t === e[d].userId
1291
+ ...e[u],
1292
+ openItemDetail: () => n(e[u].userId),
1293
+ isCurrentUser: !!t && t === e[u].userId
1285
1294
  },
1286
- e[d].userId
1295
+ e[u].userId
1287
1296
  )
1288
1297
  }
1289
1298
  ) })
@@ -1371,7 +1380,7 @@ const pi = /* @__PURE__ */ a("div")({
1371
1380
  openQuestion: c,
1372
1381
  status: l
1373
1382
  }) => {
1374
- const m = Se[t], d = Li[l];
1383
+ const m = Se[t], u = Li[l];
1375
1384
  return m ? /* @__PURE__ */ I(zi, { onClick: () => c == null ? void 0 : c(e), children: [
1376
1385
  /* @__PURE__ */ I($i, { children: [
1377
1386
  /* @__PURE__ */ I(xi, { children: [
@@ -1383,7 +1392,7 @@ const pi = /* @__PURE__ */ a("div")({
1383
1392
  ] }),
1384
1393
  /* @__PURE__ */ r(ji, { children: i || "" })
1385
1394
  ] }),
1386
- /* @__PURE__ */ r(ki, { children: s ? /* @__PURE__ */ r(Ei, { children: "Play" }) : d })
1395
+ /* @__PURE__ */ r(ki, { children: s ? /* @__PURE__ */ r(Ei, { children: "Play" }) : u })
1387
1396
  ] }) : null;
1388
1397
  }, Qi = /* @__PURE__ */ a("div")({
1389
1398
  name: "Container",
@@ -1400,11 +1409,11 @@ const pi = /* @__PURE__ */ a("div")({
1400
1409
  }) => /* @__PURE__ */ I(Qi, { children: [
1401
1410
  /* @__PURE__ */ r($e, { questionId: t, ...n }),
1402
1411
  e && /* @__PURE__ */ r(Ui, { onClick: () => e(t), children: "View Insight" })
1403
- ] }), qi = /* @__PURE__ */ a("div")({
1412
+ ] }), Pi = /* @__PURE__ */ a("div")({
1404
1413
  name: "QuestionsContainer",
1405
1414
  class: "qvghv3l",
1406
1415
  propsAsIs: !1
1407
- }), Pi = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(qi, { children: e == null ? void 0 : e.map((n) => {
1416
+ }), qi = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ r(Pi, { children: e == null ? void 0 : e.map((n) => {
1408
1417
  var i, s;
1409
1418
  if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1410
1419
  const c = n.attributes.attributes.value;
@@ -1417,7 +1426,7 @@ const pi = /* @__PURE__ */ a("div")({
1417
1426
  return null;
1418
1427
  }) }), Yi = ({ store: e, openQuestion: t }) => {
1419
1428
  const n = w(e);
1420
- return n != null && n.data ? /* @__PURE__ */ r(Pi, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
1429
+ return n != null && n.data ? /* @__PURE__ */ r(qi, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ r("div", { children: "wait questions..." });
1421
1430
  }, Wi = ({ userSummary: e }) => {
1422
1431
  var t, n;
1423
1432
  const i = w(e.getStore());