fansunited-frontend-components 0.0.97 → 0.0.99
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 +2 -2
- package/ChanceGame.js +958 -1464
- package/ClassicQuizPlay.js +2 -2
- package/CollectLead.js +1 -1
- package/CompetitionStatistics.js +2042 -2215
- package/CompetitorCard.js +4281 -4919
- package/Discussion.js +2 -2
- package/EitherOrPlay.js +2 -2
- package/EventCard.js +6010 -7547
- package/EventGamePlay.js +2 -2
- package/Leaderboard.js +546 -849
- package/List.js +227 -218
- package/MatchQuizPlay.js +2 -2
- package/Odds.js +50 -42
- package/PersonalityQuizPlay.js +2 -2
- package/PickThePair.js +2 -2
- package/PlayerOfTheMatch.js +285 -269
- package/PollVote.js +2 -2
- package/Predictor.js +80 -127
- package/README.md +1 -1
- package/Standings.js +991 -1324
- package/TopX.js +1120 -1167
- package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
- package/chunks/CheckCircle-I1FktW5Y.js +13 -0
- package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
- package/chunks/Person-CXRqyF4E.js +11 -0
- package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
- package/chunks/Search-CIXthh0D.js +17 -0
- package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
- package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
- package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
- package/chunks/index-BENM3N_w.js +4 -0
- package/chunks/index-BRxAV693.js +4 -0
- package/chunks/index-BXYTsvIX.js +4 -0
- package/chunks/index-C0ilols1.js +4 -0
- package/chunks/index-D7VhczXH.js +4 -0
- package/chunks/index-DKwvdw9t.js +4 -0
- package/chunks/index-DZN-AITW.js +4 -0
- package/chunks/main-B2sDRFF4.js +2184 -0
- package/chunks/main-CzfWaEQP.js +4869 -0
- package/chunks/main-DFNl3g_U.js +4910 -0
- package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
- package/chunks/main-DiBlJBNb.js +1956 -0
- package/chunks/main-DxvBjXsd.js +1775 -0
- package/chunks/main-S8_NDSiY.js +3209 -0
- package/chunks/main-lBgr8Liq.js +6571 -0
- package/chunks/{withVersionStamp-BkiEu_79.js → withVersionStamp-BsLyhvNA.js} +1 -1
- package/package.json +2 -2
- package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
- package/chunks/OddsStrip-BnSp5TXa.js +0 -383
- package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
- package/chunks/chevron-left-CxfCSZcr.js +0 -13
- package/chunks/chevron-right-BEQMacFn.js +0 -13
- package/chunks/index-Aq5MbUB9.js +0 -4
- package/chunks/index-BBQm_8LD.js +0 -4
- package/chunks/index-BC_sWWgc.js +0 -4
- package/chunks/index-DXKDJ1Vp.js +0 -4
- package/chunks/index-DjT5NrbA.js +0 -4
- package/chunks/index-DvLRehH6.js +0 -4
- package/chunks/index-aIMaxR-p.js +0 -4
- package/chunks/main-52Wff7qC.js +0 -11441
- package/chunks/main-B58mi9jx.js +0 -5622
- package/chunks/main-BIdXUTZS.js +0 -7308
- package/chunks/main-DD-NEzC7.js +0 -8241
- package/chunks/main-DUnfJPzY.js +0 -3608
- package/chunks/main-DpCBqqg_.js +0 -1950
- package/chunks/main-Drznt1ak.js +0 -1790
- package/chunks/users-wbJRbqW8.js +0 -16
- package/chunks/x-CK4GYo7T.js +0 -14
|
@@ -1,43 +1,32 @@
|
|
|
1
|
-
import { jsx as t, jsxs as g, Fragment as
|
|
2
|
-
import { useDisableCache as Lt, useFontFamily as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { EitherOrFullModel as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { Box as r, Typography as C, Button as ye, Stack as je, Sheet as bn, Table as yn, Avatar as pn, tabClasses as Ut, Tabs as Wt, TabList as Mt, Tab as et, TabPanel as tt } from "@mui/joy";
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import { useDisableCache as Lt, useFontFamily as ke, isExtraSmall as Ve, getBrandingClickUrl as Zt, isMobile as Se, useColors as K, useCornerRadius as pe, useSpacingScale as Te, hexToRgb as le, ConsentPanel as it, DirectionalIcon as mt, busyButtonStyles as Ot, useImageUrl as Jt, AdditionalCTA as Qt, useIntlLocale as en, useInternalTheme as Ne, Spinner as lt, useBorderSize as tn, useImageVariant as at, WidgetTemplate as Ae, StandardSkeleton as nn, NotFoundSkeleton as rn, StandardSignInSkeleton as on, extractBrandingModelProperties as st, StandardApiErrorSkeleton as Bt, CollectLeadForm as ln, StandardLeadAfterCollection as Dt, sanitizeBackgroundUrl as $t, useImageBackgroundGradient as Ft, OverlayScoreStateWrapperSkeleton as an, OverlaySkeleton as sn, defaultBgVertical as gt, defaultBg as ht, OverlaySignInSkeleton as cn, OverlayApiErrorSkeleton as dn, OverlayLeadAfterCollection as Et, ConsentCta as Ut, useConsents as un, initializeI18n as mn, extractSdkError as gn, Portal as hn } from "fansunited-frontend-core";
|
|
3
|
+
import { useState as O, useEffect as fe, useRef as ft, useCallback as Ge } from "react";
|
|
4
|
+
import { EitherOrFullModel as fn } from "fansunited-sdk-esm/models";
|
|
5
|
+
import { createSvgIcon as Pe } from "@mui/material";
|
|
6
|
+
import { Box as r, Typography as C, Button as ye, Stack as je, Sheet as xn, Table as bn, Avatar as yn, tabClasses as Wt, Tabs as Mt, TabList as Ht, Tab as tt, TabPanel as nt } from "@mui/joy";
|
|
8
7
|
import { useTranslation as ee } from "react-i18next";
|
|
9
|
-
import
|
|
10
|
-
import Sn from "@
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import kn from "@mui/icons-material/CheckCircle";
|
|
16
|
-
import Tn from "@mui/icons-material/Cancel";
|
|
17
|
-
import Pn from "@mui/icons-material/AccessTime";
|
|
18
|
-
import Ge from "@mui/icons-material/EmojiEvents";
|
|
19
|
-
import vn from "@mui/icons-material/WorkspacePremium";
|
|
20
|
-
import An from "@mui/icons-material/Person";
|
|
21
|
-
import Ht from "@mui/icons-material/Leaderboard";
|
|
22
|
-
import wn from "@mui/icons-material/Timer";
|
|
23
|
-
const Rn = (e, n) => {
|
|
24
|
-
const [l, i] = z(null), s = Lt(), f = async () => {
|
|
8
|
+
import { E as $e, P as pn } from "./Person-CXRqyF4E.js";
|
|
9
|
+
import { keyframes as Sn } from "@emotion/react";
|
|
10
|
+
import { C as ct, A as Cn } from "./CheckCircle-I1FktW5Y.js";
|
|
11
|
+
import { T as In } from "./TimerOutlined-D-WA_vpE.js";
|
|
12
|
+
const vn = (e, n) => {
|
|
13
|
+
const [l, i] = O(null), s = Lt(), h = async () => {
|
|
25
14
|
try {
|
|
26
15
|
const o = await n.miniGames.getEitherOrById(e, s);
|
|
27
16
|
i(o);
|
|
28
17
|
} catch (o) {
|
|
29
|
-
console.error(o), i(new
|
|
18
|
+
console.error(o), i(new fn());
|
|
30
19
|
}
|
|
31
20
|
};
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
const [i, s] =
|
|
21
|
+
return fe(() => (h(), () => i(null)), [e, n, s]), l;
|
|
22
|
+
}, kn = (e, n, l = !1) => {
|
|
23
|
+
const [i, s] = O(null), [h, o] = O(!1), [m, c] = O(!1), u = async () => {
|
|
35
24
|
try {
|
|
36
|
-
const
|
|
37
|
-
s(
|
|
38
|
-
} catch (
|
|
25
|
+
const f = await n.miniGames.getMyEitherOrStats(e);
|
|
26
|
+
s(f);
|
|
27
|
+
} catch (f) {
|
|
39
28
|
if (s(null), n.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
|
|
40
|
-
const x =
|
|
29
|
+
const x = f;
|
|
41
30
|
if (x.error.code === 404)
|
|
42
31
|
return;
|
|
43
32
|
if (x.error.code === 401 || x.error.code === 403) {
|
|
@@ -47,7 +36,7 @@ const Rn = (e, n) => {
|
|
|
47
36
|
c(!0);
|
|
48
37
|
return;
|
|
49
38
|
}
|
|
50
|
-
const p =
|
|
39
|
+
const p = f;
|
|
51
40
|
if (p.data.error.code === 404)
|
|
52
41
|
return;
|
|
53
42
|
if (p.data.error.code === 401 || p.data.error.code === 403) {
|
|
@@ -57,12 +46,12 @@ const Rn = (e, n) => {
|
|
|
57
46
|
c(!0);
|
|
58
47
|
}
|
|
59
48
|
};
|
|
60
|
-
return
|
|
49
|
+
return fe(() => (u(), () => {
|
|
61
50
|
s(null), o(!1), c(!1);
|
|
62
51
|
}), [e, n, l]), {
|
|
63
52
|
myStats: i,
|
|
64
53
|
setMyStats: s,
|
|
65
|
-
isUnauthorized:
|
|
54
|
+
isUnauthorized: h,
|
|
66
55
|
isApiError: m,
|
|
67
56
|
setIsUnauthorized: o,
|
|
68
57
|
setIsApiError: c
|
|
@@ -72,8 +61,26 @@ const Rn = (e, n) => {
|
|
|
72
61
|
TUTORIAL: "tutorial",
|
|
73
62
|
PLAYING: "playing",
|
|
74
63
|
RESULTS: "results"
|
|
75
|
-
},
|
|
76
|
-
|
|
64
|
+
}, xt = Pe(/* @__PURE__ */ t("path", {
|
|
65
|
+
d: "M16.01 11H4v2h12.01v3L20 12l-3.99-4z"
|
|
66
|
+
}), "ArrowRightAlt"), dt = Pe(/* @__PURE__ */ t("path", {
|
|
67
|
+
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"
|
|
68
|
+
}), "Cancel"), Gt = Pe(/* @__PURE__ */ t("path", {
|
|
69
|
+
d: "M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"
|
|
70
|
+
}), "CompareArrows"), rt = Pe(/* @__PURE__ */ t("path", {
|
|
71
|
+
d: "m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"
|
|
72
|
+
}), "Favorite"), jt = Pe(/* @__PURE__ */ t("path", {
|
|
73
|
+
d: "M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"
|
|
74
|
+
}), "FavoriteBorder"), Vt = Pe(/* @__PURE__ */ t("path", {
|
|
75
|
+
d: "M7.5 21H2V9h5.5zm7.25-18h-5.5v18h5.5zM22 11h-5.5v10H22z"
|
|
76
|
+
}), "Leaderboard"), Tn = Pe(/* @__PURE__ */ t("path", {
|
|
77
|
+
d: "M16 17.01V10h-2v7.01h-3L15 21l4-3.99zM9 3 5 6.99h3V14h2V6.99h3z"
|
|
78
|
+
}), "SwapVert"), Nt = Pe(/* @__PURE__ */ t("path", {
|
|
79
|
+
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"
|
|
80
|
+
}), "Timer"), Pn = Pe(/* @__PURE__ */ t("path", {
|
|
81
|
+
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"
|
|
82
|
+
}), "WorkspacePremium"), me = (e) => {
|
|
83
|
+
const n = ke().secondary, l = Ve(), i = Zt(
|
|
77
84
|
e.primaryUrl,
|
|
78
85
|
e.secondaryUrl,
|
|
79
86
|
"logo"
|
|
@@ -82,7 +89,7 @@ const Rn = (e, n) => {
|
|
|
82
89
|
return null;
|
|
83
90
|
const s = () => {
|
|
84
91
|
i && window.open(i, "_blank", "noopener,noreferrer");
|
|
85
|
-
},
|
|
92
|
+
}, h = /* @__PURE__ */ t(
|
|
86
93
|
"img",
|
|
87
94
|
{
|
|
88
95
|
src: e.brandingLogo,
|
|
@@ -101,16 +108,16 @@ const Rn = (e, n) => {
|
|
|
101
108
|
textDecoration: "none",
|
|
102
109
|
display: "inline-flex"
|
|
103
110
|
},
|
|
104
|
-
children:
|
|
111
|
+
children: h
|
|
105
112
|
}
|
|
106
113
|
) : /* @__PURE__ */ t(
|
|
107
114
|
r,
|
|
108
115
|
{
|
|
109
116
|
onClick: s,
|
|
110
117
|
sx: { cursor: "pointer", display: "inline-flex" },
|
|
111
|
-
children:
|
|
118
|
+
children: h
|
|
112
119
|
}
|
|
113
|
-
) :
|
|
120
|
+
) : h;
|
|
114
121
|
return e.isCentered || l ? /* @__PURE__ */ g(
|
|
115
122
|
r,
|
|
116
123
|
{
|
|
@@ -175,25 +182,25 @@ const Rn = (e, n) => {
|
|
|
175
182
|
]
|
|
176
183
|
}
|
|
177
184
|
);
|
|
178
|
-
},
|
|
185
|
+
}, An = ({
|
|
179
186
|
onStart: e,
|
|
180
187
|
game: n,
|
|
181
188
|
signInCTA: l,
|
|
182
189
|
showSignInCTA: i,
|
|
183
190
|
consents: s,
|
|
184
|
-
isSubmitting:
|
|
191
|
+
isSubmitting: h
|
|
185
192
|
}) => {
|
|
186
|
-
var B,
|
|
187
|
-
const { t: o } = ee(), m = Se(), c =
|
|
193
|
+
var B, P, D, L, N, $, z, v, G, M, j;
|
|
194
|
+
const { t: o } = ee(), m = Se(), c = Ve(), u = ((B = n == null ? void 0 : n.branding) == null ? void 0 : B.colors) || null, f = (u == null ? void 0 : u.primaryColor) || K().palette.primary.plainColor, b = K().palette.primary.onPrimary, p = (u == null ? void 0 : u.contentColor) || K().textColor, x = K().surfaceVariant, A = ke().primary, E = pe().xl, w = pe().md, I = Te(), y = le(f || ""), d = le(x || ""), R = y ? `rgba(${y.replace(/[^\d,]/g, "")}, 0.12)` : `${f}20`, S = m ? ((D = (P = n == null ? void 0 : n.branding) == null ? void 0 : P.images) == null ? void 0 : D.mobileLogo) || ((N = (L = n == null ? void 0 : n.branding) == null ? void 0 : L.images) == null ? void 0 : N.mainLogo) || "" : ((z = ($ = n == null ? void 0 : n.branding) == null ? void 0 : $.images) == null ? void 0 : z.mainLogo) || "", T = [
|
|
188
195
|
{
|
|
189
|
-
icon: /* @__PURE__ */ t(
|
|
196
|
+
icon: /* @__PURE__ */ t(Nt, { sx: { fontSize: "1.1em" } }),
|
|
190
197
|
title: o("eitherOr.tutorial.step1Title"),
|
|
191
198
|
description: o("eitherOr.tutorial.step1Description", {
|
|
192
199
|
seconds: (n == null ? void 0 : n.time) ?? 10
|
|
193
200
|
})
|
|
194
201
|
},
|
|
195
202
|
{
|
|
196
|
-
icon: /* @__PURE__ */ t(
|
|
203
|
+
icon: /* @__PURE__ */ t(rt, { sx: { fontSize: "1.1em" } }),
|
|
197
204
|
title: o("eitherOr.tutorial.step2Title", {
|
|
198
205
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
199
206
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
@@ -204,7 +211,7 @@ const Rn = (e, n) => {
|
|
|
204
211
|
})
|
|
205
212
|
},
|
|
206
213
|
{
|
|
207
|
-
icon: /* @__PURE__ */ t(
|
|
214
|
+
icon: /* @__PURE__ */ t($e, { sx: { fontSize: "1.1em" } }),
|
|
208
215
|
title: o("eitherOr.tutorial.step3Title"),
|
|
209
216
|
description: o("eitherOr.tutorial.step3Description")
|
|
210
217
|
}
|
|
@@ -229,8 +236,8 @@ const Rn = (e, n) => {
|
|
|
229
236
|
flexDirection: "column",
|
|
230
237
|
backdropFilter: "blur(4px)"
|
|
231
238
|
},
|
|
232
|
-
children:
|
|
233
|
-
const
|
|
239
|
+
children: T.map((a, Y) => {
|
|
240
|
+
const k = Y === T.length - 1;
|
|
234
241
|
return /* @__PURE__ */ g(r, { children: [
|
|
235
242
|
/* @__PURE__ */ g(
|
|
236
243
|
r,
|
|
@@ -250,8 +257,8 @@ const Rn = (e, n) => {
|
|
|
250
257
|
width: 36,
|
|
251
258
|
height: 36,
|
|
252
259
|
borderRadius: "50%",
|
|
253
|
-
bgcolor:
|
|
254
|
-
color:
|
|
260
|
+
bgcolor: R,
|
|
261
|
+
color: f,
|
|
255
262
|
display: "flex",
|
|
256
263
|
alignItems: "center",
|
|
257
264
|
justifyContent: "center",
|
|
@@ -293,13 +300,13 @@ const Rn = (e, n) => {
|
|
|
293
300
|
]
|
|
294
301
|
}
|
|
295
302
|
),
|
|
296
|
-
!
|
|
303
|
+
!k && /* @__PURE__ */ t(
|
|
297
304
|
r,
|
|
298
305
|
{
|
|
299
306
|
sx: {
|
|
300
307
|
height: "1px",
|
|
301
308
|
mx: I.md,
|
|
302
|
-
bgcolor: y ? `rgba(${y.replace(/[^\d,]/g, "")}, 0.1)` : `${
|
|
309
|
+
bgcolor: y ? `rgba(${y.replace(/[^\d,]/g, "")}, 0.1)` : `${f}1A`
|
|
303
310
|
}
|
|
304
311
|
}
|
|
305
312
|
)
|
|
@@ -319,12 +326,12 @@ const Rn = (e, n) => {
|
|
|
319
326
|
backdropFilter: "blur(4px)"
|
|
320
327
|
},
|
|
321
328
|
children: /* @__PURE__ */ t(
|
|
322
|
-
|
|
329
|
+
it,
|
|
323
330
|
{
|
|
324
331
|
consents: s,
|
|
325
|
-
primaryColor:
|
|
332
|
+
primaryColor: f,
|
|
326
333
|
textColor: p,
|
|
327
|
-
brandingUrls: (
|
|
334
|
+
brandingUrls: (v = n == null ? void 0 : n.branding) == null ? void 0 : v.urls,
|
|
328
335
|
align: "center"
|
|
329
336
|
}
|
|
330
337
|
)
|
|
@@ -353,23 +360,23 @@ const Rn = (e, n) => {
|
|
|
353
360
|
ye,
|
|
354
361
|
{
|
|
355
362
|
variant: "soft",
|
|
356
|
-
loading:
|
|
357
|
-
endDecorator: /* @__PURE__ */ t(
|
|
363
|
+
loading: h,
|
|
364
|
+
endDecorator: /* @__PURE__ */ t(mt, { children: /* @__PURE__ */ t(xt, {}) }),
|
|
358
365
|
onClick: i && l ? l.onClick : e,
|
|
359
366
|
sx: {
|
|
360
367
|
borderRadius: E,
|
|
361
368
|
py: "10px",
|
|
362
369
|
pr: "12px",
|
|
363
370
|
pl: "16px",
|
|
364
|
-
bgcolor:
|
|
371
|
+
bgcolor: f,
|
|
365
372
|
color: b,
|
|
366
373
|
transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
|
|
367
374
|
transform: "scale(1)",
|
|
368
375
|
alignSelf: "center",
|
|
369
|
-
"&:hover": { bgcolor:
|
|
376
|
+
"&:hover": { bgcolor: f, transform: "scale(1.02)" },
|
|
370
377
|
"&:active": { color: b, transform: "scale(0.98)" },
|
|
371
378
|
"&:disabled": {
|
|
372
|
-
bgcolor:
|
|
379
|
+
bgcolor: f,
|
|
373
380
|
color: b,
|
|
374
381
|
opacity: "12%"
|
|
375
382
|
},
|
|
@@ -381,7 +388,7 @@ const Rn = (e, n) => {
|
|
|
381
388
|
},
|
|
382
389
|
animation: "pulse 1s infinite",
|
|
383
390
|
fontSize: "0.9375em",
|
|
384
|
-
...
|
|
391
|
+
...h ? Ot(f, b) : {}
|
|
385
392
|
},
|
|
386
393
|
children: /* @__PURE__ */ t(
|
|
387
394
|
C,
|
|
@@ -393,7 +400,7 @@ const Rn = (e, n) => {
|
|
|
393
400
|
lineHeight: "24px",
|
|
394
401
|
letterSpacing: "0.46px",
|
|
395
402
|
textTransform: "uppercase",
|
|
396
|
-
color:
|
|
403
|
+
color: h ? "transparent" : b,
|
|
397
404
|
gap: I.xs,
|
|
398
405
|
display: "flex",
|
|
399
406
|
alignItems: "center"
|
|
@@ -408,7 +415,7 @@ const Rn = (e, n) => {
|
|
|
408
415
|
{
|
|
409
416
|
brandingLogo: S,
|
|
410
417
|
textColor: p,
|
|
411
|
-
label: ((
|
|
418
|
+
label: ((j = n == null ? void 0 : n.labels) == null ? void 0 : j.sponsor) || null
|
|
412
419
|
}
|
|
413
420
|
)
|
|
414
421
|
]
|
|
@@ -417,7 +424,7 @@ const Rn = (e, n) => {
|
|
|
417
424
|
]
|
|
418
425
|
}
|
|
419
426
|
) }) : null;
|
|
420
|
-
},
|
|
427
|
+
}, wn = Sn`
|
|
421
428
|
0% {
|
|
422
429
|
opacity: 1;
|
|
423
430
|
transform: translateY(0);
|
|
@@ -426,13 +433,13 @@ const Rn = (e, n) => {
|
|
|
426
433
|
opacity: 0;
|
|
427
434
|
transform: translateY(-20px);
|
|
428
435
|
}
|
|
429
|
-
`,
|
|
436
|
+
`, Yt = {
|
|
430
437
|
pointsAdded: {
|
|
431
438
|
position: "absolute",
|
|
432
439
|
top: -20,
|
|
433
440
|
right: 0,
|
|
434
441
|
color: "primary.500",
|
|
435
|
-
animation: `${
|
|
442
|
+
animation: `${wn} 1s ease-out forwards`
|
|
436
443
|
},
|
|
437
444
|
optionWrapper: {
|
|
438
445
|
position: "relative",
|
|
@@ -475,18 +482,18 @@ const Rn = (e, n) => {
|
|
|
475
482
|
borderRadius: "inherit",
|
|
476
483
|
transform: "translateZ(0)"
|
|
477
484
|
}
|
|
478
|
-
},
|
|
485
|
+
}, ot = ({
|
|
479
486
|
option: e,
|
|
480
487
|
selected: n,
|
|
481
488
|
feedback: l,
|
|
482
489
|
onSelect: i,
|
|
483
490
|
pairId: s,
|
|
484
|
-
brandingPrimaryColor:
|
|
491
|
+
brandingPrimaryColor: h,
|
|
485
492
|
optionIndex: o = 0
|
|
486
493
|
}) => {
|
|
487
|
-
const m = K(), c =
|
|
494
|
+
const m = K(), c = Te(), u = h || m.palette.primary.plainColor, f = m.palette.primary.onPrimary, b = m.palette.success.plainColor, p = m.palette.danger.plainColor, x = le(u || ""), A = x ? x.replace(/[^\d,]/g, "") : null, E = Jt(e.images ?? null), w = !!E, I = o === 0 ? "A" : "B", y = l.selectedOption === e.id, d = y && !!l.isCorrect || e.id === l.correctOptionId, R = y && !l.isCorrect || !!l.timedOut && e.id !== l.correctOptionId;
|
|
488
495
|
if (!w) {
|
|
489
|
-
const S = o === 0 ? "135deg" : "225deg",
|
|
496
|
+
const S = o === 0 ? "135deg" : "225deg", T = d ? `linear-gradient(${S}, ${b}20 0%, ${b}0D 100%)` : R ? `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%)`, B = A ? `repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(${A}, 0.04) 10px, rgba(${A}, 0.04) 11px)` : "none", P = d ? b : R ? p : A ? `rgba(${A}, 0.3)` : `${u}4D`, D = d ? b : R ? p : u;
|
|
490
497
|
return /* @__PURE__ */ g(
|
|
491
498
|
r,
|
|
492
499
|
{
|
|
@@ -497,15 +504,15 @@ const Rn = (e, n) => {
|
|
|
497
504
|
borderRadius: "sm",
|
|
498
505
|
overflow: "hidden",
|
|
499
506
|
cursor: n ? "default" : "pointer",
|
|
500
|
-
background:
|
|
507
|
+
background: T,
|
|
501
508
|
border: "1.5px solid",
|
|
502
|
-
borderColor:
|
|
509
|
+
borderColor: P,
|
|
503
510
|
display: "flex",
|
|
504
511
|
alignItems: "center",
|
|
505
512
|
gap: "14px",
|
|
506
513
|
px: c.md,
|
|
507
514
|
transition: "transform 0.2s, box-shadow 0.2s, border-color 0.25s",
|
|
508
|
-
boxShadow: d ? `0 0 0 3px ${b}30` :
|
|
515
|
+
boxShadow: d ? `0 0 0 3px ${b}30` : R ? `0 0 0 3px ${p}30` : "none",
|
|
509
516
|
"&:hover": n ? {} : {
|
|
510
517
|
transform: "scale(1.01)",
|
|
511
518
|
boxShadow: `0 4px 16px ${A ? `rgba(${A}, 0.2)` : `${u}33`}`
|
|
@@ -537,13 +544,13 @@ const Rn = (e, n) => {
|
|
|
537
544
|
flexShrink: 0,
|
|
538
545
|
zIndex: 2,
|
|
539
546
|
transition: "background-color 0.25s",
|
|
540
|
-
boxShadow: d ? `0 2px 8px ${b}59` :
|
|
547
|
+
boxShadow: d ? `0 2px 8px ${b}59` : R ? `0 2px 8px ${p}59` : `0 2px 8px ${A ? `rgba(${A}, 0.35)` : `${u}59`}`
|
|
541
548
|
},
|
|
542
|
-
children: d ? /* @__PURE__ */ t(
|
|
549
|
+
children: d ? /* @__PURE__ */ t(ct, { sx: { fontSize: "1.3em", color: "#fff" } }) : R ? /* @__PURE__ */ t(dt, { sx: { fontSize: "1.3em", color: "#fff" } }) : /* @__PURE__ */ t(
|
|
543
550
|
C,
|
|
544
551
|
{
|
|
545
552
|
sx: {
|
|
546
|
-
color:
|
|
553
|
+
color: f,
|
|
547
554
|
fontWeight: 800,
|
|
548
555
|
fontSize: "1em",
|
|
549
556
|
lineHeight: 1,
|
|
@@ -561,7 +568,7 @@ const Rn = (e, n) => {
|
|
|
561
568
|
fontWeight: 700,
|
|
562
569
|
fontSize: "0.9375em",
|
|
563
570
|
lineHeight: 1.35,
|
|
564
|
-
color: d ? b :
|
|
571
|
+
color: d ? b : R ? p : u,
|
|
565
572
|
zIndex: 2,
|
|
566
573
|
flex: 1,
|
|
567
574
|
transition: "color 0.25s"
|
|
@@ -589,9 +596,9 @@ const Rn = (e, n) => {
|
|
|
589
596
|
backgroundClip: "padding-box",
|
|
590
597
|
bgcolor: m.surfaceVariant,
|
|
591
598
|
border: "1.5px solid transparent",
|
|
592
|
-
borderColor: d ? b :
|
|
599
|
+
borderColor: d ? b : R ? p : "transparent",
|
|
593
600
|
transition: "transform 0.2s, border-color 0.25s",
|
|
594
|
-
boxShadow: d ? `0 0 0 3px ${b}30` :
|
|
601
|
+
boxShadow: d ? `0 0 0 3px ${b}30` : R ? `0 0 0 3px ${p}30` : "none",
|
|
595
602
|
"&:hover": n ? {} : { transform: "scale(1.01)" }
|
|
596
603
|
},
|
|
597
604
|
children: [
|
|
@@ -627,7 +634,7 @@ const Rn = (e, n) => {
|
|
|
627
634
|
zIndex: 3
|
|
628
635
|
},
|
|
629
636
|
children: d ? /* @__PURE__ */ t(
|
|
630
|
-
|
|
637
|
+
ct,
|
|
631
638
|
{
|
|
632
639
|
sx: {
|
|
633
640
|
fontSize: 28,
|
|
@@ -636,7 +643,7 @@ const Rn = (e, n) => {
|
|
|
636
643
|
}
|
|
637
644
|
}
|
|
638
645
|
) : /* @__PURE__ */ t(
|
|
639
|
-
|
|
646
|
+
dt,
|
|
640
647
|
{
|
|
641
648
|
sx: {
|
|
642
649
|
fontSize: 28,
|
|
@@ -677,12 +684,12 @@ const Rn = (e, n) => {
|
|
|
677
684
|
]
|
|
678
685
|
}
|
|
679
686
|
);
|
|
680
|
-
},
|
|
687
|
+
}, _t = ({
|
|
681
688
|
time: e,
|
|
682
689
|
maxTime: n,
|
|
683
690
|
brandingPrimaryColor: l
|
|
684
691
|
}) => {
|
|
685
|
-
const i = K().palette.danger.softBg, s = K().palette.danger.plainColor,
|
|
692
|
+
const i = K().palette.danger.softBg, s = K().palette.danger.plainColor, h = K().palette.warning.softBg, o = K().palette.warning.plainColor, m = l || K().palette.primary.plainColor, c = K().palette.primary.onPrimary, u = pe().xl, f = ke().secondary, b = Te(), p = {
|
|
686
693
|
"@keyframes pulse": {
|
|
687
694
|
"0%": { transform: "scale(1)" },
|
|
688
695
|
"50%": { transform: "scale(1.05)" },
|
|
@@ -693,7 +700,7 @@ const Rn = (e, n) => {
|
|
|
693
700
|
color: s,
|
|
694
701
|
animation: "pulse 1s infinite"
|
|
695
702
|
} : x <= 50 ? {
|
|
696
|
-
background:
|
|
703
|
+
background: h,
|
|
697
704
|
color: o,
|
|
698
705
|
animation: void 0
|
|
699
706
|
} : {
|
|
@@ -739,7 +746,7 @@ const Rn = (e, n) => {
|
|
|
739
746
|
C,
|
|
740
747
|
{
|
|
741
748
|
sx: {
|
|
742
|
-
fontFamily:
|
|
749
|
+
fontFamily: f,
|
|
743
750
|
fontWeight: 400,
|
|
744
751
|
fontSize: "1em",
|
|
745
752
|
lineHeight: "150%",
|
|
@@ -753,78 +760,78 @@ const Rn = (e, n) => {
|
|
|
753
760
|
]
|
|
754
761
|
}
|
|
755
762
|
);
|
|
756
|
-
},
|
|
763
|
+
}, zn = ({
|
|
757
764
|
currentPair: e,
|
|
758
765
|
timer: n,
|
|
759
766
|
selected: l,
|
|
760
767
|
maxTime: i,
|
|
761
768
|
feedback: s,
|
|
762
|
-
onSelect:
|
|
769
|
+
onSelect: h,
|
|
763
770
|
stepInfo: o,
|
|
764
771
|
brandingPrimaryColor: m,
|
|
765
772
|
game: c
|
|
766
773
|
}) => {
|
|
767
|
-
var J, X, Z, te, ae, ne, Q, de, _,
|
|
768
|
-
const [u,
|
|
769
|
-
|
|
774
|
+
var J, X, Z, te, ae, ne, Q, de, _, he;
|
|
775
|
+
const [u, f] = O(0), [b, p] = O(!1), [x, A] = O(0), [E, w] = O(0), [I, y] = O(!1), d = ft(0), { t: R } = ee(), S = Se(), T = Ve(), B = K(), P = B.surfaceVariant, D = m || B.palette.primary.plainColor, L = ((X = (J = c == null ? void 0 : c.branding) == null ? void 0 : J.colors) == null ? void 0 : X.contentColor) || B.textColor, N = pe().md, $ = Te(), z = le(P || ""), v = le(D || ""), G = S ? ((te = (Z = c == null ? void 0 : c.branding) == null ? void 0 : Z.images) == null ? void 0 : te.mobileLogo) || ((ne = (ae = c == null ? void 0 : c.branding) == null ? void 0 : ae.images) == null ? void 0 : ne.mainLogo) || "" : ((de = (Q = c == null ? void 0 : c.branding) == null ? void 0 : Q.images) == null ? void 0 : de.mainLogo) || "", M = R("common.labels.point", { count: u });
|
|
776
|
+
fe(() => {
|
|
770
777
|
if (o != null && o.currentPoints && o.currentPoints > u) {
|
|
771
|
-
A(o.currentPoints - u), p(!0), w((
|
|
778
|
+
A(o.currentPoints - u), p(!0), w((H) => H + 1);
|
|
772
779
|
const U = setTimeout(() => p(!1), 1e3);
|
|
773
|
-
return
|
|
780
|
+
return f(o.currentPoints), () => clearTimeout(U);
|
|
774
781
|
}
|
|
775
782
|
}, [o == null ? void 0 : o.currentPoints, u]);
|
|
776
|
-
const
|
|
777
|
-
|
|
778
|
-
const U = d.current,
|
|
779
|
-
if (d.current =
|
|
783
|
+
const j = (c == null ? void 0 : c.points) ?? [], a = j.length >= 2 ? j[1].correctSteps - j[0].correctSteps : ((_ = j[0]) == null ? void 0 : _.correctSteps) || 5;
|
|
784
|
+
fe(() => {
|
|
785
|
+
const U = d.current, H = (o == null ? void 0 : o.currentStreak) ?? 0;
|
|
786
|
+
if (d.current = H, H > U && H > 0 && H % a === 0) {
|
|
780
787
|
y(!0);
|
|
781
788
|
const ue = setTimeout(() => y(!1), 500);
|
|
782
789
|
return () => clearTimeout(ue);
|
|
783
790
|
}
|
|
784
791
|
}, [o == null ? void 0 : o.currentStreak, a]);
|
|
785
792
|
const Y = () => {
|
|
786
|
-
const U = [],
|
|
787
|
-
for (let ue = 0; ue <
|
|
793
|
+
const U = [], H = (o == null ? void 0 : o.currentLives) ?? 3;
|
|
794
|
+
for (let ue = 0; ue < H; ue++)
|
|
788
795
|
U.push(
|
|
789
796
|
/* @__PURE__ */ t(
|
|
790
|
-
|
|
797
|
+
rt,
|
|
791
798
|
{
|
|
792
799
|
sx: { height: 20, color: D }
|
|
793
800
|
},
|
|
794
801
|
`life-${ue}`
|
|
795
802
|
)
|
|
796
803
|
);
|
|
797
|
-
for (let ue =
|
|
804
|
+
for (let ue = H; ue < 3; ue++)
|
|
798
805
|
U.push(
|
|
799
806
|
/* @__PURE__ */ t(
|
|
800
|
-
|
|
807
|
+
jt,
|
|
801
808
|
{
|
|
802
809
|
sx: {
|
|
803
810
|
height: 20,
|
|
804
|
-
color:
|
|
811
|
+
color: v ? `rgba(${v.replace(/[^\d,]/g, "")}, 0.35)` : `${D}59`
|
|
805
812
|
}
|
|
806
813
|
},
|
|
807
814
|
`empty-${ue}`
|
|
808
815
|
)
|
|
809
816
|
);
|
|
810
817
|
return U;
|
|
811
|
-
},
|
|
812
|
-
const U = (o == null ? void 0 : o.currentStreak) ?? 0,
|
|
818
|
+
}, k = () => {
|
|
819
|
+
const U = (o == null ? void 0 : o.currentStreak) ?? 0, H = I ? a : U % a, we = Math.floor(U / a) + 1;
|
|
813
820
|
return /* @__PURE__ */ g(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
814
|
-
Array.from({ length: a }, (
|
|
821
|
+
Array.from({ length: a }, (ze, Ce) => /* @__PURE__ */ t(
|
|
815
822
|
r,
|
|
816
823
|
{
|
|
817
824
|
sx: {
|
|
818
825
|
flex: 1,
|
|
819
826
|
height: 4,
|
|
820
|
-
bgcolor: Ce <
|
|
827
|
+
bgcolor: Ce < H ? D : v ? `rgba(${v.replace(/[^\d,]/g, "")}, 0.2)` : `${D}33`,
|
|
821
828
|
borderRadius: "2px",
|
|
822
829
|
transition: "background-color 0.3s ease"
|
|
823
830
|
}
|
|
824
831
|
},
|
|
825
832
|
`streak-${Ce}`
|
|
826
833
|
)),
|
|
827
|
-
|
|
834
|
+
we > 1 && /* @__PURE__ */ g(
|
|
828
835
|
C,
|
|
829
836
|
{
|
|
830
837
|
sx: {
|
|
@@ -837,12 +844,12 @@ const Rn = (e, n) => {
|
|
|
837
844
|
},
|
|
838
845
|
children: [
|
|
839
846
|
"×",
|
|
840
|
-
|
|
847
|
+
we
|
|
841
848
|
]
|
|
842
849
|
}
|
|
843
850
|
)
|
|
844
851
|
] });
|
|
845
|
-
},
|
|
852
|
+
}, V = () => /* @__PURE__ */ t(
|
|
846
853
|
r,
|
|
847
854
|
{
|
|
848
855
|
sx: {
|
|
@@ -867,7 +874,7 @@ const Rn = (e, n) => {
|
|
|
867
874
|
alignItems: "center",
|
|
868
875
|
justifyContent: "center"
|
|
869
876
|
},
|
|
870
|
-
children: S ? /* @__PURE__ */ t(
|
|
877
|
+
children: S ? /* @__PURE__ */ t(Tn, { sx: { fontSize: "1.1em", color: D } }) : /* @__PURE__ */ t(Gt, { sx: { fontSize: "1.1em", color: D } })
|
|
871
878
|
}
|
|
872
879
|
)
|
|
873
880
|
}
|
|
@@ -884,7 +891,7 @@ const Rn = (e, n) => {
|
|
|
884
891
|
},
|
|
885
892
|
children: [
|
|
886
893
|
/* @__PURE__ */ t(r, { sx: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ t(
|
|
887
|
-
|
|
894
|
+
_t,
|
|
888
895
|
{
|
|
889
896
|
time: n,
|
|
890
897
|
maxTime: i,
|
|
@@ -896,9 +903,9 @@ const Rn = (e, n) => {
|
|
|
896
903
|
r,
|
|
897
904
|
{
|
|
898
905
|
sx: {
|
|
899
|
-
borderRadius:
|
|
906
|
+
borderRadius: N,
|
|
900
907
|
overflow: "hidden",
|
|
901
|
-
bgcolor:
|
|
908
|
+
bgcolor: z ? `rgba(${z.replace(/[^\d,]/g, "")}, 0.5)` : B.surfaceVariant,
|
|
902
909
|
display: "flex",
|
|
903
910
|
flexDirection: "column",
|
|
904
911
|
backdropFilter: "blur(4px)",
|
|
@@ -918,25 +925,25 @@ const Rn = (e, n) => {
|
|
|
918
925
|
},
|
|
919
926
|
children: [
|
|
920
927
|
/* @__PURE__ */ t(r, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
921
|
-
|
|
928
|
+
ot,
|
|
922
929
|
{
|
|
923
930
|
option: e.optionOne,
|
|
924
931
|
selected: l,
|
|
925
932
|
feedback: s,
|
|
926
|
-
onSelect:
|
|
933
|
+
onSelect: h,
|
|
927
934
|
pairId: e.pairId,
|
|
928
935
|
brandingPrimaryColor: m,
|
|
929
936
|
optionIndex: 0
|
|
930
937
|
}
|
|
931
938
|
) }),
|
|
932
|
-
|
|
939
|
+
V(),
|
|
933
940
|
/* @__PURE__ */ t(r, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ t(
|
|
934
|
-
|
|
941
|
+
ot,
|
|
935
942
|
{
|
|
936
943
|
option: e.optionTwo,
|
|
937
944
|
selected: l,
|
|
938
945
|
feedback: s,
|
|
939
|
-
onSelect:
|
|
946
|
+
onSelect: h,
|
|
940
947
|
pairId: e.pairId,
|
|
941
948
|
brandingPrimaryColor: m,
|
|
942
949
|
optionIndex: 1
|
|
@@ -948,7 +955,7 @@ const Rn = (e, n) => {
|
|
|
948
955
|
}
|
|
949
956
|
),
|
|
950
957
|
/* @__PURE__ */ g(r, { children: [
|
|
951
|
-
/* @__PURE__ */ t(r, { sx: { mb: $.xs }, children:
|
|
958
|
+
/* @__PURE__ */ t(r, { sx: { mb: $.xs }, children: k() }),
|
|
952
959
|
/* @__PURE__ */ g(
|
|
953
960
|
je,
|
|
954
961
|
{
|
|
@@ -958,7 +965,7 @@ const Rn = (e, n) => {
|
|
|
958
965
|
children: [
|
|
959
966
|
/* @__PURE__ */ t(r, { children: Y() }),
|
|
960
967
|
/* @__PURE__ */ g(je, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
961
|
-
/* @__PURE__ */ g(C, { sx: { color:
|
|
968
|
+
/* @__PURE__ */ g(C, { sx: { color: L }, children: [
|
|
962
969
|
M,
|
|
963
970
|
":"
|
|
964
971
|
] }),
|
|
@@ -966,13 +973,13 @@ const Rn = (e, n) => {
|
|
|
966
973
|
C,
|
|
967
974
|
{
|
|
968
975
|
level: "h4",
|
|
969
|
-
sx: { position: "relative", color:
|
|
976
|
+
sx: { position: "relative", color: L },
|
|
970
977
|
children: [
|
|
971
978
|
u,
|
|
972
979
|
b && /* @__PURE__ */ g(
|
|
973
980
|
C,
|
|
974
981
|
{
|
|
975
|
-
sx:
|
|
982
|
+
sx: Yt.pointsAdded,
|
|
976
983
|
children: [
|
|
977
984
|
"+",
|
|
978
985
|
x
|
|
@@ -993,14 +1000,14 @@ const Rn = (e, n) => {
|
|
|
993
1000
|
sx: {
|
|
994
1001
|
mt: $.xs,
|
|
995
1002
|
display: "flex",
|
|
996
|
-
justifyContent:
|
|
1003
|
+
justifyContent: T ? "center" : "flex-start"
|
|
997
1004
|
},
|
|
998
1005
|
children: /* @__PURE__ */ t(
|
|
999
1006
|
me,
|
|
1000
1007
|
{
|
|
1001
1008
|
brandingLogo: G,
|
|
1002
|
-
textColor:
|
|
1003
|
-
label: ((
|
|
1009
|
+
textColor: L,
|
|
1010
|
+
label: ((he = c == null ? void 0 : c.labels) == null ? void 0 : he.sponsor) || null
|
|
1004
1011
|
}
|
|
1005
1012
|
)
|
|
1006
1013
|
}
|
|
@@ -1010,57 +1017,57 @@ const Rn = (e, n) => {
|
|
|
1010
1017
|
}
|
|
1011
1018
|
) })
|
|
1012
1019
|
) : null;
|
|
1013
|
-
},
|
|
1020
|
+
}, Rn = (e, n, l, i) => {
|
|
1014
1021
|
if (n === 0)
|
|
1015
1022
|
return {
|
|
1016
1023
|
emoji: "🎮",
|
|
1017
1024
|
message: i("eitherOr.results.practice", "Keep practicing!")
|
|
1018
1025
|
};
|
|
1019
1026
|
const s = e / n * 100;
|
|
1020
|
-
let
|
|
1021
|
-
if (s === 100 ?
|
|
1027
|
+
let h;
|
|
1028
|
+
if (s === 100 ? h = {
|
|
1022
1029
|
emoji: "🏆",
|
|
1023
1030
|
message: i("eitherOr.results.perfect", "Perfect! Flawless!")
|
|
1024
|
-
} : s >= 80 ?
|
|
1031
|
+
} : s >= 80 ? h = {
|
|
1025
1032
|
emoji: "🔥",
|
|
1026
1033
|
message: i("eitherOr.results.excellent", "Excellent!")
|
|
1027
|
-
} : s >= 60 ?
|
|
1034
|
+
} : s >= 60 ? h = { emoji: "✨", message: i("eitherOr.results.great", "Great job!") } : s >= 40 ? h = { emoji: "💪", message: i("eitherOr.results.good", "Good try!") } : h = {
|
|
1028
1035
|
emoji: "📚",
|
|
1029
1036
|
message: i("eitherOr.results.practice", "Keep practicing!")
|
|
1030
1037
|
}, l > 0) {
|
|
1031
1038
|
const o = i("eitherOr.results.livesBonus", { count: l }) || (l === 1 ? "And with 1 life to spare!" : `And with ${l} lives to spare!`);
|
|
1032
|
-
|
|
1039
|
+
h = { ...h, message: `${h.message} ${o}` };
|
|
1033
1040
|
}
|
|
1034
|
-
return
|
|
1035
|
-
},
|
|
1041
|
+
return h;
|
|
1042
|
+
}, ut = ({
|
|
1036
1043
|
stepInfo: e,
|
|
1037
1044
|
game: n,
|
|
1038
1045
|
sdk: l,
|
|
1039
1046
|
onPlayAgain: i,
|
|
1040
1047
|
brandingPrimaryColor: s,
|
|
1041
|
-
additionalCTA:
|
|
1048
|
+
additionalCTA: h
|
|
1042
1049
|
}) => {
|
|
1043
|
-
var X, Z, te, ae, ne, Q, de, _,
|
|
1044
|
-
const { t: o } = ee(), m = K(), c = s || m.palette.primary.plainColor, u = m.palette.primary.onPrimary,
|
|
1045
|
-
if (
|
|
1050
|
+
var X, Z, te, ae, ne, Q, de, _, he;
|
|
1051
|
+
const { t: o } = ee(), m = K(), c = s || m.palette.primary.plainColor, u = m.palette.primary.onPrimary, f = ((Z = (X = n == null ? void 0 : n.branding) == null ? void 0 : X.colors) == null ? void 0 : Z.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 = Te(), y = ke().primary, d = Se(), R = Ve(), S = le(c || ""), T = S ? S.replace(/[^\d,]/g, "") : null, B = d ? ((ae = (te = n == null ? void 0 : n.branding) == null ? void 0 : te.images) == null ? void 0 : ae.mobileLogo) || ((Q = (ne = n == null ? void 0 : n.branding) == null ? void 0 : ne.images) == null ? void 0 : Q.mainLogo) || "" : ((_ = (de = n == null ? void 0 : n.branding) == null ? void 0 : de.images) == null ? void 0 : _.mainLogo) || "", [P, D] = O(0), [L, N] = O(null), $ = (e == null ? void 0 : e.currentPoints) ?? 0, z = P > 0 && $ >= P;
|
|
1052
|
+
if (fe(() => {
|
|
1046
1053
|
n && (async () => {
|
|
1047
1054
|
try {
|
|
1048
|
-
const
|
|
1049
|
-
D(
|
|
1055
|
+
const H = await l.miniGames.getMyEitherOrStats(n.id);
|
|
1056
|
+
D(H.personalBest ?? 0), N(H.betterThan ?? null);
|
|
1050
1057
|
} catch {
|
|
1051
1058
|
}
|
|
1052
1059
|
})();
|
|
1053
1060
|
}, [e, n, l]), !e) return null;
|
|
1054
|
-
const
|
|
1061
|
+
const v = e.steps.filter((U) => U.played), G = v.filter((U) => U.correct === !0).length, M = v.filter(
|
|
1055
1062
|
(U) => U.correct === !1 && U.userSelection !== null
|
|
1056
|
-
).length,
|
|
1063
|
+
).length, j = v.filter(
|
|
1057
1064
|
(U) => U.userSelection === null
|
|
1058
|
-
).length, a =
|
|
1065
|
+
).length, a = v.length, Y = Rn(
|
|
1059
1066
|
G,
|
|
1060
1067
|
a,
|
|
1061
1068
|
e.currentLives,
|
|
1062
1069
|
o
|
|
1063
|
-
),
|
|
1070
|
+
), k = a > 0 ? G / a * 100 : 0, V = a > 0 ? M / a * 100 : 0, J = a > 0 ? j / a * 100 : 0;
|
|
1064
1071
|
return /* @__PURE__ */ g(
|
|
1065
1072
|
r,
|
|
1066
1073
|
{
|
|
@@ -1076,14 +1083,14 @@ const Rn = (e, n) => {
|
|
|
1076
1083
|
}
|
|
1077
1084
|
},
|
|
1078
1085
|
children: [
|
|
1079
|
-
|
|
1086
|
+
z && /* @__PURE__ */ g(
|
|
1080
1087
|
r,
|
|
1081
1088
|
{
|
|
1082
1089
|
sx: {
|
|
1083
1090
|
position: "relative",
|
|
1084
1091
|
overflow: "hidden",
|
|
1085
1092
|
borderRadius: E,
|
|
1086
|
-
background:
|
|
1093
|
+
background: T ? `linear-gradient(135deg, rgba(${T},0.92) 0%, rgba(${T},0.72) 100%)` : `linear-gradient(135deg, ${c}EB 0%, ${c}B8 100%)`,
|
|
1087
1094
|
p: "20px 20px 18px",
|
|
1088
1095
|
display: "flex",
|
|
1089
1096
|
alignItems: "center",
|
|
@@ -1148,7 +1155,7 @@ const Rn = (e, n) => {
|
|
|
1148
1155
|
alignItems: "center",
|
|
1149
1156
|
justifyContent: "center"
|
|
1150
1157
|
},
|
|
1151
|
-
children: /* @__PURE__ */ t(
|
|
1158
|
+
children: /* @__PURE__ */ t($e, { sx: { fontSize: "1.9em", color: "#fff" } })
|
|
1152
1159
|
}
|
|
1153
1160
|
)
|
|
1154
1161
|
]
|
|
@@ -1267,12 +1274,12 @@ const Rn = (e, n) => {
|
|
|
1267
1274
|
width: 52,
|
|
1268
1275
|
height: 52,
|
|
1269
1276
|
borderRadius: "50%",
|
|
1270
|
-
bgcolor:
|
|
1277
|
+
bgcolor: T ? `rgba(${T},0.14)` : `${c}24`,
|
|
1271
1278
|
display: "flex",
|
|
1272
1279
|
alignItems: "center",
|
|
1273
1280
|
justifyContent: "center"
|
|
1274
1281
|
},
|
|
1275
|
-
children: /* @__PURE__ */ t(
|
|
1282
|
+
children: /* @__PURE__ */ t($e, { sx: { fontSize: "1.75em", color: c } })
|
|
1276
1283
|
}
|
|
1277
1284
|
),
|
|
1278
1285
|
/* @__PURE__ */ t(
|
|
@@ -1296,7 +1303,7 @@ const Rn = (e, n) => {
|
|
|
1296
1303
|
fontWeight: 900,
|
|
1297
1304
|
lineHeight: 1,
|
|
1298
1305
|
color: c,
|
|
1299
|
-
textShadow:
|
|
1306
|
+
textShadow: T ? `0 2px 24px rgba(${T},0.35)` : `0 2px 24px ${c}59`,
|
|
1300
1307
|
animation: "eoScorePop 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.1s both",
|
|
1301
1308
|
"@keyframes eoScorePop": {
|
|
1302
1309
|
from: { opacity: 0, transform: "scale(0.5)" },
|
|
@@ -1331,21 +1338,21 @@ const Rn = (e, n) => {
|
|
|
1331
1338
|
bgcolor: m.surfaceVariant
|
|
1332
1339
|
},
|
|
1333
1340
|
children: [
|
|
1334
|
-
|
|
1341
|
+
k > 0 && /* @__PURE__ */ t(
|
|
1335
1342
|
r,
|
|
1336
1343
|
{
|
|
1337
1344
|
sx: {
|
|
1338
|
-
width: `${
|
|
1345
|
+
width: `${k}%`,
|
|
1339
1346
|
bgcolor: b,
|
|
1340
1347
|
transition: "width 0.7s ease"
|
|
1341
1348
|
}
|
|
1342
1349
|
}
|
|
1343
1350
|
),
|
|
1344
|
-
|
|
1351
|
+
V > 0 && /* @__PURE__ */ t(
|
|
1345
1352
|
r,
|
|
1346
1353
|
{
|
|
1347
1354
|
sx: {
|
|
1348
|
-
width: `${
|
|
1355
|
+
width: `${V}%`,
|
|
1349
1356
|
bgcolor: p,
|
|
1350
1357
|
transition: "width 0.7s ease 0.1s"
|
|
1351
1358
|
}
|
|
@@ -1367,7 +1374,7 @@ const Rn = (e, n) => {
|
|
|
1367
1374
|
/* @__PURE__ */ t(je, { direction: "row", spacing: 1, children: [
|
|
1368
1375
|
{
|
|
1369
1376
|
icon: /* @__PURE__ */ t(
|
|
1370
|
-
|
|
1377
|
+
ct,
|
|
1371
1378
|
{
|
|
1372
1379
|
sx: { fontSize: "1.25em", color: b }
|
|
1373
1380
|
}
|
|
@@ -1379,7 +1386,7 @@ const Rn = (e, n) => {
|
|
|
1379
1386
|
labelSx: { color: b }
|
|
1380
1387
|
},
|
|
1381
1388
|
{
|
|
1382
|
-
icon: /* @__PURE__ */ t(
|
|
1389
|
+
icon: /* @__PURE__ */ t(dt, { sx: { fontSize: "1.25em", color: p } }),
|
|
1383
1390
|
value: M,
|
|
1384
1391
|
label: o("eitherOr.results.wrong", "Wrong"),
|
|
1385
1392
|
bg: A,
|
|
@@ -1388,12 +1395,12 @@ const Rn = (e, n) => {
|
|
|
1388
1395
|
},
|
|
1389
1396
|
{
|
|
1390
1397
|
icon: /* @__PURE__ */ t(
|
|
1391
|
-
|
|
1398
|
+
Cn,
|
|
1392
1399
|
{
|
|
1393
1400
|
sx: { fontSize: "1.25em", color: m.textColor }
|
|
1394
1401
|
}
|
|
1395
1402
|
),
|
|
1396
|
-
value:
|
|
1403
|
+
value: j,
|
|
1397
1404
|
label: o("eitherOr.results.missed", "Missed"),
|
|
1398
1405
|
bg: m.surfaceVariant,
|
|
1399
1406
|
valueSx: { color: m.textColor },
|
|
@@ -1437,7 +1444,7 @@ const Rn = (e, n) => {
|
|
|
1437
1444
|
},
|
|
1438
1445
|
U.label
|
|
1439
1446
|
)) }),
|
|
1440
|
-
|
|
1447
|
+
P > 0 && L !== null && L > 0 && /* @__PURE__ */ g(
|
|
1441
1448
|
r,
|
|
1442
1449
|
{
|
|
1443
1450
|
sx: {
|
|
@@ -1464,7 +1471,7 @@ const Rn = (e, n) => {
|
|
|
1464
1471
|
},
|
|
1465
1472
|
children: [
|
|
1466
1473
|
/* @__PURE__ */ t(
|
|
1467
|
-
|
|
1474
|
+
Pn,
|
|
1468
1475
|
{
|
|
1469
1476
|
sx: { color: c, fontSize: "1.4em", flexShrink: 0 }
|
|
1470
1477
|
}
|
|
@@ -1478,8 +1485,8 @@ const Rn = (e, n) => {
|
|
|
1478
1485
|
lineHeight: 1.5
|
|
1479
1486
|
},
|
|
1480
1487
|
children: o("eitherOr.betterThanLabel", {
|
|
1481
|
-
points:
|
|
1482
|
-
percentile:
|
|
1488
|
+
points: z ? $ : P,
|
|
1489
|
+
percentile: L
|
|
1483
1490
|
})
|
|
1484
1491
|
}
|
|
1485
1492
|
)
|
|
@@ -1491,7 +1498,7 @@ const Rn = (e, n) => {
|
|
|
1491
1498
|
{
|
|
1492
1499
|
sx: {
|
|
1493
1500
|
display: "flex",
|
|
1494
|
-
flexDirection:
|
|
1501
|
+
flexDirection: R ? "column-reverse" : "row",
|
|
1495
1502
|
justifyContent: B ? "space-between" : "flex-end",
|
|
1496
1503
|
alignItems: "center",
|
|
1497
1504
|
gap: I.lg
|
|
@@ -1501,15 +1508,15 @@ const Rn = (e, n) => {
|
|
|
1501
1508
|
me,
|
|
1502
1509
|
{
|
|
1503
1510
|
brandingLogo: B,
|
|
1504
|
-
textColor:
|
|
1505
|
-
label: ((
|
|
1511
|
+
textColor: f,
|
|
1512
|
+
label: ((he = n == null ? void 0 : n.labels) == null ? void 0 : he.sponsor) || null
|
|
1506
1513
|
}
|
|
1507
1514
|
),
|
|
1508
1515
|
/* @__PURE__ */ t(
|
|
1509
1516
|
ye,
|
|
1510
1517
|
{
|
|
1511
1518
|
variant: "soft",
|
|
1512
|
-
endDecorator: /* @__PURE__ */ t(
|
|
1519
|
+
endDecorator: /* @__PURE__ */ t(mt, { children: /* @__PURE__ */ t(xt, {}) }),
|
|
1513
1520
|
onClick: i,
|
|
1514
1521
|
sx: {
|
|
1515
1522
|
borderRadius: w,
|
|
@@ -1545,9 +1552,9 @@ const Rn = (e, n) => {
|
|
|
1545
1552
|
}
|
|
1546
1553
|
),
|
|
1547
1554
|
/* @__PURE__ */ t(
|
|
1548
|
-
|
|
1555
|
+
Qt,
|
|
1549
1556
|
{
|
|
1550
|
-
additionalCTA:
|
|
1557
|
+
additionalCTA: h,
|
|
1551
1558
|
buttonStyle: {
|
|
1552
1559
|
borderRadius: w,
|
|
1553
1560
|
width: "100%",
|
|
@@ -1567,24 +1574,24 @@ const Rn = (e, n) => {
|
|
|
1567
1574
|
]
|
|
1568
1575
|
}
|
|
1569
1576
|
);
|
|
1570
|
-
},
|
|
1577
|
+
}, Ln = 150, On = ({
|
|
1571
1578
|
breakdown: e,
|
|
1572
1579
|
currentPoints: n,
|
|
1573
1580
|
primaryColor: l,
|
|
1574
1581
|
textColor: i
|
|
1575
1582
|
}) => {
|
|
1576
|
-
const { t: s } = ee(),
|
|
1577
|
-
if (
|
|
1578
|
-
const
|
|
1583
|
+
const { t: s } = ee(), h = en(), o = (z) => z.toLocaleString(h), m = K(), c = pe(), u = Te(), f = ke().primary, b = m.outlineEnabledBorder, p = le(l), [x, A] = O(null), [E, w] = O(!1);
|
|
1584
|
+
if (fe(() => {
|
|
1585
|
+
const z = requestAnimationFrame(() => {
|
|
1579
1586
|
setTimeout(() => w(!0), 80);
|
|
1580
1587
|
});
|
|
1581
|
-
return () => cancelAnimationFrame(
|
|
1588
|
+
return () => cancelAnimationFrame(z);
|
|
1582
1589
|
}, []), !e || e.length === 0)
|
|
1583
1590
|
return /* @__PURE__ */ t(r, { sx: { py: u.lg, textAlign: "center" }, children: /* @__PURE__ */ t(
|
|
1584
1591
|
C,
|
|
1585
1592
|
{
|
|
1586
1593
|
sx: {
|
|
1587
|
-
fontFamily:
|
|
1594
|
+
fontFamily: f,
|
|
1588
1595
|
color: i,
|
|
1589
1596
|
opacity: 0.4,
|
|
1590
1597
|
fontSize: "0.875em"
|
|
@@ -1592,19 +1599,19 @@ const Rn = (e, n) => {
|
|
|
1592
1599
|
children: "No distribution data available."
|
|
1593
1600
|
}
|
|
1594
1601
|
) });
|
|
1595
|
-
const I = e.filter((
|
|
1596
|
-
(
|
|
1597
|
-
) ?? null : null,
|
|
1598
|
-
(
|
|
1599
|
-
) : -1, B = x !== null ? I[x] : null,
|
|
1602
|
+
const I = e.filter((z) => z.totalUsers > 0), y = Math.max(...I.map((z) => z.totalUsers), 1), d = Math.log(y + 1), R = e.reduce((z, v) => z + v.totalUsers, 0), S = n != null ? e.find(
|
|
1603
|
+
(z) => n >= z.rangeStartInclusive && n <= z.rangeEndInclusive
|
|
1604
|
+
) ?? null : null, T = S ? I.findIndex(
|
|
1605
|
+
(z) => z.rangeStartInclusive === S.rangeStartInclusive
|
|
1606
|
+
) : -1, B = x !== null ? I[x] : null, P = B ? `${o(B.rangeStartInclusive)} – ${o(B.rangeEndInclusive)} ${s("eitherOr.standings.pts", "pts")}` : S ? s("eitherOr.standings.yourRange", "Your range: {{start}} – {{end}}", {
|
|
1600
1607
|
start: o(S.rangeStartInclusive),
|
|
1601
1608
|
end: o(S.rangeEndInclusive)
|
|
1602
|
-
}) : null, D = B ? B.totalUsers : S ? S.totalUsers : null,
|
|
1603
|
-
(I.length - 1) / (
|
|
1609
|
+
}) : null, D = B ? B.totalUsers : S ? S.totalUsers : null, L = 5, N = Math.floor(
|
|
1610
|
+
(I.length - 1) / (L - 1)
|
|
1604
1611
|
), $ = new Set(
|
|
1605
1612
|
Array.from(
|
|
1606
|
-
{ length:
|
|
1607
|
-
(
|
|
1613
|
+
{ length: L },
|
|
1614
|
+
(z, v) => Math.min(v * N, I.length - 1)
|
|
1608
1615
|
)
|
|
1609
1616
|
);
|
|
1610
1617
|
return /* @__PURE__ */ g(
|
|
@@ -1648,7 +1655,7 @@ const Rn = (e, n) => {
|
|
|
1648
1655
|
C,
|
|
1649
1656
|
{
|
|
1650
1657
|
sx: {
|
|
1651
|
-
fontFamily:
|
|
1658
|
+
fontFamily: f,
|
|
1652
1659
|
fontSize: "0.7em",
|
|
1653
1660
|
fontWeight: 700,
|
|
1654
1661
|
color: i,
|
|
@@ -1662,14 +1669,14 @@ const Rn = (e, n) => {
|
|
|
1662
1669
|
C,
|
|
1663
1670
|
{
|
|
1664
1671
|
sx: {
|
|
1665
|
-
fontFamily:
|
|
1672
|
+
fontFamily: f,
|
|
1666
1673
|
fontSize: "0.7em",
|
|
1667
1674
|
fontWeight: 500,
|
|
1668
1675
|
color: i,
|
|
1669
1676
|
opacity: 0.6
|
|
1670
1677
|
},
|
|
1671
1678
|
children: s("eitherOr.standings.totalUsers", "{{count}} users", {
|
|
1672
|
-
count:
|
|
1679
|
+
count: R
|
|
1673
1680
|
})
|
|
1674
1681
|
}
|
|
1675
1682
|
)
|
|
@@ -1687,29 +1694,29 @@ const Rn = (e, n) => {
|
|
|
1687
1694
|
py: "10px",
|
|
1688
1695
|
mb: u.md,
|
|
1689
1696
|
borderRadius: c.xs,
|
|
1690
|
-
borderLeft: `3px solid ${
|
|
1697
|
+
borderLeft: `3px solid ${P ? l : b}`,
|
|
1691
1698
|
backgroundColor: B ? `rgba(${le(b)}, 0.6)` : `rgba(${le(b)}, 0.35)`,
|
|
1692
1699
|
transition: "background-color 200ms ease, border-left-color 200ms ease"
|
|
1693
1700
|
},
|
|
1694
|
-
children:
|
|
1701
|
+
children: P ? /* @__PURE__ */ g(et, { children: [
|
|
1695
1702
|
/* @__PURE__ */ t(
|
|
1696
1703
|
C,
|
|
1697
1704
|
{
|
|
1698
1705
|
sx: {
|
|
1699
|
-
fontFamily:
|
|
1706
|
+
fontFamily: f,
|
|
1700
1707
|
fontSize: "0.8em",
|
|
1701
1708
|
color: l,
|
|
1702
1709
|
fontWeight: 700,
|
|
1703
1710
|
letterSpacing: "0.01em"
|
|
1704
1711
|
},
|
|
1705
|
-
children:
|
|
1712
|
+
children: P
|
|
1706
1713
|
}
|
|
1707
1714
|
),
|
|
1708
1715
|
/* @__PURE__ */ t(
|
|
1709
1716
|
C,
|
|
1710
1717
|
{
|
|
1711
1718
|
sx: {
|
|
1712
|
-
fontFamily:
|
|
1719
|
+
fontFamily: f,
|
|
1713
1720
|
fontSize: "0.75em",
|
|
1714
1721
|
color: i,
|
|
1715
1722
|
fontWeight: 600
|
|
@@ -1723,7 +1730,7 @@ const Rn = (e, n) => {
|
|
|
1723
1730
|
C,
|
|
1724
1731
|
{
|
|
1725
1732
|
sx: {
|
|
1726
|
-
fontFamily:
|
|
1733
|
+
fontFamily: f,
|
|
1727
1734
|
fontSize: "0.75em",
|
|
1728
1735
|
color: i,
|
|
1729
1736
|
opacity: 0.4,
|
|
@@ -1741,11 +1748,11 @@ const Rn = (e, n) => {
|
|
|
1741
1748
|
display: "flex",
|
|
1742
1749
|
alignItems: "flex-end",
|
|
1743
1750
|
gap: "3px",
|
|
1744
|
-
height: `${
|
|
1751
|
+
height: `${Ln}px`,
|
|
1745
1752
|
width: "100%"
|
|
1746
1753
|
},
|
|
1747
|
-
children: I.map((
|
|
1748
|
-
const G =
|
|
1754
|
+
children: I.map((z, v) => {
|
|
1755
|
+
const G = v === T, M = x === v, j = Math.log(z.totalUsers + 1) / d * 100, a = G || M ? l : `rgba(${p}, 0.5)`;
|
|
1749
1756
|
return /* @__PURE__ */ t(
|
|
1750
1757
|
r,
|
|
1751
1758
|
{
|
|
@@ -1756,10 +1763,10 @@ const Rn = (e, n) => {
|
|
|
1756
1763
|
alignItems: "flex-end",
|
|
1757
1764
|
cursor: "pointer"
|
|
1758
1765
|
},
|
|
1759
|
-
onMouseEnter: () => A(
|
|
1766
|
+
onMouseEnter: () => A(v),
|
|
1760
1767
|
onMouseLeave: () => A(null),
|
|
1761
1768
|
onTouchStart: (Y) => {
|
|
1762
|
-
Y.preventDefault(), A(
|
|
1769
|
+
Y.preventDefault(), A(v);
|
|
1763
1770
|
},
|
|
1764
1771
|
onTouchEnd: () => setTimeout(() => A(null), 2e3),
|
|
1765
1772
|
children: /* @__PURE__ */ t(
|
|
@@ -1767,12 +1774,12 @@ const Rn = (e, n) => {
|
|
|
1767
1774
|
{
|
|
1768
1775
|
sx: {
|
|
1769
1776
|
width: "100%",
|
|
1770
|
-
height: E ? `${
|
|
1777
|
+
height: E ? `${j}%` : "0%",
|
|
1771
1778
|
borderRadius: "3px 3px 1px 1px",
|
|
1772
1779
|
backgroundColor: a,
|
|
1773
1780
|
boxShadow: G || M ? `0 0 10px rgba(${p}, 0.4), 0 0 3px rgba(${p}, 0.2)` : "none",
|
|
1774
1781
|
transition: [
|
|
1775
|
-
`height 480ms cubic-bezier(0.34, 1.56, 0.64, 1) ${
|
|
1782
|
+
`height 480ms cubic-bezier(0.34, 1.56, 0.64, 1) ${v * 18}ms`,
|
|
1776
1783
|
"background-color 150ms ease",
|
|
1777
1784
|
"box-shadow 150ms ease"
|
|
1778
1785
|
].join(", "),
|
|
@@ -1791,61 +1798,61 @@ const Rn = (e, n) => {
|
|
|
1791
1798
|
}
|
|
1792
1799
|
)
|
|
1793
1800
|
},
|
|
1794
|
-
|
|
1801
|
+
v
|
|
1795
1802
|
);
|
|
1796
1803
|
})
|
|
1797
1804
|
}
|
|
1798
1805
|
),
|
|
1799
1806
|
/* @__PURE__ */ t(r, { sx: { height: "1px", backgroundColor: b, mt: "1px" } }),
|
|
1800
|
-
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: I.map((
|
|
1801
|
-
if (!$.has(
|
|
1802
|
-
const G = I.length > 1 ?
|
|
1807
|
+
/* @__PURE__ */ t(r, { sx: { position: "relative", height: "18px", mt: "4px" }, children: I.map((z, v) => {
|
|
1808
|
+
if (!$.has(v)) return null;
|
|
1809
|
+
const G = I.length > 1 ? v / (I.length - 1) * 100 : 0, M = v === 0, j = v === I.length - 1;
|
|
1803
1810
|
return /* @__PURE__ */ t(
|
|
1804
1811
|
C,
|
|
1805
1812
|
{
|
|
1806
1813
|
sx: {
|
|
1807
1814
|
position: "absolute",
|
|
1808
1815
|
left: `${G}%`,
|
|
1809
|
-
transform: M ? "none" :
|
|
1816
|
+
transform: M ? "none" : j ? "translateX(-100%)" : "translateX(-50%)",
|
|
1810
1817
|
fontSize: "0.6em",
|
|
1811
|
-
fontFamily:
|
|
1818
|
+
fontFamily: f,
|
|
1812
1819
|
color: i,
|
|
1813
1820
|
opacity: 0.4,
|
|
1814
1821
|
lineHeight: 1,
|
|
1815
1822
|
userSelect: "none"
|
|
1816
1823
|
},
|
|
1817
|
-
children: o(
|
|
1824
|
+
children: o(z.rangeStartInclusive)
|
|
1818
1825
|
},
|
|
1819
|
-
|
|
1826
|
+
v
|
|
1820
1827
|
);
|
|
1821
1828
|
}) })
|
|
1822
1829
|
]
|
|
1823
1830
|
}
|
|
1824
1831
|
);
|
|
1825
|
-
},
|
|
1832
|
+
}, Je = 10, qt = ({
|
|
1826
1833
|
game: e,
|
|
1827
1834
|
sdk: n,
|
|
1828
1835
|
stepInfo: l,
|
|
1829
1836
|
brandingPrimaryColor: i
|
|
1830
1837
|
}) => {
|
|
1831
1838
|
var Y;
|
|
1832
|
-
const { t: s } = ee(),
|
|
1833
|
-
|
|
1839
|
+
const { t: s } = ee(), h = Ne(), o = K(), m = ((Y = e == null ? void 0 : e.branding) == null ? void 0 : Y.colors) || null, c = i || (m == null ? void 0 : m.primaryColor) || o.palette.primary.plainColor, u = (m == null ? void 0 : m.contentColor) || o.textColor, f = ke().primary, b = ke().secondary, p = pe(), x = Te(), A = Ve(), E = o.surfaceVariant, w = h.colorSchemes.light.palette.primary.onPrimary, I = o.outlineEnabledBorder, [y, d] = O(null), [R, S] = O(!0), [T, B] = O(0), [P, D] = O(null), [L, N] = O("leaderboard"), $ = Lt(), z = (l == null ? void 0 : l.currentPoints) ?? 0;
|
|
1840
|
+
fe(() => {
|
|
1834
1841
|
(async () => {
|
|
1835
1842
|
try {
|
|
1836
1843
|
if (!e) return;
|
|
1837
|
-
const [
|
|
1844
|
+
const [V, J] = await Promise.all([
|
|
1838
1845
|
n.miniGames.getEitherOrResults(e.id, $),
|
|
1839
1846
|
n.profile.getOwn().getInfo().catch(() => null)
|
|
1840
1847
|
]), X = (J == null ? void 0 : J.id) ?? null;
|
|
1841
|
-
if (D(X), X &&
|
|
1848
|
+
if (D(X), X && V.standings.some(
|
|
1842
1849
|
(te) => te.userId === X
|
|
1843
1850
|
)) {
|
|
1844
|
-
d(
|
|
1851
|
+
d(V);
|
|
1845
1852
|
return;
|
|
1846
1853
|
}
|
|
1847
|
-
if (
|
|
1848
|
-
const Z = [...
|
|
1854
|
+
if (z > 0) {
|
|
1855
|
+
const Z = [...V.standings], te = {
|
|
1849
1856
|
userId: "current",
|
|
1850
1857
|
userModel: {
|
|
1851
1858
|
id: "current",
|
|
@@ -1863,20 +1870,20 @@ const Rn = (e, n) => {
|
|
|
1863
1870
|
followingCount: 0,
|
|
1864
1871
|
followersCount: 0
|
|
1865
1872
|
},
|
|
1866
|
-
personalBest:
|
|
1873
|
+
personalBest: z.toString()
|
|
1867
1874
|
}, ae = Z.findIndex(
|
|
1868
|
-
(ne) => Number.parseInt(ne.personalBest) <
|
|
1875
|
+
(ne) => Number.parseInt(ne.personalBest) < z
|
|
1869
1876
|
);
|
|
1870
|
-
ae >= 0 && ae < 50 && (Z.splice(ae, 0, te),
|
|
1877
|
+
ae >= 0 && ae < 50 && (Z.splice(ae, 0, te), V.standings = Z);
|
|
1871
1878
|
}
|
|
1872
|
-
d(
|
|
1879
|
+
d(V);
|
|
1873
1880
|
} catch {
|
|
1874
1881
|
} finally {
|
|
1875
1882
|
S(!1);
|
|
1876
1883
|
}
|
|
1877
1884
|
})();
|
|
1878
1885
|
}, [e, n, l, $]);
|
|
1879
|
-
const
|
|
1886
|
+
const v = {
|
|
1880
1887
|
tableContainer: {
|
|
1881
1888
|
overflowX: "auto",
|
|
1882
1889
|
borderRadius: p.md,
|
|
@@ -1891,7 +1898,7 @@ const Rn = (e, n) => {
|
|
|
1891
1898
|
"& > thead > tr > th": {
|
|
1892
1899
|
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1893
1900
|
color: u,
|
|
1894
|
-
fontFamily:
|
|
1901
|
+
fontFamily: f,
|
|
1895
1902
|
fontWeight: 600,
|
|
1896
1903
|
fontSize: "0.875em",
|
|
1897
1904
|
textAlign: "center",
|
|
@@ -1901,7 +1908,7 @@ const Rn = (e, n) => {
|
|
|
1901
1908
|
headerCellPosition: {
|
|
1902
1909
|
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1903
1910
|
color: u,
|
|
1904
|
-
fontFamily:
|
|
1911
|
+
fontFamily: f,
|
|
1905
1912
|
fontWeight: 600,
|
|
1906
1913
|
fontSize: "0.875em",
|
|
1907
1914
|
textAlign: "center",
|
|
@@ -1911,7 +1918,7 @@ const Rn = (e, n) => {
|
|
|
1911
1918
|
headerCellName: {
|
|
1912
1919
|
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1913
1920
|
color: u,
|
|
1914
|
-
fontFamily:
|
|
1921
|
+
fontFamily: f,
|
|
1915
1922
|
fontWeight: 600,
|
|
1916
1923
|
fontSize: "0.875em",
|
|
1917
1924
|
textAlign: "left",
|
|
@@ -1921,7 +1928,7 @@ const Rn = (e, n) => {
|
|
|
1921
1928
|
headerCellPoints: {
|
|
1922
1929
|
backgroundColor: `rgba(${le(E)}, 0.8)`,
|
|
1923
1930
|
color: u,
|
|
1924
|
-
fontFamily:
|
|
1931
|
+
fontFamily: f,
|
|
1925
1932
|
fontWeight: 600,
|
|
1926
1933
|
fontSize: "0.875em",
|
|
1927
1934
|
textAlign: "center",
|
|
@@ -1956,7 +1963,7 @@ const Rn = (e, n) => {
|
|
|
1956
1963
|
color: w
|
|
1957
1964
|
},
|
|
1958
1965
|
nameText: {
|
|
1959
|
-
fontFamily:
|
|
1966
|
+
fontFamily: f,
|
|
1960
1967
|
fontWeight: 500,
|
|
1961
1968
|
fontSize: "0.875em",
|
|
1962
1969
|
color: u,
|
|
@@ -1965,13 +1972,13 @@ const Rn = (e, n) => {
|
|
|
1965
1972
|
whiteSpace: "nowrap"
|
|
1966
1973
|
},
|
|
1967
1974
|
positionText: {
|
|
1968
|
-
fontFamily:
|
|
1975
|
+
fontFamily: f,
|
|
1969
1976
|
fontWeight: 600,
|
|
1970
1977
|
fontSize: "0.875em",
|
|
1971
1978
|
color: u
|
|
1972
1979
|
},
|
|
1973
1980
|
pointsText: {
|
|
1974
|
-
fontFamily:
|
|
1981
|
+
fontFamily: f,
|
|
1975
1982
|
fontWeight: 600,
|
|
1976
1983
|
fontSize: "0.875em",
|
|
1977
1984
|
color: u
|
|
@@ -1985,8 +1992,8 @@ const Rn = (e, n) => {
|
|
|
1985
1992
|
marginY: x.md
|
|
1986
1993
|
}
|
|
1987
1994
|
};
|
|
1988
|
-
if (
|
|
1989
|
-
return /* @__PURE__ */ t(
|
|
1995
|
+
if (R)
|
|
1996
|
+
return /* @__PURE__ */ t(lt, { my: 10 });
|
|
1990
1997
|
if (!(y != null && y.standings) || y.standings.length === 0)
|
|
1991
1998
|
return /* @__PURE__ */ t(
|
|
1992
1999
|
r,
|
|
@@ -1998,12 +2005,12 @@ const Rn = (e, n) => {
|
|
|
1998
2005
|
height: "100%",
|
|
1999
2006
|
flex: 1
|
|
2000
2007
|
},
|
|
2001
|
-
children: /* @__PURE__ */ t(C, { level: "body-lg", sx:
|
|
2008
|
+
children: /* @__PURE__ */ t(C, { level: "body-lg", sx: v.noLeaderboardText, children: s("common.labels.noData", "No standings available yet.") })
|
|
2002
2009
|
}
|
|
2003
2010
|
);
|
|
2004
|
-
const G = y.standings, M = Math.ceil(G.length /
|
|
2005
|
-
|
|
2006
|
-
(
|
|
2011
|
+
const G = y.standings, M = Math.ceil(G.length / Je), j = G.slice(
|
|
2012
|
+
T * Je,
|
|
2013
|
+
(T + 1) * Je
|
|
2007
2014
|
), a = [
|
|
2008
2015
|
{
|
|
2009
2016
|
id: "leaderboard",
|
|
@@ -2033,12 +2040,12 @@ const Rn = (e, n) => {
|
|
|
2033
2040
|
p: "3px",
|
|
2034
2041
|
gap: x.xs
|
|
2035
2042
|
},
|
|
2036
|
-
children: a.map((
|
|
2037
|
-
const
|
|
2043
|
+
children: a.map((k) => {
|
|
2044
|
+
const V = L === k.id;
|
|
2038
2045
|
return /* @__PURE__ */ t(
|
|
2039
2046
|
r,
|
|
2040
2047
|
{
|
|
2041
|
-
onClick: () =>
|
|
2048
|
+
onClick: () => N(k.id),
|
|
2042
2049
|
sx: {
|
|
2043
2050
|
flex: 1,
|
|
2044
2051
|
display: "flex",
|
|
@@ -2046,7 +2053,7 @@ const Rn = (e, n) => {
|
|
|
2046
2053
|
justifyContent: "center",
|
|
2047
2054
|
p: x.xs,
|
|
2048
2055
|
borderRadius: `calc(${p["2xl"]} - 3px)`,
|
|
2049
|
-
backgroundColor:
|
|
2056
|
+
backgroundColor: V ? c : E,
|
|
2050
2057
|
cursor: "pointer",
|
|
2051
2058
|
transition: "background-color 220ms ease",
|
|
2052
2059
|
userSelect: "none",
|
|
@@ -2056,29 +2063,29 @@ const Rn = (e, n) => {
|
|
|
2056
2063
|
C,
|
|
2057
2064
|
{
|
|
2058
2065
|
sx: {
|
|
2059
|
-
fontFamily:
|
|
2060
|
-
fontWeight:
|
|
2066
|
+
fontFamily: f,
|
|
2067
|
+
fontWeight: V ? 700 : 500,
|
|
2061
2068
|
fontSize: "0.8em",
|
|
2062
|
-
color:
|
|
2063
|
-
opacity:
|
|
2069
|
+
color: V ? w : u,
|
|
2070
|
+
opacity: V ? 1 : 0.45,
|
|
2064
2071
|
transition: "color 220ms ease, opacity 220ms ease",
|
|
2065
2072
|
lineHeight: 1
|
|
2066
2073
|
},
|
|
2067
|
-
children:
|
|
2074
|
+
children: k.label
|
|
2068
2075
|
}
|
|
2069
2076
|
)
|
|
2070
2077
|
},
|
|
2071
|
-
|
|
2078
|
+
k.id
|
|
2072
2079
|
);
|
|
2073
2080
|
})
|
|
2074
2081
|
}
|
|
2075
2082
|
),
|
|
2076
|
-
|
|
2083
|
+
L === "leaderboard" && /* @__PURE__ */ g(et, { children: [
|
|
2077
2084
|
/* @__PURE__ */ t(
|
|
2078
2085
|
C,
|
|
2079
2086
|
{
|
|
2080
2087
|
sx: {
|
|
2081
|
-
fontFamily:
|
|
2088
|
+
fontFamily: f,
|
|
2082
2089
|
fontWeight: 700,
|
|
2083
2090
|
fontSize: "1.5em",
|
|
2084
2091
|
color: u,
|
|
@@ -2087,39 +2094,39 @@ const Rn = (e, n) => {
|
|
|
2087
2094
|
children: s("eitherOr.leaderboard.top50Note", "Top 50")
|
|
2088
2095
|
}
|
|
2089
2096
|
),
|
|
2090
|
-
/* @__PURE__ */ t(
|
|
2091
|
-
|
|
2097
|
+
/* @__PURE__ */ t(xn, { sx: v.tableContainer, children: /* @__PURE__ */ g(
|
|
2098
|
+
bn,
|
|
2092
2099
|
{
|
|
2093
2100
|
variant: "outlined",
|
|
2094
2101
|
hoverRow: !1,
|
|
2095
2102
|
borderAxis: "bothBetween",
|
|
2096
2103
|
size: "sm",
|
|
2097
|
-
sx:
|
|
2104
|
+
sx: v.table,
|
|
2098
2105
|
children: [
|
|
2099
2106
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ g("tr", { children: [
|
|
2100
|
-
/* @__PURE__ */ t("th", { style:
|
|
2101
|
-
/* @__PURE__ */ t("th", { style:
|
|
2102
|
-
/* @__PURE__ */ t("th", { style:
|
|
2107
|
+
/* @__PURE__ */ t("th", { style: v.headerCellPosition, children: A ? "" : s("eitherOr.leaderboard.position", "#") }),
|
|
2108
|
+
/* @__PURE__ */ t("th", { style: v.headerCellName, children: s("eitherOr.leaderboard.name", "Name") }),
|
|
2109
|
+
/* @__PURE__ */ t("th", { style: v.headerCellPoints, children: A ? "🎯" : s("eitherOr.leaderboard.points", "Pts") })
|
|
2103
2110
|
] }) }),
|
|
2104
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2111
|
+
/* @__PURE__ */ t("tbody", { children: j.map((k, V) => {
|
|
2105
2112
|
var ae, ne, Q;
|
|
2106
|
-
const J =
|
|
2113
|
+
const J = T * Je + V, X = k.userId === "current" || P !== null && k.userId === P, Z = ((ae = k.userModel) == null ? void 0 : ae.avatar) || void 0, te = ((ne = k.userModel) == null ? void 0 : ne.nickname) || ((Q = k.userModel) == null ? void 0 : Q.name) || s("common.labels.anonymous", "Anonymous");
|
|
2107
2114
|
return /* @__PURE__ */ g(
|
|
2108
2115
|
"tr",
|
|
2109
2116
|
{
|
|
2110
|
-
style: X ?
|
|
2117
|
+
style: X ? v.userRow : void 0,
|
|
2111
2118
|
children: [
|
|
2112
|
-
/* @__PURE__ */ t("td", { style:
|
|
2119
|
+
/* @__PURE__ */ t("td", { style: v.tableCellPosition, children: /* @__PURE__ */ g(C, { sx: v.positionText, children: [
|
|
2113
2120
|
"#",
|
|
2114
2121
|
J + 1
|
|
2115
2122
|
] }) }),
|
|
2116
|
-
/* @__PURE__ */ t("td", { style:
|
|
2117
|
-
/* @__PURE__ */ t(
|
|
2123
|
+
/* @__PURE__ */ t("td", { style: v.tableCellName, children: /* @__PURE__ */ g(r, { sx: v.nameCell, children: [
|
|
2124
|
+
/* @__PURE__ */ t(yn, { src: Z, sx: v.leaderboardAvatar, children: !Z && /* @__PURE__ */ t(pn, { sx: v.avatarIcon }) }),
|
|
2118
2125
|
/* @__PURE__ */ t(
|
|
2119
2126
|
C,
|
|
2120
2127
|
{
|
|
2121
2128
|
sx: {
|
|
2122
|
-
...
|
|
2129
|
+
...v.nameText,
|
|
2123
2130
|
fontWeight: X ? 700 : 500,
|
|
2124
2131
|
color: X ? c : u
|
|
2125
2132
|
},
|
|
@@ -2127,10 +2134,10 @@ const Rn = (e, n) => {
|
|
|
2127
2134
|
}
|
|
2128
2135
|
)
|
|
2129
2136
|
] }) }),
|
|
2130
|
-
/* @__PURE__ */ t("td", { style:
|
|
2137
|
+
/* @__PURE__ */ t("td", { style: v.tableCellPoints, children: /* @__PURE__ */ t(C, { sx: v.pointsText, children: k.personalBest }) })
|
|
2131
2138
|
]
|
|
2132
2139
|
},
|
|
2133
|
-
`${
|
|
2140
|
+
`${k.userId}-${J}`
|
|
2134
2141
|
);
|
|
2135
2142
|
}) })
|
|
2136
2143
|
]
|
|
@@ -2149,11 +2156,11 @@ const Rn = (e, n) => {
|
|
|
2149
2156
|
/* @__PURE__ */ t(
|
|
2150
2157
|
r,
|
|
2151
2158
|
{
|
|
2152
|
-
onClick: () =>
|
|
2159
|
+
onClick: () => T > 0 && B((k) => k - 1),
|
|
2153
2160
|
sx: {
|
|
2154
|
-
cursor:
|
|
2155
|
-
opacity:
|
|
2156
|
-
fontFamily:
|
|
2161
|
+
cursor: T > 0 ? "pointer" : "default",
|
|
2162
|
+
opacity: T > 0 ? 1 : 0.3,
|
|
2163
|
+
fontFamily: f,
|
|
2157
2164
|
fontSize: "1.25em",
|
|
2158
2165
|
fontWeight: 600,
|
|
2159
2166
|
color: c,
|
|
@@ -2169,13 +2176,13 @@ const Rn = (e, n) => {
|
|
|
2169
2176
|
C,
|
|
2170
2177
|
{
|
|
2171
2178
|
sx: {
|
|
2172
|
-
fontFamily:
|
|
2179
|
+
fontFamily: f,
|
|
2173
2180
|
fontSize: "0.75em",
|
|
2174
2181
|
color: u,
|
|
2175
2182
|
opacity: 0.7
|
|
2176
2183
|
},
|
|
2177
2184
|
children: [
|
|
2178
|
-
|
|
2185
|
+
T + 1,
|
|
2179
2186
|
" / ",
|
|
2180
2187
|
M
|
|
2181
2188
|
]
|
|
@@ -2184,11 +2191,11 @@ const Rn = (e, n) => {
|
|
|
2184
2191
|
/* @__PURE__ */ t(
|
|
2185
2192
|
r,
|
|
2186
2193
|
{
|
|
2187
|
-
onClick: () =>
|
|
2194
|
+
onClick: () => T < M - 1 && B((k) => k + 1),
|
|
2188
2195
|
sx: {
|
|
2189
|
-
cursor:
|
|
2190
|
-
opacity:
|
|
2191
|
-
fontFamily:
|
|
2196
|
+
cursor: T < M - 1 ? "pointer" : "default",
|
|
2197
|
+
opacity: T < M - 1 ? 1 : 0.3,
|
|
2198
|
+
fontFamily: f,
|
|
2192
2199
|
fontSize: "1.25em",
|
|
2193
2200
|
fontWeight: 600,
|
|
2194
2201
|
color: c,
|
|
@@ -2204,11 +2211,11 @@ const Rn = (e, n) => {
|
|
|
2204
2211
|
}
|
|
2205
2212
|
)
|
|
2206
2213
|
] }),
|
|
2207
|
-
|
|
2208
|
-
|
|
2214
|
+
L === "distribution" && /* @__PURE__ */ t(
|
|
2215
|
+
On,
|
|
2209
2216
|
{
|
|
2210
2217
|
breakdown: y.breakdown,
|
|
2211
|
-
currentPoints:
|
|
2218
|
+
currentPoints: z > 0 ? z : void 0,
|
|
2212
2219
|
primaryColor: c,
|
|
2213
2220
|
textColor: u
|
|
2214
2221
|
}
|
|
@@ -2216,11 +2223,11 @@ const Rn = (e, n) => {
|
|
|
2216
2223
|
]
|
|
2217
2224
|
}
|
|
2218
2225
|
);
|
|
2219
|
-
},
|
|
2226
|
+
}, ve = ({
|
|
2220
2227
|
children: e,
|
|
2221
2228
|
brandingBorderColor: n
|
|
2222
2229
|
}) => {
|
|
2223
|
-
const l = pe().md, i = n || K().secondaryContainer, s = K().surface,
|
|
2230
|
+
const l = pe().md, i = n || K().secondaryContainer, s = K().surface, h = tn().size, o = Se(), m = h + " solid " + i;
|
|
2224
2231
|
return /* @__PURE__ */ t(
|
|
2225
2232
|
r,
|
|
2226
2233
|
{
|
|
@@ -2238,38 +2245,38 @@ const Rn = (e, n) => {
|
|
|
2238
2245
|
children: e
|
|
2239
2246
|
}
|
|
2240
2247
|
);
|
|
2241
|
-
},
|
|
2242
|
-
var Y,
|
|
2248
|
+
}, Bn = (e) => {
|
|
2249
|
+
var Y, k;
|
|
2243
2250
|
const {
|
|
2244
2251
|
eitherOr: n,
|
|
2245
2252
|
currentPair: l,
|
|
2246
2253
|
stepInfo: i,
|
|
2247
2254
|
gameState: s,
|
|
2248
|
-
timer:
|
|
2255
|
+
timer: h,
|
|
2249
2256
|
selected: o,
|
|
2250
2257
|
feedback: m,
|
|
2251
2258
|
sdk: c,
|
|
2252
2259
|
defaultImagePlaceholderUrl: u,
|
|
2253
|
-
rulesDisplay:
|
|
2260
|
+
rulesDisplay: f,
|
|
2254
2261
|
showStandings: b,
|
|
2255
2262
|
additionalCTA: p,
|
|
2256
2263
|
onGameStart: x,
|
|
2257
2264
|
onSelection: A,
|
|
2258
2265
|
onPlayAgain: E,
|
|
2259
2266
|
imagePosition: w = "left"
|
|
2260
|
-
} = e, { t: I } = ee(), y = K(), d = ((Y = n == null ? void 0 : n.branding) == null ? void 0 : Y.colors) || null,
|
|
2267
|
+
} = e, { t: I } = ee(), y = K(), d = ((Y = n == null ? void 0 : n.branding) == null ? void 0 : Y.colors) || null, R = (d == null ? void 0 : d.primaryColor) || y.palette.primary.plainColor, S = y.secondaryContainer, T = y.surfaceTintDim, B = ((k = le(T || "")) == null ? void 0 : k.replace(/[^\d,]/g, "")) ?? null, P = pe().md, D = ke().primary, L = Te(), N = Se(), [$, z] = O(0), v = at(
|
|
2261
2268
|
{
|
|
2262
2269
|
images: n == null ? void 0 : n.images,
|
|
2263
2270
|
imagePlaceholder: u || ""
|
|
2264
2271
|
},
|
|
2265
|
-
|
|
2272
|
+
Ae.STANDARD
|
|
2266
2273
|
), G = () => {
|
|
2267
2274
|
switch (s) {
|
|
2268
2275
|
case q.LOADING:
|
|
2269
|
-
return /* @__PURE__ */ t(
|
|
2276
|
+
return /* @__PURE__ */ t(lt, { my: 20 });
|
|
2270
2277
|
case q.TUTORIAL:
|
|
2271
2278
|
return /* @__PURE__ */ t(
|
|
2272
|
-
|
|
2279
|
+
An,
|
|
2273
2280
|
{
|
|
2274
2281
|
onStart: x,
|
|
2275
2282
|
game: n,
|
|
@@ -2280,10 +2287,10 @@ const Rn = (e, n) => {
|
|
|
2280
2287
|
);
|
|
2281
2288
|
case q.PLAYING:
|
|
2282
2289
|
return /* @__PURE__ */ t(
|
|
2283
|
-
|
|
2290
|
+
zn,
|
|
2284
2291
|
{
|
|
2285
2292
|
currentPair: l,
|
|
2286
|
-
timer:
|
|
2293
|
+
timer: h,
|
|
2287
2294
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2288
2295
|
selected: o,
|
|
2289
2296
|
feedback: m,
|
|
@@ -2295,7 +2302,7 @@ const Rn = (e, n) => {
|
|
|
2295
2302
|
);
|
|
2296
2303
|
case q.RESULTS:
|
|
2297
2304
|
return /* @__PURE__ */ t(
|
|
2298
|
-
|
|
2305
|
+
ut,
|
|
2299
2306
|
{
|
|
2300
2307
|
stepInfo: i,
|
|
2301
2308
|
game: n,
|
|
@@ -2308,24 +2315,24 @@ const Rn = (e, n) => {
|
|
|
2308
2315
|
default:
|
|
2309
2316
|
return null;
|
|
2310
2317
|
}
|
|
2311
|
-
}, M = s === q.RESULTS,
|
|
2318
|
+
}, M = s === q.RESULTS, j = {
|
|
2312
2319
|
display: "flex",
|
|
2313
2320
|
flexDirection: "row",
|
|
2314
2321
|
justifyContent: "center",
|
|
2315
2322
|
alignItems: "center",
|
|
2316
|
-
flex:
|
|
2317
|
-
width:
|
|
2323
|
+
flex: N ? "0 0 auto" : 1,
|
|
2324
|
+
width: N ? "100%" : "auto",
|
|
2318
2325
|
borderBottom: "1px solid " + S,
|
|
2319
2326
|
opacity: "60%",
|
|
2320
|
-
py:
|
|
2321
|
-
px:
|
|
2322
|
-
gap:
|
|
2327
|
+
py: L.sm,
|
|
2328
|
+
px: L.md,
|
|
2329
|
+
gap: L.xs,
|
|
2323
2330
|
"&:not(.Mui-selected):hover": {
|
|
2324
|
-
bgcolor: B ? `rgba(${B},0.06)` : `${
|
|
2331
|
+
bgcolor: B ? `rgba(${B},0.06)` : `${T}0F`
|
|
2325
2332
|
},
|
|
2326
|
-
[`&.${
|
|
2327
|
-
bgcolor: B ? `rgba(${B},0.06)` : `${
|
|
2328
|
-
borderBottom: "3px solid " +
|
|
2333
|
+
[`&.${Wt.selected}`]: {
|
|
2334
|
+
bgcolor: B ? `rgba(${B},0.06)` : `${T}0F`,
|
|
2335
|
+
borderBottom: "3px solid " + R,
|
|
2329
2336
|
opacity: "100%",
|
|
2330
2337
|
mb: "-1px"
|
|
2331
2338
|
}
|
|
@@ -2335,36 +2342,36 @@ const Rn = (e, n) => {
|
|
|
2335
2342
|
flexDirection: "column",
|
|
2336
2343
|
overflow: "auto"
|
|
2337
2344
|
};
|
|
2338
|
-
return M && b ? /* @__PURE__ */ t(
|
|
2339
|
-
|
|
2345
|
+
return M && b ? /* @__PURE__ */ t(ve, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ g(
|
|
2346
|
+
Mt,
|
|
2340
2347
|
{
|
|
2341
2348
|
value: $,
|
|
2342
|
-
onChange: (
|
|
2349
|
+
onChange: (V, J) => z(J),
|
|
2343
2350
|
sx: {
|
|
2344
|
-
borderRadius:
|
|
2351
|
+
borderRadius: P,
|
|
2345
2352
|
width: "100%",
|
|
2346
2353
|
backgroundColor: "transparent"
|
|
2347
2354
|
},
|
|
2348
2355
|
children: [
|
|
2349
2356
|
/* @__PURE__ */ g(
|
|
2350
|
-
|
|
2357
|
+
Ht,
|
|
2351
2358
|
{
|
|
2352
2359
|
sx: {
|
|
2353
2360
|
fontSize: "1em",
|
|
2354
2361
|
"--Icon-fontSize": "1.25em",
|
|
2355
|
-
flexDirection:
|
|
2362
|
+
flexDirection: N ? "column" : "row"
|
|
2356
2363
|
},
|
|
2357
2364
|
children: [
|
|
2358
|
-
/* @__PURE__ */ t(
|
|
2365
|
+
/* @__PURE__ */ t(tt, { sx: j, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
2359
2366
|
r,
|
|
2360
2367
|
{
|
|
2361
2368
|
sx: {
|
|
2362
2369
|
display: "flex",
|
|
2363
2370
|
alignItems: "center",
|
|
2364
|
-
gap:
|
|
2371
|
+
gap: L.xs
|
|
2365
2372
|
},
|
|
2366
2373
|
children: [
|
|
2367
|
-
/* @__PURE__ */ t(
|
|
2374
|
+
/* @__PURE__ */ t($e, { sx: { fontSize: "1.25em" } }),
|
|
2368
2375
|
/* @__PURE__ */ t(
|
|
2369
2376
|
C,
|
|
2370
2377
|
{
|
|
@@ -2382,16 +2389,16 @@ const Rn = (e, n) => {
|
|
|
2382
2389
|
]
|
|
2383
2390
|
}
|
|
2384
2391
|
) }),
|
|
2385
|
-
/* @__PURE__ */ t(
|
|
2392
|
+
/* @__PURE__ */ t(tt, { sx: j, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
2386
2393
|
r,
|
|
2387
2394
|
{
|
|
2388
2395
|
sx: {
|
|
2389
2396
|
display: "flex",
|
|
2390
2397
|
alignItems: "center",
|
|
2391
|
-
gap:
|
|
2398
|
+
gap: L.xs
|
|
2392
2399
|
},
|
|
2393
2400
|
children: [
|
|
2394
|
-
/* @__PURE__ */ t(
|
|
2401
|
+
/* @__PURE__ */ t(Vt, { sx: { fontSize: "1.25em" } }),
|
|
2395
2402
|
/* @__PURE__ */ t(
|
|
2396
2403
|
C,
|
|
2397
2404
|
{
|
|
@@ -2412,9 +2419,9 @@ const Rn = (e, n) => {
|
|
|
2412
2419
|
]
|
|
2413
2420
|
}
|
|
2414
2421
|
),
|
|
2415
|
-
$ === 0 && /* @__PURE__ */ t(
|
|
2416
|
-
$ === 1 && /* @__PURE__ */ t(
|
|
2417
|
-
|
|
2422
|
+
$ === 0 && /* @__PURE__ */ t(nt, { value: 0, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: a, children: G() }) }),
|
|
2423
|
+
$ === 1 && /* @__PURE__ */ t(nt, { value: 1, sx: { p: 0, fontSize: "1em", display: "flex" }, children: /* @__PURE__ */ t(r, { sx: a, children: /* @__PURE__ */ t(
|
|
2424
|
+
qt,
|
|
2418
2425
|
{
|
|
2419
2426
|
game: n,
|
|
2420
2427
|
sdk: c,
|
|
@@ -2424,27 +2431,27 @@ const Rn = (e, n) => {
|
|
|
2424
2431
|
) }) })
|
|
2425
2432
|
]
|
|
2426
2433
|
}
|
|
2427
|
-
) }) : M ? /* @__PURE__ */ t(
|
|
2428
|
-
|
|
2434
|
+
) }) : M ? /* @__PURE__ */ t(ve, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(r, { sx: a, children: G() }) }) : /* @__PURE__ */ t(ve, { brandingBorderColor: (d == null ? void 0 : d.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2435
|
+
nn,
|
|
2429
2436
|
{
|
|
2430
2437
|
entity: n,
|
|
2431
2438
|
headline: I("eitherOr.headline", "Either/Or"),
|
|
2432
|
-
finalImage:
|
|
2439
|
+
finalImage: v,
|
|
2433
2440
|
imagePosition: w,
|
|
2434
|
-
rulesDisplay:
|
|
2441
|
+
rulesDisplay: f,
|
|
2435
2442
|
children: G()
|
|
2436
2443
|
}
|
|
2437
2444
|
) });
|
|
2438
|
-
},
|
|
2445
|
+
}, Dn = () => {
|
|
2439
2446
|
const { t: e } = ee();
|
|
2440
|
-
return /* @__PURE__ */ t(
|
|
2441
|
-
|
|
2447
|
+
return /* @__PURE__ */ t(ve, { brandingBorderColor: null, children: /* @__PURE__ */ t(
|
|
2448
|
+
rn,
|
|
2442
2449
|
{
|
|
2443
2450
|
notFoundTitle: e("eitherOr.eitherOrNotFound"),
|
|
2444
2451
|
notFoundMessage: e("eitherOr.eitherOrNotFoundDescription")
|
|
2445
2452
|
}
|
|
2446
2453
|
) });
|
|
2447
|
-
},
|
|
2454
|
+
}, $n = (e) => ({
|
|
2448
2455
|
// Pulse animation for buttons
|
|
2449
2456
|
pulseAnimation: {
|
|
2450
2457
|
"@keyframes pulse": {
|
|
@@ -2492,22 +2499,22 @@ const Rn = (e, n) => {
|
|
|
2492
2499
|
display: "flex",
|
|
2493
2500
|
alignItems: "center"
|
|
2494
2501
|
}
|
|
2495
|
-
}),
|
|
2502
|
+
}), Fn = (e) => {
|
|
2496
2503
|
var E, w, I, y, d;
|
|
2497
|
-
const n = ((E = e.eitherOr.branding) == null ? void 0 : E.colors) || null, l = Se(), i = Ne(), s =
|
|
2504
|
+
const n = ((E = e.eitherOr.branding) == null ? void 0 : E.colors) || null, l = Se(), i = Ne(), s = at(
|
|
2498
2505
|
{
|
|
2499
2506
|
images: e.eitherOr.images,
|
|
2500
2507
|
imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
|
|
2501
2508
|
},
|
|
2502
|
-
|
|
2503
|
-
),
|
|
2504
|
-
fontFamilyPrimary:
|
|
2509
|
+
Ae.STANDARD
|
|
2510
|
+
), h = ke().primary, o = pe().xl, m = (n == null ? void 0 : n.primaryColor) || K().palette.primary.plainColor, c = K().palette.primary.onPrimary, u = (n == null ? void 0 : n.contentColor) || K().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 } = ee(), p = e.imagePosition || "left", x = $n({
|
|
2511
|
+
fontFamilyPrimary: h,
|
|
2505
2512
|
buttonRadius: o,
|
|
2506
2513
|
primaryColor: m,
|
|
2507
2514
|
onPrimaryColor: c
|
|
2508
2515
|
}), A = () => {
|
|
2509
|
-
var
|
|
2510
|
-
return e.signInCTA ? (
|
|
2516
|
+
var R, S, T, B;
|
|
2517
|
+
return e.signInCTA ? (R = e.signInCTA) != null && R.component ? e.signInCTA.component : (S = e.signInCTA) != null && S.onClick ? /* @__PURE__ */ t(
|
|
2511
2518
|
ye,
|
|
2512
2519
|
{
|
|
2513
2520
|
variant: "soft",
|
|
@@ -2518,7 +2525,7 @@ const Rn = (e, n) => {
|
|
|
2518
2525
|
onClick: e.signInCTA.onClick,
|
|
2519
2526
|
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2520
2527
|
}
|
|
2521
|
-
) : (
|
|
2528
|
+
) : (T = e.signInCTA) != null && T.url ? typeof window > "u" ? /* @__PURE__ */ t(
|
|
2522
2529
|
r,
|
|
2523
2530
|
{
|
|
2524
2531
|
component: "a",
|
|
@@ -2543,8 +2550,8 @@ const Rn = (e, n) => {
|
|
|
2543
2550
|
...x.pulseAnimation
|
|
2544
2551
|
},
|
|
2545
2552
|
onClick: () => {
|
|
2546
|
-
var
|
|
2547
|
-
((
|
|
2553
|
+
var P, D, L;
|
|
2554
|
+
((P = e.signInCTA) == null ? void 0 : P.target) === "_blank" ? window.open((D = e.signInCTA) == null ? void 0 : D.url, "_blank") : window.location.href = (L = e.signInCTA) == null ? void 0 : L.url;
|
|
2548
2555
|
},
|
|
2549
2556
|
children: /* @__PURE__ */ t(C, { sx: x.signInButtonText, children: e.signInCTA.defaultLabel || b("common.signIn") })
|
|
2550
2557
|
}
|
|
@@ -2570,8 +2577,8 @@ const Rn = (e, n) => {
|
|
|
2570
2577
|
}
|
|
2571
2578
|
);
|
|
2572
2579
|
};
|
|
2573
|
-
return /* @__PURE__ */ t(
|
|
2574
|
-
|
|
2580
|
+
return /* @__PURE__ */ t(ve, { brandingBorderColor: (n == null ? void 0 : n.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2581
|
+
on,
|
|
2575
2582
|
{
|
|
2576
2583
|
entity: e.eitherOr,
|
|
2577
2584
|
headline: b("eitherOr.headline"),
|
|
@@ -2581,7 +2588,7 @@ const Rn = (e, n) => {
|
|
|
2581
2588
|
brandingContent: /* @__PURE__ */ t(
|
|
2582
2589
|
me,
|
|
2583
2590
|
{
|
|
2584
|
-
brandingLogo:
|
|
2591
|
+
brandingLogo: f,
|
|
2585
2592
|
textColor: l && s ? (n == null ? void 0 : n.contentColor) || i.colorSchemes.dark.textColor : u,
|
|
2586
2593
|
label: ((d = e.eitherOr.labels) == null ? void 0 : d.sponsor) || null
|
|
2587
2594
|
}
|
|
@@ -2589,22 +2596,22 @@ const Rn = (e, n) => {
|
|
|
2589
2596
|
rulesDisplay: e.rulesDisplay
|
|
2590
2597
|
}
|
|
2591
2598
|
) });
|
|
2592
|
-
},
|
|
2599
|
+
}, En = ({
|
|
2593
2600
|
eitherOr: e,
|
|
2594
2601
|
imagePosition: n,
|
|
2595
2602
|
defaultImagePlaceholderUrl: l,
|
|
2596
2603
|
rulesDisplay: i
|
|
2597
2604
|
}) => {
|
|
2598
2605
|
var u;
|
|
2599
|
-
const { t: s } = ee(),
|
|
2606
|
+
const { t: s } = ee(), h = ((u = e.branding) == null ? void 0 : u.colors) || null, { brandingLogo: o } = st(
|
|
2600
2607
|
e.branding || null
|
|
2601
|
-
), m = (
|
|
2608
|
+
), m = (f) => {
|
|
2602
2609
|
var b;
|
|
2603
2610
|
return /* @__PURE__ */ t(
|
|
2604
2611
|
me,
|
|
2605
2612
|
{
|
|
2606
2613
|
brandingLogo: o,
|
|
2607
|
-
textColor:
|
|
2614
|
+
textColor: f,
|
|
2608
2615
|
label: ((b = e.labels) == null ? void 0 : b.sponsor) || null
|
|
2609
2616
|
}
|
|
2610
2617
|
);
|
|
@@ -2618,8 +2625,8 @@ const Rn = (e, n) => {
|
|
|
2618
2625
|
customAlertMessage: s("eitherOr.gameNotAvailableDescription"),
|
|
2619
2626
|
renderPresentedBy: m
|
|
2620
2627
|
};
|
|
2621
|
-
return /* @__PURE__ */ t(
|
|
2622
|
-
|
|
2628
|
+
return /* @__PURE__ */ t(ve, { brandingBorderColor: (h == null ? void 0 : h.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2629
|
+
Bt,
|
|
2623
2630
|
{
|
|
2624
2631
|
...c,
|
|
2625
2632
|
imagePosition: n || "left",
|
|
@@ -2627,17 +2634,17 @@ const Rn = (e, n) => {
|
|
|
2627
2634
|
rulesDisplay: i
|
|
2628
2635
|
}
|
|
2629
2636
|
) });
|
|
2630
|
-
},
|
|
2631
|
-
var
|
|
2632
|
-
const { t: n } = ee(), l = ((
|
|
2637
|
+
}, Un = (e) => {
|
|
2638
|
+
var h, o, m, c, u, f, b;
|
|
2639
|
+
const { t: n } = ee(), l = ((h = e.eitherOr.branding) == null ? void 0 : h.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 = {
|
|
2633
2640
|
...e.eitherOr,
|
|
2634
2641
|
branding: e.eitherOr.branding ? {
|
|
2635
2642
|
...e.eitherOr.branding,
|
|
2636
2643
|
colors: e.eitherOr.branding.colors ? { ...e.eitherOr.branding.colors, secondaryColor: void 0 } : null
|
|
2637
2644
|
} : null
|
|
2638
2645
|
};
|
|
2639
|
-
return /* @__PURE__ */ t(
|
|
2640
|
-
|
|
2646
|
+
return /* @__PURE__ */ t(ve, { brandingBorderColor: (l == null ? void 0 : l.borderColor) || null, children: /* @__PURE__ */ t(
|
|
2647
|
+
Bt,
|
|
2641
2648
|
{
|
|
2642
2649
|
entity: s,
|
|
2643
2650
|
headline: n("eitherOr.headline"),
|
|
@@ -2661,18 +2668,18 @@ const Rn = (e, n) => {
|
|
|
2661
2668
|
rulesDisplay: e.rulesDisplay
|
|
2662
2669
|
}
|
|
2663
2670
|
) });
|
|
2664
|
-
},
|
|
2671
|
+
}, Kt = ({
|
|
2665
2672
|
sdk: e,
|
|
2666
2673
|
contentId: n,
|
|
2667
2674
|
contentName: l,
|
|
2668
2675
|
brandingColors: i,
|
|
2669
2676
|
brandingUrls: s,
|
|
2670
|
-
campaignId:
|
|
2677
|
+
campaignId: h,
|
|
2671
2678
|
campaignName: o,
|
|
2672
2679
|
startGame: m,
|
|
2673
2680
|
fields: c = ["fullName", "email"],
|
|
2674
2681
|
leadTitle: u,
|
|
2675
|
-
leadDescription:
|
|
2682
|
+
leadDescription: f,
|
|
2676
2683
|
leadCta: b,
|
|
2677
2684
|
leadSuccessTitle: p,
|
|
2678
2685
|
leadSuccessDescription: x,
|
|
@@ -2681,12 +2688,12 @@ const Rn = (e, n) => {
|
|
|
2681
2688
|
isAfterPosition: w = !1,
|
|
2682
2689
|
isSubmittingParticipation: I = !1
|
|
2683
2690
|
}) => {
|
|
2684
|
-
const { t: y } = ee(), d = u ?? y("leads.header.title"),
|
|
2691
|
+
const { t: y } = ee(), d = u ?? y("leads.header.title"), R = f ?? y("leads.header.description"), S = b ?? y("leads.buttons.submit"), T = p ?? y("leads.success.title"), B = x ?? y("leads.success.description"), P = {
|
|
2685
2692
|
defaultLabel: y(w ? "eitherOr.buttons.finish" : "eitherOr.buttons.start"),
|
|
2686
2693
|
onClick: m
|
|
2687
2694
|
};
|
|
2688
2695
|
return /* @__PURE__ */ t(
|
|
2689
|
-
|
|
2696
|
+
ln,
|
|
2690
2697
|
{
|
|
2691
2698
|
sdk: e,
|
|
2692
2699
|
content: {
|
|
@@ -2694,21 +2701,21 @@ const Rn = (e, n) => {
|
|
|
2694
2701
|
type: "either-or",
|
|
2695
2702
|
name: l
|
|
2696
2703
|
},
|
|
2697
|
-
onSuccessCta:
|
|
2704
|
+
onSuccessCta: P,
|
|
2698
2705
|
branding: {
|
|
2699
2706
|
colors: i,
|
|
2700
2707
|
urls: s
|
|
2701
2708
|
},
|
|
2702
2709
|
campaign: {
|
|
2703
|
-
id:
|
|
2710
|
+
id: h,
|
|
2704
2711
|
name: o
|
|
2705
2712
|
},
|
|
2706
2713
|
fields: c,
|
|
2707
2714
|
labels: {
|
|
2708
2715
|
title: d,
|
|
2709
|
-
description:
|
|
2716
|
+
description: R,
|
|
2710
2717
|
submitButtonLabel: S,
|
|
2711
|
-
successTitle:
|
|
2718
|
+
successTitle: T,
|
|
2712
2719
|
successDescription: B
|
|
2713
2720
|
},
|
|
2714
2721
|
syncWithProfile: A,
|
|
@@ -2716,10 +2723,10 @@ const Rn = (e, n) => {
|
|
|
2716
2723
|
isSubmittingParticipation: I
|
|
2717
2724
|
}
|
|
2718
2725
|
);
|
|
2719
|
-
},
|
|
2726
|
+
}, Wn = (e) => {
|
|
2720
2727
|
const { t: n } = ee();
|
|
2721
2728
|
return /* @__PURE__ */ t(
|
|
2722
|
-
|
|
2729
|
+
Dt,
|
|
2723
2730
|
{
|
|
2724
2731
|
entity: e.eitherOr,
|
|
2725
2732
|
headline: n("eitherOr.headline"),
|
|
@@ -2729,14 +2736,14 @@ const Rn = (e, n) => {
|
|
|
2729
2736
|
imagePosition: e.imagePosition,
|
|
2730
2737
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
2731
2738
|
isSubmitting: e.isSubmitting,
|
|
2732
|
-
MainCard:
|
|
2739
|
+
MainCard: ve,
|
|
2733
2740
|
PresentedBy: me,
|
|
2734
|
-
CollectLeadWrapper:
|
|
2741
|
+
CollectLeadWrapper: Kt,
|
|
2735
2742
|
consents: e.consents,
|
|
2736
2743
|
rulesDisplay: e.rulesDisplay
|
|
2737
2744
|
}
|
|
2738
2745
|
);
|
|
2739
|
-
},
|
|
2746
|
+
}, Mn = (e) => ({
|
|
2740
2747
|
// Pulse animation for buttons
|
|
2741
2748
|
pulseAnimation: {
|
|
2742
2749
|
"@keyframes pulse": {
|
|
@@ -2848,19 +2855,19 @@ const Rn = (e, n) => {
|
|
|
2848
2855
|
flexDirection: e.isMobile ? "column-reverse" : "row",
|
|
2849
2856
|
gap: e.spacingScale.md
|
|
2850
2857
|
}
|
|
2851
|
-
}),
|
|
2852
|
-
var oe, xe, Oe, be,
|
|
2858
|
+
}), Hn = (e) => {
|
|
2859
|
+
var oe, xe, Oe, be, Ue, We, Me, Ze, bt, yt, pt, St, Ct, It, vt, kt, Tt, Pt, At, wt;
|
|
2853
2860
|
const {
|
|
2854
2861
|
eitherOr: n,
|
|
2855
2862
|
currentPair: l,
|
|
2856
2863
|
stepInfo: i,
|
|
2857
2864
|
gameState: s,
|
|
2858
|
-
timer:
|
|
2865
|
+
timer: h,
|
|
2859
2866
|
selected: o,
|
|
2860
2867
|
feedback: m,
|
|
2861
2868
|
sdk: c,
|
|
2862
2869
|
defaultImagePlaceholderUrl: u,
|
|
2863
|
-
rulesDisplay:
|
|
2870
|
+
rulesDisplay: f,
|
|
2864
2871
|
showStandings: b,
|
|
2865
2872
|
additionalCTA: p,
|
|
2866
2873
|
consents: x,
|
|
@@ -2868,46 +2875,46 @@ const Rn = (e, n) => {
|
|
|
2868
2875
|
onGameStart: E,
|
|
2869
2876
|
onSelection: w,
|
|
2870
2877
|
onPlayAgain: I
|
|
2871
|
-
} = e, y = Ne(), d =
|
|
2878
|
+
} = e, y = Ne(), d = Te(), R = Se(), { t: S } = ee(), [T, B] = O(0), [P, D] = O(0), [L, N] = O(!1), [$, z] = O(0), [v, G] = O(0), [M, j] = O(!1), a = ft(0), { brandingImage: Y, brandingColors: k } = st(
|
|
2872
2879
|
n.branding || null
|
|
2873
|
-
),
|
|
2874
|
-
{ images: n == null ? void 0 : n.images, imagePlaceholder:
|
|
2875
|
-
|
|
2876
|
-
), X = Y || J, Z =
|
|
2877
|
-
|
|
2878
|
-
), ae = y.customRadius.dark.sm, ne = y.customRadius.dark.md, Q = (
|
|
2880
|
+
), V = u || (R ? gt : ht), J = at(
|
|
2881
|
+
{ images: n == null ? void 0 : n.images, imagePlaceholder: V },
|
|
2882
|
+
Ae.OVERLAY
|
|
2883
|
+
), X = Y || J, Z = $t(X), te = Ft(
|
|
2884
|
+
Ae.OVERLAY
|
|
2885
|
+
), ae = y.customRadius.dark.sm, ne = y.customRadius.dark.md, Q = (k == null ? void 0 : k.backgroundColor) || ((xe = (oe = y.colorSchemes) == null ? void 0 : oe.dark) == null ? void 0 : xe.surfaceVariant), de = (be = (Oe = y.customRadius) == null ? void 0 : Oe.light) == null ? void 0 : be.xl, _ = (k == null ? void 0 : k.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, H = y.colorSchemes.dark.textColor, ue = y.colorSchemes.dark.surface, we = y.colorSchemes.dark.secondaryContainer, ze = y.colorSchemes.dark.surfaceTintDim, Ce = ((Ct = le(ze || "")) == null ? void 0 : Ct.replace(/[^\d,]/g, "")) ?? null, Ie = le(_ || ""), se = Mn({
|
|
2879
2886
|
spacingScale: d,
|
|
2880
2887
|
smBorderRadius: ae,
|
|
2881
2888
|
contentBgColor: Q,
|
|
2882
2889
|
buttonRadius: de,
|
|
2883
2890
|
primaryColor: _,
|
|
2884
|
-
onPrimaryColor:
|
|
2891
|
+
onPrimaryColor: he,
|
|
2885
2892
|
fontFamilyPrimary: U,
|
|
2886
|
-
darkTextColor:
|
|
2887
|
-
isMobile:
|
|
2893
|
+
darkTextColor: H,
|
|
2894
|
+
isMobile: R
|
|
2888
2895
|
});
|
|
2889
|
-
|
|
2890
|
-
if (i != null && i.currentPoints && i.currentPoints >
|
|
2891
|
-
|
|
2892
|
-
const ie = setTimeout(() =>
|
|
2896
|
+
fe(() => {
|
|
2897
|
+
if (i != null && i.currentPoints && i.currentPoints > P) {
|
|
2898
|
+
z(i.currentPoints - P), N(!0), G((ce) => ce + 1);
|
|
2899
|
+
const ie = setTimeout(() => N(!1), 1e3);
|
|
2893
2900
|
return D(i.currentPoints), () => clearTimeout(ie);
|
|
2894
2901
|
}
|
|
2895
|
-
}, [i == null ? void 0 : i.currentPoints,
|
|
2896
|
-
const
|
|
2897
|
-
|
|
2902
|
+
}, [i == null ? void 0 : i.currentPoints, P]);
|
|
2903
|
+
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;
|
|
2904
|
+
fe(() => {
|
|
2898
2905
|
const ie = a.current, ce = (i == null ? void 0 : i.currentStreak) ?? 0;
|
|
2899
2906
|
if (a.current = ce, ce > ie && ce > 0 && ce % Re === 0) {
|
|
2900
|
-
|
|
2901
|
-
const ge = setTimeout(() =>
|
|
2907
|
+
j(!0);
|
|
2908
|
+
const ge = setTimeout(() => j(!1), 500);
|
|
2902
2909
|
return () => clearTimeout(ge);
|
|
2903
2910
|
}
|
|
2904
2911
|
}, [i == null ? void 0 : i.currentStreak, Re]);
|
|
2905
|
-
const Le =
|
|
2912
|
+
const Le = R ? ((kt = (vt = n.branding) == null ? void 0 : vt.images) == null ? void 0 : kt.mobileLogo) || ((Pt = (Tt = n.branding) == null ? void 0 : Tt.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 = () => {
|
|
2906
2913
|
const ie = [], ce = (i == null ? void 0 : i.currentLives) ?? 3;
|
|
2907
2914
|
for (let ge = 0; ge < ce; ge++)
|
|
2908
2915
|
ie.push(
|
|
2909
2916
|
/* @__PURE__ */ t(
|
|
2910
|
-
|
|
2917
|
+
rt,
|
|
2911
2918
|
{
|
|
2912
2919
|
sx: { height: 20, color: _ }
|
|
2913
2920
|
},
|
|
@@ -2917,7 +2924,7 @@ const Rn = (e, n) => {
|
|
|
2917
2924
|
for (let ge = ce; ge < 3; ge++)
|
|
2918
2925
|
ie.push(
|
|
2919
2926
|
/* @__PURE__ */ t(
|
|
2920
|
-
|
|
2927
|
+
jt,
|
|
2921
2928
|
{
|
|
2922
2929
|
sx: {
|
|
2923
2930
|
height: 20,
|
|
@@ -2928,23 +2935,23 @@ const Rn = (e, n) => {
|
|
|
2928
2935
|
)
|
|
2929
2936
|
);
|
|
2930
2937
|
return ie;
|
|
2931
|
-
},
|
|
2932
|
-
const ie = (i == null ? void 0 : i.currentStreak) ?? 0, ce = M ? Re : ie % Re,
|
|
2938
|
+
}, qe = () => {
|
|
2939
|
+
const ie = (i == null ? void 0 : i.currentStreak) ?? 0, ce = M ? Re : ie % Re, He = Math.floor(ie / Re) + 1;
|
|
2933
2940
|
return /* @__PURE__ */ g(r, { sx: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
2934
|
-
Array.from({ length: Re }, (
|
|
2941
|
+
Array.from({ length: Re }, (zt, Be) => /* @__PURE__ */ t(
|
|
2935
2942
|
r,
|
|
2936
2943
|
{
|
|
2937
2944
|
sx: {
|
|
2938
2945
|
flex: 1,
|
|
2939
2946
|
height: 4,
|
|
2940
|
-
bgcolor:
|
|
2947
|
+
bgcolor: Be < ce ? _ : H,
|
|
2941
2948
|
borderRadius: "2px",
|
|
2942
2949
|
transition: "background-color 0.3s ease"
|
|
2943
2950
|
}
|
|
2944
2951
|
},
|
|
2945
|
-
`streak-${
|
|
2952
|
+
`streak-${Be}`
|
|
2946
2953
|
)),
|
|
2947
|
-
|
|
2954
|
+
He > 1 && /* @__PURE__ */ g(
|
|
2948
2955
|
C,
|
|
2949
2956
|
{
|
|
2950
2957
|
sx: {
|
|
@@ -2957,12 +2964,12 @@ const Rn = (e, n) => {
|
|
|
2957
2964
|
},
|
|
2958
2965
|
children: [
|
|
2959
2966
|
"×",
|
|
2960
|
-
|
|
2967
|
+
He
|
|
2961
2968
|
]
|
|
2962
2969
|
}
|
|
2963
2970
|
)
|
|
2964
2971
|
] });
|
|
2965
|
-
},
|
|
2972
|
+
}, Ke = () => /* @__PURE__ */ t(r, { sx: se.dividerContainer, children: /* @__PURE__ */ t(
|
|
2966
2973
|
r,
|
|
2967
2974
|
{
|
|
2968
2975
|
sx: {
|
|
@@ -2978,50 +2985,50 @@ const Rn = (e, n) => {
|
|
|
2978
2985
|
alignItems: "center",
|
|
2979
2986
|
justifyContent: "center"
|
|
2980
2987
|
},
|
|
2981
|
-
children: /* @__PURE__ */ t(
|
|
2988
|
+
children: /* @__PURE__ */ t(Gt, { sx: { fontSize: "1.1em", color: _ } })
|
|
2982
2989
|
}
|
|
2983
|
-
) }),
|
|
2990
|
+
) }), Xe = () => {
|
|
2984
2991
|
var ie;
|
|
2985
2992
|
return l ? /* @__PURE__ */ g(r, { sx: se.mainContentSection, children: [
|
|
2986
2993
|
/* @__PURE__ */ t(r, { sx: se.timerContainer, children: /* @__PURE__ */ t(
|
|
2987
|
-
|
|
2994
|
+
_t,
|
|
2988
2995
|
{
|
|
2989
|
-
time:
|
|
2996
|
+
time: h,
|
|
2990
2997
|
maxTime: (n == null ? void 0 : n.time) ?? 10,
|
|
2991
|
-
brandingPrimaryColor: (
|
|
2998
|
+
brandingPrimaryColor: (k == null ? void 0 : k.primaryColor) || null
|
|
2992
2999
|
},
|
|
2993
3000
|
`timer-${l.pairId}`
|
|
2994
3001
|
) }),
|
|
2995
3002
|
/* @__PURE__ */ g(r, { sx: se.contentContainerWithBackdrop, children: [
|
|
2996
3003
|
/* @__PURE__ */ g(r, { sx: se.optionsContainer, children: [
|
|
2997
3004
|
/* @__PURE__ */ t(r, { sx: se.optionWrapper, children: /* @__PURE__ */ t(
|
|
2998
|
-
|
|
3005
|
+
ot,
|
|
2999
3006
|
{
|
|
3000
3007
|
option: l.optionOne,
|
|
3001
3008
|
selected: o,
|
|
3002
3009
|
feedback: m,
|
|
3003
3010
|
onSelect: w,
|
|
3004
3011
|
pairId: l.pairId,
|
|
3005
|
-
brandingPrimaryColor: (
|
|
3012
|
+
brandingPrimaryColor: (k == null ? void 0 : k.primaryColor) || null,
|
|
3006
3013
|
optionIndex: 0
|
|
3007
3014
|
}
|
|
3008
3015
|
) }),
|
|
3009
|
-
|
|
3016
|
+
Ke(),
|
|
3010
3017
|
/* @__PURE__ */ t(r, { sx: se.optionWrapper, children: /* @__PURE__ */ t(
|
|
3011
|
-
|
|
3018
|
+
ot,
|
|
3012
3019
|
{
|
|
3013
3020
|
option: l.optionTwo,
|
|
3014
3021
|
selected: o,
|
|
3015
3022
|
feedback: m,
|
|
3016
3023
|
onSelect: w,
|
|
3017
3024
|
pairId: l.pairId,
|
|
3018
|
-
brandingPrimaryColor: (
|
|
3025
|
+
brandingPrimaryColor: (k == null ? void 0 : k.primaryColor) || null,
|
|
3019
3026
|
optionIndex: 1
|
|
3020
3027
|
}
|
|
3021
3028
|
) })
|
|
3022
3029
|
] }),
|
|
3023
3030
|
/* @__PURE__ */ g(r, { children: [
|
|
3024
|
-
/* @__PURE__ */ t(r, { sx: { mb: d.xs }, children:
|
|
3031
|
+
/* @__PURE__ */ t(r, { sx: { mb: d.xs }, children: qe() }),
|
|
3025
3032
|
/* @__PURE__ */ g(
|
|
3026
3033
|
je,
|
|
3027
3034
|
{
|
|
@@ -3029,29 +3036,29 @@ const Rn = (e, n) => {
|
|
|
3029
3036
|
justifyContent: "space-between",
|
|
3030
3037
|
alignItems: "center",
|
|
3031
3038
|
children: [
|
|
3032
|
-
/* @__PURE__ */ t(r, { children:
|
|
3039
|
+
/* @__PURE__ */ t(r, { children: _e() }),
|
|
3033
3040
|
/* @__PURE__ */ g(je, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
3034
|
-
/* @__PURE__ */ g(C, { sx: { color:
|
|
3035
|
-
|
|
3041
|
+
/* @__PURE__ */ g(C, { sx: { color: H }, children: [
|
|
3042
|
+
Ye,
|
|
3036
3043
|
":"
|
|
3037
3044
|
] }),
|
|
3038
3045
|
/* @__PURE__ */ g(
|
|
3039
3046
|
C,
|
|
3040
3047
|
{
|
|
3041
3048
|
level: "h4",
|
|
3042
|
-
sx: { position: "relative", color:
|
|
3049
|
+
sx: { position: "relative", color: H },
|
|
3043
3050
|
children: [
|
|
3044
|
-
|
|
3045
|
-
|
|
3051
|
+
P,
|
|
3052
|
+
L && /* @__PURE__ */ g(
|
|
3046
3053
|
C,
|
|
3047
3054
|
{
|
|
3048
|
-
sx:
|
|
3055
|
+
sx: Yt.pointsAdded,
|
|
3049
3056
|
children: [
|
|
3050
3057
|
"+",
|
|
3051
3058
|
$
|
|
3052
3059
|
]
|
|
3053
3060
|
},
|
|
3054
|
-
|
|
3061
|
+
v
|
|
3055
3062
|
)
|
|
3056
3063
|
]
|
|
3057
3064
|
}
|
|
@@ -3066,29 +3073,29 @@ const Rn = (e, n) => {
|
|
|
3066
3073
|
me,
|
|
3067
3074
|
{
|
|
3068
3075
|
brandingLogo: Le,
|
|
3069
|
-
textColor:
|
|
3076
|
+
textColor: H,
|
|
3070
3077
|
label: ((ie = n == null ? void 0 : n.labels) == null ? void 0 : ie.sponsor) || null,
|
|
3071
|
-
isCentered:
|
|
3078
|
+
isCentered: R
|
|
3072
3079
|
}
|
|
3073
3080
|
) })
|
|
3074
3081
|
] }) : null;
|
|
3075
|
-
},
|
|
3082
|
+
}, Ee = {
|
|
3076
3083
|
display: "flex",
|
|
3077
3084
|
flexDirection: "row",
|
|
3078
3085
|
justifyContent: "center",
|
|
3079
3086
|
alignItems: "center",
|
|
3080
|
-
flex:
|
|
3081
|
-
width:
|
|
3082
|
-
borderBottom: "1px solid " +
|
|
3087
|
+
flex: R ? "0 0 auto" : 1,
|
|
3088
|
+
width: R ? "100%" : "auto",
|
|
3089
|
+
borderBottom: "1px solid " + we,
|
|
3083
3090
|
opacity: "60%",
|
|
3084
3091
|
py: d.sm,
|
|
3085
3092
|
px: d.md,
|
|
3086
3093
|
gap: d.xs,
|
|
3087
3094
|
"&:not(.Mui-selected):hover": {
|
|
3088
|
-
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${
|
|
3095
|
+
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${ze}0F`
|
|
3089
3096
|
},
|
|
3090
|
-
[`&.${
|
|
3091
|
-
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${
|
|
3097
|
+
[`&.${Wt.selected}`]: {
|
|
3098
|
+
bgcolor: Ce ? `rgba(${Ce},0.06)` : `${ze}0F`,
|
|
3092
3099
|
borderBottom: "3px solid " + _,
|
|
3093
3100
|
opacity: "100%",
|
|
3094
3101
|
mb: "-1px"
|
|
@@ -3099,9 +3106,9 @@ const Rn = (e, n) => {
|
|
|
3099
3106
|
flexDirection: "column",
|
|
3100
3107
|
overflow: "auto"
|
|
3101
3108
|
}, F = () => b ? /* @__PURE__ */ t(r, { sx: { width: "100%" }, children: /* @__PURE__ */ g(
|
|
3102
|
-
|
|
3109
|
+
Mt,
|
|
3103
3110
|
{
|
|
3104
|
-
value:
|
|
3111
|
+
value: T,
|
|
3105
3112
|
onChange: (ie, ce) => B(ce),
|
|
3106
3113
|
sx: {
|
|
3107
3114
|
borderRadius: ne,
|
|
@@ -3110,15 +3117,15 @@ const Rn = (e, n) => {
|
|
|
3110
3117
|
},
|
|
3111
3118
|
children: [
|
|
3112
3119
|
/* @__PURE__ */ g(
|
|
3113
|
-
|
|
3120
|
+
Ht,
|
|
3114
3121
|
{
|
|
3115
3122
|
sx: {
|
|
3116
3123
|
fontSize: "1em",
|
|
3117
3124
|
"--Icon-fontSize": "1.25em",
|
|
3118
|
-
flexDirection:
|
|
3125
|
+
flexDirection: R ? "column" : "row"
|
|
3119
3126
|
},
|
|
3120
3127
|
children: [
|
|
3121
|
-
/* @__PURE__ */ t(
|
|
3128
|
+
/* @__PURE__ */ t(tt, { sx: Ee, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
3122
3129
|
r,
|
|
3123
3130
|
{
|
|
3124
3131
|
sx: {
|
|
@@ -3127,7 +3134,7 @@ const Rn = (e, n) => {
|
|
|
3127
3134
|
gap: d.xs
|
|
3128
3135
|
},
|
|
3129
3136
|
children: [
|
|
3130
|
-
/* @__PURE__ */ t(
|
|
3137
|
+
/* @__PURE__ */ t($e, { sx: { fontSize: "1.25em" } }),
|
|
3131
3138
|
/* @__PURE__ */ t(
|
|
3132
3139
|
C,
|
|
3133
3140
|
{
|
|
@@ -3138,7 +3145,7 @@ const Rn = (e, n) => {
|
|
|
3138
3145
|
lineHeight: "24px",
|
|
3139
3146
|
letterSpacing: "0.4px",
|
|
3140
3147
|
textTransform: "uppercase",
|
|
3141
|
-
color:
|
|
3148
|
+
color: H
|
|
3142
3149
|
},
|
|
3143
3150
|
children: S("eitherOr.tabs.score", "Score")
|
|
3144
3151
|
}
|
|
@@ -3146,7 +3153,7 @@ const Rn = (e, n) => {
|
|
|
3146
3153
|
]
|
|
3147
3154
|
}
|
|
3148
3155
|
) }),
|
|
3149
|
-
/* @__PURE__ */ t(
|
|
3156
|
+
/* @__PURE__ */ t(tt, { sx: Ee, disableIndicator: !0, children: /* @__PURE__ */ g(
|
|
3150
3157
|
r,
|
|
3151
3158
|
{
|
|
3152
3159
|
sx: {
|
|
@@ -3155,7 +3162,7 @@ const Rn = (e, n) => {
|
|
|
3155
3162
|
gap: d.xs
|
|
3156
3163
|
},
|
|
3157
3164
|
children: [
|
|
3158
|
-
/* @__PURE__ */ t(
|
|
3165
|
+
/* @__PURE__ */ t(Vt, { sx: { fontSize: "1.25em" } }),
|
|
3159
3166
|
/* @__PURE__ */ t(
|
|
3160
3167
|
C,
|
|
3161
3168
|
{
|
|
@@ -3166,7 +3173,7 @@ const Rn = (e, n) => {
|
|
|
3166
3173
|
lineHeight: "24px",
|
|
3167
3174
|
letterSpacing: "0.4px",
|
|
3168
3175
|
textTransform: "uppercase",
|
|
3169
|
-
color:
|
|
3176
|
+
color: H
|
|
3170
3177
|
},
|
|
3171
3178
|
children: S("eitherOr.tabs.standings", "Standings")
|
|
3172
3179
|
}
|
|
@@ -3177,36 +3184,36 @@ const Rn = (e, n) => {
|
|
|
3177
3184
|
]
|
|
3178
3185
|
}
|
|
3179
3186
|
),
|
|
3180
|
-
|
|
3181
|
-
|
|
3187
|
+
T === 0 && /* @__PURE__ */ t(
|
|
3188
|
+
nt,
|
|
3182
3189
|
{
|
|
3183
3190
|
value: 0,
|
|
3184
3191
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3185
3192
|
children: /* @__PURE__ */ t(r, { sx: W, children: /* @__PURE__ */ t(
|
|
3186
|
-
|
|
3193
|
+
ut,
|
|
3187
3194
|
{
|
|
3188
3195
|
stepInfo: i,
|
|
3189
3196
|
game: n,
|
|
3190
3197
|
sdk: c,
|
|
3191
3198
|
onPlayAgain: I,
|
|
3192
|
-
brandingPrimaryColor: (
|
|
3199
|
+
brandingPrimaryColor: (k == null ? void 0 : k.primaryColor) || null,
|
|
3193
3200
|
additionalCTA: p
|
|
3194
3201
|
}
|
|
3195
3202
|
) })
|
|
3196
3203
|
}
|
|
3197
3204
|
),
|
|
3198
|
-
|
|
3199
|
-
|
|
3205
|
+
T === 1 && /* @__PURE__ */ t(
|
|
3206
|
+
nt,
|
|
3200
3207
|
{
|
|
3201
3208
|
value: 1,
|
|
3202
3209
|
sx: { p: 0, fontSize: "1em", display: "flex" },
|
|
3203
3210
|
children: /* @__PURE__ */ t(r, { sx: W, children: /* @__PURE__ */ t(
|
|
3204
|
-
|
|
3211
|
+
qt,
|
|
3205
3212
|
{
|
|
3206
3213
|
game: n,
|
|
3207
3214
|
sdk: c,
|
|
3208
3215
|
stepInfo: i,
|
|
3209
|
-
brandingPrimaryColor: (
|
|
3216
|
+
brandingPrimaryColor: (k == null ? void 0 : k.primaryColor) || null
|
|
3210
3217
|
}
|
|
3211
3218
|
) })
|
|
3212
3219
|
}
|
|
@@ -3214,31 +3221,31 @@ const Rn = (e, n) => {
|
|
|
3214
3221
|
]
|
|
3215
3222
|
}
|
|
3216
3223
|
) }) : /* @__PURE__ */ t(
|
|
3217
|
-
|
|
3224
|
+
ut,
|
|
3218
3225
|
{
|
|
3219
3226
|
stepInfo: i,
|
|
3220
3227
|
game: n,
|
|
3221
3228
|
sdk: c,
|
|
3222
3229
|
onPlayAgain: I,
|
|
3223
|
-
brandingPrimaryColor: (
|
|
3230
|
+
brandingPrimaryColor: (k == null ? void 0 : k.primaryColor) || null,
|
|
3224
3231
|
additionalCTA: p
|
|
3225
3232
|
}
|
|
3226
3233
|
), re = () => {
|
|
3227
3234
|
var ie, ce, ge;
|
|
3228
3235
|
switch (s) {
|
|
3229
3236
|
case q.LOADING:
|
|
3230
|
-
return /* @__PURE__ */ t(
|
|
3237
|
+
return /* @__PURE__ */ t(lt, { my: 20 });
|
|
3231
3238
|
case q.TUTORIAL: {
|
|
3232
|
-
const
|
|
3239
|
+
const He = [
|
|
3233
3240
|
{
|
|
3234
|
-
icon: /* @__PURE__ */ t(
|
|
3241
|
+
icon: /* @__PURE__ */ t(Nt, { sx: { fontSize: "1.1em" } }),
|
|
3235
3242
|
title: S("eitherOr.tutorial.step1Title"),
|
|
3236
3243
|
description: S("eitherOr.tutorial.step1Description", {
|
|
3237
3244
|
seconds: (n == null ? void 0 : n.time) ?? 10
|
|
3238
3245
|
})
|
|
3239
3246
|
},
|
|
3240
3247
|
{
|
|
3241
|
-
icon: /* @__PURE__ */ t(
|
|
3248
|
+
icon: /* @__PURE__ */ t(rt, { sx: { fontSize: "1.1em" } }),
|
|
3242
3249
|
title: S("eitherOr.tutorial.step2Title", {
|
|
3243
3250
|
lives: (n == null ? void 0 : n.lives) ?? 3,
|
|
3244
3251
|
context: String((n == null ? void 0 : n.lives) ?? 3)
|
|
@@ -3249,11 +3256,11 @@ const Rn = (e, n) => {
|
|
|
3249
3256
|
})
|
|
3250
3257
|
},
|
|
3251
3258
|
{
|
|
3252
|
-
icon: /* @__PURE__ */ t(
|
|
3259
|
+
icon: /* @__PURE__ */ t($e, { sx: { fontSize: "1.1em" } }),
|
|
3253
3260
|
title: S("eitherOr.tutorial.step3Title"),
|
|
3254
3261
|
description: S("eitherOr.tutorial.step3Description")
|
|
3255
3262
|
}
|
|
3256
|
-
],
|
|
3263
|
+
], zt = Ie ? `rgba(${Ie.replace(/[^\d,]/g, "")}, 0.12)` : `${_}20`;
|
|
3257
3264
|
return /* @__PURE__ */ g(
|
|
3258
3265
|
r,
|
|
3259
3266
|
{
|
|
@@ -3287,8 +3294,8 @@ const Rn = (e, n) => {
|
|
|
3287
3294
|
},
|
|
3288
3295
|
"& > *": { position: "relative", zIndex: 1 }
|
|
3289
3296
|
},
|
|
3290
|
-
children:
|
|
3291
|
-
const
|
|
3297
|
+
children: He.map((Be, Rt) => {
|
|
3298
|
+
const Xt = Rt === He.length - 1;
|
|
3292
3299
|
return /* @__PURE__ */ g(r, { children: [
|
|
3293
3300
|
/* @__PURE__ */ g(
|
|
3294
3301
|
r,
|
|
@@ -3308,14 +3315,14 @@ const Rn = (e, n) => {
|
|
|
3308
3315
|
width: 36,
|
|
3309
3316
|
height: 36,
|
|
3310
3317
|
borderRadius: "50%",
|
|
3311
|
-
bgcolor:
|
|
3318
|
+
bgcolor: zt,
|
|
3312
3319
|
color: _,
|
|
3313
3320
|
display: "flex",
|
|
3314
3321
|
alignItems: "center",
|
|
3315
3322
|
justifyContent: "center",
|
|
3316
3323
|
flexShrink: 0
|
|
3317
3324
|
},
|
|
3318
|
-
children:
|
|
3325
|
+
children: Be.icon
|
|
3319
3326
|
}
|
|
3320
3327
|
),
|
|
3321
3328
|
/* @__PURE__ */ g(r, { sx: { flex: 1, minWidth: 0, pt: "2px" }, children: [
|
|
@@ -3327,9 +3334,9 @@ const Rn = (e, n) => {
|
|
|
3327
3334
|
fontWeight: 700,
|
|
3328
3335
|
fontSize: "0.875em",
|
|
3329
3336
|
lineHeight: 1.3,
|
|
3330
|
-
color:
|
|
3337
|
+
color: H
|
|
3331
3338
|
},
|
|
3332
|
-
children:
|
|
3339
|
+
children: Be.title
|
|
3333
3340
|
}
|
|
3334
3341
|
),
|
|
3335
3342
|
/* @__PURE__ */ t(
|
|
@@ -3340,18 +3347,18 @@ const Rn = (e, n) => {
|
|
|
3340
3347
|
fontWeight: 400,
|
|
3341
3348
|
fontSize: "0.75em",
|
|
3342
3349
|
lineHeight: 1.6,
|
|
3343
|
-
color:
|
|
3350
|
+
color: H,
|
|
3344
3351
|
opacity: 0.65,
|
|
3345
3352
|
mt: d["2xs"]
|
|
3346
3353
|
},
|
|
3347
|
-
children:
|
|
3354
|
+
children: Be.description
|
|
3348
3355
|
}
|
|
3349
3356
|
)
|
|
3350
3357
|
] })
|
|
3351
3358
|
]
|
|
3352
3359
|
}
|
|
3353
3360
|
),
|
|
3354
|
-
!
|
|
3361
|
+
!Xt && /* @__PURE__ */ t(
|
|
3355
3362
|
r,
|
|
3356
3363
|
{
|
|
3357
3364
|
sx: {
|
|
@@ -3361,16 +3368,16 @@ const Rn = (e, n) => {
|
|
|
3361
3368
|
}
|
|
3362
3369
|
}
|
|
3363
3370
|
)
|
|
3364
|
-
] },
|
|
3371
|
+
] }, Rt);
|
|
3365
3372
|
})
|
|
3366
3373
|
}
|
|
3367
3374
|
),
|
|
3368
3375
|
x != null && x.items.length ? /* @__PURE__ */ t(r, { sx: se.contentContainerWithBackdrop, children: /* @__PURE__ */ t(
|
|
3369
|
-
|
|
3376
|
+
it,
|
|
3370
3377
|
{
|
|
3371
3378
|
consents: x,
|
|
3372
3379
|
primaryColor: _,
|
|
3373
|
-
textColor:
|
|
3380
|
+
textColor: H,
|
|
3374
3381
|
brandingUrls: (ie = n == null ? void 0 : n.branding) == null ? void 0 : ie.urls
|
|
3375
3382
|
}
|
|
3376
3383
|
) }) : null,
|
|
@@ -3386,9 +3393,9 @@ const Rn = (e, n) => {
|
|
|
3386
3393
|
me,
|
|
3387
3394
|
{
|
|
3388
3395
|
brandingLogo: Le,
|
|
3389
|
-
textColor:
|
|
3396
|
+
textColor: H,
|
|
3390
3397
|
label: ((ce = n == null ? void 0 : n.labels) == null ? void 0 : ce.sponsor) || null,
|
|
3391
|
-
isCentered:
|
|
3398
|
+
isCentered: R
|
|
3392
3399
|
}
|
|
3393
3400
|
),
|
|
3394
3401
|
/* @__PURE__ */ t(
|
|
@@ -3401,10 +3408,10 @@ const Rn = (e, n) => {
|
|
|
3401
3408
|
...se.pulseAnimation,
|
|
3402
3409
|
...A ? Ot(
|
|
3403
3410
|
_,
|
|
3404
|
-
|
|
3411
|
+
he
|
|
3405
3412
|
) : {}
|
|
3406
3413
|
},
|
|
3407
|
-
endDecorator: /* @__PURE__ */ t(
|
|
3414
|
+
endDecorator: /* @__PURE__ */ t(mt, { children: /* @__PURE__ */ t(xt, {}) }),
|
|
3408
3415
|
onClick: E,
|
|
3409
3416
|
children: /* @__PURE__ */ t(
|
|
3410
3417
|
C,
|
|
@@ -3426,13 +3433,13 @@ const Rn = (e, n) => {
|
|
|
3426
3433
|
);
|
|
3427
3434
|
}
|
|
3428
3435
|
case q.PLAYING:
|
|
3429
|
-
return
|
|
3436
|
+
return Xe();
|
|
3430
3437
|
default:
|
|
3431
3438
|
return null;
|
|
3432
3439
|
}
|
|
3433
3440
|
};
|
|
3434
3441
|
return s === q.RESULTS ? /* @__PURE__ */ t(
|
|
3435
|
-
|
|
3442
|
+
an,
|
|
3436
3443
|
{
|
|
3437
3444
|
entity: n,
|
|
3438
3445
|
backgroundImage: Z,
|
|
@@ -3441,16 +3448,16 @@ const Rn = (e, n) => {
|
|
|
3441
3448
|
children: F()
|
|
3442
3449
|
}
|
|
3443
3450
|
) : /* @__PURE__ */ t(
|
|
3444
|
-
|
|
3451
|
+
sn,
|
|
3445
3452
|
{
|
|
3446
3453
|
entity: n,
|
|
3447
3454
|
headline: S("eitherOr.headline"),
|
|
3448
3455
|
finalImage: X,
|
|
3449
|
-
rulesDisplay:
|
|
3456
|
+
rulesDisplay: f,
|
|
3450
3457
|
children: re()
|
|
3451
3458
|
}
|
|
3452
3459
|
);
|
|
3453
|
-
},
|
|
3460
|
+
}, Gn = (e) => ({
|
|
3454
3461
|
// Pulse animation for buttons
|
|
3455
3462
|
pulseAnimation: {
|
|
3456
3463
|
"@keyframes pulse": {
|
|
@@ -3488,21 +3495,21 @@ const Rn = (e, n) => {
|
|
|
3488
3495
|
display: "flex",
|
|
3489
3496
|
alignItems: "center"
|
|
3490
3497
|
}
|
|
3491
|
-
}),
|
|
3492
|
-
var y, d,
|
|
3493
|
-
const n = Ne(), { t: l } = ee(), i = Se(), s =
|
|
3494
|
-
|
|
3495
|
-
),
|
|
3496
|
-
{ images: e.eitherOr.images, imagePlaceholder:
|
|
3497
|
-
|
|
3498
|
-
), { brandingImage: m, brandingColors: c, brandingLogo: u } =
|
|
3498
|
+
}), jn = (e) => {
|
|
3499
|
+
var y, d, R, S, T, B, P, D, L, N, $;
|
|
3500
|
+
const n = Ne(), { t: l } = ee(), i = Se(), s = Ft(
|
|
3501
|
+
Ae.OVERLAY
|
|
3502
|
+
), h = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : i ? gt : ht, o = at(
|
|
3503
|
+
{ images: e.eitherOr.images, imagePlaceholder: h },
|
|
3504
|
+
Ae.OVERLAY
|
|
3505
|
+
), { brandingImage: m, brandingColors: c, brandingLogo: u } = st(e.eitherOr.branding || null), b = $t(m || o), p = (d = (y = n.customRadius) == null ? void 0 : y.light) == null ? void 0 : d.xl, x = (c == null ? void 0 : c.primaryColor) || ((B = (T = (S = (R = n.colorSchemes) == null ? void 0 : R.light) == null ? void 0 : S.palette) == null ? void 0 : T.primary) == null ? void 0 : B.plainColor), A = (N = (L = (D = (P = n.colorSchemes) == null ? void 0 : P.light) == null ? void 0 : D.palette) == null ? void 0 : L.primary) == null ? void 0 : N.onPrimary, E = n.customFontFamily.dark.primary, w = Gn({
|
|
3499
3506
|
buttonRadius: p,
|
|
3500
3507
|
primaryColor: x,
|
|
3501
3508
|
onPrimaryColor: A,
|
|
3502
3509
|
fontFamilyPrimary: E
|
|
3503
3510
|
}), I = () => {
|
|
3504
|
-
var
|
|
3505
|
-
return e.signInCTA ? (
|
|
3511
|
+
var z, v, G, M;
|
|
3512
|
+
return e.signInCTA ? (z = e.signInCTA) != null && z.component ? e.signInCTA.component : (v = e.signInCTA) != null && v.onClick ? /* @__PURE__ */ t(
|
|
3506
3513
|
ye,
|
|
3507
3514
|
{
|
|
3508
3515
|
variant: "soft",
|
|
@@ -3532,15 +3539,15 @@ const Rn = (e, n) => {
|
|
|
3532
3539
|
variant: "soft",
|
|
3533
3540
|
sx: { ...w.signInButton, ...w.pulseAnimation },
|
|
3534
3541
|
onClick: () => {
|
|
3535
|
-
var
|
|
3536
|
-
((
|
|
3542
|
+
var j, a, Y;
|
|
3543
|
+
((j = e.signInCTA) == null ? void 0 : j.target) === "_blank" ? window.open((a = e.signInCTA) == null ? void 0 : a.url, "_blank") : window.location.href = (Y = e.signInCTA) == null ? void 0 : Y.url;
|
|
3537
3544
|
},
|
|
3538
3545
|
children: /* @__PURE__ */ t(C, { sx: w.signInButtonText, children: e.signInCTA.defaultLabel || l("common.signIn") })
|
|
3539
3546
|
}
|
|
3540
3547
|
) : /* @__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") }) });
|
|
3541
3548
|
};
|
|
3542
3549
|
return /* @__PURE__ */ t(
|
|
3543
|
-
|
|
3550
|
+
cn,
|
|
3544
3551
|
{
|
|
3545
3552
|
entity: e.eitherOr,
|
|
3546
3553
|
headline: l("eitherOr.headline"),
|
|
@@ -3558,12 +3565,12 @@ const Rn = (e, n) => {
|
|
|
3558
3565
|
rulesDisplay: e.rulesDisplay
|
|
3559
3566
|
}
|
|
3560
3567
|
);
|
|
3561
|
-
},
|
|
3562
|
-
const { t: n } = ee(), l = Se(), i = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ?
|
|
3568
|
+
}, Vn = (e) => {
|
|
3569
|
+
const { t: n } = ee(), l = Se(), i = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : l ? gt : ht, { brandingLogo: s } = st(
|
|
3563
3570
|
e.eitherOr.branding || null
|
|
3564
3571
|
);
|
|
3565
3572
|
return /* @__PURE__ */ t(
|
|
3566
|
-
|
|
3573
|
+
dn,
|
|
3567
3574
|
{
|
|
3568
3575
|
entity: e.eitherOr,
|
|
3569
3576
|
headline: n("eitherOr.headline"),
|
|
@@ -3572,13 +3579,13 @@ const Rn = (e, n) => {
|
|
|
3572
3579
|
isApiError: e.isApiError,
|
|
3573
3580
|
apiErrorMessage: e.apiErrorMessage,
|
|
3574
3581
|
toggleTryAgain: e.toggleTryAgain,
|
|
3575
|
-
renderPresentedBy: (
|
|
3582
|
+
renderPresentedBy: (h) => {
|
|
3576
3583
|
var o;
|
|
3577
3584
|
return /* @__PURE__ */ t(
|
|
3578
3585
|
me,
|
|
3579
3586
|
{
|
|
3580
3587
|
brandingLogo: s,
|
|
3581
|
-
textColor:
|
|
3588
|
+
textColor: h,
|
|
3582
3589
|
label: ((o = e.eitherOr.labels) == null ? void 0 : o.sponsor) || null,
|
|
3583
3590
|
isCentered: l
|
|
3584
3591
|
}
|
|
@@ -3587,10 +3594,10 @@ const Rn = (e, n) => {
|
|
|
3587
3594
|
rulesDisplay: e.rulesDisplay
|
|
3588
3595
|
}
|
|
3589
3596
|
);
|
|
3590
|
-
},
|
|
3597
|
+
}, Nn = (e) => {
|
|
3591
3598
|
const { t: n } = ee();
|
|
3592
3599
|
return /* @__PURE__ */ t(
|
|
3593
|
-
|
|
3600
|
+
Et,
|
|
3594
3601
|
{
|
|
3595
3602
|
entity: e.eitherOr,
|
|
3596
3603
|
headline: n("eitherOr.headline"),
|
|
@@ -3600,16 +3607,16 @@ const Rn = (e, n) => {
|
|
|
3600
3607
|
onLeadSubmitted: e.onLeadSubmitted,
|
|
3601
3608
|
isSubmitting: e.isSubmitting,
|
|
3602
3609
|
PresentedBy: me,
|
|
3603
|
-
CollectLeadWrapper:
|
|
3610
|
+
CollectLeadWrapper: Kt,
|
|
3604
3611
|
consents: e.consents,
|
|
3605
3612
|
rulesDisplay: e.rulesDisplay
|
|
3606
3613
|
}
|
|
3607
3614
|
);
|
|
3608
|
-
},
|
|
3609
|
-
var s,
|
|
3615
|
+
}, Yn = (e) => {
|
|
3616
|
+
var s, h, o;
|
|
3610
3617
|
const { t: n } = ee(), l = ((s = e.eitherOr.branding) == null ? void 0 : s.colors) || null, i = (l == null ? void 0 : l.primaryColor) || K().palette.primary.plainColor;
|
|
3611
3618
|
return /* @__PURE__ */ t(
|
|
3612
|
-
|
|
3619
|
+
Dt,
|
|
3613
3620
|
{
|
|
3614
3621
|
entity: e.eitherOr,
|
|
3615
3622
|
headline: n("eitherOr.headline"),
|
|
@@ -3618,20 +3625,20 @@ const Rn = (e, n) => {
|
|
|
3618
3625
|
imagePosition: e.imagePosition,
|
|
3619
3626
|
onLeadSubmitted: e.onSubmit,
|
|
3620
3627
|
isSubmitting: e.isSubmitting,
|
|
3621
|
-
MainCard:
|
|
3628
|
+
MainCard: ve,
|
|
3622
3629
|
PresentedBy: me,
|
|
3623
3630
|
rulesDisplay: e.rulesDisplay,
|
|
3624
3631
|
content: /* @__PURE__ */ t(
|
|
3625
|
-
|
|
3632
|
+
it,
|
|
3626
3633
|
{
|
|
3627
3634
|
consents: e.consents,
|
|
3628
3635
|
primaryColor: i,
|
|
3629
|
-
brandingUrls: (
|
|
3636
|
+
brandingUrls: (h = e.eitherOr.branding) == null ? void 0 : h.urls,
|
|
3630
3637
|
align: "center"
|
|
3631
3638
|
}
|
|
3632
3639
|
),
|
|
3633
3640
|
footerAction: /* @__PURE__ */ t(
|
|
3634
|
-
|
|
3641
|
+
Ut,
|
|
3635
3642
|
{
|
|
3636
3643
|
onClick: e.onSubmit,
|
|
3637
3644
|
label: ((o = e.consents.labels) == null ? void 0 : o.ctaLabel) || n("eitherOr.buttons.finish"),
|
|
@@ -3641,11 +3648,11 @@ const Rn = (e, n) => {
|
|
|
3641
3648
|
)
|
|
3642
3649
|
}
|
|
3643
3650
|
);
|
|
3644
|
-
},
|
|
3645
|
-
var
|
|
3646
|
-
const { t: n } = ee(), l = Ne(), i = ((
|
|
3651
|
+
}, _n = (e) => {
|
|
3652
|
+
var h, o, m;
|
|
3653
|
+
const { t: n } = ee(), l = Ne(), i = ((h = e.eitherOr.branding) == null ? void 0 : h.colors) || null, s = (i == null ? void 0 : i.primaryColor) || l.colorSchemes.dark.palette.primary.plainColor;
|
|
3647
3654
|
return /* @__PURE__ */ t(
|
|
3648
|
-
|
|
3655
|
+
Et,
|
|
3649
3656
|
{
|
|
3650
3657
|
entity: e.eitherOr,
|
|
3651
3658
|
headline: n("eitherOr.headline"),
|
|
@@ -3656,7 +3663,7 @@ const Rn = (e, n) => {
|
|
|
3656
3663
|
PresentedBy: me,
|
|
3657
3664
|
rulesDisplay: e.rulesDisplay,
|
|
3658
3665
|
content: /* @__PURE__ */ t(
|
|
3659
|
-
|
|
3666
|
+
it,
|
|
3660
3667
|
{
|
|
3661
3668
|
consents: e.consents,
|
|
3662
3669
|
primaryColor: s,
|
|
@@ -3665,7 +3672,7 @@ const Rn = (e, n) => {
|
|
|
3665
3672
|
}
|
|
3666
3673
|
),
|
|
3667
3674
|
footerAction: /* @__PURE__ */ t(
|
|
3668
|
-
|
|
3675
|
+
Ut,
|
|
3669
3676
|
{
|
|
3670
3677
|
onClick: e.onSubmit,
|
|
3671
3678
|
label: ((m = e.consents.labels) == null ? void 0 : m.ctaLabel) || n("eitherOr.buttons.finish"),
|
|
@@ -3676,36 +3683,36 @@ const Rn = (e, n) => {
|
|
|
3676
3683
|
}
|
|
3677
3684
|
);
|
|
3678
3685
|
};
|
|
3679
|
-
function
|
|
3680
|
-
return e.template ===
|
|
3686
|
+
function De(e) {
|
|
3687
|
+
return e.template === Ae.STANDARD;
|
|
3681
3688
|
}
|
|
3682
|
-
function
|
|
3683
|
-
return e.template ===
|
|
3689
|
+
function Qe(e) {
|
|
3690
|
+
return e.template === Ae.OVERLAY;
|
|
3684
3691
|
}
|
|
3685
|
-
const
|
|
3686
|
-
var Le,
|
|
3687
|
-
const [n, l] =
|
|
3692
|
+
const qn = (e) => {
|
|
3693
|
+
var Le, Ye, _e, qe, Ke, Xe, Ee;
|
|
3694
|
+
const [n, l] = O(
|
|
3688
3695
|
q.LOADING
|
|
3689
|
-
), [i, s] =
|
|
3696
|
+
), [i, s] = O(null), [h, o] = O(null), [m, c] = O(10), [u, f] = O(null), [b, p] = O({
|
|
3690
3697
|
isCorrect: null,
|
|
3691
3698
|
selectedOption: null
|
|
3692
|
-
}), [x, A] =
|
|
3699
|
+
}), [x, A] = O(!1), [E, w] = O(!1), [I, y] = O(!1), [d, R] = O(""), [S, T] = O(!1), [B, P] = O(!1), [D, L] = O(!1), [N, $] = O(!1), [z, v] = O(!1), [G, M] = O(!1), j = ft(null), a = vn(e.entityId, e.sdk), {
|
|
3693
3700
|
setIsUnauthorized: Y,
|
|
3694
|
-
setIsApiError:
|
|
3695
|
-
} =
|
|
3696
|
-
pending:
|
|
3701
|
+
setIsApiError: k
|
|
3702
|
+
} = kn(e.entityId, e.sdk, x), {
|
|
3703
|
+
pending: V,
|
|
3697
3704
|
checked: J,
|
|
3698
3705
|
setChecked: X,
|
|
3699
3706
|
allRequiredChecked: Z,
|
|
3700
3707
|
submit: te
|
|
3701
|
-
} =
|
|
3708
|
+
} = un({
|
|
3702
3709
|
sdk: e.sdk,
|
|
3703
3710
|
consents: (Le = e.consents) == null ? void 0 : Le.items,
|
|
3704
3711
|
entityId: e.entityId,
|
|
3705
3712
|
entityType: "either_or"
|
|
3706
|
-
}), ne = !!((a == null ? void 0 : a.authRequirement) === "LEAD" ? (
|
|
3713
|
+
}), ne = !!((a == null ? void 0 : a.authRequirement) === "LEAD" ? (Ye = e.leads) == null ? void 0 : Ye.position : void 0) && V.length > 0, Q = ne ? [] : V.filter((W) => W.position !== "after"), de = ne ? [] : V.filter((W) => W.position === "after"), _ = (W) => {
|
|
3707
3714
|
X(W), M(!1);
|
|
3708
|
-
},
|
|
3715
|
+
}, he = (W) => {
|
|
3709
3716
|
var F;
|
|
3710
3717
|
return {
|
|
3711
3718
|
items: W,
|
|
@@ -3715,12 +3722,12 @@ const Jn = (e) => {
|
|
|
3715
3722
|
showError: G
|
|
3716
3723
|
};
|
|
3717
3724
|
};
|
|
3718
|
-
|
|
3725
|
+
fe(() => {
|
|
3719
3726
|
var W, F;
|
|
3720
|
-
n !== q.RESULTS || !
|
|
3721
|
-
}, [n]),
|
|
3722
|
-
|
|
3723
|
-
}, [e.language]),
|
|
3727
|
+
n !== q.RESULTS || !h || (F = (W = e.callbacks) == null ? void 0 : W.onFinish) == null || F.call(W, h);
|
|
3728
|
+
}, [n]), fe(() => {
|
|
3729
|
+
mn(e.language || "en");
|
|
3730
|
+
}, [e.language]), fe(() => {
|
|
3724
3731
|
a && a.id && l(q.TUTORIAL);
|
|
3725
3732
|
}, [a]);
|
|
3726
3733
|
const U = () => ({
|
|
@@ -3731,7 +3738,7 @@ const Jn = (e) => {
|
|
|
3731
3738
|
const F = W.steps.find(
|
|
3732
3739
|
(oe) => {
|
|
3733
3740
|
var xe;
|
|
3734
|
-
return oe.pairId === ((xe =
|
|
3741
|
+
return oe.pairId === ((xe = j.current) == null ? void 0 : xe.pairId);
|
|
3735
3742
|
}
|
|
3736
3743
|
), re = ((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;
|
|
3737
3744
|
p({
|
|
@@ -3743,18 +3750,18 @@ const Jn = (e) => {
|
|
|
3743
3750
|
var Oe;
|
|
3744
3751
|
const oe = ((Oe = e.leads) == null ? void 0 : Oe.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S;
|
|
3745
3752
|
if (W.currentLives === 0) {
|
|
3746
|
-
oe ?
|
|
3753
|
+
oe ? P(!0) : l(q.RESULTS);
|
|
3747
3754
|
return;
|
|
3748
3755
|
}
|
|
3749
3756
|
const xe = W.steps.find((be) => !be.played);
|
|
3750
|
-
xe ? (s(xe),
|
|
3757
|
+
xe ? (s(xe), f(null), p({ isCorrect: null, selectedOption: null })) : oe ? P(!0) : l(q.RESULTS);
|
|
3751
3758
|
}, 1e3);
|
|
3752
3759
|
}
|
|
3753
|
-
}),
|
|
3760
|
+
}), H = (W) => {
|
|
3754
3761
|
console.error("[either-or-play] request failed", W);
|
|
3755
|
-
const { code: F, message: re } =
|
|
3756
|
-
F === 401 || F === 403 ? w(!0) : (y(!0),
|
|
3757
|
-
}, ue =
|
|
3762
|
+
const { code: F, message: re } = gn(W, e.sdk);
|
|
3763
|
+
F === 401 || F === 403 ? w(!0) : (y(!0), R(re));
|
|
3764
|
+
}, ue = Ge(async () => {
|
|
3758
3765
|
var W;
|
|
3759
3766
|
if (Q.length > 0) {
|
|
3760
3767
|
if (D) return;
|
|
@@ -3762,10 +3769,10 @@ const Jn = (e) => {
|
|
|
3762
3769
|
M(!0);
|
|
3763
3770
|
return;
|
|
3764
3771
|
}
|
|
3765
|
-
|
|
3772
|
+
L(!0), await te(Q), L(!1);
|
|
3766
3773
|
}
|
|
3767
3774
|
if ((a == null ? void 0 : a.authRequirement) === "LEAD" && ((W = e.leads) == null ? void 0 : W.position) === "before" && !S) {
|
|
3768
|
-
|
|
3775
|
+
P(!0);
|
|
3769
3776
|
return;
|
|
3770
3777
|
}
|
|
3771
3778
|
try {
|
|
@@ -3776,23 +3783,23 @@ const Jn = (e) => {
|
|
|
3776
3783
|
);
|
|
3777
3784
|
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((re) => !re.played) || null), l(q.PLAYING);
|
|
3778
3785
|
} catch (F) {
|
|
3779
|
-
console.error("Failed to start game:", F),
|
|
3786
|
+
console.error("Failed to start game:", F), H(F);
|
|
3780
3787
|
}
|
|
3781
3788
|
}, [
|
|
3782
3789
|
e.entityId,
|
|
3783
3790
|
e.sdk,
|
|
3784
|
-
(
|
|
3791
|
+
(_e = e.leads) == null ? void 0 : _e.position,
|
|
3785
3792
|
a == null ? void 0 : a.authRequirement,
|
|
3786
3793
|
a == null ? void 0 : a.time,
|
|
3787
3794
|
S,
|
|
3788
3795
|
Q,
|
|
3789
3796
|
D
|
|
3790
3797
|
]);
|
|
3791
|
-
|
|
3792
|
-
const
|
|
3798
|
+
j.current = i;
|
|
3799
|
+
const we = Ge(
|
|
3793
3800
|
async (W, F) => {
|
|
3794
3801
|
if (!u) {
|
|
3795
|
-
|
|
3802
|
+
f(F);
|
|
3796
3803
|
try {
|
|
3797
3804
|
const re = await e.sdk.miniGames.participateInEitherOr(
|
|
3798
3805
|
e.entityId,
|
|
@@ -3804,17 +3811,17 @@ const Jn = (e) => {
|
|
|
3804
3811
|
(be) => be !== F
|
|
3805
3812
|
) ?? null;
|
|
3806
3813
|
p({ isCorrect: xe, selectedOption: F, correctOptionId: Oe }), o(re), setTimeout(() => {
|
|
3807
|
-
var
|
|
3808
|
-
const be = ((
|
|
3814
|
+
var Me;
|
|
3815
|
+
const be = ((Me = e.leads) == null ? void 0 : Me.position) === "after" && (a == null ? void 0 : a.authRequirement) === "LEAD" && !S, Ue = de.length > 0 && !z;
|
|
3809
3816
|
if (re.currentLives === 0) {
|
|
3810
|
-
|
|
3817
|
+
Ue ? $(!0) : be ? P(!0) : l(q.RESULTS);
|
|
3811
3818
|
return;
|
|
3812
3819
|
}
|
|
3813
|
-
const
|
|
3814
|
-
|
|
3820
|
+
const We = re.steps.find((Ze) => !Ze.played);
|
|
3821
|
+
We ? (s(We), f(null), p({ isCorrect: null, selectedOption: null })) : Ue ? $(!0) : be ? P(!0) : l(q.RESULTS);
|
|
3815
3822
|
}, 1e3);
|
|
3816
3823
|
} catch (re) {
|
|
3817
|
-
console.error("Failed to submit answer:", re),
|
|
3824
|
+
console.error("Failed to submit answer:", re), f(null), H(re);
|
|
3818
3825
|
}
|
|
3819
3826
|
}
|
|
3820
3827
|
},
|
|
@@ -3823,56 +3830,56 @@ const Jn = (e) => {
|
|
|
3823
3830
|
e.sdk,
|
|
3824
3831
|
u,
|
|
3825
3832
|
a == null ? void 0 : a.authRequirement,
|
|
3826
|
-
(
|
|
3833
|
+
(qe = e.leads) == null ? void 0 : qe.position,
|
|
3827
3834
|
S,
|
|
3828
3835
|
de,
|
|
3829
|
-
|
|
3836
|
+
z
|
|
3830
3837
|
]
|
|
3831
|
-
),
|
|
3838
|
+
), ze = Ge(async () => {
|
|
3832
3839
|
var W;
|
|
3833
|
-
if (
|
|
3834
|
-
|
|
3840
|
+
if (T(!0), ((W = e.leads) == null ? void 0 : W.position) === "before") {
|
|
3841
|
+
L(!0);
|
|
3835
3842
|
try {
|
|
3836
3843
|
const F = await e.sdk.miniGames.participateInEitherOr(
|
|
3837
3844
|
e.entityId,
|
|
3838
3845
|
null,
|
|
3839
3846
|
U()
|
|
3840
3847
|
);
|
|
3841
|
-
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((re) => !re.played) || null),
|
|
3848
|
+
c((a == null ? void 0 : a.time) ?? 10), o(F), s(F.steps.find((re) => !re.played) || null), P(!1), L(!1), l(q.PLAYING);
|
|
3842
3849
|
} catch (F) {
|
|
3843
|
-
|
|
3850
|
+
L(!1), P(!1), H(F);
|
|
3844
3851
|
}
|
|
3845
3852
|
} else
|
|
3846
|
-
|
|
3847
|
-
}, [(
|
|
3853
|
+
P(!1), L(!1), l(q.RESULTS);
|
|
3854
|
+
}, [(Ke = e.leads) == null ? void 0 : Ke.position, e.entityId, e.sdk, a == null ? void 0 : a.time]), Ce = Ge(async () => {
|
|
3848
3855
|
if (!Z(de)) {
|
|
3849
3856
|
M(!0);
|
|
3850
3857
|
return;
|
|
3851
3858
|
}
|
|
3852
|
-
|
|
3853
|
-
}, [de, Z, te]), Ie =
|
|
3854
|
-
l(q.TUTORIAL), s(null), o(null), c((a == null ? void 0 : a.time) ?? 10),
|
|
3859
|
+
L(!0), await te(de), v(!0), L(!1), $(!1), l(q.RESULTS);
|
|
3860
|
+
}, [de, Z, te]), Ie = Ge(() => {
|
|
3861
|
+
l(q.TUTORIAL), s(null), o(null), c((a == null ? void 0 : a.time) ?? 10), f(null), p({ isCorrect: null, selectedOption: null }), T(!1), P(!1), $(!1), M(!1);
|
|
3855
3862
|
}, [a == null ? void 0 : a.time]), se = () => {
|
|
3856
|
-
y(!1), w(!1),
|
|
3863
|
+
y(!1), w(!1), R(""), k(!1), Y(!1), A(!x), l(q.TUTORIAL), s(null), o(null), f(null), p({ isCorrect: null, selectedOption: null }), T(!1), P(!1), $(!1), M(!1);
|
|
3857
3864
|
};
|
|
3858
3865
|
if (!a)
|
|
3859
|
-
return /* @__PURE__ */ t(
|
|
3866
|
+
return /* @__PURE__ */ t(lt, { my: 20 });
|
|
3860
3867
|
if (!a.id)
|
|
3861
|
-
return /* @__PURE__ */ t(
|
|
3868
|
+
return /* @__PURE__ */ t(Dn, {});
|
|
3862
3869
|
if (a.status !== "ACTIVE")
|
|
3863
3870
|
return /* @__PURE__ */ t(
|
|
3864
|
-
|
|
3871
|
+
En,
|
|
3865
3872
|
{
|
|
3866
3873
|
eitherOr: a,
|
|
3867
3874
|
template: e.template,
|
|
3868
|
-
imagePosition:
|
|
3875
|
+
imagePosition: De(e) ? e.imagePosition : void 0,
|
|
3869
3876
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3870
3877
|
rulesDisplay: e.rulesDisplay
|
|
3871
3878
|
}
|
|
3872
3879
|
);
|
|
3873
3880
|
if (a.authRequirement === "REGISTERED" && !e.userIsLoggedIn)
|
|
3874
|
-
return
|
|
3875
|
-
|
|
3881
|
+
return De(e) ? /* @__PURE__ */ t(
|
|
3882
|
+
Fn,
|
|
3876
3883
|
{
|
|
3877
3884
|
eitherOr: a,
|
|
3878
3885
|
imagePosition: e.imagePosition,
|
|
@@ -3880,18 +3887,18 @@ const Jn = (e) => {
|
|
|
3880
3887
|
signInCTA: e.signInCTA,
|
|
3881
3888
|
rulesDisplay: e.rulesDisplay
|
|
3882
3889
|
}
|
|
3883
|
-
) :
|
|
3884
|
-
|
|
3890
|
+
) : Qe(e) ? /* @__PURE__ */ t(
|
|
3891
|
+
jn,
|
|
3885
3892
|
{
|
|
3886
3893
|
eitherOr: a,
|
|
3887
3894
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3888
3895
|
signInCTA: e.signInCTA,
|
|
3889
3896
|
rulesDisplay: e.rulesDisplay
|
|
3890
3897
|
}
|
|
3891
|
-
) : /* @__PURE__ */ t(
|
|
3898
|
+
) : /* @__PURE__ */ t(et, {});
|
|
3892
3899
|
if (E || I)
|
|
3893
|
-
return
|
|
3894
|
-
|
|
3900
|
+
return Qe(e) ? /* @__PURE__ */ t(
|
|
3901
|
+
Vn,
|
|
3895
3902
|
{
|
|
3896
3903
|
eitherOr: a,
|
|
3897
3904
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
@@ -3901,10 +3908,10 @@ const Jn = (e) => {
|
|
|
3901
3908
|
rulesDisplay: e.rulesDisplay
|
|
3902
3909
|
}
|
|
3903
3910
|
) : /* @__PURE__ */ t(
|
|
3904
|
-
|
|
3911
|
+
Un,
|
|
3905
3912
|
{
|
|
3906
3913
|
eitherOr: a,
|
|
3907
|
-
imagePosition:
|
|
3914
|
+
imagePosition: De(e) ? e.imagePosition : void 0,
|
|
3908
3915
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3909
3916
|
isApiError: I,
|
|
3910
3917
|
apiErrorMessage: d,
|
|
@@ -3912,61 +3919,61 @@ const Jn = (e) => {
|
|
|
3912
3919
|
rulesDisplay: e.rulesDisplay
|
|
3913
3920
|
}
|
|
3914
3921
|
);
|
|
3915
|
-
if (
|
|
3922
|
+
if (N && de.length > 0) {
|
|
3916
3923
|
const W = {
|
|
3917
3924
|
eitherOr: a,
|
|
3918
3925
|
sdk: e.sdk,
|
|
3919
|
-
consents:
|
|
3926
|
+
consents: he(de),
|
|
3920
3927
|
onSubmit: Ce,
|
|
3921
3928
|
isSubmitting: D,
|
|
3922
3929
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3923
3930
|
rulesDisplay: e.rulesDisplay
|
|
3924
3931
|
};
|
|
3925
|
-
return
|
|
3926
|
-
|
|
3932
|
+
return De(e) ? /* @__PURE__ */ t(
|
|
3933
|
+
Yn,
|
|
3927
3934
|
{
|
|
3928
3935
|
...W,
|
|
3929
3936
|
imagePosition: e.imagePosition
|
|
3930
3937
|
}
|
|
3931
|
-
) : /* @__PURE__ */ t(
|
|
3938
|
+
) : /* @__PURE__ */ t(_n, { ...W });
|
|
3932
3939
|
}
|
|
3933
|
-
if (B && a.authRequirement === "LEAD" && (((
|
|
3934
|
-
if (
|
|
3940
|
+
if (B && a.authRequirement === "LEAD" && (((Xe = e.leads) == null ? void 0 : Xe.position) === "after" || ((Ee = e.leads) == null ? void 0 : Ee.position) === "before")) {
|
|
3941
|
+
if (De(e))
|
|
3935
3942
|
return /* @__PURE__ */ t(
|
|
3936
|
-
|
|
3943
|
+
Wn,
|
|
3937
3944
|
{
|
|
3938
3945
|
eitherOr: a,
|
|
3939
3946
|
sdk: e.sdk,
|
|
3940
3947
|
leads: e.leads,
|
|
3941
3948
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3942
|
-
onLeadSubmitted:
|
|
3949
|
+
onLeadSubmitted: ze,
|
|
3943
3950
|
imagePosition: e.imagePosition,
|
|
3944
3951
|
isSubmitting: D,
|
|
3945
3952
|
rulesDisplay: e.rulesDisplay,
|
|
3946
|
-
consents: ne ?
|
|
3953
|
+
consents: ne ? V : void 0
|
|
3947
3954
|
}
|
|
3948
3955
|
);
|
|
3949
|
-
if (
|
|
3956
|
+
if (Qe(e))
|
|
3950
3957
|
return /* @__PURE__ */ t(
|
|
3951
|
-
|
|
3958
|
+
Nn,
|
|
3952
3959
|
{
|
|
3953
3960
|
eitherOr: a,
|
|
3954
3961
|
sdk: e.sdk,
|
|
3955
3962
|
leads: e.leads,
|
|
3956
3963
|
defaultImagePlaceholderUrl: e.defaultImagePlaceholderUrl,
|
|
3957
|
-
onLeadSubmitted:
|
|
3964
|
+
onLeadSubmitted: ze,
|
|
3958
3965
|
isSubmitting: D,
|
|
3959
3966
|
rulesDisplay: e.rulesDisplay,
|
|
3960
|
-
consents: ne ?
|
|
3967
|
+
consents: ne ? V : void 0
|
|
3961
3968
|
}
|
|
3962
3969
|
);
|
|
3963
3970
|
}
|
|
3964
|
-
return
|
|
3965
|
-
|
|
3971
|
+
return De(e) ? /* @__PURE__ */ t(
|
|
3972
|
+
Bn,
|
|
3966
3973
|
{
|
|
3967
3974
|
eitherOr: a,
|
|
3968
3975
|
currentPair: i,
|
|
3969
|
-
stepInfo:
|
|
3976
|
+
stepInfo: h,
|
|
3970
3977
|
gameState: n,
|
|
3971
3978
|
timer: m,
|
|
3972
3979
|
selected: u,
|
|
@@ -3978,18 +3985,18 @@ const Jn = (e) => {
|
|
|
3978
3985
|
showStandings: e.showStandings,
|
|
3979
3986
|
additionalCTA: e.additionalCTA,
|
|
3980
3987
|
imagePosition: e.imagePosition,
|
|
3981
|
-
consents:
|
|
3988
|
+
consents: he(Q),
|
|
3982
3989
|
isSubmitting: D,
|
|
3983
3990
|
onGameStart: ue,
|
|
3984
|
-
onSelection:
|
|
3991
|
+
onSelection: we,
|
|
3985
3992
|
onPlayAgain: Ie
|
|
3986
3993
|
}
|
|
3987
|
-
) :
|
|
3988
|
-
|
|
3994
|
+
) : Qe(e) ? /* @__PURE__ */ t(
|
|
3995
|
+
Hn,
|
|
3989
3996
|
{
|
|
3990
3997
|
eitherOr: a,
|
|
3991
3998
|
currentPair: i,
|
|
3992
|
-
stepInfo:
|
|
3999
|
+
stepInfo: h,
|
|
3993
4000
|
gameState: n,
|
|
3994
4001
|
timer: m,
|
|
3995
4002
|
selected: u,
|
|
@@ -4000,14 +4007,14 @@ const Jn = (e) => {
|
|
|
4000
4007
|
rulesDisplay: e.rulesDisplay,
|
|
4001
4008
|
showStandings: e.showStandings,
|
|
4002
4009
|
additionalCTA: e.additionalCTA,
|
|
4003
|
-
consents:
|
|
4010
|
+
consents: he(Q),
|
|
4004
4011
|
isSubmitting: D,
|
|
4005
4012
|
onGameStart: ue,
|
|
4006
|
-
onSelection:
|
|
4013
|
+
onSelection: we,
|
|
4007
4014
|
onPlayAgain: Ie
|
|
4008
4015
|
}
|
|
4009
|
-
) : /* @__PURE__ */ t(
|
|
4010
|
-
},
|
|
4016
|
+
) : /* @__PURE__ */ t(et, {});
|
|
4017
|
+
}, lr = (e) => /* @__PURE__ */ t(hn, { packageName: "either-or-play", ...e, children: /* @__PURE__ */ t(qn, { ...e }) });
|
|
4011
4018
|
export {
|
|
4012
|
-
|
|
4019
|
+
lr as M
|
|
4013
4020
|
};
|