fansunited-frontend-components 0.0.88 → 0.0.90

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 (131) hide show
  1. package/Betslip.js +1 -1
  2. package/ChanceGame.js +10 -10
  3. package/ClassicQuizPlay.js +1 -1
  4. package/CollectLead.js +7 -7
  5. package/CompetitionStatistics.js +682 -915
  6. package/CompetitorCard.js +1204 -1489
  7. package/Discussion.js +1 -1
  8. package/EitherOrPlay.js +1 -1
  9. package/EventCard.js +2150 -2139
  10. package/EventGamePlay.js +1 -1
  11. package/Leaderboard.js +251 -251
  12. package/List.js +15 -15
  13. package/MatchQuizPlay.js +1 -1
  14. package/Odds.d.ts +5 -0
  15. package/Odds.d.ts.map +1 -0
  16. package/Odds.js +57 -0
  17. package/PersonalityQuizPlay.js +1 -1
  18. package/PickThePair.js +11 -11
  19. package/PlayerOfTheMatch.js +22 -22
  20. package/PollVote.js +1 -1
  21. package/Predictor.js +1 -1
  22. package/README.md +92 -29
  23. package/Standings.js +11 -11
  24. package/TopX.js +4755 -5155
  25. package/chunks/{AccessTime-CuWfXUeM.js → AccessTime-BVP1qnmC.js} +1 -1
  26. package/chunks/{AlertMessage-DxXyNTWd.js → AlertMessage-aNev3ob9.js} +6 -6
  27. package/chunks/{Avatar-WC0Nox4g.js → Avatar-Ck9sDlUF.js} +3 -3
  28. package/chunks/{Button-BmPR6-I9.js → Button-C5sVDXUr.js} +10 -9
  29. package/chunks/{Card-DRl1b9n_.js → Card-DMO0MtFg.js} +3 -3
  30. package/chunks/{CardActions-9g2U8usD.js → CardActions-CniskUBs.js} +6 -6
  31. package/chunks/{CardContent-CILSFQ-A.js → CardContent-DSmkIh5e.js} +2 -2
  32. package/chunks/{ChanceGameEmbedVariant-PncY3mYO.js → ChanceGameEmbedVariant-C9U7q27r.js} +10 -10
  33. package/chunks/{CheckCircle-By7XCvJ2.js → CheckCircle-BLQUgEFO.js} +1 -1
  34. package/chunks/{Chip-D225drt5.js → Chip-CbmpDsTx.js} +4 -4
  35. package/chunks/CircularProgress-BCucLg2A.js +317 -0
  36. package/chunks/{Close-ClF9uvoW.js → Close-BJaeWPmO.js} +1 -1
  37. package/chunks/{Close-QxmA6XR0.js → Close-Bn_Gk4s2.js} +1 -1
  38. package/chunks/{CollectLeadForm-CYum1DKG.js → CollectLeadForm-e59gRdao.js} +21 -21
  39. package/chunks/{ConsentsList-DEC5tW3P.js → ConsentsList-ByAN0_kp.js} +6 -6
  40. package/chunks/{DirectionScope-BmKg-88Y.js → DirectionScope-Ty03Pl0K.js} +1 -1
  41. package/chunks/{Divider-CnYUyYlx.js → Divider-D-SATYZX.js} +3 -3
  42. package/chunks/{Edit-C_XLOc9W.js → Edit-uzcXQ0W4.js} +4 -4
  43. package/chunks/{EmojiEvents-BN-SvaHx.js → EmojiEvents-DzZMpyj0.js} +1 -1
  44. package/chunks/{FavoriteBorder-phHpOpHG.js → FavoriteBorder-Dz8YRmah.js} +1 -1
  45. package/chunks/{FormControl-BMerupUP.js → FormControl-CApGuvy1.js} +4 -4
  46. package/chunks/{FormLabel-Cz0vKTUi.js → FormLabel-BhUVGv0u.js} +3 -3
  47. package/chunks/{GlobalStyles-D755dez5.js → GlobalStyles-BiXuRSRs.js} +1 -1
  48. package/chunks/{InlineSpinner-BOumaUyn.js → InlineSpinner-BIQuuKyA.js} +2 -2
  49. package/chunks/{Input-yPt0NumQ.js → Input-C1c9bTgf.js} +4 -4
  50. package/chunks/{KeyboardArrowDown-C2k46EFq.js → KeyboardArrowDown-BBL6SAyg.js} +1 -1
  51. package/chunks/{KeyboardArrowRight-CKgIYtgj.js → KeyboardArrowRight-DQMFvDqL.js} +1 -1
  52. package/chunks/{Link-CAQidih2.js → Link-IhyfKeZX.js} +3 -3
  53. package/chunks/{ListItemButton-gR_CPzfB.js → ListItemButton-C6H1ykg-.js} +4 -4
  54. package/chunks/{ModalClose-BarWj7JA.js → ModalClose-COLCM3hQ.js} +6 -6
  55. package/chunks/{ModalDialog-DIwYrOma.js → ModalDialog-19Yt0pTv.js} +6 -6
  56. package/chunks/{NotFoundSkeleton-WUY_3P19.js → NotFoundSkeleton-B7aXpJX0.js} +2 -2
  57. package/chunks/{Notification-CSasJBC5.js → Notification-DPPIzFpw.js} +7 -7
  58. package/chunks/{WorkspacePremiumOutlined-B6nVIllg.js → OddsSkeleton-BdKCmc4R.js} +96 -74
  59. package/chunks/OddsStrip-c9Y8VgmW.js +385 -0
  60. package/chunks/{OverlayScoreStateSkeleton-VGKpjVsK.js → OverlayScoreStateSkeleton-CGiMhlGz.js} +4 -4
  61. package/chunks/{OverlayScoreStateWrapperSkeleton-DWUIj33o.js → OverlayScoreStateWrapperSkeleton-mzBPgf_P.js} +1 -1
  62. package/chunks/{OverlaySignInSkeleton-DQA0KvBO.js → OverlaySignInSkeleton-DnxRxCfU.js} +4 -4
  63. package/chunks/{OverlaySkeleton-DgQ8e8Pc.js → OverlaySkeleton-bXtFE1Y6.js} +9 -9
  64. package/chunks/{Person-DTMqkckp.js → Person-CuxlprBB.js} +1 -1
  65. package/chunks/{PersonOutline-BUOBV3Xy.js → PersonOutline-BViWQgNV.js} +1 -1
  66. package/chunks/{PickOneOfX-D8WweXse.js → PickOneOfX-DbBYeZnU.js} +3 -3
  67. package/chunks/{Popper-BekCbtlh.js → Popper-B-W5OzQt.js} +3 -3
  68. package/chunks/{Portal-CzOEM6Zn.js → Portal-C1ku1V2Y.js} +2 -2
  69. package/chunks/{Portal-YBl0j_ES.js → Portal-C49jCyHC.js} +1 -1
  70. package/chunks/{Predictor-zRy0zFXH.js → Predictor-DGjo_dOB.js} +6308 -6398
  71. package/chunks/{PrizeCard-hqjW4cf9.js → PrizeCard-BIJVHmYW.js} +1126 -966
  72. package/chunks/{Search-QK3Ma4w0.js → Search-RBBj-3Z1.js} +1 -1
  73. package/chunks/{Select-DLdZqnEh.js → Select-Be-2TLJx.js} +7 -7
  74. package/chunks/{Sheet-fFvOeZA4.js → Sheet-DHMJRANx.js} +3 -3
  75. package/chunks/{SignInCta-Bb73mQ08.js → SignInCta-Bz6nl2c-.js} +3 -3
  76. package/chunks/{Spinner-GWmIiSdb.js → Spinner-DQytYdCL.js} +2 -2
  77. package/chunks/{SportsSoccer-S_kMTEEv.js → SportsSoccer-Dwp9CkcQ.js} +1 -1
  78. package/chunks/{Stack-CrrsFYri.js → Stack-Dx-77BoB.js} +2 -2
  79. package/chunks/{StandardContentSkeleton-CfhTWi-0.js → StandardContentSkeleton-DV_CkaNl.js} +1 -1
  80. package/chunks/{Table-b7uWAjvl.js → Table-D3ou_zxz.js} +2 -2
  81. package/chunks/{Tabs-DiM6ozNM.js → Tabs-D32XKc8G.js} +5 -5
  82. package/chunks/{Textarea-C0JiMyvs.js → Textarea-HrQcjIXY.js} +3 -3
  83. package/chunks/{TimerOutlined-DM5eFOvZ.js → TimerOutlined-mHIHDBDv.js} +1 -1
  84. package/chunks/{Tooltip-JvdfwwMd.js → Tooltip-iozKqko2.js} +5 -5
  85. package/chunks/Typography-CHHyHOvn.js +775 -0
  86. package/chunks/{colorInversionUtils-D3587rh1.js → colorInversionUtils-CJrDu9ZF.js} +1 -1
  87. package/chunks/{createSvgIcon-Dv2JV5c-.js → createSvgIcon-D7NSIoD-.js} +1 -1
  88. package/chunks/{createSvgIcon-xDUbkW7t.js → createSvgIcon-DVhK14Wp.js} +2 -2
  89. package/chunks/{dividerClasses-DADcSI1s.js → dividerClasses-CpWiK9X3.js} +1 -1
  90. package/chunks/{elementAcceptingRef-DyU8841M.js → elementAcceptingRef-B8Ay5UA0.js} +1 -1
  91. package/chunks/{formLabelClasses-DKYX1frW.js → formLabelClasses-Bb77PWNt.js} +1 -1
  92. package/chunks/{helpers-BWJ0cNY9.js → helpers-BjZ558HQ.js} +1 -1
  93. package/chunks/index-BKdbemPX.js +4 -0
  94. package/chunks/index-BL8osWuT.js +4 -0
  95. package/chunks/index-BXktLXqU.js +4 -0
  96. package/chunks/index-BoKBAjSl.js +4 -0
  97. package/chunks/index-DhEpZQT8.js +4 -0
  98. package/chunks/{index-BwjsmA37.js → index-DzjRMnaE.js} +1 -1
  99. package/chunks/index-WsrzdqEQ.js +4 -0
  100. package/chunks/index-ibZpQ0KD.js +4 -0
  101. package/chunks/{index-D-yn2UCo.js → index-qjOOEhVr.js} +95 -98
  102. package/chunks/{main-1_TuInwg.js → main-BV-r09In.js} +23 -23
  103. package/chunks/{main-BN2BhQoI.js → main-BgDvdmc8.js} +31 -31
  104. package/chunks/{main-BRgS5sJD.js → main-CA5G2ZQX.js} +29 -29
  105. package/chunks/{main-Dd-M6P_Y.js → main-DSQ1vaFe.js} +35 -35
  106. package/chunks/{main-CqEGfJH6.js → main-D_Rq1xVm.js} +26 -26
  107. package/chunks/{main-D9AyE4A2.js → main-DcPlB4Wk.js} +20 -20
  108. package/chunks/{main-D9TolULG.js → main-Ig2neK0P.js} +18 -18
  109. package/chunks/{main-0BivGu_d.js → main-bAzdlcP_.js} +4 -4
  110. package/chunks/sportsEvents-CGX-WkNB.js +27 -0
  111. package/chunks/{useButton-DzeO8spM.js → useButton-BdGcfaoz.js} +3 -3
  112. package/chunks/{useConsents-C60gXeDR.js → useConsents-6ZATswQ4.js} +12 -12
  113. package/chunks/{useEventCallback-r4tT5VOG.js → useEventCallback-D-FE-RIP.js} +1 -1
  114. package/chunks/{useForwardedInput-0l6nqWLW.js → useForwardedInput-DFaOgtZp.js} +2 -2
  115. package/chunks/{useImageVariant-CvLmKBAd.js → useImageVariant-B_dj28Qx.js} +1 -1
  116. package/chunks/{useParticipationDraft-Cu0TWPY0.js → useParticipationDraft-BO1gUTVy.js} +6 -6
  117. package/chunks/{useSwitch-Cvneix60.js → useSwitch-DeOFp4Ck.js} +3 -3
  118. package/components.d.ts +2 -1
  119. package/components.d.ts.map +1 -1
  120. package/index.d.ts +1 -0
  121. package/index.d.ts.map +1 -1
  122. package/index.js +16 -14
  123. package/package.json +6 -2
  124. package/chunks/Typography-CrE4Ll_X.js +0 -1086
  125. package/chunks/index-BhmdGSzW.js +0 -4
  126. package/chunks/index-Bnvv4b84.js +0 -4
  127. package/chunks/index-Bw2Hn1g_.js +0 -4
  128. package/chunks/index-CwvcFge5.js +0 -4
  129. package/chunks/index-DFi89Xqa.js +0 -4
  130. package/chunks/index-DKMxtukO.js +0 -4
  131. package/chunks/index-Df6BjTpI.js +0 -4
@@ -1,53 +1,51 @@
1
- import { jsx as r, jsxs as y, Fragment as pe } from "react/jsx-runtime";
2
- import z, { useState as J, useEffect as le, useMemo as de, useRef as rt, useCallback as st } from "react";
3
- import { g as it, u as at, f as lt, n as dt, z as ct, a as ut, B as h, i as xe, m as pt, p as mt, o as ht, q as gt, r as ft, C as yt, s as xt, E as bt, t as wt, w as Ct } from "./chunks/PrizeCard-hqjW4cf9.js";
4
- import { S as St } from "./chunks/Spinner-GWmIiSdb.js";
5
- import { createPortal as It } from "react-dom";
6
- import { f as vt } from "./chunks/searchEntities-SJcoznz0.js";
7
- import { h as kt } from "./chunks/helpers-BWJ0cNY9.js";
8
- import { p as Re, c as Tt, d as $t } from "./chunks/index-D-yn2UCo.js";
9
- import { B as _t } from "./chunks/DirectionScope-BmKg-88Y.js";
10
- import { T as Et } from "./chunks/Typography-CrE4Ll_X.js";
11
- import { c as Rt } from "./chunks/createLucideIcon-YBRjY5Kl.js";
12
- import { G as Mt } from "./chunks/GlobalStyles-D755dez5.js";
1
+ import { jsx as r, jsxs as y, Fragment as ye } from "react/jsx-runtime";
2
+ import A, { useState as ee, useEffect as pe, useMemo as le } from "react";
3
+ import { g as tt, u as ot, f as nt, n as rt, z as st, a as it, B as m, i as xe, m as at, p as lt, o as dt, q as ct, r as ut, C as pt, s as mt, E as ht, t as gt, w as ft } from "./chunks/PrizeCard-BIJVHmYW.js";
4
+ import { S as yt } from "./chunks/Spinner-DQytYdCL.js";
5
+ import { createPortal as xt } from "react-dom";
6
+ import { f as bt } from "./chunks/searchEntities-SJcoznz0.js";
7
+ import { h as wt } from "./chunks/helpers-BjZ558HQ.js";
8
+ import { O as Ct, u as St } from "./chunks/OddsStrip-c9Y8VgmW.js";
9
+ import { c as vt } from "./chunks/createLucideIcon-YBRjY5Kl.js";
10
+ import { G as It } from "./chunks/GlobalStyles-BiXuRSRs.js";
13
11
  /**
14
12
  * @license lucide-react v0.454.0 - ISC
15
13
  *
16
14
  * This source code is licensed under the ISC license.
17
15
  * See the LICENSE file in the root directory of this source tree.
18
16
  */
