fansunited-frontend-components 0.0.69 → 0.0.71
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/Betslip.js +1 -1
- package/ChanceGame.js +529 -520
- package/ClassicQuizPlay.js +1725 -1458
- package/CollectLead.js +141 -141
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1524 -1331
- package/EventCard.js +3001 -1848
- package/EventGamePlay.js +2023 -1742
- package/Leaderboard.js +367 -357
- package/MatchQuizPlay.js +2936 -2649
- package/PersonalityQuizPlay.js +1395 -1119
- package/PickThePair.js +481 -472
- package/PlayerOfTheMatch.js +235 -234
- package/PollVote.js +1318 -1036
- package/Predictor.js +4383 -4390
- package/README.md +110 -4
- package/Standings.js +652 -643
- package/TopX.js +2646 -2645
- package/chunks/{AccessTime-7cim24ED.js → AccessTime-BkHriW4j.js} +1 -1
- package/chunks/{AlertMessage-X4MQ4qsN.js → AlertMessage-DwSmhmHt.js} +11 -11
- package/chunks/{Avatar-RBMU1Gkk.js → Avatar-CEbT4X-o.js} +22 -22
- package/chunks/{Button-GawVOPKi.js → Button-CO-k2gLb.js} +3 -3
- package/chunks/{Card--xcz3SKi.js → Card-DZdPl8-h.js} +7 -7
- package/chunks/{CardActions-CPwvcLGp.js → CardActions-DTThyeLX.js} +20 -20
- package/chunks/{CardContent-Ew6fr-KR.js → CardContent-CzC1EwoD.js} +14 -14
- package/chunks/{ChanceGameEmbedVariant-Dio4ihOd.js → ChanceGameEmbedVariant-CteJ4tix.js} +309 -195
- package/chunks/{CheckCircle-DgKcR_no.js → CheckCircle-BzM-2e1z.js} +1 -1
- package/chunks/{Chip-CYpaygnD.js → Chip-BF1FXK0I.js} +15 -15
- package/chunks/{Close-CdJNGcLx.js → Close-BiMLcNyG.js} +1 -1
- package/chunks/{Close-D2mtuGDo.js → Close-CggU6Ga3.js} +1 -1
- package/chunks/{CollectLeadForm-D0P_JHmT.js → CollectLeadForm-BZj-9IDt.js} +1389 -1463
- package/chunks/ConsentsList-CtKgLYa8.js +339 -0
- package/chunks/DirectionScope-BGDPaR6B.js +24 -0
- package/chunks/{Divider-DcW0V71y.js → Divider-Dueyhj7K.js} +8 -8
- package/chunks/{Edit-Bcj6J4rt.js → Edit-Dqa7th_A.js} +3 -3
- package/chunks/EditOutlined-B__rjTwX.js +14 -0
- package/chunks/{EmojiEvents-g001ss_z.js → EmojiEvents-CpsA2Qo0.js} +1 -1
- package/chunks/{FavoriteBorder-Lr6swB6-.js → FavoriteBorder-DrC_eOCd.js} +1 -1
- package/chunks/{FormControl-BKlK7WPd.js → FormControl-fKyT2Mql.js} +34 -33
- package/chunks/{FormControlContext-B2HqeXgq.js → FormControlContext-CSrMcHcv.js} +11 -11
- package/chunks/{FormLabel-C47pX5hN.js → FormLabel-DlXT5RZd.js} +22 -25
- package/chunks/{InlineSpinner-Imz27zb2.js → InlineSpinner-CuisRY-E.js} +2 -2
- package/chunks/{Input-nS_KO1Bu.js → Input-CkSIGH-d.js} +15 -15
- package/chunks/{KeyboardArrowDown-CyZAOE-W.js → KeyboardArrowDown-DL8VjkJT.js} +1 -1
- package/chunks/{KeyboardArrowRight-FI0kqwO1.js → KeyboardArrowRight-Cm50UqHb.js} +1 -1
- package/chunks/{Link-DKU7kDL8.js → Link-BljMbRuR.js} +13 -13
- package/chunks/{ListItemButton-CPVIEVpf.js → ListItemButton-BqEcbBU0.js} +50 -50
- package/chunks/{ModalDialog-DDx8wQa3.js → ModalDialog-B0DLv5vW.js} +59 -59
- package/chunks/{NotFoundSkeleton-CJZIRj5-.js → NotFoundSkeleton-DKxLhOwI.js} +149 -125
- package/chunks/{Notification-BvVfrrB3.js → Notification-CEdU0opQ.js} +18 -18
- package/chunks/{OverlayScoreStateSkeleton-CAhCAjkS.js → OverlayScoreStateSkeleton-BtCy650g.js} +18 -12
- package/chunks/{ArrowRightAlt-DrBMgptf.js → OverlayScoreStateWrapperSkeleton-Ch_E6KQ6.js} +18 -21
- package/chunks/OverlaySignInSkeleton-DEiH7fmp.js +517 -0
- package/chunks/{Person-DB_bEPcg.js → Person-CLQl7Sxs.js} +1 -1
- package/chunks/{PersonOutline-BAOtfb1t.js → PersonOutline-D8yrpbw7.js} +1 -1
- package/chunks/{PickOneOfX-Dp6fzXJn.js → PickOneOfX-CG0B5u7Y.js} +3 -3
- package/chunks/{Popper-Bpy7eYt-.js → Popper-BSnc2Lit.js} +58 -58
- package/chunks/Portal-D8t1Jd5e.js +65 -0
- package/chunks/{Portal-Dvh4m8kk.js → Portal-cK515D9M.js} +4 -4
- package/chunks/{PrizeCard-CXjFADAN.js → PrizeCard-CyVJJLo1.js} +6295 -4346
- package/chunks/{Search-uVJw-NhK.js → Search-BXhhax8M.js} +1 -1
- package/chunks/{Select-BeixD4Vw.js → Select-DyRdhrMr.js} +61 -61
- package/chunks/{Sheet-vOgATocO.js → Sheet-sYNAL7gX.js} +14 -14
- package/chunks/{Spinner-C219bcnm.js → Spinner-Bb4eb64F.js} +2 -2
- package/chunks/SplitSignInSkeleton-BZT0ngoW.js +150 -0
- package/chunks/{Stack-JIDLCVx0.js → Stack-DX41loGb.js} +21 -21
- package/chunks/{StandardContentSkeleton-DsGBNMHN.js → StandardContentSkeleton-DAh7l7cd.js} +12 -12
- package/chunks/{Table-Cx7htUDp.js → Table-C09wF6nK.js} +8 -8
- package/chunks/{Tabs-CIJK8YZY.js → Tabs-Dhih1Lqb.js} +46 -46
- package/chunks/{Textarea-KSwIUuq8.js → Textarea-DWyUKbVv.js} +184 -244
- package/chunks/{TimerOutlined-BUL4BZFp.js → TimerOutlined-DeWQFv5g.js} +1 -1
- package/chunks/{Tooltip-DrP2vx9i.js → Tooltip-Dnj_oxHb.js} +55 -55
- package/chunks/{Typography-DFdgIDQS.js → Typography-B8CtvKkm.js} +1 -1
- package/chunks/{dividerClasses-BtSFa36Z.js → dividerClasses-BoOrlu7X.js} +1 -1
- package/chunks/{elementAcceptingRef-CZFKGdxR.js → elementAcceptingRef-DROQPsxj.js} +1 -1
- package/chunks/formLabelClasses-Bh4Fh0fk.js +9 -0
- package/chunks/{helpers-D8cWUfGf.js → helpers-DgUDSfd1.js} +14 -12
- package/chunks/{index-DZqXLvFO.js → index-C_R74meU.js} +69 -72
- package/chunks/index-PC-q6Shn.js +4 -0
- package/chunks/{main-C05CZWMa.js → main-5c5yYsj9.js} +973 -963
- package/chunks/{main-CHr45Z4W.js → main-BXu1mzLz.js} +157 -157
- package/chunks/{useButton-tjUHKc-B.js → useButton-CQ2o2nXk.js} +2 -2
- package/chunks/useConsents-CIhPZNel.js +1165 -0
- package/chunks/{useEventCallback-BFPi8YtI.js → useEventCallback-B1ahtq-a.js} +1 -1
- package/chunks/{useForwardedInput-VvmRv9KU.js → useForwardedInput-DRXHXEOw.js} +22 -22
- package/chunks/{useImageVariant-Cs6lWUs2.js → useImageVariant-D6aho5sy.js} +1 -1
- package/chunks/useSwitch-CYz8kkTr.js +65 -0
- package/index.js +3 -3
- package/package.json +2 -2
- package/chunks/EditOutlined-PCc4gafz.js +0 -11
- package/chunks/OverlayApiErrorSkeleton-JMWA0FV8.js +0 -731
- package/chunks/OverlayLeadAfterCollection-BwF9MvIB.js +0 -678
- package/chunks/Portal-bNE7Trh9.js +0 -55
- package/chunks/SplitLeadAfterCollection-BijLacCk.js +0 -236
- package/chunks/index-JDeYpSi1.js +0 -4
package/EitherOrPlay.js
CHANGED
|
@@ -1,116 +1,118 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { l as
|
|
4
|
-
import { P as
|
|
1
|
+
import { jsx as t, jsxs as h, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import { useState as B, useEffect as fe, useRef as mt, useCallback as Ge } from "react";
|
|
3
|
+
import { l as $e, d as Te, k as Ve, B as r, u as Q, i as Se, b as q, c as pe, f as ve, L as Xt, q as Zt, a as Ne, e as Jt, W as Pe, m as Lt, n as Qt } from "./chunks/PrizeCard-CyVJJLo1.js";
|
|
4
|
+
import { P as en } from "./chunks/Portal-D8t1Jd5e.js";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
6
|
+
import { g as tn, h as oe, e as it, a as Ot, c as nn } from "./chunks/helpers-DgUDSfd1.js";
|
|
7
|
+
import { S as lt } from "./chunks/Spinner-Bb4eb64F.js";
|
|
8
|
+
import { C as at, A as gt, a as rn, S as Bt, b as Dt, O as on, c as $t, d as Ft, u as ln } from "./chunks/useConsents-CIhPZNel.js";
|
|
9
|
+
import { Z as an } from "./chunks/index-BBrO1Htm.js";
|
|
10
|
+
import { S as sn, N as cn, O as dn } from "./chunks/NotFoundSkeleton-DKxLhOwI.js";
|
|
11
|
+
import { u as un, b as st, d as ht, a as ft } from "./chunks/useImageVariant-D6aho5sy.js";
|
|
12
|
+
import { b as Et } from "./chunks/ConsentsList-CtKgLYa8.js";
|
|
13
|
+
import { D as xt } from "./chunks/DirectionScope-BGDPaR6B.js";
|
|
14
|
+
import { T as C } from "./chunks/Typography-B8CtvKkm.js";
|
|
15
|
+
import { F as tt, a as Ut } from "./chunks/FavoriteBorder-DrC_eOCd.js";
|
|
16
|
+
import { E as De } from "./chunks/EmojiEvents-CpsA2Qo0.js";
|
|
17
|
+
import { B as ye } from "./chunks/Button-CO-k2gLb.js";
|
|
18
|
+
import { C as ct } from "./chunks/CheckCircle-BzM-2e1z.js";
|
|
19
|
+
import { T as mn } from "./chunks/TimerOutlined-DeWQFv5g.js";
|
|
20
|
+
import { S as je } from "./chunks/Stack-DX41loGb.js";
|
|
21
|
+
import { A as gn } from "./chunks/AccessTime-BkHriW4j.js";
|
|
22
|
+
import { P as hn } from "./chunks/Person-CLQl7Sxs.js";
|
|
23
|
+
import { S as fn } from "./chunks/Sheet-sYNAL7gX.js";
|
|
24
|
+
import { T as xn } from "./chunks/Table-C09wF6nK.js";
|
|
25
|
+
import { A as bn } from "./chunks/Avatar-CEbT4X-o.js";
|
|
26
|
+
import { t as Wt, T as Mt, a as Ht, b as nt, c as rt } from "./chunks/Tabs-Dhih1Lqb.js";
|
|
27
|
+
import { S as yn, O as pn } from "./chunks/OverlaySignInSkeleton-DEiH7fmp.js";
|
|
28
|
+
import { C as Sn } from "./chunks/CollectLeadForm-BZj-9IDt.js";
|
|
29
|
+
import { O as Cn } from "./chunks/OverlayScoreStateWrapperSkeleton-Ch_E6KQ6.js";
|
|
30
|
+
const dt = $e(/* @__PURE__ */ t("path", {
|
|
29
31
|
d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"
|
|
30
|
-
}), "Cancel"),
|
|
32
|
+
}), "Cancel"), Gt = $e(/* @__PURE__ */ t("path", {
|
|
31
33
|
d: "M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"
|
|
32
|
-
}), "CompareArrows"),
|
|
34
|
+
}), "CompareArrows"), jt = $e(/* @__PURE__ */ t("path", {
|
|
33
35
|
d: "M7.5 21H2V9h5.5zm7.25-18h-5.5v18h5.5zM22 11h-5.5v10H22z"
|
|
34
|
-
}), "Leaderboard"),
|
|
36
|
+
}), "Leaderboard"), In = $e(/* @__PURE__ */ t("path", {
|
|
35
37
|
d: "M16 17.01V10h-2v7.01h-3L15 21l4-3.99zM9 3 5 6.99h3V14h2V6.99h3z"
|
|
36
|
-
}), "SwapVert"),
|
|
38
|
+
}), "SwapVert"), Vt = $e(/* @__PURE__ */ t("path", {
|
|
37
39
|
d: "M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61M13 14h-2V8h2z"
|
|
38
|
-
}), "Timer"),
|
|
40
|
+
}), "Timer"), kn = $e(/* @__PURE__ */ t("path", {
|
|
39
41
|
d: "M9.68 13.69 12 11.93l2.31 1.76-.88-2.85L15.75 9h-2.84L12 6.19 11.09 9H8.25l2.31 1.84zM20 10c0-4.42-3.58-8-8-8s-8 3.58-8 8c0 2.03.76 3.87 2 5.28V23l6-2 6 2v-7.72c1.24-1.41 2-3.25 2-5.28m-8-6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6"
|
|
40
|
-
}), "WorkspacePremium"),
|
|
41
|
-
const [
|
|
42
|
+
}), "WorkspacePremium"), Tn = (e, n) => {
|
|
43
|
+
const [l, i] = B(null), s = async () => {
|
|
42
44
|
try {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
} catch (
|
|
46
|
-
console.error(
|
|
45
|
+
const g = await n.miniGames.getEitherOrById(e, !0);
|
|
46
|
+
i(g);
|
|
47
|
+
} catch (g) {
|
|
48
|
+
console.error(g), i(new an());
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
|
-
return
|
|
50
|
-
},
|
|
51
|
-
const [
|
|
51
|
+
return fe(() => (s(), () => i(null)), [e, n]), l;
|
|
52
|
+
}, vn = (e, n, l = !1) => {
|
|
53
|
+
const [i, s] = B(null), [g, o] = B(!1), [m, c] = B(!1), u = async () => {
|
|
52
54
|
try {
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
} catch (
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
55
|
+
const f = await n.miniGames.getMyEitherOrStats(e);
|
|
56
|
+
s(f);
|
|
57
|
+
} catch (f) {
|
|
58
|
+
if (s(null), n.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
|
|
59
|
+
const x = f;
|
|
60
|
+
if (x.error.code === 404)
|
|
59
61
|
return;
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
+
if (x.error.code === 401 || x.error.code === 403) {
|
|
63
|
+
o(!0);
|
|
62
64
|
return;
|
|
63
65
|
}
|
|
64
|
-
|
|
66
|
+
c(!0);
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
+
const p = f;
|
|
70
|
+
if (p.data.error.code === 404)
|
|
69
71
|
return;
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
+
if (p.data.error.code === 401 || p.data.error.code === 403) {
|
|
73
|
+
o(!0);
|
|
72
74
|
return;
|
|
73
75
|
}
|
|
74
|
-
|
|
76
|
+
c(!0);
|
|
75
77
|
}
|
|
76
78
|
};
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
}), [e, n,
|
|
80
|
-
myStats:
|
|
81
|
-
setMyStats:
|
|
82
|
-
isUnauthorized:
|
|
83
|
-
isApiError:
|
|
84
|
-
setIsUnauthorized:
|
|
85
|
-
setIsApiError:
|
|
79
|
+
return fe(() => (u(), () => {
|
|
80
|
+
s(null), o(!1), c(!1);
|
|
81
|
+
}), [e, n, l]), {
|
|
82
|
+
myStats: i,
|
|
83
|
+
setMyStats: s,
|
|
84
|
+
isUnauthorized: g,
|
|
85
|
+
isApiError: m,
|
|
86
|
+
setIsUnauthorized: o,
|
|
87
|
+
setIsApiError: c
|
|
86
88
|
};
|
|
87
|
-
},
|
|
89
|
+
}, _ = {
|
|
88
90
|
LOADING: "loading",
|
|
89
91
|
TUTORIAL: "tutorial",
|
|
90
92
|
PLAYING: "playing",
|
|
91
93
|
RESULTS: "results"
|
|
92
|
-
},
|
|
93
|
-
const n =
|
|
94
|
+
}, ue = (e) => {
|
|
95
|
+
const n = Te().secondary, l = Ve(), i = tn(
|
|
94
96
|
e.primaryUrl,
|
|
95
97
|
e.secondaryUrl,
|
|
96
98
|
"logo"
|
|
97
99
|
);
|
|
98
100
|
if (!e.brandingLogo)
|
|
99
101
|
return null;
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
},
|
|
102
|
+
const s = () => {
|
|
103
|
+
i && window.open(i, "_blank", "noopener,noreferrer");
|
|
104
|
+
}, g = /* @__PURE__ */ t(
|
|
103
105
|
"img",
|
|
104
106
|
{
|
|
105
107
|
src: e.brandingLogo,
|
|
106
108
|
alt: "branding-logo",
|
|
107
109
|
style: { maxHeight: "50px", maxWidth: "100px" }
|
|
108
110
|
}
|
|
109
|
-
),
|
|
111
|
+
), o = i ? typeof window > "u" ? /* @__PURE__ */ t(
|
|
110
112
|
r,
|
|
111
113
|
{
|
|
112
114
|
component: "a",
|
|
113
|
-
href:
|
|
115
|
+
href: i,
|
|
114
116
|
target: "_blank",
|
|
115
117
|
rel: "noopener noreferrer",
|
|
116
118
|
sx: {
|
|
@@ -118,17 +120,17 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
118
120
|
textDecoration: "none",
|
|
119
121
|
display: "inline-flex"
|
|
120
122
|
},
|
|
121
|
-
children:
|
|
123
|
+
children: g
|
|
122
124
|
}
|
|
123
125
|
) : /* @__PURE__ */ t(
|
|
124
126
|
r,
|
|
125
127
|
{
|
|
126
|
-
onClick:
|
|
128
|
+
onClick: s,
|
|
127
129
|
sx: { cursor: "pointer", display: "inline-flex" },
|
|
128
|
-
children:
|
|
130
|
+
children: g
|
|
129
131
|
}
|
|
130
|
-
) :
|
|
131
|
-
return e.isCentered ||
|
|
132
|
+
) : g;
|
|
133
|
+
return e.isCentered || l ? /* @__PURE__ */ h(
|
|
132
134
|
r,
|
|
133
135
|
{
|
|
134
136
|
sx: {
|
|
@@ -142,7 +144,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
142
144
|
},
|
|
143
145
|
children: [
|
|
144
146
|
e.label && /* @__PURE__ */ t(
|
|
145
|
-
|
|
147
|
+
C,
|
|
146
148
|
{
|
|
147
149
|
level: "body-sm",
|
|
148
150
|
sx: {
|
|
@@ -157,10 +159,10 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
157
159
|
children: e.label
|
|
158
160
|
}
|
|
159
161
|
),
|
|
160
|
-
|
|
162
|
+
o
|
|
161
163
|
]
|
|
162
164
|
}
|
|
163
|
-
) : /* @__PURE__ */
|
|
165
|
+
) : /* @__PURE__ */ h(
|
|
164
166
|
r,
|
|
165
167
|
{
|
|
166
168
|
sx: {
|
|
@@ -173,7 +175,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
173
175
|
},
|
|
174
176
|
children: [
|
|
175
177
|
e.label && /* @__PURE__ */ t(
|
|
176
|
-
|
|
178
|
+
C,
|
|
177
179
|
{
|
|
178
180
|
level: "body-sm",
|
|
179
181
|
sx: {
|
|
@@ -188,74 +190,76 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
188
190
|
children: e.label
|
|
189
191
|
}
|
|
190
192
|
),
|
|
191
|
-
|
|
193
|
+
o
|
|
192
194
|
]
|
|
193
195
|
}
|
|
194
196
|
);
|
|
195
|
-
},
|
|
197
|
+
}, Pn = ({
|
|
196
198
|
onStart: e,
|
|
197
199
|
game: n,
|
|
198
|
-
signInCTA:
|
|
199
|
-
showSignInCTA:
|
|
200
|
+
signInCTA: l,
|
|
201
|
+
showSignInCTA: i,
|
|
202
|
+
consents: s,
|
|
203
|
+
isSubmitting: g
|
|
200
204
|
}) => {
|
|
201
|
-
var
|
|
202
|
-
const { t:
|
|
205
|
+
var D, P, $, L, N, R, k, O, H, j, V;
|
|
206
|
+
const { t: o } = Q(), m = Se(), c = Ve(), u = ((D = n == null ? void 0 : n.branding) == null ? void 0 : D.colors) || null, f = (u == null ? void 0 : u.primaryColor) || q().palette.primary.plainColor, b = q().palette.primary.onPrimary, p = (u == null ? void 0 : u.contentColor) || q().textColor, x = q().surfaceVariant, A = Te().primary, E = pe().xl, w = pe().md, I = ve(), y = oe(f || ""), d = oe(x || ""), z = y ? `rgba(${y.replace(/[^\d,]/g, "")}, 0.12)` : `${f}20`, S = m ? (($ = (P = n == null ? void 0 : n.branding) == null ? void 0 : P.images) == null ? void 0 : $.mobileLogo) || ((N = (L = n == null ? void 0 : n.branding) == null ? void 0 : L.images) == null ? void 0 : N.mainLogo) || "" : ((k = (R = n == null ? void 0 : n.branding) == null ? void 0 : R.images) == null ? void 0 : k.mainLogo) || "", v = [
|
|
203
207
|
{
|
|
204
|
-
icon: /* @__PURE__ */ t(
|
|
205
|
-
title:
|
|
206
|
-
description:
|
|
208
|
+
icon: /* @__PURE__ */ t(Vt, { sx: { fontSize: "1.1em" } }),
|
|
209
|
+
title: o("eitherOr.tutorial.step1Title"),
|
|
210
|
+
description: o("eitherOr.tutorial.step1Description", {
|
|
207
211
|
seconds: (n == null ? void 0 : n.time) ?? 10
|
|
208
212
|
})
|
|
209
213
|
},
|
|
210
214
|
{
|
|
211
|
-
icon: /* @__PURE__ */ t(
|
|
212
|
-
title:
|
|
215
|
+
icon: /* @__PURE__ */ t(tt, { sx: { fontSize: "1.1em" } }),
|
|
216
|
+
title: o("eitherOr.tutorial.step2Title", {
|
|
213
217
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
214
218
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
215
219
|
}),
|
|
216
|
-
description:
|
|
220
|
+
description: o("eitherOr.tutorial.step2Description", {
|
|
217
221
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
218
222
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
219
223
|
})
|
|
220
224
|
},
|
|
221
225
|
{
|
|
222
|
-
icon: /* @__PURE__ */ t(
|
|
223
|
-
title:
|
|
224
|
-
description:
|
|
226
|
+
icon: /* @__PURE__ */ t(De, { sx: { fontSize: "1.1em" } }),
|
|
227
|
+
title: o("eitherOr.tutorial.step3Title"),
|
|
228
|
+
description: o("eitherOr.tutorial.step3Description")
|
|
225
229
|
}
|
|
226
230
|
];
|
|
227
|
-
return n ? /* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p:
|
|
231
|
+
return n ? /* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p: I.md }, children: /* @__PURE__ */ h(
|
|
228
232
|
r,
|
|
229
233
|
{
|
|
230
234
|
sx: {
|
|
231
235
|
display: "flex",
|
|
232
236
|
flexDirection: "column",
|
|
233
|
-
gap:
|
|
237
|
+
gap: m ? I.lg : I.md
|
|
234
238
|
},
|
|
235
239
|
children: [
|
|
236
240
|
/* @__PURE__ */ t(
|
|
237
241
|
r,
|
|
238
242
|
{
|
|
239
243
|
sx: {
|
|
240
|
-
borderRadius:
|
|
244
|
+
borderRadius: w,
|
|
241
245
|
overflow: "hidden",
|
|
242
|
-
bgcolor:
|
|
246
|
+
bgcolor: d ? `rgba(${d.replace(/[^\d,]/g, "")}, 0.5)` : x,
|
|
243
247
|
display: "flex",
|
|
244
248
|
flexDirection: "column",
|
|
245
249
|
backdropFilter: "blur(4px)"
|
|
246
250
|
},
|
|
247
|
-
children:
|
|
248
|
-
const
|
|
249
|
-
return /* @__PURE__ */
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
+
children: v.map((a, W) => {
|
|
252
|
+
const T = W === v.length - 1;
|
|
253
|
+
return /* @__PURE__ */ h(r, { children: [
|
|
254
|
+
/* @__PURE__ */ h(
|
|
251
255
|
r,
|
|
252
256
|
{
|
|
253
257
|
sx: {
|
|
254
258
|
display: "flex",
|
|
255
259
|
alignItems: "flex-start",
|
|
256
|
-
gap:
|
|
257
|
-
px:
|
|
258
|
-
py:
|
|
260
|
+
gap: I.md,
|
|
261
|
+
px: I.md,
|
|
262
|
+
py: I.md
|
|
259
263
|
},
|
|
260
264
|
children: [
|
|
261
265
|
/* @__PURE__ */ t(
|
|
@@ -265,140 +269,165 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
265
269
|
width: 36,
|
|
266
270
|
height: 36,
|
|
267
271
|
borderRadius: "50%",
|
|
268
|
-
bgcolor:
|
|
269
|
-
color:
|
|
272
|
+
bgcolor: z,
|
|
273
|
+
color: f,
|
|
270
274
|
display: "flex",
|
|
271
275
|
alignItems: "center",
|
|
272
276
|
justifyContent: "center",
|
|
273
277
|
flexShrink: 0
|
|
274
278
|
},
|
|
275
|
-
children:
|
|
279
|
+
children: a.icon
|
|
276
280
|
}
|
|
277
281
|
),
|
|
278
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ h(r, { sx: { flex: 1, minWidth: 0, pt: "2px" }, children: [
|
|
279
283
|
/* @__PURE__ */ t(
|
|
280
|
-
|
|
284
|
+
C,
|
|
281
285
|
{
|
|
282
286
|
sx: {
|
|
283
|
-
fontFamily:
|
|
287
|
+
fontFamily: A,
|
|
284
288
|
fontWeight: 700,
|
|
285
289
|
fontSize: "0.875em",
|
|
286
290
|
lineHeight: 1.3,
|
|
287
|
-
color:
|
|
291
|
+
color: p
|
|
288
292
|
},
|
|
289
|
-
children:
|
|
293
|
+
children: a.title
|
|
290
294
|
}
|
|
291
295
|
),
|
|
292
296
|
/* @__PURE__ */ t(
|
|
293
|
-
|
|
297
|
+
C,
|
|
294
298
|
{
|
|
295
299
|
sx: {
|
|
296
|
-
fontFamily:
|
|
300
|
+
fontFamily: A,
|
|
297
301
|
fontWeight: 400,
|
|
298
302
|
fontSize: "0.75em",
|
|
299
303
|
lineHeight: 1.6,
|
|
300
|
-
color:
|
|
304
|
+
color: p,
|
|
301
305
|
opacity: 0.65,
|
|
302
|
-
mt:
|
|
306
|
+
mt: I["2xs"]
|
|
303
307
|
},
|
|
304
|
-
children:
|
|
308
|
+
children: a.description
|
|
305
309
|
}
|
|
306
310
|
)
|
|
307
311
|
] })
|
|
308
312
|
]
|
|
309
313
|
}
|
|
310
314
|
),
|
|
311
|
-
!
|
|
315
|
+
!T && /* @__PURE__ */ t(
|
|
312
316
|
r,
|
|
313
317
|
{
|
|
314
318
|
sx: {
|
|
315
319
|
height: "1px",
|
|
316
|
-
mx:
|
|
317
|
-
bgcolor:
|
|
320
|
+
mx: I.md,
|
|
321
|
+
bgcolor: y ? `rgba(${y.replace(/[^\d,]/g, "")}, 0.1)` : `${f}1A`
|
|
318
322
|
}
|
|
319
323
|
}
|
|
320
324
|
)
|
|
321
|
-
] },
|
|
325
|
+
] }, W);
|
|
322
326
|
})
|
|
323
327
|
}
|
|
324
328
|
),
|
|
325
|
-
/* @__PURE__ */
|
|
329
|
+
s != null && s.items.length ? /* @__PURE__ */ t(
|
|
326
330
|
r,
|
|
327
331
|
{
|
|
328
332
|
sx: {
|
|
333
|
+
borderRadius: w,
|
|
334
|
+
bgcolor: d ? `rgba(${d.replace(/[^\d,]/g, "")}, 0.5)` : x,
|
|
335
|
+
p: I.md,
|
|
329
336
|
display: "flex",
|
|
330
|
-
flexDirection:
|
|
331
|
-
|
|
337
|
+
flexDirection: "column",
|
|
338
|
+
backdropFilter: "blur(4px)"
|
|
339
|
+
},
|
|
340
|
+
children: /* @__PURE__ */ t(
|
|
341
|
+
at,
|
|
342
|
+
{
|
|
343
|
+
consents: s,
|
|
344
|
+
primaryColor: f,
|
|
345
|
+
textColor: p,
|
|
346
|
+
brandingUrls: (O = n == null ? void 0 : n.branding) == null ? void 0 : O.urls,
|
|
347
|
+
align: "center"
|
|
348
|
+
}
|
|
349
|
+
)
|
|
350
|
+
}
|
|
351
|
+
) : null,
|
|
352
|
+
/* @__PURE__ */ h(
|
|
353
|
+
r,
|
|
354
|
+
{
|
|
355
|
+
sx: {
|
|
356
|
+
display: "flex",
|
|
357
|
+
flexDirection: c ? "column" : "row",
|
|
358
|
+
justifyContent: S ? "space-between" : "flex-end",
|
|
332
359
|
alignItems: "center",
|
|
333
|
-
gap:
|
|
360
|
+
gap: I.lg
|
|
334
361
|
},
|
|
335
362
|
children: [
|
|
336
|
-
|
|
337
|
-
|
|
363
|
+
S && !c && /* @__PURE__ */ t(
|
|
364
|
+
ue,
|
|
338
365
|
{
|
|
339
|
-
brandingLogo:
|
|
340
|
-
textColor:
|
|
341
|
-
label: ((
|
|
366
|
+
brandingLogo: S,
|
|
367
|
+
textColor: p,
|
|
368
|
+
label: ((H = n == null ? void 0 : n.labels) == null ? void 0 : H.sponsor) || null
|
|
342
369
|
}
|
|
343
370
|
),
|
|
344
371
|
/* @__PURE__ */ t(
|
|
345
|
-
|
|
372
|
+
ye,
|
|
346
373
|
{
|
|
347
374
|
variant: "soft",
|
|
348
|
-
|
|
349
|
-
|
|
375
|
+
loading: g,
|
|
376
|
+
endDecorator: /* @__PURE__ */ t(xt, { children: /* @__PURE__ */ t(gt, {}) }),
|
|
377
|
+
onClick: i && l ? l.onClick : e,
|
|
350
378
|
sx: {
|
|
351
|
-
borderRadius:
|
|
379
|
+
borderRadius: E,
|
|
352
380
|
py: "10px",
|
|
353
381
|
pr: "12px",
|
|
354
382
|
pl: "16px",
|
|
355
|
-
bgcolor:
|
|
356
|
-
color:
|
|
383
|
+
bgcolor: f,
|
|
384
|
+
color: b,
|
|
357
385
|
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
358
386
|
transform: "scale(1)",
|
|
359
387
|
alignSelf: "center",
|
|
360
|
-
"&:hover": { bgcolor:
|
|
361
|
-
"&:active": { color:
|
|
388
|
+
"&:hover": { bgcolor: f, transform: "scale(1.02)" },
|
|
389
|
+
"&:active": { color: b, transform: "scale(0.98)" },
|
|
362
390
|
"&:disabled": {
|
|
363
|
-
bgcolor:
|
|
364
|
-
color:
|
|
391
|
+
bgcolor: f,
|
|
392
|
+
color: b,
|
|
365
393
|
opacity: "12%"
|
|
366
394
|
},
|
|
367
|
-
"--Icon-color":
|
|
395
|
+
"--Icon-color": b,
|
|
368
396
|
"@keyframes pulse": {
|
|
369
397
|
"0%": { transform: "scale(1)" },
|
|
370
398
|
"50%": { transform: "scale(1.05)" },
|
|
371
399
|
"100%": { transform: "scale(1)" }
|
|
372
400
|
},
|
|
373
401
|
animation: "pulse 1s infinite",
|
|
374
|
-
fontSize: "0.9375em"
|
|
402
|
+
fontSize: "0.9375em",
|
|
403
|
+
...g ? Et(f, b) : {}
|
|
375
404
|
},
|
|
376
405
|
children: /* @__PURE__ */ t(
|
|
377
|
-
|
|
406
|
+
C,
|
|
378
407
|
{
|
|
379
408
|
sx: {
|
|
380
|
-
fontFamily:
|
|
409
|
+
fontFamily: A,
|
|
381
410
|
fontWeight: 500,
|
|
382
411
|
fontSize: "0.9375em",
|
|
383
412
|
lineHeight: "24px",
|
|
384
413
|
letterSpacing: "0.46px",
|
|
385
414
|
textTransform: "uppercase",
|
|
386
|
-
color:
|
|
387
|
-
gap:
|
|
415
|
+
color: g ? "transparent" : b,
|
|
416
|
+
gap: I.xs,
|
|
388
417
|
display: "flex",
|
|
389
418
|
alignItems: "center"
|
|
390
419
|
},
|
|
391
|
-
children:
|
|
420
|
+
children: i && l ? l.defaultLabel : ((j = s == null ? void 0 : s.labels) == null ? void 0 : j.ctaLabel) || o("eitherOr.buttons.start")
|
|
392
421
|
}
|
|
393
422
|
)
|
|
394
423
|
}
|
|
395
424
|
),
|
|
396
|
-
|
|
397
|
-
|
|
425
|
+
S && c && /* @__PURE__ */ t(
|
|
426
|
+
ue,
|
|
398
427
|
{
|
|
399
|
-
brandingLogo:
|
|
400
|
-
textColor:
|
|
401
|
-
label: ((
|
|
428
|
+
brandingLogo: S,
|
|
429
|
+
textColor: p,
|
|
430
|
+
label: ((V = n == null ? void 0 : n.labels) == null ? void 0 : V.sponsor) || null
|
|
402
431
|
}
|
|
403
432
|
)
|
|
404
433
|
]
|
|
@@ -407,7 +436,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
407
436
|
]
|
|
408
437
|
}
|
|
409
438
|
) }) : null;
|
|
410
|
-
},
|
|
439
|
+
}, An = Xt`
|
|
411
440
|
0% {
|
|
412
441
|
opacity: 1;
|
|
413
442
|
transform: translateY(0);
|
|
@@ -416,13 +445,13 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
416
445
|
opacity: 0;
|
|
417
446
|
transform: translateY(-20px);
|
|
418
447
|
}
|
|
419
|
-
`,
|
|
448
|
+
`, Nt = {
|
|
420
449
|
pointsAdded: {
|
|
421
450
|
position: "absolute",
|
|
422
451
|
top: -20,
|
|
423
452
|
right: 0,
|
|
424
453
|
color: "primary.500",
|
|
425
|
-
animation: `${
|
|
454
|
+
animation: `${An} 1s ease-out forwards`
|
|
426
455
|
},
|
|
427
456
|
optionWrapper: {
|
|
428
457
|
position: "relative",
|
|
@@ -465,22 +494,22 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
465
494
|
borderRadius: "inherit",
|
|
466
495
|
transform: "translateZ(0)"
|
|
467
496
|
}
|
|
468
|
-
},
|
|
497
|
+
}, ot = ({
|
|
469
498
|
option: e,
|
|
470
499
|
selected: n,
|
|
471
|
-
feedback:
|
|
472
|
-
onSelect:
|
|
473
|
-
pairId:
|
|
474
|
-
brandingPrimaryColor:
|
|
475
|
-
optionIndex:
|
|
500
|
+
feedback: l,
|
|
501
|
+
onSelect: i,
|
|
502
|
+
pairId: s,
|
|
503
|
+
brandingPrimaryColor: g,
|
|
504
|
+
optionIndex: o = 0
|
|
476
505
|
}) => {
|
|
477
|
-
const
|
|
478
|
-
if (!
|
|
479
|
-
const
|
|
480
|
-
return /* @__PURE__ */
|
|
506
|
+
const m = q(), c = ve(), u = g || m.palette.primary.plainColor, f = m.palette.primary.onPrimary, b = m.palette.success.plainColor, p = m.palette.danger.plainColor, x = oe(u || ""), A = x ? x.replace(/[^\d,]/g, "") : null, E = un(e.images ?? null), w = !!E, I = o === 0 ? "A" : "B", y = l.selectedOption === e.id, d = y && !!l.isCorrect || e.id === l.correctOptionId, z = y && !l.isCorrect || !!l.timedOut && e.id !== l.correctOptionId;
|
|
507
|
+
if (!w) {
|
|
508
|
+
const S = o === 0 ? "135deg" : "225deg", v = d ? `linear-gradient(${S}, ${b}20 0%, ${b}0D 100%)` : z ? `linear-gradient(${S}, ${p}20 0%, ${p}0D 100%)` : A ? `linear-gradient(${S}, rgba(${A}, 0.22) 0%, rgba(${A}, 0.08) 60%, rgba(${A}, 0.14) 100%)` : `linear-gradient(${S}, ${u}38 0%, ${u}14 60%, ${u}24 100%)`, D = A ? `repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(${A}, 0.04) 10px, rgba(${A}, 0.04) 11px)` : "none", P = d ? b : z ? p : A ? `rgba(${A}, 0.3)` : `${u}4D`, $ = d ? b : z ? p : u;
|
|
509
|
+
return /* @__PURE__ */ h(
|
|
481
510
|
r,
|
|
482
511
|
{
|
|
483
|
-
onClick: () => !n && s
|
|
512
|
+
onClick: () => !n && i(s, e.id),
|
|
484
513
|
sx: {
|
|
485
514
|
position: "relative",
|
|
486
515
|
height: "100px",
|
|
@@ -489,16 +518,16 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
489
518
|
cursor: n ? "default" : "pointer",
|
|
490
519
|
background: v,
|
|
491
520
|
border: "1.5px solid",
|
|
492
|
-
borderColor:
|
|
521
|
+
borderColor: P,
|
|
493
522
|
display: "flex",
|
|
494
523
|
alignItems: "center",
|
|
495
524
|
gap: "14px",
|
|
496
|
-
px:
|
|
525
|
+
px: c.md,
|
|
497
526
|
transition: "transform 0.2s, box-shadow 0.2s, border-color 0.25s",
|
|
498
|
-
boxShadow:
|
|
527
|
+
boxShadow: d ? `0 0 0 3px ${b}30` : z ? `0 0 0 3px ${p}30` : "none",
|
|
499
528
|
"&:hover": n ? {} : {
|
|
500
529
|
transform: "scale(1.01)",
|
|
501
|
-
boxShadow: `0 4px 16px ${
|
|
530
|
+
boxShadow: `0 4px 16px ${A ? `rgba(${A}, 0.2)` : `${u}33`}`
|
|
502
531
|
}
|
|
503
532
|
},
|
|
504
533
|
children: [
|
|
@@ -508,7 +537,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
508
537
|
sx: {
|
|
509
538
|
position: "absolute",
|
|
510
539
|
inset: 0,
|
|
511
|
-
background:
|
|
540
|
+
background: D,
|
|
512
541
|
zIndex: 0
|
|
513
542
|
}
|
|
514
543
|
}
|
|
@@ -520,38 +549,38 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
520
549
|
width: 40,
|
|
521
550
|
height: 40,
|
|
522
551
|
borderRadius: "50%",
|
|
523
|
-
bgcolor:
|
|
552
|
+
bgcolor: $,
|
|
524
553
|
display: "flex",
|
|
525
554
|
alignItems: "center",
|
|
526
555
|
justifyContent: "center",
|
|
527
556
|
flexShrink: 0,
|
|
528
557
|
zIndex: 2,
|
|
529
558
|
transition: "background-color 0.25s",
|
|
530
|
-
boxShadow:
|
|
559
|
+
boxShadow: d ? `0 2px 8px ${b}59` : z ? `0 2px 8px ${p}59` : `0 2px 8px ${A ? `rgba(${A}, 0.35)` : `${u}59`}`
|
|
531
560
|
},
|
|
532
|
-
children:
|
|
533
|
-
|
|
561
|
+
children: d ? /* @__PURE__ */ t(ct, { sx: { fontSize: "1.3em", color: "#fff" } }) : z ? /* @__PURE__ */ t(dt, { sx: { fontSize: "1.3em", color: "#fff" } }) : /* @__PURE__ */ t(
|
|
562
|
+
C,
|
|
534
563
|
{
|
|
535
564
|
sx: {
|
|
536
|
-
color:
|
|
565
|
+
color: f,
|
|
537
566
|
fontWeight: 800,
|
|
538
567
|
fontSize: "1em",
|
|
539
568
|
lineHeight: 1,
|
|
540
569
|
userSelect: "none"
|
|
541
570
|
},
|
|
542
|
-
children:
|
|
571
|
+
children: I
|
|
543
572
|
}
|
|
544
573
|
)
|
|
545
574
|
}
|
|
546
575
|
),
|
|
547
576
|
/* @__PURE__ */ t(
|
|
548
|
-
|
|
577
|
+
C,
|
|
549
578
|
{
|
|
550
579
|
sx: {
|
|
551
580
|
fontWeight: 700,
|
|
552
581
|
fontSize: "0.9375em",
|
|
553
582
|
lineHeight: 1.35,
|
|
554
|
-
color:
|
|
583
|
+
color: d ? b : z ? p : u,
|
|
555
584
|
zIndex: 2,
|
|
556
585
|
flex: 1,
|
|
557
586
|
transition: "color 0.25s"
|
|
@@ -563,25 +592,25 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
563
592
|
}
|
|
564
593
|
);
|
|
565
594
|
}
|
|
566
|
-
return /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ h(
|
|
567
596
|
r,
|
|
568
597
|
{
|
|
569
|
-
onClick: () => !n && s
|
|
598
|
+
onClick: () => !n && i(s, e.id),
|
|
570
599
|
sx: {
|
|
571
600
|
position: "relative",
|
|
572
601
|
aspectRatio: "16/9",
|
|
573
602
|
borderRadius: "sm",
|
|
574
603
|
overflow: "hidden",
|
|
575
604
|
cursor: n ? "default" : "pointer",
|
|
576
|
-
backgroundImage: `url(${
|
|
605
|
+
backgroundImage: `url(${E})`,
|
|
577
606
|
backgroundSize: "cover",
|
|
578
607
|
backgroundPosition: "center top",
|
|
579
608
|
backgroundClip: "padding-box",
|
|
580
|
-
bgcolor:
|
|
609
|
+
bgcolor: m.surfaceVariant,
|
|
581
610
|
border: "1.5px solid transparent",
|
|
582
|
-
borderColor:
|
|
611
|
+
borderColor: d ? b : z ? p : "transparent",
|
|
583
612
|
transition: "transform 0.2s, border-color 0.25s",
|
|
584
|
-
boxShadow:
|
|
613
|
+
boxShadow: d ? `0 0 0 3px ${b}30` : z ? `0 0 0 3px ${p}30` : "none",
|
|
585
614
|
"&:hover": n ? {} : { transform: "scale(1.01)" }
|
|
586
615
|
},
|
|
587
616
|
children: [
|
|
@@ -595,19 +624,19 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
595
624
|
}
|
|
596
625
|
}
|
|
597
626
|
),
|
|
598
|
-
(
|
|
627
|
+
(y || l.timedOut || e.id === l.correctOptionId) && /* @__PURE__ */ t(
|
|
599
628
|
r,
|
|
600
629
|
{
|
|
601
630
|
sx: {
|
|
602
631
|
position: "absolute",
|
|
603
632
|
inset: 0,
|
|
604
|
-
background:
|
|
633
|
+
background: d ? `linear-gradient(to top, ${b}CC, ${b}55 50%, transparent 100%)` : `linear-gradient(to top, ${p}CC, ${p}55 50%, transparent 100%)`,
|
|
605
634
|
transition: "background 0.25s",
|
|
606
635
|
zIndex: 1
|
|
607
636
|
}
|
|
608
637
|
}
|
|
609
638
|
),
|
|
610
|
-
(
|
|
639
|
+
(y || l.timedOut || e.id === l.correctOptionId) && /* @__PURE__ */ t(
|
|
611
640
|
r,
|
|
612
641
|
{
|
|
613
642
|
sx: {
|
|
@@ -616,8 +645,8 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
616
645
|
right: "10px",
|
|
617
646
|
zIndex: 3
|
|
618
647
|
},
|
|
619
|
-
children:
|
|
620
|
-
|
|
648
|
+
children: d ? /* @__PURE__ */ t(
|
|
649
|
+
ct,
|
|
621
650
|
{
|
|
622
651
|
sx: {
|
|
623
652
|
fontSize: 28,
|
|
@@ -626,7 +655,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
626
655
|
}
|
|
627
656
|
}
|
|
628
657
|
) : /* @__PURE__ */ t(
|
|
629
|
-
|
|
658
|
+
dt,
|
|
630
659
|
{
|
|
631
660
|
sx: {
|
|
632
661
|
fontSize: 28,
|
|
@@ -650,7 +679,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
650
679
|
zIndex: 2
|
|
651
680
|
},
|
|
652
681
|
children: /* @__PURE__ */ t(
|
|
653
|
-
|
|
682
|
+
C,
|
|
654
683
|
{
|
|
655
684
|
sx: {
|
|
656
685
|
color: "#fff",
|
|
@@ -667,34 +696,34 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
667
696
|
]
|
|
668
697
|
}
|
|
669
698
|
);
|
|
670
|
-
},
|
|
699
|
+
}, Yt = ({
|
|
671
700
|
time: e,
|
|
672
701
|
maxTime: n,
|
|
673
|
-
brandingPrimaryColor:
|
|
702
|
+
brandingPrimaryColor: l
|
|
674
703
|
}) => {
|
|
675
|
-
const
|
|
704
|
+
const i = q().palette.danger.softBg, s = q().palette.danger.plainColor, g = q().palette.warning.softBg, o = q().palette.warning.plainColor, m = l || q().palette.primary.plainColor, c = q().palette.primary.onPrimary, u = pe().xl, f = Te().secondary, b = ve(), p = {
|
|
676
705
|
"@keyframes pulse": {
|
|
677
706
|
"0%": { transform: "scale(1)" },
|
|
678
707
|
"50%": { transform: "scale(1.05)" },
|
|
679
708
|
"100%": { transform: "scale(1)" }
|
|
680
709
|
}
|
|
681
|
-
},
|
|
682
|
-
background:
|
|
683
|
-
color:
|
|
710
|
+
}, x = n > 0 ? e / n * 100 : 100, E = x <= 30 ? {
|
|
711
|
+
background: i,
|
|
712
|
+
color: s,
|
|
684
713
|
animation: "pulse 1s infinite"
|
|
685
|
-
} :
|
|
686
|
-
background:
|
|
687
|
-
color:
|
|
714
|
+
} : x <= 50 ? {
|
|
715
|
+
background: g,
|
|
716
|
+
color: o,
|
|
688
717
|
animation: void 0
|
|
689
718
|
} : {
|
|
690
|
-
background:
|
|
691
|
-
color:
|
|
719
|
+
background: m,
|
|
720
|
+
color: c,
|
|
692
721
|
animation: void 0
|
|
693
|
-
},
|
|
694
|
-
const
|
|
695
|
-
return `${
|
|
722
|
+
}, w = (I) => {
|
|
723
|
+
const y = Math.floor(I / 60), d = I % 60;
|
|
724
|
+
return `${y < 10 ? "0" : ""}${y}:${d < 10 ? "0" : ""}${d}${y > 0 ? "m" : "s"}`;
|
|
696
725
|
};
|
|
697
|
-
return /* @__PURE__ */
|
|
726
|
+
return /* @__PURE__ */ h(
|
|
698
727
|
r,
|
|
699
728
|
{
|
|
700
729
|
sx: {
|
|
@@ -704,181 +733,181 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
704
733
|
display: "flex",
|
|
705
734
|
gap: b["2xs"],
|
|
706
735
|
alignItems: "center",
|
|
707
|
-
bgcolor:
|
|
708
|
-
borderRadius:
|
|
736
|
+
bgcolor: E.background,
|
|
737
|
+
borderRadius: u,
|
|
709
738
|
maxWidth: "105px",
|
|
710
739
|
maxHeight: "40px",
|
|
711
740
|
transition: "all 0.3s ease",
|
|
712
|
-
animation:
|
|
713
|
-
...
|
|
741
|
+
animation: E.animation,
|
|
742
|
+
...p,
|
|
714
743
|
zIndex: 10
|
|
715
744
|
},
|
|
716
745
|
children: [
|
|
717
746
|
/* @__PURE__ */ t(
|
|
718
|
-
|
|
747
|
+
mn,
|
|
719
748
|
{
|
|
720
749
|
sx: {
|
|
721
750
|
width: "24px",
|
|
722
751
|
height: "24px",
|
|
723
|
-
color:
|
|
752
|
+
color: E.color,
|
|
724
753
|
transition: "color 0.3s ease"
|
|
725
754
|
}
|
|
726
755
|
}
|
|
727
756
|
),
|
|
728
757
|
/* @__PURE__ */ t(
|
|
729
|
-
|
|
758
|
+
C,
|
|
730
759
|
{
|
|
731
760
|
sx: {
|
|
732
|
-
fontFamily:
|
|
761
|
+
fontFamily: f,
|
|
733
762
|
fontWeight: 400,
|
|
734
763
|
fontSize: "1em",
|
|
735
764
|
lineHeight: "150%",
|
|
736
765
|
letterSpacing: "0.15px",
|
|
737
|
-
color:
|
|
766
|
+
color: E.color,
|
|
738
767
|
transition: "color 0.3s ease"
|
|
739
768
|
},
|
|
740
|
-
children:
|
|
769
|
+
children: w(e)
|
|
741
770
|
}
|
|
742
771
|
)
|
|
743
772
|
]
|
|
744
773
|
}
|
|
745
774
|
);
|
|
746
|
-
},
|
|
775
|
+
}, wn = ({
|
|
747
776
|
currentPair: e,
|
|
748
777
|
timer: n,
|
|
749
|
-
selected:
|
|
750
|
-
maxTime:
|
|
751
|
-
feedback:
|
|
752
|
-
onSelect:
|
|
753
|
-
stepInfo:
|
|
754
|
-
brandingPrimaryColor:
|
|
755
|
-
game:
|
|
778
|
+
selected: l,
|
|
779
|
+
maxTime: i,
|
|
780
|
+
feedback: s,
|
|
781
|
+
onSelect: g,
|
|
782
|
+
stepInfo: o,
|
|
783
|
+
brandingPrimaryColor: m,
|
|
784
|
+
game: c
|
|
756
785
|
}) => {
|
|
757
|
-
var X,
|
|
758
|
-
const [
|
|
759
|
-
|
|
760
|
-
if (
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
return
|
|
786
|
+
var X, Z, ee, J, me, ae, se, ce, Y, he;
|
|
787
|
+
const [u, f] = B(0), [b, p] = B(!1), [x, A] = B(0), [E, w] = B(0), [I, y] = B(!1), d = mt(0), { t: z } = Q(), S = Se(), v = Ve(), D = q(), P = D.surfaceVariant, $ = m || D.palette.primary.plainColor, L = ((Z = (X = c == null ? void 0 : c.branding) == null ? void 0 : X.colors) == null ? void 0 : Z.contentColor) || D.textColor, N = pe().md, R = ve(), k = oe(P || ""), O = oe($ || ""), H = S ? ((J = (ee = c == null ? void 0 : c.branding) == null ? void 0 : ee.images) == null ? void 0 : J.mobileLogo) || ((ae = (me = c == null ? void 0 : c.branding) == null ? void 0 : me.images) == null ? void 0 : ae.mainLogo) || "" : ((ce = (se = c == null ? void 0 : c.branding) == null ? void 0 : se.images) == null ? void 0 : ce.mainLogo) || "", j = z("common.labels.point", { count: u });
|
|
788
|
+
fe(() => {
|
|
789
|
+
if (o != null && o.currentPoints && o.currentPoints > u) {
|
|
790
|
+
A(o.currentPoints - u), p(!0), w((G) => G + 1);
|
|
791
|
+
const U = setTimeout(() => p(!1), 1e3);
|
|
792
|
+
return f(o.currentPoints), () => clearTimeout(U);
|
|
764
793
|
}
|
|
765
|
-
}, [
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
const
|
|
769
|
-
if (
|
|
770
|
-
|
|
771
|
-
const
|
|
772
|
-
return () => clearTimeout(
|
|
794
|
+
}, [o == null ? void 0 : o.currentPoints, u]);
|
|
795
|
+
const V = (c == null ? void 0 : c.points) ?? [], a = V.length >= 2 ? V[1].correctSteps - V[0].correctSteps : ((Y = V[0]) == null ? void 0 : Y.correctSteps) || 5;
|
|
796
|
+
fe(() => {
|
|
797
|
+
const U = d.current, G = (o == null ? void 0 : o.currentStreak) ?? 0;
|
|
798
|
+
if (d.current = G, G > U && G > 0 && G % a === 0) {
|
|
799
|
+
y(!0);
|
|
800
|
+
const de = setTimeout(() => y(!1), 500);
|
|
801
|
+
return () => clearTimeout(de);
|
|
773
802
|
}
|
|
774
|
-
}, [
|
|
775
|
-
const
|
|
776
|
-
const
|
|
777
|
-
for (let
|
|
778
|
-
|
|
803
|
+
}, [o == null ? void 0 : o.currentStreak, a]);
|
|
804
|
+
const W = () => {
|
|
805
|
+
const U = [], G = (o == null ? void 0 : o.currentLives) ?? 3;
|
|
806
|
+
for (let de = 0; de < G; de++)
|
|
807
|
+
U.push(
|
|
779
808
|
/* @__PURE__ */ t(
|
|
780
|
-
|
|
809
|
+
tt,
|
|
781
810
|
{
|
|
782
|
-
sx: { height: 20, color:
|
|
811
|
+
sx: { height: 20, color: $ }
|
|
783
812
|
},
|
|
784
|
-
`life-${
|
|
813
|
+
`life-${de}`
|
|
785
814
|
)
|
|
786
815
|
);
|
|
787
|
-
for (let
|
|
788
|
-
|
|
816
|
+
for (let de = G; de < 3; de++)
|
|
817
|
+
U.push(
|
|
789
818
|
/* @__PURE__ */ t(
|
|
790
|
-
|
|
819
|
+
Ut,
|
|
791
820
|
{
|
|
792
821
|
sx: {
|
|
793
822
|
height: 20,
|
|
794
|
-
color:
|
|
823
|
+
color: O ? `rgba(${O.replace(/[^\d,]/g, "")}, 0.35)` : `${$}59`
|
|
795
824
|
}
|
|
796
825
|
},
|
|
797
|
-
`empty-${
|
|
826
|
+
`empty-${de}`
|
|
798
827
|
)
|
|
799
828
|
);
|
|
800
|
-
return
|
|
801
|
-
},
|
|
802
|
-
const
|
|
803
|
-
return /* @__PURE__ */
|
|
804
|
-
Array.from({ length:
|
|
829
|
+
return U;
|
|
830
|
+
}, T = () => {
|
|
831
|
+
const U = (o == null ? void 0 : o.currentStreak) ?? 0, G = I ? a : U % a, Ae = Math.floor(U / a) + 1;
|
|
832
|
+
return /* @__PURE__ */ h(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
833
|
+
Array.from({ length: a }, (we, Ce) => /* @__PURE__ */ t(
|
|
805
834
|
r,
|
|
806
835
|
{
|
|
807
836
|
sx: {
|
|
808
837
|
flex: 1,
|
|
809
838
|
height: 4,
|
|
810
|
-
bgcolor:
|
|
839
|
+
bgcolor: Ce < G ? $ : O ? `rgba(${O.replace(/[^\d,]/g, "")}, 0.2)` : `${$}33`,
|
|
811
840
|
borderRadius: "2px",
|
|
812
841
|
transition: "background-color 0.3s ease"
|
|
813
842
|
}
|
|
814
843
|
},
|
|
815
|
-
`streak-${
|
|
844
|
+
`streak-${Ce}`
|
|
816
845
|
)),
|
|
817
|
-
|
|
818
|
-
|
|
846
|
+
Ae > 1 && /* @__PURE__ */ h(
|
|
847
|
+
C,
|
|
819
848
|
{
|
|
820
849
|
sx: {
|
|
821
|
-
color:
|
|
850
|
+
color: $,
|
|
822
851
|
fontWeight: 700,
|
|
823
852
|
fontSize: "0.75em",
|
|
824
853
|
lineHeight: 1,
|
|
825
|
-
ml:
|
|
854
|
+
ml: R["2xs"],
|
|
826
855
|
flexShrink: 0
|
|
827
856
|
},
|
|
828
857
|
children: [
|
|
829
858
|
"×",
|
|
830
|
-
|
|
859
|
+
Ae
|
|
831
860
|
]
|
|
832
861
|
}
|
|
833
862
|
)
|
|
834
863
|
] });
|
|
835
|
-
},
|
|
864
|
+
}, K = () => /* @__PURE__ */ t(
|
|
836
865
|
r,
|
|
837
866
|
{
|
|
838
867
|
sx: {
|
|
839
868
|
display: "flex",
|
|
840
869
|
justifyContent: "center",
|
|
841
870
|
alignItems: "center",
|
|
842
|
-
...
|
|
871
|
+
...S ? { width: "100%", my: R.sm } : {}
|
|
843
872
|
},
|
|
844
873
|
children: /* @__PURE__ */ t(
|
|
845
874
|
r,
|
|
846
875
|
{
|
|
847
876
|
sx: {
|
|
848
877
|
borderRadius: "50%",
|
|
849
|
-
bgcolor:
|
|
878
|
+
bgcolor: D.surface,
|
|
850
879
|
boxShadow: "sm",
|
|
851
880
|
width: "32px",
|
|
852
881
|
height: "32px",
|
|
853
882
|
minWidth: "32px",
|
|
854
883
|
border: "1px solid",
|
|
855
|
-
borderColor:
|
|
884
|
+
borderColor: $,
|
|
856
885
|
display: "flex",
|
|
857
886
|
alignItems: "center",
|
|
858
887
|
justifyContent: "center"
|
|
859
888
|
},
|
|
860
|
-
children:
|
|
889
|
+
children: S ? /* @__PURE__ */ t(In, { sx: { fontSize: "1.1em", color: $ } }) : /* @__PURE__ */ t(Gt, { sx: { fontSize: "1.1em", color: $ } })
|
|
861
890
|
}
|
|
862
891
|
)
|
|
863
892
|
}
|
|
864
893
|
);
|
|
865
894
|
return e ? (
|
|
866
895
|
// questionArea
|
|
867
|
-
/* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p:
|
|
896
|
+
/* @__PURE__ */ t(r, { sx: { display: "flex", flexDirection: "column", p: R.md }, children: /* @__PURE__ */ h(
|
|
868
897
|
r,
|
|
869
898
|
{
|
|
870
899
|
sx: {
|
|
871
900
|
display: "flex",
|
|
872
901
|
flexDirection: "column",
|
|
873
|
-
gap:
|
|
902
|
+
gap: S ? R.lg : R.md
|
|
874
903
|
},
|
|
875
904
|
children: [
|
|
876
905
|
/* @__PURE__ */ t(r, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(
|
|
877
|
-
|
|
906
|
+
Yt,
|
|
878
907
|
{
|
|
879
908
|
time: n,
|
|
880
|
-
maxTime:
|
|
881
|
-
brandingPrimaryColor:
|
|
909
|
+
maxTime: i,
|
|
910
|
+
brandingPrimaryColor: m
|
|
882
911
|
},
|
|
883
912
|
`timer-${e.pairId}`
|
|
884
913
|
) }),
|
|
@@ -886,49 +915,49 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
886
915
|
r,
|
|
887
916
|
{
|
|
888
917
|
sx: {
|
|
889
|
-
borderRadius:
|
|
918
|
+
borderRadius: N,
|
|
890
919
|
overflow: "hidden",
|
|
891
|
-
bgcolor:
|
|
920
|
+
bgcolor: k ? `rgba(${k.replace(/[^\d,]/g, "")}, 0.5)` : D.surfaceVariant,
|
|
892
921
|
display: "flex",
|
|
893
922
|
flexDirection: "column",
|
|
894
923
|
backdropFilter: "blur(4px)",
|
|
895
|
-
px:
|
|
896
|
-
pt:
|
|
897
|
-
pb:
|
|
898
|
-
gap:
|
|
924
|
+
px: R.md,
|
|
925
|
+
pt: R.md,
|
|
926
|
+
pb: R.lg,
|
|
927
|
+
gap: R.md
|
|
899
928
|
},
|
|
900
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ h(
|
|
901
930
|
r,
|
|
902
931
|
{
|
|
903
932
|
sx: {
|
|
904
933
|
display: "flex",
|
|
905
|
-
flexDirection:
|
|
906
|
-
gap:
|
|
907
|
-
alignItems:
|
|
934
|
+
flexDirection: S ? "column" : "row",
|
|
935
|
+
gap: S ? 0 : R.md,
|
|
936
|
+
alignItems: S ? "stretch" : "center"
|
|
908
937
|
},
|
|
909
938
|
children: [
|
|
910
939
|
/* @__PURE__ */ t(r, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
911
|
-
|
|
940
|
+
ot,
|
|
912
941
|
{
|
|
913
942
|
option: e.optionOne,
|
|
914
|
-
selected:
|
|
915
|
-
feedback:
|
|
916
|
-
onSelect:
|
|
943
|
+
selected: l,
|
|
944
|
+
feedback: s,
|
|
945
|
+
onSelect: g,
|
|
917
946
|
pairId: e.pairId,
|
|
918
|
-
brandingPrimaryColor:
|
|
947
|
+
brandingPrimaryColor: m,
|
|
919
948
|
optionIndex: 0
|
|
920
949
|
}
|
|
921
950
|
) }),
|
|
922
|
-
|
|
951
|
+
K(),
|
|
923
952
|
/* @__PURE__ */ t(r, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
924
|
-
|
|
953
|
+
ot,
|
|
925
954
|
{
|
|
926
955
|
option: e.optionTwo,
|
|
927
|
-
selected:
|
|
928
|
-
feedback:
|
|
929
|
-
onSelect:
|
|
956
|
+
selected: l,
|
|
957
|
+
feedback: s,
|
|
958
|
+
onSelect: g,
|
|
930
959
|
pairId: e.pairId,
|
|
931
|
-
brandingPrimaryColor:
|
|
960
|
+
brandingPrimaryColor: m,
|
|
932
961
|
optionIndex: 1
|
|
933
962
|
}
|
|
934
963
|
) })
|
|
@@ -937,38 +966,38 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
937
966
|
)
|
|
938
967
|
}
|
|
939
968
|
),
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
/* @__PURE__ */ t(r, { sx: { mb:
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
|
|
969
|
+
/* @__PURE__ */ h(r, { children: [
|
|
970
|
+
/* @__PURE__ */ t(r, { sx: { mb: R.xs }, children: T() }),
|
|
971
|
+
/* @__PURE__ */ h(
|
|
972
|
+
je,
|
|
944
973
|
{
|
|
945
974
|
direction: "row",
|
|
946
975
|
justifyContent: "space-between",
|
|
947
976
|
alignItems: "center",
|
|
948
977
|
children: [
|
|
949
|
-
/* @__PURE__ */ t(r, { children:
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
952
|
-
|
|
978
|
+
/* @__PURE__ */ t(r, { children: W() }),
|
|
979
|
+
/* @__PURE__ */ h(je, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
980
|
+
/* @__PURE__ */ h(C, { sx: { color: L }, children: [
|
|
981
|
+
j,
|
|
953
982
|
":"
|
|
954
983
|
] }),
|
|
955
|
-
/* @__PURE__ */
|
|
956
|
-
|
|
984
|
+
/* @__PURE__ */ h(
|
|
985
|
+
C,
|
|
957
986
|
{
|
|
958
987
|
level: "h4",
|
|
959
|
-
sx: { position: "relative", color:
|
|
988
|
+
sx: { position: "relative", color: L },
|
|
960
989
|
children: [
|
|
961
|
-
|
|
962
|
-
b && /* @__PURE__ */
|
|
963
|
-
|
|
990
|
+
u,
|
|
991
|
+
b && /* @__PURE__ */ h(
|
|
992
|
+
C,
|
|
964
993
|
{
|
|
965
|
-
sx:
|
|
994
|
+
sx: Nt.pointsAdded,
|
|
966
995
|
children: [
|
|
967
996
|
"+",
|
|
968
|
-
|
|
997
|
+
x
|
|
969
998
|
]
|
|
970
999
|
},
|
|
971
|
-
|
|
1000
|
+
E
|
|
972
1001
|
)
|
|
973
1002
|
]
|
|
974
1003
|
}
|
|
@@ -977,20 +1006,20 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
977
1006
|
]
|
|
978
1007
|
}
|
|
979
1008
|
),
|
|
980
|
-
|
|
1009
|
+
H && /* @__PURE__ */ t(
|
|
981
1010
|
r,
|
|
982
1011
|
{
|
|
983
1012
|
sx: {
|
|
984
|
-
mt:
|
|
1013
|
+
mt: R.xs,
|
|
985
1014
|
display: "flex",
|
|
986
1015
|
justifyContent: v ? "center" : "flex-start"
|
|
987
1016
|
},
|
|
988
1017
|
children: /* @__PURE__ */ t(
|
|
989
|
-
|
|
1018
|
+
ue,
|
|
990
1019
|
{
|
|
991
|
-
brandingLogo:
|
|
992
|
-
textColor:
|
|
993
|
-
label: ((
|
|
1020
|
+
brandingLogo: H,
|
|
1021
|
+
textColor: L,
|
|
1022
|
+
label: ((he = c == null ? void 0 : c.labels) == null ? void 0 : he.sponsor) || null
|
|
994
1023
|
}
|
|
995
1024
|
)
|
|
996
1025
|
}
|
|
@@ -1000,65 +1029,65 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1000
1029
|
}
|
|
1001
1030
|
) })
|
|
1002
1031
|
) : null;
|
|
1003
|
-
},
|
|
1032
|
+
}, Rn = (e, n, l, i) => {
|
|
1004
1033
|
if (n === 0)
|
|
1005
1034
|
return {
|
|
1006
1035
|
emoji: "🎮",
|
|
1007
|
-
message:
|
|
1036
|
+
message: i("eitherOr.results.practice", "Keep practicing!")
|
|
1008
1037
|
};
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
if (
|
|
1038
|
+
const s = e / n * 100;
|
|
1039
|
+
let g;
|
|
1040
|
+
if (s === 100 ? g = {
|
|
1012
1041
|
emoji: "🏆",
|
|
1013
|
-
message:
|
|
1014
|
-
} :
|
|
1042
|
+
message: i("eitherOr.results.perfect", "Perfect! Flawless!")
|
|
1043
|
+
} : s >= 80 ? g = {
|
|
1015
1044
|
emoji: "🔥",
|
|
1016
|
-
message:
|
|
1017
|
-
} :
|
|
1045
|
+
message: i("eitherOr.results.excellent", "Excellent!")
|
|
1046
|
+
} : s >= 60 ? g = { emoji: "✨", message: i("eitherOr.results.great", "Great job!") } : s >= 40 ? g = { emoji: "💪", message: i("eitherOr.results.good", "Good try!") } : g = {
|
|
1018
1047
|
emoji: "📚",
|
|
1019
|
-
message:
|
|
1020
|
-
},
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1048
|
+
message: i("eitherOr.results.practice", "Keep practicing!")
|
|
1049
|
+
}, l > 0) {
|
|
1050
|
+
const o = i("eitherOr.results.livesBonus", { count: l }) || (l === 1 ? "And with 1 life to spare!" : `And with ${l} lives to spare!`);
|
|
1051
|
+
g = { ...g, message: `${g.message} ${o}` };
|
|
1023
1052
|
}
|
|
1024
|
-
return
|
|
1025
|
-
},
|
|
1053
|
+
return g;
|
|
1054
|
+
}, ut = ({
|
|
1026
1055
|
stepInfo: e,
|
|
1027
1056
|
game: n,
|
|
1028
|
-
sdk:
|
|
1029
|
-
onPlayAgain:
|
|
1030
|
-
brandingPrimaryColor:
|
|
1031
|
-
additionalCTA:
|
|
1057
|
+
sdk: l,
|
|
1058
|
+
onPlayAgain: i,
|
|
1059
|
+
brandingPrimaryColor: s,
|
|
1060
|
+
additionalCTA: g
|
|
1032
1061
|
}) => {
|
|
1033
|
-
var
|
|
1034
|
-
const { t:
|
|
1035
|
-
if (
|
|
1062
|
+
var Z, ee, J, me, ae, se, ce, Y, he;
|
|
1063
|
+
const { t: o } = Q(), m = q(), c = s || m.palette.primary.plainColor, u = m.palette.primary.onPrimary, f = ((ee = (Z = n == null ? void 0 : n.branding) == null ? void 0 : Z.colors) == null ? void 0 : ee.contentColor) || m.textColor, b = m.palette.success.plainColor, p = m.palette.danger.plainColor, x = m.palette.success.softBg, A = m.palette.danger.softBg, E = pe().md, w = pe().xl, I = ve(), y = Te().primary, d = Se(), z = Ve(), S = oe(c || ""), v = S ? S.replace(/[^\d,]/g, "") : null, D = d ? ((me = (J = n == null ? void 0 : n.branding) == null ? void 0 : J.images) == null ? void 0 : me.mobileLogo) || ((se = (ae = n == null ? void 0 : n.branding) == null ? void 0 : ae.images) == null ? void 0 : se.mainLogo) || "" : ((Y = (ce = n == null ? void 0 : n.branding) == null ? void 0 : ce.images) == null ? void 0 : Y.mainLogo) || "", [P, $] = B(0), [L, N] = B(null), R = (e == null ? void 0 : e.currentPoints) ?? 0, k = P > 0 && R >= P;
|
|
1064
|
+
if (fe(() => {
|
|
1036
1065
|
n && (async () => {
|
|
1037
1066
|
try {
|
|
1038
|
-
const
|
|
1039
|
-
|
|
1067
|
+
const G = await l.miniGames.getMyEitherOrStats(n.id);
|
|
1068
|
+
$(G.personalBest ?? 0), N(G.betterThan ?? null);
|
|
1040
1069
|
} catch {
|
|
1041
1070
|
}
|
|
1042
1071
|
})();
|
|
1043
|
-
}, [e, n,
|
|
1044
|
-
const
|
|
1045
|
-
(
|
|
1046
|
-
).length,
|
|
1047
|
-
(
|
|
1048
|
-
).length,
|
|
1049
|
-
|
|
1050
|
-
|
|
1072
|
+
}, [e, n, l]), !e) return null;
|
|
1073
|
+
const O = e.steps.filter((U) => U.played), H = O.filter((U) => U.correct === !0).length, j = O.filter(
|
|
1074
|
+
(U) => U.correct === !1 && U.userSelection !== null
|
|
1075
|
+
).length, V = O.filter(
|
|
1076
|
+
(U) => U.userSelection === null
|
|
1077
|
+
).length, a = O.length, W = Rn(
|
|
1078
|
+
H,
|
|
1079
|
+
a,
|
|
1051
1080
|
e.currentLives,
|
|
1052
|
-
|
|
1053
|
-
),
|
|
1054
|
-
return /* @__PURE__ */
|
|
1081
|
+
o
|
|
1082
|
+
), T = a > 0 ? H / a * 100 : 0, K = a > 0 ? j / a * 100 : 0, X = a > 0 ? V / a * 100 : 0;
|
|
1083
|
+
return /* @__PURE__ */ h(
|
|
1055
1084
|
r,
|
|
1056
1085
|
{
|
|
1057
1086
|
sx: {
|
|
1058
|
-
p:
|
|
1087
|
+
p: I.md,
|
|
1059
1088
|
display: "flex",
|
|
1060
1089
|
flexDirection: "column",
|
|
1061
|
-
gap:
|
|
1090
|
+
gap: I.md,
|
|
1062
1091
|
animation: "eoFadeUp 0.45s ease-out both",
|
|
1063
1092
|
"@keyframes eoFadeUp": {
|
|
1064
1093
|
from: { opacity: 0, transform: "translateY(14px)" },
|
|
@@ -1066,14 +1095,14 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1066
1095
|
}
|
|
1067
1096
|
},
|
|
1068
1097
|
children: [
|
|
1069
|
-
|
|
1098
|
+
k && /* @__PURE__ */ h(
|
|
1070
1099
|
r,
|
|
1071
1100
|
{
|
|
1072
1101
|
sx: {
|
|
1073
1102
|
position: "relative",
|
|
1074
1103
|
overflow: "hidden",
|
|
1075
|
-
borderRadius:
|
|
1076
|
-
background: v ? `linear-gradient(135deg, rgba(${v},0.92) 0%, rgba(${v},0.72) 100%)` : `linear-gradient(135deg, ${
|
|
1104
|
+
borderRadius: E,
|
|
1105
|
+
background: v ? `linear-gradient(135deg, rgba(${v},0.92) 0%, rgba(${v},0.72) 100%)` : `linear-gradient(135deg, ${c}EB 0%, ${c}B8 100%)`,
|
|
1077
1106
|
p: "20px 20px 18px",
|
|
1078
1107
|
display: "flex",
|
|
1079
1108
|
alignItems: "center",
|
|
@@ -1097,7 +1126,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1097
1126
|
}
|
|
1098
1127
|
},
|
|
1099
1128
|
children: [
|
|
1100
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ h(
|
|
1101
1130
|
r,
|
|
1102
1131
|
{
|
|
1103
1132
|
sx: {
|
|
@@ -1138,14 +1167,14 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1138
1167
|
alignItems: "center",
|
|
1139
1168
|
justifyContent: "center"
|
|
1140
1169
|
},
|
|
1141
|
-
children: /* @__PURE__ */ t(
|
|
1170
|
+
children: /* @__PURE__ */ t(De, { sx: { fontSize: "1.9em", color: "#fff" } })
|
|
1142
1171
|
}
|
|
1143
1172
|
)
|
|
1144
1173
|
]
|
|
1145
1174
|
}
|
|
1146
1175
|
),
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ h(r, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
1177
|
+
/* @__PURE__ */ h(
|
|
1149
1178
|
r,
|
|
1150
1179
|
{
|
|
1151
1180
|
sx: {
|
|
@@ -1177,7 +1206,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1177
1206
|
}
|
|
1178
1207
|
),
|
|
1179
1208
|
/* @__PURE__ */ t(
|
|
1180
|
-
|
|
1209
|
+
C,
|
|
1181
1210
|
{
|
|
1182
1211
|
sx: {
|
|
1183
1212
|
fontSize: "0.6em",
|
|
@@ -1187,14 +1216,14 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1187
1216
|
color: "#fff",
|
|
1188
1217
|
lineHeight: 1
|
|
1189
1218
|
},
|
|
1190
|
-
children:
|
|
1219
|
+
children: o("eitherOr.newRecord", "New Record")
|
|
1191
1220
|
}
|
|
1192
1221
|
)
|
|
1193
1222
|
]
|
|
1194
1223
|
}
|
|
1195
1224
|
),
|
|
1196
1225
|
/* @__PURE__ */ t(
|
|
1197
|
-
|
|
1226
|
+
C,
|
|
1198
1227
|
{
|
|
1199
1228
|
sx: {
|
|
1200
1229
|
fontSize: "1.05em",
|
|
@@ -1202,18 +1231,18 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1202
1231
|
color: "#fff",
|
|
1203
1232
|
lineHeight: 1.25
|
|
1204
1233
|
},
|
|
1205
|
-
children:
|
|
1234
|
+
children: o("eitherOr.personalBestImprovedTitle", "Congratulations!")
|
|
1206
1235
|
}
|
|
1207
1236
|
),
|
|
1208
1237
|
/* @__PURE__ */ t(
|
|
1209
|
-
|
|
1238
|
+
C,
|
|
1210
1239
|
{
|
|
1211
1240
|
sx: {
|
|
1212
1241
|
fontSize: "0.8em",
|
|
1213
1242
|
color: "rgba(255,255,255,0.82)",
|
|
1214
1243
|
mt: "2px"
|
|
1215
1244
|
},
|
|
1216
|
-
children:
|
|
1245
|
+
children: o(
|
|
1217
1246
|
"eitherOr.personalBestImprovedSubtitle",
|
|
1218
1247
|
"You just broke your personal record!"
|
|
1219
1248
|
)
|
|
@@ -1223,7 +1252,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1223
1252
|
]
|
|
1224
1253
|
}
|
|
1225
1254
|
),
|
|
1226
|
-
/* @__PURE__ */
|
|
1255
|
+
/* @__PURE__ */ h(
|
|
1227
1256
|
r,
|
|
1228
1257
|
{
|
|
1229
1258
|
sx: {
|
|
@@ -1231,8 +1260,8 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1231
1260
|
flexDirection: "column",
|
|
1232
1261
|
alignItems: "center",
|
|
1233
1262
|
gap: "10px",
|
|
1234
|
-
py:
|
|
1235
|
-
borderRadius:
|
|
1263
|
+
py: I.lg,
|
|
1264
|
+
borderRadius: E,
|
|
1236
1265
|
backdropFilter: "blur(4px)",
|
|
1237
1266
|
position: "relative",
|
|
1238
1267
|
"&::before": {
|
|
@@ -1242,7 +1271,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1242
1271
|
left: 0,
|
|
1243
1272
|
right: 0,
|
|
1244
1273
|
bottom: 0,
|
|
1245
|
-
backgroundColor:
|
|
1274
|
+
backgroundColor: m.surfaceVariant,
|
|
1246
1275
|
opacity: 0.5,
|
|
1247
1276
|
borderRadius: "inherit",
|
|
1248
1277
|
zIndex: 0
|
|
@@ -1257,36 +1286,36 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1257
1286
|
width: 52,
|
|
1258
1287
|
height: 52,
|
|
1259
1288
|
borderRadius: "50%",
|
|
1260
|
-
bgcolor: v ? `rgba(${v},0.14)` : `${
|
|
1289
|
+
bgcolor: v ? `rgba(${v},0.14)` : `${c}24`,
|
|
1261
1290
|
display: "flex",
|
|
1262
1291
|
alignItems: "center",
|
|
1263
1292
|
justifyContent: "center"
|
|
1264
1293
|
},
|
|
1265
|
-
children: /* @__PURE__ */ t(
|
|
1294
|
+
children: /* @__PURE__ */ t(De, { sx: { fontSize: "1.75em", color: c } })
|
|
1266
1295
|
}
|
|
1267
1296
|
),
|
|
1268
1297
|
/* @__PURE__ */ t(
|
|
1269
|
-
|
|
1298
|
+
C,
|
|
1270
1299
|
{
|
|
1271
1300
|
sx: {
|
|
1272
1301
|
fontSize: "0.65em",
|
|
1273
1302
|
fontWeight: 700,
|
|
1274
1303
|
letterSpacing: "0.12em",
|
|
1275
1304
|
textTransform: "uppercase",
|
|
1276
|
-
color:
|
|
1305
|
+
color: m.textColor
|
|
1277
1306
|
},
|
|
1278
|
-
children:
|
|
1307
|
+
children: o("eitherOr.yourScore", "Your Score")
|
|
1279
1308
|
}
|
|
1280
1309
|
),
|
|
1281
1310
|
/* @__PURE__ */ t(
|
|
1282
|
-
|
|
1311
|
+
C,
|
|
1283
1312
|
{
|
|
1284
1313
|
sx: {
|
|
1285
1314
|
fontSize: "3.5em",
|
|
1286
1315
|
fontWeight: 900,
|
|
1287
1316
|
lineHeight: 1,
|
|
1288
|
-
color:
|
|
1289
|
-
textShadow: v ? `0 2px 24px rgba(${v},0.35)` : `0 2px 24px ${
|
|
1317
|
+
color: c,
|
|
1318
|
+
textShadow: v ? `0 2px 24px rgba(${v},0.35)` : `0 2px 24px ${c}59`,
|
|
1290
1319
|
animation: "eoScorePop 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.1s both",
|
|
1291
1320
|
"@keyframes eoScorePop": {
|
|
1292
1321
|
from: { opacity: 0, transform: "scale(0.5)" },
|
|
@@ -1296,21 +1325,21 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1296
1325
|
children: e.currentPoints
|
|
1297
1326
|
}
|
|
1298
1327
|
),
|
|
1299
|
-
/* @__PURE__ */
|
|
1300
|
-
|
|
1328
|
+
/* @__PURE__ */ h(
|
|
1329
|
+
C,
|
|
1301
1330
|
{
|
|
1302
|
-
sx: { fontSize: "1em", fontWeight: 600, color:
|
|
1331
|
+
sx: { fontSize: "1em", fontWeight: 600, color: m.textColor },
|
|
1303
1332
|
children: [
|
|
1304
|
-
|
|
1333
|
+
W.emoji,
|
|
1305
1334
|
" ",
|
|
1306
|
-
|
|
1335
|
+
W.message
|
|
1307
1336
|
]
|
|
1308
1337
|
}
|
|
1309
1338
|
)
|
|
1310
1339
|
]
|
|
1311
1340
|
}
|
|
1312
1341
|
),
|
|
1313
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ h(
|
|
1314
1343
|
r,
|
|
1315
1344
|
{
|
|
1316
1345
|
sx: {
|
|
@@ -1318,25 +1347,25 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1318
1347
|
borderRadius: "4px",
|
|
1319
1348
|
overflow: "hidden",
|
|
1320
1349
|
display: "flex",
|
|
1321
|
-
bgcolor:
|
|
1350
|
+
bgcolor: m.surfaceVariant
|
|
1322
1351
|
},
|
|
1323
1352
|
children: [
|
|
1324
|
-
|
|
1353
|
+
T > 0 && /* @__PURE__ */ t(
|
|
1325
1354
|
r,
|
|
1326
1355
|
{
|
|
1327
1356
|
sx: {
|
|
1328
|
-
width: `${
|
|
1357
|
+
width: `${T}%`,
|
|
1329
1358
|
bgcolor: b,
|
|
1330
1359
|
transition: "width 0.7s ease"
|
|
1331
1360
|
}
|
|
1332
1361
|
}
|
|
1333
1362
|
),
|
|
1334
|
-
|
|
1363
|
+
K > 0 && /* @__PURE__ */ t(
|
|
1335
1364
|
r,
|
|
1336
1365
|
{
|
|
1337
1366
|
sx: {
|
|
1338
|
-
width: `${
|
|
1339
|
-
bgcolor:
|
|
1367
|
+
width: `${K}%`,
|
|
1368
|
+
bgcolor: p,
|
|
1340
1369
|
transition: "width 0.7s ease 0.1s"
|
|
1341
1370
|
}
|
|
1342
1371
|
}
|
|
@@ -1346,7 +1375,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1346
1375
|
{
|
|
1347
1376
|
sx: {
|
|
1348
1377
|
width: `${X}%`,
|
|
1349
|
-
bgcolor:
|
|
1378
|
+
bgcolor: m.secondaryContainer,
|
|
1350
1379
|
transition: "width 0.7s ease 0.2s"
|
|
1351
1380
|
}
|
|
1352
1381
|
}
|
|
@@ -1354,42 +1383,42 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1354
1383
|
]
|
|
1355
1384
|
}
|
|
1356
1385
|
),
|
|
1357
|
-
/* @__PURE__ */ t(
|
|
1386
|
+
/* @__PURE__ */ t(je, { direction: "row", spacing: 1, children: [
|
|
1358
1387
|
{
|
|
1359
1388
|
icon: /* @__PURE__ */ t(
|
|
1360
|
-
|
|
1389
|
+
ct,
|
|
1361
1390
|
{
|
|
1362
1391
|
sx: { fontSize: "1.25em", color: b }
|
|
1363
1392
|
}
|
|
1364
1393
|
),
|
|
1365
|
-
value:
|
|
1366
|
-
label:
|
|
1367
|
-
bg:
|
|
1394
|
+
value: H,
|
|
1395
|
+
label: o("eitherOr.results.correct", "Correct"),
|
|
1396
|
+
bg: x,
|
|
1368
1397
|
valueSx: { color: b },
|
|
1369
1398
|
labelSx: { color: b }
|
|
1370
1399
|
},
|
|
1371
1400
|
{
|
|
1372
|
-
icon: /* @__PURE__ */ t(
|
|
1373
|
-
value:
|
|
1374
|
-
label:
|
|
1375
|
-
bg:
|
|
1376
|
-
valueSx: { color:
|
|
1377
|
-
labelSx: { color:
|
|
1401
|
+
icon: /* @__PURE__ */ t(dt, { sx: { fontSize: "1.25em", color: p } }),
|
|
1402
|
+
value: j,
|
|
1403
|
+
label: o("eitherOr.results.wrong", "Wrong"),
|
|
1404
|
+
bg: A,
|
|
1405
|
+
valueSx: { color: p },
|
|
1406
|
+
labelSx: { color: p }
|
|
1378
1407
|
},
|
|
1379
1408
|
{
|
|
1380
1409
|
icon: /* @__PURE__ */ t(
|
|
1381
|
-
|
|
1410
|
+
gn,
|
|
1382
1411
|
{
|
|
1383
|
-
sx: { fontSize: "1.25em", color:
|
|
1412
|
+
sx: { fontSize: "1.25em", color: m.textColor }
|
|
1384
1413
|
}
|
|
1385
1414
|
),
|
|
1386
|
-
value:
|
|
1387
|
-
label:
|
|
1388
|
-
bg:
|
|
1389
|
-
valueSx: { color:
|
|
1390
|
-
labelSx: { color:
|
|
1415
|
+
value: V,
|
|
1416
|
+
label: o("eitherOr.results.missed", "Missed"),
|
|
1417
|
+
bg: m.surfaceVariant,
|
|
1418
|
+
valueSx: { color: m.textColor },
|
|
1419
|
+
labelSx: { color: m.textColor }
|
|
1391
1420
|
}
|
|
1392
|
-
].map((
|
|
1421
|
+
].map((U) => /* @__PURE__ */ h(
|
|
1393
1422
|
r,
|
|
1394
1423
|
{
|
|
1395
1424
|
sx: {
|
|
@@ -1399,40 +1428,40 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1399
1428
|
alignItems: "center",
|
|
1400
1429
|
gap: "4px",
|
|
1401
1430
|
py: "14px",
|
|
1402
|
-
borderRadius:
|
|
1403
|
-
bgcolor:
|
|
1431
|
+
borderRadius: E,
|
|
1432
|
+
bgcolor: U.bg
|
|
1404
1433
|
},
|
|
1405
1434
|
children: [
|
|
1406
|
-
|
|
1435
|
+
U.icon,
|
|
1407
1436
|
/* @__PURE__ */ t(
|
|
1408
|
-
|
|
1437
|
+
C,
|
|
1409
1438
|
{
|
|
1410
1439
|
sx: {
|
|
1411
1440
|
fontSize: "1.3em",
|
|
1412
1441
|
fontWeight: 800,
|
|
1413
1442
|
lineHeight: 1,
|
|
1414
|
-
...
|
|
1443
|
+
...U.valueSx
|
|
1415
1444
|
},
|
|
1416
|
-
children:
|
|
1445
|
+
children: U.value
|
|
1417
1446
|
}
|
|
1418
1447
|
),
|
|
1419
1448
|
/* @__PURE__ */ t(
|
|
1420
|
-
|
|
1449
|
+
C,
|
|
1421
1450
|
{
|
|
1422
|
-
sx: { fontSize: "0.68em", fontWeight: 600, ...
|
|
1423
|
-
children:
|
|
1451
|
+
sx: { fontSize: "0.68em", fontWeight: 600, ...U.labelSx },
|
|
1452
|
+
children: U.label
|
|
1424
1453
|
}
|
|
1425
1454
|
)
|
|
1426
1455
|
]
|
|
1427
1456
|
},
|
|
1428
|
-
|
|
1457
|
+
U.label
|
|
1429
1458
|
)) }),
|
|
1430
|
-
|
|
1459
|
+
P > 0 && L !== null && L > 0 && /* @__PURE__ */ h(
|
|
1431
1460
|
r,
|
|
1432
1461
|
{
|
|
1433
1462
|
sx: {
|
|
1434
|
-
borderRadius:
|
|
1435
|
-
p:
|
|
1463
|
+
borderRadius: E,
|
|
1464
|
+
p: I.md,
|
|
1436
1465
|
display: "flex",
|
|
1437
1466
|
alignItems: "center",
|
|
1438
1467
|
gap: "10px",
|
|
@@ -1445,7 +1474,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1445
1474
|
left: 0,
|
|
1446
1475
|
right: 0,
|
|
1447
1476
|
bottom: 0,
|
|
1448
|
-
backgroundColor:
|
|
1477
|
+
backgroundColor: m.surfaceVariant,
|
|
1449
1478
|
opacity: 0.5,
|
|
1450
1479
|
borderRadius: "inherit",
|
|
1451
1480
|
zIndex: 0
|
|
@@ -1454,79 +1483,79 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1454
1483
|
},
|
|
1455
1484
|
children: [
|
|
1456
1485
|
/* @__PURE__ */ t(
|
|
1457
|
-
|
|
1486
|
+
kn,
|
|
1458
1487
|
{
|
|
1459
|
-
sx: { color:
|
|
1488
|
+
sx: { color: c, fontSize: "1.4em", flexShrink: 0 }
|
|
1460
1489
|
}
|
|
1461
1490
|
),
|
|
1462
1491
|
/* @__PURE__ */ t(
|
|
1463
|
-
|
|
1492
|
+
C,
|
|
1464
1493
|
{
|
|
1465
1494
|
sx: {
|
|
1466
1495
|
fontSize: "0.8em",
|
|
1467
|
-
color:
|
|
1496
|
+
color: m.textColor,
|
|
1468
1497
|
lineHeight: 1.5
|
|
1469
1498
|
},
|
|
1470
|
-
children:
|
|
1471
|
-
points:
|
|
1472
|
-
percentile:
|
|
1499
|
+
children: o("eitherOr.betterThanLabel", {
|
|
1500
|
+
points: k ? R : P,
|
|
1501
|
+
percentile: L
|
|
1473
1502
|
})
|
|
1474
1503
|
}
|
|
1475
1504
|
)
|
|
1476
1505
|
]
|
|
1477
1506
|
}
|
|
1478
1507
|
),
|
|
1479
|
-
/* @__PURE__ */
|
|
1508
|
+
/* @__PURE__ */ h(
|
|
1480
1509
|
r,
|
|
1481
1510
|
{
|
|
1482
1511
|
sx: {
|
|
1483
1512
|
display: "flex",
|
|
1484
|
-
flexDirection:
|
|
1485
|
-
justifyContent:
|
|
1513
|
+
flexDirection: z ? "column-reverse" : "row",
|
|
1514
|
+
justifyContent: D ? "space-between" : "flex-end",
|
|
1486
1515
|
alignItems: "center",
|
|
1487
|
-
gap:
|
|
1516
|
+
gap: I.lg
|
|
1488
1517
|
},
|
|
1489
1518
|
children: [
|
|
1490
1519
|
/* @__PURE__ */ t(
|
|
1491
|
-
|
|
1520
|
+
ue,
|
|
1492
1521
|
{
|
|
1493
|
-
brandingLogo:
|
|
1494
|
-
textColor:
|
|
1495
|
-
label: ((
|
|
1522
|
+
brandingLogo: D,
|
|
1523
|
+
textColor: f,
|
|
1524
|
+
label: ((he = n == null ? void 0 : n.labels) == null ? void 0 : he.sponsor) || null
|
|
1496
1525
|
}
|
|
1497
1526
|
),
|
|
1498
1527
|
/* @__PURE__ */ t(
|
|
1499
|
-
|
|
1528
|
+
ye,
|
|
1500
1529
|
{
|
|
1501
1530
|
variant: "soft",
|
|
1502
|
-
endDecorator: /* @__PURE__ */ t(
|
|
1503
|
-
onClick:
|
|
1531
|
+
endDecorator: /* @__PURE__ */ t(xt, { children: /* @__PURE__ */ t(gt, {}) }),
|
|
1532
|
+
onClick: i,
|
|
1504
1533
|
sx: {
|
|
1505
|
-
borderRadius:
|
|
1534
|
+
borderRadius: w,
|
|
1506
1535
|
py: "10px",
|
|
1507
1536
|
pr: "12px",
|
|
1508
1537
|
pl: "16px",
|
|
1509
|
-
bgcolor:
|
|
1510
|
-
color:
|
|
1538
|
+
bgcolor: c,
|
|
1539
|
+
color: u,
|
|
1511
1540
|
alignSelf: "center",
|
|
1512
1541
|
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
1513
|
-
"&:hover": { bgcolor:
|
|
1514
|
-
"&:active": { color:
|
|
1515
|
-
"--Icon-color":
|
|
1542
|
+
"&:hover": { bgcolor: c, transform: "scale(1.02)" },
|
|
1543
|
+
"&:active": { color: u, transform: "scale(0.98)" },
|
|
1544
|
+
"--Icon-color": u
|
|
1516
1545
|
},
|
|
1517
1546
|
children: /* @__PURE__ */ t(
|
|
1518
|
-
|
|
1547
|
+
C,
|
|
1519
1548
|
{
|
|
1520
1549
|
sx: {
|
|
1521
|
-
fontFamily:
|
|
1550
|
+
fontFamily: y,
|
|
1522
1551
|
fontWeight: 500,
|
|
1523
1552
|
fontSize: "0.9375em",
|
|
1524
1553
|
lineHeight: "24px",
|
|
1525
1554
|
letterSpacing: "0.46px",
|
|
1526
1555
|
textTransform: "uppercase",
|
|
1527
|
-
color:
|
|
1556
|
+
color: u
|
|
1528
1557
|
},
|
|
1529
|
-
children:
|
|
1558
|
+
children: o("eitherOr.buttons.playAgain", "Play Again")
|
|
1530
1559
|
}
|
|
1531
1560
|
)
|
|
1532
1561
|
}
|
|
@@ -1535,17 +1564,17 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1535
1564
|
}
|
|
1536
1565
|
),
|
|
1537
1566
|
/* @__PURE__ */ t(
|
|
1538
|
-
|
|
1567
|
+
rn,
|
|
1539
1568
|
{
|
|
1540
|
-
additionalCTA:
|
|
1569
|
+
additionalCTA: g,
|
|
1541
1570
|
buttonStyle: {
|
|
1542
|
-
borderRadius:
|
|
1571
|
+
borderRadius: w,
|
|
1543
1572
|
width: "100%",
|
|
1544
1573
|
py: "10px"
|
|
1545
1574
|
},
|
|
1546
1575
|
buttonContentStyle: { display: "flex", justifyContent: "center" },
|
|
1547
1576
|
textStyle: {
|
|
1548
|
-
fontFamily:
|
|
1577
|
+
fontFamily: y,
|
|
1549
1578
|
fontWeight: 500,
|
|
1550
1579
|
fontSize: "0.9375em",
|
|
1551
1580
|
lineHeight: "24px",
|
|
@@ -1557,54 +1586,54 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1557
1586
|
]
|
|
1558
1587
|
}
|
|
1559
1588
|
);
|
|
1560
|
-
},
|
|
1589
|
+
}, zn = 150, Ln = ({
|
|
1561
1590
|
breakdown: e,
|
|
1562
1591
|
currentPoints: n,
|
|
1563
|
-
primaryColor:
|
|
1564
|
-
textColor:
|
|
1592
|
+
primaryColor: l,
|
|
1593
|
+
textColor: i
|
|
1565
1594
|
}) => {
|
|
1566
|
-
const { t:
|
|
1567
|
-
if (
|
|
1568
|
-
const
|
|
1569
|
-
setTimeout(() =>
|
|
1595
|
+
const { t: s } = Q(), g = Zt(), o = (k) => k.toLocaleString(g), m = q(), c = pe(), u = ve(), f = Te().primary, b = m.outlineEnabledBorder, p = oe(l), [x, A] = B(null), [E, w] = B(!1);
|
|
1596
|
+
if (fe(() => {
|
|
1597
|
+
const k = requestAnimationFrame(() => {
|
|
1598
|
+
setTimeout(() => w(!0), 80);
|
|
1570
1599
|
});
|
|
1571
|
-
return () => cancelAnimationFrame(
|
|
1600
|
+
return () => cancelAnimationFrame(k);
|
|
1572
1601
|
}, []), !e || e.length === 0)
|
|
1573
1602
|
return /* @__PURE__ */ t(r, { sx: { py: u.lg, textAlign: "center" }, children: /* @__PURE__ */ t(
|
|
1574
|
-
|
|
1603
|
+
C,
|
|
1575
1604
|
{
|
|
1576
1605
|
sx: {
|
|
1577
|
-
fontFamily:
|
|
1578
|
-
color:
|
|
1606
|
+
fontFamily: f,
|
|
1607
|
+
color: i,
|
|
1579
1608
|
opacity: 0.4,
|
|
1580
1609
|
fontSize: "0.875em"
|
|
1581
1610
|
},
|
|
1582
1611
|
children: "No distribution data available."
|
|
1583
1612
|
}
|
|
1584
1613
|
) });
|
|
1585
|
-
const
|
|
1586
|
-
(
|
|
1587
|
-
) ?? null : null,
|
|
1588
|
-
(
|
|
1589
|
-
) : -1,
|
|
1590
|
-
start:
|
|
1591
|
-
end:
|
|
1592
|
-
}) : null,
|
|
1593
|
-
(
|
|
1594
|
-
),
|
|
1614
|
+
const I = e.filter((k) => k.totalUsers > 0), y = Math.max(...I.map((k) => k.totalUsers), 1), d = Math.log(y + 1), z = e.reduce((k, O) => k + O.totalUsers, 0), S = n != null ? e.find(
|
|
1615
|
+
(k) => n >= k.rangeStartInclusive && n <= k.rangeEndInclusive
|
|
1616
|
+
) ?? null : null, v = S ? I.findIndex(
|
|
1617
|
+
(k) => k.rangeStartInclusive === S.rangeStartInclusive
|
|
1618
|
+
) : -1, D = x !== null ? I[x] : null, P = D ? `${o(D.rangeStartInclusive)} – ${o(D.rangeEndInclusive)} ${s("eitherOr.standings.pts", "pts")}` : S ? s("eitherOr.standings.yourRange", "Your range: {{start}} – {{end}}", {
|
|
1619
|
+
start: o(S.rangeStartInclusive),
|
|
1620
|
+
end: o(S.rangeEndInclusive)
|
|
1621
|
+
}) : null, $ = D ? D.totalUsers : S ? S.totalUsers : null, L = 5, N = Math.floor(
|
|
1622
|
+
(I.length - 1) / (L - 1)
|
|
1623
|
+
), R = new Set(
|
|
1595
1624
|
Array.from(
|
|
1596
|
-
{ length:
|
|
1597
|
-
(
|
|
1625
|
+
{ length: L },
|
|
1626
|
+
(k, O) => Math.min(O * N, I.length - 1)
|
|
1598
1627
|
)
|
|
1599
1628
|
);
|
|
1600
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ h(
|
|
1601
1630
|
r,
|
|
1602
1631
|
{
|
|
1603
1632
|
sx: {
|
|
1604
1633
|
width: "100%",
|
|
1605
1634
|
boxSizing: "border-box",
|
|
1606
1635
|
p: u.md,
|
|
1607
|
-
borderRadius:
|
|
1636
|
+
borderRadius: c.sm,
|
|
1608
1637
|
backdropFilter: "blur(4px)",
|
|
1609
1638
|
position: "relative",
|
|
1610
1639
|
"&::before": {
|
|
@@ -1614,7 +1643,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1614
1643
|
left: 0,
|
|
1615
1644
|
right: 0,
|
|
1616
1645
|
bottom: 0,
|
|
1617
|
-
backgroundColor:
|
|
1646
|
+
backgroundColor: m.surfaceVariant,
|
|
1618
1647
|
opacity: 0.5,
|
|
1619
1648
|
borderRadius: "inherit",
|
|
1620
1649
|
zIndex: 0
|
|
@@ -1622,7 +1651,7 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1622
1651
|
"& > *": { position: "relative", zIndex: 1 }
|
|
1623
1652
|
},
|
|
1624
1653
|
children: [
|
|
1625
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ h(
|
|
1626
1655
|
r,
|
|
1627
1656
|
{
|
|
1628
1657
|
sx: {
|
|
@@ -1631,35 +1660,35 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1631
1660
|
alignItems: "center",
|
|
1632
1661
|
pb: u.xs,
|
|
1633
1662
|
mb: u.xs,
|
|
1634
|
-
borderBottom: `1px solid rgba(${
|
|
1663
|
+
borderBottom: `1px solid rgba(${p}, 0.5)`
|
|
1635
1664
|
},
|
|
1636
1665
|
children: [
|
|
1637
1666
|
/* @__PURE__ */ t(
|
|
1638
|
-
|
|
1667
|
+
C,
|
|
1639
1668
|
{
|
|
1640
1669
|
sx: {
|
|
1641
|
-
fontFamily:
|
|
1670
|
+
fontFamily: f,
|
|
1642
1671
|
fontSize: "0.7em",
|
|
1643
1672
|
fontWeight: 700,
|
|
1644
|
-
color:
|
|
1673
|
+
color: i,
|
|
1645
1674
|
letterSpacing: "0.08em",
|
|
1646
1675
|
textTransform: "uppercase"
|
|
1647
1676
|
},
|
|
1648
|
-
children:
|
|
1677
|
+
children: s("eitherOr.standings.scoreDistribution", "Score Distribution")
|
|
1649
1678
|
}
|
|
1650
1679
|
),
|
|
1651
1680
|
/* @__PURE__ */ t(
|
|
1652
|
-
|
|
1681
|
+
C,
|
|
1653
1682
|
{
|
|
1654
1683
|
sx: {
|
|
1655
|
-
fontFamily:
|
|
1684
|
+
fontFamily: f,
|
|
1656
1685
|
fontSize: "0.7em",
|
|
1657
1686
|
fontWeight: 500,
|
|
1658
|
-
color:
|
|
1687
|
+
color: i,
|
|
1659
1688
|
opacity: 0.6
|
|
1660
1689
|
},
|
|
1661
|
-
children:
|
|
1662
|
-
count:
|
|
1690
|
+
children: s("eitherOr.standings.totalUsers", "{{count}} users", {
|
|
1691
|
+
count: z
|
|
1663
1692
|
})
|
|
1664
1693
|
}
|
|
1665
1694
|
)
|
|
@@ -1676,50 +1705,50 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1676
1705
|
px: u.sm,
|
|
1677
1706
|
py: "10px",
|
|
1678
1707
|
mb: u.md,
|
|
1679
|
-
borderRadius:
|
|
1680
|
-
borderLeft: `3px solid ${
|
|
1681
|
-
backgroundColor:
|
|
1708
|
+
borderRadius: c.xs,
|
|
1709
|
+
borderLeft: `3px solid ${P ? l : b}`,
|
|
1710
|
+
backgroundColor: D ? `rgba(${oe(b)}, 0.6)` : `rgba(${oe(b)}, 0.35)`,
|
|
1682
1711
|
transition: "background-color 200ms ease, border-left-color 200ms ease"
|
|
1683
1712
|
},
|
|
1684
|
-
children:
|
|
1713
|
+
children: P ? /* @__PURE__ */ h(et, { children: [
|
|
1685
1714
|
/* @__PURE__ */ t(
|
|
1686
|
-
|
|
1715
|
+
C,
|
|
1687
1716
|
{
|
|
1688
1717
|
sx: {
|
|
1689
|
-
fontFamily:
|
|
1718
|
+
fontFamily: f,
|
|
1690
1719
|
fontSize: "0.8em",
|
|
1691
|
-
color:
|
|
1720
|
+
color: l,
|
|
1692
1721
|
fontWeight: 700,
|
|
1693
1722
|
letterSpacing: "0.01em"
|
|
1694
1723
|
},
|
|
1695
|
-
children:
|
|
1724
|
+
children: P
|
|
1696
1725
|
}
|
|
1697
1726
|
),
|
|
1698
1727
|
/* @__PURE__ */ t(
|
|
1699
|
-
|
|
1728
|
+
C,
|
|
1700
1729
|
{
|
|
1701
1730
|
sx: {
|
|
1702
|
-
fontFamily:
|
|
1731
|
+
fontFamily: f,
|
|
1703
1732
|
fontSize: "0.75em",
|
|
1704
|
-
color:
|
|
1733
|
+
color: i,
|
|
1705
1734
|
fontWeight: 600
|
|
1706
1735
|
},
|
|
1707
|
-
children:
|
|
1708
|
-
count:
|
|
1736
|
+
children: s("eitherOr.standings.totalUsers", "{{count}} users", {
|
|
1737
|
+
count: $ ?? 0
|
|
1709
1738
|
})
|
|
1710
1739
|
}
|
|
1711
1740
|
)
|
|
1712
1741
|
] }) : /* @__PURE__ */ t(
|
|
1713
|
-
|
|
1742
|
+
C,
|
|
1714
1743
|
{
|
|
1715
1744
|
sx: {
|
|
1716
|
-
fontFamily:
|
|
1745
|
+
fontFamily: f,
|
|
1717
1746
|
fontSize: "0.75em",
|
|
1718
|
-
color:
|
|
1747
|
+
color: i,
|
|
1719
1748
|
opacity: 0.4,
|
|
1720
1749
|
fontStyle: "italic"
|
|
1721
1750
|
},
|
|
1722
|
-
children:
|
|
1751
|
+
children: s("eitherOr.standings.noScoreHint", "Play and score points to see where you rank on this chart")
|
|
1723
1752
|
}
|
|
1724
1753
|
)
|
|
1725
1754
|
}
|
|
@@ -1731,11 +1760,11 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1731
1760
|
display: "flex",
|
|
1732
1761
|
alignItems: "flex-end",
|
|
1733
1762
|
gap: "3px",
|
|
1734
|
-
height: `${
|
|
1763
|
+
height: `${zn}px`,
|
|
1735
1764
|
width: "100%"
|
|
1736
1765
|
},
|
|
1737
|
-
children:
|
|
1738
|
-
const
|
|
1766
|
+
children: I.map((k, O) => {
|
|
1767
|
+
const H = O === v, j = x === O, V = Math.log(k.totalUsers + 1) / d * 100, a = H || j ? l : `rgba(${p}, 0.5)`;
|
|
1739
1768
|
return /* @__PURE__ */ t(
|
|
1740
1769
|
r,
|
|
1741
1770
|
{
|
|
@@ -1746,29 +1775,29 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1746
1775
|
alignItems: "flex-end",
|
|
1747
1776
|
cursor: "pointer"
|
|
1748
1777
|
},
|
|
1749
|
-
onMouseEnter: () =>
|
|
1750
|
-
onMouseLeave: () =>
|
|
1751
|
-
onTouchStart: (
|
|
1752
|
-
|
|
1778
|
+
onMouseEnter: () => A(O),
|
|
1779
|
+
onMouseLeave: () => A(null),
|
|
1780
|
+
onTouchStart: (W) => {
|
|
1781
|
+
W.preventDefault(), A(O);
|
|
1753
1782
|
},
|
|
1754
|
-
onTouchEnd: () => setTimeout(() =>
|
|
1783
|
+
onTouchEnd: () => setTimeout(() => A(null), 2e3),
|
|
1755
1784
|
children: /* @__PURE__ */ t(
|
|
1756
1785
|
r,
|
|
1757
1786
|
{
|
|
1758
1787
|
sx: {
|
|
1759
1788
|
width: "100%",
|
|
1760
|
-
height:
|
|
1789
|
+
height: E ? `${V}%` : "0%",
|
|
1761
1790
|
borderRadius: "3px 3px 1px 1px",
|
|
1762
|
-
backgroundColor:
|
|
1763
|
-
boxShadow:
|
|
1791
|
+
backgroundColor: a,
|
|
1792
|
+
boxShadow: H || j ? `0 0 10px rgba(${p}, 0.4), 0 0 3px rgba(${p}, 0.2)` : "none",
|
|
1764
1793
|
transition: [
|
|
1765
|
-
`height 480ms cubic-bezier(0.34, 1.56, 0.64, 1) ${
|
|
1794
|
+
`height 480ms cubic-bezier(0.34, 1.56, 0.64, 1) ${O * 18}ms`,
|
|
1766
1795
|
"background-color 150ms ease",
|
|
1767
1796
|
"box-shadow 150ms ease"
|
|
1768
1797
|
].join(", "),
|
|
1769
1798
|
position: "relative",
|
|
1770
1799
|
overflow: "hidden",
|
|
1771
|
-
"&::after":
|
|
1800
|
+
"&::after": H ? {
|
|
1772
1801
|
content: '""',
|
|
1773
1802
|
position: "absolute",
|
|
1774
1803
|
top: 0,
|
|
@@ -1781,65 +1810,65 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1781
1810
|
}
|
|
1782
1811
|
)
|
|
1783
1812
|
},
|
|
1784
|
-
|
|
1813
|
+
O
|
|
1785
1814
|
);
|
|
1786
1815
|
})
|
|
1787
1816
|
}
|
|
1788
1817
|
),
|
|
1789
|
-
/* @__PURE__ */ t(r, { sx: { height: "1px", backgroundColor:
|
|
1790
|
-
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children:
|
|
1791
|
-
if (!
|
|
1792
|
-
const
|
|
1818
|
+
/* @__PURE__ */ t(r, { sx: { height: "1px", backgroundColor: b, mt: "1px" } }),
|
|
1819
|
+
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: I.map((k, O) => {
|
|
1820
|
+
if (!R.has(O)) return null;
|
|
1821
|
+
const H = I.length > 1 ? O / (I.length - 1) * 100 : 0, j = O === 0, V = O === I.length - 1;
|
|
1793
1822
|
return /* @__PURE__ */ t(
|
|
1794
|
-
|
|
1823
|
+
C,
|
|
1795
1824
|
{
|
|
1796
1825
|
sx: {
|
|
1797
1826
|
position: "absolute",
|
|
1798
|
-
left: `${
|
|
1799
|
-
transform:
|
|
1827
|
+
left: `${H}%`,
|
|
1828
|
+
transform: j ? "none" : V ? "translateX(-100%)" : "translateX(-50%)",
|
|
1800
1829
|
fontSize: "0.6em",
|
|
1801
|
-
fontFamily:
|
|
1802
|
-
color:
|
|
1830
|
+
fontFamily: f,
|
|
1831
|
+
color: i,
|
|
1803
1832
|
opacity: 0.4,
|
|
1804
1833
|
lineHeight: 1,
|
|
1805
1834
|
userSelect: "none"
|
|
1806
1835
|
},
|
|
1807
|
-
children:
|
|
1836
|
+
children: o(k.rangeStartInclusive)
|
|
1808
1837
|
},
|
|
1809
|
-
|
|
1838
|
+
O
|
|
1810
1839
|
);
|
|
1811
1840
|
}) })
|
|
1812
1841
|
]
|
|
1813
1842
|
}
|
|
1814
1843
|
);
|
|
1815
|
-
},
|
|
1844
|
+
}, Je = 10, _t = ({
|
|
1816
1845
|
game: e,
|
|
1817
1846
|
sdk: n,
|
|
1818
|
-
stepInfo:
|
|
1819
|
-
brandingPrimaryColor:
|
|
1847
|
+
stepInfo: l,
|
|
1848
|
+
brandingPrimaryColor: i
|
|
1820
1849
|
}) => {
|
|
1821
|
-
var
|
|
1822
|
-
const { t:
|
|
1823
|
-
|
|
1850
|
+
var a;
|
|
1851
|
+
const { t: s } = Q(), g = Ne(), o = q(), m = ((a = e == null ? void 0 : e.branding) == null ? void 0 : a.colors) || null, c = i || (m == null ? void 0 : m.primaryColor) || o.palette.primary.plainColor, u = (m == null ? void 0 : m.contentColor) || o.textColor, f = Te().primary, b = Te().secondary, p = pe(), x = ve(), A = Ve(), E = o.surfaceVariant, w = g.colorSchemes.light.palette.primary.onPrimary, I = o.outlineEnabledBorder, [y, d] = B(null), [z, S] = B(!0), [v, D] = B(0), [P, $] = B(null), [L, N] = B("leaderboard"), R = (l == null ? void 0 : l.currentPoints) ?? 0;
|
|
1852
|
+
fe(() => {
|
|
1824
1853
|
(async () => {
|
|
1825
1854
|
try {
|
|
1826
1855
|
if (!e) return;
|
|
1827
|
-
const [
|
|
1856
|
+
const [T, K] = await Promise.all([
|
|
1828
1857
|
n.miniGames.getEitherOrResults(e.id),
|
|
1829
1858
|
n.profile.getOwn().getInfo().catch(() => null)
|
|
1830
|
-
]), X = (
|
|
1831
|
-
if (
|
|
1859
|
+
]), X = (K == null ? void 0 : K.id) ?? null;
|
|
1860
|
+
if ($(X), X && T.standings.some(
|
|
1832
1861
|
(ee) => ee.userId === X
|
|
1833
1862
|
)) {
|
|
1834
|
-
|
|
1863
|
+
d(T);
|
|
1835
1864
|
return;
|
|
1836
1865
|
}
|
|
1837
|
-
if (
|
|
1838
|
-
const
|
|
1866
|
+
if (R > 0) {
|
|
1867
|
+
const Z = [...T.standings], ee = {
|
|
1839
1868
|
userId: "current",
|
|
1840
1869
|
userModel: {
|
|
1841
1870
|
id: "current",
|
|
1842
|
-
name:
|
|
1871
|
+
name: s("common.labels.me", "Me"),
|
|
1843
1872
|
nickname: null,
|
|
1844
1873
|
avatar: null,
|
|
1845
1874
|
anonymous: !0,
|
|
@@ -1853,45 +1882,45 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1853
1882
|
followingCount: 0,
|
|
1854
1883
|
followersCount: 0
|
|
1855
1884
|
},
|
|
1856
|
-
personalBest:
|
|
1857
|
-
},
|
|
1858
|
-
(
|
|
1885
|
+
personalBest: R.toString()
|
|
1886
|
+
}, J = Z.findIndex(
|
|
1887
|
+
(me) => Number.parseInt(me.personalBest) < R
|
|
1859
1888
|
);
|
|
1860
|
-
|
|
1889
|
+
J >= 0 && J < 50 && (Z.splice(J, 0, ee), T.standings = Z);
|
|
1861
1890
|
}
|
|
1862
|
-
|
|
1891
|
+
d(T);
|
|
1863
1892
|
} catch {
|
|
1864
1893
|
} finally {
|
|
1865
|
-
|
|
1894
|
+
S(!1);
|
|
1866
1895
|
}
|
|
1867
1896
|
})();
|
|
1868
|
-
}, [e, n,
|
|
1869
|
-
const
|
|
1897
|
+
}, [e, n, l]);
|
|
1898
|
+
const k = {
|
|
1870
1899
|
tableContainer: {
|
|
1871
1900
|
overflowX: "auto",
|
|
1872
|
-
borderRadius:
|
|
1873
|
-
border: `1px solid ${
|
|
1901
|
+
borderRadius: p.md,
|
|
1902
|
+
border: `1px solid ${I}`
|
|
1874
1903
|
},
|
|
1875
1904
|
table: {
|
|
1876
|
-
backgroundColor:
|
|
1905
|
+
backgroundColor: E,
|
|
1877
1906
|
"--TableCell-paddingX": "0.5em",
|
|
1878
1907
|
"--TableCell-paddingY": "0.375em",
|
|
1879
1908
|
cursor: "default",
|
|
1880
1909
|
"& > tbody > tr:hover": { backgroundColor: "transparent" },
|
|
1881
1910
|
"& > thead > tr > th": {
|
|
1882
|
-
backgroundColor: `rgba(${
|
|
1883
|
-
color:
|
|
1884
|
-
fontFamily:
|
|
1911
|
+
backgroundColor: `rgba(${oe(E)}, 0.8)`,
|
|
1912
|
+
color: u,
|
|
1913
|
+
fontFamily: f,
|
|
1885
1914
|
fontWeight: 600,
|
|
1886
1915
|
fontSize: "0.875em",
|
|
1887
1916
|
textAlign: "center",
|
|
1888
|
-
borderBottom: `1px solid ${
|
|
1917
|
+
borderBottom: `1px solid ${I}`
|
|
1889
1918
|
}
|
|
1890
1919
|
},
|
|
1891
1920
|
headerCellPosition: {
|
|
1892
|
-
backgroundColor: `rgba(${
|
|
1893
|
-
color:
|
|
1894
|
-
fontFamily:
|
|
1921
|
+
backgroundColor: `rgba(${oe(E)}, 0.8)`,
|
|
1922
|
+
color: u,
|
|
1923
|
+
fontFamily: f,
|
|
1895
1924
|
fontWeight: 600,
|
|
1896
1925
|
fontSize: "0.875em",
|
|
1897
1926
|
textAlign: "center",
|
|
@@ -1899,9 +1928,9 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1899
1928
|
width: "10%"
|
|
1900
1929
|
},
|
|
1901
1930
|
headerCellName: {
|
|
1902
|
-
backgroundColor: `rgba(${
|
|
1903
|
-
color:
|
|
1904
|
-
fontFamily:
|
|
1931
|
+
backgroundColor: `rgba(${oe(E)}, 0.8)`,
|
|
1932
|
+
color: u,
|
|
1933
|
+
fontFamily: f,
|
|
1905
1934
|
fontWeight: 600,
|
|
1906
1935
|
fontSize: "0.875em",
|
|
1907
1936
|
textAlign: "left",
|
|
@@ -1909,9 +1938,9 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1909
1938
|
width: "80%"
|
|
1910
1939
|
},
|
|
1911
1940
|
headerCellPoints: {
|
|
1912
|
-
backgroundColor: `rgba(${
|
|
1913
|
-
color:
|
|
1914
|
-
fontFamily:
|
|
1941
|
+
backgroundColor: `rgba(${oe(E)}, 0.8)`,
|
|
1942
|
+
color: u,
|
|
1943
|
+
fontFamily: f,
|
|
1915
1944
|
fontWeight: 600,
|
|
1916
1945
|
fontSize: "0.875em",
|
|
1917
1946
|
textAlign: "center",
|
|
@@ -1930,54 +1959,54 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1930
1959
|
textAlign: "center"
|
|
1931
1960
|
},
|
|
1932
1961
|
userRow: {
|
|
1933
|
-
backgroundColor: `rgba(${
|
|
1962
|
+
backgroundColor: `rgba(${oe(c)}, 0.1)`
|
|
1934
1963
|
},
|
|
1935
1964
|
nameCell: {
|
|
1936
1965
|
display: "flex",
|
|
1937
1966
|
alignItems: "center",
|
|
1938
|
-
gap:
|
|
1967
|
+
gap: x.sm
|
|
1939
1968
|
},
|
|
1940
1969
|
leaderboardAvatar: {
|
|
1941
1970
|
width: "32px",
|
|
1942
1971
|
height: "32px",
|
|
1943
1972
|
fontSize: "0.875em",
|
|
1944
1973
|
fontWeight: 600,
|
|
1945
|
-
backgroundColor:
|
|
1946
|
-
color:
|
|
1974
|
+
backgroundColor: c,
|
|
1975
|
+
color: w
|
|
1947
1976
|
},
|
|
1948
1977
|
nameText: {
|
|
1949
|
-
fontFamily:
|
|
1978
|
+
fontFamily: f,
|
|
1950
1979
|
fontWeight: 500,
|
|
1951
1980
|
fontSize: "0.875em",
|
|
1952
|
-
color:
|
|
1981
|
+
color: u,
|
|
1953
1982
|
overflow: "hidden",
|
|
1954
1983
|
textOverflow: "ellipsis",
|
|
1955
1984
|
whiteSpace: "nowrap"
|
|
1956
1985
|
},
|
|
1957
1986
|
positionText: {
|
|
1958
|
-
fontFamily:
|
|
1987
|
+
fontFamily: f,
|
|
1959
1988
|
fontWeight: 600,
|
|
1960
1989
|
fontSize: "0.875em",
|
|
1961
|
-
color:
|
|
1990
|
+
color: u
|
|
1962
1991
|
},
|
|
1963
1992
|
pointsText: {
|
|
1964
|
-
fontFamily:
|
|
1993
|
+
fontFamily: f,
|
|
1965
1994
|
fontWeight: 600,
|
|
1966
1995
|
fontSize: "0.875em",
|
|
1967
|
-
color:
|
|
1996
|
+
color: u
|
|
1968
1997
|
},
|
|
1969
|
-
avatarIcon: { fontSize: "1em", color:
|
|
1998
|
+
avatarIcon: { fontSize: "1em", color: w },
|
|
1970
1999
|
noLeaderboardText: {
|
|
1971
2000
|
fontFamily: b,
|
|
1972
2001
|
fontSize: "1.25em",
|
|
1973
|
-
color:
|
|
2002
|
+
color: u,
|
|
1974
2003
|
textAlign: "center",
|
|
1975
|
-
marginY:
|
|
2004
|
+
marginY: x.md
|
|
1976
2005
|
}
|
|
1977
2006
|
};
|
|
1978
|
-
if (
|
|
1979
|
-
return /* @__PURE__ */ t(
|
|
1980
|
-
if (!(
|
|
2007
|
+
if (z)
|
|
2008
|
+
return /* @__PURE__ */ t(lt, { my: 10 });
|
|
2009
|
+
if (!(y != null && y.standings) || y.standings.length === 0)
|
|
1981
2010
|
return /* @__PURE__ */ t(
|
|
1982
2011
|
r,
|
|
1983
2012
|
{
|
|
@@ -1988,30 +2017,30 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
1988
2017
|
height: "100%",
|
|
1989
2018
|
flex: 1
|
|
1990
2019
|
},
|
|
1991
|
-
children: /* @__PURE__ */ t(
|
|
2020
|
+
children: /* @__PURE__ */ t(C, { level: "body-lg", sx: k.noLeaderboardText, children: s("common.labels.noData", "No standings available yet.") })
|
|
1992
2021
|
}
|
|
1993
2022
|
);
|
|
1994
|
-
const
|
|
1995
|
-
v *
|
|
1996
|
-
(v + 1) *
|
|
1997
|
-
),
|
|
2023
|
+
const O = y.standings, H = Math.ceil(O.length / Je), j = O.slice(
|
|
2024
|
+
v * Je,
|
|
2025
|
+
(v + 1) * Je
|
|
2026
|
+
), V = [
|
|
1998
2027
|
{
|
|
1999
2028
|
id: "leaderboard",
|
|
2000
|
-
label:
|
|
2029
|
+
label: s("eitherOr.standings.leaderboard", "Leaderboard")
|
|
2001
2030
|
},
|
|
2002
2031
|
{
|
|
2003
2032
|
id: "distribution",
|
|
2004
|
-
label:
|
|
2033
|
+
label: s("eitherOr.standings.distribution", "Distribution")
|
|
2005
2034
|
}
|
|
2006
2035
|
];
|
|
2007
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ h(
|
|
2008
2037
|
r,
|
|
2009
2038
|
{
|
|
2010
2039
|
sx: {
|
|
2011
2040
|
display: "flex",
|
|
2012
2041
|
flexDirection: "column",
|
|
2013
|
-
gap:
|
|
2014
|
-
p:
|
|
2042
|
+
gap: x.sm,
|
|
2043
|
+
p: x.md
|
|
2015
2044
|
},
|
|
2016
2045
|
children: [
|
|
2017
2046
|
/* @__PURE__ */ t(
|
|
@@ -2019,134 +2048,134 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2019
2048
|
{
|
|
2020
2049
|
sx: {
|
|
2021
2050
|
display: "flex",
|
|
2022
|
-
borderRadius:
|
|
2051
|
+
borderRadius: p["2xl"],
|
|
2023
2052
|
p: "3px",
|
|
2024
|
-
gap:
|
|
2053
|
+
gap: x.xs
|
|
2025
2054
|
},
|
|
2026
|
-
children:
|
|
2027
|
-
const
|
|
2055
|
+
children: V.map((W) => {
|
|
2056
|
+
const T = L === W.id;
|
|
2028
2057
|
return /* @__PURE__ */ t(
|
|
2029
2058
|
r,
|
|
2030
2059
|
{
|
|
2031
|
-
onClick: () =>
|
|
2060
|
+
onClick: () => N(W.id),
|
|
2032
2061
|
sx: {
|
|
2033
2062
|
flex: 1,
|
|
2034
2063
|
display: "flex",
|
|
2035
2064
|
alignItems: "center",
|
|
2036
2065
|
justifyContent: "center",
|
|
2037
|
-
p:
|
|
2038
|
-
borderRadius: `calc(${
|
|
2039
|
-
backgroundColor:
|
|
2066
|
+
p: x.xs,
|
|
2067
|
+
borderRadius: `calc(${p["2xl"]} - 3px)`,
|
|
2068
|
+
backgroundColor: T ? c : E,
|
|
2040
2069
|
cursor: "pointer",
|
|
2041
2070
|
transition: "background-color 220ms ease",
|
|
2042
2071
|
userSelect: "none",
|
|
2043
2072
|
WebkitTapHighlightColor: "transparent"
|
|
2044
2073
|
},
|
|
2045
2074
|
children: /* @__PURE__ */ t(
|
|
2046
|
-
|
|
2075
|
+
C,
|
|
2047
2076
|
{
|
|
2048
2077
|
sx: {
|
|
2049
|
-
fontFamily:
|
|
2050
|
-
fontWeight:
|
|
2078
|
+
fontFamily: f,
|
|
2079
|
+
fontWeight: T ? 700 : 500,
|
|
2051
2080
|
fontSize: "0.8em",
|
|
2052
|
-
color:
|
|
2053
|
-
opacity:
|
|
2081
|
+
color: T ? w : u,
|
|
2082
|
+
opacity: T ? 1 : 0.45,
|
|
2054
2083
|
transition: "color 220ms ease, opacity 220ms ease",
|
|
2055
2084
|
lineHeight: 1
|
|
2056
2085
|
},
|
|
2057
|
-
children:
|
|
2086
|
+
children: W.label
|
|
2058
2087
|
}
|
|
2059
2088
|
)
|
|
2060
2089
|
},
|
|
2061
|
-
|
|
2090
|
+
W.id
|
|
2062
2091
|
);
|
|
2063
2092
|
})
|
|
2064
2093
|
}
|
|
2065
2094
|
),
|
|
2066
|
-
|
|
2095
|
+
L === "leaderboard" && /* @__PURE__ */ h(et, { children: [
|
|
2067
2096
|
/* @__PURE__ */ t(
|
|
2068
|
-
|
|
2097
|
+
C,
|
|
2069
2098
|
{
|
|
2070
2099
|
sx: {
|
|
2071
|
-
fontFamily:
|
|
2100
|
+
fontFamily: f,
|
|
2072
2101
|
fontWeight: 700,
|
|
2073
2102
|
fontSize: "1.5em",
|
|
2074
|
-
color:
|
|
2103
|
+
color: u,
|
|
2075
2104
|
textAlign: "center"
|
|
2076
2105
|
},
|
|
2077
|
-
children:
|
|
2106
|
+
children: s("eitherOr.leaderboard.top50Note", "Top 50")
|
|
2078
2107
|
}
|
|
2079
2108
|
),
|
|
2080
|
-
/* @__PURE__ */ t(
|
|
2081
|
-
|
|
2109
|
+
/* @__PURE__ */ t(fn, { sx: k.tableContainer, children: /* @__PURE__ */ h(
|
|
2110
|
+
xn,
|
|
2082
2111
|
{
|
|
2083
2112
|
variant: "outlined",
|
|
2084
2113
|
hoverRow: !1,
|
|
2085
2114
|
borderAxis: "bothBetween",
|
|
2086
2115
|
size: "sm",
|
|
2087
|
-
sx:
|
|
2116
|
+
sx: k.table,
|
|
2088
2117
|
children: [
|
|
2089
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */ t("th", { style:
|
|
2091
|
-
/* @__PURE__ */ t("th", { style:
|
|
2092
|
-
/* @__PURE__ */ t("th", { style:
|
|
2118
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
|
2119
|
+
/* @__PURE__ */ t("th", { style: k.headerCellPosition, children: A ? "" : s("eitherOr.leaderboard.position", "#") }),
|
|
2120
|
+
/* @__PURE__ */ t("th", { style: k.headerCellName, children: s("eitherOr.leaderboard.name", "Name") }),
|
|
2121
|
+
/* @__PURE__ */ t("th", { style: k.headerCellPoints, children: A ? "🎯" : s("eitherOr.leaderboard.points", "Pts") })
|
|
2093
2122
|
] }) }),
|
|
2094
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2095
|
-
var
|
|
2096
|
-
const
|
|
2097
|
-
return /* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ t("tbody", { children: j.map((W, T) => {
|
|
2124
|
+
var J, me, ae;
|
|
2125
|
+
const K = v * Je + T, X = W.userId === "current" || P !== null && W.userId === P, Z = ((J = W.userModel) == null ? void 0 : J.avatar) || void 0, ee = ((me = W.userModel) == null ? void 0 : me.nickname) || ((ae = W.userModel) == null ? void 0 : ae.name) || s("common.labels.anonymous", "Anonymous");
|
|
2126
|
+
return /* @__PURE__ */ h(
|
|
2098
2127
|
"tr",
|
|
2099
2128
|
{
|
|
2100
|
-
style: X ?
|
|
2129
|
+
style: X ? k.userRow : void 0,
|
|
2101
2130
|
children: [
|
|
2102
|
-
/* @__PURE__ */ t("td", { style:
|
|
2131
|
+
/* @__PURE__ */ t("td", { style: k.tableCellPosition, children: /* @__PURE__ */ h(C, { sx: k.positionText, children: [
|
|
2103
2132
|
"#",
|
|
2104
|
-
|
|
2133
|
+
K + 1
|
|
2105
2134
|
] }) }),
|
|
2106
|
-
/* @__PURE__ */ t("td", { style:
|
|
2107
|
-
/* @__PURE__ */ t(
|
|
2135
|
+
/* @__PURE__ */ t("td", { style: k.tableCellName, children: /* @__PURE__ */ h(r, { sx: k.nameCell, children: [
|
|
2136
|
+
/* @__PURE__ */ t(bn, { src: Z, sx: k.leaderboardAvatar, children: !Z && /* @__PURE__ */ t(hn, { sx: k.avatarIcon }) }),
|
|
2108
2137
|
/* @__PURE__ */ t(
|
|
2109
|
-
|
|
2138
|
+
C,
|
|
2110
2139
|
{
|
|
2111
2140
|
sx: {
|
|
2112
|
-
...
|
|
2141
|
+
...k.nameText,
|
|
2113
2142
|
fontWeight: X ? 700 : 500,
|
|
2114
|
-
color: X ?
|
|
2143
|
+
color: X ? c : u
|
|
2115
2144
|
},
|
|
2116
|
-
children: X ?
|
|
2145
|
+
children: X ? s("common.labels.me", "Me") : ee
|
|
2117
2146
|
}
|
|
2118
2147
|
)
|
|
2119
2148
|
] }) }),
|
|
2120
|
-
/* @__PURE__ */ t("td", { style:
|
|
2149
|
+
/* @__PURE__ */ t("td", { style: k.tableCellPoints, children: /* @__PURE__ */ t(C, { sx: k.pointsText, children: W.personalBest }) })
|
|
2121
2150
|
]
|
|
2122
2151
|
},
|
|
2123
|
-
`${
|
|
2152
|
+
`${W.userId}-${K}`
|
|
2124
2153
|
);
|
|
2125
2154
|
}) })
|
|
2126
2155
|
]
|
|
2127
2156
|
}
|
|
2128
2157
|
) }),
|
|
2129
|
-
|
|
2158
|
+
H > 1 && /* @__PURE__ */ h(
|
|
2130
2159
|
r,
|
|
2131
2160
|
{
|
|
2132
2161
|
sx: {
|
|
2133
2162
|
display: "flex",
|
|
2134
2163
|
justifyContent: "center",
|
|
2135
2164
|
alignItems: "center",
|
|
2136
|
-
gap:
|
|
2165
|
+
gap: x.sm
|
|
2137
2166
|
},
|
|
2138
2167
|
children: [
|
|
2139
2168
|
/* @__PURE__ */ t(
|
|
2140
2169
|
r,
|
|
2141
2170
|
{
|
|
2142
|
-
onClick: () => v > 0 &&
|
|
2171
|
+
onClick: () => v > 0 && D((W) => W - 1),
|
|
2143
2172
|
sx: {
|
|
2144
2173
|
cursor: v > 0 ? "pointer" : "default",
|
|
2145
2174
|
opacity: v > 0 ? 1 : 0.3,
|
|
2146
|
-
fontFamily:
|
|
2175
|
+
fontFamily: f,
|
|
2147
2176
|
fontSize: "1.25em",
|
|
2148
2177
|
fontWeight: 600,
|
|
2149
|
-
color:
|
|
2178
|
+
color: c,
|
|
2150
2179
|
px: "12px",
|
|
2151
2180
|
py: "6px",
|
|
2152
2181
|
borderRadius: "4px",
|
|
@@ -2155,33 +2184,33 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2155
2184
|
children: "‹"
|
|
2156
2185
|
}
|
|
2157
2186
|
),
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
|
|
2187
|
+
/* @__PURE__ */ h(
|
|
2188
|
+
C,
|
|
2160
2189
|
{
|
|
2161
2190
|
sx: {
|
|
2162
|
-
fontFamily:
|
|
2191
|
+
fontFamily: f,
|
|
2163
2192
|
fontSize: "0.75em",
|
|
2164
|
-
color:
|
|
2193
|
+
color: u,
|
|
2165
2194
|
opacity: 0.7
|
|
2166
2195
|
},
|
|
2167
2196
|
children: [
|
|
2168
2197
|
v + 1,
|
|
2169
2198
|
" / ",
|
|
2170
|
-
|
|
2199
|
+
H
|
|
2171
2200
|
]
|
|
2172
2201
|
}
|
|
2173
2202
|
),
|
|
2174
2203
|
/* @__PURE__ */ t(
|
|
2175
2204
|
r,
|
|
2176
2205
|
{
|
|
2177
|
-
onClick: () => v <
|
|
2206
|
+
onClick: () => v < H - 1 && D((W) => W + 1),
|
|
2178
2207
|
sx: {
|
|
2179
|
-
cursor: v <
|
|
2180
|
-
opacity: v <
|
|
2181
|
-
fontFamily:
|
|
2208
|
+
cursor: v < H - 1 ? "pointer" : "default",
|
|
2209
|
+
opacity: v < H - 1 ? 1 : 0.3,
|
|
2210
|
+
fontFamily: f,
|
|
2182
2211
|
fontSize: "1.25em",
|
|
2183
2212
|
fontWeight: 600,
|
|
2184
|
-
color:
|
|
2213
|
+
color: c,
|
|
2185
2214
|
px: "12px",
|
|
2186
2215
|
py: "6px",
|
|
2187
2216
|
borderRadius: "4px",
|
|
@@ -2194,204 +2223,206 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2194
2223
|
}
|
|
2195
2224
|
)
|
|
2196
2225
|
] }),
|
|
2197
|
-
|
|
2198
|
-
|
|
2226
|
+
L === "distribution" && /* @__PURE__ */ t(
|
|
2227
|
+
Ln,
|
|
2199
2228
|
{
|
|
2200
|
-
breakdown:
|
|
2201
|
-
currentPoints:
|
|
2202
|
-
primaryColor:
|
|
2203
|
-
textColor:
|
|
2229
|
+
breakdown: y.breakdown,
|
|
2230
|
+
currentPoints: R > 0 ? R : void 0,
|
|
2231
|
+
primaryColor: c,
|
|
2232
|
+
textColor: u
|
|
2204
2233
|
}
|
|
2205
2234
|
)
|
|
2206
2235
|
]
|
|
2207
2236
|
}
|
|
2208
2237
|
);
|
|
2209
|
-
},
|
|
2238
|
+
}, ke = ({
|
|
2210
2239
|
children: e,
|
|
2211
2240
|
brandingBorderColor: n
|
|
2212
2241
|
}) => {
|
|
2213
|
-
const
|
|
2242
|
+
const l = pe().md, i = n || q().secondaryContainer, s = q().surface, g = Jt().size, o = Se(), m = g + " solid " + i;
|
|
2214
2243
|
return /* @__PURE__ */ t(
|
|
2215
2244
|
r,
|
|
2216
2245
|
{
|
|
2217
2246
|
sx: {
|
|
2218
2247
|
display: "flex",
|
|
2219
|
-
flexDirection:
|
|
2248
|
+
flexDirection: o ? "column" : "row",
|
|
2220
2249
|
width: "100%",
|
|
2221
|
-
borderRadius:
|
|
2250
|
+
borderRadius: l,
|
|
2222
2251
|
boxShadow: "md",
|
|
2223
|
-
border:
|
|
2252
|
+
border: m,
|
|
2224
2253
|
overflow: "hidden",
|
|
2225
|
-
background:
|
|
2254
|
+
background: s,
|
|
2226
2255
|
minHeight: "320px"
|
|
2227
2256
|
},
|
|
2228
2257
|
children: e
|
|
2229
2258
|
}
|
|
2230
2259
|
);
|
|
2231
|
-
},
|
|
2232
|
-
var
|
|
2260
|
+
}, On = (e) => {
|
|
2261
|
+
var W, T;
|
|
2233
2262
|
const {
|
|
2234
2263
|
eitherOr: n,
|
|
2235
|
-
currentPair:
|
|
2236
|
-
stepInfo:
|
|
2237
|
-
gameState:
|
|
2238
|
-
timer:
|
|
2239
|
-
selected:
|
|
2240
|
-
feedback:
|
|
2241
|
-
sdk:
|
|
2242
|
-
defaultImagePlaceholderUrl:
|
|
2243
|
-
rulesDisplay:
|
|
2264
|
+
currentPair: l,
|
|
2265
|
+
stepInfo: i,
|
|
2266
|
+
gameState: s,
|
|
2267
|
+
timer: g,
|
|
2268
|
+
selected: o,
|
|
2269
|
+
feedback: m,
|
|
2270
|
+
sdk: c,
|
|
2271
|
+
defaultImagePlaceholderUrl: u,
|
|
2272
|
+
rulesDisplay: f,
|
|
2244
2273
|
showStandings: b,
|
|
2245
|
-
additionalCTA:
|
|
2246
|
-
onGameStart:
|
|
2247
|
-
onSelection:
|
|
2248
|
-
onPlayAgain:
|
|
2249
|
-
imagePosition:
|
|
2250
|
-
} = e, { t:
|
|
2274
|
+
additionalCTA: p,
|
|
2275
|
+
onGameStart: x,
|
|
2276
|
+
onSelection: A,
|
|
2277
|
+
onPlayAgain: E,
|
|
2278
|
+
imagePosition: w = "left"
|
|
2279
|
+
} = e, { t: I } = Q(), y = q(), d = ((W = n == null ? void 0 : n.branding) == null ? void 0 : W.colors) || null, z = (d == null ? void 0 : d.primaryColor) || y.palette.primary.plainColor, S = y.secondaryContainer, v = y.surfaceTintDim, D = ((T = oe(v || "")) == null ? void 0 : T.replace(/[^\d,]/g, "")) ?? null, P = pe().md, $ = Te().primary, L = ve(), N = Se(), [R, k] = B(0), O = st(
|
|
2251
2280
|
{
|
|
2252
2281
|
images: n == null ? void 0 : n.images,
|
|
2253
|
-
imagePlaceholder:
|
|
2282
|
+
imagePlaceholder: u || ""
|
|
2254
2283
|
},
|
|
2255
|
-
|
|
2256
|
-
),
|
|
2257
|
-
switch (
|
|
2258
|
-
case
|
|
2259
|
-
return /* @__PURE__ */ t(
|
|
2260
|
-
case
|
|
2284
|
+
Pe.STANDARD
|
|
2285
|
+
), H = () => {
|
|
2286
|
+
switch (s) {
|
|
2287
|
+
case _.LOADING:
|
|
2288
|
+
return /* @__PURE__ */ t(lt, { my: 20 });
|
|
2289
|
+
case _.TUTORIAL:
|
|
2261
2290
|
return /* @__PURE__ */ t(
|
|
2262
|
-
|
|
2291
|
+
Pn,
|
|
2263
2292
|
{
|
|
2264
|
-
onStart:
|
|
2293
|
+
onStart: x,
|
|
2265
2294
|
game: n,
|
|
2266
|
-
showSignInCTA: !1
|
|
2295
|
+
showSignInCTA: !1,
|
|
2296
|
+
consents: e.consents,
|
|
2297
|
+
isSubmitting: e.isSubmitting
|
|
2267
2298
|
}
|
|
2268
2299
|
);
|
|
2269
|
-
case
|
|
2300
|
+
case _.PLAYING:
|
|
2270
2301
|
return /* @__PURE__ */ t(
|
|
2271
|
-
|
|
2302
|
+
wn,
|
|
2272
2303
|
{
|
|
2273
|
-
currentPair:
|
|
2274
|
-
timer:
|
|
2304
|
+
currentPair: l,
|
|
2305
|
+
timer: g,
|
|
2275
2306
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2276
|
-
selected:
|
|
2277
|
-
feedback:
|
|
2278
|
-
onSelect:
|
|
2279
|
-
stepInfo:
|
|
2280
|
-
brandingPrimaryColor: (
|
|
2307
|
+
selected: o,
|
|
2308
|
+
feedback: m,
|
|
2309
|
+
onSelect: A,
|
|
2310
|
+
stepInfo: i,
|
|
2311
|
+
brandingPrimaryColor: (d == null ? void 0 : d.primaryColor) || null,
|
|
2281
2312
|
game: n
|
|
2282
2313
|
}
|
|
2283
2314
|
);
|
|
2284
|
-
case
|
|
2315
|
+
case _.RESULTS:
|
|
2285
2316
|
return /* @__PURE__ */ t(
|
|
2286
|
-
|
|
2317
|
+
ut,
|
|
2287
2318
|
{
|
|
2288
|
-
stepInfo:
|
|
2319
|
+
stepInfo: i,
|
|
2289
2320
|
game: n,
|
|
2290
|
-
sdk:
|
|
2291
|
-
onPlayAgain:
|
|
2292
|
-
brandingPrimaryColor: (
|
|
2293
|
-
additionalCTA:
|
|
2321
|
+
sdk: c,
|
|
2322
|
+
onPlayAgain: E,
|
|
2323
|
+
brandingPrimaryColor: (d == null ? void 0 : d.primaryColor) || null,
|
|
2324
|
+
additionalCTA: p
|
|
2294
2325
|
}
|
|
2295
2326
|
);
|
|
2296
2327
|
default:
|
|
2297
2328
|
return null;
|
|
2298
2329
|
}
|
|
2299
|
-
},
|
|
2330
|
+
}, j = s === _.RESULTS, V = {
|
|
2300
2331
|
display: "flex",
|
|
2301
2332
|
flexDirection: "row",
|
|
2302
2333
|
justifyContent: "center",
|
|
2303
2334
|
alignItems: "center",
|
|
2304
|
-
flex:
|
|
2305
|
-
width:
|
|
2306
|
-
borderBottom: "1px solid " +
|
|
2335
|
+
flex: N ? "0 0 auto" : 1,
|
|
2336
|
+
width: N ? "100%" : "auto",
|
|
2337
|
+
borderBottom: "1px solid " + S,
|
|
2307
2338
|
opacity: "60%",
|
|
2308
|
-
py:
|
|
2309
|
-
px:
|
|
2310
|
-
gap:
|
|
2339
|
+
py: L.sm,
|
|
2340
|
+
px: L.md,
|
|
2341
|
+
gap: L.xs,
|
|
2311
2342
|
"&:not(.Mui-selected):hover": {
|
|
2312
|
-
bgcolor:
|
|
2343
|
+
bgcolor: D ? `rgba(${D},0.06)` : `${v}0F`
|
|
2313
2344
|
},
|
|
2314
|
-
[`&.${
|
|
2315
|
-
bgcolor:
|
|
2316
|
-
borderBottom: "3px solid " +
|
|
2345
|
+
[`&.${Wt.selected}`]: {
|
|
2346
|
+
bgcolor: D ? `rgba(${D},0.06)` : `${v}0F`,
|
|
2347
|
+
borderBottom: "3px solid " + z,
|
|
2317
2348
|
opacity: "100%",
|
|
2318
2349
|
mb: "-1px"
|
|
2319
2350
|
}
|
|
2320
|
-
},
|
|
2351
|
+
}, a = {
|
|
2321
2352
|
flex: 1,
|
|
2322
2353
|
display: "flex",
|
|
2323
2354
|
flexDirection: "column",
|
|
2324
2355
|
overflow: "auto"
|
|
2325
2356
|
};
|
|
2326
|
-
return
|
|
2327
|
-
|
|
2357
|
+
return j && b ? /* @__PURE__ */ t(ke, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ h(
|
|
2358
|
+
Mt,
|
|
2328
2359
|
{
|
|
2329
|
-
value:
|
|
2330
|
-
onChange: (
|
|
2360
|
+
value: R,
|
|
2361
|
+
onChange: (K, X) => k(X),
|
|
2331
2362
|
sx: {
|
|
2332
|
-
borderRadius:
|
|
2363
|
+
borderRadius: P,
|
|
2333
2364
|
width: "100%",
|
|
2334
2365
|
backgroundColor: "transparent"
|
|
2335
2366
|
},
|
|
2336
2367
|
children: [
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
|
|
2368
|
+
/* @__PURE__ */ h(
|
|
2369
|
+
Ht,
|
|
2339
2370
|
{
|
|
2340
2371
|
sx: {
|
|
2341
2372
|
fontSize: "1em",
|
|
2342
2373
|
"--Icon-fontSize": "1.25em",
|
|
2343
|
-
flexDirection:
|
|
2374
|
+
flexDirection: N ? "column" : "row"
|
|
2344
2375
|
},
|
|
2345
2376
|
children: [
|
|
2346
|
-
/* @__PURE__ */ t(
|
|
2377
|
+
/* @__PURE__ */ t(nt, { sx: V, disableIndicator: !0, children: /* @__PURE__ */ h(
|
|
2347
2378
|
r,
|
|
2348
2379
|
{
|
|
2349
2380
|
sx: {
|
|
2350
2381
|
display: "flex",
|
|
2351
2382
|
alignItems: "center",
|
|
2352
|
-
gap:
|
|
2383
|
+
gap: L.xs
|
|
2353
2384
|
},
|
|
2354
2385
|
children: [
|
|
2355
|
-
/* @__PURE__ */ t(
|
|
2386
|
+
/* @__PURE__ */ t(De, { sx: { fontSize: "1.25em" } }),
|
|
2356
2387
|
/* @__PURE__ */ t(
|
|
2357
|
-
|
|
2388
|
+
C,
|
|
2358
2389
|
{
|
|
2359
2390
|
sx: {
|
|
2360
|
-
fontFamily:
|
|
2391
|
+
fontFamily: $,
|
|
2361
2392
|
fontSize: "1em",
|
|
2362
2393
|
fontWeight: 500,
|
|
2363
2394
|
lineHeight: "24px",
|
|
2364
2395
|
letterSpacing: "0.4px",
|
|
2365
2396
|
textTransform: "uppercase"
|
|
2366
2397
|
},
|
|
2367
|
-
children:
|
|
2398
|
+
children: I("eitherOr.tabs.score", "Score")
|
|
2368
2399
|
}
|
|
2369
2400
|
)
|
|
2370
2401
|
]
|
|
2371
2402
|
}
|
|
2372
2403
|
) }),
|
|
2373
|
-
/* @__PURE__ */ t(
|
|
2404
|
+
/* @__PURE__ */ t(nt, { sx: V, disableIndicator: !0, children: /* @__PURE__ */ h(
|
|
2374
2405
|
r,
|
|
2375
2406
|
{
|
|
2376
2407
|
sx: {
|
|
2377
2408
|
display: "flex",
|
|
2378
2409
|
alignItems: "center",
|
|
2379
|
-
gap:
|
|
2410
|
+
gap: L.xs
|
|
2380
2411
|
},
|
|
2381
2412
|
children: [
|
|
2382
|
-
/* @__PURE__ */ t(
|
|
2413
|
+
/* @__PURE__ */ t(jt, { sx: { fontSize: "1.25em" } }),
|
|
2383
2414
|
/* @__PURE__ */ t(
|
|
2384
|
-
|
|
2415
|
+
C,
|
|
2385
2416
|
{
|
|
2386
2417
|
sx: {
|
|
2387
|
-
fontFamily:
|
|
2418
|
+
fontFamily: $,
|
|
2388
2419
|
fontSize: "1em",
|
|
2389
2420
|
fontWeight: 500,
|
|
2390
2421
|
lineHeight: "24px",
|
|
2391
2422
|
letterSpacing: "0.4px",
|
|
2392
2423
|
textTransform: "uppercase"
|
|
2393
2424
|
},
|
|
2394
|
-
children:
|
|
2425
|
+
children: I("eitherOr.tabs.standings", "Standings")
|
|
2395
2426
|
}
|
|
2396
2427
|
)
|
|
2397
2428
|
]
|
|
@@ -2400,39 +2431,39 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2400
2431
|
]
|
|
2401
2432
|
}
|
|
2402
2433
|
),
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2434
|
+
R === 0 && /* @__PURE__ */ t(rt, { value: 0, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: a, children: H() }) }),
|
|
2435
|
+
R === 1 && /* @__PURE__ */ t(rt, { value: 1, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: a, children: /* @__PURE__ */ t(
|
|
2436
|
+
_t,
|
|
2406
2437
|
{
|
|
2407
2438
|
game: n,
|
|
2408
|
-
sdk:
|
|
2409
|
-
stepInfo:
|
|
2410
|
-
brandingPrimaryColor: (
|
|
2439
|
+
sdk: c,
|
|
2440
|
+
stepInfo: i,
|
|
2441
|
+
brandingPrimaryColor: (d == null ? void 0 : d.primaryColor) || null
|
|
2411
2442
|
}
|
|
2412
2443
|
) }) })
|
|
2413
2444
|
]
|
|
2414
2445
|
}
|
|
2415
|
-
) }) :
|
|
2416
|
-
|
|
2446
|
+
) }) : j ? /* @__PURE__ */ t(ke, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(r, { sx: a, children: H() }) }) : /* @__PURE__ */ t(ke, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2447
|
+
sn,
|
|
2417
2448
|
{
|
|
2418
2449
|
entity: n,
|
|
2419
|
-
headline:
|
|
2420
|
-
finalImage:
|
|
2421
|
-
imagePosition:
|
|
2422
|
-
rulesDisplay:
|
|
2423
|
-
children:
|
|
2450
|
+
headline: I("eitherOr.headline", "Either/Or"),
|
|
2451
|
+
finalImage: O,
|
|
2452
|
+
imagePosition: w,
|
|
2453
|
+
rulesDisplay: f,
|
|
2454
|
+
children: H()
|
|
2424
2455
|
}
|
|
2425
2456
|
) });
|
|
2426
|
-
},
|
|
2427
|
-
const { t: e } =
|
|
2428
|
-
return /* @__PURE__ */ t(
|
|
2429
|
-
|
|
2457
|
+
}, Bn = () => {
|
|
2458
|
+
const { t: e } = Q();
|
|
2459
|
+
return /* @__PURE__ */ t(ke, { brandingBorderColor: null, children: /* @__PURE__ */ t(
|
|
2460
|
+
cn,
|
|
2430
2461
|
{
|
|
2431
2462
|
notFoundTitle: e("eitherOr.eitherOrNotFound"),
|
|
2432
2463
|
notFoundMessage: e("eitherOr.eitherOrNotFoundDescription")
|
|
2433
2464
|
}
|
|
2434
2465
|
) });
|
|
2435
|
-
},
|
|
2466
|
+
}, Dn = (e) => ({
|
|
2436
2467
|
// Pulse animation for buttons
|
|
2437
2468
|
pulseAnimation: {
|
|
2438
2469
|
"@keyframes pulse": {
|
|
@@ -2480,154 +2511,154 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2480
2511
|
display: "flex",
|
|
2481
2512
|
alignItems: "center"
|
|
2482
2513
|
}
|
|
2483
|
-
}),
|
|
2484
|
-
var
|
|
2485
|
-
const n = ((
|
|
2514
|
+
}), $n = (e) => {
|
|
2515
|
+
var E, w, I, y, d;
|
|
2516
|
+
const n = ((E = e.eitherOr.branding) == null ? void 0 : E.colors) || null, l = Se(), i = Ne(), s = st(
|
|
2486
2517
|
{
|
|
2487
2518
|
images: e.eitherOr.images,
|
|
2488
2519
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2489
2520
|
},
|
|
2490
|
-
|
|
2491
|
-
),
|
|
2492
|
-
fontFamilyPrimary:
|
|
2493
|
-
buttonRadius:
|
|
2494
|
-
primaryColor:
|
|
2495
|
-
onPrimaryColor:
|
|
2496
|
-
}),
|
|
2497
|
-
var
|
|
2498
|
-
return e.signInCTA ? (
|
|
2499
|
-
|
|
2521
|
+
Pe.STANDARD
|
|
2522
|
+
), g = Te().primary, o = pe().xl, m = (n == null ? void 0 : n.primaryColor) || q().palette.primary.plainColor, c = q().palette.primary.onPrimary, u = (n == null ? void 0 : n.contentColor) || q().textColor, f = l ? ((w = e.eitherOr.branding) == null ? void 0 : w.images.mobileLogo) || ((I = e.eitherOr.branding) == null ? void 0 : I.images.mainLogo) || "" : ((y = e.eitherOr.branding) == null ? void 0 : y.images.mainLogo) || "", { t: b } = Q(), p = e.imagePosition || "left", x = Dn({
|
|
2523
|
+
fontFamilyPrimary: g,
|
|
2524
|
+
buttonRadius: o,
|
|
2525
|
+
primaryColor: m,
|
|
2526
|
+
onPrimaryColor: c
|
|
2527
|
+
}), A = () => {
|
|
2528
|
+
var z, S, v, D;
|
|
2529
|
+
return e.signInCTA ? (z = e.signInCTA) != null && z.component ? e.signInCTA.component : (S = e.signInCTA) != null && S.onClick ? /* @__PURE__ */ t(
|
|
2530
|
+
ye,
|
|
2500
2531
|
{
|
|
2501
2532
|
variant: "soft",
|
|
2502
2533
|
sx: {
|
|
2503
|
-
...
|
|
2504
|
-
...
|
|
2534
|
+
...x.signInButton,
|
|
2535
|
+
...x.pulseAnimation
|
|
2505
2536
|
},
|
|
2506
2537
|
onClick: e.signInCTA.onClick,
|
|
2507
|
-
children: /* @__PURE__ */ t(
|
|
2538
|
+
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2508
2539
|
}
|
|
2509
2540
|
) : (v = e.signInCTA) != null && v.url ? typeof window > "u" ? /* @__PURE__ */ t(
|
|
2510
2541
|
r,
|
|
2511
2542
|
{
|
|
2512
2543
|
component: "a",
|
|
2513
2544
|
href: e.signInCTA.url,
|
|
2514
|
-
target: ((
|
|
2545
|
+
target: ((D = e.signInCTA) == null ? void 0 : D.target) || "_self",
|
|
2515
2546
|
sx: {
|
|
2516
|
-
...
|
|
2517
|
-
...
|
|
2547
|
+
...x.signInButton,
|
|
2548
|
+
...x.pulseAnimation,
|
|
2518
2549
|
textDecoration: "none",
|
|
2519
2550
|
display: "inline-flex",
|
|
2520
2551
|
alignItems: "center",
|
|
2521
2552
|
justifyContent: "center"
|
|
2522
2553
|
},
|
|
2523
|
-
children: /* @__PURE__ */ t(
|
|
2554
|
+
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2524
2555
|
}
|
|
2525
2556
|
) : /* @__PURE__ */ t(
|
|
2526
|
-
|
|
2557
|
+
ye,
|
|
2527
2558
|
{
|
|
2528
2559
|
variant: "soft",
|
|
2529
2560
|
sx: {
|
|
2530
|
-
...
|
|
2531
|
-
...
|
|
2561
|
+
...x.signInButton,
|
|
2562
|
+
...x.pulseAnimation
|
|
2532
2563
|
},
|
|
2533
2564
|
onClick: () => {
|
|
2534
|
-
var
|
|
2535
|
-
((
|
|
2565
|
+
var P, $, L;
|
|
2566
|
+
((P = e.signInCTA) == null ? void 0 : P.target) === "_blank" ? window.open(($ = e.signInCTA) == null ? void 0 : $.url, "_blank") : window.location.href = (L = e.signInCTA) == null ? void 0 : L.url;
|
|
2536
2567
|
},
|
|
2537
|
-
children: /* @__PURE__ */ t(
|
|
2568
|
+
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2538
2569
|
}
|
|
2539
2570
|
) : /* @__PURE__ */ t(
|
|
2540
|
-
|
|
2571
|
+
ye,
|
|
2541
2572
|
{
|
|
2542
2573
|
variant: "soft",
|
|
2543
2574
|
sx: {
|
|
2544
|
-
...
|
|
2575
|
+
...x.signInButton
|
|
2545
2576
|
},
|
|
2546
2577
|
disabled: !0,
|
|
2547
|
-
children: /* @__PURE__ */ t(
|
|
2578
|
+
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2548
2579
|
}
|
|
2549
2580
|
) : /* @__PURE__ */ t(
|
|
2550
|
-
|
|
2581
|
+
ye,
|
|
2551
2582
|
{
|
|
2552
2583
|
variant: "soft",
|
|
2553
2584
|
sx: {
|
|
2554
|
-
...
|
|
2585
|
+
...x.signInButton
|
|
2555
2586
|
},
|
|
2556
2587
|
disabled: !0,
|
|
2557
|
-
children: /* @__PURE__ */ t(
|
|
2588
|
+
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: b("common.signIn") })
|
|
2558
2589
|
}
|
|
2559
2590
|
);
|
|
2560
2591
|
};
|
|
2561
|
-
return /* @__PURE__ */ t(
|
|
2562
|
-
|
|
2592
|
+
return /* @__PURE__ */ t(ke, { brandingBorderColor: (n == null ? void 0 : n.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2593
|
+
yn,
|
|
2563
2594
|
{
|
|
2564
2595
|
entity: e.eitherOr,
|
|
2565
2596
|
headline: b("eitherOr.headline"),
|
|
2566
|
-
finalImage:
|
|
2567
|
-
imagePosition:
|
|
2568
|
-
signInContent:
|
|
2597
|
+
finalImage: s,
|
|
2598
|
+
imagePosition: p,
|
|
2599
|
+
signInContent: A(),
|
|
2569
2600
|
brandingContent: /* @__PURE__ */ t(
|
|
2570
|
-
|
|
2601
|
+
ue,
|
|
2571
2602
|
{
|
|
2572
|
-
brandingLogo:
|
|
2573
|
-
textColor:
|
|
2574
|
-
label: ((
|
|
2603
|
+
brandingLogo: f,
|
|
2604
|
+
textColor: l && s ? (n == null ? void 0 : n.contentColor) || i.colorSchemes.dark.textColor : u,
|
|
2605
|
+
label: ((d = e.eitherOr.labels) == null ? void 0 : d.sponsor) || null
|
|
2575
2606
|
}
|
|
2576
2607
|
),
|
|
2577
2608
|
rulesDisplay: e.rulesDisplay
|
|
2578
2609
|
}
|
|
2579
2610
|
) });
|
|
2580
|
-
},
|
|
2611
|
+
}, Fn = ({
|
|
2581
2612
|
eitherOr: e,
|
|
2582
2613
|
imagePosition: n,
|
|
2583
|
-
defaultImagePlaceholderUrl:
|
|
2584
|
-
rulesDisplay:
|
|
2614
|
+
defaultImagePlaceholderUrl: l,
|
|
2615
|
+
rulesDisplay: i
|
|
2585
2616
|
}) => {
|
|
2586
|
-
var
|
|
2587
|
-
const { t:
|
|
2617
|
+
var u;
|
|
2618
|
+
const { t: s } = Q(), g = ((u = e.branding) == null ? void 0 : u.colors) || null, { brandingLogo: o } = it(
|
|
2588
2619
|
e.branding || null
|
|
2589
|
-
),
|
|
2620
|
+
), m = (f) => {
|
|
2590
2621
|
var b;
|
|
2591
2622
|
return /* @__PURE__ */ t(
|
|
2592
|
-
|
|
2623
|
+
ue,
|
|
2593
2624
|
{
|
|
2594
|
-
brandingLogo:
|
|
2595
|
-
textColor:
|
|
2625
|
+
brandingLogo: o,
|
|
2626
|
+
textColor: f,
|
|
2596
2627
|
label: ((b = e.labels) == null ? void 0 : b.sponsor) || null
|
|
2597
2628
|
}
|
|
2598
2629
|
);
|
|
2599
|
-
},
|
|
2630
|
+
}, c = {
|
|
2600
2631
|
entity: e,
|
|
2601
|
-
headline:
|
|
2632
|
+
headline: s("eitherOr.headline"),
|
|
2602
2633
|
tryAgainButtonText: "",
|
|
2603
2634
|
isApiError: !1,
|
|
2604
2635
|
alertVariant: "neutral",
|
|
2605
|
-
customAlertTitle:
|
|
2606
|
-
customAlertMessage:
|
|
2607
|
-
renderPresentedBy:
|
|
2636
|
+
customAlertTitle: s("eitherOr.gameNotAvailable"),
|
|
2637
|
+
customAlertMessage: s("eitherOr.gameNotAvailableDescription"),
|
|
2638
|
+
renderPresentedBy: m
|
|
2608
2639
|
};
|
|
2609
|
-
return /* @__PURE__ */ t(
|
|
2610
|
-
|
|
2640
|
+
return /* @__PURE__ */ t(ke, { brandingBorderColor: (g == null ? void 0 : g.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2641
|
+
Bt,
|
|
2611
2642
|
{
|
|
2612
|
-
...
|
|
2643
|
+
...c,
|
|
2613
2644
|
imagePosition: n || "left",
|
|
2614
|
-
defaultImagePlaceholderUrl:
|
|
2615
|
-
rulesDisplay:
|
|
2645
|
+
defaultImagePlaceholderUrl: l,
|
|
2646
|
+
rulesDisplay: i
|
|
2616
2647
|
}
|
|
2617
2648
|
) });
|
|
2618
|
-
},
|
|
2619
|
-
var
|
|
2620
|
-
const { t: n } =
|
|
2649
|
+
}, En = (e) => {
|
|
2650
|
+
var g, o, m, c, u, f, b;
|
|
2651
|
+
const { t: n } = Q(), l = ((g = e.eitherOr.branding) == null ? void 0 : g.colors) || null, i = Se() ? ((m = (o = e.eitherOr.branding) == null ? void 0 : o.images) == null ? void 0 : m.mobileLogo) || ((u = (c = e.eitherOr.branding) == null ? void 0 : c.images) == null ? void 0 : u.mainLogo) || "" : ((b = (f = e.eitherOr.branding) == null ? void 0 : f.images) == null ? void 0 : b.mainLogo) || "", s = {
|
|
2621
2652
|
...e.eitherOr,
|
|
2622
2653
|
branding: e.eitherOr.branding ? {
|
|
2623
2654
|
...e.eitherOr.branding,
|
|
2624
2655
|
colors: e.eitherOr.branding.colors ? { ...e.eitherOr.branding.colors, secondaryColor: void 0 } : null
|
|
2625
2656
|
} : null
|
|
2626
2657
|
};
|
|
2627
|
-
return /* @__PURE__ */ t(
|
|
2628
|
-
|
|
2658
|
+
return /* @__PURE__ */ t(ke, { brandingBorderColor: (l == null ? void 0 : l.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2659
|
+
Bt,
|
|
2629
2660
|
{
|
|
2630
|
-
entity:
|
|
2661
|
+
entity: s,
|
|
2631
2662
|
headline: n("eitherOr.headline"),
|
|
2632
2663
|
tryAgainButtonText: n("eitherOr.buttons.tryAgain"),
|
|
2633
2664
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
@@ -2635,77 +2666,79 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2635
2666
|
isApiError: e.isApiError,
|
|
2636
2667
|
toggleTryAgain: e.toggleTryAgain,
|
|
2637
2668
|
apiErrorMessage: e.apiErrorMessage,
|
|
2638
|
-
renderPresentedBy: (
|
|
2639
|
-
var
|
|
2669
|
+
renderPresentedBy: (p) => {
|
|
2670
|
+
var x;
|
|
2640
2671
|
return /* @__PURE__ */ t(
|
|
2641
|
-
|
|
2672
|
+
ue,
|
|
2642
2673
|
{
|
|
2643
|
-
brandingLogo:
|
|
2644
|
-
textColor:
|
|
2645
|
-
label: ((
|
|
2674
|
+
brandingLogo: i,
|
|
2675
|
+
textColor: p,
|
|
2676
|
+
label: ((x = e.eitherOr.labels) == null ? void 0 : x.sponsor) || null
|
|
2646
2677
|
}
|
|
2647
2678
|
);
|
|
2648
2679
|
},
|
|
2649
2680
|
rulesDisplay: e.rulesDisplay
|
|
2650
2681
|
}
|
|
2651
2682
|
) });
|
|
2652
|
-
},
|
|
2683
|
+
}, qt = ({
|
|
2653
2684
|
sdk: e,
|
|
2654
2685
|
contentId: n,
|
|
2655
|
-
contentName:
|
|
2656
|
-
brandingColors:
|
|
2657
|
-
brandingUrls:
|
|
2658
|
-
campaignId:
|
|
2659
|
-
campaignName:
|
|
2660
|
-
startGame:
|
|
2661
|
-
fields:
|
|
2662
|
-
leadTitle:
|
|
2663
|
-
leadDescription:
|
|
2686
|
+
contentName: l,
|
|
2687
|
+
brandingColors: i,
|
|
2688
|
+
brandingUrls: s,
|
|
2689
|
+
campaignId: g,
|
|
2690
|
+
campaignName: o,
|
|
2691
|
+
startGame: m,
|
|
2692
|
+
fields: c = ["fullName", "email"],
|
|
2693
|
+
leadTitle: u,
|
|
2694
|
+
leadDescription: f,
|
|
2664
2695
|
leadCta: b,
|
|
2665
|
-
leadSuccessTitle:
|
|
2666
|
-
leadSuccessDescription:
|
|
2667
|
-
syncWithProfile:
|
|
2668
|
-
|
|
2669
|
-
|
|
2696
|
+
leadSuccessTitle: p,
|
|
2697
|
+
leadSuccessDescription: x,
|
|
2698
|
+
syncWithProfile: A = !1,
|
|
2699
|
+
consents: E,
|
|
2700
|
+
isAfterPosition: w = !1,
|
|
2701
|
+
isSubmittingParticipation: I = !1
|
|
2670
2702
|
}) => {
|
|
2671
|
-
const { t:
|
|
2672
|
-
defaultLabel:
|
|
2673
|
-
onClick:
|
|
2703
|
+
const { t: y } = Q(), d = u ?? y("leads.header.title"), z = f ?? y("leads.header.description"), S = b ?? y("leads.buttons.submit"), v = p ?? y("leads.success.title"), D = x ?? y("leads.success.description"), P = {
|
|
2704
|
+
defaultLabel: y(w ? "eitherOr.buttons.finish" : "eitherOr.buttons.start"),
|
|
2705
|
+
onClick: m
|
|
2674
2706
|
};
|
|
2675
2707
|
return /* @__PURE__ */ t(
|
|
2676
|
-
|
|
2708
|
+
Sn,
|
|
2677
2709
|
{
|
|
2678
2710
|
sdk: e,
|
|
2679
2711
|
content: {
|
|
2680
2712
|
id: n,
|
|
2681
2713
|
type: "either-or",
|
|
2682
|
-
name:
|
|
2714
|
+
name: l
|
|
2683
2715
|
},
|
|
2684
|
-
onSuccessCta:
|
|
2716
|
+
onSuccessCta: P,
|
|
2685
2717
|
branding: {
|
|
2686
|
-
colors:
|
|
2687
|
-
urls:
|
|
2718
|
+
colors: i,
|
|
2719
|
+
urls: s
|
|
2688
2720
|
},
|
|
2689
2721
|
campaign: {
|
|
2690
|
-
id:
|
|
2691
|
-
name:
|
|
2722
|
+
id: g,
|
|
2723
|
+
name: o
|
|
2692
2724
|
},
|
|
2693
|
-
fields:
|
|
2725
|
+
fields: c,
|
|
2694
2726
|
labels: {
|
|
2695
|
-
title:
|
|
2696
|
-
description:
|
|
2697
|
-
submitButtonLabel:
|
|
2698
|
-
successTitle:
|
|
2699
|
-
successDescription:
|
|
2727
|
+
title: d,
|
|
2728
|
+
description: z,
|
|
2729
|
+
submitButtonLabel: S,
|
|
2730
|
+
successTitle: v,
|
|
2731
|
+
successDescription: D
|
|
2700
2732
|
},
|
|
2701
|
-
syncWithProfile:
|
|
2702
|
-
|
|
2733
|
+
syncWithProfile: A,
|
|
2734
|
+
consents: E,
|
|
2735
|
+
isSubmittingParticipation: I
|
|
2703
2736
|
}
|
|
2704
2737
|
);
|
|
2705
|
-
},
|
|
2706
|
-
const { t: n } =
|
|
2738
|
+
}, Un = (e) => {
|
|
2739
|
+
const { t: n } = Q();
|
|
2707
2740
|
return /* @__PURE__ */ t(
|
|
2708
|
-
|
|
2741
|
+
Dt,
|
|
2709
2742
|
{
|
|
2710
2743
|
entity: e.eitherOr,
|
|
2711
2744
|
headline: n("eitherOr.headline"),
|
|
@@ -2715,13 +2748,14 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2715
2748
|
imagePosition: e.imagePosition,
|
|
2716
2749
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
2717
2750
|
isSubmitting: e.isSubmitting,
|
|
2718
|
-
MainCard:
|
|
2719
|
-
PresentedBy:
|
|
2720
|
-
CollectLeadWrapper:
|
|
2751
|
+
MainCard: ke,
|
|
2752
|
+
PresentedBy: ue,
|
|
2753
|
+
CollectLeadWrapper: qt,
|
|
2754
|
+
consents: e.consents,
|
|
2721
2755
|
rulesDisplay: e.rulesDisplay
|
|
2722
2756
|
}
|
|
2723
2757
|
);
|
|
2724
|
-
},
|
|
2758
|
+
}, Wn = (e) => ({
|
|
2725
2759
|
// Pulse animation for buttons
|
|
2726
2760
|
pulseAnimation: {
|
|
2727
2761
|
"@keyframes pulse": {
|
|
@@ -2833,208 +2867,210 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
2833
2867
|
flexDirection: e.isMobile ? "column-reverse" : "row",
|
|
2834
2868
|
gap: e.spacingScale.md
|
|
2835
2869
|
}
|
|
2836
|
-
}),
|
|
2837
|
-
var
|
|
2870
|
+
}), Mn = (e) => {
|
|
2871
|
+
var ne, xe, Le, be, Ue, We, Me, Ze, bt, yt, pt, St, Ct, It, kt, Tt, vt, Pt, At, wt;
|
|
2838
2872
|
const {
|
|
2839
2873
|
eitherOr: n,
|
|
2840
|
-
currentPair:
|
|
2841
|
-
stepInfo:
|
|
2842
|
-
gameState:
|
|
2843
|
-
timer:
|
|
2844
|
-
selected:
|
|
2845
|
-
feedback:
|
|
2846
|
-
sdk:
|
|
2847
|
-
defaultImagePlaceholderUrl:
|
|
2848
|
-
rulesDisplay:
|
|
2874
|
+
currentPair: l,
|
|
2875
|
+
stepInfo: i,
|
|
2876
|
+
gameState: s,
|
|
2877
|
+
timer: g,
|
|
2878
|
+
selected: o,
|
|
2879
|
+
feedback: m,
|
|
2880
|
+
sdk: c,
|
|
2881
|
+
defaultImagePlaceholderUrl: u,
|
|
2882
|
+
rulesDisplay: f,
|
|
2849
2883
|
showStandings: b,
|
|
2850
|
-
additionalCTA:
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2884
|
+
additionalCTA: p,
|
|
2885
|
+
consents: x,
|
|
2886
|
+
isSubmitting: A,
|
|
2887
|
+
onGameStart: E,
|
|
2888
|
+
onSelection: w,
|
|
2889
|
+
onPlayAgain: I
|
|
2890
|
+
} = e, y = Ne(), d = ve(), z = Se(), { t: S } = Q(), [v, D] = B(0), [P, $] = B(0), [L, N] = B(!1), [R, k] = B(0), [O, H] = B(0), [j, V] = B(!1), a = mt(0), { brandingImage: W, brandingColors: T } = it(
|
|
2855
2891
|
n.branding || null
|
|
2856
|
-
),
|
|
2857
|
-
{ images: n == null ? void 0 : n.images, imagePlaceholder:
|
|
2858
|
-
|
|
2859
|
-
),
|
|
2860
|
-
|
|
2861
|
-
),
|
|
2862
|
-
spacingScale:
|
|
2863
|
-
smBorderRadius:
|
|
2864
|
-
contentBgColor:
|
|
2892
|
+
), K = u || (z ? ht : ft), X = st(
|
|
2893
|
+
{ images: n == null ? void 0 : n.images, imagePlaceholder: K },
|
|
2894
|
+
Pe.OVERLAY
|
|
2895
|
+
), Z = W || X, ee = Ot(Z), J = Lt(
|
|
2896
|
+
Pe.OVERLAY
|
|
2897
|
+
), me = y.customRadius.dark.sm, ae = y.customRadius.dark.md, se = (T == null ? void 0 : T.backgroundColor) || ((xe = (ne = y.colorSchemes) == null ? void 0 : ne.dark) == null ? void 0 : xe.surfaceVariant), ce = (be = (Le = y.customRadius) == null ? void 0 : Le.light) == null ? void 0 : be.xl, Y = (T == null ? void 0 : T.primaryColor) || ((Ze = (Me = (We = (Ue = y.colorSchemes) == null ? void 0 : Ue.light) == null ? void 0 : We.palette) == null ? void 0 : Me.primary) == null ? void 0 : Ze.plainColor), he = (St = (pt = (yt = (bt = y.colorSchemes) == null ? void 0 : bt.light) == null ? void 0 : yt.palette) == null ? void 0 : pt.primary) == null ? void 0 : St.onPrimary, U = y.customFontFamily.dark.primary, G = y.colorSchemes.dark.textColor, de = y.colorSchemes.dark.surface, Ae = y.colorSchemes.dark.secondaryContainer, we = y.colorSchemes.dark.surfaceTintDim, Ce = ((Ct = oe(we || "")) == null ? void 0 : Ct.replace(/[^\d,]/g, "")) ?? null, Ie = oe(Y || ""), ie = Wn({
|
|
2898
|
+
spacingScale: d,
|
|
2899
|
+
smBorderRadius: me,
|
|
2900
|
+
contentBgColor: se,
|
|
2865
2901
|
buttonRadius: ce,
|
|
2866
|
-
primaryColor:
|
|
2867
|
-
onPrimaryColor:
|
|
2868
|
-
fontFamilyPrimary:
|
|
2869
|
-
darkTextColor:
|
|
2870
|
-
isMobile:
|
|
2902
|
+
primaryColor: Y,
|
|
2903
|
+
onPrimaryColor: he,
|
|
2904
|
+
fontFamilyPrimary: U,
|
|
2905
|
+
darkTextColor: G,
|
|
2906
|
+
isMobile: z
|
|
2871
2907
|
});
|
|
2872
|
-
|
|
2873
|
-
if (
|
|
2874
|
-
|
|
2875
|
-
const
|
|
2876
|
-
return
|
|
2908
|
+
fe(() => {
|
|
2909
|
+
if (i != null && i.currentPoints && i.currentPoints > P) {
|
|
2910
|
+
k(i.currentPoints - P), N(!0), H((le) => le + 1);
|
|
2911
|
+
const re = setTimeout(() => N(!1), 1e3);
|
|
2912
|
+
return $(i.currentPoints), () => clearTimeout(re);
|
|
2877
2913
|
}
|
|
2878
|
-
}, [
|
|
2879
|
-
const
|
|
2880
|
-
|
|
2881
|
-
const
|
|
2882
|
-
if (
|
|
2883
|
-
|
|
2884
|
-
const
|
|
2885
|
-
return () => clearTimeout(
|
|
2914
|
+
}, [i == null ? void 0 : i.currentPoints, P]);
|
|
2915
|
+
const Fe = (n == null ? void 0 : n.points) ?? [], Re = Fe.length >= 2 ? Fe[1].correctSteps - Fe[0].correctSteps : ((It = Fe[0]) == null ? void 0 : It.correctSteps) || 5;
|
|
2916
|
+
fe(() => {
|
|
2917
|
+
const re = a.current, le = (i == null ? void 0 : i.currentStreak) ?? 0;
|
|
2918
|
+
if (a.current = le, le > re && le > 0 && le % Re === 0) {
|
|
2919
|
+
V(!0);
|
|
2920
|
+
const ge = setTimeout(() => V(!1), 500);
|
|
2921
|
+
return () => clearTimeout(ge);
|
|
2886
2922
|
}
|
|
2887
|
-
}, [
|
|
2888
|
-
const
|
|
2889
|
-
const
|
|
2890
|
-
for (let
|
|
2891
|
-
|
|
2923
|
+
}, [i == null ? void 0 : i.currentStreak, Re]);
|
|
2924
|
+
const ze = z ? ((Tt = (kt = n.branding) == null ? void 0 : kt.images) == null ? void 0 : Tt.mobileLogo) || ((Pt = (vt = n.branding) == null ? void 0 : vt.images) == null ? void 0 : Pt.mainLogo) || "" : ((wt = (At = n.branding) == null ? void 0 : At.images) == null ? void 0 : wt.mainLogo) || "", Ye = S("common.labels.point", { count: P }), _e = () => {
|
|
2925
|
+
const re = [], le = (i == null ? void 0 : i.currentLives) ?? 3;
|
|
2926
|
+
for (let ge = 0; ge < le; ge++)
|
|
2927
|
+
re.push(
|
|
2892
2928
|
/* @__PURE__ */ t(
|
|
2893
|
-
|
|
2929
|
+
tt,
|
|
2894
2930
|
{
|
|
2895
|
-
sx: { height: 20, color:
|
|
2931
|
+
sx: { height: 20, color: Y }
|
|
2896
2932
|
},
|
|
2897
|
-
`life-${
|
|
2933
|
+
`life-${ge}`
|
|
2898
2934
|
)
|
|
2899
2935
|
);
|
|
2900
|
-
for (let
|
|
2901
|
-
|
|
2936
|
+
for (let ge = le; ge < 3; ge++)
|
|
2937
|
+
re.push(
|
|
2902
2938
|
/* @__PURE__ */ t(
|
|
2903
|
-
|
|
2939
|
+
Ut,
|
|
2904
2940
|
{
|
|
2905
2941
|
sx: {
|
|
2906
2942
|
height: 20,
|
|
2907
|
-
color:
|
|
2943
|
+
color: Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.35)` : `${Y}59`
|
|
2908
2944
|
}
|
|
2909
2945
|
},
|
|
2910
|
-
`empty-${
|
|
2946
|
+
`empty-${ge}`
|
|
2911
2947
|
)
|
|
2912
2948
|
);
|
|
2913
|
-
return
|
|
2914
|
-
},
|
|
2915
|
-
const
|
|
2916
|
-
return /* @__PURE__ */
|
|
2917
|
-
Array.from({ length:
|
|
2949
|
+
return re;
|
|
2950
|
+
}, qe = () => {
|
|
2951
|
+
const re = (i == null ? void 0 : i.currentStreak) ?? 0, le = j ? Re : re % Re, He = Math.floor(re / Re) + 1;
|
|
2952
|
+
return /* @__PURE__ */ h(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
2953
|
+
Array.from({ length: Re }, (Rt, Oe) => /* @__PURE__ */ t(
|
|
2918
2954
|
r,
|
|
2919
2955
|
{
|
|
2920
2956
|
sx: {
|
|
2921
2957
|
flex: 1,
|
|
2922
2958
|
height: 4,
|
|
2923
|
-
bgcolor:
|
|
2959
|
+
bgcolor: Oe < le ? Y : G,
|
|
2924
2960
|
borderRadius: "2px",
|
|
2925
2961
|
transition: "background-color 0.3s ease"
|
|
2926
2962
|
}
|
|
2927
2963
|
},
|
|
2928
|
-
`streak-${
|
|
2964
|
+
`streak-${Oe}`
|
|
2929
2965
|
)),
|
|
2930
|
-
|
|
2931
|
-
|
|
2966
|
+
He > 1 && /* @__PURE__ */ h(
|
|
2967
|
+
C,
|
|
2932
2968
|
{
|
|
2933
2969
|
sx: {
|
|
2934
|
-
color:
|
|
2970
|
+
color: Y,
|
|
2935
2971
|
fontWeight: 700,
|
|
2936
2972
|
fontSize: "0.75em",
|
|
2937
2973
|
lineHeight: 1,
|
|
2938
|
-
ml:
|
|
2974
|
+
ml: d["2xs"],
|
|
2939
2975
|
flexShrink: 0
|
|
2940
2976
|
},
|
|
2941
2977
|
children: [
|
|
2942
2978
|
"×",
|
|
2943
|
-
|
|
2979
|
+
He
|
|
2944
2980
|
]
|
|
2945
2981
|
}
|
|
2946
2982
|
)
|
|
2947
2983
|
] });
|
|
2948
|
-
},
|
|
2984
|
+
}, Ke = () => /* @__PURE__ */ t(r, { sx: ie.dividerContainer, children: /* @__PURE__ */ t(
|
|
2949
2985
|
r,
|
|
2950
2986
|
{
|
|
2951
2987
|
sx: {
|
|
2952
2988
|
borderRadius: "50%",
|
|
2953
|
-
bgcolor:
|
|
2989
|
+
bgcolor: de,
|
|
2954
2990
|
boxShadow: "sm",
|
|
2955
2991
|
width: "32px",
|
|
2956
2992
|
height: "32px",
|
|
2957
2993
|
minWidth: "32px",
|
|
2958
2994
|
border: "1px solid",
|
|
2959
|
-
borderColor:
|
|
2995
|
+
borderColor: Y,
|
|
2960
2996
|
display: "flex",
|
|
2961
2997
|
alignItems: "center",
|
|
2962
2998
|
justifyContent: "center"
|
|
2963
2999
|
},
|
|
2964
|
-
children: /* @__PURE__ */ t(
|
|
3000
|
+
children: /* @__PURE__ */ t(Gt, { sx: { fontSize: "1.1em", color: Y } })
|
|
2965
3001
|
}
|
|
2966
|
-
) }),
|
|
2967
|
-
var
|
|
2968
|
-
return
|
|
2969
|
-
/* @__PURE__ */ t(r, { sx:
|
|
2970
|
-
|
|
3002
|
+
) }), Xe = () => {
|
|
3003
|
+
var re;
|
|
3004
|
+
return l ? /* @__PURE__ */ h(r, { sx: ie.mainContentSection, children: [
|
|
3005
|
+
/* @__PURE__ */ t(r, { sx: ie.timerContainer, children: /* @__PURE__ */ t(
|
|
3006
|
+
Yt,
|
|
2971
3007
|
{
|
|
2972
|
-
time:
|
|
3008
|
+
time: g,
|
|
2973
3009
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2974
3010
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null
|
|
2975
3011
|
},
|
|
2976
|
-
`timer-${
|
|
3012
|
+
`timer-${l.pairId}`
|
|
2977
3013
|
) }),
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
/* @__PURE__ */
|
|
2980
|
-
/* @__PURE__ */ t(r, { sx:
|
|
2981
|
-
|
|
3014
|
+
/* @__PURE__ */ h(r, { sx: ie.contentContainerWithBackdrop, children: [
|
|
3015
|
+
/* @__PURE__ */ h(r, { sx: ie.optionsContainer, children: [
|
|
3016
|
+
/* @__PURE__ */ t(r, { sx: ie.optionWrapper, children: /* @__PURE__ */ t(
|
|
3017
|
+
ot,
|
|
2982
3018
|
{
|
|
2983
|
-
option:
|
|
2984
|
-
selected:
|
|
2985
|
-
feedback:
|
|
2986
|
-
onSelect:
|
|
2987
|
-
pairId:
|
|
3019
|
+
option: l.optionOne,
|
|
3020
|
+
selected: o,
|
|
3021
|
+
feedback: m,
|
|
3022
|
+
onSelect: w,
|
|
3023
|
+
pairId: l.pairId,
|
|
2988
3024
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
2989
3025
|
optionIndex: 0
|
|
2990
3026
|
}
|
|
2991
3027
|
) }),
|
|
2992
|
-
|
|
2993
|
-
/* @__PURE__ */ t(r, { sx:
|
|
2994
|
-
|
|
3028
|
+
Ke(),
|
|
3029
|
+
/* @__PURE__ */ t(r, { sx: ie.optionWrapper, children: /* @__PURE__ */ t(
|
|
3030
|
+
ot,
|
|
2995
3031
|
{
|
|
2996
|
-
option:
|
|
2997
|
-
selected:
|
|
2998
|
-
feedback:
|
|
2999
|
-
onSelect:
|
|
3000
|
-
pairId:
|
|
3032
|
+
option: l.optionTwo,
|
|
3033
|
+
selected: o,
|
|
3034
|
+
feedback: m,
|
|
3035
|
+
onSelect: w,
|
|
3036
|
+
pairId: l.pairId,
|
|
3001
3037
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
3002
3038
|
optionIndex: 1
|
|
3003
3039
|
}
|
|
3004
3040
|
) })
|
|
3005
3041
|
] }),
|
|
3006
|
-
/* @__PURE__ */
|
|
3007
|
-
/* @__PURE__ */ t(r, { sx: { mb:
|
|
3008
|
-
/* @__PURE__ */
|
|
3009
|
-
|
|
3042
|
+
/* @__PURE__ */ h(r, { children: [
|
|
3043
|
+
/* @__PURE__ */ t(r, { sx: { mb: d.xs }, children: qe() }),
|
|
3044
|
+
/* @__PURE__ */ h(
|
|
3045
|
+
je,
|
|
3010
3046
|
{
|
|
3011
3047
|
direction: "row",
|
|
3012
3048
|
justifyContent: "space-between",
|
|
3013
3049
|
alignItems: "center",
|
|
3014
3050
|
children: [
|
|
3015
|
-
/* @__PURE__ */ t(r, { children:
|
|
3016
|
-
/* @__PURE__ */
|
|
3017
|
-
/* @__PURE__ */
|
|
3018
|
-
|
|
3051
|
+
/* @__PURE__ */ t(r, { children: _e() }),
|
|
3052
|
+
/* @__PURE__ */ h(je, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
3053
|
+
/* @__PURE__ */ h(C, { sx: { color: G }, children: [
|
|
3054
|
+
Ye,
|
|
3019
3055
|
":"
|
|
3020
3056
|
] }),
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
|
|
3057
|
+
/* @__PURE__ */ h(
|
|
3058
|
+
C,
|
|
3023
3059
|
{
|
|
3024
3060
|
level: "h4",
|
|
3025
|
-
sx: { position: "relative", color:
|
|
3061
|
+
sx: { position: "relative", color: G },
|
|
3026
3062
|
children: [
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3063
|
+
P,
|
|
3064
|
+
L && /* @__PURE__ */ h(
|
|
3065
|
+
C,
|
|
3030
3066
|
{
|
|
3031
|
-
sx:
|
|
3067
|
+
sx: Nt.pointsAdded,
|
|
3032
3068
|
children: [
|
|
3033
3069
|
"+",
|
|
3034
|
-
|
|
3070
|
+
R
|
|
3035
3071
|
]
|
|
3036
3072
|
},
|
|
3037
|
-
|
|
3073
|
+
O
|
|
3038
3074
|
)
|
|
3039
3075
|
]
|
|
3040
3076
|
}
|
|
@@ -3045,113 +3081,113 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3045
3081
|
)
|
|
3046
3082
|
] })
|
|
3047
3083
|
] }),
|
|
3048
|
-
|
|
3049
|
-
|
|
3084
|
+
ze && /* @__PURE__ */ t(r, { sx: ie.bottomFooterContainer, children: /* @__PURE__ */ t(
|
|
3085
|
+
ue,
|
|
3050
3086
|
{
|
|
3051
|
-
brandingLogo:
|
|
3052
|
-
textColor:
|
|
3053
|
-
label: ((
|
|
3054
|
-
isCentered:
|
|
3087
|
+
brandingLogo: ze,
|
|
3088
|
+
textColor: G,
|
|
3089
|
+
label: ((re = n == null ? void 0 : n.labels) == null ? void 0 : re.sponsor) || null,
|
|
3090
|
+
isCentered: z
|
|
3055
3091
|
}
|
|
3056
3092
|
) })
|
|
3057
3093
|
] }) : null;
|
|
3058
|
-
},
|
|
3094
|
+
}, Ee = {
|
|
3059
3095
|
display: "flex",
|
|
3060
3096
|
flexDirection: "row",
|
|
3061
3097
|
justifyContent: "center",
|
|
3062
3098
|
alignItems: "center",
|
|
3063
|
-
flex:
|
|
3064
|
-
width:
|
|
3065
|
-
borderBottom: "1px solid " +
|
|
3099
|
+
flex: z ? "0 0 auto" : 1,
|
|
3100
|
+
width: z ? "100%" : "auto",
|
|
3101
|
+
borderBottom: "1px solid " + Ae,
|
|
3066
3102
|
opacity: "60%",
|
|
3067
|
-
py:
|
|
3068
|
-
px:
|
|
3069
|
-
gap:
|
|
3103
|
+
py: d.sm,
|
|
3104
|
+
px: d.md,
|
|
3105
|
+
gap: d.xs,
|
|
3070
3106
|
"&:not(.Mui-selected):hover": {
|
|
3071
|
-
bgcolor:
|
|
3107
|
+
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${we}0F`
|
|
3072
3108
|
},
|
|
3073
|
-
[`&.${
|
|
3074
|
-
bgcolor:
|
|
3075
|
-
borderBottom: "3px solid " +
|
|
3109
|
+
[`&.${Wt.selected}`]: {
|
|
3110
|
+
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${we}0F`,
|
|
3111
|
+
borderBottom: "3px solid " + Y,
|
|
3076
3112
|
opacity: "100%",
|
|
3077
3113
|
mb: "-1px"
|
|
3078
3114
|
}
|
|
3079
|
-
},
|
|
3115
|
+
}, M = {
|
|
3080
3116
|
flex: 1,
|
|
3081
3117
|
display: "flex",
|
|
3082
3118
|
flexDirection: "column",
|
|
3083
3119
|
overflow: "auto"
|
|
3084
|
-
},
|
|
3085
|
-
|
|
3120
|
+
}, F = () => b ? /* @__PURE__ */ t(r, { sx: { width: "100%" }, children: /* @__PURE__ */ h(
|
|
3121
|
+
Mt,
|
|
3086
3122
|
{
|
|
3087
|
-
value:
|
|
3088
|
-
onChange: (
|
|
3123
|
+
value: v,
|
|
3124
|
+
onChange: (re, le) => D(le),
|
|
3089
3125
|
sx: {
|
|
3090
|
-
borderRadius:
|
|
3126
|
+
borderRadius: ae,
|
|
3091
3127
|
width: "100%",
|
|
3092
3128
|
backgroundColor: "transparent"
|
|
3093
3129
|
},
|
|
3094
3130
|
children: [
|
|
3095
|
-
/* @__PURE__ */
|
|
3096
|
-
|
|
3131
|
+
/* @__PURE__ */ h(
|
|
3132
|
+
Ht,
|
|
3097
3133
|
{
|
|
3098
3134
|
sx: {
|
|
3099
3135
|
fontSize: "1em",
|
|
3100
3136
|
"--Icon-fontSize": "1.25em",
|
|
3101
|
-
flexDirection:
|
|
3137
|
+
flexDirection: z ? "column" : "row"
|
|
3102
3138
|
},
|
|
3103
3139
|
children: [
|
|
3104
|
-
/* @__PURE__ */ t(
|
|
3140
|
+
/* @__PURE__ */ t(nt, { sx: Ee, disableIndicator: !0, children: /* @__PURE__ */ h(
|
|
3105
3141
|
r,
|
|
3106
3142
|
{
|
|
3107
3143
|
sx: {
|
|
3108
3144
|
display: "flex",
|
|
3109
3145
|
alignItems: "center",
|
|
3110
|
-
gap:
|
|
3146
|
+
gap: d.xs
|
|
3111
3147
|
},
|
|
3112
3148
|
children: [
|
|
3113
|
-
/* @__PURE__ */ t(
|
|
3149
|
+
/* @__PURE__ */ t(De, { sx: { fontSize: "1.25em" } }),
|
|
3114
3150
|
/* @__PURE__ */ t(
|
|
3115
|
-
|
|
3151
|
+
C,
|
|
3116
3152
|
{
|
|
3117
3153
|
sx: {
|
|
3118
|
-
fontFamily:
|
|
3154
|
+
fontFamily: U,
|
|
3119
3155
|
fontSize: "1em",
|
|
3120
3156
|
fontWeight: 500,
|
|
3121
3157
|
lineHeight: "24px",
|
|
3122
3158
|
letterSpacing: "0.4px",
|
|
3123
3159
|
textTransform: "uppercase",
|
|
3124
|
-
color:
|
|
3160
|
+
color: G
|
|
3125
3161
|
},
|
|
3126
|
-
children:
|
|
3162
|
+
children: S("eitherOr.tabs.score", "Score")
|
|
3127
3163
|
}
|
|
3128
3164
|
)
|
|
3129
3165
|
]
|
|
3130
3166
|
}
|
|
3131
3167
|
) }),
|
|
3132
|
-
/* @__PURE__ */ t(
|
|
3168
|
+
/* @__PURE__ */ t(nt, { sx: Ee, disableIndicator: !0, children: /* @__PURE__ */ h(
|
|
3133
3169
|
r,
|
|
3134
3170
|
{
|
|
3135
3171
|
sx: {
|
|
3136
3172
|
display: "flex",
|
|
3137
3173
|
alignItems: "center",
|
|
3138
|
-
gap:
|
|
3174
|
+
gap: d.xs
|
|
3139
3175
|
},
|
|
3140
3176
|
children: [
|
|
3141
|
-
/* @__PURE__ */ t(
|
|
3177
|
+
/* @__PURE__ */ t(jt, { sx: { fontSize: "1.25em" } }),
|
|
3142
3178
|
/* @__PURE__ */ t(
|
|
3143
|
-
|
|
3179
|
+
C,
|
|
3144
3180
|
{
|
|
3145
3181
|
sx: {
|
|
3146
|
-
fontFamily:
|
|
3182
|
+
fontFamily: U,
|
|
3147
3183
|
fontSize: "1em",
|
|
3148
3184
|
fontWeight: 500,
|
|
3149
3185
|
lineHeight: "24px",
|
|
3150
3186
|
letterSpacing: "0.4px",
|
|
3151
3187
|
textTransform: "uppercase",
|
|
3152
|
-
color:
|
|
3188
|
+
color: G
|
|
3153
3189
|
},
|
|
3154
|
-
children:
|
|
3190
|
+
children: S("eitherOr.tabs.standings", "Standings")
|
|
3155
3191
|
}
|
|
3156
3192
|
)
|
|
3157
3193
|
]
|
|
@@ -3160,35 +3196,35 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3160
3196
|
]
|
|
3161
3197
|
}
|
|
3162
3198
|
),
|
|
3163
|
-
|
|
3164
|
-
|
|
3199
|
+
v === 0 && /* @__PURE__ */ t(
|
|
3200
|
+
rt,
|
|
3165
3201
|
{
|
|
3166
3202
|
value: 0,
|
|
3167
3203
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3168
|
-
children: /* @__PURE__ */ t(r, { sx:
|
|
3169
|
-
|
|
3204
|
+
children: /* @__PURE__ */ t(r, { sx: M, children: /* @__PURE__ */ t(
|
|
3205
|
+
ut,
|
|
3170
3206
|
{
|
|
3171
|
-
stepInfo:
|
|
3207
|
+
stepInfo: i,
|
|
3172
3208
|
game: n,
|
|
3173
|
-
sdk:
|
|
3174
|
-
onPlayAgain:
|
|
3209
|
+
sdk: c,
|
|
3210
|
+
onPlayAgain: I,
|
|
3175
3211
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
3176
|
-
additionalCTA:
|
|
3212
|
+
additionalCTA: p
|
|
3177
3213
|
}
|
|
3178
3214
|
) })
|
|
3179
3215
|
}
|
|
3180
3216
|
),
|
|
3181
|
-
|
|
3182
|
-
|
|
3217
|
+
v === 1 && /* @__PURE__ */ t(
|
|
3218
|
+
rt,
|
|
3183
3219
|
{
|
|
3184
3220
|
value: 1,
|
|
3185
3221
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3186
|
-
children: /* @__PURE__ */ t(r, { sx:
|
|
3187
|
-
|
|
3222
|
+
children: /* @__PURE__ */ t(r, { sx: M, children: /* @__PURE__ */ t(
|
|
3223
|
+
_t,
|
|
3188
3224
|
{
|
|
3189
3225
|
game: n,
|
|
3190
|
-
sdk:
|
|
3191
|
-
stepInfo:
|
|
3226
|
+
sdk: c,
|
|
3227
|
+
stepInfo: i,
|
|
3192
3228
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null
|
|
3193
3229
|
}
|
|
3194
3230
|
) })
|
|
@@ -3197,60 +3233,60 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3197
3233
|
]
|
|
3198
3234
|
}
|
|
3199
3235
|
) }) : /* @__PURE__ */ t(
|
|
3200
|
-
|
|
3236
|
+
ut,
|
|
3201
3237
|
{
|
|
3202
|
-
stepInfo:
|
|
3238
|
+
stepInfo: i,
|
|
3203
3239
|
game: n,
|
|
3204
|
-
sdk:
|
|
3205
|
-
onPlayAgain:
|
|
3240
|
+
sdk: c,
|
|
3241
|
+
onPlayAgain: I,
|
|
3206
3242
|
brandingPrimaryColor: (T == null ? void 0 : T.primaryColor) || null,
|
|
3207
|
-
additionalCTA:
|
|
3243
|
+
additionalCTA: p
|
|
3208
3244
|
}
|
|
3209
|
-
),
|
|
3210
|
-
var
|
|
3211
|
-
switch (
|
|
3212
|
-
case
|
|
3213
|
-
return /* @__PURE__ */ t(
|
|
3214
|
-
case
|
|
3215
|
-
const
|
|
3245
|
+
), te = () => {
|
|
3246
|
+
var re, le, ge;
|
|
3247
|
+
switch (s) {
|
|
3248
|
+
case _.LOADING:
|
|
3249
|
+
return /* @__PURE__ */ t(lt, { my: 20 });
|
|
3250
|
+
case _.TUTORIAL: {
|
|
3251
|
+
const He = [
|
|
3216
3252
|
{
|
|
3217
|
-
icon: /* @__PURE__ */ t(
|
|
3218
|
-
title:
|
|
3219
|
-
description:
|
|
3253
|
+
icon: /* @__PURE__ */ t(Vt, { sx: { fontSize: "1.1em" } }),
|
|
3254
|
+
title: S("eitherOr.tutorial.step1Title"),
|
|
3255
|
+
description: S("eitherOr.tutorial.step1Description", {
|
|
3220
3256
|
seconds: (n == null ? void 0 : n.time) ?? 10
|
|
3221
3257
|
})
|
|
3222
3258
|
},
|
|
3223
3259
|
{
|
|
3224
|
-
icon: /* @__PURE__ */ t(
|
|
3225
|
-
title:
|
|
3260
|
+
icon: /* @__PURE__ */ t(tt, { sx: { fontSize: "1.1em" } }),
|
|
3261
|
+
title: S("eitherOr.tutorial.step2Title", {
|
|
3226
3262
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
3227
3263
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
3228
3264
|
}),
|
|
3229
|
-
description:
|
|
3265
|
+
description: S("eitherOr.tutorial.step2Description", {
|
|
3230
3266
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
3231
3267
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
3232
3268
|
})
|
|
3233
3269
|
},
|
|
3234
3270
|
{
|
|
3235
|
-
icon: /* @__PURE__ */ t(
|
|
3236
|
-
title:
|
|
3237
|
-
description:
|
|
3271
|
+
icon: /* @__PURE__ */ t(De, { sx: { fontSize: "1.1em" } }),
|
|
3272
|
+
title: S("eitherOr.tutorial.step3Title"),
|
|
3273
|
+
description: S("eitherOr.tutorial.step3Description")
|
|
3238
3274
|
}
|
|
3239
|
-
],
|
|
3240
|
-
return /* @__PURE__ */
|
|
3275
|
+
], Rt = Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.12)` : `${Y}20`;
|
|
3276
|
+
return /* @__PURE__ */ h(
|
|
3241
3277
|
r,
|
|
3242
3278
|
{
|
|
3243
3279
|
sx: {
|
|
3244
3280
|
display: "flex",
|
|
3245
3281
|
flexDirection: "column",
|
|
3246
|
-
gap:
|
|
3282
|
+
gap: d.md
|
|
3247
3283
|
},
|
|
3248
3284
|
children: [
|
|
3249
3285
|
/* @__PURE__ */ t(
|
|
3250
3286
|
r,
|
|
3251
3287
|
{
|
|
3252
3288
|
sx: {
|
|
3253
|
-
borderRadius:
|
|
3289
|
+
borderRadius: me,
|
|
3254
3290
|
overflow: "hidden",
|
|
3255
3291
|
display: "flex",
|
|
3256
3292
|
flexDirection: "column",
|
|
@@ -3263,25 +3299,25 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3263
3299
|
left: 0,
|
|
3264
3300
|
right: 0,
|
|
3265
3301
|
bottom: 0,
|
|
3266
|
-
backgroundColor:
|
|
3302
|
+
backgroundColor: se,
|
|
3267
3303
|
opacity: 0.5,
|
|
3268
3304
|
borderRadius: "inherit",
|
|
3269
3305
|
zIndex: 0
|
|
3270
3306
|
},
|
|
3271
3307
|
"& > *": { position: "relative", zIndex: 1 }
|
|
3272
3308
|
},
|
|
3273
|
-
children:
|
|
3274
|
-
const
|
|
3275
|
-
return /* @__PURE__ */
|
|
3276
|
-
/* @__PURE__ */
|
|
3309
|
+
children: He.map((Oe, zt) => {
|
|
3310
|
+
const Kt = zt === He.length - 1;
|
|
3311
|
+
return /* @__PURE__ */ h(r, { children: [
|
|
3312
|
+
/* @__PURE__ */ h(
|
|
3277
3313
|
r,
|
|
3278
3314
|
{
|
|
3279
3315
|
sx: {
|
|
3280
3316
|
display: "flex",
|
|
3281
3317
|
alignItems: "flex-start",
|
|
3282
|
-
gap:
|
|
3283
|
-
px:
|
|
3284
|
-
py:
|
|
3318
|
+
gap: d.md,
|
|
3319
|
+
px: d.md,
|
|
3320
|
+
py: d.md
|
|
3285
3321
|
},
|
|
3286
3322
|
children: [
|
|
3287
3323
|
/* @__PURE__ */ t(
|
|
@@ -3291,88 +3327,114 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3291
3327
|
width: 36,
|
|
3292
3328
|
height: 36,
|
|
3293
3329
|
borderRadius: "50%",
|
|
3294
|
-
bgcolor:
|
|
3295
|
-
color:
|
|
3330
|
+
bgcolor: Rt,
|
|
3331
|
+
color: Y,
|
|
3296
3332
|
display: "flex",
|
|
3297
3333
|
alignItems: "center",
|
|
3298
3334
|
justifyContent: "center",
|
|
3299
3335
|
flexShrink: 0
|
|
3300
3336
|
},
|
|
3301
|
-
children:
|
|
3337
|
+
children: Oe.icon
|
|
3302
3338
|
}
|
|
3303
3339
|
),
|
|
3304
|
-
/* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ h(r, { sx: { flex: 1, minWidth: 0, pt: "2px" }, children: [
|
|
3305
3341
|
/* @__PURE__ */ t(
|
|
3306
|
-
|
|
3342
|
+
C,
|
|
3307
3343
|
{
|
|
3308
3344
|
sx: {
|
|
3309
|
-
fontFamily:
|
|
3345
|
+
fontFamily: U,
|
|
3310
3346
|
fontWeight: 700,
|
|
3311
3347
|
fontSize: "0.875em",
|
|
3312
3348
|
lineHeight: 1.3,
|
|
3313
|
-
color:
|
|
3349
|
+
color: G
|
|
3314
3350
|
},
|
|
3315
|
-
children:
|
|
3351
|
+
children: Oe.title
|
|
3316
3352
|
}
|
|
3317
3353
|
),
|
|
3318
3354
|
/* @__PURE__ */ t(
|
|
3319
|
-
|
|
3355
|
+
C,
|
|
3320
3356
|
{
|
|
3321
3357
|
sx: {
|
|
3322
|
-
fontFamily:
|
|
3358
|
+
fontFamily: U,
|
|
3323
3359
|
fontWeight: 400,
|
|
3324
3360
|
fontSize: "0.75em",
|
|
3325
3361
|
lineHeight: 1.6,
|
|
3326
|
-
color:
|
|
3362
|
+
color: G,
|
|
3327
3363
|
opacity: 0.65,
|
|
3328
|
-
mt:
|
|
3364
|
+
mt: d["2xs"]
|
|
3329
3365
|
},
|
|
3330
|
-
children:
|
|
3366
|
+
children: Oe.description
|
|
3331
3367
|
}
|
|
3332
3368
|
)
|
|
3333
3369
|
] })
|
|
3334
3370
|
]
|
|
3335
3371
|
}
|
|
3336
3372
|
),
|
|
3337
|
-
!
|
|
3373
|
+
!Kt && /* @__PURE__ */ t(
|
|
3338
3374
|
r,
|
|
3339
3375
|
{
|
|
3340
3376
|
sx: {
|
|
3341
3377
|
height: "1px",
|
|
3342
|
-
mx:
|
|
3343
|
-
bgcolor:
|
|
3378
|
+
mx: d.md,
|
|
3379
|
+
bgcolor: Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.1)` : `${Y}1A`
|
|
3344
3380
|
}
|
|
3345
3381
|
}
|
|
3346
3382
|
)
|
|
3347
|
-
] },
|
|
3383
|
+
] }, zt);
|
|
3348
3384
|
})
|
|
3349
3385
|
}
|
|
3350
3386
|
),
|
|
3351
|
-
/* @__PURE__ */
|
|
3387
|
+
x != null && x.items.length ? /* @__PURE__ */ t(r, { sx: ie.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
|
|
3388
|
+
at,
|
|
3389
|
+
{
|
|
3390
|
+
consents: x,
|
|
3391
|
+
primaryColor: Y,
|
|
3392
|
+
textColor: G,
|
|
3393
|
+
brandingUrls: (re = n == null ? void 0 : n.branding) == null ? void 0 : re.urls
|
|
3394
|
+
}
|
|
3395
|
+
) }) : null,
|
|
3396
|
+
/* @__PURE__ */ h(
|
|
3352
3397
|
r,
|
|
3353
3398
|
{
|
|
3354
3399
|
sx: {
|
|
3355
|
-
...
|
|
3356
|
-
justifyContent:
|
|
3400
|
+
...ie.filterScreenContainer,
|
|
3401
|
+
justifyContent: ze ? "space-between" : "flex-end"
|
|
3357
3402
|
},
|
|
3358
3403
|
children: [
|
|
3359
3404
|
/* @__PURE__ */ t(
|
|
3360
|
-
|
|
3405
|
+
ue,
|
|
3361
3406
|
{
|
|
3362
|
-
brandingLogo:
|
|
3363
|
-
textColor:
|
|
3364
|
-
label: ((
|
|
3365
|
-
isCentered:
|
|
3407
|
+
brandingLogo: ze,
|
|
3408
|
+
textColor: G,
|
|
3409
|
+
label: ((le = n == null ? void 0 : n.labels) == null ? void 0 : le.sponsor) || null,
|
|
3410
|
+
isCentered: z
|
|
3366
3411
|
}
|
|
3367
3412
|
),
|
|
3368
3413
|
/* @__PURE__ */ t(
|
|
3369
|
-
|
|
3414
|
+
ye,
|
|
3370
3415
|
{
|
|
3371
3416
|
variant: "soft",
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3417
|
+
loading: A,
|
|
3418
|
+
sx: {
|
|
3419
|
+
...ie.startButton,
|
|
3420
|
+
...ie.pulseAnimation,
|
|
3421
|
+
...A ? Et(
|
|
3422
|
+
Y,
|
|
3423
|
+
he
|
|
3424
|
+
) : {}
|
|
3425
|
+
},
|
|
3426
|
+
endDecorator: /* @__PURE__ */ t(xt, { children: /* @__PURE__ */ t(gt, {}) }),
|
|
3427
|
+
onClick: E,
|
|
3428
|
+
children: /* @__PURE__ */ t(
|
|
3429
|
+
C,
|
|
3430
|
+
{
|
|
3431
|
+
sx: {
|
|
3432
|
+
...ie.startButtonText,
|
|
3433
|
+
...A ? { color: "transparent" } : {}
|
|
3434
|
+
},
|
|
3435
|
+
children: ((ge = x == null ? void 0 : x.labels) == null ? void 0 : ge.ctaLabel) || S("eitherOr.buttons.start")
|
|
3436
|
+
}
|
|
3437
|
+
)
|
|
3376
3438
|
}
|
|
3377
3439
|
)
|
|
3378
3440
|
]
|
|
@@ -3382,32 +3444,32 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3382
3444
|
}
|
|
3383
3445
|
);
|
|
3384
3446
|
}
|
|
3385
|
-
case
|
|
3386
|
-
return
|
|
3447
|
+
case _.PLAYING:
|
|
3448
|
+
return Xe();
|
|
3387
3449
|
default:
|
|
3388
3450
|
return null;
|
|
3389
3451
|
}
|
|
3390
3452
|
};
|
|
3391
|
-
return
|
|
3392
|
-
|
|
3453
|
+
return s === _.RESULTS ? /* @__PURE__ */ t(
|
|
3454
|
+
Cn,
|
|
3393
3455
|
{
|
|
3394
3456
|
entity: n,
|
|
3395
|
-
backgroundImage:
|
|
3396
|
-
imageBackgroundGradient:
|
|
3457
|
+
backgroundImage: ee,
|
|
3458
|
+
imageBackgroundGradient: J,
|
|
3397
3459
|
isWrappedWithScoreStateWrapper: !0,
|
|
3398
|
-
children:
|
|
3460
|
+
children: F()
|
|
3399
3461
|
}
|
|
3400
3462
|
) : /* @__PURE__ */ t(
|
|
3401
|
-
|
|
3463
|
+
dn,
|
|
3402
3464
|
{
|
|
3403
3465
|
entity: n,
|
|
3404
|
-
headline:
|
|
3405
|
-
finalImage:
|
|
3406
|
-
rulesDisplay:
|
|
3407
|
-
children:
|
|
3466
|
+
headline: S("eitherOr.headline"),
|
|
3467
|
+
finalImage: Z,
|
|
3468
|
+
rulesDisplay: f,
|
|
3469
|
+
children: te()
|
|
3408
3470
|
}
|
|
3409
3471
|
);
|
|
3410
|
-
},
|
|
3472
|
+
}, Hn = (e) => ({
|
|
3411
3473
|
// Pulse animation for buttons
|
|
3412
3474
|
pulseAnimation: {
|
|
3413
3475
|
"@keyframes pulse": {
|
|
@@ -3445,109 +3507,109 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3445
3507
|
display: "flex",
|
|
3446
3508
|
alignItems: "center"
|
|
3447
3509
|
}
|
|
3448
|
-
}),
|
|
3449
|
-
var
|
|
3450
|
-
const n =
|
|
3451
|
-
|
|
3452
|
-
),
|
|
3453
|
-
{ images: e.eitherOr.images, imagePlaceholder:
|
|
3454
|
-
|
|
3455
|
-
), { brandingImage:
|
|
3456
|
-
buttonRadius:
|
|
3457
|
-
primaryColor:
|
|
3458
|
-
onPrimaryColor:
|
|
3459
|
-
fontFamilyPrimary:
|
|
3460
|
-
}),
|
|
3461
|
-
var
|
|
3462
|
-
return e.signInCTA ? (
|
|
3463
|
-
|
|
3510
|
+
}), Gn = (e) => {
|
|
3511
|
+
var y, d, z, S, v, D, P, $, L, N, R;
|
|
3512
|
+
const n = Ne(), { t: l } = Q(), i = Se(), s = Lt(
|
|
3513
|
+
Pe.OVERLAY
|
|
3514
|
+
), g = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : i ? ht : ft, o = st(
|
|
3515
|
+
{ images: e.eitherOr.images, imagePlaceholder: g },
|
|
3516
|
+
Pe.OVERLAY
|
|
3517
|
+
), { brandingImage: m, brandingColors: c, brandingLogo: u } = it(e.eitherOr.branding || null), b = Ot(m || o), p = (d = (y = n.customRadius) == null ? void 0 : y.light) == null ? void 0 : d.xl, x = (c == null ? void 0 : c.primaryColor) || ((D = (v = (S = (z = n.colorSchemes) == null ? void 0 : z.light) == null ? void 0 : S.palette) == null ? void 0 : v.primary) == null ? void 0 : D.plainColor), A = (N = (L = ($ = (P = n.colorSchemes) == null ? void 0 : P.light) == null ? void 0 : $.palette) == null ? void 0 : L.primary) == null ? void 0 : N.onPrimary, E = n.customFontFamily.dark.primary, w = Hn({
|
|
3518
|
+
buttonRadius: p,
|
|
3519
|
+
primaryColor: x,
|
|
3520
|
+
onPrimaryColor: A,
|
|
3521
|
+
fontFamilyPrimary: E
|
|
3522
|
+
}), I = () => {
|
|
3523
|
+
var k, O, H, j;
|
|
3524
|
+
return e.signInCTA ? (k = e.signInCTA) != null && k.component ? e.signInCTA.component : (O = e.signInCTA) != null && O.onClick ? /* @__PURE__ */ t(
|
|
3525
|
+
ye,
|
|
3464
3526
|
{
|
|
3465
3527
|
variant: "soft",
|
|
3466
|
-
sx: { ...
|
|
3528
|
+
sx: { ...w.signInButton, ...w.pulseAnimation },
|
|
3467
3529
|
onClick: e.signInCTA.onClick,
|
|
3468
|
-
children: /* @__PURE__ */ t(
|
|
3530
|
+
children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") })
|
|
3469
3531
|
}
|
|
3470
|
-
) : (
|
|
3532
|
+
) : (H = e.signInCTA) != null && H.url ? typeof window > "u" ? /* @__PURE__ */ t(
|
|
3471
3533
|
r,
|
|
3472
3534
|
{
|
|
3473
3535
|
component: "a",
|
|
3474
3536
|
href: e.signInCTA.url,
|
|
3475
|
-
target: ((
|
|
3537
|
+
target: ((j = e.signInCTA) == null ? void 0 : j.target) || "_self",
|
|
3476
3538
|
sx: {
|
|
3477
|
-
...
|
|
3478
|
-
...
|
|
3539
|
+
...w.signInButton,
|
|
3540
|
+
...w.pulseAnimation,
|
|
3479
3541
|
textDecoration: "none",
|
|
3480
3542
|
display: "inline-flex",
|
|
3481
3543
|
alignItems: "center",
|
|
3482
3544
|
justifyContent: "center"
|
|
3483
3545
|
},
|
|
3484
|
-
children: /* @__PURE__ */ t(
|
|
3546
|
+
children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") })
|
|
3485
3547
|
}
|
|
3486
3548
|
) : /* @__PURE__ */ t(
|
|
3487
|
-
|
|
3549
|
+
ye,
|
|
3488
3550
|
{
|
|
3489
3551
|
variant: "soft",
|
|
3490
|
-
sx: { ...
|
|
3552
|
+
sx: { ...w.signInButton, ...w.pulseAnimation },
|
|
3491
3553
|
onClick: () => {
|
|
3492
|
-
var
|
|
3493
|
-
((
|
|
3554
|
+
var V, a, W;
|
|
3555
|
+
((V = e.signInCTA) == null ? void 0 : V.target) === "_blank" ? window.open((a = e.signInCTA) == null ? void 0 : a.url, "_blank") : window.location.href = (W = e.signInCTA) == null ? void 0 : W.url;
|
|
3494
3556
|
},
|
|
3495
|
-
children: /* @__PURE__ */ t(
|
|
3557
|
+
children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") })
|
|
3496
3558
|
}
|
|
3497
|
-
) : /* @__PURE__ */ t(
|
|
3559
|
+
) : /* @__PURE__ */ t(ye, { variant: "soft", sx: w.signInButton, disabled: !0, children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") }) }) : /* @__PURE__ */ t(ye, { variant: "soft", sx: w.signInButton, disabled: !0, children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: l("common.signIn") }) });
|
|
3498
3560
|
};
|
|
3499
3561
|
return /* @__PURE__ */ t(
|
|
3500
|
-
|
|
3562
|
+
pn,
|
|
3501
3563
|
{
|
|
3502
3564
|
entity: e.eitherOr,
|
|
3503
|
-
headline:
|
|
3565
|
+
headline: l("eitherOr.headline"),
|
|
3504
3566
|
backgroundImage: b,
|
|
3505
|
-
imageBackgroundGradient:
|
|
3506
|
-
signInContent:
|
|
3567
|
+
imageBackgroundGradient: s,
|
|
3568
|
+
signInContent: I(),
|
|
3507
3569
|
brandingContent: /* @__PURE__ */ t(
|
|
3508
|
-
|
|
3570
|
+
ue,
|
|
3509
3571
|
{
|
|
3510
|
-
brandingLogo:
|
|
3572
|
+
brandingLogo: u,
|
|
3511
3573
|
textColor: n.colorSchemes.dark.textColor,
|
|
3512
|
-
label: ((
|
|
3574
|
+
label: ((R = e.eitherOr.labels) == null ? void 0 : R.sponsor) || null
|
|
3513
3575
|
}
|
|
3514
3576
|
),
|
|
3515
3577
|
rulesDisplay: e.rulesDisplay
|
|
3516
3578
|
}
|
|
3517
3579
|
);
|
|
3518
|
-
},
|
|
3519
|
-
const { t: n } =
|
|
3580
|
+
}, jn = (e) => {
|
|
3581
|
+
const { t: n } = Q(), l = Se(), i = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ? ht : ft, { brandingLogo: s } = it(
|
|
3520
3582
|
e.eitherOr.branding || null
|
|
3521
3583
|
);
|
|
3522
3584
|
return /* @__PURE__ */ t(
|
|
3523
|
-
|
|
3585
|
+
on,
|
|
3524
3586
|
{
|
|
3525
3587
|
entity: e.eitherOr,
|
|
3526
3588
|
headline: n("eitherOr.headline"),
|
|
3527
3589
|
tryAgainButtonText: n("eitherOr.buttons.tryAgain"),
|
|
3528
|
-
defaultImagePlaceholderUrl:
|
|
3590
|
+
defaultImagePlaceholderUrl: i,
|
|
3529
3591
|
isApiError: e.isApiError,
|
|
3530
3592
|
apiErrorMessage: e.apiErrorMessage,
|
|
3531
3593
|
toggleTryAgain: e.toggleTryAgain,
|
|
3532
|
-
renderPresentedBy: (
|
|
3533
|
-
var
|
|
3594
|
+
renderPresentedBy: (g) => {
|
|
3595
|
+
var o;
|
|
3534
3596
|
return /* @__PURE__ */ t(
|
|
3535
|
-
|
|
3597
|
+
ue,
|
|
3536
3598
|
{
|
|
3537
|
-
brandingLogo:
|
|
3538
|
-
textColor:
|
|
3539
|
-
label: ((
|
|
3540
|
-
isCentered:
|
|
3599
|
+
brandingLogo: s,
|
|
3600
|
+
textColor: g,
|
|
3601
|
+
label: ((o = e.eitherOr.labels) == null ? void 0 : o.sponsor) || null,
|
|
3602
|
+
isCentered: l
|
|
3541
3603
|
}
|
|
3542
3604
|
);
|
|
3543
3605
|
},
|
|
3544
3606
|
rulesDisplay: e.rulesDisplay
|
|
3545
3607
|
}
|
|
3546
3608
|
);
|
|
3547
|
-
},
|
|
3548
|
-
const { t: n } =
|
|
3609
|
+
}, Vn = (e) => {
|
|
3610
|
+
const { t: n } = Q();
|
|
3549
3611
|
return /* @__PURE__ */ t(
|
|
3550
|
-
|
|
3612
|
+
$t,
|
|
3551
3613
|
{
|
|
3552
3614
|
entity: e.eitherOr,
|
|
3553
3615
|
headline: n("eitherOr.headline"),
|
|
@@ -3556,250 +3618,377 @@ const Ye = Pe(/* @__PURE__ */ t("path", {
|
|
|
3556
3618
|
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
3557
3619
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
3558
3620
|
isSubmitting: e.isSubmitting,
|
|
3559
|
-
PresentedBy:
|
|
3560
|
-
CollectLeadWrapper:
|
|
3621
|
+
PresentedBy: ue,
|
|
3622
|
+
CollectLeadWrapper: qt,
|
|
3623
|
+
consents: e.consents,
|
|
3561
3624
|
rulesDisplay: e.rulesDisplay
|
|
3562
3625
|
}
|
|
3563
3626
|
);
|
|
3627
|
+
}, Nn = (e) => {
|
|
3628
|
+
var s, g, o;
|
|
3629
|
+
const { t: n } = Q(), l = ((s = e.eitherOr.branding) == null ? void 0 : s.colors) || null, i = (l == null ? void 0 : l.primaryColor) || q().palette.primary.plainColor;
|
|
3630
|
+
return /* @__PURE__ */ t(
|
|
3631
|
+
Dt,
|
|
3632
|
+
{
|
|
3633
|
+
entity: e.eitherOr,
|
|
3634
|
+
headline: n("eitherOr.headline"),
|
|
3635
|
+
sdk: e.sdk,
|
|
3636
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3637
|
+
imagePosition: e.imagePosition,
|
|
3638
|
+
onLeadSubmitted: e.onSubmit,
|
|
3639
|
+
isSubmitting: e.isSubmitting,
|
|
3640
|
+
MainCard: ke,
|
|
3641
|
+
PresentedBy: ue,
|
|
3642
|
+
rulesDisplay: e.rulesDisplay,
|
|
3643
|
+
content: /* @__PURE__ */ t(
|
|
3644
|
+
at,
|
|
3645
|
+
{
|
|
3646
|
+
consents: e.consents,
|
|
3647
|
+
primaryColor: i,
|
|
3648
|
+
brandingUrls: (g = e.eitherOr.branding) == null ? void 0 : g.urls,
|
|
3649
|
+
align: "center"
|
|
3650
|
+
}
|
|
3651
|
+
),
|
|
3652
|
+
footerAction: /* @__PURE__ */ t(
|
|
3653
|
+
Ft,
|
|
3654
|
+
{
|
|
3655
|
+
onClick: e.onSubmit,
|
|
3656
|
+
label: ((o = e.consents.labels) == null ? void 0 : o.ctaLabel) || n("eitherOr.buttons.finish"),
|
|
3657
|
+
isSubmitting: e.isSubmitting,
|
|
3658
|
+
primaryColor: i
|
|
3659
|
+
}
|
|
3660
|
+
)
|
|
3661
|
+
}
|
|
3662
|
+
);
|
|
3663
|
+
}, Yn = (e) => {
|
|
3664
|
+
var g, o, m;
|
|
3665
|
+
const { t: n } = Q(), l = Ne(), i = ((g = e.eitherOr.branding) == null ? void 0 : g.colors) || null, s = (i == null ? void 0 : i.primaryColor) || l.colorSchemes.dark.palette.primary.plainColor;
|
|
3666
|
+
return /* @__PURE__ */ t(
|
|
3667
|
+
$t,
|
|
3668
|
+
{
|
|
3669
|
+
entity: e.eitherOr,
|
|
3670
|
+
headline: n("eitherOr.headline"),
|
|
3671
|
+
sdk: e.sdk,
|
|
3672
|
+
defaultImagePlaceholder: e.defaultImagePlaceholderUrl,
|
|
3673
|
+
onLeadSubmitted: e.onSubmit,
|
|
3674
|
+
isSubmitting: e.isSubmitting,
|
|
3675
|
+
PresentedBy: ue,
|
|
3676
|
+
rulesDisplay: e.rulesDisplay,
|
|
3677
|
+
content: /* @__PURE__ */ t(
|
|
3678
|
+
at,
|
|
3679
|
+
{
|
|
3680
|
+
consents: e.consents,
|
|
3681
|
+
primaryColor: s,
|
|
3682
|
+
textColor: (i == null ? void 0 : i.contentColor) || l.colorSchemes.dark.textColor,
|
|
3683
|
+
brandingUrls: (o = e.eitherOr.branding) == null ? void 0 : o.urls
|
|
3684
|
+
}
|
|
3685
|
+
),
|
|
3686
|
+
footerAction: /* @__PURE__ */ t(
|
|
3687
|
+
Ft,
|
|
3688
|
+
{
|
|
3689
|
+
onClick: e.onSubmit,
|
|
3690
|
+
label: ((m = e.consents.labels) == null ? void 0 : m.ctaLabel) || n("eitherOr.buttons.finish"),
|
|
3691
|
+
isSubmitting: e.isSubmitting,
|
|
3692
|
+
primaryColor: s
|
|
3693
|
+
}
|
|
3694
|
+
)
|
|
3695
|
+
}
|
|
3696
|
+
);
|
|
3564
3697
|
};
|
|
3565
|
-
function
|
|
3566
|
-
return e.template ===
|
|
3698
|
+
function Be(e) {
|
|
3699
|
+
return e.template === Pe.STANDARD;
|
|
3567
3700
|
}
|
|
3568
|
-
function
|
|
3569
|
-
return e.template ===
|
|
3701
|
+
function Qe(e) {
|
|
3702
|
+
return e.template === Pe.OVERLAY;
|
|
3570
3703
|
}
|
|
3571
|
-
const
|
|
3572
|
-
var
|
|
3573
|
-
const [n,
|
|
3574
|
-
|
|
3575
|
-
), [
|
|
3704
|
+
const _n = (e) => {
|
|
3705
|
+
var ze, Ye, _e, qe, Ke, Xe, Ee;
|
|
3706
|
+
const [n, l] = B(
|
|
3707
|
+
_.LOADING
|
|
3708
|
+
), [i, s] = B(null), [g, o] = B(null), [m, c] = B(10), [u, f] = B(null), [b, p] = B({
|
|
3576
3709
|
isCorrect: null,
|
|
3577
3710
|
selectedOption: null
|
|
3578
|
-
}), [
|
|
3579
|
-
setIsUnauthorized:
|
|
3580
|
-
setIsApiError:
|
|
3581
|
-
} =
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
}
|
|
3588
|
-
|
|
3589
|
-
|
|
3711
|
+
}), [x, A] = B(!1), [E, w] = B(!1), [I, y] = B(!1), [d, z] = B(""), [S, v] = B(!1), [D, P] = B(!1), [$, L] = B(!1), [N, R] = B(!1), [k, O] = B(!1), [H, j] = B(!1), V = mt(null), a = Tn(e.entityId, e.sdk), {
|
|
3712
|
+
setIsUnauthorized: W,
|
|
3713
|
+
setIsApiError: T
|
|
3714
|
+
} = vn(e.entityId, e.sdk, x), {
|
|
3715
|
+
pending: K,
|
|
3716
|
+
checked: X,
|
|
3717
|
+
setChecked: Z,
|
|
3718
|
+
allRequiredChecked: ee,
|
|
3719
|
+
submit: J
|
|
3720
|
+
} = ln({
|
|
3721
|
+
sdk: e.sdk,
|
|
3722
|
+
consents: (ze = e.consents) == null ? void 0 : ze.items,
|
|
3723
|
+
entityId: e.entityId,
|
|
3724
|
+
entityType: "either_or"
|
|
3725
|
+
}), ae = !!((a == null ? void 0 : a.authRequirement) === "LEAD" ? (Ye = e.leads) == null ? void 0 : Ye.position : void 0) && K.length > 0, se = ae ? [] : K.filter((M) => M.position !== "after"), ce = ae ? [] : K.filter((M) => M.position === "after"), Y = (M) => {
|
|
3726
|
+
Z(M), j(!1);
|
|
3727
|
+
}, he = (M) => {
|
|
3728
|
+
var F;
|
|
3729
|
+
return {
|
|
3730
|
+
items: M,
|
|
3731
|
+
checked: X,
|
|
3732
|
+
onChange: Y,
|
|
3733
|
+
labels: (F = e.consents) == null ? void 0 : F.labels,
|
|
3734
|
+
showError: H
|
|
3735
|
+
};
|
|
3736
|
+
};
|
|
3737
|
+
fe(() => {
|
|
3738
|
+
var M, F;
|
|
3739
|
+
n !== _.RESULTS || !g || (F = (M = e.callbacks) == null ? void 0 : M.onFinish) == null || F.call(M, g);
|
|
3740
|
+
}, [n]), fe(() => {
|
|
3741
|
+
Qt(e.language || "en");
|
|
3742
|
+
}, [e.language]), fe(() => {
|
|
3743
|
+
a && a.id && l(_.TUTORIAL);
|
|
3744
|
+
}, [a]);
|
|
3590
3745
|
const U = () => ({
|
|
3591
|
-
onTimerTick: (
|
|
3592
|
-
|
|
3746
|
+
onTimerTick: (M) => {
|
|
3747
|
+
c(M);
|
|
3593
3748
|
},
|
|
3594
|
-
onElapsedResponse: (
|
|
3595
|
-
const
|
|
3596
|
-
(
|
|
3597
|
-
var
|
|
3598
|
-
return
|
|
3749
|
+
onElapsedResponse: (M) => {
|
|
3750
|
+
const F = M.steps.find(
|
|
3751
|
+
(ne) => {
|
|
3752
|
+
var xe;
|
|
3753
|
+
return ne.pairId === ((xe = V.current) == null ? void 0 : xe.pairId);
|
|
3599
3754
|
}
|
|
3600
|
-
),
|
|
3601
|
-
|
|
3755
|
+
), te = ((F == null ? void 0 : F.optionOne.value) ?? 0) >= ((F == null ? void 0 : F.optionTwo.value) ?? 0) ? (F == null ? void 0 : F.optionOne.id) ?? null : (F == null ? void 0 : F.optionTwo.id) ?? null;
|
|
3756
|
+
p({
|
|
3602
3757
|
isCorrect: !1,
|
|
3603
3758
|
selectedOption: null,
|
|
3604
3759
|
timedOut: !0,
|
|
3605
|
-
correctOptionId:
|
|
3606
|
-
}),
|
|
3607
|
-
var
|
|
3608
|
-
const
|
|
3609
|
-
if (
|
|
3610
|
-
|
|
3760
|
+
correctOptionId: te
|
|
3761
|
+
}), o(M), setTimeout(() => {
|
|
3762
|
+
var Le;
|
|
3763
|
+
const ne = ((Le = e.leads) == null ? void 0 : Le.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S;
|
|
3764
|
+
if (M.currentLives === 0) {
|
|
3765
|
+
ne ? P(!0) : l(_.RESULTS);
|
|
3611
3766
|
return;
|
|
3612
3767
|
}
|
|
3613
|
-
const
|
|
3614
|
-
|
|
3768
|
+
const xe = M.steps.find((be) => !be.played);
|
|
3769
|
+
xe ? (s(xe), f(null), p({ isCorrect: null, selectedOption: null })) : ne ? P(!0) : l(_.RESULTS);
|
|
3615
3770
|
}, 1e3);
|
|
3616
3771
|
}
|
|
3617
|
-
}),
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3772
|
+
}), G = (M) => {
|
|
3773
|
+
console.error("[either-or-play] request failed", M);
|
|
3774
|
+
const { code: F, message: te } = nn(M, e.sdk);
|
|
3775
|
+
F === 401 || F === 403 ? w(!0) : (y(!0), z(te));
|
|
3776
|
+
}, de = Ge(async () => {
|
|
3777
|
+
var M;
|
|
3778
|
+
if (se.length > 0) {
|
|
3779
|
+
if ($) return;
|
|
3780
|
+
if (!ee(se)) {
|
|
3781
|
+
j(!0);
|
|
3782
|
+
return;
|
|
3783
|
+
}
|
|
3784
|
+
L(!0), await J(se), L(!1);
|
|
3624
3785
|
}
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
if ((o == null ? void 0 : o.authRequirement) === "LEAD" && ((H = e.leads) == null ? void 0 : H.position) === "before" && !k) {
|
|
3628
|
-
R(!0);
|
|
3786
|
+
if ((a == null ? void 0 : a.authRequirement) === "LEAD" && ((M = e.leads) == null ? void 0 : M.position) === "before" && !S) {
|
|
3787
|
+
P(!0);
|
|
3629
3788
|
return;
|
|
3630
3789
|
}
|
|
3631
3790
|
try {
|
|
3632
|
-
const
|
|
3791
|
+
const F = await e.sdk.miniGames.participateInEitherOr(
|
|
3633
3792
|
e.entityId,
|
|
3634
3793
|
null,
|
|
3635
3794
|
U()
|
|
3636
3795
|
);
|
|
3637
|
-
|
|
3638
|
-
} catch (
|
|
3639
|
-
console.error("Failed to start game:",
|
|
3796
|
+
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((te) => !te.played) || null), l(_.PLAYING);
|
|
3797
|
+
} catch (F) {
|
|
3798
|
+
console.error("Failed to start game:", F), G(F);
|
|
3640
3799
|
}
|
|
3641
3800
|
}, [
|
|
3642
3801
|
e.entityId,
|
|
3643
3802
|
e.sdk,
|
|
3644
|
-
(
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3803
|
+
(_e = e.leads) == null ? void 0 : _e.position,
|
|
3804
|
+
a == null ? void 0 : a.authRequirement,
|
|
3805
|
+
a == null ? void 0 : a.time,
|
|
3806
|
+
S,
|
|
3807
|
+
se,
|
|
3808
|
+
$
|
|
3648
3809
|
]);
|
|
3649
|
-
|
|
3650
|
-
const
|
|
3651
|
-
async (
|
|
3652
|
-
if (!
|
|
3653
|
-
|
|
3810
|
+
V.current = i;
|
|
3811
|
+
const Ae = Ge(
|
|
3812
|
+
async (M, F) => {
|
|
3813
|
+
if (!u) {
|
|
3814
|
+
f(F);
|
|
3654
3815
|
try {
|
|
3655
|
-
const
|
|
3816
|
+
const te = await e.sdk.miniGames.participateInEitherOr(
|
|
3656
3817
|
e.entityId,
|
|
3657
|
-
{ pair:
|
|
3818
|
+
{ pair: M, answer: F },
|
|
3658
3819
|
U()
|
|
3659
|
-
),
|
|
3660
|
-
(
|
|
3661
|
-
),
|
|
3662
|
-
(
|
|
3820
|
+
), ne = te.steps.find(
|
|
3821
|
+
(be) => be.pairId === M
|
|
3822
|
+
), xe = (ne == null ? void 0 : ne.correct) ?? !1, Le = xe ? null : [ne == null ? void 0 : ne.optionOne.id, ne == null ? void 0 : ne.optionTwo.id].find(
|
|
3823
|
+
(be) => be !== F
|
|
3663
3824
|
) ?? null;
|
|
3664
|
-
|
|
3665
|
-
var
|
|
3666
|
-
const
|
|
3667
|
-
if (
|
|
3668
|
-
|
|
3825
|
+
p({ isCorrect: xe, selectedOption: F, correctOptionId: Le }), o(te), setTimeout(() => {
|
|
3826
|
+
var Me;
|
|
3827
|
+
const be = ((Me = e.leads) == null ? void 0 : Me.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S, Ue = ce.length > 0 && !k;
|
|
3828
|
+
if (te.currentLives === 0) {
|
|
3829
|
+
Ue ? R(!0) : be ? P(!0) : l(_.RESULTS);
|
|
3669
3830
|
return;
|
|
3670
3831
|
}
|
|
3671
|
-
const
|
|
3672
|
-
|
|
3832
|
+
const We = te.steps.find((Ze) => !Ze.played);
|
|
3833
|
+
We ? (s(We), f(null), p({ isCorrect: null, selectedOption: null })) : Ue ? R(!0) : be ? P(!0) : l(_.RESULTS);
|
|
3673
3834
|
}, 1e3);
|
|
3674
|
-
} catch (
|
|
3675
|
-
console.error("Failed to submit answer:",
|
|
3835
|
+
} catch (te) {
|
|
3836
|
+
console.error("Failed to submit answer:", te), f(null), G(te);
|
|
3676
3837
|
}
|
|
3677
3838
|
}
|
|
3678
3839
|
},
|
|
3679
3840
|
[
|
|
3680
3841
|
e.entityId,
|
|
3681
3842
|
e.sdk,
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
(
|
|
3843
|
+
u,
|
|
3844
|
+
a == null ? void 0 : a.authRequirement,
|
|
3845
|
+
(qe = e.leads) == null ? void 0 : qe.position,
|
|
3846
|
+
S,
|
|
3847
|
+
ce,
|
|
3685
3848
|
k
|
|
3686
3849
|
]
|
|
3687
|
-
),
|
|
3688
|
-
var
|
|
3689
|
-
if (v(!0), ((
|
|
3690
|
-
|
|
3850
|
+
), we = Ge(async () => {
|
|
3851
|
+
var M;
|
|
3852
|
+
if (v(!0), ((M = e.leads) == null ? void 0 : M.position) === "before") {
|
|
3853
|
+
L(!0);
|
|
3691
3854
|
try {
|
|
3692
|
-
const
|
|
3855
|
+
const F = await e.sdk.miniGames.participateInEitherOr(
|
|
3693
3856
|
e.entityId,
|
|
3694
3857
|
null,
|
|
3695
3858
|
U()
|
|
3696
3859
|
);
|
|
3697
|
-
|
|
3698
|
-
} catch (
|
|
3699
|
-
|
|
3860
|
+
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((te) => !te.played) || null), P(!1), L(!1), l(_.PLAYING);
|
|
3861
|
+
} catch (F) {
|
|
3862
|
+
L(!1), P(!1), G(F);
|
|
3700
3863
|
}
|
|
3701
3864
|
} else
|
|
3702
|
-
|
|
3703
|
-
}, [(
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3865
|
+
P(!1), L(!1), l(_.RESULTS);
|
|
3866
|
+
}, [(Ke = e.leads) == null ? void 0 : Ke.position, e.entityId, e.sdk, a == null ? void 0 : a.time]), Ce = Ge(async () => {
|
|
3867
|
+
if (!ee(ce)) {
|
|
3868
|
+
j(!0);
|
|
3869
|
+
return;
|
|
3870
|
+
}
|
|
3871
|
+
L(!0), await J(ce), O(!0), L(!1), R(!1), l(_.RESULTS);
|
|
3872
|
+
}, [ce, ee, J]), Ie = Ge(() => {
|
|
3873
|
+
l(_.TUTORIAL), s(null), o(null), c((a == null ? void 0 : a.time) ?? 10), f(null), p({ isCorrect: null, selectedOption: null }), v(!1), P(!1), R(!1), j(!1);
|
|
3874
|
+
}, [a == null ? void 0 : a.time]), ie = () => {
|
|
3875
|
+
y(!1), w(!1), z(""), T(!1), W(!1), A(!x), l(_.TUTORIAL), s(null), o(null), f(null), p({ isCorrect: null, selectedOption: null }), v(!1), P(!1), R(!1), j(!1);
|
|
3707
3876
|
};
|
|
3708
|
-
if (!
|
|
3709
|
-
return /* @__PURE__ */ t(
|
|
3710
|
-
if (!
|
|
3711
|
-
return /* @__PURE__ */ t(
|
|
3712
|
-
if (
|
|
3877
|
+
if (!a)
|
|
3878
|
+
return /* @__PURE__ */ t(lt, { my: 20 });
|
|
3879
|
+
if (!a.id)
|
|
3880
|
+
return /* @__PURE__ */ t(Bn, {});
|
|
3881
|
+
if (a.status !== "ACTIVE")
|
|
3713
3882
|
return /* @__PURE__ */ t(
|
|
3714
|
-
|
|
3883
|
+
Fn,
|
|
3715
3884
|
{
|
|
3716
|
-
eitherOr:
|
|
3885
|
+
eitherOr: a,
|
|
3717
3886
|
template: e.template,
|
|
3718
|
-
imagePosition:
|
|
3887
|
+
imagePosition: Be(e) ? e.imagePosition : void 0,
|
|
3719
3888
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3720
3889
|
rulesDisplay: e.rulesDisplay
|
|
3721
3890
|
}
|
|
3722
3891
|
);
|
|
3723
|
-
if (
|
|
3724
|
-
return
|
|
3725
|
-
|
|
3892
|
+
if (a.authRequirement === "REGISTERED" && !e.userIsLoggedIn)
|
|
3893
|
+
return Be(e) ? /* @__PURE__ */ t(
|
|
3894
|
+
$n,
|
|
3726
3895
|
{
|
|
3727
|
-
eitherOr:
|
|
3896
|
+
eitherOr: a,
|
|
3728
3897
|
imagePosition: e.imagePosition,
|
|
3729
3898
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3730
3899
|
signInCTA: e.signInCTA,
|
|
3731
3900
|
rulesDisplay: e.rulesDisplay
|
|
3732
3901
|
}
|
|
3733
|
-
) :
|
|
3734
|
-
|
|
3902
|
+
) : Qe(e) ? /* @__PURE__ */ t(
|
|
3903
|
+
Gn,
|
|
3735
3904
|
{
|
|
3736
|
-
eitherOr:
|
|
3905
|
+
eitherOr: a,
|
|
3737
3906
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3738
3907
|
signInCTA: e.signInCTA,
|
|
3739
3908
|
rulesDisplay: e.rulesDisplay
|
|
3740
3909
|
}
|
|
3741
|
-
) : /* @__PURE__ */ t(
|
|
3742
|
-
if (
|
|
3743
|
-
return
|
|
3744
|
-
|
|
3910
|
+
) : /* @__PURE__ */ t(et, {});
|
|
3911
|
+
if (E || I)
|
|
3912
|
+
return Qe(e) ? /* @__PURE__ */ t(
|
|
3913
|
+
jn,
|
|
3745
3914
|
{
|
|
3746
|
-
eitherOr:
|
|
3915
|
+
eitherOr: a,
|
|
3747
3916
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3748
|
-
isApiError:
|
|
3749
|
-
apiErrorMessage:
|
|
3750
|
-
toggleTryAgain:
|
|
3917
|
+
isApiError: I,
|
|
3918
|
+
apiErrorMessage: d,
|
|
3919
|
+
toggleTryAgain: ie,
|
|
3751
3920
|
rulesDisplay: e.rulesDisplay
|
|
3752
3921
|
}
|
|
3753
3922
|
) : /* @__PURE__ */ t(
|
|
3754
|
-
|
|
3923
|
+
En,
|
|
3755
3924
|
{
|
|
3756
|
-
eitherOr:
|
|
3757
|
-
imagePosition:
|
|
3925
|
+
eitherOr: a,
|
|
3926
|
+
imagePosition: Be(e) ? e.imagePosition : void 0,
|
|
3758
3927
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3759
|
-
isApiError:
|
|
3760
|
-
apiErrorMessage:
|
|
3761
|
-
toggleTryAgain:
|
|
3928
|
+
isApiError: I,
|
|
3929
|
+
apiErrorMessage: d,
|
|
3930
|
+
toggleTryAgain: ie,
|
|
3762
3931
|
rulesDisplay: e.rulesDisplay
|
|
3763
3932
|
}
|
|
3764
3933
|
);
|
|
3765
|
-
if (
|
|
3766
|
-
|
|
3934
|
+
if (N && ce.length > 0) {
|
|
3935
|
+
const M = {
|
|
3936
|
+
eitherOr: a,
|
|
3937
|
+
sdk: e.sdk,
|
|
3938
|
+
consents: he(ce),
|
|
3939
|
+
onSubmit: Ce,
|
|
3940
|
+
isSubmitting: $,
|
|
3941
|
+
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3942
|
+
rulesDisplay: e.rulesDisplay
|
|
3943
|
+
};
|
|
3944
|
+
return Be(e) ? /* @__PURE__ */ t(
|
|
3945
|
+
Nn,
|
|
3946
|
+
{
|
|
3947
|
+
...M,
|
|
3948
|
+
imagePosition: e.imagePosition
|
|
3949
|
+
}
|
|
3950
|
+
) : /* @__PURE__ */ t(Yn, { ...M });
|
|
3951
|
+
}
|
|
3952
|
+
if (D && a.authRequirement === "LEAD" && (((Xe = e.leads) == null ? void 0 : Xe.position) === "after" || ((Ee = e.leads) == null ? void 0 : Ee.position) === "before")) {
|
|
3953
|
+
if (Be(e))
|
|
3767
3954
|
return /* @__PURE__ */ t(
|
|
3768
|
-
|
|
3955
|
+
Un,
|
|
3769
3956
|
{
|
|
3770
|
-
eitherOr:
|
|
3957
|
+
eitherOr: a,
|
|
3771
3958
|
sdk: e.sdk,
|
|
3772
3959
|
leads: e.leads,
|
|
3773
3960
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3774
|
-
onLeadSubmitted:
|
|
3961
|
+
onLeadSubmitted: we,
|
|
3775
3962
|
imagePosition: e.imagePosition,
|
|
3776
|
-
isSubmitting:
|
|
3777
|
-
rulesDisplay: e.rulesDisplay
|
|
3963
|
+
isSubmitting: $,
|
|
3964
|
+
rulesDisplay: e.rulesDisplay,
|
|
3965
|
+
consents: ae ? K : void 0
|
|
3778
3966
|
}
|
|
3779
3967
|
);
|
|
3780
|
-
if (
|
|
3968
|
+
if (Qe(e))
|
|
3781
3969
|
return /* @__PURE__ */ t(
|
|
3782
|
-
|
|
3970
|
+
Vn,
|
|
3783
3971
|
{
|
|
3784
|
-
eitherOr:
|
|
3972
|
+
eitherOr: a,
|
|
3785
3973
|
sdk: e.sdk,
|
|
3786
3974
|
leads: e.leads,
|
|
3787
3975
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3788
|
-
onLeadSubmitted:
|
|
3789
|
-
isSubmitting:
|
|
3790
|
-
rulesDisplay: e.rulesDisplay
|
|
3976
|
+
onLeadSubmitted: we,
|
|
3977
|
+
isSubmitting: $,
|
|
3978
|
+
rulesDisplay: e.rulesDisplay,
|
|
3979
|
+
consents: ae ? K : void 0
|
|
3791
3980
|
}
|
|
3792
3981
|
);
|
|
3793
3982
|
}
|
|
3794
|
-
return
|
|
3795
|
-
|
|
3983
|
+
return Be(e) ? /* @__PURE__ */ t(
|
|
3984
|
+
On,
|
|
3796
3985
|
{
|
|
3797
|
-
eitherOr:
|
|
3798
|
-
currentPair:
|
|
3799
|
-
stepInfo:
|
|
3986
|
+
eitherOr: a,
|
|
3987
|
+
currentPair: i,
|
|
3988
|
+
stepInfo: g,
|
|
3800
3989
|
gameState: n,
|
|
3801
|
-
timer:
|
|
3802
|
-
selected:
|
|
3990
|
+
timer: m,
|
|
3991
|
+
selected: u,
|
|
3803
3992
|
feedback: b,
|
|
3804
3993
|
sdk: e.sdk,
|
|
3805
3994
|
leads: e.leads,
|
|
@@ -3808,19 +3997,21 @@ const Dn = (e) => {
|
|
|
3808
3997
|
showStandings: e.showStandings,
|
|
3809
3998
|
additionalCTA: e.additionalCTA,
|
|
3810
3999
|
imagePosition: e.imagePosition,
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
4000
|
+
consents: he(se),
|
|
4001
|
+
isSubmitting: $,
|
|
4002
|
+
onGameStart: de,
|
|
4003
|
+
onSelection: Ae,
|
|
4004
|
+
onPlayAgain: Ie
|
|
3814
4005
|
}
|
|
3815
|
-
) :
|
|
3816
|
-
|
|
4006
|
+
) : Qe(e) ? /* @__PURE__ */ t(
|
|
4007
|
+
Mn,
|
|
3817
4008
|
{
|
|
3818
|
-
eitherOr:
|
|
3819
|
-
currentPair:
|
|
3820
|
-
stepInfo:
|
|
4009
|
+
eitherOr: a,
|
|
4010
|
+
currentPair: i,
|
|
4011
|
+
stepInfo: g,
|
|
3821
4012
|
gameState: n,
|
|
3822
|
-
timer:
|
|
3823
|
-
selected:
|
|
4013
|
+
timer: m,
|
|
4014
|
+
selected: u,
|
|
3824
4015
|
feedback: b,
|
|
3825
4016
|
sdk: e.sdk,
|
|
3826
4017
|
leads: e.leads,
|
|
@@ -3828,12 +4019,14 @@ const Dn = (e) => {
|
|
|
3828
4019
|
rulesDisplay: e.rulesDisplay,
|
|
3829
4020
|
showStandings: e.showStandings,
|
|
3830
4021
|
additionalCTA: e.additionalCTA,
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
4022
|
+
consents: he(se),
|
|
4023
|
+
isSubmitting: $,
|
|
4024
|
+
onGameStart: de,
|
|
4025
|
+
onSelection: Ae,
|
|
4026
|
+
onPlayAgain: Ie
|
|
3834
4027
|
}
|
|
3835
|
-
) : /* @__PURE__ */ t(
|
|
3836
|
-
},
|
|
4028
|
+
) : /* @__PURE__ */ t(et, {});
|
|
4029
|
+
}, qn = (e) => /* @__PURE__ */ t(en, { packageName: "either-or-play", ...e, children: /* @__PURE__ */ t(_n, { ...e }) }), Tr = qn;
|
|
3837
4030
|
export {
|
|
3838
|
-
|
|
4031
|
+
Tr as EitherOrPlay
|
|
3839
4032
|
};
|