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.
Files changed (69) hide show
  1. package/Betslip.js +2 -2
  2. package/ChanceGame.js +958 -1464
  3. package/ClassicQuizPlay.js +2 -2
  4. package/CollectLead.js +1 -1
  5. package/CompetitionStatistics.js +2042 -2215
  6. package/CompetitorCard.js +4281 -4919
  7. package/Discussion.js +2 -2
  8. package/EitherOrPlay.js +2 -2
  9. package/EventCard.js +6010 -7547
  10. package/EventGamePlay.js +2 -2
  11. package/Leaderboard.js +546 -849
  12. package/List.js +227 -218
  13. package/MatchQuizPlay.js +2 -2
  14. package/Odds.js +50 -42
  15. package/PersonalityQuizPlay.js +2 -2
  16. package/PickThePair.js +2 -2
  17. package/PlayerOfTheMatch.js +285 -269
  18. package/PollVote.js +2 -2
  19. package/Predictor.js +80 -127
  20. package/README.md +1 -1
  21. package/Standings.js +991 -1324
  22. package/TopX.js +1120 -1167
  23. package/chunks/{ChanceGameEmbedVariant-CVys-3Zh.js → ChanceGameEmbedVariant-DM9eLG5s.js} +2 -2
  24. package/chunks/CheckCircle-I1FktW5Y.js +13 -0
  25. package/chunks/OddsSkeleton-DP5Yfqpr.js +522 -0
  26. package/chunks/Person-CXRqyF4E.js +11 -0
  27. package/chunks/PickOneOfX-DET4ZhjV.js +3117 -0
  28. package/chunks/Search-CIXthh0D.js +17 -0
  29. package/chunks/TimerOutlined-D-WA_vpE.js +8 -0
  30. package/chunks/WorkspacePremiumOutlined-DUXVgJlF.js +136 -0
  31. package/chunks/{chevrons-right-CXSpQt9w.js → chevrons-right-HWKW2c4I.js} +24 -4
  32. package/chunks/index-BENM3N_w.js +4 -0
  33. package/chunks/index-BRxAV693.js +4 -0
  34. package/chunks/index-BXYTsvIX.js +4 -0
  35. package/chunks/index-C0ilols1.js +4 -0
  36. package/chunks/index-D7VhczXH.js +4 -0
  37. package/chunks/index-DKwvdw9t.js +4 -0
  38. package/chunks/index-DZN-AITW.js +4 -0
  39. package/chunks/main-B2sDRFF4.js +2184 -0
  40. package/chunks/main-CzfWaEQP.js +4869 -0
  41. package/chunks/main-DFNl3g_U.js +4910 -0
  42. package/chunks/{main-65WcUqAl.js → main-DLwnvntz.js} +600 -593
  43. package/chunks/main-DiBlJBNb.js +1956 -0
  44. package/chunks/main-DxvBjXsd.js +1775 -0
  45. package/chunks/main-S8_NDSiY.js +3209 -0
  46. package/chunks/main-lBgr8Liq.js +6571 -0
  47. package/chunks/{withVersionStamp-BkiEu_79.js → withVersionStamp-BsLyhvNA.js} +1 -1
  48. package/package.json +2 -2
  49. package/chunks/OddsSkeleton-ClJE2xhR.js +0 -26
  50. package/chunks/OddsStrip-BnSp5TXa.js +0 -383
  51. package/chunks/PickOneOfX-DaJtkbCw.js +0 -4206
  52. package/chunks/chevron-left-CxfCSZcr.js +0 -13
  53. package/chunks/chevron-right-BEQMacFn.js +0 -13
  54. package/chunks/index-Aq5MbUB9.js +0 -4
  55. package/chunks/index-BBQm_8LD.js +0 -4
  56. package/chunks/index-BC_sWWgc.js +0 -4
  57. package/chunks/index-DXKDJ1Vp.js +0 -4
  58. package/chunks/index-DjT5NrbA.js +0 -4
  59. package/chunks/index-DvLRehH6.js +0 -4
  60. package/chunks/index-aIMaxR-p.js +0 -4
  61. package/chunks/main-52Wff7qC.js +0 -11441
  62. package/chunks/main-B58mi9jx.js +0 -5622
  63. package/chunks/main-BIdXUTZS.js +0 -7308
  64. package/chunks/main-DD-NEzC7.js +0 -8241
  65. package/chunks/main-DUnfJPzY.js +0 -3608
  66. package/chunks/main-DpCBqqg_.js +0 -1950
  67. package/chunks/main-Drznt1ak.js +0 -1790
  68. package/chunks/users-wbJRbqW8.js +0 -16
  69. package/chunks/x-CK4GYo7T.js +0 -14
