@livescoresnu/footballui
Version:
1,844 lines • 70.5 kB
JavaScript
import { jsx as r, jsxs as I, Fragment as s } from "react/jsx-runtime";
import W, { useState as $, useEffect as p } from "react";
function y(e, l, A, _) {
if (!l || !A)
return { homeTeamScore: null, awayTeamScore: null };
const a = e?.find(
(L) => L.type_id === _ && L.participant_id === l
)?.score?.goals, o = e?.find(
(L) => L.type_id === _ && L.participant_id === A
)?.score?.goals;
return { homeTeamScore: a, awayTeamScore: o };
}
function ee(e, l) {
if (!e || !l) return !1;
const A = e?.find(
(a) => a.score.participant === "home"
)?.score?.goals, _ = l?.find(
(a) => a.score.participant === "home"
)?.score?.goals;
return A !== _;
}
function re(e) {
if (!e)
return { homeTeam: null, awayTeam: null };
const l = e?.find((_) => _.meta?.location === "home") || null, A = e?.find((_) => _.meta?.location === "away") || null;
return { homeTeam: l, awayTeam: A };
}
function le(e) {
if (!e)
return { homeTeam: null, awayTeam: null };
let l = e?.find((_) => _.location === "home")?.participant ?? null, A = e?.find((_) => _.location === "away")?.participant ?? null;
return { homeTeam: l, awayTeam: A };
}
function _e(...e) {
return e.filter(Boolean).join(" ");
}
const Ee = (e) => {
switch (e) {
case 2:
return "grid-cols-[auto_minmax(80px,1fr)_auto]";
case 3:
return "grid-cols-[auto_minmax(80px,1fr)_auto_minmax(80px,1fr)_auto]";
case 4:
return "grid-cols-[auto_minmax(80px,1fr)_auto_minmax(80px,1fr)_auto_minmax(80px,1fr)_auto]";
default:
return "";
}
};
function Ae(e, l) {
const A = [
"Round of 16",
"Quarter-Final",
"Quarter finals",
"Semi finals",
"Final"
], a = {
2: [3, 4],
// indices of "Semi finals", "Final"
3: [1, 3, 4],
// indices of "Quarter-Final", "Semi finals", "Final"
4: [0, 2, 3, 4]
// indices of "Round of 16", "Quarter finals", "Semi finals", "Final"
}[e];
return !a || l < 1 || l > a.length ? (console.error("Invalid totalCols or currCol"), "Unknown Stage") : A[a[l - 1]];
}
const ae = (e) => {
const l = {}, A = [];
e.forEach((O) => {
O.id !== null && (l[O.id] = {
...O,
children: []
});
}), e.forEach((O) => {
O.id !== null && (O.parent_id !== null ? l[O.parent_id].children.push(l[O.id]) : A.push(l[O.id]));
});
const _ = [], a = Math.log2(e.length + 1), o = Array(Math.floor(a)).fill(0), L = (O, d) => {
const E = a - d;
o[E] = (o[E] || 0) + 1;
const C = o[E];
_.push({
...O,
id: O.id,
column: E,
rowOrder: C
}), O.children.length === 2 && (O.children[0].is_first ? (L(O.children[0], d + 1), L(O.children[1], d + 1)) : (L(O.children[1], d + 1), L(O.children[0], d + 1)));
};
return A.length === 1 && L(A[0], 0), _;
};
function Le(e, l) {
const A = {};
return e.forEach((_) => {
const a = _.type_id, o = l && l.reduce((L, O) => {
const d = O?.details?.find(
(C) => C.type_id === _.type_id
), E = d ? d.value.total ?? 0 : 0;
return L + E;
}, 0);
A[a] = o ?? 0;
}), A;
}
const N = {
getCurrentEventScores: y,
getHomeAndAwayTeams: re,
getHomeAndAwayTeamsByFormation: le,
classNames: _e,
isHomeGoal: ee,
addBracketColumnAndRowOrders: ae,
getBracketGridClass: Ee,
getBracketHeader: Ae,
getStatsTotals: Le
};
function Oe(e) {
const { starting_at_timestamp: l, showTime: A, showDate: _ } = e, a = l ? new Date(l * 1e3) : null, o = a?.toLocaleString(void 0, {
hour: "2-digit",
hour12: !1,
minute: "2-digit"
});
let L;
const d = (/* @__PURE__ */ new Date()).getFullYear(), E = a?.getFullYear();
return d === E ? L = a?.toLocaleString(void 0, {
day: "2-digit",
month: "2-digit"
}) : L = a?.toLocaleString(void 0, {
//year: "2-digit",
day: "2-digit",
month: "2-digit"
}), /* @__PURE__ */ r("div", { className: "flex w-fit justify-center items-center px-1 sm:px-2", children: /* @__PURE__ */ I("div", { className: "flex items-center flex-col", children: [
_ && /* @__PURE__ */ r("div", { className: "text-xs text-center font-normal whitespace-nowrap", children: L }),
A && /* @__PURE__ */ r(
"div",
{
className: N.classNames(
_ ? "leading-[0.9rem] pt-0.5" : "",
"text-xs font-semibold text-center"
),
children: o
}
)
] }) });
}
function x(e) {
const { image: l, subImages: A, size: _, rounded: a, shadow: o, altText: L } = e;
return /* @__PURE__ */ I(
"div",
{
className: N.classNames(
o ? "pb-1" : "",
"grid grid-cols-1 shrink-0"
),
style: o ? {
backgroundImage: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAAAfCAYAAACCj930AAAE1UlEQVR4nO2c63LUMAyFlaXADAzv/7a7/AAX7ek5ujhOm+2imYxt2ZHt+Itkpyzbrx8/7b/cyWZmt79pR8Y93XtvzX6eRl4+egALpAvRUTY3SI/sC8W/GAb5h5VHgHPWk417j2y/WjpAMU/tx6/mgs/ytBCfBc4MispDn63r9L1SIigyYBSQFZs4Hza/UwD7HnCu8F4VXVSerYt0WZsKYNXybJ0vVyBWAEdtD5Oj4JxZTKZjEFV0URuVKl2lnAlbSAXYbTLttNmI3ozvVRWE6mVctt9dBWc3nCrPlUGV6aI2mZ0ojfKZVLxelCqdaqPaKXtoG8FVsDGwfX43oLNwdmBU5SjNwMIrqsvasT5ZyuaidEO6YGaQKR27onZZf5gibOyAqmCdhrQKJ54K2QC6IbgL3SVotzXbYZ9sPGr8qhxJJYRXPaS6rpN1kX0cz0g7sKrnlEKbwVldnE207XrADDYELytXAe3MdYUoj1rxph1Ar8U6r4v68nUIKM6l4jmVDTOL4VQLohYu8og+3wGQ5THtQMnGG831KMn6q4T/KqRXkSrdjKcNIRPz8utA70U4o4emFjMD0ewPPCNlUGYQRmAqONmYHkWiF6fiVRlsClKWXoQNBqQfBxsnmxfWUf0LVDKpeMqRKkAYPBF0l6Q+85Zq7J9B8LkzSC92D5QvMxg9kAO6Ddp5GK/GAcu8pw/5KbwvFi9gxVuOtHJlXpGVI48Zhe1nkTF35s1YeUDoYdxE3qcezAvYRe/p+45AVDBvZnbbs+f8KDARUIP8s4qHwZf9QQfBvIANDwu2GzbUNgPrGKAV7/pqCwfXlSoQCmjMqzoWsrtjeAZR0SOLNFm5arszRmbrTvbCWX0LsD3bJym7eFrdO4ZnlSgEZ2Wz+Dl31qDaNgzrkfHItat7MM8AxfDj8yoU+VDx7F5UneDVN83ud1Clx/4QaAV4yM2X71+/mdUPRaPMdBWJoM7ylTd4ZkyPLuz5KKDwhJ6d4BHG7Pvnqoj3elr3Crag6JVwA8w6Gbbwutm/Aw2eJkcevaQ/IF1dOTq9m719iT4LrCoERx4O8xGMCuYMyGirVvWYd/oXUCpAsY51tgV5BNSf4MfkEbbstF79vFTZ0J9VsggSXZ2P7hnQHSjVuFVZ6eifL9FTKiO418MBRSfzcV2JTn2wZ3XZR/mxP63AquD1shfkNJTZ2+cYeccISgbY7J8rjwAyrYsORBGkyijzmgjqSKNPGOyKPGTnH3yoPnF8FuhQshdZ6ZQ39Pmup+zWVSBUIM4AGYF6J5XTOhqrLsTQ4/7S26h4V6arQHdJ7ke9Gheb84wHZQu5Es4MrtUQVl4+Jhhlpcx+SvIdZfU4GQapz1fAVfmsnOWjFPOszKTiLVVazXfKzAZLozybD9NvSZtQ9v5MI/Oq6u3CQePbVA2vM5B1QngHRj+nyDtki78n7Xi8DoQduCpAl2T1D9yiwfiFjfYnCtRKOcureysQzoRyJdH8K3UVsLI9YLRWs3VL5T1/t64mlXlb3AIwO1WYFGB79pRZ28pidrxVBbIVcL0bhErO8J8qzHrbyEZl010FcKXHHDIbJvfawvvKh5OPkDPAGUn1wVX2uqtsr5KjoOhAd1owzc4PZ1X2PmS2mLtOmg2Jtil7vOLDy2+kvEzFwgQiDAAAAABJRU5ErkJggg==)",
backgroundPositionX: "center",
backgroundPositionY: "bottom",
backgroundSize: "contain",
backgroundRepeat: "no-repeat"
} : {},
children: [
/* @__PURE__ */ r(
"div",
{
className: N.classNames(
_ == "4xlarge" ? "size-16" : _ == "2xlarge" ? "size-14" : _ == "xlarge" ? "size-12" : _ == "large" ? "size-10 " : _ == "medium" ? "size-6" : "size-4",
A && (_ == "large" || _ == "xlarge" || _ == "2xlarge" || _ == "4xlarge") ? "m-1.5" : "",
a == "full" ? "rounded-full bg-white shadow-md" : a == "medium" ? "rounded-md" : "",
"row-start-1 col-start-1 "
),
children: typeof l == "string" ? /* @__PURE__ */ r(
"img",
{
className: N.classNames(
_ == "4xlarge" ? "size-16" : _ == "2xlarge" ? "size-14" : _ == "xlarge" ? "size-12" : _ == "large" ? "size-10" : _ == "medium" ? "size-6" : "size-4",
"object-contain",
a == "full" ? "rounded-full p-0.5" : a == "medium" ? "rounded-md" : ""
//remove this line
),
src: l,
alt: "Image of " + L || "",
crossOrigin: "anonymous",
referrerPolicy: "no-referrer"
}
) : W.isValidElement(l) ? l : /* @__PURE__ */ r(
"div",
{
className: N.classNames(
_ == "4xlarge" ? "size-16" : _ == "2xlarge" ? "size-14" : _ == "xlarge" ? "size-12" : _ == "large" ? "size-10" : _ == "medium" ? "size-6" : "size-4",
"bg-gray-100 dark:bg-white/80 rounded-full",
a == "full" ? "rounded-full p-0.5" : a == "medium" ? "rounded-md" : ""
//remove this line
)
}
)
}
),
A && (_ == "large" || _ == "xlarge" || _ == "4xlarge" || _ == "2xlarge") && /* @__PURE__ */ I("div", { className: "row-start-1 col-start-1 grid grid-cols-2 grid-rows-2 place-content-between", children: [
/* @__PURE__ */ r("div", { className: "grid col-start-1 row-start-1 self-start justify-self-start ", children: A?.topLeft && U(A?.topLeft, L) }),
/* @__PURE__ */ r("div", { className: "grid col-start-2 row-start-1 self-start justify-self-end", children: A?.topRight && U(A?.topRight, L) }),
/* @__PURE__ */ r("div", { className: "grid col-start-1 row-start-2 self-end justify-self-start", children: A?.bottomLeft && U(A?.bottomLeft, L) }),
/* @__PURE__ */ r("div", { className: "grid col-start-2 row-start-2 self-end justify-self-end", children: A?.bottomRight && U(A?.bottomRight, L) })
] })
]
}
);
}
function U(e, l) {
return typeof e == "string" ? /* @__PURE__ */ r(
"img",
{
className: "flex rounded-xs w-5 leading-none z-10",
src: e,
alt: "Club or flag logo for " + l || "",
crossOrigin: "anonymous",
referrerPolicy: "no-referrer"
}
) : W.isValidElement(e) && e;
}
function Ne(e) {
const {
title: l,
subtitle: A,
vertical: _,
bold: a,
size: o,
highlighted: L,
truncate: O,
reversed: d
} = e;
return /* @__PURE__ */ I("div", { className: "grid w-full", children: [
l && /* @__PURE__ */ r(
"span",
{
className: N.classNames(
o == "xlarge" ? "text-2xl leading-7" : o == "large" ? "text-base leading-6" : o == "medium" ? "text-sm sm:text-base" : (
// sm:text-base
"text-sm"
),
_ ? "text-center" : d ? "text-right" : "text-left",
a ? "font-semibold" : "",
O ? "truncate" : "line-clamp-2",
L ? o == "small" ? "bg-black text-white px-2 py-0.5 text-xs! rounded-sm truncate" : "bg-black text-white px-2 uppercase text-xs sm:text-sm font-semibold" : ""
),
children: l
}
),
A && /* @__PURE__ */ r(
"span",
{
className: N.classNames(
_ ? "text-center" : "text-left",
"truncate font-light text-xs"
),
children: A
}
)
] });
}
function B(e) {
const {
clickedItemId: l,
clickedSecondaryItemId: A,
title: _,
subtitle: a,
rank: o,
image: L,
subImages: O,
listItemOptions: d,
removeTextColor: E,
clickedListItem: C
} = e, {
imageSize: m,
textSize: h,
rounded: P,
vertical: R,
reversed: H,
bold: g,
highlighted: u,
justify: F,
truncate: n,
imageShadow: t
} = d || {};
return /* @__PURE__ */ r(
"div",
{
className: N.classNames(
F == "start" ? "justify-start" : F == "end" ? "justify-end" : F == "center" ? "justify-center" : "",
C ? "cursor-pointer" : "",
E ? "" : "dark:text-white/80",
"flex w-full items-center "
),
onClick: () => {
if (l && A) {
C && C({
primary: l,
secondary: A
});
return;
} else if (l) {
C && C(l);
return;
}
},
children: /* @__PURE__ */ I(
"div",
{
className: N.classNames(
R ? H ? "flex-col-reverse" : "flex-col" : H ? "flex-row-reverse" : "",
R ? h == "small" ? O ? "" : "gap-y-1" : "gap-y-2" : h == "small" ? "gap-x-1.5" : "gap-x-1.5 sm:gap-x-2",
"flex h-fit w-fit items-center min-w-16"
),
children: [
o && /* @__PURE__ */ r("span", { className: "flex rounded-full bg-gray-200 dark:bg-white/80 dark:text-black/80 w-6 h-6 items-center justify-center text-xs shrink-0 font-semibold", children: o }),
L && /* @__PURE__ */ r(
x,
{
image: L,
size: m,
rounded: P,
subImages: O,
shadow: t,
altText: _
}
),
/* @__PURE__ */ r(
Ne,
{
title: _,
subtitle: a,
vertical: R,
bold: g,
size: h,
highlighted: u,
truncate: n,
reversed: H
}
),
O?.bottomRight && m != "large" && m != "xlarge" && m != "2xlarge" && // <img className="rounded-xs w-5" src={subImage} />
/* @__PURE__ */ r(
x,
{
image: O?.bottomRight,
size: "small",
rounded: "medium",
altText: _
}
)
]
}
)
}
);
}
var c = /* @__PURE__ */ ((e) => (e[e.NS = 1] = "NS", e[e.INPLAY_1ST_HALF = 2] = "INPLAY_1ST_HALF", e[e.HT = 3] = "HT", e[e.BREAK = 4] = "BREAK", e[e.FT = 5] = "FT", e[e.INPLAY_ET = 6] = "INPLAY_ET", e[e.AET = 7] = "AET", e[e.FT_PEN = 8] = "FT_PEN", e[e.INPLAY_PENALTIES = 9] = "INPLAY_PENALTIES", e[e.POSTPONED = 10] = "POSTPONED", e[e.SUSPENDED = 11] = "SUSPENDED", e[e.CANCELLED = 12] = "CANCELLED", e[e.TBA = 13] = "TBA", e[e.WO = 14] = "WO", e[e.ABANDONED = 15] = "ABANDONED", e[e.DELAYED = 16] = "DELAYED", e[e.AWARDED = 17] = "AWARDED", e[e.INTERRUPTED = 18] = "INTERRUPTED", e[e.AWAITING_UPDATES = 19] = "AWAITING_UPDATES", e[e.DELETED = 20] = "DELETED", e[e.EXTRA_TIME_BREAK = 21] = "EXTRA_TIME_BREAK", e[e.INPLAY_2ND_HALF = 22] = "INPLAY_2ND_HALF", e[e.INPLAY_ET_2ND_HALF = 23] = "INPLAY_ET_2ND_HALF", e[e.PEN_BREAK = 25] = "PEN_BREAK", e[e.PENDING = 26] = "PENDING", e))(c || {}), G = /* @__PURE__ */ ((e) => (e[e.SCORES_1ST_HALF = 1] = "SCORES_1ST_HALF", e[e.SCORES_2ND_HALF = 2] = "SCORES_2ND_HALF", e[e.SCORES_ET = 3] = "SCORES_ET", e[e.SCORES_PENALTY_SHOOTOUT = 5] = "SCORES_PENALTY_SHOOTOUT", e[e.SCORES_ET_2ND_HALF = 39] = "SCORES_ET_2ND_HALF", e[e.SCORES_CURRENT = 1525] = "SCORES_CURRENT", e))(G || {}), S = /* @__PURE__ */ ((e) => (e[e.VAR = 10] = "VAR", e[e.GOAL = 14] = "GOAL", e[e.OWNGOAL = 15] = "OWNGOAL", e[e.PENALTY = 16] = "PENALTY", e[e.MISSED_PENALTY = 17] = "MISSED_PENALTY", e[e.SUBSTITUTION = 18] = "SUBSTITUTION", e[e.YELLOWCARD = 19] = "YELLOWCARD", e[e.REDCARD = 20] = "REDCARD", e[e.YELLOWREDCARD = 21] = "YELLOWREDCARD", e[e.PENALTY_SHOOTOUT_MISS = 22] = "PENALTY_SHOOTOUT_MISS", e[e.PENALTY_SHOOTOUT_GOAL = 23] = "PENALTY_SHOOTOUT_GOAL", e[e.HIGHLIGHT = 1675] = "HIGHLIGHT", e))(S || {}), oe = /* @__PURE__ */ ((e) => (e[e.LINEUP = 11] = "LINEUP", e[e.BENCH = 12] = "BENCH", e[e.SIDELINED = 13] = "SIDELINED", e))(oe || {}), de = /* @__PURE__ */ ((e) => (e[e.GOALKEEPER = 24] = "GOALKEEPER", e[e.DEFENDER = 25] = "DEFENDER", e[e.MIDFIELDER = 26] = "MIDFIELDER", e[e.ATTACKER = 27] = "ATTACKER", e[e.UNKNOWN = 28] = "UNKNOWN", e[e.CENTRE_BACK = 148] = "CENTRE_BACK", e[e.DEFENSIVE_MIDFIELD = 149] = "DEFENSIVE_MIDFIELD", e[e.ATTACKING_MIDFIELD = 150] = "ATTACKING_MIDFIELD", e[e.CENTRE_FORWARD = 151] = "CENTRE_FORWARD", e[e.LEFT_WING = 152] = "LEFT_WING", e[e.CENTRAL_MIDFIELD = 153] = "CENTRAL_MIDFIELD", e[e.RIGHT_BACK = 154] = "RIGHT_BACK", e[e.LEFT_BACK = 155] = "LEFT_BACK", e[e.RIGHT_WING = 156] = "RIGHT_WING", e[e.LEFT_MIDFIELD = 157] = "LEFT_MIDFIELD", e[e.RIGHT_MIDFIELD = 158] = "RIGHT_MIDFIELD", e[e.SECONDARY_STRIKER = 163] = "SECONDARY_STRIKER", e[e.COACH = 221] = "COACH", e[e.ASSISTANT_COACH = 226] = "ASSISTANT_COACH", e[e.GOALKEEPING_COACH = 227] = "GOALKEEPING_COACH", e[e.FORWARD_COACH = 228] = "FORWARD_COACH", e[e.CARETAKER_MANAGER = 560] = "CARETAKER_MANAGER", e))(de || {}), Ie = /* @__PURE__ */ ((e) => (e[e.CORNERS = 34] = "CORNERS", e[e.CAPTAIN = 40] = "CAPTAIN", e[e.SHOTS_OFF_TARGET = 41] = "SHOTS_OFF_TARGET", e[e.SHOTS_TOTAL = 42] = "SHOTS_TOTAL", e[e.ATTACKS = 43] = "ATTACKS", e[e.DANGEROUS_ATTACKS = 44] = "DANGEROUS_ATTACKS", e[e.BALL_POSSESSION = 45] = "BALL_POSSESSION", e[e.BALL_SAFE = 46] = "BALL_SAFE", e[e.PENALTIES = 47] = "PENALTIES", e[e.SHOTS_INSIDEBOX = 49] = "SHOTS_INSIDEBOX", e[e.SHOTS_OUTSIDEBOX = 50] = "SHOTS_OUTSIDEBOX", e[e.OFFSIDES = 51] = "OFFSIDES", e[e.GOALS = 52] = "GOALS", e[e.GOAL_KICKS = 53] = "GOAL_KICKS", e[e.GOAL_ATTEMPTS = 54] = "GOAL_ATTEMPTS", e[e.FREE_KICKS = 55] = "FREE_KICKS", e[e.FOULS = 56] = "FOULS", e[e.SAVES = 57] = "SAVES", e[e.SHOTS_BLOCKED = 58] = "SHOTS_BLOCKED", e[e.SUBSTITUTIONS = 59] = "SUBSTITUTIONS", e[e.THROWINS = 60] = "THROWINS", e[e.BEATS = 61] = "BEATS", e[e.LONG_PASSES = 62] = "LONG_PASSES", e[e.SHORT_PASSES = 63] = "SHORT_PASSES", e[e.HIT_WOODWORK = 64] = "HIT_WOODWORK", e[e.SUCCESSFUL_HEADERS = 65] = "SUCCESSFUL_HEADERS", e[e.SUCCESSFUL_INTERCEPTIONS = 66] = "SUCCESSFUL_INTERCEPTIONS", e[e.SUCCESSFUL_CENTERS = 67] = "SUCCESSFUL_CENTERS", e[e.SUBSTITUTIONS_OVERTIME = 68] = "SUBSTITUTIONS_OVERTIME", e[e.OFFSIDES_OVERTIME = 69] = "OFFSIDES_OVERTIME", e[e.HEADERS = 70] = "HEADERS", e[e.LAST_SUBSTITUTION = 71] = "LAST_SUBSTITUTION", e[e.FIRST_SUBSTITUTION = 72] = "FIRST_SUBSTITUTION", e[e.SUCCESSFUL_CENTER = 73] = "SUCCESSFUL_CENTER", e[e.CORNERS_OVERTIME = 75] = "CORNERS_OVERTIME", e[e.GOALKEEPER_COME_OUTS = 76] = "GOALKEEPER_COME_OUTS", e[e.CHALLENGES = 77] = "CHALLENGES", e[e.TACKLES = 78] = "TACKLES", e[e.ASSISTS = 79] = "ASSISTS", e[e.PASSES = 80] = "PASSES", e[e.SUCCESSFUL_PASSES = 81] = "SUCCESSFUL_PASSES", e[e.SUCCESSFUL_PASSES_PERCENTAGE = 82] = "SUCCESSFUL_PASSES_PERCENTAGE", e[e.REDCARDS = 83] = "REDCARDS", e[e.YELLOWCARDS = 84] = "YELLOWCARDS", e[e.YELLOWRED_CARDS = 85] = "YELLOWRED_CARDS", e[e.SHOTS_ON_TARGET = 86] = "SHOTS_ON_TARGET", e[e.INJURIES = 87] = "INJURIES", e[e.GOALS_CONCEDED = 88] = "GOALS_CONCEDED", e[e.FIRST_OFFSIDE = 91] = "FIRST_OFFSIDE", e[e.LAST_OFFSIDE = 92] = "LAST_OFFSIDE", e[e.DISPOSSESSED = 94] = "DISPOSSESSED", e[e.OFFSIDES_PROVOKED = 95] = "OFFSIDES_PROVOKED", e[e.FOULS_DRAWN = 96] = "FOULS_DRAWN", e[e.BLOCKED_SHOTS = 97] = "BLOCKED_SHOTS", e[e.TOTAL_CROSSES = 98] = "TOTAL_CROSSES", e[e.ACCURATE_CROSSES = 99] = "ACCURATE_CROSSES", e[e.INTERCEPTIONS = 100] = "INTERCEPTIONS", e[e.CLEARANCES = 101] = "CLEARANCES", e[e.CLEARANCES_WON = 102] = "CLEARANCES_WON", e[e.PUNCHES = 103] = "PUNCHES", e[e.SAVES_INSIDE_BOX = 104] = "SAVES_INSIDE_BOX", e[e.TOTAL_DUELS = 105] = "TOTAL_DUELS", e[e.DUELS_WON = 106] = "DUELS_WON", e[e.AERIALS_WON = 107] = "AERIALS_WON", e[e.DRIBBLED_ATTEMPTS = 108] = "DRIBBLED_ATTEMPTS", e[e.SUCCESSFUL_DRIBBLES = 109] = "SUCCESSFUL_DRIBBLES", e[e.DRIBBLED_PAST = 110] = "DRIBBLED_PAST", e[e.PENALTIES_SCORED = 111] = "PENALTIES_SCORED", e[e.PENALTIES_MISSES = 112] = "PENALTIES_MISSES", e[e.PENALTIES_SAVED = 113] = "PENALTIES_SAVED", e[e.PENALTIES_COMMITTED = 114] = "PENALTIES_COMMITTED", e[e.PENALTIES_WON = 115] = "PENALTIES_WON", e[e.ACCURATE_PASSES = 116] = "ACCURATE_PASSES", e[e.KEY_PASSES = 117] = "KEY_PASSES", e[e.RATING = 118] = "RATING", e[e.MINUTES_PLAYED = 119] = "MINUTES_PLAYED", e[e.TOUCHES = 120] = "TOUCHES", e[e.TURN_OVER = 121] = "TURN_OVER", e[e.LONG_BALLS = 122] = "LONG_BALLS", e[e.LONG_BALLS_WON = 123] = "LONG_BALLS_WON", e[e.THROUGH_BALLS = 124] = "THROUGH_BALLS", e[e.THROUGH_BALLS_WON = 125] = "THROUGH_BALLS_WON", e[e.MATCHES = 188] = "MATCHES", e[e.TOTAL_TEAMS = 189] = "TOTAL_TEAMS", e[e.MATCHES_ENDED_IN_DRAW = 190] = "MATCHES_ENDED_IN_DRAW", e[e.NUMBER_OF_GOALS = 191] = "NUMBER_OF_GOALS", e[e.BTTS = 192] = "BTTS", e[e.CARDS = 193] = "CARDS", e[e.CLEANSHEET = 194] = "CLEANSHEET", e[e.GOALKEEPER_CLEANSHEET = 195] = "GOALKEEPER_CLEANSHEET", e[e.SCORING_MINUTES = 196] = "SCORING_MINUTES", e[e.GOAL_LINE = 197] = "GOAL_LINE", e[e.WIN_PERCENTAGE = 201] = "WIN_PERCENTAGE", e[e.DEFEAT_PERCENTAGE = 202] = "DEFEAT_PERCENTAGE", e[e.DRAW_PERCENTAGE = 203] = "DRAW_PERCENTAGE", e[e.PARTICIPANT_MOST_SCORED = 204] = "PARTICIPANT_MOST_SCORED", e[e.PARTICIPANT_MOST_CONCEDED = 205] = "PARTICIPANT_MOST_CONCEDED", e[e.PARTICIPANT_MOST_SCORED_PER_MATCH = 206] = "PARTICIPANT_MOST_SCORED_PER_MATCH", e[e.PARTICIPANT_MOST_CONCEDED_PER_MATCH = 207] = "PARTICIPANT_MOST_CONCEDED_PER_MATCH", e[e.GOAL_TOPSCORER = 208] = "GOAL_TOPSCORER", e[e.ASSIST_TOPSCORER = 209] = "ASSIST_TOPSCORER", e[e.CARD_TOPSCORER = 210] = "CARD_TOPSCORER", e[e.HIGHEST_RATED_PLAYER = 211] = "HIGHEST_RATED_PLAYER", e[e.HIGHEST_RATED_TEAM = 212] = "HIGHEST_RATED_TEAM", e[e.CONCEDED_SCORING_MINUTES = 213] = "CONCEDED_SCORING_MINUTES", e[e.WIN = 214] = "WIN", e[e.DRAW = 215] = "DRAW", e[e.LOST = 216] = "LOST", e[e.VAR_MOMENTS = 314] = "VAR_MOMENTS", e[e.APPEARANCES = 321] = "APPEARANCES", e[e.LINEUPS = 322] = "LINEUPS", e[e.BENCH = 323] = "BENCH", e[e.OWN_GOALS = 324] = "OWN_GOALS", e[e.ERROR_LEAD_TO_GOAL = 571] = "ERROR_LEAD_TO_GOAL", e[e.REFEREES = 574] = "REFEREES", e[e.FAILED_TO_SCORE = 575] = "FAILED_TO_SCORE", e[e.BIG_CHANCES_CREATED = 580] = "BIG_CHANCES_CREATED", e[e.BIG_CHANCES_MISSED = 581] = "BIG_CHANCES_MISSED", e[e.CLEARANCE_OFFLINE = 582] = "CLEARANCE_OFFLINE", e[e.LAST_MAN_TACKLE = 583] = "LAST_MAN_TACKLE", e[e.GOOD_HIGH_CLAIM = 584] = "GOOD_HIGH_CLAIM", e[e.ACCURATE_PASS_PERCENTAGE = 1488] = "ACCURATE_PASS_PERCENTAGE", e[e.TREATMENTS = 1489] = "TREATMENTS", e[e.MAN_OF_MATCH = 1490] = "MAN_OF_MATCH", e[e.DUELS_LOST = 1491] = "DUELS_LOST", e[e.COUNTER_ATTACKS = 1527] = "COUNTER_ATTACKS", e[e.SUCCESSFUL_CROSSES_PERCENTAGE = 1533] = "SUCCESSFUL_CROSSES_PERCENTAGE", e[e.GOALKEEPER_GOALS_CONCEDED = 1535] = "GOALKEEPER_GOALS_CONCEDED", e[e.ACCURATE_PASSES_PERCENTAGE = 1584] = "ACCURATE_PASSES_PERCENTAGE", e[e.PENALTY_TOPSCORER = 1600] = "PENALTY_TOPSCORER", e[e.MISSED_PENALTY_TOPSCORER = 1601] = "MISSED_PENALTY_TOPSCORER", e[e.SUCCESSFUL_DRIBBLES_PERCENTAGE = 1605] = "SUCCESSFUL_DRIBBLES_PERCENTAGE", e[e.SHOTS = 1677] = "SHOTS", e))(Ie || {}), Ce = /* @__PURE__ */ ((e) => (e[e.OVERALL_MATCHES = 129] = "OVERALL_MATCHES", e[e.OVERALL_WINS = 130] = "OVERALL_WINS", e[e.OVERALL_DRAWS = 131] = "OVERALL_DRAWS", e[e.OVERALL_LOST = 132] = "OVERALL_LOST", e[e.OVERALL_SCORED = 133] = "OVERALL_SCORED", e[e.OVERALL_CONCEDED = 134] = "OVERALL_CONCEDED", e[e.HOME_MATCHES = 135] = "HOME_MATCHES", e[e.HOME_WINS = 136] = "HOME_WINS", e[e.HOME_DRAWS = 137] = "HOME_DRAWS", e[e.HOME_LOST = 138] = "HOME_LOST", e[e.HOME_SCORED = 139] = "HOME_SCORED", e[e.HOME_CONCEDED = 140] = "HOME_CONCEDED", e[e.AWAY_MATCHES = 141] = "AWAY_MATCHES", e[e.AWAY_WINS = 142] = "AWAY_WINS", e[e.AWAY_DRAWS = 143] = "AWAY_DRAWS", e[e.AWAY_LOST = 144] = "AWAY_LOST", e[e.AWAY_SCORED = 145] = "AWAY_SCORED", e[e.AWAY_CONCEDED = 146] = "AWAY_CONCEDED", e[e.STREAK = 176] = "STREAK", e[e.OVERALL_GOAL_DIFFERENCE = 179] = "OVERALL_GOAL_DIFFERENCE", e[e.HOME_POINTS = 185] = "HOME_POINTS", e[e.AWAY_POINTS = 186] = "AWAY_POINTS", e[e.TOTAL_POINTS = 187] = "TOTAL_POINTS", e[e.CUSTOM_OVERALL_SCORED_AND_CONCEDED = 99991] = "CUSTOM_OVERALL_SCORED_AND_CONCEDED", e))(Ce || {}), ce = /* @__PURE__ */ ((e) => (e[e.LOAN_TRANSFER = 218] = "LOAN_TRANSFER", e[e.TRANSFER = 219] = "TRANSFER", e[e.FREE_TRANSFER = 220] = "FREE_TRANSFER", e))(ce || {}), me = /* @__PURE__ */ ((e) => (e[e.PROMOTION = 147] = "PROMOTION", e[e["8TH_FINALS"] = 168] = "8TH_FINALS", e[e.UEFA_CHAMPIONS_LEAGUE = 180] = "UEFA_CHAMPIONS_LEAGUE", e[e.UEFA_EUROPA_LEAGUE = 181] = "UEFA_EUROPA_LEAGUE", e[e.RELEGATION = 182] = "RELEGATION", e[e.CHAMPIONSHIP_ROUND = 183] = "CHAMPIONSHIP_ROUND", e[e.RELEGATION_ROUND = 184] = "RELEGATION_ROUND", e[e.UEFA_CHAMPIONS_LEAGUE_QUALIFIERS = 246] = "UEFA_CHAMPIONS_LEAGUE_QUALIFIERS", e[e.UEFA_CUP = 247] = "UEFA_CUP", e[e.INTERTOTO_CUP = 248] = "INTERTOTO_CUP", e[e.RELEGATION_PLAY_OFF = 249] = "RELEGATION_PLAY_OFF", e[e.POSSIBLE__RELEGATION = 250] = "POSSIBLE__RELEGATION", e[e.PROMOTION_GROUP = 251] = "PROMOTION_GROUP", e[e.RELEGATION_GROUP = 252] = "RELEGATION_GROUP", e[e.CHAMPIONS_LEAGUE_QUALIFIERS_PLAY_OFF = 254] = "CHAMPIONS_LEAGUE_QUALIFIERS_PLAY_OFF", e[e.NEXT_ROUND = 255] = "NEXT_ROUND", e[e.SEMI_FINALS = 256] = "SEMI_FINALS", e[e.FINAL_TOURNAMENT = 257] = "FINAL_TOURNAMENT", e[e.INTERCONTINENTAL_PLAY_OFF = 258] = "INTERCONTINENTAL_PLAY_OFF", e[e.FINAL_TOURNAMENT_OR_PLAY_OFFS = 259] = "FINAL_TOURNAMENT_OR_PLAY_OFFS", e[e.AFC_CHAMPIONS_LEAGUE_QUALIFIERS = 260] = "AFC_CHAMPIONS_LEAGUE_QUALIFIERS", e[e.AFC_CUP = 261] = "AFC_CUP", e[e.POSSIBLE_8TH_FINALS = 262] = "POSSIBLE_8TH_FINALS", e[e.UEFA_EUROPA_LEAGUE_PLAY_OFF = 263] = "UEFA_EUROPA_LEAGUE_PLAY_OFF", e[e.PROMOTION_PLAY_OFF = 264] = "PROMOTION_PLAY_OFF", e[e.UEFA_EUROPA_LEAGUE_QUALIFIERS = 265] = "UEFA_EUROPA_LEAGUE_QUALIFIERS", e[e.MIDDLE_PLAY_OFF = 266] = "MIDDLE_PLAY_OFF", e[e.CHAMPION = 267] = "CHAMPION", e[e.CONMEBOL_LIBERTADORES = 268] = "CONMEBOL_LIBERTADORES", e[e.FINAL_SERIES_PLAY_OFFS = 269] = "FINAL_SERIES_PLAY_OFFS", e[e.POSSIBLE_FINAL = 270] = "POSSIBLE_FINAL", e[e.POSSIBLE_FINAL_TOURNAMENT = 271] = "POSSIBLE_FINAL_TOURNAMENT", e[e.POSSIBLE_NEXT_ROUND = 272] = "POSSIBLE_NEXT_ROUND", e[e.CAF_CHAMPIONS_LEAGUE = 273] = "CAF_CHAMPIONS_LEAGUE", e[e.CAF_CONFEDERATION_CUP = 274] = "CAF_CONFEDERATION_CUP", e[e.QUARTER_FINALS = 275] = "QUARTER_FINALS", e[e.POSSIBLE_SEMI_FINALS = 276] = "POSSIBLE_SEMI_FINALS", e[e.WORLD_CUP = 277] = "WORLD_CUP", e[e.PLAY_OFF = 278] = "PLAY_OFF", e[e.FINAL_SERIES = 279] = "FINAL_SERIES", e[e.FINAL = 280] = "FINAL", e[e.CONCACAF_CHAMPIONS_LEAGUE = 281] = "CONCACAF_CHAMPIONS_LEAGUE", e[e.LOWER_TABLE_ROUND = 282] = "LOWER_TABLE_ROUND", e[e.CAF_CHAMPIONS_LEAGUE_QUALIFIERS = 283] = "CAF_CHAMPIONS_LEAGUE_QUALIFIERS", e[e.AFC_CHAMPIONS_LEAGUE = 284] = "AFC_CHAMPIONS_LEAGUE", e[e.CFU_CLUB_CHAMPIONSHIP = 285] = "CFU_CLUB_CHAMPIONSHIP", e[e.CONMEBOL_LIBERTADORES_QUALIFIERS = 286] = "CONMEBOL_LIBERTADORES_QUALIFIERS", e[e.CONMEBOL_SUDAMERICANA = 287] = "CONMEBOL_SUDAMERICANA", e[e.CHAMPION_PLAY_OFF = 288] = "CHAMPION_PLAY_OFF", e[e.UEFA_CONFERENCE_LEAGUE_QUALIFIERS = 289] = "UEFA_CONFERENCE_LEAGUE_QUALIFIERS", e[e.AFC_CUP_PLAY_OFFS = 290] = "AFC_CUP_PLAY_OFFS", e[e.CHAMPIONSHIP_ROUND_PLAY_OFFS = 291] = "CHAMPIONSHIP_ROUND_PLAY_OFFS", e[e.POSSIBLE_PROMOTION_PLAY_OFF = 292] = "POSSIBLE_PROMOTION_PLAY_OFF", e[e.UEFA_CONFERENCE_LEAGUE_PLAY_OFFS = 293] = "UEFA_CONFERENCE_LEAGUE_PLAY_OFFS", e[e["3RD_PLACE_FINAL"] = 294] = "3RD_PLACE_FINAL", e[e.BOTTOM_PLAY_OFFS = 295] = "BOTTOM_PLAY_OFFS", e[e.OFC_CHAMPIONS_LEAGUE = 296] = "OFC_CHAMPIONS_LEAGUE", e[e.POSSIBLE_QUARTER_FINALS = 297] = "POSSIBLE_QUARTER_FINALS", e[e["16TH_FINALS"] = 298] = "16TH_FINALS", e[e.UEFA_CONFERENCE_LEAGUE_QUALIFIERS_PLAY_OFF = 299] = "UEFA_CONFERENCE_LEAGUE_QUALIFIERS_PLAY_OFF", e[e.PRELIMINARY_PROMOTION_PLAY_OFF = 300] = "PRELIMINARY_PROMOTION_PLAY_OFF", e[e.FINAL_ROUND_PLAY_OFF = 301] = "FINAL_ROUND_PLAY_OFF", e[e.CAF_CONFEDERATION_CUP_QUALIFIERS = 302] = "CAF_CONFEDERATION_CUP_QUALIFIERS", e[e["5TH_8TH_PLACE_PLAY_OFFS"] = 303] = "5TH_8TH_PLACE_PLAY_OFFS", e[e["5TH_PLACE_FINAL"] = 304] = "5TH_PLACE_FINAL", e[e["7TH_PLACE_FINAL"] = 305] = "7TH_PLACE_FINAL", e[e.FINAL_SERIE = 306] = "FINAL_SERIE", e[e.PLAY_OFFS = 307] = "PLAY_OFFS", e[e["9TH_PLACE_FINAL"] = 308] = "9TH_PLACE_FINAL", e[e["11TH_PLACE_FINAL"] = 309] = "11TH_PLACE_FINAL", e[e.POSSIBLE_FINAL_SERIES = 310] = "POSSIBLE_FINAL_SERIES", e[e.POSSIBLE_PLAY_OFF = 311] = "POSSIBLE_PLAY_OFF", e[e.POSSIBLE_RELEGATION_PLAY_OFF = 312] = "POSSIBLE_RELEGATION_PLAY_OFF", e[e.POSSIBLE_PROMOTION = 313] = "POSSIBLE_PROMOTION", e[e.CHAMPIONSHIP_ROUND_RELEGATION_ROUND = 316] = "CHAMPIONSHIP_ROUND_RELEGATION_ROUND", e[e.PROMOTION_WORLD_CUP_PLAY_OFFS = 1492] = "PROMOTION_WORLD_CUP_PLAY_OFFS", e[e.PROMOTION_EUROPA_LEAGUE_PLAYOFFS = 1493] = "PROMOTION_EUROPA_LEAGUE_PLAYOFFS", e[e.RANKING_OF_THIRD_PLACED_TEAMS = 1494] = "RANKING_OF_THIRD_PLACED_TEAMS", e[e["9th_12th_Place_Play_Offs"] = 1604] = "9th_12th_Place_Play_Offs", e))(me || {}), fe = /* @__PURE__ */ ((e) => (e[e.FIRST_HALF_ENDED = 4] = "FIRST_HALF_ENDED", e[e.GAME_FINISHED = 6] = "GAME_FINISHED", e[e.GOAL = 7] = "GOAL", e[e.RED_CARD = 1] = "RED_CARD", e[e.SECOND_HALF_ENDED = 5] = "SECOND_HALF_ENDED", e[e.SUBSTITUTION = 2] = "SUBSTITUTION", e[e.VAR_DECISION = 3] = "VAR_DECISION", e[e.YELLOW_CARD = 0] = "YELLOW_CARD", e))(fe || {});
const xe = [
52,
34,
45,
86,
84,
83,
87
/* INJURIES */
], Ge = [
57,
98,
54,
1527,
42,
80,
81,
56,
59,
43,
60,
55,
47,
58,
64,
100,
65,
78,
53,
44,
49,
50,
99,
77,
51,
117,
70,
46,
82,
41,
66,
108,
109,
85,
88
/* GOALS_CONCEDED */
], Ve = [
{
stat_id: 52,
label: "Goals",
sort_order: 1
},
{
stat_id: 34,
label: "Corners",
sort_order: 2
},
{
stat_id: 45,
label: "Ball Possession %",
sort_order: 3
},
{
stat_id: 86,
label: "Shots on Target",
sort_order: 4
},
{
stat_id: 84,
label: "Yellow cards",
sort_order: 5
},
{
stat_id: 83,
label: "Red cards",
sort_order: 6
},
{
stat_id: 87,
label: "Injuries",
sort_order: 7
},
{
stat_id: 57,
label: "Saves",
sort_order: 8
},
{
stat_id: 98,
label: "Total Crosses",
sort_order: 9
},
{
stat_id: 54,
label: "Goal Attempts",
sort_order: 10
},
{
stat_id: 1527,
label: "Counter Attacks",
sort_order: 11
},
{
stat_id: 42,
label: "Shots Total",
sort_order: 12
},
{
stat_id: 80,
label: "Passes",
sort_order: 13
},
{
stat_id: 81,
label: "Successful Passes",
sort_order: 14
},
{
stat_id: 56,
label: "Fouls",
sort_order: 15
},
{
stat_id: 59,
label: "Substitutions",
sort_order: 16
},
{
stat_id: 43,
label: "Attacks",
sort_order: 17
},
{
stat_id: 60,
label: "Throwins",
sort_order: 18
},
{
stat_id: 55,
label: "Free Kicks",
sort_order: 19
},
{
stat_id: 47,
label: "Penalties",
sort_order: 20
},
{
stat_id: 58,
label: "Shots Blocked",
sort_order: 21
},
{
stat_id: 64,
label: "Hit Woodwork",
sort_order: 22
},
{
stat_id: 100,
label: "Interceptions",
sort_order: 23
},
{
stat_id: 65,
label: "Successful Headers",
sort_order: 24
},
{
stat_id: 78,
label: "Tackles",
sort_order: 25
},
{
stat_id: 53,
label: "Goal Kicks",
sort_order: 26
},
{
stat_id: 44,
label: "Dangerous Attacks",
sort_order: 27
},
{
stat_id: 49,
label: "Shots Insidebox",
sort_order: 28
},
{
stat_id: 50,
label: "Shots Outsidebox",
sort_order: 29
},
{
stat_id: 99,
label: "Accurate Crosses",
sort_order: 30
},
{
stat_id: 77,
label: "Challenges",
sort_order: 31
},
{
stat_id: 51,
label: "Offsides",
sort_order: 32
},
{
stat_id: 117,
label: "Key Passes",
sort_order: 33
},
{
stat_id: 70,
label: "Headers",
sort_order: 34
},
{
stat_id: 46,
label: "Ball Safe",
sort_order: 35
},
{
stat_id: 82,
label: "Successful Passes Percentage",
sort_order: 36
},
{
stat_id: 41,
label: "Shots Off Target",
sort_order: 37
},
{
stat_id: 66,
label: "Successful Interceptions",
sort_order: 38
},
{
stat_id: 108,
label: "Dribble Attempts",
sort_order: 39
},
{
stat_id: 109,
label: "Successful Dribbles",
sort_order: 40
},
{
stat_id: 85,
label: "YellowRed cards",
sort_order: 41
},
{
stat_id: 88,
label: "Goals Conceded",
sort_order: 42
}
], be = [
{
id: 1,
position_id: 24,
name: "Goalkeeper",
plural: "Goalkeepers"
},
{
id: 2,
position_id: 25,
name: "Defender",
plural: "Defenders"
},
{
id: 3,
position_id: 26,
name: "Midfielder",
plural: "Midfielders"
},
{
id: 4,
position_id: 27,
name: "Attacker",
plural: "Attackers"
}
//{ id: 5, position_id: EVENT_POS_UNKNOWN, name: "Unknown" },
], Be = [
/* {
type_id: CAPTAIN,
icon: "CAPTAIN",
keyStat: false,
size: "lg",
highlight: false,
}, */
{
type_id: 118,
icon: "Rating",
keyStat: !0,
size: "lg",
highlight: !0,
type: "overall",
onlyFixture: !0
},
{
type_id: 52,
icon: "Goals",
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 79,
icon: "Ass.",
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 119,
icon: "Min. played",
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 322,
icon: "Lineups",
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall",
onlySeasonal: !0
},
{
type_id: 321,
icon: "Apps",
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall",
onlySeasonal: !0
},
{
type_id: 80,
icon: "Pass.",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 83,
icon: "Red Cards",
//<Icons.RedCardIcon size={"medium"} />,
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 84,
icon: "Yellow Cards",
//<Icons.YellowCardIcon size={"medium"} />,
keyStat: !0,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 96,
icon: "Fouls drawn",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 107,
icon: "Aerials won",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 116,
icon: "Acc. passes",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 117,
icon: "Key passes",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 122,
icon: "Long balls",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 123,
icon: "Long balls won",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 124,
icon: "Through balls",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 125,
icon: "Through balls won",
keyStat: !1,
size: "lg",
highlight: !1,
type: "overall"
},
{
type_id: 56,
icon: "Fouls",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 57,
icon: "Saves",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 78,
icon: "Tackles",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 88,
icon: "Goals conceeded",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 97,
icon: "Blocked shots",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 100,
icon: "Interceptions",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 101,
icon: "Clearances",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 104,
icon: "Saves inside box",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 582,
icon: "Clearance off line",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 1535,
icon: "GK goals conceeded",
keyStat: !1,
size: "lg",
highlight: !1,
type: "defensive"
},
{
type_id: 42,
icon: "Shots total",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 86,
icon: "Shots on target",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 41,
icon: "Shots off target",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 58,
icon: "Shots blockes",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 64,
icon: "Hit wood-work",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 51,
icon: "Offsides",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 94,
icon: "Dispossessed",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 98,
icon: "Total crosses",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 99,
icon: "Acc. crosses",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 105,
icon: "Total duels",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 106,
icon: "Duels won",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 1491,
icon: "Duels lost",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 108,
icon: "Dribble attempts",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 109,
icon: "Successful dribbles",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 110,
icon: "Dribbles past",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 111,
icon: "Pen. scored",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 112,
icon: "Pen. missed",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 113,
icon: "Pen. saved (Gk)",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 114,
icon: "Pen. commited",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 115,
icon: "Pen. won",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 580,
icon: "Big chances created",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 581,
icon: "Big chances missed",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
},
{
type_id: 1584,
icon: "Accurate passes %",
keyStat: !1,
size: "lg",
highlight: !1,
type: "offensive"
}
];
function he(e) {
switch (e) {
case 5:
return "FT";
case 3:
return "HT";
case 4:
return "BR.";
case 7:
return "AET";
case 8:
return "PEN";
case 10:
return "POSTP.";
case 11:
return "SUSP.";
case 12:
return "CANC.";
case 13:
return "TBA";
case 14:
return "WO";
case 15:
return "ABAND.";
case 16:
return "DEL.";
case 17:
return "AWAR.";
case 18:
return "INT.";
case 19:
return "AWT.";
case 20:
return "DEL";
case 21:
return "HT ET";
case 25:
return "PEN BR.";
case 26:
return "PEND.";
default:
return "";
}
}
function k({
size: e,
state_id: l,
scoreAfterPenalties: A,
scores: _,
participants: a,
teamInFocus: o,
scoresAnimation: L
}) {
const { homeTeam: O, awayTeam: d } = N.getHomeAndAwayTeams(a || []), E = ne(
l,
o,
O,
d
);
let C, m = !1;
L?.animate ? (L?.scorePulsate ? C = L?.oldScores ?? [] : C = L?.newScores ?? [], m = N.isHomeGoal(
L?.oldScores,
L?.newScores
)) : C = _;
const { homeTeamScore: h, awayTeamScore: P } = N.getCurrentEventScores(
C ?? [],
O?.id ?? void 0,
d?.id ?? void 0,
A ? G.SCORES_PENALTY_SHOOTOUT : G.SCORES_CURRENT
), R = ({
value: H,
isGoal: g
}) => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
A ? "bg-gray-100 text-black" : E,
L?.animate ? L?.scoreReveal && g ? "bg-[#1FEA85]" : "bg-white" : "",
e == "large" ? "w-8 " : e == "medium" ? "w-5" : "w-5 text-sm",
A ? e == "large" ? "h-8 text-xl" : e == "medium" ? "h-5 text-sm" : "" : e == "large" ? "h-10 text-2xl" : e == "medium" ? "h-7 text-lg" : "",
L?.scorePulsate ? "animate-pulse " : "",
L?.scoreReveal && g ? "animate-bounce-score-up " : "",
"flex items-center justify-center shrink-0 rounded-xs"
),
children: H ?? "-"
}
);
return /* @__PURE__ */ I(
"div",
{
className: N.classNames(
e == "small" ? "space-y-1 flex-col" : e == "large" ? "space-x-2 items-center" : "space-x-1 items-center",
!A && e == "large" ? "h-10" : !A && e == "medium" ? "h-7" : "",
"flex font-semibold"
),
children: [
/* @__PURE__ */ r(R, { value: h, isGoal: m }),
/* @__PURE__ */ r(R, { value: P, isGoal: !m })
]
}
);
}
function ne(e, l, A, _) {
return e === c.FT || e === c.FT_PEN || e === c.AET ? l ? Re(l, A, _) : "bg-gray-200 text-black" : e === c.INPLAY_1ST_HALF || e === c.HT || e === c.INPLAY_2ND_HALF || e === c.INPLAY_ET || e === c.INPLAY_ET_2ND_HALF || e === c.INPLAY_PENALTIES || e === c.BREAK ? "bg-[#1FEA85] text-black" : "bg-gray-200 text-black";
}
function Re(e, l, A) {
return e == l?.id && l?.meta?.winner || e == A?.id && A?.meta?.winner ? "bg-green-400 text-white" : !l?.meta?.winner && !A?.meta?.winner ? "bg-yellow-400 text-white" : "bg-red-400 text-white";
}
function te({
periods: e,
state_id: l,
lastUpdatedAt: A
}) {
const _ = A ? Math.abs((/* @__PURE__ */ new Date()).getTime() - A.getTime()) / 1e3 : 0, a = Math.floor(_ / 60) % 60, o = () => {
const O = {
minutes: 0,
seconds: 0,
ticking: !1,
addedTime: void 0
};
if (l === c.INPLAY_1ST_HALF || l === c.INPLAY_2ND_HALF || l === c.INPLAY_ET_2ND_HALF || l === c.INPLAY_ET) {
const d = e?.find((C) => C.ticking === !0);
let E = d?.minutes;
if (A && a && (E = (E ?? 0) + a), d)
return {
minutes: E ?? 0,
seconds: d?.seconds ?? 0,
ticking: d.ticking ?? !1,
addedTime: d.time_added ?? void 0
};
}
return O;
};
return /* @__PURE__ */ r("div", { className: "flex font-medium text-xs w-14 justify-center items-center", children: (() => {
if (l === c.INPLAY_1ST_HALF || l === c.INPLAY_2ND_HALF || l === c.INPLAY_ET_2ND_HALF || l === c.INPLAY_ET) {
const O = o();
return /* @__PURE__ */ r(Se, { ...O });
} else
return l ? he(l) : null;
})() });
}
const Se = ({
minutes: e = 0,
seconds: l = 0,
ticking: A = !0
//addedTime = 0,
}) => {
const [_, a] = $({ minutes: e, seconds: l });
p(() => {
let O = null;
return O = setInterval(() => {
a((E) => {
let C = E.minutes, m = E.seconds;
return C === void 0 || m === void 0 ? (C = 0, m = 0) : A && (m += 1, m === 60 && (C += 1, m = 0)), { minutes: C, seconds: m };
});
}, 1e3), () => clearInterval(O);
}, [A, e, l]);
const L = `${((O) => O == null ? "00" : O.toString().padStart(2, "0"))(_?.minutes)}'`;
return /* @__PURE__ */ r("div", { children: `${L}` });
}, ke = () => /* @__PURE__ */ r(
"svg",
{
className: "w-6 h-6 dark:text-white/80",
viewBox: "0 0 24 24",
stroke: "currentColor",
strokeWidth: "2",
fill: "none",
strokeLinecap: "round",
strokeLinejoin: "round",
children: /* @__PURE__ */ r("path", { d: "M9 18l6-6-6-6" })
}
), Ye = ({ size: e }) => /* @__PURE__ */ I(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: N.classNames(
e == "large" ? "size-6" : e == "medium" ? "size-5" : "size-4",
"bg-white rounded-full "
),
children: [
/* @__PURE__ */ r("title", { children: "soccer" }),
/* @__PURE__ */ r("path", { d: "M16.93 17.12L16.13 15.76L17.59 11.39L19 10.92L20 11.67C20 11.7 20 11.75 20 11.81C20 11.88 20.03 11.94 20.03 12C20.03 13.97 19.37 15.71 18.06 17.21L16.93 17.12M9.75 15L8.38 10.97L12 8.43L15.62 10.97L14.25 15H9.75M12 20.03C11.12 20.03 10.29 19.89 9.5 19.61L8.81 18.1L9.47 17H14.58L15.19 18.1L14.5 19.61C13.71 19.89 12.88 20.03 12 20.03M5.94 17.21C5.41 16.59 4.95 15.76 4.56 14.75C4.17 13.73 3.97 12.81 3.97 12C3.97 11.94 4 11.88 4 11.81C4 11.75 4 11.7 4 11.67L5 10.92L6.41 11.39L7.87 15.76L7.07 17.12L5.94 17.21M11 5.29V6.69L7 9.46L5.66 9.04L5.24 7.68C5.68 7 6.33 6.32 7.19 5.66S8.87 4.57 9.65 4.35L11 5.29M14.35 4.35C15.13 4.57 15.95 5 16.81 5.66C17.67 6.32 18.32 7 18.76 7.68L18.34 9.04L17 9.47L13 6.7V5.29L14.35 4.35M4.93 4.93C3 6.89 2 9.25 2 12S3 17.11 4.93 19.07 9.25 22 12 22 17.11 21 19.07 19.07 22 14.75 22 12 21 6.89 19.07 4.93 14.75 2 12 2 6.89 3 4.93 4.93Z" })
]
}
), We = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "w-6 h-6 dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M3.76 3.7L2.14 4.88L4.43 8A8.23 8.23 0 0 1 6.35 7.28M11 9V11H18V11.29L13 12.71V15.5A4.5 4.5 0 1 1 8.5 11H9V9H8.5A6.5 6.5 0 1 0 15 15.5V13.91L22 12V9M16.24 3.7L13.85 7H16.32L17.86 4.88M9 2V7H11V2Z" })
}
), Ke = ({ size: e }) => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: N.classNames(
e == "large" ? "size-6" : e == "medium" ? "size-5" : "size-4",
"bg-white rounded-full"
),
children: /* @__PURE__ */ r("path", { d: "M12,18A6,6 0 0,1 6,12C6,11 6.25,10.03 6.7,9.2L5.24,7.74C4.46,8.97 4,10.43 4,12A8,8 0 0,0 12,20V23L16,19L12,15M12,4V1L8,5L12,9V6A6,6 0 0,1 18,12C18,13 17.75,13.97 17.3,14.8L18.76,16.26C19.54,15.03 20,13.57 20,12A8,8 0 0,0 12,4Z" })
}
), Te = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M8.46,15.06L7.05,16.47L5.68,15.1C4.82,16.21 4.24,17.54 4.06,19H6V21H2V20C2,15.16 5.44,11.13 10,10.2V8.2L2,5V3H22V5L14,8.2V10.2C18.56,11.13 22,15.16 22,20V21H18V19H19.94C19.76,17.54 19.18,16.21 18.32,15.1L16.95,16.47L15.54,15.06L16.91,13.68C15.8,12.82 14.46,12.24 13,12.06V14H11V12.06C9.54,12.24 8.2,12.82 7.09,13.68L8.46,15.06M12,18A2,2 0 0,1 14,20A2,2 0 0,1 12,22C11.68,22 11.38,21.93 11.12,21.79L7.27,20L11.12,18.21C11.38,18.07 11.68,18 12,18Z" })
}
), ze = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M7,2C8.78,2 9.67,4.16 8.42,5.42C7.16,6.67 5,5.78 5,4A2,2 0 0,1 7,2M5.5,7H8.5A2,2 0 0,1 10.5,9V14.5H9V22H5V14.5H3.5V9A2,2 0 0,1 5.5,7M19,8H21L18,4L15,8H17V16H15L18,20L21,16H19M22,2H14V4H22M22,20H14V22H22" })
}
), je = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M11.5,0.5C12,0.75 13,2.4 13,3.5C13,4.6 12.33,5 11.5,5C10.67,5 10,4.85 10,3.75C10,2.65 11,2 11.5,0.5M18.5,9C21,9 23,11 23,13.5C23,15.06 22.21,16.43 21,17.24V23H12L3,23V17.24C1.79,16.43 1,15.06 1,13.5C1,11 3,9 5.5,9H10V6H13V9H18.5M12,16A2.5,2.5 0 0,0 14.5,13.5H16A2.5,2.5 0 0,0 18.5,16A2.5,2.5 0 0,0 21,13.5A2.5,2.5 0 0,0 18.5,11H5.5A2.5,2.5 0 0,0 3,13.5A2.5,2.5 0 0,0 5.5,16A2.5,2.5 0 0,0 8,13.5H9.5A2.5,2.5 0 0,0 12,16Z" })
}
), Qe = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M11,2V4.07C7.38,4.53 4.53,7.38 4.07,11H2V13H4.07C4.53,16.62 7.38,19.47 11,19.93V22H13V19.93C16.62,19.47 19.47,16.62 19.93,13H22V11H19.93C19.47,7.38 16.62,4.53 13,4.07V2M11,6.08V8H13V6.09C15.5,6.5 17.5,8.5 17.92,11H16V13H17.91C17.5,15.5 15.5,17.5 13,17.92V16H11V17.91C8.5,17.5 6.5,15.5 6.08,13H8V11H6.09C6.5,8.5 8.5,6.5 11,6.08M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11Z" })
}
), Ze = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M22,3H2C0.91,3.04 0.04,3.91 0,5V19C0.04,20.09 0.91,20.96 2,21H22C23.09,20.96 23.96,20.09 24,19V5C23.96,3.91 23.09,3.04 22,3M22,19H2V5H22V19M14,17V15.75C14,14.09 10.66,13.25 9,13.25C7.34,13.25 4,14.09 4,15.75V17H14M9,7A2.5,2.5 0 0,0 6.5,9.5A2.5,2.5 0 0,0 9,12A2.5,2.5 0 0,0 11.5,9.5A2.5,2.5 0 0,0 9,7M14,7V8H20V7H14M14,9V10H20V9H14M14,11V12H18V11H14" })
}
), Xe = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M17 4V2H7V4H2V11C2 12.1 2.9 13 4 13H7.1C7.5 14.96 9.04 16.5 11 16.9V19.08C8 19.54 8 22 8 22H16C16 22 16 19.54 13 19.08V16.9C14.96 16.5 16.5 14.96 16.9 13H20C21.1 13 22 12.1 22 11V4H17M4 11V6H7V11L4 11M15 12C15 13.65 13.65 15 12 15S9 13.65 9 12V4H15V12M20 11L17 11V6H20L20 11Z" })
}
), Je = (e) => /* @__PURE__ */ r(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "24",
role: "presentation",
viewBox: "0 0 24 24",
width: "24",
fill: "currentColor",
...e,
children: /* @__PURE__ */ r(
"path",
{
fill: "currentColor",
d: "M18 2C17.1 2 16 3 16 4H8C8 3 6.9 2 6 2H2V11C2 12 3 13 4 13H6.2C6.6 15 7.9 16.7 11 17V19.08C8 19.54 8 22 8 22H16C16 22 16 19.54 13 19.08V17C16.1 16.7 17.4 15 17.8 13H20C21 13 22 12 22 11V2H18M6 11H4V4H6V11M16 11.5C16 13.43 15.42 15 12 15C8.59 15 8 13.43 8 11.5V6H16V11.5M20 11H18V4H20V11Z"
}
)
}
), qe = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M19.7 12.9L14 18.6H11.7V16.3L17.4 10.6L19.7 12.9M23.1 12.1C23.1 12.4 22.8 12.7 22.5 13L20 15.5L19.1 14.6L21.7 12L21.1 11.4L20.4 12.1L18.1 9.8L20.3 7.7C20.5 7.5 20.9 7.5 21.2 7.7L22.6 9.1C22.8 9.3 22.8 9.7 22.6 10C22.4 10.2 22.2 10.4 22.2 10.6C22.2 10.8 22.4 11 22.6 11.2C22.9 11.5 23.2 11.8 23.1 12.1M3 20V4H10V9H15V10.5L17 8.5V8L11 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H15C16.1 22 17 21.1 17 20H3M11 17.1C10.8 17.1 10.6 17.2 10.5 17.2L10 15H8.5L6.4 16.7L7 14H5.5L4.5 19H6L8.9 16.4L9.5 18.7H10.5L11 18.6V17.1Z" })
}
), $e = () => /* @__PURE__ */ r("div", { className: "shrink-0 flex justify-center items-center rounded-md px-1 py-0.5 border-red-500 border text-red-500", children: "VAR" }), pe = ({ size: e }) => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
e == "large" ? "size-6" : e == "medium" ? "size-5" : "size-4",
"flex items-center justify-center"
),
children: /* @__PURE__ */ r("div", { className: "bg-red-500 w-3 h-4 rounded-xs shadow-xs" })
}
), ye = ({ size: e }) => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
e == "large" ? "size-6" : e == "medium" ? "size-5" : "size-4",
"flex items-center justify-center"
),
children: /* @__PURE__ */ r("div", { className: "bg-yellow-500 w-3 h-4 rounded-xs shadow-xs" })
}
), e1 = () => /* @__PURE__ */ r(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: "w-6 h-6 dark:fill-white/80",
children: /* @__PURE__ */ r("path", { d: "M4,4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4H4M4,6H11V8.13C9.24,8.59 8,10.18 8,12C8,13.82 9.24,15.41 11,15.87V18H4V16H7V8H4V6M13,6H20V8H17V16H20V18H13V15.87C14.76,15.41 16,13.82 16,12C16,10.18 14.76,8.59 13,8.13V6M4,10H5V14H4V10M19,10H20V14H19V10M13,10.27C13.62,10.63 14,11.29 14,12C14,12.71 13.62,13.37 13,13.73V10.27M11,10.27V13.73C10.38,13.37 10,12.71 10,12C10,11.29 10.38,10.63 11,10.27Z" })
}
), Pe = ({ size: e }) => /* @__PURE__ */ I(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: N.classNames(
e == "large" ? "size-6" : e == "medium" ? "size-5" : "size-4",
"fill-red-500"
),
children: [
/* @__PURE__ */ r("path", { d: "M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z" }),
" "
]
}
), r1 = ({ size: e }) => /* @__PURE__ */ I(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
className: N.classNames(
e == "large" ? "size-6" : e == "medium" ? "size-5" : "size-4",
"fill-red-500"
),
children: [
/* @__PURE__ */ r("path", { d: "M13.46,12L19,17.54V19H17.54L12,13.46L6.46,19H5V17.54L10.54,12L5,6.46V5H6.46L12,10.54L17.54,5H19V6.46L13.46,12Z" }),
" "
]
}
);
function Y(e) {
const { goals: l, homeTeamId: A } = e;
if (!l) return null;
const _ = l.sort((a, o) => (a?.minute ?? 0) - (o?.minute ?? 0)).map((a) => {
const o = a.participant_id === A;
let L = a?.player_name ? a?.player_name : "-";
a.type_id === S.PENALTY ? L += " (P)" : a.type_id === S.OWNGOAL && (L += " (OG)");
const O = a?.minute ? a?.minute + "'" : "-", d = a?.extra_minute ? "+" + a?.extra_minute : null, E = a.type_id === S.PENALTY_SHOOTOUT_GOAL, C = a.type_id === S.PENALTY_SHOOTOUT_MISS, m = O + d + a?.participant_id;
return /* @__PURE__ */ I(
"div",
{
className: N.classNames(
o ? "" : "flex-row-reverse",
"flex justify-center items-center w-full text-xs "
),
children: [
/* @__PURE__ */ I(
"div",
{
className: N.classNames(
o ? "" : "flex-row-reverse ",
"flex w-full justify-end "
),
children: [
/* @__PURE__ */ r("div", { className: "w-fit grid", children: /* @__PURE__ */ r("span", { className: "truncate whitespace-nowrap", children: L }) }),
/* @__PURE__ */ I("span", { className: "font-extralight px-2", children: [
C || E ? "" : O,
!(C || E) && d ? d : ""
] })
]
}
),
/* @__PURE__ */ r("div", { className: "flex w-fit font-semibold items-center justify-center whitespace-nowrap", children: C ? /* @__PURE__ */ r(Pe, { size: "small" }) : a?.result || "-" }),
/* @__PURE__ */ r("div", { className: "flex w-full" })
]
},
m
);
});
return /* @__PURE__ */ r("div", { className: "flex flex-col space-y-1 justify-center items-center w-full bg-transparent px-2 pt-2", children: _ });
}
const He = {
EventItem: ({ size: e }) => /* @__PURE__ */ r(Me, { size: e }),
H2HStatsCard: () => /* @__PURE__ */ r(ie, {}),
FixtureStatsCard: () => /* @__PURE__ */ r(Ue, {}),
Table: () => /* @__PURE__ */ r(ue, {}),
List: () => /* @__PURE__ */ r(Fe, {}),
CardList: () => /* @__PURE__ */ r(De, {}),
Header: ({ size: e }) => /* @__PURE__ */ r(ge, { size: e })
}, ge = ({ size: e }) => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
e == "large" ? "justify-center py-1" : "py-3",
"flex w-full"
),
children: /* @__PURE__ */ r(
f,
{
size: e,
reverse: !1,
score: e != "large"
}
)
}
), Fe = () => /* @__PURE__ */ r("div", { className: "flex w-full justify-between", children: /* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }) }), De = () => /* @__PURE__ */ I("div", { className: "flex flex-col w-full space-y-2", children: [
/* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }),
/* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }),
/* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 })
] }), ue = () => /* @__PURE__ */ I("div", { className: "flex w-full justify-between", children: [
/* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-8 h-8" })
] }), ie = () => /* @__PURE__ */ I("div", { className: "flex flex-col w-full space-y-2", children: [
/* @__PURE__ */ I("div", { className: "flex justify-between w-full space-y-1 pb-4", children: [
/* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }),
/* @__PURE__ */ r(f, { size: "small", reverse: !0, score: !0 })
] }),
/* @__PURE__ */ I("div", { className: "flex flex-col items-center space-y-6", children: [
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-12 h-10" })
] })
] }), Ue = () => /* @__PURE__ */ I("div", { className: "flex flex-col w-full space-y-2", children: [
/* @__PURE__ */ I("div", { className: "flex justify-between w-full space-y-1 pb-4", children: [
/* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }),
/* @__PURE__ */ r(f, { size: "small", reverse: !0, score: !0 })
] }),
/* @__PURE__ */ I("div", { className: "flex flex-col items-center space-y-6", children: [
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" }),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-full h-7" })
] })
] }), f = ({
size: e,
reverse: l,
score: A
}) => /* @__PURE__ */ I(
"div",
{
className: N.classNames(
l ? "flex-row-reverse space-x-reverse" : "",
"flex space-x-2 items-center"
),
children: [
A ? /* @__PURE__ */ r(
"div",
{
className: N.classNames(
e == "large" ? "w-8 h-10" : "size-7",
"bg-gray-200 dark:bg-white/20 rounded-md animate-pulse"
)
}
) : /* @__PURE__ */ r(s, {}),
/* @__PURE__ */ I(
"div",
{
className: N.classNames(
e == "large" ? "flex-col items-center justify-center space-y-2" : "",
"flex w-full items-center"
),
children: [
/* @__PURE__ */ r(
"div",
{
className: N.classNames(
e == "large" ? "w-16 h-16 bg-gray-200 dark:bg-white/20 rounded-full animate-pulse" : "hidden"
)
}
),
/* @__PURE__ */ r("div", { className: "bg-gray-200 dark:bg-white/20 rounded-md animate-pulse w-20 h-4" })
]
}
)
]
}
), Me = ({ size: e }) => /* @__PURE__ */ I(
"div",
{
className: N.classNames(
e == "small" ? "flex-col space-y-1" : e == "medium" ? "h-full space-x-1 justify-center" : e == "large" ? "h-full space-x-1 justify-center py-5" : "",
"flex w-full"
),
children: [
/* @__PURE__ */ r(f, { size: e, reverse: e != "small", score: !0 }),
/* @__PURE__ */ r(f, { size: e, reverse: !1, score: !0 })
]
}
);
function we(e) {
const { type: l, amount: A, size: _, header: a } = e, o = He[l] ?? null;
return /* @__PURE__ */ I("div", { className: "flex flex-col w-full space-y-2", children: [
a && /* @__PURE__ */ r("div", { className: "py-2.5", children: /* @__PURE__ */ r(f, { size: "small", reverse: !1, score: !0 }) }),
Array(A).fill(!0).map((L, O) => /* @__PURE__ */ r("div", { className: "bg-white dark:bg-white/10 rounded-md p-2", children: /* @__PURE__ */ r(o, { size: _ }, O) }, O))
] });
}
function l1({
fixtureData: e = {},
scoresAnimation: l = void 0,
showLogos: A = !0,
showGoalScorers: _ = !1,
showEventClockAndStatus: a = !0,
showTeamShortCode: o = !1,
teamInFocus: L = void 0,
showLeagueLogo: O = !1,
showEventDate: d = !1,
size: E = "medium",
element: C = null,
isLoading: m = !1,
showAsCard: h = !0,
showStadiumBackground: P = !1,
showTime: R = !0,
showScores: H = !0,
disabled: g = !1,
clickedEventItem: u = void 0,
clickedTeamItem: F = void 0
}) {
const { homeTeam: n, awayTeam: t } = N.getHomeAndAwayTeams(
e?.participants ?? null
), M = e?.fixture_id ?? e?.id, i = e?.state_id != c.NS && e?.state_id != c.TBA, K = e?.state_id == c.FT || e?.state_id == c.AET || e?.state_id == c.FT_PEN, T = () => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
E == "small" ? "col-span-1" : E != "large" ? "justify-self-end" : "",
E == "large" ? "justify-self-center" : "",
E == "large" ? "row-start-2" : "row-start-1",
"col-start-2 self-center"
),
children: /* @__PURE__ */ r(
B,
{
image: A && n?.image_path ? n?.image_path : null,
title: o && n?.short_code ? n?.short_code : n?.name ?? "-",
subtitle: null,
listItemOptions: {
imageSize: E == "large" ? "2xlarge" : E,
textSize: E,
justify: E == "small" ? "start" : E == "large" && A ? "center" : "end",
reversed: E == "medium",
bold: L ? L == n?.id : n?.meta?.winner ?? !1,
vertical: E == "large",
highlighted: E == "large",
truncate: !0
},
clickedItemId: n?.id ?? void 0,
clickedListItem: F
}
)
}
), z = () => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
E == "small" ? "col-start-2 col-span-1" : "col-start-4",
E == "large" ? "row-start-2" : "",
"self-center"
),
children: /* @__PURE__ */ r(
B,
{
image: A && t?.image_path ? t?.image_path : null,
title: o && t?.short_code ? t?.short_code : t?.name ?? "-",
listItemOptions: {
imageSize: E == "large" ? "2xlarge" : E,
textSize: E,
justify: E == "large" ? "center" : "start",
bold: L ? L == t?.id : t?.meta?.winner ?? !1,
vertical: E == "large",
highlighted: E == "large",
truncate: !0
},
clickedItemId: t?.id ?? void 0,
clickedListItem: F
}
)
}
), V = () => {
const v = e?.aggregate?.result ? e?.leg == "2/2" ? "Agg " + e?.aggregate?.result?.split("").reverse().join("") : "Agg " + e?.aggregate?.result : null;
return /* @__PURE__ */ r("div", { className: "flex flex-col justify-center items-center w-full pt-2 text-xs font-light", children: /* @__PURE__ */ r("span", { children: v }) });
}, j = () => H ? /* @__PURE__ */ r(
"div",
{
className: N.classNames(
E == "small" ? "col-start-1 row-span-2 pr-1 flex space-x-1" : "col-start-3 space-y-1",
E == "large" ? "row-start-2" : "row-start-1",
!i && E != "small" ? "hidden" : "",
"justify-self-end self-center"
),
children: /* @__PURE__ */ I(s, { children: [
/* @__PURE__ */ r(
k,
{
size: E,
state_id: e?.state_id ?? null,
scores: e?.scores ?? null,
participants: e?.participants ?? null,
startingAt: e?.starting_at_timestamp,
teamInFocus: L,
scoresAnimation: l
}
),
E == "large" && e?.aggregate_id && e?.aggregate?.result && e?.leg == "2/2" ? /* @__PURE__ */ r(V, {}) : null,
e?.state_id == c.FT_PEN && /* @__PURE__ */ r(
k,
{
size: E,
state_id: e?.state_id ?? null,
scoreAfterPenalties: !0,
scores: e?.scores ?? null,
participants: e?.participants ?? null
}
)
] })
}
) : null, Q = () => /* @__PURE__ */ I(
"div",
{
className: N.classNames(
E == "small" ? "row-span-2 col-start-4" : "",
E == "large" ? i ? "col-span-5" : "col-start-3 row-start-2" : "",
E == "medium" ? i ? "col-start-5" : "col-start-3" : "",
!R && E != "medium" ? "hidden" : "",
"row-start-1 place-self-center"
),
children: [
/* @__PURE__ */ r("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ r(
"div",
{
className: N.classNames(
E == "large" ? K ? "bg-black/60 text-white py-1" : "bg-white/90 text-black py-1" : "text-black dark:text-white/60",
l && l?.flashLabel ? "animate-blink shadow-lg font-bold" : "",
"rounded-xs flex w-fit flex-col justify-center items-center"
),
children: R ? l && l?.flashLabel ? /* @__PURE__ */ r("div", { className: "flex text-xs justify-center items-center ", children: E == "large" ? /* @__PURE__ */ r("span", { className: "px-2", children: "G O A L !" }) : /* @__PURE__ */ r("span", { className: "flex items-center px-1 h-6", children: "GOAL" }) }) : i && a ? /* @__PURE__ */ r(
te,
{
periods: e?.periods ?? void 0,
state_id: e?.state_id ?? void 0,
lastUpdatedAt: /* @__PURE__ */ new Date(),
starting_at_timestamp: e?.starting_at_timestamp ?? void 0
}
) : /* @__PURE__ */ r(
Oe,
{
starting_at_timestamp: e?.starting_at_timestamp ?? void 0,
showDate: d,
showTime: !0
}
) : /* @__PURE__ */ r("div", { className: "flex text-xs justify-center items-center rounded-md", children: "-" })
}
) }),
E == "large" && !i && e?.aggregate_id && e?.aggregate?.result && e?.leg == "2/2" ? /* @__PURE__ */ r(V, {}) : null
]
}
), Z = () => {
const v = e?.events?.filter(
(D) => D.type_id === S.GOAL || D.type_id === S.OWNGOAL || D.type_id === S.PENALTY
), b = e?.events?.filter(
(D) => D.type_id === S.PENALTY_SHOOTOUT_MISS || D.type_id === S.PENALTY_SHOOTOUT_GOAL
);
return _ ? /* @__PURE__ */ I(
"div",
{
className: N.classNames(
E == "medium" ? "row-start-2" : "",
E == "large" ? "row-start-3" : "",
l?.animate ? "opacity-0" : "",
"col-span-5 col-start-1 place-self-center w-full"
),
children: [
_ && /* @__PURE__ */ r(Y, { goals: v || [], homeTeamId: n?.id ?? 0 }),
_ && b?.length ? /* @__PURE__ */ I("div", { className: "flex flex-col mt-1 w-full items-center border-t border-dashed border-white/70", children: [
/* @__PURE__ */ r("span", { className: "text-xs font-semibold py-1", children: "Penalties" }),
/* @__PURE__ */ r(
Y,
{
goals: b || [],
homeTeamId: n?.id ?? 0
}
)
] }) : null
]
}
) : null;
}, X = () => /* @__PURE__ */ r(s, { children: C }), J = () => /* @__PURE__ */ r(
"div",
{
className: N.classNames(
O ? E == "medium" ? "col-start-1" : E == "small" ? "col-start-3 pr-2 row-span-2" : "" : "hidden",
"row-start-1 justify-self-start self-center"
),
children: e?.league?.image_path && O && /* @__PURE__ */ r(
x,
{
image: e?.league?.image_path ?? null,
size: "medium",
altText: e?.league?.name ?? ""
}
)
}
), q = () => /* @__PURE__ */ I(
"div",
{
className: N.classNames(
E == "large" ? "gap-y-2" : "",
E == "small" ? R ? "gap-y-1 grid-cols-[auto_1fr_auto_2rem]" : "gap-y-1 grid-cols-[auto_1fr_auto]" : E == "medium" ? "grid-cols-[2rem_1fr_auto_1fr_2rem] sm:grid-cols-[2rem_1fr_auto_1fr_2rem]" : "grid-cols-[auto_1fr_auto_1fr_auto]",
E == "medium" ? "gap-x-1.5 sm:gap-x-2" : "",
"grid w-full "
),
children: [
/* @__PURE__ */ r(J, {}),
/* @__PURE__ */ r(T, {}),
/* @__PURE__ */ r(z, {}),
/* @__PURE__ */ r(j, {}),
/* @__PURE__ */ r(Q, {}),
/* @__PURE__ */ r(Z, {})
]
}
), w = e?.venue?.image_path ? e?.venue?.image_path : "https://firebasestorage.googleapis.com/v0/b/oles-test-project.appspot.com/o/common%2Fstadium.png?alt=media&token=7075d1e6-b2d6-48e1-ae5e-5f12d570d847";
return m ? /* @__PURE__ */ r(we, { type: "EventItem", amount: 1, size: E }) : /* @__PURE__ */ r(
"div",
{
style: {
backgroundImage: P && h ? `url(${w})` : ""
},
onClick: () => u && M && u(M),
className: N.classNames(
u ? "cursor-pointer" : "",
h ? g ? "bg-gray-200 dark:bg-[#414141]" : "bg-white dark:bg-[#414141]" : "",
h ? "bg-no-repeat bg-center bg-cover rounded-md shadow-sm" : "",
"flex w-full select-none"
),
children: /* @__PURE__ */ I(
"div",
{
className: N.classNames(
h && w && P ? "bg-linear-to-b from-black/60 via-black/20 to-black/60" : "",
E == "small" ? "flex-row gap-x-1" : "flex-col gap-y-2 items-center",
h ? "p-2 rounded-md" : "",
"w-full flex justify-between h-full "
),
children: [
/* @__PURE__ */ r(
"div",
{
className: N.classNames(
h && w && P ? "text-white" : "",
"w-full"
),
children: /* @__PURE__ */ r(q, {})
}
),
C ? /* @__PURE__ */ r(X, {}) : null
]
}
)
},
M
);
}
export {
Ze as A,
je as B,
ke as C,
S as E,
c as F,
ze as H,
oe as L,
Qe as P,
pe as R,
Ie as S,
ce as T,
N as U,
$e as V,
Te as W,
ye as Y,
B as a,
Ye as b,
Ke as c,
we as d,
Ce as e,
me as f,
Be as g,
l1 as h,
qe as i,
Xe as j,
G as k,
fe as l,
We as m,
Ge as n,
xe as o,
be as p,
Ve as q,
de as r,
e1 as s,
Je as t,
r1 as u,
Ne as v
};