fansunited-frontend-components 1.1.1 → 1.3.0

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 (54) hide show
  1. package/BattleOfFans.js +427 -404
  2. package/Betslip.js +2 -2
  3. package/ChanceGame.js +1 -1
  4. package/ClassicQuizPlay.js +2 -2
  5. package/CollectLead.js +1 -1
  6. package/CompetitionStatistics.js +1 -1
  7. package/CompetitorCard.js +1 -1
  8. package/Discussion.js +1 -1
  9. package/EitherOrPlay.js +2 -2
  10. package/EventCard.js +1 -1
  11. package/EventGamePlay.js +2 -2
  12. package/Leaderboard.js +1 -1
  13. package/List.js +4 -4
  14. package/MatchQuizPlay.js +2 -2
  15. package/Odds.js +1 -1
  16. package/PersonalityQuizPlay.js +2 -2
  17. package/PickThePair.js +1 -1
  18. package/PlayerOfTheMatch.js +805 -857
  19. package/PollVote.js +2 -2
  20. package/Predictor.js +1576 -1569
  21. package/ProfileStats.d.ts +4 -0
  22. package/ProfileStats.d.ts.map +1 -0
  23. package/ProfileStats.js +2781 -0
  24. package/README.md +101 -2
  25. package/Standings.js +1 -1
  26. package/TopX.js +722 -715
  27. package/chunks/index-CLJiQKNv.js +4 -0
  28. package/chunks/index-D6-V3WrE.js +4 -0
  29. package/chunks/index-Dt38wFLo.js +4 -0
  30. package/chunks/index-Ehvd1Qmz.js +4 -0
  31. package/chunks/index-QtarvzAb.js +4 -0
  32. package/chunks/index-kffkFNES.js +4 -0
  33. package/chunks/{main-P2WNvBZE.js → main-8Yt_jn04.js} +402 -392
  34. package/chunks/{main-DdL0UekL.js → main-BnuQygIM.js} +1853 -1783
  35. package/chunks/main-BpGmqCTf.js +2142 -0
  36. package/chunks/main-C0PSUCR_.js +3027 -0
  37. package/chunks/{main-LEE8n2cG.js → main-CfdOHNHz.js} +1268 -1203
  38. package/chunks/{main-D_QDfmAw.js → main-PpLP-LeG.js} +1797 -1753
  39. package/chunks/{main-C7X4dM_P.js → main-p1Qbq-Fw.js} +1532 -1483
  40. package/chunks/{withVersionStamp-CzdDF1rG.js → withVersionStamp-BOktiTgW.js} +1 -1
  41. package/components.d.ts +2 -1
  42. package/components.d.ts.map +1 -1
  43. package/index.d.ts +1 -0
  44. package/index.d.ts.map +1 -1
  45. package/index.js +11 -9
  46. package/package.json +6 -2
  47. package/chunks/index-BNl8scz6.js +0 -4
  48. package/chunks/index-CSa2JU4m.js +0 -4
  49. package/chunks/index-Cd1dg0KI.js +0 -4
  50. package/chunks/index-Cei2fzi7.js +0 -4
  51. package/chunks/index-Cxb4wEJU.js +0 -4
  52. package/chunks/index-w1LGN5dz.js +0 -4
  53. package/chunks/main-07vzblS8.js +0 -2091
  54. package/chunks/main-DmBfwyb4.js +0 -2992
@@ -1,17 +1,17 @@
1
- import { jsx as n, jsxs as v, Fragment as ke } from "@emotion/react/jsx-runtime";
2
- import { DirectionalIcon as st, onImageError as Fe, cdnAssets as Q, useIsRtl as zo, bidiIsolateAuto as Qt, extractSdkError as We, useDisableCache as To, hexToRgb as Io, useColors as Do } from "fansunited-frontend-core";
3
- import { BODY_FONT as Ro, space as ce, radius as we, useBreakpointUp as Z, Avatar as Po, Notification as _o, baseBody as Ao, baseHeading as Mo, Spinner as Bo, WidgetPortal as Eo } from "fansunited-frontend-core/ui/emotion";
1
+ import { jsxs as y, Fragment as Se, jsx as n } from "@emotion/react/jsx-runtime";
2
+ import { DirectionalIcon as at, onImageError as We, cdnAssets as Q, useIsRtl as Co, bidiIsolateAuto as Gt, extractSdkError as Le, useDisableCache as $o, hexToRgb as ko, useColors as To } from "fansunited-frontend-core";
3
+ import { BODY_FONT as zo, space as ce, radius as xe, useBreakpointUp as Z, Avatar as Io, Notification as Do, baseBody as Ro, baseHeading as Po, Spinner as _o, BrandedArea as Mo, WidgetPortal as Ao } from "fansunited-frontend-core/ui/emotion";
4
4
  import { useTranslation as G } from "react-i18next";
5
- import { useRef as $e, useEffect as U, useState as I, useMemo as Ce } from "react";
5
+ import { useRef as Ce, useEffect as U, useState as I, useMemo as we } from "react";
6
+ import { ChevronLeftIcon as Bo, ChevronRightIcon as Eo, StarIcon as Ke, SearchIcon as Lo, CloseIcon as Wo, FilterAltIcon as st, AccessTimeIcon as Yt, HowToVoteIcon as Fo, CheckCircleIcon as Ho } from "fansunited-frontend-core/ui/icons";
6
7
  import { css as r } from "@emotion/react";