@@ -0,0 +1,3117 @@
1
+ import { jsxs as g, jsx as t, Fragment as at } from "@emotion/react/jsx-runtime";
2
+ import { css as r, keyframes as V } from "@emotion/react";
3
+ import { useColors as pt, useCornerRadius as Ut, useFontFamily as Zt, useSpacingScale as Ke, isMobile as ct, isDesktop as qt, useCurrentThemeMode as Jt } from "fansunited-frontend-core";
4
+ import tr, { useState as B, useEffect as Gt, useRef as ce } from "react";
5
+ const yt = (e, l) => (i) => {
6
+ if (!l) return `${e}${i}`;
7
+ const n = parseInt(i, 16);
8
+ return `${e}${Math.min(Math.round(n * 2.5), 255).toString(16).padStart(2, "0")}`;
9
+ }, er = (e) => e ? "0.15" : "0.06", rr = (e) => {
10
+ const l = e.filter((i) => i.isWinning);
11
+ return l.length === 0 ? e[Math.floor(Math.random() * e.length)] : l[Math.floor(Math.random() * l.length)];
12
+ }, or = (e) => e[Math.floor(Math.random() * e.length)], nr = (e) => {
13
+ const l = e.reduce((c, b) => c + b.weight, 0), i = Math.random() * l;
14
+ let n = 0;
15
+ for (const c of e)
16
+ if (n += c.weight, i <= n) return c;
17
+ return e[0];
18
+ }, Qt = (e, l) => {
19
+ switch (l.toLowerCase()) {
20
+ case "win":
21
+ return rr(e);
22
+ case "fair":
23
+ return or(e);
24
+ case "weighted":
25
+ default:
26
+ return nr(e);
27
+ }
28
+ }, ir = {
29
+ fast: { duration: 3e3, minSpins: 2, maxSpins: 3 },
30
+ normal: { duration: 3e3, minSpins: 3, maxSpins: 5 },
31
+ slow: { duration: 3500, minSpins: 4, maxSpins: 5 }
32
+ };
33
+ function ar({ segments: e, mode: l, pace: i }) {
34
+ const [n, c] = B(!1), [b, m] = B(0), [a, s] = B(null), [y, x] = B(!1), [u, C] = B(!1), [f, d] = B(!1), [h, D] = B(!1), [$, v] = B(!1), { duration: M, minSpins: L, maxSpins: z } = ir[i], w = Math.round(M * 0.23), k = 3e3 / M * 1.25, T = 0.45 * k;
35
+ return Gt(() => {
36
+ setTimeout(() => D(!0), 100);
37
+ }, []), {
38
+ isSpinning: n,
39
+ finalRotation: b,
40
+ selectedSegment: a,
41
+ showShakeAnimation: y,
42
+ showResultScreen: u,
43
+ showInlineResult: f,
44
+ hasEntered: h,
45
+ confettiActive: $,
46
+ spinDuration: M,
47
+ shakeAnimationDuration: w,
48
+ confettiVelocityMultiplier: k,
49
+ confettiGravity: T,
50
+ handleSpin: () => {
51
+ if (n || $ || f) return;
52
+ C(!1), d(!1), s(null), c(!0);
53
+ const R = Qt(e, l);
54
+ s(R);
55
+ const X = e.findIndex(
56
+ (Q) => Q.id === R.id
57
+ ), O = 360 / e.length, q = X * O + O / 2, J = L + Math.floor(Math.random() * (z - L + 1)), F = 360 - q, G = b % 360;
58
+ let tt = F - G;
59
+ tt < 0 && (tt += 360);
60
+ const N = b + J * 360 + tt;
61
+ m(N), setTimeout(() => {
62
+ c(!1), R.isWinning ? v(!0) : (x(!0), setTimeout(() => {
63
+ x(!1), setTimeout(() => {
64
+ var et, rt;
65
+ ((et = R.results) == null ? void 0 : et.primaryCTA) || ((rt = R.results) == null ? void 0 : rt.secondaryCTA) ? C(!0) : d(!0);
66
+ }, 300);
67
+ }, w));
68
+ }, M);
69
+ },
70
+ handleReset: () => {
71
+ c(!1), m(0), s(null), v(!1), x(!1), C(!1), d(!1);
72
+ },
73
+ onConfettiComplete: () => {
74
+ var X, O;
75
+ v(!1), ((X = a == null ? void 0 : a.results) == null ? void 0 : X.primaryCTA) || ((O = a == null ? void 0 : a.results) == null ? void 0 : O.secondaryCTA) ? C(!0) : d(!0);
76
+ }
77
+ };
78
+ }
79
+ const o = {
80
+ space2xs: "var(--fu-ucrc-cg-space-2xs)",
81
+ spaceXs: "var(--fu-ucrc-cg-space-xs)",
82
+ spaceSm: "var(--fu-ucrc-cg-space-sm)",
83
+ spaceMd: "var(--fu-ucrc-cg-space-md)",
84
+ spaceLg: "var(--fu-ucrc-cg-space-lg)",
85
+ spaceXl: "var(--fu-ucrc-cg-space-xl)",
86
+ radiusSm: "var(--fu-ucrc-cg-radius-sm)",
87
+ radiusMd: "var(--fu-ucrc-cg-radius-md)",
88
+ radiusLg: "var(--fu-ucrc-cg-radius-lg)",
89
+ radiusXl: "var(--fu-ucrc-cg-radius-xl)",
90
+ fontPrimary: "var(--fu-ucrc-cg-font-primary)",
91
+ fontSecondary: "var(--fu-ucrc-cg-font-secondary)",
92
+ surface: "var(--fu-ucrc-cg-surface)",
93
+ textPrimary: "var(--fu-ucrc-cg-text-primary)",
94
+ outline: "var(--fu-ucrc-cg-outline)",
95
+ success: "var(--fu-ucrc-cg-success)",
96
+ warningSoftBg: "var(--fu-ucrc-cg-warning-soft-bg)",
97
+ warning: "var(--fu-ucrc-cg-warning)",
98
+ // Per instance, set by each game's root from its (branding-resolved) colour props.
99
+ content: "var(--fu-ucrc-cg-content)",
100
+ primary: "var(--fu-ucrc-cg-primary)",
101
+ secondary: "var(--fu-ucrc-cg-secondary)",
102
+ onPrimary: "var(--fu-ucrc-cg-on-primary)",
103
+ danger: "var(--fu-ucrc-cg-danger)",
104
+ border: "var(--fu-ucrc-cg-border)",
105
+ background: "var(--fu-ucrc-cg-background)"
106
+ }, wt = () => {
107
+ const e = pt(), l = Ut(), i = Zt(), n = Ke();
108
+ return tr.useMemo(
109
+ () => ({
110
+ "--fu-ucrc-cg-space-2xs": n["2xs"],
111
+ "--fu-ucrc-cg-space-xs": n.xs,
112
+ "--fu-ucrc-cg-space-sm": n.sm,
113
+ "--fu-ucrc-cg-space-md": n.md,
114
+ "--fu-ucrc-cg-space-lg": n.lg,
115
+ "--fu-ucrc-cg-space-xl": n.xl,
116
+ "--fu-ucrc-cg-radius-sm": l.sm,
117
+ "--fu-ucrc-cg-radius-md": l.md,
118
+ "--fu-ucrc-cg-radius-lg": l.lg,
119
+ "--fu-ucrc-cg-radius-xl": l.xl,
120
+ "--fu-ucrc-cg-font-primary": i.primary,
121
+ "--fu-ucrc-cg-font-secondary": i.secondary,
122
+ "--fu-ucrc-cg-surface": e.surface,
123
+ "--fu-ucrc-cg-text-primary": e.textPrimary,
124
+ "--fu-ucrc-cg-outline": e.outlineEnabledBorder,
125
+ "--fu-ucrc-cg-success": e.palette.success.plainColor,
126
+ "--fu-ucrc-cg-warning-soft-bg": e.palette.warning.softBg,
127
+ "--fu-ucrc-cg-warning": e.palette.warning.plainColor
128
+ }),
129
+ [e, l, i, n]
130
+ );
131
+ }, sr = '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', K = { margin: 0, lineHeight: 1.5 }, ht = { margin: 0, lineHeight: 1.33334, letterSpacing: "-0.025em" }, Lt = {
132
+ boxSizing: "border-box",
133
+ display: "inline-flex",
134
+ alignItems: "center",
135
+ justifyContent: "center",
136
+ position: "relative",
137
+ minHeight: "36px",
138
+ margin: 0,
139
+ border: "none",
140
+ lineHeight: "inherit",
141
+ cursor: "pointer",
142
+ userSelect: "none",
143
+ textDecoration: "none",
144
+ WebkitTapHighlightColor: "transparent",
145
+ "&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible, #0B6BCB)", outlineOffset: "2px" },
146
+ "&:disabled": { pointerEvents: "none", cursor: "default" }
147
+ }, Ct = { ...Lt, border: "1px solid", backgroundColor: "transparent" }, jt = { display: "flex", flexDirection: "column", alignItems: "center" }, Yt = {
148
+ paddingInline: o.spaceLg,
149
+ paddingBlock: o.spaceSm,
150
+ fontWeight: 700,
151
+ textTransform: "uppercase",
152
+ borderColor: o.border,
153
+ color: o.content,
154
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
155
+ "&:hover": { borderColor: o.primary, backgroundColor: "transparent", color: o.primary }
156
+ }, le = {
157
+ flex: 1,
158
+ width: "auto",
159
+ ...jt,
160
+ gap: o.spaceXs,
161
+ textAlign: "center",
162
+ padding: o.spaceMd,
163
+ border: `2px solid ${o.border}`,
164
+ borderRadius: o.radiusLg,
165
+ boxSizing: "border-box"
166
+ }, de = {
167
+ marginTop: o.spaceSm,
168
+ paddingInline: o.spaceLg,
169
+ paddingBlock: o.spaceSm,
170
+ fontFamily: o.fontPrimary,
171
+ fontWeight: 700,
172
+ fontSize: "0.875rem",
173
+ textTransform: "uppercase",
174
+ letterSpacing: "0.5px",
175
+ borderRadius: o.radiusXl,
176
+ backgroundColor: o.primary,
177
+ color: o.onPrimary,
178
+ boxShadow: "0 4px 14px 0 rgba(0,0,0,0.15)",
179
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
180
+ transform: "scale(1)",
181
+ "&:hover": { transform: "scale(1.05)", boxShadow: "0 6px 20px 0 rgba(0,0,0,0.2)" },
182
+ "&:active": { transform: "scale(0.95)" }
183
+ }, pe = {
184
+ ...K,
185
+ fontFamily: o.fontSecondary,
186
+ fontWeight: 400,
187
+ fontSize: "0.75rem",
188
+ color: o.content,
189
+ opacity: 0.7,
190
+ textAlign: "center",
191
+ maxWidth: "900px",
192
+ lineHeight: 1.4
193
+ }, fe = {
194
+ ...ht,
195
+ fontFamily: o.fontPrimary,
196
+ fontWeight: 700,
197
+ fontSize: "2rem",
198
+ color: o.content,
199
+ lineHeight: 1.2
200
+ }, ue = {
201
+ ...K,
202
+ fontFamily: o.fontSecondary,
203
+ fontWeight: 400,
204
+ fontSize: "1rem",
205
+ color: o.content,
206
+ opacity: 0.8
207
+ }, ge = {
208
+ marginTop: o.spaceMd,
209
+ fontFamily: o.fontSecondary,
210
+ fontWeight: 600,
211
+ fontSize: "1rem",
212
+ borderRadius: o.radiusMd,
213
+ minWidth: "180px"
214
+ }, Pt = {
215
+ ...jt,
216
+ gap: o.spaceXs,
217
+ textAlign: "center",
218
+ width: "100%",
219
+ maxWidth: "600px"
220
+ }, E = {
221
+ screen: r({ ...jt, width: "100%", gap: o.spaceMd, zIndex: 10 }),
222
+ heading: r({ ...jt, gap: o.spaceXs }),
223
+ screenTitle: r({
224
+ ...ht,
225
+ fontFamily: o.fontPrimary,
226
+ fontWeight: 700,
227
+ fontSize: "1.25rem",
228
+ color: o.content,
229
+ textAlign: "center",
230
+ textTransform: "uppercase"
231
+ }),
232
+ screenDescription: r({
233
+ ...K,
234
+ fontFamily: o.fontSecondary,
235
+ fontWeight: 400,
236
+ fontSize: "0.875rem",
237
+ color: o.content,
238
+ textAlign: "center",
239
+ opacity: 0.8
240
+ }),
241
+ ctas: r({ display: "flex", flexDirection: "row", gap: o.spaceXl, width: "100%", maxWidth: "900px", justifyContent: "center" }),
242
+ ctasStandard: r({ display: "flex", flexDirection: "row", gap: o.spaceMd, width: "100%", maxWidth: "900px", justifyContent: "center" }),
243
+ ctasMobile: r({ display: "flex", flexDirection: "column", gap: o.spaceXl, width: "100%", maxWidth: "900px", justifyContent: "center" }),
244
+ ctasStandardMobile: r({ display: "flex", flexDirection: "column", gap: o.spaceMd, width: "100%", maxWidth: "900px", justifyContent: "center" }),
245
+ cta: r(le),
246
+ ctaMobile: r({ ...le, flex: "0 1 auto", width: "100%" }),
247
+ ctaTitle: r({
248
+ ...ht,
249
+ fontFamily: o.fontPrimary,
250
+ fontWeight: 700,
251
+ fontSize: "0.875rem",
252
+ color: o.content,
253
+ textTransform: "uppercase"
254
+ }),
255
+ ctaDescription: r({
256
+ ...K,
257
+ fontFamily: o.fontSecondary,
258
+ fontWeight: 400,
259
+ fontSize: "0.875rem",
260
+ color: o.content,
261
+ opacity: 0.7,
262
+ whiteSpace: "pre-line"
263
+ }),
264
+ ctaButton: r(Lt, de),
265
+ ctaButtonMobile: r(Lt, de, { fontSize: "0.75rem" }),
266
+ screenDisclaimer: r(pe),
267
+ screenDisclaimerMobile: r({ ...pe, fontSize: "0.625rem" }),
268
+ screenReset: r(Ct, Yt, {
269
+ marginTop: o.spaceSm,
270
+ fontFamily: o.fontPrimary,
271
+ fontSize: "0.875rem",
272
+ letterSpacing: "0.5px",
273
+ borderRadius: o.radiusXl
274
+ }),
275
+ screenResetMobile: r(Ct, Yt, {
276
+ marginTop: o.spaceSm,
277
+ fontFamily: o.fontPrimary,
278
+ fontSize: "0.75rem",
279
+ letterSpacing: "0.5px",
280
+ borderRadius: o.radiusXl
281
+ }),
282
+ inline: r(Pt),
283
+ inlineRaised: r({ ...Pt, zIndex: 1 }),
284
+ inlineSpaced: r({ ...Pt, marginBottom: o.spaceMd }),
285
+ inlineTitle: r(fe),
286
+ inlineTitleMobile: r({ ...fe, fontSize: "1.5rem" }),
287
+ inlineDescription: r(ue),
288
+ inlineDescriptionMobile: r({ ...ue, fontSize: "0.875rem" }),
289
+ inlineReset: r(Ct, Yt, ge),
290
+ inlineResetMobile: r(Ct, Yt, ge, { fontSize: "0.875rem", minWidth: "150px" })
291
+ }, he = ({ cta: e, mobile: l }) => /* @__PURE__ */ g("div", { css: l ? E.ctaMobile : E.cta, children: [
292
+ e.title && /* @__PURE__ */ t("h3", { css: E.ctaTitle, children: e.title }),
293
+ e.description && /* @__PURE__ */ t("p", { css: E.ctaDescription, children: e.description }),
294
+ /* @__PURE__ */ t(
295
+ "a",
296
+ {
297
+ css: l ? E.ctaButtonMobile : E.ctaButton,
298
+ href: e.link,
299
+ target: "_blank",
300
+ rel: "noopener noreferrer",
301
+ children: e.label
302
+ }
303
+ )
304
+ ] }), Mt = ({
305
+ result: e,
306
+ variant: l,
307
+ mode: i,
308
+ contentColor: n,
309
+ primaryColor: c,
310
+ onPrimaryColor: b,
311
+ borderColor: m,
312
+ disclaimer: a,
313
+ enableReset: s = !1,
314
+ onReset: y,
315
+ showResetButton: x = !0,
316
+ raised: u,
317
+ spaced: C
318
+ }) => {
319
+ const f = ct(), d = pt(), h = wt(), D = l === "standard", $ = {
320
+ ...h,
321
+ "--fu-ucrc-cg-content": n,
322
+ "--fu-ucrc-cg-primary": c,
323
+ "--fu-ucrc-cg-on-primary": b,
324
+ "--fu-ucrc-cg-border": m || d.outlineEnabledBorder
325
+ }, v = s && x && y;
326
+ return i === "screen" ? /* @__PURE__ */ g("div", { css: E.screen, style: $, children: [
327
+ /* @__PURE__ */ g("div", { css: E.heading, children: [
328
+ /* @__PURE__ */ t("h2", { css: E.screenTitle, children: e.title }),
329
+ e.description && /* @__PURE__ */ t("p", { css: E.screenDescription, children: e.description })
330
+ ] }),
331
+ (e.primaryCTA || e.secondaryCTA) && /* @__PURE__ */ g(
332
+ "div",
333
+ {
334
+ css: D ? f ? E.ctasStandardMobile : E.ctasStandard : f ? E.ctasMobile : E.ctas,
335
+ children: [
336
+ e.primaryCTA && /* @__PURE__ */ t(he, { cta: e.primaryCTA, mobile: f }),
337
+ e.secondaryCTA && /* @__PURE__ */ t(he, { cta: e.secondaryCTA, mobile: f })
338
+ ]
339
+ }
340
+ ),
341
+ !D && a && /* @__PURE__ */ t("p", { css: f ? E.screenDisclaimerMobile : E.screenDisclaimer, children: a }),
342
+ v && /* @__PURE__ */ t(
343
+ "button",
344
+ {
345
+ type: "button",
346
+ css: f ? E.screenResetMobile : E.screenReset,
347
+ onClick: y,
348
+ children: "Reset Game"
349
+ }
350
+ )
351
+ ] }) : /* @__PURE__ */ g("div", { css: u ? E.inlineRaised : C ? E.inlineSpaced : E.inline, style: $, children: [
352
+ e.title && /* @__PURE__ */ t("h2", { css: f ? E.inlineTitleMobile : E.inlineTitle, children: e.title }),
353
+ e.description && /* @__PURE__ */ t("p", { css: f ? E.inlineDescriptionMobile : E.inlineDescription, children: e.description }),
354
+ v && /* @__PURE__ */ t("button", { type: "button", css: f ? E.inlineResetMobile : E.inlineReset, onClick: y, children: "Reset Game" })
355
+ ] });
356
+ }, cr = ["04", "06", "08", "10", "12", "15", "18", "20", "25", "30"], _ = (e) => `var(--fu-ucrc-cg-dc-${e})`, I = (e) => `var(--fu-ucrc-cg-deco-${e})`, lr = V({
357
+ "0%": { transform: "translate(-50%, -50%) rotate(0deg)" },
358
+ "100%": { transform: "translate(-50%, -50%) rotate(360deg)" }
359
+ }), dr = V({
360
+ "0%": { transform: "translateY(0) scale(1)", opacity: 0 },
361
+ "10%": { opacity: 0.6 },
362
+ "90%": { opacity: 0.3 },
363
+ "100%": { transform: `translateY(-110vh) scale(${I("scale")})`, opacity: 0 }
364
+ }), me = V({
365
+ "0%, 100%": { transform: "translateY(0px)" },
366
+ "50%": { transform: `translateY(${I("rise")})` }
367
+ }), pr = V({
368
+ "0%": { transform: "rotate(45deg) rotateY(0deg)" },
369
+ "100%": { transform: "rotate(45deg) rotateY(360deg)" }
370
+ }), fr = V({
371
+ "0%": { transform: "rotateY(0deg) rotateX(15deg)" },
372
+ "25%": { transform: "rotateY(90deg) rotateX(15deg)" },
373
+ "50%": { transform: "rotateY(180deg) rotateX(15deg)" },
374
+ "75%": { transform: "rotateY(270deg) rotateX(15deg)" },
375
+ "100%": { transform: "rotateY(360deg) rotateX(15deg)" }
376
+ }), ur = V({
377
+ "0%, 100%": { transform: "translateY(0px) scale(1)", opacity: 0.4 },
378
+ "50%": { transform: `translateY(${I("rise")}) scale(1.15)`, opacity: 0.7 }
379
+ }), gr = V({
380
+ "0%": { transform: "rotateY(0deg)" },
381
+ "100%": { transform: "rotateY(360deg)" }
382
+ }), hr = V({
383
+ "0%, 100%": { opacity: 0, transform: "scale(0.5)", boxShadow: "0 0 0px var(--fu-ucrc-cg-dc-primary-00)" },
384
+ "50%": { opacity: 0.6, transform: "scale(1.2)", boxShadow: `0 0 ${I("glow")} var(--fu-ucrc-cg-dc-primary-40)` }
385
+ }), mr = V({
386
+ "0%, 100%": { opacity: 0.3, transform: "translate(-50%, -50%) scale(1)" },
387
+ "50%": { opacity: 0.7, transform: "translate(-50%, -50%) scale(1.05)" }
388
+ }), xr = V({
389
+ "0%": { "--border-angle": "0deg" },
390
+ "100%": { "--border-angle": "360deg" }
391
+ }), Ht = {
392
+ position: "absolute",
393
+ top: I("y"),
394
+ left: I("x"),
395
+ width: I("size"),
396
+ height: I("size")
397
+ }, it = {
398
+ root: r({ position: "absolute", inset: 0, overflow: "hidden", pointerEvents: "none", zIndex: 0 }),
399
+ pattern: r({ position: "absolute", inset: 0 }),
400
+ spotlight: r({
401
+ position: "absolute",
402
+ top: "50%",
403
+ left: "50%",
404
+ width: I("size"),
405
+ height: I("size"),
406
+ transform: "translate(-50%, -50%)",
407
+ background: `conic-gradient(
408
+ from 0deg,
409
+ transparent 0deg, ${_("06")} 10deg, transparent 20deg,
410
+ transparent 60deg, ${_("04")} 70deg, transparent 80deg,
411
+ transparent 120deg, ${_("06")} 130deg, transparent 140deg,
412
+ transparent 180deg, ${_("04")} 190deg, transparent 200deg,
413
+ transparent 240deg, ${_("06")} 250deg, transparent 260deg,
414
+ transparent 300deg, ${_("04")} 310deg, transparent 320deg,
415
+ transparent 360deg
416
+ )`,
417
+ borderRadius: "50%",
418
+ animation: `${lr} 20s linear infinite`
419
+ }),
420
+ bubble: r({
421
+ position: "absolute",
422
+ width: I("size"),
423
+ height: I("size"),
424
+ borderRadius: "50%",
425
+ background: `radial-gradient(circle at 30% 30%, ${_("18")}, ${_("08")})`,
426
+ border: `1px solid ${_("12")}`,
427
+ bottom: "-40px",
428
+ left: I("x"),
429
+ animation: `${dr} ${I("duration")} ease-in infinite`,
430
+ animationDelay: I("delay")
431
+ }),
432
+ diamond: r({
433
+ ...Ht,
434
+ perspective: "100px",
435
+ animation: `${me} ${I("duration")} ease-in-out infinite`,
436
+ animationDelay: I("delay")
437
+ }),
438
+ diamondFace: r({
439
+ width: "100%",
440
+ height: "100%",
441
+ transform: "rotate(45deg)",
442
+ background: `linear-gradient(135deg, ${_("20")}, ${_("08")})`,
443
+ border: `1px solid ${_("25")}`,
444
+ boxShadow: `0 0 ${I("glow")} ${_("15")}`,
445
+ animation: `${pr} ${I("spin")} linear infinite`,
446
+ transformStyle: "preserve-3d"
447
+ }),
448
+ coin: r({
449
+ ...Ht,
450
+ perspective: "200px",
451
+ animation: `${me} ${I("duration")} ease-in-out infinite`,
452
+ animationDelay: I("delay")
453
+ }),
454
+ coinFace: r({
455
+ width: "100%",
456
+ height: "100%",
457
+ borderRadius: "50%",
458
+ background: `linear-gradient(135deg, ${_("25")} 0%, ${_("10")} 50%, ${_("30")} 100%)`,
459
+ border: `2px solid ${_("20")}`,
460
+ boxShadow: `inset 0 2px 4px ${_("15")}, inset 0 -2px 4px rgba(0,0,0,0.1), 0 0 ${I("glow")} ${_("10")}`,
461
+ animation: `${fr} ${I("spin")} ease-in-out infinite`,
462
+ transformStyle: "preserve-3d"
463
+ }),
464
+ coinRim: r({
465
+ position: "absolute",
466
+ top: "50%",
467
+ left: "50%",
468
+ transform: "translate(-50%, -50%)",
469
+ width: "60%",
470
+ height: "60%",
471
+ borderRadius: "50%",
472
+ border: `1px solid ${_("20")}`
473
+ }),
474
+ suit: r({
475
+ ...K,
476
+ fontFamily: sr,
477
+ position: "absolute",
478
+ top: I("y"),
479
+ left: I("x"),
480
+ fontSize: I("font"),
481
+ color: I("color"),
482
+ animation: `${ur} ${I("duration")} ease-in-out infinite, ${gr} ${I("spin")} linear infinite`,
483
+ animationDelay: I("delay"),
484
+ textShadow: `0 0 10px ${_("10")}`
485
+ }),
486
+ star: r({
487
+ ...Ht,
488
+ borderRadius: "50%",
489
+ background: "var(--fu-ucrc-cg-dc-primary)",
490
+ animation: `${hr} ${I("duration")} ease-in-out infinite`,
491
+ animationDelay: I("delay")
492
+ }),
493
+ ring: r({
494
+ position: "absolute",
495
+ top: "50%",
496
+ left: "50%",
497
+ width: I("size"),
498
+ height: I("size"),
499
+ borderRadius: "50%",
500
+ border: `1px solid ${I("color")}`,
501
+ transform: "translate(-50%, -50%)",
502
+ animation: `${mr} ${I("duration")} ease-in-out infinite`,
503
+ animationDelay: I("delay")
504
+ }),
505
+ sweep: r({
506
+ position: "absolute",
507
+ inset: 0,
508
+ borderRadius: "inherit",
509
+ padding: "1px",
510
+ background: `linear-gradient(var(--border-angle, 0deg), transparent 40%, ${_("20")} 50%, transparent 60%)`,
511
+ mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
512
+ maskComposite: "exclude",
513
+ WebkitMaskComposite: "xor",
514
+ animation: `${xr} 6s linear infinite`
515
+ })
516
+ }, bt = (e) => Object.fromEntries(Object.entries(e).map(([l, i]) => [`--fu-ucrc-cg-deco-${l}`, i])), Ve = ({ primaryColor: e, isDark: l, animationPrefix: i = "casino" }) => {
517
+ const n = ct(), c = yt(e, l), b = `${i}-bg-pattern`, m = {
518
+ ...Object.fromEntries(cr.map((a) => [`--fu-ucrc-cg-dc-${a}`, c(a)])),
519
+ "--fu-ucrc-cg-dc-primary": e,
520
+ "--fu-ucrc-cg-dc-primary-00": `${e}00`,
521
+ "--fu-ucrc-cg-dc-primary-40": `${e}40`
522
+ };
523
+ return /* @__PURE__ */ g("div", { css: it.root, style: m, children: [
524
+ /* @__PURE__ */ g("svg", { width: "100%", height: "100%", opacity: er(l), css: it.pattern, children: [
525
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ g("pattern", { id: b, x: "0", y: "0", width: "60", height: "60", patternUnits: "userSpaceOnUse", children: [
526
+ /* @__PURE__ */ t("path", { d: "M 30 10 L 38 30 L 30 50 L 22 30 Z", fill: "none", stroke: e, strokeWidth: "0.5", opacity: "0.6" }),
527
+ /* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "1.5", fill: e, opacity: "0.4" }),
528
+ /* @__PURE__ */ t("circle", { cx: "55", cy: "5", r: "1.5", fill: e, opacity: "0.4" }),
529
+ /* @__PURE__ */ t("circle", { cx: "5", cy: "55", r: "1.5", fill: e, opacity: "0.4" }),
530
+ /* @__PURE__ */ t("circle", { cx: "55", cy: "55", r: "1.5", fill: e, opacity: "0.4" })
531
+ ] }) }),
532
+ /* @__PURE__ */ t("rect", { width: "100%", height: "100%", fill: `url(#${b})` })
533
+ ] }),
534
+ /* @__PURE__ */ t("div", { css: it.spotlight, style: bt({ size: n ? "300px" : "500px" }) }),
535
+ Array.from({ length: n ? 8 : 14 }).map((a, s) => /* @__PURE__ */ t(
536
+ "div",
537
+ {
538
+ css: it.bubble,
539
+ style: bt({
540
+ size: `${10 + (s * 13 + 7) % 30}px`,
541
+ x: `${(s * 17 + 23) % 90 + 5}%`,
542
+ duration: `${8 + s * 3 % 7}s`,
543
+ delay: `${s * 1.3 % 8}s`,
544
+ scale: 0.6 + s % 3 * 0.2
545
+ })
546
+ },
547
+ `bubble-${s}`
548
+ )),
549
+ Array.from({ length: n ? 3 : 5 }).map((a, s) => {
550
+ const y = n ? 12 + s % 3 * 4 : 16 + s % 3 * 6, x = 6 + s % 4 * 2;
551
+ return /* @__PURE__ */ t(
552
+ "div",
553
+ {
554
+ css: it.diamond,
555
+ style: bt({
556
+ size: `${y}px`,
557
+ x: `${8 + (s * 19 + 11) % 84}%`,
558
+ y: `${10 + (s * 23 + 7) % 75}%`,
559
+ duration: `${x + 2}s`,
560
+ delay: `${s * 1.5}s`,
561
+ rise: `${-6 - s % 3 * 4}px`,
562
+ spin: `${x}s`,
563
+ glow: `${y / 2}px`
564
+ }),
565
+ children: /* @__PURE__ */ t("div", { css: it.diamondFace })
566
+ },
567
+ `diamond-${s}`
568
+ );
569
+ }),
570
+ Array.from({ length: n ? 2 : 4 }).map((a, s) => {
571
+ const y = n ? 18 + s % 2 * 6 : 24 + s % 2 * 8, x = 5 + s % 3 * 2;
572
+ return /* @__PURE__ */ t(
573
+ "div",
574
+ {
575
+ css: it.coin,
576
+ style: bt({
577
+ size: `${y}px`,
578
+ x: `${5 + (s * 23 + 31) % 85}%`,
579
+ y: `${15 + (s * 29 + 13) % 65}%`,
580
+ duration: `${x + 3}s`,
581
+ delay: `${s * 2.2}s`,
582
+ rise: `${-8 - s % 2 * 6}px`,
583
+ spin: `${x}s`,
584
+ glow: `${y / 2}px`
585
+ }),
586
+ children: /* @__PURE__ */ t("div", { css: it.coinFace, children: /* @__PURE__ */ t("div", { css: it.coinRim }) })
587
+ },
588
+ `coin-${s}`
589
+ );
590
+ }),
591
+ ["♠", "♥", "♦", "♣"].map((a, s) => {
592
+ const y = 7 + s % 3 * 2, x = a === "♥" || a === "♦";
593
+ return /* @__PURE__ */ t(
594
+ "p",
595
+ {
596
+ css: it.suit,
597
+ style: bt({
598
+ x: `${10 + s * 22}%`,
599
+ y: `${20 + s * 17 % 55}%`,
600
+ font: n ? "16px" : "22px",
601
+ color: c(x ? "15" : "12"),
602
+ duration: `${y}s`,
603
+ spin: `${y * 2}s`,
604
+ delay: `${s * 1.8}s`,
605
+ rise: `${-10 - s * 3}px`
606
+ }),
607
+ children: a
608
+ },
609
+ `suit-${s}`
610
+ );
611
+ }),
612
+ Array.from({ length: n ? 10 : 18 }).map((a, s) => {
613
+ const y = 2 + s % 3;
614
+ return /* @__PURE__ */ t(
615
+ "div",
616
+ {
617
+ css: it.star,
618
+ style: bt({
619
+ size: `${y}px`,
620
+ x: `${(s * 13 + 5) % 95 + 2}%`,
621
+ y: `${(s * 11 + 7) % 90 + 5}%`,
622
+ duration: `${2 + s % 4 * 0.8}s`,
623
+ delay: `${s * 0.7 % 5}s`,
624
+ glow: `${y * 3}px`
625
+ })
626
+ },
627
+ `star-${s}`
628
+ );
629
+ }),
630
+ [0, 1, 2].map((a) => /* @__PURE__ */ t(
631
+ "div",
632
+ {
633
+ css: it.ring,
634
+ style: bt({
635
+ size: n ? `${200 + a * 80}px` : `${300 + a * 120}px`,
636
+ color: c((8 - a * 2).toString(16).padStart(2, "0")),
637
+ duration: `${4 + a}s`,
638
+ delay: `${a * 1.3}s`
639
+ })
640
+ },
641
+ `glow-ring-${a}`
642
+ )),
643
+ /* @__PURE__ */ t("div", { css: it.sweep })
644
+ ] });
645
+ }, xe = {
646
+ root: r({
647
+ position: "absolute",
648
+ top: 0,
649
+ left: 0,
650
+ width: "100%",
651
+ height: "100%",
652
+ pointerEvents: "none",
653
+ zIndex: 1e3
654
+ }),
655
+ // `left` stays in css (via a var) so the RTL plugin mirrors it.
656
+ particle: r({ position: "absolute", left: "var(--fu-ucrc-cg-confetti-x)", opacity: 0.9 })
657
+ }, br = ({
658
+ active: e,
659
+ primaryColor: l,
660
+ velocityMultiplier: i,
661
+ gravity: n,
662
+ onComplete: c
663
+ }) => {
664
+ const [b, m] = B([]), a = ce(null), s = ce(!1), y = ct(), x = pt();
665
+ return Gt(() => {
666
+ if (e && !s.current) {
667
+ s.current = !0;
668
+ const u = y ? 50 : 100, C = [
669
+ l,
670
+ x.palette.warning.plainColor,
671
+ x.palette.success.plainColor,
672
+ "#FFD700",
673
+ "#FF69B4",
674
+ "#00CED1"
675
+ ], f = [];
676
+ for (let d = 0; d < u; d++)
677
+ f.push({
678
+ id: d,
679
+ x: 50,
680
+ y: 50,
681
+ vx: (Math.random() - 0.5) * 10,
682
+ vy: (Math.random() - 0.5) * 10 - 5,
683
+ color: C[Math.floor(Math.random() * C.length)],
684
+ size: Math.random() * 8 + 4,
685
+ rotation: Math.random() * 360,
686
+ rotationSpeed: (Math.random() - 0.5) * 12
687
+ });
688
+ m(f);
689
+ }
690
+ e || (s.current = !1);
691
+ }, [e]), Gt(() => {
692
+ if (b.length === 0) return;
693
+ const u = () => {
694
+ m((C) => {
695
+ const f = C.map((d) => ({
696
+ ...d,
697
+ x: d.x + d.vx * 0.6 * i,
698
+ y: d.y + d.vy * 0.6 * i,
699
+ vy: d.vy + n,
700
+ rotation: d.rotation + d.rotationSpeed
701
+ })).filter((d) => d.y < 150);
702
+ return f.length === 0 ? (c(), []) : f;
703
+ }), a.current = requestAnimationFrame(u);
704
+ };
705
+ return a.current = requestAnimationFrame(u), () => {
706
+ a.current && cancelAnimationFrame(a.current);
707
+ };
708
+ }, [b.length]), b.length === 0 ? null : /* @__PURE__ */ t("div", { css: xe.root, children: b.map((u) => /* @__PURE__ */ t(
709
+ "div",
710
+ {
711
+ css: xe.particle,
712
+ style: {
713
+ "--fu-ucrc-cg-confetti-x": `${u.x}%`,
714
+ top: `${u.y}%`,
715
+ width: `${u.size}px`,
716
+ height: `${u.size}px`,
717
+ backgroundColor: u.color,
718
+ transform: `rotate(${u.rotation}deg)`,
719
+ borderRadius: Math.random() > 0.5 ? "50%" : "0%"
720
+ }
721
+ },
722
+ u.id
723
+ )) });
724
+ }, yr = {
725
+ root: r({ position: "absolute", width: "100%", height: "100%", pointerEvents: "none", zIndex: 2 })
726
+ }, wr = ({ segmentCount: e, decorations: l, primaryColor: i }) => {
727
+ const n = pt(), c = e * 3;
728
+ return /* @__PURE__ */ g("svg", { viewBox: "0 0 400 400", css: yr.root, children: [
729
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ g("linearGradient", { id: "wheelRingGradient", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
730
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: l ? i : n.palette.warning.softBg }),
731
+ /* @__PURE__ */ t("stop", { offset: "50%", stopColor: l ? i : n.palette.warning.plainColor }),
732
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: l ? i : n.palette.warning.softBg })
733
+ ] }) }),
734
+ /* @__PURE__ */ t("circle", { cx: "200", cy: "200", r: "195", fill: "none", stroke: "url(#wheelRingGradient)", strokeWidth: "10" }),
735
+ Array.from({ length: c }).map((b, m) => {
736
+ const a = m * 360 / c * Math.PI / 180;
737
+ return /* @__PURE__ */ t(
738
+ "circle",
739
+ {
740
+ cx: 200 + 190 * Math.cos(a - Math.PI / 2),
741
+ cy: 200 + 190 * Math.sin(a - Math.PI / 2),
742
+ r: l ? "4" : "3",
743
+ fill: l ? m % 2 === 0 ? i : "#FFD700" : n.surface,
744
+ opacity: "0.9",
745
+ children: l && /* @__PURE__ */ t(
746
+ "animate",
747
+ {
748
+ attributeName: "opacity",
749
+ values: m % 2 === 0 ? "0.4;1;0.4" : "1;0.4;1",
750
+ dur: "1.5s",
751
+ repeatCount: "indefinite"
752
+ }
753
+ )
754
+ },
755
+ `dot-${m}`
756
+ );
757
+ })
758
+ ] });
759
+ }, be = { width: "100%", height: "100%", pointerEvents: "none", zIndex: 1 }, ye = {
760
+ plain: r(be, { filter: "drop-shadow(0 4px 12px rgba(0,0,0,0.15))" }),
761
+ decorated: r(be, { filter: "drop-shadow(0 6px 20px rgba(0,0,0,0.25))" })
762
+ }, $r = ({
763
+ segments: e,
764
+ secondaryColor: l,
765
+ primaryColor: i,
766
+ onPrimaryColor: n,
767
+ decorations: c,
768
+ isStandard: b,
769
+ rotation: m,
770
+ isSpinning: a,
771
+ spinDuration: s
772
+ }) => {
773
+ const y = pt(), x = Zt(), u = ct();
774
+ return /* @__PURE__ */ g(
775
+ "svg",
776
+ {
777
+ viewBox: "0 0 400 400",
778
+ css: c ? ye.decorated : ye.plain,
779
+ style: {
780
+ transform: `rotate(${m}deg)`,
781
+ transition: a ? `transform ${s}ms cubic-bezier(0.17, 0.67, 0.12, 0.99)` : "none"
782
+ },
783
+ children: [
784
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ g("radialGradient", { id: "wheelCenterGradient", children: [
785
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: y.surface }),
786
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: y.surfaceVariant })
787
+ ] }) }),
788
+ e.map((C, f) => {
789
+ const d = 360 / e.length, h = f * d - 90, D = h + d, $ = h * Math.PI / 180, v = D * Math.PI / 180, M = 200 + 190 * Math.cos($), L = 200 + 190 * Math.sin($), z = 200 + 190 * Math.cos(v), w = 200 + 190 * Math.sin(v), k = d > 180 ? 1 : 0, T = `
790
+ M 200 200
791
+ L ${M} ${L}
792
+ A 190 190 0 ${k} 1 ${z} ${w}
793
+ Z
794
+ `, p = C.color || (C.isWinning ? i : l), S = h + d / 2, W = S * Math.PI / 180, R = 200 + 120 * Math.cos(W), X = 200 + 120 * Math.sin(W), O = `wheel-segment-gradient-${f}`, q = C.label.split(" "), J = u ? 14 : 16, F = X - (q.length - 1) * J / 2;
795
+ return /* @__PURE__ */ g("g", { children: [
796
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ g("linearGradient", { id: O, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
797
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: p, stopOpacity: "1" }),
798
+ /* @__PURE__ */ t("stop", { offset: "50%", stopColor: p, stopOpacity: c ? "0.92" : "0.95" }),
799
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: p, stopOpacity: c ? "0.8" : "0.85" })
800
+ ] }) }),
801
+ /* @__PURE__ */ t("path", { d: T, fill: `url(#${O})`, stroke: y.surface, strokeWidth: c ? "2" : "3" }),
802
+ c && /* @__PURE__ */ t("path", { d: T, fill: "none", stroke: "rgba(255,255,255,0.08)", strokeWidth: "1" }),
803
+ /* @__PURE__ */ t("g", { transform: `rotate(${S + 90}, ${R}, ${X})`, children: q.map((G, tt) => {
804
+ const N = F + tt * J;
805
+ return /* @__PURE__ */ g("g", { children: [
806
+ /* @__PURE__ */ t(
807
+ "text",
808
+ {
809
+ x: R,
810
+ y: N,
811
+ fill: "none",
812
+ stroke: y.surface,
813
+ strokeWidth: u ? "4" : "5",
814
+ strokeLinejoin: "round",
815
+ strokeLinecap: "round",
816
+ fontSize: "13",
817
+ fontWeight: "800",
818
+ fontFamily: x.primary,
819
+ textAnchor: "middle",
820
+ dominantBaseline: "middle",
821
+ children: G
822
+ }
823
+ ),
824
+ /* @__PURE__ */ t(
825
+ "text",
826
+ {
827
+ x: R,
828
+ y: N,
829
+ fill: y.textPrimary,
830
+ fontSize: "13",
831
+ fontWeight: "800",
832
+ fontFamily: x.primary,
833
+ textAnchor: "middle",
834
+ dominantBaseline: "middle",
835
+ style: { filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.3))" },
836
+ children: G
837
+ }
838
+ )
839
+ ] }, `word-${tt}`);
840
+ }) })
841
+ ] }, C.id);
842
+ }),
843
+ /* @__PURE__ */ t("circle", { cx: "200", cy: "200", r: "45", fill: y.textPrimary, opacity: "0.2" }),
844
+ /* @__PURE__ */ t("circle", { cx: "200", cy: "200", r: "42", fill: "url(#wheelCenterGradient)" }),
845
+ /* @__PURE__ */ t("circle", { cx: "200", cy: "200", r: "36", fill: b ? i : n })
846
+ ]
847
+ }
848
+ );
849
+ }, vr = V({
850
+ "0%, 100%": { filter: "drop-shadow(0 0 4px var(--fu-ucrc-cg-pointer-60))" },
851
+ "50%": {
852
+ filter: "drop-shadow(0 0 12px var(--fu-ucrc-cg-pointer-a0)) drop-shadow(0 0 20px var(--fu-ucrc-cg-pointer-40))"
853
+ }
854
+ }), we = { position: "absolute", left: "50%", transform: "translateX(-50%)", width: "0", height: "0" }, $e = { position: "absolute", top: "-15px", left: "50%", transform: "translateX(-50%)", zIndex: 10 }, At = {
855
+ root: r($e),
856
+ rootPulsing: r($e, { animation: `${vr} 2s ease-in-out infinite` }),
857
+ shadow: r(we, {
858
+ top: "3px",
859
+ borderLeft: "22px solid transparent",
860
+ borderRight: "22px solid transparent",
861
+ borderTop: "35px solid rgba(0,0,0,0.2)"
862
+ }),
863
+ arrow: r({
864
+ position: "relative",
865
+ width: "0",
866
+ height: "0",
867
+ borderLeft: "20px solid transparent",
868
+ borderRight: "20px solid transparent",
869
+ borderTop: "35px solid var(--fu-ucrc-cg-pointer)"
870
+ }),
871
+ highlight: r(we, {
872
+ top: "5px",
873
+ borderLeft: "8px solid transparent",
874
+ borderRight: "8px solid transparent",
875
+ borderTop: "12px solid rgba(255,255,255,0.4)"
876
+ })
877
+ }, Sr = ({ primaryColor: e, dangerColor: l, decorations: i }) => /* @__PURE__ */ g(
878
+ "div",
879
+ {
880
+ css: i ? At.rootPulsing : At.root,
881
+ style: {
882
+ "--fu-ucrc-cg-pointer": i ? e : l,
883
+ "--fu-ucrc-cg-pointer-60": `${e}60`,
884
+ "--fu-ucrc-cg-pointer-a0": `${e}A0`,
885
+ "--fu-ucrc-cg-pointer-40": `${e}40`
886
+ },
887
+ children: [
888
+ /* @__PURE__ */ t("div", { css: At.shadow }),
889
+ /* @__PURE__ */ t("div", { css: At.arrow }),
890
+ /* @__PURE__ */ t("div", { css: At.highlight })
891
+ ]
892
+ }
893
+ ), H = (e) => `var(--fu-ucrc-cg-ew-${e})`, kr = V({
894
+ "0%, 100%": { transform: "translateX(0)" },
895
+ "10%, 30%, 50%, 70%, 90%": { transform: "translateX(-8px)" },
896
+ "20%, 40%, 60%, 80%": { transform: "translateX(8px)" }
897
+ }), Cr = V({
898
+ "0%, 100%": { boxShadow: `0 4px 14px 0 ${H("p40")}, 0 0 20px ${H("p15")}` },
899
+ "50%": { boxShadow: `0 6px 24px 0 ${H("p60")}, 0 0 35px ${H("p25")}` }
900
+ }), ve = {
901
+ ...ht,
902
+ fontFamily: o.fontPrimary,
903
+ fontWeight: 700,
904
+ fontSize: "1.25rem",
905
+ color: o.content,
906
+ lineHeight: 1.2
907
+ }, Se = {
908
+ position: "relative",
909
+ width: "100%",
910
+ maxWidth: H("max"),
911
+ aspectRatio: "1",
912
+ display: "flex",
913
+ alignItems: "center",
914
+ justifyContent: "center",
915
+ userSelect: "none",
916
+ zIndex: 1,
917
+ transition: "opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1)",
918
+ marginTop: o.spaceMd,
919
+ "&[data-shake]": { animation: `${kr} ${H("shake")} ease-in-out 2` }
920
+ }, Nt = {
921
+ borderRadius: o.radiusXl,
922
+ paddingBlock: o.spaceSm,
923
+ paddingInline: o.spaceLg,
924
+ backgroundColor: o.primary,
925
+ color: o.onPrimary,
926
+ fontSize: H("btn-font"),
927
+ fontWeight: 700,
928
+ fontFamily: o.fontPrimary,
929
+ textTransform: "uppercase",
930
+ letterSpacing: "0.5px",
931
+ alignSelf: "center",
932
+ zIndex: 1,
933
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
934
+ transform: "scale(1)",
935
+ "&:active": { transform: "scale(0.95)" },
936
+ "&:disabled": { opacity: 0.5, animation: "none" }
937
+ }, vt = { display: "flex", flexDirection: "column", alignItems: "center" }, j = {
938
+ titleBlock: r({ ...vt, gap: 0, textAlign: "center", width: "100%", zIndex: 1 }),
939
+ title: r(ve),
940
+ titleGlow: r(ve, { textShadow: `0 0 20px ${H("dc20")}, 0 0 40px ${H("dc10")}` }),
941
+ underline: r({ display: "flex", alignItems: "center", gap: "8px", marginTop: "4px" }),
942
+ underlineStart: r({ width: "40px", height: "1px", background: `linear-gradient(90deg, transparent, ${H("dc40")})` }),
943
+ underlineGem: r({ width: "6px", height: "6px", transform: "rotate(45deg)", background: H("dc50") }),
944
+ underlineEnd: r({ width: "40px", height: "1px", background: `linear-gradient(90deg, ${H("dc40")}, transparent)` }),
945
+ subtitle: r(K, {
946
+ fontFamily: o.fontSecondary,
947
+ fontWeight: 400,
948
+ fontSize: "0.875rem",
949
+ color: o.content,
950
+ opacity: 0.8
951
+ }),
952
+ welcome: r(K, {
953
+ fontFamily: o.fontPrimary,
954
+ fontWeight: 400,
955
+ fontSize: "0.875rem",
956
+ color: o.content,
957
+ textAlign: "center",
958
+ zIndex: 1
959
+ }),
960
+ instructions: r(K, {
961
+ fontFamily: o.fontSecondary,
962
+ fontWeight: 400,
963
+ fontSize: "0.875rem",
964
+ color: o.content,
965
+ opacity: 0.7,
966
+ textAlign: "center",
967
+ zIndex: 1
968
+ }),
969
+ wheel: r(Se),
970
+ wheelGlow: r(Se, { filter: `drop-shadow(0 0 15px ${H("dc20")}) drop-shadow(0 0 40px ${H("dc10")})` }),
971
+ logo: r({
972
+ position: "absolute",
973
+ top: "50%",
974
+ left: "50%",
975
+ transform: "translate(-50%, -50%)",
976
+ width: "15%",
977
+ height: "15%",
978
+ objectFit: "contain",
979
+ borderRadius: "50%",
980
+ zIndex: 3,
981
+ pointerEvents: "none",
982
+ filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
983
+ }),
984
+ spin: r(Lt, Nt, {
985
+ boxShadow: "0 4px 14px 0 rgba(0,0,0,0.15)",
986
+ "&:hover": { transform: "scale(1.05)", boxShadow: "0 6px 20px 0 rgba(0,0,0,0.2)" }
987
+ }),
988
+ spinDecorated: r(Lt, Nt, {
989
+ boxShadow: `0 4px 14px 0 ${H("p40")}, 0 0 20px ${H("p15")}`,
990
+ "&:hover": { transform: "scale(1.05)", boxShadow: `0 6px 20px 0 ${H("p50")}, 0 0 30px ${H("p20")}` }
991
+ }),
992
+ spinPulsing: r(Lt, Nt, {
993
+ boxShadow: `0 4px 14px 0 ${H("p40")}, 0 0 20px ${H("p15")}`,
994
+ animation: `${Cr} 2.5s ease-in-out infinite`,
995
+ "&:hover": { transform: "scale(1.05)", boxShadow: `0 6px 20px 0 ${H("p50")}, 0 0 30px ${H("p20")}` }
996
+ }),
997
+ disclaimer: r(K, {
998
+ fontFamily: o.fontSecondary,
999
+ fontWeight: 400,
1000
+ fontSize: "0.625rem",
1001
+ color: o.content,
1002
+ opacity: 0.7,
1003
+ textAlign: "center",
1004
+ maxWidth: "900px",
1005
+ lineHeight: 1.4,
1006
+ zIndex: 1
1007
+ }),
1008
+ footer: r({ ...vt, marginTop: "auto", gap: o.spaceSm, width: "100%" }),
1009
+ root: r({
1010
+ ...vt,
1011
+ width: "100%",
1012
+ padding: o.spaceMd,
1013
+ gap: o.spaceMd,
1014
+ position: "relative",
1015
+ overflow: "hidden",
1016
+ boxSizing: "border-box"
1017
+ }),
1018
+ desktop: r({ display: "flex", flexDirection: "row", width: "100%", gap: o.spaceXl, alignItems: "center", zIndex: 1 }),
1019
+ textColumn: r({
1020
+ flex: "0 0 42%",
1021
+ ...vt,
1022
+ gap: o.spaceMd,
1023
+ alignSelf: "stretch",
1024
+ justifyContent: "flex-start"
1025
+ }),
1026
+ textColumnCentred: r({
1027
+ flex: "0 0 42%",
1028
+ ...vt,
1029
+ gap: o.spaceMd,
1030
+ alignSelf: "stretch",
1031
+ justifyContent: "center"
1032
+ }),
1033
+ wheelColumn: r({ flex: "0 0 58%", display: "flex", alignItems: "center", justifyContent: "center", paddingTop: "15px" }),
1034
+ mobile: r({ ...vt, width: "100%", gap: o.spaceSm, zIndex: 1 })
1035
+ }, Lr = ({
1036
+ infoPage: e,
1037
+ enableReset: l = !1,
1038
+ contentColor: i,
1039
+ primaryColor: n,
1040
+ secondaryColor: c,
1041
+ onPrimaryColor: b,
1042
+ dangerColor: m,
1043
+ brandingLogo: a,
1044
+ isDark: s = !1,
1045
+ forceMobile: y = !1
1046
+ }) => {
1047
+ var st, U, lt;
1048
+ const x = ct(), u = y ? !1 : qt(), C = wt(), f = JSON.parse(e.body), d = f.segments || [], h = e.labels || {}, D = f.mode || ((st = f.config) == null ? void 0 : st.mode) || "fair", $ = ((U = f.config) == null ? void 0 : U.pace) || "normal", v = ((lt = f.config) == null ? void 0 : lt.decorations) ?? !1, M = yt(n, s), L = !!(h.welcome || h.instructions || h.buttonLabel || h.disclaimer), {
1049
+ isSpinning: z,
1050
+ finalRotation: w,
1051
+ selectedSegment: k,
1052
+ showShakeAnimation: T,
1053
+ showResultScreen: p,
1054
+ showInlineResult: S,
1055
+ hasEntered: W,
1056
+ confettiActive: R,
1057
+ spinDuration: X,
1058
+ shakeAnimationDuration: O,
1059
+ confettiVelocityMultiplier: q,
1060
+ confettiGravity: J,
1061
+ handleSpin: F,
1062
+ handleReset: G,
1063
+ onConfettiComplete: tt
1064
+ } = ar({ segments: d, mode: D, pace: $ }), N = {
1065
+ ...C,
1066
+ "--fu-ucrc-cg-content": i,
1067
+ "--fu-ucrc-cg-primary": n,
1068
+ "--fu-ucrc-cg-on-primary": b,
1069
+ "--fu-ucrc-cg-ew-dc10": M("10"),
1070
+ "--fu-ucrc-cg-ew-dc20": M("20"),
1071
+ "--fu-ucrc-cg-ew-dc40": M("40"),
1072
+ "--fu-ucrc-cg-ew-dc50": M("50"),
1073
+ "--fu-ucrc-cg-ew-p15": `${n}15`,
1074
+ "--fu-ucrc-cg-ew-p20": `${n}20`,
1075
+ "--fu-ucrc-cg-ew-p25": `${n}25`,
1076
+ "--fu-ucrc-cg-ew-p40": `${n}40`,
1077
+ "--fu-ucrc-cg-ew-p50": `${n}50`,
1078
+ "--fu-ucrc-cg-ew-p60": `${n}60`,
1079
+ "--fu-ucrc-cg-ew-max": u ? "300px" : "260px",
1080
+ "--fu-ucrc-cg-ew-shake": `${O / 2}ms`,
1081
+ "--fu-ucrc-cg-ew-btn-font": x ? "0.75rem" : "0.875rem"
1082
+ }, Q = z || R || !p && !S && k !== null, et = () => /* @__PURE__ */ g("div", { css: j.titleBlock, children: [
1083
+ /* @__PURE__ */ t("h2", { css: v ? j.titleGlow : j.title, children: e.title }),
1084
+ v && /* @__PURE__ */ g("div", { css: j.underline, children: [
1085
+ /* @__PURE__ */ t("div", { css: j.underlineStart }),
1086
+ /* @__PURE__ */ t("div", { css: j.underlineGem }),
1087
+ /* @__PURE__ */ t("div", { css: j.underlineEnd })
1088
+ ] }),
1089
+ e.subtitle && /* @__PURE__ */ t("p", { css: j.subtitle, children: e.subtitle })
1090
+ ] }), rt = () => /* @__PURE__ */ g(
1091
+ "div",
1092
+ {
1093
+ onClick: F,
1094
+ css: v ? j.wheelGlow : j.wheel,
1095
+ "data-shake": T || void 0,
1096
+ style: {
1097
+ cursor: Q || S ? "default" : "pointer",
1098
+ opacity: W ? 1 : 0,
1099
+ transform: W ? "scale(1)" : "scale(0.85)"
1100
+ },
1101
+ children: [
1102
+ /* @__PURE__ */ t(wr, { segmentCount: d.length, decorations: v, primaryColor: n }),
1103
+ /* @__PURE__ */ t(
1104
+ $r,
1105
+ {
1106
+ segments: d,
1107
+ secondaryColor: c,
1108
+ primaryColor: n,
1109
+ onPrimaryColor: b,
1110
+ decorations: v,
1111
+ isStandard: !1,
1112
+ rotation: w,
1113
+ isSpinning: z,
1114
+ spinDuration: X
1115
+ }
1116
+ ),
1117
+ a && /* @__PURE__ */ t("img", { src: a, alt: "Logo", css: j.logo }),
1118
+ /* @__PURE__ */ t(Sr, { primaryColor: n, dangerColor: m, decorations: v })
1119
+ ]
1120
+ }
1121
+ ), ft = () => !h.buttonLabel || S && k && !k.isWinning ? null : /* @__PURE__ */ t(
1122
+ "button",
1123
+ {
1124
+ type: "button",
1125
+ disabled: Q,
1126
+ onClick: F,
1127
+ css: v ? !z && !k ? j.spinPulsing : j.spinDecorated : j.spin,
1128
+ children: h.buttonLabel
1129
+ }
1130
+ ), ut = () => h.disclaimer ? /* @__PURE__ */ t("p", { css: j.disclaimer, children: h.disclaimer }) : null, nt = () => S && (k == null ? void 0 : k.results) && /* @__PURE__ */ t(
1131
+ Mt,
1132
+ {
1133
+ result: k.results,
1134
+ variant: "embed",
1135
+ mode: "inline",
1136
+ contentColor: i,
1137
+ primaryColor: n,
1138
+ onPrimaryColor: b,
1139
+ enableReset: l,
1140
+ onReset: G,
1141
+ showResetButton: !0,
1142
+ raised: !0
1143
+ }
1144
+ ), ot = () => /* @__PURE__ */ g(at, { children: [
1145
+ h.welcome && /* @__PURE__ */ t("p", { css: j.welcome, children: h.welcome }),
1146
+ !S && h.instructions && /* @__PURE__ */ t("p", { css: j.instructions, children: h.instructions })
1147
+ ] });
1148
+ return /* @__PURE__ */ g("div", { css: j.root, style: N, children: [
1149
+ v && /* @__PURE__ */ t(Ve, { primaryColor: n, isDark: s, animationPrefix: "wheel" }),
1150
+ /* @__PURE__ */ t(
1151
+ br,
1152
+ {
1153
+ active: R,
1154
+ primaryColor: n,
1155
+ velocityMultiplier: q,
1156
+ gravity: J,
1157
+ onComplete: tt
1158
+ }
1159
+ ),
1160
+ p && (k == null ? void 0 : k.results) && /* @__PURE__ */ t(
1161
+ Mt,
1162
+ {
1163
+ result: k.results,
1164
+ variant: "embed",
1165
+ mode: "screen",
1166
+ contentColor: i,
1167
+ primaryColor: n,
1168
+ onPrimaryColor: b,
1169
+ disclaimer: h.disclaimer,
1170
+ enableReset: l,
1171
+ onReset: G
1172
+ }
1173
+ ),
1174
+ !p && (u ? (
1175
+ /* Desktop: horizontal 2-column layout */
1176
+ /* @__PURE__ */ g("div", { css: j.desktop, children: [
1177
+ /* @__PURE__ */ g("div", { css: L ? j.textColumn : j.textColumnCentred, children: [
1178
+ et(),
1179
+ ot(),
1180
+ nt(),
1181
+ (h.buttonLabel || h.disclaimer) && /* @__PURE__ */ g("div", { css: j.footer, children: [
1182
+ ft(),
1183
+ ut()
1184
+ ] })
1185
+ ] }),
1186
+ /* @__PURE__ */ t("div", { css: j.wheelColumn, children: rt() })
1187
+ ] })
1188
+ ) : (
1189
+ /* Mobile: compact vertical — title first, then wheel, then text */
1190
+ /* @__PURE__ */ g("div", { css: j.mobile, children: [
1191
+ et(),
1192
+ ot(),
1193
+ rt(),
1194
+ nt(),
1195
+ ft(),
1196
+ ut()
1197
+ ] })
1198
+ ))
1199
+ ] });
1200
+ }, ke = {
1201
+ display: "flex",
1202
+ flexDirection: "column",
1203
+ width: "100%",
1204
+ height: "100%",
1205
+ position: "relative",
1206
+ overflow: "auto",
1207
+ boxSizing: "border-box",
1208
+ background: "var(--fu-ucrc-cg-embed-bg)",
1209
+ boxShadow: "inset 0 0 100px rgba(0, 0, 0, 0.04), inset 0 0 30px rgba(0, 0, 0, 0.02)"
1210
+ }, Ce = {
1211
+ root: r(ke),
1212
+ framed: r(ke, {
1213
+ border: "1px solid var(--fu-ucrc-cg-embed-frame)",
1214
+ borderRadius: "var(--fu-ucrc-cg-embed-radius)"
1215
+ })
1216
+ }, Qr = ({ infoPage: e, enableReset: l = !1, forceMobile: i = !1 }) => {
1217
+ var M, L, z, w, k, T, p, S, W, R, X, O, q, J, F, G;
1218
+ const n = i || ct(), c = pt(), b = Ut(), m = Jt() === "dark", a = (M = e.branding) == null ? void 0 : M.colors, s = (a == null ? void 0 : a.primary_color) || c.palette.primary.plainColor, y = (a == null ? void 0 : a.secondary_color) || c.palette.danger.plainColor, x = (a == null ? void 0 : a.content_color) || c.textPrimary, u = a == null ? void 0 : a.border_color, C = (a == null ? void 0 : a.background_color) || c.surface, f = c.palette.danger.plainColor, h = ((L = JSON.parse(e.body).config) == null ? void 0 : L.decorations) ?? !1, D = n ? ((w = (z = e.branding) == null ? void 0 : z.images) == null ? void 0 : w.mobile_background_image) || ((T = (k = e.branding) == null ? void 0 : k.images) == null ? void 0 : T.background_image) || ((p = e.images) == null ? void 0 : p.cover) : ((W = (S = e.branding) == null ? void 0 : S.images) == null ? void 0 : W.background_image) || ((R = e.images) == null ? void 0 : R.cover), $ = n ? ((O = (X = e.branding) == null ? void 0 : X.images) == null ? void 0 : O.mobile_logo) || ((J = (q = e.branding) == null ? void 0 : q.images) == null ? void 0 : J.main_logo) || "" : ((G = (F = e.branding) == null ? void 0 : F.images) == null ? void 0 : G.main_logo) || "", v = yt(s, m);
1219
+ return /* @__PURE__ */ t(
1220
+ "div",
1221
+ {
1222
+ css: h ? Ce.framed : Ce.root,
1223
+ style: {
1224
+ "--fu-ucrc-cg-embed-bg": D ? `url(${D}) center/cover no-repeat` : `
1225
+ radial-gradient(ellipse at 50% 40%, ${s}12 0%, transparent 60%),
1226
+ radial-gradient(ellipse at 50% 100%, ${s}08 0%, transparent 50%),
1227
+ ${C}
1228
+ `,
1229
+ "--fu-ucrc-cg-embed-frame": v("15"),
1230
+ "--fu-ucrc-cg-embed-radius": b.lg
1231
+ },
1232
+ children: /* @__PURE__ */ t(
1233
+ Lr,
1234
+ {
1235
+ infoPage: e,
1236
+ enableReset: l,
1237
+ contentColor: x,
1238
+ primaryColor: s,
1239
+ secondaryColor: y,
1240
+ onPrimaryColor: c.palette.primary.onPrimary,
1241
+ borderColor: u || void 0,
1242
+ backgroundColor: C,
1243
+ dangerColor: f,
1244
+ shimmerColor: s,
1245
+ backgroundImage: D || void 0,
1246
+ brandingLogo: $,
1247
+ isDark: m,
1248
+ forceMobile: i
1249
+ }
1250
+ )
1251
+ }
1252
+ );
1253
+ }, Mr = {
1254
+ fast: { kickDuration: 600, totalAnimationTime: 800 },
1255
+ normal: { kickDuration: 900, totalAnimationTime: 1200 },
1256
+ slow: { kickDuration: 1500, totalAnimationTime: 2e3 }
1257
+ }, Wr = 1e3;
1258
+ function Rr({
1259
+ segments: e,
1260
+ mode: l,
1261
+ pace: i
1262
+ }) {
1263
+ const [n, c] = B(!1), [b, m] = B(null), [a, s] = B(null), [y, x] = B(!1), [u, C] = B(!1), [f, d] = B(!1), [h, D] = B({ x: 50, y: 100 }), [$, v] = B(0), [M, L] = B(null), [z, w] = B(!1), { kickDuration: k } = Mr[i];
1264
+ return {
1265
+ // State
1266
+ isKicking: n,
1267
+ selectedSegment: b,
1268
+ clickedPosition: a,
1269
+ showResultScreen: y,
1270
+ showInlineResult: u,
1271
+ showLabel: f,
1272
+ ballPosition: h,
1273
+ ballRotation: $,
1274
+ flippedTarget: M,
1275
+ showNetRipple: z,
1276
+ // Timing
1277
+ kickDuration: k,
1278
+ // Actions
1279
+ handleTargetClick: (S) => {
1280
+ if (n || y || u || f) return;
1281
+ c(!0), s(S);
1282
+ const W = Qt(
1283
+ e,
1284
+ l
1285
+ );
1286
+ m(W);
1287
+ const R = Math.random() > 0.5 ? "left" : "right", X = 8, O = R === "left" ? S.x - X : S.x + X, J = S.y + 5;
1288
+ D({ x: O, y: J });
1289
+ const F = Math.sqrt(
1290
+ Math.pow(O - 50, 2) + Math.pow(J - 100, 2)
1291
+ ), G = Math.floor(F / 10), tt = R === "left" ? -180 : 180;
1292
+ v(G * 360 + tt), setTimeout(() => {
1293
+ var Q, et;
1294
+ c(!1), L({ ...S, direction: R }), d(!0), W.isWinning && (w(!0), setTimeout(() => w(!1), 600));
1295
+ const N = ((Q = W.results) == null ? void 0 : Q.primaryCTA) || ((et = W.results) == null ? void 0 : et.secondaryCTA);
1296
+ setTimeout(() => {
1297
+ N ? x(!0) : C(!0);
1298
+ }, Wr);
1299
+ }, k);
1300
+ },
1301
+ handleReset: () => {
1302
+ c(!1), m(null), s(null), x(!1), C(!1), d(!1), D({ x: 50, y: 100 }), v(0), L(null), w(!1);
1303
+ }
1304
+ };
1305
+ }
1306
+ const zr = ({ isDark: e }) => /* @__PURE__ */ g("g", { children: [
1307
+ /* @__PURE__ */ g("defs", { children: [
1308
+ /* @__PURE__ */ t(
1309
+ "linearGradient",
1310
+ {
1311
+ id: "skyGradient",
1312
+ x1: "0%",
1313
+ y1: "0%",
1314
+ x2: "0%",
1315
+ y2: "100%",
1316
+ children: e ? /* @__PURE__ */ g(at, { children: [
1317
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#0a1628" }),
1318
+ /* @__PURE__ */ t("stop", { offset: "40%", stopColor: "#142d4a" }),
1319
+ /* @__PURE__ */ t("stop", { offset: "70%", stopColor: "#1a3a5c" }),
1320
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#1e4068" })
1321
+ ] }) : /* @__PURE__ */ g(at, { children: [
1322
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#4A90D9" }),
1323
+ /* @__PURE__ */ t("stop", { offset: "50%", stopColor: "#6BB3E8" }),
1324
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#87CEEB" })
1325
+ ] })
1326
+ }
1327
+ ),
1328
+ /* @__PURE__ */ g(
1329
+ "linearGradient",
1330
+ {
1331
+ id: "pitchGradient",
1332
+ x1: "0%",
1333
+ y1: "0%",
1334
+ x2: "0%",
1335
+ y2: "100%",
1336
+ children: [
1337
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#2d8a4e" }),
1338
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#1a6b35" })
1339
+ ]
1340
+ }
1341
+ ),
1342
+ /* @__PURE__ */ t(
1343
+ "radialGradient",
1344
+ {
1345
+ id: "floodlightGlow",
1346
+ cx: e ? "50%" : "80%",
1347
+ cy: e ? "0%" : "10%",
1348
+ r: "80%",
1349
+ children: e ? /* @__PURE__ */ g(at, { children: [
1350
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "rgba(255,255,255,0.15)" }),
1351
+ /* @__PURE__ */ t("stop", { offset: "60%", stopColor: "rgba(255,255,255,0.03)" }),
1352
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "transparent" })
1353
+ ] }) : /* @__PURE__ */ g(at, { children: [
1354
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "rgba(255,255,200,0.3)" }),
1355
+ /* @__PURE__ */ t("stop", { offset: "40%", stopColor: "rgba(255,255,200,0.08)" }),
1356
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "transparent" })
1357
+ ] })
1358
+ }
1359
+ ),
1360
+ /* @__PURE__ */ g(
1361
+ "pattern",
1362
+ {
1363
+ id: "pitchStripes",
1364
+ x: "0",
1365
+ y: "0",
1366
+ width: "60",
1367
+ height: "375",
1368
+ patternUnits: "userSpaceOnUse",
1369
+ children: [
1370
+ /* @__PURE__ */ t(
1371
+ "rect",
1372
+ {
1373
+ x: "0",
1374
+ y: "0",
1375
+ width: "30",
1376
+ height: "375",
1377
+ fill: "rgba(255,255,255,0.02)"
1378
+ }
1379
+ ),
1380
+ /* @__PURE__ */ t(
1381
+ "rect",
1382
+ {
1383
+ x: "30",
1384
+ y: "0",
1385
+ width: "30",
1386
+ height: "375",
1387
+ fill: "rgba(0,0,0,0.02)"
1388
+ }
1389
+ )
1390
+ ]
1391
+ }
1392
+ ),
1393
+ /* @__PURE__ */ t(
1394
+ "pattern",
1395
+ {
1396
+ id: "netPattern",
1397
+ x: "0",
1398
+ y: "0",
1399
+ width: "20",
1400
+ height: "20",
1401
+ patternUnits: "userSpaceOnUse",
1402
+ children: /* @__PURE__ */ t(
1403
+ "path",
1404
+ {
1405
+ d: "M 0,10 L 10,0 L 20,10 L 10,20 Z",
1406
+ fill: "none",
1407
+ stroke: "rgba(255,255,255,0.15)",
1408
+ strokeWidth: "0.5"
1409
+ }
1410
+ )
1411
+ }
1412
+ ),
1413
+ /* @__PURE__ */ g(
1414
+ "linearGradient",
1415
+ {
1416
+ id: "postGradientLeft",
1417
+ x1: "0%",
1418
+ y1: "0%",
1419
+ x2: "100%",
1420
+ y2: "0%",
1421
+ children: [
1422
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#e8e8e8" }),
1423
+ /* @__PURE__ */ t("stop", { offset: "30%", stopColor: "#ffffff" }),
1424
+ /* @__PURE__ */ t("stop", { offset: "70%", stopColor: "#d0d0d0" }),
1425
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#b0b0b0" })
1426
+ ]
1427
+ }
1428
+ ),
1429
+ /* @__PURE__ */ g(
1430
+ "linearGradient",
1431
+ {
1432
+ id: "postGradientRight",
1433
+ x1: "0%",
1434
+ y1: "0%",
1435
+ x2: "100%",
1436
+ y2: "0%",
1437
+ children: [
1438
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#b0b0b0" }),
1439
+ /* @__PURE__ */ t("stop", { offset: "30%", stopColor: "#d0d0d0" }),
1440
+ /* @__PURE__ */ t("stop", { offset: "70%", stopColor: "#ffffff" }),
1441
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#e8e8e8" })
1442
+ ]
1443
+ }
1444
+ ),
1445
+ /* @__PURE__ */ g(
1446
+ "linearGradient",
1447
+ {
1448
+ id: "crossbarGradient",
1449
+ x1: "0%",
1450
+ y1: "0%",
1451
+ x2: "0%",
1452
+ y2: "100%",
1453
+ children: [
1454
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#ffffff" }),
1455
+ /* @__PURE__ */ t("stop", { offset: "40%", stopColor: "#e0e0e0" }),
1456
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "#c0c0c0" })
1457
+ ]
1458
+ }
1459
+ ),
1460
+ /* @__PURE__ */ t("filter", { id: "postShadow", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ t("feDropShadow", { dx: "2", dy: "2", stdDeviation: "2", floodOpacity: "0.3" }) }),
1461
+ /* @__PURE__ */ t("filter", { id: "postShadowRight", x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ t("feDropShadow", { dx: "-2", dy: "2", stdDeviation: "2", floodOpacity: "0.3" }) }),
1462
+ /* @__PURE__ */ t("filter", { id: "crossbarShadow", x: "-10%", y: "-20%", width: "120%", height: "140%", children: /* @__PURE__ */ t("feDropShadow", { dx: "0", dy: "3", stdDeviation: "3", floodOpacity: "0.3" }) })
1463
+ ] }),
1464
+ /* @__PURE__ */ t("rect", { x: "0", y: "0", width: "600", height: "180", fill: "url(#skyGradient)" }),
1465
+ e && /* @__PURE__ */ g(at, { children: [
1466
+ /* @__PURE__ */ t("rect", { x: "48", y: "20", width: "4", height: "120", fill: "rgba(160,160,170,0.4)" }),
1467
+ /* @__PURE__ */ t("rect", { x: "548", y: "20", width: "4", height: "120", fill: "rgba(160,160,170,0.4)" })
1468
+ ] }),
1469
+ e ? /* @__PURE__ */ g(at, { children: [
1470
+ /* @__PURE__ */ t(
1471
+ "path",
1472
+ {
1473
+ d: "M 0,180 L 0,145 L 30,145 L 30,135 L 80,135 L 80,125 L 150,125 L 150,120 L 200,120 L 200,118 L 400,118 L 400,120 L 450,120 L 450,125 L 520,125 L 520,135 L 570,135 L 570,145 L 600,145 L 600,180 Z",
1474
+ fill: "rgba(10,15,25,0.7)"
1475
+ }
1476
+ ),
1477
+ /* @__PURE__ */ t("line", { x1: "30", y1: "145", x2: "570", y2: "145", stroke: "rgba(255,255,255,0.06)", strokeWidth: "0.5" }),
1478
+ /* @__PURE__ */ t("line", { x1: "80", y1: "135", x2: "520", y2: "135", stroke: "rgba(255,255,255,0.06)", strokeWidth: "0.5" }),
1479
+ /* @__PURE__ */ t("line", { x1: "150", y1: "125", x2: "450", y2: "125", stroke: "rgba(255,255,255,0.06)", strokeWidth: "0.5" }),
1480
+ /* @__PURE__ */ t("line", { x1: "200", y1: "120", x2: "400", y2: "120", stroke: "rgba(255,255,255,0.06)", strokeWidth: "0.5" })
1481
+ ] }) : /* @__PURE__ */ g(at, { children: [
1482
+ /* @__PURE__ */ t(
1483
+ "path",
1484
+ {
1485
+ d: "M 0,180 L 0,145 L 30,145 L 30,135 L 80,135 L 80,125 L 150,125 L 150,120 L 200,120 L 200,118 L 400,118 L 400,120 L 450,120 L 450,125 L 520,125 L 520,135 L 570,135 L 570,145 L 600,145 L 600,180 Z",
1486
+ fill: "#9BA8B8"
1487
+ }
1488
+ ),
1489
+ /* @__PURE__ */ t("rect", { x: "200", y: "118", width: "200", height: "4", fill: "#7A8899" }),
1490
+ /* @__PURE__ */ t(
1491
+ "path",
1492
+ {
1493
+ d: "M 150,125 L 150,122 L 200,122 L 200,118 L 400,118 L 400,122 L 450,122 L 450,125 Z",
1494
+ fill: "#8494A6"
1495
+ }
1496
+ ),
1497
+ /* @__PURE__ */ t("rect", { x: "150", y: "125", width: "300", height: "4", fill: "#8A9AAD" }),
1498
+ /* @__PURE__ */ t(
1499
+ "path",
1500
+ {
1501
+ d: "M 80,135 L 80,131 L 150,131 L 150,125 L 450,125 L 450,131 L 520,131 L 520,135 Z",
1502
+ fill: "#94A3B4"
1503
+ }
1504
+ ),
1505
+ /* @__PURE__ */ t("rect", { x: "80", y: "135", width: "440", height: "4", fill: "#9AAABB" }),
1506
+ /* @__PURE__ */ t(
1507
+ "path",
1508
+ {
1509
+ d: "M 30,145 L 30,141 L 80,141 L 80,135 L 520,135 L 520,141 L 570,141 L 570,145 Z",
1510
+ fill: "#A3B1C0"
1511
+ }
1512
+ ),
1513
+ /* @__PURE__ */ t("rect", { x: "30", y: "145", width: "540", height: "4", fill: "#A8B6C5" }),
1514
+ /* @__PURE__ */ t(
1515
+ "path",
1516
+ {
1517
+ d: "M 0,155 L 0,151 L 30,151 L 30,145 L 570,145 L 570,151 L 600,151 L 600,155 Z",
1518
+ fill: "#B0BCC9"
1519
+ }
1520
+ ),
1521
+ /* @__PURE__ */ t("rect", { x: "0", y: "155", width: "600", height: "25", fill: "#B8C4D0" }),
1522
+ /* @__PURE__ */ t("line", { x1: "200", y1: "118", x2: "400", y2: "118", stroke: "#6B7A8C", strokeWidth: "1.5" }),
1523
+ /* @__PURE__ */ t("line", { x1: "150", y1: "125", x2: "450", y2: "125", stroke: "#758596", strokeWidth: "1.5" }),
1524
+ /* @__PURE__ */ t("line", { x1: "80", y1: "135", x2: "520", y2: "135", stroke: "#7F8FA0", strokeWidth: "1.5" }),
1525
+ /* @__PURE__ */ t("line", { x1: "30", y1: "145", x2: "570", y2: "145", stroke: "#8999AA", strokeWidth: "1.5" }),
1526
+ /* @__PURE__ */ t("line", { x1: "0", y1: "155", x2: "600", y2: "155", stroke: "#93A2B2", strokeWidth: "1" }),
1527
+ /* @__PURE__ */ t("line", { x1: "200", y1: "119", x2: "400", y2: "119", stroke: "rgba(255,255,255,0.4)", strokeWidth: "0.8" }),
1528
+ /* @__PURE__ */ t("line", { x1: "150", y1: "126", x2: "450", y2: "126", stroke: "rgba(255,255,255,0.35)", strokeWidth: "0.8" }),
1529
+ /* @__PURE__ */ t("line", { x1: "80", y1: "136", x2: "520", y2: "136", stroke: "rgba(255,255,255,0.3)", strokeWidth: "0.8" }),
1530
+ /* @__PURE__ */ t("line", { x1: "30", y1: "146", x2: "570", y2: "146", stroke: "rgba(255,255,255,0.25)", strokeWidth: "0.8" }),
1531
+ /* @__PURE__ */ t("line", { x1: "0", y1: "156", x2: "600", y2: "156", stroke: "rgba(255,255,255,0.2)", strokeWidth: "0.8" }),
1532
+ /* @__PURE__ */ t("line", { x1: "200", y1: "118", x2: "200", y2: "180", stroke: "rgba(60,70,90,0.12)", strokeWidth: "0.5" }),
1533
+ /* @__PURE__ */ t("line", { x1: "300", y1: "118", x2: "300", y2: "180", stroke: "rgba(60,70,90,0.08)", strokeWidth: "0.5" }),
1534
+ /* @__PURE__ */ t("line", { x1: "400", y1: "118", x2: "400", y2: "180", stroke: "rgba(60,70,90,0.12)", strokeWidth: "0.5" })
1535
+ ] }),
1536
+ e && Array.from({ length: 150 }).map((l, i) => {
1537
+ const n = Math.floor(i / 30), c = i % 30, b = [148, 142, 137, 128, 122][n] || 148, m = [10, 35, 85, 155, 205][n] || 10, a = [590, 565, 515, 445, 395][n] || 590, s = m + c / 29 * (a - m), y = b + (c * 7 + n * 3) % 4 - 1, x = (i * 17 + n * 31) % 100, u = x < 20 ? 220 : x < 40 ? 180 : x < 60 ? 140 : x < 80 ? 200 : 160, C = x < 20 ? 180 : x < 40 ? 200 : x < 60 ? 160 : x < 80 ? 140 : 180, f = x < 20 ? 140 : x < 40 ? 160 : x < 60 ? 200 : x < 80 ? 180 : 220, d = 0.12 + c % 4 * 0.04;
1538
+ return /* @__PURE__ */ t(
1539
+ "circle",
1540
+ {
1541
+ cx: s,
1542
+ cy: y,
1543
+ r: 1.2 + i % 3 * 0.3,
1544
+ fill: `rgba(${u},${C},${f},${d})`
1545
+ },
1546
+ `crowd-${i}`
1547
+ );
1548
+ }),
1549
+ !e && Array.from({ length: 180 }).map((l, i) => {
1550
+ const n = Math.floor(i / 36), c = i % 36, b = [157, 148, 142, 137, 128, 122][n] || 157, m = [5, 15, 45, 95, 160, 210][n] || 5, s = ([595, 585, 555, 505, 440, 390][n] || 595) - m, y = m + c / 35 * s + i * 7 % 5 - 2, x = b + (c * 5 + n * 7) % 5 - 2, u = (i * 23 + n * 17) % 120, C = u < 20 ? 200 : u < 40 ? 50 : u < 60 ? 220 : u < 80 ? 30 : u < 100 ? 180 : 100, f = u < 20 ? 50 : u < 40 ? 100 : u < 60 ? 180 : u < 80 || u < 100 ? 60 : 150, d = u < 20 ? 50 : u < 40 ? 180 : u < 60 ? 40 : u < 80 ? 160 : u < 100 ? 120 : 50, h = 0.3 + c % 4 * 0.08;
1551
+ return /* @__PURE__ */ t(
1552
+ "circle",
1553
+ {
1554
+ cx: y,
1555
+ cy: x,
1556
+ r: 1.3 + i % 3 * 0.3,
1557
+ fill: `rgba(${C},${f},${d},${h})`
1558
+ },
1559
+ `crowd-${i}`
1560
+ );
1561
+ }),
1562
+ /* @__PURE__ */ t("rect", { x: "0", y: "180", width: "600", height: "195", fill: "url(#pitchGradient)" }),
1563
+ /* @__PURE__ */ t("rect", { x: "0", y: "180", width: "600", height: "195", fill: "url(#pitchStripes)" }),
1564
+ /* @__PURE__ */ t("rect", { x: "0", y: "0", width: "600", height: "375", fill: "url(#floodlightGlow)" }),
1565
+ e && /* @__PURE__ */ g(at, { children: [
1566
+ /* @__PURE__ */ t("rect", { x: "35", y: "8", width: "30", height: "12", rx: "2", fill: "rgba(50,55,65,0.8)", stroke: "rgba(120,120,130,0.4)", strokeWidth: "0.5" }),
1567
+ /* @__PURE__ */ t("rect", { x: "38", y: "10", width: "6", height: "4", rx: "1", fill: "rgba(255,255,220,0.9)" }),
1568
+ /* @__PURE__ */ t("rect", { x: "47", y: "10", width: "6", height: "4", rx: "1", fill: "rgba(255,255,230,0.85)" }),
1569
+ /* @__PURE__ */ t("rect", { x: "56", y: "10", width: "6", height: "4", rx: "1", fill: "rgba(255,255,220,0.9)" }),
1570
+ /* @__PURE__ */ t("ellipse", { cx: "50", cy: "12", rx: "22", ry: "10", fill: "rgba(255,255,200,0.12)" }),
1571
+ /* @__PURE__ */ t("polygon", { points: "35,20 65,20 420,180 180,180", fill: "rgba(255,255,220,0.04)" }),
1572
+ /* @__PURE__ */ t("polygon", { points: "40,20 60,20 380,180 220,180", fill: "rgba(255,255,220,0.03)" }),
1573
+ /* @__PURE__ */ t("rect", { x: "535", y: "8", width: "30", height: "12", rx: "2", fill: "rgba(50,55,65,0.8)", stroke: "rgba(120,120,130,0.4)", strokeWidth: "0.5" }),
1574
+ /* @__PURE__ */ t("rect", { x: "538", y: "10", width: "6", height: "4", rx: "1", fill: "rgba(255,255,220,0.9)" }),
1575
+ /* @__PURE__ */ t("rect", { x: "547", y: "10", width: "6", height: "4", rx: "1", fill: "rgba(255,255,230,0.85)" }),
1576
+ /* @__PURE__ */ t("rect", { x: "556", y: "10", width: "6", height: "4", rx: "1", fill: "rgba(255,255,220,0.9)" }),
1577
+ /* @__PURE__ */ t("ellipse", { cx: "550", cy: "12", rx: "22", ry: "10", fill: "rgba(255,255,200,0.12)" }),
1578
+ /* @__PURE__ */ t("polygon", { points: "535,20 565,20 420,180 180,180", fill: "rgba(255,255,220,0.04)" }),
1579
+ /* @__PURE__ */ t("polygon", { points: "540,20 560,20 380,180 220,180", fill: "rgba(255,255,220,0.03)" }),
1580
+ [[50, 40], [120, 25], [180, 55], [250, 30], [320, 15], [380, 45], [430, 20], [500, 50], [560, 35], [150, 70], [350, 60], [480, 65], [90, 60], [270, 50], [530, 25]].map(([l, i], n) => /* @__PURE__ */ t("circle", { cx: l, cy: i, r: 0.5 + n % 3 * 0.3, fill: `rgba(255,255,255,${0.3 + n % 4 * 0.15})` }, `star-${n}`))
1581
+ ] }),
1582
+ !e && /* @__PURE__ */ g(at, { children: [
1583
+ /* @__PURE__ */ t("circle", { cx: "520", cy: "35", r: "22", fill: "rgba(255,230,80,0.9)" }),
1584
+ /* @__PURE__ */ t("circle", { cx: "520", cy: "35", r: "28", fill: "rgba(255,240,120,0.25)" }),
1585
+ /* @__PURE__ */ t("circle", { cx: "520", cy: "35", r: "40", fill: "rgba(255,245,160,0.1)" }),
1586
+ /* @__PURE__ */ t("ellipse", { cx: "60", cy: "42", rx: "28", ry: "9", fill: "rgba(255,255,255,0.45)" }),
1587
+ /* @__PURE__ */ t("ellipse", { cx: "80", cy: "38", rx: "22", ry: "8", fill: "rgba(255,255,255,0.35)" }),
1588
+ /* @__PURE__ */ t("ellipse", { cx: "45", cy: "40", rx: "16", ry: "7", fill: "rgba(255,255,255,0.3)" }),
1589
+ /* @__PURE__ */ t("ellipse", { cx: "195", cy: "28", rx: "38", ry: "12", fill: "rgba(255,255,255,0.4)" }),
1590
+ /* @__PURE__ */ t("ellipse", { cx: "215", cy: "24", rx: "28", ry: "10", fill: "rgba(255,255,255,0.35)" }),
1591
+ /* @__PURE__ */ t("ellipse", { cx: "178", cy: "30", rx: "20", ry: "8", fill: "rgba(255,255,255,0.3)" }),
1592
+ /* @__PURE__ */ t("ellipse", { cx: "230", cy: "30", rx: "18", ry: "7", fill: "rgba(255,255,255,0.25)" }),
1593
+ /* @__PURE__ */ t("ellipse", { cx: "330", cy: "55", rx: "22", ry: "8", fill: "rgba(255,255,255,0.3)" }),
1594
+ /* @__PURE__ */ t("ellipse", { cx: "345", cy: "52", rx: "16", ry: "6", fill: "rgba(255,255,255,0.25)" }),
1595
+ /* @__PURE__ */ t("ellipse", { cx: "430", cy: "68", rx: "30", ry: "9", fill: "rgba(255,255,255,0.35)" }),
1596
+ /* @__PURE__ */ t("ellipse", { cx: "448", cy: "64", rx: "20", ry: "7", fill: "rgba(255,255,255,0.28)" }),
1597
+ /* @__PURE__ */ t("ellipse", { cx: "415", cy: "66", rx: "14", ry: "6", fill: "rgba(255,255,255,0.22)" }),
1598
+ /* @__PURE__ */ t("ellipse", { cx: "565", cy: "58", rx: "18", ry: "7", fill: "rgba(255,255,255,0.3)" }),
1599
+ /* @__PURE__ */ t("ellipse", { cx: "578", cy: "55", rx: "14", ry: "6", fill: "rgba(255,255,255,0.22)" }),
1600
+ /* @__PURE__ */ t("ellipse", { cx: "120", cy: "80", rx: "24", ry: "7", fill: "rgba(255,255,255,0.2)" }),
1601
+ /* @__PURE__ */ t("ellipse", { cx: "138", cy: "78", rx: "16", ry: "5", fill: "rgba(255,255,255,0.15)" })
1602
+ ] }),
1603
+ /* @__PURE__ */ t(
1604
+ "line",
1605
+ {
1606
+ x1: "0",
1607
+ y1: "250",
1608
+ x2: "600",
1609
+ y2: "250",
1610
+ stroke: "rgba(255,255,255,0.12)",
1611
+ strokeWidth: "2"
1612
+ }
1613
+ ),
1614
+ /* @__PURE__ */ t(
1615
+ "rect",
1616
+ {
1617
+ x: "80",
1618
+ y: "250",
1619
+ width: "440",
1620
+ height: "112",
1621
+ fill: "none",
1622
+ stroke: "rgba(255,255,255,0.08)",
1623
+ strokeWidth: "1.5"
1624
+ }
1625
+ ),
1626
+ /* @__PURE__ */ t(
1627
+ "rect",
1628
+ {
1629
+ x: "160",
1630
+ y: "250",
1631
+ width: "280",
1632
+ height: "37",
1633
+ fill: "none",
1634
+ stroke: "rgba(255,255,255,0.08)",
1635
+ strokeWidth: "1.5"
1636
+ }
1637
+ ),
1638
+ /* @__PURE__ */ t("circle", { cx: "300", cy: "325", r: "2.5", fill: "rgba(255,255,255,0.18)" }),
1639
+ /* @__PURE__ */ t(
1640
+ "path",
1641
+ {
1642
+ d: "M 225,362 Q 300,382 375,362",
1643
+ fill: "none",
1644
+ stroke: "rgba(255,255,255,0.06)",
1645
+ strokeWidth: "1.5"
1646
+ }
1647
+ ),
1648
+ /* @__PURE__ */ t(
1649
+ "rect",
1650
+ {
1651
+ x: "100",
1652
+ y: "50",
1653
+ width: "400",
1654
+ height: "200",
1655
+ fill: "rgba(0,0,0,0.1)"
1656
+ }
1657
+ ),
1658
+ /* @__PURE__ */ t(
1659
+ "rect",
1660
+ {
1661
+ x: "100",
1662
+ y: "50",
1663
+ width: "400",
1664
+ height: "200",
1665
+ fill: "url(#netPattern)"
1666
+ }
1667
+ ),
1668
+ /* @__PURE__ */ t(
1669
+ "rect",
1670
+ {
1671
+ x: "95",
1672
+ y: "48",
1673
+ width: "10",
1674
+ height: "205",
1675
+ rx: "5",
1676
+ ry: "5",
1677
+ fill: "url(#postGradientLeft)",
1678
+ filter: "url(#postShadow)"
1679
+ }
1680
+ ),
1681
+ /* @__PURE__ */ t(
1682
+ "line",
1683
+ {
1684
+ x1: "98",
1685
+ y1: "53",
1686
+ x2: "98",
1687
+ y2: "248",
1688
+ stroke: "rgba(255,255,255,0.5)",
1689
+ strokeWidth: "1"
1690
+ }
1691
+ ),
1692
+ /* @__PURE__ */ t(
1693
+ "rect",
1694
+ {
1695
+ x: "495",
1696
+ y: "48",
1697
+ width: "10",
1698
+ height: "205",
1699
+ rx: "5",
1700
+ ry: "5",
1701
+ fill: "url(#postGradientRight)",
1702
+ filter: "url(#postShadowRight)"
1703
+ }
1704
+ ),
1705
+ /* @__PURE__ */ t(
1706
+ "line",
1707
+ {
1708
+ x1: "502",
1709
+ y1: "53",
1710
+ x2: "502",
1711
+ y2: "248",
1712
+ stroke: "rgba(255,255,255,0.5)",
1713
+ strokeWidth: "1"
1714
+ }
1715
+ ),
1716
+ /* @__PURE__ */ t(
1717
+ "rect",
1718
+ {
1719
+ x: "93",
1720
+ y: "43",
1721
+ width: "414",
1722
+ height: "10",
1723
+ rx: "5",
1724
+ ry: "5",
1725
+ fill: "url(#crossbarGradient)",
1726
+ filter: "url(#crossbarShadow)"
1727
+ }
1728
+ ),
1729
+ /* @__PURE__ */ t(
1730
+ "line",
1731
+ {
1732
+ x1: "98",
1733
+ y1: "46",
1734
+ x2: "502",
1735
+ y2: "46",
1736
+ stroke: "rgba(255,255,255,0.5)",
1737
+ strokeWidth: "1"
1738
+ }
1739
+ )
1740
+ ] }), Ar = ({
1741
+ segment: e,
1742
+ selectedSegment: l,
1743
+ clickedPosition: i,
1744
+ flippedTarget: n,
1745
+ isKicking: c,
1746
+ showResultScreen: b,
1747
+ showInlineResult: m,
1748
+ showLabel: a,
1749
+ primaryColor: s,
1750
+ successColor: y,
1751
+ dangerColor: x,
1752
+ onTargetClick: u
1753
+ }) => {
1754
+ const C = e.position.x / 100 * 400 + 100, f = e.position.y / 100 * 200 + 50, d = 28, h = {
1755
+ x: e.position.x,
1756
+ y: e.position.y
1757
+ }, D = i && i.x === h.x && i.y === h.y, $ = n && n.x === h.x && n.y === h.y;
1758
+ let v = e.color || s;
1759
+ $ && l && (v = l.isWinning ? y : x);
1760
+ let M = "none";
1761
+ $ && n && (M = `rotateY(${n.direction === "left" ? -180 : 180}deg)`);
1762
+ let L = 1;
1763
+ return (c || a) && (L = D ? 1 : 0.3), /* @__PURE__ */ g(
1764
+ "g",
1765
+ {
1766
+ style: {
1767
+ cursor: c || b || m || a ? "default" : "pointer",
1768
+ transition: "all 0.4s ease",
1769
+ transform: M,
1770
+ transformOrigin: `${C}px ${f}px`
1771
+ },
1772
+ onClick: () => u(h),
1773
+ opacity: L,
1774
+ children: [
1775
+ /* @__PURE__ */ t(
1776
+ "circle",
1777
+ {
1778
+ cx: C,
1779
+ cy: f,
1780
+ r: d,
1781
+ fill: "white",
1782
+ stroke: v,
1783
+ strokeWidth: D ? "3.5" : "2.5",
1784
+ opacity: "0.9",
1785
+ className: "target-outer",
1786
+ style: { transition: "all 0.4s ease" }
1787
+ }
1788
+ ),
1789
+ /* @__PURE__ */ t(
1790
+ "circle",
1791
+ {
1792
+ cx: C,
1793
+ cy: f,
1794
+ r: d * 0.65,
1795
+ fill: "white",
1796
+ stroke: v,
1797
+ strokeWidth: D ? "3" : "2",
1798
+ opacity: "0.9",
1799
+ className: "target-middle",
1800
+ style: { transition: "all 0.4s ease" }
1801
+ }
1802
+ ),
1803
+ /* @__PURE__ */ t(
1804
+ "circle",
1805
+ {
1806
+ cx: C,
1807
+ cy: f,
1808
+ r: d * 0.35,
1809
+ fill: v,
1810
+ opacity: D ? "1" : "0.8",
1811
+ className: "target-inner",
1812
+ style: { transition: "all 0.4s ease" }
1813
+ }
1814
+ ),
1815
+ /* @__PURE__ */ t(
1816
+ "circle",
1817
+ {
1818
+ cx: C,
1819
+ cy: f,
1820
+ r: d * 0.15,
1821
+ fill: "white",
1822
+ opacity: "0.9",
1823
+ className: "target-center",
1824
+ style: { transition: "all 0.4s ease" }
1825
+ }
1826
+ ),
1827
+ /* @__PURE__ */ t(
1828
+ "circle",
1829
+ {
1830
+ cx: C,
1831
+ cy: f,
1832
+ r: d + 5,
1833
+ fill: "transparent",
1834
+ stroke: "transparent",
1835
+ strokeWidth: "0",
1836
+ onMouseEnter: (z) => {
1837
+ var w;
1838
+ if (!c && !b && !m) {
1839
+ const k = z.currentTarget.parentElement;
1840
+ k && (k.querySelectorAll(".target-outer, .target-middle").forEach((T) => {
1841
+ T.setAttribute("stroke-width", "3");
1842
+ }), (w = k.querySelector(".target-inner")) == null || w.setAttribute("opacity", "1"));
1843
+ }
1844
+ },
1845
+ onMouseLeave: (z) => {
1846
+ var w, k, T;
1847
+ if (!c && !b && !m) {
1848
+ const p = z.currentTarget.parentElement;
1849
+ p && ((w = p.querySelector(".target-outer")) == null || w.setAttribute("stroke-width", "2"), (k = p.querySelector(".target-middle")) == null || k.setAttribute("stroke-width", "1.5"), (T = p.querySelector(".target-inner")) == null || T.setAttribute("opacity", "0.8"));
1850
+ }
1851
+ }
1852
+ }
1853
+ )
1854
+ ]
1855
+ },
1856
+ e.id
1857
+ );
1858
+ }, Le = "var(--fu-ucrc-cg-pen-text)", Ue = "var(--fu-ucrc-cg-pen-muted)", Et = (e) => `var(--fu-ucrc-cg-pen-dc-${e})`, St = { display: "flex", flexDirection: "column", alignItems: "center" }, Me = {
1859
+ ...K,
1860
+ fontFamily: o.fontSecondary,
1861
+ fontWeight: 400,
1862
+ color: Ue,
1863
+ opacity: "var(--fu-ucrc-cg-pen-muted-opacity)",
1864
+ textAlign: "center",
1865
+ zIndex: 1
1866
+ }, We = { display: "flex", alignItems: "center", gap: o.spaceSm, marginTop: o.spaceXs }, Z = {
1867
+ root: r({
1868
+ ...St,
1869
+ width: "100%",
1870
+ padding: o.spaceMd,
1871
+ gap: o.spaceMd,
1872
+ position: "relative",
1873
+ overflow: "hidden",
1874
+ boxSizing: "border-box"
1875
+ }),
1876
+ titleBlock: r({ ...St, gap: 0, textAlign: "center", width: "100%", zIndex: 1 }),
1877
+ title: r({
1878
+ ...ht,
1879
+ fontFamily: o.fontPrimary,
1880
+ fontWeight: 700,
1881
+ fontSize: "1.25rem",
1882
+ color: Le,
1883
+ lineHeight: 1.2,
1884
+ textShadow: "var(--fu-ucrc-cg-pen-title-shadow)"
1885
+ }),
1886
+ divider: r({ ...We, width: "40%" }),
1887
+ dividerMobile: r({ ...We, width: "60%" }),
1888
+ dividerStart: r({ flex: 1, height: "1px", background: `linear-gradient(to right, transparent, ${Et("40")})` }),
1889
+ dividerEnd: r({ flex: 1, height: "1px", background: `linear-gradient(to left, transparent, ${Et("40")})` }),
1890
+ diamond: r({
1891
+ width: "8px",
1892
+ height: "8px",
1893
+ transform: "rotate(45deg)",
1894
+ border: `1px solid ${Et("50")}`,
1895
+ background: Et("15")
1896
+ }),
1897
+ subtitle: r({
1898
+ ...K,
1899
+ fontFamily: o.fontSecondary,
1900
+ fontWeight: 400,
1901
+ fontSize: "0.875rem",
1902
+ color: Ue,
1903
+ opacity: "var(--fu-ucrc-cg-pen-subtitle-opacity)"
1904
+ }),
1905
+ welcome: r({
1906
+ ...K,
1907
+ fontFamily: o.fontPrimary,
1908
+ fontWeight: 400,
1909
+ fontSize: "0.875rem",
1910
+ color: Le,
1911
+ textAlign: "center",
1912
+ zIndex: 1
1913
+ }),
1914
+ instructions: r({ ...Me, fontSize: "0.875rem" }),
1915
+ disclaimer: r({ ...Me, fontSize: "0.625rem", maxWidth: "900px", lineHeight: 1.4 }),
1916
+ goal: r({ position: "relative", width: "100%", aspectRatio: "16/10", zIndex: 1 }),
1917
+ goalSvg: r({
1918
+ width: "100%",
1919
+ height: "100%",
1920
+ filter: "drop-shadow(0 4px 16px rgba(0,0,0,0.25))",
1921
+ borderRadius: o.radiusMd,
1922
+ overflow: "hidden"
1923
+ }),
1924
+ row: r({ display: "flex", flexDirection: "row", width: "100%", gap: o.spaceXl, alignItems: "center", zIndex: 1 }),
1925
+ textColumn: r({ flex: "0 0 42%", ...St, gap: o.spaceMd, alignSelf: "stretch", justifyContent: "flex-start" }),
1926
+ textColumnCentered: r({ flex: "0 0 42%", ...St, gap: o.spaceMd, alignSelf: "stretch", justifyContent: "center" }),
1927
+ footer: r({ marginTop: "auto", ...St, width: "100%" }),
1928
+ goalColumn: r({ flex: "0 0 58%", display: "flex", alignItems: "center", justifyContent: "center" }),
1929
+ stack: r({ ...St, width: "100%", gap: o.spaceSm, zIndex: 1 })
1930
+ }, Ir = ({
1931
+ infoPage: e,
1932
+ enableReset: l = !1,
1933
+ contentColor: i,
1934
+ primaryColor: n,
1935
+ onPrimaryColor: c,
1936
+ dangerColor: b,
1937
+ isDark: m,
1938
+ forceMobile: a = !1
1939
+ }) => {
1940
+ var st;
1941
+ const s = ct(), y = a ? !1 : qt(), x = pt(), u = Zt(), C = wt(), f = x.palette.success.plainColor, d = JSON.parse(e.body), h = [
1942
+ { x: 15, y: 25 },
1943
+ { x: 50, y: 20 },
1944
+ { x: 85, y: 25 },
1945
+ { x: 20, y: 70 },
1946
+ { x: 50, y: 75 },
1947
+ { x: 80, y: 70 }
1948
+ ], D = (d.segments || []).map(
1949
+ (U, lt) => ({
1950
+ ...U,
1951
+ position: U.position || h[lt % h.length]
1952
+ })
1953
+ ), $ = e.labels || {}, v = d.config || { mode: "fair", pace: "normal" }, M = v.mode || "fair", L = v.pace || "normal", z = ((st = d.config) == null ? void 0 : st.decorations) ?? !1, w = yt(n, m), k = !!($.welcome || $.instructions || $.disclaimer), {
1954
+ isKicking: T,
1955
+ selectedSegment: p,
1956
+ clickedPosition: S,
1957
+ showResultScreen: W,
1958
+ showInlineResult: R,
1959
+ showLabel: X,
1960
+ ballPosition: O,
1961
+ ballRotation: q,
1962
+ flippedTarget: J,
1963
+ showNetRipple: F,
1964
+ kickDuration: G,
1965
+ handleTargetClick: tt,
1966
+ handleReset: N
1967
+ } = Rr({ segments: D, mode: M, pace: L }), Q = {
1968
+ ...C,
1969
+ "--fu-ucrc-cg-pen-text": m ? "#fff" : i,
1970
+ "--fu-ucrc-cg-pen-muted": m ? "rgba(255,255,255,0.7)" : i,
1971
+ "--fu-ucrc-cg-pen-muted-opacity": m ? 1 : 0.7,
1972
+ "--fu-ucrc-cg-pen-subtitle-opacity": m ? 1 : 0.8,
1973
+ "--fu-ucrc-cg-pen-title-shadow": z ? `0 0 20px ${n}20` : "none",
1974
+ "--fu-ucrc-cg-pen-dc-15": w("15"),
1975
+ "--fu-ucrc-cg-pen-dc-40": w("40"),
1976
+ "--fu-ucrc-cg-pen-dc-50": w("50")
1977
+ }, et = () => !e.title && !e.subtitle ? null : /* @__PURE__ */ g("div", { css: Z.titleBlock, children: [
1978
+ e.title && /* @__PURE__ */ g(at, { children: [
1979
+ /* @__PURE__ */ t("h2", { css: Z.title, children: e.title }),
1980
+ z && /* @__PURE__ */ g("div", { css: s ? Z.dividerMobile : Z.divider, children: [
1981
+ /* @__PURE__ */ t("div", { css: Z.dividerStart }),
1982
+ /* @__PURE__ */ t("div", { css: Z.diamond }),
1983
+ /* @__PURE__ */ t("div", { css: Z.dividerEnd })
1984
+ ] })
1985
+ ] }),
1986
+ e.subtitle && /* @__PURE__ */ t("p", { css: Z.subtitle, children: e.subtitle })
1987
+ ] }), rt = $.welcome && /* @__PURE__ */ t("p", { css: Z.welcome, children: $.welcome }), ft = !R && $.instructions && /* @__PURE__ */ t("p", { css: Z.instructions, children: $.instructions }), ut = R && (p == null ? void 0 : p.results) && /* @__PURE__ */ t(
1988
+ Mt,
1989
+ {
1990
+ result: p.results,
1991
+ variant: "embed",
1992
+ mode: "inline",
1993
+ contentColor: i,
1994
+ primaryColor: n,
1995
+ onPrimaryColor: c,
1996
+ disclaimer: $.disclaimer,
1997
+ enableReset: l,
1998
+ onReset: N,
1999
+ raised: !0
2000
+ }
2001
+ ), nt = !R && $.disclaimer && /* @__PURE__ */ t("p", { css: Z.disclaimer, children: $.disclaimer }), ot = () => /* @__PURE__ */ t("div", { css: Z.goal, children: /* @__PURE__ */ g("svg", { viewBox: "0 0 600 375", css: Z.goalSvg, children: [
2002
+ /* @__PURE__ */ t(zr, { isDark: m }),
2003
+ F && S && /* @__PURE__ */ g(at, { children: [
2004
+ /* @__PURE__ */ t(
2005
+ "circle",
2006
+ {
2007
+ cx: S.x / 100 * 400 + 100,
2008
+ cy: S.y / 100 * 200 + 50,
2009
+ r: "5",
2010
+ fill: "none",
2011
+ stroke: "rgba(255,255,255,0.4)",
2012
+ strokeWidth: "2",
2013
+ style: { animation: "netRipple1 0.6s ease-out forwards" }
2014
+ }
2015
+ ),
2016
+ /* @__PURE__ */ t(
2017
+ "circle",
2018
+ {
2019
+ cx: S.x / 100 * 400 + 100,
2020
+ cy: S.y / 100 * 200 + 50,
2021
+ r: "5",
2022
+ fill: "none",
2023
+ stroke: "rgba(255,255,255,0.25)",
2024
+ strokeWidth: "1.5",
2025
+ style: { animation: "netRipple2 0.6s ease-out 0.1s forwards" }
2026
+ }
2027
+ ),
2028
+ /* @__PURE__ */ t("style", { children: `
2029
+ @keyframes netRipple1 {
2030
+ 0% { r: 5; opacity: 1; stroke-width: 2.5; }
2031
+ 100% { r: 45; opacity: 0; stroke-width: 0.3; }
2032
+ }
2033
+ @keyframes netRipple2 {
2034
+ 0% { r: 5; opacity: 0.8; stroke-width: 2; }
2035
+ 100% { r: 35; opacity: 0; stroke-width: 0.3; }
2036
+ }
2037
+ ` })
2038
+ ] }),
2039
+ D.map((U) => /* @__PURE__ */ t(
2040
+ Ar,
2041
+ {
2042
+ segment: U,
2043
+ selectedSegment: p,
2044
+ clickedPosition: S,
2045
+ flippedTarget: J,
2046
+ isKicking: T,
2047
+ showResultScreen: W,
2048
+ showInlineResult: R,
2049
+ showLabel: X,
2050
+ primaryColor: n,
2051
+ successColor: f,
2052
+ dangerColor: b,
2053
+ onTargetClick: tt
2054
+ },
2055
+ U.id
2056
+ )),
2057
+ /* @__PURE__ */ t(
2058
+ "g",
2059
+ {
2060
+ style: {
2061
+ transform: T && S ? `translate(${O.x / 100 * 400 - 200}px, ${O.y / 100 * 200 - 300}px) rotate(${q}deg) scale(0.7)` : X && S ? `translate(${S.x / 100 * 400 - 200}px, ${S.y / 100 * 200 - 300}px) scale(0.7)` : "translate(0, 0) scale(1)",
2062
+ transformOrigin: "300px 325px",
2063
+ transition: T ? `transform ${G}ms cubic-bezier(0.25, 0.1, 0.25, 1.0)` : "none",
2064
+ opacity: X ? 0 : 1
2065
+ },
2066
+ children: /* @__PURE__ */ t(
2067
+ "text",
2068
+ {
2069
+ x: "300",
2070
+ y: "325",
2071
+ fontSize: "36",
2072
+ textAnchor: "middle",
2073
+ dominantBaseline: "central",
2074
+ style: { userSelect: "none" },
2075
+ children: "⚽"
2076
+ }
2077
+ )
2078
+ }
2079
+ ),
2080
+ X && p && S && (() => {
2081
+ const U = S.x / 100 * 400 + 100, lt = S.y / 100 * 200 + 50, Wt = 110, mt = 28, Bt = U - Wt / 2, xt = lt - mt - 35, $t = 6, Rt = p.isWinning ? f : b;
2082
+ return /* @__PURE__ */ g(
2083
+ "g",
2084
+ {
2085
+ style: {
2086
+ opacity: W || R ? 0 : 1,
2087
+ transition: "opacity 0.3s ease"
2088
+ },
2089
+ children: [
2090
+ /* @__PURE__ */ t(
2091
+ "rect",
2092
+ {
2093
+ x: Bt,
2094
+ y: xt,
2095
+ width: Wt,
2096
+ height: mt,
2097
+ fill: Rt,
2098
+ rx: "6",
2099
+ opacity: "0.96",
2100
+ style: { filter: "drop-shadow(0 2px 8px rgba(0,0,0,0.2))" }
2101
+ }
2102
+ ),
2103
+ /* @__PURE__ */ t(
2104
+ "path",
2105
+ {
2106
+ d: `M ${U - $t} ${xt + mt}
2107
+ L ${U} ${xt + mt + $t}
2108
+ L ${U + $t} ${xt + mt} Z`,
2109
+ fill: Rt,
2110
+ opacity: "0.96"
2111
+ }
2112
+ ),
2113
+ /* @__PURE__ */ t(
2114
+ "text",
2115
+ {
2116
+ x: U,
2117
+ y: xt + mt / 2,
2118
+ fontSize: "13",
2119
+ fontWeight: "600",
2120
+ fill: "white",
2121
+ textAnchor: "middle",
2122
+ dominantBaseline: "central",
2123
+ style: {
2124
+ userSelect: "none",
2125
+ fontFamily: u.primary,
2126
+ letterSpacing: "0.2px"
2127
+ },
2128
+ children: p.label
2129
+ }
2130
+ )
2131
+ ]
2132
+ }
2133
+ );
2134
+ })()
2135
+ ] }) });
2136
+ return /* @__PURE__ */ g("div", { css: Z.root, style: Q, children: [
2137
+ W && (p == null ? void 0 : p.results) && /* @__PURE__ */ t(
2138
+ Mt,
2139
+ {
2140
+ result: p.results,
2141
+ variant: "embed",
2142
+ mode: "screen",
2143
+ contentColor: i,
2144
+ primaryColor: n,
2145
+ onPrimaryColor: c,
2146
+ disclaimer: $.disclaimer,
2147
+ enableReset: l,
2148
+ onReset: N
2149
+ }
2150
+ ),
2151
+ !W && (y ? (
2152
+ /* Desktop: horizontal 2-column */
2153
+ /* @__PURE__ */ g("div", { css: Z.row, children: [
2154
+ /* @__PURE__ */ g("div", { css: k ? Z.textColumn : Z.textColumnCentered, children: [
2155
+ et(),
2156
+ rt,
2157
+ ft,
2158
+ ut,
2159
+ /* @__PURE__ */ t("div", { css: Z.footer, children: nt })
2160
+ ] }),
2161
+ /* @__PURE__ */ t("div", { css: Z.goalColumn, children: ot() })
2162
+ ] })
2163
+ ) : (
2164
+ /* Mobile: compact vertical */
2165
+ /* @__PURE__ */ g("div", { css: Z.stack, children: [
2166
+ et(),
2167
+ rt,
2168
+ ft,
2169
+ ot(),
2170
+ ut,
2171
+ nt
2172
+ ] })
2173
+ ))
2174
+ ] });
2175
+ }, Re = {
2176
+ display: "flex",
2177
+ flexDirection: "column",
2178
+ width: "100%",
2179
+ height: "100%",
2180
+ position: "relative",
2181
+ overflow: "auto",
2182
+ boxSizing: "border-box",
2183
+ background: "var(--fu-ucrc-cg-frame-bg)",
2184
+ boxShadow: "inset 0 0 100px rgba(0, 0, 0, 0.04), inset 0 0 30px rgba(0, 0, 0, 0.02)"
2185
+ }, ze = {
2186
+ frame: r(Re),
2187
+ // Decorations add a hairline border in the primary tint.
2188
+ framed: r({
2189
+ ...Re,
2190
+ border: "1px solid var(--fu-ucrc-cg-frame-border)",
2191
+ borderRadius: "var(--fu-ucrc-cg-frame-radius)"
2192
+ })
2193
+ }, Kr = ({
2194
+ infoPage: e,
2195
+ enableReset: l = !1,
2196
+ forceMobile: i = !1
2197
+ }) => {
2198
+ var $, v, M, L, z, w, k, T, p, S;
2199
+ const n = i || ct(), c = pt(), b = Ut(), m = Jt() === "dark", a = ($ = e.branding) == null ? void 0 : $.colors, s = (a == null ? void 0 : a.primary_color) || c.palette.primary.plainColor, y = (a == null ? void 0 : a.content_color) || c.textPrimary, x = c.palette.primary.onPrimary, u = (a == null ? void 0 : a.background_color) || c.surface, C = c.palette.danger.plainColor, f = n ? ((M = (v = e.branding) == null ? void 0 : v.images) == null ? void 0 : M.mobile_background_image) || ((z = (L = e.branding) == null ? void 0 : L.images) == null ? void 0 : z.background_image) || ((w = e.images) == null ? void 0 : w.cover) : ((T = (k = e.branding) == null ? void 0 : k.images) == null ? void 0 : T.background_image) || ((p = e.images) == null ? void 0 : p.cover), d = yt(s, m), h = ((S = JSON.parse(e.body).config) == null ? void 0 : S.decorations) ?? !1, D = {
2200
+ "--fu-ucrc-cg-frame-bg": f ? `url(${f}) center/cover no-repeat` : `radial-gradient(ellipse at 50% 40%, ${s}12 0%, transparent 60%), radial-gradient(ellipse at 50% 100%, ${s}08 0%, transparent 50%), ${u}`,
2201
+ "--fu-ucrc-cg-frame-border": d("15"),
2202
+ "--fu-ucrc-cg-frame-radius": b.lg
2203
+ };
2204
+ return /* @__PURE__ */ t("div", { css: h ? ze.framed : ze.frame, style: D, children: /* @__PURE__ */ t(
2205
+ Ir,
2206
+ {
2207
+ infoPage: e,
2208
+ enableReset: l,
2209
+ contentColor: y,
2210
+ primaryColor: s,
2211
+ onPrimaryColor: x,
2212
+ dangerColor: C,
2213
+ isDark: m,
2214
+ forceMobile: i
2215
+ }
2216
+ ) });
2217
+ }, Tr = {
2218
+ fast: { flipDuration: 600, labelRevealDelay: 800 },
2219
+ normal: { flipDuration: 900, labelRevealDelay: 1200 },
2220
+ slow: { flipDuration: 1500, labelRevealDelay: 2e3 }
2221
+ }, Dr = {
2222
+ fast: { crossfadeDuration: 250, revealPause: 100 },
2223
+ normal: { crossfadeDuration: 500, revealPause: 300 },
2224
+ slow: { crossfadeDuration: 800, revealPause: 600 }
2225
+ }, Ae = 1200;
2226
+ function Br({
2227
+ segments: e,
2228
+ mode: l,
2229
+ pace: i,
2230
+ revealAll: n
2231
+ }) {
2232
+ const [c, b] = B(null), [m, a] = B(null), [s, y] = B(
2233
+ null
2234
+ ), [x, u] = B(!1), [C, f] = B(!1), [d, h] = B(!1), [D, $] = B(!1), [v, M] = B(!1), [L, z] = B(/* @__PURE__ */ new Set()), [w, k] = B(
2235
+ /* @__PURE__ */ new Set()
2236
+ ), [T, p] = B(
2237
+ /* @__PURE__ */ new Set()
2238
+ ), { flipDuration: S, labelRevealDelay: W } = Tr[i], { crossfadeDuration: R, revealPause: X } = Dr[i], q = 1e3 + (n ? e.length * 200 : 0);
2239
+ return Gt(() => {
2240
+ const G = setTimeout(() => M(!0), 100);
2241
+ return () => clearTimeout(G);
2242
+ }, []), {
2243
+ // State
2244
+ selectedSegment: c,
2245
+ displaySegments: m,
2246
+ revealResult: s,
2247
+ showResultScreen: x,
2248
+ showInlineResult: C,
2249
+ isRevealing: d,
2250
+ showLoseAnimation: D,
2251
+ hasEntered: v,
2252
+ flippedCards: L,
2253
+ crossfadedCards: w,
2254
+ revealedOtherCards: T,
2255
+ // Timing
2256
+ flipDuration: S,
2257
+ crossfadeDuration: R,
2258
+ loseAnimationDuration: Ae,
2259
+ // Actions
2260
+ handlePick: (G, tt) => {
2261
+ var ft, ut;
2262
+ if (d || c) return;
2263
+ h(!0);
2264
+ const N = Qt(e, l), Q = `card-${G}`;
2265
+ if (n) {
2266
+ const nt = e.findIndex(
2267
+ (ot) => ot.id === N.id
2268
+ );
2269
+ if (nt !== G) {
2270
+ const ot = [...e];
2271
+ ot[G] = e[nt], ot[nt] = e[G], a(ot);
2272
+ }
2273
+ }
2274
+ const et = ((ft = N.results) == null ? void 0 : ft.primaryCTA) || ((ut = N.results) == null ? void 0 : ut.secondaryCTA), rt = () => {
2275
+ if (b(N), n) {
2276
+ const nt = e.map((st, U) => `card-${U}`).filter((st) => st !== Q), ot = 200;
2277
+ nt.forEach((st, U) => {
2278
+ setTimeout(
2279
+ () => {
2280
+ p((lt) => /* @__PURE__ */ new Set([...lt, st]));
2281
+ },
2282
+ (U + 1) * ot
2283
+ );
2284
+ });
2285
+ }
2286
+ N.isWinning ? setTimeout(() => {
2287
+ et ? u(!0) : f(!0);
2288
+ }, q) : ($(!0), setTimeout(() => {
2289
+ $(!1), setTimeout(() => {
2290
+ et ? u(!0) : f(!0);
2291
+ }, q);
2292
+ }, Ae)), h(!1);
2293
+ };
2294
+ tt ? (y(N), k(/* @__PURE__ */ new Set([Q])), setTimeout(() => {
2295
+ rt();
2296
+ }, R + X)) : (z(/* @__PURE__ */ new Set([Q])), setTimeout(() => {
2297
+ rt();
2298
+ }, W));
2299
+ },
2300
+ handleReset: () => {
2301
+ b(null), u(!1), f(!1), h(!1), z(/* @__PURE__ */ new Set()), k(/* @__PURE__ */ new Set()), y(null), p(/* @__PURE__ */ new Set()), a(null), $(!1), M(!1), setTimeout(() => M(!0), 100);
2302
+ }
2303
+ };
2304
+ }
2305
+ const Dt = (e) => `var(--fu-ucrc-cg-object-${e})`, Fr = V({
2306
+ "0%, 100%": { transform: "translateY(0px) scale(1)" },
2307
+ "50%": { transform: `translateY(${Dt("float-y")}) scale(${Dt("float-scale")})` }
2308
+ }), Xr = V({
2309
+ "0%": { opacity: 0, transform: "translateY(4px)" },
2310
+ "100%": { opacity: 1, transform: "translateY(0)" }
2311
+ }), Ze = {
2312
+ position: "relative",
2313
+ flexShrink: 0,
2314
+ transition: "opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease",
2315
+ overflow: "visible",
2316
+ boxShadow: "none",
2317
+ border: "none",
2318
+ outline: "none",
2319
+ background: "transparent"
2320
+ }, Ie = {
2321
+ ...Ze,
2322
+ cursor: "pointer",
2323
+ opacity: 1,
2324
+ transform: "none",
2325
+ filter: "none",
2326
+ "&:hover": { transform: "translateY(-4px) scale(1.08)" }
2327
+ }, Vt = { ...Ze, cursor: "default", animation: "none" }, Te = {
2328
+ width: "100%",
2329
+ height: "100%",
2330
+ objectFit: "contain",
2331
+ borderRadius: "inherit",
2332
+ position: "absolute",
2333
+ top: 0,
2334
+ left: 0,
2335
+ transition: Dt("image-transition")
2336
+ }, De = {
2337
+ position: "absolute",
2338
+ left: 0,
2339
+ width: "100%",
2340
+ background: "transparent",
2341
+ zIndex: 5,
2342
+ boxSizing: "border-box",
2343
+ animation: `${Xr} 0.4s ease-out`
2344
+ }, Be = {
2345
+ ...K,
2346
+ fontFamily: o.fontPrimary,
2347
+ fontWeight: 600,
2348
+ color: Dt("label"),
2349
+ textAlign: "center",
2350
+ wordBreak: "break-word",
2351
+ textTransform: "uppercase",
2352
+ letterSpacing: "0.05em",
2353
+ lineHeight: 1.2
2354
+ }, dt = {
2355
+ idle: r(Ie, { animation: "none" }),
2356
+ floating: r(Ie, { animation: `${Fr} 3s ease-in-out infinite`, animationDelay: Dt("float-delay") }),
2357
+ revealed: r(Vt, { opacity: 1, transform: "none", filter: "none" }),
2358
+ revealedOther: r(Vt, { opacity: 0.65, transform: "scale(0.95)", filter: "grayscale(0.3)" }),
2359
+ revealedDim: r(Vt, { opacity: 0.4, transform: "scale(0.95) translateY(4px)", filter: "grayscale(0.5)" }),
2360
+ idleImage: r({ ...Te, zIndex: 1 }),
2361
+ revealedImage: r({ ...Te, zIndex: 2 }),
2362
+ labelBelow: r({ ...De, top: "100%" }),
2363
+ labelInside: r({ ...De, bottom: 0 }),
2364
+ label: r({ ...Be, fontSize: "0.875rem" }),
2365
+ labelMobile: r({ ...Be, fontSize: "0.7rem" })
2366
+ }, Yr = ({
2367
+ segment: e,
2368
+ index: l,
2369
+ selectedSegment: i,
2370
+ revealResult: n,
2371
+ isCrossfaded: c,
2372
+ isOtherRevealed: b,
2373
+ shouldDim: m,
2374
+ isRevealed: a,
2375
+ hasEntered: s,
2376
+ objectSize: y,
2377
+ crossfadeDuration: x,
2378
+ isStandard: u,
2379
+ primaryColor: C,
2380
+ dangerColor: f,
2381
+ onPick: d
2382
+ }) => {
2383
+ var T, p, S;
2384
+ const h = ct(), D = wt(), $ = !!((T = e.images) != null && T.idle), v = c && ((p = n == null ? void 0 : n.images) != null && p.revealed) ? n.images.revealed : (S = e.images) == null ? void 0 : S.revealed, M = !!v, L = c && a, z = c || b, w = L ? i == null ? void 0 : i.isWinning : e.isWinning, k = {
2385
+ ...D,
2386
+ "--fu-ucrc-cg-object-float-y": h ? "-1px" : "-3px",
2387
+ "--fu-ucrc-cg-object-float-scale": h ? 1.003 : 1.008,
2388
+ "--fu-ucrc-cg-object-float-delay": `${l * 0.15}s`,
2389
+ "--fu-ucrc-cg-object-image-transition": `opacity ${x}ms ease, transform ${x}ms ease`,
2390
+ "--fu-ucrc-cg-object-label": e.color || (w ? C : f),
2391
+ width: `${y}px`,
2392
+ height: `${y}px`
2393
+ };
2394
+ return /* @__PURE__ */ g(
2395
+ "div",
2396
+ {
2397
+ css: a ? m ? dt.revealedDim : b ? dt.revealedOther : dt.revealed : s ? dt.floating : dt.idle,
2398
+ style: k,
2399
+ onClick: () => !a && d(),
2400
+ children: [
2401
+ $ && /* @__PURE__ */ t(
2402
+ "img",
2403
+ {
2404
+ src: e.images.idle,
2405
+ alt: e.label,
2406
+ css: dt.idleImage,
2407
+ style: {
2408
+ opacity: z && M ? 0 : 1,
2409
+ transform: z && M ? "scale(0.95)" : "scale(1)"
2410
+ }
2411
+ }
2412
+ ),
2413
+ M && /* @__PURE__ */ t(
2414
+ "img",
2415
+ {
2416
+ src: v,
2417
+ alt: `${e.label} revealed`,
2418
+ css: dt.revealedImage,
2419
+ style: { opacity: z ? 1 : 0, transform: z ? "scale(1)" : "scale(1.05)" }
2420
+ }
2421
+ ),
2422
+ (L || b) && i && /* @__PURE__ */ t("div", { css: u ? dt.labelBelow : dt.labelInside, children: /* @__PURE__ */ t("p", { css: h ? dt.labelMobile : dt.label, children: L ? i.label : e.label }) })
2423
+ ]
2424
+ }
2425
+ );
2426
+ }, A = (e) => `var(--fu-ucrc-cg-card-${e})`, Er = V({
2427
+ "0%, 100%": { transform: "translateY(0px) scale(1)" },
2428
+ "50%": { transform: `translateY(${A("float-y")}) scale(${A("float-scale")})` }
2429
+ }), Or = V({
2430
+ "0%": { transform: "rotate(25deg) translateX(-100%)" },
2431
+ "100%": { transform: "rotate(25deg) translateX(100%)" }
2432
+ }), Fe = V({
2433
+ "0%, 100%": { boxShadow: A("win-glow-1") },
2434
+ "50%": { boxShadow: A("win-glow-2") }
2435
+ }), Xe = V({
2436
+ "0%": { transform: "rotateY(180deg) translateX(0)", boxShadow: A("lose-0") },
2437
+ "10%": { transform: "rotateY(180deg) translateX(-4px)", boxShadow: A("lose-10") },
2438
+ "20%": { transform: "rotateY(180deg) translateX(4px)" },
2439
+ "30%": { transform: "rotateY(180deg) translateX(-3px)" },
2440
+ "40%": { transform: "rotateY(180deg) translateX(3px)", boxShadow: A("lose-40") },
2441
+ "50%": { transform: "rotateY(180deg) translateX(-2px)" },
2442
+ "60%": { transform: "rotateY(180deg) translateX(2px)" },
2443
+ "70%": { transform: "rotateY(180deg) translateX(-1px)", boxShadow: A("lose-70") },
2444
+ "80%": { transform: "rotateY(180deg) translateX(1px)" },
2445
+ "100%": { transform: "rotateY(180deg) translateX(0)", boxShadow: A("lose-100") }
2446
+ }), Ye = V({
2447
+ "0%": { opacity: 0, transform: "scale(0.8)" },
2448
+ "100%": { opacity: 1, transform: "scale(1)" }
2449
+ }), Gr = V({
2450
+ "0%": { width: 0, height: 0, opacity: 1, transform: "translate(-50%, -50%)" },
2451
+ "100%": { width: "300px", height: "300px", opacity: 0, transform: "translate(-50%, -50%)" }
2452
+ }), qe = {
2453
+ position: "absolute",
2454
+ top: 0,
2455
+ left: 0,
2456
+ width: "100%",
2457
+ height: "100%",
2458
+ backfaceVisibility: "hidden",
2459
+ borderRadius: o.radiusLg,
2460
+ display: "flex",
2461
+ flexDirection: "column",
2462
+ alignItems: "center",
2463
+ justifyContent: "center",
2464
+ overflow: "hidden",
2465
+ boxSizing: "border-box"
2466
+ }, jr = {
2467
+ ...qe,
2468
+ background: A("front-bg"),
2469
+ border: A("front-border"),
2470
+ outline: A("front-outline"),
2471
+ outlineOffset: "2px",
2472
+ transition: "all 0.3s ease",
2473
+ "&::after": {
2474
+ content: '""',
2475
+ position: "absolute",
2476
+ top: 0,
2477
+ left: 0,
2478
+ width: "100%",
2479
+ height: "100%",
2480
+ background: A("after-bg"),
2481
+ borderRadius: "inherit",
2482
+ pointerEvents: "none",
2483
+ zIndex: 4
2484
+ }
2485
+ }, _r = {
2486
+ "&::before": {
2487
+ content: '""',
2488
+ position: "absolute",
2489
+ top: "-50%",
2490
+ left: "-50%",
2491
+ width: "200%",
2492
+ height: "200%",
2493
+ background: A("before-bg"),
2494
+ transform: "rotate(25deg) translateX(-100%)",
2495
+ animation: `${Or} 4s ease-in-out infinite`,
2496
+ animationDelay: A("shimmer-delay"),
2497
+ pointerEvents: "none",
2498
+ zIndex: 5
2499
+ }
2500
+ }, Ee = {
2501
+ boxShadow: A("front-shadow"),
2502
+ pointerEvents: "auto",
2503
+ "&:hover": {
2504
+ transform: "translateY(-8px) scale(1.04) rotateX(2deg)",
2505
+ boxShadow: A("front-hover-shadow")
2506
+ }
2507
+ }, Pr = { boxShadow: "0 2px 8px rgba(0,0,0,0.15)", pointerEvents: "none", animation: "none" }, Hr = { animation: `${Er} 3s ease-in-out infinite`, animationDelay: A("float-delay") }, Oe = (e) => {
2508
+ const l = { ...jr, ...e ? {} : _r, padding: e ? o.spaceXs : o.spaceSm };
2509
+ return {
2510
+ idle: r(l, Ee, { animation: "none" }),
2511
+ floating: r(l, Ee, Hr),
2512
+ revealed: r(l, Pr)
2513
+ };
2514
+ }, Ot = { position: "absolute", zIndex: 2 }, Ge = (e) => ({
2515
+ topLeft: r({
2516
+ ...Ot,
2517
+ top: "6px",
2518
+ left: "6px",
2519
+ width: e,
2520
+ height: e,
2521
+ borderTop: `2px solid ${A("corner")}`,
2522
+ borderLeft: `2px solid ${A("corner")}`,
2523
+ borderTopLeftRadius: o.radiusSm
2524
+ }),
2525
+ topRight: r({
2526
+ ...Ot,
2527
+ top: "6px",
2528
+ right: "6px",
2529
+ width: e,
2530
+ height: e,
2531
+ borderTop: `2px solid ${A("corner")}`,
2532
+ borderRight: `2px solid ${A("corner")}`,
2533
+ borderTopRightRadius: o.radiusSm
2534
+ }),
2535
+ bottomLeft: r({
2536
+ ...Ot,
2537
+ bottom: "6px",
2538
+ left: "6px",
2539
+ width: e,
2540
+ height: e,
2541
+ borderBottom: `2px solid ${A("corner")}`,
2542
+ borderLeft: `2px solid ${A("corner")}`,
2543
+ borderBottomLeftRadius: o.radiusSm
2544
+ }),
2545
+ bottomRight: r({
2546
+ ...Ot,
2547
+ bottom: "6px",
2548
+ right: "6px",
2549
+ width: e,
2550
+ height: e,
2551
+ borderBottom: `2px solid ${A("corner")}`,
2552
+ borderRight: `2px solid ${A("corner")}`,
2553
+ borderBottomRightRadius: o.radiusSm
2554
+ })
2555
+ }), kt = {
2556
+ ...qe,
2557
+ transform: "rotateY(180deg)",
2558
+ background: `linear-gradient(135deg, ${o.surface} 0%, ${A("surface-variant")} 40%, ${o.surface} 100%)`,
2559
+ border: A("back-border"),
2560
+ boxShadow: A("back-shadow")
2561
+ }, Y = {
2562
+ root: r({
2563
+ perspective: "1000px",
2564
+ transition: "opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease",
2565
+ position: "relative",
2566
+ flexShrink: 0
2567
+ }),
2568
+ inner: r({
2569
+ position: "relative",
2570
+ width: "100%",
2571
+ height: "100%",
2572
+ transformStyle: "preserve-3d",
2573
+ transformOrigin: "center center"
2574
+ }),
2575
+ front: Oe(!1),
2576
+ frontMobile: Oe(!0),
2577
+ corners: Ge("16px"),
2578
+ cornersMobile: Ge("12px"),
2579
+ logo: r({
2580
+ width: "auto",
2581
+ height: "auto",
2582
+ objectFit: "contain",
2583
+ zIndex: 3,
2584
+ filter: "drop-shadow(0 2px 8px rgba(0,0,0,0.15))",
2585
+ opacity: 0.85
2586
+ }),
2587
+ mystery: r({
2588
+ ...ht,
2589
+ fontFamily: o.fontPrimary,
2590
+ fontWeight: 900,
2591
+ color: A("mystery"),
2592
+ backgroundImage: A("mystery-bg"),
2593
+ backgroundClip: "text",
2594
+ WebkitBackgroundClip: "text",
2595
+ WebkitTextFillColor: "transparent",
2596
+ filter: "drop-shadow(0 2px 3px rgba(0,0,0,0.2))",
2597
+ zIndex: 3,
2598
+ userSelect: "none"
2599
+ }),
2600
+ back: r({ ...kt, padding: o.spaceSm, animation: "none" }),
2601
+ backMobile: r({ ...kt, padding: o.spaceXs, animation: "none" }),
2602
+ backWin: r({ ...kt, padding: o.spaceSm, animation: `${Fe} 1.5s ease-in-out infinite` }),
2603
+ backWinMobile: r({ ...kt, padding: o.spaceXs, animation: `${Fe} 1.5s ease-in-out infinite` }),
2604
+ backLose: r({ ...kt, padding: o.spaceSm, animation: `${Xe} ${A("lose-duration")} ease-in-out` }),
2605
+ backLoseMobile: r({ ...kt, padding: o.spaceXs, animation: `${Xe} ${A("lose-duration")} ease-in-out` }),
2606
+ label: r({
2607
+ ...ht,
2608
+ fontFamily: o.fontPrimary,
2609
+ fontWeight: 800,
2610
+ fontSize: "1.125rem",
2611
+ color: A("label"),
2612
+ textAlign: "center",
2613
+ wordBreak: "break-word",
2614
+ textTransform: "uppercase",
2615
+ letterSpacing: "0.05em",
2616
+ textShadow: A("label-shadow"),
2617
+ animation: `${Ye} 0.4s ease-out`
2618
+ }),
2619
+ labelMobile: r({
2620
+ ...ht,
2621
+ fontFamily: o.fontPrimary,
2622
+ fontWeight: 800,
2623
+ fontSize: "0.875rem",
2624
+ color: A("label"),
2625
+ textAlign: "center",
2626
+ wordBreak: "break-word",
2627
+ textTransform: "uppercase",
2628
+ letterSpacing: "0.05em",
2629
+ textShadow: A("label-shadow"),
2630
+ animation: `${Ye} 0.4s ease-out`
2631
+ }),
2632
+ burst: r({
2633
+ position: "absolute",
2634
+ top: "50%",
2635
+ left: "50%",
2636
+ width: 0,
2637
+ height: 0,
2638
+ borderRadius: "50%",
2639
+ background: A("burst"),
2640
+ animation: `${Gr} 0.8s ease-out forwards`,
2641
+ pointerEvents: "none",
2642
+ zIndex: 999
2643
+ })
2644
+ }, Nr = ({
2645
+ segment: e,
2646
+ index: l,
2647
+ selectedSegment: i,
2648
+ isFlipped: n,
2649
+ isOtherRevealed: c,
2650
+ shouldDim: b,
2651
+ isRevealed: m,
2652
+ showLoseAnimation: a,
2653
+ hasEntered: s,
2654
+ cardWidth: y,
2655
+ cardHeight: x,
2656
+ flipDuration: u,
2657
+ loseAnimationDuration: C,
2658
+ cardBaseColor: f,
2659
+ shimmerColor: d,
2660
+ primaryColor: h,
2661
+ contentColor: D,
2662
+ dangerColor: $,
2663
+ borderColor: v,
2664
+ brandingLogo: M,
2665
+ compactCards: L,
2666
+ onPick: z
2667
+ }) => {
2668
+ var G;
2669
+ const w = ct(), k = pt(), T = wt(), p = e.color || h, S = v || p, W = k.palette.success.plainColor, R = n && m, X = R && !!(i != null && i.isWinning), O = X || c && e.isWinning, q = R && i ? i.isWinning ? W : $ : c ? e.isWinning ? W : $ : k.outlineEnabledBorder, J = {
2670
+ ...T,
2671
+ "--fu-ucrc-cg-card-surface-variant": k.surfaceVariant,
2672
+ "--fu-ucrc-cg-card-float-y": w ? "-1px" : "-3px",
2673
+ "--fu-ucrc-cg-card-float-scale": w ? 1.003 : 1.008,
2674
+ "--fu-ucrc-cg-card-float-delay": `${l * 0.15}s`,
2675
+ "--fu-ucrc-cg-card-shimmer-delay": `${l * 0.5}s`,
2676
+ "--fu-ucrc-cg-card-front-bg": `linear-gradient(145deg, ${p}10 0%, ${p}18 30%, ${f} 50%, ${p}12 70%, ${p}22 100%)`,
2677
+ "--fu-ucrc-cg-card-front-border": `2px solid ${S}`,
2678
+ "--fu-ucrc-cg-card-front-outline": `1px solid ${S}30`,
2679
+ "--fu-ucrc-cg-card-front-shadow": `0 1px 2px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.12), 0 12px 24px rgba(0,0,0,0.18), 0 0 0 1px ${p}15, inset 0 1px 0 ${d}4D, inset 0 -1px 0 rgba(0,0,0,0.05)`,
2680
+ "--fu-ucrc-cg-card-front-hover-shadow": `0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.15), 0 20px 40px ${p}35, 0 0 20px ${p}20`,
2681
+ "--fu-ucrc-cg-card-after-bg": `linear-gradient(125deg, transparent 0%, transparent 40%, ${d}59 45%, ${d}1A 50%, transparent 55%, transparent 100%)`,
2682
+ "--fu-ucrc-cg-card-before-bg": `linear-gradient(90deg, transparent 0%, ${d}08 25%, ${d}1F 50%, ${d}08 75%, transparent 100%)`,
2683
+ "--fu-ucrc-cg-card-corner": `${p}60`,
2684
+ // The "?" is gradient-filled; its own colour is Joy's text.primary, as it was.
2685
+ "--fu-ucrc-cg-card-mystery": (G = k.palette.text) == null ? void 0 : G.primary,
2686
+ "--fu-ucrc-cg-card-mystery-bg": `linear-gradient(180deg, ${p} 0%, ${p}BB 40%, ${p}DD 60%, ${p} 100%)`,
2687
+ "--fu-ucrc-cg-card-back-border": `3px solid ${q}`,
2688
+ "--fu-ucrc-cg-card-back-shadow": R && i ? i.isWinning ? `0 0 10px ${W}60, 0 0 30px ${W}30, 0 8px 24px ${W}40, inset 0 0 20px ${W}10` : `0 8px 24px ${$}60` : "0 4px 12px rgba(0,0,0,0.15)",
2689
+ "--fu-ucrc-cg-card-win-glow-1": `0 0 10px ${W}60, 0 0 30px ${W}30, 0 8px 24px ${W}40`,
2690
+ "--fu-ucrc-cg-card-win-glow-2": `0 0 20px ${W}80, 0 0 50px ${W}50, 0 8px 24px ${W}60`,
2691
+ "--fu-ucrc-cg-card-lose-0": `0 0 0 ${$}00`,
2692
+ "--fu-ucrc-cg-card-lose-10": `0 0 20px ${$}50`,
2693
+ "--fu-ucrc-cg-card-lose-40": `0 0 30px ${$}60`,
2694
+ "--fu-ucrc-cg-card-lose-70": `0 0 10px ${$}30`,
2695
+ "--fu-ucrc-cg-card-lose-100": `0 8px 24px ${$}60`,
2696
+ "--fu-ucrc-cg-card-lose-duration": `${C}ms`,
2697
+ "--fu-ucrc-cg-card-label": O ? W : D,
2698
+ "--fu-ucrc-cg-card-label-shadow": O ? `0 0 10px ${W}40` : "none",
2699
+ "--fu-ucrc-cg-card-burst": `radial-gradient(circle, ${W}40 0%, transparent 70%)`,
2700
+ width: `${y}px`,
2701
+ height: `${x}px`,
2702
+ cursor: m ? "default" : "pointer",
2703
+ opacity: b ? 0.4 : c ? 0.65 : 1,
2704
+ transform: b ? "scale(0.95) translateY(4px)" : c ? "scale(0.95)" : "none",
2705
+ filter: b ? "grayscale(0.5)" : c ? "grayscale(0.3)" : "none"
2706
+ }, F = R && !!i;
2707
+ return /* @__PURE__ */ g("div", { css: Y.root, style: J, onClick: () => !m && z(), children: [
2708
+ /* @__PURE__ */ g(
2709
+ "div",
2710
+ {
2711
+ css: Y.inner,
2712
+ style: {
2713
+ transition: `transform ${u}ms cubic-bezier(0.4, 0.0, 0.2, 1.1)`,
2714
+ transform: n || c ? "rotateY(180deg)" : "rotateY(0deg)"
2715
+ },
2716
+ children: [
2717
+ /* @__PURE__ */ g(
2718
+ "div",
2719
+ {
2720
+ css: w ? m ? Y.frontMobile.revealed : s ? Y.frontMobile.floating : Y.frontMobile.idle : m ? Y.front.revealed : s ? Y.front.floating : Y.front.idle,
2721
+ children: [
2722
+ /* @__PURE__ */ g(
2723
+ "svg",
2724
+ {
2725
+ style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%", opacity: 0.1 },
2726
+ xmlns: "http://www.w3.org/2000/svg",
2727
+ children: [
2728
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ g("pattern", { id: `card-pattern-${l}`, x: "0", y: "0", width: "50", height: "50", patternUnits: "userSpaceOnUse", children: [
2729
+ /* @__PURE__ */ t("path", { d: "M 25 8 L 33 25 L 25 42 L 17 25 Z", fill: p, opacity: "0.8" }),
2730
+ /* @__PURE__ */ t("path", { d: "M 5 5 Q 14 5 14 14", stroke: p, fill: "none", strokeWidth: "1", opacity: "0.5" }),
2731
+ /* @__PURE__ */ t("path", { d: "M 45 5 Q 36 5 36 14", stroke: p, fill: "none", strokeWidth: "1", opacity: "0.5" }),
2732
+ /* @__PURE__ */ t("path", { d: "M 5 45 Q 14 45 14 36", stroke: p, fill: "none", strokeWidth: "1", opacity: "0.5" }),
2733
+ /* @__PURE__ */ t("path", { d: "M 45 45 Q 36 45 36 36", stroke: p, fill: "none", strokeWidth: "1", opacity: "0.5" }),
2734
+ /* @__PURE__ */ t("circle", { cx: "5", cy: "5", r: "1.5", fill: p, opacity: "0.4" }),
2735
+ /* @__PURE__ */ t("circle", { cx: "45", cy: "5", r: "1.5", fill: p, opacity: "0.4" }),
2736
+ /* @__PURE__ */ t("circle", { cx: "5", cy: "45", r: "1.5", fill: p, opacity: "0.4" }),
2737
+ /* @__PURE__ */ t("circle", { cx: "45", cy: "45", r: "1.5", fill: p, opacity: "0.4" })
2738
+ ] }) }),
2739
+ /* @__PURE__ */ t("rect", { width: "100%", height: "100%", fill: `url(#card-pattern-${l})` })
2740
+ ]
2741
+ }
2742
+ ),
2743
+ /* @__PURE__ */ t("div", { css: w ? Y.cornersMobile.topLeft : Y.corners.topLeft }),
2744
+ /* @__PURE__ */ t("div", { css: w ? Y.cornersMobile.topRight : Y.corners.topRight }),
2745
+ /* @__PURE__ */ t("div", { css: w ? Y.cornersMobile.bottomLeft : Y.corners.bottomLeft }),
2746
+ /* @__PURE__ */ t("div", { css: w ? Y.cornersMobile.bottomRight : Y.corners.bottomRight }),
2747
+ M ? /* @__PURE__ */ t(
2748
+ "img",
2749
+ {
2750
+ src: M,
2751
+ alt: "Logo",
2752
+ css: Y.logo,
2753
+ style: {
2754
+ maxWidth: L ? w ? "55px" : "80px" : w ? "70px" : "100px",
2755
+ maxHeight: L ? w ? "30px" : "42px" : w ? "40px" : "55px"
2756
+ }
2757
+ }
2758
+ ) : /* @__PURE__ */ t(
2759
+ "h1",
2760
+ {
2761
+ css: Y.mystery,
2762
+ style: {
2763
+ fontSize: L ? w ? "1.75rem" : "2.5rem" : w ? "2.5rem" : "3.5rem"
2764
+ },
2765
+ children: "?"
2766
+ }
2767
+ )
2768
+ ]
2769
+ }
2770
+ ),
2771
+ /* @__PURE__ */ t(
2772
+ "div",
2773
+ {
2774
+ css: F && (i != null && i.isWinning) ? w ? Y.backWinMobile : Y.backWin : F && a ? w ? Y.backLoseMobile : Y.backLose : w ? Y.backMobile : Y.back,
2775
+ children: (i || c) && /* @__PURE__ */ t("h3", { css: w ? Y.labelMobile : Y.label, children: c ? e.label : i == null ? void 0 : i.label })
2776
+ }
2777
+ )
2778
+ ]
2779
+ }
2780
+ ),
2781
+ X && /* @__PURE__ */ t("div", { css: Y.burst })
2782
+ ] });
2783
+ }, It = (e) => `var(--fu-ucrc-cg-pick-${e})`, Tt = { display: "flex", flexDirection: "column" }, je = {
2784
+ ...ht,
2785
+ fontFamily: o.fontPrimary,
2786
+ fontWeight: 700,
2787
+ fontSize: "1.25rem",
2788
+ color: o.content,
2789
+ lineHeight: 1.2
2790
+ }, _e = { flex: "0 0 42%", ...Tt, gap: o.spaceMd, alignItems: "center", alignSelf: "stretch" }, Pe = {
2791
+ paddingInline: o.spaceLg,
2792
+ paddingBlock: o.spaceSm,
2793
+ fontFamily: o.fontPrimary,
2794
+ fontWeight: 700,
2795
+ textTransform: "uppercase",
2796
+ letterSpacing: "0.5px",
2797
+ borderRadius: o.radiusXl,
2798
+ borderColor: o.border,
2799
+ color: o.content,
2800
+ transition: "all 300ms cubic-bezier(0.2, 0, 0, 1)",
2801
+ "&:hover": { borderColor: o.primary, backgroundColor: "transparent", color: o.primary }
2802
+ }, P = {
2803
+ root: r({
2804
+ ...Tt,
2805
+ width: "100%",
2806
+ padding: o.spaceMd,
2807
+ gap: o.spaceMd,
2808
+ alignItems: "center",
2809
+ position: "relative",
2810
+ overflow: "hidden",
2811
+ boxSizing: "border-box"
2812
+ }),
2813
+ titleBlock: r({ ...Tt, gap: 0, alignItems: "center", textAlign: "center", width: "100%", zIndex: 1 }),
2814
+ title: r(je),
2815
+ titleDecorated: r({ ...je, textShadow: `0 0 20px ${It("dc-20")}, 0 0 40px ${It("dc-10")}` }),
2816
+ ornament: r({ display: "flex", alignItems: "center", gap: "8px", marginTop: "4px" }),
2817
+ ornamentLineIn: r({ width: "40px", height: "1px", background: `linear-gradient(90deg, transparent, ${It("dc-40")})` }),
2818
+ ornamentLineOut: r({ width: "40px", height: "1px", background: `linear-gradient(90deg, ${It("dc-40")}, transparent)` }),
2819
+ ornamentDiamond: r({ width: "6px", height: "6px", transform: "rotate(45deg)", background: It("dc-50") }),
2820
+ subtitle: r({
2821
+ ...K,
2822
+ fontFamily: o.fontSecondary,
2823
+ fontWeight: 400,
2824
+ fontSize: "0.875rem",
2825
+ color: o.content,
2826
+ opacity: 0.8
2827
+ }),
2828
+ grid: r({
2829
+ marginInline: "auto",
2830
+ display: "grid",
2831
+ justifyContent: "center",
2832
+ position: "relative",
2833
+ perspective: "1200px",
2834
+ zIndex: 1
2835
+ }),
2836
+ cell: r({ display: "flex", justifyContent: "center", alignItems: "center" }),
2837
+ reset: r(Ct, Pe, { fontSize: "0.875rem" }),
2838
+ resetMobile: r(Ct, Pe, { fontSize: "0.75rem" }),
2839
+ row: r({ display: "flex", flexDirection: "row", width: "100%", gap: o.spaceXl, alignItems: "center", zIndex: 1 }),
2840
+ textColumn: r({ ..._e, justifyContent: "flex-start" }),
2841
+ textColumnCentered: r({ ..._e, justifyContent: "center" }),
2842
+ welcome: r({
2843
+ ...K,
2844
+ fontFamily: o.fontPrimary,
2845
+ fontWeight: 400,
2846
+ fontSize: "0.875rem",
2847
+ color: o.content,
2848
+ textAlign: "center",
2849
+ zIndex: 1
2850
+ }),
2851
+ instructions: r({
2852
+ ...K,
2853
+ fontFamily: o.fontSecondary,
2854
+ fontWeight: 400,
2855
+ fontSize: "0.875rem",
2856
+ color: o.content,
2857
+ opacity: 0.7,
2858
+ textAlign: "center",
2859
+ zIndex: 1
2860
+ }),
2861
+ footer: r({ marginTop: "auto", ...Tt, alignItems: "center", width: "100%" }),
2862
+ disclaimer: r({
2863
+ ...K,
2864
+ fontFamily: o.fontSecondary,
2865
+ fontWeight: 400,
2866
+ fontSize: "0.625rem",
2867
+ color: o.content,
2868
+ opacity: 0.7,
2869
+ textAlign: "center",
2870
+ maxWidth: "900px",
2871
+ lineHeight: 1.4,
2872
+ zIndex: 1
2873
+ }),
2874
+ gridColumn: r({ flex: "0 0 58%", display: "flex", alignItems: "center", justifyContent: "center" }),
2875
+ stack: r({ ...Tt, width: "100%", gap: o.spaceSm, alignItems: "center", zIndex: 1 })
2876
+ }, Vr = ({
2877
+ infoPage: e,
2878
+ enableReset: l = !1,
2879
+ contentColor: i,
2880
+ primaryColor: n,
2881
+ onPrimaryColor: c,
2882
+ borderColor: b,
2883
+ dangerColor: m,
2884
+ cardBaseColor: a,
2885
+ shimmerColor: s,
2886
+ brandingLogo: y = "",
2887
+ isDark: x = !1,
2888
+ forceMobile: u = !1
2889
+ }) => {
2890
+ var re, oe, ne, ie;
2891
+ const C = ct(), f = u ? !1 : qt(), d = pt(), h = wt(), D = a || d.surface, $ = s || n, v = JSON.parse(e.body), M = v.segments || [], L = e.labels || {}, z = v.mode || ((re = v.config) == null ? void 0 : re.mode) || "fair", w = ((oe = v.config) == null ? void 0 : oe.pace) || "normal", k = ((ne = v.config) == null ? void 0 : ne.revealAll) ?? !1, T = ((ie = v.config) == null ? void 0 : ie.decorations) ?? !1, p = M.some((zt) => {
2892
+ var gt;
2893
+ return (gt = zt.images) == null ? void 0 : gt.idle;
2894
+ }), S = yt(n, x), W = !!(L.welcome || L.instructions || L.disclaimer), R = f ? 110 : 80, X = f ? 143 : 104, O = f ? 130 : 90, q = f ? "32px" : "16px", J = f ? "32px" : "12px", {
2895
+ selectedSegment: F,
2896
+ displaySegments: G,
2897
+ revealResult: tt,
2898
+ showResultScreen: N,
2899
+ showInlineResult: Q,
2900
+ showLoseAnimation: et,
2901
+ hasEntered: rt,
2902
+ flippedCards: ft,
2903
+ crossfadedCards: ut,
2904
+ revealedOtherCards: nt,
2905
+ flipDuration: ot,
2906
+ crossfadeDuration: st,
2907
+ loseAnimationDuration: U,
2908
+ handlePick: lt,
2909
+ handleReset: Wt
2910
+ } = Br({ segments: M, mode: z, pace: w, revealAll: k }), mt = {
2911
+ ...h,
2912
+ "--fu-ucrc-cg-content": i,
2913
+ "--fu-ucrc-cg-primary": n,
2914
+ "--fu-ucrc-cg-border": b || d.outlineEnabledBorder,
2915
+ "--fu-ucrc-cg-pick-dc-10": S("10"),
2916
+ "--fu-ucrc-cg-pick-dc-20": S("20"),
2917
+ "--fu-ucrc-cg-pick-dc-40": S("40"),
2918
+ "--fu-ucrc-cg-pick-dc-50": S("50")
2919
+ }, Bt = () => !e.title && !e.subtitle ? null : /* @__PURE__ */ g("div", { css: P.titleBlock, children: [
2920
+ e.title && /* @__PURE__ */ g(at, { children: [
2921
+ /* @__PURE__ */ t("h2", { css: T ? P.titleDecorated : P.title, children: e.title }),
2922
+ T && /* @__PURE__ */ g("div", { css: P.ornament, children: [
2923
+ /* @__PURE__ */ t("div", { css: P.ornamentLineIn }),
2924
+ /* @__PURE__ */ t("div", { css: P.ornamentDiamond }),
2925
+ /* @__PURE__ */ t("div", { css: P.ornamentLineOut })
2926
+ ] })
2927
+ ] }),
2928
+ e.subtitle && /* @__PURE__ */ t("p", { css: P.subtitle, children: e.subtitle })
2929
+ ] }), xt = () => /* @__PURE__ */ t(
2930
+ "div",
2931
+ {
2932
+ css: P.grid,
2933
+ style: {
2934
+ gridTemplateColumns: `repeat(3, ${p ? O : R}px)`,
2935
+ rowGap: q,
2936
+ columnGap: J
2937
+ },
2938
+ children: (G ?? M).map((zt, gt) => {
2939
+ const _t = `card-${gt}`, Ft = F !== null, ae = ft.has(_t), Xt = nt.has(_t), Je = Ft && !ae && !Xt, se = ut.has(_t), Qe = Ft && !se && !Xt;
2940
+ return /* @__PURE__ */ t(
2941
+ "div",
2942
+ {
2943
+ css: P.cell,
2944
+ style: {
2945
+ opacity: rt ? 1 : 0,
2946
+ transform: rt ? "translateY(0) scale(1) rotateX(0deg)" : "translateY(30px) scale(0.9) rotateX(10deg)",
2947
+ transition: `all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${gt * 100}ms`
2948
+ },
2949
+ children: p ? /* @__PURE__ */ t(
2950
+ Yr,
2951
+ {
2952
+ segment: zt,
2953
+ index: gt,
2954
+ selectedSegment: F,
2955
+ revealResult: tt,
2956
+ isCrossfaded: se,
2957
+ isOtherRevealed: Xt,
2958
+ shouldDim: Qe,
2959
+ isRevealed: Ft,
2960
+ hasEntered: rt,
2961
+ objectSize: O,
2962
+ crossfadeDuration: st,
2963
+ isStandard: !1,
2964
+ primaryColor: n,
2965
+ dangerColor: m,
2966
+ onPick: () => lt(gt, !0)
2967
+ }
2968
+ ) : /* @__PURE__ */ t(
2969
+ Nr,
2970
+ {
2971
+ segment: zt,
2972
+ index: gt,
2973
+ selectedSegment: F,
2974
+ isFlipped: ae,
2975
+ isOtherRevealed: Xt,
2976
+ shouldDim: Je,
2977
+ isRevealed: Ft,
2978
+ showLoseAnimation: et,
2979
+ hasEntered: rt,
2980
+ cardWidth: R,
2981
+ cardHeight: X,
2982
+ flipDuration: ot,
2983
+ loseAnimationDuration: U,
2984
+ cardBaseColor: D,
2985
+ shimmerColor: $,
2986
+ primaryColor: n,
2987
+ contentColor: i,
2988
+ dangerColor: m,
2989
+ borderColor: b,
2990
+ brandingLogo: y,
2991
+ compactCards: !0,
2992
+ onPick: () => lt(gt, !1)
2993
+ }
2994
+ )
2995
+ },
2996
+ zt.id
2997
+ );
2998
+ })
2999
+ }
3000
+ ), $t = l && Q && /* @__PURE__ */ t("button", { type: "button", css: C ? P.resetMobile : P.reset, onClick: Wt, children: "Reset Game" }), Rt = Q && (F == null ? void 0 : F.results) && /* @__PURE__ */ t(
3001
+ Mt,
3002
+ {
3003
+ result: F.results,
3004
+ variant: "embed",
3005
+ mode: "inline",
3006
+ contentColor: i,
3007
+ primaryColor: n,
3008
+ onPrimaryColor: c,
3009
+ borderColor: b,
3010
+ showResetButton: !1,
3011
+ raised: !0
3012
+ }
3013
+ ), Kt = L.welcome && /* @__PURE__ */ t("p", { css: P.welcome, children: L.welcome }), te = !Q && L.instructions && /* @__PURE__ */ t("p", { css: P.instructions, children: L.instructions }), ee = L.disclaimer && /* @__PURE__ */ t("p", { css: P.disclaimer, children: L.disclaimer });
3014
+ return /* @__PURE__ */ g("div", { css: P.root, style: mt, children: [
3015
+ T && /* @__PURE__ */ t(Ve, { primaryColor: n, isDark: x, animationPrefix: "casino" }),
3016
+ N && (F == null ? void 0 : F.results) && /* @__PURE__ */ t(
3017
+ Mt,
3018
+ {
3019
+ result: F.results,
3020
+ variant: "embed",
3021
+ mode: "screen",
3022
+ contentColor: i,
3023
+ primaryColor: n,
3024
+ onPrimaryColor: c,
3025
+ borderColor: b,
3026
+ disclaimer: L.disclaimer,
3027
+ enableReset: l,
3028
+ onReset: Wt
3029
+ }
3030
+ ),
3031
+ !N && (f ? (
3032
+ // Desktop: text column beside the cards
3033
+ /* @__PURE__ */ g("div", { css: P.row, children: [
3034
+ /* @__PURE__ */ g("div", { css: W ? P.textColumn : P.textColumnCentered, children: [
3035
+ Bt(),
3036
+ Kt,
3037
+ te,
3038
+ Rt,
3039
+ $t,
3040
+ /* @__PURE__ */ t("div", { css: P.footer, children: ee })
3041
+ ] }),
3042
+ /* @__PURE__ */ t("div", { css: P.gridColumn, children: xt() })
3043
+ ] })
3044
+ ) : (
3045
+ // Mobile: one compact column
3046
+ /* @__PURE__ */ g("div", { css: P.stack, children: [
3047
+ Bt(),
3048
+ Kt,
3049
+ te,
3050
+ xt(),
3051
+ Rt,
3052
+ $t,
3053
+ ee
3054
+ ] })
3055
+ ))
3056
+ ] });
3057
+ }, He = {
3058
+ display: "flex",
3059
+ flexDirection: "column",
3060
+ width: "100%",
3061
+ height: "100%",
3062
+ position: "relative",
3063
+ overflow: "auto",
3064
+ boxSizing: "border-box",
3065
+ boxShadow: "inset 0 0 100px rgba(0, 0, 0, 0.04), inset 0 0 30px rgba(0, 0, 0, 0.02)"
3066
+ }, Ne = {
3067
+ root: r(He),
3068
+ decorated: r({ ...He, border: "1px solid var(--fu-ucrc-cg-pick-frame)", borderRadius: o.radiusLg })
3069
+ }, to = ({ infoPage: e, enableReset: l = !1, forceMobile: i = !1 }) => {
3070
+ var v, M, L, z, w, k, T, p, S, W, R;
3071
+ const n = i || ct(), c = pt(), b = wt(), m = Jt() === "dark", a = (v = e.branding) == null ? void 0 : v.colors, s = (a == null ? void 0 : a.primary_color) || c.palette.primary.plainColor, y = (a == null ? void 0 : a.content_color) || c.textPrimary, x = a == null ? void 0 : a.border_color, u = (a == null ? void 0 : a.background_color) || c.surface, C = c.palette.danger.plainColor, f = ((M = JSON.parse(e.body).config) == null ? void 0 : M.decorations) ?? !1, d = n ? ((z = (L = e.branding) == null ? void 0 : L.images) == null ? void 0 : z.mobile_background_image) || ((k = (w = e.branding) == null ? void 0 : w.images) == null ? void 0 : k.background_image) || ((T = e.images) == null ? void 0 : T.cover) : ((S = (p = e.branding) == null ? void 0 : p.images) == null ? void 0 : S.background_image) || ((W = e.images) == null ? void 0 : W.cover), h = (R = e.branding) == null ? void 0 : R.images, D = n ? (h == null ? void 0 : h.mobile_logo) || (h == null ? void 0 : h.main_logo) || "" : (h == null ? void 0 : h.main_logo) || "", $ = {
3072
+ ...b,
3073
+ "--fu-ucrc-cg-pick-frame": yt(s, m)("15"),
3074
+ background: d ? `url(${d}) center/cover no-repeat` : `radial-gradient(ellipse at 50% 40%, ${s}12 0%, transparent 60%), radial-gradient(ellipse at 50% 100%, ${s}08 0%, transparent 50%), ${u}`
3075
+ };
3076
+ return /* @__PURE__ */ t("div", { css: f ? Ne.decorated : Ne.root, style: $, children: /* @__PURE__ */ t(
3077
+ Vr,
3078
+ {
3079
+ infoPage: e,
3080
+ enableReset: l,
3081
+ contentColor: y,
3082
+ primaryColor: s,
3083
+ onPrimaryColor: c.palette.primary.onPrimary,
3084
+ borderColor: x || void 0,
3085
+ backgroundColor: u,
3086
+ dangerColor: C,
3087
+ cardBaseColor: u,
3088
+ shimmerColor: s,
3089
+ brandingLogo: D,
3090
+ backgroundImage: d || void 0,
3091
+ isDark: m,
3092
+ forceMobile: i
3093
+ }
3094
+ ) });
3095
+ };
3096
+ export {
3097
+ br as C,
3098
+ Ve as D,
3099
+ Nr as F,
3100
+ Yr as O,
3101
+ Qr as P,
3102
+ Mt as S,
3103
+ o as V,
3104
+ wr as W,
3105
+ to as a,
3106
+ Kr as b,
3107
+ K as c,
3108
+ Lt as d,
3109
+ ar as e,
3110
+ yt as f,
3111
+ $r as g,
3112
+ ht as h,
3113
+ Sr as i,
3114
+ Br as j,
3115
+ Ct as o,
3116
+ wt as u
3117
+ };