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