@streamlayer/react 0.33.5 → 0.34.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,982 +1,898 @@
1
- import { jsxs as I, jsx as s, Fragment as R } from "react/jsx-runtime";
2
- import { s as a, r as C, Q as z, o as Ye, a as Q, b as H, d as fe, E as _, c as Te, w as it, u as We, e as Y, f as te, g as rt, A as st, O as ot, P as ne, h as at, i as ge, n as lt, j as ct } from "./masters.js";
3
- import G, { useRef as $, useState as L, useCallback as P, useEffect as ae, useLayoutEffect as dt, useMemo as E, createElement as ue, PureComponent as Ve, useTransition as ut } from "react";
4
- const pt = /* @__PURE__ */ a("div")({
1
+ var Pe = Object.defineProperty;
2
+ var Ue = (e, t, s) => t in e ? Pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var se = (e, t, s) => (Ue(e, typeof t != "symbol" ? t + "" : t, s), s);
4
+ import { jsxs as u, jsx as n, Fragment as b } from "react/jsx-runtime";
5
+ import { s as o, c as k, Q as M, o as Ne, a as $, b as B, d as ie, E as P, r as qe, w as Ye, u as Ae, e as U, g as Ve, O as We, P as G, f as _e, h as X, n as Be, i as ue, x as Fe } from "./masters.js";
6
+ import V, { useRef as Q, useState as z, useCallback as W, useEffect as te, useLayoutEffect as He, useMemo as C, PureComponent as Ge, Component as Ze, useTransition as Je } from "react";
7
+ const Ke = /* @__PURE__ */ o("div")({
5
8
  name: "Container",
6
9
  class: "c1vwopgc",
7
10
  propsAsIs: !1
8
- }), mt = /* @__PURE__ */ a("div")({
11
+ }), Xe = /* @__PURE__ */ o("div")({
9
12
  name: "QuestionTypeWrap",
10
13
  class: "qyktpt0",
11
14
  propsAsIs: !1
12
- }), ht = () => C, It = /* @__PURE__ */ a(ht())({
15
+ }), et = () => k, tt = /* @__PURE__ */ o(et())({
13
16
  name: "QuestionTypeIcon",
14
17
  class: "q951jdx",
15
18
  propsAsIs: !0
16
- }), ft = /* @__PURE__ */ a("span")({
19
+ }), st = /* @__PURE__ */ o("span")({
17
20
  name: "QuestionTypeTitle",
18
21
  class: "qss5f0e",
19
22
  propsAsIs: !1
20
- }), gt = /* @__PURE__ */ a("button")({
23
+ }), nt = /* @__PURE__ */ o("button")({
21
24
  name: "CloseButton",
22
25
  class: "c1ao1jtv",
23
26
  propsAsIs: !1
24
- }), vt = () => C, Mt = /* @__PURE__ */ a(vt())({
27
+ }), it = () => k, rt = /* @__PURE__ */ o(it())({
25
28
  name: "CloseIcon",
26
29
  class: "cvsl7l3",
27
30
  propsAsIs: !0
28
- }), Fe = ({ type: e, close: t, label: n }) => {
29
- const i = e ? Ye[e] : { label: n, iconName: void 0 };
30
- return /* @__PURE__ */ I(pt, { children: [
31
- /* @__PURE__ */ I(mt, { children: [
32
- (i == null ? void 0 : i.iconName) && /* @__PURE__ */ s(
33
- It,
31
+ }), ye = ({ type: e, close: t, label: s }) => {
32
+ const i = e ? Ne[e] : { label: s, iconName: void 0 };
33
+ return /* @__PURE__ */ u(Ke, { children: [
34
+ /* @__PURE__ */ u(Xe, { children: [
35
+ (i == null ? void 0 : i.iconName) && /* @__PURE__ */ n(
36
+ tt,
34
37
  {
35
- "data-type-trivia": e === z.TRIVIA,
36
- "data-type-poll": e === z.POLL,
38
+ "data-type-trivia": e === M.TRIVIA,
39
+ "data-type-poll": e === M.POLL,
37
40
  name: i.iconName
38
41
  }
39
42
  ),
40
- (i == null ? void 0 : i.label) && /* @__PURE__ */ s(ft, { children: i.label })
43
+ (i == null ? void 0 : i.label) && /* @__PURE__ */ n(st, { children: i.label })
41
44
  ] }),
42
- /* @__PURE__ */ s(gt, { onClick: t, children: /* @__PURE__ */ s(Mt, { name: "icon-cross" }) })
45
+ /* @__PURE__ */ n(nt, { onClick: t, children: /* @__PURE__ */ n(rt, { name: "icon-cross" }) })
43
46
  ] });
44
- }, Be = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), He = (e) => e ? e.toLocaleString("en-US") : "0", ye = (e) => e.toLocaleDateString("en-US", {
47
+ }, De = (e) => e.split(/\s+/).map((t) => t[0]).join("").toUpperCase(), Le = (e) => e ? e.toLocaleString("en-US") : "0", oe = (e) => e.toLocaleDateString("en-US", {
45
48
  weekday: "short",
46
49
  month: "short",
47
50
  day: "numeric"
48
- }), Ae = (e) => e.toLocaleTimeString("en-US", {
51
+ }), ae = (e) => e.toLocaleTimeString("en-US", {
49
52
  hour: "2-digit",
50
53
  minute: "2-digit"
51
- }), Ne = (e) => !isNaN(e.getTime()), Tt = /* @__PURE__ */ a("div")({
54
+ }), le = (e) => !isNaN(e.getTime()), ot = /* @__PURE__ */ o("div")({
52
55
  name: "Container",
53
56
  class: "c1zy8a",
54
57
  propsAsIs: !1
55
- }), yt = /* @__PURE__ */ a("div")({
58
+ }), at = /* @__PURE__ */ o("div")({
56
59
  name: "Title",
57
60
  class: "t1vih9p5",
58
61
  propsAsIs: !1
59
- }), At = /* @__PURE__ */ a("div")({
62
+ }), lt = /* @__PURE__ */ o("div")({
60
63
  name: "Indicator",
61
64
  class: "i1fbnvpb",
62
65
  propsAsIs: !1
63
- }), xe = ({ indicator: e, title: t }) => /* @__PURE__ */ I(Tt, { children: [
64
- /* @__PURE__ */ s(yt, { children: t }),
65
- /* @__PURE__ */ s(At, { children: e })
66
- ] }), Nt = /* @__PURE__ */ a("div")({
66
+ }), pe = ({ indicator: e, title: t }) => /* @__PURE__ */ u(ot, { children: [
67
+ /* @__PURE__ */ n(at, { children: t }),
68
+ /* @__PURE__ */ n(lt, { children: e })
69
+ ] }), ct = /* @__PURE__ */ o("div")({
67
70
  name: "Container",
68
71
  class: "ctmhwyc",
69
72
  propsAsIs: !1
70
- }), Dt = /* @__PURE__ */ a("div")({
73
+ }), dt = /* @__PURE__ */ o("div")({
71
74
  name: "Indicator",
72
75
  class: "i1jri200",
73
76
  propsAsIs: !1
74
- }), St = /* @__PURE__ */ a("div")({
77
+ }), ut = /* @__PURE__ */ o("div")({
75
78
  name: "Title",
76
79
  class: "t8s05oq",
77
80
  propsAsIs: !1
78
- }), ie = ({ indicator: e, title: t }) => /* @__PURE__ */ I(Nt, { children: [
79
- /* @__PURE__ */ s(Dt, { children: e }),
80
- /* @__PURE__ */ s(St, { children: t })
81
- ] }), xt = /* @__PURE__ */ a("div")({
81
+ }), Z = ({ indicator: e, title: t }) => /* @__PURE__ */ u(ct, { children: [
82
+ /* @__PURE__ */ n(dt, { children: e }),
83
+ /* @__PURE__ */ n(ut, { children: t })
84
+ ] }), pt = /* @__PURE__ */ o("div")({
82
85
  name: "Container",
83
86
  class: "c1yrpn9o",
84
87
  propsAsIs: !1
85
- }), bt = /* @__PURE__ */ a("div")({
88
+ }), ht = /* @__PURE__ */ o("div")({
86
89
  name: "TopInfo",
87
90
  class: "t17fwahh",
88
91
  propsAsIs: !1
89
- }), zt = /* @__PURE__ */ a("div")({
92
+ }), mt = /* @__PURE__ */ o("div")({
90
93
  name: "BottomInfo",
91
94
  class: "by6w7e9",
92
95
  propsAsIs: !1
93
- }), Ot = /* @__PURE__ */ a("div")({
96
+ }), It = /* @__PURE__ */ o("div")({
94
97
  name: "User",
95
98
  class: "u1g7arbm",
96
99
  propsAsIs: !1
97
- }), kt = /* @__PURE__ */ a("img")({
100
+ }), Mt = /* @__PURE__ */ o("img")({
98
101
  name: "Avatar",
99
102
  class: "a1ldeata",
100
103
  propsAsIs: !1
101
- }), jt = /* @__PURE__ */ a("div")({
104
+ }), gt = /* @__PURE__ */ o("div")({
102
105
  name: "UserInfo",
103
106
  class: "u10d4koz",
104
107
  propsAsIs: !1
105
- }), wt = /* @__PURE__ */ a("div")({
108
+ }), vt = /* @__PURE__ */ o("div")({
106
109
  name: "UserName",
107
110
  class: "u1q6roj0",
108
111
  propsAsIs: !1
109
- }), Ct = /* @__PURE__ */ a("div")({
112
+ }), ft = /* @__PURE__ */ o("div")({
110
113
  name: "UserRating",
111
114
  class: "ui0m425",
112
115
  propsAsIs: !1
113
- }), Et = /* @__PURE__ */ a("img")({
116
+ }), Tt = /* @__PURE__ */ o("img")({
114
117
  name: "TrophyIcon",
115
118
  class: "t1el3mrn",
116
119
  propsAsIs: !1
117
- }), $t = /* @__PURE__ */ a("div")({
120
+ }), Nt = /* @__PURE__ */ o("div")({
118
121
  name: "Rts",
119
122
  class: "r2vgnxv",
120
123
  propsAsIs: !1
121
- }), Lt = /* @__PURE__ */ a("div")({
124
+ }), At = /* @__PURE__ */ o("div")({
122
125
  name: "RtsIndicator",
123
126
  class: "roqn06j",
124
127
  propsAsIs: !1
125
- }), Rt = /* @__PURE__ */ a("div")({
128
+ }), yt = /* @__PURE__ */ o("div")({
126
129
  name: "RtsLabel",
127
130
  class: "r15adx7c",
128
131
  propsAsIs: !1
129
- }), Qt = /* @__PURE__ */ a("div")({
132
+ }), Dt = /* @__PURE__ */ o("div")({
130
133
  name: "Divider",
131
134
  class: "dv59lta",
132
135
  propsAsIs: !1
133
- }), Ut = /* @__PURE__ */ a("div")({
136
+ }), Lt = /* @__PURE__ */ o("div")({
134
137
  name: "Ranks",
135
138
  class: "r55lotb",
136
139
  propsAsIs: !1
137
- }), Pt = /* @__PURE__ */ a("div")({
140
+ }), kt = /* @__PURE__ */ o("div")({
138
141
  name: "Statistics",
139
142
  class: "s1knfgqt",
140
143
  propsAsIs: !1
141
- }), qt = /* @__PURE__ */ a("div")({
144
+ }), xt = /* @__PURE__ */ o("div")({
142
145
  name: "AvatarPlaceholder",
143
146
  class: "a1mqo824",
144
147
  propsAsIs: !1
145
- }), _t = /* @__PURE__ */ a("button")({
148
+ }), wt = /* @__PURE__ */ o("button")({
146
149
  name: "UserAccountBtn",
147
150
  class: "uxareh6",
148
151
  propsAsIs: !1
149
- }), Yt = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Ge = ({
152
+ }), Et = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", ke = ({
150
153
  avatar: e,
151
154
  name: t,
152
- points: n,
155
+ points: s,
153
156
  friendsRank: i,
154
157
  rank: r,
155
- streak: d,
156
- correct: c,
157
- incorrect: l,
158
- inTop: u,
159
- successRate: f
160
- }) => /* @__PURE__ */ I(xt, { children: [
161
- /* @__PURE__ */ s(bt, { children: /* @__PURE__ */ I(Ot, { children: [
162
- /* @__PURE__ */ I(_t, { children: [
163
- e && /* @__PURE__ */ s(kt, { alt: "avatar", src: e }),
164
- !e && /* @__PURE__ */ s(qt, { children: Be(t || "") })
158
+ streak: l,
159
+ correct: a,
160
+ incorrect: c,
161
+ inTop: d,
162
+ successRate: h
163
+ }) => /* @__PURE__ */ u(pt, { children: [
164
+ /* @__PURE__ */ n(ht, { children: /* @__PURE__ */ u(It, { children: [
165
+ /* @__PURE__ */ u(wt, { children: [
166
+ e && /* @__PURE__ */ n(Mt, { alt: "avatar", src: e }),
167
+ !e && /* @__PURE__ */ n(xt, { children: De(t || "") })
165
168
  ] }),
166
- /* @__PURE__ */ I(jt, { children: [
167
- /* @__PURE__ */ s(wt, { children: t }),
168
- /* @__PURE__ */ I(Ct, { children: [
169
- /* @__PURE__ */ I($t, { children: [
170
- /* @__PURE__ */ s(Et, { alt: "rank-icon", src: Yt }),
171
- /* @__PURE__ */ I(Lt, { children: [
172
- He(n),
173
- /* @__PURE__ */ s(Rt, { children: "PTS" })
169
+ /* @__PURE__ */ u(gt, { children: [
170
+ /* @__PURE__ */ n(vt, { children: t }),
171
+ /* @__PURE__ */ u(ft, { children: [
172
+ /* @__PURE__ */ u(Nt, { children: [
173
+ /* @__PURE__ */ n(Tt, { alt: "rank-icon", src: Et }),
174
+ /* @__PURE__ */ u(At, { children: [
175
+ Le(s),
176
+ /* @__PURE__ */ n(yt, { children: "PTS" })
174
177
  ] })
175
178
  ] }),
176
- /* @__PURE__ */ s(Qt, {}),
177
- /* @__PURE__ */ I("div", { children: [
179
+ /* @__PURE__ */ n(Dt, {}),
180
+ /* @__PURE__ */ u("div", { children: [
178
181
  "TOP ",
179
- u || 0,
182
+ d || 0,
180
183
  "%"
181
184
  ] })
182
185
  ] })
183
186
  ] })
184
187
  ] }) }),
185
- /* @__PURE__ */ I(zt, { children: [
186
- /* @__PURE__ */ I(Ut, { children: [
187
- /* @__PURE__ */ s(xe, { indicator: i || 0, title: "Friends rank" }),
188
- /* @__PURE__ */ s(xe, { indicator: r || 0, title: "Global rank" })
188
+ /* @__PURE__ */ u(mt, { children: [
189
+ /* @__PURE__ */ u(Lt, { children: [
190
+ /* @__PURE__ */ n(pe, { indicator: i || 0, title: "Friends rank" }),
191
+ /* @__PURE__ */ n(pe, { indicator: r || 0, title: "Global rank" })
189
192
  ] }),
190
- /* @__PURE__ */ I(Pt, { children: [
191
- /* @__PURE__ */ s(ie, { indicator: d || 0, title: "Win streak" }),
192
- /* @__PURE__ */ s(ie, { indicator: c || 0, title: "Correct" }),
193
- /* @__PURE__ */ s(ie, { indicator: l || 0, title: "Incorrect" }),
194
- /* @__PURE__ */ s(ie, { indicator: `${f || 0}%`, title: "Succ. rate" })
193
+ /* @__PURE__ */ u(kt, { children: [
194
+ /* @__PURE__ */ n(Z, { indicator: l || 0, title: "Win streak" }),
195
+ /* @__PURE__ */ n(Z, { indicator: a || 0, title: "Correct" }),
196
+ /* @__PURE__ */ n(Z, { indicator: c || 0, title: "Incorrect" }),
197
+ /* @__PURE__ */ n(Z, { indicator: `${h || 0}%`, title: "Succ. rate" })
195
198
  ] })
196
199
  ] })
197
- ] }), Wt = /* @__PURE__ */ a("div")({
200
+ ] }), St = /* @__PURE__ */ o("div")({
198
201
  name: "SponsorLogoWrap",
199
202
  class: "s8p5v5z",
200
203
  propsAsIs: !1
201
- }), Vt = () => C, Ft = /* @__PURE__ */ a(Vt())({
204
+ }), jt = () => k, Ct = /* @__PURE__ */ o(jt())({
202
205
  name: "SponsorLogo",
203
206
  class: "s755yti",
204
207
  propsAsIs: !0
205
- }), Bt = () => /* @__PURE__ */ s(Wt, {
206
- children: /* @__PURE__ */ s(Ft, {
208
+ }), bt = () => /* @__PURE__ */ n(St, {
209
+ children: /* @__PURE__ */ n(Ct, {
207
210
  name: "mastersLogo"
208
211
  })
209
- }), Ht = /* @__PURE__ */ a("div")({
212
+ }), zt = /* @__PURE__ */ o("div")({
210
213
  name: "Container",
211
214
  class: "c38csyt",
212
215
  propsAsIs: !1
213
- }), Gt = /* @__PURE__ */ a("div")({
216
+ }), Ot = /* @__PURE__ */ o("div")({
214
217
  name: "Title",
215
218
  class: "ty221rx",
216
219
  propsAsIs: !1
217
- }), Zt = /* @__PURE__ */ a("div")({
220
+ }), $t = /* @__PURE__ */ o("div")({
218
221
  name: "Description",
219
222
  class: "dlaj9xp",
220
223
  propsAsIs: !1
221
- }), Jt = ({ title: e, description: t }) => /* @__PURE__ */ I(Ht, { children: [
222
- /* @__PURE__ */ s(C, { name: "icon-check-circle" }),
223
- /* @__PURE__ */ s(Gt, { children: e }),
224
- /* @__PURE__ */ s(Zt, { children: t })
225
- ] }), Kt = /* @__PURE__ */ a("div")({
224
+ }), Rt = ({ title: e, description: t }) => /* @__PURE__ */ u(zt, { children: [
225
+ /* @__PURE__ */ n(k, { name: "icon-check-circle" }),
226
+ /* @__PURE__ */ n(Ot, { children: e }),
227
+ /* @__PURE__ */ n($t, { children: t })
228
+ ] }), Qt = /* @__PURE__ */ o("div")({
226
229
  name: "Container",
227
230
  class: "c16sbdnm",
228
231
  propsAsIs: !1
229
- }), Xt = () => C, en = /* @__PURE__ */ a(Xt())({
232
+ }), Pt = () => k, Ut = /* @__PURE__ */ o(Pt())({
230
233
  name: "IconPrediction",
231
234
  class: "ibhorgl",
232
235
  propsAsIs: !0
233
- }), Z = /* @__PURE__ */ a("div")({
236
+ }), F = /* @__PURE__ */ o("div")({
234
237
  name: "FeedbackIconWrap",
235
238
  class: "f1g20ja7",
236
239
  propsAsIs: !1
237
- }), re = /* @__PURE__ */ a("div")({
240
+ }), J = /* @__PURE__ */ o("div")({
238
241
  name: "FeedbackHeader",
239
242
  class: "f455ozj",
240
243
  propsAsIs: !1
241
- }), tn = /* @__PURE__ */ a("span")({
244
+ }), qt = /* @__PURE__ */ o("span")({
242
245
  name: "FeedbackTitle",
243
246
  class: "f1913njx",
244
247
  propsAsIs: !1
245
- }), W = /* @__PURE__ */ a("span")({
248
+ }), Y = /* @__PURE__ */ o("span")({
246
249
  name: "FeedbackDescription",
247
250
  class: "fzfk69z",
248
251
  propsAsIs: !1
249
- }), pe = /* @__PURE__ */ a("div")({
252
+ }), ne = /* @__PURE__ */ o("div")({
250
253
  name: "FeedbackText",
251
254
  class: "fx87qaj",
252
255
  propsAsIs: !1
253
- }), nn = ({
256
+ }), Yt = ({
254
257
  feedbackMessages: e,
255
258
  questionVotedCorrectly: t,
256
- questionVoted: n,
259
+ questionVoted: s,
257
260
  questionType: i,
258
261
  hasCorrectAnswer: r,
259
- questionStatus: d,
260
- showExpiredNotification: c,
261
- showClosedNotificationTrivia: l,
262
- votedInCurrentRender: u,
263
- votedAfterQuestionClosed: f,
264
- enteredAnActiveQuestion: M,
265
- marketClosed: v
262
+ questionStatus: l,
263
+ showExpiredNotification: a,
264
+ showClosedNotificationTrivia: c,
265
+ votedInCurrentRender: d,
266
+ votedAfterQuestionClosed: h,
267
+ enteredAnActiveQuestion: m,
268
+ marketClosed: p
266
269
  }) => {
267
- const h = n && (i === z.TRIVIA || i === z.PREDICTION) && u && d !== Q.RESOLVED, A = i === z.PREDICTION && !r, S = v && i === z.PREDICTION && !n && !M || i === z.PREDICTION && f && u && M, o = h && A, m = h && r, p = i === z.PREDICTION && n && u && r, g = n && i === z.POLL && u;
268
- if (!c && !l && !o && !m && !S && !g && !p)
270
+ const I = s && (i === M.TRIVIA || i === M.PREDICTION) && d && l !== $.RESOLVED, g = i === M.PREDICTION && !r, L = p && i === M.PREDICTION && !s && !m || i === M.PREDICTION && h && d && m, f = I && g, N = I && r, v = i === M.PREDICTION && s && d && r, y = s && i === M.POLL && d;
271
+ if (!a && !c && !f && !N && !L && !y && !v)
269
272
  return null;
270
- const T = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
271
- return /* @__PURE__ */ I(Kt, { "data-isPrediction": A, children: [
272
- c && /* @__PURE__ */ I(R, { children: [
273
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
274
- /* @__PURE__ */ I("div", { children: [
275
- /* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(W, { children: "Question Expired" }) }),
276
- /* @__PURE__ */ s(pe, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
273
+ const A = t ? "correct" : "incorrect", D = t ? e == null ? void 0 : e.correctFeedback : e == null ? void 0 : e.incorrectFeedback;
274
+ return /* @__PURE__ */ u(Qt, { "data-isPrediction": g, children: [
275
+ a && /* @__PURE__ */ u(b, { children: [
276
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(k, { name: "questionExpired" }) }),
277
+ /* @__PURE__ */ u("div", { children: [
278
+ /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(Y, { children: "Question Expired" }) }),
279
+ /* @__PURE__ */ n(ne, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
277
280
  ] })
278
281
  ] }),
279
- l && /* @__PURE__ */ I(R, { children: [
280
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
281
- /* @__PURE__ */ I("div", { children: [
282
- /* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(W, { children: "Question Closed" }) }),
283
- /* @__PURE__ */ s(pe, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
282
+ c && /* @__PURE__ */ u(b, { children: [
283
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(k, { name: "questionExpired" }) }),
284
+ /* @__PURE__ */ u("div", { children: [
285
+ /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(Y, { children: "Question Closed" }) }),
286
+ /* @__PURE__ */ n(ne, { children: "This question was answered after the moderator closed the question. So the points for this answer won’t tally." })
284
287
  ] })
285
288
  ] }),
286
- S && /* @__PURE__ */ I(R, { children: [
287
- /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(C, { name: "questionExpired" }) }),
288
- /* @__PURE__ */ I("div", { children: [
289
- /* @__PURE__ */ s(re, { children: /* @__PURE__ */ s(W, { children: "Question Closed" }) }),
290
- /* @__PURE__ */ s(pe, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
289
+ L && /* @__PURE__ */ u(b, { children: [
290
+ /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(k, { name: "questionExpired" }) }),
291
+ /* @__PURE__ */ u("div", { children: [
292
+ /* @__PURE__ */ n(J, { children: /* @__PURE__ */ n(Y, { children: "Question Closed" }) }),
293
+ /* @__PURE__ */ n(ne, { children: "This event has already taken place, so the ability to make a prediction on its outcome is no longer available." })
291
294
  ] })
292
295
  ] }),
293
- o && /* @__PURE__ */ I(R, { children: [
294
- /* @__PURE__ */ s(en, { name: "icon-prediction" }),
295
- /* @__PURE__ */ s(W, { children: "Stay tuned to see if your prediction was correct." })
296
+ f && /* @__PURE__ */ u(b, { children: [
297
+ /* @__PURE__ */ n(Ut, { name: "icon-prediction" }),
298
+ /* @__PURE__ */ n(Y, { children: "Stay tuned to see if your prediction was correct." })
296
299
  ] }),
297
- g && /* @__PURE__ */ I(R, { children: [
298
- /* @__PURE__ */ s(Z, { "data-feedbackType": "correct", children: /* @__PURE__ */ s(C, { name: "correct" }) }),
299
- /* @__PURE__ */ s(W, { children: "That's for answering. Please stay tuned for the next question." })
300
+ y && /* @__PURE__ */ u(b, { children: [
301
+ /* @__PURE__ */ n(F, { "data-feedbackType": "correct", children: /* @__PURE__ */ n(k, { name: "correct" }) }),
302
+ /* @__PURE__ */ n(Y, { children: "That's for answering. Please stay tuned for the next question." })
300
303
  ] }),
301
- (m || p) && /* @__PURE__ */ I(R, { children: [
302
- /* @__PURE__ */ s(Z, { "data-feedbackType": T, children: /* @__PURE__ */ s(C, { name: T }) }),
303
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ I(re, { children: [
304
- /* @__PURE__ */ s(tn, { "data-feedbackType": T, children: D == null ? void 0 : D.title }),
305
- /* @__PURE__ */ s(W, { children: D == null ? void 0 : D.description })
304
+ (N || v) && /* @__PURE__ */ u(b, { children: [
305
+ /* @__PURE__ */ n(F, { "data-feedbackType": A, children: /* @__PURE__ */ n(k, { name: A }) }),
306
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ u(J, { children: [
307
+ /* @__PURE__ */ n(qt, { "data-feedbackType": A, children: D == null ? void 0 : D.title }),
308
+ /* @__PURE__ */ n(Y, { children: D == null ? void 0 : D.description })
306
309
  ] }) })
307
310
  ] })
308
311
  ] });
309
- }, rn = /* @__PURE__ */ a("div")({
312
+ }, Vt = /* @__PURE__ */ o("div")({
310
313
  name: "Container",
311
314
  class: "c14ielyq",
312
315
  propsAsIs: !1
313
- }), sn = /* @__PURE__ */ a("div")({
316
+ }), Wt = /* @__PURE__ */ o("div")({
314
317
  name: "Content",
315
318
  class: "c1tlqx57",
316
319
  propsAsIs: !1
317
- }), on = /* @__PURE__ */ a("div")({
320
+ }), _t = /* @__PURE__ */ o("div")({
318
321
  name: "Title",
319
322
  class: "t1hq58md",
320
323
  propsAsIs: !1
321
- }), an = /* @__PURE__ */ a("div")({
324
+ }), Bt = /* @__PURE__ */ o("div")({
322
325
  name: "Options",
323
326
  class: "o1c8nxcx",
324
327
  propsAsIs: !1
325
- }), ln = /* @__PURE__ */ a("button")({
328
+ }), Ft = /* @__PURE__ */ o("button")({
326
329
  name: "ButtonContainer",
327
330
  class: "b1b6dl8t",
328
331
  propsAsIs: !1
329
- }), cn = /* @__PURE__ */ a("div")({
332
+ }), Ht = /* @__PURE__ */ o("div")({
330
333
  name: "ButtonPct",
331
334
  class: "b4iik8i",
332
335
  propsAsIs: !1
333
- }), dn = /* @__PURE__ */ a("span")({
336
+ }), Gt = /* @__PURE__ */ o("span")({
334
337
  name: "ButtonBody",
335
338
  class: "b1gq1lnf",
336
339
  propsAsIs: !1
337
- }), un = /* @__PURE__ */ a("div")({
340
+ }), Zt = /* @__PURE__ */ o("div")({
338
341
  name: "IconContainer",
339
342
  class: "i1j65z51",
340
343
  propsAsIs: !1
341
- }), pn = /* @__PURE__ */ a("div")({
344
+ }), Jt = /* @__PURE__ */ o("div")({
342
345
  name: "IconWrap",
343
346
  class: "i19tpfua",
344
347
  propsAsIs: !1
345
- }), Ze = /* @__PURE__ */ a("img")({
348
+ }), xe = /* @__PURE__ */ o("img")({
346
349
  name: "Icon",
347
350
  class: "i1tubmma",
348
351
  propsAsIs: !1
349
- }), mn = () => Ze, hn = /* @__PURE__ */ a(mn())({
352
+ }), Kt = () => xe, Xt = /* @__PURE__ */ o(Kt())({
350
353
  name: "IconDefault",
351
354
  class: "i1grrgwj",
352
355
  propsAsIs: !0
353
- }), In = () => Ze, fn = /* @__PURE__ */ a(In())({
356
+ }), es = () => xe, ts = /* @__PURE__ */ o(es())({
354
357
  name: "IconCircle",
355
358
  class: "ibemyq8",
356
359
  propsAsIs: !0
357
- }), gn = /* @__PURE__ */ a("span")({
360
+ }), ss = /* @__PURE__ */ o("span")({
358
361
  name: "Title",
359
362
  class: "t1dceht",
360
363
  propsAsIs: !1
361
- }), vn = /* @__PURE__ */ a("span")({
364
+ }), ns = /* @__PURE__ */ o("span")({
362
365
  name: "Indicators",
363
366
  class: "i116q4vq",
364
367
  propsAsIs: !1
365
- }), Mn = /* @__PURE__ */ a("span")({
368
+ }), is = /* @__PURE__ */ o("span")({
366
369
  name: "Pts",
367
370
  class: "p17ajcu2",
368
371
  propsAsIs: !1
369
- }), Tn = /* @__PURE__ */ a("span")({
372
+ }), rs = /* @__PURE__ */ o("span")({
370
373
  name: "Percentage",
371
374
  class: "pu9kmlb",
372
375
  propsAsIs: !1
373
- }), yn = () => C, An = /* @__PURE__ */ a(yn())({
376
+ }), os = () => k, as = /* @__PURE__ */ o(os())({
374
377
  name: "CheckIcon",
375
378
  class: "c1j2j0s0",
376
379
  propsAsIs: !0
377
- }), be = {
378
- [H.CENTERED]: (e) => /* @__PURE__ */ s(hn, { alt: "option-icon", src: e }),
379
- [H.TRANSPARENT]: (e) => /* @__PURE__ */ s(un, { children: /* @__PURE__ */ s(pn, { style: { backgroundImage: `url(${e})` } }) }),
380
- [H.ROUNDED]: (e) => /* @__PURE__ */ s(fn, { alt: "option-icon", src: e }),
381
- [H.NONE]: () => null,
382
- [H.UNSET]: () => null
383
- }, Nn = ({ questionType: e, hasCorrectAnswer: t, correct: n, youVoted: i, questionVoted: r }) => {
384
- if (e === z.POLL && i)
380
+ }), he = {
381
+ [B.CENTERED]: (e) => /* @__PURE__ */ n(Xt, { alt: "option-icon", src: e }),
382
+ [B.TRANSPARENT]: (e) => /* @__PURE__ */ n(Zt, { children: /* @__PURE__ */ n(Jt, { style: { backgroundImage: `url(${e})` } }) }),
383
+ [B.ROUNDED]: (e) => /* @__PURE__ */ n(ts, { alt: "option-icon", src: e }),
384
+ [B.NONE]: () => null,
385
+ [B.UNSET]: () => null
386
+ }, ls = ({ questionType: e, hasCorrectAnswer: t, correct: s, youVoted: i, questionVoted: r }) => {
387
+ if (e === M.POLL && i)
385
388
  return "correct";
386
- if (e === z.PREDICTION) {
389
+ if (e === M.PREDICTION) {
387
390
  if (t && r)
388
- return i ? n ? "correct" : "incorrect" : "unset";
391
+ return i ? s ? "correct" : "incorrect" : "unset";
389
392
  if (i)
390
393
  return "correct";
391
394
  }
392
- return e === z.TRIVIA && r && i ? n ? "correct" : "incorrect" : "unset";
393
- }, Dn = ({
395
+ return e === M.TRIVIA && r && i ? s ? "correct" : "incorrect" : "unset";
396
+ }, cs = ({
394
397
  questionType: e,
395
398
  questionVoted: t,
396
- correct: n,
399
+ correct: s,
397
400
  hasCorrectAnswer: i,
398
401
  questionStatus: r
399
- }) => e === z.TRIVIA ? t && n : e === z.PREDICTION ? t && n && i || r === Q.RESOLVED && n : !1, Sn = (e) => {
402
+ }) => e === M.TRIVIA ? t && s : e === M.PREDICTION ? t && s && i || r === $.RESOLVED && s : !1, ds = (e) => {
400
403
  var t;
401
404
  const {
402
405
  // option props
403
- id: n,
406
+ id: s,
404
407
  icon: i,
405
408
  text: r,
406
- percentageDecimal: d,
407
- points: c,
409
+ percentageDecimal: l,
410
+ points: a,
408
411
  // extra props
409
- onVote: l,
410
- markThatVoted: u,
411
- youSelected: f,
412
- questionVoted: M,
413
- imageMode: v,
414
- answerTimeExpired: h,
415
- questionStatus: A,
416
- isLoading: S,
417
- questionType: o,
418
- correct: m,
419
- hasCorrectAnswer: p,
420
- votedAfterQuestionClosed: g,
421
- enteredAnActiveQuestion: T,
412
+ onVote: c,
413
+ markThatVoted: d,
414
+ youSelected: h,
415
+ questionVoted: m,
416
+ imageMode: p,
417
+ answerTimeExpired: I,
418
+ questionStatus: g,
419
+ isLoading: L,
420
+ questionType: f,
421
+ correct: N,
422
+ hasCorrectAnswer: v,
423
+ votedAfterQuestionClosed: y,
424
+ enteredAnActiveQuestion: A,
422
425
  marketClosed: D
423
- } = e, N = Nn(e), y = Dn({ questionType: o, questionVoted: M, correct: m, hasCorrectAnswer: p, questionStatus: A }), x = D && o === z.PREDICTION, O = M || x, b = o === z.PREDICTION && !M && A !== Q.RESOLVED;
424
- return /* @__PURE__ */ I(
425
- ln,
426
+ } = e, S = ls(e), R = cs({ questionType: f, questionVoted: m, correct: N, hasCorrectAnswer: v, questionStatus: g }), O = D && f === M.PREDICTION, H = m || O, T = f === M.PREDICTION && !m && g !== $.RESOLVED;
427
+ return /* @__PURE__ */ u(
428
+ Ft,
426
429
  {
427
- value: n,
428
- "data-selected": f,
429
- "data-answerState": N,
430
- disabled: M || S || h || x && !T || x && T && g,
431
- "data-isNotChecked": M && !f && N !== "incorrect",
432
- onClick: (k) => {
433
- u(
434
- o === z.PREDICTION ? D : A === Q.RESOLVED
435
- ), l(k);
430
+ value: s,
431
+ "data-selected": h,
432
+ "data-answer-state": S,
433
+ disabled: m || L || I || O && !A || O && A && y,
434
+ "data-is-not-checked": m && !h && S !== "incorrect",
435
+ onClick: (w) => {
436
+ d(
437
+ f === M.PREDICTION ? D : g === $.RESOLVED
438
+ ), c(w);
436
439
  },
437
440
  children: [
438
- /* @__PURE__ */ s(cn, { "data-answerState": N, style: { width: `${O ? d : 0}%` } }),
439
- /* @__PURE__ */ I(dn, { children: [
440
- i && v && ((t = be[v]) == null ? void 0 : t.call(be, i)),
441
- /* @__PURE__ */ s(gn, { children: r }),
442
- b && /* @__PURE__ */ I("div", { children: [
443
- /* @__PURE__ */ s(fe, { value: c }),
444
- /* @__PURE__ */ s(Mn, { children: "pts" })
441
+ /* @__PURE__ */ n(Ht, { "data-answer-state": S, style: { width: `${H ? l : 0}%` } }),
442
+ /* @__PURE__ */ u(Gt, { children: [
443
+ i && p && ((t = he[p]) == null ? void 0 : t.call(he, i)),
444
+ /* @__PURE__ */ n(ss, { children: r }),
445
+ T && /* @__PURE__ */ u("div", { children: [
446
+ /* @__PURE__ */ n(ie, { value: a }),
447
+ /* @__PURE__ */ n(is, { children: "pts" })
445
448
  ] }),
446
- O && /* @__PURE__ */ I(vn, { children: [
447
- y && /* @__PURE__ */ s(An, { name: "selected" }),
448
- /* @__PURE__ */ s(Tn, { children: /* @__PURE__ */ s(fe, { value: d, suffix: "%" }) })
449
+ H && /* @__PURE__ */ u(ns, { children: [
450
+ R && /* @__PURE__ */ n(as, { name: "selected" }),
451
+ /* @__PURE__ */ n(rs, { children: /* @__PURE__ */ n(ie, { value: l, suffix: "%" }) })
449
452
  ] })
450
453
  ] })
451
454
  ]
452
455
  }
453
456
  );
454
457
  };
455
- var ze = typeof window > "u" ? ae : dt, xn = ({ isPlaying: e, duration: t, startAt: n = 0, updateInterval: i = 0, onComplete: r, onUpdate: d }) => {
456
- let [c, l] = L(n), u = $(0), f = $(n), M = $(n * -1e3), v = $(null), h = $(null), A = $(null), S = (p) => {
457
- let g = p / 1e3;
458
- if (h.current === null) {
459
- h.current = g, v.current = requestAnimationFrame(S);
458
+ var me = typeof window > "u" ? te : He, us = ({ isPlaying: e, duration: t, startAt: s = 0, updateInterval: i = 0, onComplete: r, onUpdate: l }) => {
459
+ let [a, c] = z(s), d = Q(0), h = Q(s), m = Q(s * -1e3), p = Q(null), I = Q(null), g = Q(null), L = (v) => {
460
+ let y = v / 1e3;
461
+ if (I.current === null) {
462
+ I.current = y, p.current = requestAnimationFrame(L);
460
463
  return;
461
464
  }
462
- let T = g - h.current, D = u.current + T;
463
- h.current = g, u.current = D;
464
- let N = f.current + (i === 0 ? D : (D / i | 0) * i), y = f.current + D, x = typeof t == "number" && y >= t;
465
- l(x ? t : N), x || (v.current = requestAnimationFrame(S));
466
- }, o = () => {
467
- v.current && cancelAnimationFrame(v.current), A.current && clearTimeout(A.current), h.current = null;
468
- }, m = P((p) => {
469
- o(), u.current = 0;
470
- let g = typeof p == "number" ? p : n;
471
- f.current = g, l(g), e && (v.current = requestAnimationFrame(S));
472
- }, [e, n]);
473
- return ze(() => {
474
- if (d == null || d(c), t && c >= t) {
475
- M.current += t * 1e3;
476
- let { shouldRepeat: p = !1, delay: g = 0, newStartAt: T } = (r == null ? void 0 : r(M.current / 1e3)) || {};
477
- p && (A.current = setTimeout(() => m(T), g * 1e3));
465
+ let A = y - I.current, D = d.current + A;
466
+ I.current = y, d.current = D;
467
+ let S = h.current + (i === 0 ? D : (D / i | 0) * i), R = h.current + D, O = typeof t == "number" && R >= t;
468
+ c(O ? t : S), O || (p.current = requestAnimationFrame(L));
469
+ }, f = () => {
470
+ p.current && cancelAnimationFrame(p.current), g.current && clearTimeout(g.current), I.current = null;
471
+ }, N = W((v) => {
472
+ f(), d.current = 0;
473
+ let y = typeof v == "number" ? v : s;
474
+ h.current = y, c(y), e && (p.current = requestAnimationFrame(L));
475
+ }, [e, s]);
476
+ return me(() => {
477
+ if (l == null || l(a), t && a >= t) {
478
+ m.current += t * 1e3;
479
+ let { shouldRepeat: v = !1, delay: y = 0, newStartAt: A } = (r == null ? void 0 : r(m.current / 1e3)) || {};
480
+ v && (g.current = setTimeout(() => N(A), y * 1e3));
478
481
  }
479
- }, [c, t]), ze(() => (e && (v.current = requestAnimationFrame(S)), o), [e, t, i]), { elapsedTime: c, reset: m };
480
- }, bn = (e, t, n) => {
481
- let i = e / 2, r = t / 2, d = i - r, c = 2 * d, l = n === "clockwise" ? "1,0" : "0,1", u = 2 * Math.PI * d;
482
- return { path: `m ${i},${r} a ${d},${d} 0 ${l} 0,${c} a ${d},${d} 0 ${l} 0,-${c}`, pathLength: u };
483
- }, Oe = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, zn = (e) => ({ position: "relative", width: e, height: e }), On = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, Je = (e, t, n, i, r) => {
482
+ }, [a, t]), me(() => (e && (p.current = requestAnimationFrame(L)), f), [e, t, i]), { elapsedTime: a, reset: N };
483
+ }, ps = (e, t, s) => {
484
+ let i = e / 2, r = t / 2, l = i - r, a = 2 * l, c = s === "clockwise" ? "1,0" : "0,1", d = 2 * Math.PI * l;
485
+ return { path: `m ${i},${r} a ${l},${l} 0 ${c} 0,${a} a ${l},${l} 0 ${c} 0,-${a}`, pathLength: d };
486
+ }, Ie = (e, t) => e === 0 || e === t ? 0 : typeof t == "number" ? e - t : 0, hs = (e) => ({ position: "relative", width: e, height: e }), ms = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, we = (e, t, s, i, r) => {
484
487
  if (i === 0)
485
488
  return t;
486
- let d = (r ? i - e : e) / i;
487
- return t + n * d;
488
- }, ke = (e) => {
489
- var t, n;
490
- return (n = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, r, d, c) => `#${r}${r}${d}${d}${c}${c}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((i) => parseInt(i, 16))) != null ? n : [];
491
- }, kn = (e, t) => {
492
- var n;
493
- let { colors: i, colorsTime: r, isSmoothColorTransition: d = !0 } = e;
489
+ let l = (r ? i - e : e) / i;
490
+ return t + s * l;
491
+ }, Me = (e) => {
492
+ var t, s;
493
+ return (s = (t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (i, r, l, a) => `#${r}${r}${l}${l}${a}${a}`).substring(1).match(/.{2}/g)) == null ? void 0 : t.map((i) => parseInt(i, 16))) != null ? s : [];
494
+ }, Is = (e, t) => {
495
+ var s;
496
+ let { colors: i, colorsTime: r, isSmoothColorTransition: l = !0 } = e;
494
497
  if (typeof i == "string")
495
498
  return i;
496
- let c = (n = r == null ? void 0 : r.findIndex((h, A) => h >= t && t >= r[A + 1])) != null ? n : -1;
497
- if (!r || c === -1)
499
+ let a = (s = r == null ? void 0 : r.findIndex((I, g) => I >= t && t >= r[g + 1])) != null ? s : -1;
500
+ if (!r || a === -1)
498
501
  return i[0];
499
- if (!d)
500
- return i[c];
501
- let l = r[c] - t, u = r[c] - r[c + 1], f = ke(i[c]), M = ke(i[c + 1]), v = !!e.isGrowing;
502
- return `rgb(${f.map((h, A) => Je(l, h, M[A] - h, u, v) | 0).join(",")})`;
503
- }, jn = (e) => {
504
- let { duration: t, initialRemainingTime: n, updateInterval: i, size: r = 180, strokeWidth: d = 12, trailStrokeWidth: c, isPlaying: l = !1, isGrowing: u = !1, rotation: f = "clockwise", onComplete: M, onUpdate: v } = e, h = $(), A = Math.max(d, c ?? 0), { path: S, pathLength: o } = bn(r, A, f), { elapsedTime: m } = xn({ isPlaying: l, duration: t, startAt: Oe(t, n), updateInterval: i, onUpdate: typeof v == "function" ? (g) => {
505
- let T = Math.ceil(t - g);
506
- T !== h.current && (h.current = T, v(T));
507
- } : void 0, onComplete: typeof M == "function" ? (g) => {
508
- var T;
509
- let { shouldRepeat: D, delay: N, newInitialRemainingTime: y } = (T = M(g)) != null ? T : {};
502
+ if (!l)
503
+ return i[a];
504
+ let c = r[a] - t, d = r[a] - r[a + 1], h = Me(i[a]), m = Me(i[a + 1]), p = !!e.isGrowing;
505
+ return `rgb(${h.map((I, g) => we(c, I, m[g] - I, d, p) | 0).join(",")})`;
506
+ }, Ms = (e) => {
507
+ let { duration: t, initialRemainingTime: s, updateInterval: i, size: r = 180, strokeWidth: l = 12, trailStrokeWidth: a, isPlaying: c = !1, isGrowing: d = !1, rotation: h = "clockwise", onComplete: m, onUpdate: p } = e, I = Q(), g = Math.max(l, a ?? 0), { path: L, pathLength: f } = ps(r, g, h), { elapsedTime: N } = us({ isPlaying: c, duration: t, startAt: Ie(t, s), updateInterval: i, onUpdate: typeof p == "function" ? (y) => {
508
+ let A = Math.ceil(t - y);
509
+ A !== I.current && (I.current = A, p(A));
510
+ } : void 0, onComplete: typeof m == "function" ? (y) => {
511
+ var A;
512
+ let { shouldRepeat: D, delay: S, newInitialRemainingTime: R } = (A = m(y)) != null ? A : {};
510
513
  if (D)
511
- return { shouldRepeat: D, delay: N, newStartAt: Oe(t, y) };
512
- } : void 0 }), p = t - m;
513
- return { elapsedTime: m, path: S, pathLength: o, remainingTime: Math.ceil(p), rotation: f, size: r, stroke: kn(e, p), strokeDashoffset: Je(m, 0, o, t, u), strokeWidth: d };
514
- }, Ke = (e) => {
515
- let { children: t, strokeLinecap: n, trailColor: i, trailStrokeWidth: r } = e, { path: d, pathLength: c, stroke: l, strokeDashoffset: u, remainingTime: f, elapsedTime: M, size: v, strokeWidth: h } = jn(e);
516
- return G.createElement("div", { style: zn(v) }, G.createElement("svg", { viewBox: `0 0 ${v} ${v}`, width: v, height: v, xmlns: "http://www.w3.org/2000/svg" }, G.createElement("path", { d, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: r ?? h }), G.createElement("path", { d, fill: "none", stroke: l, strokeLinecap: n ?? "round", strokeWidth: h, strokeDasharray: c, strokeDashoffset: u })), typeof t == "function" && G.createElement("div", { style: On }, t({ remainingTime: f, elapsedTime: M, color: l })));
514
+ return { shouldRepeat: D, delay: S, newStartAt: Ie(t, R) };
515
+ } : void 0 }), v = t - N;
516
+ return { elapsedTime: N, path: L, pathLength: f, remainingTime: Math.ceil(v), rotation: h, size: r, stroke: Is(e, v), strokeDashoffset: we(N, 0, f, t, d), strokeWidth: l };
517
+ }, Ee = (e) => {
518
+ let { children: t, strokeLinecap: s, trailColor: i, trailStrokeWidth: r } = e, { path: l, pathLength: a, stroke: c, strokeDashoffset: d, remainingTime: h, elapsedTime: m, size: p, strokeWidth: I } = Ms(e);
519
+ return V.createElement("div", { style: hs(p) }, V.createElement("svg", { viewBox: `0 0 ${p} ${p}`, width: p, height: p, xmlns: "http://www.w3.org/2000/svg" }, V.createElement("path", { d: l, fill: "none", stroke: i ?? "#d9d9d9", strokeWidth: r ?? I }), V.createElement("path", { d: l, fill: "none", stroke: c, strokeLinecap: s ?? "round", strokeWidth: I, strokeDasharray: a, strokeDashoffset: d })), typeof t == "function" && V.createElement("div", { style: ms }, t({ remainingTime: h, elapsedTime: m, color: c })));
517
520
  };
518
- Ke.displayName = "CountdownCircleTimer";
519
- const wn = [_.PRIMARY_GREEN1, _.SECONDARY_RED1, _.SECONDARY_RED1, _.NEUTRALS_GRAY3], Cn = [10, 10, 1, 0], En = /* @__PURE__ */ a("div")({
521
+ Ee.displayName = "CountdownCircleTimer";
522
+ const gs = [P.PRIMARY_GREEN1, P.SECONDARY_RED1, P.SECONDARY_RED1, P.NEUTRALS_GRAY3], vs = [10, 10, 1, 0], fs = /* @__PURE__ */ o("div")({
520
523
  name: "RemainingTime",
521
524
  class: "r165427",
522
525
  propsAsIs: !1
523
- }), $n = _.SECONDARY_GREEN6, je = _.SECONDARY_RED3, Ln = _.NEUTRALS_GRAY3, Rn = ({
526
+ }), Ts = P.SECONDARY_GREEN6, ge = P.SECONDARY_RED3, Ns = P.NEUTRALS_GRAY3, As = ({
524
527
  isPlaying: e = !0,
525
528
  duration: t = 30,
526
- onTimerExpired: n
529
+ onTimerExpired: s
527
530
  }) => {
528
- const [i, r] = L(t > 10 ? $n : je), d = ({
529
- remainingTime: u
530
- }) => /* @__PURE__ */ s(En, {
531
- children: u
532
- }), c = P(() => {
533
- n == null || n(), r(Ln);
534
- }, [n, r]), l = P((u) => {
535
- u === 10 && r(je);
531
+ const [i, r] = z(t > 10 ? Ts : ge), l = ({
532
+ remainingTime: d
533
+ }) => /* @__PURE__ */ n(fs, {
534
+ children: d
535
+ }), a = W(() => {
536
+ s == null || s(), r(Ns);
537
+ }, [s, r]), c = W((d) => {
538
+ d === 10 && r(ge);
536
539
  }, [r]);
537
- return /* @__PURE__ */ s(Ke, {
540
+ return /* @__PURE__ */ n(Ee, {
538
541
  isPlaying: e,
539
542
  duration: t,
540
- colors: wn,
541
- colorsTime: Cn,
543
+ colors: gs,
544
+ colorsTime: vs,
542
545
  size: 32,
543
546
  strokeWidth: 2,
544
547
  trailStrokeWidth: 2,
545
548
  trailColor: i,
546
- onComplete: c,
547
- onUpdate: l,
548
- children: d
549
+ onComplete: a,
550
+ onUpdate: c,
551
+ children: l
549
552
  });
550
- }, Qn = /* @__PURE__ */ a("div")({
553
+ }, ys = /* @__PURE__ */ o("div")({
551
554
  name: "WinBarContainer",
552
555
  class: "wie6cqo",
553
556
  propsAsIs: !1
554
- }), Un = /* @__PURE__ */ a("div")({
557
+ }), Ds = /* @__PURE__ */ o("div")({
555
558
  name: "Content",
556
559
  class: "cgizw4u",
557
560
  propsAsIs: !1
558
- }), Pn = /* @__PURE__ */ a("div")({
561
+ }), Ls = /* @__PURE__ */ o("div")({
559
562
  name: "Title",
560
563
  class: "t1l3ucjp",
561
564
  propsAsIs: !1
562
- }), qn = () => C, _n = /* @__PURE__ */ a(qn())({
565
+ }), ks = () => k, xs = /* @__PURE__ */ o(ks())({
563
566
  name: "WinIcon",
564
567
  class: "wx7j799",
565
568
  propsAsIs: !0
566
- }), Yn = /* @__PURE__ */ a("div")({
569
+ }), ws = /* @__PURE__ */ o("div")({
567
570
  name: "Points",
568
571
  class: "p4lwuj0",
569
572
  propsAsIs: !1
570
- }), Wn = /* @__PURE__ */ a("span")({
573
+ }), Es = /* @__PURE__ */ o("span")({
571
574
  name: "PointsCount",
572
575
  class: "po9i64o",
573
576
  propsAsIs: !1
574
- }), Vn = /* @__PURE__ */ a("span")({
577
+ }), Ss = /* @__PURE__ */ o("span")({
575
578
  name: "PointsUnits",
576
579
  class: "pe5g05h",
577
580
  propsAsIs: !1
578
- }), Fn = ({
581
+ }), js = ({
579
582
  title: e,
580
583
  points: t,
581
- isPlayingTimer: n,
584
+ isPlayingTimer: s,
582
585
  isTimer: i,
583
586
  questionType: r,
584
- timerDuration: d,
585
- onTimerExpired: c
586
- }) => /* @__PURE__ */ I(Qn, { "data-centeredItems": r === z.PREDICTION, children: [
587
- /* @__PURE__ */ I(Un, { children: [
588
- e && /* @__PURE__ */ s(Pn, { children: e }),
589
- t !== void 0 && r !== z.POLL && /* @__PURE__ */ I(R, { children: [
590
- /* @__PURE__ */ s(_n, { name: "icon-trophy" }),
591
- /* @__PURE__ */ I(Yn, { children: [
592
- /* @__PURE__ */ s(Wn, { children: /* @__PURE__ */ s(fe, { value: t }) }),
593
- /* @__PURE__ */ s(Vn, { children: "PTS" })
587
+ timerDuration: l,
588
+ onTimerExpired: a
589
+ }) => /* @__PURE__ */ u(ys, { style: { justifyContent: r === M.PREDICTION ? "center" : "space-between" }, children: [
590
+ /* @__PURE__ */ u(Ds, { children: [
591
+ e && /* @__PURE__ */ n(Ls, { children: e }),
592
+ t !== void 0 && r !== M.POLL && /* @__PURE__ */ u(b, { children: [
593
+ /* @__PURE__ */ n(xs, { name: "icon-trophy" }),
594
+ /* @__PURE__ */ u(ws, { children: [
595
+ /* @__PURE__ */ n(Es, { children: /* @__PURE__ */ n(ie, { value: t }) }),
596
+ /* @__PURE__ */ n(Ss, { children: "PTS" })
594
597
  ] })
595
598
  ] })
596
599
  ] }),
597
- i && r !== z.PREDICTION && /* @__PURE__ */ s(Rn, { isPlaying: n, onTimerExpired: c, duration: d })
598
- ] }), Bn = ({ openedQuestion: e, isLoading: t, vote: n, close: i }) => {
599
- var r, d;
600
- const c = e.subject, l = e.type, u = e.status, f = (r = e.options) == null ? void 0 : r.options, M = e.marketClosed, [v, h] = L(!1), [A, S] = L(!1), [o, m] = L(!0), [p, g] = L(!1), [T, D] = L(""), N = e == null ? void 0 : e.id;
601
- ae(() => {
602
- l === z.PREDICTION ? M && m(!1) : u === Q.RESOLVED && m(!1);
600
+ i && r !== M.PREDICTION && /* @__PURE__ */ n(As, { isPlaying: s, onTimerExpired: a, duration: l })
601
+ ] }), Cs = ({ openedQuestion: e, isLoading: t, vote: s, close: i }) => {
602
+ var r, l;
603
+ const a = e.subject, c = e.type, d = e.status, h = (r = e.options) == null ? void 0 : r.options, m = e.marketClosed, [p, I] = z(!1), [g, L] = z(!1), [f, N] = z(!0), [v, y] = z(!1), [A, D] = z(""), S = e == null ? void 0 : e.id;
604
+ te(() => {
605
+ c === M.PREDICTION ? m && N(!1) : d === $.RESOLVED && N(!1);
603
606
  }, []);
604
- const y = P((j) => {
605
- S(j), h(!0);
606
- }, []), x = P(
607
- async (j) => {
608
- if (N) {
609
- const q = j.currentTarget.value;
610
- D(q), await n(N, q);
607
+ const R = W((x) => {
608
+ L(x), I(!0);
609
+ }, []), O = W(
610
+ async (x) => {
611
+ if (S) {
612
+ const _ = x.currentTarget.value;
613
+ D(_), await s(S, _);
611
614
  }
612
615
  },
613
- [N, D, n]
614
- ), O = P(() => {
615
- g(!0), setTimeout(i, 3e3);
616
- }, [i]), b = E(
617
- () => e == null ? void 0 : e.answers.find((j) => j.youVoted === !0),
616
+ [S, D, s]
617
+ ), H = W(() => {
618
+ y(!0), setTimeout(i, 3e3);
619
+ }, [i]), T = C(
620
+ () => e == null ? void 0 : e.answers.find((x) => x.youVoted === !0),
618
621
  [e]
619
- ), k = E(
620
- () => !!(e != null && e.answers.find((j) => j.correct === !0)),
622
+ ), w = C(
623
+ () => !!(e != null && e.answers.find((x) => x.correct === !0)),
621
624
  [e]
622
- ), w = E(
623
- () => e == null ? void 0 : e.answers.find((j) => j.correct === !0),
625
+ ), j = C(
626
+ () => e == null ? void 0 : e.answers.find((x) => x.correct === !0),
624
627
  [e]
625
- ), le = E(() => e ? e.answers.map((j) => {
626
- var q;
628
+ ), ze = C(() => e ? e.answers.map((x) => {
629
+ var _;
627
630
  return {
628
- ...j,
629
- questionVoted: !!b,
630
- youSelected: T === j.id,
631
+ ...x,
632
+ questionVoted: !!T,
633
+ youSelected: A === x.id,
631
634
  isLoading: t,
632
- hasCorrectAnswer: k,
635
+ hasCorrectAnswer: w,
633
636
  questionType: e.type,
634
- answerTimeExpired: p,
635
- questionStatus: u,
636
- imageMode: (q = e.appearance) == null ? void 0 : q.images,
637
- onVote: x
637
+ answerTimeExpired: v,
638
+ questionStatus: d,
639
+ imageMode: (_ = e.appearance) == null ? void 0 : _.images,
640
+ onVote: O
638
641
  };
639
642
  }) : [], [
640
- k,
641
- p,
643
+ w,
644
+ v,
642
645
  t,
643
646
  e,
644
- b,
645
- u,
646
- x,
647
- T
648
- ]), ce = f && (f.case === "trivia" || f.case === "prediction") ? f.value : void 0, U = u === Q.RESOLVED && l === z.TRIVIA && !b && !o, K = l === z.TRIVIA && A && v && o, X = E(() => l === z.PREDICTION ? !!(b && !k || b && k && w != null && w.youVoted) : !0, [l, b, k, w]), ee = E(() => {
649
- if (l === z.PREDICTION && b && (!k || k && w != null && w.youVoted))
650
- return b.points;
651
- if (!(U || p))
652
- return u === Q.RESOLVED ? 0 : b ? b.correct ? b.points : 0 : w == null ? void 0 : w.points;
647
+ T,
648
+ d,
649
+ O,
650
+ A
651
+ ]), Oe = h && (h.case === "trivia" || h.case === "prediction") ? h.value : void 0, q = d === $.RESOLVED && c === M.TRIVIA && !T && !f, ce = c === M.TRIVIA && g && p && f, de = C(() => c === M.PREDICTION ? !!(T && !w || T && w && j != null && j.youVoted) : !0, [c, T, w, j]), $e = C(() => {
652
+ if (c === M.PREDICTION && T && (!w || w && j != null && j.youVoted))
653
+ return T.points;
654
+ if (!(q || v))
655
+ return d === $.RESOLVED ? 0 : T ? T.correct ? T.points : 0 : j == null ? void 0 : j.points;
653
656
  }, [
654
- p,
655
- b,
656
- w,
657
- u,
658
- U,
659
- l,
660
- k
661
- ]), F = E(() => l === z.PREDICTION && b ? k ? k && w != null && w.youVoted ? "You won" : "" : "To win" : U || p ? "Time expired" : l === z.POLL ? "Time remaining" : b ? "You won" : "To win", [p, l, b, U, k, w]), de = b || U || K || l === z.TRIVIA && u === Q.RESOLVED && o;
662
- return /* @__PURE__ */ s(Te, { "data-question-header": "true", children: /* @__PURE__ */ s(rn, { children: /* @__PURE__ */ I(sn, { children: [
663
- /* @__PURE__ */ s(
664
- nn,
657
+ v,
658
+ T,
659
+ j,
660
+ d,
661
+ q,
662
+ c,
663
+ w
664
+ ]), Re = C(() => c === M.PREDICTION && T ? w ? w && j != null && j.youVoted ? "You won" : "" : "To win" : q || v ? "Time expired" : c === M.POLL ? "Time remaining" : T ? "You won" : "To win", [v, c, T, q, w, j]), Qe = T || q || ce || c === M.TRIVIA && d === $.RESOLVED && f;
665
+ return /* @__PURE__ */ n(qe, { "data-question-header": "true", children: /* @__PURE__ */ n(Vt, { children: /* @__PURE__ */ u(Wt, { children: [
666
+ /* @__PURE__ */ n(
667
+ Yt,
665
668
  {
666
- feedbackMessages: ce,
667
- questionVoted: !!b,
668
- questionVotedCorrectly: b == null ? void 0 : b.correct,
669
- questionType: l,
670
- hasCorrectAnswer: k,
671
- questionStatus: u,
672
- showExpiredNotification: U,
673
- showClosedNotificationTrivia: K,
674
- votedInCurrentRender: v,
675
- votedAfterQuestionClosed: A,
676
- enteredAnActiveQuestion: o,
677
- marketClosed: M
669
+ feedbackMessages: Oe,
670
+ questionVoted: !!T,
671
+ questionVotedCorrectly: T == null ? void 0 : T.correct,
672
+ questionType: c,
673
+ hasCorrectAnswer: w,
674
+ questionStatus: d,
675
+ showExpiredNotification: q,
676
+ showClosedNotificationTrivia: ce,
677
+ votedInCurrentRender: p,
678
+ votedAfterQuestionClosed: g,
679
+ enteredAnActiveQuestion: f,
680
+ marketClosed: m
678
681
  }
679
682
  ),
680
- X && /* @__PURE__ */ s(
681
- Fn,
683
+ de && /* @__PURE__ */ n(
684
+ js,
682
685
  {
683
- title: F,
684
- points: ee,
685
- onTimerExpired: O,
686
+ title: Re,
687
+ points: $e,
688
+ onTimerExpired: H,
686
689
  questionType: e.type,
687
690
  isTimer: !t,
688
- isPlayingTimer: !b,
689
- timerDuration: de ? 0 : Number(((d = e == null ? void 0 : e.appearance) == null ? void 0 : d.autoHideInterval) || "30")
691
+ isPlayingTimer: !T,
692
+ timerDuration: Qe ? 0 : Number(((l = e == null ? void 0 : e.appearance) == null ? void 0 : l.autoHideInterval) || "30")
690
693
  }
691
694
  ),
692
- p ? /* @__PURE__ */ s(
693
- Jt,
695
+ v ? /* @__PURE__ */ n(
696
+ Rt,
694
697
  {
695
698
  title: "More to come...",
696
699
  description: "Watch for additional enhanced stream interactive experience."
697
700
  }
698
- ) : /* @__PURE__ */ I(R, { children: [
699
- /* @__PURE__ */ s(on, { "data-withoutWinBar": !X, children: c }),
700
- /* @__PURE__ */ s(an, { children: le.map((j) => /* @__PURE__ */ s(
701
- Sn,
701
+ ) : /* @__PURE__ */ u(b, { children: [
702
+ /* @__PURE__ */ n(_t, { style: de ? {} : { marginTop: 0 }, children: a }),
703
+ /* @__PURE__ */ n(Bt, { children: ze.map((x) => /* @__PURE__ */ n(
704
+ ds,
702
705
  {
703
- ...j,
704
- markThatVoted: y,
705
- votedAfterQuestionClosed: A,
706
- enteredAnActiveQuestion: o,
707
- marketClosed: M
706
+ ...x,
707
+ markThatVoted: R,
708
+ votedAfterQuestionClosed: g,
709
+ enteredAnActiveQuestion: f,
710
+ marketClosed: m
708
711
  },
709
- j.id
712
+ x.id
710
713
  )) })
711
714
  ] })
712
715
  ] }) }) });
713
- }, Hn = /* @__PURE__ */ a("div")({
716
+ }, bs = /* @__PURE__ */ o("div")({
714
717
  name: "Container",
715
718
  class: "cgn5uen",
716
719
  propsAsIs: !1
717
- }), Gn = /* @__PURE__ */ a("div")({
720
+ }), zs = /* @__PURE__ */ o("div")({
718
721
  name: "Content",
719
722
  class: "c1px8nt6",
720
723
  propsAsIs: !1
721
- }), Zn = /* @__PURE__ */ a("h3")({
724
+ }), Os = /* @__PURE__ */ o("h3")({
722
725
  name: "Title",
723
726
  class: "t5et2jt",
724
727
  propsAsIs: !1
725
- }), Jn = /* @__PURE__ */ a("div")({
728
+ }), $s = /* @__PURE__ */ o("div")({
726
729
  name: "Description",
727
730
  class: "d1i2kpk2",
728
731
  propsAsIs: !1
729
- }), Kn = /* @__PURE__ */ a("div")({
732
+ }), Rs = /* @__PURE__ */ o("div")({
730
733
  name: "DateWrap",
731
734
  class: "dd3lh3p",
732
735
  propsAsIs: !1
733
- }), Xn = /* @__PURE__ */ a("img")({
736
+ }), Qs = /* @__PURE__ */ o("img")({
734
737
  name: "Image",
735
738
  class: "i1gfjeu5",
736
739
  propsAsIs: !1
737
- }), Xe = ({
740
+ }), Se = ({
738
741
  created: e,
739
742
  image: t,
740
- title: n,
743
+ title: s,
741
744
  isPickHistory: i,
742
745
  instantView: r,
743
- notification: d
746
+ notification: l
744
747
  }) => {
745
- const c = E(() => {
748
+ const a = C(() => {
746
749
  if (e) {
747
- const u = new Date(e);
748
- if (Ne(u))
750
+ const d = new Date(e);
751
+ if (le(d))
749
752
  return {
750
- date: ye(u),
751
- time: Ae(u)
753
+ date: oe(d),
754
+ time: ae(d)
752
755
  };
753
756
  }
754
757
  return null;
755
- }, [e]), l = (r == null ? void 0 : r.image) || t;
756
- return /* @__PURE__ */ I(Hn, { children: [
757
- c && /* @__PURE__ */ I(Kn, { children: [
758
- c.date,
758
+ }, [e]), c = (r == null ? void 0 : r.image) || t;
759
+ return /* @__PURE__ */ u(bs, { children: [
760
+ a && /* @__PURE__ */ u(Rs, { children: [
761
+ a.date,
759
762
  " · ",
760
- c.time
763
+ a.time
761
764
  ] }),
762
- (r == null ? void 0 : r.video) && /* @__PURE__ */ s(it, { source: r.video.url, poster: r.video.thumbnailUrl }),
763
- l && !(r != null && r.video) && /* @__PURE__ */ s(Xn, { src: l }),
764
- /* @__PURE__ */ I(Gn, { children: [
765
- /* @__PURE__ */ s(Zn, { children: i ? n : r == null ? void 0 : r.heading }),
766
- /* @__PURE__ */ s(Jn, { children: i ? d == null ? void 0 : d.body : r == null ? void 0 : r.body })
765
+ (r == null ? void 0 : r.video) && /* @__PURE__ */ n(Ye, { source: r.video.url, poster: r.video.thumbnailUrl }),
766
+ c && !(r != null && r.video) && /* @__PURE__ */ n(Qs, { src: c }),
767
+ /* @__PURE__ */ u(zs, { children: [
768
+ /* @__PURE__ */ n(Os, { children: i ? s : r == null ? void 0 : r.heading }),
769
+ /* @__PURE__ */ n($s, { children: i ? l == null ? void 0 : l.body : r == null ? void 0 : r.body })
767
770
  ] })
768
771
  ] });
769
- }, ei = /* @__PURE__ */ a("div")({
772
+ }, Ps = /* @__PURE__ */ o("div")({
770
773
  name: "Container",
771
774
  class: "c1euiow",
772
775
  propsAsIs: !1
773
- }), ti = /* @__PURE__ */ a("a")({
776
+ }), Us = /* @__PURE__ */ o("a")({
774
777
  name: "WebLinkBtn",
775
778
  class: "w19zie3h",
776
779
  propsAsIs: !1
777
- }), ni = ({ instantView: e, ...t }) => /* @__PURE__ */ I(ei, { children: [
778
- /* @__PURE__ */ s(Xe, { instantView: e, ...t }),
779
- (e == null ? void 0 : e.webLink) && /* @__PURE__ */ I(ti, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
780
+ }), qs = ({ instantView: e, ...t }) => /* @__PURE__ */ u(Ps, { children: [
781
+ /* @__PURE__ */ n(Se, { instantView: e, ...t }),
782
+ (e == null ? void 0 : e.webLink) && /* @__PURE__ */ u(Us, { href: e == null ? void 0 : e.webLink.url, target: "_blank", children: [
780
783
  e == null ? void 0 : e.webLink.label,
781
- /* @__PURE__ */ s(C, { name: "icon-external-link" })
784
+ /* @__PURE__ */ n(k, { name: "icon-external-link" })
782
785
  ] })
783
- ] }), ii = /* @__PURE__ */ a("div")({
786
+ ] }), Ys = /* @__PURE__ */ o("div")({
784
787
  name: "Container",
785
788
  class: "c1dcxmvf",
786
789
  propsAsIs: !1
787
- }), ri = /* @__PURE__ */ a("div")({
790
+ }), Vs = /* @__PURE__ */ o("div")({
788
791
  name: "DateTime",
789
792
  class: "db4q22c",
790
793
  propsAsIs: !1
791
- }), si = /* @__PURE__ */ a("blockquote")({
794
+ }), Ws = /* @__PURE__ */ o("blockquote")({
792
795
  name: "Quote",
793
796
  class: "q111mmic",
794
797
  propsAsIs: !1
795
- }), oi = ({ created: e, ...t }) => {
796
- const n = E(() => {
798
+ }), _s = ({ created: e, ...t }) => {
799
+ const s = C(() => {
797
800
  if (e) {
798
801
  const i = new Date(e);
799
- if (Ne(i))
802
+ if (le(i))
800
803
  return {
801
- date: ye(i),
802
- time: Ae(i)
804
+ date: oe(i),
805
+ time: ae(i)
803
806
  };
804
807
  }
805
808
  return null;
806
809
  }, [e]);
807
- return /* @__PURE__ */ I(ii, { children: [
808
- n && /* @__PURE__ */ I(ri, { children: [
809
- n.date,
810
+ return /* @__PURE__ */ u(Ys, { children: [
811
+ s && /* @__PURE__ */ u(Vs, { children: [
812
+ s.date,
810
813
  " · ",
811
- n.time
814
+ s.time
812
815
  ] }),
813
- t.title && /* @__PURE__ */ s(si, { children: t.title }),
814
- /* @__PURE__ */ s(We, { ...t })
816
+ t.title && /* @__PURE__ */ n(Ws, { children: t.title }),
817
+ /* @__PURE__ */ n(Ae, { ...t })
815
818
  ] });
816
- }, ai = /* @__PURE__ */ a("div")({
819
+ }, Bs = /* @__PURE__ */ o("div")({
817
820
  name: "QuestionContainer",
818
821
  class: "qdri6g3",
819
822
  propsAsIs: !1
820
- }), li = ({
823
+ }), Fs = ({
821
824
  openedQuestion: e
822
825
  }) => {
823
- var t, n;
824
- return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ s(ni, {
826
+ var t, s;
827
+ return ((t = e == null ? void 0 : e.attributes) == null ? void 0 : t.attributes.case) === "insight" ? /* @__PURE__ */ n(qs, {
825
828
  created: e.attributes.created,
826
829
  ...e.attributes.attributes.value
827
- }) : ((n = e == null ? void 0 : e.attributes) == null ? void 0 : n.attributes.case) === "tweet" ? /* @__PURE__ */ s(oi, {
830
+ }) : ((s = e == null ? void 0 : e.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ n(_s, {
828
831
  created: e.attributes.created,
829
832
  ...e.attributes.attributes.value
830
833
  }) : null;
831
- }, ci = ({
834
+ }, Hs = ({
832
835
  extendedQuestion: e,
833
836
  vote: t,
834
- close: n
837
+ close: s
835
838
  }) => {
836
839
  const {
837
840
  loading: i,
838
841
  data: r
839
842
  } = e;
840
- return r ? /* @__PURE__ */ s(Bn, {
843
+ return r ? /* @__PURE__ */ n(Cs, {
841
844
  vote: t,
842
- close: n,
845
+ close: s,
843
846
  openedQuestion: r,
844
847
  isLoading: !!i
845
848
  }) : null;
846
- }, di = ({
849
+ }, Gs = ({
847
850
  gamification: e
848
851
  }) => {
849
852
  var t;
850
- const n = Y(e.openedQuestion.$store), i = Y(e.openedQuestion.$extendedStore);
851
- if (!n)
853
+ const s = U(e.openedQuestion.$store), i = U(e.openedQuestion.$extendedStore);
854
+ if (!s)
852
855
  return null;
853
- const r = n.type;
854
- return /* @__PURE__ */ I(ai, {
855
- children: [/* @__PURE__ */ s(Fe, {
856
+ const r = s.type;
857
+ return /* @__PURE__ */ u(Bs, {
858
+ children: [/* @__PURE__ */ n(ye, {
856
859
  close: e.closeQuestion,
857
- type: ((t = n.attributes) == null ? void 0 : t.type) || z.UNSET
858
- }), r === "question" && /* @__PURE__ */ s(ci, {
860
+ type: ((t = s.attributes) == null ? void 0 : t.type) || M.UNSET
861
+ }), r === "question" && /* @__PURE__ */ n(Hs, {
859
862
  vote: e.submitAnswer,
860
863
  close: e.closeQuestion,
861
864
  extendedQuestion: i
862
- }), r !== "question" && /* @__PURE__ */ s(li, {
863
- openedQuestion: n
864
- }), /* @__PURE__ */ s(Bt, {
865
+ }), r !== "question" && /* @__PURE__ */ n(Fs, {
866
+ openedQuestion: s
867
+ }), /* @__PURE__ */ n(bt, {
865
868
  sponsorLogo: ""
866
869
  })]
867
870
  });
868
- };
869
- var et = "Expected a function", we = 0 / 0, ui = "[object Symbol]", pi = /^\s+|\s+$/g, mi = /^[-+]0x[0-9a-f]+$/i, hi = /^0b[01]+$/i, Ii = /^0o[0-7]+$/i, fi = parseInt, gi = typeof te == "object" && te && te.Object === Object && te, vi = typeof self == "object" && self && self.Object === Object && self, Mi = gi || vi || Function("return this")(), Ti = Object.prototype, yi = Ti.toString, Ai = Math.max, Ni = Math.min, me = function() {
870
- return Mi.Date.now();
871
- };
872
- function Di(e, t, n) {
873
- var i, r, d, c, l, u, f = 0, M = !1, v = !1, h = !0;
874
- if (typeof e != "function")
875
- throw new TypeError(et);
876
- t = Ce(t) || 0, oe(n) && (M = !!n.leading, v = "maxWait" in n, d = v ? Ai(Ce(n.maxWait) || 0, t) : d, h = "trailing" in n ? !!n.trailing : h);
877
- function A(y) {
878
- var x = i, O = r;
879
- return i = r = void 0, f = y, c = e.apply(O, x), c;
880
- }
881
- function S(y) {
882
- return f = y, l = setTimeout(p, t), M ? A(y) : c;
883
- }
884
- function o(y) {
885
- var x = y - u, O = y - f, b = t - x;
886
- return v ? Ni(b, d - O) : b;
887
- }
888
- function m(y) {
889
- var x = y - u, O = y - f;
890
- return u === void 0 || x >= t || x < 0 || v && O >= d;
891
- }
892
- function p() {
893
- var y = me();
894
- if (m(y))
895
- return g(y);
896
- l = setTimeout(p, o(y));
897
- }
898
- function g(y) {
899
- return l = void 0, h && i ? A(y) : (i = r = void 0, c);
900
- }
901
- function T() {
902
- l !== void 0 && clearTimeout(l), f = 0, i = u = r = l = void 0;
903
- }
904
- function D() {
905
- return l === void 0 ? c : g(me());
906
- }
907
- function N() {
908
- var y = me(), x = m(y);
909
- if (i = arguments, r = this, u = y, x) {
910
- if (l === void 0)
911
- return S(u);
912
- if (v)
913
- return l = setTimeout(p, t), A(u);
914
- }
915
- return l === void 0 && (l = setTimeout(p, t)), c;
916
- }
917
- return N.cancel = T, N.flush = D, N;
918
- }
919
- function Si(e, t, n) {
920
- var i = !0, r = !0;
921
- if (typeof e != "function")
922
- throw new TypeError(et);
923
- return oe(n) && (i = "leading" in n ? !!n.leading : i, r = "trailing" in n ? !!n.trailing : r), Di(e, t, {
924
- leading: i,
925
- maxWait: t,
926
- trailing: r
927
- });
928
- }
929
- function oe(e) {
930
- var t = typeof e;
931
- return !!e && (t == "object" || t == "function");
932
- }
933
- function xi(e) {
934
- return !!e && typeof e == "object";
935
- }
936
- function bi(e) {
937
- return typeof e == "symbol" || xi(e) && yi.call(e) == ui;
938
- }
939
- function Ce(e) {
940
- if (typeof e == "number")
941
- return e;
942
- if (bi(e))
943
- return we;
944
- if (oe(e)) {
945
- var t = typeof e.valueOf == "function" ? e.valueOf() : e;
946
- e = oe(t) ? t + "" : t;
947
- }
948
- if (typeof e != "string")
949
- return e === 0 ? e : +e;
950
- e = e.replace(pi, "");
951
- var n = hi.test(e);
952
- return n || Ii.test(e) ? fi(e.slice(2), n ? 2 : 8) : mi.test(e) ? we : +e;
953
- }
954
- var zi = Si;
955
- const tt = /* @__PURE__ */ rt(zi), Oi = /* @__PURE__ */ a("div")({
871
+ }, Zs = /* @__PURE__ */ o("div")({
956
872
  name: "Container",
957
873
  class: "c115qtkr",
958
874
  propsAsIs: !1
959
- }), ki = /* @__PURE__ */ a("div")({
875
+ }), Js = /* @__PURE__ */ o("div")({
960
876
  name: "STabs",
961
877
  class: "sxnslc8",
962
878
  propsAsIs: !1
963
- }), ji = /* @__PURE__ */ a("button")({
879
+ }), Ks = /* @__PURE__ */ o("button")({
964
880
  name: "Button",
965
881
  class: "b1umzux0",
966
882
  propsAsIs: !1
967
- }), wi = /* @__PURE__ */ a("span")({
883
+ }), Xs = /* @__PURE__ */ o("span")({
968
884
  name: "Title",
969
885
  class: "tspsaas",
970
886
  propsAsIs: !1
971
887
  });
972
- var J = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(J || {});
973
- const Ee = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(ji, { onClick: n, "data-selected": t, children: /* @__PURE__ */ s(wi, { children: e }) }), Ci = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(Oi, { children: /* @__PURE__ */ I(ki, { "data-position": e === "home" ? "left" : "right", children: [
974
- /* @__PURE__ */ s(Ee, { title: "Home", active: e === "home", onClick: () => t(
888
+ var ee = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(ee || {});
889
+ const ve = ({ title: e, active: t, onClick: s }) => /* @__PURE__ */ n(Ks, { onClick: s, "data-selected": t, children: /* @__PURE__ */ n(Xs, { children: e }) }), en = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ n(Zs, { children: /* @__PURE__ */ u(Js, { "data-position": e === "home" ? "left" : "right", children: [
890
+ /* @__PURE__ */ n(ve, { title: "Home", active: e === "home", onClick: () => t(
975
891
  "home"
976
892
  /* HOME */
977
893
  ) }),
978
- /* @__PURE__ */ s(
979
- Ee,
894
+ /* @__PURE__ */ n(
895
+ ve,
980
896
  {
981
897
  title: "Friends",
982
898
  active: e === "leaderboard",
@@ -987,387 +903,44 @@ const Ee = ({ title: e, active: t, onClick: n }) => /* @__PURE__ */ s(ji, { onCl
987
903
  }
988
904
  )
989
905
  ] }) });
990
- function ve() {
991
- return ve = Object.assign ? Object.assign.bind() : function(e) {
992
- for (var t = 1; t < arguments.length; t++) {
993
- var n = arguments[t];
994
- for (var i in n)
995
- Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
996
- }
997
- return e;
998
- }, ve.apply(this, arguments);
999
- }
1000
- function $e(e) {
1001
- if (e === void 0)
1002
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1003
- return e;
1004
- }
1005
- function Me(e, t) {
1006
- return Me = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, r) {
1007
- return i.__proto__ = r, i;
1008
- }, Me(e, t);
1009
- }
1010
- function Ei(e, t) {
1011
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Me(e, t);
1012
- }
1013
- var Le = Number.isNaN || function(t) {
1014
- return typeof t == "number" && t !== t;
1015
- };
1016
- function $i(e, t) {
1017
- return !!(e === t || Le(e) && Le(t));
1018
- }
1019
- function Li(e, t) {
1020
- if (e.length !== t.length)
1021
- return !1;
1022
- for (var n = 0; n < e.length; n++)
1023
- if (!$i(e[n], t[n]))
1024
- return !1;
1025
- return !0;
1026
- }
1027
- function he(e, t) {
1028
- t === void 0 && (t = Li);
1029
- var n, i = [], r, d = !1;
1030
- function c() {
1031
- for (var l = [], u = 0; u < arguments.length; u++)
1032
- l[u] = arguments[u];
1033
- return d && n === this && t(l, i) || (r = e.apply(this, l), d = !0, n = this, i = l), r;
1034
- }
1035
- return c;
1036
- }
1037
- var Ri = typeof performance == "object" && typeof performance.now == "function", Re = Ri ? function() {
1038
- return performance.now();
1039
- } : function() {
1040
- return Date.now();
1041
- };
1042
- function Qe(e) {
1043
- cancelAnimationFrame(e.id);
1044
- }
1045
- function Qi(e, t) {
1046
- var n = Re();
1047
- function i() {
1048
- Re() - n >= t ? e.call(null) : r.id = requestAnimationFrame(i);
1049
- }
1050
- var r = {
1051
- id: requestAnimationFrame(i)
1052
- };
1053
- return r;
1054
- }
1055
- var Ie = -1;
1056
- function Ue(e) {
1057
- if (e === void 0 && (e = !1), Ie === -1 || e) {
1058
- var t = document.createElement("div"), n = t.style;
1059
- n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(t), Ie = t.offsetWidth - t.clientWidth, document.body.removeChild(t);
1060
- }
1061
- return Ie;
1062
- }
1063
- var V = null;
1064
- function Pe(e) {
1065
- if (e === void 0 && (e = !1), V === null || e) {
1066
- var t = document.createElement("div"), n = t.style;
1067
- n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
1068
- var i = document.createElement("div"), r = i.style;
1069
- return r.width = "100px", r.height = "100px", t.appendChild(i), document.body.appendChild(t), t.scrollLeft > 0 ? V = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? V = "negative" : V = "positive-ascending"), document.body.removeChild(t), V;
1070
- }
1071
- return V;
1072
- }
1073
- var Ui = 150, Pi = function(t, n) {
1074
- return t;
1075
- };
1076
- function qi(e) {
1077
- var t, n = e.getItemOffset, i = e.getEstimatedTotalSize, r = e.getItemSize, d = e.getOffsetForIndexAndAlignment, c = e.getStartIndexForOffset, l = e.getStopIndexForStartIndex, u = e.initInstanceProps, f = e.shouldResetStyleCacheOnItemSizeChange, M = e.validateProps;
1078
- return t = /* @__PURE__ */ function(v) {
1079
- Ei(h, v);
1080
- function h(S) {
1081
- var o;
1082
- return o = v.call(this, S) || this, o._instanceProps = u(o.props, $e(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
1083
- instance: $e(o),
1084
- isScrolling: !1,
1085
- scrollDirection: "forward",
1086
- scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
1087
- scrollUpdateWasRequested: !1
1088
- }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = he(function(m, p, g, T) {
1089
- return o.props.onItemsRendered({
1090
- overscanStartIndex: m,
1091
- overscanStopIndex: p,
1092
- visibleStartIndex: g,
1093
- visibleStopIndex: T
1094
- });
1095
- }), o._callOnScroll = void 0, o._callOnScroll = he(function(m, p, g) {
1096
- return o.props.onScroll({
1097
- scrollDirection: m,
1098
- scrollOffset: p,
1099
- scrollUpdateWasRequested: g
1100
- });
1101
- }), o._getItemStyle = void 0, o._getItemStyle = function(m) {
1102
- var p = o.props, g = p.direction, T = p.itemSize, D = p.layout, N = o._getItemStyleCache(f && T, f && D, f && g), y;
1103
- if (N.hasOwnProperty(m))
1104
- y = N[m];
1105
- else {
1106
- var x = n(o.props, m, o._instanceProps), O = r(o.props, m, o._instanceProps), b = g === "horizontal" || D === "horizontal", k = g === "rtl", w = b ? x : 0;
1107
- N[m] = y = {
1108
- position: "absolute",
1109
- left: k ? void 0 : w,
1110
- right: k ? w : void 0,
1111
- top: b ? 0 : x,
1112
- height: b ? "100%" : O,
1113
- width: b ? O : "100%"
1114
- };
1115
- }
1116
- return y;
1117
- }, o._getItemStyleCache = void 0, o._getItemStyleCache = he(function(m, p, g) {
1118
- return {};
1119
- }), o._onScrollHorizontal = function(m) {
1120
- var p = m.currentTarget, g = p.clientWidth, T = p.scrollLeft, D = p.scrollWidth;
1121
- o.setState(function(N) {
1122
- if (N.scrollOffset === T)
1123
- return null;
1124
- var y = o.props.direction, x = T;
1125
- if (y === "rtl")
1126
- switch (Pe()) {
1127
- case "negative":
1128
- x = -T;
1129
- break;
1130
- case "positive-descending":
1131
- x = D - g - T;
1132
- break;
1133
- }
1134
- return x = Math.max(0, Math.min(x, D - g)), {
1135
- isScrolling: !0,
1136
- scrollDirection: N.scrollOffset < T ? "forward" : "backward",
1137
- scrollOffset: x,
1138
- scrollUpdateWasRequested: !1
1139
- };
1140
- }, o._resetIsScrollingDebounced);
1141
- }, o._onScrollVertical = function(m) {
1142
- var p = m.currentTarget, g = p.clientHeight, T = p.scrollHeight, D = p.scrollTop;
1143
- o.setState(function(N) {
1144
- if (N.scrollOffset === D)
1145
- return null;
1146
- var y = Math.max(0, Math.min(D, T - g));
1147
- return {
1148
- isScrolling: !0,
1149
- scrollDirection: N.scrollOffset < y ? "forward" : "backward",
1150
- scrollOffset: y,
1151
- scrollUpdateWasRequested: !1
1152
- };
1153
- }, o._resetIsScrollingDebounced);
1154
- }, o._outerRefSetter = function(m) {
1155
- var p = o.props.outerRef;
1156
- o._outerRef = m, typeof p == "function" ? p(m) : p != null && typeof p == "object" && p.hasOwnProperty("current") && (p.current = m);
1157
- }, o._resetIsScrollingDebounced = function() {
1158
- o._resetIsScrollingTimeoutId !== null && Qe(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = Qi(o._resetIsScrolling, Ui);
1159
- }, o._resetIsScrolling = function() {
1160
- o._resetIsScrollingTimeoutId = null, o.setState({
1161
- isScrolling: !1
1162
- }, function() {
1163
- o._getItemStyleCache(-1, null);
1164
- });
1165
- }, o;
1166
- }
1167
- h.getDerivedStateFromProps = function(o, m) {
1168
- return _i(o, m), M(o), null;
1169
- };
1170
- var A = h.prototype;
1171
- return A.scrollTo = function(o) {
1172
- o = Math.max(0, o), this.setState(function(m) {
1173
- return m.scrollOffset === o ? null : {
1174
- scrollDirection: m.scrollOffset < o ? "forward" : "backward",
1175
- scrollOffset: o,
1176
- scrollUpdateWasRequested: !0
1177
- };
1178
- }, this._resetIsScrollingDebounced);
1179
- }, A.scrollToItem = function(o, m) {
1180
- m === void 0 && (m = "auto");
1181
- var p = this.props, g = p.itemCount, T = p.layout, D = this.state.scrollOffset;
1182
- o = Math.max(0, Math.min(o, g - 1));
1183
- var N = 0;
1184
- if (this._outerRef) {
1185
- var y = this._outerRef;
1186
- T === "vertical" ? N = y.scrollWidth > y.clientWidth ? Ue() : 0 : N = y.scrollHeight > y.clientHeight ? Ue() : 0;
1187
- }
1188
- this.scrollTo(d(this.props, o, m, D, this._instanceProps, N));
1189
- }, A.componentDidMount = function() {
1190
- var o = this.props, m = o.direction, p = o.initialScrollOffset, g = o.layout;
1191
- if (typeof p == "number" && this._outerRef != null) {
1192
- var T = this._outerRef;
1193
- m === "horizontal" || g === "horizontal" ? T.scrollLeft = p : T.scrollTop = p;
1194
- }
1195
- this._callPropsCallbacks();
1196
- }, A.componentDidUpdate = function() {
1197
- var o = this.props, m = o.direction, p = o.layout, g = this.state, T = g.scrollOffset, D = g.scrollUpdateWasRequested;
1198
- if (D && this._outerRef != null) {
1199
- var N = this._outerRef;
1200
- if (m === "horizontal" || p === "horizontal")
1201
- if (m === "rtl")
1202
- switch (Pe()) {
1203
- case "negative":
1204
- N.scrollLeft = -T;
1205
- break;
1206
- case "positive-ascending":
1207
- N.scrollLeft = T;
1208
- break;
1209
- default:
1210
- var y = N.clientWidth, x = N.scrollWidth;
1211
- N.scrollLeft = x - y - T;
1212
- break;
1213
- }
1214
- else
1215
- N.scrollLeft = T;
1216
- else
1217
- N.scrollTop = T;
1218
- }
1219
- this._callPropsCallbacks();
1220
- }, A.componentWillUnmount = function() {
1221
- this._resetIsScrollingTimeoutId !== null && Qe(this._resetIsScrollingTimeoutId);
1222
- }, A.render = function() {
1223
- var o = this.props, m = o.children, p = o.className, g = o.direction, T = o.height, D = o.innerRef, N = o.innerElementType, y = o.innerTagName, x = o.itemCount, O = o.itemData, b = o.itemKey, k = b === void 0 ? Pi : b, w = o.layout, le = o.outerElementType, ce = o.outerTagName, U = o.style, K = o.useIsScrolling, X = o.width, ee = this.state.isScrolling, F = g === "horizontal" || w === "horizontal", de = F ? this._onScrollHorizontal : this._onScrollVertical, j = this._getRangeToRender(), q = j[0], nt = j[1], De = [];
1224
- if (x > 0)
1225
- for (var B = q; B <= nt; B++)
1226
- De.push(ue(m, {
1227
- data: O,
1228
- key: k(B, O),
1229
- index: B,
1230
- isScrolling: K ? ee : void 0,
1231
- style: this._getItemStyle(B)
1232
- }));
1233
- var Se = i(this.props, this._instanceProps);
1234
- return ue(le || ce || "div", {
1235
- className: p,
1236
- onScroll: de,
1237
- ref: this._outerRefSetter,
1238
- style: ve({
1239
- position: "relative",
1240
- height: T,
1241
- width: X,
1242
- overflow: "auto",
1243
- WebkitOverflowScrolling: "touch",
1244
- willChange: "transform",
1245
- direction: g
1246
- }, U)
1247
- }, ue(N || y || "div", {
1248
- children: De,
1249
- ref: D,
1250
- style: {
1251
- height: F ? "100%" : Se,
1252
- pointerEvents: ee ? "none" : void 0,
1253
- width: F ? Se : "100%"
1254
- }
1255
- }));
1256
- }, A._callPropsCallbacks = function() {
1257
- if (typeof this.props.onItemsRendered == "function") {
1258
- var o = this.props.itemCount;
1259
- if (o > 0) {
1260
- var m = this._getRangeToRender(), p = m[0], g = m[1], T = m[2], D = m[3];
1261
- this._callOnItemsRendered(p, g, T, D);
1262
- }
1263
- }
1264
- if (typeof this.props.onScroll == "function") {
1265
- var N = this.state, y = N.scrollDirection, x = N.scrollOffset, O = N.scrollUpdateWasRequested;
1266
- this._callOnScroll(y, x, O);
1267
- }
1268
- }, A._getRangeToRender = function() {
1269
- var o = this.props, m = o.itemCount, p = o.overscanCount, g = this.state, T = g.isScrolling, D = g.scrollDirection, N = g.scrollOffset;
1270
- if (m === 0)
1271
- return [0, 0, 0, 0];
1272
- var y = c(this.props, N, this._instanceProps), x = l(this.props, y, N, this._instanceProps), O = !T || D === "backward" ? Math.max(1, p) : 1, b = !T || D === "forward" ? Math.max(1, p) : 1;
1273
- return [Math.max(0, y - O), Math.max(0, Math.min(m - 1, x + b)), y, x];
1274
- }, h;
1275
- }(Ve), t.defaultProps = {
1276
- direction: "ltr",
1277
- itemData: void 0,
1278
- layout: "vertical",
1279
- overscanCount: 2,
1280
- useIsScrolling: !1
1281
- }, t;
1282
- }
1283
- var _i = function(t, n) {
1284
- t.children, t.direction, t.height, t.layout, t.innerTagName, t.outerTagName, t.width, n.instance;
1285
- }, Yi = /* @__PURE__ */ qi({
1286
- getItemOffset: function(t, n) {
1287
- var i = t.itemSize;
1288
- return n * i;
1289
- },
1290
- getItemSize: function(t, n) {
1291
- var i = t.itemSize;
1292
- return i;
1293
- },
1294
- getEstimatedTotalSize: function(t) {
1295
- var n = t.itemCount, i = t.itemSize;
1296
- return i * n;
1297
- },
1298
- getOffsetForIndexAndAlignment: function(t, n, i, r, d, c) {
1299
- var l = t.direction, u = t.height, f = t.itemCount, M = t.itemSize, v = t.layout, h = t.width, A = l === "horizontal" || v === "horizontal", S = A ? h : u, o = Math.max(0, f * M - S), m = Math.min(o, n * M), p = Math.max(0, n * M - S + M + c);
1300
- switch (i === "smart" && (r >= p - S && r <= m + S ? i = "auto" : i = "center"), i) {
1301
- case "start":
1302
- return m;
1303
- case "end":
1304
- return p;
1305
- case "center": {
1306
- var g = Math.round(p + (m - p) / 2);
1307
- return g < Math.ceil(S / 2) ? 0 : g > o + Math.floor(S / 2) ? o : g;
1308
- }
1309
- case "auto":
1310
- default:
1311
- return r >= p && r <= m ? r : r < p ? p : m;
1312
- }
1313
- },
1314
- getStartIndexForOffset: function(t, n) {
1315
- var i = t.itemCount, r = t.itemSize;
1316
- return Math.max(0, Math.min(i - 1, Math.floor(n / r)));
1317
- },
1318
- getStopIndexForStartIndex: function(t, n, i) {
1319
- var r = t.direction, d = t.height, c = t.itemCount, l = t.itemSize, u = t.layout, f = t.width, M = r === "horizontal" || u === "horizontal", v = n * l, h = M ? f : d, A = Math.ceil((h + i - v) / l);
1320
- return Math.max(0, Math.min(
1321
- c - 1,
1322
- n + A - 1
1323
- // -1 is because stop index is inclusive
1324
- ));
1325
- },
1326
- initInstanceProps: function(t) {
1327
- },
1328
- shouldResetStyleCacheOnItemSizeChange: !0,
1329
- validateProps: function(t) {
1330
- t.itemSize;
1331
- }
1332
- });
1333
- function Wi(e) {
1334
- var t = e.lastRenderedStartIndex, n = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
1335
- return !(i > n || r < t);
906
+ function tn(e) {
907
+ var t = e.lastRenderedStartIndex, s = e.lastRenderedStopIndex, i = e.startIndex, r = e.stopIndex;
908
+ return !(i > s || r < t);
1336
909
  }
1337
- function Vi(e) {
1338
- for (var t = e.isItemLoaded, n = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, d = e.stopIndex, c = [], l = null, u = null, f = r; f <= d; f++) {
1339
- var M = t(f);
1340
- M ? u !== null && (c.push(l, u), l = u = null) : (u = f, l === null && (l = f));
910
+ function sn(e) {
911
+ for (var t = e.isItemLoaded, s = e.itemCount, i = e.minimumBatchSize, r = e.startIndex, l = e.stopIndex, a = [], c = null, d = null, h = r; h <= l; h++) {
912
+ var m = t(h);
913
+ m ? d !== null && (a.push(c, d), c = d = null) : (d = h, c === null && (c = h));
1341
914
  }
1342
- if (u !== null) {
1343
- for (var v = Math.min(Math.max(u, l + i - 1), n - 1), h = u + 1; h <= v && !t(h); h++)
1344
- u = h;
1345
- c.push(l, u);
915
+ if (d !== null) {
916
+ for (var p = Math.min(Math.max(d, c + i - 1), s - 1), I = d + 1; I <= p && !t(I); I++)
917
+ d = I;
918
+ a.push(c, d);
1346
919
  }
1347
- if (c.length)
1348
- for (; c[1] - c[0] + 1 < i && c[0] > 0; ) {
1349
- var A = c[0] - 1;
1350
- if (!t(A))
1351
- c[0] = A;
920
+ if (a.length)
921
+ for (; a[1] - a[0] + 1 < i && a[0] > 0; ) {
922
+ var g = a[0] - 1;
923
+ if (!t(g))
924
+ a[0] = g;
1352
925
  else
1353
926
  break;
1354
927
  }
1355
- return c;
928
+ return a;
1356
929
  }
1357
- var Fi = function(e, t) {
930
+ var nn = function(e, t) {
1358
931
  if (!(e instanceof t))
1359
932
  throw new TypeError("Cannot call a class as a function");
1360
- }, Bi = function() {
1361
- function e(t, n) {
1362
- for (var i = 0; i < n.length; i++) {
1363
- var r = n[i];
933
+ }, rn = function() {
934
+ function e(t, s) {
935
+ for (var i = 0; i < s.length; i++) {
936
+ var r = s[i];
1364
937
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
1365
938
  }
1366
939
  }
1367
- return function(t, n, i) {
1368
- return n && e(t.prototype, n), i && e(t, i), t;
940
+ return function(t, s, i) {
941
+ return s && e(t.prototype, s), i && e(t, i), t;
1369
942
  };
1370
- }(), Hi = function(e, t) {
943
+ }(), on = function(e, t) {
1371
944
  if (typeof t != "function" && t !== null)
1372
945
  throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1373
946
  e.prototype = Object.create(t && t.prototype, {
@@ -1378,25 +951,26 @@ var Fi = function(e, t) {
1378
951
  configurable: !0
1379
952
  }
1380
953
  }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1381
- }, qe = function(e, t) {
954
+ }, fe = function(e, t) {
1382
955
  if (!e)
1383
956
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1384
957
  return t && (typeof t == "object" || typeof t == "function") ? t : e;
1385
- }, Gi = function(e) {
1386
- Hi(t, e);
958
+ };
959
+ (function(e) {
960
+ on(t, e);
1387
961
  function t() {
1388
- var n, i, r, d;
1389
- Fi(this, t);
1390
- for (var c = arguments.length, l = Array(c), u = 0; u < c; u++)
1391
- l[u] = arguments[u];
1392
- return d = (i = (r = qe(this, (n = t.__proto__ || Object.getPrototypeOf(t)).call.apply(n, [this].concat(l))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(f) {
1393
- var M = f.visibleStartIndex, v = f.visibleStopIndex;
1394
- r._lastRenderedStartIndex = M, r._lastRenderedStopIndex = v, r._ensureRowsLoaded(M, v);
1395
- }, r._setRef = function(f) {
1396
- r._listRef = f;
1397
- }, i), qe(r, d);
962
+ var s, i, r, l;
963
+ nn(this, t);
964
+ for (var a = arguments.length, c = Array(a), d = 0; d < a; d++)
965
+ c[d] = arguments[d];
966
+ return l = (i = (r = fe(this, (s = t.__proto__ || Object.getPrototypeOf(t)).call.apply(s, [this].concat(c))), r), r._lastRenderedStartIndex = -1, r._lastRenderedStopIndex = -1, r._memoizedUnloadedRanges = [], r._onItemsRendered = function(h) {
967
+ var m = h.visibleStartIndex, p = h.visibleStopIndex;
968
+ r._lastRenderedStartIndex = m, r._lastRenderedStopIndex = p, r._ensureRowsLoaded(m, p);
969
+ }, r._setRef = function(h) {
970
+ r._listRef = h;
971
+ }, i), fe(r, l);
1398
972
  }
1399
- return Bi(t, [{
973
+ return rn(t, [{
1400
974
  key: "resetloadMoreItemsCache",
1401
975
  value: function() {
1402
976
  var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
@@ -1418,134 +992,326 @@ var Fi = function(e, t) {
1418
992
  }, {
1419
993
  key: "_ensureRowsLoaded",
1420
994
  value: function(i, r) {
1421
- var d = this.props, c = d.isItemLoaded, l = d.itemCount, u = d.minimumBatchSize, f = u === void 0 ? 10 : u, M = d.threshold, v = M === void 0 ? 15 : M, h = Vi({
1422
- isItemLoaded: c,
1423
- itemCount: l,
1424
- minimumBatchSize: f,
1425
- startIndex: Math.max(0, i - v),
1426
- stopIndex: Math.min(l - 1, r + v)
995
+ var l = this.props, a = l.isItemLoaded, c = l.itemCount, d = l.minimumBatchSize, h = d === void 0 ? 10 : d, m = l.threshold, p = m === void 0 ? 15 : m, I = sn({
996
+ isItemLoaded: a,
997
+ itemCount: c,
998
+ minimumBatchSize: h,
999
+ startIndex: Math.max(0, i - p),
1000
+ stopIndex: Math.min(c - 1, r + p)
1427
1001
  });
1428
- (this._memoizedUnloadedRanges.length !== h.length || this._memoizedUnloadedRanges.some(function(A, S) {
1429
- return h[S] !== A;
1430
- })) && (this._memoizedUnloadedRanges = h, this._loadUnloadedRanges(h));
1002
+ (this._memoizedUnloadedRanges.length !== I.length || this._memoizedUnloadedRanges.some(function(g, L) {
1003
+ return I[L] !== g;
1004
+ })) && (this._memoizedUnloadedRanges = I, this._loadUnloadedRanges(I));
1431
1005
  }
1432
1006
  }, {
1433
1007
  key: "_loadUnloadedRanges",
1434
1008
  value: function(i) {
1435
- for (var r = this, d = this.props.loadMoreItems || this.props.loadMoreRows, c = function(f) {
1436
- var M = i[f], v = i[f + 1], h = d(M, v);
1437
- h != null && h.then(function() {
1438
- if (Wi({
1009
+ for (var r = this, l = this.props.loadMoreItems || this.props.loadMoreRows, a = function(h) {
1010
+ var m = i[h], p = i[h + 1], I = l(m, p);
1011
+ I != null && I.then(function() {
1012
+ if (tn({
1439
1013
  lastRenderedStartIndex: r._lastRenderedStartIndex,
1440
1014
  lastRenderedStopIndex: r._lastRenderedStopIndex,
1441
- startIndex: M,
1442
- stopIndex: v
1015
+ startIndex: m,
1016
+ stopIndex: p
1443
1017
  })) {
1444
1018
  if (r._listRef == null)
1445
1019
  return;
1446
- typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(M, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1020
+ typeof r._listRef.resetAfterIndex == "function" ? r._listRef.resetAfterIndex(m, !0) : (typeof r._listRef._getItemStyleCache == "function" && r._listRef._getItemStyleCache(-1), r._listRef.forceUpdate());
1447
1021
  }
1448
1022
  });
1449
- }, l = 0; l < i.length; l += 2)
1450
- c(l);
1023
+ }, c = 0; c < i.length; c += 2)
1024
+ a(c);
1451
1025
  }
1452
1026
  }]), t;
1453
- }(Ve);
1454
- const Zi = /* @__PURE__ */ a("div")({
1027
+ })(Ge);
1028
+ const an = /* @__PURE__ */ o("div")({
1455
1029
  name: "Container",
1456
1030
  class: "culdu4a",
1457
1031
  propsAsIs: !1
1458
- }), Ji = /* @__PURE__ */ a("div")({
1032
+ }), ln = /* @__PURE__ */ o("div")({
1459
1033
  name: "Position",
1460
1034
  class: "pwf8e69",
1461
1035
  propsAsIs: !1
1462
- }), Ki = /* @__PURE__ */ a("img")({
1036
+ }), cn = /* @__PURE__ */ o("img")({
1463
1037
  name: "Avatar",
1464
1038
  class: "atf4yh4",
1465
1039
  propsAsIs: !1
1466
- }), Xi = /* @__PURE__ */ a("div")({
1040
+ }), dn = /* @__PURE__ */ o("div")({
1467
1041
  name: "AvatarPlaceholder",
1468
1042
  class: "a1dg29ja",
1469
1043
  propsAsIs: !1
1470
- }), er = /* @__PURE__ */ a("div")({
1044
+ }), un = /* @__PURE__ */ o("div")({
1471
1045
  name: "Content",
1472
1046
  class: "c10a68rc",
1473
1047
  propsAsIs: !1
1474
- }), tr = /* @__PURE__ */ a("div")({
1048
+ }), pn = /* @__PURE__ */ o("div")({
1475
1049
  name: "NameContainer",
1476
1050
  class: "nc4kck5",
1477
1051
  propsAsIs: !1
1478
- }), nr = /* @__PURE__ */ a("span")({
1052
+ }), hn = /* @__PURE__ */ o("span")({
1479
1053
  name: "Name",
1480
1054
  class: "njsrqgr",
1481
1055
  propsAsIs: !1
1482
- }), ir = () => C, rr = /* @__PURE__ */ a(ir())({
1056
+ }), mn = () => k, In = /* @__PURE__ */ o(mn())({
1483
1057
  name: "CurrentUserBadge",
1484
1058
  class: "c17uc4zr",
1485
1059
  propsAsIs: !0
1486
- }), sr = ({
1060
+ });
1061
+ var je = { exports: {} }, Mn = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", gn = Mn, vn = gn;
1062
+ function Ce() {
1063
+ }
1064
+ function be() {
1065
+ }
1066
+ be.resetWarningCache = Ce;
1067
+ var fn = function() {
1068
+ function e(i, r, l, a, c, d) {
1069
+ if (d !== vn) {
1070
+ var h = new Error(
1071
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
1072
+ );
1073
+ throw h.name = "Invariant Violation", h;
1074
+ }
1075
+ }
1076
+ e.isRequired = e;
1077
+ function t() {
1078
+ return e;
1079
+ }
1080
+ var s = {
1081
+ array: e,
1082
+ bigint: e,
1083
+ bool: e,
1084
+ func: e,
1085
+ number: e,
1086
+ object: e,
1087
+ string: e,
1088
+ symbol: e,
1089
+ any: e,
1090
+ arrayOf: t,
1091
+ element: e,
1092
+ elementType: e,
1093
+ instanceOf: t,
1094
+ node: e,
1095
+ objectOf: t,
1096
+ oneOf: t,
1097
+ oneOfType: t,
1098
+ shape: t,
1099
+ exact: t,
1100
+ checkPropTypes: be,
1101
+ resetWarningCache: Ce
1102
+ };
1103
+ return s.PropTypes = s, s;
1104
+ };
1105
+ je.exports = fn();
1106
+ var Tn = je.exports;
1107
+ const E = /* @__PURE__ */ Ve(Tn);
1108
+ class re extends Ze {
1109
+ constructor(t) {
1110
+ super(t), this.scrollListener = this.scrollListener.bind(this), this.eventListenerOptions = this.eventListenerOptions.bind(this), this.mousewheelListener = this.mousewheelListener.bind(this);
1111
+ }
1112
+ componentDidMount() {
1113
+ this.pageLoaded = this.props.pageStart, this.options = this.eventListenerOptions(), this.attachScrollListener();
1114
+ }
1115
+ componentDidUpdate() {
1116
+ if (this.props.isReverse && this.loadMore) {
1117
+ const t = this.getParentElement(this.scrollComponent);
1118
+ t.scrollTop = t.scrollHeight - this.beforeScrollHeight + this.beforeScrollTop, this.loadMore = !1;
1119
+ }
1120
+ this.attachScrollListener();
1121
+ }
1122
+ componentWillUnmount() {
1123
+ this.detachScrollListener(), this.detachMousewheelListener();
1124
+ }
1125
+ isPassiveSupported() {
1126
+ let t = !1;
1127
+ const s = {
1128
+ get passive() {
1129
+ t = !0;
1130
+ }
1131
+ };
1132
+ try {
1133
+ document.addEventListener("test", null, s), document.removeEventListener("test", null, s);
1134
+ } catch {
1135
+ }
1136
+ return t;
1137
+ }
1138
+ eventListenerOptions() {
1139
+ let t = this.props.useCapture;
1140
+ return this.isPassiveSupported() ? t = {
1141
+ useCapture: this.props.useCapture,
1142
+ passive: !0
1143
+ } : t = {
1144
+ passive: !1
1145
+ }, t;
1146
+ }
1147
+ // Set a defaut loader for all your `InfiniteScroll` components
1148
+ setDefaultLoader(t) {
1149
+ this.defaultLoader = t;
1150
+ }
1151
+ detachMousewheelListener() {
1152
+ let t = window;
1153
+ this.props.useWindow === !1 && (t = this.scrollComponent.parentNode), t.removeEventListener(
1154
+ "mousewheel",
1155
+ this.mousewheelListener,
1156
+ this.options ? this.options : this.props.useCapture
1157
+ );
1158
+ }
1159
+ detachScrollListener() {
1160
+ let t = window;
1161
+ this.props.useWindow === !1 && (t = this.getParentElement(this.scrollComponent)), t.removeEventListener(
1162
+ "scroll",
1163
+ this.scrollListener,
1164
+ this.options ? this.options : this.props.useCapture
1165
+ ), t.removeEventListener(
1166
+ "resize",
1167
+ this.scrollListener,
1168
+ this.options ? this.options : this.props.useCapture
1169
+ );
1170
+ }
1171
+ getParentElement(t) {
1172
+ const s = this.props.getScrollParent && this.props.getScrollParent();
1173
+ return s ?? (t && t.parentNode);
1174
+ }
1175
+ filterProps(t) {
1176
+ return t;
1177
+ }
1178
+ attachScrollListener() {
1179
+ const t = this.getParentElement(this.scrollComponent);
1180
+ if (!this.props.hasMore || !t)
1181
+ return;
1182
+ let s = window;
1183
+ this.props.useWindow === !1 && (s = t), s.addEventListener(
1184
+ "mousewheel",
1185
+ this.mousewheelListener,
1186
+ this.options ? this.options : this.props.useCapture
1187
+ ), s.addEventListener(
1188
+ "scroll",
1189
+ this.scrollListener,
1190
+ this.options ? this.options : this.props.useCapture
1191
+ ), s.addEventListener(
1192
+ "resize",
1193
+ this.scrollListener,
1194
+ this.options ? this.options : this.props.useCapture
1195
+ ), this.props.initialLoad && this.scrollListener();
1196
+ }
1197
+ mousewheelListener(t) {
1198
+ t.deltaY === 1 && !this.isPassiveSupported() && t.preventDefault();
1199
+ }
1200
+ scrollListener() {
1201
+ const t = this.scrollComponent, s = window, i = this.getParentElement(t);
1202
+ let r;
1203
+ if (this.props.useWindow) {
1204
+ const l = document.documentElement || document.body.parentNode || document.body, a = s.pageYOffset !== void 0 ? s.pageYOffset : l.scrollTop;
1205
+ this.props.isReverse ? r = a : r = this.calculateOffset(t, a);
1206
+ } else
1207
+ this.props.isReverse ? r = i.scrollTop : r = t.scrollHeight - i.scrollTop - i.clientHeight;
1208
+ r < Number(this.props.threshold) && t && t.offsetParent !== null && (this.detachScrollListener(), this.beforeScrollHeight = i.scrollHeight, this.beforeScrollTop = i.scrollTop, typeof this.props.loadMore == "function" && (this.props.loadMore(this.pageLoaded += 1), this.loadMore = !0));
1209
+ }
1210
+ calculateOffset(t, s) {
1211
+ return t ? this.calculateTopPosition(t) + (t.offsetHeight - s - window.innerHeight) : 0;
1212
+ }
1213
+ calculateTopPosition(t) {
1214
+ return t ? t.offsetTop + this.calculateTopPosition(t.offsetParent) : 0;
1215
+ }
1216
+ render() {
1217
+ const t = this.filterProps(this.props), {
1218
+ children: s,
1219
+ element: i,
1220
+ hasMore: r,
1221
+ initialLoad: l,
1222
+ isReverse: a,
1223
+ loader: c,
1224
+ loadMore: d,
1225
+ pageStart: h,
1226
+ ref: m,
1227
+ threshold: p,
1228
+ useCapture: I,
1229
+ useWindow: g,
1230
+ getScrollParent: L,
1231
+ ...f
1232
+ } = t;
1233
+ f.ref = (v) => {
1234
+ this.scrollComponent = v, m && m(v);
1235
+ };
1236
+ const N = [s];
1237
+ return r && (c ? a ? N.unshift(c) : N.push(c) : this.defaultLoader && (a ? N.unshift(this.defaultLoader) : N.push(this.defaultLoader))), V.createElement(i, f, N);
1238
+ }
1239
+ }
1240
+ se(re, "propTypes", {
1241
+ children: E.node.isRequired,
1242
+ element: E.node,
1243
+ hasMore: E.bool,
1244
+ initialLoad: E.bool,
1245
+ isReverse: E.bool,
1246
+ loader: E.node,
1247
+ loadMore: E.func.isRequired,
1248
+ pageStart: E.number,
1249
+ ref: E.func,
1250
+ getScrollParent: E.func,
1251
+ threshold: E.number,
1252
+ useCapture: E.bool,
1253
+ useWindow: E.bool
1254
+ }), se(re, "defaultProps", {
1255
+ element: "div",
1256
+ hasMore: !1,
1257
+ initialLoad: !0,
1258
+ pageStart: 0,
1259
+ ref: null,
1260
+ threshold: 250,
1261
+ useWindow: !0,
1262
+ isReverse: !1,
1263
+ useCapture: !1,
1264
+ loader: null,
1265
+ getScrollParent: null
1266
+ });
1267
+ const Nn = ({
1487
1268
  rank: e,
1488
1269
  avatar: t,
1489
- name: n,
1270
+ name: s,
1490
1271
  points: i,
1491
1272
  isCurrentUser: r,
1492
- openItemDetail: d,
1493
- style: c
1494
- }) => /* @__PURE__ */ I(Zi, { onClick: d, style: c, children: [
1495
- /* @__PURE__ */ s(Ji, { children: e || 0 }),
1496
- /* @__PURE__ */ I(er, { children: [
1497
- t ? /* @__PURE__ */ s(Ki, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(Xi, { children: Be(n || "") }),
1498
- /* @__PURE__ */ I(tr, { children: [
1499
- /* @__PURE__ */ s(nr, { children: n || "" }),
1500
- r && /* @__PURE__ */ s(rr, { name: "icon-star" })
1273
+ openItemDetail: l,
1274
+ style: a
1275
+ }) => /* @__PURE__ */ u(an, { onClick: l, style: a, children: [
1276
+ /* @__PURE__ */ n(ln, { children: e || 0 }),
1277
+ /* @__PURE__ */ u(un, { children: [
1278
+ t ? /* @__PURE__ */ n(cn, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ n(dn, { children: De(s || "") }),
1279
+ /* @__PURE__ */ u(pn, { children: [
1280
+ /* @__PURE__ */ n(hn, { children: s || "" }),
1281
+ r && /* @__PURE__ */ n(In, { name: "icon-star" })
1501
1282
  ] })
1502
1283
  ] }),
1503
- /* @__PURE__ */ s("div", { children: He(i) })
1504
- ] }), or = /* @__PURE__ */ a("div")({
1505
- name: "ScrollContainer",
1506
- class: "s13d8sg6",
1284
+ /* @__PURE__ */ n("div", { children: Le(i) })
1285
+ ] }), An = /* @__PURE__ */ o("div")({
1286
+ name: "Container",
1287
+ class: "c16btbfp",
1507
1288
  propsAsIs: !1
1508
- }), ar = ({
1289
+ }), yn = ({
1509
1290
  items: e,
1510
1291
  currentUserId: t,
1511
- openItemDetail: n,
1292
+ openItemDetail: s,
1512
1293
  fetchMore: i,
1513
- onScroll: r
1514
- }) => /* @__PURE__ */ s(st, { children: ({ width: d, height: c }) => /* @__PURE__ */ s(
1515
- Gi,
1516
- {
1517
- isItemLoaded: (l) => l < e.length,
1518
- itemCount: e.length + 1,
1519
- loadMoreItems: i,
1520
- children: ({ onItemsRendered: l, ref: u }) => /* @__PURE__ */ s(or, { children: /* @__PURE__ */ s(
1521
- Yi,
1522
- {
1523
- itemSize: 56,
1524
- onScroll: r,
1525
- onItemsRendered: l,
1526
- ref: u,
1527
- itemCount: e.length,
1528
- width: d,
1529
- height: c,
1530
- children: ({ index: f, style: M }) => /* @__PURE__ */ s(
1531
- sr,
1532
- {
1533
- style: { ...M, maxHeight: 48 },
1534
- ...e[f],
1535
- openItemDetail: () => n(e[f].userId),
1536
- isCurrentUser: !!t && t === e[f].userId
1537
- },
1538
- e[f].userId
1539
- )
1540
- }
1541
- ) })
1542
- }
1543
- ) }), lr = ({ deepLink: e }) => {
1544
- const { data: t } = Y(e.$store), n = t == null ? void 0 : t.url, i = e.desktopLink;
1545
- return /* @__PURE__ */ s(
1546
- ot,
1294
+ scrollNode: r,
1295
+ hasMore: l
1296
+ }) => /* @__PURE__ */ n(re, {
1297
+ loadMore: i,
1298
+ initialLoad: !1,
1299
+ hasMore: l,
1300
+ useWindow: !1,
1301
+ getScrollParent: () => r.current,
1302
+ children: /* @__PURE__ */ n(An, {
1303
+ children: e.map((a) => /* @__PURE__ */ n(Nn, {
1304
+ ...a,
1305
+ openItemDetail: () => s(a.userId),
1306
+ isCurrentUser: !!t && t === a.userId
1307
+ }, a.userId))
1308
+ })
1309
+ }), Dn = ({ deepLink: e }) => {
1310
+ const { data: t } = U(e.$store), s = t == null ? void 0 : t.url, i = e.desktopLink;
1311
+ return /* @__PURE__ */ n(
1312
+ We,
1547
1313
  {
1548
- inviteLink: n || i,
1314
+ inviteLink: s || i,
1549
1315
  socialLinks: [
1550
1316
  {
1551
1317
  icon: "icon-facebook",
@@ -1562,300 +1328,261 @@ const Zi = /* @__PURE__ */ a("div")({
1562
1328
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
1563
1329
  }
1564
1330
  );
1565
- }, cr = ({ gamification: e, hideTabs: t }) => {
1566
- const { data: n } = Y(e.leaderboardList.$store), i = $(0), r = P(
1567
- tt((d) => {
1568
- Math.abs(i.current - d.scrollOffset) < 112 || (i.current = d.scrollOffset, t(d.scrollOffset !== 0 && d.scrollDirection === "forward"));
1569
- }, 200),
1570
- [t]
1571
- );
1572
- return n != null && n.length ? /* @__PURE__ */ s(
1573
- ar,
1331
+ }, Ln = ({ gamification: e, scrollNode: t, scrollStore: s }) => {
1332
+ const { data: i, hasMore: r } = U(e.leaderboardList.$store);
1333
+ return i != null && i.length ? /* @__PURE__ */ n(
1334
+ yn,
1574
1335
  {
1336
+ items: i,
1337
+ scrollNode: t,
1338
+ scrollStore: s,
1575
1339
  fetchMore: e.leaderboardList.fetchMore,
1576
- items: n,
1577
- onScroll: r,
1340
+ hasMore: r,
1578
1341
  openItemDetail: e.openUser,
1579
1342
  currentUserId: e.currentUserId.get()
1580
1343
  }
1581
- ) : /* @__PURE__ */ s(lr, { deepLink: e.deepLink });
1582
- }, dr = /* @__PURE__ */ a("div")({
1344
+ ) : /* @__PURE__ */ n(Dn, { deepLink: e.deepLink });
1345
+ }, kn = /* @__PURE__ */ o("div")({
1583
1346
  name: "QuestionItem",
1584
1347
  class: "q1w97g3p",
1585
1348
  propsAsIs: !1
1586
- }), ur = /* @__PURE__ */ a("div")({
1349
+ }), xn = /* @__PURE__ */ o("div")({
1587
1350
  name: "QuestionCaption",
1588
1351
  class: "q2sl39u",
1589
1352
  propsAsIs: !1
1590
- }), pr = /* @__PURE__ */ a("div")({
1353
+ }), wn = /* @__PURE__ */ o("div")({
1591
1354
  name: "QuestionBody",
1592
1355
  class: "qd5h0uc",
1593
1356
  propsAsIs: !1
1594
- }), mr = /* @__PURE__ */ a("div")({
1357
+ }), En = /* @__PURE__ */ o("div")({
1595
1358
  name: "QuestionAction",
1596
1359
  class: "q105uluy",
1597
1360
  propsAsIs: !1
1598
- }), hr = () => C, se = /* @__PURE__ */ a(hr())({
1361
+ }), Sn = () => k, K = /* @__PURE__ */ o(Sn())({
1599
1362
  name: "QuestionActionIcon",
1600
1363
  class: "q1fa0b9h",
1601
1364
  propsAsIs: !0
1602
- }), Ir = () => C, fr = /* @__PURE__ */ a(Ir())({
1365
+ }), jn = () => k, Cn = /* @__PURE__ */ o(jn())({
1603
1366
  name: "QuestionTypeIcon",
1604
1367
  class: "qxlt78s",
1605
1368
  propsAsIs: !0
1606
- }), gr = /* @__PURE__ */ a("div")({
1369
+ }), bn = /* @__PURE__ */ o("div")({
1607
1370
  name: "QuestionTypeLabel",
1608
1371
  class: "qmg0vkx",
1609
1372
  propsAsIs: !1
1610
- }), vr = /* @__PURE__ */ a("div")({
1373
+ }), zn = /* @__PURE__ */ o("div")({
1611
1374
  name: "QuestionContent",
1612
1375
  class: "q1uz5j1g",
1613
1376
  propsAsIs: !1
1614
- }), Mr = /* @__PURE__ */ a("button")({
1377
+ }), On = /* @__PURE__ */ o("button")({
1615
1378
  name: "PlayButton",
1616
1379
  class: "p1pba9p1",
1617
1380
  propsAsIs: !1
1618
- }), Tr = {
1619
- [ne.LOST]: /* @__PURE__ */ s(se, { name: "incorrectVoted" }),
1620
- [ne.WON]: /* @__PURE__ */ s(se, { name: "icon-check" }),
1621
- [ne.UNSET]: /* @__PURE__ */ s(se, { name: "icon-arrow" }),
1622
- [ne.DNP]: /* @__PURE__ */ s(se, { name: "icon-arrow" })
1623
- }, yr = ({
1381
+ }), $n = {
1382
+ [G.LOST]: /* @__PURE__ */ n(K, { name: "incorrectVoted" }),
1383
+ [G.WON]: /* @__PURE__ */ n(K, { name: "icon-check" }),
1384
+ [G.UNSET]: /* @__PURE__ */ n(K, { name: "icon-arrow" }),
1385
+ [G.DNP]: /* @__PURE__ */ n(K, { name: "icon-arrow" })
1386
+ }, Rn = ({
1624
1387
  questionId: e,
1625
1388
  questionType: t,
1626
- questionStatus: n,
1389
+ questionStatus: s,
1627
1390
  subject: i,
1628
1391
  openForVoting: r,
1629
- openQuestion: d,
1630
- status: c
1392
+ openQuestion: l,
1393
+ status: a
1631
1394
  }) => {
1632
- const l = Ye[t], u = Tr[c];
1633
- return l ? /* @__PURE__ */ I(dr, { onClick: () => d == null ? void 0 : d(e), children: [
1634
- /* @__PURE__ */ I(vr, { children: [
1635
- /* @__PURE__ */ I(ur, { children: [
1636
- /* @__PURE__ */ s(
1637
- fr,
1395
+ const c = Ne[t], d = $n[a];
1396
+ return c ? /* @__PURE__ */ u(kn, { onClick: () => l == null ? void 0 : l(e), children: [
1397
+ /* @__PURE__ */ u(zn, { children: [
1398
+ /* @__PURE__ */ u(xn, { children: [
1399
+ /* @__PURE__ */ n(
1400
+ Cn,
1638
1401
  {
1639
- "data-type-trivia": t === z.TRIVIA,
1640
- "data-type-poll": t === z.POLL,
1641
- name: l.iconName
1402
+ "data-type-trivia": t === M.TRIVIA,
1403
+ "data-type-poll": t === M.POLL,
1404
+ name: c.iconName
1642
1405
  }
1643
1406
  ),
1644
- /* @__PURE__ */ I(gr, { children: [
1645
- l.label,
1646
- t === z.TRIVIA && n === Q.RESOLVED && " • Expired"
1407
+ /* @__PURE__ */ u(bn, { children: [
1408
+ c.label,
1409
+ t === M.TRIVIA && s === $.RESOLVED && " • Expired"
1647
1410
  ] })
1648
1411
  ] }),
1649
- /* @__PURE__ */ s(pr, { children: i || "" })
1412
+ /* @__PURE__ */ n(wn, { children: i || "" })
1650
1413
  ] }),
1651
- /* @__PURE__ */ s(mr, { children: r ? /* @__PURE__ */ s(Mr, { children: "Play" }) : u })
1414
+ /* @__PURE__ */ n(En, { children: r ? /* @__PURE__ */ n(On, { children: "Play" }) : d })
1652
1415
  ] }) : null;
1653
- }, Ar = /* @__PURE__ */ a("div")({
1416
+ }, Qn = /* @__PURE__ */ o("div")({
1654
1417
  name: "Container",
1655
1418
  class: "cll3md7",
1656
1419
  propsAsIs: !1
1657
- }), Nr = /* @__PURE__ */ a("button")({
1420
+ }), Pn = /* @__PURE__ */ o("button")({
1658
1421
  name: "ActionBtn",
1659
1422
  class: "a10g1iik",
1660
1423
  propsAsIs: !1
1661
- }), Dr = ({
1424
+ }), Un = ({
1662
1425
  openInsight: e,
1663
1426
  questionId: t,
1664
- ...n
1665
- }) => /* @__PURE__ */ I(Ar, { children: [
1666
- /* @__PURE__ */ s(Xe, { questionId: t, ...n, isPickHistory: !0 }),
1667
- e && /* @__PURE__ */ s(Nr, { onClick: () => e(t), children: "View Insight" })
1668
- ] }), Sr = /* @__PURE__ */ a("div")({
1427
+ ...s
1428
+ }) => /* @__PURE__ */ u(Qn, { children: [
1429
+ /* @__PURE__ */ n(Se, { questionId: t, ...s, isPickHistory: !0 }),
1430
+ e && /* @__PURE__ */ n(Pn, { onClick: () => e(t), children: "View Insight" })
1431
+ ] }), qn = /* @__PURE__ */ o("div")({
1669
1432
  name: "Container",
1670
1433
  class: "cl56x6b",
1671
1434
  propsAsIs: !1
1672
- }), xr = () => at, br = /* @__PURE__ */ a(xr())({
1435
+ }), Yn = () => _e, Vn = /* @__PURE__ */ o(Yn())({
1673
1436
  name: "ActionButton",
1674
1437
  class: "a11pzf92",
1675
1438
  propsAsIs: !0
1676
- }), zr = /* @__PURE__ */ a("div")({
1439
+ }), Wn = /* @__PURE__ */ o("div")({
1677
1440
  name: "DateTime",
1678
1441
  class: "d1hbaleq",
1679
1442
  propsAsIs: !1
1680
- }), Or = /* @__PURE__ */ a("blockquote")({
1443
+ }), _n = /* @__PURE__ */ o("blockquote")({
1681
1444
  name: "Quote",
1682
1445
  class: "qvvgqjm",
1683
1446
  propsAsIs: !1
1684
- }), kr = ({
1447
+ }), Bn = ({
1685
1448
  openTweet: e,
1686
1449
  created: t,
1687
- ...n
1450
+ ...s
1688
1451
  }) => {
1689
- const i = E(() => {
1452
+ const i = C(() => {
1690
1453
  if (t) {
1691
1454
  const r = new Date(t);
1692
- if (Ne(r))
1455
+ if (le(r))
1693
1456
  return {
1694
- date: ye(r),
1695
- time: Ae(r)
1457
+ date: oe(r),
1458
+ time: ae(r)
1696
1459
  };
1697
1460
  }
1698
1461
  return null;
1699
1462
  }, [t]);
1700
- return /* @__PURE__ */ I(Sr, { children: [
1701
- i && /* @__PURE__ */ I(zr, { children: [
1463
+ return /* @__PURE__ */ u(qn, { children: [
1464
+ i && /* @__PURE__ */ u(Wn, { children: [
1702
1465
  i.date,
1703
1466
  " · ",
1704
1467
  i.time
1705
1468
  ] }),
1706
- n.title && /* @__PURE__ */ s(Or, { children: n.title }),
1707
- /* @__PURE__ */ s(We, { ...n }),
1708
- e && /* @__PURE__ */ s(br, { onClick: () => e(n.tweetId), children: "View Insight" })
1469
+ s.title && /* @__PURE__ */ n(_n, { children: s.title }),
1470
+ /* @__PURE__ */ n(Ae, { ...s }),
1471
+ e && /* @__PURE__ */ n(Vn, { onClick: () => e(s.tweetId), children: "View Insight" })
1709
1472
  ] });
1710
- }, jr = /* @__PURE__ */ a("div")({
1473
+ }, Fn = /* @__PURE__ */ o("div")({
1711
1474
  name: "QuestionsContainer",
1712
1475
  class: "qvghv3l",
1713
1476
  propsAsIs: !1
1714
- }), wr = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ s(jr, { children: e == null ? void 0 : e.map((n) => {
1715
- var i, r, d;
1716
- if (n.type === "question" && ((i = n.attributes) == null ? void 0 : i.attributes.case) === "question") {
1717
- const c = n.attributes.attributes.value;
1718
- return /* @__PURE__ */ s(yr, { openQuestion: t, ...c }, c.questionId);
1477
+ }), Hn = ({ questions: e, openQuestion: t }) => /* @__PURE__ */ n(Fn, { children: e == null ? void 0 : e.map((s) => {
1478
+ var i, r, l;
1479
+ if (s.type === "question" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "question") {
1480
+ const a = s.attributes.attributes.value;
1481
+ return /* @__PURE__ */ n(Rn, { openQuestion: t, ...a }, a.questionId);
1719
1482
  }
1720
- if (n.type === "insight" && ((r = n.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1721
- const c = n.attributes.attributes.value, l = n.attributes.created;
1722
- return /* @__PURE__ */ s(Dr, { openInsight: t, ...c, created: l }, c.questionId);
1483
+ if (s.type === "insight" && ((r = s.attributes) == null ? void 0 : r.attributes.case) === "insight") {
1484
+ const a = s.attributes.attributes.value, c = s.attributes.created;
1485
+ return /* @__PURE__ */ n(Un, { openInsight: t, ...a, created: c }, a.questionId);
1723
1486
  }
1724
- if (n.type === "tweet" && ((d = n.attributes) == null ? void 0 : d.attributes.case) === "tweet") {
1725
- const c = n.attributes.attributes.value, l = n.attributes.id, u = n.attributes.created;
1726
- return /* @__PURE__ */ s(kr, { openTweet: t, ...c, tweetId: l, created: u }, l);
1487
+ if (s.type === "tweet" && ((l = s.attributes) == null ? void 0 : l.attributes.case) === "tweet") {
1488
+ const a = s.attributes.attributes.value, c = s.attributes.id, d = s.attributes.created;
1489
+ return /* @__PURE__ */ n(Bn, { openTweet: t, ...a, tweetId: c, created: d }, c);
1727
1490
  }
1728
1491
  return null;
1729
- }) }), Cr = ({ store: e, openQuestion: t }) => {
1730
- const n = Y(e);
1731
- return n != null && n.data ? /* @__PURE__ */ s(wr, { openQuestion: t, questions: n.data }) : /* @__PURE__ */ s("div", { children: "wait questions..." });
1732
- }, Er = ({ userSummary: e }) => {
1492
+ }) }), Gn = ({ store: e, openQuestion: t }) => {
1493
+ const s = U(e);
1494
+ return s != null && s.data ? /* @__PURE__ */ n(Hn, { openQuestion: t, questions: s.data }) : /* @__PURE__ */ n("div", { children: "wait questions..." });
1495
+ }, Zn = ({ userSummary: e }) => {
1733
1496
  var t;
1734
- const [n, i] = L(void 0);
1735
- return ae(() => {
1736
- const r = e.subscribe((d) => {
1737
- d != null && d.data && i(d.data);
1497
+ const [s, i] = z(void 0);
1498
+ return te(() => {
1499
+ const r = e.subscribe((l) => {
1500
+ l != null && l.data && i(l.data);
1738
1501
  });
1739
1502
  return () => {
1740
1503
  r();
1741
1504
  };
1742
- }, [e]), n != null && n.summary ? /* @__PURE__ */ s(Ge, { ...n.summary, successRate: (t = n.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ s("div", { children: "wait user..." });
1743
- }, $r = ({
1744
- gamification: e
1745
- }) => {
1746
- const [t, n] = L(!1), [i, r] = L(J.HOME), d = $(null), c = $(0), [l, u] = ut(), f = (h) => {
1747
- u(() => r(h));
1748
- }, M = (h) => {
1749
- u(() => n(h));
1750
- }, v = P(tt(() => {
1751
- const h = d.current;
1752
- if (!h)
1753
- return;
1754
- const {
1755
- scrollTop: A
1756
- } = h;
1757
- if (A === 0) {
1758
- c.current = 0, M(!1);
1505
+ }, [e]), s != null && s.summary ? /* @__PURE__ */ n(ke, { ...s.summary, successRate: (t = s.percentage) == null ? void 0 : t.correct }) : /* @__PURE__ */ n("div", { children: "wait user..." });
1506
+ }, Jn = ({ gamification: e, className: t, scrollStore: s, scrollNode: i }) => {
1507
+ const [r, l] = z(!1), [a, c] = z(ee.HOME), [, d] = Je(), h = (p) => {
1508
+ d(() => c(p));
1509
+ }, m = (p) => {
1510
+ d(() => l(p));
1511
+ };
1512
+ return te(() => s.listen((p) => {
1513
+ if (p.scrollPosition === 0) {
1514
+ m(!1), s.setKey("tabsShown", !1);
1759
1515
  return;
1760
1516
  }
1761
- if (Math.abs(c.current - A) < 112)
1762
- return;
1763
- const S = c.current < A ? "forward" : "backward";
1764
- c.current = A, M(S === "forward");
1765
- }, 200), []);
1766
- return ae(() => {
1767
- const h = d.current;
1768
- return h ? (i === J.HOME && h.addEventListener("scroll", v), () => {
1769
- h.removeEventListener("scroll", v);
1770
- }) : () => {
1771
- };
1772
- }, [i, v]), /* @__PURE__ */ I("div", {
1773
- style: {
1774
- height: "100%",
1775
- display: "flex",
1776
- flexDirection: "column",
1777
- overflow: "hidden"
1778
- },
1779
- children: [l, /* @__PURE__ */ s(ge, {
1780
- style: {
1781
- paddingBottom: "4px",
1782
- transition: "margin-top 0.2s ease-in-out",
1783
- marginTop: t ? "-56px" : "0px"
1784
- },
1785
- children: /* @__PURE__ */ s(Ci, {
1786
- activePage: i,
1787
- toggleActivePage: f
1788
- })
1789
- }), i === J.HOME && /* @__PURE__ */ I(Te, {
1790
- ref: d,
1791
- children: [/* @__PURE__ */ s(ge, {
1517
+ m(p.scrollDirection === "forward"), s.setKey("tabsShown", p.scrollDirection !== "forward");
1518
+ }), [s]), /* @__PURE__ */ u("div", { className: t, children: [
1519
+ /* @__PURE__ */ n(
1520
+ X,
1521
+ {
1792
1522
  style: {
1793
- paddingTop: "12px"
1523
+ paddingBottom: "8px",
1524
+ position: "sticky",
1525
+ transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
1526
+ top: r ? "-60px" : "0px"
1794
1527
  },
1795
- children: /* @__PURE__ */ s(Er, {
1796
- userSummary: e.userSummary
1797
- })
1798
- }), /* @__PURE__ */ s(lt, {
1799
- children: /* @__PURE__ */ s(Cr, {
1800
- openQuestion: e.openQuestion,
1801
- store: e.feedList.getStore()
1802
- })
1803
- })]
1804
- }), i === J.LEADERBOARD && /* @__PURE__ */ s("div", {
1805
- className: "c1bp9dj2",
1806
- children: /* @__PURE__ */ s(cr, {
1807
- gamification: e,
1808
- hideTabs: M
1809
- })
1810
- })]
1811
- });
1812
- }, Lr = () => ct, _e = /* @__PURE__ */ a(Lr())({
1528
+ children: /* @__PURE__ */ n(en, { activePage: a, toggleActivePage: h })
1529
+ }
1530
+ ),
1531
+ a === ee.HOME && /* @__PURE__ */ u(b, { children: [
1532
+ /* @__PURE__ */ n(X, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Zn, { userSummary: e.userSummary }) }),
1533
+ /* @__PURE__ */ n(Be, { children: /* @__PURE__ */ n(Gn, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
1534
+ ] }),
1535
+ a === ee.LEADERBOARD && /* @__PURE__ */ n(X, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ n(Ln, { scrollStore: s, scrollNode: i, gamification: e }) })
1536
+ ] });
1537
+ }, Kn = () => Fe, Te = /* @__PURE__ */ o(Kn())({
1813
1538
  name: "OpenedContainer",
1814
1539
  class: "oar61gl",
1815
1540
  propsAsIs: !0
1816
- }), Rr = /* @__PURE__ */ a("div")({
1541
+ }), Xn = /* @__PURE__ */ o("div")({
1817
1542
  name: "UserContainer",
1818
1543
  class: "u14zaal4",
1819
1544
  propsAsIs: !1
1820
- }), Qr = ({
1545
+ }), ei = ({
1821
1546
  correct: e,
1822
1547
  incorrect: t
1823
1548
  }) => {
1824
- const n = e + t;
1825
- return n === 0 ? 0 : Math.round(e / n * 100);
1826
- }, _r = ({
1549
+ const s = e + t;
1550
+ return s === 0 ? 0 : Math.round(e / s * 100);
1551
+ }, ri = ({
1827
1552
  gamification: e,
1828
- className: t
1553
+ scrollStore: t,
1554
+ className: s,
1555
+ appNode: i,
1556
+ scrollNode: r
1829
1557
  }) => {
1830
- const n = Y(e.openedQuestion.$store), i = Y(e.openedUser);
1831
- return /* @__PURE__ */ I(R, {
1832
- children: [n && /* @__PURE__ */ s(_e, {
1833
- className: t,
1834
- children: /* @__PURE__ */ s(di, {
1558
+ const l = U(e.openedQuestion.$store), a = U(e.openedUser);
1559
+ return /* @__PURE__ */ u(b, {
1560
+ children: [l && i.current && ue.createPortal(/* @__PURE__ */ n(Te, {
1561
+ className: s,
1562
+ children: /* @__PURE__ */ n(Gs, {
1835
1563
  gamification: e
1836
1564
  })
1837
- }), i && /* @__PURE__ */ s(_e, {
1838
- className: t,
1839
- children: /* @__PURE__ */ I(Rr, {
1840
- children: [/* @__PURE__ */ s(Fe, {
1565
+ }), i.current), a && i.current && ue.createPortal(/* @__PURE__ */ n(Te, {
1566
+ className: s,
1567
+ children: /* @__PURE__ */ u(Xn, {
1568
+ children: [/* @__PURE__ */ n(ye, {
1841
1569
  label: "Friend's Rank",
1842
1570
  close: e.closeUser
1843
- }), /* @__PURE__ */ s(ge, {
1844
- children: /* @__PURE__ */ s(Ge, {
1845
- ...i,
1846
- successRate: Qr(i)
1571
+ }), /* @__PURE__ */ n(X, {
1572
+ children: /* @__PURE__ */ n(ke, {
1573
+ ...a,
1574
+ successRate: ei(a)
1847
1575
  })
1848
1576
  })]
1849
1577
  })
1850
- }), /* @__PURE__ */ s(Te, {
1851
- className: t,
1852
- "data-nav": "true",
1853
- children: /* @__PURE__ */ s($r, {
1854
- gamification: e
1855
- })
1578
+ }), i.current), /* @__PURE__ */ n(Jn, {
1579
+ scrollStore: t,
1580
+ scrollNode: r,
1581
+ className: s,
1582
+ gamification: e
1856
1583
  })]
1857
1584
  });
1858
1585
  };
1859
1586
  export {
1860
- _r as default
1587
+ ri as default
1861
1588
  };