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