@streamlayer/react 0.29.2 → 0.29.4
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-b0e4fdb9.js → index-660952d7.js} +584 -570
- package/lib/dist/index-72e4d21b.cjs +1 -0
- package/lib/dist/index.d.ts +7 -0
- package/lib/dist/masters-7ea5d23e.cjs +29 -0
- package/lib/dist/{masters-7a8328b4.js → masters-8c4e7068.js} +4311 -4044
- package/lib/dist/style.css +29 -3
- package/lib/es/masters.js +2 -2
- package/lib/es/points.js +3 -3
- package/lib/{index-05d85ab5.js → index-616b0bcd.js} +167 -115
- package/lib/index-b0206045.cjs +1 -0
- package/lib/index-eb5039cd.cjs +6 -0
- package/lib/{index-ee3edaf5.js → index-efde52fd.js} +825 -811
- package/lib/masters-05fe9e78.cjs +1 -0
- package/lib/masters-e142c21e.js +608 -0
- package/lib/style.css +1 -1
- package/package.json +2 -2
- package/lib/dist/index-59e97bed.cjs +0 -1
- package/lib/dist/masters-ac060b87.cjs +0 -29
- package/lib/index-6b61558d.cjs +0 -1
- package/lib/index-d229838f.cjs +0 -6
- package/lib/masters-84cfeac0.cjs +0 -1
- package/lib/masters-bec9cb07.js +0 -400
|
@@ -1,212 +1,212 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as I,
|
|
1
|
+
import { jsxs as v, jsx as f, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { s as I, C as V } from "./index-616b0bcd.js";
|
|
3
3
|
import { useStore as ie } from "@nanostores/react";
|
|
4
|
-
import { o as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { QuestionType as
|
|
7
|
-
import { o as
|
|
8
|
-
import { CountdownCircleTimer as
|
|
9
|
-
import { E as
|
|
4
|
+
import { o as Et, r as Tt, w as Vt, e as Nt, n as st, f as Ht } from "./masters-e142c21e.js";
|
|
5
|
+
import { useState as xe, useCallback as We, useMemo as Se, Component as Gt, createElement as ze, PureComponent as _t } from "react";
|
|
6
|
+
import { QuestionType as P, QuestionStatus as we, QuestionImages as ue, PickHistoryStatus as _e } from "@streamlayer/sdk-web-types";
|
|
7
|
+
import { o as vt, i as St, r as Zt, a as Jt, n as Kt } from "./common-2d2a3ba3.js";
|
|
8
|
+
import { CountdownCircleTimer as Xt } from "react-countdown-circle-timer";
|
|
9
|
+
import { E as de } from "./index-0d23b24e.js";
|
|
10
10
|
import "@streamlayer/sdk-web-interfaces";
|
|
11
11
|
import "@streamlayer/sdk-web-notifications";
|
|
12
12
|
import "./es/useStreamLayerApp.js";
|
|
13
13
|
import "@streamlayer/sdk-web";
|
|
14
|
-
const
|
|
14
|
+
const er = () => V, tr = () => V, rr = /* @__PURE__ */ I("div")({
|
|
15
15
|
name: "a",
|
|
16
16
|
class: "acysrl1",
|
|
17
17
|
propsAsIs: !1
|
|
18
|
-
}),
|
|
18
|
+
}), ir = /* @__PURE__ */ I("div")({
|
|
19
19
|
name: "l",
|
|
20
20
|
class: "lo57cjm",
|
|
21
21
|
propsAsIs: !1
|
|
22
|
-
}),
|
|
22
|
+
}), nr = /* @__PURE__ */ I(er())({
|
|
23
23
|
name: "p",
|
|
24
24
|
class: "p14kwh4y",
|
|
25
25
|
propsAsIs: !0
|
|
26
|
-
}),
|
|
26
|
+
}), sr = /* @__PURE__ */ I("span")({
|
|
27
27
|
name: "s",
|
|
28
28
|
class: "sxun7sq",
|
|
29
29
|
propsAsIs: !1
|
|
30
|
-
}),
|
|
30
|
+
}), or = /* @__PURE__ */ I("button")({
|
|
31
31
|
name: "c",
|
|
32
32
|
class: "c1i8ida8",
|
|
33
33
|
propsAsIs: !1
|
|
34
|
-
}),
|
|
34
|
+
}), ar = /* @__PURE__ */ I(tr())({
|
|
35
35
|
name: "g",
|
|
36
36
|
class: "g1m0xfmw",
|
|
37
37
|
propsAsIs: !0
|
|
38
|
-
}),
|
|
39
|
-
const c = i ?
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
(c == null ? void 0 : c.iconName) && /* @__PURE__ */
|
|
43
|
-
(c == null ? void 0 : c.label) && /* @__PURE__ */
|
|
38
|
+
}), zt = ({ type: i, close: n, label: a }) => {
|
|
39
|
+
const c = i ? Et[i] : { label: a, iconName: void 0 };
|
|
40
|
+
return /* @__PURE__ */ v(rr, { children: [
|
|
41
|
+
/* @__PURE__ */ v(ir, { children: [
|
|
42
|
+
(c == null ? void 0 : c.iconName) && /* @__PURE__ */ f(nr, { name: c.iconName }),
|
|
43
|
+
(c == null ? void 0 : c.label) && /* @__PURE__ */ f(sr, { children: c.label })
|
|
44
44
|
] }),
|
|
45
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ f(or, { onClick: n, children: /* @__PURE__ */ f(ar, { name: "icon-cross" }) })
|
|
46
46
|
] });
|
|
47
47
|
};
|
|
48
|
-
const
|
|
48
|
+
const lr = /* @__PURE__ */ I("div")({
|
|
49
49
|
name: "t",
|
|
50
50
|
class: "taj61ja",
|
|
51
51
|
propsAsIs: !1
|
|
52
|
-
}),
|
|
52
|
+
}), cr = /* @__PURE__ */ I("div")({
|
|
53
53
|
name: "r",
|
|
54
54
|
class: "r19fxewd",
|
|
55
55
|
propsAsIs: !1
|
|
56
|
-
}),
|
|
56
|
+
}), ur = /* @__PURE__ */ I("div")({
|
|
57
57
|
name: "i",
|
|
58
58
|
class: "i1whkbqh",
|
|
59
59
|
propsAsIs: !1
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
60
|
+
}), ot = ({ indicator: i, title: n }) => /* @__PURE__ */ v(lr, { children: [
|
|
61
|
+
/* @__PURE__ */ f(cr, { children: n }),
|
|
62
|
+
/* @__PURE__ */ f(ur, { children: i })
|
|
63
63
|
] });
|
|
64
|
-
const
|
|
64
|
+
const dr = /* @__PURE__ */ I("div")({
|
|
65
65
|
name: "i",
|
|
66
66
|
class: "i4lbhzs",
|
|
67
67
|
propsAsIs: !1
|
|
68
|
-
}),
|
|
68
|
+
}), hr = /* @__PURE__ */ I("div")({
|
|
69
69
|
name: "o",
|
|
70
70
|
class: "ordquhq",
|
|
71
71
|
propsAsIs: !1
|
|
72
|
-
}),
|
|
72
|
+
}), pr = /* @__PURE__ */ I("div")({
|
|
73
73
|
name: "n",
|
|
74
74
|
class: "nwzed99",
|
|
75
75
|
propsAsIs: !1
|
|
76
|
-
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
76
|
+
}), ve = ({ indicator: i, title: n }) => /* @__PURE__ */ v(dr, { children: [
|
|
77
|
+
/* @__PURE__ */ f(hr, { children: i }),
|
|
78
|
+
/* @__PURE__ */ f(pr, { children: n })
|
|
79
79
|
] });
|
|
80
|
-
const
|
|
80
|
+
const fr = /* @__PURE__ */ I("div")({
|
|
81
81
|
name: "o",
|
|
82
82
|
class: "o15y0waw",
|
|
83
83
|
propsAsIs: !1
|
|
84
|
-
}),
|
|
84
|
+
}), mr = /* @__PURE__ */ I("div")({
|
|
85
85
|
name: "i",
|
|
86
86
|
class: "ihjewwf",
|
|
87
87
|
propsAsIs: !1
|
|
88
|
-
}),
|
|
88
|
+
}), gr = /* @__PURE__ */ I("div")({
|
|
89
89
|
name: "n",
|
|
90
90
|
class: "n10e9lv8",
|
|
91
91
|
propsAsIs: !1
|
|
92
|
-
}),
|
|
92
|
+
}), Ir = /* @__PURE__ */ I("div")({
|
|
93
93
|
name: "r",
|
|
94
94
|
class: "r13bxv",
|
|
95
95
|
propsAsIs: !1
|
|
96
|
-
}),
|
|
96
|
+
}), yr = /* @__PURE__ */ I("img")({
|
|
97
97
|
name: "a",
|
|
98
98
|
class: "a1fi59c9",
|
|
99
99
|
propsAsIs: !1
|
|
100
|
-
}),
|
|
100
|
+
}), xr = /* @__PURE__ */ I("div")({
|
|
101
101
|
name: "s",
|
|
102
102
|
class: "s1kkihge",
|
|
103
103
|
propsAsIs: !1
|
|
104
|
-
}),
|
|
104
|
+
}), wr = /* @__PURE__ */ I("div")({
|
|
105
105
|
name: "c",
|
|
106
106
|
class: "cy4f4t",
|
|
107
107
|
propsAsIs: !1
|
|
108
|
-
}),
|
|
108
|
+
}), Mr = /* @__PURE__ */ I("div")({
|
|
109
109
|
name: "p",
|
|
110
110
|
class: "p18cnlx1",
|
|
111
111
|
propsAsIs: !1
|
|
112
|
-
}),
|
|
112
|
+
}), Ar = /* @__PURE__ */ I("img")({
|
|
113
113
|
name: "l",
|
|
114
114
|
class: "lboqgs5",
|
|
115
115
|
propsAsIs: !1
|
|
116
|
-
}),
|
|
116
|
+
}), Er = /* @__PURE__ */ I("div")({
|
|
117
117
|
name: "d",
|
|
118
118
|
class: "d1oaal4",
|
|
119
119
|
propsAsIs: !1
|
|
120
|
-
}),
|
|
120
|
+
}), Tr = /* @__PURE__ */ I("div")({
|
|
121
121
|
name: "x",
|
|
122
122
|
class: "x1yzgo0u",
|
|
123
123
|
propsAsIs: !1
|
|
124
|
-
}),
|
|
124
|
+
}), Nr = /* @__PURE__ */ I("div")({
|
|
125
125
|
name: "f",
|
|
126
126
|
class: "f1l9i8s8",
|
|
127
127
|
propsAsIs: !1
|
|
128
|
-
}),
|
|
128
|
+
}), _r = /* @__PURE__ */ I("div")({
|
|
129
129
|
name: "g",
|
|
130
130
|
class: "g4cgl4u",
|
|
131
131
|
propsAsIs: !1
|
|
132
|
-
}),
|
|
132
|
+
}), vr = /* @__PURE__ */ I("div")({
|
|
133
133
|
name: "h",
|
|
134
134
|
class: "h1qn1tmd",
|
|
135
135
|
propsAsIs: !1
|
|
136
|
-
}),
|
|
136
|
+
}), Sr = /* @__PURE__ */ I("div")({
|
|
137
137
|
name: "u",
|
|
138
138
|
class: "u1gsbhq4",
|
|
139
139
|
propsAsIs: !1
|
|
140
|
-
}),
|
|
140
|
+
}), zr = /* @__PURE__ */ I("div")({
|
|
141
141
|
name: "m",
|
|
142
142
|
class: "mvj8oco",
|
|
143
143
|
propsAsIs: !1
|
|
144
|
-
}),
|
|
144
|
+
}), Dr = /* @__PURE__ */ I("button")({
|
|
145
145
|
name: "v",
|
|
146
146
|
class: "viqiaf2",
|
|
147
147
|
propsAsIs: !1
|
|
148
|
-
}),
|
|
148
|
+
}), br = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=", Dt = ({
|
|
149
149
|
avatar: i,
|
|
150
150
|
name: n,
|
|
151
151
|
points: a,
|
|
152
152
|
friendsRank: c,
|
|
153
|
-
rank:
|
|
153
|
+
rank: d,
|
|
154
154
|
streak: g,
|
|
155
|
-
correct:
|
|
155
|
+
correct: m,
|
|
156
156
|
incorrect: o,
|
|
157
|
-
inTop:
|
|
158
|
-
average:
|
|
159
|
-
}) => /* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
i && /* @__PURE__ */
|
|
163
|
-
!i && /* @__PURE__ */
|
|
157
|
+
inTop: y,
|
|
158
|
+
average: T
|
|
159
|
+
}) => /* @__PURE__ */ v(fr, { children: [
|
|
160
|
+
/* @__PURE__ */ f(mr, { children: /* @__PURE__ */ v(Ir, { children: [
|
|
161
|
+
/* @__PURE__ */ v(Dr, { children: [
|
|
162
|
+
i && /* @__PURE__ */ f(yr, { alt: "avatar", src: i }),
|
|
163
|
+
!i && /* @__PURE__ */ f(zr, { children: vt(n || "") })
|
|
164
164
|
] }),
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
|
|
172
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ v(xr, { children: [
|
|
166
|
+
/* @__PURE__ */ f(wr, { children: n }),
|
|
167
|
+
/* @__PURE__ */ v(Mr, { children: [
|
|
168
|
+
/* @__PURE__ */ v(Er, { children: [
|
|
169
|
+
/* @__PURE__ */ f(Ar, { alt: "rank-icon", src: br }),
|
|
170
|
+
/* @__PURE__ */ v(Tr, { children: [
|
|
171
|
+
St(a),
|
|
172
|
+
/* @__PURE__ */ f(Nr, { children: "PTS" })
|
|
173
173
|
] })
|
|
174
174
|
] }),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ f(_r, {}),
|
|
176
|
+
/* @__PURE__ */ v("div", { children: [
|
|
177
177
|
"TOP ",
|
|
178
|
-
|
|
178
|
+
y || 0,
|
|
179
179
|
"%"
|
|
180
180
|
] })
|
|
181
181
|
] })
|
|
182
182
|
] })
|
|
183
183
|
] }) }),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ v(gr, { children: [
|
|
185
|
+
/* @__PURE__ */ v(vr, { children: [
|
|
186
|
+
/* @__PURE__ */ f(ot, { indicator: c || 0, title: "Friends rank" }),
|
|
187
|
+
/* @__PURE__ */ f(ot, { indicator: d || 0, title: "Global rank" })
|
|
188
188
|
] }),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ v(Sr, { children: [
|
|
190
|
+
/* @__PURE__ */ f(ve, { indicator: g || 0, title: "Win streak" }),
|
|
191
|
+
/* @__PURE__ */ f(ve, { indicator: m || 0, title: "Correct" }),
|
|
192
|
+
/* @__PURE__ */ f(ve, { indicator: o || 0, title: "Incorrect" }),
|
|
193
|
+
/* @__PURE__ */ f(ve, { indicator: `${T || 0}%`, title: "Succ. rate" })
|
|
194
194
|
] })
|
|
195
195
|
] })
|
|
196
196
|
] });
|
|
197
|
-
const
|
|
197
|
+
const Or = () => V, Br = /* @__PURE__ */ I("div")({
|
|
198
198
|
name: "c",
|
|
199
199
|
class: "ciyeb68",
|
|
200
200
|
propsAsIs: !1
|
|
201
|
-
}),
|
|
201
|
+
}), Rr = /* @__PURE__ */ I(Or())({
|
|
202
202
|
name: "n",
|
|
203
203
|
class: "nfic4xc",
|
|
204
204
|
propsAsIs: !0
|
|
205
|
-
}),
|
|
205
|
+
}), at = /* @__PURE__ */ I("div")({
|
|
206
206
|
name: "d",
|
|
207
207
|
class: "d1pd1p66",
|
|
208
208
|
propsAsIs: !1
|
|
209
|
-
}),
|
|
209
|
+
}), lt = /* @__PURE__ */ I("div")({
|
|
210
210
|
name: "p",
|
|
211
211
|
class: "p132yxcv",
|
|
212
212
|
propsAsIs: !1
|
|
@@ -214,158 +214,171 @@ const Dr = () => J, br = /* @__PURE__ */ I("div")({
|
|
|
214
214
|
name: "l",
|
|
215
215
|
class: "l4a8aw",
|
|
216
216
|
propsAsIs: !1
|
|
217
|
-
}),
|
|
217
|
+
}), je = /* @__PURE__ */ I("span")({
|
|
218
218
|
name: "g",
|
|
219
219
|
class: "gzdx7pk",
|
|
220
220
|
propsAsIs: !1
|
|
221
|
-
}), Cr = ({
|
|
221
|
+
}), Cr = /* @__PURE__ */ I("div")({
|
|
222
|
+
name: "s",
|
|
223
|
+
class: "smnc4zm",
|
|
224
|
+
propsAsIs: !1
|
|
225
|
+
}), kr = ({
|
|
222
226
|
feedbackMessages: i,
|
|
223
227
|
questionVotedCorrectly: n,
|
|
224
228
|
questionVoted: a,
|
|
225
229
|
questionType: c,
|
|
226
|
-
hasCorrectAnswer:
|
|
230
|
+
hasCorrectAnswer: d,
|
|
231
|
+
questionStatus: g
|
|
227
232
|
}) => {
|
|
228
|
-
|
|
233
|
+
const m = a && (c === P.TRIVIA || c === P.PREDICTION);
|
|
234
|
+
if (!m && g !== we.RESOLVED)
|
|
229
235
|
return null;
|
|
230
|
-
const
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
g && /* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */
|
|
236
|
+
const o = c === P.PREDICTION && !d, y = n ? "correct" : "incorrect", T = n ? i.correctFeedback : i.incorrectFeedback;
|
|
237
|
+
return /* @__PURE__ */ v(Br, { "data-isPrediction": o, children: [
|
|
238
|
+
g === we.RESOLVED && c === P.TRIVIA && !a && /* @__PURE__ */ v(ye, { children: [
|
|
239
|
+
/* @__PURE__ */ f(at, { children: /* @__PURE__ */ f(V, { name: "questionExpired" }) }),
|
|
240
|
+
/* @__PURE__ */ v("div", { children: [
|
|
241
|
+
/* @__PURE__ */ f(lt, { children: /* @__PURE__ */ f(je, { children: "Question Expired" }) }),
|
|
242
|
+
/* @__PURE__ */ f(Cr, { children: "You can still answer to see if you're correct, but no points are awarded for expired questions." })
|
|
243
|
+
] })
|
|
235
244
|
] }),
|
|
236
|
-
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
|
|
240
|
-
|
|
245
|
+
m && o && /* @__PURE__ */ v(ye, { children: [
|
|
246
|
+
/* @__PURE__ */ f(Rr, { name: "icon-prediction" }),
|
|
247
|
+
/* @__PURE__ */ f(je, { children: "Stay tuned to see if your prediction was correct." })
|
|
248
|
+
] }),
|
|
249
|
+
m && d && /* @__PURE__ */ v(ye, { children: [
|
|
250
|
+
/* @__PURE__ */ f(at, { "data-feedbackType": y, children: /* @__PURE__ */ f(V, { name: y }) }),
|
|
251
|
+
/* @__PURE__ */ f("div", { children: /* @__PURE__ */ v(lt, { children: [
|
|
252
|
+
/* @__PURE__ */ f(Lr, { "data-feedbackType": y, children: T == null ? void 0 : T.title }),
|
|
253
|
+
/* @__PURE__ */ f(je, { children: T == null ? void 0 : T.description })
|
|
241
254
|
] }) })
|
|
242
255
|
] })
|
|
243
256
|
] });
|
|
244
257
|
};
|
|
245
|
-
const
|
|
258
|
+
const Ur = /* @__PURE__ */ I("div")({
|
|
246
259
|
name: "o",
|
|
247
260
|
class: "olc1eph",
|
|
248
261
|
propsAsIs: !1
|
|
249
|
-
}),
|
|
262
|
+
}), jr = /* @__PURE__ */ I("div")({
|
|
250
263
|
name: "n",
|
|
251
264
|
class: "n1yoh29a",
|
|
252
265
|
propsAsIs: !1
|
|
253
|
-
}),
|
|
266
|
+
}), Fr = /* @__PURE__ */ I("div")({
|
|
254
267
|
name: "p",
|
|
255
268
|
class: "pjkr5mb",
|
|
256
269
|
propsAsIs: !1
|
|
257
|
-
}),
|
|
270
|
+
}), $r = /* @__PURE__ */ I("div")({
|
|
258
271
|
name: "r",
|
|
259
272
|
class: "r82wnnx",
|
|
260
273
|
propsAsIs: !1
|
|
261
274
|
});
|
|
262
|
-
const
|
|
275
|
+
const Qr = () => bt, Pr = () => bt, qr = () => V, Yr = /* @__PURE__ */ I("button")({
|
|
263
276
|
name: "c",
|
|
264
277
|
class: "cpm4u8k",
|
|
265
278
|
propsAsIs: !1
|
|
266
|
-
}),
|
|
279
|
+
}), Wr = /* @__PURE__ */ I("div")({
|
|
267
280
|
name: "l",
|
|
268
281
|
class: "lwfomc3",
|
|
269
282
|
propsAsIs: !1
|
|
270
|
-
}),
|
|
283
|
+
}), Vr = /* @__PURE__ */ I("span")({
|
|
271
284
|
name: "d",
|
|
272
285
|
class: "dmltvg2",
|
|
273
286
|
propsAsIs: !1
|
|
274
|
-
}),
|
|
287
|
+
}), Hr = /* @__PURE__ */ I("div")({
|
|
275
288
|
name: "s",
|
|
276
289
|
class: "stfjpqz",
|
|
277
290
|
propsAsIs: !1
|
|
278
|
-
}),
|
|
291
|
+
}), Gr = /* @__PURE__ */ I("div")({
|
|
279
292
|
name: "p",
|
|
280
293
|
class: "p198m24r",
|
|
281
294
|
propsAsIs: !1
|
|
282
|
-
}),
|
|
295
|
+
}), bt = /* @__PURE__ */ I("img")({
|
|
283
296
|
name: "r",
|
|
284
297
|
class: "rbq5eu7",
|
|
285
298
|
propsAsIs: !1
|
|
286
|
-
}),
|
|
299
|
+
}), Zr = /* @__PURE__ */ I(Qr())({
|
|
287
300
|
name: "g",
|
|
288
301
|
class: "g1iv6oeb",
|
|
289
302
|
propsAsIs: !0
|
|
290
|
-
}),
|
|
303
|
+
}), Jr = /* @__PURE__ */ I(Pr())({
|
|
291
304
|
name: "h",
|
|
292
305
|
class: "h1qtxlqc",
|
|
293
306
|
propsAsIs: !0
|
|
294
|
-
}),
|
|
307
|
+
}), Kr = /* @__PURE__ */ I("span")({
|
|
295
308
|
name: "u",
|
|
296
309
|
class: "udm736q",
|
|
297
310
|
propsAsIs: !1
|
|
298
|
-
}),
|
|
311
|
+
}), Xr = /* @__PURE__ */ I("span")({
|
|
299
312
|
name: "b",
|
|
300
313
|
class: "b1da34tx",
|
|
301
314
|
propsAsIs: !1
|
|
302
|
-
}),
|
|
315
|
+
}), ei = /* @__PURE__ */ I("span")({
|
|
303
316
|
name: "x",
|
|
304
317
|
class: "x1dqwq83",
|
|
305
318
|
propsAsIs: !1
|
|
306
|
-
}),
|
|
319
|
+
}), ti = /* @__PURE__ */ I(qr())({
|
|
307
320
|
name: "v",
|
|
308
321
|
class: "v10s9my2",
|
|
309
322
|
propsAsIs: !0
|
|
310
|
-
}),
|
|
311
|
-
[ue.CENTERED]: (i) => /* @__PURE__ */
|
|
312
|
-
[ue.TRANSPARENT]: (i) => /* @__PURE__ */
|
|
313
|
-
[ue.ROUNDED]: (i) => /* @__PURE__ */
|
|
323
|
+
}), ct = {
|
|
324
|
+
[ue.CENTERED]: (i) => /* @__PURE__ */ f(Zr, { alt: "option-icon", src: i }),
|
|
325
|
+
[ue.TRANSPARENT]: (i) => /* @__PURE__ */ f(Hr, { children: /* @__PURE__ */ f(Gr, { style: { backgroundImage: `url(${i})` } }) }),
|
|
326
|
+
[ue.ROUNDED]: (i) => /* @__PURE__ */ f(Jr, { alt: "option-icon", src: i }),
|
|
314
327
|
[ue.NONE]: () => null,
|
|
315
328
|
[ue.UNSET]: () => null
|
|
316
|
-
},
|
|
317
|
-
if (i ===
|
|
329
|
+
}, ri = ({ questionType: i, hasCorrectAnswer: n, correct: a, youVoted: c, questionVoted: d }) => {
|
|
330
|
+
if (i === P.POLL && c)
|
|
318
331
|
return "correct";
|
|
319
|
-
if (i ===
|
|
320
|
-
if (n &&
|
|
332
|
+
if (i === P.PREDICTION) {
|
|
333
|
+
if (n && d)
|
|
321
334
|
return c ? a ? "correct" : "incorrect" : a ? "correct" : "unset";
|
|
322
335
|
if (c)
|
|
323
336
|
return "correct";
|
|
324
337
|
}
|
|
325
|
-
return i ===
|
|
326
|
-
},
|
|
338
|
+
return i === P.TRIVIA && d ? c ? a ? "correct" : "incorrect" : a ? "correct" : "unset" : "unset";
|
|
339
|
+
}, ii = ({
|
|
327
340
|
questionType: i,
|
|
328
341
|
questionVoted: n,
|
|
329
342
|
correct: a,
|
|
330
343
|
hasCorrectAnswer: c,
|
|
331
|
-
questionStatus:
|
|
332
|
-
}) => i ===
|
|
344
|
+
questionStatus: d
|
|
345
|
+
}) => i === P.TRIVIA ? n && a : i === P.PREDICTION ? n && a && c || d === we.RESOLVED && a : !1, ni = (i) => {
|
|
333
346
|
var n;
|
|
334
347
|
const {
|
|
335
348
|
// option props
|
|
336
349
|
id: a,
|
|
337
350
|
icon: c,
|
|
338
|
-
text:
|
|
351
|
+
text: d,
|
|
339
352
|
percentageDecimal: g,
|
|
340
353
|
// extra props
|
|
341
|
-
onVote:
|
|
354
|
+
onVote: m,
|
|
342
355
|
youSelected: o,
|
|
343
|
-
questionVoted:
|
|
356
|
+
questionVoted: y,
|
|
344
357
|
// ToDo: Figure out why imageMode is not in the response, and delete default value
|
|
345
|
-
imageMode:
|
|
358
|
+
imageMode: T = ue.ROUNDED,
|
|
346
359
|
answerTimeExpired: _,
|
|
347
|
-
questionStatus:
|
|
348
|
-
isLoading:
|
|
360
|
+
questionStatus: S,
|
|
361
|
+
isLoading: x,
|
|
349
362
|
questionType: E,
|
|
350
|
-
correct:
|
|
351
|
-
hasCorrectAnswer:
|
|
352
|
-
} = i, M =
|
|
353
|
-
return /* @__PURE__ */
|
|
363
|
+
correct: N,
|
|
364
|
+
hasCorrectAnswer: h
|
|
365
|
+
} = i, M = ri(i), w = ii({ questionType: E, questionVoted: y, correct: N, hasCorrectAnswer: h, questionStatus: S }), A = y || S === we.RESOLVED && E === P.PREDICTION;
|
|
366
|
+
return /* @__PURE__ */ v(
|
|
354
367
|
Yr,
|
|
355
368
|
{
|
|
356
369
|
value: a,
|
|
357
370
|
"data-selected": o,
|
|
358
371
|
"data-answerState": M,
|
|
359
|
-
disabled:
|
|
360
|
-
onClick:
|
|
372
|
+
disabled: y || x || _,
|
|
373
|
+
onClick: m,
|
|
361
374
|
children: [
|
|
362
|
-
A && /* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
c && ((n =
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
A && /* @__PURE__ */
|
|
367
|
-
|
|
368
|
-
/* @__PURE__ */
|
|
375
|
+
A && /* @__PURE__ */ f(Wr, { "data-answerState": M, style: { width: `${g}%` } }),
|
|
376
|
+
/* @__PURE__ */ v(Vr, { children: [
|
|
377
|
+
c && ((n = ct[T]) == null ? void 0 : n.call(ct, c)),
|
|
378
|
+
/* @__PURE__ */ f(Kr, { children: d }),
|
|
379
|
+
A && /* @__PURE__ */ v(Xr, { children: [
|
|
380
|
+
w && /* @__PURE__ */ f(ti, { name: "selected" }),
|
|
381
|
+
/* @__PURE__ */ v(ei, { children: [
|
|
369
382
|
g,
|
|
370
383
|
"%"
|
|
371
384
|
] })
|
|
@@ -375,203 +388,204 @@ const $r = () => St, Qr = () => St, Pr = () => J, Yr = /* @__PURE__ */ I("button
|
|
|
375
388
|
}
|
|
376
389
|
);
|
|
377
390
|
};
|
|
378
|
-
const
|
|
391
|
+
const si = [de.PRIMARY_GREEN1, de.SECONDARY_RED1, de.SECONDARY_RED1], oi = [10, 10, 0], ai = /* @__PURE__ */ I("div")({
|
|
379
392
|
name: "A",
|
|
380
393
|
class: "a1f928zy",
|
|
381
394
|
propsAsIs: !1
|
|
382
|
-
}),
|
|
395
|
+
}), li = de.SECONDARY_GREEN6, ut = de.SECONDARY_RED3, ci = de.NEUTRALS_GRAY3, ui = ({
|
|
383
396
|
isPlaying: i = !0,
|
|
384
397
|
duration: n = 30,
|
|
385
398
|
onTimerExpired: a
|
|
386
399
|
}) => {
|
|
387
|
-
const [c,
|
|
388
|
-
remainingTime:
|
|
389
|
-
}) => /* @__PURE__ */
|
|
390
|
-
children:
|
|
391
|
-
}),
|
|
392
|
-
a == null || a(),
|
|
393
|
-
}, [a,
|
|
394
|
-
|
|
395
|
-
}, [
|
|
396
|
-
return /* @__PURE__ */
|
|
400
|
+
const [c, d] = xe(n > 10 ? li : ut), g = ({
|
|
401
|
+
remainingTime: y
|
|
402
|
+
}) => /* @__PURE__ */ f(ai, {
|
|
403
|
+
children: y
|
|
404
|
+
}), m = We(() => {
|
|
405
|
+
a == null || a(), d(ci);
|
|
406
|
+
}, [a, d]), o = We((y) => {
|
|
407
|
+
y === 10 && d(ut);
|
|
408
|
+
}, [d]);
|
|
409
|
+
return /* @__PURE__ */ f(Xt, {
|
|
397
410
|
isPlaying: i,
|
|
398
411
|
duration: n,
|
|
399
|
-
colors:
|
|
400
|
-
colorsTime:
|
|
412
|
+
colors: si,
|
|
413
|
+
colorsTime: oi,
|
|
401
414
|
size: 32,
|
|
402
415
|
strokeWidth: 2,
|
|
403
416
|
trailStrokeWidth: 2,
|
|
404
417
|
trailColor: c,
|
|
405
|
-
onComplete:
|
|
418
|
+
onComplete: m,
|
|
406
419
|
onUpdate: o,
|
|
407
420
|
children: g
|
|
408
421
|
});
|
|
409
422
|
};
|
|
410
|
-
const
|
|
423
|
+
const di = () => V, hi = /* @__PURE__ */ I("div")({
|
|
411
424
|
name: "a",
|
|
412
425
|
class: "a1r7f3z4",
|
|
413
426
|
propsAsIs: !1
|
|
414
|
-
}),
|
|
427
|
+
}), pi = /* @__PURE__ */ I("div")({
|
|
415
428
|
name: "s",
|
|
416
429
|
class: "sblndl",
|
|
417
430
|
propsAsIs: !1
|
|
418
|
-
}),
|
|
431
|
+
}), fi = /* @__PURE__ */ I("div")({
|
|
419
432
|
name: "l",
|
|
420
433
|
class: "l7ka1tv",
|
|
421
434
|
propsAsIs: !1
|
|
422
|
-
}),
|
|
435
|
+
}), mi = /* @__PURE__ */ I(di())({
|
|
423
436
|
name: "p",
|
|
424
437
|
class: "p1edlxt3",
|
|
425
438
|
propsAsIs: !0
|
|
426
|
-
}),
|
|
439
|
+
}), gi = /* @__PURE__ */ I("div")({
|
|
427
440
|
name: "g",
|
|
428
441
|
class: "ghm08u2",
|
|
429
442
|
propsAsIs: !1
|
|
430
|
-
}),
|
|
443
|
+
}), Ii = /* @__PURE__ */ I("span")({
|
|
431
444
|
name: "c",
|
|
432
445
|
class: "c12nsh46",
|
|
433
446
|
propsAsIs: !1
|
|
434
|
-
}),
|
|
447
|
+
}), yi = /* @__PURE__ */ I("span")({
|
|
435
448
|
name: "d",
|
|
436
449
|
class: "dlr9eoc",
|
|
437
450
|
propsAsIs: !1
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
i && /* @__PURE__ */
|
|
441
|
-
n !== void 0 && /* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
451
|
+
}), xi = ({ title: i, points: n, isPlayingTimer: a, isTimer: c, onTimerExpired: d }) => /* @__PURE__ */ v(hi, { children: [
|
|
452
|
+
/* @__PURE__ */ v(pi, { children: [
|
|
453
|
+
i && /* @__PURE__ */ f(fi, { children: i }),
|
|
454
|
+
n !== void 0 && /* @__PURE__ */ v(ye, { children: [
|
|
455
|
+
/* @__PURE__ */ f(mi, { name: "icon-trophy" }),
|
|
456
|
+
/* @__PURE__ */ v(gi, { children: [
|
|
457
|
+
/* @__PURE__ */ f(Ii, { children: n }),
|
|
458
|
+
/* @__PURE__ */ f(yi, { children: "PTS" })
|
|
446
459
|
] })
|
|
447
460
|
] })
|
|
448
461
|
] }),
|
|
449
|
-
c && /* @__PURE__ */
|
|
450
|
-
] }),
|
|
462
|
+
c && /* @__PURE__ */ f(ui, { isPlaying: a, onTimerExpired: d })
|
|
463
|
+
] }), wi = ({ openedQuestion: i, vote: n }) => {
|
|
451
464
|
var a;
|
|
452
|
-
const c = i.subject,
|
|
465
|
+
const c = i.subject, d = i.type, g = (a = i.options) == null ? void 0 : a.options, [m, o] = xe(!1), [y, T] = xe(!1), [_, S] = xe(""), x = i == null ? void 0 : i.id, E = We(
|
|
453
466
|
async (A) => {
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
456
|
-
|
|
467
|
+
if (x) {
|
|
468
|
+
const z = A.currentTarget.value;
|
|
469
|
+
S(z), T(!0), await n(x, z), T(!1);
|
|
457
470
|
}
|
|
458
471
|
},
|
|
459
|
-
[
|
|
460
|
-
),
|
|
472
|
+
[x, S, n]
|
|
473
|
+
), N = Se(
|
|
461
474
|
() => i == null ? void 0 : i.answers.find((A) => A.youVoted === !0),
|
|
462
475
|
[i]
|
|
463
|
-
),
|
|
476
|
+
), h = Se(
|
|
464
477
|
() => !!(i != null && i.answers.find((A) => A.correct === !0)),
|
|
465
478
|
[i]
|
|
466
|
-
), M =
|
|
479
|
+
), M = Se(() => i ? i.answers.map((A) => ({
|
|
467
480
|
...A,
|
|
468
|
-
questionVoted: !!
|
|
481
|
+
questionVoted: !!N,
|
|
469
482
|
youSelected: _ === A.id,
|
|
470
|
-
isLoading:
|
|
471
|
-
hasCorrectAnswer:
|
|
483
|
+
isLoading: y,
|
|
484
|
+
hasCorrectAnswer: h,
|
|
472
485
|
questionType: i.type,
|
|
473
|
-
answerTimeExpired:
|
|
486
|
+
answerTimeExpired: m,
|
|
474
487
|
questionStatus: i.status,
|
|
475
488
|
// ToDo: Figure out why imageMode is not in the response
|
|
476
489
|
onVote: E
|
|
477
|
-
})) : [], [
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
-
|
|
480
|
-
|
|
490
|
+
})) : [], [h, m, y, i, N, E, _]), w = g && (g.case === "trivia" || g.case === "prediction") ? g.value : void 0;
|
|
491
|
+
return /* @__PURE__ */ f(Tt, { "data-question-header": "true", children: /* @__PURE__ */ f(Ur, { children: /* @__PURE__ */ v(jr, { children: [
|
|
492
|
+
w && /* @__PURE__ */ f(
|
|
493
|
+
kr,
|
|
481
494
|
{
|
|
482
|
-
feedbackMessages:
|
|
483
|
-
questionVoted: !!
|
|
484
|
-
questionVotedCorrectly:
|
|
485
|
-
questionType:
|
|
486
|
-
hasCorrectAnswer:
|
|
495
|
+
feedbackMessages: w,
|
|
496
|
+
questionVoted: !!N,
|
|
497
|
+
questionVotedCorrectly: N == null ? void 0 : N.correct,
|
|
498
|
+
questionType: d,
|
|
499
|
+
hasCorrectAnswer: h,
|
|
500
|
+
questionStatus: i.status
|
|
487
501
|
}
|
|
488
502
|
),
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
|
|
503
|
+
/* @__PURE__ */ f(
|
|
504
|
+
xi,
|
|
491
505
|
{
|
|
492
|
-
title:
|
|
493
|
-
points:
|
|
506
|
+
title: m ? "Expired" : "To win",
|
|
507
|
+
points: m ? void 0 : 100,
|
|
494
508
|
onTimerExpired: () => o(!0),
|
|
495
509
|
isTimer: !0
|
|
496
510
|
}
|
|
497
511
|
),
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ f(Fr, { children: c }),
|
|
513
|
+
/* @__PURE__ */ f($r, { children: M.map((A) => /* @__PURE__ */ f(ni, { ...A }, A.id)) })
|
|
500
514
|
] }) }) });
|
|
501
515
|
};
|
|
502
|
-
const
|
|
516
|
+
const Mi = /* @__PURE__ */ I("div")({
|
|
503
517
|
name: "e",
|
|
504
518
|
class: "e1eio0mt",
|
|
505
519
|
propsAsIs: !1
|
|
506
|
-
}),
|
|
520
|
+
}), Ai = /* @__PURE__ */ I("div")({
|
|
507
521
|
name: "i",
|
|
508
522
|
class: "iigl87b",
|
|
509
523
|
propsAsIs: !1
|
|
510
|
-
}),
|
|
524
|
+
}), Ei = /* @__PURE__ */ I("h3")({
|
|
511
525
|
name: "n",
|
|
512
526
|
class: "n1o2cwub",
|
|
513
527
|
propsAsIs: !1
|
|
514
|
-
}),
|
|
528
|
+
}), Ti = /* @__PURE__ */ I("div")({
|
|
515
529
|
name: "r",
|
|
516
530
|
class: "r3uxe45",
|
|
517
531
|
propsAsIs: !1
|
|
518
|
-
}),
|
|
532
|
+
}), Ni = /* @__PURE__ */ I("div")({
|
|
519
533
|
name: "l",
|
|
520
534
|
class: "lrqius",
|
|
521
535
|
propsAsIs: !1
|
|
522
|
-
}),
|
|
523
|
-
const c =
|
|
536
|
+
}), Ot = ({ created: i, title: n, instantView: a }) => {
|
|
537
|
+
const c = Se(() => {
|
|
524
538
|
if (i) {
|
|
525
|
-
const
|
|
526
|
-
if (
|
|
539
|
+
const d = new Date(i);
|
|
540
|
+
if (Zt(d))
|
|
527
541
|
return {
|
|
528
|
-
date:
|
|
529
|
-
time:
|
|
542
|
+
date: Jt(d),
|
|
543
|
+
time: Kt(d)
|
|
530
544
|
};
|
|
531
545
|
}
|
|
532
546
|
return null;
|
|
533
547
|
}, [i]);
|
|
534
|
-
return /* @__PURE__ */
|
|
535
|
-
c && /* @__PURE__ */
|
|
548
|
+
return /* @__PURE__ */ v(Mi, { children: [
|
|
549
|
+
c && /* @__PURE__ */ v(Ni, { children: [
|
|
536
550
|
c.date,
|
|
537
551
|
" · ",
|
|
538
552
|
c.time
|
|
539
553
|
] }),
|
|
540
|
-
(a == null ? void 0 : a.video) && /* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
554
|
+
(a == null ? void 0 : a.video) && /* @__PURE__ */ f(Vt, { source: a.video.url, poster: a.video.thumbnailUrl }),
|
|
555
|
+
/* @__PURE__ */ v(Ai, { children: [
|
|
556
|
+
/* @__PURE__ */ f(Ei, { children: (a == null ? void 0 : a.heading) || n }),
|
|
557
|
+
/* @__PURE__ */ f(Ti, { children: a == null ? void 0 : a.body })
|
|
544
558
|
] })
|
|
545
559
|
] });
|
|
546
560
|
};
|
|
547
|
-
const
|
|
561
|
+
const _i = /* @__PURE__ */ I("div")({
|
|
548
562
|
name: "o",
|
|
549
563
|
class: "o18unvw4",
|
|
550
564
|
propsAsIs: !1
|
|
551
|
-
}),
|
|
565
|
+
}), vi = /* @__PURE__ */ I("a")({
|
|
552
566
|
name: "n",
|
|
553
567
|
class: "ns0uvk8",
|
|
554
568
|
propsAsIs: !1
|
|
555
|
-
}),
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
(i == null ? void 0 : i.webLink) && /* @__PURE__ */
|
|
569
|
+
}), Si = ({ instantView: i, ...n }) => /* @__PURE__ */ v(_i, { children: [
|
|
570
|
+
/* @__PURE__ */ f(Ot, { instantView: i, ...n }),
|
|
571
|
+
(i == null ? void 0 : i.webLink) && /* @__PURE__ */ v(vi, { href: i == null ? void 0 : i.webLink.url, target: "_blank", children: [
|
|
558
572
|
"Explore more of the Masters History",
|
|
559
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ f(V, { name: "icon-external-link" })
|
|
560
574
|
] })
|
|
561
575
|
] });
|
|
562
576
|
const zi = /* @__PURE__ */ I("div")({
|
|
563
577
|
name: "d",
|
|
564
578
|
class: "dk8r1eq",
|
|
565
579
|
propsAsIs: !1
|
|
566
|
-
}),
|
|
580
|
+
}), Di = ({
|
|
567
581
|
openedQuestion: i
|
|
568
582
|
}) => {
|
|
569
583
|
var n;
|
|
570
|
-
return ((n = i == null ? void 0 : i.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */
|
|
584
|
+
return ((n = i == null ? void 0 : i.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ f(Si, {
|
|
571
585
|
created: i.attributes.created,
|
|
572
586
|
...i.attributes.attributes.value
|
|
573
587
|
}) : null;
|
|
574
|
-
},
|
|
588
|
+
}, bi = ({
|
|
575
589
|
extendedQuestion: i,
|
|
576
590
|
vote: n
|
|
577
591
|
}) => {
|
|
@@ -579,55 +593,55 @@ const zi = /* @__PURE__ */ I("div")({
|
|
|
579
593
|
loading: a,
|
|
580
594
|
data: c
|
|
581
595
|
} = i;
|
|
582
|
-
return !a && c ? /* @__PURE__ */
|
|
596
|
+
return !a && c ? /* @__PURE__ */ f(wi, {
|
|
583
597
|
vote: n,
|
|
584
598
|
openedQuestion: c
|
|
585
599
|
}) : null;
|
|
586
|
-
},
|
|
600
|
+
}, Oi = ({
|
|
587
601
|
gamification: i
|
|
588
602
|
}) => {
|
|
589
603
|
var n;
|
|
590
604
|
const a = ie(i.openedQuestion.$store), c = ie(i.openedQuestion.$extendedStore);
|
|
591
605
|
if (!a)
|
|
592
606
|
return null;
|
|
593
|
-
const
|
|
594
|
-
return /* @__PURE__ */
|
|
595
|
-
children: [/* @__PURE__ */
|
|
607
|
+
const d = a.type;
|
|
608
|
+
return /* @__PURE__ */ v(zi, {
|
|
609
|
+
children: [/* @__PURE__ */ f(zt, {
|
|
596
610
|
close: i.closeQuestion,
|
|
597
|
-
type: ((n = a.attributes) == null ? void 0 : n.type) ||
|
|
598
|
-
}),
|
|
611
|
+
type: ((n = a.attributes) == null ? void 0 : n.type) || P.UNSET
|
|
612
|
+
}), d === "question" && /* @__PURE__ */ f(bi, {
|
|
599
613
|
vote: i.submitAnswer,
|
|
600
614
|
extendedQuestion: c
|
|
601
|
-
}),
|
|
615
|
+
}), d !== "question" && /* @__PURE__ */ f(Di, {
|
|
602
616
|
openedQuestion: a
|
|
603
617
|
})]
|
|
604
618
|
});
|
|
605
619
|
};
|
|
606
|
-
const
|
|
620
|
+
const Bi = /* @__PURE__ */ I("div")({
|
|
607
621
|
name: "t",
|
|
608
622
|
class: "tcim9sm",
|
|
609
623
|
propsAsIs: !1
|
|
610
|
-
}),
|
|
624
|
+
}), Ri = /* @__PURE__ */ I("div")({
|
|
611
625
|
name: "e",
|
|
612
626
|
class: "e8wco6o",
|
|
613
627
|
propsAsIs: !1
|
|
614
|
-
}),
|
|
628
|
+
}), Li = /* @__PURE__ */ I("button")({
|
|
615
629
|
name: "n",
|
|
616
630
|
class: "n1ardwzl",
|
|
617
631
|
propsAsIs: !1
|
|
618
|
-
}),
|
|
632
|
+
}), Ci = /* @__PURE__ */ I("span")({
|
|
619
633
|
name: "i",
|
|
620
634
|
class: "i1vk8ojx",
|
|
621
635
|
propsAsIs: !1
|
|
622
636
|
});
|
|
623
637
|
var Ie = /* @__PURE__ */ ((i) => (i.HOME = "home", i.LEADERBOARD = "leaderboard", i))(Ie || {});
|
|
624
|
-
const
|
|
625
|
-
/* @__PURE__ */
|
|
638
|
+
const dt = ({ title: i, active: n, onClick: a }) => /* @__PURE__ */ f(Li, { onClick: a, "data-selected": n, children: /* @__PURE__ */ f(Ci, { children: i }) }), ki = ({ activePage: i = "home", toggleActivePage: n }) => /* @__PURE__ */ f(Bi, { children: /* @__PURE__ */ v(Ri, { "data-position": i === "home" ? "left" : "right", children: [
|
|
639
|
+
/* @__PURE__ */ f(dt, { title: "Home", active: i === "home", onClick: () => n(
|
|
626
640
|
"home"
|
|
627
641
|
/* HOME */
|
|
628
642
|
) }),
|
|
629
|
-
/* @__PURE__ */
|
|
630
|
-
|
|
643
|
+
/* @__PURE__ */ f(
|
|
644
|
+
dt,
|
|
631
645
|
{
|
|
632
646
|
title: "Leader Board",
|
|
633
647
|
active: i === "leaderboard",
|
|
@@ -638,16 +652,16 @@ const ct = ({ title: i, active: n, onClick: a }) => /* @__PURE__ */ m(Ri, { onCl
|
|
|
638
652
|
}
|
|
639
653
|
)
|
|
640
654
|
] }) });
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
var
|
|
646
|
-
for (var le = 0,
|
|
647
|
-
|
|
655
|
+
var Bt = {}, Rt = {}, be = {};
|
|
656
|
+
be.byteLength = Fi;
|
|
657
|
+
be.toByteArray = Qi;
|
|
658
|
+
be.fromByteArray = Yi;
|
|
659
|
+
var J = [], Q = [], Ui = typeof Uint8Array < "u" ? Uint8Array : Array, Fe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
660
|
+
for (var le = 0, ji = Fe.length; le < ji; ++le)
|
|
661
|
+
J[le] = Fe[le], Q[Fe.charCodeAt(le)] = le;
|
|
648
662
|
Q["-".charCodeAt(0)] = 62;
|
|
649
663
|
Q["_".charCodeAt(0)] = 63;
|
|
650
|
-
function
|
|
664
|
+
function Lt(i) {
|
|
651
665
|
var n = i.length;
|
|
652
666
|
if (n % 4 > 0)
|
|
653
667
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -656,60 +670,60 @@ function Bt(i) {
|
|
|
656
670
|
var c = a === n ? 0 : 4 - a % 4;
|
|
657
671
|
return [a, c];
|
|
658
672
|
}
|
|
659
|
-
function
|
|
660
|
-
var n =
|
|
673
|
+
function Fi(i) {
|
|
674
|
+
var n = Lt(i), a = n[0], c = n[1];
|
|
661
675
|
return (a + c) * 3 / 4 - c;
|
|
662
676
|
}
|
|
663
|
-
function
|
|
677
|
+
function $i(i, n, a) {
|
|
664
678
|
return (n + a) * 3 / 4 - a;
|
|
665
679
|
}
|
|
666
|
-
function $i(i) {
|
|
667
|
-
var n, a = Bt(i), c = a[0], h = a[1], g = new ki(Fi(i, c, h)), f = 0, o = h > 0 ? c - 4 : c, w;
|
|
668
|
-
for (w = 0; w < o; w += 4)
|
|
669
|
-
n = Q[i.charCodeAt(w)] << 18 | Q[i.charCodeAt(w + 1)] << 12 | Q[i.charCodeAt(w + 2)] << 6 | Q[i.charCodeAt(w + 3)], g[f++] = n >> 16 & 255, g[f++] = n >> 8 & 255, g[f++] = n & 255;
|
|
670
|
-
return h === 2 && (n = Q[i.charCodeAt(w)] << 2 | Q[i.charCodeAt(w + 1)] >> 4, g[f++] = n & 255), h === 1 && (n = Q[i.charCodeAt(w)] << 10 | Q[i.charCodeAt(w + 1)] << 4 | Q[i.charCodeAt(w + 2)] >> 2, g[f++] = n >> 8 & 255, g[f++] = n & 255), g;
|
|
671
|
-
}
|
|
672
680
|
function Qi(i) {
|
|
673
|
-
|
|
681
|
+
var n, a = Lt(i), c = a[0], d = a[1], g = new Ui($i(i, c, d)), m = 0, o = d > 0 ? c - 4 : c, y;
|
|
682
|
+
for (y = 0; y < o; y += 4)
|
|
683
|
+
n = Q[i.charCodeAt(y)] << 18 | Q[i.charCodeAt(y + 1)] << 12 | Q[i.charCodeAt(y + 2)] << 6 | Q[i.charCodeAt(y + 3)], g[m++] = n >> 16 & 255, g[m++] = n >> 8 & 255, g[m++] = n & 255;
|
|
684
|
+
return d === 2 && (n = Q[i.charCodeAt(y)] << 2 | Q[i.charCodeAt(y + 1)] >> 4, g[m++] = n & 255), d === 1 && (n = Q[i.charCodeAt(y)] << 10 | Q[i.charCodeAt(y + 1)] << 4 | Q[i.charCodeAt(y + 2)] >> 2, g[m++] = n >> 8 & 255, g[m++] = n & 255), g;
|
|
674
685
|
}
|
|
675
|
-
function Pi(i
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
686
|
+
function Pi(i) {
|
|
687
|
+
return J[i >> 18 & 63] + J[i >> 12 & 63] + J[i >> 6 & 63] + J[i & 63];
|
|
688
|
+
}
|
|
689
|
+
function qi(i, n, a) {
|
|
690
|
+
for (var c, d = [], g = n; g < a; g += 3)
|
|
691
|
+
c = (i[g] << 16 & 16711680) + (i[g + 1] << 8 & 65280) + (i[g + 2] & 255), d.push(Pi(c));
|
|
692
|
+
return d.join("");
|
|
679
693
|
}
|
|
680
694
|
function Yi(i) {
|
|
681
|
-
for (var n, a = i.length, c = a % 3,
|
|
682
|
-
|
|
683
|
-
return c === 1 ? (n = i[a - 1],
|
|
684
|
-
|
|
685
|
-
)) : c === 2 && (n = (i[a - 2] << 8) + i[a - 1],
|
|
686
|
-
|
|
687
|
-
)),
|
|
695
|
+
for (var n, a = i.length, c = a % 3, d = [], g = 16383, m = 0, o = a - c; m < o; m += g)
|
|
696
|
+
d.push(qi(i, m, m + g > o ? o : m + g));
|
|
697
|
+
return c === 1 ? (n = i[a - 1], d.push(
|
|
698
|
+
J[n >> 2] + J[n << 4 & 63] + "=="
|
|
699
|
+
)) : c === 2 && (n = (i[a - 2] << 8) + i[a - 1], d.push(
|
|
700
|
+
J[n >> 10] + J[n >> 4 & 63] + J[n << 2 & 63] + "="
|
|
701
|
+
)), d.join("");
|
|
688
702
|
}
|
|
689
|
-
var
|
|
703
|
+
var Xe = {};
|
|
690
704
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
691
|
-
|
|
692
|
-
var g,
|
|
693
|
-
for (
|
|
705
|
+
Xe.read = function(i, n, a, c, d) {
|
|
706
|
+
var g, m, o = d * 8 - c - 1, y = (1 << o) - 1, T = y >> 1, _ = -7, S = a ? d - 1 : 0, x = a ? -1 : 1, E = i[n + S];
|
|
707
|
+
for (S += x, g = E & (1 << -_) - 1, E >>= -_, _ += o; _ > 0; g = g * 256 + i[n + S], S += x, _ -= 8)
|
|
694
708
|
;
|
|
695
|
-
for (
|
|
709
|
+
for (m = g & (1 << -_) - 1, g >>= -_, _ += c; _ > 0; m = m * 256 + i[n + S], S += x, _ -= 8)
|
|
696
710
|
;
|
|
697
711
|
if (g === 0)
|
|
698
|
-
g = 1 -
|
|
712
|
+
g = 1 - T;
|
|
699
713
|
else {
|
|
700
|
-
if (g ===
|
|
701
|
-
return
|
|
702
|
-
|
|
714
|
+
if (g === y)
|
|
715
|
+
return m ? NaN : (E ? -1 : 1) * (1 / 0);
|
|
716
|
+
m = m + Math.pow(2, c), g = g - T;
|
|
703
717
|
}
|
|
704
|
-
return (E ? -1 : 1) *
|
|
718
|
+
return (E ? -1 : 1) * m * Math.pow(2, g - c);
|
|
705
719
|
};
|
|
706
|
-
|
|
707
|
-
var
|
|
708
|
-
for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0,
|
|
720
|
+
Xe.write = function(i, n, a, c, d, g) {
|
|
721
|
+
var m, o, y, T = g * 8 - d - 1, _ = (1 << T) - 1, S = _ >> 1, x = d === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, E = c ? 0 : g - 1, N = c ? 1 : -1, h = n < 0 || n === 0 && 1 / n < 0 ? 1 : 0;
|
|
722
|
+
for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (o = isNaN(n) ? 1 : 0, m = _) : (m = Math.floor(Math.log(n) / Math.LN2), n * (y = Math.pow(2, -m)) < 1 && (m--, y *= 2), m + S >= 1 ? n += x / y : n += x * Math.pow(2, 1 - S), n * y >= 2 && (m++, y /= 2), m + S >= _ ? (o = 0, m = _) : m + S >= 1 ? (o = (n * y - 1) * Math.pow(2, d), m = m + S) : (o = n * Math.pow(2, S - 1) * Math.pow(2, d), m = 0)); d >= 8; i[a + E] = o & 255, E += N, o /= 256, d -= 8)
|
|
709
723
|
;
|
|
710
|
-
for (
|
|
724
|
+
for (m = m << d | o, T += d; T > 0; i[a + E] = m & 255, E += N, m /= 256, T -= 8)
|
|
711
725
|
;
|
|
712
|
-
i[a + E -
|
|
726
|
+
i[a + E - N] |= h * 128;
|
|
713
727
|
};
|
|
714
728
|
/*!
|
|
715
729
|
* The buffer module from node.js, for the browser.
|
|
@@ -718,10 +732,10 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
718
732
|
* @license MIT
|
|
719
733
|
*/
|
|
720
734
|
(function(i) {
|
|
721
|
-
const n =
|
|
735
|
+
const n = be, a = Xe, c = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
722
736
|
i.Buffer = o, i.SlowBuffer = A, i.INSPECT_MAX_BYTES = 50;
|
|
723
|
-
const
|
|
724
|
-
i.kMaxLength =
|
|
737
|
+
const d = 2147483647;
|
|
738
|
+
i.kMaxLength = d, o.TYPED_ARRAY_SUPPORT = g(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
725
739
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
726
740
|
);
|
|
727
741
|
function g() {
|
|
@@ -747,8 +761,8 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
747
761
|
return this.byteOffset;
|
|
748
762
|
}
|
|
749
763
|
});
|
|
750
|
-
function
|
|
751
|
-
if (r >
|
|
764
|
+
function m(r) {
|
|
765
|
+
if (r > d)
|
|
752
766
|
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
753
767
|
const e = new Uint8Array(r);
|
|
754
768
|
return Object.setPrototypeOf(e, o.prototype), e;
|
|
@@ -759,22 +773,22 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
759
773
|
throw new TypeError(
|
|
760
774
|
'The "string" argument must be of type string. Received type number'
|
|
761
775
|
);
|
|
762
|
-
return
|
|
776
|
+
return S(r);
|
|
763
777
|
}
|
|
764
|
-
return
|
|
778
|
+
return y(r, e, t);
|
|
765
779
|
}
|
|
766
780
|
o.poolSize = 8192;
|
|
767
|
-
function
|
|
781
|
+
function y(r, e, t) {
|
|
768
782
|
if (typeof r == "string")
|
|
769
|
-
return
|
|
783
|
+
return x(r, e);
|
|
770
784
|
if (ArrayBuffer.isView(r))
|
|
771
|
-
return
|
|
785
|
+
return N(r);
|
|
772
786
|
if (r == null)
|
|
773
787
|
throw new TypeError(
|
|
774
788
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof r
|
|
775
789
|
);
|
|
776
|
-
if (
|
|
777
|
-
return
|
|
790
|
+
if (H(r, ArrayBuffer) || r && H(r.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (H(r, SharedArrayBuffer) || r && H(r.buffer, SharedArrayBuffer)))
|
|
791
|
+
return h(r, e, t);
|
|
778
792
|
if (typeof r == "number")
|
|
779
793
|
throw new TypeError(
|
|
780
794
|
'The "value" argument must not be of type number. Received type number'
|
|
@@ -792,50 +806,50 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
792
806
|
);
|
|
793
807
|
}
|
|
794
808
|
o.from = function(r, e, t) {
|
|
795
|
-
return
|
|
809
|
+
return y(r, e, t);
|
|
796
810
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
797
|
-
function
|
|
811
|
+
function T(r) {
|
|
798
812
|
if (typeof r != "number")
|
|
799
813
|
throw new TypeError('"size" argument must be of type number');
|
|
800
814
|
if (r < 0)
|
|
801
815
|
throw new RangeError('The value "' + r + '" is invalid for option "size"');
|
|
802
816
|
}
|
|
803
817
|
function _(r, e, t) {
|
|
804
|
-
return
|
|
818
|
+
return T(r), r <= 0 ? m(r) : e !== void 0 ? typeof t == "string" ? m(r).fill(e, t) : m(r).fill(e) : m(r);
|
|
805
819
|
}
|
|
806
820
|
o.alloc = function(r, e, t) {
|
|
807
821
|
return _(r, e, t);
|
|
808
822
|
};
|
|
809
|
-
function
|
|
810
|
-
return
|
|
823
|
+
function S(r) {
|
|
824
|
+
return T(r), m(r < 0 ? 0 : w(r) | 0);
|
|
811
825
|
}
|
|
812
826
|
o.allocUnsafe = function(r) {
|
|
813
|
-
return
|
|
827
|
+
return S(r);
|
|
814
828
|
}, o.allocUnsafeSlow = function(r) {
|
|
815
|
-
return
|
|
829
|
+
return S(r);
|
|
816
830
|
};
|
|
817
|
-
function
|
|
831
|
+
function x(r, e) {
|
|
818
832
|
if ((typeof e != "string" || e === "") && (e = "utf8"), !o.isEncoding(e))
|
|
819
833
|
throw new TypeError("Unknown encoding: " + e);
|
|
820
|
-
const t =
|
|
821
|
-
let s =
|
|
834
|
+
const t = z(r, e) | 0;
|
|
835
|
+
let s = m(t);
|
|
822
836
|
const l = s.write(r, e);
|
|
823
837
|
return l !== t && (s = s.slice(0, l)), s;
|
|
824
838
|
}
|
|
825
839
|
function E(r) {
|
|
826
|
-
const e = r.length < 0 ? 0 :
|
|
840
|
+
const e = r.length < 0 ? 0 : w(r.length) | 0, t = m(e);
|
|
827
841
|
for (let s = 0; s < e; s += 1)
|
|
828
842
|
t[s] = r[s] & 255;
|
|
829
843
|
return t;
|
|
830
844
|
}
|
|
831
|
-
function
|
|
832
|
-
if (
|
|
845
|
+
function N(r) {
|
|
846
|
+
if (H(r, Uint8Array)) {
|
|
833
847
|
const e = new Uint8Array(r);
|
|
834
|
-
return
|
|
848
|
+
return h(e.buffer, e.byteOffset, e.byteLength);
|
|
835
849
|
}
|
|
836
850
|
return E(r);
|
|
837
851
|
}
|
|
838
|
-
function
|
|
852
|
+
function h(r, e, t) {
|
|
839
853
|
if (e < 0 || r.byteLength < e)
|
|
840
854
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
841
855
|
if (r.byteLength < e + (t || 0))
|
|
@@ -845,17 +859,17 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
845
859
|
}
|
|
846
860
|
function M(r) {
|
|
847
861
|
if (o.isBuffer(r)) {
|
|
848
|
-
const e =
|
|
862
|
+
const e = w(r.length) | 0, t = m(e);
|
|
849
863
|
return t.length === 0 || r.copy(t, 0, 0, e), t;
|
|
850
864
|
}
|
|
851
865
|
if (r.length !== void 0)
|
|
852
|
-
return typeof r.length != "number" ||
|
|
866
|
+
return typeof r.length != "number" || Ue(r.length) ? m(0) : E(r);
|
|
853
867
|
if (r.type === "Buffer" && Array.isArray(r.data))
|
|
854
868
|
return E(r.data);
|
|
855
869
|
}
|
|
856
|
-
function
|
|
857
|
-
if (r >=
|
|
858
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" +
|
|
870
|
+
function w(r) {
|
|
871
|
+
if (r >= d)
|
|
872
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + d.toString(16) + " bytes");
|
|
859
873
|
return r | 0;
|
|
860
874
|
}
|
|
861
875
|
function A(r) {
|
|
@@ -864,7 +878,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
864
878
|
o.isBuffer = function(e) {
|
|
865
879
|
return e != null && e._isBuffer === !0 && e !== o.prototype;
|
|
866
880
|
}, o.compare = function(e, t) {
|
|
867
|
-
if (
|
|
881
|
+
if (H(e, Uint8Array) && (e = o.from(e, e.offset, e.byteLength)), H(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(e) || !o.isBuffer(t))
|
|
868
882
|
throw new TypeError(
|
|
869
883
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
870
884
|
);
|
|
@@ -907,7 +921,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
907
921
|
let u = 0;
|
|
908
922
|
for (s = 0; s < e.length; ++s) {
|
|
909
923
|
let p = e[s];
|
|
910
|
-
if (
|
|
924
|
+
if (H(p, Uint8Array))
|
|
911
925
|
u + p.length > l.length ? (o.isBuffer(p) || (p = o.from(p)), p.copy(l, u)) : Uint8Array.prototype.set.call(
|
|
912
926
|
l,
|
|
913
927
|
p,
|
|
@@ -921,10 +935,10 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
921
935
|
}
|
|
922
936
|
return l;
|
|
923
937
|
};
|
|
924
|
-
function
|
|
938
|
+
function z(r, e) {
|
|
925
939
|
if (o.isBuffer(r))
|
|
926
940
|
return r.length;
|
|
927
|
-
if (ArrayBuffer.isView(r) ||
|
|
941
|
+
if (ArrayBuffer.isView(r) || H(r, ArrayBuffer))
|
|
928
942
|
return r.byteLength;
|
|
929
943
|
if (typeof r != "string")
|
|
930
944
|
throw new TypeError(
|
|
@@ -942,7 +956,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
942
956
|
return t;
|
|
943
957
|
case "utf8":
|
|
944
958
|
case "utf-8":
|
|
945
|
-
return
|
|
959
|
+
return ke(r).length;
|
|
946
960
|
case "ucs2":
|
|
947
961
|
case "ucs-2":
|
|
948
962
|
case "utf16le":
|
|
@@ -951,14 +965,14 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
951
965
|
case "hex":
|
|
952
966
|
return t >>> 1;
|
|
953
967
|
case "base64":
|
|
954
|
-
return
|
|
968
|
+
return nt(r).length;
|
|
955
969
|
default:
|
|
956
970
|
if (l)
|
|
957
|
-
return s ? -1 :
|
|
971
|
+
return s ? -1 : ke(r).length;
|
|
958
972
|
e = ("" + e).toLowerCase(), l = !0;
|
|
959
973
|
}
|
|
960
974
|
}
|
|
961
|
-
o.byteLength =
|
|
975
|
+
o.byteLength = z;
|
|
962
976
|
function O(r, e, t) {
|
|
963
977
|
let s = !1;
|
|
964
978
|
if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((t === void 0 || t > this.length) && (t = this.length), t <= 0) || (t >>>= 0, e >>>= 0, t <= e))
|
|
@@ -966,22 +980,22 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
966
980
|
for (r || (r = "utf8"); ; )
|
|
967
981
|
switch (r) {
|
|
968
982
|
case "hex":
|
|
969
|
-
return
|
|
983
|
+
return Le(this, e, t);
|
|
970
984
|
case "utf8":
|
|
971
985
|
case "utf-8":
|
|
972
|
-
return xe(this, e, t);
|
|
973
|
-
case "ascii":
|
|
974
986
|
return Me(this, e, t);
|
|
987
|
+
case "ascii":
|
|
988
|
+
return Ee(this, e, t);
|
|
975
989
|
case "latin1":
|
|
976
990
|
case "binary":
|
|
977
991
|
return pe(this, e, t);
|
|
978
992
|
case "base64":
|
|
979
|
-
return
|
|
993
|
+
return Be(this, e, t);
|
|
980
994
|
case "ucs2":
|
|
981
995
|
case "ucs-2":
|
|
982
996
|
case "utf16le":
|
|
983
997
|
case "utf-16le":
|
|
984
|
-
return
|
|
998
|
+
return Te(this, e, t);
|
|
985
999
|
default:
|
|
986
1000
|
if (s)
|
|
987
1001
|
throw new TypeError("Unknown encoding: " + r);
|
|
@@ -1016,7 +1030,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1016
1030
|
return this;
|
|
1017
1031
|
}, o.prototype.toString = function() {
|
|
1018
1032
|
const e = this.length;
|
|
1019
|
-
return e === 0 ? "" : arguments.length === 0 ?
|
|
1033
|
+
return e === 0 ? "" : arguments.length === 0 ? Me(this, 0, e) : O.apply(this, arguments);
|
|
1020
1034
|
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(e) {
|
|
1021
1035
|
if (!o.isBuffer(e))
|
|
1022
1036
|
throw new TypeError("Argument must be a Buffer");
|
|
@@ -1026,7 +1040,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1026
1040
|
const t = i.INSPECT_MAX_BYTES;
|
|
1027
1041
|
return e = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (e += " ... "), "<Buffer " + e + ">";
|
|
1028
1042
|
}, c && (o.prototype[c] = o.prototype.inspect), o.prototype.compare = function(e, t, s, l, u) {
|
|
1029
|
-
if (
|
|
1043
|
+
if (H(e, Uint8Array) && (e = o.from(e, e.offset, e.byteLength)), !o.isBuffer(e))
|
|
1030
1044
|
throw new TypeError(
|
|
1031
1045
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e
|
|
1032
1046
|
);
|
|
@@ -1052,7 +1066,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1052
1066
|
function R(r, e, t, s, l) {
|
|
1053
1067
|
if (r.length === 0)
|
|
1054
1068
|
return -1;
|
|
1055
|
-
if (typeof t == "string" ? (s = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t,
|
|
1069
|
+
if (typeof t == "string" ? (s = t, t = 0) : t > 2147483647 ? t = 2147483647 : t < -2147483648 && (t = -2147483648), t = +t, Ue(t) && (t = l ? 0 : r.length - 1), t < 0 && (t = r.length + t), t >= r.length) {
|
|
1056
1070
|
if (l)
|
|
1057
1071
|
return -1;
|
|
1058
1072
|
t = r.length - 1;
|
|
@@ -1115,23 +1129,23 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1115
1129
|
let p;
|
|
1116
1130
|
for (p = 0; p < s; ++p) {
|
|
1117
1131
|
const b = parseInt(e.substr(p * 2, 2), 16);
|
|
1118
|
-
if (
|
|
1132
|
+
if (Ue(b))
|
|
1119
1133
|
return p;
|
|
1120
1134
|
r[t + p] = b;
|
|
1121
1135
|
}
|
|
1122
1136
|
return p;
|
|
1123
1137
|
}
|
|
1124
|
-
function
|
|
1125
|
-
return
|
|
1138
|
+
function W(r, e, t, s) {
|
|
1139
|
+
return Ne(ke(e, r.length - t), r, t, s);
|
|
1126
1140
|
}
|
|
1127
1141
|
function ne(r, e, t, s) {
|
|
1128
|
-
return
|
|
1142
|
+
return Ne(Pt(e), r, t, s);
|
|
1129
1143
|
}
|
|
1130
1144
|
function se(r, e, t, s) {
|
|
1131
|
-
return
|
|
1145
|
+
return Ne(nt(e), r, t, s);
|
|
1132
1146
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return
|
|
1147
|
+
function Oe(r, e, t, s) {
|
|
1148
|
+
return Ne(qt(e, r.length - t), r, t, s);
|
|
1135
1149
|
}
|
|
1136
1150
|
o.prototype.write = function(e, t, s, l) {
|
|
1137
1151
|
if (t === void 0)
|
|
@@ -1155,7 +1169,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1155
1169
|
return Y(this, e, t, s);
|
|
1156
1170
|
case "utf8":
|
|
1157
1171
|
case "utf-8":
|
|
1158
|
-
return
|
|
1172
|
+
return W(this, e, t, s);
|
|
1159
1173
|
case "ascii":
|
|
1160
1174
|
case "latin1":
|
|
1161
1175
|
case "binary":
|
|
@@ -1166,7 +1180,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1166
1180
|
case "ucs-2":
|
|
1167
1181
|
case "utf16le":
|
|
1168
1182
|
case "utf-16le":
|
|
1169
|
-
return
|
|
1183
|
+
return Oe(this, e, t, s);
|
|
1170
1184
|
default:
|
|
1171
1185
|
if (p)
|
|
1172
1186
|
throw new TypeError("Unknown encoding: " + l);
|
|
@@ -1178,10 +1192,10 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1178
1192
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1179
1193
|
};
|
|
1180
1194
|
};
|
|
1181
|
-
function
|
|
1195
|
+
function Be(r, e, t) {
|
|
1182
1196
|
return e === 0 && t === r.length ? n.fromByteArray(r) : n.fromByteArray(r.slice(e, t));
|
|
1183
1197
|
}
|
|
1184
|
-
function
|
|
1198
|
+
function Me(r, e, t) {
|
|
1185
1199
|
t = Math.min(r.length, t);
|
|
1186
1200
|
const s = [];
|
|
1187
1201
|
let l = e;
|
|
@@ -1206,22 +1220,22 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1206
1220
|
}
|
|
1207
1221
|
p === null ? (p = 65533, b = 1) : p > 65535 && (p -= 65536, s.push(p >>> 10 & 1023 | 55296), p = 56320 | p & 1023), s.push(p), l += b;
|
|
1208
1222
|
}
|
|
1209
|
-
return
|
|
1223
|
+
return Re(s);
|
|
1210
1224
|
}
|
|
1211
|
-
const
|
|
1212
|
-
function
|
|
1225
|
+
const Ae = 4096;
|
|
1226
|
+
function Re(r) {
|
|
1213
1227
|
const e = r.length;
|
|
1214
|
-
if (e <=
|
|
1228
|
+
if (e <= Ae)
|
|
1215
1229
|
return String.fromCharCode.apply(String, r);
|
|
1216
1230
|
let t = "", s = 0;
|
|
1217
1231
|
for (; s < e; )
|
|
1218
1232
|
t += String.fromCharCode.apply(
|
|
1219
1233
|
String,
|
|
1220
|
-
r.slice(s, s +=
|
|
1234
|
+
r.slice(s, s += Ae)
|
|
1221
1235
|
);
|
|
1222
1236
|
return t;
|
|
1223
1237
|
}
|
|
1224
|
-
function
|
|
1238
|
+
function Ee(r, e, t) {
|
|
1225
1239
|
let s = "";
|
|
1226
1240
|
t = Math.min(r.length, t);
|
|
1227
1241
|
for (let l = e; l < t; ++l)
|
|
@@ -1235,15 +1249,15 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1235
1249
|
s += String.fromCharCode(r[l]);
|
|
1236
1250
|
return s;
|
|
1237
1251
|
}
|
|
1238
|
-
function
|
|
1252
|
+
function Le(r, e, t) {
|
|
1239
1253
|
const s = r.length;
|
|
1240
1254
|
(!e || e < 0) && (e = 0), (!t || t < 0 || t > s) && (t = s);
|
|
1241
1255
|
let l = "";
|
|
1242
1256
|
for (let u = e; u < t; ++u)
|
|
1243
|
-
l +=
|
|
1257
|
+
l += Yt[r[u]];
|
|
1244
1258
|
return l;
|
|
1245
1259
|
}
|
|
1246
|
-
function
|
|
1260
|
+
function Te(r, e, t) {
|
|
1247
1261
|
const s = r.slice(e, t);
|
|
1248
1262
|
let l = "";
|
|
1249
1263
|
for (let u = 0; u < s.length - 1; u += 2)
|
|
@@ -1382,14 +1396,14 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1382
1396
|
return e = +e, t = t >>> 0, s || $(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
1383
1397
|
};
|
|
1384
1398
|
function fe(r, e, t, s, l) {
|
|
1385
|
-
|
|
1399
|
+
it(e, s, l, r, t, 7);
|
|
1386
1400
|
let u = Number(e & BigInt(4294967295));
|
|
1387
1401
|
r[t++] = u, u = u >> 8, r[t++] = u, u = u >> 8, r[t++] = u, u = u >> 8, r[t++] = u;
|
|
1388
1402
|
let p = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
1389
1403
|
return r[t++] = p, p = p >> 8, r[t++] = p, p = p >> 8, r[t++] = p, p = p >> 8, r[t++] = p, t;
|
|
1390
1404
|
}
|
|
1391
1405
|
function ee(r, e, t, s, l) {
|
|
1392
|
-
|
|
1406
|
+
it(e, s, l, r, t, 7);
|
|
1393
1407
|
let u = Number(e & BigInt(4294967295));
|
|
1394
1408
|
r[t + 7] = u, u = u >> 8, r[t + 6] = u, u = u >> 8, r[t + 5] = u, u = u >> 8, r[t + 4] = u;
|
|
1395
1409
|
let p = Number(e >> BigInt(32) & BigInt(4294967295));
|
|
@@ -1438,21 +1452,21 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1438
1452
|
if (t < 0)
|
|
1439
1453
|
throw new RangeError("Index out of range");
|
|
1440
1454
|
}
|
|
1441
|
-
function
|
|
1455
|
+
function et(r, e, t, s, l) {
|
|
1442
1456
|
return e = +e, t = t >>> 0, l || me(r, e, t, 4), a.write(r, e, t, s, 23, 4), t + 4;
|
|
1443
1457
|
}
|
|
1444
1458
|
o.prototype.writeFloatLE = function(e, t, s) {
|
|
1445
|
-
return
|
|
1459
|
+
return et(this, e, t, !0, s);
|
|
1446
1460
|
}, o.prototype.writeFloatBE = function(e, t, s) {
|
|
1447
|
-
return
|
|
1461
|
+
return et(this, e, t, !1, s);
|
|
1448
1462
|
};
|
|
1449
|
-
function
|
|
1463
|
+
function tt(r, e, t, s, l) {
|
|
1450
1464
|
return e = +e, t = t >>> 0, l || me(r, e, t, 8), a.write(r, e, t, s, 52, 8), t + 8;
|
|
1451
1465
|
}
|
|
1452
1466
|
o.prototype.writeDoubleLE = function(e, t, s) {
|
|
1453
|
-
return
|
|
1467
|
+
return tt(this, e, t, !0, s);
|
|
1454
1468
|
}, o.prototype.writeDoubleBE = function(e, t, s) {
|
|
1455
|
-
return
|
|
1469
|
+
return tt(this, e, t, !1, s);
|
|
1456
1470
|
}, o.prototype.copy = function(e, t, s, l) {
|
|
1457
1471
|
if (!o.isBuffer(e))
|
|
1458
1472
|
throw new TypeError("argument should be a Buffer");
|
|
@@ -1502,7 +1516,7 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1502
1516
|
return this;
|
|
1503
1517
|
};
|
|
1504
1518
|
const oe = {};
|
|
1505
|
-
function
|
|
1519
|
+
function Ce(r, e, t) {
|
|
1506
1520
|
oe[r] = class extends t {
|
|
1507
1521
|
constructor() {
|
|
1508
1522
|
super(), Object.defineProperty(this, "message", {
|
|
@@ -1527,43 +1541,43 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1527
1541
|
}
|
|
1528
1542
|
};
|
|
1529
1543
|
}
|
|
1530
|
-
|
|
1544
|
+
Ce(
|
|
1531
1545
|
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
1532
1546
|
function(r) {
|
|
1533
1547
|
return r ? `${r} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
1534
1548
|
},
|
|
1535
1549
|
RangeError
|
|
1536
|
-
),
|
|
1550
|
+
), Ce(
|
|
1537
1551
|
"ERR_INVALID_ARG_TYPE",
|
|
1538
1552
|
function(r, e) {
|
|
1539
1553
|
return `The "${r}" argument must be of type number. Received type ${typeof e}`;
|
|
1540
1554
|
},
|
|
1541
1555
|
TypeError
|
|
1542
|
-
),
|
|
1556
|
+
), Ce(
|
|
1543
1557
|
"ERR_OUT_OF_RANGE",
|
|
1544
1558
|
function(r, e, t) {
|
|
1545
1559
|
let s = `The value of "${r}" is out of range.`, l = t;
|
|
1546
|
-
return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? l =
|
|
1560
|
+
return Number.isInteger(t) && Math.abs(t) > 2 ** 32 ? l = rt(String(t)) : typeof t == "bigint" && (l = String(t), (t > BigInt(2) ** BigInt(32) || t < -(BigInt(2) ** BigInt(32))) && (l = rt(l)), l += "n"), s += ` It must be ${e}. Received ${l}`, s;
|
|
1547
1561
|
},
|
|
1548
1562
|
RangeError
|
|
1549
1563
|
);
|
|
1550
|
-
function
|
|
1564
|
+
function rt(r) {
|
|
1551
1565
|
let e = "", t = r.length;
|
|
1552
1566
|
const s = r[0] === "-" ? 1 : 0;
|
|
1553
1567
|
for (; t >= s + 4; t -= 3)
|
|
1554
1568
|
e = `_${r.slice(t - 3, t)}${e}`;
|
|
1555
1569
|
return `${r.slice(0, t)}${e}`;
|
|
1556
1570
|
}
|
|
1557
|
-
function
|
|
1571
|
+
function Ft(r, e, t) {
|
|
1558
1572
|
ae(e, "offset"), (r[e] === void 0 || r[e + t] === void 0) && ge(e, r.length - (t + 1));
|
|
1559
1573
|
}
|
|
1560
|
-
function
|
|
1574
|
+
function it(r, e, t, s, l, u) {
|
|
1561
1575
|
if (r > t || r < e) {
|
|
1562
1576
|
const p = typeof e == "bigint" ? "n" : "";
|
|
1563
1577
|
let b;
|
|
1564
1578
|
throw u > 3 ? e === 0 || e === BigInt(0) ? b = `>= 0${p} and < 2${p} ** ${(u + 1) * 8}${p}` : b = `>= -(2${p} ** ${(u + 1) * 8 - 1}${p}) and < 2 ** ${(u + 1) * 8 - 1}${p}` : b = `>= ${e}${p} and <= ${t}${p}`, new oe.ERR_OUT_OF_RANGE("value", b, r);
|
|
1565
1579
|
}
|
|
1566
|
-
|
|
1580
|
+
Ft(s, l, u);
|
|
1567
1581
|
}
|
|
1568
1582
|
function ae(r, e) {
|
|
1569
1583
|
if (typeof r != "number")
|
|
@@ -1576,15 +1590,15 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1576
1590
|
r
|
|
1577
1591
|
);
|
|
1578
1592
|
}
|
|
1579
|
-
const
|
|
1580
|
-
function
|
|
1581
|
-
if (r = r.split("=")[0], r = r.trim().replace(
|
|
1593
|
+
const $t = /[^+/0-9A-Za-z-_]/g;
|
|
1594
|
+
function Qt(r) {
|
|
1595
|
+
if (r = r.split("=")[0], r = r.trim().replace($t, ""), r.length < 2)
|
|
1582
1596
|
return "";
|
|
1583
1597
|
for (; r.length % 4 !== 0; )
|
|
1584
1598
|
r = r + "=";
|
|
1585
1599
|
return r;
|
|
1586
1600
|
}
|
|
1587
|
-
function
|
|
1601
|
+
function ke(r, e) {
|
|
1588
1602
|
e = e || 1 / 0;
|
|
1589
1603
|
let t;
|
|
1590
1604
|
const s = r.length;
|
|
@@ -1643,35 +1657,35 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1643
1657
|
}
|
|
1644
1658
|
return u;
|
|
1645
1659
|
}
|
|
1646
|
-
function
|
|
1660
|
+
function Pt(r) {
|
|
1647
1661
|
const e = [];
|
|
1648
1662
|
for (let t = 0; t < r.length; ++t)
|
|
1649
1663
|
e.push(r.charCodeAt(t) & 255);
|
|
1650
1664
|
return e;
|
|
1651
1665
|
}
|
|
1652
|
-
function
|
|
1666
|
+
function qt(r, e) {
|
|
1653
1667
|
let t, s, l;
|
|
1654
1668
|
const u = [];
|
|
1655
1669
|
for (let p = 0; p < r.length && !((e -= 2) < 0); ++p)
|
|
1656
1670
|
t = r.charCodeAt(p), s = t >> 8, l = t % 256, u.push(l), u.push(s);
|
|
1657
1671
|
return u;
|
|
1658
1672
|
}
|
|
1659
|
-
function
|
|
1660
|
-
return n.toByteArray(
|
|
1673
|
+
function nt(r) {
|
|
1674
|
+
return n.toByteArray(Qt(r));
|
|
1661
1675
|
}
|
|
1662
|
-
function
|
|
1676
|
+
function Ne(r, e, t, s) {
|
|
1663
1677
|
let l;
|
|
1664
1678
|
for (l = 0; l < s && !(l + t >= e.length || l >= r.length); ++l)
|
|
1665
1679
|
e[l + t] = r[l];
|
|
1666
1680
|
return l;
|
|
1667
1681
|
}
|
|
1668
|
-
function
|
|
1682
|
+
function H(r, e) {
|
|
1669
1683
|
return r instanceof e || r != null && r.constructor != null && r.constructor.name != null && r.constructor.name === e.name;
|
|
1670
1684
|
}
|
|
1671
|
-
function
|
|
1685
|
+
function Ue(r) {
|
|
1672
1686
|
return r !== r;
|
|
1673
1687
|
}
|
|
1674
|
-
const
|
|
1688
|
+
const Yt = function() {
|
|
1675
1689
|
const r = "0123456789abcdef", e = new Array(256);
|
|
1676
1690
|
for (let t = 0; t < 16; ++t) {
|
|
1677
1691
|
const s = t * 16;
|
|
@@ -1681,75 +1695,75 @@ Ke.write = function(i, n, a, c, h, g) {
|
|
|
1681
1695
|
return e;
|
|
1682
1696
|
}();
|
|
1683
1697
|
function te(r) {
|
|
1684
|
-
return typeof BigInt > "u" ?
|
|
1698
|
+
return typeof BigInt > "u" ? Wt : r;
|
|
1685
1699
|
}
|
|
1686
|
-
function
|
|
1700
|
+
function Wt() {
|
|
1687
1701
|
throw new Error("BigInt not supported");
|
|
1688
1702
|
}
|
|
1689
|
-
})(
|
|
1690
|
-
var
|
|
1691
|
-
function
|
|
1703
|
+
})(Rt);
|
|
1704
|
+
var Ct = { exports: {} }, U = Ct.exports = {}, G, Z;
|
|
1705
|
+
function Ve() {
|
|
1692
1706
|
throw new Error("setTimeout has not been defined");
|
|
1693
1707
|
}
|
|
1694
|
-
function
|
|
1708
|
+
function He() {
|
|
1695
1709
|
throw new Error("clearTimeout has not been defined");
|
|
1696
1710
|
}
|
|
1697
1711
|
(function() {
|
|
1698
1712
|
try {
|
|
1699
|
-
typeof setTimeout == "function" ?
|
|
1713
|
+
typeof setTimeout == "function" ? G = setTimeout : G = Ve;
|
|
1700
1714
|
} catch {
|
|
1701
|
-
|
|
1715
|
+
G = Ve;
|
|
1702
1716
|
}
|
|
1703
1717
|
try {
|
|
1704
|
-
typeof clearTimeout == "function" ?
|
|
1718
|
+
typeof clearTimeout == "function" ? Z = clearTimeout : Z = He;
|
|
1705
1719
|
} catch {
|
|
1706
|
-
|
|
1720
|
+
Z = He;
|
|
1707
1721
|
}
|
|
1708
1722
|
})();
|
|
1709
|
-
function
|
|
1710
|
-
if (
|
|
1723
|
+
function kt(i) {
|
|
1724
|
+
if (G === setTimeout)
|
|
1711
1725
|
return setTimeout(i, 0);
|
|
1712
|
-
if ((
|
|
1713
|
-
return
|
|
1726
|
+
if ((G === Ve || !G) && setTimeout)
|
|
1727
|
+
return G = setTimeout, setTimeout(i, 0);
|
|
1714
1728
|
try {
|
|
1715
|
-
return
|
|
1729
|
+
return G(i, 0);
|
|
1716
1730
|
} catch {
|
|
1717
1731
|
try {
|
|
1718
|
-
return
|
|
1732
|
+
return G.call(null, i, 0);
|
|
1719
1733
|
} catch {
|
|
1720
|
-
return
|
|
1734
|
+
return G.call(this, i, 0);
|
|
1721
1735
|
}
|
|
1722
1736
|
}
|
|
1723
1737
|
}
|
|
1724
|
-
function
|
|
1725
|
-
if (
|
|
1738
|
+
function Wi(i) {
|
|
1739
|
+
if (Z === clearTimeout)
|
|
1726
1740
|
return clearTimeout(i);
|
|
1727
|
-
if ((
|
|
1728
|
-
return
|
|
1741
|
+
if ((Z === He || !Z) && clearTimeout)
|
|
1742
|
+
return Z = clearTimeout, clearTimeout(i);
|
|
1729
1743
|
try {
|
|
1730
|
-
return
|
|
1744
|
+
return Z(i);
|
|
1731
1745
|
} catch {
|
|
1732
1746
|
try {
|
|
1733
|
-
return
|
|
1747
|
+
return Z.call(null, i);
|
|
1734
1748
|
} catch {
|
|
1735
|
-
return
|
|
1749
|
+
return Z.call(this, i);
|
|
1736
1750
|
}
|
|
1737
1751
|
}
|
|
1738
1752
|
}
|
|
1739
|
-
var K = [],
|
|
1740
|
-
function
|
|
1741
|
-
!
|
|
1753
|
+
var K = [], he = !1, re, De = -1;
|
|
1754
|
+
function Vi() {
|
|
1755
|
+
!he || !re || (he = !1, re.length ? K = re.concat(K) : De = -1, K.length && Ut());
|
|
1742
1756
|
}
|
|
1743
|
-
function
|
|
1744
|
-
if (!
|
|
1745
|
-
var i =
|
|
1746
|
-
|
|
1757
|
+
function Ut() {
|
|
1758
|
+
if (!he) {
|
|
1759
|
+
var i = kt(Vi);
|
|
1760
|
+
he = !0;
|
|
1747
1761
|
for (var n = K.length; n; ) {
|
|
1748
|
-
for (re = K, K = []; ++
|
|
1749
|
-
re && re[
|
|
1750
|
-
|
|
1762
|
+
for (re = K, K = []; ++De < n; )
|
|
1763
|
+
re && re[De].run();
|
|
1764
|
+
De = -1, n = K.length;
|
|
1751
1765
|
}
|
|
1752
|
-
re = null,
|
|
1766
|
+
re = null, he = !1, Wi(i);
|
|
1753
1767
|
}
|
|
1754
1768
|
}
|
|
1755
1769
|
U.nextTick = function(i) {
|
|
@@ -1757,12 +1771,12 @@ U.nextTick = function(i) {
|
|
|
1757
1771
|
if (arguments.length > 1)
|
|
1758
1772
|
for (var a = 1; a < arguments.length; a++)
|
|
1759
1773
|
n[a - 1] = arguments[a];
|
|
1760
|
-
K.push(new
|
|
1774
|
+
K.push(new jt(i, n)), K.length === 1 && !he && kt(Ut);
|
|
1761
1775
|
};
|
|
1762
|
-
function
|
|
1776
|
+
function jt(i, n) {
|
|
1763
1777
|
this.fun = i, this.array = n;
|
|
1764
1778
|
}
|
|
1765
|
-
|
|
1779
|
+
jt.prototype.run = function() {
|
|
1766
1780
|
this.fun.apply(null, this.array);
|
|
1767
1781
|
};
|
|
1768
1782
|
U.title = "browser";
|
|
@@ -1797,101 +1811,101 @@ U.chdir = function(i) {
|
|
|
1797
1811
|
U.umask = function() {
|
|
1798
1812
|
return 0;
|
|
1799
1813
|
};
|
|
1800
|
-
var
|
|
1814
|
+
var Hi = Ct.exports;
|
|
1801
1815
|
(function(i) {
|
|
1802
1816
|
Object.defineProperty(i, Symbol.toStringTag, { value: "Module" });
|
|
1803
|
-
const n =
|
|
1804
|
-
Object.defineProperty(i, "Buffer", { enumerable: !0, get: () => n.Buffer }), Object.defineProperty(i, "process", { enumerable: !0, get: () =>
|
|
1805
|
-
})(
|
|
1806
|
-
let
|
|
1807
|
-
typeof window < "u" ?
|
|
1808
|
-
let
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1811
|
-
return
|
|
1812
|
-
}) : (
|
|
1813
|
-
|
|
1814
|
-
},
|
|
1815
|
-
const a =
|
|
1816
|
-
|
|
1817
|
-
}), c =
|
|
1818
|
-
|
|
1819
|
-
},
|
|
1817
|
+
const n = Rt, a = Hi, c = (m) => m && m.__esModule ? m : { default: m }, d = c(a), g = globalThis || void 0 || self;
|
|
1818
|
+
Object.defineProperty(i, "Buffer", { enumerable: !0, get: () => n.Buffer }), Object.defineProperty(i, "process", { enumerable: !0, get: () => d.default }), i.global = g;
|
|
1819
|
+
})(Bt);
|
|
1820
|
+
let q;
|
|
1821
|
+
typeof window < "u" ? q = window : typeof self < "u" ? q = self : q = Bt.global;
|
|
1822
|
+
let Ge = null, Ze = null;
|
|
1823
|
+
const ht = 20, $e = q.clearTimeout, pt = q.setTimeout, Qe = q.cancelAnimationFrame || q.mozCancelAnimationFrame || q.webkitCancelAnimationFrame, ft = q.requestAnimationFrame || q.mozRequestAnimationFrame || q.webkitRequestAnimationFrame;
|
|
1824
|
+
Qe == null || ft == null ? (Ge = $e, Ze = function(n) {
|
|
1825
|
+
return pt(n, ht);
|
|
1826
|
+
}) : (Ge = function([n, a]) {
|
|
1827
|
+
Qe(n), $e(a);
|
|
1828
|
+
}, Ze = function(n) {
|
|
1829
|
+
const a = ft(function() {
|
|
1830
|
+
$e(c), n();
|
|
1831
|
+
}), c = pt(function() {
|
|
1832
|
+
Qe(a), n();
|
|
1833
|
+
}, ht);
|
|
1820
1834
|
return [a, c];
|
|
1821
1835
|
});
|
|
1822
|
-
function
|
|
1823
|
-
let n, a, c,
|
|
1824
|
-
const
|
|
1825
|
-
if (!
|
|
1826
|
-
|
|
1827
|
-
const A =
|
|
1828
|
-
O.scrollLeft = O.scrollWidth, O.scrollTop = O.scrollHeight, D.style.width =
|
|
1829
|
-
}, g = function(
|
|
1830
|
-
return
|
|
1831
|
-
}, o = function(
|
|
1832
|
-
if (
|
|
1836
|
+
function Gi(i) {
|
|
1837
|
+
let n, a, c, d, g, m, o;
|
|
1838
|
+
const y = typeof document < "u" && document.attachEvent;
|
|
1839
|
+
if (!y) {
|
|
1840
|
+
m = function(w) {
|
|
1841
|
+
const A = w.__resizeTriggers__, z = A.firstElementChild, O = A.lastElementChild, D = z.firstElementChild;
|
|
1842
|
+
O.scrollLeft = O.scrollWidth, O.scrollTop = O.scrollHeight, D.style.width = z.offsetWidth + 1 + "px", D.style.height = z.offsetHeight + 1 + "px", z.scrollLeft = z.scrollWidth, z.scrollTop = z.scrollHeight;
|
|
1843
|
+
}, g = function(w) {
|
|
1844
|
+
return w.offsetWidth !== w.__resizeLast__.width || w.offsetHeight !== w.__resizeLast__.height;
|
|
1845
|
+
}, o = function(w) {
|
|
1846
|
+
if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
|
|
1833
1847
|
return;
|
|
1834
1848
|
const A = this;
|
|
1835
|
-
|
|
1849
|
+
m(this), this.__resizeRAF__ && Ge(this.__resizeRAF__), this.__resizeRAF__ = Ze(function() {
|
|
1836
1850
|
g(A) && (A.__resizeLast__.width = A.offsetWidth, A.__resizeLast__.height = A.offsetHeight, A.__resizeListeners__.forEach(function(D) {
|
|
1837
|
-
D.call(A,
|
|
1851
|
+
D.call(A, w);
|
|
1838
1852
|
}));
|
|
1839
1853
|
});
|
|
1840
1854
|
};
|
|
1841
|
-
let
|
|
1855
|
+
let x = !1, E = "";
|
|
1842
1856
|
c = "animationstart";
|
|
1843
|
-
const
|
|
1844
|
-
let
|
|
1857
|
+
const N = "Webkit Moz O ms".split(" ");
|
|
1858
|
+
let h = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), M = "";
|
|
1845
1859
|
{
|
|
1846
|
-
const
|
|
1847
|
-
if (
|
|
1848
|
-
for (let A = 0; A <
|
|
1849
|
-
if (
|
|
1850
|
-
M =
|
|
1860
|
+
const w = document.createElement("fakeelement");
|
|
1861
|
+
if (w.style.animationName !== void 0 && (x = !0), x === !1) {
|
|
1862
|
+
for (let A = 0; A < N.length; A++)
|
|
1863
|
+
if (w.style[N[A] + "AnimationName"] !== void 0) {
|
|
1864
|
+
M = N[A], E = "-" + M.toLowerCase() + "-", c = h[A], x = !0;
|
|
1851
1865
|
break;
|
|
1852
1866
|
}
|
|
1853
1867
|
}
|
|
1854
1868
|
}
|
|
1855
|
-
a = "resizeanim", n = "@" + E + "keyframes " + a + " { from { opacity: 0; } to { opacity: 0; } } ",
|
|
1869
|
+
a = "resizeanim", n = "@" + E + "keyframes " + a + " { from { opacity: 0; } to { opacity: 0; } } ", d = E + "animation: 1ms " + a + "; ";
|
|
1856
1870
|
}
|
|
1857
|
-
const
|
|
1858
|
-
if (!
|
|
1859
|
-
const E = (n || "") + ".resize-triggers { " + (
|
|
1860
|
-
|
|
1871
|
+
const T = function(x) {
|
|
1872
|
+
if (!x.getElementById("detectElementResize")) {
|
|
1873
|
+
const E = (n || "") + ".resize-triggers { " + (d || "") + '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%; }', N = x.head || x.getElementsByTagName("head")[0], h = x.createElement("style");
|
|
1874
|
+
h.id = "detectElementResize", h.type = "text/css", i != null && h.setAttribute("nonce", i), h.styleSheet ? h.styleSheet.cssText = E : h.appendChild(x.createTextNode(E)), N.appendChild(h);
|
|
1861
1875
|
}
|
|
1862
1876
|
};
|
|
1863
1877
|
return {
|
|
1864
|
-
addResizeListener: function(
|
|
1865
|
-
if (
|
|
1866
|
-
|
|
1878
|
+
addResizeListener: function(x, E) {
|
|
1879
|
+
if (y)
|
|
1880
|
+
x.attachEvent("onresize", E);
|
|
1867
1881
|
else {
|
|
1868
|
-
if (!
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
const M =
|
|
1872
|
-
M.className = "expand-trigger", M.appendChild(
|
|
1873
|
-
const
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
},
|
|
1882
|
+
if (!x.__resizeTriggers__) {
|
|
1883
|
+
const N = x.ownerDocument, h = q.getComputedStyle(x);
|
|
1884
|
+
h && h.position === "static" && (x.style.position = "relative"), T(N), x.__resizeLast__ = {}, x.__resizeListeners__ = [], (x.__resizeTriggers__ = N.createElement("div")).className = "resize-triggers";
|
|
1885
|
+
const M = N.createElement("div");
|
|
1886
|
+
M.className = "expand-trigger", M.appendChild(N.createElement("div"));
|
|
1887
|
+
const w = N.createElement("div");
|
|
1888
|
+
w.className = "contract-trigger", x.__resizeTriggers__.appendChild(M), x.__resizeTriggers__.appendChild(w), x.appendChild(x.__resizeTriggers__), m(x), x.addEventListener("scroll", o, !0), c && (x.__resizeTriggers__.__animationListener__ = function(z) {
|
|
1889
|
+
z.animationName === a && m(x);
|
|
1890
|
+
}, x.__resizeTriggers__.addEventListener(c, x.__resizeTriggers__.__animationListener__));
|
|
1877
1891
|
}
|
|
1878
|
-
|
|
1892
|
+
x.__resizeListeners__.push(E);
|
|
1879
1893
|
}
|
|
1880
1894
|
},
|
|
1881
|
-
removeResizeListener: function(
|
|
1882
|
-
if (
|
|
1883
|
-
|
|
1884
|
-
else if (
|
|
1885
|
-
|
|
1895
|
+
removeResizeListener: function(x, E) {
|
|
1896
|
+
if (y)
|
|
1897
|
+
x.detachEvent("onresize", E);
|
|
1898
|
+
else if (x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(E), 1), !x.__resizeListeners__.length) {
|
|
1899
|
+
x.removeEventListener("scroll", o, !0), x.__resizeTriggers__.__animationListener__ && (x.__resizeTriggers__.removeEventListener(c, x.__resizeTriggers__.__animationListener__), x.__resizeTriggers__.__animationListener__ = null);
|
|
1886
1900
|
try {
|
|
1887
|
-
|
|
1901
|
+
x.__resizeTriggers__ = !x.removeChild(x.__resizeTriggers__);
|
|
1888
1902
|
} catch {
|
|
1889
1903
|
}
|
|
1890
1904
|
}
|
|
1891
1905
|
}
|
|
1892
1906
|
};
|
|
1893
1907
|
}
|
|
1894
|
-
class
|
|
1908
|
+
class Zi extends Gt {
|
|
1895
1909
|
constructor(...n) {
|
|
1896
1910
|
super(...n), this.state = {
|
|
1897
1911
|
height: this.props.defaultHeight || 0,
|
|
@@ -1903,19 +1917,19 @@ class Gi extends Vt {
|
|
|
1903
1917
|
const {
|
|
1904
1918
|
disableHeight: a,
|
|
1905
1919
|
disableWidth: c,
|
|
1906
|
-
onResize:
|
|
1920
|
+
onResize: d
|
|
1907
1921
|
} = this.props;
|
|
1908
1922
|
if (this._parentNode) {
|
|
1909
|
-
var g,
|
|
1910
|
-
const
|
|
1911
|
-
(!a && (this.state.height !==
|
|
1912
|
-
height:
|
|
1923
|
+
var g, m, o, y;
|
|
1924
|
+
const T = window.getComputedStyle(this._parentNode) || {}, _ = parseFloat((g = T.paddingLeft) !== null && g !== void 0 ? g : "0"), S = parseFloat((m = T.paddingRight) !== null && m !== void 0 ? m : "0"), x = parseFloat((o = T.paddingTop) !== null && o !== void 0 ? o : "0"), E = parseFloat((y = T.paddingBottom) !== null && y !== void 0 ? y : "0"), N = this._parentNode.getBoundingClientRect(), h = N.height - x - E, M = N.width - _ - S, w = this._parentNode.offsetHeight - x - E, A = this._parentNode.offsetWidth - _ - S;
|
|
1925
|
+
(!a && (this.state.height !== w || this.state.scaledHeight !== h) || !c && (this.state.width !== A || this.state.scaledWidth !== M)) && (this.setState({
|
|
1926
|
+
height: w,
|
|
1913
1927
|
width: A,
|
|
1914
|
-
scaledHeight:
|
|
1928
|
+
scaledHeight: h,
|
|
1915
1929
|
scaledWidth: M
|
|
1916
|
-
}), typeof
|
|
1917
|
-
height:
|
|
1918
|
-
scaledHeight:
|
|
1930
|
+
}), typeof d == "function" && d({
|
|
1931
|
+
height: w,
|
|
1932
|
+
scaledHeight: h,
|
|
1919
1933
|
scaledWidth: M,
|
|
1920
1934
|
width: A
|
|
1921
1935
|
}));
|
|
@@ -1930,7 +1944,7 @@ class Gi extends Vt {
|
|
|
1930
1944
|
} = this.props;
|
|
1931
1945
|
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(() => {
|
|
1932
1946
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1933
|
-
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize =
|
|
1947
|
+
}), this._resizeObserver.observe(this._parentNode)) : (this._detectElementResize = Gi(n), this._detectElementResize.addResizeListener(this._parentNode, this._onResize)), this._onResize()));
|
|
1934
1948
|
}
|
|
1935
1949
|
componentWillUnmount() {
|
|
1936
1950
|
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()));
|
|
@@ -1940,304 +1954,304 @@ class Gi extends Vt {
|
|
|
1940
1954
|
children: n,
|
|
1941
1955
|
defaultHeight: a,
|
|
1942
1956
|
defaultWidth: c,
|
|
1943
|
-
disableHeight:
|
|
1957
|
+
disableHeight: d = !1,
|
|
1944
1958
|
disableWidth: g = !1,
|
|
1945
|
-
nonce:
|
|
1959
|
+
nonce: m,
|
|
1946
1960
|
onResize: o,
|
|
1947
|
-
style:
|
|
1948
|
-
tagName:
|
|
1961
|
+
style: y = {},
|
|
1962
|
+
tagName: T = "div",
|
|
1949
1963
|
..._
|
|
1950
1964
|
} = this.props, {
|
|
1951
|
-
height:
|
|
1952
|
-
scaledHeight:
|
|
1965
|
+
height: S,
|
|
1966
|
+
scaledHeight: x,
|
|
1953
1967
|
scaledWidth: E,
|
|
1954
|
-
width:
|
|
1955
|
-
} = this.state,
|
|
1968
|
+
width: N
|
|
1969
|
+
} = this.state, h = {
|
|
1956
1970
|
overflow: "visible"
|
|
1957
1971
|
}, M = {};
|
|
1958
|
-
let
|
|
1959
|
-
return
|
|
1972
|
+
let w = !1;
|
|
1973
|
+
return d || (S === 0 && (w = !0), h.height = 0, M.height = S, M.scaledHeight = x), g || (N === 0 && (w = !0), h.width = 0, M.width = N, M.scaledWidth = E), ze(T, {
|
|
1960
1974
|
ref: this._setRef,
|
|
1961
1975
|
style: {
|
|
1962
|
-
...
|
|
1963
|
-
...
|
|
1976
|
+
...h,
|
|
1977
|
+
...y
|
|
1964
1978
|
},
|
|
1965
1979
|
..._
|
|
1966
|
-
}, !
|
|
1980
|
+
}, !w && n(M));
|
|
1967
1981
|
}
|
|
1968
1982
|
}
|
|
1969
|
-
function
|
|
1970
|
-
return
|
|
1983
|
+
function Je() {
|
|
1984
|
+
return Je = Object.assign ? Object.assign.bind() : function(i) {
|
|
1971
1985
|
for (var n = 1; n < arguments.length; n++) {
|
|
1972
1986
|
var a = arguments[n];
|
|
1973
1987
|
for (var c in a)
|
|
1974
1988
|
Object.prototype.hasOwnProperty.call(a, c) && (i[c] = a[c]);
|
|
1975
1989
|
}
|
|
1976
1990
|
return i;
|
|
1977
|
-
},
|
|
1991
|
+
}, Je.apply(this, arguments);
|
|
1978
1992
|
}
|
|
1979
|
-
function
|
|
1993
|
+
function mt(i) {
|
|
1980
1994
|
if (i === void 0)
|
|
1981
1995
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1982
1996
|
return i;
|
|
1983
1997
|
}
|
|
1984
|
-
function
|
|
1985
|
-
return
|
|
1986
|
-
return c.__proto__ =
|
|
1987
|
-
},
|
|
1998
|
+
function Ke(i, n) {
|
|
1999
|
+
return Ke = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(c, d) {
|
|
2000
|
+
return c.__proto__ = d, c;
|
|
2001
|
+
}, Ke(i, n);
|
|
1988
2002
|
}
|
|
1989
|
-
function
|
|
1990
|
-
i.prototype = Object.create(n.prototype), i.prototype.constructor = i,
|
|
2003
|
+
function Ji(i, n) {
|
|
2004
|
+
i.prototype = Object.create(n.prototype), i.prototype.constructor = i, Ke(i, n);
|
|
1991
2005
|
}
|
|
1992
|
-
var
|
|
2006
|
+
var gt = Number.isNaN || function(n) {
|
|
1993
2007
|
return typeof n == "number" && n !== n;
|
|
1994
2008
|
};
|
|
1995
|
-
function Ji(i, n) {
|
|
1996
|
-
return !!(i === n || ft(i) && ft(n));
|
|
1997
|
-
}
|
|
1998
2009
|
function Ki(i, n) {
|
|
2010
|
+
return !!(i === n || gt(i) && gt(n));
|
|
2011
|
+
}
|
|
2012
|
+
function Xi(i, n) {
|
|
1999
2013
|
if (i.length !== n.length)
|
|
2000
2014
|
return !1;
|
|
2001
2015
|
for (var a = 0; a < i.length; a++)
|
|
2002
|
-
if (!
|
|
2016
|
+
if (!Ki(i[a], n[a]))
|
|
2003
2017
|
return !1;
|
|
2004
2018
|
return !0;
|
|
2005
2019
|
}
|
|
2006
|
-
function
|
|
2007
|
-
n === void 0 && (n =
|
|
2008
|
-
var a, c = [],
|
|
2009
|
-
function
|
|
2010
|
-
for (var o = [],
|
|
2011
|
-
o[
|
|
2012
|
-
return g && a === this && n(o, c) || (
|
|
2013
|
-
}
|
|
2014
|
-
return
|
|
2020
|
+
function Pe(i, n) {
|
|
2021
|
+
n === void 0 && (n = Xi);
|
|
2022
|
+
var a, c = [], d, g = !1;
|
|
2023
|
+
function m() {
|
|
2024
|
+
for (var o = [], y = 0; y < arguments.length; y++)
|
|
2025
|
+
o[y] = arguments[y];
|
|
2026
|
+
return g && a === this && n(o, c) || (d = i.apply(this, o), g = !0, a = this, c = o), d;
|
|
2027
|
+
}
|
|
2028
|
+
return m;
|
|
2015
2029
|
}
|
|
2016
|
-
var
|
|
2030
|
+
var en = typeof performance == "object" && typeof performance.now == "function", It = en ? function() {
|
|
2017
2031
|
return performance.now();
|
|
2018
2032
|
} : function() {
|
|
2019
2033
|
return Date.now();
|
|
2020
2034
|
};
|
|
2021
|
-
function
|
|
2035
|
+
function yt(i) {
|
|
2022
2036
|
cancelAnimationFrame(i.id);
|
|
2023
2037
|
}
|
|
2024
|
-
function
|
|
2025
|
-
var a =
|
|
2038
|
+
function tn(i, n) {
|
|
2039
|
+
var a = It();
|
|
2026
2040
|
function c() {
|
|
2027
|
-
|
|
2041
|
+
It() - a >= n ? i.call(null) : d.id = requestAnimationFrame(c);
|
|
2028
2042
|
}
|
|
2029
|
-
var
|
|
2043
|
+
var d = {
|
|
2030
2044
|
id: requestAnimationFrame(c)
|
|
2031
2045
|
};
|
|
2032
|
-
return
|
|
2046
|
+
return d;
|
|
2033
2047
|
}
|
|
2034
|
-
var
|
|
2035
|
-
function
|
|
2036
|
-
if (i === void 0 && (i = !1),
|
|
2048
|
+
var qe = -1;
|
|
2049
|
+
function xt(i) {
|
|
2050
|
+
if (i === void 0 && (i = !1), qe === -1 || i) {
|
|
2037
2051
|
var n = document.createElement("div"), a = n.style;
|
|
2038
|
-
a.width = "50px", a.height = "50px", a.overflow = "scroll", document.body.appendChild(n),
|
|
2052
|
+
a.width = "50px", a.height = "50px", a.overflow = "scroll", document.body.appendChild(n), qe = n.offsetWidth - n.clientWidth, document.body.removeChild(n);
|
|
2039
2053
|
}
|
|
2040
|
-
return
|
|
2054
|
+
return qe;
|
|
2041
2055
|
}
|
|
2042
2056
|
var ce = null;
|
|
2043
|
-
function
|
|
2057
|
+
function wt(i) {
|
|
2044
2058
|
if (i === void 0 && (i = !1), ce === null || i) {
|
|
2045
2059
|
var n = document.createElement("div"), a = n.style;
|
|
2046
2060
|
a.width = "50px", a.height = "50px", a.overflow = "scroll", a.direction = "rtl";
|
|
2047
|
-
var c = document.createElement("div"),
|
|
2048
|
-
return
|
|
2061
|
+
var c = document.createElement("div"), d = c.style;
|
|
2062
|
+
return d.width = "100px", d.height = "100px", n.appendChild(c), document.body.appendChild(n), n.scrollLeft > 0 ? ce = "positive-descending" : (n.scrollLeft = 1, n.scrollLeft === 0 ? ce = "negative" : ce = "positive-ascending"), document.body.removeChild(n), ce;
|
|
2049
2063
|
}
|
|
2050
2064
|
return ce;
|
|
2051
2065
|
}
|
|
2052
|
-
var
|
|
2066
|
+
var rn = 150, nn = function(n, a) {
|
|
2053
2067
|
return n;
|
|
2054
2068
|
};
|
|
2055
|
-
function
|
|
2056
|
-
var n, a = i.getItemOffset, c = i.getEstimatedTotalSize,
|
|
2057
|
-
return n = /* @__PURE__ */ function(
|
|
2058
|
-
|
|
2059
|
-
function
|
|
2060
|
-
var
|
|
2061
|
-
return
|
|
2062
|
-
instance:
|
|
2069
|
+
function sn(i) {
|
|
2070
|
+
var n, a = i.getItemOffset, c = i.getEstimatedTotalSize, d = i.getItemSize, g = i.getOffsetForIndexAndAlignment, m = i.getStartIndexForOffset, o = i.getStopIndexForStartIndex, y = i.initInstanceProps, T = i.shouldResetStyleCacheOnItemSizeChange, _ = i.validateProps;
|
|
2071
|
+
return n = /* @__PURE__ */ function(S) {
|
|
2072
|
+
Ji(x, S);
|
|
2073
|
+
function x(N) {
|
|
2074
|
+
var h;
|
|
2075
|
+
return h = S.call(this, N) || this, h._instanceProps = y(h.props, mt(h)), h._outerRef = void 0, h._resetIsScrollingTimeoutId = null, h.state = {
|
|
2076
|
+
instance: mt(h),
|
|
2063
2077
|
isScrolling: !1,
|
|
2064
2078
|
scrollDirection: "forward",
|
|
2065
|
-
scrollOffset: typeof
|
|
2079
|
+
scrollOffset: typeof h.props.initialScrollOffset == "number" ? h.props.initialScrollOffset : 0,
|
|
2066
2080
|
scrollUpdateWasRequested: !1
|
|
2067
|
-
},
|
|
2068
|
-
return
|
|
2081
|
+
}, h._callOnItemsRendered = void 0, h._callOnItemsRendered = Pe(function(M, w, A, z) {
|
|
2082
|
+
return h.props.onItemsRendered({
|
|
2069
2083
|
overscanStartIndex: M,
|
|
2070
|
-
overscanStopIndex:
|
|
2084
|
+
overscanStopIndex: w,
|
|
2071
2085
|
visibleStartIndex: A,
|
|
2072
|
-
visibleStopIndex:
|
|
2086
|
+
visibleStopIndex: z
|
|
2073
2087
|
});
|
|
2074
|
-
}),
|
|
2075
|
-
return
|
|
2088
|
+
}), h._callOnScroll = void 0, h._callOnScroll = Pe(function(M, w, A) {
|
|
2089
|
+
return h.props.onScroll({
|
|
2076
2090
|
scrollDirection: M,
|
|
2077
|
-
scrollOffset:
|
|
2091
|
+
scrollOffset: w,
|
|
2078
2092
|
scrollUpdateWasRequested: A
|
|
2079
2093
|
});
|
|
2080
|
-
}),
|
|
2081
|
-
var
|
|
2094
|
+
}), h._getItemStyle = void 0, h._getItemStyle = function(M) {
|
|
2095
|
+
var w = h.props, A = w.direction, z = w.itemSize, O = w.layout, D = h._getItemStyleCache(T && z, T && O, T && A), R;
|
|
2082
2096
|
if (D.hasOwnProperty(M))
|
|
2083
2097
|
R = D[M];
|
|
2084
2098
|
else {
|
|
2085
|
-
var j = a(
|
|
2099
|
+
var j = a(h.props, M, h._instanceProps), Y = d(h.props, M, h._instanceProps), W = A === "horizontal" || O === "horizontal", ne = A === "rtl", se = W ? j : 0;
|
|
2086
2100
|
D[M] = R = {
|
|
2087
2101
|
position: "absolute",
|
|
2088
2102
|
left: ne ? void 0 : se,
|
|
2089
2103
|
right: ne ? se : void 0,
|
|
2090
|
-
top:
|
|
2091
|
-
height:
|
|
2092
|
-
width:
|
|
2104
|
+
top: W ? 0 : j,
|
|
2105
|
+
height: W ? "100%" : Y,
|
|
2106
|
+
width: W ? Y : "100%"
|
|
2093
2107
|
};
|
|
2094
2108
|
}
|
|
2095
2109
|
return R;
|
|
2096
|
-
},
|
|
2110
|
+
}, h._getItemStyleCache = void 0, h._getItemStyleCache = Pe(function(M, w, A) {
|
|
2097
2111
|
return {};
|
|
2098
|
-
}),
|
|
2099
|
-
var
|
|
2100
|
-
|
|
2101
|
-
if (D.scrollOffset ===
|
|
2112
|
+
}), h._onScrollHorizontal = function(M) {
|
|
2113
|
+
var w = M.currentTarget, A = w.clientWidth, z = w.scrollLeft, O = w.scrollWidth;
|
|
2114
|
+
h.setState(function(D) {
|
|
2115
|
+
if (D.scrollOffset === z)
|
|
2102
2116
|
return null;
|
|
2103
|
-
var R =
|
|
2117
|
+
var R = h.props.direction, j = z;
|
|
2104
2118
|
if (R === "rtl")
|
|
2105
|
-
switch (
|
|
2119
|
+
switch (wt()) {
|
|
2106
2120
|
case "negative":
|
|
2107
|
-
j = -
|
|
2121
|
+
j = -z;
|
|
2108
2122
|
break;
|
|
2109
2123
|
case "positive-descending":
|
|
2110
|
-
j = O - A -
|
|
2124
|
+
j = O - A - z;
|
|
2111
2125
|
break;
|
|
2112
2126
|
}
|
|
2113
2127
|
return j = Math.max(0, Math.min(j, O - A)), {
|
|
2114
2128
|
isScrolling: !0,
|
|
2115
|
-
scrollDirection: D.scrollOffset <
|
|
2129
|
+
scrollDirection: D.scrollOffset < z ? "forward" : "backward",
|
|
2116
2130
|
scrollOffset: j,
|
|
2117
2131
|
scrollUpdateWasRequested: !1
|
|
2118
2132
|
};
|
|
2119
|
-
},
|
|
2120
|
-
},
|
|
2121
|
-
var
|
|
2122
|
-
|
|
2133
|
+
}, h._resetIsScrollingDebounced);
|
|
2134
|
+
}, h._onScrollVertical = function(M) {
|
|
2135
|
+
var w = M.currentTarget, A = w.clientHeight, z = w.scrollHeight, O = w.scrollTop;
|
|
2136
|
+
h.setState(function(D) {
|
|
2123
2137
|
if (D.scrollOffset === O)
|
|
2124
2138
|
return null;
|
|
2125
|
-
var R = Math.max(0, Math.min(O,
|
|
2139
|
+
var R = Math.max(0, Math.min(O, z - A));
|
|
2126
2140
|
return {
|
|
2127
2141
|
isScrolling: !0,
|
|
2128
2142
|
scrollDirection: D.scrollOffset < R ? "forward" : "backward",
|
|
2129
2143
|
scrollOffset: R,
|
|
2130
2144
|
scrollUpdateWasRequested: !1
|
|
2131
2145
|
};
|
|
2132
|
-
},
|
|
2133
|
-
},
|
|
2134
|
-
var
|
|
2135
|
-
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2138
|
-
},
|
|
2139
|
-
|
|
2146
|
+
}, h._resetIsScrollingDebounced);
|
|
2147
|
+
}, h._outerRefSetter = function(M) {
|
|
2148
|
+
var w = h.props.outerRef;
|
|
2149
|
+
h._outerRef = M, typeof w == "function" ? w(M) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = M);
|
|
2150
|
+
}, h._resetIsScrollingDebounced = function() {
|
|
2151
|
+
h._resetIsScrollingTimeoutId !== null && yt(h._resetIsScrollingTimeoutId), h._resetIsScrollingTimeoutId = tn(h._resetIsScrolling, rn);
|
|
2152
|
+
}, h._resetIsScrolling = function() {
|
|
2153
|
+
h._resetIsScrollingTimeoutId = null, h.setState({
|
|
2140
2154
|
isScrolling: !1
|
|
2141
2155
|
}, function() {
|
|
2142
|
-
|
|
2156
|
+
h._getItemStyleCache(-1, null);
|
|
2143
2157
|
});
|
|
2144
|
-
},
|
|
2158
|
+
}, h;
|
|
2145
2159
|
}
|
|
2146
|
-
|
|
2147
|
-
return
|
|
2160
|
+
x.getDerivedStateFromProps = function(h, M) {
|
|
2161
|
+
return on(h, M), _(h), null;
|
|
2148
2162
|
};
|
|
2149
|
-
var E =
|
|
2150
|
-
return E.scrollTo = function(
|
|
2151
|
-
|
|
2152
|
-
return M.scrollOffset ===
|
|
2153
|
-
scrollDirection: M.scrollOffset <
|
|
2154
|
-
scrollOffset:
|
|
2163
|
+
var E = x.prototype;
|
|
2164
|
+
return E.scrollTo = function(h) {
|
|
2165
|
+
h = Math.max(0, h), this.setState(function(M) {
|
|
2166
|
+
return M.scrollOffset === h ? null : {
|
|
2167
|
+
scrollDirection: M.scrollOffset < h ? "forward" : "backward",
|
|
2168
|
+
scrollOffset: h,
|
|
2155
2169
|
scrollUpdateWasRequested: !0
|
|
2156
2170
|
};
|
|
2157
2171
|
}, this._resetIsScrollingDebounced);
|
|
2158
|
-
}, E.scrollToItem = function(
|
|
2172
|
+
}, E.scrollToItem = function(h, M) {
|
|
2159
2173
|
M === void 0 && (M = "auto");
|
|
2160
|
-
var
|
|
2161
|
-
|
|
2174
|
+
var w = this.props, A = w.itemCount, z = w.layout, O = this.state.scrollOffset;
|
|
2175
|
+
h = Math.max(0, Math.min(h, A - 1));
|
|
2162
2176
|
var D = 0;
|
|
2163
2177
|
if (this._outerRef) {
|
|
2164
2178
|
var R = this._outerRef;
|
|
2165
|
-
|
|
2179
|
+
z === "vertical" ? D = R.scrollWidth > R.clientWidth ? xt() : 0 : D = R.scrollHeight > R.clientHeight ? xt() : 0;
|
|
2166
2180
|
}
|
|
2167
|
-
this.scrollTo(g(this.props,
|
|
2181
|
+
this.scrollTo(g(this.props, h, M, O, this._instanceProps, D));
|
|
2168
2182
|
}, E.componentDidMount = function() {
|
|
2169
|
-
var
|
|
2170
|
-
if (typeof
|
|
2171
|
-
var
|
|
2172
|
-
M === "horizontal" || A === "horizontal" ?
|
|
2183
|
+
var h = this.props, M = h.direction, w = h.initialScrollOffset, A = h.layout;
|
|
2184
|
+
if (typeof w == "number" && this._outerRef != null) {
|
|
2185
|
+
var z = this._outerRef;
|
|
2186
|
+
M === "horizontal" || A === "horizontal" ? z.scrollLeft = w : z.scrollTop = w;
|
|
2173
2187
|
}
|
|
2174
2188
|
this._callPropsCallbacks();
|
|
2175
2189
|
}, E.componentDidUpdate = function() {
|
|
2176
|
-
var
|
|
2190
|
+
var h = this.props, M = h.direction, w = h.layout, A = this.state, z = A.scrollOffset, O = A.scrollUpdateWasRequested;
|
|
2177
2191
|
if (O && this._outerRef != null) {
|
|
2178
2192
|
var D = this._outerRef;
|
|
2179
|
-
if (M === "horizontal" ||
|
|
2193
|
+
if (M === "horizontal" || w === "horizontal")
|
|
2180
2194
|
if (M === "rtl")
|
|
2181
|
-
switch (
|
|
2195
|
+
switch (wt()) {
|
|
2182
2196
|
case "negative":
|
|
2183
|
-
D.scrollLeft = -
|
|
2197
|
+
D.scrollLeft = -z;
|
|
2184
2198
|
break;
|
|
2185
2199
|
case "positive-ascending":
|
|
2186
|
-
D.scrollLeft =
|
|
2200
|
+
D.scrollLeft = z;
|
|
2187
2201
|
break;
|
|
2188
2202
|
default:
|
|
2189
2203
|
var R = D.clientWidth, j = D.scrollWidth;
|
|
2190
|
-
D.scrollLeft = j - R -
|
|
2204
|
+
D.scrollLeft = j - R - z;
|
|
2191
2205
|
break;
|
|
2192
2206
|
}
|
|
2193
2207
|
else
|
|
2194
|
-
D.scrollLeft =
|
|
2208
|
+
D.scrollLeft = z;
|
|
2195
2209
|
else
|
|
2196
|
-
D.scrollTop =
|
|
2210
|
+
D.scrollTop = z;
|
|
2197
2211
|
}
|
|
2198
2212
|
this._callPropsCallbacks();
|
|
2199
2213
|
}, E.componentWillUnmount = function() {
|
|
2200
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
2214
|
+
this._resetIsScrollingTimeoutId !== null && yt(this._resetIsScrollingTimeoutId);
|
|
2201
2215
|
}, E.render = function() {
|
|
2202
|
-
var
|
|
2216
|
+
var h = this.props, M = h.children, w = h.className, A = h.direction, z = h.height, O = h.innerRef, D = h.innerElementType, R = h.innerTagName, j = h.itemCount, Y = h.itemData, W = h.itemKey, ne = W === void 0 ? nn : W, se = h.layout, Oe = h.outerElementType, Be = h.outerTagName, Me = h.style, Ae = h.useIsScrolling, Re = h.width, Ee = this.state.isScrolling, pe = A === "horizontal" || se === "horizontal", Le = pe ? this._onScrollHorizontal : this._onScrollVertical, Te = this._getRangeToRender(), F = Te[0], $ = Te[1], fe = [];
|
|
2203
2217
|
if (j > 0)
|
|
2204
2218
|
for (var ee = F; ee <= $; ee++)
|
|
2205
|
-
fe.push(
|
|
2219
|
+
fe.push(ze(M, {
|
|
2206
2220
|
data: Y,
|
|
2207
2221
|
key: ne(ee, Y),
|
|
2208
2222
|
index: ee,
|
|
2209
|
-
isScrolling:
|
|
2223
|
+
isScrolling: Ae ? Ee : void 0,
|
|
2210
2224
|
style: this._getItemStyle(ee)
|
|
2211
2225
|
}));
|
|
2212
2226
|
var me = c(this.props, this._instanceProps);
|
|
2213
|
-
return
|
|
2214
|
-
className:
|
|
2215
|
-
onScroll:
|
|
2227
|
+
return ze(Oe || Be || "div", {
|
|
2228
|
+
className: w,
|
|
2229
|
+
onScroll: Le,
|
|
2216
2230
|
ref: this._outerRefSetter,
|
|
2217
|
-
style:
|
|
2231
|
+
style: Je({
|
|
2218
2232
|
position: "relative",
|
|
2219
|
-
height:
|
|
2220
|
-
width:
|
|
2233
|
+
height: z,
|
|
2234
|
+
width: Re,
|
|
2221
2235
|
overflow: "auto",
|
|
2222
2236
|
WebkitOverflowScrolling: "touch",
|
|
2223
2237
|
willChange: "transform",
|
|
2224
2238
|
direction: A
|
|
2225
|
-
},
|
|
2226
|
-
},
|
|
2239
|
+
}, Me)
|
|
2240
|
+
}, ze(D || R || "div", {
|
|
2227
2241
|
children: fe,
|
|
2228
2242
|
ref: O,
|
|
2229
2243
|
style: {
|
|
2230
2244
|
height: pe ? "100%" : me,
|
|
2231
|
-
pointerEvents:
|
|
2245
|
+
pointerEvents: Ee ? "none" : void 0,
|
|
2232
2246
|
width: pe ? me : "100%"
|
|
2233
2247
|
}
|
|
2234
2248
|
}));
|
|
2235
2249
|
}, E._callPropsCallbacks = function() {
|
|
2236
2250
|
if (typeof this.props.onItemsRendered == "function") {
|
|
2237
|
-
var
|
|
2238
|
-
if (
|
|
2239
|
-
var M = this._getRangeToRender(),
|
|
2240
|
-
this._callOnItemsRendered(
|
|
2251
|
+
var h = this.props.itemCount;
|
|
2252
|
+
if (h > 0) {
|
|
2253
|
+
var M = this._getRangeToRender(), w = M[0], A = M[1], z = M[2], O = M[3];
|
|
2254
|
+
this._callOnItemsRendered(w, A, z, O);
|
|
2241
2255
|
}
|
|
2242
2256
|
}
|
|
2243
2257
|
if (typeof this.props.onScroll == "function") {
|
|
@@ -2245,13 +2259,13 @@ function nn(i) {
|
|
|
2245
2259
|
this._callOnScroll(R, j, Y);
|
|
2246
2260
|
}
|
|
2247
2261
|
}, E._getRangeToRender = function() {
|
|
2248
|
-
var
|
|
2262
|
+
var h = this.props, M = h.itemCount, w = h.overscanCount, A = this.state, z = A.isScrolling, O = A.scrollDirection, D = A.scrollOffset;
|
|
2249
2263
|
if (M === 0)
|
|
2250
2264
|
return [0, 0, 0, 0];
|
|
2251
|
-
var R =
|
|
2252
|
-
return [Math.max(0, R - Y), Math.max(0, Math.min(M - 1, j +
|
|
2253
|
-
},
|
|
2254
|
-
}(
|
|
2265
|
+
var R = m(this.props, D, this._instanceProps), j = o(this.props, R, D, this._instanceProps), Y = !z || O === "backward" ? Math.max(1, w) : 1, W = !z || O === "forward" ? Math.max(1, w) : 1;
|
|
2266
|
+
return [Math.max(0, R - Y), Math.max(0, Math.min(M - 1, j + W)), R, j];
|
|
2267
|
+
}, x;
|
|
2268
|
+
}(_t), n.defaultProps = {
|
|
2255
2269
|
direction: "ltr",
|
|
2256
2270
|
itemData: void 0,
|
|
2257
2271
|
layout: "vertical",
|
|
@@ -2259,9 +2273,9 @@ function nn(i) {
|
|
|
2259
2273
|
useIsScrolling: !1
|
|
2260
2274
|
}, n;
|
|
2261
2275
|
}
|
|
2262
|
-
var
|
|
2276
|
+
var on = function(n, a) {
|
|
2263
2277
|
n.children, n.direction, n.height, n.layout, n.innerTagName, n.outerTagName, n.width, a.instance;
|
|
2264
|
-
},
|
|
2278
|
+
}, an = /* @__PURE__ */ sn({
|
|
2265
2279
|
getItemOffset: function(n, a) {
|
|
2266
2280
|
var c = n.itemSize;
|
|
2267
2281
|
return a * c;
|
|
@@ -2274,30 +2288,30 @@ var sn = function(n, a) {
|
|
|
2274
2288
|
var a = n.itemCount, c = n.itemSize;
|
|
2275
2289
|
return c * a;
|
|
2276
2290
|
},
|
|
2277
|
-
getOffsetForIndexAndAlignment: function(n, a, c,
|
|
2278
|
-
var o = n.direction,
|
|
2279
|
-
switch (c === "smart" && (
|
|
2291
|
+
getOffsetForIndexAndAlignment: function(n, a, c, d, g, m) {
|
|
2292
|
+
var o = n.direction, y = n.height, T = n.itemCount, _ = n.itemSize, S = n.layout, x = n.width, E = o === "horizontal" || S === "horizontal", N = E ? x : y, h = Math.max(0, T * _ - N), M = Math.min(h, a * _), w = Math.max(0, a * _ - N + _ + m);
|
|
2293
|
+
switch (c === "smart" && (d >= w - N && d <= M + N ? c = "auto" : c = "center"), c) {
|
|
2280
2294
|
case "start":
|
|
2281
2295
|
return M;
|
|
2282
2296
|
case "end":
|
|
2283
|
-
return
|
|
2297
|
+
return w;
|
|
2284
2298
|
case "center": {
|
|
2285
|
-
var A = Math.round(
|
|
2286
|
-
return A < Math.ceil(
|
|
2299
|
+
var A = Math.round(w + (M - w) / 2);
|
|
2300
|
+
return A < Math.ceil(N / 2) ? 0 : A > h + Math.floor(N / 2) ? h : A;
|
|
2287
2301
|
}
|
|
2288
2302
|
case "auto":
|
|
2289
2303
|
default:
|
|
2290
|
-
return
|
|
2304
|
+
return d >= w && d <= M ? d : d < w ? w : M;
|
|
2291
2305
|
}
|
|
2292
2306
|
},
|
|
2293
2307
|
getStartIndexForOffset: function(n, a) {
|
|
2294
|
-
var c = n.itemCount,
|
|
2295
|
-
return Math.max(0, Math.min(c - 1, Math.floor(a /
|
|
2308
|
+
var c = n.itemCount, d = n.itemSize;
|
|
2309
|
+
return Math.max(0, Math.min(c - 1, Math.floor(a / d)));
|
|
2296
2310
|
},
|
|
2297
2311
|
getStopIndexForStartIndex: function(n, a, c) {
|
|
2298
|
-
var
|
|
2312
|
+
var d = n.direction, g = n.height, m = n.itemCount, o = n.itemSize, y = n.layout, T = n.width, _ = d === "horizontal" || y === "horizontal", S = a * o, x = _ ? T : g, E = Math.ceil((x + c - S) / o);
|
|
2299
2313
|
return Math.max(0, Math.min(
|
|
2300
|
-
|
|
2314
|
+
m - 1,
|
|
2301
2315
|
a + E - 1
|
|
2302
2316
|
// -1 is because stop index is inclusive
|
|
2303
2317
|
));
|
|
@@ -2309,38 +2323,38 @@ var sn = function(n, a) {
|
|
|
2309
2323
|
n.itemSize;
|
|
2310
2324
|
}
|
|
2311
2325
|
});
|
|
2312
|
-
function an(i) {
|
|
2313
|
-
var n = i.lastRenderedStartIndex, a = i.lastRenderedStopIndex, c = i.startIndex, h = i.stopIndex;
|
|
2314
|
-
return !(c > a || h < n);
|
|
2315
|
-
}
|
|
2316
2326
|
function ln(i) {
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2327
|
+
var n = i.lastRenderedStartIndex, a = i.lastRenderedStopIndex, c = i.startIndex, d = i.stopIndex;
|
|
2328
|
+
return !(c > a || d < n);
|
|
2329
|
+
}
|
|
2330
|
+
function cn(i) {
|
|
2331
|
+
for (var n = i.isItemLoaded, a = i.itemCount, c = i.minimumBatchSize, d = i.startIndex, g = i.stopIndex, m = [], o = null, y = null, T = d; T <= g; T++) {
|
|
2332
|
+
var _ = n(T);
|
|
2333
|
+
_ ? y !== null && (m.push(o, y), o = y = null) : (y = T, o === null && (o = T));
|
|
2334
|
+
}
|
|
2335
|
+
if (y !== null) {
|
|
2336
|
+
for (var S = Math.min(Math.max(y, o + c - 1), a - 1), x = y + 1; x <= S && !n(x); x++)
|
|
2337
|
+
y = x;
|
|
2338
|
+
m.push(o, y);
|
|
2339
|
+
}
|
|
2340
|
+
if (m.length)
|
|
2341
|
+
for (; m[1] - m[0] + 1 < c && m[0] > 0; ) {
|
|
2342
|
+
var E = m[0] - 1;
|
|
2329
2343
|
if (!n(E))
|
|
2330
|
-
|
|
2344
|
+
m[0] = E;
|
|
2331
2345
|
else
|
|
2332
2346
|
break;
|
|
2333
2347
|
}
|
|
2334
|
-
return
|
|
2348
|
+
return m;
|
|
2335
2349
|
}
|
|
2336
|
-
var
|
|
2350
|
+
var un = function(i, n) {
|
|
2337
2351
|
if (!(i instanceof n))
|
|
2338
2352
|
throw new TypeError("Cannot call a class as a function");
|
|
2339
|
-
},
|
|
2353
|
+
}, dn = function() {
|
|
2340
2354
|
function i(n, a) {
|
|
2341
2355
|
for (var c = 0; c < a.length; c++) {
|
|
2342
|
-
var
|
|
2343
|
-
|
|
2356
|
+
var d = a[c];
|
|
2357
|
+
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(n, d.key, d);
|
|
2344
2358
|
}
|
|
2345
2359
|
}
|
|
2346
2360
|
return function(n, a, c) {
|
|
@@ -2357,25 +2371,25 @@ var cn = function(i, n) {
|
|
|
2357
2371
|
configurable: !0
|
|
2358
2372
|
}
|
|
2359
2373
|
}), n && (Object.setPrototypeOf ? Object.setPrototypeOf(i, n) : i.__proto__ = n);
|
|
2360
|
-
},
|
|
2374
|
+
}, Mt = function(i, n) {
|
|
2361
2375
|
if (!i)
|
|
2362
2376
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
2363
2377
|
return n && (typeof n == "object" || typeof n == "function") ? n : i;
|
|
2364
|
-
},
|
|
2378
|
+
}, pn = function(i) {
|
|
2365
2379
|
hn(n, i);
|
|
2366
2380
|
function n() {
|
|
2367
|
-
var a, c,
|
|
2368
|
-
|
|
2369
|
-
for (var
|
|
2370
|
-
o[
|
|
2371
|
-
return g = (c = (
|
|
2372
|
-
var _ =
|
|
2373
|
-
|
|
2374
|
-
},
|
|
2375
|
-
|
|
2376
|
-
}, c),
|
|
2377
|
-
}
|
|
2378
|
-
return
|
|
2381
|
+
var a, c, d, g;
|
|
2382
|
+
un(this, n);
|
|
2383
|
+
for (var m = arguments.length, o = Array(m), y = 0; y < m; y++)
|
|
2384
|
+
o[y] = arguments[y];
|
|
2385
|
+
return g = (c = (d = Mt(this, (a = n.__proto__ || Object.getPrototypeOf(n)).call.apply(a, [this].concat(o))), d), d._lastRenderedStartIndex = -1, d._lastRenderedStopIndex = -1, d._memoizedUnloadedRanges = [], d._onItemsRendered = function(T) {
|
|
2386
|
+
var _ = T.visibleStartIndex, S = T.visibleStopIndex;
|
|
2387
|
+
d._lastRenderedStartIndex = _, d._lastRenderedStopIndex = S, d._ensureRowsLoaded(_, S);
|
|
2388
|
+
}, d._setRef = function(T) {
|
|
2389
|
+
d._listRef = T;
|
|
2390
|
+
}, c), Mt(d, g);
|
|
2391
|
+
}
|
|
2392
|
+
return dn(n, [{
|
|
2379
2393
|
key: "resetloadMoreItemsCache",
|
|
2380
2394
|
value: function() {
|
|
2381
2395
|
var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
@@ -2396,109 +2410,109 @@ var cn = function(i, n) {
|
|
|
2396
2410
|
}
|
|
2397
2411
|
}, {
|
|
2398
2412
|
key: "_ensureRowsLoaded",
|
|
2399
|
-
value: function(c,
|
|
2400
|
-
var g = this.props,
|
|
2401
|
-
isItemLoaded:
|
|
2413
|
+
value: function(c, d) {
|
|
2414
|
+
var g = this.props, m = g.isItemLoaded, o = g.itemCount, y = g.minimumBatchSize, T = y === void 0 ? 10 : y, _ = g.threshold, S = _ === void 0 ? 15 : _, x = cn({
|
|
2415
|
+
isItemLoaded: m,
|
|
2402
2416
|
itemCount: o,
|
|
2403
|
-
minimumBatchSize:
|
|
2404
|
-
startIndex: Math.max(0, c -
|
|
2405
|
-
stopIndex: Math.min(o - 1,
|
|
2417
|
+
minimumBatchSize: T,
|
|
2418
|
+
startIndex: Math.max(0, c - S),
|
|
2419
|
+
stopIndex: Math.min(o - 1, d + S)
|
|
2406
2420
|
});
|
|
2407
|
-
(this._memoizedUnloadedRanges.length !==
|
|
2408
|
-
return
|
|
2409
|
-
})) && (this._memoizedUnloadedRanges =
|
|
2421
|
+
(this._memoizedUnloadedRanges.length !== x.length || this._memoizedUnloadedRanges.some(function(E, N) {
|
|
2422
|
+
return x[N] !== E;
|
|
2423
|
+
})) && (this._memoizedUnloadedRanges = x, this._loadUnloadedRanges(x));
|
|
2410
2424
|
}
|
|
2411
2425
|
}, {
|
|
2412
2426
|
key: "_loadUnloadedRanges",
|
|
2413
2427
|
value: function(c) {
|
|
2414
|
-
for (var
|
|
2415
|
-
var _ = c[
|
|
2416
|
-
|
|
2417
|
-
if (
|
|
2418
|
-
lastRenderedStartIndex:
|
|
2419
|
-
lastRenderedStopIndex:
|
|
2428
|
+
for (var d = this, g = this.props.loadMoreItems || this.props.loadMoreRows, m = function(T) {
|
|
2429
|
+
var _ = c[T], S = c[T + 1], x = g(_, S);
|
|
2430
|
+
x != null && x.then(function() {
|
|
2431
|
+
if (ln({
|
|
2432
|
+
lastRenderedStartIndex: d._lastRenderedStartIndex,
|
|
2433
|
+
lastRenderedStopIndex: d._lastRenderedStopIndex,
|
|
2420
2434
|
startIndex: _,
|
|
2421
|
-
stopIndex:
|
|
2435
|
+
stopIndex: S
|
|
2422
2436
|
})) {
|
|
2423
|
-
if (
|
|
2437
|
+
if (d._listRef == null)
|
|
2424
2438
|
return;
|
|
2425
|
-
typeof
|
|
2439
|
+
typeof d._listRef.resetAfterIndex == "function" ? d._listRef.resetAfterIndex(_, !0) : (typeof d._listRef._getItemStyleCache == "function" && d._listRef._getItemStyleCache(-1), d._listRef.forceUpdate());
|
|
2426
2440
|
}
|
|
2427
2441
|
});
|
|
2428
2442
|
}, o = 0; o < c.length; o += 2)
|
|
2429
|
-
|
|
2443
|
+
m(o);
|
|
2430
2444
|
}
|
|
2431
2445
|
}]), n;
|
|
2432
|
-
}(
|
|
2433
|
-
const
|
|
2446
|
+
}(_t);
|
|
2447
|
+
const fn = () => V, mn = /* @__PURE__ */ I("div")({
|
|
2434
2448
|
name: "a",
|
|
2435
2449
|
class: "a1w9zony",
|
|
2436
2450
|
propsAsIs: !1
|
|
2437
|
-
}),
|
|
2451
|
+
}), gn = /* @__PURE__ */ I("div")({
|
|
2438
2452
|
name: "l",
|
|
2439
2453
|
class: "l16qcfv8",
|
|
2440
2454
|
propsAsIs: !1
|
|
2441
|
-
}),
|
|
2455
|
+
}), In = /* @__PURE__ */ I("img")({
|
|
2442
2456
|
name: "p",
|
|
2443
2457
|
class: "p1gmcc5f",
|
|
2444
2458
|
propsAsIs: !1
|
|
2445
|
-
}),
|
|
2459
|
+
}), yn = /* @__PURE__ */ I("div")({
|
|
2446
2460
|
name: "s",
|
|
2447
2461
|
class: "s1doddh0",
|
|
2448
2462
|
propsAsIs: !1
|
|
2449
|
-
}),
|
|
2463
|
+
}), xn = /* @__PURE__ */ I("div")({
|
|
2450
2464
|
name: "c",
|
|
2451
2465
|
class: "c1js9xhe",
|
|
2452
2466
|
propsAsIs: !1
|
|
2453
|
-
}),
|
|
2467
|
+
}), wn = /* @__PURE__ */ I("div")({
|
|
2454
2468
|
name: "d",
|
|
2455
2469
|
class: "d1tmnqsh",
|
|
2456
2470
|
propsAsIs: !1
|
|
2457
|
-
}),
|
|
2471
|
+
}), Mn = /* @__PURE__ */ I("span")({
|
|
2458
2472
|
name: "g",
|
|
2459
2473
|
class: "gi9h87j",
|
|
2460
2474
|
propsAsIs: !1
|
|
2461
|
-
}),
|
|
2475
|
+
}), An = /* @__PURE__ */ I(fn())({
|
|
2462
2476
|
name: "x",
|
|
2463
2477
|
class: "x13mk3z6",
|
|
2464
2478
|
propsAsIs: !0
|
|
2465
|
-
}),
|
|
2479
|
+
}), En = ({
|
|
2466
2480
|
rank: i,
|
|
2467
2481
|
avatar: n,
|
|
2468
2482
|
name: a,
|
|
2469
2483
|
points: c,
|
|
2470
|
-
isCurrentUser:
|
|
2484
|
+
isCurrentUser: d,
|
|
2471
2485
|
openItemDetail: g,
|
|
2472
|
-
style:
|
|
2473
|
-
}) => /* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
n ? /* @__PURE__ */
|
|
2477
|
-
/* @__PURE__ */
|
|
2478
|
-
/* @__PURE__ */
|
|
2479
|
-
|
|
2486
|
+
style: m
|
|
2487
|
+
}) => /* @__PURE__ */ v(mn, { onClick: g, style: m, children: [
|
|
2488
|
+
/* @__PURE__ */ f(gn, { children: i || 0 }),
|
|
2489
|
+
/* @__PURE__ */ v(xn, { children: [
|
|
2490
|
+
n ? /* @__PURE__ */ f(In, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ f(yn, { children: vt(a || "") }),
|
|
2491
|
+
/* @__PURE__ */ v(wn, { children: [
|
|
2492
|
+
/* @__PURE__ */ f(Mn, { children: a || "" }),
|
|
2493
|
+
d && /* @__PURE__ */ f(An, { name: "icon-star" })
|
|
2480
2494
|
] })
|
|
2481
2495
|
] }),
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
] }),
|
|
2484
|
-
|
|
2496
|
+
/* @__PURE__ */ f("div", { children: St(c) })
|
|
2497
|
+
] }), Tn = ({ items: i, openItemDetail: n, fetchMore: a }) => /* @__PURE__ */ f(Zi, { children: ({ width: c, height: d }) => /* @__PURE__ */ f(
|
|
2498
|
+
pn,
|
|
2485
2499
|
{
|
|
2486
2500
|
isItemLoaded: (g) => g < i.length,
|
|
2487
2501
|
itemCount: i.length + 1,
|
|
2488
2502
|
loadMoreItems: a,
|
|
2489
|
-
children: ({ onItemsRendered: g, ref:
|
|
2490
|
-
|
|
2503
|
+
children: ({ onItemsRendered: g, ref: m }) => /* @__PURE__ */ f(
|
|
2504
|
+
an,
|
|
2491
2505
|
{
|
|
2492
2506
|
itemSize: 56,
|
|
2493
2507
|
onItemsRendered: g,
|
|
2494
|
-
ref:
|
|
2508
|
+
ref: m,
|
|
2495
2509
|
itemCount: i.length,
|
|
2496
2510
|
width: c,
|
|
2497
|
-
height:
|
|
2498
|
-
children: ({ index: o, style:
|
|
2499
|
-
|
|
2511
|
+
height: d,
|
|
2512
|
+
children: ({ index: o, style: y }) => /* @__PURE__ */ f(
|
|
2513
|
+
En,
|
|
2500
2514
|
{
|
|
2501
|
-
style: { ...
|
|
2515
|
+
style: { ...y, maxHeight: 48 },
|
|
2502
2516
|
...i[o],
|
|
2503
2517
|
openItemDetail: () => n(i[o].userId)
|
|
2504
2518
|
},
|
|
@@ -2507,170 +2521,170 @@ const pn = () => J, fn = /* @__PURE__ */ I("div")({
|
|
|
2507
2521
|
}
|
|
2508
2522
|
)
|
|
2509
2523
|
}
|
|
2510
|
-
) }),
|
|
2524
|
+
) }), Nn = ({ leaderboardList: i, openUser: n }) => {
|
|
2511
2525
|
const { data: a } = ie(i.$store);
|
|
2512
|
-
return /* @__PURE__ */
|
|
2526
|
+
return /* @__PURE__ */ f(Tn, { fetchMore: i.fetchMore, items: a, openItemDetail: n });
|
|
2513
2527
|
};
|
|
2514
|
-
const
|
|
2528
|
+
const _n = /* @__PURE__ */ I("button")({
|
|
2515
2529
|
name: "a",
|
|
2516
2530
|
class: "akly9h2",
|
|
2517
2531
|
propsAsIs: !1
|
|
2518
|
-
}),
|
|
2532
|
+
}), vn = /* @__PURE__ */ I("span")({
|
|
2519
2533
|
name: "e",
|
|
2520
2534
|
class: "eptoiz9",
|
|
2521
2535
|
propsAsIs: !1
|
|
2522
|
-
}),
|
|
2523
|
-
const zn = () =>
|
|
2536
|
+
}), Sn = ({ disabled: i, variant: n = "primary", onClick: a, children: c, ...d }) => /* @__PURE__ */ f(_n, { onClick: a, disabled: i, "data-variant": n, ...d, children: /* @__PURE__ */ f(vn, { children: c }) });
|
|
2537
|
+
const zn = () => V, Dn = () => V, bn = /* @__PURE__ */ I("div")({
|
|
2524
2538
|
name: "s",
|
|
2525
2539
|
class: "s1lblda3",
|
|
2526
2540
|
propsAsIs: !1
|
|
2527
|
-
}),
|
|
2541
|
+
}), On = /* @__PURE__ */ I("div")({
|
|
2528
2542
|
name: "a",
|
|
2529
2543
|
class: "ascvb2g",
|
|
2530
2544
|
propsAsIs: !1
|
|
2531
|
-
}),
|
|
2545
|
+
}), Bn = /* @__PURE__ */ I("div")({
|
|
2532
2546
|
name: "p",
|
|
2533
2547
|
class: "p17rl8zy",
|
|
2534
2548
|
propsAsIs: !1
|
|
2535
|
-
}),
|
|
2549
|
+
}), Rn = /* @__PURE__ */ I("div")({
|
|
2536
2550
|
name: "l",
|
|
2537
2551
|
class: "l1vvttbn",
|
|
2538
2552
|
propsAsIs: !1
|
|
2539
|
-
}),
|
|
2553
|
+
}), Ye = /* @__PURE__ */ I(zn())({
|
|
2540
2554
|
name: "c",
|
|
2541
2555
|
class: "c6fk2ph",
|
|
2542
2556
|
propsAsIs: !0
|
|
2543
|
-
}),
|
|
2557
|
+
}), Ln = /* @__PURE__ */ I(Dn())({
|
|
2544
2558
|
name: "d",
|
|
2545
2559
|
class: "d1rdm136",
|
|
2546
2560
|
propsAsIs: !0
|
|
2547
|
-
}),
|
|
2561
|
+
}), Cn = /* @__PURE__ */ I("div")({
|
|
2548
2562
|
name: "f",
|
|
2549
2563
|
class: "fwqnnel",
|
|
2550
2564
|
propsAsIs: !1
|
|
2551
|
-
}),
|
|
2565
|
+
}), kn = /* @__PURE__ */ I("div")({
|
|
2552
2566
|
name: "u",
|
|
2553
2567
|
class: "ucyxnlg",
|
|
2554
2568
|
propsAsIs: !1
|
|
2555
|
-
}),
|
|
2556
|
-
[
|
|
2557
|
-
[
|
|
2558
|
-
[
|
|
2559
|
-
[
|
|
2560
|
-
},
|
|
2569
|
+
}), Un = {
|
|
2570
|
+
[_e.LOST]: /* @__PURE__ */ f(Ye, { name: "icon-cross" }),
|
|
2571
|
+
[_e.WON]: /* @__PURE__ */ f(Ye, { name: "icon-check" }),
|
|
2572
|
+
[_e.UNSET]: void 0,
|
|
2573
|
+
[_e.DNP]: /* @__PURE__ */ f(Ye, { name: "icon-arrow" })
|
|
2574
|
+
}, jn = ({
|
|
2561
2575
|
questionId: i,
|
|
2562
2576
|
questionType: n,
|
|
2563
2577
|
questionStatus: a,
|
|
2564
2578
|
subject: c,
|
|
2565
|
-
openForVoting:
|
|
2579
|
+
openForVoting: d,
|
|
2566
2580
|
openQuestion: g,
|
|
2567
|
-
status:
|
|
2581
|
+
status: m
|
|
2568
2582
|
}) => {
|
|
2569
|
-
const o =
|
|
2570
|
-
return o ? /* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2572
|
-
/* @__PURE__ */
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2583
|
+
const o = Et[n], y = Un[m];
|
|
2584
|
+
return o ? /* @__PURE__ */ v(bn, { onClick: () => g == null ? void 0 : g(i), children: [
|
|
2585
|
+
/* @__PURE__ */ v(kn, { children: [
|
|
2586
|
+
/* @__PURE__ */ v(On, { children: [
|
|
2587
|
+
/* @__PURE__ */ f(Ln, { name: o.iconName }),
|
|
2588
|
+
/* @__PURE__ */ v(Cn, { children: [
|
|
2575
2589
|
o.label,
|
|
2576
|
-
n ===
|
|
2590
|
+
n === P.TRIVIA && a === we.RESOLVED && " • Expired"
|
|
2577
2591
|
] })
|
|
2578
2592
|
] }),
|
|
2579
|
-
/* @__PURE__ */
|
|
2593
|
+
/* @__PURE__ */ f(Bn, { children: c || "" })
|
|
2580
2594
|
] }),
|
|
2581
|
-
/* @__PURE__ */
|
|
2595
|
+
/* @__PURE__ */ f(Rn, { children: y || (d ? /* @__PURE__ */ f(Sn, { children: "Play" }) : null) })
|
|
2582
2596
|
] }) : null;
|
|
2583
2597
|
};
|
|
2584
|
-
const
|
|
2598
|
+
const Fn = /* @__PURE__ */ I("div")({
|
|
2585
2599
|
name: "n",
|
|
2586
2600
|
class: "n1jcgove",
|
|
2587
2601
|
propsAsIs: !1
|
|
2588
|
-
}),
|
|
2602
|
+
}), $n = /* @__PURE__ */ I("button")({
|
|
2589
2603
|
name: "l",
|
|
2590
2604
|
class: "l1bwp7hh",
|
|
2591
2605
|
propsAsIs: !1
|
|
2592
|
-
}),
|
|
2606
|
+
}), Qn = ({
|
|
2593
2607
|
openInsight: i,
|
|
2594
2608
|
questionId: n,
|
|
2595
2609
|
...a
|
|
2596
|
-
}) => /* @__PURE__ */
|
|
2597
|
-
/* @__PURE__ */
|
|
2598
|
-
i && /* @__PURE__ */
|
|
2610
|
+
}) => /* @__PURE__ */ v(Fn, { children: [
|
|
2611
|
+
/* @__PURE__ */ f(Ot, { questionId: n, ...a }),
|
|
2612
|
+
i && /* @__PURE__ */ f($n, { onClick: () => i(n), children: "View Insight" })
|
|
2599
2613
|
] });
|
|
2600
|
-
const
|
|
2614
|
+
const Pn = /* @__PURE__ */ I("div")({
|
|
2601
2615
|
name: "t",
|
|
2602
2616
|
class: "t19vr3p1",
|
|
2603
2617
|
propsAsIs: !1
|
|
2604
|
-
}),
|
|
2605
|
-
var c,
|
|
2618
|
+
}), qn = ({ questions: i, openQuestion: n }) => /* @__PURE__ */ f(Pn, { children: i == null ? void 0 : i.map((a) => {
|
|
2619
|
+
var c, d;
|
|
2606
2620
|
if (a.type === "question" && ((c = a.attributes) == null ? void 0 : c.attributes.case) === "question") {
|
|
2607
2621
|
const g = a.attributes.attributes.value;
|
|
2608
|
-
return /* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ f(jn, { openQuestion: n, ...g }, g.questionId);
|
|
2609
2623
|
}
|
|
2610
|
-
if (a.type === "insight" && ((
|
|
2624
|
+
if (a.type === "insight" && ((d = a.attributes) == null ? void 0 : d.attributes.case) === "insight") {
|
|
2611
2625
|
const g = a.attributes.attributes.value;
|
|
2612
|
-
return /* @__PURE__ */
|
|
2626
|
+
return /* @__PURE__ */ f(Qn, { openInsight: n, ...g }, g.questionId);
|
|
2613
2627
|
}
|
|
2614
2628
|
return null;
|
|
2615
2629
|
}) }), Yn = ({ store: i, openQuestion: n }) => {
|
|
2616
2630
|
const a = ie(i);
|
|
2617
|
-
return a != null && a.data ? /* @__PURE__ */
|
|
2618
|
-
},
|
|
2631
|
+
return a != null && a.data ? /* @__PURE__ */ f(qn, { openQuestion: n, questions: a.data }) : /* @__PURE__ */ f("div", { children: "wait questions..." });
|
|
2632
|
+
}, Wn = ({ userSummary: i }) => {
|
|
2619
2633
|
var n;
|
|
2620
2634
|
const a = ie(i.getStore());
|
|
2621
|
-
return (n = a.data) != null && n.summary ? /* @__PURE__ */
|
|
2622
|
-
},
|
|
2623
|
-
const [n, a] =
|
|
2624
|
-
return /* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
n === Ie.HOME && /* @__PURE__ */
|
|
2635
|
+
return (n = a.data) != null && n.summary ? /* @__PURE__ */ f(Dt, { ...a.data.summary, ...a.data.percentage }) : /* @__PURE__ */ f("div", { children: "wait user..." });
|
|
2636
|
+
}, Vn = ({ gamification: i }) => {
|
|
2637
|
+
const [n, a] = xe(Ie.HOME);
|
|
2638
|
+
return /* @__PURE__ */ v("div", { style: { height: "100%", display: "flex", flexDirection: "column" }, children: [
|
|
2639
|
+
/* @__PURE__ */ v(Nt, { children: [
|
|
2640
|
+
/* @__PURE__ */ f(ki, { activePage: n, toggleActivePage: a }),
|
|
2641
|
+
n === Ie.HOME && /* @__PURE__ */ f(Wn, { userSummary: i.userSummary })
|
|
2628
2642
|
] }),
|
|
2629
|
-
n === Ie.HOME && /* @__PURE__ */
|
|
2630
|
-
n === Ie.LEADERBOARD && /* @__PURE__ */
|
|
2643
|
+
n === Ie.HOME && /* @__PURE__ */ f(st, { children: /* @__PURE__ */ f(Yn, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) }),
|
|
2644
|
+
n === Ie.LEADERBOARD && /* @__PURE__ */ f(st, { style: { flex: "1 1 auto", paddingTop: 0, paddingBottom: 0 }, children: /* @__PURE__ */ f(Nn, { openUser: i.openUser, leaderboardList: i.leaderboardList }) })
|
|
2631
2645
|
] });
|
|
2632
2646
|
};
|
|
2633
|
-
const
|
|
2647
|
+
const Hn = () => Ht, At = /* @__PURE__ */ I(Hn())({
|
|
2634
2648
|
name: "e",
|
|
2635
2649
|
class: "e1ph66cs",
|
|
2636
2650
|
propsAsIs: !0
|
|
2637
|
-
}),
|
|
2651
|
+
}), Gn = /* @__PURE__ */ I("div")({
|
|
2638
2652
|
name: "x",
|
|
2639
2653
|
class: "xorme7i",
|
|
2640
2654
|
propsAsIs: !1
|
|
2641
|
-
}),
|
|
2655
|
+
}), us = ({
|
|
2642
2656
|
gamification: i,
|
|
2643
2657
|
className: n
|
|
2644
2658
|
}) => {
|
|
2645
2659
|
const a = ie(i.openedQuestion.$store), c = ie(i.openedUser);
|
|
2646
|
-
return /* @__PURE__ */
|
|
2647
|
-
children: [a && /* @__PURE__ */
|
|
2660
|
+
return /* @__PURE__ */ v(ye, {
|
|
2661
|
+
children: [a && /* @__PURE__ */ f(At, {
|
|
2648
2662
|
className: n,
|
|
2649
|
-
children: /* @__PURE__ */
|
|
2663
|
+
children: /* @__PURE__ */ f(Oi, {
|
|
2650
2664
|
gamification: i
|
|
2651
2665
|
})
|
|
2652
|
-
}), c && /* @__PURE__ */
|
|
2666
|
+
}), c && /* @__PURE__ */ f(At, {
|
|
2653
2667
|
className: n,
|
|
2654
|
-
children: /* @__PURE__ */
|
|
2655
|
-
children: [/* @__PURE__ */
|
|
2668
|
+
children: /* @__PURE__ */ v(Gn, {
|
|
2669
|
+
children: [/* @__PURE__ */ f(zt, {
|
|
2656
2670
|
label: "Friend's Rank",
|
|
2657
2671
|
close: i.closeUser
|
|
2658
|
-
}), /* @__PURE__ */
|
|
2659
|
-
children: /* @__PURE__ */
|
|
2672
|
+
}), /* @__PURE__ */ f(Nt, {
|
|
2673
|
+
children: /* @__PURE__ */ f(Dt, {
|
|
2660
2674
|
...c
|
|
2661
2675
|
})
|
|
2662
2676
|
})]
|
|
2663
2677
|
})
|
|
2664
|
-
}), /* @__PURE__ */
|
|
2678
|
+
}), /* @__PURE__ */ f(Tt, {
|
|
2665
2679
|
className: n,
|
|
2666
2680
|
"data-nav": "true",
|
|
2667
|
-
children: /* @__PURE__ */
|
|
2681
|
+
children: /* @__PURE__ */ f(Vn, {
|
|
2668
2682
|
gamification: i
|
|
2669
2683
|
})
|
|
2670
2684
|
})]
|
|
2671
2685
|
});
|
|
2672
2686
|
};
|
|
2673
2687
|
export {
|
|
2674
|
-
|
|
2675
|
-
|
|
2688
|
+
us as GamificationOverlay,
|
|
2689
|
+
us as default
|
|
2676
2690
|
};
|