@sensiblestats/widget-react 0.136.0 → 0.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +434 -393
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +511 -470
- package/dist/index.js.map +1 -1
- package/dist/styles.css +8 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1298,7 +1298,7 @@ function parseOddsFormat(value) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
1300
|
// src/version.generated.ts
|
|
1301
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1301
|
+
var WIDGET_REACT_VERSION = "0.137.0";
|
|
1302
1302
|
|
|
1303
1303
|
// src/config.ts
|
|
1304
1304
|
function hostTag(cfg) {
|
|
@@ -7296,7 +7296,7 @@ function PersonalGreeting({ personal, ui, slip, sport, starsElsewhere = false, o
|
|
|
7296
7296
|
const since = personal.since ?? [];
|
|
7297
7297
|
const asks = personal.asks ?? [];
|
|
7298
7298
|
const noFavourites = controller?.status === "ready" && controller.data !== null && [controller.data.competitions, controller.data.teams, controller.data.players].every((list) => list.length === 0) && (personal.ribbon?.stars ?? []).length === 0 && !starsElsewhere && personal.hasStarsElsewhere !== true;
|
|
7299
|
-
const showInvite = ctx?.
|
|
7299
|
+
const showInvite = ctx?.favouritesOffered === true && noFavourites;
|
|
7300
7300
|
const cards = hasCards ? /* @__PURE__ */ jsxs24("section", { className: "ss-w-v8-sec ss-w-v8-cards", children: [
|
|
7301
7301
|
ofYours ? /* @__PURE__ */ jsx26("h3", { className: "ss-w-v8-sec-title", children: ui.v8YourTeams }) : null,
|
|
7302
7302
|
teamCards.map((c, i) => /* @__PURE__ */ jsx26(
|
|
@@ -7780,7 +7780,9 @@ function ChatHeader({
|
|
|
7780
7780
|
newConversationLabel,
|
|
7781
7781
|
moreOptionsLabel,
|
|
7782
7782
|
onOpenSettings,
|
|
7783
|
-
settingsLabel
|
|
7783
|
+
settingsLabel,
|
|
7784
|
+
onOpenFavourites,
|
|
7785
|
+
favouritesLabel
|
|
7784
7786
|
}) {
|
|
7785
7787
|
const [menuOpen, setMenuOpen] = useState34(false);
|
|
7786
7788
|
const wrapRef = useRef25(null);
|
|
@@ -7788,7 +7790,8 @@ function ChatHeader({
|
|
|
7788
7790
|
const firstItemRef = useRef25(null);
|
|
7789
7791
|
const hasNew = !!(canReset && onNewConversation);
|
|
7790
7792
|
const hasSettings = !!onOpenSettings;
|
|
7791
|
-
const
|
|
7793
|
+
const hasFavourites = !!onOpenFavourites;
|
|
7794
|
+
const hasMenu = hasFavourites || hasNew || hasSettings;
|
|
7792
7795
|
useEffect29(() => {
|
|
7793
7796
|
if (menuOpen) firstItemRef.current?.focus();
|
|
7794
7797
|
}, [menuOpen]);
|
|
@@ -7814,6 +7817,10 @@ function ChatHeader({
|
|
|
7814
7817
|
setMenuOpen(false);
|
|
7815
7818
|
onNewConversation?.();
|
|
7816
7819
|
};
|
|
7820
|
+
const runFavourites = () => {
|
|
7821
|
+
setMenuOpen(false);
|
|
7822
|
+
onOpenFavourites?.();
|
|
7823
|
+
};
|
|
7817
7824
|
const runSettings = () => {
|
|
7818
7825
|
setMenuOpen(false);
|
|
7819
7826
|
onOpenSettings?.();
|
|
@@ -7836,13 +7843,24 @@ function ChatHeader({
|
|
|
7836
7843
|
}
|
|
7837
7844
|
),
|
|
7838
7845
|
menuOpen ? /* @__PURE__ */ jsxs28("div", { className: "ss-w-menu", role: "menu", "aria-label": moreOptionsLabel, children: [
|
|
7839
|
-
|
|
7846
|
+
hasFavourites ? /* @__PURE__ */ jsx31(
|
|
7840
7847
|
"button",
|
|
7841
7848
|
{
|
|
7842
7849
|
type: "button",
|
|
7843
7850
|
className: "ss-w-menu-item",
|
|
7844
7851
|
role: "menuitem",
|
|
7845
7852
|
ref: firstItemRef,
|
|
7853
|
+
onClick: runFavourites,
|
|
7854
|
+
children: /* @__PURE__ */ jsx31("span", { children: favouritesLabel })
|
|
7855
|
+
}
|
|
7856
|
+
) : null,
|
|
7857
|
+
hasNew ? /* @__PURE__ */ jsx31(
|
|
7858
|
+
"button",
|
|
7859
|
+
{
|
|
7860
|
+
type: "button",
|
|
7861
|
+
className: "ss-w-menu-item",
|
|
7862
|
+
role: "menuitem",
|
|
7863
|
+
ref: hasFavourites ? void 0 : firstItemRef,
|
|
7846
7864
|
onClick: runNewConversation,
|
|
7847
7865
|
children: /* @__PURE__ */ jsx31("span", { children: newConversationLabel })
|
|
7848
7866
|
}
|
|
@@ -7853,7 +7871,7 @@ function ChatHeader({
|
|
|
7853
7871
|
type: "button",
|
|
7854
7872
|
className: "ss-w-menu-item",
|
|
7855
7873
|
role: "menuitem",
|
|
7856
|
-
ref: hasNew ? void 0 : firstItemRef,
|
|
7874
|
+
ref: hasFavourites || hasNew ? void 0 : firstItemRef,
|
|
7857
7875
|
onClick: runSettings,
|
|
7858
7876
|
children: /* @__PURE__ */ jsx31("span", { children: settingsLabel })
|
|
7859
7877
|
}
|
|
@@ -10688,9 +10706,9 @@ var ChatInput = forwardRef(function ChatInput2({ placeholder, streaming, onSend,
|
|
|
10688
10706
|
|
|
10689
10707
|
// src/components/TabBar.tsx
|
|
10690
10708
|
import { useEffect as useEffect35, useLayoutEffect, useRef as useRef30 } from "react";
|
|
10691
|
-
import {
|
|
10692
|
-
var
|
|
10693
|
-
function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule, hasBuilder = false, gamesEnabled, clubEnabled
|
|
10709
|
+
import { jsx as jsx69, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10710
|
+
var TIGHT_LEVELS = [0, 1, 2, 3, 4, 5, 6];
|
|
10711
|
+
function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule, hasBuilder = false, gamesEnabled, clubEnabled }) {
|
|
10694
10712
|
const tabs = [
|
|
10695
10713
|
{ tab: "chat", label: ui.tabChat, count: 0, dot: monitor.chatDot },
|
|
10696
10714
|
...clubEnabled ? [
|
|
@@ -10706,8 +10724,7 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10706
10724
|
...matchCount > 0 ? [{ tab: "following", label: ui.tabFollowing, count: matchCount, dot: monitor.matchesDot }] : [],
|
|
10707
10725
|
...trendsCount > 0 ? [{ tab: "trends", label: ui.tabTrends, count: trendsCount, dot: monitor.trendsDot }] : []
|
|
10708
10726
|
],
|
|
10709
|
-
...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : []
|
|
10710
|
-
...favouritesEnabled && !clubEnabled ? [{ tab: "favourites", label: ui.tabFavourites, count: 0, dot: false }] : []
|
|
10727
|
+
...gamesEnabled ? [{ tab: "games", label: ui.tabGames, count: 0, dot: false }] : []
|
|
10711
10728
|
];
|
|
10712
10729
|
const track = useTrack();
|
|
10713
10730
|
const listRef = useRef30(null);
|
|
@@ -10722,12 +10739,10 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10722
10739
|
useLayoutEffect(() => {
|
|
10723
10740
|
const strip = listRef.current;
|
|
10724
10741
|
if (!strip) return;
|
|
10725
|
-
const fav = strip.querySelector("[data-fav-tab]");
|
|
10726
10742
|
const measure = () => {
|
|
10727
|
-
for (const
|
|
10743
|
+
for (const tight of TIGHT_LEVELS) {
|
|
10728
10744
|
if (tight === 0) strip.removeAttribute("data-tight");
|
|
10729
10745
|
else strip.setAttribute("data-tight", String(tight));
|
|
10730
|
-
fav?.toggleAttribute("data-compact", compact);
|
|
10731
10746
|
if (strip.scrollWidth <= strip.clientWidth) return;
|
|
10732
10747
|
}
|
|
10733
10748
|
};
|
|
@@ -10751,18 +10766,14 @@ function TabBar({ monitor, ui, matchCount, trendsCount, liveCount, hasSchedule,
|
|
|
10751
10766
|
role: "tab",
|
|
10752
10767
|
"aria-selected": active,
|
|
10753
10768
|
"data-on": active ? "" : void 0,
|
|
10754
|
-
"
|
|
10755
|
-
"aria-label": tab === "favourites" ? label : tab === "live" && count > 0 ? `${label} \xB7 ${ui.liveCountLabel(count)}` : void 0,
|
|
10769
|
+
"aria-label": tab === "live" && count > 0 ? `${label} \xB7 ${ui.liveCountLabel(count)}` : void 0,
|
|
10756
10770
|
className: "ss-w-tab",
|
|
10757
10771
|
onClick: () => {
|
|
10758
10772
|
if (tab !== monitor.activeTab) track({ name: "tab_change", from: monitor.activeTab, to: tab });
|
|
10759
10773
|
monitor.setActiveTab(tab);
|
|
10760
10774
|
},
|
|
10761
10775
|
children: [
|
|
10762
|
-
|
|
10763
|
-
/* @__PURE__ */ jsx69("span", { className: "ss-w-tab-label", children: label }),
|
|
10764
|
-
/* @__PURE__ */ jsx69("span", { className: "ss-w-tab-star", "aria-hidden": "true", children: "\u2605" })
|
|
10765
|
-
] }) : label,
|
|
10776
|
+
label,
|
|
10766
10777
|
count > 0 && /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-count", "aria-hidden": tab === "live" ? true : void 0, children: count }),
|
|
10767
10778
|
dot && !active && /* @__PURE__ */ jsx69("span", { className: "ss-w-tab-dot", "aria-hidden": "true" })
|
|
10768
10779
|
]
|
|
@@ -10836,7 +10847,7 @@ function MarketAccordion({ match, monitor, ui, slip }) {
|
|
|
10836
10847
|
|
|
10837
10848
|
// src/components/MonitorFormH2H.tsx
|
|
10838
10849
|
import { useState as useState46 } from "react";
|
|
10839
|
-
import { Fragment as
|
|
10850
|
+
import { Fragment as Fragment14, jsx as jsx71, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
10840
10851
|
function resultClass2(result) {
|
|
10841
10852
|
if (result === "W") return "ss-w-h2h-result--win";
|
|
10842
10853
|
if (result === "L") return "ss-w-h2h-result--loss";
|
|
@@ -10854,7 +10865,7 @@ function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
|
10854
10865
|
const [expanded, setExpanded] = useState46(false);
|
|
10855
10866
|
const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
|
|
10856
10867
|
if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
|
|
10857
|
-
return /* @__PURE__ */ jsx71(
|
|
10868
|
+
return /* @__PURE__ */ jsx71(Fragment14, {});
|
|
10858
10869
|
}
|
|
10859
10870
|
const homeLabel = homeShortCode || homeTeamName;
|
|
10860
10871
|
const awayLabel = awayShortCode || awayTeamName;
|
|
@@ -11234,7 +11245,7 @@ import { useEffect as useEffect37, useState as useState49 } from "react";
|
|
|
11234
11245
|
|
|
11235
11246
|
// src/components/PropsPieces.tsx
|
|
11236
11247
|
import { useEffect as useEffect36, useState as useState48 } from "react";
|
|
11237
|
-
import { Fragment as
|
|
11248
|
+
import { Fragment as Fragment15, jsx as jsx76, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11238
11249
|
var livePlayer = (bundle, p) => bundle.live === true || !p.live && !p.nflLive ? p : { ...p, live: null, nflLive: null };
|
|
11239
11250
|
var hasLiveLine = (p) => p.live != null || p.nflLive != null;
|
|
11240
11251
|
var mmss = (seconds) => `${Math.floor(seconds / 60)}:${String(seconds % 60).padStart(2, "0")}`;
|
|
@@ -11420,7 +11431,7 @@ function PropRoster({ bundle, players, side, descriptor, ui, slip }) {
|
|
|
11420
11431
|
/* @__PURE__ */ jsx76("span", { className: "ss-w-props-name", children: p.name }),
|
|
11421
11432
|
/* @__PURE__ */ jsx76("span", { className: "ss-w-props-meta", children: meta })
|
|
11422
11433
|
] }),
|
|
11423
|
-
/* @__PURE__ */ jsx76("span", { className: now !== null ? "ss-w-props-main ss-w-props-main--live" : "ss-w-props-main", children: main?.line != null ? /* @__PURE__ */ jsxs71(
|
|
11434
|
+
/* @__PURE__ */ jsx76("span", { className: now !== null ? "ss-w-props-main ss-w-props-main--live" : "ss-w-props-main", children: main?.line != null ? /* @__PURE__ */ jsxs71(Fragment15, { children: [
|
|
11424
11435
|
/* @__PURE__ */ jsx76("span", { className: "ss-w-props-stat", children: descriptor.statShort(main) }),
|
|
11425
11436
|
now !== null ? /* @__PURE__ */ jsxs71("span", { className: "ss-w-props-nowline", children: [
|
|
11426
11437
|
/* @__PURE__ */ jsx76("span", { className: "ss-w-props-now", children: now }),
|
|
@@ -11543,7 +11554,7 @@ function NbaPropsSection({ match, monitor, ui, slip }) {
|
|
|
11543
11554
|
}
|
|
11544
11555
|
|
|
11545
11556
|
// src/components/NbaMonitorCard.tsx
|
|
11546
|
-
import { Fragment as
|
|
11557
|
+
import { Fragment as Fragment16, jsx as jsx78, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11547
11558
|
var REGULATION_PERIODS = 4;
|
|
11548
11559
|
function periodLabel(period) {
|
|
11549
11560
|
if (period <= REGULATION_PERIODS) return `Q${period}`;
|
|
@@ -11619,7 +11630,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
|
|
|
11619
11630
|
return /* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-item", children: [
|
|
11620
11631
|
/* @__PURE__ */ jsxs73("div", { className: "ss-w-mon", children: [
|
|
11621
11632
|
/* @__PURE__ */ jsxs73("div", { className: "ss-w-mon-top", children: [
|
|
11622
|
-
inPlay && /* @__PURE__ */ jsxs73(
|
|
11633
|
+
inPlay && /* @__PURE__ */ jsxs73(Fragment16, { children: [
|
|
11623
11634
|
/* @__PURE__ */ jsxs73("span", { className: "ss-w-fandash-live-pill", children: [
|
|
11624
11635
|
/* @__PURE__ */ jsx78("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
|
|
11625
11636
|
ui.liveLabel
|
|
@@ -11647,7 +11658,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
|
|
|
11647
11658
|
/* @__PURE__ */ jsx78(Side, { abbreviation: b.homeAbbreviation, nickname: b.homeNickname, teamName: match.homeTeamName, crestUrl: match.homeCrestUrl })
|
|
11648
11659
|
] }),
|
|
11649
11660
|
/* @__PURE__ */ jsx78(NbaFormStrip, { match, monitor, ui }),
|
|
11650
|
-
scored && /* @__PURE__ */ jsxs73(
|
|
11661
|
+
scored && /* @__PURE__ */ jsxs73(Fragment16, { children: [
|
|
11651
11662
|
/* @__PURE__ */ jsxs73("table", { className: "ss-w-nbamon-ls", children: [
|
|
11652
11663
|
/* @__PURE__ */ jsx78("thead", { children: /* @__PURE__ */ jsxs73("tr", { children: [
|
|
11653
11664
|
/* @__PURE__ */ jsx78("th", {}),
|
|
@@ -11678,7 +11689,7 @@ function NbaMonitorCard({ match, monitor, ui, slip }) {
|
|
|
11678
11689
|
|
|
11679
11690
|
// src/components/NflFormSection.tsx
|
|
11680
11691
|
import { useState as useState51 } from "react";
|
|
11681
|
-
import { Fragment as
|
|
11692
|
+
import { Fragment as Fragment17, jsx as jsx79, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
11682
11693
|
var outcomeOf = (g) => g.teamScore > g.opponentScore ? "win" : g.teamScore < g.opponentScore ? "loss" : "tie";
|
|
11683
11694
|
var signedSpread2 = (v) => v > 0 ? `+${v}` : String(v);
|
|
11684
11695
|
function SideRow({ game, abbreviation, ui }) {
|
|
@@ -11751,10 +11762,10 @@ function NflFormSection({ match, monitor, ui }) {
|
|
|
11751
11762
|
return /* @__PURE__ */ jsxs74("section", { className: "ss-w-props", lang: ui.locale, children: [
|
|
11752
11763
|
/* @__PURE__ */ jsx79("div", { className: "ss-w-props-head", children: ui.nfl.formLast5 }),
|
|
11753
11764
|
/* @__PURE__ */ jsx79("div", { className: segments.length === 3 ? "ss-w-props-seg ss-w-props-seg--3" : "ss-w-props-seg ss-w-props-seg--3 ss-w-props-seg--2", children: segments.map((s) => /* @__PURE__ */ jsx79("button", { type: "button", className: "ss-w-props-side", "aria-pressed": active === s.key, onClick: () => setSegment(s.key), children: s.label }, s.key)) }),
|
|
11754
|
-
active === "h2h" ? /* @__PURE__ */ jsxs74(
|
|
11765
|
+
active === "h2h" ? /* @__PURE__ */ jsxs74(Fragment17, { children: [
|
|
11755
11766
|
/* @__PURE__ */ jsx79("div", { className: "ss-w-nflform-h2h-sum", children: `${homeName} ${homeWins} \xB7 ${awayName} ${awayWins}` }),
|
|
11756
11767
|
form.headToHead.map((g, i) => /* @__PURE__ */ jsx79(H2hRow, { game: g, home, ui }, i))
|
|
11757
|
-
] }) : /* @__PURE__ */ jsxs74(
|
|
11768
|
+
] }) : /* @__PURE__ */ jsxs74(Fragment17, { children: [
|
|
11758
11769
|
rows.map((g, i) => /* @__PURE__ */ jsx79(SideRow, { game: g, abbreviation: active === "home" ? home : away, ui }, i)),
|
|
11759
11770
|
rows.some((g) => g.ats != null) && /* @__PURE__ */ jsx79("p", { className: "ss-w-nflform-note", children: ui.nfl.formOpening })
|
|
11760
11771
|
] })
|
|
@@ -11763,7 +11774,7 @@ function NflFormSection({ match, monitor, ui }) {
|
|
|
11763
11774
|
|
|
11764
11775
|
// src/components/NflPropsSection.tsx
|
|
11765
11776
|
import { useState as useState52 } from "react";
|
|
11766
|
-
import { Fragment as
|
|
11777
|
+
import { Fragment as Fragment18, jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
11767
11778
|
var TRENDS_SHOWN = 3;
|
|
11768
11779
|
var SCORERS_SHOWN = 8;
|
|
11769
11780
|
var STAT_ORDER2 = [
|
|
@@ -11911,7 +11922,7 @@ function NflPropsSection({ match, monitor, ui, slip }) {
|
|
|
11911
11922
|
];
|
|
11912
11923
|
const firstWithContent = roster("away").length > 0 ? "away" : roster("home").length > 0 ? "home" : scorers.length > 0 ? "td" : "away";
|
|
11913
11924
|
const shown2 = tab && tabs.some((t) => t.key === tab) ? tab : firstWithContent;
|
|
11914
|
-
return /* @__PURE__ */ jsxs75(
|
|
11925
|
+
return /* @__PURE__ */ jsxs75(Fragment18, { children: [
|
|
11915
11926
|
facts.length > 0 && /* @__PURE__ */ jsx80(Trends, { bundle, facts, descriptor, ui, slip }),
|
|
11916
11927
|
/* @__PURE__ */ jsxs75("section", { className: "ss-w-props", lang: ui.locale, children: [
|
|
11917
11928
|
!stamped ? /* @__PURE__ */ jsx80("div", { className: "ss-w-props-head", children: ui.nba.propsTitle }) : /* @__PURE__ */ jsxs75("div", { className: "ss-w-props-headrow", children: [
|
|
@@ -11989,7 +12000,7 @@ function NflSituation({ situation, homeAbbreviation, awayAbbreviation, strings }
|
|
|
11989
12000
|
}
|
|
11990
12001
|
|
|
11991
12002
|
// src/components/NflMonitorCard.tsx
|
|
11992
|
-
import { Fragment as
|
|
12003
|
+
import { Fragment as Fragment19, jsx as jsx83, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
11993
12004
|
var REGULATION_PERIODS2 = 4;
|
|
11994
12005
|
function liveLabel2(f) {
|
|
11995
12006
|
if (f.period === null) return null;
|
|
@@ -12018,7 +12029,7 @@ function NflMonitorCard({ match, monitor, ui, slip }) {
|
|
|
12018
12029
|
return /* @__PURE__ */ jsxs78("div", { className: "ss-w-mon-item ss-w-mon-item--nfl", children: [
|
|
12019
12030
|
/* @__PURE__ */ jsxs78("div", { className: "ss-w-mon", children: [
|
|
12020
12031
|
/* @__PURE__ */ jsxs78("div", { className: "ss-w-mon-top", children: [
|
|
12021
|
-
status2 && /* @__PURE__ */ jsxs78(
|
|
12032
|
+
status2 && /* @__PURE__ */ jsxs78(Fragment19, { children: [
|
|
12022
12033
|
/* @__PURE__ */ jsxs78("span", { className: "ss-w-fandash-live-pill", children: [
|
|
12023
12034
|
/* @__PURE__ */ jsx83("span", { className: "ss-w-fandash-live-dot", "aria-hidden": "true" }),
|
|
12024
12035
|
ui.liveLabel
|
|
@@ -12089,7 +12100,7 @@ import { matchKey as matchKey4 } from "@sensiblestats/widget-sdk";
|
|
|
12089
12100
|
|
|
12090
12101
|
// src/components/FixtureRow.tsx
|
|
12091
12102
|
import { slipSportOf as slipSportOf8 } from "@sensiblestats/widget-sdk";
|
|
12092
|
-
import { Fragment as
|
|
12103
|
+
import { Fragment as Fragment20, jsx as jsx84, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
12093
12104
|
function splitAtFirstSpace(label) {
|
|
12094
12105
|
const i = label.indexOf(" ");
|
|
12095
12106
|
return i > 0 && i < label.length - 1 ? [label.slice(0, i), label.slice(i + 1)] : null;
|
|
@@ -12128,7 +12139,7 @@ function FixtureRow({ match, state, stale, ui, monitor, onOpen }) {
|
|
|
12128
12139
|
liveTone ? "ss-w-drow-when--live" : null,
|
|
12129
12140
|
twoLines ? "ss-w-drow-when--two" : null
|
|
12130
12141
|
].filter(Boolean).join(" ");
|
|
12131
|
-
const cells = /* @__PURE__ */ jsxs79(
|
|
12142
|
+
const cells = /* @__PURE__ */ jsxs79(Fragment20, { children: [
|
|
12132
12143
|
/* @__PURE__ */ jsx84("span", { className: whenClass, children: twoLines ? twoLines.map((line, i) => /* @__PURE__ */ jsx84("span", { children: line }, i)) : when }),
|
|
12133
12144
|
/* @__PURE__ */ jsxs79("span", { className: "ss-w-drow-fx", children: [
|
|
12134
12145
|
/* @__PURE__ */ jsx84(Side2, { name: match.homeTeamName, crest: match.homeTeamImagePath, abbr: isUsSport ? match.homeTeamAbbr ?? void 0 : void 0 }),
|
|
@@ -12184,7 +12195,7 @@ function endLabel(s, ui, serverLabel) {
|
|
|
12184
12195
|
var hasGames = (s) => s.sets.some((x) => (x.p1Games ?? 0) > 0 || (x.p2Games ?? 0) > 0);
|
|
12185
12196
|
|
|
12186
12197
|
// src/components/TennisFixtureRow.tsx
|
|
12187
|
-
import { Fragment as
|
|
12198
|
+
import { Fragment as Fragment21, jsx as jsx85, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
12188
12199
|
function TennisSidePrice({ matchId, tour, pair, price, forms, value, oddsId, player, ui, slip, name, lead, movedLabel }) {
|
|
12189
12200
|
const { oddsFormat } = useOddsSettings();
|
|
12190
12201
|
const added = useSlipState()?.added;
|
|
@@ -12289,7 +12300,7 @@ function TennisFixtureRow({ match, state, stale, ui, prices, slip, monitor }) {
|
|
|
12289
12300
|
/* @__PURE__ */ jsx85(Player, { name: names[n - 1], code: n === 1 ? match.homeCountryCode : match.awayCountryCode, served: score?.server === n, ui }),
|
|
12290
12301
|
score && score.sets.length > 0 ? /* @__PURE__ */ jsx85(Games, { sets: score.sets, side: n, live }) : null
|
|
12291
12302
|
] });
|
|
12292
|
-
const players = /* @__PURE__ */ jsxs80(
|
|
12303
|
+
const players = /* @__PURE__ */ jsxs80(Fragment21, { children: [
|
|
12293
12304
|
line(1),
|
|
12294
12305
|
line(2),
|
|
12295
12306
|
game ? /* @__PURE__ */ jsx85("span", { className: "ss-w-trow-round ss-w-trow-game", children: game }) : round ? /* @__PURE__ */ jsx85("span", { className: "ss-w-trow-round", children: round }) : null
|
|
@@ -12342,8 +12353,8 @@ function TennisLiveScoreboard({ t, score, live, ui }) {
|
|
|
12342
12353
|
}
|
|
12343
12354
|
|
|
12344
12355
|
// src/components/TennisStatsTables.tsx
|
|
12345
|
-
import { Fragment as
|
|
12346
|
-
import { Fragment as
|
|
12356
|
+
import { Fragment as Fragment22, useEffect as useEffect38, useState as useState53 } from "react";
|
|
12357
|
+
import { Fragment as Fragment23, jsx as jsx87, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
12347
12358
|
function formatStat(row, value, locale) {
|
|
12348
12359
|
if (value == null) return "\u2013";
|
|
12349
12360
|
if (row.kind === "pct") return new Intl.NumberFormat(locale, { style: "percent", maximumFractionDigits: 0 }).format(value / 100);
|
|
@@ -12374,7 +12385,7 @@ function Block({ caption, rows, locale, names }) {
|
|
|
12374
12385
|
] });
|
|
12375
12386
|
}
|
|
12376
12387
|
function Tables({ table, labels, names, locale }) {
|
|
12377
|
-
return /* @__PURE__ */ jsxs82(
|
|
12388
|
+
return /* @__PURE__ */ jsxs82(Fragment23, { children: [
|
|
12378
12389
|
/* @__PURE__ */ jsx87(Block, { caption: labels.serve, rows: table.serve, locale, names }),
|
|
12379
12390
|
/* @__PURE__ */ jsx87(Block, { caption: labels.return, rows: table.return, locale, names })
|
|
12380
12391
|
] });
|
|
@@ -12412,7 +12423,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
|
|
|
12412
12423
|
] }),
|
|
12413
12424
|
today.rows.map((r) => {
|
|
12414
12425
|
const f = (v) => formatStat({ kind: "pct" }, v, locale);
|
|
12415
|
-
return /* @__PURE__ */ jsxs82(
|
|
12426
|
+
return /* @__PURE__ */ jsxs82(Fragment22, { children: [
|
|
12416
12427
|
/* @__PURE__ */ jsx87("span", { className: "ss-w-ts-l", children: r.label }),
|
|
12417
12428
|
/* @__PURE__ */ jsxs82("span", { className: "ss-w-ts-today-v ss-w-ts-today-v--a", children: [
|
|
12418
12429
|
f(r.p1Today),
|
|
@@ -12432,7 +12443,7 @@ function TennisStatsTables({ serveReturn, today, labels, names, ui, resetKey })
|
|
|
12432
12443
|
}
|
|
12433
12444
|
|
|
12434
12445
|
// src/components/TennisMonitorCard.tsx
|
|
12435
|
-
import { Fragment as
|
|
12446
|
+
import { Fragment as Fragment24, jsx as jsx88, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
12436
12447
|
var direction = (d) => d === "shortened" || d === "drifted" ? d : void 0;
|
|
12437
12448
|
var record = (wl) => wl ? `${wl.w}\u2013${wl.l}` : "\u2013";
|
|
12438
12449
|
var surfaceLabel = (ui, surface) => ui.tennis.surface[surface.toLowerCase()] ?? surface;
|
|
@@ -12457,10 +12468,10 @@ function WinnerPrice({ match, t, price, ui, slip }) {
|
|
|
12457
12468
|
{ player: t.p1, forms: price.p1, value: price.p1Value, oddsId: price.p1OddsId, previous: price.p1Previous, dir: direction(price.p1Direction) },
|
|
12458
12469
|
{ player: t.p2, forms: price.p2, value: price.p2Value, oddsId: price.p2OddsId, previous: price.p2Previous, dir: direction(price.p2Direction) }
|
|
12459
12470
|
] : [];
|
|
12460
|
-
if (!price && match.phase === "fullTime") return /* @__PURE__ */ jsx88(
|
|
12471
|
+
if (!price && match.phase === "fullTime") return /* @__PURE__ */ jsx88(Fragment24, {});
|
|
12461
12472
|
return /* @__PURE__ */ jsxs83("section", { className: paused ? "ss-w-tn-sec ss-w-tn-paused" : "ss-w-tn-sec", children: [
|
|
12462
12473
|
/* @__PURE__ */ jsx88("h4", { className: "ss-w-tn-h", children: t.labels.matchWinner }),
|
|
12463
|
-
price && common ? /* @__PURE__ */ jsxs83(
|
|
12474
|
+
price && common ? /* @__PURE__ */ jsxs83(Fragment24, { children: [
|
|
12464
12475
|
paused && liveBlock && /* @__PURE__ */ jsx88("p", { className: "ss-w-tn-paused-label", children: liveBlock.labels.pricesPaused }),
|
|
12465
12476
|
/* @__PURE__ */ jsx88("div", { className: "ss-w-tn-prices", children: sides.map((s) => {
|
|
12466
12477
|
const previous = s.previous ? formatOdds(s.previous, oddsFormat) : void 0;
|
|
@@ -12600,7 +12611,7 @@ function TennisMonitorCard({ match, monitor, ui, slip, onAsk }) {
|
|
|
12600
12611
|
/* @__PURE__ */ jsx88("span", { className: "ss-w-mon-vs", children: ui.tennis.vs }),
|
|
12601
12612
|
/* @__PURE__ */ jsx88(Player2, { side: t.p2, rankRace: t.labels.p2RankRace })
|
|
12602
12613
|
] }),
|
|
12603
|
-
showScore && score && /* @__PURE__ */ jsxs83(
|
|
12614
|
+
showScore && score && /* @__PURE__ */ jsxs83(Fragment24, { children: [
|
|
12604
12615
|
(status2 || elapsed || game || endMark && !notPlayed) && /* @__PURE__ */ jsxs83("p", { className: "ss-w-tn-status", children: [
|
|
12605
12616
|
ended && hasSetScore(ended) && /* @__PURE__ */ jsxs83("span", { className: "ss-w-tn-endscore", children: [
|
|
12606
12617
|
score.p1Sets,
|
|
@@ -12875,7 +12886,7 @@ function seedFor(pin, index, states, stale, now) {
|
|
|
12875
12886
|
}
|
|
12876
12887
|
|
|
12877
12888
|
// src/components/MonitorTabs.tsx
|
|
12878
|
-
import { Fragment as
|
|
12889
|
+
import { Fragment as Fragment25, jsx as jsx91, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
12879
12890
|
function OddsLiveStrip({ m, ui }) {
|
|
12880
12891
|
const showScore = m.phase !== "preMatch" && typeof m.homeScore === "number";
|
|
12881
12892
|
const stale = m.status === "stale";
|
|
@@ -12906,7 +12917,7 @@ function MatchesPanel({ monitor, ui, slip, onAsk, discovery }) {
|
|
|
12906
12917
|
if (tiles.length === 0) return /* @__PURE__ */ jsx91("div", { className: "ss-w-mon-empty", children: ui.emptyMatchesTab });
|
|
12907
12918
|
const selected = tiles.find((t) => t.pin.key === monitor.selectedMatchKey) ?? tiles[0];
|
|
12908
12919
|
const m = selected.match;
|
|
12909
|
-
return /* @__PURE__ */ jsxs86(
|
|
12920
|
+
return /* @__PURE__ */ jsxs86(Fragment25, { children: [
|
|
12910
12921
|
tiles.filter((t) => t.match).length >= 2 && /* @__PURE__ */ jsx91(ScoreboardStrip, { tiles, selectedKey: selected.pin.key, onSelect: monitor.selectMatch, ui }),
|
|
12911
12922
|
/* @__PURE__ */ jsxs86("div", { className: "ss-w-mon-list", children: [
|
|
12912
12923
|
!m && /* @__PURE__ */ jsx91(MonitorSkeleton, { pin: selected.pin, monitor, ui }),
|
|
@@ -12947,7 +12958,7 @@ function TrendsPanel({ monitor, ui, slip }) {
|
|
|
12947
12958
|
const selected = tiles.find((t) => t.market.key === monitor.selectedTrendKey) ?? tiles[0];
|
|
12948
12959
|
const m = selected.market;
|
|
12949
12960
|
const pin = monitor.pins.find((p) => p.key === m.key);
|
|
12950
|
-
return /* @__PURE__ */ jsxs86(
|
|
12961
|
+
return /* @__PURE__ */ jsxs86(Fragment25, { children: [
|
|
12951
12962
|
tiles.length >= 2 && monitor.selectTrend && /* @__PURE__ */ jsx91(TrendsStrip, { tiles, selectedKey: m.key, onSelect: monitor.selectTrend, ui }),
|
|
12952
12963
|
/* @__PURE__ */ jsx91("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ jsxs86("div", { className: "ss-w-mon-oddspin", "data-settled": m.isSettled || void 0, children: [
|
|
12953
12964
|
/* @__PURE__ */ jsx91(OddsLiveStrip, { m, ui }),
|
|
@@ -13073,12 +13084,12 @@ function ScheduleRow(props) {
|
|
|
13073
13084
|
}
|
|
13074
13085
|
|
|
13075
13086
|
// src/components/LeagueTitle.tsx
|
|
13076
|
-
import { Fragment as
|
|
13087
|
+
import { Fragment as Fragment26, jsx as jsx93, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
13077
13088
|
function leagueTitleText(group, disambiguate) {
|
|
13078
13089
|
return disambiguate && group.competitionCountry ? `${group.competitionName} (${group.competitionCountry})` : group.competitionName;
|
|
13079
13090
|
}
|
|
13080
13091
|
function LeagueTitle({ group, disambiguate, nameClass }) {
|
|
13081
|
-
return /* @__PURE__ */ jsxs87(
|
|
13092
|
+
return /* @__PURE__ */ jsxs87(Fragment26, { children: [
|
|
13082
13093
|
/* @__PURE__ */ jsx93(Crest, { url: group.competitionImagePath ?? void 0, name: group.competitionName, kind: "comp" }),
|
|
13083
13094
|
/* @__PURE__ */ jsxs87("span", { className: nameClass, children: [
|
|
13084
13095
|
group.competitionName,
|
|
@@ -13306,7 +13317,7 @@ function SportChips({ offered, value, onChange, counts, ui }) {
|
|
|
13306
13317
|
}
|
|
13307
13318
|
|
|
13308
13319
|
// src/components/LivePanel.tsx
|
|
13309
|
-
import { Fragment as
|
|
13320
|
+
import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
13310
13321
|
var OPEN_TOP_GROUPS = 2;
|
|
13311
13322
|
var QUIET_ROWS = 4;
|
|
13312
13323
|
function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, onLeague, onSeeAll, onAsk }) {
|
|
@@ -13383,7 +13394,7 @@ function LivePanel({ discovery, ui, monitor, sport, offered, onSport, league, on
|
|
|
13383
13394
|
] }, section2.kind)),
|
|
13384
13395
|
sections.some((section2) => section2.groups.some((view) => view.group.sport === "tennis")) && /* @__PURE__ */ jsx97("div", { className: "ss-w-lp-foot", children: ui.tennis.liveTabFooter }),
|
|
13385
13396
|
!stale && sections.length === 0 && filtered && /* @__PURE__ */ jsx97("div", { className: "ss-w-today-empty", children: ui.nothingLiveForFilter }),
|
|
13386
|
-
!stale && sections.length === 0 && !filtered && /* @__PURE__ */ jsxs91(
|
|
13397
|
+
!stale && sections.length === 0 && !filtered && /* @__PURE__ */ jsxs91(Fragment27, { children: [
|
|
13387
13398
|
/* @__PURE__ */ jsx97("div", { className: "ss-w-today-empty", children: ui.nothingLive }),
|
|
13388
13399
|
upcoming.map(({ group, match }) => /* @__PURE__ */ jsxs91("div", { className: "ss-w-lp-next", children: [
|
|
13389
13400
|
/* @__PURE__ */ jsx97("span", { className: "ss-w-lp-tag", children: group.competitionName }),
|
|
@@ -13764,7 +13775,7 @@ function splitName(full) {
|
|
|
13764
13775
|
}
|
|
13765
13776
|
|
|
13766
13777
|
// src/components/GameTileArt.tsx
|
|
13767
|
-
import { Fragment as
|
|
13778
|
+
import { Fragment as Fragment28, jsx as jsx103, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
13768
13779
|
function GameTileArt({ gameId }) {
|
|
13769
13780
|
return /* @__PURE__ */ jsx103("svg", { className: "ss-g-art", viewBox: "0 0 120 74", "aria-hidden": "true", children: ART[gameId] ?? ART.default });
|
|
13770
13781
|
}
|
|
@@ -13773,41 +13784,41 @@ var head = (cx, cy, r, cls = "ss-g-art-fg") => /* @__PURE__ */ jsxs95("g", { cla
|
|
|
13773
13784
|
/* @__PURE__ */ jsx103("path", { d: `M${cx - r} ${cy + r}c0-${r * 0.8} ${r * 0.45}-${r * 1.1} ${r}-${r * 1.1}s${r} ${r * 0.3} ${r} ${r * 1.1}z` })
|
|
13774
13785
|
] });
|
|
13775
13786
|
var ART = {
|
|
13776
|
-
"mystery-tiger": /* @__PURE__ */ jsxs95(
|
|
13787
|
+
"mystery-tiger": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13777
13788
|
head(60, 38, 26, "ss-g-art-fg"),
|
|
13778
13789
|
/* @__PURE__ */ jsx103("text", { x: "60", y: "36", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
13779
13790
|
] }),
|
|
13780
|
-
"higher-or-lower": /* @__PURE__ */ jsxs95(
|
|
13791
|
+
"higher-or-lower": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13781
13792
|
head(32, 38, 20),
|
|
13782
13793
|
head(88, 38, 20),
|
|
13783
13794
|
/* @__PURE__ */ jsx103("circle", { cx: "60", cy: "37", r: "11", className: "ss-g-art-accent" }),
|
|
13784
13795
|
/* @__PURE__ */ jsx103("path", { d: "M57 33l3-3 3 3M57 41l3 3 3-3", className: "ss-g-art-ink" })
|
|
13785
13796
|
] }),
|
|
13786
|
-
"guess-the-xi": /* @__PURE__ */ jsxs95(
|
|
13797
|
+
"guess-the-xi": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13787
13798
|
/* @__PURE__ */ jsx103("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
13788
13799
|
[[60, 60, "a"], [24, 46], [48, 46], [72, 46], [96, 46], [36, 30], [60, 30], [84, 30], [40, 14], [60, 14], [80, 14]].map(([x, y, a], i) => /* @__PURE__ */ jsx103("circle", { cx: x, cy: y, r: "4", className: a ? "ss-g-art-accent" : "ss-g-art-dot" }, i))
|
|
13789
13800
|
] }),
|
|
13790
|
-
"daily-quiz": /* @__PURE__ */ jsx103(
|
|
13791
|
-
"career-path": /* @__PURE__ */ jsxs95(
|
|
13801
|
+
"daily-quiz": /* @__PURE__ */ jsx103(Fragment28, { children: [[14, 8], [62, 8], [14, 40], [62, 40]].map(([x, y], i) => /* @__PURE__ */ jsx103("rect", { x, y, width: "44", height: "26", rx: "5", className: i === 1 ? "ss-g-art-correct" : "ss-g-art-block" }, i)) }),
|
|
13802
|
+
"career-path": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13792
13803
|
/* @__PURE__ */ jsx103("path", { d: "M18 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
13793
13804
|
/* @__PURE__ */ jsx103("path", { d: "M48 37h8M84 37h8", className: "ss-g-art-line" }),
|
|
13794
13805
|
/* @__PURE__ */ jsx103("path", { d: "M60 22h24v10c0 7-5 11-12 13-7-2-12-6-12-13z", className: "ss-g-art-fg" }),
|
|
13795
13806
|
/* @__PURE__ */ jsx103("rect", { x: "96", y: "22", width: "18", height: "26", rx: "4", className: "ss-g-art-dash" }),
|
|
13796
13807
|
/* @__PURE__ */ jsx103("text", { x: "105", y: "40", className: "ss-g-art-q", textAnchor: "middle", children: "?" })
|
|
13797
13808
|
] }),
|
|
13798
|
-
"beat-the-grid": /* @__PURE__ */ jsx103(
|
|
13799
|
-
"matchday-predictor": /* @__PURE__ */ jsxs95(
|
|
13809
|
+
"beat-the-grid": /* @__PURE__ */ jsx103(Fragment28, { children: [0, 1, 2].flatMap((r) => [0, 1, 2].map((c) => /* @__PURE__ */ jsx103("rect", { x: 33 + c * 19, y: 10 + r * 19, width: "16", height: "16", rx: "3", className: (r + c) % 3 === 0 ? "ss-g-art-accent" : "ss-g-art-block" }, `${r}${c}`))) }),
|
|
13810
|
+
"matchday-predictor": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13800
13811
|
/* @__PURE__ */ jsx103("path", { d: "M10 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" }),
|
|
13801
13812
|
/* @__PURE__ */ jsx103("rect", { x: "38", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-accent-stroke" }),
|
|
13802
13813
|
/* @__PURE__ */ jsx103("rect", { x: "64", y: "22", width: "18", height: "24", rx: "4", className: "ss-g-art-dash" }),
|
|
13803
13814
|
/* @__PURE__ */ jsx103("path", { d: "M90 20h20v9c0 6-4 9-10 11-6-2-10-5-10-11z", className: "ss-g-art-fg" })
|
|
13804
13815
|
] }),
|
|
13805
|
-
"starting-xi": /* @__PURE__ */ jsxs95(
|
|
13816
|
+
"starting-xi": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13806
13817
|
/* @__PURE__ */ jsx103("rect", { x: "8", y: "4", width: "104", height: "66", rx: "6", className: "ss-g-art-pitch" }),
|
|
13807
13818
|
[[60, 60], [30, 46], [50, 46], [70, 46], [90, 46], [45, 30], [75, 30], [30, 16], [60, 16], [90, 16]].map(([x, y], i) => /* @__PURE__ */ jsx103("circle", { cx: x, cy: y, r: "5", className: i < 7 ? "ss-g-art-accent" : "ss-g-art-dash" }, i))
|
|
13808
13819
|
] }),
|
|
13809
|
-
"stat-ladder": /* @__PURE__ */ jsx103(
|
|
13810
|
-
"fan-motm": /* @__PURE__ */ jsxs95(
|
|
13820
|
+
"stat-ladder": /* @__PURE__ */ jsx103(Fragment28, { children: [[20, 70], [34, 52], [48, 34]].map(([y, w], i) => /* @__PURE__ */ jsx103("rect", { x: "24", y, width: w, height: "12", rx: "3", className: i === 1 ? "ss-g-art-accent" : "ss-g-art-block" }, i)) }),
|
|
13821
|
+
"fan-motm": /* @__PURE__ */ jsxs95(Fragment28, { children: [
|
|
13811
13822
|
/* @__PURE__ */ jsx103("circle", { cx: "60", cy: "37", r: "26", className: "ss-g-art-accent-stroke" }),
|
|
13812
13823
|
head(60, 40, 18),
|
|
13813
13824
|
/* @__PURE__ */ jsx103("path", { d: "M84 8l2.4 5 5.4.6-4 3.7 1.1 5.4-4.9-2.7-4.9 2.7 1.1-5.4-4-3.7 5.4-.6z", className: "ss-g-art-accent" })
|
|
@@ -13831,7 +13842,7 @@ function StatStack({ value, label }) {
|
|
|
13831
13842
|
}
|
|
13832
13843
|
|
|
13833
13844
|
// src/components/GameTile.tsx
|
|
13834
|
-
import { Fragment as
|
|
13845
|
+
import { Fragment as Fragment29, jsx as jsx105, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
13835
13846
|
function tileStatus(game, ui) {
|
|
13836
13847
|
switch (game.status) {
|
|
13837
13848
|
case "locked":
|
|
@@ -13855,7 +13866,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
13855
13866
|
const status2 = tileStatus(game, ui);
|
|
13856
13867
|
const disabled = DISABLED.has(game.status);
|
|
13857
13868
|
const title = gameTitle(game, ui.games.titles);
|
|
13858
|
-
const body = variant === "hero" ? /* @__PURE__ */ jsxs97(
|
|
13869
|
+
const body = variant === "hero" ? /* @__PURE__ */ jsxs97(Fragment29, { children: [
|
|
13859
13870
|
/* @__PURE__ */ jsxs97("span", { className: "ss-g-hero-text", children: [
|
|
13860
13871
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-hero-eyebrow", children: ui.games.dailyChallenge }),
|
|
13861
13872
|
status2.tone === "new" && /* @__PURE__ */ jsx105(Chip, { variant: "badge", children: ui.games.newToday }),
|
|
@@ -13867,7 +13878,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
13867
13878
|
] })
|
|
13868
13879
|
] }),
|
|
13869
13880
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-hero-art", children: /* @__PURE__ */ jsx105(GameTileArt, { gameId: game.gameId }) })
|
|
13870
|
-
] }) : variant === "wide" ? /* @__PURE__ */ jsxs97(
|
|
13881
|
+
] }) : variant === "wide" ? /* @__PURE__ */ jsxs97(Fragment29, { children: [
|
|
13871
13882
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-wide-art", children: /* @__PURE__ */ jsx105(GameTileArt, { gameId: game.gameId }) }),
|
|
13872
13883
|
/* @__PURE__ */ jsxs97("span", { className: "ss-g-wide-text", children: [
|
|
13873
13884
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-tile-title", children: title }),
|
|
@@ -13875,7 +13886,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
13875
13886
|
status2.tone === "new" && /* @__PURE__ */ jsx105(Chip, { variant: "badge", children: ui.games.newToday })
|
|
13876
13887
|
] }),
|
|
13877
13888
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-wide-chev", children: /* @__PURE__ */ jsx105(IconChevronLeft, { size: 18 }) })
|
|
13878
|
-
] }) : /* @__PURE__ */ jsxs97(
|
|
13889
|
+
] }) : /* @__PURE__ */ jsxs97(Fragment29, { children: [
|
|
13879
13890
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-tile-art", children: /* @__PURE__ */ jsx105(GameTileArt, { gameId: game.gameId }) }),
|
|
13880
13891
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-tile-title", children: title }),
|
|
13881
13892
|
/* @__PURE__ */ jsx105("span", { className: "ss-g-tile-status", "data-tone": status2.tone, children: status2.text })
|
|
@@ -13886,7 +13897,7 @@ function GameTile({ game, onOpen, ui, variant = "tile" }) {
|
|
|
13886
13897
|
}
|
|
13887
13898
|
|
|
13888
13899
|
// src/components/GamesHub.tsx
|
|
13889
|
-
import { Fragment as
|
|
13900
|
+
import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
13890
13901
|
var PLAYABLE = /* @__PURE__ */ new Set(["available", "in_progress"]);
|
|
13891
13902
|
var DONE = /* @__PURE__ */ new Set(["played", "graded"]);
|
|
13892
13903
|
function pickHeroGame(games) {
|
|
@@ -13917,7 +13928,7 @@ function GamesHub({ games, myWeeklyRow, weeklyPrize, onOpen, ui }) {
|
|
|
13917
13928
|
/* @__PURE__ */ jsxs98("div", { className: "ss-g-stat", children: [
|
|
13918
13929
|
/* @__PURE__ */ jsx106("span", { className: "ss-g-stat-l", children: ui.games.statStreak }),
|
|
13919
13930
|
/* @__PURE__ */ jsxs98("span", { className: "ss-g-stat-v", "data-testid": "stat-streak", children: [
|
|
13920
|
-
myWeeklyRow ? /* @__PURE__ */ jsxs98(
|
|
13931
|
+
myWeeklyRow ? /* @__PURE__ */ jsxs98(Fragment30, { children: [
|
|
13921
13932
|
/* @__PURE__ */ jsx106(IconFlame, {}),
|
|
13922
13933
|
myWeeklyRow.currentStreak
|
|
13923
13934
|
] }) : dash,
|
|
@@ -14307,11 +14318,11 @@ function SegmentProgress({ segments, ariaLabel, leftLabel, rightLabel, right })
|
|
|
14307
14318
|
}
|
|
14308
14319
|
|
|
14309
14320
|
// src/components/games/ui/AnswerTray.tsx
|
|
14310
|
-
import { Fragment as
|
|
14321
|
+
import { Fragment as Fragment31, jsx as jsx110, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
14311
14322
|
function AnswerTray({ id, label, placeholder, optionsLabel, options, query, onQuery, onPick, disabled, minQuery = 0 }) {
|
|
14312
14323
|
const needle = query.trim().toLowerCase();
|
|
14313
14324
|
const shown2 = needle.length < minQuery ? [] : needle ? options.filter((o) => o.name.toLowerCase().includes(needle)) : options;
|
|
14314
|
-
return /* @__PURE__ */ jsxs101(
|
|
14325
|
+
return /* @__PURE__ */ jsxs101(Fragment31, { children: [
|
|
14315
14326
|
/* @__PURE__ */ jsx110(
|
|
14316
14327
|
SearchField,
|
|
14317
14328
|
{
|
|
@@ -14444,7 +14455,7 @@ function PointsLadderRow({ ladder, guessesUsed, ui }) {
|
|
|
14444
14455
|
}
|
|
14445
14456
|
|
|
14446
14457
|
// src/components/games/MysteryTigerGame.tsx
|
|
14447
|
-
import { Fragment as
|
|
14458
|
+
import { Fragment as Fragment32, jsx as jsx116, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
14448
14459
|
function parseClientState(json) {
|
|
14449
14460
|
if (!json) return null;
|
|
14450
14461
|
try {
|
|
@@ -14554,7 +14565,7 @@ function MysteryTigerGame({
|
|
|
14554
14565
|
}
|
|
14555
14566
|
),
|
|
14556
14567
|
!config && /* @__PURE__ */ jsx116("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
14557
|
-
config && /* @__PURE__ */ jsxs105(
|
|
14568
|
+
config && /* @__PURE__ */ jsxs105(Fragment32, { children: [
|
|
14558
14569
|
/* @__PURE__ */ jsxs105("div", { className: "ss-g-body", children: [
|
|
14559
14570
|
!isOver && /* @__PURE__ */ jsx116(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed, ui }),
|
|
14560
14571
|
/* @__PURE__ */ jsxs105("div", { className: `ss-g-mt-card${isOver ? " ss-g-mt-card--reveal" : ""}`, children: [
|
|
@@ -14654,7 +14665,7 @@ function MysteryTigerGame({
|
|
|
14654
14665
|
}
|
|
14655
14666
|
|
|
14656
14667
|
// src/components/games/HigherOrLowerGame.tsx
|
|
14657
|
-
import { Fragment as
|
|
14668
|
+
import { Fragment as Fragment33, jsx as jsx117, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
14658
14669
|
var POINTS_PER_CORRECT = 10;
|
|
14659
14670
|
function parseClientState2(json) {
|
|
14660
14671
|
if (!json) return null;
|
|
@@ -14714,7 +14725,7 @@ function HigherOrLowerGame({
|
|
|
14714
14725
|
}
|
|
14715
14726
|
),
|
|
14716
14727
|
!config && /* @__PURE__ */ jsx117("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
14717
|
-
config && /* @__PURE__ */ jsxs106(
|
|
14728
|
+
config && /* @__PURE__ */ jsxs106(Fragment33, { children: [
|
|
14718
14729
|
/* @__PURE__ */ jsxs106("div", { className: "ss-g-body", children: [
|
|
14719
14730
|
/* @__PURE__ */ jsxs106("div", { className: "ss-g-hl-prompt", "data-testid": "hol-prompt", children: [
|
|
14720
14731
|
/* @__PURE__ */ jsx117("span", { className: "ss-g-hl-prompt-q", children: t.whoHadMore }),
|
|
@@ -14784,7 +14795,7 @@ function CrestShield({ src, name, size = 28 }) {
|
|
|
14784
14795
|
}
|
|
14785
14796
|
|
|
14786
14797
|
// src/components/games/CareerPathGame.tsx
|
|
14787
|
-
import { Fragment as
|
|
14798
|
+
import { Fragment as Fragment34, jsx as jsx119, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
14788
14799
|
function parseClientState3(json) {
|
|
14789
14800
|
if (!json) return null;
|
|
14790
14801
|
try {
|
|
@@ -14864,7 +14875,7 @@ function CareerPathGame({
|
|
|
14864
14875
|
/* @__PURE__ */ jsx119("span", { className: "ss-g-cp-club", children: spell.clubName }),
|
|
14865
14876
|
/* @__PURE__ */ jsxs107("span", { className: "ss-g-cp-sub", children: [
|
|
14866
14877
|
/* @__PURE__ */ jsx119("span", { className: "ss-g-cp-years", children: years }),
|
|
14867
|
-
spell.isLoan && /* @__PURE__ */ jsxs107(
|
|
14878
|
+
spell.isLoan && /* @__PURE__ */ jsxs107(Fragment34, { children: [
|
|
14868
14879
|
years ? " \xB7 " : "",
|
|
14869
14880
|
/* @__PURE__ */ jsx119("span", { className: "ss-g-cp-loan", children: s.loan })
|
|
14870
14881
|
] })
|
|
@@ -14924,7 +14935,7 @@ function OptionList({ label, options, onPick }) {
|
|
|
14924
14935
|
}
|
|
14925
14936
|
|
|
14926
14937
|
// src/components/games/BeatTheGridGame.tsx
|
|
14927
|
-
import { Fragment as
|
|
14938
|
+
import { Fragment as Fragment35, jsx as jsx121, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
14928
14939
|
function criterionIconKind(label, key) {
|
|
14929
14940
|
const l = (key ?? label).toLowerCase();
|
|
14930
14941
|
if (l.includes("app")) return "calendar";
|
|
@@ -14967,7 +14978,7 @@ function HeaderVisual({ label, textKey: iKey, meta }) {
|
|
|
14967
14978
|
case "country":
|
|
14968
14979
|
return /* @__PURE__ */ jsx121("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
14969
14980
|
case "position":
|
|
14970
|
-
return /* @__PURE__ */ jsx121(
|
|
14981
|
+
return /* @__PURE__ */ jsx121(Fragment35, {});
|
|
14971
14982
|
default:
|
|
14972
14983
|
return /* @__PURE__ */ jsx121(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
14973
14984
|
}
|
|
@@ -15030,7 +15041,7 @@ function SearchSheet({
|
|
|
15030
15041
|
}
|
|
15031
15042
|
)
|
|
15032
15043
|
] }),
|
|
15033
|
-
playerPool.length === 0 ? /* @__PURE__ */ jsx121("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs108(
|
|
15044
|
+
playerPool.length === 0 ? /* @__PURE__ */ jsx121("div", { className: "ss-g-btg-sheet-empty", children: s.emptyPool }) : /* @__PURE__ */ jsxs108(Fragment35, { children: [
|
|
15034
15045
|
/* @__PURE__ */ jsx121(
|
|
15035
15046
|
SearchField,
|
|
15036
15047
|
{
|
|
@@ -15049,7 +15060,7 @@ function SearchSheet({
|
|
|
15049
15060
|
label: s.searchLabel(rowLabel, colLabel),
|
|
15050
15061
|
options: filtered.map((p) => ({
|
|
15051
15062
|
key: p.id,
|
|
15052
|
-
content: /* @__PURE__ */ jsxs108(
|
|
15063
|
+
content: /* @__PURE__ */ jsxs108(Fragment35, { children: [
|
|
15053
15064
|
/* @__PURE__ */ jsx121(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
15054
15065
|
/* @__PURE__ */ jsx121("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
15055
15066
|
/* @__PURE__ */ jsx121("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ jsx121(IconPlus, { size: 18 }) })
|
|
@@ -15139,10 +15150,10 @@ function BeatTheGridGame({
|
|
|
15139
15150
|
rows.map((rowLabel, rowIdx) => {
|
|
15140
15151
|
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
15141
15152
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
15142
|
-
const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs108(
|
|
15153
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ jsxs108(Fragment35, { children: [
|
|
15143
15154
|
/* @__PURE__ */ jsx121(HeaderVisual, { label: rowLabel, textKey: config.rowsI18n?.[rowIdx]?.key, meta: rowMeta }),
|
|
15144
15155
|
/* @__PURE__ */ jsx121("span", { children: rowLabel })
|
|
15145
|
-
] }) : abbr === rowLabel ? /* @__PURE__ */ jsx121("span", { children: rowLabel }) : /* @__PURE__ */ jsxs108(
|
|
15156
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ jsx121("span", { children: rowLabel }) : /* @__PURE__ */ jsxs108(Fragment35, { children: [
|
|
15146
15157
|
/* @__PURE__ */ jsx121("span", { "aria-hidden": "true", children: abbr }),
|
|
15147
15158
|
/* @__PURE__ */ jsx121("span", { className: "ss-g-sr", children: rowLabel })
|
|
15148
15159
|
] });
|
|
@@ -15163,7 +15174,7 @@ function BeatTheGridGame({
|
|
|
15163
15174
|
className: "ss-g-btg-cell",
|
|
15164
15175
|
disabled: isLocked2 || submitting,
|
|
15165
15176
|
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
15166
|
-
children: filled ? /* @__PURE__ */ jsxs108(
|
|
15177
|
+
children: filled ? /* @__PURE__ */ jsxs108(Fragment35, { children: [
|
|
15167
15178
|
/* @__PURE__ */ jsx121(
|
|
15168
15179
|
"span",
|
|
15169
15180
|
{
|
|
@@ -15230,16 +15241,16 @@ function BeatTheGridGame({
|
|
|
15230
15241
|
import { useState as useState65, useId as useId7 } from "react";
|
|
15231
15242
|
|
|
15232
15243
|
// src/components/games/ui/PitchSvg.tsx
|
|
15233
|
-
import { Fragment as
|
|
15244
|
+
import { Fragment as Fragment36, jsx as jsx122, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
15234
15245
|
function PitchSvg({ variant }) {
|
|
15235
15246
|
return /* @__PURE__ */ jsxs109("svg", { className: "ss-g-pitch-svg", viewBox: variant === "full" ? "0 0 100 150" : "0 0 100 100", preserveAspectRatio: "none", "aria-hidden": "true", children: [
|
|
15236
15247
|
/* @__PURE__ */ jsx122("rect", { x: "4", y: "4", width: "92", height: variant === "full" ? 142 : 92, fill: "none" }),
|
|
15237
|
-
variant === "full" ? /* @__PURE__ */ jsxs109(
|
|
15248
|
+
variant === "full" ? /* @__PURE__ */ jsxs109(Fragment36, { children: [
|
|
15238
15249
|
/* @__PURE__ */ jsx122("line", { x1: "4", y1: "75", x2: "96", y2: "75" }),
|
|
15239
15250
|
/* @__PURE__ */ jsx122("circle", { cx: "50", cy: "75", r: "12", fill: "none" }),
|
|
15240
15251
|
/* @__PURE__ */ jsx122("rect", { x: "26", y: "4", width: "48", height: "20", fill: "none" }),
|
|
15241
15252
|
/* @__PURE__ */ jsx122("rect", { x: "26", y: "126", width: "48", height: "20", fill: "none" })
|
|
15242
|
-
] }) : /* @__PURE__ */ jsxs109(
|
|
15253
|
+
] }) : /* @__PURE__ */ jsxs109(Fragment36, { children: [
|
|
15243
15254
|
/* @__PURE__ */ jsx122("path", { d: "M38 4a12 12 0 0 0 24 0", fill: "none" }),
|
|
15244
15255
|
/* @__PURE__ */ jsx122("rect", { x: "26", y: "76", width: "48", height: "20", fill: "none" })
|
|
15245
15256
|
] })
|
|
@@ -15297,7 +15308,7 @@ function positionsBySlot(formation, rowsAttackFirst) {
|
|
|
15297
15308
|
}
|
|
15298
15309
|
|
|
15299
15310
|
// src/components/games/GuessTheXiGame.tsx
|
|
15300
|
-
import { Fragment as
|
|
15311
|
+
import { Fragment as Fragment37, jsx as jsx123, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
15301
15312
|
var MAX_GUESSES2 = 3;
|
|
15302
15313
|
function parseClientState5(json) {
|
|
15303
15314
|
if (!json) return null;
|
|
@@ -15359,7 +15370,7 @@ function GuessTheXiGame({
|
|
|
15359
15370
|
}
|
|
15360
15371
|
),
|
|
15361
15372
|
!config && /* @__PURE__ */ jsx123("div", { className: "ss-g-body ss-g-loading", children: ui.games.loading }),
|
|
15362
|
-
config && /* @__PURE__ */ jsxs110(
|
|
15373
|
+
config && /* @__PURE__ */ jsxs110(Fragment37, { children: [
|
|
15363
15374
|
/* @__PURE__ */ jsxs110("div", { className: "ss-g-body", children: [
|
|
15364
15375
|
!isOver && /* @__PURE__ */ jsx123(PointsLadderRow, { ladder: config.pointsLadder, guessesUsed: clientState?.guessHistory.length ?? 0, ui }),
|
|
15365
15376
|
rows.length > 0 && /* @__PURE__ */ jsxs110("div", { className: "ss-g-gxi-pitch", role: "group", "aria-label": t.pitchLabel, children: [
|
|
@@ -15408,7 +15419,7 @@ function GuessTheXiGame({
|
|
|
15408
15419
|
] }, g.teamId);
|
|
15409
15420
|
})
|
|
15410
15421
|
] }),
|
|
15411
|
-
isOver && /* @__PURE__ */ jsxs110(
|
|
15422
|
+
isOver && /* @__PURE__ */ jsxs110(Fragment37, { children: [
|
|
15412
15423
|
/* @__PURE__ */ jsx123(
|
|
15413
15424
|
ResultCard,
|
|
15414
15425
|
{
|
|
@@ -15434,7 +15445,7 @@ function GuessTheXiGame({
|
|
|
15434
15445
|
label: t.optionsLabel,
|
|
15435
15446
|
options: filtered.map((tm) => ({
|
|
15436
15447
|
key: tm.teamId,
|
|
15437
|
-
content: /* @__PURE__ */ jsxs110(
|
|
15448
|
+
content: /* @__PURE__ */ jsxs110(Fragment37, { children: [
|
|
15438
15449
|
/* @__PURE__ */ jsx123(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
15439
15450
|
/* @__PURE__ */ jsx123("span", { children: tm.teamName })
|
|
15440
15451
|
] })
|
|
@@ -15460,7 +15471,7 @@ function GuessTheXiGame({
|
|
|
15460
15471
|
|
|
15461
15472
|
// src/components/games/DailyQuizGame.tsx
|
|
15462
15473
|
import { useState as useState66 } from "react";
|
|
15463
|
-
import { Fragment as
|
|
15474
|
+
import { Fragment as Fragment38, jsx as jsx124, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
15464
15475
|
function parseClientState6(json) {
|
|
15465
15476
|
if (!json) return null;
|
|
15466
15477
|
try {
|
|
@@ -15579,7 +15590,7 @@ function DailyQuizGame({
|
|
|
15579
15590
|
return /* @__PURE__ */ jsxs111("div", { className: "ss-g-screen", "data-game": "daily-quiz", "data-testid": "game-screen-daily-quiz", children: [
|
|
15580
15591
|
/* @__PURE__ */ jsx124(GameHeader, { title, eyebrow: s.questionOf(page + 1, total), onBack, backLabel: ui.back }),
|
|
15581
15592
|
/* @__PURE__ */ jsx124(SegmentProgress, { segments, ariaLabel: s.progressAria(page + 1, total) }),
|
|
15582
|
-
/* @__PURE__ */ jsx124("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs111(
|
|
15593
|
+
/* @__PURE__ */ jsx124("div", { className: "ss-g-body", children: current && /* @__PURE__ */ jsxs111(Fragment38, { children: [
|
|
15583
15594
|
/* @__PURE__ */ jsx124("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
15584
15595
|
/* @__PURE__ */ jsx124("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
15585
15596
|
const selected = optIdx === selectedIdx;
|
|
@@ -15880,7 +15891,7 @@ function MatchdayPredictorGame({
|
|
|
15880
15891
|
|
|
15881
15892
|
// src/components/games/StartingXiGame.tsx
|
|
15882
15893
|
import { useId as useId9, useState as useState68 } from "react";
|
|
15883
|
-
import { Fragment as
|
|
15894
|
+
import { Fragment as Fragment39, jsx as jsx126, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
15884
15895
|
var POINTS_PER_STARTER = 8;
|
|
15885
15896
|
var XI_SIZE = 11;
|
|
15886
15897
|
var DEFAULT_FORMATION = "4-3-3";
|
|
@@ -16029,11 +16040,11 @@ function StartingXiGame({
|
|
|
16029
16040
|
})
|
|
16030
16041
|
] }),
|
|
16031
16042
|
/* @__PURE__ */ jsxs113("div", { className: "ss-g-xi-picker", children: [
|
|
16032
|
-
/* @__PURE__ */ jsx126("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs113(
|
|
16043
|
+
/* @__PURE__ */ jsx126("div", { className: "ss-g-xi-picker-head", children: activeSlot ? /* @__PURE__ */ jsxs113(Fragment39, { children: [
|
|
16033
16044
|
/* @__PURE__ */ jsx126(Chip, { variant: "badge", children: activeSlot.label }),
|
|
16034
16045
|
/* @__PURE__ */ jsx126("strong", { children: t.pickFor(activeSlot.label) })
|
|
16035
16046
|
] }) : /* @__PURE__ */ jsx126("strong", { children: t.allPicked }) }),
|
|
16036
|
-
activeSlot && /* @__PURE__ */ jsxs113(
|
|
16047
|
+
activeSlot && /* @__PURE__ */ jsxs113(Fragment39, { children: [
|
|
16037
16048
|
/* @__PURE__ */ jsx126(
|
|
16038
16049
|
SearchField,
|
|
16039
16050
|
{
|
|
@@ -16533,7 +16544,7 @@ function LeaderboardEmpty({
|
|
|
16533
16544
|
}
|
|
16534
16545
|
|
|
16535
16546
|
// src/components/Leaderboard.tsx
|
|
16536
|
-
import { Fragment as
|
|
16547
|
+
import { Fragment as Fragment40, jsx as jsx132, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
16537
16548
|
function Leaderboard({
|
|
16538
16549
|
data,
|
|
16539
16550
|
ui,
|
|
@@ -16575,7 +16586,7 @@ function Leaderboard({
|
|
|
16575
16586
|
onPlay,
|
|
16576
16587
|
ui
|
|
16577
16588
|
}
|
|
16578
|
-
) : /* @__PURE__ */ jsxs118(
|
|
16589
|
+
) : /* @__PURE__ */ jsxs118(Fragment40, { children: [
|
|
16579
16590
|
/* @__PURE__ */ jsx132("div", { className: "ss-w-lb2-rows", children: segment === "weekly" ? data.weeklyTop.map((row) => /* @__PURE__ */ jsx132(
|
|
16580
16591
|
LeaderboardWeeklyRow,
|
|
16581
16592
|
{
|
|
@@ -16714,7 +16725,7 @@ import { useEffect as useEffect50, useRef as useRef42, useState as useState75 }
|
|
|
16714
16725
|
|
|
16715
16726
|
// src/components/FavouriteChips.tsx
|
|
16716
16727
|
import { useEffect as useEffect48, useState as useState73 } from "react";
|
|
16717
|
-
import { Fragment as
|
|
16728
|
+
import { Fragment as Fragment41, jsx as jsx135, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
16718
16729
|
async function toggleWithNotice(controller, kind, id, onNotice) {
|
|
16719
16730
|
const outcome = await controller.toggle(kind, id);
|
|
16720
16731
|
if (outcome === "at_cap") onNotice({ type: "cap", kind });
|
|
@@ -16780,7 +16791,7 @@ function FavouriteChips({ controller, ui, sport, sportLabel: sportLabel2, onNoti
|
|
|
16780
16791
|
if (!await controller.clear()) onNotice({ type: "error" });
|
|
16781
16792
|
else onNotice(null);
|
|
16782
16793
|
};
|
|
16783
|
-
return /* @__PURE__ */ jsxs120(
|
|
16794
|
+
return /* @__PURE__ */ jsxs120(Fragment41, { children: [
|
|
16784
16795
|
total === 0 ? /* @__PURE__ */ jsx135("p", { className: "ss-w-fav-empty", children: sport === "tennis" ? ui.tennis.favEmpty : ui.favEmpty }) : null,
|
|
16785
16796
|
hasCompetitions(sport) ? /* @__PURE__ */ jsx135(Group, { title: sport === "tennis" ? ui.tennis.favTournaments : ui.favLeagues, entities: data.competitions, sport, ui, controller, onNotice }) : null,
|
|
16786
16797
|
hasTeams(sport) ? /* @__PURE__ */ jsx135(Group, { title: ui.favTeams, entities: data.teams, sport, ui, controller, onNotice }) : null,
|
|
@@ -16907,7 +16918,7 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
16907
16918
|
}, [sport]);
|
|
16908
16919
|
const sportLabel2 = sports.find((s) => s.sport === sport)?.label ?? sportLabel(ui, sport);
|
|
16909
16920
|
const noticeText = notice === null ? null : notice.type === "cap" ? ui.favAtCap(favouriteKindLabel(ui, sport, notice.kind)) : ui.favError;
|
|
16910
|
-
return /* @__PURE__ */ jsxs122("div", { className: "ss-w-
|
|
16921
|
+
return /* @__PURE__ */ jsxs122("div", { className: "ss-w-fav", children: [
|
|
16911
16922
|
sports.length > 1 ? /* @__PURE__ */ jsx137("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: sports.map((s) => /* @__PURE__ */ jsx137(
|
|
16912
16923
|
"button",
|
|
16913
16924
|
{
|
|
@@ -16927,9 +16938,104 @@ function FavouritesPanel({ controller, ui, sport, sports, onSportChange }) {
|
|
|
16927
16938
|
] });
|
|
16928
16939
|
}
|
|
16929
16940
|
|
|
16941
|
+
// src/components/PresetTools.tsx
|
|
16942
|
+
import { useId as useId11, useState as useState76 } from "react";
|
|
16943
|
+
import { Fragment as Fragment42, jsx as jsx138, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
16944
|
+
function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
|
|
16945
|
+
const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
|
|
16946
|
+
const titleId = useId11();
|
|
16947
|
+
return /* @__PURE__ */ jsx138("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs123("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
|
|
16948
|
+
/* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-head", children: [
|
|
16949
|
+
/* @__PURE__ */ jsx138("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
16950
|
+
/* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx138(CloseIcon, {}) })
|
|
16951
|
+
] }),
|
|
16952
|
+
/* @__PURE__ */ jsx138("div", { className: "ss-w-tool-body", children }),
|
|
16953
|
+
footer ? /* @__PURE__ */ jsx138("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
16954
|
+
] }) });
|
|
16955
|
+
}
|
|
16956
|
+
function SendButton({ label, display, disabled, onClick }) {
|
|
16957
|
+
return /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
16958
|
+
}
|
|
16959
|
+
function PickList({ picks, formatKickoff }) {
|
|
16960
|
+
const { oddsFormat } = useOddsSettings();
|
|
16961
|
+
return /* @__PURE__ */ jsx138("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs123("li", { className: "ss-w-tool-pick", children: [
|
|
16962
|
+
/* @__PURE__ */ jsxs123("span", { className: "ss-w-tool-pick-match", children: [
|
|
16963
|
+
p.homeTeamName,
|
|
16964
|
+
" \u2013 ",
|
|
16965
|
+
p.awayTeamName
|
|
16966
|
+
] }),
|
|
16967
|
+
/* @__PURE__ */ jsxs123("span", { className: "ss-w-tool-pick-sel", children: [
|
|
16968
|
+
p.marketLabel,
|
|
16969
|
+
": ",
|
|
16970
|
+
p.selectionLabel,
|
|
16971
|
+
p.line ? ` ${p.line}` : ""
|
|
16972
|
+
] }),
|
|
16973
|
+
/* @__PURE__ */ jsx138("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
16974
|
+
/* @__PURE__ */ jsx138("span", { className: "ss-w-tool-pick-price", children: formatOdds(p.priceFormats, oddsFormat) })
|
|
16975
|
+
] }, p.matchOddsId)) });
|
|
16976
|
+
}
|
|
16977
|
+
function ComboPreview({ cell: cell2, formatKickoff }) {
|
|
16978
|
+
const { oddsFormat } = useOddsSettings();
|
|
16979
|
+
return /* @__PURE__ */ jsxs123(Fragment42, { children: [
|
|
16980
|
+
/* @__PURE__ */ jsx138(PickList, { picks: cell2.combo.legs, formatKickoff }),
|
|
16981
|
+
/* @__PURE__ */ jsx138("div", { className: "ss-w-tool-math", children: oddsFormat === "decimal" ? cell2.combo.multiplication : formatOdds(cell2.combo.totalFormats, oddsFormat) })
|
|
16982
|
+
] });
|
|
16983
|
+
}
|
|
16984
|
+
function Unavailable({ text: text2 }) {
|
|
16985
|
+
return /* @__PURE__ */ jsx138("p", { className: "ss-w-tool-unavailable", children: text2 });
|
|
16986
|
+
}
|
|
16987
|
+
var textOf = (options, value, format2) => {
|
|
16988
|
+
const o = options.find((x) => samePrice(x.value, value));
|
|
16989
|
+
return o ? formatOdds(o.formats, format2) : "";
|
|
16990
|
+
};
|
|
16991
|
+
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
16992
|
+
const { oddsFormat } = useOddsSettings();
|
|
16993
|
+
const totalOptions = comboTotals(grid);
|
|
16994
|
+
const totals = totalOptions.map((o) => o.value);
|
|
16995
|
+
const legChoices = comboLegChoices(grid);
|
|
16996
|
+
const [total, setTotal] = useState76(() => nearest(totals, initialTotal));
|
|
16997
|
+
const [legs, setLegs] = useState76(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
|
|
16998
|
+
const [announcement, setAnnouncement] = useState76("");
|
|
16999
|
+
const cell2 = findCombo(grid, total, legs);
|
|
17000
|
+
const minLegs = legChoices[0] ?? legs;
|
|
17001
|
+
const maxLegs = legChoices[legChoices.length - 1] ?? legs;
|
|
17002
|
+
const display = strings.comboDisplay(legs, textOf(totalOptions, total, oddsFormat));
|
|
17003
|
+
const choose = (nextTotal, nextLegs) => {
|
|
17004
|
+
setTotal(nextTotal);
|
|
17005
|
+
setLegs(nextLegs);
|
|
17006
|
+
const d = strings.comboDisplay(nextLegs, textOf(totalOptions, nextTotal, oddsFormat));
|
|
17007
|
+
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
17008
|
+
};
|
|
17009
|
+
const footer = /* @__PURE__ */ jsx138(SendButton, { label: strings.send, display, disabled: !cell2 || streaming, onClick: () => {
|
|
17010
|
+
if (cell2) onSend(comboAsk(cell2, strings, oddsFormat));
|
|
17011
|
+
} });
|
|
17012
|
+
return /* @__PURE__ */ jsxs123(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
17013
|
+
/* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
17014
|
+
/* @__PURE__ */ jsx138("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
17015
|
+
/* @__PURE__ */ jsx138("div", { className: "ss-w-tool-chips", children: totalOptions.map((o) => /* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(o.value, total), onClick: () => choose(o.value, samePrice(o.value, total) ? legs : legsForTotal(grid, o.value, legs)), children: formatOdds(o.formats, oddsFormat) }, o.key)) })
|
|
17016
|
+
] }),
|
|
17017
|
+
/* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
17018
|
+
/* @__PURE__ */ jsx138("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
17019
|
+
/* @__PURE__ */ jsxs123("div", { className: "ss-w-tool-stepper", children: [
|
|
17020
|
+
/* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
17021
|
+
/* @__PURE__ */ jsx138("span", { className: "ss-w-tool-count", children: legs }),
|
|
17022
|
+
/* @__PURE__ */ jsx138("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
17023
|
+
] })
|
|
17024
|
+
] }),
|
|
17025
|
+
cell2 ? /* @__PURE__ */ jsx138(ComboPreview, { cell: cell2, formatKickoff }) : /* @__PURE__ */ jsx138(Unavailable, { text: strings.unavailable }),
|
|
17026
|
+
/* @__PURE__ */ jsx138("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
17027
|
+
] });
|
|
17028
|
+
}
|
|
17029
|
+
|
|
17030
|
+
// src/components/FavouritesSheet.tsx
|
|
17031
|
+
import { jsx as jsx139 } from "react/jsx-runtime";
|
|
17032
|
+
function FavouritesSheet({ ui, controller, sport, sports, onSportChange, onClose }) {
|
|
17033
|
+
return /* @__PURE__ */ jsx139(PresetToolModal, { title: ui.tabFavourites, closeLabel: ui.closeSheetLabel, onClose, className: "ss-w-set-backdrop-in ss-w-fav-sheet", children: /* @__PURE__ */ jsx139(FavouritesPanel, { controller, ui, sport, sports, onSportChange }) });
|
|
17034
|
+
}
|
|
17035
|
+
|
|
16930
17036
|
// src/components/dashboard/v8/SentenceBuilder.tsx
|
|
16931
|
-
import { useEffect as
|
|
16932
|
-
import { Fragment as Fragment43, jsx as
|
|
17037
|
+
import { useEffect as useEffect52, useRef as useRef44, useState as useState77 } from "react";
|
|
17038
|
+
import { Fragment as Fragment43, jsx as jsx140, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
16933
17039
|
var TOTALS = ["any", "3", "5", "10", "20", "50"];
|
|
16934
17040
|
var BASE_LEGS = [1, 2, 3, 4];
|
|
16935
17041
|
var isTotal = (v) => TOTALS.includes(v);
|
|
@@ -16954,8 +17060,8 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
16954
17060
|
const opening = openingGames(preset);
|
|
16955
17061
|
const gamesOptions = opening.options;
|
|
16956
17062
|
const marketOptions = usableMarkets(preset);
|
|
16957
|
-
const [fingerprint] =
|
|
16958
|
-
const [saved] =
|
|
17063
|
+
const [fingerprint] = useState77(() => JSON.stringify(preset));
|
|
17064
|
+
const [saved] = useState77(() => {
|
|
16959
17065
|
const kept = memory3?.savedView(sport);
|
|
16960
17066
|
return kept && kept.fingerprint === fingerprint ? kept : null;
|
|
16961
17067
|
});
|
|
@@ -16969,9 +17075,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
16969
17075
|
// The server never widens by itself: an all-games preset with no ids asks for it.
|
|
16970
17076
|
widen: opening.option ? opening.option.matchIds.length === 0 : preset.gamesScope === "all" && preset.matchIds.length === 0
|
|
16971
17077
|
};
|
|
16972
|
-
const [view, setView] =
|
|
16973
|
-
const autoWidened =
|
|
16974
|
-
const [widenedNote, setWidenedNote] =
|
|
17078
|
+
const [view, setView] = useState77(() => saved?.view ?? openingView);
|
|
17079
|
+
const autoWidened = useRef44(false);
|
|
17080
|
+
const [widenedNote, setWidenedNote] = useState77(saved?.widenedNote ?? false);
|
|
16975
17081
|
const requestFor = (v) => ({
|
|
16976
17082
|
sport,
|
|
16977
17083
|
...v.marketKey !== null ? { marketKey: v.marketKey } : {},
|
|
@@ -16983,10 +17089,10 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
16983
17089
|
...operatorUserId ? { operatorUserId } : {},
|
|
16984
17090
|
...anonymousUserId ? { anonymousUserId } : {}
|
|
16985
17091
|
});
|
|
16986
|
-
const [first] =
|
|
17092
|
+
const [first] = useState77(() => requestFor(view));
|
|
16987
17093
|
const { grid, status: status2, confirmed, request } = useBuilderGrid({ conversation, locale: ui.hostTag, memory: memory3, initial: first });
|
|
16988
|
-
const lastRequest =
|
|
16989
|
-
|
|
17094
|
+
const lastRequest = useRef44(first);
|
|
17095
|
+
useEffect52(() => {
|
|
16990
17096
|
void request(lastRequest.current);
|
|
16991
17097
|
}, [request]);
|
|
16992
17098
|
const send = (req) => {
|
|
@@ -17019,14 +17125,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17019
17125
|
const rows = ready && grid.status === "ok" ? legsOf(grid, sport) : null;
|
|
17020
17126
|
const rowSlip = rows ? guardLegsPreMatch(slip, rows, ui) : slip;
|
|
17021
17127
|
useNextKickoffRender(rows ? rows.map((l) => l.kickoffUtc) : []);
|
|
17022
|
-
const [startedNote, setStartedNote] =
|
|
17128
|
+
const [startedNote, setStartedNote] = useState77(false);
|
|
17023
17129
|
const anyStarted = rows !== null && rows.some((l) => !preMatchOpen(l.kickoffUtc, Date.now()));
|
|
17024
|
-
|
|
17130
|
+
useEffect52(() => {
|
|
17025
17131
|
if (startedNote && status2 === "ready" && !anyStarted) setStartedNote(false);
|
|
17026
17132
|
}, [startedNote, status2, anyStarted]);
|
|
17027
17133
|
const market = rows?.[0]?.market;
|
|
17028
|
-
const [seen2, setSeen] =
|
|
17029
|
-
|
|
17134
|
+
const [seen2, setSeen] = useState77(null);
|
|
17135
|
+
useEffect52(() => {
|
|
17030
17136
|
if (market) setSeen(market);
|
|
17031
17137
|
}, [market]);
|
|
17032
17138
|
const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen2;
|
|
@@ -17039,14 +17145,14 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17039
17145
|
const quotedAt = rows ? oldestQuote(rows) : null;
|
|
17040
17146
|
const combo = ready && grid.total !== null ? { sport, totalChosen: view.total, totalActual: grid.total } : void 0;
|
|
17041
17147
|
const canWiden = gamesOptions === null || allGames !== null;
|
|
17042
|
-
|
|
17148
|
+
useEffect52(() => {
|
|
17043
17149
|
if (!empty2 || !singles || widened || !canWiden || autoWidened.current) return;
|
|
17044
17150
|
autoWidened.current = true;
|
|
17045
17151
|
const next = { ...view, widen: true, matchIds: [], gamesId: allGames ? allGames.id : view.gamesId };
|
|
17046
17152
|
commit(next, true);
|
|
17047
17153
|
send(requestFor(next));
|
|
17048
17154
|
}, [empty2, singles, widened, canWiden, view]);
|
|
17049
|
-
|
|
17155
|
+
useEffect52(() => {
|
|
17050
17156
|
if (coolOff) onCoolOff?.(sport);
|
|
17051
17157
|
}, [coolOff, onCoolOff, sport]);
|
|
17052
17158
|
if (coolOff) return null;
|
|
@@ -17055,13 +17161,13 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17055
17161
|
const nextWhen = nextAtMs !== null && nextAtMs > Date.now() ? kickoffText(ui, preset.nextGamesAtUtc) : null;
|
|
17056
17162
|
const phrase = preset.nextGamesAtUtc == null ? nextGames : null;
|
|
17057
17163
|
const mineGames = gamesOptions?.find((o) => o.id === view.gamesId)?.mine === true;
|
|
17058
|
-
return /* @__PURE__ */
|
|
17164
|
+
return /* @__PURE__ */ jsx140("section", { className: "ss-w-v8-sec ss-w-v8-builder", "data-testid": "v8-builder", "aria-busy": status2 === "loading" || void 0, children: conversation && paused ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "paused", children: nextWhen ? ui.v8PausedNext(nextWhen) : /* @__PURE__ */ jsxs124(Fragment43, { children: [
|
|
17059
17165
|
ui.v8Paused,
|
|
17060
|
-
phrase ? /* @__PURE__ */
|
|
17061
|
-
] }) }) : conversation ? /* @__PURE__ */
|
|
17062
|
-
marketOptions ? /* @__PURE__ */
|
|
17063
|
-
/* @__PURE__ */
|
|
17064
|
-
/* @__PURE__ */
|
|
17166
|
+
phrase ? /* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-next", "data-testid": "v8-next-games", children: phrase }) : null
|
|
17167
|
+
] }) }) : conversation ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
|
|
17168
|
+
marketOptions ? /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
|
|
17169
|
+
/* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
|
|
17170
|
+
/* @__PURE__ */ jsx140("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ jsxs124(
|
|
17065
17171
|
"select",
|
|
17066
17172
|
{
|
|
17067
17173
|
className: "ss-w-v8-select",
|
|
@@ -17072,18 +17178,18 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17072
17178
|
if (picked !== view.marketKey) ask({ ...view, marketKey: picked });
|
|
17073
17179
|
},
|
|
17074
17180
|
children: [
|
|
17075
|
-
/* @__PURE__ */
|
|
17076
|
-
marketOptions.map((m) => /* @__PURE__ */
|
|
17181
|
+
/* @__PURE__ */ jsx140("option", { value: ALL_MARKETS, children: ui.v8AllMarkets }),
|
|
17182
|
+
marketOptions.map((m) => /* @__PURE__ */ jsx140("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key))
|
|
17077
17183
|
]
|
|
17078
17184
|
}
|
|
17079
17185
|
) })
|
|
17080
|
-
] }) : marketName ? /* @__PURE__ */
|
|
17081
|
-
/* @__PURE__ */
|
|
17082
|
-
/* @__PURE__ */
|
|
17186
|
+
] }) : marketName ? /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
|
|
17187
|
+
/* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
|
|
17188
|
+
/* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-market", children: marketName })
|
|
17083
17189
|
] }) : null,
|
|
17084
|
-
/* @__PURE__ */
|
|
17085
|
-
/* @__PURE__ */
|
|
17086
|
-
gamesOptions ? /* @__PURE__ */
|
|
17190
|
+
/* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
|
|
17191
|
+
/* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderIn }),
|
|
17192
|
+
gamesOptions ? /* @__PURE__ */ jsx140("div", { className: "ss-w-v8-slot", "data-mine": mineGames || void 0, children: /* @__PURE__ */ jsx140(
|
|
17087
17193
|
"select",
|
|
17088
17194
|
{
|
|
17089
17195
|
className: "ss-w-v8-select",
|
|
@@ -17093,16 +17199,16 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17093
17199
|
const picked = gamesOptions.find((o) => o.id === e.target.value);
|
|
17094
17200
|
if (picked && picked.id !== view.gamesId) pickGames(picked);
|
|
17095
17201
|
},
|
|
17096
|
-
children: /* @__PURE__ */
|
|
17202
|
+
children: /* @__PURE__ */ jsx140(GamesOptions, { options: gamesOptions, ui })
|
|
17097
17203
|
}
|
|
17098
|
-
) }) : /* @__PURE__ */
|
|
17204
|
+
) }) : /* @__PURE__ */ jsx140("button", { type: "button", className: "ss-w-v8-builder-btn", "aria-pressed": view.widen, disabled: view.widen && !canNarrow, onClick: () => {
|
|
17099
17205
|
const next = { ...view, widen: canNarrow ? !view.widen : true, matchIds: canNarrow && view.widen && view.matchIds.length === 0 ? preset.matchIds : view.matchIds };
|
|
17100
17206
|
ask(next);
|
|
17101
17207
|
}, children: ui.v8UseAllGames })
|
|
17102
17208
|
] }),
|
|
17103
|
-
/* @__PURE__ */
|
|
17104
|
-
/* @__PURE__ */
|
|
17105
|
-
/* @__PURE__ */
|
|
17209
|
+
/* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln", children: [
|
|
17210
|
+
/* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderAs }),
|
|
17211
|
+
/* @__PURE__ */ jsx140("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderAs, children: legButtons.map((n) => /* @__PURE__ */ jsx140(
|
|
17106
17212
|
"button",
|
|
17107
17213
|
{
|
|
17108
17214
|
type: "button",
|
|
@@ -17117,9 +17223,9 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17117
17223
|
n
|
|
17118
17224
|
)) })
|
|
17119
17225
|
] }),
|
|
17120
|
-
view.legs > 1 ? /* @__PURE__ */
|
|
17121
|
-
/* @__PURE__ */
|
|
17122
|
-
/* @__PURE__ */
|
|
17226
|
+
view.legs > 1 ? /* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-ln ss-w-v8-builder-ln--total", children: [
|
|
17227
|
+
/* @__PURE__ */ jsx140("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderTotal }),
|
|
17228
|
+
/* @__PURE__ */ jsx140("div", { className: "ss-w-v8-builder-btns", role: "group", "aria-label": ui.v8BuilderTotal, children: totals.map((t) => /* @__PURE__ */ jsx140(
|
|
17123
17229
|
"button",
|
|
17124
17230
|
{
|
|
17125
17231
|
type: "button",
|
|
@@ -17133,31 +17239,31 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
17133
17239
|
t
|
|
17134
17240
|
)) })
|
|
17135
17241
|
] }) : null,
|
|
17136
|
-
ready && singles && widenedNote && !empty2 ? /* @__PURE__ */
|
|
17137
|
-
ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice && view.marketKey !== null ? /* @__PURE__ */
|
|
17138
|
-
startedNote ? /* @__PURE__ */
|
|
17139
|
-
status2 === "loading" ? /* @__PURE__ */
|
|
17140
|
-
status2 === "error" ? /* @__PURE__ */
|
|
17141
|
-
/* @__PURE__ */
|
|
17142
|
-
/* @__PURE__ */
|
|
17242
|
+
ready && singles && widenedNote && !empty2 ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "widened", children: ui.v8SinglesWidened(marketName) }) : null,
|
|
17243
|
+
ready && !widenedNote && !empty2 && preset.widenedForMarket === true && onOpeningChoice && view.marketKey !== null ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", children: ui.v8Widened }) : null,
|
|
17244
|
+
startedNote ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "started", role: "status", children: ui.slipStarted }) : null,
|
|
17245
|
+
status2 === "loading" ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "loading", children: ui.v8BuilderLoading }) : null,
|
|
17246
|
+
status2 === "error" ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
|
|
17247
|
+
/* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "error", children: ui.v8BuilderError }),
|
|
17248
|
+
/* @__PURE__ */ jsx140("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => {
|
|
17143
17249
|
setStartedNote(false);
|
|
17144
17250
|
void request(lastRequest.current);
|
|
17145
17251
|
}, children: ui.v8BuilderRetry })
|
|
17146
17252
|
] }) : null,
|
|
17147
|
-
empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */
|
|
17148
|
-
empty2 && !singles ? /* @__PURE__ */
|
|
17149
|
-
/* @__PURE__ */
|
|
17150
|
-
gamesOptions && allGames && !widened ? /* @__PURE__ */
|
|
17253
|
+
empty2 && singles && (widened || !canWiden) ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "no-prices", children: ui.v8NoPrices(marketName) }) : null,
|
|
17254
|
+
empty2 && !singles ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
|
|
17255
|
+
/* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-kind": "miss", children: ui.v8Miss }),
|
|
17256
|
+
gamesOptions && allGames && !widened ? /* @__PURE__ */ jsx140("button", { type: "button", className: "ss-w-v8-builder-btn", onClick: () => pickGames(allGames), children: ui.v8UseAllGames }) : null
|
|
17151
17257
|
] }) : null,
|
|
17152
|
-
rows && rows.length > 0 ? /* @__PURE__ */
|
|
17153
|
-
/* @__PURE__ */
|
|
17154
|
-
/* @__PURE__ */
|
|
17155
|
-
grid && grid.requestedLegs > 1 ? /* @__PURE__ */
|
|
17258
|
+
rows && rows.length > 0 ? /* @__PURE__ */ jsxs124(Fragment43, { children: [
|
|
17259
|
+
/* @__PURE__ */ jsxs124("div", { className: "ss-w-v8-builder-rows", children: [
|
|
17260
|
+
/* @__PURE__ */ jsx140("ol", { className: "ss-w-combo-legs", role: "list", children: rows.map((leg) => /* @__PURE__ */ jsx140(ComboLegRow, { leg, addToSlipEnabled: !!slip.onAddToSlip, ui, slip: rowSlip, hold: !confirmed, closed: !preMatchOpen(leg.kickoffUtc, Date.now()) }, leg.key)) }),
|
|
17261
|
+
grid && grid.requestedLegs > 1 ? /* @__PURE__ */ jsx140(AddAllToSlipButton, { legs: rows, slip: rowSlip, ui, labels: { add: ui.v8AddAll, done: ui.allInSlip }, combo, sizeless: true, hold: !confirmed, onStartedGame: () => {
|
|
17156
17262
|
setStartedNote(true);
|
|
17157
17263
|
void request(lastRequest.current);
|
|
17158
17264
|
} }) : null
|
|
17159
17265
|
] }),
|
|
17160
|
-
quotedAt ? /* @__PURE__ */
|
|
17266
|
+
quotedAt ? /* @__PURE__ */ jsx140("p", { className: "ss-w-v8-builder-note", "data-testid": "v8-asof", children: ui.v8PricesAsOf(fmtHhMm(quotedAt, ui.locale, clockOf(ui), ui.timeZone)) }) : null
|
|
17161
17267
|
] }) : null
|
|
17162
17268
|
] }) : null });
|
|
17163
17269
|
}
|
|
@@ -17165,25 +17271,25 @@ function GamesOptions({ options, ui }) {
|
|
|
17165
17271
|
const top = options.filter((o) => o.group !== "league" && o.group !== "game");
|
|
17166
17272
|
const leagues = options.filter((o) => o.group === "league");
|
|
17167
17273
|
const games = options.filter((o) => o.group === "game");
|
|
17168
|
-
return /* @__PURE__ */
|
|
17169
|
-
top.map((o) => /* @__PURE__ */
|
|
17170
|
-
leagues.length > 0 ? /* @__PURE__ */
|
|
17171
|
-
games.length > 0 ? /* @__PURE__ */
|
|
17274
|
+
return /* @__PURE__ */ jsxs124(Fragment43, { children: [
|
|
17275
|
+
top.map((o) => /* @__PURE__ */ jsx140("option", { value: o.id, children: o.label }, o.id)),
|
|
17276
|
+
leagues.length > 0 ? /* @__PURE__ */ jsx140("optgroup", { label: ui.v8LeaguesGroup, children: leagues.map((o) => /* @__PURE__ */ jsx140("option", { value: o.id, children: o.label }, o.id)) }) : null,
|
|
17277
|
+
games.length > 0 ? /* @__PURE__ */ jsx140("optgroup", { label: ui.v8GamesGroup, children: games.map((o) => {
|
|
17172
17278
|
const at2 = kickoffText(ui, o.startsAtUtc);
|
|
17173
|
-
return /* @__PURE__ */
|
|
17279
|
+
return /* @__PURE__ */ jsx140("option", { value: o.id, children: at2 ? `${o.label} \xB7 ${at2}` : o.label }, o.id);
|
|
17174
17280
|
}) }) : null
|
|
17175
17281
|
] });
|
|
17176
17282
|
}
|
|
17177
17283
|
|
|
17178
17284
|
// src/components/BuilderPanel.tsx
|
|
17179
|
-
import { jsx as
|
|
17285
|
+
import { jsx as jsx141, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
17180
17286
|
function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
17181
17287
|
const ctx = usePersonalGreeting();
|
|
17182
17288
|
const scope = useSportScope();
|
|
17183
17289
|
const active = options.find((o) => o.sport === sport) ?? options[0];
|
|
17184
17290
|
if (!active) return null;
|
|
17185
|
-
return /* @__PURE__ */
|
|
17186
|
-
options.length > 1 ? /* @__PURE__ */
|
|
17291
|
+
return /* @__PURE__ */ jsxs125("div", { className: "ss-w-mon-list ss-w-builder-tab", children: [
|
|
17292
|
+
options.length > 1 ? /* @__PURE__ */ jsx141("div", { className: "ss-w-dash-sports", role: "group", "aria-label": ui.sportGroupLabel, children: options.map((o) => /* @__PURE__ */ jsx141(
|
|
17187
17293
|
"button",
|
|
17188
17294
|
{
|
|
17189
17295
|
type: "button",
|
|
@@ -17194,7 +17300,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
|
17194
17300
|
},
|
|
17195
17301
|
o.sport
|
|
17196
17302
|
)) }) : null,
|
|
17197
|
-
/* @__PURE__ */
|
|
17303
|
+
/* @__PURE__ */ jsx141("div", { className: "ss-w-v8", children: /* @__PURE__ */ jsx141(
|
|
17198
17304
|
SentenceBuilder,
|
|
17199
17305
|
{
|
|
17200
17306
|
preset: active.preset,
|
|
@@ -17213,7 +17319,7 @@ function BuilderPanel({ options, sport, onSportChange, ui, slip, onCoolOff }) {
|
|
|
17213
17319
|
}
|
|
17214
17320
|
|
|
17215
17321
|
// src/components/Fixtures.tsx
|
|
17216
|
-
import { jsx as
|
|
17322
|
+
import { jsx as jsx142, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
17217
17323
|
function groupByRound(fixtures) {
|
|
17218
17324
|
const groups = [];
|
|
17219
17325
|
for (const fx of fixtures) {
|
|
@@ -17225,31 +17331,31 @@ function groupByRound(fixtures) {
|
|
|
17225
17331
|
}
|
|
17226
17332
|
function Fixtures({ fixtures, loading, ui }) {
|
|
17227
17333
|
if (fixtures.length === 0) {
|
|
17228
|
-
if (loading) return /* @__PURE__ */
|
|
17229
|
-
return /* @__PURE__ */
|
|
17334
|
+
if (loading) return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-list" });
|
|
17335
|
+
return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-empty", children: ui.clubFixturesEmpty });
|
|
17230
17336
|
}
|
|
17231
|
-
return /* @__PURE__ */
|
|
17232
|
-
group.round && /* @__PURE__ */
|
|
17337
|
+
return /* @__PURE__ */ jsx142("div", { className: "ss-w-mon-list", children: groupByRound(fixtures).map((group, gi) => /* @__PURE__ */ jsxs126("div", { children: [
|
|
17338
|
+
group.round && /* @__PURE__ */ jsx142("div", { className: "ss-w-club-eyebrow", children: group.round }),
|
|
17233
17339
|
group.items.map((fx) => {
|
|
17234
17340
|
const played = fx.homeScore !== null && fx.awayScore !== null;
|
|
17235
17341
|
const kickoff = fx.matchDateTime ? ui.bettingKickoff(fx.matchDateTime) : null;
|
|
17236
|
-
return /* @__PURE__ */
|
|
17237
|
-
/* @__PURE__ */
|
|
17238
|
-
fx.competitionName && /* @__PURE__ */
|
|
17239
|
-
!played && kickoff && /* @__PURE__ */
|
|
17342
|
+
return /* @__PURE__ */ jsxs126("div", { className: "ss-w-mon", children: [
|
|
17343
|
+
/* @__PURE__ */ jsxs126("div", { className: "ss-w-mon-top", children: [
|
|
17344
|
+
fx.competitionName && /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-comp", children: fx.competitionName }),
|
|
17345
|
+
!played && kickoff && /* @__PURE__ */ jsxs126("span", { className: "ss-w-mon-pill", children: [
|
|
17240
17346
|
kickoff.dayLabel,
|
|
17241
17347
|
" \xB7 ",
|
|
17242
17348
|
kickoff.time
|
|
17243
17349
|
] })
|
|
17244
17350
|
] }),
|
|
17245
|
-
/* @__PURE__ */
|
|
17246
|
-
/* @__PURE__ */
|
|
17247
|
-
played ? /* @__PURE__ */
|
|
17351
|
+
/* @__PURE__ */ jsxs126("div", { className: "ss-w-mon-main", children: [
|
|
17352
|
+
/* @__PURE__ */ jsx142("span", { className: "ss-w-mon-side", children: /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-name", children: fx.homeTeamName }) }),
|
|
17353
|
+
played ? /* @__PURE__ */ jsxs126("span", { className: "ss-w-mon-score", children: [
|
|
17248
17354
|
fx.homeScore,
|
|
17249
|
-
/* @__PURE__ */
|
|
17355
|
+
/* @__PURE__ */ jsx142("i", { children: "-" }),
|
|
17250
17356
|
fx.awayScore
|
|
17251
|
-
] }) : /* @__PURE__ */
|
|
17252
|
-
/* @__PURE__ */
|
|
17357
|
+
] }) : /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-vs", children: ui.venue.home }),
|
|
17358
|
+
/* @__PURE__ */ jsx142("span", { className: "ss-w-mon-side ss-w-mon-side--away", children: /* @__PURE__ */ jsx142("span", { className: "ss-w-mon-name", children: fx.awayTeamName }) })
|
|
17253
17359
|
] })
|
|
17254
17360
|
] }, fx.id);
|
|
17255
17361
|
})
|
|
@@ -17257,7 +17363,7 @@ function Fixtures({ fixtures, loading, ui }) {
|
|
|
17257
17363
|
}
|
|
17258
17364
|
|
|
17259
17365
|
// src/components/Standings.tsx
|
|
17260
|
-
import { jsx as
|
|
17366
|
+
import { jsx as jsx143, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
17261
17367
|
function groupByTable(rows) {
|
|
17262
17368
|
const groups = [];
|
|
17263
17369
|
for (const row of rows) {
|
|
@@ -17268,30 +17374,30 @@ function groupByTable(rows) {
|
|
|
17268
17374
|
return groups;
|
|
17269
17375
|
}
|
|
17270
17376
|
function Standings({ standings, loading, ui }) {
|
|
17271
|
-
if (standings === null && loading) return /* @__PURE__ */
|
|
17272
|
-
if (standings === null || standings.length === 0) return /* @__PURE__ */
|
|
17273
|
-
return /* @__PURE__ */
|
|
17274
|
-
group.table && /* @__PURE__ */
|
|
17275
|
-
/* @__PURE__ */
|
|
17276
|
-
/* @__PURE__ */
|
|
17277
|
-
/* @__PURE__ */
|
|
17278
|
-
/* @__PURE__ */
|
|
17279
|
-
/* @__PURE__ */
|
|
17280
|
-
/* @__PURE__ */
|
|
17281
|
-
/* @__PURE__ */
|
|
17282
|
-
/* @__PURE__ */
|
|
17283
|
-
/* @__PURE__ */
|
|
17284
|
-
/* @__PURE__ */
|
|
17377
|
+
if (standings === null && loading) return /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-list" });
|
|
17378
|
+
if (standings === null || standings.length === 0) return /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-empty", children: ui.clubStandingsEmpty });
|
|
17379
|
+
return /* @__PURE__ */ jsx143("div", { className: "ss-w-mon-list", children: groupByTable(standings).map((group, gi) => /* @__PURE__ */ jsxs127("div", { className: "ss-w-table-wrap", children: [
|
|
17380
|
+
group.table && /* @__PURE__ */ jsx143("div", { className: "ss-w-club-eyebrow", children: group.table }),
|
|
17381
|
+
/* @__PURE__ */ jsxs127("table", { className: "ss-w-md-table", children: [
|
|
17382
|
+
/* @__PURE__ */ jsx143("thead", { children: /* @__PURE__ */ jsxs127("tr", { children: [
|
|
17383
|
+
/* @__PURE__ */ jsx143("th", { children: "#" }),
|
|
17384
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColClub }),
|
|
17385
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColPlayed }),
|
|
17386
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColWon }),
|
|
17387
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColDrawn }),
|
|
17388
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColLost }),
|
|
17389
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColGoalDiff }),
|
|
17390
|
+
/* @__PURE__ */ jsx143("th", { children: ui.standingsColPoints })
|
|
17285
17391
|
] }) }),
|
|
17286
|
-
/* @__PURE__ */
|
|
17287
|
-
/* @__PURE__ */
|
|
17288
|
-
/* @__PURE__ */
|
|
17289
|
-
/* @__PURE__ */
|
|
17290
|
-
/* @__PURE__ */
|
|
17291
|
-
/* @__PURE__ */
|
|
17292
|
-
/* @__PURE__ */
|
|
17293
|
-
/* @__PURE__ */
|
|
17294
|
-
/* @__PURE__ */
|
|
17392
|
+
/* @__PURE__ */ jsx143("tbody", { children: group.items.map((row) => /* @__PURE__ */ jsxs127("tr", { children: [
|
|
17393
|
+
/* @__PURE__ */ jsx143("td", { children: row.position }),
|
|
17394
|
+
/* @__PURE__ */ jsx143("td", { children: row.teamName }),
|
|
17395
|
+
/* @__PURE__ */ jsx143("td", { children: row.playedGames }),
|
|
17396
|
+
/* @__PURE__ */ jsx143("td", { children: row.wins }),
|
|
17397
|
+
/* @__PURE__ */ jsx143("td", { children: row.draws }),
|
|
17398
|
+
/* @__PURE__ */ jsx143("td", { children: row.losses }),
|
|
17399
|
+
/* @__PURE__ */ jsx143("td", { children: row.goalDifference }),
|
|
17400
|
+
/* @__PURE__ */ jsx143("td", { children: row.points })
|
|
17295
17401
|
] }, row.teamId)) })
|
|
17296
17402
|
] })
|
|
17297
17403
|
] }, `${gi}-${group.table ?? "none"}`)) });
|
|
@@ -17348,7 +17454,7 @@ function statsEyebrow(ui, season, competition, matches) {
|
|
|
17348
17454
|
}
|
|
17349
17455
|
|
|
17350
17456
|
// src/components/SquadStats.tsx
|
|
17351
|
-
import { jsx as
|
|
17457
|
+
import { jsx as jsx144, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
17352
17458
|
function leader(stats, pick) {
|
|
17353
17459
|
let best = null;
|
|
17354
17460
|
for (const p of stats) {
|
|
@@ -17362,53 +17468,53 @@ function ratingClass(rating) {
|
|
|
17362
17468
|
return Number(rating.toFixed(1)) >= 7 ? "ss-w-sq-c36 ss-w-sq-rtg ss-w-pos-ink" : "ss-w-sq-c36 ss-w-sq-rtg";
|
|
17363
17469
|
}
|
|
17364
17470
|
function SquadStats({ stats, loading, ui, onSelectPlayer }) {
|
|
17365
|
-
if (stats === null && loading) return /* @__PURE__ */
|
|
17366
|
-
if (stats === null || stats.length === 0) return /* @__PURE__ */
|
|
17471
|
+
if (stats === null && loading) return /* @__PURE__ */ jsx144("div", { className: "ss-w-mon-list" });
|
|
17472
|
+
if (stats === null || stats.length === 0) return /* @__PURE__ */ jsx144("div", { className: "ss-w-mon-empty", children: ui.clubSquadStatsEmpty });
|
|
17367
17473
|
const scorer = leader(stats, (p) => p.goals);
|
|
17368
17474
|
const assister = leader(stats, (p) => p.assists);
|
|
17369
17475
|
const footer = [
|
|
17370
17476
|
scorer && ui.squadTopScorer(scorer.playerName, scorer.goals),
|
|
17371
17477
|
assister && ui.squadTopAssists(assister.playerName, assister.assists)
|
|
17372
17478
|
].filter((part) => !!part).join(" \xB7 ");
|
|
17373
|
-
return /* @__PURE__ */
|
|
17374
|
-
/* @__PURE__ */
|
|
17375
|
-
/* @__PURE__ */
|
|
17376
|
-
/* @__PURE__ */
|
|
17377
|
-
/* @__PURE__ */
|
|
17378
|
-
/* @__PURE__ */
|
|
17379
|
-
/* @__PURE__ */
|
|
17380
|
-
/* @__PURE__ */
|
|
17381
|
-
/* @__PURE__ */
|
|
17382
|
-
/* @__PURE__ */
|
|
17383
|
-
/* @__PURE__ */
|
|
17384
|
-
/* @__PURE__ */
|
|
17479
|
+
return /* @__PURE__ */ jsxs128("div", { className: "ss-w-mon-list ss-w-sq-stats", children: [
|
|
17480
|
+
/* @__PURE__ */ jsxs128("div", { className: "ss-w-sq-card", children: [
|
|
17481
|
+
/* @__PURE__ */ jsxs128("div", { className: "ss-w-sq-row ss-w-sq-head", "aria-hidden": "true", children: [
|
|
17482
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-name" }),
|
|
17483
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-pos", children: ui.statHeadPos }),
|
|
17484
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c30", children: ui.statColApps }),
|
|
17485
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c36", children: ui.statHeadMins }),
|
|
17486
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: ui.statHeadGoals }),
|
|
17487
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: ui.statHeadAssists }),
|
|
17488
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadYellow }),
|
|
17489
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: ui.statHeadRed }),
|
|
17490
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c36", children: ui.statHeadRating })
|
|
17385
17491
|
] }),
|
|
17386
|
-
stats.map((p) => /* @__PURE__ */
|
|
17387
|
-
/* @__PURE__ */
|
|
17388
|
-
p.jerseyNumber !== null && /* @__PURE__ */
|
|
17389
|
-
/* @__PURE__ */
|
|
17492
|
+
stats.map((p) => /* @__PURE__ */ jsxs128("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
|
|
17493
|
+
/* @__PURE__ */ jsxs128("span", { className: "ss-w-sq-player", children: [
|
|
17494
|
+
p.jerseyNumber !== null && /* @__PURE__ */ jsx144("span", { className: "ss-w-sq-badge", children: p.jerseyNumber }),
|
|
17495
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-name ss-w-sq-name-1", children: p.playerName })
|
|
17390
17496
|
] }),
|
|
17391
|
-
/* @__PURE__ */
|
|
17392
|
-
/* @__PURE__ */
|
|
17393
|
-
/* @__PURE__ */
|
|
17394
|
-
/* @__PURE__ */
|
|
17395
|
-
/* @__PURE__ */
|
|
17396
|
-
/* @__PURE__ */
|
|
17397
|
-
/* @__PURE__ */
|
|
17398
|
-
/* @__PURE__ */
|
|
17497
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-pos", children: positionShort(ui, p.positionCode, p.positionName) }),
|
|
17498
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c30", children: p.appearances }),
|
|
17499
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c36", children: p.minutesPlayed }),
|
|
17500
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: p.goals }),
|
|
17501
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20", children: p.assists }),
|
|
17502
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.yellowCards }),
|
|
17503
|
+
/* @__PURE__ */ jsx144("span", { className: "ss-w-sq-c20 ss-w-sq-yr", children: p.redCards }),
|
|
17504
|
+
/* @__PURE__ */ jsx144("span", { className: ratingClass(p.averageRating), children: p.averageRating === null ? "\u2013" : formatFixed(p.averageRating, ui.locale, 1) })
|
|
17399
17505
|
] }, p.playerId))
|
|
17400
17506
|
] }),
|
|
17401
|
-
footer !== "" && /* @__PURE__ */
|
|
17507
|
+
footer !== "" && /* @__PURE__ */ jsx144("div", { className: "ss-w-sq-foot", children: footer })
|
|
17402
17508
|
] });
|
|
17403
17509
|
}
|
|
17404
17510
|
|
|
17405
17511
|
// src/components/Squad.tsx
|
|
17406
|
-
import { Fragment as Fragment44, jsx as
|
|
17512
|
+
import { Fragment as Fragment44, jsx as jsx145, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
17407
17513
|
function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, seasonName = null, competitionName = null, matchesPlayed = null, onSelectPlayer }) {
|
|
17408
17514
|
const eyebrow = view === "stats" ? statsEyebrow(ui, seasonName, competitionName, matchesPlayed) : null;
|
|
17409
|
-
const toggle = /* @__PURE__ */
|
|
17410
|
-
eyebrow !== null && /* @__PURE__ */
|
|
17411
|
-
/* @__PURE__ */
|
|
17515
|
+
const toggle = /* @__PURE__ */ jsxs129("div", { className: "ss-w-sq-bar", children: [
|
|
17516
|
+
eyebrow !== null && /* @__PURE__ */ jsx145("div", { className: "ss-w-sq-eyebrow", children: eyebrow }),
|
|
17517
|
+
/* @__PURE__ */ jsx145("div", { className: "ss-w-sq-seg", role: "group", children: ["roster", "stats"].map((v) => /* @__PURE__ */ jsx145(
|
|
17412
17518
|
"button",
|
|
17413
17519
|
{
|
|
17414
17520
|
type: "button",
|
|
@@ -17423,45 +17529,45 @@ function Squad({ squad, loading, ui, view, onToggleView, stats, statsLoading, se
|
|
|
17423
17529
|
)) })
|
|
17424
17530
|
] });
|
|
17425
17531
|
if (view === "stats") {
|
|
17426
|
-
return /* @__PURE__ */
|
|
17532
|
+
return /* @__PURE__ */ jsxs129(Fragment44, { children: [
|
|
17427
17533
|
toggle,
|
|
17428
|
-
/* @__PURE__ */
|
|
17534
|
+
/* @__PURE__ */ jsx145(SquadStats, { stats, loading: statsLoading, ui, onSelectPlayer })
|
|
17429
17535
|
] });
|
|
17430
17536
|
}
|
|
17431
|
-
if (squad === null && loading) return /* @__PURE__ */
|
|
17537
|
+
if (squad === null && loading) return /* @__PURE__ */ jsxs129(Fragment44, { children: [
|
|
17432
17538
|
toggle,
|
|
17433
|
-
/* @__PURE__ */
|
|
17539
|
+
/* @__PURE__ */ jsx145("div", { className: "ss-w-mon-list" })
|
|
17434
17540
|
] });
|
|
17435
|
-
if (squad === null || squad.length === 0) return /* @__PURE__ */
|
|
17541
|
+
if (squad === null || squad.length === 0) return /* @__PURE__ */ jsxs129(Fragment44, { children: [
|
|
17436
17542
|
toggle,
|
|
17437
|
-
/* @__PURE__ */
|
|
17543
|
+
/* @__PURE__ */ jsx145("div", { className: "ss-w-mon-empty", children: ui.clubSquadEmpty })
|
|
17438
17544
|
] });
|
|
17439
|
-
return /* @__PURE__ */
|
|
17545
|
+
return /* @__PURE__ */ jsxs129(Fragment44, { children: [
|
|
17440
17546
|
toggle,
|
|
17441
|
-
/* @__PURE__ */
|
|
17442
|
-
group.positionName && /* @__PURE__ */
|
|
17443
|
-
group.items.map((p) => /* @__PURE__ */
|
|
17444
|
-
/* @__PURE__ */
|
|
17445
|
-
/* @__PURE__ */
|
|
17547
|
+
/* @__PURE__ */ jsx145("div", { className: "ss-w-mon-list", children: groupByPosition(squad).map((group, gi) => /* @__PURE__ */ jsxs129("div", { children: [
|
|
17548
|
+
group.positionName && /* @__PURE__ */ jsx145("div", { className: "ss-w-club-eyebrow", children: positionLabel(ui, group.positionName) }),
|
|
17549
|
+
group.items.map((p) => /* @__PURE__ */ jsxs129("button", { type: "button", className: "ss-w-sq-row ss-w-sq-tap", onClick: () => onSelectPlayer(p.playerId), children: [
|
|
17550
|
+
/* @__PURE__ */ jsx145("span", { className: "ss-w-sq-num", children: p.jerseyNumber ?? "" }),
|
|
17551
|
+
/* @__PURE__ */ jsx145("span", { className: "ss-w-sq-name", children: p.playerName })
|
|
17446
17552
|
] }, p.playerId))
|
|
17447
17553
|
] }, `${gi}-${group.positionName ?? "none"}`)) })
|
|
17448
17554
|
] });
|
|
17449
17555
|
}
|
|
17450
17556
|
|
|
17451
17557
|
// src/components/PlayerPhoto.tsx
|
|
17452
|
-
import { useState as
|
|
17453
|
-
import { jsx as
|
|
17558
|
+
import { useState as useState78 } from "react";
|
|
17559
|
+
import { jsx as jsx146 } from "react/jsx-runtime";
|
|
17454
17560
|
function PlayerPhoto({ photoUrl, jerseyNumber, size }) {
|
|
17455
|
-
const [failed, setFailed] =
|
|
17561
|
+
const [failed, setFailed] = useState78(false);
|
|
17456
17562
|
const box = { width: size, height: size };
|
|
17457
17563
|
if (photoUrl && !failed) {
|
|
17458
|
-
return /* @__PURE__ */
|
|
17564
|
+
return /* @__PURE__ */ jsx146("img", { className: "ss-w-pd-photo", style: box, src: photoUrl, alt: "", "aria-hidden": "true", onError: () => setFailed(true) });
|
|
17459
17565
|
}
|
|
17460
|
-
return /* @__PURE__ */
|
|
17566
|
+
return /* @__PURE__ */ jsx146("span", { className: "ss-w-pd-photo ss-w-pd-avatar", style: { ...box, fontSize: Math.round(size * 0.35) }, "aria-hidden": "true", children: jerseyNumber ?? "" });
|
|
17461
17567
|
}
|
|
17462
17568
|
|
|
17463
17569
|
// src/components/MiniPitch.tsx
|
|
17464
|
-
import { jsx as
|
|
17570
|
+
import { jsx as jsx147 } from "react/jsx-runtime";
|
|
17465
17571
|
var SPOT = {
|
|
17466
17572
|
GK: [50, 90],
|
|
17467
17573
|
CB: [50, 75],
|
|
@@ -17483,12 +17589,12 @@ var SPOT = {
|
|
|
17483
17589
|
function MiniPitch({ positionCode }) {
|
|
17484
17590
|
const spot = SPOT[positionCode?.trim().toUpperCase() ?? ""];
|
|
17485
17591
|
if (spot === void 0) return null;
|
|
17486
|
-
return /* @__PURE__ */
|
|
17592
|
+
return /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-pitch", "aria-hidden": "true", children: /* @__PURE__ */ jsx147("div", { className: "ss-w-pd-pitch-dot", style: { left: `${spot[0]}%`, top: `${spot[1]}%` } }) });
|
|
17487
17593
|
}
|
|
17488
17594
|
|
|
17489
17595
|
// src/components/PerformanceBars.tsx
|
|
17490
|
-
import { useState as
|
|
17491
|
-
import { jsx as
|
|
17596
|
+
import { useState as useState79 } from "react";
|
|
17597
|
+
import { jsx as jsx148, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
17492
17598
|
var GROUPS = ["shooting", "passing", "possession", "defending"];
|
|
17493
17599
|
function finite4(v) {
|
|
17494
17600
|
return typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
@@ -17533,40 +17639,40 @@ function unrankedLine(ui, reason) {
|
|
|
17533
17639
|
}
|
|
17534
17640
|
}
|
|
17535
17641
|
function PerformanceBars({ performance, competitionName, strings }) {
|
|
17536
|
-
const [mode, setMode] =
|
|
17642
|
+
const [mode, setMode] = useState79("total");
|
|
17537
17643
|
const labelled = performance.metrics.filter((m) => Object.prototype.hasOwnProperty.call(strings.perfMetric, m.key));
|
|
17538
17644
|
if (!labelled.some((m) => valueOf(m, "total") !== null || valueOf(m, "per90") !== null)) return null;
|
|
17539
17645
|
const subtitle = !performance.ranked ? unrankedLine(strings, performance.unrankedReason) : competitionName ? strings.perfRankedAgainst(competitionName, performance.positionGroup) : null;
|
|
17540
17646
|
const cards = GROUPS.map((g) => {
|
|
17541
17647
|
const rows = labelled.filter((m) => m.group === g && valueOf(m, mode) !== null);
|
|
17542
17648
|
if (rows.length === 0) return null;
|
|
17543
|
-
return /* @__PURE__ */
|
|
17544
|
-
/* @__PURE__ */
|
|
17649
|
+
return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-card ss-w-pd-perf-card", children: [
|
|
17650
|
+
/* @__PURE__ */ jsx148("div", { className: "ss-w-pd-perf-group", children: groupTitle(strings, g) }),
|
|
17545
17651
|
rows.map((m) => {
|
|
17546
17652
|
const v = valueOf(m, mode);
|
|
17547
17653
|
const rank2 = performance.ranked ? rankOf(m, mode) : null;
|
|
17548
|
-
return /* @__PURE__ */
|
|
17549
|
-
/* @__PURE__ */
|
|
17550
|
-
/* @__PURE__ */
|
|
17551
|
-
/* @__PURE__ */
|
|
17654
|
+
return /* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-bar-row", children: [
|
|
17655
|
+
/* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-bar-top", children: [
|
|
17656
|
+
/* @__PURE__ */ jsx148("span", { className: "ss-w-pd-bar-label", children: strings.perfMetric[m.key] }),
|
|
17657
|
+
/* @__PURE__ */ jsx148("span", { className: "ss-w-pd-bar-value", children: format(m, v, mode, strings.locale) })
|
|
17552
17658
|
] }),
|
|
17553
|
-
rank2 !== null && /* @__PURE__ */
|
|
17659
|
+
rank2 !== null && /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-track", children: /* @__PURE__ */ jsx148("div", { className: `ss-w-pd-fill ss-w-pd-fill--${band(rank2)}`, style: { width: `${rank2}%` } }) })
|
|
17554
17660
|
] }, m.key);
|
|
17555
17661
|
})
|
|
17556
17662
|
] }, g);
|
|
17557
17663
|
});
|
|
17558
|
-
return /* @__PURE__ */
|
|
17559
|
-
/* @__PURE__ */
|
|
17560
|
-
/* @__PURE__ */
|
|
17561
|
-
/* @__PURE__ */
|
|
17664
|
+
return /* @__PURE__ */ jsxs130("div", { children: [
|
|
17665
|
+
/* @__PURE__ */ jsxs130("div", { className: "ss-w-pd-perf-head", children: [
|
|
17666
|
+
/* @__PURE__ */ jsx148("div", { className: "ss-w-pd-eyebrow", children: strings.perfTitle }),
|
|
17667
|
+
/* @__PURE__ */ jsx148("div", { className: "ss-w-pd-seg", role: "group", children: ["total", "per90"].map((m) => /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-pd-seg-btn", "aria-pressed": mode === m, onClick: () => setMode(m), children: m === "total" ? strings.perfTotal : strings.perfPer90 }, m)) })
|
|
17562
17668
|
] }),
|
|
17563
|
-
subtitle !== null && /* @__PURE__ */
|
|
17564
|
-
/* @__PURE__ */
|
|
17669
|
+
subtitle !== null && /* @__PURE__ */ jsx148("div", { className: "ss-w-pd-perf-sub", children: subtitle }),
|
|
17670
|
+
/* @__PURE__ */ jsx148("div", { className: "ss-w-pd-perf-cards", children: cards })
|
|
17565
17671
|
] });
|
|
17566
17672
|
}
|
|
17567
17673
|
|
|
17568
17674
|
// src/components/PlayerDetail.tsx
|
|
17569
|
-
import { Fragment as Fragment45, jsx as
|
|
17675
|
+
import { Fragment as Fragment45, jsx as jsx149, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
17570
17676
|
var DASH = "\u2014";
|
|
17571
17677
|
function ageFrom(dobMs) {
|
|
17572
17678
|
if (dobMs === null) return DASH;
|
|
@@ -17586,16 +17692,16 @@ function ratingTone(rounded) {
|
|
|
17586
17692
|
return "neg";
|
|
17587
17693
|
}
|
|
17588
17694
|
function Bio({ label, value }) {
|
|
17589
|
-
return /* @__PURE__ */
|
|
17590
|
-
/* @__PURE__ */
|
|
17695
|
+
return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-bio-item", children: [
|
|
17696
|
+
/* @__PURE__ */ jsx149("span", { className: "ss-w-pd-faint", children: label }),
|
|
17591
17697
|
" ",
|
|
17592
|
-
/* @__PURE__ */
|
|
17698
|
+
/* @__PURE__ */ jsx149("span", { children: value })
|
|
17593
17699
|
] });
|
|
17594
17700
|
}
|
|
17595
17701
|
function Tile({ label, value, pos }) {
|
|
17596
|
-
return /* @__PURE__ */
|
|
17597
|
-
/* @__PURE__ */
|
|
17598
|
-
/* @__PURE__ */
|
|
17702
|
+
return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-tile", children: [
|
|
17703
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-tile-label", children: label }),
|
|
17704
|
+
/* @__PURE__ */ jsx149("div", { className: pos ? "ss-w-pd-tile-value ss-w-pd-pos-ink" : "ss-w-pd-tile-value", children: value })
|
|
17599
17705
|
] });
|
|
17600
17706
|
}
|
|
17601
17707
|
function AvailabilityCard({ ui, next, availability }) {
|
|
@@ -17611,12 +17717,12 @@ function AvailabilityCard({ ui, next, availability }) {
|
|
|
17611
17717
|
pill = availability.status === "injured" ? { text: ui.availabilityInjured, tone: "neg" } : availability.status === "suspended" ? { text: ui.availabilitySuspended, tone: "warn" } : { text: ui.availabilityUnavailable, tone: "warn" };
|
|
17612
17718
|
}
|
|
17613
17719
|
}
|
|
17614
|
-
return /* @__PURE__ */
|
|
17615
|
-
/* @__PURE__ */
|
|
17616
|
-
next !== null && /* @__PURE__ */
|
|
17617
|
-
note !== null && /* @__PURE__ */
|
|
17720
|
+
return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-card ss-w-pd-avail", children: [
|
|
17721
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-avail-text", children: [
|
|
17722
|
+
next !== null && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-avail-next", children: ui.availabilityNext(next.opponentName, next.isHome, validMs(next.kickoffUnixMs)) }),
|
|
17723
|
+
note !== null && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-avail-note", children: note })
|
|
17618
17724
|
] }),
|
|
17619
|
-
pill !== null && /* @__PURE__ */
|
|
17725
|
+
pill !== null && /* @__PURE__ */ jsx149("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pill.tone}`, children: pill.text })
|
|
17620
17726
|
] });
|
|
17621
17727
|
}
|
|
17622
17728
|
function MatchRow({ ui, row }) {
|
|
@@ -17630,28 +17736,28 @@ function MatchRow({ ui, row }) {
|
|
|
17630
17736
|
const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
|
|
17631
17737
|
const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
|
|
17632
17738
|
const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
|
|
17633
|
-
return /* @__PURE__ */
|
|
17634
|
-
/* @__PURE__ */
|
|
17635
|
-
/* @__PURE__ */
|
|
17636
|
-
/* @__PURE__ */
|
|
17637
|
-
/* @__PURE__ */
|
|
17739
|
+
return /* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-match", children: [
|
|
17740
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-match-date", children: date === null ? "" : ui.logShortDate(date) }),
|
|
17741
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-match-main", children: [
|
|
17742
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
|
|
17743
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-match-sub", children: sub })
|
|
17638
17744
|
] }),
|
|
17639
|
-
/* @__PURE__ */
|
|
17640
|
-
rating === null ? /* @__PURE__ */
|
|
17745
|
+
/* @__PURE__ */ jsx149("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
|
|
17746
|
+
rating === null ? /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx149("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: formatFixed(rating, ui.locale, 1) })
|
|
17641
17747
|
] });
|
|
17642
17748
|
}
|
|
17643
17749
|
function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
17644
|
-
const back = /* @__PURE__ */
|
|
17645
|
-
/* @__PURE__ */
|
|
17750
|
+
const back = /* @__PURE__ */ jsxs131("button", { type: "button", className: "ss-w-pd-back", onClick: onClose, children: [
|
|
17751
|
+
/* @__PURE__ */ jsx149("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx149("path", { d: "M15 18l-6-6 6-6" }) }),
|
|
17646
17752
|
ui.clubPlayerBack
|
|
17647
17753
|
] });
|
|
17648
17754
|
if (detail === null) {
|
|
17649
|
-
return loading ? /* @__PURE__ */
|
|
17650
|
-
/* @__PURE__ */
|
|
17651
|
-
/* @__PURE__ */
|
|
17652
|
-
] }) : /* @__PURE__ */
|
|
17653
|
-
/* @__PURE__ */
|
|
17654
|
-
/* @__PURE__ */
|
|
17755
|
+
return loading ? /* @__PURE__ */ jsxs131(Fragment45, { children: [
|
|
17756
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-bar", children: back }),
|
|
17757
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-mon-list" })
|
|
17758
|
+
] }) : /* @__PURE__ */ jsxs131(Fragment45, { children: [
|
|
17759
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-bar", children: back }),
|
|
17760
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-mon-empty", children: ui.clubPlayerDetailEmpty })
|
|
17655
17761
|
] });
|
|
17656
17762
|
}
|
|
17657
17763
|
const s = detail.seasonStats;
|
|
@@ -17664,137 +17770,48 @@ function PlayerDetail({ detail, loading, ui, seasonName, onClose }) {
|
|
|
17664
17770
|
const next = detail.nextFixture ?? null;
|
|
17665
17771
|
const availability = detail.availability ?? null;
|
|
17666
17772
|
const log = detail.matchLog ?? [];
|
|
17667
|
-
return /* @__PURE__ */
|
|
17668
|
-
/* @__PURE__ */
|
|
17669
|
-
/* @__PURE__ */
|
|
17670
|
-
/* @__PURE__ */
|
|
17671
|
-
/* @__PURE__ */
|
|
17672
|
-
/* @__PURE__ */
|
|
17673
|
-
/* @__PURE__ */
|
|
17674
|
-
subLine !== "" && /* @__PURE__ */
|
|
17675
|
-
/* @__PURE__ */
|
|
17676
|
-
/* @__PURE__ */
|
|
17677
|
-
/* @__PURE__ */
|
|
17678
|
-
foot !== null && /* @__PURE__ */
|
|
17679
|
-
/* @__PURE__ */
|
|
17773
|
+
return /* @__PURE__ */ jsxs131(Fragment45, { children: [
|
|
17774
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-bar", children: back }),
|
|
17775
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-mon-list ss-w-pd-list", children: [
|
|
17776
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-card ss-w-pd-profile", children: [
|
|
17777
|
+
/* @__PURE__ */ jsx149(PlayerPhoto, { photoUrl: detail.photoUrl, jerseyNumber: detail.jerseyNumber, size: 52 }, detail.photoUrl ?? ""),
|
|
17778
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-profile-main", children: [
|
|
17779
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-name", children: detail.playerName }),
|
|
17780
|
+
subLine !== "" && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-sub", children: subLine }),
|
|
17781
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-bio", children: [
|
|
17782
|
+
/* @__PURE__ */ jsx149(Bio, { label: ui.detailAge, value: ageFrom(detail.dateOfBirthUnixMs) }),
|
|
17783
|
+
/* @__PURE__ */ jsx149(Bio, { label: ui.detailHeight, value: detail.heightCm === null ? DASH : `${detail.heightCm} cm` }),
|
|
17784
|
+
foot !== null && /* @__PURE__ */ jsx149(Bio, { label: ui.detailFoot, value: foot }),
|
|
17785
|
+
/* @__PURE__ */ jsx149(Bio, { label: ui.detailNatShort, value: detail.nationality ?? DASH })
|
|
17680
17786
|
] })
|
|
17681
17787
|
] }),
|
|
17682
|
-
/* @__PURE__ */
|
|
17788
|
+
/* @__PURE__ */ jsx149(MiniPitch, { positionCode: detail.positionCode })
|
|
17683
17789
|
] }),
|
|
17684
|
-
(next !== null || availability !== null) && /* @__PURE__ */
|
|
17685
|
-
/* @__PURE__ */
|
|
17686
|
-
eyebrow !== null && /* @__PURE__ */
|
|
17687
|
-
/* @__PURE__ */
|
|
17688
|
-
/* @__PURE__ */
|
|
17689
|
-
/* @__PURE__ */
|
|
17690
|
-
typeof s.starts === "number" && /* @__PURE__ */
|
|
17691
|
-
/* @__PURE__ */
|
|
17692
|
-
/* @__PURE__ */
|
|
17693
|
-
rating !== null && /* @__PURE__ */
|
|
17694
|
-
/* @__PURE__ */
|
|
17695
|
-
/* @__PURE__ */
|
|
17790
|
+
(next !== null || availability !== null) && /* @__PURE__ */ jsx149(AvailabilityCard, { ui, next, availability }),
|
|
17791
|
+
/* @__PURE__ */ jsxs131("div", { children: [
|
|
17792
|
+
eyebrow !== null && /* @__PURE__ */ jsx149("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: eyebrow }),
|
|
17793
|
+
/* @__PURE__ */ jsxs131("div", { className: "ss-w-pd-tiles", children: [
|
|
17794
|
+
/* @__PURE__ */ jsx149(Tile, { label: ui.statColGoals, value: String(s.goals) }),
|
|
17795
|
+
/* @__PURE__ */ jsx149(Tile, { label: ui.statColAssists, value: String(s.assists) }),
|
|
17796
|
+
typeof s.starts === "number" && /* @__PURE__ */ jsx149(Tile, { label: ui.detailStarted, value: String(s.starts) }),
|
|
17797
|
+
/* @__PURE__ */ jsx149(Tile, { label: ui.detailMatches, value: String(s.appearances) }),
|
|
17798
|
+
/* @__PURE__ */ jsx149(Tile, { label: ui.statColMinutes, value: String(s.minutesPlayed) }),
|
|
17799
|
+
rating !== null && /* @__PURE__ */ jsx149(Tile, { label: ui.statColRating, value: formatFixed(rating, ui.locale, 2), pos: Math.round(rating * 100) / 100 >= 7 }),
|
|
17800
|
+
/* @__PURE__ */ jsx149(Tile, { label: ui.detailYellows, value: String(s.yellowCards) }),
|
|
17801
|
+
/* @__PURE__ */ jsx149(Tile, { label: ui.detailReds, value: String(s.redCards) })
|
|
17696
17802
|
] })
|
|
17697
17803
|
] }),
|
|
17698
|
-
detail.performance != null && /* @__PURE__ */
|
|
17699
|
-
log.length > 0 && /* @__PURE__ */
|
|
17700
|
-
/* @__PURE__ */
|
|
17701
|
-
/* @__PURE__ */
|
|
17804
|
+
detail.performance != null && /* @__PURE__ */ jsx149(PerformanceBars, { performance: detail.performance, competitionName: competition, strings: ui }),
|
|
17805
|
+
log.length > 0 && /* @__PURE__ */ jsxs131("div", { children: [
|
|
17806
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-eyebrow ss-w-pd-eyebrow--block", children: ui.matchLogTitle }),
|
|
17807
|
+
/* @__PURE__ */ jsx149("div", { className: "ss-w-pd-card ss-w-pd-log", children: log.map((row) => /* @__PURE__ */ jsx149(MatchRow, { ui, row }, row.matchId)) })
|
|
17702
17808
|
] })
|
|
17703
17809
|
] })
|
|
17704
17810
|
] });
|
|
17705
17811
|
}
|
|
17706
17812
|
|
|
17707
|
-
// src/components/PresetTools.tsx
|
|
17708
|
-
import { useId as useId11, useState as useState79 } from "react";
|
|
17709
|
-
import { Fragment as Fragment46, jsx as jsx148, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
17710
|
-
function PresetToolModal({ title, closeLabel, onClose, children, footer, className }) {
|
|
17711
|
-
const { dialogRef, onKeyDown } = useModalDialog(onClose, { restoreFocus: false });
|
|
17712
|
-
const titleId = useId11();
|
|
17713
|
-
return /* @__PURE__ */ jsx148("div", { className: className ? `ss-w-tool-backdrop ${className}` : "ss-w-tool-backdrop", children: /* @__PURE__ */ jsxs131("div", { ref: dialogRef, className: "ss-w-tool", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, tabIndex: -1, onKeyDown, children: [
|
|
17714
|
-
/* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-head", children: [
|
|
17715
|
-
/* @__PURE__ */ jsx148("h2", { id: titleId, className: "ss-w-tool-title", children: title }),
|
|
17716
|
-
/* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx148(CloseIcon, {}) })
|
|
17717
|
-
] }),
|
|
17718
|
-
/* @__PURE__ */ jsx148("div", { className: "ss-w-tool-body", children }),
|
|
17719
|
-
footer ? /* @__PURE__ */ jsx148("div", { className: "ss-w-tool-foot", children: footer }) : null
|
|
17720
|
-
] }) });
|
|
17721
|
-
}
|
|
17722
|
-
function SendButton({ label, display, disabled, onClick }) {
|
|
17723
|
-
return /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-send", "aria-label": `${label}: ${display}`, disabled, onClick, children: label });
|
|
17724
|
-
}
|
|
17725
|
-
function PickList({ picks, formatKickoff }) {
|
|
17726
|
-
const { oddsFormat } = useOddsSettings();
|
|
17727
|
-
return /* @__PURE__ */ jsx148("ul", { className: "ss-w-tool-picks", role: "list", children: picks.map((p) => /* @__PURE__ */ jsxs131("li", { className: "ss-w-tool-pick", children: [
|
|
17728
|
-
/* @__PURE__ */ jsxs131("span", { className: "ss-w-tool-pick-match", children: [
|
|
17729
|
-
p.homeTeamName,
|
|
17730
|
-
" \u2013 ",
|
|
17731
|
-
p.awayTeamName
|
|
17732
|
-
] }),
|
|
17733
|
-
/* @__PURE__ */ jsxs131("span", { className: "ss-w-tool-pick-sel", children: [
|
|
17734
|
-
p.marketLabel,
|
|
17735
|
-
": ",
|
|
17736
|
-
p.selectionLabel,
|
|
17737
|
-
p.line ? ` ${p.line}` : ""
|
|
17738
|
-
] }),
|
|
17739
|
-
/* @__PURE__ */ jsx148("span", { className: "ss-w-tool-pick-kick", children: formatKickoff(p.kickoffUtc) }),
|
|
17740
|
-
/* @__PURE__ */ jsx148("span", { className: "ss-w-tool-pick-price", children: formatOdds(p.priceFormats, oddsFormat) })
|
|
17741
|
-
] }, p.matchOddsId)) });
|
|
17742
|
-
}
|
|
17743
|
-
function ComboPreview({ cell: cell2, formatKickoff }) {
|
|
17744
|
-
const { oddsFormat } = useOddsSettings();
|
|
17745
|
-
return /* @__PURE__ */ jsxs131(Fragment46, { children: [
|
|
17746
|
-
/* @__PURE__ */ jsx148(PickList, { picks: cell2.combo.legs, formatKickoff }),
|
|
17747
|
-
/* @__PURE__ */ jsx148("div", { className: "ss-w-tool-math", children: oddsFormat === "decimal" ? cell2.combo.multiplication : formatOdds(cell2.combo.totalFormats, oddsFormat) })
|
|
17748
|
-
] });
|
|
17749
|
-
}
|
|
17750
|
-
function Unavailable({ text: text2 }) {
|
|
17751
|
-
return /* @__PURE__ */ jsx148("p", { className: "ss-w-tool-unavailable", children: text2 });
|
|
17752
|
-
}
|
|
17753
|
-
var textOf = (options, value, format2) => {
|
|
17754
|
-
const o = options.find((x) => samePrice(x.value, value));
|
|
17755
|
-
return o ? formatOdds(o.formats, format2) : "";
|
|
17756
|
-
};
|
|
17757
|
-
function BuildComboTool({ grid, strings, streaming, formatKickoff, initialTotal, initialLegs, onSend, onClose }) {
|
|
17758
|
-
const { oddsFormat } = useOddsSettings();
|
|
17759
|
-
const totalOptions = comboTotals(grid);
|
|
17760
|
-
const totals = totalOptions.map((o) => o.value);
|
|
17761
|
-
const legChoices = comboLegChoices(grid);
|
|
17762
|
-
const [total, setTotal] = useState79(() => nearest(totals, initialTotal));
|
|
17763
|
-
const [legs, setLegs] = useState79(() => legsForTotal(grid, nearest(totals, initialTotal), clampLegs(legChoices, initialLegs)));
|
|
17764
|
-
const [announcement, setAnnouncement] = useState79("");
|
|
17765
|
-
const cell2 = findCombo(grid, total, legs);
|
|
17766
|
-
const minLegs = legChoices[0] ?? legs;
|
|
17767
|
-
const maxLegs = legChoices[legChoices.length - 1] ?? legs;
|
|
17768
|
-
const display = strings.comboDisplay(legs, textOf(totalOptions, total, oddsFormat));
|
|
17769
|
-
const choose = (nextTotal, nextLegs) => {
|
|
17770
|
-
setTotal(nextTotal);
|
|
17771
|
-
setLegs(nextLegs);
|
|
17772
|
-
const d = strings.comboDisplay(nextLegs, textOf(totalOptions, nextTotal, oddsFormat));
|
|
17773
|
-
setAnnouncement(findCombo(grid, nextTotal, nextLegs) ? d : `${d}. ${strings.unavailable}`);
|
|
17774
|
-
};
|
|
17775
|
-
const footer = /* @__PURE__ */ jsx148(SendButton, { label: strings.send, display, disabled: !cell2 || streaming, onClick: () => {
|
|
17776
|
-
if (cell2) onSend(comboAsk(cell2, strings, oddsFormat));
|
|
17777
|
-
} });
|
|
17778
|
-
return /* @__PURE__ */ jsxs131(PresetToolModal, { title: strings.buildCombo, closeLabel: strings.close, onClose, footer, children: [
|
|
17779
|
-
/* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.totalLabel, children: [
|
|
17780
|
-
/* @__PURE__ */ jsx148("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.totalLabel }),
|
|
17781
|
-
/* @__PURE__ */ jsx148("div", { className: "ss-w-tool-chips", children: totalOptions.map((o) => /* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-chip", "aria-pressed": samePrice(o.value, total), onClick: () => choose(o.value, samePrice(o.value, total) ? legs : legsForTotal(grid, o.value, legs)), children: formatOdds(o.formats, oddsFormat) }, o.key)) })
|
|
17782
|
-
] }),
|
|
17783
|
-
/* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-section", role: "group", "aria-label": strings.matchesLabel, children: [
|
|
17784
|
-
/* @__PURE__ */ jsx148("span", { className: "ss-w-tool-label", "aria-hidden": "true", children: strings.matchesLabel }),
|
|
17785
|
-
/* @__PURE__ */ jsxs131("div", { className: "ss-w-tool-stepper", children: [
|
|
17786
|
-
/* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.fewerMatches, disabled: legs <= minLegs, onClick: () => choose(total, legs - 1), children: "\u2212" }),
|
|
17787
|
-
/* @__PURE__ */ jsx148("span", { className: "ss-w-tool-count", children: legs }),
|
|
17788
|
-
/* @__PURE__ */ jsx148("button", { type: "button", className: "ss-w-tool-step", "aria-label": strings.moreMatches, disabled: legs >= maxLegs, onClick: () => choose(total, legs + 1), children: "+" })
|
|
17789
|
-
] })
|
|
17790
|
-
] }),
|
|
17791
|
-
cell2 ? /* @__PURE__ */ jsx148(ComboPreview, { cell: cell2, formatKickoff }) : /* @__PURE__ */ jsx148(Unavailable, { text: strings.unavailable }),
|
|
17792
|
-
/* @__PURE__ */ jsx148("p", { className: "ss-w-vh", "aria-live": "polite", children: announcement })
|
|
17793
|
-
] });
|
|
17794
|
-
}
|
|
17795
|
-
|
|
17796
17813
|
// src/components/SettingsSheet.tsx
|
|
17797
|
-
import { jsx as
|
|
17814
|
+
import { jsx as jsx150, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
17798
17815
|
var SAMPLE = { decimal: "2.50", american: "+150", fractional: "3/2" };
|
|
17799
17816
|
var ODDS = ["decimal", "fractional", "american"];
|
|
17800
17817
|
var THEMES2 = ["light", "dark", "auto"];
|
|
@@ -17808,19 +17825,19 @@ function SettingsSheet({ ui, onClose }) {
|
|
|
17808
17825
|
closeLabel: t.close,
|
|
17809
17826
|
onClose,
|
|
17810
17827
|
className: "ss-w-set-backdrop-in",
|
|
17811
|
-
footer: /* @__PURE__ */
|
|
17828
|
+
footer: /* @__PURE__ */ jsx150("p", { className: "ss-w-set-foot", children: t.foot }),
|
|
17812
17829
|
children: [
|
|
17813
17830
|
s.oddsOffered && /* @__PURE__ */ jsxs132("div", { className: "ss-w-set-row", children: [
|
|
17814
|
-
/* @__PURE__ */
|
|
17831
|
+
/* @__PURE__ */ jsx150("div", { className: "ss-w-tool-label", id: "ss-w-set-odds", children: t.oddsLabel }),
|
|
17815
17832
|
/* @__PURE__ */ jsxs132("div", { className: "ss-w-set-sample", children: [
|
|
17816
|
-
/* @__PURE__ */
|
|
17817
|
-
/* @__PURE__ */
|
|
17833
|
+
/* @__PURE__ */ jsx150("span", { children: t.sampleLabel }),
|
|
17834
|
+
/* @__PURE__ */ jsx150("b", { children: formatOdds(SAMPLE, s.oddsFormat) })
|
|
17818
17835
|
] }),
|
|
17819
|
-
/* @__PURE__ */
|
|
17836
|
+
/* @__PURE__ */ jsx150("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-odds", children: ODDS.map((f) => /* @__PURE__ */ jsx150("button", { type: "button", "aria-pressed": s.oddsFormat === f, onClick: () => s.setOddsFormat(f), children: t[f] }, f)) })
|
|
17820
17837
|
] }),
|
|
17821
17838
|
!s.themeLocked && /* @__PURE__ */ jsxs132("div", { className: "ss-w-set-row", children: [
|
|
17822
|
-
/* @__PURE__ */
|
|
17823
|
-
/* @__PURE__ */
|
|
17839
|
+
/* @__PURE__ */ jsx150("div", { className: "ss-w-tool-label", id: "ss-w-set-theme", children: t.themeLabel }),
|
|
17840
|
+
/* @__PURE__ */ jsx150("div", { className: "ss-w-set-seg", role: "group", "aria-labelledby": "ss-w-set-theme", children: THEMES2.map((m) => /* @__PURE__ */ jsx150("button", { type: "button", "aria-pressed": s.theme === m, onClick: () => s.setTheme(m), children: t[m] }, m)) })
|
|
17824
17841
|
] })
|
|
17825
17842
|
]
|
|
17826
17843
|
}
|
|
@@ -17828,7 +17845,7 @@ function SettingsSheet({ ui, onClose }) {
|
|
|
17828
17845
|
}
|
|
17829
17846
|
|
|
17830
17847
|
// src/components/ChatPanel.tsx
|
|
17831
|
-
import { Fragment as
|
|
17848
|
+
import { Fragment as Fragment46, jsx as jsx151, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
17832
17849
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
17833
17850
|
function useIsModal() {
|
|
17834
17851
|
const [modal, setModal] = useState80(false);
|
|
@@ -17879,9 +17896,13 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
17879
17896
|
setSelectedPlayerId(null);
|
|
17880
17897
|
clearPlayerDetail?.();
|
|
17881
17898
|
}, [activeTab, selectedPlayerId, clearPlayerDetail]);
|
|
17899
|
+
const favouritesOffered = !!monitor && (favouritesEnabled ?? false) && !!favourites;
|
|
17900
|
+
const favouritesOpen = favouritesOffered && (favourites?.open ?? false);
|
|
17901
|
+
const favouritesAskedOpen = favourites?.open ?? false;
|
|
17902
|
+
const setFavouritesOpen = favourites?.onOpenChange;
|
|
17882
17903
|
useEffect53(() => {
|
|
17883
|
-
if (
|
|
17884
|
-
}, [
|
|
17904
|
+
if (favouritesAskedOpen && !favouritesOffered) setFavouritesOpen?.(false);
|
|
17905
|
+
}, [favouritesAskedOpen, favouritesOffered, setFavouritesOpen]);
|
|
17885
17906
|
const storedTab = tabState?.activeTab;
|
|
17886
17907
|
useEffect53(() => {
|
|
17887
17908
|
const unreachable = storedTab === "builder" ? !hasBuilder : !monitor && storedTab !== void 0 && storedTab !== "chat";
|
|
@@ -17928,12 +17949,23 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
17928
17949
|
const hasSettings = settings.oddsOffered || !settings.themeLocked;
|
|
17929
17950
|
const openSettings = useCallback27(() => {
|
|
17930
17951
|
setTool(null);
|
|
17952
|
+
setFavouritesOpen?.(false);
|
|
17931
17953
|
setSettingsOpen(true);
|
|
17932
|
-
}, []);
|
|
17954
|
+
}, [setFavouritesOpen]);
|
|
17933
17955
|
const closeSettings = useCallback27(() => {
|
|
17934
17956
|
setSettingsOpen(false);
|
|
17935
17957
|
panelRef.current?.querySelector(".ss-w-kebab")?.focus();
|
|
17936
17958
|
}, []);
|
|
17959
|
+
const openFavourites = useCallback27(() => setFavouritesOpen?.(true), [setFavouritesOpen]);
|
|
17960
|
+
const closeFavourites = useCallback27(() => {
|
|
17961
|
+
setFavouritesOpen?.(false);
|
|
17962
|
+
panelRef.current?.querySelector(".ss-w-kebab")?.focus();
|
|
17963
|
+
}, [setFavouritesOpen]);
|
|
17964
|
+
useEffect53(() => {
|
|
17965
|
+
if (!favouritesOpen) return;
|
|
17966
|
+
setTool(null);
|
|
17967
|
+
setSettingsOpen(false);
|
|
17968
|
+
}, [favouritesOpen]);
|
|
17937
17969
|
const paused = isPaused(state.limit);
|
|
17938
17970
|
useEffect53(() => {
|
|
17939
17971
|
if (paused) setTool(null);
|
|
@@ -17977,6 +18009,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
17977
18009
|
}, [tool, onChatTab, presetGrid]);
|
|
17978
18010
|
const backRef = useRef45(() => false);
|
|
17979
18011
|
backRef.current = () => {
|
|
18012
|
+
if (favouritesOpen) {
|
|
18013
|
+
closeFavourites();
|
|
18014
|
+
return true;
|
|
18015
|
+
}
|
|
17980
18016
|
if (settingsOpen && hasSettings) {
|
|
17981
18017
|
closeSettings();
|
|
17982
18018
|
return true;
|
|
@@ -18001,7 +18037,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18001
18037
|
return () => onRegisterBack(null);
|
|
18002
18038
|
}, [onRegisterBack]);
|
|
18003
18039
|
return /* @__PURE__ */ jsxs133("div", { ref: panelRef, className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
18004
|
-
/* @__PURE__ */
|
|
18040
|
+
/* @__PURE__ */ jsx151(
|
|
18005
18041
|
ChatHeader,
|
|
18006
18042
|
{
|
|
18007
18043
|
onClose: () => closeWith("button"),
|
|
@@ -18013,10 +18049,12 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18013
18049
|
newConversationLabel: ui.newConversation,
|
|
18014
18050
|
moreOptionsLabel: ui.moreOptions,
|
|
18015
18051
|
onOpenSettings: hasSettings ? openSettings : void 0,
|
|
18016
|
-
settingsLabel: ui.settings.title
|
|
18052
|
+
settingsLabel: ui.settings.title,
|
|
18053
|
+
onOpenFavourites: favouritesOffered ? openFavourites : void 0,
|
|
18054
|
+
favouritesLabel: ui.tabFavourites
|
|
18017
18055
|
}
|
|
18018
18056
|
),
|
|
18019
|
-
tabs && /* @__PURE__ */
|
|
18057
|
+
tabs && /* @__PURE__ */ jsx151(
|
|
18020
18058
|
TabBar,
|
|
18021
18059
|
{
|
|
18022
18060
|
monitor: tabs,
|
|
@@ -18027,15 +18065,14 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18027
18065
|
hasSchedule: !!monitor && !!discovery && !!schedule,
|
|
18028
18066
|
hasBuilder,
|
|
18029
18067
|
gamesEnabled: !!monitor && (gamesResult?.enabled ?? false),
|
|
18030
|
-
clubEnabled: clubFixturesResult?.enabled ?? false
|
|
18031
|
-
favouritesEnabled: !!monitor && (favouritesEnabled ?? false)
|
|
18068
|
+
clubEnabled: clubFixturesResult?.enabled ?? false
|
|
18032
18069
|
}
|
|
18033
18070
|
),
|
|
18034
18071
|
/* @__PURE__ */ jsxs133("div", { className: "ss-w-chat-layer", style: onChatTab ? void 0 : HIDDEN_LAYER_STYLE, children: [
|
|
18035
|
-
/* @__PURE__ */
|
|
18036
|
-
tool && presetGrid && onChatTab && !paused ? /* @__PURE__ */
|
|
18072
|
+
/* @__PURE__ */ jsx151(PresetToolsContext.Provider, { value: toolsValue, children: /* @__PURE__ */ jsx151(MessageList, { controller, ui, slip, onDashboardTap, monitor, onGreetingSport: favourites?.onSportChange }) }),
|
|
18073
|
+
tool && presetGrid && onChatTab && !paused ? /* @__PURE__ */ jsx151(BuildComboTool, { grid: presetGrid, strings: ui.presets, streaming: state.isStreaming, formatKickoff, initialTotal: tool.total, initialLegs: tool.legs, onSend: sendAsk, onClose: closeTool }) : null
|
|
18037
18074
|
] }),
|
|
18038
|
-
monitor && discovery && schedule && monitor.activeTab === "live" && /* @__PURE__ */
|
|
18075
|
+
monitor && discovery && schedule && monitor.activeTab === "live" && /* @__PURE__ */ jsx151(
|
|
18039
18076
|
LivePanel,
|
|
18040
18077
|
{
|
|
18041
18078
|
discovery,
|
|
@@ -18053,7 +18090,7 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18053
18090
|
}
|
|
18054
18091
|
}
|
|
18055
18092
|
),
|
|
18056
|
-
monitor && discovery && schedule && monitor.activeTab === "matches" && /* @__PURE__ */
|
|
18093
|
+
monitor && discovery && schedule && monitor.activeTab === "matches" && /* @__PURE__ */ jsx151(
|
|
18057
18094
|
ScheduleMatchesPanel,
|
|
18058
18095
|
{
|
|
18059
18096
|
discovery,
|
|
@@ -18075,19 +18112,19 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18075
18112
|
}
|
|
18076
18113
|
}
|
|
18077
18114
|
),
|
|
18078
|
-
tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */
|
|
18079
|
-
monitor && monitor.activeTab === "following" && /* @__PURE__ */
|
|
18080
|
-
monitor && monitor.activeTab === "trends" && /* @__PURE__ */
|
|
18081
|
-
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */
|
|
18082
|
-
monitor && monitor.activeTab === "standings" && /* @__PURE__ */
|
|
18083
|
-
monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs133(
|
|
18084
|
-
/* @__PURE__ */
|
|
18115
|
+
tabs && tabs.activeTab === "builder" && hasBuilder && builder && /* @__PURE__ */ jsx151(BuilderPanel, { options: builder.options, sport: builder.sport, onSportChange: builder.onSportChange, ui, slip, onCoolOff: builder.onCoolOff }),
|
|
18116
|
+
monitor && monitor.activeTab === "following" && /* @__PURE__ */ jsx151(MatchesPanel, { monitor, ui, slip, onAsk: paused ? void 0 : handleAsk, discovery }),
|
|
18117
|
+
monitor && monitor.activeTab === "trends" && /* @__PURE__ */ jsx151(TrendsPanel, { monitor, ui, slip }),
|
|
18118
|
+
monitor && monitor.activeTab === "fixtures" && /* @__PURE__ */ jsx151(Fixtures, { fixtures: clubFixturesResult?.fixtures ?? [], loading: clubFixturesResult?.loading ?? false, ui }),
|
|
18119
|
+
monitor && monitor.activeTab === "standings" && /* @__PURE__ */ jsx151(Standings, { standings: clubStandingsResult?.data ?? null, loading: clubStandingsResult?.loading ?? false, ui }),
|
|
18120
|
+
monitor && monitor.activeTab === "squad" && /* @__PURE__ */ jsxs133(Fragment46, { children: [
|
|
18121
|
+
/* @__PURE__ */ jsx151(
|
|
18085
18122
|
"div",
|
|
18086
18123
|
{
|
|
18087
18124
|
ref: squadLayerRef,
|
|
18088
18125
|
style: selectedPlayerId === null ? SQUAD_LAYER_STYLE : HIDDEN_LAYER_STYLE,
|
|
18089
18126
|
"aria-hidden": selectedPlayerId !== null ? true : void 0,
|
|
18090
|
-
children: /* @__PURE__ */
|
|
18127
|
+
children: /* @__PURE__ */ jsx151(
|
|
18091
18128
|
Squad,
|
|
18092
18129
|
{
|
|
18093
18130
|
squad: clubSquadResult?.data ?? null,
|
|
@@ -18105,9 +18142,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18105
18142
|
)
|
|
18106
18143
|
}
|
|
18107
18144
|
),
|
|
18108
|
-
selectedPlayerId !== null && /* @__PURE__ */
|
|
18145
|
+
selectedPlayerId !== null && /* @__PURE__ */ jsx151(PlayerDetail, { detail: clubPlayerDetailResult?.data ?? null, loading: clubPlayerDetailResult?.loading ?? false, ui, seasonName: clubSquadStatsResult?.seasonName ?? null, onClose: closePlayer })
|
|
18109
18146
|
] }),
|
|
18110
|
-
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */
|
|
18147
|
+
monitor && monitor.activeTab === "games" && gamesResult && /* @__PURE__ */ jsx151(
|
|
18111
18148
|
GamesPanel,
|
|
18112
18149
|
{
|
|
18113
18150
|
loggedIn: !!loggedIn,
|
|
@@ -18122,10 +18159,9 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18122
18159
|
}
|
|
18123
18160
|
}
|
|
18124
18161
|
),
|
|
18125
|
-
|
|
18126
|
-
|
|
18127
|
-
|
|
18128
|
-
paused ? null : /* @__PURE__ */ jsx150(
|
|
18162
|
+
(!tabs || tabs.activeTab !== "games" && tabs.activeTab !== "builder") && /* @__PURE__ */ jsxs133(Fragment46, { children: [
|
|
18163
|
+
/* @__PURE__ */ jsx151("div", { ref: limitRef, className: "ss-w-limit", role: "status", tabIndex: -1, children: state.limit ? limitText(state.limit, ui) : null }),
|
|
18164
|
+
paused ? null : /* @__PURE__ */ jsx151(
|
|
18129
18165
|
ChatInput,
|
|
18130
18166
|
{
|
|
18131
18167
|
ref: inputRef,
|
|
@@ -18139,14 +18175,15 @@ function ChatPanel({ controller, ui, slip, onDashboardTap, monitor, discovery, s
|
|
|
18139
18175
|
}
|
|
18140
18176
|
)
|
|
18141
18177
|
] }),
|
|
18142
|
-
settingsOpen && hasSettings ? /* @__PURE__ */
|
|
18178
|
+
settingsOpen && hasSettings ? /* @__PURE__ */ jsx151(SettingsSheet, { ui, onClose: closeSettings }) : null,
|
|
18179
|
+
favouritesOpen && favourites ? /* @__PURE__ */ jsx151(FavouritesSheet, { ui, controller: favourites.controller, sport: favourites.sport, sports: favourites.sports, onSportChange: favourites.onSportChange, onClose: closeFavourites }) : null
|
|
18143
18180
|
] });
|
|
18144
18181
|
}
|
|
18145
18182
|
|
|
18146
18183
|
// src/components/HostEventsProvider.tsx
|
|
18147
|
-
import { jsx as
|
|
18184
|
+
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
18148
18185
|
function HostEventsProvider({ value, children }) {
|
|
18149
|
-
return /* @__PURE__ */
|
|
18186
|
+
return /* @__PURE__ */ jsx152(SlipStateContext.Provider, { value: value.slipState, children });
|
|
18150
18187
|
}
|
|
18151
18188
|
|
|
18152
18189
|
// src/styles/css.generated.ts
|
|
@@ -18746,7 +18783,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
18746
18783
|
.ss-w-mo-stat { font-size: 12px; color: var(--ss-w-ink); background: color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-panel)); border-radius: 8px; padding: 7px 9px; }
|
|
18747
18784
|
.ss-w-mo-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--ss-w-line); }
|
|
18748
18785
|
.ss-w-mo-row:last-child { border-bottom: none; }
|
|
18749
|
-
|
|
18786
|
+
/* min-content, not 0: a long slip label (it-IT "Aggiungi alla schedina") otherwise squeezes the
|
|
18787
|
+
label narrower than one word and the name runs into the price. The slip button wraps instead. */
|
|
18788
|
+
.ss-w-mo-sel { font-size: 12.5px; font-weight: 600; color: var(--ss-w-ink); flex: 1; min-width: min-content; }
|
|
18750
18789
|
.ss-w-mo-price { margin-left: auto; font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; color: var(--ss-w-accent); }
|
|
18751
18790
|
/* Movement: BOTH directions share --ss-w-faint on purpose. Green-good/red-bad would frame a
|
|
18752
18791
|
shortening price as a discount, which inverts what it actually means for the bettor. */
|
|
@@ -18757,7 +18796,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
18757
18796
|
a flex row, and must NOT follow the badge into the insight card's odds column. */
|
|
18758
18797
|
.ss-w-mo-row .ss-w-move { margin-left: auto; }
|
|
18759
18798
|
.ss-w-mo-row .ss-w-move + .ss-w-mo-price { margin-left: 0; }
|
|
18760
|
-
.ss-w-mo-row .ss-w-slip { margin: 0; flex:
|
|
18799
|
+
.ss-w-mo-row .ss-w-slip { margin: 0; flex: 0 1 auto; min-width: 0; }
|
|
18800
|
+
.ss-w-mo-row .ss-w-slip-btn { white-space: normal; text-align: center; }
|
|
18761
18801
|
.ss-w-mo-foot { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--ss-w-faint); }
|
|
18762
18802
|
.ss-w-allmk-wrap { position: relative; display: inline-flex; flex: none; margin-left: auto; }
|
|
18763
18803
|
.ss-w-allmk-wrap--chip { margin-left: 0; }
|
|
@@ -19482,9 +19522,6 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
19482
19522
|
/* The dot sits on the tab's corner and takes no width: a poll landing late must not push the last tab out of a strip that already fits to the pixel */
|
|
19483
19523
|
.ss-w-tab { position: relative; }
|
|
19484
19524
|
.ss-w-tab-dot { position: absolute; top: 4px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-neg); }
|
|
19485
|
-
.ss-w-tab-star { display: none; font-size: 15px; line-height: 1; }
|
|
19486
|
-
.ss-w-tab[data-compact] .ss-w-tab-star { display: inline; }
|
|
19487
|
-
.ss-w-tab[data-compact] .ss-w-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
19488
19525
|
.ss-w-sportchips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 3px; }
|
|
19489
19526
|
.ss-w-sportchips::-webkit-scrollbar { display: none; }
|
|
19490
19527
|
.ss-w-sportchip { display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 32px; padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 620; white-space: nowrap; color: var(--ss-w-ink); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 999px; cursor: pointer; }
|
|
@@ -19677,7 +19714,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
19677
19714
|
}
|
|
19678
19715
|
.ss-w-lg-showall { align-self: flex-start; min-height: 28px; background: none; border: none; font: inherit; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); cursor: pointer; padding: 4px 2px 0; }
|
|
19679
19716
|
.ss-w-lg-showall:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
19680
|
-
.
|
|
19717
|
+
/* The sheet's body scrolls, so the panel inside is a plain column. A set height keeps the sheet still while search results come and go. */
|
|
19718
|
+
.ss-w-fav-sheet > .ss-w-tool { height: 85%; }
|
|
19719
|
+
.ss-w-fav { display: flex; flex-direction: column; gap: 14px; }
|
|
19681
19720
|
.ss-w-fav-saved { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ss-w-faint); }
|
|
19682
19721
|
.ss-w-fav-saved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ss-w-accent); flex: none; }
|
|
19683
19722
|
.ss-w-fav-saved--browser::before { background: var(--ss-w-warn); }
|
|
@@ -20942,7 +20981,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
20942
20981
|
`;
|
|
20943
20982
|
|
|
20944
20983
|
// src/StatsWidget.tsx
|
|
20945
|
-
import { jsx as
|
|
20984
|
+
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
20946
20985
|
function buildClient(props) {
|
|
20947
20986
|
try {
|
|
20948
20987
|
if ("client" in props && props.client) {
|
|
@@ -21165,6 +21204,8 @@ function StatsWidget(props) {
|
|
|
21165
21204
|
onChanged: discovery.refreshSchedule
|
|
21166
21205
|
});
|
|
21167
21206
|
const favouritesEnabled = hasFavouritesIdentity && favourites.status !== "refused";
|
|
21207
|
+
const [favouritesOpen, setFavouritesOpen] = useState81(false);
|
|
21208
|
+
if (!panelOpen && favouritesOpen) setFavouritesOpen(false);
|
|
21168
21209
|
const getPricePresets = useCallback28(
|
|
21169
21210
|
(locale) => built ? built.conversation.getPricePresets(locale, { pool: "open" }) : Promise.resolve(null),
|
|
21170
21211
|
[built]
|
|
@@ -21287,17 +21328,17 @@ function StatsWidget(props) {
|
|
|
21287
21328
|
const personalGreeting = useMemo13(() => ({
|
|
21288
21329
|
favourites: favouritesEnabled && monitor.enabled ? favourites : null,
|
|
21289
21330
|
conversation: built?.conversation ?? null,
|
|
21290
|
-
openFavourites: () =>
|
|
21291
|
-
// Not before the club probe has answered: a club brand has no Favourites
|
|
21292
|
-
|
|
21293
|
-
// The
|
|
21331
|
+
openFavourites: () => setFavouritesOpen(true),
|
|
21332
|
+
// Not before the club probe has answered: a club brand has no Favourites sheet, and the invite must not appear and then go.
|
|
21333
|
+
favouritesOffered: favouritesEnabled && monitor.enabled && clubFixturesResult.settled && !clubFixturesResult.enabled,
|
|
21334
|
+
// The sheet is offered, so a link to it opens it: the probe is out for at most CLUB_TAB_WAIT_MS before it is.
|
|
21294
21335
|
favouritesReady: favouritesEnabled && monitor.enabled && clubFixturesResult.tabReady && !clubFixturesResult.enabled,
|
|
21295
21336
|
holds,
|
|
21296
21337
|
memory: builderMemory
|
|
21297
|
-
}), [favouritesEnabled, monitor.enabled, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled,
|
|
21338
|
+
}), [favouritesEnabled, monitor.enabled, clubFixturesResult.settled, clubFixturesResult.tabReady, clubFixturesResult.enabled, favourites, built, holds, builderMemory]);
|
|
21298
21339
|
if (!built || widgetStrings.state === "unavailable") return null;
|
|
21299
21340
|
const attrs = themeAttrs(ui, oddsSettings.userTheme);
|
|
21300
|
-
return /* @__PURE__ */
|
|
21341
|
+
return /* @__PURE__ */ jsx153(EventLogContext.Provider, { value: logger, children: /* @__PURE__ */ jsx153(TrackingContext.Provider, { value: track, children: /* @__PURE__ */ jsx153(SportScopeContext.Provider, { value: sportScope, children: /* @__PURE__ */ jsx153(OddsSettingsContext.Provider, { value: oddsSettings, children: /* @__PURE__ */ jsx153(HostEventsProvider, { value: hostEvents, children: /* @__PURE__ */ jsx153("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], "data-ss-w-mobile": props.mobile ? "" : void 0, style: attrs.style, children: panelOpen ? /* @__PURE__ */ jsx153(PersonalGreetingContext.Provider, { value: personalGreeting, children: /* @__PURE__ */ jsx153(
|
|
21301
21342
|
ChatPanel,
|
|
21302
21343
|
{
|
|
21303
21344
|
controller,
|
|
@@ -21328,12 +21369,12 @@ function StatsWidget(props) {
|
|
|
21328
21369
|
conversation: built?.conversation ?? null,
|
|
21329
21370
|
presetGrid,
|
|
21330
21371
|
favouritesEnabled: favouritesEnabled && clubFixturesResult.tabReady && !clubFixturesResult.enabled,
|
|
21331
|
-
favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick },
|
|
21372
|
+
favourites: { controller: favourites, sport: favSport, sports: favSports, onSportChange: setFavSportPick, open: favouritesOpen, onOpenChange: setFavouritesOpen },
|
|
21332
21373
|
builder: { options: builderOptions, sport: builderSport, onSportChange: setBuilderSportPick, onCoolOff: onBuilderCoolOff, tabs: monitor },
|
|
21333
21374
|
onCloseRequested: mobile.onCloseRequested,
|
|
21334
21375
|
onRegisterBack: mobile.onRegisterBack
|
|
21335
21376
|
}
|
|
21336
|
-
) }) : props.mobile ? null : /* @__PURE__ */
|
|
21377
|
+
) }) : props.mobile ? null : /* @__PURE__ */ jsx153(
|
|
21337
21378
|
ChatFab,
|
|
21338
21379
|
{
|
|
21339
21380
|
label: stringsPending ? cfg?.launcherLabel : ui.launcherLabel,
|