fansunited-frontend-components 0.0.87 → 0.0.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Betslip.js +1 -1
- package/ChanceGame.js +11 -11
- package/ClassicQuizPlay.js +1 -1
- package/CollectLead.js +7 -7
- package/CompetitionStatistics.js +687 -913
- package/CompetitorCard.js +1210 -1488
- package/Discussion.js +1 -1
- package/EitherOrPlay.js +1 -1
- package/EventCard.js +2150 -2139
- package/EventGamePlay.js +1 -1
- package/Leaderboard.js +14 -14
- package/List.js +167 -165
- package/MatchQuizPlay.js +1 -1
- package/Odds.d.ts +5 -0
- package/Odds.d.ts.map +1 -0
- package/Odds.js +57 -0
- package/PersonalityQuizPlay.js +1 -1
- package/PickThePair.js +12 -12
- package/PlayerOfTheMatch.js +22 -22
- package/PollVote.js +1 -1
- package/Predictor.js +1 -1
- package/README.md +94 -30
- package/Standings.js +12 -12
- package/TopX.js +4716 -5118
- package/chunks/{AccessTime-DnYmc2y3.js → AccessTime-C0zbWECY.js} +1 -1
- package/chunks/{AlertMessage-DaxNsecq.js → AlertMessage-CieUTNsw.js} +6 -6
- package/chunks/{Avatar-CmxmG17Y.js → Avatar-5aOX2Vb1.js} +3 -3
- package/chunks/{Button-ClWJ5CUf.js → Button-3riWYmL7.js} +10 -9
- package/chunks/{Card-BAIFE-g5.js → Card-ByCnCChk.js} +3 -3
- package/chunks/{CardActions-UK4_wiGW.js → CardActions-b3pAJZRO.js} +6 -6
- package/chunks/{CardContent-BKLKsqNJ.js → CardContent-CnyZ1WVy.js} +2 -2
- package/chunks/{ChanceGameEmbedVariant-BkX-XQ-f.js → ChanceGameEmbedVariant-cWHucFuB.js} +10 -10
- package/chunks/{CheckCircle-DPspFBOU.js → CheckCircle-WUucf55H.js} +1 -1
- package/chunks/{Chip-06eY-2lp.js → Chip-BILKBLRO.js} +4 -4
- package/chunks/CircularProgress-Dfx_fE8L.js +317 -0
- package/chunks/{Close-DFwlCPON.js → Close-C-YXDM7Y.js} +1 -1
- package/chunks/{Close-C04vOO5T.js → Close-D1Qu6Zr7.js} +1 -1
- package/chunks/{CollectLeadForm-CNl5gQZc.js → CollectLeadForm-BfrhOCqn.js} +21 -21
- package/chunks/{ConsentsList-CccpD61h.js → ConsentsList-DkWpnlLW.js} +6 -6
- package/chunks/{DirectionScope-8YC2_4GO.js → DirectionScope-eDYFWvxN.js} +1 -1
- package/chunks/{Divider-DWIh5AWp.js → Divider-pZCe2d20.js} +3 -3
- package/chunks/{Edit-CMe6gWEl.js → Edit-NHQMon6F.js} +4 -4
- package/chunks/{EmojiEvents-CRgQHdIP.js → EmojiEvents-DXh-xemn.js} +1 -1
- package/chunks/{FavoriteBorder-4LopuXjl.js → FavoriteBorder-CQrHuIk5.js} +1 -1
- package/chunks/{FormControl-DVXYjXgr.js → FormControl-DttxxDyJ.js} +4 -4
- package/chunks/{FormLabel-D5Fg4BoV.js → FormLabel-D3_mG4D1.js} +3 -3
- package/chunks/{GlobalStyles-Cu-OUtHY.js → GlobalStyles-CafmeGDq.js} +1 -1
- package/chunks/{InlineSpinner-BqP-sRnL.js → InlineSpinner-DkC1XUc7.js} +2 -2
- package/chunks/{Input-BOvLXH0a.js → Input-ksZwfsfA.js} +4 -4
- package/chunks/{KeyboardArrowDown-BQz06NpG.js → KeyboardArrowDown-Ctf2n_n8.js} +1 -1
- package/chunks/{KeyboardArrowRight-CMArGhjp.js → KeyboardArrowRight-CfETLrEt.js} +1 -1
- package/chunks/{Link-C73EMUDp.js → Link-CjxMesIg.js} +3 -3
- package/chunks/{ListItemButton-6Dx_qKG9.js → ListItemButton-O4Zqw3zP.js} +4 -4
- package/chunks/{ModalClose-DCM0NGvd.js → ModalClose-Btz9Kn0q.js} +6 -6
- package/chunks/{ModalDialog-CaSBYjVn.js → ModalDialog-BF_s4rug.js} +6 -6
- package/chunks/{NotFoundSkeleton-D34gqMWJ.js → NotFoundSkeleton-D2Yx2gZV.js} +2 -2
- package/chunks/{Notification-Q_rv7f9m.js → Notification-rNcLeEkz.js} +7 -7
- package/chunks/{WorkspacePremiumOutlined-OHYXXF58.js → OddsSkeleton-C6M4oCTF.js} +96 -74
- package/chunks/OddsStrip-XQfQiBhM.js +385 -0
- package/chunks/{OverlayScoreStateSkeleton-k9CYtDkE.js → OverlayScoreStateSkeleton-w9-f7MPj.js} +4 -4
- package/chunks/{OverlayScoreStateWrapperSkeleton-B8wadyuJ.js → OverlayScoreStateWrapperSkeleton-B9O-4AU_.js} +1 -1
- package/chunks/{OverlaySignInSkeleton-D_idxb5n.js → OverlaySignInSkeleton-Clq-LJjf.js} +4 -4
- package/chunks/{OverlaySkeleton-m-qkzhXB.js → OverlaySkeleton-yDtGLLaG.js} +9 -9
- package/chunks/{Person-utLXm1J4.js → Person-DWyYenEx.js} +1 -1
- package/chunks/{PersonOutline-lhMwfisr.js → PersonOutline-DJJGMjkg.js} +1 -1
- package/chunks/{PickOneOfX-DRiLtqqV.js → PickOneOfX-BZ-IEEEH.js} +3 -3
- package/chunks/{Popper-Bdn0wHi9.js → Popper-Wp7BQGU_.js} +3 -3
- package/chunks/{Portal-BdRuZNR8.js → Portal-Beqgjlza.js} +13 -13
- package/chunks/{Portal-BEroYNyJ.js → Portal-Dw20M2LG.js} +2 -2
- package/chunks/{Predictor-Bn2zkvlD.js → Predictor-BbQ-o3tU.js} +6178 -6613
- package/chunks/{PrizeCard-nRBh9VU_.js → PrizeCard-Cb1YuuYM.js} +3645 -1724
- package/chunks/{Search-B-Xqc3De.js → Search-BOtjWnG5.js} +1 -1
- package/chunks/{Select-CmHfLRTg.js → Select-DXJCZ6D3.js} +7 -7
- package/chunks/{Sheet-Q5izbz85.js → Sheet-MP2rgW4b.js} +3 -3
- package/chunks/{SignInCta-FBCz227A.js → SignInCta-DWtXHD9B.js} +3 -3
- package/chunks/{Spinner-wUVcNUtR.js → Spinner-pC2OM4AI.js} +2 -2
- package/chunks/{SportsSoccer-Dq3Azbu-.js → SportsSoccer-C3JxFjui.js} +1 -1
- package/chunks/{Stack-CY7bQJ7u.js → Stack-CU4pq5Q5.js} +2 -2
- package/chunks/{StandardContentSkeleton-Bm_8xH6p.js → StandardContentSkeleton-Qg1eXOB-.js} +1 -1
- package/chunks/{Table-Cew1z7pw.js → Table-hk72eRqw.js} +2 -2
- package/chunks/{Tabs-DuqeCPIW.js → Tabs-DiWLN-D7.js} +5 -5
- package/chunks/{Textarea-Dwn6AF-Z.js → Textarea-BhxhPabe.js} +3 -3
- package/chunks/{TimerOutlined-HGpj-FEQ.js → TimerOutlined-CRwZ7isE.js} +1 -1
- package/chunks/{Tooltip-Boqkti8t.js → Tooltip-D3L0qTul.js} +5 -5
- package/chunks/Typography-nBRgZwsp.js +775 -0
- package/chunks/{colorInversionUtils-BPGyYARg.js → colorInversionUtils-BhmtNPM2.js} +1 -1
- package/chunks/{createSvgIcon-DaCJY2eU.js → createSvgIcon-C8SzTn0h.js} +1 -1
- package/chunks/{createSvgIcon-mpOIuxRM.js → createSvgIcon-y3WkUldr.js} +2 -2
- package/chunks/{dividerClasses-D8aWZR-L.js → dividerClasses-B-2pg9aw.js} +1 -1
- package/chunks/{elementAcceptingRef-DhvOV1kD.js → elementAcceptingRef-Bdcp531Z.js} +1 -1
- package/chunks/{formLabelClasses-DrWVkeKS.js → formLabelClasses-CECx8x_t.js} +1 -1
- package/chunks/{helpers-CqPvv3gw.js → helpers-BX3cctTx.js} +33 -24
- package/chunks/index-2ImPs9d7.js +4 -0
- package/chunks/index-CitKdUxn.js +4 -0
- package/chunks/index-CyKc-9u8.js +4 -0
- package/chunks/index-D7bJ5A4g.js +4 -0
- package/chunks/{index-iWn7Rdh9.js → index-DP3Xa63T.js} +1 -1
- package/chunks/index-DWXxfmN5.js +4 -0
- package/chunks/index-DcTq5zsy.js +4 -0
- package/chunks/index-Ddsiaelf.js +4 -0
- package/chunks/{index-D-yn2UCo.js → index-qjOOEhVr.js} +95 -98
- package/chunks/{main-Dn5EUDh-.js → main-B7xsd2jd.js} +35 -35
- package/chunks/{main-BRCfR5lM.js → main-BG-hwFMf.js} +19 -19
- package/chunks/{main-BOQ_5kqd.js → main-Cj_sNGwd.js} +31 -31
- package/chunks/{main-DoPO3SkP.js → main-CqifYDEd.js} +381 -384
- package/chunks/{main-DgcqQ3D5.js → main-DKeA0imc.js} +23 -23
- package/chunks/{main-C6bG2zD0.js → main-DVStQO7c.js} +29 -29
- package/chunks/{main-DyQtrmbq.js → main-DZzxaZiR.js} +36 -36
- package/chunks/{main-CB6OELiE.js → main-Dh0w2gH9.js} +991 -930
- package/chunks/sportsEvents-CGX-WkNB.js +27 -0
- package/chunks/{useButton-4zMfywSn.js → useButton-CbtwvfQQ.js} +3 -3
- package/chunks/{useConsents-C9bnFES_.js → useConsents-DdPK793X.js} +12 -12
- package/chunks/{useEventCallback-D-URXDH4.js → useEventCallback-KK900PzE.js} +1 -1
- package/chunks/{useForwardedInput-Bm2kgM0U.js → useForwardedInput-Emz99PzK.js} +2 -2
- package/chunks/{useImageVariant-Bwh3HQQD.js → useImageVariant-DPC_XqjI.js} +1 -1
- package/chunks/{useParticipationDraft-ZkV4H6kC.js → useParticipationDraft-DEWbYjqA.js} +6 -6
- package/chunks/{useSwitch-CIN7Th7t.js → useSwitch-ZW00ibaC.js} +3 -3
- package/components.d.ts +2 -1
- package/components.d.ts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +16 -14
- package/package.json +6 -2
- package/chunks/Typography-DaXtC0md.js +0 -1086
- package/chunks/index-BI_1_9JX.js +0 -4
- package/chunks/index-CBD3UTgX.js +0 -4
- package/chunks/index-CDxdDU5W.js +0 -4
- package/chunks/index-CR9X9c_3.js +0 -4
- package/chunks/index-DLWjbTmD.js +0 -4
- package/chunks/index-DVzuyb5J.js +0 -4
- package/chunks/index-kvAqk2tW.js +0 -4
package/CompetitionStatistics.js
CHANGED
|
@@ -1,53 +1,51 @@
|
|
|
1
|
-
import { jsx as r, jsxs as y, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { g as
|
|
4
|
-
import { S as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { f as
|
|
7
|
-
import { h as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { c as Rt } from "./chunks/createLucideIcon-YBRjY5Kl.js";
|
|
12
|
-
import { G as Mt } from "./chunks/GlobalStyles-Cu-OUtHY.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-Cb1YuuYM.js";
|
|
4
|
+
import { S as yt } from "./chunks/Spinner-pC2OM4AI.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-BX3cctTx.js";
|
|
8
|
+
import { O as Ct, u as St } from "./chunks/OddsStrip-XQfQiBhM.js";
|
|
9
|
+
import { c as vt } from "./chunks/createLucideIcon-YBRjY5Kl.js";
|
|
10
|
+
import { G as It } from "./chunks/GlobalStyles-CafmeGDq.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
|
|
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
|
-
]),
|
|
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
|
-
},
|
|
30
|
-
const t =
|
|
27
|
+
}, Ne = (e) => {
|
|
28
|
+
const t = Fe(e);
|
|
31
29
|
return t ? new URLSearchParams({ key: t.apiKey, client_id: t.clientId }) : null;
|
|
32
|
-
},
|
|
33
|
-
const i =
|
|
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
|
-
`${
|
|
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
|
-
},
|
|
41
|
+
}, kt = async (e, t, o) => {
|
|
44
42
|
var i;
|
|
45
|
-
const s =
|
|
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
|
-
`${
|
|
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
|
-
},
|
|
60
|
-
const s = /* @__PURE__ */ new Map(), i =
|
|
61
|
-
return !i || t.length === 0 || (await
|
|
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
|
-
},
|
|
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,
|
|
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
|
-
],
|
|
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 =
|
|
81
|
+
return ((o = Et.find(([s]) => s.test(t))) == null ? void 0 : o[1]) ?? null;
|
|
84
82
|
}, Ge = (e) => {
|
|
85
|
-
if (
|
|
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
|
-
},
|
|
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
|
-
},
|
|
92
|
+
}, zt = (e) => {
|
|
95
93
|
var i, a;
|
|
96
|
-
const t = (((i = e.status) == null ? void 0 : i.sub_type) ?? "").toLowerCase(), o =
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
111
|
+
goalsByPeriod: Rt.map((o) => N(t, `goals_${o}`))
|
|
114
112
|
};
|
|
115
|
-
},
|
|
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((
|
|
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,
|
|
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, ((
|
|
129
|
+
i.set(a, ((g = o[0]) == null ? void 0 : g.id) ?? null);
|
|
132
130
|
return;
|
|
133
131
|
}
|
|
134
|
-
const d = Date.parse(((
|
|
135
|
-
if (
|
|
136
|
-
i.set(a,
|
|
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 = (
|
|
140
|
-
i.set(a, (
|
|
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
|
-
},
|
|
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:
|
|
152
|
-
away:
|
|
153
|
-
fullTime: i ?
|
|
154
|
-
halfTime: i ?
|
|
155
|
-
liveMinute: s === "LIVE" ?
|
|
156
|
-
notPlayedReason:
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
206
|
-
const s = e.season, i = ((s == null ? void 0 : s.events) ?? []).filter((
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
209
|
-
const
|
|
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
|
-
...
|
|
212
|
-
...
|
|
213
|
-
round:
|
|
214
|
-
competitor_one:
|
|
215
|
-
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 =
|
|
218
|
-
id:
|
|
219
|
-
nameId:
|
|
220
|
-
order:
|
|
221
|
-
})).sort((
|
|
222
|
-
return
|
|
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((
|
|
232
|
-
stages:
|
|
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((
|
|
232
|
+
athletes: ((s == null ? void 0 : s.athlete_stats) ?? []).filter((g) => !!g.athlete_id && (g.statistics ?? []).length > 0).map(Wt)
|
|
235
233
|
};
|
|
236
|
-
},
|
|
237
|
-
const s =
|
|
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((
|
|
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
|
-
(
|
|
245
|
+
(h) => {
|
|
248
246
|
var f;
|
|
249
|
-
return ((f =
|
|
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
|
-
},
|
|
261
|
-
var o, s, i, a, d, l, c, u,
|
|
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
|
|
265
|
-
(
|
|
266
|
-
}), (c = (l = e.season) == null ? void 0 : l.team_stats) == null || c.forEach((f) => f.team_id && t.add(f.team_id)), (
|
|
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
|
-
},
|
|
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 <
|
|
276
|
-
},
|
|
277
|
-
const { seasonId: a, stageId: d, liveRefresh: l, refreshInterval: c } = i, [u,
|
|
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,
|
|
277
|
+
), [b, g] = ee(
|
|
280
278
|
() => /* @__PURE__ */ new Map()
|
|
281
|
-
), [
|
|
282
|
-
|
|
279
|
+
), [T, v] = ee(!0), [P, _] = ee(!1);
|
|
280
|
+
pe(() => {
|
|
283
281
|
if (!e || !t) {
|
|
284
|
-
|
|
282
|
+
v(!1);
|
|
285
283
|
return;
|
|
286
284
|
}
|
|
287
|
-
const
|
|
288
|
-
return
|
|
285
|
+
const $ = new AbortController();
|
|
286
|
+
return v(!0), _(!1), g(/* @__PURE__ */ new Map()), (async () => {
|
|
289
287
|
try {
|
|
290
|
-
const
|
|
288
|
+
const k = await Tt(
|
|
291
289
|
e,
|
|
292
290
|
t,
|
|
293
291
|
a,
|
|
294
|
-
|
|
292
|
+
$.signal
|
|
295
293
|
);
|
|
296
|
-
if (
|
|
297
|
-
const
|
|
294
|
+
if ($.signal.aborted) return;
|
|
295
|
+
const F = k ? await _t(
|
|
298
296
|
e,
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
Gt(k),
|
|
298
|
+
$.signal
|
|
301
299
|
) : /* @__PURE__ */ new Map();
|
|
302
|
-
if (
|
|
303
|
-
|
|
304
|
-
} catch (
|
|
305
|
-
if (
|
|
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
|
-
|
|
305
|
+
h(null), _(!0);
|
|
308
306
|
} finally {
|
|
309
|
-
|
|
307
|
+
$.signal.aborted || v(!1);
|
|
310
308
|
}
|
|
311
|
-
})(), () =>
|
|
309
|
+
})(), () => $.abort();
|
|
312
310
|
}, [e, t, a]);
|
|
313
|
-
const [
|
|
314
|
-
|
|
311
|
+
const [z, D] = ee(() => Date.now());
|
|
312
|
+
pe(() => {
|
|
315
313
|
if (!u || !l) return;
|
|
316
|
-
const
|
|
317
|
-
return () => clearInterval(
|
|
314
|
+
const $ = setInterval(() => D(Date.now()), 6e4);
|
|
315
|
+
return () => clearInterval($);
|
|
318
316
|
}, [u, l]);
|
|
319
|
-
const
|
|
320
|
-
var
|
|
321
|
-
return !u || !l || c <= 0 ? "" : (((
|
|
322
|
-
}, [u, b, l, c,
|
|
323
|
-
|
|
324
|
-
if (!
|
|
325
|
-
const
|
|
326
|
-
const
|
|
327
|
-
|
|
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
|
-
|
|
330
|
-
const
|
|
331
|
-
return
|
|
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
|
-
|
|
333
|
+
k.abort(), clearInterval(H);
|
|
336
334
|
};
|
|
337
|
-
}, [e,
|
|
338
|
-
const
|
|
339
|
-
() => u ?
|
|
335
|
+
}, [e, R, c]);
|
|
336
|
+
const M = le(
|
|
337
|
+
() => u ? Ot(u, d, b) : null,
|
|
340
338
|
[u, d, b]
|
|
341
|
-
),
|
|
342
|
-
() =>
|
|
339
|
+
), E = le(
|
|
340
|
+
() => Nt(f, o, s),
|
|
343
341
|
[f, o, s]
|
|
344
342
|
);
|
|
345
|
-
return { data:
|
|
346
|
-
}, n = (e, t = 16) => `${Math.round(e / t * 1e4) / 1e4}em`,
|
|
347
|
-
const e =
|
|
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,
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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,
|
|
391
|
-
const t = e.filter(we), o = (c) => t.reduce((u,
|
|
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) =>
|
|
410
|
-
over: (c) => t.filter((u) =>
|
|
407
|
+
goalless: t.filter((c) => de(c) === 0).length,
|
|
408
|
+
over: (c) => t.filter((u) => de(u) > c).length
|
|
411
409
|
};
|
|
412
|
-
},
|
|
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
|
-
},
|
|
420
|
-
const o =
|
|
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,
|
|
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
|
-
},
|
|
430
|
-
const t =
|
|
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
|
-
},
|
|
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,
|
|
452
|
-
const { t } =
|
|
453
|
-
return
|
|
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() ?
|
|
454
|
+
return typeof i == "string" && i.trim() ? Qt(i, s) : t(`competitionStatistics.${o}`, s ?? {});
|
|
457
455
|
},
|
|
458
456
|
[e, t]
|
|
459
457
|
);
|
|
460
|
-
},
|
|
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:
|
|
469
|
+
children: h
|
|
472
470
|
}) => {
|
|
473
|
-
const { fonts: f } =
|
|
471
|
+
const { fonts: f } = O();
|
|
474
472
|
return /* @__PURE__ */ r(
|
|
475
|
-
|
|
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:
|
|
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
|
-
|
|
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 } =
|
|
512
|
+
const { colors: o, radius: s } = O();
|
|
515
513
|
return /* @__PURE__ */ r(
|
|
516
|
-
|
|
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
|
-
},
|
|
530
|
-
const { colors: t } =
|
|
531
|
-
return /* @__PURE__ */ r(
|
|
532
|
-
},
|
|
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 } =
|
|
538
|
-
return /* @__PURE__ */ r(
|
|
539
|
-
},
|
|
540
|
-
const e =
|
|
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
|
-
},
|
|
544
|
-
var
|
|
545
|
-
const { colors: e, radius: t } =
|
|
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,
|
|
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(
|
|
563
|
-
/* @__PURE__ */ y(
|
|
564
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
590
|
+
/* @__PURE__ */ y(m, { sx: { flex: `1 1 ${n(220)}`, minWidth: 0 }, children: [
|
|
593
591
|
/* @__PURE__ */ y(
|
|
594
|
-
|
|
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(
|
|
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:
|
|
610
|
+
pct: h
|
|
613
611
|
})
|
|
614
612
|
] })
|
|
615
613
|
]
|
|
616
614
|
}
|
|
617
615
|
),
|
|
618
616
|
/* @__PURE__ */ r(
|
|
619
|
-
|
|
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
|
-
|
|
626
|
+
m,
|
|
629
627
|
{
|
|
630
628
|
sx: {
|
|
631
629
|
height: "100%",
|
|
632
|
-
width: `${
|
|
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
|
-
},
|
|
642
|
+
}, oo = {
|
|
645
643
|
match: "matchId",
|
|
646
644
|
team: "competitorId",
|
|
647
645
|
player: "athleteId"
|
|
648
|
-
},
|
|
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
|
-
},
|
|
649
|
+
}, fe = (e, t, o) => {
|
|
652
650
|
var d;
|
|
653
|
-
if (!
|
|
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 ===
|
|
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
|
-
},
|
|
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) => [
|
|
671
|
-
chips: (e, t, o) => [
|
|
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) => [
|
|
677
|
-
chips: (e, t, o) => [
|
|
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:
|
|
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:
|
|
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) => [
|
|
697
|
-
chips: (e, t, 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
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
721
|
+
}, no = {
|
|
724
722
|
goalkeeper: "goalkeeper",
|
|
725
723
|
defender: "defender",
|
|
726
724
|
midfielder: "midfielder",
|
|
727
725
|
forward: "forward"
|
|
728
|
-
},
|
|
729
|
-
const { colors: d } =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
788
|
-
var
|
|
789
|
-
const { colors: t, radius: o, fonts: s } =
|
|
790
|
-
const
|
|
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:
|
|
793
|
-
name:
|
|
794
|
-
photo: a.photo(
|
|
795
|
-
initial:
|
|
796
|
-
team: a.name(
|
|
797
|
-
teamLogo: a.logo(
|
|
798
|
-
position:
|
|
799
|
-
cta:
|
|
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
|
-
},
|
|
799
|
+
}, v = b[0] ? T(b[0]) : null;
|
|
802
800
|
return /* @__PURE__ */ y(
|
|
803
|
-
|
|
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
|
-
|
|
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(
|
|
822
|
+
children: d(h.title)
|
|
825
823
|
}
|
|
826
824
|
),
|
|
827
|
-
|
|
828
|
-
|
|
825
|
+
v && b[0] ? /* @__PURE__ */ y(
|
|
826
|
+
m,
|
|
829
827
|
{
|
|
830
|
-
component: (
|
|
831
|
-
href: ((
|
|
832
|
-
target: (
|
|
833
|
-
onClick: (D =
|
|
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:
|
|
840
|
+
cursor: g ? "pointer" : "default",
|
|
843
841
|
textDecoration: "none",
|
|
844
842
|
color: "inherit"
|
|
845
843
|
},
|
|
846
844
|
children: [
|
|
847
845
|
/* @__PURE__ */ r(
|
|
848
|
-
|
|
846
|
+
Ae,
|
|
849
847
|
{
|
|
850
|
-
photo:
|
|
851
|
-
initial:
|
|
848
|
+
photo: v.photo,
|
|
849
|
+
initial: v.initial,
|
|
852
850
|
size: 60,
|
|
853
851
|
badge: 24,
|
|
854
|
-
teamLogo:
|
|
852
|
+
teamLogo: v.teamLogo,
|
|
855
853
|
hero: !0
|
|
856
854
|
}
|
|
857
855
|
),
|
|
858
|
-
/* @__PURE__ */ y(
|
|
859
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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: [
|
|
868
|
+
children: [v.team, v.position].filter(Boolean).join(" · ")
|
|
871
869
|
}
|
|
872
870
|
),
|
|
873
|
-
/* @__PURE__ */ r(
|
|
874
|
-
|
|
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:
|
|
883
|
+
children: R
|
|
886
884
|
},
|
|
887
|
-
|
|
885
|
+
R
|
|
888
886
|
)) })
|
|
889
887
|
] }),
|
|
890
|
-
/* @__PURE__ */ y(
|
|
891
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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(
|
|
899
|
+
children: d(h.unit)
|
|
902
900
|
}
|
|
903
901
|
)
|
|
904
902
|
] })
|
|
905
903
|
]
|
|
906
904
|
}
|
|
907
905
|
) : null,
|
|
908
|
-
b.slice(1).map((
|
|
909
|
-
var
|
|
910
|
-
const
|
|
906
|
+
b.slice(1).map((R) => {
|
|
907
|
+
var E, $, k, F;
|
|
908
|
+
const M = T(R);
|
|
911
909
|
return /* @__PURE__ */ y(
|
|
912
|
-
|
|
910
|
+
m,
|
|
913
911
|
{
|
|
914
|
-
component: (
|
|
915
|
-
href: ((
|
|
916
|
-
target: (
|
|
917
|
-
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:
|
|
923
|
+
cursor: g ? "pointer" : "default",
|
|
926
924
|
textDecoration: "none",
|
|
927
925
|
color: "inherit",
|
|
928
|
-
"&:hover": { backgroundColor:
|
|
926
|
+
"&:hover": { backgroundColor: g ? t.onSurface : "transparent" }
|
|
929
927
|
},
|
|
930
928
|
children: [
|
|
931
|
-
/* @__PURE__ */ r(
|
|
932
|
-
/* @__PURE__ */ r(
|
|
933
|
-
/* @__PURE__ */ y(
|
|
934
|
-
/* @__PURE__ */ r(
|
|
935
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
935
|
+
/* @__PURE__ */ r(w, { size: 16, weight: 700, color: t.primary, children: R.value })
|
|
938
936
|
]
|
|
939
937
|
},
|
|
940
|
-
|
|
938
|
+
M.id
|
|
941
939
|
);
|
|
942
940
|
}),
|
|
943
|
-
f.length >
|
|
944
|
-
|
|
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
|
-
},
|
|
967
|
-
const { colors: e, radius: t, fonts: o } =
|
|
968
|
-
return /* @__PURE__ */ y(
|
|
969
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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:
|
|
983
|
-
const b =
|
|
980
|
+
children: he.map((f, C) => {
|
|
981
|
+
const b = C === d;
|
|
984
982
|
return /* @__PURE__ */ r(
|
|
985
|
-
|
|
983
|
+
m,
|
|
986
984
|
{
|
|
987
985
|
component: "button",
|
|
988
986
|
type: "button",
|
|
989
|
-
onClick: () => l(
|
|
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(
|
|
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
|
-
|
|
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:
|
|
1016
|
+
children: h.map((f) => /* @__PURE__ */ r(ro, { category: f }, f))
|
|
1019
1017
|
}
|
|
1020
1018
|
)
|
|
1021
1019
|
] });
|
|
1022
|
-
},
|
|
1023
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1033
|
+
w,
|
|
1142
1034
|
{
|
|
1143
1035
|
size: 14,
|
|
1144
1036
|
weight: 700,
|
|
1145
1037
|
font: "secondary",
|
|
1146
|
-
color:
|
|
1038
|
+
color: h > f ? a.text : a.dim,
|
|
1147
1039
|
sx: { textAlign: "right" },
|
|
1148
|
-
children:
|
|
1040
|
+
children: C(t)
|
|
1149
1041
|
}
|
|
1150
1042
|
),
|
|
1151
|
-
/* @__PURE__ */ y(
|
|
1152
|
-
/* @__PURE__ */ r(
|
|
1153
|
-
/* @__PURE__ */ y(
|
|
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
|
-
|
|
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(
|
|
1057
|
+
children: /* @__PURE__ */ r(m, { sx: { width: `${G(l, u)}%`, backgroundColor: a.primary } })
|
|
1166
1058
|
}
|
|
1167
1059
|
),
|
|
1168
1060
|
/* @__PURE__ */ r(
|
|
1169
|
-
|
|
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
|
-
|
|
1070
|
+
m,
|
|
1179
1071
|
{
|
|
1180
1072
|
sx: {
|
|
1181
|
-
width: `${
|
|
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(
|
|
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
|
-
},
|
|
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 } =
|
|
1093
|
+
const { colors: i } = O();
|
|
1202
1094
|
return /* @__PURE__ */ r(
|
|
1203
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
1279
|
-
const { colors: t } =
|
|
1280
|
-
return e.home.goalsByPeriod.forEach((u,
|
|
1281
|
-
const f = (
|
|
1282
|
-
for (let
|
|
1283
|
-
for (let
|
|
1284
|
-
}), /* @__PURE__ */ y(
|
|
1285
|
-
/* @__PURE__ */ r(
|
|
1286
|
-
/* @__PURE__ */ r(
|
|
1287
|
-
/* @__PURE__ */ r(
|
|
1288
|
-
/* @__PURE__ */ r(
|
|
1289
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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(
|
|
1194
|
+
/* @__PURE__ */ y(m, { sx: { position: "relative", height: n(84), gridColumn: 2 }, children: [
|
|
1303
1195
|
/* @__PURE__ */ r(
|
|
1304
|
-
|
|
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
|
-
|
|
1318
|
-
const
|
|
1319
|
-
return /* @__PURE__ */ y(
|
|
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
|
-
|
|
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:
|
|
1329
|
-
height: n(
|
|
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
|
-
|
|
1228
|
+
w,
|
|
1337
1229
|
{
|
|
1338
1230
|
size: 10,
|
|
1339
1231
|
font: "secondary",
|
|
1340
|
-
weight:
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
1386
|
-
const { colors: s,
|
|
1387
|
-
|
|
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
|
-
...
|
|
1286
|
+
..._ ? { flexDirection: "row-reverse" } : {}
|
|
1521
1287
|
},
|
|
1522
1288
|
children: [
|
|
1523
|
-
/* @__PURE__ */ r(j, { url: i.logo(
|
|
1524
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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
|
-
|
|
1302
|
+
w,
|
|
1537
1303
|
{
|
|
1538
1304
|
size: 11,
|
|
1539
1305
|
font: "secondary",
|
|
1540
1306
|
weight: 700,
|
|
1541
|
-
color:
|
|
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(
|
|
1320
|
+
children: a(uo[h])
|
|
1555
1321
|
}
|
|
1556
1322
|
),
|
|
1557
1323
|
l ? /* @__PURE__ */ y(
|
|
1558
|
-
|
|
1324
|
+
m,
|
|
1559
1325
|
{
|
|
1560
1326
|
sx: {
|
|
1561
1327
|
position: "absolute",
|
|
1562
1328
|
bottom: `calc(100% + ${n(10)})`,
|
|
1563
|
-
...
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
1592
|
-
/* @__PURE__ */ r(
|
|
1593
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
1617
|
-
var
|
|
1618
|
-
const { colors: t } =
|
|
1619
|
-
return /* @__PURE__ */ y(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
1643
|
-
/* @__PURE__ */ r(
|
|
1644
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
1660
|
-
/* @__PURE__ */ r(
|
|
1661
|
-
/* @__PURE__ */ r(
|
|
1662
|
-
/* @__PURE__ */ r(
|
|
1663
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
1441
|
+
B,
|
|
1676
1442
|
{
|
|
1677
1443
|
label: d("cleanSheets"),
|
|
1678
|
-
home: ((
|
|
1679
|
-
away: ((
|
|
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
|
-
|
|
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(
|
|
1686
|
-
/* @__PURE__ */ r(
|
|
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
|
-
`${
|
|
1454
|
+
`${h.fullTime[0]}:${h.fullTime[1]}`,
|
|
1689
1455
|
" ",
|
|
1690
|
-
/* @__PURE__ */ r(
|
|
1456
|
+
/* @__PURE__ */ r(m, { component: "span", sx: { unicodeBidi: "plaintext" }, children: s.name(h.away.id) }),
|
|
1691
1457
|
" ",
|
|
1692
|
-
d("previousMeetingRound", { round:
|
|
1458
|
+
d("previousMeetingRound", { round: h.round })
|
|
1693
1459
|
] })
|
|
1694
1460
|
] }) : null
|
|
1695
1461
|
] });
|
|
1696
|
-
},
|
|
1697
|
-
var H,
|
|
1698
|
-
const { colors: i, radius: a } =
|
|
1699
|
-
|
|
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
|
-
|
|
1703
|
-
|
|
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,
|
|
1475
|
+
) : null, k = {
|
|
1706
1476
|
// A price click must not toggle the row.
|
|
1707
|
-
onClick: (
|
|
1708
|
-
onKeyDown: (
|
|
1709
|
-
},
|
|
1710
|
-
|
|
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:
|
|
1714
|
-
color:
|
|
1483
|
+
weight: K ? 700 : 500,
|
|
1484
|
+
color: ne && !P ? i.dim : i.text,
|
|
1715
1485
|
ellipsis: !0,
|
|
1716
1486
|
cms: !0,
|
|
1717
|
-
sx:
|
|
1718
|
-
children: d.name(
|
|
1487
|
+
sx: X ? { textAlign: "right" } : void 0,
|
|
1488
|
+
children: d.name(W)
|
|
1719
1489
|
}
|
|
1720
1490
|
);
|
|
1721
|
-
return /* @__PURE__ */ y(
|
|
1491
|
+
return /* @__PURE__ */ y(m, { sx: { borderBottom: `1px solid ${i.border}` }, children: [
|
|
1722
1492
|
/* @__PURE__ */ y(
|
|
1723
|
-
|
|
1493
|
+
m,
|
|
1724
1494
|
{
|
|
1725
|
-
...
|
|
1495
|
+
...z ? {
|
|
1726
1496
|
role: "button",
|
|
1727
1497
|
"aria-expanded": o,
|
|
1728
1498
|
tabIndex: 0,
|
|
1729
1499
|
onClick: s,
|
|
1730
|
-
onKeyDown: (
|
|
1731
|
-
(
|
|
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(
|
|
1507
|
+
D ? n(h ? 80 : 60) : null,
|
|
1738
1508
|
"minmax(0,1fr) auto minmax(0,1fr)",
|
|
1739
|
-
|
|
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:
|
|
1517
|
+
cursor: z ? "pointer" : "default",
|
|
1748
1518
|
backgroundColor: o ? i.onSurface : "transparent",
|
|
1749
|
-
borderLeft: `3px solid ${
|
|
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
|
-
...
|
|
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
|
-
|
|
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
|
-
|
|
1769
|
-
|
|
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
|
-
|
|
1552
|
+
w,
|
|
1783
1553
|
{
|
|
1784
1554
|
size: 13,
|
|
1785
1555
|
font: "secondary",
|
|
1786
1556
|
weight: 700,
|
|
1787
|
-
color:
|
|
1788
|
-
children:
|
|
1557
|
+
color: C ? i.danger : i.text,
|
|
1558
|
+
children: R
|
|
1789
1559
|
}
|
|
1790
1560
|
),
|
|
1791
|
-
|
|
1792
|
-
|
|
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: (
|
|
1799
|
-
|
|
1568
|
+
onClick: (W) => {
|
|
1569
|
+
W.stopPropagation(), h(e.id);
|
|
1800
1570
|
},
|
|
1801
|
-
onKeyDown: (
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1847
|
-
|
|
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
|
-
|
|
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 ||
|
|
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 ||
|
|
1645
|
+
children: f || C ? `${b} : ${g}` : "–"
|
|
1876
1646
|
}
|
|
1877
1647
|
),
|
|
1878
|
-
(f ||
|
|
1879
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1672
|
+
F(e.away.id, v, T, !1)
|
|
1903
1673
|
]
|
|
1904
1674
|
}
|
|
1905
1675
|
),
|
|
1906
|
-
|
|
1676
|
+
E ? /* @__PURE__ */ r(m, { ...k, sx: { minWidth: 0, cursor: "default" }, children: $ }) : null,
|
|
1907
1677
|
/* @__PURE__ */ r(
|
|
1908
|
-
|
|
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:
|
|
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
|
-
|
|
1930
|
-
|
|
1699
|
+
$ && !E ? /* @__PURE__ */ r(
|
|
1700
|
+
m,
|
|
1931
1701
|
{
|
|
1932
|
-
...
|
|
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(
|
|
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 &&
|
|
1946
|
-
|
|
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 ||
|
|
1726
|
+
children: f || C ? /* @__PURE__ */ r(co, { match: e }) : /* @__PURE__ */ r(po, { match: e })
|
|
1957
1727
|
}
|
|
1958
1728
|
) : null
|
|
1959
1729
|
] });
|
|
1960
|
-
},
|
|
1961
|
-
var ve,
|
|
1962
|
-
const { colors: e, radius: t, fonts: o } =
|
|
1963
|
-
(
|
|
1964
|
-
),
|
|
1965
|
-
new Set(
|
|
1966
|
-
).sort((
|
|
1967
|
-
() =>
|
|
1968
|
-
[
|
|
1969
|
-
),
|
|
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
|
-
|
|
1741
|
+
markets: [((Ie = c.odds) == null ? void 0 : Ie.market) ?? "FT_1X2"],
|
|
1975
1742
|
sport: i.sport,
|
|
1976
|
-
pollingIntervalMs: (
|
|
1743
|
+
pollingIntervalMs: ($e = c.odds) == null ? void 0 : $e.pollingInterval,
|
|
1977
1744
|
operators: (Te = c.odds) == null ? void 0 : Te.operators,
|
|
1978
|
-
affiliateId: (
|
|
1745
|
+
affiliateId: (ke = c.odds) == null ? void 0 : ke.affiliateId,
|
|
1979
1746
|
affiliateIds: (_e = c.odds) == null ? void 0 : _e.affiliateIds
|
|
1980
|
-
}),
|
|
1981
|
-
from:
|
|
1982
|
-
to:
|
|
1983
|
-
matches: d("matchesCount", { count:
|
|
1984
|
-
}) : "",
|
|
1985
|
-
|
|
1986
|
-
const
|
|
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
|
-
}),
|
|
1991
|
-
|
|
1757
|
+
}), Re = ue.find((et) => et.label === L);
|
|
1758
|
+
Re ? Re.rows.push(x) : ue.push({ label: L, rows: [x] });
|
|
1992
1759
|
});
|
|
1993
|
-
const
|
|
1994
|
-
|
|
1995
|
-
},
|
|
1996
|
-
|
|
1997
|
-
},
|
|
1998
|
-
|
|
1999
|
-
},
|
|
2000
|
-
const
|
|
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
|
-
|
|
1769
|
+
m,
|
|
2003
1770
|
{
|
|
2004
1771
|
component: "button",
|
|
2005
1772
|
type: "button",
|
|
2006
|
-
onClick: () =>
|
|
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:
|
|
2016
|
-
color:
|
|
2017
|
-
boxShadow:
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2049
|
-
|
|
1815
|
+
Se("upcoming"),
|
|
1816
|
+
Se("results")
|
|
2050
1817
|
]
|
|
2051
1818
|
}
|
|
2052
1819
|
),
|
|
2053
|
-
/* @__PURE__ */ r(
|
|
1820
|
+
/* @__PURE__ */ r(w, { size: 11, font: "secondary", color: e.dim, children: Xe })
|
|
2054
1821
|
]
|
|
2055
1822
|
}
|
|
2056
1823
|
),
|
|
2057
|
-
|
|
1824
|
+
F ? (
|
|
2058
1825
|
// Pills styled like the Standings stage tabs.
|
|
2059
1826
|
/* @__PURE__ */ r(
|
|
2060
|
-
|
|
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:
|
|
2073
|
-
const
|
|
1839
|
+
children: k.map((x) => {
|
|
1840
|
+
const L = x.id === p;
|
|
2074
1841
|
return /* @__PURE__ */ r(
|
|
2075
|
-
|
|
1842
|
+
m,
|
|
2076
1843
|
{
|
|
2077
1844
|
component: "button",
|
|
2078
1845
|
type: "button",
|
|
2079
1846
|
role: "tab",
|
|
2080
|
-
"aria-selected":
|
|
2081
|
-
onClick: () =>
|
|
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:
|
|
2097
|
-
color:
|
|
2098
|
-
"&:hover":
|
|
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:
|
|
1867
|
+
children: Ze(x)
|
|
2101
1868
|
},
|
|
2102
|
-
|
|
1869
|
+
x.id
|
|
2103
1870
|
);
|
|
2104
1871
|
})
|
|
2105
1872
|
}
|
|
2106
1873
|
)
|
|
2107
1874
|
) : null,
|
|
2108
|
-
|
|
2109
|
-
|
|
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:
|
|
2121
|
-
const
|
|
1887
|
+
children: W.map((x) => {
|
|
1888
|
+
const L = x === ne;
|
|
2122
1889
|
return /* @__PURE__ */ r(
|
|
2123
|
-
|
|
1890
|
+
m,
|
|
2124
1891
|
{
|
|
2125
1892
|
component: "button",
|
|
2126
1893
|
type: "button",
|
|
2127
|
-
onClick: () =>
|
|
1894
|
+
onClick: () => Je(x),
|
|
2128
1895
|
sx: {
|
|
2129
1896
|
flexShrink: 0,
|
|
2130
|
-
border: `1px solid ${
|
|
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:
|
|
2138
|
-
color:
|
|
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:
|
|
1908
|
+
children: d("round", { round: x })
|
|
2142
1909
|
},
|
|
2143
|
-
|
|
1910
|
+
x
|
|
2144
1911
|
);
|
|
2145
1912
|
})
|
|
2146
1913
|
}
|
|
2147
1914
|
) : null,
|
|
2148
|
-
|
|
1915
|
+
ue.map((x) => /* @__PURE__ */ y(A.Fragment, { children: [
|
|
2149
1916
|
/* @__PURE__ */ r(
|
|
2150
|
-
|
|
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:
|
|
1929
|
+
children: x.label
|
|
2163
1930
|
}
|
|
2164
1931
|
),
|
|
2165
|
-
|
|
2166
|
-
|
|
1932
|
+
x.rows.map((L) => /* @__PURE__ */ r(
|
|
1933
|
+
mo,
|
|
2167
1934
|
{
|
|
2168
|
-
match:
|
|
2169
|
-
odds:
|
|
2170
|
-
open:
|
|
2171
|
-
onToggle: () => D(
|
|
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
|
-
|
|
1940
|
+
L.id
|
|
2174
1941
|
))
|
|
2175
|
-
] },
|
|
2176
|
-
|
|
2177
|
-
|
|
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:
|
|
1951
|
+
children: E.length > 0 ? d("noMatches") : d(R ? "noUpcomingMatches" : "noResultsYet")
|
|
2185
1952
|
}
|
|
2186
1953
|
) : null
|
|
2187
1954
|
] });
|
|
2188
|
-
},
|
|
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
|
-
),
|
|
1966
|
+
), We = ({
|
|
2200
1967
|
widths: e,
|
|
2201
1968
|
height: t
|
|
2202
1969
|
}) => {
|
|
2203
|
-
const { radius: o } =
|
|
1970
|
+
const { radius: o } = O();
|
|
2204
1971
|
return /* @__PURE__ */ r(
|
|
2205
|
-
|
|
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(
|
|
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 } =
|
|
1989
|
+
const { colors: s, radius: i } = O();
|
|
2223
1990
|
return /* @__PURE__ */ y(
|
|
2224
|
-
|
|
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
|
-
|
|
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(
|
|
2021
|
+
/* @__PURE__ */ y(m, { children: [
|
|
2255
2022
|
o,
|
|
2256
|
-
/* @__PURE__ */ r(
|
|
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
|
-
},
|
|
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,
|
|
2038
|
+
const i = Math.min(t, fo), a = e < i ? i : t - i;
|
|
2272
2039
|
return Math.floor(12 / a);
|
|
2273
|
-
},
|
|
2274
|
-
const { colors: e, radius: t } =
|
|
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:
|
|
2045
|
+
sub: l("remaining", { count: h.total - f })
|
|
2279
2046
|
},
|
|
2280
2047
|
{
|
|
2281
2048
|
label: l("totalGoals"),
|
|
2282
|
-
value:
|
|
2283
|
-
sub: l("goalsPerMatchValue", { value: c.decimal(f ?
|
|
2049
|
+
value: h.goals,
|
|
2050
|
+
sub: l("goalsPerMatchValue", { value: c.decimal(f ? h.goals / f : 0, 2) })
|
|
2284
2051
|
},
|
|
2285
|
-
{ label: l("homeWins"), value: `${
|
|
2052
|
+
{ label: l("homeWins"), value: `${G(h.homeWins, f)}%`, sub: C(h.homeWins) },
|
|
2286
2053
|
{
|
|
2287
2054
|
label: l("bothTeamsScored"),
|
|
2288
|
-
value: `${
|
|
2055
|
+
value: `${G(h.bothScored, f)}%`,
|
|
2289
2056
|
sub: l("bttsSummary", {
|
|
2290
|
-
matches: l("matchesCount", { count:
|
|
2291
|
-
goalless:
|
|
2057
|
+
matches: l("matchesCount", { count: h.bothScored }),
|
|
2058
|
+
goalless: h.goalless
|
|
2292
2059
|
})
|
|
2293
2060
|
}
|
|
2294
|
-
],
|
|
2295
|
-
{ label: l("homeWin"), n:
|
|
2296
|
-
{ label: l("draw"), n:
|
|
2297
|
-
{ label: l("awayWin"), n:
|
|
2298
|
-
],
|
|
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:
|
|
2069
|
+
pct: G(h.over(p), f)
|
|
2303
2070
|
})),
|
|
2304
|
-
{ label: l("bothTeamsScored"), pct:
|
|
2305
|
-
{ label: l("goallessDraw"), pct:
|
|
2306
|
-
],
|
|
2307
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2312
|
-
var
|
|
2313
|
-
return ((
|
|
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 ((
|
|
2084
|
+
var I;
|
|
2085
|
+
return ((I = d.get(p)) == null ? void 0 : I.cleanSheets) ?? 0;
|
|
2319
2086
|
},
|
|
2320
2087
|
() => l("unitMatches")
|
|
2321
|
-
),
|
|
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
|
-
|
|
2324
|
-
var
|
|
2325
|
-
return (((
|
|
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
|
|
2330
|
-
return (((
|
|
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
|
|
2334
|
-
return `${l("yellowCount", { count: ((
|
|
2335
|
-
count: ((
|
|
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
|
|
2340
|
-
|
|
2341
|
-
const
|
|
2342
|
-
return /* @__PURE__ */ y(
|
|
2343
|
-
/* @__PURE__ */ r(
|
|
2344
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
2350
|
-
/* @__PURE__ */ r(
|
|
2351
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
2123
|
+
/* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
|
|
2357
2124
|
/* @__PURE__ */ y(se, { children: [
|
|
2358
|
-
/* @__PURE__ */ r(
|
|
2359
|
-
/* @__PURE__ */ r(
|
|
2360
|
-
/* @__PURE__ */ r(
|
|
2361
|
-
|
|
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
|
-
|
|
2373
|
-
/* @__PURE__ */ r(
|
|
2374
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
2382
|
-
/* @__PURE__ */ r(
|
|
2383
|
-
/* @__PURE__ */ y(
|
|
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(
|
|
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(
|
|
2158
|
+
/* @__PURE__ */ r(m, { component: "b", sx: { color: e.text }, children: h.secondHalfGoals })
|
|
2392
2159
|
] })
|
|
2393
2160
|
] }),
|
|
2394
2161
|
/* @__PURE__ */ r(
|
|
2395
|
-
|
|
2162
|
+
We,
|
|
2396
2163
|
{
|
|
2397
2164
|
height: 8,
|
|
2398
2165
|
widths: [
|
|
2399
|
-
{ w:
|
|
2400
|
-
{ w:
|
|
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
|
-
|
|
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:
|
|
2415
|
-
|
|
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(
|
|
2193
|
+
/* @__PURE__ */ r(w, { size: 11, font: "secondary", weight: 700, color: e.text, children: p }),
|
|
2427
2194
|
/* @__PURE__ */ r(
|
|
2428
|
-
|
|
2195
|
+
m,
|
|
2429
2196
|
{
|
|
2430
2197
|
sx: {
|
|
2431
2198
|
width: "100%",
|
|
2432
|
-
height: n(Math.max(6, Math.round(p /
|
|
2199
|
+
height: n(Math.max(6, Math.round(p / P * 56))),
|
|
2433
2200
|
borderRadius: `${t.xs} ${t.xs} 0 0`,
|
|
2434
|
-
backgroundColor: p ===
|
|
2201
|
+
backgroundColor: p === P ? e.primary : e.tint2
|
|
2435
2202
|
}
|
|
2436
2203
|
}
|
|
2437
2204
|
)
|
|
2438
2205
|
]
|
|
2439
2206
|
},
|
|
2440
|
-
|
|
2207
|
+
De[I]
|
|
2441
2208
|
))
|
|
2442
2209
|
}
|
|
2443
2210
|
),
|
|
2444
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
2214
|
+
/* @__PURE__ */ y(m, { sx: { display: "grid", gridTemplateColumns: ge, gap: n(12) }, children: [
|
|
2448
2215
|
/* @__PURE__ */ y(se, { children: [
|
|
2449
|
-
/* @__PURE__ */ r(
|
|
2450
|
-
|
|
2451
|
-
|
|
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(
|
|
2461
|
-
/* @__PURE__ */ r(
|
|
2462
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
2470
|
-
/* @__PURE__ */ y(
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
2513
|
-
|
|
2514
|
-
/* @__PURE__ */ r(
|
|
2515
|
-
|
|
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
|
-
|
|
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(
|
|
2534
|
-
/* @__PURE__ */ r(
|
|
2535
|
-
{ n:
|
|
2536
|
-
{ n:
|
|
2537
|
-
].map((p) => /* @__PURE__ */ y(
|
|
2538
|
-
/* @__PURE__ */ y(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2340
|
+
g(p.n, 20)
|
|
2574
2341
|
] }, p.key)) })
|
|
2575
2342
|
]
|
|
2576
2343
|
}
|
|
2577
2344
|
)
|
|
2578
2345
|
] })
|
|
2579
2346
|
] }),
|
|
2580
|
-
|
|
2581
|
-
|
|
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:
|
|
2589
|
-
const
|
|
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:
|
|
2594
|
-
href: (
|
|
2595
|
-
target:
|
|
2596
|
-
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:
|
|
2603
|
-
gridColumn: `span ${
|
|
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:
|
|
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(
|
|
2611
|
-
/* @__PURE__ */ r(
|
|
2612
|
-
/* @__PURE__ */ r(
|
|
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(
|
|
2615
|
-
/* @__PURE__ */ r(
|
|
2616
|
-
/* @__PURE__ */ r(
|
|
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
|
-
|
|
2626
|
-
const
|
|
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:
|
|
2631
|
-
href: (
|
|
2632
|
-
target:
|
|
2633
|
-
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:
|
|
2406
|
+
cursor: U ? "pointer" : "default",
|
|
2640
2407
|
textDecoration: "none",
|
|
2641
2408
|
color: "inherit",
|
|
2642
|
-
"&:hover": { backgroundColor:
|
|
2409
|
+
"&:hover": { backgroundColor: U ? e.onSurface : e.surface }
|
|
2643
2410
|
},
|
|
2644
2411
|
children: [
|
|
2645
|
-
/* @__PURE__ */ y(
|
|
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:
|
|
2649
|
-
date: c.date(
|
|
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
|
-
|
|
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(
|
|
2663
|
-
/* @__PURE__ */ r(
|
|
2664
|
-
/* @__PURE__ */ r(j, { url: a.logo(
|
|
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
|
-
|
|
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: `${
|
|
2445
|
+
children: `${W} : ${K}`
|
|
2679
2446
|
}
|
|
2680
2447
|
),
|
|
2681
|
-
/* @__PURE__ */ y(
|
|
2682
|
-
/* @__PURE__ */ r(j, { url: a.logo(
|
|
2683
|
-
/* @__PURE__ */ r(
|
|
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
|
-
},
|
|
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 =
|
|
2468
|
+
sections: d = bo,
|
|
2702
2469
|
liveRefresh: l = !0,
|
|
2703
|
-
refreshInterval: c =
|
|
2470
|
+
refreshInterval: c = wo,
|
|
2704
2471
|
labels: u
|
|
2705
|
-
} = e, { colors:
|
|
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
|
-
),
|
|
2712
|
-
let
|
|
2713
|
-
return
|
|
2714
|
-
|
|
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:
|
|
2717
|
-
children:
|
|
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
|
-
|
|
2487
|
+
m,
|
|
2721
2488
|
{
|
|
2722
2489
|
sx: {
|
|
2723
2490
|
fontSize: "1em",
|
|
2724
2491
|
fontFamily: f.primary,
|
|
2725
|
-
color:
|
|
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:
|
|
2498
|
+
children: E
|
|
2732
2499
|
}
|
|
2733
2500
|
);
|
|
2734
|
-
},
|
|
2735
|
-
const [t, o] =
|
|
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 =
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
}, [e.language]),
|
|
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)),
|
|
2745
|
-
const
|
|
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
|
-
(
|
|
2514
|
+
(v) => (v == null ? void 0 : v.key) === T ? v : ut(
|
|
2748
2515
|
"competition-statistics",
|
|
2749
2516
|
c.current,
|
|
2750
2517
|
a
|
|
@@ -2753,19 +2520,26 @@ const At = Rt("Tv", [
|
|
|
2753
2520
|
o(!1);
|
|
2754
2521
|
};
|
|
2755
2522
|
}, [a]);
|
|
2756
|
-
const
|
|
2523
|
+
const C = e.themeOptions, b = /* @__PURE__ */ r(
|
|
2524
|
+
m,
|
|
2525
|
+
{
|
|
2526
|
+
ref: l,
|
|
2527
|
+
lang: e.language || "en",
|
|
2528
|
+
sx: { height: "100%", display: "block" }
|
|
2529
|
+
}
|
|
2530
|
+
), g = t && s && u.current && h ? xt(
|
|
2757
2531
|
// Keyed on the cache, not on `direction`: it must change in the same render that adopts
|
|
2758
2532
|
// the new cache, or CssVarsProvider writes its CSS variables into the outgoing cache and
|
|
2759
2533
|
// never repeats.
|
|
2760
|
-
/* @__PURE__ */ r(
|
|
2761
|
-
|
|
2534
|
+
/* @__PURE__ */ r(pt, { value: h, children: /* @__PURE__ */ r(mt, { containerRef: l, children: /* @__PURE__ */ r(
|
|
2535
|
+
ht,
|
|
2762
2536
|
{
|
|
2763
|
-
customTheme:
|
|
2764
|
-
mode:
|
|
2537
|
+
customTheme: C,
|
|
2538
|
+
mode: C == null ? void 0 : C.mode,
|
|
2765
2539
|
shadowRootElement: u.current,
|
|
2766
2540
|
direction: a,
|
|
2767
2541
|
children: /* @__PURE__ */ y(
|
|
2768
|
-
|
|
2542
|
+
gt,
|
|
2769
2543
|
{
|
|
2770
2544
|
shadowRootElement: u.current,
|
|
2771
2545
|
leadPhoneCountryCode: null,
|
|
@@ -2774,7 +2548,7 @@ const At = Rt("Tv", [
|
|
|
2774
2548
|
direction: a,
|
|
2775
2549
|
children: [
|
|
2776
2550
|
/* @__PURE__ */ r(
|
|
2777
|
-
|
|
2551
|
+
It,
|
|
2778
2552
|
{
|
|
2779
2553
|
styles: {
|
|
2780
2554
|
"@keyframes cs-pulse": {
|
|
@@ -2789,14 +2563,14 @@ const At = Rt("Tv", [
|
|
|
2789
2563
|
}
|
|
2790
2564
|
)
|
|
2791
2565
|
}
|
|
2792
|
-
) }) },
|
|
2566
|
+
) }) }, h.key),
|
|
2793
2567
|
u.current
|
|
2794
2568
|
) : null;
|
|
2795
|
-
return /* @__PURE__ */ y(
|
|
2569
|
+
return /* @__PURE__ */ y(ye, { children: [
|
|
2796
2570
|
b,
|
|
2797
|
-
|
|
2571
|
+
g
|
|
2798
2572
|
] });
|
|
2799
|
-
},
|
|
2573
|
+
}, vo = (e) => /* @__PURE__ */ r(So, { ...e, children: /* @__PURE__ */ r(Co, { ...e }) }), Lo = vo;
|
|
2800
2574
|
export {
|
|
2801
|
-
|
|
2575
|
+
Lo as CompetitionStatistics
|
|
2802
2576
|
};
|