fansunited-frontend-components 1.1.0 → 1.2.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 (53) hide show
  1. package/BattleOfFans.js +512 -469
  2. package/Betslip.js +1 -1
  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 +1 -1
  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 +65 -4
  25. package/Standings.js +1 -1
  26. package/TopX.js +1 -1
  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-DdL0UekL.js → main-BnuQygIM.js} +1853 -1783
  34. package/chunks/main-BpGmqCTf.js +2142 -0
  35. package/chunks/main-C0PSUCR_.js +3027 -0
  36. package/chunks/{main-LEE8n2cG.js → main-CfdOHNHz.js} +1268 -1203
  37. package/chunks/{main-D_QDfmAw.js → main-PpLP-LeG.js} +1797 -1753
  38. package/chunks/{main-C7X4dM_P.js → main-p1Qbq-Fw.js} +1532 -1483
  39. package/chunks/{withVersionStamp-Cck3fT4t.js → withVersionStamp-C1gbpK3-.js} +1 -1
  40. package/components.d.ts +2 -1
  41. package/components.d.ts.map +1 -1
  42. package/index.d.ts +1 -0
  43. package/index.d.ts.map +1 -1
  44. package/index.js +11 -9
  45. package/package.json +6 -2
  46. package/chunks/index-BNl8scz6.js +0 -4
  47. package/chunks/index-CSa2JU4m.js +0 -4
  48. package/chunks/index-Cd1dg0KI.js +0 -4
  49. package/chunks/index-Cei2fzi7.js +0 -4
  50. package/chunks/index-Cxb4wEJU.js +0 -4
  51. package/chunks/index-w1LGN5dz.js +0 -4
  52. package/chunks/main-07vzblS8.js +0 -2091
  53. package/chunks/main-DmBfwyb4.js +0 -2992
package/BattleOfFans.js CHANGED
@@ -1,13 +1,13 @@
1
- import { jsx as l, Fragment as Wt, jsxs as b } from "@emotion/react/jsx-runtime";
2
- import { space as at, radius as lt, LeadForm as Pn, Notification as Ln, WidgetPortal as Tn } from "fansunited-frontend-core/ui/emotion";
3
- import en, { useState as T, useRef as on, useEffect as Ft, useMemo as j, useCallback as At } from "react";
4
- import { useTranslation as mt } from "react-i18next";
5
- import { useDisableCache as Nn, extractSdkError as xt, getSportsApiCredentials as Dn, hexColor as rn, fetchSearchEntitiesByIds as Bn, contrastRatio as pt, standsOut as Ct, cdnAssets as zn, initialsOf as Mn, useIsRtl as Rt, useIntlLocale as sn, useIsMobile as Vn, useColors as Hn, stripHtmlTags as An } from "fansunited-frontend-core";
6
- import { a as an, u as jn, O as _n } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
7
- import { keyframes as ot, css as d } from "@emotion/react";
8
- import { EmojiEventsIcon as Gn, CheckIcon as qn, LockOutlinedIcon as Un } from "fansunited-frontend-core/ui/icons";
1
+ import { jsx as l, Fragment as Pt, jsxs as b } from "@emotion/react/jsx-runtime";
2
+ import { space as dt, radius as ut, LeadForm as An, BrandedArea as Vn, Notification as _n, WidgetPortal as Hn } from "fansunited-frontend-core/ui/emotion";
3
+ import un, { useState as A, useRef as pn, useEffect as gt, useMemo as q, useCallback as Ut } from "react";
4
+ import { useTranslation as bt } from "react-i18next";
5
+ import { useDisableCache as jn, extractSdkError as $t, getSportsApiCredentials as Gn, hexColor as mn, fetchSearchEntitiesByIds as qn, contrastRatio as ht, standsOut as Et, cdnAssets as Un, initialsOf as Yn, useIsRtl as Tt, useIntlLocale as fn, useIsMobile as Xn, useColors as Kn, stripHtmlTags as Jn } from "fansunited-frontend-core";
6
+ import { a as gn, u as Qn, O as Zn } from "./chunks/OddsSkeleton-DP5Yfqpr.js";
7
+ import { keyframes as rt, css as d } from "@emotion/react";
8
+ import { EmojiEventsIcon as te, CheckIcon as ne, LockOutlinedIcon as ee } from "fansunited-frontend-core/ui/icons";
9
9
  import "fansunited-sdk-esm/enums";
10
- import { w as Yn } from "./chunks/withVersionStamp-Cck3fT4t.js";
10
+ import { w as oe } from "./chunks/withVersionStamp-C1gbpK3-.js";
11
11
  const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
12
12
  fontPrimary: "var(--fu-ucrc-font-primary)",
13
13
  fontSecondary: "var(--fu-ucrc-font-secondary)",
@@ -24,25 +24,25 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
24
24
  shadow: "rgba(var(--fu-ucrc-shadow-channel) / var(--fu-ucrc-shadow-opacity))",
25
25
  trophy: "var(--fu-ucrc-warning-plain-color)",
26
26
  trophyOn: "var(--bof-trophy-on)",
27
- spaceXs: at("xs"),
28
- spaceSm: at("sm"),
29
- spaceMd: at("md"),
30
- spaceLg: at("lg"),
31
- radiusSm: lt("sm"),
32
- radiusMd: lt("md"),
33
- radiusLg: lt("lg"),
34
- radiusFull: lt("full"),
27
+ spaceXs: dt("xs"),
28
+ spaceSm: dt("sm"),
29
+ spaceMd: dt("md"),
30
+ spaceLg: dt("lg"),
31
+ radiusSm: ut("sm"),
32
+ radiusMd: ut("md"),
33
+ radiusLg: ut("lg"),
34
+ radiusFull: ut("full"),
35
35
  fill: "var(--bof-fill)",
36
36
  on: "var(--bof-on)",
37
37
  ink: "var(--bof-ink)",
38
38
  /** The side colour mixed into the card, at `--bof-tint`. */
39
39
  tint: "color-mix(in srgb, var(--bof-fill) var(--bof-tint), var(--fu-ucrc-surface))"