7
- import { ChevronLeftIcon as Lo, ChevronRightIcon as Wo, StarIcon as Qe, SearchIcon as Fo, CloseIcon as Ho, FilterAltIcon as lt, AccessTimeIcon as qt, HowToVoteIcon as Oo, CheckCircleIcon as No } from "fansunited-frontend-core/ui/icons";
8
- import { X as Xo } from "fansunited-frontend-core/ui/icons/lucide";
9
- import { w as Vo } from "./chunks/withVersionStamp-CzdDF1rG.js";
8
+ import { X as Oo } from "fansunited-frontend-core/ui/icons/lucide";
9
+ import { w as No } from "./chunks/withVersionStamp-BOktiTgW.js";
10
10
  const e = {
11
11
  fontPrimary: "var(--fu-ucrc-font-primary)",
12
12
  fontSecondary: "var(--fu-ucrc-font-secondary)",
13
13
  /** Joy's body stack, for text that set no font family. */
14
- fontBody: Ro,
14
+ fontBody: zo,
15
15
  space3xs: ce("3xs"),
16
16
  space2xs: ce("2xs"),
17
17
  spaceXs: ce("xs"),
@@ -19,11 +19,11 @@ const e = {
19
19
  spaceMd: ce("md"),
20
20
  spaceLg: ce("lg"),
21
21
  spaceXl: ce("xl"),
22
- radiusXs: we("xs"),
23
- radiusSm: we("sm"),
24
- radiusMd: we("md"),
25
- radiusLg: we("lg"),
26
- radiusFull: we("full"),
22
+ radiusXs: xe("xs"),
23
+ radiusSm: xe("sm"),
24
+ radiusMd: xe("md"),
25
+ radiusLg: xe("lg"),
26
+ radiusFull: xe("full"),
27
27
  borderSize: "var(--fu-ucrc-border-size)",
28
28
  surface: "var(--fu-ucrc-surface)",
29
29
  surfaceVariant: "var(--fu-ucrc-surface-variant)",
@@ -40,7 +40,7 @@ const e = {
40
40
  primarySoft: "var(--fu-ucrc-potm-primary-soft)",
41
41
  /** `r, g, b` of the primary colour, for `rgba(${V.primaryRgb}, alpha)`. */
42
42
  primaryRgb: "var(--fu-ucrc-potm-primary-rgb)"
43
- }, jo = {
43
+ }, Xo = {
44
44
  "primary-soft-hover-bg": ["#C7DFF7", "#12467B"],
45
45
  "primary-soft-active-color": ["#0A2744", "#E3EFFB"],
46
46
  "primary-soft-active-bg": ["#97C3F0", "#185EA5"],
@@ -54,12 +54,12 @@ const e = {
54
54
  "warning-outlined-border": ["#F3C896", "#492B08"],
55
55
  "warning-outlined-hover-bg": ["#FDF0E1", "#2E1B05"],
56
56
  "warning-outlined-active-bg": ["#FCE1C2", "#492B08"]
57
- }, ct = (t) => Object.fromEntries(
58
- Object.entries(jo).map(([o, i]) => [
57
+ }, lt = (t) => Object.fromEntries(
58
+ Object.entries(Xo).map(([o, i]) => [
59
59
  `--fu-ucrc-potm-${o}`,
60
60
  `var(--fu-ucrc-${o}, ${i[t]})`
61
61
  ])
62
- ), Uo = r({ ...ct(0), ".dark &": ct(1) }), L = (t) => `var(--fu-ucrc-${t})`, K = (t) => `var(--fu-ucrc-potm-${t})`, y = {
62
+ ), Vo = r({ ...lt(0), ".dark &": lt(1) }), L = (t) => `var(--fu-ucrc-${t})`, K = (t) => `var(--fu-ucrc-potm-${t})`, v = {
63
63
  focus: L("focus-visible"),
64
64
  textSecondary: L("palette-text-secondary"),
65
65
  textIcon: L("palette-text-icon"),
@@ -94,12 +94,12 @@ const e = {
94
94
  warningOutlinedBorder: K("warning-outlined-border"),
95
95
  warningOutlinedHoverBg: K("warning-outlined-hover-bg"),
96
96
  warningOutlinedActiveBg: K("warning-outlined-active-bg")
97
- }, ve = { xs: "2px", sm: "6px", md: "8px", cardChild: "3.5px" }, P = {
97
+ }, ke = { xs: "2px", sm: "6px", md: "8px", cardChild: "3.5px" }, P = {
98
98
  margin: 0,
99
99
  display: "block",
100
100
  fontFamily: e.fontBody,
101
101
  lineHeight: 1.5
102
- }, Jt = {
102
+ }, Kt = {
103
103
  boxSizing: "border-box",
104
104
  margin: 0,
105
105
  font: "inherit",
@@ -107,9 +107,9 @@ const e = {
107
107
  userSelect: "none",
108
108
  textDecoration: "none",
109
109
  WebkitTapHighlightColor: "transparent",
110
- "&:focus-visible": { outline: `2px solid ${y.focus}`, outlineOffset: "2px" }
111
- }, nt = (t) => ({
112
- ...Jt,
110
+ "&:focus-visible": { outline: `2px solid ${v.focus}`, outlineOffset: "2px" }
111
+ }, ot = (t) => ({
112
+ ...Kt,
113
113
  position: "relative",
114
114
  display: "inline-flex",
115
115
  alignItems: "center",
@@ -117,56 +117,56 @@ const e = {
117
117
  minHeight: t === "sm" ? "32px" : "36px",
118
118
  padding: t === "sm" ? "4px 12px" : "6px 16px",
119
119
  border: "none",
120
- borderRadius: ve.sm,
120
+ borderRadius: ke.sm,
121
121
  fontWeight: 600,
122
122
  lineHeight: 1.5,
123
123
  "&:disabled": { pointerEvents: "none", cursor: "default" }
124
- }), be = {
124
+ }), he = {
125
125
  softPrimary: {
126
126
  "--Icon-color": "currentColor",
127
- color: y.primarySoftColor,
128
- backgroundColor: y.primarySoftBg,
129
- "@media (hover: hover)": { "&:hover": { backgroundColor: y.primarySoftHoverBg } },
130
- "&:active": { color: y.primarySoftActiveColor, backgroundColor: y.primarySoftActiveBg }
127
+ color: v.primarySoftColor,
128
+ backgroundColor: v.primarySoftBg,
129
+ "@media (hover: hover)": { "&:hover": { backgroundColor: v.primarySoftHoverBg } },
130
+ "&:active": { color: v.primarySoftActiveColor, backgroundColor: v.primarySoftActiveBg }
131
131
  },
132
132
  softNeutral: {
133
133
  "--Icon-color": "currentColor",
134
- color: y.neutralSoftColor,
135
- backgroundColor: y.neutralSoftBg,
136
- "@media (hover: hover)": { "&:hover": { backgroundColor: y.neutralSoftHoverBg } },
137
- "&:active": { color: y.neutralSoftActiveColor, backgroundColor: y.neutralSoftActiveBg }
134
+ color: v.neutralSoftColor,
135
+ backgroundColor: v.neutralSoftBg,
136
+ "@media (hover: hover)": { "&:hover": { backgroundColor: v.neutralSoftHoverBg } },
137
+ "&:active": { color: v.neutralSoftActiveColor, backgroundColor: v.neutralSoftActiveBg }
138
138
  },
139
139
  outlinedNeutral: {
140
- "--Icon-color": y.textIcon,
141
- color: y.neutralOutlinedColor,
142
- border: `1px solid ${y.neutralOutlinedBorder}`,
143
- "@media (hover: hover)": { "&:hover": { backgroundColor: y.neutralOutlinedHoverBg } },
144
- "&:active": { backgroundColor: y.neutralOutlinedActiveBg }
140
+ "--Icon-color": v.textIcon,
141
+ color: v.neutralOutlinedColor,
142
+ border: `1px solid ${v.neutralOutlinedBorder}`,
143
+ "@media (hover: hover)": { "&:hover": { backgroundColor: v.neutralOutlinedHoverBg } },
144
+ "&:active": { backgroundColor: v.neutralOutlinedActiveBg }
145
145
  }
146
- }, Zt = {
147
- ...Jt,
146
+ }, Qt = {
147
+ ...Kt,
148
148
  lineHeight: "normal",
149
149
  // IconButton never set one, so the UA button's applied
150
150
  display: "inline-flex",
151
151
  alignItems: "center",
152
152
  justifyContent: "center",
153
153
  border: "none",
154
- borderRadius: ve.sm,
154
+ borderRadius: ke.sm,
155
155
  fontWeight: 500,
156
156
  backgroundColor: "transparent",
157
- color: y.neutralPlainColor,
158
- "--Icon-color": y.textIcon,
157
+ color: v.neutralPlainColor,
158
+ "--Icon-color": v.textIcon,
159
159
  "@media (hover: hover)": {
160
- "&:hover": { "--Icon-color": "currentColor", backgroundColor: y.neutralPlainHoverBg, color: y.neutralPlainHoverColor }
160
+ "&:hover": { "--Icon-color": "currentColor", backgroundColor: v.neutralPlainHoverBg, color: v.neutralPlainHoverColor }
161
161
  },
162
- "&:active": { "--Icon-color": "currentColor", backgroundColor: y.neutralPlainActiveBg },
163
- "&:disabled": { pointerEvents: "none", cursor: "default", color: y.neutralPlainDisabledColor }
164
- }, eo = (t) => r({ display: "flex", marginRight: t }), ze = {
162
+ "&:active": { "--Icon-color": "currentColor", backgroundColor: v.neutralPlainActiveBg },
163
+ "&:disabled": { pointerEvents: "none", cursor: "default", color: v.neutralPlainDisabledColor }
164
+ }, qt = (t) => r({ display: "flex", marginRight: t }), $e = {
165
165
  teamButton: { margin: "0 0 0 -3px" },
166
166
  cta: { margin: "0 0 0 -4px" },
167
167
  chip: { margin: "0 0 0 -1.5px" },
168
168
  input: { margin: "0 0 0 calc(0.875em / -4)" }
169
- }, Go = {
169
+ }, jo = {
170
170
  display: "flex",
171
171
  alignItems: "center",
172
172
  justifyContent: "center",
@@ -174,61 +174,9 @@ const e = {
174
174
  overflow: "hidden",
175
175
  borderRadius: 0,
176
176
  lineHeight: 1
177
- }, dt = {
178
- position: "relative",
179
- width: "100%",
180
- backgroundPosition: "center center",
181
- // Always center the image
182
- backgroundRepeat: "no-repeat",
183
- overflow: "hidden",
184
- display: "flex",
185
- alignItems: "center",
186
- justifyContent: "center"
187
- }, ut = { position: "relative", zIndex: 2, height: "100%" }, fe = {
188
- // The image is 860px wide: on mobile it keeps its aspect ratio and fills the height, so the
189
- // sides get cut off but the centre 300px stays visible.
190
- area: r({ ...dt, backgroundSize: "auto 100%" }),
191
- areaSm: r({ ...dt, backgroundSize: "860px 150px" }),
192
- overlay: r({ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, background: "transparent", zIndex: 1 }),
193
- safeArea: r({ ...ut, width: "100%" }),
194
- safeAreaSm: r({ ...ut, width: "300px" }),
195
- link: r({
196
- display: "block",
197
- alignItems: "center",
198
- position: "relative",
199
- margin: 0,
200
- padding: 0,
201
- border: 0,
202
- borderRadius: ve.xs,
203
- outline: 0,
204
- backgroundColor: "transparent",
205
- fontFamily: e.fontBody,
206
- fontSize: "1em",
207
- lineHeight: 1.5,
208
- color: "rgba(var(--fu-ucrc-primary-main-channel) / 1)",
209
- textDecoration: "none",
210
- textUnderlineOffset: "0.15em",
211
- cursor: "pointer",
212
- WebkitTapHighlightColor: "transparent",
213
- "&:hover": { opacity: 0.95 },
214
- "&:focus-visible": { outline: "2px solid var(--fu-ucrc-focus-visible)", outlineOffset: "2px" }
215
- })
216
- }, Yo = ({ backgroundImage: t, link: o, height: i = "150px", minHeight: l = "150px" }) => {
217
- const p = Z("sm"), u = /* @__PURE__ */ v(
218
- "div",
219
- {
220
- css: p ? fe.areaSm : fe.area,
221
- style: { height: i, minHeight: l, backgroundImage: t ? `url(${t})` : "none" },
222
- children: [
223
- /* @__PURE__ */ n("div", { css: fe.overlay }),
224
- /* @__PURE__ */ n("div", { css: p ? fe.safeAreaSm : fe.safeArea })
225
- ]
226
- }
227
- );
228
- return o ? /* @__PURE__ */ n("a", { href: o, target: "_blank", rel: "noopener noreferrer", css: fe.link, children: u }) : u;
229
- }, to = "24.5em", oo = "@media (prefers-reduced-motion: reduce)", ie = {
177
+ }, Jt = "24.5em", Zt = "@media (prefers-reduced-motion: reduce)", ie = {
230
178
  // Joy Stack spacing: a top margin on every child after the first, not a gap.
231
- root: r(Uo, {
179
+ root: r(Vo, {
232
180
  display: "flex",
233
181
  flexDirection: "column",
234
182
  "& > :not(style):not(style)": { margin: 0 },
@@ -257,13 +205,13 @@ const e = {
257
205
  color: e.dim
258
206
  }),
259
207
  noResultsText: r(P, { color: "inherit", fontSize: "1em" }),
260
- clearFilters: r(nt("sm"), be.outlinedNeutral, {
208
+ clearFilters: r(ot("sm"), he.outlinedNeutral, {
261
209
  backgroundColor: "transparent",
262
210
  fontSize: "0.875em"
263
211
  }),
264
212
  container: r({
265
213
  position: "relative",
266
- height: to,
214
+ height: Jt,
267
215
  overflow: "visible",
268
216
  // Cards scale/translate outside the box
269
217
  width: "100%",
@@ -284,7 +232,7 @@ const e = {
284
232
  justifyContent: "center"
285
233
  }),
286
234
  hint: r(P, { color: e.tertiary, fontSize: "0.875em", textAlign: "center" })
287
- }, Ko = (t, o, i) => r(Zt, {
235
+ }, Uo = (t, o, i) => r(Qt, {
288
236
  position: "absolute",
289
237
  top: "50%",
290
238
  transform: "translateY(-50%)",
@@ -314,11 +262,11 @@ const e = {
314
262
  // The carousel handles ←/→ itself, so after a click the focused arrow would light up on
315
263
  // every key press. Joy never showed a ring here either (its focus var didn't resolve).
316
264
  "&:focus-visible": { outline: "none" }
317
- }), qe = {};
265
+ }), Qe = {};
318
266
  for (const t of ["left", "right"])
319
267
  for (const o of [!1, !0])
320
- for (const i of [!1, !0]) qe[`${t}|${o}|${i}`] = Ko(t, o, i);
321
- const Pe = {
268
+ for (const i of [!1, !0]) Qe[`${t}|${o}|${i}`] = Uo(t, o, i);
269
+ const Re = {
322
270
  // Static on purpose: a normal Stack sibling, so a tall card can't push over it.
323
271
  wrapper: r({
324
272
  display: "flex",
@@ -358,7 +306,7 @@ const Pe = {
358
306
  borderRadius: "0.125em",
359
307
  backgroundColor: e.primary,
360
308
  transition: "width 250ms ease-out",
361
- [oo]: { transition: "none" }
309
+ [Zt]: { transition: "none" }
362
310
  })
363
311
  }, ne = {
364
312
  bar: r({
@@ -404,7 +352,7 @@ const Pe = {
404
352
  }),
405
353
  separator: r(P, { display: "none", color: e.tertiary, fontSize: "0.8125em", opacity: 0.6 }),
406
354
  separatorShown: r(P, { color: e.tertiary, fontSize: "0.8125em", opacity: 0.6 })
407
- }, mt = {
355
+ }, ct = {
408
356
  display: "inline-flex",
409
357
  alignItems: "center",
410
358
  gap: e.space2xs,
@@ -420,9 +368,9 @@ const Pe = {
420
368
  fontFamily: e.fontPrimary,
421
369
  transition: "background-color 150ms ease",
422
370
  "&:hover": { backgroundColor: `rgba(${e.primaryRgb}, 0.18)` }
423
- }, _e = {
424
- pill: r(mt),
425
- pillStatic: r(mt, { cursor: "default", "&:hover": { backgroundColor: "inherit" } }),
371
+ }, Pe = {
372
+ pill: r(ct),
373
+ pillStatic: r(ct, { cursor: "default", "&:hover": { backgroundColor: "inherit" } }),
426
374
  text: r(P, {
427
375
  fontSize: "inherit",
428
376
  color: "inherit",
@@ -437,7 +385,7 @@ const Pe = {
437
385
  textDecoration: "underline",
438
386
  flexShrink: 0
439
387
  })
440
- }, je = {
388
+ }, Ve = {
441
389
  root: r({ position: "relative", width: "100%", fontSize: "1em" }),
442
390
  scroller: r({
443
391
  display: "flex",
@@ -473,7 +421,7 @@ const Pe = {
473
421
  fontSize: "1em",
474
422
  zIndex: 2
475
423
  })
476
- }, pt = (t) => r({
424
+ }, dt = (t) => r({
477
425
  position: "relative",
478
426
  flex: "0 0 auto",
479
427
  display: "flex",
@@ -495,11 +443,11 @@ const Pe = {
495
443
  outlineOffset: "0.125em",
496
444
  borderRadius: e.radiusXs
497
445
  },
498
- [oo]: {
446
+ [Zt]: {
499
447
  transition: "opacity 150ms ease",
500
448
  "&:hover": { opacity: 1, transform: "none" }
501
449
  }
502
- }), ft = { lit: pt(!0), dim: pt(!1) }, Qo = (t, o, i) => r({
450
+ }), ut = { lit: dt(!0), dim: dt(!1) }, Go = (t, o, i) => r({
503
451
  position: "relative",
504
452
  width: "2.5em",
505
453
  height: "2.5em",
@@ -511,54 +459,54 @@ const Pe = {
511
459
  boxShadow: t ? `0 0 0 ${e.borderSize} ${e.primary}` : "none",
512
460
  filter: t ? "none" : "saturate(0.75)",
513
461
  transition: "border-color 150ms ease, box-shadow 150ms ease"
514
- }), no = {};
462
+ }), eo = {};
515
463
  for (const t of [!1, !0])
516
464
  for (const o of [!1, !0])
517
465
  for (const i of [!1, !0])
518
- no[`${t}|${o}|${i}`] = Qo(t, o, i);
519
- const gt = (t) => r(P, {
466
+ eo[`${t}|${o}|${i}`] = Go(t, o, i);
467
+ const mt = (t) => r(P, {
520
468
  fontSize: "0.6875em",
521
469
  fontVariantNumeric: "tabular-nums",
522
470
  fontWeight: 600,
523
471
  lineHeight: 1.2,
524
472
  color: t ? e.primary : e.tertiary
525
- }), ht = { active: gt(!0), idle: gt(!1) }, qo = ({ activeIndex: t, totalItems: o, onPrev: i, onNext: l }) => {
526
- const p = Z("sm");
473
+ }), pt = { active: mt(!0), idle: mt(!1) }, Yo = ({ activeIndex: t, totalItems: o, onPrev: i, onNext: d }) => {
474
+ const h = Z("sm");
527
475
  if (o <= 1) return null;
528
- const u = t === 0, f = t === o - 1;
529
- return /* @__PURE__ */ v(ke, { children: [
476
+ const m = t === 0, p = t === o - 1;
477
+ return /* @__PURE__ */ y(Se, { children: [
530
478
  /* @__PURE__ */ n(
531
479
  "button",
532
480
  {
533
481
  type: "button",
534
482
  onClick: i,
535
- disabled: u,
536
- css: qe[`left|${u}|${p}`],
483
+ disabled: m,
484
+ css: Qe[`left|${m}|${h}`],
537
485
  "aria-label": "Previous player",
538
- children: /* @__PURE__ */ n(st, { children: /* @__PURE__ */ n(Lo, { size: "1.5em", color: e.onPrimary }) })
486
+ children: /* @__PURE__ */ n(at, { children: /* @__PURE__ */ n(Bo, { size: "1.5em", color: e.onPrimary }) })
539
487
  }
540
488
  ),
541
489
  /* @__PURE__ */ n(
542
490
  "button",
543
491
  {
544
492
  type: "button",
545
- onClick: l,
546
- disabled: f,
547
- css: qe[`right|${f}|${p}`],
493
+ onClick: d,
494
+ disabled: p,
495
+ css: Qe[`right|${p}|${h}`],
548
496
  "aria-label": "Next player",
549
- children: /* @__PURE__ */ n(st, { children: /* @__PURE__ */ n(Wo, { size: "1.5em", color: e.onPrimary }) })
497
+ children: /* @__PURE__ */ n(at, { children: /* @__PURE__ */ n(Eo, { size: "1.5em", color: e.onPrimary }) })
550
498
  }
551
499
  )
552
500
  ] });
553
- }, Jo = ({
501
+ }, Ko = ({
554
502
  activeIndex: t,
555
503
  totalItems: o
556
504
  }) => {
557
505
  const { t: i } = G();
558
506
  if (o <= 1) return null;
559
- const l = (t + 1) / o * 100;
560
- return /* @__PURE__ */ v("div", { css: Pe.wrapper, children: [
561
- /* @__PURE__ */ n("p", { "aria-live": "polite", css: Pe.counter, children: i("potm.player_position", {
507
+ const d = (t + 1) / o * 100;
508
+ return /* @__PURE__ */ y("div", { css: Re.wrapper, children: [
509
+ /* @__PURE__ */ n("p", { "aria-live": "polite", css: Re.counter, children: i("potm.player_position", {
562
510
  current: t + 1,
563
511
  total: o
564
512
  }) }),
@@ -569,15 +517,15 @@ const gt = (t) => r(P, {
569
517
  "aria-valuemin": 1,
570
518
  "aria-valuemax": o,
571
519
  "aria-valuenow": t + 1,
572
- css: Pe.track,
573
- children: /* @__PURE__ */ n("div", { css: Pe.fill, style: { width: `${l}%` } })
520
+ css: Re.track,
521
+ children: /* @__PURE__ */ n("div", { css: Re.fill, style: { width: `${d}%` } })
574
522
  }
575
523
  )
576
524
  ] });
577
- }, Zo = { width: "100%", height: "100%", objectFit: "cover" }, rt = ({ src: t, placeholder: o, alt: i, className: l, style: p }) => (
525
+ }, Qo = { width: "100%", height: "100%", objectFit: "cover" }, nt = ({ src: t, placeholder: o, alt: i, className: d, style: h }) => (
578
526
  // `style` replaces the Avatar's own inline root style, so it is only passed when given.
579
- /* @__PURE__ */ n(Po, { src: t, alt: i, className: l, ...p && { style: p }, children: /* @__PURE__ */ n("img", { src: o, alt: i ?? "", onError: Fe(), style: Zo }) })
580
- ), en = (t, o, i) => r({
527
+ /* @__PURE__ */ n(Io, { src: t, alt: i, className: d, ...h && { style: h }, children: /* @__PURE__ */ n("img", { src: o, alt: i ?? "", onError: We(), style: Qo }) })
528
+ ), qo = (t, o, i) => r({
581
529
  position: "absolute",
582
530
  top: 0,
583
531
  left: 0,
@@ -585,7 +533,7 @@ const gt = (t) => r(P, {
585
533
  marginLeft: "auto",
586
534
  marginRight: "auto",
587
535
  width: i ? "15em" : "13em",
588
- height: to,
536
+ height: Jt,
589
537
  maxWidth: "90%",
590
538
  boxSizing: "border-box",
591
539
  display: "flex",
@@ -596,13 +544,13 @@ const gt = (t) => r(P, {
596
544
  fontFamily: e.fontBody,
597
545
  fontSize: "1em",
598
546
  lineHeight: 1.5,
599
- color: y.neutralOutlinedColor,
547
+ color: v.neutralOutlinedColor,
600
548
  backgroundColor: e.surface,
601
549
  backgroundRepeat: "no-repeat",
602
550
  backgroundSize: "cover",
603
551
  backgroundPosition: "center",
604
552
  border: `${e.borderSize} solid`,
605
- borderRadius: ve.md,
553
+ borderRadius: ke.md,
606
554
  borderColor: t ? e.primary : e.primarySoft,
607
555
  boxShadow: t ? "0 0.5em 1.5em rgba(0,0,0,0.12)" : o ? `0 0 0 ${e.borderSize} ${e.primary}` : "none",
608
556
  overflow: "visible",
@@ -613,11 +561,11 @@ const gt = (t) => r(P, {
613
561
  transition: "border-color 300ms ease-out, box-shadow 300ms ease-out"
614
562
  },
615
563
  "&:hover": { borderColor: e.primary, cursor: "default" }
616
- }), ro = {};
564
+ }), to = {};
617
565
  for (const t of [!1, !0])
618
566
  for (const o of [!1, !0])
619
- for (const i of [!1, !0]) ro[`${t}|${o}|${i}`] = en(t, o, i);
620
- const Ae = {
567
+ for (const i of [!1, !0]) to[`${t}|${o}|${i}`] = qo(t, o, i);
568
+ const _e = {
621
569
  cluster: r({
622
570
  position: "absolute",
623
571
  top: "0.625em",
@@ -657,7 +605,7 @@ const Ae = {
657
605
  lineHeight: 1.6,
658
606
  whiteSpace: "nowrap"
659
607
  })
660
- }, tn = r({
608
+ }, Jo = r({
661
609
  width: "1.75em",
662
610
  height: "1.75em",
663
611
  objectFit: "contain",
@@ -665,7 +613,7 @@ const Ae = {
665
613
  position: "absolute",
666
614
  top: "0.625em",
667
615
  right: "0.625em"
668
- }), on = r({
616
+ }), Zo = r({
669
617
  zIndex: 1,
670
618
  display: "flex",
671
619
  flexDirection: "column",
@@ -680,17 +628,17 @@ const Ae = {
680
628
  // Lets the text children shrink so ellipsis can kick in
681
629
  overflow: "hidden"
682
630
  // Clip instead of forcing the fixed-height card to grow
683
- }), bt = {
631
+ }), ft = {
684
632
  position: "relative",
685
633
  width: "6em",
686
634
  height: "6em",
687
635
  marginBottom: e.spaceMd,
688
636
  border: `${e.borderSize} solid ${e.primary}`,
689
637
  backgroundColor: e.surface
690
- }, vt = {
691
- active: r(bt),
692
- idle: r(bt, { filter: "saturate(0.5) brightness(0.9)" })
693
- }, yt = (t) => r(P, {
638
+ }, gt = {
639
+ active: r(ft),
640
+ idle: r(ft, { filter: "saturate(0.5) brightness(0.9)" })
641
+ }, ht = (t) => r(P, {
694
642
  display: "-webkit-box",
695
643
  marginBottom: e.space2xs,
696
644
  fontSize: "1.25em",
@@ -705,7 +653,7 @@ const Ae = {
705
653
  WebkitLineClamp: 2,
706
654
  WebkitBoxOrient: "vertical",
707
655
  overflow: "hidden"
708
- }), xt = { active: yt(!0), idle: yt(!1) }, Me = (t) => r(P, {
656
+ }), bt = { active: ht(!0), idle: ht(!1) }, Me = (t) => r(P, {
709
657
  fontSize: "0.875em",
710
658
  // body-sm
711
659
  color: t,
@@ -719,19 +667,19 @@ const Ae = {
719
667
  marginBottom: e.spaceXs,
720
668
  minHeight: "1.25em",
721
669
  flexShrink: 0
722
- }), Be = {
670
+ }), Ae = {
723
671
  positionActive: Me(e.text),
724
672
  positionIdle: Me(e.dim),
725
673
  minutesActive: r(Me(e.primary), { fontWeight: 500 }),
726
674
  minutesIdle: r(Me(e.tertiary), { fontWeight: 500 })
727
- }, nn = r(P, {
675
+ }, en = r(P, {
728
676
  color: e.dim,
729
677
  fontSize: "0.875em",
730
678
  // body-sm
731
679
  minHeight: "1.5em",
732
680
  flexShrink: 0,
733
681
  textAlign: "center"
734
- }), rn = r({
682
+ }), tn = r({
735
683
  zIndex: 1,
736
684
  display: "flex",
737
685
  flexDirection: "row",
@@ -739,130 +687,130 @@ const Ae = {
739
687
  gap: "10px",
740
688
  width: "100%",
741
689
  padding: `12px 0 ${e.spaceMd}`
742
- }), Ue = {
743
- ...nt("md"),
744
- borderRadius: ve.cardChild,
690
+ }), je = {
691
+ ...ot("md"),
692
+ borderRadius: ke.cardChild,
745
693
  // Joy's --Card-childRadius
746
694
  flex: "1 1 auto",
747
695
  width: "100%",
748
696
  zIndex: 30
749
697
  // Above the carousel's drag surface
750
- }, St = {
698
+ }, vt = {
751
699
  "--Icon-color": "currentColor",
752
- color: y.primarySolidColor,
753
- backgroundColor: y.primarySolidBg,
754
- "@media (hover: hover)": { "&:hover": { backgroundColor: y.primarySolidHoverBg } },
755
- "&:active": { backgroundColor: y.primarySolidActiveBg }
700
+ color: v.primarySolidColor,
701
+ backgroundColor: v.primarySolidBg,
702
+ "@media (hover: hover)": { "&:hover": { backgroundColor: v.primarySolidHoverBg } },
703
+ "&:active": { backgroundColor: v.primarySolidActiveBg }
756
704
  }, ue = {};
757
705
  for (const t of [!1, !0]) {
758
706
  const o = t ? "1em" : "0.8em";
759
- ue[`signIn|${t}`] = r(Ue, St, {
707
+ ue[`signIn|${t}`] = r(je, vt, {
760
708
  fontSize: o,
761
- "&:disabled": { color: y.primarySolidDisabledColor, backgroundColor: y.primarySolidDisabledBg }
762
- }), ue[`vote|${t}`] = r(Ue, St, {
709
+ "&:disabled": { color: v.primarySolidDisabledColor, backgroundColor: v.primarySolidDisabledBg }
710
+ }), ue[`vote|${t}`] = r(je, vt, {
763
711
  fontSize: o,
764
- "&:disabled": { color: e.tertiary, backgroundColor: y.primaryOutlinedBorder }
765
- }), ue[`remove|${t}`] = r(Ue, {
712
+ "&:disabled": { color: e.tertiary, backgroundColor: v.primaryOutlinedBorder }
713
+ }), ue[`remove|${t}`] = r(je, {
766
714
  "--Icon-color": "currentColor",
767
- color: y.warningOutlinedColor,
715
+ color: v.warningOutlinedColor,
768
716
  backgroundColor: "transparent",
769
- border: `1px solid ${y.warningOutlinedBorder}`,
717
+ border: `1px solid ${v.warningOutlinedBorder}`,
770
718
  fontSize: o,
771
- "@media (hover: hover)": { "&:hover": { backgroundColor: y.warningOutlinedHoverBg } },
772
- "&:active": { backgroundColor: y.warningOutlinedActiveBg },
719
+ "@media (hover: hover)": { "&:hover": { backgroundColor: v.warningOutlinedHoverBg } },
720
+ "&:active": { backgroundColor: v.warningOutlinedActiveBg },
773
721
  "&:disabled": { backgroundColor: "transparent", color: e.warning, borderColor: e.warning }
774
722
  });
775
723
  }
776
- const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
777
- const l = t - o, p = 1 - Math.min(0.25, Math.abs(l) * 0.15);
724
+ const yt = qt("8px"), on = Q.playerPlaceholder, nn = (t, o, i) => {
725
+ const d = t - o, h = 1 - Math.min(0.25, Math.abs(d) * 0.15);
778
726
  return {
779
- transform: `translateX(${l * 55 * (i ? -1 : 1)}%) scale(${p})`,
780
- zIndex: 20 - Math.abs(l),
727
+ transform: `translateX(${d * 55 * (i ? -1 : 1)}%) scale(${h})`,
728
+ zIndex: 20 - Math.abs(d),
781
729
  opacity: 1
782
730
  };
783
- }, ln = ({
731
+ }, rn = ({
784
732
  player: t,
785
733
  isSelected: o,
786
734
  index: i,
787
- activeIndex: l,
788
- teamLogo: p,
789
- handleVote: u,
790
- isVoting: f,
735
+ activeIndex: d,
736
+ teamLogo: h,
737
+ handleVote: m,
738
+ isVoting: p,
791
739
  isVotingClosed: b,
792
740
  defaultImagePlaceholderUrl: x,
793
- showSignInCTA: z,
741
+ showSignInCTA: T,
794
742
  signInCTA: s,
795
- voteCount: h
743
+ voteCount: g
796
744
  }) => {
797
- const { t: d } = G(), c = zo(), g = Z("sm"), k = g ? "1.25em" : "1.5625em", S = i === l, E = {
798
- ...sn(i, l, c),
745
+ const { t: c } = G(), l = Co(), f = Z("sm"), $ = f ? "1.25em" : "1.5625em", w = i === d, E = {
746
+ ...nn(i, d, l),
799
747
  backgroundImage: x ? `url(${x})` : void 0
800
- }, _ = (w) => (w.stopPropagation(), w.preventDefault(), u(t.id), !1), m = /* @__PURE__ */ v(ke, { children: [
801
- /* @__PURE__ */ n("span", { css: wt, children: /* @__PURE__ */ n(Qe, { size: k, style: ze.cta }) }),
802
- (s == null ? void 0 : s.defaultLabel) ?? d("common.signIn")
748
+ }, _ = (S) => (S.stopPropagation(), S.preventDefault(), m(t.id), !1), u = /* @__PURE__ */ y(Se, { children: [
749
+ /* @__PURE__ */ n("span", { css: yt, children: /* @__PURE__ */ n(Ke, { size: $, style: $e.cta }) }),
750
+ (s == null ? void 0 : s.defaultLabel) ?? c("common.signIn")
803
751
  ] }), a = () => s != null && s.component ? s.component : s != null && s.onClick ? /* @__PURE__ */ n(
804
752
  "button",
805
753
  {
806
754
  type: "button",
807
755
  onClick: s.onClick,
808
- onMouseDown: (w) => w.stopPropagation(),
809
- onTouchStart: (w) => w.stopPropagation(),
810
- disabled: !S,
811
- css: ue[`signIn|${g}`],
812
- children: m
756
+ onMouseDown: (S) => S.stopPropagation(),
757
+ onTouchStart: (S) => S.stopPropagation(),
758
+ disabled: !w,
759
+ css: ue[`signIn|${f}`],
760
+ children: u
813
761
  }
814
762
  ) : s != null && s.url ? /* @__PURE__ */ n(
815
763
  "button",
816
764
  {
817
765
  type: "button",
818
- onClick: (w) => {
819
- w.stopPropagation(), s.target === "_blank" ? window.open(s.url, "_blank") : window.location.href = s.url;
766
+ onClick: (S) => {
767
+ S.stopPropagation(), s.target === "_blank" ? window.open(s.url, "_blank") : window.location.href = s.url;
820
768
  },
821
- onMouseDown: (w) => w.stopPropagation(),
822
- onTouchStart: (w) => w.stopPropagation(),
823
- disabled: !S,
824
- css: ue[`signIn|${g}`],
825
- children: m
769
+ onMouseDown: (S) => S.stopPropagation(),
770
+ onTouchStart: (S) => S.stopPropagation(),
771
+ disabled: !w,
772
+ css: ue[`signIn|${f}`],
773
+ children: u
826
774
  }
827
- ) : /* @__PURE__ */ n("button", { type: "button", disabled: !0, css: ue[`signIn|${g}`], children: m });
828
- return /* @__PURE__ */ v("div", { css: ro[`${S}|${o}|${g}`], style: E, children: [
829
- /* @__PURE__ */ v("div", { css: Ae.cluster, children: [
830
- /* @__PURE__ */ n("div", { css: Ae.number, children: /* @__PURE__ */ n("p", { css: Ae.numberText, children: t.number }) }),
831
- t.type !== "start" && /* @__PURE__ */ n("p", { css: Ae.substitute, children: d("potm.substitute_short") })
775
+ ) : /* @__PURE__ */ n("button", { type: "button", disabled: !0, css: ue[`signIn|${f}`], children: u });
776
+ return /* @__PURE__ */ y("div", { css: to[`${w}|${o}|${f}`], style: E, children: [
777
+ /* @__PURE__ */ y("div", { css: _e.cluster, children: [
778
+ /* @__PURE__ */ n("div", { css: _e.number, children: /* @__PURE__ */ n("p", { css: _e.numberText, children: t.number }) }),
779
+ t.type !== "start" && /* @__PURE__ */ n("p", { css: _e.substitute, children: c("potm.substitute_short") })
832
780
  ] }),
833
- /* @__PURE__ */ n("img", { src: p, css: tn, alt: "Team logo", onError: Fe(Q.teamPlaceholder) }),
834
- /* @__PURE__ */ v("div", { css: on, children: [
781
+ /* @__PURE__ */ n("img", { src: h, css: Jo, alt: "Team logo", onError: We(Q.teamPlaceholder) }),
782
+ /* @__PURE__ */ y("div", { css: Zo, children: [
835
783
  /* @__PURE__ */ n(
836
- rt,
784
+ nt,
837
785
  {
838
- src: t.image || an,
786
+ src: t.image || on,
839
787
  placeholder: Q.playerPlaceholder,
840
788
  alt: t.name,
841
- css: S ? vt.active : vt.idle
789
+ css: w ? gt.active : gt.idle
842
790
  }
843
791
  ),
844
- /* @__PURE__ */ n("p", { css: S ? xt.active : xt.idle, children: t.name }),
845
- /* @__PURE__ */ n("p", { css: S ? Be.positionActive : Be.positionIdle, children: d(`potm.${t.position}`) }),
846
- /* @__PURE__ */ n("p", { css: S ? Be.minutesActive : Be.minutesIdle, children: t.minutesPlayed && t.minutesPlayed > 0 ? d("potm.minutes_played", { minutes: t.minutesPlayed }) : "" }),
847
- /* @__PURE__ */ n("p", { css: nn, children: h ? `${h} ${d("potm.votes", { count: h })}` : "" })
792
+ /* @__PURE__ */ n("p", { css: w ? bt.active : bt.idle, children: t.name }),
793
+ /* @__PURE__ */ n("p", { css: w ? Ae.positionActive : Ae.positionIdle, children: c(`potm.${t.position}`) }),
794
+ /* @__PURE__ */ n("p", { css: w ? Ae.minutesActive : Ae.minutesIdle, children: t.minutesPlayed && t.minutesPlayed > 0 ? c("potm.minutes_played", { minutes: t.minutesPlayed }) : "" }),
795
+ /* @__PURE__ */ n("p", { css: en, children: g ? `${g} ${c("potm.votes", { count: g })}` : "" })
848
796
  ] }),
849
- /* @__PURE__ */ n("div", { css: rn, children: z ? a() : /* @__PURE__ */ v(
797
+ /* @__PURE__ */ n("div", { css: tn, children: T ? a() : /* @__PURE__ */ y(
850
798
  "button",
851
799
  {
852
800
  type: "button",
853
801
  onClick: _,
854
- onMouseDown: (w) => w.stopPropagation(),
855
- onTouchStart: (w) => w.stopPropagation(),
856
- disabled: !S || f || b,
857
- css: ue[`${o ? "remove" : "vote"}|${g}`],
802
+ onMouseDown: (S) => S.stopPropagation(),
803
+ onTouchStart: (S) => S.stopPropagation(),
804
+ disabled: !w || p || b,
805
+ css: ue[`${o ? "remove" : "vote"}|${f}`],
858
806
  children: [
859
- /* @__PURE__ */ n("span", { css: wt, children: o ? /* @__PURE__ */ n(Xo, {}) : /* @__PURE__ */ n(Qe, { size: k, style: ze.cta }) }),
860
- d(b ? "potm.voting_closed" : f ? "potm.voting" : o ? "potm.remove_vote" : "potm.vote")
807
+ /* @__PURE__ */ n("span", { css: yt, children: o ? /* @__PURE__ */ n(Oo, {}) : /* @__PURE__ */ n(Ke, { size: $, style: $e.cta }) }),
808
+ c(b ? "potm.voting_closed" : p ? "potm.voting" : o ? "potm.remove_vote" : "potm.vote")
861
809
  ]
862
810
  }
863
811
  ) })
864
812
  ] });
865
- }, io = r({ display: "none" }), ao = {
813
+ }, oo = r({ display: "none" }), no = {
866
814
  position: "relative",
867
815
  display: "inline-flex",
868
816
  alignItems: "center",
@@ -878,7 +826,7 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
878
826
  cursor: "pointer",
879
827
  minHeight: "2em",
880
828
  "--Icon-color": "currentColor"
881
- }, Ge = {
829
+ }, Ue = {
882
830
  position: "absolute",
883
831
  zIndex: 0,
884
832
  inset: 0,
@@ -890,11 +838,11 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
890
838
  borderRadius: "inherit",
891
839
  cursor: "pointer",
892
840
  textDecoration: "none",
893
- "&:focus-visible": { outline: `2px solid ${y.focus}`, outlineOffset: "2px" }
841
+ "&:focus-visible": { outline: `2px solid ${v.focus}`, outlineOffset: "2px" }
894
842
  }, J = {
895
- actionSoftPrimary: r(Ge, be.softPrimary),
896
- actionSoftNeutral: r(Ge, be.softNeutral),
897
- actionOutlinedNeutral: r(Ge, be.outlinedNeutral, { backgroundColor: y.bgSurface }),
843
+ actionSoftPrimary: r(Ue, he.softPrimary),
844
+ actionSoftNeutral: r(Ue, he.softNeutral),
845
+ actionOutlinedNeutral: r(Ue, he.outlinedNeutral, { backgroundColor: v.bgSurface }),
898
846
  label: r({
899
847
  display: "inline-block",
900
848
  overflow: "hidden",
@@ -917,8 +865,8 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
917
865
  zIndex: 1,
918
866
  pointerEvents: "none"
919
867
  })
920
- }, Ct = {
921
- color: y.textSecondary,
868
+ }, xt = {
869
+ color: v.textSecondary,
922
870
  fontSize: "inherit",
923
871
  overflow: "hidden",
924
872
  textOverflow: "ellipsis",
@@ -947,37 +895,37 @@ const wt = eo("8px"), an = Q.playerPlaceholder, sn = (t, o, i) => {
947
895
  "& > :not(style):not(style)": { margin: 0 },
948
896
  "& > :not(style) ~ :not(style)": { marginLeft: e.spaceXs }
949
897
  }),
950
- hidden: io,
951
- decorator: eo("6px"),
898
+ hidden: oo,
899
+ decorator: qt("6px"),
952
900
  // Joy's Avatar took its size from a 16px font of its own.
953
901
  buttonAvatar: r({ position: "relative", width: "20px", height: "20px", backgroundColor: "transparent" }),
954
- label: r(P, Ct),
955
- teamLabel: r(P, Ct, { unicodeBidi: "plaintext" }),
956
- chipLabel: r(P, { color: y.textSecondary, fontSize: "inherit" }),
957
- teamChipLabel: r(P, { color: y.textSecondary, fontSize: "inherit", unicodeBidi: "plaintext" })
958
- }, kt = (t) => r(nt("sm"), t ? be.softPrimary : be.outlinedNeutral, {
902
+ label: r(P, xt),
903
+ teamLabel: r(P, xt, { unicodeBidi: "plaintext" }),
904
+ chipLabel: r(P, { color: v.textSecondary, fontSize: "inherit" }),
905
+ teamChipLabel: r(P, { color: v.textSecondary, fontSize: "inherit", unicodeBidi: "plaintext" })
906
+ }, wt = (t) => r(ot("sm"), t ? he.softPrimary : he.outlinedNeutral, {
959
907
  ...t ? {} : { backgroundColor: "transparent" },
960
908
  display: "flex",
961
909
  flex: 1,
962
910
  minWidth: "9em",
963
911
  justifyContent: "center",
964
912
  fontSize: "0.875em"
965
- }), $t = { active: kt(!0), idle: kt(!1) }, cn = (t, o, i) => r(ao, {
913
+ }), St = { active: wt(!0), idle: wt(!1) }, an = (t, o, i) => r(no, {
966
914
  gap: "3px",
967
915
  display: "flex",
968
916
  fontSize: i ? "0.875em" : "0.75em",
969
917
  padding: `${e.space2xs} ${e.spaceSm}`,
970
918
  borderRadius: "24px",
971
- color: t ? y.primarySoftColor : y.neutralOutlinedColor,
919
+ color: t ? v.primarySoftColor : v.neutralOutlinedColor,
972
920
  ...o ? { maxWidth: i ? "7.5em" : "5em" } : {}
973
- }), Je = {};
921
+ }), qe = {};
974
922
  for (const t of [!1, !0])
975
923
  for (const o of [!1, !0])
976
- for (const i of [!1, !0]) Je[`${t}|${o}|${i}`] = cn(t, o, i);
977
- const zt = {
924
+ for (const i of [!1, !0]) qe[`${t}|${o}|${i}`] = an(t, o, i);
925
+ const Ct = {
978
926
  narrow: r({ position: "relative", width: "8px", height: "8px", marginInlineStart: "-6px", backgroundColor: "transparent" }),
979
927
  wide: r({ position: "relative", width: "10px", height: "10px", marginInlineStart: "-6px", backgroundColor: "transparent" })
980
- }, ge = {
928
+ }, fe = {
981
929
  row: r({
982
930
  display: "flex",
983
931
  flexWrap: "wrap",
@@ -989,8 +937,8 @@ const zt = {
989
937
  }),
990
938
  text: r(P, { fontSize: "inherit", color: "inherit" }),
991
939
  textInline: r(P, { display: "inline", fontSize: "inherit", color: "inherit" }),
992
- hidden: io
993
- }, dn = (t, o) => r(ao, {
940
+ hidden: oo
941
+ }, sn = (t, o) => r(no, {
994
942
  fontFamily: e.fontPrimary,
995
943
  fontSize: o ? "0.8125em" : "0.75em",
996
944
  gap: "0.5em",
@@ -1005,10 +953,10 @@ const zt = {
1005
953
  backgroundColor: t ? e.primarySoft : "transparent",
1006
954
  transition: "background-color 150ms ease, color 150ms ease, border-color 150ms ease",
1007
955
  "&:hover": { backgroundColor: t ? e.primarySoft : e.surfaceVariant }
1008
- }), so = {};
956
+ }), ro = {};
1009
957
  for (const t of [!1, !0])
1010
- for (const o of [!1, !0]) so[`${t}|${o}`] = dn(t, o);
1011
- const Tt = (t) => r({
958
+ for (const o of [!1, !0]) ro[`${t}|${o}`] = sn(t, o);
959
+ const $t = (t) => r({
1012
960
  display: "inline-flex",
1013
961
  alignItems: "center",
1014
962
  justifyContent: "center",
@@ -1022,7 +970,7 @@ const Tt = (t) => r({
1022
970
  lineHeight: 1.7,
1023
971
  backgroundColor: t ? e.primary : e.surfaceVariant,
1024
972
  color: t ? e.onPrimary : e.dim
1025
- }), It = { active: Tt(!0), idle: Tt(!1) }, Ze = "0.875em", He = "2.5em", lo = `min(24px, ${He})`, Dt = `max((${He} - 2px - ${lo}) / 2, 0px)`, de = {
973
+ }), kt = { active: $t(!0), idle: $t(!1) }, Je = "0.875em", Fe = "2.5em", io = `min(24px, ${Fe})`, Tt = `max((${Fe} - 2px - ${io}) / 2, 0px)`, de = {
1026
974
  // Caps the field so it reads as a control rather than a full-bleed bar.
1027
975
  wrapper: r({
1028
976
  width: "100%",
@@ -1036,9 +984,9 @@ const Tt = (t) => r({
1036
984
  display: "flex",
1037
985
  boxSizing: "border-box",
1038
986
  minWidth: 0,
1039
- minHeight: He,
987
+ minHeight: Fe,
1040
988
  width: "100%",
1041
- paddingInline: Ze,
989
+ paddingInline: Je,
1042
990
  borderRadius: e.radiusFull,
1043
991
  border: `1px solid ${e.border}`,
1044
992
  boxShadow: "var(--fu-ucrc-shadow-ring), 0px 1px 2px 0px rgba(var(--fu-ucrc-shadow-channel) / var(--fu-ucrc-shadow-opacity))",
@@ -1061,21 +1009,21 @@ const Tt = (t) => r({
1061
1009
  borderRadius: "inherit",
1062
1010
  margin: "-1px"
1063
1011
  },
1064
- "&:focus-within::before": { boxShadow: `inset 0 0 0 ${e.borderSize} ${y.focus}` }
1012
+ "&:focus-within::before": { boxShadow: `inset 0 0 0 ${e.borderSize} ${v.focus}` }
1065
1013
  }),
1066
1014
  startDecorator: r({
1067
1015
  display: "flex",
1068
1016
  alignItems: "center",
1069
1017
  flexWrap: "wrap",
1070
1018
  marginInlineEnd: "8px",
1071
- color: y.textIcon,
1019
+ color: v.textIcon,
1072
1020
  cursor: "initial"
1073
1021
  }),
1074
1022
  endDecorator: r({
1075
1023
  display: "flex",
1076
1024
  alignItems: "center",
1077
1025
  marginInlineStart: "8px",
1078
- color: y.textIcon,
1026
+ color: v.textIcon,
1079
1027
  cursor: "initial"
1080
1028
  }),
1081
1029
  input: r({
@@ -1094,10 +1042,10 @@ const Tt = (t) => r({
1094
1042
  textOverflow: "ellipsis",
1095
1043
  "&::placeholder": { color: "inherit", opacity: 0.64 }
1096
1044
  }),
1097
- clear: r(Zt, {
1045
+ clear: r(Qt, {
1098
1046
  position: "relative",
1099
1047
  padding: "0 2px",
1100
- borderRadius: `max(calc(${e.radiusFull} - 1px - ${Dt}), min(calc(${Dt} + 1px), calc(${e.radiusFull} / 2)))`,
1048
+ borderRadius: `max(calc(${e.radiusFull} - 1px - ${Tt}), min(calc(${Tt} + 1px), calc(${e.radiusFull} / 2)))`,
1101
1049
  fontSize: "1em",
1102
1050
  minWidth: "1.5em",
1103
1051
  minHeight: "1.5em"
@@ -1111,35 +1059,35 @@ const Tt = (t) => r({
1111
1059
  marginTop: e.space2xs,
1112
1060
  textAlign: "center"
1113
1061
  })
1114
- }, un = {
1115
- margin: `0 calc(min(calc(${Ze} - (${He} - 2px - ${lo}) / 2), ${Ze}) * -1) 0 0`
1116
- }, mn = ({
1062
+ }, ln = {
1063
+ margin: `0 calc(min(calc(${Je} - (${Fe} - 2px - ${io}) / 2), ${Je}) * -1) 0 0`
1064
+ }, cn = ({
1117
1065
  query: t,
1118
1066
  setQuery: o,
1119
1067
  resultCount: i,
1120
- totalCount: l
1068
+ totalCount: d
1121
1069
  }) => {
1122
- const { t: p } = G(), u = $e(null);
1123
- return /* @__PURE__ */ v("div", { css: de.wrapper, children: [
1124
- /* @__PURE__ */ v(
1070
+ const { t: h } = G(), m = Ce(null);
1071
+ return /* @__PURE__ */ y("div", { css: de.wrapper, children: [
1072
+ /* @__PURE__ */ y(
1125
1073
  "div",
1126
1074
  {
1127
1075
  css: de.root,
1128
- onClick: (f) => {
1076
+ onClick: (p) => {
1129
1077
  var b;
1130
- return f.target === f.currentTarget && ((b = u.current) == null ? void 0 : b.focus());
1078
+ return p.target === p.currentTarget && ((b = m.current) == null ? void 0 : b.focus());
1131
1079
  },
1132
1080
  children: [
1133
- /* @__PURE__ */ n("div", { css: de.startDecorator, children: /* @__PURE__ */ n(Fo, { size: "1.125em", color: e.dim, style: ze.input }) }),
1081
+ /* @__PURE__ */ n("div", { css: de.startDecorator, children: /* @__PURE__ */ n(Lo, { size: "1.125em", color: e.dim, style: $e.input }) }),
1134
1082
  /* @__PURE__ */ n(
1135
1083
  "input",
1136
1084
  {
1137
- ref: u,
1085
+ ref: m,
1138
1086
  css: de.input,
1139
1087
  value: t,
1140
- onChange: (f) => o(f.target.value),
1141
- placeholder: p("potm.search_placeholder"),
1142
- "aria-label": p("potm.search_label")
1088
+ onChange: (p) => o(p.target.value),
1089
+ placeholder: h("potm.search_placeholder"),
1090
+ "aria-label": h("potm.search_label")
1143
1091
  }
1144
1092
  ),
1145
1093
  t ? /* @__PURE__ */ n("div", { css: de.endDecorator, children: /* @__PURE__ */ n(
@@ -1147,124 +1095,124 @@ const Tt = (t) => r({
1147
1095
  {
1148
1096
  type: "button",
1149
1097
  css: de.clear,
1150
- style: un,
1098
+ style: ln,
1151
1099
  onClick: () => o(""),
1152
- "aria-label": p("potm.search_clear"),
1153
- children: /* @__PURE__ */ n(Ho, { size: "1em", color: "var(--Icon-color)" })
1100
+ "aria-label": h("potm.search_clear"),
1101
+ children: /* @__PURE__ */ n(Wo, { size: "1em", color: "var(--Icon-color)" })
1154
1102
  }
1155
1103
  ) }) : null
1156
1104
  ]
1157
1105
  }
1158
1106
  ),
1159
- t ? /* @__PURE__ */ n("span", { "aria-live": "polite", css: de.feedback, children: p("potm.search_results_count", {
1107
+ t ? /* @__PURE__ */ n("span", { "aria-live": "polite", css: de.feedback, children: h("potm.search_results_count", {
1160
1108
  count: i,
1161
- total: l
1109
+ total: d
1162
1110
  }) }) : null
1163
1111
  ] });
1164
- }, Rt = ({ isActive: t, wide: o, count: i, label: l, onClick: p, children: u }) => /* @__PURE__ */ v("div", { css: so[`${t}|${o}`], children: [
1112
+ }, zt = ({ isActive: t, wide: o, count: i, label: d, onClick: h, children: m }) => /* @__PURE__ */ y("div", { css: ro[`${t}|${o}`], children: [
1165
1113
  /* @__PURE__ */ n(
1166
1114
  "button",
1167
1115
  {
1168
1116
  type: "button",
1169
- onClick: p,
1117
+ onClick: h,
1170
1118
  "aria-pressed": t,
1171
- "aria-label": l,
1119
+ "aria-label": d,
1172
1120
  css: t ? J.actionSoftNeutral : J.actionOutlinedNeutral
1173
1121
  }
1174
1122
  ),
1175
- /* @__PURE__ */ n("span", { css: J.label, children: u }),
1176
- /* @__PURE__ */ n("span", { css: J.endDecorator, children: /* @__PURE__ */ n("div", { css: t ? It.active : It.idle, children: i }) })
1177
- ] }), pn = ({
1123
+ /* @__PURE__ */ n("span", { css: J.label, children: m }),
1124
+ /* @__PURE__ */ n("span", { css: J.endDecorator, children: /* @__PURE__ */ n("div", { css: t ? kt.active : kt.idle, children: i }) })
1125
+ ] }), dn = ({
1178
1126
  positionCounts: t,
1179
1127
  positionFilter: o,
1180
1128
  setPositionFilter: i,
1181
- totalCount: l
1129
+ totalCount: d
1182
1130
  }) => {
1183
- const { t: p } = G(), u = Z("sm");
1184
- return t.length <= 1 ? null : /* @__PURE__ */ v("div", { css: ge.row, children: [
1131
+ const { t: h } = G(), m = Z("sm");
1132
+ return t.length <= 1 ? null : /* @__PURE__ */ y("div", { css: fe.row, children: [
1185
1133
  /* @__PURE__ */ n(
1186
- Rt,
1134
+ zt,
1187
1135
  {
1188
1136
  isActive: o === "all",
1189
- wide: u,
1190
- count: l,
1137
+ wide: m,
1138
+ count: d,
1191
1139
  onClick: () => i("all"),
1192
- children: /* @__PURE__ */ n("p", { css: ge.text, children: p("potm.all") })
1140
+ children: /* @__PURE__ */ n("p", { css: fe.text, children: h("potm.all") })
1193
1141
  }
1194
1142
  ),
1195
- t.map(({ bucket: f, count: b }) => {
1196
- const x = o === f;
1197
- return /* @__PURE__ */ v(
1198
- Rt,
1143
+ t.map(({ bucket: p, count: b }) => {
1144
+ const x = o === p;
1145
+ return /* @__PURE__ */ y(
1146
+ zt,
1199
1147
  {
1200
1148
  isActive: x,
1201
- wide: u,
1149
+ wide: m,
1202
1150
  count: b,
1203
- label: p(`potm.${f}`),
1204
- onClick: () => i(x ? "all" : f),
1151
+ label: h(`potm.${p}`),
1152
+ onClick: () => i(x ? "all" : p),
1205
1153
  children: [
1206
- /* @__PURE__ */ n("p", { css: u ? ge.textInline : ge.hidden, children: p(`potm.${f}`) }),
1207
- /* @__PURE__ */ n("p", { css: u ? ge.hidden : ge.textInline, children: p(`potm.position_short_${f}`) })
1154
+ /* @__PURE__ */ n("p", { css: m ? fe.textInline : fe.hidden, children: h(`potm.${p}`) }),
1155
+ /* @__PURE__ */ n("p", { css: m ? fe.hidden : fe.textInline, children: h(`potm.position_short_${p}`) })
1208
1156
  ]
1209
1157
  },
1210
- f
1158
+ p
1211
1159
  );
1212
1160
  })
1213
1161
  ] });
1214
- }, fn = Q.playerPlaceholder, gn = ({
1162
+ }, un = Q.playerPlaceholder, mn = ({
1215
1163
  players: t,
1216
1164
  activeIndex: o,
1217
1165
  votedPlayerId: i,
1218
- onSelect: l
1166
+ onSelect: d
1219
1167
  }) => {
1220
- const { t: p } = G(), u = $e(null), f = $e([]);
1168
+ const { t: h } = G(), m = Ce(null), p = Ce([]);
1221
1169
  return U(() => {
1222
- var c;
1223
- const b = f.current[o], x = u.current;
1170
+ var l;
1171
+ const b = p.current[o], x = m.current;
1224
1172
  if (!b || !x) return;
1225
- const z = typeof window < "u" && ((c = window.matchMedia) == null ? void 0 : c.call(window, "(prefers-reduced-motion: reduce)").matches), s = b.getBoundingClientRect(), h = x.getBoundingClientRect(), d = s.left - h.left - (x.clientWidth - b.offsetWidth) / 2;
1173
+ const T = typeof window < "u" && ((l = window.matchMedia) == null ? void 0 : l.call(window, "(prefers-reduced-motion: reduce)").matches), s = b.getBoundingClientRect(), g = x.getBoundingClientRect(), c = s.left - g.left - (x.clientWidth - b.offsetWidth) / 2;
1226
1174
  x.scrollBy({
1227
- left: d,
1228
- behavior: z ? "auto" : "smooth"
1175
+ left: c,
1176
+ behavior: T ? "auto" : "smooth"
1229
1177
  });
1230
- }, [o, t.length]), t.length <= 1 ? null : /* @__PURE__ */ n("div", { css: je.root, children: /* @__PURE__ */ n(
1178
+ }, [o, t.length]), t.length <= 1 ? null : /* @__PURE__ */ n("div", { css: Ve.root, children: /* @__PURE__ */ n(
1231
1179
  "div",
1232
1180
  {
1233
- ref: u,
1181
+ ref: m,
1234
1182
  role: "tablist",
1235
- "aria-label": p("potm.roster_label"),
1236
- css: je.scroller,
1183
+ "aria-label": h("potm.roster_label"),
1184
+ css: Ve.scroller,
1237
1185
  children: t.map((b, x) => {
1238
- const z = x === o, s = i === b.id, h = b.type !== "start";
1239
- return /* @__PURE__ */ v(
1186
+ const T = x === o, s = i === b.id, g = b.type !== "start";
1187
+ return /* @__PURE__ */ y(
1240
1188
  "button",
1241
1189
  {
1242
1190
  type: "button",
1243
- ref: (d) => {
1244
- f.current[x] = d;
1191
+ ref: (c) => {
1192
+ p.current[x] = c;
1245
1193
  },
1246
- onClick: () => l(x),
1247
- onMouseDown: (d) => d.stopPropagation(),
1248
- onTouchStart: (d) => d.stopPropagation(),
1194
+ onClick: () => d(x),
1195
+ onMouseDown: (c) => c.stopPropagation(),
1196
+ onTouchStart: (c) => c.stopPropagation(),
1249
1197
  role: "tab",
1250
- "aria-selected": z,
1251
- "aria-label": p("potm.roster_thumb_label", {
1198
+ "aria-selected": T,
1199
+ "aria-label": h("potm.roster_thumb_label", {
1252
1200
  number: b.number,
1253
1201
  name: b.name
1254
1202
  }),
1255
- css: z || s ? ft.lit : ft.dim,
1203
+ css: T || s ? ut.lit : ut.dim,
1256
1204
  children: [
1257
- s && /* @__PURE__ */ n("div", { css: je.votedBadge, children: /* @__PURE__ */ n(Qe, { size: "0.75em", color: e.warning }) }),
1205
+ s && /* @__PURE__ */ n("div", { css: Ve.votedBadge, children: /* @__PURE__ */ n(Ke, { size: "0.75em", color: e.warning }) }),
1258
1206
  /* @__PURE__ */ n(
1259
- rt,
1207
+ nt,
1260
1208
  {
1261
- src: b.image || fn,
1209
+ src: b.image || un,
1262
1210
  placeholder: Q.playerPlaceholder,
1263
1211
  alt: "",
1264
- css: no[`${z}|${s}|${h}`]
1212
+ css: eo[`${T}|${s}|${g}`]
1265
1213
  }
1266
1214
  ),
1267
- /* @__PURE__ */ n("p", { css: z ? ht.active : ht.idle, children: b.number || "-" })
1215
+ /* @__PURE__ */ n("p", { css: T ? pt.active : pt.idle, children: b.number || "-" })
1268
1216
  ]
1269
1217
  },
1270
1218
  b.id
@@ -1272,54 +1220,54 @@ const Tt = (t) => r({
1272
1220
  })
1273
1221
  }
1274
1222
  ) });
1275
- }, hn = {
1223
+ }, pn = {
1276
1224
  width: "100%",
1277
1225
  height: "100%",
1278
1226
  objectFit: "contain"
1279
- }, co = ({ src: t, alt: o = "", className: i }) => /* @__PURE__ */ n("div", { className: i, style: Go, children: /* @__PURE__ */ n(
1227
+ }, ao = ({ src: t, alt: o = "", className: i }) => /* @__PURE__ */ n("div", { className: i, style: jo, children: /* @__PURE__ */ n(
1280
1228
  "img",
1281
1229
  {
1282
1230
  src: t || Q.teamPlaceholder,
1283
1231
  alt: o,
1284
- onError: Fe(Q.teamPlaceholder),
1285
- style: hn
1232
+ onError: We(Q.teamPlaceholder),
1233
+ style: pn
1286
1234
  }
1287
- ) }), Pt = ({ team: t, className: o }) => /* @__PURE__ */ n(co, { src: t.logo, alt: t.name, className: o }), _t = (t) => t.code || t.name.substring(0, 3).toUpperCase(), bn = ({ teams: t, activeFilter: o, setActiveFilter: i, setActiveIndex: l }) => {
1288
- const { t: p } = G(), u = Z("sm"), f = Z("md"), b = Z("lg"), x = (s) => {
1289
- i(s), l(0);
1290
- }, z = o === "all";
1291
- return /* @__PURE__ */ v("div", { css: u ? V.rowWide : V.row, children: [
1292
- /* @__PURE__ */ v("button", { type: "button", onClick: () => x("all"), css: f ? $t[z ? "active" : "idle"] : V.hidden, children: [
1293
- /* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(lt, { size: "1.5em", color: "var(--Icon-color)", style: ze.teamButton }) }),
1294
- /* @__PURE__ */ n("p", { css: V.label, children: p("potm.all_players") })
1235
+ ) }), It = ({ team: t, className: o }) => /* @__PURE__ */ n(ao, { src: t.logo, alt: t.name, className: o }), Dt = (t) => t.code || t.name.substring(0, 3).toUpperCase(), fn = ({ teams: t, activeFilter: o, setActiveFilter: i, setActiveIndex: d }) => {
1236
+ const { t: h } = G(), m = Z("sm"), p = Z("md"), b = Z("lg"), x = (s) => {
1237
+ i(s), d(0);
1238
+ }, T = o === "all";
1239
+ return /* @__PURE__ */ y("div", { css: m ? V.rowWide : V.row, children: [
1240
+ /* @__PURE__ */ y("button", { type: "button", onClick: () => x("all"), css: p ? St[T ? "active" : "idle"] : V.hidden, children: [
1241
+ /* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(st, { size: "1.5em", color: "var(--Icon-color)", style: $e.teamButton }) }),
1242
+ /* @__PURE__ */ n("p", { css: V.label, children: h("potm.all_players") })
1295
1243
  ] }),
1296
- t.map((s) => /* @__PURE__ */ v(
1244
+ t.map((s) => /* @__PURE__ */ y(
1297
1245
  "button",
1298
1246
  {
1299
1247
  type: "button",
1300
1248
  onClick: () => x(s.id),
1301
- css: f ? $t[o === s.id ? "active" : "idle"] : V.hidden,
1249
+ css: p ? St[o === s.id ? "active" : "idle"] : V.hidden,
1302
1250
  children: [
1303
- /* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(Pt, { team: s, css: V.buttonAvatar }) }),
1251
+ /* @__PURE__ */ n("span", { css: V.decorator, children: /* @__PURE__ */ n(It, { team: s, css: V.buttonAvatar }) }),
1304
1252
  /* @__PURE__ */ n("p", { css: b ? V.teamLabel : V.hidden, children: s.name }),
1305
- /* @__PURE__ */ n("p", { css: f && !b ? V.teamLabel : V.hidden, children: _t(s) })
1253
+ /* @__PURE__ */ n("p", { css: p && !b ? V.teamLabel : V.hidden, children: Dt(s) })
1306
1254
  ]
1307
1255
  },
1308
1256
  s.id
1309
1257
  )),
1310
- /* @__PURE__ */ v("div", { css: f ? V.hidden : Je[`${z}|false|${u}`], children: [
1258
+ /* @__PURE__ */ y("div", { css: p ? V.hidden : qe[`${T}|false|${m}`], children: [
1311
1259
  /* @__PURE__ */ n(
1312
1260
  "button",
1313
1261
  {
1314
1262
  type: "button",
1315
1263
  onClick: () => x("all"),
1316
- css: z ? J.actionSoftPrimary : J.actionOutlinedNeutral
1264
+ css: T ? J.actionSoftPrimary : J.actionOutlinedNeutral
1317
1265
  }
1318
1266
  ),
1319
- /* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.chipLabel, children: p("potm.all") }) }),
1320
- /* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(lt, { size: "1em", color: "var(--Icon-color)", style: ze.chip }) })
1267
+ /* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.chipLabel, children: h("potm.all") }) }),
1268
+ /* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(st, { size: "1em", color: "var(--Icon-color)", style: $e.chip }) })
1321
1269
  ] }),
1322
- t.map((s) => /* @__PURE__ */ v("div", { css: f ? V.hidden : Je[`${o === s.id}|true|${u}`], children: [
1270
+ t.map((s) => /* @__PURE__ */ y("div", { css: p ? V.hidden : qe[`${o === s.id}|true|${m}`], children: [
1323
1271
  /* @__PURE__ */ n(
1324
1272
  "button",
1325
1273
  {
@@ -1328,11 +1276,11 @@ const Tt = (t) => r({
1328
1276
  css: o === s.id ? J.actionSoftPrimary : J.actionOutlinedNeutral
1329
1277
  }
1330
1278
  ),
1331
- /* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.teamChipLabel, children: _t(s) }) }),
1332
- /* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(Pt, { team: s, css: u ? zt.wide : zt.narrow }) })
1279
+ /* @__PURE__ */ n("span", { css: J.label, children: /* @__PURE__ */ n("p", { css: V.teamChipLabel, children: Dt(s) }) }),
1280
+ /* @__PURE__ */ n("span", { css: J.startDecorator, children: /* @__PURE__ */ n(It, { team: s, css: m ? Ct.wide : Ct.narrow }) })
1333
1281
  ] }, `mobile-${s.id}`))
1334
1282
  ] });
1335
- }, At = (t) => {
1283
+ }, Rt = (t) => {
1336
1284
  const o = +new Date(t) - +/* @__PURE__ */ new Date();
1337
1285
  return o <= 0 ? { days: 0, hours: 0, minutes: 0, seconds: 0, isExpired: !0 } : {
1338
1286
  days: Math.floor(o / (1e3 * 60 * 60 * 24)),
@@ -1341,189 +1289,189 @@ const Tt = (t) => r({
1341
1289
  seconds: Math.floor(o / 1e3 % 60),
1342
1290
  isExpired: !1
1343
1291
  };
1344
- }, uo = (t) => {
1292
+ }, so = (t) => {
1345
1293
  const [o, i] = I(
1346
- At(t)
1294
+ Rt(t)
1347
1295
  );
1348
1296
  return U(() => {
1349
1297
  if (o.isExpired) return;
1350
- const l = setInterval(() => {
1351
- i(At(t));
1298
+ const d = setInterval(() => {
1299
+ i(Rt(t));
1352
1300
  }, 1e3);
1353
- return () => clearInterval(l);
1301
+ return () => clearInterval(d);
1354
1302
  }, [t, o.isExpired]), o;
1355
- }, vn = 30, yn = ({
1303
+ }, gn = 30, hn = ({
1356
1304
  votingDeadline: t,
1357
1305
  totalVotes: o
1358
1306
  }) => {
1359
- const { t: i } = G(), l = Z("sm"), { days: p, hours: u, minutes: f, seconds: b, isExpired: x } = uo(
1307
+ const { t: i } = G(), d = Z("sm"), { days: h, hours: m, minutes: p, seconds: b, isExpired: x } = so(
1360
1308
  t ?? /* @__PURE__ */ new Date(0)
1361
- ), z = !!t && !x, s = o > 0;
1362
- if (!z && !s) return null;
1363
- const h = p === 0 && u === 0 && f < vn, d = () => p > 0 ? i("potm.remaining_days_hours", { days: p, hours: u }) : u > 0 ? i("potm.remaining_hours_minutes", { hours: u, minutes: f }) : i("potm.remaining_minutes_seconds", { minutes: f, seconds: b });
1364
- return /* @__PURE__ */ v("div", { css: ne.bar, children: [
1365
- z && /* @__PURE__ */ v("div", { css: ne.item, children: [
1366
- /* @__PURE__ */ n(qt, { size: "1em", color: h ? e.danger : e.primary }),
1309
+ ), T = !!t && !x, s = o > 0;
1310
+ if (!T && !s) return null;
1311
+ const g = h === 0 && m === 0 && p < gn, c = () => h > 0 ? i("potm.remaining_days_hours", { days: h, hours: m }) : m > 0 ? i("potm.remaining_hours_minutes", { hours: m, minutes: p }) : i("potm.remaining_minutes_seconds", { minutes: p, seconds: b });
1312
+ return /* @__PURE__ */ y("div", { css: ne.bar, children: [
1313
+ T && /* @__PURE__ */ y("div", { css: ne.item, children: [
1314
+ /* @__PURE__ */ n(Yt, { size: "1em", color: g ? e.danger : e.primary }),
1367
1315
  /* @__PURE__ */ n("p", { css: ne.label, children: i("potm.time_left_prefix") }),
1368
- /* @__PURE__ */ n("p", { "aria-live": "off", css: h ? ne.valueUrgent : ne.value, children: d() })
1316
+ /* @__PURE__ */ n("p", { "aria-live": "off", css: g ? ne.valueUrgent : ne.value, children: c() })
1369
1317
  ] }),
1370
- z && s && /* @__PURE__ */ n("p", { css: l ? ne.separatorShown : ne.separator, children: "·" }),
1371
- s && /* @__PURE__ */ v("div", { css: ne.item, children: [
1372
- /* @__PURE__ */ n(Oo, { size: "1em", color: e.tertiary }),
1318
+ T && s && /* @__PURE__ */ n("p", { css: d ? ne.separatorShown : ne.separator, children: "·" }),
1319
+ s && /* @__PURE__ */ y("div", { css: ne.item, children: [
1320
+ /* @__PURE__ */ n(Fo, { size: "1em", color: e.tertiary }),
1373
1321
  /* @__PURE__ */ n("p", { css: ne.label, children: i("potm.total_votes_cast", { count: o }) })
1374
1322
  ] })
1375
1323
  ] });
1376
- }, xn = ({ playerName: t, onJumpToVote: o }) => {
1377
- const { t: i } = G(), l = !!o;
1378
- return /* @__PURE__ */ v(
1379
- l ? "button" : "div",
1324
+ }, bn = ({ playerName: t, onJumpToVote: o }) => {
1325
+ const { t: i } = G(), d = !!o;
1326
+ return /* @__PURE__ */ y(
1327
+ d ? "button" : "div",
1380
1328
  {
1381
- type: l ? "button" : void 0,
1329
+ type: d ? "button" : void 0,
1382
1330
  onClick: o,
1383
- onMouseDown: (u) => u.stopPropagation(),
1384
- css: l ? _e.pill : _e.pillStatic,
1331
+ onMouseDown: (m) => m.stopPropagation(),
1332
+ css: d ? Pe.pill : Pe.pillStatic,
1385
1333
  children: [
1386
- /* @__PURE__ */ n(No, { size: "1em", color: y.textIcon }),
1387
- /* @__PURE__ */ n("p", { css: _e.text, children: i("potm.your_vote_is", { name: Qt(t) }) }),
1388
- l && /* @__PURE__ */ n("p", { css: _e.jump, children: i("potm.jump_to_vote") })
1334
+ /* @__PURE__ */ n(Ho, { size: "1em", color: v.textIcon }),
1335
+ /* @__PURE__ */ n("p", { css: Pe.text, children: i("potm.your_vote_is", { name: Gt(t) }) }),
1336
+ d && /* @__PURE__ */ n("p", { css: Pe.jump, children: i("potm.jump_to_vote") })
1389
1337
  ]
1390
1338
  }
1391
1339
  );
1392
- }, Sn = 450, wn = 25, Cn = 70, kn = 12, $n = (t) => {
1393
- const [o, i] = I(0), [l, p] = I(0), [u, f] = I(0), [b, x] = I(!1), [z, s] = I(0), h = $e(null), d = $e(null), c = Math.abs(z) > 10, g = () => {
1394
- d.current !== null && (clearInterval(d.current), d.current = null);
1340
+ }, vn = 450, yn = 25, xn = 70, wn = 12, Sn = (t) => {
1341
+ const [o, i] = I(0), [d, h] = I(0), [m, p] = I(0), [b, x] = I(!1), [T, s] = I(0), g = Ce(null), c = Ce(null), l = Math.abs(T) > 10, f = () => {
1342
+ c.current !== null && (clearInterval(c.current), c.current = null);
1395
1343
  };
1396
- U(() => g, []);
1397
- const k = (C) => {
1398
- g(), i(Math.max(0, Math.min(Math.max(t - 1, 0), C)));
1399
- }, S = (C) => {
1344
+ U(() => f, []);
1345
+ const $ = (C) => {
1346
+ f(), i(Math.max(0, Math.min(Math.max(t - 1, 0), C)));
1347
+ }, w = (C) => {
1400
1348
  var oe;
1401
- g();
1402
- const T = Math.max(0, Math.min(Math.max(t - 1, 0), C)), R = Math.abs(T - o), A = typeof window < "u" && ((oe = window.matchMedia) == null ? void 0 : oe.call(window, "(prefers-reduced-motion: reduce)").matches);
1403
- if (R <= 1 || R > kn || A) {
1404
- i(T);
1349
+ f();
1350
+ const z = Math.max(0, Math.min(Math.max(t - 1, 0), C)), R = Math.abs(z - o), M = typeof window < "u" && ((oe = window.matchMedia) == null ? void 0 : oe.call(window, "(prefers-reduced-motion: reduce)").matches);
1351
+ if (R <= 1 || R > wn || M) {
1352
+ i(z);
1405
1353
  return;
1406
1354
  }
1407
- const F = T > o ? 1 : -1, se = Math.min(
1408
- Cn,
1409
- Math.max(wn, Math.round(Sn / R))
1355
+ const F = z > o ? 1 : -1, se = Math.min(
1356
+ xn,
1357
+ Math.max(yn, Math.round(vn / R))
1410
1358
  );
1411
1359
  let q = o;
1412
- d.current = window.setInterval(() => {
1413
- q += F, i(q), q === T && g();
1360
+ c.current = window.setInterval(() => {
1361
+ q += F, i(q), q === z && f();
1414
1362
  }, se);
1415
1363
  }, E = () => {
1416
- g(), o > 0 && i(o - 1);
1364
+ f(), o > 0 && i(o - 1);
1417
1365
  }, _ = () => {
1418
- g(), o < t - 1 && i(o + 1);
1419
- }, m = (C) => {
1420
- g(), s(0), x(!0);
1421
- const T = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
1422
- p(T), f(T);
1366
+ f(), o < t - 1 && i(o + 1);
1367
+ }, u = (C) => {
1368
+ f(), s(0), x(!0);
1369
+ const z = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
1370
+ h(z), p(z);
1423
1371
  }, a = (C) => {
1424
1372
  if (!b) return;
1425
- const T = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
1426
- f(T);
1427
- const R = T - l;
1373
+ const z = "touches" in C ? C.touches[0] ? C.touches[0].clientX : 0 : "clientX" in C ? C.clientX : 0;
1374
+ p(z);
1375
+ const R = z - d;
1428
1376
  s(R);
1429
- }, w = () => {
1377
+ }, S = () => {
1430
1378
  if (b) {
1431
- if (c) {
1432
- const C = l - u, T = 50;
1433
- C > T && o < t - 1 ? i(o + 1) : C < -T && o > 0 && i(o - 1);
1379
+ if (l) {
1380
+ const C = d - m, z = 50;
1381
+ C > z && o < t - 1 ? i(o + 1) : C < -z && o > 0 && i(o - 1);
1434
1382
  }
1435
1383
  x(!1), s(0);
1436
1384
  }
1437
1385
  };
1438
1386
  return U(() => {
1439
- const C = h.current;
1387
+ const C = g.current;
1440
1388
  if (!C) return;
1441
- const T = (F) => m(F), R = (F) => a(F), A = () => w();
1442
- return C.addEventListener("touchstart", T), C.addEventListener("touchmove", R), C.addEventListener("touchend", A), () => {
1443
- C.removeEventListener("touchstart", T), C.removeEventListener("touchmove", R), C.removeEventListener("touchend", A);
1389
+ const z = (F) => u(F), R = (F) => a(F), M = () => S();
1390
+ return C.addEventListener("touchstart", z), C.addEventListener("touchmove", R), C.addEventListener("touchend", M), () => {
1391
+ C.removeEventListener("touchstart", z), C.removeEventListener("touchmove", R), C.removeEventListener("touchend", M);
1444
1392
  };
1445
- }, [b, l, u, o, t]), U(() => {
1446
- const C = h.current;
1393
+ }, [b, d, m, o, t]), U(() => {
1394
+ const C = g.current;
1447
1395
  if (!C) return;
1448
- const T = (R) => {
1449
- const A = R.target;
1450
- (A == null ? void 0 : A.tagName) === "INPUT" || (A == null ? void 0 : A.tagName) === "TEXTAREA" || A != null && A.isContentEditable || (R.key === "ArrowLeft" ? (R.preventDefault(), E()) : R.key === "ArrowRight" && (R.preventDefault(), _()));
1396
+ const z = (R) => {
1397
+ const M = R.target;
1398
+ (M == null ? void 0 : M.tagName) === "INPUT" || (M == null ? void 0 : M.tagName) === "TEXTAREA" || M != null && M.isContentEditable || (R.key === "ArrowLeft" ? (R.preventDefault(), E()) : R.key === "ArrowRight" && (R.preventDefault(), _()));
1451
1399
  };
1452
- return C.addEventListener("keydown", T), () => {
1453
- C.removeEventListener("keydown", T);
1400
+ return C.addEventListener("keydown", z), () => {
1401
+ C.removeEventListener("keydown", z);
1454
1402
  };
1455
1403
  }, [o, t]), {
1456
1404
  activeIndex: o,
1457
- jumpToIndex: k,
1458
- animateToIndex: S,
1459
- handleDragStart: m,
1405
+ jumpToIndex: $,
1406
+ animateToIndex: w,
1407
+ handleDragStart: u,
1460
1408
  handleDragMove: a,
1461
- handleDragEnd: w,
1409
+ handleDragEnd: S,
1462
1410
  goToPrevious: E,
1463
1411
  goToNext: _,
1464
- carouselRef: h,
1412
+ carouselRef: g,
1465
1413
  isDragging: b,
1466
- isSignificantDrag: c
1414
+ isSignificantDrag: l
1467
1415
  };
1468
- }, Mt = Q.teamPlaceholder, zn = (t, o, i) => {
1416
+ }, Pt = Q.teamPlaceholder, Cn = (t, o, i) => {
1469
1417
  var E, _;
1470
- const [l, p] = I([]), [u, f] = I([]), [b, x] = I([]), z = [
1418
+ const [d, h] = I([]), [m, p] = I([]), [b, x] = I([]), T = [
1471
1419
  {
1472
1420
  id: t.homeTeam.id,
1473
1421
  name: t.homeTeam.name,
1474
1422
  code: t.homeTeam.code,
1475
- logo: ((E = t.homeTeam.assets) == null ? void 0 : E.logo) || Mt
1423
+ logo: ((E = t.homeTeam.assets) == null ? void 0 : E.logo) || Pt
1476
1424
  },
1477
1425
  {
1478
1426
  id: t.awayTeam.id,
1479
1427
  name: t.awayTeam.name,
1480
1428
  code: t.awayTeam.code,
1481
- logo: ((_ = t.awayTeam.assets) == null ? void 0 : _.logo) || Mt
1429
+ logo: ((_ = t.awayTeam.assets) == null ? void 0 : _.logo) || Pt
1482
1430
  }
1483
- ], s = (m) => {
1431
+ ], s = (u) => {
1484
1432
  const a = t.playerStats.find(
1485
- (w) => w.playerId === m
1433
+ (S) => S.playerId === u
1486
1434
  );
1487
1435
  return (a == null ? void 0 : a.minutesPlayed) || 0;
1488
- }, h = (m) => {
1436
+ }, g = (u) => {
1489
1437
  if (!o || !o.data) return 0;
1490
1438
  const a = o.data.find(
1491
- (w) => w.playerId === m
1439
+ (S) => S.playerId === u
1492
1440
  );
1493
1441
  return a ? a.votes : 0;
1494
- }, d = t.lineups.homeTeam.players.filter((m) => m.type === "start").map((m) => {
1442
+ }, c = t.lineups.homeTeam.players.filter((u) => u.type === "start").map((u) => {
1495
1443
  var a;
1496
1444
  return {
1497
- id: m.id,
1498
- name: m.name,
1499
- number: m.shirtNumber || 0,
1445
+ id: u.id,
1446
+ name: u.name,
1447
+ number: u.shirtNumber || 0,
1500
1448
  team: t.homeTeam.id,
1501
- position: m.position || "Unknown",
1502
- image: (a = m.assets) == null ? void 0 : a.headshot,
1503
- type: m.type,
1504
- minutesPlayed: s(m.id),
1505
- votes: h(m.id)
1449
+ position: u.position || "Unknown",
1450
+ image: (a = u.assets) == null ? void 0 : a.headshot,
1451
+ type: u.type,
1452
+ minutesPlayed: s(u.id),
1453
+ votes: g(u.id)
1506
1454
  };
1507
- }) || [], c = t.lineups.awayTeam.players.filter((m) => m.type === "start").map((m) => {
1455
+ }) || [], l = t.lineups.awayTeam.players.filter((u) => u.type === "start").map((u) => {
1508
1456
  var a;
1509
1457
  return {
1510
- id: m.id,
1511
- name: m.name,
1512
- number: m.shirtNumber || 0,
1458
+ id: u.id,
1459
+ name: u.name,
1460
+ number: u.shirtNumber || 0,
1513
1461
  team: t.awayTeam.id,
1514
- position: m.position || "Unknown",
1515
- image: (a = m.assets) == null ? void 0 : a.headshot,
1516
- type: m.type,
1517
- minutesPlayed: s(m.id),
1518
- votes: h(m.id)
1462
+ position: u.position || "Unknown",
1463
+ image: (a = u.assets) == null ? void 0 : a.headshot,
1464
+ type: u.type,
1465
+ minutesPlayed: s(u.id),
1466
+ votes: g(u.id)
1519
1467
  };
1520
- }) || [], g = t.timeline.filter((m) => {
1521
- if (m.type === "substitution" && m.teamId === t.homeTeam.id)
1522
- return m;
1523
- }).map((m) => {
1524
- var w;
1468
+ }) || [], f = t.timeline.filter((u) => {
1469
+ if (u.type === "substitution" && u.teamId === t.homeTeam.id)
1470
+ return u;
1471
+ }).map((u) => {
1472
+ var S;
1525
1473
  const a = t.lineups.homeTeam.players.find(
1526
- (C) => C.id === m.relatedPlayer.id
1474
+ (C) => C.id === u.relatedPlayer.id
1527
1475
  );
1528
1476
  return {
1529
1477
  id: (a == null ? void 0 : a.id) ?? "",
@@ -1531,18 +1479,18 @@ const Tt = (t) => r({
1531
1479
  number: (a == null ? void 0 : a.shirtNumber) || 0,
1532
1480
  team: t.homeTeam.id,
1533
1481
  position: (a == null ? void 0 : a.position) || "Unknown",
1534
- image: ((w = a == null ? void 0 : a.assets) == null ? void 0 : w.headshot) ?? "",
1482
+ image: ((S = a == null ? void 0 : a.assets) == null ? void 0 : S.headshot) ?? "",
1535
1483
  type: (a == null ? void 0 : a.type) ?? "",
1536
1484
  minutesPlayed: s((a == null ? void 0 : a.id) ?? "") || 0,
1537
- votes: h((a == null ? void 0 : a.id) ?? "")
1485
+ votes: g((a == null ? void 0 : a.id) ?? "")
1538
1486
  };
1539
- }) || [], k = t.timeline.filter((m) => {
1540
- if (m.type === "substitution" && m.teamId === t.awayTeam.id)
1541
- return m;
1542
- }).map((m) => {
1543
- var w;
1487
+ }) || [], $ = t.timeline.filter((u) => {
1488
+ if (u.type === "substitution" && u.teamId === t.awayTeam.id)
1489
+ return u;
1490
+ }).map((u) => {
1491
+ var S;
1544
1492
  const a = t.lineups.awayTeam.players.find(
1545
- (C) => C.id === m.relatedPlayer.id
1493
+ (C) => C.id === u.relatedPlayer.id
1546
1494
  );
1547
1495
  return {
1548
1496
  id: (a == null ? void 0 : a.id) || "",
@@ -1550,28 +1498,28 @@ const Tt = (t) => r({
1550
1498
  number: (a == null ? void 0 : a.shirtNumber) || 0,
1551
1499
  team: t.awayTeam.id,
1552
1500
  position: (a == null ? void 0 : a.position) || "Unknown",
1553
- image: ((w = a == null ? void 0 : a.assets) == null ? void 0 : w.headshot) || "",
1501
+ image: ((S = a == null ? void 0 : a.assets) == null ? void 0 : S.headshot) || "",
1554
1502
  type: (a == null ? void 0 : a.type) || "",
1555
1503
  minutesPlayed: s((a == null ? void 0 : a.id) || "") || 0,
1556
- votes: h((a == null ? void 0 : a.id) || "")
1504
+ votes: g((a == null ? void 0 : a.id) || "")
1557
1505
  };
1558
1506
  }) || [];
1559
1507
  return U(() => {
1560
- p([...d, ...g]), f([...c, ...k]);
1508
+ h([...c, ...f]), p([...l, ...$]);
1561
1509
  }, [t, o]), U(() => {
1562
- let m = [...l, ...u];
1563
- i && i.length > 0 && (m = m.filter(
1510
+ let u = [...d, ...m];
1511
+ i && i.length > 0 && (u = u.filter(
1564
1512
  (a) => i.includes(a.id)
1565
- )), x(m);
1566
- }, [l, u, i]), {
1513
+ )), x(u);
1514
+ }, [d, m, i]), {
1567
1515
  players: b,
1568
- teams: z,
1569
- getTeamLogo: (m) => {
1570
- const a = z.find((w) => w.id === m);
1516
+ teams: T,
1517
+ getTeamLogo: (u) => {
1518
+ const a = T.find((S) => S.id === u);
1571
1519
  return a ? a.logo : "";
1572
1520
  }
1573
1521
  };
1574
- }, mo = {
1522
+ }, lo = {
1575
1523
  ł: "l",
1576
1524
  // l with stroke - pl
1577
1525
  đ: "d",
@@ -1592,313 +1540,313 @@ const Tt = (t) => r({
1592
1540
  œ: "oe",
1593
1541
  þ: "th"
1594
1542
  // thorn
1595
- }, Tn = new RegExp(
1596
- `[${Object.keys(mo).join("")}]`,
1543
+ }, $n = new RegExp(
1544
+ `[${Object.keys(lo).join("")}]`,
1597
1545
  "g"
1598
- ), et = (t) => t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(Tn, (o) => mo[o] || o).trim(), po = [
1546
+ ), Ze = (t) => t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace($n, (o) => lo[o] || o).trim(), co = [
1599
1547
  "keeper",
1600
1548
  "defender",
1601
1549
  "midfielder",
1602
1550
  "forward"
1603
- ], Bt = (t) => {
1604
- const o = et(t);
1605
- return po.includes(o) ? o : "unknown";
1606
- }, In = ({
1551
+ ], _t = (t) => {
1552
+ const o = Ze(t);
1553
+ return co.includes(o) ? o : "unknown";
1554
+ }, kn = ({
1607
1555
  players: t,
1608
1556
  teamFilter: o
1609
1557
  }) => {
1610
- const { i18n: i } = G(), [l, p] = I(""), [u, f] = I(
1558
+ const { i18n: i } = G(), [d, h] = I(""), [m, p] = I(
1611
1559
  "all"
1612
- ), b = Ce(
1560
+ ), b = we(
1613
1561
  () => new Intl.Collator(i.language, { numeric: !0 }),
1614
1562
  [i.language]
1615
- ), x = Ce(
1616
- () => o === "all" ? t : t.filter((c) => c.team === o),
1563
+ ), x = we(
1564
+ () => o === "all" ? t : t.filter((l) => l.team === o),
1617
1565
  [t, o]
1618
- ), z = Ce(() => {
1619
- const c = /* @__PURE__ */ new Map();
1620
- return x.forEach((g) => {
1621
- const k = Bt(g.position);
1622
- c.set(k, (c.get(k) || 0) + 1);
1623
- }), po.filter((g) => c.has(g)).map(
1624
- (g) => ({ bucket: g, count: c.get(g) || 0 })
1566
+ ), T = we(() => {
1567
+ const l = /* @__PURE__ */ new Map();
1568
+ return x.forEach((f) => {
1569
+ const $ = _t(f.position);
1570
+ l.set($, (l.get($) || 0) + 1);
1571
+ }), co.filter((f) => l.has(f)).map(
1572
+ (f) => ({ bucket: f, count: l.get(f) || 0 })
1625
1573
  );
1626
- }, [x]), s = Ce(() => {
1627
- const c = et(l);
1628
- return [...x.filter((k) => u !== "all" && Bt(k.position) !== u ? !1 : c ? et(k.name).includes(c) || String(k.number).startsWith(c) : !0)].sort(
1629
- (k, S) => (S.votes || 0) - (k.votes || 0) || b.compare(k.name, S.name)
1574
+ }, [x]), s = we(() => {
1575
+ const l = Ze(d);
1576
+ return [...x.filter(($) => m !== "all" && _t($.position) !== m ? !1 : l ? Ze($.name).includes(l) || String($.number).startsWith(l) : !0)].sort(
1577
+ ($, w) => (w.votes || 0) - ($.votes || 0) || b.compare($.name, w.name)
1630
1578
  );
1631
- }, [x, l, u, b]), h = !!l || u !== "all", d = () => {
1632
- p(""), f("all");
1579
+ }, [x, d, m, b]), g = !!d || m !== "all", c = () => {
1580
+ h(""), p("all");
1633
1581
  };
1634
1582
  return {
1635
- query: l,
1636
- setQuery: p,
1637
- positionFilter: u,
1638
- setPositionFilter: f,
1639
- positionCounts: z,
1583
+ query: d,
1584
+ setQuery: h,
1585
+ positionFilter: m,
1586
+ setPositionFilter: p,
1587
+ positionCounts: T,
1640
1588
  filteredPlayers: s,
1641
1589
  teamScopedCount: x.length,
1642
- isFiltered: h,
1643
- resetFilters: d
1590
+ isFiltered: g,
1591
+ resetFilters: c
1644
1592
  };
1645
- }, Dn = (t, o) => {
1593
+ }, Tn = (t, o) => {
1646
1594
  U(() => {
1647
1595
  o(0);
1648
1596
  }, [t]);
1649
- }, Rn = 4, Pn = (t) => {
1597
+ }, zn = 4, In = (t) => {
1650
1598
  const o = /* @__PURE__ */ new Map();
1651
1599
  return t != null && t.data && t.data.forEach((i) => {
1652
1600
  o.set(i.playerId, i.votes);
1653
1601
  }), o;
1654
- }, _n = ({
1602
+ }, Dn = ({
1655
1603
  match: t,
1656
1604
  sdk: o,
1657
1605
  userVote: i,
1658
- votingResults: l,
1659
- handleVote: p,
1660
- isVotingClosed: u,
1661
- show: f = "all",
1606
+ votingResults: d,
1607
+ handleVote: h,
1608
+ isVotingClosed: m,
1609
+ show: p = "all",
1662
1610
  showPlayers: b,
1663
1611
  defaultImagePlaceholderUrl: x,
1664
- showSignInCTA: z,
1612
+ showSignInCTA: T,
1665
1613
  signInCTA: s,
1666
- votingDeadline: h = null
1614
+ votingDeadline: g = null
1667
1615
  }) => {
1668
- const { t: d } = G(), { players: c, teams: g, getTeamLogo: k } = zn(
1616
+ const { t: c } = G(), { players: l, teams: f, getTeamLogo: $ } = Cn(
1669
1617
  t,
1670
- l,
1618
+ d,
1671
1619
  b
1672
- ), [S, E] = I(f ?? "all"), [_, m] = I(i), [a, w] = I(!1), [C, T] = I({
1620
+ ), [w, E] = I(p ?? "all"), [_, u] = I(i), [a, S] = I(!1), [C, z] = I({
1673
1621
  open: !1,
1674
1622
  variant: "success",
1675
1623
  title: "",
1676
1624
  message: ""
1677
- }), [R, A] = I(
1678
- Pn(l)
1679
- ), [F, se] = I(null), q = ($, D) => {
1680
- T({ open: !0, variant: $, title: "", message: D });
1625
+ }), [R, M] = I(
1626
+ In(d)
1627
+ ), [F, se] = I(null), q = (k, D) => {
1628
+ z({ open: !0, variant: k, title: "", message: D });
1681
1629
  }, oe = () => {
1682
- T(($) => ({ ...$, open: !1 }));
1630
+ z((k) => ({ ...k, open: !1 }));
1683
1631
  }, {
1684
1632
  query: me,
1685
1633
  setQuery: Te,
1686
- positionFilter: ye,
1687
- setPositionFilter: Ie,
1688
- positionCounts: Oe,
1634
+ positionFilter: be,
1635
+ setPositionFilter: ze,
1636
+ positionCounts: He,
1689
1637
  filteredPlayers: Y,
1690
- teamScopedCount: De,
1691
- resetFilters: Ne
1692
- } = In({ players: c, teamFilter: S }), {
1638
+ teamScopedCount: Ie,
1639
+ resetFilters: Oe
1640
+ } = kn({ players: l, teamFilter: w }), {
1693
1641
  activeIndex: re,
1694
1642
  jumpToIndex: pe,
1695
- animateToIndex: xe,
1643
+ animateToIndex: ve,
1696
1644
  handleDragStart: H,
1697
1645
  handleDragMove: W,
1698
1646
  handleDragEnd: ee,
1699
- goToPrevious: Xe,
1700
- goToNext: Re,
1647
+ goToPrevious: Ne,
1648
+ goToNext: De,
1701
1649
  carouselRef: O
1702
- } = $n(Y.length);
1703
- Dn(
1704
- `${me}|${ye}|${S}`,
1650
+ } = Sn(Y.length);
1651
+ Tn(
1652
+ `${me}|${be}|${w}`,
1705
1653
  pe
1706
1654
  ), U(() => {
1707
- m(i);
1655
+ u(i);
1708
1656
  }, [i]), U(() => {
1709
- E(f);
1710
- }, [f]);
1711
- const te = ($, D) => {
1657
+ E(p);
1658
+ }, [p]);
1659
+ const te = (k, D) => {
1712
1660
  const X = new Map(R);
1713
- if ($) {
1661
+ if (k) {
1714
1662
  const le = X.get(D) || 0;
1715
1663
  X.set(D, Math.max(0, le - 1));
1716
1664
  } else {
1717
1665
  const le = X.get(D) || 0;
1718
1666
  if (X.set(D, le + 1), _ && _ !== D) {
1719
- const $o = X.get(_) || 0;
1720
- X.set(_, Math.max(0, $o - 1));
1667
+ const So = X.get(_) || 0;
1668
+ X.set(_, Math.max(0, So - 1));
1721
1669
  }
1722
1670
  }
1723
- A(X);
1724
- }, Ve = async ($) => {
1725
- w(!0);
1671
+ M(X);
1672
+ }, Xe = async (k) => {
1673
+ S(!0);
1726
1674
  try {
1727
- const D = _ === $;
1728
- await p($) ? (te(D, $), m(D ? null : $), q(
1675
+ const D = _ === k;
1676
+ await h(k) ? (te(D, k), u(D ? null : k), q(
1729
1677
  "success",
1730
- d(D ? "potm.vote_removed" : "potm.vote_success")
1731
- )) : q("error", d("potm.vote_error"));
1678
+ c(D ? "potm.vote_removed" : "potm.vote_success")
1679
+ )) : q("error", c("potm.vote_error"));
1732
1680
  } catch (D) {
1733
1681
  console.error("Error handling vote", D);
1734
- const { status: X } = We(D, o);
1735
- X === "voting_potm_finished" || X === "voting_potm_not_started" ? q("error", d("potm.voting_closed")) : q("error", d("potm.vote_error"));
1682
+ const { status: X } = Le(D, o);
1683
+ X === "voting_potm_finished" || X === "voting_potm_not_started" ? q("error", c("potm.voting_closed")) : q("error", c("potm.vote_error"));
1736
1684
  } finally {
1737
- w(!1);
1685
+ S(!1);
1738
1686
  }
1739
- }, xo = ($) => {
1740
- a || H($);
1741
- }, So = ($) => {
1742
- a || W($);
1743
- }, it = () => {
1687
+ }, bo = (k) => {
1688
+ a || H(k);
1689
+ }, vo = (k) => {
1690
+ a || W(k);
1691
+ }, rt = () => {
1744
1692
  a || ee();
1745
- }, at = ($) => {
1746
- if (R.has($))
1747
- return R.get($) || 0;
1748
- if (!l || !l.data) return 0;
1749
- const D = l.data.find(
1750
- (X) => X.playerId === $
1693
+ }, it = (k) => {
1694
+ if (R.has(k))
1695
+ return R.get(k) || 0;
1696
+ if (!d || !d.data) return 0;
1697
+ const D = d.data.find(
1698
+ (X) => X.playerId === k
1751
1699
  );
1752
1700
  return D ? D.votes : 0;
1753
- }, wo = ($) => {
1701
+ }, yo = (k) => {
1754
1702
  const D = Y.findIndex(
1755
- (le) => le.id === $
1703
+ (le) => le.id === k
1756
1704
  );
1757
1705
  if (D !== -1) {
1758
- xe(D);
1706
+ ve(D);
1759
1707
  return;
1760
1708
  }
1761
- const X = c.find((le) => le.id === $);
1762
- X && (Te(""), Ie("all"), f.toLowerCase() === "all" && E(X.team), se($));
1709
+ const X = l.find((le) => le.id === k);
1710
+ X && (Te(""), ze("all"), p.toLowerCase() === "all" && E(X.team), se(k));
1763
1711
  };
1764
1712
  U(() => {
1765
1713
  if (!F) return;
1766
- const $ = Y.findIndex(
1714
+ const k = Y.findIndex(
1767
1715
  (D) => D.id === F
1768
1716
  );
1769
- $ !== -1 && (pe($), se(null));
1717
+ k !== -1 && (pe(k), se(null));
1770
1718
  }, [F, Y]);
1771
- const Se = _ ? c.find(($) => $.id === _) : void 0, Co = !!(Se && (f.toLowerCase() === "all" || Se.team === S)), ko = c.reduce(
1772
- ($, D) => $ + at(D.id),
1719
+ const ye = _ ? l.find((k) => k.id === _) : void 0, xo = !!(ye && (p.toLowerCase() === "all" || ye.team === w)), wo = l.reduce(
1720
+ (k, D) => k + it(D.id),
1773
1721
  0
1774
1722
  );
1775
- return /* @__PURE__ */ v("div", { css: ie.root, children: [
1723
+ return /* @__PURE__ */ y("div", { css: ie.root, children: [
1776
1724
  /* @__PURE__ */ n(
1777
- yn,
1725
+ hn,
1778
1726
  {
1779
- votingDeadline: h,
1780
- totalVotes: ko
1727
+ votingDeadline: g,
1728
+ totalVotes: wo
1781
1729
  }
1782
1730
  ),
1783
- Se && /* @__PURE__ */ n(
1784
- xn,
1731
+ ye && /* @__PURE__ */ n(
1732
+ bn,
1785
1733
  {
1786
- playerName: Se.name,
1787
- onJumpToVote: Co ? () => wo(Se.id) : void 0
1734
+ playerName: ye.name,
1735
+ onJumpToVote: xo ? () => yo(ye.id) : void 0
1788
1736
  }
1789
1737
  ),
1790
- f.toLowerCase() === "all" && /* @__PURE__ */ n(
1791
- bn,
1738
+ p.toLowerCase() === "all" && /* @__PURE__ */ n(
1739
+ fn,
1792
1740
  {
1793
- teams: g,
1794
- activeFilter: S,
1741
+ teams: f,
1742
+ activeFilter: w,
1795
1743
  setActiveFilter: E,
1796
1744
  setActiveIndex: pe
1797
1745
  }
1798
1746
  ),
1799
- /* @__PURE__ */ v("div", { css: ie.filterGroup, children: [
1747
+ /* @__PURE__ */ y("div", { css: ie.filterGroup, children: [
1800
1748
  /* @__PURE__ */ n(
1801
- mn,
1749
+ cn,
1802
1750
  {
1803
1751
  query: me,
1804
1752
  setQuery: Te,
1805
1753
  resultCount: Y.length,
1806
- totalCount: De
1754
+ totalCount: Ie
1807
1755
  }
1808
1756
  ),
1809
1757
  /* @__PURE__ */ n(
1810
- pn,
1758
+ dn,
1811
1759
  {
1812
- positionCounts: Oe,
1813
- positionFilter: ye,
1814
- setPositionFilter: Ie,
1815
- totalCount: De
1760
+ positionCounts: He,
1761
+ positionFilter: be,
1762
+ setPositionFilter: ze,
1763
+ totalCount: Ie
1816
1764
  }
1817
1765
  )
1818
1766
  ] }),
1819
- Y.length === 0 ? /* @__PURE__ */ v("div", { css: ie.noResults, children: [
1820
- /* @__PURE__ */ n("p", { css: ie.noResultsText, children: me ? d("potm.no_search_results", { query: Qt(me) }) : d("potm.no_players_for_filter") }),
1821
- /* @__PURE__ */ n("button", { type: "button", css: ie.clearFilters, onClick: Ne, children: d("potm.clear_filters") })
1822
- ] }) : /* @__PURE__ */ v(ke, { children: [
1823
- /* @__PURE__ */ v(
1767
+ Y.length === 0 ? /* @__PURE__ */ y("div", { css: ie.noResults, children: [
1768
+ /* @__PURE__ */ n("p", { css: ie.noResultsText, children: me ? c("potm.no_search_results", { query: Gt(me) }) : c("potm.no_players_for_filter") }),
1769
+ /* @__PURE__ */ n("button", { type: "button", css: ie.clearFilters, onClick: Oe, children: c("potm.clear_filters") })
1770
+ ] }) : /* @__PURE__ */ y(Se, { children: [
1771
+ /* @__PURE__ */ y(
1824
1772
  "div",
1825
1773
  {
1826
1774
  ref: O,
1827
1775
  tabIndex: 0,
1828
1776
  role: "region",
1829
- "aria-label": d("potm.carousel_label"),
1777
+ "aria-label": c("potm.carousel_label"),
1830
1778
  css: ie.container,
1831
- onMouseDown: xo,
1832
- onMouseMove: So,
1833
- onMouseUp: it,
1834
- onMouseLeave: it,
1779
+ onMouseDown: bo,
1780
+ onMouseMove: vo,
1781
+ onMouseUp: rt,
1782
+ onMouseLeave: rt,
1835
1783
  children: [
1836
1784
  /* @__PURE__ */ n(
1837
- qo,
1785
+ Yo,
1838
1786
  {
1839
1787
  activeIndex: re,
1840
1788
  totalItems: Y.length,
1841
- onPrev: Xe,
1842
- onNext: Re
1789
+ onPrev: Ne,
1790
+ onNext: De
1843
1791
  }
1844
1792
  ),
1845
1793
  /* @__PURE__ */ n("div", { css: ie.content, children: Y.map(
1846
- ($, D) => Math.abs(D - re) > Rn ? null : /* @__PURE__ */ n(
1847
- ln,
1794
+ (k, D) => Math.abs(D - re) > zn ? null : /* @__PURE__ */ n(
1795
+ rn,
1848
1796
  {
1849
- player: $,
1850
- isSelected: _ === $.id,
1851
- voteCount: at($.id),
1797
+ player: k,
1798
+ isSelected: _ === k.id,
1799
+ voteCount: it(k.id),
1852
1800
  index: D,
1853
1801
  activeIndex: re,
1854
- teamLogo: k($.team),
1855
- handleVote: Ve,
1802
+ teamLogo: $(k.team),
1803
+ handleVote: Xe,
1856
1804
  isVoting: a,
1857
- isVotingClosed: u,
1805
+ isVotingClosed: m,
1858
1806
  defaultImagePlaceholderUrl: x,
1859
- showSignInCTA: z,
1807
+ showSignInCTA: T,
1860
1808
  signInCTA: s
1861
1809
  },
1862
- $.id
1810
+ k.id
1863
1811
  )
1864
1812
  ) })
1865
1813
  ]
1866
1814
  }
1867
1815
  ),
1868
1816
  /* @__PURE__ */ n(
1869
- Jo,
1817
+ Ko,
1870
1818
  {
1871
1819
  activeIndex: re,
1872
1820
  totalItems: Y.length
1873
1821
  }
1874
1822
  ),
1875
1823
  /* @__PURE__ */ n(
1876
- gn,
1824
+ mn,
1877
1825
  {
1878
1826
  players: Y,
1879
1827
  activeIndex: re,
1880
1828
  votedPlayerId: _,
1881
- onSelect: xe
1829
+ onSelect: ve
1882
1830
  }
1883
1831
  ),
1884
- Y.length > 1 && !u && /* @__PURE__ */ n("p", { css: ie.hint, children: d("potm.helper_text") })
1832
+ Y.length > 1 && !m && /* @__PURE__ */ n("p", { css: ie.hint, children: c("potm.helper_text") })
1885
1833
  ] }),
1886
- /* @__PURE__ */ n(_o, { notification: C, onClose: oe })
1834
+ /* @__PURE__ */ n(Do, { notification: C, onClose: oe })
1887
1835
  ] });
1888
- }, Ye = "var(--fu-ucrc-palette-text-primary)", An = "var(--fu-ucrc-palette-text-secondary)", tt = "#DDE7EE", ot = "#CDD7E1", fo = "#9FA6AD", he = { ...Ao, display: "block", fontFamily: e.fontBody }, N = {
1889
- h3: { ...he, ...Mo, fontWeight: 600, color: Ye },
1890
- h4: { ...he, letterSpacing: "-0.025em", fontWeight: 600, color: Ye },
1891
- titleLg: { ...he, lineHeight: 1.33334, fontWeight: 600, color: Ye },
1892
- titleMd: { ...he, fontWeight: 500 },
1893
- body: he,
1894
- bodyXs: { ...he, fontWeight: 500 }
1895
- }, go = (t) => ({
1836
+ }, Ge = "var(--fu-ucrc-palette-text-primary)", Rn = "var(--fu-ucrc-palette-text-secondary)", et = "#DDE7EE", tt = "#CDD7E1", uo = "#9FA6AD", ge = { ...Ro, display: "block", fontFamily: e.fontBody }, N = {
1837
+ h3: { ...ge, ...Po, fontWeight: 600, color: Ge },
1838
+ h4: { ...ge, letterSpacing: "-0.025em", fontWeight: 600, color: Ge },
1839
+ titleLg: { ...ge, lineHeight: 1.33334, fontWeight: 600, color: Ge },
1840
+ titleMd: { ...ge, fontWeight: 500 },
1841
+ body: ge,
1842
+ bodyXs: { ...ge, fontWeight: 500 }
1843
+ }, mo = (t) => ({
1896
1844
  "& > :not(style):not(style)": { margin: 0 },
1897
1845
  "& > :not(style) ~ :not(style)": { marginTop: t }
1898
- }), ho = (t) => ({
1846
+ }), po = (t) => ({
1899
1847
  "& > :not(style):not(style)": { margin: 0 },
1900
1848
  "& > :not(style) ~ :not(style)": { marginLeft: t }
1901
- }), bo = {
1849
+ }), fo = {
1902
1850
  position: "relative",
1903
1851
  fontFamily: e.fontBody,
1904
1852
  fontWeight: 500,
@@ -1907,7 +1855,7 @@ const Tt = (t) => r({
1907
1855
  userSelect: "none",
1908
1856
  // Joy's Avatar image: hides the alt text while it loads.
1909
1857
  "& > img": { textAlign: "center", color: "transparent", textIndent: "10000px" }
1910
- }, Mn = `var(--fu-ucrc-potm-banner-text, ${e.dim})`, Et = {
1858
+ }, Pn = `var(--fu-ucrc-potm-banner-text, ${e.dim})`, Mt = {
1911
1859
  fontFamily: e.fontBody,
1912
1860
  lineHeight: 1.5,
1913
1861
  color: "var(--fu-ucrc-neutral-outlined-color)",
@@ -1947,73 +1895,73 @@ const Tt = (t) => r({
1947
1895
  backgroundSize: "3.75em 3.75em",
1948
1896
  zIndex: 3
1949
1897
  }
1950
- }, vo = { alignItems: "center", width: "100%" }, Lt = { ...vo, justifyContent: "space-between" }, Wt = { ...vo, justifyContent: "center", gap: e.space2xs }, Ft = { display: "flex", alignItems: "center", gap: e.spaceXs, width: "45%", position: "relative", zIndex: 1 }, Ht = { ...bo, backgroundColor: "transparent" }, Ee = { ...N.body, color: Mn }, M = {
1898
+ }, go = { alignItems: "center", width: "100%" }, At = { ...go, justifyContent: "space-between" }, Bt = { ...go, justifyContent: "center", gap: e.space2xs }, Et = { display: "flex", alignItems: "center", gap: e.spaceXs, width: "45%", position: "relative", zIndex: 1 }, Lt = { ...fo, backgroundColor: "transparent" }, Be = { ...N.body, color: Pn }, A = {
1951
1899
  root: r({ textAlign: "center", position: "relative" }),
1952
- intro: r({ display: "flex", flexDirection: "column", marginBottom: e.spaceMd, ...go(e.spaceMd) }),
1900
+ intro: r({ display: "flex", flexDirection: "column", marginBottom: e.spaceMd, ...mo(e.spaceMd) }),
1953
1901
  title: r({ ...N.h4, fontSize: "1.25em" }),
1954
1902
  description: r({ ...N.body, color: e.dim, fontSize: "1em" }),
1955
1903
  bannerWrap: r({ display: "flex", justifyContent: "center", marginBottom: e.spaceMd }),
1956
- banner: r({ ...Et, padding: e.spaceSm }),
1957
- bannerSm: r({ ...Et, padding: e.spaceMd }),
1904
+ banner: r({ ...Mt, padding: e.spaceSm }),
1905
+ bannerSm: r({ ...Mt, padding: e.spaceMd }),
1958
1906
  // Large screens get the full names side by side; smaller ones a single line of team codes.
1959
- desktop: r({ ...Lt, display: "flex" }),
1960
- desktopHidden: r({ ...Lt, display: "none" }),
1961
- mobile: r({ ...Wt, display: "flex" }),
1962
- mobileHidden: r({ ...Wt, display: "none" }),
1963
- homeTeam: r(Ft),
1964
- awayTeam: r({ ...Ft, justifyContent: "flex-end" }),
1965
- avatarLarge: r({ ...Ht, padding: e.spaceXs, width: "4.6875em", height: "4.6875em" }),
1966
- avatarSmall: r({ ...Ht, padding: e.space2xs, width: "1.75em", height: "1.75em" }),
1967
- name: r({ ...Ee, fontSize: "1em", fontWeight: 500, unicodeBidi: "plaintext" }),
1968
- code: r({ ...Ee, fontSize: "0.875em", fontWeight: 500, unicodeBidi: "plaintext" }),
1907
+ desktop: r({ ...At, display: "flex" }),
1908
+ desktopHidden: r({ ...At, display: "none" }),
1909
+ mobile: r({ ...Bt, display: "flex" }),
1910
+ mobileHidden: r({ ...Bt, display: "none" }),
1911
+ homeTeam: r(Et),
1912
+ awayTeam: r({ ...Et, justifyContent: "flex-end" }),
1913
+ avatarLarge: r({ ...Lt, padding: e.spaceXs, width: "4.6875em", height: "4.6875em" }),
1914
+ avatarSmall: r({ ...Lt, padding: e.space2xs, width: "1.75em", height: "1.75em" }),
1915
+ name: r({ ...Be, fontSize: "1em", fontWeight: 500, unicodeBidi: "plaintext" }),
1916
+ code: r({ ...Be, fontSize: "0.875em", fontWeight: 500, unicodeBidi: "plaintext" }),
1969
1917
  vsBox: r({ textAlign: "center", width: "20%", position: "relative", zIndex: 1 }),
1970
- vs: r({ ...Ee, fontSize: "0.75em" }),
1971
- vsInline: r({ ...Ee, marginLeft: e.space2xs, marginRight: e.space2xs, fontSize: "0.75em" })
1972
- }, Bn = ({ teams: t, headerBannerStyles: o }) => {
1973
- var b, x, z, s, h, d;
1974
- const { t: i } = G(), l = Z("sm"), p = Z("lg"), u = {
1918
+ vs: r({ ...Be, fontSize: "0.75em" }),
1919
+ vsInline: r({ ...Be, marginLeft: e.space2xs, marginRight: e.space2xs, fontSize: "0.75em" })
1920
+ }, _n = ({ teams: t, headerBannerStyles: o }) => {
1921
+ var b, x, T, s, g, c;
1922
+ const { t: i } = G(), d = Z("sm"), h = Z("lg"), m = {
1975
1923
  background: o == null ? void 0 : o.background,
1976
1924
  borderColor: o == null ? void 0 : o.borderColor,
1977
1925
  "--fu-ucrc-potm-banner-text": o == null ? void 0 : o.textColor
1978
- }, f = (c, g) => /* @__PURE__ */ n(co, { src: c == null ? void 0 : c.logo, alt: c == null ? void 0 : c.name, css: g ? M.avatarLarge : M.avatarSmall });
1979
- return /* @__PURE__ */ v("div", { css: M.root, children: [
1980
- /* @__PURE__ */ v("div", { css: M.intro, children: [
1981
- /* @__PURE__ */ n("h4", { css: M.title, children: i("potm.title") }),
1982
- /* @__PURE__ */ n("p", { css: M.description, children: i("potm.description") })
1926
+ }, p = (l, f) => /* @__PURE__ */ n(ao, { src: l == null ? void 0 : l.logo, alt: l == null ? void 0 : l.name, css: f ? A.avatarLarge : A.avatarSmall });
1927
+ return /* @__PURE__ */ y("div", { css: A.root, children: [
1928
+ /* @__PURE__ */ y("div", { css: A.intro, children: [
1929
+ /* @__PURE__ */ n("h4", { css: A.title, children: i("potm.title") }),
1930
+ /* @__PURE__ */ n("p", { css: A.description, children: i("potm.description") })
1983
1931
  ] }),
1984
- /* @__PURE__ */ n("div", { css: M.bannerWrap, children: /* @__PURE__ */ v("div", { css: l ? M.bannerSm : M.banner, style: u, children: [
1985
- /* @__PURE__ */ v("div", { css: p ? M.desktop : M.desktopHidden, children: [
1986
- t.length > 0 && /* @__PURE__ */ v("div", { css: M.homeTeam, children: [
1987
- f(t[0], !0),
1988
- /* @__PURE__ */ n("p", { css: M.name, children: (b = t[0]) == null ? void 0 : b.name })
1932
+ /* @__PURE__ */ n("div", { css: A.bannerWrap, children: /* @__PURE__ */ y("div", { css: d ? A.bannerSm : A.banner, style: m, children: [
1933
+ /* @__PURE__ */ y("div", { css: h ? A.desktop : A.desktopHidden, children: [
1934
+ t.length > 0 && /* @__PURE__ */ y("div", { css: A.homeTeam, children: [
1935
+ p(t[0], !0),
1936
+ /* @__PURE__ */ n("p", { css: A.name, children: (b = t[0]) == null ? void 0 : b.name })
1989
1937
  ] }),
1990
- /* @__PURE__ */ n("div", { css: M.vsBox, children: /* @__PURE__ */ n("p", { css: M.vs, children: i("potm.vs") }) }),
1991
- t.length > 1 && /* @__PURE__ */ v("div", { css: M.awayTeam, children: [
1992
- /* @__PURE__ */ n("p", { css: M.name, children: (x = t[1]) == null ? void 0 : x.name }),
1993
- f(t[1], !0)
1938
+ /* @__PURE__ */ n("div", { css: A.vsBox, children: /* @__PURE__ */ n("p", { css: A.vs, children: i("potm.vs") }) }),
1939
+ t.length > 1 && /* @__PURE__ */ y("div", { css: A.awayTeam, children: [
1940
+ /* @__PURE__ */ n("p", { css: A.name, children: (x = t[1]) == null ? void 0 : x.name }),
1941
+ p(t[1], !0)
1994
1942
  ] })
1995
1943
  ] }),
1996
- /* @__PURE__ */ v("div", { css: p ? M.mobileHidden : M.mobile, children: [
1997
- t.length > 0 && /* @__PURE__ */ v(ke, { children: [
1998
- /* @__PURE__ */ n("p", { css: M.code, children: ((z = t[0]) == null ? void 0 : z.code) || ((s = t[0]) == null ? void 0 : s.name.substring(0, 3)) }),
1999
- f(t[0], !1)
1944
+ /* @__PURE__ */ y("div", { css: h ? A.mobileHidden : A.mobile, children: [
1945
+ t.length > 0 && /* @__PURE__ */ y(Se, { children: [
1946
+ /* @__PURE__ */ n("p", { css: A.code, children: ((T = t[0]) == null ? void 0 : T.code) || ((s = t[0]) == null ? void 0 : s.name.substring(0, 3)) }),
1947
+ p(t[0], !1)
2000
1948
  ] }),
2001
- /* @__PURE__ */ n("p", { css: M.vsInline, children: i("potm.vs") }),
2002
- t.length > 1 && /* @__PURE__ */ v(ke, { children: [
2003
- f(t[1], !1),
2004
- /* @__PURE__ */ n("p", { css: M.code, children: ((h = t[1]) == null ? void 0 : h.code) || ((d = t[1]) == null ? void 0 : d.name.substring(0, 3)) })
1949
+ /* @__PURE__ */ n("p", { css: A.vsInline, children: i("potm.vs") }),
1950
+ t.length > 1 && /* @__PURE__ */ y(Se, { children: [
1951
+ p(t[1], !1),
1952
+ /* @__PURE__ */ n("p", { css: A.code, children: ((g = t[1]) == null ? void 0 : g.code) || ((c = t[1]) == null ? void 0 : c.name.substring(0, 3)) })
2005
1953
  ] })
2006
1954
  ] })
2007
1955
  ] }) })
2008
1956
  ] });
2009
- }, En = {
1957
+ }, Mn = {
2010
1958
  display: "flex",
2011
1959
  flexDirection: "column",
2012
1960
  alignItems: "center",
2013
1961
  justifyContent: "flex-start",
2014
1962
  gap: "0.75em 1em",
2015
1963
  padding: `${e.spaceLg} ${e.spaceMd}`,
2016
- borderRadius: ve.md,
1964
+ borderRadius: ke.md,
2017
1965
  backgroundColor: "var(--fu-ucrc-bg-surface)",
2018
1966
  fontFamily: e.fontBody,
2019
1967
  lineHeight: 1.5,
@@ -2024,7 +1972,7 @@ const Tt = (t) => r({
2024
1972
  transformOrigin: "center top",
2025
1973
  transition: "all 0.3s ease",
2026
1974
  overflow: "visible"
2027
- }, Ln = {
1975
+ }, An = {
2028
1976
  winner: {
2029
1977
  border: `${e.borderSize} solid ${e.warning}`,
2030
1978
  boxShadow: `0 0.625em 1.5625em color-mix(in srgb, ${e.warning} 20%, transparent)`,
@@ -2042,16 +1990,16 @@ const Tt = (t) => r({
2042
1990
  opacity: 0.4
2043
1991
  }
2044
1992
  },
2045
- second: { border: `${e.borderSize} solid ${tt}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 1 },
2046
- other: { border: `${e.borderSize} solid ${tt}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 0 }
2047
- }, Wn = ["winner", "second", "other"], yo = {};
2048
- for (const t of Wn)
1993
+ second: { border: `${e.borderSize} solid ${et}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 1 },
1994
+ other: { border: `${e.borderSize} solid ${et}`, boxShadow: "0 0.3125em 0.9375em rgba(0,0,0,0.06)", zIndex: 0 }
1995
+ }, Bn = ["winner", "second", "other"], ho = {};
1996
+ for (const t of Bn)
2049
1997
  for (const o of [!1, !0])
2050
- yo[`${t}|${o}`] = r(En, Ln[t], {
1998
+ ho[`${t}|${o}`] = r(Mn, An[t], {
2051
1999
  width: o ? "30%" : "auto",
2052
2000
  transform: `scale(${o ? t === "winner" ? 1.01 : 0.95 : 1})`
2053
2001
  });
2054
- const Ot = {
2002
+ const Wt = {
2055
2003
  position: "absolute",
2056
2004
  top: "-0.9375em",
2057
2005
  left: "50%",
@@ -2064,27 +2012,27 @@ const Ot = {
2064
2012
  alignItems: "center",
2065
2013
  boxShadow: "0 0.125em 0.5em rgba(0,0,0,0.2)",
2066
2014
  zIndex: 10
2067
- }, Nt = {
2068
- ...bo,
2015
+ }, Ft = {
2016
+ ...fo,
2069
2017
  backgroundColor: "var(--fu-ucrc-neutral-soft-bg)",
2070
2018
  marginTop: e.spaceMd,
2071
2019
  marginBottom: e.spaceMd
2072
- }, Xt = { width: "80%", marginLeft: "auto", marginRight: "auto", height: "0.5em", borderRadius: "0.25em", overflow: "hidden", position: "relative" }, Vt = { position: "absolute", top: 0, left: 0, height: "100%", borderRadius: "0.25em", transition: "width 1s ease-in-out" }, jt = { ...N.titleMd, fontSize: "1em" }, Fn = { color: "rgb(154, 91, 19)", ".dark &": { color: "rgb(234, 154, 62)" } }, B = {
2020
+ }, Ht = { width: "80%", marginLeft: "auto", marginRight: "auto", height: "0.5em", borderRadius: "0.25em", overflow: "hidden", position: "relative" }, Ot = { position: "absolute", top: 0, left: 0, height: "100%", borderRadius: "0.25em", transition: "width 1s ease-in-out" }, Nt = { ...N.titleMd, fontSize: "1em" }, En = { color: "rgb(154, 91, 19)", ".dark &": { color: "rgb(234, 154, 62)" } }, B = {
2073
2021
  root: r({ paddingBottom: e.spaceXl }),
2074
2022
  titleBox: r({ marginBottom: e.spaceXl }),
2075
2023
  title: r({ ...N.h3, textAlign: "center", fontSize: "1.5em" }),
2076
2024
  list: r({ display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "stretch", gap: e.spaceXl }),
2077
2025
  listSm: r({ display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "stretch", gap: e.spaceXl }),
2078
- badgeWinner: r({ ...Ot, backgroundColor: e.warning, fontSize: "1.2em" }),
2079
- badge: r({ ...Ot, backgroundColor: ot, fontSize: "1em" }),
2026
+ badgeWinner: r({ ...Wt, backgroundColor: e.warning, fontSize: "1.2em" }),
2027
+ badge: r({ ...Wt, backgroundColor: tt, fontSize: "1em" }),
2080
2028
  medal: r({ fontSize: "1.375em", lineHeight: 1 }),
2081
- avatarWinner: r({ ...Nt, width: "6.875em", height: "6.875em", border: `${e.borderSize} solid ${e.warning}` }),
2082
- avatar: r({ ...Nt, width: "6.25em", height: "6.25em", border: `${e.borderSize} solid ${ot}` }),
2029
+ avatarWinner: r({ ...Ft, width: "6.875em", height: "6.875em", border: `${e.borderSize} solid ${e.warning}` }),
2030
+ avatar: r({ ...Ft, width: "6.25em", height: "6.25em", border: `${e.borderSize} solid ${tt}` }),
2083
2031
  barWrap: r({ width: "100%", marginBottom: e.spaceMd, marginTop: e.spaceXs, paddingLeft: e.spaceXs, paddingRight: e.spaceXs }),
2084
- barWinner: r({ ...Xt, backgroundColor: e.warningSoft }),
2085
- bar: r({ ...Xt, backgroundColor: tt }),
2086
- fillWinner: r({ ...Vt, backgroundColor: e.warning }),
2087
- fill: r({ ...Vt, backgroundColor: fo }),
2032
+ barWinner: r({ ...Ht, backgroundColor: e.warningSoft }),
2033
+ bar: r({ ...Ht, backgroundColor: et }),
2034
+ fillWinner: r({ ...Ot, backgroundColor: e.warning }),
2035
+ fill: r({ ...Ot, backgroundColor: uo }),
2088
2036
  name: r({ ...N.titleLg, marginBottom: e.space2xs, textAlign: "center", fontSize: "1.25em", unicodeBidi: "plaintext" }),
2089
2037
  tied: r({
2090
2038
  ...N.bodyXs,
@@ -2097,11 +2045,11 @@ const Ot = {
2097
2045
  fontSize: "0.75em"
2098
2046
  }),
2099
2047
  position: r({ ...N.body, marginBottom: e.spaceXs, color: e.dim, fontSize: "0.875em" }),
2100
- stats: r({ display: "flex", flexDirection: "row", alignItems: "center", marginTop: e.spaceXs, ...ho(e.spaceXs) }),
2101
- percentageWinner: r({ ...jt, ...Fn }),
2102
- percentage: r({ ...jt, color: "rgba(var(--fu-ucrc-neutral-main-channel) / 1)" }),
2048
+ stats: r({ display: "flex", flexDirection: "row", alignItems: "center", marginTop: e.spaceXs, ...po(e.spaceXs) }),
2049
+ percentageWinner: r({ ...Nt, ...En }),
2050
+ percentage: r({ ...Nt, color: "rgba(var(--fu-ucrc-neutral-main-channel) / 1)" }),
2103
2051
  votes: r({ ...N.body, color: e.dim, fontSize: "0.875em" })
2104
- }, Hn = r({
2052
+ }, Ln = r({
2105
2053
  width: "1.875em",
2106
2054
  height: "1.875em",
2107
2055
  objectFit: "contain",
@@ -2128,114 +2076,114 @@ const Ot = {
2128
2076
  backgroundRepeat: "no-repeat",
2129
2077
  backgroundSize: "cover",
2130
2078
  backgroundPosition: "center",
2131
- ...go(e.spaceMd)
2079
+ ...mo(e.spaceMd)
2132
2080
  }),
2133
2081
  notFound: r({ textAlign: "center", padding: e.spaceMd, fontSize: "1em" }),
2134
2082
  content: r({ padding: e.spaceLg }),
2135
2083
  // Also the results view's "no votes yet".
2136
2084
  emptyState: r({ textAlign: "center", paddingTop: e.spaceXl, paddingBottom: e.spaceXl }),
2137
- emptyText: r({ ...N.body, color: An, fontSize: "1.125em" }),
2085
+ emptyText: r({ ...N.body, color: Rn, fontSize: "1.125em" }),
2138
2086
  status: r({ ...N.body, textAlign: "center", color: e.tertiary, fontSize: "0.875em" })
2139
- }, Ut = Q.teamPlaceholder, On = Q.playerPlaceholder, Nn = (t, o) => o === 0 ? "0%" : `${(t / o * 100).toFixed(1)}%`, Xn = ({
2087
+ }, Xt = Q.teamPlaceholder, Wn = Q.playerPlaceholder, Fn = (t, o) => o === 0 ? "0%" : `${(t / o * 100).toFixed(1)}%`, Hn = ({
2140
2088
  results: t,
2141
2089
  match: o,
2142
2090
  showPlayers: i
2143
2091
  }) => {
2144
- const { t: l } = G(), p = Z("sm"), [u, f] = I([]), [b, x] = I(0);
2092
+ const { t: d } = G(), h = Z("sm"), [m, p] = I([]), [b, x] = I(0);
2145
2093
  U(() => {
2146
2094
  if (!(t != null && t.length)) return;
2147
- let h = t;
2148
- i && i.length > 0 && (h = t.filter(
2149
- (g) => i.includes(g.playerId)
2095
+ let g = t;
2096
+ i && i.length > 0 && (g = t.filter(
2097
+ (f) => i.includes(f.playerId)
2150
2098
  ));
2151
- const d = h.reduce(
2152
- (g, k) => g + k.votes,
2099
+ const c = g.reduce(
2100
+ (f, $) => f + $.votes,
2153
2101
  0
2154
2102
  );
2155
- x(d);
2156
- const c = [...h].sort((g, k) => g.winner && !k.winner ? -1 : !g.winner && k.winner ? 1 : k.votes - g.votes).slice(0, 3).map((g) => ({
2157
- ...g,
2158
- percent: d > 0 ? g.votes / d * 100 : 0,
2159
- playerDetails: z(g.playerId, o)
2103
+ x(c);
2104
+ const l = [...g].sort((f, $) => f.winner && !$.winner ? -1 : !f.winner && $.winner ? 1 : $.votes - f.votes).slice(0, 3).map((f) => ({
2105
+ ...f,
2106
+ percent: c > 0 ? f.votes / c * 100 : 0,
2107
+ playerDetails: T(f.playerId, o)
2160
2108
  }));
2161
- f(c);
2109
+ p(l);
2162
2110
  }, [t, o, i]);
2163
- const z = (h, d) => {
2164
- var S;
2165
- let c = d.lineups.homeTeam.players.find((E) => E.id === h);
2166
- if (c || (c = d.lineups.awayTeam.players.find((E) => E.id === h)), !c) return;
2167
- const g = d.playerStats.find(
2168
- (E) => E.playerId === h
2169
- ), k = (g == null ? void 0 : g.minutesPlayed) || 0;
2111
+ const T = (g, c) => {
2112
+ var w;
2113
+ let l = c.lineups.homeTeam.players.find((E) => E.id === g);
2114
+ if (l || (l = c.lineups.awayTeam.players.find((E) => E.id === g)), !l) return;
2115
+ const f = c.playerStats.find(
2116
+ (E) => E.playerId === g
2117
+ ), $ = (f == null ? void 0 : f.minutesPlayed) || 0;
2170
2118
  return {
2171
- id: c.id,
2172
- name: c.name,
2173
- number: c.shirtNumber || 0,
2174
- team: c.id.includes(d.homeTeam.id) ? d.homeTeam.id : d.awayTeam.id,
2175
- position: c.position || "Unknown",
2176
- image: (S = c.assets) == null ? void 0 : S.headshot,
2177
- type: c.type,
2178
- minutesPlayed: k
2119
+ id: l.id,
2120
+ name: l.name,
2121
+ number: l.shirtNumber || 0,
2122
+ team: l.id.includes(c.homeTeam.id) ? c.homeTeam.id : c.awayTeam.id,
2123
+ position: l.position || "Unknown",
2124
+ image: (w = l.assets) == null ? void 0 : w.headshot,
2125
+ type: l.type,
2126
+ minutesPlayed: $
2179
2127
  };
2180
- }, s = (h) => {
2181
- var c, g;
2128
+ }, s = (g) => {
2129
+ var l, f;
2182
2130
  return o.lineups.homeTeam.players.some(
2183
- (k) => k.id === h
2184
- ) ? ((c = o.homeTeam.assets) == null ? void 0 : c.logo) || Ut : ((g = o.awayTeam.assets) == null ? void 0 : g.logo) || Ut;
2131
+ ($) => $.id === g
2132
+ ) ? ((l = o.homeTeam.assets) == null ? void 0 : l.logo) || Xt : ((f = o.awayTeam.assets) == null ? void 0 : f.logo) || Xt;
2185
2133
  };
2186
- return u.length ? /* @__PURE__ */ v("div", { css: B.root, children: [
2187
- /* @__PURE__ */ n("div", { css: B.titleBox, children: /* @__PURE__ */ n("h3", { css: B.title, children: l("potm.results_title") }) }),
2188
- /* @__PURE__ */ n("div", { css: p ? B.listSm : B.list, children: u.map((h, d) => {
2189
- var T, R, A;
2190
- const c = h.winner === !0, g = u.filter((F) => !F.winner).indexOf(h), k = !c && g === 0, S = !c && g === 1, E = () => c ? "🏆" : k ? "🥈" : S ? "🥉" : "", _ = u.filter(
2134
+ return m.length ? /* @__PURE__ */ y("div", { css: B.root, children: [
2135
+ /* @__PURE__ */ n("div", { css: B.titleBox, children: /* @__PURE__ */ n("h3", { css: B.title, children: d("potm.results_title") }) }),
2136
+ /* @__PURE__ */ n("div", { css: h ? B.listSm : B.list, children: m.map((g, c) => {
2137
+ var z, R, M;
2138
+ const l = g.winner === !0, f = m.filter((F) => !F.winner).indexOf(g), $ = !l && f === 0, w = !l && f === 1, E = () => l ? "🏆" : $ ? "🥈" : w ? "🥉" : "", _ = m.filter(
2191
2139
  (F) => F.winner === !0
2192
- ).length, m = c && _ > 1, a = c ? u.filter((F) => F.winner === !0).indexOf(h) : void 0;
2193
- if (!h.playerDetails) return null;
2194
- const w = c ? "winner" : k ? "second" : "other", C = p ? c ? a ?? 0 : k ? -1 : 1 : d;
2195
- return /* @__PURE__ */ v("div", { css: yo[`${w}|${p}`], style: { order: C }, children: [
2196
- /* @__PURE__ */ n("div", { css: c ? B.badgeWinner : B.badge, children: /* @__PURE__ */ n("span", { css: B.medal, children: E() }) }),
2140
+ ).length, u = l && _ > 1, a = l ? m.filter((F) => F.winner === !0).indexOf(g) : void 0;
2141
+ if (!g.playerDetails) return null;
2142
+ const S = l ? "winner" : $ ? "second" : "other", C = h ? l ? a ?? 0 : $ ? -1 : 1 : c;
2143
+ return /* @__PURE__ */ y("div", { css: ho[`${S}|${h}`], style: { order: C }, children: [
2144
+ /* @__PURE__ */ n("div", { css: l ? B.badgeWinner : B.badge, children: /* @__PURE__ */ n("span", { css: B.medal, children: E() }) }),
2197
2145
  /* @__PURE__ */ n(
2198
2146
  "img",
2199
2147
  {
2200
- src: s(h.playerId),
2201
- onError: Fe(Q.teamPlaceholder),
2202
- css: Hn,
2148
+ src: s(g.playerId),
2149
+ onError: We(Q.teamPlaceholder),
2150
+ css: Ln,
2203
2151
  alt: "Team logo"
2204
2152
  }
2205
2153
  ),
2206
2154
  /* @__PURE__ */ n(
2207
- rt,
2155
+ nt,
2208
2156
  {
2209
- src: ((T = h.playerDetails) == null ? void 0 : T.image) || On,
2157
+ src: ((z = g.playerDetails) == null ? void 0 : z.image) || Wn,
2210
2158
  placeholder: Q.playerPlaceholder,
2211
- alt: ((R = h.playerDetails) == null ? void 0 : R.name) || "Player",
2212
- css: c ? B.avatarWinner : B.avatar
2159
+ alt: ((R = g.playerDetails) == null ? void 0 : R.name) || "Player",
2160
+ css: l ? B.avatarWinner : B.avatar
2213
2161
  }
2214
2162
  ),
2215
- /* @__PURE__ */ n("div", { css: B.barWrap, children: /* @__PURE__ */ n("div", { css: c ? B.barWinner : B.bar, children: /* @__PURE__ */ n(
2163
+ /* @__PURE__ */ n("div", { css: B.barWrap, children: /* @__PURE__ */ n("div", { css: l ? B.barWinner : B.bar, children: /* @__PURE__ */ n(
2216
2164
  "div",
2217
2165
  {
2218
- css: c ? B.fillWinner : B.fill,
2219
- style: { width: `${h.percent}%` }
2166
+ css: l ? B.fillWinner : B.fill,
2167
+ style: { width: `${g.percent}%` }
2220
2168
  }
2221
2169
  ) }) }),
2222
- /* @__PURE__ */ n("p", { css: B.name, children: ((A = h.playerDetails) == null ? void 0 : A.name) || "Unknown Player" }),
2223
- m && /* @__PURE__ */ n("span", { css: B.tied, children: l("potm.tied_winner", "Tied Winner") }),
2224
- /* @__PURE__ */ n("p", { css: B.position, children: h.playerDetails ? l(`potm.${h.playerDetails.position}`) : "" }),
2225
- /* @__PURE__ */ v("div", { css: B.stats, children: [
2226
- /* @__PURE__ */ n("p", { css: c ? B.percentageWinner : B.percentage, children: Nn(h.votes, b) }),
2227
- /* @__PURE__ */ v("p", { css: B.votes, children: [
2170
+ /* @__PURE__ */ n("p", { css: B.name, children: ((M = g.playerDetails) == null ? void 0 : M.name) || "Unknown Player" }),
2171
+ u && /* @__PURE__ */ n("span", { css: B.tied, children: d("potm.tied_winner", "Tied Winner") }),
2172
+ /* @__PURE__ */ n("p", { css: B.position, children: g.playerDetails ? d(`potm.${g.playerDetails.position}`) : "" }),
2173
+ /* @__PURE__ */ y("div", { css: B.stats, children: [
2174
+ /* @__PURE__ */ n("p", { css: l ? B.percentageWinner : B.percentage, children: Fn(g.votes, b) }),
2175
+ /* @__PURE__ */ y("p", { css: B.votes, children: [
2228
2176
  "(",
2229
- h.votes,
2177
+ g.votes,
2230
2178
  " ",
2231
- l("potm.votes", { count: h.votes }),
2179
+ d("potm.votes", { count: g.votes }),
2232
2180
  ")"
2233
2181
  ] })
2234
2182
  ] })
2235
- ] }, h.playerId);
2183
+ ] }, g.playerId);
2236
2184
  }) })
2237
- ] }) : /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: l("potm.no_votes_cast") }) });
2238
- }, Gt = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, opacity: 0.02 }, Yt = { position: "absolute", color: fo }, j = {
2185
+ ] }) : /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: d("potm.no_votes_cast") }) });
2186
+ }, Vt = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, opacity: 0.02 }, jt = { position: "absolute", color: uo }, j = {
2239
2187
  root: r({
2240
2188
  textAlign: "center",
2241
2189
  padding: `${e.spaceXl} ${e.spaceMd}`,
@@ -2251,13 +2199,13 @@ const Ot = {
2251
2199
  zIndex: 1
2252
2200
  }),
2253
2201
  grid: r({
2254
- ...Gt,
2202
+ ...Vt,
2255
2203
  backgroundImage: `linear-gradient(rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em), linear-gradient(to right, rgba(${e.primaryRgb}, 0.5) 0.0625em, transparent 0.0625em)`,
2256
2204
  backgroundSize: "1.875em 1.875em",
2257
2205
  zIndex: 2
2258
2206
  }),
2259
2207
  diagonal: r({
2260
- ...Gt,
2208
+ ...Vt,
2261
2209
  backgroundImage: `linear-gradient(45deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em), linear-gradient(135deg, rgba(${e.primaryRgb}, 0.6) 0.0625em, transparent 0.0625em)`,
2262
2210
  backgroundSize: "3.75em 3.75em",
2263
2211
  zIndex: 3
@@ -2294,10 +2242,10 @@ const Ot = {
2294
2242
  background: e.surface
2295
2243
  }),
2296
2244
  cardRow: r({ display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center", position: "relative" }),
2297
- clock: r({ ...Yt, left: 0 }),
2298
- clockSm: r({ ...Yt, left: "0.5em" }),
2245
+ clock: r({ ...jt, left: 0 }),
2246
+ clockSm: r({ ...jt, left: "0.5em" }),
2299
2247
  startingSoon: r({ ...N.titleLg, color: "rgba(var(--fu-ucrc-primary-main-channel) / 1)", fontSize: "1.25em" }),
2300
- countdown: r({ display: "flex", flexDirection: "row", justifyContent: "center", width: "100%", ...ho("16px") }),
2248
+ countdown: r({ display: "flex", flexDirection: "row", justifyContent: "center", width: "100%", ...po("16px") }),
2301
2249
  unit: r({ display: "flex", flexDirection: "column", alignItems: "center" }),
2302
2250
  value: r({ ...N.h4, color: e.text, fontVariantNumeric: "tabular-nums", fontWeight: 600, fontSize: "1.25em" }),
2303
2251
  label: r({
@@ -2311,77 +2259,77 @@ const Ot = {
2311
2259
  separator: r({
2312
2260
  ...N.h4,
2313
2261
  alignSelf: "flex-start",
2314
- color: ot,
2262
+ color: tt,
2315
2263
  fontWeight: 300,
2316
2264
  fontSize: "1.25em"
2317
2265
  })
2318
- }, Vn = ({ match: t }) => {
2319
- const { t: o } = G(), i = Z("sm"), { days: l, hours: p, minutes: u, seconds: f, isExpired: b } = uo(t.kickoffAt);
2320
- return /* @__PURE__ */ v("div", { css: j.root, children: [
2266
+ }, On = ({ match: t }) => {
2267
+ const { t: o } = G(), i = Z("sm"), { days: d, hours: h, minutes: m, seconds: p, isExpired: b } = so(t.kickoffAt);
2268
+ return /* @__PURE__ */ y("div", { css: j.root, children: [
2321
2269
  /* @__PURE__ */ n("div", { css: j.grid }),
2322
2270
  /* @__PURE__ */ n("div", { css: j.diagonal }),
2323
2271
  /* @__PURE__ */ n("h3", { css: j.title, children: o("potm.voting_opens_soon") }),
2324
2272
  /* @__PURE__ */ n("p", { css: j.description, children: o("potm.voting_upcoming_message") }),
2325
- /* @__PURE__ */ n("div", { css: j.card, children: /* @__PURE__ */ v("div", { css: j.cardRow, children: [
2326
- /* @__PURE__ */ n(qt, { size: "1.25em", css: i ? j.clockSm : j.clock }),
2327
- b ? /* @__PURE__ */ n("p", { css: j.startingSoon, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ v("div", { css: j.countdown, children: [
2328
- /* @__PURE__ */ n(Le, { value: l, label: o("potm.days") }),
2329
- /* @__PURE__ */ n(Ke, {}),
2330
- /* @__PURE__ */ n(Le, { value: p, label: o("potm.hours") }),
2331
- /* @__PURE__ */ n(Ke, {}),
2332
- /* @__PURE__ */ n(Le, { value: u, label: o("potm.min") }),
2333
- /* @__PURE__ */ n(Ke, {}),
2334
- /* @__PURE__ */ n(Le, { value: f, label: o("potm.sec") })
2273
+ /* @__PURE__ */ n("div", { css: j.card, children: /* @__PURE__ */ y("div", { css: j.cardRow, children: [
2274
+ /* @__PURE__ */ n(Yt, { size: "1.25em", css: i ? j.clockSm : j.clock }),
2275
+ b ? /* @__PURE__ */ n("p", { css: j.startingSoon, children: o("potm.match_starting_soon") }) : /* @__PURE__ */ y("div", { css: j.countdown, children: [
2276
+ /* @__PURE__ */ n(Ee, { value: d, label: o("potm.days") }),
2277
+ /* @__PURE__ */ n(Ye, {}),
2278
+ /* @__PURE__ */ n(Ee, { value: h, label: o("potm.hours") }),
2279
+ /* @__PURE__ */ n(Ye, {}),
2280
+ /* @__PURE__ */ n(Ee, { value: m, label: o("potm.min") }),
2281
+ /* @__PURE__ */ n(Ye, {}),
2282
+ /* @__PURE__ */ n(Ee, { value: p, label: o("potm.sec") })
2335
2283
  ] })
2336
2284
  ] }) })
2337
2285
  ] });
2338
- }, Le = ({ value: t, label: o }) => /* @__PURE__ */ v("div", { css: j.unit, children: [
2286
+ }, Ee = ({ value: t, label: o }) => /* @__PURE__ */ y("div", { css: j.unit, children: [
2339
2287
  /* @__PURE__ */ n("h4", { css: j.value, children: t.toString().padStart(2, "0") }),
2340
2288
  /* @__PURE__ */ n("span", { css: j.label, children: o })
2341
- ] }), Ke = () => /* @__PURE__ */ n("h4", { css: j.separator, children: ":" }), Kt = Q.teamPlaceholder, jn = ({
2289
+ ] }), Ye = () => /* @__PURE__ */ n("h4", { css: j.separator, children: ":" }), Ut = Q.teamPlaceholder, Nn = ({
2342
2290
  entityId: t,
2343
2291
  sdk: o,
2344
2292
  votingWindow: i = 1,
2345
- showTeam: l = "all",
2346
- showPlayers: p,
2347
- brandedAreaImage: u,
2348
- brandedAreaLink: f,
2293
+ showTeam: d = "all",
2294
+ showPlayers: h,
2295
+ brandedAreaImage: m,
2296
+ brandedAreaLink: p,
2349
2297
  authRequirement: b,
2350
2298
  userIsLoggedIn: x,
2351
- signInCTA: z,
2299
+ signInCTA: T,
2352
2300
  defaultImagePlaceholderUrl: s,
2353
- headerBannerStyles: h
2301
+ headerBannerStyles: g
2354
2302
  }) => {
2355
- var pe, xe;
2356
- const { t: d } = G(), [c, g] = I(!0), k = To(), [S, E] = I(null), [_, m] = I(null), [a, w] = I(null), [C, T] = I(!1), [R, A] = I(!1), [F, se] = I(!1), [q, oe] = I(!1), [me, Te] = I(!1), ye = (H) => {
2303
+ var pe, ve;
2304
+ const { t: c } = G(), [l, f] = I(!0), $ = $o(), [w, E] = I(null), [_, u] = I(null), [a, S] = I(null), [C, z] = I(!1), [R, M] = I(!1), [F, se] = I(!1), [q, oe] = I(!1), [me, Te] = I(!1), be = (H) => {
2357
2305
  const W = H.finishedAt ? new Date(H.finishedAt) : (() => {
2358
2306
  const ee = new Date(H.kickoffAt);
2359
2307
  return ee.setHours(ee.getHours() + 2), ee < /* @__PURE__ */ new Date() ? ee : null;
2360
2308
  })();
2361
2309
  return W ? new Date(W.getTime() + i * 60 * 60 * 1e3) : null;
2362
- }, Ie = (H) => {
2363
- const W = ye(H);
2310
+ }, ze = (H) => {
2311
+ const W = be(H);
2364
2312
  return W ? /* @__PURE__ */ new Date() > W : !1;
2365
- }, Oe = async (H) => {
2366
- g(!0), A(!1), se(!1), T(!1), oe(!1), m(null), w(null);
2313
+ }, He = async (H) => {
2314
+ f(!0), M(!1), se(!1), z(!1), oe(!1), u(null), S(null);
2367
2315
  try {
2368
- const W = await o.football.getMatchById(H, k);
2316
+ const W = await o.football.getMatchById(H, $);
2369
2317
  E(W);
2370
- const ee = /* @__PURE__ */ new Date(), Xe = new Date(W.kickoffAt);
2371
- if (ee < Xe) {
2372
- A(!0), g(!1);
2318
+ const ee = /* @__PURE__ */ new Date(), Ne = new Date(W.kickoffAt);
2319
+ if (ee < Ne) {
2320
+ M(!0), f(!1);
2373
2321
  return;
2374
2322
  }
2375
- const Re = Ie(W);
2376
- if (se(Re), Re)
2323
+ const De = ze(W);
2324
+ if (se(De), De)
2377
2325
  try {
2378
- const O = await o.voting.getResultsForPlayerOfTheMatch(H, k);
2379
- w(O), g(!1);
2326
+ const O = await o.voting.getResultsForPlayerOfTheMatch(H, $);
2327
+ S(O), f(!1);
2380
2328
  return;
2381
2329
  } catch (O) {
2382
2330
  console.error("Failed to fetch voting results", O);
2383
- const { status: te } = We(O, o);
2384
- te === "match_id_not_full_coverage" ? oe(!0) : T(!0);
2331
+ const { status: te } = Le(O, o);
2332
+ te === "match_id_not_full_coverage" ? oe(!0) : z(!0);
2385
2333
  }
2386
2334
  try {
2387
2335
  const O = await o.voting.getOwnVotesForPlayerOfTheMatch({
@@ -2390,115 +2338,115 @@ const Ot = {
2390
2338
  });
2391
2339
  if (O.data && O.data.length > 0) {
2392
2340
  const te = O.data.find(
2393
- (Ve) => Ve.matchId === H
2341
+ (Xe) => Xe.matchId === H
2394
2342
  );
2395
- te && m(te.playerId);
2343
+ te && u(te.playerId);
2396
2344
  }
2397
2345
  } catch (O) {
2398
2346
  console.warn("User not logged in or no votes found", O);
2399
2347
  }
2400
2348
  try {
2401
- const O = await o.voting.getResultsForPlayerOfTheMatch(H, k);
2402
- w(O);
2349
+ const O = await o.voting.getResultsForPlayerOfTheMatch(H, $);
2350
+ S(O);
2403
2351
  } catch (O) {
2404
2352
  console.error("Failed to fetch voting results", O);
2405
- const { status: te } = We(O, o);
2406
- te === "match_id_not_full_coverage" ? oe(!0) : (te === "voting_potm_finished" || te === "voting_potm_not_started") && T(!0);
2353
+ const { status: te } = Le(O, o);
2354
+ te === "match_id_not_full_coverage" ? oe(!0) : (te === "voting_potm_finished" || te === "voting_potm_not_started") && z(!0);
2407
2355
  }
2408
2356
  } catch (W) {
2409
2357
  console.error("Failed to fetch match data", W);
2410
- const { status: ee } = We(W, o);
2358
+ const { status: ee } = Le(W, o);
2411
2359
  ee === "match_id_not_full_coverage" && oe(!0);
2412
2360
  } finally {
2413
- g(!1);
2361
+ f(!1);
2414
2362
  }
2415
2363
  };
2416
2364
  U(() => {
2417
- Oe(t);
2418
- }, [t, i, o, k]), U(() => {
2365
+ He(t);
2366
+ }, [t, i, o, $]), U(() => {
2419
2367
  Te(b === "REGISTERED" && !x);
2420
2368
  }, [b, x]);
2421
- const Y = Ce(
2422
- () => S ? ye(S) : null,
2369
+ const Y = we(
2370
+ () => w ? be(w) : null,
2423
2371
  // eslint-disable-next-line react-hooks/exhaustive-deps -- getVotingDeadline only reads votingWindow, which is listed
2424
- [S, i]
2425
- ), De = async (H) => {
2372
+ [w, i]
2373
+ ), Ie = async (H) => {
2426
2374
  try {
2427
- _ === H ? (await o.voting.deleteVoteForPlayerOfTheMatch(t), m(null)) : (await o.voting.voteForPlayerOfTheMatch(t, H), m(H));
2375
+ _ === H ? (await o.voting.deleteVoteForPlayerOfTheMatch(t), u(null)) : (await o.voting.voteForPlayerOfTheMatch(t, H), u(H));
2428
2376
  const W = await o.voting.getResultsForPlayerOfTheMatch(t, !0);
2429
- return w(W), !0;
2377
+ return S(W), !0;
2430
2378
  } catch (W) {
2431
2379
  throw console.error("Error voting", W), W;
2432
2380
  }
2433
2381
  };
2434
- if (c)
2435
- return /* @__PURE__ */ n(Bo, { marginBlock: "160px" });
2436
- if (!S)
2437
- return /* @__PURE__ */ n("div", { css: ae.notFound, children: d(q ? "potm.match_not_full_coverage" : "potm.match_not_found") });
2438
- const Ne = [
2382
+ if (l)
2383
+ return /* @__PURE__ */ n(_o, { marginBlock: "160px" });
2384
+ if (!w)
2385
+ return /* @__PURE__ */ n("div", { css: ae.notFound, children: c(q ? "potm.match_not_full_coverage" : "potm.match_not_found") });
2386
+ const Oe = [
2439
2387
  {
2440
- id: S.homeTeam.id,
2441
- name: S.homeTeam.name,
2442
- code: S.homeTeam.code || S.homeTeam.name.substring(0, 3),
2443
- logo: ((pe = S.homeTeam.assets) == null ? void 0 : pe.logo) || Kt
2388
+ id: w.homeTeam.id,
2389
+ name: w.homeTeam.name,
2390
+ code: w.homeTeam.code || w.homeTeam.name.substring(0, 3),
2391
+ logo: ((pe = w.homeTeam.assets) == null ? void 0 : pe.logo) || Ut
2444
2392
  },
2445
2393
  {
2446
- id: S.awayTeam.id,
2447
- name: S.awayTeam.name,
2448
- code: S.awayTeam.code || S.awayTeam.name.substring(0, 3),
2449
- logo: ((xe = S.awayTeam.assets) == null ? void 0 : xe.logo) || Kt
2394
+ id: w.awayTeam.id,
2395
+ name: w.awayTeam.name,
2396
+ code: w.awayTeam.code || w.awayTeam.name.substring(0, 3),
2397
+ logo: ((ve = w.awayTeam.assets) == null ? void 0 : ve.logo) || Ut
2450
2398
  }
2451
- ], re = R || q ? null : F ? d("potm.voting_ended_message", {
2399
+ ], re = R || q ? null : F ? c("potm.voting_ended_message", {
2452
2400
  defaultValue: "Voting has ended. These are the final results."
2453
- }) : C ? d("potm.voting_closed_message") : null;
2454
- return /* @__PURE__ */ v(
2401
+ }) : C ? c("potm.voting_closed_message") : null;
2402
+ return /* @__PURE__ */ y(
2455
2403
  "div",
2456
2404
  {
2457
2405
  css: ae.container,
2458
2406
  style: s ? { backgroundImage: `url(${s})` } : void 0,
2459
2407
  children: [
2460
- u && /* @__PURE__ */ n(
2461
- Yo,
2408
+ m && /* @__PURE__ */ n(
2409
+ Mo,
2462
2410
  {
2463
- backgroundImage: u,
2464
- link: f,
2411
+ backgroundImage: m,
2412
+ link: p,
2465
2413
  height: "150px",
2466
2414
  minHeight: "120px"
2467
2415
  }
2468
2416
  ),
2469
- /* @__PURE__ */ n(Bn, { teams: Ne, headerBannerStyles: h }),
2417
+ /* @__PURE__ */ n(_n, { teams: Oe, headerBannerStyles: g }),
2470
2418
  /* @__PURE__ */ n("div", { css: ae.content, children: R ? (
2471
2419
  // For upcoming matches - show countdown
2472
- /* @__PURE__ */ n(Vn, { match: S })
2420
+ /* @__PURE__ */ n(On, { match: w })
2473
2421
  ) : q ? (
2474
2422
  // No player data for this match — nothing to vote on, so skip the carousel entirely
2475
- /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: d("potm.match_not_full_coverage") }) })
2423
+ /* @__PURE__ */ n("div", { css: ae.emptyState, children: /* @__PURE__ */ n("p", { css: ae.emptyText, children: c("potm.match_not_full_coverage") }) })
2476
2424
  ) : F && a ? (
2477
2425
  // For matches where voting period has ended - show results
2478
2426
  /* @__PURE__ */ n(
2479
- Xn,
2427
+ Hn,
2480
2428
  {
2481
2429
  results: a.data,
2482
- match: S,
2483
- showPlayers: p
2430
+ match: w,
2431
+ showPlayers: h
2484
2432
  }
2485
2433
  )
2486
2434
  ) : (
2487
2435
  // For ongoing/completed matches within voting window - show voting interface
2488
2436
  /* @__PURE__ */ n(
2489
- _n,
2437
+ Dn,
2490
2438
  {
2491
- match: S,
2439
+ match: w,
2492
2440
  sdk: o,
2493
2441
  userVote: _,
2494
2442
  votingResults: a,
2495
- handleVote: De,
2443
+ handleVote: Ie,
2496
2444
  isVotingClosed: C,
2497
- show: l ?? "all",
2498
- showPlayers: p,
2445
+ show: d ?? "all",
2446
+ showPlayers: h,
2499
2447
  defaultImagePlaceholderUrl: s,
2500
2448
  showSignInCTA: me,
2501
- signInCTA: z,
2449
+ signInCTA: T,
2502
2450
  votingDeadline: Y
2503
2451
  }
2504
2452
  )
@@ -2507,23 +2455,23 @@ const Ot = {
2507
2455
  ]
2508
2456
  }
2509
2457
  );
2510
- }, Un = ({ children: t }) => {
2511
- const o = Io(Do().palette.primary.plainColor), i = {
2458
+ }, Xn = ({ children: t }) => {
2459
+ const o = ko(To().palette.primary.plainColor), i = {
2512
2460
  display: "contents",
2513
2461
  "--fu-ucrc-potm-primary-rgb": o,
2514
2462
  "--fu-ucrc-potm-primary-soft": `rgba(${o}, 0.12)`
2515
2463
  };
2516
2464
  return /* @__PURE__ */ n("div", { style: i, children: t });
2517
- }, Gn = (t) => /* @__PURE__ */ n(
2518
- Eo,
2465
+ }, Vn = (t) => /* @__PURE__ */ n(
2466
+ Ao,
2519
2467
  {
2520
2468
  packageName: "player-of-the-match",
2521
2469
  language: t.language,
2522
2470
  themeOptions: t.themeOptions,
2523
2471
  disableCache: t.disableCache,
2524
- children: /* @__PURE__ */ n(Un, { children: /* @__PURE__ */ n(jn, { ...t }) })
2472
+ children: /* @__PURE__ */ n(Xn, { children: /* @__PURE__ */ n(Nn, { ...t }) })
2525
2473
  }
2526
- ), nr = Vo(Gn);
2474
+ ), er = No(Vn);
2527
2475
  export {
2528
- nr as PlayerOfTheMatch
2476
+ er as PlayerOfTheMatch
2529
2477
  };