@streamlayer/react 0.29.1 → 0.29.3
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/masters.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/index-5db9fe4d.cjs +1 -0
- package/lib/dist/{index-fb783640.js → index-74fad1da.js} +583 -569
- package/lib/dist/{masters-6908212b.js → masters-7b69b363.js} +2578 -2555
- package/lib/dist/{masters-228cfe7f.cjs → masters-8b4d5688.cjs} +13 -13
- package/lib/dist/style.css +3 -3
- package/lib/es/masters.js +2 -2
- package/lib/es/points.js +1 -1
- package/lib/{index-05d85ab5.js → index-0ee221fc.js} +69 -46
- package/lib/index-14d36d45.cjs +6 -0
- package/lib/{index-6b61558d.cjs → index-dc9aee43.cjs} +1 -1
- package/lib/{index-7a48e98e.js → index-ffb81042.js} +825 -811
- package/lib/masters-6226c77f.cjs +1 -0
- package/lib/{masters-aed3ad5f.js → masters-62d1a034.js} +53 -53
- package/lib/style.css +1 -1
- package/package.json +5 -5
- package/lib/dist/index-990a941f.cjs +0 -1
- package/lib/index-9fd382fe.cjs +0 -6
- package/lib/masters-b1364fa3.cjs +0 -1
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as o,
|
|
3
|
-
import U, { useRef as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as y, jsx as a, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { s as o, t as w, o as be, a as ke, i as je, Q as D, b as Y, c as L, E as R, r as Le, d as Ke, e as Xe, n as et, w as tt, u as k, f as st, P as F, g as Re, h as ue, j as nt } from "./masters-7b69b363.js";
|
|
3
|
+
import U, { useRef as b, useState as C, useCallback as G, useEffect as it, useLayoutEffect as rt, useMemo as H, Component as at, createElement as B, PureComponent as Ce } from "react";
|
|
4
|
+
const ot = () => w, lt = () => w, ct = /* @__PURE__ */ o("div")({
|
|
5
5
|
name: "a",
|
|
6
6
|
class: "acysrl1",
|
|
7
7
|
propsAsIs: !1
|
|
8
|
-
}),
|
|
8
|
+
}), dt = /* @__PURE__ */ o("div")({
|
|
9
9
|
name: "l",
|
|
10
10
|
class: "lo57cjm",
|
|
11
11
|
propsAsIs: !1
|
|
12
|
-
}),
|
|
12
|
+
}), ut = /* @__PURE__ */ o(ot())({
|
|
13
13
|
name: "p",
|
|
14
14
|
class: "p14kwh4y",
|
|
15
15
|
propsAsIs: !0
|
|
16
|
-
}),
|
|
16
|
+
}), pt = /* @__PURE__ */ o("span")({
|
|
17
17
|
name: "s",
|
|
18
18
|
class: "sxun7sq",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
20
|
+
}), ht = /* @__PURE__ */ o("button")({
|
|
21
21
|
name: "c",
|
|
22
22
|
class: "c1i8ida8",
|
|
23
23
|
propsAsIs: !1
|
|
24
|
-
}),
|
|
24
|
+
}), mt = /* @__PURE__ */ o(lt())({
|
|
25
25
|
name: "g",
|
|
26
26
|
class: "g1m0xfmw",
|
|
27
27
|
propsAsIs: !0
|
|
28
|
-
}),
|
|
29
|
-
const n = t ?
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
(n == null ? void 0 : n.iconName) && /* @__PURE__ */ a(
|
|
33
|
-
(n == null ? void 0 : n.label) && /* @__PURE__ */ a(
|
|
28
|
+
}), $e = ({ type: t, close: e, label: s }) => {
|
|
29
|
+
const n = t ? be[t] : { label: s, iconName: void 0 };
|
|
30
|
+
return /* @__PURE__ */ y(ct, { children: [
|
|
31
|
+
/* @__PURE__ */ y(dt, { children: [
|
|
32
|
+
(n == null ? void 0 : n.iconName) && /* @__PURE__ */ a(ut, { name: n.iconName }),
|
|
33
|
+
(n == null ? void 0 : n.label) && /* @__PURE__ */ a(pt, { children: n.label })
|
|
34
34
|
] }),
|
|
35
|
-
/* @__PURE__ */ a(
|
|
35
|
+
/* @__PURE__ */ a(ht, { onClick: e, children: /* @__PURE__ */ a(mt, { name: "icon-cross" }) })
|
|
36
36
|
] });
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const ft = /* @__PURE__ */ o("div")({
|
|
39
39
|
name: "t",
|
|
40
40
|
class: "taj61ja",
|
|
41
41
|
propsAsIs: !1
|
|
42
|
-
}),
|
|
42
|
+
}), gt = /* @__PURE__ */ o("div")({
|
|
43
43
|
name: "r",
|
|
44
44
|
class: "r19fxewd",
|
|
45
45
|
propsAsIs: !1
|
|
46
|
-
}),
|
|
46
|
+
}), It = /* @__PURE__ */ o("div")({
|
|
47
47
|
name: "i",
|
|
48
48
|
class: "i1whkbqh",
|
|
49
49
|
propsAsIs: !1
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ a(
|
|
52
|
-
/* @__PURE__ */ a(
|
|
50
|
+
}), pe = ({ indicator: t, title: e }) => /* @__PURE__ */ y(ft, { children: [
|
|
51
|
+
/* @__PURE__ */ a(gt, { children: e }),
|
|
52
|
+
/* @__PURE__ */ a(It, { children: t })
|
|
53
53
|
] });
|
|
54
|
-
const
|
|
54
|
+
const vt = /* @__PURE__ */ o("div")({
|
|
55
55
|
name: "i",
|
|
56
56
|
class: "i4lbhzs",
|
|
57
57
|
propsAsIs: !1
|
|
58
|
-
}),
|
|
58
|
+
}), Mt = /* @__PURE__ */ o("div")({
|
|
59
59
|
name: "o",
|
|
60
60
|
class: "ordquhq",
|
|
61
61
|
propsAsIs: !1
|
|
62
|
-
}),
|
|
62
|
+
}), yt = /* @__PURE__ */ o("div")({
|
|
63
63
|
name: "n",
|
|
64
64
|
class: "nwzed99",
|
|
65
65
|
propsAsIs: !1
|
|
66
|
-
}),
|
|
67
|
-
/* @__PURE__ */ a(
|
|
68
|
-
/* @__PURE__ */ a(
|
|
66
|
+
}), V = ({ indicator: t, title: e }) => /* @__PURE__ */ y(vt, { children: [
|
|
67
|
+
/* @__PURE__ */ a(Mt, { children: t }),
|
|
68
|
+
/* @__PURE__ */ a(yt, { children: e })
|
|
69
69
|
] });
|
|
70
|
-
const
|
|
70
|
+
const zt = /* @__PURE__ */ o("div")({
|
|
71
71
|
name: "o",
|
|
72
72
|
class: "o15y0waw",
|
|
73
73
|
propsAsIs: !1
|
|
74
|
-
}),
|
|
74
|
+
}), Nt = /* @__PURE__ */ o("div")({
|
|
75
75
|
name: "i",
|
|
76
76
|
class: "ihjewwf",
|
|
77
77
|
propsAsIs: !1
|
|
78
|
-
}),
|
|
78
|
+
}), _t = /* @__PURE__ */ o("div")({
|
|
79
79
|
name: "n",
|
|
80
80
|
class: "n10e9lv8",
|
|
81
81
|
propsAsIs: !1
|
|
82
|
-
}),
|
|
82
|
+
}), Tt = /* @__PURE__ */ o("div")({
|
|
83
83
|
name: "r",
|
|
84
84
|
class: "r13bxv",
|
|
85
85
|
propsAsIs: !1
|
|
86
|
-
}),
|
|
86
|
+
}), At = /* @__PURE__ */ o("img")({
|
|
87
87
|
name: "a",
|
|
88
88
|
class: "a1fi59c9",
|
|
89
89
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
90
|
+
}), St = /* @__PURE__ */ o("div")({
|
|
91
91
|
name: "s",
|
|
92
92
|
class: "s1kkihge",
|
|
93
93
|
propsAsIs: !1
|
|
94
|
-
}),
|
|
94
|
+
}), Dt = /* @__PURE__ */ o("div")({
|
|
95
95
|
name: "c",
|
|
96
96
|
class: "cy4f4t",
|
|
97
97
|
propsAsIs: !1
|
|
98
|
-
}),
|
|
98
|
+
}), xt = /* @__PURE__ */ o("div")({
|
|
99
99
|
name: "p",
|
|
100
100
|
class: "p18cnlx1",
|
|
101
101
|
propsAsIs: !1
|
|
102
|
-
}),
|
|
102
|
+
}), wt = /* @__PURE__ */ o("img")({
|
|
103
103
|
name: "l",
|
|
104
104
|
class: "lboqgs5",
|
|
105
105
|
propsAsIs: !1
|
|
106
|
-
}),
|
|
106
|
+
}), Ot = /* @__PURE__ */ o("div")({
|
|
107
107
|
name: "d",
|
|
108
108
|
class: "d1oaal4",
|
|
109
109
|
propsAsIs: !1
|
|
110
|
-
}),
|
|
110
|
+
}), Et = /* @__PURE__ */ o("div")({
|
|
111
111
|
name: "x",
|
|
112
112
|
class: "x1yzgo0u",
|
|
113
113
|
propsAsIs: !1
|
|
114
|
-
}),
|
|
114
|
+
}), bt = /* @__PURE__ */ o("div")({
|
|
115
115
|
name: "f",
|
|
116
116
|
class: "f1l9i8s8",
|
|
117
117
|
propsAsIs: !1
|
|
118
|
-
}),
|
|
118
|
+
}), kt = /* @__PURE__ */ o("div")({
|
|
119
119
|
name: "g",
|
|
120
120
|
class: "g4cgl4u",
|
|
121
121
|
propsAsIs: !1
|
|
122
|
-
}),
|
|
122
|
+
}), jt = /* @__PURE__ */ o("div")({
|
|
123
123
|
name: "h",
|
|
124
124
|
class: "h1qn1tmd",
|
|
125
125
|
propsAsIs: !1
|
|
126
|
-
}),
|
|
126
|
+
}), Lt = /* @__PURE__ */ o("div")({
|
|
127
127
|
name: "u",
|
|
128
128
|
class: "u1gsbhq4",
|
|
129
129
|
propsAsIs: !1
|
|
130
|
-
}),
|
|
130
|
+
}), Rt = /* @__PURE__ */ o("div")({
|
|
131
131
|
name: "m",
|
|
132
132
|
class: "mvj8oco",
|
|
133
133
|
propsAsIs: !1
|
|
134
|
-
}),
|
|
134
|
+
}), Ct = /* @__PURE__ */ o("button")({
|
|
135
135
|
name: "v",
|
|
136
136
|
class: "viqiaf2",
|
|
137
137
|
propsAsIs: !1
|
|
138
|
-
}),
|
|
138
|
+
}), $t = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Ue = ({
|
|
139
139
|
avatar: t,
|
|
140
140
|
name: e,
|
|
141
141
|
points: s,
|
|
@@ -143,60 +143,60 @@ const Mt = /* @__PURE__ */ o("div")({
|
|
|
143
143
|
rank: i,
|
|
144
144
|
streak: u,
|
|
145
145
|
correct: p,
|
|
146
|
-
incorrect:
|
|
147
|
-
inTop:
|
|
148
|
-
average:
|
|
149
|
-
}) => /* @__PURE__ */
|
|
150
|
-
/* @__PURE__ */ a(
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
t && /* @__PURE__ */ a(
|
|
153
|
-
!t && /* @__PURE__ */ a(
|
|
146
|
+
incorrect: f,
|
|
147
|
+
inTop: m,
|
|
148
|
+
average: g
|
|
149
|
+
}) => /* @__PURE__ */ y(zt, { children: [
|
|
150
|
+
/* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ y(Tt, { children: [
|
|
151
|
+
/* @__PURE__ */ y(Ct, { children: [
|
|
152
|
+
t && /* @__PURE__ */ a(At, { alt: "avatar", src: t }),
|
|
153
|
+
!t && /* @__PURE__ */ a(Rt, { children: ke(e || "") })
|
|
154
154
|
] }),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */ a(
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
/* @__PURE__ */ a(
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
/* @__PURE__ */ a(
|
|
155
|
+
/* @__PURE__ */ y(St, { children: [
|
|
156
|
+
/* @__PURE__ */ a(Dt, { children: e }),
|
|
157
|
+
/* @__PURE__ */ y(xt, { children: [
|
|
158
|
+
/* @__PURE__ */ y(Ot, { children: [
|
|
159
|
+
/* @__PURE__ */ a(wt, { alt: "rank-icon", src: $t }),
|
|
160
|
+
/* @__PURE__ */ y(Et, { children: [
|
|
161
|
+
je(s),
|
|
162
|
+
/* @__PURE__ */ a(bt, { children: "PTS" })
|
|
163
163
|
] })
|
|
164
164
|
] }),
|
|
165
|
-
/* @__PURE__ */ a(
|
|
166
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ a(kt, {}),
|
|
166
|
+
/* @__PURE__ */ y("div", { children: [
|
|
167
167
|
"TOP ",
|
|
168
|
-
|
|
168
|
+
m || 0,
|
|
169
169
|
"%"
|
|
170
170
|
] })
|
|
171
171
|
] })
|
|
172
172
|
] })
|
|
173
173
|
] }) }),
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */ a(
|
|
177
|
-
/* @__PURE__ */ a(
|
|
174
|
+
/* @__PURE__ */ y(_t, { children: [
|
|
175
|
+
/* @__PURE__ */ y(jt, { children: [
|
|
176
|
+
/* @__PURE__ */ a(pe, { indicator: n || 0, title: "Friends rank" }),
|
|
177
|
+
/* @__PURE__ */ a(pe, { indicator: i || 0, title: "Global rank" })
|
|
178
178
|
] }),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */ a(
|
|
181
|
-
/* @__PURE__ */ a(
|
|
182
|
-
/* @__PURE__ */ a(
|
|
183
|
-
/* @__PURE__ */ a(
|
|
179
|
+
/* @__PURE__ */ y(Lt, { children: [
|
|
180
|
+
/* @__PURE__ */ a(V, { indicator: u || 0, title: "Win streak" }),
|
|
181
|
+
/* @__PURE__ */ a(V, { indicator: p || 0, title: "Correct" }),
|
|
182
|
+
/* @__PURE__ */ a(V, { indicator: f || 0, title: "Incorrect" }),
|
|
183
|
+
/* @__PURE__ */ a(V, { indicator: `${g || 0}%`, title: "Succ. rate" })
|
|
184
184
|
] })
|
|
185
185
|
] })
|
|
186
186
|
] });
|
|
187
|
-
const
|
|
187
|
+
const Ut = () => w, Qt = /* @__PURE__ */ o("div")({
|
|
188
188
|
name: "c",
|
|
189
189
|
class: "ciyeb68",
|
|
190
190
|
propsAsIs: !1
|
|
191
|
-
}),
|
|
191
|
+
}), qt = /* @__PURE__ */ o(Ut())({
|
|
192
192
|
name: "n",
|
|
193
193
|
class: "nfic4xc",
|
|
194
194
|
propsAsIs: !0
|
|
195
|
-
}),
|
|
195
|
+
}), he = /* @__PURE__ */ o("div")({
|
|
196
196
|
name: "d",
|
|
197
197
|
class: "d1pd1p66",
|
|
198
198
|
propsAsIs: !1
|
|
199
|
-
}),
|
|
199
|
+
}), me = /* @__PURE__ */ o("div")({
|
|
200
200
|
name: "p",
|
|
201
201
|
class: "p132yxcv",
|
|
202
202
|
propsAsIs: !1
|
|
@@ -204,122 +204,135 @@ const Rt = () => w, $t = /* @__PURE__ */ o("div")({
|
|
|
204
204
|
name: "l",
|
|
205
205
|
class: "l4a8aw",
|
|
206
206
|
propsAsIs: !1
|
|
207
|
-
}),
|
|
207
|
+
}), J = /* @__PURE__ */ o("span")({
|
|
208
208
|
name: "g",
|
|
209
209
|
class: "gzdx7pk",
|
|
210
210
|
propsAsIs: !1
|
|
211
|
-
}), Pt = ({
|
|
211
|
+
}), Pt = /* @__PURE__ */ o("div")({
|
|
212
|
+
name: "s",
|
|
213
|
+
class: "smnc4zm",
|
|
214
|
+
propsAsIs: !1
|
|
215
|
+
}), Wt = ({
|
|
212
216
|
feedbackMessages: t,
|
|
213
217
|
questionVotedCorrectly: e,
|
|
214
218
|
questionVoted: s,
|
|
215
219
|
questionType: n,
|
|
216
|
-
hasCorrectAnswer: i
|
|
220
|
+
hasCorrectAnswer: i,
|
|
221
|
+
questionStatus: u
|
|
217
222
|
}) => {
|
|
218
|
-
|
|
223
|
+
const p = s && (n === D.TRIVIA || n === D.PREDICTION);
|
|
224
|
+
if (!p && u !== Y.RESOLVED)
|
|
219
225
|
return null;
|
|
220
|
-
const
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
u && /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */ a(
|
|
224
|
-
/* @__PURE__ */
|
|
226
|
+
const f = n === D.PREDICTION && !i, m = e ? "correct" : "incorrect", g = e ? t.correctFeedback : t.incorrectFeedback;
|
|
227
|
+
return /* @__PURE__ */ y(Qt, { "data-isPrediction": f, children: [
|
|
228
|
+
u === Y.RESOLVED && n === D.TRIVIA && !s && /* @__PURE__ */ y(q, { children: [
|
|
229
|
+
/* @__PURE__ */ a(he, { children: /* @__PURE__ */ a(w, { name: "questionExpired" }) }),
|
|
230
|
+
/* @__PURE__ */ y("div", { children: [
|
|
231
|
+
/* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(J, { children: "Question Expired" }) }),
|
|
232
|
+
/* @__PURE__ */ a(Pt, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
233
|
+
] })
|
|
234
|
+
] }),
|
|
235
|
+
p && f && /* @__PURE__ */ y(q, { children: [
|
|
236
|
+
/* @__PURE__ */ a(qt, { name: "icon-prediction" }),
|
|
237
|
+
/* @__PURE__ */ a(J, { children: "Stay tuned to see if your prediction was correct." })
|
|
225
238
|
] }),
|
|
226
|
-
i && /* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */ a(
|
|
228
|
-
/* @__PURE__ */ a("div", { children: /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */ a(Yt, { "data-feedbackType":
|
|
230
|
-
/* @__PURE__ */ a(
|
|
239
|
+
p && i && /* @__PURE__ */ y(q, { children: [
|
|
240
|
+
/* @__PURE__ */ a(he, { "data-feedbackType": m, children: /* @__PURE__ */ a(w, { name: m }) }),
|
|
241
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ y(me, { children: [
|
|
242
|
+
/* @__PURE__ */ a(Yt, { "data-feedbackType": m, children: g == null ? void 0 : g.title }),
|
|
243
|
+
/* @__PURE__ */ a(J, { children: g == null ? void 0 : g.description })
|
|
231
244
|
] }) })
|
|
232
245
|
] })
|
|
233
246
|
] });
|
|
234
247
|
};
|
|
235
|
-
const
|
|
248
|
+
const Ft = /* @__PURE__ */ o("div")({
|
|
236
249
|
name: "o",
|
|
237
250
|
class: "olc1eph",
|
|
238
251
|
propsAsIs: !1
|
|
239
|
-
}),
|
|
252
|
+
}), Vt = /* @__PURE__ */ o("div")({
|
|
240
253
|
name: "n",
|
|
241
254
|
class: "n1yoh29a",
|
|
242
255
|
propsAsIs: !1
|
|
243
|
-
}),
|
|
256
|
+
}), Ht = /* @__PURE__ */ o("div")({
|
|
244
257
|
name: "p",
|
|
245
258
|
class: "pjkr5mb",
|
|
246
259
|
propsAsIs: !1
|
|
247
|
-
}),
|
|
260
|
+
}), Bt = /* @__PURE__ */ o("div")({
|
|
248
261
|
name: "r",
|
|
249
262
|
class: "r82wnnx",
|
|
250
263
|
propsAsIs: !1
|
|
251
264
|
});
|
|
252
|
-
const
|
|
265
|
+
const Gt = () => Qe, Zt = () => Qe, Jt = () => w, Kt = /* @__PURE__ */ o("button")({
|
|
253
266
|
name: "c",
|
|
254
267
|
class: "cpm4u8k",
|
|
255
268
|
propsAsIs: !1
|
|
256
|
-
}),
|
|
269
|
+
}), Xt = /* @__PURE__ */ o("div")({
|
|
257
270
|
name: "l",
|
|
258
271
|
class: "lwfomc3",
|
|
259
272
|
propsAsIs: !1
|
|
260
|
-
}),
|
|
273
|
+
}), es = /* @__PURE__ */ o("span")({
|
|
261
274
|
name: "d",
|
|
262
275
|
class: "dmltvg2",
|
|
263
276
|
propsAsIs: !1
|
|
264
|
-
}),
|
|
277
|
+
}), ts = /* @__PURE__ */ o("div")({
|
|
265
278
|
name: "s",
|
|
266
279
|
class: "stfjpqz",
|
|
267
280
|
propsAsIs: !1
|
|
268
|
-
}),
|
|
281
|
+
}), ss = /* @__PURE__ */ o("div")({
|
|
269
282
|
name: "p",
|
|
270
283
|
class: "p198m24r",
|
|
271
284
|
propsAsIs: !1
|
|
272
|
-
}),
|
|
285
|
+
}), Qe = /* @__PURE__ */ o("img")({
|
|
273
286
|
name: "r",
|
|
274
287
|
class: "rbq5eu7",
|
|
275
288
|
propsAsIs: !1
|
|
276
|
-
}),
|
|
289
|
+
}), ns = /* @__PURE__ */ o(Gt())({
|
|
277
290
|
name: "g",
|
|
278
291
|
class: "g1iv6oeb",
|
|
279
292
|
propsAsIs: !0
|
|
280
|
-
}),
|
|
293
|
+
}), is = /* @__PURE__ */ o(Zt())({
|
|
281
294
|
name: "h",
|
|
282
295
|
class: "h1qtxlqc",
|
|
283
296
|
propsAsIs: !0
|
|
284
|
-
}),
|
|
297
|
+
}), rs = /* @__PURE__ */ o("span")({
|
|
285
298
|
name: "u",
|
|
286
299
|
class: "udm736q",
|
|
287
300
|
propsAsIs: !1
|
|
288
|
-
}),
|
|
301
|
+
}), as = /* @__PURE__ */ o("span")({
|
|
289
302
|
name: "b",
|
|
290
303
|
class: "b1da34tx",
|
|
291
304
|
propsAsIs: !1
|
|
292
|
-
}),
|
|
305
|
+
}), os = /* @__PURE__ */ o("span")({
|
|
293
306
|
name: "x",
|
|
294
307
|
class: "x1dqwq83",
|
|
295
308
|
propsAsIs: !1
|
|
296
|
-
}),
|
|
309
|
+
}), ls = /* @__PURE__ */ o(Jt())({
|
|
297
310
|
name: "v",
|
|
298
311
|
class: "v10s9my2",
|
|
299
312
|
propsAsIs: !0
|
|
300
|
-
}),
|
|
301
|
-
[L.CENTERED]: (t) => /* @__PURE__ */ a(
|
|
302
|
-
[L.TRANSPARENT]: (t) => /* @__PURE__ */ a(
|
|
303
|
-
[L.ROUNDED]: (t) => /* @__PURE__ */ a(
|
|
313
|
+
}), fe = {
|
|
314
|
+
[L.CENTERED]: (t) => /* @__PURE__ */ a(ns, { alt: "option-icon", src: t }),
|
|
315
|
+
[L.TRANSPARENT]: (t) => /* @__PURE__ */ a(ts, { children: /* @__PURE__ */ a(ss, { style: { backgroundImage: `url(${t})` } }) }),
|
|
316
|
+
[L.ROUNDED]: (t) => /* @__PURE__ */ a(is, { alt: "option-icon", src: t }),
|
|
304
317
|
[L.NONE]: () => null,
|
|
305
318
|
[L.UNSET]: () => null
|
|
306
|
-
},
|
|
307
|
-
if (t ===
|
|
319
|
+
}, cs = ({ questionType: t, hasCorrectAnswer: e, correct: s, youVoted: n, questionVoted: i }) => {
|
|
320
|
+
if (t === D.POLL && n)
|
|
308
321
|
return "correct";
|
|
309
|
-
if (t ===
|
|
322
|
+
if (t === D.PREDICTION) {
|
|
310
323
|
if (e && i)
|
|
311
324
|
return n ? s ? "correct" : "incorrect" : s ? "correct" : "unset";
|
|
312
325
|
if (n)
|
|
313
326
|
return "correct";
|
|
314
327
|
}
|
|
315
|
-
return t ===
|
|
316
|
-
},
|
|
328
|
+
return t === D.TRIVIA && i ? n ? s ? "correct" : "incorrect" : s ? "correct" : "unset" : "unset";
|
|
329
|
+
}, ds = ({
|
|
317
330
|
questionType: t,
|
|
318
331
|
questionVoted: e,
|
|
319
332
|
correct: s,
|
|
320
333
|
hasCorrectAnswer: n,
|
|
321
334
|
questionStatus: i
|
|
322
|
-
}) => t ===
|
|
335
|
+
}) => t === D.TRIVIA ? e && s : t === D.PREDICTION ? e && s && n || i === Y.RESOLVED && s : !1, us = (t) => {
|
|
323
336
|
var e;
|
|
324
337
|
const {
|
|
325
338
|
// option props
|
|
@@ -329,33 +342,33 @@ const Bt = () => $e, Gt = () => $e, Zt = () => w, Jt = /* @__PURE__ */ o("button
|
|
|
329
342
|
percentageDecimal: u,
|
|
330
343
|
// extra props
|
|
331
344
|
onVote: p,
|
|
332
|
-
youSelected:
|
|
333
|
-
questionVoted:
|
|
345
|
+
youSelected: f,
|
|
346
|
+
questionVoted: m,
|
|
334
347
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
335
|
-
imageMode:
|
|
336
|
-
answerTimeExpired:
|
|
337
|
-
questionStatus:
|
|
348
|
+
imageMode: g = L.ROUNDED,
|
|
349
|
+
answerTimeExpired: N,
|
|
350
|
+
questionStatus: z,
|
|
338
351
|
isLoading: l,
|
|
339
|
-
questionType:
|
|
340
|
-
correct:
|
|
352
|
+
questionType: M,
|
|
353
|
+
correct: v,
|
|
341
354
|
hasCorrectAnswer: r
|
|
342
|
-
} = t, h =
|
|
343
|
-
return /* @__PURE__ */
|
|
344
|
-
|
|
355
|
+
} = t, h = cs(t), c = ds({ questionType: M, questionVoted: m, correct: v, hasCorrectAnswer: r, questionStatus: z }), d = m || z === Y.RESOLVED && M === D.PREDICTION;
|
|
356
|
+
return /* @__PURE__ */ y(
|
|
357
|
+
Kt,
|
|
345
358
|
{
|
|
346
359
|
value: s,
|
|
347
|
-
"data-selected":
|
|
360
|
+
"data-selected": f,
|
|
348
361
|
"data-answerState": h,
|
|
349
|
-
disabled:
|
|
362
|
+
disabled: m || l || N,
|
|
350
363
|
onClick: p,
|
|
351
364
|
children: [
|
|
352
|
-
d && /* @__PURE__ */ a(
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
n && ((e =
|
|
355
|
-
/* @__PURE__ */ a(
|
|
356
|
-
d && /* @__PURE__ */
|
|
357
|
-
c && /* @__PURE__ */ a(
|
|
358
|
-
/* @__PURE__ */
|
|
365
|
+
d && /* @__PURE__ */ a(Xt, { "data-answerState": h, style: { width: `${u}%` } }),
|
|
366
|
+
/* @__PURE__ */ y(es, { children: [
|
|
367
|
+
n && ((e = fe[g]) == null ? void 0 : e.call(fe, n)),
|
|
368
|
+
/* @__PURE__ */ a(rs, { children: i }),
|
|
369
|
+
d && /* @__PURE__ */ y(as, { children: [
|
|
370
|
+
c && /* @__PURE__ */ a(ls, { name: "selected" }),
|
|
371
|
+
/* @__PURE__ */ y(os, { children: [
|
|
359
372
|
u,
|
|
360
373
|
"%"
|
|
361
374
|
] })
|
|
@@ -365,203 +378,204 @@ const Bt = () => $e, Gt = () => $e, Zt = () => w, Jt = /* @__PURE__ */ o("button
|
|
|
365
378
|
}
|
|
366
379
|
);
|
|
367
380
|
};
|
|
368
|
-
var
|
|
369
|
-
let [p,
|
|
381
|
+
var ge = typeof window > "u" ? it : rt, ps = ({ isPlaying: t, duration: e, startAt: s = 0, updateInterval: n = 0, onComplete: i, onUpdate: u }) => {
|
|
382
|
+
let [p, f] = C(s), m = b(0), g = b(s), N = b(s * -1e3), z = b(null), l = b(null), M = b(null), v = (c) => {
|
|
370
383
|
let d = c / 1e3;
|
|
371
384
|
if (l.current === null) {
|
|
372
|
-
l.current = d,
|
|
385
|
+
l.current = d, z.current = requestAnimationFrame(v);
|
|
373
386
|
return;
|
|
374
387
|
}
|
|
375
|
-
let
|
|
376
|
-
l.current = d,
|
|
377
|
-
let _ =
|
|
378
|
-
|
|
388
|
+
let I = d - l.current, T = m.current + I;
|
|
389
|
+
l.current = d, m.current = T;
|
|
390
|
+
let _ = g.current + (n === 0 ? T : (T / n | 0) * n), A = g.current + T, S = typeof e == "number" && A >= e;
|
|
391
|
+
f(S ? e : _), S || (z.current = requestAnimationFrame(v));
|
|
379
392
|
}, r = () => {
|
|
380
|
-
|
|
381
|
-
}, h =
|
|
382
|
-
r(),
|
|
393
|
+
z.current && cancelAnimationFrame(z.current), M.current && clearTimeout(M.current), l.current = null;
|
|
394
|
+
}, h = G((c) => {
|
|
395
|
+
r(), m.current = 0;
|
|
383
396
|
let d = typeof c == "number" ? c : s;
|
|
384
|
-
|
|
397
|
+
g.current = d, f(d), t && (z.current = requestAnimationFrame(v));
|
|
385
398
|
}, [t, s]);
|
|
386
|
-
return
|
|
399
|
+
return ge(() => {
|
|
387
400
|
if (u == null || u(p), e && p >= e) {
|
|
388
|
-
|
|
389
|
-
let { shouldRepeat: c = !1, delay: d = 0, newStartAt:
|
|
390
|
-
c && (
|
|
401
|
+
N.current += e * 1e3;
|
|
402
|
+
let { shouldRepeat: c = !1, delay: d = 0, newStartAt: I } = (i == null ? void 0 : i(N.current / 1e3)) || {};
|
|
403
|
+
c && (M.current = setTimeout(() => h(I), d * 1e3));
|
|
391
404
|
}
|
|
392
|
-
}, [p, e]),
|
|
393
|
-
},
|
|
394
|
-
let n = t / 2, i = e / 2, u = n - i, p = 2 * u,
|
|
395
|
-
return { path: `m ${n},${i} a ${u},${u} 0 ${
|
|
396
|
-
},
|
|
405
|
+
}, [p, e]), ge(() => (t && (z.current = requestAnimationFrame(v)), r), [t, e, n]), { elapsedTime: p, reset: h };
|
|
406
|
+
}, hs = (t, e, s) => {
|
|
407
|
+
let n = t / 2, i = e / 2, u = n - i, p = 2 * u, f = s === "clockwise" ? "1,0" : "0,1", m = 2 * Math.PI * u;
|
|
408
|
+
return { path: `m ${n},${i} a ${u},${u} 0 ${f} 0,${p} a ${u},${u} 0 ${f} 0,-${p}`, pathLength: m };
|
|
409
|
+
}, Ie = (t, e) => t === 0 || t === e ? 0 : typeof e == "number" ? t - e : 0, ms = (t) => ({ position: "relative", width: t, height: t }), fs = { display: "flex", justifyContent: "center", alignItems: "center", position: "absolute", left: 0, top: 0, width: "100%", height: "100%" }, qe = (t, e, s, n, i) => {
|
|
397
410
|
if (n === 0)
|
|
398
411
|
return e;
|
|
399
412
|
let u = (i ? n - t : t) / n;
|
|
400
413
|
return e + s * u;
|
|
401
|
-
},
|
|
414
|
+
}, ve = (t) => {
|
|
402
415
|
var e, s;
|
|
403
416
|
return (s = (e = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, (n, i, u, p) => `#${i}${i}${u}${u}${p}${p}`).substring(1).match(/.{2}/g)) == null ? void 0 : e.map((n) => parseInt(n, 16))) != null ? s : [];
|
|
404
|
-
},
|
|
417
|
+
}, gs = (t, e) => {
|
|
405
418
|
var s;
|
|
406
419
|
let { colors: n, colorsTime: i, isSmoothColorTransition: u = !0 } = t;
|
|
407
420
|
if (typeof n == "string")
|
|
408
421
|
return n;
|
|
409
|
-
let p = (s = i == null ? void 0 : i.findIndex((l,
|
|
422
|
+
let p = (s = i == null ? void 0 : i.findIndex((l, M) => l >= e && e >= i[M + 1])) != null ? s : -1;
|
|
410
423
|
if (!i || p === -1)
|
|
411
424
|
return n[0];
|
|
412
425
|
if (!u)
|
|
413
426
|
return n[p];
|
|
414
|
-
let
|
|
415
|
-
return `rgb(${
|
|
416
|
-
},
|
|
417
|
-
let { duration: e, initialRemainingTime: s, updateInterval: n, size: i = 180, strokeWidth: u = 12, trailStrokeWidth: p, isPlaying:
|
|
418
|
-
let
|
|
419
|
-
|
|
420
|
-
} : void 0, onComplete: typeof
|
|
421
|
-
var
|
|
422
|
-
let { shouldRepeat: T, delay: _, newInitialRemainingTime: A } = (
|
|
427
|
+
let f = i[p] - e, m = i[p] - i[p + 1], g = ve(n[p]), N = ve(n[p + 1]), z = !!t.isGrowing;
|
|
428
|
+
return `rgb(${g.map((l, M) => qe(f, l, N[M] - l, m, z) | 0).join(",")})`;
|
|
429
|
+
}, Is = (t) => {
|
|
430
|
+
let { duration: e, initialRemainingTime: s, updateInterval: n, size: i = 180, strokeWidth: u = 12, trailStrokeWidth: p, isPlaying: f = !1, isGrowing: m = !1, rotation: g = "clockwise", onComplete: N, onUpdate: z } = t, l = b(), M = Math.max(u, p ?? 0), { path: v, pathLength: r } = hs(i, M, g), { elapsedTime: h } = ps({ isPlaying: f, duration: e, startAt: Ie(e, s), updateInterval: n, onUpdate: typeof z == "function" ? (d) => {
|
|
431
|
+
let I = Math.ceil(e - d);
|
|
432
|
+
I !== l.current && (l.current = I, z(I));
|
|
433
|
+
} : void 0, onComplete: typeof N == "function" ? (d) => {
|
|
434
|
+
var I;
|
|
435
|
+
let { shouldRepeat: T, delay: _, newInitialRemainingTime: A } = (I = N(d)) != null ? I : {};
|
|
423
436
|
if (T)
|
|
424
|
-
return { shouldRepeat: T, delay: _, newStartAt:
|
|
437
|
+
return { shouldRepeat: T, delay: _, newStartAt: Ie(e, A) };
|
|
425
438
|
} : void 0 }), c = e - h;
|
|
426
|
-
return { elapsedTime: h, path:
|
|
427
|
-
},
|
|
428
|
-
let { children: e, strokeLinecap: s, trailColor: n, trailStrokeWidth: i } = t, { path: u, pathLength: p, stroke:
|
|
429
|
-
return U.createElement("div", { style:
|
|
439
|
+
return { elapsedTime: h, path: v, pathLength: r, remainingTime: Math.ceil(c), rotation: g, size: i, stroke: gs(t, c), strokeDashoffset: qe(h, 0, r, e, m), strokeWidth: u };
|
|
440
|
+
}, Ye = (t) => {
|
|
441
|
+
let { children: e, strokeLinecap: s, trailColor: n, trailStrokeWidth: i } = t, { path: u, pathLength: p, stroke: f, strokeDashoffset: m, remainingTime: g, elapsedTime: N, size: z, strokeWidth: l } = Is(t);
|
|
442
|
+
return U.createElement("div", { style: ms(z) }, U.createElement("svg", { viewBox: `0 0 ${z} ${z}`, width: z, height: z, xmlns: "http://www.w3.org/2000/svg" }, U.createElement("path", { d: u, fill: "none", stroke: n ?? "#d9d9d9", strokeWidth: i ?? l }), U.createElement("path", { d: u, fill: "none", stroke: f, strokeLinecap: s ?? "round", strokeWidth: l, strokeDasharray: p, strokeDashoffset: m })), typeof e == "function" && U.createElement("div", { style: fs }, e({ remainingTime: g, elapsedTime: N, color: f })));
|
|
430
443
|
};
|
|
431
|
-
|
|
432
|
-
const
|
|
444
|
+
Ye.displayName = "CountdownCircleTimer";
|
|
445
|
+
const vs = [R.PRIMARY_GREEN1, R.SECONDARY_RED1, R.SECONDARY_RED1], Ms = [10, 10, 0], ys = /* @__PURE__ */ o("div")({
|
|
433
446
|
name: "A",
|
|
434
447
|
class: "a1f928zy",
|
|
435
448
|
propsAsIs: !1
|
|
436
|
-
}),
|
|
449
|
+
}), zs = R.SECONDARY_GREEN6, Me = R.SECONDARY_RED3, Ns = R.NEUTRALS_GRAY3, _s = ({
|
|
437
450
|
isPlaying: t = !0,
|
|
438
451
|
duration: e = 30,
|
|
439
452
|
onTimerExpired: s
|
|
440
453
|
}) => {
|
|
441
|
-
const [n, i] =
|
|
442
|
-
remainingTime:
|
|
443
|
-
}) => /* @__PURE__ */ a(
|
|
444
|
-
children:
|
|
445
|
-
}), p =
|
|
454
|
+
const [n, i] = C(e > 10 ? zs : Me), u = ({
|
|
455
|
+
remainingTime: m
|
|
456
|
+
}) => /* @__PURE__ */ a(ys, {
|
|
457
|
+
children: m
|
|
458
|
+
}), p = G(() => {
|
|
446
459
|
s == null || s(), i(Ns);
|
|
447
|
-
}, [s, i]),
|
|
448
|
-
|
|
460
|
+
}, [s, i]), f = G((m) => {
|
|
461
|
+
m === 10 && i(Me);
|
|
449
462
|
}, [i]);
|
|
450
|
-
return /* @__PURE__ */ a(
|
|
463
|
+
return /* @__PURE__ */ a(Ye, {
|
|
451
464
|
isPlaying: t,
|
|
452
465
|
duration: e,
|
|
453
|
-
colors:
|
|
454
|
-
colorsTime:
|
|
466
|
+
colors: vs,
|
|
467
|
+
colorsTime: Ms,
|
|
455
468
|
size: 32,
|
|
456
469
|
strokeWidth: 2,
|
|
457
470
|
trailStrokeWidth: 2,
|
|
458
471
|
trailColor: n,
|
|
459
472
|
onComplete: p,
|
|
460
|
-
onUpdate:
|
|
473
|
+
onUpdate: f,
|
|
461
474
|
children: u
|
|
462
475
|
});
|
|
463
476
|
};
|
|
464
|
-
const
|
|
477
|
+
const Ts = () => w, As = /* @__PURE__ */ o("div")({
|
|
465
478
|
name: "a",
|
|
466
479
|
class: "a1r7f3z4",
|
|
467
480
|
propsAsIs: !1
|
|
468
|
-
}),
|
|
481
|
+
}), Ss = /* @__PURE__ */ o("div")({
|
|
469
482
|
name: "s",
|
|
470
483
|
class: "sblndl",
|
|
471
484
|
propsAsIs: !1
|
|
472
|
-
}),
|
|
485
|
+
}), Ds = /* @__PURE__ */ o("div")({
|
|
473
486
|
name: "l",
|
|
474
487
|
class: "l7ka1tv",
|
|
475
488
|
propsAsIs: !1
|
|
476
|
-
}),
|
|
489
|
+
}), xs = /* @__PURE__ */ o(Ts())({
|
|
477
490
|
name: "p",
|
|
478
491
|
class: "p1edlxt3",
|
|
479
492
|
propsAsIs: !0
|
|
480
|
-
}),
|
|
493
|
+
}), ws = /* @__PURE__ */ o("div")({
|
|
481
494
|
name: "g",
|
|
482
495
|
class: "ghm08u2",
|
|
483
496
|
propsAsIs: !1
|
|
484
|
-
}),
|
|
497
|
+
}), Os = /* @__PURE__ */ o("span")({
|
|
485
498
|
name: "c",
|
|
486
499
|
class: "c12nsh46",
|
|
487
500
|
propsAsIs: !1
|
|
488
|
-
}),
|
|
501
|
+
}), Es = /* @__PURE__ */ o("span")({
|
|
489
502
|
name: "d",
|
|
490
503
|
class: "dlr9eoc",
|
|
491
504
|
propsAsIs: !1
|
|
492
|
-
}),
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
t && /* @__PURE__ */ a(
|
|
495
|
-
e !== void 0 && /* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */ a(
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */ a(
|
|
499
|
-
/* @__PURE__ */ a(
|
|
505
|
+
}), bs = ({ title: t, points: e, isPlayingTimer: s, isTimer: n, onTimerExpired: i }) => /* @__PURE__ */ y(As, { children: [
|
|
506
|
+
/* @__PURE__ */ y(Ss, { children: [
|
|
507
|
+
t && /* @__PURE__ */ a(Ds, { children: t }),
|
|
508
|
+
e !== void 0 && /* @__PURE__ */ y(q, { children: [
|
|
509
|
+
/* @__PURE__ */ a(xs, { name: "icon-trophy" }),
|
|
510
|
+
/* @__PURE__ */ y(ws, { children: [
|
|
511
|
+
/* @__PURE__ */ a(Os, { children: e }),
|
|
512
|
+
/* @__PURE__ */ a(Es, { children: "PTS" })
|
|
500
513
|
] })
|
|
501
514
|
] })
|
|
502
515
|
] }),
|
|
503
|
-
n && /* @__PURE__ */ a(
|
|
516
|
+
n && /* @__PURE__ */ a(_s, { isPlaying: s, onTimerExpired: i })
|
|
504
517
|
] }), ks = ({ openedQuestion: t, vote: e }) => {
|
|
505
518
|
var s;
|
|
506
|
-
const n = t.subject, i = t.type, u = (s = t.options) == null ? void 0 : s.options, [p,
|
|
519
|
+
const n = t.subject, i = t.type, u = (s = t.options) == null ? void 0 : s.options, [p, f] = C(!1), [m, g] = C(!1), [N, z] = C(""), l = t == null ? void 0 : t.id, M = G(
|
|
507
520
|
async (d) => {
|
|
508
521
|
if (l) {
|
|
509
|
-
const
|
|
510
|
-
|
|
522
|
+
const I = d.currentTarget.value;
|
|
523
|
+
z(I), g(!0), await e(l, I), g(!1);
|
|
511
524
|
}
|
|
512
525
|
},
|
|
513
|
-
[l,
|
|
514
|
-
),
|
|
526
|
+
[l, z, e]
|
|
527
|
+
), v = H(
|
|
515
528
|
() => t == null ? void 0 : t.answers.find((d) => d.youVoted === !0),
|
|
516
529
|
[t]
|
|
517
|
-
), r =
|
|
530
|
+
), r = H(
|
|
518
531
|
() => !!(t != null && t.answers.find((d) => d.correct === !0)),
|
|
519
532
|
[t]
|
|
520
|
-
), h =
|
|
533
|
+
), h = H(() => t ? t.answers.map((d) => ({
|
|
521
534
|
...d,
|
|
522
|
-
questionVoted: !!
|
|
523
|
-
youSelected:
|
|
524
|
-
isLoading:
|
|
535
|
+
questionVoted: !!v,
|
|
536
|
+
youSelected: N === d.id,
|
|
537
|
+
isLoading: m,
|
|
525
538
|
hasCorrectAnswer: r,
|
|
526
539
|
questionType: t.type,
|
|
527
540
|
answerTimeExpired: p,
|
|
528
541
|
questionStatus: t.status,
|
|
529
542
|
// ToDo: Figure out why imageMode is not in the response
|
|
530
|
-
onVote:
|
|
531
|
-
})) : [], [r, p,
|
|
532
|
-
return /* @__PURE__ */ a(
|
|
543
|
+
onVote: M
|
|
544
|
+
})) : [], [r, p, m, t, v, M, N]), c = u && (u.case === "trivia" || u.case === "prediction") ? u.value : void 0;
|
|
545
|
+
return /* @__PURE__ */ a(Le, { "data-question-header": "true", children: /* @__PURE__ */ a(Ft, { children: /* @__PURE__ */ y(Vt, { children: [
|
|
533
546
|
c && /* @__PURE__ */ a(
|
|
534
|
-
|
|
547
|
+
Wt,
|
|
535
548
|
{
|
|
536
549
|
feedbackMessages: c,
|
|
537
|
-
questionVoted: !!
|
|
538
|
-
questionVotedCorrectly:
|
|
550
|
+
questionVoted: !!v,
|
|
551
|
+
questionVotedCorrectly: v == null ? void 0 : v.correct,
|
|
539
552
|
questionType: i,
|
|
540
|
-
hasCorrectAnswer: r
|
|
553
|
+
hasCorrectAnswer: r,
|
|
554
|
+
questionStatus: t.status
|
|
541
555
|
}
|
|
542
556
|
),
|
|
543
557
|
/* @__PURE__ */ a(
|
|
544
|
-
|
|
558
|
+
bs,
|
|
545
559
|
{
|
|
546
560
|
title: p ? "Expired" : "To win",
|
|
547
561
|
points: p ? void 0 : 100,
|
|
548
|
-
onTimerExpired: () =>
|
|
562
|
+
onTimerExpired: () => f(!0),
|
|
549
563
|
isTimer: !0
|
|
550
564
|
}
|
|
551
565
|
),
|
|
552
|
-
/* @__PURE__ */ a(
|
|
553
|
-
/* @__PURE__ */ a(
|
|
566
|
+
/* @__PURE__ */ a(Ht, { children: n }),
|
|
567
|
+
/* @__PURE__ */ a(Bt, { children: h.map((d) => /* @__PURE__ */ a(us, { ...d }, d.id)) })
|
|
554
568
|
] }) }) });
|
|
555
569
|
};
|
|
556
|
-
const
|
|
570
|
+
const js = /* @__PURE__ */ o("div")({
|
|
557
571
|
name: "e",
|
|
558
572
|
class: "e1eio0mt",
|
|
559
573
|
propsAsIs: !1
|
|
560
|
-
}),
|
|
574
|
+
}), Ls = /* @__PURE__ */ o("div")({
|
|
561
575
|
name: "i",
|
|
562
576
|
class: "iigl87b",
|
|
563
577
|
propsAsIs: !1
|
|
564
|
-
}),
|
|
578
|
+
}), Rs = /* @__PURE__ */ o("h3")({
|
|
565
579
|
name: "n",
|
|
566
580
|
class: "n1o2cwub",
|
|
567
581
|
propsAsIs: !1
|
|
@@ -569,63 +583,63 @@ const bs = /* @__PURE__ */ o("div")({
|
|
|
569
583
|
name: "r",
|
|
570
584
|
class: "r3uxe45",
|
|
571
585
|
propsAsIs: !1
|
|
572
|
-
}),
|
|
586
|
+
}), $s = /* @__PURE__ */ o("div")({
|
|
573
587
|
name: "l",
|
|
574
588
|
class: "lrqius",
|
|
575
589
|
propsAsIs: !1
|
|
576
|
-
}),
|
|
577
|
-
const n =
|
|
590
|
+
}), Pe = ({ created: t, title: e, instantView: s }) => {
|
|
591
|
+
const n = H(() => {
|
|
578
592
|
if (t) {
|
|
579
593
|
const i = new Date(t);
|
|
580
|
-
if (
|
|
594
|
+
if (Ke(i))
|
|
581
595
|
return {
|
|
582
|
-
date:
|
|
583
|
-
time:
|
|
596
|
+
date: Xe(i),
|
|
597
|
+
time: et(i)
|
|
584
598
|
};
|
|
585
599
|
}
|
|
586
600
|
return null;
|
|
587
601
|
}, [t]);
|
|
588
|
-
return /* @__PURE__ */
|
|
589
|
-
n && /* @__PURE__ */
|
|
602
|
+
return /* @__PURE__ */ y(js, { children: [
|
|
603
|
+
n && /* @__PURE__ */ y($s, { children: [
|
|
590
604
|
n.date,
|
|
591
605
|
" · ",
|
|
592
606
|
n.time
|
|
593
607
|
] }),
|
|
594
|
-
(s == null ? void 0 : s.video) && /* @__PURE__ */ a(
|
|
595
|
-
/* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */ a(
|
|
608
|
+
(s == null ? void 0 : s.video) && /* @__PURE__ */ a(tt, { source: s.video.url, poster: s.video.thumbnailUrl }),
|
|
609
|
+
/* @__PURE__ */ y(Ls, { children: [
|
|
610
|
+
/* @__PURE__ */ a(Rs, { children: (s == null ? void 0 : s.heading) || e }),
|
|
597
611
|
/* @__PURE__ */ a(Cs, { children: s == null ? void 0 : s.body })
|
|
598
612
|
] })
|
|
599
613
|
] });
|
|
600
614
|
};
|
|
601
|
-
const
|
|
615
|
+
const Us = /* @__PURE__ */ o("div")({
|
|
602
616
|
name: "o",
|
|
603
617
|
class: "o18unvw4",
|
|
604
618
|
propsAsIs: !1
|
|
605
|
-
}),
|
|
619
|
+
}), Qs = /* @__PURE__ */ o("a")({
|
|
606
620
|
name: "n",
|
|
607
621
|
class: "ns0uvk8",
|
|
608
622
|
propsAsIs: !1
|
|
609
|
-
}),
|
|
610
|
-
/* @__PURE__ */ a(
|
|
611
|
-
(t == null ? void 0 : t.webLink) && /* @__PURE__ */
|
|
623
|
+
}), qs = ({ instantView: t, ...e }) => /* @__PURE__ */ y(Us, { children: [
|
|
624
|
+
/* @__PURE__ */ a(Pe, { instantView: t, ...e }),
|
|
625
|
+
(t == null ? void 0 : t.webLink) && /* @__PURE__ */ y(Qs, { href: t == null ? void 0 : t.webLink.url, target: "_blank", children: [
|
|
612
626
|
"Explore more of the Masters History",
|
|
613
627
|
/* @__PURE__ */ a(w, { name: "icon-external-link" })
|
|
614
628
|
] })
|
|
615
629
|
] });
|
|
616
|
-
const
|
|
630
|
+
const Ys = /* @__PURE__ */ o("div")({
|
|
617
631
|
name: "d",
|
|
618
632
|
class: "dk8r1eq",
|
|
619
633
|
propsAsIs: !1
|
|
620
|
-
}),
|
|
634
|
+
}), Ps = ({
|
|
621
635
|
openedQuestion: t
|
|
622
636
|
}) => {
|
|
623
637
|
var e;
|
|
624
|
-
return ((e = t == null ? void 0 : t.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ a(
|
|
638
|
+
return ((e = t == null ? void 0 : t.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ a(qs, {
|
|
625
639
|
created: t.attributes.created,
|
|
626
640
|
...t.attributes.attributes.value
|
|
627
641
|
}) : null;
|
|
628
|
-
},
|
|
642
|
+
}, Ws = ({
|
|
629
643
|
extendedQuestion: t,
|
|
630
644
|
vote: e
|
|
631
645
|
}) => {
|
|
@@ -637,51 +651,51 @@ const qs = /* @__PURE__ */ o("div")({
|
|
|
637
651
|
vote: e,
|
|
638
652
|
openedQuestion: n
|
|
639
653
|
}) : null;
|
|
640
|
-
},
|
|
654
|
+
}, Fs = ({
|
|
641
655
|
gamification: t
|
|
642
656
|
}) => {
|
|
643
657
|
var e;
|
|
644
|
-
const s =
|
|
658
|
+
const s = k(t.openedQuestion.$store), n = k(t.openedQuestion.$extendedStore);
|
|
645
659
|
if (!s)
|
|
646
660
|
return null;
|
|
647
661
|
const i = s.type;
|
|
648
|
-
return /* @__PURE__ */
|
|
649
|
-
children: [/* @__PURE__ */ a(
|
|
662
|
+
return /* @__PURE__ */ y(Ys, {
|
|
663
|
+
children: [/* @__PURE__ */ a($e, {
|
|
650
664
|
close: t.closeQuestion,
|
|
651
|
-
type: ((e = s.attributes) == null ? void 0 : e.type) ||
|
|
652
|
-
}), i === "question" && /* @__PURE__ */ a(
|
|
665
|
+
type: ((e = s.attributes) == null ? void 0 : e.type) || D.UNSET
|
|
666
|
+
}), i === "question" && /* @__PURE__ */ a(Ws, {
|
|
653
667
|
vote: t.submitAnswer,
|
|
654
668
|
extendedQuestion: n
|
|
655
|
-
}), i !== "question" && /* @__PURE__ */ a(
|
|
669
|
+
}), i !== "question" && /* @__PURE__ */ a(Ps, {
|
|
656
670
|
openedQuestion: s
|
|
657
671
|
})]
|
|
658
672
|
});
|
|
659
673
|
};
|
|
660
|
-
const
|
|
674
|
+
const Vs = /* @__PURE__ */ o("div")({
|
|
661
675
|
name: "t",
|
|
662
676
|
class: "tcim9sm",
|
|
663
677
|
propsAsIs: !1
|
|
664
|
-
}),
|
|
678
|
+
}), Hs = /* @__PURE__ */ o("div")({
|
|
665
679
|
name: "e",
|
|
666
680
|
class: "e8wco6o",
|
|
667
681
|
propsAsIs: !1
|
|
668
|
-
}),
|
|
682
|
+
}), Bs = /* @__PURE__ */ o("button")({
|
|
669
683
|
name: "n",
|
|
670
684
|
class: "n1ardwzl",
|
|
671
685
|
propsAsIs: !1
|
|
672
|
-
}),
|
|
686
|
+
}), Gs = /* @__PURE__ */ o("span")({
|
|
673
687
|
name: "i",
|
|
674
688
|
class: "i1vk8ojx",
|
|
675
689
|
propsAsIs: !1
|
|
676
690
|
});
|
|
677
691
|
var Q = /* @__PURE__ */ ((t) => (t.HOME = "home", t.LEADERBOARD = "leaderboard", t))(Q || {});
|
|
678
|
-
const
|
|
679
|
-
/* @__PURE__ */ a(
|
|
692
|
+
const ye = ({ title: t, active: e, onClick: s }) => /* @__PURE__ */ a(Bs, { onClick: s, "data-selected": e, children: /* @__PURE__ */ a(Gs, { children: t }) }), Zs = ({ activePage: t = "home", toggleActivePage: e }) => /* @__PURE__ */ a(Vs, { children: /* @__PURE__ */ y(Hs, { "data-position": t === "home" ? "left" : "right", children: [
|
|
693
|
+
/* @__PURE__ */ a(ye, { title: "Home", active: t === "home", onClick: () => e(
|
|
680
694
|
"home"
|
|
681
695
|
/* HOME */
|
|
682
696
|
) }),
|
|
683
697
|
/* @__PURE__ */ a(
|
|
684
|
-
|
|
698
|
+
ye,
|
|
685
699
|
{
|
|
686
700
|
title: "Leader Board",
|
|
687
701
|
active: t === "leaderboard",
|
|
@@ -692,86 +706,86 @@ const ve = ({ title: t, active: e, onClick: s }) => /* @__PURE__ */ a(Hs, { onCl
|
|
|
692
706
|
}
|
|
693
707
|
)
|
|
694
708
|
] }) });
|
|
695
|
-
let
|
|
696
|
-
typeof window < "u" ?
|
|
697
|
-
let
|
|
698
|
-
const
|
|
699
|
-
|
|
700
|
-
return
|
|
701
|
-
}) : (
|
|
702
|
-
|
|
703
|
-
},
|
|
704
|
-
const s =
|
|
705
|
-
|
|
706
|
-
}), n =
|
|
707
|
-
|
|
708
|
-
},
|
|
709
|
+
let x;
|
|
710
|
+
typeof window < "u" ? x = window : typeof self < "u" ? x = self : x = st.global;
|
|
711
|
+
let ne = null, ie = null;
|
|
712
|
+
const ze = 20, K = x.clearTimeout, Ne = x.setTimeout, X = x.cancelAnimationFrame || x.mozCancelAnimationFrame || x.webkitCancelAnimationFrame, _e = x.requestAnimationFrame || x.mozRequestAnimationFrame || x.webkitRequestAnimationFrame;
|
|
713
|
+
X == null || _e == null ? (ne = K, ie = function(e) {
|
|
714
|
+
return Ne(e, ze);
|
|
715
|
+
}) : (ne = function([e, s]) {
|
|
716
|
+
X(e), K(s);
|
|
717
|
+
}, ie = function(e) {
|
|
718
|
+
const s = _e(function() {
|
|
719
|
+
K(n), e();
|
|
720
|
+
}), n = Ne(function() {
|
|
721
|
+
X(s), e();
|
|
722
|
+
}, ze);
|
|
709
723
|
return [s, n];
|
|
710
724
|
});
|
|
711
|
-
function
|
|
712
|
-
let e, s, n, i, u, p,
|
|
713
|
-
const
|
|
714
|
-
if (!
|
|
725
|
+
function Js(t) {
|
|
726
|
+
let e, s, n, i, u, p, f;
|
|
727
|
+
const m = typeof document < "u" && document.attachEvent;
|
|
728
|
+
if (!m) {
|
|
715
729
|
p = function(c) {
|
|
716
|
-
const d = c.__resizeTriggers__,
|
|
717
|
-
T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight, _.style.width =
|
|
730
|
+
const d = c.__resizeTriggers__, I = d.firstElementChild, T = d.lastElementChild, _ = I.firstElementChild;
|
|
731
|
+
T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight, _.style.width = I.offsetWidth + 1 + "px", _.style.height = I.offsetHeight + 1 + "px", I.scrollLeft = I.scrollWidth, I.scrollTop = I.scrollHeight;
|
|
718
732
|
}, u = function(c) {
|
|
719
733
|
return c.offsetWidth !== c.__resizeLast__.width || c.offsetHeight !== c.__resizeLast__.height;
|
|
720
|
-
},
|
|
734
|
+
}, f = function(c) {
|
|
721
735
|
if (c.target.className && typeof c.target.className.indexOf == "function" && c.target.className.indexOf("contract-trigger") < 0 && c.target.className.indexOf("expand-trigger") < 0)
|
|
722
736
|
return;
|
|
723
737
|
const d = this;
|
|
724
|
-
p(this), this.__resizeRAF__ &&
|
|
738
|
+
p(this), this.__resizeRAF__ && ne(this.__resizeRAF__), this.__resizeRAF__ = ie(function() {
|
|
725
739
|
u(d) && (d.__resizeLast__.width = d.offsetWidth, d.__resizeLast__.height = d.offsetHeight, d.__resizeListeners__.forEach(function(_) {
|
|
726
740
|
_.call(d, c);
|
|
727
741
|
}));
|
|
728
742
|
});
|
|
729
743
|
};
|
|
730
|
-
let l = !1,
|
|
744
|
+
let l = !1, M = "";
|
|
731
745
|
n = "animationstart";
|
|
732
|
-
const
|
|
746
|
+
const v = "Webkit Moz O ms".split(" ");
|
|
733
747
|
let r = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), h = "";
|
|
734
748
|
{
|
|
735
749
|
const c = document.createElement("fakeelement");
|
|
736
750
|
if (c.style.animationName !== void 0 && (l = !0), l === !1) {
|
|
737
|
-
for (let d = 0; d <
|
|
738
|
-
if (c.style[
|
|
739
|
-
h =
|
|
751
|
+
for (let d = 0; d < v.length; d++)
|
|
752
|
+
if (c.style[v[d] + "AnimationName"] !== void 0) {
|
|
753
|
+
h = v[d], M = "-" + h.toLowerCase() + "-", n = r[d], l = !0;
|
|
740
754
|
break;
|
|
741
755
|
}
|
|
742
756
|
}
|
|
743
757
|
}
|
|
744
|
-
s = "resizeanim", e = "@" +
|
|
758
|
+
s = "resizeanim", e = "@" + M + "keyframes " + s + " { from { opacity: 0; } to { opacity: 0; } } ", i = M + "animation: 1ms " + s + "; ";
|
|
745
759
|
}
|
|
746
|
-
const
|
|
760
|
+
const g = function(l) {
|
|
747
761
|
if (!l.getElementById("detectElementResize")) {
|
|
748
|
-
const
|
|
749
|
-
r.id = "detectElementResize", r.type = "text/css", t != null && r.setAttribute("nonce", t), r.styleSheet ? r.styleSheet.cssText =
|
|
762
|
+
const M = (e || "") + ".resize-triggers { " + (i || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', v = l.head || l.getElementsByTagName("head")[0], r = l.createElement("style");
|
|
763
|
+
r.id = "detectElementResize", r.type = "text/css", t != null && r.setAttribute("nonce", t), r.styleSheet ? r.styleSheet.cssText = M : r.appendChild(l.createTextNode(M)), v.appendChild(r);
|
|
750
764
|
}
|
|
751
765
|
};
|
|
752
766
|
return {
|
|
753
|
-
addResizeListener: function(l,
|
|
754
|
-
if (
|
|
755
|
-
l.attachEvent("onresize",
|
|
767
|
+
addResizeListener: function(l, M) {
|
|
768
|
+
if (m)
|
|
769
|
+
l.attachEvent("onresize", M);
|
|
756
770
|
else {
|
|
757
771
|
if (!l.__resizeTriggers__) {
|
|
758
|
-
const
|
|
759
|
-
r && r.position === "static" && (l.style.position = "relative"),
|
|
760
|
-
const h =
|
|
761
|
-
h.className = "expand-trigger", h.appendChild(
|
|
762
|
-
const c =
|
|
763
|
-
c.className = "contract-trigger", l.__resizeTriggers__.appendChild(h), l.__resizeTriggers__.appendChild(c), l.appendChild(l.__resizeTriggers__), p(l), l.addEventListener("scroll",
|
|
764
|
-
|
|
772
|
+
const v = l.ownerDocument, r = x.getComputedStyle(l);
|
|
773
|
+
r && r.position === "static" && (l.style.position = "relative"), g(v), l.__resizeLast__ = {}, l.__resizeListeners__ = [], (l.__resizeTriggers__ = v.createElement("div")).className = "resize-triggers";
|
|
774
|
+
const h = v.createElement("div");
|
|
775
|
+
h.className = "expand-trigger", h.appendChild(v.createElement("div"));
|
|
776
|
+
const c = v.createElement("div");
|
|
777
|
+
c.className = "contract-trigger", l.__resizeTriggers__.appendChild(h), l.__resizeTriggers__.appendChild(c), l.appendChild(l.__resizeTriggers__), p(l), l.addEventListener("scroll", f, !0), n && (l.__resizeTriggers__.__animationListener__ = function(I) {
|
|
778
|
+
I.animationName === s && p(l);
|
|
765
779
|
}, l.__resizeTriggers__.addEventListener(n, l.__resizeTriggers__.__animationListener__));
|
|
766
780
|
}
|
|
767
|
-
l.__resizeListeners__.push(
|
|
781
|
+
l.__resizeListeners__.push(M);
|
|
768
782
|
}
|
|
769
783
|
},
|
|
770
|
-
removeResizeListener: function(l,
|
|
771
|
-
if (
|
|
772
|
-
l.detachEvent("onresize",
|
|
773
|
-
else if (l.__resizeListeners__.splice(l.__resizeListeners__.indexOf(
|
|
774
|
-
l.removeEventListener("scroll",
|
|
784
|
+
removeResizeListener: function(l, M) {
|
|
785
|
+
if (m)
|
|
786
|
+
l.detachEvent("onresize", M);
|
|
787
|
+
else if (l.__resizeListeners__.splice(l.__resizeListeners__.indexOf(M), 1), !l.__resizeListeners__.length) {
|
|
788
|
+
l.removeEventListener("scroll", f, !0), l.__resizeTriggers__.__animationListener__ && (l.__resizeTriggers__.removeEventListener(n, l.__resizeTriggers__.__animationListener__), l.__resizeTriggers__.__animationListener__ = null);
|
|
775
789
|
try {
|
|
776
790
|
l.__resizeTriggers__ = !l.removeChild(l.__resizeTriggers__);
|
|
777
791
|
} catch {
|
|
@@ -780,7 +794,7 @@ function Zs(t) {
|
|
|
780
794
|
}
|
|
781
795
|
};
|
|
782
796
|
}
|
|
783
|
-
class
|
|
797
|
+
class Ks extends at {
|
|
784
798
|
constructor(...e) {
|
|
785
799
|
super(...e), this.state = {
|
|
786
800
|
height: this.props.defaultHeight || 0,
|
|
@@ -795,8 +809,8 @@ class Js extends it {
|
|
|
795
809
|
onResize: i
|
|
796
810
|
} = this.props;
|
|
797
811
|
if (this._parentNode) {
|
|
798
|
-
var u, p,
|
|
799
|
-
const
|
|
812
|
+
var u, p, f, m;
|
|
813
|
+
const g = window.getComputedStyle(this._parentNode) || {}, N = parseFloat((u = g.paddingLeft) !== null && u !== void 0 ? u : "0"), z = parseFloat((p = g.paddingRight) !== null && p !== void 0 ? p : "0"), l = parseFloat((f = g.paddingTop) !== null && f !== void 0 ? f : "0"), M = parseFloat((m = g.paddingBottom) !== null && m !== void 0 ? m : "0"), v = this._parentNode.getBoundingClientRect(), r = v.height - l - M, h = v.width - N - z, c = this._parentNode.offsetHeight - l - M, d = this._parentNode.offsetWidth - N - z;
|
|
800
814
|
(!s && (this.state.height !== c || this.state.scaledHeight !== r) || !n && (this.state.width !== d || this.state.scaledWidth !== h)) && (this.setState({
|
|
801
815
|
height: c,
|
|
802
816
|
width: d,
|
|
@@ -819,7 +833,7 @@ class Js extends it {
|
|
|
819
833
|
} = this.props;
|
|
820
834
|
this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement && (this._parentNode = this._autoSizer.parentNode, this._parentNode != null && (typeof ResizeObserver < "u" ? (this._resizeObserver = new ResizeObserver(() => {
|
|
821
835
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
822
|
-
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize =
|
|
836
|
+
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = Js(e), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
|
|
823
837
|
}
|
|
824
838
|
componentWillUnmount() {
|
|
825
839
|
this._parentNode && (this._detectElementResize && this._detectElementResize.removeResizeListener(this._parentNode, this._onResize), this._timeoutId !== null && clearTimeout(this._timeoutId), this._resizeObserver && (this._resizeObserver.observe(this._parentNode), this._resizeObserver.disconnect()));
|
|
@@ -832,104 +846,104 @@ class Js extends it {
|
|
|
832
846
|
disableHeight: i = !1,
|
|
833
847
|
disableWidth: u = !1,
|
|
834
848
|
nonce: p,
|
|
835
|
-
onResize:
|
|
836
|
-
style:
|
|
837
|
-
tagName:
|
|
838
|
-
...
|
|
849
|
+
onResize: f,
|
|
850
|
+
style: m = {},
|
|
851
|
+
tagName: g = "div",
|
|
852
|
+
...N
|
|
839
853
|
} = this.props, {
|
|
840
|
-
height:
|
|
854
|
+
height: z,
|
|
841
855
|
scaledHeight: l,
|
|
842
|
-
scaledWidth:
|
|
843
|
-
width:
|
|
856
|
+
scaledWidth: M,
|
|
857
|
+
width: v
|
|
844
858
|
} = this.state, r = {
|
|
845
859
|
overflow: "visible"
|
|
846
860
|
}, h = {};
|
|
847
861
|
let c = !1;
|
|
848
|
-
return i || (
|
|
862
|
+
return i || (z === 0 && (c = !0), r.height = 0, h.height = z, h.scaledHeight = l), u || (v === 0 && (c = !0), r.width = 0, h.width = v, h.scaledWidth = M), B(g, {
|
|
849
863
|
ref: this._setRef,
|
|
850
864
|
style: {
|
|
851
865
|
...r,
|
|
852
|
-
...
|
|
866
|
+
...m
|
|
853
867
|
},
|
|
854
|
-
...
|
|
868
|
+
...N
|
|
855
869
|
}, !c && e(h));
|
|
856
870
|
}
|
|
857
871
|
}
|
|
858
|
-
function
|
|
859
|
-
return
|
|
872
|
+
function re() {
|
|
873
|
+
return re = Object.assign ? Object.assign.bind() : function(t) {
|
|
860
874
|
for (var e = 1; e < arguments.length; e++) {
|
|
861
875
|
var s = arguments[e];
|
|
862
876
|
for (var n in s)
|
|
863
877
|
Object.prototype.hasOwnProperty.call(s, n) && (t[n] = s[n]);
|
|
864
878
|
}
|
|
865
879
|
return t;
|
|
866
|
-
},
|
|
880
|
+
}, re.apply(this, arguments);
|
|
867
881
|
}
|
|
868
|
-
function
|
|
882
|
+
function Te(t) {
|
|
869
883
|
if (t === void 0)
|
|
870
884
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
871
885
|
return t;
|
|
872
886
|
}
|
|
873
|
-
function
|
|
874
|
-
return
|
|
887
|
+
function ae(t, e) {
|
|
888
|
+
return ae = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
|
|
875
889
|
return n.__proto__ = i, n;
|
|
876
|
-
},
|
|
890
|
+
}, ae(t, e);
|
|
877
891
|
}
|
|
878
|
-
function
|
|
879
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
892
|
+
function Xs(t, e) {
|
|
893
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, ae(t, e);
|
|
880
894
|
}
|
|
881
|
-
var
|
|
895
|
+
var Ae = Number.isNaN || function(e) {
|
|
882
896
|
return typeof e == "number" && e !== e;
|
|
883
897
|
};
|
|
884
|
-
function Xs(t, e) {
|
|
885
|
-
return !!(t === e || _e(t) && _e(e));
|
|
886
|
-
}
|
|
887
898
|
function en(t, e) {
|
|
899
|
+
return !!(t === e || Ae(t) && Ae(e));
|
|
900
|
+
}
|
|
901
|
+
function tn(t, e) {
|
|
888
902
|
if (t.length !== e.length)
|
|
889
903
|
return !1;
|
|
890
904
|
for (var s = 0; s < t.length; s++)
|
|
891
|
-
if (!
|
|
905
|
+
if (!en(t[s], e[s]))
|
|
892
906
|
return !1;
|
|
893
907
|
return !0;
|
|
894
908
|
}
|
|
895
|
-
function
|
|
896
|
-
e === void 0 && (e =
|
|
909
|
+
function ee(t, e) {
|
|
910
|
+
e === void 0 && (e = tn);
|
|
897
911
|
var s, n = [], i, u = !1;
|
|
898
912
|
function p() {
|
|
899
|
-
for (var
|
|
900
|
-
m
|
|
901
|
-
return u && s === this && e(
|
|
913
|
+
for (var f = [], m = 0; m < arguments.length; m++)
|
|
914
|
+
f[m] = arguments[m];
|
|
915
|
+
return u && s === this && e(f, n) || (i = t.apply(this, f), u = !0, s = this, n = f), i;
|
|
902
916
|
}
|
|
903
917
|
return p;
|
|
904
918
|
}
|
|
905
|
-
var
|
|
919
|
+
var sn = typeof performance == "object" && typeof performance.now == "function", Se = sn ? function() {
|
|
906
920
|
return performance.now();
|
|
907
921
|
} : function() {
|
|
908
922
|
return Date.now();
|
|
909
923
|
};
|
|
910
|
-
function
|
|
924
|
+
function De(t) {
|
|
911
925
|
cancelAnimationFrame(t.id);
|
|
912
926
|
}
|
|
913
|
-
function
|
|
914
|
-
var s =
|
|
927
|
+
function nn(t, e) {
|
|
928
|
+
var s = Se();
|
|
915
929
|
function n() {
|
|
916
|
-
|
|
930
|
+
Se() - s >= e ? t.call(null) : i.id = requestAnimationFrame(n);
|
|
917
931
|
}
|
|
918
932
|
var i = {
|
|
919
933
|
id: requestAnimationFrame(n)
|
|
920
934
|
};
|
|
921
935
|
return i;
|
|
922
936
|
}
|
|
923
|
-
var
|
|
924
|
-
function
|
|
925
|
-
if (t === void 0 && (t = !1),
|
|
937
|
+
var te = -1;
|
|
938
|
+
function xe(t) {
|
|
939
|
+
if (t === void 0 && (t = !1), te === -1 || t) {
|
|
926
940
|
var e = document.createElement("div"), s = e.style;
|
|
927
|
-
s.width = "50px", s.height = "50px", s.overflow = "scroll", document.body.appendChild(e),
|
|
941
|
+
s.width = "50px", s.height = "50px", s.overflow = "scroll", document.body.appendChild(e), te = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
928
942
|
}
|
|
929
|
-
return
|
|
943
|
+
return te;
|
|
930
944
|
}
|
|
931
945
|
var j = null;
|
|
932
|
-
function
|
|
946
|
+
function we(t) {
|
|
933
947
|
if (t === void 0 && (t = !1), j === null || t) {
|
|
934
948
|
var e = document.createElement("div"), s = e.style;
|
|
935
949
|
s.width = "50px", s.height = "50px", s.overflow = "scroll", s.direction = "rtl";
|
|
@@ -938,80 +952,80 @@ function De(t) {
|
|
|
938
952
|
}
|
|
939
953
|
return j;
|
|
940
954
|
}
|
|
941
|
-
var
|
|
955
|
+
var rn = 150, an = function(e, s) {
|
|
942
956
|
return e;
|
|
943
957
|
};
|
|
944
|
-
function
|
|
945
|
-
var e, s = t.getItemOffset, n = t.getEstimatedTotalSize, i = t.getItemSize, u = t.getOffsetForIndexAndAlignment, p = t.getStartIndexForOffset,
|
|
946
|
-
return e = /* @__PURE__ */ function(
|
|
947
|
-
|
|
948
|
-
function l(
|
|
958
|
+
function on(t) {
|
|
959
|
+
var e, s = t.getItemOffset, n = t.getEstimatedTotalSize, i = t.getItemSize, u = t.getOffsetForIndexAndAlignment, p = t.getStartIndexForOffset, f = t.getStopIndexForStartIndex, m = t.initInstanceProps, g = t.shouldResetStyleCacheOnItemSizeChange, N = t.validateProps;
|
|
960
|
+
return e = /* @__PURE__ */ function(z) {
|
|
961
|
+
Xs(l, z);
|
|
962
|
+
function l(v) {
|
|
949
963
|
var r;
|
|
950
|
-
return r =
|
|
951
|
-
instance:
|
|
964
|
+
return r = z.call(this, v) || this, r._instanceProps = m(r.props, Te(r)), r._outerRef = void 0, r._resetIsScrollingTimeoutId = null, r.state = {
|
|
965
|
+
instance: Te(r),
|
|
952
966
|
isScrolling: !1,
|
|
953
967
|
scrollDirection: "forward",
|
|
954
968
|
scrollOffset: typeof r.props.initialScrollOffset == "number" ? r.props.initialScrollOffset : 0,
|
|
955
969
|
scrollUpdateWasRequested: !1
|
|
956
|
-
}, r._callOnItemsRendered = void 0, r._callOnItemsRendered =
|
|
970
|
+
}, r._callOnItemsRendered = void 0, r._callOnItemsRendered = ee(function(h, c, d, I) {
|
|
957
971
|
return r.props.onItemsRendered({
|
|
958
972
|
overscanStartIndex: h,
|
|
959
973
|
overscanStopIndex: c,
|
|
960
974
|
visibleStartIndex: d,
|
|
961
|
-
visibleStopIndex:
|
|
975
|
+
visibleStopIndex: I
|
|
962
976
|
});
|
|
963
|
-
}), r._callOnScroll = void 0, r._callOnScroll =
|
|
977
|
+
}), r._callOnScroll = void 0, r._callOnScroll = ee(function(h, c, d) {
|
|
964
978
|
return r.props.onScroll({
|
|
965
979
|
scrollDirection: h,
|
|
966
980
|
scrollOffset: c,
|
|
967
981
|
scrollUpdateWasRequested: d
|
|
968
982
|
});
|
|
969
983
|
}), r._getItemStyle = void 0, r._getItemStyle = function(h) {
|
|
970
|
-
var c = r.props, d = c.direction,
|
|
984
|
+
var c = r.props, d = c.direction, I = c.itemSize, T = c.layout, _ = r._getItemStyleCache(g && I, g && T, g && d), A;
|
|
971
985
|
if (_.hasOwnProperty(h))
|
|
972
986
|
A = _[h];
|
|
973
987
|
else {
|
|
974
|
-
var S = s(r.props, h, r._instanceProps), O = i(r.props, h, r._instanceProps), E = d === "horizontal" || T === "horizontal",
|
|
988
|
+
var S = s(r.props, h, r._instanceProps), O = i(r.props, h, r._instanceProps), E = d === "horizontal" || T === "horizontal", P = d === "rtl", W = E ? S : 0;
|
|
975
989
|
_[h] = A = {
|
|
976
990
|
position: "absolute",
|
|
977
|
-
left:
|
|
978
|
-
right:
|
|
991
|
+
left: P ? void 0 : W,
|
|
992
|
+
right: P ? W : void 0,
|
|
979
993
|
top: E ? 0 : S,
|
|
980
994
|
height: E ? "100%" : O,
|
|
981
995
|
width: E ? O : "100%"
|
|
982
996
|
};
|
|
983
997
|
}
|
|
984
998
|
return A;
|
|
985
|
-
}, r._getItemStyleCache = void 0, r._getItemStyleCache =
|
|
999
|
+
}, r._getItemStyleCache = void 0, r._getItemStyleCache = ee(function(h, c, d) {
|
|
986
1000
|
return {};
|
|
987
1001
|
}), r._onScrollHorizontal = function(h) {
|
|
988
|
-
var c = h.currentTarget, d = c.clientWidth,
|
|
1002
|
+
var c = h.currentTarget, d = c.clientWidth, I = c.scrollLeft, T = c.scrollWidth;
|
|
989
1003
|
r.setState(function(_) {
|
|
990
|
-
if (_.scrollOffset ===
|
|
1004
|
+
if (_.scrollOffset === I)
|
|
991
1005
|
return null;
|
|
992
|
-
var A = r.props.direction, S =
|
|
1006
|
+
var A = r.props.direction, S = I;
|
|
993
1007
|
if (A === "rtl")
|
|
994
|
-
switch (
|
|
1008
|
+
switch (we()) {
|
|
995
1009
|
case "negative":
|
|
996
|
-
S = -
|
|
1010
|
+
S = -I;
|
|
997
1011
|
break;
|
|
998
1012
|
case "positive-descending":
|
|
999
|
-
S = T - d -
|
|
1013
|
+
S = T - d - I;
|
|
1000
1014
|
break;
|
|
1001
1015
|
}
|
|
1002
1016
|
return S = Math.max(0, Math.min(S, T - d)), {
|
|
1003
1017
|
isScrolling: !0,
|
|
1004
|
-
scrollDirection: _.scrollOffset <
|
|
1018
|
+
scrollDirection: _.scrollOffset < I ? "forward" : "backward",
|
|
1005
1019
|
scrollOffset: S,
|
|
1006
1020
|
scrollUpdateWasRequested: !1
|
|
1007
1021
|
};
|
|
1008
1022
|
}, r._resetIsScrollingDebounced);
|
|
1009
1023
|
}, r._onScrollVertical = function(h) {
|
|
1010
|
-
var c = h.currentTarget, d = c.clientHeight,
|
|
1024
|
+
var c = h.currentTarget, d = c.clientHeight, I = c.scrollHeight, T = c.scrollTop;
|
|
1011
1025
|
r.setState(function(_) {
|
|
1012
1026
|
if (_.scrollOffset === T)
|
|
1013
1027
|
return null;
|
|
1014
|
-
var A = Math.max(0, Math.min(T,
|
|
1028
|
+
var A = Math.max(0, Math.min(T, I - d));
|
|
1015
1029
|
return {
|
|
1016
1030
|
isScrolling: !0,
|
|
1017
1031
|
scrollDirection: _.scrollOffset < A ? "forward" : "backward",
|
|
@@ -1023,7 +1037,7 @@ function an(t) {
|
|
|
1023
1037
|
var c = r.props.outerRef;
|
|
1024
1038
|
r._outerRef = h, typeof c == "function" ? c(h) : c != null && typeof c == "object" && c.hasOwnProperty("current") && (c.current = h);
|
|
1025
1039
|
}, r._resetIsScrollingDebounced = function() {
|
|
1026
|
-
r._resetIsScrollingTimeoutId !== null &&
|
|
1040
|
+
r._resetIsScrollingTimeoutId !== null && De(r._resetIsScrollingTimeoutId), r._resetIsScrollingTimeoutId = nn(r._resetIsScrolling, rn);
|
|
1027
1041
|
}, r._resetIsScrolling = function() {
|
|
1028
1042
|
r._resetIsScrollingTimeoutId = null, r.setState({
|
|
1029
1043
|
isScrolling: !1
|
|
@@ -1033,10 +1047,10 @@ function an(t) {
|
|
|
1033
1047
|
}, r;
|
|
1034
1048
|
}
|
|
1035
1049
|
l.getDerivedStateFromProps = function(r, h) {
|
|
1036
|
-
return
|
|
1050
|
+
return ln(r, h), N(r), null;
|
|
1037
1051
|
};
|
|
1038
|
-
var
|
|
1039
|
-
return
|
|
1052
|
+
var M = l.prototype;
|
|
1053
|
+
return M.scrollTo = function(r) {
|
|
1040
1054
|
r = Math.max(0, r), this.setState(function(h) {
|
|
1041
1055
|
return h.scrollOffset === r ? null : {
|
|
1042
1056
|
scrollDirection: h.scrollOffset < r ? "forward" : "backward",
|
|
@@ -1044,103 +1058,103 @@ function an(t) {
|
|
|
1044
1058
|
scrollUpdateWasRequested: !0
|
|
1045
1059
|
};
|
|
1046
1060
|
}, this._resetIsScrollingDebounced);
|
|
1047
|
-
},
|
|
1061
|
+
}, M.scrollToItem = function(r, h) {
|
|
1048
1062
|
h === void 0 && (h = "auto");
|
|
1049
|
-
var c = this.props, d = c.itemCount,
|
|
1063
|
+
var c = this.props, d = c.itemCount, I = c.layout, T = this.state.scrollOffset;
|
|
1050
1064
|
r = Math.max(0, Math.min(r, d - 1));
|
|
1051
1065
|
var _ = 0;
|
|
1052
1066
|
if (this._outerRef) {
|
|
1053
1067
|
var A = this._outerRef;
|
|
1054
|
-
|
|
1068
|
+
I === "vertical" ? _ = A.scrollWidth > A.clientWidth ? xe() : 0 : _ = A.scrollHeight > A.clientHeight ? xe() : 0;
|
|
1055
1069
|
}
|
|
1056
1070
|
this.scrollTo(u(this.props, r, h, T, this._instanceProps, _));
|
|
1057
|
-
},
|
|
1071
|
+
}, M.componentDidMount = function() {
|
|
1058
1072
|
var r = this.props, h = r.direction, c = r.initialScrollOffset, d = r.layout;
|
|
1059
1073
|
if (typeof c == "number" && this._outerRef != null) {
|
|
1060
|
-
var
|
|
1061
|
-
h === "horizontal" || d === "horizontal" ?
|
|
1074
|
+
var I = this._outerRef;
|
|
1075
|
+
h === "horizontal" || d === "horizontal" ? I.scrollLeft = c : I.scrollTop = c;
|
|
1062
1076
|
}
|
|
1063
1077
|
this._callPropsCallbacks();
|
|
1064
|
-
},
|
|
1065
|
-
var r = this.props, h = r.direction, c = r.layout, d = this.state,
|
|
1078
|
+
}, M.componentDidUpdate = function() {
|
|
1079
|
+
var r = this.props, h = r.direction, c = r.layout, d = this.state, I = d.scrollOffset, T = d.scrollUpdateWasRequested;
|
|
1066
1080
|
if (T && this._outerRef != null) {
|
|
1067
1081
|
var _ = this._outerRef;
|
|
1068
1082
|
if (h === "horizontal" || c === "horizontal")
|
|
1069
1083
|
if (h === "rtl")
|
|
1070
|
-
switch (
|
|
1084
|
+
switch (we()) {
|
|
1071
1085
|
case "negative":
|
|
1072
|
-
_.scrollLeft = -
|
|
1086
|
+
_.scrollLeft = -I;
|
|
1073
1087
|
break;
|
|
1074
1088
|
case "positive-ascending":
|
|
1075
|
-
_.scrollLeft =
|
|
1089
|
+
_.scrollLeft = I;
|
|
1076
1090
|
break;
|
|
1077
1091
|
default:
|
|
1078
1092
|
var A = _.clientWidth, S = _.scrollWidth;
|
|
1079
|
-
_.scrollLeft = S - A -
|
|
1093
|
+
_.scrollLeft = S - A - I;
|
|
1080
1094
|
break;
|
|
1081
1095
|
}
|
|
1082
1096
|
else
|
|
1083
|
-
_.scrollLeft =
|
|
1097
|
+
_.scrollLeft = I;
|
|
1084
1098
|
else
|
|
1085
|
-
_.scrollTop =
|
|
1099
|
+
_.scrollTop = I;
|
|
1086
1100
|
}
|
|
1087
1101
|
this._callPropsCallbacks();
|
|
1088
|
-
},
|
|
1089
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1090
|
-
},
|
|
1091
|
-
var r = this.props, h = r.children, c = r.className, d = r.direction,
|
|
1102
|
+
}, M.componentWillUnmount = function() {
|
|
1103
|
+
this._resetIsScrollingTimeoutId !== null && De(this._resetIsScrollingTimeoutId);
|
|
1104
|
+
}, M.render = function() {
|
|
1105
|
+
var r = this.props, h = r.children, c = r.className, d = r.direction, I = r.height, T = r.innerRef, _ = r.innerElementType, A = r.innerTagName, S = r.itemCount, O = r.itemData, E = r.itemKey, P = E === void 0 ? an : E, W = r.layout, We = r.outerElementType, Fe = r.outerTagName, Ve = r.style, He = r.useIsScrolling, Be = r.width, oe = this.state.isScrolling, Z = d === "horizontal" || W === "horizontal", Ge = Z ? this._onScrollHorizontal : this._onScrollVertical, le = this._getRangeToRender(), Ze = le[0], Je = le[1], ce = [];
|
|
1092
1106
|
if (S > 0)
|
|
1093
|
-
for (var $ =
|
|
1094
|
-
|
|
1107
|
+
for (var $ = Ze; $ <= Je; $++)
|
|
1108
|
+
ce.push(B(h, {
|
|
1095
1109
|
data: O,
|
|
1096
|
-
key:
|
|
1110
|
+
key: P($, O),
|
|
1097
1111
|
index: $,
|
|
1098
|
-
isScrolling:
|
|
1112
|
+
isScrolling: He ? oe : void 0,
|
|
1099
1113
|
style: this._getItemStyle($)
|
|
1100
1114
|
}));
|
|
1101
|
-
var
|
|
1102
|
-
return
|
|
1115
|
+
var de = n(this.props, this._instanceProps);
|
|
1116
|
+
return B(We || Fe || "div", {
|
|
1103
1117
|
className: c,
|
|
1104
|
-
onScroll:
|
|
1118
|
+
onScroll: Ge,
|
|
1105
1119
|
ref: this._outerRefSetter,
|
|
1106
|
-
style:
|
|
1120
|
+
style: re({
|
|
1107
1121
|
position: "relative",
|
|
1108
|
-
height:
|
|
1109
|
-
width:
|
|
1122
|
+
height: I,
|
|
1123
|
+
width: Be,
|
|
1110
1124
|
overflow: "auto",
|
|
1111
1125
|
WebkitOverflowScrolling: "touch",
|
|
1112
1126
|
willChange: "transform",
|
|
1113
1127
|
direction: d
|
|
1114
|
-
},
|
|
1115
|
-
},
|
|
1116
|
-
children:
|
|
1128
|
+
}, Ve)
|
|
1129
|
+
}, B(_ || A || "div", {
|
|
1130
|
+
children: ce,
|
|
1117
1131
|
ref: T,
|
|
1118
1132
|
style: {
|
|
1119
|
-
height:
|
|
1120
|
-
pointerEvents:
|
|
1121
|
-
width:
|
|
1133
|
+
height: Z ? "100%" : de,
|
|
1134
|
+
pointerEvents: oe ? "none" : void 0,
|
|
1135
|
+
width: Z ? de : "100%"
|
|
1122
1136
|
}
|
|
1123
1137
|
}));
|
|
1124
|
-
},
|
|
1138
|
+
}, M._callPropsCallbacks = function() {
|
|
1125
1139
|
if (typeof this.props.onItemsRendered == "function") {
|
|
1126
1140
|
var r = this.props.itemCount;
|
|
1127
1141
|
if (r > 0) {
|
|
1128
|
-
var h = this._getRangeToRender(), c = h[0], d = h[1],
|
|
1129
|
-
this._callOnItemsRendered(c, d,
|
|
1142
|
+
var h = this._getRangeToRender(), c = h[0], d = h[1], I = h[2], T = h[3];
|
|
1143
|
+
this._callOnItemsRendered(c, d, I, T);
|
|
1130
1144
|
}
|
|
1131
1145
|
}
|
|
1132
1146
|
if (typeof this.props.onScroll == "function") {
|
|
1133
1147
|
var _ = this.state, A = _.scrollDirection, S = _.scrollOffset, O = _.scrollUpdateWasRequested;
|
|
1134
1148
|
this._callOnScroll(A, S, O);
|
|
1135
1149
|
}
|
|
1136
|
-
},
|
|
1137
|
-
var r = this.props, h = r.itemCount, c = r.overscanCount, d = this.state,
|
|
1150
|
+
}, M._getRangeToRender = function() {
|
|
1151
|
+
var r = this.props, h = r.itemCount, c = r.overscanCount, d = this.state, I = d.isScrolling, T = d.scrollDirection, _ = d.scrollOffset;
|
|
1138
1152
|
if (h === 0)
|
|
1139
1153
|
return [0, 0, 0, 0];
|
|
1140
|
-
var A = p(this.props, _, this._instanceProps), S =
|
|
1154
|
+
var A = p(this.props, _, this._instanceProps), S = f(this.props, A, _, this._instanceProps), O = !I || T === "backward" ? Math.max(1, c) : 1, E = !I || T === "forward" ? Math.max(1, c) : 1;
|
|
1141
1155
|
return [Math.max(0, A - O), Math.max(0, Math.min(h - 1, S + E)), A, S];
|
|
1142
1156
|
}, l;
|
|
1143
|
-
}(
|
|
1157
|
+
}(Ce), e.defaultProps = {
|
|
1144
1158
|
direction: "ltr",
|
|
1145
1159
|
itemData: void 0,
|
|
1146
1160
|
layout: "vertical",
|
|
@@ -1148,9 +1162,9 @@ function an(t) {
|
|
|
1148
1162
|
useIsScrolling: !1
|
|
1149
1163
|
}, e;
|
|
1150
1164
|
}
|
|
1151
|
-
var
|
|
1165
|
+
var ln = function(e, s) {
|
|
1152
1166
|
e.children, e.direction, e.height, e.layout, e.innerTagName, e.outerTagName, e.width, s.instance;
|
|
1153
|
-
},
|
|
1167
|
+
}, cn = /* @__PURE__ */ on({
|
|
1154
1168
|
getItemOffset: function(e, s) {
|
|
1155
1169
|
var n = e.itemSize;
|
|
1156
1170
|
return s * n;
|
|
@@ -1164,15 +1178,15 @@ var on = function(e, s) {
|
|
|
1164
1178
|
return n * s;
|
|
1165
1179
|
},
|
|
1166
1180
|
getOffsetForIndexAndAlignment: function(e, s, n, i, u, p) {
|
|
1167
|
-
var
|
|
1168
|
-
switch (n === "smart" && (i >= c -
|
|
1181
|
+
var f = e.direction, m = e.height, g = e.itemCount, N = e.itemSize, z = e.layout, l = e.width, M = f === "horizontal" || z === "horizontal", v = M ? l : m, r = Math.max(0, g * N - v), h = Math.min(r, s * N), c = Math.max(0, s * N - v + N + p);
|
|
1182
|
+
switch (n === "smart" && (i >= c - v && i <= h + v ? n = "auto" : n = "center"), n) {
|
|
1169
1183
|
case "start":
|
|
1170
1184
|
return h;
|
|
1171
1185
|
case "end":
|
|
1172
1186
|
return c;
|
|
1173
1187
|
case "center": {
|
|
1174
1188
|
var d = Math.round(c + (h - c) / 2);
|
|
1175
|
-
return d < Math.ceil(
|
|
1189
|
+
return d < Math.ceil(v / 2) ? 0 : d > r + Math.floor(v / 2) ? r : d;
|
|
1176
1190
|
}
|
|
1177
1191
|
case "auto":
|
|
1178
1192
|
default:
|
|
@@ -1184,10 +1198,10 @@ var on = function(e, s) {
|
|
|
1184
1198
|
return Math.max(0, Math.min(n - 1, Math.floor(s / i)));
|
|
1185
1199
|
},
|
|
1186
1200
|
getStopIndexForStartIndex: function(e, s, n) {
|
|
1187
|
-
var i = e.direction, u = e.height, p = e.itemCount,
|
|
1201
|
+
var i = e.direction, u = e.height, p = e.itemCount, f = e.itemSize, m = e.layout, g = e.width, N = i === "horizontal" || m === "horizontal", z = s * f, l = N ? g : u, M = Math.ceil((l + n - z) / f);
|
|
1188
1202
|
return Math.max(0, Math.min(
|
|
1189
1203
|
p - 1,
|
|
1190
|
-
s +
|
|
1204
|
+
s + M - 1
|
|
1191
1205
|
// -1 is because stop index is inclusive
|
|
1192
1206
|
));
|
|
1193
1207
|
},
|
|
@@ -1198,34 +1212,34 @@ var on = function(e, s) {
|
|
|
1198
1212
|
e.itemSize;
|
|
1199
1213
|
}
|
|
1200
1214
|
});
|
|
1201
|
-
function
|
|
1215
|
+
function dn(t) {
|
|
1202
1216
|
var e = t.lastRenderedStartIndex, s = t.lastRenderedStopIndex, n = t.startIndex, i = t.stopIndex;
|
|
1203
1217
|
return !(n > s || i < e);
|
|
1204
1218
|
}
|
|
1205
|
-
function
|
|
1206
|
-
for (var e = t.isItemLoaded, s = t.itemCount, n = t.minimumBatchSize, i = t.startIndex, u = t.stopIndex, p = [],
|
|
1207
|
-
var
|
|
1208
|
-
|
|
1219
|
+
function un(t) {
|
|
1220
|
+
for (var e = t.isItemLoaded, s = t.itemCount, n = t.minimumBatchSize, i = t.startIndex, u = t.stopIndex, p = [], f = null, m = null, g = i; g <= u; g++) {
|
|
1221
|
+
var N = e(g);
|
|
1222
|
+
N ? m !== null && (p.push(f, m), f = m = null) : (m = g, f === null && (f = g));
|
|
1209
1223
|
}
|
|
1210
|
-
if (
|
|
1211
|
-
for (var
|
|
1212
|
-
|
|
1213
|
-
p.push(
|
|
1224
|
+
if (m !== null) {
|
|
1225
|
+
for (var z = Math.min(Math.max(m, f + n - 1), s - 1), l = m + 1; l <= z && !e(l); l++)
|
|
1226
|
+
m = l;
|
|
1227
|
+
p.push(f, m);
|
|
1214
1228
|
}
|
|
1215
1229
|
if (p.length)
|
|
1216
1230
|
for (; p[1] - p[0] + 1 < n && p[0] > 0; ) {
|
|
1217
|
-
var
|
|
1218
|
-
if (!e(
|
|
1219
|
-
p[0] =
|
|
1231
|
+
var M = p[0] - 1;
|
|
1232
|
+
if (!e(M))
|
|
1233
|
+
p[0] = M;
|
|
1220
1234
|
else
|
|
1221
1235
|
break;
|
|
1222
1236
|
}
|
|
1223
1237
|
return p;
|
|
1224
1238
|
}
|
|
1225
|
-
var
|
|
1239
|
+
var pn = function(t, e) {
|
|
1226
1240
|
if (!(t instanceof e))
|
|
1227
1241
|
throw new TypeError("Cannot call a class as a function");
|
|
1228
|
-
},
|
|
1242
|
+
}, hn = function() {
|
|
1229
1243
|
function t(e, s) {
|
|
1230
1244
|
for (var n = 0; n < s.length; n++) {
|
|
1231
1245
|
var i = s[n];
|
|
@@ -1235,7 +1249,7 @@ var un = function(t, e) {
|
|
|
1235
1249
|
return function(e, s, n) {
|
|
1236
1250
|
return s && t(e.prototype, s), n && t(e, n), e;
|
|
1237
1251
|
};
|
|
1238
|
-
}(),
|
|
1252
|
+
}(), mn = function(t, e) {
|
|
1239
1253
|
if (typeof e != "function" && e !== null)
|
|
1240
1254
|
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
1241
1255
|
t.prototype = Object.create(e && e.prototype, {
|
|
@@ -1246,25 +1260,25 @@ var un = function(t, e) {
|
|
|
1246
1260
|
configurable: !0
|
|
1247
1261
|
}
|
|
1248
1262
|
}), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
|
|
1249
|
-
},
|
|
1263
|
+
}, Oe = function(t, e) {
|
|
1250
1264
|
if (!t)
|
|
1251
1265
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1252
1266
|
return e && (typeof e == "object" || typeof e == "function") ? e : t;
|
|
1253
|
-
},
|
|
1254
|
-
|
|
1267
|
+
}, fn = function(t) {
|
|
1268
|
+
mn(e, t);
|
|
1255
1269
|
function e() {
|
|
1256
1270
|
var s, n, i, u;
|
|
1257
|
-
|
|
1258
|
-
for (var p = arguments.length,
|
|
1259
|
-
m
|
|
1260
|
-
return u = (n = (i =
|
|
1261
|
-
var
|
|
1262
|
-
i._lastRenderedStartIndex =
|
|
1263
|
-
}, i._setRef = function(
|
|
1264
|
-
i._listRef =
|
|
1265
|
-
}, n),
|
|
1271
|
+
pn(this, e);
|
|
1272
|
+
for (var p = arguments.length, f = Array(p), m = 0; m < p; m++)
|
|
1273
|
+
f[m] = arguments[m];
|
|
1274
|
+
return u = (n = (i = Oe(this, (s = e.__proto__ || Object.getPrototypeOf(e)).call.apply(s, [this].concat(f))), i), i._lastRenderedStartIndex = -1, i._lastRenderedStopIndex = -1, i._memoizedUnloadedRanges = [], i._onItemsRendered = function(g) {
|
|
1275
|
+
var N = g.visibleStartIndex, z = g.visibleStopIndex;
|
|
1276
|
+
i._lastRenderedStartIndex = N, i._lastRenderedStopIndex = z, i._ensureRowsLoaded(N, z);
|
|
1277
|
+
}, i._setRef = function(g) {
|
|
1278
|
+
i._listRef = g;
|
|
1279
|
+
}, n), Oe(i, u);
|
|
1266
1280
|
}
|
|
1267
|
-
return
|
|
1281
|
+
return hn(e, [{
|
|
1268
1282
|
key: "resetloadMoreItemsCache",
|
|
1269
1283
|
value: function() {
|
|
1270
1284
|
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -1286,56 +1300,56 @@ var un = function(t, e) {
|
|
|
1286
1300
|
}, {
|
|
1287
1301
|
key: "_ensureRowsLoaded",
|
|
1288
1302
|
value: function(n, i) {
|
|
1289
|
-
var u = this.props, p = u.isItemLoaded,
|
|
1303
|
+
var u = this.props, p = u.isItemLoaded, f = u.itemCount, m = u.minimumBatchSize, g = m === void 0 ? 10 : m, N = u.threshold, z = N === void 0 ? 15 : N, l = un({
|
|
1290
1304
|
isItemLoaded: p,
|
|
1291
|
-
itemCount:
|
|
1292
|
-
minimumBatchSize:
|
|
1293
|
-
startIndex: Math.max(0, n -
|
|
1294
|
-
stopIndex: Math.min(
|
|
1305
|
+
itemCount: f,
|
|
1306
|
+
minimumBatchSize: g,
|
|
1307
|
+
startIndex: Math.max(0, n - z),
|
|
1308
|
+
stopIndex: Math.min(f - 1, i + z)
|
|
1295
1309
|
});
|
|
1296
|
-
(this._memoizedUnloadedRanges.length !== l.length || this._memoizedUnloadedRanges.some(function(
|
|
1297
|
-
return l[
|
|
1310
|
+
(this._memoizedUnloadedRanges.length !== l.length || this._memoizedUnloadedRanges.some(function(M, v) {
|
|
1311
|
+
return l[v] !== M;
|
|
1298
1312
|
})) && (this._memoizedUnloadedRanges = l, this._loadUnloadedRanges(l));
|
|
1299
1313
|
}
|
|
1300
1314
|
}, {
|
|
1301
1315
|
key: "_loadUnloadedRanges",
|
|
1302
1316
|
value: function(n) {
|
|
1303
|
-
for (var i = this, u = this.props.loadMoreItems || this.props.loadMoreRows, p = function(
|
|
1304
|
-
var
|
|
1317
|
+
for (var i = this, u = this.props.loadMoreItems || this.props.loadMoreRows, p = function(g) {
|
|
1318
|
+
var N = n[g], z = n[g + 1], l = u(N, z);
|
|
1305
1319
|
l != null && l.then(function() {
|
|
1306
|
-
if (
|
|
1320
|
+
if (dn({
|
|
1307
1321
|
lastRenderedStartIndex: i._lastRenderedStartIndex,
|
|
1308
1322
|
lastRenderedStopIndex: i._lastRenderedStopIndex,
|
|
1309
|
-
startIndex:
|
|
1310
|
-
stopIndex:
|
|
1323
|
+
startIndex: N,
|
|
1324
|
+
stopIndex: z
|
|
1311
1325
|
})) {
|
|
1312
1326
|
if (i._listRef == null)
|
|
1313
1327
|
return;
|
|
1314
|
-
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(
|
|
1328
|
+
typeof i._listRef.resetAfterIndex == "function" ? i._listRef.resetAfterIndex(N, !0) : (typeof i._listRef._getItemStyleCache == "function" && i._listRef._getItemStyleCache(-1), i._listRef.forceUpdate());
|
|
1315
1329
|
}
|
|
1316
1330
|
});
|
|
1317
|
-
},
|
|
1318
|
-
p(
|
|
1331
|
+
}, f = 0; f < n.length; f += 2)
|
|
1332
|
+
p(f);
|
|
1319
1333
|
}
|
|
1320
1334
|
}]), e;
|
|
1321
|
-
}(
|
|
1322
|
-
const
|
|
1335
|
+
}(Ce);
|
|
1336
|
+
const gn = () => w, In = /* @__PURE__ */ o("div")({
|
|
1323
1337
|
name: "a",
|
|
1324
1338
|
class: "a1w9zony",
|
|
1325
1339
|
propsAsIs: !1
|
|
1326
|
-
}),
|
|
1340
|
+
}), vn = /* @__PURE__ */ o("div")({
|
|
1327
1341
|
name: "l",
|
|
1328
1342
|
class: "l16qcfv8",
|
|
1329
1343
|
propsAsIs: !1
|
|
1330
|
-
}),
|
|
1344
|
+
}), Mn = /* @__PURE__ */ o("img")({
|
|
1331
1345
|
name: "p",
|
|
1332
1346
|
class: "p1gmcc5f",
|
|
1333
1347
|
propsAsIs: !1
|
|
1334
|
-
}),
|
|
1348
|
+
}), yn = /* @__PURE__ */ o("div")({
|
|
1335
1349
|
name: "s",
|
|
1336
1350
|
class: "s1doddh0",
|
|
1337
1351
|
propsAsIs: !1
|
|
1338
|
-
}),
|
|
1352
|
+
}), zn = /* @__PURE__ */ o("div")({
|
|
1339
1353
|
name: "c",
|
|
1340
1354
|
class: "c1js9xhe",
|
|
1341
1355
|
propsAsIs: !1
|
|
@@ -1343,15 +1357,15 @@ const fn = () => w, gn = /* @__PURE__ */ o("div")({
|
|
|
1343
1357
|
name: "d",
|
|
1344
1358
|
class: "d1tmnqsh",
|
|
1345
1359
|
propsAsIs: !1
|
|
1346
|
-
}),
|
|
1360
|
+
}), _n = /* @__PURE__ */ o("span")({
|
|
1347
1361
|
name: "g",
|
|
1348
1362
|
class: "gi9h87j",
|
|
1349
1363
|
propsAsIs: !1
|
|
1350
|
-
}),
|
|
1364
|
+
}), Tn = /* @__PURE__ */ o(gn())({
|
|
1351
1365
|
name: "x",
|
|
1352
1366
|
class: "x13mk3z6",
|
|
1353
1367
|
propsAsIs: !0
|
|
1354
|
-
}),
|
|
1368
|
+
}), An = ({
|
|
1355
1369
|
rank: t,
|
|
1356
1370
|
avatar: e,
|
|
1357
1371
|
name: s,
|
|
@@ -1359,24 +1373,24 @@ const fn = () => w, gn = /* @__PURE__ */ o("div")({
|
|
|
1359
1373
|
isCurrentUser: i,
|
|
1360
1374
|
openItemDetail: u,
|
|
1361
1375
|
style: p
|
|
1362
|
-
}) => /* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */ a(
|
|
1364
|
-
/* @__PURE__ */
|
|
1365
|
-
e ? /* @__PURE__ */ a(
|
|
1366
|
-
/* @__PURE__ */
|
|
1367
|
-
/* @__PURE__ */ a(
|
|
1368
|
-
i && /* @__PURE__ */ a(
|
|
1376
|
+
}) => /* @__PURE__ */ y(In, { onClick: u, style: p, children: [
|
|
1377
|
+
/* @__PURE__ */ a(vn, { children: t || 0 }),
|
|
1378
|
+
/* @__PURE__ */ y(zn, { children: [
|
|
1379
|
+
e ? /* @__PURE__ */ a(Mn, { alt: "leaderboard-item-avatar", src: e }) : /* @__PURE__ */ a(yn, { children: ke(s || "") }),
|
|
1380
|
+
/* @__PURE__ */ y(Nn, { children: [
|
|
1381
|
+
/* @__PURE__ */ a(_n, { children: s || "" }),
|
|
1382
|
+
i && /* @__PURE__ */ a(Tn, { name: "icon-star" })
|
|
1369
1383
|
] })
|
|
1370
1384
|
] }),
|
|
1371
|
-
/* @__PURE__ */ a("div", { children:
|
|
1372
|
-
] }),
|
|
1373
|
-
|
|
1385
|
+
/* @__PURE__ */ a("div", { children: je(n) })
|
|
1386
|
+
] }), Sn = ({ items: t, openItemDetail: e, fetchMore: s }) => /* @__PURE__ */ a(Ks, { children: ({ width: n, height: i }) => /* @__PURE__ */ a(
|
|
1387
|
+
fn,
|
|
1374
1388
|
{
|
|
1375
1389
|
isItemLoaded: (u) => u < t.length,
|
|
1376
1390
|
itemCount: t.length + 1,
|
|
1377
1391
|
loadMoreItems: s,
|
|
1378
1392
|
children: ({ onItemsRendered: u, ref: p }) => /* @__PURE__ */ a(
|
|
1379
|
-
|
|
1393
|
+
cn,
|
|
1380
1394
|
{
|
|
1381
1395
|
itemSize: 56,
|
|
1382
1396
|
onItemsRendered: u,
|
|
@@ -1384,69 +1398,69 @@ const fn = () => w, gn = /* @__PURE__ */ o("div")({
|
|
|
1384
1398
|
itemCount: t.length,
|
|
1385
1399
|
width: n,
|
|
1386
1400
|
height: i,
|
|
1387
|
-
children: ({ index:
|
|
1388
|
-
|
|
1401
|
+
children: ({ index: f, style: m }) => /* @__PURE__ */ a(
|
|
1402
|
+
An,
|
|
1389
1403
|
{
|
|
1390
|
-
style: { ...
|
|
1391
|
-
...t[
|
|
1392
|
-
openItemDetail: () => e(t[
|
|
1404
|
+
style: { ...m, maxHeight: 48 },
|
|
1405
|
+
...t[f],
|
|
1406
|
+
openItemDetail: () => e(t[f].userId)
|
|
1393
1407
|
},
|
|
1394
|
-
t[
|
|
1408
|
+
t[f].userId
|
|
1395
1409
|
)
|
|
1396
1410
|
}
|
|
1397
1411
|
)
|
|
1398
1412
|
}
|
|
1399
|
-
) }),
|
|
1400
|
-
const { data: s } =
|
|
1401
|
-
return /* @__PURE__ */ a(
|
|
1413
|
+
) }), Dn = ({ leaderboardList: t, openUser: e }) => {
|
|
1414
|
+
const { data: s } = k(t.$store);
|
|
1415
|
+
return /* @__PURE__ */ a(Sn, { fetchMore: t.fetchMore, items: s, openItemDetail: e });
|
|
1402
1416
|
};
|
|
1403
|
-
const
|
|
1417
|
+
const xn = /* @__PURE__ */ o("button")({
|
|
1404
1418
|
name: "a",
|
|
1405
1419
|
class: "akly9h2",
|
|
1406
1420
|
propsAsIs: !1
|
|
1407
|
-
}),
|
|
1421
|
+
}), wn = /* @__PURE__ */ o("span")({
|
|
1408
1422
|
name: "e",
|
|
1409
1423
|
class: "eptoiz9",
|
|
1410
1424
|
propsAsIs: !1
|
|
1411
|
-
}),
|
|
1412
|
-
const
|
|
1425
|
+
}), On = ({ disabled: t, variant: e = "primary", onClick: s, children: n, ...i }) => /* @__PURE__ */ a(xn, { onClick: s, disabled: t, "data-variant": e, ...i, children: /* @__PURE__ */ a(wn, { children: n }) });
|
|
1426
|
+
const En = () => w, bn = () => w, kn = /* @__PURE__ */ o("div")({
|
|
1413
1427
|
name: "s",
|
|
1414
1428
|
class: "s1lblda3",
|
|
1415
1429
|
propsAsIs: !1
|
|
1416
|
-
}),
|
|
1430
|
+
}), jn = /* @__PURE__ */ o("div")({
|
|
1417
1431
|
name: "a",
|
|
1418
1432
|
class: "ascvb2g",
|
|
1419
1433
|
propsAsIs: !1
|
|
1420
|
-
}),
|
|
1434
|
+
}), Ln = /* @__PURE__ */ o("div")({
|
|
1421
1435
|
name: "p",
|
|
1422
1436
|
class: "p17rl8zy",
|
|
1423
1437
|
propsAsIs: !1
|
|
1424
|
-
}),
|
|
1438
|
+
}), Rn = /* @__PURE__ */ o("div")({
|
|
1425
1439
|
name: "l",
|
|
1426
1440
|
class: "l1vvttbn",
|
|
1427
1441
|
propsAsIs: !1
|
|
1428
|
-
}),
|
|
1442
|
+
}), se = /* @__PURE__ */ o(En())({
|
|
1429
1443
|
name: "c",
|
|
1430
1444
|
class: "c6fk2ph",
|
|
1431
1445
|
propsAsIs: !0
|
|
1432
|
-
}), Cn = /* @__PURE__ */ o(
|
|
1446
|
+
}), Cn = /* @__PURE__ */ o(bn())({
|
|
1433
1447
|
name: "d",
|
|
1434
1448
|
class: "d1rdm136",
|
|
1435
1449
|
propsAsIs: !0
|
|
1436
|
-
}),
|
|
1450
|
+
}), $n = /* @__PURE__ */ o("div")({
|
|
1437
1451
|
name: "f",
|
|
1438
1452
|
class: "fwqnnel",
|
|
1439
1453
|
propsAsIs: !1
|
|
1440
|
-
}),
|
|
1454
|
+
}), Un = /* @__PURE__ */ o("div")({
|
|
1441
1455
|
name: "u",
|
|
1442
1456
|
class: "ucyxnlg",
|
|
1443
1457
|
propsAsIs: !1
|
|
1444
|
-
}),
|
|
1445
|
-
[
|
|
1446
|
-
[
|
|
1447
|
-
[
|
|
1448
|
-
[
|
|
1449
|
-
},
|
|
1458
|
+
}), Qn = {
|
|
1459
|
+
[F.LOST]: /* @__PURE__ */ a(se, { name: "icon-cross" }),
|
|
1460
|
+
[F.WON]: /* @__PURE__ */ a(se, { name: "icon-check" }),
|
|
1461
|
+
[F.UNSET]: void 0,
|
|
1462
|
+
[F.DNP]: /* @__PURE__ */ a(se, { name: "icon-arrow" })
|
|
1463
|
+
}, qn = ({
|
|
1450
1464
|
questionId: t,
|
|
1451
1465
|
questionType: e,
|
|
1452
1466
|
questionStatus: s,
|
|
@@ -1455,111 +1469,111 @@ const On = () => w, En = () => w, kn = /* @__PURE__ */ o("div")({
|
|
|
1455
1469
|
openQuestion: u,
|
|
1456
1470
|
status: p
|
|
1457
1471
|
}) => {
|
|
1458
|
-
const
|
|
1459
|
-
return
|
|
1460
|
-
/* @__PURE__ */
|
|
1461
|
-
/* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */ a(Cn, { name:
|
|
1463
|
-
/* @__PURE__ */
|
|
1464
|
-
|
|
1465
|
-
e ===
|
|
1472
|
+
const f = be[e], m = Qn[p];
|
|
1473
|
+
return f ? /* @__PURE__ */ y(kn, { onClick: () => u == null ? void 0 : u(t), children: [
|
|
1474
|
+
/* @__PURE__ */ y(Un, { children: [
|
|
1475
|
+
/* @__PURE__ */ y(jn, { children: [
|
|
1476
|
+
/* @__PURE__ */ a(Cn, { name: f.iconName }),
|
|
1477
|
+
/* @__PURE__ */ y($n, { children: [
|
|
1478
|
+
f.label,
|
|
1479
|
+
e === D.TRIVIA && s === Y.RESOLVED && " • Expired"
|
|
1466
1480
|
] })
|
|
1467
1481
|
] }),
|
|
1468
|
-
/* @__PURE__ */ a(
|
|
1482
|
+
/* @__PURE__ */ a(Ln, { children: n || "" })
|
|
1469
1483
|
] }),
|
|
1470
|
-
/* @__PURE__ */ a(
|
|
1484
|
+
/* @__PURE__ */ a(Rn, { children: m || (i ? /* @__PURE__ */ a(On, { children: "Play" }) : null) })
|
|
1471
1485
|
] }) : null;
|
|
1472
1486
|
};
|
|
1473
|
-
const
|
|
1487
|
+
const Yn = /* @__PURE__ */ o("div")({
|
|
1474
1488
|
name: "n",
|
|
1475
1489
|
class: "n1jcgove",
|
|
1476
1490
|
propsAsIs: !1
|
|
1477
|
-
}),
|
|
1491
|
+
}), Pn = /* @__PURE__ */ o("button")({
|
|
1478
1492
|
name: "l",
|
|
1479
1493
|
class: "l1bwp7hh",
|
|
1480
1494
|
propsAsIs: !1
|
|
1481
|
-
}),
|
|
1495
|
+
}), Wn = ({
|
|
1482
1496
|
openInsight: t,
|
|
1483
1497
|
questionId: e,
|
|
1484
1498
|
...s
|
|
1485
|
-
}) => /* @__PURE__ */
|
|
1486
|
-
/* @__PURE__ */ a(
|
|
1487
|
-
t && /* @__PURE__ */ a(
|
|
1499
|
+
}) => /* @__PURE__ */ y(Yn, { children: [
|
|
1500
|
+
/* @__PURE__ */ a(Pe, { questionId: e, ...s }),
|
|
1501
|
+
t && /* @__PURE__ */ a(Pn, { onClick: () => t(e), children: "View Insight" })
|
|
1488
1502
|
] });
|
|
1489
|
-
const
|
|
1503
|
+
const Fn = /* @__PURE__ */ o("div")({
|
|
1490
1504
|
name: "t",
|
|
1491
1505
|
class: "t19vr3p1",
|
|
1492
1506
|
propsAsIs: !1
|
|
1493
|
-
}),
|
|
1507
|
+
}), Vn = ({ questions: t, openQuestion: e }) => /* @__PURE__ */ a(Fn, { children: t == null ? void 0 : t.map((s) => {
|
|
1494
1508
|
var n, i;
|
|
1495
1509
|
if (s.type === "question" && ((n = s.attributes) == null ? void 0 : n.attributes.case) === "question") {
|
|
1496
1510
|
const u = s.attributes.attributes.value;
|
|
1497
|
-
return /* @__PURE__ */ a(
|
|
1511
|
+
return /* @__PURE__ */ a(qn, { openQuestion: e, ...u }, u.questionId);
|
|
1498
1512
|
}
|
|
1499
1513
|
if (s.type === "insight" && ((i = s.attributes) == null ? void 0 : i.attributes.case) === "insight") {
|
|
1500
1514
|
const u = s.attributes.attributes.value;
|
|
1501
|
-
return /* @__PURE__ */ a(
|
|
1515
|
+
return /* @__PURE__ */ a(Wn, { openInsight: e, ...u }, u.questionId);
|
|
1502
1516
|
}
|
|
1503
1517
|
return null;
|
|
1504
|
-
}) }),
|
|
1505
|
-
const s =
|
|
1506
|
-
return s != null && s.data ? /* @__PURE__ */ a(
|
|
1507
|
-
},
|
|
1518
|
+
}) }), Hn = ({ store: t, openQuestion: e }) => {
|
|
1519
|
+
const s = k(t);
|
|
1520
|
+
return s != null && s.data ? /* @__PURE__ */ a(Vn, { openQuestion: e, questions: s.data }) : /* @__PURE__ */ a("div", { children: "wait questions..." });
|
|
1521
|
+
}, Bn = ({ userSummary: t }) => {
|
|
1508
1522
|
var e;
|
|
1509
|
-
const s =
|
|
1510
|
-
return (e = s.data) != null && e.summary ? /* @__PURE__ */ a(
|
|
1511
|
-
},
|
|
1512
|
-
const [e, s] =
|
|
1513
|
-
return /* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */
|
|
1515
|
-
/* @__PURE__ */ a(
|
|
1516
|
-
e === Q.HOME && /* @__PURE__ */ a(
|
|
1523
|
+
const s = k(t.getStore());
|
|
1524
|
+
return (e = s.data) != null && e.summary ? /* @__PURE__ */ a(Ue, { ...s.data.summary, ...s.data.percentage }) : /* @__PURE__ */ a("div", { children: "wait user..." });
|
|
1525
|
+
}, Gn = ({ gamification: t }) => {
|
|
1526
|
+
const [e, s] = C(Q.HOME);
|
|
1527
|
+
return /* @__PURE__ */ y("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
1528
|
+
/* @__PURE__ */ y(Re, { children: [
|
|
1529
|
+
/* @__PURE__ */ a(Zs, { activePage: e, toggleActivePage: s }),
|
|
1530
|
+
e === Q.HOME && /* @__PURE__ */ a(Bn, { userSummary: t.userSummary })
|
|
1517
1531
|
] }),
|
|
1518
|
-
e === Q.HOME && /* @__PURE__ */ a(
|
|
1519
|
-
e === Q.LEADERBOARD && /* @__PURE__ */ a(
|
|
1532
|
+
e === Q.HOME && /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(Hn, { openQuestion: t.openQuestion, store: t.feedList.getStore() }) }),
|
|
1533
|
+
e === Q.LEADERBOARD && /* @__PURE__ */ a(ue, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ a(Dn, { openUser: t.openUser, leaderboardList: t.leaderboardList }) })
|
|
1520
1534
|
] });
|
|
1521
1535
|
};
|
|
1522
|
-
const
|
|
1536
|
+
const Zn = () => nt, Ee = /* @__PURE__ */ o(Zn())({
|
|
1523
1537
|
name: "e",
|
|
1524
1538
|
class: "e1ph66cs",
|
|
1525
1539
|
propsAsIs: !0
|
|
1526
|
-
}),
|
|
1540
|
+
}), Jn = /* @__PURE__ */ o("div")({
|
|
1527
1541
|
name: "x",
|
|
1528
1542
|
class: "xorme7i",
|
|
1529
1543
|
propsAsIs: !1
|
|
1530
|
-
}),
|
|
1544
|
+
}), ti = ({
|
|
1531
1545
|
gamification: t,
|
|
1532
1546
|
className: e
|
|
1533
1547
|
}) => {
|
|
1534
|
-
const s =
|
|
1535
|
-
return /* @__PURE__ */
|
|
1536
|
-
children: [s && /* @__PURE__ */ a(
|
|
1548
|
+
const s = k(t.openedQuestion.$store), n = k(t.openedUser);
|
|
1549
|
+
return /* @__PURE__ */ y(q, {
|
|
1550
|
+
children: [s && /* @__PURE__ */ a(Ee, {
|
|
1537
1551
|
className: e,
|
|
1538
|
-
children: /* @__PURE__ */ a(
|
|
1552
|
+
children: /* @__PURE__ */ a(Fs, {
|
|
1539
1553
|
gamification: t
|
|
1540
1554
|
})
|
|
1541
|
-
}), n && /* @__PURE__ */ a(
|
|
1555
|
+
}), n && /* @__PURE__ */ a(Ee, {
|
|
1542
1556
|
className: e,
|
|
1543
|
-
children: /* @__PURE__ */
|
|
1544
|
-
children: [/* @__PURE__ */ a(
|
|
1557
|
+
children: /* @__PURE__ */ y(Jn, {
|
|
1558
|
+
children: [/* @__PURE__ */ a($e, {
|
|
1545
1559
|
label: "Friend's Rank",
|
|
1546
1560
|
close: t.closeUser
|
|
1547
|
-
}), /* @__PURE__ */ a(
|
|
1548
|
-
children: /* @__PURE__ */ a(
|
|
1561
|
+
}), /* @__PURE__ */ a(Re, {
|
|
1562
|
+
children: /* @__PURE__ */ a(Ue, {
|
|
1549
1563
|
...n
|
|
1550
1564
|
})
|
|
1551
1565
|
})]
|
|
1552
1566
|
})
|
|
1553
|
-
}), /* @__PURE__ */ a(
|
|
1567
|
+
}), /* @__PURE__ */ a(Le, {
|
|
1554
1568
|
className: e,
|
|
1555
1569
|
"data-nav": "true",
|
|
1556
|
-
children: /* @__PURE__ */ a(
|
|
1570
|
+
children: /* @__PURE__ */ a(Gn, {
|
|
1557
1571
|
gamification: t
|
|
1558
1572
|
})
|
|
1559
1573
|
})]
|
|
1560
1574
|
});
|
|
1561
1575
|
};
|
|
1562
1576
|
export {
|
|
1563
|
-
|
|
1564
|
-
|
|
1577
|
+
ti as GamificationOverlay,
|
|
1578
|
+
ti as default
|
|
1565
1579
|
};
|