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