40
- }, et = {
40
+ }, ot = {
41
41
  logo: "drop-shadow(0 3px 6px rgba(0,0,0,0.18))",
42
42
  winnerLogo: "drop-shadow(0 8px 14px rgba(0,0,0,0.35))",
43
43
  winnerHeadshot: "0 10px 22px -10px rgba(0,0,0,0.5)",
44
44
  trophy: "0 4px 10px -3px rgba(0,0,0,0.45)"
45
- }, Xn = "@media (prefers-reduced-motion: reduce)", Z = {
45
+ }, re = "@media (prefers-reduced-motion: reduce)", tt = {
46
46
  pad: 24,
47
47
  arenaBar: 238,
48
48
  arenaFill: 324,
@@ -72,7 +72,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
72
72
  trophy: 40,
73
73
  trophyRing: 3,
74
74
  slant: 4
75
- }, tt = {
75
+ }, nt = {
76
76
  pad: 16,
77
77
  arenaBar: 196,
78
78
  arenaFill: 264,
@@ -102,18 +102,18 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
102
102
  trophy: 28,
103
103
  trophyRing: 2,
104
104
  slant: 3
105
- }, kt = 76, I = ([t, n]) => ({
105
+ }, Ct = 76, I = ([t, n]) => ({
106
106
  fontSize: s(t),
107
107
  lineHeight: n / t
108
- }), St = ot({
108
+ }), wt = rt({
109
109
  "0%, 100%": { opacity: 1 },
110
110
  "50%": { opacity: 0.45 }
111
- }), jt = {
111
+ }), Yt = {
112
112
  margin: 0,
113
113
  fontFamily: i.fontPrimary,
114
114
  fontWeight: 700,
115
115
  letterSpacing: "-0.01em"
116
- }, _t = (t, n) => ({
116
+ }, Xt = (t, n) => ({
117
117
  root: d({
118
118
  fontSize: "1em",
119
119
  boxSizing: "border-box",
@@ -129,7 +129,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
129
129
  boxShadow: `0 1px 2px 0 ${i.shadow}, 0 2px 4px 0 ${i.shadow}`,
130
130
  "--bof-tint": "10%",
131
131
  ".dark &": { "--bof-tint": "26%" },
132
- [Xn]: {
132
+ [re]: {
133
133
  "& *, & *::before, & *::after": {
134
134
  animation: "none !important",
135
135
  transition: "none !important"
@@ -159,7 +159,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
159
159
  }),
160
160
  // Title and open subtitle can be poll (CMS) text, in any language.
161
161
  title: d({
162
- ...jt,
162
+ ...Yt,
163
163
  unicodeBidi: "plaintext",
164
164
  ...I(n ? [22, 28] : [28, 34])
165
165
  }),
@@ -205,7 +205,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
205
205
  arenaSkeleton: d({
206
206
  borderRadius: i.radiusMd,
207
207
  backgroundColor: i.inner,
208
- animation: `${St} 1.5s ease-in-out infinite`
208
+ animation: `${wt} 1.5s ease-in-out infinite`
209
209
  }),
210
210
  resultsSkeleton: d({
211
211
  height: s(t.pctBar[1] + (n ? 8 : 10) + t.bar),
@@ -223,14 +223,14 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
223
223
  height: s(t.bar),
224
224
  borderRadius: i.radiusFull,
225
225
  backgroundColor: i.track,
226
- animation: `${St} 1.5s ease-in-out infinite`
226
+ animation: `${wt} 1.5s ease-in-out infinite`
227
227
  }),
228
228
  titleSkeleton: d({
229
229
  width: s(n ? 170 : 220),
230
230
  height: s(n ? 28 : 34),
231
231
  borderRadius: i.radiusSm,
232
232
  backgroundColor: i.inner,
233
- animation: `${St} 1.5s ease-in-out infinite`
233
+ animation: `${wt} 1.5s ease-in-out infinite`
234
234
  }),
235
235
  message: d({
236
236
  display: "flex",
@@ -244,7 +244,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
244
244
  padding: i.spaceLg,
245
245
  boxSizing: "border-box"
246
246
  }),
247
- messageTitle: d({ ...jt, ...I([18, 24]) }),
247
+ messageTitle: d({ ...Yt, ...I([18, 24]) }),
248
248
  messageText: d({ margin: 0, color: i.dim, ...I([14, 20]) }),
249
249
  retry: d({
250
250
  marginTop: s(8, 15),
@@ -263,7 +263,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
263
263
  outlineOffset: "2px"
264
264
  }
265
265
  })
266
- }), Gt = (t) => ({
266
+ }), Kt = (t) => ({
267
267
  root: d(
268
268
  t ? {
269
269
  width: "100%",
@@ -325,39 +325,39 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
325
325
  fontSize: s(20),
326
326
  color: i.dim
327
327
  })
328
- }), y = { d: _t(Z, !1), m: _t(tt, !0) }, q = { d: Gt(!1), m: Gt(!0) }, Kn = "battle-of-fans", Jn = "voting_ends_at", qt = { team: "team", player: "player" }, Qn = (t) => {
328
+ }), y = { d: Xt(tt, !1), m: Xt(nt, !0) }, Y = { d: Kt(!1), m: Kt(!0) }, ie = "battle-of-fans", se = "voting_ends_at", ae = "voting_starts_at", Jt = 5 * 6e4, le = 15e3, Qt = { team: "team", player: "player" }, ce = (t) => {
329
329
  var r;
330
330
  const n = (((r = t.context) == null ? void 0 : r.tags) ?? []).filter(
331
- (o) => !!(o != null && o.id) && !!qt[(o.type ?? "").toLowerCase()]
331
+ (o) => !!(o != null && o.id) && !!Qt[(o.type ?? "").toLowerCase()]
332
332
  ), e = t.options ?? [];
333
333
  return n.length !== e.length && console.warn(
334
334
  `BattleOfFans: poll ${t.id} has ${e.length} options and ${n.length} team/player tags; using the first ${Math.min(n.length, e.length)}.`
335
335
  ), e.slice(0, n.length).map((o, a) => ({
336
336
  optionId: o.id,
337
337
  entityId: n[a].id,
338
- kind: qt[n[a].type.toLowerCase()],
338
+ kind: Qt[n[a].type.toLowerCase()],
339
339
  title: o.title ?? ""
340
340
  }));
341
- }, Zn = (t) => t.split("-")[0].toUpperCase(), te = (t, n) => {
341
+ }, de = (t) => t.split("-")[0].toUpperCase(), ue = (t, n) => {
342
342
  var o, a;
343
343
  if (!t) return null;
344
- const e = Zn(n);
344
+ const e = de(n);
345
345
  return (((a = (o = t.translations) == null ? void 0 : o.find(
346
346
  (u) => {
347
347
  var m;
348
348
  return ((m = u.language) == null ? void 0 : m.toUpperCase()) === e;
349
349
  }
350
350
  )) == null ? void 0 : a.name) ?? t.name ?? "").trim() || null;
351
- }, ne = (t, n) => {
351
+ }, pe = (t, n) => {
352
352
  var e, r;
353
353
  return ((r = (e = t == null ? void 0 : t.assets) == null ? void 0 : e.find((o) => o.key === (n === "team" ? "LOGO" : "HEADSHOT"))) == null ? void 0 : r.value) ?? null;
354
- }, ln = (t) => {
354
+ }, hn = (t) => {
355
355
  var n, e;
356
356
  return ((e = (n = t == null ? void 0 : t.related) == null ? void 0 : n.find((r) => {
357
357
  var o;
358
358
  return ((o = r.relationship) == null ? void 0 : o.toUpperCase()) === "TEAM";
359
359
  })) == null ? void 0 : e.related_id) ?? null;
360
- }, ee = (t, n) => {
360
+ }, me = (t, n) => {
361
361
  var r;
362
362
  const e = (r = t == null ? void 0 : t.metadata) == null ? void 0 : r.branding;
363
363
  return [
@@ -365,15 +365,15 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
365
365
  e == null ? void 0 : e.secondary_color,
366
366
  e == null ? void 0 : e.tertiary_color
367
367
  ].map((o) => n(o)).filter((o) => !!o);
368
- }, oe = (t, n, e, r) => t.map((o) => {
369
- const a = n.get(o.entityId), u = o.kind === "player" ? n.get(ln(a) ?? "") : a;
368
+ }, fe = (t, n, e, r) => t.map((o) => {
369
+ const a = n.get(o.entityId), u = o.kind === "player" ? n.get(hn(a) ?? "") : a;
370
370
  return {
371
371
  ...o,
372
- name: te(a, e) ?? o.title,
373
- image: ne(a, o.kind),
374
- brand: ee(u, r)
372
+ name: ue(a, e) ?? o.title,
373
+ image: pe(a, o.kind),
374
+ brand: me(u, r)
375
375
  };
376
- }), re = (t) => {
376
+ }), ge = (t) => {
377
377
  const n = t.reduce((u, m) => u + Math.max(0, m), 0);
378
378
  if (n === 0) return t.map(() => 0);
379
379
  const e = t.map((u) => Math.max(0, u) / n * 100), r = e.map(Math.floor);
@@ -384,14 +384,14 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
384
384
  r[u] += 1, o -= 1;
385
385
  }
386
386
  return r;
387
- }, ie = (t) => {
387
+ }, he = (t) => {
388
388
  const n = Math.max(...t);
389
389
  return n > 0 && t.filter((r) => r === n).length === 1 ? t.indexOf(n) : null;
390
- }, se = (t) => {
390
+ }, Zt = (t) => {
391
391
  if (!t) return null;
392
392
  const n = Date.parse(t);
393
393
  return Number.isNaN(n) ? null : n;
394
- }, ae = (t, n) => {
394
+ }, tn = (t, n) => {
395
395
  const e = Math.max(0, Math.floor((t - n) / 1e3));
396
396
  return {
397
397
  days: Math.floor(e / 86400),
@@ -399,12 +399,12 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
399
399
  minutes: Math.floor(e % 3600 / 60),
400
400
  seconds: e % 60
401
401
  };
402
- }, le = [401, 403, 404], ce = async (t, n, e, r) => {
403
- const o = /* @__PURE__ */ new Map(), a = Dn(t);
402
+ }, be = [401, 403, 404], ye = async (t, n, e, r) => {
403
+ const o = /* @__PURE__ */ new Map(), a = Gn(t);
404
404
  if (!a) return o;
405
405
  const u = async (c) => {
406
406
  if (!c.length) return;
407
- (await Bn(
407
+ (await qn(
408
408
  a,
409
409
  c,
410
410
  {
@@ -415,75 +415,75 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
415
415
  ).catch(() => [])).forEach((p) => p.id && o.set(p.id, p));
416
416
  };
417
417
  await u(n.map((c) => c.entityId));
418
- const m = n.filter((c) => c.kind === "player").map((c) => ln(o.get(c.entityId))).filter((c) => !!c && !o.has(c));
418
+ const m = n.filter((c) => c.kind === "player").map((c) => hn(o.get(c.entityId))).filter((c) => !!c && !o.has(c));
419
419
  return await u(m), o;
420
- }, de = (t) => {
420
+ }, xe = (t) => {
421
421
  var n;
422
422
  return t != null && t.id ? ((n = t.optionIds) == null ? void 0 : n[0]) ?? t.optionId ?? null : null;
423
- }, ue = (t) => {
424
- var z;
425
- const { entityId: n, sdk: e, language: r, userIsLoggedIn: o } = t, a = Nn(), [u, m] = T("loading"), [c, f] = T(null), [p, h] = T(0), [R, P] = T(!1), [U, E] = T(!1), [_, $] = T(null), k = on(t.callbacks);
426
- k.current = t.callbacks, Ft(() => {
423
+ }, ke = (t) => {
424
+ var st, H;
425
+ const { entityId: n, sdk: e, language: r, userIsLoggedIn: o } = t, a = jn(), [u, m] = A("loading"), [c, f] = A(null), [p, g] = A(0), [F, B] = A(!1), [X, T] = A(!1), [U, $] = A(null), S = pn(t.callbacks);
426
+ S.current = t.callbacks, gt(() => {
427
427
  const C = new AbortController();
428
- let S = !1;
429
- return m("loading"), E(!1), (async () => {
430
- let x;
428
+ let x = !1;
429
+ return m("loading"), T(!1), (async () => {
430
+ let v;
431
431
  try {
432
- x = await e.voting.getPollById(n, a);
433
- } catch (V) {
434
- if (S) return;
432
+ v = await e.voting.getPollById(n, a);
433
+ } catch (P) {
434
+ if (x) return;
435
435
  m(
436
- xt(V, e).code === 404 ? "notFound" : "error"
436
+ $t(P, e).code === 404 ? "notFound" : "error"
437
437
  );
438
438
  return;
439
439
  }
440
- const w = x != null && x.id && (x.type ?? "").toLowerCase() === Kn ? Qn(x) : [];
440
+ const w = v != null && v.id && (v.type ?? "").toLowerCase() === ie ? ce(v) : [];
441
441
  if (w.length < 2) {
442
- S || m("notFound");
442
+ x || m("notFound");
443
443
  return;
444
444
  }
445
- const Y = x.authRequirement === "REGISTERED" && !o ? Promise.resolve(null) : e.voting.getMyPollVote(n).catch((V) => {
446
- if (le.includes(xt(V, e).code))
445
+ const D = v.authRequirement === "REGISTERED" && !o ? Promise.resolve(null) : e.voting.getMyPollVote(n).catch((P) => {
446
+ if (be.includes($t(P, e).code))
447
447
  return null;
448
- throw V;
448
+ throw P;
449
449
  });
450
450
  try {
451
- const [V, nt] = await Promise.all([
452
- Y,
453
- ce(e, w, C.signal, a)
451
+ const [P, et] = await Promise.all([
452
+ D,
453
+ ye(e, w, C.signal, a)
454
454
  ]);
455
- if (S) return;
455
+ if (x) return;
456
456
  f({
457
- poll: x,
457
+ poll: v,
458
458
  refs: w,
459
- entities: nt,
460
- votedOptionId: de(V)
459
+ entities: et,
460
+ votedOptionId: xe(P)
461
461
  }), m("ready");
462
462
  } catch {
463
- S || m("error");
463
+ x || m("error");
464
464
  }
465
465
  })(), () => {
466
- S = !0, C.abort();
466
+ x = !0, C.abort();
467
467
  };
468
468
  }, [n, e, a, o, p]);
469
- const rt = j(
470
- () => c ? oe(c.refs, c.entities, r, rn) : [],
469
+ const it = q(
470
+ () => c ? fe(c.refs, c.entities, r, mn) : [],
471
471
  [c, r]
472
- ), O = j(
472
+ ), E = q(
473
473
  () => c ? c.refs.map(
474
474
  (C) => {
475
- var S;
476
- return ((S = c.poll.options.find((M) => M.id === C.optionId)) == null ? void 0 : S.votes) ?? 0;
475
+ var x;
476
+ return ((x = c.poll.options.find((M) => M.id === C.optionId)) == null ? void 0 : x.votes) ?? 0;
477
477
  }
478
478
  ) : [],
479
479
  [c]
480
- ), G = At(
480
+ ), z = Ut(
481
481
  async (C) => {
482
- var S, M;
483
- if (!(!c || R || c.votedOptionId)) {
484
- P(!0);
482
+ var x, M;
483
+ if (!(!c || F || c.votedOptionId)) {
484
+ B(!0);
485
485
  try {
486
- const x = await e.voting.voteForPoll(n, C);
486
+ const v = await e.voting.voteForPoll(n, C);
487
487
  f(
488
488
  (w) => w && {
489
489
  ...w,
@@ -492,149 +492,150 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
492
492
  ...w.poll,
493
493
  totalVotes: (w.poll.totalVotes ?? 0) + 1,
494
494
  options: w.poll.options.map(
495
- (L) => L.id === C ? { ...L, votes: (L.votes ?? 0) + 1 } : L
495
+ (N) => N.id === C ? { ...N, votes: (N.votes ?? 0) + 1 } : N
496
496
  )
497
497
  }
498
498
  }
499
- ), (M = (S = k.current) == null ? void 0 : S.onFinish) == null || M.call(S, x);
500
- } catch (x) {
501
- const { code: w, message: L } = xt(x, e);
502
- w === 401 || w === 403 ? E(!0) : $(L);
499
+ ), (M = (x = S.current) == null ? void 0 : x.onFinish) == null || M.call(x, v);
500
+ } catch (v) {
501
+ const { code: w, message: N } = $t(v, e);
502
+ w === 401 || w === 403 ? T(!0) : $(N);
503
503
  } finally {
504
- P(!1);
504
+ B(!1);
505
505
  }
506
506
  }
507
507
  },
508
- [n, e, c, R]
509
- ), ft = At(() => {
508
+ [n, e, c, F]
509
+ ), L = Ut(() => {
510
510
  e.voting.getPollById(n, a).then(
511
511
  (C) => f(
512
- (S) => S && (C != null && C.id) ? { ...S, poll: C } : S
512
+ (x) => x && (C != null && C.id) ? { ...x, poll: C } : x
513
513
  )
514
514
  ).catch(() => {
515
515
  });
516
- }, [n, e, a]), B = (c == null ? void 0 : c.poll) ?? null;
516
+ }, [n, e, a]), O = (c == null ? void 0 : c.poll) ?? null;
517
517
  return {
518
518
  status: u,
519
- poll: B,
520
- sides: rt,
521
- votes: O,
519
+ poll: O,
520
+ sides: it,
521
+ votes: E,
522
522
  votedOptionId: (c == null ? void 0 : c.votedOptionId) ?? null,
523
- endMs: se((z = B == null ? void 0 : B.customFields) == null ? void 0 : z[Jn]),
524
- signInRequired: U || (B == null ? void 0 : B.authRequirement) === "REGISTERED" && !o,
525
- submitting: R,
526
- voteError: _,
523
+ startMs: Zt((st = O == null ? void 0 : O.customFields) == null ? void 0 : st[ae]),
524
+ endMs: Zt((H = O == null ? void 0 : O.customFields) == null ? void 0 : H[se]),
525
+ signInRequired: X || (O == null ? void 0 : O.authRequirement) === "REGISTERED" && !o,
526
+ submitting: F,
527
+ voteError: U,
527
528
  clearVoteError: () => $(null),
528
- vote: G,
529
- retry: () => h((C) => C + 1),
530
- refresh: ft
529
+ vote: z,
530
+ retry: () => g((C) => C + 1),
531
+ refresh: L
531
532
  };
532
- }, pe = (t) => {
533
- const { t: n } = mt("common");
534
- return j(
533
+ }, Se = (t) => {
534
+ const { t: n } = bt("common");
535
+ return q(
535
536
  () => (e, r) => {
536
537
  const o = t == null ? void 0 : t[e];
537
538
  return typeof o == "string" && o.trim() ? o : n(`battleOfFans.${e}`, r ?? {});
538
539
  },
539
540
  [t, n]
540
541
  );
541
- }, me = (t) => {
542
- const [n, e] = T(() => Date.now()), r = t !== null && n >= t;
543
- return Ft(() => {
542
+ }, Ie = (t) => {
543
+ const [n, e] = A(() => Date.now()), r = t !== null && n >= t;
544
+ return gt(() => {
544
545
  if (t === null || r) return;
545
546
  const o = setInterval(() => e(Date.now()), 1e3);
546
547
  return () => clearInterval(o);
547
548
  }, [t, r]), n;
548
- }, Ut = (t) => {
549
- const n = rn(t);
549
+ }, nn = (t) => {
550
+ const n = mn(t);
550
551
  if (!n) return null;
551
552
  const [e, r, o] = [1, 3, 5].map(
552
553
  (c) => parseInt(n.slice(c, c + 2), 16) / 255
553
554
  ), a = Math.max(e, r, o), u = a - Math.min(e, r, o);
554
555
  return u < 0.12 ? null : ((a === e ? (r - o) / u % 6 : a === r ? (o - e) / u + 2 : (e - r) / u + 4) * 60 + 360) % 360;
555
- }, J = (t, n) => {
556
- if (!Ct(t, n)) return !0;
557
- const e = Ut(t), r = Ut(n);
558
- if (e === null || r === null) return (pt(t, n) ?? 1) < 2;
556
+ }, Q = (t, n) => {
557
+ if (!Et(t, n)) return !0;
558
+ const e = nn(t), r = nn(n);
559
+ if (e === null || r === null) return (ht(t, n) ?? 1) < 2;
559
560
  const o = Math.abs(e - r);
560
561
  return Math.min(o, 360 - o) < 35;
561
- }, fe = (t, n) => {
562
+ }, ve = (t, n) => {
562
563
  const e = [n.primary, n.text, ...n.extras], r = t.map(
563
- (a) => a.filter((u) => Ct(u, n.surface))
564
+ (a) => a.filter((u) => Et(u, n.surface))
564
565
  ), o = r.map(
565
566
  (a, u) => a[0] ?? e[u % e.length]
566
567
  );
567
568
  for (let a = 1; a < o.length; a += 1) {
568
569
  const u = o.slice(0, a);
569
- if (!u.some((p) => J(p, o[a]))) continue;
570
- const m = r[a].slice(1).find((p) => !u.some((h) => J(h, p)));
570
+ if (!u.some((p) => Q(p, o[a]))) continue;
571
+ const m = r[a].slice(1).find((p) => !u.some((g) => Q(g, p)));
571
572
  if (m) {
572
573
  o[a] = m;
573
574
  continue;
574
575
  }
575
576
  let c = !1;
576
577
  for (let p = 0; p < a && !c; p += 1) {
577
- if (!J(o[p], o[a])) continue;
578
- const h = r[p].slice(1).find(
579
- (R) => o.slice(0, a + 1).every((P, U) => U === p || !J(P, R))
578
+ if (!Q(o[p], o[a])) continue;
579
+ const g = r[p].slice(1).find(
580
+ (F) => o.slice(0, a + 1).every((B, X) => X === p || !Q(B, F))
580
581
  );
581
- h && (o[p] = h), c = !o.slice(0, a).some((R) => J(R, o[a]));
582
+ g && (o[p] = g), c = !o.slice(0, a).some((F) => Q(F, o[a]));
582
583
  }
583
584
  if (c) continue;
584
- const f = e.find((p) => !u.some((h) => J(h, p)));
585
- f && u.some((p) => !Ct(p, o[a])) && (o[a] = f);
585
+ const f = e.find((p) => !u.some((g) => Q(g, p)));
586
+ f && u.some((p) => !Et(p, o[a])) && (o[a] = f);
586
587
  }
587
588
  return o;
588
- }, cn = (t, n) => {
589
- if ((pt(n.onPrimary, t) ?? 21) >= 4.5)
589
+ }, bn = (t, n) => {
590
+ if ((ht(n.onPrimary, t) ?? 21) >= 4.5)
590
591
  return n.onPrimary;
591
592
  const e = [n.onPrimary, n.text, n.surface];
592
593
  let r = e[0], o = -1;
593
594
  for (const a of e) {
594
- const u = pt(a, t) ?? -1;
595
+ const u = ht(a, t) ?? -1;
595
596
  u > o && (r = a, o = u);
596
597
  }
597
598
  return r;
598
- }, he = (t, n, e = 3) => (pt(t, n.surface) ?? 21) >= e ? t : n.text, ge = (t, n) => fe(t, n).map((e) => ({
599
+ }, $e = (t, n, e = 3) => (ht(t, n.surface) ?? 21) >= e ? t : n.text, Ce = (t, n) => ve(t, n).map((e) => ({
599
600
  fill: e,
600
- on: cn(e, n),
601
- ink: he(e, n)
602
- })), be = (t, n, e) => Math.max(n, Math.min(e, t)), ye = (t, n) => {
601
+ on: bn(e, n),
602
+ ink: $e(e, n)
603
+ })), we = (t, n, e) => Math.max(n, Math.min(e, t)), We = (t, n) => {
603
604
  const e = t.length, r = 100 / e;
604
605
  if (t.every((c) => c === 0)) return t.map(() => r);
605
606
  const o = r * (n || e > 2 ? 0.8 : 0.6), a = t.map((c) => Math.max(c, o)), u = a.reduce((c, f) => c + f, 0) - 100, m = a.reduce((c, f) => c + (f - o), 0);
606
607
  return a.map((c) => m > 0 ? c - (c - o) / m * u : r);
607
- }, xe = (t, n, e, r) => {
608
- const o = t.length, a = e ? be(t[n], r ? 60 : 56, r ? 68 : 74) : 64, u = 100 - a, c = t.filter((f, p) => p !== n).reduce((f, p) => f + p, 0);
608
+ }, Re = (t, n, e, r) => {
609
+ const o = t.length, a = e ? we(t[n], r ? 60 : 56, r ? 68 : 74) : 64, u = 100 - a, c = t.filter((f, p) => p !== n).reduce((f, p) => f + p, 0);
609
610
  return t.map((f, p) => p === n ? a : !e || c === 0 ? u / (o - 1) : f / c * u);
610
- }, ke = (t) => {
611
+ }, Fe = (t) => {
611
612
  const n = [];
612
613
  let e = 0;
613
614
  for (let r = 0; r < t.length - 1; r += 1)
614
615
  e += t[r], n.push(e);
615
616
  return n;
616
- }, Se = (t) => `${Math.round(t * 100) / 100}%`, Ie = (t, n, e, r) => {
617
- const o = (h) => Se(r ? 100 - h : h), a = n === 0 ? null : t[n - 1], u = n === t.length ? null : t[n], m = o(a === null ? 0 : a + e), c = o(a === null ? 0 : a - e), f = o(u === null ? 100 : u + e), p = o(u === null ? 100 : u - e);
617
+ }, Ee = (t) => `${Math.round(t * 100) / 100}%`, Oe = (t, n, e, r) => {
618
+ const o = (g) => Ee(r ? 100 - g : g), a = n === 0 ? null : t[n - 1], u = n === t.length ? null : t[n], m = o(a === null ? 0 : a + e), c = o(a === null ? 0 : a - e), f = o(u === null ? 100 : u + e), p = o(u === null ? 100 : u - e);
618
619
  return `polygon(${m} 0, ${f} 0, ${p} 100%, ${c} 100%)`;
619
- }, ct = "cubic-bezier(.2,.8,.2,1)", ve = ot({ from: { clipPath: "var(--bof-from)" } }), wt = ot({ from: { opacity: 0, transform: "translateY(10px)" } }), $e = ot({ to: { transform: "rotate(360deg)" } }), dn = ot({
620
+ }, pt = "cubic-bezier(.2,.8,.2,1)", Pe = rt({ from: { clipPath: "var(--bof-from)" } }), Ot = rt({ from: { opacity: 0, transform: "translateY(10px)" } }), Te = rt({ to: { transform: "rotate(360deg)" } }), yn = rt({
620
621
  "0%": { transform: "scale(.92)", opacity: 0 },
621
622
  "60%": { transform: "scale(1.03)" },
622
623
  "100%": { transform: "scale(1)", opacity: 1 }
623
- }), N = { fontFamily: i.fontPrimary, fontWeight: 700 }, It = ([t, n]) => ({
624
+ }), V = { fontFamily: i.fontPrimary, fontWeight: 700 }, Wt = ([t, n]) => ({
624
625
  fontSize: `min(${s(t)}, 30cqi)`,
625
626
  lineHeight: n / t
626
- }), Yt = (t) => ({
627
+ }), en = (t) => ({
627
628
  paddingInlineStart: `calc(${s(t)} + var(--bof-pad-start, 0%))`,
628
629
  paddingInlineEnd: `calc(${s(t)} + var(--bof-pad-end, 0%))`
629
- }), vt = { overflowWrap: "anywhere", maxWidth: "100%" }, $t = ([t, n]) => ({
630
+ }), Rt = { overflowWrap: "anywhere", maxWidth: "100%" }, Ft = ([t, n]) => ({
630
631
  fontSize: `min(${s(t)}, 18cqi)`,
631
632
  lineHeight: n / t
632
- }), dt = { unicodeBidi: "plaintext" }, ut = {
633
+ }), mt = { unicodeBidi: "plaintext" }, ft = {
633
634
  display: "-webkit-box",
634
635
  WebkitLineClamp: 2,
635
636
  WebkitBoxOrient: "vertical",
636
637
  overflow: "hidden"
637
- }, Xt = (t, n) => ({
638
+ }, on = (t, n) => ({
638
639
  boxSizing: "border-box",
639
640
  height: s(t, n),
640
641
  padding: `0 min(${s(20, n)}, 6cqi)`,
@@ -656,8 +657,8 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
656
657
  outline: `2px solid ${i.focus}`,
657
658
  outlineOffset: "2px"
658
659
  }
659
- }), un = (t, n, e) => ({
660
- vote: d(Xt(t, n), e, {
660
+ }), xn = (t, n, e) => ({
661
+ vote: d(on(t, n), e, {
661
662
  backgroundColor: i.fill,
662
663
  color: i.on,
663
664
  cursor: "pointer",
@@ -670,15 +671,15 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
670
671
  "&:active:not(:disabled)": { transform: "translateY(0)" },
671
672
  "&:disabled": { cursor: "default", opacity: 0.7 }
672
673
  }),
673
- thanks: d(Xt(t, n), e, {
674
+ thanks: d(on(t, n), e, {
674
675
  padding: `0 ${s(12, n)}`,
675
676
  border: `2px solid ${i.ink}`,
676
677
  backgroundColor: i.surface,
677
678
  color: i.ink,
678
- animation: `${dn} .35s ease-out`
679
+ animation: `${yn} .35s ease-out`
679
680
  }),
680
681
  icon: d({ fontSize: "1.25em", flexShrink: 0 })
681
- }), Ce = (t) => {
682
+ }), Le = (t) => {
682
683
  const n = (a) => ({
683
684
  display: "block",
684
685
  width: `min(${s(a)}, 100%)`,
@@ -708,22 +709,22 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
708
709
  alignItems: "center",
709
710
  justifyContent: "center",
710
711
  fontSize: s(a * 0.36),
711
- ...N,
712
+ ...V,
712
713
  color: i.text,
713
714
  backgroundColor: i.surface,
714
715
  border: `${i.borderSize} solid ${i.border}`
715
716
  }), o = (a, u) => d(n(a), { objectFit: "contain", filter: u });
716
717
  return {
717
718
  side: {
718
- logo: o(t.img, et.logo),
719
+ logo: o(t.img, ot.logo),
719
720
  headshot: e(t.img, `${s(t.trophyRing)} solid ${i.fill}`),
720
721
  initials: r(t.img)
721
722
  },
722
723
  winner: {
723
- logo: o(t.winImg, et.winnerLogo),
724
+ logo: o(t.winImg, ot.winnerLogo),
724
725
  headshot: d(
725
726
  e(t.winImg, `${s(t.trophyRing + 1)} solid ${i.on}`),
726
- { boxShadow: et.winnerHeadshot }
727
+ { boxShadow: ot.winnerHeadshot }
727
728
  ),
728
729
  initials: r(t.winImg)
729
730
  },
@@ -733,17 +734,17 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
733
734
  initials: r(t.loserImg)
734
735
  },
735
736
  row: {
736
- logo: o(44, et.logo),
737
+ logo: o(44, ot.logo),
737
738
  headshot: e(44, `2px solid ${i.fill}`),
738
739
  initials: r(44)
739
740
  }
740
741
  };
741
- }, we = [
742
+ }, Me = [
742
743
  "top-left",
743
744
  "top-right",
744
745
  "bottom-left",
745
746
  "bottom-right"
746
- ], pn = (t) => {
747
+ ], kn = (t) => {
747
748
  const n = {
748
749
  position: "absolute",
749
750
  width: s(t.trophy),
@@ -753,20 +754,20 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
753
754
  border: `${s(t.trophyRing)} solid ${i.on}`,
754
755
  backgroundColor: i.trophy,
755
756
  color: i.trophyOn,
756
- boxShadow: et.trophy,
757
+ boxShadow: ot.trophy,
757
758
  display: "flex",
758
759
  alignItems: "center",
759
760
  justifyContent: "center",
760
761
  fontSize: "1em",
761
- animation: `${dn} .5s .55s ease-out both`
762
+ animation: `${yn} .5s .55s ease-out both`
762
763
  }, e = (o, a) => {
763
764
  const [u, m] = o.split("-"), c = a ? m === "left" ? "right" : "left" : m;
764
765
  return d(n, { [u]: s(-4), [c]: s(-4) });
765
766
  }, r = {};
766
- for (const o of we)
767
+ for (const o of Me)
767
768
  r[`${o}|ltr`] = e(o, !1), r[`${o}|rtl`] = e(o, !0);
768
769
  return { at: r, icon: d({ fontSize: s(t.trophy * 0.5) }) };
769
- }, Kt = (t, n) => {
770
+ }, rn = (t, n) => {
770
771
  const e = (a) => d({
771
772
  position: "relative",
772
773
  height: s(a),
@@ -781,13 +782,13 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
781
782
  boxSizing: "border-box",
782
783
  containerType: "inline-size",
783
784
  paddingBlock: s(t.colPad[0]),
784
- ...Yt(t.colPad[1]),
785
+ ...en(t.colPad[1]),
785
786
  display: "flex",
786
787
  flexDirection: "column",
787
788
  alignItems: "center",
788
789
  justifyContent: "center",
789
790
  gap: s(a),
790
- transition: `flex-basis .6s ${ct}`
791
+ transition: `flex-basis .6s ${pt}`
791
792
  }), o = n ? { width: "100%" } : { minWidth: `min(${s(180, t.btnFont)}, 100%)`, maxWidth: "100%" };
792
793
  return {
793
794
  bar: e(t.arenaBar),
@@ -799,7 +800,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
799
800
  position: "absolute",
800
801
  inset: 0,
801
802
  backgroundColor: i.tint,
802
- transition: `clip-path .6s ${ct}, background-color .3s`
803
+ transition: `clip-path .6s ${pt}, background-color .3s`
803
804
  }),
804
805
  layerNeutral: d({
805
806
  position: "absolute",
@@ -810,7 +811,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
810
811
  position: "absolute",
811
812
  inset: 0,
812
813
  backgroundColor: i.fill,
813
- animation: `${ve} .9s ${ct} both`
814
+ animation: `${Pe} .9s ${pt} both`
814
815
  }),
815
816
  column: r(t.colGap),
816
817
  columnFill: r(10),
@@ -830,17 +831,17 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
830
831
  } : {}
831
832
  ),
832
833
  name: d({
833
- ...N,
834
- ...$t(t.name),
835
- ...dt,
836
- ...ut,
837
- ...vt,
834
+ ...V,
835
+ ...Ft(t.name),
836
+ ...mt,
837
+ ...ft,
838
+ ...Rt,
838
839
  textAlign: "center",
839
840
  textWrap: "balance"
840
841
  }),
841
842
  pct: d({
842
- ...N,
843
- ...It(t.pctFill),
843
+ ...V,
844
+ ...Wt(t.pctFill),
844
845
  color: i.ink,
845
846
  fontVariantNumeric: "tabular-nums"
846
847
  }),
@@ -858,7 +859,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
858
859
  display: "flex",
859
860
  justifyContent: "center"
860
861
  }),
861
- ...un(t.btnH, t.btnFont, o),
862
+ ...xn(t.btnH, t.btnFont, o),
862
863
  // Winner panel
863
864
  winColumn: d({
864
865
  position: "relative",
@@ -867,8 +868,8 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
867
868
  boxSizing: "border-box",
868
869
  containerType: "inline-size",
869
870
  paddingBlock: s(n ? 12 : 24),
870
- ...Yt(n ? 12 : 24),
871
- transition: `flex-basis .6s ${ct}`,
871
+ ...en(n ? 12 : 24),
872
+ transition: `flex-basis .6s ${pt}`,
872
873
  display: "flex",
873
874
  alignItems: "center",
874
875
  justifyContent: "center"
@@ -882,7 +883,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
882
883
  textAlign: n ? "center" : "start",
883
884
  color: i.on,
884
885
  minWidth: 0,
885
- animation: `${wt} .6s .25s ease-out both`
886
+ animation: `${Ot} .6s .25s ease-out both`
886
887
  }),
887
888
  winWrap: d({
888
889
  position: "relative",
@@ -902,7 +903,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
902
903
  pointerEvents: "none",
903
904
  background: `repeating-conic-gradient(from 0deg, color-mix(in srgb, ${i.on} 12%, transparent) 0deg 9deg, transparent 9deg 18deg), radial-gradient(circle closest-side, color-mix(in srgb, ${i.on} 24%, transparent) 0%, transparent 72%)`,
904
905
  maskImage: "radial-gradient(circle closest-side, #000 28%, transparent 100%)",
905
- animation: `${$e} 80s linear infinite`
906
+ animation: `${Te} 80s linear infinite`
906
907
  }),
907
908
  winText: d({
908
909
  minWidth: 0,
@@ -917,11 +918,11 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
917
918
  ...I(t.eyebrow)
918
919
  }),
919
920
  winName: d({
920
- ...N,
921
- ...$t(t.winName),
922
- ...dt,
923
- ...ut,
924
- ...vt,
921
+ ...V,
922
+ ...Ft(t.winName),
923
+ ...mt,
924
+ ...ft,
925
+ ...Rt,
925
926
  letterSpacing: "-0.01em",
926
927
  textWrap: "balance"
927
928
  }),
@@ -940,8 +941,8 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
940
941
  }
941
942
  ),
942
943
  winPct: d({
943
- ...N,
944
- ...It(t.winPct),
944
+ ...V,
945
+ ...Wt(t.winPct),
945
946
  fontVariantNumeric: "tabular-nums"
946
947
  }),
947
948
  ofVotes: d({ fontWeight: 500, ...I([14, 20]) }),
@@ -953,7 +954,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
953
954
  gap: s(6),
954
955
  textAlign: "center",
955
956
  minWidth: 0,
956
- animation: `${wt} .6s .4s ease-out both`
957
+ animation: `${Ot} .6s .4s ease-out both`
957
958
  }),
958
959
  loserSlot: d({
959
960
  width: "100%",
@@ -964,23 +965,23 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
964
965
  filter: "grayscale(1) opacity(0.7)"
965
966
  }),
966
967
  loserName: d({
967
- ...N,
968
- ...$t(t.loserName),
969
- ...dt,
970
- ...ut,
971
- ...vt,
968
+ ...V,
969
+ ...Ft(t.loserName),
970
+ ...mt,
971
+ ...ft,
972
+ ...Rt,
972
973
  paddingTop: s(2),
973
974
  textWrap: "balance"
974
975
  }),
975
976
  loserPct: d({
976
- ...N,
977
- ...It(t.loserPct),
977
+ ...V,
978
+ ...Wt(t.loserPct),
978
979
  fontVariantNumeric: "tabular-nums"
979
980
  }),
980
- img: Ce(t),
981
- trophy: pn(t)
981
+ img: Le(t),
982
+ trophy: kn(t)
982
983
  };
983
- }, We = () => ({
984
+ }, Ne = () => ({
984
985
  shell: d({
985
986
  display: "flex",
986
987
  flexDirection: "column",
@@ -992,7 +993,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
992
993
  }),
993
994
  row: d({
994
995
  position: "relative",
995
- height: s(kt),
996
+ height: s(Ct),
996
997
  boxSizing: "border-box",
997
998
  padding: `0 ${s(12)}`,
998
999
  display: "flex",
@@ -1002,7 +1003,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1002
1003
  }),
1003
1004
  rowNeutral: d({
1004
1005
  position: "relative",
1005
- height: s(kt),
1006
+ height: s(Ct),
1006
1007
  boxSizing: "border-box",
1007
1008
  padding: `0 ${s(12)}`,
1008
1009
  display: "flex",
@@ -1011,7 +1012,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1011
1012
  }),
1012
1013
  rowWinner: d({
1013
1014
  position: "relative",
1014
- height: s(kt),
1015
+ height: s(Ct),
1015
1016
  boxSizing: "border-box",
1016
1017
  padding: `0 ${s(12)}`,
1017
1018
  display: "flex",
@@ -1019,40 +1020,40 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1019
1020
  gap: s(12),
1020
1021
  backgroundColor: i.fill,
1021
1022
  color: i.on,
1022
- animation: `${wt} .6s ease-out both`
1023
+ animation: `${Ot} .6s ease-out both`
1023
1024
  }),
1024
1025
  greyed: d({ filter: "grayscale(1) opacity(0.7)", display: "flex" }),
1025
1026
  imgWrap: d({ position: "relative", display: "flex", flexShrink: 0 }),
1026
1027
  name: d({
1027
- ...N,
1028
+ ...V,
1028
1029
  ...I([15, 20]),
1029
- ...dt,
1030
- ...ut,
1030
+ ...mt,
1031
+ ...ft,
1031
1032
  flex: 1,
1032
1033
  minWidth: 0
1033
1034
  }),
1034
1035
  pct: d({
1035
- ...N,
1036
+ ...V,
1036
1037
  ...I([20, 24]),
1037
1038
  color: i.ink,
1038
1039
  fontVariantNumeric: "tabular-nums",
1039
1040
  flexShrink: 0
1040
1041
  }),
1041
1042
  pctOn: d({
1042
- ...N,
1043
+ ...V,
1043
1044
  ...I([20, 24]),
1044
1045
  fontVariantNumeric: "tabular-nums",
1045
1046
  flexShrink: 0
1046
1047
  }),
1047
1048
  action: d({ width: s(104), flexShrink: 0, display: "flex" }),
1048
- ...un(40, 14, { width: "100%" }),
1049
- trophy: pn({ trophy: 22, trophyRing: 2 })
1050
- }), g = { d: Kt(Z, !1), m: Kt(tt, !0) }, F = We(), Q = ({ side: t, layout: n, variant: e, language: r }) => {
1051
- const [o, a] = T(null), u = t.image && o !== t.image ? t.image : null;
1052
- return t.kind === "player" ? /* @__PURE__ */ l("div", { css: g[n].img[e].headshot, "aria-hidden": "true", children: /* @__PURE__ */ l(
1049
+ ...xn(40, 14, { width: "100%" }),
1050
+ trophy: kn({ trophy: 22, trophyRing: 2 })
1051
+ }), h = { d: rn(tt, !1), m: rn(nt, !0) }, R = Ne(), Z = ({ side: t, layout: n, variant: e, language: r }) => {
1052
+ const [o, a] = A(null), u = t.image && o !== t.image ? t.image : null;
1053
+ return t.kind === "player" ? /* @__PURE__ */ l("div", { css: h[n].img[e].headshot, "aria-hidden": "true", children: /* @__PURE__ */ l(
1053
1054
  "img",
1054
1055
  {
1055
- src: u ?? zn.playerPlaceholder,
1056
+ src: u ?? Un.playerPlaceholder,
1056
1057
  alt: "",
1057
1058
  loading: "lazy",
1058
1059
  decoding: "async",
@@ -1061,37 +1062,37 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1061
1062
  ) }) : u ? /* @__PURE__ */ l(
1062
1063
  "img",
1063
1064
  {
1064
- css: g[n].img[e].logo,
1065
+ css: h[n].img[e].logo,
1065
1066
  src: u,
1066
1067
  alt: "",
1067
1068
  loading: "lazy",
1068
1069
  decoding: "async",
1069
1070
  onError: () => a(u)
1070
1071
  }
1071
- ) : /* @__PURE__ */ l("div", { css: g[n].img[e].initials, "aria-hidden": "true", children: Mn(t.name, r) });
1072
- }, mn = ({ position: t, layout: n, row: e }) => {
1073
- const r = `${t}|${Rt() ? "rtl" : "ltr"}`;
1072
+ ) : /* @__PURE__ */ l("div", { css: h[n].img[e].initials, "aria-hidden": "true", children: Yn(t.name, r) });
1073
+ }, Sn = ({ position: t, layout: n, row: e }) => {
1074
+ const r = `${t}|${Tt() ? "rtl" : "ltr"}`;
1074
1075
  return /* @__PURE__ */ l(
1075
1076
  "div",
1076
1077
  {
1077
- css: e ? F.trophy.at[r] : g[n].trophy.at[r],
1078
+ css: e ? R.trophy.at[r] : h[n].trophy.at[r],
1078
1079
  "aria-hidden": "true",
1079
1080
  children: /* @__PURE__ */ l(
1080
- Gn,
1081
+ te,
1081
1082
  {
1082
- css: e ? F.trophy.icon : g[n].trophy.icon
1083
+ css: e ? R.trophy.icon : h[n].trophy.icon
1083
1084
  }
1084
1085
  )
1085
1086
  }
1086
1087
  );
1087
- }, Fe = (t) => {
1088
+ }, De = (t) => {
1088
1089
  if (t != null && t.onClick) return t.onClick;
1089
1090
  const n = t == null ? void 0 : t.url;
1090
1091
  if (n)
1091
1092
  return () => {
1092
1093
  ((t == null ? void 0 : t.target) ?? "_self") === "_blank" ? window.open(n, "_blank") : window.location.href = n;
1093
1094
  };
1094
- }, fn = ({
1095
+ }, In = ({
1095
1096
  state: t,
1096
1097
  layout: n,
1097
1098
  row: e,
@@ -1100,51 +1101,51 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1100
1101
  onVote: a
1101
1102
  }) => {
1102
1103
  if (t === "signIn") {
1103
- if (o != null && o.component) return /* @__PURE__ */ l(Wt, { children: o.component });
1104
- const u = Fe(o);
1104
+ if (o != null && o.component) return /* @__PURE__ */ l(Pt, { children: o.component });
1105
+ const u = De(o);
1105
1106
  return /* @__PURE__ */ l(
1106
1107
  "button",
1107
1108
  {
1108
1109
  type: "button",
1109
- css: e ? F.vote : g[n].vote,
1110
+ css: e ? R.vote : h[n].vote,
1110
1111
  disabled: !u,
1111
1112
  onClick: u,
1112
1113
  children: /* @__PURE__ */ l("span", { children: (o == null ? void 0 : o.defaultLabel) || r.signIn })
1113
1114
  }
1114
1115
  );
1115
1116
  }
1116
- return t === "chosen" ? /* @__PURE__ */ b("div", { css: e ? F.thanks : g[n].thanks, role: "status", children: [
1117
- /* @__PURE__ */ l(qn, { css: g.d.icon }),
1117
+ return t === "chosen" ? /* @__PURE__ */ b("div", { css: e ? R.thanks : h[n].thanks, role: "status", children: [
1118
+ /* @__PURE__ */ l(ne, { css: h.d.icon }),
1118
1119
  /* @__PURE__ */ l("span", { children: r.thankYou })
1119
1120
  ] }) : t === "locked" ? null : /* @__PURE__ */ l(
1120
1121
  "button",
1121
1122
  {
1122
1123
  type: "button",
1123
- css: e ? F.vote : g[n].vote,
1124
+ css: e ? R.vote : h[n].vote,
1124
1125
  "aria-label": r.voteFor,
1125
- disabled: t === "submitting",
1126
+ disabled: t === "submitting" || t === "upcoming",
1126
1127
  onClick: a,
1127
1128
  children: /* @__PURE__ */ l("span", { children: r.vote })
1128
1129
  }
1129
1130
  );
1130
- }, D = (t, n) => ({
1131
+ }, _ = (t, n) => ({
1131
1132
  "--bof-fill": t.fill,
1132
1133
  "--bof-on": t.on,
1133
1134
  "--bof-ink": t.ink,
1134
1135
  ...n ? { "--bof-from": n } : {}
1135
- }), Et = (t, n) => ({
1136
- ...D(t.colours[n]),
1136
+ }), Lt = (t, n) => ({
1137
+ ..._(t.colours[n]),
1137
1138
  flex: `0 0 ${t.widths[n]}%`,
1138
1139
  "--bof-pad-start": n > 0 ? `${t.slant}%` : "0%",
1139
1140
  "--bof-pad-end": n < t.sides.length - 1 ? `${t.slant}%` : "0%"
1140
- }), hn = (t, n) => ({
1141
+ }), vn = (t, n) => ({
1141
1142
  vote: t.label("vote"),
1142
1143
  voteFor: t.label("voteFor", { name: n.name }),
1143
1144
  thankYou: t.label("thankYou"),
1144
1145
  signIn: t.label("signIn")
1145
- }), Re = ({ view: t }) => /* @__PURE__ */ l("div", { css: F.shell, role: "group", "aria-label": t.splitLabel ?? void 0, children: t.sides.map((n, e) => {
1146
+ }), Be = ({ view: t }) => /* @__PURE__ */ l("div", { css: R.shell, role: "group", "aria-label": t.splitLabel ?? void 0, children: t.sides.map((n, e) => {
1146
1147
  const r = t.winner === e, o = t.winner !== null && !r, a = /* @__PURE__ */ l(
1147
- Q,
1148
+ Z,
1148
1149
  {
1149
1150
  side: n,
1150
1151
  layout: "m",
@@ -1155,22 +1156,22 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1155
1156
  return /* @__PURE__ */ b(
1156
1157
  "div",
1157
1158
  {
1158
- css: r ? F.rowWinner : t.lit[e] && !o ? F.row : F.rowNeutral,
1159
- style: D(t.colours[e]),
1159
+ css: r ? R.rowWinner : t.lit[e] && !o ? R.row : R.rowNeutral,
1160
+ style: _(t.colours[e]),
1160
1161
  children: [
1161
- /* @__PURE__ */ b("div", { css: F.imgWrap, children: [
1162
- o ? /* @__PURE__ */ l("div", { css: F.greyed, children: a }) : a,
1163
- r && t.showTrophy && /* @__PURE__ */ l(mn, { position: t.trophyPosition, layout: "m", row: !0 })
1162
+ /* @__PURE__ */ b("div", { css: R.imgWrap, children: [
1163
+ o ? /* @__PURE__ */ l("div", { css: R.greyed, children: a }) : a,
1164
+ r && t.showTrophy && /* @__PURE__ */ l(Sn, { position: t.trophyPosition, layout: "m", row: !0 })
1164
1165
  ] }),
1165
- /* @__PURE__ */ l("div", { css: F.name, children: n.name }),
1166
- t.fill && t.percents[e] !== null && /* @__PURE__ */ l("div", { css: r ? F.pctOn : F.pct, children: t.percents[e] }),
1167
- !t.ended && /* @__PURE__ */ l("div", { css: F.action, children: /* @__PURE__ */ l(
1168
- fn,
1166
+ /* @__PURE__ */ l("div", { css: R.name, children: n.name }),
1167
+ t.fill && t.percents[e] !== null && /* @__PURE__ */ l("div", { css: r ? R.pctOn : R.pct, children: t.percents[e] }),
1168
+ !t.ended && /* @__PURE__ */ l("div", { css: R.action, children: /* @__PURE__ */ l(
1169
+ In,
1169
1170
  {
1170
1171
  state: t.actions[e],
1171
1172
  layout: "m",
1172
1173
  row: !0,
1173
- labels: hn(t, n),
1174
+ labels: vn(t, n),
1174
1175
  signInCTA: t.signInCTA,
1175
1176
  onVote: () => t.onVote(e)
1176
1177
  }
@@ -1179,16 +1180,16 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1179
1180
  },
1180
1181
  n.optionId
1181
1182
  );
1182
- }) }), Ee = ({
1183
+ }) }), ze = ({
1183
1184
  view: t,
1184
1185
  index: n
1185
1186
  }) => {
1186
1187
  const e = t.sides[n];
1187
- return /* @__PURE__ */ l("div", { css: g[t.layout].winColumn, style: Et(t, n), children: /* @__PURE__ */ b("div", { css: g[t.layout].winContent, children: [
1188
- /* @__PURE__ */ b("div", { css: g[t.layout].winWrap, children: [
1189
- /* @__PURE__ */ l("div", { css: g[t.layout].rays, "aria-hidden": "true" }),
1188
+ return /* @__PURE__ */ l("div", { css: h[t.layout].winColumn, style: Lt(t, n), children: /* @__PURE__ */ b("div", { css: h[t.layout].winContent, children: [
1189
+ /* @__PURE__ */ b("div", { css: h[t.layout].winWrap, children: [
1190
+ /* @__PURE__ */ l("div", { css: h[t.layout].rays, "aria-hidden": "true" }),
1190
1191
  /* @__PURE__ */ l(
1191
- Q,
1192
+ Z,
1192
1193
  {
1193
1194
  side: e,
1194
1195
  layout: t.layout,
@@ -1197,7 +1198,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1197
1198
  }
1198
1199
  ),
1199
1200
  t.showTrophy && /* @__PURE__ */ l(
1200
- mn,
1201
+ Sn,
1201
1202
  {
1202
1203
  position: t.trophyPosition,
1203
1204
  layout: t.layout,
@@ -1205,23 +1206,23 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1205
1206
  }
1206
1207
  )
1207
1208
  ] }),
1208
- /* @__PURE__ */ b("div", { css: g[t.layout].winText, children: [
1209
- /* @__PURE__ */ l("div", { css: g[t.layout].eyebrow, children: t.label("winner") }),
1210
- /* @__PURE__ */ l("div", { css: g[t.layout].winName, children: e.name }),
1211
- t.fill && t.percents[n] !== null && /* @__PURE__ */ b("div", { css: g[t.layout].winPctRow, children: [
1212
- /* @__PURE__ */ l("span", { css: g[t.layout].winPct, children: t.percents[n] }),
1213
- /* @__PURE__ */ l("span", { css: g[t.layout].ofVotes, children: t.label("ofTheVotes") })
1209
+ /* @__PURE__ */ b("div", { css: h[t.layout].winText, children: [
1210
+ /* @__PURE__ */ l("div", { css: h[t.layout].eyebrow, children: t.label("winner") }),
1211
+ /* @__PURE__ */ l("div", { css: h[t.layout].winName, children: e.name }),
1212
+ t.fill && t.percents[n] !== null && /* @__PURE__ */ b("div", { css: h[t.layout].winPctRow, children: [
1213
+ /* @__PURE__ */ l("span", { css: h[t.layout].winPct, children: t.percents[n] }),
1214
+ /* @__PURE__ */ l("span", { css: h[t.layout].ofVotes, children: t.label("ofTheVotes") })
1214
1215
  ] })
1215
1216
  ] })
1216
1217
  ] }) });
1217
- }, Oe = ({
1218
+ }, Ae = ({
1218
1219
  view: t,
1219
1220
  index: n
1220
1221
  }) => {
1221
1222
  const e = t.sides[n];
1222
- return /* @__PURE__ */ l("div", { css: g[t.layout].winColumn, style: Et(t, n), children: /* @__PURE__ */ b("div", { css: g[t.layout].loserContent, children: [
1223
- /* @__PURE__ */ l("div", { css: g[t.layout].loserSlot, children: /* @__PURE__ */ l(
1224
- Q,
1223
+ return /* @__PURE__ */ l("div", { css: h[t.layout].winColumn, style: Lt(t, n), children: /* @__PURE__ */ b("div", { css: h[t.layout].loserContent, children: [
1224
+ /* @__PURE__ */ l("div", { css: h[t.layout].loserSlot, children: /* @__PURE__ */ l(
1225
+ Z,
1225
1226
  {
1226
1227
  side: e,
1227
1228
  layout: t.layout,
@@ -1229,10 +1230,10 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1229
1230
  language: t.language
1230
1231
  }
1231
1232
  ) }),
1232
- /* @__PURE__ */ l("div", { css: g[t.layout].loserName, children: e.name }),
1233
- t.fill && t.percents[n] !== null && /* @__PURE__ */ l("div", { css: g[t.layout].loserPct, children: t.percents[n] })
1233
+ /* @__PURE__ */ l("div", { css: h[t.layout].loserName, children: e.name }),
1234
+ t.fill && t.percents[n] !== null && /* @__PURE__ */ l("div", { css: h[t.layout].loserPct, children: t.percents[n] })
1234
1235
  ] }) });
1235
- }, Pe = ({
1236
+ }, Ve = ({
1236
1237
  view: t,
1237
1238
  index: n
1238
1239
  }) => {
@@ -1240,11 +1241,11 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1240
1241
  return /* @__PURE__ */ b(
1241
1242
  "div",
1242
1243
  {
1243
- css: t.fill ? g[t.layout].columnFill : g[t.layout].column,
1244
- style: Et(t, n),
1244
+ css: t.fill ? h[t.layout].columnFill : h[t.layout].column,
1245
+ style: Lt(t, n),
1245
1246
  children: [
1246
- /* @__PURE__ */ l("div", { css: g[t.layout].imgSlot, children: /* @__PURE__ */ l(
1247
- Q,
1247
+ /* @__PURE__ */ l("div", { css: h[t.layout].imgSlot, children: /* @__PURE__ */ l(
1248
+ Z,
1248
1249
  {
1249
1250
  side: e,
1250
1251
  layout: t.layout,
@@ -1252,19 +1253,19 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1252
1253
  language: t.language
1253
1254
  }
1254
1255
  ) }),
1255
- /* @__PURE__ */ l("div", { css: g[t.layout].nameBox, children: /* @__PURE__ */ l("div", { css: g[t.layout].name, children: e.name }) }),
1256
- t.fill && t.percents[n] !== null && /* @__PURE__ */ l("div", { css: g[t.layout].pct, children: t.percents[n] }),
1256
+ /* @__PURE__ */ l("div", { css: h[t.layout].nameBox, children: /* @__PURE__ */ l("div", { css: h[t.layout].name, children: e.name }) }),
1257
+ t.fill && t.percents[n] !== null && /* @__PURE__ */ l("div", { css: h[t.layout].pct, children: t.percents[n] }),
1257
1258
  !t.ended && /* @__PURE__ */ l(
1258
1259
  "div",
1259
1260
  {
1260
- css: t.fill ? g[t.layout].actionFill : g[t.layout].action,
1261
+ css: t.fill ? h[t.layout].actionFill : h[t.layout].action,
1261
1262
  children: /* @__PURE__ */ l(
1262
- fn,
1263
+ In,
1263
1264
  {
1264
1265
  state: t.actions[n],
1265
1266
  layout: t.layout,
1266
1267
  row: !1,
1267
- labels: hn(t, e),
1268
+ labels: vn(t, e),
1268
1269
  signInCTA: t.signInCTA,
1269
1270
  onVote: () => t.onVote(n)
1270
1271
  }
@@ -1274,23 +1275,23 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1274
1275
  ]
1275
1276
  }
1276
1277
  );
1277
- }, Le = ({ view: t }) => {
1278
- if (t.rows) return /* @__PURE__ */ l(Re, { view: t });
1278
+ }, _e = ({ view: t }) => {
1279
+ if (t.rows) return /* @__PURE__ */ l(Be, { view: t });
1279
1280
  const n = t.winner;
1280
1281
  return /* @__PURE__ */ b(
1281
1282
  "div",
1282
1283
  {
1283
- css: t.fill ? g[t.layout].fill : g[t.layout].bar,
1284
+ css: t.fill ? h[t.layout].fill : h[t.layout].bar,
1284
1285
  role: "group",
1285
1286
  "aria-label": t.splitLabel ?? void 0,
1286
1287
  children: [
1287
1288
  n !== null ? /* @__PURE__ */ l(
1288
1289
  "div",
1289
1290
  {
1290
- css: g[t.layout].layerWinner,
1291
+ css: h[t.layout].layerWinner,
1291
1292
  "aria-hidden": "true",
1292
1293
  style: {
1293
- ...D(t.colours[n], t.evenClips[n]),
1294
+ ..._(t.colours[n], t.evenClips[n]),
1294
1295
  clipPath: t.clips[n]
1295
1296
  }
1296
1297
  },
@@ -1298,71 +1299,80 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1298
1299
  ) : t.sides.map((e, r) => /* @__PURE__ */ l(
1299
1300
  "div",
1300
1301
  {
1301
- css: t.lit[r] ? g[t.layout].layer : g[t.layout].layerNeutral,
1302
+ css: t.lit[r] ? h[t.layout].layer : h[t.layout].layerNeutral,
1302
1303
  "aria-hidden": "true",
1303
- style: { ...D(t.colours[r]), clipPath: t.clips[r] }
1304
+ style: { ..._(t.colours[r]), clipPath: t.clips[r] }
1304
1305
  },
1305
1306
  e.optionId
1306
1307
  )),
1307
1308
  t.sides.map(
1308
- (e, r) => n === null ? /* @__PURE__ */ l(Pe, { view: t, index: r }, e.optionId) : r === n ? /* @__PURE__ */ l(Ee, { view: t, index: r }, e.optionId) : /* @__PURE__ */ l(Oe, { view: t, index: r }, e.optionId)
1309
+ (e, r) => n === null ? /* @__PURE__ */ l(Ve, { view: t, index: r }, e.optionId) : r === n ? /* @__PURE__ */ l(ze, { view: t, index: r }, e.optionId) : /* @__PURE__ */ l(Ae, { view: t, index: r }, e.optionId)
1309
1310
  )
1310
1311
  ]
1311
1312
  }
1312
1313
  );
1313
- }, Te = ({ layout: t, label: n, left: e }) => {
1314
- const r = sn(), o = j(
1315
- () => new Intl.NumberFormat(r, {
1314
+ }, He = ({ layout: t, label: n, caption: e, left: r }) => {
1315
+ const o = fn(), a = q(
1316
+ () => new Intl.NumberFormat(o, {
1316
1317
  minimumIntegerDigits: 2,
1317
1318
  useGrouping: !1
1318
1319
  }),
1319
- [r]
1320
- ), a = [
1321
- { value: e.days, caption: n("days") },
1322
- { value: e.hours, caption: n("hours") },
1323
- { value: e.minutes, caption: n("minutes") },
1324
- { value: e.seconds, caption: n("seconds") }
1320
+ [o]
1321
+ ), u = [
1322
+ { value: r.days, caption: n("days") },
1323
+ { value: r.hours, caption: n("hours") },
1324
+ { value: r.minutes, caption: n("minutes") },
1325
+ { value: r.seconds, caption: n("seconds") }
1325
1326
  ];
1326
- return /* @__PURE__ */ b("div", { css: q[t].root, children: [
1327
- /* @__PURE__ */ l("div", { css: q[t].label, children: n("votingEndsIn") }),
1328
- /* @__PURE__ */ l("div", { css: q[t].units, children: a.map((u, m) => /* @__PURE__ */ b(en.Fragment, { children: [
1329
- t === "d" && m > 0 && /* @__PURE__ */ l("div", { css: q.d.colon, "aria-hidden": "true", children: ":" }),
1330
- /* @__PURE__ */ b("div", { css: q[t].unit, children: [
1331
- /* @__PURE__ */ l("div", { css: q[t].value, children: o.format(u.value) }),
1332
- /* @__PURE__ */ l("div", { css: q[t].caption, children: u.caption })
1327
+ return /* @__PURE__ */ b("div", { css: Y[t].root, children: [
1328
+ /* @__PURE__ */ l("div", { css: Y[t].label, children: e }),
1329
+ /* @__PURE__ */ l("div", { css: Y[t].units, children: u.map((m, c) => /* @__PURE__ */ b(un.Fragment, { children: [
1330
+ t === "d" && c > 0 && /* @__PURE__ */ l("div", { css: Y.d.colon, "aria-hidden": "true", children: ":" }),
1331
+ /* @__PURE__ */ b("div", { css: Y[t].unit, children: [
1332
+ /* @__PURE__ */ l("div", { css: Y[t].value, children: a.format(m.value) }),
1333
+ /* @__PURE__ */ l("div", { css: Y[t].caption, children: m.caption })
1333
1334
  ] })
1334
- ] }, m)) })
1335
+ ] }, c)) })
1335
1336
  ] });
1336
- }, Ne = ({
1337
+ }, je = ({
1337
1338
  layout: t,
1338
1339
  label: n,
1339
1340
  title: e,
1340
1341
  openSubtitle: r,
1341
1342
  ended: o,
1342
1343
  draw: a,
1343
- left: u
1344
+ upcoming: u,
1345
+ left: m
1344
1346
  }) => {
1345
- const m = [
1347
+ const c = [
1346
1348
  { key: "open", text: r, on: !o },
1347
1349
  { key: "ended", text: n("endedSubtitle"), on: o && !a },
1348
1350
  { key: "draw", text: n("drawSubtitle"), on: o && a }
1349
- ], c = o ? /* @__PURE__ */ l("div", { css: y[t].pill, children: n("votingEnded") }) : u ? /* @__PURE__ */ l(Te, { layout: t, label: n, left: u }) : null;
1351
+ ], f = o ? /* @__PURE__ */ l("div", { css: y[t].pill, children: n("votingEnded") }) : m ? /* @__PURE__ */ l(
1352
+ He,
1353
+ {
1354
+ layout: t,
1355
+ label: n,
1356
+ caption: n(u ? "votingStartsIn" : "votingEndsIn"),
1357
+ left: m
1358
+ }
1359
+ ) : u ? /* @__PURE__ */ l("div", { css: y[t].pill, children: n("votingStartsSoon") }) : null;
1350
1360
  return /* @__PURE__ */ b("div", { css: y[t].header, children: [
1351
1361
  /* @__PURE__ */ b("div", { css: y[t].titles, children: [
1352
1362
  /* @__PURE__ */ l("h2", { css: y[t].title, children: e }),
1353
- /* @__PURE__ */ l("div", { css: y[t].subtitles, children: m.map((f) => /* @__PURE__ */ l(
1363
+ /* @__PURE__ */ l("div", { css: y[t].subtitles, children: c.map((p) => /* @__PURE__ */ l(
1354
1364
  "p",
1355
1365
  {
1356
- css: f.on ? y[t].subtitle : y[t].subtitleHidden,
1357
- "aria-hidden": !f.on,
1358
- children: f.text
1366
+ css: p.on ? y[t].subtitle : y[t].subtitleHidden,
1367
+ "aria-hidden": !p.on,
1368
+ children: p.text
1359
1369
  },
1360
- f.key
1370
+ p.key
1361
1371
  )) })
1362
1372
  ] }),
1363
- t === "m" ? c && /* @__PURE__ */ l("div", { css: y.m.status, children: c }) : c
1373
+ t === "m" ? f && /* @__PURE__ */ l("div", { css: y.m.status, children: f }) : f
1364
1374
  ] });
1365
- }, Jt = (t) => ({
1375
+ }, sn = (t) => ({
1366
1376
  fontSize: "1em",
1367
1377
  display: "flex",
1368
1378
  flexDirection: "column",
@@ -1370,16 +1380,16 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1370
1380
  gap: t ? i.spaceMd : i.spaceLg,
1371
1381
  padding: t ? i.spaceMd : `${s(32)} ${i.spaceLg}`,
1372
1382
  borderRadius: i.radiusMd
1373
- }), Qt = (t) => d({
1383
+ }), an = (t) => d({
1374
1384
  flexShrink: 0,
1375
1385
  width: "2px",
1376
1386
  height: s(32),
1377
1387
  backgroundColor: i.border,
1378
1388
  transform: `skewX(${t ? 14 : -14}deg)`
1379
- }), Zt = (t) => ({
1380
- panel: d(Jt(t), { backgroundColor: i.inner }),
1389
+ }), ln = (t) => ({
1390
+ panel: d(sn(t), { backgroundColor: i.inner }),
1381
1391
  // "after": the panel takes the picked side's tint.
1382
- panelPicked: d(Jt(t), { backgroundColor: i.tint }),
1392
+ panelPicked: d(sn(t), { backgroundColor: i.tint }),
1383
1393
  intro: d({
1384
1394
  display: "flex",
1385
1395
  flexDirection: "column",
@@ -1441,11 +1451,11 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1441
1451
  backgroundColor: i.surface,
1442
1452
  border: `${i.borderSize} solid ${i.border}`
1443
1453
  })
1444
- }), H = { d: Zt(!1), m: Zt(!0) }, De = { ltr: Qt(!1), rtl: Qt(!0) }, Be = (t) => {
1445
- var h;
1446
- const { layout: n, poll: e, sides: r, colours: o, picked: a } = t, { t: u } = mt("common"), m = Rt(), c = a !== null ? r[a] : null, f = e.labels, p = c ? /* @__PURE__ */ b("div", { css: H[n].pick, children: [
1454
+ }), j = { d: ln(!1), m: ln(!0) }, Ge = { ltr: an(!1), rtl: an(!0) }, qe = (t) => {
1455
+ var g;
1456
+ const { layout: n, poll: e, sides: r, colours: o, picked: a } = t, { t: u } = bt("common"), m = Tt(), c = a !== null ? r[a] : null, f = e.labels, p = c ? /* @__PURE__ */ b("div", { css: j[n].pick, children: [
1447
1457
  /* @__PURE__ */ l(
1448
- Q,
1458
+ Z,
1449
1459
  {
1450
1460
  side: c,
1451
1461
  layout: n,
@@ -1453,39 +1463,39 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1453
1463
  language: t.language
1454
1464
  }
1455
1465
  ),
1456
- /* @__PURE__ */ l("p", { css: H[n].pickName, children: c.name })
1457
- ] }) : /* @__PURE__ */ l("div", { css: H[n].sides, "aria-hidden": "true", children: r.map((R, P) => /* @__PURE__ */ b(en.Fragment, { children: [
1458
- P > 0 && /* @__PURE__ */ l("span", { css: De[m ? "rtl" : "ltr"] }),
1459
- /* @__PURE__ */ l("span", { style: D(o[P]), children: /* @__PURE__ */ l(
1460
- Q,
1466
+ /* @__PURE__ */ l("p", { css: j[n].pickName, children: c.name })
1467
+ ] }) : /* @__PURE__ */ l("div", { css: j[n].sides, "aria-hidden": "true", children: r.map((F, B) => /* @__PURE__ */ b(un.Fragment, { children: [
1468
+ B > 0 && /* @__PURE__ */ l("span", { css: Ge[m ? "rtl" : "ltr"] }),
1469
+ /* @__PURE__ */ l("span", { style: _(o[B]), children: /* @__PURE__ */ l(
1470
+ Z,
1461
1471
  {
1462
- side: R,
1472
+ side: F,
1463
1473
  layout: n,
1464
1474
  variant: "row",
1465
1475
  language: t.language
1466
1476
  }
1467
1477
  ) })
1468
- ] }, R.optionId)) });
1478
+ ] }, F.optionId)) });
1469
1479
  return /* @__PURE__ */ b(
1470
1480
  "div",
1471
1481
  {
1472
- css: c ? H[n].panelPicked : H[n].panel,
1482
+ css: c ? j[n].panelPicked : j[n].panel,
1473
1483
  style: a !== null ? {
1474
- ...D(o[a]),
1484
+ ..._(o[a]),
1475
1485
  "--fu-ucrc-primary-on-primary": o[a].on
1476
1486
  } : void 0,
1477
1487
  children: [
1478
- /* @__PURE__ */ b("div", { css: H[n].intro, children: [
1488
+ /* @__PURE__ */ b("div", { css: j[n].intro, children: [
1479
1489
  p,
1480
- /* @__PURE__ */ l("h3", { css: H[n].title, children: (f == null ? void 0 : f.leadTitle) || u("leads.header.title") }),
1481
- /* @__PURE__ */ l("p", { css: H[n].description, children: (f == null ? void 0 : f.leadDescription) || u("leads.header.description") })
1490
+ /* @__PURE__ */ l("h3", { css: j[n].title, children: (f == null ? void 0 : f.leadTitle) || u("leads.header.title") }),
1491
+ /* @__PURE__ */ l("p", { css: j[n].description, children: (f == null ? void 0 : f.leadDescription) || u("leads.header.description") })
1482
1492
  ] }),
1483
- /* @__PURE__ */ l("div", { css: H[n].form, children: /* @__PURE__ */ l(
1484
- Pn,
1493
+ /* @__PURE__ */ l("div", { css: j[n].form, children: /* @__PURE__ */ l(
1494
+ An,
1485
1495
  {
1486
1496
  sdk: t.sdk,
1487
1497
  brandingColors: c ? { primaryColor: o[a].fill } : void 0,
1488
- brandingUrls: (h = e.branding) == null ? void 0 : h.urls,
1498
+ brandingUrls: (g = e.branding) == null ? void 0 : g.urls,
1489
1499
  fields: t.leads.fields,
1490
1500
  campaignId: t.leads.campaignId,
1491
1501
  campaignName: t.leads.campaignName,
@@ -1508,7 +1518,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1508
1518
  ]
1509
1519
  }
1510
1520
  );
1511
- }, tn = (t) => {
1521
+ }, cn = (t) => {
1512
1522
  const n = {
1513
1523
  flex: 1,
1514
1524
  fontFamily: i.fontPrimary,
@@ -1571,7 +1581,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1571
1581
  backgroundColor: i.track
1572
1582
  })
1573
1583
  };
1574
- }, W = { d: tn(Z), m: tn(tt) }, ze = ({
1584
+ }, W = { d: cn(tt), m: cn(nt) }, Ue = ({
1575
1585
  layout: t,
1576
1586
  label: n,
1577
1587
  colours: e,
@@ -1583,7 +1593,7 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1583
1593
  if (o.some((p) => p === null))
1584
1594
  return /* @__PURE__ */ b("div", { css: W[t].root, children: [
1585
1595
  /* @__PURE__ */ b("div", { css: W[t].lock, children: [
1586
- /* @__PURE__ */ l(Un, { css: W[t].lockIcon }),
1596
+ /* @__PURE__ */ l(ee, { css: W[t].lockIcon }),
1587
1597
  /* @__PURE__ */ l("span", { children: n("voteToSeeResults") })
1588
1598
  ] }),
1589
1599
  /* @__PURE__ */ l("div", { css: W[t].track, "aria-hidden": "true" })
@@ -1591,17 +1601,17 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1591
1601
  const m = r.length, c = r.every((p) => p === 0) ? r.map(() => 1) : r, f = m - 1;
1592
1602
  return /* @__PURE__ */ b("div", { css: W[t].root, children: [
1593
1603
  m === 2 ? /* @__PURE__ */ b("div", { css: W[t].labels, children: [
1594
- /* @__PURE__ */ l("div", { css: W[t].pct, style: D(e[0]), children: o[0] }),
1604
+ /* @__PURE__ */ l("div", { css: W[t].pct, style: _(e[0]), children: o[0] }),
1595
1605
  a && /* @__PURE__ */ l("div", { css: W[t].caption, children: n("finalResult") }),
1596
- /* @__PURE__ */ l("div", { css: W[t].pctEnd, style: D(e[1]), children: o[1] })
1597
- ] }) : /* @__PURE__ */ l("div", { css: W[t].labels, children: o.map((p, h) => /* @__PURE__ */ l(
1606
+ /* @__PURE__ */ l("div", { css: W[t].pctEnd, style: _(e[1]), children: o[1] })
1607
+ ] }) : /* @__PURE__ */ l("div", { css: W[t].labels, children: o.map((p, g) => /* @__PURE__ */ l(
1598
1608
  "div",
1599
1609
  {
1600
1610
  css: W[t].cell,
1601
- style: { ...D(e[h]), flex: `${c[h]} 1 0%` },
1611
+ style: { ..._(e[g]), flex: `${c[g]} 1 0%` },
1602
1612
  children: p
1603
1613
  },
1604
- h
1614
+ g
1605
1615
  )) }),
1606
1616
  /* @__PURE__ */ l(
1607
1617
  "div",
@@ -1609,66 +1619,71 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1609
1619
  css: W[t].bar,
1610
1620
  role: "img",
1611
1621
  "aria-label": u ?? void 0,
1612
- children: e.map((p, h) => /* @__PURE__ */ l(
1622
+ children: e.map((p, g) => /* @__PURE__ */ l(
1613
1623
  "div",
1614
1624
  {
1615
- css: h === 0 ? W[t].segFirst : h === f ? W[t].segLast : W[t].segMid,
1616
- style: { ...D(p), flex: `${c[h]} 1 0%` }
1625
+ css: g === 0 ? W[t].segFirst : g === f ? W[t].segLast : W[t].segMid,
1626
+ style: { ..._(p), flex: `${c[g]} 1 0%` }
1617
1627
  },
1618
- h
1628
+ g
1619
1629
  ))
1620
1630
  }
1621
1631
  )
1622
1632
  ] });
1623
- }, Me = { d: s(90), m: s(120) }, gn = { d: s(Z.arenaFill), m: s(tt.arenaFill) }, Ve = { d: s(Z.arenaBar), m: s(tt.arenaBar) }, He = ({ layout: t, fill: n, odds: e }) => /* @__PURE__ */ b("div", { css: y[t].root, "aria-busy": "true", children: [
1633
+ }, Ye = { d: s(90), m: s(120) }, $n = { d: s(tt.arenaFill), m: s(nt.arenaFill) }, Xe = { d: s(tt.arenaBar), m: s(nt.arenaBar) }, Ke = ({ layout: t, fill: n, odds: e, banner: r }) => /* @__PURE__ */ b("div", { css: y[t].root, "aria-busy": "true", children: [
1634
+ r,
1624
1635
  /* @__PURE__ */ b("div", { css: y[t].body, children: [
1625
- /* @__PURE__ */ l("div", { css: y[t].header, style: { minHeight: Me[t] }, children: /* @__PURE__ */ l("div", { css: y[t].titleSkeleton }) }),
1636
+ /* @__PURE__ */ l("div", { css: y[t].header, style: { minHeight: Ye[t] }, children: /* @__PURE__ */ l("div", { css: y[t].titleSkeleton }) }),
1626
1637
  n ? /* @__PURE__ */ l(
1627
1638
  "div",
1628
1639
  {
1629
1640
  css: y[t].arenaSkeleton,
1630
- style: { height: gn[t] }
1641
+ style: { height: $n[t] }
1631
1642
  }
1632
- ) : /* @__PURE__ */ b(Wt, { children: [
1643
+ ) : /* @__PURE__ */ b(Pt, { children: [
1633
1644
  /* @__PURE__ */ l(
1634
1645
  "div",
1635
1646
  {
1636
1647
  css: y[t].arenaSkeleton,
1637
- style: { height: Ve[t] }
1648
+ style: { height: Xe[t] }
1638
1649
  }
1639
1650
  ),
1640
1651
  /* @__PURE__ */ l("div", { css: y[t].resultsSkeleton, children: /* @__PURE__ */ l("div", { css: y[t].barSkeleton }) })
1641
1652
  ] })
1642
1653
  ] }),
1643
- e && /* @__PURE__ */ l("div", { css: y[t].oddsSlot, children: /* @__PURE__ */ l(an, { size: t === "m" ? "dense" : "default" }) })
1644
- ] }), Ae = ({
1654
+ e && /* @__PURE__ */ l("div", { css: y[t].oddsSlot, children: /* @__PURE__ */ l(gn, { size: t === "m" ? "dense" : "default" }) })
1655
+ ] }), Je = ({
1645
1656
  layout: t,
1646
1657
  label: n,
1647
1658
  kind: e,
1648
- onRetry: r
1659
+ onRetry: r,
1660
+ banner: o
1649
1661
  }) => {
1650
- const { t: o } = mt("common"), a = e === "notFound" ? n("notAvailableTitle") : o("common.error.title"), u = e === "notFound" ? n("notAvailableMessage") : o("common.error.message");
1651
- return /* @__PURE__ */ l("div", { css: y[t].root, children: /* @__PURE__ */ b("div", { css: y[t].body, children: [
1652
- /* @__PURE__ */ l("div", { css: y[t].header, children: /* @__PURE__ */ l("h2", { css: y[t].title, children: n("title") }) }),
1653
- /* @__PURE__ */ b(
1654
- "div",
1655
- {
1656
- css: y[t].message,
1657
- style: { minHeight: gn[t] },
1658
- role: "alert",
1659
- children: [
1660
- /* @__PURE__ */ l("h3", { css: y[t].messageTitle, children: a }),
1661
- /* @__PURE__ */ l("p", { css: y[t].messageText, children: u }),
1662
- e === "error" && /* @__PURE__ */ l("button", { type: "button", css: y[t].retry, onClick: r, children: o("common.retry") })
1663
- ]
1664
- }
1665
- )
1666
- ] }) });
1667
- }, nn = (t, n, e) => {
1668
- const r = ke(t);
1669
- return t.map((o, a) => Ie(r, a, n, e));
1670
- }, je = (t) => {
1671
- var Nt, Dt, Bt, zt, Mt, Vt, Ht;
1662
+ const { t: a } = bt("common"), u = e === "notFound" ? n("notAvailableTitle") : a("common.error.title"), m = e === "notFound" ? n("notAvailableMessage") : a("common.error.message");
1663
+ return /* @__PURE__ */ b("div", { css: y[t].root, children: [
1664
+ o,
1665
+ /* @__PURE__ */ b("div", { css: y[t].body, children: [
1666
+ /* @__PURE__ */ l("div", { css: y[t].header, children: /* @__PURE__ */ l("h2", { css: y[t].title, children: n("title") }) }),
1667
+ /* @__PURE__ */ b(
1668
+ "div",
1669
+ {
1670
+ css: y[t].message,
1671
+ style: { minHeight: $n[t] },
1672
+ role: "alert",
1673
+ children: [
1674
+ /* @__PURE__ */ l("h3", { css: y[t].messageTitle, children: u }),
1675
+ /* @__PURE__ */ l("p", { css: y[t].messageText, children: m }),
1676
+ e === "error" && /* @__PURE__ */ l("button", { type: "button", css: y[t].retry, onClick: r, children: a("common.retry") })
1677
+ ]
1678
+ }
1679
+ )
1680
+ ] })
1681
+ ] });
1682
+ }, dn = (t, n, e) => {
1683
+ const r = Fe(t);
1684
+ return t.map((o, a) => Oe(r, a, n, e));
1685
+ }, Qe = (t) => {
1686
+ var At, Vt, _t, Ht, jt, Gt, qt;
1672
1687
  const {
1673
1688
  sdk: n,
1674
1689
  language: e,
@@ -1678,39 +1693,48 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1678
1693
  trophyPosition: u = "bottom-right",
1679
1694
  showOdds: m = !1,
1680
1695
  odds: c
1681
- } = t, { t: f } = mt("common"), p = pe(t.labels), h = Vn() ? "m" : "d", R = h === "m" ? tt : Z, P = Rt(), U = sn(), E = Hn(), _ = r === "background", $ = ue({
1696
+ } = t, { t: f } = bt("common"), p = Se(t.labels), g = Xn() ? "m" : "d", F = g === "m" ? nt : tt, B = Tt(), X = fn(), T = Kn(), U = r === "background", $ = ke({
1682
1697
  entityId: t.entityId,
1683
1698
  sdk: n,
1684
1699
  language: e,
1685
1700
  userIsLoggedIn: t.userIsLoggedIn,
1686
1701
  callbacks: t.callbacks
1687
- }), { sides: k, votes: rt, poll: O, endMs: G } = $, [ft, B] = T(!1), [z, C] = T(null), S = me(G), M = G !== null && S >= G, x = !!O && (O.status !== "ACTIVE" || M), w = on(!1), { refresh: L } = $;
1688
- Ft(() => {
1689
- O && (M ? w.current && (w.current = !1, L()) : w.current = !0);
1690
- }, [O, M, L]);
1691
- const Y = j(
1702
+ }), { sides: S, votes: it, poll: E, startMs: z, endMs: L } = $, [O, st] = A(!1), [H, C] = A(null), x = z !== null ? z + Jt : null, M = Ie(
1703
+ x !== null && L !== null ? Math.max(x, L) : x ?? L
1704
+ ), v = (E == null ? void 0 : E.status) === "INACTIVE" && z !== null && M < z + Jt && (L === null || z < L), w = v && M >= (z ?? 0), N = L !== null && M >= L, D = !!E && !v && (E.status !== "ACTIVE" || N), { refresh: P } = $;
1705
+ gt(() => {
1706
+ if (!w) return;
1707
+ P();
1708
+ const k = setInterval(P, le);
1709
+ return () => clearInterval(k);
1710
+ }, [w, P]);
1711
+ const et = pn(!1);
1712
+ gt(() => {
1713
+ E && (N ? et.current && (et.current = !1, P()) : et.current = !0);
1714
+ }, [E, N, P]);
1715
+ const at = q(
1692
1716
  () => {
1693
- var v, A;
1717
+ var k, G;
1694
1718
  return {
1695
- surface: E.surface,
1696
- text: E.textPrimary,
1697
- primary: E.palette.primary.plainColor,
1698
- onPrimary: E.palette.primary.onPrimary,
1719
+ surface: T.surface,
1720
+ text: T.textPrimary,
1721
+ primary: T.palette.primary.plainColor,
1722
+ onPrimary: T.palette.primary.onPrimary,
1699
1723
  extras: [
1700
- (v = E.palette.success) == null ? void 0 : v.plainColor,
1701
- (A = E.palette.warning) == null ? void 0 : A.plainColor
1702
- ].filter((On) => !!On)
1724
+ (k = T.palette.success) == null ? void 0 : k.plainColor,
1725
+ (G = T.palette.warning) == null ? void 0 : G.plainColor
1726
+ ].filter((zn) => !!zn)
1703
1727
  };
1704
1728
  },
1705
- [E]
1706
- ), V = j(() => k.map((v) => v.brand), [k]), nt = j(() => ge(V, Y), [V, Y]), bn = cn(
1707
- ((Nt = E.palette.warning) == null ? void 0 : Nt.plainColor) ?? Y.primary,
1708
- Y
1709
- ), X = c == null ? void 0 : c.eventId, ht = m && !!X && k.length === 2 && k.every((v) => v.kind === "team"), yn = m && !!X, { odds: xn, loading: kn } = jn(
1729
+ [T]
1730
+ ), Mt = q(() => S.map((k) => k.brand), [S]), yt = q(() => Ce(Mt, at), [Mt, at]), Cn = bn(
1731
+ ((At = T.palette.warning) == null ? void 0 : At.plainColor) ?? at.primary,
1732
+ at
1733
+ ), K = c == null ? void 0 : c.eventId, xt = m && !!K && S.length === 2 && S.every((k) => k.kind === "team"), wn = m && !!K, { odds: Wn, loading: Rn } = Qn(
1710
1734
  n,
1711
- ht && X ? [X] : [],
1735
+ xt && K ? [K] : [],
1712
1736
  {
1713
- enabled: ht,
1737
+ enabled: xt,
1714
1738
  markets: [(c == null ? void 0 : c.market) ?? "FT_1X2"],
1715
1739
  sport: "FOOTBALL",
1716
1740
  pollingIntervalMs: c == null ? void 0 : c.pollingInterval,
@@ -1718,123 +1742,142 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1718
1742
  affiliateId: c == null ? void 0 : c.affiliateId,
1719
1743
  affiliateIds: c == null ? void 0 : c.affiliateIds
1720
1744
  }
1721
- ), Ot = X ? xn.get(X) : void 0, Sn = j(
1722
- () => new Intl.NumberFormat(U, {
1745
+ ), Nt = K ? Wn.get(K) : void 0, Fn = q(
1746
+ () => new Intl.NumberFormat(X, {
1723
1747
  style: "percent",
1724
1748
  maximumFractionDigits: 0
1725
1749
  }),
1726
- [U]
1727
- );
1750
+ [X]
1751
+ ), kt = t.brandedAreaImage ? /* @__PURE__ */ l(
1752
+ Vn,
1753
+ {
1754
+ backgroundImage: t.brandedAreaImage,
1755
+ link: t.brandedAreaLink,
1756
+ height: "150px",
1757
+ minHeight: "120px"
1758
+ }
1759
+ ) : null;
1728
1760
  if ($.status === "loading")
1729
- return /* @__PURE__ */ l(He, { layout: h, fill: _, odds: yn });
1730
- if ($.status !== "ready" || !O)
1731
1761
  return /* @__PURE__ */ l(
1732
- Ae,
1762
+ Ke,
1733
1763
  {
1734
- layout: h,
1764
+ layout: g,
1765
+ fill: U,
1766
+ odds: wn,
1767
+ banner: kt
1768
+ }
1769
+ );
1770
+ if ($.status !== "ready" || !E)
1771
+ return /* @__PURE__ */ l(
1772
+ Je,
1773
+ {
1774
+ layout: g,
1735
1775
  label: p,
1736
1776
  kind: $.status === "notFound" ? "notFound" : "error",
1737
- onRetry: $.retry
1777
+ onRetry: $.retry,
1778
+ banner: kt
1738
1779
  }
1739
1780
  );
1740
- const it = re(rt), st = x ? ie(rt) : null, In = x && st === null, K = k.findIndex(
1741
- (v) => v.optionId === $.votedOptionId
1742
- ), gt = x || o || K >= 0, bt = it.map(
1743
- (v) => gt ? Sn.format(v / 100) : null
1744
- ), vn = h === "m" && k.length > 2, Pt = k.map(() => 100 / k.length), Lt = st !== null ? xe(it, st, _, h === "m") : _ && gt ? ye(it, h === "m") : Pt, $n = k.map((v, A) => x || K < 0 || K === A), Cn = k.map((v, A) => K === A ? "chosen" : K >= 0 ? "locked" : $.signInRequired ? "signIn" : $.submitting ? "submitting" : "open"), yt = O.authRequirement === "LEAD" && !ft && !x && K < 0 ? (Dt = t.leads) == null ? void 0 : Dt.position : void 0, wn = yt === "before" || yt === "after" && z !== null, Wn = (v) => {
1745
- yt === "after" ? C(v) : $.vote(k[v].optionId);
1746
- }, Fn = async () => {
1747
- B(!0), z !== null && (await $.vote(k[z].optionId), C(null));
1748
- }, Tt = gt ? `${p("voteSplit")}: ${k.map((v, A) => `${v.name} ${bt[A]}`).join(", ")}` : null, Rn = k.every((v) => v.kind === "player"), En = G !== null && !x ? ae(G, S) : null;
1781
+ const lt = ge(it), ct = D ? he(it) : null, En = D && ct === null, J = S.findIndex(
1782
+ (k) => k.optionId === $.votedOptionId
1783
+ ), St = D || o || J >= 0, It = lt.map(
1784
+ (k) => St ? Fn.format(k / 100) : null
1785
+ ), On = g === "m" && S.length > 2, Dt = S.map(() => 100 / S.length), Bt = ct !== null ? Re(lt, ct, U, g === "m") : U && St ? We(lt, g === "m") : Dt, Pn = S.map((k, G) => D || J < 0 || J === G), Tn = S.map((k, G) => v ? "upcoming" : J === G ? "chosen" : J >= 0 ? "locked" : $.signInRequired ? "signIn" : $.submitting ? "submitting" : "open"), vt = E.authRequirement === "LEAD" && !O && !D && !v && J < 0 ? (Vt = t.leads) == null ? void 0 : Vt.position : void 0, Ln = vt === "before" || vt === "after" && H !== null, Mn = (k) => {
1786
+ vt === "after" ? C(k) : $.vote(S[k].optionId);
1787
+ }, Nn = async () => {
1788
+ st(!0), H !== null && (await $.vote(S[H].optionId), C(null));
1789
+ }, zt = St ? `${p("voteSplit")}: ${S.map((k, G) => `${k.name} ${It[G]}`).join(", ")}` : null, Dn = S.every((k) => k.kind === "player"), Bn = v ? w || z === null ? null : tn(z, M) : L !== null && !D ? tn(L, M) : null;
1749
1790
  return /* @__PURE__ */ b(
1750
1791
  "div",
1751
1792
  {
1752
- css: y[h].root,
1753
- style: { "--bof-trophy-on": bn },
1793
+ css: y[g].root,
1794
+ style: { "--bof-trophy-on": Cn },
1754
1795
  children: [
1755
- /* @__PURE__ */ b("div", { css: y[h].body, children: [
1796
+ kt,
1797
+ /* @__PURE__ */ b("div", { css: y[g].body, children: [
1756
1798
  /* @__PURE__ */ l(
1757
- Ne,
1799
+ je,
1758
1800
  {
1759
- layout: h,
1801
+ layout: g,
1760
1802
  label: p,
1761
- title: ((zt = (Bt = t.labels) == null ? void 0 : Bt.title) == null ? void 0 : zt.trim()) || ((Mt = O.title) == null ? void 0 : Mt.trim()) || p("title"),
1762
- openSubtitle: ((Ht = (Vt = t.labels) == null ? void 0 : Vt.subtitle) == null ? void 0 : Ht.trim()) || An(O.description ?? null).trim() || p(Rn ? "subtitlePlayers" : "subtitleTeams"),
1763
- ended: x,
1764
- draw: In,
1765
- left: En
1803
+ title: ((Ht = (_t = t.labels) == null ? void 0 : _t.title) == null ? void 0 : Ht.trim()) || ((jt = E.title) == null ? void 0 : jt.trim()) || p("title"),
1804
+ openSubtitle: ((qt = (Gt = t.labels) == null ? void 0 : Gt.subtitle) == null ? void 0 : qt.trim()) || Jn(E.description ?? null).trim() || p(Dn ? "subtitlePlayers" : "subtitleTeams"),
1805
+ ended: D,
1806
+ draw: En,
1807
+ upcoming: v,
1808
+ left: Bn
1766
1809
  }
1767
1810
  ),
1768
- wn && t.leads ? /* @__PURE__ */ l(
1769
- Be,
1811
+ Ln && t.leads ? /* @__PURE__ */ l(
1812
+ qe,
1770
1813
  {
1771
- layout: h,
1814
+ layout: g,
1772
1815
  sdk: n,
1773
- poll: O,
1816
+ poll: E,
1774
1817
  leads: t.leads,
1775
- sides: k,
1776
- colours: nt,
1777
- picked: z,
1818
+ sides: S,
1819
+ colours: yt,
1820
+ picked: H,
1778
1821
  language: e,
1779
- continueLabel: z !== null ? p("voteFor", { name: k[z].name }) : f("poll.buttons.continue"),
1780
- onContinue: Fn,
1822
+ continueLabel: H !== null ? p("voteFor", { name: S[H].name }) : f("poll.buttons.continue"),
1823
+ onContinue: Nn,
1781
1824
  submitting: $.submitting
1782
1825
  }
1783
- ) : /* @__PURE__ */ b(Wt, { children: [
1826
+ ) : /* @__PURE__ */ b(Pt, { children: [
1784
1827
  /* @__PURE__ */ l(
1785
- Le,
1828
+ _e,
1786
1829
  {
1787
1830
  view: {
1788
- layout: h,
1789
- fill: _,
1790
- rows: vn,
1791
- sides: k,
1792
- colours: nt,
1793
- percents: bt,
1794
- ended: x,
1795
- winner: st,
1796
- lit: $n,
1797
- widths: Lt,
1798
- clips: nn(Lt, R.slant, P),
1799
- slant: R.slant,
1800
- evenClips: nn(Pt, R.slant, P),
1801
- actions: Cn,
1831
+ layout: g,
1832
+ fill: U,
1833
+ rows: On,
1834
+ sides: S,
1835
+ colours: yt,
1836
+ percents: It,
1837
+ ended: D,
1838
+ winner: ct,
1839
+ lit: Pn,
1840
+ widths: Bt,
1841
+ clips: dn(Bt, F.slant, B),
1842
+ slant: F.slant,
1843
+ evenClips: dn(Dt, F.slant, B),
1844
+ actions: Tn,
1802
1845
  showTrophy: a,
1803
1846
  trophyPosition: u,
1804
1847
  language: e,
1805
1848
  label: p,
1806
- splitLabel: Tt,
1849
+ splitLabel: zt,
1807
1850
  signInCTA: t.signInCTA,
1808
- onVote: Wn
1851
+ onVote: Mn
1809
1852
  }
1810
1853
  }
1811
1854
  ),
1812
- !_ && /* @__PURE__ */ l(
1813
- ze,
1855
+ !U && /* @__PURE__ */ l(
1856
+ Ue,
1814
1857
  {
1815
- layout: h,
1858
+ layout: g,
1816
1859
  label: p,
1817
- colours: nt,
1818
- shares: it,
1819
- percents: bt,
1820
- ended: x,
1821
- splitLabel: Tt
1860
+ colours: yt,
1861
+ shares: lt,
1862
+ percents: It,
1863
+ ended: D,
1864
+ splitLabel: zt
1822
1865
  }
1823
1866
  )
1824
1867
  ] })
1825
1868
  ] }),
1826
- Ot ? /* @__PURE__ */ l(
1827
- _n,
1869
+ Nt ? /* @__PURE__ */ l(
1870
+ Zn,
1828
1871
  {
1829
- odds: Ot,
1872
+ odds: Nt,
1830
1873
  market: (c == null ? void 0 : c.market) ?? "FT_1X2",
1831
- size: h === "m" ? "dense" : "default",
1874
+ size: g === "m" ? "dense" : "default",
1832
1875
  mode: c == null ? void 0 : c.mode,
1833
1876
  flashInterval: c == null ? void 0 : c.flashInterval
1834
1877
  }
1835
- ) : ht && kn && /* @__PURE__ */ l("div", { css: y[h].oddsSlot, children: /* @__PURE__ */ l(an, { size: h === "m" ? "dense" : "default" }) }),
1878
+ ) : xt && Rn && /* @__PURE__ */ l("div", { css: y[g].oddsSlot, children: /* @__PURE__ */ l(gn, { size: g === "m" ? "dense" : "default" }) }),
1836
1879
  /* @__PURE__ */ l(
1837
- Ln,
1880
+ _n,
1838
1881
  {
1839
1882
  notification: {
1840
1883
  open: !!$.voteError,
@@ -1848,20 +1891,20 @@ const s = (t, n = 16) => `${Math.round(t / n * 1e4) / 1e4}em`, i = {
1848
1891
  ]
1849
1892
  }
1850
1893
  );
1851
- }, _e = (t) => {
1894
+ }, Ze = (t) => {
1852
1895
  var n;
1853
1896
  return /* @__PURE__ */ l(
1854
- Tn,
1897
+ Hn,
1855
1898
  {
1856
1899
  packageName: "battle-of-fans",
1857
1900
  language: t.language,
1858
1901
  themeOptions: t.themeOptions,
1859
1902
  disableCache: t.disableCache,
1860
1903
  leadPhoneCountryCode: (n = t.leads) == null ? void 0 : n.phoneCountryCode,
1861
- children: /* @__PURE__ */ l(je, { ...t })
1904
+ children: /* @__PURE__ */ l(Qe, { ...t })
1862
1905
  }
1863
1906
  );
1864
- }, no = Yn(_e);
1907
+ }, uo = oe(Ze);
1865
1908
  export {
1866
- no as BattleOfFans
1909
+ uo as BattleOfFans
1867
1910
  };