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