19
- const At = Rt("Tv", [
17
+ const $t = vt("Tv", [
20
18
  ["rect", { width: "20", height: "15", x: "2", y: "7", rx: "2", ry: "2", key: "10ag99" }],
21
19
  ["polyline", { points: "17 2 12 7 7 2", key: "11pgbg" }]
22
- ]), Fe = "https://sports.fansunitedapi.com/v1", Be = (e) => {
20
+ ]), Oe = "https://sports.fansunitedapi.com/v1", Fe = (e) => {
23
21
  try {
24
22
  const t = e.helpers.getSDKConfiguration();
25
23
  return !(t != null && t.apiKey) || !(t != null && t.clientId) ? null : { apiKey: t.apiKey, clientId: t.clientId };
26
24
  } catch {
27
25
  return null;
28
26
  }
29
- }, je = (e) => {
30
- const t = Be(e);
27
+ }, Ne = (e) => {
28
+ const t = Fe(e);
31
29
  return t ? new URLSearchParams({ key: t.apiKey, client_id: t.clientId }) : null;
32
- }, Lt = async (e, t, o, s) => {
33
- const i = je(e);
30
+ }, Tt = async (e, t, o, s) => {
31
+ const i = Ne(e);
34
32
  if (!i || !t) return null;
35
33
  o && i.set("season_id", o);
36
34
  const a = await fetch(
37
- `${Fe}/competitions/${encodeURIComponent(t)}?${i.toString()}`,
35
+ `${Oe}/competitions/${encodeURIComponent(t)}?${i.toString()}`,
38
36
  { signal: s }
39
37
  );
40
38
  if (!a.ok) throw new Error(`Sports API responded ${a.status}`);
41
39
  const d = await a.json(), l = (d == null ? void 0 : d.data) ?? d;
42
40
  return l != null && l.id ? l : null;
43
- }, zt = async (e, t, o) => {
41
+ }, kt = async (e, t, o) => {
44
42
  var i;
45
- const s = je(e);
43
+ const s = Ne(e);
46
44
  if (!s) return null;
47
45
  s.set("disable_cache", String(Date.now()));
48
46
  try {
49
47
  const a = await fetch(
50
- `${Fe}/events/${encodeURIComponent(t)}?${s.toString()}`,
48
+ `${Oe}/events/${encodeURIComponent(t)}?${s.toString()}`,
51
49
  { signal: o }
52
50
  );
53
51
  if (!a.ok) return null;
@@ -56,13 +54,13 @@ const At = Rt("Tv", [
56
54
  } catch {
57
55
  return null;
58
56
  }
59
- }, Dt = async (e, t, o) => {
60
- const s = /* @__PURE__ */ new Map(), i = Be(e);
61
- return !i || t.length === 0 || (await vt(i, t, {
57
+ }, _t = async (e, t, o) => {
58
+ const s = /* @__PURE__ */ new Map(), i = Fe(e);
59
+ return !i || t.length === 0 || (await bt(i, t, {
62
60
  signal: o,
63
61
  partial: !0
64
62
  })).forEach((d) => s.set(d.id, d)), s;
65
- }, Pt = ["1_15", "16_30", "31_45", "46_60", "61_75", "76_90"], be = (e) => {
63
+ }, Rt = ["1_15", "16_30", "31_45", "46_60", "61_75", "76_90"], be = (e) => {
66
64
  const t = /* @__PURE__ */ new Map();
67
65
  return (e ?? []).forEach((o) => {
68
66
  o.key && o.value != null && t.set(o.key.toLowerCase(), o.value);
@@ -72,36 +70,36 @@ const At = Rt("Tv", [
72
70
  if (o == null || o === "") return null;
73
71
  const s = Number(o);
74
72
  return Number.isFinite(s) ? s : null;
75
- }, N = (e, t) => Q(e, t) ?? 0, Wt = [
73
+ }, N = (e, t) => Q(e, t) ?? 0, Et = [
76
74
  [/POSTPON/, "postponed"],
77
75
  [/CANCEL/, "cancelled"],
78
76
  [/INTERRUPT|SUSPEND/, "interrupted"],
79
77
  [/ABANDON/, "abandoned"]
80
- ], He = (e) => {
78
+ ], Be = (e) => {
81
79
  var o;
82
80
  const t = `${(e == null ? void 0 : e.type) ?? ""} ${(e == null ? void 0 : e.code) ?? ""} ${(e == null ? void 0 : e.sub_type) ?? ""}`.toUpperCase();
83
- return ((o = Wt.find(([s]) => s.test(t))) == null ? void 0 : o[1]) ?? null;
81
+ return ((o = Et.find(([s]) => s.test(t))) == null ? void 0 : o[1]) ?? null;
84
82
  }, Ge = (e) => {
85
- if (He(e)) return "CANCELLED";
83
+ if (Be(e)) return "CANCELLED";
86
84
  const t = `${(e == null ? void 0 : e.type) ?? ""} ${(e == null ? void 0 : e.code) ?? ""}`.toUpperCase();
87
85
  return /(FINISH|ENDED|CLOSED|AFTER_)/.test(t) ? "FINISHED" : /(LIVE|PROGRESS|INPLAY|IN_PLAY|HALF|PERIOD)/.test(t) ? "LIVE" : "UPCOMING";
88
- }, Ot = {
86
+ }, Mt = {
89
87
  "1st_half": 0,
90
88
  "2nd_half": 45,
91
89
  extra_time: 90,
92
90
  extra_time_1: 90,
93
91
  extra_time_2: 105
94
- }, Nt = (e) => {
92
+ }, zt = (e) => {
95
93
  var i, a;
96
- const t = (((i = e.status) == null ? void 0 : i.sub_type) ?? "").toLowerCase(), o = Ot[t], s = ((a = e.timing) == null ? void 0 : a.current_minute) ?? 0;
94
+ const t = (((i = e.status) == null ? void 0 : i.sub_type) ?? "").toLowerCase(), o = Mt[t], s = ((a = e.timing) == null ? void 0 : a.current_minute) ?? 0;
97
95
  return o === void 0 || s <= 0 ? null : o + s;
98
- }, he = (e, t) => {
96
+ }, me = (e, t) => {
99
97
  const o = (e.score ?? []).find((a) => a.key === t);
100
98
  if (!o || o.competitor_one == null || o.competitor_two == null)
101
99
  return null;
102
100
  const s = Number(o.competitor_one), i = Number(o.competitor_two);
103
101
  return Number.isFinite(s) && Number.isFinite(i) ? [s, i] : null;
104
- }, Me = (e) => {
102
+ }, Ee = (e) => {
105
103
  const t = be(e == null ? void 0 : e.stats);
106
104
  return {
107
105
  id: (e == null ? void 0 : e.id) ?? "",
@@ -110,36 +108,36 @@ const At = Rt("Tv", [
110
108
  shotsOnTarget: Q(t, "shots_on_target"),
111
109
  possession: Q(t, "ball_possession_percentage"),
112
110
  corners: Q(t, "corners"),
113
- goalsByPeriod: Pt.map((o) => N(t, `goals_${o}`))
111
+ goalsByPeriod: Rt.map((o) => N(t, `goals_${o}`))
114
112
  };
115
- }, Ft = 3 * 24 * 60 * 60 * 1e3, Bt = (e, t) => {
113
+ }, At = 3 * 24 * 60 * 60 * 1e3, Lt = (e, t) => {
116
114
  const o = t.filter((a) => !!a.id).map((a) => {
117
115
  const d = /* @__PURE__ */ new Set();
118
116
  (a.groups ?? []).forEach(
119
- (u) => (u.standings ?? []).forEach((g) => g.competitor_id && d.add(g.competitor_id))
117
+ (u) => (u.standings ?? []).forEach((h) => h.competitor_id && d.add(h.competitor_id))
120
118
  );
121
119
  const l = Date.parse(a.start_date ?? ""), c = Date.parse(a.end_date ?? "") + 24 * 60 * 60 * 1e3;
122
120
  return { id: a.id, teams: d, from: l, to: c };
123
121
  }), s = (a, d) => !Number.isFinite(a.from) || !Number.isFinite(a.to) ? 1 / 0 : d < a.from ? a.from - d : d > a.to ? d - a.to : 0, i = /* @__PURE__ */ new Map();
124
122
  return e.forEach((a) => {
125
- var b, m, I, x, $;
123
+ var b, g, T, v, P;
126
124
  if ((b = a.round) != null && b.stage_id) {
127
125
  i.set(a, a.round.stage_id);
128
126
  return;
129
127
  }
130
128
  if (o.length <= 1) {
131
- i.set(a, ((m = o[0]) == null ? void 0 : m.id) ?? null);
129
+ i.set(a, ((g = o[0]) == null ? void 0 : g.id) ?? null);
132
130
  return;
133
131
  }
134
- const d = Date.parse(((I = a.timing) == null ? void 0 : I.start_time) ?? ""), l = ((x = a.competitor_one) == null ? void 0 : x.id) ?? "", c = (($ = a.competitor_two) == null ? void 0 : $.id) ?? "", u = (v) => s(v, d) <= Ft, g = o.filter((v) => v.teams.has(l) && v.teams.has(c) && u(v)).sort((v, E) => v.teams.size - E.teams.size)[0];
135
- if (g) {
136
- i.set(a, g.id);
132
+ const d = Date.parse(((T = a.timing) == null ? void 0 : T.start_time) ?? ""), l = ((v = a.competitor_one) == null ? void 0 : v.id) ?? "", c = ((P = a.competitor_two) == null ? void 0 : P.id) ?? "", u = (_) => s(_, d) <= At, h = o.filter((_) => _.teams.has(l) && _.teams.has(c) && u(_)).sort((_, z) => _.teams.size - z.teams.size)[0];
133
+ if (h) {
134
+ i.set(a, h.id);
137
135
  return;
138
136
  }
139
- const f = (v) => [...v].sort((E, D) => s(E, d) - s(D, d))[0], w = f(o.filter((v) => v.teams.size === 0 || u(v))) ?? f(o);
140
- i.set(a, (w == null ? void 0 : w.id) ?? null);
137
+ const f = (_) => [..._].sort((z, D) => s(z, d) - s(D, d))[0], C = f(o.filter((_) => _.teams.size === 0 || u(_))) ?? f(o);
138
+ i.set(a, (C == null ? void 0 : C.id) ?? null);
141
139
  }), i;
142
- }, jt = (e, t, o) => {
140
+ }, Pt = (e, t, o) => {
143
141
  var a, d;
144
142
  const s = Ge(e.status), i = s === "FINISHED" || s === "LIVE";
145
143
  return {
@@ -148,15 +146,15 @@ const At = Rt("Tv", [
148
146
  start: ((a = e.timing) == null ? void 0 : a.start_time) ?? "",
149
147
  stageId: o,
150
148
  round: t,
151
- home: Me(e.competitor_one),
152
- away: Me(e.competitor_two),
153
- fullTime: i ? he(e, "result") ?? he(e, "full_time") ?? [0, 0] : null,
154
- halfTime: i ? he(e, "half_time") : null,
155
- liveMinute: s === "LIVE" ? Nt(e) : null,
156
- notPlayedReason: He(e.status),
149
+ home: Ee(e.competitor_one),
150
+ away: Ee(e.competitor_two),
151
+ fullTime: i ? me(e, "result") ?? me(e, "full_time") ?? [0, 0] : null,
152
+ halfTime: i ? me(e, "half_time") : null,
153
+ liveMinute: s === "LIVE" ? zt(e) : null,
154
+ notPlayedReason: Be(e.status),
157
155
  isHalfTime: s === "LIVE" && (((d = e.status) == null ? void 0 : d.sub_type) ?? "").toLowerCase() === "halftime"
158
156
  };
159
- }, Ht = (e) => {
157
+ }, Dt = (e) => {
160
158
  const t = /* @__PURE__ */ new Map();
161
159
  e.forEach((s) => {
162
160
  var l, c;
@@ -175,7 +173,7 @@ const At = Rt("Tv", [
175
173
  ];
176
174
  })
177
175
  );
178
- }, Ae = (e) => {
176
+ }, Me = (e) => {
179
177
  const t = be(e.statistics);
180
178
  return {
181
179
  teamId: e.team_id ?? "",
@@ -189,7 +187,7 @@ const At = Rt("Tv", [
189
187
  goalsAllowed: N(t, "goals_allowed"),
190
188
  avgTotalGoals: Q(t, "avg_total_goals")
191
189
  };
192
- }, Gt = (e) => {
190
+ }, Wt = (e) => {
193
191
  const t = be(e.statistics);
194
192
  return {
195
193
  athleteId: e.athlete_id ?? "",
@@ -202,24 +200,24 @@ const At = Rt("Tv", [
202
200
  redCards: N(t, "red_cards"),
203
201
  cleanSheets: N(t, "clean_sheets")
204
202
  };
205
- }, Ut = (e, t, o) => {
206
- const s = e.season, i = ((s == null ? void 0 : s.events) ?? []).filter((m) => !!m.id).map((m) => {
207
- const I = o.get(m.id);
208
- if (!I) return m;
209
- const x = ($, v) => $ && typeof $ == "object" ? $ : v;
203
+ }, Ot = (e, t, o) => {
204
+ const s = e.season, i = ((s == null ? void 0 : s.events) ?? []).filter((g) => !!g.id).map((g) => {
205
+ const T = o.get(g.id);
206
+ if (!T) return g;
207
+ const v = (P, _) => P && typeof P == "object" ? P : _;
210
208
  return {
211
- ...m,
212
- ...I,
213
- round: m.round ?? I.round,
214
- competitor_one: x(I.competitor_one, m.competitor_one),
215
- competitor_two: x(I.competitor_two, m.competitor_two)
209
+ ...g,
210
+ ...T,
211
+ round: g.round ?? T.round,
212
+ competitor_one: v(T.competitor_one, g.competitor_one),
213
+ competitor_two: v(T.competitor_two, g.competitor_two)
216
214
  };
217
- }), a = (s == null ? void 0 : s.stages) ?? [], d = Bt(i, a), l = t ? i.filter((m) => d.get(m) === t) : i, c = Ht(l), u = new Set(l.map((m) => d.get(m))), g = a.filter((m) => !!m.id && u.has(m.id)).map((m) => ({
218
- id: m.id,
219
- nameId: m.stage_name_id || null,
220
- order: m.order ?? 0
221
- })).sort((m, I) => m.order - I.order), f = /* @__PURE__ */ new Map(), w = (s == null ? void 0 : s.team_stats) ?? [], b = t || null;
222
- return w.filter((m) => (m.stage_id ?? null) === b).forEach((m) => m.team_id && f.set(m.team_id, Ae(m))), t && f.size === 0 && w.filter((m) => m.stage_id == null).forEach((m) => m.team_id && f.set(m.team_id, Ae(m))), {
215
+ }), a = (s == null ? void 0 : s.stages) ?? [], d = Lt(i, a), l = t ? i.filter((g) => d.get(g) === t) : i, c = Dt(l), u = new Set(l.map((g) => d.get(g))), h = a.filter((g) => !!g.id && u.has(g.id)).map((g) => ({
216
+ id: g.id,
217
+ nameId: g.stage_name_id || null,
218
+ order: g.order ?? 0
219
+ })).sort((g, T) => g.order - T.order), f = /* @__PURE__ */ new Map(), C = (s == null ? void 0 : s.team_stats) ?? [], b = t || null;
220
+ return C.filter((g) => (g.stage_id ?? null) === b).forEach((g) => g.team_id && f.set(g.team_id, Me(g))), t && f.size === 0 && C.filter((g) => g.stage_id == null).forEach((g) => g.team_id && f.set(g.team_id, Me(g))), {
223
221
  id: e.id ?? "",
224
222
  sport: e.sport ?? null,
225
223
  season: {
@@ -228,15 +226,15 @@ const At = Rt("Tv", [
228
226
  startDate: (s == null ? void 0 : s.start_date) ?? null,
229
227
  endDate: (s == null ? void 0 : s.end_date) ?? null
230
228
  },
231
- matches: l.map((m) => jt(m, c.get(m) ?? 1, d.get(m) ?? null)),
232
- stages: g,
229
+ matches: l.map((g) => Pt(g, c.get(g) ?? 1, d.get(g) ?? null)),
230
+ stages: h,
233
231
  teamStats: f,
234
- athletes: ((s == null ? void 0 : s.athlete_stats) ?? []).filter((m) => !!m.athlete_id && (m.statistics ?? []).length > 0).map(Gt)
232
+ athletes: ((s == null ? void 0 : s.athlete_stats) ?? []).filter((g) => !!g.athlete_id && (g.statistics ?? []).length > 0).map(Wt)
235
233
  };
236
- }, Kt = (e) => (e ?? "").split("-")[0].toUpperCase(), Vt = (e, t, o) => {
237
- const s = Kt(t), i = (a, d) => {
234
+ }, Ft = (e) => (e ?? "").split("-")[0].toUpperCase(), Nt = (e, t, o) => {
235
+ const s = Ft(t), i = (a, d) => {
238
236
  var l, c, u;
239
- return ((u = (c = (l = e.get(a)) == null ? void 0 : l.assets) == null ? void 0 : c.find((g) => g.key === d)) == null ? void 0 : u.value) ?? null;
237
+ return ((u = (c = (l = e.get(a)) == null ? void 0 : l.assets) == null ? void 0 : c.find((h) => h.key === d)) == null ? void 0 : u.value) ?? null;
240
238
  };
241
239
  return {
242
240
  has: (a) => e.has(a),
@@ -244,9 +242,9 @@ const At = Rt("Tv", [
244
242
  var c, u;
245
243
  const d = e.get(a);
246
244
  return d && (((u = (c = d.translations) == null ? void 0 : c.find(
247
- (g) => {
245
+ (h) => {
248
246
  var f;
249
- return ((f = g.language) == null ? void 0 : f.toUpperCase()) === s;
247
+ return ((f = h.language) == null ? void 0 : f.toUpperCase()) === s;
250
248
  }
251
249
  )) == null ? void 0 : u.name) || d.name) || o;
252
250
  },
@@ -257,94 +255,94 @@ const At = Rt("Tv", [
257
255
  return ((d = e.get(a)) == null ? void 0 : d.position) ?? null;
258
256
  }
259
257
  };
260
- }, Yt = 4 * 60 * 60 * 1e3, Xt = (e) => {
261
- var o, s, i, a, d, l, c, u, g;
258
+ }, Bt = 4 * 60 * 60 * 1e3, Gt = (e) => {
259
+ var o, s, i, a, d, l, c, u, h;
262
260
  const t = new Set(((o = e.meta) == null ? void 0 : o.entity_ids) ?? []);
263
261
  return e.id && t.add(e.id), (i = (s = e.season) == null ? void 0 : s.stages) == null || i.forEach((f) => f.stage_name_id && t.add(f.stage_name_id)), (d = (a = e.season) == null ? void 0 : a.events) == null || d.forEach((f) => {
264
- var w, b;
265
- (w = f.competitor_one) != null && w.id && t.add(f.competitor_one.id), (b = f.competitor_two) != null && b.id && t.add(f.competitor_two.id);
266
- }), (c = (l = e.season) == null ? void 0 : l.team_stats) == null || c.forEach((f) => f.team_id && t.add(f.team_id)), (g = (u = e.season) == null ? void 0 : u.athlete_stats) == null || g.forEach((f) => {
262
+ var C, b;
263
+ (C = f.competitor_one) != null && C.id && t.add(f.competitor_one.id), (b = f.competitor_two) != null && b.id && t.add(f.competitor_two.id);
264
+ }), (c = (l = e.season) == null ? void 0 : l.team_stats) == null || c.forEach((f) => f.team_id && t.add(f.team_id)), (h = (u = e.season) == null ? void 0 : u.athlete_stats) == null || h.forEach((f) => {
267
265
  f.athlete_id && t.add(f.athlete_id), f.team_id && t.add(f.team_id);
268
266
  }), Array.from(t);
269
- }, qt = (e, t) => {
267
+ }, jt = (e, t) => {
270
268
  var i;
271
269
  const o = Ge(e.status);
272
270
  if (o === "LIVE") return !0;
273
271
  if (o !== "UPCOMING") return !1;
274
272
  const s = Date.parse(((i = e.timing) == null ? void 0 : i.start_time) ?? "");
275
- return Number.isFinite(s) && s <= t && t - s < Yt;
276
- }, Jt = (e, t, o, s, i) => {
277
- const { seasonId: a, stageId: d, liveRefresh: l, refreshInterval: c } = i, [u, g] = J(null), [f, w] = J(
273
+ return Number.isFinite(s) && s <= t && t - s < Bt;
274
+ }, Ht = (e, t, o, s, i) => {
275
+ const { seasonId: a, stageId: d, liveRefresh: l, refreshInterval: c } = i, [u, h] = ee(null), [f, C] = ee(
278
276
  () => /* @__PURE__ */ new Map()
279
- ), [b, m] = J(
277
+ ), [b, g] = ee(
280
278
  () => /* @__PURE__ */ new Map()
281
- ), [I, x] = J(!0), [$, v] = J(!1);
282
- le(() => {
279
+ ), [T, v] = ee(!0), [P, _] = ee(!1);
280
+ pe(() => {
283
281
  if (!e || !t) {
284
- x(!1);
282
+ v(!1);
285
283
  return;
286
284
  }
287
- const T = new AbortController();
288
- return x(!0), v(!1), m(/* @__PURE__ */ new Map()), (async () => {
285
+ const $ = new AbortController();
286
+ return v(!0), _(!1), g(/* @__PURE__ */ new Map()), (async () => {
289
287
  try {
290
- const R = await Lt(
288
+ const k = await Tt(
291
289
  e,
292
290
  t,
293
291
  a,
294
- T.signal
292
+ $.signal
295
293
  );
296
- if (T.signal.aborted) return;
297
- const O = R ? await Dt(
294
+ if ($.signal.aborted) return;
295
+ const F = k ? await _t(
298
296
  e,
299
- Xt(R),
300
- T.signal
297
+ Gt(k),
298
+ $.signal
301
299
  ) : /* @__PURE__ */ new Map();
302
- if (T.signal.aborted) return;
303
- g(R), w(O);
304
- } catch (R) {
305
- if (T.signal.aborted || (R == null ? void 0 : R.name) === "AbortError")
300
+ if ($.signal.aborted) return;
301
+ h(k), C(F);
302
+ } catch (k) {
303
+ if ($.signal.aborted || (k == null ? void 0 : k.name) === "AbortError")
306
304
  return;
307
- g(null), v(!0);
305
+ h(null), _(!0);
308
306
  } finally {
309
- T.signal.aborted || x(!1);
307
+ $.signal.aborted || v(!1);
310
308
  }
311
- })(), () => T.abort();
309
+ })(), () => $.abort();
312
310
  }, [e, t, a]);
313
- const [E, D] = J(() => Date.now());
314
- le(() => {
311
+ const [z, D] = ee(() => Date.now());
312
+ pe(() => {
315
313
  if (!u || !l) return;
316
- const T = setInterval(() => D(Date.now()), 6e4);
317
- return () => clearInterval(T);
314
+ const $ = setInterval(() => D(Date.now()), 6e4);
315
+ return () => clearInterval($);
318
316
  }, [u, l]);
319
- const M = de(() => {
320
- var T;
321
- return !u || !l || c <= 0 ? "" : (((T = u.season) == null ? void 0 : T.events) ?? []).map((R) => R.id ? b.get(R.id) ?? R : R).filter((R) => R.id && qt(R, E)).map((R) => R.id).join(",");
322
- }, [u, b, l, c, E]);
323
- le(() => {
324
- if (!M) return;
325
- const T = M.split(","), R = new AbortController(), H = setInterval(async () => {
326
- const G = await Promise.all(
327
- T.map((p) => zt(e, p, R.signal))
317
+ const R = le(() => {
318
+ var $;
319
+ return !u || !l || c <= 0 ? "" : ((($ = u.season) == null ? void 0 : $.events) ?? []).map((k) => k.id ? b.get(k.id) ?? k : k).filter((k) => k.id && jt(k, z)).map((k) => k.id).join(",");
320
+ }, [u, b, l, c, z]);
321
+ pe(() => {
322
+ if (!R) return;
323
+ const $ = R.split(","), k = new AbortController(), H = setInterval(async () => {
324
+ const U = await Promise.all(
325
+ $.map((p) => kt(e, p, k.signal))
328
326
  );
329
- R.signal.aborted || m((p) => {
330
- const _ = new Map(p);
331
- return G.forEach((k) => (k == null ? void 0 : k.id) && _.set(k.id, k)), _;
327
+ k.signal.aborted || g((p) => {
328
+ const I = new Map(p);
329
+ return U.forEach((S) => (S == null ? void 0 : S.id) && I.set(S.id, S)), I;
332
330
  });
333
331
  }, c);
334
332
  return () => {
335
- R.abort(), clearInterval(H);
333
+ k.abort(), clearInterval(H);
336
334
  };
337
- }, [e, M, c]);
338
- const A = de(
339
- () => u ? Ut(u, d, b) : null,
335
+ }, [e, R, c]);
336
+ const M = le(
337
+ () => u ? Ot(u, d, b) : null,
340
338
  [u, d, b]
341
- ), L = de(
342
- () => Vt(f, o, s),
339
+ ), E = le(
340
+ () => Nt(f, o, s),
343
341
  [f, o, s]
344
342
  );
345
- return { data: A, competitionId: (u == null ? void 0 : u.id) ?? t, entities: L, loading: I, error: $ };
346
- }, n = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`, W = () => {
347
- const e = it(), t = at(), o = lt(), s = dt() === "dark", i = (d, l) => `rgba(${kt(d)}, ${l})`, a = e.palette.primary.plainColor;
343
+ return { data: M, competitionId: (u == null ? void 0 : u.id) ?? t, entities: E, loading: T, error: P };
344
+ }, n = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`, O = () => {
345
+ const e = tt(), t = ot(), o = nt(), s = rt() === "dark", i = (d, l) => `rgba(${wt(d)}, ${l})`, a = e.palette.primary.plainColor;
348
346
  return {
349
347
  fonts: t,
350
348
  radius: o,
@@ -368,12 +366,12 @@ const At = Rt("Tv", [
368
366
  yellowCard: "#F5C400"
369
367
  }
370
368
  };
371
- }, we = (e) => e.status === "FINISHED" && !!e.fullTime, ce = (e) => e.fullTime ? e.fullTime[0] + e.fullTime[1] : 0, Le = (e, t, o) => e.filter(
369
+ }, we = (e) => e.status === "FINISHED" && !!e.fullTime, de = (e) => e.fullTime ? e.fullTime[0] + e.fullTime[1] : 0, ze = (e, t, o) => e.filter(
372
370
  (s) => (s.home.id === t || s.away.id === t) && s.start < o
373
371
  ).sort((s, i) => i.start.localeCompare(s.start)).slice(0, 5).reverse().map((s) => {
374
372
  const i = s.home.id === t, [a, d] = s.fullTime, l = i ? a : d, c = i ? d : a;
375
373
  return { match: s, isHome: i, result: l > c ? "W" : l < c ? "L" : "D" };
376
- }), Qt = (e) => {
374
+ }), Ut = (e) => {
377
375
  const t = /* @__PURE__ */ new Map();
378
376
  return e.forEach((o) => {
379
377
  const [s, i] = o.fullTime;
@@ -385,10 +383,10 @@ const At = Rt("Tv", [
385
383
  d === 0 && (l.cleanSheets += 1), l.yellowCards += a.yellowCards ?? 0, l.redCards += a.redCards ?? 0, t.set(a.id, l);
386
384
  });
387
385
  }), t;
388
- }, Zt = (e, t) => e.find(
386
+ }, Kt = (e, t) => e.find(
389
387
  (o) => o.id !== t.id && (o.home.id === t.home.id && o.away.id === t.away.id || o.home.id === t.away.id && o.away.id === t.home.id)
390
- ) ?? null, B = (e, t) => t ? Math.round(e / t * 100) : 0, eo = (e) => {
391
- const t = e.filter(we), o = (c) => t.reduce((u, g) => u + c(g), 0), s = o(ce), i = t.filter((c) => c.fullTime[0] > c.fullTime[1]).length, a = t.filter((c) => c.fullTime[1] > c.fullTime[0]).length, d = o((c) => c.halfTime ? c.halfTime[0] + c.halfTime[1] : 0), l = [0, 1, 2, 3, 4, 5].map(
388
+ ) ?? null, G = (e, t) => t ? Math.round(e / t * 100) : 0, Vt = (e) => {
389
+ const t = e.filter(we), o = (c) => t.reduce((u, h) => u + c(h), 0), s = o(de), i = t.filter((c) => c.fullTime[0] > c.fullTime[1]).length, a = t.filter((c) => c.fullTime[1] > c.fullTime[0]).length, d = o((c) => c.halfTime ? c.halfTime[0] + c.halfTime[1] : 0), l = [0, 1, 2, 3, 4, 5].map(
392
390
  (c) => o((u) => (u.home.goalsByPeriod[c] ?? 0) + (u.away.goalsByPeriod[c] ?? 0))
393
391
  );
394
392
  return {
@@ -406,28 +404,28 @@ const At = Rt("Tv", [
406
404
  shotsOnTarget: o((c) => (c.home.shotsOnTarget ?? 0) + (c.away.shotsOnTarget ?? 0)),
407
405
  corners: o((c) => (c.home.corners ?? 0) + (c.away.corners ?? 0)),
408
406
  bothScored: t.filter((c) => c.fullTime[0] > 0 && c.fullTime[1] > 0).length,
409
- goalless: t.filter((c) => ce(c) === 0).length,
410
- over: (c) => t.filter((u) => ce(u) > c).length
407
+ goalless: t.filter((c) => de(c) === 0).length,
408
+ over: (c) => t.filter((u) => de(u) > c).length
411
409
  };
412
- }, to = 10, Ue = {
410
+ }, Yt = 10, je = {
413
411
  scorers: (e) => e.goals,
414
412
  assists: (e) => e.assists,
415
413
  contributions: (e) => e.goals + e.assists,
416
414
  cleanSheets: (e) => e.cleanSheets,
417
415
  minutes: (e) => e.minutes,
418
416
  cards: (e) => e.yellowCards + e.redCards
419
- }, ge = Object.keys(Ue), oo = (e, t) => {
420
- const o = Ue[t];
417
+ }, he = Object.keys(je), Xt = (e, t) => {
418
+ const o = je[t];
421
419
  return e.map((i) => ({ athlete: i, value: o(i) })).filter((i) => i.value > 0).sort(
422
420
  (i, a) => a.value - i.value || (t === "cards" ? a.athlete.redCards - i.athlete.redCards : t === "minutes" ? 0 : i.athlete.minutes - a.athlete.minutes)
423
- ).slice(0, to).map((i, a, d) => {
421
+ ).slice(0, Yt).map((i, a, d) => {
424
422
  let l = a + 1;
425
423
  for (; l > 1 && d[l - 2].value === i.value; ) l -= 1;
426
424
  const c = a > 0 && d[a - 1].value === i.value || a < d.length - 1 && d[a + 1].value === i.value;
427
425
  return { ...i, rank: c ? `${l}=` : `${l}` };
428
426
  });
429
- }, U = (e, t, o = 1) => [...e].sort((s, i) => o * (t(i) - t(s)))[0], no = (e) => Array.from(e.values()), ro = (e) => {
430
- const t = ct(e), o = /* @__PURE__ */ new Map();
427
+ }, V = (e, t, o = 1) => [...e].sort((s, i) => o * (t(i) - t(s)))[0], qt = (e) => Array.from(e.values()), Jt = (e) => {
428
+ const t = st(e), o = /* @__PURE__ */ new Map();
431
429
  return {
432
430
  date: (s, i) => {
433
431
  const a = new Date(s);
@@ -445,19 +443,19 @@ const At = Rt("Tv", [
445
443
  }), o.set(i, a)), a.format(Number.isFinite(s) ? s : 0);
446
444
  }
447
445
  };
448
- }, so = (e, t) => t ? e.replace(
446
+ }, Qt = (e, t) => t ? e.replace(
449
447
  /\{\{\s*(\w+)\s*\}\}/g,
450
448
  (o, s) => s in t ? String(t[s]) : o
451
- ) : e, io = (e) => {
452
- const { t } = ut("common");
453
- return de(
449
+ ) : e, Zt = (e) => {
450
+ const { t } = it("common");
451
+ return le(
454
452
  () => (o, s) => {
455
453
  const i = e == null ? void 0 : e[o];
456
- return typeof i == "string" && i.trim() ? so(i, s) : t(`competitionStatistics.${o}`, s ?? {});
454
+ return typeof i == "string" && i.trim() ? Qt(i, s) : t(`competitionStatistics.${o}`, s ?? {});
457
455
  },
458
456
  [e, t]
459
457
  );
460
- }, S = ({
458
+ }, w = ({
461
459
  size: e,
462
460
  font: t = "primary",
463
461
  weight: o,
@@ -468,11 +466,11 @@ const At = Rt("Tv", [
468
466
  parentSize: l = 16,
469
467
  component: c = "span",
470
468
  sx: u,
471
- children: g
469
+ children: h
472
470
  }) => {
473
- const { fonts: f } = W();
471
+ const { fonts: f } = O();
474
472
  return /* @__PURE__ */ r(
475
- h,
473
+ m,
476
474
  {
477
475
  component: c,
478
476
  sx: [
@@ -487,7 +485,7 @@ const At = Rt("Tv", [
487
485
  },
488
486
  ...Array.isArray(u) ? u : [u]
489
487
  ],
490
- children: g
488
+ children: h
491
489
  }
492
490
  );
493
491
  }, j = ({
@@ -495,7 +493,7 @@ const At = Rt("Tv", [
495
493
  size: t,
496
494
  sx: o
497
495
  }) => e ? /* @__PURE__ */ r(
498
- h,
496
+ m,
499
497
  {
500
498
  sx: [
501
499
  {
@@ -511,9 +509,9 @@ const At = Rt("Tv", [
511
509
  ]
512
510
  }
513
511
  ) : null, Z = ({ sx: e, ...t }) => {
514
- const { colors: o, radius: s } = W();
512
+ const { colors: o, radius: s } = O();
515
513
  return /* @__PURE__ */ r(
516
- h,
514
+ m,
517
515
  {
518
516
  ...t,
519
517
  sx: [
@@ -526,27 +524,27 @@ const At = Rt("Tv", [
526
524
  ]
527
525
  }
528
526
  );
529
- }, Ke = ({ children: e }) => {
530
- const { colors: t } = W();
531
- return /* @__PURE__ */ r(S, { size: 13, weight: 700, upper: !0, color: t.text, sx: { padding: `0 ${n(2, 13)}` }, children: e });
532
- }, Y = ({
527
+ }, He = ({ children: e }) => {
528
+ const { colors: t } = O();
529
+ return /* @__PURE__ */ r(w, { size: 13, weight: 700, upper: !0, color: t.text, sx: { padding: `0 ${n(2, 13)}` }, children: e });
530
+ }, q = ({
533
531
  size: e = 11,
534
532
  children: t,
535
533
  sx: o
536
534
  }) => {
537
- const { colors: s } = W();
538
- return /* @__PURE__ */ r(S, { size: e, font: "secondary", weight: 700, upper: !0, color: s.dim, sx: o, children: t });
539
- }, Ve = z.createContext(null), ao = Ve.Provider, K = () => {
540
- const e = z.useContext(Ve);
535
+ const { colors: s } = O();
536
+ return /* @__PURE__ */ r(w, { size: e, font: "secondary", weight: 700, upper: !0, color: s.dim, sx: o, children: t });
537
+ }, Ue = A.createContext(null), eo = Ue.Provider, Y = () => {
538
+ const e = A.useContext(Ue);
541
539
  if (!e) throw new Error("useWidget must be used inside WidgetProvider");
542
540
  return e;
543
- }, lo = () => {
544
- var m;
545
- const { colors: e, radius: t } = W(), { data: o, competitionId: s, entities: i, finished: a, label: d, fmt: l } = K(), c = a.length, u = o.matches.length, g = B(c, u), f = (m = o.matches.filter((I) => I.status === "UPCOMING" || I.status === "LIVE").sort((I, x) => I.round - x.round)[0]) == null ? void 0 : m.round, w = {
541
+ }, to = () => {
542
+ var g;
543
+ const { colors: e, radius: t } = O(), { data: o, competitionId: s, entities: i, finished: a, label: d, fmt: l } = Y(), c = a.length, u = o.matches.length, h = G(c, u), f = (g = o.matches.filter((T) => T.status === "UPCOMING" || T.status === "LIVE").sort((T, v) => T.round - v.round)[0]) == null ? void 0 : g.round, C = {
546
544
  day: "numeric",
547
545
  month: "short",
548
546
  year: "numeric"
549
- }, b = o.season.startDate && o.season.endDate ? `${l.date(o.season.startDate, w)} – ${l.date(o.season.endDate, w)}` : "";
547
+ }, b = o.season.startDate && o.season.endDate ? `${l.date(o.season.startDate, C)} – ${l.date(o.season.endDate, C)}` : "";
550
548
  return /* @__PURE__ */ y(
551
549
  Z,
552
550
  {
@@ -559,11 +557,11 @@ const At = Rt("Tv", [
559
557
  },
560
558
  children: [
561
559
  /* @__PURE__ */ r(j, { url: i.logo(s), size: 40 }),
562
- /* @__PURE__ */ y(h, { sx: { minWidth: 0, flex: `1 1 ${n(200)}` }, children: [
563
- /* @__PURE__ */ y(h, { sx: { display: "flex", alignItems: "center", gap: n(8), flexWrap: "wrap" }, children: [
564
- /* @__PURE__ */ r(S, { size: 17, weight: 700, color: e.text, cms: !0, children: i.name(s) }),
560
+ /* @__PURE__ */ y(m, { sx: { minWidth: 0, flex: `1 1 ${n(200)}` }, children: [
561
+ /* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(8), flexWrap: "wrap" }, children: [
562
+ /* @__PURE__ */ r(w, { size: 17, weight: 700, color: e.text, cms: !0, children: i.name(s) }),
565
563
  o.season.name ? /* @__PURE__ */ r(
566
- S,
564
+ w,
567
565
  {
568
566
  size: 10,
569
567
  weight: 600,
@@ -578,7 +576,7 @@ const At = Rt("Tv", [
578
576
  ) : null
579
577
  ] }),
580
578
  b ? /* @__PURE__ */ r(
581
- S,
579
+ w,
582
580
  {
583
581
  component: "div",
584
582
  size: 11,
@@ -589,9 +587,9 @@ const At = Rt("Tv", [
589
587
  }
590
588
  ) : null
591
589
  ] }),
592
- /* @__PURE__ */ y(h, { sx: { flex: `1 1 ${n(220)}`, minWidth: 0 }, children: [
590
+ /* @__PURE__ */ y(m, { sx: { flex: `1 1 ${n(220)}`, minWidth: 0 }, children: [
593
591
  /* @__PURE__ */ y(
594
- S,
592
+ w,
595
593
  {
596
594
  component: "div",
597
595
  size: 11,
@@ -605,18 +603,18 @@ const At = Rt("Tv", [
605
603
  children: [
606
604
  /* @__PURE__ */ r("span", { children: f !== void 0 ? d("upcomingRound", { round: f }) : d("seasonFinished") }),
607
605
  /* @__PURE__ */ y("span", { children: [
608
- /* @__PURE__ */ r(h, { component: "b", sx: { color: e.text }, children: c }),
606
+ /* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children: c }),
609
607
  " ",
610
608
  d("seasonProgress", {
611
609
  matches: d("matchesCount", { count: u }),
612
- pct: g
610
+ pct: h
613
611
  })
614
612
  ] })
615
613
  ]
616
614
  }
617
615
  ),
618
616
  /* @__PURE__ */ r(
619
- h,
617
+ m,
620
618
  {
621
619
  sx: {
622
620
  height: n(6),
@@ -625,11 +623,11 @@ const At = Rt("Tv", [
625
623
  overflow: "hidden"
626
624
  },
627
625
  children: /* @__PURE__ */ r(
628
- h,
626
+ m,
629
627
  {
630
628
  sx: {
631
629
  height: "100%",
632
- width: `${g}%`,
630
+ width: `${h}%`,
633
631
  backgroundColor: e.primary,
634
632
  borderRadius: t.full
635
633
  }
@@ -641,21 +639,21 @@ const At = Rt("Tv", [
641
639
  ]
642
640
  }
643
641
  );
644
- }, co = {
642
+ }, oo = {
645
643
  match: "matchId",
646
644
  team: "competitorId",
647
645
  player: "athleteId"
648
- }, ue = (e) => {
646
+ }, ce = (e) => {
649
647
  var t;
650
648
  return !!(e != null && e.onClick || (t = e == null ? void 0 : e.url) != null && t.trim());
651
- }, ye = (e, t, o) => {
649
+ }, fe = (e, t, o) => {
652
650
  var d;
653
- if (!ue(e)) return null;
651
+ if (!ce(e)) return null;
654
652
  const s = ((d = e == null ? void 0 : e.url) == null ? void 0 : d.trim()) ?? "", i = encodeURIComponent(o);
655
653
  return {
656
654
  href: s ? s.replace(
657
655
  /\{(\w+)\}/g,
658
- (l, c) => c === "id" || c === co[t] ? i : l
656
+ (l, c) => c === "id" || c === oo[t] ? i : l
659
657
  ) : null,
660
658
  target: (e == null ? void 0 : e.target) ?? void 0,
661
659
  onClick: e != null && e.onClick ? (l) => {
@@ -663,18 +661,18 @@ const At = Rt("Tv", [
663
661
  l.stopPropagation(), l.preventDefault(), (c = e.onClick) == null || c.call(e, o);
664
662
  } : (l) => l.stopPropagation()
665
663
  };
666
- }, oe = (e, t) => Math.round(e.minutes / t), X = (e, t) => t("matchesCount", { count: e.appearances }), ne = (e, t) => t("minutesCount", { count: e.minutes }), Ye = {
664
+ }, te = (e, t) => Math.round(e.minutes / t), J = (e, t) => t("matchesCount", { count: e.appearances }), oe = (e, t) => t("minutesCount", { count: e.minutes }), Ke = {
667
665
  scorers: {
668
666
  title: "scorers",
669
667
  unit: "unitGoals",
670
- secondary: (e, t, o) => [X(e, o), ne(e, o), o("goalEvery", { count: oe(e, t) })],
671
- chips: (e, t, o) => [X(e, o), ne(e, o), o("goalRate", { count: oe(e, t) })]
668
+ secondary: (e, t, o) => [J(e, o), oe(e, o), o("goalEvery", { count: te(e, t) })],
669
+ chips: (e, t, o) => [J(e, o), oe(e, o), o("goalRate", { count: te(e, t) })]
672
670
  },
673
671
  assists: {
674
672
  title: "assists",
675
673
  unit: "unitAssists",
676
- secondary: (e, t, o) => [X(e, o), ne(e, o), o("assistEvery", { count: oe(e, t) })],
677
- chips: (e, t, o) => [X(e, o), ne(e, o), o("assistRate", { count: oe(e, t) })]
674
+ secondary: (e, t, o) => [J(e, o), oe(e, o), o("assistEvery", { count: te(e, t) })],
675
+ chips: (e, t, o) => [J(e, o), oe(e, o), o("assistRate", { count: te(e, t) })]
678
676
  },
679
677
  contributions: {
680
678
  title: "contributions",
@@ -682,29 +680,29 @@ const At = Rt("Tv", [
682
680
  secondary: (e, t, o) => [
683
681
  o("goalsCount", { count: e.goals }),
684
682
  o("assistsCount", { count: e.assists }),
685
- o("contributionEvery", { count: oe(e, t) })
683
+ o("contributionEvery", { count: te(e, t) })
686
684
  ],
687
685
  chips: (e, t, o) => [
688
686
  o("goalsShort", { count: e.goals }),
689
687
  o("assistsShort", { count: e.assists }),
690
- o("contributionRate", { count: oe(e, t) })
688
+ o("contributionRate", { count: te(e, t) })
691
689
  ]
692
690
  },
693
691
  cleanSheets: {
694
692
  title: "cleanSheets",
695
693
  unit: "unitMatches",
696
- secondary: (e, t, o) => [X(e, o), ne(e, o)],
697
- chips: (e, t, o) => [X(e, o), ne(e, o)]
694
+ secondary: (e, t, o) => [J(e, o), oe(e, o)],
695
+ chips: (e, t, o) => [J(e, o), oe(e, o)]
698
696
  },
699
697
  minutes: {
700
698
  title: "mostMinutes",
701
699
  unit: "unitMinutes",
702
700
  secondary: (e, t, o) => [
703
- X(e, o),
701
+ J(e, o),
704
702
  o("minutesPerMatch", { count: e.appearances ? Math.round(t / e.appearances) : 0 })
705
703
  ],
706
704
  chips: (e, t, o) => [
707
- X(e, o),
705
+ J(e, o),
708
706
  o("minutesPerMatch", { count: e.appearances ? Math.round(t / e.appearances) : 0 })
709
707
  ]
710
708
  },
@@ -720,15 +718,15 @@ const At = Rt("Tv", [
720
718
  o("redCount", { count: e.redCards })
721
719
  ]
722
720
  }
723
- }, uo = {
721
+ }, no = {
724
722
  goalkeeper: "goalkeeper",
725
723
  defender: "defender",
726
724
  midfielder: "midfielder",
727
725
  forward: "forward"
728
- }, ze = ({ photo: e, initial: t, size: o, badge: s, teamLogo: i, hero: a }) => {
729
- const { colors: d } = W(), l = a ? 22 : 12;
726
+ }, Ae = ({ photo: e, initial: t, size: o, badge: s, teamLogo: i, hero: a }) => {
727
+ const { colors: d } = O(), l = a ? 22 : 12;
730
728
  return /* @__PURE__ */ y(
731
- h,
729
+ m,
732
730
  {
733
731
  sx: {
734
732
  position: "relative",
@@ -737,7 +735,7 @@ const At = Rt("Tv", [
737
735
  },
738
736
  children: [
739
737
  /* @__PURE__ */ r(
740
- S,
738
+ w,
741
739
  {
742
740
  component: "div",
743
741
  size: l,
@@ -763,7 +761,7 @@ const At = Rt("Tv", [
763
761
  }
764
762
  ),
765
763
  i ? /* @__PURE__ */ r(
766
- h,
764
+ m,
767
765
  {
768
766
  sx: {
769
767
  position: "absolute",
@@ -784,23 +782,23 @@ const At = Rt("Tv", [
784
782
  ]
785
783
  }
786
784
  );
787
- }, po = ({ category: e }) => {
788
- var $, v, E, D;
789
- const { colors: t, radius: o, fonts: s } = W(), { data: i, entities: a, label: d, props: l } = K(), [c, u] = z.useState(!1), g = Ye[e], f = z.useMemo(() => oo(i.athletes, e), [i.athletes, e]), w = Math.min(10, Math.max(1, Math.round(l.playerRankingsRows ?? 5))), b = f.slice(0, c ? 10 : w), m = ue(l.playerCTA), I = (M) => {
790
- const A = M.athlete.athleteId, L = a.name(A), T = uo[a.position(A) ?? ""];
785
+ }, ro = ({ category: e }) => {
786
+ var P, _, z, D;
787
+ const { colors: t, radius: o, fonts: s } = O(), { data: i, entities: a, label: d, props: l } = Y(), [c, u] = A.useState(!1), h = Ke[e], f = A.useMemo(() => Xt(i.athletes, e), [i.athletes, e]), C = Math.min(10, Math.max(1, Math.round(l.playerRankingsRows ?? 5))), b = f.slice(0, c ? 10 : C), g = ce(l.playerCTA), T = (R) => {
788
+ const M = R.athlete.athleteId, E = a.name(M), $ = no[a.position(M) ?? ""];
791
789
  return {
792
- id: A,
793
- name: L,
794
- photo: a.photo(A),
795
- initial: L.trim().charAt(0),
796
- team: a.name(M.athlete.teamId),
797
- teamLogo: a.logo(M.athlete.teamId),
798
- position: T ? d(T) : "",
799
- cta: ye(l.playerCTA, "player", A)
790
+ id: M,
791
+ name: E,
792
+ photo: a.photo(M),
793
+ initial: E.trim().charAt(0),
794
+ team: a.name(R.athlete.teamId),
795
+ teamLogo: a.logo(R.athlete.teamId),
796
+ position: $ ? d($) : "",
797
+ cta: fe(l.playerCTA, "player", M)
800
798
  };
801
- }, x = b[0] ? I(b[0]) : null;
799
+ }, v = b[0] ? T(b[0]) : null;
802
800
  return /* @__PURE__ */ y(
803
- h,
801
+ m,
804
802
  {
805
803
  sx: {
806
804
  backgroundColor: t.surface,
@@ -812,7 +810,7 @@ const At = Rt("Tv", [
812
810
  },
813
811
  children: [
814
812
  /* @__PURE__ */ r(
815
- S,
813
+ w,
816
814
  {
817
815
  component: "div",
818
816
  size: 11,
@@ -821,16 +819,16 @@ const At = Rt("Tv", [
821
819
  upper: !0,
822
820
  color: t.dim,
823
821
  sx: { padding: `${n(10, 11)} ${n(14, 11)} 0` },
824
- children: d(g.title)
822
+ children: d(h.title)
825
823
  }
826
824
  ),
827
- x && b[0] ? /* @__PURE__ */ y(
828
- h,
825
+ v && b[0] ? /* @__PURE__ */ y(
826
+ m,
829
827
  {
830
- component: ($ = x.cta) != null && $.href ? "a" : "div",
831
- href: ((v = x.cta) == null ? void 0 : v.href) ?? void 0,
832
- target: (E = x.cta) == null ? void 0 : E.target,
833
- onClick: (D = x.cta) == null ? void 0 : D.onClick,
828
+ component: (P = v.cta) != null && P.href ? "a" : "div",
829
+ href: ((_ = v.cta) == null ? void 0 : _.href) ?? void 0,
830
+ target: (z = v.cta) == null ? void 0 : z.target,
831
+ onClick: (D = v.cta) == null ? void 0 : D.onClick,
834
832
  sx: {
835
833
  margin: n(10),
836
834
  padding: n(12),
@@ -839,26 +837,26 @@ const At = Rt("Tv", [
839
837
  display: "flex",
840
838
  alignItems: "center",
841
839
  gap: n(12),
842
- cursor: m ? "pointer" : "default",
840
+ cursor: g ? "pointer" : "default",
843
841
  textDecoration: "none",
844
842
  color: "inherit"
845
843
  },
846
844
  children: [
847
845
  /* @__PURE__ */ r(
848
- ze,
846
+ Ae,
849
847
  {
850
- photo: x.photo,
851
- initial: x.initial,
848
+ photo: v.photo,
849
+ initial: v.initial,
852
850
  size: 60,
853
851
  badge: 24,
854
- teamLogo: x.teamLogo,
852
+ teamLogo: v.teamLogo,
855
853
  hero: !0
856
854
  }
857
855
  ),
858
- /* @__PURE__ */ y(h, { sx: { flex: 1, minWidth: 0 }, children: [
859
- /* @__PURE__ */ r(S, { component: "div", size: 15, weight: 700, color: t.text, ellipsis: !0, cms: !0, children: x.name }),
856
+ /* @__PURE__ */ y(m, { sx: { flex: 1, minWidth: 0 }, children: [
857
+ /* @__PURE__ */ r(w, { component: "div", size: 15, weight: 700, color: t.text, ellipsis: !0, cms: !0, children: v.name }),
860
858
  /* @__PURE__ */ r(
861
- S,
859
+ w,
862
860
  {
863
861
  component: "div",
864
862
  size: 11,
@@ -867,11 +865,11 @@ const At = Rt("Tv", [
867
865
  ellipsis: !0,
868
866
  cms: !0,
869
867
  sx: { marginTop: n(2, 11) },
870
- children: [x.team, x.position].filter(Boolean).join(" · ")
868
+ children: [v.team, v.position].filter(Boolean).join(" · ")
871
869
  }
872
870
  ),
873
- /* @__PURE__ */ r(h, { sx: { display: "flex", gap: n(4), flexWrap: "wrap", marginTop: n(6) }, children: g.chips(b[0].athlete, b[0].value, d).map((M) => /* @__PURE__ */ r(
874
- S,
871
+ /* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4), flexWrap: "wrap", marginTop: n(6) }, children: h.chips(b[0].athlete, b[0].value, d).map((R) => /* @__PURE__ */ r(
872
+ w,
875
873
  {
876
874
  size: 10,
877
875
  font: "secondary",
@@ -882,15 +880,15 @@ const At = Rt("Tv", [
882
880
  borderRadius: o.full,
883
881
  padding: `${n(2, 10)} ${n(7, 10)}`
884
882
  },
885
- children: M
883
+ children: R
886
884
  },
887
- M
885
+ R
888
886
  )) })
889
887
  ] }),
890
- /* @__PURE__ */ y(h, { sx: { textAlign: "right", flexShrink: 0 }, children: [
891
- /* @__PURE__ */ r(S, { component: "div", size: 32, weight: 700, color: t.primary, sx: { lineHeight: 1 }, children: b[0].value }),
888
+ /* @__PURE__ */ y(m, { sx: { textAlign: "right", flexShrink: 0 }, children: [
889
+ /* @__PURE__ */ r(w, { component: "div", size: 32, weight: 700, color: t.primary, sx: { lineHeight: 1 }, children: b[0].value }),
892
890
  /* @__PURE__ */ r(
893
- S,
891
+ w,
894
892
  {
895
893
  component: "div",
896
894
  size: 10,
@@ -898,23 +896,23 @@ const At = Rt("Tv", [
898
896
  upper: !0,
899
897
  color: t.dim,
900
898
  sx: { marginTop: n(3, 10) },
901
- children: d(g.unit)
899
+ children: d(h.unit)
902
900
  }
903
901
  )
904
902
  ] })
905
903
  ]
906
904
  }
907
905
  ) : null,
908
- b.slice(1).map((M) => {
909
- var L, T, R, O;
910
- const A = I(M);
906
+ b.slice(1).map((R) => {
907
+ var E, $, k, F;
908
+ const M = T(R);
911
909
  return /* @__PURE__ */ y(
912
- h,
910
+ m,
913
911
  {
914
- component: (L = A.cta) != null && L.href ? "a" : "div",
915
- href: ((T = A.cta) == null ? void 0 : T.href) ?? void 0,
916
- target: (R = A.cta) == null ? void 0 : R.target,
917
- onClick: (O = A.cta) == null ? void 0 : O.onClick,
912
+ component: (E = M.cta) != null && E.href ? "a" : "div",
913
+ href: (($ = M.cta) == null ? void 0 : $.href) ?? void 0,
914
+ target: (k = M.cta) == null ? void 0 : k.target,
915
+ onClick: (F = M.cta) == null ? void 0 : F.onClick,
918
916
  sx: {
919
917
  display: "grid",
920
918
  gridTemplateColumns: `${n(28)} ${n(32)} minmax(0,1fr) auto`,
@@ -922,26 +920,26 @@ const At = Rt("Tv", [
922
920
  gap: n(10),
923
921
  padding: `${n(8)} ${n(14)}`,
924
922
  borderTop: `1px solid ${t.border}`,
925
- cursor: m ? "pointer" : "default",
923
+ cursor: g ? "pointer" : "default",
926
924
  textDecoration: "none",
927
925
  color: "inherit",
928
- "&:hover": { backgroundColor: m ? t.onSurface : "transparent" }
926
+ "&:hover": { backgroundColor: g ? t.onSurface : "transparent" }
929
927
  },
930
928
  children: [
931
- /* @__PURE__ */ r(S, { size: 12, font: "secondary", weight: 700, color: t.dim, children: M.rank }),
932
- /* @__PURE__ */ r(ze, { photo: A.photo, initial: A.initial, size: 32, badge: 16, teamLogo: A.teamLogo }),
933
- /* @__PURE__ */ y(h, { sx: { minWidth: 0 }, children: [
934
- /* @__PURE__ */ r(S, { component: "div", size: 13, weight: 600, color: t.text, ellipsis: !0, cms: !0, children: A.name }),
935
- /* @__PURE__ */ r(S, { component: "div", size: 11, font: "secondary", color: t.dim, ellipsis: !0, children: g.secondary(M.athlete, M.value, d).join(" · ") })
929
+ /* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 700, color: t.dim, children: R.rank }),
930
+ /* @__PURE__ */ r(Ae, { photo: M.photo, initial: M.initial, size: 32, badge: 16, teamLogo: M.teamLogo }),
931
+ /* @__PURE__ */ y(m, { sx: { minWidth: 0 }, children: [
932
+ /* @__PURE__ */ r(w, { component: "div", size: 13, weight: 600, color: t.text, ellipsis: !0, cms: !0, children: M.name }),
933
+ /* @__PURE__ */ r(w, { component: "div", size: 11, font: "secondary", color: t.dim, ellipsis: !0, children: h.secondary(R.athlete, R.value, d).join(" · ") })
936
934
  ] }),
937
- /* @__PURE__ */ r(S, { size: 16, weight: 700, color: t.primary, children: M.value })
935
+ /* @__PURE__ */ r(w, { size: 16, weight: 700, color: t.primary, children: R.value })
938
936
  ]
939
937
  },
940
- A.id
938
+ M.id
941
939
  );
942
940
  }),
943
- f.length > w ? /* @__PURE__ */ r(
944
- h,
941
+ f.length > C ? /* @__PURE__ */ r(
942
+ m,
945
943
  {
946
944
  component: "button",
947
945
  type: "button",
@@ -963,12 +961,12 @@ const At = Rt("Tv", [
963
961
  ]
964
962
  }
965
963
  );
966
- }, mo = () => {
967
- const { colors: e, radius: t, fonts: o } = W(), { label: s, props: i } = K(), a = xe(), [d, l] = z.useState(0), c = i.playerRankingsLayout ?? "auto", u = c === "tabs" || c === "auto" && a, g = u ? [ge[d]] : ge;
968
- return /* @__PURE__ */ y(h, { sx: { display: "flex", flexDirection: "column", gap: n(10) }, children: [
969
- /* @__PURE__ */ r(Ke, { children: s("leadersTitle") }),
964
+ }, so = () => {
965
+ const { colors: e, radius: t, fonts: o } = O(), { label: s, props: i } = Y(), a = xe(), [d, l] = A.useState(0), c = i.playerRankingsLayout ?? "auto", u = c === "tabs" || c === "auto" && a, h = u ? [he[d]] : he;
966
+ return /* @__PURE__ */ y(m, { sx: { display: "flex", flexDirection: "column", gap: n(10) }, children: [
967
+ /* @__PURE__ */ r(He, { children: s("leadersTitle") }),
970
968
  u ? /* @__PURE__ */ r(
971
- h,
969
+ m,
972
970
  {
973
971
  sx: {
974
972
  display: "flex",
@@ -979,14 +977,14 @@ const At = Rt("Tv", [
979
977
  border: `1px solid ${e.border}`,
980
978
  borderRadius: t.full
981
979
  },
982
- children: ge.map((f, w) => {
983
- const b = w === d;
980
+ children: he.map((f, C) => {
981
+ const b = C === d;
984
982
  return /* @__PURE__ */ r(
985
- h,
983
+ m,
986
984
  {
987
985
  component: "button",
988
986
  type: "button",
989
- onClick: () => l(w),
987
+ onClick: () => l(C),
990
988
  sx: {
991
989
  flex: "1 0 auto",
992
990
  whiteSpace: "nowrap",
@@ -1000,7 +998,7 @@ const At = Rt("Tv", [
1000
998
  backgroundColor: b ? e.primary : "transparent",
1001
999
  color: b ? e.onPrimary : e.dim
1002
1000
  },
1003
- children: s(Ye[f].title)
1001
+ children: s(Ke[f].title)
1004
1002
  },
1005
1003
  f
1006
1004
  );
@@ -1008,127 +1006,21 @@ const At = Rt("Tv", [
1008
1006
  }
1009
1007
  ) : null,
1010
1008
  /* @__PURE__ */ r(
1011
- h,
1009
+ m,
1012
1010
  {
1013
1011
  sx: {
1014
1012
  display: "grid",
1015
1013
  gridTemplateColumns: u ? "1fr" : `repeat(auto-fit,minmax(${n(300)},1fr))`,
1016
1014
  gap: n(12)
1017
1015
  },
1018
- children: g.map((f) => /* @__PURE__ */ r(po, { category: f }, f))
1016
+ children: h.map((f) => /* @__PURE__ */ r(ro, { category: f }, f))
1019
1017
  }
1020
1018
  )
1021
1019
  ] });
1022
- }, ho = 3e4, re = {
1023
- threeWay: { code: "FT_1X2", outcomes: ["1", "X", "2"] },
1024
- twoWay: { code: "WINNER_OT", outcomes: ["1", "2"] }
1025
- }, go = /* @__PURE__ */ new Set(["FOOTBALL", "HOCKEY", "ICE_HOCKEY"]), fo = (e) => go.has((e ?? "").toUpperCase()) ? [re.threeWay, re.twoWay] : [re.twoWay, re.threeWay], yo = (e, t) => {
1026
- const o = (e || t || "").trim().toUpperCase();
1027
- return o === "1" || o === "HOME" || o === "HOME_TEAM" ? "1" : o === "X" || o === "DRAW" ? "X" : o === "2" || o === "AWAY" || o === "AWAY_TEAM" ? "2" : null;
1028
- }, De = (e) => {
1029
- if (!Array.isArray(e)) return null;
1030
- const t = e.find((o) => typeof (o == null ? void 0 : o.url) == "string" && o.url);
1031
- return t ? t.url : null;
1032
- }, xo = (e, t, o, s, i) => {
1033
- var a, d;
1034
- for (const l of t) {
1035
- if (`${(l == null ? void 0 : l.type) ?? "PRE_EVENT"}`.toUpperCase() === "LIVE" !== i) continue;
1036
- const u = o.map((x) => ({
1037
- candidate: x,
1038
- market: (l.markets ?? []).find(
1039
- ($) => {
1040
- var v, E;
1041
- return (((v = $ == null ? void 0 : $.type) == null ? void 0 : v.code) || ((E = $ == null ? void 0 : $.type) == null ? void 0 : E.id) || "").toUpperCase() === x.code;
1042
- }
1043
- )
1044
- })).find((x) => !!x.market);
1045
- if (!(u != null && u.market)) continue;
1046
- const { candidate: g, market: f } = u, w = [];
1047
- if ((f.selections ?? []).forEach((x) => {
1048
- const $ = yo(x == null ? void 0 : x.code, x == null ? void 0 : x.name);
1049
- if (!$) return;
1050
- const v = Number(x == null ? void 0 : x.odds);
1051
- if (!Number.isFinite(v) || v <= 0 || w.some((A) => A.label === $)) return;
1052
- const E = s == null ? void 0 : s.get($), D = ((x == null ? void 0 : x.movement) ?? "").toUpperCase(), M = D === "UP" || D === "DOWN" ? D.toLowerCase() : E === void 0 || E === v ? "none" : v > E ? "up" : "down";
1053
- w.push({ label: $, value: v.toFixed(2), odd: v, change: M, url: De(x == null ? void 0 : x.urls) });
1054
- }), !g.outcomes.every((x) => w.some(($) => $.label === x))) continue;
1055
- const b = g.outcomes;
1056
- w.sort((x, $) => b.indexOf(x.label) - b.indexOf($.label));
1057
- const m = l.bookmaker, I = ((m == null ? void 0 : m.assets) ?? [])[0];
1058
- return {
1059
- matchId: e,
1060
- market: g.code,
1061
- operator: m ? {
1062
- name: m.name ?? "",
1063
- logo: (I == null ? void 0 : I.transparentBackgroundUrl) || (I == null ? void 0 : I.logo) || null,
1064
- url: De(m.eventUrls) ?? m.url ?? null,
1065
- backgroundColor: ((a = m.branding) == null ? void 0 : a.backgroundColor) ?? (I == null ? void 0 : I.backgroundColor) ?? null,
1066
- textColor: ((d = m.branding) == null ? void 0 : d.textColor) ?? null
1067
- } : null,
1068
- values: w
1069
- };
1070
- }
1071
- return null;
1072
- }, bo = (e, t, o) => {
1073
- const {
1074
- enabled: s,
1075
- liveMatchIds: i = [],
1076
- sport: a,
1077
- pollingIntervalMs: d = ho,
1078
- operators: l,
1079
- affiliateId: c,
1080
- affiliateIds: u
1081
- } = o, [g, f] = J(() => /* @__PURE__ */ new Map()), w = rt(/* @__PURE__ */ new Map()), b = [...t].sort().join(","), m = [...i].sort().join(","), I = (l ?? []).join(","), x = `${c ?? ""}|${JSON.stringify(u ?? {})}`, $ = st(async () => {
1082
- const v = b ? b.split(",") : [], E = new Set(m ? m.split(",") : []);
1083
- if (!e || v.length === 0) {
1084
- f(/* @__PURE__ */ new Map());
1085
- return;
1086
- }
1087
- try {
1088
- const D = fo(a), M = {
1089
- oddType: E.size ? Re.ALL : Re.PRE_EVENT,
1090
- scopeType: Tt.ORDINARY_TIME,
1091
- oddFormat: $t.DECIMAL,
1092
- marketTypes: D.map((T) => T.code),
1093
- ...l && l.length ? { operators: l } : {},
1094
- ...c ? { affiliateId: c } : {},
1095
- ...u && Object.keys(u).length ? { affiliateIds: u } : {}
1096
- }, A = await e.odds.getByMatchIds(v, M), L = /* @__PURE__ */ new Map();
1097
- v.forEach((T) => {
1098
- const R = xo(
1099
- T,
1100
- (A == null ? void 0 : A.get(T)) ?? [],
1101
- D,
1102
- w.current.get(T),
1103
- E.has(T)
1104
- );
1105
- R && (L.set(T, R), w.current.set(T, new Map(R.values.map((O) => [O.label, O.odd]))));
1106
- }), f(L);
1107
- } catch {
1108
- f(/* @__PURE__ */ new Map());
1109
- }
1110
- }, [e, b, m, a, I, x]);
1111
- return le(() => {
1112
- if (!s || !b) {
1113
- f(/* @__PURE__ */ new Map());
1114
- return;
1115
- }
1116
- let v = !1;
1117
- const E = () => {
1118
- v || $();
1119
- };
1120
- if (E(), d <= 0) return () => {
1121
- v = !0;
1122
- };
1123
- const D = setInterval(E, d);
1124
- return () => {
1125
- v = !0, clearInterval(D);
1126
- };
1127
- }, [s, b, d, $]), g;
1128
- }, F = ({ label: e, home: t, away: o, percent: s, format: i }) => {
1129
- const { colors: a, radius: d } = W(), l = t ?? 0, c = o ?? 0, u = l + c || 1, g = s ? Math.round(l) : l, f = s ? Math.round(c) : c, w = (b) => b == null ? "–" : s ? `${Math.round(b)}%` : i ? i(b) : String(b);
1020
+ }, B = ({ label: e, home: t, away: o, percent: s, format: i }) => {
1021
+ const { colors: a, radius: d } = O(), l = t ?? 0, c = o ?? 0, u = l + c || 1, h = s ? Math.round(l) : l, f = s ? Math.round(c) : c, C = (b) => b == null ? "–" : s ? `${Math.round(b)}%` : i ? i(b) : String(b);
1130
1022
  return /* @__PURE__ */ y(
1131
- h,
1023
+ m,
1132
1024
  {
1133
1025
  sx: {
1134
1026
  display: "grid",
@@ -1138,21 +1030,21 @@ const At = Rt("Tv", [
1138
1030
  },
1139
1031
  children: [
1140
1032
  /* @__PURE__ */ r(
1141
- S,
1033
+ w,
1142
1034
  {
1143
1035
  size: 14,
1144
1036
  weight: 700,
1145
1037
  font: "secondary",
1146
- color: g > f ? a.text : a.dim,
1038
+ color: h > f ? a.text : a.dim,
1147
1039
  sx: { textAlign: "right" },
1148
- children: w(t)
1040
+ children: C(t)
1149
1041
  }
1150
1042
  ),
1151
- /* @__PURE__ */ y(h, { sx: { display: "flex", flexDirection: "column", gap: n(4) }, children: [
1152
- /* @__PURE__ */ r(S, { size: 10, font: "secondary", upper: !0, color: a.dim, sx: { textAlign: "center" }, children: e }),
1153
- /* @__PURE__ */ y(h, { sx: { display: "flex", gap: n(2), height: n(6) }, children: [
1043
+ /* @__PURE__ */ y(m, { sx: { display: "flex", flexDirection: "column", gap: n(4) }, children: [
1044
+ /* @__PURE__ */ r(w, { size: 10, font: "secondary", upper: !0, color: a.dim, sx: { textAlign: "center" }, children: e }),
1045
+ /* @__PURE__ */ y(m, { sx: { display: "flex", gap: n(2), height: n(6) }, children: [
1154
1046
  /* @__PURE__ */ r(
1155
- h,
1047
+ m,
1156
1048
  {
1157
1049
  sx: {
1158
1050
  flex: 1,
@@ -1162,11 +1054,11 @@ const At = Rt("Tv", [
1162
1054
  borderRadius: `${d.full} 0 0 ${d.full}`,
1163
1055
  overflow: "hidden"
1164
1056
  },
1165
- children: /* @__PURE__ */ r(h, { sx: { width: `${B(l, u)}%`, backgroundColor: a.primary } })
1057
+ children: /* @__PURE__ */ r(m, { sx: { width: `${G(l, u)}%`, backgroundColor: a.primary } })
1166
1058
  }
1167
1059
  ),
1168
1060
  /* @__PURE__ */ r(
1169
- h,
1061
+ m,
1170
1062
  {
1171
1063
  sx: {
1172
1064
  flex: 1,
@@ -1175,10 +1067,10 @@ const At = Rt("Tv", [
1175
1067
  overflow: "hidden"
1176
1068
  },
1177
1069
  children: /* @__PURE__ */ r(
1178
- h,
1070
+ m,
1179
1071
  {
1180
1072
  sx: {
1181
- width: `${B(c, u)}%`,
1073
+ width: `${G(c, u)}%`,
1182
1074
  height: "100%",
1183
1075
  backgroundColor: a.primaryContainer
1184
1076
  }
@@ -1188,19 +1080,19 @@ const At = Rt("Tv", [
1188
1080
  )
1189
1081
  ] })
1190
1082
  ] }),
1191
- /* @__PURE__ */ r(S, { size: 14, weight: 700, font: "secondary", color: f > g ? a.text : a.dim, children: w(o) })
1083
+ /* @__PURE__ */ r(w, { size: 14, weight: 700, font: "secondary", color: f > h ? a.text : a.dim, children: C(o) })
1192
1084
  ]
1193
1085
  }
1194
1086
  );
1195
- }, wo = [0, 15, 30, 45, 60, 75, 90], Co = 5.5, So = ({
1087
+ }, io = [0, 15, 30, 45, 60, 75, 90], ao = 5.5, lo = ({
1196
1088
  x: e,
1197
1089
  top: t,
1198
1090
  logo: o,
1199
1091
  color: s
1200
1092
  }) => {
1201
- const { colors: i } = W();
1093
+ const { colors: i } = O();
1202
1094
  return /* @__PURE__ */ r(
1203
- h,
1095
+ m,
1204
1096
  {
1205
1097
  sx: {
1206
1098
  position: "absolute",
@@ -1210,7 +1102,7 @@ const At = Rt("Tv", [
1210
1102
  display: "flex"
1211
1103
  },
1212
1104
  children: /* @__PURE__ */ y(
1213
- h,
1105
+ m,
1214
1106
  {
1215
1107
  sx: {
1216
1108
  position: "relative",
@@ -1226,7 +1118,7 @@ const At = Rt("Tv", [
1226
1118
  },
1227
1119
  children: [
1228
1120
  o ? /* @__PURE__ */ r(
1229
- h,
1121
+ m,
1230
1122
  {
1231
1123
  component: "img",
1232
1124
  src: o,
@@ -1235,7 +1127,7 @@ const At = Rt("Tv", [
1235
1127
  }
1236
1128
  ) : null,
1237
1129
  /* @__PURE__ */ r(
1238
- h,
1130
+ m,
1239
1131
  {
1240
1132
  sx: {
1241
1133
  position: "absolute",
@@ -1275,20 +1167,20 @@ const At = Rt("Tv", [
1275
1167
  )
1276
1168
  }
1277
1169
  );
1278
- }, Io = ({ match: e }) => {
1279
- const { colors: t } = W(), { entities: o, label: s } = K(), i = o.logo(e.home.id), a = o.logo(e.away.id), [d, l] = e.fullTime ?? [0, 0], c = [];
1280
- return e.home.goalsByPeriod.forEach((u, g) => {
1281
- const f = (m, I) => (g * 15 + 7.5 + (I - (m - 1) / 2) * Co) / 90 * 100, w = e.home.goalsByPeriod[g] ?? 0, b = e.away.goalsByPeriod[g] ?? 0;
1282
- for (let m = 0; m < w; m += 1) c.push({ x: f(w, m), top: !0, key: `h${g}-${m}` });
1283
- for (let m = 0; m < b; m += 1) c.push({ x: f(b, m), top: !1, key: `a${g}-${m}` });
1284
- }), /* @__PURE__ */ y(pe, { children: [
1285
- /* @__PURE__ */ r(F, { label: s("possession"), home: e.home.possession, away: e.away.possession, percent: !0 }),
1286
- /* @__PURE__ */ r(F, { label: s("shotsOnTarget"), home: e.home.shotsOnTarget, away: e.away.shotsOnTarget }),
1287
- /* @__PURE__ */ r(F, { label: s("corners"), home: e.home.corners, away: e.away.corners }),
1288
- /* @__PURE__ */ r(F, { label: s("yellowCards"), home: e.home.yellowCards, away: e.away.yellowCards }),
1289
- /* @__PURE__ */ r(F, { label: s("redCards"), home: e.home.redCards, away: e.away.redCards }),
1170
+ }, co = ({ match: e }) => {
1171
+ const { colors: t } = O(), { entities: o, label: s } = Y(), i = o.logo(e.home.id), a = o.logo(e.away.id), [d, l] = e.fullTime ?? [0, 0], c = [];
1172
+ return e.home.goalsByPeriod.forEach((u, h) => {
1173
+ const f = (g, T) => (h * 15 + 7.5 + (T - (g - 1) / 2) * ao) / 90 * 100, C = e.home.goalsByPeriod[h] ?? 0, b = e.away.goalsByPeriod[h] ?? 0;
1174
+ for (let g = 0; g < C; g += 1) c.push({ x: f(C, g), top: !0, key: `h${h}-${g}` });
1175
+ for (let g = 0; g < b; g += 1) c.push({ x: f(b, g), top: !1, key: `a${h}-${g}` });
1176
+ }), /* @__PURE__ */ y(ye, { children: [
1177
+ /* @__PURE__ */ r(B, { label: s("possession"), home: e.home.possession, away: e.away.possession, percent: !0 }),
1178
+ /* @__PURE__ */ r(B, { label: s("shotsOnTarget"), home: e.home.shotsOnTarget, away: e.away.shotsOnTarget }),
1179
+ /* @__PURE__ */ r(B, { label: s("corners"), home: e.home.corners, away: e.away.corners }),
1180
+ /* @__PURE__ */ r(B, { label: s("yellowCards"), home: e.home.yellowCards, away: e.away.yellowCards }),
1181
+ /* @__PURE__ */ r(B, { label: s("redCards"), home: e.home.redCards, away: e.away.redCards }),
1290
1182
  /* @__PURE__ */ y(
1291
- h,
1183
+ m,
1292
1184
  {
1293
1185
  sx: {
1294
1186
  display: "grid",
@@ -1299,9 +1191,9 @@ const At = Rt("Tv", [
1299
1191
  },
1300
1192
  children: [
1301
1193
  /* @__PURE__ */ r(j, { url: i, size: 30, sx: { justifySelf: "end" } }),
1302
- /* @__PURE__ */ y(h, { sx: { position: "relative", height: n(84), gridColumn: 2 }, children: [
1194
+ /* @__PURE__ */ y(m, { sx: { position: "relative", height: n(84), gridColumn: 2 }, children: [
1303
1195
  /* @__PURE__ */ r(
1304
- h,
1196
+ m,
1305
1197
  {
1306
1198
  sx: {
1307
1199
  position: "absolute",
@@ -1314,30 +1206,30 @@ const At = Rt("Tv", [
1314
1206
  }
1315
1207
  }
1316
1208
  ),
1317
- wo.map((u) => {
1318
- const g = u === 45, f = g ? t.text : t.dim;
1319
- return /* @__PURE__ */ y(z.Fragment, { children: [
1209
+ io.map((u) => {
1210
+ const h = u === 45, f = h ? t.text : t.dim;
1211
+ return /* @__PURE__ */ y(A.Fragment, { children: [
1320
1212
  /* @__PURE__ */ r(
1321
- h,
1213
+ m,
1322
1214
  {
1323
1215
  sx: {
1324
1216
  position: "absolute",
1325
1217
  left: `${u / 90 * 100}%`,
1326
1218
  top: "50%",
1327
1219
  transform: "translate(-50%,-50%)",
1328
- width: g ? "2px" : "1px",
1329
- height: n(g ? 14 : 8),
1220
+ width: h ? "2px" : "1px",
1221
+ height: n(h ? 14 : 8),
1330
1222
  backgroundColor: f,
1331
1223
  borderRadius: "1px"
1332
1224
  }
1333
1225
  }
1334
1226
  ),
1335
1227
  /* @__PURE__ */ r(
1336
- S,
1228
+ w,
1337
1229
  {
1338
1230
  size: 10,
1339
1231
  font: "secondary",
1340
- weight: g ? 700 : 400,
1232
+ weight: h ? 700 : 400,
1341
1233
  color: f,
1342
1234
  sx: {
1343
1235
  position: "absolute",
@@ -1346,13 +1238,13 @@ const At = Rt("Tv", [
1346
1238
  transform: "translateX(-50%)",
1347
1239
  whiteSpace: "nowrap"
1348
1240
  },
1349
- children: g ? s("halfTimeShort") : s("minuteTick", { minute: u })
1241
+ children: h ? s("halfTimeShort") : s("minuteTick", { minute: u })
1350
1242
  }
1351
1243
  )
1352
1244
  ] }, u);
1353
1245
  }),
1354
1246
  c.map((u) => /* @__PURE__ */ r(
1355
- So,
1247
+ lo,
1356
1248
  {
1357
1249
  x: u.x,
1358
1250
  top: u.top,
@@ -1362,7 +1254,7 @@ const At = Rt("Tv", [
1362
1254
  u.key
1363
1255
  )),
1364
1256
  d + l === 0 ? /* @__PURE__ */ r(
1365
- S,
1257
+ w,
1366
1258
  {
1367
1259
  size: 11,
1368
1260
  font: "secondary",
@@ -1382,163 +1274,37 @@ const At = Rt("Tv", [
1382
1274
  }
1383
1275
  )
1384
1276
  ] });
1385
- }, vo = 3e3, ko = ({ odds: e, config: t, onAddToBetslip: o }) => {
1386
- const { colors: s, fonts: i, radius: a } = W(), d = "1.625em", l = ((t == null ? void 0 : t.mode) ?? "default") === "flash", c = (t == null ? void 0 : t.flashInterval) ?? vo, [u, g] = z.useState(!1);
1387
- z.useEffect(() => {
1388
- if (!l) return;
1389
- const m = setInterval(() => g((I) => !I), c);
1390
- return () => clearInterval(m);
1391
- }, [l, c]);
1392
- const f = e.operator, w = (m) => f ? /* @__PURE__ */ r(
1393
- h,
1394
- {
1395
- component: f.url ? "a" : "div",
1396
- href: f.url ?? void 0,
1397
- target: f.url ? "_blank" : void 0,
1398
- rel: f.url ? "noopener noreferrer" : void 0,
1399
- sx: {
1400
- display: "flex",
1401
- alignItems: "center",
1402
- justifyContent: "center",
1403
- gap: "0.375em",
1404
- height: d,
1405
- paddingInline: "0.375em",
1406
- borderRadius: a.xs,
1407
- boxSizing: "border-box",
1408
- textDecoration: "none",
1409
- flexShrink: 0,
1410
- whiteSpace: "nowrap",
1411
- // The operator's brand colours are data, not theme.
1412
- backgroundColor: f.backgroundColor ?? s.onSurface,
1413
- color: f.textColor ?? s.text,
1414
- ...m ? { flex: 1 } : { maxWidth: "5.25em", width: "100%" }
1415
- },
1416
- children: f.logo ? /* @__PURE__ */ r(
1417
- h,
1418
- {
1419
- component: "img",
1420
- src: f.logo,
1421
- alt: f.name,
1422
- loading: "lazy",
1423
- sx: { height: "100%", width: "auto", objectFit: "contain" }
1424
- }
1425
- ) : /* @__PURE__ */ r(
1426
- Et,
1427
- {
1428
- sx: {
1429
- fontFamily: i.primary,
1430
- fontSize: "0.75em",
1431
- fontWeight: 600,
1432
- lineHeight: 1.35,
1433
- color: "inherit",
1434
- whiteSpace: "nowrap",
1435
- unicodeBidi: "plaintext"
1436
- },
1437
- children: f.name
1438
- }
1439
- )
1440
- }
1441
- ) : null, b = (m) => /* @__PURE__ */ y(
1442
- h,
1443
- {
1444
- component: m.url ? "a" : "button",
1445
- type: m.url ? void 0 : "button",
1446
- href: m.url ?? void 0,
1447
- target: m.url ? "_blank" : void 0,
1448
- rel: m.url ? "noopener noreferrer" : void 0,
1449
- onClick: () => o == null ? void 0 : o({
1450
- matchId: e.matchId,
1451
- market: e.market,
1452
- pick: m.label,
1453
- odd: m.odd
1454
- }),
1455
- sx: {
1456
- flex: 1,
1457
- minWidth: 0,
1458
- height: d,
1459
- display: "flex",
1460
- alignItems: "center",
1461
- justifyContent: "space-between",
1462
- gap: "0.25em",
1463
- paddingInline: "0.5em",
1464
- borderRadius: a.xs,
1465
- border: `1px solid ${s.border}`,
1466
- boxSizing: "border-box",
1467
- backgroundColor: s.surface,
1468
- color: s.text,
1469
- cursor: "pointer",
1470
- textDecoration: "none",
1471
- fontFamily: i.secondary,
1472
- // A <button> doesn't inherit font-size, and `height` in em resolves against its own.
1473
- fontSize: "1em",
1474
- lineHeight: 1.35,
1475
- "&:hover": { borderColor: s.dim }
1476
- },
1477
- children: [
1478
- /* @__PURE__ */ r(h, { component: "span", sx: { color: s.dim, fontSize: "0.75em" }, children: m.label }),
1479
- /* @__PURE__ */ y(
1480
- h,
1481
- {
1482
- component: "span",
1483
- sx: { fontSize: "0.75em", fontWeight: 700, fontVariantNumeric: "tabular-nums" },
1484
- children: [
1485
- /* @__PURE__ */ r(_t, { children: m.value }),
1486
- /* @__PURE__ */ r(
1487
- h,
1488
- {
1489
- component: "span",
1490
- "aria-hidden": !0,
1491
- sx: {
1492
- marginInlineStart: "0.25em",
1493
- // Always takes its space, so a price without movement sits where the others do.
1494
- visibility: m.change === "none" ? "hidden" : "visible",
1495
- color: m.change === "up" ? s.success : s.danger
1496
- },
1497
- children: m.change === "down" ? "↓" : "↑"
1498
- }
1499
- )
1500
- ]
1501
- }
1502
- )
1503
- ]
1504
- },
1505
- m.label
1506
- );
1507
- return /* @__PURE__ */ r(h, { sx: { display: "flex", alignItems: "center", gap: "0.3125em" }, children: l ? u && f ? w(!0) : e.values.map(b) : /* @__PURE__ */ y(pe, { children: [
1508
- w(!1),
1509
- e.values.map(b)
1510
- ] }) });
1511
- }, To = { W: "formWin", D: "formDraw", L: "formLoss" }, Pe = ({ entry: e, side: t }) => {
1512
- const { colors: o, radius: s } = W(), { entities: i, label: a, fmt: d } = K(), [l, c] = z.useState(!1), { match: u, result: g } = e, f = { W: o.success, D: o.variant, L: o.danger }[g], w = t === "away" ? { right: n(-4) } : { left: n(-4) }, b = t === "away" ? { right: n(10) } : { left: n(10) }, [m, I] = u.fullTime ?? [0, 0], x = ($, v) => /* @__PURE__ */ y(
1513
- h,
1277
+ }, uo = { W: "formWin", D: "formDraw", L: "formLoss" }, Le = ({ entry: e, side: t }) => {
1278
+ const { colors: o, radius: s } = O(), { entities: i, label: a, fmt: d } = Y(), [l, c] = A.useState(!1), { match: u, result: h } = e, f = { W: o.success, D: o.variant, L: o.danger }[h], C = t === "away" ? { right: n(-4) } : { left: n(-4) }, b = t === "away" ? { right: n(10) } : { left: n(10) }, [g, T] = u.fullTime ?? [0, 0], v = (P, _) => /* @__PURE__ */ y(
1279
+ m,
1514
1280
  {
1515
1281
  sx: {
1516
1282
  display: "flex",
1517
1283
  alignItems: "center",
1518
1284
  gap: n(6),
1519
1285
  minWidth: 0,
1520
- ...v ? { flexDirection: "row-reverse" } : {}
1286
+ ..._ ? { flexDirection: "row-reverse" } : {}
1521
1287
  },
1522
1288
  children: [
1523
- /* @__PURE__ */ r(j, { url: i.logo($), size: 22 }),
1524
- /* @__PURE__ */ r(S, { size: 12, weight: 600, ellipsis: !0, cms: !0, sx: v ? { textAlign: "end" } : void 0, children: i.name($) })
1289
+ /* @__PURE__ */ r(j, { url: i.logo(P), size: 22 }),
1290
+ /* @__PURE__ */ r(w, { size: 12, weight: 600, ellipsis: !0, cms: !0, sx: _ ? { textAlign: "end" } : void 0, children: i.name(P) })
1525
1291
  ]
1526
1292
  }
1527
1293
  );
1528
1294
  return /* @__PURE__ */ y(
1529
- h,
1295
+ m,
1530
1296
  {
1531
1297
  onMouseEnter: () => c(!0),
1532
1298
  onMouseLeave: () => c(!1),
1533
1299
  sx: { position: "relative", display: "flex" },
1534
1300
  children: [
1535
1301
  /* @__PURE__ */ r(
1536
- S,
1302
+ w,
1537
1303
  {
1538
1304
  size: 11,
1539
1305
  font: "secondary",
1540
1306
  weight: 700,
1541
- color: g === "D" ? o.body : o.onPrimary,
1307
+ color: h === "D" ? o.body : o.onPrimary,
1542
1308
  sx: {
1543
1309
  width: n(24, 11),
1544
1310
  height: n(24, 11),
@@ -1551,16 +1317,16 @@ const At = Rt("Tv", [
1551
1317
  outline: `2px solid ${l ? o.primary : "transparent"}`,
1552
1318
  outlineOffset: "1px"
1553
1319
  },
1554
- children: a(To[g])
1320
+ children: a(uo[h])
1555
1321
  }
1556
1322
  ),
1557
1323
  l ? /* @__PURE__ */ y(
1558
- h,
1324
+ m,
1559
1325
  {
1560
1326
  sx: {
1561
1327
  position: "absolute",
1562
1328
  bottom: `calc(100% + ${n(10)})`,
1563
- ...w,
1329
+ ...C,
1564
1330
  zIndex: 50,
1565
1331
  width: n(240),
1566
1332
  backgroundColor: o.surface,
@@ -1574,12 +1340,12 @@ const At = Rt("Tv", [
1574
1340
  pointerEvents: "none"
1575
1341
  },
1576
1342
  children: [
1577
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", weight: 500, color: o.dim, sx: { textAlign: "center" }, children: a("formMeta", {
1343
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", weight: 500, color: o.dim, sx: { textAlign: "center" }, children: a("formMeta", {
1578
1344
  round: u.round,
1579
1345
  date: d.date(u.start, { day: "numeric", month: "long", year: "numeric" })
1580
1346
  }) }),
1581
1347
  /* @__PURE__ */ y(
1582
- h,
1348
+ m,
1583
1349
  {
1584
1350
  sx: {
1585
1351
  display: "grid",
@@ -1588,14 +1354,14 @@ const At = Rt("Tv", [
1588
1354
  gap: n(8)
1589
1355
  },
1590
1356
  children: [
1591
- x(u.home.id, !1),
1592
- /* @__PURE__ */ r(S, { size: 15, weight: 700, sx: { whiteSpace: "nowrap", fontVariantNumeric: "tabular-nums" }, children: `${m} – ${I}` }),
1593
- x(u.away.id, !0)
1357
+ v(u.home.id, !1),
1358
+ /* @__PURE__ */ r(w, { size: 15, weight: 700, sx: { whiteSpace: "nowrap", fontVariantNumeric: "tabular-nums" }, children: `${g} – ${T}` }),
1359
+ v(u.away.id, !0)
1594
1360
  ]
1595
1361
  }
1596
1362
  ),
1597
1363
  /* @__PURE__ */ r(
1598
- h,
1364
+ m,
1599
1365
  {
1600
1366
  component: "span",
1601
1367
  sx: {
@@ -1613,12 +1379,12 @@ const At = Rt("Tv", [
1613
1379
  ]
1614
1380
  }
1615
1381
  );
1616
- }, $o = ({ match: e }) => {
1617
- var m, I;
1618
- const { colors: t } = W(), { data: o, entities: s, finished: i, tally: a, label: d, fmt: l } = K(), c = o.teamStats.get(e.home.id), u = o.teamStats.get(e.away.id), g = Zt(i, e), f = Le(i, e.home.id, e.start), w = Le(i, e.away.id, e.start), b = (x) => l.decimal(x, 1);
1619
- return /* @__PURE__ */ y(pe, { children: [
1382
+ }, po = ({ match: e }) => {
1383
+ var g, T;
1384
+ const { colors: t } = O(), { data: o, entities: s, finished: i, tally: a, label: d, fmt: l } = Y(), c = o.teamStats.get(e.home.id), u = o.teamStats.get(e.away.id), h = Kt(i, e), f = ze(i, e.home.id, e.start), C = ze(i, e.away.id, e.start), b = (v) => l.decimal(v, 1);
1385
+ return /* @__PURE__ */ y(ye, { children: [
1620
1386
  /* @__PURE__ */ y(
1621
- h,
1387
+ m,
1622
1388
  {
1623
1389
  sx: {
1624
1390
  display: "grid",
@@ -1629,7 +1395,7 @@ const At = Rt("Tv", [
1629
1395
  children: [
1630
1396
  /* @__PURE__ */ r(j, { url: s.logo(e.home.id), size: 30, sx: { justifySelf: "end" } }),
1631
1397
  /* @__PURE__ */ y(
1632
- h,
1398
+ m,
1633
1399
  {
1634
1400
  sx: {
1635
1401
  gridColumn: 2,
@@ -1639,9 +1405,9 @@ const At = Rt("Tv", [
1639
1405
  gap: n(12)
1640
1406
  },
1641
1407
  children: [
1642
- /* @__PURE__ */ r(h, { sx: { display: "flex", gap: n(4) }, children: f.map((x) => /* @__PURE__ */ r(Pe, { entry: x, side: "home" }, x.match.id)) }),
1643
- /* @__PURE__ */ r(S, { size: 10, font: "secondary", upper: !0, color: t.dim, sx: { textAlign: "center" }, children: d("formLast5") }),
1644
- /* @__PURE__ */ r(h, { sx: { display: "flex", gap: n(4) }, children: w.map((x) => /* @__PURE__ */ r(Pe, { entry: x, side: "away" }, x.match.id)) })
1408
+ /* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: f.map((v) => /* @__PURE__ */ r(Le, { entry: v, side: "home" }, v.match.id)) }),
1409
+ /* @__PURE__ */ r(w, { size: 10, font: "secondary", upper: !0, color: t.dim, sx: { textAlign: "center" }, children: d("formLast5") }),
1410
+ /* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(4) }, children: C.map((v) => /* @__PURE__ */ r(Le, { entry: v, side: "away" }, v.match.id)) })
1645
1411
  ]
1646
1412
  }
1647
1413
  ),
@@ -1656,13 +1422,13 @@ const At = Rt("Tv", [
1656
1422
  ]
1657
1423
  }
1658
1424
  ),
1659
- /* @__PURE__ */ r(F, { label: d("wins"), home: (c == null ? void 0 : c.won) ?? null, away: (u == null ? void 0 : u.won) ?? null }),
1660
- /* @__PURE__ */ r(F, { label: d("draws"), home: (c == null ? void 0 : c.draw) ?? null, away: (u == null ? void 0 : u.draw) ?? null }),
1661
- /* @__PURE__ */ r(F, { label: d("losses"), home: (c == null ? void 0 : c.lost) ?? null, away: (u == null ? void 0 : u.lost) ?? null }),
1662
- /* @__PURE__ */ r(F, { label: d("goalsScored"), home: (c == null ? void 0 : c.goalsScored) ?? null, away: (u == null ? void 0 : u.goalsScored) ?? null }),
1663
- /* @__PURE__ */ r(F, { label: d("goalsConceded"), home: (c == null ? void 0 : c.goalsAllowed) ?? null, away: (u == null ? void 0 : u.goalsAllowed) ?? null }),
1425
+ /* @__PURE__ */ r(B, { label: d("wins"), home: (c == null ? void 0 : c.won) ?? null, away: (u == null ? void 0 : u.won) ?? null }),
1426
+ /* @__PURE__ */ r(B, { label: d("draws"), home: (c == null ? void 0 : c.draw) ?? null, away: (u == null ? void 0 : u.draw) ?? null }),
1427
+ /* @__PURE__ */ r(B, { label: d("losses"), home: (c == null ? void 0 : c.lost) ?? null, away: (u == null ? void 0 : u.lost) ?? null }),
1428
+ /* @__PURE__ */ r(B, { label: d("goalsScored"), home: (c == null ? void 0 : c.goalsScored) ?? null, away: (u == null ? void 0 : u.goalsScored) ?? null }),
1429
+ /* @__PURE__ */ r(B, { label: d("goalsConceded"), home: (c == null ? void 0 : c.goalsAllowed) ?? null, away: (u == null ? void 0 : u.goalsAllowed) ?? null }),
1664
1430
  /* @__PURE__ */ r(
1665
- F,
1431
+ B,
1666
1432
  {
1667
1433
  label: d("goalsPerMatch"),
1668
1434
  home: (c == null ? void 0 : c.avgTotalGoals) != null ? Number(c.avgTotalGoals.toFixed(1)) : null,
@@ -1670,73 +1436,77 @@ const At = Rt("Tv", [
1670
1436
  format: b
1671
1437
  }
1672
1438
  ),
1673
- /* @__PURE__ */ r(F, { label: d("homeAwayWins"), home: (c == null ? void 0 : c.homeWon) ?? null, away: (u == null ? void 0 : u.awayWon) ?? null }),
1439
+ /* @__PURE__ */ r(B, { label: d("homeAwayWins"), home: (c == null ? void 0 : c.homeWon) ?? null, away: (u == null ? void 0 : u.awayWon) ?? null }),
1674
1440
  /* @__PURE__ */ r(
1675
- F,
1441
+ B,
1676
1442
  {
1677
1443
  label: d("cleanSheets"),
1678
- home: ((m = a.get(e.home.id)) == null ? void 0 : m.cleanSheets) ?? 0,
1679
- away: ((I = a.get(e.away.id)) == null ? void 0 : I.cleanSheets) ?? 0
1444
+ home: ((g = a.get(e.home.id)) == null ? void 0 : g.cleanSheets) ?? 0,
1445
+ away: ((T = a.get(e.away.id)) == null ? void 0 : T.cleanSheets) ?? 0
1680
1446
  }
1681
1447
  ),
1682
- g != null && g.fullTime ? /* @__PURE__ */ y(S, { component: "div", size: 11, font: "secondary", color: t.dim, children: [
1448
+ h != null && h.fullTime ? /* @__PURE__ */ y(w, { component: "div", size: 11, font: "secondary", color: t.dim, children: [
1683
1449
  d("previousMeeting"),
1684
1450
  " ",
1685
- /* @__PURE__ */ y(h, { component: "b", sx: { color: t.text }, children: [
1686
- /* @__PURE__ */ r(h, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(g.home.id) }),
1451
+ /* @__PURE__ */ y(m, { component: "b", sx: { color: t.text }, children: [
1452
+ /* @__PURE__ */ r(m, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(h.home.id) }),
1687
1453
  " ",
1688
- `${g.fullTime[0]}:${g.fullTime[1]}`,
1454
+ `${h.fullTime[0]}:${h.fullTime[1]}`,
1689
1455
  " ",
1690
- /* @__PURE__ */ r(h, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(g.away.id) }),
1456
+ /* @__PURE__ */ r(m, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(h.away.id) }),
1691
1457
  " ",
1692
- d("previousMeetingRound", { round: g.round })
1458
+ d("previousMeetingRound", { round: h.round })
1693
1459
  ] })
1694
1460
  ] }) : null
1695
1461
  ] });
1696
- }, _o = ({ match: e, odds: t, open: o, onToggle: s }) => {
1697
- var H, G;
1698
- const { colors: i, radius: a } = W(), { entities: d, label: l, fmt: c, props: u } = K(), g = (H = u.callbacks) == null ? void 0 : H.onBroadcastClick, f = e.status === "FINISHED", w = e.status === "LIVE", [b, m] = e.fullTime ?? [0, 0], I = f && b > m, x = f && m > b, $ = f && b === m, v = e.status === "CANCELLED", E = !v, D = !f && !v, M = w ? e.liveMinute !== null ? l("liveMinute", { minute: e.liveMinute }) : e.isHalfTime ? l("halfTimeShort") : l("live") : c.time(e.start), A = xe(), L = (u.showOdds ?? !1) && !A && (e.status === "UPCOMING" || w), T = t ? /* @__PURE__ */ r(
1699
- ko,
1462
+ }, mo = ({ match: e, odds: t, open: o, onToggle: s }) => {
1463
+ var H, U, p, I, S;
1464
+ const { colors: i, radius: a } = O(), { entities: d, label: l, fmt: c, props: u } = Y(), h = (H = u.callbacks) == null ? void 0 : H.onBroadcastClick, f = e.status === "FINISHED", C = e.status === "LIVE", [b, g] = e.fullTime ?? [0, 0], T = f && b > g, v = f && g > b, P = f && b === g, _ = e.status === "CANCELLED", z = !_, D = !f && !_, R = C ? e.liveMinute !== null ? l("liveMinute", { minute: e.liveMinute }) : e.isHalfTime ? l("halfTimeShort") : l("live") : c.time(e.start), M = xe(), E = (u.showOdds ?? !1) && !M && (e.status === "UPCOMING" || C), $ = t ? /* @__PURE__ */ r(
1465
+ Ct,
1700
1466
  {
1701
1467
  odds: t,
1702
- config: u.odds,
1703
- onAddToBetslip: (G = u.callbacks) == null ? void 0 : G.onAddToBetslip
1468
+ market: ((U = u.odds) == null ? void 0 : U.market) ?? "FT_1X2",
1469
+ size: "compact",
1470
+ bare: !0,
1471
+ mode: ((p = u.odds) == null ? void 0 : p.mode) ?? "default",
1472
+ flashInterval: (I = u.odds) == null ? void 0 : I.flashInterval,
1473
+ onSelect: (S = u.callbacks) == null ? void 0 : S.onAddToBetslip
1704
1474
  }
1705
- ) : null, R = {
1475
+ ) : null, k = {
1706
1476
  // A price click must not toggle the row.
1707
- onClick: (p) => p.stopPropagation(),
1708
- onKeyDown: (p) => p.stopPropagation()
1709
- }, O = (p, _, k, V) => /* @__PURE__ */ r(
1710
- S,
1477
+ onClick: (W) => W.stopPropagation(),
1478
+ onKeyDown: (W) => W.stopPropagation()
1479
+ }, F = (W, K, ne, X) => /* @__PURE__ */ r(
1480
+ w,
1711
1481
  {
1712
1482
  size: 14,
1713
- weight: _ ? 700 : 500,
1714
- color: k && !$ ? i.dim : i.text,
1483
+ weight: K ? 700 : 500,
1484
+ color: ne && !P ? i.dim : i.text,
1715
1485
  ellipsis: !0,
1716
1486
  cms: !0,
1717
- sx: V ? { textAlign: "right" } : void 0,
1718
- children: d.name(p)
1487
+ sx: X ? { textAlign: "right" } : void 0,
1488
+ children: d.name(W)
1719
1489
  }
1720
1490
  );
1721
- return /* @__PURE__ */ y(h, { sx: { borderBottom: `1px solid ${i.border}` }, children: [
1491
+ return /* @__PURE__ */ y(m, { sx: { borderBottom: `1px solid ${i.border}` }, children: [
1722
1492
  /* @__PURE__ */ y(
1723
- h,
1493
+ m,
1724
1494
  {
1725
- ...E ? {
1495
+ ...z ? {
1726
1496
  role: "button",
1727
1497
  "aria-expanded": o,
1728
1498
  tabIndex: 0,
1729
1499
  onClick: s,
1730
- onKeyDown: (p) => {
1731
- (p.key === "Enter" || p.key === " ") && (p.preventDefault(), s());
1500
+ onKeyDown: (W) => {
1501
+ (W.key === "Enter" || W.key === " ") && (W.preventDefault(), s());
1732
1502
  }
1733
1503
  } : {},
1734
1504
  sx: {
1735
1505
  display: "grid",
1736
1506
  gridTemplateColumns: [
1737
- D ? n(g ? 80 : 60) : null,
1507
+ D ? n(h ? 80 : 60) : null,
1738
1508
  "minmax(0,1fr) auto minmax(0,1fr)",
1739
- L ? n(300) : null,
1509
+ E ? n(300) : null,
1740
1510
  n(20)
1741
1511
  ].filter(Boolean).join(" "),
1742
1512
  alignItems: "center",
@@ -1744,11 +1514,11 @@ const At = Rt("Tv", [
1744
1514
  rowGap: n(6),
1745
1515
  // Minus the 3px accent border, so the rail lines up with the day header's text.
1746
1516
  padding: `${n(6)} ${n(16)} ${n(6)} calc(${n(16)} - 3px)`,
1747
- cursor: E ? "pointer" : "default",
1517
+ cursor: z ? "pointer" : "default",
1748
1518
  backgroundColor: o ? i.onSurface : "transparent",
1749
- borderLeft: `3px solid ${w ? i.danger : "transparent"}`,
1519
+ borderLeft: `3px solid ${C ? i.danger : "transparent"}`,
1750
1520
  // Not onSurface: that is the day-header fill, so a hovered row would merge into it.
1751
- ...E ? {
1521
+ ...z ? {
1752
1522
  "&:hover": {
1753
1523
  backgroundColor: o ? i.onSurface : i.tint
1754
1524
  }
@@ -1756,7 +1526,7 @@ const At = Rt("Tv", [
1756
1526
  },
1757
1527
  children: [
1758
1528
  D ? /* @__PURE__ */ y(
1759
- h,
1529
+ m,
1760
1530
  {
1761
1531
  sx: {
1762
1532
  display: "flex",
@@ -1765,8 +1535,8 @@ const At = Rt("Tv", [
1765
1535
  whiteSpace: "nowrap"
1766
1536
  },
1767
1537
  children: [
1768
- w ? /* @__PURE__ */ r(
1769
- h,
1538
+ C ? /* @__PURE__ */ r(
1539
+ m,
1770
1540
  {
1771
1541
  component: "span",
1772
1542
  sx: {
@@ -1779,26 +1549,26 @@ const At = Rt("Tv", [
1779
1549
  }
1780
1550
  ) : null,
1781
1551
  /* @__PURE__ */ r(
1782
- S,
1552
+ w,
1783
1553
  {
1784
1554
  size: 13,
1785
1555
  font: "secondary",
1786
1556
  weight: 700,
1787
- color: w ? i.danger : i.text,
1788
- children: M
1557
+ color: C ? i.danger : i.text,
1558
+ children: R
1789
1559
  }
1790
1560
  ),
1791
- g && e.status === "UPCOMING" ? /* @__PURE__ */ r(
1792
- h,
1561
+ h && e.status === "UPCOMING" ? /* @__PURE__ */ r(
1562
+ m,
1793
1563
  {
1794
1564
  component: "button",
1795
1565
  type: "button",
1796
1566
  "aria-label": l("watchOnTv"),
1797
1567
  title: l("watchOnTv"),
1798
- onClick: (p) => {
1799
- p.stopPropagation(), g(e.id);
1568
+ onClick: (W) => {
1569
+ W.stopPropagation(), h(e.id);
1800
1570
  },
1801
- onKeyDown: (p) => p.stopPropagation(),
1571
+ onKeyDown: (W) => W.stopPropagation(),
1802
1572
  sx: {
1803
1573
  display: "inline-flex",
1804
1574
  alignItems: "center",
@@ -1811,14 +1581,14 @@ const At = Rt("Tv", [
1811
1581
  color: i.dim,
1812
1582
  "&:hover": { color: i.primary }
1813
1583
  },
1814
- children: /* @__PURE__ */ r(At, { size: "1em", "aria-hidden": !0 })
1584
+ children: /* @__PURE__ */ r($t, { size: "1em", "aria-hidden": !0 })
1815
1585
  }
1816
1586
  ) : null
1817
1587
  ]
1818
1588
  }
1819
1589
  ) : null,
1820
1590
  /* @__PURE__ */ y(
1821
- h,
1591
+ m,
1822
1592
  {
1823
1593
  sx: {
1824
1594
  display: "flex",
@@ -1828,13 +1598,13 @@ const At = Rt("Tv", [
1828
1598
  minWidth: 0
1829
1599
  },
1830
1600
  children: [
1831
- O(e.home.id, I, x, !0),
1601
+ F(e.home.id, T, v, !0),
1832
1602
  /* @__PURE__ */ r(j, { url: d.logo(e.home.id), size: 24 })
1833
1603
  ]
1834
1604
  }
1835
1605
  ),
1836
1606
  /* @__PURE__ */ y(
1837
- h,
1607
+ m,
1838
1608
  {
1839
1609
  sx: {
1840
1610
  display: "flex",
@@ -1843,8 +1613,8 @@ const At = Rt("Tv", [
1843
1613
  minWidth: n(56)
1844
1614
  },
1845
1615
  children: [
1846
- v && e.notPlayedReason ? /* @__PURE__ */ r(
1847
- S,
1616
+ _ && e.notPlayedReason ? /* @__PURE__ */ r(
1617
+ w,
1848
1618
  {
1849
1619
  size: 11,
1850
1620
  font: "secondary",
@@ -1860,23 +1630,23 @@ const At = Rt("Tv", [
1860
1630
  children: l(e.notPlayedReason)
1861
1631
  }
1862
1632
  ) : /* @__PURE__ */ r(
1863
- S,
1633
+ w,
1864
1634
  {
1865
1635
  size: 15,
1866
1636
  weight: 700,
1867
1637
  color: i.text,
1868
1638
  sx: {
1869
1639
  letterSpacing: n(1, 15),
1870
- backgroundColor: f || w ? i.onSurface : "transparent",
1640
+ backgroundColor: f || C ? i.onSurface : "transparent",
1871
1641
  borderRadius: a.sm,
1872
1642
  padding: `${n(3, 15)} ${n(8, 15)}`,
1873
1643
  whiteSpace: "nowrap"
1874
1644
  },
1875
- children: f || w ? `${b} : ${m}` : "–"
1645
+ children: f || C ? `${b} : ${g}` : "–"
1876
1646
  }
1877
1647
  ),
1878
- (f || w) && e.halfTime ? /* @__PURE__ */ r(
1879
- S,
1648
+ (f || C) && e.halfTime ? /* @__PURE__ */ r(
1649
+ w,
1880
1650
  {
1881
1651
  size: 10,
1882
1652
  font: "secondary",
@@ -1889,7 +1659,7 @@ const At = Rt("Tv", [
1889
1659
  }
1890
1660
  ),
1891
1661
  /* @__PURE__ */ y(
1892
- h,
1662
+ m,
1893
1663
  {
1894
1664
  sx: {
1895
1665
  display: "flex",
@@ -1899,13 +1669,13 @@ const At = Rt("Tv", [
1899
1669
  },
1900
1670
  children: [
1901
1671
  /* @__PURE__ */ r(j, { url: d.logo(e.away.id), size: 24 }),
1902
- O(e.away.id, x, I, !1)
1672
+ F(e.away.id, v, T, !1)
1903
1673
  ]
1904
1674
  }
1905
1675
  ),
1906
- L ? /* @__PURE__ */ r(h, { ...R, sx: { minWidth: 0, cursor: "default" }, children: T }) : null,
1676
+ E ? /* @__PURE__ */ r(m, { ...k, sx: { minWidth: 0, cursor: "default" }, children: $ }) : null,
1907
1677
  /* @__PURE__ */ r(
1908
- h,
1678
+ m,
1909
1679
  {
1910
1680
  component: "svg",
1911
1681
  viewBox: "0 0 24 24",
@@ -1919,31 +1689,31 @@ const At = Rt("Tv", [
1919
1689
  height: n(16),
1920
1690
  color: i.dim,
1921
1691
  // Hidden, not removed, so the teams stay aligned with the expandable rows.
1922
- visibility: E ? "visible" : "hidden",
1692
+ visibility: z ? "visible" : "hidden",
1923
1693
  transform: o ? "rotate(180deg)" : "rotate(0)",
1924
1694
  transition: "transform .2s"
1925
1695
  },
1926
1696
  children: /* @__PURE__ */ r("path", { d: "m6 9 6 6 6-6" })
1927
1697
  }
1928
1698
  ),
1929
- T && !L ? /* @__PURE__ */ r(
1930
- h,
1699
+ $ && !E ? /* @__PURE__ */ r(
1700
+ m,
1931
1701
  {
1932
- ...R,
1702
+ ...k,
1933
1703
  sx: {
1934
1704
  gridColumn: D ? "2 / 5" : "1 / 4",
1935
1705
  display: "flex",
1936
1706
  justifyContent: "center",
1937
1707
  cursor: "default"
1938
1708
  },
1939
- children: /* @__PURE__ */ r(h, { sx: { width: "100%", maxWidth: n(300) }, children: T })
1709
+ children: /* @__PURE__ */ r(m, { sx: { width: "100%", maxWidth: n(300) }, children: $ })
1940
1710
  }
1941
1711
  ) : null
1942
1712
  ]
1943
1713
  }
1944
1714
  ),
1945
- o && E ? /* @__PURE__ */ r(
1946
- h,
1715
+ o && z ? /* @__PURE__ */ r(
1716
+ m,
1947
1717
  {
1948
1718
  sx: {
1949
1719
  padding: `${n(6)} ${n(16)} ${n(16)}`,
@@ -1953,57 +1723,54 @@ const At = Rt("Tv", [
1953
1723
  backgroundColor: i.onSurface,
1954
1724
  borderTop: `1px solid ${i.border}`
1955
1725
  },
1956
- children: f || w ? /* @__PURE__ */ r(Io, { match: e }) : /* @__PURE__ */ r($o, { match: e })
1726
+ children: f || C ? /* @__PURE__ */ r(co, { match: e }) : /* @__PURE__ */ r(po, { match: e })
1957
1727
  }
1958
1728
  ) : null
1959
1729
  ] });
1960
- }, We = (e, t) => e.start.localeCompare(t.start), Eo = (e) => e.status === "UPCOMING" || e.status === "LIVE", Ro = () => {
1961
- var ve, ke, Te, $e, _e;
1962
- const { colors: e, radius: t, fonts: o } = W(), { sdk: s, data: i, entities: a, label: d, fmt: l, props: c } = K(), [u, g] = z.useState("upcoming"), [f, w] = z.useState(null), [b, m] = z.useState(null), [I, x] = z.useState(null), [$, v] = z.useState(null), [E, D] = z.useState(null), M = u === "upcoming", A = (C) => Eo(C) === M, L = i.matches.filter(A).sort(We), T = i.stages.filter(
1963
- (C) => L.some((P) => P.stageId === C.id)
1964
- ), R = M ? T : [...T].reverse(), O = R.length > 1, H = M ? f : b, G = (ve = M ? L[0] : L[L.length - 1]) == null ? void 0 : ve.stageId, p = O ? R.some((C) => C.id === H) ? H : G ?? R[0].id : null, _ = (C) => !O || C.stageId === p, k = Array.from(
1965
- new Set(L.filter(_).map((C) => C.round))
1966
- ).sort((C, P) => C - P), V = M ? k : [...k].reverse(), q = M ? I : $, Ce = q !== null && k.includes(q) ? q : M ? k[0] : k[k.length - 1], ee = i.matches.filter((C) => C.round === Ce && _(C)).sort(We), te = ee.filter(A), Xe = z.useMemo(
1967
- () => te.filter((C) => C.status === "UPCOMING" || C.status === "LIVE").map((C) => C.id),
1968
- [te]
1969
- ), qe = z.useMemo(
1970
- () => te.filter((C) => C.status === "LIVE").map((C) => C.id),
1971
- [te]
1972
- ), Je = bo(s, Xe, {
1730
+ }, Pe = (e, t) => e.start.localeCompare(t.start), ho = (e) => e.status === "UPCOMING" || e.status === "LIVE", go = () => {
1731
+ var ve, Ie, $e, Te, ke, _e;
1732
+ const { colors: e, radius: t, fonts: o } = O(), { sdk: s, data: i, entities: a, label: d, fmt: l, props: c } = Y(), [u, h] = A.useState("upcoming"), [f, C] = A.useState(null), [b, g] = A.useState(null), [T, v] = A.useState(null), [P, _] = A.useState(null), [z, D] = A.useState(null), R = u === "upcoming", M = (x) => ho(x) === R, E = i.matches.filter(M).sort(Pe), $ = i.stages.filter(
1733
+ (x) => E.some((L) => L.stageId === x.id)
1734
+ ), k = R ? $ : [...$].reverse(), F = k.length > 1, H = R ? f : b, U = (ve = R ? E[0] : E[E.length - 1]) == null ? void 0 : ve.stageId, p = F ? k.some((x) => x.id === H) ? H : U ?? k[0].id : null, I = (x) => !F || x.stageId === p, S = Array.from(
1735
+ new Set(E.filter(I).map((x) => x.round))
1736
+ ).sort((x, L) => x - L), W = R ? S : [...S].reverse(), K = R ? T : P, ne = K !== null && S.includes(K) ? K : R ? S[0] : S[S.length - 1], X = i.matches.filter((x) => x.round === ne && I(x)).sort(Pe), re = X.filter(M), Ve = A.useMemo(
1737
+ () => re.filter((x) => x.status === "UPCOMING" || x.status === "LIVE").map((x) => x.id),
1738
+ [re]
1739
+ ), { odds: Ye } = St(s, Ve, {
1973
1740
  enabled: c.showOdds ?? !1,
1974
- liveMatchIds: qe,
1741
+ markets: [((Ie = c.odds) == null ? void 0 : Ie.market) ?? "FT_1X2"],
1975
1742
  sport: i.sport,
1976
- pollingIntervalMs: (ke = c.odds) == null ? void 0 : ke.pollingInterval,
1743
+ pollingIntervalMs: ($e = c.odds) == null ? void 0 : $e.pollingInterval,
1977
1744
  operators: (Te = c.odds) == null ? void 0 : Te.operators,
1978
- affiliateId: ($e = c.odds) == null ? void 0 : $e.affiliateId,
1745
+ affiliateId: (ke = c.odds) == null ? void 0 : ke.affiliateId,
1979
1746
  affiliateIds: (_e = c.odds) == null ? void 0 : _e.affiliateIds
1980
- }), Se = (C) => l.date(C, { day: "numeric", month: "short" }), Qe = ee.length ? d("roundSummary", {
1981
- from: Se(ee[0].start),
1982
- to: Se(ee[ee.length - 1].start),
1983
- matches: d("matchesCount", { count: ee.length })
1984
- }) : "", me = [];
1985
- te.forEach((C) => {
1986
- const P = l.date(C.start, {
1747
+ }), Ce = (x) => l.date(x, { day: "numeric", month: "short" }), Xe = X.length ? d("roundSummary", {
1748
+ from: Ce(X[0].start),
1749
+ to: Ce(X[X.length - 1].start),
1750
+ matches: d("matchesCount", { count: X.length })
1751
+ }) : "", ue = [];
1752
+ re.forEach((x) => {
1753
+ const L = l.date(x.start, {
1987
1754
  weekday: "long",
1988
1755
  day: "numeric",
1989
1756
  month: "long"
1990
- }), Ee = me.find((nt) => nt.label === P);
1991
- Ee ? Ee.rows.push(C) : me.push({ label: P, rows: [C] });
1757
+ }), Re = ue.find((et) => et.label === L);
1758
+ Re ? Re.rows.push(x) : ue.push({ label: L, rows: [x] });
1992
1759
  });
1993
- const Ze = (C) => {
1994
- g(C), D(null);
1995
- }, et = (C) => {
1996
- M ? x(C) : v(C), D(null);
1997
- }, tt = (C) => {
1998
- M ? (w(C), x(null)) : (m(C), v(null)), D(null);
1999
- }, ot = (C) => C.nameId && a.has(C.nameId) ? a.name(C.nameId) : d("stage", { number: i.stages.indexOf(C) + 1 }), Ie = (C) => {
2000
- const P = u === C;
1760
+ const qe = (x) => {
1761
+ h(x), D(null);
1762
+ }, Je = (x) => {
1763
+ R ? v(x) : _(x), D(null);
1764
+ }, Qe = (x) => {
1765
+ R ? (C(x), v(null)) : (g(x), _(null)), D(null);
1766
+ }, Ze = (x) => x.nameId && a.has(x.nameId) ? a.name(x.nameId) : d("stage", { number: i.stages.indexOf(x) + 1 }), Se = (x) => {
1767
+ const L = u === x;
2001
1768
  return /* @__PURE__ */ r(
2002
- h,
1769
+ m,
2003
1770
  {
2004
1771
  component: "button",
2005
1772
  type: "button",
2006
- onClick: () => Ze(C),
1773
+ onClick: () => qe(x),
2007
1774
  sx: {
2008
1775
  border: "none",
2009
1776
  cursor: "pointer",
@@ -2012,17 +1779,17 @@ const At = Rt("Tv", [
2012
1779
  fontFamily: o.primary,
2013
1780
  fontSize: n(13),
2014
1781
  fontWeight: 700,
2015
- backgroundColor: P ? e.surface : "transparent",
2016
- color: P ? e.text : e.dim,
2017
- boxShadow: P ? "0 1px 2px rgba(0,0,0,.12)" : "none"
1782
+ backgroundColor: L ? e.surface : "transparent",
1783
+ color: L ? e.text : e.dim,
1784
+ boxShadow: L ? "0 1px 2px rgba(0,0,0,.12)" : "none"
2018
1785
  },
2019
- children: d(C)
1786
+ children: d(x)
2020
1787
  }
2021
1788
  );
2022
1789
  };
2023
1790
  return /* @__PURE__ */ y(Z, { sx: { overflow: "hidden" }, children: [
2024
1791
  /* @__PURE__ */ y(
2025
- h,
1792
+ m,
2026
1793
  {
2027
1794
  sx: {
2028
1795
  display: "flex",
@@ -2035,7 +1802,7 @@ const At = Rt("Tv", [
2035
1802
  },
2036
1803
  children: [
2037
1804
  /* @__PURE__ */ y(
2038
- h,
1805
+ m,
2039
1806
  {
2040
1807
  sx: {
2041
1808
  display: "flex",
@@ -2045,19 +1812,19 @@ const At = Rt("Tv", [
2045
1812
  borderRadius: t.full
2046
1813
  },
2047
1814
  children: [
2048
- Ie("upcoming"),
2049
- Ie("results")
1815
+ Se("upcoming"),
1816
+ Se("results")
2050
1817
  ]
2051
1818
  }
2052
1819
  ),
2053
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", color: e.dim, children: Qe })
1820
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.dim, children: Xe })
2054
1821
  ]
2055
1822
  }
2056
1823
  ),
2057
- O ? (
1824
+ F ? (
2058
1825
  // Pills styled like the Standings stage tabs.
2059
1826
  /* @__PURE__ */ r(
2060
- h,
1827
+ m,
2061
1828
  {
2062
1829
  role: "tablist",
2063
1830
  sx: {
@@ -2069,16 +1836,16 @@ const At = Rt("Tv", [
2069
1836
  scrollbarWidth: "none",
2070
1837
  "&::-webkit-scrollbar": { display: "none" }
2071
1838
  },
2072
- children: R.map((C) => {
2073
- const P = C.id === p;
1839
+ children: k.map((x) => {
1840
+ const L = x.id === p;
2074
1841
  return /* @__PURE__ */ r(
2075
- h,
1842
+ m,
2076
1843
  {
2077
1844
  component: "button",
2078
1845
  type: "button",
2079
1846
  role: "tab",
2080
- "aria-selected": P,
2081
- onClick: () => tt(C.id),
1847
+ "aria-selected": L,
1848
+ onClick: () => Qe(x.id),
2082
1849
  sx: {
2083
1850
  flexShrink: 0,
2084
1851
  border: "none",
@@ -2093,20 +1860,20 @@ const At = Rt("Tv", [
2093
1860
  letterSpacing: "0.025em",
2094
1861
  whiteSpace: "nowrap",
2095
1862
  unicodeBidi: "plaintext",
2096
- backgroundColor: P ? e.primary : "transparent",
2097
- color: P ? e.onPrimary : e.dim,
2098
- "&:hover": P ? {} : { backgroundColor: e.variant, color: e.primary }
1863
+ backgroundColor: L ? e.primary : "transparent",
1864
+ color: L ? e.onPrimary : e.dim,
1865
+ "&:hover": L ? {} : { backgroundColor: e.variant, color: e.primary }
2099
1866
  },
2100
- children: ot(C)
1867
+ children: Ze(x)
2101
1868
  },
2102
- C.id
1869
+ x.id
2103
1870
  );
2104
1871
  })
2105
1872
  }
2106
1873
  )
2107
1874
  ) : null,
2108
- V.length > (O ? 1 : 0) ? /* @__PURE__ */ r(
2109
- h,
1875
+ W.length > (F ? 1 : 0) ? /* @__PURE__ */ r(
1876
+ m,
2110
1877
  {
2111
1878
  sx: {
2112
1879
  display: "flex",
@@ -2117,37 +1884,37 @@ const At = Rt("Tv", [
2117
1884
  scrollbarWidth: "none",
2118
1885
  "&::-webkit-scrollbar": { display: "none" }
2119
1886
  },
2120
- children: V.map((C) => {
2121
- const P = C === Ce;
1887
+ children: W.map((x) => {
1888
+ const L = x === ne;
2122
1889
  return /* @__PURE__ */ r(
2123
- h,
1890
+ m,
2124
1891
  {
2125
1892
  component: "button",
2126
1893
  type: "button",
2127
- onClick: () => et(C),
1894
+ onClick: () => Je(x),
2128
1895
  sx: {
2129
1896
  flexShrink: 0,
2130
- border: `1px solid ${P ? e.primary : e.border}`,
1897
+ border: `1px solid ${L ? e.primary : e.border}`,
2131
1898
  cursor: "pointer",
2132
1899
  borderRadius: t.full,
2133
1900
  padding: `${n(5, 12)} ${n(12, 12)}`,
2134
1901
  fontFamily: o.secondary,
2135
1902
  fontSize: n(12),
2136
1903
  fontWeight: 700,
2137
- backgroundColor: P ? e.primary : e.surface,
2138
- color: P ? e.onPrimary : e.body,
1904
+ backgroundColor: L ? e.primary : e.surface,
1905
+ color: L ? e.onPrimary : e.body,
2139
1906
  whiteSpace: "nowrap"
2140
1907
  },
2141
- children: d("round", { round: C })
1908
+ children: d("round", { round: x })
2142
1909
  },
2143
- C
1910
+ x
2144
1911
  );
2145
1912
  })
2146
1913
  }
2147
1914
  ) : null,
2148
- me.map((C) => /* @__PURE__ */ y(z.Fragment, { children: [
1915
+ ue.map((x) => /* @__PURE__ */ y(A.Fragment, { children: [
2149
1916
  /* @__PURE__ */ r(
2150
- S,
1917
+ w,
2151
1918
  {
2152
1919
  component: "div",
2153
1920
  size: 11,
@@ -2159,33 +1926,33 @@ const At = Rt("Tv", [
2159
1926
  padding: `${n(8, 11)} ${n(16, 11)} ${n(4, 11)}`,
2160
1927
  backgroundColor: e.onSurface
2161
1928
  },
2162
- children: C.label
1929
+ children: x.label
2163
1930
  }
2164
1931
  ),
2165
- C.rows.map((P) => /* @__PURE__ */ r(
2166
- _o,
1932
+ x.rows.map((L) => /* @__PURE__ */ r(
1933
+ mo,
2167
1934
  {
2168
- match: P,
2169
- odds: Je.get(P.id) ?? null,
2170
- open: E === P.id,
2171
- onToggle: () => D(E === P.id ? null : P.id)
1935
+ match: L,
1936
+ odds: Ye.get(L.id) ?? null,
1937
+ open: z === L.id,
1938
+ onToggle: () => D(z === L.id ? null : L.id)
2172
1939
  },
2173
- P.id
1940
+ L.id
2174
1941
  ))
2175
- ] }, C.label)),
2176
- te.length === 0 ? /* @__PURE__ */ r(
2177
- S,
1942
+ ] }, x.label)),
1943
+ re.length === 0 ? /* @__PURE__ */ r(
1944
+ w,
2178
1945
  {
2179
1946
  component: "div",
2180
1947
  size: 14,
2181
1948
  font: "secondary",
2182
1949
  color: e.dim,
2183
1950
  sx: { padding: n(24, 14), textAlign: "center" },
2184
- children: L.length > 0 ? d("noMatches") : d(M ? "noUpcomingMatches" : "noResultsYet")
1951
+ children: E.length > 0 ? d("noMatches") : d(R ? "noUpcomingMatches" : "noResultsYet")
2185
1952
  }
2186
1953
  ) : null
2187
1954
  ] });
2188
- }, Oe = ["1-15'", "16-30'", "31-45'", "46-60'", "61-75'", "76-90'"], fe = `repeat(auto-fit,minmax(${n(280)},1fr))`, se = ({ children: e }) => /* @__PURE__ */ r(
1955
+ }, De = ["1-15'", "16-30'", "31-45'", "46-60'", "61-75'", "76-90'"], ge = `repeat(auto-fit,minmax(${n(280)},1fr))`, se = ({ children: e }) => /* @__PURE__ */ r(
2189
1956
  Z,
2190
1957
  {
2191
1958
  sx: {
@@ -2196,13 +1963,13 @@ const At = Rt("Tv", [
2196
1963
  },
2197
1964
  children: e
2198
1965
  }
2199
- ), Ne = ({
1966
+ ), We = ({
2200
1967
  widths: e,
2201
1968
  height: t
2202
1969
  }) => {
2203
- const { radius: o } = W();
1970
+ const { radius: o } = O();
2204
1971
  return /* @__PURE__ */ r(
2205
- h,
1972
+ m,
2206
1973
  {
2207
1974
  sx: {
2208
1975
  display: "flex",
@@ -2211,7 +1978,7 @@ const At = Rt("Tv", [
2211
1978
  overflow: "hidden",
2212
1979
  gap: "2px"
2213
1980
  },
2214
- children: e.map((s, i) => /* @__PURE__ */ r(h, { sx: { width: `${s.w}%`, backgroundColor: s.color } }, i))
1981
+ children: e.map((s, i) => /* @__PURE__ */ r(m, { sx: { width: `${s.w}%`, backgroundColor: s.color } }, i))
2215
1982
  }
2216
1983
  );
2217
1984
  }, ie = ({
@@ -2219,9 +1986,9 @@ const At = Rt("Tv", [
2219
1986
  caption: t,
2220
1987
  children: o
2221
1988
  }) => {
2222
- const { colors: s, radius: i } = W();
1989
+ const { colors: s, radius: i } = O();
2223
1990
  return /* @__PURE__ */ y(
2224
- h,
1991
+ m,
2225
1992
  {
2226
1993
  sx: {
2227
1994
  backgroundColor: s.onSurface,
@@ -2233,7 +2000,7 @@ const At = Rt("Tv", [
2233
2000
  },
2234
2001
  children: [
2235
2002
  /* @__PURE__ */ r(
2236
- h,
2003
+ m,
2237
2004
  {
2238
2005
  component: "span",
2239
2006
  sx: {
@@ -2251,9 +2018,9 @@ const At = Rt("Tv", [
2251
2018
  children: e
2252
2019
  }
2253
2020
  ),
2254
- /* @__PURE__ */ y(h, { children: [
2021
+ /* @__PURE__ */ y(m, { children: [
2255
2022
  o,
2256
- /* @__PURE__ */ r(S, { component: "div", size: 10, font: "secondary", color: s.dim, sx: { marginTop: n(3, 10) }, children: t })
2023
+ /* @__PURE__ */ r(w, { component: "div", size: 10, font: "secondary", color: s.dim, sx: { marginTop: n(3, 10) }, children: t })
2257
2024
  ] })
2258
2025
  ]
2259
2026
  }
@@ -2265,100 +2032,100 @@ const At = Rt("Tv", [
2265
2032
  strokeWidth: 2,
2266
2033
  strokeLinecap: "round",
2267
2034
  strokeLinejoin: "round"
2268
- }, Mo = 4, Ao = (e, t, o, s) => {
2035
+ }, fo = 4, yo = (e, t, o, s) => {
2269
2036
  if (s) return 12;
2270
2037
  if (o) return e === t - 1 && t % 2 === 1 ? 12 : 6;
2271
- const i = Math.min(t, Mo), a = e < i ? i : t - i;
2038
+ const i = Math.min(t, fo), a = e < i ? i : t - i;
2272
2039
  return Math.floor(12 / a);
2273
- }, Lo = () => {
2274
- const { colors: e, radius: t } = W(), o = xe(), s = pt(), { data: i, entities: a, tally: d, label: l, fmt: c, props: u } = K(), g = z.useMemo(() => eo(i.matches), [i.matches]), f = g.played, w = (p) => l("ofMatches", { value: p, matches: l("matchesCount", { count: f }) }), b = (p) => c.decimal(f ? p / f : 0, 1), m = (p, _ = 22) => /* @__PURE__ */ r(S, { size: _, weight: 700, color: e.text, sx: { lineHeight: 1 }, children: p }), I = [
2040
+ }, xo = () => {
2041
+ const { colors: e, radius: t } = O(), o = xe(), s = at(), { data: i, entities: a, tally: d, label: l, fmt: c, props: u } = Y(), h = A.useMemo(() => Vt(i.matches), [i.matches]), f = h.played, C = (p) => l("ofMatches", { value: p, matches: l("matchesCount", { count: f }) }), b = (p) => c.decimal(f ? p / f : 0, 1), g = (p, I = 22) => /* @__PURE__ */ r(w, { size: I, weight: 700, color: e.text, sx: { lineHeight: 1 }, children: p }), T = [
2275
2042
  {
2276
2043
  label: l("matchesPlayed"),
2277
2044
  value: f,
2278
- sub: l("remaining", { count: g.total - f })
2045
+ sub: l("remaining", { count: h.total - f })
2279
2046
  },
2280
2047
  {
2281
2048
  label: l("totalGoals"),
2282
- value: g.goals,
2283
- sub: l("goalsPerMatchValue", { value: c.decimal(f ? g.goals / f : 0, 2) })
2049
+ value: h.goals,
2050
+ sub: l("goalsPerMatchValue", { value: c.decimal(f ? h.goals / f : 0, 2) })
2284
2051
  },
2285
- { label: l("homeWins"), value: `${B(g.homeWins, f)}%`, sub: w(g.homeWins) },
2052
+ { label: l("homeWins"), value: `${G(h.homeWins, f)}%`, sub: C(h.homeWins) },
2286
2053
  {
2287
2054
  label: l("bothTeamsScored"),
2288
- value: `${B(g.bothScored, f)}%`,
2055
+ value: `${G(h.bothScored, f)}%`,
2289
2056
  sub: l("bttsSummary", {
2290
- matches: l("matchesCount", { count: g.bothScored }),
2291
- goalless: g.goalless
2057
+ matches: l("matchesCount", { count: h.bothScored }),
2058
+ goalless: h.goalless
2292
2059
  })
2293
2060
  }
2294
- ], x = [
2295
- { label: l("homeWin"), n: g.homeWins, color: e.primary },
2296
- { label: l("draw"), n: g.draws, color: e.border },
2297
- { label: l("awayWin"), n: g.awayWins, color: e.primaryContainer }
2298
- ], $ = Math.max(...g.goalsByPeriod, 1), v = [
2061
+ ], v = [
2062
+ { label: l("homeWin"), n: h.homeWins, color: e.primary },
2063
+ { label: l("draw"), n: h.draws, color: e.border },
2064
+ { label: l("awayWin"), n: h.awayWins, color: e.primaryContainer }
2065
+ ], P = Math.max(...h.goalsByPeriod, 1), _ = [
2299
2066
  ...[1.5, 2.5, 3.5].map((p) => ({
2300
2067
  // "Over 1.5" reads better as the whole number it means: 2+.
2301
2068
  label: l("goalsOrMore", { count: Math.ceil(p) }),
2302
- pct: B(g.over(p), f)
2069
+ pct: G(h.over(p), f)
2303
2070
  })),
2304
- { label: l("bothTeamsScored"), pct: B(g.bothScored, f) },
2305
- { label: l("goallessDraw"), pct: B(g.goalless, f) }
2306
- ], E = no(i.teamStats), D = Array.from(d.keys()), M = ue(u.teamCTA), A = [], L = (p, _, k, V, q) => {
2307
- _ !== void 0 && A.push({ label: l(p), teamId: k(_), value: V(_), unit: q(_) });
2071
+ { label: l("bothTeamsScored"), pct: G(h.bothScored, f) },
2072
+ { label: l("goallessDraw"), pct: G(h.goalless, f) }
2073
+ ], z = qt(i.teamStats), D = Array.from(d.keys()), R = ce(u.teamCTA), M = [], E = (p, I, S, W, K) => {
2074
+ I !== void 0 && M.push({ label: l(p), teamId: S(I), value: W(I), unit: K(I) });
2308
2075
  };
2309
- L("mostWins", U(E, (p) => p.won), (p) => p.teamId, (p) => p.won, (p) => l("unitWins", { count: p.won })), L("bestAttack", U(E, (p) => p.goalsScored), (p) => p.teamId, (p) => p.goalsScored, () => l("unitGoals")), L("bestDefence", U(E, (p) => p.goalsAllowed, -1), (p) => p.teamId, (p) => p.goalsAllowed, (p) => l("unitConceded", { count: p.goalsAllowed })), L(
2076
+ E("mostWins", V(z, (p) => p.won), (p) => p.teamId, (p) => p.won, (p) => l("unitWins", { count: p.won })), E("bestAttack", V(z, (p) => p.goalsScored), (p) => p.teamId, (p) => p.goalsScored, () => l("unitGoals")), E("bestDefence", V(z, (p) => p.goalsAllowed, -1), (p) => p.teamId, (p) => p.goalsAllowed, (p) => l("unitConceded", { count: p.goalsAllowed })), E(
2310
2077
  "cleanSheets",
2311
- U(D, (p) => {
2312
- var _;
2313
- return ((_ = d.get(p)) == null ? void 0 : _.cleanSheets) ?? 0;
2078
+ V(D, (p) => {
2079
+ var I;
2080
+ return ((I = d.get(p)) == null ? void 0 : I.cleanSheets) ?? 0;
2314
2081
  }),
2315
2082
  (p) => p,
2316
2083
  (p) => {
2317
- var _;
2318
- return ((_ = d.get(p)) == null ? void 0 : _.cleanSheets) ?? 0;
2084
+ var I;
2085
+ return ((I = d.get(p)) == null ? void 0 : I.cleanSheets) ?? 0;
2319
2086
  },
2320
2087
  () => l("unitMatches")
2321
- ), L("bestHome", U(E, (p) => p.homeWon), (p) => p.teamId, (p) => p.homeWon, (p) => l("unitWins", { count: p.homeWon })), L("bestAway", U(E, (p) => p.awayWon), (p) => p.teamId, (p) => p.awayWon, (p) => l("unitWins", { count: p.awayWon })), L(
2088
+ ), E("bestHome", V(z, (p) => p.homeWon), (p) => p.teamId, (p) => p.homeWon, (p) => l("unitWins", { count: p.homeWon })), E("bestAway", V(z, (p) => p.awayWon), (p) => p.teamId, (p) => p.awayWon, (p) => l("unitWins", { count: p.awayWon })), E(
2322
2089
  "mostCards",
2323
- U(D, (p) => {
2324
- var _, k;
2325
- return (((_ = d.get(p)) == null ? void 0 : _.yellowCards) ?? 0) + (((k = d.get(p)) == null ? void 0 : k.redCards) ?? 0);
2090
+ V(D, (p) => {
2091
+ var I, S;
2092
+ return (((I = d.get(p)) == null ? void 0 : I.yellowCards) ?? 0) + (((S = d.get(p)) == null ? void 0 : S.redCards) ?? 0);
2326
2093
  }),
2327
2094
  (p) => p,
2328
2095
  (p) => {
2329
- var _, k;
2330
- return (((_ = d.get(p)) == null ? void 0 : _.yellowCards) ?? 0) + (((k = d.get(p)) == null ? void 0 : k.redCards) ?? 0);
2096
+ var I, S;
2097
+ return (((I = d.get(p)) == null ? void 0 : I.yellowCards) ?? 0) + (((S = d.get(p)) == null ? void 0 : S.redCards) ?? 0);
2331
2098
  },
2332
2099
  (p) => {
2333
- var _, k;
2334
- return `${l("yellowCount", { count: ((_ = d.get(p)) == null ? void 0 : _.yellowCards) ?? 0 })} · ${l("redCount", {
2335
- count: ((k = d.get(p)) == null ? void 0 : k.redCards) ?? 0
2100
+ var I, S;
2101
+ return `${l("yellowCount", { count: ((I = d.get(p)) == null ? void 0 : I.yellowCards) ?? 0 })} · ${l("redCount", {
2102
+ count: ((S = d.get(p)) == null ? void 0 : S.redCards) ?? 0
2336
2103
  })}`;
2337
2104
  }
2338
2105
  );
2339
- const T = i.matches.filter(we), R = [], O = U(T, ce), H = U(T, (p) => Math.abs(p.fullTime[0] - p.fullTime[1]));
2340
- O && R.push({ label: l("highestScoring"), match: O }), H && R.push({ label: l("biggestWin"), match: H });
2341
- const G = ue(u.matchCTA);
2342
- return /* @__PURE__ */ y(h, { sx: { display: "flex", flexDirection: "column", gap: n(12) }, children: [
2343
- /* @__PURE__ */ r(Ke, { children: l("seasonTitle") }),
2344
- /* @__PURE__ */ r(h, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fit,minmax(${n(150)},1fr))`, gap: n(12) }, children: I.map((p) => /* @__PURE__ */ y(
2106
+ const $ = i.matches.filter(we), k = [], F = V($, de), H = V($, (p) => Math.abs(p.fullTime[0] - p.fullTime[1]));
2107
+ F && k.push({ label: l("highestScoring"), match: F }), H && k.push({ label: l("biggestWin"), match: H });
2108
+ const U = ce(u.matchCTA);
2109
+ return /* @__PURE__ */ y(m, { sx: { display: "flex", flexDirection: "column", gap: n(12) }, children: [
2110
+ /* @__PURE__ */ r(He, { children: l("seasonTitle") }),
2111
+ /* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fit,minmax(${n(150)},1fr))`, gap: n(12) }, children: T.map((p) => /* @__PURE__ */ y(
2345
2112
  Z,
2346
2113
  {
2347
2114
  sx: { padding: `${n(14)} ${n(16)}`, display: "flex", flexDirection: "column", gap: n(4) },
2348
2115
  children: [
2349
- /* @__PURE__ */ r(Y, { size: 10, children: p.label }),
2350
- /* @__PURE__ */ r(S, { size: 28, weight: 700, color: e.primary, sx: { lineHeight: 1 }, children: p.value }),
2351
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", color: e.dim, children: p.sub })
2116
+ /* @__PURE__ */ r(q, { size: 10, children: p.label }),
2117
+ /* @__PURE__ */ r(w, { size: 28, weight: 700, color: e.primary, sx: { lineHeight: 1 }, children: p.value }),
2118
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.dim, children: p.sub })
2352
2119
  ]
2353
2120
  },
2354
2121
  p.label
2355
2122
  )) }),
2356
- /* @__PURE__ */ y(h, { sx: { display: "grid", gridTemplateColumns: fe, gap: n(12) }, children: [
2123
+ /* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
2357
2124
  /* @__PURE__ */ y(se, { children: [
2358
- /* @__PURE__ */ r(Y, { children: l("outcomeTitle") }),
2359
- /* @__PURE__ */ r(Ne, { height: 14, widths: x.map((p) => ({ w: B(p.n, f), color: p.color })) }),
2360
- /* @__PURE__ */ r(h, { sx: { display: "grid", gridTemplateColumns: "repeat(3,1fr)", gap: n(8) }, children: x.map((p) => /* @__PURE__ */ y(
2361
- h,
2125
+ /* @__PURE__ */ r(q, { children: l("outcomeTitle") }),
2126
+ /* @__PURE__ */ r(We, { height: 14, widths: v.map((p) => ({ w: G(p.n, f), color: p.color })) }),
2127
+ /* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: "repeat(3,1fr)", gap: n(8) }, children: v.map((p) => /* @__PURE__ */ y(
2128
+ m,
2362
2129
  {
2363
2130
  sx: {
2364
2131
  display: "flex",
@@ -2369,40 +2136,40 @@ const At = Rt("Tv", [
2369
2136
  paddingLeft: n(8)
2370
2137
  },
2371
2138
  children: [
2372
- m(`${B(p.n, f)}%`),
2373
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", color: e.dim, sx: { marginTop: n(3, 11) }, children: p.label }),
2374
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", color: e.body, children: w(p.n) })
2139
+ g(`${G(p.n, f)}%`),
2140
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.dim, sx: { marginTop: n(3, 11) }, children: p.label }),
2141
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.body, children: C(p.n) })
2375
2142
  ]
2376
2143
  },
2377
2144
  p.label
2378
2145
  )) })
2379
2146
  ] }),
2380
2147
  /* @__PURE__ */ y(se, { children: [
2381
- /* @__PURE__ */ y(h, { sx: { display: "flex", justifyContent: "space-between", alignItems: "baseline", gap: n(8) }, children: [
2382
- /* @__PURE__ */ r(Y, { children: l("goalTimingTitle") }),
2383
- /* @__PURE__ */ y(S, { size: 11, font: "secondary", color: e.dim, children: [
2148
+ /* @__PURE__ */ y(m, { sx: { display: "flex", justifyContent: "space-between", alignItems: "baseline", gap: n(8) }, children: [
2149
+ /* @__PURE__ */ r(q, { children: l("goalTimingTitle") }),
2150
+ /* @__PURE__ */ y(w, { size: 11, font: "secondary", color: e.dim, children: [
2384
2151
  l("firstHalf"),
2385
2152
  " ",
2386
- /* @__PURE__ */ r(h, { component: "b", sx: { color: e.text }, children: g.firstHalfGoals }),
2153
+ /* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children: h.firstHalfGoals }),
2387
2154
  " ",
2388
2155
  "· ",
2389
2156
  l("secondHalf"),
2390
2157
  " ",
2391
- /* @__PURE__ */ r(h, { component: "b", sx: { color: e.text }, children: g.secondHalfGoals })
2158
+ /* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children: h.secondHalfGoals })
2392
2159
  ] })
2393
2160
  ] }),
2394
2161
  /* @__PURE__ */ r(
2395
- Ne,
2162
+ We,
2396
2163
  {
2397
2164
  height: 8,
2398
2165
  widths: [
2399
- { w: B(g.firstHalfGoals, g.goals), color: e.primaryContainer },
2400
- { w: B(g.secondHalfGoals, g.goals), color: e.primary }
2166
+ { w: G(h.firstHalfGoals, h.goals), color: e.primaryContainer },
2167
+ { w: G(h.secondHalfGoals, h.goals), color: e.primary }
2401
2168
  ]
2402
2169
  }
2403
2170
  ),
2404
2171
  /* @__PURE__ */ r(
2405
- h,
2172
+ m,
2406
2173
  {
2407
2174
  sx: {
2408
2175
  display: "grid",
@@ -2411,8 +2178,8 @@ const At = Rt("Tv", [
2411
2178
  alignItems: "end",
2412
2179
  height: n(72)
2413
2180
  },
2414
- children: g.goalsByPeriod.map((p, _) => /* @__PURE__ */ y(
2415
- h,
2181
+ children: h.goalsByPeriod.map((p, I) => /* @__PURE__ */ y(
2182
+ m,
2416
2183
  {
2417
2184
  sx: {
2418
2185
  display: "flex",
@@ -2423,32 +2190,32 @@ const At = Rt("Tv", [
2423
2190
  justifyContent: "flex-end"
2424
2191
  },
2425
2192
  children: [
2426
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", weight: 700, color: e.text, children: p }),
2193
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", weight: 700, color: e.text, children: p }),
2427
2194
  /* @__PURE__ */ r(
2428
- h,
2195
+ m,
2429
2196
  {
2430
2197
  sx: {
2431
2198
  width: "100%",
2432
- height: n(Math.max(6, Math.round(p / $ * 56))),
2199
+ height: n(Math.max(6, Math.round(p / P * 56))),
2433
2200
  borderRadius: `${t.xs} ${t.xs} 0 0`,
2434
- backgroundColor: p === $ ? e.primary : e.tint2
2201
+ backgroundColor: p === P ? e.primary : e.tint2
2435
2202
  }
2436
2203
  }
2437
2204
  )
2438
2205
  ]
2439
2206
  },
2440
- Oe[_]
2207
+ De[I]
2441
2208
  ))
2442
2209
  }
2443
2210
  ),
2444
- /* @__PURE__ */ r(h, { sx: { display: "grid", gridTemplateColumns: "repeat(6,1fr)", gap: n(6) }, children: Oe.map((p) => /* @__PURE__ */ r(S, { size: 10, font: "secondary", color: e.dim, sx: { textAlign: "center", unicodeBidi: "isolate" }, children: p }, p)) })
2211
+ /* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: "repeat(6,1fr)", gap: n(6) }, children: De.map((p) => /* @__PURE__ */ r(w, { size: 10, font: "secondary", color: e.dim, sx: { textAlign: "center", unicodeBidi: "isolate" }, children: p }, p)) })
2445
2212
  ] })
2446
2213
  ] }),
2447
- /* @__PURE__ */ y(h, { sx: { display: "grid", gridTemplateColumns: fe, gap: n(12) }, children: [
2214
+ /* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
2448
2215
  /* @__PURE__ */ y(se, { children: [
2449
- /* @__PURE__ */ r(Y, { children: l("scoringTitle") }),
2450
- v.map((p) => /* @__PURE__ */ y(
2451
- h,
2216
+ /* @__PURE__ */ r(q, { children: l("scoringTitle") }),
2217
+ _.map((p) => /* @__PURE__ */ y(
2218
+ m,
2452
2219
  {
2453
2220
  sx: {
2454
2221
  display: "grid",
@@ -2457,17 +2224,17 @@ const At = Rt("Tv", [
2457
2224
  gap: n(10)
2458
2225
  },
2459
2226
  children: [
2460
- /* @__PURE__ */ r(S, { size: 12, font: "secondary", weight: 500, color: e.body, ellipsis: !0, children: p.label }),
2461
- /* @__PURE__ */ r(h, { sx: { height: n(8), borderRadius: t.full, backgroundColor: e.variant, overflow: "hidden" }, children: /* @__PURE__ */ r(h, { sx: { height: "100%", width: `${p.pct}%`, backgroundColor: e.primary, borderRadius: t.full } }) }),
2462
- /* @__PURE__ */ r(S, { size: 12, font: "secondary", weight: 700, color: e.text, sx: { textAlign: "right" }, children: `${p.pct}%` })
2227
+ /* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 500, color: e.body, ellipsis: !0, children: p.label }),
2228
+ /* @__PURE__ */ r(m, { sx: { height: n(8), borderRadius: t.full, backgroundColor: e.variant, overflow: "hidden" }, children: /* @__PURE__ */ r(m, { sx: { height: "100%", width: `${p.pct}%`, backgroundColor: e.primary, borderRadius: t.full } }) }),
2229
+ /* @__PURE__ */ r(w, { size: 12, font: "secondary", weight: 700, color: e.text, sx: { textAlign: "right" }, children: `${p.pct}%` })
2463
2230
  ]
2464
2231
  },
2465
2232
  p.label
2466
2233
  ))
2467
2234
  ] }),
2468
2235
  /* @__PURE__ */ y(se, { children: [
2469
- /* @__PURE__ */ r(Y, { children: l("averagesTitle") }),
2470
- /* @__PURE__ */ y(h, { sx: { display: "grid", gridTemplateColumns: "repeat(2,1fr)", gap: n(8) }, children: [
2236
+ /* @__PURE__ */ r(q, { children: l("averagesTitle") }),
2237
+ /* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: "repeat(2,1fr)", gap: n(8) }, children: [
2471
2238
  /* @__PURE__ */ r(
2472
2239
  ie,
2473
2240
  {
@@ -2477,7 +2244,7 @@ const At = Rt("Tv", [
2477
2244
  /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "6" }),
2478
2245
  /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "2" })
2479
2246
  ] }),
2480
- children: m(b(g.shotsOnTarget))
2247
+ children: g(b(h.shotsOnTarget))
2481
2248
  }
2482
2249
  ),
2483
2250
  /* @__PURE__ */ r(
@@ -2489,7 +2256,7 @@ const At = Rt("Tv", [
2489
2256
  /* @__PURE__ */ r("path", { d: "M4 4h12l-3 4 3 4H4" }),
2490
2257
  /* @__PURE__ */ r("path", { d: "M2 22h6" })
2491
2258
  ] }),
2492
- children: m(b(g.corners))
2259
+ children: g(b(h.corners))
2493
2260
  }
2494
2261
  ),
2495
2262
  /* @__PURE__ */ r(
@@ -2497,7 +2264,7 @@ const At = Rt("Tv", [
2497
2264
  {
2498
2265
  caption: l("avgCards"),
2499
2266
  icon: /* @__PURE__ */ r("svg", { ...ae, children: /* @__PURE__ */ r("rect", { x: "6", y: "3", width: "12", height: "18", rx: "2" }) }),
2500
- children: m(b(g.yellowCards + g.redCards))
2267
+ children: g(b(h.yellowCards + h.redCards))
2501
2268
  }
2502
2269
  ),
2503
2270
  /* @__PURE__ */ r(
@@ -2509,16 +2276,16 @@ const At = Rt("Tv", [
2509
2276
  /* @__PURE__ */ r("path", { d: "M12 2a10 10 0 0 1 0 20z", fill: "currentColor", stroke: "none", opacity: ".35" }),
2510
2277
  /* @__PURE__ */ r("path", { d: "M12 2v20" })
2511
2278
  ] }),
2512
- children: /* @__PURE__ */ y(h, { sx: { display: "flex", alignItems: "baseline", gap: n(4) }, children: [
2513
- m(b(g.firstHalfGoals)),
2514
- /* @__PURE__ */ r(S, { size: 11, font: "secondary", color: e.dim, children: "/" }),
2515
- m(b(g.secondHalfGoals))
2279
+ children: /* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "baseline", gap: n(4) }, children: [
2280
+ g(b(h.firstHalfGoals)),
2281
+ /* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.dim, children: "/" }),
2282
+ g(b(h.secondHalfGoals))
2516
2283
  ] })
2517
2284
  }
2518
2285
  )
2519
2286
  ] }),
2520
2287
  /* @__PURE__ */ y(
2521
- h,
2288
+ m,
2522
2289
  {
2523
2290
  sx: {
2524
2291
  display: "flex",
@@ -2530,14 +2297,14 @@ const At = Rt("Tv", [
2530
2297
  flexWrap: "wrap"
2531
2298
  },
2532
2299
  children: [
2533
- /* @__PURE__ */ r(Y, { children: l("totalCards") }),
2534
- /* @__PURE__ */ r(h, { sx: { display: "flex", gap: n(20) }, children: [
2535
- { n: g.yellowCards, color: e.yellowCard, key: "yellow" },
2536
- { n: g.redCards, color: e.danger, key: "red" }
2537
- ].map((p) => /* @__PURE__ */ y(h, { sx: { display: "flex", alignItems: "center", gap: n(10) }, children: [
2538
- /* @__PURE__ */ y(h, { component: "span", sx: { position: "relative", width: n(22), height: n(26), flexShrink: 0 }, children: [
2300
+ /* @__PURE__ */ r(q, { children: l("totalCards") }),
2301
+ /* @__PURE__ */ r(m, { sx: { display: "flex", gap: n(20) }, children: [
2302
+ { n: h.yellowCards, color: e.yellowCard, key: "yellow" },
2303
+ { n: h.redCards, color: e.danger, key: "red" }
2304
+ ].map((p) => /* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(10) }, children: [
2305
+ /* @__PURE__ */ y(m, { component: "span", sx: { position: "relative", width: n(22), height: n(26), flexShrink: 0 }, children: [
2539
2306
  /* @__PURE__ */ r(
2540
- h,
2307
+ m,
2541
2308
  {
2542
2309
  component: "span",
2543
2310
  sx: {
@@ -2554,7 +2321,7 @@ const At = Rt("Tv", [
2554
2321
  }
2555
2322
  ),
2556
2323
  /* @__PURE__ */ r(
2557
- h,
2324
+ m,
2558
2325
  {
2559
2326
  component: "span",
2560
2327
  sx: {
@@ -2570,50 +2337,50 @@ const At = Rt("Tv", [
2570
2337
  }
2571
2338
  )
2572
2339
  ] }),
2573
- m(p.n, 20)
2340
+ g(p.n, 20)
2574
2341
  ] }, p.key)) })
2575
2342
  ]
2576
2343
  }
2577
2344
  )
2578
2345
  ] })
2579
2346
  ] }),
2580
- A.length ? /* @__PURE__ */ r(
2581
- h,
2347
+ M.length ? /* @__PURE__ */ r(
2348
+ m,
2582
2349
  {
2583
2350
  sx: {
2584
2351
  display: "grid",
2585
2352
  gridTemplateColumns: "repeat(12, minmax(0, 1fr))",
2586
2353
  gap: n(12)
2587
2354
  },
2588
- children: A.map((p, _) => {
2589
- const k = ye(u.teamCTA, "team", p.teamId);
2355
+ children: M.map((p, I) => {
2356
+ const S = fe(u.teamCTA, "team", p.teamId);
2590
2357
  return /* @__PURE__ */ y(
2591
2358
  Z,
2592
2359
  {
2593
- component: k != null && k.href ? "a" : "div",
2594
- href: (k == null ? void 0 : k.href) ?? void 0,
2595
- target: k == null ? void 0 : k.target,
2596
- onClick: k == null ? void 0 : k.onClick,
2360
+ component: S != null && S.href ? "a" : "div",
2361
+ href: (S == null ? void 0 : S.href) ?? void 0,
2362
+ target: S == null ? void 0 : S.target,
2363
+ onClick: S == null ? void 0 : S.onClick,
2597
2364
  sx: {
2598
2365
  padding: `${n(12)} ${n(14)}`,
2599
2366
  display: "flex",
2600
2367
  alignItems: "center",
2601
2368
  gap: n(10),
2602
- cursor: M ? "pointer" : "default",
2603
- gridColumn: `span ${Ao(_, A.length, o, s)}`,
2369
+ cursor: R ? "pointer" : "default",
2370
+ gridColumn: `span ${yo(I, M.length, o, s)}`,
2604
2371
  textDecoration: "none",
2605
2372
  color: "inherit",
2606
- "&:hover": { backgroundColor: M ? e.onSurface : e.surface }
2373
+ "&:hover": { backgroundColor: R ? e.onSurface : e.surface }
2607
2374
  },
2608
2375
  children: [
2609
2376
  /* @__PURE__ */ r(j, { url: a.logo(p.teamId), size: 36 }),
2610
- /* @__PURE__ */ y(h, { sx: { minWidth: 0, flex: 1 }, children: [
2611
- /* @__PURE__ */ r(Y, { size: 10, sx: { display: "block" }, children: p.label }),
2612
- /* @__PURE__ */ r(S, { component: "div", size: 13, weight: 700, color: e.text, ellipsis: !0, cms: !0, children: a.name(p.teamId) })
2377
+ /* @__PURE__ */ y(m, { sx: { minWidth: 0, flex: 1 }, children: [
2378
+ /* @__PURE__ */ r(q, { size: 10, sx: { display: "block" }, children: p.label }),
2379
+ /* @__PURE__ */ r(w, { component: "div", size: 13, weight: 700, color: e.text, ellipsis: !0, cms: !0, children: a.name(p.teamId) })
2613
2380
  ] }),
2614
- /* @__PURE__ */ y(h, { sx: { textAlign: "right", flexShrink: 0 }, children: [
2615
- /* @__PURE__ */ r(S, { component: "div", size: 22, weight: 700, color: e.primary, sx: { lineHeight: 1 }, children: p.value }),
2616
- /* @__PURE__ */ r(S, { component: "div", size: 10, font: "secondary", color: e.dim, sx: { marginTop: n(2, 10) }, children: p.unit })
2381
+ /* @__PURE__ */ y(m, { sx: { textAlign: "right", flexShrink: 0 }, children: [
2382
+ /* @__PURE__ */ r(w, { component: "div", size: 22, weight: 700, color: e.primary, sx: { lineHeight: 1 }, children: p.value }),
2383
+ /* @__PURE__ */ r(w, { component: "div", size: 10, font: "secondary", color: e.dim, sx: { marginTop: n(2, 10) }, children: p.unit })
2617
2384
  ] })
2618
2385
  ]
2619
2386
  },
@@ -2622,35 +2389,35 @@ const At = Rt("Tv", [
2622
2389
  })
2623
2390
  }
2624
2391
  ) : null,
2625
- R.length ? /* @__PURE__ */ r(h, { sx: { display: "grid", gridTemplateColumns: fe, gap: n(12) }, children: R.map(({ label: p, match: _ }) => {
2626
- const k = ye(u.matchCTA, "match", _.id), [V, q] = _.fullTime ?? [0, 0];
2392
+ k.length ? /* @__PURE__ */ r(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: k.map(({ label: p, match: I }) => {
2393
+ const S = fe(u.matchCTA, "match", I.id), [W, K] = I.fullTime ?? [0, 0];
2627
2394
  return /* @__PURE__ */ y(
2628
2395
  Z,
2629
2396
  {
2630
- component: k != null && k.href ? "a" : "div",
2631
- href: (k == null ? void 0 : k.href) ?? void 0,
2632
- target: k == null ? void 0 : k.target,
2633
- onClick: k == null ? void 0 : k.onClick,
2397
+ component: S != null && S.href ? "a" : "div",
2398
+ href: (S == null ? void 0 : S.href) ?? void 0,
2399
+ target: S == null ? void 0 : S.target,
2400
+ onClick: S == null ? void 0 : S.onClick,
2634
2401
  sx: {
2635
2402
  padding: `${n(12)} ${n(16)}`,
2636
2403
  display: "flex",
2637
2404
  flexDirection: "column",
2638
2405
  gap: n(8),
2639
- cursor: G ? "pointer" : "default",
2406
+ cursor: U ? "pointer" : "default",
2640
2407
  textDecoration: "none",
2641
2408
  color: "inherit",
2642
- "&:hover": { backgroundColor: G ? e.onSurface : e.surface }
2409
+ "&:hover": { backgroundColor: U ? e.onSurface : e.surface }
2643
2410
  },
2644
2411
  children: [
2645
- /* @__PURE__ */ y(Y, { size: 10, sx: { display: "flex", justifyContent: "space-between" }, children: [
2412
+ /* @__PURE__ */ y(q, { size: 10, sx: { display: "flex", justifyContent: "space-between" }, children: [
2646
2413
  /* @__PURE__ */ r("span", { children: p }),
2647
2414
  /* @__PURE__ */ r("span", { children: l("recordRound", {
2648
- round: _.round,
2649
- date: c.date(_.start, { day: "2-digit", month: "2-digit" })
2415
+ round: I.round,
2416
+ date: c.date(I.start, { day: "2-digit", month: "2-digit" })
2650
2417
  }) })
2651
2418
  ] }),
2652
2419
  /* @__PURE__ */ y(
2653
- h,
2420
+ m,
2654
2421
  {
2655
2422
  sx: {
2656
2423
  display: "grid",
@@ -2659,12 +2426,12 @@ const At = Rt("Tv", [
2659
2426
  gap: n(8)
2660
2427
  },
2661
2428
  children: [
2662
- /* @__PURE__ */ y(h, { sx: { display: "flex", alignItems: "center", justifyContent: "flex-end", gap: n(8), minWidth: 0 }, children: [
2663
- /* @__PURE__ */ r(S, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(_.home.id) }),
2664
- /* @__PURE__ */ r(j, { url: a.logo(_.home.id), size: 28 })
2429
+ /* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", justifyContent: "flex-end", gap: n(8), minWidth: 0 }, children: [
2430
+ /* @__PURE__ */ r(w, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(I.home.id) }),
2431
+ /* @__PURE__ */ r(j, { url: a.logo(I.home.id), size: 28 })
2665
2432
  ] }),
2666
2433
  /* @__PURE__ */ r(
2667
- S,
2434
+ w,
2668
2435
  {
2669
2436
  size: 18,
2670
2437
  weight: 700,
@@ -2675,12 +2442,12 @@ const At = Rt("Tv", [
2675
2442
  borderRadius: t.sm,
2676
2443
  padding: `${n(4, 18)} ${n(10, 18)}`
2677
2444
  },
2678
- children: `${V} : ${q}`
2445
+ children: `${W} : ${K}`
2679
2446
  }
2680
2447
  ),
2681
- /* @__PURE__ */ y(h, { sx: { display: "flex", alignItems: "center", gap: n(8), minWidth: 0 }, children: [
2682
- /* @__PURE__ */ r(j, { url: a.logo(_.away.id), size: 28 }),
2683
- /* @__PURE__ */ r(S, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(_.away.id) })
2448
+ /* @__PURE__ */ y(m, { sx: { display: "flex", alignItems: "center", gap: n(8), minWidth: 0 }, children: [
2449
+ /* @__PURE__ */ r(j, { url: a.logo(I.away.id), size: 28 }),
2450
+ /* @__PURE__ */ r(w, { size: 13, weight: 600, color: e.text, ellipsis: !0, cms: !0, children: a.name(I.away.id) })
2684
2451
  ] })
2685
2452
  ]
2686
2453
  }
@@ -2691,60 +2458,60 @@ const At = Rt("Tv", [
2691
2458
  );
2692
2459
  }) }) : null
2693
2460
  ] });
2694
- }, zo = ["header", "matches", "players", "season"], Do = 3e4, Po = (e) => {
2461
+ }, bo = ["header", "matches", "players", "season"], wo = 3e4, Co = (e) => {
2695
2462
  const {
2696
2463
  entityId: t,
2697
2464
  sdk: o,
2698
2465
  language: s,
2699
2466
  seasonId: i,
2700
2467
  stageId: a,
2701
- sections: d = zo,
2468
+ sections: d = bo,
2702
2469
  liveRefresh: l = !0,
2703
- refreshInterval: c = Do,
2470
+ refreshInterval: c = wo,
2704
2471
  labels: u
2705
- } = e, { colors: g, fonts: f } = W(), w = io(u), b = z.useMemo(() => ro(s), [s]), { data: m, competitionId: I, entities: x, loading: $, error: v } = Jt(
2472
+ } = e, { colors: h, fonts: f } = O(), C = Zt(u), b = A.useMemo(() => Jt(s), [s]), { data: g, competitionId: T, entities: v, loading: P, error: _ } = Ht(
2706
2473
  o,
2707
2474
  t,
2708
2475
  s,
2709
2476
  "–",
2710
2477
  { seasonId: i, stageId: a, liveRefresh: l, refreshInterval: c }
2711
- ), E = z.useMemo(() => m ? m.matches.filter(we) : [], [m]), D = z.useMemo(() => Qt(E), [E]), M = Array.from(new Set(d)), A = (T) => /* @__PURE__ */ r(Z, { sx: { padding: n(24) }, children: /* @__PURE__ */ r(S, { component: "div", size: 14, font: "secondary", color: g.dim, sx: { textAlign: "center" }, children: T }) });
2712
- let L;
2713
- return $ ? L = /* @__PURE__ */ r(St, { my: 10 }) : v ? L = A(w("loadFailed")) : !m || m.matches.length === 0 ? L = A(w("noData")) : L = /* @__PURE__ */ r(
2714
- ao,
2478
+ ), z = A.useMemo(() => g ? g.matches.filter(we) : [], [g]), D = A.useMemo(() => Ut(z), [z]), R = Array.from(new Set(d)), M = ($) => /* @__PURE__ */ r(Z, { sx: { padding: n(24) }, children: /* @__PURE__ */ r(w, { component: "div", size: 14, font: "secondary", color: h.dim, sx: { textAlign: "center" }, children: $ }) });
2479
+ let E;
2480
+ return P ? E = /* @__PURE__ */ r(yt, { my: 10 }) : _ ? E = M(C("loadFailed")) : !g || g.matches.length === 0 ? E = M(C("noData")) : E = /* @__PURE__ */ r(
2481
+ eo,
2715
2482
  {
2716
- value: { sdk: o, data: m, competitionId: I, entities: x, finished: E, tally: D, label: w, fmt: b, props: e },
2717
- children: M.map((T) => T === "header" ? /* @__PURE__ */ r(lo, {}, T) : T === "matches" ? /* @__PURE__ */ r(Ro, {}, T) : T === "players" ? m.athletes.length ? /* @__PURE__ */ r(mo, {}, T) : null : T === "season" ? /* @__PURE__ */ r(Lo, {}, T) : null)
2483
+ value: { sdk: o, data: g, competitionId: T, entities: v, finished: z, tally: D, label: C, fmt: b, props: e },
2484
+ children: R.map(($) => $ === "header" ? /* @__PURE__ */ r(to, {}, $) : $ === "matches" ? /* @__PURE__ */ r(go, {}, $) : $ === "players" ? g.athletes.length ? /* @__PURE__ */ r(so, {}, $) : null : $ === "season" ? /* @__PURE__ */ r(xo, {}, $) : null)
2718
2485
  }
2719
2486
  ), /* @__PURE__ */ r(
2720
- h,
2487
+ m,
2721
2488
  {
2722
2489
  sx: {
2723
2490
  fontSize: "1em",
2724
2491
  fontFamily: f.primary,
2725
- color: g.text,
2492
+ color: h.text,
2726
2493
  lineHeight: "normal",
2727
2494
  display: "flex",
2728
2495
  flexDirection: "column",
2729
2496
  gap: n(16)
2730
2497
  },
2731
- children: L
2498
+ children: E
2732
2499
  }
2733
2500
  );
2734
- }, Wo = (e) => {
2735
- const [t, o] = z.useState(!1), [s, i] = z.useState(!1), a = mt(e.language), d = z.useRef(
2501
+ }, So = (e) => {
2502
+ const [t, o] = A.useState(!1), [s, i] = A.useState(!1), a = lt(e.language), d = A.useRef(
2736
2503
  `competition-statistics-shadow-root-${Math.random().toString(36).substring(2, 11)}`
2737
- ), l = z.useRef(null), c = z.useRef(null), u = z.useRef(null), [g, f] = z.useState(null);
2738
- z.useEffect(() => {
2739
- ht(e.language || "en").finally(() => i(!0));
2740
- }, [e.language]), z.useEffect(() => {
2504
+ ), l = A.useRef(null), c = A.useRef(null), u = A.useRef(null), [h, f] = A.useState(null);
2505
+ A.useEffect(() => {
2506
+ dt(e.language || "en").finally(() => i(!0));
2507
+ }, [e.language]), A.useEffect(() => {
2741
2508
  if (!l.current) return;
2742
2509
  l.current.shadowRoot ? (c.current = l.current.shadowRoot, u.current = c.current.getElementById(
2743
2510
  d.current
2744
- ), u.current || (u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current))) : (c.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current)), gt(u.current, a);
2745
- const I = Ct("competition-statistics", a);
2511
+ ), u.current || (u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current))) : (c.current = l.current.attachShadow({ mode: "open" }), u.current = document.createElement("div"), u.current.id = d.current, u.current.style.height = "100%", c.current.appendChild(u.current)), ct(u.current, a);
2512
+ const T = ft("competition-statistics", a);
2746
2513
  return f(
2747
- (x) => (x == null ? void 0 : x.key) === I ? x : ft(
2514
+ (v) => (v == null ? void 0 : v.key) === T ? v : ut(
2748
2515
  "competition-statistics",
2749
2516
  c.current,
2750
2517
  a
@@ -2753,26 +2520,26 @@ const At = Rt("Tv", [
2753
2520
  o(!1);
2754
2521
  };
2755
2522
  }, [a]);
2756
- const w = e.themeOptions, b = /* @__PURE__ */ r(
2757
- h,
2523
+ const C = e.themeOptions, b = /* @__PURE__ */ r(
2524
+ m,
2758
2525
  {
2759
2526
  ref: l,
2760
2527
  lang: e.language || "en",
2761
2528
  sx: { height: "100%", display: "block" }
2762
2529
  }
2763
- ), m = t && s && u.current && g ? It(
2530
+ ), g = t && s && u.current && h ? xt(
2764
2531
  // Keyed on the cache, not on `direction`: it must change in the same render that adopts
2765
2532
  // the new cache, or CssVarsProvider writes its CSS variables into the outgoing cache and
2766
2533
  // never repeats.
2767
- /* @__PURE__ */ r(yt, { value: g, children: /* @__PURE__ */ r(xt, { containerRef: l, children: /* @__PURE__ */ r(
2768
- bt,
2534
+ /* @__PURE__ */ r(pt, { value: h, children: /* @__PURE__ */ r(mt, { containerRef: l, children: /* @__PURE__ */ r(
2535
+ ht,
2769
2536
  {
2770
- customTheme: w,
2771
- mode: w == null ? void 0 : w.mode,
2537
+ customTheme: C,
2538
+ mode: C == null ? void 0 : C.mode,
2772
2539
  shadowRootElement: u.current,
2773
2540
  direction: a,
2774
2541
  children: /* @__PURE__ */ y(
2775
- wt,
2542
+ gt,
2776
2543
  {
2777
2544
  shadowRootElement: u.current,
2778
2545
  leadPhoneCountryCode: null,
@@ -2781,7 +2548,7 @@ const At = Rt("Tv", [
2781
2548
  direction: a,
2782
2549
  children: [
2783
2550
  /* @__PURE__ */ r(
2784
- Mt,
2551
+ It,
2785
2552
  {
2786
2553
  styles: {
2787
2554
  "@keyframes cs-pulse": {
@@ -2796,14 +2563,14 @@ const At = Rt("Tv", [
2796
2563
  }
2797
2564
  )
2798
2565
  }
2799
- ) }) }, g.key),
2566
+ ) }) }, h.key),
2800
2567
  u.current
2801
2568
  ) : null;
2802
- return /* @__PURE__ */ y(pe, { children: [
2569
+ return /* @__PURE__ */ y(ye, { children: [
2803
2570
  b,
2804
- m
2571
+ g
2805
2572
  ] });
2806
- }, Oo = (e) => /* @__PURE__ */ r(Wo, { ...e, children: /* @__PURE__ */ r(Po, { ...e }) }), Jo = Oo;
2573
+ }, vo = (e) => /* @__PURE__ */ r(So, { ...e, children: /* @__PURE__ */ r(Co, { ...e }) }), Lo = vo;
2807
2574
  export {
2808
- Jo as CompetitionStatistics
2575
+ Lo as CompetitionStatistics
2809
2576
  };