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