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